@pipelex/mthds-ui 0.10.0 → 0.12.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/{chunk-D2ID5Z3Y.js → chunk-R34J4GFM.js} +2 -1
- package/dist/chunk-R34J4GFM.js.map +1 -0
- package/dist/graph/index.d.ts +2 -2
- package/dist/graph/index.js +1 -1
- package/dist/graph/react/index.css +8 -0
- package/dist/graph/react/index.css.map +1 -1
- package/dist/graph/react/index.d.ts +2 -2
- package/dist/graph/react/index.js +360 -309
- package/dist/graph/react/index.js.map +1 -1
- package/dist/graph/react/stuff/StuffViewer.css +12 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/standalone/graph-standalone.html +21 -9
- package/dist/standalone/graph-viewer.css +12 -0
- package/dist/standalone/graph-viewer.js +9 -9
- package/dist/{types-CEDZIAmh.d.ts → types-B3nefYpV.d.ts} +21 -3
- package/package.json +1 -1
- package/dist/chunk-D2ID5Z3Y.js.map +0 -1
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
"use strict";(()=>{var ZT=Object.create;var Cg=Object.defineProperty;var jT=Object.getOwnPropertyDescriptor;var $T=Object.getOwnPropertyNames;var FT=Object.getPrototypeOf,KT=Object.prototype.hasOwnProperty;var Jt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var QT=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of $T(t))!KT.call(e,i)&&i!==n&&Cg(e,i,{get:()=>t[i],enumerable:!(o=jT(t,i))||o.enumerable});return e};var oe=(e,t,n)=>(n=e!=null?ZT(FT(e)):{},QT(t||!e||!e.__esModule?Cg(n,"default",{value:e,enumerable:!0}):n,e));var Pg=Jt(me=>{"use strict";var Qf=Symbol.for("react.transitional.element"),WT=Symbol.for("react.portal"),JT=Symbol.for("react.fragment"),e2=Symbol.for("react.strict_mode"),t2=Symbol.for("react.profiler"),n2=Symbol.for("react.consumer"),o2=Symbol.for("react.context"),i2=Symbol.for("react.forward_ref"),a2=Symbol.for("react.suspense"),l2=Symbol.for("react.memo"),Rg=Symbol.for("react.lazy"),r2=Symbol.for("react.activity"),wg=Symbol.iterator;function s2(e){return e===null||typeof e!="object"?null:(e=wg&&e[wg]||e["@@iterator"],typeof e=="function"?e:null)}var Og={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},zg=Object.assign,Lg={};function Ia(e,t,n){this.props=e,this.context=t,this.refs=Lg,this.updater=n||Og}Ia.prototype.isReactComponent={};Ia.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("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")};Ia.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Bg(){}Bg.prototype=Ia.prototype;function Wf(e,t,n){this.props=e,this.context=t,this.refs=Lg,this.updater=n||Og}var Jf=Wf.prototype=new Bg;Jf.constructor=Wf;zg(Jf,Ia.prototype);Jf.isPureReactComponent=!0;var Ag=Array.isArray;function Kf(){}var Ye={H:null,A:null,T:null,S:null},Hg=Object.prototype.hasOwnProperty;function ed(e,t,n){var o=n.ref;return{$$typeof:Qf,type:e,key:t,ref:o!==void 0?o:null,props:n}}function u2(e,t){return ed(e.type,t,e.props)}function td(e){return typeof e=="object"&&e!==null&&e.$$typeof===Qf}function c2(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Mg=/\/+/g;function Ff(e,t){return typeof e=="object"&&e!==null&&e.key!=null?c2(""+e.key):t.toString(36)}function f2(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Kf,Kf):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function Ua(e,t,n,o,i){var a=typeof e;(a==="undefined"||a==="boolean")&&(e=null);var l=!1;if(e===null)l=!0;else switch(a){case"bigint":case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case Qf:case WT:l=!0;break;case Rg:return l=e._init,Ua(l(e._payload),t,n,o,i)}}if(l)return i=i(e),l=o===""?"."+Ff(e,0):o,Ag(i)?(n="",l!=null&&(n=l.replace(Mg,"$&/")+"/"),Ua(i,t,n,"",function(u){return u})):i!=null&&(td(i)&&(i=u2(i,n+(i.key==null||e&&e.key===i.key?"":(""+i.key).replace(Mg,"$&/")+"/")+l)),t.push(i)),1;l=0;var r=o===""?".":o+":";if(Ag(e))for(var s=0;s<e.length;s++)o=e[s],a=r+Ff(o,s),l+=Ua(o,t,n,a,i);else if(s=s2(e),typeof s=="function")for(e=s.call(e),s=0;!(o=e.next()).done;)o=o.value,a=r+Ff(o,s++),l+=Ua(o,t,n,a,i);else if(a==="object"){if(typeof e.then=="function")return Ua(f2(e),t,n,o,i);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 l}function nu(e,t,n){if(e==null)return e;var o=[],i=0;return Ua(e,o,"","",function(a){return t.call(n,a,i++)}),o}function d2(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 Dg=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},p2={map:nu,forEach:function(e,t,n){nu(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return nu(e,function(){t++}),t},toArray:function(e){return nu(e,function(t){return t})||[]},only:function(e){if(!td(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};me.Activity=r2;me.Children=p2;me.Component=Ia;me.Fragment=JT;me.Profiler=t2;me.PureComponent=Wf;me.StrictMode=e2;me.Suspense=a2;me.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Ye;me.__COMPILER_RUNTIME={__proto__:null,c:function(e){return Ye.H.useMemoCache(e)}};me.cache=function(e){return function(){return e.apply(null,arguments)}};me.cacheSignal=function(){return null};me.cloneElement=function(e,t,n){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var o=zg({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=""+t.key),t)!Hg.call(t,a)||a==="key"||a==="__self"||a==="__source"||a==="ref"&&t.ref===void 0||(o[a]=t[a]);var a=arguments.length-2;if(a===1)o.children=n;else if(1<a){for(var l=Array(a),r=0;r<a;r++)l[r]=arguments[r+2];o.children=l}return ed(e.type,i,o)};me.createContext=function(e){return e={$$typeof:o2,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:n2,_context:e},e};me.createElement=function(e,t,n){var o,i={},a=null;if(t!=null)for(o in t.key!==void 0&&(a=""+t.key),t)Hg.call(t,o)&&o!=="key"&&o!=="__self"&&o!=="__source"&&(i[o]=t[o]);var l=arguments.length-2;if(l===1)i.children=n;else if(1<l){for(var r=Array(l),s=0;s<l;s++)r[s]=arguments[s+2];i.children=r}if(e&&e.defaultProps)for(o in l=e.defaultProps,l)i[o]===void 0&&(i[o]=l[o]);return ed(e,a,i)};me.createRef=function(){return{current:null}};me.forwardRef=function(e){return{$$typeof:i2,render:e}};me.isValidElement=td;me.lazy=function(e){return{$$typeof:Rg,_payload:{_status:-1,_result:e},_init:d2}};me.memo=function(e,t){return{$$typeof:l2,type:e,compare:t===void 0?null:t}};me.startTransition=function(e){var t=Ye.T,n={};Ye.T=n;try{var o=e(),i=Ye.S;i!==null&&i(n,o),typeof o=="object"&&o!==null&&typeof o.then=="function"&&o.then(Kf,Dg)}catch(a){Dg(a)}finally{t!==null&&n.types!==null&&(t.types=n.types),Ye.T=t}};me.unstable_useCacheRefresh=function(){return Ye.H.useCacheRefresh()};me.use=function(e){return Ye.H.use(e)};me.useActionState=function(e,t,n){return Ye.H.useActionState(e,t,n)};me.useCallback=function(e,t){return Ye.H.useCallback(e,t)};me.useContext=function(e){return Ye.H.useContext(e)};me.useDebugValue=function(){};me.useDeferredValue=function(e,t){return Ye.H.useDeferredValue(e,t)};me.useEffect=function(e,t){return Ye.H.useEffect(e,t)};me.useEffectEvent=function(e){return Ye.H.useEffectEvent(e)};me.useId=function(){return Ye.H.useId()};me.useImperativeHandle=function(e,t,n){return Ye.H.useImperativeHandle(e,t,n)};me.useInsertionEffect=function(e,t){return Ye.H.useInsertionEffect(e,t)};me.useLayoutEffect=function(e,t){return Ye.H.useLayoutEffect(e,t)};me.useMemo=function(e,t){return Ye.H.useMemo(e,t)};me.useOptimistic=function(e,t){return Ye.H.useOptimistic(e,t)};me.useReducer=function(e,t,n){return Ye.H.useReducer(e,t,n)};me.useRef=function(e){return Ye.H.useRef(e)};me.useState=function(e){return Ye.H.useState(e)};me.useSyncExternalStore=function(e,t,n){return Ye.H.useSyncExternalStore(e,t,n)};me.useTransition=function(){return Ye.H.useTransition()};me.version="19.2.4"});var At=Jt((Rz,kg)=>{"use strict";kg.exports=Pg()});var $g=Jt(Fe=>{"use strict";function ad(e,t){var n=e.length;e.push(t);e:for(;0<n;){var o=n-1>>>1,i=e[o];if(0<ou(i,t))e[o]=t,e[n]=i,n=o;else break e}}function uo(e){return e.length===0?null:e[0]}function au(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var o=0,i=e.length,a=i>>>1;o<a;){var l=2*(o+1)-1,r=e[l],s=l+1,u=e[s];if(0>ou(r,n))s<i&&0>ou(u,r)?(e[o]=u,e[s]=n,o=s):(e[o]=r,e[l]=n,o=l);else if(s<i&&0>ou(u,n))e[o]=u,e[s]=n,o=s;else break e}}return t}function ou(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}Fe.unstable_now=void 0;typeof performance=="object"&&typeof performance.now=="function"?(Gg=performance,Fe.unstable_now=function(){return Gg.now()}):(nd=Date,Ug=nd.now(),Fe.unstable_now=function(){return nd.now()-Ug});var Gg,nd,Ug,Ro=[],fi=[],m2=1,zn=null,Pt=3,ld=!1,fr=!1,dr=!1,rd=!1,Yg=typeof setTimeout=="function"?setTimeout:null,Xg=typeof clearTimeout=="function"?clearTimeout:null,Ig=typeof setImmediate<"u"?setImmediate:null;function iu(e){for(var t=uo(fi);t!==null;){if(t.callback===null)au(fi);else if(t.startTime<=e)au(fi),t.sortIndex=t.expirationTime,ad(Ro,t);else break;t=uo(fi)}}function sd(e){if(dr=!1,iu(e),!fr)if(uo(Ro)!==null)fr=!0,Ya||(Ya=!0,Va());else{var t=uo(fi);t!==null&&ud(sd,t.startTime-e)}}var Ya=!1,pr=-1,qg=5,Zg=-1;function jg(){return rd?!0:!(Fe.unstable_now()-Zg<qg)}function od(){if(rd=!1,Ya){var e=Fe.unstable_now();Zg=e;var t=!0;try{e:{fr=!1,dr&&(dr=!1,Xg(pr),pr=-1),ld=!0;var n=Pt;try{t:{for(iu(e),zn=uo(Ro);zn!==null&&!(zn.expirationTime>e&&jg());){var o=zn.callback;if(typeof o=="function"){zn.callback=null,Pt=zn.priorityLevel;var i=o(zn.expirationTime<=e);if(e=Fe.unstable_now(),typeof i=="function"){zn.callback=i,iu(e),t=!0;break t}zn===uo(Ro)&&au(Ro),iu(e)}else au(Ro);zn=uo(Ro)}if(zn!==null)t=!0;else{var a=uo(fi);a!==null&&ud(sd,a.startTime-e),t=!1}}break e}finally{zn=null,Pt=n,ld=!1}t=void 0}}finally{t?Va():Ya=!1}}}var Va;typeof Ig=="function"?Va=function(){Ig(od)}:typeof MessageChannel<"u"?(id=new MessageChannel,Vg=id.port2,id.port1.onmessage=od,Va=function(){Vg.postMessage(null)}):Va=function(){Yg(od,0)};var id,Vg;function ud(e,t){pr=Yg(function(){e(Fe.unstable_now())},t)}Fe.unstable_IdlePriority=5;Fe.unstable_ImmediatePriority=1;Fe.unstable_LowPriority=4;Fe.unstable_NormalPriority=3;Fe.unstable_Profiling=null;Fe.unstable_UserBlockingPriority=2;Fe.unstable_cancelCallback=function(e){e.callback=null};Fe.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):qg=0<e?Math.floor(1e3/e):5};Fe.unstable_getCurrentPriorityLevel=function(){return Pt};Fe.unstable_next=function(e){switch(Pt){case 1:case 2:case 3:var t=3;break;default:t=Pt}var n=Pt;Pt=t;try{return e()}finally{Pt=n}};Fe.unstable_requestPaint=function(){rd=!0};Fe.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=Pt;Pt=e;try{return t()}finally{Pt=n}};Fe.unstable_scheduleCallback=function(e,t,n){var o=Fe.unstable_now();switch(typeof n=="object"&&n!==null?(n=n.delay,n=typeof n=="number"&&0<n?o+n:o):n=o,e){case 1:var i=-1;break;case 2:i=250;break;case 5:i=1073741823;break;case 4:i=1e4;break;default:i=5e3}return i=n+i,e={id:m2++,callback:t,priorityLevel:e,startTime:n,expirationTime:i,sortIndex:-1},n>o?(e.sortIndex=n,ad(fi,e),uo(Ro)===null&&e===uo(fi)&&(dr?(Xg(pr),pr=-1):dr=!0,ud(sd,n-o))):(e.sortIndex=i,ad(Ro,e),fr||ld||(fr=!0,Ya||(Ya=!0,Va()))),e};Fe.unstable_shouldYield=jg;Fe.unstable_wrapCallback=function(e){var t=Pt;return function(){var n=Pt;Pt=t;try{return e.apply(this,arguments)}finally{Pt=n}}}});var Kg=Jt((zz,Fg)=>{"use strict";Fg.exports=$g()});var Wg=Jt(Vt=>{"use strict";var h2=At();function Qg(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;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."}function di(){}var It={d:{f:di,r:function(){throw Error(Qg(522))},D:di,C:di,L:di,m:di,X:di,S:di,M:di},p:0,findDOMNode:null},g2=Symbol.for("react.portal");function y2(e,t,n){var o=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:g2,key:o==null?null:""+o,children:e,containerInfo:t,implementation:n}}var mr=h2.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function lu(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}Vt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=It;Vt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(Qg(299));return y2(e,t,null,n)};Vt.flushSync=function(e){var t=mr.T,n=It.p;try{if(mr.T=null,It.p=2,e)return e()}finally{mr.T=t,It.p=n,It.d.f()}};Vt.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,It.d.C(e,t))};Vt.prefetchDNS=function(e){typeof e=="string"&&It.d.D(e)};Vt.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var n=t.as,o=lu(n,t.crossOrigin),i=typeof t.integrity=="string"?t.integrity:void 0,a=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;n==="style"?It.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:o,integrity:i,fetchPriority:a}):n==="script"&&It.d.X(e,{crossOrigin:o,integrity:i,fetchPriority:a,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};Vt.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var n=lu(t.as,t.crossOrigin);It.d.M(e,{crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0})}}else t==null&&It.d.M(e)};Vt.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var n=t.as,o=lu(n,t.crossOrigin);It.d.L(e,n,{crossOrigin:o,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}};Vt.preloadModule=function(e,t){if(typeof e=="string")if(t){var n=lu(t.as,t.crossOrigin);It.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0})}else It.d.m(e)};Vt.requestFormReset=function(e){It.d.r(e)};Vt.unstable_batchedUpdates=function(e,t){return e(t)};Vt.useFormState=function(e,t,n){return mr.H.useFormState(e,t,n)};Vt.useFormStatus=function(){return mr.H.useHostTransitionStatus()};Vt.version="19.2.4"});var cd=Jt((Bz,ey)=>{"use strict";function Jg(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Jg)}catch(e){console.error(e)}}Jg(),ey.exports=Wg()});var d1=Jt(Rc=>{"use strict";var gt=Kg(),C0=At(),v2=cd();function U(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;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."}function w0(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function es(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function A0(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 M0(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function ty(e){if(es(e)!==e)throw Error(U(188))}function b2(e){var t=e.alternate;if(!t){if(t=es(e),t===null)throw Error(U(188));return t!==e?null:e}for(var n=e,o=t;;){var i=n.return;if(i===null)break;var a=i.alternate;if(a===null){if(o=i.return,o!==null){n=o;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return ty(i),e;if(a===o)return ty(i),t;a=a.sibling}throw Error(U(188))}if(n.return!==o.return)n=i,o=a;else{for(var l=!1,r=i.child;r;){if(r===n){l=!0,n=i,o=a;break}if(r===o){l=!0,o=i,n=a;break}r=r.sibling}if(!l){for(r=a.child;r;){if(r===n){l=!0,n=a,o=i;break}if(r===o){l=!0,o=a,n=i;break}r=r.sibling}if(!l)throw Error(U(189))}}if(n.alternate!==o)throw Error(U(190))}if(n.tag!==3)throw Error(U(188));return n.stateNode.current===n?e:t}function D0(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=D0(e),t!==null)return t;e=e.sibling}return null}var Ze=Object.assign,S2=Symbol.for("react.element"),ru=Symbol.for("react.transitional.element"),_r=Symbol.for("react.portal"),Fa=Symbol.for("react.fragment"),R0=Symbol.for("react.strict_mode"),Xd=Symbol.for("react.profiler"),O0=Symbol.for("react.consumer"),Go=Symbol.for("react.context"),Gp=Symbol.for("react.forward_ref"),qd=Symbol.for("react.suspense"),Zd=Symbol.for("react.suspense_list"),Up=Symbol.for("react.memo"),pi=Symbol.for("react.lazy"),jd=Symbol.for("react.activity"),x2=Symbol.for("react.memo_cache_sentinel"),ny=Symbol.iterator;function hr(e){return e===null||typeof e!="object"?null:(e=ny&&e[ny]||e["@@iterator"],typeof e=="function"?e:null)}var _2=Symbol.for("react.client.reference");function $d(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===_2?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Fa:return"Fragment";case Xd:return"Profiler";case R0:return"StrictMode";case qd:return"Suspense";case Zd:return"SuspenseList";case jd:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case _r:return"Portal";case Go:return e.displayName||"Context";case O0:return(e._context.displayName||"Context")+".Consumer";case Gp:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Up:return t=e.displayName||null,t!==null?t:$d(e.type)||"Memo";case pi:t=e._payload,e=e._init;try{return $d(e(t))}catch{}}return null}var Er=Array.isArray,ce=C0.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,De=v2.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ea={pending:!1,data:null,method:null,action:null},Fd=[],Ka=-1;function ho(e){return{current:e}}function Nt(e){0>Ka||(e.current=Fd[Ka],Fd[Ka]=null,Ka--)}function Ie(e,t){Ka++,Fd[Ka]=e.current,e.current=t}var mo=ho(null),Ur=ho(null),Ti=ho(null),Uu=ho(null);function Iu(e,t){switch(Ie(Ti,t),Ie(Ur,e),Ie(mo,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?u0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=u0(t),e=Wb(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Nt(mo),Ie(mo,e)}function ml(){Nt(mo),Nt(Ur),Nt(Ti)}function Kd(e){e.memoizedState!==null&&Ie(Uu,e);var t=mo.current,n=Wb(t,e.type);t!==n&&(Ie(Ur,e),Ie(mo,n))}function Vu(e){Ur.current===e&&(Nt(mo),Nt(Ur)),Uu.current===e&&(Nt(Uu),Qr._currentValue=ea)}var fd,oy;function Ki(e){if(fd===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);fd=t&&t[1]||"",oy=-1<n.stack.indexOf(`
|
|
1
|
+
"use strict";(()=>{var XT=Object.create;var xg=Object.defineProperty;var qT=Object.getOwnPropertyDescriptor;var ZT=Object.getOwnPropertyNames;var jT=Object.getPrototypeOf,$T=Object.prototype.hasOwnProperty;var en=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var FT=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ZT(t))!$T.call(e,i)&&i!==n&&xg(e,i,{get:()=>t[i],enumerable:!(o=qT(t,i))||o.enumerable});return e};var ne=(e,t,n)=>(n=e!=null?XT(jT(e)):{},FT(t||!e||!e.__esModule?xg(n,"default",{value:e,enumerable:!0}):n,e));var Og=en(he=>{"use strict";var Wf=Symbol.for("react.transitional.element"),KT=Symbol.for("react.portal"),QT=Symbol.for("react.fragment"),WT=Symbol.for("react.strict_mode"),JT=Symbol.for("react.profiler"),e2=Symbol.for("react.consumer"),t2=Symbol.for("react.context"),n2=Symbol.for("react.forward_ref"),o2=Symbol.for("react.suspense"),i2=Symbol.for("react.memo"),Cg=Symbol.for("react.lazy"),a2=Symbol.for("react.activity"),_g=Symbol.iterator;function l2(e){return e===null||typeof e!="object"?null:(e=_g&&e[_g]||e["@@iterator"],typeof e=="function"?e:null)}var wg={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Ag=Object.assign,Mg={};function Va(e,t,n){this.props=e,this.context=t,this.refs=Mg,this.updater=n||wg}Va.prototype.isReactComponent={};Va.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("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")};Va.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Dg(){}Dg.prototype=Va.prototype;function Jf(e,t,n){this.props=e,this.context=t,this.refs=Mg,this.updater=n||wg}var ed=Jf.prototype=new Dg;ed.constructor=Jf;Ag(ed,Va.prototype);ed.isPureReactComponent=!0;var Eg=Array.isArray;function Qf(){}var Ye={H:null,A:null,T:null,S:null},Rg=Object.prototype.hasOwnProperty;function td(e,t,n){var o=n.ref;return{$$typeof:Wf,type:e,key:t,ref:o!==void 0?o:null,props:n}}function r2(e,t){return td(e.type,t,e.props)}function nd(e){return typeof e=="object"&&e!==null&&e.$$typeof===Wf}function s2(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Tg=/\/+/g;function Kf(e,t){return typeof e=="object"&&e!==null&&e.key!=null?s2(""+e.key):t.toString(36)}function u2(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Qf,Qf):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function Ia(e,t,n,o,i){var a=typeof e;(a==="undefined"||a==="boolean")&&(e=null);var l=!1;if(e===null)l=!0;else switch(a){case"bigint":case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case Wf:case KT:l=!0;break;case Cg:return l=e._init,Ia(l(e._payload),t,n,o,i)}}if(l)return i=i(e),l=o===""?"."+Kf(e,0):o,Eg(i)?(n="",l!=null&&(n=l.replace(Tg,"$&/")+"/"),Ia(i,t,n,"",function(u){return u})):i!=null&&(nd(i)&&(i=r2(i,n+(i.key==null||e&&e.key===i.key?"":(""+i.key).replace(Tg,"$&/")+"/")+l)),t.push(i)),1;l=0;var r=o===""?".":o+":";if(Eg(e))for(var s=0;s<e.length;s++)o=e[s],a=r+Kf(o,s),l+=Ia(o,t,n,a,i);else if(s=l2(e),typeof s=="function")for(e=s.call(e),s=0;!(o=e.next()).done;)o=o.value,a=r+Kf(o,s++),l+=Ia(o,t,n,a,i);else if(a==="object"){if(typeof e.then=="function")return Ia(u2(e),t,n,o,i);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 l}function ou(e,t,n){if(e==null)return e;var o=[],i=0;return Ia(e,o,"","",function(a){return t.call(n,a,i++)}),o}function c2(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 Ng=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},f2={map:ou,forEach:function(e,t,n){ou(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ou(e,function(){t++}),t},toArray:function(e){return ou(e,function(t){return t})||[]},only:function(e){if(!nd(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};he.Activity=a2;he.Children=f2;he.Component=Va;he.Fragment=QT;he.Profiler=JT;he.PureComponent=Jf;he.StrictMode=WT;he.Suspense=o2;he.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Ye;he.__COMPILER_RUNTIME={__proto__:null,c:function(e){return Ye.H.useMemoCache(e)}};he.cache=function(e){return function(){return e.apply(null,arguments)}};he.cacheSignal=function(){return null};he.cloneElement=function(e,t,n){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var o=Ag({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=""+t.key),t)!Rg.call(t,a)||a==="key"||a==="__self"||a==="__source"||a==="ref"&&t.ref===void 0||(o[a]=t[a]);var a=arguments.length-2;if(a===1)o.children=n;else if(1<a){for(var l=Array(a),r=0;r<a;r++)l[r]=arguments[r+2];o.children=l}return td(e.type,i,o)};he.createContext=function(e){return e={$$typeof:t2,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:e2,_context:e},e};he.createElement=function(e,t,n){var o,i={},a=null;if(t!=null)for(o in t.key!==void 0&&(a=""+t.key),t)Rg.call(t,o)&&o!=="key"&&o!=="__self"&&o!=="__source"&&(i[o]=t[o]);var l=arguments.length-2;if(l===1)i.children=n;else if(1<l){for(var r=Array(l),s=0;s<l;s++)r[s]=arguments[s+2];i.children=r}if(e&&e.defaultProps)for(o in l=e.defaultProps,l)i[o]===void 0&&(i[o]=l[o]);return td(e,a,i)};he.createRef=function(){return{current:null}};he.forwardRef=function(e){return{$$typeof:n2,render:e}};he.isValidElement=nd;he.lazy=function(e){return{$$typeof:Cg,_payload:{_status:-1,_result:e},_init:c2}};he.memo=function(e,t){return{$$typeof:i2,type:e,compare:t===void 0?null:t}};he.startTransition=function(e){var t=Ye.T,n={};Ye.T=n;try{var o=e(),i=Ye.S;i!==null&&i(n,o),typeof o=="object"&&o!==null&&typeof o.then=="function"&&o.then(Qf,Ng)}catch(a){Ng(a)}finally{t!==null&&n.types!==null&&(t.types=n.types),Ye.T=t}};he.unstable_useCacheRefresh=function(){return Ye.H.useCacheRefresh()};he.use=function(e){return Ye.H.use(e)};he.useActionState=function(e,t,n){return Ye.H.useActionState(e,t,n)};he.useCallback=function(e,t){return Ye.H.useCallback(e,t)};he.useContext=function(e){return Ye.H.useContext(e)};he.useDebugValue=function(){};he.useDeferredValue=function(e,t){return Ye.H.useDeferredValue(e,t)};he.useEffect=function(e,t){return Ye.H.useEffect(e,t)};he.useEffectEvent=function(e){return Ye.H.useEffectEvent(e)};he.useId=function(){return Ye.H.useId()};he.useImperativeHandle=function(e,t,n){return Ye.H.useImperativeHandle(e,t,n)};he.useInsertionEffect=function(e,t){return Ye.H.useInsertionEffect(e,t)};he.useLayoutEffect=function(e,t){return Ye.H.useLayoutEffect(e,t)};he.useMemo=function(e,t){return Ye.H.useMemo(e,t)};he.useOptimistic=function(e,t){return Ye.H.useOptimistic(e,t)};he.useReducer=function(e,t,n){return Ye.H.useReducer(e,t,n)};he.useRef=function(e){return Ye.H.useRef(e)};he.useState=function(e){return Ye.H.useState(e)};he.useSyncExternalStore=function(e,t,n){return Ye.H.useSyncExternalStore(e,t,n)};he.useTransition=function(){return Ye.H.useTransition()};he.version="19.2.4"});var At=en((Dz,zg)=>{"use strict";zg.exports=Og()});var Yg=en(Fe=>{"use strict";function ld(e,t){var n=e.length;e.push(t);e:for(;0<n;){var o=n-1>>>1,i=e[o];if(0<iu(i,t))e[o]=t,e[n]=i,n=o;else break e}}function uo(e){return e.length===0?null:e[0]}function lu(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var o=0,i=e.length,a=i>>>1;o<a;){var l=2*(o+1)-1,r=e[l],s=l+1,u=e[s];if(0>iu(r,n))s<i&&0>iu(u,r)?(e[o]=u,e[s]=n,o=s):(e[o]=r,e[l]=n,o=l);else if(s<i&&0>iu(u,n))e[o]=u,e[s]=n,o=s;else break e}}return t}function iu(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}Fe.unstable_now=void 0;typeof performance=="object"&&typeof performance.now=="function"?(Lg=performance,Fe.unstable_now=function(){return Lg.now()}):(od=Date,Bg=od.now(),Fe.unstable_now=function(){return od.now()-Bg});var Lg,od,Bg,Oo=[],di=[],d2=1,Ln=null,Pt=3,rd=!1,dr=!1,pr=!1,sd=!1,kg=typeof setTimeout=="function"?setTimeout:null,Gg=typeof clearTimeout=="function"?clearTimeout:null,Hg=typeof setImmediate<"u"?setImmediate:null;function au(e){for(var t=uo(di);t!==null;){if(t.callback===null)lu(di);else if(t.startTime<=e)lu(di),t.sortIndex=t.expirationTime,ld(Oo,t);else break;t=uo(di)}}function ud(e){if(pr=!1,au(e),!dr)if(uo(Oo)!==null)dr=!0,Xa||(Xa=!0,Ya());else{var t=uo(di);t!==null&&cd(ud,t.startTime-e)}}var Xa=!1,mr=-1,Ug=5,Ig=-1;function Vg(){return sd?!0:!(Fe.unstable_now()-Ig<Ug)}function id(){if(sd=!1,Xa){var e=Fe.unstable_now();Ig=e;var t=!0;try{e:{dr=!1,pr&&(pr=!1,Gg(mr),mr=-1),rd=!0;var n=Pt;try{t:{for(au(e),Ln=uo(Oo);Ln!==null&&!(Ln.expirationTime>e&&Vg());){var o=Ln.callback;if(typeof o=="function"){Ln.callback=null,Pt=Ln.priorityLevel;var i=o(Ln.expirationTime<=e);if(e=Fe.unstable_now(),typeof i=="function"){Ln.callback=i,au(e),t=!0;break t}Ln===uo(Oo)&&lu(Oo),au(e)}else lu(Oo);Ln=uo(Oo)}if(Ln!==null)t=!0;else{var a=uo(di);a!==null&&cd(ud,a.startTime-e),t=!1}}break e}finally{Ln=null,Pt=n,rd=!1}t=void 0}}finally{t?Ya():Xa=!1}}}var Ya;typeof Hg=="function"?Ya=function(){Hg(id)}:typeof MessageChannel<"u"?(ad=new MessageChannel,Pg=ad.port2,ad.port1.onmessage=id,Ya=function(){Pg.postMessage(null)}):Ya=function(){kg(id,0)};var ad,Pg;function cd(e,t){mr=kg(function(){e(Fe.unstable_now())},t)}Fe.unstable_IdlePriority=5;Fe.unstable_ImmediatePriority=1;Fe.unstable_LowPriority=4;Fe.unstable_NormalPriority=3;Fe.unstable_Profiling=null;Fe.unstable_UserBlockingPriority=2;Fe.unstable_cancelCallback=function(e){e.callback=null};Fe.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Ug=0<e?Math.floor(1e3/e):5};Fe.unstable_getCurrentPriorityLevel=function(){return Pt};Fe.unstable_next=function(e){switch(Pt){case 1:case 2:case 3:var t=3;break;default:t=Pt}var n=Pt;Pt=t;try{return e()}finally{Pt=n}};Fe.unstable_requestPaint=function(){sd=!0};Fe.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=Pt;Pt=e;try{return t()}finally{Pt=n}};Fe.unstable_scheduleCallback=function(e,t,n){var o=Fe.unstable_now();switch(typeof n=="object"&&n!==null?(n=n.delay,n=typeof n=="number"&&0<n?o+n:o):n=o,e){case 1:var i=-1;break;case 2:i=250;break;case 5:i=1073741823;break;case 4:i=1e4;break;default:i=5e3}return i=n+i,e={id:d2++,callback:t,priorityLevel:e,startTime:n,expirationTime:i,sortIndex:-1},n>o?(e.sortIndex=n,ld(di,e),uo(Oo)===null&&e===uo(di)&&(pr?(Gg(mr),mr=-1):pr=!0,cd(ud,n-o))):(e.sortIndex=i,ld(Oo,e),dr||rd||(dr=!0,Xa||(Xa=!0,Ya()))),e};Fe.unstable_shouldYield=Vg;Fe.unstable_wrapCallback=function(e){var t=Pt;return function(){var n=Pt;Pt=t;try{return e.apply(this,arguments)}finally{Pt=n}}}});var qg=en((Oz,Xg)=>{"use strict";Xg.exports=Yg()});var jg=en(Vt=>{"use strict";var p2=At();function Zg(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;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."}function pi(){}var It={d:{f:pi,r:function(){throw Error(Zg(522))},D:pi,C:pi,L:pi,m:pi,X:pi,S:pi,M:pi},p:0,findDOMNode:null},m2=Symbol.for("react.portal");function h2(e,t,n){var o=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:m2,key:o==null?null:""+o,children:e,containerInfo:t,implementation:n}}var hr=p2.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function ru(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}Vt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=It;Vt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(Zg(299));return h2(e,t,null,n)};Vt.flushSync=function(e){var t=hr.T,n=It.p;try{if(hr.T=null,It.p=2,e)return e()}finally{hr.T=t,It.p=n,It.d.f()}};Vt.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,It.d.C(e,t))};Vt.prefetchDNS=function(e){typeof e=="string"&&It.d.D(e)};Vt.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var n=t.as,o=ru(n,t.crossOrigin),i=typeof t.integrity=="string"?t.integrity:void 0,a=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;n==="style"?It.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:o,integrity:i,fetchPriority:a}):n==="script"&&It.d.X(e,{crossOrigin:o,integrity:i,fetchPriority:a,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};Vt.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var n=ru(t.as,t.crossOrigin);It.d.M(e,{crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0})}}else t==null&&It.d.M(e)};Vt.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var n=t.as,o=ru(n,t.crossOrigin);It.d.L(e,n,{crossOrigin:o,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}};Vt.preloadModule=function(e,t){if(typeof e=="string")if(t){var n=ru(t.as,t.crossOrigin);It.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0})}else It.d.m(e)};Vt.requestFormReset=function(e){It.d.r(e)};Vt.unstable_batchedUpdates=function(e,t){return e(t)};Vt.useFormState=function(e,t,n){return hr.H.useFormState(e,t,n)};Vt.useFormStatus=function(){return hr.H.useHostTransitionStatus()};Vt.version="19.2.4"});var fd=en((Lz,Fg)=>{"use strict";function $g(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE($g)}catch(e){console.error(e)}}$g(),Fg.exports=jg()});var r1=en(Oc=>{"use strict";var gt=qg(),x0=At(),g2=fd();function U(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;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."}function _0(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ts(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function E0(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 T0(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Kg(e){if(ts(e)!==e)throw Error(U(188))}function y2(e){var t=e.alternate;if(!t){if(t=ts(e),t===null)throw Error(U(188));return t!==e?null:e}for(var n=e,o=t;;){var i=n.return;if(i===null)break;var a=i.alternate;if(a===null){if(o=i.return,o!==null){n=o;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return Kg(i),e;if(a===o)return Kg(i),t;a=a.sibling}throw Error(U(188))}if(n.return!==o.return)n=i,o=a;else{for(var l=!1,r=i.child;r;){if(r===n){l=!0,n=i,o=a;break}if(r===o){l=!0,o=i,n=a;break}r=r.sibling}if(!l){for(r=a.child;r;){if(r===n){l=!0,n=a,o=i;break}if(r===o){l=!0,o=a,n=i;break}r=r.sibling}if(!l)throw Error(U(189))}}if(n.alternate!==o)throw Error(U(190))}if(n.tag!==3)throw Error(U(188));return n.stateNode.current===n?e:t}function N0(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=N0(e),t!==null)return t;e=e.sibling}return null}var Ze=Object.assign,v2=Symbol.for("react.element"),su=Symbol.for("react.transitional.element"),Er=Symbol.for("react.portal"),Ka=Symbol.for("react.fragment"),C0=Symbol.for("react.strict_mode"),qd=Symbol.for("react.profiler"),w0=Symbol.for("react.consumer"),Uo=Symbol.for("react.context"),Up=Symbol.for("react.forward_ref"),Zd=Symbol.for("react.suspense"),jd=Symbol.for("react.suspense_list"),Ip=Symbol.for("react.memo"),mi=Symbol.for("react.lazy"),$d=Symbol.for("react.activity"),b2=Symbol.for("react.memo_cache_sentinel"),Qg=Symbol.iterator;function gr(e){return e===null||typeof e!="object"?null:(e=Qg&&e[Qg]||e["@@iterator"],typeof e=="function"?e:null)}var S2=Symbol.for("react.client.reference");function Fd(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===S2?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Ka:return"Fragment";case qd:return"Profiler";case C0:return"StrictMode";case Zd:return"Suspense";case jd:return"SuspenseList";case $d:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case Er:return"Portal";case Uo:return e.displayName||"Context";case w0:return(e._context.displayName||"Context")+".Consumer";case Up:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ip:return t=e.displayName||null,t!==null?t:Fd(e.type)||"Memo";case mi:t=e._payload,e=e._init;try{return Fd(e(t))}catch{}}return null}var Tr=Array.isArray,ce=x0.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,De=g2.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ta={pending:!1,data:null,method:null,action:null},Kd=[],Qa=-1;function ho(e){return{current:e}}function Nt(e){0>Qa||(e.current=Kd[Qa],Kd[Qa]=null,Qa--)}function Ie(e,t){Qa++,Kd[Qa]=e.current,e.current=t}var mo=ho(null),Ir=ho(null),Ni=ho(null),Iu=ho(null);function Vu(e,t){switch(Ie(Ni,t),Ie(Ir,e),Ie(mo,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?i0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=i0(t),e=jb(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Nt(mo),Ie(mo,e)}function hl(){Nt(mo),Nt(Ir),Nt(Ni)}function Qd(e){e.memoizedState!==null&&Ie(Iu,e);var t=mo.current,n=jb(t,e.type);t!==n&&(Ie(Ir,e),Ie(mo,n))}function Yu(e){Ir.current===e&&(Nt(mo),Nt(Ir)),Iu.current===e&&(Nt(Iu),Wr._currentValue=ta)}var dd,Wg;function Qi(e){if(dd===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);dd=t&&t[1]||"",Wg=-1<n.stack.indexOf(`
|
|
2
2
|
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
-
`+
|
|
3
|
+
`+dd+e+Wg}var pd=!1;function md(e,t){if(!e||pd)return"";pd=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={DetermineComponentFrameRoot:function(){try{if(t){var d=function(){throw Error()};if(Object.defineProperty(d.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(d,[])}catch(h){var f=h}Reflect.construct(e,[],d)}else{try{d.call()}catch(h){f=h}e.call(d.prototype)}}else{try{throw Error()}catch(h){f=h}(d=e())&&typeof d.catch=="function"&&d.catch(function(){})}}catch(h){if(h&&f&&typeof h.stack=="string")return[h.stack,f.stack]}return[null,null]}};o.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(o.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var a=o.DetermineComponentFrameRoot(),l=a[0],r=a[1];if(l&&r){var s=l.split(`
|
|
4
4
|
`),u=r.split(`
|
|
5
5
|
`);for(i=o=0;o<s.length&&!s[o].includes("DetermineComponentFrameRoot");)o++;for(;i<u.length&&!u[i].includes("DetermineComponentFrameRoot");)i++;if(o===s.length||i===u.length)for(o=s.length-1,i=u.length-1;1<=o&&0<=i&&s[o]!==u[i];)i--;for(;1<=o&&0<=i;o--,i--)if(s[o]!==u[i]){if(o!==1||i!==1)do if(o--,i--,0>i||s[o]!==u[i]){var c=`
|
|
6
|
-
`+s[o].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=o&&0<=i);break}}}finally{
|
|
6
|
+
`+s[o].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=o&&0<=i);break}}}finally{pd=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Qi(n):""}function x2(e,t){switch(e.tag){case 26:case 27:case 5:return Qi(e.type);case 16:return Qi("Lazy");case 13:return e.child!==t&&t!==null?Qi("Suspense Fallback"):Qi("Suspense");case 19:return Qi("SuspenseList");case 0:case 15:return md(e.type,!1);case 11:return md(e.type.render,!1);case 1:return md(e.type,!0);case 31:return Qi("Activity");default:return""}}function Jg(e){try{var t="",n=null;do t+=x2(e,n),n=e,e=e.return;while(e);return t}catch(o){return`
|
|
7
7
|
Error generating stack: `+o.message+`
|
|
8
|
-
`+o.stack}}var Qd=Object.prototype.hasOwnProperty,Ip=gt.unstable_scheduleCallback,md=gt.unstable_cancelCallback,T2=gt.unstable_shouldYield,N2=gt.unstable_requestPaint,bn=gt.unstable_now,C2=gt.unstable_getCurrentPriorityLevel,z0=gt.unstable_ImmediatePriority,L0=gt.unstable_UserBlockingPriority,Yu=gt.unstable_NormalPriority,w2=gt.unstable_LowPriority,B0=gt.unstable_IdlePriority,A2=gt.log,M2=gt.unstable_setDisableYieldValue,ts=null,Sn=null;function bi(e){if(typeof A2=="function"&&M2(e),Sn&&typeof Sn.setStrictMode=="function")try{Sn.setStrictMode(ts,e)}catch{}}var xn=Math.clz32?Math.clz32:O2,D2=Math.log,R2=Math.LN2;function O2(e){return e>>>=0,e===0?32:31-(D2(e)/R2|0)|0}var su=256,uu=262144,cu=4194304;function Qi(e){var t=e&42;if(t!==0)return t;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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function hc(e,t,n){var o=e.pendingLanes;if(o===0)return 0;var i=0,a=e.suspendedLanes,l=e.pingedLanes;e=e.warmLanes;var r=o&134217727;return r!==0?(o=r&~a,o!==0?i=Qi(o):(l&=r,l!==0?i=Qi(l):n||(n=r&~e,n!==0&&(i=Qi(n))))):(r=o&~a,r!==0?i=Qi(r):l!==0?i=Qi(l):n||(n=o&~e,n!==0&&(i=Qi(n)))),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&(n&4194048)!==0)?t:i}function ns(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function z2(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32: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:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function H0(){var e=cu;return cu<<=1,(cu&62914560)===0&&(cu=4194304),e}function hd(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function os(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function L2(e,t,n,o,i,a){var l=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var r=e.entanglements,s=e.expirationTimes,u=e.hiddenUpdates;for(n=l&~n;0<n;){var c=31-xn(n),d=1<<c;r[c]=0,s[c]=-1;var f=u[c];if(f!==null)for(u[c]=null,c=0;c<f.length;c++){var h=f[c];h!==null&&(h.lane&=-536870913)}n&=~d}o!==0&&P0(e,o,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(l&~t))}function P0(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var o=31-xn(t);e.entangledLanes|=t,e.entanglements[o]=e.entanglements[o]|1073741824|n&261930}function k0(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var o=31-xn(n),i=1<<o;i&t|e[o]&t&&(e[o]|=t),n&=~i}}function G0(e,t){var n=t&-t;return n=(n&42)!==0?1:Vp(n),(n&(e.suspendedLanes|t))!==0?0:n}function Vp(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Yp(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function U0(){var e=De.p;return e!==0?e:(e=window.event,e===void 0?32:u1(e.type))}function ay(e,t){var n=De.p;try{return De.p=e,t()}finally{De.p=n}}var Pi=Math.random().toString(36).slice(2),Dt="__reactFiber$"+Pi,ln="__reactProps$"+Pi,Nl="__reactContainer$"+Pi,Wd="__reactEvents$"+Pi,B2="__reactListeners$"+Pi,H2="__reactHandles$"+Pi,ly="__reactResources$"+Pi,is="__reactMarker$"+Pi;function Xp(e){delete e[Dt],delete e[ln],delete e[Wd],delete e[B2],delete e[H2]}function Qa(e){var t=e[Dt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Nl]||n[Dt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=m0(e);e!==null;){if(n=e[Dt])return n;e=m0(e)}return t}e=n,n=e.parentNode}return null}function Cl(e){if(e=e[Dt]||e[Nl]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Tr(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(U(33))}function rl(e){var t=e[ly];return t||(t=e[ly]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Tt(e){e[is]=!0}var I0=new Set,V0={};function ca(e,t){hl(e,t),hl(e+"Capture",t)}function hl(e,t){for(V0[e]=t,e=0;e<t.length;e++)I0.add(t[e])}var P2=RegExp("^[: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]*$"),ry={},sy={};function k2(e){return Qd.call(sy,e)?!0:Qd.call(ry,e)?!1:P2.test(e)?sy[e]=!0:(ry[e]=!0,!1)}function Nu(e,t,n){if(k2(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var o=t.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function fu(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function Oo(e,t,n,o){if(o===null)e.removeAttribute(n);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+o)}}function Bn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Y0(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function G2(e,t,n){var o=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var i=o.get,a=o.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(l){n=""+l,a.call(this,l)}}),Object.defineProperty(e,t,{enumerable:o.enumerable}),{getValue:function(){return n},setValue:function(l){n=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Jd(e){if(!e._valueTracker){var t=Y0(e)?"checked":"value";e._valueTracker=G2(e,t,""+e[t])}}function X0(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),o="";return e&&(o=Y0(e)?e.checked?"true":"false":e.value),e=o,e!==n?(t.setValue(e),!0):!1}function Xu(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}}var U2=/[\n"\\]/g;function kn(e){return e.replace(U2,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function ep(e,t,n,o,i,a,l,r){e.name="",l!=null&&typeof l!="function"&&typeof l!="symbol"&&typeof l!="boolean"?e.type=l:e.removeAttribute("type"),t!=null?l==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Bn(t)):e.value!==""+Bn(t)&&(e.value=""+Bn(t)):l!=="submit"&&l!=="reset"||e.removeAttribute("value"),t!=null?tp(e,l,Bn(t)):n!=null?tp(e,l,Bn(n)):o!=null&&e.removeAttribute("value"),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!="function"&&typeof i!="symbol"),r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"?e.name=""+Bn(r):e.removeAttribute("name")}function q0(e,t,n,o,i,a,l,r){if(a!=null&&typeof a!="function"&&typeof a!="symbol"&&typeof a!="boolean"&&(e.type=a),t!=null||n!=null){if(!(a!=="submit"&&a!=="reset"||t!=null)){Jd(e);return}n=n!=null?""+Bn(n):"",t=t!=null?""+Bn(t):n,r||t===e.value||(e.value=t),e.defaultValue=t}o=o??i,o=typeof o!="function"&&typeof o!="symbol"&&!!o,e.checked=r?e.checked:!!o,e.defaultChecked=!!o,l!=null&&typeof l!="function"&&typeof l!="symbol"&&typeof l!="boolean"&&(e.name=l),Jd(e)}function tp(e,t,n){t==="number"&&Xu(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function sl(e,t,n,o){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&&o&&(e[n].defaultSelected=!0)}else{for(n=""+Bn(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,o&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Z0(e,t,n){if(t!=null&&(t=""+Bn(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Bn(n):""}function j0(e,t,n,o){if(t==null){if(o!=null){if(n!=null)throw Error(U(92));if(Er(o)){if(1<o.length)throw Error(U(93));o=o[0]}n=o}n==null&&(n=""),t=n}n=Bn(t),e.defaultValue=n,o=e.textContent,o===n&&o!==""&&o!==null&&(e.value=o),Jd(e)}function gl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var I2=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function uy(e,t,n){var o=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?o?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":o?e.setProperty(t,n):typeof n!="number"||n===0||I2.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function $0(e,t,n){if(t!=null&&typeof t!="object")throw Error(U(62));if(e=e.style,n!=null){for(var o in n)!n.hasOwnProperty(o)||t!=null&&t.hasOwnProperty(o)||(o.indexOf("--")===0?e.setProperty(o,""):o==="float"?e.cssFloat="":e[o]="");for(var i in t)o=t[i],t.hasOwnProperty(i)&&n[i]!==o&&uy(e,i,o)}else for(var a in t)t.hasOwnProperty(a)&&uy(e,a,t[a])}function qp(e){if(e.indexOf("-")===-1)return!1;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 V2=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Y2=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Cu(e){return Y2.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Uo(){}var np=null;function Zp(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Wa=null,ul=null;function cy(e){var t=Cl(e);if(t&&(e=t.stateNode)){var n=e[ln]||null;e:switch(e=t.stateNode,t.type){case"input":if(ep(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+kn(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var o=n[t];if(o!==e&&o.form===e.form){var i=o[ln]||null;if(!i)throw Error(U(90));ep(o,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)o=n[t],o.form===e.form&&X0(o)}break e;case"textarea":Z0(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&sl(e,!!n.multiple,t,!1)}}}var gd=!1;function F0(e,t,n){if(gd)return e(t,n);gd=!0;try{var o=e(t);return o}finally{if(gd=!1,(Wa!==null||ul!==null)&&(wc(),Wa&&(t=Wa,e=ul,ul=Wa=null,cy(t),e)))for(t=0;t<e.length;t++)cy(e[t])}}function Ir(e,t){var n=e.stateNode;if(n===null)return null;var o=n[ln]||null;if(o===null)return null;n=o[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":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(U(231,t,typeof n));return n}var qo=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),op=!1;if(qo)try{Xa={},Object.defineProperty(Xa,"passive",{get:function(){op=!0}}),window.addEventListener("test",Xa,Xa),window.removeEventListener("test",Xa,Xa)}catch{op=!1}var Xa,Si=null,jp=null,wu=null;function K0(){if(wu)return wu;var e,t=jp,n=t.length,o,i="value"in Si?Si.value:Si.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var l=n-e;for(o=1;o<=l&&t[n-o]===i[a-o];o++);return wu=i.slice(e,1<o?1-o:void 0)}function Au(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 du(){return!0}function fy(){return!1}function rn(e){function t(n,o,i,a,l){this._reactName=n,this._targetInst=i,this.type=o,this.nativeEvent=a,this.target=l,this.currentTarget=null;for(var r in e)e.hasOwnProperty(r)&&(n=e[r],this[r]=n?n(a):a[r]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?du:fy,this.isPropagationStopped=fy,this}return Ze(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=du)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=du)},persist:function(){},isPersistent:du}),t}var fa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},gc=rn(fa),as=Ze({},fa,{view:0,detail:0}),X2=rn(as),yd,vd,gr,yc=Ze({},as,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:$p,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!==gr&&(gr&&e.type==="mousemove"?(yd=e.screenX-gr.screenX,vd=e.screenY-gr.screenY):vd=yd=0,gr=e),yd)},movementY:function(e){return"movementY"in e?e.movementY:vd}}),dy=rn(yc),q2=Ze({},yc,{dataTransfer:0}),Z2=rn(q2),j2=Ze({},as,{relatedTarget:0}),bd=rn(j2),$2=Ze({},fa,{animationName:0,elapsedTime:0,pseudoElement:0}),F2=rn($2),K2=Ze({},fa,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Q2=rn(K2),W2=Ze({},fa,{data:0}),py=rn(W2),J2={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},eN={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"},tN={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function nN(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=tN[e])?!!t[e]:!1}function $p(){return nN}var oN=Ze({},as,{key:function(e){if(e.key){var t=J2[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Au(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?eN[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:$p,charCode:function(e){return e.type==="keypress"?Au(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Au(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),iN=rn(oN),aN=Ze({},yc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),my=rn(aN),lN=Ze({},as,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:$p}),rN=rn(lN),sN=Ze({},fa,{propertyName:0,elapsedTime:0,pseudoElement:0}),uN=rn(sN),cN=Ze({},yc,{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}),fN=rn(cN),dN=Ze({},fa,{newState:0,oldState:0}),pN=rn(dN),mN=[9,13,27,32],Fp=qo&&"CompositionEvent"in window,wr=null;qo&&"documentMode"in document&&(wr=document.documentMode);var hN=qo&&"TextEvent"in window&&!wr,Q0=qo&&(!Fp||wr&&8<wr&&11>=wr),hy=" ",gy=!1;function W0(e,t){switch(e){case"keyup":return mN.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function J0(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ja=!1;function gN(e,t){switch(e){case"compositionend":return J0(t);case"keypress":return t.which!==32?null:(gy=!0,hy);case"textInput":return e=t.data,e===hy&&gy?null:e;default:return null}}function yN(e,t){if(Ja)return e==="compositionend"||!Fp&&W0(e,t)?(e=K0(),wu=jp=Si=null,Ja=!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 Q0&&t.locale!=="ko"?null:t.data;default:return null}}var vN={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 yy(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!vN[e.type]:t==="textarea"}function ev(e,t,n,o){Wa?ul?ul.push(o):ul=[o]:Wa=o,t=sc(t,"onChange"),0<t.length&&(n=new gc("onChange","change",null,n,o),e.push({event:n,listeners:t}))}var Ar=null,Vr=null;function bN(e){Fb(e,0)}function vc(e){var t=Tr(e);if(X0(t))return e}function vy(e,t){if(e==="change")return t}var tv=!1;qo&&(qo?(mu="oninput"in document,mu||(Sd=document.createElement("div"),Sd.setAttribute("oninput","return;"),mu=typeof Sd.oninput=="function"),pu=mu):pu=!1,tv=pu&&(!document.documentMode||9<document.documentMode));var pu,mu,Sd;function by(){Ar&&(Ar.detachEvent("onpropertychange",nv),Vr=Ar=null)}function nv(e){if(e.propertyName==="value"&&vc(Vr)){var t=[];ev(t,Vr,e,Zp(e)),F0(bN,t)}}function SN(e,t,n){e==="focusin"?(by(),Ar=t,Vr=n,Ar.attachEvent("onpropertychange",nv)):e==="focusout"&&by()}function xN(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return vc(Vr)}function _N(e,t){if(e==="click")return vc(t)}function EN(e,t){if(e==="input"||e==="change")return vc(t)}function TN(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var En=typeof Object.is=="function"?Object.is:TN;function Yr(e,t){if(En(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(o=0;o<n.length;o++){var i=n[o];if(!Qd.call(t,i)||!En(e[i],t[i]))return!1}return!0}function Sy(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function xy(e,t){var n=Sy(e);e=0;for(var o;n;){if(n.nodeType===3){if(o=e+n.textContent.length,e<=t&&o>=t)return{node:n,offset:t-e};e=o}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Sy(n)}}function ov(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ov(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function iv(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Xu(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Xu(e.document)}return t}function Kp(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")}var NN=qo&&"documentMode"in document&&11>=document.documentMode,el=null,ip=null,Mr=null,ap=!1;function _y(e,t,n){var o=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ap||el==null||el!==Xu(o)||(o=el,"selectionStart"in o&&Kp(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),Mr&&Yr(Mr,o)||(Mr=o,o=sc(ip,"onSelect"),0<o.length&&(t=new gc("onSelect","select",null,t,n),e.push({event:t,listeners:o}),t.target=el)))}function Fi(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var tl={animationend:Fi("Animation","AnimationEnd"),animationiteration:Fi("Animation","AnimationIteration"),animationstart:Fi("Animation","AnimationStart"),transitionrun:Fi("Transition","TransitionRun"),transitionstart:Fi("Transition","TransitionStart"),transitioncancel:Fi("Transition","TransitionCancel"),transitionend:Fi("Transition","TransitionEnd")},xd={},av={};qo&&(av=document.createElement("div").style,"AnimationEvent"in window||(delete tl.animationend.animation,delete tl.animationiteration.animation,delete tl.animationstart.animation),"TransitionEvent"in window||delete tl.transitionend.transition);function da(e){if(xd[e])return xd[e];if(!tl[e])return e;var t=tl[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in av)return xd[e]=t[n];return e}var lv=da("animationend"),rv=da("animationiteration"),sv=da("animationstart"),CN=da("transitionrun"),wN=da("transitionstart"),AN=da("transitioncancel"),uv=da("transitionend"),cv=new Map,lp="abort auxClick beforeToggle 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(" ");lp.push("scrollEnd");function eo(e,t){cv.set(e,t),ca(t,[e])}var qu=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Ln=[],nl=0,Qp=0;function bc(){for(var e=nl,t=Qp=nl=0;t<e;){var n=Ln[t];Ln[t++]=null;var o=Ln[t];Ln[t++]=null;var i=Ln[t];Ln[t++]=null;var a=Ln[t];if(Ln[t++]=null,o!==null&&i!==null){var l=o.pending;l===null?i.next=i:(i.next=l.next,l.next=i),o.pending=i}a!==0&&fv(n,i,a)}}function Sc(e,t,n,o){Ln[nl++]=e,Ln[nl++]=t,Ln[nl++]=n,Ln[nl++]=o,Qp|=o,e.lanes|=o,e=e.alternate,e!==null&&(e.lanes|=o)}function Wp(e,t,n,o){return Sc(e,t,n,o),Zu(e)}function pa(e,t){return Sc(e,null,null,t),Zu(e)}function fv(e,t,n){e.lanes|=n;var o=e.alternate;o!==null&&(o.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,o=a.alternate,o!==null&&(o.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-xn(n),e=a.hiddenUpdates,o=e[i],o===null?e[i]=[t]:o.push(t),t.lane=n|536870912),a):null}function Zu(e){if(50<kr)throw kr=0,wp=null,Error(U(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ol={};function MN(e,t,n,o){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yn(e,t,n,o){return new MN(e,t,n,o)}function Jp(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Vo(e,t){var n=e.alternate;return n===null?(n=yn(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&65011712,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.refCleanup=e.refCleanup,n}function dv(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Mu(e,t,n,o,i,a){var l=0;if(o=e,typeof e=="function")Jp(e)&&(l=1);else if(typeof e=="string")l=OC(e,n,mo.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case jd:return e=yn(31,n,t,i),e.elementType=jd,e.lanes=a,e;case Fa:return ta(n.children,i,a,t);case R0:l=8,i|=24;break;case Xd:return e=yn(12,n,t,i|2),e.elementType=Xd,e.lanes=a,e;case qd:return e=yn(13,n,t,i),e.elementType=qd,e.lanes=a,e;case Zd:return e=yn(19,n,t,i),e.elementType=Zd,e.lanes=a,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Go:l=10;break e;case O0:l=9;break e;case Gp:l=11;break e;case Up:l=14;break e;case pi:l=16,o=null;break e}l=29,n=Error(U(130,e===null?"null":typeof e,"")),o=null}return t=yn(l,n,t,i),t.elementType=e,t.type=o,t.lanes=a,t}function ta(e,t,n,o){return e=yn(7,e,o,t),e.lanes=n,e}function _d(e,t,n){return e=yn(6,e,null,t),e.lanes=n,e}function pv(e){var t=yn(18,null,null,0);return t.stateNode=e,t}function Ed(e,t,n){return t=yn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Ey=new WeakMap;function Gn(e,t){if(typeof e=="object"&&e!==null){var n=Ey.get(e);return n!==void 0?n:(t={value:e,source:t,stack:iy(t)},Ey.set(e,t),t)}return{value:e,source:t,stack:iy(t)}}var il=[],al=0,ju=null,Xr=0,Hn=[],Pn=0,zi=null,co=1,fo="";function Po(e,t){il[al++]=Xr,il[al++]=ju,ju=e,Xr=t}function mv(e,t,n){Hn[Pn++]=co,Hn[Pn++]=fo,Hn[Pn++]=zi,zi=e;var o=co;e=fo;var i=32-xn(o)-1;o&=~(1<<i),n+=1;var a=32-xn(t)+i;if(30<a){var l=i-i%5;a=(o&(1<<l)-1).toString(32),o>>=l,i-=l,co=1<<32-xn(t)+i|n<<i|o,fo=a+e}else co=1<<a|n<<i|o,fo=e}function em(e){e.return!==null&&(Po(e,1),mv(e,1,0))}function tm(e){for(;e===ju;)ju=il[--al],il[al]=null,Xr=il[--al],il[al]=null;for(;e===zi;)zi=Hn[--Pn],Hn[Pn]=null,fo=Hn[--Pn],Hn[Pn]=null,co=Hn[--Pn],Hn[Pn]=null}function hv(e,t){Hn[Pn++]=co,Hn[Pn++]=fo,Hn[Pn++]=zi,co=t.id,fo=t.overflow,zi=e}var Rt=null,qe=null,Ce=!1,Ni=null,Un=!1,rp=Error(U(519));function Li(e){var t=Error(U(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw qr(Gn(t,e)),rp}function Ty(e){var t=e.stateNode,n=e.type,o=e.memoizedProps;switch(t[Dt]=e,t[ln]=o,n){case"dialog":xe("cancel",t),xe("close",t);break;case"iframe":case"object":case"embed":xe("load",t);break;case"video":case"audio":for(n=0;n<Fr.length;n++)xe(Fr[n],t);break;case"source":xe("error",t);break;case"img":case"image":case"link":xe("error",t),xe("load",t);break;case"details":xe("toggle",t);break;case"input":xe("invalid",t),q0(t,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0);break;case"select":xe("invalid",t);break;case"textarea":xe("invalid",t),j0(t,o.value,o.defaultValue,o.children)}n=o.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||o.suppressHydrationWarning===!0||Qb(t.textContent,n)?(o.popover!=null&&(xe("beforetoggle",t),xe("toggle",t)),o.onScroll!=null&&xe("scroll",t),o.onScrollEnd!=null&&xe("scrollend",t),o.onClick!=null&&(t.onclick=Uo),t=!0):t=!1,t||Li(e,!0)}function Ny(e){for(Rt=e.return;Rt;)switch(Rt.tag){case 5:case 31:case 13:Un=!1;return;case 27:case 3:Un=!0;return;default:Rt=Rt.return}}function qa(e){if(e!==Rt)return!1;if(!Ce)return Ny(e),Ce=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||Op(e.type,e.memoizedProps)),n=!n),n&&qe&&Li(e),Ny(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(U(317));qe=p0(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(U(317));qe=p0(e)}else t===27?(t=qe,ki(e.type)?(e=Hp,Hp=null,qe=e):qe=t):qe=Rt?Vn(e.stateNode.nextSibling):null;return!0}function aa(){qe=Rt=null,Ce=!1}function Td(){var e=Ni;return e!==null&&(on===null?on=e:on.push.apply(on,e),Ni=null),e}function qr(e){Ni===null?Ni=[e]:Ni.push(e)}var sp=ho(null),ma=null,Io=null;function hi(e,t,n){Ie(sp,t._currentValue),t._currentValue=n}function Yo(e){e._currentValue=sp.current,Nt(sp)}function up(e,t,n){for(;e!==null;){var o=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,o!==null&&(o.childLanes|=t)):o!==null&&(o.childLanes&t)!==t&&(o.childLanes|=t),e===n)break;e=e.return}}function cp(e,t,n,o){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var a=i.dependencies;if(a!==null){var l=i.child;a=a.firstContext;e:for(;a!==null;){var r=a;a=i;for(var s=0;s<t.length;s++)if(r.context===t[s]){a.lanes|=n,r=a.alternate,r!==null&&(r.lanes|=n),up(a.return,n,e),o||(l=null);break e}a=r.next}}else if(i.tag===18){if(l=i.return,l===null)throw Error(U(341));l.lanes|=n,a=l.alternate,a!==null&&(a.lanes|=n),up(l,n,e),l=null}else l=i.child;if(l!==null)l.return=i;else for(l=i;l!==null;){if(l===e){l=null;break}if(i=l.sibling,i!==null){i.return=l.return,l=i;break}l=l.return}i=l}}function wl(e,t,n,o){e=null;for(var i=t,a=!1;i!==null;){if(!a){if((i.flags&524288)!==0)a=!0;else if((i.flags&262144)!==0)break}if(i.tag===10){var l=i.alternate;if(l===null)throw Error(U(387));if(l=l.memoizedProps,l!==null){var r=i.type;En(i.pendingProps.value,l.value)||(e!==null?e.push(r):e=[r])}}else if(i===Uu.current){if(l=i.alternate,l===null)throw Error(U(387));l.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e!==null?e.push(Qr):e=[Qr])}i=i.return}e!==null&&cp(t,e,n,o),t.flags|=262144}function $u(e){for(e=e.firstContext;e!==null;){if(!En(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function la(e){ma=e,Io=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ot(e){return gv(ma,e)}function hu(e,t){return ma===null&&la(e),gv(e,t)}function gv(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Io===null){if(e===null)throw Error(U(308));Io=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Io=Io.next=t;return n}var DN=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,o){e.push(o)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},RN=gt.unstable_scheduleCallback,ON=gt.unstable_NormalPriority,ct={$$typeof:Go,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function nm(){return{controller:new DN,data:new Map,refCount:0}}function ls(e){e.refCount--,e.refCount===0&&RN(ON,function(){e.controller.abort()})}var Dr=null,fp=0,yl=0,cl=null;function zN(e,t){if(Dr===null){var n=Dr=[];fp=0,yl=wm(),cl={status:"pending",value:void 0,then:function(o){n.push(o)}}}return fp++,t.then(Cy,Cy),t}function Cy(){if(--fp===0&&Dr!==null){cl!==null&&(cl.status="fulfilled");var e=Dr;Dr=null,yl=0,cl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function LN(e,t){var n=[],o={status:"pending",value:null,reason:null,then:function(i){n.push(i)}};return e.then(function(){o.status="fulfilled",o.value=t;for(var i=0;i<n.length;i++)(0,n[i])(t)},function(i){for(o.status="rejected",o.reason=i,i=0;i<n.length;i++)(0,n[i])(void 0)}),o}var wy=ce.S;ce.S=function(e,t){Db=bn(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&zN(e,t),wy!==null&&wy(e,t)};var na=ho(null);function om(){var e=na.current;return e!==null?e:Ue.pooledCache}function Du(e,t){t===null?Ie(na,na.current):Ie(na,t.pool)}function yv(){var e=om();return e===null?null:{parent:ct._currentValue,pool:e}}var Al=Error(U(460)),im=Error(U(474)),xc=Error(U(542)),Fu={then:function(){}};function Ay(e){return e=e.status,e==="fulfilled"||e==="rejected"}function vv(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Uo,Uo),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Dy(e),e;default:if(typeof t.status=="string")t.then(Uo,Uo);else{if(e=Ue,e!==null&&100<e.shellSuspendCounter)throw Error(U(482));e=t,e.status="pending",e.then(function(o){if(t.status==="pending"){var i=t;i.status="fulfilled",i.value=o}},function(o){if(t.status==="pending"){var i=t;i.status="rejected",i.reason=o}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Dy(e),e}throw oa=t,Al}}function Wi(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(oa=n,Al):n}}var oa=null;function My(){if(oa===null)throw Error(U(459));var e=oa;return oa=null,e}function Dy(e){if(e===Al||e===xc)throw Error(U(483))}var fl=null,Zr=0;function gu(e){var t=Zr;return Zr+=1,fl===null&&(fl=[]),vv(fl,e,t)}function yr(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function yu(e,t){throw t.$$typeof===S2?Error(U(525)):(e=Object.prototype.toString.call(t),Error(U(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function bv(e){function t(p,y){if(e){var m=p.deletions;m===null?(p.deletions=[y],p.flags|=16):m.push(y)}}function n(p,y){if(!e)return null;for(;y!==null;)t(p,y),y=y.sibling;return null}function o(p){for(var y=new Map;p!==null;)p.key!==null?y.set(p.key,p):y.set(p.index,p),p=p.sibling;return y}function i(p,y){return p=Vo(p,y),p.index=0,p.sibling=null,p}function a(p,y,m){return p.index=m,e?(m=p.alternate,m!==null?(m=m.index,m<y?(p.flags|=67108866,y):m):(p.flags|=67108866,y)):(p.flags|=1048576,y)}function l(p){return e&&p.alternate===null&&(p.flags|=67108866),p}function r(p,y,m,g){return y===null||y.tag!==6?(y=_d(m,p.mode,g),y.return=p,y):(y=i(y,m),y.return=p,y)}function s(p,y,m,g){var x=m.type;return x===Fa?c(p,y,m.props.children,g,m.key):y!==null&&(y.elementType===x||typeof x=="object"&&x!==null&&x.$$typeof===pi&&Wi(x)===y.type)?(y=i(y,m.props),yr(y,m),y.return=p,y):(y=Mu(m.type,m.key,m.props,null,p.mode,g),yr(y,m),y.return=p,y)}function u(p,y,m,g){return y===null||y.tag!==4||y.stateNode.containerInfo!==m.containerInfo||y.stateNode.implementation!==m.implementation?(y=Ed(m,p.mode,g),y.return=p,y):(y=i(y,m.children||[]),y.return=p,y)}function c(p,y,m,g,x){return y===null||y.tag!==7?(y=ta(m,p.mode,g,x),y.return=p,y):(y=i(y,m),y.return=p,y)}function d(p,y,m){if(typeof y=="string"&&y!==""||typeof y=="number"||typeof y=="bigint")return y=_d(""+y,p.mode,m),y.return=p,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case ru:return m=Mu(y.type,y.key,y.props,null,p.mode,m),yr(m,y),m.return=p,m;case _r:return y=Ed(y,p.mode,m),y.return=p,y;case pi:return y=Wi(y),d(p,y,m)}if(Er(y)||hr(y))return y=ta(y,p.mode,m,null),y.return=p,y;if(typeof y.then=="function")return d(p,gu(y),m);if(y.$$typeof===Go)return d(p,hu(p,y),m);yu(p,y)}return null}function f(p,y,m,g){var x=y!==null?y.key:null;if(typeof m=="string"&&m!==""||typeof m=="number"||typeof m=="bigint")return x!==null?null:r(p,y,""+m,g);if(typeof m=="object"&&m!==null){switch(m.$$typeof){case ru:return m.key===x?s(p,y,m,g):null;case _r:return m.key===x?u(p,y,m,g):null;case pi:return m=Wi(m),f(p,y,m,g)}if(Er(m)||hr(m))return x!==null?null:c(p,y,m,g,null);if(typeof m.then=="function")return f(p,y,gu(m),g);if(m.$$typeof===Go)return f(p,y,hu(p,m),g);yu(p,m)}return null}function h(p,y,m,g,x){if(typeof g=="string"&&g!==""||typeof g=="number"||typeof g=="bigint")return p=p.get(m)||null,r(y,p,""+g,x);if(typeof g=="object"&&g!==null){switch(g.$$typeof){case ru:return p=p.get(g.key===null?m:g.key)||null,s(y,p,g,x);case _r:return p=p.get(g.key===null?m:g.key)||null,u(y,p,g,x);case pi:return g=Wi(g),h(p,y,m,g,x)}if(Er(g)||hr(g))return p=p.get(m)||null,c(y,p,g,x,null);if(typeof g.then=="function")return h(p,y,m,gu(g),x);if(g.$$typeof===Go)return h(p,y,m,hu(y,g),x);yu(y,g)}return null}function v(p,y,m,g){for(var x=null,_=null,E=y,w=y=0,C=null;E!==null&&w<m.length;w++){E.index>w?(C=E,E=null):C=E.sibling;var H=f(p,E,m[w],g);if(H===null){E===null&&(E=C);break}e&&E&&H.alternate===null&&t(p,E),y=a(H,y,w),_===null?x=H:_.sibling=H,_=H,E=C}if(w===m.length)return n(p,E),Ce&&Po(p,w),x;if(E===null){for(;w<m.length;w++)E=d(p,m[w],g),E!==null&&(y=a(E,y,w),_===null?x=E:_.sibling=E,_=E);return Ce&&Po(p,w),x}for(E=o(E);w<m.length;w++)C=h(E,p,w,m[w],g),C!==null&&(e&&C.alternate!==null&&E.delete(C.key===null?w:C.key),y=a(C,y,w),_===null?x=C:_.sibling=C,_=C);return e&&E.forEach(function(D){return t(p,D)}),Ce&&Po(p,w),x}function b(p,y,m,g){if(m==null)throw Error(U(151));for(var x=null,_=null,E=y,w=y=0,C=null,H=m.next();E!==null&&!H.done;w++,H=m.next()){E.index>w?(C=E,E=null):C=E.sibling;var D=f(p,E,H.value,g);if(D===null){E===null&&(E=C);break}e&&E&&D.alternate===null&&t(p,E),y=a(D,y,w),_===null?x=D:_.sibling=D,_=D,E=C}if(H.done)return n(p,E),Ce&&Po(p,w),x;if(E===null){for(;!H.done;w++,H=m.next())H=d(p,H.value,g),H!==null&&(y=a(H,y,w),_===null?x=H:_.sibling=H,_=H);return Ce&&Po(p,w),x}for(E=o(E);!H.done;w++,H=m.next())H=h(E,p,w,H.value,g),H!==null&&(e&&H.alternate!==null&&E.delete(H.key===null?w:H.key),y=a(H,y,w),_===null?x=H:_.sibling=H,_=H);return e&&E.forEach(function(z){return t(p,z)}),Ce&&Po(p,w),x}function S(p,y,m,g){if(typeof m=="object"&&m!==null&&m.type===Fa&&m.key===null&&(m=m.props.children),typeof m=="object"&&m!==null){switch(m.$$typeof){case ru:e:{for(var x=m.key;y!==null;){if(y.key===x){if(x=m.type,x===Fa){if(y.tag===7){n(p,y.sibling),g=i(y,m.props.children),g.return=p,p=g;break e}}else if(y.elementType===x||typeof x=="object"&&x!==null&&x.$$typeof===pi&&Wi(x)===y.type){n(p,y.sibling),g=i(y,m.props),yr(g,m),g.return=p,p=g;break e}n(p,y);break}else t(p,y);y=y.sibling}m.type===Fa?(g=ta(m.props.children,p.mode,g,m.key),g.return=p,p=g):(g=Mu(m.type,m.key,m.props,null,p.mode,g),yr(g,m),g.return=p,p=g)}return l(p);case _r:e:{for(x=m.key;y!==null;){if(y.key===x)if(y.tag===4&&y.stateNode.containerInfo===m.containerInfo&&y.stateNode.implementation===m.implementation){n(p,y.sibling),g=i(y,m.children||[]),g.return=p,p=g;break e}else{n(p,y);break}else t(p,y);y=y.sibling}g=Ed(m,p.mode,g),g.return=p,p=g}return l(p);case pi:return m=Wi(m),S(p,y,m,g)}if(Er(m))return v(p,y,m,g);if(hr(m)){if(x=hr(m),typeof x!="function")throw Error(U(150));return m=x.call(m),b(p,y,m,g)}if(typeof m.then=="function")return S(p,y,gu(m),g);if(m.$$typeof===Go)return S(p,y,hu(p,m),g);yu(p,m)}return typeof m=="string"&&m!==""||typeof m=="number"||typeof m=="bigint"?(m=""+m,y!==null&&y.tag===6?(n(p,y.sibling),g=i(y,m),g.return=p,p=g):(n(p,y),g=_d(m,p.mode,g),g.return=p,p=g),l(p)):n(p,y)}return function(p,y,m,g){try{Zr=0;var x=S(p,y,m,g);return fl=null,x}catch(E){if(E===Al||E===xc)throw E;var _=yn(29,E,null,p.mode);return _.lanes=g,_.return=p,_}}}var ra=bv(!0),Sv=bv(!1),mi=!1;function am(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function dp(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ci(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function wi(e,t,n){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(Me&2)!==0){var i=o.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),o.pending=t,t=Zu(e),fv(e,null,n),t}return Sc(e,o,t,n),Zu(e)}function Rr(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var o=t.lanes;o&=e.pendingLanes,n|=o,t.lanes=n,k0(e,n)}}function Nd(e,t){var n=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,n===o)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var l={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=l:a=a.next=l,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:o.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:o.shared,callbacks:o.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var pp=!1;function Or(){if(pp){var e=cl;if(e!==null)throw e}}function zr(e,t,n,o){pp=!1;var i=e.updateQueue;mi=!1;var a=i.firstBaseUpdate,l=i.lastBaseUpdate,r=i.shared.pending;if(r!==null){i.shared.pending=null;var s=r,u=s.next;s.next=null,l===null?a=u:l.next=u,l=s;var c=e.alternate;c!==null&&(c=c.updateQueue,r=c.lastBaseUpdate,r!==l&&(r===null?c.firstBaseUpdate=u:r.next=u,c.lastBaseUpdate=s))}if(a!==null){var d=i.baseState;l=0,c=u=s=null,r=a;do{var f=r.lane&-536870913,h=f!==r.lane;if(h?(Ne&f)===f:(o&f)===f){f!==0&&f===yl&&(pp=!0),c!==null&&(c=c.next={lane:0,tag:r.tag,payload:r.payload,callback:null,next:null});e:{var v=e,b=r;f=t;var S=n;switch(b.tag){case 1:if(v=b.payload,typeof v=="function"){d=v.call(S,d,f);break e}d=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=b.payload,f=typeof v=="function"?v.call(S,d,f):v,f==null)break e;d=Ze({},d,f);break e;case 2:mi=!0}}f=r.callback,f!==null&&(e.flags|=64,h&&(e.flags|=8192),h=i.callbacks,h===null?i.callbacks=[f]:h.push(f))}else h={lane:f,tag:r.tag,payload:r.payload,callback:r.callback,next:null},c===null?(u=c=h,s=d):c=c.next=h,l|=f;if(r=r.next,r===null){if(r=i.shared.pending,r===null)break;h=r,r=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);c===null&&(s=d),i.baseState=s,i.firstBaseUpdate=u,i.lastBaseUpdate=c,a===null&&(i.shared.lanes=0),Hi|=l,e.lanes=l,e.memoizedState=d}}function xv(e,t){if(typeof e!="function")throw Error(U(191,e));e.call(t)}function _v(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)xv(n[e],t)}var vl=ho(null),Ku=ho(0);function Ry(e,t){e=Fo,Ie(Ku,e),Ie(vl,t),Fo=e|t.baseLanes}function mp(){Ie(Ku,Fo),Ie(vl,vl.current)}function lm(){Fo=Ku.current,Nt(vl),Nt(Ku)}var Tn=ho(null),In=null;function gi(e){var t=e.alternate;Ie(at,at.current&1),Ie(Tn,e),In===null&&(t===null||vl.current!==null||t.memoizedState!==null)&&(In=e)}function hp(e){Ie(at,at.current),Ie(Tn,e),In===null&&(In=e)}function Ev(e){e.tag===22?(Ie(at,at.current),Ie(Tn,e),In===null&&(In=e)):yi(e)}function yi(){Ie(at,at.current),Ie(Tn,Tn.current)}function gn(e){Nt(Tn),In===e&&(In=null),Nt(at)}var at=ho(0);function Qu(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Lp(n)||Bp(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)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 Zo=0,ye=null,ke=null,st=null,Wu=!1,dl=!1,sa=!1,Ju=0,jr=0,pl=null,BN=0;function tt(){throw Error(U(321))}function rm(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!En(e[n],t[n]))return!1;return!0}function sm(e,t,n,o,i,a){return Zo=a,ye=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ce.H=e===null||e.memoizedState===null?eb:bm,sa=!1,a=n(o,i),sa=!1,dl&&(a=Nv(t,n,o,i)),Tv(e),a}function Tv(e){ce.H=$r;var t=ke!==null&&ke.next!==null;if(Zo=0,st=ke=ye=null,Wu=!1,jr=0,pl=null,t)throw Error(U(300));e===null||ft||(e=e.dependencies,e!==null&&$u(e)&&(ft=!0))}function Nv(e,t,n,o){ye=e;var i=0;do{if(dl&&(pl=null),jr=0,dl=!1,25<=i)throw Error(U(301));if(i+=1,st=ke=null,e.updateQueue!=null){var a=e.updateQueue;a.lastEffect=null,a.events=null,a.stores=null,a.memoCache!=null&&(a.memoCache.index=0)}ce.H=tb,a=t(n,o)}while(dl);return a}function HN(){var e=ce.H,t=e.useState()[0];return t=typeof t.then=="function"?rs(t):t,e=e.useState()[0],(ke!==null?ke.memoizedState:null)!==e&&(ye.flags|=1024),t}function um(){var e=Ju!==0;return Ju=0,e}function cm(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function fm(e){if(Wu){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Wu=!1}Zo=0,st=ke=ye=null,dl=!1,jr=Ju=0,pl=null}function Yt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return st===null?ye.memoizedState=st=e:st=st.next=e,st}function lt(){if(ke===null){var e=ye.alternate;e=e!==null?e.memoizedState:null}else e=ke.next;var t=st===null?ye.memoizedState:st.next;if(t!==null)st=t,ke=e;else{if(e===null)throw ye.alternate===null?Error(U(467)):Error(U(310));ke=e,e={memoizedState:ke.memoizedState,baseState:ke.baseState,baseQueue:ke.baseQueue,queue:ke.queue,next:null},st===null?ye.memoizedState=st=e:st=st.next=e}return st}function _c(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function rs(e){var t=jr;return jr+=1,pl===null&&(pl=[]),e=vv(pl,e,t),t=ye,(st===null?t.memoizedState:st.next)===null&&(t=t.alternate,ce.H=t===null||t.memoizedState===null?eb:bm),e}function Ec(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return rs(e);if(e.$$typeof===Go)return Ot(e)}throw Error(U(438,String(e)))}function dm(e){var t=null,n=ye.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var o=ye.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(t={data:o.data.map(function(i){return i.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=_c(),ye.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),o=0;o<e;o++)n[o]=x2;return t.index++,n}function jo(e,t){return typeof t=="function"?t(e):t}function Ru(e){var t=lt();return pm(t,ke,e)}function pm(e,t,n){var o=e.queue;if(o===null)throw Error(U(311));o.lastRenderedReducer=n;var i=e.baseQueue,a=o.pending;if(a!==null){if(i!==null){var l=i.next;i.next=a.next,a.next=l}t.baseQueue=i=a,o.pending=null}if(a=e.baseState,i===null)e.memoizedState=a;else{t=i.next;var r=l=null,s=null,u=t,c=!1;do{var d=u.lane&-536870913;if(d!==u.lane?(Ne&d)===d:(Zo&d)===d){var f=u.revertLane;if(f===0)s!==null&&(s=s.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),d===yl&&(c=!0);else if((Zo&f)===f){u=u.next,f===yl&&(c=!0);continue}else d={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},s===null?(r=s=d,l=a):s=s.next=d,ye.lanes|=f,Hi|=f;d=u.action,sa&&n(a,d),a=u.hasEagerState?u.eagerState:n(a,d)}else f={lane:d,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},s===null?(r=s=f,l=a):s=s.next=f,ye.lanes|=d,Hi|=d;u=u.next}while(u!==null&&u!==t);if(s===null?l=a:s.next=r,!En(a,e.memoizedState)&&(ft=!0,c&&(n=cl,n!==null)))throw n;e.memoizedState=a,e.baseState=l,e.baseQueue=s,o.lastRenderedState=a}return i===null&&(o.lanes=0),[e.memoizedState,o.dispatch]}function Cd(e){var t=lt(),n=t.queue;if(n===null)throw Error(U(311));n.lastRenderedReducer=e;var o=n.dispatch,i=n.pending,a=t.memoizedState;if(i!==null){n.pending=null;var l=i=i.next;do a=e(a,l.action),l=l.next;while(l!==i);En(a,t.memoizedState)||(ft=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),n.lastRenderedState=a}return[a,o]}function Cv(e,t,n){var o=ye,i=lt(),a=Ce;if(a){if(n===void 0)throw Error(U(407));n=n()}else n=t();var l=!En((ke||i).memoizedState,n);if(l&&(i.memoizedState=n,ft=!0),i=i.queue,mm(Mv.bind(null,o,i,e),[e]),i.getSnapshot!==t||l||st!==null&&st.memoizedState.tag&1){if(o.flags|=2048,bl(9,{destroy:void 0},Av.bind(null,o,i,n,t),null),Ue===null)throw Error(U(349));a||(Zo&127)!==0||wv(o,t,n)}return n}function wv(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ye.updateQueue,t===null?(t=_c(),ye.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Av(e,t,n,o){t.value=n,t.getSnapshot=o,Dv(t)&&Rv(e)}function Mv(e,t,n){return n(function(){Dv(t)&&Rv(e)})}function Dv(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!En(e,n)}catch{return!0}}function Rv(e){var t=pa(e,2);t!==null&&an(t,e,2)}function gp(e){var t=Yt();if(typeof e=="function"){var n=e;if(e=n(),sa){bi(!0);try{n()}finally{bi(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:jo,lastRenderedState:e},t}function Ov(e,t,n,o){return e.baseState=n,pm(e,ke,typeof o=="function"?o:jo)}function PN(e,t,n,o,i){if(Nc(e))throw Error(U(485));if(e=t.action,e!==null){var a={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(l){a.listeners.push(l)}};ce.T!==null?n(!0):a.isTransition=!1,o(a),n=t.pending,n===null?(a.next=t.pending=a,zv(t,a)):(a.next=n.next,t.pending=n.next=a)}}function zv(e,t){var n=t.action,o=t.payload,i=e.state;if(t.isTransition){var a=ce.T,l={};ce.T=l;try{var r=n(i,o),s=ce.S;s!==null&&s(l,r),Oy(e,t,r)}catch(u){yp(e,t,u)}finally{a!==null&&l.types!==null&&(a.types=l.types),ce.T=a}}else try{a=n(i,o),Oy(e,t,a)}catch(u){yp(e,t,u)}}function Oy(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(o){zy(e,t,o)},function(o){return yp(e,t,o)}):zy(e,t,n)}function zy(e,t,n){t.status="fulfilled",t.value=n,Lv(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,zv(e,n)))}function yp(e,t,n){var o=e.pending;if(e.pending=null,o!==null){o=o.next;do t.status="rejected",t.reason=n,Lv(t),t=t.next;while(t!==o)}e.action=null}function Lv(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Bv(e,t){return t}function Ly(e,t){if(Ce){var n=Ue.formState;if(n!==null){e:{var o=ye;if(Ce){if(qe){t:{for(var i=qe,a=Un;i.nodeType!==8;){if(!a){i=null;break t}if(i=Vn(i.nextSibling),i===null){i=null;break t}}a=i.data,i=a==="F!"||a==="F"?i:null}if(i){qe=Vn(i.nextSibling),o=i.data==="F!";break e}}Li(o)}o=!1}o&&(t=n[0])}}return n=Yt(),n.memoizedState=n.baseState=t,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bv,lastRenderedState:t},n.queue=o,n=Qv.bind(null,ye,o),o.dispatch=n,o=gp(!1),a=vm.bind(null,ye,!1,o.queue),o=Yt(),i={state:t,dispatch:null,action:e,pending:null},o.queue=i,n=PN.bind(null,ye,i,a,n),i.dispatch=n,o.memoizedState=e,[t,n,!1]}function By(e){var t=lt();return Hv(t,ke,e)}function Hv(e,t,n){if(t=pm(e,t,Bv)[0],e=Ru(jo)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var o=rs(t)}catch(l){throw l===Al?xc:l}else o=t;t=lt();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(ye.flags|=2048,bl(9,{destroy:void 0},kN.bind(null,i,n),null)),[o,a,e]}function kN(e,t){e.action=t}function Hy(e){var t=lt(),n=ke;if(n!==null)return Hv(t,n,e);lt(),t=t.memoizedState,n=lt();var o=n.queue.dispatch;return n.memoizedState=e,[t,o,!1]}function bl(e,t,n,o){return e={tag:e,create:n,deps:o,inst:t,next:null},t=ye.updateQueue,t===null&&(t=_c(),ye.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(o=n.next,n.next=e,e.next=o,t.lastEffect=e),e}function Pv(){return lt().memoizedState}function Ou(e,t,n,o){var i=Yt();ye.flags|=e,i.memoizedState=bl(1|t,{destroy:void 0},n,o===void 0?null:o)}function Tc(e,t,n,o){var i=lt();o=o===void 0?null:o;var a=i.memoizedState.inst;ke!==null&&o!==null&&rm(o,ke.memoizedState.deps)?i.memoizedState=bl(t,a,n,o):(ye.flags|=e,i.memoizedState=bl(1|t,a,n,o))}function Py(e,t){Ou(8390656,8,e,t)}function mm(e,t){Tc(2048,8,e,t)}function GN(e){ye.flags|=4;var t=ye.updateQueue;if(t===null)t=_c(),ye.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function kv(e){var t=lt().memoizedState;return GN({ref:t,nextImpl:e}),function(){if((Me&2)!==0)throw Error(U(440));return t.impl.apply(void 0,arguments)}}function Gv(e,t){return Tc(4,2,e,t)}function Uv(e,t){return Tc(4,4,e,t)}function Iv(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Vv(e,t,n){n=n!=null?n.concat([e]):null,Tc(4,4,Iv.bind(null,t,e),n)}function hm(){}function Yv(e,t){var n=lt();t=t===void 0?null:t;var o=n.memoizedState;return t!==null&&rm(t,o[1])?o[0]:(n.memoizedState=[e,t],e)}function Xv(e,t){var n=lt();t=t===void 0?null:t;var o=n.memoizedState;if(t!==null&&rm(t,o[1]))return o[0];if(o=e(),sa){bi(!0);try{e()}finally{bi(!1)}}return n.memoizedState=[o,t],o}function gm(e,t,n){return n===void 0||(Zo&1073741824)!==0&&(Ne&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=Ob(),ye.lanes|=e,Hi|=e,n)}function qv(e,t,n,o){return En(n,t)?n:vl.current!==null?(e=gm(e,n,o),En(e,t)||(ft=!0),e):(Zo&42)===0||(Zo&1073741824)!==0&&(Ne&261930)===0?(ft=!0,e.memoizedState=n):(e=Ob(),ye.lanes|=e,Hi|=e,t)}function Zv(e,t,n,o,i){var a=De.p;De.p=a!==0&&8>a?a:8;var l=ce.T,r={};ce.T=r,vm(e,!1,t,n);try{var s=i(),u=ce.S;if(u!==null&&u(r,s),s!==null&&typeof s=="object"&&typeof s.then=="function"){var c=LN(s,o);Lr(e,t,c,_n(e))}else Lr(e,t,o,_n(e))}catch(d){Lr(e,t,{then:function(){},status:"rejected",reason:d},_n())}finally{De.p=a,l!==null&&r.types!==null&&(l.types=r.types),ce.T=l}}function UN(){}function vp(e,t,n,o){if(e.tag!==5)throw Error(U(476));var i=jv(e).queue;Zv(e,i,t,ea,n===null?UN:function(){return $v(e),n(o)})}function jv(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ea,baseState:ea,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jo,lastRenderedState:ea},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function $v(e){var t=jv(e);t.next===null&&(t=e.alternate.memoizedState),Lr(e,t.next.queue,{},_n())}function ym(){return Ot(Qr)}function Fv(){return lt().memoizedState}function Kv(){return lt().memoizedState}function IN(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=_n();e=Ci(n);var o=wi(t,e,n);o!==null&&(an(o,t,n),Rr(o,t,n)),t={cache:nm()},e.payload=t;return}t=t.return}}function VN(e,t,n){var o=_n();n={lane:o,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Nc(e)?Wv(t,n):(n=Wp(e,t,n,o),n!==null&&(an(n,e,o),Jv(n,t,o)))}function Qv(e,t,n){var o=_n();Lr(e,t,n,o)}function Lr(e,t,n,o){var i={lane:o,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Nc(e))Wv(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var l=t.lastRenderedState,r=a(l,n);if(i.hasEagerState=!0,i.eagerState=r,En(r,l))return Sc(e,t,i,0),Ue===null&&bc(),!1}catch{}if(n=Wp(e,t,i,o),n!==null)return an(n,e,o),Jv(n,t,o),!0}return!1}function vm(e,t,n,o){if(o={lane:2,revertLane:wm(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},Nc(e)){if(t)throw Error(U(479))}else t=Wp(e,n,o,2),t!==null&&an(t,e,2)}function Nc(e){var t=e.alternate;return e===ye||t!==null&&t===ye}function Wv(e,t){dl=Wu=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Jv(e,t,n){if((n&4194048)!==0){var o=t.lanes;o&=e.pendingLanes,n|=o,t.lanes=n,k0(e,n)}}var $r={readContext:Ot,use:Ec,useCallback:tt,useContext:tt,useEffect:tt,useImperativeHandle:tt,useLayoutEffect:tt,useInsertionEffect:tt,useMemo:tt,useReducer:tt,useRef:tt,useState:tt,useDebugValue:tt,useDeferredValue:tt,useTransition:tt,useSyncExternalStore:tt,useId:tt,useHostTransitionStatus:tt,useFormState:tt,useActionState:tt,useOptimistic:tt,useMemoCache:tt,useCacheRefresh:tt};$r.useEffectEvent=tt;var eb={readContext:Ot,use:Ec,useCallback:function(e,t){return Yt().memoizedState=[e,t===void 0?null:t],e},useContext:Ot,useEffect:Py,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Ou(4194308,4,Iv.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ou(4194308,4,e,t)},useInsertionEffect:function(e,t){Ou(4,2,e,t)},useMemo:function(e,t){var n=Yt();t=t===void 0?null:t;var o=e();if(sa){bi(!0);try{e()}finally{bi(!1)}}return n.memoizedState=[o,t],o},useReducer:function(e,t,n){var o=Yt();if(n!==void 0){var i=n(t);if(sa){bi(!0);try{n(t)}finally{bi(!1)}}}else i=t;return o.memoizedState=o.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},o.queue=e,e=e.dispatch=VN.bind(null,ye,e),[o.memoizedState,e]},useRef:function(e){var t=Yt();return e={current:e},t.memoizedState=e},useState:function(e){e=gp(e);var t=e.queue,n=Qv.bind(null,ye,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:hm,useDeferredValue:function(e,t){var n=Yt();return gm(n,e,t)},useTransition:function(){var e=gp(!1);return e=Zv.bind(null,ye,e.queue,!0,!1),Yt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var o=ye,i=Yt();if(Ce){if(n===void 0)throw Error(U(407));n=n()}else{if(n=t(),Ue===null)throw Error(U(349));(Ne&127)!==0||wv(o,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,Py(Mv.bind(null,o,a,e),[e]),o.flags|=2048,bl(9,{destroy:void 0},Av.bind(null,o,a,n,t),null),n},useId:function(){var e=Yt(),t=Ue.identifierPrefix;if(Ce){var n=fo,o=co;n=(o&~(1<<32-xn(o)-1)).toString(32)+n,t="_"+t+"R_"+n,n=Ju++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=BN++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:ym,useFormState:Ly,useActionState:Ly,useOptimistic:function(e){var t=Yt();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=vm.bind(null,ye,!0,n),n.dispatch=t,[e,t]},useMemoCache:dm,useCacheRefresh:function(){return Yt().memoizedState=IN.bind(null,ye)},useEffectEvent:function(e){var t=Yt(),n={impl:e};return t.memoizedState=n,function(){if((Me&2)!==0)throw Error(U(440));return n.impl.apply(void 0,arguments)}}},bm={readContext:Ot,use:Ec,useCallback:Yv,useContext:Ot,useEffect:mm,useImperativeHandle:Vv,useInsertionEffect:Gv,useLayoutEffect:Uv,useMemo:Xv,useReducer:Ru,useRef:Pv,useState:function(){return Ru(jo)},useDebugValue:hm,useDeferredValue:function(e,t){var n=lt();return qv(n,ke.memoizedState,e,t)},useTransition:function(){var e=Ru(jo)[0],t=lt().memoizedState;return[typeof e=="boolean"?e:rs(e),t]},useSyncExternalStore:Cv,useId:Fv,useHostTransitionStatus:ym,useFormState:By,useActionState:By,useOptimistic:function(e,t){var n=lt();return Ov(n,ke,e,t)},useMemoCache:dm,useCacheRefresh:Kv};bm.useEffectEvent=kv;var tb={readContext:Ot,use:Ec,useCallback:Yv,useContext:Ot,useEffect:mm,useImperativeHandle:Vv,useInsertionEffect:Gv,useLayoutEffect:Uv,useMemo:Xv,useReducer:Cd,useRef:Pv,useState:function(){return Cd(jo)},useDebugValue:hm,useDeferredValue:function(e,t){var n=lt();return ke===null?gm(n,e,t):qv(n,ke.memoizedState,e,t)},useTransition:function(){var e=Cd(jo)[0],t=lt().memoizedState;return[typeof e=="boolean"?e:rs(e),t]},useSyncExternalStore:Cv,useId:Fv,useHostTransitionStatus:ym,useFormState:Hy,useActionState:Hy,useOptimistic:function(e,t){var n=lt();return ke!==null?Ov(n,ke,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:dm,useCacheRefresh:Kv};tb.useEffectEvent=kv;function wd(e,t,n,o){t=e.memoizedState,n=n(o,t),n=n==null?t:Ze({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var bp={enqueueSetState:function(e,t,n){e=e._reactInternals;var o=_n(),i=Ci(o);i.payload=t,n!=null&&(i.callback=n),t=wi(e,i,o),t!==null&&(an(t,e,o),Rr(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var o=_n(),i=Ci(o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=wi(e,i,o),t!==null&&(an(t,e,o),Rr(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=_n(),o=Ci(n);o.tag=2,t!=null&&(o.callback=t),t=wi(e,o,n),t!==null&&(an(t,e,n),Rr(t,e,n))}};function ky(e,t,n,o,i,a,l){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,a,l):t.prototype&&t.prototype.isPureReactComponent?!Yr(n,o)||!Yr(i,a):!0}function Gy(e,t,n,o){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,o),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,o),t.state!==e&&bp.enqueueReplaceState(t,t.state,null)}function ua(e,t){var n=t;if("ref"in t){n={};for(var o in t)o!=="ref"&&(n[o]=t[o])}if(e=e.defaultProps){n===t&&(n=Ze({},n));for(var i in e)n[i]===void 0&&(n[i]=e[i])}return n}function nb(e){qu(e)}function ob(e){console.error(e)}function ib(e){qu(e)}function ec(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(o){setTimeout(function(){throw o})}}function Uy(e,t,n){try{var o=e.onCaughtError;o(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(i){setTimeout(function(){throw i})}}function Sp(e,t,n){return n=Ci(n),n.tag=3,n.payload={element:null},n.callback=function(){ec(e,t)},n}function ab(e){return e=Ci(e),e.tag=3,e}function lb(e,t,n,o){var i=n.type.getDerivedStateFromError;if(typeof i=="function"){var a=o.value;e.payload=function(){return i(a)},e.callback=function(){Uy(t,n,o)}}var l=n.stateNode;l!==null&&typeof l.componentDidCatch=="function"&&(e.callback=function(){Uy(t,n,o),typeof i!="function"&&(Ai===null?Ai=new Set([this]):Ai.add(this));var r=o.stack;this.componentDidCatch(o.value,{componentStack:r!==null?r:""})})}function YN(e,t,n,o,i){if(n.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(t=n.alternate,t!==null&&wl(t,n,i,!0),n=Tn.current,n!==null){switch(n.tag){case 31:case 13:return In===null?ac():n.alternate===null&&nt===0&&(nt=3),n.flags&=-257,n.flags|=65536,n.lanes=i,o===Fu?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([o]):t.add(o),kd(e,o,i)),!1;case 22:return n.flags|=65536,o===Fu?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([o])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([o]):n.add(o)),kd(e,o,i)),!1}throw Error(U(435,n.tag))}return kd(e,o,i),ac(),!1}if(Ce)return t=Tn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=i,o!==rp&&(e=Error(U(422),{cause:o}),qr(Gn(e,n)))):(o!==rp&&(t=Error(U(423),{cause:o}),qr(Gn(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,o=Gn(o,n),i=Sp(e.stateNode,o,i),Nd(e,i),nt!==4&&(nt=2)),!1;var a=Error(U(520),{cause:o});if(a=Gn(a,n),Pr===null?Pr=[a]:Pr.push(a),nt!==4&&(nt=2),t===null)return!0;o=Gn(o,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=Sp(n.stateNode,o,e),Nd(n,e),!1;case 1:if(t=n.type,a=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||a!==null&&typeof a.componentDidCatch=="function"&&(Ai===null||!Ai.has(a))))return n.flags|=65536,i&=-i,n.lanes|=i,i=ab(i),lb(i,e,n,o),Nd(n,i),!1}n=n.return}while(n!==null);return!1}var Sm=Error(U(461)),ft=!1;function Mt(e,t,n,o){t.child=e===null?Sv(t,null,n,o):ra(t,e.child,n,o)}function Iy(e,t,n,o,i){n=n.render;var a=t.ref;if("ref"in o){var l={};for(var r in o)r!=="ref"&&(l[r]=o[r])}else l=o;return la(t),o=sm(e,t,n,l,a,i),r=um(),e!==null&&!ft?(cm(e,t,i),$o(e,t,i)):(Ce&&r&&em(t),t.flags|=1,Mt(e,t,o,i),t.child)}function Vy(e,t,n,o,i){if(e===null){var a=n.type;return typeof a=="function"&&!Jp(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,rb(e,t,a,o,i)):(e=Mu(n.type,null,o,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!xm(e,i)){var l=a.memoizedProps;if(n=n.compare,n=n!==null?n:Yr,n(l,o)&&e.ref===t.ref)return $o(e,t,i)}return t.flags|=1,e=Vo(a,o),e.ref=t.ref,e.return=t,t.child=e}function rb(e,t,n,o,i){if(e!==null){var a=e.memoizedProps;if(Yr(a,o)&&e.ref===t.ref)if(ft=!1,t.pendingProps=o=a,xm(e,i))(e.flags&131072)!==0&&(ft=!0);else return t.lanes=e.lanes,$o(e,t,i)}return xp(e,t,n,o,i)}function sb(e,t,n,o){var i=o.children,a=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.mode==="hidden"){if((t.flags&128)!==0){if(a=a!==null?a.baseLanes|n:n,e!==null){for(o=t.child=e.child,i=0;o!==null;)i=i|o.lanes|o.childLanes,o=o.sibling;o=i&~a}else o=0,t.child=null;return Yy(e,t,a,n,o)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Du(t,a!==null?a.cachePool:null),a!==null?Ry(t,a):mp(),Ev(t);else return o=t.lanes=536870912,Yy(e,t,a!==null?a.baseLanes|n:n,n,o)}else a!==null?(Du(t,a.cachePool),Ry(t,a),yi(t),t.memoizedState=null):(e!==null&&Du(t,null),mp(),yi(t));return Mt(e,t,i,n),t.child}function Nr(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Yy(e,t,n,o,i){var a=om();return a=a===null?null:{parent:ct._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Du(t,null),mp(),Ev(t),e!==null&&wl(e,t,o,!0),t.childLanes=i,null}function zu(e,t){return t=tc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Xy(e,t,n){return ra(t,e.child,null,n),e=zu(t,t.pendingProps),e.flags|=2,gn(t),t.memoizedState=null,e}function XN(e,t,n){var o=t.pendingProps,i=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ce){if(o.mode==="hidden")return e=zu(t,o),t.lanes=536870912,Nr(null,e);if(hp(t),(e=qe)?(e=e1(e,Un),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:zi!==null?{id:co,overflow:fo}:null,retryLane:536870912,hydrationErrors:null},n=pv(e),n.return=t,t.child=n,Rt=t,qe=null)):e=null,e===null)throw Li(t);return t.lanes=536870912,null}return zu(t,o)}var a=e.memoizedState;if(a!==null){var l=a.dehydrated;if(hp(t),i)if(t.flags&256)t.flags&=-257,t=Xy(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(U(558));else if(ft||wl(e,t,n,!1),i=(n&e.childLanes)!==0,ft||i){if(o=Ue,o!==null&&(l=G0(o,n),l!==0&&l!==a.retryLane))throw a.retryLane=l,pa(e,l),an(o,e,l),Sm;ac(),t=Xy(e,t,n)}else e=a.treeContext,qe=Vn(l.nextSibling),Rt=t,Ce=!0,Ni=null,Un=!1,e!==null&&hv(t,e),t=zu(t,o),t.flags|=4096;return t}return e=Vo(e.child,{mode:o.mode,children:o.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Lu(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(U(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function xp(e,t,n,o,i){return la(t),n=sm(e,t,n,o,void 0,i),o=um(),e!==null&&!ft?(cm(e,t,i),$o(e,t,i)):(Ce&&o&&em(t),t.flags|=1,Mt(e,t,n,i),t.child)}function qy(e,t,n,o,i,a){return la(t),t.updateQueue=null,n=Nv(t,o,n,i),Tv(e),o=um(),e!==null&&!ft?(cm(e,t,a),$o(e,t,a)):(Ce&&o&&em(t),t.flags|=1,Mt(e,t,n,a),t.child)}function Zy(e,t,n,o,i){if(la(t),t.stateNode===null){var a=ol,l=n.contextType;typeof l=="object"&&l!==null&&(a=Ot(l)),a=new n(o,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=bp,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=o,a.state=t.memoizedState,a.refs={},am(t),l=n.contextType,a.context=typeof l=="object"&&l!==null?Ot(l):ol,a.state=t.memoizedState,l=n.getDerivedStateFromProps,typeof l=="function"&&(wd(t,n,l,o),a.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof a.getSnapshotBeforeUpdate=="function"||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(l=a.state,typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount(),l!==a.state&&bp.enqueueReplaceState(a,a.state,null),zr(t,o,a,i),Or(),a.state=t.memoizedState),typeof a.componentDidMount=="function"&&(t.flags|=4194308),o=!0}else if(e===null){a=t.stateNode;var r=t.memoizedProps,s=ua(n,r);a.props=s;var u=a.context,c=n.contextType;l=ol,typeof c=="object"&&c!==null&&(l=Ot(c));var d=n.getDerivedStateFromProps;c=typeof d=="function"||typeof a.getSnapshotBeforeUpdate=="function",r=t.pendingProps!==r,c||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(r||u!==l)&&Gy(t,a,o,l),mi=!1;var f=t.memoizedState;a.state=f,zr(t,o,a,i),Or(),u=t.memoizedState,r||f!==u||mi?(typeof d=="function"&&(wd(t,n,d,o),u=t.memoizedState),(s=mi||ky(t,n,s,o,f,u,l))?(c||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=o,t.memoizedState=u),a.props=o,a.state=u,a.context=l,o=s):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),o=!1)}else{a=t.stateNode,dp(e,t),l=t.memoizedProps,c=ua(n,l),a.props=c,d=t.pendingProps,f=a.context,u=n.contextType,s=ol,typeof u=="object"&&u!==null&&(s=Ot(u)),r=n.getDerivedStateFromProps,(u=typeof r=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==d||f!==s)&&Gy(t,a,o,s),mi=!1,f=t.memoizedState,a.state=f,zr(t,o,a,i),Or();var h=t.memoizedState;l!==d||f!==h||mi||e!==null&&e.dependencies!==null&&$u(e.dependencies)?(typeof r=="function"&&(wd(t,n,r,o),h=t.memoizedState),(c=mi||ky(t,n,c,o,f,h,s)||e!==null&&e.dependencies!==null&&$u(e.dependencies))?(u||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(o,h,s),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(o,h,s)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=o,t.memoizedState=h),a.props=o,a.state=h,a.context=s,o=c):(typeof a.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),o=!1)}return a=o,Lu(e,t),o=(t.flags&128)!==0,a||o?(a=t.stateNode,n=o&&typeof n.getDerivedStateFromError!="function"?null:a.render(),t.flags|=1,e!==null&&o?(t.child=ra(t,e.child,null,i),t.child=ra(t,null,n,i)):Mt(e,t,n,i),t.memoizedState=a.state,e=t.child):e=$o(e,t,i),e}function jy(e,t,n,o){return aa(),t.flags|=256,Mt(e,t,n,o),t.child}var Ad={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Md(e){return{baseLanes:e,cachePool:yv()}}function Dd(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=vn),e}function ub(e,t,n){var o=t.pendingProps,i=!1,a=(t.flags&128)!==0,l;if((l=a)||(l=e!==null&&e.memoizedState===null?!1:(at.current&2)!==0),l&&(i=!0,t.flags&=-129),l=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ce){if(i?gi(t):yi(t),(e=qe)?(e=e1(e,Un),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:zi!==null?{id:co,overflow:fo}:null,retryLane:536870912,hydrationErrors:null},n=pv(e),n.return=t,t.child=n,Rt=t,qe=null)):e=null,e===null)throw Li(t);return Bp(e)?t.lanes=32:t.lanes=536870912,null}var r=o.children;return o=o.fallback,i?(yi(t),i=t.mode,r=tc({mode:"hidden",children:r},i),o=ta(o,i,n,null),r.return=t,o.return=t,r.sibling=o,t.child=r,o=t.child,o.memoizedState=Md(n),o.childLanes=Dd(e,l,n),t.memoizedState=Ad,Nr(null,o)):(gi(t),_p(t,r))}var s=e.memoizedState;if(s!==null&&(r=s.dehydrated,r!==null)){if(a)t.flags&256?(gi(t),t.flags&=-257,t=Rd(e,t,n)):t.memoizedState!==null?(yi(t),t.child=e.child,t.flags|=128,t=null):(yi(t),r=o.fallback,i=t.mode,o=tc({mode:"visible",children:o.children},i),r=ta(r,i,n,null),r.flags|=2,o.return=t,r.return=t,o.sibling=r,t.child=o,ra(t,e.child,null,n),o=t.child,o.memoizedState=Md(n),o.childLanes=Dd(e,l,n),t.memoizedState=Ad,t=Nr(null,o));else if(gi(t),Bp(r)){if(l=r.nextSibling&&r.nextSibling.dataset,l)var u=l.dgst;l=u,o=Error(U(419)),o.stack="",o.digest=l,qr({value:o,source:null,stack:null}),t=Rd(e,t,n)}else if(ft||wl(e,t,n,!1),l=(n&e.childLanes)!==0,ft||l){if(l=Ue,l!==null&&(o=G0(l,n),o!==0&&o!==s.retryLane))throw s.retryLane=o,pa(e,o),an(l,e,o),Sm;Lp(r)||ac(),t=Rd(e,t,n)}else Lp(r)?(t.flags|=192,t.child=e.child,t=null):(e=s.treeContext,qe=Vn(r.nextSibling),Rt=t,Ce=!0,Ni=null,Un=!1,e!==null&&hv(t,e),t=_p(t,o.children),t.flags|=4096);return t}return i?(yi(t),r=o.fallback,i=t.mode,s=e.child,u=s.sibling,o=Vo(s,{mode:"hidden",children:o.children}),o.subtreeFlags=s.subtreeFlags&65011712,u!==null?r=Vo(u,r):(r=ta(r,i,n,null),r.flags|=2),r.return=t,o.return=t,o.sibling=r,t.child=o,Nr(null,o),o=t.child,r=e.child.memoizedState,r===null?r=Md(n):(i=r.cachePool,i!==null?(s=ct._currentValue,i=i.parent!==s?{parent:s,pool:s}:i):i=yv(),r={baseLanes:r.baseLanes|n,cachePool:i}),o.memoizedState=r,o.childLanes=Dd(e,l,n),t.memoizedState=Ad,Nr(e.child,o)):(gi(t),n=e.child,e=n.sibling,n=Vo(n,{mode:"visible",children:o.children}),n.return=t,n.sibling=null,e!==null&&(l=t.deletions,l===null?(t.deletions=[e],t.flags|=16):l.push(e)),t.child=n,t.memoizedState=null,n)}function _p(e,t){return t=tc({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function tc(e,t){return e=yn(22,e,null,t),e.lanes=0,e}function Rd(e,t,n){return ra(t,e.child,null,n),e=_p(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function $y(e,t,n){e.lanes|=t;var o=e.alternate;o!==null&&(o.lanes|=t),up(e.return,t,n)}function Od(e,t,n,o,i,a){var l=e.memoizedState;l===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:o,tail:n,tailMode:i,treeForkCount:a}:(l.isBackwards=t,l.rendering=null,l.renderingStartTime=0,l.last=o,l.tail=n,l.tailMode=i,l.treeForkCount=a)}function cb(e,t,n){var o=t.pendingProps,i=o.revealOrder,a=o.tail;o=o.children;var l=at.current,r=(l&2)!==0;if(r?(l=l&1|2,t.flags|=128):l&=1,Ie(at,l),Mt(e,t,o,n),o=Ce?Xr:0,!r&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&$y(e,n,t);else if(e.tag===19)$y(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}switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Qu(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Od(t,!1,i,n,a,o);break;case"backwards":case"unstable_legacy-backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Qu(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Od(t,!0,n,null,a,o);break;case"together":Od(t,!1,null,null,void 0,o);break;default:t.memoizedState=null}return t.child}function $o(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Hi|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(wl(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(U(153));if(t.child!==null){for(e=t.child,n=Vo(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Vo(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function xm(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&$u(e)))}function qN(e,t,n){switch(t.tag){case 3:Iu(t,t.stateNode.containerInfo),hi(t,ct,e.memoizedState.cache),aa();break;case 27:case 5:Kd(t);break;case 4:Iu(t,t.stateNode.containerInfo);break;case 10:hi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,hp(t),null;break;case 13:var o=t.memoizedState;if(o!==null)return o.dehydrated!==null?(gi(t),t.flags|=128,null):(n&t.child.childLanes)!==0?ub(e,t,n):(gi(t),e=$o(e,t,n),e!==null?e.sibling:null);gi(t);break;case 19:var i=(e.flags&128)!==0;if(o=(n&t.childLanes)!==0,o||(wl(e,t,n,!1),o=(n&t.childLanes)!==0),i){if(o)return cb(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ie(at,at.current),o)break;return null;case 22:return t.lanes=0,sb(e,t,n,t.pendingProps);case 24:hi(t,ct,e.memoizedState.cache)}return $o(e,t,n)}function fb(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)ft=!0;else{if(!xm(e,n)&&(t.flags&128)===0)return ft=!1,qN(e,t,n);ft=(e.flags&131072)!==0}else ft=!1,Ce&&(t.flags&1048576)!==0&&mv(t,Xr,t.index);switch(t.lanes=0,t.tag){case 16:e:{var o=t.pendingProps;if(e=Wi(t.elementType),t.type=e,typeof e=="function")Jp(e)?(o=ua(e,o),t.tag=1,t=Zy(null,t,e,o,n)):(t.tag=0,t=xp(null,t,e,o,n));else{if(e!=null){var i=e.$$typeof;if(i===Gp){t.tag=11,t=Iy(null,t,e,o,n);break e}else if(i===Up){t.tag=14,t=Vy(null,t,e,o,n);break e}}throw t=$d(e)||e,Error(U(306,t,""))}}return t;case 0:return xp(e,t,t.type,t.pendingProps,n);case 1:return o=t.type,i=ua(o,t.pendingProps),Zy(e,t,o,i,n);case 3:e:{if(Iu(t,t.stateNode.containerInfo),e===null)throw Error(U(387));o=t.pendingProps;var a=t.memoizedState;i=a.element,dp(e,t),zr(t,o,null,n);var l=t.memoizedState;if(o=l.cache,hi(t,ct,o),o!==a.cache&&cp(t,[ct],n,!0),Or(),o=l.element,a.isDehydrated)if(a={element:o,isDehydrated:!1,cache:l.cache},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){t=jy(e,t,o,n);break e}else if(o!==i){i=Gn(Error(U(424)),t),qr(i),t=jy(e,t,o,n);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,qe=Vn(e.firstChild),Rt=t,Ce=!0,Ni=null,Un=!0,n=Sv(t,null,o,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(aa(),o===i){t=$o(e,t,n);break e}Mt(e,t,o,n)}t=t.child}return t;case 26:return Lu(e,t),e===null?(n=g0(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ce||(n=t.type,e=t.pendingProps,o=uc(Ti.current).createElement(n),o[Dt]=t,o[ln]=e,zt(o,n,e),Tt(o),t.stateNode=o):t.memoizedState=g0(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Kd(t),e===null&&Ce&&(o=t.stateNode=t1(t.type,t.pendingProps,Ti.current),Rt=t,Un=!0,i=qe,ki(t.type)?(Hp=i,qe=Vn(o.firstChild)):qe=i),Mt(e,t,t.pendingProps.children,n),Lu(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ce&&((i=o=qe)&&(o=bC(o,t.type,t.pendingProps,Un),o!==null?(t.stateNode=o,Rt=t,qe=Vn(o.firstChild),Un=!1,i=!0):i=!1),i||Li(t)),Kd(t),i=t.type,a=t.pendingProps,l=e!==null?e.memoizedProps:null,o=a.children,Op(i,a)?o=null:l!==null&&Op(i,l)&&(t.flags|=32),t.memoizedState!==null&&(i=sm(e,t,HN,null,null,n),Qr._currentValue=i),Lu(e,t),Mt(e,t,o,n),t.child;case 6:return e===null&&Ce&&((e=n=qe)&&(n=SC(n,t.pendingProps,Un),n!==null?(t.stateNode=n,Rt=t,qe=null,e=!0):e=!1),e||Li(t)),null;case 13:return ub(e,t,n);case 4:return Iu(t,t.stateNode.containerInfo),o=t.pendingProps,e===null?t.child=ra(t,null,o,n):Mt(e,t,o,n),t.child;case 11:return Iy(e,t,t.type,t.pendingProps,n);case 7:return Mt(e,t,t.pendingProps,n),t.child;case 8:return Mt(e,t,t.pendingProps.children,n),t.child;case 12:return Mt(e,t,t.pendingProps.children,n),t.child;case 10:return o=t.pendingProps,hi(t,t.type,o.value),Mt(e,t,o.children,n),t.child;case 9:return i=t.type._context,o=t.pendingProps.children,la(t),i=Ot(i),o=o(i),t.flags|=1,Mt(e,t,o,n),t.child;case 14:return Vy(e,t,t.type,t.pendingProps,n);case 15:return rb(e,t,t.type,t.pendingProps,n);case 19:return cb(e,t,n);case 31:return XN(e,t,n);case 22:return sb(e,t,n,t.pendingProps);case 24:return la(t),o=Ot(ct),e===null?(i=om(),i===null&&(i=Ue,a=nm(),i.pooledCache=a,a.refCount++,a!==null&&(i.pooledCacheLanes|=n),i=a),t.memoizedState={parent:o,cache:i},am(t),hi(t,ct,i)):((e.lanes&n)!==0&&(dp(e,t),zr(t,null,null,n),Or()),i=e.memoizedState,a=t.memoizedState,i.parent!==o?(i={parent:o,cache:o},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),hi(t,ct,o)):(o=a.cache,hi(t,ct,o),o!==i.cache&&cp(t,[ct],n,!0))),Mt(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(U(156,t.tag))}function zo(e){e.flags|=4}function zd(e,t,n,o,i){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Bb())e.flags|=8192;else throw oa=Fu,im}else e.flags&=-16777217}function Fy(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!i1(t))if(Bb())e.flags|=8192;else throw oa=Fu,im}function vu(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?H0():536870912,e.lanes|=t,Sl|=t)}function vr(e,t){if(!Ce)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 o=null;n!==null;)n.alternate!==null&&(o=n),n=n.sibling;o===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function Xe(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,o=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,o|=i.subtreeFlags&65011712,o|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,o|=i.subtreeFlags,o|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=o,e.childLanes=n,t}function ZN(e,t,n){var o=t.pendingProps;switch(tm(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xe(t),null;case 1:return Xe(t),null;case 3:return n=t.stateNode,o=null,e!==null&&(o=e.memoizedState.cache),t.memoizedState.cache!==o&&(t.flags|=2048),Yo(ct),ml(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(qa(t)?zo(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Td())),Xe(t),null;case 26:var i=t.type,a=t.memoizedState;return e===null?(zo(t),a!==null?(Xe(t),Fy(t,a)):(Xe(t),zd(t,i,null,o,n))):a?a!==e.memoizedState?(zo(t),Xe(t),Fy(t,a)):(Xe(t),t.flags&=-16777217):(e=e.memoizedProps,e!==o&&zo(t),Xe(t),zd(t,i,e,o,n)),null;case 27:if(Vu(t),n=Ti.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==o&&zo(t);else{if(!o){if(t.stateNode===null)throw Error(U(166));return Xe(t),null}e=mo.current,qa(t)?Ty(t,e):(e=t1(i,o,n),t.stateNode=e,zo(t))}return Xe(t),null;case 5:if(Vu(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==o&&zo(t);else{if(!o){if(t.stateNode===null)throw Error(U(166));return Xe(t),null}if(a=mo.current,qa(t))Ty(t,a);else{var l=uc(Ti.current);switch(a){case 1:a=l.createElementNS("http://www.w3.org/2000/svg",i);break;case 2:a=l.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;default:switch(i){case"svg":a=l.createElementNS("http://www.w3.org/2000/svg",i);break;case"math":a=l.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;case"script":a=l.createElement("div"),a.innerHTML="<script><\/script>",a=a.removeChild(a.firstChild);break;case"select":a=typeof o.is=="string"?l.createElement("select",{is:o.is}):l.createElement("select"),o.multiple?a.multiple=!0:o.size&&(a.size=o.size);break;default:a=typeof o.is=="string"?l.createElement(i,{is:o.is}):l.createElement(i)}}a[Dt]=t,a[ln]=o;e:for(l=t.child;l!==null;){if(l.tag===5||l.tag===6)a.appendChild(l.stateNode);else if(l.tag!==4&&l.tag!==27&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===t)break e;for(;l.sibling===null;){if(l.return===null||l.return===t)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}t.stateNode=a;e:switch(zt(a,i,o),i){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&zo(t)}}return Xe(t),zd(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==o&&zo(t);else{if(typeof o!="string"&&t.stateNode===null)throw Error(U(166));if(e=Ti.current,qa(t)){if(e=t.stateNode,n=t.memoizedProps,o=null,i=Rt,i!==null)switch(i.tag){case 27:case 5:o=i.memoizedProps}e[Dt]=t,e=!!(e.nodeValue===n||o!==null&&o.suppressHydrationWarning===!0||Qb(e.nodeValue,n)),e||Li(t,!0)}else e=uc(e).createTextNode(o),e[Dt]=t,t.stateNode=e}return Xe(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(o=qa(t),n!==null){if(e===null){if(!o)throw Error(U(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(U(557));e[Dt]=t}else aa(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Xe(t),e=!1}else n=Td(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(gn(t),t):(gn(t),null);if((t.flags&128)!==0)throw Error(U(558))}return Xe(t),null;case 13:if(o=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=qa(t),o!==null&&o.dehydrated!==null){if(e===null){if(!i)throw Error(U(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(U(317));i[Dt]=t}else aa(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Xe(t),i=!1}else i=Td(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(gn(t),t):(gn(t),null)}return gn(t),(t.flags&128)!==0?(t.lanes=n,t):(n=o!==null,e=e!==null&&e.memoizedState!==null,n&&(o=t.child,i=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(i=o.alternate.memoizedState.cachePool.pool),a=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(a=o.memoizedState.cachePool.pool),a!==i&&(o.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),vu(t,t.updateQueue),Xe(t),null);case 4:return ml(),e===null&&Am(t.stateNode.containerInfo),Xe(t),null;case 10:return Yo(t.type),Xe(t),null;case 19:if(Nt(at),o=t.memoizedState,o===null)return Xe(t),null;if(i=(t.flags&128)!==0,a=o.rendering,a===null)if(i)vr(o,!1);else{if(nt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(a=Qu(e),a!==null){for(t.flags|=128,vr(o,!1),e=a.updateQueue,t.updateQueue=e,vu(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)dv(n,e),n=n.sibling;return Ie(at,at.current&1|2),Ce&&Po(t,o.treeForkCount),t.child}e=e.sibling}o.tail!==null&&bn()>oc&&(t.flags|=128,i=!0,vr(o,!1),t.lanes=4194304)}else{if(!i)if(e=Qu(a),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,vu(t,e),vr(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!Ce)return Xe(t),null}else 2*bn()-o.renderingStartTime>oc&&n!==536870912&&(t.flags|=128,i=!0,vr(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(e=o.last,e!==null?e.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=bn(),e.sibling=null,n=at.current,Ie(at,i?n&1|2:n&1),Ce&&Po(t,o.treeForkCount),e):(Xe(t),null);case 22:case 23:return gn(t),lm(),o=t.memoizedState!==null,e!==null?e.memoizedState!==null!==o&&(t.flags|=8192):o&&(t.flags|=8192),o?(n&536870912)!==0&&(t.flags&128)===0&&(Xe(t),t.subtreeFlags&6&&(t.flags|=8192)):Xe(t),n=t.updateQueue,n!==null&&vu(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),o=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(o=t.memoizedState.cachePool.pool),o!==n&&(t.flags|=2048),e!==null&&Nt(na),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Yo(ct),Xe(t),null;case 25:return null;case 30:return null}throw Error(U(156,t.tag))}function jN(e,t){switch(tm(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Yo(ct),ml(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Vu(t),null;case 31:if(t.memoizedState!==null){if(gn(t),t.alternate===null)throw Error(U(340));aa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(gn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(U(340));aa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Nt(at),null;case 4:return ml(),null;case 10:return Yo(t.type),null;case 22:case 23:return gn(t),lm(),e!==null&&Nt(na),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Yo(ct),null;case 25:return null;default:return null}}function db(e,t){switch(tm(t),t.tag){case 3:Yo(ct),ml();break;case 26:case 27:case 5:Vu(t);break;case 4:ml();break;case 31:t.memoizedState!==null&&gn(t);break;case 13:gn(t);break;case 19:Nt(at);break;case 10:Yo(t.type);break;case 22:case 23:gn(t),lm(),e!==null&&Nt(na);break;case 24:Yo(ct)}}function ss(e,t){try{var n=t.updateQueue,o=n!==null?n.lastEffect:null;if(o!==null){var i=o.next;n=i;do{if((n.tag&e)===e){o=void 0;var a=n.create,l=n.inst;o=a(),l.destroy=o}n=n.next}while(n!==i)}}catch(r){Oe(t,t.return,r)}}function Bi(e,t,n){try{var o=t.updateQueue,i=o!==null?o.lastEffect:null;if(i!==null){var a=i.next;o=a;do{if((o.tag&e)===e){var l=o.inst,r=l.destroy;if(r!==void 0){l.destroy=void 0,i=t;var s=n,u=r;try{u()}catch(c){Oe(i,s,c)}}}o=o.next}while(o!==a)}}catch(c){Oe(t,t.return,c)}}function pb(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{_v(t,n)}catch(o){Oe(e,e.return,o)}}}function mb(e,t,n){n.props=ua(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(o){Oe(e,t,o)}}function Br(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var o=e.stateNode;break;case 30:o=e.stateNode;break;default:o=e.stateNode}typeof n=="function"?e.refCleanup=n(o):n.current=o}}catch(i){Oe(e,t,i)}}function po(e,t){var n=e.ref,o=e.refCleanup;if(n!==null)if(typeof o=="function")try{o()}catch(i){Oe(e,t,i)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(i){Oe(e,t,i)}else n.current=null}function hb(e){var t=e.type,n=e.memoizedProps,o=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&o.focus();break e;case"img":n.src?o.src=n.src:n.srcSet&&(o.srcset=n.srcSet)}}catch(i){Oe(e,e.return,i)}}function Ld(e,t,n){try{var o=e.stateNode;pC(o,e.type,n,t),o[ln]=t}catch(i){Oe(e,e.return,i)}}function gb(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ki(e.type)||e.tag===4}function Bd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||gb(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.tag===27&&ki(e.type)||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 Ep(e,t,n){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Uo));else if(o!==4&&(o===27&&ki(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Ep(e,t,n),e=e.sibling;e!==null;)Ep(e,t,n),e=e.sibling}function nc(e,t,n){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(o!==4&&(o===27&&ki(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(nc(e,t,n),e=e.sibling;e!==null;)nc(e,t,n),e=e.sibling}function yb(e){var t=e.stateNode,n=e.memoizedProps;try{for(var o=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);zt(t,o,n),t[Dt]=e,t[ln]=n}catch(a){Oe(e,e.return,a)}}var ko=!1,ut=!1,Hd=!1,Ky=typeof WeakSet=="function"?WeakSet:Set,Et=null;function $N(e,t){if(e=e.containerInfo,Dp=pc,e=iv(e),Kp(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var o=n.getSelection&&n.getSelection();if(o&&o.rangeCount!==0){n=o.anchorNode;var i=o.anchorOffset,a=o.focusNode;o=o.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break e}var l=0,r=-1,s=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var h;d!==n||i!==0&&d.nodeType!==3||(r=l+i),d!==a||o!==0&&d.nodeType!==3||(s=l+o),d.nodeType===3&&(l+=d.nodeValue.length),(h=d.firstChild)!==null;)f=d,d=h;for(;;){if(d===e)break t;if(f===n&&++u===i&&(r=l),f===a&&++c===o&&(s=l),(h=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=h}n=r===-1||s===-1?null:{start:r,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(Rp={focusedElem:e,selectionRange:n},pc=!1,Et=t;Et!==null;)if(t=Et,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Et=e;else for(;Et!==null;){switch(t=Et,a=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n<e.length;n++)i=e[n],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&a!==null){e=void 0,n=t,i=a.memoizedProps,a=a.memoizedState,o=n.stateNode;try{var v=ua(n.type,i);e=o.getSnapshotBeforeUpdate(v,a),o.__reactInternalSnapshotBeforeUpdate=e}catch(b){Oe(n,n.return,b)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)zp(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":zp(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(U(163))}if(e=t.sibling,e!==null){e.return=t.return,Et=e;break}Et=t.return}}function vb(e,t,n){var o=n.flags;switch(n.tag){case 0:case 11:case 15:Bo(e,n),o&4&&ss(5,n);break;case 1:if(Bo(e,n),o&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(l){Oe(n,n.return,l)}else{var i=ua(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(l){Oe(n,n.return,l)}}o&64&&pb(n),o&512&&Br(n,n.return);break;case 3:if(Bo(e,n),o&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{_v(e,t)}catch(l){Oe(n,n.return,l)}}break;case 27:t===null&&o&4&&yb(n);case 26:case 5:Bo(e,n),t===null&&o&4&&hb(n),o&512&&Br(n,n.return);break;case 12:Bo(e,n);break;case 31:Bo(e,n),o&4&&xb(e,n);break;case 13:Bo(e,n),o&4&&_b(e,n),o&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=oC.bind(null,n),xC(e,n))));break;case 22:if(o=n.memoizedState!==null||ko,!o){t=t!==null&&t.memoizedState!==null||ut,i=ko;var a=ut;ko=o,(ut=t)&&!a?Ho(e,n,(n.subtreeFlags&8772)!==0):Bo(e,n),ko=i,ut=a}break;case 30:break;default:Bo(e,n)}}function bb(e){var t=e.alternate;t!==null&&(e.alternate=null,bb(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Xp(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Ke=null,nn=!1;function Lo(e,t,n){for(n=n.child;n!==null;)Sb(e,t,n),n=n.sibling}function Sb(e,t,n){if(Sn&&typeof Sn.onCommitFiberUnmount=="function")try{Sn.onCommitFiberUnmount(ts,n)}catch{}switch(n.tag){case 26:ut||po(n,t),Lo(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:ut||po(n,t);var o=Ke,i=nn;ki(n.type)&&(Ke=n.stateNode,nn=!1),Lo(e,t,n),Gr(n.stateNode),Ke=o,nn=i;break;case 5:ut||po(n,t);case 6:if(o=Ke,i=nn,Ke=null,Lo(e,t,n),Ke=o,nn=i,Ke!==null)if(nn)try{(Ke.nodeType===9?Ke.body:Ke.nodeName==="HTML"?Ke.ownerDocument.body:Ke).removeChild(n.stateNode)}catch(a){Oe(n,t,a)}else try{Ke.removeChild(n.stateNode)}catch(a){Oe(n,t,a)}break;case 18:Ke!==null&&(nn?(e=Ke,f0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Tl(e)):f0(Ke,n.stateNode));break;case 4:o=Ke,i=nn,Ke=n.stateNode.containerInfo,nn=!0,Lo(e,t,n),Ke=o,nn=i;break;case 0:case 11:case 14:case 15:Bi(2,n,t),ut||Bi(4,n,t),Lo(e,t,n);break;case 1:ut||(po(n,t),o=n.stateNode,typeof o.componentWillUnmount=="function"&&mb(n,t,o)),Lo(e,t,n);break;case 21:Lo(e,t,n);break;case 22:ut=(o=ut)||n.memoizedState!==null,Lo(e,t,n),ut=o;break;default:Lo(e,t,n)}}function xb(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Tl(e)}catch(n){Oe(t,t.return,n)}}}function _b(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Tl(e)}catch(n){Oe(t,t.return,n)}}function FN(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Ky),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Ky),t;default:throw Error(U(435,e.tag))}}function bu(e,t){var n=FN(e);t.forEach(function(o){if(!n.has(o)){n.add(o);var i=iC.bind(null,e,o);o.then(i,i)}})}function en(e,t){var n=t.deletions;if(n!==null)for(var o=0;o<n.length;o++){var i=n[o],a=e,l=t,r=l;e:for(;r!==null;){switch(r.tag){case 27:if(ki(r.type)){Ke=r.stateNode,nn=!1;break e}break;case 5:Ke=r.stateNode,nn=!1;break e;case 3:case 4:Ke=r.stateNode.containerInfo,nn=!0;break e}r=r.return}if(Ke===null)throw Error(U(160));Sb(a,l,i),Ke=null,nn=!1,a=i.alternate,a!==null&&(a.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Eb(t,e),t=t.sibling}var Jn=null;function Eb(e,t){var n=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:en(t,e),tn(e),o&4&&(Bi(3,e,e.return),ss(3,e),Bi(5,e,e.return));break;case 1:en(t,e),tn(e),o&512&&(ut||n===null||po(n,n.return)),o&64&&ko&&(e=e.updateQueue,e!==null&&(o=e.callbacks,o!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?o:n.concat(o))));break;case 26:var i=Jn;if(en(t,e),tn(e),o&512&&(ut||n===null||po(n,n.return)),o&4){var a=n!==null?n.memoizedState:null;if(o=e.memoizedState,n===null)if(o===null)if(e.stateNode===null){e:{o=e.type,n=e.memoizedProps,i=i.ownerDocument||i;t:switch(o){case"title":a=i.getElementsByTagName("title")[0],(!a||a[is]||a[Dt]||a.namespaceURI==="http://www.w3.org/2000/svg"||a.hasAttribute("itemprop"))&&(a=i.createElement(o),i.head.insertBefore(a,i.querySelector("head > title"))),zt(a,o,n),a[Dt]=e,Tt(a),o=a;break e;case"link":var l=v0("link","href",i).get(o+(n.href||""));if(l){for(var r=0;r<l.length;r++)if(a=l[r],a.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&a.getAttribute("rel")===(n.rel==null?null:n.rel)&&a.getAttribute("title")===(n.title==null?null:n.title)&&a.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){l.splice(r,1);break t}}a=i.createElement(o),zt(a,o,n),i.head.appendChild(a);break;case"meta":if(l=v0("meta","content",i).get(o+(n.content||""))){for(r=0;r<l.length;r++)if(a=l[r],a.getAttribute("content")===(n.content==null?null:""+n.content)&&a.getAttribute("name")===(n.name==null?null:n.name)&&a.getAttribute("property")===(n.property==null?null:n.property)&&a.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&a.getAttribute("charset")===(n.charSet==null?null:n.charSet)){l.splice(r,1);break t}}a=i.createElement(o),zt(a,o,n),i.head.appendChild(a);break;default:throw Error(U(468,o))}a[Dt]=e,Tt(a),o=a}e.stateNode=o}else b0(i,e.type,e.stateNode);else e.stateNode=y0(i,o,e.memoizedProps);else a!==o?(a===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):a.count--,o===null?b0(i,e.type,e.stateNode):y0(i,o,e.memoizedProps)):o===null&&e.stateNode!==null&&Ld(e,e.memoizedProps,n.memoizedProps)}break;case 27:en(t,e),tn(e),o&512&&(ut||n===null||po(n,n.return)),n!==null&&o&4&&Ld(e,e.memoizedProps,n.memoizedProps);break;case 5:if(en(t,e),tn(e),o&512&&(ut||n===null||po(n,n.return)),e.flags&32){i=e.stateNode;try{gl(i,"")}catch(v){Oe(e,e.return,v)}}o&4&&e.stateNode!=null&&(i=e.memoizedProps,Ld(e,i,n!==null?n.memoizedProps:i)),o&1024&&(Hd=!0);break;case 6:if(en(t,e),tn(e),o&4){if(e.stateNode===null)throw Error(U(162));o=e.memoizedProps,n=e.stateNode;try{n.nodeValue=o}catch(v){Oe(e,e.return,v)}}break;case 3:if(Pu=null,i=Jn,Jn=cc(t.containerInfo),en(t,e),Jn=i,tn(e),o&4&&n!==null&&n.memoizedState.isDehydrated)try{Tl(t.containerInfo)}catch(v){Oe(e,e.return,v)}Hd&&(Hd=!1,Tb(e));break;case 4:o=Jn,Jn=cc(e.stateNode.containerInfo),en(t,e),tn(e),Jn=o;break;case 12:en(t,e),tn(e);break;case 31:en(t,e),tn(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,bu(e,o)));break;case 13:en(t,e),tn(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Cc=bn()),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,bu(e,o)));break;case 22:i=e.memoizedState!==null;var s=n!==null&&n.memoizedState!==null,u=ko,c=ut;if(ko=u||i,ut=c||s,en(t,e),ut=c,ko=u,tn(e),o&8192)e:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(n===null||s||ko||ut||Ji(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){s=n=t;try{if(a=s.stateNode,i)l=a.style,typeof l.setProperty=="function"?l.setProperty("display","none","important"):l.display="none";else{r=s.stateNode;var d=s.memoizedProps.style,f=d!=null&&d.hasOwnProperty("display")?d.display:null;r.style.display=f==null||typeof f=="boolean"?"":(""+f).trim()}}catch(v){Oe(s,s.return,v)}}}else if(t.tag===6){if(n===null){s=t;try{s.stateNode.nodeValue=i?"":s.memoizedProps}catch(v){Oe(s,s.return,v)}}}else if(t.tag===18){if(n===null){s=t;try{var h=s.stateNode;i?d0(h,!0):d0(s.stateNode,!1)}catch(v){Oe(s,s.return,v)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}o&4&&(o=e.updateQueue,o!==null&&(n=o.retryQueue,n!==null&&(o.retryQueue=null,bu(e,n))));break;case 19:en(t,e),tn(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,bu(e,o)));break;case 30:break;case 21:break;default:en(t,e),tn(e)}}function tn(e){var t=e.flags;if(t&2){try{for(var n,o=e.return;o!==null;){if(gb(o)){n=o;break}o=o.return}if(n==null)throw Error(U(160));switch(n.tag){case 27:var i=n.stateNode,a=Bd(e);nc(e,a,i);break;case 5:var l=n.stateNode;n.flags&32&&(gl(l,""),n.flags&=-33);var r=Bd(e);nc(e,r,l);break;case 3:case 4:var s=n.stateNode.containerInfo,u=Bd(e);Ep(e,u,s);break;default:throw Error(U(161))}}catch(c){Oe(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Tb(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Tb(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Bo(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)vb(e,t.alternate,t),t=t.sibling}function Ji(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Bi(4,t,t.return),Ji(t);break;case 1:po(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&mb(t,t.return,n),Ji(t);break;case 27:Gr(t.stateNode);case 26:case 5:po(t,t.return),Ji(t);break;case 22:t.memoizedState===null&&Ji(t);break;case 30:Ji(t);break;default:Ji(t)}e=e.sibling}}function Ho(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var o=t.alternate,i=e,a=t,l=a.flags;switch(a.tag){case 0:case 11:case 15:Ho(i,a,n),ss(4,a);break;case 1:if(Ho(i,a,n),o=a,i=o.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(u){Oe(o,o.return,u)}if(o=a,i=o.updateQueue,i!==null){var r=o.stateNode;try{var s=i.shared.hiddenCallbacks;if(s!==null)for(i.shared.hiddenCallbacks=null,i=0;i<s.length;i++)xv(s[i],r)}catch(u){Oe(o,o.return,u)}}n&&l&64&&pb(a),Br(a,a.return);break;case 27:yb(a);case 26:case 5:Ho(i,a,n),n&&o===null&&l&4&&hb(a),Br(a,a.return);break;case 12:Ho(i,a,n);break;case 31:Ho(i,a,n),n&&l&4&&xb(i,a);break;case 13:Ho(i,a,n),n&&l&4&&_b(i,a);break;case 22:a.memoizedState===null&&Ho(i,a,n),Br(a,a.return);break;case 30:break;default:Ho(i,a,n)}t=t.sibling}}function _m(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&ls(n))}function Em(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ls(e))}function Wn(e,t,n,o){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Nb(e,t,n,o),t=t.sibling}function Nb(e,t,n,o){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Wn(e,t,n,o),i&2048&&ss(9,t);break;case 1:Wn(e,t,n,o);break;case 3:Wn(e,t,n,o),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ls(e)));break;case 12:if(i&2048){Wn(e,t,n,o),e=t.stateNode;try{var a=t.memoizedProps,l=a.id,r=a.onPostCommit;typeof r=="function"&&r(l,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(s){Oe(t,t.return,s)}}else Wn(e,t,n,o);break;case 31:Wn(e,t,n,o);break;case 13:Wn(e,t,n,o);break;case 23:break;case 22:a=t.stateNode,l=t.alternate,t.memoizedState!==null?a._visibility&2?Wn(e,t,n,o):Hr(e,t):a._visibility&2?Wn(e,t,n,o):(a._visibility|=2,ja(e,t,n,o,(t.subtreeFlags&10256)!==0||!1)),i&2048&&_m(l,t);break;case 24:Wn(e,t,n,o),i&2048&&Em(t.alternate,t);break;default:Wn(e,t,n,o)}}function ja(e,t,n,o,i){for(i=i&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var a=e,l=t,r=n,s=o,u=l.flags;switch(l.tag){case 0:case 11:case 15:ja(a,l,r,s,i),ss(8,l);break;case 23:break;case 22:var c=l.stateNode;l.memoizedState!==null?c._visibility&2?ja(a,l,r,s,i):Hr(a,l):(c._visibility|=2,ja(a,l,r,s,i)),i&&u&2048&&_m(l.alternate,l);break;case 24:ja(a,l,r,s,i),i&&u&2048&&Em(l.alternate,l);break;default:ja(a,l,r,s,i)}t=t.sibling}}function Hr(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,o=t,i=o.flags;switch(o.tag){case 22:Hr(n,o),i&2048&&_m(o.alternate,o);break;case 24:Hr(n,o),i&2048&&Em(o.alternate,o);break;default:Hr(n,o)}t=t.sibling}}var Cr=8192;function Za(e,t,n){if(e.subtreeFlags&Cr)for(e=e.child;e!==null;)Cb(e,t,n),e=e.sibling}function Cb(e,t,n){switch(e.tag){case 26:Za(e,t,n),e.flags&Cr&&e.memoizedState!==null&&zC(n,Jn,e.memoizedState,e.memoizedProps);break;case 5:Za(e,t,n);break;case 3:case 4:var o=Jn;Jn=cc(e.stateNode.containerInfo),Za(e,t,n),Jn=o;break;case 22:e.memoizedState===null&&(o=e.alternate,o!==null&&o.memoizedState!==null?(o=Cr,Cr=16777216,Za(e,t,n),Cr=o):Za(e,t,n));break;default:Za(e,t,n)}}function wb(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function br(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var o=t[n];Et=o,Mb(o,e)}wb(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Ab(e),e=e.sibling}function Ab(e){switch(e.tag){case 0:case 11:case 15:br(e),e.flags&2048&&Bi(9,e,e.return);break;case 3:br(e);break;case 12:br(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Bu(e)):br(e);break;default:br(e)}}function Bu(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var o=t[n];Et=o,Mb(o,e)}wb(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Bi(8,t,t.return),Bu(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Bu(t));break;default:Bu(t)}e=e.sibling}}function Mb(e,t){for(;Et!==null;){var n=Et;switch(n.tag){case 0:case 11:case 15:Bi(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var o=n.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:ls(n.memoizedState.cache)}if(o=n.child,o!==null)o.return=n,Et=o;else e:for(n=e;Et!==null;){o=Et;var i=o.sibling,a=o.return;if(bb(o),o===n){Et=null;break e}if(i!==null){i.return=a,Et=i;break e}Et=a}}}var KN={getCacheForType:function(e){var t=Ot(ct),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Ot(ct).controller.signal}},QN=typeof WeakMap=="function"?WeakMap:Map,Me=0,Ue=null,_e=null,Ne=0,Re=0,hn=null,xi=!1,Ml=!1,Tm=!1,Fo=0,nt=0,Hi=0,ia=0,Nm=0,vn=0,Sl=0,Pr=null,on=null,Tp=!1,Cc=0,Db=0,oc=1/0,ic=null,Ai=null,ht=0,Mi=null,xl=null,Xo=0,Np=0,Cp=null,Rb=null,kr=0,wp=null;function _n(){return(Me&2)!==0&&Ne!==0?Ne&-Ne:ce.T!==null?wm():U0()}function Ob(){if(vn===0)if((Ne&536870912)===0||Ce){var e=uu;uu<<=1,(uu&3932160)===0&&(uu=262144),vn=e}else vn=536870912;return e=Tn.current,e!==null&&(e.flags|=32),vn}function an(e,t,n){(e===Ue&&(Re===2||Re===9)||e.cancelPendingCommit!==null)&&(_l(e,0),_i(e,Ne,vn,!1)),os(e,n),((Me&2)===0||e!==Ue)&&(e===Ue&&((Me&2)===0&&(ia|=n),nt===4&&_i(e,Ne,vn,!1)),go(e))}function zb(e,t,n){if((Me&6)!==0)throw Error(U(327));var o=!n&&(t&127)===0&&(t&e.expiredLanes)===0||ns(e,t),i=o?eC(e,t):Pd(e,t,!0),a=o;do{if(i===0){Ml&&!o&&_i(e,t,0,!1);break}else{if(n=e.current.alternate,a&&!WN(n)){i=Pd(e,t,!1),a=!1;continue}if(i===2){if(a=t,e.errorRecoveryDisabledLanes&a)var l=0;else l=e.pendingLanes&-536870913,l=l!==0?l:l&536870912?536870912:0;if(l!==0){t=l;e:{var r=e;i=Pr;var s=r.current.memoizedState.isDehydrated;if(s&&(_l(r,l).flags|=256),l=Pd(r,l,!1),l!==2){if(Tm&&!s){r.errorRecoveryDisabledLanes|=a,ia|=a,i=4;break e}a=on,on=i,a!==null&&(on===null?on=a:on.push.apply(on,a))}i=l}if(a=!1,i!==2)continue}}if(i===1){_l(e,0),_i(e,t,0,!0);break}e:{switch(o=e,a=i,a){case 0:case 1:throw Error(U(345));case 4:if((t&4194048)!==t)break;case 6:_i(o,t,vn,!xi);break e;case 2:on=null;break;case 3:case 5:break;default:throw Error(U(329))}if((t&62914560)===t&&(i=Cc+300-bn(),10<i)){if(_i(o,t,vn,!xi),hc(o,0,!0)!==0)break e;Xo=t,o.timeoutHandle=Jb(Qy.bind(null,o,n,on,ic,Tp,t,vn,ia,Sl,xi,a,"Throttled",-0,0),i);break e}Qy(o,n,on,ic,Tp,t,vn,ia,Sl,xi,a,null,-0,0)}}break}while(!0);go(e)}function Qy(e,t,n,o,i,a,l,r,s,u,c,d,f,h){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)===16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Uo},Cb(t,a,d);var v=(a&62914560)===a?Cc-bn():(a&4194048)===a?Db-bn():0;if(v=LC(d,v),v!==null){Xo=a,e.cancelPendingCommit=v(Jy.bind(null,e,t,a,n,o,i,l,r,s,c,d,null,f,h)),_i(e,a,l,!u);return}}Jy(e,t,a,n,o,i,l,r,s)}function WN(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var o=0;o<n.length;o++){var i=n[o],a=i.getSnapshot;i=i.value;try{if(!En(a(),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 _i(e,t,n,o){t&=~Nm,t&=~ia,e.suspendedLanes|=t,e.pingedLanes&=~t,o&&(e.warmLanes|=t),o=e.expirationTimes;for(var i=t;0<i;){var a=31-xn(i),l=1<<a;o[a]=-1,i&=~l}n!==0&&P0(e,n,t)}function wc(){return(Me&6)===0?(us(0,!1),!1):!0}function Cm(){if(_e!==null){if(Re===0)var e=_e.return;else e=_e,Io=ma=null,fm(e),fl=null,Zr=0,e=_e;for(;e!==null;)db(e.alternate,e),e=e.return;_e=null}}function _l(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,gC(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Xo=0,Cm(),Ue=e,_e=n=Vo(e.current,null),Ne=t,Re=0,hn=null,xi=!1,Ml=ns(e,t),Tm=!1,Sl=vn=Nm=ia=Hi=nt=0,on=Pr=null,Tp=!1,(t&8)!==0&&(t|=t&32);var o=e.entangledLanes;if(o!==0)for(e=e.entanglements,o&=t;0<o;){var i=31-xn(o),a=1<<i;t|=e[i],o&=~a}return Fo=t,bc(),n}function Lb(e,t){ye=null,ce.H=$r,t===Al||t===xc?(t=My(),Re=3):t===im?(t=My(),Re=4):Re=t===Sm?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,hn=t,_e===null&&(nt=1,ec(e,Gn(t,e.current)))}function Bb(){var e=Tn.current;return e===null?!0:(Ne&4194048)===Ne?In===null:(Ne&62914560)===Ne||(Ne&536870912)!==0?e===In:!1}function Hb(){var e=ce.H;return ce.H=$r,e===null?$r:e}function Pb(){var e=ce.A;return ce.A=KN,e}function ac(){nt=4,xi||(Ne&4194048)!==Ne&&Tn.current!==null||(Ml=!0),(Hi&134217727)===0&&(ia&134217727)===0||Ue===null||_i(Ue,Ne,vn,!1)}function Pd(e,t,n){var o=Me;Me|=2;var i=Hb(),a=Pb();(Ue!==e||Ne!==t)&&(ic=null,_l(e,t)),t=!1;var l=nt;e:do try{if(Re!==0&&_e!==null){var r=_e,s=hn;switch(Re){case 8:Cm(),l=6;break e;case 3:case 2:case 9:case 6:Tn.current===null&&(t=!0);var u=Re;if(Re=0,hn=null,ll(e,r,s,u),n&&Ml){l=0;break e}break;default:u=Re,Re=0,hn=null,ll(e,r,s,u)}}JN(),l=nt;break}catch(c){Lb(e,c)}while(!0);return t&&e.shellSuspendCounter++,Io=ma=null,Me=o,ce.H=i,ce.A=a,_e===null&&(Ue=null,Ne=0,bc()),l}function JN(){for(;_e!==null;)kb(_e)}function eC(e,t){var n=Me;Me|=2;var o=Hb(),i=Pb();Ue!==e||Ne!==t?(ic=null,oc=bn()+500,_l(e,t)):Ml=ns(e,t);e:do try{if(Re!==0&&_e!==null){t=_e;var a=hn;t:switch(Re){case 1:Re=0,hn=null,ll(e,t,a,1);break;case 2:case 9:if(Ay(a)){Re=0,hn=null,Wy(t);break}t=function(){Re!==2&&Re!==9||Ue!==e||(Re=7),go(e)},a.then(t,t);break e;case 3:Re=7;break e;case 4:Re=5;break e;case 7:Ay(a)?(Re=0,hn=null,Wy(t)):(Re=0,hn=null,ll(e,t,a,7));break;case 5:var l=null;switch(_e.tag){case 26:l=_e.memoizedState;case 5:case 27:var r=_e;if(l?i1(l):r.stateNode.complete){Re=0,hn=null;var s=r.sibling;if(s!==null)_e=s;else{var u=r.return;u!==null?(_e=u,Ac(u)):_e=null}break t}}Re=0,hn=null,ll(e,t,a,5);break;case 6:Re=0,hn=null,ll(e,t,a,6);break;case 8:Cm(),nt=6;break e;default:throw Error(U(462))}}tC();break}catch(c){Lb(e,c)}while(!0);return Io=ma=null,ce.H=o,ce.A=i,Me=n,_e!==null?0:(Ue=null,Ne=0,bc(),nt)}function tC(){for(;_e!==null&&!T2();)kb(_e)}function kb(e){var t=fb(e.alternate,e,Fo);e.memoizedProps=e.pendingProps,t===null?Ac(e):_e=t}function Wy(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=qy(n,t,t.pendingProps,t.type,void 0,Ne);break;case 11:t=qy(n,t,t.pendingProps,t.type.render,t.ref,Ne);break;case 5:fm(t);default:db(n,t),t=_e=dv(t,Fo),t=fb(n,t,Fo)}e.memoizedProps=e.pendingProps,t===null?Ac(e):_e=t}function ll(e,t,n,o){Io=ma=null,fm(t),fl=null,Zr=0;var i=t.return;try{if(YN(e,i,t,n,Ne)){nt=1,ec(e,Gn(n,e.current)),_e=null;return}}catch(a){if(i!==null)throw _e=i,a;nt=1,ec(e,Gn(n,e.current)),_e=null;return}t.flags&32768?(Ce||o===1?e=!0:Ml||(Ne&536870912)!==0?e=!1:(xi=e=!0,(o===2||o===9||o===3||o===6)&&(o=Tn.current,o!==null&&o.tag===13&&(o.flags|=16384))),Gb(t,e)):Ac(t)}function Ac(e){var t=e;do{if((t.flags&32768)!==0){Gb(t,xi);return}e=t.return;var n=ZN(t.alternate,t,Fo);if(n!==null){_e=n;return}if(t=t.sibling,t!==null){_e=t;return}_e=t=e}while(t!==null);nt===0&&(nt=5)}function Gb(e,t){do{var n=jN(e.alternate,e);if(n!==null){n.flags&=32767,_e=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){_e=e;return}_e=e=n}while(e!==null);nt=6,_e=null}function Jy(e,t,n,o,i,a,l,r,s){e.cancelPendingCommit=null;do Mc();while(ht!==0);if((Me&6)!==0)throw Error(U(327));if(t!==null){if(t===e.current)throw Error(U(177));if(a=t.lanes|t.childLanes,a|=Qp,L2(e,n,a,l,r,s),e===Ue&&(_e=Ue=null,Ne=0),xl=t,Mi=e,Xo=n,Np=a,Cp=i,Rb=o,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,aC(Yu,function(){return Xb(),null})):(e.callbackNode=null,e.callbackPriority=0),o=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||o){o=ce.T,ce.T=null,i=De.p,De.p=2,l=Me,Me|=4;try{$N(e,t,n)}finally{Me=l,De.p=i,ce.T=o}}ht=1,Ub(),Ib(),Vb()}}function Ub(){if(ht===1){ht=0;var e=Mi,t=xl,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=ce.T,ce.T=null;var o=De.p;De.p=2;var i=Me;Me|=4;try{Eb(t,e);var a=Rp,l=iv(e.containerInfo),r=a.focusedElem,s=a.selectionRange;if(l!==r&&r&&r.ownerDocument&&ov(r.ownerDocument.documentElement,r)){if(s!==null&&Kp(r)){var u=s.start,c=s.end;if(c===void 0&&(c=u),"selectionStart"in r)r.selectionStart=u,r.selectionEnd=Math.min(c,r.value.length);else{var d=r.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var h=f.getSelection(),v=r.textContent.length,b=Math.min(s.start,v),S=s.end===void 0?b:Math.min(s.end,v);!h.extend&&b>S&&(l=S,S=b,b=l);var p=xy(r,b),y=xy(r,S);if(p&&y&&(h.rangeCount!==1||h.anchorNode!==p.node||h.anchorOffset!==p.offset||h.focusNode!==y.node||h.focusOffset!==y.offset)){var m=d.createRange();m.setStart(p.node,p.offset),h.removeAllRanges(),b>S?(h.addRange(m),h.extend(y.node,y.offset)):(m.setEnd(y.node,y.offset),h.addRange(m))}}}}for(d=[],h=r;h=h.parentNode;)h.nodeType===1&&d.push({element:h,left:h.scrollLeft,top:h.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<d.length;r++){var g=d[r];g.element.scrollLeft=g.left,g.element.scrollTop=g.top}}pc=!!Dp,Rp=Dp=null}finally{Me=i,De.p=o,ce.T=n}}e.current=t,ht=2}}function Ib(){if(ht===2){ht=0;var e=Mi,t=xl,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=ce.T,ce.T=null;var o=De.p;De.p=2;var i=Me;Me|=4;try{vb(e,t.alternate,t)}finally{Me=i,De.p=o,ce.T=n}}ht=3}}function Vb(){if(ht===4||ht===3){ht=0,N2();var e=Mi,t=xl,n=Xo,o=Rb;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?ht=5:(ht=0,xl=Mi=null,Yb(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(Ai=null),Yp(n),t=t.stateNode,Sn&&typeof Sn.onCommitFiberRoot=="function")try{Sn.onCommitFiberRoot(ts,t,void 0,(t.current.flags&128)===128)}catch{}if(o!==null){t=ce.T,i=De.p,De.p=2,ce.T=null;try{for(var a=e.onRecoverableError,l=0;l<o.length;l++){var r=o[l];a(r.value,{componentStack:r.stack})}}finally{ce.T=t,De.p=i}}(Xo&3)!==0&&Mc(),go(e),i=e.pendingLanes,(n&261930)!==0&&(i&42)!==0?e===wp?kr++:(kr=0,wp=e):kr=0,us(0,!1)}}function Yb(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ls(t)))}function Mc(){return Ub(),Ib(),Vb(),Xb()}function Xb(){if(ht!==5)return!1;var e=Mi,t=Np;Np=0;var n=Yp(Xo),o=ce.T,i=De.p;try{De.p=32>n?32:n,ce.T=null,n=Cp,Cp=null;var a=Mi,l=Xo;if(ht=0,xl=Mi=null,Xo=0,(Me&6)!==0)throw Error(U(331));var r=Me;if(Me|=4,Ab(a.current),Nb(a,a.current,l,n),Me=r,us(0,!1),Sn&&typeof Sn.onPostCommitFiberRoot=="function")try{Sn.onPostCommitFiberRoot(ts,a)}catch{}return!0}finally{De.p=i,ce.T=o,Yb(e,t)}}function e0(e,t,n){t=Gn(n,t),t=Sp(e.stateNode,t,2),e=wi(e,t,2),e!==null&&(os(e,2),go(e))}function Oe(e,t,n){if(e.tag===3)e0(e,e,n);else for(;t!==null;){if(t.tag===3){e0(t,e,n);break}else if(t.tag===1){var o=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(Ai===null||!Ai.has(o))){e=Gn(n,e),n=ab(2),o=wi(t,n,2),o!==null&&(lb(n,o,t,e),os(o,2),go(o));break}}t=t.return}}function kd(e,t,n){var o=e.pingCache;if(o===null){o=e.pingCache=new QN;var i=new Set;o.set(t,i)}else i=o.get(t),i===void 0&&(i=new Set,o.set(t,i));i.has(n)||(Tm=!0,i.add(n),e=nC.bind(null,e,t,n),t.then(e,e))}function nC(e,t,n){var o=e.pingCache;o!==null&&o.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ue===e&&(Ne&n)===n&&(nt===4||nt===3&&(Ne&62914560)===Ne&&300>bn()-Cc?(Me&2)===0&&_l(e,0):Nm|=n,Sl===Ne&&(Sl=0)),go(e)}function qb(e,t){t===0&&(t=H0()),e=pa(e,t),e!==null&&(os(e,t),go(e))}function oC(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qb(e,n)}function iC(e,t){var n=0;switch(e.tag){case 31:case 13:var o=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:o=e.stateNode;break;case 22:o=e.stateNode._retryCache;break;default:throw Error(U(314))}o!==null&&o.delete(t),qb(e,n)}function aC(e,t){return Ip(e,t)}var lc=null,$a=null,Ap=!1,rc=!1,Gd=!1,Ei=0;function go(e){e!==$a&&e.next===null&&($a===null?lc=$a=e:$a=$a.next=e),rc=!0,Ap||(Ap=!0,rC())}function us(e,t){if(!Gd&&rc){Gd=!0;do for(var n=!1,o=lc;o!==null;){if(!t)if(e!==0){var i=o.pendingLanes;if(i===0)var a=0;else{var l=o.suspendedLanes,r=o.pingedLanes;a=(1<<31-xn(42|e)+1)-1,a&=i&~(l&~r),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,t0(o,a))}else a=Ne,a=hc(o,o===Ue?a:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(a&3)===0||ns(o,a)||(n=!0,t0(o,a));o=o.next}while(n);Gd=!1}}function lC(){Zb()}function Zb(){rc=Ap=!1;var e=0;Ei!==0&&hC()&&(e=Ei);for(var t=bn(),n=null,o=lc;o!==null;){var i=o.next,a=jb(o,t);a===0?(o.next=null,n===null?lc=i:n.next=i,i===null&&($a=n)):(n=o,(e!==0||(a&3)!==0)&&(rc=!0)),o=i}ht!==0&&ht!==5||us(e,!1),Ei!==0&&(Ei=0)}function jb(e,t){for(var n=e.suspendedLanes,o=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var l=31-xn(a),r=1<<l,s=i[l];s===-1?((r&n)===0||(r&o)!==0)&&(i[l]=z2(r,t)):s<=t&&(e.expiredLanes|=r),a&=~r}if(t=Ue,n=Ne,n=hc(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o=e.callbackNode,n===0||e===t&&(Re===2||Re===9)||e.cancelPendingCommit!==null)return o!==null&&o!==null&&md(o),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||ns(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(o!==null&&md(o),Yp(n)){case 2:case 8:n=L0;break;case 32:n=Yu;break;case 268435456:n=B0;break;default:n=Yu}return o=$b.bind(null,e),n=Ip(n,o),e.callbackPriority=t,e.callbackNode=n,t}return o!==null&&o!==null&&md(o),e.callbackPriority=2,e.callbackNode=null,2}function $b(e,t){if(ht!==0&&ht!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Mc()&&e.callbackNode!==n)return null;var o=Ne;return o=hc(e,e===Ue?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o===0?null:(zb(e,o,t),jb(e,bn()),e.callbackNode!=null&&e.callbackNode===n?$b.bind(null,e):null)}function t0(e,t){if(Mc())return null;zb(e,t,!0)}function rC(){yC(function(){(Me&6)!==0?Ip(z0,lC):Zb()})}function wm(){if(Ei===0){var e=yl;e===0&&(e=su,su<<=1,(su&261888)===0&&(su=256)),Ei=e}return Ei}function n0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Cu(""+e)}function o0(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function sC(e,t,n,o,i){if(t==="submit"&&n&&n.stateNode===i){var a=n0((i[ln]||null).action),l=o.submitter;l&&(t=(t=l[ln]||null)?n0(t.formAction):l.getAttribute("formAction"),t!==null&&(a=t,l=null));var r=new gc("action","action",null,o,i);e.push({event:r,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(Ei!==0){var s=l?o0(i,l):new FormData(i);vp(n,{pending:!0,data:s,method:i.method,action:a},null,s)}}else typeof a=="function"&&(r.preventDefault(),s=l?o0(i,l):new FormData(i),vp(n,{pending:!0,data:s,method:i.method,action:a},a,s))},currentTarget:i}]})}}for(Su=0;Su<lp.length;Su++)xu=lp[Su],i0=xu.toLowerCase(),a0=xu[0].toUpperCase()+xu.slice(1),eo(i0,"on"+a0);var xu,i0,a0,Su;eo(lv,"onAnimationEnd");eo(rv,"onAnimationIteration");eo(sv,"onAnimationStart");eo("dblclick","onDoubleClick");eo("focusin","onFocus");eo("focusout","onBlur");eo(CN,"onTransitionRun");eo(wN,"onTransitionStart");eo(AN,"onTransitionCancel");eo(uv,"onTransitionEnd");hl("onMouseEnter",["mouseout","mouseover"]);hl("onMouseLeave",["mouseout","mouseover"]);hl("onPointerEnter",["pointerout","pointerover"]);hl("onPointerLeave",["pointerout","pointerover"]);ca("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));ca("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));ca("onBeforeInput",["compositionend","keypress","textInput","paste"]);ca("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));ca("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));ca("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Fr="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(" "),uC=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Fr));function Fb(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var o=e[n],i=o.event;o=o.listeners;e:{var a=void 0;if(t)for(var l=o.length-1;0<=l;l--){var r=o[l],s=r.instance,u=r.currentTarget;if(r=r.listener,s!==a&&i.isPropagationStopped())break e;a=r,i.currentTarget=u;try{a(i)}catch(c){qu(c)}i.currentTarget=null,a=s}else for(l=0;l<o.length;l++){if(r=o[l],s=r.instance,u=r.currentTarget,r=r.listener,s!==a&&i.isPropagationStopped())break e;a=r,i.currentTarget=u;try{a(i)}catch(c){qu(c)}i.currentTarget=null,a=s}}}}function xe(e,t){var n=t[Wd];n===void 0&&(n=t[Wd]=new Set);var o=e+"__bubble";n.has(o)||(Kb(t,e,2,!1),n.add(o))}function Ud(e,t,n){var o=0;t&&(o|=4),Kb(n,e,o,t)}var _u="_reactListening"+Math.random().toString(36).slice(2);function Am(e){if(!e[_u]){e[_u]=!0,I0.forEach(function(n){n!=="selectionchange"&&(uC.has(n)||Ud(n,!1,e),Ud(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[_u]||(t[_u]=!0,Ud("selectionchange",!1,t))}}function Kb(e,t,n,o){switch(u1(t)){case 2:var i=PC;break;case 8:i=kC;break;default:i=Om}n=i.bind(null,t,n,e),i=void 0,!op||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),o?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 Id(e,t,n,o,i){var a=o;if((t&1)===0&&(t&2)===0&&o!==null)e:for(;;){if(o===null)return;var l=o.tag;if(l===3||l===4){var r=o.stateNode.containerInfo;if(r===i)break;if(l===4)for(l=o.return;l!==null;){var s=l.tag;if((s===3||s===4)&&l.stateNode.containerInfo===i)return;l=l.return}for(;r!==null;){if(l=Qa(r),l===null)return;if(s=l.tag,s===5||s===6||s===26||s===27){o=a=l;continue e}r=r.parentNode}}o=o.return}F0(function(){var u=a,c=Zp(n),d=[];e:{var f=cv.get(e);if(f!==void 0){var h=gc,v=e;switch(e){case"keypress":if(Au(n)===0)break e;case"keydown":case"keyup":h=iN;break;case"focusin":v="focus",h=bd;break;case"focusout":v="blur",h=bd;break;case"beforeblur":case"afterblur":h=bd;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=dy;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=Z2;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=rN;break;case lv:case rv:case sv:h=F2;break;case uv:h=uN;break;case"scroll":case"scrollend":h=X2;break;case"wheel":h=fN;break;case"copy":case"cut":case"paste":h=Q2;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=my;break;case"toggle":case"beforetoggle":h=pN}var b=(t&4)!==0,S=!b&&(e==="scroll"||e==="scrollend"),p=b?f!==null?f+"Capture":null:f;b=[];for(var y=u,m;y!==null;){var g=y;if(m=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||m===null||p===null||(g=Ir(y,p),g!=null&&b.push(Kr(y,g,m))),S)break;y=y.return}0<b.length&&(f=new h(f,v,null,n,c),d.push({event:f,listeners:b}))}}if((t&7)===0){e:{if(f=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",f&&n!==np&&(v=n.relatedTarget||n.fromElement)&&(Qa(v)||v[Nl]))break e;if((h||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,h?(v=n.relatedTarget||n.toElement,h=u,v=v?Qa(v):null,v!==null&&(S=es(v),b=v.tag,v!==S||b!==5&&b!==27&&b!==6)&&(v=null)):(h=null,v=u),h!==v)){if(b=dy,g="onMouseLeave",p="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(b=my,g="onPointerLeave",p="onPointerEnter",y="pointer"),S=h==null?f:Tr(h),m=v==null?f:Tr(v),f=new b(g,y+"leave",h,n,c),f.target=S,f.relatedTarget=m,g=null,Qa(c)===u&&(b=new b(p,y+"enter",v,n,c),b.target=m,b.relatedTarget=S,g=b),S=g,h&&v)t:{for(b=cC,p=h,y=v,m=0,g=p;g;g=b(g))m++;g=0;for(var x=y;x;x=b(x))g++;for(;0<m-g;)p=b(p),m--;for(;0<g-m;)y=b(y),g--;for(;m--;){if(p===y||y!==null&&p===y.alternate){b=p;break t}p=b(p),y=b(y)}b=null}else b=null;h!==null&&l0(d,f,h,b,!1),v!==null&&S!==null&&l0(d,S,v,b,!0)}}e:{if(f=u?Tr(u):window,h=f.nodeName&&f.nodeName.toLowerCase(),h==="select"||h==="input"&&f.type==="file")var _=vy;else if(yy(f))if(tv)_=EN;else{_=xN;var E=SN}else h=f.nodeName,!h||h.toLowerCase()!=="input"||f.type!=="checkbox"&&f.type!=="radio"?u&&qp(u.elementType)&&(_=vy):_=_N;if(_&&(_=_(e,u))){ev(d,_,n,c);break e}E&&E(e,f,u),e==="focusout"&&u&&f.type==="number"&&u.memoizedProps.value!=null&&tp(f,"number",f.value)}switch(E=u?Tr(u):window,e){case"focusin":(yy(E)||E.contentEditable==="true")&&(el=E,ip=u,Mr=null);break;case"focusout":Mr=ip=el=null;break;case"mousedown":ap=!0;break;case"contextmenu":case"mouseup":case"dragend":ap=!1,_y(d,n,c);break;case"selectionchange":if(NN)break;case"keydown":case"keyup":_y(d,n,c)}var w;if(Fp)e:{switch(e){case"compositionstart":var C="onCompositionStart";break e;case"compositionend":C="onCompositionEnd";break e;case"compositionupdate":C="onCompositionUpdate";break e}C=void 0}else Ja?W0(e,n)&&(C="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(C="onCompositionStart");C&&(Q0&&n.locale!=="ko"&&(Ja||C!=="onCompositionStart"?C==="onCompositionEnd"&&Ja&&(w=K0()):(Si=c,jp="value"in Si?Si.value:Si.textContent,Ja=!0)),E=sc(u,C),0<E.length&&(C=new py(C,e,null,n,c),d.push({event:C,listeners:E}),w?C.data=w:(w=J0(n),w!==null&&(C.data=w)))),(w=hN?gN(e,n):yN(e,n))&&(C=sc(u,"onBeforeInput"),0<C.length&&(E=new py("onBeforeInput","beforeinput",null,n,c),d.push({event:E,listeners:C}),E.data=w)),sC(d,e,u,n,c)}Fb(d,t)})}function Kr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function sc(e,t){for(var n=t+"Capture",o=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=Ir(e,n),i!=null&&o.unshift(Kr(e,i,a)),i=Ir(e,t),i!=null&&o.push(Kr(e,i,a))),e.tag===3)return o;e=e.return}return[]}function cC(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function l0(e,t,n,o,i){for(var a=t._reactName,l=[];n!==null&&n!==o;){var r=n,s=r.alternate,u=r.stateNode;if(r=r.tag,s!==null&&s===o)break;r!==5&&r!==26&&r!==27||u===null||(s=u,i?(u=Ir(n,a),u!=null&&l.unshift(Kr(n,u,s))):i||(u=Ir(n,a),u!=null&&l.push(Kr(n,u,s)))),n=n.return}l.length!==0&&e.push({event:t,listeners:l})}var fC=/\r\n?/g,dC=/\u0000|\uFFFD/g;function r0(e){return(typeof e=="string"?e:""+e).replace(fC,`
|
|
9
|
-
`).replace(dC,"")}function Qb(e,t){return t=r0(t),r0(e)===t}function Pe(e,t,n,o,i,a){switch(n){case"children":typeof o=="string"?t==="body"||t==="textarea"&&o===""||gl(e,o):(typeof o=="number"||typeof o=="bigint")&&t!=="body"&&gl(e,""+o);break;case"className":fu(e,"class",o);break;case"tabIndex":fu(e,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":fu(e,n,o);break;case"style":$0(e,o,a);break;case"data":if(t!=="object"){fu(e,"data",o);break}case"src":case"href":if(o===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(n);break}o=Cu(""+o),e.setAttribute(n,o);break;case"action":case"formAction":if(typeof o=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof a=="function"&&(n==="formAction"?(t!=="input"&&Pe(e,t,"name",i.name,i,null),Pe(e,t,"formEncType",i.formEncType,i,null),Pe(e,t,"formMethod",i.formMethod,i,null),Pe(e,t,"formTarget",i.formTarget,i,null)):(Pe(e,t,"encType",i.encType,i,null),Pe(e,t,"method",i.method,i,null),Pe(e,t,"target",i.target,i,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(n);break}o=Cu(""+o),e.setAttribute(n,o);break;case"onClick":o!=null&&(e.onclick=Uo);break;case"onScroll":o!=null&&xe("scroll",e);break;case"onScrollEnd":o!=null&&xe("scrollend",e);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(U(61));if(n=o.__html,n!=null){if(i.children!=null)throw Error(U(60));e.innerHTML=n}}break;case"multiple":e.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":e.muted=o&&typeof o!="function"&&typeof o!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(o==null||typeof o=="function"||typeof o=="boolean"||typeof o=="symbol"){e.removeAttribute("xlink:href");break}n=Cu(""+o),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(n,""+o):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":o&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":o===!0?e.setAttribute(n,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(n,o):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?e.setAttribute(n,o):e.removeAttribute(n);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?e.removeAttribute(n):e.setAttribute(n,o);break;case"popover":xe("beforetoggle",e),xe("toggle",e),Nu(e,"popover",o);break;case"xlinkActuate":Oo(e,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":Oo(e,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":Oo(e,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":Oo(e,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":Oo(e,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":Oo(e,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":Oo(e,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":Oo(e,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":Oo(e,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":Nu(e,"is",o);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=V2.get(n)||n,Nu(e,n,o))}}function Mp(e,t,n,o,i,a){switch(n){case"style":$0(e,o,a);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(U(61));if(n=o.__html,n!=null){if(i.children!=null)throw Error(U(60));e.innerHTML=n}}break;case"children":typeof o=="string"?gl(e,o):(typeof o=="number"||typeof o=="bigint")&&gl(e,""+o);break;case"onScroll":o!=null&&xe("scroll",e);break;case"onScrollEnd":o!=null&&xe("scrollend",e);break;case"onClick":o!=null&&(e.onclick=Uo);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!V0.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(i=n.endsWith("Capture"),t=n.slice(2,i?n.length-7:void 0),a=e[ln]||null,a=a!=null?a[n]:null,typeof a=="function"&&e.removeEventListener(t,a,i),typeof o=="function")){typeof a!="function"&&a!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,o,i);break e}n in e?e[n]=o:o===!0?e.setAttribute(n,""):Nu(e,n,o)}}}function zt(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":xe("error",e),xe("load",e);var o=!1,i=!1,a;for(a in n)if(n.hasOwnProperty(a)){var l=n[a];if(l!=null)switch(a){case"src":o=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(U(137,t));default:Pe(e,t,a,l,n,null)}}i&&Pe(e,t,"srcSet",n.srcSet,n,null),o&&Pe(e,t,"src",n.src,n,null);return;case"input":xe("invalid",e);var r=a=l=i=null,s=null,u=null;for(o in n)if(n.hasOwnProperty(o)){var c=n[o];if(c!=null)switch(o){case"name":i=c;break;case"type":l=c;break;case"checked":s=c;break;case"defaultChecked":u=c;break;case"value":a=c;break;case"defaultValue":r=c;break;case"children":case"dangerouslySetInnerHTML":if(c!=null)throw Error(U(137,t));break;default:Pe(e,t,o,c,n,null)}}q0(e,a,r,s,u,l,i,!1);return;case"select":xe("invalid",e),o=l=a=null;for(i in n)if(n.hasOwnProperty(i)&&(r=n[i],r!=null))switch(i){case"value":a=r;break;case"defaultValue":l=r;break;case"multiple":o=r;default:Pe(e,t,i,r,n,null)}t=a,n=l,e.multiple=!!o,t!=null?sl(e,!!o,t,!1):n!=null&&sl(e,!!o,n,!0);return;case"textarea":xe("invalid",e),a=i=o=null;for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case"value":o=r;break;case"defaultValue":i=r;break;case"children":a=r;break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(U(91));break;default:Pe(e,t,l,r,n,null)}j0(e,o,i,a);return;case"option":for(s in n)n.hasOwnProperty(s)&&(o=n[s],o!=null)&&(s==="selected"?e.selected=o&&typeof o!="function"&&typeof o!="symbol":Pe(e,t,s,o,n,null));return;case"dialog":xe("beforetoggle",e),xe("toggle",e),xe("cancel",e),xe("close",e);break;case"iframe":case"object":xe("load",e);break;case"video":case"audio":for(o=0;o<Fr.length;o++)xe(Fr[o],e);break;case"image":xe("error",e),xe("load",e);break;case"details":xe("toggle",e);break;case"embed":case"source":case"link":xe("error",e),xe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(u in n)if(n.hasOwnProperty(u)&&(o=n[u],o!=null))switch(u){case"children":case"dangerouslySetInnerHTML":throw Error(U(137,t));default:Pe(e,t,u,o,n,null)}return;default:if(qp(t)){for(c in n)n.hasOwnProperty(c)&&(o=n[c],o!==void 0&&Mp(e,t,c,o,n,void 0));return}}for(r in n)n.hasOwnProperty(r)&&(o=n[r],o!=null&&Pe(e,t,r,o,n,null))}function pC(e,t,n,o){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var i=null,a=null,l=null,r=null,s=null,u=null,c=null;for(h in n){var d=n[h];if(n.hasOwnProperty(h)&&d!=null)switch(h){case"checked":break;case"value":break;case"defaultValue":s=d;default:o.hasOwnProperty(h)||Pe(e,t,h,null,o,d)}}for(var f in o){var h=o[f];if(d=n[f],o.hasOwnProperty(f)&&(h!=null||d!=null))switch(f){case"type":a=h;break;case"name":i=h;break;case"checked":u=h;break;case"defaultChecked":c=h;break;case"value":l=h;break;case"defaultValue":r=h;break;case"children":case"dangerouslySetInnerHTML":if(h!=null)throw Error(U(137,t));break;default:h!==d&&Pe(e,t,f,h,o,d)}}ep(e,l,r,s,u,c,a,i);return;case"select":h=l=r=f=null;for(a in n)if(s=n[a],n.hasOwnProperty(a)&&s!=null)switch(a){case"value":break;case"multiple":h=s;default:o.hasOwnProperty(a)||Pe(e,t,a,null,o,s)}for(i in o)if(a=o[i],s=n[i],o.hasOwnProperty(i)&&(a!=null||s!=null))switch(i){case"value":f=a;break;case"defaultValue":r=a;break;case"multiple":l=a;default:a!==s&&Pe(e,t,i,a,o,s)}t=r,n=l,o=h,f!=null?sl(e,!!n,f,!1):!!o!=!!n&&(t!=null?sl(e,!!n,t,!0):sl(e,!!n,n?[]:"",!1));return;case"textarea":h=f=null;for(r in n)if(i=n[r],n.hasOwnProperty(r)&&i!=null&&!o.hasOwnProperty(r))switch(r){case"value":break;case"children":break;default:Pe(e,t,r,null,o,i)}for(l in o)if(i=o[l],a=n[l],o.hasOwnProperty(l)&&(i!=null||a!=null))switch(l){case"value":f=i;break;case"defaultValue":h=i;break;case"children":break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(U(91));break;default:i!==a&&Pe(e,t,l,i,o,a)}Z0(e,f,h);return;case"option":for(var v in n)f=n[v],n.hasOwnProperty(v)&&f!=null&&!o.hasOwnProperty(v)&&(v==="selected"?e.selected=!1:Pe(e,t,v,null,o,f));for(s in o)f=o[s],h=n[s],o.hasOwnProperty(s)&&f!==h&&(f!=null||h!=null)&&(s==="selected"?e.selected=f&&typeof f!="function"&&typeof f!="symbol":Pe(e,t,s,f,o,h));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var b in n)f=n[b],n.hasOwnProperty(b)&&f!=null&&!o.hasOwnProperty(b)&&Pe(e,t,b,null,o,f);for(u in o)if(f=o[u],h=n[u],o.hasOwnProperty(u)&&f!==h&&(f!=null||h!=null))switch(u){case"children":case"dangerouslySetInnerHTML":if(f!=null)throw Error(U(137,t));break;default:Pe(e,t,u,f,o,h)}return;default:if(qp(t)){for(var S in n)f=n[S],n.hasOwnProperty(S)&&f!==void 0&&!o.hasOwnProperty(S)&&Mp(e,t,S,void 0,o,f);for(c in o)f=o[c],h=n[c],!o.hasOwnProperty(c)||f===h||f===void 0&&h===void 0||Mp(e,t,c,f,o,h);return}}for(var p in n)f=n[p],n.hasOwnProperty(p)&&f!=null&&!o.hasOwnProperty(p)&&Pe(e,t,p,null,o,f);for(d in o)f=o[d],h=n[d],!o.hasOwnProperty(d)||f===h||f==null&&h==null||Pe(e,t,d,f,o,h)}function s0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function mC(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),o=0;o<n.length;o++){var i=n[o],a=i.transferSize,l=i.initiatorType,r=i.duration;if(a&&r&&s0(l)){for(l=0,r=i.responseEnd,o+=1;o<n.length;o++){var s=n[o],u=s.startTime;if(u>r)break;var c=s.transferSize,d=s.initiatorType;c&&s0(d)&&(s=s.responseEnd,l+=c*(s<r?1:(r-u)/(s-u)))}if(--o,t+=8*(a+l)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Dp=null,Rp=null;function uc(e){return e.nodeType===9?e:e.ownerDocument}function u0(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Wb(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Op(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Vd=null;function hC(){var e=window.event;return e&&e.type==="popstate"?e===Vd?!1:(Vd=e,!0):(Vd=null,!1)}var Jb=typeof setTimeout=="function"?setTimeout:void 0,gC=typeof clearTimeout=="function"?clearTimeout:void 0,c0=typeof Promise=="function"?Promise:void 0,yC=typeof queueMicrotask=="function"?queueMicrotask:typeof c0<"u"?function(e){return c0.resolve(null).then(e).catch(vC)}:Jb;function vC(e){setTimeout(function(){throw e})}function ki(e){return e==="head"}function f0(e,t){var n=t,o=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"||n==="/&"){if(o===0){e.removeChild(i),Tl(t);return}o--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")o++;else if(n==="html")Gr(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,Gr(n);for(var a=n.firstChild;a;){var l=a.nextSibling,r=a.nodeName;a[is]||r==="SCRIPT"||r==="STYLE"||r==="LINK"&&a.rel.toLowerCase()==="stylesheet"||n.removeChild(a),a=l}}else n==="body"&&Gr(e.ownerDocument.body);n=i}while(n);Tl(t)}function d0(e,t){var n=e;e=0;do{var o=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=o}while(n)}function zp(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":zp(n),Xp(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function bC(e,t,n,o){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!o&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(o){if(!e[is])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(a=e.getAttribute("rel"),a==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(a!==i.rel||e.getAttribute("href")!==(i.href==null||i.href===""?null:i.href)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute("title")!==(i.title==null?null:i.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(a=e.getAttribute("src"),(a!==(i.src==null?null:i.src)||e.getAttribute("type")!==(i.type==null?null:i.type)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var a=i.name==null?null:""+i.name;if(i.type==="hidden"&&e.getAttribute("name")===a)return e}else return e;if(e=Vn(e.nextSibling),e===null)break}return null}function SC(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Vn(e.nextSibling),e===null))return null;return e}function e1(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Vn(e.nextSibling),e===null))return null;return e}function Lp(e){return e.data==="$?"||e.data==="$~"}function Bp(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function xC(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var o=function(){t(),n.removeEventListener("DOMContentLoaded",o)};n.addEventListener("DOMContentLoaded",o),e._reactRetry=o}}function Vn(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==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Hp=null;function p0(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return Vn(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function m0(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function t1(e,t,n){switch(t=uc(n),e){case"html":if(e=t.documentElement,!e)throw Error(U(452));return e;case"head":if(e=t.head,!e)throw Error(U(453));return e;case"body":if(e=t.body,!e)throw Error(U(454));return e;default:throw Error(U(451))}}function Gr(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Xp(e)}var Yn=new Map,h0=new Set;function cc(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ko=De.d;De.d={f:_C,r:EC,D:TC,C:NC,L:CC,m:wC,X:MC,S:AC,M:DC};function _C(){var e=Ko.f(),t=wc();return e||t}function EC(e){var t=Cl(e);t!==null&&t.tag===5&&t.type==="form"?$v(t):Ko.r(e)}var Dl=typeof document>"u"?null:document;function n1(e,t,n){var o=Dl;if(o&&typeof t=="string"&&t){var i=kn(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof n=="string"&&(i+='[crossorigin="'+n+'"]'),h0.has(i)||(h0.add(i),e={rel:e,crossOrigin:n,href:t},o.querySelector(i)===null&&(t=o.createElement("link"),zt(t,"link",e),Tt(t),o.head.appendChild(t)))}}function TC(e){Ko.D(e),n1("dns-prefetch",e,null)}function NC(e,t){Ko.C(e,t),n1("preconnect",e,t)}function CC(e,t,n){Ko.L(e,t,n);var o=Dl;if(o&&e&&t){var i='link[rel="preload"][as="'+kn(t)+'"]';t==="image"&&n&&n.imageSrcSet?(i+='[imagesrcset="'+kn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(i+='[imagesizes="'+kn(n.imageSizes)+'"]')):i+='[href="'+kn(e)+'"]';var a=i;switch(t){case"style":a=El(e);break;case"script":a=Rl(e)}Yn.has(a)||(e=Ze({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Yn.set(a,e),o.querySelector(i)!==null||t==="style"&&o.querySelector(cs(a))||t==="script"&&o.querySelector(fs(a))||(t=o.createElement("link"),zt(t,"link",e),Tt(t),o.head.appendChild(t)))}}function wC(e,t){Ko.m(e,t);var n=Dl;if(n&&e){var o=t&&typeof t.as=="string"?t.as:"script",i='link[rel="modulepreload"][as="'+kn(o)+'"][href="'+kn(e)+'"]',a=i;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":a=Rl(e)}if(!Yn.has(a)&&(e=Ze({rel:"modulepreload",href:e},t),Yn.set(a,e),n.querySelector(i)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(fs(a)))return}o=n.createElement("link"),zt(o,"link",e),Tt(o),n.head.appendChild(o)}}}function AC(e,t,n){Ko.S(e,t,n);var o=Dl;if(o&&e){var i=rl(o).hoistableStyles,a=El(e);t=t||"default";var l=i.get(a);if(!l){var r={loading:0,preload:null};if(l=o.querySelector(cs(a)))r.loading=5;else{e=Ze({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Yn.get(a))&&Mm(e,n);var s=l=o.createElement("link");Tt(s),zt(s,"link",e),s._p=new Promise(function(u,c){s.onload=u,s.onerror=c}),s.addEventListener("load",function(){r.loading|=1}),s.addEventListener("error",function(){r.loading|=2}),r.loading|=4,Hu(l,t,o)}l={type:"stylesheet",instance:l,count:1,state:r},i.set(a,l)}}}function MC(e,t){Ko.X(e,t);var n=Dl;if(n&&e){var o=rl(n).hoistableScripts,i=Rl(e),a=o.get(i);a||(a=n.querySelector(fs(i)),a||(e=Ze({src:e,async:!0},t),(t=Yn.get(i))&&Dm(e,t),a=n.createElement("script"),Tt(a),zt(a,"link",e),n.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},o.set(i,a))}}function DC(e,t){Ko.M(e,t);var n=Dl;if(n&&e){var o=rl(n).hoistableScripts,i=Rl(e),a=o.get(i);a||(a=n.querySelector(fs(i)),a||(e=Ze({src:e,async:!0,type:"module"},t),(t=Yn.get(i))&&Dm(e,t),a=n.createElement("script"),Tt(a),zt(a,"link",e),n.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},o.set(i,a))}}function g0(e,t,n,o){var i=(i=Ti.current)?cc(i):null;if(!i)throw Error(U(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=El(n.href),n=rl(i).hoistableStyles,o=n.get(t),o||(o={type:"style",instance:null,count:0,state:null},n.set(t,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=El(n.href);var a=rl(i).hoistableStyles,l=a.get(e);if(l||(i=i.ownerDocument||i,l={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},a.set(e,l),(a=i.querySelector(cs(e)))&&!a._p&&(l.instance=a,l.state.loading=5),Yn.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Yn.set(e,n),a||RC(i,e,n,l.state))),t&&o===null)throw Error(U(528,""));return l}if(t&&o!==null)throw Error(U(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Rl(n),n=rl(i).hoistableScripts,o=n.get(t),o||(o={type:"script",instance:null,count:0,state:null},n.set(t,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(U(444,e))}}function El(e){return'href="'+kn(e)+'"'}function cs(e){return'link[rel="stylesheet"]['+e+"]"}function o1(e){return Ze({},e,{"data-precedence":e.precedence,precedence:null})}function RC(e,t,n,o){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?o.loading=1:(t=e.createElement("link"),o.preload=t,t.addEventListener("load",function(){return o.loading|=1}),t.addEventListener("error",function(){return o.loading|=2}),zt(t,"link",n),Tt(t),e.head.appendChild(t))}function Rl(e){return'[src="'+kn(e)+'"]'}function fs(e){return"script[async]"+e}function y0(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var o=e.querySelector('style[data-href~="'+kn(n.href)+'"]');if(o)return t.instance=o,Tt(o),o;var i=Ze({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return o=(e.ownerDocument||e).createElement("style"),Tt(o),zt(o,"style",i),Hu(o,n.precedence,e),t.instance=o;case"stylesheet":i=El(n.href);var a=e.querySelector(cs(i));if(a)return t.state.loading|=4,t.instance=a,Tt(a),a;o=o1(n),(i=Yn.get(i))&&Mm(o,i),a=(e.ownerDocument||e).createElement("link"),Tt(a);var l=a;return l._p=new Promise(function(r,s){l.onload=r,l.onerror=s}),zt(a,"link",o),t.state.loading|=4,Hu(a,n.precedence,e),t.instance=a;case"script":return a=Rl(n.src),(i=e.querySelector(fs(a)))?(t.instance=i,Tt(i),i):(o=n,(i=Yn.get(a))&&(o=Ze({},n),Dm(o,i)),e=e.ownerDocument||e,i=e.createElement("script"),Tt(i),zt(i,"link",o),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(U(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(o=t.instance,t.state.loading|=4,Hu(o,n.precedence,e));return t.instance}function Hu(e,t,n){for(var o=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=o.length?o[o.length-1]:null,a=i,l=0;l<o.length;l++){var r=o[l];if(r.dataset.precedence===t)a=r;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Mm(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Dm(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Pu=null;function v0(e,t,n){if(Pu===null){var o=new Map,i=Pu=new Map;i.set(n,o)}else i=Pu,o=i.get(n),o||(o=new Map,i.set(n,o));if(o.has(e))return o;for(o.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[is]||a[Dt]||e==="link"&&a.getAttribute("rel")==="stylesheet")&&a.namespaceURI!=="http://www.w3.org/2000/svg"){var l=a.getAttribute(t)||"";l=e+l;var r=o.get(l);r?r.push(a):o.set(l,[a])}}return o}function b0(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function OC(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function i1(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function zC(e,t,n,o){if(n.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var i=El(o.href),a=t.querySelector(cs(i));if(a){t=a._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=fc.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Tt(a);return}a=t.ownerDocument||t,o=o1(o),(i=Yn.get(i))&&Mm(o,i),a=a.createElement("link"),Tt(a);var l=a;l._p=new Promise(function(r,s){l.onload=r,l.onerror=s}),zt(a,"link",o),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=fc.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Yd=0;function LC(e,t){return e.stylesheets&&e.count===0&&ku(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var o=setTimeout(function(){if(e.stylesheets&&ku(e,e.stylesheets),e.unsuspend){var a=e.unsuspend;e.unsuspend=null,a()}},6e4+t);0<e.imgBytes&&Yd===0&&(Yd=62500*mC());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ku(e,e.stylesheets),e.unsuspend)){var a=e.unsuspend;e.unsuspend=null,a()}},(e.imgBytes>Yd?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(o),clearTimeout(i)}}:null}function fc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ku(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var dc=null;function ku(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,dc=new Map,t.forEach(BC,e),dc=null,fc.call(e))}function BC(e,t){if(!(t.state.loading&4)){var n=dc.get(e);if(n)var o=n.get(null);else{n=new Map,dc.set(e,n);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),a=0;a<i.length;a++){var l=i[a];(l.nodeName==="LINK"||l.getAttribute("media")!=="not all")&&(n.set(l.dataset.precedence,l),o=l)}o&&n.set(null,o)}i=t.instance,l=i.getAttribute("data-precedence"),a=n.get(l)||o,a===o&&n.set(null,i),n.set(l,i),this.count++,o=fc.bind(this),i.addEventListener("load",o),i.addEventListener("error",o),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Qr={$$typeof:Go,Provider:null,Consumer:null,_currentValue:ea,_currentValue2:ea,_threadCount:0};function HC(e,t,n,o,i,a,l,r,s){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=hd(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=hd(0),this.hiddenUpdates=hd(null),this.identifierPrefix=o,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=l,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=s,this.incompleteTransitions=new Map}function a1(e,t,n,o,i,a,l,r,s,u,c,d){return e=new HC(e,t,n,l,s,u,c,d,r),t=1,a===!0&&(t|=24),a=yn(3,null,null,t),e.current=a,a.stateNode=e,t=nm(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:o,isDehydrated:n,cache:t},am(a),e}function l1(e){return e?(e=ol,e):ol}function r1(e,t,n,o,i,a){i=l1(i),o.context===null?o.context=i:o.pendingContext=i,o=Ci(t),o.payload={element:n},a=a===void 0?null:a,a!==null&&(o.callback=a),n=wi(e,o,t),n!==null&&(an(n,e,t),Rr(n,e,t))}function S0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Rm(e,t){S0(e,t),(e=e.alternate)&&S0(e,t)}function s1(e){if(e.tag===13||e.tag===31){var t=pa(e,67108864);t!==null&&an(t,e,67108864),Rm(e,67108864)}}function x0(e){if(e.tag===13||e.tag===31){var t=_n();t=Vp(t);var n=pa(e,t);n!==null&&an(n,e,t),Rm(e,t)}}var pc=!0;function PC(e,t,n,o){var i=ce.T;ce.T=null;var a=De.p;try{De.p=2,Om(e,t,n,o)}finally{De.p=a,ce.T=i}}function kC(e,t,n,o){var i=ce.T;ce.T=null;var a=De.p;try{De.p=8,Om(e,t,n,o)}finally{De.p=a,ce.T=i}}function Om(e,t,n,o){if(pc){var i=Pp(o);if(i===null)Id(e,t,o,mc,n),_0(e,o);else if(UC(i,e,t,n,o))o.stopPropagation();else if(_0(e,o),t&4&&-1<GC.indexOf(e)){for(;i!==null;){var a=Cl(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var l=Qi(a.pendingLanes);if(l!==0){var r=a;for(r.pendingLanes|=2,r.entangledLanes|=2;l;){var s=1<<31-xn(l);r.entanglements[1]|=s,l&=~s}go(a),(Me&6)===0&&(oc=bn()+500,us(0,!1))}}break;case 31:case 13:r=pa(a,2),r!==null&&an(r,a,2),wc(),Rm(a,2)}if(a=Pp(o),a===null&&Id(e,t,o,mc,n),a===i)break;i=a}i!==null&&o.stopPropagation()}else Id(e,t,o,null,n)}}function Pp(e){return e=Zp(e),zm(e)}var mc=null;function zm(e){if(mc=null,e=Qa(e),e!==null){var t=es(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=A0(t),e!==null)return e;e=null}else if(n===31){if(e=M0(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 mc=e,null}function u1(e){switch(e){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(C2()){case z0:return 2;case L0:return 8;case Yu:case w2:return 32;case B0:return 268435456;default:return 32}default:return 32}}var kp=!1,Di=null,Ri=null,Oi=null,Wr=new Map,Jr=new Map,vi=[],GC="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".split(" ");function _0(e,t){switch(e){case"focusin":case"focusout":Di=null;break;case"dragenter":case"dragleave":Ri=null;break;case"mouseover":case"mouseout":Oi=null;break;case"pointerover":case"pointerout":Wr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Jr.delete(t.pointerId)}}function Sr(e,t,n,o,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:o,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Cl(t),t!==null&&s1(t)),e):(e.eventSystemFlags|=o,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function UC(e,t,n,o,i){switch(t){case"focusin":return Di=Sr(Di,e,t,n,o,i),!0;case"dragenter":return Ri=Sr(Ri,e,t,n,o,i),!0;case"mouseover":return Oi=Sr(Oi,e,t,n,o,i),!0;case"pointerover":var a=i.pointerId;return Wr.set(a,Sr(Wr.get(a)||null,e,t,n,o,i)),!0;case"gotpointercapture":return a=i.pointerId,Jr.set(a,Sr(Jr.get(a)||null,e,t,n,o,i)),!0}return!1}function c1(e){var t=Qa(e.target);if(t!==null){var n=es(t);if(n!==null){if(t=n.tag,t===13){if(t=A0(n),t!==null){e.blockedOn=t,ay(e.priority,function(){x0(n)});return}}else if(t===31){if(t=M0(n),t!==null){e.blockedOn=t,ay(e.priority,function(){x0(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 Gu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Pp(e.nativeEvent);if(n===null){n=e.nativeEvent;var o=new n.constructor(n.type,n);np=o,n.target.dispatchEvent(o),np=null}else return t=Cl(n),t!==null&&s1(t),e.blockedOn=n,!1;t.shift()}return!0}function E0(e,t,n){Gu(e)&&n.delete(t)}function IC(){kp=!1,Di!==null&&Gu(Di)&&(Di=null),Ri!==null&&Gu(Ri)&&(Ri=null),Oi!==null&&Gu(Oi)&&(Oi=null),Wr.forEach(E0),Jr.forEach(E0)}function Eu(e,t){e.blockedOn===t&&(e.blockedOn=null,kp||(kp=!0,gt.unstable_scheduleCallback(gt.unstable_NormalPriority,IC)))}var Tu=null;function T0(e){Tu!==e&&(Tu=e,gt.unstable_scheduleCallback(gt.unstable_NormalPriority,function(){Tu===e&&(Tu=null);for(var t=0;t<e.length;t+=3){var n=e[t],o=e[t+1],i=e[t+2];if(typeof o!="function"){if(zm(o||n)===null)continue;break}var a=Cl(n);a!==null&&(e.splice(t,3),t-=3,vp(a,{pending:!0,data:i,method:n.method,action:o},o,i))}}))}function Tl(e){function t(s){return Eu(s,e)}Di!==null&&Eu(Di,e),Ri!==null&&Eu(Ri,e),Oi!==null&&Eu(Oi,e),Wr.forEach(t),Jr.forEach(t);for(var n=0;n<vi.length;n++){var o=vi[n];o.blockedOn===e&&(o.blockedOn=null)}for(;0<vi.length&&(n=vi[0],n.blockedOn===null);)c1(n),n.blockedOn===null&&vi.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(o=0;o<n.length;o+=3){var i=n[o],a=n[o+1],l=i[ln]||null;if(typeof a=="function")l||T0(n);else if(l){var r=null;if(a&&a.hasAttribute("formAction")){if(i=a,l=a[ln]||null)r=l.formAction;else if(zm(i)!==null)continue}else r=l.action;typeof r=="function"?n[o+1]=r:(n.splice(o,3),o-=3),T0(n)}}}function f1(){function e(a){a.canIntercept&&a.info==="react-transition"&&a.intercept({handler:function(){return new Promise(function(l){return i=l})},focusReset:"manual",scroll:"manual"})}function t(){i!==null&&(i(),i=null),o||setTimeout(n,20)}function n(){if(!o&&!navigation.transition){var a=navigation.currentEntry;a&&a.url!=null&&navigation.navigate(a.url,{state:a.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var o=!1,i=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){o=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),i!==null&&(i(),i=null)}}}function Lm(e){this._internalRoot=e}Dc.prototype.render=Lm.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(U(409));var n=t.current,o=_n();r1(n,o,e,t,null,null)};Dc.prototype.unmount=Lm.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;r1(e.current,2,null,e,null,null),wc(),t[Nl]=null}};function Dc(e){this._internalRoot=e}Dc.prototype.unstable_scheduleHydration=function(e){if(e){var t=U0();e={blockedOn:null,target:e,priority:t};for(var n=0;n<vi.length&&t!==0&&t<vi[n].priority;n++);vi.splice(n,0,e),n===0&&c1(e)}};var N0=C0.version;if(N0!=="19.2.4")throw Error(U(527,N0,"19.2.4"));De.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(U(188)):(e=Object.keys(e).join(","),Error(U(268,e)));return e=b2(t),e=e!==null?D0(e):null,e=e===null?null:e.stateNode,e};var VC={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:ce,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(xr=__REACT_DEVTOOLS_GLOBAL_HOOK__,!xr.isDisabled&&xr.supportsFiber))try{ts=xr.inject(VC),Sn=xr}catch{}var xr;Rc.createRoot=function(e,t){if(!w0(e))throw Error(U(299));var n=!1,o="",i=nb,a=ob,l=ib;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(o=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(a=t.onCaughtError),t.onRecoverableError!==void 0&&(l=t.onRecoverableError)),t=a1(e,1,!1,null,null,n,o,null,i,a,l,f1),e[Nl]=t.current,Am(e),new Lm(t)};Rc.hydrateRoot=function(e,t,n){if(!w0(e))throw Error(U(299));var o=!1,i="",a=nb,l=ob,r=ib,s=null;return n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onUncaughtError!==void 0&&(a=n.onUncaughtError),n.onCaughtError!==void 0&&(l=n.onCaughtError),n.onRecoverableError!==void 0&&(r=n.onRecoverableError),n.formState!==void 0&&(s=n.formState)),t=a1(e,1,!0,t,n??null,o,i,s,a,l,r,f1),t.context=l1(null),n=t.current,o=_n(),o=Vp(o),i=Ci(o),i.callback=null,wi(n,i,o),n=o,t.current.lanes=n,os(t,n),go(t),e[Nl]=t.current,Am(e),new Dc(t)};Rc.version="19.2.4"});var h1=Jt((Pz,m1)=>{"use strict";function p1(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(p1)}catch(e){console.error(e)}}p1(),m1.exports=d1()});var w1=Jt(Pc=>{"use strict";var ZC=Symbol.for("react.transitional.element"),jC=Symbol.for("react.fragment");function C1(e,t,n){var o=null;if(n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),"key"in t){n={};for(var i in t)i!=="key"&&(n[i]=t[i])}else n=t;return t=n.ref,{$$typeof:ZC,type:e,key:o,ref:t!==void 0?t:null,props:n}}Pc.Fragment=jC;Pc.jsx=C1;Pc.jsxs=C1});var ve=Jt((Vz,A1)=>{"use strict";A1.exports=w1()});var f_=Jt(c_=>{"use strict";var Ql=At();function VM(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var YM=typeof Object.is=="function"?Object.is:VM,XM=Ql.useState,qM=Ql.useEffect,ZM=Ql.useLayoutEffect,jM=Ql.useDebugValue;function $M(e,t){var n=t(),o=XM({inst:{value:n,getSnapshot:t}}),i=o[0].inst,a=o[1];return ZM(function(){i.value=n,i.getSnapshot=t,Th(i)&&a({inst:i})},[e,n,t]),qM(function(){return Th(i)&&a({inst:i}),e(function(){Th(i)&&a({inst:i})})},[e]),jM(n),n}function Th(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!YM(e,n)}catch{return!0}}function FM(e,t){return t()}var KM=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?FM:$M;c_.useSyncExternalStore=Ql.useSyncExternalStore!==void 0?Ql.useSyncExternalStore:KM});var p_=Jt((BH,d_)=>{"use strict";d_.exports=f_()});var h_=Jt(m_=>{"use strict";var Mf=At(),QM=p_();function WM(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var JM=typeof Object.is=="function"?Object.is:WM,eD=QM.useSyncExternalStore,tD=Mf.useRef,nD=Mf.useEffect,oD=Mf.useMemo,iD=Mf.useDebugValue;m_.useSyncExternalStoreWithSelector=function(e,t,n,o,i){var a=tD(null);if(a.current===null){var l={hasValue:!1,value:null};a.current=l}else l=a.current;a=oD(function(){function s(h){if(!u){if(u=!0,c=h,h=o(h),i!==void 0&&l.hasValue){var v=l.value;if(i(v,h))return d=v}return d=h}if(v=d,JM(c,h))return v;var b=o(h);return i!==void 0&&i(v,b)?(c=h,v):(c=h,d=b)}var u=!1,c,d,f=n===void 0?null:n;return[function(){return s(t())},f===null?void 0:function(){return s(f())}]},[t,n,o,i]);var r=eD(e,a[0],a[1]);return nD(function(){l.hasValue=!0,l.value=r},[r]),iD(r),r}});var y_=Jt((PH,g_)=>{"use strict";g_.exports=h_()});var Ha=oe(At(),1),OT=oe(h1(),1);var YC={PipeLLM:!0,PipeExtract:!0,PipeCompose:!0,PipeImgGen:!0,PipeSearch:!0,PipeFunc:!0,PipeSignature:!0,PipeSequence:!0,PipeParallel:!0,PipeCondition:!0,PipeBatch:!0},g1=new Set(Object.keys(YC)),Ol="pipeCard",y1="default",v1="controllerGroup",Bm="stuff_";function Gi(e){return Bm+e}function zl(e){return e.startsWith(Bm)}function ds(e){return e.slice(Bm.length)}var Nn={TB:"TB",BT:"BT",LR:"LR",RL:"RL"},Oc={DEFAULT:"default",STEP:"step",STRAIGHT:"straight",SMOOTH_STEP:"smoothstep"},to={FOLDED:"folded",EXPANDED:"expanded",AUTO:"auto"},ha={DARK:"dark",LIGHT:"light"},yt={DARK:"dark",LIGHT:"light",SYSTEM:"system"},sn={TOP_LEFT:"top-left",TOP_CENTER:"top-center",TOP_RIGHT:"top-right",BOTTOM_LEFT:"bottom-left",BOTTOM_CENTER:"bottom-center",BOTTOM_RIGHT:"bottom-right",CENTER_LEFT:"center-left",CENTER_RIGHT:"center-right"};function b1(e){return e===sn.CENTER_LEFT||e===sn.CENTER_RIGHT?"vertical":"horizontal"}function S1(e){switch(e){case sn.TOP_LEFT:case sn.CENTER_LEFT:case sn.BOTTOM_LEFT:return"left";case sn.TOP_RIGHT:case sn.CENTER_RIGHT:case sn.BOTTOM_RIGHT:return"right";case sn.TOP_CENTER:case sn.BOTTOM_CENTER:return"center";default:return e}}var zc=40,Lc=48,Bc=20,ga="arrowclosed";function x1(e){let t=e.style?.width;if(t==null)return 200;let n=typeof t=="number"?t:parseFloat(t);return isNaN(n)||n<=0?200:n}function _1(e){let t=e.style?.height;if(t!=null){let n=typeof t=="number"?t:parseFloat(t);if(!isNaN(n)&&n>0)return n}return e.data?.isStuff?60:70}var ps=class extends Error{constructor(t,n){let o=t===""?"<root>":t;super(`GraphSpec validation failed at ${o}: ${n}`),this.name="GraphSpecValidationError",this.path=t}},E1=new Set(["succeeded","failed","running","scheduled","skipped","canceled"]),T1=new Set(["contains","data","control","selected_outcome","batch_item","batch_aggregate","parallel_combine"]);function Ui(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Cn(e){return e===null?"null":e===void 0?"undefined":Array.isArray(e)?"an array":`a ${typeof e}`}function vt(e,t){throw new ps(e,t)}function yo(e,t){return(typeof e!="string"||e.length===0)&&vt(t,`expected a non-empty string, got ${Cn(e)}`),e}function N1(e,t){Ui(e)||vt(t,`expected an object, got ${Cn(e)}`),yo(e.name,`${t}.name`)}function XC(e,t){Ui(e)||vt(t,`expected an object, got ${Cn(e)}`),yo(e.id,`${t}.id`),e.kind!=="controller"&&e.kind!=="operator"&&vt(`${t}.kind`,`expected "controller" or "operator" \u2014 a real pipelex run emits only pipe-call nodes, got ${JSON.stringify(e.kind)}`),(typeof e.status!="string"||!E1.has(e.status))&&vt(`${t}.status`,`expected one of ${[...E1].join(", ")}, got ${JSON.stringify(e.status)}`),yo(e.pipe_code,`${t}.pipe_code`);let n=yo(e.pipe_type,`${t}.pipe_type`);g1.has(n)||vt(`${t}.pipe_type`,`unrecognized pipe class "${n}" \u2014 add it to PipeOperatorType or PipeControllerType in types.ts`),yo(e.description,`${t}.description`),yo(e.domain_code,`${t}.domain_code`);let o=e.io;o===void 0&&(o={inputs:[],outputs:[]},e.io=o),Ui(o)||vt(`${t}.io`,`expected an object, got ${Cn(o)}`),o.inputs===void 0?o.inputs=[]:Array.isArray(o.inputs)||vt(`${t}.io.inputs`,`expected an array, got ${Cn(o.inputs)}`),o.outputs===void 0?o.outputs=[]:Array.isArray(o.outputs)||vt(`${t}.io.outputs`,`expected an array, got ${Cn(o.outputs)}`),o.inputs.forEach((i,a)=>N1(i,`${t}.io.inputs[${a}]`)),o.outputs.forEach((i,a)=>N1(i,`${t}.io.outputs[${a}]`))}function qC(e,t){Ui(e)||vt(t,`expected an object, got ${Cn(e)}`),yo(e.id,`${t}.id`),yo(e.source,`${t}.source`),yo(e.target,`${t}.target`),(typeof e.kind!="string"||!T1.has(e.kind))&&vt(`${t}.kind`,`expected one of ${[...T1].join(", ")}, got ${JSON.stringify(e.kind)}`)}function Hc(e){return Ui(e)||vt("",`expected a GraphSpec object, got ${Cn(e)}`),Array.isArray(e.nodes)||vt("nodes",`expected an array, got ${Cn(e.nodes)}`),Array.isArray(e.edges)||vt("edges",`expected an array, got ${Cn(e.edges)}`),Ui(e.meta)||vt("meta",`expected an object, got ${Cn(e.meta)}`),e.meta.format!=="mthds"&&vt("meta.format",`expected "mthds" (this does not look like pipelex GraphSpec JSON), got ${JSON.stringify(e.meta.format)}`),e.pipe_registry!==void 0&&!Ui(e.pipe_registry)&&vt("pipe_registry",`expected an object when present, got ${Cn(e.pipe_registry)}`),e.concept_registry!==void 0&&!Ui(e.concept_registry)&&vt("concept_registry",`expected an object when present, got ${Cn(e.concept_registry)}`),e.nodes.forEach((t,n)=>XC(t,`nodes[${n}]`)),e.edges.forEach((t,n)=>qC(t,`edges[${n}]`)),e}function Ll(e,t="node"){return e.kind!=="controller"&&e.kind!=="operator"&&vt(`${t}.kind`,`expected a pipe-call node ("controller" or "operator"), got ${JSON.stringify(e.kind)}`),yo(e.pipe_code,`${t}.pipe_code`),e}var fe=oe(At(),1);var B=oe(ve()),P=oe(At());function ot(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,o;n<e.length;n++)(o=ot(e[n]))!==""&&(t+=(t&&" ")+o);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var $C={value:()=>{}};function D1(){for(var e=0,t=arguments.length,n={},o;e<t;++e){if(!(o=arguments[e]+"")||o in n||/[\s.]/.test(o))throw new Error("illegal type: "+o);n[o]=[]}return new kc(n)}function kc(e){this._=e}function FC(e,t){return e.trim().split(/^|\s+/).map(function(n){var o="",i=n.indexOf(".");if(i>=0&&(o=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:o}})}kc.prototype=D1.prototype={constructor:kc,on:function(e,t){var n=this._,o=FC(e+"",n),i,a=-1,l=o.length;if(arguments.length<2){for(;++a<l;)if((i=(e=o[a]).type)&&(i=KC(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<l;)if(i=(e=o[a]).type)n[i]=M1(n[i],e.name,t);else if(t==null)for(i in n)n[i]=M1(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 kc(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),o=0,i,a;o<i;++o)n[o]=arguments[o+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],o=0,i=a.length;o<i;++o)a[o].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var o=this._[e],i=0,a=o.length;i<a;++i)o[i].value.apply(t,n)}};function KC(e,t){for(var n=0,o=e.length,i;n<o;++n)if((i=e[n]).name===t)return i.value}function M1(e,t,n){for(var o=0,i=e.length;o<i;++o)if(e[o].name===t){e[o]=$C,e=e.slice(0,o).concat(e.slice(o+1));break}return n!=null&&e.push({name:t,value:n}),e}var ya=D1;var Gc="http://www.w3.org/1999/xhtml",Hm={svg:"http://www.w3.org/2000/svg",xhtml:Gc,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Qo(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),Hm.hasOwnProperty(t)?{space:Hm[t],local:e}:e}function QC(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Gc&&t.documentElement.namespaceURI===Gc?t.createElement(e):t.createElementNS(n,e)}}function WC(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Uc(e){var t=Qo(e);return(t.local?WC:QC)(t)}function JC(){}function va(e){return e==null?JC:function(){return this.querySelector(e)}}function R1(e){typeof e!="function"&&(e=va(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var a=t[i],l=a.length,r=o[i]=new Array(l),s,u,c=0;c<l;++c)(s=a[c])&&(u=e.call(s,s.__data__,c,a))&&("__data__"in s&&(u.__data__=s.__data__),r[c]=u);return new it(o,this._parents)}function Pm(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function ew(){return[]}function ms(e){return e==null?ew:function(){return this.querySelectorAll(e)}}function tw(e){return function(){return Pm(e.apply(this,arguments))}}function O1(e){typeof e=="function"?e=tw(e):e=ms(e);for(var t=this._groups,n=t.length,o=[],i=[],a=0;a<n;++a)for(var l=t[a],r=l.length,s,u=0;u<r;++u)(s=l[u])&&(o.push(e.call(s,s.__data__,u,l)),i.push(s));return new it(o,i)}function hs(e){return function(){return this.matches(e)}}function Ic(e){return function(t){return t.matches(e)}}var nw=Array.prototype.find;function ow(e){return function(){return nw.call(this.children,e)}}function iw(){return this.firstElementChild}function z1(e){return this.select(e==null?iw:ow(typeof e=="function"?e:Ic(e)))}var aw=Array.prototype.filter;function lw(){return Array.from(this.children)}function rw(e){return function(){return aw.call(this.children,e)}}function L1(e){return this.selectAll(e==null?lw:rw(typeof e=="function"?e:Ic(e)))}function B1(e){typeof e!="function"&&(e=hs(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var a=t[i],l=a.length,r=o[i]=[],s,u=0;u<l;++u)(s=a[u])&&e.call(s,s.__data__,u,a)&&r.push(s);return new it(o,this._parents)}function Vc(e){return new Array(e.length)}function H1(){return new it(this._enter||this._groups.map(Vc),this._parents)}function gs(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}gs.prototype={constructor:gs,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 P1(e){return function(){return e}}function sw(e,t,n,o,i,a){for(var l=0,r,s=t.length,u=a.length;l<u;++l)(r=t[l])?(r.__data__=a[l],o[l]=r):n[l]=new gs(e,a[l]);for(;l<s;++l)(r=t[l])&&(i[l]=r)}function uw(e,t,n,o,i,a,l){var r,s,u=new Map,c=t.length,d=a.length,f=new Array(c),h;for(r=0;r<c;++r)(s=t[r])&&(f[r]=h=l.call(s,s.__data__,r,t)+"",u.has(h)?i[r]=s:u.set(h,s));for(r=0;r<d;++r)h=l.call(e,a[r],r,a)+"",(s=u.get(h))?(o[r]=s,s.__data__=a[r],u.delete(h)):n[r]=new gs(e,a[r]);for(r=0;r<c;++r)(s=t[r])&&u.get(f[r])===s&&(i[r]=s)}function cw(e){return e.__data__}function k1(e,t){if(!arguments.length)return Array.from(this,cw);var n=t?uw:sw,o=this._parents,i=this._groups;typeof e!="function"&&(e=P1(e));for(var a=i.length,l=new Array(a),r=new Array(a),s=new Array(a),u=0;u<a;++u){var c=o[u],d=i[u],f=d.length,h=fw(e.call(c,c&&c.__data__,u,o)),v=h.length,b=r[u]=new Array(v),S=l[u]=new Array(v),p=s[u]=new Array(f);n(c,d,b,S,p,h,t);for(var y=0,m=0,g,x;y<v;++y)if(g=b[y]){for(y>=m&&(m=y+1);!(x=S[m])&&++m<v;);g._next=x||null}}return l=new it(l,o),l._enter=r,l._exit=s,l}function fw(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function G1(){return new it(this._exit||this._groups.map(Vc),this._parents)}function U1(e,t,n){var o=this.enter(),i=this,a=this.exit();return typeof e=="function"?(o=e(o),o&&(o=o.selection())):o=o.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),n==null?a.remove():n(a),o&&i?o.merge(i).order():i}function I1(e){for(var t=e.selection?e.selection():e,n=this._groups,o=t._groups,i=n.length,a=o.length,l=Math.min(i,a),r=new Array(i),s=0;s<l;++s)for(var u=n[s],c=o[s],d=u.length,f=r[s]=new Array(d),h,v=0;v<d;++v)(h=u[v]||c[v])&&(f[v]=h);for(;s<i;++s)r[s]=n[s];return new it(r,this._parents)}function V1(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var o=e[t],i=o.length-1,a=o[i],l;--i>=0;)(l=o[i])&&(a&&l.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(l,a),a=l);return this}function Y1(e){e||(e=dw);function t(d,f){return d&&f?e(d.__data__,f.__data__):!d-!f}for(var n=this._groups,o=n.length,i=new Array(o),a=0;a<o;++a){for(var l=n[a],r=l.length,s=i[a]=new Array(r),u,c=0;c<r;++c)(u=l[c])&&(s[c]=u);s.sort(t)}return new it(i,this._parents).order()}function dw(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function X1(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function q1(){return Array.from(this)}function Z1(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],i=0,a=o.length;i<a;++i){var l=o[i];if(l)return l}return null}function j1(){let e=0;for(let t of this)++e;return e}function $1(){return!this.node()}function F1(e){for(var t=this._groups,n=0,o=t.length;n<o;++n)for(var i=t[n],a=0,l=i.length,r;a<l;++a)(r=i[a])&&e.call(r,r.__data__,a,i);return this}function pw(e){return function(){this.removeAttribute(e)}}function mw(e){return function(){this.removeAttributeNS(e.space,e.local)}}function hw(e,t){return function(){this.setAttribute(e,t)}}function gw(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function yw(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function vw(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 K1(e,t){var n=Qo(e);if(arguments.length<2){var o=this.node();return n.local?o.getAttributeNS(n.space,n.local):o.getAttribute(n)}return this.each((t==null?n.local?mw:pw:typeof t=="function"?n.local?vw:yw:n.local?gw:hw)(n,t))}function Yc(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function bw(e){return function(){this.style.removeProperty(e)}}function Sw(e,t,n){return function(){this.style.setProperty(e,t,n)}}function xw(e,t,n){return function(){var o=t.apply(this,arguments);o==null?this.style.removeProperty(e):this.style.setProperty(e,o,n)}}function Q1(e,t,n){return arguments.length>1?this.each((t==null?bw:typeof t=="function"?xw:Sw)(e,t,n??"")):Ii(this.node(),e)}function Ii(e,t){return e.style.getPropertyValue(t)||Yc(e).getComputedStyle(e,null).getPropertyValue(t)}function _w(e){return function(){delete this[e]}}function Ew(e,t){return function(){this[e]=t}}function Tw(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function W1(e,t){return arguments.length>1?this.each((t==null?_w:typeof t=="function"?Tw:Ew)(e,t)):this.node()[e]}function J1(e){return e.trim().split(/^|\s+/)}function km(e){return e.classList||new eS(e)}function eS(e){this._node=e,this._names=J1(e.getAttribute("class")||"")}eS.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 tS(e,t){for(var n=km(e),o=-1,i=t.length;++o<i;)n.add(t[o])}function nS(e,t){for(var n=km(e),o=-1,i=t.length;++o<i;)n.remove(t[o])}function Nw(e){return function(){tS(this,e)}}function Cw(e){return function(){nS(this,e)}}function ww(e,t){return function(){(t.apply(this,arguments)?tS:nS)(this,e)}}function oS(e,t){var n=J1(e+"");if(arguments.length<2){for(var o=km(this.node()),i=-1,a=n.length;++i<a;)if(!o.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?ww:t?Nw:Cw)(n,t))}function Aw(){this.textContent=""}function Mw(e){return function(){this.textContent=e}}function Dw(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function iS(e){return arguments.length?this.each(e==null?Aw:(typeof e=="function"?Dw:Mw)(e)):this.node().textContent}function Rw(){this.innerHTML=""}function Ow(e){return function(){this.innerHTML=e}}function zw(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function aS(e){return arguments.length?this.each(e==null?Rw:(typeof e=="function"?zw:Ow)(e)):this.node().innerHTML}function Lw(){this.nextSibling&&this.parentNode.appendChild(this)}function lS(){return this.each(Lw)}function Bw(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function rS(){return this.each(Bw)}function sS(e){var t=typeof e=="function"?e:Uc(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Hw(){return null}function uS(e,t){var n=typeof e=="function"?e:Uc(e),o=t==null?Hw:typeof t=="function"?t:va(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),o.apply(this,arguments)||null)})}function Pw(){var e=this.parentNode;e&&e.removeChild(this)}function cS(){return this.each(Pw)}function kw(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Gw(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function fS(e){return this.select(e?Gw:kw)}function dS(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Uw(e){return function(t){e.call(this,t,this.__data__)}}function Iw(e){return e.trim().split(/^|\s+/).map(function(t){var n="",o=t.indexOf(".");return o>=0&&(n=t.slice(o+1),t=t.slice(0,o)),{type:t,name:n}})}function Vw(e){return function(){var t=this.__on;if(t){for(var n=0,o=-1,i=t.length,a;n<i;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++o]=a;++o?t.length=o:delete this.__on}}}function Yw(e,t,n){return function(){var o=this.__on,i,a=Uw(t);if(o){for(var l=0,r=o.length;l<r;++l)if((i=o[l]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),i.value=t;return}}this.addEventListener(e.type,a,n),i={type:e.type,name:e.name,value:t,listener:a,options:n},o?o.push(i):this.__on=[i]}}function pS(e,t,n){var o=Iw(e+""),i,a=o.length,l;if(arguments.length<2){var r=this.node().__on;if(r){for(var s=0,u=r.length,c;s<u;++s)for(i=0,c=r[s];i<a;++i)if((l=o[i]).type===c.type&&l.name===c.name)return c.value}return}for(r=t?Yw:Vw,i=0;i<a;++i)this.each(r(o[i],t,n));return this}function mS(e,t,n){var o=Yc(e),i=o.CustomEvent;typeof i=="function"?i=new i(t,n):(i=o.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function Xw(e,t){return function(){return mS(this,e,t)}}function qw(e,t){return function(){return mS(this,e,t.apply(this,arguments))}}function hS(e,t){return this.each((typeof t=="function"?qw:Xw)(e,t))}function*gS(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],i=0,a=o.length,l;i<a;++i)(l=o[i])&&(yield l)}var Gm=[null];function it(e,t){this._groups=e,this._parents=t}function yS(){return new it([[document.documentElement]],Gm)}function Zw(){return this}it.prototype=yS.prototype={constructor:it,select:R1,selectAll:O1,selectChild:z1,selectChildren:L1,filter:B1,data:k1,enter:H1,exit:G1,join:U1,merge:I1,selection:Zw,order:V1,sort:Y1,call:X1,nodes:q1,node:Z1,size:j1,empty:$1,each:F1,attr:K1,style:Q1,property:W1,classed:oS,text:iS,html:aS,raise:lS,lower:rS,append:sS,insert:uS,remove:cS,clone:fS,datum:dS,on:pS,dispatch:hS,[Symbol.iterator]:gS};var Wo=yS;function Ct(e){return typeof e=="string"?new it([[document.querySelector(e)]],[document.documentElement]):new it([[e]],Gm)}function vS(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Xt(e,t){if(e=vS(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var o=n.createSVGPoint();return o.x=e.clientX,o.y=e.clientY,o=o.matrixTransform(t.getScreenCTM().inverse()),[o.x,o.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]}var bS={passive:!1},ba={capture:!0,passive:!1};function Xc(e){e.stopImmediatePropagation()}function Vi(e){e.preventDefault(),e.stopImmediatePropagation()}function ys(e){var t=e.document.documentElement,n=Ct(e).on("dragstart.drag",Vi,ba);"onselectstart"in t?n.on("selectstart.drag",Vi,ba):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function vs(e,t){var n=e.document.documentElement,o=Ct(e).on("dragstart.drag",null);t&&(o.on("click.drag",Vi,ba),setTimeout(function(){o.on("click.drag",null)},0)),"onselectstart"in n?o.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}var bs=e=>()=>e;function Ss(e,{sourceEvent:t,subject:n,target:o,identifier:i,active:a,x:l,y:r,dx:s,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:o,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:l,enumerable:!0,configurable:!0},y:{value:r,enumerable:!0,configurable:!0},dx:{value:s,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:c}})}Ss.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function jw(e){return!e.ctrlKey&&!e.button}function $w(){return this.parentNode}function Fw(e,t){return t??{x:e.x,y:e.y}}function Kw(){return navigator.maxTouchPoints||"ontouchstart"in this}function qc(){var e=jw,t=$w,n=Fw,o=Kw,i={},a=ya("start","drag","end"),l=0,r,s,u,c,d=0;function f(g){g.on("mousedown.drag",h).filter(o).on("touchstart.drag",S).on("touchmove.drag",p,bS).on("touchend.drag touchcancel.drag",y).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(g,x){if(!(c||!e.call(this,g,x))){var _=m(this,t.call(this,g,x),g,x,"mouse");_&&(Ct(g.view).on("mousemove.drag",v,ba).on("mouseup.drag",b,ba),ys(g.view),Xc(g),u=!1,r=g.clientX,s=g.clientY,_("start",g))}}function v(g){if(Vi(g),!u){var x=g.clientX-r,_=g.clientY-s;u=x*x+_*_>d}i.mouse("drag",g)}function b(g){Ct(g.view).on("mousemove.drag mouseup.drag",null),vs(g.view,u),Vi(g),i.mouse("end",g)}function S(g,x){if(e.call(this,g,x)){var _=g.changedTouches,E=t.call(this,g,x),w=_.length,C,H;for(C=0;C<w;++C)(H=m(this,E,g,x,_[C].identifier,_[C]))&&(Xc(g),H("start",g,_[C]))}}function p(g){var x=g.changedTouches,_=x.length,E,w;for(E=0;E<_;++E)(w=i[x[E].identifier])&&(Vi(g),w("drag",g,x[E]))}function y(g){var x=g.changedTouches,_=x.length,E,w;for(c&&clearTimeout(c),c=setTimeout(function(){c=null},500),E=0;E<_;++E)(w=i[x[E].identifier])&&(Xc(g),w("end",g,x[E]))}function m(g,x,_,E,w,C){var H=a.copy(),D=Xt(C||_,x),z,I,T;if((T=n.call(g,new Ss("beforestart",{sourceEvent:_,target:f,identifier:w,active:l,x:D[0],y:D[1],dx:0,dy:0,dispatch:H}),E))!=null)return z=T.x-D[0]||0,I=T.y-D[1]||0,function A(M,O,R){var L=D,V;switch(M){case"start":i[w]=A,V=l++;break;case"end":delete i[w],--l;case"drag":D=Xt(R||O,x),V=l;break}H.call(M,g,new Ss(M,{sourceEvent:O,subject:T,target:f,identifier:w,active:V,x:D[0]+z,y:D[1]+I,dx:D[0]-L[0],dy:D[1]-L[1],dispatch:H}),E)}}return f.filter=function(g){return arguments.length?(e=typeof g=="function"?g:bs(!!g),f):e},f.container=function(g){return arguments.length?(t=typeof g=="function"?g:bs(g),f):t},f.subject=function(g){return arguments.length?(n=typeof g=="function"?g:bs(g),f):n},f.touchable=function(g){return arguments.length?(o=typeof g=="function"?g:bs(!!g),f):o},f.on=function(){var g=a.on.apply(a,arguments);return g===a?f:g},f.clickDistance=function(g){return arguments.length?(d=(g=+g)*g,f):Math.sqrt(d)},f}function Zc(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Um(e,t){var n=Object.create(e.prototype);for(var o in t)n[o]=t[o];return n}function Es(){}var xs=.7,Fc=1/xs,Bl="\\s*([+-]?\\d+)\\s*",_s="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",vo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Qw=/^#([0-9a-f]{3,8})$/,Ww=new RegExp(`^rgb\\(${Bl},${Bl},${Bl}\\)$`),Jw=new RegExp(`^rgb\\(${vo},${vo},${vo}\\)$`),eA=new RegExp(`^rgba\\(${Bl},${Bl},${Bl},${_s}\\)$`),tA=new RegExp(`^rgba\\(${vo},${vo},${vo},${_s}\\)$`),nA=new RegExp(`^hsl\\(${_s},${vo},${vo}\\)$`),oA=new RegExp(`^hsla\\(${_s},${vo},${vo},${_s}\\)$`),SS={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};Zc(Es,oo,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:xS,formatHex:xS,formatHex8:iA,formatHsl:aA,formatRgb:_S,toString:_S});function xS(){return this.rgb().formatHex()}function iA(){return this.rgb().formatHex8()}function aA(){return AS(this).formatHsl()}function _S(){return this.rgb().formatRgb()}function oo(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Qw.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?ES(t):n===3?new un(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?jc(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?jc(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=Ww.exec(e))?new un(t[1],t[2],t[3],1):(t=Jw.exec(e))?new un(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=eA.exec(e))?jc(t[1],t[2],t[3],t[4]):(t=tA.exec(e))?jc(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=nA.exec(e))?CS(t[1],t[2]/100,t[3]/100,1):(t=oA.exec(e))?CS(t[1],t[2]/100,t[3]/100,t[4]):SS.hasOwnProperty(e)?ES(SS[e]):e==="transparent"?new un(NaN,NaN,NaN,0):null}function ES(e){return new un(e>>16&255,e>>8&255,e&255,1)}function jc(e,t,n,o){return o<=0&&(e=t=n=NaN),new un(e,t,n,o)}function lA(e){return e instanceof Es||(e=oo(e)),e?(e=e.rgb(),new un(e.r,e.g,e.b,e.opacity)):new un}function Hl(e,t,n,o){return arguments.length===1?lA(e):new un(e,t,n,o??1)}function un(e,t,n,o){this.r=+e,this.g=+t,this.b=+n,this.opacity=+o}Zc(un,Hl,Um(Es,{brighter(e){return e=e==null?Fc:Math.pow(Fc,e),new un(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?xs:Math.pow(xs,e),new un(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new un(xa(this.r),xa(this.g),xa(this.b),Kc(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:TS,formatHex:TS,formatHex8:rA,formatRgb:NS,toString:NS}));function TS(){return`#${Sa(this.r)}${Sa(this.g)}${Sa(this.b)}`}function rA(){return`#${Sa(this.r)}${Sa(this.g)}${Sa(this.b)}${Sa((isNaN(this.opacity)?1:this.opacity)*255)}`}function NS(){let e=Kc(this.opacity);return`${e===1?"rgb(":"rgba("}${xa(this.r)}, ${xa(this.g)}, ${xa(this.b)}${e===1?")":`, ${e})`}`}function Kc(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function xa(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Sa(e){return e=xa(e),(e<16?"0":"")+e.toString(16)}function CS(e,t,n,o){return o<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new no(e,t,n,o)}function AS(e){if(e instanceof no)return new no(e.h,e.s,e.l,e.opacity);if(e instanceof Es||(e=oo(e)),!e)return new no;if(e instanceof no)return e;e=e.rgb();var t=e.r/255,n=e.g/255,o=e.b/255,i=Math.min(t,n,o),a=Math.max(t,n,o),l=NaN,r=a-i,s=(a+i)/2;return r?(t===a?l=(n-o)/r+(n<o)*6:n===a?l=(o-t)/r+2:l=(t-n)/r+4,r/=s<.5?a+i:2-a-i,l*=60):r=s>0&&s<1?0:l,new no(l,r,s,e.opacity)}function MS(e,t,n,o){return arguments.length===1?AS(e):new no(e,t,n,o??1)}function no(e,t,n,o){this.h=+e,this.s=+t,this.l=+n,this.opacity=+o}Zc(no,MS,Um(Es,{brighter(e){return e=e==null?Fc:Math.pow(Fc,e),new no(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?xs:Math.pow(xs,e),new no(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,o=n+(n<.5?n:1-n)*t,i=2*n-o;return new un(Im(e>=240?e-240:e+120,i,o),Im(e,i,o),Im(e<120?e+240:e-120,i,o),this.opacity)},clamp(){return new no(wS(this.h),$c(this.s),$c(this.l),Kc(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(){let e=Kc(this.opacity);return`${e===1?"hsl(":"hsla("}${wS(this.h)}, ${$c(this.s)*100}%, ${$c(this.l)*100}%${e===1?")":`, ${e})`}`}}));function wS(e){return e=(e||0)%360,e<0?e+360:e}function $c(e){return Math.max(0,Math.min(1,e||0))}function Im(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}function Vm(e,t,n,o,i){var a=e*e,l=a*e;return((1-3*e+3*a-l)*t+(4-6*a+3*l)*n+(1+3*e+3*a-3*l)*o+l*i)/6}function DS(e){var t=e.length-1;return function(n){var o=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),i=e[o],a=e[o+1],l=o>0?e[o-1]:2*i-a,r=o<t-1?e[o+2]:2*a-i;return Vm((n-o/t)*t,l,i,a,r)}}function RS(e){var t=e.length;return function(n){var o=Math.floor(((n%=1)<0?++n:n)*t),i=e[(o+t-1)%t],a=e[o%t],l=e[(o+1)%t],r=e[(o+2)%t];return Vm((n-o/t)*t,i,a,l,r)}}var Ts=e=>()=>e;function sA(e,t){return function(n){return e+n*t}}function uA(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(o){return Math.pow(e+o*t,n)}}function OS(e){return(e=+e)==1?Qc:function(t,n){return n-t?uA(t,n,e):Ts(isNaN(t)?n:t)}}function Qc(e,t){var n=t-e;return n?sA(e,n):Ts(isNaN(e)?t:e)}var _a=(function e(t){var n=OS(t);function o(i,a){var l=n((i=Hl(i)).r,(a=Hl(a)).r),r=n(i.g,a.g),s=n(i.b,a.b),u=Qc(i.opacity,a.opacity);return function(c){return i.r=l(c),i.g=r(c),i.b=s(c),i.opacity=u(c),i+""}}return o.gamma=e,o})(1);function zS(e){return function(t){var n=t.length,o=new Array(n),i=new Array(n),a=new Array(n),l,r;for(l=0;l<n;++l)r=Hl(t[l]),o[l]=r.r||0,i[l]=r.g||0,a[l]=r.b||0;return o=e(o),i=e(i),a=e(a),r.opacity=1,function(s){return r.r=o(s),r.g=i(s),r.b=a(s),r+""}}}var cA=zS(DS),fA=zS(RS);function LS(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,o=t.slice(),i;return function(a){for(i=0;i<n;++i)o[i]=e[i]*(1-a)+t[i]*a;return o}}function BS(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function HS(e,t){var n=t?t.length:0,o=e?Math.min(n,e.length):0,i=new Array(o),a=new Array(n),l;for(l=0;l<o;++l)i[l]=Jo(e[l],t[l]);for(;l<n;++l)a[l]=t[l];return function(r){for(l=0;l<o;++l)a[l]=i[l](r);return a}}function PS(e,t){var n=new Date;return e=+e,t=+t,function(o){return n.setTime(e*(1-o)+t*o),n}}function qt(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function kS(e,t){var n={},o={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=Jo(e[i],t[i]):o[i]=t[i];return function(a){for(i in n)o[i]=n[i](a);return o}}var Xm=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ym=new RegExp(Xm.source,"g");function dA(e){return function(){return e}}function pA(e){return function(t){return e(t)+""}}function Ns(e,t){var n=Xm.lastIndex=Ym.lastIndex=0,o,i,a,l=-1,r=[],s=[];for(e=e+"",t=t+"";(o=Xm.exec(e))&&(i=Ym.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),r[l]?r[l]+=a:r[++l]=a),(o=o[0])===(i=i[0])?r[l]?r[l]+=i:r[++l]=i:(r[++l]=null,s.push({i:l,x:qt(o,i)})),n=Ym.lastIndex;return n<t.length&&(a=t.slice(n),r[l]?r[l]+=a:r[++l]=a),r.length<2?s[0]?pA(s[0].x):dA(t):(t=s.length,function(u){for(var c=0,d;c<t;++c)r[(d=s[c]).i]=d.x(u);return r.join("")})}function Jo(e,t){var n=typeof t,o;return t==null||n==="boolean"?Ts(t):(n==="number"?qt:n==="string"?(o=oo(t))?(t=o,_a):Ns:t instanceof oo?_a:t instanceof Date?PS:BS(t)?LS:Array.isArray(t)?HS:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?kS:qt)(e,t)}var GS=180/Math.PI,Wc={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function qm(e,t,n,o,i,a){var l,r,s;return(l=Math.sqrt(e*e+t*t))&&(e/=l,t/=l),(s=e*n+t*o)&&(n-=e*s,o-=t*s),(r=Math.sqrt(n*n+o*o))&&(n/=r,o/=r,s/=r),e*o<t*n&&(e=-e,t=-t,s=-s,l=-l),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*GS,skewX:Math.atan(s)*GS,scaleX:l,scaleY:r}}var Jc;function US(e){let t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Wc:qm(t.a,t.b,t.c,t.d,t.e,t.f)}function IS(e){return e==null?Wc:(Jc||(Jc=document.createElementNS("http://www.w3.org/2000/svg","g")),Jc.setAttribute("transform",e),(e=Jc.transform.baseVal.consolidate())?(e=e.matrix,qm(e.a,e.b,e.c,e.d,e.e,e.f)):Wc)}function VS(e,t,n,o){function i(u){return u.length?u.pop()+" ":""}function a(u,c,d,f,h,v){if(u!==d||c!==f){var b=h.push("translate(",null,t,null,n);v.push({i:b-4,x:qt(u,d)},{i:b-2,x:qt(c,f)})}else(d||f)&&h.push("translate("+d+t+f+n)}function l(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,o)-2,x:qt(u,c)})):c&&d.push(i(d)+"rotate("+c+o)}function r(u,c,d,f){u!==c?f.push({i:d.push(i(d)+"skewX(",null,o)-2,x:qt(u,c)}):c&&d.push(i(d)+"skewX("+c+o)}function s(u,c,d,f,h,v){if(u!==d||c!==f){var b=h.push(i(h)+"scale(",null,",",null,")");v.push({i:b-4,x:qt(u,d)},{i:b-2,x:qt(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),a(u.translateX,u.translateY,c.translateX,c.translateY,d,f),l(u.rotate,c.rotate,d,f),r(u.skewX,c.skewX,d,f),s(u.scaleX,u.scaleY,c.scaleX,c.scaleY,d,f),u=c=null,function(h){for(var v=-1,b=f.length,S;++v<b;)d[(S=f[v]).i]=S.x(h);return d.join("")}}}var Zm=VS(US,"px, ","px)","deg)"),jm=VS(IS,", ",")",")");var mA=1e-12;function YS(e){return((e=Math.exp(e))+1/e)/2}function hA(e){return((e=Math.exp(e))-1/e)/2}function gA(e){return((e=Math.exp(2*e))-1)/(e+1)}var Ea=(function e(t,n,o){function i(a,l){var r=a[0],s=a[1],u=a[2],c=l[0],d=l[1],f=l[2],h=c-r,v=d-s,b=h*h+v*v,S,p;if(b<mA)p=Math.log(f/u)/t,S=function(E){return[r+E*h,s+E*v,u*Math.exp(t*E*p)]};else{var y=Math.sqrt(b),m=(f*f-u*u+o*b)/(2*u*n*y),g=(f*f-u*u-o*b)/(2*f*n*y),x=Math.log(Math.sqrt(m*m+1)-m),_=Math.log(Math.sqrt(g*g+1)-g);p=(_-x)/t,S=function(E){var w=E*p,C=YS(x),H=u/(n*y)*(C*gA(t*w+x)-hA(x));return[r+H*h,s+H*v,u*C/YS(t*w+x)]}}return S.duration=p*1e3*t/Math.SQRT2,S}return i.rho=function(a){var l=Math.max(.001,+a),r=l*l,s=r*r;return e(l,r,s)},i})(Math.SQRT2,2,4);var Pl=0,ws=0,Cs=0,qS=1e3,ef,As,tf=0,Ta=0,nf=0,Ms=typeof performance=="object"&&performance.now?performance:Date,ZS=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Rs(){return Ta||(ZS(yA),Ta=Ms.now()+nf)}function yA(){Ta=0}function Ds(){this._call=this._time=this._next=null}Ds.prototype=of.prototype={constructor:Ds,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Rs():+n)+(t==null?0:+t),!this._next&&As!==this&&(As?As._next=this:ef=this,As=this),this._call=e,this._time=n,$m()},stop:function(){this._call&&(this._call=null,this._time=1/0,$m())}};function of(e,t,n){var o=new Ds;return o.restart(e,t,n),o}function jS(){Rs(),++Pl;for(var e=ef,t;e;)(t=Ta-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Pl}function XS(){Ta=(tf=Ms.now())+nf,Pl=ws=0;try{jS()}finally{Pl=0,bA(),Ta=0}}function vA(){var e=Ms.now(),t=e-tf;t>qS&&(nf-=t,tf=e)}function bA(){for(var e,t=ef,n,o=1/0;t;)t._call?(o>t._time&&(o=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:ef=n);As=e,$m(o)}function $m(e){if(!Pl){ws&&(ws=clearTimeout(ws));var t=e-Ta;t>24?(e<1/0&&(ws=setTimeout(XS,e-Ms.now()-nf)),Cs&&(Cs=clearInterval(Cs))):(Cs||(tf=Ms.now(),Cs=setInterval(vA,qS)),Pl=1,ZS(XS))}}function af(e,t,n){var o=new Ds;return t=t==null?0:+t,o.restart(i=>{o.stop(),e(i+t)},t,n),o}var SA=ya("start","end","cancel","interrupt"),xA=[],KS=0,$S=1,rf=2,lf=3,FS=4,sf=5,Os=6;function Yi(e,t,n,o,i,a){var l=e.__transition;if(!l)e.__transition={};else if(n in l)return;_A(e,n,{name:t,index:o,group:i,on:SA,tween:xA,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:KS})}function zs(e,t){var n=bt(e,t);if(n.state>KS)throw new Error("too late; already scheduled");return n}function Lt(e,t){var n=bt(e,t);if(n.state>lf)throw new Error("too late; already running");return n}function bt(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function _A(e,t,n){var o=e.__transition,i;o[t]=n,n.timer=of(a,0,n.time);function a(u){n.state=$S,n.timer.restart(l,n.delay,n.time),n.delay<=u&&l(u-n.delay)}function l(u){var c,d,f,h;if(n.state!==$S)return s();for(c in o)if(h=o[c],h.name===n.name){if(h.state===lf)return af(l);h.state===FS?(h.state=Os,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete o[c]):+c<t&&(h.state=Os,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete o[c])}if(af(function(){n.state===lf&&(n.state=FS,n.timer.restart(r,n.delay,n.time),r(u))}),n.state=rf,n.on.call("start",e,e.__data__,n.index,n.group),n.state===rf){for(n.state=lf,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 r(u){for(var c=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(s),n.state=sf,1),d=-1,f=i.length;++d<f;)i[d].call(e,c);n.state===sf&&(n.on.call("end",e,e.__data__,n.index,n.group),s())}function s(){n.state=Os,n.timer.stop(),delete o[t];for(var u in o)return;delete e.__transition}}function Na(e,t){var n=e.__transition,o,i,a=!0,l;if(n){t=t==null?null:t+"";for(l in n){if((o=n[l]).name!==t){a=!1;continue}i=o.state>rf&&o.state<sf,o.state=Os,o.timer.stop(),o.on.call(i?"interrupt":"cancel",e,e.__data__,o.index,o.group),delete n[l]}a&&delete e.__transition}}function QS(e){return this.each(function(){Na(this,e)})}function EA(e,t){var n,o;return function(){var i=Lt(this,e),a=i.tween;if(a!==n){o=n=a;for(var l=0,r=o.length;l<r;++l)if(o[l].name===t){o=o.slice(),o.splice(l,1);break}}i.tween=o}}function TA(e,t,n){var o,i;if(typeof n!="function")throw new Error;return function(){var a=Lt(this,e),l=a.tween;if(l!==o){i=(o=l).slice();for(var r={name:t,value:n},s=0,u=i.length;s<u;++s)if(i[s].name===t){i[s]=r;break}s===u&&i.push(r)}a.tween=i}}function WS(e,t){var n=this._id;if(e+="",arguments.length<2){for(var o=bt(this.node(),n).tween,i=0,a=o.length,l;i<a;++i)if((l=o[i]).name===e)return l.value;return null}return this.each((t==null?EA:TA)(n,e,t))}function kl(e,t,n){var o=e._id;return e.each(function(){var i=Lt(this,o);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return bt(i,o).value[t]}}function uf(e,t){var n;return(typeof t=="number"?qt:t instanceof oo?_a:(n=oo(t))?(t=n,_a):Ns)(e,t)}function NA(e){return function(){this.removeAttribute(e)}}function CA(e){return function(){this.removeAttributeNS(e.space,e.local)}}function wA(e,t,n){var o,i=n+"",a;return function(){var l=this.getAttribute(e);return l===i?null:l===o?a:a=t(o=l,n)}}function AA(e,t,n){var o,i=n+"",a;return function(){var l=this.getAttributeNS(e.space,e.local);return l===i?null:l===o?a:a=t(o=l,n)}}function MA(e,t,n){var o,i,a;return function(){var l,r=n(this),s;return r==null?void this.removeAttribute(e):(l=this.getAttribute(e),s=r+"",l===s?null:l===o&&s===i?a:(i=s,a=t(o=l,r)))}}function DA(e,t,n){var o,i,a;return function(){var l,r=n(this),s;return r==null?void this.removeAttributeNS(e.space,e.local):(l=this.getAttributeNS(e.space,e.local),s=r+"",l===s?null:l===o&&s===i?a:(i=s,a=t(o=l,r)))}}function JS(e,t){var n=Qo(e),o=n==="transform"?jm:uf;return this.attrTween(e,typeof t=="function"?(n.local?DA:MA)(n,o,kl(this,"attr."+e,t)):t==null?(n.local?CA:NA)(n):(n.local?AA:wA)(n,o,t))}function RA(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function OA(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function zA(e,t){var n,o;function i(){var a=t.apply(this,arguments);return a!==o&&(n=(o=a)&&OA(e,a)),n}return i._value=t,i}function LA(e,t){var n,o;function i(){var a=t.apply(this,arguments);return a!==o&&(n=(o=a)&&RA(e,a)),n}return i._value=t,i}function ex(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 o=Qo(e);return this.tween(n,(o.local?zA:LA)(o,t))}function BA(e,t){return function(){zs(this,e).delay=+t.apply(this,arguments)}}function HA(e,t){return t=+t,function(){zs(this,e).delay=t}}function tx(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?BA:HA)(t,e)):bt(this.node(),t).delay}function PA(e,t){return function(){Lt(this,e).duration=+t.apply(this,arguments)}}function kA(e,t){return t=+t,function(){Lt(this,e).duration=t}}function nx(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?PA:kA)(t,e)):bt(this.node(),t).duration}function GA(e,t){if(typeof t!="function")throw new Error;return function(){Lt(this,e).ease=t}}function ox(e){var t=this._id;return arguments.length?this.each(GA(t,e)):bt(this.node(),t).ease}function UA(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Lt(this,e).ease=n}}function ix(e){if(typeof e!="function")throw new Error;return this.each(UA(this._id,e))}function ax(e){typeof e!="function"&&(e=hs(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var a=t[i],l=a.length,r=o[i]=[],s,u=0;u<l;++u)(s=a[u])&&e.call(s,s.__data__,u,a)&&r.push(s);return new Zt(o,this._parents,this._name,this._id)}function lx(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,o=t.length,i=n.length,a=Math.min(o,i),l=new Array(o),r=0;r<a;++r)for(var s=t[r],u=n[r],c=s.length,d=l[r]=new Array(c),f,h=0;h<c;++h)(f=s[h]||u[h])&&(d[h]=f);for(;r<o;++r)l[r]=t[r];return new Zt(l,this._parents,this._name,this._id)}function IA(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 VA(e,t,n){var o,i,a=IA(t)?zs:Lt;return function(){var l=a(this,e),r=l.on;r!==o&&(i=(o=r).copy()).on(t,n),l.on=i}}function rx(e,t){var n=this._id;return arguments.length<2?bt(this.node(),n).on.on(e):this.each(VA(n,e,t))}function YA(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function sx(){return this.on("end.remove",YA(this._id))}function ux(e){var t=this._name,n=this._id;typeof e!="function"&&(e=va(e));for(var o=this._groups,i=o.length,a=new Array(i),l=0;l<i;++l)for(var r=o[l],s=r.length,u=a[l]=new Array(s),c,d,f=0;f<s;++f)(c=r[f])&&(d=e.call(c,c.__data__,f,r))&&("__data__"in c&&(d.__data__=c.__data__),u[f]=d,Yi(u[f],t,n,f,u,bt(c,n)));return new Zt(a,this._parents,t,n)}function cx(e){var t=this._name,n=this._id;typeof e!="function"&&(e=ms(e));for(var o=this._groups,i=o.length,a=[],l=[],r=0;r<i;++r)for(var s=o[r],u=s.length,c,d=0;d<u;++d)if(c=s[d]){for(var f=e.call(c,c.__data__,d,s),h,v=bt(c,n),b=0,S=f.length;b<S;++b)(h=f[b])&&Yi(h,t,n,b,f,v);a.push(f),l.push(c)}return new Zt(a,l,t,n)}var XA=Wo.prototype.constructor;function fx(){return new XA(this._groups,this._parents)}function qA(e,t){var n,o,i;return function(){var a=Ii(this,e),l=(this.style.removeProperty(e),Ii(this,e));return a===l?null:a===n&&l===o?i:i=t(n=a,o=l)}}function dx(e){return function(){this.style.removeProperty(e)}}function ZA(e,t,n){var o,i=n+"",a;return function(){var l=Ii(this,e);return l===i?null:l===o?a:a=t(o=l,n)}}function jA(e,t,n){var o,i,a;return function(){var l=Ii(this,e),r=n(this),s=r+"";return r==null&&(s=r=(this.style.removeProperty(e),Ii(this,e))),l===s?null:l===o&&s===i?a:(i=s,a=t(o=l,r))}}function $A(e,t){var n,o,i,a="style."+t,l="end."+a,r;return function(){var s=Lt(this,e),u=s.on,c=s.value[a]==null?r||(r=dx(t)):void 0;(u!==n||i!==c)&&(o=(n=u).copy()).on(l,i=c),s.on=o}}function px(e,t,n){var o=(e+="")=="transform"?Zm:uf;return t==null?this.styleTween(e,qA(e,o)).on("end.style."+e,dx(e)):typeof t=="function"?this.styleTween(e,jA(e,o,kl(this,"style."+e,t))).each($A(this._id,e)):this.styleTween(e,ZA(e,o,t),n).on("end.style."+e,null)}function FA(e,t,n){return function(o){this.style.setProperty(e,t.call(this,o),n)}}function KA(e,t,n){var o,i;function a(){var l=t.apply(this,arguments);return l!==i&&(o=(i=l)&&FA(e,l,n)),o}return a._value=t,a}function mx(e,t,n){var o="style."+(e+="");if(arguments.length<2)return(o=this.tween(o))&&o._value;if(t==null)return this.tween(o,null);if(typeof t!="function")throw new Error;return this.tween(o,KA(e,t,n??""))}function QA(e){return function(){this.textContent=e}}function WA(e){return function(){var t=e(this);this.textContent=t??""}}function hx(e){return this.tween("text",typeof e=="function"?WA(kl(this,"text",e)):QA(e==null?"":e+""))}function JA(e){return function(t){this.textContent=e.call(this,t)}}function eM(e){var t,n;function o(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&JA(i)),t}return o._value=e,o}function gx(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,eM(e))}function yx(){for(var e=this._name,t=this._id,n=cf(),o=this._groups,i=o.length,a=0;a<i;++a)for(var l=o[a],r=l.length,s,u=0;u<r;++u)if(s=l[u]){var c=bt(s,t);Yi(s,e,n,u,l,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Zt(o,this._parents,e,n)}function vx(){var e,t,n=this,o=n._id,i=n.size();return new Promise(function(a,l){var r={value:l},s={value:function(){--i===0&&a()}};n.each(function(){var u=Lt(this,o),c=u.on;c!==e&&(t=(e=c).copy(),t._.cancel.push(r),t._.interrupt.push(r),t._.end.push(s)),u.on=t}),i===0&&a()})}var tM=0;function Zt(e,t,n,o){this._groups=e,this._parents=t,this._name=n,this._id=o}function bx(e){return Wo().transition(e)}function cf(){return++tM}var ei=Wo.prototype;Zt.prototype=bx.prototype={constructor:Zt,select:ux,selectAll:cx,selectChild:ei.selectChild,selectChildren:ei.selectChildren,filter:ax,merge:lx,selection:fx,transition:yx,call:ei.call,nodes:ei.nodes,node:ei.node,size:ei.size,empty:ei.empty,each:ei.each,on:rx,attr:JS,attrTween:ex,style:px,styleTween:mx,text:hx,textTween:gx,remove:sx,tween:WS,delay:tx,duration:nx,ease:ox,easeVarying:ix,end:vx,[Symbol.iterator]:ei[Symbol.iterator]};function ff(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var nM={time:null,delay:0,duration:250,ease:ff};function oM(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 Sx(e){var t,n;e instanceof Zt?(t=e._id,e=e._name):(t=cf(),(n=nM).time=Rs(),e=e==null?null:e+"");for(var o=this._groups,i=o.length,a=0;a<i;++a)for(var l=o[a],r=l.length,s,u=0;u<r;++u)(s=l[u])&&Yi(s,e,t,u,l,n||oM(s,t));return new Zt(o,this._parents,e,t)}Wo.prototype.interrupt=QS;Wo.prototype.transition=Sx;var Ls=e=>()=>e;function Fm(e,{sourceEvent:t,target:n,transform:o,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:o,enumerable:!0,configurable:!0},_:{value:i}})}function io(e,t,n){this.k=e,this.x=t,this.y=n}io.prototype={constructor:io,scale:function(e){return e===1?this:new io(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new io(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 Ca=new io(1,0,0);Bs.prototype=io.prototype;function Bs(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Ca;return e.__zoom}function df(e){e.stopImmediatePropagation()}function Gl(e){e.preventDefault(),e.stopImmediatePropagation()}function iM(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function aM(){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 xx(){return this.__zoom||Ca}function lM(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function rM(){return navigator.maxTouchPoints||"ontouchstart"in this}function sM(e,t,n){var o=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],a=e.invertY(t[0][1])-n[0][1],l=e.invertY(t[1][1])-n[1][1];return e.translate(i>o?(o+i)/2:Math.min(0,o)||Math.max(0,i),l>a?(a+l)/2:Math.min(0,a)||Math.max(0,l))}function pf(){var e=iM,t=aM,n=sM,o=lM,i=rM,a=[0,1/0],l=[[-1/0,-1/0],[1/0,1/0]],r=250,s=Ea,u=ya("start","zoom","end"),c,d,f,h=500,v=150,b=0,S=10;function p(T){T.property("__zoom",xx).on("wheel.zoom",w,{passive:!1}).on("mousedown.zoom",C).on("dblclick.zoom",H).filter(i).on("touchstart.zoom",D).on("touchmove.zoom",z).on("touchend.zoom touchcancel.zoom",I).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}p.transform=function(T,A,M,O){var R=T.selection?T.selection():T;R.property("__zoom",xx),T!==R?x(T,A,M,O):R.interrupt().each(function(){_(this,arguments).event(O).start().zoom(null,typeof A=="function"?A.apply(this,arguments):A).end()})},p.scaleBy=function(T,A,M,O){p.scaleTo(T,function(){var R=this.__zoom.k,L=typeof A=="function"?A.apply(this,arguments):A;return R*L},M,O)},p.scaleTo=function(T,A,M,O){p.transform(T,function(){var R=t.apply(this,arguments),L=this.__zoom,V=M==null?g(R):typeof M=="function"?M.apply(this,arguments):M,k=L.invert(V),G=typeof A=="function"?A.apply(this,arguments):A;return n(m(y(L,G),V,k),R,l)},M,O)},p.translateBy=function(T,A,M,O){p.transform(T,function(){return n(this.__zoom.translate(typeof A=="function"?A.apply(this,arguments):A,typeof M=="function"?M.apply(this,arguments):M),t.apply(this,arguments),l)},null,O)},p.translateTo=function(T,A,M,O,R){p.transform(T,function(){var L=t.apply(this,arguments),V=this.__zoom,k=O==null?g(L):typeof O=="function"?O.apply(this,arguments):O;return n(Ca.translate(k[0],k[1]).scale(V.k).translate(typeof A=="function"?-A.apply(this,arguments):-A,typeof M=="function"?-M.apply(this,arguments):-M),L,l)},O,R)};function y(T,A){return A=Math.max(a[0],Math.min(a[1],A)),A===T.k?T:new io(A,T.x,T.y)}function m(T,A,M){var O=A[0]-M[0]*T.k,R=A[1]-M[1]*T.k;return O===T.x&&R===T.y?T:new io(T.k,O,R)}function g(T){return[(+T[0][0]+ +T[1][0])/2,(+T[0][1]+ +T[1][1])/2]}function x(T,A,M,O){T.on("start.zoom",function(){_(this,arguments).event(O).start()}).on("interrupt.zoom end.zoom",function(){_(this,arguments).event(O).end()}).tween("zoom",function(){var R=this,L=arguments,V=_(R,L).event(O),k=t.apply(R,L),G=M==null?g(k):typeof M=="function"?M.apply(R,L):M,q=Math.max(k[1][0]-k[0][0],k[1][1]-k[0][1]),Z=R.__zoom,j=typeof A=="function"?A.apply(R,L):A,se=s(Z.invert(G).concat(q/Z.k),j.invert(G).concat(q/j.k));return function(J){if(J===1)J=j;else{var X=se(J),Q=q/X[2];J=new io(Q,G[0]-X[0]*Q,G[1]-X[1]*Q)}V.zoom(null,J)}})}function _(T,A,M){return!M&&T.__zooming||new E(T,A)}function E(T,A){this.that=T,this.args=A,this.active=0,this.sourceEvent=null,this.extent=t.apply(T,A),this.taps=0}E.prototype={event:function(T){return T&&(this.sourceEvent=T),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(T,A){return this.mouse&&T!=="mouse"&&(this.mouse[1]=A.invert(this.mouse[0])),this.touch0&&T!=="touch"&&(this.touch0[1]=A.invert(this.touch0[0])),this.touch1&&T!=="touch"&&(this.touch1[1]=A.invert(this.touch1[0])),this.that.__zoom=A,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(T){var A=Ct(this.that).datum();u.call(T,this.that,new Fm(T,{sourceEvent:this.sourceEvent,target:p,type:T,transform:this.that.__zoom,dispatch:u}),A)}};function w(T,...A){if(!e.apply(this,arguments))return;var M=_(this,A).event(T),O=this.__zoom,R=Math.max(a[0],Math.min(a[1],O.k*Math.pow(2,o.apply(this,arguments)))),L=Xt(T);if(M.wheel)(M.mouse[0][0]!==L[0]||M.mouse[0][1]!==L[1])&&(M.mouse[1]=O.invert(M.mouse[0]=L)),clearTimeout(M.wheel);else{if(O.k===R)return;M.mouse=[L,O.invert(L)],Na(this),M.start()}Gl(T),M.wheel=setTimeout(V,v),M.zoom("mouse",n(m(y(O,R),M.mouse[0],M.mouse[1]),M.extent,l));function V(){M.wheel=null,M.end()}}function C(T,...A){if(f||!e.apply(this,arguments))return;var M=T.currentTarget,O=_(this,A,!0).event(T),R=Ct(T.view).on("mousemove.zoom",G,!0).on("mouseup.zoom",q,!0),L=Xt(T,M),V=T.clientX,k=T.clientY;ys(T.view),df(T),O.mouse=[L,this.__zoom.invert(L)],Na(this),O.start();function G(Z){if(Gl(Z),!O.moved){var j=Z.clientX-V,se=Z.clientY-k;O.moved=j*j+se*se>b}O.event(Z).zoom("mouse",n(m(O.that.__zoom,O.mouse[0]=Xt(Z,M),O.mouse[1]),O.extent,l))}function q(Z){R.on("mousemove.zoom mouseup.zoom",null),vs(Z.view,O.moved),Gl(Z),O.event(Z).end()}}function H(T,...A){if(e.apply(this,arguments)){var M=this.__zoom,O=Xt(T.changedTouches?T.changedTouches[0]:T,this),R=M.invert(O),L=M.k*(T.shiftKey?.5:2),V=n(m(y(M,L),O,R),t.apply(this,A),l);Gl(T),r>0?Ct(this).transition().duration(r).call(x,V,O,T):Ct(this).call(p.transform,V,O,T)}}function D(T,...A){if(e.apply(this,arguments)){var M=T.touches,O=M.length,R=_(this,A,T.changedTouches.length===O).event(T),L,V,k,G;for(df(T),V=0;V<O;++V)k=M[V],G=Xt(k,this),G=[G,this.__zoom.invert(G),k.identifier],R.touch0?!R.touch1&&R.touch0[2]!==G[2]&&(R.touch1=G,R.taps=0):(R.touch0=G,L=!0,R.taps=1+!!c);c&&(c=clearTimeout(c)),L&&(R.taps<2&&(d=G[0],c=setTimeout(function(){c=null},h)),Na(this),R.start())}}function z(T,...A){if(this.__zooming){var M=_(this,A).event(T),O=T.changedTouches,R=O.length,L,V,k,G;for(Gl(T),L=0;L<R;++L)V=O[L],k=Xt(V,this),M.touch0&&M.touch0[2]===V.identifier?M.touch0[0]=k:M.touch1&&M.touch1[2]===V.identifier&&(M.touch1[0]=k);if(V=M.that.__zoom,M.touch1){var q=M.touch0[0],Z=M.touch0[1],j=M.touch1[0],se=M.touch1[1],J=(J=j[0]-q[0])*J+(J=j[1]-q[1])*J,X=(X=se[0]-Z[0])*X+(X=se[1]-Z[1])*X;V=y(V,Math.sqrt(J/X)),k=[(q[0]+j[0])/2,(q[1]+j[1])/2],G=[(Z[0]+se[0])/2,(Z[1]+se[1])/2]}else if(M.touch0)k=M.touch0[0],G=M.touch0[1];else return;M.zoom("touch",n(m(V,k,G),M.extent,l))}}function I(T,...A){if(this.__zooming){var M=_(this,A).event(T),O=T.changedTouches,R=O.length,L,V;for(df(T),f&&clearTimeout(f),f=setTimeout(function(){f=null},h),L=0;L<R;++L)V=O[L],M.touch0&&M.touch0[2]===V.identifier?delete M.touch0:M.touch1&&M.touch1[2]===V.identifier&&delete M.touch1;if(M.touch1&&!M.touch0&&(M.touch0=M.touch1,delete M.touch1),M.touch0)M.touch0[1]=this.__zoom.invert(M.touch0[0]);else if(M.end(),M.taps===2&&(V=Xt(V,this),Math.hypot(d[0]-V[0],d[1]-V[1])<S)){var k=Ct(this).on("dblclick.zoom");k&&k.apply(this,arguments)}}}return p.wheelDelta=function(T){return arguments.length?(o=typeof T=="function"?T:Ls(+T),p):o},p.filter=function(T){return arguments.length?(e=typeof T=="function"?T:Ls(!!T),p):e},p.touchable=function(T){return arguments.length?(i=typeof T=="function"?T:Ls(!!T),p):i},p.extent=function(T){return arguments.length?(t=typeof T=="function"?T:Ls([[+T[0][0],+T[0][1]],[+T[1][0],+T[1][1]]]),p):t},p.scaleExtent=function(T){return arguments.length?(a[0]=+T[0],a[1]=+T[1],p):[a[0],a[1]]},p.translateExtent=function(T){return arguments.length?(l[0][0]=+T[0][0],l[1][0]=+T[1][0],l[0][1]=+T[0][1],l[1][1]=+T[1][1],p):[[l[0][0],l[0][1]],[l[1][0],l[1][1]]]},p.constrain=function(T){return arguments.length?(n=T,p):n},p.duration=function(T){return arguments.length?(r=+T,p):r},p.interpolate=function(T){return arguments.length?(s=T,p):s},p.on=function(){var T=u.on.apply(u,arguments);return T===u?p:T},p.clickDistance=function(T){return arguments.length?(b=(T=+T)*T,p):Math.sqrt(b)},p.tapDistance=function(T){return arguments.length?(S=+T,p):S},p}var wn={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:o})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:o}", 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."},ql=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],eh=["Enter"," ","Escape"],th={"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"},Zi;(function(e){e.Strict="strict",e.Loose="loose"})(Zi||(Zi={}));var ti;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(ti||(ti={}));var wa;(function(e){e.Partial="partial",e.Full="full"})(wa||(wa={}));var nh={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null},bo;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(bo||(bo={}));var Vl;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Vl||(Vl={}));var W;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(W||(W={}));var _x={[W.Left]:W.Right,[W.Right]:W.Left,[W.Top]:W.Bottom,[W.Bottom]:W.Top};function oh(e){return e===null?null:e?"valid":"invalid"}var ih=e=>"id"in e&&"source"in e&&"target"in e,Bx=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),ah=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e);var ks=(e,t=[0,0])=>{let{width:n,height:o}=So(e),i=e.origin??t,a=n*i[0],l=o*i[1];return{x:e.position.x-a,y:e.position.y-l}},lh=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};let n=e.reduce((o,i)=>{let a=typeof i=="string",l=!t.nodeLookup&&!a?i:void 0;t.nodeLookup&&(l=a?t.nodeLookup.get(i):ah(i)?i:t.nodeLookup.get(i.id));let r=l?gf(l,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return vf(o,r)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return bf(n)},Zl=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},o=!1;return e.forEach(i=>{(t.filter===void 0||t.filter(i))&&(n=vf(n,gf(i)),o=!0)}),o?bf(n):{x:0,y:0,width:0,height:0}},yf=(e,t,[n,o,i]=[0,0,1],a=!1,l=!1)=>{let r={...Fl(t,[n,o,i]),width:t.width/i,height:t.height/i},s=[];for(let u of e.values()){let{measured:c,selectable:d=!0,hidden:f=!1}=u;if(l&&!d||f)continue;let h=c.width??u.width??u.initialWidth??null,v=c.height??u.height??u.initialHeight??null,b=jl(r,Ma(u)),S=(h??0)*(v??0),p=a&&b>0;(!u.internals.handleBounds||p||b>=S||u.dragging)&&s.push(u)}return s},Hx=(e,t)=>{let n=new Set;return e.forEach(o=>{n.add(o.id)}),t.filter(o=>n.has(o.source)||n.has(o.target))};function uM(e,t){let n=new Map,o=t?.nodes?new Set(t.nodes.map(i=>i.id)):null;return e.forEach(i=>{i.measured.width&&i.measured.height&&(t?.includeHiddenNodes||!i.hidden)&&(!o||o.has(i.id))&&n.set(i.id,i)}),n}async function Px({nodes:e,width:t,height:n,panZoom:o,minZoom:i,maxZoom:a},l){if(e.size===0)return Promise.resolve(!0);let r=uM(e,l),s=Zl(r),u=Gs(s,t,n,l?.minZoom??i,l?.maxZoom??a,l?.padding??.1);return await o.setViewport(u,{duration:l?.duration,ease:l?.ease,interpolate:l?.interpolate}),Promise.resolve(!0)}function rh({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:o=[0,0],nodeExtent:i,onError:a}){let l=n.get(e),r=l.parentId?n.get(l.parentId):void 0,{x:s,y:u}=r?r.internals.positionAbsolute:{x:0,y:0},c=l.origin??o,d=l.extent||i;if(l.extent==="parent"&&!l.expandParent)if(!r)a?.("005",wn.error005());else{let h=r.measured.width,v=r.measured.height;h&&v&&(d=[[s,u],[s+h,u+v]])}else r&&Xl(l.extent)&&(d=[[l.extent[0][0]+s,l.extent[0][1]+u],[l.extent[1][0]+s,l.extent[1][1]+u]]);let f=Xl(d)?Aa(t,d,l.measured):t;return(l.measured.width===void 0||l.measured.height===void 0)&&a?.("015",wn.error015()),{position:{x:f.x-s+(l.measured.width??0)*c[0],y:f.y-u+(l.measured.height??0)*c[1]},positionAbsolute:f}}async function kx({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:o,onBeforeDelete:i}){let a=new Set(e.map(f=>f.id)),l=[];for(let f of n){if(f.deletable===!1)continue;let h=a.has(f.id),v=!h&&f.parentId&&l.find(b=>b.id===f.parentId);(h||v)&&l.push(f)}let r=new Set(t.map(f=>f.id)),s=o.filter(f=>f.deletable!==!1),c=Hx(l,s);for(let f of s)r.has(f.id)&&!c.find(v=>v.id===f.id)&&c.push(f);if(!i)return{edges:c,nodes:l};let d=await i({nodes:l,edges:c});return typeof d=="boolean"?d?{edges:c,nodes:l}:{edges:[],nodes:[]}:d}var Yl=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),Aa=(e={x:0,y:0},t,n)=>({x:Yl(e.x,t[0][0],t[1][0]-(n?.width??0)),y:Yl(e.y,t[0][1],t[1][1]-(n?.height??0))});function Gx(e,t,n){let{width:o,height:i}=So(n),{x:a,y:l}=n.internals.positionAbsolute;return Aa(e,[[a,l],[a+o,l+i]],t)}var Ex=(e,t,n)=>e<t?Yl(Math.abs(e-t),1,t)/t:e>n?-Yl(Math.abs(e-n),1,t)/t:0,Ux=(e,t,n=15,o=40)=>{let i=Ex(e.x,o,t.width-o)*n,a=Ex(e.y,o,t.height-o)*n;return[i,a]},vf=(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)}),Jm=({x:e,y:t,width:n,height:o})=>({x:e,y:t,x2:e+n,y2:t+o}),bf=({x:e,y:t,x2:n,y2:o})=>({x:e,y:t,width:n-e,height:o-t}),Ma=(e,t=[0,0])=>{let{x:n,y:o}=ah(e)?e.internals.positionAbsolute:ks(e,t);return{x:n,y:o,width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}},gf=(e,t=[0,0])=>{let{x:n,y:o}=ah(e)?e.internals.positionAbsolute:ks(e,t);return{x:n,y:o,x2:n+(e.measured?.width??e.width??e.initialWidth??0),y2:o+(e.measured?.height??e.height??e.initialHeight??0)}},sh=(e,t)=>bf(vf(Jm(e),Jm(t))),jl=(e,t)=>{let n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),o=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*o)},uh=e=>Xn(e.width)&&Xn(e.height)&&Xn(e.x)&&Xn(e.y),Xn=e=>!isNaN(e)&&isFinite(e),ch=(e,t)=>{},$l=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),Fl=({x:e,y:t},[n,o,i],a=!1,l=[1,1])=>{let r={x:(e-n)/i,y:(t-o)/i};return a?$l(r,l):r},Ps=({x:e,y:t},[n,o,i])=>({x:e*i+n,y:t*i+o});function Ul(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){let n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){let 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 cM(e,t,n){if(typeof e=="string"||typeof e=="number"){let o=Ul(e,n),i=Ul(e,t);return{top:o,right:i,bottom:o,left:i,x:i*2,y:o*2}}if(typeof e=="object"){let o=Ul(e.top??e.y??0,n),i=Ul(e.bottom??e.y??0,n),a=Ul(e.left??e.x??0,t),l=Ul(e.right??e.x??0,t);return{top:o,right:l,bottom:i,left:a,x:a+l,y:o+i}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function fM(e,t,n,o,i,a){let{x:l,y:r}=Ps(e,[t,n,o]),{x:s,y:u}=Ps({x:e.x+e.width,y:e.y+e.height},[t,n,o]),c=i-s,d=a-u;return{left:Math.floor(l),top:Math.floor(r),right:Math.floor(c),bottom:Math.floor(d)}}var Gs=(e,t,n,o,i,a)=>{let l=cM(a,t,n),r=(t-l.x)/e.width,s=(n-l.y)/e.height,u=Math.min(r,s),c=Yl(u,o,i),d=e.x+e.width/2,f=e.y+e.height/2,h=t/2-d*c,v=n/2-f*c,b=fM(e,h,v,c,t,n),S={left:Math.min(b.left-l.left,0),top:Math.min(b.top-l.top,0),right:Math.min(b.right-l.right,0),bottom:Math.min(b.bottom-l.bottom,0)};return{x:h-S.left+S.right,y:v-S.top+S.bottom,zoom:c}},Kl=()=>typeof navigator<"u"&&navigator?.userAgent?.indexOf("Mac")>=0;function Xl(e){return e!=null&&e!=="parent"}function So(e){return{width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}}function fh(e){return(e.measured?.width??e.width??e.initialWidth)!==void 0&&(e.measured?.height??e.height??e.initialHeight)!==void 0}function dh(e,t={width:0,height:0},n,o,i){let a={...e},l=o.get(n);if(l){let r=l.origin||i;a.x+=l.internals.positionAbsolute.x-(t.width??0)*r[0],a.y+=l.internals.positionAbsolute.y-(t.height??0)*r[1]}return a}function ph(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function Ix(){let e,t;return{promise:new Promise((o,i)=>{e=o,t=i}),resolve:e,reject:t}}function Vx(e){return{...th,...e||{}}}function Hs(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:o,containerBounds:i}){let{x:a,y:l}=qn(e),r=Fl({x:a-(i?.left??0),y:l-(i?.top??0)},o),{x:s,y:u}=n?$l(r,t):r;return{xSnapped:s,ySnapped:u,...r}}var Sf=e=>({width:e.offsetWidth,height:e.offsetHeight}),mh=e=>e?.getRootNode?.()||window?.document,dM=["INPUT","SELECT","TEXTAREA"];function hh(e){let t=e.composedPath?.()?.[0]||e.target;return t?.nodeType!==1?!1:dM.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}var gh=e=>"clientX"in e,qn=(e,t)=>{let n=gh(e),o=n?e.clientX:e.touches?.[0].clientX,i=n?e.clientY:e.touches?.[0].clientY;return{x:o-(t?.left??0),y:i-(t?.top??0)}},Tx=(e,t,n,o,i)=>{let a=t.querySelectorAll(`.${e}`);return!a||!a.length?null:Array.from(a).map(l=>{let r=l.getBoundingClientRect();return{id:l.getAttribute("data-handleid"),type:e,nodeId:i,position:l.getAttribute("data-handlepos"),x:(r.left-n.left)/o,y:(r.top-n.top)/o,...Sf(l)}})};function xf({sourceX:e,sourceY:t,targetX:n,targetY:o,sourceControlX:i,sourceControlY:a,targetControlX:l,targetControlY:r}){let s=e*.125+i*.375+l*.375+n*.125,u=t*.125+a*.375+r*.375+o*.125,c=Math.abs(s-e),d=Math.abs(u-t);return[s,u,c,d]}function mf(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function Nx({pos:e,x1:t,y1:n,x2:o,y2:i,c:a}){switch(e){case W.Left:return[t-mf(t-o,a),n];case W.Right:return[t+mf(o-t,a),n];case W.Top:return[t,n-mf(n-i,a)];case W.Bottom:return[t,n+mf(i-n,a)]}}function _f({sourceX:e,sourceY:t,sourcePosition:n=W.Bottom,targetX:o,targetY:i,targetPosition:a=W.Top,curvature:l=.25}){let[r,s]=Nx({pos:n,x1:e,y1:t,x2:o,y2:i,c:l}),[u,c]=Nx({pos:a,x1:o,y1:i,x2:e,y2:t,c:l}),[d,f,h,v]=xf({sourceX:e,sourceY:t,targetX:o,targetY:i,sourceControlX:r,sourceControlY:s,targetControlX:u,targetControlY:c});return[`M${e},${t} C${r},${s} ${u},${c} ${o},${i}`,d,f,h,v]}function yh({sourceX:e,sourceY:t,targetX:n,targetY:o}){let i=Math.abs(n-e)/2,a=n<e?n+i:n-i,l=Math.abs(o-t)/2,r=o<t?o+l:o-l;return[a,r,i,l]}function Yx({sourceNode:e,targetNode:t,selected:n=!1,zIndex:o=0,elevateOnSelect:i=!1,zIndexMode:a="basic"}){if(a==="manual")return o;let l=i&&n?o+1e3:o,r=Math.max(e.parentId||i&&e.selected?e.internals.z:0,t.parentId||i&&t.selected?t.internals.z:0);return l+r}function Xx({sourceNode:e,targetNode:t,width:n,height:o,transform:i}){let a=vf(gf(e),gf(t));a.x===a.x2&&(a.x2+=1),a.y===a.y2&&(a.y2+=1);let l={x:-i[0]/i[2],y:-i[1]/i[2],width:n/i[2],height:o/i[2]};return jl(l,bf(a))>0}var pM=({source:e,sourceHandle:t,target:n,targetHandle:o})=>`xy-edge__${e}${t||""}-${n}${o||""}`,mM=(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)),vh=(e,t,n={})=>{if(!e.source||!e.target)return ch("006",wn.error006()),t;let o=n.getEdgeId||pM,i;return ih(e)?i={...e}:i={...e,id:o(e)},mM(i,t)?t:(i.sourceHandle===null&&delete i.sourceHandle,i.targetHandle===null&&delete i.targetHandle,t.concat(i))};function Ef({sourceX:e,sourceY:t,targetX:n,targetY:o}){let[i,a,l,r]=yh({sourceX:e,sourceY:t,targetX:n,targetY:o});return[`M ${e},${t}L ${n},${o}`,i,a,l,r]}var Cx={[W.Left]:{x:-1,y:0},[W.Right]:{x:1,y:0},[W.Top]:{x:0,y:-1},[W.Bottom]:{x:0,y:1}},hM=({source:e,sourcePosition:t=W.Bottom,target:n})=>t===W.Left||t===W.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},wx=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function gM({source:e,sourcePosition:t=W.Bottom,target:n,targetPosition:o=W.Top,center:i,offset:a,stepPosition:l}){let r=Cx[t],s=Cx[o],u={x:e.x+r.x*a,y:e.y+r.y*a},c={x:n.x+s.x*a,y:n.y+s.y*a},d=hM({source:u,sourcePosition:t,target:c}),f=d.x!==0?"x":"y",h=d[f],v=[],b,S,p={x:0,y:0},y={x:0,y:0},[,,m,g]=yh({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(r[f]*s[f]===-1){f==="x"?(b=i.x??u.x+(c.x-u.x)*l,S=i.y??(u.y+c.y)/2):(b=i.x??(u.x+c.x)/2,S=i.y??u.y+(c.y-u.y)*l);let _=[{x:b,y:u.y},{x:b,y:c.y}],E=[{x:u.x,y:S},{x:c.x,y:S}];r[f]===h?v=f==="x"?_:E:v=f==="x"?E:_}else{let _=[{x:u.x,y:c.y}],E=[{x:c.x,y:u.y}];if(f==="x"?v=r.x===h?E:_:v=r.y===h?_:E,t===o){let z=Math.abs(e[f]-n[f]);if(z<=a){let I=Math.min(a-1,a-z);r[f]===h?p[f]=(u[f]>e[f]?-1:1)*I:y[f]=(c[f]>n[f]?-1:1)*I}}if(t!==o){let z=f==="x"?"y":"x",I=r[f]===s[z],T=u[z]>c[z],A=u[z]<c[z];(r[f]===1&&(!I&&T||I&&A)||r[f]!==1&&(!I&&A||I&&T))&&(v=f==="x"?_:E)}let w={x:u.x+p.x,y:u.y+p.y},C={x:c.x+y.x,y:c.y+y.y},H=Math.max(Math.abs(w.x-v[0].x),Math.abs(C.x-v[0].x)),D=Math.max(Math.abs(w.y-v[0].y),Math.abs(C.y-v[0].y));H>=D?(b=(w.x+C.x)/2,S=v[0].y):(b=v[0].x,S=(w.y+C.y)/2)}return[[e,{x:u.x+p.x,y:u.y+p.y},...v,{x:c.x+y.x,y:c.y+y.y},n],b,S,m,g]}function yM(e,t,n,o){let i=Math.min(wx(e,t)/2,wx(t,n)/2,o),{x:a,y:l}=t;if(e.x===a&&a===n.x||e.y===l&&l===n.y)return`L${a} ${l}`;if(e.y===l){let u=e.x<n.x?-1:1,c=e.y<n.y?1:-1;return`L ${a+i*u},${l}Q ${a},${l} ${a},${l+i*c}`}let r=e.x<n.x?1:-1,s=e.y<n.y?-1:1;return`L ${a},${l+i*s}Q ${a},${l} ${a+i*r},${l}`}function Us({sourceX:e,sourceY:t,sourcePosition:n=W.Bottom,targetX:o,targetY:i,targetPosition:a=W.Top,borderRadius:l=5,centerX:r,centerY:s,offset:u=20,stepPosition:c=.5}){let[d,f,h,v,b]=gM({source:{x:e,y:t},sourcePosition:n,target:{x:o,y:i},targetPosition:a,center:{x:r,y:s},offset:u,stepPosition:c});return[d.reduce((p,y,m)=>{let g="";return m>0&&m<d.length-1?g=yM(d[m-1],y,d[m+1],l):g=`${m===0?"M":"L"}${y.x} ${y.y}`,p+=g,p},""),f,h,v,b]}function Ax(e){return e&&!!(e.internals.handleBounds||e.handles?.length)&&!!(e.measured.width||e.width||e.initialWidth)}function qx(e){let{sourceNode:t,targetNode:n}=e;if(!Ax(t)||!Ax(n))return null;let o=t.internals.handleBounds||Mx(t.handles),i=n.internals.handleBounds||Mx(n.handles),a=Dx(o?.source??[],e.sourceHandle),l=Dx(e.connectionMode===Zi.Strict?i?.target??[]:(i?.target??[]).concat(i?.source??[]),e.targetHandle);if(!a||!l)return e.onError?.("008",wn.error008(a?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;let r=a?.position||W.Bottom,s=l?.position||W.Top,u=ji(t,a,r),c=ji(n,l,s);return{sourceX:u.x,sourceY:u.y,targetX:c.x,targetY:c.y,sourcePosition:r,targetPosition:s}}function Mx(e){if(!e)return null;let t=[],n=[];for(let o of e)o.width=o.width??1,o.height=o.height??1,o.type==="source"?t.push(o):o.type==="target"&&n.push(o);return{source:t,target:n}}function ji(e,t,n=W.Left,o=!1){let i=(t?.x??0)+e.internals.positionAbsolute.x,a=(t?.y??0)+e.internals.positionAbsolute.y,{width:l,height:r}=t??So(e);if(o)return{x:i+l/2,y:a+r/2};switch(t?.position??n){case W.Top:return{x:i+l/2,y:a};case W.Right:return{x:i+l,y:a+r/2};case W.Bottom:return{x:i+l/2,y:a+r};case W.Left:return{x:i,y:a+r/2}}}function Dx(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function Tf(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(o=>`${o}=${e[o]}`).join("&")}`:""}function Zx(e,{id:t,defaultColor:n,defaultMarkerStart:o,defaultMarkerEnd:i}){let a=new Set;return e.reduce((l,r)=>([r.markerStart||o,r.markerEnd||i].forEach(s=>{if(s&&typeof s=="object"){let u=Tf(s,t);a.has(u)||(l.push({id:u,color:s.color||n,...s}),a.add(u))}}),l),[]).sort((l,r)=>l.id.localeCompare(r.id))}var jx=1e3,vM=10,bh={nodeOrigin:[0,0],nodeExtent:ql,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},bM={...bh,checkEquality:!0};function Sh(e,t){let n={...e};for(let o in t)t[o]!==void 0&&(n[o]=t[o]);return n}function $x(e,t,n){let o=Sh(bh,n);for(let i of e.values())if(i.parentId)_h(i,e,t,o);else{let a=ks(i,o.nodeOrigin),l=Xl(i.extent)?i.extent:o.nodeExtent,r=Aa(a,l,So(i));i.internals.positionAbsolute=r}}function SM(e,t){if(!e.handles)return e.measured?t?.internals.handleBounds:void 0;let n=[],o=[];for(let i of e.handles){let a={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(a):i.type==="target"&&o.push(a)}return{source:n,target:o}}function xh(e){return e==="manual"}function Nf(e,t,n,o={}){let i=Sh(bM,o),a={i:0},l=new Map(t),r=i?.elevateNodesOnSelect&&!xh(i.zIndexMode)?jx:0,s=e.length>0;t.clear(),n.clear();for(let u of e){let c=l.get(u.id);if(i.checkEquality&&u===c?.internals.userNode)t.set(u.id,c);else{let d=ks(u,i.nodeOrigin),f=Xl(u.extent)?u.extent:i.nodeExtent,h=Aa(d,f,So(u));c={...i.defaults,...u,measured:{width:u.measured?.width,height:u.measured?.height},internals:{positionAbsolute:h,handleBounds:SM(u,c),z:Fx(u,r,i.zIndexMode),userNode:u}},t.set(u.id,c)}(c.measured===void 0||c.measured.width===void 0||c.measured.height===void 0)&&!c.hidden&&(s=!1),u.parentId&&_h(c,t,n,o,a)}return s}function xM(e,t){if(!e.parentId)return;let n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function _h(e,t,n,o,i){let{elevateNodesOnSelect:a,nodeOrigin:l,nodeExtent:r,zIndexMode:s}=Sh(bh,o),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}xM(e,n),i&&!c.parentId&&c.internals.rootParentIndex===void 0&&s==="auto"&&(c.internals.rootParentIndex=++i.i,c.internals.z=c.internals.z+i.i*vM),i&&c.internals.rootParentIndex!==void 0&&(i.i=c.internals.rootParentIndex);let d=a&&!xh(s)?jx:0,{x:f,y:h,z:v}=_M(e,c,l,r,d,s),{positionAbsolute:b}=e.internals,S=f!==b.x||h!==b.y;(S||v!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:S?{x:f,y:h}:b,z:v}})}function Fx(e,t,n){let o=Xn(e.zIndex)?e.zIndex:0;return xh(n)?o:o+(e.selected?t:0)}function _M(e,t,n,o,i,a){let{x:l,y:r}=t.internals.positionAbsolute,s=So(e),u=ks(e,n),c=Xl(e.extent)?Aa(u,e.extent,s):u,d=Aa({x:l+c.x,y:r+c.y},o,s);e.extent==="parent"&&(d=Gx(d,s,t));let f=Fx(e,i,a),h=t.internals.z??0;return{x:d.x,y:d.y,z:h>=f?h+1:f}}function Cf(e,t,n,o=[0,0]){let i=[],a=new Map;for(let l of e){let r=t.get(l.parentId);if(!r)continue;let s=a.get(l.parentId)?.expandedRect??Ma(r),u=sh(s,l.rect);a.set(l.parentId,{expandedRect:u,parent:r})}return a.size>0&&a.forEach(({expandedRect:l,parent:r},s)=>{let u=r.internals.positionAbsolute,c=So(r),d=r.origin??o,f=l.x<u.x?Math.round(Math.abs(u.x-l.x)):0,h=l.y<u.y?Math.round(Math.abs(u.y-l.y)):0,v=Math.max(c.width,Math.round(l.width)),b=Math.max(c.height,Math.round(l.height)),S=(v-c.width)*d[0],p=(b-c.height)*d[1];(f>0||h>0||S||p)&&(i.push({id:s,type:"position",position:{x:r.position.x-f+S,y:r.position.y-h+p}}),n.get(s)?.forEach(y=>{e.some(m=>m.id===y.id)||i.push({id:y.id,type:"position",position:{x:y.position.x+f,y:y.position.y+h}})})),(c.width<l.width||c.height<l.height||f||h)&&i.push({id:s,type:"dimensions",setAttributes:!0,dimensions:{width:v+(f?d[0]*f-S:0),height:b+(h?d[1]*h-p:0)}})}),i}function Kx(e,t,n,o,i,a,l){let r=o?.querySelector(".xyflow__viewport"),s=!1;if(!r)return{changes:[],updatedInternals:s};let u=[],c=window.getComputedStyle(r),{m22:d}=new window.DOMMatrixReadOnly(c.transform),f=[];for(let h of e.values()){let v=t.get(h.id);if(!v)continue;if(v.hidden){t.set(v.id,{...v,internals:{...v.internals,handleBounds:void 0}}),s=!0;continue}let b=Sf(h.nodeElement),S=v.measured.width!==b.width||v.measured.height!==b.height;if(!!(b.width&&b.height&&(S||!v.internals.handleBounds||h.force))){let y=h.nodeElement.getBoundingClientRect(),m=Xl(v.extent)?v.extent:a,{positionAbsolute:g}=v.internals;v.parentId&&v.extent==="parent"?g=Gx(g,b,t.get(v.parentId)):m&&(g=Aa(g,m,b));let x={...v,measured:b,internals:{...v.internals,positionAbsolute:g,handleBounds:{source:Tx("source",h.nodeElement,y,d,v.id),target:Tx("target",h.nodeElement,y,d,v.id)}}};t.set(v.id,x),v.parentId&&_h(x,t,n,{nodeOrigin:i,zIndexMode:l}),s=!0,S&&(u.push({id:v.id,type:"dimensions",dimensions:b}),v.expandParent&&v.parentId&&f.push({id:v.id,parentId:v.parentId,rect:Ma(x,i)}))}}if(f.length>0){let h=Cf(f,t,n,i);u.push(...h)}return{changes:u,updatedInternals:s}}async function Qx({delta:e,panZoom:t,transform:n,translateExtent:o,width:i,height:a}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);let l=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[i,a]],o),r=!!l&&(l.x!==n[0]||l.y!==n[1]||l.k!==n[2]);return Promise.resolve(r)}function Rx(e,t,n,o,i,a){let l=i,r=o.get(l)||new Map;o.set(l,r.set(n,t)),l=`${i}-${e}`;let s=o.get(l)||new Map;if(o.set(l,s.set(n,t)),a){l=`${i}-${e}-${a}`;let u=o.get(l)||new Map;o.set(l,u.set(n,t))}}function Eh(e,t,n){e.clear(),t.clear();for(let o of n){let{source:i,target:a,sourceHandle:l=null,targetHandle:r=null}=o,s={edgeId:o.id,source:i,target:a,sourceHandle:l,targetHandle:r},u=`${i}-${l}--${a}-${r}`,c=`${a}-${r}--${i}-${l}`;Rx("source",s,c,e,i,l),Rx("target",s,u,e,a,r),t.set(o.id,o)}}function Wx(e,t){if(!e.parentId)return!1;let n=t.get(e.parentId);return n?n.selected?!0:Wx(n,t):!1}function Ox(e,t,n){let o=e;do{if(o?.matches?.(t))return!0;if(o===n)return!1;o=o?.parentElement}while(o);return!1}function EM(e,t,n,o){let i=new Map;for(let[a,l]of e)if((l.selected||l.id===o)&&(!l.parentId||!Wx(l,e))&&(l.draggable||t&&typeof l.draggable>"u")){let r=e.get(a);r&&i.set(a,{id:a,position:r.position||{x:0,y:0},distance:{x:n.x-r.internals.positionAbsolute.x,y:n.y-r.internals.positionAbsolute.y},extent:r.extent,parentId:r.parentId,origin:r.origin,expandParent:r.expandParent,internals:{positionAbsolute:r.internals.positionAbsolute||{x:0,y:0}},measured:{width:r.measured.width??0,height:r.measured.height??0}})}return i}function Km({nodeId:e,dragItems:t,nodeLookup:n,dragging:o=!0}){let i=[];for(let[l,r]of t){let s=n.get(l)?.internals.userNode;s&&i.push({...s,position:r.position,dragging:o})}if(!e)return[i[0],i];let a=n.get(e)?.internals.userNode;return[a?{...a,position:t.get(e)?.position||a.position,dragging:o}:i[0],i]}function TM({dragItems:e,snapGrid:t,x:n,y:o}){let i=e.values().next().value;if(!i)return null;let a={x:n-i.distance.x,y:o-i.distance.y},l=$l(a,t);return{x:l.x-a.x,y:l.y-a.y}}function Jx({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:o,onDragStop:i}){let a={x:null,y:null},l=0,r=new Map,s=!1,u={x:0,y:0},c=null,d=!1,f=null,h=!1,v=!1,b=null;function S({noDragClassName:y,handleSelector:m,domNode:g,isSelectable:x,nodeId:_,nodeClickDistance:E=0}){f=Ct(g);function w({x:z,y:I}){let{nodeLookup:T,nodeExtent:A,snapGrid:M,snapToGrid:O,nodeOrigin:R,onNodeDrag:L,onSelectionDrag:V,onError:k,updateNodePositions:G}=t();a={x:z,y:I};let q=!1,Z=r.size>1,j=Z&&A?Jm(Zl(r)):null,se=Z&&O?TM({dragItems:r,snapGrid:M,x:z,y:I}):null;for(let[J,X]of r){if(!T.has(J))continue;let Q={x:z-X.distance.x,y:I-X.distance.y};O&&(Q=se?{x:Math.round(Q.x+se.x),y:Math.round(Q.y+se.y)}:$l(Q,M));let ue=null;if(Z&&A&&!X.extent&&j){let{positionAbsolute:ee}=X.internals,Te=ee.x-j.x+A[0][0],de=ee.x+X.measured.width-j.x2+A[1][0],be=ee.y-j.y+A[0][1],Le=ee.y+X.measured.height-j.y2+A[1][1];ue=[[Te,be],[de,Le]]}let{position:he,positionAbsolute:ie}=rh({nodeId:J,nextPosition:Q,nodeLookup:T,nodeExtent:ue||A,nodeOrigin:R,onError:k});q=q||X.position.x!==he.x||X.position.y!==he.y,X.position=he,X.internals.positionAbsolute=ie}if(v=v||q,!!q&&(G(r,!0),b&&(o||L||!_&&V))){let[J,X]=Km({nodeId:_,dragItems:r,nodeLookup:T});o?.(b,r,J,X),L?.(b,J,X),_||V?.(b,X)}}async function C(){if(!c)return;let{transform:z,panBy:I,autoPanSpeed:T,autoPanOnNodeDrag:A}=t();if(!A){s=!1,cancelAnimationFrame(l);return}let[M,O]=Ux(u,c,T);(M!==0||O!==0)&&(a.x=(a.x??0)-M/z[2],a.y=(a.y??0)-O/z[2],await I({x:M,y:O})&&w(a)),l=requestAnimationFrame(C)}function H(z){let{nodeLookup:I,multiSelectionActive:T,nodesDraggable:A,transform:M,snapGrid:O,snapToGrid:R,selectNodesOnDrag:L,onNodeDragStart:V,onSelectionDragStart:k,unselectNodesAndEdges:G}=t();d=!0,(!L||!x)&&!T&&_&&(I.get(_)?.selected||G()),x&&L&&_&&e?.(_);let q=Hs(z.sourceEvent,{transform:M,snapGrid:O,snapToGrid:R,containerBounds:c});if(a=q,r=EM(I,A,q,_),r.size>0&&(n||V||!_&&k)){let[Z,j]=Km({nodeId:_,dragItems:r,nodeLookup:I});n?.(z.sourceEvent,r,Z,j),V?.(z.sourceEvent,Z,j),_||k?.(z.sourceEvent,j)}}let D=qc().clickDistance(E).on("start",z=>{let{domNode:I,nodeDragThreshold:T,transform:A,snapGrid:M,snapToGrid:O}=t();c=I?.getBoundingClientRect()||null,h=!1,v=!1,b=z.sourceEvent,T===0&&H(z),a=Hs(z.sourceEvent,{transform:A,snapGrid:M,snapToGrid:O,containerBounds:c}),u=qn(z.sourceEvent,c)}).on("drag",z=>{let{autoPanOnNodeDrag:I,transform:T,snapGrid:A,snapToGrid:M,nodeDragThreshold:O,nodeLookup:R}=t(),L=Hs(z.sourceEvent,{transform:T,snapGrid:A,snapToGrid:M,containerBounds:c});if(b=z.sourceEvent,(z.sourceEvent.type==="touchmove"&&z.sourceEvent.touches.length>1||_&&!R.has(_))&&(h=!0),!h){if(!s&&I&&d&&(s=!0,C()),!d){let V=qn(z.sourceEvent,c),k=V.x-u.x,G=V.y-u.y;Math.sqrt(k*k+G*G)>O&&H(z)}(a.x!==L.xSnapped||a.y!==L.ySnapped)&&r&&d&&(u=qn(z.sourceEvent,c),w(L))}}).on("end",z=>{if(!(!d||h)&&(s=!1,d=!1,cancelAnimationFrame(l),r.size>0)){let{nodeLookup:I,updateNodePositions:T,onNodeDragStop:A,onSelectionDragStop:M}=t();if(v&&(T(r,!1),v=!1),i||A||!_&&M){let[O,R]=Km({nodeId:_,dragItems:r,nodeLookup:I,dragging:!1});i?.(z.sourceEvent,r,O,R),A?.(z.sourceEvent,O,R),_||M?.(z.sourceEvent,R)}}}).filter(z=>{let I=z.target;return!z.button&&(!y||!Ox(I,`.${y}`,g))&&(!m||Ox(I,m,g))});f.call(D)}function p(){f?.on(".drag",null)}return{update:S,destroy:p}}function NM(e,t,n){let o=[],i={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(let a of t.values())jl(i,Ma(a))>0&&o.push(a);return o}var CM=250;function wM(e,t,n,o){let i=[],a=1/0,l=NM(e,n,t+CM);for(let r of l){let s=[...r.internals.handleBounds?.source??[],...r.internals.handleBounds?.target??[]];for(let u of s){if(o.nodeId===u.nodeId&&o.type===u.type&&o.id===u.id)continue;let{x:c,y:d}=ji(r,u,u.position,!0),f=Math.sqrt(Math.pow(c-e.x,2)+Math.pow(d-e.y,2));f>t||(f<a?(i=[{...u,x:c,y:d}],a=f):f===a&&i.push({...u,x:c,y:d}))}}if(!i.length)return null;if(i.length>1){let r=o.type==="source"?"target":"source";return i.find(s=>s.type===r)??i[0]}return i[0]}function e_(e,t,n,o,i,a=!1){let l=o.get(e);if(!l)return null;let r=i==="strict"?l.internals.handleBounds?.[t]:[...l.internals.handleBounds?.source??[],...l.internals.handleBounds?.target??[]],s=(n?r?.find(u=>u.id===n):r?.[0])??null;return s&&a?{...s,...ji(l,s,s.position,!0)}:s}function t_(e,t){return e||(t?.classList.contains("target")?"target":t?.classList.contains("source")?"source":null)}function AM(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}var n_=()=>!0;function MM(e,{connectionMode:t,connectionRadius:n,handleId:o,nodeId:i,edgeUpdaterType:a,isTarget:l,domNode:r,nodeLookup:s,lib:u,autoPanOnConnect:c,flowId:d,panBy:f,cancelConnection:h,onConnectStart:v,onConnect:b,onConnectEnd:S,isValidConnection:p=n_,onReconnectEnd:y,updateConnection:m,getTransform:g,getFromHandle:x,autoPanSpeed:_,dragThreshold:E=1,handleDomNode:w}){let C=mh(e.target),H=0,D,{x:z,y:I}=qn(e),T=t_(a,w),A=r?.getBoundingClientRect(),M=!1;if(!A||!T)return;let O=e_(i,T,o,s,t);if(!O)return;let R=qn(e,A),L=!1,V=null,k=!1,G=null;function q(){if(!c||!A)return;let[he,ie]=Ux(R,A,_);f({x:he,y:ie}),H=requestAnimationFrame(q)}let Z={...O,nodeId:i,type:T,position:O.position},j=s.get(i),J={inProgress:!0,isValid:null,from:ji(j,Z,W.Left,!0),fromHandle:Z,fromPosition:Z.position,fromNode:j,to:R,toHandle:null,toPosition:_x[Z.position],toNode:null,pointer:R};function X(){M=!0,m(J),v?.(e,{nodeId:i,handleId:o,handleType:T})}E===0&&X();function Q(he){if(!M){let{x:Le,y:Be}=qn(he),dt=Le-z,Gt=Be-I;if(!(dt*dt+Gt*Gt>E*E))return;X()}if(!x()||!Z){ue(he);return}let ie=g();R=qn(he,A),D=wM(Fl(R,ie,!1,[1,1]),n,s,Z),L||(q(),L=!0);let ee=o_(he,{handle:D,connectionMode:t,fromNodeId:i,fromHandleId:o,fromType:l?"target":"source",isValidConnection:p,doc:C,lib:u,flowId:d,nodeLookup:s});G=ee.handleDomNode,V=ee.connection,k=AM(!!D,ee.isValid);let Te=s.get(i),de=Te?ji(Te,Z,W.Left,!0):J.from,be={...J,from:de,isValid:k,to:ee.toHandle&&k?Ps({x:ee.toHandle.x,y:ee.toHandle.y},ie):R,toHandle:ee.toHandle,toPosition:k&&ee.toHandle?ee.toHandle.position:_x[Z.position],toNode:ee.toHandle?s.get(ee.toHandle.nodeId):null,pointer:R};m(be),J=be}function ue(he){if(!("touches"in he&&he.touches.length>0)){if(M){(D||G)&&V&&k&&b?.(V);let{inProgress:ie,...ee}=J,Te={...ee,toPosition:J.toHandle?J.toPosition:null};S?.(he,Te),a&&y?.(he,Te)}h(),cancelAnimationFrame(H),L=!1,k=!1,V=null,G=null,C.removeEventListener("mousemove",Q),C.removeEventListener("mouseup",ue),C.removeEventListener("touchmove",Q),C.removeEventListener("touchend",ue)}}C.addEventListener("mousemove",Q),C.addEventListener("mouseup",ue),C.addEventListener("touchmove",Q),C.addEventListener("touchend",ue)}function o_(e,{handle:t,connectionMode:n,fromNodeId:o,fromHandleId:i,fromType:a,doc:l,lib:r,flowId:s,isValidConnection:u=n_,nodeLookup:c}){let d=a==="target",f=t?l.querySelector(`.${r}-flow__handle[data-id="${s}-${t?.nodeId}-${t?.id}-${t?.type}"]`):null,{x:h,y:v}=qn(e),b=l.elementFromPoint(h,v),S=b?.classList.contains(`${r}-flow__handle`)?b:f,p={handleDomNode:S,isValid:!1,connection:null,toHandle:null};if(S){let y=t_(void 0,S),m=S.getAttribute("data-nodeid"),g=S.getAttribute("data-handleid"),x=S.classList.contains("connectable"),_=S.classList.contains("connectableend");if(!m||!y)return p;let E={source:d?m:o,sourceHandle:d?g:i,target:d?o:m,targetHandle:d?i:g};p.connection=E;let C=x&&_&&(n===Zi.Strict?d&&y==="source"||!d&&y==="target":m!==o||g!==i);p.isValid=C&&u(E),p.toHandle=e_(m,y,g,c,n,!0)}return p}var wf={onPointerDown:MM,isValid:o_};function i_({domNode:e,panZoom:t,getTransform:n,getViewScale:o}){let i=Ct(e);function a({translateExtent:r,width:s,height:u,zoomStep:c=1,pannable:d=!0,zoomable:f=!0,inversePan:h=!1}){let v=m=>{if(m.sourceEvent.type!=="wheel"||!t)return;let g=n(),x=m.sourceEvent.ctrlKey&&Kl()?10:1,_=-m.sourceEvent.deltaY*(m.sourceEvent.deltaMode===1?.05:m.sourceEvent.deltaMode?1:.002)*c,E=g[2]*Math.pow(2,_*x);t.scaleTo(E)},b=[0,0],S=m=>{(m.sourceEvent.type==="mousedown"||m.sourceEvent.type==="touchstart")&&(b=[m.sourceEvent.clientX??m.sourceEvent.touches[0].clientX,m.sourceEvent.clientY??m.sourceEvent.touches[0].clientY])},p=m=>{let g=n();if(m.sourceEvent.type!=="mousemove"&&m.sourceEvent.type!=="touchmove"||!t)return;let x=[m.sourceEvent.clientX??m.sourceEvent.touches[0].clientX,m.sourceEvent.clientY??m.sourceEvent.touches[0].clientY],_=[x[0]-b[0],x[1]-b[1]];b=x;let E=o()*Math.max(g[2],Math.log(g[2]))*(h?-1:1),w={x:g[0]-_[0]*E,y:g[1]-_[1]*E},C=[[0,0],[s,u]];t.setViewportConstrained({x:w.x,y:w.y,zoom:g[2]},C,r)},y=pf().on("start",S).on("zoom",d?p:null).on("zoom.wheel",f?v:null);i.call(y,{})}function l(){i.on("zoom",null)}return{update:a,destroy:l,pointer:Xt}}var Af=e=>({x:e.x,y:e.y,zoom:e.k}),Qm=({x:e,y:t,zoom:n})=>Ca.translate(e,t).scale(n),Il=(e,t)=>e.target.closest(`.${t}`),a_=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),DM=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,Wm=(e,t=0,n=DM,o=()=>{})=>{let i=typeof t=="number"&&t>0;return i||o(),i?e.transition().duration(t).ease(n).on("end",o):e},l_=e=>{let t=e.ctrlKey&&Kl()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function RM({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:o,panOnScrollMode:i,panOnScrollSpeed:a,zoomOnPinch:l,onPanZoomStart:r,onPanZoom:s,onPanZoomEnd:u}){return c=>{if(Il(c,t))return c.ctrlKey&&c.preventDefault(),!1;c.preventDefault(),c.stopImmediatePropagation();let d=n.property("__zoom").k||1;if(c.ctrlKey&&l){let S=Xt(c),p=l_(c),y=d*Math.pow(2,p);o.scaleTo(n,y,S,c);return}let f=c.deltaMode===1?20:1,h=i===ti.Vertical?0:c.deltaX*f,v=i===ti.Horizontal?0:c.deltaY*f;!Kl()&&c.shiftKey&&i!==ti.Vertical&&(h=c.deltaY*f,v=0),o.translateBy(n,-(h/d)*a,-(v/d)*a,{internal:!0});let b=Af(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(s?.(c,b),e.panScrollTimeout=setTimeout(()=>{u?.(c,b),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,r?.(c,b))}}function OM({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(o,i){let a=o.type==="wheel",l=!t&&a&&!o.ctrlKey,r=Il(o,e);if(o.ctrlKey&&a&&r&&o.preventDefault(),l||r)return null;o.preventDefault(),n.call(this,o,i)}}function zM({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return o=>{if(o.sourceEvent?.internal)return;let i=Af(o.transform);e.mouseButton=o.sourceEvent?.button||0,e.isZoomingOrPanning=!0,e.prevViewport=i,o.sourceEvent?.type==="mousedown"&&t(!0),n&&n?.(o.sourceEvent,i)}}function LM({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:o,onPanZoom:i}){return a=>{e.usedRightMouseButton=!!(n&&a_(t,e.mouseButton??0)),a.sourceEvent?.sync||o([a.transform.x,a.transform.y,a.transform.k]),i&&!a.sourceEvent?.internal&&i?.(a.sourceEvent,Af(a.transform))}}function BM({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:o,onPanZoomEnd:i,onPaneContextMenu:a}){return l=>{if(!l.sourceEvent?.internal&&(e.isZoomingOrPanning=!1,a&&a_(t,e.mouseButton??0)&&!e.usedRightMouseButton&&l.sourceEvent&&a(l.sourceEvent),e.usedRightMouseButton=!1,o(!1),i)){let r=Af(l.transform);e.prevViewport=r,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{i?.(l.sourceEvent,r)},n?150:0)}}}function HM({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:o,panOnScroll:i,zoomOnDoubleClick:a,userSelectionActive:l,noWheelClassName:r,noPanClassName:s,lib:u,connectionInProgress:c}){return d=>{let f=e||t,h=n&&d.ctrlKey,v=d.type==="wheel";if(d.button===1&&d.type==="mousedown"&&(Il(d,`${u}-flow__node`)||Il(d,`${u}-flow__edge`)))return!0;if(!o&&!f&&!i&&!a&&!n||l||c&&!v||Il(d,r)&&v||Il(d,s)&&(!v||i&&v&&!e)||!n&&d.ctrlKey&&v)return!1;if(!n&&d.type==="touchstart"&&d.touches?.length>1)return d.preventDefault(),!1;if(!f&&!i&&!h&&v||!o&&(d.type==="mousedown"||d.type==="touchstart")||Array.isArray(o)&&!o.includes(d.button)&&d.type==="mousedown")return!1;let b=Array.isArray(o)&&o.includes(d.button)||!d.button||d.button<=1;return(!d.ctrlKey||v)&&b}}function r_({domNode:e,minZoom:t,maxZoom:n,translateExtent:o,viewport:i,onPanZoom:a,onPanZoomStart:l,onPanZoomEnd:r,onDraggingChange:s}){let u={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{x:0,y:0,zoom:0},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},c=e.getBoundingClientRect(),d=pf().scaleExtent([t,n]).translateExtent(o),f=Ct(e).call(d);y({x:i.x,y:i.y,zoom:Yl(i.zoom,t,n)},[[0,0],[c.width,c.height]],o);let h=f.on("wheel.zoom"),v=f.on("dblclick.zoom");d.wheelDelta(l_);function b(D,z){return f?new Promise(I=>{d?.interpolate(z?.interpolate==="linear"?Jo:Ea).transform(Wm(f,z?.duration,z?.ease,()=>I(!0)),D)}):Promise.resolve(!1)}function S({noWheelClassName:D,noPanClassName:z,onPaneContextMenu:I,userSelectionActive:T,panOnScroll:A,panOnDrag:M,panOnScrollMode:O,panOnScrollSpeed:R,preventScrolling:L,zoomOnPinch:V,zoomOnScroll:k,zoomOnDoubleClick:G,zoomActivationKeyPressed:q,lib:Z,onTransformChange:j,connectionInProgress:se,paneClickDistance:J,selectionOnDrag:X}){T&&!u.isZoomingOrPanning&&p();let Q=A&&!q&&!T;d.clickDistance(X?1/0:!Xn(J)||J<0?0:J);let ue=Q?RM({zoomPanValues:u,noWheelClassName:D,d3Selection:f,d3Zoom:d,panOnScrollMode:O,panOnScrollSpeed:R,zoomOnPinch:V,onPanZoomStart:l,onPanZoom:a,onPanZoomEnd:r}):OM({noWheelClassName:D,preventScrolling:L,d3ZoomHandler:h});if(f.on("wheel.zoom",ue,{passive:!1}),!T){let ie=zM({zoomPanValues:u,onDraggingChange:s,onPanZoomStart:l});d.on("start",ie);let ee=LM({zoomPanValues:u,panOnDrag:M,onPaneContextMenu:!!I,onPanZoom:a,onTransformChange:j});d.on("zoom",ee);let Te=BM({zoomPanValues:u,panOnDrag:M,panOnScroll:A,onPaneContextMenu:I,onPanZoomEnd:r,onDraggingChange:s});d.on("end",Te)}let he=HM({zoomActivationKeyPressed:q,panOnDrag:M,zoomOnScroll:k,panOnScroll:A,zoomOnDoubleClick:G,zoomOnPinch:V,userSelectionActive:T,noPanClassName:z,noWheelClassName:D,lib:Z,connectionInProgress:se});d.filter(he),G?f.on("dblclick.zoom",v):f.on("dblclick.zoom",null)}function p(){d.on("zoom",null)}async function y(D,z,I){let T=Qm(D),A=d?.constrain()(T,z,I);return A&&await b(A),new Promise(M=>M(A))}async function m(D,z){let I=Qm(D);return await b(I,z),new Promise(T=>T(I))}function g(D){if(f){let z=Qm(D),I=f.property("__zoom");(I.k!==D.zoom||I.x!==D.x||I.y!==D.y)&&d?.transform(f,z,null,{sync:!0})}}function x(){let D=f?Bs(f.node()):{x:0,y:0,k:1};return{x:D.x,y:D.y,zoom:D.k}}function _(D,z){return f?new Promise(I=>{d?.interpolate(z?.interpolate==="linear"?Jo:Ea).scaleTo(Wm(f,z?.duration,z?.ease,()=>I(!0)),D)}):Promise.resolve(!1)}function E(D,z){return f?new Promise(I=>{d?.interpolate(z?.interpolate==="linear"?Jo:Ea).scaleBy(Wm(f,z?.duration,z?.ease,()=>I(!0)),D)}):Promise.resolve(!1)}function w(D){d?.scaleExtent(D)}function C(D){d?.translateExtent(D)}function H(D){let z=!Xn(D)||D<0?0:D;d?.clickDistance(z)}return{update:S,destroy:p,setViewport:m,setViewportConstrained:y,getViewport:x,scaleTo:_,scaleBy:E,setScaleExtent:w,setTranslateExtent:C,syncViewport:g,setClickDistance:H}}var $i;(function(e){e.Line="line",e.Handle="handle"})($i||($i={}));function PM({width:e,prevWidth:t,height:n,prevHeight:o,affectsX:i,affectsY:a}){let l=e-t,r=n-o,s=[l>0?1:l<0?-1:0,r>0?1:r<0?-1:0];return l&&i&&(s[0]=s[0]*-1),r&&a&&(s[1]=s[1]*-1),s}function zx(e){let t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),o=e.includes("left"),i=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:o,affectsY:i}}function Xi(e,t){return Math.max(0,t-e)}function qi(e,t){return Math.max(0,e-t)}function hf(e,t,n){return Math.max(0,t-e,e-n)}function Lx(e,t){return e?!t:t}function kM(e,t,n,o,i,a,l,r){let{affectsX:s,affectsY:u}=t,{isHorizontal:c,isVertical:d}=t,f=c&&d,{xSnapped:h,ySnapped:v}=n,{minWidth:b,maxWidth:S,minHeight:p,maxHeight:y}=o,{x:m,y:g,width:x,height:_,aspectRatio:E}=e,w=Math.floor(c?h-e.pointerX:0),C=Math.floor(d?v-e.pointerY:0),H=x+(s?-w:w),D=_+(u?-C:C),z=-a[0]*x,I=-a[1]*_,T=hf(H,b,S),A=hf(D,p,y);if(l){let R=0,L=0;s&&w<0?R=Xi(m+w+z,l[0][0]):!s&&w>0&&(R=qi(m+H+z,l[1][0])),u&&C<0?L=Xi(g+C+I,l[0][1]):!u&&C>0&&(L=qi(g+D+I,l[1][1])),T=Math.max(T,R),A=Math.max(A,L)}if(r){let R=0,L=0;s&&w>0?R=qi(m+w,r[0][0]):!s&&w<0&&(R=Xi(m+H,r[1][0])),u&&C>0?L=qi(g+C,r[0][1]):!u&&C<0&&(L=Xi(g+D,r[1][1])),T=Math.max(T,R),A=Math.max(A,L)}if(i){if(c){let R=hf(H/E,p,y)*E;if(T=Math.max(T,R),l){let L=0;!s&&!u||s&&!u&&f?L=qi(g+I+H/E,l[1][1])*E:L=Xi(g+I+(s?w:-w)/E,l[0][1])*E,T=Math.max(T,L)}if(r){let L=0;!s&&!u||s&&!u&&f?L=Xi(g+H/E,r[1][1])*E:L=qi(g+(s?w:-w)/E,r[0][1])*E,T=Math.max(T,L)}}if(d){let R=hf(D*E,b,S)/E;if(A=Math.max(A,R),l){let L=0;!s&&!u||u&&!s&&f?L=qi(m+D*E+z,l[1][0])/E:L=Xi(m+(u?C:-C)*E+z,l[0][0])/E,A=Math.max(A,L)}if(r){let L=0;!s&&!u||u&&!s&&f?L=Xi(m+D*E,r[1][0])/E:L=qi(m+(u?C:-C)*E,r[0][0])/E,A=Math.max(A,L)}}}C=C+(C<0?A:-A),w=w+(w<0?T:-T),i&&(f?H>D*E?C=(Lx(s,u)?-w:w)/E:w=(Lx(s,u)?-C:C)*E:c?(C=w/E,u=s):(w=C*E,s=u));let M=s?m+w:m,O=u?g+C:g;return{width:x+(s?-w:w),height:_+(u?-C:C),x:a[0]*w*(s?-1:1)+M,y:a[1]*C*(u?-1:1)+O}}var s_={width:0,height:0,x:0,y:0},GM={...s_,pointerX:0,pointerY:0,aspectRatio:1};function UM(e){return[[0,0],[e.measured.width,e.measured.height]]}function IM(e,t,n){let o=t.position.x+e.position.x,i=t.position.y+e.position.y,a=e.measured.width??0,l=e.measured.height??0,r=n[0]*a,s=n[1]*l;return[[o-r,i-s],[o+a-r,i+l-s]]}function u_({domNode:e,nodeId:t,getStoreItems:n,onChange:o,onEnd:i}){let a=Ct(e),l={controlDirection:zx("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function r({controlPosition:u,boundaries:c,keepAspectRatio:d,resizeDirection:f,onResizeStart:h,onResize:v,onResizeEnd:b,shouldResize:S}){let p={...s_},y={...GM};l={boundaries:c,resizeDirection:f,keepAspectRatio:d,controlDirection:zx(u)};let m,g=null,x=[],_,E,w,C=!1,H=qc().on("start",D=>{let{nodeLookup:z,transform:I,snapGrid:T,snapToGrid:A,nodeOrigin:M,paneDomNode:O}=n();if(m=z.get(t),!m)return;g=O?.getBoundingClientRect()??null;let{xSnapped:R,ySnapped:L}=Hs(D.sourceEvent,{transform:I,snapGrid:T,snapToGrid:A,containerBounds:g});p={width:m.measured.width??0,height:m.measured.height??0,x:m.position.x??0,y:m.position.y??0},y={...p,pointerX:R,pointerY:L,aspectRatio:p.width/p.height},_=void 0,m.parentId&&(m.extent==="parent"||m.expandParent)&&(_=z.get(m.parentId),E=_&&m.extent==="parent"?UM(_):void 0),x=[],w=void 0;for(let[V,k]of z)if(k.parentId===t&&(x.push({id:V,position:{...k.position},extent:k.extent}),k.extent==="parent"||k.expandParent)){let G=IM(k,m,k.origin??M);w?w=[[Math.min(G[0][0],w[0][0]),Math.min(G[0][1],w[0][1])],[Math.max(G[1][0],w[1][0]),Math.max(G[1][1],w[1][1])]]:w=G}h?.(D,{...p})}).on("drag",D=>{let{transform:z,snapGrid:I,snapToGrid:T,nodeOrigin:A}=n(),M=Hs(D.sourceEvent,{transform:z,snapGrid:I,snapToGrid:T,containerBounds:g}),O=[];if(!m)return;let{x:R,y:L,width:V,height:k}=p,G={},q=m.origin??A,{width:Z,height:j,x:se,y:J}=kM(y,l.controlDirection,M,l.boundaries,l.keepAspectRatio,q,E,w),X=Z!==V,Q=j!==k,ue=se!==R&&X,he=J!==L&&Q;if(!ue&&!he&&!X&&!Q)return;if((ue||he||q[0]===1||q[1]===1)&&(G.x=ue?se:p.x,G.y=he?J:p.y,p.x=G.x,p.y=G.y,x.length>0)){let de=se-R,be=J-L;for(let Le of x)Le.position={x:Le.position.x-de+q[0]*(Z-V),y:Le.position.y-be+q[1]*(j-k)},O.push(Le)}if((X||Q)&&(G.width=X&&(!l.resizeDirection||l.resizeDirection==="horizontal")?Z:p.width,G.height=Q&&(!l.resizeDirection||l.resizeDirection==="vertical")?j:p.height,p.width=G.width,p.height=G.height),_&&m.expandParent){let de=q[0]*(G.width??0);G.x&&G.x<de&&(p.x=de,y.x=y.x-(G.x-de));let be=q[1]*(G.height??0);G.y&&G.y<be&&(p.y=be,y.y=y.y-(G.y-be))}let ie=PM({width:p.width,prevWidth:V,height:p.height,prevHeight:k,affectsX:l.controlDirection.affectsX,affectsY:l.controlDirection.affectsY}),ee={...p,direction:ie};S?.(D,ee)!==!1&&(C=!0,v?.(D,ee),o(G,O))}).on("end",D=>{C&&(b?.(D,{...p}),i?.({...p}),C=!1)});a.call(H)}function s(){a.on(".drag",null)}return{update:r,destroy:s}}var __=oe(At(),1),E_=oe(y_(),1);var b_={},v_=e=>{let t,n=new Set,o=(c,d)=>{let f=typeof c=="function"?c(t):c;if(!Object.is(f,t)){let h=t;t=d??(typeof f!="object"||f===null)?f:Object.assign({},t,f),n.forEach(v=>v(t,h))}},i=()=>t,s={setState:o,getState:i,getInitialState:()=>u,subscribe:c=>(n.add(c),()=>n.delete(c)),destroy:()=>{(b_.env?b_.env.MODE: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(o,i,s);return s},S_=e=>e?v_(e):v_;var{useDebugValue:aD}=__.default,{useSyncExternalStoreWithSelector:lD}=E_.default,rD=e=>e;function Nh(e,t=rD,n){let o=lD(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return aD(o),o}var x_=(e,t)=>{let n=S_(e),o=(i,a=t)=>Nh(n,i,a);return Object.assign(o,n),o},T_=(e,t)=>e?x_(e,t):x_;function je(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(let[o,i]of e)if(!Object.is(i,t.get(o)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let o of e)if(!t.has(o))return!1;return!0}let n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let o of n)if(!Object.prototype.hasOwnProperty.call(t,o)||!Object.is(e[o],t[o]))return!1;return!0}var sD=oe(cd()),zf=(0,P.createContext)(null),uD=zf.Provider,$_=wn.error001();function Ae(e,t){let n=(0,P.useContext)(zf);if(n===null)throw new Error($_);return Nh(n,e,t)}function Qe(){let e=(0,P.useContext)(zf);if(e===null)throw new Error($_);return(0,P.useMemo)(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}var N_={display:"none"},cD={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},F_="react-flow__node-desc",K_="react-flow__edge-desc",fD="react-flow__aria-live",dD=e=>e.ariaLiveMessage,pD=e=>e.ariaLabelConfig;function mD({rfId:e}){let t=Ae(dD);return(0,B.jsx)("div",{id:`${fD}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:cD,children:t})}function hD({rfId:e,disableKeyboardA11y:t}){let n=Ae(pD);return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)("div",{id:`${F_}-${e}`,style:N_,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),(0,B.jsx)("div",{id:`${K_}-${e}`,style:N_,children:n["edge.a11yDescription.default"]}),!t&&(0,B.jsx)(mD,{rfId:e})]})}var Jl=(0,P.forwardRef)(({position:e="top-left",children:t,className:n,style:o,...i},a)=>{let l=`${e}`.split("-");return(0,B.jsx)("div",{className:ot(["react-flow__panel",n,...l]),style:o,ref:a,...i,children:t})});Jl.displayName="Panel";function gD({proOptions:e,position:t="bottom-right"}){return e?.hideAttribution?null:(0,B.jsx)(Jl,{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:(0,B.jsx)("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}var yD=e=>{let t=[],n=[];for(let[,o]of e.nodeLookup)o.selected&&t.push(o.internals.userNode);for(let[,o]of e.edgeLookup)o.selected&&n.push(o);return{selectedNodes:t,selectedEdges:n}},Df=e=>e.id;function vD(e,t){return je(e.selectedNodes.map(Df),t.selectedNodes.map(Df))&&je(e.selectedEdges.map(Df),t.selectedEdges.map(Df))}function bD({onSelectionChange:e}){let t=Qe(),{selectedNodes:n,selectedEdges:o}=Ae(yD,vD);return(0,P.useEffect)(()=>{let i={nodes:n,edges:o};e?.(i),t.getState().onSelectionChangeHandlers.forEach(a=>a(i))},[n,o,e]),null}var SD=e=>!!e.onSelectionChangeHandlers;function xD({onSelectionChange:e}){let t=Ae(SD);return e||t?(0,B.jsx)(bD,{onSelectionChange:e}):null}var Q_=[0,0],_D={x:0,y:0,zoom:1},ED=["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"],C_=[...ED,"rfId"],TD=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}),w_={translateExtent:ql,nodeOrigin:Q_,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function ND(e){let{setNodes:t,setEdges:n,setMinZoom:o,setMaxZoom:i,setTranslateExtent:a,setNodeExtent:l,reset:r,setDefaultNodesAndEdges:s}=Ae(TD,je),u=Qe();(0,P.useEffect)(()=>(s(e.defaultNodes,e.defaultEdges),()=>{c.current=w_,r()}),[]);let c=(0,P.useRef)(w_);return(0,P.useEffect)(()=>{for(let d of C_){let f=e[d],h=c.current[d];f!==h&&(typeof e[d]>"u"||(d==="nodes"?t(f):d==="edges"?n(f):d==="minZoom"?o(f):d==="maxZoom"?i(f):d==="translateExtent"?a(f):d==="nodeExtent"?l(f):d==="ariaLabelConfig"?u.setState({ariaLabelConfig:Vx(f)}):d==="fitView"?u.setState({fitViewQueued:f}):d==="fitViewOptions"?u.setState({fitViewOptions:f}):u.setState({[d]:f})))}c.current=e},C_.map(d=>e[d])),null}function A_(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function CD(e){let[t,n]=(0,P.useState)(e==="system"?null:e);return(0,P.useEffect)(()=>{if(e!=="system"){n(e);return}let o=A_(),i=()=>n(o?.matches?"dark":"light");return i(),o?.addEventListener("change",i),()=>{o?.removeEventListener("change",i)}},[e]),t!==null?t:A_()?.matches?"dark":"light"}var M_=typeof document<"u"?document:null;function Is(e=null,t={target:M_,actInsideInputWithModifier:!0}){let[n,o]=(0,P.useState)(!1),i=(0,P.useRef)(!1),a=(0,P.useRef)(new Set([])),[l,r]=(0,P.useMemo)(()=>{if(e!==null){let u=(Array.isArray(e)?e:[e]).filter(d=>typeof d=="string").map(d=>d.replace("+",`
|
|
8
|
+
`+o.stack}}var Wd=Object.prototype.hasOwnProperty,Vp=gt.unstable_scheduleCallback,hd=gt.unstable_cancelCallback,_2=gt.unstable_shouldYield,E2=gt.unstable_requestPaint,Sn=gt.unstable_now,T2=gt.unstable_getCurrentPriorityLevel,A0=gt.unstable_ImmediatePriority,M0=gt.unstable_UserBlockingPriority,Xu=gt.unstable_NormalPriority,N2=gt.unstable_LowPriority,D0=gt.unstable_IdlePriority,C2=gt.log,w2=gt.unstable_setDisableYieldValue,ns=null,xn=null;function Si(e){if(typeof C2=="function"&&w2(e),xn&&typeof xn.setStrictMode=="function")try{xn.setStrictMode(ns,e)}catch{}}var _n=Math.clz32?Math.clz32:D2,A2=Math.log,M2=Math.LN2;function D2(e){return e>>>=0,e===0?32:31-(A2(e)/M2|0)|0}var uu=256,cu=262144,fu=4194304;function Wi(e){var t=e&42;if(t!==0)return t;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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function gc(e,t,n){var o=e.pendingLanes;if(o===0)return 0;var i=0,a=e.suspendedLanes,l=e.pingedLanes;e=e.warmLanes;var r=o&134217727;return r!==0?(o=r&~a,o!==0?i=Wi(o):(l&=r,l!==0?i=Wi(l):n||(n=r&~e,n!==0&&(i=Wi(n))))):(r=o&~a,r!==0?i=Wi(r):l!==0?i=Wi(l):n||(n=o&~e,n!==0&&(i=Wi(n)))),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&(n&4194048)!==0)?t:i}function os(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function R2(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32: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:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function R0(){var e=fu;return fu<<=1,(fu&62914560)===0&&(fu=4194304),e}function gd(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function is(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function O2(e,t,n,o,i,a){var l=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var r=e.entanglements,s=e.expirationTimes,u=e.hiddenUpdates;for(n=l&~n;0<n;){var c=31-_n(n),d=1<<c;r[c]=0,s[c]=-1;var f=u[c];if(f!==null)for(u[c]=null,c=0;c<f.length;c++){var h=f[c];h!==null&&(h.lane&=-536870913)}n&=~d}o!==0&&O0(e,o,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(l&~t))}function O0(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var o=31-_n(t);e.entangledLanes|=t,e.entanglements[o]=e.entanglements[o]|1073741824|n&261930}function z0(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var o=31-_n(n),i=1<<o;i&t|e[o]&t&&(e[o]|=t),n&=~i}}function L0(e,t){var n=t&-t;return n=(n&42)!==0?1:Yp(n),(n&(e.suspendedLanes|t))!==0?0:n}function Yp(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Xp(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function B0(){var e=De.p;return e!==0?e:(e=window.event,e===void 0?32:i1(e.type))}function ey(e,t){var n=De.p;try{return De.p=e,t()}finally{De.p=n}}var ki=Math.random().toString(36).slice(2),Dt="__reactFiber$"+ki,rn="__reactProps$"+ki,Cl="__reactContainer$"+ki,Jd="__reactEvents$"+ki,z2="__reactListeners$"+ki,L2="__reactHandles$"+ki,ty="__reactResources$"+ki,as="__reactMarker$"+ki;function qp(e){delete e[Dt],delete e[rn],delete e[Jd],delete e[z2],delete e[L2]}function Wa(e){var t=e[Dt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Cl]||n[Dt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=u0(e);e!==null;){if(n=e[Dt])return n;e=u0(e)}return t}e=n,n=e.parentNode}return null}function wl(e){if(e=e[Dt]||e[Cl]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Nr(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(U(33))}function sl(e){var t=e[ty];return t||(t=e[ty]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Tt(e){e[as]=!0}var H0=new Set,P0={};function fa(e,t){gl(e,t),gl(e+"Capture",t)}function gl(e,t){for(P0[e]=t,e=0;e<t.length;e++)H0.add(t[e])}var B2=RegExp("^[: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]*$"),ny={},oy={};function H2(e){return Wd.call(oy,e)?!0:Wd.call(ny,e)?!1:B2.test(e)?oy[e]=!0:(ny[e]=!0,!1)}function Cu(e,t,n){if(H2(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var o=t.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function du(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function zo(e,t,n,o){if(o===null)e.removeAttribute(n);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+o)}}function Hn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function k0(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function P2(e,t,n){var o=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var i=o.get,a=o.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(l){n=""+l,a.call(this,l)}}),Object.defineProperty(e,t,{enumerable:o.enumerable}),{getValue:function(){return n},setValue:function(l){n=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ep(e){if(!e._valueTracker){var t=k0(e)?"checked":"value";e._valueTracker=P2(e,t,""+e[t])}}function G0(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),o="";return e&&(o=k0(e)?e.checked?"true":"false":e.value),e=o,e!==n?(t.setValue(e),!0):!1}function qu(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}}var k2=/[\n"\\]/g;function Gn(e){return e.replace(k2,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function tp(e,t,n,o,i,a,l,r){e.name="",l!=null&&typeof l!="function"&&typeof l!="symbol"&&typeof l!="boolean"?e.type=l:e.removeAttribute("type"),t!=null?l==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Hn(t)):e.value!==""+Hn(t)&&(e.value=""+Hn(t)):l!=="submit"&&l!=="reset"||e.removeAttribute("value"),t!=null?np(e,l,Hn(t)):n!=null?np(e,l,Hn(n)):o!=null&&e.removeAttribute("value"),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!="function"&&typeof i!="symbol"),r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"?e.name=""+Hn(r):e.removeAttribute("name")}function U0(e,t,n,o,i,a,l,r){if(a!=null&&typeof a!="function"&&typeof a!="symbol"&&typeof a!="boolean"&&(e.type=a),t!=null||n!=null){if(!(a!=="submit"&&a!=="reset"||t!=null)){ep(e);return}n=n!=null?""+Hn(n):"",t=t!=null?""+Hn(t):n,r||t===e.value||(e.value=t),e.defaultValue=t}o=o??i,o=typeof o!="function"&&typeof o!="symbol"&&!!o,e.checked=r?e.checked:!!o,e.defaultChecked=!!o,l!=null&&typeof l!="function"&&typeof l!="symbol"&&typeof l!="boolean"&&(e.name=l),ep(e)}function np(e,t,n){t==="number"&&qu(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function ul(e,t,n,o){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&&o&&(e[n].defaultSelected=!0)}else{for(n=""+Hn(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,o&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function I0(e,t,n){if(t!=null&&(t=""+Hn(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Hn(n):""}function V0(e,t,n,o){if(t==null){if(o!=null){if(n!=null)throw Error(U(92));if(Tr(o)){if(1<o.length)throw Error(U(93));o=o[0]}n=o}n==null&&(n=""),t=n}n=Hn(t),e.defaultValue=n,o=e.textContent,o===n&&o!==""&&o!==null&&(e.value=o),ep(e)}function yl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var G2=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function iy(e,t,n){var o=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?o?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":o?e.setProperty(t,n):typeof n!="number"||n===0||G2.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function Y0(e,t,n){if(t!=null&&typeof t!="object")throw Error(U(62));if(e=e.style,n!=null){for(var o in n)!n.hasOwnProperty(o)||t!=null&&t.hasOwnProperty(o)||(o.indexOf("--")===0?e.setProperty(o,""):o==="float"?e.cssFloat="":e[o]="");for(var i in t)o=t[i],t.hasOwnProperty(i)&&n[i]!==o&&iy(e,i,o)}else for(var a in t)t.hasOwnProperty(a)&&iy(e,a,t[a])}function Zp(e){if(e.indexOf("-")===-1)return!1;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 U2=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),I2=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function wu(e){return I2.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Io(){}var op=null;function jp(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ja=null,cl=null;function ay(e){var t=wl(e);if(t&&(e=t.stateNode)){var n=e[rn]||null;e:switch(e=t.stateNode,t.type){case"input":if(tp(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+Gn(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var o=n[t];if(o!==e&&o.form===e.form){var i=o[rn]||null;if(!i)throw Error(U(90));tp(o,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)o=n[t],o.form===e.form&&G0(o)}break e;case"textarea":I0(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&ul(e,!!n.multiple,t,!1)}}}var yd=!1;function X0(e,t,n){if(yd)return e(t,n);yd=!0;try{var o=e(t);return o}finally{if(yd=!1,(Ja!==null||cl!==null)&&(Ac(),Ja&&(t=Ja,e=cl,cl=Ja=null,ay(t),e)))for(t=0;t<e.length;t++)ay(e[t])}}function Vr(e,t){var n=e.stateNode;if(n===null)return null;var o=n[rn]||null;if(o===null)return null;n=o[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":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(U(231,t,typeof n));return n}var Zo=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ip=!1;if(Zo)try{qa={},Object.defineProperty(qa,"passive",{get:function(){ip=!0}}),window.addEventListener("test",qa,qa),window.removeEventListener("test",qa,qa)}catch{ip=!1}var qa,xi=null,$p=null,Au=null;function q0(){if(Au)return Au;var e,t=$p,n=t.length,o,i="value"in xi?xi.value:xi.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var l=n-e;for(o=1;o<=l&&t[n-o]===i[a-o];o++);return Au=i.slice(e,1<o?1-o:void 0)}function Mu(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 pu(){return!0}function ly(){return!1}function sn(e){function t(n,o,i,a,l){this._reactName=n,this._targetInst=i,this.type=o,this.nativeEvent=a,this.target=l,this.currentTarget=null;for(var r in e)e.hasOwnProperty(r)&&(n=e[r],this[r]=n?n(a):a[r]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?pu:ly,this.isPropagationStopped=ly,this}return Ze(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=pu)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=pu)},persist:function(){},isPersistent:pu}),t}var da={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},yc=sn(da),ls=Ze({},da,{view:0,detail:0}),V2=sn(ls),vd,bd,yr,vc=Ze({},ls,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Fp,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!==yr&&(yr&&e.type==="mousemove"?(vd=e.screenX-yr.screenX,bd=e.screenY-yr.screenY):bd=vd=0,yr=e),vd)},movementY:function(e){return"movementY"in e?e.movementY:bd}}),ry=sn(vc),Y2=Ze({},vc,{dataTransfer:0}),X2=sn(Y2),q2=Ze({},ls,{relatedTarget:0}),Sd=sn(q2),Z2=Ze({},da,{animationName:0,elapsedTime:0,pseudoElement:0}),j2=sn(Z2),$2=Ze({},da,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),F2=sn($2),K2=Ze({},da,{data:0}),sy=sn(K2),Q2={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},W2={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"},J2={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function eN(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=J2[e])?!!t[e]:!1}function Fp(){return eN}var tN=Ze({},ls,{key:function(e){if(e.key){var t=Q2[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Mu(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?W2[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Fp,charCode:function(e){return e.type==="keypress"?Mu(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Mu(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),nN=sn(tN),oN=Ze({},vc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),uy=sn(oN),iN=Ze({},ls,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Fp}),aN=sn(iN),lN=Ze({},da,{propertyName:0,elapsedTime:0,pseudoElement:0}),rN=sn(lN),sN=Ze({},vc,{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}),uN=sn(sN),cN=Ze({},da,{newState:0,oldState:0}),fN=sn(cN),dN=[9,13,27,32],Kp=Zo&&"CompositionEvent"in window,Ar=null;Zo&&"documentMode"in document&&(Ar=document.documentMode);var pN=Zo&&"TextEvent"in window&&!Ar,Z0=Zo&&(!Kp||Ar&&8<Ar&&11>=Ar),cy=" ",fy=!1;function j0(e,t){switch(e){case"keyup":return dN.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function $0(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var el=!1;function mN(e,t){switch(e){case"compositionend":return $0(t);case"keypress":return t.which!==32?null:(fy=!0,cy);case"textInput":return e=t.data,e===cy&&fy?null:e;default:return null}}function hN(e,t){if(el)return e==="compositionend"||!Kp&&j0(e,t)?(e=q0(),Au=$p=xi=null,el=!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 Z0&&t.locale!=="ko"?null:t.data;default:return null}}var gN={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 dy(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!gN[e.type]:t==="textarea"}function F0(e,t,n,o){Ja?cl?cl.push(o):cl=[o]:Ja=o,t=uc(t,"onChange"),0<t.length&&(n=new yc("onChange","change",null,n,o),e.push({event:n,listeners:t}))}var Mr=null,Yr=null;function yN(e){Xb(e,0)}function bc(e){var t=Nr(e);if(G0(t))return e}function py(e,t){if(e==="change")return t}var K0=!1;Zo&&(Zo?(hu="oninput"in document,hu||(xd=document.createElement("div"),xd.setAttribute("oninput","return;"),hu=typeof xd.oninput=="function"),mu=hu):mu=!1,K0=mu&&(!document.documentMode||9<document.documentMode));var mu,hu,xd;function my(){Mr&&(Mr.detachEvent("onpropertychange",Q0),Yr=Mr=null)}function Q0(e){if(e.propertyName==="value"&&bc(Yr)){var t=[];F0(t,Yr,e,jp(e)),X0(yN,t)}}function vN(e,t,n){e==="focusin"?(my(),Mr=t,Yr=n,Mr.attachEvent("onpropertychange",Q0)):e==="focusout"&&my()}function bN(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return bc(Yr)}function SN(e,t){if(e==="click")return bc(t)}function xN(e,t){if(e==="input"||e==="change")return bc(t)}function _N(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Tn=typeof Object.is=="function"?Object.is:_N;function Xr(e,t){if(Tn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(o=0;o<n.length;o++){var i=n[o];if(!Wd.call(t,i)||!Tn(e[i],t[i]))return!1}return!0}function hy(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function gy(e,t){var n=hy(e);e=0;for(var o;n;){if(n.nodeType===3){if(o=e+n.textContent.length,e<=t&&o>=t)return{node:n,offset:t-e};e=o}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=hy(n)}}function W0(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?W0(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function J0(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=qu(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=qu(e.document)}return t}function Qp(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")}var EN=Zo&&"documentMode"in document&&11>=document.documentMode,tl=null,ap=null,Dr=null,lp=!1;function yy(e,t,n){var o=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;lp||tl==null||tl!==qu(o)||(o=tl,"selectionStart"in o&&Qp(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),Dr&&Xr(Dr,o)||(Dr=o,o=uc(ap,"onSelect"),0<o.length&&(t=new yc("onSelect","select",null,t,n),e.push({event:t,listeners:o}),t.target=tl)))}function Ki(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var nl={animationend:Ki("Animation","AnimationEnd"),animationiteration:Ki("Animation","AnimationIteration"),animationstart:Ki("Animation","AnimationStart"),transitionrun:Ki("Transition","TransitionRun"),transitionstart:Ki("Transition","TransitionStart"),transitioncancel:Ki("Transition","TransitionCancel"),transitionend:Ki("Transition","TransitionEnd")},_d={},ev={};Zo&&(ev=document.createElement("div").style,"AnimationEvent"in window||(delete nl.animationend.animation,delete nl.animationiteration.animation,delete nl.animationstart.animation),"TransitionEvent"in window||delete nl.transitionend.transition);function pa(e){if(_d[e])return _d[e];if(!nl[e])return e;var t=nl[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in ev)return _d[e]=t[n];return e}var tv=pa("animationend"),nv=pa("animationiteration"),ov=pa("animationstart"),TN=pa("transitionrun"),NN=pa("transitionstart"),CN=pa("transitioncancel"),iv=pa("transitionend"),av=new Map,rp="abort auxClick beforeToggle 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(" ");rp.push("scrollEnd");function to(e,t){av.set(e,t),fa(t,[e])}var Zu=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Bn=[],ol=0,Wp=0;function Sc(){for(var e=ol,t=Wp=ol=0;t<e;){var n=Bn[t];Bn[t++]=null;var o=Bn[t];Bn[t++]=null;var i=Bn[t];Bn[t++]=null;var a=Bn[t];if(Bn[t++]=null,o!==null&&i!==null){var l=o.pending;l===null?i.next=i:(i.next=l.next,l.next=i),o.pending=i}a!==0&&lv(n,i,a)}}function xc(e,t,n,o){Bn[ol++]=e,Bn[ol++]=t,Bn[ol++]=n,Bn[ol++]=o,Wp|=o,e.lanes|=o,e=e.alternate,e!==null&&(e.lanes|=o)}function Jp(e,t,n,o){return xc(e,t,n,o),ju(e)}function ma(e,t){return xc(e,null,null,t),ju(e)}function lv(e,t,n){e.lanes|=n;var o=e.alternate;o!==null&&(o.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,o=a.alternate,o!==null&&(o.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-_n(n),e=a.hiddenUpdates,o=e[i],o===null?e[i]=[t]:o.push(t),t.lane=n|536870912),a):null}function ju(e){if(50<Gr)throw Gr=0,Ap=null,Error(U(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var il={};function wN(e,t,n,o){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function vn(e,t,n,o){return new wN(e,t,n,o)}function em(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Yo(e,t){var n=e.alternate;return n===null?(n=vn(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&65011712,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.refCleanup=e.refCleanup,n}function rv(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Du(e,t,n,o,i,a){var l=0;if(o=e,typeof e=="function")em(e)&&(l=1);else if(typeof e=="string")l=DC(e,n,mo.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case $d:return e=vn(31,n,t,i),e.elementType=$d,e.lanes=a,e;case Ka:return na(n.children,i,a,t);case C0:l=8,i|=24;break;case qd:return e=vn(12,n,t,i|2),e.elementType=qd,e.lanes=a,e;case Zd:return e=vn(13,n,t,i),e.elementType=Zd,e.lanes=a,e;case jd:return e=vn(19,n,t,i),e.elementType=jd,e.lanes=a,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Uo:l=10;break e;case w0:l=9;break e;case Up:l=11;break e;case Ip:l=14;break e;case mi:l=16,o=null;break e}l=29,n=Error(U(130,e===null?"null":typeof e,"")),o=null}return t=vn(l,n,t,i),t.elementType=e,t.type=o,t.lanes=a,t}function na(e,t,n,o){return e=vn(7,e,o,t),e.lanes=n,e}function Ed(e,t,n){return e=vn(6,e,null,t),e.lanes=n,e}function sv(e){var t=vn(18,null,null,0);return t.stateNode=e,t}function Td(e,t,n){return t=vn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var vy=new WeakMap;function Un(e,t){if(typeof e=="object"&&e!==null){var n=vy.get(e);return n!==void 0?n:(t={value:e,source:t,stack:Jg(t)},vy.set(e,t),t)}return{value:e,source:t,stack:Jg(t)}}var al=[],ll=0,$u=null,qr=0,Pn=[],kn=0,Li=null,co=1,fo="";function ko(e,t){al[ll++]=qr,al[ll++]=$u,$u=e,qr=t}function uv(e,t,n){Pn[kn++]=co,Pn[kn++]=fo,Pn[kn++]=Li,Li=e;var o=co;e=fo;var i=32-_n(o)-1;o&=~(1<<i),n+=1;var a=32-_n(t)+i;if(30<a){var l=i-i%5;a=(o&(1<<l)-1).toString(32),o>>=l,i-=l,co=1<<32-_n(t)+i|n<<i|o,fo=a+e}else co=1<<a|n<<i|o,fo=e}function tm(e){e.return!==null&&(ko(e,1),uv(e,1,0))}function nm(e){for(;e===$u;)$u=al[--ll],al[ll]=null,qr=al[--ll],al[ll]=null;for(;e===Li;)Li=Pn[--kn],Pn[kn]=null,fo=Pn[--kn],Pn[kn]=null,co=Pn[--kn],Pn[kn]=null}function cv(e,t){Pn[kn++]=co,Pn[kn++]=fo,Pn[kn++]=Li,co=t.id,fo=t.overflow,Li=e}var Rt=null,qe=null,Ce=!1,Ci=null,In=!1,sp=Error(U(519));function Bi(e){var t=Error(U(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Zr(Un(t,e)),sp}function by(e){var t=e.stateNode,n=e.type,o=e.memoizedProps;switch(t[Dt]=e,t[rn]=o,n){case"dialog":xe("cancel",t),xe("close",t);break;case"iframe":case"object":case"embed":xe("load",t);break;case"video":case"audio":for(n=0;n<Kr.length;n++)xe(Kr[n],t);break;case"source":xe("error",t);break;case"img":case"image":case"link":xe("error",t),xe("load",t);break;case"details":xe("toggle",t);break;case"input":xe("invalid",t),U0(t,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0);break;case"select":xe("invalid",t);break;case"textarea":xe("invalid",t),V0(t,o.value,o.defaultValue,o.children)}n=o.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||o.suppressHydrationWarning===!0||Zb(t.textContent,n)?(o.popover!=null&&(xe("beforetoggle",t),xe("toggle",t)),o.onScroll!=null&&xe("scroll",t),o.onScrollEnd!=null&&xe("scrollend",t),o.onClick!=null&&(t.onclick=Io),t=!0):t=!1,t||Bi(e,!0)}function Sy(e){for(Rt=e.return;Rt;)switch(Rt.tag){case 5:case 31:case 13:In=!1;return;case 27:case 3:In=!0;return;default:Rt=Rt.return}}function Za(e){if(e!==Rt)return!1;if(!Ce)return Sy(e),Ce=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||zp(e.type,e.memoizedProps)),n=!n),n&&qe&&Bi(e),Sy(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(U(317));qe=s0(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(U(317));qe=s0(e)}else t===27?(t=qe,Gi(e.type)?(e=Pp,Pp=null,qe=e):qe=t):qe=Rt?Yn(e.stateNode.nextSibling):null;return!0}function la(){qe=Rt=null,Ce=!1}function Nd(){var e=Ci;return e!==null&&(an===null?an=e:an.push.apply(an,e),Ci=null),e}function Zr(e){Ci===null?Ci=[e]:Ci.push(e)}var up=ho(null),ha=null,Vo=null;function gi(e,t,n){Ie(up,t._currentValue),t._currentValue=n}function Xo(e){e._currentValue=up.current,Nt(up)}function cp(e,t,n){for(;e!==null;){var o=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,o!==null&&(o.childLanes|=t)):o!==null&&(o.childLanes&t)!==t&&(o.childLanes|=t),e===n)break;e=e.return}}function fp(e,t,n,o){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var a=i.dependencies;if(a!==null){var l=i.child;a=a.firstContext;e:for(;a!==null;){var r=a;a=i;for(var s=0;s<t.length;s++)if(r.context===t[s]){a.lanes|=n,r=a.alternate,r!==null&&(r.lanes|=n),cp(a.return,n,e),o||(l=null);break e}a=r.next}}else if(i.tag===18){if(l=i.return,l===null)throw Error(U(341));l.lanes|=n,a=l.alternate,a!==null&&(a.lanes|=n),cp(l,n,e),l=null}else l=i.child;if(l!==null)l.return=i;else for(l=i;l!==null;){if(l===e){l=null;break}if(i=l.sibling,i!==null){i.return=l.return,l=i;break}l=l.return}i=l}}function Al(e,t,n,o){e=null;for(var i=t,a=!1;i!==null;){if(!a){if((i.flags&524288)!==0)a=!0;else if((i.flags&262144)!==0)break}if(i.tag===10){var l=i.alternate;if(l===null)throw Error(U(387));if(l=l.memoizedProps,l!==null){var r=i.type;Tn(i.pendingProps.value,l.value)||(e!==null?e.push(r):e=[r])}}else if(i===Iu.current){if(l=i.alternate,l===null)throw Error(U(387));l.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e!==null?e.push(Wr):e=[Wr])}i=i.return}e!==null&&fp(t,e,n,o),t.flags|=262144}function Fu(e){for(e=e.firstContext;e!==null;){if(!Tn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ra(e){ha=e,Vo=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ot(e){return fv(ha,e)}function gu(e,t){return ha===null&&ra(e),fv(e,t)}function fv(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Vo===null){if(e===null)throw Error(U(308));Vo=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Vo=Vo.next=t;return n}var AN=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,o){e.push(o)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},MN=gt.unstable_scheduleCallback,DN=gt.unstable_NormalPriority,ct={$$typeof:Uo,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function om(){return{controller:new AN,data:new Map,refCount:0}}function rs(e){e.refCount--,e.refCount===0&&MN(DN,function(){e.controller.abort()})}var Rr=null,dp=0,vl=0,fl=null;function RN(e,t){if(Rr===null){var n=Rr=[];dp=0,vl=Am(),fl={status:"pending",value:void 0,then:function(o){n.push(o)}}}return dp++,t.then(xy,xy),t}function xy(){if(--dp===0&&Rr!==null){fl!==null&&(fl.status="fulfilled");var e=Rr;Rr=null,vl=0,fl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ON(e,t){var n=[],o={status:"pending",value:null,reason:null,then:function(i){n.push(i)}};return e.then(function(){o.status="fulfilled",o.value=t;for(var i=0;i<n.length;i++)(0,n[i])(t)},function(i){for(o.status="rejected",o.reason=i,i=0;i<n.length;i++)(0,n[i])(void 0)}),o}var _y=ce.S;ce.S=function(e,t){Nb=Sn(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&RN(e,t),_y!==null&&_y(e,t)};var oa=ho(null);function im(){var e=oa.current;return e!==null?e:Ue.pooledCache}function Ru(e,t){t===null?Ie(oa,oa.current):Ie(oa,t.pool)}function dv(){var e=im();return e===null?null:{parent:ct._currentValue,pool:e}}var Ml=Error(U(460)),am=Error(U(474)),_c=Error(U(542)),Ku={then:function(){}};function Ey(e){return e=e.status,e==="fulfilled"||e==="rejected"}function pv(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Io,Io),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ny(e),e;default:if(typeof t.status=="string")t.then(Io,Io);else{if(e=Ue,e!==null&&100<e.shellSuspendCounter)throw Error(U(482));e=t,e.status="pending",e.then(function(o){if(t.status==="pending"){var i=t;i.status="fulfilled",i.value=o}},function(o){if(t.status==="pending"){var i=t;i.status="rejected",i.reason=o}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ny(e),e}throw ia=t,Ml}}function Ji(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(ia=n,Ml):n}}var ia=null;function Ty(){if(ia===null)throw Error(U(459));var e=ia;return ia=null,e}function Ny(e){if(e===Ml||e===_c)throw Error(U(483))}var dl=null,jr=0;function yu(e){var t=jr;return jr+=1,dl===null&&(dl=[]),pv(dl,e,t)}function vr(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function vu(e,t){throw t.$$typeof===v2?Error(U(525)):(e=Object.prototype.toString.call(t),Error(U(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function mv(e){function t(p,g){if(e){var m=p.deletions;m===null?(p.deletions=[g],p.flags|=16):m.push(g)}}function n(p,g){if(!e)return null;for(;g!==null;)t(p,g),g=g.sibling;return null}function o(p){for(var g=new Map;p!==null;)p.key!==null?g.set(p.key,p):g.set(p.index,p),p=p.sibling;return g}function i(p,g){return p=Yo(p,g),p.index=0,p.sibling=null,p}function a(p,g,m){return p.index=m,e?(m=p.alternate,m!==null?(m=m.index,m<g?(p.flags|=67108866,g):m):(p.flags|=67108866,g)):(p.flags|=1048576,g)}function l(p){return e&&p.alternate===null&&(p.flags|=67108866),p}function r(p,g,m,y){return g===null||g.tag!==6?(g=Ed(m,p.mode,y),g.return=p,g):(g=i(g,m),g.return=p,g)}function s(p,g,m,y){var x=m.type;return x===Ka?c(p,g,m.props.children,y,m.key):g!==null&&(g.elementType===x||typeof x=="object"&&x!==null&&x.$$typeof===mi&&Ji(x)===g.type)?(g=i(g,m.props),vr(g,m),g.return=p,g):(g=Du(m.type,m.key,m.props,null,p.mode,y),vr(g,m),g.return=p,g)}function u(p,g,m,y){return g===null||g.tag!==4||g.stateNode.containerInfo!==m.containerInfo||g.stateNode.implementation!==m.implementation?(g=Td(m,p.mode,y),g.return=p,g):(g=i(g,m.children||[]),g.return=p,g)}function c(p,g,m,y,x){return g===null||g.tag!==7?(g=na(m,p.mode,y,x),g.return=p,g):(g=i(g,m),g.return=p,g)}function d(p,g,m){if(typeof g=="string"&&g!==""||typeof g=="number"||typeof g=="bigint")return g=Ed(""+g,p.mode,m),g.return=p,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case su:return m=Du(g.type,g.key,g.props,null,p.mode,m),vr(m,g),m.return=p,m;case Er:return g=Td(g,p.mode,m),g.return=p,g;case mi:return g=Ji(g),d(p,g,m)}if(Tr(g)||gr(g))return g=na(g,p.mode,m,null),g.return=p,g;if(typeof g.then=="function")return d(p,yu(g),m);if(g.$$typeof===Uo)return d(p,gu(p,g),m);vu(p,g)}return null}function f(p,g,m,y){var x=g!==null?g.key:null;if(typeof m=="string"&&m!==""||typeof m=="number"||typeof m=="bigint")return x!==null?null:r(p,g,""+m,y);if(typeof m=="object"&&m!==null){switch(m.$$typeof){case su:return m.key===x?s(p,g,m,y):null;case Er:return m.key===x?u(p,g,m,y):null;case mi:return m=Ji(m),f(p,g,m,y)}if(Tr(m)||gr(m))return x!==null?null:c(p,g,m,y,null);if(typeof m.then=="function")return f(p,g,yu(m),y);if(m.$$typeof===Uo)return f(p,g,gu(p,m),y);vu(p,m)}return null}function h(p,g,m,y,x){if(typeof y=="string"&&y!==""||typeof y=="number"||typeof y=="bigint")return p=p.get(m)||null,r(g,p,""+y,x);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case su:return p=p.get(y.key===null?m:y.key)||null,s(g,p,y,x);case Er:return p=p.get(y.key===null?m:y.key)||null,u(g,p,y,x);case mi:return y=Ji(y),h(p,g,m,y,x)}if(Tr(y)||gr(y))return p=p.get(m)||null,c(g,p,y,x,null);if(typeof y.then=="function")return h(p,g,m,yu(y),x);if(y.$$typeof===Uo)return h(p,g,m,gu(g,y),x);vu(g,y)}return null}function v(p,g,m,y){for(var x=null,_=null,E=g,C=g=0,A=null;E!==null&&C<m.length;C++){E.index>C?(A=E,E=null):A=E.sibling;var B=f(p,E,m[C],y);if(B===null){E===null&&(E=A);break}e&&E&&B.alternate===null&&t(p,E),g=a(B,g,C),_===null?x=B:_.sibling=B,_=B,E=A}if(C===m.length)return n(p,E),Ce&&ko(p,C),x;if(E===null){for(;C<m.length;C++)E=d(p,m[C],y),E!==null&&(g=a(E,g,C),_===null?x=E:_.sibling=E,_=E);return Ce&&ko(p,C),x}for(E=o(E);C<m.length;C++)A=h(E,p,C,m[C],y),A!==null&&(e&&A.alternate!==null&&E.delete(A.key===null?C:A.key),g=a(A,g,C),_===null?x=A:_.sibling=A,_=A);return e&&E.forEach(function(M){return t(p,M)}),Ce&&ko(p,C),x}function b(p,g,m,y){if(m==null)throw Error(U(151));for(var x=null,_=null,E=g,C=g=0,A=null,B=m.next();E!==null&&!B.done;C++,B=m.next()){E.index>C?(A=E,E=null):A=E.sibling;var M=f(p,E,B.value,y);if(M===null){E===null&&(E=A);break}e&&E&&M.alternate===null&&t(p,E),g=a(M,g,C),_===null?x=M:_.sibling=M,_=M,E=A}if(B.done)return n(p,E),Ce&&ko(p,C),x;if(E===null){for(;!B.done;C++,B=m.next())B=d(p,B.value,y),B!==null&&(g=a(B,g,C),_===null?x=B:_.sibling=B,_=B);return Ce&&ko(p,C),x}for(E=o(E);!B.done;C++,B=m.next())B=h(E,p,C,B.value,y),B!==null&&(e&&B.alternate!==null&&E.delete(B.key===null?C:B.key),g=a(B,g,C),_===null?x=B:_.sibling=B,_=B);return e&&E.forEach(function(z){return t(p,z)}),Ce&&ko(p,C),x}function S(p,g,m,y){if(typeof m=="object"&&m!==null&&m.type===Ka&&m.key===null&&(m=m.props.children),typeof m=="object"&&m!==null){switch(m.$$typeof){case su:e:{for(var x=m.key;g!==null;){if(g.key===x){if(x=m.type,x===Ka){if(g.tag===7){n(p,g.sibling),y=i(g,m.props.children),y.return=p,p=y;break e}}else if(g.elementType===x||typeof x=="object"&&x!==null&&x.$$typeof===mi&&Ji(x)===g.type){n(p,g.sibling),y=i(g,m.props),vr(y,m),y.return=p,p=y;break e}n(p,g);break}else t(p,g);g=g.sibling}m.type===Ka?(y=na(m.props.children,p.mode,y,m.key),y.return=p,p=y):(y=Du(m.type,m.key,m.props,null,p.mode,y),vr(y,m),y.return=p,p=y)}return l(p);case Er:e:{for(x=m.key;g!==null;){if(g.key===x)if(g.tag===4&&g.stateNode.containerInfo===m.containerInfo&&g.stateNode.implementation===m.implementation){n(p,g.sibling),y=i(g,m.children||[]),y.return=p,p=y;break e}else{n(p,g);break}else t(p,g);g=g.sibling}y=Td(m,p.mode,y),y.return=p,p=y}return l(p);case mi:return m=Ji(m),S(p,g,m,y)}if(Tr(m))return v(p,g,m,y);if(gr(m)){if(x=gr(m),typeof x!="function")throw Error(U(150));return m=x.call(m),b(p,g,m,y)}if(typeof m.then=="function")return S(p,g,yu(m),y);if(m.$$typeof===Uo)return S(p,g,gu(p,m),y);vu(p,m)}return typeof m=="string"&&m!==""||typeof m=="number"||typeof m=="bigint"?(m=""+m,g!==null&&g.tag===6?(n(p,g.sibling),y=i(g,m),y.return=p,p=y):(n(p,g),y=Ed(m,p.mode,y),y.return=p,p=y),l(p)):n(p,g)}return function(p,g,m,y){try{jr=0;var x=S(p,g,m,y);return dl=null,x}catch(E){if(E===Ml||E===_c)throw E;var _=vn(29,E,null,p.mode);return _.lanes=y,_.return=p,_}}}var sa=mv(!0),hv=mv(!1),hi=!1;function lm(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function pp(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function wi(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ai(e,t,n){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(Me&2)!==0){var i=o.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),o.pending=t,t=ju(e),lv(e,null,n),t}return xc(e,o,t,n),ju(e)}function Or(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var o=t.lanes;o&=e.pendingLanes,n|=o,t.lanes=n,z0(e,n)}}function Cd(e,t){var n=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,n===o)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var l={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=l:a=a.next=l,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:o.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:o.shared,callbacks:o.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var mp=!1;function zr(){if(mp){var e=fl;if(e!==null)throw e}}function Lr(e,t,n,o){mp=!1;var i=e.updateQueue;hi=!1;var a=i.firstBaseUpdate,l=i.lastBaseUpdate,r=i.shared.pending;if(r!==null){i.shared.pending=null;var s=r,u=s.next;s.next=null,l===null?a=u:l.next=u,l=s;var c=e.alternate;c!==null&&(c=c.updateQueue,r=c.lastBaseUpdate,r!==l&&(r===null?c.firstBaseUpdate=u:r.next=u,c.lastBaseUpdate=s))}if(a!==null){var d=i.baseState;l=0,c=u=s=null,r=a;do{var f=r.lane&-536870913,h=f!==r.lane;if(h?(Ne&f)===f:(o&f)===f){f!==0&&f===vl&&(mp=!0),c!==null&&(c=c.next={lane:0,tag:r.tag,payload:r.payload,callback:null,next:null});e:{var v=e,b=r;f=t;var S=n;switch(b.tag){case 1:if(v=b.payload,typeof v=="function"){d=v.call(S,d,f);break e}d=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=b.payload,f=typeof v=="function"?v.call(S,d,f):v,f==null)break e;d=Ze({},d,f);break e;case 2:hi=!0}}f=r.callback,f!==null&&(e.flags|=64,h&&(e.flags|=8192),h=i.callbacks,h===null?i.callbacks=[f]:h.push(f))}else h={lane:f,tag:r.tag,payload:r.payload,callback:r.callback,next:null},c===null?(u=c=h,s=d):c=c.next=h,l|=f;if(r=r.next,r===null){if(r=i.shared.pending,r===null)break;h=r,r=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);c===null&&(s=d),i.baseState=s,i.firstBaseUpdate=u,i.lastBaseUpdate=c,a===null&&(i.shared.lanes=0),Pi|=l,e.lanes=l,e.memoizedState=d}}function gv(e,t){if(typeof e!="function")throw Error(U(191,e));e.call(t)}function yv(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)gv(n[e],t)}var bl=ho(null),Qu=ho(0);function Cy(e,t){e=Ko,Ie(Qu,e),Ie(bl,t),Ko=e|t.baseLanes}function hp(){Ie(Qu,Ko),Ie(bl,bl.current)}function rm(){Ko=Qu.current,Nt(bl),Nt(Qu)}var Nn=ho(null),Vn=null;function yi(e){var t=e.alternate;Ie(at,at.current&1),Ie(Nn,e),Vn===null&&(t===null||bl.current!==null||t.memoizedState!==null)&&(Vn=e)}function gp(e){Ie(at,at.current),Ie(Nn,e),Vn===null&&(Vn=e)}function vv(e){e.tag===22?(Ie(at,at.current),Ie(Nn,e),Vn===null&&(Vn=e)):vi(e)}function vi(){Ie(at,at.current),Ie(Nn,Nn.current)}function yn(e){Nt(Nn),Vn===e&&(Vn=null),Nt(at)}var at=ho(0);function Wu(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Bp(n)||Hp(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)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 jo=0,ve=null,ke=null,st=null,Ju=!1,pl=!1,ua=!1,ec=0,$r=0,ml=null,zN=0;function tt(){throw Error(U(321))}function sm(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Tn(e[n],t[n]))return!1;return!0}function um(e,t,n,o,i,a){return jo=a,ve=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ce.H=e===null||e.memoizedState===null?Fv:Sm,ua=!1,a=n(o,i),ua=!1,pl&&(a=Sv(t,n,o,i)),bv(e),a}function bv(e){ce.H=Fr;var t=ke!==null&&ke.next!==null;if(jo=0,st=ke=ve=null,Ju=!1,$r=0,ml=null,t)throw Error(U(300));e===null||ft||(e=e.dependencies,e!==null&&Fu(e)&&(ft=!0))}function Sv(e,t,n,o){ve=e;var i=0;do{if(pl&&(ml=null),$r=0,pl=!1,25<=i)throw Error(U(301));if(i+=1,st=ke=null,e.updateQueue!=null){var a=e.updateQueue;a.lastEffect=null,a.events=null,a.stores=null,a.memoCache!=null&&(a.memoCache.index=0)}ce.H=Kv,a=t(n,o)}while(pl);return a}function LN(){var e=ce.H,t=e.useState()[0];return t=typeof t.then=="function"?ss(t):t,e=e.useState()[0],(ke!==null?ke.memoizedState:null)!==e&&(ve.flags|=1024),t}function cm(){var e=ec!==0;return ec=0,e}function fm(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function dm(e){if(Ju){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Ju=!1}jo=0,st=ke=ve=null,pl=!1,$r=ec=0,ml=null}function Yt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return st===null?ve.memoizedState=st=e:st=st.next=e,st}function lt(){if(ke===null){var e=ve.alternate;e=e!==null?e.memoizedState:null}else e=ke.next;var t=st===null?ve.memoizedState:st.next;if(t!==null)st=t,ke=e;else{if(e===null)throw ve.alternate===null?Error(U(467)):Error(U(310));ke=e,e={memoizedState:ke.memoizedState,baseState:ke.baseState,baseQueue:ke.baseQueue,queue:ke.queue,next:null},st===null?ve.memoizedState=st=e:st=st.next=e}return st}function Ec(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ss(e){var t=$r;return $r+=1,ml===null&&(ml=[]),e=pv(ml,e,t),t=ve,(st===null?t.memoizedState:st.next)===null&&(t=t.alternate,ce.H=t===null||t.memoizedState===null?Fv:Sm),e}function Tc(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ss(e);if(e.$$typeof===Uo)return Ot(e)}throw Error(U(438,String(e)))}function pm(e){var t=null,n=ve.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var o=ve.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(t={data:o.data.map(function(i){return i.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Ec(),ve.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),o=0;o<e;o++)n[o]=b2;return t.index++,n}function $o(e,t){return typeof t=="function"?t(e):t}function Ou(e){var t=lt();return mm(t,ke,e)}function mm(e,t,n){var o=e.queue;if(o===null)throw Error(U(311));o.lastRenderedReducer=n;var i=e.baseQueue,a=o.pending;if(a!==null){if(i!==null){var l=i.next;i.next=a.next,a.next=l}t.baseQueue=i=a,o.pending=null}if(a=e.baseState,i===null)e.memoizedState=a;else{t=i.next;var r=l=null,s=null,u=t,c=!1;do{var d=u.lane&-536870913;if(d!==u.lane?(Ne&d)===d:(jo&d)===d){var f=u.revertLane;if(f===0)s!==null&&(s=s.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),d===vl&&(c=!0);else if((jo&f)===f){u=u.next,f===vl&&(c=!0);continue}else d={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},s===null?(r=s=d,l=a):s=s.next=d,ve.lanes|=f,Pi|=f;d=u.action,ua&&n(a,d),a=u.hasEagerState?u.eagerState:n(a,d)}else f={lane:d,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},s===null?(r=s=f,l=a):s=s.next=f,ve.lanes|=d,Pi|=d;u=u.next}while(u!==null&&u!==t);if(s===null?l=a:s.next=r,!Tn(a,e.memoizedState)&&(ft=!0,c&&(n=fl,n!==null)))throw n;e.memoizedState=a,e.baseState=l,e.baseQueue=s,o.lastRenderedState=a}return i===null&&(o.lanes=0),[e.memoizedState,o.dispatch]}function wd(e){var t=lt(),n=t.queue;if(n===null)throw Error(U(311));n.lastRenderedReducer=e;var o=n.dispatch,i=n.pending,a=t.memoizedState;if(i!==null){n.pending=null;var l=i=i.next;do a=e(a,l.action),l=l.next;while(l!==i);Tn(a,t.memoizedState)||(ft=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),n.lastRenderedState=a}return[a,o]}function xv(e,t,n){var o=ve,i=lt(),a=Ce;if(a){if(n===void 0)throw Error(U(407));n=n()}else n=t();var l=!Tn((ke||i).memoizedState,n);if(l&&(i.memoizedState=n,ft=!0),i=i.queue,hm(Tv.bind(null,o,i,e),[e]),i.getSnapshot!==t||l||st!==null&&st.memoizedState.tag&1){if(o.flags|=2048,Sl(9,{destroy:void 0},Ev.bind(null,o,i,n,t),null),Ue===null)throw Error(U(349));a||(jo&127)!==0||_v(o,t,n)}return n}function _v(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ve.updateQueue,t===null?(t=Ec(),ve.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Ev(e,t,n,o){t.value=n,t.getSnapshot=o,Nv(t)&&Cv(e)}function Tv(e,t,n){return n(function(){Nv(t)&&Cv(e)})}function Nv(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Tn(e,n)}catch{return!0}}function Cv(e){var t=ma(e,2);t!==null&&ln(t,e,2)}function yp(e){var t=Yt();if(typeof e=="function"){var n=e;if(e=n(),ua){Si(!0);try{n()}finally{Si(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:$o,lastRenderedState:e},t}function wv(e,t,n,o){return e.baseState=n,mm(e,ke,typeof o=="function"?o:$o)}function BN(e,t,n,o,i){if(Cc(e))throw Error(U(485));if(e=t.action,e!==null){var a={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(l){a.listeners.push(l)}};ce.T!==null?n(!0):a.isTransition=!1,o(a),n=t.pending,n===null?(a.next=t.pending=a,Av(t,a)):(a.next=n.next,t.pending=n.next=a)}}function Av(e,t){var n=t.action,o=t.payload,i=e.state;if(t.isTransition){var a=ce.T,l={};ce.T=l;try{var r=n(i,o),s=ce.S;s!==null&&s(l,r),wy(e,t,r)}catch(u){vp(e,t,u)}finally{a!==null&&l.types!==null&&(a.types=l.types),ce.T=a}}else try{a=n(i,o),wy(e,t,a)}catch(u){vp(e,t,u)}}function wy(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(o){Ay(e,t,o)},function(o){return vp(e,t,o)}):Ay(e,t,n)}function Ay(e,t,n){t.status="fulfilled",t.value=n,Mv(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Av(e,n)))}function vp(e,t,n){var o=e.pending;if(e.pending=null,o!==null){o=o.next;do t.status="rejected",t.reason=n,Mv(t),t=t.next;while(t!==o)}e.action=null}function Mv(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Dv(e,t){return t}function My(e,t){if(Ce){var n=Ue.formState;if(n!==null){e:{var o=ve;if(Ce){if(qe){t:{for(var i=qe,a=In;i.nodeType!==8;){if(!a){i=null;break t}if(i=Yn(i.nextSibling),i===null){i=null;break t}}a=i.data,i=a==="F!"||a==="F"?i:null}if(i){qe=Yn(i.nextSibling),o=i.data==="F!";break e}}Bi(o)}o=!1}o&&(t=n[0])}}return n=Yt(),n.memoizedState=n.baseState=t,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Dv,lastRenderedState:t},n.queue=o,n=Zv.bind(null,ve,o),o.dispatch=n,o=yp(!1),a=bm.bind(null,ve,!1,o.queue),o=Yt(),i={state:t,dispatch:null,action:e,pending:null},o.queue=i,n=BN.bind(null,ve,i,a,n),i.dispatch=n,o.memoizedState=e,[t,n,!1]}function Dy(e){var t=lt();return Rv(t,ke,e)}function Rv(e,t,n){if(t=mm(e,t,Dv)[0],e=Ou($o)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var o=ss(t)}catch(l){throw l===Ml?_c:l}else o=t;t=lt();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(ve.flags|=2048,Sl(9,{destroy:void 0},HN.bind(null,i,n),null)),[o,a,e]}function HN(e,t){e.action=t}function Ry(e){var t=lt(),n=ke;if(n!==null)return Rv(t,n,e);lt(),t=t.memoizedState,n=lt();var o=n.queue.dispatch;return n.memoizedState=e,[t,o,!1]}function Sl(e,t,n,o){return e={tag:e,create:n,deps:o,inst:t,next:null},t=ve.updateQueue,t===null&&(t=Ec(),ve.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(o=n.next,n.next=e,e.next=o,t.lastEffect=e),e}function Ov(){return lt().memoizedState}function zu(e,t,n,o){var i=Yt();ve.flags|=e,i.memoizedState=Sl(1|t,{destroy:void 0},n,o===void 0?null:o)}function Nc(e,t,n,o){var i=lt();o=o===void 0?null:o;var a=i.memoizedState.inst;ke!==null&&o!==null&&sm(o,ke.memoizedState.deps)?i.memoizedState=Sl(t,a,n,o):(ve.flags|=e,i.memoizedState=Sl(1|t,a,n,o))}function Oy(e,t){zu(8390656,8,e,t)}function hm(e,t){Nc(2048,8,e,t)}function PN(e){ve.flags|=4;var t=ve.updateQueue;if(t===null)t=Ec(),ve.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function zv(e){var t=lt().memoizedState;return PN({ref:t,nextImpl:e}),function(){if((Me&2)!==0)throw Error(U(440));return t.impl.apply(void 0,arguments)}}function Lv(e,t){return Nc(4,2,e,t)}function Bv(e,t){return Nc(4,4,e,t)}function Hv(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Pv(e,t,n){n=n!=null?n.concat([e]):null,Nc(4,4,Hv.bind(null,t,e),n)}function gm(){}function kv(e,t){var n=lt();t=t===void 0?null:t;var o=n.memoizedState;return t!==null&&sm(t,o[1])?o[0]:(n.memoizedState=[e,t],e)}function Gv(e,t){var n=lt();t=t===void 0?null:t;var o=n.memoizedState;if(t!==null&&sm(t,o[1]))return o[0];if(o=e(),ua){Si(!0);try{e()}finally{Si(!1)}}return n.memoizedState=[o,t],o}function ym(e,t,n){return n===void 0||(jo&1073741824)!==0&&(Ne&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=wb(),ve.lanes|=e,Pi|=e,n)}function Uv(e,t,n,o){return Tn(n,t)?n:bl.current!==null?(e=ym(e,n,o),Tn(e,t)||(ft=!0),e):(jo&42)===0||(jo&1073741824)!==0&&(Ne&261930)===0?(ft=!0,e.memoizedState=n):(e=wb(),ve.lanes|=e,Pi|=e,t)}function Iv(e,t,n,o,i){var a=De.p;De.p=a!==0&&8>a?a:8;var l=ce.T,r={};ce.T=r,bm(e,!1,t,n);try{var s=i(),u=ce.S;if(u!==null&&u(r,s),s!==null&&typeof s=="object"&&typeof s.then=="function"){var c=ON(s,o);Br(e,t,c,En(e))}else Br(e,t,o,En(e))}catch(d){Br(e,t,{then:function(){},status:"rejected",reason:d},En())}finally{De.p=a,l!==null&&r.types!==null&&(l.types=r.types),ce.T=l}}function kN(){}function bp(e,t,n,o){if(e.tag!==5)throw Error(U(476));var i=Vv(e).queue;Iv(e,i,t,ta,n===null?kN:function(){return Yv(e),n(o)})}function Vv(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ta,baseState:ta,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:$o,lastRenderedState:ta},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:$o,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Yv(e){var t=Vv(e);t.next===null&&(t=e.alternate.memoizedState),Br(e,t.next.queue,{},En())}function vm(){return Ot(Wr)}function Xv(){return lt().memoizedState}function qv(){return lt().memoizedState}function GN(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=En();e=wi(n);var o=Ai(t,e,n);o!==null&&(ln(o,t,n),Or(o,t,n)),t={cache:om()},e.payload=t;return}t=t.return}}function UN(e,t,n){var o=En();n={lane:o,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Cc(e)?jv(t,n):(n=Jp(e,t,n,o),n!==null&&(ln(n,e,o),$v(n,t,o)))}function Zv(e,t,n){var o=En();Br(e,t,n,o)}function Br(e,t,n,o){var i={lane:o,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Cc(e))jv(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var l=t.lastRenderedState,r=a(l,n);if(i.hasEagerState=!0,i.eagerState=r,Tn(r,l))return xc(e,t,i,0),Ue===null&&Sc(),!1}catch{}if(n=Jp(e,t,i,o),n!==null)return ln(n,e,o),$v(n,t,o),!0}return!1}function bm(e,t,n,o){if(o={lane:2,revertLane:Am(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},Cc(e)){if(t)throw Error(U(479))}else t=Jp(e,n,o,2),t!==null&&ln(t,e,2)}function Cc(e){var t=e.alternate;return e===ve||t!==null&&t===ve}function jv(e,t){pl=Ju=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function $v(e,t,n){if((n&4194048)!==0){var o=t.lanes;o&=e.pendingLanes,n|=o,t.lanes=n,z0(e,n)}}var Fr={readContext:Ot,use:Tc,useCallback:tt,useContext:tt,useEffect:tt,useImperativeHandle:tt,useLayoutEffect:tt,useInsertionEffect:tt,useMemo:tt,useReducer:tt,useRef:tt,useState:tt,useDebugValue:tt,useDeferredValue:tt,useTransition:tt,useSyncExternalStore:tt,useId:tt,useHostTransitionStatus:tt,useFormState:tt,useActionState:tt,useOptimistic:tt,useMemoCache:tt,useCacheRefresh:tt};Fr.useEffectEvent=tt;var Fv={readContext:Ot,use:Tc,useCallback:function(e,t){return Yt().memoizedState=[e,t===void 0?null:t],e},useContext:Ot,useEffect:Oy,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,zu(4194308,4,Hv.bind(null,t,e),n)},useLayoutEffect:function(e,t){return zu(4194308,4,e,t)},useInsertionEffect:function(e,t){zu(4,2,e,t)},useMemo:function(e,t){var n=Yt();t=t===void 0?null:t;var o=e();if(ua){Si(!0);try{e()}finally{Si(!1)}}return n.memoizedState=[o,t],o},useReducer:function(e,t,n){var o=Yt();if(n!==void 0){var i=n(t);if(ua){Si(!0);try{n(t)}finally{Si(!1)}}}else i=t;return o.memoizedState=o.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},o.queue=e,e=e.dispatch=UN.bind(null,ve,e),[o.memoizedState,e]},useRef:function(e){var t=Yt();return e={current:e},t.memoizedState=e},useState:function(e){e=yp(e);var t=e.queue,n=Zv.bind(null,ve,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:gm,useDeferredValue:function(e,t){var n=Yt();return ym(n,e,t)},useTransition:function(){var e=yp(!1);return e=Iv.bind(null,ve,e.queue,!0,!1),Yt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var o=ve,i=Yt();if(Ce){if(n===void 0)throw Error(U(407));n=n()}else{if(n=t(),Ue===null)throw Error(U(349));(Ne&127)!==0||_v(o,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,Oy(Tv.bind(null,o,a,e),[e]),o.flags|=2048,Sl(9,{destroy:void 0},Ev.bind(null,o,a,n,t),null),n},useId:function(){var e=Yt(),t=Ue.identifierPrefix;if(Ce){var n=fo,o=co;n=(o&~(1<<32-_n(o)-1)).toString(32)+n,t="_"+t+"R_"+n,n=ec++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=zN++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:vm,useFormState:My,useActionState:My,useOptimistic:function(e){var t=Yt();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=bm.bind(null,ve,!0,n),n.dispatch=t,[e,t]},useMemoCache:pm,useCacheRefresh:function(){return Yt().memoizedState=GN.bind(null,ve)},useEffectEvent:function(e){var t=Yt(),n={impl:e};return t.memoizedState=n,function(){if((Me&2)!==0)throw Error(U(440));return n.impl.apply(void 0,arguments)}}},Sm={readContext:Ot,use:Tc,useCallback:kv,useContext:Ot,useEffect:hm,useImperativeHandle:Pv,useInsertionEffect:Lv,useLayoutEffect:Bv,useMemo:Gv,useReducer:Ou,useRef:Ov,useState:function(){return Ou($o)},useDebugValue:gm,useDeferredValue:function(e,t){var n=lt();return Uv(n,ke.memoizedState,e,t)},useTransition:function(){var e=Ou($o)[0],t=lt().memoizedState;return[typeof e=="boolean"?e:ss(e),t]},useSyncExternalStore:xv,useId:Xv,useHostTransitionStatus:vm,useFormState:Dy,useActionState:Dy,useOptimistic:function(e,t){var n=lt();return wv(n,ke,e,t)},useMemoCache:pm,useCacheRefresh:qv};Sm.useEffectEvent=zv;var Kv={readContext:Ot,use:Tc,useCallback:kv,useContext:Ot,useEffect:hm,useImperativeHandle:Pv,useInsertionEffect:Lv,useLayoutEffect:Bv,useMemo:Gv,useReducer:wd,useRef:Ov,useState:function(){return wd($o)},useDebugValue:gm,useDeferredValue:function(e,t){var n=lt();return ke===null?ym(n,e,t):Uv(n,ke.memoizedState,e,t)},useTransition:function(){var e=wd($o)[0],t=lt().memoizedState;return[typeof e=="boolean"?e:ss(e),t]},useSyncExternalStore:xv,useId:Xv,useHostTransitionStatus:vm,useFormState:Ry,useActionState:Ry,useOptimistic:function(e,t){var n=lt();return ke!==null?wv(n,ke,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:pm,useCacheRefresh:qv};Kv.useEffectEvent=zv;function Ad(e,t,n,o){t=e.memoizedState,n=n(o,t),n=n==null?t:Ze({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Sp={enqueueSetState:function(e,t,n){e=e._reactInternals;var o=En(),i=wi(o);i.payload=t,n!=null&&(i.callback=n),t=Ai(e,i,o),t!==null&&(ln(t,e,o),Or(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var o=En(),i=wi(o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ai(e,i,o),t!==null&&(ln(t,e,o),Or(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=En(),o=wi(n);o.tag=2,t!=null&&(o.callback=t),t=Ai(e,o,n),t!==null&&(ln(t,e,n),Or(t,e,n))}};function zy(e,t,n,o,i,a,l){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,a,l):t.prototype&&t.prototype.isPureReactComponent?!Xr(n,o)||!Xr(i,a):!0}function Ly(e,t,n,o){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,o),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,o),t.state!==e&&Sp.enqueueReplaceState(t,t.state,null)}function ca(e,t){var n=t;if("ref"in t){n={};for(var o in t)o!=="ref"&&(n[o]=t[o])}if(e=e.defaultProps){n===t&&(n=Ze({},n));for(var i in e)n[i]===void 0&&(n[i]=e[i])}return n}function Qv(e){Zu(e)}function Wv(e){console.error(e)}function Jv(e){Zu(e)}function tc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(o){setTimeout(function(){throw o})}}function By(e,t,n){try{var o=e.onCaughtError;o(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(i){setTimeout(function(){throw i})}}function xp(e,t,n){return n=wi(n),n.tag=3,n.payload={element:null},n.callback=function(){tc(e,t)},n}function eb(e){return e=wi(e),e.tag=3,e}function tb(e,t,n,o){var i=n.type.getDerivedStateFromError;if(typeof i=="function"){var a=o.value;e.payload=function(){return i(a)},e.callback=function(){By(t,n,o)}}var l=n.stateNode;l!==null&&typeof l.componentDidCatch=="function"&&(e.callback=function(){By(t,n,o),typeof i!="function"&&(Mi===null?Mi=new Set([this]):Mi.add(this));var r=o.stack;this.componentDidCatch(o.value,{componentStack:r!==null?r:""})})}function IN(e,t,n,o,i){if(n.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(t=n.alternate,t!==null&&Al(t,n,i,!0),n=Nn.current,n!==null){switch(n.tag){case 31:case 13:return Vn===null?lc():n.alternate===null&&nt===0&&(nt=3),n.flags&=-257,n.flags|=65536,n.lanes=i,o===Ku?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([o]):t.add(o),Gd(e,o,i)),!1;case 22:return n.flags|=65536,o===Ku?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([o])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([o]):n.add(o)),Gd(e,o,i)),!1}throw Error(U(435,n.tag))}return Gd(e,o,i),lc(),!1}if(Ce)return t=Nn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=i,o!==sp&&(e=Error(U(422),{cause:o}),Zr(Un(e,n)))):(o!==sp&&(t=Error(U(423),{cause:o}),Zr(Un(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,o=Un(o,n),i=xp(e.stateNode,o,i),Cd(e,i),nt!==4&&(nt=2)),!1;var a=Error(U(520),{cause:o});if(a=Un(a,n),kr===null?kr=[a]:kr.push(a),nt!==4&&(nt=2),t===null)return!0;o=Un(o,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=xp(n.stateNode,o,e),Cd(n,e),!1;case 1:if(t=n.type,a=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||a!==null&&typeof a.componentDidCatch=="function"&&(Mi===null||!Mi.has(a))))return n.flags|=65536,i&=-i,n.lanes|=i,i=eb(i),tb(i,e,n,o),Cd(n,i),!1}n=n.return}while(n!==null);return!1}var xm=Error(U(461)),ft=!1;function Mt(e,t,n,o){t.child=e===null?hv(t,null,n,o):sa(t,e.child,n,o)}function Hy(e,t,n,o,i){n=n.render;var a=t.ref;if("ref"in o){var l={};for(var r in o)r!=="ref"&&(l[r]=o[r])}else l=o;return ra(t),o=um(e,t,n,l,a,i),r=cm(),e!==null&&!ft?(fm(e,t,i),Fo(e,t,i)):(Ce&&r&&tm(t),t.flags|=1,Mt(e,t,o,i),t.child)}function Py(e,t,n,o,i){if(e===null){var a=n.type;return typeof a=="function"&&!em(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,nb(e,t,a,o,i)):(e=Du(n.type,null,o,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!_m(e,i)){var l=a.memoizedProps;if(n=n.compare,n=n!==null?n:Xr,n(l,o)&&e.ref===t.ref)return Fo(e,t,i)}return t.flags|=1,e=Yo(a,o),e.ref=t.ref,e.return=t,t.child=e}function nb(e,t,n,o,i){if(e!==null){var a=e.memoizedProps;if(Xr(a,o)&&e.ref===t.ref)if(ft=!1,t.pendingProps=o=a,_m(e,i))(e.flags&131072)!==0&&(ft=!0);else return t.lanes=e.lanes,Fo(e,t,i)}return _p(e,t,n,o,i)}function ob(e,t,n,o){var i=o.children,a=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.mode==="hidden"){if((t.flags&128)!==0){if(a=a!==null?a.baseLanes|n:n,e!==null){for(o=t.child=e.child,i=0;o!==null;)i=i|o.lanes|o.childLanes,o=o.sibling;o=i&~a}else o=0,t.child=null;return ky(e,t,a,n,o)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ru(t,a!==null?a.cachePool:null),a!==null?Cy(t,a):hp(),vv(t);else return o=t.lanes=536870912,ky(e,t,a!==null?a.baseLanes|n:n,n,o)}else a!==null?(Ru(t,a.cachePool),Cy(t,a),vi(t),t.memoizedState=null):(e!==null&&Ru(t,null),hp(),vi(t));return Mt(e,t,i,n),t.child}function Cr(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function ky(e,t,n,o,i){var a=im();return a=a===null?null:{parent:ct._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Ru(t,null),hp(),vv(t),e!==null&&Al(e,t,o,!0),t.childLanes=i,null}function Lu(e,t){return t=nc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Gy(e,t,n){return sa(t,e.child,null,n),e=Lu(t,t.pendingProps),e.flags|=2,yn(t),t.memoizedState=null,e}function VN(e,t,n){var o=t.pendingProps,i=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ce){if(o.mode==="hidden")return e=Lu(t,o),t.lanes=536870912,Cr(null,e);if(gp(t),(e=qe)?(e=Fb(e,In),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Li!==null?{id:co,overflow:fo}:null,retryLane:536870912,hydrationErrors:null},n=sv(e),n.return=t,t.child=n,Rt=t,qe=null)):e=null,e===null)throw Bi(t);return t.lanes=536870912,null}return Lu(t,o)}var a=e.memoizedState;if(a!==null){var l=a.dehydrated;if(gp(t),i)if(t.flags&256)t.flags&=-257,t=Gy(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(U(558));else if(ft||Al(e,t,n,!1),i=(n&e.childLanes)!==0,ft||i){if(o=Ue,o!==null&&(l=L0(o,n),l!==0&&l!==a.retryLane))throw a.retryLane=l,ma(e,l),ln(o,e,l),xm;lc(),t=Gy(e,t,n)}else e=a.treeContext,qe=Yn(l.nextSibling),Rt=t,Ce=!0,Ci=null,In=!1,e!==null&&cv(t,e),t=Lu(t,o),t.flags|=4096;return t}return e=Yo(e.child,{mode:o.mode,children:o.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Bu(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(U(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function _p(e,t,n,o,i){return ra(t),n=um(e,t,n,o,void 0,i),o=cm(),e!==null&&!ft?(fm(e,t,i),Fo(e,t,i)):(Ce&&o&&tm(t),t.flags|=1,Mt(e,t,n,i),t.child)}function Uy(e,t,n,o,i,a){return ra(t),t.updateQueue=null,n=Sv(t,o,n,i),bv(e),o=cm(),e!==null&&!ft?(fm(e,t,a),Fo(e,t,a)):(Ce&&o&&tm(t),t.flags|=1,Mt(e,t,n,a),t.child)}function Iy(e,t,n,o,i){if(ra(t),t.stateNode===null){var a=il,l=n.contextType;typeof l=="object"&&l!==null&&(a=Ot(l)),a=new n(o,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Sp,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=o,a.state=t.memoizedState,a.refs={},lm(t),l=n.contextType,a.context=typeof l=="object"&&l!==null?Ot(l):il,a.state=t.memoizedState,l=n.getDerivedStateFromProps,typeof l=="function"&&(Ad(t,n,l,o),a.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof a.getSnapshotBeforeUpdate=="function"||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(l=a.state,typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount(),l!==a.state&&Sp.enqueueReplaceState(a,a.state,null),Lr(t,o,a,i),zr(),a.state=t.memoizedState),typeof a.componentDidMount=="function"&&(t.flags|=4194308),o=!0}else if(e===null){a=t.stateNode;var r=t.memoizedProps,s=ca(n,r);a.props=s;var u=a.context,c=n.contextType;l=il,typeof c=="object"&&c!==null&&(l=Ot(c));var d=n.getDerivedStateFromProps;c=typeof d=="function"||typeof a.getSnapshotBeforeUpdate=="function",r=t.pendingProps!==r,c||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(r||u!==l)&&Ly(t,a,o,l),hi=!1;var f=t.memoizedState;a.state=f,Lr(t,o,a,i),zr(),u=t.memoizedState,r||f!==u||hi?(typeof d=="function"&&(Ad(t,n,d,o),u=t.memoizedState),(s=hi||zy(t,n,s,o,f,u,l))?(c||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=o,t.memoizedState=u),a.props=o,a.state=u,a.context=l,o=s):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),o=!1)}else{a=t.stateNode,pp(e,t),l=t.memoizedProps,c=ca(n,l),a.props=c,d=t.pendingProps,f=a.context,u=n.contextType,s=il,typeof u=="object"&&u!==null&&(s=Ot(u)),r=n.getDerivedStateFromProps,(u=typeof r=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==d||f!==s)&&Ly(t,a,o,s),hi=!1,f=t.memoizedState,a.state=f,Lr(t,o,a,i),zr();var h=t.memoizedState;l!==d||f!==h||hi||e!==null&&e.dependencies!==null&&Fu(e.dependencies)?(typeof r=="function"&&(Ad(t,n,r,o),h=t.memoizedState),(c=hi||zy(t,n,c,o,f,h,s)||e!==null&&e.dependencies!==null&&Fu(e.dependencies))?(u||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(o,h,s),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(o,h,s)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=o,t.memoizedState=h),a.props=o,a.state=h,a.context=s,o=c):(typeof a.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),o=!1)}return a=o,Bu(e,t),o=(t.flags&128)!==0,a||o?(a=t.stateNode,n=o&&typeof n.getDerivedStateFromError!="function"?null:a.render(),t.flags|=1,e!==null&&o?(t.child=sa(t,e.child,null,i),t.child=sa(t,null,n,i)):Mt(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Fo(e,t,i),e}function Vy(e,t,n,o){return la(),t.flags|=256,Mt(e,t,n,o),t.child}var Md={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Dd(e){return{baseLanes:e,cachePool:dv()}}function Rd(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=bn),e}function ib(e,t,n){var o=t.pendingProps,i=!1,a=(t.flags&128)!==0,l;if((l=a)||(l=e!==null&&e.memoizedState===null?!1:(at.current&2)!==0),l&&(i=!0,t.flags&=-129),l=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ce){if(i?yi(t):vi(t),(e=qe)?(e=Fb(e,In),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Li!==null?{id:co,overflow:fo}:null,retryLane:536870912,hydrationErrors:null},n=sv(e),n.return=t,t.child=n,Rt=t,qe=null)):e=null,e===null)throw Bi(t);return Hp(e)?t.lanes=32:t.lanes=536870912,null}var r=o.children;return o=o.fallback,i?(vi(t),i=t.mode,r=nc({mode:"hidden",children:r},i),o=na(o,i,n,null),r.return=t,o.return=t,r.sibling=o,t.child=r,o=t.child,o.memoizedState=Dd(n),o.childLanes=Rd(e,l,n),t.memoizedState=Md,Cr(null,o)):(yi(t),Ep(t,r))}var s=e.memoizedState;if(s!==null&&(r=s.dehydrated,r!==null)){if(a)t.flags&256?(yi(t),t.flags&=-257,t=Od(e,t,n)):t.memoizedState!==null?(vi(t),t.child=e.child,t.flags|=128,t=null):(vi(t),r=o.fallback,i=t.mode,o=nc({mode:"visible",children:o.children},i),r=na(r,i,n,null),r.flags|=2,o.return=t,r.return=t,o.sibling=r,t.child=o,sa(t,e.child,null,n),o=t.child,o.memoizedState=Dd(n),o.childLanes=Rd(e,l,n),t.memoizedState=Md,t=Cr(null,o));else if(yi(t),Hp(r)){if(l=r.nextSibling&&r.nextSibling.dataset,l)var u=l.dgst;l=u,o=Error(U(419)),o.stack="",o.digest=l,Zr({value:o,source:null,stack:null}),t=Od(e,t,n)}else if(ft||Al(e,t,n,!1),l=(n&e.childLanes)!==0,ft||l){if(l=Ue,l!==null&&(o=L0(l,n),o!==0&&o!==s.retryLane))throw s.retryLane=o,ma(e,o),ln(l,e,o),xm;Bp(r)||lc(),t=Od(e,t,n)}else Bp(r)?(t.flags|=192,t.child=e.child,t=null):(e=s.treeContext,qe=Yn(r.nextSibling),Rt=t,Ce=!0,Ci=null,In=!1,e!==null&&cv(t,e),t=Ep(t,o.children),t.flags|=4096);return t}return i?(vi(t),r=o.fallback,i=t.mode,s=e.child,u=s.sibling,o=Yo(s,{mode:"hidden",children:o.children}),o.subtreeFlags=s.subtreeFlags&65011712,u!==null?r=Yo(u,r):(r=na(r,i,n,null),r.flags|=2),r.return=t,o.return=t,o.sibling=r,t.child=o,Cr(null,o),o=t.child,r=e.child.memoizedState,r===null?r=Dd(n):(i=r.cachePool,i!==null?(s=ct._currentValue,i=i.parent!==s?{parent:s,pool:s}:i):i=dv(),r={baseLanes:r.baseLanes|n,cachePool:i}),o.memoizedState=r,o.childLanes=Rd(e,l,n),t.memoizedState=Md,Cr(e.child,o)):(yi(t),n=e.child,e=n.sibling,n=Yo(n,{mode:"visible",children:o.children}),n.return=t,n.sibling=null,e!==null&&(l=t.deletions,l===null?(t.deletions=[e],t.flags|=16):l.push(e)),t.child=n,t.memoizedState=null,n)}function Ep(e,t){return t=nc({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function nc(e,t){return e=vn(22,e,null,t),e.lanes=0,e}function Od(e,t,n){return sa(t,e.child,null,n),e=Ep(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Yy(e,t,n){e.lanes|=t;var o=e.alternate;o!==null&&(o.lanes|=t),cp(e.return,t,n)}function zd(e,t,n,o,i,a){var l=e.memoizedState;l===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:o,tail:n,tailMode:i,treeForkCount:a}:(l.isBackwards=t,l.rendering=null,l.renderingStartTime=0,l.last=o,l.tail=n,l.tailMode=i,l.treeForkCount=a)}function ab(e,t,n){var o=t.pendingProps,i=o.revealOrder,a=o.tail;o=o.children;var l=at.current,r=(l&2)!==0;if(r?(l=l&1|2,t.flags|=128):l&=1,Ie(at,l),Mt(e,t,o,n),o=Ce?qr:0,!r&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Yy(e,n,t);else if(e.tag===19)Yy(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}switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Wu(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),zd(t,!1,i,n,a,o);break;case"backwards":case"unstable_legacy-backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Wu(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}zd(t,!0,n,null,a,o);break;case"together":zd(t,!1,null,null,void 0,o);break;default:t.memoizedState=null}return t.child}function Fo(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Pi|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Al(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(U(153));if(t.child!==null){for(e=t.child,n=Yo(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Yo(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function _m(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Fu(e)))}function YN(e,t,n){switch(t.tag){case 3:Vu(t,t.stateNode.containerInfo),gi(t,ct,e.memoizedState.cache),la();break;case 27:case 5:Qd(t);break;case 4:Vu(t,t.stateNode.containerInfo);break;case 10:gi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,gp(t),null;break;case 13:var o=t.memoizedState;if(o!==null)return o.dehydrated!==null?(yi(t),t.flags|=128,null):(n&t.child.childLanes)!==0?ib(e,t,n):(yi(t),e=Fo(e,t,n),e!==null?e.sibling:null);yi(t);break;case 19:var i=(e.flags&128)!==0;if(o=(n&t.childLanes)!==0,o||(Al(e,t,n,!1),o=(n&t.childLanes)!==0),i){if(o)return ab(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ie(at,at.current),o)break;return null;case 22:return t.lanes=0,ob(e,t,n,t.pendingProps);case 24:gi(t,ct,e.memoizedState.cache)}return Fo(e,t,n)}function lb(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)ft=!0;else{if(!_m(e,n)&&(t.flags&128)===0)return ft=!1,YN(e,t,n);ft=(e.flags&131072)!==0}else ft=!1,Ce&&(t.flags&1048576)!==0&&uv(t,qr,t.index);switch(t.lanes=0,t.tag){case 16:e:{var o=t.pendingProps;if(e=Ji(t.elementType),t.type=e,typeof e=="function")em(e)?(o=ca(e,o),t.tag=1,t=Iy(null,t,e,o,n)):(t.tag=0,t=_p(null,t,e,o,n));else{if(e!=null){var i=e.$$typeof;if(i===Up){t.tag=11,t=Hy(null,t,e,o,n);break e}else if(i===Ip){t.tag=14,t=Py(null,t,e,o,n);break e}}throw t=Fd(e)||e,Error(U(306,t,""))}}return t;case 0:return _p(e,t,t.type,t.pendingProps,n);case 1:return o=t.type,i=ca(o,t.pendingProps),Iy(e,t,o,i,n);case 3:e:{if(Vu(t,t.stateNode.containerInfo),e===null)throw Error(U(387));o=t.pendingProps;var a=t.memoizedState;i=a.element,pp(e,t),Lr(t,o,null,n);var l=t.memoizedState;if(o=l.cache,gi(t,ct,o),o!==a.cache&&fp(t,[ct],n,!0),zr(),o=l.element,a.isDehydrated)if(a={element:o,isDehydrated:!1,cache:l.cache},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){t=Vy(e,t,o,n);break e}else if(o!==i){i=Un(Error(U(424)),t),Zr(i),t=Vy(e,t,o,n);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,qe=Yn(e.firstChild),Rt=t,Ce=!0,Ci=null,In=!0,n=hv(t,null,o,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(la(),o===i){t=Fo(e,t,n);break e}Mt(e,t,o,n)}t=t.child}return t;case 26:return Bu(e,t),e===null?(n=f0(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ce||(n=t.type,e=t.pendingProps,o=cc(Ni.current).createElement(n),o[Dt]=t,o[rn]=e,zt(o,n,e),Tt(o),t.stateNode=o):t.memoizedState=f0(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Qd(t),e===null&&Ce&&(o=t.stateNode=Kb(t.type,t.pendingProps,Ni.current),Rt=t,In=!0,i=qe,Gi(t.type)?(Pp=i,qe=Yn(o.firstChild)):qe=i),Mt(e,t,t.pendingProps.children,n),Bu(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ce&&((i=o=qe)&&(o=yC(o,t.type,t.pendingProps,In),o!==null?(t.stateNode=o,Rt=t,qe=Yn(o.firstChild),In=!1,i=!0):i=!1),i||Bi(t)),Qd(t),i=t.type,a=t.pendingProps,l=e!==null?e.memoizedProps:null,o=a.children,zp(i,a)?o=null:l!==null&&zp(i,l)&&(t.flags|=32),t.memoizedState!==null&&(i=um(e,t,LN,null,null,n),Wr._currentValue=i),Bu(e,t),Mt(e,t,o,n),t.child;case 6:return e===null&&Ce&&((e=n=qe)&&(n=vC(n,t.pendingProps,In),n!==null?(t.stateNode=n,Rt=t,qe=null,e=!0):e=!1),e||Bi(t)),null;case 13:return ib(e,t,n);case 4:return Vu(t,t.stateNode.containerInfo),o=t.pendingProps,e===null?t.child=sa(t,null,o,n):Mt(e,t,o,n),t.child;case 11:return Hy(e,t,t.type,t.pendingProps,n);case 7:return Mt(e,t,t.pendingProps,n),t.child;case 8:return Mt(e,t,t.pendingProps.children,n),t.child;case 12:return Mt(e,t,t.pendingProps.children,n),t.child;case 10:return o=t.pendingProps,gi(t,t.type,o.value),Mt(e,t,o.children,n),t.child;case 9:return i=t.type._context,o=t.pendingProps.children,ra(t),i=Ot(i),o=o(i),t.flags|=1,Mt(e,t,o,n),t.child;case 14:return Py(e,t,t.type,t.pendingProps,n);case 15:return nb(e,t,t.type,t.pendingProps,n);case 19:return ab(e,t,n);case 31:return VN(e,t,n);case 22:return ob(e,t,n,t.pendingProps);case 24:return ra(t),o=Ot(ct),e===null?(i=im(),i===null&&(i=Ue,a=om(),i.pooledCache=a,a.refCount++,a!==null&&(i.pooledCacheLanes|=n),i=a),t.memoizedState={parent:o,cache:i},lm(t),gi(t,ct,i)):((e.lanes&n)!==0&&(pp(e,t),Lr(t,null,null,n),zr()),i=e.memoizedState,a=t.memoizedState,i.parent!==o?(i={parent:o,cache:o},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),gi(t,ct,o)):(o=a.cache,gi(t,ct,o),o!==i.cache&&fp(t,[ct],n,!0))),Mt(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(U(156,t.tag))}function Lo(e){e.flags|=4}function Ld(e,t,n,o,i){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Db())e.flags|=8192;else throw ia=Ku,am}else e.flags&=-16777217}function Xy(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Jb(t))if(Db())e.flags|=8192;else throw ia=Ku,am}function bu(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?R0():536870912,e.lanes|=t,xl|=t)}function br(e,t){if(!Ce)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 o=null;n!==null;)n.alternate!==null&&(o=n),n=n.sibling;o===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function Xe(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,o=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,o|=i.subtreeFlags&65011712,o|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,o|=i.subtreeFlags,o|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=o,e.childLanes=n,t}function XN(e,t,n){var o=t.pendingProps;switch(nm(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xe(t),null;case 1:return Xe(t),null;case 3:return n=t.stateNode,o=null,e!==null&&(o=e.memoizedState.cache),t.memoizedState.cache!==o&&(t.flags|=2048),Xo(ct),hl(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Za(t)?Lo(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Nd())),Xe(t),null;case 26:var i=t.type,a=t.memoizedState;return e===null?(Lo(t),a!==null?(Xe(t),Xy(t,a)):(Xe(t),Ld(t,i,null,o,n))):a?a!==e.memoizedState?(Lo(t),Xe(t),Xy(t,a)):(Xe(t),t.flags&=-16777217):(e=e.memoizedProps,e!==o&&Lo(t),Xe(t),Ld(t,i,e,o,n)),null;case 27:if(Yu(t),n=Ni.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==o&&Lo(t);else{if(!o){if(t.stateNode===null)throw Error(U(166));return Xe(t),null}e=mo.current,Za(t)?by(t,e):(e=Kb(i,o,n),t.stateNode=e,Lo(t))}return Xe(t),null;case 5:if(Yu(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==o&&Lo(t);else{if(!o){if(t.stateNode===null)throw Error(U(166));return Xe(t),null}if(a=mo.current,Za(t))by(t,a);else{var l=cc(Ni.current);switch(a){case 1:a=l.createElementNS("http://www.w3.org/2000/svg",i);break;case 2:a=l.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;default:switch(i){case"svg":a=l.createElementNS("http://www.w3.org/2000/svg",i);break;case"math":a=l.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;case"script":a=l.createElement("div"),a.innerHTML="<script><\/script>",a=a.removeChild(a.firstChild);break;case"select":a=typeof o.is=="string"?l.createElement("select",{is:o.is}):l.createElement("select"),o.multiple?a.multiple=!0:o.size&&(a.size=o.size);break;default:a=typeof o.is=="string"?l.createElement(i,{is:o.is}):l.createElement(i)}}a[Dt]=t,a[rn]=o;e:for(l=t.child;l!==null;){if(l.tag===5||l.tag===6)a.appendChild(l.stateNode);else if(l.tag!==4&&l.tag!==27&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===t)break e;for(;l.sibling===null;){if(l.return===null||l.return===t)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}t.stateNode=a;e:switch(zt(a,i,o),i){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&Lo(t)}}return Xe(t),Ld(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==o&&Lo(t);else{if(typeof o!="string"&&t.stateNode===null)throw Error(U(166));if(e=Ni.current,Za(t)){if(e=t.stateNode,n=t.memoizedProps,o=null,i=Rt,i!==null)switch(i.tag){case 27:case 5:o=i.memoizedProps}e[Dt]=t,e=!!(e.nodeValue===n||o!==null&&o.suppressHydrationWarning===!0||Zb(e.nodeValue,n)),e||Bi(t,!0)}else e=cc(e).createTextNode(o),e[Dt]=t,t.stateNode=e}return Xe(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(o=Za(t),n!==null){if(e===null){if(!o)throw Error(U(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(U(557));e[Dt]=t}else la(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Xe(t),e=!1}else n=Nd(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(yn(t),t):(yn(t),null);if((t.flags&128)!==0)throw Error(U(558))}return Xe(t),null;case 13:if(o=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Za(t),o!==null&&o.dehydrated!==null){if(e===null){if(!i)throw Error(U(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(U(317));i[Dt]=t}else la(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Xe(t),i=!1}else i=Nd(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(yn(t),t):(yn(t),null)}return yn(t),(t.flags&128)!==0?(t.lanes=n,t):(n=o!==null,e=e!==null&&e.memoizedState!==null,n&&(o=t.child,i=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(i=o.alternate.memoizedState.cachePool.pool),a=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(a=o.memoizedState.cachePool.pool),a!==i&&(o.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),bu(t,t.updateQueue),Xe(t),null);case 4:return hl(),e===null&&Mm(t.stateNode.containerInfo),Xe(t),null;case 10:return Xo(t.type),Xe(t),null;case 19:if(Nt(at),o=t.memoizedState,o===null)return Xe(t),null;if(i=(t.flags&128)!==0,a=o.rendering,a===null)if(i)br(o,!1);else{if(nt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(a=Wu(e),a!==null){for(t.flags|=128,br(o,!1),e=a.updateQueue,t.updateQueue=e,bu(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)rv(n,e),n=n.sibling;return Ie(at,at.current&1|2),Ce&&ko(t,o.treeForkCount),t.child}e=e.sibling}o.tail!==null&&Sn()>ic&&(t.flags|=128,i=!0,br(o,!1),t.lanes=4194304)}else{if(!i)if(e=Wu(a),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,bu(t,e),br(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!Ce)return Xe(t),null}else 2*Sn()-o.renderingStartTime>ic&&n!==536870912&&(t.flags|=128,i=!0,br(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(e=o.last,e!==null?e.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=Sn(),e.sibling=null,n=at.current,Ie(at,i?n&1|2:n&1),Ce&&ko(t,o.treeForkCount),e):(Xe(t),null);case 22:case 23:return yn(t),rm(),o=t.memoizedState!==null,e!==null?e.memoizedState!==null!==o&&(t.flags|=8192):o&&(t.flags|=8192),o?(n&536870912)!==0&&(t.flags&128)===0&&(Xe(t),t.subtreeFlags&6&&(t.flags|=8192)):Xe(t),n=t.updateQueue,n!==null&&bu(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),o=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(o=t.memoizedState.cachePool.pool),o!==n&&(t.flags|=2048),e!==null&&Nt(oa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Xo(ct),Xe(t),null;case 25:return null;case 30:return null}throw Error(U(156,t.tag))}function qN(e,t){switch(nm(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Xo(ct),hl(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Yu(t),null;case 31:if(t.memoizedState!==null){if(yn(t),t.alternate===null)throw Error(U(340));la()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(yn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(U(340));la()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Nt(at),null;case 4:return hl(),null;case 10:return Xo(t.type),null;case 22:case 23:return yn(t),rm(),e!==null&&Nt(oa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Xo(ct),null;case 25:return null;default:return null}}function rb(e,t){switch(nm(t),t.tag){case 3:Xo(ct),hl();break;case 26:case 27:case 5:Yu(t);break;case 4:hl();break;case 31:t.memoizedState!==null&&yn(t);break;case 13:yn(t);break;case 19:Nt(at);break;case 10:Xo(t.type);break;case 22:case 23:yn(t),rm(),e!==null&&Nt(oa);break;case 24:Xo(ct)}}function us(e,t){try{var n=t.updateQueue,o=n!==null?n.lastEffect:null;if(o!==null){var i=o.next;n=i;do{if((n.tag&e)===e){o=void 0;var a=n.create,l=n.inst;o=a(),l.destroy=o}n=n.next}while(n!==i)}}catch(r){Oe(t,t.return,r)}}function Hi(e,t,n){try{var o=t.updateQueue,i=o!==null?o.lastEffect:null;if(i!==null){var a=i.next;o=a;do{if((o.tag&e)===e){var l=o.inst,r=l.destroy;if(r!==void 0){l.destroy=void 0,i=t;var s=n,u=r;try{u()}catch(c){Oe(i,s,c)}}}o=o.next}while(o!==a)}}catch(c){Oe(t,t.return,c)}}function sb(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{yv(t,n)}catch(o){Oe(e,e.return,o)}}}function ub(e,t,n){n.props=ca(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(o){Oe(e,t,o)}}function Hr(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var o=e.stateNode;break;case 30:o=e.stateNode;break;default:o=e.stateNode}typeof n=="function"?e.refCleanup=n(o):n.current=o}}catch(i){Oe(e,t,i)}}function po(e,t){var n=e.ref,o=e.refCleanup;if(n!==null)if(typeof o=="function")try{o()}catch(i){Oe(e,t,i)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(i){Oe(e,t,i)}else n.current=null}function cb(e){var t=e.type,n=e.memoizedProps,o=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&o.focus();break e;case"img":n.src?o.src=n.src:n.srcSet&&(o.srcset=n.srcSet)}}catch(i){Oe(e,e.return,i)}}function Bd(e,t,n){try{var o=e.stateNode;fC(o,e.type,n,t),o[rn]=t}catch(i){Oe(e,e.return,i)}}function fb(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Gi(e.type)||e.tag===4}function Hd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||fb(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.tag===27&&Gi(e.type)||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 Tp(e,t,n){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Io));else if(o!==4&&(o===27&&Gi(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Tp(e,t,n),e=e.sibling;e!==null;)Tp(e,t,n),e=e.sibling}function oc(e,t,n){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(o!==4&&(o===27&&Gi(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(oc(e,t,n),e=e.sibling;e!==null;)oc(e,t,n),e=e.sibling}function db(e){var t=e.stateNode,n=e.memoizedProps;try{for(var o=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);zt(t,o,n),t[Dt]=e,t[rn]=n}catch(a){Oe(e,e.return,a)}}var Go=!1,ut=!1,Pd=!1,qy=typeof WeakSet=="function"?WeakSet:Set,Et=null;function ZN(e,t){if(e=e.containerInfo,Rp=mc,e=J0(e),Qp(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var o=n.getSelection&&n.getSelection();if(o&&o.rangeCount!==0){n=o.anchorNode;var i=o.anchorOffset,a=o.focusNode;o=o.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break e}var l=0,r=-1,s=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var h;d!==n||i!==0&&d.nodeType!==3||(r=l+i),d!==a||o!==0&&d.nodeType!==3||(s=l+o),d.nodeType===3&&(l+=d.nodeValue.length),(h=d.firstChild)!==null;)f=d,d=h;for(;;){if(d===e)break t;if(f===n&&++u===i&&(r=l),f===a&&++c===o&&(s=l),(h=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=h}n=r===-1||s===-1?null:{start:r,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(Op={focusedElem:e,selectionRange:n},mc=!1,Et=t;Et!==null;)if(t=Et,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Et=e;else for(;Et!==null;){switch(t=Et,a=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n<e.length;n++)i=e[n],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&a!==null){e=void 0,n=t,i=a.memoizedProps,a=a.memoizedState,o=n.stateNode;try{var v=ca(n.type,i);e=o.getSnapshotBeforeUpdate(v,a),o.__reactInternalSnapshotBeforeUpdate=e}catch(b){Oe(n,n.return,b)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)Lp(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Lp(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(U(163))}if(e=t.sibling,e!==null){e.return=t.return,Et=e;break}Et=t.return}}function pb(e,t,n){var o=n.flags;switch(n.tag){case 0:case 11:case 15:Ho(e,n),o&4&&us(5,n);break;case 1:if(Ho(e,n),o&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(l){Oe(n,n.return,l)}else{var i=ca(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(l){Oe(n,n.return,l)}}o&64&&sb(n),o&512&&Hr(n,n.return);break;case 3:if(Ho(e,n),o&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{yv(e,t)}catch(l){Oe(n,n.return,l)}}break;case 27:t===null&&o&4&&db(n);case 26:case 5:Ho(e,n),t===null&&o&4&&cb(n),o&512&&Hr(n,n.return);break;case 12:Ho(e,n);break;case 31:Ho(e,n),o&4&&gb(e,n);break;case 13:Ho(e,n),o&4&&yb(e,n),o&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=tC.bind(null,n),bC(e,n))));break;case 22:if(o=n.memoizedState!==null||Go,!o){t=t!==null&&t.memoizedState!==null||ut,i=Go;var a=ut;Go=o,(ut=t)&&!a?Po(e,n,(n.subtreeFlags&8772)!==0):Ho(e,n),Go=i,ut=a}break;case 30:break;default:Ho(e,n)}}function mb(e){var t=e.alternate;t!==null&&(e.alternate=null,mb(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&qp(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Ke=null,on=!1;function Bo(e,t,n){for(n=n.child;n!==null;)hb(e,t,n),n=n.sibling}function hb(e,t,n){if(xn&&typeof xn.onCommitFiberUnmount=="function")try{xn.onCommitFiberUnmount(ns,n)}catch{}switch(n.tag){case 26:ut||po(n,t),Bo(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:ut||po(n,t);var o=Ke,i=on;Gi(n.type)&&(Ke=n.stateNode,on=!1),Bo(e,t,n),Ur(n.stateNode),Ke=o,on=i;break;case 5:ut||po(n,t);case 6:if(o=Ke,i=on,Ke=null,Bo(e,t,n),Ke=o,on=i,Ke!==null)if(on)try{(Ke.nodeType===9?Ke.body:Ke.nodeName==="HTML"?Ke.ownerDocument.body:Ke).removeChild(n.stateNode)}catch(a){Oe(n,t,a)}else try{Ke.removeChild(n.stateNode)}catch(a){Oe(n,t,a)}break;case 18:Ke!==null&&(on?(e=Ke,l0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Nl(e)):l0(Ke,n.stateNode));break;case 4:o=Ke,i=on,Ke=n.stateNode.containerInfo,on=!0,Bo(e,t,n),Ke=o,on=i;break;case 0:case 11:case 14:case 15:Hi(2,n,t),ut||Hi(4,n,t),Bo(e,t,n);break;case 1:ut||(po(n,t),o=n.stateNode,typeof o.componentWillUnmount=="function"&&ub(n,t,o)),Bo(e,t,n);break;case 21:Bo(e,t,n);break;case 22:ut=(o=ut)||n.memoizedState!==null,Bo(e,t,n),ut=o;break;default:Bo(e,t,n)}}function gb(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Nl(e)}catch(n){Oe(t,t.return,n)}}}function yb(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Nl(e)}catch(n){Oe(t,t.return,n)}}function jN(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new qy),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new qy),t;default:throw Error(U(435,e.tag))}}function Su(e,t){var n=jN(e);t.forEach(function(o){if(!n.has(o)){n.add(o);var i=nC.bind(null,e,o);o.then(i,i)}})}function tn(e,t){var n=t.deletions;if(n!==null)for(var o=0;o<n.length;o++){var i=n[o],a=e,l=t,r=l;e:for(;r!==null;){switch(r.tag){case 27:if(Gi(r.type)){Ke=r.stateNode,on=!1;break e}break;case 5:Ke=r.stateNode,on=!1;break e;case 3:case 4:Ke=r.stateNode.containerInfo,on=!0;break e}r=r.return}if(Ke===null)throw Error(U(160));hb(a,l,i),Ke=null,on=!1,a=i.alternate,a!==null&&(a.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)vb(t,e),t=t.sibling}var eo=null;function vb(e,t){var n=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:tn(t,e),nn(e),o&4&&(Hi(3,e,e.return),us(3,e),Hi(5,e,e.return));break;case 1:tn(t,e),nn(e),o&512&&(ut||n===null||po(n,n.return)),o&64&&Go&&(e=e.updateQueue,e!==null&&(o=e.callbacks,o!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?o:n.concat(o))));break;case 26:var i=eo;if(tn(t,e),nn(e),o&512&&(ut||n===null||po(n,n.return)),o&4){var a=n!==null?n.memoizedState:null;if(o=e.memoizedState,n===null)if(o===null)if(e.stateNode===null){e:{o=e.type,n=e.memoizedProps,i=i.ownerDocument||i;t:switch(o){case"title":a=i.getElementsByTagName("title")[0],(!a||a[as]||a[Dt]||a.namespaceURI==="http://www.w3.org/2000/svg"||a.hasAttribute("itemprop"))&&(a=i.createElement(o),i.head.insertBefore(a,i.querySelector("head > title"))),zt(a,o,n),a[Dt]=e,Tt(a),o=a;break e;case"link":var l=p0("link","href",i).get(o+(n.href||""));if(l){for(var r=0;r<l.length;r++)if(a=l[r],a.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&a.getAttribute("rel")===(n.rel==null?null:n.rel)&&a.getAttribute("title")===(n.title==null?null:n.title)&&a.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){l.splice(r,1);break t}}a=i.createElement(o),zt(a,o,n),i.head.appendChild(a);break;case"meta":if(l=p0("meta","content",i).get(o+(n.content||""))){for(r=0;r<l.length;r++)if(a=l[r],a.getAttribute("content")===(n.content==null?null:""+n.content)&&a.getAttribute("name")===(n.name==null?null:n.name)&&a.getAttribute("property")===(n.property==null?null:n.property)&&a.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&a.getAttribute("charset")===(n.charSet==null?null:n.charSet)){l.splice(r,1);break t}}a=i.createElement(o),zt(a,o,n),i.head.appendChild(a);break;default:throw Error(U(468,o))}a[Dt]=e,Tt(a),o=a}e.stateNode=o}else m0(i,e.type,e.stateNode);else e.stateNode=d0(i,o,e.memoizedProps);else a!==o?(a===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):a.count--,o===null?m0(i,e.type,e.stateNode):d0(i,o,e.memoizedProps)):o===null&&e.stateNode!==null&&Bd(e,e.memoizedProps,n.memoizedProps)}break;case 27:tn(t,e),nn(e),o&512&&(ut||n===null||po(n,n.return)),n!==null&&o&4&&Bd(e,e.memoizedProps,n.memoizedProps);break;case 5:if(tn(t,e),nn(e),o&512&&(ut||n===null||po(n,n.return)),e.flags&32){i=e.stateNode;try{yl(i,"")}catch(v){Oe(e,e.return,v)}}o&4&&e.stateNode!=null&&(i=e.memoizedProps,Bd(e,i,n!==null?n.memoizedProps:i)),o&1024&&(Pd=!0);break;case 6:if(tn(t,e),nn(e),o&4){if(e.stateNode===null)throw Error(U(162));o=e.memoizedProps,n=e.stateNode;try{n.nodeValue=o}catch(v){Oe(e,e.return,v)}}break;case 3:if(ku=null,i=eo,eo=fc(t.containerInfo),tn(t,e),eo=i,nn(e),o&4&&n!==null&&n.memoizedState.isDehydrated)try{Nl(t.containerInfo)}catch(v){Oe(e,e.return,v)}Pd&&(Pd=!1,bb(e));break;case 4:o=eo,eo=fc(e.stateNode.containerInfo),tn(t,e),nn(e),eo=o;break;case 12:tn(t,e),nn(e);break;case 31:tn(t,e),nn(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,Su(e,o)));break;case 13:tn(t,e),nn(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(wc=Sn()),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,Su(e,o)));break;case 22:i=e.memoizedState!==null;var s=n!==null&&n.memoizedState!==null,u=Go,c=ut;if(Go=u||i,ut=c||s,tn(t,e),ut=c,Go=u,nn(e),o&8192)e:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(n===null||s||Go||ut||ea(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){s=n=t;try{if(a=s.stateNode,i)l=a.style,typeof l.setProperty=="function"?l.setProperty("display","none","important"):l.display="none";else{r=s.stateNode;var d=s.memoizedProps.style,f=d!=null&&d.hasOwnProperty("display")?d.display:null;r.style.display=f==null||typeof f=="boolean"?"":(""+f).trim()}}catch(v){Oe(s,s.return,v)}}}else if(t.tag===6){if(n===null){s=t;try{s.stateNode.nodeValue=i?"":s.memoizedProps}catch(v){Oe(s,s.return,v)}}}else if(t.tag===18){if(n===null){s=t;try{var h=s.stateNode;i?r0(h,!0):r0(s.stateNode,!1)}catch(v){Oe(s,s.return,v)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}o&4&&(o=e.updateQueue,o!==null&&(n=o.retryQueue,n!==null&&(o.retryQueue=null,Su(e,n))));break;case 19:tn(t,e),nn(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,Su(e,o)));break;case 30:break;case 21:break;default:tn(t,e),nn(e)}}function nn(e){var t=e.flags;if(t&2){try{for(var n,o=e.return;o!==null;){if(fb(o)){n=o;break}o=o.return}if(n==null)throw Error(U(160));switch(n.tag){case 27:var i=n.stateNode,a=Hd(e);oc(e,a,i);break;case 5:var l=n.stateNode;n.flags&32&&(yl(l,""),n.flags&=-33);var r=Hd(e);oc(e,r,l);break;case 3:case 4:var s=n.stateNode.containerInfo,u=Hd(e);Tp(e,u,s);break;default:throw Error(U(161))}}catch(c){Oe(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function bb(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;bb(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Ho(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)pb(e,t.alternate,t),t=t.sibling}function ea(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Hi(4,t,t.return),ea(t);break;case 1:po(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&ub(t,t.return,n),ea(t);break;case 27:Ur(t.stateNode);case 26:case 5:po(t,t.return),ea(t);break;case 22:t.memoizedState===null&&ea(t);break;case 30:ea(t);break;default:ea(t)}e=e.sibling}}function Po(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var o=t.alternate,i=e,a=t,l=a.flags;switch(a.tag){case 0:case 11:case 15:Po(i,a,n),us(4,a);break;case 1:if(Po(i,a,n),o=a,i=o.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(u){Oe(o,o.return,u)}if(o=a,i=o.updateQueue,i!==null){var r=o.stateNode;try{var s=i.shared.hiddenCallbacks;if(s!==null)for(i.shared.hiddenCallbacks=null,i=0;i<s.length;i++)gv(s[i],r)}catch(u){Oe(o,o.return,u)}}n&&l&64&&sb(a),Hr(a,a.return);break;case 27:db(a);case 26:case 5:Po(i,a,n),n&&o===null&&l&4&&cb(a),Hr(a,a.return);break;case 12:Po(i,a,n);break;case 31:Po(i,a,n),n&&l&4&&gb(i,a);break;case 13:Po(i,a,n),n&&l&4&&yb(i,a);break;case 22:a.memoizedState===null&&Po(i,a,n),Hr(a,a.return);break;case 30:break;default:Po(i,a,n)}t=t.sibling}}function Em(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&rs(n))}function Tm(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&rs(e))}function Jn(e,t,n,o){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Sb(e,t,n,o),t=t.sibling}function Sb(e,t,n,o){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Jn(e,t,n,o),i&2048&&us(9,t);break;case 1:Jn(e,t,n,o);break;case 3:Jn(e,t,n,o),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&rs(e)));break;case 12:if(i&2048){Jn(e,t,n,o),e=t.stateNode;try{var a=t.memoizedProps,l=a.id,r=a.onPostCommit;typeof r=="function"&&r(l,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(s){Oe(t,t.return,s)}}else Jn(e,t,n,o);break;case 31:Jn(e,t,n,o);break;case 13:Jn(e,t,n,o);break;case 23:break;case 22:a=t.stateNode,l=t.alternate,t.memoizedState!==null?a._visibility&2?Jn(e,t,n,o):Pr(e,t):a._visibility&2?Jn(e,t,n,o):(a._visibility|=2,$a(e,t,n,o,(t.subtreeFlags&10256)!==0||!1)),i&2048&&Em(l,t);break;case 24:Jn(e,t,n,o),i&2048&&Tm(t.alternate,t);break;default:Jn(e,t,n,o)}}function $a(e,t,n,o,i){for(i=i&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var a=e,l=t,r=n,s=o,u=l.flags;switch(l.tag){case 0:case 11:case 15:$a(a,l,r,s,i),us(8,l);break;case 23:break;case 22:var c=l.stateNode;l.memoizedState!==null?c._visibility&2?$a(a,l,r,s,i):Pr(a,l):(c._visibility|=2,$a(a,l,r,s,i)),i&&u&2048&&Em(l.alternate,l);break;case 24:$a(a,l,r,s,i),i&&u&2048&&Tm(l.alternate,l);break;default:$a(a,l,r,s,i)}t=t.sibling}}function Pr(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,o=t,i=o.flags;switch(o.tag){case 22:Pr(n,o),i&2048&&Em(o.alternate,o);break;case 24:Pr(n,o),i&2048&&Tm(o.alternate,o);break;default:Pr(n,o)}t=t.sibling}}var wr=8192;function ja(e,t,n){if(e.subtreeFlags&wr)for(e=e.child;e!==null;)xb(e,t,n),e=e.sibling}function xb(e,t,n){switch(e.tag){case 26:ja(e,t,n),e.flags&wr&&e.memoizedState!==null&&RC(n,eo,e.memoizedState,e.memoizedProps);break;case 5:ja(e,t,n);break;case 3:case 4:var o=eo;eo=fc(e.stateNode.containerInfo),ja(e,t,n),eo=o;break;case 22:e.memoizedState===null&&(o=e.alternate,o!==null&&o.memoizedState!==null?(o=wr,wr=16777216,ja(e,t,n),wr=o):ja(e,t,n));break;default:ja(e,t,n)}}function _b(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Sr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var o=t[n];Et=o,Tb(o,e)}_b(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Eb(e),e=e.sibling}function Eb(e){switch(e.tag){case 0:case 11:case 15:Sr(e),e.flags&2048&&Hi(9,e,e.return);break;case 3:Sr(e);break;case 12:Sr(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Hu(e)):Sr(e);break;default:Sr(e)}}function Hu(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var o=t[n];Et=o,Tb(o,e)}_b(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Hi(8,t,t.return),Hu(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Hu(t));break;default:Hu(t)}e=e.sibling}}function Tb(e,t){for(;Et!==null;){var n=Et;switch(n.tag){case 0:case 11:case 15:Hi(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var o=n.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:rs(n.memoizedState.cache)}if(o=n.child,o!==null)o.return=n,Et=o;else e:for(n=e;Et!==null;){o=Et;var i=o.sibling,a=o.return;if(mb(o),o===n){Et=null;break e}if(i!==null){i.return=a,Et=i;break e}Et=a}}}var $N={getCacheForType:function(e){var t=Ot(ct),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Ot(ct).controller.signal}},FN=typeof WeakMap=="function"?WeakMap:Map,Me=0,Ue=null,_e=null,Ne=0,Re=0,gn=null,_i=!1,Dl=!1,Nm=!1,Ko=0,nt=0,Pi=0,aa=0,Cm=0,bn=0,xl=0,kr=null,an=null,Np=!1,wc=0,Nb=0,ic=1/0,ac=null,Mi=null,ht=0,Di=null,_l=null,qo=0,Cp=0,wp=null,Cb=null,Gr=0,Ap=null;function En(){return(Me&2)!==0&&Ne!==0?Ne&-Ne:ce.T!==null?Am():B0()}function wb(){if(bn===0)if((Ne&536870912)===0||Ce){var e=cu;cu<<=1,(cu&3932160)===0&&(cu=262144),bn=e}else bn=536870912;return e=Nn.current,e!==null&&(e.flags|=32),bn}function ln(e,t,n){(e===Ue&&(Re===2||Re===9)||e.cancelPendingCommit!==null)&&(El(e,0),Ei(e,Ne,bn,!1)),is(e,n),((Me&2)===0||e!==Ue)&&(e===Ue&&((Me&2)===0&&(aa|=n),nt===4&&Ei(e,Ne,bn,!1)),go(e))}function Ab(e,t,n){if((Me&6)!==0)throw Error(U(327));var o=!n&&(t&127)===0&&(t&e.expiredLanes)===0||os(e,t),i=o?WN(e,t):kd(e,t,!0),a=o;do{if(i===0){Dl&&!o&&Ei(e,t,0,!1);break}else{if(n=e.current.alternate,a&&!KN(n)){i=kd(e,t,!1),a=!1;continue}if(i===2){if(a=t,e.errorRecoveryDisabledLanes&a)var l=0;else l=e.pendingLanes&-536870913,l=l!==0?l:l&536870912?536870912:0;if(l!==0){t=l;e:{var r=e;i=kr;var s=r.current.memoizedState.isDehydrated;if(s&&(El(r,l).flags|=256),l=kd(r,l,!1),l!==2){if(Nm&&!s){r.errorRecoveryDisabledLanes|=a,aa|=a,i=4;break e}a=an,an=i,a!==null&&(an===null?an=a:an.push.apply(an,a))}i=l}if(a=!1,i!==2)continue}}if(i===1){El(e,0),Ei(e,t,0,!0);break}e:{switch(o=e,a=i,a){case 0:case 1:throw Error(U(345));case 4:if((t&4194048)!==t)break;case 6:Ei(o,t,bn,!_i);break e;case 2:an=null;break;case 3:case 5:break;default:throw Error(U(329))}if((t&62914560)===t&&(i=wc+300-Sn(),10<i)){if(Ei(o,t,bn,!_i),gc(o,0,!0)!==0)break e;qo=t,o.timeoutHandle=$b(Zy.bind(null,o,n,an,ac,Np,t,bn,aa,xl,_i,a,"Throttled",-0,0),i);break e}Zy(o,n,an,ac,Np,t,bn,aa,xl,_i,a,null,-0,0)}}break}while(!0);go(e)}function Zy(e,t,n,o,i,a,l,r,s,u,c,d,f,h){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)===16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Io},xb(t,a,d);var v=(a&62914560)===a?wc-Sn():(a&4194048)===a?Nb-Sn():0;if(v=OC(d,v),v!==null){qo=a,e.cancelPendingCommit=v($y.bind(null,e,t,a,n,o,i,l,r,s,c,d,null,f,h)),Ei(e,a,l,!u);return}}$y(e,t,a,n,o,i,l,r,s)}function KN(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var o=0;o<n.length;o++){var i=n[o],a=i.getSnapshot;i=i.value;try{if(!Tn(a(),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 Ei(e,t,n,o){t&=~Cm,t&=~aa,e.suspendedLanes|=t,e.pingedLanes&=~t,o&&(e.warmLanes|=t),o=e.expirationTimes;for(var i=t;0<i;){var a=31-_n(i),l=1<<a;o[a]=-1,i&=~l}n!==0&&O0(e,n,t)}function Ac(){return(Me&6)===0?(cs(0,!1),!1):!0}function wm(){if(_e!==null){if(Re===0)var e=_e.return;else e=_e,Vo=ha=null,dm(e),dl=null,jr=0,e=_e;for(;e!==null;)rb(e.alternate,e),e=e.return;_e=null}}function El(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,mC(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),qo=0,wm(),Ue=e,_e=n=Yo(e.current,null),Ne=t,Re=0,gn=null,_i=!1,Dl=os(e,t),Nm=!1,xl=bn=Cm=aa=Pi=nt=0,an=kr=null,Np=!1,(t&8)!==0&&(t|=t&32);var o=e.entangledLanes;if(o!==0)for(e=e.entanglements,o&=t;0<o;){var i=31-_n(o),a=1<<i;t|=e[i],o&=~a}return Ko=t,Sc(),n}function Mb(e,t){ve=null,ce.H=Fr,t===Ml||t===_c?(t=Ty(),Re=3):t===am?(t=Ty(),Re=4):Re=t===xm?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,gn=t,_e===null&&(nt=1,tc(e,Un(t,e.current)))}function Db(){var e=Nn.current;return e===null?!0:(Ne&4194048)===Ne?Vn===null:(Ne&62914560)===Ne||(Ne&536870912)!==0?e===Vn:!1}function Rb(){var e=ce.H;return ce.H=Fr,e===null?Fr:e}function Ob(){var e=ce.A;return ce.A=$N,e}function lc(){nt=4,_i||(Ne&4194048)!==Ne&&Nn.current!==null||(Dl=!0),(Pi&134217727)===0&&(aa&134217727)===0||Ue===null||Ei(Ue,Ne,bn,!1)}function kd(e,t,n){var o=Me;Me|=2;var i=Rb(),a=Ob();(Ue!==e||Ne!==t)&&(ac=null,El(e,t)),t=!1;var l=nt;e:do try{if(Re!==0&&_e!==null){var r=_e,s=gn;switch(Re){case 8:wm(),l=6;break e;case 3:case 2:case 9:case 6:Nn.current===null&&(t=!0);var u=Re;if(Re=0,gn=null,rl(e,r,s,u),n&&Dl){l=0;break e}break;default:u=Re,Re=0,gn=null,rl(e,r,s,u)}}QN(),l=nt;break}catch(c){Mb(e,c)}while(!0);return t&&e.shellSuspendCounter++,Vo=ha=null,Me=o,ce.H=i,ce.A=a,_e===null&&(Ue=null,Ne=0,Sc()),l}function QN(){for(;_e!==null;)zb(_e)}function WN(e,t){var n=Me;Me|=2;var o=Rb(),i=Ob();Ue!==e||Ne!==t?(ac=null,ic=Sn()+500,El(e,t)):Dl=os(e,t);e:do try{if(Re!==0&&_e!==null){t=_e;var a=gn;t:switch(Re){case 1:Re=0,gn=null,rl(e,t,a,1);break;case 2:case 9:if(Ey(a)){Re=0,gn=null,jy(t);break}t=function(){Re!==2&&Re!==9||Ue!==e||(Re=7),go(e)},a.then(t,t);break e;case 3:Re=7;break e;case 4:Re=5;break e;case 7:Ey(a)?(Re=0,gn=null,jy(t)):(Re=0,gn=null,rl(e,t,a,7));break;case 5:var l=null;switch(_e.tag){case 26:l=_e.memoizedState;case 5:case 27:var r=_e;if(l?Jb(l):r.stateNode.complete){Re=0,gn=null;var s=r.sibling;if(s!==null)_e=s;else{var u=r.return;u!==null?(_e=u,Mc(u)):_e=null}break t}}Re=0,gn=null,rl(e,t,a,5);break;case 6:Re=0,gn=null,rl(e,t,a,6);break;case 8:wm(),nt=6;break e;default:throw Error(U(462))}}JN();break}catch(c){Mb(e,c)}while(!0);return Vo=ha=null,ce.H=o,ce.A=i,Me=n,_e!==null?0:(Ue=null,Ne=0,Sc(),nt)}function JN(){for(;_e!==null&&!_2();)zb(_e)}function zb(e){var t=lb(e.alternate,e,Ko);e.memoizedProps=e.pendingProps,t===null?Mc(e):_e=t}function jy(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Uy(n,t,t.pendingProps,t.type,void 0,Ne);break;case 11:t=Uy(n,t,t.pendingProps,t.type.render,t.ref,Ne);break;case 5:dm(t);default:rb(n,t),t=_e=rv(t,Ko),t=lb(n,t,Ko)}e.memoizedProps=e.pendingProps,t===null?Mc(e):_e=t}function rl(e,t,n,o){Vo=ha=null,dm(t),dl=null,jr=0;var i=t.return;try{if(IN(e,i,t,n,Ne)){nt=1,tc(e,Un(n,e.current)),_e=null;return}}catch(a){if(i!==null)throw _e=i,a;nt=1,tc(e,Un(n,e.current)),_e=null;return}t.flags&32768?(Ce||o===1?e=!0:Dl||(Ne&536870912)!==0?e=!1:(_i=e=!0,(o===2||o===9||o===3||o===6)&&(o=Nn.current,o!==null&&o.tag===13&&(o.flags|=16384))),Lb(t,e)):Mc(t)}function Mc(e){var t=e;do{if((t.flags&32768)!==0){Lb(t,_i);return}e=t.return;var n=XN(t.alternate,t,Ko);if(n!==null){_e=n;return}if(t=t.sibling,t!==null){_e=t;return}_e=t=e}while(t!==null);nt===0&&(nt=5)}function Lb(e,t){do{var n=qN(e.alternate,e);if(n!==null){n.flags&=32767,_e=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){_e=e;return}_e=e=n}while(e!==null);nt=6,_e=null}function $y(e,t,n,o,i,a,l,r,s){e.cancelPendingCommit=null;do Dc();while(ht!==0);if((Me&6)!==0)throw Error(U(327));if(t!==null){if(t===e.current)throw Error(U(177));if(a=t.lanes|t.childLanes,a|=Wp,O2(e,n,a,l,r,s),e===Ue&&(_e=Ue=null,Ne=0),_l=t,Di=e,qo=n,Cp=a,wp=i,Cb=o,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,oC(Xu,function(){return Gb(),null})):(e.callbackNode=null,e.callbackPriority=0),o=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||o){o=ce.T,ce.T=null,i=De.p,De.p=2,l=Me,Me|=4;try{ZN(e,t,n)}finally{Me=l,De.p=i,ce.T=o}}ht=1,Bb(),Hb(),Pb()}}function Bb(){if(ht===1){ht=0;var e=Di,t=_l,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=ce.T,ce.T=null;var o=De.p;De.p=2;var i=Me;Me|=4;try{vb(t,e);var a=Op,l=J0(e.containerInfo),r=a.focusedElem,s=a.selectionRange;if(l!==r&&r&&r.ownerDocument&&W0(r.ownerDocument.documentElement,r)){if(s!==null&&Qp(r)){var u=s.start,c=s.end;if(c===void 0&&(c=u),"selectionStart"in r)r.selectionStart=u,r.selectionEnd=Math.min(c,r.value.length);else{var d=r.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var h=f.getSelection(),v=r.textContent.length,b=Math.min(s.start,v),S=s.end===void 0?b:Math.min(s.end,v);!h.extend&&b>S&&(l=S,S=b,b=l);var p=gy(r,b),g=gy(r,S);if(p&&g&&(h.rangeCount!==1||h.anchorNode!==p.node||h.anchorOffset!==p.offset||h.focusNode!==g.node||h.focusOffset!==g.offset)){var m=d.createRange();m.setStart(p.node,p.offset),h.removeAllRanges(),b>S?(h.addRange(m),h.extend(g.node,g.offset)):(m.setEnd(g.node,g.offset),h.addRange(m))}}}}for(d=[],h=r;h=h.parentNode;)h.nodeType===1&&d.push({element:h,left:h.scrollLeft,top:h.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<d.length;r++){var y=d[r];y.element.scrollLeft=y.left,y.element.scrollTop=y.top}}mc=!!Rp,Op=Rp=null}finally{Me=i,De.p=o,ce.T=n}}e.current=t,ht=2}}function Hb(){if(ht===2){ht=0;var e=Di,t=_l,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=ce.T,ce.T=null;var o=De.p;De.p=2;var i=Me;Me|=4;try{pb(e,t.alternate,t)}finally{Me=i,De.p=o,ce.T=n}}ht=3}}function Pb(){if(ht===4||ht===3){ht=0,E2();var e=Di,t=_l,n=qo,o=Cb;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?ht=5:(ht=0,_l=Di=null,kb(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(Mi=null),Xp(n),t=t.stateNode,xn&&typeof xn.onCommitFiberRoot=="function")try{xn.onCommitFiberRoot(ns,t,void 0,(t.current.flags&128)===128)}catch{}if(o!==null){t=ce.T,i=De.p,De.p=2,ce.T=null;try{for(var a=e.onRecoverableError,l=0;l<o.length;l++){var r=o[l];a(r.value,{componentStack:r.stack})}}finally{ce.T=t,De.p=i}}(qo&3)!==0&&Dc(),go(e),i=e.pendingLanes,(n&261930)!==0&&(i&42)!==0?e===Ap?Gr++:(Gr=0,Ap=e):Gr=0,cs(0,!1)}}function kb(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,rs(t)))}function Dc(){return Bb(),Hb(),Pb(),Gb()}function Gb(){if(ht!==5)return!1;var e=Di,t=Cp;Cp=0;var n=Xp(qo),o=ce.T,i=De.p;try{De.p=32>n?32:n,ce.T=null,n=wp,wp=null;var a=Di,l=qo;if(ht=0,_l=Di=null,qo=0,(Me&6)!==0)throw Error(U(331));var r=Me;if(Me|=4,Eb(a.current),Sb(a,a.current,l,n),Me=r,cs(0,!1),xn&&typeof xn.onPostCommitFiberRoot=="function")try{xn.onPostCommitFiberRoot(ns,a)}catch{}return!0}finally{De.p=i,ce.T=o,kb(e,t)}}function Fy(e,t,n){t=Un(n,t),t=xp(e.stateNode,t,2),e=Ai(e,t,2),e!==null&&(is(e,2),go(e))}function Oe(e,t,n){if(e.tag===3)Fy(e,e,n);else for(;t!==null;){if(t.tag===3){Fy(t,e,n);break}else if(t.tag===1){var o=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(Mi===null||!Mi.has(o))){e=Un(n,e),n=eb(2),o=Ai(t,n,2),o!==null&&(tb(n,o,t,e),is(o,2),go(o));break}}t=t.return}}function Gd(e,t,n){var o=e.pingCache;if(o===null){o=e.pingCache=new FN;var i=new Set;o.set(t,i)}else i=o.get(t),i===void 0&&(i=new Set,o.set(t,i));i.has(n)||(Nm=!0,i.add(n),e=eC.bind(null,e,t,n),t.then(e,e))}function eC(e,t,n){var o=e.pingCache;o!==null&&o.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ue===e&&(Ne&n)===n&&(nt===4||nt===3&&(Ne&62914560)===Ne&&300>Sn()-wc?(Me&2)===0&&El(e,0):Cm|=n,xl===Ne&&(xl=0)),go(e)}function Ub(e,t){t===0&&(t=R0()),e=ma(e,t),e!==null&&(is(e,t),go(e))}function tC(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ub(e,n)}function nC(e,t){var n=0;switch(e.tag){case 31:case 13:var o=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:o=e.stateNode;break;case 22:o=e.stateNode._retryCache;break;default:throw Error(U(314))}o!==null&&o.delete(t),Ub(e,n)}function oC(e,t){return Vp(e,t)}var rc=null,Fa=null,Mp=!1,sc=!1,Ud=!1,Ti=0;function go(e){e!==Fa&&e.next===null&&(Fa===null?rc=Fa=e:Fa=Fa.next=e),sc=!0,Mp||(Mp=!0,aC())}function cs(e,t){if(!Ud&&sc){Ud=!0;do for(var n=!1,o=rc;o!==null;){if(!t)if(e!==0){var i=o.pendingLanes;if(i===0)var a=0;else{var l=o.suspendedLanes,r=o.pingedLanes;a=(1<<31-_n(42|e)+1)-1,a&=i&~(l&~r),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Ky(o,a))}else a=Ne,a=gc(o,o===Ue?a:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(a&3)===0||os(o,a)||(n=!0,Ky(o,a));o=o.next}while(n);Ud=!1}}function iC(){Ib()}function Ib(){sc=Mp=!1;var e=0;Ti!==0&&pC()&&(e=Ti);for(var t=Sn(),n=null,o=rc;o!==null;){var i=o.next,a=Vb(o,t);a===0?(o.next=null,n===null?rc=i:n.next=i,i===null&&(Fa=n)):(n=o,(e!==0||(a&3)!==0)&&(sc=!0)),o=i}ht!==0&&ht!==5||cs(e,!1),Ti!==0&&(Ti=0)}function Vb(e,t){for(var n=e.suspendedLanes,o=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var l=31-_n(a),r=1<<l,s=i[l];s===-1?((r&n)===0||(r&o)!==0)&&(i[l]=R2(r,t)):s<=t&&(e.expiredLanes|=r),a&=~r}if(t=Ue,n=Ne,n=gc(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o=e.callbackNode,n===0||e===t&&(Re===2||Re===9)||e.cancelPendingCommit!==null)return o!==null&&o!==null&&hd(o),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||os(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(o!==null&&hd(o),Xp(n)){case 2:case 8:n=M0;break;case 32:n=Xu;break;case 268435456:n=D0;break;default:n=Xu}return o=Yb.bind(null,e),n=Vp(n,o),e.callbackPriority=t,e.callbackNode=n,t}return o!==null&&o!==null&&hd(o),e.callbackPriority=2,e.callbackNode=null,2}function Yb(e,t){if(ht!==0&&ht!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Dc()&&e.callbackNode!==n)return null;var o=Ne;return o=gc(e,e===Ue?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o===0?null:(Ab(e,o,t),Vb(e,Sn()),e.callbackNode!=null&&e.callbackNode===n?Yb.bind(null,e):null)}function Ky(e,t){if(Dc())return null;Ab(e,t,!0)}function aC(){hC(function(){(Me&6)!==0?Vp(A0,iC):Ib()})}function Am(){if(Ti===0){var e=vl;e===0&&(e=uu,uu<<=1,(uu&261888)===0&&(uu=256)),Ti=e}return Ti}function Qy(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:wu(""+e)}function Wy(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function lC(e,t,n,o,i){if(t==="submit"&&n&&n.stateNode===i){var a=Qy((i[rn]||null).action),l=o.submitter;l&&(t=(t=l[rn]||null)?Qy(t.formAction):l.getAttribute("formAction"),t!==null&&(a=t,l=null));var r=new yc("action","action",null,o,i);e.push({event:r,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(Ti!==0){var s=l?Wy(i,l):new FormData(i);bp(n,{pending:!0,data:s,method:i.method,action:a},null,s)}}else typeof a=="function"&&(r.preventDefault(),s=l?Wy(i,l):new FormData(i),bp(n,{pending:!0,data:s,method:i.method,action:a},a,s))},currentTarget:i}]})}}for(xu=0;xu<rp.length;xu++)_u=rp[xu],Jy=_u.toLowerCase(),e0=_u[0].toUpperCase()+_u.slice(1),to(Jy,"on"+e0);var _u,Jy,e0,xu;to(tv,"onAnimationEnd");to(nv,"onAnimationIteration");to(ov,"onAnimationStart");to("dblclick","onDoubleClick");to("focusin","onFocus");to("focusout","onBlur");to(TN,"onTransitionRun");to(NN,"onTransitionStart");to(CN,"onTransitionCancel");to(iv,"onTransitionEnd");gl("onMouseEnter",["mouseout","mouseover"]);gl("onMouseLeave",["mouseout","mouseover"]);gl("onPointerEnter",["pointerout","pointerover"]);gl("onPointerLeave",["pointerout","pointerover"]);fa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));fa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));fa("onBeforeInput",["compositionend","keypress","textInput","paste"]);fa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));fa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));fa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Kr="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(" "),rC=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Kr));function Xb(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var o=e[n],i=o.event;o=o.listeners;e:{var a=void 0;if(t)for(var l=o.length-1;0<=l;l--){var r=o[l],s=r.instance,u=r.currentTarget;if(r=r.listener,s!==a&&i.isPropagationStopped())break e;a=r,i.currentTarget=u;try{a(i)}catch(c){Zu(c)}i.currentTarget=null,a=s}else for(l=0;l<o.length;l++){if(r=o[l],s=r.instance,u=r.currentTarget,r=r.listener,s!==a&&i.isPropagationStopped())break e;a=r,i.currentTarget=u;try{a(i)}catch(c){Zu(c)}i.currentTarget=null,a=s}}}}function xe(e,t){var n=t[Jd];n===void 0&&(n=t[Jd]=new Set);var o=e+"__bubble";n.has(o)||(qb(t,e,2,!1),n.add(o))}function Id(e,t,n){var o=0;t&&(o|=4),qb(n,e,o,t)}var Eu="_reactListening"+Math.random().toString(36).slice(2);function Mm(e){if(!e[Eu]){e[Eu]=!0,H0.forEach(function(n){n!=="selectionchange"&&(rC.has(n)||Id(n,!1,e),Id(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Eu]||(t[Eu]=!0,Id("selectionchange",!1,t))}}function qb(e,t,n,o){switch(i1(t)){case 2:var i=BC;break;case 8:i=HC;break;default:i=zm}n=i.bind(null,t,n,e),i=void 0,!ip||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),o?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 Vd(e,t,n,o,i){var a=o;if((t&1)===0&&(t&2)===0&&o!==null)e:for(;;){if(o===null)return;var l=o.tag;if(l===3||l===4){var r=o.stateNode.containerInfo;if(r===i)break;if(l===4)for(l=o.return;l!==null;){var s=l.tag;if((s===3||s===4)&&l.stateNode.containerInfo===i)return;l=l.return}for(;r!==null;){if(l=Wa(r),l===null)return;if(s=l.tag,s===5||s===6||s===26||s===27){o=a=l;continue e}r=r.parentNode}}o=o.return}X0(function(){var u=a,c=jp(n),d=[];e:{var f=av.get(e);if(f!==void 0){var h=yc,v=e;switch(e){case"keypress":if(Mu(n)===0)break e;case"keydown":case"keyup":h=nN;break;case"focusin":v="focus",h=Sd;break;case"focusout":v="blur",h=Sd;break;case"beforeblur":case"afterblur":h=Sd;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=ry;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=X2;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=aN;break;case tv:case nv:case ov:h=j2;break;case iv:h=rN;break;case"scroll":case"scrollend":h=V2;break;case"wheel":h=uN;break;case"copy":case"cut":case"paste":h=F2;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=uy;break;case"toggle":case"beforetoggle":h=fN}var b=(t&4)!==0,S=!b&&(e==="scroll"||e==="scrollend"),p=b?f!==null?f+"Capture":null:f;b=[];for(var g=u,m;g!==null;){var y=g;if(m=y.stateNode,y=y.tag,y!==5&&y!==26&&y!==27||m===null||p===null||(y=Vr(g,p),y!=null&&b.push(Qr(g,y,m))),S)break;g=g.return}0<b.length&&(f=new h(f,v,null,n,c),d.push({event:f,listeners:b}))}}if((t&7)===0){e:{if(f=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",f&&n!==op&&(v=n.relatedTarget||n.fromElement)&&(Wa(v)||v[Cl]))break e;if((h||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,h?(v=n.relatedTarget||n.toElement,h=u,v=v?Wa(v):null,v!==null&&(S=ts(v),b=v.tag,v!==S||b!==5&&b!==27&&b!==6)&&(v=null)):(h=null,v=u),h!==v)){if(b=ry,y="onMouseLeave",p="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(b=uy,y="onPointerLeave",p="onPointerEnter",g="pointer"),S=h==null?f:Nr(h),m=v==null?f:Nr(v),f=new b(y,g+"leave",h,n,c),f.target=S,f.relatedTarget=m,y=null,Wa(c)===u&&(b=new b(p,g+"enter",v,n,c),b.target=m,b.relatedTarget=S,y=b),S=y,h&&v)t:{for(b=sC,p=h,g=v,m=0,y=p;y;y=b(y))m++;y=0;for(var x=g;x;x=b(x))y++;for(;0<m-y;)p=b(p),m--;for(;0<y-m;)g=b(g),y--;for(;m--;){if(p===g||g!==null&&p===g.alternate){b=p;break t}p=b(p),g=b(g)}b=null}else b=null;h!==null&&t0(d,f,h,b,!1),v!==null&&S!==null&&t0(d,S,v,b,!0)}}e:{if(f=u?Nr(u):window,h=f.nodeName&&f.nodeName.toLowerCase(),h==="select"||h==="input"&&f.type==="file")var _=py;else if(dy(f))if(K0)_=xN;else{_=bN;var E=vN}else h=f.nodeName,!h||h.toLowerCase()!=="input"||f.type!=="checkbox"&&f.type!=="radio"?u&&Zp(u.elementType)&&(_=py):_=SN;if(_&&(_=_(e,u))){F0(d,_,n,c);break e}E&&E(e,f,u),e==="focusout"&&u&&f.type==="number"&&u.memoizedProps.value!=null&&np(f,"number",f.value)}switch(E=u?Nr(u):window,e){case"focusin":(dy(E)||E.contentEditable==="true")&&(tl=E,ap=u,Dr=null);break;case"focusout":Dr=ap=tl=null;break;case"mousedown":lp=!0;break;case"contextmenu":case"mouseup":case"dragend":lp=!1,yy(d,n,c);break;case"selectionchange":if(EN)break;case"keydown":case"keyup":yy(d,n,c)}var C;if(Kp)e:{switch(e){case"compositionstart":var A="onCompositionStart";break e;case"compositionend":A="onCompositionEnd";break e;case"compositionupdate":A="onCompositionUpdate";break e}A=void 0}else el?j0(e,n)&&(A="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(A="onCompositionStart");A&&(Z0&&n.locale!=="ko"&&(el||A!=="onCompositionStart"?A==="onCompositionEnd"&&el&&(C=q0()):(xi=c,$p="value"in xi?xi.value:xi.textContent,el=!0)),E=uc(u,A),0<E.length&&(A=new sy(A,e,null,n,c),d.push({event:A,listeners:E}),C?A.data=C:(C=$0(n),C!==null&&(A.data=C)))),(C=pN?mN(e,n):hN(e,n))&&(A=uc(u,"onBeforeInput"),0<A.length&&(E=new sy("onBeforeInput","beforeinput",null,n,c),d.push({event:E,listeners:A}),E.data=C)),lC(d,e,u,n,c)}Xb(d,t)})}function Qr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function uc(e,t){for(var n=t+"Capture",o=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=Vr(e,n),i!=null&&o.unshift(Qr(e,i,a)),i=Vr(e,t),i!=null&&o.push(Qr(e,i,a))),e.tag===3)return o;e=e.return}return[]}function sC(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function t0(e,t,n,o,i){for(var a=t._reactName,l=[];n!==null&&n!==o;){var r=n,s=r.alternate,u=r.stateNode;if(r=r.tag,s!==null&&s===o)break;r!==5&&r!==26&&r!==27||u===null||(s=u,i?(u=Vr(n,a),u!=null&&l.unshift(Qr(n,u,s))):i||(u=Vr(n,a),u!=null&&l.push(Qr(n,u,s)))),n=n.return}l.length!==0&&e.push({event:t,listeners:l})}var uC=/\r\n?/g,cC=/\u0000|\uFFFD/g;function n0(e){return(typeof e=="string"?e:""+e).replace(uC,`
|
|
9
|
+
`).replace(cC,"")}function Zb(e,t){return t=n0(t),n0(e)===t}function Pe(e,t,n,o,i,a){switch(n){case"children":typeof o=="string"?t==="body"||t==="textarea"&&o===""||yl(e,o):(typeof o=="number"||typeof o=="bigint")&&t!=="body"&&yl(e,""+o);break;case"className":du(e,"class",o);break;case"tabIndex":du(e,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":du(e,n,o);break;case"style":Y0(e,o,a);break;case"data":if(t!=="object"){du(e,"data",o);break}case"src":case"href":if(o===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(n);break}o=wu(""+o),e.setAttribute(n,o);break;case"action":case"formAction":if(typeof o=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof a=="function"&&(n==="formAction"?(t!=="input"&&Pe(e,t,"name",i.name,i,null),Pe(e,t,"formEncType",i.formEncType,i,null),Pe(e,t,"formMethod",i.formMethod,i,null),Pe(e,t,"formTarget",i.formTarget,i,null)):(Pe(e,t,"encType",i.encType,i,null),Pe(e,t,"method",i.method,i,null),Pe(e,t,"target",i.target,i,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(n);break}o=wu(""+o),e.setAttribute(n,o);break;case"onClick":o!=null&&(e.onclick=Io);break;case"onScroll":o!=null&&xe("scroll",e);break;case"onScrollEnd":o!=null&&xe("scrollend",e);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(U(61));if(n=o.__html,n!=null){if(i.children!=null)throw Error(U(60));e.innerHTML=n}}break;case"multiple":e.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":e.muted=o&&typeof o!="function"&&typeof o!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(o==null||typeof o=="function"||typeof o=="boolean"||typeof o=="symbol"){e.removeAttribute("xlink:href");break}n=wu(""+o),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(n,""+o):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":o&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":o===!0?e.setAttribute(n,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(n,o):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?e.setAttribute(n,o):e.removeAttribute(n);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?e.removeAttribute(n):e.setAttribute(n,o);break;case"popover":xe("beforetoggle",e),xe("toggle",e),Cu(e,"popover",o);break;case"xlinkActuate":zo(e,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":zo(e,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":zo(e,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":zo(e,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":zo(e,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":zo(e,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":zo(e,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":zo(e,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":zo(e,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":Cu(e,"is",o);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=U2.get(n)||n,Cu(e,n,o))}}function Dp(e,t,n,o,i,a){switch(n){case"style":Y0(e,o,a);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(U(61));if(n=o.__html,n!=null){if(i.children!=null)throw Error(U(60));e.innerHTML=n}}break;case"children":typeof o=="string"?yl(e,o):(typeof o=="number"||typeof o=="bigint")&&yl(e,""+o);break;case"onScroll":o!=null&&xe("scroll",e);break;case"onScrollEnd":o!=null&&xe("scrollend",e);break;case"onClick":o!=null&&(e.onclick=Io);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!P0.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(i=n.endsWith("Capture"),t=n.slice(2,i?n.length-7:void 0),a=e[rn]||null,a=a!=null?a[n]:null,typeof a=="function"&&e.removeEventListener(t,a,i),typeof o=="function")){typeof a!="function"&&a!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,o,i);break e}n in e?e[n]=o:o===!0?e.setAttribute(n,""):Cu(e,n,o)}}}function zt(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":xe("error",e),xe("load",e);var o=!1,i=!1,a;for(a in n)if(n.hasOwnProperty(a)){var l=n[a];if(l!=null)switch(a){case"src":o=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(U(137,t));default:Pe(e,t,a,l,n,null)}}i&&Pe(e,t,"srcSet",n.srcSet,n,null),o&&Pe(e,t,"src",n.src,n,null);return;case"input":xe("invalid",e);var r=a=l=i=null,s=null,u=null;for(o in n)if(n.hasOwnProperty(o)){var c=n[o];if(c!=null)switch(o){case"name":i=c;break;case"type":l=c;break;case"checked":s=c;break;case"defaultChecked":u=c;break;case"value":a=c;break;case"defaultValue":r=c;break;case"children":case"dangerouslySetInnerHTML":if(c!=null)throw Error(U(137,t));break;default:Pe(e,t,o,c,n,null)}}U0(e,a,r,s,u,l,i,!1);return;case"select":xe("invalid",e),o=l=a=null;for(i in n)if(n.hasOwnProperty(i)&&(r=n[i],r!=null))switch(i){case"value":a=r;break;case"defaultValue":l=r;break;case"multiple":o=r;default:Pe(e,t,i,r,n,null)}t=a,n=l,e.multiple=!!o,t!=null?ul(e,!!o,t,!1):n!=null&&ul(e,!!o,n,!0);return;case"textarea":xe("invalid",e),a=i=o=null;for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case"value":o=r;break;case"defaultValue":i=r;break;case"children":a=r;break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(U(91));break;default:Pe(e,t,l,r,n,null)}V0(e,o,i,a);return;case"option":for(s in n)n.hasOwnProperty(s)&&(o=n[s],o!=null)&&(s==="selected"?e.selected=o&&typeof o!="function"&&typeof o!="symbol":Pe(e,t,s,o,n,null));return;case"dialog":xe("beforetoggle",e),xe("toggle",e),xe("cancel",e),xe("close",e);break;case"iframe":case"object":xe("load",e);break;case"video":case"audio":for(o=0;o<Kr.length;o++)xe(Kr[o],e);break;case"image":xe("error",e),xe("load",e);break;case"details":xe("toggle",e);break;case"embed":case"source":case"link":xe("error",e),xe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(u in n)if(n.hasOwnProperty(u)&&(o=n[u],o!=null))switch(u){case"children":case"dangerouslySetInnerHTML":throw Error(U(137,t));default:Pe(e,t,u,o,n,null)}return;default:if(Zp(t)){for(c in n)n.hasOwnProperty(c)&&(o=n[c],o!==void 0&&Dp(e,t,c,o,n,void 0));return}}for(r in n)n.hasOwnProperty(r)&&(o=n[r],o!=null&&Pe(e,t,r,o,n,null))}function fC(e,t,n,o){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var i=null,a=null,l=null,r=null,s=null,u=null,c=null;for(h in n){var d=n[h];if(n.hasOwnProperty(h)&&d!=null)switch(h){case"checked":break;case"value":break;case"defaultValue":s=d;default:o.hasOwnProperty(h)||Pe(e,t,h,null,o,d)}}for(var f in o){var h=o[f];if(d=n[f],o.hasOwnProperty(f)&&(h!=null||d!=null))switch(f){case"type":a=h;break;case"name":i=h;break;case"checked":u=h;break;case"defaultChecked":c=h;break;case"value":l=h;break;case"defaultValue":r=h;break;case"children":case"dangerouslySetInnerHTML":if(h!=null)throw Error(U(137,t));break;default:h!==d&&Pe(e,t,f,h,o,d)}}tp(e,l,r,s,u,c,a,i);return;case"select":h=l=r=f=null;for(a in n)if(s=n[a],n.hasOwnProperty(a)&&s!=null)switch(a){case"value":break;case"multiple":h=s;default:o.hasOwnProperty(a)||Pe(e,t,a,null,o,s)}for(i in o)if(a=o[i],s=n[i],o.hasOwnProperty(i)&&(a!=null||s!=null))switch(i){case"value":f=a;break;case"defaultValue":r=a;break;case"multiple":l=a;default:a!==s&&Pe(e,t,i,a,o,s)}t=r,n=l,o=h,f!=null?ul(e,!!n,f,!1):!!o!=!!n&&(t!=null?ul(e,!!n,t,!0):ul(e,!!n,n?[]:"",!1));return;case"textarea":h=f=null;for(r in n)if(i=n[r],n.hasOwnProperty(r)&&i!=null&&!o.hasOwnProperty(r))switch(r){case"value":break;case"children":break;default:Pe(e,t,r,null,o,i)}for(l in o)if(i=o[l],a=n[l],o.hasOwnProperty(l)&&(i!=null||a!=null))switch(l){case"value":f=i;break;case"defaultValue":h=i;break;case"children":break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(U(91));break;default:i!==a&&Pe(e,t,l,i,o,a)}I0(e,f,h);return;case"option":for(var v in n)f=n[v],n.hasOwnProperty(v)&&f!=null&&!o.hasOwnProperty(v)&&(v==="selected"?e.selected=!1:Pe(e,t,v,null,o,f));for(s in o)f=o[s],h=n[s],o.hasOwnProperty(s)&&f!==h&&(f!=null||h!=null)&&(s==="selected"?e.selected=f&&typeof f!="function"&&typeof f!="symbol":Pe(e,t,s,f,o,h));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var b in n)f=n[b],n.hasOwnProperty(b)&&f!=null&&!o.hasOwnProperty(b)&&Pe(e,t,b,null,o,f);for(u in o)if(f=o[u],h=n[u],o.hasOwnProperty(u)&&f!==h&&(f!=null||h!=null))switch(u){case"children":case"dangerouslySetInnerHTML":if(f!=null)throw Error(U(137,t));break;default:Pe(e,t,u,f,o,h)}return;default:if(Zp(t)){for(var S in n)f=n[S],n.hasOwnProperty(S)&&f!==void 0&&!o.hasOwnProperty(S)&&Dp(e,t,S,void 0,o,f);for(c in o)f=o[c],h=n[c],!o.hasOwnProperty(c)||f===h||f===void 0&&h===void 0||Dp(e,t,c,f,o,h);return}}for(var p in n)f=n[p],n.hasOwnProperty(p)&&f!=null&&!o.hasOwnProperty(p)&&Pe(e,t,p,null,o,f);for(d in o)f=o[d],h=n[d],!o.hasOwnProperty(d)||f===h||f==null&&h==null||Pe(e,t,d,f,o,h)}function o0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function dC(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),o=0;o<n.length;o++){var i=n[o],a=i.transferSize,l=i.initiatorType,r=i.duration;if(a&&r&&o0(l)){for(l=0,r=i.responseEnd,o+=1;o<n.length;o++){var s=n[o],u=s.startTime;if(u>r)break;var c=s.transferSize,d=s.initiatorType;c&&o0(d)&&(s=s.responseEnd,l+=c*(s<r?1:(r-u)/(s-u)))}if(--o,t+=8*(a+l)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Rp=null,Op=null;function cc(e){return e.nodeType===9?e:e.ownerDocument}function i0(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function jb(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function zp(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Yd=null;function pC(){var e=window.event;return e&&e.type==="popstate"?e===Yd?!1:(Yd=e,!0):(Yd=null,!1)}var $b=typeof setTimeout=="function"?setTimeout:void 0,mC=typeof clearTimeout=="function"?clearTimeout:void 0,a0=typeof Promise=="function"?Promise:void 0,hC=typeof queueMicrotask=="function"?queueMicrotask:typeof a0<"u"?function(e){return a0.resolve(null).then(e).catch(gC)}:$b;function gC(e){setTimeout(function(){throw e})}function Gi(e){return e==="head"}function l0(e,t){var n=t,o=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"||n==="/&"){if(o===0){e.removeChild(i),Nl(t);return}o--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")o++;else if(n==="html")Ur(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,Ur(n);for(var a=n.firstChild;a;){var l=a.nextSibling,r=a.nodeName;a[as]||r==="SCRIPT"||r==="STYLE"||r==="LINK"&&a.rel.toLowerCase()==="stylesheet"||n.removeChild(a),a=l}}else n==="body"&&Ur(e.ownerDocument.body);n=i}while(n);Nl(t)}function r0(e,t){var n=e;e=0;do{var o=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=o}while(n)}function Lp(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":Lp(n),qp(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function yC(e,t,n,o){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!o&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(o){if(!e[as])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(a=e.getAttribute("rel"),a==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(a!==i.rel||e.getAttribute("href")!==(i.href==null||i.href===""?null:i.href)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute("title")!==(i.title==null?null:i.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(a=e.getAttribute("src"),(a!==(i.src==null?null:i.src)||e.getAttribute("type")!==(i.type==null?null:i.type)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var a=i.name==null?null:""+i.name;if(i.type==="hidden"&&e.getAttribute("name")===a)return e}else return e;if(e=Yn(e.nextSibling),e===null)break}return null}function vC(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Yn(e.nextSibling),e===null))return null;return e}function Fb(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Yn(e.nextSibling),e===null))return null;return e}function Bp(e){return e.data==="$?"||e.data==="$~"}function Hp(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function bC(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var o=function(){t(),n.removeEventListener("DOMContentLoaded",o)};n.addEventListener("DOMContentLoaded",o),e._reactRetry=o}}function Yn(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==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Pp=null;function s0(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return Yn(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function u0(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function Kb(e,t,n){switch(t=cc(n),e){case"html":if(e=t.documentElement,!e)throw Error(U(452));return e;case"head":if(e=t.head,!e)throw Error(U(453));return e;case"body":if(e=t.body,!e)throw Error(U(454));return e;default:throw Error(U(451))}}function Ur(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);qp(e)}var Xn=new Map,c0=new Set;function fc(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Qo=De.d;De.d={f:SC,r:xC,D:_C,C:EC,L:TC,m:NC,X:wC,S:CC,M:AC};function SC(){var e=Qo.f(),t=Ac();return e||t}function xC(e){var t=wl(e);t!==null&&t.tag===5&&t.type==="form"?Yv(t):Qo.r(e)}var Rl=typeof document>"u"?null:document;function Qb(e,t,n){var o=Rl;if(o&&typeof t=="string"&&t){var i=Gn(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof n=="string"&&(i+='[crossorigin="'+n+'"]'),c0.has(i)||(c0.add(i),e={rel:e,crossOrigin:n,href:t},o.querySelector(i)===null&&(t=o.createElement("link"),zt(t,"link",e),Tt(t),o.head.appendChild(t)))}}function _C(e){Qo.D(e),Qb("dns-prefetch",e,null)}function EC(e,t){Qo.C(e,t),Qb("preconnect",e,t)}function TC(e,t,n){Qo.L(e,t,n);var o=Rl;if(o&&e&&t){var i='link[rel="preload"][as="'+Gn(t)+'"]';t==="image"&&n&&n.imageSrcSet?(i+='[imagesrcset="'+Gn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(i+='[imagesizes="'+Gn(n.imageSizes)+'"]')):i+='[href="'+Gn(e)+'"]';var a=i;switch(t){case"style":a=Tl(e);break;case"script":a=Ol(e)}Xn.has(a)||(e=Ze({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Xn.set(a,e),o.querySelector(i)!==null||t==="style"&&o.querySelector(fs(a))||t==="script"&&o.querySelector(ds(a))||(t=o.createElement("link"),zt(t,"link",e),Tt(t),o.head.appendChild(t)))}}function NC(e,t){Qo.m(e,t);var n=Rl;if(n&&e){var o=t&&typeof t.as=="string"?t.as:"script",i='link[rel="modulepreload"][as="'+Gn(o)+'"][href="'+Gn(e)+'"]',a=i;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":a=Ol(e)}if(!Xn.has(a)&&(e=Ze({rel:"modulepreload",href:e},t),Xn.set(a,e),n.querySelector(i)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(ds(a)))return}o=n.createElement("link"),zt(o,"link",e),Tt(o),n.head.appendChild(o)}}}function CC(e,t,n){Qo.S(e,t,n);var o=Rl;if(o&&e){var i=sl(o).hoistableStyles,a=Tl(e);t=t||"default";var l=i.get(a);if(!l){var r={loading:0,preload:null};if(l=o.querySelector(fs(a)))r.loading=5;else{e=Ze({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Xn.get(a))&&Dm(e,n);var s=l=o.createElement("link");Tt(s),zt(s,"link",e),s._p=new Promise(function(u,c){s.onload=u,s.onerror=c}),s.addEventListener("load",function(){r.loading|=1}),s.addEventListener("error",function(){r.loading|=2}),r.loading|=4,Pu(l,t,o)}l={type:"stylesheet",instance:l,count:1,state:r},i.set(a,l)}}}function wC(e,t){Qo.X(e,t);var n=Rl;if(n&&e){var o=sl(n).hoistableScripts,i=Ol(e),a=o.get(i);a||(a=n.querySelector(ds(i)),a||(e=Ze({src:e,async:!0},t),(t=Xn.get(i))&&Rm(e,t),a=n.createElement("script"),Tt(a),zt(a,"link",e),n.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},o.set(i,a))}}function AC(e,t){Qo.M(e,t);var n=Rl;if(n&&e){var o=sl(n).hoistableScripts,i=Ol(e),a=o.get(i);a||(a=n.querySelector(ds(i)),a||(e=Ze({src:e,async:!0,type:"module"},t),(t=Xn.get(i))&&Rm(e,t),a=n.createElement("script"),Tt(a),zt(a,"link",e),n.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},o.set(i,a))}}function f0(e,t,n,o){var i=(i=Ni.current)?fc(i):null;if(!i)throw Error(U(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Tl(n.href),n=sl(i).hoistableStyles,o=n.get(t),o||(o={type:"style",instance:null,count:0,state:null},n.set(t,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Tl(n.href);var a=sl(i).hoistableStyles,l=a.get(e);if(l||(i=i.ownerDocument||i,l={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},a.set(e,l),(a=i.querySelector(fs(e)))&&!a._p&&(l.instance=a,l.state.loading=5),Xn.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Xn.set(e,n),a||MC(i,e,n,l.state))),t&&o===null)throw Error(U(528,""));return l}if(t&&o!==null)throw Error(U(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ol(n),n=sl(i).hoistableScripts,o=n.get(t),o||(o={type:"script",instance:null,count:0,state:null},n.set(t,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(U(444,e))}}function Tl(e){return'href="'+Gn(e)+'"'}function fs(e){return'link[rel="stylesheet"]['+e+"]"}function Wb(e){return Ze({},e,{"data-precedence":e.precedence,precedence:null})}function MC(e,t,n,o){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?o.loading=1:(t=e.createElement("link"),o.preload=t,t.addEventListener("load",function(){return o.loading|=1}),t.addEventListener("error",function(){return o.loading|=2}),zt(t,"link",n),Tt(t),e.head.appendChild(t))}function Ol(e){return'[src="'+Gn(e)+'"]'}function ds(e){return"script[async]"+e}function d0(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var o=e.querySelector('style[data-href~="'+Gn(n.href)+'"]');if(o)return t.instance=o,Tt(o),o;var i=Ze({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return o=(e.ownerDocument||e).createElement("style"),Tt(o),zt(o,"style",i),Pu(o,n.precedence,e),t.instance=o;case"stylesheet":i=Tl(n.href);var a=e.querySelector(fs(i));if(a)return t.state.loading|=4,t.instance=a,Tt(a),a;o=Wb(n),(i=Xn.get(i))&&Dm(o,i),a=(e.ownerDocument||e).createElement("link"),Tt(a);var l=a;return l._p=new Promise(function(r,s){l.onload=r,l.onerror=s}),zt(a,"link",o),t.state.loading|=4,Pu(a,n.precedence,e),t.instance=a;case"script":return a=Ol(n.src),(i=e.querySelector(ds(a)))?(t.instance=i,Tt(i),i):(o=n,(i=Xn.get(a))&&(o=Ze({},n),Rm(o,i)),e=e.ownerDocument||e,i=e.createElement("script"),Tt(i),zt(i,"link",o),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(U(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(o=t.instance,t.state.loading|=4,Pu(o,n.precedence,e));return t.instance}function Pu(e,t,n){for(var o=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=o.length?o[o.length-1]:null,a=i,l=0;l<o.length;l++){var r=o[l];if(r.dataset.precedence===t)a=r;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Dm(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Rm(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var ku=null;function p0(e,t,n){if(ku===null){var o=new Map,i=ku=new Map;i.set(n,o)}else i=ku,o=i.get(n),o||(o=new Map,i.set(n,o));if(o.has(e))return o;for(o.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[as]||a[Dt]||e==="link"&&a.getAttribute("rel")==="stylesheet")&&a.namespaceURI!=="http://www.w3.org/2000/svg"){var l=a.getAttribute(t)||"";l=e+l;var r=o.get(l);r?r.push(a):o.set(l,[a])}}return o}function m0(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function DC(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Jb(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function RC(e,t,n,o){if(n.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var i=Tl(o.href),a=t.querySelector(fs(i));if(a){t=a._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=dc.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Tt(a);return}a=t.ownerDocument||t,o=Wb(o),(i=Xn.get(i))&&Dm(o,i),a=a.createElement("link"),Tt(a);var l=a;l._p=new Promise(function(r,s){l.onload=r,l.onerror=s}),zt(a,"link",o),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=dc.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Xd=0;function OC(e,t){return e.stylesheets&&e.count===0&&Gu(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var o=setTimeout(function(){if(e.stylesheets&&Gu(e,e.stylesheets),e.unsuspend){var a=e.unsuspend;e.unsuspend=null,a()}},6e4+t);0<e.imgBytes&&Xd===0&&(Xd=62500*dC());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Gu(e,e.stylesheets),e.unsuspend)){var a=e.unsuspend;e.unsuspend=null,a()}},(e.imgBytes>Xd?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(o),clearTimeout(i)}}:null}function dc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Gu(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var pc=null;function Gu(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,pc=new Map,t.forEach(zC,e),pc=null,dc.call(e))}function zC(e,t){if(!(t.state.loading&4)){var n=pc.get(e);if(n)var o=n.get(null);else{n=new Map,pc.set(e,n);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),a=0;a<i.length;a++){var l=i[a];(l.nodeName==="LINK"||l.getAttribute("media")!=="not all")&&(n.set(l.dataset.precedence,l),o=l)}o&&n.set(null,o)}i=t.instance,l=i.getAttribute("data-precedence"),a=n.get(l)||o,a===o&&n.set(null,i),n.set(l,i),this.count++,o=dc.bind(this),i.addEventListener("load",o),i.addEventListener("error",o),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Wr={$$typeof:Uo,Provider:null,Consumer:null,_currentValue:ta,_currentValue2:ta,_threadCount:0};function LC(e,t,n,o,i,a,l,r,s){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=gd(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gd(0),this.hiddenUpdates=gd(null),this.identifierPrefix=o,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=l,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=s,this.incompleteTransitions=new Map}function e1(e,t,n,o,i,a,l,r,s,u,c,d){return e=new LC(e,t,n,l,s,u,c,d,r),t=1,a===!0&&(t|=24),a=vn(3,null,null,t),e.current=a,a.stateNode=e,t=om(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:o,isDehydrated:n,cache:t},lm(a),e}function t1(e){return e?(e=il,e):il}function n1(e,t,n,o,i,a){i=t1(i),o.context===null?o.context=i:o.pendingContext=i,o=wi(t),o.payload={element:n},a=a===void 0?null:a,a!==null&&(o.callback=a),n=Ai(e,o,t),n!==null&&(ln(n,e,t),Or(n,e,t))}function h0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Om(e,t){h0(e,t),(e=e.alternate)&&h0(e,t)}function o1(e){if(e.tag===13||e.tag===31){var t=ma(e,67108864);t!==null&&ln(t,e,67108864),Om(e,67108864)}}function g0(e){if(e.tag===13||e.tag===31){var t=En();t=Yp(t);var n=ma(e,t);n!==null&&ln(n,e,t),Om(e,t)}}var mc=!0;function BC(e,t,n,o){var i=ce.T;ce.T=null;var a=De.p;try{De.p=2,zm(e,t,n,o)}finally{De.p=a,ce.T=i}}function HC(e,t,n,o){var i=ce.T;ce.T=null;var a=De.p;try{De.p=8,zm(e,t,n,o)}finally{De.p=a,ce.T=i}}function zm(e,t,n,o){if(mc){var i=kp(o);if(i===null)Vd(e,t,o,hc,n),y0(e,o);else if(kC(i,e,t,n,o))o.stopPropagation();else if(y0(e,o),t&4&&-1<PC.indexOf(e)){for(;i!==null;){var a=wl(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var l=Wi(a.pendingLanes);if(l!==0){var r=a;for(r.pendingLanes|=2,r.entangledLanes|=2;l;){var s=1<<31-_n(l);r.entanglements[1]|=s,l&=~s}go(a),(Me&6)===0&&(ic=Sn()+500,cs(0,!1))}}break;case 31:case 13:r=ma(a,2),r!==null&&ln(r,a,2),Ac(),Om(a,2)}if(a=kp(o),a===null&&Vd(e,t,o,hc,n),a===i)break;i=a}i!==null&&o.stopPropagation()}else Vd(e,t,o,null,n)}}function kp(e){return e=jp(e),Lm(e)}var hc=null;function Lm(e){if(hc=null,e=Wa(e),e!==null){var t=ts(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=E0(t),e!==null)return e;e=null}else if(n===31){if(e=T0(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 hc=e,null}function i1(e){switch(e){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(T2()){case A0:return 2;case M0:return 8;case Xu:case N2:return 32;case D0:return 268435456;default:return 32}default:return 32}}var Gp=!1,Ri=null,Oi=null,zi=null,Jr=new Map,es=new Map,bi=[],PC="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".split(" ");function y0(e,t){switch(e){case"focusin":case"focusout":Ri=null;break;case"dragenter":case"dragleave":Oi=null;break;case"mouseover":case"mouseout":zi=null;break;case"pointerover":case"pointerout":Jr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":es.delete(t.pointerId)}}function xr(e,t,n,o,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:o,nativeEvent:a,targetContainers:[i]},t!==null&&(t=wl(t),t!==null&&o1(t)),e):(e.eventSystemFlags|=o,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function kC(e,t,n,o,i){switch(t){case"focusin":return Ri=xr(Ri,e,t,n,o,i),!0;case"dragenter":return Oi=xr(Oi,e,t,n,o,i),!0;case"mouseover":return zi=xr(zi,e,t,n,o,i),!0;case"pointerover":var a=i.pointerId;return Jr.set(a,xr(Jr.get(a)||null,e,t,n,o,i)),!0;case"gotpointercapture":return a=i.pointerId,es.set(a,xr(es.get(a)||null,e,t,n,o,i)),!0}return!1}function a1(e){var t=Wa(e.target);if(t!==null){var n=ts(t);if(n!==null){if(t=n.tag,t===13){if(t=E0(n),t!==null){e.blockedOn=t,ey(e.priority,function(){g0(n)});return}}else if(t===31){if(t=T0(n),t!==null){e.blockedOn=t,ey(e.priority,function(){g0(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 Uu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=kp(e.nativeEvent);if(n===null){n=e.nativeEvent;var o=new n.constructor(n.type,n);op=o,n.target.dispatchEvent(o),op=null}else return t=wl(n),t!==null&&o1(t),e.blockedOn=n,!1;t.shift()}return!0}function v0(e,t,n){Uu(e)&&n.delete(t)}function GC(){Gp=!1,Ri!==null&&Uu(Ri)&&(Ri=null),Oi!==null&&Uu(Oi)&&(Oi=null),zi!==null&&Uu(zi)&&(zi=null),Jr.forEach(v0),es.forEach(v0)}function Tu(e,t){e.blockedOn===t&&(e.blockedOn=null,Gp||(Gp=!0,gt.unstable_scheduleCallback(gt.unstable_NormalPriority,GC)))}var Nu=null;function b0(e){Nu!==e&&(Nu=e,gt.unstable_scheduleCallback(gt.unstable_NormalPriority,function(){Nu===e&&(Nu=null);for(var t=0;t<e.length;t+=3){var n=e[t],o=e[t+1],i=e[t+2];if(typeof o!="function"){if(Lm(o||n)===null)continue;break}var a=wl(n);a!==null&&(e.splice(t,3),t-=3,bp(a,{pending:!0,data:i,method:n.method,action:o},o,i))}}))}function Nl(e){function t(s){return Tu(s,e)}Ri!==null&&Tu(Ri,e),Oi!==null&&Tu(Oi,e),zi!==null&&Tu(zi,e),Jr.forEach(t),es.forEach(t);for(var n=0;n<bi.length;n++){var o=bi[n];o.blockedOn===e&&(o.blockedOn=null)}for(;0<bi.length&&(n=bi[0],n.blockedOn===null);)a1(n),n.blockedOn===null&&bi.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(o=0;o<n.length;o+=3){var i=n[o],a=n[o+1],l=i[rn]||null;if(typeof a=="function")l||b0(n);else if(l){var r=null;if(a&&a.hasAttribute("formAction")){if(i=a,l=a[rn]||null)r=l.formAction;else if(Lm(i)!==null)continue}else r=l.action;typeof r=="function"?n[o+1]=r:(n.splice(o,3),o-=3),b0(n)}}}function l1(){function e(a){a.canIntercept&&a.info==="react-transition"&&a.intercept({handler:function(){return new Promise(function(l){return i=l})},focusReset:"manual",scroll:"manual"})}function t(){i!==null&&(i(),i=null),o||setTimeout(n,20)}function n(){if(!o&&!navigation.transition){var a=navigation.currentEntry;a&&a.url!=null&&navigation.navigate(a.url,{state:a.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var o=!1,i=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){o=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),i!==null&&(i(),i=null)}}}function Bm(e){this._internalRoot=e}Rc.prototype.render=Bm.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(U(409));var n=t.current,o=En();n1(n,o,e,t,null,null)};Rc.prototype.unmount=Bm.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;n1(e.current,2,null,e,null,null),Ac(),t[Cl]=null}};function Rc(e){this._internalRoot=e}Rc.prototype.unstable_scheduleHydration=function(e){if(e){var t=B0();e={blockedOn:null,target:e,priority:t};for(var n=0;n<bi.length&&t!==0&&t<bi[n].priority;n++);bi.splice(n,0,e),n===0&&a1(e)}};var S0=x0.version;if(S0!=="19.2.4")throw Error(U(527,S0,"19.2.4"));De.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(U(188)):(e=Object.keys(e).join(","),Error(U(268,e)));return e=y2(t),e=e!==null?N0(e):null,e=e===null?null:e.stateNode,e};var UC={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:ce,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(_r=__REACT_DEVTOOLS_GLOBAL_HOOK__,!_r.isDisabled&&_r.supportsFiber))try{ns=_r.inject(UC),xn=_r}catch{}var _r;Oc.createRoot=function(e,t){if(!_0(e))throw Error(U(299));var n=!1,o="",i=Qv,a=Wv,l=Jv;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(o=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(a=t.onCaughtError),t.onRecoverableError!==void 0&&(l=t.onRecoverableError)),t=e1(e,1,!1,null,null,n,o,null,i,a,l,l1),e[Cl]=t.current,Mm(e),new Bm(t)};Oc.hydrateRoot=function(e,t,n){if(!_0(e))throw Error(U(299));var o=!1,i="",a=Qv,l=Wv,r=Jv,s=null;return n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onUncaughtError!==void 0&&(a=n.onUncaughtError),n.onCaughtError!==void 0&&(l=n.onCaughtError),n.onRecoverableError!==void 0&&(r=n.onRecoverableError),n.formState!==void 0&&(s=n.formState)),t=e1(e,1,!0,t,n??null,o,i,s,a,l,r,l1),t.context=t1(null),n=t.current,o=En(),o=Yp(o),i=wi(o),i.callback=null,Ai(n,i,o),n=o,t.current.lanes=n,is(t,n),go(t),e[Cl]=t.current,Mm(e),new Rc(t)};Oc.version="19.2.4"});var c1=en((Hz,u1)=>{"use strict";function s1(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s1)}catch(e){console.error(e)}}s1(),u1.exports=r1()});var _1=en(kc=>{"use strict";var XC=Symbol.for("react.transitional.element"),qC=Symbol.for("react.fragment");function x1(e,t,n){var o=null;if(n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),"key"in t){n={};for(var i in t)i!=="key"&&(n[i]=t[i])}else n=t;return t=n.ref,{$$typeof:XC,type:e,key:o,ref:t!==void 0?t:null,props:n}}kc.Fragment=qC;kc.jsx=x1;kc.jsxs=x1});var pe=en((Iz,E1)=>{"use strict";E1.exports=_1()});var l_=en(a_=>{"use strict";var Wl=At();function UM(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var IM=typeof Object.is=="function"?Object.is:UM,VM=Wl.useState,YM=Wl.useEffect,XM=Wl.useLayoutEffect,qM=Wl.useDebugValue;function ZM(e,t){var n=t(),o=VM({inst:{value:n,getSnapshot:t}}),i=o[0].inst,a=o[1];return XM(function(){i.value=n,i.getSnapshot=t,Nh(i)&&a({inst:i})},[e,n,t]),YM(function(){return Nh(i)&&a({inst:i}),e(function(){Nh(i)&&a({inst:i})})},[e]),qM(n),n}function Nh(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!IM(e,n)}catch{return!0}}function jM(e,t){return t()}var $M=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?jM:ZM;a_.useSyncExternalStore=Wl.useSyncExternalStore!==void 0?Wl.useSyncExternalStore:$M});var s_=en((LH,r_)=>{"use strict";r_.exports=l_()});var c_=en(u_=>{"use strict";var Df=At(),FM=s_();function KM(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var QM=typeof Object.is=="function"?Object.is:KM,WM=FM.useSyncExternalStore,JM=Df.useRef,eD=Df.useEffect,tD=Df.useMemo,nD=Df.useDebugValue;u_.useSyncExternalStoreWithSelector=function(e,t,n,o,i){var a=JM(null);if(a.current===null){var l={hasValue:!1,value:null};a.current=l}else l=a.current;a=tD(function(){function s(h){if(!u){if(u=!0,c=h,h=o(h),i!==void 0&&l.hasValue){var v=l.value;if(i(v,h))return d=v}return d=h}if(v=d,QM(c,h))return v;var b=o(h);return i!==void 0&&i(v,b)?(c=h,v):(c=h,d=b)}var u=!1,c,d,f=n===void 0?null:n;return[function(){return s(t())},f===null?void 0:function(){return s(f())}]},[t,n,o,i]);var r=WM(e,a[0],a[1]);return eD(function(){l.hasValue=!0,l.value=r},[r]),nD(r),r}});var d_=en((HH,f_)=>{"use strict";f_.exports=c_()});var Pa=ne(At(),1),DT=ne(c1(),1);var IC={PipeLLM:!0,PipeExtract:!0,PipeCompose:!0,PipeImgGen:!0,PipeSearch:!0,PipeFunc:!0,PipeStructure:!0,PipeSignature:!0,PipeSequence:!0,PipeParallel:!0,PipeCondition:!0,PipeBatch:!0},f1=new Set(Object.keys(IC)),zl="pipeCard",d1="default",p1="controllerGroup",Hm="stuff_";function Ui(e){return Hm+e}function Ll(e){return e.startsWith(Hm)}function ps(e){return e.slice(Hm.length)}var Cn={TB:"TB",BT:"BT",LR:"LR",RL:"RL"},zc={DEFAULT:"default",STEP:"step",STRAIGHT:"straight",SMOOTH_STEP:"smoothstep"},no={FOLDED:"folded",EXPANDED:"expanded",AUTO:"auto"},ga={DARK:"dark",LIGHT:"light"},yt={DARK:"dark",LIGHT:"light",SYSTEM:"system"},un={TOP_LEFT:"top-left",TOP_CENTER:"top-center",TOP_RIGHT:"top-right",BOTTOM_LEFT:"bottom-left",BOTTOM_CENTER:"bottom-center",BOTTOM_RIGHT:"bottom-right",CENTER_LEFT:"center-left",CENTER_RIGHT:"center-right"};function m1(e){return e===un.CENTER_LEFT||e===un.CENTER_RIGHT?"vertical":"horizontal"}function h1(e){switch(e){case un.TOP_LEFT:case un.CENTER_LEFT:case un.BOTTOM_LEFT:return"left";case un.TOP_RIGHT:case un.CENTER_RIGHT:case un.BOTTOM_RIGHT:return"right";case un.TOP_CENTER:case un.BOTTOM_CENTER:return"center";default:return e}}var Lc=40,Bc=48,Hc=20,ya="arrowclosed";function g1(e){let t=e.style?.width;if(t==null)return 200;let n=typeof t=="number"?t:parseFloat(t);return isNaN(n)||n<=0?200:n}function y1(e){let t=e.style?.height;if(t!=null){let n=typeof t=="number"?t:parseFloat(t);if(!isNaN(n)&&n>0)return n}return e.data?.isStuff?60:70}var ms=class extends Error{constructor(t,n){let o=t===""?"<root>":t;super(`GraphSpec validation failed at ${o}: ${n}`),this.name="GraphSpecValidationError",this.path=t}},v1=new Set(["succeeded","failed","running","scheduled","skipped","canceled"]),b1=new Set(["contains","data","control","selected_outcome","batch_item","batch_aggregate","parallel_combine"]);function Ii(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function wn(e){return e===null?"null":e===void 0?"undefined":Array.isArray(e)?"an array":`a ${typeof e}`}function vt(e,t){throw new ms(e,t)}function yo(e,t){return(typeof e!="string"||e.length===0)&&vt(t,`expected a non-empty string, got ${wn(e)}`),e}function S1(e,t){Ii(e)||vt(t,`expected an object, got ${wn(e)}`),yo(e.name,`${t}.name`)}function VC(e,t){Ii(e)||vt(t,`expected an object, got ${wn(e)}`),yo(e.id,`${t}.id`),e.kind!=="controller"&&e.kind!=="operator"&&vt(`${t}.kind`,`expected "controller" or "operator" \u2014 a real pipelex run emits only pipe-call nodes, got ${JSON.stringify(e.kind)}`),(typeof e.status!="string"||!v1.has(e.status))&&vt(`${t}.status`,`expected one of ${[...v1].join(", ")}, got ${JSON.stringify(e.status)}`),yo(e.pipe_code,`${t}.pipe_code`);let n=yo(e.pipe_type,`${t}.pipe_type`);f1.has(n)||vt(`${t}.pipe_type`,`unrecognized pipe class "${n}" \u2014 add it to PipeOperatorType or PipeControllerType in types.ts`),yo(e.description,`${t}.description`),yo(e.domain_code,`${t}.domain_code`);let o=e.io;o===void 0&&(o={inputs:[],outputs:[]},e.io=o),Ii(o)||vt(`${t}.io`,`expected an object, got ${wn(o)}`),o.inputs===void 0?o.inputs=[]:Array.isArray(o.inputs)||vt(`${t}.io.inputs`,`expected an array, got ${wn(o.inputs)}`),o.outputs===void 0?o.outputs=[]:Array.isArray(o.outputs)||vt(`${t}.io.outputs`,`expected an array, got ${wn(o.outputs)}`),o.inputs.forEach((i,a)=>S1(i,`${t}.io.inputs[${a}]`)),o.outputs.forEach((i,a)=>S1(i,`${t}.io.outputs[${a}]`))}function YC(e,t){Ii(e)||vt(t,`expected an object, got ${wn(e)}`),yo(e.id,`${t}.id`),yo(e.source,`${t}.source`),yo(e.target,`${t}.target`),(typeof e.kind!="string"||!b1.has(e.kind))&&vt(`${t}.kind`,`expected one of ${[...b1].join(", ")}, got ${JSON.stringify(e.kind)}`)}function Pc(e){return Ii(e)||vt("",`expected a GraphSpec object, got ${wn(e)}`),Array.isArray(e.nodes)||vt("nodes",`expected an array, got ${wn(e.nodes)}`),Array.isArray(e.edges)||vt("edges",`expected an array, got ${wn(e.edges)}`),Ii(e.meta)||vt("meta",`expected an object, got ${wn(e.meta)}`),e.meta.format!=="mthds"&&vt("meta.format",`expected "mthds" (this does not look like pipelex GraphSpec JSON), got ${JSON.stringify(e.meta.format)}`),e.pipe_registry!==void 0&&!Ii(e.pipe_registry)&&vt("pipe_registry",`expected an object when present, got ${wn(e.pipe_registry)}`),e.concept_registry!==void 0&&!Ii(e.concept_registry)&&vt("concept_registry",`expected an object when present, got ${wn(e.concept_registry)}`),e.nodes.forEach((t,n)=>VC(t,`nodes[${n}]`)),e.edges.forEach((t,n)=>YC(t,`edges[${n}]`)),e}function Bl(e,t="node"){return e.kind!=="controller"&&e.kind!=="operator"&&vt(`${t}.kind`,`expected a pipe-call node ("controller" or "operator"), got ${JSON.stringify(e.kind)}`),yo(e.pipe_code,`${t}.pipe_code`),e}var fe=ne(At(),1);var H=ne(pe()),P=ne(At());function ot(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,o;n<e.length;n++)(o=ot(e[n]))!==""&&(t+=(t&&" ")+o);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var ZC={value:()=>{}};function N1(){for(var e=0,t=arguments.length,n={},o;e<t;++e){if(!(o=arguments[e]+"")||o in n||/[\s.]/.test(o))throw new Error("illegal type: "+o);n[o]=[]}return new Gc(n)}function Gc(e){this._=e}function jC(e,t){return e.trim().split(/^|\s+/).map(function(n){var o="",i=n.indexOf(".");if(i>=0&&(o=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:o}})}Gc.prototype=N1.prototype={constructor:Gc,on:function(e,t){var n=this._,o=jC(e+"",n),i,a=-1,l=o.length;if(arguments.length<2){for(;++a<l;)if((i=(e=o[a]).type)&&(i=$C(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<l;)if(i=(e=o[a]).type)n[i]=T1(n[i],e.name,t);else if(t==null)for(i in n)n[i]=T1(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 Gc(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),o=0,i,a;o<i;++o)n[o]=arguments[o+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],o=0,i=a.length;o<i;++o)a[o].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var o=this._[e],i=0,a=o.length;i<a;++i)o[i].value.apply(t,n)}};function $C(e,t){for(var n=0,o=e.length,i;n<o;++n)if((i=e[n]).name===t)return i.value}function T1(e,t,n){for(var o=0,i=e.length;o<i;++o)if(e[o].name===t){e[o]=ZC,e=e.slice(0,o).concat(e.slice(o+1));break}return n!=null&&e.push({name:t,value:n}),e}var va=N1;var Uc="http://www.w3.org/1999/xhtml",Pm={svg:"http://www.w3.org/2000/svg",xhtml:Uc,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Wo(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),Pm.hasOwnProperty(t)?{space:Pm[t],local:e}:e}function FC(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Uc&&t.documentElement.namespaceURI===Uc?t.createElement(e):t.createElementNS(n,e)}}function KC(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Ic(e){var t=Wo(e);return(t.local?KC:FC)(t)}function QC(){}function ba(e){return e==null?QC:function(){return this.querySelector(e)}}function C1(e){typeof e!="function"&&(e=ba(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var a=t[i],l=a.length,r=o[i]=new Array(l),s,u,c=0;c<l;++c)(s=a[c])&&(u=e.call(s,s.__data__,c,a))&&("__data__"in s&&(u.__data__=s.__data__),r[c]=u);return new it(o,this._parents)}function km(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function WC(){return[]}function hs(e){return e==null?WC:function(){return this.querySelectorAll(e)}}function JC(e){return function(){return km(e.apply(this,arguments))}}function w1(e){typeof e=="function"?e=JC(e):e=hs(e);for(var t=this._groups,n=t.length,o=[],i=[],a=0;a<n;++a)for(var l=t[a],r=l.length,s,u=0;u<r;++u)(s=l[u])&&(o.push(e.call(s,s.__data__,u,l)),i.push(s));return new it(o,i)}function gs(e){return function(){return this.matches(e)}}function Vc(e){return function(t){return t.matches(e)}}var ew=Array.prototype.find;function tw(e){return function(){return ew.call(this.children,e)}}function nw(){return this.firstElementChild}function A1(e){return this.select(e==null?nw:tw(typeof e=="function"?e:Vc(e)))}var ow=Array.prototype.filter;function iw(){return Array.from(this.children)}function aw(e){return function(){return ow.call(this.children,e)}}function M1(e){return this.selectAll(e==null?iw:aw(typeof e=="function"?e:Vc(e)))}function D1(e){typeof e!="function"&&(e=gs(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var a=t[i],l=a.length,r=o[i]=[],s,u=0;u<l;++u)(s=a[u])&&e.call(s,s.__data__,u,a)&&r.push(s);return new it(o,this._parents)}function Yc(e){return new Array(e.length)}function R1(){return new it(this._enter||this._groups.map(Yc),this._parents)}function ys(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}ys.prototype={constructor:ys,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 O1(e){return function(){return e}}function lw(e,t,n,o,i,a){for(var l=0,r,s=t.length,u=a.length;l<u;++l)(r=t[l])?(r.__data__=a[l],o[l]=r):n[l]=new ys(e,a[l]);for(;l<s;++l)(r=t[l])&&(i[l]=r)}function rw(e,t,n,o,i,a,l){var r,s,u=new Map,c=t.length,d=a.length,f=new Array(c),h;for(r=0;r<c;++r)(s=t[r])&&(f[r]=h=l.call(s,s.__data__,r,t)+"",u.has(h)?i[r]=s:u.set(h,s));for(r=0;r<d;++r)h=l.call(e,a[r],r,a)+"",(s=u.get(h))?(o[r]=s,s.__data__=a[r],u.delete(h)):n[r]=new ys(e,a[r]);for(r=0;r<c;++r)(s=t[r])&&u.get(f[r])===s&&(i[r]=s)}function sw(e){return e.__data__}function z1(e,t){if(!arguments.length)return Array.from(this,sw);var n=t?rw:lw,o=this._parents,i=this._groups;typeof e!="function"&&(e=O1(e));for(var a=i.length,l=new Array(a),r=new Array(a),s=new Array(a),u=0;u<a;++u){var c=o[u],d=i[u],f=d.length,h=uw(e.call(c,c&&c.__data__,u,o)),v=h.length,b=r[u]=new Array(v),S=l[u]=new Array(v),p=s[u]=new Array(f);n(c,d,b,S,p,h,t);for(var g=0,m=0,y,x;g<v;++g)if(y=b[g]){for(g>=m&&(m=g+1);!(x=S[m])&&++m<v;);y._next=x||null}}return l=new it(l,o),l._enter=r,l._exit=s,l}function uw(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function L1(){return new it(this._exit||this._groups.map(Yc),this._parents)}function B1(e,t,n){var o=this.enter(),i=this,a=this.exit();return typeof e=="function"?(o=e(o),o&&(o=o.selection())):o=o.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),n==null?a.remove():n(a),o&&i?o.merge(i).order():i}function H1(e){for(var t=e.selection?e.selection():e,n=this._groups,o=t._groups,i=n.length,a=o.length,l=Math.min(i,a),r=new Array(i),s=0;s<l;++s)for(var u=n[s],c=o[s],d=u.length,f=r[s]=new Array(d),h,v=0;v<d;++v)(h=u[v]||c[v])&&(f[v]=h);for(;s<i;++s)r[s]=n[s];return new it(r,this._parents)}function P1(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var o=e[t],i=o.length-1,a=o[i],l;--i>=0;)(l=o[i])&&(a&&l.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(l,a),a=l);return this}function k1(e){e||(e=cw);function t(d,f){return d&&f?e(d.__data__,f.__data__):!d-!f}for(var n=this._groups,o=n.length,i=new Array(o),a=0;a<o;++a){for(var l=n[a],r=l.length,s=i[a]=new Array(r),u,c=0;c<r;++c)(u=l[c])&&(s[c]=u);s.sort(t)}return new it(i,this._parents).order()}function cw(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function G1(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function U1(){return Array.from(this)}function I1(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],i=0,a=o.length;i<a;++i){var l=o[i];if(l)return l}return null}function V1(){let e=0;for(let t of this)++e;return e}function Y1(){return!this.node()}function X1(e){for(var t=this._groups,n=0,o=t.length;n<o;++n)for(var i=t[n],a=0,l=i.length,r;a<l;++a)(r=i[a])&&e.call(r,r.__data__,a,i);return this}function fw(e){return function(){this.removeAttribute(e)}}function dw(e){return function(){this.removeAttributeNS(e.space,e.local)}}function pw(e,t){return function(){this.setAttribute(e,t)}}function mw(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function hw(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function gw(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 q1(e,t){var n=Wo(e);if(arguments.length<2){var o=this.node();return n.local?o.getAttributeNS(n.space,n.local):o.getAttribute(n)}return this.each((t==null?n.local?dw:fw:typeof t=="function"?n.local?gw:hw:n.local?mw:pw)(n,t))}function Xc(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function yw(e){return function(){this.style.removeProperty(e)}}function vw(e,t,n){return function(){this.style.setProperty(e,t,n)}}function bw(e,t,n){return function(){var o=t.apply(this,arguments);o==null?this.style.removeProperty(e):this.style.setProperty(e,o,n)}}function Z1(e,t,n){return arguments.length>1?this.each((t==null?yw:typeof t=="function"?bw:vw)(e,t,n??"")):Vi(this.node(),e)}function Vi(e,t){return e.style.getPropertyValue(t)||Xc(e).getComputedStyle(e,null).getPropertyValue(t)}function Sw(e){return function(){delete this[e]}}function xw(e,t){return function(){this[e]=t}}function _w(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function j1(e,t){return arguments.length>1?this.each((t==null?Sw:typeof t=="function"?_w:xw)(e,t)):this.node()[e]}function $1(e){return e.trim().split(/^|\s+/)}function Gm(e){return e.classList||new F1(e)}function F1(e){this._node=e,this._names=$1(e.getAttribute("class")||"")}F1.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 K1(e,t){for(var n=Gm(e),o=-1,i=t.length;++o<i;)n.add(t[o])}function Q1(e,t){for(var n=Gm(e),o=-1,i=t.length;++o<i;)n.remove(t[o])}function Ew(e){return function(){K1(this,e)}}function Tw(e){return function(){Q1(this,e)}}function Nw(e,t){return function(){(t.apply(this,arguments)?K1:Q1)(this,e)}}function W1(e,t){var n=$1(e+"");if(arguments.length<2){for(var o=Gm(this.node()),i=-1,a=n.length;++i<a;)if(!o.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?Nw:t?Ew:Tw)(n,t))}function Cw(){this.textContent=""}function ww(e){return function(){this.textContent=e}}function Aw(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function J1(e){return arguments.length?this.each(e==null?Cw:(typeof e=="function"?Aw:ww)(e)):this.node().textContent}function Mw(){this.innerHTML=""}function Dw(e){return function(){this.innerHTML=e}}function Rw(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function eS(e){return arguments.length?this.each(e==null?Mw:(typeof e=="function"?Rw:Dw)(e)):this.node().innerHTML}function Ow(){this.nextSibling&&this.parentNode.appendChild(this)}function tS(){return this.each(Ow)}function zw(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function nS(){return this.each(zw)}function oS(e){var t=typeof e=="function"?e:Ic(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Lw(){return null}function iS(e,t){var n=typeof e=="function"?e:Ic(e),o=t==null?Lw:typeof t=="function"?t:ba(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),o.apply(this,arguments)||null)})}function Bw(){var e=this.parentNode;e&&e.removeChild(this)}function aS(){return this.each(Bw)}function Hw(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Pw(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function lS(e){return this.select(e?Pw:Hw)}function rS(e){return arguments.length?this.property("__data__",e):this.node().__data__}function kw(e){return function(t){e.call(this,t,this.__data__)}}function Gw(e){return e.trim().split(/^|\s+/).map(function(t){var n="",o=t.indexOf(".");return o>=0&&(n=t.slice(o+1),t=t.slice(0,o)),{type:t,name:n}})}function Uw(e){return function(){var t=this.__on;if(t){for(var n=0,o=-1,i=t.length,a;n<i;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++o]=a;++o?t.length=o:delete this.__on}}}function Iw(e,t,n){return function(){var o=this.__on,i,a=kw(t);if(o){for(var l=0,r=o.length;l<r;++l)if((i=o[l]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),i.value=t;return}}this.addEventListener(e.type,a,n),i={type:e.type,name:e.name,value:t,listener:a,options:n},o?o.push(i):this.__on=[i]}}function sS(e,t,n){var o=Gw(e+""),i,a=o.length,l;if(arguments.length<2){var r=this.node().__on;if(r){for(var s=0,u=r.length,c;s<u;++s)for(i=0,c=r[s];i<a;++i)if((l=o[i]).type===c.type&&l.name===c.name)return c.value}return}for(r=t?Iw:Uw,i=0;i<a;++i)this.each(r(o[i],t,n));return this}function uS(e,t,n){var o=Xc(e),i=o.CustomEvent;typeof i=="function"?i=new i(t,n):(i=o.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function Vw(e,t){return function(){return uS(this,e,t)}}function Yw(e,t){return function(){return uS(this,e,t.apply(this,arguments))}}function cS(e,t){return this.each((typeof t=="function"?Yw:Vw)(e,t))}function*fS(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],i=0,a=o.length,l;i<a;++i)(l=o[i])&&(yield l)}var Um=[null];function it(e,t){this._groups=e,this._parents=t}function dS(){return new it([[document.documentElement]],Um)}function Xw(){return this}it.prototype=dS.prototype={constructor:it,select:C1,selectAll:w1,selectChild:A1,selectChildren:M1,filter:D1,data:z1,enter:R1,exit:L1,join:B1,merge:H1,selection:Xw,order:P1,sort:k1,call:G1,nodes:U1,node:I1,size:V1,empty:Y1,each:X1,attr:q1,style:Z1,property:j1,classed:W1,text:J1,html:eS,raise:tS,lower:nS,append:oS,insert:iS,remove:aS,clone:lS,datum:rS,on:sS,dispatch:cS,[Symbol.iterator]:fS};var Jo=dS;function Ct(e){return typeof e=="string"?new it([[document.querySelector(e)]],[document.documentElement]):new it([[e]],Um)}function pS(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Xt(e,t){if(e=pS(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var o=n.createSVGPoint();return o.x=e.clientX,o.y=e.clientY,o=o.matrixTransform(t.getScreenCTM().inverse()),[o.x,o.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]}var mS={passive:!1},Sa={capture:!0,passive:!1};function qc(e){e.stopImmediatePropagation()}function Yi(e){e.preventDefault(),e.stopImmediatePropagation()}function vs(e){var t=e.document.documentElement,n=Ct(e).on("dragstart.drag",Yi,Sa);"onselectstart"in t?n.on("selectstart.drag",Yi,Sa):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function bs(e,t){var n=e.document.documentElement,o=Ct(e).on("dragstart.drag",null);t&&(o.on("click.drag",Yi,Sa),setTimeout(function(){o.on("click.drag",null)},0)),"onselectstart"in n?o.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}var Ss=e=>()=>e;function xs(e,{sourceEvent:t,subject:n,target:o,identifier:i,active:a,x:l,y:r,dx:s,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:o,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:l,enumerable:!0,configurable:!0},y:{value:r,enumerable:!0,configurable:!0},dx:{value:s,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:c}})}xs.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function qw(e){return!e.ctrlKey&&!e.button}function Zw(){return this.parentNode}function jw(e,t){return t??{x:e.x,y:e.y}}function $w(){return navigator.maxTouchPoints||"ontouchstart"in this}function Zc(){var e=qw,t=Zw,n=jw,o=$w,i={},a=va("start","drag","end"),l=0,r,s,u,c,d=0;function f(y){y.on("mousedown.drag",h).filter(o).on("touchstart.drag",S).on("touchmove.drag",p,mS).on("touchend.drag touchcancel.drag",g).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(y,x){if(!(c||!e.call(this,y,x))){var _=m(this,t.call(this,y,x),y,x,"mouse");_&&(Ct(y.view).on("mousemove.drag",v,Sa).on("mouseup.drag",b,Sa),vs(y.view),qc(y),u=!1,r=y.clientX,s=y.clientY,_("start",y))}}function v(y){if(Yi(y),!u){var x=y.clientX-r,_=y.clientY-s;u=x*x+_*_>d}i.mouse("drag",y)}function b(y){Ct(y.view).on("mousemove.drag mouseup.drag",null),bs(y.view,u),Yi(y),i.mouse("end",y)}function S(y,x){if(e.call(this,y,x)){var _=y.changedTouches,E=t.call(this,y,x),C=_.length,A,B;for(A=0;A<C;++A)(B=m(this,E,y,x,_[A].identifier,_[A]))&&(qc(y),B("start",y,_[A]))}}function p(y){var x=y.changedTouches,_=x.length,E,C;for(E=0;E<_;++E)(C=i[x[E].identifier])&&(Yi(y),C("drag",y,x[E]))}function g(y){var x=y.changedTouches,_=x.length,E,C;for(c&&clearTimeout(c),c=setTimeout(function(){c=null},500),E=0;E<_;++E)(C=i[x[E].identifier])&&(qc(y),C("end",y,x[E]))}function m(y,x,_,E,C,A){var B=a.copy(),M=Xt(A||_,x),z,I,T;if((T=n.call(y,new xs("beforestart",{sourceEvent:_,target:f,identifier:C,active:l,x:M[0],y:M[1],dx:0,dy:0,dispatch:B}),E))!=null)return z=T.x-M[0]||0,I=T.y-M[1]||0,function D(N,O,R){var L=M,V;switch(N){case"start":i[C]=D,V=l++;break;case"end":delete i[C],--l;case"drag":M=Xt(R||O,x),V=l;break}B.call(N,y,new xs(N,{sourceEvent:O,subject:T,target:f,identifier:C,active:V,x:M[0]+z,y:M[1]+I,dx:M[0]-L[0],dy:M[1]-L[1],dispatch:B}),E)}}return f.filter=function(y){return arguments.length?(e=typeof y=="function"?y:Ss(!!y),f):e},f.container=function(y){return arguments.length?(t=typeof y=="function"?y:Ss(y),f):t},f.subject=function(y){return arguments.length?(n=typeof y=="function"?y:Ss(y),f):n},f.touchable=function(y){return arguments.length?(o=typeof y=="function"?y:Ss(!!y),f):o},f.on=function(){var y=a.on.apply(a,arguments);return y===a?f:y},f.clickDistance=function(y){return arguments.length?(d=(y=+y)*y,f):Math.sqrt(d)},f}function jc(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Im(e,t){var n=Object.create(e.prototype);for(var o in t)n[o]=t[o];return n}function Ts(){}var _s=.7,Kc=1/_s,Hl="\\s*([+-]?\\d+)\\s*",Es="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",vo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Fw=/^#([0-9a-f]{3,8})$/,Kw=new RegExp(`^rgb\\(${Hl},${Hl},${Hl}\\)$`),Qw=new RegExp(`^rgb\\(${vo},${vo},${vo}\\)$`),Ww=new RegExp(`^rgba\\(${Hl},${Hl},${Hl},${Es}\\)$`),Jw=new RegExp(`^rgba\\(${vo},${vo},${vo},${Es}\\)$`),eA=new RegExp(`^hsl\\(${Es},${vo},${vo}\\)$`),tA=new RegExp(`^hsla\\(${Es},${vo},${vo},${Es}\\)$`),hS={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};jc(Ts,io,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:gS,formatHex:gS,formatHex8:nA,formatHsl:oA,formatRgb:yS,toString:yS});function gS(){return this.rgb().formatHex()}function nA(){return this.rgb().formatHex8()}function oA(){return ES(this).formatHsl()}function yS(){return this.rgb().formatRgb()}function io(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Fw.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?vS(t):n===3?new cn(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?$c(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?$c(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=Kw.exec(e))?new cn(t[1],t[2],t[3],1):(t=Qw.exec(e))?new cn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Ww.exec(e))?$c(t[1],t[2],t[3],t[4]):(t=Jw.exec(e))?$c(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=eA.exec(e))?xS(t[1],t[2]/100,t[3]/100,1):(t=tA.exec(e))?xS(t[1],t[2]/100,t[3]/100,t[4]):hS.hasOwnProperty(e)?vS(hS[e]):e==="transparent"?new cn(NaN,NaN,NaN,0):null}function vS(e){return new cn(e>>16&255,e>>8&255,e&255,1)}function $c(e,t,n,o){return o<=0&&(e=t=n=NaN),new cn(e,t,n,o)}function iA(e){return e instanceof Ts||(e=io(e)),e?(e=e.rgb(),new cn(e.r,e.g,e.b,e.opacity)):new cn}function Pl(e,t,n,o){return arguments.length===1?iA(e):new cn(e,t,n,o??1)}function cn(e,t,n,o){this.r=+e,this.g=+t,this.b=+n,this.opacity=+o}jc(cn,Pl,Im(Ts,{brighter(e){return e=e==null?Kc:Math.pow(Kc,e),new cn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?_s:Math.pow(_s,e),new cn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new cn(_a(this.r),_a(this.g),_a(this.b),Qc(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:bS,formatHex:bS,formatHex8:aA,formatRgb:SS,toString:SS}));function bS(){return`#${xa(this.r)}${xa(this.g)}${xa(this.b)}`}function aA(){return`#${xa(this.r)}${xa(this.g)}${xa(this.b)}${xa((isNaN(this.opacity)?1:this.opacity)*255)}`}function SS(){let e=Qc(this.opacity);return`${e===1?"rgb(":"rgba("}${_a(this.r)}, ${_a(this.g)}, ${_a(this.b)}${e===1?")":`, ${e})`}`}function Qc(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function _a(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function xa(e){return e=_a(e),(e<16?"0":"")+e.toString(16)}function xS(e,t,n,o){return o<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new oo(e,t,n,o)}function ES(e){if(e instanceof oo)return new oo(e.h,e.s,e.l,e.opacity);if(e instanceof Ts||(e=io(e)),!e)return new oo;if(e instanceof oo)return e;e=e.rgb();var t=e.r/255,n=e.g/255,o=e.b/255,i=Math.min(t,n,o),a=Math.max(t,n,o),l=NaN,r=a-i,s=(a+i)/2;return r?(t===a?l=(n-o)/r+(n<o)*6:n===a?l=(o-t)/r+2:l=(t-n)/r+4,r/=s<.5?a+i:2-a-i,l*=60):r=s>0&&s<1?0:l,new oo(l,r,s,e.opacity)}function TS(e,t,n,o){return arguments.length===1?ES(e):new oo(e,t,n,o??1)}function oo(e,t,n,o){this.h=+e,this.s=+t,this.l=+n,this.opacity=+o}jc(oo,TS,Im(Ts,{brighter(e){return e=e==null?Kc:Math.pow(Kc,e),new oo(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?_s:Math.pow(_s,e),new oo(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,o=n+(n<.5?n:1-n)*t,i=2*n-o;return new cn(Vm(e>=240?e-240:e+120,i,o),Vm(e,i,o),Vm(e<120?e+240:e-120,i,o),this.opacity)},clamp(){return new oo(_S(this.h),Fc(this.s),Fc(this.l),Qc(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(){let e=Qc(this.opacity);return`${e===1?"hsl(":"hsla("}${_S(this.h)}, ${Fc(this.s)*100}%, ${Fc(this.l)*100}%${e===1?")":`, ${e})`}`}}));function _S(e){return e=(e||0)%360,e<0?e+360:e}function Fc(e){return Math.max(0,Math.min(1,e||0))}function Vm(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}function Ym(e,t,n,o,i){var a=e*e,l=a*e;return((1-3*e+3*a-l)*t+(4-6*a+3*l)*n+(1+3*e+3*a-3*l)*o+l*i)/6}function NS(e){var t=e.length-1;return function(n){var o=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),i=e[o],a=e[o+1],l=o>0?e[o-1]:2*i-a,r=o<t-1?e[o+2]:2*a-i;return Ym((n-o/t)*t,l,i,a,r)}}function CS(e){var t=e.length;return function(n){var o=Math.floor(((n%=1)<0?++n:n)*t),i=e[(o+t-1)%t],a=e[o%t],l=e[(o+1)%t],r=e[(o+2)%t];return Ym((n-o/t)*t,i,a,l,r)}}var Ns=e=>()=>e;function lA(e,t){return function(n){return e+n*t}}function rA(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(o){return Math.pow(e+o*t,n)}}function wS(e){return(e=+e)==1?Wc:function(t,n){return n-t?rA(t,n,e):Ns(isNaN(t)?n:t)}}function Wc(e,t){var n=t-e;return n?lA(e,n):Ns(isNaN(e)?t:e)}var Ea=(function e(t){var n=wS(t);function o(i,a){var l=n((i=Pl(i)).r,(a=Pl(a)).r),r=n(i.g,a.g),s=n(i.b,a.b),u=Wc(i.opacity,a.opacity);return function(c){return i.r=l(c),i.g=r(c),i.b=s(c),i.opacity=u(c),i+""}}return o.gamma=e,o})(1);function AS(e){return function(t){var n=t.length,o=new Array(n),i=new Array(n),a=new Array(n),l,r;for(l=0;l<n;++l)r=Pl(t[l]),o[l]=r.r||0,i[l]=r.g||0,a[l]=r.b||0;return o=e(o),i=e(i),a=e(a),r.opacity=1,function(s){return r.r=o(s),r.g=i(s),r.b=a(s),r+""}}}var sA=AS(NS),uA=AS(CS);function MS(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,o=t.slice(),i;return function(a){for(i=0;i<n;++i)o[i]=e[i]*(1-a)+t[i]*a;return o}}function DS(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function RS(e,t){var n=t?t.length:0,o=e?Math.min(n,e.length):0,i=new Array(o),a=new Array(n),l;for(l=0;l<o;++l)i[l]=ei(e[l],t[l]);for(;l<n;++l)a[l]=t[l];return function(r){for(l=0;l<o;++l)a[l]=i[l](r);return a}}function OS(e,t){var n=new Date;return e=+e,t=+t,function(o){return n.setTime(e*(1-o)+t*o),n}}function qt(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function zS(e,t){var n={},o={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=ei(e[i],t[i]):o[i]=t[i];return function(a){for(i in n)o[i]=n[i](a);return o}}var qm=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Xm=new RegExp(qm.source,"g");function cA(e){return function(){return e}}function fA(e){return function(t){return e(t)+""}}function Cs(e,t){var n=qm.lastIndex=Xm.lastIndex=0,o,i,a,l=-1,r=[],s=[];for(e=e+"",t=t+"";(o=qm.exec(e))&&(i=Xm.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),r[l]?r[l]+=a:r[++l]=a),(o=o[0])===(i=i[0])?r[l]?r[l]+=i:r[++l]=i:(r[++l]=null,s.push({i:l,x:qt(o,i)})),n=Xm.lastIndex;return n<t.length&&(a=t.slice(n),r[l]?r[l]+=a:r[++l]=a),r.length<2?s[0]?fA(s[0].x):cA(t):(t=s.length,function(u){for(var c=0,d;c<t;++c)r[(d=s[c]).i]=d.x(u);return r.join("")})}function ei(e,t){var n=typeof t,o;return t==null||n==="boolean"?Ns(t):(n==="number"?qt:n==="string"?(o=io(t))?(t=o,Ea):Cs:t instanceof io?Ea:t instanceof Date?OS:DS(t)?MS:Array.isArray(t)?RS:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?zS:qt)(e,t)}var LS=180/Math.PI,Jc={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Zm(e,t,n,o,i,a){var l,r,s;return(l=Math.sqrt(e*e+t*t))&&(e/=l,t/=l),(s=e*n+t*o)&&(n-=e*s,o-=t*s),(r=Math.sqrt(n*n+o*o))&&(n/=r,o/=r,s/=r),e*o<t*n&&(e=-e,t=-t,s=-s,l=-l),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*LS,skewX:Math.atan(s)*LS,scaleX:l,scaleY:r}}var ef;function BS(e){let t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Jc:Zm(t.a,t.b,t.c,t.d,t.e,t.f)}function HS(e){return e==null?Jc:(ef||(ef=document.createElementNS("http://www.w3.org/2000/svg","g")),ef.setAttribute("transform",e),(e=ef.transform.baseVal.consolidate())?(e=e.matrix,Zm(e.a,e.b,e.c,e.d,e.e,e.f)):Jc)}function PS(e,t,n,o){function i(u){return u.length?u.pop()+" ":""}function a(u,c,d,f,h,v){if(u!==d||c!==f){var b=h.push("translate(",null,t,null,n);v.push({i:b-4,x:qt(u,d)},{i:b-2,x:qt(c,f)})}else(d||f)&&h.push("translate("+d+t+f+n)}function l(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,o)-2,x:qt(u,c)})):c&&d.push(i(d)+"rotate("+c+o)}function r(u,c,d,f){u!==c?f.push({i:d.push(i(d)+"skewX(",null,o)-2,x:qt(u,c)}):c&&d.push(i(d)+"skewX("+c+o)}function s(u,c,d,f,h,v){if(u!==d||c!==f){var b=h.push(i(h)+"scale(",null,",",null,")");v.push({i:b-4,x:qt(u,d)},{i:b-2,x:qt(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),a(u.translateX,u.translateY,c.translateX,c.translateY,d,f),l(u.rotate,c.rotate,d,f),r(u.skewX,c.skewX,d,f),s(u.scaleX,u.scaleY,c.scaleX,c.scaleY,d,f),u=c=null,function(h){for(var v=-1,b=f.length,S;++v<b;)d[(S=f[v]).i]=S.x(h);return d.join("")}}}var jm=PS(BS,"px, ","px)","deg)"),$m=PS(HS,", ",")",")");var dA=1e-12;function kS(e){return((e=Math.exp(e))+1/e)/2}function pA(e){return((e=Math.exp(e))-1/e)/2}function mA(e){return((e=Math.exp(2*e))-1)/(e+1)}var Ta=(function e(t,n,o){function i(a,l){var r=a[0],s=a[1],u=a[2],c=l[0],d=l[1],f=l[2],h=c-r,v=d-s,b=h*h+v*v,S,p;if(b<dA)p=Math.log(f/u)/t,S=function(E){return[r+E*h,s+E*v,u*Math.exp(t*E*p)]};else{var g=Math.sqrt(b),m=(f*f-u*u+o*b)/(2*u*n*g),y=(f*f-u*u-o*b)/(2*f*n*g),x=Math.log(Math.sqrt(m*m+1)-m),_=Math.log(Math.sqrt(y*y+1)-y);p=(_-x)/t,S=function(E){var C=E*p,A=kS(x),B=u/(n*g)*(A*mA(t*C+x)-pA(x));return[r+B*h,s+B*v,u*A/kS(t*C+x)]}}return S.duration=p*1e3*t/Math.SQRT2,S}return i.rho=function(a){var l=Math.max(.001,+a),r=l*l,s=r*r;return e(l,r,s)},i})(Math.SQRT2,2,4);var kl=0,As=0,ws=0,US=1e3,tf,Ms,nf=0,Na=0,of=0,Ds=typeof performance=="object"&&performance.now?performance:Date,IS=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Os(){return Na||(IS(hA),Na=Ds.now()+of)}function hA(){Na=0}function Rs(){this._call=this._time=this._next=null}Rs.prototype=af.prototype={constructor:Rs,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Os():+n)+(t==null?0:+t),!this._next&&Ms!==this&&(Ms?Ms._next=this:tf=this,Ms=this),this._call=e,this._time=n,Fm()},stop:function(){this._call&&(this._call=null,this._time=1/0,Fm())}};function af(e,t,n){var o=new Rs;return o.restart(e,t,n),o}function VS(){Os(),++kl;for(var e=tf,t;e;)(t=Na-e._time)>=0&&e._call.call(void 0,t),e=e._next;--kl}function GS(){Na=(nf=Ds.now())+of,kl=As=0;try{VS()}finally{kl=0,yA(),Na=0}}function gA(){var e=Ds.now(),t=e-nf;t>US&&(of-=t,nf=e)}function yA(){for(var e,t=tf,n,o=1/0;t;)t._call?(o>t._time&&(o=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:tf=n);Ms=e,Fm(o)}function Fm(e){if(!kl){As&&(As=clearTimeout(As));var t=e-Na;t>24?(e<1/0&&(As=setTimeout(GS,e-Ds.now()-of)),ws&&(ws=clearInterval(ws))):(ws||(nf=Ds.now(),ws=setInterval(gA,US)),kl=1,IS(GS))}}function lf(e,t,n){var o=new Rs;return t=t==null?0:+t,o.restart(i=>{o.stop(),e(i+t)},t,n),o}var vA=va("start","end","cancel","interrupt"),bA=[],qS=0,YS=1,sf=2,rf=3,XS=4,uf=5,zs=6;function Xi(e,t,n,o,i,a){var l=e.__transition;if(!l)e.__transition={};else if(n in l)return;SA(e,n,{name:t,index:o,group:i,on:vA,tween:bA,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:qS})}function Ls(e,t){var n=bt(e,t);if(n.state>qS)throw new Error("too late; already scheduled");return n}function Lt(e,t){var n=bt(e,t);if(n.state>rf)throw new Error("too late; already running");return n}function bt(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function SA(e,t,n){var o=e.__transition,i;o[t]=n,n.timer=af(a,0,n.time);function a(u){n.state=YS,n.timer.restart(l,n.delay,n.time),n.delay<=u&&l(u-n.delay)}function l(u){var c,d,f,h;if(n.state!==YS)return s();for(c in o)if(h=o[c],h.name===n.name){if(h.state===rf)return lf(l);h.state===XS?(h.state=zs,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete o[c]):+c<t&&(h.state=zs,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete o[c])}if(lf(function(){n.state===rf&&(n.state=XS,n.timer.restart(r,n.delay,n.time),r(u))}),n.state=sf,n.on.call("start",e,e.__data__,n.index,n.group),n.state===sf){for(n.state=rf,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 r(u){for(var c=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(s),n.state=uf,1),d=-1,f=i.length;++d<f;)i[d].call(e,c);n.state===uf&&(n.on.call("end",e,e.__data__,n.index,n.group),s())}function s(){n.state=zs,n.timer.stop(),delete o[t];for(var u in o)return;delete e.__transition}}function Ca(e,t){var n=e.__transition,o,i,a=!0,l;if(n){t=t==null?null:t+"";for(l in n){if((o=n[l]).name!==t){a=!1;continue}i=o.state>sf&&o.state<uf,o.state=zs,o.timer.stop(),o.on.call(i?"interrupt":"cancel",e,e.__data__,o.index,o.group),delete n[l]}a&&delete e.__transition}}function ZS(e){return this.each(function(){Ca(this,e)})}function xA(e,t){var n,o;return function(){var i=Lt(this,e),a=i.tween;if(a!==n){o=n=a;for(var l=0,r=o.length;l<r;++l)if(o[l].name===t){o=o.slice(),o.splice(l,1);break}}i.tween=o}}function _A(e,t,n){var o,i;if(typeof n!="function")throw new Error;return function(){var a=Lt(this,e),l=a.tween;if(l!==o){i=(o=l).slice();for(var r={name:t,value:n},s=0,u=i.length;s<u;++s)if(i[s].name===t){i[s]=r;break}s===u&&i.push(r)}a.tween=i}}function jS(e,t){var n=this._id;if(e+="",arguments.length<2){for(var o=bt(this.node(),n).tween,i=0,a=o.length,l;i<a;++i)if((l=o[i]).name===e)return l.value;return null}return this.each((t==null?xA:_A)(n,e,t))}function Gl(e,t,n){var o=e._id;return e.each(function(){var i=Lt(this,o);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return bt(i,o).value[t]}}function cf(e,t){var n;return(typeof t=="number"?qt:t instanceof io?Ea:(n=io(t))?(t=n,Ea):Cs)(e,t)}function EA(e){return function(){this.removeAttribute(e)}}function TA(e){return function(){this.removeAttributeNS(e.space,e.local)}}function NA(e,t,n){var o,i=n+"",a;return function(){var l=this.getAttribute(e);return l===i?null:l===o?a:a=t(o=l,n)}}function CA(e,t,n){var o,i=n+"",a;return function(){var l=this.getAttributeNS(e.space,e.local);return l===i?null:l===o?a:a=t(o=l,n)}}function wA(e,t,n){var o,i,a;return function(){var l,r=n(this),s;return r==null?void this.removeAttribute(e):(l=this.getAttribute(e),s=r+"",l===s?null:l===o&&s===i?a:(i=s,a=t(o=l,r)))}}function AA(e,t,n){var o,i,a;return function(){var l,r=n(this),s;return r==null?void this.removeAttributeNS(e.space,e.local):(l=this.getAttributeNS(e.space,e.local),s=r+"",l===s?null:l===o&&s===i?a:(i=s,a=t(o=l,r)))}}function $S(e,t){var n=Wo(e),o=n==="transform"?$m:cf;return this.attrTween(e,typeof t=="function"?(n.local?AA:wA)(n,o,Gl(this,"attr."+e,t)):t==null?(n.local?TA:EA)(n):(n.local?CA:NA)(n,o,t))}function MA(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function DA(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function RA(e,t){var n,o;function i(){var a=t.apply(this,arguments);return a!==o&&(n=(o=a)&&DA(e,a)),n}return i._value=t,i}function OA(e,t){var n,o;function i(){var a=t.apply(this,arguments);return a!==o&&(n=(o=a)&&MA(e,a)),n}return i._value=t,i}function FS(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 o=Wo(e);return this.tween(n,(o.local?RA:OA)(o,t))}function zA(e,t){return function(){Ls(this,e).delay=+t.apply(this,arguments)}}function LA(e,t){return t=+t,function(){Ls(this,e).delay=t}}function KS(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?zA:LA)(t,e)):bt(this.node(),t).delay}function BA(e,t){return function(){Lt(this,e).duration=+t.apply(this,arguments)}}function HA(e,t){return t=+t,function(){Lt(this,e).duration=t}}function QS(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?BA:HA)(t,e)):bt(this.node(),t).duration}function PA(e,t){if(typeof t!="function")throw new Error;return function(){Lt(this,e).ease=t}}function WS(e){var t=this._id;return arguments.length?this.each(PA(t,e)):bt(this.node(),t).ease}function kA(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Lt(this,e).ease=n}}function JS(e){if(typeof e!="function")throw new Error;return this.each(kA(this._id,e))}function ex(e){typeof e!="function"&&(e=gs(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var a=t[i],l=a.length,r=o[i]=[],s,u=0;u<l;++u)(s=a[u])&&e.call(s,s.__data__,u,a)&&r.push(s);return new Zt(o,this._parents,this._name,this._id)}function tx(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,o=t.length,i=n.length,a=Math.min(o,i),l=new Array(o),r=0;r<a;++r)for(var s=t[r],u=n[r],c=s.length,d=l[r]=new Array(c),f,h=0;h<c;++h)(f=s[h]||u[h])&&(d[h]=f);for(;r<o;++r)l[r]=t[r];return new Zt(l,this._parents,this._name,this._id)}function GA(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 UA(e,t,n){var o,i,a=GA(t)?Ls:Lt;return function(){var l=a(this,e),r=l.on;r!==o&&(i=(o=r).copy()).on(t,n),l.on=i}}function nx(e,t){var n=this._id;return arguments.length<2?bt(this.node(),n).on.on(e):this.each(UA(n,e,t))}function IA(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function ox(){return this.on("end.remove",IA(this._id))}function ix(e){var t=this._name,n=this._id;typeof e!="function"&&(e=ba(e));for(var o=this._groups,i=o.length,a=new Array(i),l=0;l<i;++l)for(var r=o[l],s=r.length,u=a[l]=new Array(s),c,d,f=0;f<s;++f)(c=r[f])&&(d=e.call(c,c.__data__,f,r))&&("__data__"in c&&(d.__data__=c.__data__),u[f]=d,Xi(u[f],t,n,f,u,bt(c,n)));return new Zt(a,this._parents,t,n)}function ax(e){var t=this._name,n=this._id;typeof e!="function"&&(e=hs(e));for(var o=this._groups,i=o.length,a=[],l=[],r=0;r<i;++r)for(var s=o[r],u=s.length,c,d=0;d<u;++d)if(c=s[d]){for(var f=e.call(c,c.__data__,d,s),h,v=bt(c,n),b=0,S=f.length;b<S;++b)(h=f[b])&&Xi(h,t,n,b,f,v);a.push(f),l.push(c)}return new Zt(a,l,t,n)}var VA=Jo.prototype.constructor;function lx(){return new VA(this._groups,this._parents)}function YA(e,t){var n,o,i;return function(){var a=Vi(this,e),l=(this.style.removeProperty(e),Vi(this,e));return a===l?null:a===n&&l===o?i:i=t(n=a,o=l)}}function rx(e){return function(){this.style.removeProperty(e)}}function XA(e,t,n){var o,i=n+"",a;return function(){var l=Vi(this,e);return l===i?null:l===o?a:a=t(o=l,n)}}function qA(e,t,n){var o,i,a;return function(){var l=Vi(this,e),r=n(this),s=r+"";return r==null&&(s=r=(this.style.removeProperty(e),Vi(this,e))),l===s?null:l===o&&s===i?a:(i=s,a=t(o=l,r))}}function ZA(e,t){var n,o,i,a="style."+t,l="end."+a,r;return function(){var s=Lt(this,e),u=s.on,c=s.value[a]==null?r||(r=rx(t)):void 0;(u!==n||i!==c)&&(o=(n=u).copy()).on(l,i=c),s.on=o}}function sx(e,t,n){var o=(e+="")=="transform"?jm:cf;return t==null?this.styleTween(e,YA(e,o)).on("end.style."+e,rx(e)):typeof t=="function"?this.styleTween(e,qA(e,o,Gl(this,"style."+e,t))).each(ZA(this._id,e)):this.styleTween(e,XA(e,o,t),n).on("end.style."+e,null)}function jA(e,t,n){return function(o){this.style.setProperty(e,t.call(this,o),n)}}function $A(e,t,n){var o,i;function a(){var l=t.apply(this,arguments);return l!==i&&(o=(i=l)&&jA(e,l,n)),o}return a._value=t,a}function ux(e,t,n){var o="style."+(e+="");if(arguments.length<2)return(o=this.tween(o))&&o._value;if(t==null)return this.tween(o,null);if(typeof t!="function")throw new Error;return this.tween(o,$A(e,t,n??""))}function FA(e){return function(){this.textContent=e}}function KA(e){return function(){var t=e(this);this.textContent=t??""}}function cx(e){return this.tween("text",typeof e=="function"?KA(Gl(this,"text",e)):FA(e==null?"":e+""))}function QA(e){return function(t){this.textContent=e.call(this,t)}}function WA(e){var t,n;function o(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&QA(i)),t}return o._value=e,o}function fx(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,WA(e))}function dx(){for(var e=this._name,t=this._id,n=ff(),o=this._groups,i=o.length,a=0;a<i;++a)for(var l=o[a],r=l.length,s,u=0;u<r;++u)if(s=l[u]){var c=bt(s,t);Xi(s,e,n,u,l,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Zt(o,this._parents,e,n)}function px(){var e,t,n=this,o=n._id,i=n.size();return new Promise(function(a,l){var r={value:l},s={value:function(){--i===0&&a()}};n.each(function(){var u=Lt(this,o),c=u.on;c!==e&&(t=(e=c).copy(),t._.cancel.push(r),t._.interrupt.push(r),t._.end.push(s)),u.on=t}),i===0&&a()})}var JA=0;function Zt(e,t,n,o){this._groups=e,this._parents=t,this._name=n,this._id=o}function mx(e){return Jo().transition(e)}function ff(){return++JA}var ti=Jo.prototype;Zt.prototype=mx.prototype={constructor:Zt,select:ix,selectAll:ax,selectChild:ti.selectChild,selectChildren:ti.selectChildren,filter:ex,merge:tx,selection:lx,transition:dx,call:ti.call,nodes:ti.nodes,node:ti.node,size:ti.size,empty:ti.empty,each:ti.each,on:nx,attr:$S,attrTween:FS,style:sx,styleTween:ux,text:cx,textTween:fx,remove:ox,tween:jS,delay:KS,duration:QS,ease:WS,easeVarying:JS,end:px,[Symbol.iterator]:ti[Symbol.iterator]};function df(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var eM={time:null,delay:0,duration:250,ease:df};function tM(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 hx(e){var t,n;e instanceof Zt?(t=e._id,e=e._name):(t=ff(),(n=eM).time=Os(),e=e==null?null:e+"");for(var o=this._groups,i=o.length,a=0;a<i;++a)for(var l=o[a],r=l.length,s,u=0;u<r;++u)(s=l[u])&&Xi(s,e,t,u,l,n||tM(s,t));return new Zt(o,this._parents,e,t)}Jo.prototype.interrupt=ZS;Jo.prototype.transition=hx;var Bs=e=>()=>e;function Km(e,{sourceEvent:t,target:n,transform:o,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:o,enumerable:!0,configurable:!0},_:{value:i}})}function ao(e,t,n){this.k=e,this.x=t,this.y=n}ao.prototype={constructor:ao,scale:function(e){return e===1?this:new ao(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new ao(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 wa=new ao(1,0,0);Hs.prototype=ao.prototype;function Hs(e){for(;!e.__zoom;)if(!(e=e.parentNode))return wa;return e.__zoom}function pf(e){e.stopImmediatePropagation()}function Ul(e){e.preventDefault(),e.stopImmediatePropagation()}function nM(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function oM(){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 gx(){return this.__zoom||wa}function iM(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function aM(){return navigator.maxTouchPoints||"ontouchstart"in this}function lM(e,t,n){var o=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],a=e.invertY(t[0][1])-n[0][1],l=e.invertY(t[1][1])-n[1][1];return e.translate(i>o?(o+i)/2:Math.min(0,o)||Math.max(0,i),l>a?(a+l)/2:Math.min(0,a)||Math.max(0,l))}function mf(){var e=nM,t=oM,n=lM,o=iM,i=aM,a=[0,1/0],l=[[-1/0,-1/0],[1/0,1/0]],r=250,s=Ta,u=va("start","zoom","end"),c,d,f,h=500,v=150,b=0,S=10;function p(T){T.property("__zoom",gx).on("wheel.zoom",C,{passive:!1}).on("mousedown.zoom",A).on("dblclick.zoom",B).filter(i).on("touchstart.zoom",M).on("touchmove.zoom",z).on("touchend.zoom touchcancel.zoom",I).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}p.transform=function(T,D,N,O){var R=T.selection?T.selection():T;R.property("__zoom",gx),T!==R?x(T,D,N,O):R.interrupt().each(function(){_(this,arguments).event(O).start().zoom(null,typeof D=="function"?D.apply(this,arguments):D).end()})},p.scaleBy=function(T,D,N,O){p.scaleTo(T,function(){var R=this.__zoom.k,L=typeof D=="function"?D.apply(this,arguments):D;return R*L},N,O)},p.scaleTo=function(T,D,N,O){p.transform(T,function(){var R=t.apply(this,arguments),L=this.__zoom,V=N==null?y(R):typeof N=="function"?N.apply(this,arguments):N,k=L.invert(V),G=typeof D=="function"?D.apply(this,arguments):D;return n(m(g(L,G),V,k),R,l)},N,O)},p.translateBy=function(T,D,N,O){p.transform(T,function(){return n(this.__zoom.translate(typeof D=="function"?D.apply(this,arguments):D,typeof N=="function"?N.apply(this,arguments):N),t.apply(this,arguments),l)},null,O)},p.translateTo=function(T,D,N,O,R){p.transform(T,function(){var L=t.apply(this,arguments),V=this.__zoom,k=O==null?y(L):typeof O=="function"?O.apply(this,arguments):O;return n(wa.translate(k[0],k[1]).scale(V.k).translate(typeof D=="function"?-D.apply(this,arguments):-D,typeof N=="function"?-N.apply(this,arguments):-N),L,l)},O,R)};function g(T,D){return D=Math.max(a[0],Math.min(a[1],D)),D===T.k?T:new ao(D,T.x,T.y)}function m(T,D,N){var O=D[0]-N[0]*T.k,R=D[1]-N[1]*T.k;return O===T.x&&R===T.y?T:new ao(T.k,O,R)}function y(T){return[(+T[0][0]+ +T[1][0])/2,(+T[0][1]+ +T[1][1])/2]}function x(T,D,N,O){T.on("start.zoom",function(){_(this,arguments).event(O).start()}).on("interrupt.zoom end.zoom",function(){_(this,arguments).event(O).end()}).tween("zoom",function(){var R=this,L=arguments,V=_(R,L).event(O),k=t.apply(R,L),G=N==null?y(k):typeof N=="function"?N.apply(R,L):N,q=Math.max(k[1][0]-k[0][0],k[1][1]-k[0][1]),Z=R.__zoom,j=typeof D=="function"?D.apply(R,L):D,se=s(Z.invert(G).concat(q/Z.k),j.invert(G).concat(q/j.k));return function(ee){if(ee===1)ee=j;else{var X=se(ee),Q=q/X[2];ee=new ao(Q,G[0]-X[0]*Q,G[1]-X[1]*Q)}V.zoom(null,ee)}})}function _(T,D,N){return!N&&T.__zooming||new E(T,D)}function E(T,D){this.that=T,this.args=D,this.active=0,this.sourceEvent=null,this.extent=t.apply(T,D),this.taps=0}E.prototype={event:function(T){return T&&(this.sourceEvent=T),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(T,D){return this.mouse&&T!=="mouse"&&(this.mouse[1]=D.invert(this.mouse[0])),this.touch0&&T!=="touch"&&(this.touch0[1]=D.invert(this.touch0[0])),this.touch1&&T!=="touch"&&(this.touch1[1]=D.invert(this.touch1[0])),this.that.__zoom=D,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(T){var D=Ct(this.that).datum();u.call(T,this.that,new Km(T,{sourceEvent:this.sourceEvent,target:p,type:T,transform:this.that.__zoom,dispatch:u}),D)}};function C(T,...D){if(!e.apply(this,arguments))return;var N=_(this,D).event(T),O=this.__zoom,R=Math.max(a[0],Math.min(a[1],O.k*Math.pow(2,o.apply(this,arguments)))),L=Xt(T);if(N.wheel)(N.mouse[0][0]!==L[0]||N.mouse[0][1]!==L[1])&&(N.mouse[1]=O.invert(N.mouse[0]=L)),clearTimeout(N.wheel);else{if(O.k===R)return;N.mouse=[L,O.invert(L)],Ca(this),N.start()}Ul(T),N.wheel=setTimeout(V,v),N.zoom("mouse",n(m(g(O,R),N.mouse[0],N.mouse[1]),N.extent,l));function V(){N.wheel=null,N.end()}}function A(T,...D){if(f||!e.apply(this,arguments))return;var N=T.currentTarget,O=_(this,D,!0).event(T),R=Ct(T.view).on("mousemove.zoom",G,!0).on("mouseup.zoom",q,!0),L=Xt(T,N),V=T.clientX,k=T.clientY;vs(T.view),pf(T),O.mouse=[L,this.__zoom.invert(L)],Ca(this),O.start();function G(Z){if(Ul(Z),!O.moved){var j=Z.clientX-V,se=Z.clientY-k;O.moved=j*j+se*se>b}O.event(Z).zoom("mouse",n(m(O.that.__zoom,O.mouse[0]=Xt(Z,N),O.mouse[1]),O.extent,l))}function q(Z){R.on("mousemove.zoom mouseup.zoom",null),bs(Z.view,O.moved),Ul(Z),O.event(Z).end()}}function B(T,...D){if(e.apply(this,arguments)){var N=this.__zoom,O=Xt(T.changedTouches?T.changedTouches[0]:T,this),R=N.invert(O),L=N.k*(T.shiftKey?.5:2),V=n(m(g(N,L),O,R),t.apply(this,D),l);Ul(T),r>0?Ct(this).transition().duration(r).call(x,V,O,T):Ct(this).call(p.transform,V,O,T)}}function M(T,...D){if(e.apply(this,arguments)){var N=T.touches,O=N.length,R=_(this,D,T.changedTouches.length===O).event(T),L,V,k,G;for(pf(T),V=0;V<O;++V)k=N[V],G=Xt(k,this),G=[G,this.__zoom.invert(G),k.identifier],R.touch0?!R.touch1&&R.touch0[2]!==G[2]&&(R.touch1=G,R.taps=0):(R.touch0=G,L=!0,R.taps=1+!!c);c&&(c=clearTimeout(c)),L&&(R.taps<2&&(d=G[0],c=setTimeout(function(){c=null},h)),Ca(this),R.start())}}function z(T,...D){if(this.__zooming){var N=_(this,D).event(T),O=T.changedTouches,R=O.length,L,V,k,G;for(Ul(T),L=0;L<R;++L)V=O[L],k=Xt(V,this),N.touch0&&N.touch0[2]===V.identifier?N.touch0[0]=k:N.touch1&&N.touch1[2]===V.identifier&&(N.touch1[0]=k);if(V=N.that.__zoom,N.touch1){var q=N.touch0[0],Z=N.touch0[1],j=N.touch1[0],se=N.touch1[1],ee=(ee=j[0]-q[0])*ee+(ee=j[1]-q[1])*ee,X=(X=se[0]-Z[0])*X+(X=se[1]-Z[1])*X;V=g(V,Math.sqrt(ee/X)),k=[(q[0]+j[0])/2,(q[1]+j[1])/2],G=[(Z[0]+se[0])/2,(Z[1]+se[1])/2]}else if(N.touch0)k=N.touch0[0],G=N.touch0[1];else return;N.zoom("touch",n(m(V,k,G),N.extent,l))}}function I(T,...D){if(this.__zooming){var N=_(this,D).event(T),O=T.changedTouches,R=O.length,L,V;for(pf(T),f&&clearTimeout(f),f=setTimeout(function(){f=null},h),L=0;L<R;++L)V=O[L],N.touch0&&N.touch0[2]===V.identifier?delete N.touch0:N.touch1&&N.touch1[2]===V.identifier&&delete N.touch1;if(N.touch1&&!N.touch0&&(N.touch0=N.touch1,delete N.touch1),N.touch0)N.touch0[1]=this.__zoom.invert(N.touch0[0]);else if(N.end(),N.taps===2&&(V=Xt(V,this),Math.hypot(d[0]-V[0],d[1]-V[1])<S)){var k=Ct(this).on("dblclick.zoom");k&&k.apply(this,arguments)}}}return p.wheelDelta=function(T){return arguments.length?(o=typeof T=="function"?T:Bs(+T),p):o},p.filter=function(T){return arguments.length?(e=typeof T=="function"?T:Bs(!!T),p):e},p.touchable=function(T){return arguments.length?(i=typeof T=="function"?T:Bs(!!T),p):i},p.extent=function(T){return arguments.length?(t=typeof T=="function"?T:Bs([[+T[0][0],+T[0][1]],[+T[1][0],+T[1][1]]]),p):t},p.scaleExtent=function(T){return arguments.length?(a[0]=+T[0],a[1]=+T[1],p):[a[0],a[1]]},p.translateExtent=function(T){return arguments.length?(l[0][0]=+T[0][0],l[1][0]=+T[1][0],l[0][1]=+T[0][1],l[1][1]=+T[1][1],p):[[l[0][0],l[0][1]],[l[1][0],l[1][1]]]},p.constrain=function(T){return arguments.length?(n=T,p):n},p.duration=function(T){return arguments.length?(r=+T,p):r},p.interpolate=function(T){return arguments.length?(s=T,p):s},p.on=function(){var T=u.on.apply(u,arguments);return T===u?p:T},p.clickDistance=function(T){return arguments.length?(b=(T=+T)*T,p):Math.sqrt(b)},p.tapDistance=function(T){return arguments.length?(S=+T,p):S},p}var An={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:o})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:o}", 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."},Zl=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],th=["Enter"," ","Escape"],nh={"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"},ji;(function(e){e.Strict="strict",e.Loose="loose"})(ji||(ji={}));var ni;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(ni||(ni={}));var Aa;(function(e){e.Partial="partial",e.Full="full"})(Aa||(Aa={}));var oh={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null},bo;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(bo||(bo={}));var Yl;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Yl||(Yl={}));var W;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(W||(W={}));var yx={[W.Left]:W.Right,[W.Right]:W.Left,[W.Top]:W.Bottom,[W.Bottom]:W.Top};function ih(e){return e===null?null:e?"valid":"invalid"}var ah=e=>"id"in e&&"source"in e&&"target"in e,Dx=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),lh=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e);var Gs=(e,t=[0,0])=>{let{width:n,height:o}=So(e),i=e.origin??t,a=n*i[0],l=o*i[1];return{x:e.position.x-a,y:e.position.y-l}},rh=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};let n=e.reduce((o,i)=>{let a=typeof i=="string",l=!t.nodeLookup&&!a?i:void 0;t.nodeLookup&&(l=a?t.nodeLookup.get(i):lh(i)?i:t.nodeLookup.get(i.id));let r=l?yf(l,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return bf(o,r)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Sf(n)},jl=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},o=!1;return e.forEach(i=>{(t.filter===void 0||t.filter(i))&&(n=bf(n,yf(i)),o=!0)}),o?Sf(n):{x:0,y:0,width:0,height:0}},vf=(e,t,[n,o,i]=[0,0,1],a=!1,l=!1)=>{let r={...Kl(t,[n,o,i]),width:t.width/i,height:t.height/i},s=[];for(let u of e.values()){let{measured:c,selectable:d=!0,hidden:f=!1}=u;if(l&&!d||f)continue;let h=c.width??u.width??u.initialWidth??null,v=c.height??u.height??u.initialHeight??null,b=$l(r,Da(u)),S=(h??0)*(v??0),p=a&&b>0;(!u.internals.handleBounds||p||b>=S||u.dragging)&&s.push(u)}return s},Rx=(e,t)=>{let n=new Set;return e.forEach(o=>{n.add(o.id)}),t.filter(o=>n.has(o.source)||n.has(o.target))};function rM(e,t){let n=new Map,o=t?.nodes?new Set(t.nodes.map(i=>i.id)):null;return e.forEach(i=>{i.measured.width&&i.measured.height&&(t?.includeHiddenNodes||!i.hidden)&&(!o||o.has(i.id))&&n.set(i.id,i)}),n}async function Ox({nodes:e,width:t,height:n,panZoom:o,minZoom:i,maxZoom:a},l){if(e.size===0)return Promise.resolve(!0);let r=rM(e,l),s=jl(r),u=Us(s,t,n,l?.minZoom??i,l?.maxZoom??a,l?.padding??.1);return await o.setViewport(u,{duration:l?.duration,ease:l?.ease,interpolate:l?.interpolate}),Promise.resolve(!0)}function sh({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:o=[0,0],nodeExtent:i,onError:a}){let l=n.get(e),r=l.parentId?n.get(l.parentId):void 0,{x:s,y:u}=r?r.internals.positionAbsolute:{x:0,y:0},c=l.origin??o,d=l.extent||i;if(l.extent==="parent"&&!l.expandParent)if(!r)a?.("005",An.error005());else{let h=r.measured.width,v=r.measured.height;h&&v&&(d=[[s,u],[s+h,u+v]])}else r&&ql(l.extent)&&(d=[[l.extent[0][0]+s,l.extent[0][1]+u],[l.extent[1][0]+s,l.extent[1][1]+u]]);let f=ql(d)?Ma(t,d,l.measured):t;return(l.measured.width===void 0||l.measured.height===void 0)&&a?.("015",An.error015()),{position:{x:f.x-s+(l.measured.width??0)*c[0],y:f.y-u+(l.measured.height??0)*c[1]},positionAbsolute:f}}async function zx({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:o,onBeforeDelete:i}){let a=new Set(e.map(f=>f.id)),l=[];for(let f of n){if(f.deletable===!1)continue;let h=a.has(f.id),v=!h&&f.parentId&&l.find(b=>b.id===f.parentId);(h||v)&&l.push(f)}let r=new Set(t.map(f=>f.id)),s=o.filter(f=>f.deletable!==!1),c=Rx(l,s);for(let f of s)r.has(f.id)&&!c.find(v=>v.id===f.id)&&c.push(f);if(!i)return{edges:c,nodes:l};let d=await i({nodes:l,edges:c});return typeof d=="boolean"?d?{edges:c,nodes:l}:{edges:[],nodes:[]}:d}var Xl=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),Ma=(e={x:0,y:0},t,n)=>({x:Xl(e.x,t[0][0],t[1][0]-(n?.width??0)),y:Xl(e.y,t[0][1],t[1][1]-(n?.height??0))});function Lx(e,t,n){let{width:o,height:i}=So(n),{x:a,y:l}=n.internals.positionAbsolute;return Ma(e,[[a,l],[a+o,l+i]],t)}var vx=(e,t,n)=>e<t?Xl(Math.abs(e-t),1,t)/t:e>n?-Xl(Math.abs(e-n),1,t)/t:0,Bx=(e,t,n=15,o=40)=>{let i=vx(e.x,o,t.width-o)*n,a=vx(e.y,o,t.height-o)*n;return[i,a]},bf=(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)}),eh=({x:e,y:t,width:n,height:o})=>({x:e,y:t,x2:e+n,y2:t+o}),Sf=({x:e,y:t,x2:n,y2:o})=>({x:e,y:t,width:n-e,height:o-t}),Da=(e,t=[0,0])=>{let{x:n,y:o}=lh(e)?e.internals.positionAbsolute:Gs(e,t);return{x:n,y:o,width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}},yf=(e,t=[0,0])=>{let{x:n,y:o}=lh(e)?e.internals.positionAbsolute:Gs(e,t);return{x:n,y:o,x2:n+(e.measured?.width??e.width??e.initialWidth??0),y2:o+(e.measured?.height??e.height??e.initialHeight??0)}},uh=(e,t)=>Sf(bf(eh(e),eh(t))),$l=(e,t)=>{let n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),o=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*o)},ch=e=>qn(e.width)&&qn(e.height)&&qn(e.x)&&qn(e.y),qn=e=>!isNaN(e)&&isFinite(e),fh=(e,t)=>{},Fl=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),Kl=({x:e,y:t},[n,o,i],a=!1,l=[1,1])=>{let r={x:(e-n)/i,y:(t-o)/i};return a?Fl(r,l):r},ks=({x:e,y:t},[n,o,i])=>({x:e*i+n,y:t*i+o});function Il(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){let n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){let 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 sM(e,t,n){if(typeof e=="string"||typeof e=="number"){let o=Il(e,n),i=Il(e,t);return{top:o,right:i,bottom:o,left:i,x:i*2,y:o*2}}if(typeof e=="object"){let o=Il(e.top??e.y??0,n),i=Il(e.bottom??e.y??0,n),a=Il(e.left??e.x??0,t),l=Il(e.right??e.x??0,t);return{top:o,right:l,bottom:i,left:a,x:a+l,y:o+i}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function uM(e,t,n,o,i,a){let{x:l,y:r}=ks(e,[t,n,o]),{x:s,y:u}=ks({x:e.x+e.width,y:e.y+e.height},[t,n,o]),c=i-s,d=a-u;return{left:Math.floor(l),top:Math.floor(r),right:Math.floor(c),bottom:Math.floor(d)}}var Us=(e,t,n,o,i,a)=>{let l=sM(a,t,n),r=(t-l.x)/e.width,s=(n-l.y)/e.height,u=Math.min(r,s),c=Xl(u,o,i),d=e.x+e.width/2,f=e.y+e.height/2,h=t/2-d*c,v=n/2-f*c,b=uM(e,h,v,c,t,n),S={left:Math.min(b.left-l.left,0),top:Math.min(b.top-l.top,0),right:Math.min(b.right-l.right,0),bottom:Math.min(b.bottom-l.bottom,0)};return{x:h-S.left+S.right,y:v-S.top+S.bottom,zoom:c}},Ql=()=>typeof navigator<"u"&&navigator?.userAgent?.indexOf("Mac")>=0;function ql(e){return e!=null&&e!=="parent"}function So(e){return{width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}}function dh(e){return(e.measured?.width??e.width??e.initialWidth)!==void 0&&(e.measured?.height??e.height??e.initialHeight)!==void 0}function ph(e,t={width:0,height:0},n,o,i){let a={...e},l=o.get(n);if(l){let r=l.origin||i;a.x+=l.internals.positionAbsolute.x-(t.width??0)*r[0],a.y+=l.internals.positionAbsolute.y-(t.height??0)*r[1]}return a}function mh(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function Hx(){let e,t;return{promise:new Promise((o,i)=>{e=o,t=i}),resolve:e,reject:t}}function Px(e){return{...nh,...e||{}}}function Ps(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:o,containerBounds:i}){let{x:a,y:l}=Zn(e),r=Kl({x:a-(i?.left??0),y:l-(i?.top??0)},o),{x:s,y:u}=n?Fl(r,t):r;return{xSnapped:s,ySnapped:u,...r}}var xf=e=>({width:e.offsetWidth,height:e.offsetHeight}),hh=e=>e?.getRootNode?.()||window?.document,cM=["INPUT","SELECT","TEXTAREA"];function gh(e){let t=e.composedPath?.()?.[0]||e.target;return t?.nodeType!==1?!1:cM.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}var yh=e=>"clientX"in e,Zn=(e,t)=>{let n=yh(e),o=n?e.clientX:e.touches?.[0].clientX,i=n?e.clientY:e.touches?.[0].clientY;return{x:o-(t?.left??0),y:i-(t?.top??0)}},bx=(e,t,n,o,i)=>{let a=t.querySelectorAll(`.${e}`);return!a||!a.length?null:Array.from(a).map(l=>{let r=l.getBoundingClientRect();return{id:l.getAttribute("data-handleid"),type:e,nodeId:i,position:l.getAttribute("data-handlepos"),x:(r.left-n.left)/o,y:(r.top-n.top)/o,...xf(l)}})};function _f({sourceX:e,sourceY:t,targetX:n,targetY:o,sourceControlX:i,sourceControlY:a,targetControlX:l,targetControlY:r}){let s=e*.125+i*.375+l*.375+n*.125,u=t*.125+a*.375+r*.375+o*.125,c=Math.abs(s-e),d=Math.abs(u-t);return[s,u,c,d]}function hf(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function Sx({pos:e,x1:t,y1:n,x2:o,y2:i,c:a}){switch(e){case W.Left:return[t-hf(t-o,a),n];case W.Right:return[t+hf(o-t,a),n];case W.Top:return[t,n-hf(n-i,a)];case W.Bottom:return[t,n+hf(i-n,a)]}}function Ef({sourceX:e,sourceY:t,sourcePosition:n=W.Bottom,targetX:o,targetY:i,targetPosition:a=W.Top,curvature:l=.25}){let[r,s]=Sx({pos:n,x1:e,y1:t,x2:o,y2:i,c:l}),[u,c]=Sx({pos:a,x1:o,y1:i,x2:e,y2:t,c:l}),[d,f,h,v]=_f({sourceX:e,sourceY:t,targetX:o,targetY:i,sourceControlX:r,sourceControlY:s,targetControlX:u,targetControlY:c});return[`M${e},${t} C${r},${s} ${u},${c} ${o},${i}`,d,f,h,v]}function vh({sourceX:e,sourceY:t,targetX:n,targetY:o}){let i=Math.abs(n-e)/2,a=n<e?n+i:n-i,l=Math.abs(o-t)/2,r=o<t?o+l:o-l;return[a,r,i,l]}function kx({sourceNode:e,targetNode:t,selected:n=!1,zIndex:o=0,elevateOnSelect:i=!1,zIndexMode:a="basic"}){if(a==="manual")return o;let l=i&&n?o+1e3:o,r=Math.max(e.parentId||i&&e.selected?e.internals.z:0,t.parentId||i&&t.selected?t.internals.z:0);return l+r}function Gx({sourceNode:e,targetNode:t,width:n,height:o,transform:i}){let a=bf(yf(e),yf(t));a.x===a.x2&&(a.x2+=1),a.y===a.y2&&(a.y2+=1);let l={x:-i[0]/i[2],y:-i[1]/i[2],width:n/i[2],height:o/i[2]};return $l(l,Sf(a))>0}var fM=({source:e,sourceHandle:t,target:n,targetHandle:o})=>`xy-edge__${e}${t||""}-${n}${o||""}`,dM=(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)),bh=(e,t,n={})=>{if(!e.source||!e.target)return fh("006",An.error006()),t;let o=n.getEdgeId||fM,i;return ah(e)?i={...e}:i={...e,id:o(e)},dM(i,t)?t:(i.sourceHandle===null&&delete i.sourceHandle,i.targetHandle===null&&delete i.targetHandle,t.concat(i))};function Tf({sourceX:e,sourceY:t,targetX:n,targetY:o}){let[i,a,l,r]=vh({sourceX:e,sourceY:t,targetX:n,targetY:o});return[`M ${e},${t}L ${n},${o}`,i,a,l,r]}var xx={[W.Left]:{x:-1,y:0},[W.Right]:{x:1,y:0},[W.Top]:{x:0,y:-1},[W.Bottom]:{x:0,y:1}},pM=({source:e,sourcePosition:t=W.Bottom,target:n})=>t===W.Left||t===W.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},_x=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function mM({source:e,sourcePosition:t=W.Bottom,target:n,targetPosition:o=W.Top,center:i,offset:a,stepPosition:l}){let r=xx[t],s=xx[o],u={x:e.x+r.x*a,y:e.y+r.y*a},c={x:n.x+s.x*a,y:n.y+s.y*a},d=pM({source:u,sourcePosition:t,target:c}),f=d.x!==0?"x":"y",h=d[f],v=[],b,S,p={x:0,y:0},g={x:0,y:0},[,,m,y]=vh({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(r[f]*s[f]===-1){f==="x"?(b=i.x??u.x+(c.x-u.x)*l,S=i.y??(u.y+c.y)/2):(b=i.x??(u.x+c.x)/2,S=i.y??u.y+(c.y-u.y)*l);let _=[{x:b,y:u.y},{x:b,y:c.y}],E=[{x:u.x,y:S},{x:c.x,y:S}];r[f]===h?v=f==="x"?_:E:v=f==="x"?E:_}else{let _=[{x:u.x,y:c.y}],E=[{x:c.x,y:u.y}];if(f==="x"?v=r.x===h?E:_:v=r.y===h?_:E,t===o){let z=Math.abs(e[f]-n[f]);if(z<=a){let I=Math.min(a-1,a-z);r[f]===h?p[f]=(u[f]>e[f]?-1:1)*I:g[f]=(c[f]>n[f]?-1:1)*I}}if(t!==o){let z=f==="x"?"y":"x",I=r[f]===s[z],T=u[z]>c[z],D=u[z]<c[z];(r[f]===1&&(!I&&T||I&&D)||r[f]!==1&&(!I&&D||I&&T))&&(v=f==="x"?_:E)}let C={x:u.x+p.x,y:u.y+p.y},A={x:c.x+g.x,y:c.y+g.y},B=Math.max(Math.abs(C.x-v[0].x),Math.abs(A.x-v[0].x)),M=Math.max(Math.abs(C.y-v[0].y),Math.abs(A.y-v[0].y));B>=M?(b=(C.x+A.x)/2,S=v[0].y):(b=v[0].x,S=(C.y+A.y)/2)}return[[e,{x:u.x+p.x,y:u.y+p.y},...v,{x:c.x+g.x,y:c.y+g.y},n],b,S,m,y]}function hM(e,t,n,o){let i=Math.min(_x(e,t)/2,_x(t,n)/2,o),{x:a,y:l}=t;if(e.x===a&&a===n.x||e.y===l&&l===n.y)return`L${a} ${l}`;if(e.y===l){let u=e.x<n.x?-1:1,c=e.y<n.y?1:-1;return`L ${a+i*u},${l}Q ${a},${l} ${a},${l+i*c}`}let r=e.x<n.x?1:-1,s=e.y<n.y?-1:1;return`L ${a},${l+i*s}Q ${a},${l} ${a+i*r},${l}`}function Is({sourceX:e,sourceY:t,sourcePosition:n=W.Bottom,targetX:o,targetY:i,targetPosition:a=W.Top,borderRadius:l=5,centerX:r,centerY:s,offset:u=20,stepPosition:c=.5}){let[d,f,h,v,b]=mM({source:{x:e,y:t},sourcePosition:n,target:{x:o,y:i},targetPosition:a,center:{x:r,y:s},offset:u,stepPosition:c});return[d.reduce((p,g,m)=>{let y="";return m>0&&m<d.length-1?y=hM(d[m-1],g,d[m+1],l):y=`${m===0?"M":"L"}${g.x} ${g.y}`,p+=y,p},""),f,h,v,b]}function Ex(e){return e&&!!(e.internals.handleBounds||e.handles?.length)&&!!(e.measured.width||e.width||e.initialWidth)}function Ux(e){let{sourceNode:t,targetNode:n}=e;if(!Ex(t)||!Ex(n))return null;let o=t.internals.handleBounds||Tx(t.handles),i=n.internals.handleBounds||Tx(n.handles),a=Nx(o?.source??[],e.sourceHandle),l=Nx(e.connectionMode===ji.Strict?i?.target??[]:(i?.target??[]).concat(i?.source??[]),e.targetHandle);if(!a||!l)return e.onError?.("008",An.error008(a?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;let r=a?.position||W.Bottom,s=l?.position||W.Top,u=$i(t,a,r),c=$i(n,l,s);return{sourceX:u.x,sourceY:u.y,targetX:c.x,targetY:c.y,sourcePosition:r,targetPosition:s}}function Tx(e){if(!e)return null;let t=[],n=[];for(let o of e)o.width=o.width??1,o.height=o.height??1,o.type==="source"?t.push(o):o.type==="target"&&n.push(o);return{source:t,target:n}}function $i(e,t,n=W.Left,o=!1){let i=(t?.x??0)+e.internals.positionAbsolute.x,a=(t?.y??0)+e.internals.positionAbsolute.y,{width:l,height:r}=t??So(e);if(o)return{x:i+l/2,y:a+r/2};switch(t?.position??n){case W.Top:return{x:i+l/2,y:a};case W.Right:return{x:i+l,y:a+r/2};case W.Bottom:return{x:i+l/2,y:a+r};case W.Left:return{x:i,y:a+r/2}}}function Nx(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function Nf(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(o=>`${o}=${e[o]}`).join("&")}`:""}function Ix(e,{id:t,defaultColor:n,defaultMarkerStart:o,defaultMarkerEnd:i}){let a=new Set;return e.reduce((l,r)=>([r.markerStart||o,r.markerEnd||i].forEach(s=>{if(s&&typeof s=="object"){let u=Nf(s,t);a.has(u)||(l.push({id:u,color:s.color||n,...s}),a.add(u))}}),l),[]).sort((l,r)=>l.id.localeCompare(r.id))}var Vx=1e3,gM=10,Sh={nodeOrigin:[0,0],nodeExtent:Zl,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},yM={...Sh,checkEquality:!0};function xh(e,t){let n={...e};for(let o in t)t[o]!==void 0&&(n[o]=t[o]);return n}function Yx(e,t,n){let o=xh(Sh,n);for(let i of e.values())if(i.parentId)Eh(i,e,t,o);else{let a=Gs(i,o.nodeOrigin),l=ql(i.extent)?i.extent:o.nodeExtent,r=Ma(a,l,So(i));i.internals.positionAbsolute=r}}function vM(e,t){if(!e.handles)return e.measured?t?.internals.handleBounds:void 0;let n=[],o=[];for(let i of e.handles){let a={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(a):i.type==="target"&&o.push(a)}return{source:n,target:o}}function _h(e){return e==="manual"}function Cf(e,t,n,o={}){let i=xh(yM,o),a={i:0},l=new Map(t),r=i?.elevateNodesOnSelect&&!_h(i.zIndexMode)?Vx:0,s=e.length>0;t.clear(),n.clear();for(let u of e){let c=l.get(u.id);if(i.checkEquality&&u===c?.internals.userNode)t.set(u.id,c);else{let d=Gs(u,i.nodeOrigin),f=ql(u.extent)?u.extent:i.nodeExtent,h=Ma(d,f,So(u));c={...i.defaults,...u,measured:{width:u.measured?.width,height:u.measured?.height},internals:{positionAbsolute:h,handleBounds:vM(u,c),z:Xx(u,r,i.zIndexMode),userNode:u}},t.set(u.id,c)}(c.measured===void 0||c.measured.width===void 0||c.measured.height===void 0)&&!c.hidden&&(s=!1),u.parentId&&Eh(c,t,n,o,a)}return s}function bM(e,t){if(!e.parentId)return;let n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function Eh(e,t,n,o,i){let{elevateNodesOnSelect:a,nodeOrigin:l,nodeExtent:r,zIndexMode:s}=xh(Sh,o),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}bM(e,n),i&&!c.parentId&&c.internals.rootParentIndex===void 0&&s==="auto"&&(c.internals.rootParentIndex=++i.i,c.internals.z=c.internals.z+i.i*gM),i&&c.internals.rootParentIndex!==void 0&&(i.i=c.internals.rootParentIndex);let d=a&&!_h(s)?Vx:0,{x:f,y:h,z:v}=SM(e,c,l,r,d,s),{positionAbsolute:b}=e.internals,S=f!==b.x||h!==b.y;(S||v!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:S?{x:f,y:h}:b,z:v}})}function Xx(e,t,n){let o=qn(e.zIndex)?e.zIndex:0;return _h(n)?o:o+(e.selected?t:0)}function SM(e,t,n,o,i,a){let{x:l,y:r}=t.internals.positionAbsolute,s=So(e),u=Gs(e,n),c=ql(e.extent)?Ma(u,e.extent,s):u,d=Ma({x:l+c.x,y:r+c.y},o,s);e.extent==="parent"&&(d=Lx(d,s,t));let f=Xx(e,i,a),h=t.internals.z??0;return{x:d.x,y:d.y,z:h>=f?h+1:f}}function wf(e,t,n,o=[0,0]){let i=[],a=new Map;for(let l of e){let r=t.get(l.parentId);if(!r)continue;let s=a.get(l.parentId)?.expandedRect??Da(r),u=uh(s,l.rect);a.set(l.parentId,{expandedRect:u,parent:r})}return a.size>0&&a.forEach(({expandedRect:l,parent:r},s)=>{let u=r.internals.positionAbsolute,c=So(r),d=r.origin??o,f=l.x<u.x?Math.round(Math.abs(u.x-l.x)):0,h=l.y<u.y?Math.round(Math.abs(u.y-l.y)):0,v=Math.max(c.width,Math.round(l.width)),b=Math.max(c.height,Math.round(l.height)),S=(v-c.width)*d[0],p=(b-c.height)*d[1];(f>0||h>0||S||p)&&(i.push({id:s,type:"position",position:{x:r.position.x-f+S,y:r.position.y-h+p}}),n.get(s)?.forEach(g=>{e.some(m=>m.id===g.id)||i.push({id:g.id,type:"position",position:{x:g.position.x+f,y:g.position.y+h}})})),(c.width<l.width||c.height<l.height||f||h)&&i.push({id:s,type:"dimensions",setAttributes:!0,dimensions:{width:v+(f?d[0]*f-S:0),height:b+(h?d[1]*h-p:0)}})}),i}function qx(e,t,n,o,i,a,l){let r=o?.querySelector(".xyflow__viewport"),s=!1;if(!r)return{changes:[],updatedInternals:s};let u=[],c=window.getComputedStyle(r),{m22:d}=new window.DOMMatrixReadOnly(c.transform),f=[];for(let h of e.values()){let v=t.get(h.id);if(!v)continue;if(v.hidden){t.set(v.id,{...v,internals:{...v.internals,handleBounds:void 0}}),s=!0;continue}let b=xf(h.nodeElement),S=v.measured.width!==b.width||v.measured.height!==b.height;if(!!(b.width&&b.height&&(S||!v.internals.handleBounds||h.force))){let g=h.nodeElement.getBoundingClientRect(),m=ql(v.extent)?v.extent:a,{positionAbsolute:y}=v.internals;v.parentId&&v.extent==="parent"?y=Lx(y,b,t.get(v.parentId)):m&&(y=Ma(y,m,b));let x={...v,measured:b,internals:{...v.internals,positionAbsolute:y,handleBounds:{source:bx("source",h.nodeElement,g,d,v.id),target:bx("target",h.nodeElement,g,d,v.id)}}};t.set(v.id,x),v.parentId&&Eh(x,t,n,{nodeOrigin:i,zIndexMode:l}),s=!0,S&&(u.push({id:v.id,type:"dimensions",dimensions:b}),v.expandParent&&v.parentId&&f.push({id:v.id,parentId:v.parentId,rect:Da(x,i)}))}}if(f.length>0){let h=wf(f,t,n,i);u.push(...h)}return{changes:u,updatedInternals:s}}async function Zx({delta:e,panZoom:t,transform:n,translateExtent:o,width:i,height:a}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);let l=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[i,a]],o),r=!!l&&(l.x!==n[0]||l.y!==n[1]||l.k!==n[2]);return Promise.resolve(r)}function Cx(e,t,n,o,i,a){let l=i,r=o.get(l)||new Map;o.set(l,r.set(n,t)),l=`${i}-${e}`;let s=o.get(l)||new Map;if(o.set(l,s.set(n,t)),a){l=`${i}-${e}-${a}`;let u=o.get(l)||new Map;o.set(l,u.set(n,t))}}function Th(e,t,n){e.clear(),t.clear();for(let o of n){let{source:i,target:a,sourceHandle:l=null,targetHandle:r=null}=o,s={edgeId:o.id,source:i,target:a,sourceHandle:l,targetHandle:r},u=`${i}-${l}--${a}-${r}`,c=`${a}-${r}--${i}-${l}`;Cx("source",s,c,e,i,l),Cx("target",s,u,e,a,r),t.set(o.id,o)}}function jx(e,t){if(!e.parentId)return!1;let n=t.get(e.parentId);return n?n.selected?!0:jx(n,t):!1}function wx(e,t,n){let o=e;do{if(o?.matches?.(t))return!0;if(o===n)return!1;o=o?.parentElement}while(o);return!1}function xM(e,t,n,o){let i=new Map;for(let[a,l]of e)if((l.selected||l.id===o)&&(!l.parentId||!jx(l,e))&&(l.draggable||t&&typeof l.draggable>"u")){let r=e.get(a);r&&i.set(a,{id:a,position:r.position||{x:0,y:0},distance:{x:n.x-r.internals.positionAbsolute.x,y:n.y-r.internals.positionAbsolute.y},extent:r.extent,parentId:r.parentId,origin:r.origin,expandParent:r.expandParent,internals:{positionAbsolute:r.internals.positionAbsolute||{x:0,y:0}},measured:{width:r.measured.width??0,height:r.measured.height??0}})}return i}function Qm({nodeId:e,dragItems:t,nodeLookup:n,dragging:o=!0}){let i=[];for(let[l,r]of t){let s=n.get(l)?.internals.userNode;s&&i.push({...s,position:r.position,dragging:o})}if(!e)return[i[0],i];let a=n.get(e)?.internals.userNode;return[a?{...a,position:t.get(e)?.position||a.position,dragging:o}:i[0],i]}function _M({dragItems:e,snapGrid:t,x:n,y:o}){let i=e.values().next().value;if(!i)return null;let a={x:n-i.distance.x,y:o-i.distance.y},l=Fl(a,t);return{x:l.x-a.x,y:l.y-a.y}}function $x({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:o,onDragStop:i}){let a={x:null,y:null},l=0,r=new Map,s=!1,u={x:0,y:0},c=null,d=!1,f=null,h=!1,v=!1,b=null;function S({noDragClassName:g,handleSelector:m,domNode:y,isSelectable:x,nodeId:_,nodeClickDistance:E=0}){f=Ct(y);function C({x:z,y:I}){let{nodeLookup:T,nodeExtent:D,snapGrid:N,snapToGrid:O,nodeOrigin:R,onNodeDrag:L,onSelectionDrag:V,onError:k,updateNodePositions:G}=t();a={x:z,y:I};let q=!1,Z=r.size>1,j=Z&&D?eh(jl(r)):null,se=Z&&O?_M({dragItems:r,snapGrid:N,x:z,y:I}):null;for(let[ee,X]of r){if(!T.has(ee))continue;let Q={x:z-X.distance.x,y:I-X.distance.y};O&&(Q=se?{x:Math.round(Q.x+se.x),y:Math.round(Q.y+se.y)}:Fl(Q,N));let ue=null;if(Z&&D&&!X.extent&&j){let{positionAbsolute:te}=X.internals,Te=te.x-j.x+D[0][0],de=te.x+X.measured.width-j.x2+D[1][0],be=te.y-j.y+D[0][1],Le=te.y+X.measured.height-j.y2+D[1][1];ue=[[Te,be],[de,Le]]}let{position:ge,positionAbsolute:ie}=sh({nodeId:ee,nextPosition:Q,nodeLookup:T,nodeExtent:ue||D,nodeOrigin:R,onError:k});q=q||X.position.x!==ge.x||X.position.y!==ge.y,X.position=ge,X.internals.positionAbsolute=ie}if(v=v||q,!!q&&(G(r,!0),b&&(o||L||!_&&V))){let[ee,X]=Qm({nodeId:_,dragItems:r,nodeLookup:T});o?.(b,r,ee,X),L?.(b,ee,X),_||V?.(b,X)}}async function A(){if(!c)return;let{transform:z,panBy:I,autoPanSpeed:T,autoPanOnNodeDrag:D}=t();if(!D){s=!1,cancelAnimationFrame(l);return}let[N,O]=Bx(u,c,T);(N!==0||O!==0)&&(a.x=(a.x??0)-N/z[2],a.y=(a.y??0)-O/z[2],await I({x:N,y:O})&&C(a)),l=requestAnimationFrame(A)}function B(z){let{nodeLookup:I,multiSelectionActive:T,nodesDraggable:D,transform:N,snapGrid:O,snapToGrid:R,selectNodesOnDrag:L,onNodeDragStart:V,onSelectionDragStart:k,unselectNodesAndEdges:G}=t();d=!0,(!L||!x)&&!T&&_&&(I.get(_)?.selected||G()),x&&L&&_&&e?.(_);let q=Ps(z.sourceEvent,{transform:N,snapGrid:O,snapToGrid:R,containerBounds:c});if(a=q,r=xM(I,D,q,_),r.size>0&&(n||V||!_&&k)){let[Z,j]=Qm({nodeId:_,dragItems:r,nodeLookup:I});n?.(z.sourceEvent,r,Z,j),V?.(z.sourceEvent,Z,j),_||k?.(z.sourceEvent,j)}}let M=Zc().clickDistance(E).on("start",z=>{let{domNode:I,nodeDragThreshold:T,transform:D,snapGrid:N,snapToGrid:O}=t();c=I?.getBoundingClientRect()||null,h=!1,v=!1,b=z.sourceEvent,T===0&&B(z),a=Ps(z.sourceEvent,{transform:D,snapGrid:N,snapToGrid:O,containerBounds:c}),u=Zn(z.sourceEvent,c)}).on("drag",z=>{let{autoPanOnNodeDrag:I,transform:T,snapGrid:D,snapToGrid:N,nodeDragThreshold:O,nodeLookup:R}=t(),L=Ps(z.sourceEvent,{transform:T,snapGrid:D,snapToGrid:N,containerBounds:c});if(b=z.sourceEvent,(z.sourceEvent.type==="touchmove"&&z.sourceEvent.touches.length>1||_&&!R.has(_))&&(h=!0),!h){if(!s&&I&&d&&(s=!0,A()),!d){let V=Zn(z.sourceEvent,c),k=V.x-u.x,G=V.y-u.y;Math.sqrt(k*k+G*G)>O&&B(z)}(a.x!==L.xSnapped||a.y!==L.ySnapped)&&r&&d&&(u=Zn(z.sourceEvent,c),C(L))}}).on("end",z=>{if(!(!d||h)&&(s=!1,d=!1,cancelAnimationFrame(l),r.size>0)){let{nodeLookup:I,updateNodePositions:T,onNodeDragStop:D,onSelectionDragStop:N}=t();if(v&&(T(r,!1),v=!1),i||D||!_&&N){let[O,R]=Qm({nodeId:_,dragItems:r,nodeLookup:I,dragging:!1});i?.(z.sourceEvent,r,O,R),D?.(z.sourceEvent,O,R),_||N?.(z.sourceEvent,R)}}}).filter(z=>{let I=z.target;return!z.button&&(!g||!wx(I,`.${g}`,y))&&(!m||wx(I,m,y))});f.call(M)}function p(){f?.on(".drag",null)}return{update:S,destroy:p}}function EM(e,t,n){let o=[],i={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(let a of t.values())$l(i,Da(a))>0&&o.push(a);return o}var TM=250;function NM(e,t,n,o){let i=[],a=1/0,l=EM(e,n,t+TM);for(let r of l){let s=[...r.internals.handleBounds?.source??[],...r.internals.handleBounds?.target??[]];for(let u of s){if(o.nodeId===u.nodeId&&o.type===u.type&&o.id===u.id)continue;let{x:c,y:d}=$i(r,u,u.position,!0),f=Math.sqrt(Math.pow(c-e.x,2)+Math.pow(d-e.y,2));f>t||(f<a?(i=[{...u,x:c,y:d}],a=f):f===a&&i.push({...u,x:c,y:d}))}}if(!i.length)return null;if(i.length>1){let r=o.type==="source"?"target":"source";return i.find(s=>s.type===r)??i[0]}return i[0]}function Fx(e,t,n,o,i,a=!1){let l=o.get(e);if(!l)return null;let r=i==="strict"?l.internals.handleBounds?.[t]:[...l.internals.handleBounds?.source??[],...l.internals.handleBounds?.target??[]],s=(n?r?.find(u=>u.id===n):r?.[0])??null;return s&&a?{...s,...$i(l,s,s.position,!0)}:s}function Kx(e,t){return e||(t?.classList.contains("target")?"target":t?.classList.contains("source")?"source":null)}function CM(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}var Qx=()=>!0;function wM(e,{connectionMode:t,connectionRadius:n,handleId:o,nodeId:i,edgeUpdaterType:a,isTarget:l,domNode:r,nodeLookup:s,lib:u,autoPanOnConnect:c,flowId:d,panBy:f,cancelConnection:h,onConnectStart:v,onConnect:b,onConnectEnd:S,isValidConnection:p=Qx,onReconnectEnd:g,updateConnection:m,getTransform:y,getFromHandle:x,autoPanSpeed:_,dragThreshold:E=1,handleDomNode:C}){let A=hh(e.target),B=0,M,{x:z,y:I}=Zn(e),T=Kx(a,C),D=r?.getBoundingClientRect(),N=!1;if(!D||!T)return;let O=Fx(i,T,o,s,t);if(!O)return;let R=Zn(e,D),L=!1,V=null,k=!1,G=null;function q(){if(!c||!D)return;let[ge,ie]=Bx(R,D,_);f({x:ge,y:ie}),B=requestAnimationFrame(q)}let Z={...O,nodeId:i,type:T,position:O.position},j=s.get(i),ee={inProgress:!0,isValid:null,from:$i(j,Z,W.Left,!0),fromHandle:Z,fromPosition:Z.position,fromNode:j,to:R,toHandle:null,toPosition:yx[Z.position],toNode:null,pointer:R};function X(){N=!0,m(ee),v?.(e,{nodeId:i,handleId:o,handleType:T})}E===0&&X();function Q(ge){if(!N){let{x:Le,y:Be}=Zn(ge),dt=Le-z,Gt=Be-I;if(!(dt*dt+Gt*Gt>E*E))return;X()}if(!x()||!Z){ue(ge);return}let ie=y();R=Zn(ge,D),M=NM(Kl(R,ie,!1,[1,1]),n,s,Z),L||(q(),L=!0);let te=Wx(ge,{handle:M,connectionMode:t,fromNodeId:i,fromHandleId:o,fromType:l?"target":"source",isValidConnection:p,doc:A,lib:u,flowId:d,nodeLookup:s});G=te.handleDomNode,V=te.connection,k=CM(!!M,te.isValid);let Te=s.get(i),de=Te?$i(Te,Z,W.Left,!0):ee.from,be={...ee,from:de,isValid:k,to:te.toHandle&&k?ks({x:te.toHandle.x,y:te.toHandle.y},ie):R,toHandle:te.toHandle,toPosition:k&&te.toHandle?te.toHandle.position:yx[Z.position],toNode:te.toHandle?s.get(te.toHandle.nodeId):null,pointer:R};m(be),ee=be}function ue(ge){if(!("touches"in ge&&ge.touches.length>0)){if(N){(M||G)&&V&&k&&b?.(V);let{inProgress:ie,...te}=ee,Te={...te,toPosition:ee.toHandle?ee.toPosition:null};S?.(ge,Te),a&&g?.(ge,Te)}h(),cancelAnimationFrame(B),L=!1,k=!1,V=null,G=null,A.removeEventListener("mousemove",Q),A.removeEventListener("mouseup",ue),A.removeEventListener("touchmove",Q),A.removeEventListener("touchend",ue)}}A.addEventListener("mousemove",Q),A.addEventListener("mouseup",ue),A.addEventListener("touchmove",Q),A.addEventListener("touchend",ue)}function Wx(e,{handle:t,connectionMode:n,fromNodeId:o,fromHandleId:i,fromType:a,doc:l,lib:r,flowId:s,isValidConnection:u=Qx,nodeLookup:c}){let d=a==="target",f=t?l.querySelector(`.${r}-flow__handle[data-id="${s}-${t?.nodeId}-${t?.id}-${t?.type}"]`):null,{x:h,y:v}=Zn(e),b=l.elementFromPoint(h,v),S=b?.classList.contains(`${r}-flow__handle`)?b:f,p={handleDomNode:S,isValid:!1,connection:null,toHandle:null};if(S){let g=Kx(void 0,S),m=S.getAttribute("data-nodeid"),y=S.getAttribute("data-handleid"),x=S.classList.contains("connectable"),_=S.classList.contains("connectableend");if(!m||!g)return p;let E={source:d?m:o,sourceHandle:d?y:i,target:d?o:m,targetHandle:d?i:y};p.connection=E;let A=x&&_&&(n===ji.Strict?d&&g==="source"||!d&&g==="target":m!==o||y!==i);p.isValid=A&&u(E),p.toHandle=Fx(m,g,y,c,n,!0)}return p}var Af={onPointerDown:wM,isValid:Wx};function Jx({domNode:e,panZoom:t,getTransform:n,getViewScale:o}){let i=Ct(e);function a({translateExtent:r,width:s,height:u,zoomStep:c=1,pannable:d=!0,zoomable:f=!0,inversePan:h=!1}){let v=m=>{if(m.sourceEvent.type!=="wheel"||!t)return;let y=n(),x=m.sourceEvent.ctrlKey&&Ql()?10:1,_=-m.sourceEvent.deltaY*(m.sourceEvent.deltaMode===1?.05:m.sourceEvent.deltaMode?1:.002)*c,E=y[2]*Math.pow(2,_*x);t.scaleTo(E)},b=[0,0],S=m=>{(m.sourceEvent.type==="mousedown"||m.sourceEvent.type==="touchstart")&&(b=[m.sourceEvent.clientX??m.sourceEvent.touches[0].clientX,m.sourceEvent.clientY??m.sourceEvent.touches[0].clientY])},p=m=>{let y=n();if(m.sourceEvent.type!=="mousemove"&&m.sourceEvent.type!=="touchmove"||!t)return;let x=[m.sourceEvent.clientX??m.sourceEvent.touches[0].clientX,m.sourceEvent.clientY??m.sourceEvent.touches[0].clientY],_=[x[0]-b[0],x[1]-b[1]];b=x;let E=o()*Math.max(y[2],Math.log(y[2]))*(h?-1:1),C={x:y[0]-_[0]*E,y:y[1]-_[1]*E},A=[[0,0],[s,u]];t.setViewportConstrained({x:C.x,y:C.y,zoom:y[2]},A,r)},g=mf().on("start",S).on("zoom",d?p:null).on("zoom.wheel",f?v:null);i.call(g,{})}function l(){i.on("zoom",null)}return{update:a,destroy:l,pointer:Xt}}var Mf=e=>({x:e.x,y:e.y,zoom:e.k}),Wm=({x:e,y:t,zoom:n})=>wa.translate(e,t).scale(n),Vl=(e,t)=>e.target.closest(`.${t}`),e_=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),AM=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,Jm=(e,t=0,n=AM,o=()=>{})=>{let i=typeof t=="number"&&t>0;return i||o(),i?e.transition().duration(t).ease(n).on("end",o):e},t_=e=>{let t=e.ctrlKey&&Ql()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function MM({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:o,panOnScrollMode:i,panOnScrollSpeed:a,zoomOnPinch:l,onPanZoomStart:r,onPanZoom:s,onPanZoomEnd:u}){return c=>{if(Vl(c,t))return c.ctrlKey&&c.preventDefault(),!1;c.preventDefault(),c.stopImmediatePropagation();let d=n.property("__zoom").k||1;if(c.ctrlKey&&l){let S=Xt(c),p=t_(c),g=d*Math.pow(2,p);o.scaleTo(n,g,S,c);return}let f=c.deltaMode===1?20:1,h=i===ni.Vertical?0:c.deltaX*f,v=i===ni.Horizontal?0:c.deltaY*f;!Ql()&&c.shiftKey&&i!==ni.Vertical&&(h=c.deltaY*f,v=0),o.translateBy(n,-(h/d)*a,-(v/d)*a,{internal:!0});let b=Mf(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(s?.(c,b),e.panScrollTimeout=setTimeout(()=>{u?.(c,b),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,r?.(c,b))}}function DM({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(o,i){let a=o.type==="wheel",l=!t&&a&&!o.ctrlKey,r=Vl(o,e);if(o.ctrlKey&&a&&r&&o.preventDefault(),l||r)return null;o.preventDefault(),n.call(this,o,i)}}function RM({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return o=>{if(o.sourceEvent?.internal)return;let i=Mf(o.transform);e.mouseButton=o.sourceEvent?.button||0,e.isZoomingOrPanning=!0,e.prevViewport=i,o.sourceEvent?.type==="mousedown"&&t(!0),n&&n?.(o.sourceEvent,i)}}function OM({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:o,onPanZoom:i}){return a=>{e.usedRightMouseButton=!!(n&&e_(t,e.mouseButton??0)),a.sourceEvent?.sync||o([a.transform.x,a.transform.y,a.transform.k]),i&&!a.sourceEvent?.internal&&i?.(a.sourceEvent,Mf(a.transform))}}function zM({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:o,onPanZoomEnd:i,onPaneContextMenu:a}){return l=>{if(!l.sourceEvent?.internal&&(e.isZoomingOrPanning=!1,a&&e_(t,e.mouseButton??0)&&!e.usedRightMouseButton&&l.sourceEvent&&a(l.sourceEvent),e.usedRightMouseButton=!1,o(!1),i)){let r=Mf(l.transform);e.prevViewport=r,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{i?.(l.sourceEvent,r)},n?150:0)}}}function LM({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:o,panOnScroll:i,zoomOnDoubleClick:a,userSelectionActive:l,noWheelClassName:r,noPanClassName:s,lib:u,connectionInProgress:c}){return d=>{let f=e||t,h=n&&d.ctrlKey,v=d.type==="wheel";if(d.button===1&&d.type==="mousedown"&&(Vl(d,`${u}-flow__node`)||Vl(d,`${u}-flow__edge`)))return!0;if(!o&&!f&&!i&&!a&&!n||l||c&&!v||Vl(d,r)&&v||Vl(d,s)&&(!v||i&&v&&!e)||!n&&d.ctrlKey&&v)return!1;if(!n&&d.type==="touchstart"&&d.touches?.length>1)return d.preventDefault(),!1;if(!f&&!i&&!h&&v||!o&&(d.type==="mousedown"||d.type==="touchstart")||Array.isArray(o)&&!o.includes(d.button)&&d.type==="mousedown")return!1;let b=Array.isArray(o)&&o.includes(d.button)||!d.button||d.button<=1;return(!d.ctrlKey||v)&&b}}function n_({domNode:e,minZoom:t,maxZoom:n,translateExtent:o,viewport:i,onPanZoom:a,onPanZoomStart:l,onPanZoomEnd:r,onDraggingChange:s}){let u={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{x:0,y:0,zoom:0},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},c=e.getBoundingClientRect(),d=mf().scaleExtent([t,n]).translateExtent(o),f=Ct(e).call(d);g({x:i.x,y:i.y,zoom:Xl(i.zoom,t,n)},[[0,0],[c.width,c.height]],o);let h=f.on("wheel.zoom"),v=f.on("dblclick.zoom");d.wheelDelta(t_);function b(M,z){return f?new Promise(I=>{d?.interpolate(z?.interpolate==="linear"?ei:Ta).transform(Jm(f,z?.duration,z?.ease,()=>I(!0)),M)}):Promise.resolve(!1)}function S({noWheelClassName:M,noPanClassName:z,onPaneContextMenu:I,userSelectionActive:T,panOnScroll:D,panOnDrag:N,panOnScrollMode:O,panOnScrollSpeed:R,preventScrolling:L,zoomOnPinch:V,zoomOnScroll:k,zoomOnDoubleClick:G,zoomActivationKeyPressed:q,lib:Z,onTransformChange:j,connectionInProgress:se,paneClickDistance:ee,selectionOnDrag:X}){T&&!u.isZoomingOrPanning&&p();let Q=D&&!q&&!T;d.clickDistance(X?1/0:!qn(ee)||ee<0?0:ee);let ue=Q?MM({zoomPanValues:u,noWheelClassName:M,d3Selection:f,d3Zoom:d,panOnScrollMode:O,panOnScrollSpeed:R,zoomOnPinch:V,onPanZoomStart:l,onPanZoom:a,onPanZoomEnd:r}):DM({noWheelClassName:M,preventScrolling:L,d3ZoomHandler:h});if(f.on("wheel.zoom",ue,{passive:!1}),!T){let ie=RM({zoomPanValues:u,onDraggingChange:s,onPanZoomStart:l});d.on("start",ie);let te=OM({zoomPanValues:u,panOnDrag:N,onPaneContextMenu:!!I,onPanZoom:a,onTransformChange:j});d.on("zoom",te);let Te=zM({zoomPanValues:u,panOnDrag:N,panOnScroll:D,onPaneContextMenu:I,onPanZoomEnd:r,onDraggingChange:s});d.on("end",Te)}let ge=LM({zoomActivationKeyPressed:q,panOnDrag:N,zoomOnScroll:k,panOnScroll:D,zoomOnDoubleClick:G,zoomOnPinch:V,userSelectionActive:T,noPanClassName:z,noWheelClassName:M,lib:Z,connectionInProgress:se});d.filter(ge),G?f.on("dblclick.zoom",v):f.on("dblclick.zoom",null)}function p(){d.on("zoom",null)}async function g(M,z,I){let T=Wm(M),D=d?.constrain()(T,z,I);return D&&await b(D),new Promise(N=>N(D))}async function m(M,z){let I=Wm(M);return await b(I,z),new Promise(T=>T(I))}function y(M){if(f){let z=Wm(M),I=f.property("__zoom");(I.k!==M.zoom||I.x!==M.x||I.y!==M.y)&&d?.transform(f,z,null,{sync:!0})}}function x(){let M=f?Hs(f.node()):{x:0,y:0,k:1};return{x:M.x,y:M.y,zoom:M.k}}function _(M,z){return f?new Promise(I=>{d?.interpolate(z?.interpolate==="linear"?ei:Ta).scaleTo(Jm(f,z?.duration,z?.ease,()=>I(!0)),M)}):Promise.resolve(!1)}function E(M,z){return f?new Promise(I=>{d?.interpolate(z?.interpolate==="linear"?ei:Ta).scaleBy(Jm(f,z?.duration,z?.ease,()=>I(!0)),M)}):Promise.resolve(!1)}function C(M){d?.scaleExtent(M)}function A(M){d?.translateExtent(M)}function B(M){let z=!qn(M)||M<0?0:M;d?.clickDistance(z)}return{update:S,destroy:p,setViewport:m,setViewportConstrained:g,getViewport:x,scaleTo:_,scaleBy:E,setScaleExtent:C,setTranslateExtent:A,syncViewport:y,setClickDistance:B}}var Fi;(function(e){e.Line="line",e.Handle="handle"})(Fi||(Fi={}));function BM({width:e,prevWidth:t,height:n,prevHeight:o,affectsX:i,affectsY:a}){let l=e-t,r=n-o,s=[l>0?1:l<0?-1:0,r>0?1:r<0?-1:0];return l&&i&&(s[0]=s[0]*-1),r&&a&&(s[1]=s[1]*-1),s}function Ax(e){let t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),o=e.includes("left"),i=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:o,affectsY:i}}function qi(e,t){return Math.max(0,t-e)}function Zi(e,t){return Math.max(0,e-t)}function gf(e,t,n){return Math.max(0,t-e,e-n)}function Mx(e,t){return e?!t:t}function HM(e,t,n,o,i,a,l,r){let{affectsX:s,affectsY:u}=t,{isHorizontal:c,isVertical:d}=t,f=c&&d,{xSnapped:h,ySnapped:v}=n,{minWidth:b,maxWidth:S,minHeight:p,maxHeight:g}=o,{x:m,y,width:x,height:_,aspectRatio:E}=e,C=Math.floor(c?h-e.pointerX:0),A=Math.floor(d?v-e.pointerY:0),B=x+(s?-C:C),M=_+(u?-A:A),z=-a[0]*x,I=-a[1]*_,T=gf(B,b,S),D=gf(M,p,g);if(l){let R=0,L=0;s&&C<0?R=qi(m+C+z,l[0][0]):!s&&C>0&&(R=Zi(m+B+z,l[1][0])),u&&A<0?L=qi(y+A+I,l[0][1]):!u&&A>0&&(L=Zi(y+M+I,l[1][1])),T=Math.max(T,R),D=Math.max(D,L)}if(r){let R=0,L=0;s&&C>0?R=Zi(m+C,r[0][0]):!s&&C<0&&(R=qi(m+B,r[1][0])),u&&A>0?L=Zi(y+A,r[0][1]):!u&&A<0&&(L=qi(y+M,r[1][1])),T=Math.max(T,R),D=Math.max(D,L)}if(i){if(c){let R=gf(B/E,p,g)*E;if(T=Math.max(T,R),l){let L=0;!s&&!u||s&&!u&&f?L=Zi(y+I+B/E,l[1][1])*E:L=qi(y+I+(s?C:-C)/E,l[0][1])*E,T=Math.max(T,L)}if(r){let L=0;!s&&!u||s&&!u&&f?L=qi(y+B/E,r[1][1])*E:L=Zi(y+(s?C:-C)/E,r[0][1])*E,T=Math.max(T,L)}}if(d){let R=gf(M*E,b,S)/E;if(D=Math.max(D,R),l){let L=0;!s&&!u||u&&!s&&f?L=Zi(m+M*E+z,l[1][0])/E:L=qi(m+(u?A:-A)*E+z,l[0][0])/E,D=Math.max(D,L)}if(r){let L=0;!s&&!u||u&&!s&&f?L=qi(m+M*E,r[1][0])/E:L=Zi(m+(u?A:-A)*E,r[0][0])/E,D=Math.max(D,L)}}}A=A+(A<0?D:-D),C=C+(C<0?T:-T),i&&(f?B>M*E?A=(Mx(s,u)?-C:C)/E:C=(Mx(s,u)?-A:A)*E:c?(A=C/E,u=s):(C=A*E,s=u));let N=s?m+C:m,O=u?y+A:y;return{width:x+(s?-C:C),height:_+(u?-A:A),x:a[0]*C*(s?-1:1)+N,y:a[1]*A*(u?-1:1)+O}}var o_={width:0,height:0,x:0,y:0},PM={...o_,pointerX:0,pointerY:0,aspectRatio:1};function kM(e){return[[0,0],[e.measured.width,e.measured.height]]}function GM(e,t,n){let o=t.position.x+e.position.x,i=t.position.y+e.position.y,a=e.measured.width??0,l=e.measured.height??0,r=n[0]*a,s=n[1]*l;return[[o-r,i-s],[o+a-r,i+l-s]]}function i_({domNode:e,nodeId:t,getStoreItems:n,onChange:o,onEnd:i}){let a=Ct(e),l={controlDirection:Ax("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function r({controlPosition:u,boundaries:c,keepAspectRatio:d,resizeDirection:f,onResizeStart:h,onResize:v,onResizeEnd:b,shouldResize:S}){let p={...o_},g={...PM};l={boundaries:c,resizeDirection:f,keepAspectRatio:d,controlDirection:Ax(u)};let m,y=null,x=[],_,E,C,A=!1,B=Zc().on("start",M=>{let{nodeLookup:z,transform:I,snapGrid:T,snapToGrid:D,nodeOrigin:N,paneDomNode:O}=n();if(m=z.get(t),!m)return;y=O?.getBoundingClientRect()??null;let{xSnapped:R,ySnapped:L}=Ps(M.sourceEvent,{transform:I,snapGrid:T,snapToGrid:D,containerBounds:y});p={width:m.measured.width??0,height:m.measured.height??0,x:m.position.x??0,y:m.position.y??0},g={...p,pointerX:R,pointerY:L,aspectRatio:p.width/p.height},_=void 0,m.parentId&&(m.extent==="parent"||m.expandParent)&&(_=z.get(m.parentId),E=_&&m.extent==="parent"?kM(_):void 0),x=[],C=void 0;for(let[V,k]of z)if(k.parentId===t&&(x.push({id:V,position:{...k.position},extent:k.extent}),k.extent==="parent"||k.expandParent)){let G=GM(k,m,k.origin??N);C?C=[[Math.min(G[0][0],C[0][0]),Math.min(G[0][1],C[0][1])],[Math.max(G[1][0],C[1][0]),Math.max(G[1][1],C[1][1])]]:C=G}h?.(M,{...p})}).on("drag",M=>{let{transform:z,snapGrid:I,snapToGrid:T,nodeOrigin:D}=n(),N=Ps(M.sourceEvent,{transform:z,snapGrid:I,snapToGrid:T,containerBounds:y}),O=[];if(!m)return;let{x:R,y:L,width:V,height:k}=p,G={},q=m.origin??D,{width:Z,height:j,x:se,y:ee}=HM(g,l.controlDirection,N,l.boundaries,l.keepAspectRatio,q,E,C),X=Z!==V,Q=j!==k,ue=se!==R&&X,ge=ee!==L&&Q;if(!ue&&!ge&&!X&&!Q)return;if((ue||ge||q[0]===1||q[1]===1)&&(G.x=ue?se:p.x,G.y=ge?ee:p.y,p.x=G.x,p.y=G.y,x.length>0)){let de=se-R,be=ee-L;for(let Le of x)Le.position={x:Le.position.x-de+q[0]*(Z-V),y:Le.position.y-be+q[1]*(j-k)},O.push(Le)}if((X||Q)&&(G.width=X&&(!l.resizeDirection||l.resizeDirection==="horizontal")?Z:p.width,G.height=Q&&(!l.resizeDirection||l.resizeDirection==="vertical")?j:p.height,p.width=G.width,p.height=G.height),_&&m.expandParent){let de=q[0]*(G.width??0);G.x&&G.x<de&&(p.x=de,g.x=g.x-(G.x-de));let be=q[1]*(G.height??0);G.y&&G.y<be&&(p.y=be,g.y=g.y-(G.y-be))}let ie=BM({width:p.width,prevWidth:V,height:p.height,prevHeight:k,affectsX:l.controlDirection.affectsX,affectsY:l.controlDirection.affectsY}),te={...p,direction:ie};S?.(M,te)!==!1&&(A=!0,v?.(M,te),o(G,O))}).on("end",M=>{A&&(b?.(M,{...p}),i?.({...p}),A=!1)});a.call(B)}function s(){a.on(".drag",null)}return{update:r,destroy:s}}var y_=ne(At(),1),v_=ne(d_(),1);var m_={},p_=e=>{let t,n=new Set,o=(c,d)=>{let f=typeof c=="function"?c(t):c;if(!Object.is(f,t)){let h=t;t=d??(typeof f!="object"||f===null)?f:Object.assign({},t,f),n.forEach(v=>v(t,h))}},i=()=>t,s={setState:o,getState:i,getInitialState:()=>u,subscribe:c=>(n.add(c),()=>n.delete(c)),destroy:()=>{(m_.env?m_.env.MODE: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(o,i,s);return s},h_=e=>e?p_(e):p_;var{useDebugValue:oD}=y_.default,{useSyncExternalStoreWithSelector:iD}=v_.default,aD=e=>e;function Ch(e,t=aD,n){let o=iD(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return oD(o),o}var g_=(e,t)=>{let n=h_(e),o=(i,a=t)=>Ch(n,i,a);return Object.assign(o,n),o},b_=(e,t)=>e?g_(e,t):g_;function je(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(let[o,i]of e)if(!Object.is(i,t.get(o)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let o of e)if(!t.has(o))return!1;return!0}let n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let o of n)if(!Object.prototype.hasOwnProperty.call(t,o)||!Object.is(e[o],t[o]))return!1;return!0}var lD=ne(fd()),Lf=(0,P.createContext)(null),rD=Lf.Provider,Y_=An.error001();function Ae(e,t){let n=(0,P.useContext)(Lf);if(n===null)throw new Error(Y_);return Ch(n,e,t)}function Qe(){let e=(0,P.useContext)(Lf);if(e===null)throw new Error(Y_);return(0,P.useMemo)(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}var S_={display:"none"},sD={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},X_="react-flow__node-desc",q_="react-flow__edge-desc",uD="react-flow__aria-live",cD=e=>e.ariaLiveMessage,fD=e=>e.ariaLabelConfig;function dD({rfId:e}){let t=Ae(cD);return(0,H.jsx)("div",{id:`${uD}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:sD,children:t})}function pD({rfId:e,disableKeyboardA11y:t}){let n=Ae(fD);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)("div",{id:`${X_}-${e}`,style:S_,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),(0,H.jsx)("div",{id:`${q_}-${e}`,style:S_,children:n["edge.a11yDescription.default"]}),!t&&(0,H.jsx)(dD,{rfId:e})]})}var er=(0,P.forwardRef)(({position:e="top-left",children:t,className:n,style:o,...i},a)=>{let l=`${e}`.split("-");return(0,H.jsx)("div",{className:ot(["react-flow__panel",n,...l]),style:o,ref:a,...i,children:t})});er.displayName="Panel";function mD({proOptions:e,position:t="bottom-right"}){return e?.hideAttribution?null:(0,H.jsx)(er,{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:(0,H.jsx)("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}var hD=e=>{let t=[],n=[];for(let[,o]of e.nodeLookup)o.selected&&t.push(o.internals.userNode);for(let[,o]of e.edgeLookup)o.selected&&n.push(o);return{selectedNodes:t,selectedEdges:n}},Rf=e=>e.id;function gD(e,t){return je(e.selectedNodes.map(Rf),t.selectedNodes.map(Rf))&&je(e.selectedEdges.map(Rf),t.selectedEdges.map(Rf))}function yD({onSelectionChange:e}){let t=Qe(),{selectedNodes:n,selectedEdges:o}=Ae(hD,gD);return(0,P.useEffect)(()=>{let i={nodes:n,edges:o};e?.(i),t.getState().onSelectionChangeHandlers.forEach(a=>a(i))},[n,o,e]),null}var vD=e=>!!e.onSelectionChangeHandlers;function bD({onSelectionChange:e}){let t=Ae(vD);return e||t?(0,H.jsx)(yD,{onSelectionChange:e}):null}var Z_=[0,0],SD={x:0,y:0,zoom:1},xD=["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"],x_=[...xD,"rfId"],_D=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}),__={translateExtent:Zl,nodeOrigin:Z_,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function ED(e){let{setNodes:t,setEdges:n,setMinZoom:o,setMaxZoom:i,setTranslateExtent:a,setNodeExtent:l,reset:r,setDefaultNodesAndEdges:s}=Ae(_D,je),u=Qe();(0,P.useEffect)(()=>(s(e.defaultNodes,e.defaultEdges),()=>{c.current=__,r()}),[]);let c=(0,P.useRef)(__);return(0,P.useEffect)(()=>{for(let d of x_){let f=e[d],h=c.current[d];f!==h&&(typeof e[d]>"u"||(d==="nodes"?t(f):d==="edges"?n(f):d==="minZoom"?o(f):d==="maxZoom"?i(f):d==="translateExtent"?a(f):d==="nodeExtent"?l(f):d==="ariaLabelConfig"?u.setState({ariaLabelConfig:Px(f)}):d==="fitView"?u.setState({fitViewQueued:f}):d==="fitViewOptions"?u.setState({fitViewOptions:f}):u.setState({[d]:f})))}c.current=e},x_.map(d=>e[d])),null}function E_(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function TD(e){let[t,n]=(0,P.useState)(e==="system"?null:e);return(0,P.useEffect)(()=>{if(e!=="system"){n(e);return}let o=E_(),i=()=>n(o?.matches?"dark":"light");return i(),o?.addEventListener("change",i),()=>{o?.removeEventListener("change",i)}},[e]),t!==null?t:E_()?.matches?"dark":"light"}var T_=typeof document<"u"?document:null;function Vs(e=null,t={target:T_,actInsideInputWithModifier:!0}){let[n,o]=(0,P.useState)(!1),i=(0,P.useRef)(!1),a=(0,P.useRef)(new Set([])),[l,r]=(0,P.useMemo)(()=>{if(e!==null){let u=(Array.isArray(e)?e:[e]).filter(d=>typeof d=="string").map(d=>d.replace("+",`
|
|
10
10
|
`).replace(`
|
|
11
11
|
|
|
12
12
|
`,`
|
|
13
13
|
+`).split(`
|
|
14
|
-
`)),c=u.reduce((d,f)=>d.concat(...f),[]);return[u,c]}return[[],[]]},[e]);return(0,P.useEffect)(()=>{let s=t?.target??M_,u=t?.actInsideInputWithModifier??!0;if(e!==null){let c=h=>{if(i.current=h.ctrlKey||h.metaKey||h.shiftKey||h.altKey,(!i.current||i.current&&!u)&&hh(h))return!1;let b=R_(h.code,r);if(a.current.add(h[b]),D_(l,a.current,!1)){let S=h.composedPath?.()?.[0]||h.target,p=S?.nodeName==="BUTTON"||S?.nodeName==="A";t.preventDefault!==!1&&(i.current||!p)&&h.preventDefault(),o(!0)}},d=h=>{let v=R_(h.code,r);D_(l,a.current,!0)?(o(!1),a.current.clear()):a.current.delete(h[v]),h.key==="Meta"&&a.current.clear(),i.current=!1},f=()=>{a.current.clear(),o(!1)};return s?.addEventListener("keydown",c),s?.addEventListener("keyup",d),window.addEventListener("blur",f),window.addEventListener("contextmenu",f),()=>{s?.removeEventListener("keydown",c),s?.removeEventListener("keyup",d),window.removeEventListener("blur",f),window.removeEventListener("contextmenu",f)}}},[e,o]),n}function D_(e,t,n){return e.filter(o=>n||o.length===t.size).some(o=>o.every(i=>t.has(i)))}function R_(e,t){return t.includes(e)?"code":"key"}var wD=()=>{let e=Qe();return(0,P.useMemo)(()=>({zoomIn:t=>{let{panZoom:n}=e.getState();return n?n.scaleBy(1.2,{duration:t?.duration}):Promise.resolve(!1)},zoomOut:t=>{let{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,{duration:t?.duration}):Promise.resolve(!1)},zoomTo:(t,n)=>{let{panZoom:o}=e.getState();return o?o.scaleTo(t,{duration:n?.duration}):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{let{transform:[o,i,a],panZoom:l}=e.getState();return l?(await l.setViewport({x:t.x??o,y:t.y??i,zoom:t.zoom??a},n),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{let[t,n,o]=e.getState().transform;return{x:t,y:n,zoom:o}},setCenter:async(t,n,o)=>e.getState().setCenter(t,n,o),fitBounds:async(t,n)=>{let{width:o,height:i,minZoom:a,maxZoom:l,panZoom:r}=e.getState(),s=Gs(t,o,i,a,l,n?.padding??.1);return r?(await r.setViewport(s,{duration:n?.duration,ease:n?.ease,interpolate:n?.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(t,n={})=>{let{transform:o,snapGrid:i,snapToGrid:a,domNode:l}=e.getState();if(!l)return t;let{x:r,y:s}=l.getBoundingClientRect(),u={x:t.x-r,y:t.y-s},c=n.snapGrid??i,d=n.snapToGrid??a;return Fl(u,o,d,c)},flowToScreenPosition:t=>{let{transform:n,domNode:o}=e.getState();if(!o)return t;let{x:i,y:a}=o.getBoundingClientRect(),l=Ps(t,n);return{x:l.x+i,y:l.y+a}}}),[])};function W_(e,t){let n=[],o=new Map,i=[];for(let a of e)if(a.type==="add"){i.push(a);continue}else if(a.type==="remove"||a.type==="replace")o.set(a.id,[a]);else{let l=o.get(a.id);l?l.push(a):o.set(a.id,[a])}for(let a of t){let l=o.get(a.id);if(!l){n.push(a);continue}if(l[0].type==="remove")continue;if(l[0].type==="replace"){n.push({...l[0].item});continue}let r={...a};for(let s of l)AD(s,r);n.push(r)}return i.length&&i.forEach(a=>{a.index!==void 0?n.splice(a.index,0,{...a.item}):n.push({...a.item})}),n}function AD(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 J_(e,t){return W_(e,t)}function eE(e,t){return W_(e,t)}function Da(e,t){return{id:e,type:"select",selected:t}}function Wl(e,t=new Set,n=!1){let o=[];for(let[i,a]of e){let l=t.has(i);!(a.selected===void 0&&!l)&&a.selected!==l&&(n&&(a.selected=l),o.push(Da(a.id,l)))}return o}function O_({items:e=[],lookup:t}){let n=[],o=new Map(e.map(i=>[i.id,i]));for(let[i,a]of e.entries()){let l=t.get(a.id),r=l?.internals?.userNode??l;r!==void 0&&r!==a&&n.push({id:a.id,item:a,type:"replace"}),r===void 0&&n.push({item:a,type:"add",index:i})}for(let[i]of t)o.get(i)===void 0&&n.push({id:i,type:"remove"});return n}function z_(e){return{id:e.id,type:"remove"}}var L_=e=>Bx(e),MD=e=>ih(e);function tE(e){return(0,P.forwardRef)(e)}var DD=typeof window<"u"?P.useLayoutEffect:P.useEffect;function B_(e){let[t,n]=(0,P.useState)(BigInt(0)),[o]=(0,P.useState)(()=>RD(()=>n(i=>i+BigInt(1))));return DD(()=>{let i=o.get();i.length&&(e(i),o.reset())},[t]),o}function RD(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}var nE=(0,P.createContext)(null);function OD({children:e}){let t=Qe(),n=(0,P.useCallback)(r=>{let{nodes:s=[],setNodes:u,hasDefaultNodes:c,onNodesChange:d,nodeLookup:f,fitViewQueued:h,onNodesChangeMiddlewareMap:v}=t.getState(),b=s;for(let p of r)b=typeof p=="function"?p(b):p;let S=O_({items:b,lookup:f});for(let p of v.values())S=p(S);c&&u(b),S.length>0?d?.(S):h&&window.requestAnimationFrame(()=>{let{fitViewQueued:p,nodes:y,setNodes:m}=t.getState();p&&m(y)})},[]),o=B_(n),i=(0,P.useCallback)(r=>{let{edges:s=[],setEdges:u,hasDefaultEdges:c,onEdgesChange:d,edgeLookup:f}=t.getState(),h=s;for(let v of r)h=typeof v=="function"?v(h):v;c?u(h):d&&d(O_({items:h,lookup:f}))},[]),a=B_(i),l=(0,P.useMemo)(()=>({nodeQueue:o,edgeQueue:a}),[]);return(0,B.jsx)(nE.Provider,{value:l,children:e})}function zD(){let e=(0,P.useContext)(nE);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}var LD=e=>!!e.panZoom;function Mh(){let e=wD(),t=Qe(),n=zD(),o=Ae(LD),i=(0,P.useMemo)(()=>{let a=d=>t.getState().nodeLookup.get(d),l=d=>{n.nodeQueue.push(d)},r=d=>{n.edgeQueue.push(d)},s=d=>{let{nodeLookup:f,nodeOrigin:h}=t.getState(),v=L_(d)?d:f.get(d.id),b=v.parentId?dh(v.position,v.measured,v.parentId,f,h):v.position,S={...v,position:b,width:v.measured?.width??v.width,height:v.measured?.height??v.height};return Ma(S)},u=(d,f,h={replace:!1})=>{l(v=>v.map(b=>{if(b.id===d){let S=typeof f=="function"?f(b):f;return h.replace&&L_(S)?S:{...b,...S}}return b}))},c=(d,f,h={replace:!1})=>{r(v=>v.map(b=>{if(b.id===d){let S=typeof f=="function"?f(b):f;return h.replace&&MD(S)?S:{...b,...S}}return b}))};return{getNodes:()=>t.getState().nodes.map(d=>({...d})),getNode:d=>a(d)?.internals.userNode,getInternalNode:a,getEdges:()=>{let{edges:d=[]}=t.getState();return d.map(f=>({...f}))},getEdge:d=>t.getState().edgeLookup.get(d),setNodes:l,setEdges:r,addNodes:d=>{let f=Array.isArray(d)?d:[d];n.nodeQueue.push(h=>[...h,...f])},addEdges:d=>{let f=Array.isArray(d)?d:[d];n.edgeQueue.push(h=>[...h,...f])},toObject:()=>{let{nodes:d=[],edges:f=[],transform:h}=t.getState(),[v,b,S]=h;return{nodes:d.map(p=>({...p})),edges:f.map(p=>({...p})),viewport:{x:v,y:b,zoom:S}}},deleteElements:async({nodes:d=[],edges:f=[]})=>{let{nodes:h,edges:v,onNodesDelete:b,onEdgesDelete:S,triggerNodeChanges:p,triggerEdgeChanges:y,onDelete:m,onBeforeDelete:g}=t.getState(),{nodes:x,edges:_}=await kx({nodesToRemove:d,edgesToRemove:f,nodes:h,edges:v,onBeforeDelete:g}),E=_.length>0,w=x.length>0;if(E){let C=_.map(z_);S?.(_),y(C)}if(w){let C=x.map(z_);b?.(x),p(C)}return(w||E)&&m?.({nodes:x,edges:_}),{deletedNodes:x,deletedEdges:_}},getIntersectingNodes:(d,f=!0,h)=>{let v=uh(d),b=v?d:s(d),S=h!==void 0;return b?(h||t.getState().nodes).filter(p=>{let y=t.getState().nodeLookup.get(p.id);if(y&&!v&&(p.id===d.id||!y.internals.positionAbsolute))return!1;let m=Ma(S?p:y),g=jl(m,b);return f&&g>0||g>=m.width*m.height||g>=b.width*b.height}):[]},isNodeIntersecting:(d,f,h=!0)=>{let b=uh(d)?d:s(d);if(!b)return!1;let S=jl(b,f);return h&&S>0||S>=f.width*f.height||S>=b.width*b.height},updateNode:u,updateNodeData:(d,f,h={replace:!1})=>{u(d,v=>{let b=typeof f=="function"?f(v):f;return h.replace?{...v,data:b}:{...v,data:{...v.data,...b}}},h)},updateEdge:c,updateEdgeData:(d,f,h={replace:!1})=>{c(d,v=>{let b=typeof f=="function"?f(v):f;return h.replace?{...v,data:b}:{...v,data:{...v.data,...b}}},h)},getNodesBounds:d=>{let{nodeLookup:f,nodeOrigin:h}=t.getState();return lh(d,{nodeLookup:f,nodeOrigin:h})},getHandleConnections:({type:d,id:f,nodeId:h})=>Array.from(t.getState().connectionLookup.get(`${h}-${d}${f?`-${f}`:""}`)?.values()??[]),getNodeConnections:({type:d,handleId:f,nodeId:h})=>Array.from(t.getState().connectionLookup.get(`${h}${d?f?`-${d}-${f}`:`-${d}`:""}`)?.values()??[]),fitView:async d=>{let f=t.getState().fitViewResolver??Ix();return t.setState({fitViewQueued:!0,fitViewOptions:d,fitViewResolver:f}),n.nodeQueue.push(h=>[...h]),f.promise}}},[]);return(0,P.useMemo)(()=>({...i,...e,viewportInitialized:o}),[o])}var H_=e=>e.selected,BD=typeof window<"u"?window:void 0;function HD({deleteKeyCode:e,multiSelectionKeyCode:t}){let n=Qe(),{deleteElements:o}=Mh(),i=Is(e,{actInsideInputWithModifier:!1}),a=Is(t,{target:BD});(0,P.useEffect)(()=>{if(i){let{edges:l,nodes:r}=n.getState();o({nodes:r.filter(H_),edges:l.filter(H_)}),n.setState({nodesSelectionActive:!1})}},[i]),(0,P.useEffect)(()=>{n.setState({multiSelectionActive:a})},[a])}function PD(e){let t=Qe();(0,P.useEffect)(()=>{let n=()=>{if(!e.current||!(e.current.checkVisibility?.()??!0))return!1;let o=Sf(e.current);(o.height===0||o.width===0)&&t.getState().onError?.("004",wn.error004()),t.setState({width:o.width||500,height:o.height||500})};if(e.current){n(),window.addEventListener("resize",n);let o=new ResizeObserver(()=>n());return o.observe(e.current),()=>{window.removeEventListener("resize",n),o&&e.current&&o.unobserve(e.current)}}},[])}var Lf={position:"absolute",width:"100%",height:"100%",top:0,left:0},kD=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function GD({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:o=!1,panOnScrollSpeed:i=.5,panOnScrollMode:a=ti.Free,zoomOnDoubleClick:l=!0,panOnDrag:r=!0,defaultViewport:s,translateExtent:u,minZoom:c,maxZoom:d,zoomActivationKeyCode:f,preventScrolling:h=!0,children:v,noWheelClassName:b,noPanClassName:S,onViewportChange:p,isControlledViewport:y,paneClickDistance:m,selectionOnDrag:g}){let x=Qe(),_=(0,P.useRef)(null),{userSelectionActive:E,lib:w,connectionInProgress:C}=Ae(kD,je),H=Is(f),D=(0,P.useRef)();PD(_);let z=(0,P.useCallback)(I=>{p?.({x:I[0],y:I[1],zoom:I[2]}),y||x.setState({transform:I})},[p,y]);return(0,P.useEffect)(()=>{if(_.current){D.current=r_({domNode:_.current,minZoom:c,maxZoom:d,translateExtent:u,viewport:s,onDraggingChange:M=>x.setState(O=>O.paneDragging===M?O:{paneDragging:M}),onPanZoomStart:(M,O)=>{let{onViewportChangeStart:R,onMoveStart:L}=x.getState();L?.(M,O),R?.(O)},onPanZoom:(M,O)=>{let{onViewportChange:R,onMove:L}=x.getState();L?.(M,O),R?.(O)},onPanZoomEnd:(M,O)=>{let{onViewportChangeEnd:R,onMoveEnd:L}=x.getState();L?.(M,O),R?.(O)}});let{x:I,y:T,zoom:A}=D.current.getViewport();return x.setState({panZoom:D.current,transform:[I,T,A],domNode:_.current.closest(".react-flow")}),()=>{D.current?.destroy()}}},[]),(0,P.useEffect)(()=>{D.current?.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:o,panOnScrollSpeed:i,panOnScrollMode:a,zoomOnDoubleClick:l,panOnDrag:r,zoomActivationKeyPressed:H,preventScrolling:h,noPanClassName:S,userSelectionActive:E,noWheelClassName:b,lib:w,onTransformChange:z,connectionInProgress:C,selectionOnDrag:g,paneClickDistance:m})},[e,t,n,o,i,a,l,r,H,h,S,E,b,w,z,C,g,m]),(0,B.jsx)("div",{className:"react-flow__renderer",ref:_,style:Lf,children:v})}var UD=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function ID(){let{userSelectionActive:e,userSelectionRect:t}=Ae(UD,je);return e&&t?(0,B.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}var Ch=(e,t)=>n=>{n.target===t.current&&e?.(n)},VD=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function YD({isSelecting:e,selectionKeyPressed:t,selectionMode:n=wa.Full,panOnDrag:o,paneClickDistance:i,selectionOnDrag:a,onSelectionStart:l,onSelectionEnd:r,onPaneClick:s,onPaneContextMenu:u,onPaneScroll:c,onPaneMouseEnter:d,onPaneMouseMove:f,onPaneMouseLeave:h,children:v}){let b=Qe(),{userSelectionActive:S,elementsSelectable:p,dragging:y,connectionInProgress:m}=Ae(VD,je),g=p&&(e||S),x=(0,P.useRef)(null),_=(0,P.useRef)(),E=(0,P.useRef)(new Set),w=(0,P.useRef)(new Set),C=(0,P.useRef)(!1),H=R=>{if(C.current||m){C.current=!1;return}s?.(R),b.getState().resetSelectedElements(),b.setState({nodesSelectionActive:!1})},D=R=>{if(Array.isArray(o)&&o?.includes(2)){R.preventDefault();return}u?.(R)},z=c?R=>c(R):void 0,I=R=>{C.current&&(R.stopPropagation(),C.current=!1)},T=R=>{let{domNode:L}=b.getState();if(_.current=L?.getBoundingClientRect(),!_.current)return;let V=R.target===x.current;if(!V&&!!R.target.closest(".nokey")||!e||!(a&&V||t)||R.button!==0||!R.isPrimary)return;R.target?.setPointerCapture?.(R.pointerId),C.current=!1;let{x:q,y:Z}=qn(R.nativeEvent,_.current);b.setState({userSelectionRect:{width:0,height:0,startX:q,startY:Z,x:q,y:Z}}),V||(R.stopPropagation(),R.preventDefault())},A=R=>{let{userSelectionRect:L,transform:V,nodeLookup:k,edgeLookup:G,connectionLookup:q,triggerNodeChanges:Z,triggerEdgeChanges:j,defaultEdgeOptions:se,resetSelectedElements:J}=b.getState();if(!_.current||!L)return;let{x:X,y:Q}=qn(R.nativeEvent,_.current),{startX:ue,startY:he}=L;if(!C.current){let be=t?0:i;if(Math.hypot(X-ue,Q-he)<=be)return;J(),l?.(R)}C.current=!0;let ie={startX:ue,startY:he,x:X<ue?X:ue,y:Q<he?Q:he,width:Math.abs(X-ue),height:Math.abs(Q-he)},ee=E.current,Te=w.current;E.current=new Set(yf(k,ie,V,n===wa.Partial,!0).map(be=>be.id)),w.current=new Set;let de=se?.selectable??!0;for(let be of E.current){let Le=q.get(be);if(Le)for(let{edgeId:Be}of Le.values()){let dt=G.get(Be);dt&&(dt.selectable??de)&&w.current.add(Be)}}if(!ph(ee,E.current)){let be=Wl(k,E.current,!0);Z(be)}if(!ph(Te,w.current)){let be=Wl(G,w.current);j(be)}b.setState({userSelectionRect:ie,userSelectionActive:!0,nodesSelectionActive:!1})},M=R=>{R.button===0&&(R.target?.releasePointerCapture?.(R.pointerId),!S&&R.target===x.current&&b.getState().userSelectionRect&&H?.(R),b.setState({userSelectionActive:!1,userSelectionRect:null}),C.current&&(r?.(R),b.setState({nodesSelectionActive:E.current.size>0})))},O=o===!0||Array.isArray(o)&&o.includes(0);return(0,B.jsxs)("div",{className:ot(["react-flow__pane",{draggable:O,dragging:y,selection:e}]),onClick:g?void 0:Ch(H,x),onContextMenu:Ch(D,x),onWheel:Ch(z,x),onPointerEnter:g?void 0:d,onPointerMove:g?A:f,onPointerUp:g?M:void 0,onPointerDownCapture:g?T:void 0,onClickCapture:g?I:void 0,onPointerLeave:h,ref:x,style:Lf,children:[v,(0,B.jsx)(ID,{})]})}function Ah({id:e,store:t,unselect:n=!1,nodeRef:o}){let{addSelectedNodes:i,unselectNodesAndEdges:a,multiSelectionActive:l,nodeLookup:r,onError:s}=t.getState(),u=r.get(e);if(!u){s?.("012",wn.error012(e));return}t.setState({nodesSelectionActive:!1}),u.selected?(n||u.selected&&l)&&(a({nodes:[u],edges:[]}),requestAnimationFrame(()=>o?.current?.blur())):i([e])}function oE({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:o,nodeId:i,isSelectable:a,nodeClickDistance:l}){let r=Qe(),[s,u]=(0,P.useState)(!1),c=(0,P.useRef)();return(0,P.useEffect)(()=>{c.current=Jx({getStoreItems:()=>r.getState(),onNodeMouseDown:d=>{Ah({id:d,store:r,nodeRef:e})},onDragStart:()=>{u(!0)},onDragStop:()=>{u(!1)}})},[]),(0,P.useEffect)(()=>{if(!(t||!e.current||!c.current))return c.current.update({noDragClassName:n,handleSelector:o,domNode:e.current,isSelectable:a,nodeId:i,nodeClickDistance:l}),()=>{c.current?.destroy()}},[n,o,t,a,e,i,l]),s}var XD=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function iE(){let e=Qe();return(0,P.useCallback)(n=>{let{nodeExtent:o,snapToGrid:i,snapGrid:a,nodesDraggable:l,onError:r,updateNodePositions:s,nodeLookup:u,nodeOrigin:c}=e.getState(),d=new Map,f=XD(l),h=i?a[0]:5,v=i?a[1]:5,b=n.direction.x*h*n.factor,S=n.direction.y*v*n.factor;for(let[,p]of u){if(!f(p))continue;let y={x:p.internals.positionAbsolute.x+b,y:p.internals.positionAbsolute.y+S};i&&(y=$l(y,a));let{position:m,positionAbsolute:g}=rh({nodeId:p.id,nextPosition:y,nodeLookup:u,nodeExtent:o,nodeOrigin:c,onError:r});p.position=m,p.internals.positionAbsolute=g,d.set(p.id,p)}s(d)},[])}var Dh=(0,P.createContext)(null),qD=Dh.Provider;Dh.Consumer;var aE=()=>(0,P.useContext)(Dh),ZD=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),jD=(e,t,n)=>o=>{let{connectionClickStartHandle:i,connectionMode:a,connection:l}=o,{fromHandle:r,toHandle:s,isValid:u}=l,c=s?.nodeId===e&&s?.id===t&&s?.type===n;return{connectingFrom:r?.nodeId===e&&r?.id===t&&r?.type===n,connectingTo:c,clickConnecting:i?.nodeId===e&&i?.id===t&&i?.type===n,isPossibleEndHandle:a===Zi.Strict?r?.type!==n:e!==r?.nodeId||t!==r?.id,connectionInProcess:!!r,clickConnectionInProcess:!!i,valid:c&&u}};function $D({type:e="source",position:t=W.Top,isValidConnection:n,isConnectable:o=!0,isConnectableStart:i=!0,isConnectableEnd:a=!0,id:l,onConnect:r,children:s,className:u,onMouseDown:c,onTouchStart:d,...f},h){let v=l||null,b=e==="target",S=Qe(),p=aE(),{connectOnClick:y,noPanClassName:m,rfId:g}=Ae(ZD,je),{connectingFrom:x,connectingTo:_,clickConnecting:E,isPossibleEndHandle:w,connectionInProcess:C,clickConnectionInProcess:H,valid:D}=Ae(jD(p,v,e),je);p||S.getState().onError?.("010",wn.error010());let z=A=>{let{defaultEdgeOptions:M,onConnect:O,hasDefaultEdges:R}=S.getState(),L={...M,...A};if(R){let{edges:V,setEdges:k}=S.getState();k(vh(L,V))}O?.(L),r?.(L)},I=A=>{if(!p)return;let M=gh(A.nativeEvent);if(i&&(M&&A.button===0||!M)){let O=S.getState();wf.onPointerDown(A.nativeEvent,{handleDomNode:A.currentTarget,autoPanOnConnect:O.autoPanOnConnect,connectionMode:O.connectionMode,connectionRadius:O.connectionRadius,domNode:O.domNode,nodeLookup:O.nodeLookup,lib:O.lib,isTarget:b,handleId:v,nodeId:p,flowId:O.rfId,panBy:O.panBy,cancelConnection:O.cancelConnection,onConnectStart:O.onConnectStart,onConnectEnd:(...R)=>S.getState().onConnectEnd?.(...R),updateConnection:O.updateConnection,onConnect:z,isValidConnection:n||((...R)=>S.getState().isValidConnection?.(...R)??!0),getTransform:()=>S.getState().transform,getFromHandle:()=>S.getState().connection.fromHandle,autoPanSpeed:O.autoPanSpeed,dragThreshold:O.connectionDragThreshold})}M?c?.(A):d?.(A)},T=A=>{let{onClickConnectStart:M,onClickConnectEnd:O,connectionClickStartHandle:R,connectionMode:L,isValidConnection:V,lib:k,rfId:G,nodeLookup:q,connection:Z}=S.getState();if(!p||!R&&!i)return;if(!R){M?.(A.nativeEvent,{nodeId:p,handleId:v,handleType:e}),S.setState({connectionClickStartHandle:{nodeId:p,type:e,id:v}});return}let j=mh(A.target),se=n||V,{connection:J,isValid:X}=wf.isValid(A.nativeEvent,{handle:{nodeId:p,id:v,type:e},connectionMode:L,fromNodeId:R.nodeId,fromHandleId:R.id||null,fromType:R.type,isValidConnection:se,flowId:G,doc:j,lib:k,nodeLookup:q});X&&J&&z(J);let Q=structuredClone(Z);delete Q.inProgress,Q.toPosition=Q.toHandle?Q.toHandle.position:null,O?.(A,Q),S.setState({connectionClickStartHandle:null})};return(0,B.jsx)("div",{"data-handleid":v,"data-nodeid":p,"data-handlepos":t,"data-id":`${g}-${p}-${v}-${e}`,className:ot(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",m,u,{source:!b,target:b,connectable:o,connectablestart:i,connectableend:a,clickconnecting:E,connectingfrom:x,connectingto:_,valid:D,connectionindicator:o&&(!C||w)&&(C||H?a:i)}]),onMouseDown:I,onTouchStart:I,onClick:y?T:void 0,ref:h,...f,children:s})}var Ra=(0,P.memo)(tE($D));function FD({data:e,isConnectable:t,sourcePosition:n=W.Bottom}){return(0,B.jsxs)(B.Fragment,{children:[e?.label,(0,B.jsx)(Ra,{type:"source",position:n,isConnectable:t})]})}function KD({data:e,isConnectable:t,targetPosition:n=W.Top,sourcePosition:o=W.Bottom}){return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(Ra,{type:"target",position:n,isConnectable:t}),e?.label,(0,B.jsx)(Ra,{type:"source",position:o,isConnectable:t})]})}function QD(){return null}function WD({data:e,isConnectable:t,targetPosition:n=W.Top}){return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(Ra,{type:"target",position:n,isConnectable:t}),e?.label]})}var Of={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},P_={input:FD,default:KD,output:WD,group:QD};function JD(e){return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??e.style?.width,height:e.height??e.initialHeight??e.style?.height}:{width:e.width??e.style?.width,height:e.height??e.style?.height}}var eR=e=>{let{width:t,height:n,x:o,y:i}=Zl(e.nodeLookup,{filter:a=>!!a.selected});return{width:Xn(t)?t:null,height:Xn(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${o}px,${i}px)`}};function tR({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){let o=Qe(),{width:i,height:a,transformString:l,userSelectionActive:r}=Ae(eR,je),s=iE(),u=(0,P.useRef)(null);(0,P.useEffect)(()=>{n||u.current?.focus({preventScroll:!0})},[n]);let c=!r&&i!==null&&a!==null;if(oE({nodeRef:u,disabled:!c}),!c)return null;let d=e?h=>{let v=o.getState().nodes.filter(b=>b.selected);e(h,v)}:void 0,f=h=>{Object.prototype.hasOwnProperty.call(Of,h.key)&&(h.preventDefault(),s({direction:Of[h.key],factor:h.shiftKey?4:1}))};return(0,B.jsx)("div",{className:ot(["react-flow__nodesselection","react-flow__container",t]),style:{transform:l},children:(0,B.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:a}})})}var k_=typeof window<"u"?window:void 0,nR=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function lE({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:o,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:l,paneClickDistance:r,deleteKeyCode:s,selectionKeyCode:u,selectionOnDrag:c,selectionMode:d,onSelectionStart:f,onSelectionEnd:h,multiSelectionKeyCode:v,panActivationKeyCode:b,zoomActivationKeyCode:S,elementsSelectable:p,zoomOnScroll:y,zoomOnPinch:m,panOnScroll:g,panOnScrollSpeed:x,panOnScrollMode:_,zoomOnDoubleClick:E,panOnDrag:w,defaultViewport:C,translateExtent:H,minZoom:D,maxZoom:z,preventScrolling:I,onSelectionContextMenu:T,noWheelClassName:A,noPanClassName:M,disableKeyboardA11y:O,onViewportChange:R,isControlledViewport:L}){let{nodesSelectionActive:V,userSelectionActive:k}=Ae(nR,je),G=Is(u,{target:k_}),q=Is(b,{target:k_}),Z=q||w,j=q||g,se=c&&Z!==!0,J=G||k||se;return HD({deleteKeyCode:s,multiSelectionKeyCode:v}),(0,B.jsx)(GD,{onPaneContextMenu:a,elementsSelectable:p,zoomOnScroll:y,zoomOnPinch:m,panOnScroll:j,panOnScrollSpeed:x,panOnScrollMode:_,zoomOnDoubleClick:E,panOnDrag:!G&&Z,defaultViewport:C,translateExtent:H,minZoom:D,maxZoom:z,zoomActivationKeyCode:S,preventScrolling:I,noWheelClassName:A,noPanClassName:M,onViewportChange:R,isControlledViewport:L,paneClickDistance:r,selectionOnDrag:se,children:(0,B.jsxs)(YD,{onSelectionStart:f,onSelectionEnd:h,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:o,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:l,panOnDrag:Z,isSelecting:!!J,selectionMode:d,selectionKeyPressed:G,paneClickDistance:r,selectionOnDrag:se,children:[e,V&&(0,B.jsx)(tR,{onSelectionContextMenu:T,noPanClassName:M,disableKeyboardA11y:O})]})})}lE.displayName="FlowRenderer";var oR=(0,P.memo)(lE),iR=e=>t=>e?yf(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 aR(e){return Ae((0,P.useCallback)(iR(e),[e]),je)}var lR=e=>e.updateNodeInternals;function rR(){let e=Ae(lR),[t]=(0,P.useState)(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{let o=new Map;n.forEach(i=>{let a=i.target.getAttribute("data-id");o.set(a,{id:a,nodeElement:i.target,force:!0})}),e(o)}));return(0,P.useEffect)(()=>()=>{t?.disconnect()},[t]),t}function sR({node:e,nodeType:t,hasDimensions:n,resizeObserver:o}){let i=Qe(),a=(0,P.useRef)(null),l=(0,P.useRef)(null),r=(0,P.useRef)(e.sourcePosition),s=(0,P.useRef)(e.targetPosition),u=(0,P.useRef)(t),c=n&&!!e.internals.handleBounds;return(0,P.useEffect)(()=>{a.current&&!e.hidden&&(!c||l.current!==a.current)&&(l.current&&o?.unobserve(l.current),o?.observe(a.current),l.current=a.current)},[c,e.hidden]),(0,P.useEffect)(()=>()=>{l.current&&(o?.unobserve(l.current),l.current=null)},[]),(0,P.useEffect)(()=>{if(a.current){let d=u.current!==t,f=r.current!==e.sourcePosition,h=s.current!==e.targetPosition;(d||f||h)&&(u.current=t,r.current=e.sourcePosition,s.current=e.targetPosition,i.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:a.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),a}function uR({id:e,onClick:t,onMouseEnter:n,onMouseMove:o,onMouseLeave:i,onContextMenu:a,onDoubleClick:l,nodesDraggable:r,elementsSelectable:s,nodesConnectable:u,nodesFocusable:c,resizeObserver:d,noDragClassName:f,noPanClassName:h,disableKeyboardA11y:v,rfId:b,nodeTypes:S,nodeClickDistance:p,onError:y}){let{node:m,internals:g,isParent:x}=Ae(X=>{let Q=X.nodeLookup.get(e),ue=X.parentLookup.has(e);return{node:Q,internals:Q.internals,isParent:ue}},je),_=m.type||"default",E=S?.[_]||P_[_];E===void 0&&(y?.("003",wn.error003(_)),_="default",E=S?.default||P_.default);let w=!!(m.draggable||r&&typeof m.draggable>"u"),C=!!(m.selectable||s&&typeof m.selectable>"u"),H=!!(m.connectable||u&&typeof m.connectable>"u"),D=!!(m.focusable||c&&typeof m.focusable>"u"),z=Qe(),I=fh(m),T=sR({node:m,nodeType:_,hasDimensions:I,resizeObserver:d}),A=oE({nodeRef:T,disabled:m.hidden||!w,noDragClassName:f,handleSelector:m.dragHandle,nodeId:e,isSelectable:C,nodeClickDistance:p}),M=iE();if(m.hidden)return null;let O=So(m),R=JD(m),L=C||w||t||n||o||i,V=n?X=>n(X,{...g.userNode}):void 0,k=o?X=>o(X,{...g.userNode}):void 0,G=i?X=>i(X,{...g.userNode}):void 0,q=a?X=>a(X,{...g.userNode}):void 0,Z=l?X=>l(X,{...g.userNode}):void 0,j=X=>{let{selectNodesOnDrag:Q,nodeDragThreshold:ue}=z.getState();C&&(!Q||!w||ue>0)&&Ah({id:e,store:z,nodeRef:T}),t&&t(X,{...g.userNode})},se=X=>{if(!(hh(X.nativeEvent)||v)){if(eh.includes(X.key)&&C){let Q=X.key==="Escape";Ah({id:e,store:z,unselect:Q,nodeRef:T})}else if(w&&m.selected&&Object.prototype.hasOwnProperty.call(Of,X.key)){X.preventDefault();let{ariaLabelConfig:Q}=z.getState();z.setState({ariaLiveMessage:Q["node.a11yDescription.ariaLiveMessage"]({direction:X.key.replace("Arrow","").toLowerCase(),x:~~g.positionAbsolute.x,y:~~g.positionAbsolute.y})}),M({direction:Of[X.key],factor:X.shiftKey?4:1})}}},J=()=>{if(v||!T.current?.matches(":focus-visible"))return;let{transform:X,width:Q,height:ue,autoPanOnNodeFocus:he,setCenter:ie}=z.getState();if(!he)return;yf(new Map([[e,m]]),{x:0,y:0,width:Q,height:ue},X,!0).length>0||ie(m.position.x+O.width/2,m.position.y+O.height/2,{zoom:X[2]})};return(0,B.jsx)("div",{className:ot(["react-flow__node",`react-flow__node-${_}`,{[h]:w},m.className,{selected:m.selected,selectable:C,parent:x,draggable:w,dragging:A}]),ref:T,style:{zIndex:g.z,transform:`translate(${g.positionAbsolute.x}px,${g.positionAbsolute.y}px)`,pointerEvents:L?"all":"none",visibility:I?"visible":"hidden",...m.style,...R},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:V,onMouseMove:k,onMouseLeave:G,onContextMenu:q,onClick:j,onDoubleClick:Z,onKeyDown:D?se:void 0,tabIndex:D?0:void 0,onFocus:D?J:void 0,role:m.ariaRole??(D?"group":void 0),"aria-roledescription":"node","aria-describedby":v?void 0:`${F_}-${b}`,"aria-label":m.ariaLabel,...m.domAttributes,children:(0,B.jsx)(qD,{value:e,children:(0,B.jsx)(E,{id:e,data:m.data,type:_,positionAbsoluteX:g.positionAbsolute.x,positionAbsoluteY:g.positionAbsolute.y,selected:m.selected??!1,selectable:C,draggable:w,deletable:m.deletable??!0,isConnectable:H,sourcePosition:m.sourcePosition,targetPosition:m.targetPosition,dragging:A,dragHandle:m.dragHandle,zIndex:g.z,parentId:m.parentId,...O})})})}var cR=(0,P.memo)(uR),fR=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function rE(e){let{nodesDraggable:t,nodesConnectable:n,nodesFocusable:o,elementsSelectable:i,onError:a}=Ae(fR,je),l=aR(e.onlyRenderVisibleElements),r=rR();return(0,B.jsx)("div",{className:"react-flow__nodes",style:Lf,children:l.map(s=>(0,B.jsx)(cR,{id:s,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:r,nodesDraggable:t,nodesConnectable:n,nodesFocusable:o,elementsSelectable:i,nodeClickDistance:e.nodeClickDistance,onError:a},s))})}rE.displayName="NodeRenderer";var dR=(0,P.memo)(rE);function pR(e){return Ae((0,P.useCallback)(n=>{if(!e)return n.edges.map(i=>i.id);let o=[];if(n.width&&n.height)for(let i of n.edges){let a=n.nodeLookup.get(i.source),l=n.nodeLookup.get(i.target);a&&l&&Xx({sourceNode:a,targetNode:l,width:n.width,height:n.height,transform:n.transform})&&o.push(i.id)}return o},[e]),je)}var mR=({color:e="none",strokeWidth:t=1})=>{let n={strokeWidth:t,...e&&{stroke:e}};return(0,B.jsx)("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},hR=({color:e="none",strokeWidth:t=1})=>{let n={strokeWidth:t,...e&&{stroke:e,fill:e}};return(0,B.jsx)("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},G_={[Vl.Arrow]:mR,[Vl.ArrowClosed]:hR};function gR(e){let t=Qe();return(0,P.useMemo)(()=>Object.prototype.hasOwnProperty.call(G_,e)?G_[e]:(t.getState().onError?.("009",wn.error009(e)),null),[e])}var yR=({id:e,type:t,color:n,width:o=12.5,height:i=12.5,markerUnits:a="strokeWidth",strokeWidth:l,orient:r="auto-start-reverse"})=>{let s=gR(t);return s?(0,B.jsx)("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${o}`,markerHeight:`${i}`,viewBox:"-10 -10 20 20",markerUnits:a,orient:r,refX:"0",refY:"0",children:(0,B.jsx)(s,{color:n,strokeWidth:l})}):null},sE=({defaultColor:e,rfId:t})=>{let n=Ae(a=>a.edges),o=Ae(a=>a.defaultEdgeOptions),i=(0,P.useMemo)(()=>Zx(n,{id:t,defaultColor:e,defaultMarkerStart:o?.markerStart,defaultMarkerEnd:o?.markerEnd}),[n,o,t,e]);return i.length?(0,B.jsx)("svg",{className:"react-flow__marker","aria-hidden":"true",children:(0,B.jsx)("defs",{children:i.map(a=>(0,B.jsx)(yR,{id:a.id,type:a.type,color:a.color,width:a.width,height:a.height,markerUnits:a.markerUnits,strokeWidth:a.strokeWidth,orient:a.orient},a.id))})}):null};sE.displayName="MarkerDefinitions";var vR=(0,P.memo)(sE);function uE({x:e,y:t,label:n,labelStyle:o,labelShowBg:i=!0,labelBgStyle:a,labelBgPadding:l=[2,4],labelBgBorderRadius:r=2,children:s,className:u,...c}){let[d,f]=(0,P.useState)({x:1,y:0,width:0,height:0}),h=ot(["react-flow__edge-textwrapper",u]),v=(0,P.useRef)(null);return(0,P.useEffect)(()=>{if(v.current){let b=v.current.getBBox();f({x:b.x,y:b.y,width:b.width,height:b.height})}},[n]),n?(0,B.jsxs)("g",{transform:`translate(${e-d.width/2} ${t-d.height/2})`,className:h,visibility:d.width?"visible":"hidden",...c,children:[i&&(0,B.jsx)("rect",{width:d.width+2*l[0],x:-l[0],y:-l[1],height:d.height+2*l[1],className:"react-flow__edge-textbg",style:a,rx:r,ry:r}),(0,B.jsx)("text",{className:"react-flow__edge-text",y:d.height/2,dy:"0.3em",ref:v,style:o,children:n}),s]}):null}uE.displayName="EdgeText";var bR=(0,P.memo)(uE);function Bf({path:e,labelX:t,labelY:n,label:o,labelStyle:i,labelShowBg:a,labelBgStyle:l,labelBgPadding:r,labelBgBorderRadius:s,interactionWidth:u=20,...c}){return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)("path",{...c,d:e,fill:"none",className:ot(["react-flow__edge-path",c.className])}),u?(0,B.jsx)("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:u,className:"react-flow__edge-interaction"}):null,o&&Xn(t)&&Xn(n)?(0,B.jsx)(bR,{x:t,y:n,label:o,labelStyle:i,labelShowBg:a,labelBgStyle:l,labelBgPadding:r,labelBgBorderRadius:s}):null]})}function U_({pos:e,x1:t,y1:n,x2:o,y2:i}){return e===W.Left||e===W.Right?[.5*(t+o),n]:[t,.5*(n+i)]}function cE({sourceX:e,sourceY:t,sourcePosition:n=W.Bottom,targetX:o,targetY:i,targetPosition:a=W.Top}){let[l,r]=U_({pos:n,x1:e,y1:t,x2:o,y2:i}),[s,u]=U_({pos:a,x1:o,y1:i,x2:e,y2:t}),[c,d,f,h]=xf({sourceX:e,sourceY:t,targetX:o,targetY:i,sourceControlX:l,sourceControlY:r,targetControlX:s,targetControlY:u});return[`M${e},${t} C${l},${r} ${s},${u} ${o},${i}`,c,d,f,h]}function fE(e){return(0,P.memo)(({id:t,sourceX:n,sourceY:o,targetX:i,targetY:a,sourcePosition:l,targetPosition:r,label:s,labelStyle:u,labelShowBg:c,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:h,style:v,markerEnd:b,markerStart:S,interactionWidth:p})=>{let[y,m,g]=cE({sourceX:n,sourceY:o,sourcePosition:l,targetX:i,targetY:a,targetPosition:r}),x=e.isInternal?void 0:t;return(0,B.jsx)(Bf,{id:x,path:y,labelX:m,labelY:g,label:s,labelStyle:u,labelShowBg:c,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:h,style:v,markerEnd:b,markerStart:S,interactionWidth:p})})}var SR=fE({isInternal:!1}),dE=fE({isInternal:!0});SR.displayName="SimpleBezierEdge";dE.displayName="SimpleBezierEdgeInternal";function pE(e){return(0,P.memo)(({id:t,sourceX:n,sourceY:o,targetX:i,targetY:a,label:l,labelStyle:r,labelShowBg:s,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d,style:f,sourcePosition:h=W.Bottom,targetPosition:v=W.Top,markerEnd:b,markerStart:S,pathOptions:p,interactionWidth:y})=>{let[m,g,x]=Us({sourceX:n,sourceY:o,sourcePosition:h,targetX:i,targetY:a,targetPosition:v,borderRadius:p?.borderRadius,offset:p?.offset,stepPosition:p?.stepPosition}),_=e.isInternal?void 0:t;return(0,B.jsx)(Bf,{id:_,path:m,labelX:g,labelY:x,label:l,labelStyle:r,labelShowBg:s,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d,style:f,markerEnd:b,markerStart:S,interactionWidth:y})})}var mE=pE({isInternal:!1}),hE=pE({isInternal:!0});mE.displayName="SmoothStepEdge";hE.displayName="SmoothStepEdgeInternal";function gE(e){return(0,P.memo)(({id:t,...n})=>{let o=e.isInternal?void 0:t;return(0,B.jsx)(mE,{...n,id:o,pathOptions:(0,P.useMemo)(()=>({borderRadius:0,offset:n.pathOptions?.offset}),[n.pathOptions?.offset])})})}var xR=gE({isInternal:!1}),yE=gE({isInternal:!0});xR.displayName="StepEdge";yE.displayName="StepEdgeInternal";function vE(e){return(0,P.memo)(({id:t,sourceX:n,sourceY:o,targetX:i,targetY:a,label:l,labelStyle:r,labelShowBg:s,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d,style:f,markerEnd:h,markerStart:v,interactionWidth:b})=>{let[S,p,y]=Ef({sourceX:n,sourceY:o,targetX:i,targetY:a}),m=e.isInternal?void 0:t;return(0,B.jsx)(Bf,{id:m,path:S,labelX:p,labelY:y,label:l,labelStyle:r,labelShowBg:s,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d,style:f,markerEnd:h,markerStart:v,interactionWidth:b})})}var _R=vE({isInternal:!1}),bE=vE({isInternal:!0});_R.displayName="StraightEdge";bE.displayName="StraightEdgeInternal";function SE(e){return(0,P.memo)(({id:t,sourceX:n,sourceY:o,targetX:i,targetY:a,sourcePosition:l=W.Bottom,targetPosition:r=W.Top,label:s,labelStyle:u,labelShowBg:c,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:h,style:v,markerEnd:b,markerStart:S,pathOptions:p,interactionWidth:y})=>{let[m,g,x]=_f({sourceX:n,sourceY:o,sourcePosition:l,targetX:i,targetY:a,targetPosition:r,curvature:p?.curvature}),_=e.isInternal?void 0:t;return(0,B.jsx)(Bf,{id:_,path:m,labelX:g,labelY:x,label:s,labelStyle:u,labelShowBg:c,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:h,style:v,markerEnd:b,markerStart:S,interactionWidth:y})})}var ER=SE({isInternal:!1}),xE=SE({isInternal:!0});ER.displayName="BezierEdge";xE.displayName="BezierEdgeInternal";var I_={default:xE,straight:bE,step:yE,smoothstep:hE,simplebezier:dE},V_={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},TR=(e,t,n)=>n===W.Left?e-t:n===W.Right?e+t:e,NR=(e,t,n)=>n===W.Top?e-t:n===W.Bottom?e+t:e,Y_="react-flow__edgeupdater";function X_({position:e,centerX:t,centerY:n,radius:o=10,onMouseDown:i,onMouseEnter:a,onMouseOut:l,type:r}){return(0,B.jsx)("circle",{onMouseDown:i,onMouseEnter:a,onMouseOut:l,className:ot([Y_,`${Y_}-${r}`]),cx:TR(t,o,e),cy:NR(n,o,e),r:o,stroke:"transparent",fill:"transparent"})}function CR({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:o,sourceY:i,targetX:a,targetY:l,sourcePosition:r,targetPosition:s,onReconnect:u,onReconnectStart:c,onReconnectEnd:d,setReconnecting:f,setUpdateHover:h}){let v=Qe(),b=(g,x)=>{if(g.button!==0)return;let{autoPanOnConnect:_,domNode:E,connectionMode:w,connectionRadius:C,lib:H,onConnectStart:D,cancelConnection:z,nodeLookup:I,rfId:T,panBy:A,updateConnection:M}=v.getState(),O=x.type==="target",R=(k,G)=>{f(!1),d?.(k,n,x.type,G)},L=k=>u?.(n,k),V=(k,G)=>{f(!0),c?.(g,n,x.type),D?.(k,G)};wf.onPointerDown(g.nativeEvent,{autoPanOnConnect:_,connectionMode:w,connectionRadius:C,domNode:E,handleId:x.id,nodeId:x.nodeId,nodeLookup:I,isTarget:O,edgeUpdaterType:x.type,lib:H,flowId:T,cancelConnection:z,panBy:A,isValidConnection:(...k)=>v.getState().isValidConnection?.(...k)??!0,onConnect:L,onConnectStart:V,onConnectEnd:(...k)=>v.getState().onConnectEnd?.(...k),onReconnectEnd:R,updateConnection:M,getTransform:()=>v.getState().transform,getFromHandle:()=>v.getState().connection.fromHandle,dragThreshold:v.getState().connectionDragThreshold,handleDomNode:g.currentTarget})},S=g=>b(g,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),p=g=>b(g,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),y=()=>h(!0),m=()=>h(!1);return(0,B.jsxs)(B.Fragment,{children:[(e===!0||e==="source")&&(0,B.jsx)(X_,{position:r,centerX:o,centerY:i,radius:t,onMouseDown:S,onMouseEnter:y,onMouseOut:m,type:"source"}),(e===!0||e==="target")&&(0,B.jsx)(X_,{position:s,centerX:a,centerY:l,radius:t,onMouseDown:p,onMouseEnter:y,onMouseOut:m,type:"target"})]})}function wR({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:o,onClick:i,onDoubleClick:a,onContextMenu:l,onMouseEnter:r,onMouseMove:s,onMouseLeave:u,reconnectRadius:c,onReconnect:d,onReconnectStart:f,onReconnectEnd:h,rfId:v,edgeTypes:b,noPanClassName:S,onError:p,disableKeyboardA11y:y}){let m=Ae(ie=>ie.edgeLookup.get(e)),g=Ae(ie=>ie.defaultEdgeOptions);m=g?{...g,...m}:m;let x=m.type||"default",_=b?.[x]||I_[x];_===void 0&&(p?.("011",wn.error011(x)),x="default",_=b?.default||I_.default);let E=!!(m.focusable||t&&typeof m.focusable>"u"),w=typeof d<"u"&&(m.reconnectable||n&&typeof m.reconnectable>"u"),C=!!(m.selectable||o&&typeof m.selectable>"u"),H=(0,P.useRef)(null),[D,z]=(0,P.useState)(!1),[I,T]=(0,P.useState)(!1),A=Qe(),{zIndex:M,sourceX:O,sourceY:R,targetX:L,targetY:V,sourcePosition:k,targetPosition:G}=Ae((0,P.useCallback)(ie=>{let ee=ie.nodeLookup.get(m.source),Te=ie.nodeLookup.get(m.target);if(!ee||!Te)return{zIndex:m.zIndex,...V_};let de=qx({id:e,sourceNode:ee,targetNode:Te,sourceHandle:m.sourceHandle||null,targetHandle:m.targetHandle||null,connectionMode:ie.connectionMode,onError:p});return{zIndex:Yx({selected:m.selected,zIndex:m.zIndex,sourceNode:ee,targetNode:Te,elevateOnSelect:ie.elevateEdgesOnSelect,zIndexMode:ie.zIndexMode}),...de||V_}},[m.source,m.target,m.sourceHandle,m.targetHandle,m.selected,m.zIndex]),je),q=(0,P.useMemo)(()=>m.markerStart?`url('#${Tf(m.markerStart,v)}')`:void 0,[m.markerStart,v]),Z=(0,P.useMemo)(()=>m.markerEnd?`url('#${Tf(m.markerEnd,v)}')`:void 0,[m.markerEnd,v]);if(m.hidden||O===null||R===null||L===null||V===null)return null;let j=ie=>{let{addSelectedEdges:ee,unselectNodesAndEdges:Te,multiSelectionActive:de}=A.getState();C&&(A.setState({nodesSelectionActive:!1}),m.selected&&de?(Te({nodes:[],edges:[m]}),H.current?.blur()):ee([e])),i&&i(ie,m)},se=a?ie=>{a(ie,{...m})}:void 0,J=l?ie=>{l(ie,{...m})}:void 0,X=r?ie=>{r(ie,{...m})}:void 0,Q=s?ie=>{s(ie,{...m})}:void 0,ue=u?ie=>{u(ie,{...m})}:void 0,he=ie=>{if(!y&&eh.includes(ie.key)&&C){let{unselectNodesAndEdges:ee,addSelectedEdges:Te}=A.getState();ie.key==="Escape"?(H.current?.blur(),ee({edges:[m]})):Te([e])}};return(0,B.jsx)("svg",{style:{zIndex:M},children:(0,B.jsxs)("g",{className:ot(["react-flow__edge",`react-flow__edge-${x}`,m.className,S,{selected:m.selected,animated:m.animated,inactive:!C&&!i,updating:D,selectable:C}]),onClick:j,onDoubleClick:se,onContextMenu:J,onMouseEnter:X,onMouseMove:Q,onMouseLeave:ue,onKeyDown:E?he:void 0,tabIndex:E?0:void 0,role:m.ariaRole??(E?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":m.ariaLabel===null?void 0:m.ariaLabel||`Edge from ${m.source} to ${m.target}`,"aria-describedby":E?`${K_}-${v}`:void 0,ref:H,...m.domAttributes,children:[!I&&(0,B.jsx)(_,{id:e,source:m.source,target:m.target,type:m.type,selected:m.selected,animated:m.animated,selectable:C,deletable:m.deletable??!0,label:m.label,labelStyle:m.labelStyle,labelShowBg:m.labelShowBg,labelBgStyle:m.labelBgStyle,labelBgPadding:m.labelBgPadding,labelBgBorderRadius:m.labelBgBorderRadius,sourceX:O,sourceY:R,targetX:L,targetY:V,sourcePosition:k,targetPosition:G,data:m.data,style:m.style,sourceHandleId:m.sourceHandle,targetHandleId:m.targetHandle,markerStart:q,markerEnd:Z,pathOptions:"pathOptions"in m?m.pathOptions:void 0,interactionWidth:m.interactionWidth}),w&&(0,B.jsx)(CR,{edge:m,isReconnectable:w,reconnectRadius:c,onReconnect:d,onReconnectStart:f,onReconnectEnd:h,sourceX:O,sourceY:R,targetX:L,targetY:V,sourcePosition:k,targetPosition:G,setUpdateHover:z,setReconnecting:T})]})})}var AR=(0,P.memo)(wR),MR=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function _E({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:o,noPanClassName:i,onReconnect:a,onEdgeContextMenu:l,onEdgeMouseEnter:r,onEdgeMouseMove:s,onEdgeMouseLeave:u,onEdgeClick:c,reconnectRadius:d,onEdgeDoubleClick:f,onReconnectStart:h,onReconnectEnd:v,disableKeyboardA11y:b}){let{edgesFocusable:S,edgesReconnectable:p,elementsSelectable:y,onError:m}=Ae(MR,je),g=pR(t);return(0,B.jsxs)("div",{className:"react-flow__edges",children:[(0,B.jsx)(vR,{defaultColor:e,rfId:n}),g.map(x=>(0,B.jsx)(AR,{id:x,edgesFocusable:S,edgesReconnectable:p,elementsSelectable:y,noPanClassName:i,onReconnect:a,onContextMenu:l,onMouseEnter:r,onMouseMove:s,onMouseLeave:u,onClick:c,reconnectRadius:d,onDoubleClick:f,onReconnectStart:h,onReconnectEnd:v,rfId:n,onError:m,edgeTypes:o,disableKeyboardA11y:b},x))]})}_E.displayName="EdgeRenderer";var DR=(0,P.memo)(_E),RR=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function OR({children:e}){let t=Ae(RR);return(0,B.jsx)("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function zR(e){let t=Mh(),n=(0,P.useRef)(!1);(0,P.useEffect)(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}var LR=e=>e.panZoom?.syncViewport;function BR(e){let t=Ae(LR),n=Qe();return(0,P.useEffect)(()=>{e&&(t?.(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function q_(e){return e.connection.inProgress?{...e.connection,to:Fl(e.connection.to,e.transform)}:{...e.connection}}function HR(e){return e?n=>{let o=q_(n);return e(o)}:q_}function PR(e){let t=HR(e);return Ae(t,je)}var kR=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function GR({containerStyle:e,style:t,type:n,component:o}){let{nodesConnectable:i,width:a,height:l,isValid:r,inProgress:s}=Ae(kR,je);return!(a&&i&&s)?null:(0,B.jsx)("svg",{style:e,width:a,height:l,className:"react-flow__connectionline react-flow__container",children:(0,B.jsx)("g",{className:ot(["react-flow__connection",oh(r)]),children:(0,B.jsx)(EE,{style:t,type:n,CustomComponent:o,isValid:r})})})}var EE=({style:e,type:t=bo.Bezier,CustomComponent:n,isValid:o})=>{let{inProgress:i,from:a,fromNode:l,fromHandle:r,fromPosition:s,to:u,toNode:c,toHandle:d,toPosition:f,pointer:h}=PR();if(!i)return;if(n)return(0,B.jsx)(n,{connectionLineType:t,connectionLineStyle:e,fromNode:l,fromHandle:r,fromX:a.x,fromY:a.y,toX:u.x,toY:u.y,fromPosition:s,toPosition:f,connectionStatus:oh(o),toNode:c,toHandle:d,pointer:h});let v="",b={sourceX:a.x,sourceY:a.y,sourcePosition:s,targetX:u.x,targetY:u.y,targetPosition:f};switch(t){case bo.Bezier:[v]=_f(b);break;case bo.SimpleBezier:[v]=cE(b);break;case bo.Step:[v]=Us({...b,borderRadius:0});break;case bo.SmoothStep:[v]=Us(b);break;default:[v]=Ef(b)}return(0,B.jsx)("path",{d:v,fill:"none",className:"react-flow__connection-path",style:e})};EE.displayName="ConnectionLine";var UR={};function Z_(e=UR){let t=(0,P.useRef)(e),n=Qe();(0,P.useEffect)(()=>{},[e])}function IR(){let e=Qe(),t=(0,P.useRef)(!1);(0,P.useEffect)(()=>{},[])}function TE({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:o,onEdgeClick:i,onNodeDoubleClick:a,onEdgeDoubleClick:l,onNodeMouseEnter:r,onNodeMouseMove:s,onNodeMouseLeave:u,onNodeContextMenu:c,onSelectionContextMenu:d,onSelectionStart:f,onSelectionEnd:h,connectionLineType:v,connectionLineStyle:b,connectionLineComponent:S,connectionLineContainerStyle:p,selectionKeyCode:y,selectionOnDrag:m,selectionMode:g,multiSelectionKeyCode:x,panActivationKeyCode:_,zoomActivationKeyCode:E,deleteKeyCode:w,onlyRenderVisibleElements:C,elementsSelectable:H,defaultViewport:D,translateExtent:z,minZoom:I,maxZoom:T,preventScrolling:A,defaultMarkerColor:M,zoomOnScroll:O,zoomOnPinch:R,panOnScroll:L,panOnScrollSpeed:V,panOnScrollMode:k,zoomOnDoubleClick:G,panOnDrag:q,onPaneClick:Z,onPaneMouseEnter:j,onPaneMouseMove:se,onPaneMouseLeave:J,onPaneScroll:X,onPaneContextMenu:Q,paneClickDistance:ue,nodeClickDistance:he,onEdgeContextMenu:ie,onEdgeMouseEnter:ee,onEdgeMouseMove:Te,onEdgeMouseLeave:de,reconnectRadius:be,onReconnect:Le,onReconnectStart:Be,onReconnectEnd:dt,noDragClassName:Gt,noWheelClassName:mn,noPanClassName:rt,disableKeyboardA11y:Dn,nodeExtent:Qt,rfId:Wt,viewport:St,onViewportChange:$e}){return Z_(e),Z_(t),IR(),zR(n),BR(St),(0,B.jsx)(oR,{onPaneClick:Z,onPaneMouseEnter:j,onPaneMouseMove:se,onPaneMouseLeave:J,onPaneContextMenu:Q,onPaneScroll:X,paneClickDistance:ue,deleteKeyCode:w,selectionKeyCode:y,selectionOnDrag:m,selectionMode:g,onSelectionStart:f,onSelectionEnd:h,multiSelectionKeyCode:x,panActivationKeyCode:_,zoomActivationKeyCode:E,elementsSelectable:H,zoomOnScroll:O,zoomOnPinch:R,zoomOnDoubleClick:G,panOnScroll:L,panOnScrollSpeed:V,panOnScrollMode:k,panOnDrag:q,defaultViewport:D,translateExtent:z,minZoom:I,maxZoom:T,onSelectionContextMenu:d,preventScrolling:A,noDragClassName:Gt,noWheelClassName:mn,noPanClassName:rt,disableKeyboardA11y:Dn,onViewportChange:$e,isControlledViewport:!!St,children:(0,B.jsxs)(OR,{children:[(0,B.jsx)(DR,{edgeTypes:t,onEdgeClick:i,onEdgeDoubleClick:l,onReconnect:Le,onReconnectStart:Be,onReconnectEnd:dt,onlyRenderVisibleElements:C,onEdgeContextMenu:ie,onEdgeMouseEnter:ee,onEdgeMouseMove:Te,onEdgeMouseLeave:de,reconnectRadius:be,defaultMarkerColor:M,noPanClassName:rt,disableKeyboardA11y:Dn,rfId:Wt}),(0,B.jsx)(GR,{style:b,type:v,component:S,containerStyle:p}),(0,B.jsx)("div",{className:"react-flow__edgelabel-renderer"}),(0,B.jsx)(dR,{nodeTypes:e,onNodeClick:o,onNodeDoubleClick:a,onNodeMouseEnter:r,onNodeMouseMove:s,onNodeMouseLeave:u,onNodeContextMenu:c,nodeClickDistance:he,onlyRenderVisibleElements:C,noPanClassName:rt,noDragClassName:Gt,disableKeyboardA11y:Dn,nodeExtent:Qt,rfId:Wt}),(0,B.jsx)("div",{className:"react-flow__viewport-portal"})]})})}TE.displayName="GraphView";var VR=(0,P.memo)(TE),j_=({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,width:i,height:a,fitView:l,fitViewOptions:r,minZoom:s=.5,maxZoom:u=2,nodeOrigin:c,nodeExtent:d,zIndexMode:f="basic"}={})=>{let h=new Map,v=new Map,b=new Map,S=new Map,p=o??t??[],y=n??e??[],m=c??[0,0],g=d??ql;Eh(b,S,p);let x=Nf(y,h,v,{nodeOrigin:m,nodeExtent:g,zIndexMode:f}),_=[0,0,1];if(l&&i&&a){let E=Zl(h,{filter:D=>!!((D.width||D.initialWidth)&&(D.height||D.initialHeight))}),{x:w,y:C,zoom:H}=Gs(E,i,a,s,u,r?.padding??.1);_=[w,C,H]}return{rfId:"1",width:i??0,height:a??0,transform:_,nodes:y,nodesInitialized:x,nodeLookup:h,parentLookup:v,edges:p,edgeLookup:S,connectionLookup:b,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:o!==void 0,panZoom:null,minZoom:s,maxZoom:u,translateExtent:ql,nodeExtent:g,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Zi.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:m,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:l??!1,fitViewOptions:r,fitViewResolver:null,connection:{...nh},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:ch,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:th,zIndexMode:f,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},YR=({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,width:i,height:a,fitView:l,fitViewOptions:r,minZoom:s,maxZoom:u,nodeOrigin:c,nodeExtent:d,zIndexMode:f})=>T_((h,v)=>{async function b(){let{nodeLookup:S,panZoom:p,fitViewOptions:y,fitViewResolver:m,width:g,height:x,minZoom:_,maxZoom:E}=v();p&&(await Px({nodes:S,width:g,height:x,panZoom:p,minZoom:_,maxZoom:E},y),m?.resolve(!0),h({fitViewResolver:null}))}return{...j_({nodes:e,edges:t,width:i,height:a,fitView:l,fitViewOptions:r,minZoom:s,maxZoom:u,nodeOrigin:c,nodeExtent:d,defaultNodes:n,defaultEdges:o,zIndexMode:f}),setNodes:S=>{let{nodeLookup:p,parentLookup:y,nodeOrigin:m,elevateNodesOnSelect:g,fitViewQueued:x,zIndexMode:_}=v(),E=Nf(S,p,y,{nodeOrigin:m,nodeExtent:d,elevateNodesOnSelect:g,checkEquality:!0,zIndexMode:_});x&&E?(b(),h({nodes:S,nodesInitialized:E,fitViewQueued:!1,fitViewOptions:void 0})):h({nodes:S,nodesInitialized:E})},setEdges:S=>{let{connectionLookup:p,edgeLookup:y}=v();Eh(p,y,S),h({edges:S})},setDefaultNodesAndEdges:(S,p)=>{if(S){let{setNodes:y}=v();y(S),h({hasDefaultNodes:!0})}if(p){let{setEdges:y}=v();y(p),h({hasDefaultEdges:!0})}},updateNodeInternals:S=>{let{triggerNodeChanges:p,nodeLookup:y,parentLookup:m,domNode:g,nodeOrigin:x,nodeExtent:_,debug:E,fitViewQueued:w,zIndexMode:C}=v(),{changes:H,updatedInternals:D}=Kx(S,y,m,g,x,_,C);D&&($x(y,m,{nodeOrigin:x,nodeExtent:_,zIndexMode:C}),w?(b(),h({fitViewQueued:!1,fitViewOptions:void 0})):h({}),H?.length>0&&(E&&console.log("React Flow: trigger node changes",H),p?.(H)))},updateNodePositions:(S,p=!1)=>{let y=[],m=[],{nodeLookup:g,triggerNodeChanges:x,connection:_,updateConnection:E,onNodesChangeMiddlewareMap:w}=v();for(let[C,H]of S){let D=g.get(C),z=!!(D?.expandParent&&D?.parentId&&H?.position),I={id:C,type:"position",position:z?{x:Math.max(0,H.position.x),y:Math.max(0,H.position.y)}:H.position,dragging:p};if(D&&_.inProgress&&_.fromNode.id===D.id){let T=ji(D,_.fromHandle,W.Left,!0);E({..._,from:T})}z&&D.parentId&&y.push({id:C,parentId:D.parentId,rect:{...H.internals.positionAbsolute,width:H.measured.width??0,height:H.measured.height??0}}),m.push(I)}if(y.length>0){let{parentLookup:C,nodeOrigin:H}=v(),D=Cf(y,g,C,H);m.push(...D)}for(let C of w.values())m=C(m);x(m)},triggerNodeChanges:S=>{let{onNodesChange:p,setNodes:y,nodes:m,hasDefaultNodes:g,debug:x}=v();if(S?.length){if(g){let _=J_(S,m);y(_)}x&&console.log("React Flow: trigger node changes",S),p?.(S)}},triggerEdgeChanges:S=>{let{onEdgesChange:p,setEdges:y,edges:m,hasDefaultEdges:g,debug:x}=v();if(S?.length){if(g){let _=eE(S,m);y(_)}x&&console.log("React Flow: trigger edge changes",S),p?.(S)}},addSelectedNodes:S=>{let{multiSelectionActive:p,edgeLookup:y,nodeLookup:m,triggerNodeChanges:g,triggerEdgeChanges:x}=v();if(p){let _=S.map(E=>Da(E,!0));g(_);return}g(Wl(m,new Set([...S]),!0)),x(Wl(y))},addSelectedEdges:S=>{let{multiSelectionActive:p,edgeLookup:y,nodeLookup:m,triggerNodeChanges:g,triggerEdgeChanges:x}=v();if(p){let _=S.map(E=>Da(E,!0));x(_);return}x(Wl(y,new Set([...S]))),g(Wl(m,new Set,!0))},unselectNodesAndEdges:({nodes:S,edges:p}={})=>{let{edges:y,nodes:m,nodeLookup:g,triggerNodeChanges:x,triggerEdgeChanges:_}=v(),E=S||m,w=p||y,C=[];for(let D of E){if(!D.selected)continue;let z=g.get(D.id);z&&(z.selected=!1),C.push(Da(D.id,!1))}let H=[];for(let D of w)D.selected&&H.push(Da(D.id,!1));x(C),_(H)},setMinZoom:S=>{let{panZoom:p,maxZoom:y}=v();p?.setScaleExtent([S,y]),h({minZoom:S})},setMaxZoom:S=>{let{panZoom:p,minZoom:y}=v();p?.setScaleExtent([y,S]),h({maxZoom:S})},setTranslateExtent:S=>{v().panZoom?.setTranslateExtent(S),h({translateExtent:S})},resetSelectedElements:()=>{let{edges:S,nodes:p,triggerNodeChanges:y,triggerEdgeChanges:m,elementsSelectable:g}=v();if(!g)return;let x=p.reduce((E,w)=>w.selected?[...E,Da(w.id,!1)]:E,[]),_=S.reduce((E,w)=>w.selected?[...E,Da(w.id,!1)]:E,[]);y(x),m(_)},setNodeExtent:S=>{let{nodes:p,nodeLookup:y,parentLookup:m,nodeOrigin:g,elevateNodesOnSelect:x,nodeExtent:_,zIndexMode:E}=v();S[0][0]===_[0][0]&&S[0][1]===_[0][1]&&S[1][0]===_[1][0]&&S[1][1]===_[1][1]||(Nf(p,y,m,{nodeOrigin:g,nodeExtent:S,elevateNodesOnSelect:x,checkEquality:!1,zIndexMode:E}),h({nodeExtent:S}))},panBy:S=>{let{transform:p,width:y,height:m,panZoom:g,translateExtent:x}=v();return Qx({delta:S,panZoom:g,transform:p,translateExtent:x,width:y,height:m})},setCenter:async(S,p,y)=>{let{width:m,height:g,maxZoom:x,panZoom:_}=v();if(!_)return Promise.resolve(!1);let E=typeof y?.zoom<"u"?y.zoom:x;return await _.setViewport({x:m/2-S*E,y:g/2-p*E,zoom:E},{duration:y?.duration,ease:y?.ease,interpolate:y?.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{h({connection:{...nh}})},updateConnection:S=>{h({connection:S})},reset:()=>h({...j_()})}},Object.is);function XR({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:o,initialWidth:i,initialHeight:a,initialMinZoom:l,initialMaxZoom:r,initialFitViewOptions:s,fitView:u,nodeOrigin:c,nodeExtent:d,zIndexMode:f,children:h}){let[v]=(0,P.useState)(()=>YR({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,width:i,height:a,fitView:u,minZoom:l,maxZoom:r,fitViewOptions:s,nodeOrigin:c,nodeExtent:d,zIndexMode:f}));return(0,B.jsx)(uD,{value:v,children:(0,B.jsx)(OD,{children:h})})}function qR({children:e,nodes:t,edges:n,defaultNodes:o,defaultEdges:i,width:a,height:l,fitView:r,fitViewOptions:s,minZoom:u,maxZoom:c,nodeOrigin:d,nodeExtent:f,zIndexMode:h}){return(0,P.useContext)(zf)?(0,B.jsx)(B.Fragment,{children:e}):(0,B.jsx)(XR,{initialNodes:t,initialEdges:n,defaultNodes:o,defaultEdges:i,initialWidth:a,initialHeight:l,fitView:r,initialFitViewOptions:s,initialMinZoom:u,initialMaxZoom:c,nodeOrigin:d,nodeExtent:f,zIndexMode:h,children:e})}var ZR={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function jR({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,className:i,nodeTypes:a,edgeTypes:l,onNodeClick:r,onEdgeClick:s,onInit:u,onMove:c,onMoveStart:d,onMoveEnd:f,onConnect:h,onConnectStart:v,onConnectEnd:b,onClickConnectStart:S,onClickConnectEnd:p,onNodeMouseEnter:y,onNodeMouseMove:m,onNodeMouseLeave:g,onNodeContextMenu:x,onNodeDoubleClick:_,onNodeDragStart:E,onNodeDrag:w,onNodeDragStop:C,onNodesDelete:H,onEdgesDelete:D,onDelete:z,onSelectionChange:I,onSelectionDragStart:T,onSelectionDrag:A,onSelectionDragStop:M,onSelectionContextMenu:O,onSelectionStart:R,onSelectionEnd:L,onBeforeDelete:V,connectionMode:k,connectionLineType:G=bo.Bezier,connectionLineStyle:q,connectionLineComponent:Z,connectionLineContainerStyle:j,deleteKeyCode:se="Backspace",selectionKeyCode:J="Shift",selectionOnDrag:X=!1,selectionMode:Q=wa.Full,panActivationKeyCode:ue="Space",multiSelectionKeyCode:he=Kl()?"Meta":"Control",zoomActivationKeyCode:ie=Kl()?"Meta":"Control",snapToGrid:ee,snapGrid:Te,onlyRenderVisibleElements:de=!1,selectNodesOnDrag:be,nodesDraggable:Le,autoPanOnNodeFocus:Be,nodesConnectable:dt,nodesFocusable:Gt,nodeOrigin:mn=Q_,edgesFocusable:rt,edgesReconnectable:Dn,elementsSelectable:Qt=!0,defaultViewport:Wt=_D,minZoom:St=.5,maxZoom:$e=2,translateExtent:ro=ql,preventScrolling:li=!0,nodeExtent:jn,defaultMarkerColor:ri="#b1b1b7",zoomOnScroll:$n=!0,zoomOnPinch:Rn=!0,panOnScroll:To=!1,panOnScrollSpeed:pt=.5,panOnScrollMode:Fn=ti.Free,zoomOnDoubleClick:Kn=!0,panOnDrag:No=!0,onPaneClick:Co,onPaneMouseEnter:si,onPaneMouseMove:ui,onPaneMouseLeave:Pa,onPaneScroll:wo,onPaneContextMenu:ka,paneClickDistance:Ga=1,nodeClickDistance:We=0,children:Ao,onReconnect:Mo,onReconnectStart:Do,onReconnectEnd:pe,onEdgeContextMenu:le,onEdgeDoubleClick:ae,onEdgeMouseEnter:we,onEdgeMouseMove:ge,onEdgeMouseLeave:He,reconnectRadius:wt=10,onNodesChange:Qn,onEdgesChange:On,noDragClassName:ci="nodrag",noWheelClassName:xt="nowheel",noPanClassName:lr="nopan",fitView:rr,fitViewOptions:sr,connectOnClick:Js,attributionPosition:eu,proOptions:ne,defaultEdgeOptions:N,elevateNodesOnSelect:Y=!0,elevateEdgesOnSelect:K=!1,disableKeyboardA11y:Ge=!1,autoPanOnConnect:_t,autoPanOnNodeDrag:et,autoPanSpeed:Ht,connectionRadius:Ut,isValidConnection:so,onError:ur,style:mt,id:cr,nodeDragThreshold:tu,connectionDragThreshold:LT,viewport:BT,onViewportChange:HT,width:PT,height:kT,colorMode:GT="light",debug:UT,onScroll:Eg,ariaLabelConfig:IT,zIndexMode:Tg="basic",...VT},YT){let $f=cr||"1",XT=CD(GT),qT=(0,P.useCallback)(Ng=>{Ng.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),Eg?.(Ng)},[Eg]);return(0,B.jsx)("div",{"data-testid":"rf__wrapper",...VT,onScroll:qT,style:{...mt,...ZR},ref:YT,className:ot(["react-flow",i,XT]),id:cr,role:"application",children:(0,B.jsxs)(qR,{nodes:e,edges:t,width:PT,height:kT,fitView:rr,fitViewOptions:sr,minZoom:St,maxZoom:$e,nodeOrigin:mn,nodeExtent:jn,zIndexMode:Tg,children:[(0,B.jsx)(VR,{onInit:u,onNodeClick:r,onEdgeClick:s,onNodeMouseEnter:y,onNodeMouseMove:m,onNodeMouseLeave:g,onNodeContextMenu:x,onNodeDoubleClick:_,nodeTypes:a,edgeTypes:l,connectionLineType:G,connectionLineStyle:q,connectionLineComponent:Z,connectionLineContainerStyle:j,selectionKeyCode:J,selectionOnDrag:X,selectionMode:Q,deleteKeyCode:se,multiSelectionKeyCode:he,panActivationKeyCode:ue,zoomActivationKeyCode:ie,onlyRenderVisibleElements:de,defaultViewport:Wt,translateExtent:ro,minZoom:St,maxZoom:$e,preventScrolling:li,zoomOnScroll:$n,zoomOnPinch:Rn,zoomOnDoubleClick:Kn,panOnScroll:To,panOnScrollSpeed:pt,panOnScrollMode:Fn,panOnDrag:No,onPaneClick:Co,onPaneMouseEnter:si,onPaneMouseMove:ui,onPaneMouseLeave:Pa,onPaneScroll:wo,onPaneContextMenu:ka,paneClickDistance:Ga,nodeClickDistance:We,onSelectionContextMenu:O,onSelectionStart:R,onSelectionEnd:L,onReconnect:Mo,onReconnectStart:Do,onReconnectEnd:pe,onEdgeContextMenu:le,onEdgeDoubleClick:ae,onEdgeMouseEnter:we,onEdgeMouseMove:ge,onEdgeMouseLeave:He,reconnectRadius:wt,defaultMarkerColor:ri,noDragClassName:ci,noWheelClassName:xt,noPanClassName:lr,rfId:$f,disableKeyboardA11y:Ge,nodeExtent:jn,viewport:BT,onViewportChange:HT}),(0,B.jsx)(ND,{nodes:e,edges:t,defaultNodes:n,defaultEdges:o,onConnect:h,onConnectStart:v,onConnectEnd:b,onClickConnectStart:S,onClickConnectEnd:p,nodesDraggable:Le,autoPanOnNodeFocus:Be,nodesConnectable:dt,nodesFocusable:Gt,edgesFocusable:rt,edgesReconnectable:Dn,elementsSelectable:Qt,elevateNodesOnSelect:Y,elevateEdgesOnSelect:K,minZoom:St,maxZoom:$e,nodeExtent:jn,onNodesChange:Qn,onEdgesChange:On,snapToGrid:ee,snapGrid:Te,connectionMode:k,translateExtent:ro,connectOnClick:Js,defaultEdgeOptions:N,fitView:rr,fitViewOptions:sr,onNodesDelete:H,onEdgesDelete:D,onDelete:z,onNodeDragStart:E,onNodeDrag:w,onNodeDragStop:C,onSelectionDrag:A,onSelectionDragStart:T,onSelectionDragStop:M,onMove:c,onMoveStart:d,onMoveEnd:f,noPanClassName:lr,nodeOrigin:mn,rfId:$f,autoPanOnConnect:_t,autoPanOnNodeDrag:et,autoPanSpeed:Ht,onError:ur,connectionRadius:Ut,isValidConnection:so,selectNodesOnDrag:be,nodeDragThreshold:tu,connectionDragThreshold:LT,onBeforeDelete:V,debug:UT,ariaLabelConfig:IT,zIndexMode:Tg}),(0,B.jsx)(xD,{onSelectionChange:I}),Ao,(0,B.jsx)(gD,{proOptions:ne,position:eu}),(0,B.jsx)(hD,{rfId:$f,disableKeyboardA11y:Ge})]})})}var NE=tE(jR);function CE(e){let[t,n]=(0,P.useState)(e),o=(0,P.useCallback)(i=>n(a=>J_(i,a)),[]);return[t,n,o]}function wE(e){let[t,n]=(0,P.useState)(e),o=(0,P.useCallback)(i=>n(a=>eE(i,a)),[]);return[t,n,o]}var n8=wn.error014();function $R({dimensions:e,lineWidth:t,variant:n,className:o}){return(0,B.jsx)("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:ot(["react-flow__background-pattern",n,o])})}function FR({radius:e,className:t}){return(0,B.jsx)("circle",{cx:e,cy:e,r:e,className:ot(["react-flow__background-pattern","dots",t])})}var xo;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(xo||(xo={}));var KR={[xo.Dots]:1,[xo.Lines]:1,[xo.Cross]:6},QR=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function AE({id:e,variant:t=xo.Dots,gap:n=20,size:o,lineWidth:i=1,offset:a=0,color:l,bgColor:r,style:s,className:u,patternClassName:c}){let d=(0,P.useRef)(null),{transform:f,patternId:h}=Ae(QR,je),v=o||KR[t],b=t===xo.Dots,S=t===xo.Cross,p=Array.isArray(n)?n:[n,n],y=[p[0]*f[2]||1,p[1]*f[2]||1],m=v*f[2],g=Array.isArray(a)?a:[a,a],x=S?[m,m]:y,_=[g[0]*f[2]||1+x[0]/2,g[1]*f[2]||1+x[1]/2],E=`${h}${e||""}`;return(0,B.jsxs)("svg",{className:ot(["react-flow__background",u]),style:{...s,...Lf,"--xy-background-color-props":r,"--xy-background-pattern-color-props":l},ref:d,"data-testid":"rf__background",children:[(0,B.jsx)("pattern",{id:E,x:f[0]%y[0],y:f[1]%y[1],width:y[0],height:y[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${_[0]},-${_[1]})`,children:b?(0,B.jsx)(FR,{radius:m/2,className:c}):(0,B.jsx)($R,{dimensions:x,lineWidth:i,variant:t,className:c})}),(0,B.jsx)("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${E})`})]})}AE.displayName="Background";var ME=(0,P.memo)(AE);function WR(){return(0,B.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:(0,B.jsx)("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function JR(){return(0,B.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:(0,B.jsx)("path",{d:"M0 0h32v4.2H0z"})})}function eO(){return(0,B.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:(0,B.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 tO(){return(0,B.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:(0,B.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 nO(){return(0,B.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:(0,B.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 Rf({children:e,className:t,...n}){return(0,B.jsx)("button",{type:"button",className:ot(["react-flow__controls-button",t]),...n,children:e})}var oO=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function DE({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:o=!0,fitViewOptions:i,onZoomIn:a,onZoomOut:l,onFitView:r,onInteractiveChange:s,className:u,children:c,position:d="bottom-left",orientation:f="vertical","aria-label":h}){let v=Qe(),{isInteractive:b,minZoomReached:S,maxZoomReached:p,ariaLabelConfig:y}=Ae(oO,je),{zoomIn:m,zoomOut:g,fitView:x}=Mh(),_=()=>{m(),a?.()},E=()=>{g(),l?.()},w=()=>{x(i),r?.()},C=()=>{v.setState({nodesDraggable:!b,nodesConnectable:!b,elementsSelectable:!b}),s?.(!b)};return(0,B.jsxs)(Jl,{className:ot(["react-flow__controls",f==="horizontal"?"horizontal":"vertical",u]),position:d,style:e,"data-testid":"rf__controls","aria-label":h??y["controls.ariaLabel"],children:[t&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(Rf,{onClick:_,className:"react-flow__controls-zoomin",title:y["controls.zoomIn.ariaLabel"],"aria-label":y["controls.zoomIn.ariaLabel"],disabled:p,children:(0,B.jsx)(WR,{})}),(0,B.jsx)(Rf,{onClick:E,className:"react-flow__controls-zoomout",title:y["controls.zoomOut.ariaLabel"],"aria-label":y["controls.zoomOut.ariaLabel"],disabled:S,children:(0,B.jsx)(JR,{})})]}),n&&(0,B.jsx)(Rf,{className:"react-flow__controls-fitview",onClick:w,title:y["controls.fitView.ariaLabel"],"aria-label":y["controls.fitView.ariaLabel"],children:(0,B.jsx)(eO,{})}),o&&(0,B.jsx)(Rf,{className:"react-flow__controls-interactive",onClick:C,title:y["controls.interactive.ariaLabel"],"aria-label":y["controls.interactive.ariaLabel"],children:b?(0,B.jsx)(nO,{}):(0,B.jsx)(tO,{})}),c]})}DE.displayName="Controls";var o8=(0,P.memo)(DE);function iO({id:e,x:t,y:n,width:o,height:i,style:a,color:l,strokeColor:r,strokeWidth:s,className:u,borderRadius:c,shapeRendering:d,selected:f,onClick:h}){let{background:v,backgroundColor:b}=a||{},S=l||v||b;return(0,B.jsx)("rect",{className:ot(["react-flow__minimap-node",{selected:f},u]),x:t,y:n,rx:c,ry:c,width:o,height:i,style:{fill:S,stroke:r,strokeWidth:s},shapeRendering:d,onClick:h?p=>h(p,e):void 0})}var aO=(0,P.memo)(iO),lO=e=>e.nodes.map(t=>t.id),wh=e=>e instanceof Function?e:()=>e;function rO({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:o=5,nodeStrokeWidth:i,nodeComponent:a=aO,onClick:l}){let r=Ae(lO,je),s=wh(t),u=wh(e),c=wh(n),d=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return(0,B.jsx)(B.Fragment,{children:r.map(f=>(0,B.jsx)(uO,{id:f,nodeColorFunc:s,nodeStrokeColorFunc:u,nodeClassNameFunc:c,nodeBorderRadius:o,nodeStrokeWidth:i,NodeComponent:a,onClick:l,shapeRendering:d},f))})}function sO({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:o,nodeBorderRadius:i,nodeStrokeWidth:a,shapeRendering:l,NodeComponent:r,onClick:s}){let{node:u,x:c,y:d,width:f,height:h}=Ae(v=>{let b=v.nodeLookup.get(e);if(!b)return{node:void 0,x:0,y:0,width:0,height:0};let S=b.internals.userNode,{x:p,y}=b.internals.positionAbsolute,{width:m,height:g}=So(S);return{node:S,x:p,y,width:m,height:g}},je);return!u||u.hidden||!fh(u)?null:(0,B.jsx)(r,{x:c,y:d,width:f,height:h,style:u.style,selected:!!u.selected,className:o(u),color:t(u),borderRadius:i,strokeColor:n(u),strokeWidth:a,shapeRendering:l,onClick:s,id:u.id})}var uO=(0,P.memo)(sO),cO=(0,P.memo)(rO),fO=200,dO=150,pO=e=>!e.hidden,mO=e=>{let 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?sh(Zl(e.nodeLookup,{filter:pO}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},hO="react-flow__minimap-desc";function RE({style:e,className:t,nodeStrokeColor:n,nodeColor:o,nodeClassName:i="",nodeBorderRadius:a=5,nodeStrokeWidth:l,nodeComponent:r,bgColor:s,maskColor:u,maskStrokeColor:c,maskStrokeWidth:d,position:f="bottom-right",onClick:h,onNodeClick:v,pannable:b=!1,zoomable:S=!1,ariaLabel:p,inversePan:y,zoomStep:m=1,offsetScale:g=5}){let x=Qe(),_=(0,P.useRef)(null),{boundingRect:E,viewBB:w,rfId:C,panZoom:H,translateExtent:D,flowWidth:z,flowHeight:I,ariaLabelConfig:T}=Ae(mO,je),A=e?.width??fO,M=e?.height??dO,O=E.width/A,R=E.height/M,L=Math.max(O,R),V=L*A,k=L*M,G=g*L,q=E.x-(V-E.width)/2-G,Z=E.y-(k-E.height)/2-G,j=V+G*2,se=k+G*2,J=`${hO}-${C}`,X=(0,P.useRef)(0),Q=(0,P.useRef)();X.current=L,(0,P.useEffect)(()=>{if(_.current&&H)return Q.current=i_({domNode:_.current,panZoom:H,getTransform:()=>x.getState().transform,getViewScale:()=>X.current}),()=>{Q.current?.destroy()}},[H]),(0,P.useEffect)(()=>{Q.current?.update({translateExtent:D,width:z,height:I,inversePan:y,pannable:b,zoomStep:m,zoomable:S})},[b,S,y,m,D,z,I]);let ue=h?ee=>{let[Te,de]=Q.current?.pointer(ee)||[0,0];h(ee,{x:Te,y:de})}:void 0,he=v?(0,P.useCallback)((ee,Te)=>{let de=x.getState().nodeLookup.get(Te).internals.userNode;v(ee,de)},[]):void 0,ie=p??T["minimap.ariaLabel"];return(0,B.jsx)(Jl,{position:f,style:{...e,"--xy-minimap-background-color-props":typeof s=="string"?s: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*L:void 0,"--xy-minimap-node-background-color-props":typeof o=="string"?o:void 0,"--xy-minimap-node-stroke-color-props":typeof n=="string"?n:void 0,"--xy-minimap-node-stroke-width-props":typeof l=="number"?l:void 0},className:ot(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:(0,B.jsxs)("svg",{width:A,height:M,viewBox:`${q} ${Z} ${j} ${se}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":J,ref:_,onClick:ue,children:[ie&&(0,B.jsx)("title",{id:J,children:ie}),(0,B.jsx)(cO,{onClick:he,nodeColor:o,nodeStrokeColor:n,nodeBorderRadius:a,nodeClassName:i,nodeStrokeWidth:l,nodeComponent:r}),(0,B.jsx)("path",{className:"react-flow__minimap-mask",d:`M${q-G},${Z-G}h${j+G*2}v${se+G*2}h${-j-G*2}z
|
|
15
|
-
M${w.x},${w.y}h${w.width}v${w.height}h${-w.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}RE.displayName="MiniMap";var i8=(0,P.memo)(RE),gO=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,yO={[$i.Line]:"right",[$i.Handle]:"bottom-right"};function vO({nodeId:e,position:t,variant:n=$i.Handle,className:o,style:i=void 0,children:a,color:l,minWidth:r=10,minHeight:s=10,maxWidth:u=Number.MAX_VALUE,maxHeight:c=Number.MAX_VALUE,keepAspectRatio:d=!1,resizeDirection:f,autoScale:h=!0,shouldResize:v,onResizeStart:b,onResize:S,onResizeEnd:p}){let y=aE(),m=typeof e=="string"?e:y,g=Qe(),x=(0,P.useRef)(null),_=n===$i.Handle,E=Ae((0,P.useCallback)(gO(_&&h),[_,h]),je),w=(0,P.useRef)(null),C=t??yO[n];(0,P.useEffect)(()=>{if(!(!x.current||!m))return w.current||(w.current=u_({domNode:x.current,nodeId:m,getStoreItems:()=>{let{nodeLookup:D,transform:z,snapGrid:I,snapToGrid:T,nodeOrigin:A,domNode:M}=g.getState();return{nodeLookup:D,transform:z,snapGrid:I,snapToGrid:T,nodeOrigin:A,paneDomNode:M}},onChange:(D,z)=>{let{triggerNodeChanges:I,nodeLookup:T,parentLookup:A,nodeOrigin:M}=g.getState(),O=[],R={x:D.x,y:D.y},L=T.get(m);if(L&&L.expandParent&&L.parentId){let V=L.origin??M,k=D.width??L.measured.width??0,G=D.height??L.measured.height??0,q={id:L.id,parentId:L.parentId,rect:{width:k,height:G,...dh({x:D.x??L.position.x,y:D.y??L.position.y},{width:k,height:G},L.parentId,T,V)}},Z=Cf([q],T,A,M);O.push(...Z),R.x=D.x?Math.max(V[0]*k,D.x):void 0,R.y=D.y?Math.max(V[1]*G,D.y):void 0}if(R.x!==void 0&&R.y!==void 0){let V={id:m,type:"position",position:{...R}};O.push(V)}if(D.width!==void 0&&D.height!==void 0){let k={id:m,type:"dimensions",resizing:!0,setAttributes:f?f==="horizontal"?"width":"height":!0,dimensions:{width:D.width,height:D.height}};O.push(k)}for(let V of z){let k={...V,type:"position"};O.push(k)}I(O)},onEnd:({width:D,height:z})=>{let I={id:m,type:"dimensions",resizing:!1,dimensions:{width:D,height:z}};g.getState().triggerNodeChanges([I])}})),w.current.update({controlPosition:C,boundaries:{minWidth:r,minHeight:s,maxWidth:u,maxHeight:c},keepAspectRatio:d,resizeDirection:f,onResizeStart:b,onResize:S,onResizeEnd:p,shouldResize:v}),()=>{w.current?.destroy()}},[C,r,s,u,c,d,b,S,p,v]);let H=C.split("-");return(0,B.jsx)("div",{className:ot(["react-flow__resize-control","nodrag",...H,n,o]),ref:x,style:{...i,scale:E,...l&&{[_?"backgroundColor":"borderColor"]:l}},children:a})}var a8=(0,P.memo)(vO);var Rh=oe(At(),1);var OE="(prefers-color-scheme: dark)";function bO(e){return e?ha.DARK:ha.LIGHT}function Oh(){return typeof window>"u"||typeof window.matchMedia!="function"?ha.DARK:bO(window.matchMedia(OE).matches)}function SO(e){if(typeof window>"u"||typeof window.matchMedia!="function")return()=>{};let t=window.matchMedia(OE);return typeof t.addEventListener=="function"?(t.addEventListener("change",e),()=>t.removeEventListener("change",e)):(t.addListener(e),()=>t.removeListener(e))}function xO(e){return e!==void 0?{subscribe:()=>()=>{},getSnapshot:()=>e,getServerSnapshot:()=>e}:{subscribe:SO,getSnapshot:Oh,getServerSnapshot:()=>ha.DARK}}function zE(e){let t=Rh.default.useMemo(()=>xO(e),[e]);return Rh.default.useSyncExternalStore(t.subscribe,t.getSnapshot,t.getServerSnapshot)}function LE(e){if(!e)return null;let t={},n={},o={},i={},a=new Set;for(let r of e.edges)r.kind==="contains"&&(i[r.source]||(i[r.source]=[]),i[r.source].push(r.target),a.add(r.target));let l=new Set(Object.keys(i));for(let r of e.nodes){let s=r.io,u=l.has(r.id);for(let c of s.outputs)c.digest&&!t[c.digest]&&(t[c.digest]={name:c.name,concept:c.concept,contentType:c.content_type}),c.digest&&!u&&(n[c.digest]=r.id);for(let c of s.inputs)c.digest&&!t[c.digest]&&(t[c.digest]={name:c.name,concept:c.concept,contentType:c.content_type}),c.digest&&!u&&(o[c.digest]||(o[c.digest]=[]),o[c.digest].push(r.id))}return{stuffRegistry:t,stuffProducers:n,stuffConsumers:o,controllerNodeIds:l,childNodeIds:a,containmentTree:i}}function _o(e,t){let n={};for(let[l,r]of Object.entries(t.containmentTree))for(let s of r)n[s]=l;for(let[l,r]of Object.entries(t.stuffProducers)){let s="stuff_"+l,u=n[r];u&&(n[s]=u)}for(let l of e.nodes){if(!t.controllerNodeIds.has(l.id))continue;let r=n[l.id];if(r)for(let s of l.io.outputs){if(!s.digest)continue;let u="stuff_"+s.digest;n[u]||(n[u]=r)}}for(let l of e.edges)if(l.kind==="batch_item"&&l.target_stuff_digest){let r="stuff_"+l.target_stuff_digest;t.controllerNodeIds.has(l.source)&&(n[r]=l.source)}let o=new Set;for(let l of e.edges)(l.kind==="batch_item"||l.kind==="batch_aggregate"||l.kind==="parallel_combine")&&(l.source_stuff_digest&&o.add(l.source_stuff_digest),l.target_stuff_digest&&o.add(l.target_stuff_digest));let i="stuff_",a=Object.keys(n).filter(l=>l.startsWith(i));for(let l of a){let r=l.slice(i.length),s=n[l];if(!s)continue;let u=t.stuffConsumers[r]||[];if(u.length===0){o.has(r)||delete n[l];continue}for(;s;){let c=s;if(u.some(h=>_O(h,c,n)))break;let f=n[s];f?(n[l]=f,s=f):(delete n[l],s=void 0)}}return n}function _O(e,t,n){let o=n[e];for(;o;){if(o===t)return!0;o=n[o]}return!1}function BE(e,t){return e.pipe_registry?.[t]}function zh(e,t){if(!e.concept_registry)return;let n=e.concept_registry[t];if(n)return n;for(let o of Object.values(e.concept_registry))if(o.code===t)return o}function HE(e){return!e||typeof e!="string"?!1:e.startsWith("https://")||e.startsWith("http://")||e.startsWith("file://")||e.startsWith("/")}function Hf(e){return!e||typeof e!="string"?!1:e.startsWith("https://")||e.startsWith("http://")||e.startsWith("file://")||e.startsWith("/")}function PE(e){if(!e)return null;if(typeof e=="string")return HE(e)?e:null;if(typeof e!="object")return null;let t=e,n=[t.public_url,t.src,t.href,t.uri,t.url];for(let o of n)if(HE(o))return o;return null}function kE(e){if(!e)return null;if(typeof e=="string")return Hf(e)?e:null;if(typeof e!="object")return null;let t=e,n=[t.public_url,t.src,t.href,t.uri,t.url];for(let o of n)if(Hf(o))return o;return null}function GE(e){if(!e)return null;if(typeof e=="string")return e.startsWith("pipelex-storage://")?e:null;if(typeof e!="object")return null;let t=e,n=[t.uri,t.url,t.src,t.href];for(let o of n)if(typeof o=="string"&&o.startsWith("pipelex-storage://"))return o;return null}function Lh(e){if(!e||typeof e!="object")return null;let t=e;return typeof t.filename=="string"&&t.filename?t.filename:null}function UE(e,t,n){if(t&&t.includes("/"))return t;if(e&&typeof e=="object"){let i=e;if(typeof i.mime_type=="string"&&i.mime_type)return i.mime_type}let o=Lh(e)||n||(typeof e=="string"?e:null);if(o){let a=o.match(/\.([a-zA-Z0-9]+)(?:\?|#|$)/)?.[1]?.toLowerCase();if(a){if(a==="pdf")return"application/pdf";if(["png","jpg","jpeg","gif","webp","svg","bmp"].includes(a))return`image/${a==="jpg"?"jpeg":a==="svg"?"svg+xml":a}`}}return null}function IE(e){return e==="application/pdf"?"PDF":e?.startsWith("image/")?"Image":"HTML"}function Bh(e,t){for(let n of e.nodes)for(let o of n.io?.outputs??[])if(o.digest===t)return{digest:t,name:o.name,concept:o.concept,contentType:o.content_type,data:o.data,dataText:o.data_text,dataHtml:o.data_html};for(let n of e.nodes)for(let o of n.io?.inputs??[])if(o.digest===t)return{digest:t,name:o.name,concept:o.concept,contentType:o.content_type,data:o.data,dataText:o.data_text,dataHtml:o.data_html};return null}var An=oe(At(),1);var{entries:KE,setPrototypeOf:VE,isFrozen:EO,getPrototypeOf:TO,getOwnPropertyDescriptor:NO}=Object,{freeze:$t,seal:Zn,create:js}=Object,{apply:Vh,construct:Yh}=typeof Reflect<"u"&&Reflect;$t||($t=function(t){return t});Zn||(Zn=function(t){return t});Vh||(Vh=function(t,n){for(var o=arguments.length,i=new Array(o>2?o-2:0),a=2;a<o;a++)i[a-2]=arguments[a];return t.apply(n,i)});Yh||(Yh=function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return new t(...o)});var Vs=Ft(Array.prototype.forEach),CO=Ft(Array.prototype.lastIndexOf),YE=Ft(Array.prototype.pop),Ys=Ft(Array.prototype.push),wO=Ft(Array.prototype.splice),kf=Ft(String.prototype.toLowerCase),Hh=Ft(String.prototype.toString),Ph=Ft(String.prototype.match),er=Ft(String.prototype.replace),AO=Ft(String.prototype.indexOf),MO=Ft(String.prototype.trim),ao=Ft(Object.prototype.hasOwnProperty),jt=Ft(RegExp.prototype.test),Xs=DO(TypeError);function Ft(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return Vh(e,t,o)}}function DO(e){return function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Yh(e,n)}}function Se(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:kf;VE&&VE(e,null);let o=t.length;for(;o--;){let i=t[o];if(typeof i=="string"){let a=n(i);a!==i&&(EO(t)||(t[o]=a),i=a)}e[i]=!0}return e}function RO(e){for(let t=0;t<e.length;t++)ao(e,t)||(e[t]=null);return e}function Eo(e){let t=js(null);for(let[n,o]of KE(e))ao(e,n)&&(Array.isArray(o)?t[n]=RO(o):o&&typeof o=="object"&&o.constructor===Object?t[n]=Eo(o):t[n]=o);return t}function qs(e,t){for(;e!==null;){let o=NO(e,t);if(o){if(o.get)return Ft(o.get);if(typeof o.value=="function")return Ft(o.value)}e=TO(e)}function n(){return null}return n}var XE=$t(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),kh=$t(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Gh=$t(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),OO=$t(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Uh=$t(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),zO=$t(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),qE=$t(["#text"]),ZE=$t(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Ih=$t(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),jE=$t(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Pf=$t(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),LO=Zn(/\{\{[\w\W]*|[\w\W]*\}\}/gm),BO=Zn(/<%[\w\W]*|[\w\W]*%>/gm),HO=Zn(/\$\{[\w\W]*/gm),PO=Zn(/^data-[\-\w.\u00B7-\uFFFF]+$/),kO=Zn(/^aria-[\-\w]+$/),QE=Zn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),GO=Zn(/^(?:\w+script|data):/i),UO=Zn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),WE=Zn(/^html$/i),IO=Zn(/^[a-z][.\w]*(-[.\w]+)+$/i),$E=Object.freeze({__proto__:null,ARIA_ATTR:kO,ATTR_WHITESPACE:UO,CUSTOM_ELEMENT:IO,DATA_ATTR:PO,DOCTYPE_NAME:WE,ERB_EXPR:BO,IS_ALLOWED_URI:QE,IS_SCRIPT_OR_DATA:GO,MUSTACHE_EXPR:LO,TMPLIT_EXPR:HO}),Zs={element:1,text:3,progressingInstruction:7,comment:8,document:9},VO=function(){return typeof window>"u"?null:window},YO=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let o=null,i="data-tt-policy-suffix";n&&n.hasAttribute(i)&&(o=n.getAttribute(i));let a="dompurify"+(o?"#"+o:"");try{return t.createPolicy(a,{createHTML(l){return l},createScriptURL(l){return l}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},FE=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function JE(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:VO(),t=ne=>JE(ne);if(t.version="3.4.0",t.removed=[],!e||!e.document||e.document.nodeType!==Zs.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e,o=n,i=o.currentScript,{DocumentFragment:a,HTMLTemplateElement:l,Node:r,Element:s,NodeFilter:u,NamedNodeMap:c=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:d,DOMParser:f,trustedTypes:h}=e,v=s.prototype,b=qs(v,"cloneNode"),S=qs(v,"remove"),p=qs(v,"nextSibling"),y=qs(v,"childNodes"),m=qs(v,"parentNode");if(typeof l=="function"){let ne=n.createElement("template");ne.content&&ne.content.ownerDocument&&(n=ne.content.ownerDocument)}let g,x="",{implementation:_,createNodeIterator:E,createDocumentFragment:w,getElementsByTagName:C}=n,{importNode:H}=o,D=FE();t.isSupported=typeof KE=="function"&&typeof m=="function"&&_&&_.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:z,ERB_EXPR:I,TMPLIT_EXPR:T,DATA_ATTR:A,ARIA_ATTR:M,IS_SCRIPT_OR_DATA:O,ATTR_WHITESPACE:R,CUSTOM_ELEMENT:L}=$E,{IS_ALLOWED_URI:V}=$E,k=null,G=Se({},[...XE,...kh,...Gh,...Uh,...qE]),q=null,Z=Se({},[...ZE,...Ih,...jE,...Pf]),j=Object.seal(js(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),se=null,J=null,X=Object.seal(js(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Q=!0,ue=!0,he=!1,ie=!0,ee=!1,Te=!0,de=!1,be=!1,Le=!1,Be=!1,dt=!1,Gt=!1,mn=!0,rt=!1,Dn="user-content-",Qt=!0,Wt=!1,St={},$e=null,ro=Se({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),li=null,jn=Se({},["audio","video","img","source","image","track"]),ri=null,$n=Se({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Rn="http://www.w3.org/1998/Math/MathML",To="http://www.w3.org/2000/svg",pt="http://www.w3.org/1999/xhtml",Fn=pt,Kn=!1,No=null,Co=Se({},[Rn,To,pt],Hh),si=Se({},["mi","mo","mn","ms","mtext"]),ui=Se({},["annotation-xml"]),Pa=Se({},["title","style","font","a","script"]),wo=null,ka=["application/xhtml+xml","text/html"],Ga="text/html",We=null,Ao=null,Mo=n.createElement("form"),Do=function(N){return N instanceof RegExp||N instanceof Function},pe=function(){let N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Ao&&Ao===N)){if((!N||typeof N!="object")&&(N={}),N=Eo(N),wo=ka.indexOf(N.PARSER_MEDIA_TYPE)===-1?Ga:N.PARSER_MEDIA_TYPE,We=wo==="application/xhtml+xml"?Hh:kf,k=ao(N,"ALLOWED_TAGS")?Se({},N.ALLOWED_TAGS,We):G,q=ao(N,"ALLOWED_ATTR")?Se({},N.ALLOWED_ATTR,We):Z,No=ao(N,"ALLOWED_NAMESPACES")?Se({},N.ALLOWED_NAMESPACES,Hh):Co,ri=ao(N,"ADD_URI_SAFE_ATTR")?Se(Eo($n),N.ADD_URI_SAFE_ATTR,We):$n,li=ao(N,"ADD_DATA_URI_TAGS")?Se(Eo(jn),N.ADD_DATA_URI_TAGS,We):jn,$e=ao(N,"FORBID_CONTENTS")?Se({},N.FORBID_CONTENTS,We):ro,se=ao(N,"FORBID_TAGS")?Se({},N.FORBID_TAGS,We):Eo({}),J=ao(N,"FORBID_ATTR")?Se({},N.FORBID_ATTR,We):Eo({}),St=ao(N,"USE_PROFILES")?N.USE_PROFILES:!1,Q=N.ALLOW_ARIA_ATTR!==!1,ue=N.ALLOW_DATA_ATTR!==!1,he=N.ALLOW_UNKNOWN_PROTOCOLS||!1,ie=N.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ee=N.SAFE_FOR_TEMPLATES||!1,Te=N.SAFE_FOR_XML!==!1,de=N.WHOLE_DOCUMENT||!1,Be=N.RETURN_DOM||!1,dt=N.RETURN_DOM_FRAGMENT||!1,Gt=N.RETURN_TRUSTED_TYPE||!1,Le=N.FORCE_BODY||!1,mn=N.SANITIZE_DOM!==!1,rt=N.SANITIZE_NAMED_PROPS||!1,Qt=N.KEEP_CONTENT!==!1,Wt=N.IN_PLACE||!1,V=N.ALLOWED_URI_REGEXP||QE,Fn=N.NAMESPACE||pt,si=N.MATHML_TEXT_INTEGRATION_POINTS||si,ui=N.HTML_INTEGRATION_POINTS||ui,j=N.CUSTOM_ELEMENT_HANDLING||js(null),N.CUSTOM_ELEMENT_HANDLING&&Do(N.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(j.tagNameCheck=N.CUSTOM_ELEMENT_HANDLING.tagNameCheck),N.CUSTOM_ELEMENT_HANDLING&&Do(N.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(j.attributeNameCheck=N.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),N.CUSTOM_ELEMENT_HANDLING&&typeof N.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(j.allowCustomizedBuiltInElements=N.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ee&&(ue=!1),dt&&(Be=!0),St&&(k=Se({},qE),q=js(null),St.html===!0&&(Se(k,XE),Se(q,ZE)),St.svg===!0&&(Se(k,kh),Se(q,Ih),Se(q,Pf)),St.svgFilters===!0&&(Se(k,Gh),Se(q,Ih),Se(q,Pf)),St.mathMl===!0&&(Se(k,Uh),Se(q,jE),Se(q,Pf))),X.tagCheck=null,X.attributeCheck=null,N.ADD_TAGS&&(typeof N.ADD_TAGS=="function"?X.tagCheck=N.ADD_TAGS:(k===G&&(k=Eo(k)),Se(k,N.ADD_TAGS,We))),N.ADD_ATTR&&(typeof N.ADD_ATTR=="function"?X.attributeCheck=N.ADD_ATTR:(q===Z&&(q=Eo(q)),Se(q,N.ADD_ATTR,We))),N.ADD_URI_SAFE_ATTR&&Se(ri,N.ADD_URI_SAFE_ATTR,We),N.FORBID_CONTENTS&&($e===ro&&($e=Eo($e)),Se($e,N.FORBID_CONTENTS,We)),N.ADD_FORBID_CONTENTS&&($e===ro&&($e=Eo($e)),Se($e,N.ADD_FORBID_CONTENTS,We)),Qt&&(k["#text"]=!0),de&&Se(k,["html","head","body"]),k.table&&(Se(k,["tbody"]),delete se.tbody),N.TRUSTED_TYPES_POLICY){if(typeof N.TRUSTED_TYPES_POLICY.createHTML!="function")throw Xs('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof N.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Xs('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');g=N.TRUSTED_TYPES_POLICY,x=g.createHTML("")}else g===void 0&&(g=YO(h,i)),g!==null&&typeof x=="string"&&(x=g.createHTML(""));$t&&$t(N),Ao=N}},le=Se({},[...kh,...Gh,...OO]),ae=Se({},[...Uh,...zO]),we=function(N){let Y=m(N);(!Y||!Y.tagName)&&(Y={namespaceURI:Fn,tagName:"template"});let K=kf(N.tagName),Ge=kf(Y.tagName);return No[N.namespaceURI]?N.namespaceURI===To?Y.namespaceURI===pt?K==="svg":Y.namespaceURI===Rn?K==="svg"&&(Ge==="annotation-xml"||si[Ge]):!!le[K]:N.namespaceURI===Rn?Y.namespaceURI===pt?K==="math":Y.namespaceURI===To?K==="math"&&ui[Ge]:!!ae[K]:N.namespaceURI===pt?Y.namespaceURI===To&&!ui[Ge]||Y.namespaceURI===Rn&&!si[Ge]?!1:!ae[K]&&(Pa[K]||!le[K]):!!(wo==="application/xhtml+xml"&&No[N.namespaceURI]):!1},ge=function(N){Ys(t.removed,{element:N});try{m(N).removeChild(N)}catch{S(N)}},He=function(N,Y){try{Ys(t.removed,{attribute:Y.getAttributeNode(N),from:Y})}catch{Ys(t.removed,{attribute:null,from:Y})}if(Y.removeAttribute(N),N==="is")if(Be||dt)try{ge(Y)}catch{}else try{Y.setAttribute(N,"")}catch{}},wt=function(N){let Y=null,K=null;if(Le)N="<remove></remove>"+N;else{let et=Ph(N,/^[\r\n\t ]+/);K=et&&et[0]}wo==="application/xhtml+xml"&&Fn===pt&&(N='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+N+"</body></html>");let Ge=g?g.createHTML(N):N;if(Fn===pt)try{Y=new f().parseFromString(Ge,wo)}catch{}if(!Y||!Y.documentElement){Y=_.createDocument(Fn,"template",null);try{Y.documentElement.innerHTML=Kn?x:Ge}catch{}}let _t=Y.body||Y.documentElement;return N&&K&&_t.insertBefore(n.createTextNode(K),_t.childNodes[0]||null),Fn===pt?C.call(Y,de?"html":"body")[0]:de?Y.documentElement:_t},Qn=function(N){return E.call(N.ownerDocument||N,N,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},On=function(N){return N instanceof d&&(typeof N.nodeName!="string"||typeof N.textContent!="string"||typeof N.removeChild!="function"||!(N.attributes instanceof c)||typeof N.removeAttribute!="function"||typeof N.setAttribute!="function"||typeof N.namespaceURI!="string"||typeof N.insertBefore!="function"||typeof N.hasChildNodes!="function")},ci=function(N){return typeof r=="function"&&N instanceof r};function xt(ne,N,Y){Vs(ne,K=>{K.call(t,N,Y,Ao)})}let lr=function(N){let Y=null;if(xt(D.beforeSanitizeElements,N,null),On(N))return ge(N),!0;let K=We(N.nodeName);if(xt(D.uponSanitizeElement,N,{tagName:K,allowedTags:k}),Te&&N.hasChildNodes()&&!ci(N.firstElementChild)&&jt(/<[/\w!]/g,N.innerHTML)&&jt(/<[/\w!]/g,N.textContent)||Te&&N.namespaceURI===pt&&K==="style"&&ci(N.firstElementChild)||N.nodeType===Zs.progressingInstruction||Te&&N.nodeType===Zs.comment&&jt(/<[/\w]/g,N.data))return ge(N),!0;if(se[K]||!(X.tagCheck instanceof Function&&X.tagCheck(K))&&!k[K]){if(!se[K]&&sr(K)&&(j.tagNameCheck instanceof RegExp&&jt(j.tagNameCheck,K)||j.tagNameCheck instanceof Function&&j.tagNameCheck(K)))return!1;if(Qt&&!$e[K]){let Ge=m(N)||N.parentNode,_t=y(N)||N.childNodes;if(_t&&Ge){let et=_t.length;for(let Ht=et-1;Ht>=0;--Ht){let Ut=b(_t[Ht],!0);Ut.__removalCount=(N.__removalCount||0)+1,Ge.insertBefore(Ut,p(N))}}}return ge(N),!0}return N instanceof s&&!we(N)||(K==="noscript"||K==="noembed"||K==="noframes")&&jt(/<\/no(script|embed|frames)/i,N.innerHTML)?(ge(N),!0):(ee&&N.nodeType===Zs.text&&(Y=N.textContent,Vs([z,I,T],Ge=>{Y=er(Y,Ge," ")}),N.textContent!==Y&&(Ys(t.removed,{element:N.cloneNode()}),N.textContent=Y)),xt(D.afterSanitizeElements,N,null),!1)},rr=function(N,Y,K){if(J[Y]||mn&&(Y==="id"||Y==="name")&&(K in n||K in Mo))return!1;if(!(ue&&!J[Y]&&jt(A,Y))){if(!(Q&&jt(M,Y))){if(!(X.attributeCheck instanceof Function&&X.attributeCheck(Y,N))){if(!q[Y]||J[Y]){if(!(sr(N)&&(j.tagNameCheck instanceof RegExp&&jt(j.tagNameCheck,N)||j.tagNameCheck instanceof Function&&j.tagNameCheck(N))&&(j.attributeNameCheck instanceof RegExp&&jt(j.attributeNameCheck,Y)||j.attributeNameCheck instanceof Function&&j.attributeNameCheck(Y,N))||Y==="is"&&j.allowCustomizedBuiltInElements&&(j.tagNameCheck instanceof RegExp&&jt(j.tagNameCheck,K)||j.tagNameCheck instanceof Function&&j.tagNameCheck(K))))return!1}else if(!ri[Y]){if(!jt(V,er(K,R,""))){if(!((Y==="src"||Y==="xlink:href"||Y==="href")&&N!=="script"&&AO(K,"data:")===0&&li[N])){if(!(he&&!jt(O,er(K,R,"")))){if(K)return!1}}}}}}}return!0},sr=function(N){return N!=="annotation-xml"&&Ph(N,L)},Js=function(N){xt(D.beforeSanitizeAttributes,N,null);let{attributes:Y}=N;if(!Y||On(N))return;let K={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:q,forceKeepAttr:void 0},Ge=Y.length;for(;Ge--;){let _t=Y[Ge],{name:et,namespaceURI:Ht,value:Ut}=_t,so=We(et),ur=Ut,mt=et==="value"?ur:MO(ur);if(K.attrName=so,K.attrValue=mt,K.keepAttr=!0,K.forceKeepAttr=void 0,xt(D.uponSanitizeAttribute,N,K),mt=K.attrValue,rt&&(so==="id"||so==="name")&&(He(et,N),mt=Dn+mt),Te&&jt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,mt)){He(et,N);continue}if(so==="attributename"&&Ph(mt,"href")){He(et,N);continue}if(K.forceKeepAttr)continue;if(!K.keepAttr){He(et,N);continue}if(!ie&&jt(/\/>/i,mt)){He(et,N);continue}ee&&Vs([z,I,T],tu=>{mt=er(mt,tu," ")});let cr=We(N.nodeName);if(!rr(cr,so,mt)){He(et,N);continue}if(g&&typeof h=="object"&&typeof h.getAttributeType=="function"&&!Ht)switch(h.getAttributeType(cr,so)){case"TrustedHTML":{mt=g.createHTML(mt);break}case"TrustedScriptURL":{mt=g.createScriptURL(mt);break}}if(mt!==ur)try{Ht?N.setAttributeNS(Ht,et,mt):N.setAttribute(et,mt),On(N)?ge(N):YE(t.removed)}catch{He(et,N)}}xt(D.afterSanitizeAttributes,N,null)},eu=function(N){let Y=null,K=Qn(N);for(xt(D.beforeSanitizeShadowDOM,N,null);Y=K.nextNode();)xt(D.uponSanitizeShadowNode,Y,null),lr(Y),Js(Y),Y.content instanceof a&&eu(Y.content);xt(D.afterSanitizeShadowDOM,N,null)};return t.sanitize=function(ne){let N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Y=null,K=null,Ge=null,_t=null;if(Kn=!ne,Kn&&(ne="<!-->"),typeof ne!="string"&&!ci(ne))if(typeof ne.toString=="function"){if(ne=ne.toString(),typeof ne!="string")throw Xs("dirty is not a string, aborting")}else throw Xs("toString is not a function");if(!t.isSupported)return ne;if(be||pe(N),t.removed=[],typeof ne=="string"&&(Wt=!1),Wt){if(ne.nodeName){let Ut=We(ne.nodeName);if(!k[Ut]||se[Ut])throw Xs("root node is forbidden and cannot be sanitized in-place")}}else if(ne instanceof r)Y=wt("<!---->"),K=Y.ownerDocument.importNode(ne,!0),K.nodeType===Zs.element&&K.nodeName==="BODY"||K.nodeName==="HTML"?Y=K:Y.appendChild(K);else{if(!Be&&!ee&&!de&&ne.indexOf("<")===-1)return g&&Gt?g.createHTML(ne):ne;if(Y=wt(ne),!Y)return Be?null:Gt?x:""}Y&&Le&&ge(Y.firstChild);let et=Qn(Wt?ne:Y);for(;Ge=et.nextNode();)lr(Ge),Js(Ge),Ge.content instanceof a&&eu(Ge.content);if(Wt)return ne;if(Be){if(ee){Y.normalize();let Ut=Y.innerHTML;Vs([z,I,T],so=>{Ut=er(Ut,so," ")}),Y.innerHTML=Ut}if(dt)for(_t=w.call(Y.ownerDocument);Y.firstChild;)_t.appendChild(Y.firstChild);else _t=Y;return(q.shadowroot||q.shadowrootmode)&&(_t=H.call(o,_t,!0)),_t}let Ht=de?Y.outerHTML:Y.innerHTML;return de&&k["!doctype"]&&Y.ownerDocument&&Y.ownerDocument.doctype&&Y.ownerDocument.doctype.name&&jt(WE,Y.ownerDocument.doctype.name)&&(Ht="<!DOCTYPE "+Y.ownerDocument.doctype.name+`>
|
|
16
|
-
`+Ht),ee&&Vs([z,I,T],Ut=>{Ht=er(Ht,Ut," ")}),g&&Gt?g.createHTML(Ht):Ht},t.setConfig=function(){let ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};pe(ne),be=!0},t.clearConfig=function(){Ao=null,be=!1},t.isValidAttribute=function(ne,N,Y){Ao||pe({});let K=We(ne),Ge=We(N);return rr(K,Ge,Y)},t.addHook=function(ne,N){typeof N=="function"&&Ys(D[ne],N)},t.removeHook=function(ne,N){if(N!==void 0){let Y=CO(D[ne],N);return Y===-1?void 0:wO(D[ne],Y,1)[0]}return YE(D[ne])},t.removeHooks=function(ne){D[ne]=[]},t.removeAllHooks=function(){D=FE()},t}var eT=JE();var re=oe(ve(),1),XO=(0,re.jsx)("svg",{viewBox:"0 0 24 24",children:(0,re.jsx)("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"})}),qO=(0,re.jsx)("svg",{viewBox:"0 0 24 24",children:(0,re.jsx)("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})}),ZO=(0,re.jsx)("svg",{viewBox:"0 0 24 24",children:(0,re.jsx)("path",{d:"M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"})}),jO=(0,re.jsx)("svg",{viewBox:"0 0 24 24",children:(0,re.jsx)("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"})}),tT=(0,re.jsx)("svg",{viewBox:"0 0 24 24",children:(0,re.jsx)("path",{d:"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z"})});function Gf(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function Xh(e,t,n){let o=new Blob([e],{type:n}),i=URL.createObjectURL(o),a=document.createElement("a");a.href=i,a.download=t,a.click(),setTimeout(()=>URL.revokeObjectURL(i),1e4)}function nT(e,t){let n=document.createElement("a");n.href=e,n.download=t,n.target="_blank",n.click()}function Uf({stuff:e,className:t,resolveStorageUrl:n,canEmbedPdf:o,onOpenExternally:i}){let[a,l]=An.default.useState("html"),[r,s]=An.default.useState(!1),u=An.default.useRef(null),c=An.default.useMemo(()=>kE(e.data),[e.data]),d=An.default.useMemo(()=>PE(e.data),[e.data]),f=An.default.useMemo(()=>GE(e.data),[e.data]),h=An.default.useMemo(()=>Lh(e.data),[e.data]),[v,b]=An.default.useState(null);An.default.useEffect(()=>{if(b(null),!f||!n||c)return;let A=!1;return n(f).then(M=>{A||b(Hf(M)?M:null)}).catch(()=>{A||b(null)}),()=>{A=!0}},[f,n,c]);let S=c??v,p=d??v,y=An.default.useMemo(()=>UE(e.data,e.contentType,p??f),[e.data,e.contentType,p,f]),m=y==="application/pdf",g=y?.startsWith("image/")??!1,x=IE(y??e.contentType),{jsonString:_,jsonError:E}=An.default.useMemo(()=>{if(e.data==null)return{jsonString:null,jsonError:null};try{return{jsonString:JSON.stringify(e.data,null,2),jsonError:null}}catch(A){return{jsonString:null,jsonError:A instanceof Error?A.message:String(A)}}},[e.data]);An.default.useEffect(()=>{a!=="html"||!u.current||u.current.querySelectorAll("a").forEach(A=>{A.setAttribute("target","_blank"),A.setAttribute("rel","noopener noreferrer")})},[a,e.dataHtml]);function w(A){let M=h||e.name;return(0,re.jsxs)("div",{className:"stuff-viewer-local-file",children:[(0,re.jsx)("div",{className:"stuff-viewer-local-file-icon",children:tT}),(0,re.jsxs)("div",{className:"stuff-viewer-local-file-info",children:[M&&(0,re.jsx)("div",{className:"stuff-viewer-local-file-name",children:M}),(0,re.jsxs)("div",{className:"stuff-viewer-local-file-hint",children:[A," \u2014 no preview available"]})]})]})}function C(A){return(0,re.jsxs)("div",{className:"stuff-viewer-error",role:"alert",children:[(0,re.jsx)("div",{className:"stuff-viewer-error-title",children:"Unable to serialize data"}),(0,re.jsx)("div",{className:"stuff-viewer-error-detail",children:A})]})}function H(){if(a==="html"){if(m){if(o!==!1&&S){let M=S.includes("#")?S:`${S}#pagemode=none`;return(0,re.jsx)("div",{className:"stuff-viewer-pdf",children:(0,re.jsx)("embed",{src:M,type:"application/pdf"})})}if(p){let M=h||e.name;return(0,re.jsxs)("button",{type:"button",className:"stuff-viewer-local-file stuff-viewer-local-file--button",onClick:I,children:[(0,re.jsx)("div",{className:"stuff-viewer-local-file-icon",children:tT}),(0,re.jsxs)("div",{className:"stuff-viewer-local-file-info",children:[M&&(0,re.jsx)("div",{className:"stuff-viewer-local-file-name",children:M}),(0,re.jsx)("div",{className:"stuff-viewer-local-file-hint",children:"Click to open PDF externally"})]})]})}return w("PDF")}return g?S?(0,re.jsx)("div",{className:"stuff-viewer-image",children:(0,re.jsx)("img",{src:S,alt:e.name??"(unnamed stuff)"})}):w("Image"):e.dataHtml?(0,re.jsx)("div",{className:"stuff-viewer-html",dangerouslySetInnerHTML:{__html:eT.sanitize(e.dataHtml)}}):_?(0,re.jsx)("pre",{className:"stuff-viewer-pre",dangerouslySetInnerHTML:{__html:Gf(_)}}):E?C(E):(0,re.jsx)("div",{className:"stuff-viewer-placeholder",children:"No content available"})}return a==="json"?_?(0,re.jsx)("pre",{className:"stuff-viewer-pre",dangerouslySetInnerHTML:{__html:Gf(_)}}):E?C(E):(0,re.jsx)("div",{className:"stuff-viewer-placeholder",children:"No JSON data available"}):e.dataText?(0,re.jsx)("pre",{className:"stuff-viewer-pre stuff-viewer-pre--nowrap",dangerouslySetInnerHTML:{__html:Gf(e.dataText)}}):_?(0,re.jsx)("pre",{className:"stuff-viewer-pre",dangerouslySetInnerHTML:{__html:Gf(_)}}):E?C(E):(0,re.jsx)("div",{className:"stuff-viewer-placeholder",children:"No text data available"})}function D(){let A;a==="json"?A=_||"":a==="text"?A=e.dataText||_||"":A=e.dataText||e.dataHtml||_||"",A&&navigator.clipboard&&navigator.clipboard.writeText(A).then(()=>{s(!0),setTimeout(()=>s(!1),1500)}).catch(()=>{})}function z(){if(g&&p){let A=y?.split("/")[1]||"png";nT(p,`${e.name||"stuff"}.${A}`);return}if(m&&p){nT(p,`${e.name||"stuff"}.pdf`);return}a==="json"?Xh(_||"{}",`${e.name||"stuff"}.json`,"application/json"):a==="text"?Xh(e.dataText||_||"",`${e.name||"stuff"}.txt`,"text/plain"):Xh(e.dataHtml||_||"",`${e.name||"stuff"}.html`,"text/html")}function I(){if(p){if(i){i(p,h??void 0);return}window.open(p,"_blank","noopener,noreferrer")}}let T=["stuff-viewer",t].filter(Boolean).join(" ");return(0,re.jsxs)("div",{className:T,children:[(0,re.jsxs)("div",{className:"stuff-viewer-header",children:[(0,re.jsx)("h3",{className:"stuff-viewer-title",children:e.name??"(unnamed stuff)"}),e.concept&&(0,re.jsx)("p",{className:"stuff-viewer-subtitle",children:e.concept})]}),(0,re.jsxs)("div",{className:"stuff-viewer-toolbar",children:[(0,re.jsx)("div",{className:"stuff-viewer-tabs",children:["html","json","text"].map(A=>(0,re.jsx)("button",{type:"button",className:`stuff-viewer-tab${a===A?" stuff-viewer-tab--active":""}`,onClick:()=>l(A),children:A==="html"?x:A==="json"?"JSON":"Pretty"},A))}),(0,re.jsxs)("div",{className:"stuff-viewer-actions",children:[p&&(0,re.jsx)("button",{type:"button",className:"stuff-viewer-action-btn",onClick:I,title:"Open in new window","aria-label":"Open in new window",children:jO}),(0,re.jsx)("button",{type:"button",className:`stuff-viewer-action-btn${r?" stuff-viewer-action-btn--copied":""}`,onClick:D,title:"Copy","aria-label":"Copy",children:r?qO:XO}),(0,re.jsx)("button",{type:"button",className:"stuff-viewer-action-btn",onClick:z,title:"Download","aria-label":"Download",children:ZO})]})]}),(0,re.jsx)("div",{className:"stuff-viewer-content",ref:u,children:H()})]})}var oT=oe(At(),1);var Oa=oe(ve(),1);function iT({isOpen:e,onClose:t,children:n,width:o,isDragging:i,onResizeHandleMouseDown:a,closeOnEscape:l=!0}){oT.default.useEffect(()=>{if(!e||!l)return;let s=u=>{u.key==="Escape"&&t()};return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[e,l,t]);let r=["detail-panel",!e&&"detail-panel--closed",i&&"detail-panel--dragging"].filter(Boolean).join(" ");return(0,Oa.jsxs)("div",{className:r,style:o?{width:`${o}px`}:void 0,children:[a&&(0,Oa.jsx)("div",{className:"detail-panel-resize-handle",onMouseDown:a,role:"separator","aria-orientation":"vertical","aria-label":"Resize panel"}),(0,Oa.jsxs)("div",{className:"detail-panel-content",children:[(0,Oa.jsx)("div",{className:"detail-panel-close-row",children:(0,Oa.jsx)("button",{className:"detail-panel-close",onClick:t,"aria-label":"Close panel",children:"x"})}),n]})]})}var za=oe(At(),1),$O=.6;function aT({defaultWidth:e,minWidth:t,maxWidth:n,containerRef:o}){let[i,a]=za.default.useState(e),[l,r]=za.default.useState(!1),s=za.default.useRef({startX:0,startWidth:0,maxAllowed:n}),u=za.default.useRef(null),c=za.default.useCallback(d=>{d.preventDefault(),d.stopPropagation();let f=o?.current?.getBoundingClientRect().width,h=f?Math.min(n,f*$O):n;s.current={startX:d.clientX,startWidth:i,maxAllowed:h},r(!0),document.body.style.userSelect="none",document.body.style.cursor="col-resize"},[i,n,o]);return za.default.useEffect(()=>{if(!l)return;let d=h=>{u.current!==null&&cancelAnimationFrame(u.current),u.current=requestAnimationFrame(()=>{let{startX:v,startWidth:b,maxAllowed:S}=s.current,p=v-h.clientX,y=Math.max(t,Math.min(S,b+p));a(y),u.current=null})},f=()=>{r(!1),document.body.style.userSelect="",document.body.style.cursor="",u.current!==null&&(cancelAnimationFrame(u.current),u.current=null)};return document.addEventListener("mousemove",d),document.addEventListener("mouseup",f),()=>{document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",f),document.body.style.userSelect="",document.body.style.cursor="",u.current!==null&&(cancelAnimationFrame(u.current),u.current=null)}},[l,t]),{width:i,isDragging:l,handleMouseDown:c}}var sT=oe(At(),1);var If=oe(At(),1),Ve=oe(ve(),1);function qh(e){return e<1?`${(e*1e3).toFixed(0)}ms`:`${e.toFixed(2)}s`}function te({label:e,value:t}){return t==null?null:(0,Ve.jsxs)("div",{className:"detail-kv-row",children:[(0,Ve.jsx)("span",{className:"detail-kv-key",children:e}),(0,Ve.jsx)("span",{className:"detail-kv-value",children:String(t)})]})}function Zh({label:e,text:t}){return t?(0,Ve.jsxs)("div",{children:[(0,Ve.jsx)("div",{className:"detail-section-label",children:e}),(0,Ve.jsx)("div",{className:"detail-prompt-block",children:t})]}):null}var FO=(0,Ve.jsx)("svg",{viewBox:"0 0 24 24",width:"10",height:"10",fill:"currentColor",children:(0,Ve.jsx)("path",{d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"})}),KO=(0,Ve.jsx)("svg",{viewBox:"0 0 24 24",width:"10",height:"10",fill:"currentColor",children:(0,Ve.jsx)("path",{d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),QO=(0,Ve.jsx)("svg",{viewBox:"0 0 24 24",width:"10",height:"10",fill:"currentColor",children:(0,Ve.jsx)("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"})}),WO=(0,Ve.jsx)("svg",{viewBox:"0 0 24 24",width:"10",height:"10",fill:"currentColor",children:(0,Ve.jsx)("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})}),lT={all:"unset",cursor:"pointer",display:"flex",alignItems:"center",gap:4,fontSize:9,color:"#64748b",padding:"2px 6px",borderRadius:3,background:"rgba(255,255,255,0.04)",border:"1px solid rgba(255,255,255,0.06)",transition:"color 0.15s"};function lo({label:e,templateText:t,renderedText:n}){let[o,i]=(0,If.useState)(!1),[a,l]=(0,If.useState)(!1),[r,s]=(0,If.useState)(!1),u=!!t,c=!!n;if(!u&&!c)return null;let d=u&&c,f=d?o?t:n:t||n;function h(){!f||!navigator.clipboard||navigator.clipboard.writeText(f).then(()=>{l(!0),setTimeout(()=>l(!1),1500)}).catch(()=>{})}return(0,Ve.jsxs)("div",{children:[(0,Ve.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:4},children:[(0,Ve.jsx)("div",{className:"detail-section-label",style:{marginBottom:0},children:e}),(0,Ve.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:4},children:[(0,Ve.jsx)("button",{onClick:()=>s(v=>!v),title:r?"Collapse prompt":"Expand prompt","aria-label":r?"Collapse prompt":"Expand prompt",className:"detail-prompt-expand-btn",children:r?KO:FO}),(0,Ve.jsx)("button",{onClick:h,title:"Copy prompt","aria-label":"Copy prompt",style:{...lT,color:a?"#10b981":"#64748b"},children:a?WO:QO}),d&&(0,Ve.jsxs)("button",{onClick:()=>i(v=>!v),style:lT,children:[(0,Ve.jsx)("span",{style:{width:22,height:12,borderRadius:6,background:o?"rgba(255,255,255,0.12)":"#50FA7B33",position:"relative",display:"inline-block",transition:"background 0.15s"},children:(0,Ve.jsx)("span",{style:{position:"absolute",top:2,left:o?2:12,width:8,height:8,borderRadius:"50%",background:o?"#94a3b8":"#50FA7B",transition:"left 0.15s, background 0.15s"}})}),o?"template":"rendered"]})]})]}),(0,Ve.jsx)("div",{className:`detail-prompt-block ${r?"detail-prompt-block--expanded":"detail-prompt-block--collapsed"}`,style:{marginTop:6},children:f})]})}var Bt=oe(ve(),1);function jh({blueprint:e,executionData:t}){let n=e.llm_prompt_spec,o=n.user_image_references&&n.user_image_references.length>0,i=n.user_document_references&&n.user_document_references.length>0,a=n.system_image_references&&n.system_image_references.length>0,l=n.system_document_references&&n.system_document_references.length>0,r=t?.resolved_model,s=t?.resolved_model_for_object,u=t?.rendered_system_prompt,c=t?.rendered_user_prompt,d=t?.structuring_path,f=t?.is_multiple_output,h=r||e.llm_choices?.for_text,v=s||e.llm_choices?.for_object;return(0,Bt.jsxs)(Bt.Fragment,{children:[(0,Bt.jsx)(te,{label:"Model",value:h}),v&&v!==h&&(0,Bt.jsx)(te,{label:"Model (object)",value:v}),(0,Bt.jsx)(te,{label:"Structuring",value:d||e.structuring_method}),(0,Bt.jsx)(te,{label:"Multiple Output",value:f}),(0,Bt.jsx)(te,{label:"Output Multiplicity",value:e.output_multiplicity}),(0,Bt.jsx)(te,{label:"Prompt Category",value:n.prompt_blueprint?.category}),o&&(0,Bt.jsx)(te,{label:"User Image Refs",value:`${n.user_image_references.length} references`}),i&&(0,Bt.jsx)(te,{label:"User Document Refs",value:`${n.user_document_references.length} references`}),a&&(0,Bt.jsx)(te,{label:"System Image Refs",value:`${n.system_image_references.length} references`}),l&&(0,Bt.jsx)(te,{label:"System Document Refs",value:`${n.system_document_references.length} references`}),(0,Bt.jsx)(lo,{label:"System Prompt",templateText:n.system_prompt_blueprint?.template,renderedText:u}),(0,Bt.jsx)(lo,{label:"Prompt",templateText:n.prompt_blueprint?.template,renderedText:c})]})}function $h(e){return null}var cn=oe(ve(),1);function Fh({blueprint:e,executionData:t}){let n=e.img_gen_prompt_blueprint,o=t?.resolved_model,i=t?.rendered_prompt,a=t?.rendered_negative_prompt;return(0,cn.jsxs)(cn.Fragment,{children:[(0,cn.jsx)(te,{label:"Model",value:o||e.img_gen_choice}),(0,cn.jsx)(lo,{label:"Prompt",templateText:n.prompt_blueprint?.template,renderedText:i}),(0,cn.jsx)(lo,{label:"Negative Prompt",templateText:n.negative_prompt_blueprint?.template,renderedText:a}),(0,cn.jsx)(te,{label:"Aspect Ratio",value:e.aspect_ratio}),(0,cn.jsx)(te,{label:"Output Format",value:e.output_format}),(0,cn.jsx)(te,{label:"Background",value:e.background}),(0,cn.jsx)(te,{label:"Is Raw",value:e.is_raw}),(0,cn.jsx)(te,{label:"Seed",value:e.seed}),(0,cn.jsx)(te,{label:"Images",value:t?.nb_images??e.output_multiplicity})]})}function Kh(e){return null}var fn=oe(ve(),1);function Qh({blueprint:e,executionData:t}){let n=t?.resolved_model;return(0,fn.jsxs)(fn.Fragment,{children:[(0,fn.jsx)(te,{label:"Model",value:n||e.extract_choice}),(0,fn.jsx)(te,{label:"Document Variable",value:e.document_stuff_name}),(0,fn.jsx)(te,{label:"Caption Images",value:e.should_caption_images}),(0,fn.jsx)(te,{label:"Max Page Images",value:e.max_page_images}),(0,fn.jsx)(te,{label:"Include Page Views",value:e.should_include_page_views}),(0,fn.jsx)(te,{label:"Page Views DPI",value:e.page_views_dpi}),(0,fn.jsx)(te,{label:"Render JS",value:e.render_js}),(0,fn.jsx)(te,{label:"Include Raw HTML",value:e.include_raw_html}),(0,fn.jsx)(te,{label:"Image Variable",value:e.image_stuff_name})]})}function Wh(e){return null}var dn=oe(ve(),1);function Jh({blueprint:e,executionData:t}){let n=t?.resolved_model,o=t?.rendered_query;return(0,dn.jsxs)(dn.Fragment,{children:[(0,dn.jsx)(te,{label:"Model",value:n||e.search_choice}),(0,dn.jsx)(lo,{label:"Search Query",templateText:e.prompt_blueprint.template,renderedText:o}),(0,dn.jsx)(te,{label:"Max Results",value:e.max_results_override}),(0,dn.jsx)(te,{label:"Include Images",value:e.include_images_override}),(0,dn.jsx)(te,{label:"Structured Output",value:e.is_structured_output}),(0,dn.jsx)(te,{label:"From Date",value:e.from_date}),(0,dn.jsx)(te,{label:"To Date",value:e.to_date}),e.include_domains&&e.include_domains.length>0&&(0,dn.jsx)(te,{label:"Include Domains",value:e.include_domains.join(", ")}),e.exclude_domains&&e.exclude_domains.length>0&&(0,dn.jsx)(te,{label:"Exclude Domains",value:e.exclude_domains.join(", ")})]})}function eg(e){return null}var ze=oe(ve(),1);function JO(e){switch(e.method){case"from_var":{let t=`\u2190 ${e.from_path??"?"}`;return e.list_to_dict_keyed_by?`${t} (keyed by ${e.list_to_dict_keyed_by})`:t}case"fixed":return`= ${JSON.stringify(e.fixed_value)}`;case"nested":return"(nested construct)";case"template":return e.template??"(empty template)"}}var e3=60;function t3(e){return e.length>e3||e.includes(`
|
|
17
|
-
`)}function n3({label:e,value:t}){return(0,ze.jsxs)("div",{className:"detail-field-block",children:[(0,ze.jsx)("div",{className:"detail-field-block-label",children:e}),(0,ze.jsx)("div",{className:"detail-field-block-value",children:t})]})}function rT({blueprint:e,depth:t,fieldResolutions:n}){let o=[],i=[],a=[];for(let[r,s]of Object.entries(e.fields))s.method==="template"?a.push([r,s]):s.method==="nested"?i.push([r,s]):o.push([r,s]);let l=t>0?{paddingLeft:t*12}:void 0;return(0,ze.jsxs)(ze.Fragment,{children:[o.map(([r,s])=>{let u=JO(s);return t3(u)?(0,ze.jsx)("div",{style:l,children:(0,ze.jsx)(n3,{label:r,value:u})},r):(0,ze.jsx)("div",{style:l,children:(0,ze.jsx)(te,{label:r,value:u})},r)}),a.map(([r,s])=>{let u=n?.[r]?.rendered;return(0,ze.jsx)("div",{style:l,children:(0,ze.jsx)(lo,{label:`Template \u2014 ${r}`,templateText:s.template??null,renderedText:u})},r)}),i.map(([r,s])=>s.nested?(0,ze.jsxs)("div",{children:[(0,ze.jsxs)("div",{className:"detail-nested-header",style:t>0?{paddingLeft:t*12}:void 0,children:[(0,ze.jsx)("span",{className:"detail-nested-header-name",children:r}),(0,ze.jsxs)("span",{className:"detail-nested-header-meta",children:["nested \xB7 ",Object.keys(s.nested.fields).length," field",Object.keys(s.nested.fields).length===1?"":"s"]})]}),(0,ze.jsx)(rT,{blueprint:s.nested,depth:t+1,fieldResolutions:null})]},r):null)]})}function tg({blueprint:e,executionData:t}){let n=t?.rendered_text,o=t?.compose_mode,i=t?.fields??null,a=e.construct_blueprint,l=a!==null&&Object.keys(a.fields).length>0;return(0,ze.jsxs)(ze.Fragment,{children:[(0,ze.jsx)(te,{label:"Mode",value:o||(l?"construct":"template")}),(0,ze.jsx)(te,{label:"Category",value:e.category}),(0,ze.jsx)(te,{label:"Templating Style",value:e.templating_style}),e.template&&(0,ze.jsx)(lo,{label:"Template",templateText:e.template,renderedText:n}),l&&(0,ze.jsxs)(ze.Fragment,{children:[(0,ze.jsx)("div",{className:"detail-section-label",children:"FIELDS"}),(0,ze.jsx)(rT,{blueprint:a,depth:0,fieldResolutions:i})]})]})}function ng(e){return null}var kt=oe(ve(),1);function og({blueprint:e,executionData:t}){let n=t?.evaluated_expression,o=t?.selected_outcome;return(0,kt.jsxs)(kt.Fragment,{children:[(0,kt.jsx)(Zh,{label:"Expression",text:e.expression}),n&&(0,kt.jsx)(te,{label:"Expression Result",value:n}),(0,kt.jsxs)("div",{children:[(0,kt.jsx)("div",{className:"detail-section-label",children:"Outcomes"}),Object.entries(e.outcome_map).map(([i,a])=>(0,kt.jsxs)("div",{className:"detail-kv-row",style:o===a?{background:"rgba(80,250,123,0.08)"}:void 0,children:[(0,kt.jsx)("span",{className:"detail-kv-key",children:i}),(0,kt.jsx)("span",{className:"detail-kv-value",style:o===a?{color:"#50FA7B"}:void 0,children:a})]},i)),(0,kt.jsxs)("div",{className:"detail-kv-row",children:[(0,kt.jsx)("span",{className:"detail-kv-key",children:"default"}),(0,kt.jsx)("span",{className:"detail-kv-value",children:e.default_outcome})]})]}),(0,kt.jsx)(te,{label:"Alias Expression To",value:e.add_alias_from_expression_to})]})}function ig(e){return null}var ni=oe(ve(),1);function ag({blueprint:e}){return(0,ni.jsxs)("div",{children:[(0,ni.jsx)("div",{className:"detail-section-label",children:"Steps"}),(0,ni.jsx)("div",{className:"detail-steps-list",children:e.sequential_sub_pipes.map((t,n)=>(0,ni.jsxs)("div",{className:"detail-step-item",children:[(0,ni.jsx)("span",{className:"detail-step-index",children:n+1}),(0,ni.jsx)("span",{className:"detail-step-code",children:t.pipe_code}),t.output_name&&(0,ni.jsxs)("span",{className:"detail-io-concept",children:["-> ",t.output_name]})]},n))})]})}function lg(e){return null}var Mn=oe(ve(),1);function rg({blueprint:e}){return(0,Mn.jsxs)(Mn.Fragment,{children:[(0,Mn.jsxs)("div",{children:[(0,Mn.jsx)("div",{className:"detail-section-label",children:"Branches"}),(0,Mn.jsx)("div",{className:"detail-steps-list",children:e.parallel_sub_pipes.map((t,n)=>(0,Mn.jsxs)("div",{className:"detail-step-item",children:[(0,Mn.jsx)("span",{className:"detail-step-code",children:t.pipe_code}),t.output_name&&(0,Mn.jsxs)("span",{className:"detail-io-concept",children:["-> ",t.output_name]})]},n))})]}),(0,Mn.jsx)(te,{label:"Add Each Output",value:e.add_each_output}),(0,Mn.jsx)(te,{label:"Combined Output",value:e.combined_output})]})}function sg(e){return null}var oi=oe(ve(),1);function ug({blueprint:e,executionData:t}){let n=t?.item_count;return(0,oi.jsxs)(oi.Fragment,{children:[(0,oi.jsx)(te,{label:"Branch Pipe",value:e.branch_pipe_code}),(0,oi.jsx)(te,{label:"Input List Variable",value:e.batch_params.input_list_stuff_name}),(0,oi.jsx)(te,{label:"Input Item Variable",value:e.batch_params.input_item_stuff_name}),n!=null&&(0,oi.jsx)(te,{label:"Items Processed",value:n})]})}function cg(e){return null}var F=oe(ve(),1),o3={PipeLLM:"LLM",PipeExtract:"Extract",PipeCompose:"Compose",PipeImgGen:"ImgGen",PipeSearch:"Search",PipeFunc:"Func",PipeSignature:"Signature",PipeSequence:"Seq",PipeParallel:"Par",PipeCondition:"Cond",PipeBatch:"Batch"},i3=new Set(["PipeSequence","PipeParallel","PipeCondition","PipeBatch"]),a3={succeeded:"#50FA7B",failed:"#FF5555",running:"#8BE9FD",scheduled:"#6272a4",skipped:"#6272a4",canceled:"#6272a4"};function uT({node:e,spec:t,onConceptClick:n}){let o=e.pipe_type,i=i3.has(o),a=o3[o],l=e.status,r=a3[l]??"#6272a4",s=sT.default.useMemo(()=>{if(!e.pipe_code||!t.pipe_registry)return;let f=`${t.pipeline_ref?.domain??""}.${e.pipe_code}`,h=BE(t,f);if(h)return h;for(let[v,b]of Object.entries(t.pipe_registry))if(v.endsWith(`.${e.pipe_code}`))return b},[e.pipe_code,t]),u=e.io?.inputs??[],c=e.io?.outputs??[],d=s?.description??e.description;return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)("div",{className:"detail-sticky-header",children:[(0,F.jsxs)("div",{className:"detail-header",children:[(0,F.jsx)("span",{className:`detail-badge ${i?"detail-badge--controller":"detail-badge--operator"}`,children:a}),(0,F.jsx)("span",{className:`detail-pipe-code ${i?"detail-pipe-code--controller":""}`,children:e.pipe_code})]}),(0,F.jsxs)("div",{className:"detail-status",children:[(0,F.jsx)("span",{className:"detail-status-dot",style:{background:r}}),(0,F.jsx)("span",{className:"detail-status-label",style:{color:r},children:l}),e.timing?.duration!=null&&(0,F.jsx)("span",{className:"detail-duration",children:qh(e.timing.duration)})]}),d&&(0,F.jsx)("div",{className:"detail-description",children:d}),u.length>0&&(0,F.jsxs)("div",{children:[(0,F.jsx)("div",{className:"detail-section-label",children:"Inputs"}),(0,F.jsx)("div",{className:"detail-io-list",children:u.map((f,h)=>(0,F.jsxs)("div",{className:"detail-io-pill",style:{cursor:f.concept&&n?"pointer":void 0},onClick:()=>f.concept&&n?.(f.concept),children:[(0,F.jsx)("span",{className:"detail-io-name",children:f.name}),f.concept&&(0,F.jsx)("span",{className:"detail-io-concept",children:f.concept})]},h))})]}),c.length>0&&(0,F.jsxs)("div",{children:[(0,F.jsx)("div",{className:"detail-section-label",children:"Output"}),(0,F.jsx)("div",{className:"detail-io-list",children:c.map((f,h)=>(0,F.jsxs)("div",{className:"detail-io-pill",style:{cursor:f.concept&&n?"pointer":void 0},onClick:()=>f.concept&&n?.(f.concept),children:[(0,F.jsx)("span",{className:"detail-io-name",children:f.name}),f.concept&&(0,F.jsx)("span",{className:"detail-io-concept",children:f.concept})]},h))})]}),(u.length>0||c.length>0)&&(0,F.jsx)("div",{style:{borderTop:"1px solid rgba(255,255,255,0.06)",margin:"4px 0"}})]}),s&&(0,F.jsx)(l3,{blueprint:s,executionData:e.execution_data}),e.execution_data&&Object.keys(e.execution_data).length>0&&(0,F.jsx)(r3,{executionData:e.execution_data,pipeType:o}),e.error&&(0,F.jsxs)("div",{className:"detail-error",children:[(0,F.jsx)("div",{className:"detail-error-type",children:e.error.error_type}),(0,F.jsx)("div",{className:"detail-error-message",children:e.error.message}),e.error.stack&&(0,F.jsx)("div",{className:"detail-error-stack",children:e.error.stack})]}),e.metrics&&Object.keys(e.metrics).length>0&&(0,F.jsxs)("div",{children:[(0,F.jsx)("div",{className:"detail-section-label",children:"Metrics"}),Object.entries(e.metrics).map(([f,h])=>(0,F.jsx)(te,{label:f,value:typeof h=="number"?h.toLocaleString():String(h)},f))]}),e.tags&&Object.keys(e.tags).length>0&&(0,F.jsxs)("div",{children:[(0,F.jsx)("div",{className:"detail-section-label",children:"Tags"}),(0,F.jsx)("div",{className:"detail-tags",children:Object.entries(e.tags).map(([f,h])=>(0,F.jsxs)("span",{className:"detail-tag",children:[(0,F.jsxs)("span",{className:"detail-tag-key",children:[f,": "]}),(0,F.jsx)("span",{className:"detail-tag-value",children:h})]},f))})]}),!s&&(0,F.jsx)("div",{className:"detail-not-available",children:"Blueprint not available"})]})}function l3({blueprint:e,executionData:t}){switch(e.type){case"PipeLLM":return(0,F.jsx)(jh,{blueprint:e,executionData:t});case"PipeImgGen":return(0,F.jsx)(Fh,{blueprint:e,executionData:t});case"PipeCompose":return(0,F.jsx)(tg,{blueprint:e,executionData:t});case"PipeExtract":return(0,F.jsx)(Qh,{blueprint:e,executionData:t});case"PipeSearch":return(0,F.jsx)(Jh,{blueprint:e,executionData:t});case"PipeSequence":return(0,F.jsx)(ag,{blueprint:e,executionData:t});case"PipeParallel":return(0,F.jsx)(rg,{blueprint:e,executionData:t});case"PipeCondition":return(0,F.jsx)(og,{blueprint:e,executionData:t});case"PipeBatch":return(0,F.jsx)(ug,{blueprint:e,executionData:t});case"PipeFunc":return null;case"PipeSignature":return(0,F.jsx)("div",{className:"detail-not-available",children:"Signature stub \u2014 declared but not yet implemented."});default:return null}}function r3({executionData:e,pipeType:t}){switch(t){case"PipeLLM":return(0,F.jsx)($h,{data:e});case"PipeImgGen":return(0,F.jsx)(Kh,{data:e});case"PipeExtract":return(0,F.jsx)(Wh,{data:e});case"PipeSearch":return(0,F.jsx)(eg,{data:e});case"PipeCompose":return(0,F.jsx)(ng,{data:e});case"PipeCondition":return(0,F.jsx)(ig,{data:e});case"PipeSequence":return(0,F.jsx)(lg,{data:e});case"PipeParallel":return(0,F.jsx)(sg,{data:e});case"PipeBatch":return(0,F.jsx)(cg,{data:e});default:return(0,F.jsx)(s3,{data:e})}}function s3({data:e}){let t=Object.entries(e);return t.length===0?null:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)("div",{className:"detail-section-label",children:"Execution"}),t.map(([n,o])=>(0,F.jsx)(te,{label:n,value:String(o)},n))]})}var fg=oe(At(),1);var Ee=oe(ve(),1);function dg({concept:e,ioData:t,isDryRun:n,resolveStorageUrl:o,canEmbedPdf:i,onOpenExternally:a,instanceKey:l}){return(0,Ee.jsxs)(Ee.Fragment,{children:[(0,Ee.jsxs)("div",{className:"detail-header",children:[(0,Ee.jsx)("span",{className:"detail-concept-code",children:e.code}),(0,Ee.jsx)("span",{className:"detail-concept-domain",children:e.domain_code})]}),e.description&&(0,Ee.jsx)("div",{className:"detail-description",children:e.description}),e.refines&&(0,Ee.jsxs)("div",{className:"detail-refines",children:["refines ",(0,Ee.jsx)("span",{className:"detail-refines-code",children:e.refines})]}),(0,Ee.jsx)(u3,{concept:e,ioData:t,isDryRun:n,resolveStorageUrl:o,canEmbedPdf:i,onOpenExternally:a},l??`${e.code}:${t&&"digest"in t?t.digest:t?.name??""}`)]})}function u3({concept:e,ioData:t,isDryRun:n,resolveStorageUrl:o,canEmbedPdf:i,onOpenExternally:a}){let l=!!t&&!n,[r,s]=fg.default.useState(l?"data":"structure"),u=fg.default.useId(),c=b=>`${u}-tab-${b}`,d=b=>`${u}-tabpanel-${b}`,f=e.json_schema?(0,Ee.jsxs)("div",{children:[(0,Ee.jsx)("div",{className:"detail-section-label",children:"Structure"}),(0,Ee.jsx)(c3,{schema:e.json_schema,isDryRun:n})]}):(0,Ee.jsx)("div",{className:"detail-not-available",children:"Schema not available"});if(!l)return f;let h=b=>{let S;switch(b.key){case"ArrowLeft":case"ArrowRight":S=r==="data"?"structure":"data";break;case"Home":S="data";break;case"End":S="structure";break;default:return}b.preventDefault(),s(S),document.getElementById(c(S))?.focus()},v=(b,S)=>(0,Ee.jsx)("button",{type:"button",role:"tab",id:c(b),"aria-selected":r===b,"aria-controls":d(b),tabIndex:r===b?0:-1,className:`detail-tab ${r===b?"detail-tab--active":""}`,onClick:()=>s(b),onKeyDown:h,children:S});return(0,Ee.jsxs)(Ee.Fragment,{children:[(0,Ee.jsxs)("div",{className:"detail-tabs",role:"tablist","aria-label":"Concept views",children:[v("data","Data"),v("structure","Structure")]}),(0,Ee.jsx)("div",{role:"tabpanel",id:d(r),"aria-labelledby":c(r),children:r==="data"?(0,Ee.jsx)(Uf,{stuff:d3(t),resolveStorageUrl:o,canEmbedPdf:i,onOpenExternally:a}):f})]})}function c3({schema:e,isDryRun:t}){let n=e.properties,o=new Set(e.required??[]);if(!n||Object.keys(n).length===0)return(0,Ee.jsx)("div",{className:"detail-not-available",children:"No fields defined"});let i=Object.entries(n),a=t?i.filter(([l])=>o.has(l)):i;return(0,Ee.jsxs)("table",{className:"detail-schema-table",children:[(0,Ee.jsx)("thead",{children:(0,Ee.jsxs)("tr",{children:[(0,Ee.jsx)("th",{children:"Field"}),(0,Ee.jsx)("th",{children:"Type"}),(0,Ee.jsx)("th",{}),(0,Ee.jsx)("th",{children:"Description"})]})}),(0,Ee.jsx)("tbody",{children:a.map(([l,r])=>(0,Ee.jsxs)("tr",{children:[(0,Ee.jsx)("td",{className:"detail-schema-field",children:l}),(0,Ee.jsx)("td",{className:"detail-schema-type",children:f3(r)}),(0,Ee.jsx)("td",{children:o.has(l)&&(0,Ee.jsx)("span",{className:"detail-schema-required",children:"req"})}),(0,Ee.jsx)("td",{children:r.description??""})]},l))})]})}function f3(e){return typeof e.type=="string"?e.type:Array.isArray(e.type)?e.type.join(" | "):e.anyOf?"union":e.allOf?"all":typeof e.$ref=="string"?e.$ref.split("/").pop()??"(unresolved type)":"(unresolved type)"}function d3(e){return p3(e)?e:{digest:e.digest??"",name:e.name,concept:e.concept,contentType:e.content_type,data:e.data,dataText:e.data_text,dataHtml:e.data_html}}function p3(e){return"contentType"in e||"dataText"in e||"dataHtml"in e}function tr(e){return e.map(t=>({id:t.id,type:t.type,data:t.data,position:t.position,style:t.style,sourcePosition:t.sourcePosition,targetPosition:t.targetPosition,parentId:t.parentId,extent:t.extent,selected:t.selected}))}function nr(e){return e.map(t=>({id:t.id,source:t.source,target:t.target,type:t.type,animated:t.animated,label:t.label,labelStyle:t.labelStyle,labelBgStyle:t.labelBgStyle,labelBgPadding:t.labelBgPadding,labelBgBorderRadius:t.labelBgBorderRadius,style:t.style,markerEnd:t.markerEnd}))}function Vf(e){return{pipeCode:e.pipe_code,pipeType:e.pipe_type,description:e.description,status:e.status,inputs:e.io.inputs.map(t=>({name:t.name,concept:t.concept??""})),outputs:e.io.outputs.map(t=>({name:t.name,concept:t.concept??""}))}}var m3=7,h3=48,g3=140;function y3(e,t,n){let o=[],i=[],a=new Set;for(let s of Object.values(t.stuffProducers))a.add(s);for(let s of Object.values(t.stuffConsumers))for(let u of s)a.add(u);for(let s of e.nodes){if(!a.has(s.id))continue;let u=Ll(s,`nodes[${s.id}]`),c=u.status==="failed",d=u.pipe_code,f=Vf(u);o.push({id:u.id,type:Ol,data:{labelDescriptor:{kind:"pipe",label:d,isFailed:c},nodeData:u,isPipe:!0,isStuff:!1,labelText:d,pipeCode:f.pipeCode,pipeType:u.pipe_type,pipeCardData:f},position:{x:0,y:0}})}for(let[s,u]of Object.entries(t.stuffRegistry)){let c=Gi(s),d=u.name,f=u.concept||"",h=Math.max(d.length,f.length)*m3+h3,v=Math.max(g3,h),b=!t.stuffProducers[s],S=!b&&!t.stuffConsumers[s]?.length,p=b?"input":S?"output":void 0,y=b?"var(--color-stuff-input-border, #50FA7B)":S?"var(--color-stuff-output-border, #a78bfa)":"var(--color-stuff-border)";o.push({id:c,type:y1,data:{labelDescriptor:{kind:"stuff",label:d,concept:f},isStuff:!0,isPipe:!1,labelText:d,stuffRole:p,stuffDigest:s},position:{x:0,y:0},style:{background:"var(--color-stuff-bg)",border:`2px solid ${y}`,borderRadius:"999px",padding:"0",width:v+"px",boxShadow:"var(--shadow-md)"}})}let l=0;for(let[s,u]of Object.entries(t.stuffProducers)){let c=Gi(s);i.push({id:"edge_"+l++,source:u,target:c,type:n,animated:!1,style:{stroke:"var(--color-edge)",strokeWidth:2},markerEnd:{type:ga,color:"var(--color-edge)"}})}for(let[s,u]of Object.entries(t.stuffConsumers)){let c=Gi(s);for(let d of u)i.push({id:"edge_"+l++,source:c,target:d,type:n,animated:!1,style:{stroke:"var(--color-edge)",strokeWidth:2},markerEnd:{type:ga,color:"var(--color-edge)"}})}for(let s of e.edges){if(s.kind!=="parallel_combine"||!s.source_stuff_digest||!s.target_stuff_digest||!t.stuffRegistry[s.source_stuff_digest]||!t.stuffRegistry[s.target_stuff_digest])continue;let u=Gi(s.source_stuff_digest),c=Gi(s.target_stuff_digest);i.push({id:s.id,source:u,target:c,type:"smoothstep",animated:!1,style:{stroke:"var(--color-parallel-combine)",strokeWidth:2,strokeDasharray:"5,5"},markerEnd:{type:ga,color:"var(--color-parallel-combine)"}})}for(let s of e.edges){if(s.kind!=="batch_item"&&s.kind!=="batch_aggregate"||!s.source_stuff_digest||!s.target_stuff_digest||!t.stuffRegistry[s.source_stuff_digest]||!t.stuffRegistry[s.target_stuff_digest])continue;let u=Gi(s.source_stuff_digest),c=Gi(s.target_stuff_digest),d=s.kind==="batch_item";i.push({id:s.id,source:u,target:c,type:n,animated:!1,_batchEdge:!0,label:s.label||"",labelStyle:{fontSize:"10px",fontFamily:"var(--font-mono)",fill:d?"var(--color-batch-item)":"var(--color-batch-aggregate)"},labelBgStyle:{fill:"var(--color-bg)",fillOpacity:.9},style:{stroke:d?"var(--color-batch-item)":"var(--color-batch-aggregate)",strokeWidth:2,strokeDasharray:"5,5"},markerEnd:{type:ga,color:d?"var(--color-batch-item)":"var(--color-batch-aggregate)"}})}let r=_o(e,t);for(let s of i){let u=r[s.source]||null,c=r[s.target]||null;u&&c&&u!==c&&(s._crossGroup=!0,s.style={...s.style,strokeWidth:1.5,opacity:.65})}for(let s of i)s._batchEdge&&(s.style={...s.style,opacity:.7});return{nodes:o,edges:i}}function cT(e,t){if(e){let n=LE(e);if(n&&(Object.keys(n.stuffProducers).length>0||Object.keys(n.stuffConsumers).length>0))return{graphData:y3(e,n,t),analysis:n}}return{graphData:{nodes:[],edges:[]},analysis:null}}function dT(e,t,n){let o=new Set([e]),a=t.nodes.find(l=>l.id===e)?.pipe_code;if(!a)return o;for(let l of t.nodes)l.pipe_code===a&&n.has(l.id)&&o.add(l.id);return o}function v3(e,t){let n=[],o=t[e],i=new Set;for(;o&&!i.has(o);)n.push(o),i.add(o),o=t[o];return n}function $s(e,t,n){let o=v3(e,t),i=null;for(let a of o)n.has(a)&&(i=a);return i}function Yf(e,t,n){return $s(e,t,n)??e}function fT(e,t){return e.nodes.find(n=>n.id===t)}function pg(e,t,n,o,i){if(o.size===0)return{nodes:e.nodes,edges:e.edges,analysis:t};let a=_o(n,t),l=new Map;for(let p of o){let m=fT(n,p)?.io?.outputs;if(m)for(let g of m){if(!g.digest)continue;let x=l.get(g.digest);x||(x=new Set,l.set(g.digest,x)),x.add(p)}}if(l.size>0)for(let p of e.nodes){if(!zl(p.id))continue;let y=l.get(ds(p.id));if(!y)continue;let m=a[p.id],g=null,x=new Set;for(;m&&!x.has(m);)x.add(m),y.has(m)&&(g=m),m=a[m];if(!g)continue;let _=a[g];_?a[p.id]=_:delete a[p.id]}let r=[];for(let p of e.nodes)$s(p.id,a,o)||r.push(p);for(let p of o){if($s(p,a,o))continue;let y=fT(n,p);if(!y)continue;let m=Vf(Ll(y,p));i&&(m.onExpand=x=>i(p,x));let g={id:p,type:Ol,data:{labelDescriptor:{kind:"pipe",label:m.pipeCode,isFailed:m.status==="failed"},nodeData:y,isPipe:!1,isStuff:!1,isController:!0,labelText:m.pipeCode,pipeCode:m.pipeCode,pipeType:y.pipe_type,pipeCardData:m},position:{x:0,y:0}};r.push(g)}let s=new Set;for(let p of t.controllerNodeIds)o.has(p)||$s(p,a,o)||s.add(p);let u={};for(let p of s){let y=t.containmentTree[p]??[],m=[];for(let g of y){let x=$s(g,a,o);x&&x!==g||m.push(g)}u[p]=m}let c=new Set;for(let p of Object.values(u))for(let y of p)c.add(y);let d={};for(let[p,y]of Object.entries(t.stuffProducers))d[p]=Yf(y,a,o);let f={};for(let[p,y]of Object.entries(t.stuffConsumers)){let m=new Set;for(let g of y)m.add(Yf(g,a,o));f[p]=[...m]}let h={stuffRegistry:t.stuffRegistry,stuffProducers:d,stuffConsumers:f,controllerNodeIds:s,childNodeIds:c,containmentTree:u},v=new Map;for(let p of e.edges){let y=Yf(p.source,a,o),m=Yf(p.target,a,o);if(y===m)continue;let g=p._batchEdge?"batch":"data",x=`${y}->${m}|${g}`;if(v.has(x))continue;let _={...p,source:y,target:m,id:p.id};p._batchEdge&&(y!==p.source||m!==p.target)&&(_.label="[N]"),delete _._crossGroup,v.set(x,_)}let b=_o({...n,edges:n.edges.filter(p=>p.kind!=="contains"?!0:s.has(p.source))},h),S=[];for(let p of v.values()){let y=b[p.source]||null,m=b[p.target]||null;if(y&&m&&y!==m)p._crossGroup=!0,p.style={...p.style,strokeWidth:1.5,opacity:.65};else if(p.style&&(p.style.opacity===.65||p.style.strokeWidth===1.5)){let{opacity:g,strokeWidth:x,..._}=p.style;p.style={..._,strokeWidth:2},p.markerEnd||(p.markerEnd={type:ga,color:"var(--color-edge)"})}S.push(p)}return{nodes:r,edges:S,analysis:h}}var b3=window.ELK,pT=b3;function S3(e){switch(e){case"LR":return"RIGHT";case"RL":return"LEFT";case"BT":return"UP";default:return"DOWN"}}var x3="_in",_3="_out";function hg(e){return e+x3}function gg(e){return e+_3}function E3(e,t,n){let o={LR:{inSide:"WEST",outSide:"EAST"},RL:{inSide:"EAST",outSide:"WEST"},TB:{inSide:"NORTH",outSide:"SOUTH"},BT:{inSide:"SOUTH",outSide:"NORTH"}},{inSide:i,outSide:a}=o[n],l=n==="LR"||n==="RL",r=l?n==="LR"?0:t.width:t.width/2,s=l?t.height/2:n==="TB"?0:t.height,u=l?n==="LR"?t.width:0:t.width/2,c=l?t.height/2:n==="TB"?t.height:0;return[{id:hg(e),x:r,y:s,width:1,height:1,layoutOptions:{"elk.port.side":i}},{id:gg(e),x:u,y:c,width:1,height:1,layoutOptions:{"elk.port.side":a}}]}var T3=320,yT=28,N3=24,mg=8,C3=22,w3=50,A3=16,M3=3,mT=38,hT=30,Xf=22,D3=140,R3=100,O3=17,z3=58,L3=5.5,B3=5,H3=4.5,P3=4;function k3(e,t,n){if(!e)return 0;if(!t)return 1;let o=n-yT,i=Math.max(1,Math.floor(o/L3)),a=Math.ceil(e.length/i);return Math.min(M3,Math.max(1,a))}function G3(e,t){let n=Math.min(D3,Math.ceil(e.length*B3)),o=Math.min(R3,Math.ceil(t.length*H3));return n+o+O3}function gT(e,t){if(e.length===0)return 0;let n=t-yT-z3,o=1,i=0;for(let a of e){let l=G3(a.name,a.concept);if(i===0){i=l;continue}i+l<=n?i+=l:(o+=1,i=l)}return o}function or(e,t){let n=e.data||{},o=n.isStuff,i=n.labelText||"",a=e.type===Ol,l=t?180:280,r=t?240:400,s=Math.max(180,Math.min(r,i.length*8+60)),u;o?u=Math.max(180,s):a&&n.pipeCardData?u=r:u=Math.max(a?l:200,s);let c;if(o)c=60;else if(a&&n.pipeCardData){let d=n.pipeCardData,f=d.inputs??[],h=d.outputs??[],v=d.description||n.nodeData?.description||"",b=N3+(t?w3:C3),S=k3(v,t,u);S>0&&(b+=mg+S*A3);let p=f.slice(0,P3);if(p.length>0)if(b+=mg,t)b+=mT+(p.length-1)*Xf;else{let y=gT(p,u);b+=hT+(y-1)*Xf}if(h.length>0)if(b+=mg,t)b+=mT+(h.length-1)*Xf;else{let y=gT(h,u);b+=hT+(y-1)*Xf}c=Math.min(T3,b)}else c=a?120:70;return{width:u,height:c}}function U3(e,t){let n={},o=new Set;function i(a){if(n[a]!==void 0)return n[a];if(o.has(a))return 0;o.add(a);let l=t[a]||[],r=-1;for(let s of l)e.has(s)&&(r=Math.max(r,i(s)));return o.delete(a),n[a]=r+1,n[a]}for(let a of e)i(a);return n}function qf(e,t,n){return{id:e,width:t.width,height:t.height,ports:E3(e,t,n),layoutOptions:{"elk.portConstraints":"FIXED_POS"}}}function vT(e,t,n,o,i,a){let l=i==="LR"||i==="RL",r=a?.nodesep??80,s=a?.ranksep??70,u=S3(i),c="30",d={"elk.algorithm":"layered","elk.direction":u,"elk.hierarchyHandling":"INCLUDE_CHILDREN","elk.spacing.nodeNode":String(r),"elk.layered.spacing.nodeNodeBetweenLayers":String(s),"elk.spacing.edgeNode":c,"elk.spacing.edgeEdge":"20","elk.layered.spacing.edgeNodeBetweenLayers":c,"elk.layered.spacing.edgeEdgeBetweenLayers":"15","elk.layered.nodePlacement.favorStraightEdges":"true"};if(!n||!o||o.controllerNodeIds.size===0){let x={},_=e.map(w=>{let C=or(w,l);return x[w.id]=C,qf(w.id,C,i)}),E=t.map(w=>({id:w.id,sources:[gg(w.source)],targets:[hg(w.target)]}));return{elkGraph:{id:"root",layoutOptions:d,children:_,edges:E},dimensionMap:x}}let f=_o(n,o),h=U3(o.controllerNodeIds,o.containmentTree),v={},b=new Map;for(let x of e)b.set(x.id,x);let S={},p=Array.from(o.controllerNodeIds);p.sort((x,_)=>(h[x]??0)-(h[_]??0));for(let x of p){let E=1+(h[x]??0)*.15,w=Math.round(zc*E),C=Math.round(Lc*E),H=Math.round(Bc*E),D={"elk.padding":`[top=${C},left=${w},bottom=${H},right=${w}]`,"elk.spacing.nodeNode":String(r),"elk.layered.spacing.nodeNodeBetweenLayers":String(s),"elk.spacing.edgeNode":c,"elk.layered.spacing.edgeNodeBetweenLayers":c},z=[],I=o.containmentTree[x]||[];for(let T of I)if(o.controllerNodeIds.has(T)){let A=S[T];A&&z.push(A)}else{let A=b.get(T);if(A){let M=or(A,l);v[T]=M,z.push(qf(T,M,i))}}for(let T of e)if(T.data.isStuff&&f[T.id]===x&&!z.some(A=>A.id===T.id)){let A=or(T,l);v[T.id]=A,z.push(qf(T.id,A,i))}S[x]={id:x,layoutOptions:D,children:z}}let y=[];for(let x of p)if(!f[x]){let _=S[x];_&&y.push(_)}for(let x of e)if(!f[x.id]&&!o.controllerNodeIds.has(x.id)){let _=or(x,l);v[x.id]=_,y.push(qf(x.id,_,i))}let m=new Set(e.map(x=>x.id)),g=t.filter(x=>m.has(x.source)&&m.has(x.target)).map(x=>({id:x.id,sources:[gg(x.source)],targets:[hg(x.target)]}));return{elkGraph:{id:"root",layoutOptions:d,children:y,edges:g},dimensionMap:v}}function bT(e){let t={};function n(o,i,a){let l=i+(o.x??0),r=a+(o.y??0);o.id!=="root"&&(t[o.id]={x:l,y:r,width:o.width??0,height:o.height??0});for(let s of o.children??[])n(s,l,r)}return n(e,0,0),t}var yg=null;function I3(){return yg||(yg=new pT),yg}async function Zf(e,t,n,o,i,a){if(e.length===0)return{nodes:[],edges:t,controllerPositions:{}};let l=n==="LR"||n==="RL",{elkGraph:r,dimensionMap:s}=vT(e,t,i??null,a??null,n,o),u=await I3().layout(r),c=bT(u),d={};if(a)for(let h of a.controllerNodeIds)c[h]&&(d[h]=c[h]);return{nodes:e.map(h=>{let v=c[h.id],b=s[h.id]??or(h,l),S=b.width,p=b.height,y=h.data.pipeCardData,g=y?{...y,direction:l?"LR":"TB"}:void 0;return{...h,data:{...h.data,_estimatedWidth:S,_estimatedHeight:p,pipeCardData:g},style:{...h.style,width:S+"px",height:p+"px"},position:{x:v?v.x:0,y:v?v.y:0},sourcePosition:l?n==="LR"?"right":"left":n==="TB"?"bottom":"top",targetPosition:l?n==="LR"?"left":"right":n==="TB"?"top":"bottom"}}),edges:t,controllerPositions:d}}var Fs=5;function V3(e,t,n){let o=new Set,i=[e];for(;i.length>0;){let a=i.pop();for(let l of t[a]||[])o.add(l),n.has(l)&&i.push(l)}return o}function Y3(e,t,n,o){let i={};for(let v of n)i[v.id]=v;let a={};for(let v of e.nodes)t.controllerNodeIds.has(v.id)&&(a[v.id]=Ll(v,`nodes[${v.id}]`));let l={},r=new Set;function s(v){if(l[v]!==void 0)return l[v];if(r.has(v))throw new Error(`Cycle detected in containment tree: controller "${v}" is part of a containment cycle`);r.add(v);let b=t.containmentTree[v]||[],S=-1;for(let p of b)t.controllerNodeIds.has(p)&&(S=Math.max(S,s(p)));return r.delete(v),l[v]=S+1,l[v]}let u=_o(e,t),c={};for(let[v,b]of Object.entries(u))zl(v)&&i[v]&&(c[b]||(c[b]=[]),c[b].push(v));let d=Array.from(t.controllerNodeIds);for(let v of d)s(v);d.sort((v,b)=>l[v]-l[b]);let f=[],h={};for(let v of d){let S=(t.containmentTree[v]||[]).filter(D=>i[D]),p=c[v]||[],y=[...S,...p];if(y.length===0)continue;let m,g,x,_,E=o?.[v];if(E)m=E.x,g=E.y,x=E.width,_=E.height;else{let D=1/0,z=1/0,I=-1/0,T=-1/0;for(let V of y){let k=i[V],G=k.position,q=x1(k),Z=_1(k);D=Math.min(D,G.x),z=Math.min(z,G.y),I=Math.max(I,G.x+q),T=Math.max(T,G.y+Z)}let M=1+(l[v]??0)*.15,O=Math.round(zc*M),R=Math.round(Lc*M),L=Math.round(Bc*M);m=D-O,g=z-R,x=I-D+2*O,_=T-z+R+L}let w=a[v];if(!w)throw new ps(`nodes[${v}]`,`controller "${v}" is referenced by a "contains" edge but has no corresponding node in graphspec.nodes`);let C=w.pipe_code,H={id:v,type:v1,data:{label:C,pipeType:w.pipe_type,isController:!0,isPipe:!1,isStuff:!1,pipeCode:C,labelText:C},position:{x:m,y:g},style:{width:x+"px",height:_+"px",padding:"0"}};f.push(H),i[v]=H;for(let D of y)h[D]=v}for(let[v,b]of Object.entries(h)){let S=i[v],p=i[b];!S||!p||(S.position={x:S.position.x-p.position.x,y:S.position.y-p.position.y},S.parentId=b,S.extent="parent")}return f}function ir(e,t,n,o,i,a,l,r,s){if(!i||!o||!n)return{nodes:e,edges:t};let u={},c=new Set,d={};for(let g of n.nodes)o.controllerNodeIds.has(g.id)&&(d[g.id]=g.pipe_type);for(let g of o.controllerNodeIds){let x=o.containmentTree[g]||[];u[g]=x.length;let _=d[g];(_==="PipeParallel"||_==="PipeBatch")&&x.length>Fs&&!a?.has(g)&&c.add(g)}let f=e,h=t;if(c.size>0){let g=new Set;for(let _ of c){let w=(o.containmentTree[_]||[]).slice(Fs);for(let C of w)if(g.add(C),o.controllerNodeIds.has(C))for(let H of V3(C,o.containmentTree,o.controllerNodeIds))g.add(H)}let x=_o(n,o);for(let _ of e){if(!zl(_.id)||g.has(_.id))continue;let E=x[_.id];if(!E||!c.has(E)&&!g.has(E))continue;let w=t.filter(C=>{if(C.source!==_.id&&C.target!==_.id)return!1;let H=C.source===_.id?C.target:C.source;return!zl(H)});(w.length===0||w.every(C=>{let H=C.source===_.id?C.target:C.source;return g.has(H)}))&&g.add(_.id)}f=e.filter(_=>!g.has(_.id)),h=t.filter(_=>!g.has(_.source)&&!g.has(_.target))}let v=Y3(n,o,f,r);if(v.length===0)return{nodes:f,edges:h};for(let g of v){let x=u[g.id]??0,_=c.has(g.id);if(g.data.childCount=x,g.data.isCollapsed=_,l){let E=g.id;g.data.onToggleCollapse=()=>l(E)}if(s){let E=g.id;g.data.onToggleFold=w=>s(E,w)}}let b=[...v,...f],S={};for(let g of b)S[g.id]=g;let p={},y=new Set;function m(g){if(p[g]!==void 0)return p[g];if(y.has(g))throw new Error(`Cycle detected in node parent chain: node "${g}" references itself as an ancestor`);y.add(g);let x=S[g];return p[g]=x&&x.parentId?1+m(x.parentId):0,y.delete(g),p[g]}for(let g of b)m(g.id);return b.sort((g,x)=>p[g.id]-p[x.id]),{nodes:b,edges:h}}var ST={"--font-sans":'"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',"--font-mono":'"JetBrains Mono", "Monaco", "Menlo", monospace'},X3={...ST,"--surface-page":"#0a0a0a","--surface-panel":"#111118","--surface-overlay":"rgba(17, 17, 24, 0.8)","--surface-overlay-hover":"rgba(30, 30, 40, 0.9)","--surface-overlay-disabled":"rgba(17, 17, 24, 0.6)","--surface-elevated":"rgba(255, 255, 255, 0.06)","--surface-elevated-hover":"rgba(255, 255, 255, 0.1)","--surface-sunken":"rgba(255, 255, 255, 0.03)","--surface-pill":"rgba(255, 255, 255, 0.06)","--surface-pill-border":"rgba(255, 255, 255, 0.08)","--border-subtle":"rgba(255, 255, 255, 0.06)","--border-default":"rgba(255, 255, 255, 0.1)","--border-strong":"rgba(255, 255, 255, 0.18)","--border-dashed":"rgba(255, 255, 255, 0.15)","--text-primary":"#f8fafc","--text-default":"#e2e8f0","--text-secondary":"#cbd5e1","--text-muted":"#94a3b8","--text-dim":"#64748b","--text-on-accent":"#0e0e0e","--shadow-sm":"0 2px 8px rgba(0, 0, 0, 0.4)","--shadow-md":"0 4px 16px rgba(0, 0, 0, 0.6)","--shadow-lg":"0 8px 24px rgba(0, 0, 0, 0.5)","--focus-ring":"rgba(59, 130, 246, 0.6)","--color-pipe":"#ff6b6b","--color-pipe-bg":"rgba(224,108,117,0.18)","--color-pipe-text":"#ffffff","--color-stuff":"#4ECDC4","--color-stuff-bg":"rgba(78,205,196,0.12)","--color-stuff-border":"#9ddcfd","--color-stuff-text":"#98FB98","--color-stuff-text-dim":"#9ddcfd","--color-edge":"#FFFACD","--color-batch-item":"#bd93f9","--color-batch-aggregate":"#50fa7b","--color-parallel-combine":"#d6a4ff","--color-success":"#50FA7B","--color-success-bg":"rgba(80,250,123,0.15)","--color-error":"#FF5555","--color-error-bg":"rgba(255,85,85,0.15)","--color-error-border":"rgba(255,85,85,0.2)","--color-accent":"#8BE9FD","--color-accent-strong":"#3b82f6","--color-warning":"#FFB86C","--ctrl-sequence-border":"rgba(148, 163, 184, 0.25)","--ctrl-sequence-bg":"rgba(148, 163, 184, 0.03)","--ctrl-sequence-text":"#94a3b8","--ctrl-parallel-border":"rgba(139, 233, 253, 0.35)","--ctrl-parallel-bg":"rgba(139, 233, 253, 0.03)","--ctrl-parallel-text":"#8be9fd","--ctrl-condition-border":"rgba(251, 191, 36, 0.35)","--ctrl-condition-bg":"rgba(251, 191, 36, 0.03)","--ctrl-condition-text":"#fbbf24","--ctrl-batch-border":"rgba(167, 139, 250, 0.35)","--ctrl-batch-bg":"rgba(167, 139, 250, 0.03)","--ctrl-batch-text":"#a78bfa","--ctrl-folded-bg":"rgba(148, 163, 184, 0.25)","--ctrl-folded-border":"rgba(148, 163, 184, 0.4)","--color-bg":"#0a0a0a","--color-bg-dots":"rgba(255, 255, 255, 0.35)","--color-text-muted":"#94a3b8","--color-controller-text":"#94a3b8"},q3={...ST,"--surface-page":"#f8fafc","--surface-panel":"#ffffff","--surface-overlay":"rgba(255, 255, 255, 0.92)","--surface-overlay-hover":"rgba(241, 245, 249, 0.96)","--surface-overlay-disabled":"rgba(255, 255, 255, 0.7)","--surface-elevated":"rgba(15, 23, 42, 0.05)","--surface-elevated-hover":"rgba(15, 23, 42, 0.09)","--surface-sunken":"rgba(15, 23, 42, 0.03)","--surface-pill":"rgba(15, 23, 42, 0.05)","--surface-pill-border":"rgba(15, 23, 42, 0.1)","--border-subtle":"rgba(15, 23, 42, 0.08)","--border-default":"rgba(15, 23, 42, 0.12)","--border-strong":"rgba(15, 23, 42, 0.22)","--border-dashed":"rgba(15, 23, 42, 0.18)","--text-primary":"#020617","--text-default":"#0f172a","--text-secondary":"#1e293b","--text-muted":"#475569","--text-dim":"#64748b","--text-on-accent":"#ffffff","--shadow-sm":"0 2px 8px rgba(15, 23, 42, 0.08)","--shadow-md":"0 4px 16px rgba(15, 23, 42, 0.14)","--shadow-lg":"0 8px 24px rgba(15, 23, 42, 0.15)","--focus-ring":"rgba(2, 132, 199, 0.5)","--color-pipe":"#dc2626","--color-pipe-bg":"rgba(220, 38, 38, 0.1)","--color-pipe-text":"#ffffff","--color-stuff":"#0891b2","--color-stuff-bg":"rgba(8, 145, 178, 0.08)","--color-stuff-border":"#0e7490","--color-stuff-text":"#0f172a","--color-stuff-text-dim":"#475569","--color-edge":"#64748b","--color-batch-item":"#7c3aed","--color-batch-aggregate":"#15803d","--color-parallel-combine":"#6d28d9","--color-success":"#15803d","--color-success-bg":"rgba(21, 128, 61, 0.12)","--color-error":"#dc2626","--color-error-bg":"rgba(220, 38, 38, 0.1)","--color-error-border":"rgba(220, 38, 38, 0.25)","--color-accent":"#0284c7","--color-accent-strong":"#0284c7","--color-warning":"#d97706","--ctrl-sequence-border":"rgba(71, 85, 105, 0.3)","--ctrl-sequence-bg":"rgba(71, 85, 105, 0.04)","--ctrl-sequence-text":"#475569","--ctrl-parallel-border":"rgba(8, 145, 178, 0.4)","--ctrl-parallel-bg":"rgba(8, 145, 178, 0.05)","--ctrl-parallel-text":"#0e7490","--ctrl-condition-border":"rgba(217, 119, 6, 0.4)","--ctrl-condition-bg":"rgba(217, 119, 6, 0.05)","--ctrl-condition-text":"#b45309","--ctrl-batch-border":"rgba(124, 58, 237, 0.4)","--ctrl-batch-bg":"rgba(124, 58, 237, 0.05)","--ctrl-batch-text":"#6d28d9","--ctrl-folded-bg":"rgba(71, 85, 105, 0.18)","--ctrl-folded-border":"rgba(71, 85, 105, 0.35)","--color-bg":"#f8fafc","--color-bg-dots":"rgba(15, 23, 42, 0.18)","--color-text-muted":"#475569","--color-controller-text":"#475569"};function jf(e){return e===ha.LIGHT?q3:X3}var La={direction:"LR",showControllers:!1,foldMode:to.EXPANDED,theme:yt.SYSTEM,toolbarPosition:sn.TOP_RIGHT,nodesep:50,ranksep:100,edgeType:Oc.DEFAULT,initialZoom:null,panToTop:!0};var Ba=oe(ve(),1);function Z3(e){return e.kind==="pipe"?(0,Ba.jsx)("div",{style:{padding:"10px 14px",display:"flex",flexDirection:"column",gap:"2px",textAlign:"center",width:"100%",boxSizing:"border-box",minWidth:0},title:e.label,children:(0,Ba.jsx)("span",{style:{fontFamily:"var(--font-mono)",fontSize:"13px",fontWeight:600,color:"var(--color-pipe-text)",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.label})}):(0,Ba.jsxs)("div",{style:{padding:"8px 24px",display:"flex",flexDirection:"column",alignItems:"center",gap:"2px",textAlign:"center",width:"100%",boxSizing:"border-box",minWidth:0},title:e.concept?`${e.label}: ${e.concept}`:e.label,children:[(0,Ba.jsx)("span",{style:{fontFamily:"var(--font-mono)",fontSize:"12px",fontWeight:600,color:"var(--color-stuff-text)",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.label}),e.concept&&(0,Ba.jsx)("span",{style:{fontSize:"14px",color:"var(--color-stuff-text-dim)",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.concept})]})}function ar(e){return e.map(t=>t.data.labelDescriptor?{...t,data:{...t.data,label:Z3(t.data.labelDescriptor)}}:t)}var $=oe(ve(),1),j3=15;var $3=(0,$.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),(0,$.jsx)("polyline",{points:"12 5 19 12 12 19"})]}),F3=(0,$.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,$.jsx)("polyline",{points:"19 12 12 19 5 12"})]}),K3=(0,$.jsx)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,$.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})}),Q3=(0,$.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,$.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),W3=(0,$.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("polyline",{points:"15 3 21 3 21 9"}),(0,$.jsx)("polyline",{points:"9 21 3 21 3 15"}),(0,$.jsx)("line",{x1:"21",y1:"3",x2:"14",y2:"10"}),(0,$.jsx)("line",{x1:"3",y1:"21",x2:"10",y2:"14"})]}),J3=(0,$.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z"}),(0,$.jsx)("path",{d:"m7 16.5-4.74-2.85"}),(0,$.jsx)("path",{d:"m7 16.5 5-3"}),(0,$.jsx)("path",{d:"M7 16.5v5.17"}),(0,$.jsx)("path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z"}),(0,$.jsx)("path",{d:"m17 16.5-5-3"}),(0,$.jsx)("path",{d:"m17 16.5 4.74-2.85"}),(0,$.jsx)("path",{d:"M17 16.5v5.17"}),(0,$.jsx)("path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z"}),(0,$.jsx)("path",{d:"M12 8 7.26 5.15"}),(0,$.jsx)("path",{d:"m12 8 4.74-2.85"}),(0,$.jsx)("path",{d:"M12 13.5V8"})]}),ez=(0,$.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"}),(0,$.jsx)("polyline",{points:"2 2 6 6 2 6"}),(0,$.jsx)("polyline",{points:"22 2 18 6 22 6"}),(0,$.jsx)("polyline",{points:"2 22 6 18 2 18"}),(0,$.jsx)("polyline",{points:"22 22 18 18 22 18"})]}),tz=(0,$.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("rect",{x:"9",y:"9",width:"6",height:"6",rx:"1"}),(0,$.jsx)("polyline",{points:"3 3 7 7 3 7"}),(0,$.jsx)("polyline",{points:"21 3 17 7 21 7"}),(0,$.jsx)("polyline",{points:"3 21 7 17 3 17"}),(0,$.jsx)("polyline",{points:"21 21 17 17 21 17"})]}),nz=(0,$.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("circle",{cx:"12",cy:"12",r:"4"}),(0,$.jsx)("line",{x1:"12",y1:"2",x2:"12",y2:"4"}),(0,$.jsx)("line",{x1:"12",y1:"20",x2:"12",y2:"22"}),(0,$.jsx)("line",{x1:"4.93",y1:"4.93",x2:"6.34",y2:"6.34"}),(0,$.jsx)("line",{x1:"17.66",y1:"17.66",x2:"19.07",y2:"19.07"}),(0,$.jsx)("line",{x1:"2",y1:"12",x2:"4",y2:"12"}),(0,$.jsx)("line",{x1:"20",y1:"12",x2:"22",y2:"12"}),(0,$.jsx)("line",{x1:"4.93",y1:"19.07",x2:"6.34",y2:"17.66"}),(0,$.jsx)("line",{x1:"17.66",y1:"6.34",x2:"19.07",y2:"4.93"})]}),oz=(0,$.jsx)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,$.jsx)("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})}),iz=(0,$.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("rect",{x:"2",y:"3",width:"20",height:"14",rx:"2"}),(0,$.jsx)("line",{x1:"8",y1:"21",x2:"16",y2:"21"}),(0,$.jsx)("line",{x1:"12",y1:"17",x2:"12",y2:"21"})]}),vg=[yt.SYSTEM,yt.LIGHT,yt.DARK];function _T(e){let t=vg.indexOf(e);return vg[(t+1)%vg.length]}function az(e){return e===yt.LIGHT?nz:e===yt.DARK?oz:iz}function xT(e){let t={[yt.SYSTEM]:"system",[yt.LIGHT]:"light",[yt.DARK]:"dark"},n=_T(e);return`Theme: ${t[e]} \u2014 switch to ${t[n]}`}function ET({direction:e,onDirectionChange:t,showControllers:n,onShowControllersChange:o,onZoomIn:i,onZoomOut:a,onFitView:l,onFoldAll:r,onExpandAll:s,foldAllDisabled:u=!1,expandAllDisabled:c=!1,themeMode:d,onThemeModeChange:f,rightOffset:h=0,position:v}){let b=d!==void 0&&f!==void 0,S=b1(v),y=S1(v)==="right"&&h>0?{marginRight:j3+h}:void 0,m=e===Nn.TB||e===Nn.BT,g=m?"Switch to horizontal layout":"Switch to vertical layout",x=n?"Hide pipe controllers":"Show pipe controllers \u2014 groups pipes by their controlling pipe",_=r||s,E=u?"Fold all controllers (nothing to fold)":"Fold all controllers",w=c?"Expand all controllers (nothing to expand)":"Expand all controllers";return(0,$.jsx)(Jl,{position:v,className:"graph-toolbar-panel",style:y,children:(0,$.jsxs)("div",{className:`graph-toolbar graph-toolbar--${S}`,children:[r&&(0,$.jsx)("button",{type:"button",className:"graph-toolbar-btn",onClick:r,disabled:u,title:E,"aria-label":E,children:ez}),s&&(0,$.jsx)("button",{type:"button",className:"graph-toolbar-btn",onClick:s,disabled:c,title:w,"aria-label":w,children:tz}),_&&(0,$.jsx)("div",{className:"graph-toolbar-separator"}),(0,$.jsx)("button",{type:"button",className:`graph-toolbar-btn${n?" graph-toolbar-btn--active":""}`,onClick:()=>o(!n),title:x,"aria-label":x,children:J3}),(0,$.jsx)("button",{type:"button",className:"graph-toolbar-btn",onClick:()=>t(m?Nn.LR:Nn.TB),title:g,"aria-label":g,children:m?$3:F3}),(a||i||l)&&(0,$.jsx)("div",{className:"graph-toolbar-separator"}),a&&(0,$.jsx)("button",{type:"button",className:"graph-toolbar-btn",onClick:a,title:"Zoom out","aria-label":"Zoom out",children:K3}),i&&(0,$.jsx)("button",{type:"button",className:"graph-toolbar-btn",onClick:i,title:"Zoom in","aria-label":"Zoom in",children:Q3}),l&&(0,$.jsx)("button",{type:"button",className:"graph-toolbar-btn",onClick:l,title:"Fit view","aria-label":"Fit view",children:W3}),b&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)("div",{className:"graph-toolbar-separator"}),(0,$.jsx)("button",{type:"button",className:"graph-toolbar-btn",onClick:()=>f(_T(d)),title:xT(d),"aria-label":xT(d),children:az(d)})]})]})})}var ii=oe(ve(),1),lz={PipeSequence:{badge:"Sequence",icon:"\u2192"},PipeParallel:{badge:"Parallel",icon:"//"},PipeCondition:{badge:"Condition",icon:"\u25C7"},PipeBatch:{badge:"Batch",icon:"\u2261"}};function rz(e){return e?lz[e]:{badge:"",icon:""}}function sz(e){return e?`controller-group--${e.replace("Pipe","").toLowerCase()}`:""}function uz({data:e}){let t=rz(e.pipeType),n=sz(e.pipeType),o=(e.pipeType==="PipeParallel"||e.pipeType==="PipeBatch")&&(e.childCount??0)>Fs,i=o?(e.childCount??0)-Fs:0;return(0,ii.jsxs)("div",{className:`controller-group-node ${n}`,children:[(0,ii.jsxs)("div",{className:"controller-group-header",children:[(0,ii.jsx)("span",{className:"controller-group-icon",children:t.icon}),(0,ii.jsx)("span",{className:"controller-group-badge",children:t.badge}),e.label&&(0,ii.jsx)("span",{className:"controller-group-label",children:e.label}),e.onToggleFold&&(0,ii.jsx)("button",{type:"button",className:"controller-group-fold",title:"Fold controller (alt/option: only this one)","aria-label":"Fold controller",onClick:a=>{a.stopPropagation(),e.onToggleFold?.({soloMode:a.altKey})},children:"\u2921"})]}),o&&(0,ii.jsx)("button",{className:"controller-group-collapse",onClick:a=>{a.stopPropagation(),e.onToggleCollapse?.()},children:e.isCollapsed?`+${i} hidden`:"collapse"})]})}var TT={controllerGroup:uz};var NT=oe(At(),1),Je=oe(ve(),1),cz={PipeLLM:"LLM",PipeExtract:"Extract",PipeCompose:"Compose",PipeImgGen:"ImgGen",PipeSearch:"Search",PipeFunc:"Func",PipeSignature:"Signature",PipeSequence:"Sequence",PipeParallel:"Parallel",PipeCondition:"Condition",PipeBatch:"Batch"},fz={PipeSequence:!0,PipeParallel:!0,PipeCondition:!0,PipeBatch:!0};function dz(e){return e in fz}var pz={succeeded:{color:"#50FA7B",label:"Succeeded"},failed:{color:"#FF5555",label:"Failed"},running:{color:"#8BE9FD",label:"Running"},scheduled:{color:"#6272a4",label:"Scheduled"},skipped:{color:"#6272a4",label:"Skipped"},canceled:{color:"#6272a4",label:"Canceled"}},bg=4;function mz(e){return cz[e]}function pn({data:e,children:t}){let n=mz(e.pipeType),o=pz[e.status],i=e.status==="running",a=dz(e.pipeType),l=e.pipeType==="PipeSignature",[r,s]=(0,NT.useState)(!1),u=e.inputs.length>bg,c=u&&!r?e.inputs.slice(0,bg):e.inputs,d=e.inputs.length-bg,f=e.direction==="TB"?"pipe-card--tb":"pipe-card--lr",h=a?" pipe-card--controller":"",v=l?" pipe-card--signature":"",b=a?"pipe-card-badge pipe-card-badge--controller":l?"pipe-card-badge pipe-card-badge--signature":"pipe-card-badge";return(0,Je.jsxs)("div",{className:`pipe-card ${f}${h}${v}`,children:[(0,Je.jsxs)("div",{className:"pipe-card-header",children:[(0,Je.jsx)("span",{className:b,children:n}),(0,Je.jsx)("span",{className:"pipe-card-code",title:e.pipeCode,children:e.pipeCode}),(0,Je.jsx)("span",{className:"pipe-card-status",style:{color:o.color},title:o.label,children:(0,Je.jsx)("span",{className:`pipe-card-status-dot ${i?"pipe-card-status-dot--pulse":""}`,style:{background:o.color}})}),e.onExpand&&(0,Je.jsx)("button",{type:"button",className:"pipe-card-expand",title:"Expand controller (alt/option: only this one)","aria-label":"Expand controller",onClick:S=>{S.stopPropagation(),e.onExpand?.({soloMode:S.altKey})},children:"\u2922"})]}),e.description&&(0,Je.jsx)("span",{className:"pipe-card-description",title:e.description,children:e.description}),e.inputs.length>0&&(0,Je.jsxs)("div",{className:"pipe-card-io",children:[(0,Je.jsx)("span",{className:"pipe-card-io-label",children:"INPUTS"}),(0,Je.jsxs)("div",{className:"pipe-card-io-pills",children:[c.map(S=>(0,Je.jsxs)("span",{className:"pipe-card-io-pill",title:`${S.name}: ${S.concept}`,children:[(0,Je.jsx)("span",{className:"pipe-card-io-pill-name",children:S.name}),(0,Je.jsx)("span",{className:"pipe-card-io-pill-concept",children:S.concept})]},S.name)),u&&(0,Je.jsx)("button",{className:"pipe-card-io-more",onClick:S=>{S.stopPropagation(),s(p=>!p)},children:r?"show less":`+${d} more`})]})]}),e.outputs.length>0&&(0,Je.jsxs)("div",{className:"pipe-card-io",children:[(0,Je.jsx)("span",{className:"pipe-card-io-label",children:"OUTPUT"}),(0,Je.jsx)("div",{className:"pipe-card-io-pills",children:e.outputs.map(S=>(0,Je.jsxs)("span",{className:"pipe-card-io-pill",title:`${S.name}: ${S.concept}`,children:[(0,Je.jsx)("span",{className:"pipe-card-io-pill-name",children:S.name}),(0,Je.jsx)("span",{className:"pipe-card-io-pill-concept",children:S.concept})]},S.name))})]}),t]})}var hz={PipeLLM:pn,PipeExtract:pn,PipeCompose:pn,PipeImgGen:pn,PipeSearch:pn,PipeFunc:pn,PipeSignature:pn,PipeSequence:pn,PipeParallel:pn,PipeCondition:pn,PipeBatch:pn};function CT(e){return hz[e]}var ai=oe(ve(),1);function gz({data:e}){let t=CT(e.pipeType)??pn;return(0,ai.jsx)(t,{data:e})}function wT({data:e,sourcePosition:t=W.Bottom,targetPosition:n=W.Top}){let o=e.pipeCardData;return o?(0,ai.jsxs)(ai.Fragment,{children:[(0,ai.jsx)(Ra,{type:"target",position:n}),(0,ai.jsx)(gz,{data:o}),(0,ai.jsx)(Ra,{type:"source",position:t})]}):null}var Kt=oe(ve(),1),yz={...TT,pipeCard:wT};function vz({nodeId:e,stuffData:t,graphspec:n,resolveStorageUrl:o,canEmbedPdf:i,onOpenExternally:a}){let l=t.concept&&n?zh(n,t.concept):void 0;return(0,Kt.jsx)(Kt.Fragment,{children:l?(0,Kt.jsx)(dg,{concept:l,ioData:t,instanceKey:e,resolveStorageUrl:o,canEmbedPdf:i,onOpenExternally:a}):(0,Kt.jsx)(Uf,{stuff:t,resolveStorageUrl:o,canEmbedPdf:i,onOpenExternally:a})})}function bz(e,t){return e===to.FOLDED?new Set(t):new Set}function Sz(e,t){return e??t??La.theme??yt.SYSTEM}function Sg(e,t){return e===yt.SYSTEM?t:e}function xz(e,t){return e??t??La.toolbarPosition}function Ks(e){return e.map(t=>({...t,position:{...t.position},data:{...t.data},style:t.style?{...t.style}:void 0}))}function Qs(e,t){return!t||Object.keys(t).length===0?e:e.map(n=>{let o=n.data.pipeCode;if(!o||!Object.hasOwn(t,o))return n;let i=t[o];return n.data.pipeCardData?.status===i?n:{...n,data:{...n.data,nodeData:n.data.nodeData?{...n.data.nodeData,status:i}:n.data.nodeData,pipeCardData:n.data.pipeCardData?{...n.data.pipeCardData,status:i}:n.data.pipeCardData}}})}function AT(e){let{graphspec:t,config:n=La,initialDirection:o,initialShowControllers:i,initialFoldMode:a,hideToolbar:l=!1,theme:r,toolbarPosition:s,systemTheme:u,showThemeToggle:c=!0,onThemeChange:d,onNavigateToPipe:f,onStuffNodeClick:h,onReactFlowInit:v,statusMap:b,onNodeSelect:S,onPaneClick:p,renderDetailExtra:y,resolveStorageUrl:m,canEmbedPdf:g,onOpenExternally:x}=e,_=fe.default.useMemo(()=>t===null?null:Hc(t),[t]),[E,w]=fe.default.useState(()=>o??n.direction??La.direction??Nn.TB),C=Sz(r,n.theme),[H,D]=fe.default.useState(C),z=fe.default.useRef(C);fe.default.useEffect(()=>{C!==z.current&&(z.current=C,D(C))},[C]);let I=zE(u),T=Sg(H,I),A=fe.default.useRef(d);A.current=d;let M=fe.default.useRef({mode:H,resolvedTheme:T});fe.default.useEffect(()=>{let pe=M.current;(pe.mode!==H||pe.resolvedTheme!==T)&&(M.current={mode:H,resolvedTheme:T},A.current?.(H,T))},[H,T]);let O=a??n.foldMode??La.foldMode??to.EXPANDED,[R,L]=fe.default.useState(()=>O===to.FOLDED?!0:i??n.showControllers??La.showControllers??!1),V=fe.default.useRef(O);V.current=O;let k=fe.default.useRef(null),[G,q]=fe.default.useState(null),[Z,j]=fe.default.useState(null),{width:se,isDragging:J,handleMouseDown:X}=aT({defaultWidth:380,minWidth:280,maxWidth:800,containerRef:k});fe.default.useEffect(()=>{q(null),j(null)},[_]),fe.default.useEffect(()=>{let pe=k.current;if(!pe)return;let le=jf(T),ae=n.paletteColors,we=ae?{...le,...ae}:le;for(let[ge,He]of Object.entries(we))pe.style.setProperty(ge,He);return()=>{for(let ge of Object.keys(we))pe.style.removeProperty(ge)}},[n.paletteColors,T]);let[Q,ue,he]=CE([]),[ie,ee,Te]=wE([]),de=fe.default.useRef(null),be=fe.default.useRef(null),Le=fe.default.useRef(null),Be=fe.default.useRef(null),[dt,Gt]=fe.default.useState(new Set),mn=fe.default.useCallback(pe=>{Gt(le=>{let ae=new Set(le);return ae.has(pe)?ae.delete(pe):ae.add(pe),ae})},[]),[rt,Dn]=fe.default.useState(new Set),Qt=fe.default.useCallback((pe,le)=>{Dn(ae=>{let we=new Set(ae),ge=!we.has(pe),He=Le.current,wt=!le?.soloMode&&He?.graphspec&&He.analysis?dT(pe,He.graphspec,He.analysis.controllerNodeIds):new Set([pe]);for(let Qn of wt)ge?we.add(Qn):we.delete(Qn);return we})},[]),Wt=n.edgeType||Oc.DEFAULT,St=fe.default.useMemo(()=>({nodesep:n.nodesep,ranksep:n.ranksep}),[n.nodesep,n.ranksep]),$e=fe.default.useRef(R);$e.current=R;let ro=fe.default.useRef(E);ro.current=E;let li=fe.default.useRef(St);li.current=St;let jn=fe.default.useRef(n.initialZoom);jn.current=n.initialZoom;let ri=fe.default.useRef(n.panToTop);ri.current=n.panToTop;let $n=fe.default.useRef(dt);$n.current=dt;let Rn=fe.default.useRef(mn);Rn.current=mn;let To=fe.default.useRef(rt);To.current=rt;let pt=fe.default.useRef(Qt);pt.current=Qt;let Fn=fe.default.useRef(!0),Kn=fe.default.useRef(0),No=fe.default.useRef(!1),Co=fe.default.useRef(b);Co.current=b,fe.default.useEffect(()=>{if(!be.current)return;let pe=!1;return(async()=>{try{let le=be.current;if(!le)return;let ae=await Zf(le.nodes,le.edges,E,St,le._graphspec,le._analysis);if(pe)return;Be.current={nodes:ae.nodes,edges:ae.edges,controllerPositions:ae.controllerPositions};let we=ir(Ks(ae.nodes),ae.edges,le._graphspec,le._analysis,$e.current,$n.current,Rn.current,ae.controllerPositions,pt.current);ue(Qs(tr(ar(we.nodes)),Co.current)),ee(nr(we.edges)),setTimeout(()=>{!pe&&de.current&&de.current.fitView({padding:.1})},50)}catch(le){console.error("[GraphViewer] ELK layout failed:",le)}})(),()=>{pe=!0}},[E,St]),fe.default.useEffect(()=>{if(!Be.current||!be.current)return;let pe=Ks(Be.current.nodes),le=Be.current.edges,ae=ir(pe,le,be.current._graphspec,be.current._analysis,R,dt,mn,Be.current.controllerPositions,Qt);ue(Qs(tr(ar(ae.nodes)),Co.current)),ee(nr(ae.edges))},[R,dt,mn,Qt]),fe.default.useEffect(()=>{if(!_){be.current=null,Le.current=null,Be.current=null,ue([]),ee([]);return}let pe=!1;Gt(new Set),$n.current=new Set;let{graphData:le,analysis:ae}=cT(_,Wt);Le.current={nodes:le.nodes,edges:le.edges,analysis:ae,graphspec:_};let we=ae?bz(V.current,ae.controllerNodeIds):new Set;Dn(we),To.current=we,No.current=we.size>0,Kn.current=we.size,we.size>0&&!$e.current&&(L(!0),$e.current=!0);let ge=we.size>0&&ae?pg({nodes:le.nodes,edges:le.edges},ae,_,we,pt.current):{nodes:le.nodes,edges:le.edges,analysis:ae};return be.current={nodes:ge.nodes,edges:ge.edges,_analysis:ge.analysis,_graphspec:_},(async()=>{try{let He=ro.current,wt=li.current,On=ge.nodes.some(xt=>!xt.position||xt.position.x===0&&xt.position.y===0)?await Zf(ge.nodes,ge.edges,He,wt,_,ge.analysis):{nodes:ge.nodes,edges:ge.edges,controllerPositions:{}};if(pe)return;Be.current={nodes:On.nodes,edges:On.edges,controllerPositions:On.controllerPositions};let ci=ir(Ks(On.nodes),On.edges,_,ge.analysis,$e.current,$n.current,Rn.current,On.controllerPositions,pt.current);ue(Qs(tr(ar(ci.nodes)),Co.current)),ee(nr(ci.edges)),setTimeout(()=>{if(!pe&&de.current&&(de.current.fitView({padding:.1}),jn.current!==void 0&&jn.current!==null&&de.current.zoomTo(jn.current),ri.current)){let xt=de.current.getViewport();de.current.setViewport({x:xt.x,y:20,zoom:xt.zoom})}},100)}catch(He){console.error("[GraphViewer] ELK layout failed:",He)}})(),()=>{pe=!0}},[_,Wt]),fe.default.useEffect(()=>{if(Fn.current){Fn.current=!1,Kn.current=rt.size;return}if(No.current){No.current=!1,Kn.current=rt.size;return}let pe=Kn.current;if(Kn.current=rt.size,pe===0&&rt.size===0||!Le.current||!Le.current.analysis)return;let le=Le.current,ae=le.graphspec,we=le.analysis;if(!ae||!we)return;let ge=!1,He=pg({nodes:le.nodes,edges:le.edges},we,ae,rt,Qt);return be.current={nodes:He.nodes,edges:He.edges,_analysis:He.analysis,_graphspec:ae},(async()=>{try{let wt=await Zf(He.nodes,He.edges,ro.current,li.current,ae,He.analysis);if(ge)return;Be.current={nodes:wt.nodes,edges:wt.edges,controllerPositions:wt.controllerPositions};let Qn=ir(Ks(wt.nodes),wt.edges,ae,He.analysis,$e.current,$n.current,Rn.current,wt.controllerPositions,pt.current);ue(Qs(tr(ar(Qn.nodes)),Co.current)),ee(nr(Qn.edges)),setTimeout(()=>{!ge&&de.current&&de.current.fitView({padding:.1})},50)}catch(wt){console.error("[GraphViewer] ELK layout failed:",wt)}})(),()=>{ge=!0}},[rt,Qt]),fe.default.useEffect(()=>{if(!Be.current||!be.current)return;let pe=Ks(Be.current.nodes),le=Be.current.edges,ae=ir(pe,le,be.current._graphspec,be.current._analysis,$e.current,$n.current,Rn.current,Be.current.controllerPositions,pt.current);ue(Qs(tr(ar(ae.nodes)),b)),ee(nr(ae.edges))},[b]);let si=fe.default.useCallback((pe,le)=>{let ae=le.data;if(S?.(le.id,ae,pe),ae.isController||ae.isPipe){let we=ae.pipeCode||ae.labelText;we&&f&&f(we,ae.pipeCardData?.status)}else if(ae.isStuff&&h&&_){let we=ds(le.id),ge=Bh(_,we);ge&&h(ge)}if(j(null),G?.nodeId===le.id&&!Z)q(null);else if(ae.isPipe||ae.isController)q({kind:"pipe",nodeId:le.id,nodeData:ae});else if(ae.isStuff&&_){let we=ds(le.id),ge=Bh(_,we);q({kind:"stuff",nodeId:le.id,nodeData:ae,stuffData:ge??void 0})}ue(we=>we.map(ge=>({...ge,selected:ge.id===le.id})))},[ue,f,S,h,_,G,Z]),ui=fe.default.useCallback(pe=>{de.current=pe,v&&v(pe)},[v]),Pa=fe.default.useCallback(()=>{q(null),j(null),p?.()},[p]),wo=fe.default.useCallback(pe=>{if(!_)return;let le=zh(_,pe);le&&j(le)},[_]),ka=G?.kind==="pipe"&&_?_.nodes.find(pe=>pe.pipe_code===G.nodeData.pipeCode):void 0,Ga=G!==null||Z!==null,We=xz(s,n.toolbarPosition),Mo=Le.current?.analysis?.controllerNodeIds,Do=fe.default.useMemo(()=>!R||!Mo||Mo.size===0?{onFoldAll:void 0,onExpandAll:void 0,foldAllDisabled:!1,expandAllDisabled:!1}:{onFoldAll:()=>Dn(new Set(Mo)),onExpandAll:()=>Dn(new Set),foldAllDisabled:rt.size===Mo.size,expandAllDisabled:rt.size===0},[R,Mo,rt]);return(0,Kt.jsxs)("div",{ref:k,className:`react-flow-container react-flow-container--theme-${T} react-flow-container--mode-${H}`,children:[(0,Kt.jsxs)(NE,{nodes:Q,edges:ie,nodeTypes:yz,onNodesChange:he,onEdgesChange:Te,onNodeClick:si,onPaneClick:Pa,onInit:ui,fitView:!0,fitViewOptions:{padding:.1},defaultEdgeOptions:{type:Wt},panOnScroll:!0,minZoom:.1,proOptions:{hideAttribution:!0},panActivationKeyCode:null,children:[(0,Kt.jsx)(ME,{variant:xo.Dots,gap:20,size:1,color:"var(--color-bg-dots)"}),!l&&(0,Kt.jsx)(ET,{direction:E,onDirectionChange:w,showControllers:R,onShowControllersChange:L,onZoomIn:()=>{de.current?.zoomIn()},onZoomOut:()=>{de.current?.zoomOut()},onFitView:()=>{de.current?.fitView({padding:.1})},onFoldAll:Do.onFoldAll,onExpandAll:Do.onExpandAll,foldAllDisabled:Do.foldAllDisabled,expandAllDisabled:Do.expandAllDisabled,themeMode:c?H:void 0,onThemeModeChange:c?D:void 0,rightOffset:Ga?se:0,position:We})]}),(0,Kt.jsxs)(iT,{isOpen:Ga,onClose:Pa,width:se,isDragging:J,onResizeHandleMouseDown:X,children:[Z?(0,Kt.jsx)(dg,{concept:Z}):ka&&_?(0,Kt.jsx)(uT,{node:ka,spec:_,onConceptClick:wo}):G?.stuffData?(0,Kt.jsx)(vz,{nodeId:G.nodeId,stuffData:G.stuffData,graphspec:_,resolveStorageUrl:m,canEmbedPdf:g,onOpenExternally:x}):null,y&&G&&!Z&&y(G.nodeId,G.nodeData)]})]})}function _z(e){if(e==null)return to.EXPANDED;if(e===to.FOLDED||e===to.EXPANDED||e===to.AUTO)return e;throw new Error(`Invalid foldMode in standalone config: ${JSON.stringify(e)} \u2014 expected one of "folded", "expanded", "auto".`)}function Ez(e){if(e==null)return yt.SYSTEM;if(e===yt.LIGHT||e===yt.DARK||e===yt.SYSTEM)return e;throw new Error(`Invalid theme in standalone config: ${JSON.stringify(e)} \u2014 expected one of "dark", "light", "system".`)}function Tz(e){if(e==null)return Nn.LR;if(e===Nn.LR||e===Nn.RL||e===Nn.TB||e===Nn.BT)return e;throw new Error(`Invalid direction in standalone config: ${JSON.stringify(e)} \u2014 expected one of "TB", "BT", "LR", "RL".`)}function Nz(e){if(e==null)return;let t=Object.values(sn);if(t.includes(e))return e;throw new Error(`Invalid toolbarPosition in standalone config: ${JSON.stringify(e)} \u2014 expected one of ${t.map(n=>`"${n}"`).join(", ")}.`)}function xg(e,t){let n=e&&typeof e=="object"?e:{},o=Tz(n.direction),i=!!n.showControllers,a=_z(n.foldMode),l=Ez(n.theme),r=Nz(n.toolbarPosition);return{graphspec:t,config:{...n,direction:o,showControllers:i,foldMode:a,theme:l,toolbarPosition:r},initialDirection:o,initialShowControllers:i,initialFoldMode:a,theme:l}}function MT(e,t){let n=e?.trim();if(!n)return null;try{return JSON.parse(n)}catch(o){let i=o instanceof Error?o.message:String(o);throw new Error(`Failed to parse JSON from <script id="${t}">: ${i}`)}}var Ws=xg({},null),_g=null;function DT(e){return MT(document.getElementById(e)?.textContent,e)}function Cz(e,t){let n=jf(e),o=t?{...n,...t}:n;for(let[i,a]of Object.entries(o))document.body.style.setProperty(i,a)}function zT(e,t){document.body.setAttribute("data-theme",e),Cz(t,Ws.config.paletteColors)}function wz(){return Ha.default.createElement(AT,{...Ws,onThemeChange:(e,t)=>{zT(e,t)}})}function Az({message:e}){return Ha.default.createElement("div",{className:"standalone-error",role:"alert"},Ha.default.createElement("strong",{className:"standalone-error-title"},"Failed to render method graph"),Ha.default.createElement("pre",{className:"standalone-error-message"},e))}function RT(){let e=document.getElementById("root");if(!e)return;let t=(0,OT.createRoot)(e);_g=()=>{t.render(Ha.default.createElement(wz))},_g(),setTimeout(()=>{try{let n=DT("pipelex-config"),o=DT("pipelex-graphspec"),i=o===null?null:Hc(o);Ws=xg(n,i),zT(Ws.theme,Sg(Ws.theme,Oh())),_g?.()}catch(n){let o=n instanceof Error?n.message:String(n);t.render(Ha.default.createElement(Az,{message:o}))}},0)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",RT):RT();})();
|
|
14
|
+
`)),c=u.reduce((d,f)=>d.concat(...f),[]);return[u,c]}return[[],[]]},[e]);return(0,P.useEffect)(()=>{let s=t?.target??T_,u=t?.actInsideInputWithModifier??!0;if(e!==null){let c=h=>{if(i.current=h.ctrlKey||h.metaKey||h.shiftKey||h.altKey,(!i.current||i.current&&!u)&&gh(h))return!1;let b=C_(h.code,r);if(a.current.add(h[b]),N_(l,a.current,!1)){let S=h.composedPath?.()?.[0]||h.target,p=S?.nodeName==="BUTTON"||S?.nodeName==="A";t.preventDefault!==!1&&(i.current||!p)&&h.preventDefault(),o(!0)}},d=h=>{let v=C_(h.code,r);N_(l,a.current,!0)?(o(!1),a.current.clear()):a.current.delete(h[v]),h.key==="Meta"&&a.current.clear(),i.current=!1},f=()=>{a.current.clear(),o(!1)};return s?.addEventListener("keydown",c),s?.addEventListener("keyup",d),window.addEventListener("blur",f),window.addEventListener("contextmenu",f),()=>{s?.removeEventListener("keydown",c),s?.removeEventListener("keyup",d),window.removeEventListener("blur",f),window.removeEventListener("contextmenu",f)}}},[e,o]),n}function N_(e,t,n){return e.filter(o=>n||o.length===t.size).some(o=>o.every(i=>t.has(i)))}function C_(e,t){return t.includes(e)?"code":"key"}var ND=()=>{let e=Qe();return(0,P.useMemo)(()=>({zoomIn:t=>{let{panZoom:n}=e.getState();return n?n.scaleBy(1.2,{duration:t?.duration}):Promise.resolve(!1)},zoomOut:t=>{let{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,{duration:t?.duration}):Promise.resolve(!1)},zoomTo:(t,n)=>{let{panZoom:o}=e.getState();return o?o.scaleTo(t,{duration:n?.duration}):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{let{transform:[o,i,a],panZoom:l}=e.getState();return l?(await l.setViewport({x:t.x??o,y:t.y??i,zoom:t.zoom??a},n),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{let[t,n,o]=e.getState().transform;return{x:t,y:n,zoom:o}},setCenter:async(t,n,o)=>e.getState().setCenter(t,n,o),fitBounds:async(t,n)=>{let{width:o,height:i,minZoom:a,maxZoom:l,panZoom:r}=e.getState(),s=Us(t,o,i,a,l,n?.padding??.1);return r?(await r.setViewport(s,{duration:n?.duration,ease:n?.ease,interpolate:n?.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(t,n={})=>{let{transform:o,snapGrid:i,snapToGrid:a,domNode:l}=e.getState();if(!l)return t;let{x:r,y:s}=l.getBoundingClientRect(),u={x:t.x-r,y:t.y-s},c=n.snapGrid??i,d=n.snapToGrid??a;return Kl(u,o,d,c)},flowToScreenPosition:t=>{let{transform:n,domNode:o}=e.getState();if(!o)return t;let{x:i,y:a}=o.getBoundingClientRect(),l=ks(t,n);return{x:l.x+i,y:l.y+a}}}),[])};function j_(e,t){let n=[],o=new Map,i=[];for(let a of e)if(a.type==="add"){i.push(a);continue}else if(a.type==="remove"||a.type==="replace")o.set(a.id,[a]);else{let l=o.get(a.id);l?l.push(a):o.set(a.id,[a])}for(let a of t){let l=o.get(a.id);if(!l){n.push(a);continue}if(l[0].type==="remove")continue;if(l[0].type==="replace"){n.push({...l[0].item});continue}let r={...a};for(let s of l)CD(s,r);n.push(r)}return i.length&&i.forEach(a=>{a.index!==void 0?n.splice(a.index,0,{...a.item}):n.push({...a.item})}),n}function CD(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 $_(e,t){return j_(e,t)}function F_(e,t){return j_(e,t)}function Ra(e,t){return{id:e,type:"select",selected:t}}function Jl(e,t=new Set,n=!1){let o=[];for(let[i,a]of e){let l=t.has(i);!(a.selected===void 0&&!l)&&a.selected!==l&&(n&&(a.selected=l),o.push(Ra(a.id,l)))}return o}function w_({items:e=[],lookup:t}){let n=[],o=new Map(e.map(i=>[i.id,i]));for(let[i,a]of e.entries()){let l=t.get(a.id),r=l?.internals?.userNode??l;r!==void 0&&r!==a&&n.push({id:a.id,item:a,type:"replace"}),r===void 0&&n.push({item:a,type:"add",index:i})}for(let[i]of t)o.get(i)===void 0&&n.push({id:i,type:"remove"});return n}function A_(e){return{id:e.id,type:"remove"}}var M_=e=>Dx(e),wD=e=>ah(e);function K_(e){return(0,P.forwardRef)(e)}var AD=typeof window<"u"?P.useLayoutEffect:P.useEffect;function D_(e){let[t,n]=(0,P.useState)(BigInt(0)),[o]=(0,P.useState)(()=>MD(()=>n(i=>i+BigInt(1))));return AD(()=>{let i=o.get();i.length&&(e(i),o.reset())},[t]),o}function MD(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}var Q_=(0,P.createContext)(null);function DD({children:e}){let t=Qe(),n=(0,P.useCallback)(r=>{let{nodes:s=[],setNodes:u,hasDefaultNodes:c,onNodesChange:d,nodeLookup:f,fitViewQueued:h,onNodesChangeMiddlewareMap:v}=t.getState(),b=s;for(let p of r)b=typeof p=="function"?p(b):p;let S=w_({items:b,lookup:f});for(let p of v.values())S=p(S);c&&u(b),S.length>0?d?.(S):h&&window.requestAnimationFrame(()=>{let{fitViewQueued:p,nodes:g,setNodes:m}=t.getState();p&&m(g)})},[]),o=D_(n),i=(0,P.useCallback)(r=>{let{edges:s=[],setEdges:u,hasDefaultEdges:c,onEdgesChange:d,edgeLookup:f}=t.getState(),h=s;for(let v of r)h=typeof v=="function"?v(h):v;c?u(h):d&&d(w_({items:h,lookup:f}))},[]),a=D_(i),l=(0,P.useMemo)(()=>({nodeQueue:o,edgeQueue:a}),[]);return(0,H.jsx)(Q_.Provider,{value:l,children:e})}function RD(){let e=(0,P.useContext)(Q_);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}var OD=e=>!!e.panZoom;function Dh(){let e=ND(),t=Qe(),n=RD(),o=Ae(OD),i=(0,P.useMemo)(()=>{let a=d=>t.getState().nodeLookup.get(d),l=d=>{n.nodeQueue.push(d)},r=d=>{n.edgeQueue.push(d)},s=d=>{let{nodeLookup:f,nodeOrigin:h}=t.getState(),v=M_(d)?d:f.get(d.id),b=v.parentId?ph(v.position,v.measured,v.parentId,f,h):v.position,S={...v,position:b,width:v.measured?.width??v.width,height:v.measured?.height??v.height};return Da(S)},u=(d,f,h={replace:!1})=>{l(v=>v.map(b=>{if(b.id===d){let S=typeof f=="function"?f(b):f;return h.replace&&M_(S)?S:{...b,...S}}return b}))},c=(d,f,h={replace:!1})=>{r(v=>v.map(b=>{if(b.id===d){let S=typeof f=="function"?f(b):f;return h.replace&&wD(S)?S:{...b,...S}}return b}))};return{getNodes:()=>t.getState().nodes.map(d=>({...d})),getNode:d=>a(d)?.internals.userNode,getInternalNode:a,getEdges:()=>{let{edges:d=[]}=t.getState();return d.map(f=>({...f}))},getEdge:d=>t.getState().edgeLookup.get(d),setNodes:l,setEdges:r,addNodes:d=>{let f=Array.isArray(d)?d:[d];n.nodeQueue.push(h=>[...h,...f])},addEdges:d=>{let f=Array.isArray(d)?d:[d];n.edgeQueue.push(h=>[...h,...f])},toObject:()=>{let{nodes:d=[],edges:f=[],transform:h}=t.getState(),[v,b,S]=h;return{nodes:d.map(p=>({...p})),edges:f.map(p=>({...p})),viewport:{x:v,y:b,zoom:S}}},deleteElements:async({nodes:d=[],edges:f=[]})=>{let{nodes:h,edges:v,onNodesDelete:b,onEdgesDelete:S,triggerNodeChanges:p,triggerEdgeChanges:g,onDelete:m,onBeforeDelete:y}=t.getState(),{nodes:x,edges:_}=await zx({nodesToRemove:d,edgesToRemove:f,nodes:h,edges:v,onBeforeDelete:y}),E=_.length>0,C=x.length>0;if(E){let A=_.map(A_);S?.(_),g(A)}if(C){let A=x.map(A_);b?.(x),p(A)}return(C||E)&&m?.({nodes:x,edges:_}),{deletedNodes:x,deletedEdges:_}},getIntersectingNodes:(d,f=!0,h)=>{let v=ch(d),b=v?d:s(d),S=h!==void 0;return b?(h||t.getState().nodes).filter(p=>{let g=t.getState().nodeLookup.get(p.id);if(g&&!v&&(p.id===d.id||!g.internals.positionAbsolute))return!1;let m=Da(S?p:g),y=$l(m,b);return f&&y>0||y>=m.width*m.height||y>=b.width*b.height}):[]},isNodeIntersecting:(d,f,h=!0)=>{let b=ch(d)?d:s(d);if(!b)return!1;let S=$l(b,f);return h&&S>0||S>=f.width*f.height||S>=b.width*b.height},updateNode:u,updateNodeData:(d,f,h={replace:!1})=>{u(d,v=>{let b=typeof f=="function"?f(v):f;return h.replace?{...v,data:b}:{...v,data:{...v.data,...b}}},h)},updateEdge:c,updateEdgeData:(d,f,h={replace:!1})=>{c(d,v=>{let b=typeof f=="function"?f(v):f;return h.replace?{...v,data:b}:{...v,data:{...v.data,...b}}},h)},getNodesBounds:d=>{let{nodeLookup:f,nodeOrigin:h}=t.getState();return rh(d,{nodeLookup:f,nodeOrigin:h})},getHandleConnections:({type:d,id:f,nodeId:h})=>Array.from(t.getState().connectionLookup.get(`${h}-${d}${f?`-${f}`:""}`)?.values()??[]),getNodeConnections:({type:d,handleId:f,nodeId:h})=>Array.from(t.getState().connectionLookup.get(`${h}${d?f?`-${d}-${f}`:`-${d}`:""}`)?.values()??[]),fitView:async d=>{let f=t.getState().fitViewResolver??Hx();return t.setState({fitViewQueued:!0,fitViewOptions:d,fitViewResolver:f}),n.nodeQueue.push(h=>[...h]),f.promise}}},[]);return(0,P.useMemo)(()=>({...i,...e,viewportInitialized:o}),[o])}var R_=e=>e.selected,zD=typeof window<"u"?window:void 0;function LD({deleteKeyCode:e,multiSelectionKeyCode:t}){let n=Qe(),{deleteElements:o}=Dh(),i=Vs(e,{actInsideInputWithModifier:!1}),a=Vs(t,{target:zD});(0,P.useEffect)(()=>{if(i){let{edges:l,nodes:r}=n.getState();o({nodes:r.filter(R_),edges:l.filter(R_)}),n.setState({nodesSelectionActive:!1})}},[i]),(0,P.useEffect)(()=>{n.setState({multiSelectionActive:a})},[a])}function BD(e){let t=Qe();(0,P.useEffect)(()=>{let n=()=>{if(!e.current||!(e.current.checkVisibility?.()??!0))return!1;let o=xf(e.current);(o.height===0||o.width===0)&&t.getState().onError?.("004",An.error004()),t.setState({width:o.width||500,height:o.height||500})};if(e.current){n(),window.addEventListener("resize",n);let o=new ResizeObserver(()=>n());return o.observe(e.current),()=>{window.removeEventListener("resize",n),o&&e.current&&o.unobserve(e.current)}}},[])}var Bf={position:"absolute",width:"100%",height:"100%",top:0,left:0},HD=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function PD({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:o=!1,panOnScrollSpeed:i=.5,panOnScrollMode:a=ni.Free,zoomOnDoubleClick:l=!0,panOnDrag:r=!0,defaultViewport:s,translateExtent:u,minZoom:c,maxZoom:d,zoomActivationKeyCode:f,preventScrolling:h=!0,children:v,noWheelClassName:b,noPanClassName:S,onViewportChange:p,isControlledViewport:g,paneClickDistance:m,selectionOnDrag:y}){let x=Qe(),_=(0,P.useRef)(null),{userSelectionActive:E,lib:C,connectionInProgress:A}=Ae(HD,je),B=Vs(f),M=(0,P.useRef)();BD(_);let z=(0,P.useCallback)(I=>{p?.({x:I[0],y:I[1],zoom:I[2]}),g||x.setState({transform:I})},[p,g]);return(0,P.useEffect)(()=>{if(_.current){M.current=n_({domNode:_.current,minZoom:c,maxZoom:d,translateExtent:u,viewport:s,onDraggingChange:N=>x.setState(O=>O.paneDragging===N?O:{paneDragging:N}),onPanZoomStart:(N,O)=>{let{onViewportChangeStart:R,onMoveStart:L}=x.getState();L?.(N,O),R?.(O)},onPanZoom:(N,O)=>{let{onViewportChange:R,onMove:L}=x.getState();L?.(N,O),R?.(O)},onPanZoomEnd:(N,O)=>{let{onViewportChangeEnd:R,onMoveEnd:L}=x.getState();L?.(N,O),R?.(O)}});let{x:I,y:T,zoom:D}=M.current.getViewport();return x.setState({panZoom:M.current,transform:[I,T,D],domNode:_.current.closest(".react-flow")}),()=>{M.current?.destroy()}}},[]),(0,P.useEffect)(()=>{M.current?.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:o,panOnScrollSpeed:i,panOnScrollMode:a,zoomOnDoubleClick:l,panOnDrag:r,zoomActivationKeyPressed:B,preventScrolling:h,noPanClassName:S,userSelectionActive:E,noWheelClassName:b,lib:C,onTransformChange:z,connectionInProgress:A,selectionOnDrag:y,paneClickDistance:m})},[e,t,n,o,i,a,l,r,B,h,S,E,b,C,z,A,y,m]),(0,H.jsx)("div",{className:"react-flow__renderer",ref:_,style:Bf,children:v})}var kD=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function GD(){let{userSelectionActive:e,userSelectionRect:t}=Ae(kD,je);return e&&t?(0,H.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}var wh=(e,t)=>n=>{n.target===t.current&&e?.(n)},UD=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function ID({isSelecting:e,selectionKeyPressed:t,selectionMode:n=Aa.Full,panOnDrag:o,paneClickDistance:i,selectionOnDrag:a,onSelectionStart:l,onSelectionEnd:r,onPaneClick:s,onPaneContextMenu:u,onPaneScroll:c,onPaneMouseEnter:d,onPaneMouseMove:f,onPaneMouseLeave:h,children:v}){let b=Qe(),{userSelectionActive:S,elementsSelectable:p,dragging:g,connectionInProgress:m}=Ae(UD,je),y=p&&(e||S),x=(0,P.useRef)(null),_=(0,P.useRef)(),E=(0,P.useRef)(new Set),C=(0,P.useRef)(new Set),A=(0,P.useRef)(!1),B=R=>{if(A.current||m){A.current=!1;return}s?.(R),b.getState().resetSelectedElements(),b.setState({nodesSelectionActive:!1})},M=R=>{if(Array.isArray(o)&&o?.includes(2)){R.preventDefault();return}u?.(R)},z=c?R=>c(R):void 0,I=R=>{A.current&&(R.stopPropagation(),A.current=!1)},T=R=>{let{domNode:L}=b.getState();if(_.current=L?.getBoundingClientRect(),!_.current)return;let V=R.target===x.current;if(!V&&!!R.target.closest(".nokey")||!e||!(a&&V||t)||R.button!==0||!R.isPrimary)return;R.target?.setPointerCapture?.(R.pointerId),A.current=!1;let{x:q,y:Z}=Zn(R.nativeEvent,_.current);b.setState({userSelectionRect:{width:0,height:0,startX:q,startY:Z,x:q,y:Z}}),V||(R.stopPropagation(),R.preventDefault())},D=R=>{let{userSelectionRect:L,transform:V,nodeLookup:k,edgeLookup:G,connectionLookup:q,triggerNodeChanges:Z,triggerEdgeChanges:j,defaultEdgeOptions:se,resetSelectedElements:ee}=b.getState();if(!_.current||!L)return;let{x:X,y:Q}=Zn(R.nativeEvent,_.current),{startX:ue,startY:ge}=L;if(!A.current){let be=t?0:i;if(Math.hypot(X-ue,Q-ge)<=be)return;ee(),l?.(R)}A.current=!0;let ie={startX:ue,startY:ge,x:X<ue?X:ue,y:Q<ge?Q:ge,width:Math.abs(X-ue),height:Math.abs(Q-ge)},te=E.current,Te=C.current;E.current=new Set(vf(k,ie,V,n===Aa.Partial,!0).map(be=>be.id)),C.current=new Set;let de=se?.selectable??!0;for(let be of E.current){let Le=q.get(be);if(Le)for(let{edgeId:Be}of Le.values()){let dt=G.get(Be);dt&&(dt.selectable??de)&&C.current.add(Be)}}if(!mh(te,E.current)){let be=Jl(k,E.current,!0);Z(be)}if(!mh(Te,C.current)){let be=Jl(G,C.current);j(be)}b.setState({userSelectionRect:ie,userSelectionActive:!0,nodesSelectionActive:!1})},N=R=>{R.button===0&&(R.target?.releasePointerCapture?.(R.pointerId),!S&&R.target===x.current&&b.getState().userSelectionRect&&B?.(R),b.setState({userSelectionActive:!1,userSelectionRect:null}),A.current&&(r?.(R),b.setState({nodesSelectionActive:E.current.size>0})))},O=o===!0||Array.isArray(o)&&o.includes(0);return(0,H.jsxs)("div",{className:ot(["react-flow__pane",{draggable:O,dragging:g,selection:e}]),onClick:y?void 0:wh(B,x),onContextMenu:wh(M,x),onWheel:wh(z,x),onPointerEnter:y?void 0:d,onPointerMove:y?D:f,onPointerUp:y?N:void 0,onPointerDownCapture:y?T:void 0,onClickCapture:y?I:void 0,onPointerLeave:h,ref:x,style:Bf,children:[v,(0,H.jsx)(GD,{})]})}function Mh({id:e,store:t,unselect:n=!1,nodeRef:o}){let{addSelectedNodes:i,unselectNodesAndEdges:a,multiSelectionActive:l,nodeLookup:r,onError:s}=t.getState(),u=r.get(e);if(!u){s?.("012",An.error012(e));return}t.setState({nodesSelectionActive:!1}),u.selected?(n||u.selected&&l)&&(a({nodes:[u],edges:[]}),requestAnimationFrame(()=>o?.current?.blur())):i([e])}function W_({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:o,nodeId:i,isSelectable:a,nodeClickDistance:l}){let r=Qe(),[s,u]=(0,P.useState)(!1),c=(0,P.useRef)();return(0,P.useEffect)(()=>{c.current=$x({getStoreItems:()=>r.getState(),onNodeMouseDown:d=>{Mh({id:d,store:r,nodeRef:e})},onDragStart:()=>{u(!0)},onDragStop:()=>{u(!1)}})},[]),(0,P.useEffect)(()=>{if(!(t||!e.current||!c.current))return c.current.update({noDragClassName:n,handleSelector:o,domNode:e.current,isSelectable:a,nodeId:i,nodeClickDistance:l}),()=>{c.current?.destroy()}},[n,o,t,a,e,i,l]),s}var VD=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function J_(){let e=Qe();return(0,P.useCallback)(n=>{let{nodeExtent:o,snapToGrid:i,snapGrid:a,nodesDraggable:l,onError:r,updateNodePositions:s,nodeLookup:u,nodeOrigin:c}=e.getState(),d=new Map,f=VD(l),h=i?a[0]:5,v=i?a[1]:5,b=n.direction.x*h*n.factor,S=n.direction.y*v*n.factor;for(let[,p]of u){if(!f(p))continue;let g={x:p.internals.positionAbsolute.x+b,y:p.internals.positionAbsolute.y+S};i&&(g=Fl(g,a));let{position:m,positionAbsolute:y}=sh({nodeId:p.id,nextPosition:g,nodeLookup:u,nodeExtent:o,nodeOrigin:c,onError:r});p.position=m,p.internals.positionAbsolute=y,d.set(p.id,p)}s(d)},[])}var Rh=(0,P.createContext)(null),YD=Rh.Provider;Rh.Consumer;var eE=()=>(0,P.useContext)(Rh),XD=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),qD=(e,t,n)=>o=>{let{connectionClickStartHandle:i,connectionMode:a,connection:l}=o,{fromHandle:r,toHandle:s,isValid:u}=l,c=s?.nodeId===e&&s?.id===t&&s?.type===n;return{connectingFrom:r?.nodeId===e&&r?.id===t&&r?.type===n,connectingTo:c,clickConnecting:i?.nodeId===e&&i?.id===t&&i?.type===n,isPossibleEndHandle:a===ji.Strict?r?.type!==n:e!==r?.nodeId||t!==r?.id,connectionInProcess:!!r,clickConnectionInProcess:!!i,valid:c&&u}};function ZD({type:e="source",position:t=W.Top,isValidConnection:n,isConnectable:o=!0,isConnectableStart:i=!0,isConnectableEnd:a=!0,id:l,onConnect:r,children:s,className:u,onMouseDown:c,onTouchStart:d,...f},h){let v=l||null,b=e==="target",S=Qe(),p=eE(),{connectOnClick:g,noPanClassName:m,rfId:y}=Ae(XD,je),{connectingFrom:x,connectingTo:_,clickConnecting:E,isPossibleEndHandle:C,connectionInProcess:A,clickConnectionInProcess:B,valid:M}=Ae(qD(p,v,e),je);p||S.getState().onError?.("010",An.error010());let z=D=>{let{defaultEdgeOptions:N,onConnect:O,hasDefaultEdges:R}=S.getState(),L={...N,...D};if(R){let{edges:V,setEdges:k}=S.getState();k(bh(L,V))}O?.(L),r?.(L)},I=D=>{if(!p)return;let N=yh(D.nativeEvent);if(i&&(N&&D.button===0||!N)){let O=S.getState();Af.onPointerDown(D.nativeEvent,{handleDomNode:D.currentTarget,autoPanOnConnect:O.autoPanOnConnect,connectionMode:O.connectionMode,connectionRadius:O.connectionRadius,domNode:O.domNode,nodeLookup:O.nodeLookup,lib:O.lib,isTarget:b,handleId:v,nodeId:p,flowId:O.rfId,panBy:O.panBy,cancelConnection:O.cancelConnection,onConnectStart:O.onConnectStart,onConnectEnd:(...R)=>S.getState().onConnectEnd?.(...R),updateConnection:O.updateConnection,onConnect:z,isValidConnection:n||((...R)=>S.getState().isValidConnection?.(...R)??!0),getTransform:()=>S.getState().transform,getFromHandle:()=>S.getState().connection.fromHandle,autoPanSpeed:O.autoPanSpeed,dragThreshold:O.connectionDragThreshold})}N?c?.(D):d?.(D)},T=D=>{let{onClickConnectStart:N,onClickConnectEnd:O,connectionClickStartHandle:R,connectionMode:L,isValidConnection:V,lib:k,rfId:G,nodeLookup:q,connection:Z}=S.getState();if(!p||!R&&!i)return;if(!R){N?.(D.nativeEvent,{nodeId:p,handleId:v,handleType:e}),S.setState({connectionClickStartHandle:{nodeId:p,type:e,id:v}});return}let j=hh(D.target),se=n||V,{connection:ee,isValid:X}=Af.isValid(D.nativeEvent,{handle:{nodeId:p,id:v,type:e},connectionMode:L,fromNodeId:R.nodeId,fromHandleId:R.id||null,fromType:R.type,isValidConnection:se,flowId:G,doc:j,lib:k,nodeLookup:q});X&&ee&&z(ee);let Q=structuredClone(Z);delete Q.inProgress,Q.toPosition=Q.toHandle?Q.toHandle.position:null,O?.(D,Q),S.setState({connectionClickStartHandle:null})};return(0,H.jsx)("div",{"data-handleid":v,"data-nodeid":p,"data-handlepos":t,"data-id":`${y}-${p}-${v}-${e}`,className:ot(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",m,u,{source:!b,target:b,connectable:o,connectablestart:i,connectableend:a,clickconnecting:E,connectingfrom:x,connectingto:_,valid:M,connectionindicator:o&&(!A||C)&&(A||B?a:i)}]),onMouseDown:I,onTouchStart:I,onClick:g?T:void 0,ref:h,...f,children:s})}var Oa=(0,P.memo)(K_(ZD));function jD({data:e,isConnectable:t,sourcePosition:n=W.Bottom}){return(0,H.jsxs)(H.Fragment,{children:[e?.label,(0,H.jsx)(Oa,{type:"source",position:n,isConnectable:t})]})}function $D({data:e,isConnectable:t,targetPosition:n=W.Top,sourcePosition:o=W.Bottom}){return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Oa,{type:"target",position:n,isConnectable:t}),e?.label,(0,H.jsx)(Oa,{type:"source",position:o,isConnectable:t})]})}function FD(){return null}function KD({data:e,isConnectable:t,targetPosition:n=W.Top}){return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Oa,{type:"target",position:n,isConnectable:t}),e?.label]})}var zf={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},O_={input:jD,default:$D,output:KD,group:FD};function QD(e){return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??e.style?.width,height:e.height??e.initialHeight??e.style?.height}:{width:e.width??e.style?.width,height:e.height??e.style?.height}}var WD=e=>{let{width:t,height:n,x:o,y:i}=jl(e.nodeLookup,{filter:a=>!!a.selected});return{width:qn(t)?t:null,height:qn(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${o}px,${i}px)`}};function JD({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){let o=Qe(),{width:i,height:a,transformString:l,userSelectionActive:r}=Ae(WD,je),s=J_(),u=(0,P.useRef)(null);(0,P.useEffect)(()=>{n||u.current?.focus({preventScroll:!0})},[n]);let c=!r&&i!==null&&a!==null;if(W_({nodeRef:u,disabled:!c}),!c)return null;let d=e?h=>{let v=o.getState().nodes.filter(b=>b.selected);e(h,v)}:void 0,f=h=>{Object.prototype.hasOwnProperty.call(zf,h.key)&&(h.preventDefault(),s({direction:zf[h.key],factor:h.shiftKey?4:1}))};return(0,H.jsx)("div",{className:ot(["react-flow__nodesselection","react-flow__container",t]),style:{transform:l},children:(0,H.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:a}})})}var z_=typeof window<"u"?window:void 0,eR=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function tE({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:o,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:l,paneClickDistance:r,deleteKeyCode:s,selectionKeyCode:u,selectionOnDrag:c,selectionMode:d,onSelectionStart:f,onSelectionEnd:h,multiSelectionKeyCode:v,panActivationKeyCode:b,zoomActivationKeyCode:S,elementsSelectable:p,zoomOnScroll:g,zoomOnPinch:m,panOnScroll:y,panOnScrollSpeed:x,panOnScrollMode:_,zoomOnDoubleClick:E,panOnDrag:C,defaultViewport:A,translateExtent:B,minZoom:M,maxZoom:z,preventScrolling:I,onSelectionContextMenu:T,noWheelClassName:D,noPanClassName:N,disableKeyboardA11y:O,onViewportChange:R,isControlledViewport:L}){let{nodesSelectionActive:V,userSelectionActive:k}=Ae(eR,je),G=Vs(u,{target:z_}),q=Vs(b,{target:z_}),Z=q||C,j=q||y,se=c&&Z!==!0,ee=G||k||se;return LD({deleteKeyCode:s,multiSelectionKeyCode:v}),(0,H.jsx)(PD,{onPaneContextMenu:a,elementsSelectable:p,zoomOnScroll:g,zoomOnPinch:m,panOnScroll:j,panOnScrollSpeed:x,panOnScrollMode:_,zoomOnDoubleClick:E,panOnDrag:!G&&Z,defaultViewport:A,translateExtent:B,minZoom:M,maxZoom:z,zoomActivationKeyCode:S,preventScrolling:I,noWheelClassName:D,noPanClassName:N,onViewportChange:R,isControlledViewport:L,paneClickDistance:r,selectionOnDrag:se,children:(0,H.jsxs)(ID,{onSelectionStart:f,onSelectionEnd:h,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:o,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:l,panOnDrag:Z,isSelecting:!!ee,selectionMode:d,selectionKeyPressed:G,paneClickDistance:r,selectionOnDrag:se,children:[e,V&&(0,H.jsx)(JD,{onSelectionContextMenu:T,noPanClassName:N,disableKeyboardA11y:O})]})})}tE.displayName="FlowRenderer";var tR=(0,P.memo)(tE),nR=e=>t=>e?vf(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 oR(e){return Ae((0,P.useCallback)(nR(e),[e]),je)}var iR=e=>e.updateNodeInternals;function aR(){let e=Ae(iR),[t]=(0,P.useState)(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{let o=new Map;n.forEach(i=>{let a=i.target.getAttribute("data-id");o.set(a,{id:a,nodeElement:i.target,force:!0})}),e(o)}));return(0,P.useEffect)(()=>()=>{t?.disconnect()},[t]),t}function lR({node:e,nodeType:t,hasDimensions:n,resizeObserver:o}){let i=Qe(),a=(0,P.useRef)(null),l=(0,P.useRef)(null),r=(0,P.useRef)(e.sourcePosition),s=(0,P.useRef)(e.targetPosition),u=(0,P.useRef)(t),c=n&&!!e.internals.handleBounds;return(0,P.useEffect)(()=>{a.current&&!e.hidden&&(!c||l.current!==a.current)&&(l.current&&o?.unobserve(l.current),o?.observe(a.current),l.current=a.current)},[c,e.hidden]),(0,P.useEffect)(()=>()=>{l.current&&(o?.unobserve(l.current),l.current=null)},[]),(0,P.useEffect)(()=>{if(a.current){let d=u.current!==t,f=r.current!==e.sourcePosition,h=s.current!==e.targetPosition;(d||f||h)&&(u.current=t,r.current=e.sourcePosition,s.current=e.targetPosition,i.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:a.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),a}function rR({id:e,onClick:t,onMouseEnter:n,onMouseMove:o,onMouseLeave:i,onContextMenu:a,onDoubleClick:l,nodesDraggable:r,elementsSelectable:s,nodesConnectable:u,nodesFocusable:c,resizeObserver:d,noDragClassName:f,noPanClassName:h,disableKeyboardA11y:v,rfId:b,nodeTypes:S,nodeClickDistance:p,onError:g}){let{node:m,internals:y,isParent:x}=Ae(X=>{let Q=X.nodeLookup.get(e),ue=X.parentLookup.has(e);return{node:Q,internals:Q.internals,isParent:ue}},je),_=m.type||"default",E=S?.[_]||O_[_];E===void 0&&(g?.("003",An.error003(_)),_="default",E=S?.default||O_.default);let C=!!(m.draggable||r&&typeof m.draggable>"u"),A=!!(m.selectable||s&&typeof m.selectable>"u"),B=!!(m.connectable||u&&typeof m.connectable>"u"),M=!!(m.focusable||c&&typeof m.focusable>"u"),z=Qe(),I=dh(m),T=lR({node:m,nodeType:_,hasDimensions:I,resizeObserver:d}),D=W_({nodeRef:T,disabled:m.hidden||!C,noDragClassName:f,handleSelector:m.dragHandle,nodeId:e,isSelectable:A,nodeClickDistance:p}),N=J_();if(m.hidden)return null;let O=So(m),R=QD(m),L=A||C||t||n||o||i,V=n?X=>n(X,{...y.userNode}):void 0,k=o?X=>o(X,{...y.userNode}):void 0,G=i?X=>i(X,{...y.userNode}):void 0,q=a?X=>a(X,{...y.userNode}):void 0,Z=l?X=>l(X,{...y.userNode}):void 0,j=X=>{let{selectNodesOnDrag:Q,nodeDragThreshold:ue}=z.getState();A&&(!Q||!C||ue>0)&&Mh({id:e,store:z,nodeRef:T}),t&&t(X,{...y.userNode})},se=X=>{if(!(gh(X.nativeEvent)||v)){if(th.includes(X.key)&&A){let Q=X.key==="Escape";Mh({id:e,store:z,unselect:Q,nodeRef:T})}else if(C&&m.selected&&Object.prototype.hasOwnProperty.call(zf,X.key)){X.preventDefault();let{ariaLabelConfig:Q}=z.getState();z.setState({ariaLiveMessage:Q["node.a11yDescription.ariaLiveMessage"]({direction:X.key.replace("Arrow","").toLowerCase(),x:~~y.positionAbsolute.x,y:~~y.positionAbsolute.y})}),N({direction:zf[X.key],factor:X.shiftKey?4:1})}}},ee=()=>{if(v||!T.current?.matches(":focus-visible"))return;let{transform:X,width:Q,height:ue,autoPanOnNodeFocus:ge,setCenter:ie}=z.getState();if(!ge)return;vf(new Map([[e,m]]),{x:0,y:0,width:Q,height:ue},X,!0).length>0||ie(m.position.x+O.width/2,m.position.y+O.height/2,{zoom:X[2]})};return(0,H.jsx)("div",{className:ot(["react-flow__node",`react-flow__node-${_}`,{[h]:C},m.className,{selected:m.selected,selectable:A,parent:x,draggable:C,dragging:D}]),ref:T,style:{zIndex:y.z,transform:`translate(${y.positionAbsolute.x}px,${y.positionAbsolute.y}px)`,pointerEvents:L?"all":"none",visibility:I?"visible":"hidden",...m.style,...R},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:V,onMouseMove:k,onMouseLeave:G,onContextMenu:q,onClick:j,onDoubleClick:Z,onKeyDown:M?se:void 0,tabIndex:M?0:void 0,onFocus:M?ee:void 0,role:m.ariaRole??(M?"group":void 0),"aria-roledescription":"node","aria-describedby":v?void 0:`${X_}-${b}`,"aria-label":m.ariaLabel,...m.domAttributes,children:(0,H.jsx)(YD,{value:e,children:(0,H.jsx)(E,{id:e,data:m.data,type:_,positionAbsoluteX:y.positionAbsolute.x,positionAbsoluteY:y.positionAbsolute.y,selected:m.selected??!1,selectable:A,draggable:C,deletable:m.deletable??!0,isConnectable:B,sourcePosition:m.sourcePosition,targetPosition:m.targetPosition,dragging:D,dragHandle:m.dragHandle,zIndex:y.z,parentId:m.parentId,...O})})})}var sR=(0,P.memo)(rR),uR=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function nE(e){let{nodesDraggable:t,nodesConnectable:n,nodesFocusable:o,elementsSelectable:i,onError:a}=Ae(uR,je),l=oR(e.onlyRenderVisibleElements),r=aR();return(0,H.jsx)("div",{className:"react-flow__nodes",style:Bf,children:l.map(s=>(0,H.jsx)(sR,{id:s,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:r,nodesDraggable:t,nodesConnectable:n,nodesFocusable:o,elementsSelectable:i,nodeClickDistance:e.nodeClickDistance,onError:a},s))})}nE.displayName="NodeRenderer";var cR=(0,P.memo)(nE);function fR(e){return Ae((0,P.useCallback)(n=>{if(!e)return n.edges.map(i=>i.id);let o=[];if(n.width&&n.height)for(let i of n.edges){let a=n.nodeLookup.get(i.source),l=n.nodeLookup.get(i.target);a&&l&&Gx({sourceNode:a,targetNode:l,width:n.width,height:n.height,transform:n.transform})&&o.push(i.id)}return o},[e]),je)}var dR=({color:e="none",strokeWidth:t=1})=>{let n={strokeWidth:t,...e&&{stroke:e}};return(0,H.jsx)("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},pR=({color:e="none",strokeWidth:t=1})=>{let n={strokeWidth:t,...e&&{stroke:e,fill:e}};return(0,H.jsx)("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},L_={[Yl.Arrow]:dR,[Yl.ArrowClosed]:pR};function mR(e){let t=Qe();return(0,P.useMemo)(()=>Object.prototype.hasOwnProperty.call(L_,e)?L_[e]:(t.getState().onError?.("009",An.error009(e)),null),[e])}var hR=({id:e,type:t,color:n,width:o=12.5,height:i=12.5,markerUnits:a="strokeWidth",strokeWidth:l,orient:r="auto-start-reverse"})=>{let s=mR(t);return s?(0,H.jsx)("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${o}`,markerHeight:`${i}`,viewBox:"-10 -10 20 20",markerUnits:a,orient:r,refX:"0",refY:"0",children:(0,H.jsx)(s,{color:n,strokeWidth:l})}):null},oE=({defaultColor:e,rfId:t})=>{let n=Ae(a=>a.edges),o=Ae(a=>a.defaultEdgeOptions),i=(0,P.useMemo)(()=>Ix(n,{id:t,defaultColor:e,defaultMarkerStart:o?.markerStart,defaultMarkerEnd:o?.markerEnd}),[n,o,t,e]);return i.length?(0,H.jsx)("svg",{className:"react-flow__marker","aria-hidden":"true",children:(0,H.jsx)("defs",{children:i.map(a=>(0,H.jsx)(hR,{id:a.id,type:a.type,color:a.color,width:a.width,height:a.height,markerUnits:a.markerUnits,strokeWidth:a.strokeWidth,orient:a.orient},a.id))})}):null};oE.displayName="MarkerDefinitions";var gR=(0,P.memo)(oE);function iE({x:e,y:t,label:n,labelStyle:o,labelShowBg:i=!0,labelBgStyle:a,labelBgPadding:l=[2,4],labelBgBorderRadius:r=2,children:s,className:u,...c}){let[d,f]=(0,P.useState)({x:1,y:0,width:0,height:0}),h=ot(["react-flow__edge-textwrapper",u]),v=(0,P.useRef)(null);return(0,P.useEffect)(()=>{if(v.current){let b=v.current.getBBox();f({x:b.x,y:b.y,width:b.width,height:b.height})}},[n]),n?(0,H.jsxs)("g",{transform:`translate(${e-d.width/2} ${t-d.height/2})`,className:h,visibility:d.width?"visible":"hidden",...c,children:[i&&(0,H.jsx)("rect",{width:d.width+2*l[0],x:-l[0],y:-l[1],height:d.height+2*l[1],className:"react-flow__edge-textbg",style:a,rx:r,ry:r}),(0,H.jsx)("text",{className:"react-flow__edge-text",y:d.height/2,dy:"0.3em",ref:v,style:o,children:n}),s]}):null}iE.displayName="EdgeText";var yR=(0,P.memo)(iE);function Hf({path:e,labelX:t,labelY:n,label:o,labelStyle:i,labelShowBg:a,labelBgStyle:l,labelBgPadding:r,labelBgBorderRadius:s,interactionWidth:u=20,...c}){return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)("path",{...c,d:e,fill:"none",className:ot(["react-flow__edge-path",c.className])}),u?(0,H.jsx)("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:u,className:"react-flow__edge-interaction"}):null,o&&qn(t)&&qn(n)?(0,H.jsx)(yR,{x:t,y:n,label:o,labelStyle:i,labelShowBg:a,labelBgStyle:l,labelBgPadding:r,labelBgBorderRadius:s}):null]})}function B_({pos:e,x1:t,y1:n,x2:o,y2:i}){return e===W.Left||e===W.Right?[.5*(t+o),n]:[t,.5*(n+i)]}function aE({sourceX:e,sourceY:t,sourcePosition:n=W.Bottom,targetX:o,targetY:i,targetPosition:a=W.Top}){let[l,r]=B_({pos:n,x1:e,y1:t,x2:o,y2:i}),[s,u]=B_({pos:a,x1:o,y1:i,x2:e,y2:t}),[c,d,f,h]=_f({sourceX:e,sourceY:t,targetX:o,targetY:i,sourceControlX:l,sourceControlY:r,targetControlX:s,targetControlY:u});return[`M${e},${t} C${l},${r} ${s},${u} ${o},${i}`,c,d,f,h]}function lE(e){return(0,P.memo)(({id:t,sourceX:n,sourceY:o,targetX:i,targetY:a,sourcePosition:l,targetPosition:r,label:s,labelStyle:u,labelShowBg:c,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:h,style:v,markerEnd:b,markerStart:S,interactionWidth:p})=>{let[g,m,y]=aE({sourceX:n,sourceY:o,sourcePosition:l,targetX:i,targetY:a,targetPosition:r}),x=e.isInternal?void 0:t;return(0,H.jsx)(Hf,{id:x,path:g,labelX:m,labelY:y,label:s,labelStyle:u,labelShowBg:c,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:h,style:v,markerEnd:b,markerStart:S,interactionWidth:p})})}var vR=lE({isInternal:!1}),rE=lE({isInternal:!0});vR.displayName="SimpleBezierEdge";rE.displayName="SimpleBezierEdgeInternal";function sE(e){return(0,P.memo)(({id:t,sourceX:n,sourceY:o,targetX:i,targetY:a,label:l,labelStyle:r,labelShowBg:s,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d,style:f,sourcePosition:h=W.Bottom,targetPosition:v=W.Top,markerEnd:b,markerStart:S,pathOptions:p,interactionWidth:g})=>{let[m,y,x]=Is({sourceX:n,sourceY:o,sourcePosition:h,targetX:i,targetY:a,targetPosition:v,borderRadius:p?.borderRadius,offset:p?.offset,stepPosition:p?.stepPosition}),_=e.isInternal?void 0:t;return(0,H.jsx)(Hf,{id:_,path:m,labelX:y,labelY:x,label:l,labelStyle:r,labelShowBg:s,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d,style:f,markerEnd:b,markerStart:S,interactionWidth:g})})}var uE=sE({isInternal:!1}),cE=sE({isInternal:!0});uE.displayName="SmoothStepEdge";cE.displayName="SmoothStepEdgeInternal";function fE(e){return(0,P.memo)(({id:t,...n})=>{let o=e.isInternal?void 0:t;return(0,H.jsx)(uE,{...n,id:o,pathOptions:(0,P.useMemo)(()=>({borderRadius:0,offset:n.pathOptions?.offset}),[n.pathOptions?.offset])})})}var bR=fE({isInternal:!1}),dE=fE({isInternal:!0});bR.displayName="StepEdge";dE.displayName="StepEdgeInternal";function pE(e){return(0,P.memo)(({id:t,sourceX:n,sourceY:o,targetX:i,targetY:a,label:l,labelStyle:r,labelShowBg:s,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d,style:f,markerEnd:h,markerStart:v,interactionWidth:b})=>{let[S,p,g]=Tf({sourceX:n,sourceY:o,targetX:i,targetY:a}),m=e.isInternal?void 0:t;return(0,H.jsx)(Hf,{id:m,path:S,labelX:p,labelY:g,label:l,labelStyle:r,labelShowBg:s,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d,style:f,markerEnd:h,markerStart:v,interactionWidth:b})})}var SR=pE({isInternal:!1}),mE=pE({isInternal:!0});SR.displayName="StraightEdge";mE.displayName="StraightEdgeInternal";function hE(e){return(0,P.memo)(({id:t,sourceX:n,sourceY:o,targetX:i,targetY:a,sourcePosition:l=W.Bottom,targetPosition:r=W.Top,label:s,labelStyle:u,labelShowBg:c,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:h,style:v,markerEnd:b,markerStart:S,pathOptions:p,interactionWidth:g})=>{let[m,y,x]=Ef({sourceX:n,sourceY:o,sourcePosition:l,targetX:i,targetY:a,targetPosition:r,curvature:p?.curvature}),_=e.isInternal?void 0:t;return(0,H.jsx)(Hf,{id:_,path:m,labelX:y,labelY:x,label:s,labelStyle:u,labelShowBg:c,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:h,style:v,markerEnd:b,markerStart:S,interactionWidth:g})})}var xR=hE({isInternal:!1}),gE=hE({isInternal:!0});xR.displayName="BezierEdge";gE.displayName="BezierEdgeInternal";var H_={default:gE,straight:mE,step:dE,smoothstep:cE,simplebezier:rE},P_={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},_R=(e,t,n)=>n===W.Left?e-t:n===W.Right?e+t:e,ER=(e,t,n)=>n===W.Top?e-t:n===W.Bottom?e+t:e,k_="react-flow__edgeupdater";function G_({position:e,centerX:t,centerY:n,radius:o=10,onMouseDown:i,onMouseEnter:a,onMouseOut:l,type:r}){return(0,H.jsx)("circle",{onMouseDown:i,onMouseEnter:a,onMouseOut:l,className:ot([k_,`${k_}-${r}`]),cx:_R(t,o,e),cy:ER(n,o,e),r:o,stroke:"transparent",fill:"transparent"})}function TR({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:o,sourceY:i,targetX:a,targetY:l,sourcePosition:r,targetPosition:s,onReconnect:u,onReconnectStart:c,onReconnectEnd:d,setReconnecting:f,setUpdateHover:h}){let v=Qe(),b=(y,x)=>{if(y.button!==0)return;let{autoPanOnConnect:_,domNode:E,connectionMode:C,connectionRadius:A,lib:B,onConnectStart:M,cancelConnection:z,nodeLookup:I,rfId:T,panBy:D,updateConnection:N}=v.getState(),O=x.type==="target",R=(k,G)=>{f(!1),d?.(k,n,x.type,G)},L=k=>u?.(n,k),V=(k,G)=>{f(!0),c?.(y,n,x.type),M?.(k,G)};Af.onPointerDown(y.nativeEvent,{autoPanOnConnect:_,connectionMode:C,connectionRadius:A,domNode:E,handleId:x.id,nodeId:x.nodeId,nodeLookup:I,isTarget:O,edgeUpdaterType:x.type,lib:B,flowId:T,cancelConnection:z,panBy:D,isValidConnection:(...k)=>v.getState().isValidConnection?.(...k)??!0,onConnect:L,onConnectStart:V,onConnectEnd:(...k)=>v.getState().onConnectEnd?.(...k),onReconnectEnd:R,updateConnection:N,getTransform:()=>v.getState().transform,getFromHandle:()=>v.getState().connection.fromHandle,dragThreshold:v.getState().connectionDragThreshold,handleDomNode:y.currentTarget})},S=y=>b(y,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),p=y=>b(y,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),g=()=>h(!0),m=()=>h(!1);return(0,H.jsxs)(H.Fragment,{children:[(e===!0||e==="source")&&(0,H.jsx)(G_,{position:r,centerX:o,centerY:i,radius:t,onMouseDown:S,onMouseEnter:g,onMouseOut:m,type:"source"}),(e===!0||e==="target")&&(0,H.jsx)(G_,{position:s,centerX:a,centerY:l,radius:t,onMouseDown:p,onMouseEnter:g,onMouseOut:m,type:"target"})]})}function NR({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:o,onClick:i,onDoubleClick:a,onContextMenu:l,onMouseEnter:r,onMouseMove:s,onMouseLeave:u,reconnectRadius:c,onReconnect:d,onReconnectStart:f,onReconnectEnd:h,rfId:v,edgeTypes:b,noPanClassName:S,onError:p,disableKeyboardA11y:g}){let m=Ae(ie=>ie.edgeLookup.get(e)),y=Ae(ie=>ie.defaultEdgeOptions);m=y?{...y,...m}:m;let x=m.type||"default",_=b?.[x]||H_[x];_===void 0&&(p?.("011",An.error011(x)),x="default",_=b?.default||H_.default);let E=!!(m.focusable||t&&typeof m.focusable>"u"),C=typeof d<"u"&&(m.reconnectable||n&&typeof m.reconnectable>"u"),A=!!(m.selectable||o&&typeof m.selectable>"u"),B=(0,P.useRef)(null),[M,z]=(0,P.useState)(!1),[I,T]=(0,P.useState)(!1),D=Qe(),{zIndex:N,sourceX:O,sourceY:R,targetX:L,targetY:V,sourcePosition:k,targetPosition:G}=Ae((0,P.useCallback)(ie=>{let te=ie.nodeLookup.get(m.source),Te=ie.nodeLookup.get(m.target);if(!te||!Te)return{zIndex:m.zIndex,...P_};let de=Ux({id:e,sourceNode:te,targetNode:Te,sourceHandle:m.sourceHandle||null,targetHandle:m.targetHandle||null,connectionMode:ie.connectionMode,onError:p});return{zIndex:kx({selected:m.selected,zIndex:m.zIndex,sourceNode:te,targetNode:Te,elevateOnSelect:ie.elevateEdgesOnSelect,zIndexMode:ie.zIndexMode}),...de||P_}},[m.source,m.target,m.sourceHandle,m.targetHandle,m.selected,m.zIndex]),je),q=(0,P.useMemo)(()=>m.markerStart?`url('#${Nf(m.markerStart,v)}')`:void 0,[m.markerStart,v]),Z=(0,P.useMemo)(()=>m.markerEnd?`url('#${Nf(m.markerEnd,v)}')`:void 0,[m.markerEnd,v]);if(m.hidden||O===null||R===null||L===null||V===null)return null;let j=ie=>{let{addSelectedEdges:te,unselectNodesAndEdges:Te,multiSelectionActive:de}=D.getState();A&&(D.setState({nodesSelectionActive:!1}),m.selected&&de?(Te({nodes:[],edges:[m]}),B.current?.blur()):te([e])),i&&i(ie,m)},se=a?ie=>{a(ie,{...m})}:void 0,ee=l?ie=>{l(ie,{...m})}:void 0,X=r?ie=>{r(ie,{...m})}:void 0,Q=s?ie=>{s(ie,{...m})}:void 0,ue=u?ie=>{u(ie,{...m})}:void 0,ge=ie=>{if(!g&&th.includes(ie.key)&&A){let{unselectNodesAndEdges:te,addSelectedEdges:Te}=D.getState();ie.key==="Escape"?(B.current?.blur(),te({edges:[m]})):Te([e])}};return(0,H.jsx)("svg",{style:{zIndex:N},children:(0,H.jsxs)("g",{className:ot(["react-flow__edge",`react-flow__edge-${x}`,m.className,S,{selected:m.selected,animated:m.animated,inactive:!A&&!i,updating:M,selectable:A}]),onClick:j,onDoubleClick:se,onContextMenu:ee,onMouseEnter:X,onMouseMove:Q,onMouseLeave:ue,onKeyDown:E?ge:void 0,tabIndex:E?0:void 0,role:m.ariaRole??(E?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":m.ariaLabel===null?void 0:m.ariaLabel||`Edge from ${m.source} to ${m.target}`,"aria-describedby":E?`${q_}-${v}`:void 0,ref:B,...m.domAttributes,children:[!I&&(0,H.jsx)(_,{id:e,source:m.source,target:m.target,type:m.type,selected:m.selected,animated:m.animated,selectable:A,deletable:m.deletable??!0,label:m.label,labelStyle:m.labelStyle,labelShowBg:m.labelShowBg,labelBgStyle:m.labelBgStyle,labelBgPadding:m.labelBgPadding,labelBgBorderRadius:m.labelBgBorderRadius,sourceX:O,sourceY:R,targetX:L,targetY:V,sourcePosition:k,targetPosition:G,data:m.data,style:m.style,sourceHandleId:m.sourceHandle,targetHandleId:m.targetHandle,markerStart:q,markerEnd:Z,pathOptions:"pathOptions"in m?m.pathOptions:void 0,interactionWidth:m.interactionWidth}),C&&(0,H.jsx)(TR,{edge:m,isReconnectable:C,reconnectRadius:c,onReconnect:d,onReconnectStart:f,onReconnectEnd:h,sourceX:O,sourceY:R,targetX:L,targetY:V,sourcePosition:k,targetPosition:G,setUpdateHover:z,setReconnecting:T})]})})}var CR=(0,P.memo)(NR),wR=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function yE({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:o,noPanClassName:i,onReconnect:a,onEdgeContextMenu:l,onEdgeMouseEnter:r,onEdgeMouseMove:s,onEdgeMouseLeave:u,onEdgeClick:c,reconnectRadius:d,onEdgeDoubleClick:f,onReconnectStart:h,onReconnectEnd:v,disableKeyboardA11y:b}){let{edgesFocusable:S,edgesReconnectable:p,elementsSelectable:g,onError:m}=Ae(wR,je),y=fR(t);return(0,H.jsxs)("div",{className:"react-flow__edges",children:[(0,H.jsx)(gR,{defaultColor:e,rfId:n}),y.map(x=>(0,H.jsx)(CR,{id:x,edgesFocusable:S,edgesReconnectable:p,elementsSelectable:g,noPanClassName:i,onReconnect:a,onContextMenu:l,onMouseEnter:r,onMouseMove:s,onMouseLeave:u,onClick:c,reconnectRadius:d,onDoubleClick:f,onReconnectStart:h,onReconnectEnd:v,rfId:n,onError:m,edgeTypes:o,disableKeyboardA11y:b},x))]})}yE.displayName="EdgeRenderer";var AR=(0,P.memo)(yE),MR=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function DR({children:e}){let t=Ae(MR);return(0,H.jsx)("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function RR(e){let t=Dh(),n=(0,P.useRef)(!1);(0,P.useEffect)(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}var OR=e=>e.panZoom?.syncViewport;function zR(e){let t=Ae(OR),n=Qe();return(0,P.useEffect)(()=>{e&&(t?.(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function U_(e){return e.connection.inProgress?{...e.connection,to:Kl(e.connection.to,e.transform)}:{...e.connection}}function LR(e){return e?n=>{let o=U_(n);return e(o)}:U_}function BR(e){let t=LR(e);return Ae(t,je)}var HR=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function PR({containerStyle:e,style:t,type:n,component:o}){let{nodesConnectable:i,width:a,height:l,isValid:r,inProgress:s}=Ae(HR,je);return!(a&&i&&s)?null:(0,H.jsx)("svg",{style:e,width:a,height:l,className:"react-flow__connectionline react-flow__container",children:(0,H.jsx)("g",{className:ot(["react-flow__connection",ih(r)]),children:(0,H.jsx)(vE,{style:t,type:n,CustomComponent:o,isValid:r})})})}var vE=({style:e,type:t=bo.Bezier,CustomComponent:n,isValid:o})=>{let{inProgress:i,from:a,fromNode:l,fromHandle:r,fromPosition:s,to:u,toNode:c,toHandle:d,toPosition:f,pointer:h}=BR();if(!i)return;if(n)return(0,H.jsx)(n,{connectionLineType:t,connectionLineStyle:e,fromNode:l,fromHandle:r,fromX:a.x,fromY:a.y,toX:u.x,toY:u.y,fromPosition:s,toPosition:f,connectionStatus:ih(o),toNode:c,toHandle:d,pointer:h});let v="",b={sourceX:a.x,sourceY:a.y,sourcePosition:s,targetX:u.x,targetY:u.y,targetPosition:f};switch(t){case bo.Bezier:[v]=Ef(b);break;case bo.SimpleBezier:[v]=aE(b);break;case bo.Step:[v]=Is({...b,borderRadius:0});break;case bo.SmoothStep:[v]=Is(b);break;default:[v]=Tf(b)}return(0,H.jsx)("path",{d:v,fill:"none",className:"react-flow__connection-path",style:e})};vE.displayName="ConnectionLine";var kR={};function I_(e=kR){let t=(0,P.useRef)(e),n=Qe();(0,P.useEffect)(()=>{},[e])}function GR(){let e=Qe(),t=(0,P.useRef)(!1);(0,P.useEffect)(()=>{},[])}function bE({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:o,onEdgeClick:i,onNodeDoubleClick:a,onEdgeDoubleClick:l,onNodeMouseEnter:r,onNodeMouseMove:s,onNodeMouseLeave:u,onNodeContextMenu:c,onSelectionContextMenu:d,onSelectionStart:f,onSelectionEnd:h,connectionLineType:v,connectionLineStyle:b,connectionLineComponent:S,connectionLineContainerStyle:p,selectionKeyCode:g,selectionOnDrag:m,selectionMode:y,multiSelectionKeyCode:x,panActivationKeyCode:_,zoomActivationKeyCode:E,deleteKeyCode:C,onlyRenderVisibleElements:A,elementsSelectable:B,defaultViewport:M,translateExtent:z,minZoom:I,maxZoom:T,preventScrolling:D,defaultMarkerColor:N,zoomOnScroll:O,zoomOnPinch:R,panOnScroll:L,panOnScrollSpeed:V,panOnScrollMode:k,zoomOnDoubleClick:G,panOnDrag:q,onPaneClick:Z,onPaneMouseEnter:j,onPaneMouseMove:se,onPaneMouseLeave:ee,onPaneScroll:X,onPaneContextMenu:Q,paneClickDistance:ue,nodeClickDistance:ge,onEdgeContextMenu:ie,onEdgeMouseEnter:te,onEdgeMouseMove:Te,onEdgeMouseLeave:de,reconnectRadius:be,onReconnect:Le,onReconnectStart:Be,onReconnectEnd:dt,noDragClassName:Gt,noWheelClassName:hn,noPanClassName:rt,disableKeyboardA11y:Rn,nodeExtent:Wt,rfId:Jt,viewport:St,onViewportChange:$e}){return I_(e),I_(t),GR(),RR(n),zR(St),(0,H.jsx)(tR,{onPaneClick:Z,onPaneMouseEnter:j,onPaneMouseMove:se,onPaneMouseLeave:ee,onPaneContextMenu:Q,onPaneScroll:X,paneClickDistance:ue,deleteKeyCode:C,selectionKeyCode:g,selectionOnDrag:m,selectionMode:y,onSelectionStart:f,onSelectionEnd:h,multiSelectionKeyCode:x,panActivationKeyCode:_,zoomActivationKeyCode:E,elementsSelectable:B,zoomOnScroll:O,zoomOnPinch:R,zoomOnDoubleClick:G,panOnScroll:L,panOnScrollSpeed:V,panOnScrollMode:k,panOnDrag:q,defaultViewport:M,translateExtent:z,minZoom:I,maxZoom:T,onSelectionContextMenu:d,preventScrolling:D,noDragClassName:Gt,noWheelClassName:hn,noPanClassName:rt,disableKeyboardA11y:Rn,onViewportChange:$e,isControlledViewport:!!St,children:(0,H.jsxs)(DR,{children:[(0,H.jsx)(AR,{edgeTypes:t,onEdgeClick:i,onEdgeDoubleClick:l,onReconnect:Le,onReconnectStart:Be,onReconnectEnd:dt,onlyRenderVisibleElements:A,onEdgeContextMenu:ie,onEdgeMouseEnter:te,onEdgeMouseMove:Te,onEdgeMouseLeave:de,reconnectRadius:be,defaultMarkerColor:N,noPanClassName:rt,disableKeyboardA11y:Rn,rfId:Jt}),(0,H.jsx)(PR,{style:b,type:v,component:S,containerStyle:p}),(0,H.jsx)("div",{className:"react-flow__edgelabel-renderer"}),(0,H.jsx)(cR,{nodeTypes:e,onNodeClick:o,onNodeDoubleClick:a,onNodeMouseEnter:r,onNodeMouseMove:s,onNodeMouseLeave:u,onNodeContextMenu:c,nodeClickDistance:ge,onlyRenderVisibleElements:A,noPanClassName:rt,noDragClassName:Gt,disableKeyboardA11y:Rn,nodeExtent:Wt,rfId:Jt}),(0,H.jsx)("div",{className:"react-flow__viewport-portal"})]})})}bE.displayName="GraphView";var UR=(0,P.memo)(bE),V_=({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,width:i,height:a,fitView:l,fitViewOptions:r,minZoom:s=.5,maxZoom:u=2,nodeOrigin:c,nodeExtent:d,zIndexMode:f="basic"}={})=>{let h=new Map,v=new Map,b=new Map,S=new Map,p=o??t??[],g=n??e??[],m=c??[0,0],y=d??Zl;Th(b,S,p);let x=Cf(g,h,v,{nodeOrigin:m,nodeExtent:y,zIndexMode:f}),_=[0,0,1];if(l&&i&&a){let E=jl(h,{filter:M=>!!((M.width||M.initialWidth)&&(M.height||M.initialHeight))}),{x:C,y:A,zoom:B}=Us(E,i,a,s,u,r?.padding??.1);_=[C,A,B]}return{rfId:"1",width:i??0,height:a??0,transform:_,nodes:g,nodesInitialized:x,nodeLookup:h,parentLookup:v,edges:p,edgeLookup:S,connectionLookup:b,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:o!==void 0,panZoom:null,minZoom:s,maxZoom:u,translateExtent:Zl,nodeExtent:y,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:ji.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:m,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:l??!1,fitViewOptions:r,fitViewResolver:null,connection:{...oh},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:fh,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:nh,zIndexMode:f,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},IR=({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,width:i,height:a,fitView:l,fitViewOptions:r,minZoom:s,maxZoom:u,nodeOrigin:c,nodeExtent:d,zIndexMode:f})=>b_((h,v)=>{async function b(){let{nodeLookup:S,panZoom:p,fitViewOptions:g,fitViewResolver:m,width:y,height:x,minZoom:_,maxZoom:E}=v();p&&(await Ox({nodes:S,width:y,height:x,panZoom:p,minZoom:_,maxZoom:E},g),m?.resolve(!0),h({fitViewResolver:null}))}return{...V_({nodes:e,edges:t,width:i,height:a,fitView:l,fitViewOptions:r,minZoom:s,maxZoom:u,nodeOrigin:c,nodeExtent:d,defaultNodes:n,defaultEdges:o,zIndexMode:f}),setNodes:S=>{let{nodeLookup:p,parentLookup:g,nodeOrigin:m,elevateNodesOnSelect:y,fitViewQueued:x,zIndexMode:_}=v(),E=Cf(S,p,g,{nodeOrigin:m,nodeExtent:d,elevateNodesOnSelect:y,checkEquality:!0,zIndexMode:_});x&&E?(b(),h({nodes:S,nodesInitialized:E,fitViewQueued:!1,fitViewOptions:void 0})):h({nodes:S,nodesInitialized:E})},setEdges:S=>{let{connectionLookup:p,edgeLookup:g}=v();Th(p,g,S),h({edges:S})},setDefaultNodesAndEdges:(S,p)=>{if(S){let{setNodes:g}=v();g(S),h({hasDefaultNodes:!0})}if(p){let{setEdges:g}=v();g(p),h({hasDefaultEdges:!0})}},updateNodeInternals:S=>{let{triggerNodeChanges:p,nodeLookup:g,parentLookup:m,domNode:y,nodeOrigin:x,nodeExtent:_,debug:E,fitViewQueued:C,zIndexMode:A}=v(),{changes:B,updatedInternals:M}=qx(S,g,m,y,x,_,A);M&&(Yx(g,m,{nodeOrigin:x,nodeExtent:_,zIndexMode:A}),C?(b(),h({fitViewQueued:!1,fitViewOptions:void 0})):h({}),B?.length>0&&(E&&console.log("React Flow: trigger node changes",B),p?.(B)))},updateNodePositions:(S,p=!1)=>{let g=[],m=[],{nodeLookup:y,triggerNodeChanges:x,connection:_,updateConnection:E,onNodesChangeMiddlewareMap:C}=v();for(let[A,B]of S){let M=y.get(A),z=!!(M?.expandParent&&M?.parentId&&B?.position),I={id:A,type:"position",position:z?{x:Math.max(0,B.position.x),y:Math.max(0,B.position.y)}:B.position,dragging:p};if(M&&_.inProgress&&_.fromNode.id===M.id){let T=$i(M,_.fromHandle,W.Left,!0);E({..._,from:T})}z&&M.parentId&&g.push({id:A,parentId:M.parentId,rect:{...B.internals.positionAbsolute,width:B.measured.width??0,height:B.measured.height??0}}),m.push(I)}if(g.length>0){let{parentLookup:A,nodeOrigin:B}=v(),M=wf(g,y,A,B);m.push(...M)}for(let A of C.values())m=A(m);x(m)},triggerNodeChanges:S=>{let{onNodesChange:p,setNodes:g,nodes:m,hasDefaultNodes:y,debug:x}=v();if(S?.length){if(y){let _=$_(S,m);g(_)}x&&console.log("React Flow: trigger node changes",S),p?.(S)}},triggerEdgeChanges:S=>{let{onEdgesChange:p,setEdges:g,edges:m,hasDefaultEdges:y,debug:x}=v();if(S?.length){if(y){let _=F_(S,m);g(_)}x&&console.log("React Flow: trigger edge changes",S),p?.(S)}},addSelectedNodes:S=>{let{multiSelectionActive:p,edgeLookup:g,nodeLookup:m,triggerNodeChanges:y,triggerEdgeChanges:x}=v();if(p){let _=S.map(E=>Ra(E,!0));y(_);return}y(Jl(m,new Set([...S]),!0)),x(Jl(g))},addSelectedEdges:S=>{let{multiSelectionActive:p,edgeLookup:g,nodeLookup:m,triggerNodeChanges:y,triggerEdgeChanges:x}=v();if(p){let _=S.map(E=>Ra(E,!0));x(_);return}x(Jl(g,new Set([...S]))),y(Jl(m,new Set,!0))},unselectNodesAndEdges:({nodes:S,edges:p}={})=>{let{edges:g,nodes:m,nodeLookup:y,triggerNodeChanges:x,triggerEdgeChanges:_}=v(),E=S||m,C=p||g,A=[];for(let M of E){if(!M.selected)continue;let z=y.get(M.id);z&&(z.selected=!1),A.push(Ra(M.id,!1))}let B=[];for(let M of C)M.selected&&B.push(Ra(M.id,!1));x(A),_(B)},setMinZoom:S=>{let{panZoom:p,maxZoom:g}=v();p?.setScaleExtent([S,g]),h({minZoom:S})},setMaxZoom:S=>{let{panZoom:p,minZoom:g}=v();p?.setScaleExtent([g,S]),h({maxZoom:S})},setTranslateExtent:S=>{v().panZoom?.setTranslateExtent(S),h({translateExtent:S})},resetSelectedElements:()=>{let{edges:S,nodes:p,triggerNodeChanges:g,triggerEdgeChanges:m,elementsSelectable:y}=v();if(!y)return;let x=p.reduce((E,C)=>C.selected?[...E,Ra(C.id,!1)]:E,[]),_=S.reduce((E,C)=>C.selected?[...E,Ra(C.id,!1)]:E,[]);g(x),m(_)},setNodeExtent:S=>{let{nodes:p,nodeLookup:g,parentLookup:m,nodeOrigin:y,elevateNodesOnSelect:x,nodeExtent:_,zIndexMode:E}=v();S[0][0]===_[0][0]&&S[0][1]===_[0][1]&&S[1][0]===_[1][0]&&S[1][1]===_[1][1]||(Cf(p,g,m,{nodeOrigin:y,nodeExtent:S,elevateNodesOnSelect:x,checkEquality:!1,zIndexMode:E}),h({nodeExtent:S}))},panBy:S=>{let{transform:p,width:g,height:m,panZoom:y,translateExtent:x}=v();return Zx({delta:S,panZoom:y,transform:p,translateExtent:x,width:g,height:m})},setCenter:async(S,p,g)=>{let{width:m,height:y,maxZoom:x,panZoom:_}=v();if(!_)return Promise.resolve(!1);let E=typeof g?.zoom<"u"?g.zoom:x;return await _.setViewport({x:m/2-S*E,y:y/2-p*E,zoom:E},{duration:g?.duration,ease:g?.ease,interpolate:g?.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{h({connection:{...oh}})},updateConnection:S=>{h({connection:S})},reset:()=>h({...V_()})}},Object.is);function VR({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:o,initialWidth:i,initialHeight:a,initialMinZoom:l,initialMaxZoom:r,initialFitViewOptions:s,fitView:u,nodeOrigin:c,nodeExtent:d,zIndexMode:f,children:h}){let[v]=(0,P.useState)(()=>IR({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,width:i,height:a,fitView:u,minZoom:l,maxZoom:r,fitViewOptions:s,nodeOrigin:c,nodeExtent:d,zIndexMode:f}));return(0,H.jsx)(rD,{value:v,children:(0,H.jsx)(DD,{children:h})})}function YR({children:e,nodes:t,edges:n,defaultNodes:o,defaultEdges:i,width:a,height:l,fitView:r,fitViewOptions:s,minZoom:u,maxZoom:c,nodeOrigin:d,nodeExtent:f,zIndexMode:h}){return(0,P.useContext)(Lf)?(0,H.jsx)(H.Fragment,{children:e}):(0,H.jsx)(VR,{initialNodes:t,initialEdges:n,defaultNodes:o,defaultEdges:i,initialWidth:a,initialHeight:l,fitView:r,initialFitViewOptions:s,initialMinZoom:u,initialMaxZoom:c,nodeOrigin:d,nodeExtent:f,zIndexMode:h,children:e})}var XR={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function qR({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,className:i,nodeTypes:a,edgeTypes:l,onNodeClick:r,onEdgeClick:s,onInit:u,onMove:c,onMoveStart:d,onMoveEnd:f,onConnect:h,onConnectStart:v,onConnectEnd:b,onClickConnectStart:S,onClickConnectEnd:p,onNodeMouseEnter:g,onNodeMouseMove:m,onNodeMouseLeave:y,onNodeContextMenu:x,onNodeDoubleClick:_,onNodeDragStart:E,onNodeDrag:C,onNodeDragStop:A,onNodesDelete:B,onEdgesDelete:M,onDelete:z,onSelectionChange:I,onSelectionDragStart:T,onSelectionDrag:D,onSelectionDragStop:N,onSelectionContextMenu:O,onSelectionStart:R,onSelectionEnd:L,onBeforeDelete:V,connectionMode:k,connectionLineType:G=bo.Bezier,connectionLineStyle:q,connectionLineComponent:Z,connectionLineContainerStyle:j,deleteKeyCode:se="Backspace",selectionKeyCode:ee="Shift",selectionOnDrag:X=!1,selectionMode:Q=Aa.Full,panActivationKeyCode:ue="Space",multiSelectionKeyCode:ge=Ql()?"Meta":"Control",zoomActivationKeyCode:ie=Ql()?"Meta":"Control",snapToGrid:te,snapGrid:Te,onlyRenderVisibleElements:de=!1,selectNodesOnDrag:be,nodesDraggable:Le,autoPanOnNodeFocus:Be,nodesConnectable:dt,nodesFocusable:Gt,nodeOrigin:hn=Z_,edgesFocusable:rt,edgesReconnectable:Rn,elementsSelectable:Wt=!0,defaultViewport:Jt=SD,minZoom:St=.5,maxZoom:$e=2,translateExtent:ro=Zl,preventScrolling:ri=!0,nodeExtent:$n,defaultMarkerColor:si="#b1b1b7",zoomOnScroll:Fn=!0,zoomOnPinch:On=!0,panOnScroll:No=!1,panOnScrollSpeed:pt=.5,panOnScrollMode:Kn=ni.Free,zoomOnDoubleClick:Qn=!0,panOnDrag:Co=!0,onPaneClick:wo,onPaneMouseEnter:ui,onPaneMouseMove:ci,onPaneMouseLeave:ka,onPaneScroll:Ao,onPaneContextMenu:Ga,paneClickDistance:Ua=1,nodeClickDistance:We=0,children:Mo,onReconnect:Do,onReconnectStart:Ro,onReconnectEnd:me,onEdgeContextMenu:re,onEdgeDoubleClick:ae,onEdgeMouseEnter:we,onEdgeMouseMove:ye,onEdgeMouseLeave:He,reconnectRadius:wt=10,onNodesChange:Wn,onEdgesChange:zn,noDragClassName:fi="nodrag",noWheelClassName:xt="nowheel",noPanClassName:rr="nopan",fitView:sr,fitViewOptions:ur,connectOnClick:eu,attributionPosition:tu,proOptions:oe,defaultEdgeOptions:w,elevateNodesOnSelect:Y=!0,elevateEdgesOnSelect:F=!1,disableKeyboardA11y:Ge=!1,autoPanOnConnect:_t,autoPanOnNodeDrag:et,autoPanSpeed:Ht,connectionRadius:Ut,isValidConnection:so,onError:cr,style:mt,id:fr,nodeDragThreshold:nu,connectionDragThreshold:OT,viewport:zT,onViewportChange:LT,width:BT,height:HT,colorMode:PT="light",debug:kT,onScroll:vg,ariaLabelConfig:GT,zIndexMode:bg="basic",...UT},IT){let Ff=fr||"1",VT=TD(PT),YT=(0,P.useCallback)(Sg=>{Sg.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),vg?.(Sg)},[vg]);return(0,H.jsx)("div",{"data-testid":"rf__wrapper",...UT,onScroll:YT,style:{...mt,...XR},ref:IT,className:ot(["react-flow",i,VT]),id:fr,role:"application",children:(0,H.jsxs)(YR,{nodes:e,edges:t,width:BT,height:HT,fitView:sr,fitViewOptions:ur,minZoom:St,maxZoom:$e,nodeOrigin:hn,nodeExtent:$n,zIndexMode:bg,children:[(0,H.jsx)(UR,{onInit:u,onNodeClick:r,onEdgeClick:s,onNodeMouseEnter:g,onNodeMouseMove:m,onNodeMouseLeave:y,onNodeContextMenu:x,onNodeDoubleClick:_,nodeTypes:a,edgeTypes:l,connectionLineType:G,connectionLineStyle:q,connectionLineComponent:Z,connectionLineContainerStyle:j,selectionKeyCode:ee,selectionOnDrag:X,selectionMode:Q,deleteKeyCode:se,multiSelectionKeyCode:ge,panActivationKeyCode:ue,zoomActivationKeyCode:ie,onlyRenderVisibleElements:de,defaultViewport:Jt,translateExtent:ro,minZoom:St,maxZoom:$e,preventScrolling:ri,zoomOnScroll:Fn,zoomOnPinch:On,zoomOnDoubleClick:Qn,panOnScroll:No,panOnScrollSpeed:pt,panOnScrollMode:Kn,panOnDrag:Co,onPaneClick:wo,onPaneMouseEnter:ui,onPaneMouseMove:ci,onPaneMouseLeave:ka,onPaneScroll:Ao,onPaneContextMenu:Ga,paneClickDistance:Ua,nodeClickDistance:We,onSelectionContextMenu:O,onSelectionStart:R,onSelectionEnd:L,onReconnect:Do,onReconnectStart:Ro,onReconnectEnd:me,onEdgeContextMenu:re,onEdgeDoubleClick:ae,onEdgeMouseEnter:we,onEdgeMouseMove:ye,onEdgeMouseLeave:He,reconnectRadius:wt,defaultMarkerColor:si,noDragClassName:fi,noWheelClassName:xt,noPanClassName:rr,rfId:Ff,disableKeyboardA11y:Ge,nodeExtent:$n,viewport:zT,onViewportChange:LT}),(0,H.jsx)(ED,{nodes:e,edges:t,defaultNodes:n,defaultEdges:o,onConnect:h,onConnectStart:v,onConnectEnd:b,onClickConnectStart:S,onClickConnectEnd:p,nodesDraggable:Le,autoPanOnNodeFocus:Be,nodesConnectable:dt,nodesFocusable:Gt,edgesFocusable:rt,edgesReconnectable:Rn,elementsSelectable:Wt,elevateNodesOnSelect:Y,elevateEdgesOnSelect:F,minZoom:St,maxZoom:$e,nodeExtent:$n,onNodesChange:Wn,onEdgesChange:zn,snapToGrid:te,snapGrid:Te,connectionMode:k,translateExtent:ro,connectOnClick:eu,defaultEdgeOptions:w,fitView:sr,fitViewOptions:ur,onNodesDelete:B,onEdgesDelete:M,onDelete:z,onNodeDragStart:E,onNodeDrag:C,onNodeDragStop:A,onSelectionDrag:D,onSelectionDragStart:T,onSelectionDragStop:N,onMove:c,onMoveStart:d,onMoveEnd:f,noPanClassName:rr,nodeOrigin:hn,rfId:Ff,autoPanOnConnect:_t,autoPanOnNodeDrag:et,autoPanSpeed:Ht,onError:cr,connectionRadius:Ut,isValidConnection:so,selectNodesOnDrag:be,nodeDragThreshold:nu,connectionDragThreshold:OT,onBeforeDelete:V,debug:kT,ariaLabelConfig:GT,zIndexMode:bg}),(0,H.jsx)(bD,{onSelectionChange:I}),Mo,(0,H.jsx)(mD,{proOptions:oe,position:tu}),(0,H.jsx)(pD,{rfId:Ff,disableKeyboardA11y:Ge})]})})}var SE=K_(qR);function xE(e){let[t,n]=(0,P.useState)(e),o=(0,P.useCallback)(i=>n(a=>$_(i,a)),[]);return[t,n,o]}function _E(e){let[t,n]=(0,P.useState)(e),o=(0,P.useCallback)(i=>n(a=>F_(i,a)),[]);return[t,n,o]}var t8=An.error014();function ZR({dimensions:e,lineWidth:t,variant:n,className:o}){return(0,H.jsx)("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:ot(["react-flow__background-pattern",n,o])})}function jR({radius:e,className:t}){return(0,H.jsx)("circle",{cx:e,cy:e,r:e,className:ot(["react-flow__background-pattern","dots",t])})}var xo;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(xo||(xo={}));var $R={[xo.Dots]:1,[xo.Lines]:1,[xo.Cross]:6},FR=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function EE({id:e,variant:t=xo.Dots,gap:n=20,size:o,lineWidth:i=1,offset:a=0,color:l,bgColor:r,style:s,className:u,patternClassName:c}){let d=(0,P.useRef)(null),{transform:f,patternId:h}=Ae(FR,je),v=o||$R[t],b=t===xo.Dots,S=t===xo.Cross,p=Array.isArray(n)?n:[n,n],g=[p[0]*f[2]||1,p[1]*f[2]||1],m=v*f[2],y=Array.isArray(a)?a:[a,a],x=S?[m,m]:g,_=[y[0]*f[2]||1+x[0]/2,y[1]*f[2]||1+x[1]/2],E=`${h}${e||""}`;return(0,H.jsxs)("svg",{className:ot(["react-flow__background",u]),style:{...s,...Bf,"--xy-background-color-props":r,"--xy-background-pattern-color-props":l},ref:d,"data-testid":"rf__background",children:[(0,H.jsx)("pattern",{id:E,x:f[0]%g[0],y:f[1]%g[1],width:g[0],height:g[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${_[0]},-${_[1]})`,children:b?(0,H.jsx)(jR,{radius:m/2,className:c}):(0,H.jsx)(ZR,{dimensions:x,lineWidth:i,variant:t,className:c})}),(0,H.jsx)("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${E})`})]})}EE.displayName="Background";var TE=(0,P.memo)(EE);function KR(){return(0,H.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:(0,H.jsx)("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function QR(){return(0,H.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:(0,H.jsx)("path",{d:"M0 0h32v4.2H0z"})})}function WR(){return(0,H.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:(0,H.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 JR(){return(0,H.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:(0,H.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 eO(){return(0,H.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:(0,H.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 Of({children:e,className:t,...n}){return(0,H.jsx)("button",{type:"button",className:ot(["react-flow__controls-button",t]),...n,children:e})}var tO=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function NE({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:o=!0,fitViewOptions:i,onZoomIn:a,onZoomOut:l,onFitView:r,onInteractiveChange:s,className:u,children:c,position:d="bottom-left",orientation:f="vertical","aria-label":h}){let v=Qe(),{isInteractive:b,minZoomReached:S,maxZoomReached:p,ariaLabelConfig:g}=Ae(tO,je),{zoomIn:m,zoomOut:y,fitView:x}=Dh(),_=()=>{m(),a?.()},E=()=>{y(),l?.()},C=()=>{x(i),r?.()},A=()=>{v.setState({nodesDraggable:!b,nodesConnectable:!b,elementsSelectable:!b}),s?.(!b)};return(0,H.jsxs)(er,{className:ot(["react-flow__controls",f==="horizontal"?"horizontal":"vertical",u]),position:d,style:e,"data-testid":"rf__controls","aria-label":h??g["controls.ariaLabel"],children:[t&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Of,{onClick:_,className:"react-flow__controls-zoomin",title:g["controls.zoomIn.ariaLabel"],"aria-label":g["controls.zoomIn.ariaLabel"],disabled:p,children:(0,H.jsx)(KR,{})}),(0,H.jsx)(Of,{onClick:E,className:"react-flow__controls-zoomout",title:g["controls.zoomOut.ariaLabel"],"aria-label":g["controls.zoomOut.ariaLabel"],disabled:S,children:(0,H.jsx)(QR,{})})]}),n&&(0,H.jsx)(Of,{className:"react-flow__controls-fitview",onClick:C,title:g["controls.fitView.ariaLabel"],"aria-label":g["controls.fitView.ariaLabel"],children:(0,H.jsx)(WR,{})}),o&&(0,H.jsx)(Of,{className:"react-flow__controls-interactive",onClick:A,title:g["controls.interactive.ariaLabel"],"aria-label":g["controls.interactive.ariaLabel"],children:b?(0,H.jsx)(eO,{}):(0,H.jsx)(JR,{})}),c]})}NE.displayName="Controls";var n8=(0,P.memo)(NE);function nO({id:e,x:t,y:n,width:o,height:i,style:a,color:l,strokeColor:r,strokeWidth:s,className:u,borderRadius:c,shapeRendering:d,selected:f,onClick:h}){let{background:v,backgroundColor:b}=a||{},S=l||v||b;return(0,H.jsx)("rect",{className:ot(["react-flow__minimap-node",{selected:f},u]),x:t,y:n,rx:c,ry:c,width:o,height:i,style:{fill:S,stroke:r,strokeWidth:s},shapeRendering:d,onClick:h?p=>h(p,e):void 0})}var oO=(0,P.memo)(nO),iO=e=>e.nodes.map(t=>t.id),Ah=e=>e instanceof Function?e:()=>e;function aO({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:o=5,nodeStrokeWidth:i,nodeComponent:a=oO,onClick:l}){let r=Ae(iO,je),s=Ah(t),u=Ah(e),c=Ah(n),d=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return(0,H.jsx)(H.Fragment,{children:r.map(f=>(0,H.jsx)(rO,{id:f,nodeColorFunc:s,nodeStrokeColorFunc:u,nodeClassNameFunc:c,nodeBorderRadius:o,nodeStrokeWidth:i,NodeComponent:a,onClick:l,shapeRendering:d},f))})}function lO({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:o,nodeBorderRadius:i,nodeStrokeWidth:a,shapeRendering:l,NodeComponent:r,onClick:s}){let{node:u,x:c,y:d,width:f,height:h}=Ae(v=>{let b=v.nodeLookup.get(e);if(!b)return{node:void 0,x:0,y:0,width:0,height:0};let S=b.internals.userNode,{x:p,y:g}=b.internals.positionAbsolute,{width:m,height:y}=So(S);return{node:S,x:p,y:g,width:m,height:y}},je);return!u||u.hidden||!dh(u)?null:(0,H.jsx)(r,{x:c,y:d,width:f,height:h,style:u.style,selected:!!u.selected,className:o(u),color:t(u),borderRadius:i,strokeColor:n(u),strokeWidth:a,shapeRendering:l,onClick:s,id:u.id})}var rO=(0,P.memo)(lO),sO=(0,P.memo)(aO),uO=200,cO=150,fO=e=>!e.hidden,dO=e=>{let 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(jl(e.nodeLookup,{filter:fO}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},pO="react-flow__minimap-desc";function CE({style:e,className:t,nodeStrokeColor:n,nodeColor:o,nodeClassName:i="",nodeBorderRadius:a=5,nodeStrokeWidth:l,nodeComponent:r,bgColor:s,maskColor:u,maskStrokeColor:c,maskStrokeWidth:d,position:f="bottom-right",onClick:h,onNodeClick:v,pannable:b=!1,zoomable:S=!1,ariaLabel:p,inversePan:g,zoomStep:m=1,offsetScale:y=5}){let x=Qe(),_=(0,P.useRef)(null),{boundingRect:E,viewBB:C,rfId:A,panZoom:B,translateExtent:M,flowWidth:z,flowHeight:I,ariaLabelConfig:T}=Ae(dO,je),D=e?.width??uO,N=e?.height??cO,O=E.width/D,R=E.height/N,L=Math.max(O,R),V=L*D,k=L*N,G=y*L,q=E.x-(V-E.width)/2-G,Z=E.y-(k-E.height)/2-G,j=V+G*2,se=k+G*2,ee=`${pO}-${A}`,X=(0,P.useRef)(0),Q=(0,P.useRef)();X.current=L,(0,P.useEffect)(()=>{if(_.current&&B)return Q.current=Jx({domNode:_.current,panZoom:B,getTransform:()=>x.getState().transform,getViewScale:()=>X.current}),()=>{Q.current?.destroy()}},[B]),(0,P.useEffect)(()=>{Q.current?.update({translateExtent:M,width:z,height:I,inversePan:g,pannable:b,zoomStep:m,zoomable:S})},[b,S,g,m,M,z,I]);let ue=h?te=>{let[Te,de]=Q.current?.pointer(te)||[0,0];h(te,{x:Te,y:de})}:void 0,ge=v?(0,P.useCallback)((te,Te)=>{let de=x.getState().nodeLookup.get(Te).internals.userNode;v(te,de)},[]):void 0,ie=p??T["minimap.ariaLabel"];return(0,H.jsx)(er,{position:f,style:{...e,"--xy-minimap-background-color-props":typeof s=="string"?s: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*L:void 0,"--xy-minimap-node-background-color-props":typeof o=="string"?o:void 0,"--xy-minimap-node-stroke-color-props":typeof n=="string"?n:void 0,"--xy-minimap-node-stroke-width-props":typeof l=="number"?l:void 0},className:ot(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:(0,H.jsxs)("svg",{width:D,height:N,viewBox:`${q} ${Z} ${j} ${se}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":ee,ref:_,onClick:ue,children:[ie&&(0,H.jsx)("title",{id:ee,children:ie}),(0,H.jsx)(sO,{onClick:ge,nodeColor:o,nodeStrokeColor:n,nodeBorderRadius:a,nodeClassName:i,nodeStrokeWidth:l,nodeComponent:r}),(0,H.jsx)("path",{className:"react-flow__minimap-mask",d:`M${q-G},${Z-G}h${j+G*2}v${se+G*2}h${-j-G*2}z
|
|
15
|
+
M${C.x},${C.y}h${C.width}v${C.height}h${-C.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}CE.displayName="MiniMap";var o8=(0,P.memo)(CE),mO=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,hO={[Fi.Line]:"right",[Fi.Handle]:"bottom-right"};function gO({nodeId:e,position:t,variant:n=Fi.Handle,className:o,style:i=void 0,children:a,color:l,minWidth:r=10,minHeight:s=10,maxWidth:u=Number.MAX_VALUE,maxHeight:c=Number.MAX_VALUE,keepAspectRatio:d=!1,resizeDirection:f,autoScale:h=!0,shouldResize:v,onResizeStart:b,onResize:S,onResizeEnd:p}){let g=eE(),m=typeof e=="string"?e:g,y=Qe(),x=(0,P.useRef)(null),_=n===Fi.Handle,E=Ae((0,P.useCallback)(mO(_&&h),[_,h]),je),C=(0,P.useRef)(null),A=t??hO[n];(0,P.useEffect)(()=>{if(!(!x.current||!m))return C.current||(C.current=i_({domNode:x.current,nodeId:m,getStoreItems:()=>{let{nodeLookup:M,transform:z,snapGrid:I,snapToGrid:T,nodeOrigin:D,domNode:N}=y.getState();return{nodeLookup:M,transform:z,snapGrid:I,snapToGrid:T,nodeOrigin:D,paneDomNode:N}},onChange:(M,z)=>{let{triggerNodeChanges:I,nodeLookup:T,parentLookup:D,nodeOrigin:N}=y.getState(),O=[],R={x:M.x,y:M.y},L=T.get(m);if(L&&L.expandParent&&L.parentId){let V=L.origin??N,k=M.width??L.measured.width??0,G=M.height??L.measured.height??0,q={id:L.id,parentId:L.parentId,rect:{width:k,height:G,...ph({x:M.x??L.position.x,y:M.y??L.position.y},{width:k,height:G},L.parentId,T,V)}},Z=wf([q],T,D,N);O.push(...Z),R.x=M.x?Math.max(V[0]*k,M.x):void 0,R.y=M.y?Math.max(V[1]*G,M.y):void 0}if(R.x!==void 0&&R.y!==void 0){let V={id:m,type:"position",position:{...R}};O.push(V)}if(M.width!==void 0&&M.height!==void 0){let k={id:m,type:"dimensions",resizing:!0,setAttributes:f?f==="horizontal"?"width":"height":!0,dimensions:{width:M.width,height:M.height}};O.push(k)}for(let V of z){let k={...V,type:"position"};O.push(k)}I(O)},onEnd:({width:M,height:z})=>{let I={id:m,type:"dimensions",resizing:!1,dimensions:{width:M,height:z}};y.getState().triggerNodeChanges([I])}})),C.current.update({controlPosition:A,boundaries:{minWidth:r,minHeight:s,maxWidth:u,maxHeight:c},keepAspectRatio:d,resizeDirection:f,onResizeStart:b,onResize:S,onResizeEnd:p,shouldResize:v}),()=>{C.current?.destroy()}},[A,r,s,u,c,d,b,S,p,v]);let B=A.split("-");return(0,H.jsx)("div",{className:ot(["react-flow__resize-control","nodrag",...B,n,o]),ref:x,style:{...i,scale:E,...l&&{[_?"backgroundColor":"borderColor"]:l}},children:a})}var i8=(0,P.memo)(gO);var Oh=ne(At(),1);var wE="(prefers-color-scheme: dark)";function yO(e){return e?ga.DARK:ga.LIGHT}function zh(){return typeof window>"u"||typeof window.matchMedia!="function"?ga.DARK:yO(window.matchMedia(wE).matches)}function vO(e){if(typeof window>"u"||typeof window.matchMedia!="function")return()=>{};let t=window.matchMedia(wE);return typeof t.addEventListener=="function"?(t.addEventListener("change",e),()=>t.removeEventListener("change",e)):(t.addListener(e),()=>t.removeListener(e))}function bO(e){return e!==void 0?{subscribe:()=>()=>{},getSnapshot:()=>e,getServerSnapshot:()=>e}:{subscribe:vO,getSnapshot:zh,getServerSnapshot:()=>ga.DARK}}function AE(e){let t=Oh.default.useMemo(()=>bO(e),[e]);return Oh.default.useSyncExternalStore(t.subscribe,t.getSnapshot,t.getServerSnapshot)}function ME(e){if(!e)return null;let t={},n={},o={},i={},a=new Set;for(let r of e.edges)r.kind==="contains"&&(i[r.source]||(i[r.source]=[]),i[r.source].push(r.target),a.add(r.target));let l=new Set(Object.keys(i));for(let r of e.nodes){let s=r.io,u=l.has(r.id);for(let c of s.outputs)c.digest&&!t[c.digest]&&(t[c.digest]={name:c.name,concept:c.concept,contentType:c.content_type}),c.digest&&!u&&(n[c.digest]=r.id);for(let c of s.inputs)c.digest&&!t[c.digest]&&(t[c.digest]={name:c.name,concept:c.concept,contentType:c.content_type}),c.digest&&!u&&(o[c.digest]||(o[c.digest]=[]),o[c.digest].push(r.id))}return{stuffRegistry:t,stuffProducers:n,stuffConsumers:o,controllerNodeIds:l,childNodeIds:a,containmentTree:i}}function _o(e,t){let n={};for(let[l,r]of Object.entries(t.containmentTree))for(let s of r)n[s]=l;for(let[l,r]of Object.entries(t.stuffProducers)){let s="stuff_"+l,u=n[r];u&&(n[s]=u)}for(let l of e.nodes){if(!t.controllerNodeIds.has(l.id))continue;let r=n[l.id];if(r)for(let s of l.io.outputs){if(!s.digest)continue;let u="stuff_"+s.digest;n[u]||(n[u]=r)}}for(let l of e.edges)if(l.kind==="batch_item"&&l.target_stuff_digest){let r="stuff_"+l.target_stuff_digest;t.controllerNodeIds.has(l.source)&&(n[r]=l.source)}let o=new Set;for(let l of e.edges)(l.kind==="batch_item"||l.kind==="batch_aggregate"||l.kind==="parallel_combine")&&(l.source_stuff_digest&&o.add(l.source_stuff_digest),l.target_stuff_digest&&o.add(l.target_stuff_digest));let i="stuff_",a=Object.keys(n).filter(l=>l.startsWith(i));for(let l of a){let r=l.slice(i.length),s=n[l];if(!s)continue;let u=t.stuffConsumers[r]||[];if(u.length===0){o.has(r)||delete n[l];continue}for(;s;){let c=s;if(u.some(h=>SO(h,c,n)))break;let f=n[s];f?(n[l]=f,s=f):(delete n[l],s=void 0)}}return n}function SO(e,t,n){let o=n[e];for(;o;){if(o===t)return!0;o=n[o]}return!1}function DE(e,t){return e.pipe_registry?.[t]}function Lh(e,t){if(!e.concept_registry)return;let n=e.concept_registry[t];if(n)return n;for(let o of Object.values(e.concept_registry))if(o.code===t)return o}function RE(e){return!e||typeof e!="string"?!1:e.startsWith("https://")||e.startsWith("http://")||e.startsWith("file://")||e.startsWith("/")}function Pf(e){return!e||typeof e!="string"?!1:e.startsWith("https://")||e.startsWith("http://")||e.startsWith("file://")||e.startsWith("/")}function OE(e){if(!e)return null;if(typeof e=="string")return RE(e)?e:null;if(typeof e!="object")return null;let t=e,n=[t.public_url,t.src,t.href,t.uri,t.url];for(let o of n)if(RE(o))return o;return null}function zE(e){if(!e)return null;if(typeof e=="string")return Pf(e)?e:null;if(typeof e!="object")return null;let t=e,n=[t.public_url,t.src,t.href,t.uri,t.url];for(let o of n)if(Pf(o))return o;return null}function LE(e){if(!e)return null;if(typeof e=="string")return e.startsWith("pipelex-storage://")?e:null;if(typeof e!="object")return null;let t=e,n=[t.uri,t.url,t.src,t.href];for(let o of n)if(typeof o=="string"&&o.startsWith("pipelex-storage://"))return o;return null}function BE(e){let t=i=>{let a=i.inner_html;return typeof a=="string"&&a.trim()!==""?a:null};if(!e||typeof e!="object"||Array.isArray(e))return null;let n=e,o=t(n);if(o!=null)return o;for(let i of Object.values(n))if(i&&typeof i=="object"&&!Array.isArray(i)){let a=t(i);if(a!=null)return a}return null}function Bh(e){if(!e||typeof e!="object")return null;let t=e;return typeof t.filename=="string"&&t.filename?t.filename:null}function HE(e,t,n){if(t&&t.includes("/"))return t;if(e&&typeof e=="object"){let i=e;if(typeof i.mime_type=="string"&&i.mime_type)return i.mime_type}let o=Bh(e)||n||(typeof e=="string"?e:null);if(o){let a=o.match(/\.([a-zA-Z0-9]+)(?:\?|#|$)/)?.[1]?.toLowerCase();if(a){if(a==="pdf")return"application/pdf";if(["png","jpg","jpeg","gif","webp","svg","bmp"].includes(a))return`image/${a==="jpg"?"jpeg":a==="svg"?"svg+xml":a}`}}return null}function PE(e){return e==="application/pdf"?"PDF":e?.startsWith("image/")?"Image":"HTML"}function Hh(e,t){for(let n of e.nodes)for(let o of n.io?.outputs??[])if(o.digest===t)return{digest:t,name:o.name,concept:o.concept,contentType:o.content_type,data:o.data,dataText:o.data_text,dataHtml:o.data_html};for(let n of e.nodes)for(let o of n.io?.inputs??[])if(o.digest===t)return{digest:t,name:o.name,concept:o.concept,contentType:o.content_type,data:o.data,dataText:o.data_text,dataHtml:o.data_html};return null}var fn=ne(At(),1);var{entries:ZE,setPrototypeOf:kE,isFrozen:xO,getPrototypeOf:_O,getOwnPropertyDescriptor:EO}=Object,{freeze:$t,seal:jn,create:$s}=Object,{apply:Yh,construct:Xh}=typeof Reflect<"u"&&Reflect;$t||($t=function(t){return t});jn||(jn=function(t){return t});Yh||(Yh=function(t,n){for(var o=arguments.length,i=new Array(o>2?o-2:0),a=2;a<o;a++)i[a-2]=arguments[a];return t.apply(n,i)});Xh||(Xh=function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return new t(...o)});var Ys=Ft(Array.prototype.forEach),TO=Ft(Array.prototype.lastIndexOf),GE=Ft(Array.prototype.pop),Xs=Ft(Array.prototype.push),NO=Ft(Array.prototype.splice),Gf=Ft(String.prototype.toLowerCase),Ph=Ft(String.prototype.toString),kh=Ft(String.prototype.match),tr=Ft(String.prototype.replace),CO=Ft(String.prototype.indexOf),wO=Ft(String.prototype.trim),lo=Ft(Object.prototype.hasOwnProperty),jt=Ft(RegExp.prototype.test),qs=AO(TypeError);function Ft(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return Yh(e,t,o)}}function AO(e){return function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Xh(e,n)}}function Se(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Gf;kE&&kE(e,null);let o=t.length;for(;o--;){let i=t[o];if(typeof i=="string"){let a=n(i);a!==i&&(xO(t)||(t[o]=a),i=a)}e[i]=!0}return e}function MO(e){for(let t=0;t<e.length;t++)lo(e,t)||(e[t]=null);return e}function Eo(e){let t=$s(null);for(let[n,o]of ZE(e))lo(e,n)&&(Array.isArray(o)?t[n]=MO(o):o&&typeof o=="object"&&o.constructor===Object?t[n]=Eo(o):t[n]=o);return t}function Zs(e,t){for(;e!==null;){let o=EO(e,t);if(o){if(o.get)return Ft(o.get);if(typeof o.value=="function")return Ft(o.value)}e=_O(e)}function n(){return null}return n}var UE=$t(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Gh=$t(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Uh=$t(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),DO=$t(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Ih=$t(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),RO=$t(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),IE=$t(["#text"]),VE=$t(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Vh=$t(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),YE=$t(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),kf=$t(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),OO=jn(/\{\{[\w\W]*|[\w\W]*\}\}/gm),zO=jn(/<%[\w\W]*|[\w\W]*%>/gm),LO=jn(/\$\{[\w\W]*/gm),BO=jn(/^data-[\-\w.\u00B7-\uFFFF]+$/),HO=jn(/^aria-[\-\w]+$/),jE=jn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),PO=jn(/^(?:\w+script|data):/i),kO=jn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),$E=jn(/^html$/i),GO=jn(/^[a-z][.\w]*(-[.\w]+)+$/i),XE=Object.freeze({__proto__:null,ARIA_ATTR:HO,ATTR_WHITESPACE:kO,CUSTOM_ELEMENT:GO,DATA_ATTR:BO,DOCTYPE_NAME:$E,ERB_EXPR:zO,IS_ALLOWED_URI:jE,IS_SCRIPT_OR_DATA:PO,MUSTACHE_EXPR:OO,TMPLIT_EXPR:LO}),js={element:1,text:3,progressingInstruction:7,comment:8,document:9},UO=function(){return typeof window>"u"?null:window},IO=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let o=null,i="data-tt-policy-suffix";n&&n.hasAttribute(i)&&(o=n.getAttribute(i));let a="dompurify"+(o?"#"+o:"");try{return t.createPolicy(a,{createHTML(l){return l},createScriptURL(l){return l}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},qE=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function FE(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:UO(),t=oe=>FE(oe);if(t.version="3.4.0",t.removed=[],!e||!e.document||e.document.nodeType!==js.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e,o=n,i=o.currentScript,{DocumentFragment:a,HTMLTemplateElement:l,Node:r,Element:s,NodeFilter:u,NamedNodeMap:c=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:d,DOMParser:f,trustedTypes:h}=e,v=s.prototype,b=Zs(v,"cloneNode"),S=Zs(v,"remove"),p=Zs(v,"nextSibling"),g=Zs(v,"childNodes"),m=Zs(v,"parentNode");if(typeof l=="function"){let oe=n.createElement("template");oe.content&&oe.content.ownerDocument&&(n=oe.content.ownerDocument)}let y,x="",{implementation:_,createNodeIterator:E,createDocumentFragment:C,getElementsByTagName:A}=n,{importNode:B}=o,M=qE();t.isSupported=typeof ZE=="function"&&typeof m=="function"&&_&&_.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:z,ERB_EXPR:I,TMPLIT_EXPR:T,DATA_ATTR:D,ARIA_ATTR:N,IS_SCRIPT_OR_DATA:O,ATTR_WHITESPACE:R,CUSTOM_ELEMENT:L}=XE,{IS_ALLOWED_URI:V}=XE,k=null,G=Se({},[...UE,...Gh,...Uh,...Ih,...IE]),q=null,Z=Se({},[...VE,...Vh,...YE,...kf]),j=Object.seal($s(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),se=null,ee=null,X=Object.seal($s(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Q=!0,ue=!0,ge=!1,ie=!0,te=!1,Te=!0,de=!1,be=!1,Le=!1,Be=!1,dt=!1,Gt=!1,hn=!0,rt=!1,Rn="user-content-",Wt=!0,Jt=!1,St={},$e=null,ro=Se({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),ri=null,$n=Se({},["audio","video","img","source","image","track"]),si=null,Fn=Se({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),On="http://www.w3.org/1998/Math/MathML",No="http://www.w3.org/2000/svg",pt="http://www.w3.org/1999/xhtml",Kn=pt,Qn=!1,Co=null,wo=Se({},[On,No,pt],Ph),ui=Se({},["mi","mo","mn","ms","mtext"]),ci=Se({},["annotation-xml"]),ka=Se({},["title","style","font","a","script"]),Ao=null,Ga=["application/xhtml+xml","text/html"],Ua="text/html",We=null,Mo=null,Do=n.createElement("form"),Ro=function(w){return w instanceof RegExp||w instanceof Function},me=function(){let w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Mo&&Mo===w)){if((!w||typeof w!="object")&&(w={}),w=Eo(w),Ao=Ga.indexOf(w.PARSER_MEDIA_TYPE)===-1?Ua:w.PARSER_MEDIA_TYPE,We=Ao==="application/xhtml+xml"?Ph:Gf,k=lo(w,"ALLOWED_TAGS")?Se({},w.ALLOWED_TAGS,We):G,q=lo(w,"ALLOWED_ATTR")?Se({},w.ALLOWED_ATTR,We):Z,Co=lo(w,"ALLOWED_NAMESPACES")?Se({},w.ALLOWED_NAMESPACES,Ph):wo,si=lo(w,"ADD_URI_SAFE_ATTR")?Se(Eo(Fn),w.ADD_URI_SAFE_ATTR,We):Fn,ri=lo(w,"ADD_DATA_URI_TAGS")?Se(Eo($n),w.ADD_DATA_URI_TAGS,We):$n,$e=lo(w,"FORBID_CONTENTS")?Se({},w.FORBID_CONTENTS,We):ro,se=lo(w,"FORBID_TAGS")?Se({},w.FORBID_TAGS,We):Eo({}),ee=lo(w,"FORBID_ATTR")?Se({},w.FORBID_ATTR,We):Eo({}),St=lo(w,"USE_PROFILES")?w.USE_PROFILES:!1,Q=w.ALLOW_ARIA_ATTR!==!1,ue=w.ALLOW_DATA_ATTR!==!1,ge=w.ALLOW_UNKNOWN_PROTOCOLS||!1,ie=w.ALLOW_SELF_CLOSE_IN_ATTR!==!1,te=w.SAFE_FOR_TEMPLATES||!1,Te=w.SAFE_FOR_XML!==!1,de=w.WHOLE_DOCUMENT||!1,Be=w.RETURN_DOM||!1,dt=w.RETURN_DOM_FRAGMENT||!1,Gt=w.RETURN_TRUSTED_TYPE||!1,Le=w.FORCE_BODY||!1,hn=w.SANITIZE_DOM!==!1,rt=w.SANITIZE_NAMED_PROPS||!1,Wt=w.KEEP_CONTENT!==!1,Jt=w.IN_PLACE||!1,V=w.ALLOWED_URI_REGEXP||jE,Kn=w.NAMESPACE||pt,ui=w.MATHML_TEXT_INTEGRATION_POINTS||ui,ci=w.HTML_INTEGRATION_POINTS||ci,j=w.CUSTOM_ELEMENT_HANDLING||$s(null),w.CUSTOM_ELEMENT_HANDLING&&Ro(w.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(j.tagNameCheck=w.CUSTOM_ELEMENT_HANDLING.tagNameCheck),w.CUSTOM_ELEMENT_HANDLING&&Ro(w.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(j.attributeNameCheck=w.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),w.CUSTOM_ELEMENT_HANDLING&&typeof w.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(j.allowCustomizedBuiltInElements=w.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),te&&(ue=!1),dt&&(Be=!0),St&&(k=Se({},IE),q=$s(null),St.html===!0&&(Se(k,UE),Se(q,VE)),St.svg===!0&&(Se(k,Gh),Se(q,Vh),Se(q,kf)),St.svgFilters===!0&&(Se(k,Uh),Se(q,Vh),Se(q,kf)),St.mathMl===!0&&(Se(k,Ih),Se(q,YE),Se(q,kf))),X.tagCheck=null,X.attributeCheck=null,w.ADD_TAGS&&(typeof w.ADD_TAGS=="function"?X.tagCheck=w.ADD_TAGS:(k===G&&(k=Eo(k)),Se(k,w.ADD_TAGS,We))),w.ADD_ATTR&&(typeof w.ADD_ATTR=="function"?X.attributeCheck=w.ADD_ATTR:(q===Z&&(q=Eo(q)),Se(q,w.ADD_ATTR,We))),w.ADD_URI_SAFE_ATTR&&Se(si,w.ADD_URI_SAFE_ATTR,We),w.FORBID_CONTENTS&&($e===ro&&($e=Eo($e)),Se($e,w.FORBID_CONTENTS,We)),w.ADD_FORBID_CONTENTS&&($e===ro&&($e=Eo($e)),Se($e,w.ADD_FORBID_CONTENTS,We)),Wt&&(k["#text"]=!0),de&&Se(k,["html","head","body"]),k.table&&(Se(k,["tbody"]),delete se.tbody),w.TRUSTED_TYPES_POLICY){if(typeof w.TRUSTED_TYPES_POLICY.createHTML!="function")throw qs('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof w.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw qs('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');y=w.TRUSTED_TYPES_POLICY,x=y.createHTML("")}else y===void 0&&(y=IO(h,i)),y!==null&&typeof x=="string"&&(x=y.createHTML(""));$t&&$t(w),Mo=w}},re=Se({},[...Gh,...Uh,...DO]),ae=Se({},[...Ih,...RO]),we=function(w){let Y=m(w);(!Y||!Y.tagName)&&(Y={namespaceURI:Kn,tagName:"template"});let F=Gf(w.tagName),Ge=Gf(Y.tagName);return Co[w.namespaceURI]?w.namespaceURI===No?Y.namespaceURI===pt?F==="svg":Y.namespaceURI===On?F==="svg"&&(Ge==="annotation-xml"||ui[Ge]):!!re[F]:w.namespaceURI===On?Y.namespaceURI===pt?F==="math":Y.namespaceURI===No?F==="math"&&ci[Ge]:!!ae[F]:w.namespaceURI===pt?Y.namespaceURI===No&&!ci[Ge]||Y.namespaceURI===On&&!ui[Ge]?!1:!ae[F]&&(ka[F]||!re[F]):!!(Ao==="application/xhtml+xml"&&Co[w.namespaceURI]):!1},ye=function(w){Xs(t.removed,{element:w});try{m(w).removeChild(w)}catch{S(w)}},He=function(w,Y){try{Xs(t.removed,{attribute:Y.getAttributeNode(w),from:Y})}catch{Xs(t.removed,{attribute:null,from:Y})}if(Y.removeAttribute(w),w==="is")if(Be||dt)try{ye(Y)}catch{}else try{Y.setAttribute(w,"")}catch{}},wt=function(w){let Y=null,F=null;if(Le)w="<remove></remove>"+w;else{let et=kh(w,/^[\r\n\t ]+/);F=et&&et[0]}Ao==="application/xhtml+xml"&&Kn===pt&&(w='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+w+"</body></html>");let Ge=y?y.createHTML(w):w;if(Kn===pt)try{Y=new f().parseFromString(Ge,Ao)}catch{}if(!Y||!Y.documentElement){Y=_.createDocument(Kn,"template",null);try{Y.documentElement.innerHTML=Qn?x:Ge}catch{}}let _t=Y.body||Y.documentElement;return w&&F&&_t.insertBefore(n.createTextNode(F),_t.childNodes[0]||null),Kn===pt?A.call(Y,de?"html":"body")[0]:de?Y.documentElement:_t},Wn=function(w){return E.call(w.ownerDocument||w,w,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},zn=function(w){return w instanceof d&&(typeof w.nodeName!="string"||typeof w.textContent!="string"||typeof w.removeChild!="function"||!(w.attributes instanceof c)||typeof w.removeAttribute!="function"||typeof w.setAttribute!="function"||typeof w.namespaceURI!="string"||typeof w.insertBefore!="function"||typeof w.hasChildNodes!="function")},fi=function(w){return typeof r=="function"&&w instanceof r};function xt(oe,w,Y){Ys(oe,F=>{F.call(t,w,Y,Mo)})}let rr=function(w){let Y=null;if(xt(M.beforeSanitizeElements,w,null),zn(w))return ye(w),!0;let F=We(w.nodeName);if(xt(M.uponSanitizeElement,w,{tagName:F,allowedTags:k}),Te&&w.hasChildNodes()&&!fi(w.firstElementChild)&&jt(/<[/\w!]/g,w.innerHTML)&&jt(/<[/\w!]/g,w.textContent)||Te&&w.namespaceURI===pt&&F==="style"&&fi(w.firstElementChild)||w.nodeType===js.progressingInstruction||Te&&w.nodeType===js.comment&&jt(/<[/\w]/g,w.data))return ye(w),!0;if(se[F]||!(X.tagCheck instanceof Function&&X.tagCheck(F))&&!k[F]){if(!se[F]&&ur(F)&&(j.tagNameCheck instanceof RegExp&&jt(j.tagNameCheck,F)||j.tagNameCheck instanceof Function&&j.tagNameCheck(F)))return!1;if(Wt&&!$e[F]){let Ge=m(w)||w.parentNode,_t=g(w)||w.childNodes;if(_t&&Ge){let et=_t.length;for(let Ht=et-1;Ht>=0;--Ht){let Ut=b(_t[Ht],!0);Ut.__removalCount=(w.__removalCount||0)+1,Ge.insertBefore(Ut,p(w))}}}return ye(w),!0}return w instanceof s&&!we(w)||(F==="noscript"||F==="noembed"||F==="noframes")&&jt(/<\/no(script|embed|frames)/i,w.innerHTML)?(ye(w),!0):(te&&w.nodeType===js.text&&(Y=w.textContent,Ys([z,I,T],Ge=>{Y=tr(Y,Ge," ")}),w.textContent!==Y&&(Xs(t.removed,{element:w.cloneNode()}),w.textContent=Y)),xt(M.afterSanitizeElements,w,null),!1)},sr=function(w,Y,F){if(ee[Y]||hn&&(Y==="id"||Y==="name")&&(F in n||F in Do))return!1;if(!(ue&&!ee[Y]&&jt(D,Y))){if(!(Q&&jt(N,Y))){if(!(X.attributeCheck instanceof Function&&X.attributeCheck(Y,w))){if(!q[Y]||ee[Y]){if(!(ur(w)&&(j.tagNameCheck instanceof RegExp&&jt(j.tagNameCheck,w)||j.tagNameCheck instanceof Function&&j.tagNameCheck(w))&&(j.attributeNameCheck instanceof RegExp&&jt(j.attributeNameCheck,Y)||j.attributeNameCheck instanceof Function&&j.attributeNameCheck(Y,w))||Y==="is"&&j.allowCustomizedBuiltInElements&&(j.tagNameCheck instanceof RegExp&&jt(j.tagNameCheck,F)||j.tagNameCheck instanceof Function&&j.tagNameCheck(F))))return!1}else if(!si[Y]){if(!jt(V,tr(F,R,""))){if(!((Y==="src"||Y==="xlink:href"||Y==="href")&&w!=="script"&&CO(F,"data:")===0&&ri[w])){if(!(ge&&!jt(O,tr(F,R,"")))){if(F)return!1}}}}}}}return!0},ur=function(w){return w!=="annotation-xml"&&kh(w,L)},eu=function(w){xt(M.beforeSanitizeAttributes,w,null);let{attributes:Y}=w;if(!Y||zn(w))return;let F={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:q,forceKeepAttr:void 0},Ge=Y.length;for(;Ge--;){let _t=Y[Ge],{name:et,namespaceURI:Ht,value:Ut}=_t,so=We(et),cr=Ut,mt=et==="value"?cr:wO(cr);if(F.attrName=so,F.attrValue=mt,F.keepAttr=!0,F.forceKeepAttr=void 0,xt(M.uponSanitizeAttribute,w,F),mt=F.attrValue,rt&&(so==="id"||so==="name")&&(He(et,w),mt=Rn+mt),Te&&jt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,mt)){He(et,w);continue}if(so==="attributename"&&kh(mt,"href")){He(et,w);continue}if(F.forceKeepAttr)continue;if(!F.keepAttr){He(et,w);continue}if(!ie&&jt(/\/>/i,mt)){He(et,w);continue}te&&Ys([z,I,T],nu=>{mt=tr(mt,nu," ")});let fr=We(w.nodeName);if(!sr(fr,so,mt)){He(et,w);continue}if(y&&typeof h=="object"&&typeof h.getAttributeType=="function"&&!Ht)switch(h.getAttributeType(fr,so)){case"TrustedHTML":{mt=y.createHTML(mt);break}case"TrustedScriptURL":{mt=y.createScriptURL(mt);break}}if(mt!==cr)try{Ht?w.setAttributeNS(Ht,et,mt):w.setAttribute(et,mt),zn(w)?ye(w):GE(t.removed)}catch{He(et,w)}}xt(M.afterSanitizeAttributes,w,null)},tu=function(w){let Y=null,F=Wn(w);for(xt(M.beforeSanitizeShadowDOM,w,null);Y=F.nextNode();)xt(M.uponSanitizeShadowNode,Y,null),rr(Y),eu(Y),Y.content instanceof a&&tu(Y.content);xt(M.afterSanitizeShadowDOM,w,null)};return t.sanitize=function(oe){let w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Y=null,F=null,Ge=null,_t=null;if(Qn=!oe,Qn&&(oe="<!-->"),typeof oe!="string"&&!fi(oe))if(typeof oe.toString=="function"){if(oe=oe.toString(),typeof oe!="string")throw qs("dirty is not a string, aborting")}else throw qs("toString is not a function");if(!t.isSupported)return oe;if(be||me(w),t.removed=[],typeof oe=="string"&&(Jt=!1),Jt){if(oe.nodeName){let Ut=We(oe.nodeName);if(!k[Ut]||se[Ut])throw qs("root node is forbidden and cannot be sanitized in-place")}}else if(oe instanceof r)Y=wt("<!---->"),F=Y.ownerDocument.importNode(oe,!0),F.nodeType===js.element&&F.nodeName==="BODY"||F.nodeName==="HTML"?Y=F:Y.appendChild(F);else{if(!Be&&!te&&!de&&oe.indexOf("<")===-1)return y&&Gt?y.createHTML(oe):oe;if(Y=wt(oe),!Y)return Be?null:Gt?x:""}Y&&Le&&ye(Y.firstChild);let et=Wn(Jt?oe:Y);for(;Ge=et.nextNode();)rr(Ge),eu(Ge),Ge.content instanceof a&&tu(Ge.content);if(Jt)return oe;if(Be){if(te){Y.normalize();let Ut=Y.innerHTML;Ys([z,I,T],so=>{Ut=tr(Ut,so," ")}),Y.innerHTML=Ut}if(dt)for(_t=C.call(Y.ownerDocument);Y.firstChild;)_t.appendChild(Y.firstChild);else _t=Y;return(q.shadowroot||q.shadowrootmode)&&(_t=B.call(o,_t,!0)),_t}let Ht=de?Y.outerHTML:Y.innerHTML;return de&&k["!doctype"]&&Y.ownerDocument&&Y.ownerDocument.doctype&&Y.ownerDocument.doctype.name&&jt($E,Y.ownerDocument.doctype.name)&&(Ht="<!DOCTYPE "+Y.ownerDocument.doctype.name+`>
|
|
16
|
+
`+Ht),te&&Ys([z,I,T],Ut=>{Ht=tr(Ht,Ut," ")}),y&&Gt?y.createHTML(Ht):Ht},t.setConfig=function(){let oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};me(oe),be=!0},t.clearConfig=function(){Mo=null,be=!1},t.isValidAttribute=function(oe,w,Y){Mo||me({});let F=We(oe),Ge=We(w);return sr(F,Ge,Y)},t.addHook=function(oe,w){typeof w=="function"&&Xs(M[oe],w)},t.removeHook=function(oe,w){if(w!==void 0){let Y=TO(M[oe],w);return Y===-1?void 0:NO(M[oe],Y,1)[0]}return GE(M[oe])},t.removeHooks=function(oe){M[oe]=[]},t.removeAllHooks=function(){M=qE()},t}var qh=FE();var le=ne(pe(),1),VO=(0,le.jsx)("svg",{viewBox:"0 0 24 24",children:(0,le.jsx)("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"})}),YO=(0,le.jsx)("svg",{viewBox:"0 0 24 24",children:(0,le.jsx)("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})}),XO=(0,le.jsx)("svg",{viewBox:"0 0 24 24",children:(0,le.jsx)("path",{d:"M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"})}),qO=(0,le.jsx)("svg",{viewBox:"0 0 24 24",children:(0,le.jsx)("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"})}),KE=(0,le.jsx)("svg",{viewBox:"0 0 24 24",children:(0,le.jsx)("path",{d:"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z"})});function Uf(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function Zh(e,t,n){let o=new Blob([e],{type:n}),i=URL.createObjectURL(o),a=document.createElement("a");a.href=i,a.download=t,a.click(),setTimeout(()=>URL.revokeObjectURL(i),1e4)}function QE(e,t){let n=document.createElement("a");n.href=e,n.download=t,n.target="_blank",n.click()}function If({stuff:e,className:t,resolveStorageUrl:n,canEmbedPdf:o,onOpenExternally:i}){let[a,l]=fn.default.useState("html"),[r,s]=fn.default.useState(!1),u=fn.default.useRef(null),c=fn.default.useMemo(()=>zE(e.data),[e.data]),d=fn.default.useMemo(()=>OE(e.data),[e.data]),f=fn.default.useMemo(()=>LE(e.data),[e.data]),h=fn.default.useMemo(()=>Bh(e.data),[e.data]),v=fn.default.useMemo(()=>BE(e.data),[e.data]),[b,S]=fn.default.useState(null);fn.default.useEffect(()=>{if(S(null),!f||!n||c)return;let N=!1;return n(f).then(O=>{N||S(Pf(O)?O:null)}).catch(()=>{N||S(null)}),()=>{N=!0}},[f,n,c]);let p=c??b,g=d??b,m=fn.default.useMemo(()=>HE(e.data,e.contentType,g??f),[e.data,e.contentType,g,f]),y=m==="application/pdf",x=m?.startsWith("image/")??!1,_=PE(m??e.contentType),{jsonString:E,jsonError:C}=fn.default.useMemo(()=>{if(e.data==null)return{jsonString:null,jsonError:null};try{return{jsonString:JSON.stringify(e.data,null,2),jsonError:null}}catch(N){return{jsonString:null,jsonError:N instanceof Error?N.message:String(N)}}},[e.data]);fn.default.useEffect(()=>{a!=="html"||!u.current||u.current.querySelectorAll("a").forEach(N=>{N.setAttribute("target","_blank"),N.setAttribute("rel","noopener noreferrer")})},[a,e.dataHtml]);function A(N){let O=h||e.name;return(0,le.jsxs)("div",{className:"stuff-viewer-local-file",children:[(0,le.jsx)("div",{className:"stuff-viewer-local-file-icon",children:KE}),(0,le.jsxs)("div",{className:"stuff-viewer-local-file-info",children:[O&&(0,le.jsx)("div",{className:"stuff-viewer-local-file-name",children:O}),(0,le.jsxs)("div",{className:"stuff-viewer-local-file-hint",children:[N," \u2014 no preview available"]})]})]})}function B(N){return(0,le.jsxs)("div",{className:"stuff-viewer-error",role:"alert",children:[(0,le.jsx)("div",{className:"stuff-viewer-error-title",children:"Unable to serialize data"}),(0,le.jsx)("div",{className:"stuff-viewer-error-detail",children:N})]})}function M(){if(a==="html"){if(y){if(o!==!1&&p){let O=p.includes("#")?p:`${p}#pagemode=none`;return(0,le.jsx)("div",{className:"stuff-viewer-pdf",children:(0,le.jsx)("embed",{src:O,type:"application/pdf"})})}if(g){let O=h||e.name;return(0,le.jsxs)("button",{type:"button",className:"stuff-viewer-local-file stuff-viewer-local-file--button",onClick:T,children:[(0,le.jsx)("div",{className:"stuff-viewer-local-file-icon",children:KE}),(0,le.jsxs)("div",{className:"stuff-viewer-local-file-info",children:[O&&(0,le.jsx)("div",{className:"stuff-viewer-local-file-name",children:O}),(0,le.jsx)("div",{className:"stuff-viewer-local-file-hint",children:"Click to open PDF externally"})]})]})}return A("PDF")}return x?p?(0,le.jsx)("div",{className:"stuff-viewer-image",children:(0,le.jsx)("img",{src:p,alt:e.name??"(unnamed stuff)"})}):A("Image"):v!=null?(0,le.jsx)("iframe",{className:"stuff-viewer-html-frame",title:e.name?`${e.name} preview`:"HTML preview",sandbox:"",srcDoc:qh.sanitize(v,{WHOLE_DOCUMENT:!0})}):e.dataHtml?(0,le.jsx)("div",{className:"stuff-viewer-html",dangerouslySetInnerHTML:{__html:qh.sanitize(e.dataHtml)}}):E?(0,le.jsx)("pre",{className:"stuff-viewer-pre",dangerouslySetInnerHTML:{__html:Uf(E)}}):C?B(C):(0,le.jsx)("div",{className:"stuff-viewer-placeholder",children:"No content available"})}return a==="json"?E?(0,le.jsx)("pre",{className:"stuff-viewer-pre",dangerouslySetInnerHTML:{__html:Uf(E)}}):C?B(C):(0,le.jsx)("div",{className:"stuff-viewer-placeholder",children:"No JSON data available"}):e.dataText?(0,le.jsx)("pre",{className:"stuff-viewer-pre stuff-viewer-pre--nowrap",dangerouslySetInnerHTML:{__html:Uf(e.dataText)}}):E?(0,le.jsx)("pre",{className:"stuff-viewer-pre",dangerouslySetInnerHTML:{__html:Uf(E)}}):C?B(C):(0,le.jsx)("div",{className:"stuff-viewer-placeholder",children:"No text data available"})}function z(){let N;a==="json"?N=E||"":a==="text"?N=e.dataText||E||"":N=v||e.dataText||e.dataHtml||E||"",N&&navigator.clipboard&&navigator.clipboard.writeText(N).then(()=>{s(!0),setTimeout(()=>s(!1),1500)}).catch(()=>{})}function I(){if(x&&g){let N=m?.split("/")[1]||"png";QE(g,`${e.name||"stuff"}.${N}`);return}if(y&&g){QE(g,`${e.name||"stuff"}.pdf`);return}a==="json"?Zh(E||"{}",`${e.name||"stuff"}.json`,"application/json"):a==="text"?Zh(e.dataText||E||"",`${e.name||"stuff"}.txt`,"text/plain"):Zh(v||e.dataHtml||E||"",`${e.name||"stuff"}.html`,"text/html")}function T(){if(g){if(i){i(g,h??void 0);return}window.open(g,"_blank","noopener,noreferrer")}}let D=["stuff-viewer",t].filter(Boolean).join(" ");return(0,le.jsxs)("div",{className:D,children:[(0,le.jsxs)("div",{className:"stuff-viewer-header",children:[(0,le.jsx)("h3",{className:"stuff-viewer-title",children:e.name??"(unnamed stuff)"}),e.concept&&(0,le.jsx)("p",{className:"stuff-viewer-subtitle",children:e.concept})]}),(0,le.jsxs)("div",{className:"stuff-viewer-toolbar",children:[(0,le.jsx)("div",{className:"stuff-viewer-tabs",children:["html","json","text"].map(N=>(0,le.jsx)("button",{type:"button",className:`stuff-viewer-tab${a===N?" stuff-viewer-tab--active":""}`,onClick:()=>l(N),children:N==="html"?_:N==="json"?"JSON":"Pretty"},N))}),(0,le.jsxs)("div",{className:"stuff-viewer-actions",children:[g&&(0,le.jsx)("button",{type:"button",className:"stuff-viewer-action-btn",onClick:T,title:"Open in new window","aria-label":"Open in new window",children:qO}),(0,le.jsx)("button",{type:"button",className:`stuff-viewer-action-btn${r?" stuff-viewer-action-btn--copied":""}`,onClick:z,title:"Copy","aria-label":"Copy",children:r?YO:VO}),(0,le.jsx)("button",{type:"button",className:"stuff-viewer-action-btn",onClick:I,title:"Download","aria-label":"Download",children:XO})]})]}),(0,le.jsx)("div",{className:"stuff-viewer-content",ref:u,children:M()})]})}var WE=ne(At(),1);var za=ne(pe(),1);function JE({isOpen:e,onClose:t,children:n,width:o,isDragging:i,onResizeHandleMouseDown:a,closeOnEscape:l=!0}){WE.default.useEffect(()=>{if(!e||!l)return;let s=u=>{u.key==="Escape"&&t()};return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[e,l,t]);let r=["detail-panel",!e&&"detail-panel--closed",i&&"detail-panel--dragging"].filter(Boolean).join(" ");return(0,za.jsxs)("div",{className:r,style:o?{width:`${o}px`}:void 0,children:[a&&(0,za.jsx)("div",{className:"detail-panel-resize-handle",onMouseDown:a,role:"separator","aria-orientation":"vertical","aria-label":"Resize panel"}),(0,za.jsxs)("div",{className:"detail-panel-content",children:[(0,za.jsx)("div",{className:"detail-panel-close-row",children:(0,za.jsx)("button",{className:"detail-panel-close",onClick:t,"aria-label":"Close panel",children:"x"})}),n]})]})}var La=ne(At(),1),ZO=.6;function eT({defaultWidth:e,minWidth:t,maxWidth:n,containerRef:o}){let[i,a]=La.default.useState(e),[l,r]=La.default.useState(!1),s=La.default.useRef({startX:0,startWidth:0,maxAllowed:n}),u=La.default.useRef(null),c=La.default.useCallback(d=>{d.preventDefault(),d.stopPropagation();let f=o?.current?.getBoundingClientRect().width,h=f?Math.min(n,f*ZO):n;s.current={startX:d.clientX,startWidth:i,maxAllowed:h},r(!0),document.body.style.userSelect="none",document.body.style.cursor="col-resize"},[i,n,o]);return La.default.useEffect(()=>{if(!l)return;let d=h=>{u.current!==null&&cancelAnimationFrame(u.current),u.current=requestAnimationFrame(()=>{let{startX:v,startWidth:b,maxAllowed:S}=s.current,p=v-h.clientX,g=Math.max(t,Math.min(S,b+p));a(g),u.current=null})},f=()=>{r(!1),document.body.style.userSelect="",document.body.style.cursor="",u.current!==null&&(cancelAnimationFrame(u.current),u.current=null)};return document.addEventListener("mousemove",d),document.addEventListener("mouseup",f),()=>{document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",f),document.body.style.userSelect="",document.body.style.cursor="",u.current!==null&&(cancelAnimationFrame(u.current),u.current=null)}},[l,t]),{width:i,isDragging:l,handleMouseDown:c}}var lT=ne(At(),1);var Vf=ne(At(),1),Ve=ne(pe(),1);function jh(e){return e<1?`${(e*1e3).toFixed(0)}ms`:`${e.toFixed(2)}s`}function K({label:e,value:t}){return t==null?null:(0,Ve.jsxs)("div",{className:"detail-kv-row",children:[(0,Ve.jsx)("span",{className:"detail-kv-key",children:e}),(0,Ve.jsx)("span",{className:"detail-kv-value",children:String(t)})]})}function $h({label:e,text:t}){return t?(0,Ve.jsxs)("div",{children:[(0,Ve.jsx)("div",{className:"detail-section-label",children:e}),(0,Ve.jsx)("div",{className:"detail-prompt-block",children:t})]}):null}var jO=(0,Ve.jsx)("svg",{viewBox:"0 0 24 24",width:"10",height:"10",fill:"currentColor",children:(0,Ve.jsx)("path",{d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"})}),$O=(0,Ve.jsx)("svg",{viewBox:"0 0 24 24",width:"10",height:"10",fill:"currentColor",children:(0,Ve.jsx)("path",{d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),FO=(0,Ve.jsx)("svg",{viewBox:"0 0 24 24",width:"10",height:"10",fill:"currentColor",children:(0,Ve.jsx)("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"})}),KO=(0,Ve.jsx)("svg",{viewBox:"0 0 24 24",width:"10",height:"10",fill:"currentColor",children:(0,Ve.jsx)("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})}),tT={all:"unset",cursor:"pointer",display:"flex",alignItems:"center",gap:4,fontSize:9,color:"#64748b",padding:"2px 6px",borderRadius:3,background:"rgba(255,255,255,0.04)",border:"1px solid rgba(255,255,255,0.06)",transition:"color 0.15s"};function Mn({label:e,templateText:t,renderedText:n}){let[o,i]=(0,Vf.useState)(!1),[a,l]=(0,Vf.useState)(!1),[r,s]=(0,Vf.useState)(!1),u=!!t,c=!!n;if(!u&&!c)return null;let d=u&&c,f=d?o?t:n:t||n;function h(){!f||!navigator.clipboard||navigator.clipboard.writeText(f).then(()=>{l(!0),setTimeout(()=>l(!1),1500)}).catch(()=>{})}return(0,Ve.jsxs)("div",{children:[(0,Ve.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:4},children:[(0,Ve.jsx)("div",{className:"detail-section-label",style:{marginBottom:0},children:e}),(0,Ve.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:4},children:[(0,Ve.jsx)("button",{onClick:()=>s(v=>!v),title:r?"Collapse prompt":"Expand prompt","aria-label":r?"Collapse prompt":"Expand prompt",className:"detail-prompt-expand-btn",children:r?$O:jO}),(0,Ve.jsx)("button",{onClick:h,title:"Copy prompt","aria-label":"Copy prompt",style:{...tT,color:a?"#10b981":"#64748b"},children:a?KO:FO}),d&&(0,Ve.jsxs)("button",{onClick:()=>i(v=>!v),style:tT,children:[(0,Ve.jsx)("span",{style:{width:22,height:12,borderRadius:6,background:o?"rgba(255,255,255,0.12)":"#50FA7B33",position:"relative",display:"inline-block",transition:"background 0.15s"},children:(0,Ve.jsx)("span",{style:{position:"absolute",top:2,left:o?2:12,width:8,height:8,borderRadius:"50%",background:o?"#94a3b8":"#50FA7B",transition:"left 0.15s, background 0.15s"}})}),o?"template":"rendered"]})]})]}),(0,Ve.jsx)("div",{className:`detail-prompt-block ${r?"detail-prompt-block--expanded":"detail-prompt-block--collapsed"}`,style:{marginTop:6},children:f})]})}var Bt=ne(pe(),1);function Fh({blueprint:e,executionData:t}){let n=e.llm_prompt_spec,o=n.user_image_references&&n.user_image_references.length>0,i=n.user_document_references&&n.user_document_references.length>0,a=n.system_image_references&&n.system_image_references.length>0,l=n.system_document_references&&n.system_document_references.length>0,r=t?.resolved_model,s=t?.resolved_model_for_object,u=t?.rendered_system_prompt,c=t?.rendered_user_prompt,d=t?.structuring_path,f=t?.is_multiple_output,h=r||e.llm_choices?.for_text,v=s||e.llm_choices?.for_object;return(0,Bt.jsxs)(Bt.Fragment,{children:[(0,Bt.jsx)(K,{label:"Model",value:h}),v&&v!==h&&(0,Bt.jsx)(K,{label:"Model (object)",value:v}),(0,Bt.jsx)(K,{label:"Structuring",value:d||e.structuring_method}),(0,Bt.jsx)(K,{label:"Multiple Output",value:f}),(0,Bt.jsx)(K,{label:"Output Multiplicity",value:e.output_multiplicity}),(0,Bt.jsx)(K,{label:"Prompt Category",value:n.prompt_blueprint?.category}),o&&(0,Bt.jsx)(K,{label:"User Image Refs",value:`${n.user_image_references.length} references`}),i&&(0,Bt.jsx)(K,{label:"User Document Refs",value:`${n.user_document_references.length} references`}),a&&(0,Bt.jsx)(K,{label:"System Image Refs",value:`${n.system_image_references.length} references`}),l&&(0,Bt.jsx)(K,{label:"System Document Refs",value:`${n.system_document_references.length} references`}),(0,Bt.jsx)(Mn,{label:"System Prompt",templateText:n.system_prompt_blueprint?.template,renderedText:u}),(0,Bt.jsx)(Mn,{label:"Prompt",templateText:n.prompt_blueprint?.template,renderedText:c})]})}var dn=ne(pe(),1);function Kh({blueprint:e,executionData:t}){let n=e.img_gen_prompt_blueprint,o=t?.resolved_model,i=t?.rendered_prompt,a=t?.rendered_negative_prompt;return(0,dn.jsxs)(dn.Fragment,{children:[(0,dn.jsx)(K,{label:"Model",value:o||e.img_gen_choice}),(0,dn.jsx)(Mn,{label:"Prompt",templateText:n.prompt_blueprint?.template,renderedText:i}),(0,dn.jsx)(Mn,{label:"Negative Prompt",templateText:n.negative_prompt_blueprint?.template,renderedText:a}),(0,dn.jsx)(K,{label:"Aspect Ratio",value:e.aspect_ratio}),(0,dn.jsx)(K,{label:"Output Format",value:e.output_format}),(0,dn.jsx)(K,{label:"Background",value:e.background}),(0,dn.jsx)(K,{label:"Is Raw",value:e.is_raw}),(0,dn.jsx)(K,{label:"Seed",value:e.seed}),(0,dn.jsx)(K,{label:"Images",value:t?.nb_images??e.output_multiplicity})]})}var pn=ne(pe(),1);function Qh({blueprint:e,executionData:t}){let n=t?.resolved_model;return(0,pn.jsxs)(pn.Fragment,{children:[(0,pn.jsx)(K,{label:"Model",value:n||e.extract_choice}),(0,pn.jsx)(K,{label:"Document Variable",value:e.document_stuff_name}),(0,pn.jsx)(K,{label:"Caption Images",value:e.should_caption_images}),(0,pn.jsx)(K,{label:"Max Page Images",value:e.max_page_images}),(0,pn.jsx)(K,{label:"Include Page Views",value:e.should_include_page_views}),(0,pn.jsx)(K,{label:"Page Views DPI",value:e.page_views_dpi}),(0,pn.jsx)(K,{label:"Render JS",value:e.render_js}),(0,pn.jsx)(K,{label:"Include Raw HTML",value:e.include_raw_html}),(0,pn.jsx)(K,{label:"Image Variable",value:e.image_stuff_name})]})}var mn=ne(pe(),1);function Wh({blueprint:e,executionData:t}){let n=t?.resolved_model,o=t?.rendered_query;return(0,mn.jsxs)(mn.Fragment,{children:[(0,mn.jsx)(K,{label:"Model",value:n||e.search_choice}),(0,mn.jsx)(Mn,{label:"Search Query",templateText:e.prompt_blueprint.template,renderedText:o}),(0,mn.jsx)(K,{label:"Max Results",value:e.max_results_override}),(0,mn.jsx)(K,{label:"Include Images",value:e.include_images_override}),(0,mn.jsx)(K,{label:"Structured Output",value:e.is_structured_output}),(0,mn.jsx)(K,{label:"From Date",value:e.from_date}),(0,mn.jsx)(K,{label:"To Date",value:e.to_date}),e.include_domains&&e.include_domains.length>0&&(0,mn.jsx)(K,{label:"Include Domains",value:e.include_domains.join(", ")}),e.exclude_domains&&e.exclude_domains.length>0&&(0,mn.jsx)(K,{label:"Exclude Domains",value:e.exclude_domains.join(", ")})]})}var QO=["model","llm_handle","handle","llm_name","name"];function nT(e){if(typeof e!="string")return;let t=e.trim();return t.length>0?t:void 0}function oT(e){if(typeof e=="string")return nT(e);if(e&&typeof e=="object")for(let t of QO){let n=nT(e[t]);if(n)return n}}var To=ne(pe(),1);function Jh({blueprint:e,executionData:t}){let n=t?.resolved_model,o=t?.is_multiple_output,i=t?.rendered_user_prompt,a=n||oT(e.llm_choice);return(0,To.jsxs)(To.Fragment,{children:[(0,To.jsx)(K,{label:"Model",value:a}),(0,To.jsx)(K,{label:"Text Variable",value:e.text_input_name}),(0,To.jsx)(K,{label:"Multiple Output",value:o}),(0,To.jsx)(K,{label:"Output Multiplicity",value:e.output_multiplicity}),(0,To.jsx)(Mn,{label:"Prompt",templateText:void 0,renderedText:i})]})}var ze=ne(pe(),1);function WO(e){switch(e.method){case"from_var":{let t=`\u2190 ${e.from_path??"?"}`;return e.list_to_dict_keyed_by?`${t} (keyed by ${e.list_to_dict_keyed_by})`:t}case"fixed":return`= ${JSON.stringify(e.fixed_value)}`;case"nested":return"(nested construct)";case"template":return e.template??"(empty template)"}}var JO=60;function e3(e){return e.length>JO||e.includes(`
|
|
17
|
+
`)}function t3({label:e,value:t}){return(0,ze.jsxs)("div",{className:"detail-field-block",children:[(0,ze.jsx)("div",{className:"detail-field-block-label",children:e}),(0,ze.jsx)("div",{className:"detail-field-block-value",children:t})]})}function iT({blueprint:e,depth:t,fieldResolutions:n}){let o=[],i=[],a=[];for(let[r,s]of Object.entries(e.fields))s.method==="template"?a.push([r,s]):s.method==="nested"?i.push([r,s]):o.push([r,s]);let l=t>0?{paddingLeft:t*12}:void 0;return(0,ze.jsxs)(ze.Fragment,{children:[o.map(([r,s])=>{let u=WO(s);return e3(u)?(0,ze.jsx)("div",{style:l,children:(0,ze.jsx)(t3,{label:r,value:u})},r):(0,ze.jsx)("div",{style:l,children:(0,ze.jsx)(K,{label:r,value:u})},r)}),a.map(([r,s])=>{let u=n?.[r]?.rendered;return(0,ze.jsx)("div",{style:l,children:(0,ze.jsx)(Mn,{label:`Template \u2014 ${r}`,templateText:s.template??null,renderedText:u})},r)}),i.map(([r,s])=>s.nested?(0,ze.jsxs)("div",{children:[(0,ze.jsxs)("div",{className:"detail-nested-header",style:t>0?{paddingLeft:t*12}:void 0,children:[(0,ze.jsx)("span",{className:"detail-nested-header-name",children:r}),(0,ze.jsxs)("span",{className:"detail-nested-header-meta",children:["nested \xB7 ",Object.keys(s.nested.fields).length," field",Object.keys(s.nested.fields).length===1?"":"s"]})]}),(0,ze.jsx)(iT,{blueprint:s.nested,depth:t+1,fieldResolutions:null})]},r):null)]})}function eg({blueprint:e,executionData:t}){let n=t?.rendered_text,o=t?.compose_mode,i=t?.fields??null,a=e.construct_blueprint,l=a!==null&&Object.keys(a.fields).length>0;return(0,ze.jsxs)(ze.Fragment,{children:[(0,ze.jsx)(K,{label:"Mode",value:o||(l?"construct":"template")}),(0,ze.jsx)(K,{label:"Category",value:e.category}),(0,ze.jsx)(K,{label:"Templating Style",value:e.templating_style}),e.template&&(0,ze.jsx)(Mn,{label:"Template",templateText:e.template,renderedText:n}),l&&(0,ze.jsxs)(ze.Fragment,{children:[(0,ze.jsx)("div",{className:"detail-section-label",children:"FIELDS"}),(0,ze.jsx)(iT,{blueprint:a,depth:0,fieldResolutions:i})]})]})}var kt=ne(pe(),1);function tg({blueprint:e,executionData:t}){let n=t?.evaluated_expression,o=t?.selected_outcome;return(0,kt.jsxs)(kt.Fragment,{children:[(0,kt.jsx)($h,{label:"Expression",text:e.expression}),n&&(0,kt.jsx)(K,{label:"Expression Result",value:n}),(0,kt.jsxs)("div",{children:[(0,kt.jsx)("div",{className:"detail-section-label",children:"Outcomes"}),Object.entries(e.outcome_map).map(([i,a])=>(0,kt.jsxs)("div",{className:"detail-kv-row",style:o===a?{background:"rgba(80,250,123,0.08)"}:void 0,children:[(0,kt.jsx)("span",{className:"detail-kv-key",children:i}),(0,kt.jsx)("span",{className:"detail-kv-value",style:o===a?{color:"#50FA7B"}:void 0,children:a})]},i)),(0,kt.jsxs)("div",{className:"detail-kv-row",children:[(0,kt.jsx)("span",{className:"detail-kv-key",children:"default"}),(0,kt.jsx)("span",{className:"detail-kv-value",children:e.default_outcome})]})]}),(0,kt.jsx)(K,{label:"Alias Expression To",value:e.add_alias_from_expression_to})]})}var oi=ne(pe(),1);function ng({blueprint:e}){return(0,oi.jsxs)("div",{children:[(0,oi.jsx)("div",{className:"detail-section-label",children:"Steps"}),(0,oi.jsx)("div",{className:"detail-steps-list",children:e.sequential_sub_pipes.map((t,n)=>(0,oi.jsxs)("div",{className:"detail-step-item",children:[(0,oi.jsx)("span",{className:"detail-step-index",children:n+1}),(0,oi.jsx)("span",{className:"detail-step-code",children:t.pipe_code}),t.output_name&&(0,oi.jsxs)("span",{className:"detail-io-concept",children:["-> ",t.output_name]})]},n))})]})}var Dn=ne(pe(),1);function og({blueprint:e}){return(0,Dn.jsxs)(Dn.Fragment,{children:[(0,Dn.jsxs)("div",{children:[(0,Dn.jsx)("div",{className:"detail-section-label",children:"Branches"}),(0,Dn.jsx)("div",{className:"detail-steps-list",children:e.parallel_sub_pipes.map((t,n)=>(0,Dn.jsxs)("div",{className:"detail-step-item",children:[(0,Dn.jsx)("span",{className:"detail-step-code",children:t.pipe_code}),t.output_name&&(0,Dn.jsxs)("span",{className:"detail-io-concept",children:["-> ",t.output_name]})]},n))})]}),(0,Dn.jsx)(K,{label:"Add Each Output",value:e.add_each_output}),(0,Dn.jsx)(K,{label:"Combined Output",value:e.combined_output})]})}var ii=ne(pe(),1);function ig({blueprint:e,executionData:t}){let n=t?.item_count;return(0,ii.jsxs)(ii.Fragment,{children:[(0,ii.jsx)(K,{label:"Branch Pipe",value:e.branch_pipe_code}),(0,ii.jsx)(K,{label:"Input List Variable",value:e.batch_params.input_list_stuff_name}),(0,ii.jsx)(K,{label:"Input Item Variable",value:e.batch_params.input_item_stuff_name}),n!=null&&(0,ii.jsx)(K,{label:"Items Processed",value:n})]})}var aT=new Set(["PipeLLM","PipeImgGen","PipeExtract","PipeSearch","PipeStructure","PipeCompose","PipeSequence","PipeParallel","PipeCondition","PipeBatch"]);function ag(e,t){return aT.has(e)?!t:!0}var J=ne(pe(),1),n3={PipeLLM:"LLM",PipeExtract:"Extract",PipeCompose:"Compose",PipeImgGen:"ImgGen",PipeSearch:"Search",PipeFunc:"Func",PipeStructure:"Structure",PipeSignature:"Signature",PipeSequence:"Seq",PipeParallel:"Par",PipeCondition:"Cond",PipeBatch:"Batch"},o3=new Set(["PipeSequence","PipeParallel","PipeCondition","PipeBatch"]),i3={succeeded:"#50FA7B",failed:"#FF5555",running:"#8BE9FD",scheduled:"#6272a4",skipped:"#6272a4",canceled:"#6272a4"};function rT({node:e,spec:t,onConceptClick:n}){let o=e.pipe_type,i=o3.has(o),a=n3[o],l=e.status,r=i3[l]??"#6272a4",s=lT.default.useMemo(()=>{if(!e.pipe_code||!t.pipe_registry)return;let f=`${t.pipeline_ref?.domain??""}.${e.pipe_code}`,h=DE(t,f);if(h)return h;for(let[v,b]of Object.entries(t.pipe_registry))if(v.endsWith(`.${e.pipe_code}`))return b},[e.pipe_code,t]),u=e.io?.inputs??[],c=e.io?.outputs??[],d=s?.description??e.description;return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)("div",{className:"detail-sticky-header",children:[(0,J.jsxs)("div",{className:"detail-header",children:[(0,J.jsx)("span",{className:`detail-badge ${i?"detail-badge--controller":"detail-badge--operator"}`,children:a}),(0,J.jsx)("span",{className:`detail-pipe-code ${i?"detail-pipe-code--controller":""}`,children:e.pipe_code})]}),(0,J.jsxs)("div",{className:"detail-status",children:[(0,J.jsx)("span",{className:"detail-status-dot",style:{background:r}}),(0,J.jsx)("span",{className:"detail-status-label",style:{color:r},children:l}),e.timing?.duration!=null&&(0,J.jsx)("span",{className:"detail-duration",children:jh(e.timing.duration)})]}),d&&(0,J.jsx)("div",{className:"detail-description",children:d}),u.length>0&&(0,J.jsxs)("div",{children:[(0,J.jsx)("div",{className:"detail-section-label",children:"Inputs"}),(0,J.jsx)("div",{className:"detail-io-list",children:u.map((f,h)=>(0,J.jsxs)("div",{className:"detail-io-pill",style:{cursor:f.concept&&n?"pointer":void 0},onClick:()=>f.concept&&n?.(f.concept),children:[(0,J.jsx)("span",{className:"detail-io-name",children:f.name}),f.concept&&(0,J.jsx)("span",{className:"detail-io-concept",children:f.concept})]},h))})]}),c.length>0&&(0,J.jsxs)("div",{children:[(0,J.jsx)("div",{className:"detail-section-label",children:"Output"}),(0,J.jsx)("div",{className:"detail-io-list",children:c.map((f,h)=>(0,J.jsxs)("div",{className:"detail-io-pill",style:{cursor:f.concept&&n?"pointer":void 0},onClick:()=>f.concept&&n?.(f.concept),children:[(0,J.jsx)("span",{className:"detail-io-name",children:f.name}),f.concept&&(0,J.jsx)("span",{className:"detail-io-concept",children:f.concept})]},h))})]}),(u.length>0||c.length>0)&&(0,J.jsx)("div",{style:{borderTop:"1px solid rgba(255,255,255,0.06)",margin:"4px 0"}})]}),s&&(0,J.jsx)(a3,{blueprint:s,executionData:e.execution_data}),e.execution_data&&Object.keys(e.execution_data).length>0&&(0,J.jsx)(l3,{executionData:e.execution_data,pipeType:o,hasBlueprint:!!s}),e.error&&(0,J.jsxs)("div",{className:"detail-error",children:[(0,J.jsx)("div",{className:"detail-error-type",children:e.error.error_type}),(0,J.jsx)("div",{className:"detail-error-message",children:e.error.message}),e.error.stack&&(0,J.jsx)("div",{className:"detail-error-stack",children:e.error.stack})]}),e.metrics&&Object.keys(e.metrics).length>0&&(0,J.jsxs)("div",{children:[(0,J.jsx)("div",{className:"detail-section-label",children:"Metrics"}),Object.entries(e.metrics).map(([f,h])=>(0,J.jsx)(K,{label:f,value:typeof h=="number"?h.toLocaleString():String(h)},f))]}),e.tags&&Object.keys(e.tags).length>0&&(0,J.jsxs)("div",{children:[(0,J.jsx)("div",{className:"detail-section-label",children:"Tags"}),(0,J.jsx)("div",{className:"detail-tags",children:Object.entries(e.tags).map(([f,h])=>(0,J.jsxs)("span",{className:"detail-tag",children:[(0,J.jsxs)("span",{className:"detail-tag-key",children:[f,": "]}),(0,J.jsx)("span",{className:"detail-tag-value",children:h})]},f))})]}),!s&&(0,J.jsx)("div",{className:"detail-not-available",children:"Blueprint not available"})]})}function a3({blueprint:e,executionData:t}){switch(e.type){case"PipeLLM":return(0,J.jsx)(Fh,{blueprint:e,executionData:t});case"PipeImgGen":return(0,J.jsx)(Kh,{blueprint:e,executionData:t});case"PipeCompose":return(0,J.jsx)(eg,{blueprint:e,executionData:t});case"PipeExtract":return(0,J.jsx)(Qh,{blueprint:e,executionData:t});case"PipeSearch":return(0,J.jsx)(Wh,{blueprint:e,executionData:t});case"PipeStructure":return(0,J.jsx)(Jh,{blueprint:e,executionData:t});case"PipeSequence":return(0,J.jsx)(ng,{blueprint:e,executionData:t});case"PipeParallel":return(0,J.jsx)(og,{blueprint:e,executionData:t});case"PipeCondition":return(0,J.jsx)(tg,{blueprint:e,executionData:t});case"PipeBatch":return(0,J.jsx)(ig,{blueprint:e,executionData:t});case"PipeFunc":return null;case"PipeSignature":return(0,J.jsx)("div",{className:"detail-not-available",children:"Signature stub \u2014 declared but not yet implemented."});default:return null}}function l3({executionData:e,pipeType:t,hasBlueprint:n}){return ag(t,n)?(0,J.jsx)(r3,{data:e}):null}function r3({data:e}){let t=Object.entries(e);return t.length===0?null:(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)("div",{className:"detail-section-label",children:"Execution"}),t.map(([n,o])=>(0,J.jsx)(K,{label:n,value:String(o)},n))]})}var lg=ne(At(),1);var Ee=ne(pe(),1);function rg({concept:e,ioData:t,isDryRun:n,resolveStorageUrl:o,canEmbedPdf:i,onOpenExternally:a,instanceKey:l}){return(0,Ee.jsxs)(Ee.Fragment,{children:[(0,Ee.jsxs)("div",{className:"detail-header",children:[(0,Ee.jsx)("span",{className:"detail-concept-code",children:e.code}),(0,Ee.jsx)("span",{className:"detail-concept-domain",children:e.domain_code})]}),e.description&&(0,Ee.jsx)("div",{className:"detail-description",children:e.description}),e.refines&&(0,Ee.jsxs)("div",{className:"detail-refines",children:["refines ",(0,Ee.jsx)("span",{className:"detail-refines-code",children:e.refines})]}),(0,Ee.jsx)(s3,{concept:e,ioData:t,isDryRun:n,resolveStorageUrl:o,canEmbedPdf:i,onOpenExternally:a},l??`${e.code}:${t&&"digest"in t?t.digest:t?.name??""}`)]})}function s3({concept:e,ioData:t,isDryRun:n,resolveStorageUrl:o,canEmbedPdf:i,onOpenExternally:a}){let l=!!t&&!n,[r,s]=lg.default.useState(l?"data":"structure"),u=lg.default.useId(),c=b=>`${u}-tab-${b}`,d=b=>`${u}-tabpanel-${b}`,f=e.json_schema?(0,Ee.jsxs)("div",{children:[(0,Ee.jsx)("div",{className:"detail-section-label",children:"Structure"}),(0,Ee.jsx)(u3,{schema:e.json_schema,isDryRun:n})]}):(0,Ee.jsx)("div",{className:"detail-not-available",children:"Schema not available"});if(!l)return f;let h=b=>{let S;switch(b.key){case"ArrowLeft":case"ArrowRight":S=r==="data"?"structure":"data";break;case"Home":S="data";break;case"End":S="structure";break;default:return}b.preventDefault(),s(S),document.getElementById(c(S))?.focus()},v=(b,S)=>(0,Ee.jsx)("button",{type:"button",role:"tab",id:c(b),"aria-selected":r===b,"aria-controls":d(b),tabIndex:r===b?0:-1,className:`detail-tab ${r===b?"detail-tab--active":""}`,onClick:()=>s(b),onKeyDown:h,children:S});return(0,Ee.jsxs)(Ee.Fragment,{children:[(0,Ee.jsxs)("div",{className:"detail-tabs",role:"tablist","aria-label":"Concept views",children:[v("data","Data"),v("structure","Structure")]}),(0,Ee.jsx)("div",{role:"tabpanel",id:d(r),"aria-labelledby":c(r),children:r==="data"?(0,Ee.jsx)(If,{stuff:f3(t),resolveStorageUrl:o,canEmbedPdf:i,onOpenExternally:a}):f})]})}function u3({schema:e,isDryRun:t}){let n=e.properties,o=new Set(e.required??[]);if(!n||Object.keys(n).length===0)return(0,Ee.jsx)("div",{className:"detail-not-available",children:"No fields defined"});let i=Object.entries(n),a=t?i.filter(([l])=>o.has(l)):i;return(0,Ee.jsxs)("table",{className:"detail-schema-table",children:[(0,Ee.jsx)("thead",{children:(0,Ee.jsxs)("tr",{children:[(0,Ee.jsx)("th",{children:"Field"}),(0,Ee.jsx)("th",{children:"Type"}),(0,Ee.jsx)("th",{}),(0,Ee.jsx)("th",{children:"Description"})]})}),(0,Ee.jsx)("tbody",{children:a.map(([l,r])=>(0,Ee.jsxs)("tr",{children:[(0,Ee.jsx)("td",{className:"detail-schema-field",children:l}),(0,Ee.jsx)("td",{className:"detail-schema-type",children:c3(r)}),(0,Ee.jsx)("td",{children:o.has(l)&&(0,Ee.jsx)("span",{className:"detail-schema-required",children:"req"})}),(0,Ee.jsx)("td",{children:r.description??""})]},l))})]})}function c3(e){return typeof e.type=="string"?e.type:Array.isArray(e.type)?e.type.join(" | "):e.anyOf?"union":e.allOf?"all":typeof e.$ref=="string"?e.$ref.split("/").pop()??"(unresolved type)":"(unresolved type)"}function f3(e){return d3(e)?e:{digest:e.digest??"",name:e.name,concept:e.concept,contentType:e.content_type,data:e.data,dataText:e.data_text,dataHtml:e.data_html}}function d3(e){return"contentType"in e||"dataText"in e||"dataHtml"in e}function nr(e){return e.map(t=>({id:t.id,type:t.type,data:t.data,position:t.position,style:t.style,sourcePosition:t.sourcePosition,targetPosition:t.targetPosition,parentId:t.parentId,extent:t.extent,selected:t.selected}))}function or(e){return e.map(t=>({id:t.id,source:t.source,target:t.target,type:t.type,animated:t.animated,label:t.label,labelStyle:t.labelStyle,labelBgStyle:t.labelBgStyle,labelBgPadding:t.labelBgPadding,labelBgBorderRadius:t.labelBgBorderRadius,style:t.style,markerEnd:t.markerEnd}))}function Yf(e){return{pipeCode:e.pipe_code,pipeType:e.pipe_type,description:e.description,status:e.status,inputs:e.io.inputs.map(t=>({name:t.name,concept:t.concept??""})),outputs:e.io.outputs.map(t=>({name:t.name,concept:t.concept??""}))}}var p3=7,m3=48,h3=140;function g3(e,t,n){let o=[],i=[],a=new Set;for(let s of Object.values(t.stuffProducers))a.add(s);for(let s of Object.values(t.stuffConsumers))for(let u of s)a.add(u);for(let s of e.nodes){if(!a.has(s.id))continue;let u=Bl(s,`nodes[${s.id}]`),c=u.status==="failed",d=u.pipe_code,f=Yf(u);o.push({id:u.id,type:zl,data:{labelDescriptor:{kind:"pipe",label:d,isFailed:c},nodeData:u,isPipe:!0,isStuff:!1,labelText:d,pipeCode:f.pipeCode,pipeType:u.pipe_type,pipeCardData:f},position:{x:0,y:0}})}for(let[s,u]of Object.entries(t.stuffRegistry)){let c=Ui(s),d=u.name,f=u.concept||"",h=Math.max(d.length,f.length)*p3+m3,v=Math.max(h3,h),b=!t.stuffProducers[s],S=!b&&!t.stuffConsumers[s]?.length,p=b?"input":S?"output":void 0,g=b?"var(--color-stuff-input-border, #50FA7B)":S?"var(--color-stuff-output-border, #a78bfa)":"var(--color-stuff-border)";o.push({id:c,type:d1,data:{labelDescriptor:{kind:"stuff",label:d,concept:f},isStuff:!0,isPipe:!1,labelText:d,stuffRole:p,stuffDigest:s},position:{x:0,y:0},style:{background:"var(--color-stuff-bg)",border:`2px solid ${g}`,borderRadius:"999px",padding:"0",width:v+"px",boxShadow:"var(--shadow-md)"}})}let l=0;for(let[s,u]of Object.entries(t.stuffProducers)){let c=Ui(s);i.push({id:"edge_"+l++,source:u,target:c,type:n,animated:!1,style:{stroke:"var(--color-edge)",strokeWidth:2},markerEnd:{type:ya,color:"var(--color-edge)"}})}for(let[s,u]of Object.entries(t.stuffConsumers)){let c=Ui(s);for(let d of u)i.push({id:"edge_"+l++,source:c,target:d,type:n,animated:!1,style:{stroke:"var(--color-edge)",strokeWidth:2},markerEnd:{type:ya,color:"var(--color-edge)"}})}for(let s of e.edges){if(s.kind!=="parallel_combine"||!s.source_stuff_digest||!s.target_stuff_digest||!t.stuffRegistry[s.source_stuff_digest]||!t.stuffRegistry[s.target_stuff_digest])continue;let u=Ui(s.source_stuff_digest),c=Ui(s.target_stuff_digest);i.push({id:s.id,source:u,target:c,type:"smoothstep",animated:!1,style:{stroke:"var(--color-parallel-combine)",strokeWidth:2,strokeDasharray:"5,5"},markerEnd:{type:ya,color:"var(--color-parallel-combine)"}})}for(let s of e.edges){if(s.kind!=="batch_item"&&s.kind!=="batch_aggregate"||!s.source_stuff_digest||!s.target_stuff_digest||!t.stuffRegistry[s.source_stuff_digest]||!t.stuffRegistry[s.target_stuff_digest])continue;let u=Ui(s.source_stuff_digest),c=Ui(s.target_stuff_digest),d=s.kind==="batch_item";i.push({id:s.id,source:u,target:c,type:n,animated:!1,_batchEdge:!0,label:s.label||"",labelStyle:{fontSize:"10px",fontFamily:"var(--font-mono)",fill:d?"var(--color-batch-item)":"var(--color-batch-aggregate)"},labelBgStyle:{fill:"var(--color-bg)",fillOpacity:.9},style:{stroke:d?"var(--color-batch-item)":"var(--color-batch-aggregate)",strokeWidth:2,strokeDasharray:"5,5"},markerEnd:{type:ya,color:d?"var(--color-batch-item)":"var(--color-batch-aggregate)"}})}let r=_o(e,t);for(let s of i){let u=r[s.source]||null,c=r[s.target]||null;u&&c&&u!==c&&(s._crossGroup=!0,s.style={...s.style,strokeWidth:1.5,opacity:.65})}for(let s of i)s._batchEdge&&(s.style={...s.style,opacity:.7});return{nodes:o,edges:i}}function sT(e,t){if(e){let n=ME(e);if(n&&(Object.keys(n.stuffProducers).length>0||Object.keys(n.stuffConsumers).length>0))return{graphData:g3(e,n,t),analysis:n}}return{graphData:{nodes:[],edges:[]},analysis:null}}function cT(e,t,n){let o=new Set([e]),a=t.nodes.find(l=>l.id===e)?.pipe_code;if(!a)return o;for(let l of t.nodes)l.pipe_code===a&&n.has(l.id)&&o.add(l.id);return o}function y3(e,t){let n=[],o=t[e],i=new Set;for(;o&&!i.has(o);)n.push(o),i.add(o),o=t[o];return n}function Fs(e,t,n){let o=y3(e,t),i=null;for(let a of o)n.has(a)&&(i=a);return i}function Xf(e,t,n){return Fs(e,t,n)??e}function uT(e,t){return e.nodes.find(n=>n.id===t)}function sg(e,t,n,o,i){if(o.size===0)return{nodes:e.nodes,edges:e.edges,analysis:t};let a=_o(n,t),l=new Map;for(let p of o){let m=uT(n,p)?.io?.outputs;if(m)for(let y of m){if(!y.digest)continue;let x=l.get(y.digest);x||(x=new Set,l.set(y.digest,x)),x.add(p)}}if(l.size>0)for(let p of e.nodes){if(!Ll(p.id))continue;let g=l.get(ps(p.id));if(!g)continue;let m=a[p.id],y=null,x=new Set;for(;m&&!x.has(m);)x.add(m),g.has(m)&&(y=m),m=a[m];if(!y)continue;let _=a[y];_?a[p.id]=_:delete a[p.id]}let r=[];for(let p of e.nodes)Fs(p.id,a,o)||r.push(p);for(let p of o){if(Fs(p,a,o))continue;let g=uT(n,p);if(!g)continue;let m=Yf(Bl(g,p));i&&(m.onExpand=x=>i(p,x));let y={id:p,type:zl,data:{labelDescriptor:{kind:"pipe",label:m.pipeCode,isFailed:m.status==="failed"},nodeData:g,isPipe:!1,isStuff:!1,isController:!0,labelText:m.pipeCode,pipeCode:m.pipeCode,pipeType:g.pipe_type,pipeCardData:m},position:{x:0,y:0}};r.push(y)}let s=new Set;for(let p of t.controllerNodeIds)o.has(p)||Fs(p,a,o)||s.add(p);let u={};for(let p of s){let g=t.containmentTree[p]??[],m=[];for(let y of g){let x=Fs(y,a,o);x&&x!==y||m.push(y)}u[p]=m}let c=new Set;for(let p of Object.values(u))for(let g of p)c.add(g);let d={};for(let[p,g]of Object.entries(t.stuffProducers))d[p]=Xf(g,a,o);let f={};for(let[p,g]of Object.entries(t.stuffConsumers)){let m=new Set;for(let y of g)m.add(Xf(y,a,o));f[p]=[...m]}let h={stuffRegistry:t.stuffRegistry,stuffProducers:d,stuffConsumers:f,controllerNodeIds:s,childNodeIds:c,containmentTree:u},v=new Map;for(let p of e.edges){let g=Xf(p.source,a,o),m=Xf(p.target,a,o);if(g===m)continue;let y=p._batchEdge?"batch":"data",x=`${g}->${m}|${y}`;if(v.has(x))continue;let _={...p,source:g,target:m,id:p.id};p._batchEdge&&(g!==p.source||m!==p.target)&&(_.label="[N]"),delete _._crossGroup,v.set(x,_)}let b=_o({...n,edges:n.edges.filter(p=>p.kind!=="contains"?!0:s.has(p.source))},h),S=[];for(let p of v.values()){let g=b[p.source]||null,m=b[p.target]||null;if(g&&m&&g!==m)p._crossGroup=!0,p.style={...p.style,strokeWidth:1.5,opacity:.65};else if(p.style&&(p.style.opacity===.65||p.style.strokeWidth===1.5)){let{opacity:y,strokeWidth:x,..._}=p.style;p.style={..._,strokeWidth:2},p.markerEnd||(p.markerEnd={type:ya,color:"var(--color-edge)"})}S.push(p)}return{nodes:r,edges:S,analysis:h}}var v3=window.ELK,fT=v3;function b3(e){switch(e){case"LR":return"RIGHT";case"RL":return"LEFT";case"BT":return"UP";default:return"DOWN"}}var S3="_in",x3="_out";function cg(e){return e+S3}function fg(e){return e+x3}function _3(e,t,n){let o={LR:{inSide:"WEST",outSide:"EAST"},RL:{inSide:"EAST",outSide:"WEST"},TB:{inSide:"NORTH",outSide:"SOUTH"},BT:{inSide:"SOUTH",outSide:"NORTH"}},{inSide:i,outSide:a}=o[n],l=n==="LR"||n==="RL",r=l?n==="LR"?0:t.width:t.width/2,s=l?t.height/2:n==="TB"?0:t.height,u=l?n==="LR"?t.width:0:t.width/2,c=l?t.height/2:n==="TB"?t.height:0;return[{id:cg(e),x:r,y:s,width:1,height:1,layoutOptions:{"elk.port.side":i}},{id:fg(e),x:u,y:c,width:1,height:1,layoutOptions:{"elk.port.side":a}}]}var E3=320,hT=28,T3=24,ug=8,N3=22,C3=50,w3=16,A3=3,dT=38,pT=30,qf=22,M3=140,D3=100,R3=17,O3=58,z3=5.5,L3=5,B3=4.5,H3=4;function P3(e,t,n){if(!e)return 0;if(!t)return 1;let o=n-hT,i=Math.max(1,Math.floor(o/z3)),a=Math.ceil(e.length/i);return Math.min(A3,Math.max(1,a))}function k3(e,t){let n=Math.min(M3,Math.ceil(e.length*L3)),o=Math.min(D3,Math.ceil(t.length*B3));return n+o+R3}function mT(e,t){if(e.length===0)return 0;let n=t-hT-O3,o=1,i=0;for(let a of e){let l=k3(a.name,a.concept);if(i===0){i=l;continue}i+l<=n?i+=l:(o+=1,i=l)}return o}function ir(e,t){let n=e.data||{},o=n.isStuff,i=n.labelText||"",a=e.type===zl,l=t?180:280,r=t?240:400,s=Math.max(180,Math.min(r,i.length*8+60)),u;o?u=Math.max(180,s):a&&n.pipeCardData?u=r:u=Math.max(a?l:200,s);let c;if(o)c=60;else if(a&&n.pipeCardData){let d=n.pipeCardData,f=d.inputs??[],h=d.outputs??[],v=d.description||n.nodeData?.description||"",b=T3+(t?C3:N3),S=P3(v,t,u);S>0&&(b+=ug+S*w3);let p=f.slice(0,H3);if(p.length>0)if(b+=ug,t)b+=dT+(p.length-1)*qf;else{let g=mT(p,u);b+=pT+(g-1)*qf}if(h.length>0)if(b+=ug,t)b+=dT+(h.length-1)*qf;else{let g=mT(h,u);b+=pT+(g-1)*qf}c=Math.min(E3,b)}else c=a?120:70;return{width:u,height:c}}function G3(e,t){let n={},o=new Set;function i(a){if(n[a]!==void 0)return n[a];if(o.has(a))return 0;o.add(a);let l=t[a]||[],r=-1;for(let s of l)e.has(s)&&(r=Math.max(r,i(s)));return o.delete(a),n[a]=r+1,n[a]}for(let a of e)i(a);return n}function Zf(e,t,n){return{id:e,width:t.width,height:t.height,ports:_3(e,t,n),layoutOptions:{"elk.portConstraints":"FIXED_POS"}}}function gT(e,t,n,o,i,a){let l=i==="LR"||i==="RL",r=a?.nodesep??80,s=a?.ranksep??70,u=b3(i),c="30",d={"elk.algorithm":"layered","elk.direction":u,"elk.hierarchyHandling":"INCLUDE_CHILDREN","elk.spacing.nodeNode":String(r),"elk.layered.spacing.nodeNodeBetweenLayers":String(s),"elk.spacing.edgeNode":c,"elk.spacing.edgeEdge":"20","elk.layered.spacing.edgeNodeBetweenLayers":c,"elk.layered.spacing.edgeEdgeBetweenLayers":"15","elk.layered.nodePlacement.favorStraightEdges":"true"};if(!n||!o||o.controllerNodeIds.size===0){let x={},_=e.map(C=>{let A=ir(C,l);return x[C.id]=A,Zf(C.id,A,i)}),E=t.map(C=>({id:C.id,sources:[fg(C.source)],targets:[cg(C.target)]}));return{elkGraph:{id:"root",layoutOptions:d,children:_,edges:E},dimensionMap:x}}let f=_o(n,o),h=G3(o.controllerNodeIds,o.containmentTree),v={},b=new Map;for(let x of e)b.set(x.id,x);let S={},p=Array.from(o.controllerNodeIds);p.sort((x,_)=>(h[x]??0)-(h[_]??0));for(let x of p){let E=1+(h[x]??0)*.15,C=Math.round(Lc*E),A=Math.round(Bc*E),B=Math.round(Hc*E),M={"elk.padding":`[top=${A},left=${C},bottom=${B},right=${C}]`,"elk.spacing.nodeNode":String(r),"elk.layered.spacing.nodeNodeBetweenLayers":String(s),"elk.spacing.edgeNode":c,"elk.layered.spacing.edgeNodeBetweenLayers":c},z=[],I=o.containmentTree[x]||[];for(let T of I)if(o.controllerNodeIds.has(T)){let D=S[T];D&&z.push(D)}else{let D=b.get(T);if(D){let N=ir(D,l);v[T]=N,z.push(Zf(T,N,i))}}for(let T of e)if(T.data.isStuff&&f[T.id]===x&&!z.some(D=>D.id===T.id)){let D=ir(T,l);v[T.id]=D,z.push(Zf(T.id,D,i))}S[x]={id:x,layoutOptions:M,children:z}}let g=[];for(let x of p)if(!f[x]){let _=S[x];_&&g.push(_)}for(let x of e)if(!f[x.id]&&!o.controllerNodeIds.has(x.id)){let _=ir(x,l);v[x.id]=_,g.push(Zf(x.id,_,i))}let m=new Set(e.map(x=>x.id)),y=t.filter(x=>m.has(x.source)&&m.has(x.target)).map(x=>({id:x.id,sources:[fg(x.source)],targets:[cg(x.target)]}));return{elkGraph:{id:"root",layoutOptions:d,children:g,edges:y},dimensionMap:v}}function yT(e){let t={};function n(o,i,a){let l=i+(o.x??0),r=a+(o.y??0);o.id!=="root"&&(t[o.id]={x:l,y:r,width:o.width??0,height:o.height??0});for(let s of o.children??[])n(s,l,r)}return n(e,0,0),t}var dg=null;function U3(){return dg||(dg=new fT),dg}async function jf(e,t,n,o,i,a){if(e.length===0)return{nodes:[],edges:t,controllerPositions:{}};let l=n==="LR"||n==="RL",{elkGraph:r,dimensionMap:s}=gT(e,t,i??null,a??null,n,o),u=await U3().layout(r),c=yT(u),d={};if(a)for(let h of a.controllerNodeIds)c[h]&&(d[h]=c[h]);return{nodes:e.map(h=>{let v=c[h.id],b=s[h.id]??ir(h,l),S=b.width,p=b.height,g=h.data.pipeCardData,y=g?{...g,direction:l?"LR":"TB"}:void 0;return{...h,data:{...h.data,_estimatedWidth:S,_estimatedHeight:p,pipeCardData:y},style:{...h.style,width:S+"px",height:p+"px"},position:{x:v?v.x:0,y:v?v.y:0},sourcePosition:l?n==="LR"?"right":"left":n==="TB"?"bottom":"top",targetPosition:l?n==="LR"?"left":"right":n==="TB"?"top":"bottom"}}),edges:t,controllerPositions:d}}var Ks=5;function I3(e,t,n){let o=new Set,i=[e];for(;i.length>0;){let a=i.pop();for(let l of t[a]||[])o.add(l),n.has(l)&&i.push(l)}return o}function V3(e,t,n,o){let i={};for(let v of n)i[v.id]=v;let a={};for(let v of e.nodes)t.controllerNodeIds.has(v.id)&&(a[v.id]=Bl(v,`nodes[${v.id}]`));let l={},r=new Set;function s(v){if(l[v]!==void 0)return l[v];if(r.has(v))throw new Error(`Cycle detected in containment tree: controller "${v}" is part of a containment cycle`);r.add(v);let b=t.containmentTree[v]||[],S=-1;for(let p of b)t.controllerNodeIds.has(p)&&(S=Math.max(S,s(p)));return r.delete(v),l[v]=S+1,l[v]}let u=_o(e,t),c={};for(let[v,b]of Object.entries(u))Ll(v)&&i[v]&&(c[b]||(c[b]=[]),c[b].push(v));let d=Array.from(t.controllerNodeIds);for(let v of d)s(v);d.sort((v,b)=>l[v]-l[b]);let f=[],h={};for(let v of d){let S=(t.containmentTree[v]||[]).filter(M=>i[M]),p=c[v]||[],g=[...S,...p];if(g.length===0)continue;let m,y,x,_,E=o?.[v];if(E)m=E.x,y=E.y,x=E.width,_=E.height;else{let M=1/0,z=1/0,I=-1/0,T=-1/0;for(let V of g){let k=i[V],G=k.position,q=g1(k),Z=y1(k);M=Math.min(M,G.x),z=Math.min(z,G.y),I=Math.max(I,G.x+q),T=Math.max(T,G.y+Z)}let N=1+(l[v]??0)*.15,O=Math.round(Lc*N),R=Math.round(Bc*N),L=Math.round(Hc*N);m=M-O,y=z-R,x=I-M+2*O,_=T-z+R+L}let C=a[v];if(!C)throw new ms(`nodes[${v}]`,`controller "${v}" is referenced by a "contains" edge but has no corresponding node in graphspec.nodes`);let A=C.pipe_code,B={id:v,type:p1,data:{label:A,pipeType:C.pipe_type,isController:!0,isPipe:!1,isStuff:!1,pipeCode:A,labelText:A},position:{x:m,y},style:{width:x+"px",height:_+"px",padding:"0"}};f.push(B),i[v]=B;for(let M of g)h[M]=v}for(let[v,b]of Object.entries(h)){let S=i[v],p=i[b];!S||!p||(S.position={x:S.position.x-p.position.x,y:S.position.y-p.position.y},S.parentId=b,S.extent="parent")}return f}function ar(e,t,n,o,i,a,l,r,s){if(!i||!o||!n)return{nodes:e,edges:t};let u={},c=new Set,d={};for(let y of n.nodes)o.controllerNodeIds.has(y.id)&&(d[y.id]=y.pipe_type);for(let y of o.controllerNodeIds){let x=o.containmentTree[y]||[];u[y]=x.length;let _=d[y];(_==="PipeParallel"||_==="PipeBatch")&&x.length>Ks&&!a?.has(y)&&c.add(y)}let f=e,h=t;if(c.size>0){let y=new Set;for(let _ of c){let C=(o.containmentTree[_]||[]).slice(Ks);for(let A of C)if(y.add(A),o.controllerNodeIds.has(A))for(let B of I3(A,o.containmentTree,o.controllerNodeIds))y.add(B)}let x=_o(n,o);for(let _ of e){if(!Ll(_.id)||y.has(_.id))continue;let E=x[_.id];if(!E||!c.has(E)&&!y.has(E))continue;let C=t.filter(A=>{if(A.source!==_.id&&A.target!==_.id)return!1;let B=A.source===_.id?A.target:A.source;return!Ll(B)});(C.length===0||C.every(A=>{let B=A.source===_.id?A.target:A.source;return y.has(B)}))&&y.add(_.id)}f=e.filter(_=>!y.has(_.id)),h=t.filter(_=>!y.has(_.source)&&!y.has(_.target))}let v=V3(n,o,f,r);if(v.length===0)return{nodes:f,edges:h};for(let y of v){let x=u[y.id]??0,_=c.has(y.id);if(y.data.childCount=x,y.data.isCollapsed=_,l){let E=y.id;y.data.onToggleCollapse=()=>l(E)}if(s){let E=y.id;y.data.onToggleFold=C=>s(E,C)}}let b=[...v,...f],S={};for(let y of b)S[y.id]=y;let p={},g=new Set;function m(y){if(p[y]!==void 0)return p[y];if(g.has(y))throw new Error(`Cycle detected in node parent chain: node "${y}" references itself as an ancestor`);g.add(y);let x=S[y];return p[y]=x&&x.parentId?1+m(x.parentId):0,g.delete(y),p[y]}for(let y of b)m(y.id);return b.sort((y,x)=>p[y.id]-p[x.id]),{nodes:b,edges:h}}var vT={"--font-sans":'"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',"--font-mono":'"JetBrains Mono", "Monaco", "Menlo", monospace'},Y3={...vT,"--surface-page":"#0a0a0a","--surface-panel":"#111118","--surface-overlay":"rgba(17, 17, 24, 0.8)","--surface-overlay-hover":"rgba(30, 30, 40, 0.9)","--surface-overlay-disabled":"rgba(17, 17, 24, 0.6)","--surface-elevated":"rgba(255, 255, 255, 0.06)","--surface-elevated-hover":"rgba(255, 255, 255, 0.1)","--surface-sunken":"rgba(255, 255, 255, 0.03)","--surface-pill":"rgba(255, 255, 255, 0.06)","--surface-pill-border":"rgba(255, 255, 255, 0.08)","--border-subtle":"rgba(255, 255, 255, 0.06)","--border-default":"rgba(255, 255, 255, 0.1)","--border-strong":"rgba(255, 255, 255, 0.18)","--border-dashed":"rgba(255, 255, 255, 0.15)","--text-primary":"#f8fafc","--text-default":"#e2e8f0","--text-secondary":"#cbd5e1","--text-muted":"#94a3b8","--text-dim":"#64748b","--text-on-accent":"#0e0e0e","--shadow-sm":"0 2px 8px rgba(0, 0, 0, 0.4)","--shadow-md":"0 4px 16px rgba(0, 0, 0, 0.6)","--shadow-lg":"0 8px 24px rgba(0, 0, 0, 0.5)","--focus-ring":"rgba(59, 130, 246, 0.6)","--color-pipe":"#ff6b6b","--color-pipe-bg":"rgba(224,108,117,0.18)","--color-pipe-text":"#ffffff","--color-stuff":"#4ECDC4","--color-stuff-bg":"rgba(78,205,196,0.12)","--color-stuff-border":"#9ddcfd","--color-stuff-text":"#98FB98","--color-stuff-text-dim":"#9ddcfd","--color-edge":"#FFFACD","--color-batch-item":"#bd93f9","--color-batch-aggregate":"#50fa7b","--color-parallel-combine":"#d6a4ff","--color-success":"#50FA7B","--color-success-bg":"rgba(80,250,123,0.15)","--color-error":"#FF5555","--color-error-bg":"rgba(255,85,85,0.15)","--color-error-border":"rgba(255,85,85,0.2)","--color-accent":"#8BE9FD","--color-accent-strong":"#3b82f6","--color-warning":"#FFB86C","--ctrl-sequence-border":"rgba(148, 163, 184, 0.25)","--ctrl-sequence-bg":"rgba(148, 163, 184, 0.03)","--ctrl-sequence-text":"#94a3b8","--ctrl-parallel-border":"rgba(139, 233, 253, 0.35)","--ctrl-parallel-bg":"rgba(139, 233, 253, 0.03)","--ctrl-parallel-text":"#8be9fd","--ctrl-condition-border":"rgba(251, 191, 36, 0.35)","--ctrl-condition-bg":"rgba(251, 191, 36, 0.03)","--ctrl-condition-text":"#fbbf24","--ctrl-batch-border":"rgba(167, 139, 250, 0.35)","--ctrl-batch-bg":"rgba(167, 139, 250, 0.03)","--ctrl-batch-text":"#a78bfa","--ctrl-folded-bg":"rgba(148, 163, 184, 0.25)","--ctrl-folded-border":"rgba(148, 163, 184, 0.4)","--color-bg":"#0a0a0a","--color-bg-dots":"rgba(255, 255, 255, 0.35)","--color-text-muted":"#94a3b8","--color-controller-text":"#94a3b8"},X3={...vT,"--surface-page":"#f8fafc","--surface-panel":"#ffffff","--surface-overlay":"rgba(255, 255, 255, 0.92)","--surface-overlay-hover":"rgba(241, 245, 249, 0.96)","--surface-overlay-disabled":"rgba(255, 255, 255, 0.7)","--surface-elevated":"rgba(15, 23, 42, 0.05)","--surface-elevated-hover":"rgba(15, 23, 42, 0.09)","--surface-sunken":"rgba(15, 23, 42, 0.03)","--surface-pill":"rgba(15, 23, 42, 0.05)","--surface-pill-border":"rgba(15, 23, 42, 0.1)","--border-subtle":"rgba(15, 23, 42, 0.08)","--border-default":"rgba(15, 23, 42, 0.12)","--border-strong":"rgba(15, 23, 42, 0.22)","--border-dashed":"rgba(15, 23, 42, 0.18)","--text-primary":"#020617","--text-default":"#0f172a","--text-secondary":"#1e293b","--text-muted":"#475569","--text-dim":"#64748b","--text-on-accent":"#ffffff","--shadow-sm":"0 2px 8px rgba(15, 23, 42, 0.08)","--shadow-md":"0 4px 16px rgba(15, 23, 42, 0.14)","--shadow-lg":"0 8px 24px rgba(15, 23, 42, 0.15)","--focus-ring":"rgba(2, 132, 199, 0.5)","--color-pipe":"#dc2626","--color-pipe-bg":"rgba(220, 38, 38, 0.1)","--color-pipe-text":"#ffffff","--color-stuff":"#0891b2","--color-stuff-bg":"rgba(8, 145, 178, 0.08)","--color-stuff-border":"#0e7490","--color-stuff-text":"#0f172a","--color-stuff-text-dim":"#475569","--color-edge":"#64748b","--color-batch-item":"#7c3aed","--color-batch-aggregate":"#15803d","--color-parallel-combine":"#6d28d9","--color-success":"#15803d","--color-success-bg":"rgba(21, 128, 61, 0.12)","--color-error":"#dc2626","--color-error-bg":"rgba(220, 38, 38, 0.1)","--color-error-border":"rgba(220, 38, 38, 0.25)","--color-accent":"#0284c7","--color-accent-strong":"#0284c7","--color-warning":"#d97706","--ctrl-sequence-border":"rgba(71, 85, 105, 0.3)","--ctrl-sequence-bg":"rgba(71, 85, 105, 0.04)","--ctrl-sequence-text":"#475569","--ctrl-parallel-border":"rgba(8, 145, 178, 0.4)","--ctrl-parallel-bg":"rgba(8, 145, 178, 0.05)","--ctrl-parallel-text":"#0e7490","--ctrl-condition-border":"rgba(217, 119, 6, 0.4)","--ctrl-condition-bg":"rgba(217, 119, 6, 0.05)","--ctrl-condition-text":"#b45309","--ctrl-batch-border":"rgba(124, 58, 237, 0.4)","--ctrl-batch-bg":"rgba(124, 58, 237, 0.05)","--ctrl-batch-text":"#6d28d9","--ctrl-folded-bg":"rgba(71, 85, 105, 0.18)","--ctrl-folded-border":"rgba(71, 85, 105, 0.35)","--color-bg":"#f8fafc","--color-bg-dots":"rgba(15, 23, 42, 0.18)","--color-text-muted":"#475569","--color-controller-text":"#475569"};function $f(e){return e===ga.LIGHT?X3:Y3}var Ba={direction:"LR",showControllers:!1,foldMode:no.EXPANDED,theme:yt.SYSTEM,toolbarPosition:un.TOP_RIGHT,nodesep:50,ranksep:100,edgeType:zc.DEFAULT,initialZoom:null,panToTop:!0};var Ha=ne(pe(),1);function q3(e){return e.kind==="pipe"?(0,Ha.jsx)("div",{style:{padding:"10px 14px",display:"flex",flexDirection:"column",gap:"2px",textAlign:"center",width:"100%",boxSizing:"border-box",minWidth:0},title:e.label,children:(0,Ha.jsx)("span",{style:{fontFamily:"var(--font-mono)",fontSize:"13px",fontWeight:600,color:"var(--color-pipe-text)",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.label})}):(0,Ha.jsxs)("div",{style:{padding:"8px 24px",display:"flex",flexDirection:"column",alignItems:"center",gap:"2px",textAlign:"center",width:"100%",boxSizing:"border-box",minWidth:0},title:e.concept?`${e.label}: ${e.concept}`:e.label,children:[(0,Ha.jsx)("span",{style:{fontFamily:"var(--font-mono)",fontSize:"12px",fontWeight:600,color:"var(--color-stuff-text)",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.label}),e.concept&&(0,Ha.jsx)("span",{style:{fontSize:"14px",color:"var(--color-stuff-text-dim)",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.concept})]})}function lr(e){return e.map(t=>t.data.labelDescriptor?{...t,data:{...t.data,label:q3(t.data.labelDescriptor)}}:t)}var $=ne(pe(),1),Z3=15;var j3=(0,$.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),(0,$.jsx)("polyline",{points:"12 5 19 12 12 19"})]}),$3=(0,$.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,$.jsx)("polyline",{points:"19 12 12 19 5 12"})]}),F3=(0,$.jsx)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,$.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})}),K3=(0,$.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,$.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),Q3=(0,$.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("polyline",{points:"15 3 21 3 21 9"}),(0,$.jsx)("polyline",{points:"9 21 3 21 3 15"}),(0,$.jsx)("line",{x1:"21",y1:"3",x2:"14",y2:"10"}),(0,$.jsx)("line",{x1:"3",y1:"21",x2:"10",y2:"14"})]}),W3=(0,$.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z"}),(0,$.jsx)("path",{d:"m7 16.5-4.74-2.85"}),(0,$.jsx)("path",{d:"m7 16.5 5-3"}),(0,$.jsx)("path",{d:"M7 16.5v5.17"}),(0,$.jsx)("path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z"}),(0,$.jsx)("path",{d:"m17 16.5-5-3"}),(0,$.jsx)("path",{d:"m17 16.5 4.74-2.85"}),(0,$.jsx)("path",{d:"M17 16.5v5.17"}),(0,$.jsx)("path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z"}),(0,$.jsx)("path",{d:"M12 8 7.26 5.15"}),(0,$.jsx)("path",{d:"m12 8 4.74-2.85"}),(0,$.jsx)("path",{d:"M12 13.5V8"})]}),J3=(0,$.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"}),(0,$.jsx)("polyline",{points:"2 2 6 6 2 6"}),(0,$.jsx)("polyline",{points:"22 2 18 6 22 6"}),(0,$.jsx)("polyline",{points:"2 22 6 18 2 18"}),(0,$.jsx)("polyline",{points:"22 22 18 18 22 18"})]}),ez=(0,$.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("rect",{x:"9",y:"9",width:"6",height:"6",rx:"1"}),(0,$.jsx)("polyline",{points:"3 3 7 7 3 7"}),(0,$.jsx)("polyline",{points:"21 3 17 7 21 7"}),(0,$.jsx)("polyline",{points:"3 21 7 17 3 17"}),(0,$.jsx)("polyline",{points:"21 21 17 17 21 17"})]}),tz=(0,$.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("circle",{cx:"12",cy:"12",r:"4"}),(0,$.jsx)("line",{x1:"12",y1:"2",x2:"12",y2:"4"}),(0,$.jsx)("line",{x1:"12",y1:"20",x2:"12",y2:"22"}),(0,$.jsx)("line",{x1:"4.93",y1:"4.93",x2:"6.34",y2:"6.34"}),(0,$.jsx)("line",{x1:"17.66",y1:"17.66",x2:"19.07",y2:"19.07"}),(0,$.jsx)("line",{x1:"2",y1:"12",x2:"4",y2:"12"}),(0,$.jsx)("line",{x1:"20",y1:"12",x2:"22",y2:"12"}),(0,$.jsx)("line",{x1:"4.93",y1:"19.07",x2:"6.34",y2:"17.66"}),(0,$.jsx)("line",{x1:"17.66",y1:"6.34",x2:"19.07",y2:"4.93"})]}),nz=(0,$.jsx)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,$.jsx)("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})}),oz=(0,$.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("rect",{x:"2",y:"3",width:"20",height:"14",rx:"2"}),(0,$.jsx)("line",{x1:"8",y1:"21",x2:"16",y2:"21"}),(0,$.jsx)("line",{x1:"12",y1:"17",x2:"12",y2:"21"})]}),pg=[yt.SYSTEM,yt.LIGHT,yt.DARK];function ST(e){let t=pg.indexOf(e);return pg[(t+1)%pg.length]}function iz(e){return e===yt.LIGHT?tz:e===yt.DARK?nz:oz}function bT(e){let t={[yt.SYSTEM]:"system",[yt.LIGHT]:"light",[yt.DARK]:"dark"},n=ST(e);return`Theme: ${t[e]} \u2014 switch to ${t[n]}`}function xT({direction:e,onDirectionChange:t,showControllers:n,onShowControllersChange:o,onZoomIn:i,onZoomOut:a,onFitView:l,onFoldAll:r,onExpandAll:s,foldAllDisabled:u=!1,expandAllDisabled:c=!1,themeMode:d,onThemeModeChange:f,rightOffset:h=0,position:v}){let b=d!==void 0&&f!==void 0,S=m1(v),g=h1(v)==="right"&&h>0?{marginRight:Z3+h}:void 0,m=e===Cn.TB||e===Cn.BT,y=m?"Switch to horizontal layout":"Switch to vertical layout",x=n?"Hide pipe controllers":"Show pipe controllers \u2014 groups pipes by their controlling pipe",_=r||s,E=u?"Fold all controllers (nothing to fold)":"Fold all controllers",C=c?"Expand all controllers (nothing to expand)":"Expand all controllers";return(0,$.jsx)(er,{position:v,className:"graph-toolbar-panel",style:g,children:(0,$.jsxs)("div",{className:`graph-toolbar graph-toolbar--${S}`,children:[r&&(0,$.jsx)("button",{type:"button",className:"graph-toolbar-btn",onClick:r,disabled:u,title:E,"aria-label":E,children:J3}),s&&(0,$.jsx)("button",{type:"button",className:"graph-toolbar-btn",onClick:s,disabled:c,title:C,"aria-label":C,children:ez}),_&&(0,$.jsx)("div",{className:"graph-toolbar-separator"}),(0,$.jsx)("button",{type:"button",className:`graph-toolbar-btn${n?" graph-toolbar-btn--active":""}`,onClick:()=>o(!n),title:x,"aria-label":x,children:W3}),(0,$.jsx)("button",{type:"button",className:"graph-toolbar-btn",onClick:()=>t(m?Cn.LR:Cn.TB),title:y,"aria-label":y,children:m?j3:$3}),(a||i||l)&&(0,$.jsx)("div",{className:"graph-toolbar-separator"}),a&&(0,$.jsx)("button",{type:"button",className:"graph-toolbar-btn",onClick:a,title:"Zoom out","aria-label":"Zoom out",children:F3}),i&&(0,$.jsx)("button",{type:"button",className:"graph-toolbar-btn",onClick:i,title:"Zoom in","aria-label":"Zoom in",children:K3}),l&&(0,$.jsx)("button",{type:"button",className:"graph-toolbar-btn",onClick:l,title:"Fit view","aria-label":"Fit view",children:Q3}),b&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)("div",{className:"graph-toolbar-separator"}),(0,$.jsx)("button",{type:"button",className:"graph-toolbar-btn",onClick:()=>f(ST(d)),title:bT(d),"aria-label":bT(d),children:iz(d)})]})]})})}var ai=ne(pe(),1),az={PipeSequence:{badge:"Sequence",icon:"\u2192"},PipeParallel:{badge:"Parallel",icon:"//"},PipeCondition:{badge:"Condition",icon:"\u25C7"},PipeBatch:{badge:"Batch",icon:"\u2261"}};function lz(e){return e?az[e]:{badge:"",icon:""}}function rz(e){return e?`controller-group--${e.replace("Pipe","").toLowerCase()}`:""}function sz({data:e}){let t=lz(e.pipeType),n=rz(e.pipeType),o=(e.pipeType==="PipeParallel"||e.pipeType==="PipeBatch")&&(e.childCount??0)>Ks,i=o?(e.childCount??0)-Ks:0;return(0,ai.jsxs)("div",{className:`controller-group-node ${n}`,children:[(0,ai.jsxs)("div",{className:"controller-group-header",children:[(0,ai.jsx)("span",{className:"controller-group-icon",children:t.icon}),(0,ai.jsx)("span",{className:"controller-group-badge",children:t.badge}),e.label&&(0,ai.jsx)("span",{className:"controller-group-label",children:e.label}),e.onToggleFold&&(0,ai.jsx)("button",{type:"button",className:"controller-group-fold",title:"Fold controller (alt/option: only this one)","aria-label":"Fold controller",onClick:a=>{a.stopPropagation(),e.onToggleFold?.({soloMode:a.altKey})},children:"\u2921"})]}),o&&(0,ai.jsx)("button",{className:"controller-group-collapse",onClick:a=>{a.stopPropagation(),e.onToggleCollapse?.()},children:e.isCollapsed?`+${i} hidden`:"collapse"})]})}var _T={controllerGroup:sz};var ET=ne(At(),1),Je=ne(pe(),1),uz={PipeLLM:"LLM",PipeExtract:"Extract",PipeCompose:"Compose",PipeImgGen:"ImgGen",PipeSearch:"Search",PipeFunc:"Func",PipeStructure:"Structure",PipeSignature:"Signature",PipeSequence:"Sequence",PipeParallel:"Parallel",PipeCondition:"Condition",PipeBatch:"Batch"},cz={PipeSequence:!0,PipeParallel:!0,PipeCondition:!0,PipeBatch:!0};function fz(e){return e in cz}var dz={succeeded:{color:"#50FA7B",label:"Succeeded"},failed:{color:"#FF5555",label:"Failed"},running:{color:"#8BE9FD",label:"Running"},scheduled:{color:"#6272a4",label:"Scheduled"},skipped:{color:"#6272a4",label:"Skipped"},canceled:{color:"#6272a4",label:"Canceled"}},mg=4;function pz(e){return uz[e]}function Kt({data:e,children:t}){let n=pz(e.pipeType),o=dz[e.status],i=e.status==="running",a=fz(e.pipeType),l=e.pipeType==="PipeSignature",[r,s]=(0,ET.useState)(!1),u=e.inputs.length>mg,c=u&&!r?e.inputs.slice(0,mg):e.inputs,d=e.inputs.length-mg,f=e.direction==="TB"?"pipe-card--tb":"pipe-card--lr",h=a?" pipe-card--controller":"",v=l?" pipe-card--signature":"",b=a?"pipe-card-badge pipe-card-badge--controller":l?"pipe-card-badge pipe-card-badge--signature":"pipe-card-badge";return(0,Je.jsxs)("div",{className:`pipe-card ${f}${h}${v}`,children:[(0,Je.jsxs)("div",{className:"pipe-card-header",children:[(0,Je.jsx)("span",{className:b,children:n}),(0,Je.jsx)("span",{className:"pipe-card-code",title:e.pipeCode,children:e.pipeCode}),(0,Je.jsx)("span",{className:"pipe-card-status",style:{color:o.color},title:o.label,children:(0,Je.jsx)("span",{className:`pipe-card-status-dot ${i?"pipe-card-status-dot--pulse":""}`,style:{background:o.color}})}),e.onExpand&&(0,Je.jsx)("button",{type:"button",className:"pipe-card-expand",title:"Expand controller (alt/option: only this one)","aria-label":"Expand controller",onClick:S=>{S.stopPropagation(),e.onExpand?.({soloMode:S.altKey})},children:"\u2922"})]}),e.description&&(0,Je.jsx)("span",{className:"pipe-card-description",title:e.description,children:e.description}),e.inputs.length>0&&(0,Je.jsxs)("div",{className:"pipe-card-io",children:[(0,Je.jsx)("span",{className:"pipe-card-io-label",children:"INPUTS"}),(0,Je.jsxs)("div",{className:"pipe-card-io-pills",children:[c.map(S=>(0,Je.jsxs)("span",{className:"pipe-card-io-pill",title:`${S.name}: ${S.concept}`,children:[(0,Je.jsx)("span",{className:"pipe-card-io-pill-name",children:S.name}),(0,Je.jsx)("span",{className:"pipe-card-io-pill-concept",children:S.concept})]},S.name)),u&&(0,Je.jsx)("button",{className:"pipe-card-io-more",onClick:S=>{S.stopPropagation(),s(p=>!p)},children:r?"show less":`+${d} more`})]})]}),e.outputs.length>0&&(0,Je.jsxs)("div",{className:"pipe-card-io",children:[(0,Je.jsx)("span",{className:"pipe-card-io-label",children:"OUTPUT"}),(0,Je.jsx)("div",{className:"pipe-card-io-pills",children:e.outputs.map(S=>(0,Je.jsxs)("span",{className:"pipe-card-io-pill",title:`${S.name}: ${S.concept}`,children:[(0,Je.jsx)("span",{className:"pipe-card-io-pill-name",children:S.name}),(0,Je.jsx)("span",{className:"pipe-card-io-pill-concept",children:S.concept})]},S.name))})]}),t]})}var mz={PipeLLM:Kt,PipeExtract:Kt,PipeCompose:Kt,PipeImgGen:Kt,PipeSearch:Kt,PipeFunc:Kt,PipeStructure:Kt,PipeSignature:Kt,PipeSequence:Kt,PipeParallel:Kt,PipeCondition:Kt,PipeBatch:Kt};function TT(e){return mz[e]}var li=ne(pe(),1);function hz({data:e}){let t=TT(e.pipeType)??Kt;return(0,li.jsx)(t,{data:e})}function NT({data:e,sourcePosition:t=W.Bottom,targetPosition:n=W.Top}){let o=e.pipeCardData;return o?(0,li.jsxs)(li.Fragment,{children:[(0,li.jsx)(Oa,{type:"target",position:n}),(0,li.jsx)(hz,{data:o}),(0,li.jsx)(Oa,{type:"source",position:t})]}):null}var Qt=ne(pe(),1),gz={..._T,pipeCard:NT};function yz({nodeId:e,stuffData:t,graphspec:n,resolveStorageUrl:o,canEmbedPdf:i,onOpenExternally:a}){let l=t.concept&&n?Lh(n,t.concept):void 0;return(0,Qt.jsx)(Qt.Fragment,{children:l?(0,Qt.jsx)(rg,{concept:l,ioData:t,instanceKey:e,resolveStorageUrl:o,canEmbedPdf:i,onOpenExternally:a}):(0,Qt.jsx)(If,{stuff:t,resolveStorageUrl:o,canEmbedPdf:i,onOpenExternally:a})})}function vz(e,t){return e===no.FOLDED?new Set(t):new Set}function bz(e,t){return e??t??Ba.theme??yt.SYSTEM}function hg(e,t){return e===yt.SYSTEM?t:e}function Sz(e,t){return e??t??Ba.toolbarPosition}function Qs(e){return e.map(t=>({...t,position:{...t.position},data:{...t.data},style:t.style?{...t.style}:void 0}))}function Ws(e,t){return!t||Object.keys(t).length===0?e:e.map(n=>{let o=n.data.pipeCode;if(!o||!Object.hasOwn(t,o))return n;let i=t[o];return n.data.pipeCardData?.status===i?n:{...n,data:{...n.data,nodeData:n.data.nodeData?{...n.data.nodeData,status:i}:n.data.nodeData,pipeCardData:n.data.pipeCardData?{...n.data.pipeCardData,status:i}:n.data.pipeCardData}}})}function CT(e){let{graphspec:t,config:n=Ba,initialDirection:o,initialShowControllers:i,initialFoldMode:a,hideToolbar:l=!1,theme:r,toolbarPosition:s,systemTheme:u,showThemeToggle:c=!0,onThemeChange:d,onNavigateToPipe:f,onStuffNodeClick:h,onReactFlowInit:v,statusMap:b,onNodeSelect:S,onPaneClick:p,renderDetailExtra:g,resolveStorageUrl:m,canEmbedPdf:y,onOpenExternally:x}=e,_=fe.default.useMemo(()=>t===null?null:Pc(t),[t]),[E,C]=fe.default.useState(()=>o??n.direction??Ba.direction??Cn.TB),A=bz(r,n.theme),[B,M]=fe.default.useState(A),z=fe.default.useRef(A);fe.default.useEffect(()=>{A!==z.current&&(z.current=A,M(A))},[A]);let I=AE(u),T=hg(B,I),D=fe.default.useRef(d);D.current=d;let N=fe.default.useRef({mode:B,resolvedTheme:T});fe.default.useEffect(()=>{let me=N.current;(me.mode!==B||me.resolvedTheme!==T)&&(N.current={mode:B,resolvedTheme:T},D.current?.(B,T))},[B,T]);let O=a??n.foldMode??Ba.foldMode??no.EXPANDED,[R,L]=fe.default.useState(()=>O===no.FOLDED?!0:i??n.showControllers??Ba.showControllers??!1),V=fe.default.useRef(O);V.current=O;let k=fe.default.useRef(null),[G,q]=fe.default.useState(null),[Z,j]=fe.default.useState(null),{width:se,isDragging:ee,handleMouseDown:X}=eT({defaultWidth:380,minWidth:280,maxWidth:800,containerRef:k});fe.default.useEffect(()=>{q(null),j(null)},[_]),fe.default.useEffect(()=>{let me=k.current;if(!me)return;let re=$f(T),ae=n.paletteColors,we=ae?{...re,...ae}:re;for(let[ye,He]of Object.entries(we))me.style.setProperty(ye,He);return()=>{for(let ye of Object.keys(we))me.style.removeProperty(ye)}},[n.paletteColors,T]);let[Q,ue,ge]=xE([]),[ie,te,Te]=_E([]),de=fe.default.useRef(null),be=fe.default.useRef(null),Le=fe.default.useRef(null),Be=fe.default.useRef(null),[dt,Gt]=fe.default.useState(new Set),hn=fe.default.useCallback(me=>{Gt(re=>{let ae=new Set(re);return ae.has(me)?ae.delete(me):ae.add(me),ae})},[]),[rt,Rn]=fe.default.useState(new Set),Wt=fe.default.useCallback((me,re)=>{Rn(ae=>{let we=new Set(ae),ye=!we.has(me),He=Le.current,wt=!re?.soloMode&&He?.graphspec&&He.analysis?cT(me,He.graphspec,He.analysis.controllerNodeIds):new Set([me]);for(let Wn of wt)ye?we.add(Wn):we.delete(Wn);return we})},[]),Jt=n.edgeType||zc.DEFAULT,St=fe.default.useMemo(()=>({nodesep:n.nodesep,ranksep:n.ranksep}),[n.nodesep,n.ranksep]),$e=fe.default.useRef(R);$e.current=R;let ro=fe.default.useRef(E);ro.current=E;let ri=fe.default.useRef(St);ri.current=St;let $n=fe.default.useRef(n.initialZoom);$n.current=n.initialZoom;let si=fe.default.useRef(n.panToTop);si.current=n.panToTop;let Fn=fe.default.useRef(dt);Fn.current=dt;let On=fe.default.useRef(hn);On.current=hn;let No=fe.default.useRef(rt);No.current=rt;let pt=fe.default.useRef(Wt);pt.current=Wt;let Kn=fe.default.useRef(!0),Qn=fe.default.useRef(0),Co=fe.default.useRef(!1),wo=fe.default.useRef(b);wo.current=b,fe.default.useEffect(()=>{if(!be.current)return;let me=!1;return(async()=>{try{let re=be.current;if(!re)return;let ae=await jf(re.nodes,re.edges,E,St,re._graphspec,re._analysis);if(me)return;Be.current={nodes:ae.nodes,edges:ae.edges,controllerPositions:ae.controllerPositions};let we=ar(Qs(ae.nodes),ae.edges,re._graphspec,re._analysis,$e.current,Fn.current,On.current,ae.controllerPositions,pt.current);ue(Ws(nr(lr(we.nodes)),wo.current)),te(or(we.edges)),setTimeout(()=>{!me&&de.current&&de.current.fitView({padding:.1})},50)}catch(re){console.error("[GraphViewer] ELK layout failed:",re)}})(),()=>{me=!0}},[E,St]),fe.default.useEffect(()=>{if(!Be.current||!be.current)return;let me=Qs(Be.current.nodes),re=Be.current.edges,ae=ar(me,re,be.current._graphspec,be.current._analysis,R,dt,hn,Be.current.controllerPositions,Wt);ue(Ws(nr(lr(ae.nodes)),wo.current)),te(or(ae.edges))},[R,dt,hn,Wt]),fe.default.useEffect(()=>{if(!_){be.current=null,Le.current=null,Be.current=null,ue([]),te([]);return}let me=!1;Gt(new Set),Fn.current=new Set;let{graphData:re,analysis:ae}=sT(_,Jt);Le.current={nodes:re.nodes,edges:re.edges,analysis:ae,graphspec:_};let we=ae?vz(V.current,ae.controllerNodeIds):new Set;Rn(we),No.current=we,Co.current=we.size>0,Qn.current=we.size,we.size>0&&!$e.current&&(L(!0),$e.current=!0);let ye=we.size>0&&ae?sg({nodes:re.nodes,edges:re.edges},ae,_,we,pt.current):{nodes:re.nodes,edges:re.edges,analysis:ae};return be.current={nodes:ye.nodes,edges:ye.edges,_analysis:ye.analysis,_graphspec:_},(async()=>{try{let He=ro.current,wt=ri.current,zn=ye.nodes.some(xt=>!xt.position||xt.position.x===0&&xt.position.y===0)?await jf(ye.nodes,ye.edges,He,wt,_,ye.analysis):{nodes:ye.nodes,edges:ye.edges,controllerPositions:{}};if(me)return;Be.current={nodes:zn.nodes,edges:zn.edges,controllerPositions:zn.controllerPositions};let fi=ar(Qs(zn.nodes),zn.edges,_,ye.analysis,$e.current,Fn.current,On.current,zn.controllerPositions,pt.current);ue(Ws(nr(lr(fi.nodes)),wo.current)),te(or(fi.edges)),setTimeout(()=>{if(!me&&de.current&&(de.current.fitView({padding:.1}),$n.current!==void 0&&$n.current!==null&&de.current.zoomTo($n.current),si.current)){let xt=de.current.getViewport();de.current.setViewport({x:xt.x,y:20,zoom:xt.zoom})}},100)}catch(He){console.error("[GraphViewer] ELK layout failed:",He)}})(),()=>{me=!0}},[_,Jt]),fe.default.useEffect(()=>{if(Kn.current){Kn.current=!1,Qn.current=rt.size;return}if(Co.current){Co.current=!1,Qn.current=rt.size;return}let me=Qn.current;if(Qn.current=rt.size,me===0&&rt.size===0||!Le.current||!Le.current.analysis)return;let re=Le.current,ae=re.graphspec,we=re.analysis;if(!ae||!we)return;let ye=!1,He=sg({nodes:re.nodes,edges:re.edges},we,ae,rt,Wt);return be.current={nodes:He.nodes,edges:He.edges,_analysis:He.analysis,_graphspec:ae},(async()=>{try{let wt=await jf(He.nodes,He.edges,ro.current,ri.current,ae,He.analysis);if(ye)return;Be.current={nodes:wt.nodes,edges:wt.edges,controllerPositions:wt.controllerPositions};let Wn=ar(Qs(wt.nodes),wt.edges,ae,He.analysis,$e.current,Fn.current,On.current,wt.controllerPositions,pt.current);ue(Ws(nr(lr(Wn.nodes)),wo.current)),te(or(Wn.edges)),setTimeout(()=>{!ye&&de.current&&de.current.fitView({padding:.1})},50)}catch(wt){console.error("[GraphViewer] ELK layout failed:",wt)}})(),()=>{ye=!0}},[rt,Wt]),fe.default.useEffect(()=>{if(!Be.current||!be.current)return;let me=Qs(Be.current.nodes),re=Be.current.edges,ae=ar(me,re,be.current._graphspec,be.current._analysis,$e.current,Fn.current,On.current,Be.current.controllerPositions,pt.current);ue(Ws(nr(lr(ae.nodes)),b)),te(or(ae.edges))},[b]);let ui=fe.default.useCallback((me,re)=>{let ae=re.data;if(S?.(re.id,ae,me),ae.isController||ae.isPipe){let we=ae.pipeCode||ae.labelText;we&&f&&f(we,ae.pipeCardData?.status)}else if(ae.isStuff&&h&&_){let we=ps(re.id),ye=Hh(_,we);ye&&h(ye)}if(j(null),G?.nodeId===re.id&&!Z)q(null);else if(ae.isPipe||ae.isController)q({kind:"pipe",nodeId:re.id,nodeData:ae});else if(ae.isStuff&&_){let we=ps(re.id),ye=Hh(_,we);q({kind:"stuff",nodeId:re.id,nodeData:ae,stuffData:ye??void 0})}ue(we=>we.map(ye=>({...ye,selected:ye.id===re.id})))},[ue,f,S,h,_,G,Z]),ci=fe.default.useCallback(me=>{de.current=me,v&&v(me)},[v]),ka=fe.default.useCallback(()=>{q(null),j(null),p?.()},[p]),Ao=fe.default.useCallback(me=>{if(!_)return;let re=Lh(_,me);re&&j(re)},[_]),Ga=G?.kind==="pipe"&&_?_.nodes.find(me=>me.pipe_code===G.nodeData.pipeCode):void 0,Ua=G!==null||Z!==null,We=Sz(s,n.toolbarPosition),Do=Le.current?.analysis?.controllerNodeIds,Ro=fe.default.useMemo(()=>!R||!Do||Do.size===0?{onFoldAll:void 0,onExpandAll:void 0,foldAllDisabled:!1,expandAllDisabled:!1}:{onFoldAll:()=>Rn(new Set(Do)),onExpandAll:()=>Rn(new Set),foldAllDisabled:rt.size===Do.size,expandAllDisabled:rt.size===0},[R,Do,rt]);return(0,Qt.jsxs)("div",{ref:k,className:`react-flow-container react-flow-container--theme-${T} react-flow-container--mode-${B}`,children:[(0,Qt.jsxs)(SE,{nodes:Q,edges:ie,nodeTypes:gz,onNodesChange:ge,onEdgesChange:Te,onNodeClick:ui,onPaneClick:ka,onInit:ci,fitView:!0,fitViewOptions:{padding:.1},defaultEdgeOptions:{type:Jt},panOnScroll:!0,minZoom:.1,proOptions:{hideAttribution:!0},panActivationKeyCode:null,children:[(0,Qt.jsx)(TE,{variant:xo.Dots,gap:20,size:1,color:"var(--color-bg-dots)"}),!l&&(0,Qt.jsx)(xT,{direction:E,onDirectionChange:C,showControllers:R,onShowControllersChange:L,onZoomIn:()=>{de.current?.zoomIn()},onZoomOut:()=>{de.current?.zoomOut()},onFitView:()=>{de.current?.fitView({padding:.1})},onFoldAll:Ro.onFoldAll,onExpandAll:Ro.onExpandAll,foldAllDisabled:Ro.foldAllDisabled,expandAllDisabled:Ro.expandAllDisabled,themeMode:c?B:void 0,onThemeModeChange:c?M:void 0,rightOffset:Ua?se:0,position:We})]}),(0,Qt.jsxs)(JE,{isOpen:Ua,onClose:ka,width:se,isDragging:ee,onResizeHandleMouseDown:X,children:[Z?(0,Qt.jsx)(rg,{concept:Z}):Ga&&_?(0,Qt.jsx)(rT,{node:Ga,spec:_,onConceptClick:Ao}):G?.stuffData?(0,Qt.jsx)(yz,{nodeId:G.nodeId,stuffData:G.stuffData,graphspec:_,resolveStorageUrl:m,canEmbedPdf:y,onOpenExternally:x}):null,g&&G&&!Z&&g(G.nodeId,G.nodeData)]})]})}function xz(e){if(e==null)return no.EXPANDED;if(e===no.FOLDED||e===no.EXPANDED||e===no.AUTO)return e;throw new Error(`Invalid foldMode in standalone config: ${JSON.stringify(e)} \u2014 expected one of "folded", "expanded", "auto".`)}function _z(e){if(e==null)return yt.SYSTEM;if(e===yt.LIGHT||e===yt.DARK||e===yt.SYSTEM)return e;throw new Error(`Invalid theme in standalone config: ${JSON.stringify(e)} \u2014 expected one of "dark", "light", "system".`)}function Ez(e){if(e==null)return Cn.LR;if(e===Cn.LR||e===Cn.RL||e===Cn.TB||e===Cn.BT)return e;throw new Error(`Invalid direction in standalone config: ${JSON.stringify(e)} \u2014 expected one of "TB", "BT", "LR", "RL".`)}function Tz(e){if(e==null)return;let t=Object.values(un);if(t.includes(e))return e;throw new Error(`Invalid toolbarPosition in standalone config: ${JSON.stringify(e)} \u2014 expected one of ${t.map(n=>`"${n}"`).join(", ")}.`)}function gg(e,t){let n=e&&typeof e=="object"?e:{},o=Ez(n.direction),i=!!n.showControllers,a=xz(n.foldMode),l=_z(n.theme),r=Tz(n.toolbarPosition);return{graphspec:t,config:{...n,direction:o,showControllers:i,foldMode:a,theme:l,toolbarPosition:r},initialDirection:o,initialShowControllers:i,initialFoldMode:a,theme:l}}function wT(e,t){let n=e?.trim();if(!n)return null;try{return JSON.parse(n)}catch(o){let i=o instanceof Error?o.message:String(o);throw new Error(`Failed to parse JSON from <script id="${t}">: ${i}`)}}var Js=gg({},null),yg=null;function AT(e){return wT(document.getElementById(e)?.textContent,e)}function Nz(e,t){let n=$f(e),o=t?{...n,...t}:n;for(let[i,a]of Object.entries(o))document.body.style.setProperty(i,a)}function RT(e,t){document.body.setAttribute("data-theme",e),Nz(t,Js.config.paletteColors)}function Cz(){return Pa.default.createElement(CT,{...Js,onThemeChange:(e,t)=>{RT(e,t)}})}function wz({message:e}){return Pa.default.createElement("div",{className:"standalone-error",role:"alert"},Pa.default.createElement("strong",{className:"standalone-error-title"},"Failed to render method graph"),Pa.default.createElement("pre",{className:"standalone-error-message"},e))}function MT(){let e=document.getElementById("root");if(!e)return;let t=(0,DT.createRoot)(e);yg=()=>{t.render(Pa.default.createElement(Cz))},yg(),setTimeout(()=>{try{let n=AT("pipelex-config"),o=AT("pipelex-graphspec"),i=o===null?null:Pc(o);Js=gg(n,i),RT(Js.theme,hg(Js.theme,zh())),yg?.()}catch(n){let o=n instanceof Error?n.message:String(n);t.render(Pa.default.createElement(wz,{message:o}))}},0)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",MT):MT();})();
|
|
18
18
|
/*! Bundled license information:
|
|
19
19
|
|
|
20
20
|
react/cjs/react.production.js:
|