@super-line/control-center 0.6.0 → 0.8.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/README.md +14 -4
- package/dist/assets/index-Bele0oQ7.js +184 -0
- package/dist/assets/index-BgBcrhfG.css +1 -0
- package/dist/index.html +2 -2
- package/package.json +5 -4
- package/dist/assets/index-B9KuAB92.js +0 -167
- package/dist/assets/index-BKEls6_1.css +0 -1
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))s(a);new MutationObserver(a=>{for(const u of a)if(u.type==="childList")for(const c of u.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&s(c)}).observe(document,{childList:!0,subtree:!0});function i(a){const u={};return a.integrity&&(u.integrity=a.integrity),a.referrerPolicy&&(u.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?u.credentials="include":a.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function s(a){if(a.ep)return;a.ep=!0;const u=i(a);fetch(a.href,u)}})();function Dh(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Mu={exports:{}},si={},Pu={exports:{}},Ce={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react.production.min.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var lp;function _y(){if(lp)return Ce;lp=1;var t=Symbol.for("react.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),g=Symbol.iterator;function y(b){return b===null||typeof b!="object"?null:(b=g&&b[g]||b["@@iterator"],typeof b=="function"?b:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,C={};function S(b,T,te){this.props=b,this.context=T,this.refs=C,this.updater=te||w}S.prototype.isReactComponent={},S.prototype.setState=function(b,T){if(typeof b!="object"&&typeof b!="function"&&b!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,b,T,"setState")},S.prototype.forceUpdate=function(b){this.updater.enqueueForceUpdate(this,b,"forceUpdate")};function E(){}E.prototype=S.prototype;function I(b,T,te){this.props=b,this.context=T,this.refs=C,this.updater=te||w}var N=I.prototype=new E;N.constructor=I,_(N,S.prototype),N.isPureReactComponent=!0;var M=Array.isArray,F=Object.prototype.hasOwnProperty,A={current:null},W={key:!0,ref:!0,__self:!0,__source:!0};function G(b,T,te){var oe,ae={},ce=null,ue=null;if(T!=null)for(oe in T.ref!==void 0&&(ue=T.ref),T.key!==void 0&&(ce=""+T.key),T)F.call(T,oe)&&!W.hasOwnProperty(oe)&&(ae[oe]=T[oe]);var Z=arguments.length-2;if(Z===1)ae.children=te;else if(1<Z){for(var se=Array(Z),ge=0;ge<Z;ge++)se[ge]=arguments[ge+2];ae.children=se}if(b&&b.defaultProps)for(oe in Z=b.defaultProps,Z)ae[oe]===void 0&&(ae[oe]=Z[oe]);return{$$typeof:t,type:b,key:ce,ref:ue,props:ae,_owner:A.current}}function q(b,T){return{$$typeof:t,type:b.type,key:T,ref:b.ref,props:b.props,_owner:b._owner}}function ee(b){return typeof b=="object"&&b!==null&&b.$$typeof===t}function D(b){var T={"=":"=0",":":"=2"};return"$"+b.replace(/[=:]/g,function(te){return T[te]})}var V=/\/+/g;function J(b,T){return typeof b=="object"&&b!==null&&b.key!=null?D(""+b.key):T.toString(36)}function z(b,T,te,oe,ae){var ce=typeof b;(ce==="undefined"||ce==="boolean")&&(b=null);var ue=!1;if(b===null)ue=!0;else switch(ce){case"string":case"number":ue=!0;break;case"object":switch(b.$$typeof){case t:case r:ue=!0}}if(ue)return ue=b,ae=ae(ue),b=oe===""?"."+J(ue,0):oe,M(ae)?(te="",b!=null&&(te=b.replace(V,"$&/")+"/"),z(ae,T,te,"",function(ge){return ge})):ae!=null&&(ee(ae)&&(ae=q(ae,te+(!ae.key||ue&&ue.key===ae.key?"":(""+ae.key).replace(V,"$&/")+"/")+b)),T.push(ae)),1;if(ue=0,oe=oe===""?".":oe+":",M(b))for(var Z=0;Z<b.length;Z++){ce=b[Z];var se=oe+J(ce,Z);ue+=z(ce,T,te,se,ae)}else if(se=y(b),typeof se=="function")for(b=se.call(b),Z=0;!(ce=b.next()).done;)ce=ce.value,se=oe+J(ce,Z++),ue+=z(ce,T,te,se,ae);else if(ce==="object")throw T=String(b),Error("Objects are not valid as a React child (found: "+(T==="[object Object]"?"object with keys {"+Object.keys(b).join(", ")+"}":T)+"). If you meant to render a collection of children, use an array instead.");return ue}function Y(b,T,te){if(b==null)return b;var oe=[],ae=0;return z(b,oe,"","",function(ce){return T.call(te,ce,ae++)}),oe}function O(b){if(b._status===-1){var T=b._result;T=T(),T.then(function(te){(b._status===0||b._status===-1)&&(b._status=1,b._result=te)},function(te){(b._status===0||b._status===-1)&&(b._status=2,b._result=te)}),b._status===-1&&(b._status=0,b._result=T)}if(b._status===1)return b._result.default;throw b._result}var U={current:null},L={transition:null},j={ReactCurrentDispatcher:U,ReactCurrentBatchConfig:L,ReactCurrentOwner:A};function H(){throw Error("act(...) is not supported in production builds of React.")}return Ce.Children={map:Y,forEach:function(b,T,te){Y(b,function(){T.apply(this,arguments)},te)},count:function(b){var T=0;return Y(b,function(){T++}),T},toArray:function(b){return Y(b,function(T){return T})||[]},only:function(b){if(!ee(b))throw Error("React.Children.only expected to receive a single React element child.");return b}},Ce.Component=S,Ce.Fragment=i,Ce.Profiler=a,Ce.PureComponent=I,Ce.StrictMode=s,Ce.Suspense=h,Ce.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=j,Ce.act=H,Ce.cloneElement=function(b,T,te){if(b==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+b+".");var oe=_({},b.props),ae=b.key,ce=b.ref,ue=b._owner;if(T!=null){if(T.ref!==void 0&&(ce=T.ref,ue=A.current),T.key!==void 0&&(ae=""+T.key),b.type&&b.type.defaultProps)var Z=b.type.defaultProps;for(se in T)F.call(T,se)&&!W.hasOwnProperty(se)&&(oe[se]=T[se]===void 0&&Z!==void 0?Z[se]:T[se])}var se=arguments.length-2;if(se===1)oe.children=te;else if(1<se){Z=Array(se);for(var ge=0;ge<se;ge++)Z[ge]=arguments[ge+2];oe.children=Z}return{$$typeof:t,type:b.type,key:ae,ref:ce,props:oe,_owner:ue}},Ce.createContext=function(b){return b={$$typeof:c,_currentValue:b,_currentValue2:b,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},b.Provider={$$typeof:u,_context:b},b.Consumer=b},Ce.createElement=G,Ce.createFactory=function(b){var T=G.bind(null,b);return T.type=b,T},Ce.createRef=function(){return{current:null}},Ce.forwardRef=function(b){return{$$typeof:f,render:b}},Ce.isValidElement=ee,Ce.lazy=function(b){return{$$typeof:v,_payload:{_status:-1,_result:b},_init:O}},Ce.memo=function(b,T){return{$$typeof:m,type:b,compare:T===void 0?null:T}},Ce.startTransition=function(b){var T=L.transition;L.transition={};try{b()}finally{L.transition=T}},Ce.unstable_act=H,Ce.useCallback=function(b,T){return U.current.useCallback(b,T)},Ce.useContext=function(b){return U.current.useContext(b)},Ce.useDebugValue=function(){},Ce.useDeferredValue=function(b){return U.current.useDeferredValue(b)},Ce.useEffect=function(b,T){return U.current.useEffect(b,T)},Ce.useId=function(){return U.current.useId()},Ce.useImperativeHandle=function(b,T,te){return U.current.useImperativeHandle(b,T,te)},Ce.useInsertionEffect=function(b,T){return U.current.useInsertionEffect(b,T)},Ce.useLayoutEffect=function(b,T){return U.current.useLayoutEffect(b,T)},Ce.useMemo=function(b,T){return U.current.useMemo(b,T)},Ce.useReducer=function(b,T,te){return U.current.useReducer(b,T,te)},Ce.useRef=function(b){return U.current.useRef(b)},Ce.useState=function(b){return U.current.useState(b)},Ce.useSyncExternalStore=function(b,T,te){return U.current.useSyncExternalStore(b,T,te)},Ce.useTransition=function(){return U.current.useTransition()},Ce.version="18.3.1",Ce}var ap;function Ni(){return ap||(ap=1,Pu.exports=_y()),Pu.exports}/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react-jsx-runtime.production.min.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var up;function Ey(){if(up)return si;up=1;var t=Ni(),r=Symbol.for("react.element"),i=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,a=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u={key:!0,ref:!0,__self:!0,__source:!0};function c(f,h,m){var v,g={},y=null,w=null;m!==void 0&&(y=""+m),h.key!==void 0&&(y=""+h.key),h.ref!==void 0&&(w=h.ref);for(v in h)s.call(h,v)&&!u.hasOwnProperty(v)&&(g[v]=h[v]);if(f&&f.defaultProps)for(v in h=f.defaultProps,h)g[v]===void 0&&(g[v]=h[v]);return{$$typeof:r,type:f,key:y,ref:w,props:g,_owner:a.current}}return si.Fragment=i,si.jsx=c,si.jsxs=c,si}var cp;function Ny(){return cp||(cp=1,Mu.exports=Ey()),Mu.exports}var k=Ny(),B=Ni();const Cy=Dh(B);var Qs={},zu={exports:{}},xt={},Iu={exports:{}},ju={};/**
|
|
18
|
-
* @license React
|
|
19
|
-
* scheduler.production.min.js
|
|
20
|
-
*
|
|
21
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
22
|
-
*
|
|
23
|
-
* This source code is licensed under the MIT license found in the
|
|
24
|
-
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/var dp;function by(){return dp||(dp=1,(function(t){function r(L,j){var H=L.length;L.push(j);e:for(;0<H;){var b=H-1>>>1,T=L[b];if(0<a(T,j))L[b]=j,L[H]=T,H=b;else break e}}function i(L){return L.length===0?null:L[0]}function s(L){if(L.length===0)return null;var j=L[0],H=L.pop();if(H!==j){L[0]=H;e:for(var b=0,T=L.length,te=T>>>1;b<te;){var oe=2*(b+1)-1,ae=L[oe],ce=oe+1,ue=L[ce];if(0>a(ae,H))ce<T&&0>a(ue,ae)?(L[b]=ue,L[ce]=H,b=ce):(L[b]=ae,L[oe]=H,b=oe);else if(ce<T&&0>a(ue,H))L[b]=ue,L[ce]=H,b=ce;else break e}}return j}function a(L,j){var H=L.sortIndex-j.sortIndex;return H!==0?H:L.id-j.id}if(typeof performance=="object"&&typeof performance.now=="function"){var u=performance;t.unstable_now=function(){return u.now()}}else{var c=Date,f=c.now();t.unstable_now=function(){return c.now()-f}}var h=[],m=[],v=1,g=null,y=3,w=!1,_=!1,C=!1,S=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,I=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function N(L){for(var j=i(m);j!==null;){if(j.callback===null)s(m);else if(j.startTime<=L)s(m),j.sortIndex=j.expirationTime,r(h,j);else break;j=i(m)}}function M(L){if(C=!1,N(L),!_)if(i(h)!==null)_=!0,O(F);else{var j=i(m);j!==null&&U(M,j.startTime-L)}}function F(L,j){_=!1,C&&(C=!1,E(G),G=-1),w=!0;var H=y;try{for(N(j),g=i(h);g!==null&&(!(g.expirationTime>j)||L&&!D());){var b=g.callback;if(typeof b=="function"){g.callback=null,y=g.priorityLevel;var T=b(g.expirationTime<=j);j=t.unstable_now(),typeof T=="function"?g.callback=T:g===i(h)&&s(h),N(j)}else s(h);g=i(h)}if(g!==null)var te=!0;else{var oe=i(m);oe!==null&&U(M,oe.startTime-j),te=!1}return te}finally{g=null,y=H,w=!1}}var A=!1,W=null,G=-1,q=5,ee=-1;function D(){return!(t.unstable_now()-ee<q)}function V(){if(W!==null){var L=t.unstable_now();ee=L;var j=!0;try{j=W(!0,L)}finally{j?J():(A=!1,W=null)}}else A=!1}var J;if(typeof I=="function")J=function(){I(V)};else if(typeof MessageChannel<"u"){var z=new MessageChannel,Y=z.port2;z.port1.onmessage=V,J=function(){Y.postMessage(null)}}else J=function(){S(V,0)};function O(L){W=L,A||(A=!0,J())}function U(L,j){G=S(function(){L(t.unstable_now())},j)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(L){L.callback=null},t.unstable_continueExecution=function(){_||w||(_=!0,O(F))},t.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):q=0<L?Math.floor(1e3/L):5},t.unstable_getCurrentPriorityLevel=function(){return y},t.unstable_getFirstCallbackNode=function(){return i(h)},t.unstable_next=function(L){switch(y){case 1:case 2:case 3:var j=3;break;default:j=y}var H=y;y=j;try{return L()}finally{y=H}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(L,j){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var H=y;y=L;try{return j()}finally{y=H}},t.unstable_scheduleCallback=function(L,j,H){var b=t.unstable_now();switch(typeof H=="object"&&H!==null?(H=H.delay,H=typeof H=="number"&&0<H?b+H:b):H=b,L){case 1:var T=-1;break;case 2:T=250;break;case 5:T=1073741823;break;case 4:T=1e4;break;default:T=5e3}return T=H+T,L={id:v++,callback:j,priorityLevel:L,startTime:H,expirationTime:T,sortIndex:-1},H>b?(L.sortIndex=H,r(m,L),i(h)===null&&L===i(m)&&(C?(E(G),G=-1):C=!0,U(M,H-b))):(L.sortIndex=T,r(h,L),_||w||(_=!0,O(F))),L},t.unstable_shouldYield=D,t.unstable_wrapCallback=function(L){var j=y;return function(){var H=y;y=j;try{return L.apply(this,arguments)}finally{y=H}}}})(ju)),ju}var fp;function My(){return fp||(fp=1,Iu.exports=by()),Iu.exports}/**
|
|
26
|
-
* @license React
|
|
27
|
-
* react-dom.production.min.js
|
|
28
|
-
*
|
|
29
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
30
|
-
*
|
|
31
|
-
* This source code is licensed under the MIT license found in the
|
|
32
|
-
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var pp;function Py(){if(pp)return xt;pp=1;var t=Ni(),r=My();function i(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,o=1;o<arguments.length;o++)n+="&args[]="+encodeURIComponent(arguments[o]);return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var s=new Set,a={};function u(e,n){c(e,n),c(e+"Capture",n)}function c(e,n){for(a[e]=n,e=0;e<n.length;e++)s.add(n[e])}var f=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),h=Object.prototype.hasOwnProperty,m=/^[: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]*$/,v={},g={};function y(e){return h.call(g,e)?!0:h.call(v,e)?!1:m.test(e)?g[e]=!0:(v[e]=!0,!1)}function w(e,n,o,l){if(o!==null&&o.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return l?!1:o!==null?!o.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function _(e,n,o,l){if(n===null||typeof n>"u"||w(e,n,o,l))return!0;if(l)return!1;if(o!==null)switch(o.type){case 3:return!n;case 4:return n===!1;case 5:return isNaN(n);case 6:return isNaN(n)||1>n}return!1}function C(e,n,o,l,d,p,x){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=l,this.attributeNamespace=d,this.mustUseProperty=o,this.propertyName=e,this.type=n,this.sanitizeURL=p,this.removeEmptyString=x}var S={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){S[e]=new C(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];S[n]=new C(n,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){S[e]=new C(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){S[e]=new C(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){S[e]=new C(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){S[e]=new C(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){S[e]=new C(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){S[e]=new C(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){S[e]=new C(e,5,!1,e.toLowerCase(),null,!1,!1)});var E=/[\-:]([a-z])/g;function I(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var n=e.replace(E,I);S[n]=new C(n,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var n=e.replace(E,I);S[n]=new C(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var n=e.replace(E,I);S[n]=new C(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){S[e]=new C(e,1,!1,e.toLowerCase(),null,!1,!1)}),S.xlinkHref=new C("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){S[e]=new C(e,1,!1,e.toLowerCase(),null,!0,!0)});function N(e,n,o,l){var d=S.hasOwnProperty(n)?S[n]:null;(d!==null?d.type!==0:l||!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(_(n,o,d,l)&&(o=null),l||d===null?y(n)&&(o===null?e.removeAttribute(n):e.setAttribute(n,""+o)):d.mustUseProperty?e[d.propertyName]=o===null?d.type===3?!1:"":o:(n=d.attributeName,l=d.attributeNamespace,o===null?e.removeAttribute(n):(d=d.type,o=d===3||d===4&&o===!0?"":""+o,l?e.setAttributeNS(l,n,o):e.setAttribute(n,o))))}var M=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,F=Symbol.for("react.element"),A=Symbol.for("react.portal"),W=Symbol.for("react.fragment"),G=Symbol.for("react.strict_mode"),q=Symbol.for("react.profiler"),ee=Symbol.for("react.provider"),D=Symbol.for("react.context"),V=Symbol.for("react.forward_ref"),J=Symbol.for("react.suspense"),z=Symbol.for("react.suspense_list"),Y=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),U=Symbol.for("react.offscreen"),L=Symbol.iterator;function j(e){return e===null||typeof e!="object"?null:(e=L&&e[L]||e["@@iterator"],typeof e=="function"?e:null)}var H=Object.assign,b;function T(e){if(b===void 0)try{throw Error()}catch(o){var n=o.stack.trim().match(/\n( *(at )?)/);b=n&&n[1]||""}return`
|
|
34
|
-
`+b+e}var te=!1;function oe(e,n){if(!e||te)return"";te=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(n)if(n=function(){throw Error()},Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(n,[])}catch(K){var l=K}Reflect.construct(e,[],n)}else{try{n.call()}catch(K){l=K}e.call(n.prototype)}else{try{throw Error()}catch(K){l=K}e()}}catch(K){if(K&&l&&typeof K.stack=="string"){for(var d=K.stack.split(`
|
|
35
|
-
`),p=l.stack.split(`
|
|
36
|
-
`),x=d.length-1,P=p.length-1;1<=x&&0<=P&&d[x]!==p[P];)P--;for(;1<=x&&0<=P;x--,P--)if(d[x]!==p[P]){if(x!==1||P!==1)do if(x--,P--,0>P||d[x]!==p[P]){var R=`
|
|
37
|
-
`+d[x].replace(" at new "," at ");return e.displayName&&R.includes("<anonymous>")&&(R=R.replace("<anonymous>",e.displayName)),R}while(1<=x&&0<=P);break}}}finally{te=!1,Error.prepareStackTrace=o}return(e=e?e.displayName||e.name:"")?T(e):""}function ae(e){switch(e.tag){case 5:return T(e.type);case 16:return T("Lazy");case 13:return T("Suspense");case 19:return T("SuspenseList");case 0:case 2:case 15:return e=oe(e.type,!1),e;case 11:return e=oe(e.type.render,!1),e;case 1:return e=oe(e.type,!0),e;default:return""}}function ce(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case W:return"Fragment";case A:return"Portal";case q:return"Profiler";case G:return"StrictMode";case J:return"Suspense";case z:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case D:return(e.displayName||"Context")+".Consumer";case ee:return(e._context.displayName||"Context")+".Provider";case V:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Y:return n=e.displayName||null,n!==null?n:ce(e.type)||"Memo";case O:n=e._payload,e=e._init;try{return ce(e(n))}catch{}}return null}function ue(e){var n=e.type;switch(e.tag){case 24:return"Cache";case 9:return(n.displayName||"Context")+".Consumer";case 10:return(n._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=n.render,e=e.displayName||e.name||"",n.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ce(n);case 8:return n===G?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n}return null}function Z(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function se(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function ge(e){var n=se(e)?"checked":"value",o=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),l=""+e[n];if(!e.hasOwnProperty(n)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var d=o.get,p=o.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return d.call(this)},set:function(x){l=""+x,p.call(this,x)}}),Object.defineProperty(e,n,{enumerable:o.enumerable}),{getValue:function(){return l},setValue:function(x){l=""+x},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function we(e){e._valueTracker||(e._valueTracker=ge(e))}function ve(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var o=n.getValue(),l="";return e&&(l=se(e)?e.checked?"true":"false":e.value),e=l,e!==o?(n.setValue(e),!0):!1}function me(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Ee(e,n){var o=n.checked;return H({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:o??e._wrapperState.initialChecked})}function Me(e,n){var o=n.defaultValue==null?"":n.defaultValue,l=n.checked!=null?n.checked:n.defaultChecked;o=Z(n.value!=null?n.value:o),e._wrapperState={initialChecked:l,initialValue:o,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function Ie(e,n){n=n.checked,n!=null&&N(e,"checked",n,!1)}function Re(e,n){Ie(e,n);var o=Z(n.value),l=n.type;if(o!=null)l==="number"?(o===0&&e.value===""||e.value!=o)&&(e.value=""+o):e.value!==""+o&&(e.value=""+o);else if(l==="submit"||l==="reset"){e.removeAttribute("value");return}n.hasOwnProperty("value")?ft(e,n.type,o):n.hasOwnProperty("defaultValue")&&ft(e,n.type,Z(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(e.defaultChecked=!!n.defaultChecked)}function ut(e,n,o){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var l=n.type;if(!(l!=="submit"&&l!=="reset"||n.value!==void 0&&n.value!==null))return;n=""+e._wrapperState.initialValue,o||n===e.value||(e.value=n),e.defaultValue=n}o=e.name,o!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,o!==""&&(e.name=o)}function ft(e,n,o){(n!=="number"||me(e.ownerDocument)!==e)&&(o==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+o&&(e.defaultValue=""+o))}var rt=Array.isArray;function ot(e,n,o,l){if(e=e.options,n){n={};for(var d=0;d<o.length;d++)n["$"+o[d]]=!0;for(o=0;o<e.length;o++)d=n.hasOwnProperty("$"+e[o].value),e[o].selected!==d&&(e[o].selected=d),d&&l&&(e[o].defaultSelected=!0)}else{for(o=""+Z(o),n=null,d=0;d<e.length;d++){if(e[d].value===o){e[d].selected=!0,l&&(e[d].defaultSelected=!0);return}n!==null||e[d].disabled||(n=e[d])}n!==null&&(n.selected=!0)}}function ln(e,n){if(n.dangerouslySetInnerHTML!=null)throw Error(i(91));return H({},n,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function qt(e,n){var o=n.value;if(o==null){if(o=n.children,n=n.defaultValue,o!=null){if(n!=null)throw Error(i(92));if(rt(o)){if(1<o.length)throw Error(i(93));o=o[0]}n=o}n==null&&(n=""),o=n}e._wrapperState={initialValue:Z(o)}}function Kt(e,n){var o=Z(n.value),l=Z(n.defaultValue);o!=null&&(o=""+o,o!==e.value&&(e.value=o),n.defaultValue==null&&e.defaultValue!==o&&(e.defaultValue=o)),l!=null&&(e.defaultValue=""+l)}function pt(e){var n=e.textContent;n===e._wrapperState.initialValue&&n!==""&&n!==null&&(e.value=n)}function zt(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function St(e,n){return e==null||e==="http://www.w3.org/1999/xhtml"?zt(n):e==="http://www.w3.org/2000/svg"&&n==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var It,Ii=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(n,o,l,d){MSApp.execUnsafeLocalFunction(function(){return e(n,o,l,d)})}:e})(function(e,n){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=n;else{for(It=It||document.createElement("div"),It.innerHTML="<svg>"+n.valueOf().toString()+"</svg>",n=It.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}});function an(e,n){if(n){var o=e.firstChild;if(o&&o===e.lastChild&&o.nodeType===3){o.nodeValue=n;return}}e.textContent=n}var Kn={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Al=["Webkit","ms","Moz","O"];Object.keys(Kn).forEach(function(e){Al.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),Kn[n]=Kn[e]})});function ji(e,n,o){return n==null||typeof n=="boolean"||n===""?"":o||typeof n!="number"||n===0||Kn.hasOwnProperty(e)&&Kn[e]?(""+n).trim():n+"px"}function Ti(e,n){e=e.style;for(var o in n)if(n.hasOwnProperty(o)){var l=o.indexOf("--")===0,d=ji(o,n[o],l);o==="float"&&(o="cssFloat"),l?e.setProperty(o,d):e[o]=d}}var $l=H({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function yo(e,n){if(n){if($l[e]&&(n.children!=null||n.dangerouslySetInnerHTML!=null))throw Error(i(137,e));if(n.dangerouslySetInnerHTML!=null){if(n.children!=null)throw Error(i(60));if(typeof n.dangerouslySetInnerHTML!="object"||!("__html"in n.dangerouslySetInnerHTML))throw Error(i(61))}if(n.style!=null&&typeof n.style!="object")throw Error(i(62))}}function vo(e,n){if(e.indexOf("-")===-1)return typeof n.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var xo=null;function wo(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var So=null,En=null,Nn=null;function Ri(e){if(e=Uo(e)){if(typeof So!="function")throw Error(i(280));var n=e.stateNode;n&&(n=cs(n),So(e.stateNode,e.type,n))}}function Li(e){En?Nn?Nn.push(e):Nn=[e]:En=e}function Ai(){if(En){var e=En,n=Nn;if(Nn=En=null,Ri(e),n)for(e=0;e<n.length;e++)Ri(n[e])}}function $i(e,n){return e(n)}function Di(){}var ko=!1;function Oi(e,n,o){if(ko)return e(n,o);ko=!0;try{return $i(e,n,o)}finally{ko=!1,(En!==null||Nn!==null)&&(Di(),Ai())}}function Zn(e,n){var o=e.stateNode;if(o===null)return null;var l=cs(o);if(l===null)return null;o=l[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(o&&typeof o!="function")throw Error(i(231,n,typeof o));return o}var _o=!1;if(f)try{var Jn={};Object.defineProperty(Jn,"passive",{get:function(){_o=!0}}),window.addEventListener("test",Jn,Jn),window.removeEventListener("test",Jn,Jn)}catch{_o=!1}function Dl(e,n,o,l,d,p,x,P,R){var K=Array.prototype.slice.call(arguments,3);try{n.apply(o,K)}catch(re){this.onError(re)}}var er=!1,Cr=null,br=!1,Eo=null,Ol={onError:function(e){er=!0,Cr=e}};function Fl(e,n,o,l,d,p,x,P,R){er=!1,Cr=null,Dl.apply(Ol,arguments)}function Vl(e,n,o,l,d,p,x,P,R){if(Fl.apply(this,arguments),er){if(er){var K=Cr;er=!1,Cr=null}else throw Error(i(198));br||(br=!0,Eo=K)}}function Zt(e){var n=e,o=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(o=n.return),e=n.return;while(e)}return n.tag===3?o:null}function No(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function Co(e){if(Zt(e)!==e)throw Error(i(188))}function Hl(e){var n=e.alternate;if(!n){if(n=Zt(e),n===null)throw Error(i(188));return n!==e?null:e}for(var o=e,l=n;;){var d=o.return;if(d===null)break;var p=d.alternate;if(p===null){if(l=d.return,l!==null){o=l;continue}break}if(d.child===p.child){for(p=d.child;p;){if(p===o)return Co(d),e;if(p===l)return Co(d),n;p=p.sibling}throw Error(i(188))}if(o.return!==l.return)o=d,l=p;else{for(var x=!1,P=d.child;P;){if(P===o){x=!0,o=d,l=p;break}if(P===l){x=!0,l=d,o=p;break}P=P.sibling}if(!x){for(P=p.child;P;){if(P===o){x=!0,o=p,l=d;break}if(P===l){x=!0,l=p,o=d;break}P=P.sibling}if(!x)throw Error(i(189))}}if(o.alternate!==l)throw Error(i(190))}if(o.tag!==3)throw Error(i(188));return o.stateNode.current===o?e:n}function Fi(e){return e=Hl(e),e!==null?Vi(e):null}function Vi(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var n=Vi(e);if(n!==null)return n;e=e.sibling}return null}var Hi=r.unstable_scheduleCallback,Bi=r.unstable_cancelCallback,Bl=r.unstable_shouldYield,Wi=r.unstable_requestPaint,Ve=r.unstable_now,Wl=r.unstable_getCurrentPriorityLevel,bo=r.unstable_ImmediatePriority,Ui=r.unstable_UserBlockingPriority,Mr=r.unstable_NormalPriority,Ul=r.unstable_LowPriority,Yi=r.unstable_IdlePriority,Pr=null,kt=null;function Yl(e){if(kt&&typeof kt.onCommitFiberRoot=="function")try{kt.onCommitFiberRoot(Pr,e,void 0,(e.current.flags&128)===128)}catch{}}var _t=Math.clz32?Math.clz32:Ql,Xl=Math.log,Gl=Math.LN2;function Ql(e){return e>>>=0,e===0?32:31-(Xl(e)/Gl|0)|0}var zr=64,Ir=4194304;function tr(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function un(e,n){var o=e.pendingLanes;if(o===0)return 0;var l=0,d=e.suspendedLanes,p=e.pingedLanes,x=o&268435455;if(x!==0){var P=x&~d;P!==0?l=tr(P):(p&=x,p!==0&&(l=tr(p)))}else x=o&~d,x!==0?l=tr(x):p!==0&&(l=tr(p));if(l===0)return 0;if(n!==0&&n!==l&&(n&d)===0&&(d=l&-l,p=n&-n,d>=p||d===16&&(p&4194240)!==0))return n;if((l&4)!==0&&(l|=o&16),n=e.entangledLanes,n!==0)for(e=e.entanglements,n&=l;0<n;)o=31-_t(n),d=1<<o,l|=e[o],n&=~d;return l}function ql(e,n){switch(e){case 1:case 2:case 4:return n+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Xi(e,n){for(var o=e.suspendedLanes,l=e.pingedLanes,d=e.expirationTimes,p=e.pendingLanes;0<p;){var x=31-_t(p),P=1<<x,R=d[x];R===-1?((P&o)===0||(P&l)!==0)&&(d[x]=ql(P,n)):R<=n&&(e.expiredLanes|=P),p&=~P}}function Mo(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Gi(){var e=zr;return zr<<=1,(zr&4194240)===0&&(zr=64),e}function nr(e){for(var n=[],o=0;31>o;o++)n.push(e);return n}function rr(e,n,o){e.pendingLanes|=n,n!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,n=31-_t(n),e[n]=o}function Kl(e,n){var o=e.pendingLanes&~n;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=n,e.mutableReadLanes&=n,e.entangledLanes&=n,n=e.entanglements;var l=e.eventTimes;for(e=e.expirationTimes;0<o;){var d=31-_t(o),p=1<<d;n[d]=0,l[d]=-1,e[d]=-1,o&=~p}}function jr(e,n){var o=e.entangledLanes|=n;for(e=e.entanglements;o;){var l=31-_t(o),d=1<<l;d&n|e[l]&n&&(e[l]|=n),o&=~d}}var je=0;function Dc(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var Oc,Zl,Fc,Vc,Hc,Jl=!1,Qi=[],Cn=null,bn=null,Mn=null,Po=new Map,zo=new Map,Pn=[],Um="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Bc(e,n){switch(e){case"focusin":case"focusout":Cn=null;break;case"dragenter":case"dragleave":bn=null;break;case"mouseover":case"mouseout":Mn=null;break;case"pointerover":case"pointerout":Po.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":zo.delete(n.pointerId)}}function Io(e,n,o,l,d,p){return e===null||e.nativeEvent!==p?(e={blockedOn:n,domEventName:o,eventSystemFlags:l,nativeEvent:p,targetContainers:[d]},n!==null&&(n=Uo(n),n!==null&&Zl(n)),e):(e.eventSystemFlags|=l,n=e.targetContainers,d!==null&&n.indexOf(d)===-1&&n.push(d),e)}function Ym(e,n,o,l,d){switch(n){case"focusin":return Cn=Io(Cn,e,n,o,l,d),!0;case"dragenter":return bn=Io(bn,e,n,o,l,d),!0;case"mouseover":return Mn=Io(Mn,e,n,o,l,d),!0;case"pointerover":var p=d.pointerId;return Po.set(p,Io(Po.get(p)||null,e,n,o,l,d)),!0;case"gotpointercapture":return p=d.pointerId,zo.set(p,Io(zo.get(p)||null,e,n,o,l,d)),!0}return!1}function Wc(e){var n=or(e.target);if(n!==null){var o=Zt(n);if(o!==null){if(n=o.tag,n===13){if(n=No(o),n!==null){e.blockedOn=n,Hc(e.priority,function(){Fc(o)});return}}else if(n===3&&o.stateNode.current.memoizedState.isDehydrated){e.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}e.blockedOn=null}function qi(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var o=ta(e.domEventName,e.eventSystemFlags,n[0],e.nativeEvent);if(o===null){o=e.nativeEvent;var l=new o.constructor(o.type,o);xo=l,o.target.dispatchEvent(l),xo=null}else return n=Uo(o),n!==null&&Zl(n),e.blockedOn=o,!1;n.shift()}return!0}function Uc(e,n,o){qi(e)&&o.delete(n)}function Xm(){Jl=!1,Cn!==null&&qi(Cn)&&(Cn=null),bn!==null&&qi(bn)&&(bn=null),Mn!==null&&qi(Mn)&&(Mn=null),Po.forEach(Uc),zo.forEach(Uc)}function jo(e,n){e.blockedOn===n&&(e.blockedOn=null,Jl||(Jl=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,Xm)))}function To(e){function n(d){return jo(d,e)}if(0<Qi.length){jo(Qi[0],e);for(var o=1;o<Qi.length;o++){var l=Qi[o];l.blockedOn===e&&(l.blockedOn=null)}}for(Cn!==null&&jo(Cn,e),bn!==null&&jo(bn,e),Mn!==null&&jo(Mn,e),Po.forEach(n),zo.forEach(n),o=0;o<Pn.length;o++)l=Pn[o],l.blockedOn===e&&(l.blockedOn=null);for(;0<Pn.length&&(o=Pn[0],o.blockedOn===null);)Wc(o),o.blockedOn===null&&Pn.shift()}var Tr=M.ReactCurrentBatchConfig,Ki=!0;function Gm(e,n,o,l){var d=je,p=Tr.transition;Tr.transition=null;try{je=1,ea(e,n,o,l)}finally{je=d,Tr.transition=p}}function Qm(e,n,o,l){var d=je,p=Tr.transition;Tr.transition=null;try{je=4,ea(e,n,o,l)}finally{je=d,Tr.transition=p}}function ea(e,n,o,l){if(Ki){var d=ta(e,n,o,l);if(d===null)va(e,n,l,Zi,o),Bc(e,l);else if(Ym(d,e,n,o,l))l.stopPropagation();else if(Bc(e,l),n&4&&-1<Um.indexOf(e)){for(;d!==null;){var p=Uo(d);if(p!==null&&Oc(p),p=ta(e,n,o,l),p===null&&va(e,n,l,Zi,o),p===d)break;d=p}d!==null&&l.stopPropagation()}else va(e,n,l,null,o)}}var Zi=null;function ta(e,n,o,l){if(Zi=null,e=wo(l),e=or(e),e!==null)if(n=Zt(e),n===null)e=null;else if(o=n.tag,o===13){if(e=No(n),e!==null)return e;e=null}else if(o===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null);return Zi=e,null}function Yc(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Wl()){case bo:return 1;case Ui:return 4;case Mr:case Ul:return 16;case Yi:return 536870912;default:return 16}default:return 16}}var zn=null,na=null,Ji=null;function Xc(){if(Ji)return Ji;var e,n=na,o=n.length,l,d="value"in zn?zn.value:zn.textContent,p=d.length;for(e=0;e<o&&n[e]===d[e];e++);var x=o-e;for(l=1;l<=x&&n[o-l]===d[p-l];l++);return Ji=d.slice(e,1<l?1-l:void 0)}function es(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function ts(){return!0}function Gc(){return!1}function Et(e){function n(o,l,d,p,x){this._reactName=o,this._targetInst=d,this.type=l,this.nativeEvent=p,this.target=x,this.currentTarget=null;for(var P in e)e.hasOwnProperty(P)&&(o=e[P],this[P]=o?o(p):p[P]);return this.isDefaultPrevented=(p.defaultPrevented!=null?p.defaultPrevented:p.returnValue===!1)?ts:Gc,this.isPropagationStopped=Gc,this}return H(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=ts)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=ts)},persist:function(){},isPersistent:ts}),n}var Rr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ra=Et(Rr),Ro=H({},Rr,{view:0,detail:0}),qm=Et(Ro),oa,ia,Lo,ns=H({},Ro,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:la,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!==Lo&&(Lo&&e.type==="mousemove"?(oa=e.screenX-Lo.screenX,ia=e.screenY-Lo.screenY):ia=oa=0,Lo=e),oa)},movementY:function(e){return"movementY"in e?e.movementY:ia}}),Qc=Et(ns),Km=H({},ns,{dataTransfer:0}),Zm=Et(Km),Jm=H({},Ro,{relatedTarget:0}),sa=Et(Jm),e0=H({},Rr,{animationName:0,elapsedTime:0,pseudoElement:0}),t0=Et(e0),n0=H({},Rr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),r0=Et(n0),o0=H({},Rr,{data:0}),qc=Et(o0),i0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},s0={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"},l0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function a0(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=l0[e])?!!n[e]:!1}function la(){return a0}var u0=H({},Ro,{key:function(e){if(e.key){var n=i0[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=es(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?s0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:la,charCode:function(e){return e.type==="keypress"?es(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?es(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),c0=Et(u0),d0=H({},ns,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Kc=Et(d0),f0=H({},Ro,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:la}),p0=Et(f0),h0=H({},Rr,{propertyName:0,elapsedTime:0,pseudoElement:0}),g0=Et(h0),m0=H({},ns,{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}),y0=Et(m0),v0=[9,13,27,32],aa=f&&"CompositionEvent"in window,Ao=null;f&&"documentMode"in document&&(Ao=document.documentMode);var x0=f&&"TextEvent"in window&&!Ao,Zc=f&&(!aa||Ao&&8<Ao&&11>=Ao),Jc=" ",ed=!1;function td(e,n){switch(e){case"keyup":return v0.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function nd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Lr=!1;function w0(e,n){switch(e){case"compositionend":return nd(n);case"keypress":return n.which!==32?null:(ed=!0,Jc);case"textInput":return e=n.data,e===Jc&&ed?null:e;default:return null}}function S0(e,n){if(Lr)return e==="compositionend"||!aa&&td(e,n)?(e=Xc(),Ji=na=zn=null,Lr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return Zc&&n.locale!=="ko"?null:n.data;default:return null}}var k0={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 rd(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!k0[e.type]:n==="textarea"}function od(e,n,o,l){Li(l),n=ls(n,"onChange"),0<n.length&&(o=new ra("onChange","change",null,o,l),e.push({event:o,listeners:n}))}var $o=null,Do=null;function _0(e){kd(e,0)}function rs(e){var n=Fr(e);if(ve(n))return e}function E0(e,n){if(e==="change")return n}var id=!1;if(f){var ua;if(f){var ca="oninput"in document;if(!ca){var sd=document.createElement("div");sd.setAttribute("oninput","return;"),ca=typeof sd.oninput=="function"}ua=ca}else ua=!1;id=ua&&(!document.documentMode||9<document.documentMode)}function ld(){$o&&($o.detachEvent("onpropertychange",ad),Do=$o=null)}function ad(e){if(e.propertyName==="value"&&rs(Do)){var n=[];od(n,Do,e,wo(e)),Oi(_0,n)}}function N0(e,n,o){e==="focusin"?(ld(),$o=n,Do=o,$o.attachEvent("onpropertychange",ad)):e==="focusout"&&ld()}function C0(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return rs(Do)}function b0(e,n){if(e==="click")return rs(n)}function M0(e,n){if(e==="input"||e==="change")return rs(n)}function P0(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var Dt=typeof Object.is=="function"?Object.is:P0;function Oo(e,n){if(Dt(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var o=Object.keys(e),l=Object.keys(n);if(o.length!==l.length)return!1;for(l=0;l<o.length;l++){var d=o[l];if(!h.call(n,d)||!Dt(e[d],n[d]))return!1}return!0}function ud(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function cd(e,n){var o=ud(e);e=0;for(var l;o;){if(o.nodeType===3){if(l=e+o.textContent.length,e<=n&&l>=n)return{node:o,offset:n-e};e=l}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=ud(o)}}function dd(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?dd(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function fd(){for(var e=window,n=me();n instanceof e.HTMLIFrameElement;){try{var o=typeof n.contentWindow.location.href=="string"}catch{o=!1}if(o)e=n.contentWindow;else break;n=me(e.document)}return n}function da(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}function z0(e){var n=fd(),o=e.focusedElem,l=e.selectionRange;if(n!==o&&o&&o.ownerDocument&&dd(o.ownerDocument.documentElement,o)){if(l!==null&&da(o)){if(n=l.start,e=l.end,e===void 0&&(e=n),"selectionStart"in o)o.selectionStart=n,o.selectionEnd=Math.min(e,o.value.length);else if(e=(n=o.ownerDocument||document)&&n.defaultView||window,e.getSelection){e=e.getSelection();var d=o.textContent.length,p=Math.min(l.start,d);l=l.end===void 0?p:Math.min(l.end,d),!e.extend&&p>l&&(d=l,l=p,p=d),d=cd(o,p);var x=cd(o,l);d&&x&&(e.rangeCount!==1||e.anchorNode!==d.node||e.anchorOffset!==d.offset||e.focusNode!==x.node||e.focusOffset!==x.offset)&&(n=n.createRange(),n.setStart(d.node,d.offset),e.removeAllRanges(),p>l?(e.addRange(n),e.extend(x.node,x.offset)):(n.setEnd(x.node,x.offset),e.addRange(n)))}}for(n=[],e=o;e=e.parentNode;)e.nodeType===1&&n.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;o<n.length;o++)e=n[o],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var I0=f&&"documentMode"in document&&11>=document.documentMode,Ar=null,fa=null,Fo=null,pa=!1;function pd(e,n,o){var l=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;pa||Ar==null||Ar!==me(l)||(l=Ar,"selectionStart"in l&&da(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Fo&&Oo(Fo,l)||(Fo=l,l=ls(fa,"onSelect"),0<l.length&&(n=new ra("onSelect","select",null,n,o),e.push({event:n,listeners:l}),n.target=Ar)))}function os(e,n){var o={};return o[e.toLowerCase()]=n.toLowerCase(),o["Webkit"+e]="webkit"+n,o["Moz"+e]="moz"+n,o}var $r={animationend:os("Animation","AnimationEnd"),animationiteration:os("Animation","AnimationIteration"),animationstart:os("Animation","AnimationStart"),transitionend:os("Transition","TransitionEnd")},ha={},hd={};f&&(hd=document.createElement("div").style,"AnimationEvent"in window||(delete $r.animationend.animation,delete $r.animationiteration.animation,delete $r.animationstart.animation),"TransitionEvent"in window||delete $r.transitionend.transition);function is(e){if(ha[e])return ha[e];if(!$r[e])return e;var n=$r[e],o;for(o in n)if(n.hasOwnProperty(o)&&o in hd)return ha[e]=n[o];return e}var gd=is("animationend"),md=is("animationiteration"),yd=is("animationstart"),vd=is("transitionend"),xd=new Map,wd="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function In(e,n){xd.set(e,n),u(n,[e])}for(var ga=0;ga<wd.length;ga++){var ma=wd[ga],j0=ma.toLowerCase(),T0=ma[0].toUpperCase()+ma.slice(1);In(j0,"on"+T0)}In(gd,"onAnimationEnd"),In(md,"onAnimationIteration"),In(yd,"onAnimationStart"),In("dblclick","onDoubleClick"),In("focusin","onFocus"),In("focusout","onBlur"),In(vd,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),u("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),u("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),u("onBeforeInput",["compositionend","keypress","textInput","paste"]),u("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Vo="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(" "),R0=new Set("cancel close invalid load scroll toggle".split(" ").concat(Vo));function Sd(e,n,o){var l=e.type||"unknown-event";e.currentTarget=o,Vl(l,n,void 0,e),e.currentTarget=null}function kd(e,n){n=(n&4)!==0;for(var o=0;o<e.length;o++){var l=e[o],d=l.event;l=l.listeners;e:{var p=void 0;if(n)for(var x=l.length-1;0<=x;x--){var P=l[x],R=P.instance,K=P.currentTarget;if(P=P.listener,R!==p&&d.isPropagationStopped())break e;Sd(d,P,K),p=R}else for(x=0;x<l.length;x++){if(P=l[x],R=P.instance,K=P.currentTarget,P=P.listener,R!==p&&d.isPropagationStopped())break e;Sd(d,P,K),p=R}}}if(br)throw e=Eo,br=!1,Eo=null,e}function Le(e,n){var o=n[Ea];o===void 0&&(o=n[Ea]=new Set);var l=e+"__bubble";o.has(l)||(_d(n,e,2,!1),o.add(l))}function ya(e,n,o){var l=0;n&&(l|=4),_d(o,e,l,n)}var ss="_reactListening"+Math.random().toString(36).slice(2);function Ho(e){if(!e[ss]){e[ss]=!0,s.forEach(function(o){o!=="selectionchange"&&(R0.has(o)||ya(o,!1,e),ya(o,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[ss]||(n[ss]=!0,ya("selectionchange",!1,n))}}function _d(e,n,o,l){switch(Yc(n)){case 1:var d=Gm;break;case 4:d=Qm;break;default:d=ea}o=d.bind(null,n,o,e),d=void 0,!_o||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(d=!0),l?d!==void 0?e.addEventListener(n,o,{capture:!0,passive:d}):e.addEventListener(n,o,!0):d!==void 0?e.addEventListener(n,o,{passive:d}):e.addEventListener(n,o,!1)}function va(e,n,o,l,d){var p=l;if((n&1)===0&&(n&2)===0&&l!==null)e:for(;;){if(l===null)return;var x=l.tag;if(x===3||x===4){var P=l.stateNode.containerInfo;if(P===d||P.nodeType===8&&P.parentNode===d)break;if(x===4)for(x=l.return;x!==null;){var R=x.tag;if((R===3||R===4)&&(R=x.stateNode.containerInfo,R===d||R.nodeType===8&&R.parentNode===d))return;x=x.return}for(;P!==null;){if(x=or(P),x===null)return;if(R=x.tag,R===5||R===6){l=p=x;continue e}P=P.parentNode}}l=l.return}Oi(function(){var K=p,re=wo(o),ie=[];e:{var ne=xd.get(e);if(ne!==void 0){var de=ra,pe=e;switch(e){case"keypress":if(es(o)===0)break e;case"keydown":case"keyup":de=c0;break;case"focusin":pe="focus",de=sa;break;case"focusout":pe="blur",de=sa;break;case"beforeblur":case"afterblur":de=sa;break;case"click":if(o.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":de=Qc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":de=Zm;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":de=p0;break;case gd:case md:case yd:de=t0;break;case vd:de=g0;break;case"scroll":de=qm;break;case"wheel":de=y0;break;case"copy":case"cut":case"paste":de=r0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":de=Kc}var he=(n&4)!==0,Ue=!he&&e==="scroll",X=he?ne!==null?ne+"Capture":null:ne;he=[];for(var $=K,Q;$!==null;){Q=$;var le=Q.stateNode;if(Q.tag===5&&le!==null&&(Q=le,X!==null&&(le=Zn($,X),le!=null&&he.push(Bo($,le,Q)))),Ue)break;$=$.return}0<he.length&&(ne=new de(ne,pe,null,o,re),ie.push({event:ne,listeners:he}))}}if((n&7)===0){e:{if(ne=e==="mouseover"||e==="pointerover",de=e==="mouseout"||e==="pointerout",ne&&o!==xo&&(pe=o.relatedTarget||o.fromElement)&&(or(pe)||pe[cn]))break e;if((de||ne)&&(ne=re.window===re?re:(ne=re.ownerDocument)?ne.defaultView||ne.parentWindow:window,de?(pe=o.relatedTarget||o.toElement,de=K,pe=pe?or(pe):null,pe!==null&&(Ue=Zt(pe),pe!==Ue||pe.tag!==5&&pe.tag!==6)&&(pe=null)):(de=null,pe=K),de!==pe)){if(he=Qc,le="onMouseLeave",X="onMouseEnter",$="mouse",(e==="pointerout"||e==="pointerover")&&(he=Kc,le="onPointerLeave",X="onPointerEnter",$="pointer"),Ue=de==null?ne:Fr(de),Q=pe==null?ne:Fr(pe),ne=new he(le,$+"leave",de,o,re),ne.target=Ue,ne.relatedTarget=Q,le=null,or(re)===K&&(he=new he(X,$+"enter",pe,o,re),he.target=Q,he.relatedTarget=Ue,le=he),Ue=le,de&&pe)t:{for(he=de,X=pe,$=0,Q=he;Q;Q=Dr(Q))$++;for(Q=0,le=X;le;le=Dr(le))Q++;for(;0<$-Q;)he=Dr(he),$--;for(;0<Q-$;)X=Dr(X),Q--;for(;$--;){if(he===X||X!==null&&he===X.alternate)break t;he=Dr(he),X=Dr(X)}he=null}else he=null;de!==null&&Ed(ie,ne,de,he,!1),pe!==null&&Ue!==null&&Ed(ie,Ue,pe,he,!0)}}e:{if(ne=K?Fr(K):window,de=ne.nodeName&&ne.nodeName.toLowerCase(),de==="select"||de==="input"&&ne.type==="file")var ye=E0;else if(rd(ne))if(id)ye=M0;else{ye=C0;var Se=N0}else(de=ne.nodeName)&&de.toLowerCase()==="input"&&(ne.type==="checkbox"||ne.type==="radio")&&(ye=b0);if(ye&&(ye=ye(e,K))){od(ie,ye,o,re);break e}Se&&Se(e,ne,K),e==="focusout"&&(Se=ne._wrapperState)&&Se.controlled&&ne.type==="number"&&ft(ne,"number",ne.value)}switch(Se=K?Fr(K):window,e){case"focusin":(rd(Se)||Se.contentEditable==="true")&&(Ar=Se,fa=K,Fo=null);break;case"focusout":Fo=fa=Ar=null;break;case"mousedown":pa=!0;break;case"contextmenu":case"mouseup":case"dragend":pa=!1,pd(ie,o,re);break;case"selectionchange":if(I0)break;case"keydown":case"keyup":pd(ie,o,re)}var ke;if(aa)e:{switch(e){case"compositionstart":var _e="onCompositionStart";break e;case"compositionend":_e="onCompositionEnd";break e;case"compositionupdate":_e="onCompositionUpdate";break e}_e=void 0}else Lr?td(e,o)&&(_e="onCompositionEnd"):e==="keydown"&&o.keyCode===229&&(_e="onCompositionStart");_e&&(Zc&&o.locale!=="ko"&&(Lr||_e!=="onCompositionStart"?_e==="onCompositionEnd"&&Lr&&(ke=Xc()):(zn=re,na="value"in zn?zn.value:zn.textContent,Lr=!0)),Se=ls(K,_e),0<Se.length&&(_e=new qc(_e,e,null,o,re),ie.push({event:_e,listeners:Se}),ke?_e.data=ke:(ke=nd(o),ke!==null&&(_e.data=ke)))),(ke=x0?w0(e,o):S0(e,o))&&(K=ls(K,"onBeforeInput"),0<K.length&&(re=new qc("onBeforeInput","beforeinput",null,o,re),ie.push({event:re,listeners:K}),re.data=ke))}kd(ie,n)})}function Bo(e,n,o){return{instance:e,listener:n,currentTarget:o}}function ls(e,n){for(var o=n+"Capture",l=[];e!==null;){var d=e,p=d.stateNode;d.tag===5&&p!==null&&(d=p,p=Zn(e,o),p!=null&&l.unshift(Bo(e,p,d)),p=Zn(e,n),p!=null&&l.push(Bo(e,p,d))),e=e.return}return l}function Dr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Ed(e,n,o,l,d){for(var p=n._reactName,x=[];o!==null&&o!==l;){var P=o,R=P.alternate,K=P.stateNode;if(R!==null&&R===l)break;P.tag===5&&K!==null&&(P=K,d?(R=Zn(o,p),R!=null&&x.unshift(Bo(o,R,P))):d||(R=Zn(o,p),R!=null&&x.push(Bo(o,R,P)))),o=o.return}x.length!==0&&e.push({event:n,listeners:x})}var L0=/\r\n?/g,A0=/\u0000|\uFFFD/g;function Nd(e){return(typeof e=="string"?e:""+e).replace(L0,`
|
|
38
|
-
`).replace(A0,"")}function as(e,n,o){if(n=Nd(n),Nd(e)!==n&&o)throw Error(i(425))}function us(){}var xa=null,wa=null;function Sa(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var ka=typeof setTimeout=="function"?setTimeout:void 0,$0=typeof clearTimeout=="function"?clearTimeout:void 0,Cd=typeof Promise=="function"?Promise:void 0,D0=typeof queueMicrotask=="function"?queueMicrotask:typeof Cd<"u"?function(e){return Cd.resolve(null).then(e).catch(O0)}:ka;function O0(e){setTimeout(function(){throw e})}function _a(e,n){var o=n,l=0;do{var d=o.nextSibling;if(e.removeChild(o),d&&d.nodeType===8)if(o=d.data,o==="/$"){if(l===0){e.removeChild(d),To(n);return}l--}else o!=="$"&&o!=="$?"&&o!=="$!"||l++;o=d}while(o);To(n)}function jn(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n==="$"||n==="$!"||n==="$?")break;if(n==="/$")return null}}return e}function bd(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var o=e.data;if(o==="$"||o==="$!"||o==="$?"){if(n===0)return e;n--}else o==="/$"&&n++}e=e.previousSibling}return null}var Or=Math.random().toString(36).slice(2),Jt="__reactFiber$"+Or,Wo="__reactProps$"+Or,cn="__reactContainer$"+Or,Ea="__reactEvents$"+Or,F0="__reactListeners$"+Or,V0="__reactHandles$"+Or;function or(e){var n=e[Jt];if(n)return n;for(var o=e.parentNode;o;){if(n=o[cn]||o[Jt]){if(o=n.alternate,n.child!==null||o!==null&&o.child!==null)for(e=bd(e);e!==null;){if(o=e[Jt])return o;e=bd(e)}return n}e=o,o=e.parentNode}return null}function Uo(e){return e=e[Jt]||e[cn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Fr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(i(33))}function cs(e){return e[Wo]||null}var Na=[],Vr=-1;function Tn(e){return{current:e}}function Ae(e){0>Vr||(e.current=Na[Vr],Na[Vr]=null,Vr--)}function Te(e,n){Vr++,Na[Vr]=e.current,e.current=n}var Rn={},it=Tn(Rn),ht=Tn(!1),ir=Rn;function Hr(e,n){var o=e.type.contextTypes;if(!o)return Rn;var l=e.stateNode;if(l&&l.__reactInternalMemoizedUnmaskedChildContext===n)return l.__reactInternalMemoizedMaskedChildContext;var d={},p;for(p in o)d[p]=n[p];return l&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=d),d}function gt(e){return e=e.childContextTypes,e!=null}function ds(){Ae(ht),Ae(it)}function Md(e,n,o){if(it.current!==Rn)throw Error(i(168));Te(it,n),Te(ht,o)}function Pd(e,n,o){var l=e.stateNode;if(n=n.childContextTypes,typeof l.getChildContext!="function")return o;l=l.getChildContext();for(var d in l)if(!(d in n))throw Error(i(108,ue(e)||"Unknown",d));return H({},o,l)}function fs(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Rn,ir=it.current,Te(it,e),Te(ht,ht.current),!0}function zd(e,n,o){var l=e.stateNode;if(!l)throw Error(i(169));o?(e=Pd(e,n,ir),l.__reactInternalMemoizedMergedChildContext=e,Ae(ht),Ae(it),Te(it,e)):Ae(ht),Te(ht,o)}var dn=null,ps=!1,Ca=!1;function Id(e){dn===null?dn=[e]:dn.push(e)}function H0(e){ps=!0,Id(e)}function Ln(){if(!Ca&&dn!==null){Ca=!0;var e=0,n=je;try{var o=dn;for(je=1;e<o.length;e++){var l=o[e];do l=l(!0);while(l!==null)}dn=null,ps=!1}catch(d){throw dn!==null&&(dn=dn.slice(e+1)),Hi(bo,Ln),d}finally{je=n,Ca=!1}}return null}var Br=[],Wr=0,hs=null,gs=0,jt=[],Tt=0,sr=null,fn=1,pn="";function lr(e,n){Br[Wr++]=gs,Br[Wr++]=hs,hs=e,gs=n}function jd(e,n,o){jt[Tt++]=fn,jt[Tt++]=pn,jt[Tt++]=sr,sr=e;var l=fn;e=pn;var d=32-_t(l)-1;l&=~(1<<d),o+=1;var p=32-_t(n)+d;if(30<p){var x=d-d%5;p=(l&(1<<x)-1).toString(32),l>>=x,d-=x,fn=1<<32-_t(n)+d|o<<d|l,pn=p+e}else fn=1<<p|o<<d|l,pn=e}function ba(e){e.return!==null&&(lr(e,1),jd(e,1,0))}function Ma(e){for(;e===hs;)hs=Br[--Wr],Br[Wr]=null,gs=Br[--Wr],Br[Wr]=null;for(;e===sr;)sr=jt[--Tt],jt[Tt]=null,pn=jt[--Tt],jt[Tt]=null,fn=jt[--Tt],jt[Tt]=null}var Nt=null,Ct=null,De=!1,Ot=null;function Td(e,n){var o=$t(5,null,null,0);o.elementType="DELETED",o.stateNode=n,o.return=e,n=e.deletions,n===null?(e.deletions=[o],e.flags|=16):n.push(o)}function Rd(e,n){switch(e.tag){case 5:var o=e.type;return n=n.nodeType!==1||o.toLowerCase()!==n.nodeName.toLowerCase()?null:n,n!==null?(e.stateNode=n,Nt=e,Ct=jn(n.firstChild),!0):!1;case 6:return n=e.pendingProps===""||n.nodeType!==3?null:n,n!==null?(e.stateNode=n,Nt=e,Ct=null,!0):!1;case 13:return n=n.nodeType!==8?null:n,n!==null?(o=sr!==null?{id:fn,overflow:pn}:null,e.memoizedState={dehydrated:n,treeContext:o,retryLane:1073741824},o=$t(18,null,null,0),o.stateNode=n,o.return=e,e.child=o,Nt=e,Ct=null,!0):!1;default:return!1}}function Pa(e){return(e.mode&1)!==0&&(e.flags&128)===0}function za(e){if(De){var n=Ct;if(n){var o=n;if(!Rd(e,n)){if(Pa(e))throw Error(i(418));n=jn(o.nextSibling);var l=Nt;n&&Rd(e,n)?Td(l,o):(e.flags=e.flags&-4097|2,De=!1,Nt=e)}}else{if(Pa(e))throw Error(i(418));e.flags=e.flags&-4097|2,De=!1,Nt=e}}}function Ld(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Nt=e}function ms(e){if(e!==Nt)return!1;if(!De)return Ld(e),De=!0,!1;var n;if((n=e.tag!==3)&&!(n=e.tag!==5)&&(n=e.type,n=n!=="head"&&n!=="body"&&!Sa(e.type,e.memoizedProps)),n&&(n=Ct)){if(Pa(e))throw Ad(),Error(i(418));for(;n;)Td(e,n),n=jn(n.nextSibling)}if(Ld(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));e:{for(e=e.nextSibling,n=0;e;){if(e.nodeType===8){var o=e.data;if(o==="/$"){if(n===0){Ct=jn(e.nextSibling);break e}n--}else o!=="$"&&o!=="$!"&&o!=="$?"||n++}e=e.nextSibling}Ct=null}}else Ct=Nt?jn(e.stateNode.nextSibling):null;return!0}function Ad(){for(var e=Ct;e;)e=jn(e.nextSibling)}function Ur(){Ct=Nt=null,De=!1}function Ia(e){Ot===null?Ot=[e]:Ot.push(e)}var B0=M.ReactCurrentBatchConfig;function Yo(e,n,o){if(e=o.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(o._owner){if(o=o._owner,o){if(o.tag!==1)throw Error(i(309));var l=o.stateNode}if(!l)throw Error(i(147,e));var d=l,p=""+e;return n!==null&&n.ref!==null&&typeof n.ref=="function"&&n.ref._stringRef===p?n.ref:(n=function(x){var P=d.refs;x===null?delete P[p]:P[p]=x},n._stringRef=p,n)}if(typeof e!="string")throw Error(i(284));if(!o._owner)throw Error(i(290,e))}return e}function ys(e,n){throw e=Object.prototype.toString.call(n),Error(i(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e))}function $d(e){var n=e._init;return n(e._payload)}function Dd(e){function n(X,$){if(e){var Q=X.deletions;Q===null?(X.deletions=[$],X.flags|=16):Q.push($)}}function o(X,$){if(!e)return null;for(;$!==null;)n(X,$),$=$.sibling;return null}function l(X,$){for(X=new Map;$!==null;)$.key!==null?X.set($.key,$):X.set($.index,$),$=$.sibling;return X}function d(X,$){return X=Bn(X,$),X.index=0,X.sibling=null,X}function p(X,$,Q){return X.index=Q,e?(Q=X.alternate,Q!==null?(Q=Q.index,Q<$?(X.flags|=2,$):Q):(X.flags|=2,$)):(X.flags|=1048576,$)}function x(X){return e&&X.alternate===null&&(X.flags|=2),X}function P(X,$,Q,le){return $===null||$.tag!==6?($=ku(Q,X.mode,le),$.return=X,$):($=d($,Q),$.return=X,$)}function R(X,$,Q,le){var ye=Q.type;return ye===W?re(X,$,Q.props.children,le,Q.key):$!==null&&($.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===O&&$d(ye)===$.type)?(le=d($,Q.props),le.ref=Yo(X,$,Q),le.return=X,le):(le=Vs(Q.type,Q.key,Q.props,null,X.mode,le),le.ref=Yo(X,$,Q),le.return=X,le)}function K(X,$,Q,le){return $===null||$.tag!==4||$.stateNode.containerInfo!==Q.containerInfo||$.stateNode.implementation!==Q.implementation?($=_u(Q,X.mode,le),$.return=X,$):($=d($,Q.children||[]),$.return=X,$)}function re(X,$,Q,le,ye){return $===null||$.tag!==7?($=gr(Q,X.mode,le,ye),$.return=X,$):($=d($,Q),$.return=X,$)}function ie(X,$,Q){if(typeof $=="string"&&$!==""||typeof $=="number")return $=ku(""+$,X.mode,Q),$.return=X,$;if(typeof $=="object"&&$!==null){switch($.$$typeof){case F:return Q=Vs($.type,$.key,$.props,null,X.mode,Q),Q.ref=Yo(X,null,$),Q.return=X,Q;case A:return $=_u($,X.mode,Q),$.return=X,$;case O:var le=$._init;return ie(X,le($._payload),Q)}if(rt($)||j($))return $=gr($,X.mode,Q,null),$.return=X,$;ys(X,$)}return null}function ne(X,$,Q,le){var ye=$!==null?$.key:null;if(typeof Q=="string"&&Q!==""||typeof Q=="number")return ye!==null?null:P(X,$,""+Q,le);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case F:return Q.key===ye?R(X,$,Q,le):null;case A:return Q.key===ye?K(X,$,Q,le):null;case O:return ye=Q._init,ne(X,$,ye(Q._payload),le)}if(rt(Q)||j(Q))return ye!==null?null:re(X,$,Q,le,null);ys(X,Q)}return null}function de(X,$,Q,le,ye){if(typeof le=="string"&&le!==""||typeof le=="number")return X=X.get(Q)||null,P($,X,""+le,ye);if(typeof le=="object"&&le!==null){switch(le.$$typeof){case F:return X=X.get(le.key===null?Q:le.key)||null,R($,X,le,ye);case A:return X=X.get(le.key===null?Q:le.key)||null,K($,X,le,ye);case O:var Se=le._init;return de(X,$,Q,Se(le._payload),ye)}if(rt(le)||j(le))return X=X.get(Q)||null,re($,X,le,ye,null);ys($,le)}return null}function pe(X,$,Q,le){for(var ye=null,Se=null,ke=$,_e=$=0,Ze=null;ke!==null&&_e<Q.length;_e++){ke.index>_e?(Ze=ke,ke=null):Ze=ke.sibling;var ze=ne(X,ke,Q[_e],le);if(ze===null){ke===null&&(ke=Ze);break}e&&ke&&ze.alternate===null&&n(X,ke),$=p(ze,$,_e),Se===null?ye=ze:Se.sibling=ze,Se=ze,ke=Ze}if(_e===Q.length)return o(X,ke),De&&lr(X,_e),ye;if(ke===null){for(;_e<Q.length;_e++)ke=ie(X,Q[_e],le),ke!==null&&($=p(ke,$,_e),Se===null?ye=ke:Se.sibling=ke,Se=ke);return De&&lr(X,_e),ye}for(ke=l(X,ke);_e<Q.length;_e++)Ze=de(ke,X,_e,Q[_e],le),Ze!==null&&(e&&Ze.alternate!==null&&ke.delete(Ze.key===null?_e:Ze.key),$=p(Ze,$,_e),Se===null?ye=Ze:Se.sibling=Ze,Se=Ze);return e&&ke.forEach(function(Wn){return n(X,Wn)}),De&&lr(X,_e),ye}function he(X,$,Q,le){var ye=j(Q);if(typeof ye!="function")throw Error(i(150));if(Q=ye.call(Q),Q==null)throw Error(i(151));for(var Se=ye=null,ke=$,_e=$=0,Ze=null,ze=Q.next();ke!==null&&!ze.done;_e++,ze=Q.next()){ke.index>_e?(Ze=ke,ke=null):Ze=ke.sibling;var Wn=ne(X,ke,ze.value,le);if(Wn===null){ke===null&&(ke=Ze);break}e&&ke&&Wn.alternate===null&&n(X,ke),$=p(Wn,$,_e),Se===null?ye=Wn:Se.sibling=Wn,Se=Wn,ke=Ze}if(ze.done)return o(X,ke),De&&lr(X,_e),ye;if(ke===null){for(;!ze.done;_e++,ze=Q.next())ze=ie(X,ze.value,le),ze!==null&&($=p(ze,$,_e),Se===null?ye=ze:Se.sibling=ze,Se=ze);return De&&lr(X,_e),ye}for(ke=l(X,ke);!ze.done;_e++,ze=Q.next())ze=de(ke,X,_e,ze.value,le),ze!==null&&(e&&ze.alternate!==null&&ke.delete(ze.key===null?_e:ze.key),$=p(ze,$,_e),Se===null?ye=ze:Se.sibling=ze,Se=ze);return e&&ke.forEach(function(ky){return n(X,ky)}),De&&lr(X,_e),ye}function Ue(X,$,Q,le){if(typeof Q=="object"&&Q!==null&&Q.type===W&&Q.key===null&&(Q=Q.props.children),typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case F:e:{for(var ye=Q.key,Se=$;Se!==null;){if(Se.key===ye){if(ye=Q.type,ye===W){if(Se.tag===7){o(X,Se.sibling),$=d(Se,Q.props.children),$.return=X,X=$;break e}}else if(Se.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===O&&$d(ye)===Se.type){o(X,Se.sibling),$=d(Se,Q.props),$.ref=Yo(X,Se,Q),$.return=X,X=$;break e}o(X,Se);break}else n(X,Se);Se=Se.sibling}Q.type===W?($=gr(Q.props.children,X.mode,le,Q.key),$.return=X,X=$):(le=Vs(Q.type,Q.key,Q.props,null,X.mode,le),le.ref=Yo(X,$,Q),le.return=X,X=le)}return x(X);case A:e:{for(Se=Q.key;$!==null;){if($.key===Se)if($.tag===4&&$.stateNode.containerInfo===Q.containerInfo&&$.stateNode.implementation===Q.implementation){o(X,$.sibling),$=d($,Q.children||[]),$.return=X,X=$;break e}else{o(X,$);break}else n(X,$);$=$.sibling}$=_u(Q,X.mode,le),$.return=X,X=$}return x(X);case O:return Se=Q._init,Ue(X,$,Se(Q._payload),le)}if(rt(Q))return pe(X,$,Q,le);if(j(Q))return he(X,$,Q,le);ys(X,Q)}return typeof Q=="string"&&Q!==""||typeof Q=="number"?(Q=""+Q,$!==null&&$.tag===6?(o(X,$.sibling),$=d($,Q),$.return=X,X=$):(o(X,$),$=ku(Q,X.mode,le),$.return=X,X=$),x(X)):o(X,$)}return Ue}var Yr=Dd(!0),Od=Dd(!1),vs=Tn(null),xs=null,Xr=null,ja=null;function Ta(){ja=Xr=xs=null}function Ra(e){var n=vs.current;Ae(vs),e._currentValue=n}function La(e,n,o){for(;e!==null;){var l=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,l!==null&&(l.childLanes|=n)):l!==null&&(l.childLanes&n)!==n&&(l.childLanes|=n),e===o)break;e=e.return}}function Gr(e,n){xs=e,ja=Xr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&n)!==0&&(mt=!0),e.firstContext=null)}function Rt(e){var n=e._currentValue;if(ja!==e)if(e={context:e,memoizedValue:n,next:null},Xr===null){if(xs===null)throw Error(i(308));Xr=e,xs.dependencies={lanes:0,firstContext:e}}else Xr=Xr.next=e;return n}var ar=null;function Aa(e){ar===null?ar=[e]:ar.push(e)}function Fd(e,n,o,l){var d=n.interleaved;return d===null?(o.next=o,Aa(n)):(o.next=d.next,d.next=o),n.interleaved=o,hn(e,l)}function hn(e,n){e.lanes|=n;var o=e.alternate;for(o!==null&&(o.lanes|=n),o=e,e=e.return;e!==null;)e.childLanes|=n,o=e.alternate,o!==null&&(o.childLanes|=n),o=e,e=e.return;return o.tag===3?o.stateNode:null}var An=!1;function $a(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Vd(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function gn(e,n){return{eventTime:e,lane:n,tag:0,payload:null,callback:null,next:null}}function $n(e,n,o){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Pe&2)!==0){var d=l.pending;return d===null?n.next=n:(n.next=d.next,d.next=n),l.pending=n,hn(e,o)}return d=l.interleaved,d===null?(n.next=n,Aa(l)):(n.next=d.next,d.next=n),l.interleaved=n,hn(e,o)}function ws(e,n,o){if(n=n.updateQueue,n!==null&&(n=n.shared,(o&4194240)!==0)){var l=n.lanes;l&=e.pendingLanes,o|=l,n.lanes=o,jr(e,o)}}function Hd(e,n){var o=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,o===l)){var d=null,p=null;if(o=o.firstBaseUpdate,o!==null){do{var x={eventTime:o.eventTime,lane:o.lane,tag:o.tag,payload:o.payload,callback:o.callback,next:null};p===null?d=p=x:p=p.next=x,o=o.next}while(o!==null);p===null?d=p=n:p=p.next=n}else d=p=n;o={baseState:l.baseState,firstBaseUpdate:d,lastBaseUpdate:p,shared:l.shared,effects:l.effects},e.updateQueue=o;return}e=o.lastBaseUpdate,e===null?o.firstBaseUpdate=n:e.next=n,o.lastBaseUpdate=n}function Ss(e,n,o,l){var d=e.updateQueue;An=!1;var p=d.firstBaseUpdate,x=d.lastBaseUpdate,P=d.shared.pending;if(P!==null){d.shared.pending=null;var R=P,K=R.next;R.next=null,x===null?p=K:x.next=K,x=R;var re=e.alternate;re!==null&&(re=re.updateQueue,P=re.lastBaseUpdate,P!==x&&(P===null?re.firstBaseUpdate=K:P.next=K,re.lastBaseUpdate=R))}if(p!==null){var ie=d.baseState;x=0,re=K=R=null,P=p;do{var ne=P.lane,de=P.eventTime;if((l&ne)===ne){re!==null&&(re=re.next={eventTime:de,lane:0,tag:P.tag,payload:P.payload,callback:P.callback,next:null});e:{var pe=e,he=P;switch(ne=n,de=o,he.tag){case 1:if(pe=he.payload,typeof pe=="function"){ie=pe.call(de,ie,ne);break e}ie=pe;break e;case 3:pe.flags=pe.flags&-65537|128;case 0:if(pe=he.payload,ne=typeof pe=="function"?pe.call(de,ie,ne):pe,ne==null)break e;ie=H({},ie,ne);break e;case 2:An=!0}}P.callback!==null&&P.lane!==0&&(e.flags|=64,ne=d.effects,ne===null?d.effects=[P]:ne.push(P))}else de={eventTime:de,lane:ne,tag:P.tag,payload:P.payload,callback:P.callback,next:null},re===null?(K=re=de,R=ie):re=re.next=de,x|=ne;if(P=P.next,P===null){if(P=d.shared.pending,P===null)break;ne=P,P=ne.next,ne.next=null,d.lastBaseUpdate=ne,d.shared.pending=null}}while(!0);if(re===null&&(R=ie),d.baseState=R,d.firstBaseUpdate=K,d.lastBaseUpdate=re,n=d.shared.interleaved,n!==null){d=n;do x|=d.lane,d=d.next;while(d!==n)}else p===null&&(d.shared.lanes=0);dr|=x,e.lanes=x,e.memoizedState=ie}}function Bd(e,n,o){if(e=n.effects,n.effects=null,e!==null)for(n=0;n<e.length;n++){var l=e[n],d=l.callback;if(d!==null){if(l.callback=null,l=o,typeof d!="function")throw Error(i(191,d));d.call(l)}}}var Xo={},en=Tn(Xo),Go=Tn(Xo),Qo=Tn(Xo);function ur(e){if(e===Xo)throw Error(i(174));return e}function Da(e,n){switch(Te(Qo,n),Te(Go,e),Te(en,Xo),e=n.nodeType,e){case 9:case 11:n=(n=n.documentElement)?n.namespaceURI:St(null,"");break;default:e=e===8?n.parentNode:n,n=e.namespaceURI||null,e=e.tagName,n=St(n,e)}Ae(en),Te(en,n)}function Qr(){Ae(en),Ae(Go),Ae(Qo)}function Wd(e){ur(Qo.current);var n=ur(en.current),o=St(n,e.type);n!==o&&(Te(Go,e),Te(en,o))}function Oa(e){Go.current===e&&(Ae(en),Ae(Go))}var He=Tn(0);function ks(e){for(var n=e;n!==null;){if(n.tag===13){var o=n.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||o.data==="$?"||o.data==="$!"))return n}else if(n.tag===19&&n.memoizedProps.revealOrder!==void 0){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var Fa=[];function Va(){for(var e=0;e<Fa.length;e++)Fa[e]._workInProgressVersionPrimary=null;Fa.length=0}var _s=M.ReactCurrentDispatcher,Ha=M.ReactCurrentBatchConfig,cr=0,Be=null,Ge=null,qe=null,Es=!1,qo=!1,Ko=0,W0=0;function st(){throw Error(i(321))}function Ba(e,n){if(n===null)return!1;for(var o=0;o<n.length&&o<e.length;o++)if(!Dt(e[o],n[o]))return!1;return!0}function Wa(e,n,o,l,d,p){if(cr=p,Be=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,_s.current=e===null||e.memoizedState===null?G0:Q0,e=o(l,d),qo){p=0;do{if(qo=!1,Ko=0,25<=p)throw Error(i(301));p+=1,qe=Ge=null,n.updateQueue=null,_s.current=q0,e=o(l,d)}while(qo)}if(_s.current=bs,n=Ge!==null&&Ge.next!==null,cr=0,qe=Ge=Be=null,Es=!1,n)throw Error(i(300));return e}function Ua(){var e=Ko!==0;return Ko=0,e}function tn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return qe===null?Be.memoizedState=qe=e:qe=qe.next=e,qe}function Lt(){if(Ge===null){var e=Be.alternate;e=e!==null?e.memoizedState:null}else e=Ge.next;var n=qe===null?Be.memoizedState:qe.next;if(n!==null)qe=n,Ge=e;else{if(e===null)throw Error(i(310));Ge=e,e={memoizedState:Ge.memoizedState,baseState:Ge.baseState,baseQueue:Ge.baseQueue,queue:Ge.queue,next:null},qe===null?Be.memoizedState=qe=e:qe=qe.next=e}return qe}function Zo(e,n){return typeof n=="function"?n(e):n}function Ya(e){var n=Lt(),o=n.queue;if(o===null)throw Error(i(311));o.lastRenderedReducer=e;var l=Ge,d=l.baseQueue,p=o.pending;if(p!==null){if(d!==null){var x=d.next;d.next=p.next,p.next=x}l.baseQueue=d=p,o.pending=null}if(d!==null){p=d.next,l=l.baseState;var P=x=null,R=null,K=p;do{var re=K.lane;if((cr&re)===re)R!==null&&(R=R.next={lane:0,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null}),l=K.hasEagerState?K.eagerState:e(l,K.action);else{var ie={lane:re,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null};R===null?(P=R=ie,x=l):R=R.next=ie,Be.lanes|=re,dr|=re}K=K.next}while(K!==null&&K!==p);R===null?x=l:R.next=P,Dt(l,n.memoizedState)||(mt=!0),n.memoizedState=l,n.baseState=x,n.baseQueue=R,o.lastRenderedState=l}if(e=o.interleaved,e!==null){d=e;do p=d.lane,Be.lanes|=p,dr|=p,d=d.next;while(d!==e)}else d===null&&(o.lanes=0);return[n.memoizedState,o.dispatch]}function Xa(e){var n=Lt(),o=n.queue;if(o===null)throw Error(i(311));o.lastRenderedReducer=e;var l=o.dispatch,d=o.pending,p=n.memoizedState;if(d!==null){o.pending=null;var x=d=d.next;do p=e(p,x.action),x=x.next;while(x!==d);Dt(p,n.memoizedState)||(mt=!0),n.memoizedState=p,n.baseQueue===null&&(n.baseState=p),o.lastRenderedState=p}return[p,l]}function Ud(){}function Yd(e,n){var o=Be,l=Lt(),d=n(),p=!Dt(l.memoizedState,d);if(p&&(l.memoizedState=d,mt=!0),l=l.queue,Ga(Qd.bind(null,o,l,e),[e]),l.getSnapshot!==n||p||qe!==null&&qe.memoizedState.tag&1){if(o.flags|=2048,Jo(9,Gd.bind(null,o,l,d,n),void 0,null),Ke===null)throw Error(i(349));(cr&30)!==0||Xd(o,n,d)}return d}function Xd(e,n,o){e.flags|=16384,e={getSnapshot:n,value:o},n=Be.updateQueue,n===null?(n={lastEffect:null,stores:null},Be.updateQueue=n,n.stores=[e]):(o=n.stores,o===null?n.stores=[e]:o.push(e))}function Gd(e,n,o,l){n.value=o,n.getSnapshot=l,qd(n)&&Kd(e)}function Qd(e,n,o){return o(function(){qd(n)&&Kd(e)})}function qd(e){var n=e.getSnapshot;e=e.value;try{var o=n();return!Dt(e,o)}catch{return!0}}function Kd(e){var n=hn(e,1);n!==null&&Bt(n,e,1,-1)}function Zd(e){var n=tn();return typeof e=="function"&&(e=e()),n.memoizedState=n.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Zo,lastRenderedState:e},n.queue=e,e=e.dispatch=X0.bind(null,Be,e),[n.memoizedState,e]}function Jo(e,n,o,l){return e={tag:e,create:n,destroy:o,deps:l,next:null},n=Be.updateQueue,n===null?(n={lastEffect:null,stores:null},Be.updateQueue=n,n.lastEffect=e.next=e):(o=n.lastEffect,o===null?n.lastEffect=e.next=e:(l=o.next,o.next=e,e.next=l,n.lastEffect=e)),e}function Jd(){return Lt().memoizedState}function Ns(e,n,o,l){var d=tn();Be.flags|=e,d.memoizedState=Jo(1|n,o,void 0,l===void 0?null:l)}function Cs(e,n,o,l){var d=Lt();l=l===void 0?null:l;var p=void 0;if(Ge!==null){var x=Ge.memoizedState;if(p=x.destroy,l!==null&&Ba(l,x.deps)){d.memoizedState=Jo(n,o,p,l);return}}Be.flags|=e,d.memoizedState=Jo(1|n,o,p,l)}function ef(e,n){return Ns(8390656,8,e,n)}function Ga(e,n){return Cs(2048,8,e,n)}function tf(e,n){return Cs(4,2,e,n)}function nf(e,n){return Cs(4,4,e,n)}function rf(e,n){if(typeof n=="function")return e=e(),n(e),function(){n(null)};if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function of(e,n,o){return o=o!=null?o.concat([e]):null,Cs(4,4,rf.bind(null,n,e),o)}function Qa(){}function sf(e,n){var o=Lt();n=n===void 0?null:n;var l=o.memoizedState;return l!==null&&n!==null&&Ba(n,l[1])?l[0]:(o.memoizedState=[e,n],e)}function lf(e,n){var o=Lt();n=n===void 0?null:n;var l=o.memoizedState;return l!==null&&n!==null&&Ba(n,l[1])?l[0]:(e=e(),o.memoizedState=[e,n],e)}function af(e,n,o){return(cr&21)===0?(e.baseState&&(e.baseState=!1,mt=!0),e.memoizedState=o):(Dt(o,n)||(o=Gi(),Be.lanes|=o,dr|=o,e.baseState=!0),n)}function U0(e,n){var o=je;je=o!==0&&4>o?o:4,e(!0);var l=Ha.transition;Ha.transition={};try{e(!1),n()}finally{je=o,Ha.transition=l}}function uf(){return Lt().memoizedState}function Y0(e,n,o){var l=Vn(e);if(o={lane:l,action:o,hasEagerState:!1,eagerState:null,next:null},cf(e))df(n,o);else if(o=Fd(e,n,o,l),o!==null){var d=dt();Bt(o,e,l,d),ff(o,n,l)}}function X0(e,n,o){var l=Vn(e),d={lane:l,action:o,hasEagerState:!1,eagerState:null,next:null};if(cf(e))df(n,d);else{var p=e.alternate;if(e.lanes===0&&(p===null||p.lanes===0)&&(p=n.lastRenderedReducer,p!==null))try{var x=n.lastRenderedState,P=p(x,o);if(d.hasEagerState=!0,d.eagerState=P,Dt(P,x)){var R=n.interleaved;R===null?(d.next=d,Aa(n)):(d.next=R.next,R.next=d),n.interleaved=d;return}}catch{}finally{}o=Fd(e,n,d,l),o!==null&&(d=dt(),Bt(o,e,l,d),ff(o,n,l))}}function cf(e){var n=e.alternate;return e===Be||n!==null&&n===Be}function df(e,n){qo=Es=!0;var o=e.pending;o===null?n.next=n:(n.next=o.next,o.next=n),e.pending=n}function ff(e,n,o){if((o&4194240)!==0){var l=n.lanes;l&=e.pendingLanes,o|=l,n.lanes=o,jr(e,o)}}var bs={readContext:Rt,useCallback:st,useContext:st,useEffect:st,useImperativeHandle:st,useInsertionEffect:st,useLayoutEffect:st,useMemo:st,useReducer:st,useRef:st,useState:st,useDebugValue:st,useDeferredValue:st,useTransition:st,useMutableSource:st,useSyncExternalStore:st,useId:st,unstable_isNewReconciler:!1},G0={readContext:Rt,useCallback:function(e,n){return tn().memoizedState=[e,n===void 0?null:n],e},useContext:Rt,useEffect:ef,useImperativeHandle:function(e,n,o){return o=o!=null?o.concat([e]):null,Ns(4194308,4,rf.bind(null,n,e),o)},useLayoutEffect:function(e,n){return Ns(4194308,4,e,n)},useInsertionEffect:function(e,n){return Ns(4,2,e,n)},useMemo:function(e,n){var o=tn();return n=n===void 0?null:n,e=e(),o.memoizedState=[e,n],e},useReducer:function(e,n,o){var l=tn();return n=o!==void 0?o(n):n,l.memoizedState=l.baseState=n,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},l.queue=e,e=e.dispatch=Y0.bind(null,Be,e),[l.memoizedState,e]},useRef:function(e){var n=tn();return e={current:e},n.memoizedState=e},useState:Zd,useDebugValue:Qa,useDeferredValue:function(e){return tn().memoizedState=e},useTransition:function(){var e=Zd(!1),n=e[0];return e=U0.bind(null,e[1]),tn().memoizedState=e,[n,e]},useMutableSource:function(){},useSyncExternalStore:function(e,n,o){var l=Be,d=tn();if(De){if(o===void 0)throw Error(i(407));o=o()}else{if(o=n(),Ke===null)throw Error(i(349));(cr&30)!==0||Xd(l,n,o)}d.memoizedState=o;var p={value:o,getSnapshot:n};return d.queue=p,ef(Qd.bind(null,l,p,e),[e]),l.flags|=2048,Jo(9,Gd.bind(null,l,p,o,n),void 0,null),o},useId:function(){var e=tn(),n=Ke.identifierPrefix;if(De){var o=pn,l=fn;o=(l&~(1<<32-_t(l)-1)).toString(32)+o,n=":"+n+"R"+o,o=Ko++,0<o&&(n+="H"+o.toString(32)),n+=":"}else o=W0++,n=":"+n+"r"+o.toString(32)+":";return e.memoizedState=n},unstable_isNewReconciler:!1},Q0={readContext:Rt,useCallback:sf,useContext:Rt,useEffect:Ga,useImperativeHandle:of,useInsertionEffect:tf,useLayoutEffect:nf,useMemo:lf,useReducer:Ya,useRef:Jd,useState:function(){return Ya(Zo)},useDebugValue:Qa,useDeferredValue:function(e){var n=Lt();return af(n,Ge.memoizedState,e)},useTransition:function(){var e=Ya(Zo)[0],n=Lt().memoizedState;return[e,n]},useMutableSource:Ud,useSyncExternalStore:Yd,useId:uf,unstable_isNewReconciler:!1},q0={readContext:Rt,useCallback:sf,useContext:Rt,useEffect:Ga,useImperativeHandle:of,useInsertionEffect:tf,useLayoutEffect:nf,useMemo:lf,useReducer:Xa,useRef:Jd,useState:function(){return Xa(Zo)},useDebugValue:Qa,useDeferredValue:function(e){var n=Lt();return Ge===null?n.memoizedState=e:af(n,Ge.memoizedState,e)},useTransition:function(){var e=Xa(Zo)[0],n=Lt().memoizedState;return[e,n]},useMutableSource:Ud,useSyncExternalStore:Yd,useId:uf,unstable_isNewReconciler:!1};function Ft(e,n){if(e&&e.defaultProps){n=H({},n),e=e.defaultProps;for(var o in e)n[o]===void 0&&(n[o]=e[o]);return n}return n}function qa(e,n,o,l){n=e.memoizedState,o=o(l,n),o=o==null?n:H({},n,o),e.memoizedState=o,e.lanes===0&&(e.updateQueue.baseState=o)}var Ms={isMounted:function(e){return(e=e._reactInternals)?Zt(e)===e:!1},enqueueSetState:function(e,n,o){e=e._reactInternals;var l=dt(),d=Vn(e),p=gn(l,d);p.payload=n,o!=null&&(p.callback=o),n=$n(e,p,d),n!==null&&(Bt(n,e,d,l),ws(n,e,d))},enqueueReplaceState:function(e,n,o){e=e._reactInternals;var l=dt(),d=Vn(e),p=gn(l,d);p.tag=1,p.payload=n,o!=null&&(p.callback=o),n=$n(e,p,d),n!==null&&(Bt(n,e,d,l),ws(n,e,d))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var o=dt(),l=Vn(e),d=gn(o,l);d.tag=2,n!=null&&(d.callback=n),n=$n(e,d,l),n!==null&&(Bt(n,e,l,o),ws(n,e,l))}};function pf(e,n,o,l,d,p,x){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,p,x):n.prototype&&n.prototype.isPureReactComponent?!Oo(o,l)||!Oo(d,p):!0}function hf(e,n,o){var l=!1,d=Rn,p=n.contextType;return typeof p=="object"&&p!==null?p=Rt(p):(d=gt(n)?ir:it.current,l=n.contextTypes,p=(l=l!=null)?Hr(e,d):Rn),n=new n(o,p),e.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,n.updater=Ms,e.stateNode=n,n._reactInternals=e,l&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=d,e.__reactInternalMemoizedMaskedChildContext=p),n}function gf(e,n,o,l){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(o,l),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(o,l),n.state!==e&&Ms.enqueueReplaceState(n,n.state,null)}function Ka(e,n,o,l){var d=e.stateNode;d.props=o,d.state=e.memoizedState,d.refs={},$a(e);var p=n.contextType;typeof p=="object"&&p!==null?d.context=Rt(p):(p=gt(n)?ir:it.current,d.context=Hr(e,p)),d.state=e.memoizedState,p=n.getDerivedStateFromProps,typeof p=="function"&&(qa(e,n,p,o),d.state=e.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(n=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),n!==d.state&&Ms.enqueueReplaceState(d,d.state,null),Ss(e,o,d,l),d.state=e.memoizedState),typeof d.componentDidMount=="function"&&(e.flags|=4194308)}function qr(e,n){try{var o="",l=n;do o+=ae(l),l=l.return;while(l);var d=o}catch(p){d=`
|
|
39
|
-
Error generating stack: `+p.message+`
|
|
40
|
-
`+p.stack}return{value:e,source:n,stack:d,digest:null}}function Za(e,n,o){return{value:e,source:null,stack:o??null,digest:n??null}}function Ja(e,n){try{console.error(n.value)}catch(o){setTimeout(function(){throw o})}}var K0=typeof WeakMap=="function"?WeakMap:Map;function mf(e,n,o){o=gn(-1,o),o.tag=3,o.payload={element:null};var l=n.value;return o.callback=function(){Ls||(Ls=!0,hu=l),Ja(e,n)},o}function yf(e,n,o){o=gn(-1,o),o.tag=3;var l=e.type.getDerivedStateFromError;if(typeof l=="function"){var d=n.value;o.payload=function(){return l(d)},o.callback=function(){Ja(e,n)}}var p=e.stateNode;return p!==null&&typeof p.componentDidCatch=="function"&&(o.callback=function(){Ja(e,n),typeof l!="function"&&(On===null?On=new Set([this]):On.add(this));var x=n.stack;this.componentDidCatch(n.value,{componentStack:x!==null?x:""})}),o}function vf(e,n,o){var l=e.pingCache;if(l===null){l=e.pingCache=new K0;var d=new Set;l.set(n,d)}else d=l.get(n),d===void 0&&(d=new Set,l.set(n,d));d.has(o)||(d.add(o),e=dy.bind(null,e,n,o),n.then(e,e))}function xf(e){do{var n;if((n=e.tag===13)&&(n=e.memoizedState,n=n!==null?n.dehydrated!==null:!0),n)return e;e=e.return}while(e!==null);return null}function wf(e,n,o,l,d){return(e.mode&1)===0?(e===n?e.flags|=65536:(e.flags|=128,o.flags|=131072,o.flags&=-52805,o.tag===1&&(o.alternate===null?o.tag=17:(n=gn(-1,1),n.tag=2,$n(o,n,1))),o.lanes|=1),e):(e.flags|=65536,e.lanes=d,e)}var Z0=M.ReactCurrentOwner,mt=!1;function ct(e,n,o,l){n.child=e===null?Od(n,null,o,l):Yr(n,e.child,o,l)}function Sf(e,n,o,l,d){o=o.render;var p=n.ref;return Gr(n,d),l=Wa(e,n,o,l,p,d),o=Ua(),e!==null&&!mt?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~d,mn(e,n,d)):(De&&o&&ba(n),n.flags|=1,ct(e,n,l,d),n.child)}function kf(e,n,o,l,d){if(e===null){var p=o.type;return typeof p=="function"&&!Su(p)&&p.defaultProps===void 0&&o.compare===null&&o.defaultProps===void 0?(n.tag=15,n.type=p,_f(e,n,p,l,d)):(e=Vs(o.type,null,l,n,n.mode,d),e.ref=n.ref,e.return=n,n.child=e)}if(p=e.child,(e.lanes&d)===0){var x=p.memoizedProps;if(o=o.compare,o=o!==null?o:Oo,o(x,l)&&e.ref===n.ref)return mn(e,n,d)}return n.flags|=1,e=Bn(p,l),e.ref=n.ref,e.return=n,n.child=e}function _f(e,n,o,l,d){if(e!==null){var p=e.memoizedProps;if(Oo(p,l)&&e.ref===n.ref)if(mt=!1,n.pendingProps=l=p,(e.lanes&d)!==0)(e.flags&131072)!==0&&(mt=!0);else return n.lanes=e.lanes,mn(e,n,d)}return eu(e,n,o,l,d)}function Ef(e,n,o){var l=n.pendingProps,d=l.children,p=e!==null?e.memoizedState:null;if(l.mode==="hidden")if((n.mode&1)===0)n.memoizedState={baseLanes:0,cachePool:null,transitions:null},Te(Zr,bt),bt|=o;else{if((o&1073741824)===0)return e=p!==null?p.baseLanes|o:o,n.lanes=n.childLanes=1073741824,n.memoizedState={baseLanes:e,cachePool:null,transitions:null},n.updateQueue=null,Te(Zr,bt),bt|=e,null;n.memoizedState={baseLanes:0,cachePool:null,transitions:null},l=p!==null?p.baseLanes:o,Te(Zr,bt),bt|=l}else p!==null?(l=p.baseLanes|o,n.memoizedState=null):l=o,Te(Zr,bt),bt|=l;return ct(e,n,d,o),n.child}function Nf(e,n){var o=n.ref;(e===null&&o!==null||e!==null&&e.ref!==o)&&(n.flags|=512,n.flags|=2097152)}function eu(e,n,o,l,d){var p=gt(o)?ir:it.current;return p=Hr(n,p),Gr(n,d),o=Wa(e,n,o,l,p,d),l=Ua(),e!==null&&!mt?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~d,mn(e,n,d)):(De&&l&&ba(n),n.flags|=1,ct(e,n,o,d),n.child)}function Cf(e,n,o,l,d){if(gt(o)){var p=!0;fs(n)}else p=!1;if(Gr(n,d),n.stateNode===null)zs(e,n),hf(n,o,l),Ka(n,o,l,d),l=!0;else if(e===null){var x=n.stateNode,P=n.memoizedProps;x.props=P;var R=x.context,K=o.contextType;typeof K=="object"&&K!==null?K=Rt(K):(K=gt(o)?ir:it.current,K=Hr(n,K));var re=o.getDerivedStateFromProps,ie=typeof re=="function"||typeof x.getSnapshotBeforeUpdate=="function";ie||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(P!==l||R!==K)&&gf(n,x,l,K),An=!1;var ne=n.memoizedState;x.state=ne,Ss(n,l,x,d),R=n.memoizedState,P!==l||ne!==R||ht.current||An?(typeof re=="function"&&(qa(n,o,re,l),R=n.memoizedState),(P=An||pf(n,o,P,l,ne,R,K))?(ie||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount()),typeof x.componentDidMount=="function"&&(n.flags|=4194308)):(typeof x.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=l,n.memoizedState=R),x.props=l,x.state=R,x.context=K,l=P):(typeof x.componentDidMount=="function"&&(n.flags|=4194308),l=!1)}else{x=n.stateNode,Vd(e,n),P=n.memoizedProps,K=n.type===n.elementType?P:Ft(n.type,P),x.props=K,ie=n.pendingProps,ne=x.context,R=o.contextType,typeof R=="object"&&R!==null?R=Rt(R):(R=gt(o)?ir:it.current,R=Hr(n,R));var de=o.getDerivedStateFromProps;(re=typeof de=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(P!==ie||ne!==R)&&gf(n,x,l,R),An=!1,ne=n.memoizedState,x.state=ne,Ss(n,l,x,d);var pe=n.memoizedState;P!==ie||ne!==pe||ht.current||An?(typeof de=="function"&&(qa(n,o,de,l),pe=n.memoizedState),(K=An||pf(n,o,K,l,ne,pe,R)||!1)?(re||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(l,pe,R),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(l,pe,R)),typeof x.componentDidUpdate=="function"&&(n.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof x.componentDidUpdate!="function"||P===e.memoizedProps&&ne===e.memoizedState||(n.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||P===e.memoizedProps&&ne===e.memoizedState||(n.flags|=1024),n.memoizedProps=l,n.memoizedState=pe),x.props=l,x.state=pe,x.context=R,l=K):(typeof x.componentDidUpdate!="function"||P===e.memoizedProps&&ne===e.memoizedState||(n.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||P===e.memoizedProps&&ne===e.memoizedState||(n.flags|=1024),l=!1)}return tu(e,n,o,l,p,d)}function tu(e,n,o,l,d,p){Nf(e,n);var x=(n.flags&128)!==0;if(!l&&!x)return d&&zd(n,o,!1),mn(e,n,p);l=n.stateNode,Z0.current=n;var P=x&&typeof o.getDerivedStateFromError!="function"?null:l.render();return n.flags|=1,e!==null&&x?(n.child=Yr(n,e.child,null,p),n.child=Yr(n,null,P,p)):ct(e,n,P,p),n.memoizedState=l.state,d&&zd(n,o,!0),n.child}function bf(e){var n=e.stateNode;n.pendingContext?Md(e,n.pendingContext,n.pendingContext!==n.context):n.context&&Md(e,n.context,!1),Da(e,n.containerInfo)}function Mf(e,n,o,l,d){return Ur(),Ia(d),n.flags|=256,ct(e,n,o,l),n.child}var nu={dehydrated:null,treeContext:null,retryLane:0};function ru(e){return{baseLanes:e,cachePool:null,transitions:null}}function Pf(e,n,o){var l=n.pendingProps,d=He.current,p=!1,x=(n.flags&128)!==0,P;if((P=x)||(P=e!==null&&e.memoizedState===null?!1:(d&2)!==0),P?(p=!0,n.flags&=-129):(e===null||e.memoizedState!==null)&&(d|=1),Te(He,d&1),e===null)return za(n),e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((n.mode&1)===0?n.lanes=1:e.data==="$!"?n.lanes=8:n.lanes=1073741824,null):(x=l.children,e=l.fallback,p?(l=n.mode,p=n.child,x={mode:"hidden",children:x},(l&1)===0&&p!==null?(p.childLanes=0,p.pendingProps=x):p=Hs(x,l,0,null),e=gr(e,l,o,null),p.return=n,e.return=n,p.sibling=e,n.child=p,n.child.memoizedState=ru(o),n.memoizedState=nu,e):ou(n,x));if(d=e.memoizedState,d!==null&&(P=d.dehydrated,P!==null))return J0(e,n,x,l,P,d,o);if(p){p=l.fallback,x=n.mode,d=e.child,P=d.sibling;var R={mode:"hidden",children:l.children};return(x&1)===0&&n.child!==d?(l=n.child,l.childLanes=0,l.pendingProps=R,n.deletions=null):(l=Bn(d,R),l.subtreeFlags=d.subtreeFlags&14680064),P!==null?p=Bn(P,p):(p=gr(p,x,o,null),p.flags|=2),p.return=n,l.return=n,l.sibling=p,n.child=l,l=p,p=n.child,x=e.child.memoizedState,x=x===null?ru(o):{baseLanes:x.baseLanes|o,cachePool:null,transitions:x.transitions},p.memoizedState=x,p.childLanes=e.childLanes&~o,n.memoizedState=nu,l}return p=e.child,e=p.sibling,l=Bn(p,{mode:"visible",children:l.children}),(n.mode&1)===0&&(l.lanes=o),l.return=n,l.sibling=null,e!==null&&(o=n.deletions,o===null?(n.deletions=[e],n.flags|=16):o.push(e)),n.child=l,n.memoizedState=null,l}function ou(e,n){return n=Hs({mode:"visible",children:n},e.mode,0,null),n.return=e,e.child=n}function Ps(e,n,o,l){return l!==null&&Ia(l),Yr(n,e.child,null,o),e=ou(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function J0(e,n,o,l,d,p,x){if(o)return n.flags&256?(n.flags&=-257,l=Za(Error(i(422))),Ps(e,n,x,l)):n.memoizedState!==null?(n.child=e.child,n.flags|=128,null):(p=l.fallback,d=n.mode,l=Hs({mode:"visible",children:l.children},d,0,null),p=gr(p,d,x,null),p.flags|=2,l.return=n,p.return=n,l.sibling=p,n.child=l,(n.mode&1)!==0&&Yr(n,e.child,null,x),n.child.memoizedState=ru(x),n.memoizedState=nu,p);if((n.mode&1)===0)return Ps(e,n,x,null);if(d.data==="$!"){if(l=d.nextSibling&&d.nextSibling.dataset,l)var P=l.dgst;return l=P,p=Error(i(419)),l=Za(p,l,void 0),Ps(e,n,x,l)}if(P=(x&e.childLanes)!==0,mt||P){if(l=Ke,l!==null){switch(x&-x){case 4:d=2;break;case 16:d=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:d=32;break;case 536870912:d=268435456;break;default:d=0}d=(d&(l.suspendedLanes|x))!==0?0:d,d!==0&&d!==p.retryLane&&(p.retryLane=d,hn(e,d),Bt(l,e,d,-1))}return wu(),l=Za(Error(i(421))),Ps(e,n,x,l)}return d.data==="$?"?(n.flags|=128,n.child=e.child,n=fy.bind(null,e),d._reactRetry=n,null):(e=p.treeContext,Ct=jn(d.nextSibling),Nt=n,De=!0,Ot=null,e!==null&&(jt[Tt++]=fn,jt[Tt++]=pn,jt[Tt++]=sr,fn=e.id,pn=e.overflow,sr=n),n=ou(n,l.children),n.flags|=4096,n)}function zf(e,n,o){e.lanes|=n;var l=e.alternate;l!==null&&(l.lanes|=n),La(e.return,n,o)}function iu(e,n,o,l,d){var p=e.memoizedState;p===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:l,tail:o,tailMode:d}:(p.isBackwards=n,p.rendering=null,p.renderingStartTime=0,p.last=l,p.tail=o,p.tailMode=d)}function If(e,n,o){var l=n.pendingProps,d=l.revealOrder,p=l.tail;if(ct(e,n,l.children,o),l=He.current,(l&2)!==0)l=l&1|2,n.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&zf(e,o,n);else if(e.tag===19)zf(e,o,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}l&=1}if(Te(He,l),(n.mode&1)===0)n.memoizedState=null;else switch(d){case"forwards":for(o=n.child,d=null;o!==null;)e=o.alternate,e!==null&&ks(e)===null&&(d=o),o=o.sibling;o=d,o===null?(d=n.child,n.child=null):(d=o.sibling,o.sibling=null),iu(n,!1,d,o,p);break;case"backwards":for(o=null,d=n.child,n.child=null;d!==null;){if(e=d.alternate,e!==null&&ks(e)===null){n.child=d;break}e=d.sibling,d.sibling=o,o=d,d=e}iu(n,!0,o,null,p);break;case"together":iu(n,!1,null,null,void 0);break;default:n.memoizedState=null}return n.child}function zs(e,n){(n.mode&1)===0&&e!==null&&(e.alternate=null,n.alternate=null,n.flags|=2)}function mn(e,n,o){if(e!==null&&(n.dependencies=e.dependencies),dr|=n.lanes,(o&n.childLanes)===0)return null;if(e!==null&&n.child!==e.child)throw Error(i(153));if(n.child!==null){for(e=n.child,o=Bn(e,e.pendingProps),n.child=o,o.return=n;e.sibling!==null;)e=e.sibling,o=o.sibling=Bn(e,e.pendingProps),o.return=n;o.sibling=null}return n.child}function ey(e,n,o){switch(n.tag){case 3:bf(n),Ur();break;case 5:Wd(n);break;case 1:gt(n.type)&&fs(n);break;case 4:Da(n,n.stateNode.containerInfo);break;case 10:var l=n.type._context,d=n.memoizedProps.value;Te(vs,l._currentValue),l._currentValue=d;break;case 13:if(l=n.memoizedState,l!==null)return l.dehydrated!==null?(Te(He,He.current&1),n.flags|=128,null):(o&n.child.childLanes)!==0?Pf(e,n,o):(Te(He,He.current&1),e=mn(e,n,o),e!==null?e.sibling:null);Te(He,He.current&1);break;case 19:if(l=(o&n.childLanes)!==0,(e.flags&128)!==0){if(l)return If(e,n,o);n.flags|=128}if(d=n.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),Te(He,He.current),l)break;return null;case 22:case 23:return n.lanes=0,Ef(e,n,o)}return mn(e,n,o)}var jf,su,Tf,Rf;jf=function(e,n){for(var o=n.child;o!==null;){if(o.tag===5||o.tag===6)e.appendChild(o.stateNode);else if(o.tag!==4&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===n)break;for(;o.sibling===null;){if(o.return===null||o.return===n)return;o=o.return}o.sibling.return=o.return,o=o.sibling}},su=function(){},Tf=function(e,n,o,l){var d=e.memoizedProps;if(d!==l){e=n.stateNode,ur(en.current);var p=null;switch(o){case"input":d=Ee(e,d),l=Ee(e,l),p=[];break;case"select":d=H({},d,{value:void 0}),l=H({},l,{value:void 0}),p=[];break;case"textarea":d=ln(e,d),l=ln(e,l),p=[];break;default:typeof d.onClick!="function"&&typeof l.onClick=="function"&&(e.onclick=us)}yo(o,l);var x;o=null;for(K in d)if(!l.hasOwnProperty(K)&&d.hasOwnProperty(K)&&d[K]!=null)if(K==="style"){var P=d[K];for(x in P)P.hasOwnProperty(x)&&(o||(o={}),o[x]="")}else K!=="dangerouslySetInnerHTML"&&K!=="children"&&K!=="suppressContentEditableWarning"&&K!=="suppressHydrationWarning"&&K!=="autoFocus"&&(a.hasOwnProperty(K)?p||(p=[]):(p=p||[]).push(K,null));for(K in l){var R=l[K];if(P=d!=null?d[K]:void 0,l.hasOwnProperty(K)&&R!==P&&(R!=null||P!=null))if(K==="style")if(P){for(x in P)!P.hasOwnProperty(x)||R&&R.hasOwnProperty(x)||(o||(o={}),o[x]="");for(x in R)R.hasOwnProperty(x)&&P[x]!==R[x]&&(o||(o={}),o[x]=R[x])}else o||(p||(p=[]),p.push(K,o)),o=R;else K==="dangerouslySetInnerHTML"?(R=R?R.__html:void 0,P=P?P.__html:void 0,R!=null&&P!==R&&(p=p||[]).push(K,R)):K==="children"?typeof R!="string"&&typeof R!="number"||(p=p||[]).push(K,""+R):K!=="suppressContentEditableWarning"&&K!=="suppressHydrationWarning"&&(a.hasOwnProperty(K)?(R!=null&&K==="onScroll"&&Le("scroll",e),p||P===R||(p=[])):(p=p||[]).push(K,R))}o&&(p=p||[]).push("style",o);var K=p;(n.updateQueue=K)&&(n.flags|=4)}},Rf=function(e,n,o,l){o!==l&&(n.flags|=4)};function ei(e,n){if(!De)switch(e.tailMode){case"hidden":n=e.tail;for(var o=null;n!==null;)n.alternate!==null&&(o=n),n=n.sibling;o===null?e.tail=null:o.sibling=null;break;case"collapsed":o=e.tail;for(var l=null;o!==null;)o.alternate!==null&&(l=o),o=o.sibling;l===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function lt(e){var n=e.alternate!==null&&e.alternate.child===e.child,o=0,l=0;if(n)for(var d=e.child;d!==null;)o|=d.lanes|d.childLanes,l|=d.subtreeFlags&14680064,l|=d.flags&14680064,d.return=e,d=d.sibling;else for(d=e.child;d!==null;)o|=d.lanes|d.childLanes,l|=d.subtreeFlags,l|=d.flags,d.return=e,d=d.sibling;return e.subtreeFlags|=l,e.childLanes=o,n}function ty(e,n,o){var l=n.pendingProps;switch(Ma(n),n.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return lt(n),null;case 1:return gt(n.type)&&ds(),lt(n),null;case 3:return l=n.stateNode,Qr(),Ae(ht),Ae(it),Va(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(ms(n)?n.flags|=4:e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,Ot!==null&&(yu(Ot),Ot=null))),su(e,n),lt(n),null;case 5:Oa(n);var d=ur(Qo.current);if(o=n.type,e!==null&&n.stateNode!=null)Tf(e,n,o,l,d),e.ref!==n.ref&&(n.flags|=512,n.flags|=2097152);else{if(!l){if(n.stateNode===null)throw Error(i(166));return lt(n),null}if(e=ur(en.current),ms(n)){l=n.stateNode,o=n.type;var p=n.memoizedProps;switch(l[Jt]=n,l[Wo]=p,e=(n.mode&1)!==0,o){case"dialog":Le("cancel",l),Le("close",l);break;case"iframe":case"object":case"embed":Le("load",l);break;case"video":case"audio":for(d=0;d<Vo.length;d++)Le(Vo[d],l);break;case"source":Le("error",l);break;case"img":case"image":case"link":Le("error",l),Le("load",l);break;case"details":Le("toggle",l);break;case"input":Me(l,p),Le("invalid",l);break;case"select":l._wrapperState={wasMultiple:!!p.multiple},Le("invalid",l);break;case"textarea":qt(l,p),Le("invalid",l)}yo(o,p),d=null;for(var x in p)if(p.hasOwnProperty(x)){var P=p[x];x==="children"?typeof P=="string"?l.textContent!==P&&(p.suppressHydrationWarning!==!0&&as(l.textContent,P,e),d=["children",P]):typeof P=="number"&&l.textContent!==""+P&&(p.suppressHydrationWarning!==!0&&as(l.textContent,P,e),d=["children",""+P]):a.hasOwnProperty(x)&&P!=null&&x==="onScroll"&&Le("scroll",l)}switch(o){case"input":we(l),ut(l,p,!0);break;case"textarea":we(l),pt(l);break;case"select":case"option":break;default:typeof p.onClick=="function"&&(l.onclick=us)}l=d,n.updateQueue=l,l!==null&&(n.flags|=4)}else{x=d.nodeType===9?d:d.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=zt(o)),e==="http://www.w3.org/1999/xhtml"?o==="script"?(e=x.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof l.is=="string"?e=x.createElement(o,{is:l.is}):(e=x.createElement(o),o==="select"&&(x=e,l.multiple?x.multiple=!0:l.size&&(x.size=l.size))):e=x.createElementNS(e,o),e[Jt]=n,e[Wo]=l,jf(e,n,!1,!1),n.stateNode=e;e:{switch(x=vo(o,l),o){case"dialog":Le("cancel",e),Le("close",e),d=l;break;case"iframe":case"object":case"embed":Le("load",e),d=l;break;case"video":case"audio":for(d=0;d<Vo.length;d++)Le(Vo[d],e);d=l;break;case"source":Le("error",e),d=l;break;case"img":case"image":case"link":Le("error",e),Le("load",e),d=l;break;case"details":Le("toggle",e),d=l;break;case"input":Me(e,l),d=Ee(e,l),Le("invalid",e);break;case"option":d=l;break;case"select":e._wrapperState={wasMultiple:!!l.multiple},d=H({},l,{value:void 0}),Le("invalid",e);break;case"textarea":qt(e,l),d=ln(e,l),Le("invalid",e);break;default:d=l}yo(o,d),P=d;for(p in P)if(P.hasOwnProperty(p)){var R=P[p];p==="style"?Ti(e,R):p==="dangerouslySetInnerHTML"?(R=R?R.__html:void 0,R!=null&&Ii(e,R)):p==="children"?typeof R=="string"?(o!=="textarea"||R!=="")&&an(e,R):typeof R=="number"&&an(e,""+R):p!=="suppressContentEditableWarning"&&p!=="suppressHydrationWarning"&&p!=="autoFocus"&&(a.hasOwnProperty(p)?R!=null&&p==="onScroll"&&Le("scroll",e):R!=null&&N(e,p,R,x))}switch(o){case"input":we(e),ut(e,l,!1);break;case"textarea":we(e),pt(e);break;case"option":l.value!=null&&e.setAttribute("value",""+Z(l.value));break;case"select":e.multiple=!!l.multiple,p=l.value,p!=null?ot(e,!!l.multiple,p,!1):l.defaultValue!=null&&ot(e,!!l.multiple,l.defaultValue,!0);break;default:typeof d.onClick=="function"&&(e.onclick=us)}switch(o){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}}l&&(n.flags|=4)}n.ref!==null&&(n.flags|=512,n.flags|=2097152)}return lt(n),null;case 6:if(e&&n.stateNode!=null)Rf(e,n,e.memoizedProps,l);else{if(typeof l!="string"&&n.stateNode===null)throw Error(i(166));if(o=ur(Qo.current),ur(en.current),ms(n)){if(l=n.stateNode,o=n.memoizedProps,l[Jt]=n,(p=l.nodeValue!==o)&&(e=Nt,e!==null))switch(e.tag){case 3:as(l.nodeValue,o,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&as(l.nodeValue,o,(e.mode&1)!==0)}p&&(n.flags|=4)}else l=(o.nodeType===9?o:o.ownerDocument).createTextNode(l),l[Jt]=n,n.stateNode=l}return lt(n),null;case 13:if(Ae(He),l=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(De&&Ct!==null&&(n.mode&1)!==0&&(n.flags&128)===0)Ad(),Ur(),n.flags|=98560,p=!1;else if(p=ms(n),l!==null&&l.dehydrated!==null){if(e===null){if(!p)throw Error(i(318));if(p=n.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(i(317));p[Jt]=n}else Ur(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;lt(n),p=!1}else Ot!==null&&(yu(Ot),Ot=null),p=!0;if(!p)return n.flags&65536?n:null}return(n.flags&128)!==0?(n.lanes=o,n):(l=l!==null,l!==(e!==null&&e.memoizedState!==null)&&l&&(n.child.flags|=8192,(n.mode&1)!==0&&(e===null||(He.current&1)!==0?Qe===0&&(Qe=3):wu())),n.updateQueue!==null&&(n.flags|=4),lt(n),null);case 4:return Qr(),su(e,n),e===null&&Ho(n.stateNode.containerInfo),lt(n),null;case 10:return Ra(n.type._context),lt(n),null;case 17:return gt(n.type)&&ds(),lt(n),null;case 19:if(Ae(He),p=n.memoizedState,p===null)return lt(n),null;if(l=(n.flags&128)!==0,x=p.rendering,x===null)if(l)ei(p,!1);else{if(Qe!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(x=ks(e),x!==null){for(n.flags|=128,ei(p,!1),l=x.updateQueue,l!==null&&(n.updateQueue=l,n.flags|=4),n.subtreeFlags=0,l=o,o=n.child;o!==null;)p=o,e=l,p.flags&=14680066,x=p.alternate,x===null?(p.childLanes=0,p.lanes=e,p.child=null,p.subtreeFlags=0,p.memoizedProps=null,p.memoizedState=null,p.updateQueue=null,p.dependencies=null,p.stateNode=null):(p.childLanes=x.childLanes,p.lanes=x.lanes,p.child=x.child,p.subtreeFlags=0,p.deletions=null,p.memoizedProps=x.memoizedProps,p.memoizedState=x.memoizedState,p.updateQueue=x.updateQueue,p.type=x.type,e=x.dependencies,p.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),o=o.sibling;return Te(He,He.current&1|2),n.child}e=e.sibling}p.tail!==null&&Ve()>Jr&&(n.flags|=128,l=!0,ei(p,!1),n.lanes=4194304)}else{if(!l)if(e=ks(x),e!==null){if(n.flags|=128,l=!0,o=e.updateQueue,o!==null&&(n.updateQueue=o,n.flags|=4),ei(p,!0),p.tail===null&&p.tailMode==="hidden"&&!x.alternate&&!De)return lt(n),null}else 2*Ve()-p.renderingStartTime>Jr&&o!==1073741824&&(n.flags|=128,l=!0,ei(p,!1),n.lanes=4194304);p.isBackwards?(x.sibling=n.child,n.child=x):(o=p.last,o!==null?o.sibling=x:n.child=x,p.last=x)}return p.tail!==null?(n=p.tail,p.rendering=n,p.tail=n.sibling,p.renderingStartTime=Ve(),n.sibling=null,o=He.current,Te(He,l?o&1|2:o&1),n):(lt(n),null);case 22:case 23:return xu(),l=n.memoizedState!==null,e!==null&&e.memoizedState!==null!==l&&(n.flags|=8192),l&&(n.mode&1)!==0?(bt&1073741824)!==0&&(lt(n),n.subtreeFlags&6&&(n.flags|=8192)):lt(n),null;case 24:return null;case 25:return null}throw Error(i(156,n.tag))}function ny(e,n){switch(Ma(n),n.tag){case 1:return gt(n.type)&&ds(),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return Qr(),Ae(ht),Ae(it),Va(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 5:return Oa(n),null;case 13:if(Ae(He),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(i(340));Ur()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return Ae(He),null;case 4:return Qr(),null;case 10:return Ra(n.type._context),null;case 22:case 23:return xu(),null;case 24:return null;default:return null}}var Is=!1,at=!1,ry=typeof WeakSet=="function"?WeakSet:Set,fe=null;function Kr(e,n){var o=e.ref;if(o!==null)if(typeof o=="function")try{o(null)}catch(l){We(e,n,l)}else o.current=null}function lu(e,n,o){try{o()}catch(l){We(e,n,l)}}var Lf=!1;function oy(e,n){if(xa=Ki,e=fd(),da(e)){if("selectionStart"in e)var o={start:e.selectionStart,end:e.selectionEnd};else e:{o=(o=e.ownerDocument)&&o.defaultView||window;var l=o.getSelection&&o.getSelection();if(l&&l.rangeCount!==0){o=l.anchorNode;var d=l.anchorOffset,p=l.focusNode;l=l.focusOffset;try{o.nodeType,p.nodeType}catch{o=null;break e}var x=0,P=-1,R=-1,K=0,re=0,ie=e,ne=null;t:for(;;){for(var de;ie!==o||d!==0&&ie.nodeType!==3||(P=x+d),ie!==p||l!==0&&ie.nodeType!==3||(R=x+l),ie.nodeType===3&&(x+=ie.nodeValue.length),(de=ie.firstChild)!==null;)ne=ie,ie=de;for(;;){if(ie===e)break t;if(ne===o&&++K===d&&(P=x),ne===p&&++re===l&&(R=x),(de=ie.nextSibling)!==null)break;ie=ne,ne=ie.parentNode}ie=de}o=P===-1||R===-1?null:{start:P,end:R}}else o=null}o=o||{start:0,end:0}}else o=null;for(wa={focusedElem:e,selectionRange:o},Ki=!1,fe=n;fe!==null;)if(n=fe,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,fe=e;else for(;fe!==null;){n=fe;try{var pe=n.alternate;if((n.flags&1024)!==0)switch(n.tag){case 0:case 11:case 15:break;case 1:if(pe!==null){var he=pe.memoizedProps,Ue=pe.memoizedState,X=n.stateNode,$=X.getSnapshotBeforeUpdate(n.elementType===n.type?he:Ft(n.type,he),Ue);X.__reactInternalSnapshotBeforeUpdate=$}break;case 3:var Q=n.stateNode.containerInfo;Q.nodeType===1?Q.textContent="":Q.nodeType===9&&Q.documentElement&&Q.removeChild(Q.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(i(163))}}catch(le){We(n,n.return,le)}if(e=n.sibling,e!==null){e.return=n.return,fe=e;break}fe=n.return}return pe=Lf,Lf=!1,pe}function ti(e,n,o){var l=n.updateQueue;if(l=l!==null?l.lastEffect:null,l!==null){var d=l=l.next;do{if((d.tag&e)===e){var p=d.destroy;d.destroy=void 0,p!==void 0&&lu(n,o,p)}d=d.next}while(d!==l)}}function js(e,n){if(n=n.updateQueue,n=n!==null?n.lastEffect:null,n!==null){var o=n=n.next;do{if((o.tag&e)===e){var l=o.create;o.destroy=l()}o=o.next}while(o!==n)}}function au(e){var n=e.ref;if(n!==null){var o=e.stateNode;switch(e.tag){case 5:e=o;break;default:e=o}typeof n=="function"?n(e):n.current=e}}function Af(e){var n=e.alternate;n!==null&&(e.alternate=null,Af(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&(delete n[Jt],delete n[Wo],delete n[Ea],delete n[F0],delete n[V0])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function $f(e){return e.tag===5||e.tag===3||e.tag===4}function Df(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||$f(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function uu(e,n,o){var l=e.tag;if(l===5||l===6)e=e.stateNode,n?o.nodeType===8?o.parentNode.insertBefore(e,n):o.insertBefore(e,n):(o.nodeType===8?(n=o.parentNode,n.insertBefore(e,o)):(n=o,n.appendChild(e)),o=o._reactRootContainer,o!=null||n.onclick!==null||(n.onclick=us));else if(l!==4&&(e=e.child,e!==null))for(uu(e,n,o),e=e.sibling;e!==null;)uu(e,n,o),e=e.sibling}function cu(e,n,o){var l=e.tag;if(l===5||l===6)e=e.stateNode,n?o.insertBefore(e,n):o.appendChild(e);else if(l!==4&&(e=e.child,e!==null))for(cu(e,n,o),e=e.sibling;e!==null;)cu(e,n,o),e=e.sibling}var et=null,Vt=!1;function Dn(e,n,o){for(o=o.child;o!==null;)Of(e,n,o),o=o.sibling}function Of(e,n,o){if(kt&&typeof kt.onCommitFiberUnmount=="function")try{kt.onCommitFiberUnmount(Pr,o)}catch{}switch(o.tag){case 5:at||Kr(o,n);case 6:var l=et,d=Vt;et=null,Dn(e,n,o),et=l,Vt=d,et!==null&&(Vt?(e=et,o=o.stateNode,e.nodeType===8?e.parentNode.removeChild(o):e.removeChild(o)):et.removeChild(o.stateNode));break;case 18:et!==null&&(Vt?(e=et,o=o.stateNode,e.nodeType===8?_a(e.parentNode,o):e.nodeType===1&&_a(e,o),To(e)):_a(et,o.stateNode));break;case 4:l=et,d=Vt,et=o.stateNode.containerInfo,Vt=!0,Dn(e,n,o),et=l,Vt=d;break;case 0:case 11:case 14:case 15:if(!at&&(l=o.updateQueue,l!==null&&(l=l.lastEffect,l!==null))){d=l=l.next;do{var p=d,x=p.destroy;p=p.tag,x!==void 0&&((p&2)!==0||(p&4)!==0)&&lu(o,n,x),d=d.next}while(d!==l)}Dn(e,n,o);break;case 1:if(!at&&(Kr(o,n),l=o.stateNode,typeof l.componentWillUnmount=="function"))try{l.props=o.memoizedProps,l.state=o.memoizedState,l.componentWillUnmount()}catch(P){We(o,n,P)}Dn(e,n,o);break;case 21:Dn(e,n,o);break;case 22:o.mode&1?(at=(l=at)||o.memoizedState!==null,Dn(e,n,o),at=l):Dn(e,n,o);break;default:Dn(e,n,o)}}function Ff(e){var n=e.updateQueue;if(n!==null){e.updateQueue=null;var o=e.stateNode;o===null&&(o=e.stateNode=new ry),n.forEach(function(l){var d=py.bind(null,e,l);o.has(l)||(o.add(l),l.then(d,d))})}}function Ht(e,n){var o=n.deletions;if(o!==null)for(var l=0;l<o.length;l++){var d=o[l];try{var p=e,x=n,P=x;e:for(;P!==null;){switch(P.tag){case 5:et=P.stateNode,Vt=!1;break e;case 3:et=P.stateNode.containerInfo,Vt=!0;break e;case 4:et=P.stateNode.containerInfo,Vt=!0;break e}P=P.return}if(et===null)throw Error(i(160));Of(p,x,d),et=null,Vt=!1;var R=d.alternate;R!==null&&(R.return=null),d.return=null}catch(K){We(d,n,K)}}if(n.subtreeFlags&12854)for(n=n.child;n!==null;)Vf(n,e),n=n.sibling}function Vf(e,n){var o=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ht(n,e),nn(e),l&4){try{ti(3,e,e.return),js(3,e)}catch(he){We(e,e.return,he)}try{ti(5,e,e.return)}catch(he){We(e,e.return,he)}}break;case 1:Ht(n,e),nn(e),l&512&&o!==null&&Kr(o,o.return);break;case 5:if(Ht(n,e),nn(e),l&512&&o!==null&&Kr(o,o.return),e.flags&32){var d=e.stateNode;try{an(d,"")}catch(he){We(e,e.return,he)}}if(l&4&&(d=e.stateNode,d!=null)){var p=e.memoizedProps,x=o!==null?o.memoizedProps:p,P=e.type,R=e.updateQueue;if(e.updateQueue=null,R!==null)try{P==="input"&&p.type==="radio"&&p.name!=null&&Ie(d,p),vo(P,x);var K=vo(P,p);for(x=0;x<R.length;x+=2){var re=R[x],ie=R[x+1];re==="style"?Ti(d,ie):re==="dangerouslySetInnerHTML"?Ii(d,ie):re==="children"?an(d,ie):N(d,re,ie,K)}switch(P){case"input":Re(d,p);break;case"textarea":Kt(d,p);break;case"select":var ne=d._wrapperState.wasMultiple;d._wrapperState.wasMultiple=!!p.multiple;var de=p.value;de!=null?ot(d,!!p.multiple,de,!1):ne!==!!p.multiple&&(p.defaultValue!=null?ot(d,!!p.multiple,p.defaultValue,!0):ot(d,!!p.multiple,p.multiple?[]:"",!1))}d[Wo]=p}catch(he){We(e,e.return,he)}}break;case 6:if(Ht(n,e),nn(e),l&4){if(e.stateNode===null)throw Error(i(162));d=e.stateNode,p=e.memoizedProps;try{d.nodeValue=p}catch(he){We(e,e.return,he)}}break;case 3:if(Ht(n,e),nn(e),l&4&&o!==null&&o.memoizedState.isDehydrated)try{To(n.containerInfo)}catch(he){We(e,e.return,he)}break;case 4:Ht(n,e),nn(e);break;case 13:Ht(n,e),nn(e),d=e.child,d.flags&8192&&(p=d.memoizedState!==null,d.stateNode.isHidden=p,!p||d.alternate!==null&&d.alternate.memoizedState!==null||(pu=Ve())),l&4&&Ff(e);break;case 22:if(re=o!==null&&o.memoizedState!==null,e.mode&1?(at=(K=at)||re,Ht(n,e),at=K):Ht(n,e),nn(e),l&8192){if(K=e.memoizedState!==null,(e.stateNode.isHidden=K)&&!re&&(e.mode&1)!==0)for(fe=e,re=e.child;re!==null;){for(ie=fe=re;fe!==null;){switch(ne=fe,de=ne.child,ne.tag){case 0:case 11:case 14:case 15:ti(4,ne,ne.return);break;case 1:Kr(ne,ne.return);var pe=ne.stateNode;if(typeof pe.componentWillUnmount=="function"){l=ne,o=ne.return;try{n=l,pe.props=n.memoizedProps,pe.state=n.memoizedState,pe.componentWillUnmount()}catch(he){We(l,o,he)}}break;case 5:Kr(ne,ne.return);break;case 22:if(ne.memoizedState!==null){Wf(ie);continue}}de!==null?(de.return=ne,fe=de):Wf(ie)}re=re.sibling}e:for(re=null,ie=e;;){if(ie.tag===5){if(re===null){re=ie;try{d=ie.stateNode,K?(p=d.style,typeof p.setProperty=="function"?p.setProperty("display","none","important"):p.display="none"):(P=ie.stateNode,R=ie.memoizedProps.style,x=R!=null&&R.hasOwnProperty("display")?R.display:null,P.style.display=ji("display",x))}catch(he){We(e,e.return,he)}}}else if(ie.tag===6){if(re===null)try{ie.stateNode.nodeValue=K?"":ie.memoizedProps}catch(he){We(e,e.return,he)}}else if((ie.tag!==22&&ie.tag!==23||ie.memoizedState===null||ie===e)&&ie.child!==null){ie.child.return=ie,ie=ie.child;continue}if(ie===e)break e;for(;ie.sibling===null;){if(ie.return===null||ie.return===e)break e;re===ie&&(re=null),ie=ie.return}re===ie&&(re=null),ie.sibling.return=ie.return,ie=ie.sibling}}break;case 19:Ht(n,e),nn(e),l&4&&Ff(e);break;case 21:break;default:Ht(n,e),nn(e)}}function nn(e){var n=e.flags;if(n&2){try{e:{for(var o=e.return;o!==null;){if($f(o)){var l=o;break e}o=o.return}throw Error(i(160))}switch(l.tag){case 5:var d=l.stateNode;l.flags&32&&(an(d,""),l.flags&=-33);var p=Df(e);cu(e,p,d);break;case 3:case 4:var x=l.stateNode.containerInfo,P=Df(e);uu(e,P,x);break;default:throw Error(i(161))}}catch(R){We(e,e.return,R)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function iy(e,n,o){fe=e,Hf(e)}function Hf(e,n,o){for(var l=(e.mode&1)!==0;fe!==null;){var d=fe,p=d.child;if(d.tag===22&&l){var x=d.memoizedState!==null||Is;if(!x){var P=d.alternate,R=P!==null&&P.memoizedState!==null||at;P=Is;var K=at;if(Is=x,(at=R)&&!K)for(fe=d;fe!==null;)x=fe,R=x.child,x.tag===22&&x.memoizedState!==null?Uf(d):R!==null?(R.return=x,fe=R):Uf(d);for(;p!==null;)fe=p,Hf(p),p=p.sibling;fe=d,Is=P,at=K}Bf(e)}else(d.subtreeFlags&8772)!==0&&p!==null?(p.return=d,fe=p):Bf(e)}}function Bf(e){for(;fe!==null;){var n=fe;if((n.flags&8772)!==0){var o=n.alternate;try{if((n.flags&8772)!==0)switch(n.tag){case 0:case 11:case 15:at||js(5,n);break;case 1:var l=n.stateNode;if(n.flags&4&&!at)if(o===null)l.componentDidMount();else{var d=n.elementType===n.type?o.memoizedProps:Ft(n.type,o.memoizedProps);l.componentDidUpdate(d,o.memoizedState,l.__reactInternalSnapshotBeforeUpdate)}var p=n.updateQueue;p!==null&&Bd(n,p,l);break;case 3:var x=n.updateQueue;if(x!==null){if(o=null,n.child!==null)switch(n.child.tag){case 5:o=n.child.stateNode;break;case 1:o=n.child.stateNode}Bd(n,x,o)}break;case 5:var P=n.stateNode;if(o===null&&n.flags&4){o=P;var R=n.memoizedProps;switch(n.type){case"button":case"input":case"select":case"textarea":R.autoFocus&&o.focus();break;case"img":R.src&&(o.src=R.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(n.memoizedState===null){var K=n.alternate;if(K!==null){var re=K.memoizedState;if(re!==null){var ie=re.dehydrated;ie!==null&&To(ie)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(i(163))}at||n.flags&512&&au(n)}catch(ne){We(n,n.return,ne)}}if(n===e){fe=null;break}if(o=n.sibling,o!==null){o.return=n.return,fe=o;break}fe=n.return}}function Wf(e){for(;fe!==null;){var n=fe;if(n===e){fe=null;break}var o=n.sibling;if(o!==null){o.return=n.return,fe=o;break}fe=n.return}}function Uf(e){for(;fe!==null;){var n=fe;try{switch(n.tag){case 0:case 11:case 15:var o=n.return;try{js(4,n)}catch(R){We(n,o,R)}break;case 1:var l=n.stateNode;if(typeof l.componentDidMount=="function"){var d=n.return;try{l.componentDidMount()}catch(R){We(n,d,R)}}var p=n.return;try{au(n)}catch(R){We(n,p,R)}break;case 5:var x=n.return;try{au(n)}catch(R){We(n,x,R)}}}catch(R){We(n,n.return,R)}if(n===e){fe=null;break}var P=n.sibling;if(P!==null){P.return=n.return,fe=P;break}fe=n.return}}var sy=Math.ceil,Ts=M.ReactCurrentDispatcher,du=M.ReactCurrentOwner,At=M.ReactCurrentBatchConfig,Pe=0,Ke=null,Ye=null,tt=0,bt=0,Zr=Tn(0),Qe=0,ni=null,dr=0,Rs=0,fu=0,ri=null,yt=null,pu=0,Jr=1/0,yn=null,Ls=!1,hu=null,On=null,As=!1,Fn=null,$s=0,oi=0,gu=null,Ds=-1,Os=0;function dt(){return(Pe&6)!==0?Ve():Ds!==-1?Ds:Ds=Ve()}function Vn(e){return(e.mode&1)===0?1:(Pe&2)!==0&&tt!==0?tt&-tt:B0.transition!==null?(Os===0&&(Os=Gi()),Os):(e=je,e!==0||(e=window.event,e=e===void 0?16:Yc(e.type)),e)}function Bt(e,n,o,l){if(50<oi)throw oi=0,gu=null,Error(i(185));rr(e,o,l),((Pe&2)===0||e!==Ke)&&(e===Ke&&((Pe&2)===0&&(Rs|=o),Qe===4&&Hn(e,tt)),vt(e,l),o===1&&Pe===0&&(n.mode&1)===0&&(Jr=Ve()+500,ps&&Ln()))}function vt(e,n){var o=e.callbackNode;Xi(e,n);var l=un(e,e===Ke?tt:0);if(l===0)o!==null&&Bi(o),e.callbackNode=null,e.callbackPriority=0;else if(n=l&-l,e.callbackPriority!==n){if(o!=null&&Bi(o),n===1)e.tag===0?H0(Xf.bind(null,e)):Id(Xf.bind(null,e)),D0(function(){(Pe&6)===0&&Ln()}),o=null;else{switch(Dc(l)){case 1:o=bo;break;case 4:o=Ui;break;case 16:o=Mr;break;case 536870912:o=Yi;break;default:o=Mr}o=tp(o,Yf.bind(null,e))}e.callbackPriority=n,e.callbackNode=o}}function Yf(e,n){if(Ds=-1,Os=0,(Pe&6)!==0)throw Error(i(327));var o=e.callbackNode;if(eo()&&e.callbackNode!==o)return null;var l=un(e,e===Ke?tt:0);if(l===0)return null;if((l&30)!==0||(l&e.expiredLanes)!==0||n)n=Fs(e,l);else{n=l;var d=Pe;Pe|=2;var p=Qf();(Ke!==e||tt!==n)&&(yn=null,Jr=Ve()+500,pr(e,n));do try{uy();break}catch(P){Gf(e,P)}while(!0);Ta(),Ts.current=p,Pe=d,Ye!==null?n=0:(Ke=null,tt=0,n=Qe)}if(n!==0){if(n===2&&(d=Mo(e),d!==0&&(l=d,n=mu(e,d))),n===1)throw o=ni,pr(e,0),Hn(e,l),vt(e,Ve()),o;if(n===6)Hn(e,l);else{if(d=e.current.alternate,(l&30)===0&&!ly(d)&&(n=Fs(e,l),n===2&&(p=Mo(e),p!==0&&(l=p,n=mu(e,p))),n===1))throw o=ni,pr(e,0),Hn(e,l),vt(e,Ve()),o;switch(e.finishedWork=d,e.finishedLanes=l,n){case 0:case 1:throw Error(i(345));case 2:hr(e,yt,yn);break;case 3:if(Hn(e,l),(l&130023424)===l&&(n=pu+500-Ve(),10<n)){if(un(e,0)!==0)break;if(d=e.suspendedLanes,(d&l)!==l){dt(),e.pingedLanes|=e.suspendedLanes&d;break}e.timeoutHandle=ka(hr.bind(null,e,yt,yn),n);break}hr(e,yt,yn);break;case 4:if(Hn(e,l),(l&4194240)===l)break;for(n=e.eventTimes,d=-1;0<l;){var x=31-_t(l);p=1<<x,x=n[x],x>d&&(d=x),l&=~p}if(l=d,l=Ve()-l,l=(120>l?120:480>l?480:1080>l?1080:1920>l?1920:3e3>l?3e3:4320>l?4320:1960*sy(l/1960))-l,10<l){e.timeoutHandle=ka(hr.bind(null,e,yt,yn),l);break}hr(e,yt,yn);break;case 5:hr(e,yt,yn);break;default:throw Error(i(329))}}}return vt(e,Ve()),e.callbackNode===o?Yf.bind(null,e):null}function mu(e,n){var o=ri;return e.current.memoizedState.isDehydrated&&(pr(e,n).flags|=256),e=Fs(e,n),e!==2&&(n=yt,yt=o,n!==null&&yu(n)),e}function yu(e){yt===null?yt=e:yt.push.apply(yt,e)}function ly(e){for(var n=e;;){if(n.flags&16384){var o=n.updateQueue;if(o!==null&&(o=o.stores,o!==null))for(var l=0;l<o.length;l++){var d=o[l],p=d.getSnapshot;d=d.value;try{if(!Dt(p(),d))return!1}catch{return!1}}}if(o=n.child,n.subtreeFlags&16384&&o!==null)o.return=n,n=o;else{if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function Hn(e,n){for(n&=~fu,n&=~Rs,e.suspendedLanes|=n,e.pingedLanes&=~n,e=e.expirationTimes;0<n;){var o=31-_t(n),l=1<<o;e[o]=-1,n&=~l}}function Xf(e){if((Pe&6)!==0)throw Error(i(327));eo();var n=un(e,0);if((n&1)===0)return vt(e,Ve()),null;var o=Fs(e,n);if(e.tag!==0&&o===2){var l=Mo(e);l!==0&&(n=l,o=mu(e,l))}if(o===1)throw o=ni,pr(e,0),Hn(e,n),vt(e,Ve()),o;if(o===6)throw Error(i(345));return e.finishedWork=e.current.alternate,e.finishedLanes=n,hr(e,yt,yn),vt(e,Ve()),null}function vu(e,n){var o=Pe;Pe|=1;try{return e(n)}finally{Pe=o,Pe===0&&(Jr=Ve()+500,ps&&Ln())}}function fr(e){Fn!==null&&Fn.tag===0&&(Pe&6)===0&&eo();var n=Pe;Pe|=1;var o=At.transition,l=je;try{if(At.transition=null,je=1,e)return e()}finally{je=l,At.transition=o,Pe=n,(Pe&6)===0&&Ln()}}function xu(){bt=Zr.current,Ae(Zr)}function pr(e,n){e.finishedWork=null,e.finishedLanes=0;var o=e.timeoutHandle;if(o!==-1&&(e.timeoutHandle=-1,$0(o)),Ye!==null)for(o=Ye.return;o!==null;){var l=o;switch(Ma(l),l.tag){case 1:l=l.type.childContextTypes,l!=null&&ds();break;case 3:Qr(),Ae(ht),Ae(it),Va();break;case 5:Oa(l);break;case 4:Qr();break;case 13:Ae(He);break;case 19:Ae(He);break;case 10:Ra(l.type._context);break;case 22:case 23:xu()}o=o.return}if(Ke=e,Ye=e=Bn(e.current,null),tt=bt=n,Qe=0,ni=null,fu=Rs=dr=0,yt=ri=null,ar!==null){for(n=0;n<ar.length;n++)if(o=ar[n],l=o.interleaved,l!==null){o.interleaved=null;var d=l.next,p=o.pending;if(p!==null){var x=p.next;p.next=d,l.next=x}o.pending=l}ar=null}return e}function Gf(e,n){do{var o=Ye;try{if(Ta(),_s.current=bs,Es){for(var l=Be.memoizedState;l!==null;){var d=l.queue;d!==null&&(d.pending=null),l=l.next}Es=!1}if(cr=0,qe=Ge=Be=null,qo=!1,Ko=0,du.current=null,o===null||o.return===null){Qe=1,ni=n,Ye=null;break}e:{var p=e,x=o.return,P=o,R=n;if(n=tt,P.flags|=32768,R!==null&&typeof R=="object"&&typeof R.then=="function"){var K=R,re=P,ie=re.tag;if((re.mode&1)===0&&(ie===0||ie===11||ie===15)){var ne=re.alternate;ne?(re.updateQueue=ne.updateQueue,re.memoizedState=ne.memoizedState,re.lanes=ne.lanes):(re.updateQueue=null,re.memoizedState=null)}var de=xf(x);if(de!==null){de.flags&=-257,wf(de,x,P,p,n),de.mode&1&&vf(p,K,n),n=de,R=K;var pe=n.updateQueue;if(pe===null){var he=new Set;he.add(R),n.updateQueue=he}else pe.add(R);break e}else{if((n&1)===0){vf(p,K,n),wu();break e}R=Error(i(426))}}else if(De&&P.mode&1){var Ue=xf(x);if(Ue!==null){(Ue.flags&65536)===0&&(Ue.flags|=256),wf(Ue,x,P,p,n),Ia(qr(R,P));break e}}p=R=qr(R,P),Qe!==4&&(Qe=2),ri===null?ri=[p]:ri.push(p),p=x;do{switch(p.tag){case 3:p.flags|=65536,n&=-n,p.lanes|=n;var X=mf(p,R,n);Hd(p,X);break e;case 1:P=R;var $=p.type,Q=p.stateNode;if((p.flags&128)===0&&(typeof $.getDerivedStateFromError=="function"||Q!==null&&typeof Q.componentDidCatch=="function"&&(On===null||!On.has(Q)))){p.flags|=65536,n&=-n,p.lanes|=n;var le=yf(p,P,n);Hd(p,le);break e}}p=p.return}while(p!==null)}Kf(o)}catch(ye){n=ye,Ye===o&&o!==null&&(Ye=o=o.return);continue}break}while(!0)}function Qf(){var e=Ts.current;return Ts.current=bs,e===null?bs:e}function wu(){(Qe===0||Qe===3||Qe===2)&&(Qe=4),Ke===null||(dr&268435455)===0&&(Rs&268435455)===0||Hn(Ke,tt)}function Fs(e,n){var o=Pe;Pe|=2;var l=Qf();(Ke!==e||tt!==n)&&(yn=null,pr(e,n));do try{ay();break}catch(d){Gf(e,d)}while(!0);if(Ta(),Pe=o,Ts.current=l,Ye!==null)throw Error(i(261));return Ke=null,tt=0,Qe}function ay(){for(;Ye!==null;)qf(Ye)}function uy(){for(;Ye!==null&&!Bl();)qf(Ye)}function qf(e){var n=ep(e.alternate,e,bt);e.memoizedProps=e.pendingProps,n===null?Kf(e):Ye=n,du.current=null}function Kf(e){var n=e;do{var o=n.alternate;if(e=n.return,(n.flags&32768)===0){if(o=ty(o,n,bt),o!==null){Ye=o;return}}else{if(o=ny(o,n),o!==null){o.flags&=32767,Ye=o;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Qe=6,Ye=null;return}}if(n=n.sibling,n!==null){Ye=n;return}Ye=n=e}while(n!==null);Qe===0&&(Qe=5)}function hr(e,n,o){var l=je,d=At.transition;try{At.transition=null,je=1,cy(e,n,o,l)}finally{At.transition=d,je=l}return null}function cy(e,n,o,l){do eo();while(Fn!==null);if((Pe&6)!==0)throw Error(i(327));o=e.finishedWork;var d=e.finishedLanes;if(o===null)return null;if(e.finishedWork=null,e.finishedLanes=0,o===e.current)throw Error(i(177));e.callbackNode=null,e.callbackPriority=0;var p=o.lanes|o.childLanes;if(Kl(e,p),e===Ke&&(Ye=Ke=null,tt=0),(o.subtreeFlags&2064)===0&&(o.flags&2064)===0||As||(As=!0,tp(Mr,function(){return eo(),null})),p=(o.flags&15990)!==0,(o.subtreeFlags&15990)!==0||p){p=At.transition,At.transition=null;var x=je;je=1;var P=Pe;Pe|=4,du.current=null,oy(e,o),Vf(o,e),z0(wa),Ki=!!xa,wa=xa=null,e.current=o,iy(o),Wi(),Pe=P,je=x,At.transition=p}else e.current=o;if(As&&(As=!1,Fn=e,$s=d),p=e.pendingLanes,p===0&&(On=null),Yl(o.stateNode),vt(e,Ve()),n!==null)for(l=e.onRecoverableError,o=0;o<n.length;o++)d=n[o],l(d.value,{componentStack:d.stack,digest:d.digest});if(Ls)throw Ls=!1,e=hu,hu=null,e;return($s&1)!==0&&e.tag!==0&&eo(),p=e.pendingLanes,(p&1)!==0?e===gu?oi++:(oi=0,gu=e):oi=0,Ln(),null}function eo(){if(Fn!==null){var e=Dc($s),n=At.transition,o=je;try{if(At.transition=null,je=16>e?16:e,Fn===null)var l=!1;else{if(e=Fn,Fn=null,$s=0,(Pe&6)!==0)throw Error(i(331));var d=Pe;for(Pe|=4,fe=e.current;fe!==null;){var p=fe,x=p.child;if((fe.flags&16)!==0){var P=p.deletions;if(P!==null){for(var R=0;R<P.length;R++){var K=P[R];for(fe=K;fe!==null;){var re=fe;switch(re.tag){case 0:case 11:case 15:ti(8,re,p)}var ie=re.child;if(ie!==null)ie.return=re,fe=ie;else for(;fe!==null;){re=fe;var ne=re.sibling,de=re.return;if(Af(re),re===K){fe=null;break}if(ne!==null){ne.return=de,fe=ne;break}fe=de}}}var pe=p.alternate;if(pe!==null){var he=pe.child;if(he!==null){pe.child=null;do{var Ue=he.sibling;he.sibling=null,he=Ue}while(he!==null)}}fe=p}}if((p.subtreeFlags&2064)!==0&&x!==null)x.return=p,fe=x;else e:for(;fe!==null;){if(p=fe,(p.flags&2048)!==0)switch(p.tag){case 0:case 11:case 15:ti(9,p,p.return)}var X=p.sibling;if(X!==null){X.return=p.return,fe=X;break e}fe=p.return}}var $=e.current;for(fe=$;fe!==null;){x=fe;var Q=x.child;if((x.subtreeFlags&2064)!==0&&Q!==null)Q.return=x,fe=Q;else e:for(x=$;fe!==null;){if(P=fe,(P.flags&2048)!==0)try{switch(P.tag){case 0:case 11:case 15:js(9,P)}}catch(ye){We(P,P.return,ye)}if(P===x){fe=null;break e}var le=P.sibling;if(le!==null){le.return=P.return,fe=le;break e}fe=P.return}}if(Pe=d,Ln(),kt&&typeof kt.onPostCommitFiberRoot=="function")try{kt.onPostCommitFiberRoot(Pr,e)}catch{}l=!0}return l}finally{je=o,At.transition=n}}return!1}function Zf(e,n,o){n=qr(o,n),n=mf(e,n,1),e=$n(e,n,1),n=dt(),e!==null&&(rr(e,1,n),vt(e,n))}function We(e,n,o){if(e.tag===3)Zf(e,e,o);else for(;n!==null;){if(n.tag===3){Zf(n,e,o);break}else if(n.tag===1){var l=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(On===null||!On.has(l))){e=qr(o,e),e=yf(n,e,1),n=$n(n,e,1),e=dt(),n!==null&&(rr(n,1,e),vt(n,e));break}}n=n.return}}function dy(e,n,o){var l=e.pingCache;l!==null&&l.delete(n),n=dt(),e.pingedLanes|=e.suspendedLanes&o,Ke===e&&(tt&o)===o&&(Qe===4||Qe===3&&(tt&130023424)===tt&&500>Ve()-pu?pr(e,0):fu|=o),vt(e,n)}function Jf(e,n){n===0&&((e.mode&1)===0?n=1:(n=Ir,Ir<<=1,(Ir&130023424)===0&&(Ir=4194304)));var o=dt();e=hn(e,n),e!==null&&(rr(e,n,o),vt(e,o))}function fy(e){var n=e.memoizedState,o=0;n!==null&&(o=n.retryLane),Jf(e,o)}function py(e,n){var o=0;switch(e.tag){case 13:var l=e.stateNode,d=e.memoizedState;d!==null&&(o=d.retryLane);break;case 19:l=e.stateNode;break;default:throw Error(i(314))}l!==null&&l.delete(n),Jf(e,o)}var ep;ep=function(e,n,o){if(e!==null)if(e.memoizedProps!==n.pendingProps||ht.current)mt=!0;else{if((e.lanes&o)===0&&(n.flags&128)===0)return mt=!1,ey(e,n,o);mt=(e.flags&131072)!==0}else mt=!1,De&&(n.flags&1048576)!==0&&jd(n,gs,n.index);switch(n.lanes=0,n.tag){case 2:var l=n.type;zs(e,n),e=n.pendingProps;var d=Hr(n,it.current);Gr(n,o),d=Wa(null,n,l,e,d,o);var p=Ua();return n.flags|=1,typeof d=="object"&&d!==null&&typeof d.render=="function"&&d.$$typeof===void 0?(n.tag=1,n.memoizedState=null,n.updateQueue=null,gt(l)?(p=!0,fs(n)):p=!1,n.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,$a(n),d.updater=Ms,n.stateNode=d,d._reactInternals=n,Ka(n,l,e,o),n=tu(null,n,l,!0,p,o)):(n.tag=0,De&&p&&ba(n),ct(null,n,d,o),n=n.child),n;case 16:l=n.elementType;e:{switch(zs(e,n),e=n.pendingProps,d=l._init,l=d(l._payload),n.type=l,d=n.tag=gy(l),e=Ft(l,e),d){case 0:n=eu(null,n,l,e,o);break e;case 1:n=Cf(null,n,l,e,o);break e;case 11:n=Sf(null,n,l,e,o);break e;case 14:n=kf(null,n,l,Ft(l.type,e),o);break e}throw Error(i(306,l,""))}return n;case 0:return l=n.type,d=n.pendingProps,d=n.elementType===l?d:Ft(l,d),eu(e,n,l,d,o);case 1:return l=n.type,d=n.pendingProps,d=n.elementType===l?d:Ft(l,d),Cf(e,n,l,d,o);case 3:e:{if(bf(n),e===null)throw Error(i(387));l=n.pendingProps,p=n.memoizedState,d=p.element,Vd(e,n),Ss(n,l,null,o);var x=n.memoizedState;if(l=x.element,p.isDehydrated)if(p={element:l,isDehydrated:!1,cache:x.cache,pendingSuspenseBoundaries:x.pendingSuspenseBoundaries,transitions:x.transitions},n.updateQueue.baseState=p,n.memoizedState=p,n.flags&256){d=qr(Error(i(423)),n),n=Mf(e,n,l,o,d);break e}else if(l!==d){d=qr(Error(i(424)),n),n=Mf(e,n,l,o,d);break e}else for(Ct=jn(n.stateNode.containerInfo.firstChild),Nt=n,De=!0,Ot=null,o=Od(n,null,l,o),n.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(Ur(),l===d){n=mn(e,n,o);break e}ct(e,n,l,o)}n=n.child}return n;case 5:return Wd(n),e===null&&za(n),l=n.type,d=n.pendingProps,p=e!==null?e.memoizedProps:null,x=d.children,Sa(l,d)?x=null:p!==null&&Sa(l,p)&&(n.flags|=32),Nf(e,n),ct(e,n,x,o),n.child;case 6:return e===null&&za(n),null;case 13:return Pf(e,n,o);case 4:return Da(n,n.stateNode.containerInfo),l=n.pendingProps,e===null?n.child=Yr(n,null,l,o):ct(e,n,l,o),n.child;case 11:return l=n.type,d=n.pendingProps,d=n.elementType===l?d:Ft(l,d),Sf(e,n,l,d,o);case 7:return ct(e,n,n.pendingProps,o),n.child;case 8:return ct(e,n,n.pendingProps.children,o),n.child;case 12:return ct(e,n,n.pendingProps.children,o),n.child;case 10:e:{if(l=n.type._context,d=n.pendingProps,p=n.memoizedProps,x=d.value,Te(vs,l._currentValue),l._currentValue=x,p!==null)if(Dt(p.value,x)){if(p.children===d.children&&!ht.current){n=mn(e,n,o);break e}}else for(p=n.child,p!==null&&(p.return=n);p!==null;){var P=p.dependencies;if(P!==null){x=p.child;for(var R=P.firstContext;R!==null;){if(R.context===l){if(p.tag===1){R=gn(-1,o&-o),R.tag=2;var K=p.updateQueue;if(K!==null){K=K.shared;var re=K.pending;re===null?R.next=R:(R.next=re.next,re.next=R),K.pending=R}}p.lanes|=o,R=p.alternate,R!==null&&(R.lanes|=o),La(p.return,o,n),P.lanes|=o;break}R=R.next}}else if(p.tag===10)x=p.type===n.type?null:p.child;else if(p.tag===18){if(x=p.return,x===null)throw Error(i(341));x.lanes|=o,P=x.alternate,P!==null&&(P.lanes|=o),La(x,o,n),x=p.sibling}else x=p.child;if(x!==null)x.return=p;else for(x=p;x!==null;){if(x===n){x=null;break}if(p=x.sibling,p!==null){p.return=x.return,x=p;break}x=x.return}p=x}ct(e,n,d.children,o),n=n.child}return n;case 9:return d=n.type,l=n.pendingProps.children,Gr(n,o),d=Rt(d),l=l(d),n.flags|=1,ct(e,n,l,o),n.child;case 14:return l=n.type,d=Ft(l,n.pendingProps),d=Ft(l.type,d),kf(e,n,l,d,o);case 15:return _f(e,n,n.type,n.pendingProps,o);case 17:return l=n.type,d=n.pendingProps,d=n.elementType===l?d:Ft(l,d),zs(e,n),n.tag=1,gt(l)?(e=!0,fs(n)):e=!1,Gr(n,o),hf(n,l,d),Ka(n,l,d,o),tu(null,n,l,!0,e,o);case 19:return If(e,n,o);case 22:return Ef(e,n,o)}throw Error(i(156,n.tag))};function tp(e,n){return Hi(e,n)}function hy(e,n,o,l){this.tag=e,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function $t(e,n,o,l){return new hy(e,n,o,l)}function Su(e){return e=e.prototype,!(!e||!e.isReactComponent)}function gy(e){if(typeof e=="function")return Su(e)?1:0;if(e!=null){if(e=e.$$typeof,e===V)return 11;if(e===Y)return 14}return 2}function Bn(e,n){var o=e.alternate;return o===null?(o=$t(e.tag,n,e.key,e.mode),o.elementType=e.elementType,o.type=e.type,o.stateNode=e.stateNode,o.alternate=e,e.alternate=o):(o.pendingProps=n,o.type=e.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=e.flags&14680064,o.childLanes=e.childLanes,o.lanes=e.lanes,o.child=e.child,o.memoizedProps=e.memoizedProps,o.memoizedState=e.memoizedState,o.updateQueue=e.updateQueue,n=e.dependencies,o.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},o.sibling=e.sibling,o.index=e.index,o.ref=e.ref,o}function Vs(e,n,o,l,d,p){var x=2;if(l=e,typeof e=="function")Su(e)&&(x=1);else if(typeof e=="string")x=5;else e:switch(e){case W:return gr(o.children,d,p,n);case G:x=8,d|=8;break;case q:return e=$t(12,o,n,d|2),e.elementType=q,e.lanes=p,e;case J:return e=$t(13,o,n,d),e.elementType=J,e.lanes=p,e;case z:return e=$t(19,o,n,d),e.elementType=z,e.lanes=p,e;case U:return Hs(o,d,p,n);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ee:x=10;break e;case D:x=9;break e;case V:x=11;break e;case Y:x=14;break e;case O:x=16,l=null;break e}throw Error(i(130,e==null?e:typeof e,""))}return n=$t(x,o,n,d),n.elementType=e,n.type=l,n.lanes=p,n}function gr(e,n,o,l){return e=$t(7,e,l,n),e.lanes=o,e}function Hs(e,n,o,l){return e=$t(22,e,l,n),e.elementType=U,e.lanes=o,e.stateNode={isHidden:!1},e}function ku(e,n,o){return e=$t(6,e,null,n),e.lanes=o,e}function _u(e,n,o){return n=$t(4,e.children!==null?e.children:[],e.key,n),n.lanes=o,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function my(e,n,o,l,d){this.tag=n,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=nr(0),this.expirationTimes=nr(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=nr(0),this.identifierPrefix=l,this.onRecoverableError=d,this.mutableSourceEagerHydrationData=null}function Eu(e,n,o,l,d,p,x,P,R){return e=new my(e,n,o,P,R),n===1?(n=1,p===!0&&(n|=8)):n=0,p=$t(3,null,null,n),e.current=p,p.stateNode=e,p.memoizedState={element:l,isDehydrated:o,cache:null,transitions:null,pendingSuspenseBoundaries:null},$a(p),e}function yy(e,n,o){var l=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:A,key:l==null?null:""+l,children:e,containerInfo:n,implementation:o}}function np(e){if(!e)return Rn;e=e._reactInternals;e:{if(Zt(e)!==e||e.tag!==1)throw Error(i(170));var n=e;do{switch(n.tag){case 3:n=n.stateNode.context;break e;case 1:if(gt(n.type)){n=n.stateNode.__reactInternalMemoizedMergedChildContext;break e}}n=n.return}while(n!==null);throw Error(i(171))}if(e.tag===1){var o=e.type;if(gt(o))return Pd(e,o,n)}return n}function rp(e,n,o,l,d,p,x,P,R){return e=Eu(o,l,!0,e,d,p,x,P,R),e.context=np(null),o=e.current,l=dt(),d=Vn(o),p=gn(l,d),p.callback=n??null,$n(o,p,d),e.current.lanes=d,rr(e,d,l),vt(e,l),e}function Bs(e,n,o,l){var d=n.current,p=dt(),x=Vn(d);return o=np(o),n.context===null?n.context=o:n.pendingContext=o,n=gn(p,x),n.payload={element:e},l=l===void 0?null:l,l!==null&&(n.callback=l),e=$n(d,n,x),e!==null&&(Bt(e,d,x,p),ws(e,d,x)),x}function Ws(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function op(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var o=e.retryLane;e.retryLane=o!==0&&o<n?o:n}}function Nu(e,n){op(e,n),(e=e.alternate)&&op(e,n)}function vy(){return null}var ip=typeof reportError=="function"?reportError:function(e){console.error(e)};function Cu(e){this._internalRoot=e}Us.prototype.render=Cu.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(i(409));Bs(e,n,null,null)},Us.prototype.unmount=Cu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;fr(function(){Bs(null,e,null,null)}),n[cn]=null}};function Us(e){this._internalRoot=e}Us.prototype.unstable_scheduleHydration=function(e){if(e){var n=Vc();e={blockedOn:null,target:e,priority:n};for(var o=0;o<Pn.length&&n!==0&&n<Pn[o].priority;o++);Pn.splice(o,0,e),o===0&&Wc(e)}};function bu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Ys(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function sp(){}function xy(e,n,o,l,d){if(d){if(typeof l=="function"){var p=l;l=function(){var K=Ws(x);p.call(K)}}var x=rp(n,l,e,0,null,!1,!1,"",sp);return e._reactRootContainer=x,e[cn]=x.current,Ho(e.nodeType===8?e.parentNode:e),fr(),x}for(;d=e.lastChild;)e.removeChild(d);if(typeof l=="function"){var P=l;l=function(){var K=Ws(R);P.call(K)}}var R=Eu(e,0,!1,null,null,!1,!1,"",sp);return e._reactRootContainer=R,e[cn]=R.current,Ho(e.nodeType===8?e.parentNode:e),fr(function(){Bs(n,R,o,l)}),R}function Xs(e,n,o,l,d){var p=o._reactRootContainer;if(p){var x=p;if(typeof d=="function"){var P=d;d=function(){var R=Ws(x);P.call(R)}}Bs(n,x,e,d)}else x=xy(o,n,e,d,l);return Ws(x)}Oc=function(e){switch(e.tag){case 3:var n=e.stateNode;if(n.current.memoizedState.isDehydrated){var o=tr(n.pendingLanes);o!==0&&(jr(n,o|1),vt(n,Ve()),(Pe&6)===0&&(Jr=Ve()+500,Ln()))}break;case 13:fr(function(){var l=hn(e,1);if(l!==null){var d=dt();Bt(l,e,1,d)}}),Nu(e,1)}},Zl=function(e){if(e.tag===13){var n=hn(e,134217728);if(n!==null){var o=dt();Bt(n,e,134217728,o)}Nu(e,134217728)}},Fc=function(e){if(e.tag===13){var n=Vn(e),o=hn(e,n);if(o!==null){var l=dt();Bt(o,e,n,l)}Nu(e,n)}},Vc=function(){return je},Hc=function(e,n){var o=je;try{return je=e,n()}finally{je=o}},So=function(e,n,o){switch(n){case"input":if(Re(e,o),n=o.name,o.type==="radio"&&n!=null){for(o=e;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll("input[name="+JSON.stringify(""+n)+'][type="radio"]'),n=0;n<o.length;n++){var l=o[n];if(l!==e&&l.form===e.form){var d=cs(l);if(!d)throw Error(i(90));ve(l),Re(l,d)}}}break;case"textarea":Kt(e,o);break;case"select":n=o.value,n!=null&&ot(e,!!o.multiple,n,!1)}},$i=vu,Di=fr;var wy={usingClientEntryPoint:!1,Events:[Uo,Fr,cs,Li,Ai,vu]},ii={findFiberByHostInstance:or,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Sy={bundleType:ii.bundleType,version:ii.version,rendererPackageName:ii.rendererPackageName,rendererConfig:ii.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:M.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Fi(e),e===null?null:e.stateNode},findFiberByHostInstance:ii.findFiberByHostInstance||vy,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Gs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Gs.isDisabled&&Gs.supportsFiber)try{Pr=Gs.inject(Sy),kt=Gs}catch{}}return xt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=wy,xt.createPortal=function(e,n){var o=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!bu(n))throw Error(i(200));return yy(e,n,null,o)},xt.createRoot=function(e,n){if(!bu(e))throw Error(i(299));var o=!1,l="",d=ip;return n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(l=n.identifierPrefix),n.onRecoverableError!==void 0&&(d=n.onRecoverableError)),n=Eu(e,1,!1,null,null,o,!1,l,d),e[cn]=n.current,Ho(e.nodeType===8?e.parentNode:e),new Cu(n)},xt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(i(188)):(e=Object.keys(e).join(","),Error(i(268,e)));return e=Fi(n),e=e===null?null:e.stateNode,e},xt.flushSync=function(e){return fr(e)},xt.hydrate=function(e,n,o){if(!Ys(n))throw Error(i(200));return Xs(null,e,n,!0,o)},xt.hydrateRoot=function(e,n,o){if(!bu(e))throw Error(i(405));var l=o!=null&&o.hydratedSources||null,d=!1,p="",x=ip;if(o!=null&&(o.unstable_strictMode===!0&&(d=!0),o.identifierPrefix!==void 0&&(p=o.identifierPrefix),o.onRecoverableError!==void 0&&(x=o.onRecoverableError)),n=rp(n,null,e,1,o??null,d,!1,p,x),e[cn]=n.current,Ho(e),l)for(e=0;e<l.length;e++)o=l[e],d=o._getVersion,d=d(o._source),n.mutableSourceEagerHydrationData==null?n.mutableSourceEagerHydrationData=[o,d]:n.mutableSourceEagerHydrationData.push(o,d);return new Us(n)},xt.render=function(e,n,o){if(!Ys(n))throw Error(i(200));return Xs(null,e,n,!1,o)},xt.unmountComponentAtNode=function(e){if(!Ys(e))throw Error(i(40));return e._reactRootContainer?(fr(function(){Xs(null,null,e,!1,function(){e._reactRootContainer=null,e[cn]=null})}),!0):!1},xt.unstable_batchedUpdates=vu,xt.unstable_renderSubtreeIntoContainer=function(e,n,o,l){if(!Ys(o))throw Error(i(200));if(e==null||e._reactInternals===void 0)throw Error(i(38));return Xs(e,n,o,!1,l)},xt.version="18.3.1-next-f1338f8080-20240426",xt}var hp;function Oh(){if(hp)return zu.exports;hp=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(r){console.error(r)}}return t(),zu.exports=Py(),zu.exports}var gp;function zy(){if(gp)return Qs;gp=1;var t=Oh();return Qs.createRoot=t.createRoot,Qs.hydrateRoot=t.hydrateRoot,Qs}var Iy=zy();/**
|
|
41
|
-
* @license lucide-react v0.468.0 - ISC
|
|
42
|
-
*
|
|
43
|
-
* This source code is licensed under the ISC license.
|
|
44
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
45
|
-
*/const jy=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Fh=(...t)=>t.filter((r,i,s)=>!!r&&r.trim()!==""&&s.indexOf(r)===i).join(" ").trim();/**
|
|
46
|
-
* @license lucide-react v0.468.0 - ISC
|
|
47
|
-
*
|
|
48
|
-
* This source code is licensed under the ISC license.
|
|
49
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
50
|
-
*/var Ty={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
51
|
-
* @license lucide-react v0.468.0 - ISC
|
|
52
|
-
*
|
|
53
|
-
* This source code is licensed under the ISC license.
|
|
54
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
55
|
-
*/const Ry=B.forwardRef(({color:t="currentColor",size:r=24,strokeWidth:i=2,absoluteStrokeWidth:s,className:a="",children:u,iconNode:c,...f},h)=>B.createElement("svg",{ref:h,...Ty,width:r,height:r,stroke:t,strokeWidth:s?Number(i)*24/Number(r):i,className:Fh("lucide",a),...f},[...c.map(([m,v])=>B.createElement(m,v)),...Array.isArray(u)?u:[u]]));/**
|
|
56
|
-
* @license lucide-react v0.468.0 - ISC
|
|
57
|
-
*
|
|
58
|
-
* This source code is licensed under the ISC license.
|
|
59
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
60
|
-
*/const nt=(t,r)=>{const i=B.forwardRef(({className:s,...a},u)=>B.createElement(Ry,{ref:u,iconNode:r,className:Fh(`lucide-${jy(t)}`,s),...a}));return i.displayName=`${t}`,i};/**
|
|
61
|
-
* @license lucide-react v0.468.0 - ISC
|
|
62
|
-
*
|
|
63
|
-
* This source code is licensed under the ISC license.
|
|
64
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
65
|
-
*/const Ly=nt("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/**
|
|
66
|
-
* @license lucide-react v0.468.0 - ISC
|
|
67
|
-
*
|
|
68
|
-
* This source code is licensed under the ISC license.
|
|
69
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
70
|
-
*/const Ay=nt("Boxes",[["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",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["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",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["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",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]);/**
|
|
71
|
-
* @license lucide-react v0.468.0 - ISC
|
|
72
|
-
*
|
|
73
|
-
* This source code is licensed under the ISC license.
|
|
74
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
75
|
-
*/const $y=nt("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
76
|
-
* @license lucide-react v0.468.0 - ISC
|
|
77
|
-
*
|
|
78
|
-
* This source code is licensed under the ISC license.
|
|
79
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
80
|
-
*/const Dy=nt("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
81
|
-
* @license lucide-react v0.468.0 - ISC
|
|
82
|
-
*
|
|
83
|
-
* This source code is licensed under the ISC license.
|
|
84
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
85
|
-
*/const Oy=nt("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
|
|
86
|
-
* @license lucide-react v0.468.0 - ISC
|
|
87
|
-
*
|
|
88
|
-
* This source code is licensed under the ISC license.
|
|
89
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
90
|
-
*/const Fy=nt("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
|
|
91
|
-
* @license lucide-react v0.468.0 - ISC
|
|
92
|
-
*
|
|
93
|
-
* This source code is licensed under the ISC license.
|
|
94
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
95
|
-
*/const Vy=nt("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
|
|
96
|
-
* @license lucide-react v0.468.0 - ISC
|
|
97
|
-
*
|
|
98
|
-
* This source code is licensed under the ISC license.
|
|
99
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
100
|
-
*/const Hy=nt("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
|
|
101
|
-
* @license lucide-react v0.468.0 - ISC
|
|
102
|
-
*
|
|
103
|
-
* This source code is licensed under the ISC license.
|
|
104
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
105
|
-
*/const By=nt("Github",[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]]);/**
|
|
106
|
-
* @license lucide-react v0.468.0 - ISC
|
|
107
|
-
*
|
|
108
|
-
* This source code is licensed under the ISC license.
|
|
109
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
110
|
-
*/const Wy=nt("LibraryBig",[["rect",{width:"8",height:"18",x:"3",y:"3",rx:"1",key:"oynpb5"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M20.4 18.9c.2.5-.1 1.1-.6 1.3l-1.9.7c-.5.2-1.1-.1-1.3-.6L11.1 5.1c-.2-.5.1-1.1.6-1.3l1.9-.7c.5-.2 1.1.1 1.3.6Z",key:"1qboyk"}]]);/**
|
|
111
|
-
* @license lucide-react v0.468.0 - ISC
|
|
112
|
-
*
|
|
113
|
-
* This source code is licensed under the ISC license.
|
|
114
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
115
|
-
*/const Uy=nt("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/**
|
|
116
|
-
* @license lucide-react v0.468.0 - ISC
|
|
117
|
-
*
|
|
118
|
-
* This source code is licensed under the ISC license.
|
|
119
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
120
|
-
*/const Yy=nt("Package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7",key:"yx3hmr"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);/**
|
|
121
|
-
* @license lucide-react v0.468.0 - ISC
|
|
122
|
-
*
|
|
123
|
-
* This source code is licensed under the ISC license.
|
|
124
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
125
|
-
*/const Xy=nt("Pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]);/**
|
|
126
|
-
* @license lucide-react v0.468.0 - ISC
|
|
127
|
-
*
|
|
128
|
-
* This source code is licensed under the ISC license.
|
|
129
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
130
|
-
*/const Gy=nt("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
|
|
131
|
-
* @license lucide-react v0.468.0 - ISC
|
|
132
|
-
*
|
|
133
|
-
* This source code is licensed under the ISC license.
|
|
134
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
135
|
-
*/const Qy=nt("Radio",[["path",{d:"M4.9 19.1C1 15.2 1 8.8 4.9 4.9",key:"1vaf9d"}],["path",{d:"M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5",key:"u1ii0m"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5",key:"1j5fej"}],["path",{d:"M19.1 4.9C23 8.8 23 15.1 19.1 19",key:"10b0cb"}]]);/**
|
|
136
|
-
* @license lucide-react v0.468.0 - ISC
|
|
137
|
-
*
|
|
138
|
-
* This source code is licensed under the ISC license.
|
|
139
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
140
|
-
*/const qy=nt("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
141
|
-
* @license lucide-react v0.468.0 - ISC
|
|
142
|
-
*
|
|
143
|
-
* This source code is licensed under the ISC license.
|
|
144
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
145
|
-
*/const Ky=nt("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]),Zy=new TextDecoder,Tu={encode:t=>JSON.stringify(t),decode:t=>JSON.parse(typeof t=="string"?t:Zy.decode(t))},Jy="superline.inspector.v1";function ev(t){const r=t.WebSocket??globalThis.WebSocket;if(!r)throw new Error("No WebSocket implementation found; pass opts.WebSocket");const i=r,s=t.reconnect??!0,a=new Set,u=new Set,c=new Map;let f,h=1,m=!1,v="connecting",g;function y(S){v=S;for(const E of u)E(S)}function w(){y("connecting"),f=new i(t.url,Jy),f.binaryType="arraybuffer",f.onopen=()=>{y("open"),f.send(Tu.encode({t:"sub",i:h++,c:"events"}))},f.onmessage=S=>_(S.data),f.onclose=()=>{for(const[,S]of c)S.reject(new Error("Inspector disconnected"));if(c.clear(),m||!s){y("closed");return}y("closed"),g=setTimeout(w,1e3)},f.onerror=()=>{}}function _(S){let E;try{E=Tu.decode(typeof S=="string"?S:new Uint8Array(S))}catch{return}if(E.t==="pub"&&E.c==="events"){for(const N of a)N(E.d);return}if(E.i===void 0)return;const I=c.get(E.i);I&&(c.delete(E.i),E.t==="res"?I.resolve(E.d):E.t==="err"&&I.reject(new Error(E.code??"INSPECTOR_ERROR")))}function C(S,E){return new Promise((I,N)=>{if(v!=="open"){N(new Error("Inspector not connected"));return}const M=h++;c.set(M,{resolve:I,reject:N}),f.send(Tu.encode({t:"req",i:M,m:S,d:E}))})}return w(),{getContract:()=>C("getContract"),getTopology:()=>C("getTopology"),listConnections:()=>C("listConnections"),getNode:()=>C("getNode"),getConn:S=>C("getConn",{id:S}),listStores:()=>C("listStores"),listResources:S=>C("listResources",{store:S}),readResource:(S,E)=>C("readResource",{store:S,id:E}),onEvent(S){return a.add(S),()=>a.delete(S)},onStatus(S){return u.add(S),S(v),()=>u.delete(S)},close(){m=!0,g&&clearTimeout(g),f==null||f.close()}}}function tv(t){const[r,i]=B.useState(null),[s,a]=B.useState("connecting");return B.useEffect(()=>{if(!t)return;const u=ev({url:t});i(u);const c=u.onStatus(a);return()=>{c(),u.close(),i(null)}},[t]),{client:r,status:s}}function Vh(t){var r,i,s="";if(typeof t=="string"||typeof t=="number")s+=t;else if(typeof t=="object")if(Array.isArray(t)){var a=t.length;for(r=0;r<a;r++)t[r]&&(i=Vh(t[r]))&&(s&&(s+=" "),s+=i)}else for(i in t)t[i]&&(s&&(s+=" "),s+=i);return s}function Hh(){for(var t,r,i=0,s="",a=arguments.length;i<a;i++)(t=arguments[i])&&(r=Vh(t))&&(s&&(s+=" "),s+=r);return s}const mp=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,yp=Hh,Bh=(t,r)=>i=>{var s;if((r==null?void 0:r.variants)==null)return yp(t,i==null?void 0:i.class,i==null?void 0:i.className);const{variants:a,defaultVariants:u}=r,c=Object.keys(a).map(m=>{const v=i==null?void 0:i[m],g=u==null?void 0:u[m];if(v===null)return null;const y=mp(v)||mp(g);return a[m][y]}),f=i&&Object.entries(i).reduce((m,v)=>{let[g,y]=v;return y===void 0||(m[g]=y),m},{}),h=r==null||(s=r.compoundVariants)===null||s===void 0?void 0:s.reduce((m,v)=>{let{class:g,className:y,...w}=v;return Object.entries(w).every(_=>{let[C,S]=_;return Array.isArray(S)?S.includes({...u,...f}[C]):{...u,...f}[C]===S})?[...m,g,y]:m},[]);return yp(t,c,h,i==null?void 0:i.class,i==null?void 0:i.className)},fc="-",nv=t=>{const r=ov(t),{conflictingClassGroups:i,conflictingClassGroupModifiers:s}=t;return{getClassGroupId:c=>{const f=c.split(fc);return f[0]===""&&f.length!==1&&f.shift(),Wh(f,r)||rv(c)},getConflictingClassGroupIds:(c,f)=>{const h=i[c]||[];return f&&s[c]?[...h,...s[c]]:h}}},Wh=(t,r)=>{var c;if(t.length===0)return r.classGroupId;const i=t[0],s=r.nextPart.get(i),a=s?Wh(t.slice(1),s):void 0;if(a)return a;if(r.validators.length===0)return;const u=t.join(fc);return(c=r.validators.find(({validator:f})=>f(u)))==null?void 0:c.classGroupId},vp=/^\[(.+)\]$/,rv=t=>{if(vp.test(t)){const r=vp.exec(t)[1],i=r==null?void 0:r.substring(0,r.indexOf(":"));if(i)return"arbitrary.."+i}},ov=t=>{const{theme:r,prefix:i}=t,s={nextPart:new Map,validators:[]};return sv(Object.entries(t.classGroups),i).forEach(([u,c])=>{qu(c,s,u,r)}),s},qu=(t,r,i,s)=>{t.forEach(a=>{if(typeof a=="string"){const u=a===""?r:xp(r,a);u.classGroupId=i;return}if(typeof a=="function"){if(iv(a)){qu(a(s),r,i,s);return}r.validators.push({validator:a,classGroupId:i});return}Object.entries(a).forEach(([u,c])=>{qu(c,xp(r,u),i,s)})})},xp=(t,r)=>{let i=t;return r.split(fc).forEach(s=>{i.nextPart.has(s)||i.nextPart.set(s,{nextPart:new Map,validators:[]}),i=i.nextPart.get(s)}),i},iv=t=>t.isThemeGetter,sv=(t,r)=>r?t.map(([i,s])=>{const a=s.map(u=>typeof u=="string"?r+u:typeof u=="object"?Object.fromEntries(Object.entries(u).map(([c,f])=>[r+c,f])):u);return[i,a]}):t,lv=t=>{if(t<1)return{get:()=>{},set:()=>{}};let r=0,i=new Map,s=new Map;const a=(u,c)=>{i.set(u,c),r++,r>t&&(r=0,s=i,i=new Map)};return{get(u){let c=i.get(u);if(c!==void 0)return c;if((c=s.get(u))!==void 0)return a(u,c),c},set(u,c){i.has(u)?i.set(u,c):a(u,c)}}},Uh="!",av=t=>{const{separator:r,experimentalParseClassName:i}=t,s=r.length===1,a=r[0],u=r.length,c=f=>{const h=[];let m=0,v=0,g;for(let S=0;S<f.length;S++){let E=f[S];if(m===0){if(E===a&&(s||f.slice(S,S+u)===r)){h.push(f.slice(v,S)),v=S+u;continue}if(E==="/"){g=S;continue}}E==="["?m++:E==="]"&&m--}const y=h.length===0?f:f.substring(v),w=y.startsWith(Uh),_=w?y.substring(1):y,C=g&&g>v?g-v:void 0;return{modifiers:h,hasImportantModifier:w,baseClassName:_,maybePostfixModifierPosition:C}};return i?f=>i({className:f,parseClassName:c}):c},uv=t=>{if(t.length<=1)return t;const r=[];let i=[];return t.forEach(s=>{s[0]==="["?(r.push(...i.sort(),s),i=[]):i.push(s)}),r.push(...i.sort()),r},cv=t=>({cache:lv(t.cacheSize),parseClassName:av(t),...nv(t)}),dv=/\s+/,fv=(t,r)=>{const{parseClassName:i,getClassGroupId:s,getConflictingClassGroupIds:a}=r,u=[],c=t.trim().split(dv);let f="";for(let h=c.length-1;h>=0;h-=1){const m=c[h],{modifiers:v,hasImportantModifier:g,baseClassName:y,maybePostfixModifierPosition:w}=i(m);let _=!!w,C=s(_?y.substring(0,w):y);if(!C){if(!_){f=m+(f.length>0?" "+f:f);continue}if(C=s(y),!C){f=m+(f.length>0?" "+f:f);continue}_=!1}const S=uv(v).join(":"),E=g?S+Uh:S,I=E+C;if(u.includes(I))continue;u.push(I);const N=a(C,_);for(let M=0;M<N.length;++M){const F=N[M];u.push(E+F)}f=m+(f.length>0?" "+f:f)}return f};function pv(){let t=0,r,i,s="";for(;t<arguments.length;)(r=arguments[t++])&&(i=Yh(r))&&(s&&(s+=" "),s+=i);return s}const Yh=t=>{if(typeof t=="string")return t;let r,i="";for(let s=0;s<t.length;s++)t[s]&&(r=Yh(t[s]))&&(i&&(i+=" "),i+=r);return i};function hv(t,...r){let i,s,a,u=c;function c(h){const m=r.reduce((v,g)=>g(v),t());return i=cv(m),s=i.cache.get,a=i.cache.set,u=f,f(h)}function f(h){const m=s(h);if(m)return m;const v=fv(h,i);return a(h,v),v}return function(){return u(pv.apply(null,arguments))}}const $e=t=>{const r=i=>i[t]||[];return r.isThemeGetter=!0,r},Xh=/^\[(?:([a-z-]+):)?(.+)\]$/i,gv=/^\d+\/\d+$/,mv=new Set(["px","full","screen"]),yv=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,vv=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,xv=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,wv=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Sv=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,vn=t=>oo(t)||mv.has(t)||gv.test(t),Un=t=>go(t,"length",Pv),oo=t=>!!t&&!Number.isNaN(Number(t)),Ru=t=>go(t,"number",oo),li=t=>!!t&&Number.isInteger(Number(t)),kv=t=>t.endsWith("%")&&oo(t.slice(0,-1)),Ne=t=>Xh.test(t),Yn=t=>yv.test(t),_v=new Set(["length","size","percentage"]),Ev=t=>go(t,_v,Gh),Nv=t=>go(t,"position",Gh),Cv=new Set(["image","url"]),bv=t=>go(t,Cv,Iv),Mv=t=>go(t,"",zv),ai=()=>!0,go=(t,r,i)=>{const s=Xh.exec(t);return s?s[1]?typeof r=="string"?s[1]===r:r.has(s[1]):i(s[2]):!1},Pv=t=>vv.test(t)&&!xv.test(t),Gh=()=>!1,zv=t=>wv.test(t),Iv=t=>Sv.test(t),jv=()=>{const t=$e("colors"),r=$e("spacing"),i=$e("blur"),s=$e("brightness"),a=$e("borderColor"),u=$e("borderRadius"),c=$e("borderSpacing"),f=$e("borderWidth"),h=$e("contrast"),m=$e("grayscale"),v=$e("hueRotate"),g=$e("invert"),y=$e("gap"),w=$e("gradientColorStops"),_=$e("gradientColorStopPositions"),C=$e("inset"),S=$e("margin"),E=$e("opacity"),I=$e("padding"),N=$e("saturate"),M=$e("scale"),F=$e("sepia"),A=$e("skew"),W=$e("space"),G=$e("translate"),q=()=>["auto","contain","none"],ee=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto",Ne,r],V=()=>[Ne,r],J=()=>["",vn,Un],z=()=>["auto",oo,Ne],Y=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],O=()=>["solid","dashed","dotted","double","none"],U=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],L=()=>["start","end","center","between","around","evenly","stretch"],j=()=>["","0",Ne],H=()=>["auto","avoid","all","avoid-page","page","left","right","column"],b=()=>[oo,Ne];return{cacheSize:500,separator:":",theme:{colors:[ai],spacing:[vn,Un],blur:["none","",Yn,Ne],brightness:b(),borderColor:[t],borderRadius:["none","","full",Yn,Ne],borderSpacing:V(),borderWidth:J(),contrast:b(),grayscale:j(),hueRotate:b(),invert:j(),gap:V(),gradientColorStops:[t],gradientColorStopPositions:[kv,Un],inset:D(),margin:D(),opacity:b(),padding:V(),saturate:b(),scale:b(),sepia:j(),skew:b(),space:V(),translate:V()},classGroups:{aspect:[{aspect:["auto","square","video",Ne]}],container:["container"],columns:[{columns:[Yn]}],"break-after":[{"break-after":H()}],"break-before":[{"break-before":H()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Y(),Ne]}],overflow:[{overflow:ee()}],"overflow-x":[{"overflow-x":ee()}],"overflow-y":[{"overflow-y":ee()}],overscroll:[{overscroll:q()}],"overscroll-x":[{"overscroll-x":q()}],"overscroll-y":[{"overscroll-y":q()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[C]}],"inset-x":[{"inset-x":[C]}],"inset-y":[{"inset-y":[C]}],start:[{start:[C]}],end:[{end:[C]}],top:[{top:[C]}],right:[{right:[C]}],bottom:[{bottom:[C]}],left:[{left:[C]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",li,Ne]}],basis:[{basis:D()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ne]}],grow:[{grow:j()}],shrink:[{shrink:j()}],order:[{order:["first","last","none",li,Ne]}],"grid-cols":[{"grid-cols":[ai]}],"col-start-end":[{col:["auto",{span:["full",li,Ne]},Ne]}],"col-start":[{"col-start":z()}],"col-end":[{"col-end":z()}],"grid-rows":[{"grid-rows":[ai]}],"row-start-end":[{row:["auto",{span:[li,Ne]},Ne]}],"row-start":[{"row-start":z()}],"row-end":[{"row-end":z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ne]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ne]}],gap:[{gap:[y]}],"gap-x":[{"gap-x":[y]}],"gap-y":[{"gap-y":[y]}],"justify-content":[{justify:["normal",...L()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...L(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...L(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[I]}],px:[{px:[I]}],py:[{py:[I]}],ps:[{ps:[I]}],pe:[{pe:[I]}],pt:[{pt:[I]}],pr:[{pr:[I]}],pb:[{pb:[I]}],pl:[{pl:[I]}],m:[{m:[S]}],mx:[{mx:[S]}],my:[{my:[S]}],ms:[{ms:[S]}],me:[{me:[S]}],mt:[{mt:[S]}],mr:[{mr:[S]}],mb:[{mb:[S]}],ml:[{ml:[S]}],"space-x":[{"space-x":[W]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[W]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ne,r]}],"min-w":[{"min-w":[Ne,r,"min","max","fit"]}],"max-w":[{"max-w":[Ne,r,"none","full","min","max","fit","prose",{screen:[Yn]},Yn]}],h:[{h:[Ne,r,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ne,r,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ne,r,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ne,r,"auto","min","max","fit"]}],"font-size":[{text:["base",Yn,Un]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ru]}],"font-family":[{font:[ai]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Ne]}],"line-clamp":[{"line-clamp":["none",oo,Ru]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",vn,Ne]}],"list-image":[{"list-image":["none",Ne]}],"list-style-type":[{list:["none","disc","decimal",Ne]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[E]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[E]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...O(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",vn,Un]}],"underline-offset":[{"underline-offset":["auto",vn,Ne]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:V()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ne]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ne]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[E]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Y(),Nv]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Ev]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},bv]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[_]}],"gradient-via-pos":[{via:[_]}],"gradient-to-pos":[{to:[_]}],"gradient-from":[{from:[w]}],"gradient-via":[{via:[w]}],"gradient-to":[{to:[w]}],rounded:[{rounded:[u]}],"rounded-s":[{"rounded-s":[u]}],"rounded-e":[{"rounded-e":[u]}],"rounded-t":[{"rounded-t":[u]}],"rounded-r":[{"rounded-r":[u]}],"rounded-b":[{"rounded-b":[u]}],"rounded-l":[{"rounded-l":[u]}],"rounded-ss":[{"rounded-ss":[u]}],"rounded-se":[{"rounded-se":[u]}],"rounded-ee":[{"rounded-ee":[u]}],"rounded-es":[{"rounded-es":[u]}],"rounded-tl":[{"rounded-tl":[u]}],"rounded-tr":[{"rounded-tr":[u]}],"rounded-br":[{"rounded-br":[u]}],"rounded-bl":[{"rounded-bl":[u]}],"border-w":[{border:[f]}],"border-w-x":[{"border-x":[f]}],"border-w-y":[{"border-y":[f]}],"border-w-s":[{"border-s":[f]}],"border-w-e":[{"border-e":[f]}],"border-w-t":[{"border-t":[f]}],"border-w-r":[{"border-r":[f]}],"border-w-b":[{"border-b":[f]}],"border-w-l":[{"border-l":[f]}],"border-opacity":[{"border-opacity":[E]}],"border-style":[{border:[...O(),"hidden"]}],"divide-x":[{"divide-x":[f]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[f]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[E]}],"divide-style":[{divide:O()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...O()]}],"outline-offset":[{"outline-offset":[vn,Ne]}],"outline-w":[{outline:[vn,Un]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:J()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[E]}],"ring-offset-w":[{"ring-offset":[vn,Un]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",Yn,Mv]}],"shadow-color":[{shadow:[ai]}],opacity:[{opacity:[E]}],"mix-blend":[{"mix-blend":[...U(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":U()}],filter:[{filter:["","none"]}],blur:[{blur:[i]}],brightness:[{brightness:[s]}],contrast:[{contrast:[h]}],"drop-shadow":[{"drop-shadow":["","none",Yn,Ne]}],grayscale:[{grayscale:[m]}],"hue-rotate":[{"hue-rotate":[v]}],invert:[{invert:[g]}],saturate:[{saturate:[N]}],sepia:[{sepia:[F]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[i]}],"backdrop-brightness":[{"backdrop-brightness":[s]}],"backdrop-contrast":[{"backdrop-contrast":[h]}],"backdrop-grayscale":[{"backdrop-grayscale":[m]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[v]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[E]}],"backdrop-saturate":[{"backdrop-saturate":[N]}],"backdrop-sepia":[{"backdrop-sepia":[F]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[c]}],"border-spacing-x":[{"border-spacing-x":[c]}],"border-spacing-y":[{"border-spacing-y":[c]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ne]}],duration:[{duration:b()}],ease:[{ease:["linear","in","out","in-out",Ne]}],delay:[{delay:b()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ne]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[M]}],"scale-x":[{"scale-x":[M]}],"scale-y":[{"scale-y":[M]}],rotate:[{rotate:[li,Ne]}],"translate-x":[{"translate-x":[G]}],"translate-y":[{"translate-y":[G]}],"skew-x":[{"skew-x":[A]}],"skew-y":[{"skew-y":[A]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ne]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ne]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":V()}],"scroll-mx":[{"scroll-mx":V()}],"scroll-my":[{"scroll-my":V()}],"scroll-ms":[{"scroll-ms":V()}],"scroll-me":[{"scroll-me":V()}],"scroll-mt":[{"scroll-mt":V()}],"scroll-mr":[{"scroll-mr":V()}],"scroll-mb":[{"scroll-mb":V()}],"scroll-ml":[{"scroll-ml":V()}],"scroll-p":[{"scroll-p":V()}],"scroll-px":[{"scroll-px":V()}],"scroll-py":[{"scroll-py":V()}],"scroll-ps":[{"scroll-ps":V()}],"scroll-pe":[{"scroll-pe":V()}],"scroll-pt":[{"scroll-pt":V()}],"scroll-pr":[{"scroll-pr":V()}],"scroll-pb":[{"scroll-pb":V()}],"scroll-pl":[{"scroll-pl":V()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ne]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[vn,Un,Ru]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},Tv=hv(jv);function Je(...t){return Tv(Hh(t))}const Rv=Bh("inline-flex items-center rounded-md border px-2 py-0.5 text-xs font-medium",{variants:{variant:{default:"border-transparent bg-primary/15 text-primary",secondary:"border-transparent bg-secondary text-secondary-foreground",outline:"text-foreground",muted:"border-transparent bg-muted text-muted-foreground"}},defaultVariants:{variant:"default"}});function Ku({className:t,variant:r,...i}){return k.jsx("span",{className:Je(Rv({variant:r}),t),...i})}function Xe(t){if(typeof t=="string"||typeof t=="number")return""+t;let r="";if(Array.isArray(t))for(let i=0,s;i<t.length;i++)(s=Xe(t[i]))!==""&&(r+=(r&&" ")+s);else for(let i in t)t[i]&&(r+=(r&&" ")+i);return r}var Lv={value:()=>{}};function El(){for(var t=0,r=arguments.length,i={},s;t<r;++t){if(!(s=arguments[t]+"")||s in i||/[\s.]/.test(s))throw new Error("illegal type: "+s);i[s]=[]}return new al(i)}function al(t){this._=t}function Av(t,r){return t.trim().split(/^|\s+/).map(function(i){var s="",a=i.indexOf(".");if(a>=0&&(s=i.slice(a+1),i=i.slice(0,a)),i&&!r.hasOwnProperty(i))throw new Error("unknown type: "+i);return{type:i,name:s}})}al.prototype=El.prototype={constructor:al,on:function(t,r){var i=this._,s=Av(t+"",i),a,u=-1,c=s.length;if(arguments.length<2){for(;++u<c;)if((a=(t=s[u]).type)&&(a=$v(i[a],t.name)))return a;return}if(r!=null&&typeof r!="function")throw new Error("invalid callback: "+r);for(;++u<c;)if(a=(t=s[u]).type)i[a]=wp(i[a],t.name,r);else if(r==null)for(a in i)i[a]=wp(i[a],t.name,null);return this},copy:function(){var t={},r=this._;for(var i in r)t[i]=r[i].slice();return new al(t)},call:function(t,r){if((a=arguments.length-2)>0)for(var i=new Array(a),s=0,a,u;s<a;++s)i[s]=arguments[s+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(u=this._[t],s=0,a=u.length;s<a;++s)u[s].value.apply(r,i)},apply:function(t,r,i){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var s=this._[t],a=0,u=s.length;a<u;++a)s[a].value.apply(r,i)}};function $v(t,r){for(var i=0,s=t.length,a;i<s;++i)if((a=t[i]).name===r)return a.value}function wp(t,r,i){for(var s=0,a=t.length;s<a;++s)if(t[s].name===r){t[s]=Lv,t=t.slice(0,s).concat(t.slice(s+1));break}return i!=null&&t.push({name:r,value:i}),t}var Zu="http://www.w3.org/1999/xhtml";const Sp={svg:"http://www.w3.org/2000/svg",xhtml:Zu,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Nl(t){var r=t+="",i=r.indexOf(":");return i>=0&&(r=t.slice(0,i))!=="xmlns"&&(t=t.slice(i+1)),Sp.hasOwnProperty(r)?{space:Sp[r],local:t}:t}function Dv(t){return function(){var r=this.ownerDocument,i=this.namespaceURI;return i===Zu&&r.documentElement.namespaceURI===Zu?r.createElement(t):r.createElementNS(i,t)}}function Ov(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Qh(t){var r=Nl(t);return(r.local?Ov:Dv)(r)}function Fv(){}function pc(t){return t==null?Fv:function(){return this.querySelector(t)}}function Vv(t){typeof t!="function"&&(t=pc(t));for(var r=this._groups,i=r.length,s=new Array(i),a=0;a<i;++a)for(var u=r[a],c=u.length,f=s[a]=new Array(c),h,m,v=0;v<c;++v)(h=u[v])&&(m=t.call(h,h.__data__,v,u))&&("__data__"in h&&(m.__data__=h.__data__),f[v]=m);return new Pt(s,this._parents)}function Hv(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function Bv(){return[]}function qh(t){return t==null?Bv:function(){return this.querySelectorAll(t)}}function Wv(t){return function(){return Hv(t.apply(this,arguments))}}function Uv(t){typeof t=="function"?t=Wv(t):t=qh(t);for(var r=this._groups,i=r.length,s=[],a=[],u=0;u<i;++u)for(var c=r[u],f=c.length,h,m=0;m<f;++m)(h=c[m])&&(s.push(t.call(h,h.__data__,m,c)),a.push(h));return new Pt(s,a)}function Kh(t){return function(){return this.matches(t)}}function Zh(t){return function(r){return r.matches(t)}}var Yv=Array.prototype.find;function Xv(t){return function(){return Yv.call(this.children,t)}}function Gv(){return this.firstElementChild}function Qv(t){return this.select(t==null?Gv:Xv(typeof t=="function"?t:Zh(t)))}var qv=Array.prototype.filter;function Kv(){return Array.from(this.children)}function Zv(t){return function(){return qv.call(this.children,t)}}function Jv(t){return this.selectAll(t==null?Kv:Zv(typeof t=="function"?t:Zh(t)))}function ex(t){typeof t!="function"&&(t=Kh(t));for(var r=this._groups,i=r.length,s=new Array(i),a=0;a<i;++a)for(var u=r[a],c=u.length,f=s[a]=[],h,m=0;m<c;++m)(h=u[m])&&t.call(h,h.__data__,m,u)&&f.push(h);return new Pt(s,this._parents)}function Jh(t){return new Array(t.length)}function tx(){return new Pt(this._enter||this._groups.map(Jh),this._parents)}function pl(t,r){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=r}pl.prototype={constructor:pl,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,r){return this._parent.insertBefore(t,r)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function nx(t){return function(){return t}}function rx(t,r,i,s,a,u){for(var c=0,f,h=r.length,m=u.length;c<m;++c)(f=r[c])?(f.__data__=u[c],s[c]=f):i[c]=new pl(t,u[c]);for(;c<h;++c)(f=r[c])&&(a[c]=f)}function ox(t,r,i,s,a,u,c){var f,h,m=new Map,v=r.length,g=u.length,y=new Array(v),w;for(f=0;f<v;++f)(h=r[f])&&(y[f]=w=c.call(h,h.__data__,f,r)+"",m.has(w)?a[f]=h:m.set(w,h));for(f=0;f<g;++f)w=c.call(t,u[f],f,u)+"",(h=m.get(w))?(s[f]=h,h.__data__=u[f],m.delete(w)):i[f]=new pl(t,u[f]);for(f=0;f<v;++f)(h=r[f])&&m.get(y[f])===h&&(a[f]=h)}function ix(t){return t.__data__}function sx(t,r){if(!arguments.length)return Array.from(this,ix);var i=r?ox:rx,s=this._parents,a=this._groups;typeof t!="function"&&(t=nx(t));for(var u=a.length,c=new Array(u),f=new Array(u),h=new Array(u),m=0;m<u;++m){var v=s[m],g=a[m],y=g.length,w=lx(t.call(v,v&&v.__data__,m,s)),_=w.length,C=f[m]=new Array(_),S=c[m]=new Array(_),E=h[m]=new Array(y);i(v,g,C,S,E,w,r);for(var I=0,N=0,M,F;I<_;++I)if(M=C[I]){for(I>=N&&(N=I+1);!(F=S[N])&&++N<_;);M._next=F||null}}return c=new Pt(c,s),c._enter=f,c._exit=h,c}function lx(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function ax(){return new Pt(this._exit||this._groups.map(Jh),this._parents)}function ux(t,r,i){var s=this.enter(),a=this,u=this.exit();return typeof t=="function"?(s=t(s),s&&(s=s.selection())):s=s.append(t+""),r!=null&&(a=r(a),a&&(a=a.selection())),i==null?u.remove():i(u),s&&a?s.merge(a).order():a}function cx(t){for(var r=t.selection?t.selection():t,i=this._groups,s=r._groups,a=i.length,u=s.length,c=Math.min(a,u),f=new Array(a),h=0;h<c;++h)for(var m=i[h],v=s[h],g=m.length,y=f[h]=new Array(g),w,_=0;_<g;++_)(w=m[_]||v[_])&&(y[_]=w);for(;h<a;++h)f[h]=i[h];return new Pt(f,this._parents)}function dx(){for(var t=this._groups,r=-1,i=t.length;++r<i;)for(var s=t[r],a=s.length-1,u=s[a],c;--a>=0;)(c=s[a])&&(u&&c.compareDocumentPosition(u)^4&&u.parentNode.insertBefore(c,u),u=c);return this}function fx(t){t||(t=px);function r(g,y){return g&&y?t(g.__data__,y.__data__):!g-!y}for(var i=this._groups,s=i.length,a=new Array(s),u=0;u<s;++u){for(var c=i[u],f=c.length,h=a[u]=new Array(f),m,v=0;v<f;++v)(m=c[v])&&(h[v]=m);h.sort(r)}return new Pt(a,this._parents).order()}function px(t,r){return t<r?-1:t>r?1:t>=r?0:NaN}function hx(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function gx(){return Array.from(this)}function mx(){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var s=t[r],a=0,u=s.length;a<u;++a){var c=s[a];if(c)return c}return null}function yx(){let t=0;for(const r of this)++t;return t}function vx(){return!this.node()}function xx(t){for(var r=this._groups,i=0,s=r.length;i<s;++i)for(var a=r[i],u=0,c=a.length,f;u<c;++u)(f=a[u])&&t.call(f,f.__data__,u,a);return this}function wx(t){return function(){this.removeAttribute(t)}}function Sx(t){return function(){this.removeAttributeNS(t.space,t.local)}}function kx(t,r){return function(){this.setAttribute(t,r)}}function _x(t,r){return function(){this.setAttributeNS(t.space,t.local,r)}}function Ex(t,r){return function(){var i=r.apply(this,arguments);i==null?this.removeAttribute(t):this.setAttribute(t,i)}}function Nx(t,r){return function(){var i=r.apply(this,arguments);i==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,i)}}function Cx(t,r){var i=Nl(t);if(arguments.length<2){var s=this.node();return i.local?s.getAttributeNS(i.space,i.local):s.getAttribute(i)}return this.each((r==null?i.local?Sx:wx:typeof r=="function"?i.local?Nx:Ex:i.local?_x:kx)(i,r))}function eg(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function bx(t){return function(){this.style.removeProperty(t)}}function Mx(t,r,i){return function(){this.style.setProperty(t,r,i)}}function Px(t,r,i){return function(){var s=r.apply(this,arguments);s==null?this.style.removeProperty(t):this.style.setProperty(t,s,i)}}function zx(t,r,i){return arguments.length>1?this.each((r==null?bx:typeof r=="function"?Px:Mx)(t,r,i??"")):lo(this.node(),t)}function lo(t,r){return t.style.getPropertyValue(r)||eg(t).getComputedStyle(t,null).getPropertyValue(r)}function Ix(t){return function(){delete this[t]}}function jx(t,r){return function(){this[t]=r}}function Tx(t,r){return function(){var i=r.apply(this,arguments);i==null?delete this[t]:this[t]=i}}function Rx(t,r){return arguments.length>1?this.each((r==null?Ix:typeof r=="function"?Tx:jx)(t,r)):this.node()[t]}function tg(t){return t.trim().split(/^|\s+/)}function hc(t){return t.classList||new ng(t)}function ng(t){this._node=t,this._names=tg(t.getAttribute("class")||"")}ng.prototype={add:function(t){var r=this._names.indexOf(t);r<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var r=this._names.indexOf(t);r>=0&&(this._names.splice(r,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function rg(t,r){for(var i=hc(t),s=-1,a=r.length;++s<a;)i.add(r[s])}function og(t,r){for(var i=hc(t),s=-1,a=r.length;++s<a;)i.remove(r[s])}function Lx(t){return function(){rg(this,t)}}function Ax(t){return function(){og(this,t)}}function $x(t,r){return function(){(r.apply(this,arguments)?rg:og)(this,t)}}function Dx(t,r){var i=tg(t+"");if(arguments.length<2){for(var s=hc(this.node()),a=-1,u=i.length;++a<u;)if(!s.contains(i[a]))return!1;return!0}return this.each((typeof r=="function"?$x:r?Lx:Ax)(i,r))}function Ox(){this.textContent=""}function Fx(t){return function(){this.textContent=t}}function Vx(t){return function(){var r=t.apply(this,arguments);this.textContent=r??""}}function Hx(t){return arguments.length?this.each(t==null?Ox:(typeof t=="function"?Vx:Fx)(t)):this.node().textContent}function Bx(){this.innerHTML=""}function Wx(t){return function(){this.innerHTML=t}}function Ux(t){return function(){var r=t.apply(this,arguments);this.innerHTML=r??""}}function Yx(t){return arguments.length?this.each(t==null?Bx:(typeof t=="function"?Ux:Wx)(t)):this.node().innerHTML}function Xx(){this.nextSibling&&this.parentNode.appendChild(this)}function Gx(){return this.each(Xx)}function Qx(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function qx(){return this.each(Qx)}function Kx(t){var r=typeof t=="function"?t:Qh(t);return this.select(function(){return this.appendChild(r.apply(this,arguments))})}function Zx(){return null}function Jx(t,r){var i=typeof t=="function"?t:Qh(t),s=r==null?Zx:typeof r=="function"?r:pc(r);return this.select(function(){return this.insertBefore(i.apply(this,arguments),s.apply(this,arguments)||null)})}function e1(){var t=this.parentNode;t&&t.removeChild(this)}function t1(){return this.each(e1)}function n1(){var t=this.cloneNode(!1),r=this.parentNode;return r?r.insertBefore(t,this.nextSibling):t}function r1(){var t=this.cloneNode(!0),r=this.parentNode;return r?r.insertBefore(t,this.nextSibling):t}function o1(t){return this.select(t?r1:n1)}function i1(t){return arguments.length?this.property("__data__",t):this.node().__data__}function s1(t){return function(r){t.call(this,r,this.__data__)}}function l1(t){return t.trim().split(/^|\s+/).map(function(r){var i="",s=r.indexOf(".");return s>=0&&(i=r.slice(s+1),r=r.slice(0,s)),{type:r,name:i}})}function a1(t){return function(){var r=this.__on;if(r){for(var i=0,s=-1,a=r.length,u;i<a;++i)u=r[i],(!t.type||u.type===t.type)&&u.name===t.name?this.removeEventListener(u.type,u.listener,u.options):r[++s]=u;++s?r.length=s:delete this.__on}}}function u1(t,r,i){return function(){var s=this.__on,a,u=s1(r);if(s){for(var c=0,f=s.length;c<f;++c)if((a=s[c]).type===t.type&&a.name===t.name){this.removeEventListener(a.type,a.listener,a.options),this.addEventListener(a.type,a.listener=u,a.options=i),a.value=r;return}}this.addEventListener(t.type,u,i),a={type:t.type,name:t.name,value:r,listener:u,options:i},s?s.push(a):this.__on=[a]}}function c1(t,r,i){var s=l1(t+""),a,u=s.length,c;if(arguments.length<2){var f=this.node().__on;if(f){for(var h=0,m=f.length,v;h<m;++h)for(a=0,v=f[h];a<u;++a)if((c=s[a]).type===v.type&&c.name===v.name)return v.value}return}for(f=r?u1:a1,a=0;a<u;++a)this.each(f(s[a],r,i));return this}function ig(t,r,i){var s=eg(t),a=s.CustomEvent;typeof a=="function"?a=new a(r,i):(a=s.document.createEvent("Event"),i?(a.initEvent(r,i.bubbles,i.cancelable),a.detail=i.detail):a.initEvent(r,!1,!1)),t.dispatchEvent(a)}function d1(t,r){return function(){return ig(this,t,r)}}function f1(t,r){return function(){return ig(this,t,r.apply(this,arguments))}}function p1(t,r){return this.each((typeof r=="function"?f1:d1)(t,r))}function*h1(){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var s=t[r],a=0,u=s.length,c;a<u;++a)(c=s[a])&&(yield c)}var sg=[null];function Pt(t,r){this._groups=t,this._parents=r}function Ci(){return new Pt([[document.documentElement]],sg)}function g1(){return this}Pt.prototype=Ci.prototype={constructor:Pt,select:Vv,selectAll:Uv,selectChild:Qv,selectChildren:Jv,filter:ex,data:sx,enter:tx,exit:ax,join:ux,merge:cx,selection:g1,order:dx,sort:fx,call:hx,nodes:gx,node:mx,size:yx,empty:vx,each:xx,attr:Cx,style:zx,property:Rx,classed:Dx,text:Hx,html:Yx,raise:Gx,lower:qx,append:Kx,insert:Jx,remove:t1,clone:o1,datum:i1,on:c1,dispatch:p1,[Symbol.iterator]:h1};function Mt(t){return typeof t=="string"?new Pt([[document.querySelector(t)]],[document.documentElement]):new Pt([[t]],sg)}function m1(t){let r;for(;r=t.sourceEvent;)t=r;return t}function Wt(t,r){if(t=m1(t),r===void 0&&(r=t.currentTarget),r){var i=r.ownerSVGElement||r;if(i.createSVGPoint){var s=i.createSVGPoint();return s.x=t.clientX,s.y=t.clientY,s=s.matrixTransform(r.getScreenCTM().inverse()),[s.x,s.y]}if(r.getBoundingClientRect){var a=r.getBoundingClientRect();return[t.clientX-a.left-r.clientLeft,t.clientY-a.top-r.clientTop]}}return[t.pageX,t.pageY]}const y1={passive:!1},mi={capture:!0,passive:!1};function Lu(t){t.stopImmediatePropagation()}function io(t){t.preventDefault(),t.stopImmediatePropagation()}function lg(t){var r=t.document.documentElement,i=Mt(t).on("dragstart.drag",io,mi);"onselectstart"in r?i.on("selectstart.drag",io,mi):(r.__noselect=r.style.MozUserSelect,r.style.MozUserSelect="none")}function ag(t,r){var i=t.document.documentElement,s=Mt(t).on("dragstart.drag",null);r&&(s.on("click.drag",io,mi),setTimeout(function(){s.on("click.drag",null)},0)),"onselectstart"in i?s.on("selectstart.drag",null):(i.style.MozUserSelect=i.__noselect,delete i.__noselect)}const qs=t=>()=>t;function Ju(t,{sourceEvent:r,subject:i,target:s,identifier:a,active:u,x:c,y:f,dx:h,dy:m,dispatch:v}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:r,enumerable:!0,configurable:!0},subject:{value:i,enumerable:!0,configurable:!0},target:{value:s,enumerable:!0,configurable:!0},identifier:{value:a,enumerable:!0,configurable:!0},active:{value:u,enumerable:!0,configurable:!0},x:{value:c,enumerable:!0,configurable:!0},y:{value:f,enumerable:!0,configurable:!0},dx:{value:h,enumerable:!0,configurable:!0},dy:{value:m,enumerable:!0,configurable:!0},_:{value:v}})}Ju.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function v1(t){return!t.ctrlKey&&!t.button}function x1(){return this.parentNode}function w1(t,r){return r??{x:t.x,y:t.y}}function S1(){return navigator.maxTouchPoints||"ontouchstart"in this}function ug(){var t=v1,r=x1,i=w1,s=S1,a={},u=El("start","drag","end"),c=0,f,h,m,v,g=0;function y(M){M.on("mousedown.drag",w).filter(s).on("touchstart.drag",S).on("touchmove.drag",E,y1).on("touchend.drag touchcancel.drag",I).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function w(M,F){if(!(v||!t.call(this,M,F))){var A=N(this,r.call(this,M,F),M,F,"mouse");A&&(Mt(M.view).on("mousemove.drag",_,mi).on("mouseup.drag",C,mi),lg(M.view),Lu(M),m=!1,f=M.clientX,h=M.clientY,A("start",M))}}function _(M){if(io(M),!m){var F=M.clientX-f,A=M.clientY-h;m=F*F+A*A>g}a.mouse("drag",M)}function C(M){Mt(M.view).on("mousemove.drag mouseup.drag",null),ag(M.view,m),io(M),a.mouse("end",M)}function S(M,F){if(t.call(this,M,F)){var A=M.changedTouches,W=r.call(this,M,F),G=A.length,q,ee;for(q=0;q<G;++q)(ee=N(this,W,M,F,A[q].identifier,A[q]))&&(Lu(M),ee("start",M,A[q]))}}function E(M){var F=M.changedTouches,A=F.length,W,G;for(W=0;W<A;++W)(G=a[F[W].identifier])&&(io(M),G("drag",M,F[W]))}function I(M){var F=M.changedTouches,A=F.length,W,G;for(v&&clearTimeout(v),v=setTimeout(function(){v=null},500),W=0;W<A;++W)(G=a[F[W].identifier])&&(Lu(M),G("end",M,F[W]))}function N(M,F,A,W,G,q){var ee=u.copy(),D=Wt(q||A,F),V,J,z;if((z=i.call(M,new Ju("beforestart",{sourceEvent:A,target:y,identifier:G,active:c,x:D[0],y:D[1],dx:0,dy:0,dispatch:ee}),W))!=null)return V=z.x-D[0]||0,J=z.y-D[1]||0,function Y(O,U,L){var j=D,H;switch(O){case"start":a[G]=Y,H=c++;break;case"end":delete a[G],--c;case"drag":D=Wt(L||U,F),H=c;break}ee.call(O,M,new Ju(O,{sourceEvent:U,subject:z,target:y,identifier:G,active:H,x:D[0]+V,y:D[1]+J,dx:D[0]-j[0],dy:D[1]-j[1],dispatch:ee}),W)}}return y.filter=function(M){return arguments.length?(t=typeof M=="function"?M:qs(!!M),y):t},y.container=function(M){return arguments.length?(r=typeof M=="function"?M:qs(M),y):r},y.subject=function(M){return arguments.length?(i=typeof M=="function"?M:qs(M),y):i},y.touchable=function(M){return arguments.length?(s=typeof M=="function"?M:qs(!!M),y):s},y.on=function(){var M=u.on.apply(u,arguments);return M===u?y:M},y.clickDistance=function(M){return arguments.length?(g=(M=+M)*M,y):Math.sqrt(g)},y}function gc(t,r,i){t.prototype=r.prototype=i,i.constructor=t}function cg(t,r){var i=Object.create(t.prototype);for(var s in r)i[s]=r[s];return i}function bi(){}var yi=.7,hl=1/yi,so="\\s*([+-]?\\d+)\\s*",vi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",on="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",k1=/^#([0-9a-f]{3,8})$/,_1=new RegExp(`^rgb\\(${so},${so},${so}\\)$`),E1=new RegExp(`^rgb\\(${on},${on},${on}\\)$`),N1=new RegExp(`^rgba\\(${so},${so},${so},${vi}\\)$`),C1=new RegExp(`^rgba\\(${on},${on},${on},${vi}\\)$`),b1=new RegExp(`^hsl\\(${vi},${on},${on}\\)$`),M1=new RegExp(`^hsla\\(${vi},${on},${on},${vi}\\)$`),kp={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};gc(bi,Sr,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:_p,formatHex:_p,formatHex8:P1,formatHsl:z1,formatRgb:Ep,toString:Ep});function _p(){return this.rgb().formatHex()}function P1(){return this.rgb().formatHex8()}function z1(){return dg(this).formatHsl()}function Ep(){return this.rgb().formatRgb()}function Sr(t){var r,i;return t=(t+"").trim().toLowerCase(),(r=k1.exec(t))?(i=r[1].length,r=parseInt(r[1],16),i===6?Np(r):i===3?new wt(r>>8&15|r>>4&240,r>>4&15|r&240,(r&15)<<4|r&15,1):i===8?Ks(r>>24&255,r>>16&255,r>>8&255,(r&255)/255):i===4?Ks(r>>12&15|r>>8&240,r>>8&15|r>>4&240,r>>4&15|r&240,((r&15)<<4|r&15)/255):null):(r=_1.exec(t))?new wt(r[1],r[2],r[3],1):(r=E1.exec(t))?new wt(r[1]*255/100,r[2]*255/100,r[3]*255/100,1):(r=N1.exec(t))?Ks(r[1],r[2],r[3],r[4]):(r=C1.exec(t))?Ks(r[1]*255/100,r[2]*255/100,r[3]*255/100,r[4]):(r=b1.exec(t))?Mp(r[1],r[2]/100,r[3]/100,1):(r=M1.exec(t))?Mp(r[1],r[2]/100,r[3]/100,r[4]):kp.hasOwnProperty(t)?Np(kp[t]):t==="transparent"?new wt(NaN,NaN,NaN,0):null}function Np(t){return new wt(t>>16&255,t>>8&255,t&255,1)}function Ks(t,r,i,s){return s<=0&&(t=r=i=NaN),new wt(t,r,i,s)}function I1(t){return t instanceof bi||(t=Sr(t)),t?(t=t.rgb(),new wt(t.r,t.g,t.b,t.opacity)):new wt}function ec(t,r,i,s){return arguments.length===1?I1(t):new wt(t,r,i,s??1)}function wt(t,r,i,s){this.r=+t,this.g=+r,this.b=+i,this.opacity=+s}gc(wt,ec,cg(bi,{brighter(t){return t=t==null?hl:Math.pow(hl,t),new wt(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?yi:Math.pow(yi,t),new wt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new wt(vr(this.r),vr(this.g),vr(this.b),gl(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:Cp,formatHex:Cp,formatHex8:j1,formatRgb:bp,toString:bp}));function Cp(){return`#${yr(this.r)}${yr(this.g)}${yr(this.b)}`}function j1(){return`#${yr(this.r)}${yr(this.g)}${yr(this.b)}${yr((isNaN(this.opacity)?1:this.opacity)*255)}`}function bp(){const t=gl(this.opacity);return`${t===1?"rgb(":"rgba("}${vr(this.r)}, ${vr(this.g)}, ${vr(this.b)}${t===1?")":`, ${t})`}`}function gl(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function vr(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function yr(t){return t=vr(t),(t<16?"0":"")+t.toString(16)}function Mp(t,r,i,s){return s<=0?t=r=i=NaN:i<=0||i>=1?t=r=NaN:r<=0&&(t=NaN),new Ut(t,r,i,s)}function dg(t){if(t instanceof Ut)return new Ut(t.h,t.s,t.l,t.opacity);if(t instanceof bi||(t=Sr(t)),!t)return new Ut;if(t instanceof Ut)return t;t=t.rgb();var r=t.r/255,i=t.g/255,s=t.b/255,a=Math.min(r,i,s),u=Math.max(r,i,s),c=NaN,f=u-a,h=(u+a)/2;return f?(r===u?c=(i-s)/f+(i<s)*6:i===u?c=(s-r)/f+2:c=(r-i)/f+4,f/=h<.5?u+a:2-u-a,c*=60):f=h>0&&h<1?0:c,new Ut(c,f,h,t.opacity)}function T1(t,r,i,s){return arguments.length===1?dg(t):new Ut(t,r,i,s??1)}function Ut(t,r,i,s){this.h=+t,this.s=+r,this.l=+i,this.opacity=+s}gc(Ut,T1,cg(bi,{brighter(t){return t=t==null?hl:Math.pow(hl,t),new Ut(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?yi:Math.pow(yi,t),new Ut(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,r=isNaN(t)||isNaN(this.s)?0:this.s,i=this.l,s=i+(i<.5?i:1-i)*r,a=2*i-s;return new wt(Au(t>=240?t-240:t+120,a,s),Au(t,a,s),Au(t<120?t+240:t-120,a,s),this.opacity)},clamp(){return new Ut(Pp(this.h),Zs(this.s),Zs(this.l),gl(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=gl(this.opacity);return`${t===1?"hsl(":"hsla("}${Pp(this.h)}, ${Zs(this.s)*100}%, ${Zs(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Pp(t){return t=(t||0)%360,t<0?t+360:t}function Zs(t){return Math.max(0,Math.min(1,t||0))}function Au(t,r,i){return(t<60?r+(i-r)*t/60:t<180?i:t<240?r+(i-r)*(240-t)/60:r)*255}const mc=t=>()=>t;function R1(t,r){return function(i){return t+i*r}}function L1(t,r,i){return t=Math.pow(t,i),r=Math.pow(r,i)-t,i=1/i,function(s){return Math.pow(t+s*r,i)}}function A1(t){return(t=+t)==1?fg:function(r,i){return i-r?L1(r,i,t):mc(isNaN(r)?i:r)}}function fg(t,r){var i=r-t;return i?R1(t,i):mc(isNaN(t)?r:t)}const ml=(function t(r){var i=A1(r);function s(a,u){var c=i((a=ec(a)).r,(u=ec(u)).r),f=i(a.g,u.g),h=i(a.b,u.b),m=fg(a.opacity,u.opacity);return function(v){return a.r=c(v),a.g=f(v),a.b=h(v),a.opacity=m(v),a+""}}return s.gamma=t,s})(1);function $1(t,r){r||(r=[]);var i=t?Math.min(r.length,t.length):0,s=r.slice(),a;return function(u){for(a=0;a<i;++a)s[a]=t[a]*(1-u)+r[a]*u;return s}}function D1(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function O1(t,r){var i=r?r.length:0,s=t?Math.min(i,t.length):0,a=new Array(s),u=new Array(i),c;for(c=0;c<s;++c)a[c]=hi(t[c],r[c]);for(;c<i;++c)u[c]=r[c];return function(f){for(c=0;c<s;++c)u[c]=a[c](f);return u}}function F1(t,r){var i=new Date;return t=+t,r=+r,function(s){return i.setTime(t*(1-s)+r*s),i}}function rn(t,r){return t=+t,r=+r,function(i){return t*(1-i)+r*i}}function V1(t,r){var i={},s={},a;(t===null||typeof t!="object")&&(t={}),(r===null||typeof r!="object")&&(r={});for(a in r)a in t?i[a]=hi(t[a],r[a]):s[a]=r[a];return function(u){for(a in i)s[a]=i[a](u);return s}}var tc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,$u=new RegExp(tc.source,"g");function H1(t){return function(){return t}}function B1(t){return function(r){return t(r)+""}}function pg(t,r){var i=tc.lastIndex=$u.lastIndex=0,s,a,u,c=-1,f=[],h=[];for(t=t+"",r=r+"";(s=tc.exec(t))&&(a=$u.exec(r));)(u=a.index)>i&&(u=r.slice(i,u),f[c]?f[c]+=u:f[++c]=u),(s=s[0])===(a=a[0])?f[c]?f[c]+=a:f[++c]=a:(f[++c]=null,h.push({i:c,x:rn(s,a)})),i=$u.lastIndex;return i<r.length&&(u=r.slice(i),f[c]?f[c]+=u:f[++c]=u),f.length<2?h[0]?B1(h[0].x):H1(r):(r=h.length,function(m){for(var v=0,g;v<r;++v)f[(g=h[v]).i]=g.x(m);return f.join("")})}function hi(t,r){var i=typeof r,s;return r==null||i==="boolean"?mc(r):(i==="number"?rn:i==="string"?(s=Sr(r))?(r=s,ml):pg:r instanceof Sr?ml:r instanceof Date?F1:D1(r)?$1:Array.isArray(r)?O1:typeof r.valueOf!="function"&&typeof r.toString!="function"||isNaN(r)?V1:rn)(t,r)}var zp=180/Math.PI,nc={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function hg(t,r,i,s,a,u){var c,f,h;return(c=Math.sqrt(t*t+r*r))&&(t/=c,r/=c),(h=t*i+r*s)&&(i-=t*h,s-=r*h),(f=Math.sqrt(i*i+s*s))&&(i/=f,s/=f,h/=f),t*s<r*i&&(t=-t,r=-r,h=-h,c=-c),{translateX:a,translateY:u,rotate:Math.atan2(r,t)*zp,skewX:Math.atan(h)*zp,scaleX:c,scaleY:f}}var Js;function W1(t){const r=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return r.isIdentity?nc:hg(r.a,r.b,r.c,r.d,r.e,r.f)}function U1(t){return t==null||(Js||(Js=document.createElementNS("http://www.w3.org/2000/svg","g")),Js.setAttribute("transform",t),!(t=Js.transform.baseVal.consolidate()))?nc:(t=t.matrix,hg(t.a,t.b,t.c,t.d,t.e,t.f))}function gg(t,r,i,s){function a(m){return m.length?m.pop()+" ":""}function u(m,v,g,y,w,_){if(m!==g||v!==y){var C=w.push("translate(",null,r,null,i);_.push({i:C-4,x:rn(m,g)},{i:C-2,x:rn(v,y)})}else(g||y)&&w.push("translate("+g+r+y+i)}function c(m,v,g,y){m!==v?(m-v>180?v+=360:v-m>180&&(m+=360),y.push({i:g.push(a(g)+"rotate(",null,s)-2,x:rn(m,v)})):v&&g.push(a(g)+"rotate("+v+s)}function f(m,v,g,y){m!==v?y.push({i:g.push(a(g)+"skewX(",null,s)-2,x:rn(m,v)}):v&&g.push(a(g)+"skewX("+v+s)}function h(m,v,g,y,w,_){if(m!==g||v!==y){var C=w.push(a(w)+"scale(",null,",",null,")");_.push({i:C-4,x:rn(m,g)},{i:C-2,x:rn(v,y)})}else(g!==1||y!==1)&&w.push(a(w)+"scale("+g+","+y+")")}return function(m,v){var g=[],y=[];return m=t(m),v=t(v),u(m.translateX,m.translateY,v.translateX,v.translateY,g,y),c(m.rotate,v.rotate,g,y),f(m.skewX,v.skewX,g,y),h(m.scaleX,m.scaleY,v.scaleX,v.scaleY,g,y),m=v=null,function(w){for(var _=-1,C=y.length,S;++_<C;)g[(S=y[_]).i]=S.x(w);return g.join("")}}}var Y1=gg(W1,"px, ","px)","deg)"),X1=gg(U1,", ",")",")"),G1=1e-12;function Ip(t){return((t=Math.exp(t))+1/t)/2}function Q1(t){return((t=Math.exp(t))-1/t)/2}function q1(t){return((t=Math.exp(2*t))-1)/(t+1)}const ul=(function t(r,i,s){function a(u,c){var f=u[0],h=u[1],m=u[2],v=c[0],g=c[1],y=c[2],w=v-f,_=g-h,C=w*w+_*_,S,E;if(C<G1)E=Math.log(y/m)/r,S=function(W){return[f+W*w,h+W*_,m*Math.exp(r*W*E)]};else{var I=Math.sqrt(C),N=(y*y-m*m+s*C)/(2*m*i*I),M=(y*y-m*m-s*C)/(2*y*i*I),F=Math.log(Math.sqrt(N*N+1)-N),A=Math.log(Math.sqrt(M*M+1)-M);E=(A-F)/r,S=function(W){var G=W*E,q=Ip(F),ee=m/(i*I)*(q*q1(r*G+F)-Q1(F));return[f+ee*w,h+ee*_,m*q/Ip(r*G+F)]}}return S.duration=E*1e3*r/Math.SQRT2,S}return a.rho=function(u){var c=Math.max(.001,+u),f=c*c,h=f*f;return t(c,f,h)},a})(Math.SQRT2,2,4);var ao=0,fi=0,ui=0,mg=1e3,yl,pi,vl=0,kr=0,Cl=0,xi=typeof performance=="object"&&performance.now?performance:Date,yg=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function yc(){return kr||(yg(K1),kr=xi.now()+Cl)}function K1(){kr=0}function xl(){this._call=this._time=this._next=null}xl.prototype=vg.prototype={constructor:xl,restart:function(t,r,i){if(typeof t!="function")throw new TypeError("callback is not a function");i=(i==null?yc():+i)+(r==null?0:+r),!this._next&&pi!==this&&(pi?pi._next=this:yl=this,pi=this),this._call=t,this._time=i,rc()},stop:function(){this._call&&(this._call=null,this._time=1/0,rc())}};function vg(t,r,i){var s=new xl;return s.restart(t,r,i),s}function Z1(){yc(),++ao;for(var t=yl,r;t;)(r=kr-t._time)>=0&&t._call.call(void 0,r),t=t._next;--ao}function jp(){kr=(vl=xi.now())+Cl,ao=fi=0;try{Z1()}finally{ao=0,ew(),kr=0}}function J1(){var t=xi.now(),r=t-vl;r>mg&&(Cl-=r,vl=t)}function ew(){for(var t,r=yl,i,s=1/0;r;)r._call?(s>r._time&&(s=r._time),t=r,r=r._next):(i=r._next,r._next=null,r=t?t._next=i:yl=i);pi=t,rc(s)}function rc(t){if(!ao){fi&&(fi=clearTimeout(fi));var r=t-kr;r>24?(t<1/0&&(fi=setTimeout(jp,t-xi.now()-Cl)),ui&&(ui=clearInterval(ui))):(ui||(vl=xi.now(),ui=setInterval(J1,mg)),ao=1,yg(jp))}}function Tp(t,r,i){var s=new xl;return r=r==null?0:+r,s.restart(a=>{s.stop(),t(a+r)},r,i),s}var tw=El("start","end","cancel","interrupt"),nw=[],xg=0,Rp=1,oc=2,cl=3,Lp=4,ic=5,dl=6;function bl(t,r,i,s,a,u){var c=t.__transition;if(!c)t.__transition={};else if(i in c)return;rw(t,i,{name:r,index:s,group:a,on:tw,tween:nw,time:u.time,delay:u.delay,duration:u.duration,ease:u.ease,timer:null,state:xg})}function vc(t,r){var i=Qt(t,r);if(i.state>xg)throw new Error("too late; already scheduled");return i}function sn(t,r){var i=Qt(t,r);if(i.state>cl)throw new Error("too late; already running");return i}function Qt(t,r){var i=t.__transition;if(!i||!(i=i[r]))throw new Error("transition not found");return i}function rw(t,r,i){var s=t.__transition,a;s[r]=i,i.timer=vg(u,0,i.time);function u(m){i.state=Rp,i.timer.restart(c,i.delay,i.time),i.delay<=m&&c(m-i.delay)}function c(m){var v,g,y,w;if(i.state!==Rp)return h();for(v in s)if(w=s[v],w.name===i.name){if(w.state===cl)return Tp(c);w.state===Lp?(w.state=dl,w.timer.stop(),w.on.call("interrupt",t,t.__data__,w.index,w.group),delete s[v]):+v<r&&(w.state=dl,w.timer.stop(),w.on.call("cancel",t,t.__data__,w.index,w.group),delete s[v])}if(Tp(function(){i.state===cl&&(i.state=Lp,i.timer.restart(f,i.delay,i.time),f(m))}),i.state=oc,i.on.call("start",t,t.__data__,i.index,i.group),i.state===oc){for(i.state=cl,a=new Array(y=i.tween.length),v=0,g=-1;v<y;++v)(w=i.tween[v].value.call(t,t.__data__,i.index,i.group))&&(a[++g]=w);a.length=g+1}}function f(m){for(var v=m<i.duration?i.ease.call(null,m/i.duration):(i.timer.restart(h),i.state=ic,1),g=-1,y=a.length;++g<y;)a[g].call(t,v);i.state===ic&&(i.on.call("end",t,t.__data__,i.index,i.group),h())}function h(){i.state=dl,i.timer.stop(),delete s[r];for(var m in s)return;delete t.__transition}}function fl(t,r){var i=t.__transition,s,a,u=!0,c;if(i){r=r==null?null:r+"";for(c in i){if((s=i[c]).name!==r){u=!1;continue}a=s.state>oc&&s.state<ic,s.state=dl,s.timer.stop(),s.on.call(a?"interrupt":"cancel",t,t.__data__,s.index,s.group),delete i[c]}u&&delete t.__transition}}function ow(t){return this.each(function(){fl(this,t)})}function iw(t,r){var i,s;return function(){var a=sn(this,t),u=a.tween;if(u!==i){s=i=u;for(var c=0,f=s.length;c<f;++c)if(s[c].name===r){s=s.slice(),s.splice(c,1);break}}a.tween=s}}function sw(t,r,i){var s,a;if(typeof i!="function")throw new Error;return function(){var u=sn(this,t),c=u.tween;if(c!==s){a=(s=c).slice();for(var f={name:r,value:i},h=0,m=a.length;h<m;++h)if(a[h].name===r){a[h]=f;break}h===m&&a.push(f)}u.tween=a}}function lw(t,r){var i=this._id;if(t+="",arguments.length<2){for(var s=Qt(this.node(),i).tween,a=0,u=s.length,c;a<u;++a)if((c=s[a]).name===t)return c.value;return null}return this.each((r==null?iw:sw)(i,t,r))}function xc(t,r,i){var s=t._id;return t.each(function(){var a=sn(this,s);(a.value||(a.value={}))[r]=i.apply(this,arguments)}),function(a){return Qt(a,s).value[r]}}function wg(t,r){var i;return(typeof r=="number"?rn:r instanceof Sr?ml:(i=Sr(r))?(r=i,ml):pg)(t,r)}function aw(t){return function(){this.removeAttribute(t)}}function uw(t){return function(){this.removeAttributeNS(t.space,t.local)}}function cw(t,r,i){var s,a=i+"",u;return function(){var c=this.getAttribute(t);return c===a?null:c===s?u:u=r(s=c,i)}}function dw(t,r,i){var s,a=i+"",u;return function(){var c=this.getAttributeNS(t.space,t.local);return c===a?null:c===s?u:u=r(s=c,i)}}function fw(t,r,i){var s,a,u;return function(){var c,f=i(this),h;return f==null?void this.removeAttribute(t):(c=this.getAttribute(t),h=f+"",c===h?null:c===s&&h===a?u:(a=h,u=r(s=c,f)))}}function pw(t,r,i){var s,a,u;return function(){var c,f=i(this),h;return f==null?void this.removeAttributeNS(t.space,t.local):(c=this.getAttributeNS(t.space,t.local),h=f+"",c===h?null:c===s&&h===a?u:(a=h,u=r(s=c,f)))}}function hw(t,r){var i=Nl(t),s=i==="transform"?X1:wg;return this.attrTween(t,typeof r=="function"?(i.local?pw:fw)(i,s,xc(this,"attr."+t,r)):r==null?(i.local?uw:aw)(i):(i.local?dw:cw)(i,s,r))}function gw(t,r){return function(i){this.setAttribute(t,r.call(this,i))}}function mw(t,r){return function(i){this.setAttributeNS(t.space,t.local,r.call(this,i))}}function yw(t,r){var i,s;function a(){var u=r.apply(this,arguments);return u!==s&&(i=(s=u)&&mw(t,u)),i}return a._value=r,a}function vw(t,r){var i,s;function a(){var u=r.apply(this,arguments);return u!==s&&(i=(s=u)&&gw(t,u)),i}return a._value=r,a}function xw(t,r){var i="attr."+t;if(arguments.length<2)return(i=this.tween(i))&&i._value;if(r==null)return this.tween(i,null);if(typeof r!="function")throw new Error;var s=Nl(t);return this.tween(i,(s.local?yw:vw)(s,r))}function ww(t,r){return function(){vc(this,t).delay=+r.apply(this,arguments)}}function Sw(t,r){return r=+r,function(){vc(this,t).delay=r}}function kw(t){var r=this._id;return arguments.length?this.each((typeof t=="function"?ww:Sw)(r,t)):Qt(this.node(),r).delay}function _w(t,r){return function(){sn(this,t).duration=+r.apply(this,arguments)}}function Ew(t,r){return r=+r,function(){sn(this,t).duration=r}}function Nw(t){var r=this._id;return arguments.length?this.each((typeof t=="function"?_w:Ew)(r,t)):Qt(this.node(),r).duration}function Cw(t,r){if(typeof r!="function")throw new Error;return function(){sn(this,t).ease=r}}function bw(t){var r=this._id;return arguments.length?this.each(Cw(r,t)):Qt(this.node(),r).ease}function Mw(t,r){return function(){var i=r.apply(this,arguments);if(typeof i!="function")throw new Error;sn(this,t).ease=i}}function Pw(t){if(typeof t!="function")throw new Error;return this.each(Mw(this._id,t))}function zw(t){typeof t!="function"&&(t=Kh(t));for(var r=this._groups,i=r.length,s=new Array(i),a=0;a<i;++a)for(var u=r[a],c=u.length,f=s[a]=[],h,m=0;m<c;++m)(h=u[m])&&t.call(h,h.__data__,m,u)&&f.push(h);return new kn(s,this._parents,this._name,this._id)}function Iw(t){if(t._id!==this._id)throw new Error;for(var r=this._groups,i=t._groups,s=r.length,a=i.length,u=Math.min(s,a),c=new Array(s),f=0;f<u;++f)for(var h=r[f],m=i[f],v=h.length,g=c[f]=new Array(v),y,w=0;w<v;++w)(y=h[w]||m[w])&&(g[w]=y);for(;f<s;++f)c[f]=r[f];return new kn(c,this._parents,this._name,this._id)}function jw(t){return(t+"").trim().split(/^|\s+/).every(function(r){var i=r.indexOf(".");return i>=0&&(r=r.slice(0,i)),!r||r==="start"})}function Tw(t,r,i){var s,a,u=jw(r)?vc:sn;return function(){var c=u(this,t),f=c.on;f!==s&&(a=(s=f).copy()).on(r,i),c.on=a}}function Rw(t,r){var i=this._id;return arguments.length<2?Qt(this.node(),i).on.on(t):this.each(Tw(i,t,r))}function Lw(t){return function(){var r=this.parentNode;for(var i in this.__transition)if(+i!==t)return;r&&r.removeChild(this)}}function Aw(){return this.on("end.remove",Lw(this._id))}function $w(t){var r=this._name,i=this._id;typeof t!="function"&&(t=pc(t));for(var s=this._groups,a=s.length,u=new Array(a),c=0;c<a;++c)for(var f=s[c],h=f.length,m=u[c]=new Array(h),v,g,y=0;y<h;++y)(v=f[y])&&(g=t.call(v,v.__data__,y,f))&&("__data__"in v&&(g.__data__=v.__data__),m[y]=g,bl(m[y],r,i,y,m,Qt(v,i)));return new kn(u,this._parents,r,i)}function Dw(t){var r=this._name,i=this._id;typeof t!="function"&&(t=qh(t));for(var s=this._groups,a=s.length,u=[],c=[],f=0;f<a;++f)for(var h=s[f],m=h.length,v,g=0;g<m;++g)if(v=h[g]){for(var y=t.call(v,v.__data__,g,h),w,_=Qt(v,i),C=0,S=y.length;C<S;++C)(w=y[C])&&bl(w,r,i,C,y,_);u.push(y),c.push(v)}return new kn(u,c,r,i)}var Ow=Ci.prototype.constructor;function Fw(){return new Ow(this._groups,this._parents)}function Vw(t,r){var i,s,a;return function(){var u=lo(this,t),c=(this.style.removeProperty(t),lo(this,t));return u===c?null:u===i&&c===s?a:a=r(i=u,s=c)}}function Sg(t){return function(){this.style.removeProperty(t)}}function Hw(t,r,i){var s,a=i+"",u;return function(){var c=lo(this,t);return c===a?null:c===s?u:u=r(s=c,i)}}function Bw(t,r,i){var s,a,u;return function(){var c=lo(this,t),f=i(this),h=f+"";return f==null&&(h=f=(this.style.removeProperty(t),lo(this,t))),c===h?null:c===s&&h===a?u:(a=h,u=r(s=c,f))}}function Ww(t,r){var i,s,a,u="style."+r,c="end."+u,f;return function(){var h=sn(this,t),m=h.on,v=h.value[u]==null?f||(f=Sg(r)):void 0;(m!==i||a!==v)&&(s=(i=m).copy()).on(c,a=v),h.on=s}}function Uw(t,r,i){var s=(t+="")=="transform"?Y1:wg;return r==null?this.styleTween(t,Vw(t,s)).on("end.style."+t,Sg(t)):typeof r=="function"?this.styleTween(t,Bw(t,s,xc(this,"style."+t,r))).each(Ww(this._id,t)):this.styleTween(t,Hw(t,s,r),i).on("end.style."+t,null)}function Yw(t,r,i){return function(s){this.style.setProperty(t,r.call(this,s),i)}}function Xw(t,r,i){var s,a;function u(){var c=r.apply(this,arguments);return c!==a&&(s=(a=c)&&Yw(t,c,i)),s}return u._value=r,u}function Gw(t,r,i){var s="style."+(t+="");if(arguments.length<2)return(s=this.tween(s))&&s._value;if(r==null)return this.tween(s,null);if(typeof r!="function")throw new Error;return this.tween(s,Xw(t,r,i??""))}function Qw(t){return function(){this.textContent=t}}function qw(t){return function(){var r=t(this);this.textContent=r??""}}function Kw(t){return this.tween("text",typeof t=="function"?qw(xc(this,"text",t)):Qw(t==null?"":t+""))}function Zw(t){return function(r){this.textContent=t.call(this,r)}}function Jw(t){var r,i;function s(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&Zw(a)),r}return s._value=t,s}function e2(t){var r="text";if(arguments.length<1)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,Jw(t))}function t2(){for(var t=this._name,r=this._id,i=kg(),s=this._groups,a=s.length,u=0;u<a;++u)for(var c=s[u],f=c.length,h,m=0;m<f;++m)if(h=c[m]){var v=Qt(h,r);bl(h,t,i,m,c,{time:v.time+v.delay+v.duration,delay:0,duration:v.duration,ease:v.ease})}return new kn(s,this._parents,t,i)}function n2(){var t,r,i=this,s=i._id,a=i.size();return new Promise(function(u,c){var f={value:c},h={value:function(){--a===0&&u()}};i.each(function(){var m=sn(this,s),v=m.on;v!==t&&(r=(t=v).copy(),r._.cancel.push(f),r._.interrupt.push(f),r._.end.push(h)),m.on=r}),a===0&&u()})}var r2=0;function kn(t,r,i,s){this._groups=t,this._parents=r,this._name=i,this._id=s}function kg(){return++r2}var xn=Ci.prototype;kn.prototype={constructor:kn,select:$w,selectAll:Dw,selectChild:xn.selectChild,selectChildren:xn.selectChildren,filter:zw,merge:Iw,selection:Fw,transition:t2,call:xn.call,nodes:xn.nodes,node:xn.node,size:xn.size,empty:xn.empty,each:xn.each,on:Rw,attr:hw,attrTween:xw,style:Uw,styleTween:Gw,text:Kw,textTween:e2,remove:Aw,tween:lw,delay:kw,duration:Nw,ease:bw,easeVarying:Pw,end:n2,[Symbol.iterator]:xn[Symbol.iterator]};function o2(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var i2={time:null,delay:0,duration:250,ease:o2};function s2(t,r){for(var i;!(i=t.__transition)||!(i=i[r]);)if(!(t=t.parentNode))throw new Error(`transition ${r} not found`);return i}function l2(t){var r,i;t instanceof kn?(r=t._id,t=t._name):(r=kg(),(i=i2).time=yc(),t=t==null?null:t+"");for(var s=this._groups,a=s.length,u=0;u<a;++u)for(var c=s[u],f=c.length,h,m=0;m<f;++m)(h=c[m])&&bl(h,t,r,m,c,i||s2(h,r));return new kn(s,this._parents,t,r)}Ci.prototype.interrupt=ow;Ci.prototype.transition=l2;const el=t=>()=>t;function a2(t,{sourceEvent:r,target:i,transform:s,dispatch:a}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:r,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},transform:{value:s,enumerable:!0,configurable:!0},_:{value:a}})}function Sn(t,r,i){this.k=t,this.x=r,this.y=i}Sn.prototype={constructor:Sn,scale:function(t){return t===1?this:new Sn(this.k*t,this.x,this.y)},translate:function(t,r){return t===0&r===0?this:new Sn(this.k,this.x+this.k*t,this.y+this.k*r)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Ml=new Sn(1,0,0);_g.prototype=Sn.prototype;function _g(t){for(;!t.__zoom;)if(!(t=t.parentNode))return Ml;return t.__zoom}function Du(t){t.stopImmediatePropagation()}function ci(t){t.preventDefault(),t.stopImmediatePropagation()}function u2(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function c2(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function Ap(){return this.__zoom||Ml}function d2(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function f2(){return navigator.maxTouchPoints||"ontouchstart"in this}function p2(t,r,i){var s=t.invertX(r[0][0])-i[0][0],a=t.invertX(r[1][0])-i[1][0],u=t.invertY(r[0][1])-i[0][1],c=t.invertY(r[1][1])-i[1][1];return t.translate(a>s?(s+a)/2:Math.min(0,s)||Math.max(0,a),c>u?(u+c)/2:Math.min(0,u)||Math.max(0,c))}function Eg(){var t=u2,r=c2,i=p2,s=d2,a=f2,u=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],f=250,h=ul,m=El("start","zoom","end"),v,g,y,w=500,_=150,C=0,S=10;function E(z){z.property("__zoom",Ap).on("wheel.zoom",G,{passive:!1}).on("mousedown.zoom",q).on("dblclick.zoom",ee).filter(a).on("touchstart.zoom",D).on("touchmove.zoom",V).on("touchend.zoom touchcancel.zoom",J).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}E.transform=function(z,Y,O,U){var L=z.selection?z.selection():z;L.property("__zoom",Ap),z!==L?F(z,Y,O,U):L.interrupt().each(function(){A(this,arguments).event(U).start().zoom(null,typeof Y=="function"?Y.apply(this,arguments):Y).end()})},E.scaleBy=function(z,Y,O,U){E.scaleTo(z,function(){var L=this.__zoom.k,j=typeof Y=="function"?Y.apply(this,arguments):Y;return L*j},O,U)},E.scaleTo=function(z,Y,O,U){E.transform(z,function(){var L=r.apply(this,arguments),j=this.__zoom,H=O==null?M(L):typeof O=="function"?O.apply(this,arguments):O,b=j.invert(H),T=typeof Y=="function"?Y.apply(this,arguments):Y;return i(N(I(j,T),H,b),L,c)},O,U)},E.translateBy=function(z,Y,O,U){E.transform(z,function(){return i(this.__zoom.translate(typeof Y=="function"?Y.apply(this,arguments):Y,typeof O=="function"?O.apply(this,arguments):O),r.apply(this,arguments),c)},null,U)},E.translateTo=function(z,Y,O,U,L){E.transform(z,function(){var j=r.apply(this,arguments),H=this.__zoom,b=U==null?M(j):typeof U=="function"?U.apply(this,arguments):U;return i(Ml.translate(b[0],b[1]).scale(H.k).translate(typeof Y=="function"?-Y.apply(this,arguments):-Y,typeof O=="function"?-O.apply(this,arguments):-O),j,c)},U,L)};function I(z,Y){return Y=Math.max(u[0],Math.min(u[1],Y)),Y===z.k?z:new Sn(Y,z.x,z.y)}function N(z,Y,O){var U=Y[0]-O[0]*z.k,L=Y[1]-O[1]*z.k;return U===z.x&&L===z.y?z:new Sn(z.k,U,L)}function M(z){return[(+z[0][0]+ +z[1][0])/2,(+z[0][1]+ +z[1][1])/2]}function F(z,Y,O,U){z.on("start.zoom",function(){A(this,arguments).event(U).start()}).on("interrupt.zoom end.zoom",function(){A(this,arguments).event(U).end()}).tween("zoom",function(){var L=this,j=arguments,H=A(L,j).event(U),b=r.apply(L,j),T=O==null?M(b):typeof O=="function"?O.apply(L,j):O,te=Math.max(b[1][0]-b[0][0],b[1][1]-b[0][1]),oe=L.__zoom,ae=typeof Y=="function"?Y.apply(L,j):Y,ce=h(oe.invert(T).concat(te/oe.k),ae.invert(T).concat(te/ae.k));return function(ue){if(ue===1)ue=ae;else{var Z=ce(ue),se=te/Z[2];ue=new Sn(se,T[0]-Z[0]*se,T[1]-Z[1]*se)}H.zoom(null,ue)}})}function A(z,Y,O){return!O&&z.__zooming||new W(z,Y)}function W(z,Y){this.that=z,this.args=Y,this.active=0,this.sourceEvent=null,this.extent=r.apply(z,Y),this.taps=0}W.prototype={event:function(z){return z&&(this.sourceEvent=z),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(z,Y){return this.mouse&&z!=="mouse"&&(this.mouse[1]=Y.invert(this.mouse[0])),this.touch0&&z!=="touch"&&(this.touch0[1]=Y.invert(this.touch0[0])),this.touch1&&z!=="touch"&&(this.touch1[1]=Y.invert(this.touch1[0])),this.that.__zoom=Y,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(z){var Y=Mt(this.that).datum();m.call(z,this.that,new a2(z,{sourceEvent:this.sourceEvent,target:E,transform:this.that.__zoom,dispatch:m}),Y)}};function G(z,...Y){if(!t.apply(this,arguments))return;var O=A(this,Y).event(z),U=this.__zoom,L=Math.max(u[0],Math.min(u[1],U.k*Math.pow(2,s.apply(this,arguments)))),j=Wt(z);if(O.wheel)(O.mouse[0][0]!==j[0]||O.mouse[0][1]!==j[1])&&(O.mouse[1]=U.invert(O.mouse[0]=j)),clearTimeout(O.wheel);else{if(U.k===L)return;O.mouse=[j,U.invert(j)],fl(this),O.start()}ci(z),O.wheel=setTimeout(H,_),O.zoom("mouse",i(N(I(U,L),O.mouse[0],O.mouse[1]),O.extent,c));function H(){O.wheel=null,O.end()}}function q(z,...Y){if(y||!t.apply(this,arguments))return;var O=z.currentTarget,U=A(this,Y,!0).event(z),L=Mt(z.view).on("mousemove.zoom",T,!0).on("mouseup.zoom",te,!0),j=Wt(z,O),H=z.clientX,b=z.clientY;lg(z.view),Du(z),U.mouse=[j,this.__zoom.invert(j)],fl(this),U.start();function T(oe){if(ci(oe),!U.moved){var ae=oe.clientX-H,ce=oe.clientY-b;U.moved=ae*ae+ce*ce>C}U.event(oe).zoom("mouse",i(N(U.that.__zoom,U.mouse[0]=Wt(oe,O),U.mouse[1]),U.extent,c))}function te(oe){L.on("mousemove.zoom mouseup.zoom",null),ag(oe.view,U.moved),ci(oe),U.event(oe).end()}}function ee(z,...Y){if(t.apply(this,arguments)){var O=this.__zoom,U=Wt(z.changedTouches?z.changedTouches[0]:z,this),L=O.invert(U),j=O.k*(z.shiftKey?.5:2),H=i(N(I(O,j),U,L),r.apply(this,Y),c);ci(z),f>0?Mt(this).transition().duration(f).call(F,H,U,z):Mt(this).call(E.transform,H,U,z)}}function D(z,...Y){if(t.apply(this,arguments)){var O=z.touches,U=O.length,L=A(this,Y,z.changedTouches.length===U).event(z),j,H,b,T;for(Du(z),H=0;H<U;++H)b=O[H],T=Wt(b,this),T=[T,this.__zoom.invert(T),b.identifier],L.touch0?!L.touch1&&L.touch0[2]!==T[2]&&(L.touch1=T,L.taps=0):(L.touch0=T,j=!0,L.taps=1+!!v);v&&(v=clearTimeout(v)),j&&(L.taps<2&&(g=T[0],v=setTimeout(function(){v=null},w)),fl(this),L.start())}}function V(z,...Y){if(this.__zooming){var O=A(this,Y).event(z),U=z.changedTouches,L=U.length,j,H,b,T;for(ci(z),j=0;j<L;++j)H=U[j],b=Wt(H,this),O.touch0&&O.touch0[2]===H.identifier?O.touch0[0]=b:O.touch1&&O.touch1[2]===H.identifier&&(O.touch1[0]=b);if(H=O.that.__zoom,O.touch1){var te=O.touch0[0],oe=O.touch0[1],ae=O.touch1[0],ce=O.touch1[1],ue=(ue=ae[0]-te[0])*ue+(ue=ae[1]-te[1])*ue,Z=(Z=ce[0]-oe[0])*Z+(Z=ce[1]-oe[1])*Z;H=I(H,Math.sqrt(ue/Z)),b=[(te[0]+ae[0])/2,(te[1]+ae[1])/2],T=[(oe[0]+ce[0])/2,(oe[1]+ce[1])/2]}else if(O.touch0)b=O.touch0[0],T=O.touch0[1];else return;O.zoom("touch",i(N(H,b,T),O.extent,c))}}function J(z,...Y){if(this.__zooming){var O=A(this,Y).event(z),U=z.changedTouches,L=U.length,j,H;for(Du(z),y&&clearTimeout(y),y=setTimeout(function(){y=null},w),j=0;j<L;++j)H=U[j],O.touch0&&O.touch0[2]===H.identifier?delete O.touch0:O.touch1&&O.touch1[2]===H.identifier&&delete O.touch1;if(O.touch1&&!O.touch0&&(O.touch0=O.touch1,delete O.touch1),O.touch0)O.touch0[1]=this.__zoom.invert(O.touch0[0]);else if(O.end(),O.taps===2&&(H=Wt(H,this),Math.hypot(g[0]-H[0],g[1]-H[1])<S)){var b=Mt(this).on("dblclick.zoom");b&&b.apply(this,arguments)}}}return E.wheelDelta=function(z){return arguments.length?(s=typeof z=="function"?z:el(+z),E):s},E.filter=function(z){return arguments.length?(t=typeof z=="function"?z:el(!!z),E):t},E.touchable=function(z){return arguments.length?(a=typeof z=="function"?z:el(!!z),E):a},E.extent=function(z){return arguments.length?(r=typeof z=="function"?z:el([[+z[0][0],+z[0][1]],[+z[1][0],+z[1][1]]]),E):r},E.scaleExtent=function(z){return arguments.length?(u[0]=+z[0],u[1]=+z[1],E):[u[0],u[1]]},E.translateExtent=function(z){return arguments.length?(c[0][0]=+z[0][0],c[1][0]=+z[1][0],c[0][1]=+z[0][1],c[1][1]=+z[1][1],E):[[c[0][0],c[0][1]],[c[1][0],c[1][1]]]},E.constrain=function(z){return arguments.length?(i=z,E):i},E.duration=function(z){return arguments.length?(f=+z,E):f},E.interpolate=function(z){return arguments.length?(h=z,E):h},E.on=function(){var z=m.on.apply(m,arguments);return z===m?E:z},E.clickDistance=function(z){return arguments.length?(C=(z=+z)*z,E):Math.sqrt(C)},E.tapDistance=function(z){return arguments.length?(S=+z,E):S},E}const Gt={error001:(t="react")=>`Seems like you have not used zustand provider as an ancestor. Help: https://${t}flow.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:t=>`Node type "${t}" not found. Using fallback type "default".`,error004:()=>"The 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:t=>`The old edge with id=${t} does not exist.`,error009:t=>`Marker type "${t}" doesn't exist.`,error008:(t,{id:r,sourceHandle:i,targetHandle:s})=>`Couldn't create edge for ${t} handle id: "${t==="source"?i:s}", edge id: ${r}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:t=>`Edge type "${t}" not found. Using fallback type "default".`,error012:t=>`Node with id "${t}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(t="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${t}/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.",error016:t=>`Edge with id "${t}" does not exist, it may have been removed. This can happen when an edge is deleted before the "onEdgeClick" handler is called.`},wi=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Ng=["Enter"," ","Escape"],Cg={"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:t,x:r,y:i})=>`Moved selected node ${t}. New position, x: ${r}, y: ${i}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var uo;(function(t){t.Strict="strict",t.Loose="loose"})(uo||(uo={}));var xr;(function(t){t.Free="free",t.Vertical="vertical",t.Horizontal="horizontal"})(xr||(xr={}));var Si;(function(t){t.Partial="partial",t.Full="full"})(Si||(Si={}));const bg={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var Qn;(function(t){t.Bezier="default",t.Straight="straight",t.Step="step",t.SmoothStep="smoothstep",t.SimpleBezier="simplebezier"})(Qn||(Qn={}));var wl;(function(t){t.Arrow="arrow",t.ArrowClosed="arrowclosed"})(wl||(wl={}));var xe;(function(t){t.Left="left",t.Top="top",t.Right="right",t.Bottom="bottom"})(xe||(xe={}));const $p={[xe.Left]:xe.Right,[xe.Right]:xe.Left,[xe.Top]:xe.Bottom,[xe.Bottom]:xe.Top};function Mg(t){return t===null?null:t?"valid":"invalid"}const Pg=t=>"id"in t&&"source"in t&&"target"in t,h2=t=>"id"in t&&"position"in t&&!("source"in t)&&!("target"in t),wc=t=>"id"in t&&"internals"in t&&!("source"in t)&&!("target"in t),Mi=(t,r=[0,0])=>{const{width:i,height:s}=_n(t),a=t.origin??r,u=i*a[0],c=s*a[1];return{x:t.position.x-u,y:t.position.y-c}},g2=(t,r={nodeOrigin:[0,0]})=>{if(t.length===0)return{x:0,y:0,width:0,height:0};const i=t.reduce((s,a)=>{const u=typeof a=="string";let c=!r.nodeLookup&&!u?a:void 0;r.nodeLookup&&(c=u?r.nodeLookup.get(a):wc(a)?a:r.nodeLookup.get(a.id));const f=c?Sl(c,r.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Pl(s,f)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return zl(i)},Pi=(t,r={})=>{let i={x:1/0,y:1/0,x2:-1/0,y2:-1/0},s=!1;return t.forEach(a=>{(r.filter===void 0||r.filter(a))&&(i=Pl(i,Sl(a)),s=!0)}),s?zl(i):{x:0,y:0,width:0,height:0}},Sc=(t,r,[i,s,a]=[0,0,1],u=!1,c=!1)=>{const f={...mo(r,[i,s,a]),width:r.width/a,height:r.height/a},h=[];for(const m of t.values()){const{measured:v,selectable:g=!0,hidden:y=!1}=m;if(c&&!g||y)continue;const w=v.width??m.width??m.initialWidth??null,_=v.height??m.height??m.initialHeight??null,C=ki(f,fo(m)),S=(w??0)*(_??0),E=u&&C>0;(!m.internals.handleBounds||E||C>=S||m.dragging)&&h.push(m)}return h},m2=(t,r)=>{const i=new Set;return t.forEach(s=>{i.add(s.id)}),r.filter(s=>i.has(s.source)||i.has(s.target))};function y2(t,r){const i=new Map,s=r!=null&&r.nodes?new Set(r.nodes.map(a=>a.id)):null;return t.forEach(a=>{a.measured.width&&a.measured.height&&((r==null?void 0:r.includeHiddenNodes)||!a.hidden)&&(!s||s.has(a.id))&&i.set(a.id,a)}),i}async function v2({nodes:t,width:r,height:i,panZoom:s,minZoom:a,maxZoom:u},c){if(t.size===0)return!0;const f=y2(t,c),h=Pi(f),m=_c(h,r,i,(c==null?void 0:c.minZoom)??a,(c==null?void 0:c.maxZoom)??u,(c==null?void 0:c.padding)??.1);return await s.setViewport(m,{duration:c==null?void 0:c.duration,ease:c==null?void 0:c.ease,interpolate:c==null?void 0:c.interpolate}),!0}function zg({nodeId:t,nextPosition:r,nodeLookup:i,nodeOrigin:s=[0,0],nodeExtent:a,onError:u}){const c=i.get(t),f=c.parentId?i.get(c.parentId):void 0,{x:h,y:m}=f?f.internals.positionAbsolute:{x:0,y:0},v=c.origin??s;let g=c.extent||a;if(c.extent==="parent"&&!c.expandParent)if(!f)u==null||u("005",Gt.error005());else{const w=f.measured.width,_=f.measured.height;w&&_&&(g=[[h,m],[h+w,m+_]])}else f&&Er(c.extent)&&(g=[[c.extent[0][0]+h,c.extent[0][1]+m],[c.extent[1][0]+h,c.extent[1][1]+m]]);const y=Er(g)?_r(r,g,c.measured):r;return(c.measured.width===void 0||c.measured.height===void 0)&&(u==null||u("015",Gt.error015())),{position:{x:y.x-h+(c.measured.width??0)*v[0],y:y.y-m+(c.measured.height??0)*v[1]},positionAbsolute:y}}async function x2({nodesToRemove:t=[],edgesToRemove:r=[],nodes:i,edges:s,onBeforeDelete:a}){const u=new Set(t.map(y=>y.id)),c=[];for(const y of i){if(y.deletable===!1)continue;const w=u.has(y.id),_=!w&&y.parentId&&c.find(C=>C.id===y.parentId);(w||_)&&c.push(y)}const f=new Set(r.map(y=>y.id)),h=s.filter(y=>y.deletable!==!1),v=m2(c,h);for(const y of h)f.has(y.id)&&!v.find(_=>_.id===y.id)&&v.push(y);if(!a)return{edges:v,nodes:c};const g=await a({nodes:c,edges:v});return typeof g=="boolean"?g?{edges:v,nodes:c}:{edges:[],nodes:[]}:g}const co=(t,r=0,i=1)=>Math.min(Math.max(t,r),i),_r=(t={x:0,y:0},r,i)=>({x:co(t.x,r[0][0],r[1][0]-((i==null?void 0:i.width)??0)),y:co(t.y,r[0][1],r[1][1]-((i==null?void 0:i.height)??0))});function Ig(t,r,i){const{width:s,height:a}=_n(i),{x:u,y:c}=i.internals.positionAbsolute;return _r(t,[[u,c],[u+s,c+a]],r)}const Dp=(t,r,i)=>t<r?co(Math.abs(t-r),1,r)/r:t>i?-co(Math.abs(t-i),1,r)/r:0,kc=(t,r,i=15,s=40)=>{const a=Dp(t.x,s,r.width-s)*i,u=Dp(t.y,s,r.height-s)*i;return[a,u]},Pl=(t,r)=>({x:Math.min(t.x,r.x),y:Math.min(t.y,r.y),x2:Math.max(t.x2,r.x2),y2:Math.max(t.y2,r.y2)}),sc=({x:t,y:r,width:i,height:s})=>({x:t,y:r,x2:t+i,y2:r+s}),zl=({x:t,y:r,x2:i,y2:s})=>({x:t,y:r,width:i-t,height:s-r}),fo=(t,r=[0,0])=>{var a,u;const{x:i,y:s}=wc(t)?t.internals.positionAbsolute:Mi(t,r);return{x:i,y:s,width:((a=t.measured)==null?void 0:a.width)??t.width??t.initialWidth??0,height:((u=t.measured)==null?void 0:u.height)??t.height??t.initialHeight??0}},Sl=(t,r=[0,0])=>{var a,u;const{x:i,y:s}=wc(t)?t.internals.positionAbsolute:Mi(t,r);return{x:i,y:s,x2:i+(((a=t.measured)==null?void 0:a.width)??t.width??t.initialWidth??0),y2:s+(((u=t.measured)==null?void 0:u.height)??t.height??t.initialHeight??0)}},jg=(t,r)=>zl(Pl(sc(t),sc(r))),ki=(t,r)=>{const i=Math.max(0,Math.min(t.x+t.width,r.x+r.width)-Math.max(t.x,r.x)),s=Math.max(0,Math.min(t.y+t.height,r.y+r.height)-Math.max(t.y,r.y));return Math.ceil(i*s)},Op=t=>Yt(t.width)&&Yt(t.height)&&Yt(t.x)&&Yt(t.y),Yt=t=>!isNaN(t)&&isFinite(t),Tg=(t,r)=>(i,s)=>{},zi=(t,r=[1,1])=>({x:r[0]*Math.round(t.x/r[0]),y:r[1]*Math.round(t.y/r[1])}),mo=({x:t,y:r},[i,s,a],u=!1,c=[1,1])=>{const f={x:(t-i)/a,y:(r-s)/a};return u?zi(f,c):f},po=({x:t,y:r},[i,s,a])=>({x:t*a+i,y:r*a+s});function to(t,r){if(typeof t=="number")return Math.floor((r-r/(1+t))*.5);if(typeof t=="string"&&t.endsWith("px")){const i=parseFloat(t);if(!Number.isNaN(i))return Math.floor(i)}if(typeof t=="string"&&t.endsWith("%")){const i=parseFloat(t);if(!Number.isNaN(i))return Math.floor(r*i*.01)}return console.error(`The padding value "${t}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function w2(t,r,i){if(typeof t=="string"||typeof t=="number"){const s=to(t,i),a=to(t,r);return{top:s,right:a,bottom:s,left:a,x:a*2,y:s*2}}if(typeof t=="object"){const s=to(t.top??t.y??0,i),a=to(t.bottom??t.y??0,i),u=to(t.left??t.x??0,r),c=to(t.right??t.x??0,r);return{top:s,right:c,bottom:a,left:u,x:u+c,y:s+a}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function S2(t,r,i,s,a,u){const{x:c,y:f}=po(t,[r,i,s]),{x:h,y:m}=po({x:t.x+t.width,y:t.y+t.height},[r,i,s]),v=a-h,g=u-m;return{left:Math.floor(c),top:Math.floor(f),right:Math.floor(v),bottom:Math.floor(g)}}const _c=(t,r,i,s,a,u)=>{const c=w2(u,r,i),f=(r-c.x)/t.width,h=(i-c.y)/t.height,m=Math.min(f,h),v=co(m,s,a),g=t.x+t.width/2,y=t.y+t.height/2,w=r/2-g*v,_=i/2-y*v,C=S2(t,w,_,v,r,i),S={left:Math.min(C.left-c.left,0),top:Math.min(C.top-c.top,0),right:Math.min(C.right-c.right,0),bottom:Math.min(C.bottom-c.bottom,0)};return{x:w-S.left+S.right,y:_-S.top+S.bottom,zoom:v}},_i=()=>{var t;return typeof navigator<"u"&&((t=navigator==null?void 0:navigator.userAgent)==null?void 0:t.indexOf("Mac"))>=0};function Er(t){return t!=null&&t!=="parent"}function _n(t){var r,i;return{width:((r=t.measured)==null?void 0:r.width)??t.width??t.initialWidth??0,height:((i=t.measured)==null?void 0:i.height)??t.height??t.initialHeight??0}}function Rg(t){var r,i;return(((r=t.measured)==null?void 0:r.width)??t.width??t.initialWidth)!==void 0&&(((i=t.measured)==null?void 0:i.height)??t.height??t.initialHeight)!==void 0}function Lg(t,r={width:0,height:0},i,s,a){const u={...t},c=s.get(i);if(c){const f=c.origin||a;u.x+=c.internals.positionAbsolute.x-(r.width??0)*f[0],u.y+=c.internals.positionAbsolute.y-(r.height??0)*f[1]}return u}function Fp(t,r){if(t.size!==r.size)return!1;for(const i of t)if(!r.has(i))return!1;return!0}function k2(){let t,r;return{promise:new Promise((s,a)=>{t=s,r=a}),resolve:t,reject:r}}function _2(t){return{...Cg,...t||{}}}function gi(t,{snapGrid:r=[0,0],snapToGrid:i=!1,transform:s,containerBounds:a}){const{x:u,y:c}=Xt(t),f=mo({x:u-((a==null?void 0:a.left)??0),y:c-((a==null?void 0:a.top)??0)},s),{x:h,y:m}=i?zi(f,r):f;return{xSnapped:h,ySnapped:m,...f}}const Ec=t=>({width:t.offsetWidth,height:t.offsetHeight}),Ag=t=>{var r;return((r=t==null?void 0:t.getRootNode)==null?void 0:r.call(t))||(window==null?void 0:window.document)},E2=["INPUT","SELECT","TEXTAREA"];function $g(t){var s,a;const r=((a=(s=t.composedPath)==null?void 0:s.call(t))==null?void 0:a[0])||t.target;return(r==null?void 0:r.nodeType)!==1?!1:E2.includes(r.nodeName)||r.hasAttribute("contenteditable")||!!r.closest(".nokey")}const Dg=t=>"clientX"in t,Xt=(t,r)=>{var u,c;const i=Dg(t),s=i?t.clientX:(u=t.touches)==null?void 0:u[0].clientX,a=i?t.clientY:(c=t.touches)==null?void 0:c[0].clientY;return{x:s-((r==null?void 0:r.left)??0),y:a-((r==null?void 0:r.top)??0)}},Vp=(t,r,i,s,a)=>{const u=r.querySelectorAll(`.${t}`);return!u||!u.length?null:Array.from(u).map(c=>{const f=c.getBoundingClientRect();return{id:c.getAttribute("data-handleid"),type:t,nodeId:a,position:c.getAttribute("data-handlepos"),x:(f.left-i.left)/s,y:(f.top-i.top)/s,...Ec(c)}})};function Og({sourceX:t,sourceY:r,targetX:i,targetY:s,sourceControlX:a,sourceControlY:u,targetControlX:c,targetControlY:f}){const h=t*.125+a*.375+c*.375+i*.125,m=r*.125+u*.375+f*.375+s*.125,v=Math.abs(h-t),g=Math.abs(m-r);return[h,m,v,g]}function tl(t,r){return t>=0?.5*t:r*25*Math.sqrt(-t)}function Hp({pos:t,x1:r,y1:i,x2:s,y2:a,c:u}){switch(t){case xe.Left:return[r-tl(r-s,u),i];case xe.Right:return[r+tl(s-r,u),i];case xe.Top:return[r,i-tl(i-a,u)];case xe.Bottom:return[r,i+tl(a-i,u)]}}function Fg({sourceX:t,sourceY:r,sourcePosition:i=xe.Bottom,targetX:s,targetY:a,targetPosition:u=xe.Top,curvature:c=.25}){const[f,h]=Hp({pos:i,x1:t,y1:r,x2:s,y2:a,c}),[m,v]=Hp({pos:u,x1:s,y1:a,x2:t,y2:r,c}),[g,y,w,_]=Og({sourceX:t,sourceY:r,targetX:s,targetY:a,sourceControlX:f,sourceControlY:h,targetControlX:m,targetControlY:v});return[`M${t},${r} C${f},${h} ${m},${v} ${s},${a}`,g,y,w,_]}function Vg({sourceX:t,sourceY:r,targetX:i,targetY:s}){const a=Math.abs(i-t)/2,u=i<t?i+a:i-a,c=Math.abs(s-r)/2,f=s<r?s+c:s-c;return[u,f,a,c]}function N2({sourceNode:t,targetNode:r,selected:i=!1,zIndex:s=0,elevateOnSelect:a=!1,zIndexMode:u="basic"}){if(u==="manual")return s;const c=a&&i?s+1e3:s,f=Math.max(t.parentId||a&&t.selected?t.internals.z:0,r.parentId||a&&r.selected?r.internals.z:0);return c+f}function C2({sourceNode:t,targetNode:r,width:i,height:s,transform:a}){const u=Pl(Sl(t),Sl(r));u.x===u.x2&&(u.x2+=1),u.y===u.y2&&(u.y2+=1);const c={x:-a[0]/a[2],y:-a[1]/a[2],width:i/a[2],height:s/a[2]};return ki(c,zl(u))>0}const b2=({source:t,sourceHandle:r,target:i,targetHandle:s})=>`xy-edge__${t}${r||""}-${i}${s||""}`,M2=(t,r)=>r.some(i=>i.source===t.source&&i.target===t.target&&(i.sourceHandle===t.sourceHandle||!i.sourceHandle&&!t.sourceHandle)&&(i.targetHandle===t.targetHandle||!i.targetHandle&&!t.targetHandle)),P2=(t,r,i={})=>{var u;if(!t.source||!t.target)return(u=i.onError)==null||u.call(i,"006",Gt.error006()),r;const s=i.getEdgeId||b2;let a;return Pg(t)?a={...t}:a={...t,id:s(t)},M2(a,r)?r:(a.sourceHandle===null&&delete a.sourceHandle,a.targetHandle===null&&delete a.targetHandle,r.concat(a))};function Hg({sourceX:t,sourceY:r,targetX:i,targetY:s}){const[a,u,c,f]=Vg({sourceX:t,sourceY:r,targetX:i,targetY:s});return[`M ${t},${r}L ${i},${s}`,a,u,c,f]}const Bp={[xe.Left]:{x:-1,y:0},[xe.Right]:{x:1,y:0},[xe.Top]:{x:0,y:-1},[xe.Bottom]:{x:0,y:1}},z2=({source:t,sourcePosition:r=xe.Bottom,target:i})=>r===xe.Left||r===xe.Right?t.x<i.x?{x:1,y:0}:{x:-1,y:0}:t.y<i.y?{x:0,y:1}:{x:0,y:-1},Wp=(t,r)=>Math.sqrt(Math.pow(r.x-t.x,2)+Math.pow(r.y-t.y,2));function I2({source:t,sourcePosition:r=xe.Bottom,target:i,targetPosition:s=xe.Top,center:a,offset:u,stepPosition:c}){const f=Bp[r],h=Bp[s],m={x:t.x+f.x*u,y:t.y+f.y*u},v={x:i.x+h.x*u,y:i.y+h.y*u},g=z2({source:m,sourcePosition:r,target:v}),y=g.x!==0?"x":"y",w=g[y];let _=[],C,S;const E={x:0,y:0},I={x:0,y:0},[,,N,M]=Vg({sourceX:t.x,sourceY:t.y,targetX:i.x,targetY:i.y});if(f[y]*h[y]===-1){y==="x"?(C=a.x??m.x+(v.x-m.x)*c,S=a.y??(m.y+v.y)/2):(C=a.x??(m.x+v.x)/2,S=a.y??m.y+(v.y-m.y)*c);const G=[{x:C,y:m.y},{x:C,y:v.y}],q=[{x:m.x,y:S},{x:v.x,y:S}];f[y]===w?_=y==="x"?G:q:_=y==="x"?q:G}else{const G=[{x:m.x,y:v.y}],q=[{x:v.x,y:m.y}];if(y==="x"?_=f.x===w?q:G:_=f.y===w?G:q,r===s){const z=Math.abs(t[y]-i[y]);if(z<=u){const Y=Math.min(u-1,u-z);f[y]===w?E[y]=(m[y]>t[y]?-1:1)*Y:I[y]=(v[y]>i[y]?-1:1)*Y}}if(r!==s){const z=y==="x"?"y":"x",Y=f[y]===h[z],O=m[z]>v[z],U=m[z]<v[z];(f[y]===1&&(!Y&&O||Y&&U)||f[y]!==1&&(!Y&&U||Y&&O))&&(_=y==="x"?G:q)}const ee={x:m.x+E.x,y:m.y+E.y},D={x:v.x+I.x,y:v.y+I.y},V=Math.max(Math.abs(ee.x-_[0].x),Math.abs(D.x-_[0].x)),J=Math.max(Math.abs(ee.y-_[0].y),Math.abs(D.y-_[0].y));V>=J?(C=(ee.x+D.x)/2,S=_[0].y):(C=_[0].x,S=(ee.y+D.y)/2)}const F={x:m.x+E.x,y:m.y+E.y},A={x:v.x+I.x,y:v.y+I.y};return[[t,...F.x!==_[0].x||F.y!==_[0].y?[F]:[],..._,...A.x!==_[_.length-1].x||A.y!==_[_.length-1].y?[A]:[],i],C,S,N,M]}function j2(t,r,i,s){const a=Math.min(Wp(t,r)/2,Wp(r,i)/2,s),{x:u,y:c}=r;if(t.x===u&&u===i.x||t.y===c&&c===i.y)return`L${u} ${c}`;if(t.y===c){const m=t.x<i.x?-1:1,v=t.y<i.y?1:-1;return`L ${u+a*m},${c}Q ${u},${c} ${u},${c+a*v}`}const f=t.x<i.x?1:-1,h=t.y<i.y?-1:1;return`L ${u},${c+a*h}Q ${u},${c} ${u+a*f},${c}`}function lc({sourceX:t,sourceY:r,sourcePosition:i=xe.Bottom,targetX:s,targetY:a,targetPosition:u=xe.Top,borderRadius:c=5,centerX:f,centerY:h,offset:m=20,stepPosition:v=.5}){const[g,y,w,_,C]=I2({source:{x:t,y:r},sourcePosition:i,target:{x:s,y:a},targetPosition:u,center:{x:f,y:h},offset:m,stepPosition:v});let S=`M${g[0].x} ${g[0].y}`;for(let E=1;E<g.length-1;E++)S+=j2(g[E-1],g[E],g[E+1],c);return S+=`L${g[g.length-1].x} ${g[g.length-1].y}`,[S,y,w,_,C]}function Up(t){var r;return t&&!!(t.internals.handleBounds||(r=t.handles)!=null&&r.length)&&!!(t.measured.width||t.width||t.initialWidth)}function T2(t){var g;const{sourceNode:r,targetNode:i}=t;if(!Up(r)||!Up(i))return null;const s=r.internals.handleBounds||Yp(r.handles),a=i.internals.handleBounds||Yp(i.handles),u=Xp((s==null?void 0:s.source)??[],t.sourceHandle),c=Xp(t.connectionMode===uo.Strict?(a==null?void 0:a.target)??[]:((a==null?void 0:a.target)??[]).concat((a==null?void 0:a.source)??[]),t.targetHandle);if(!u||!c)return(g=t.onError)==null||g.call(t,"008",Gt.error008(u?"target":"source",{id:t.id,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle})),null;const f=(u==null?void 0:u.position)||xe.Bottom,h=(c==null?void 0:c.position)||xe.Top,m=Nr(r,u,f),v=Nr(i,c,h);return{sourceX:m.x,sourceY:m.y,targetX:v.x,targetY:v.y,sourcePosition:f,targetPosition:h}}function Yp(t){if(!t)return null;const r=[],i=[];for(const s of t)s.width=s.width??1,s.height=s.height??1,s.type==="source"?r.push(s):s.type==="target"&&i.push(s);return{source:r,target:i}}function Nr(t,r,i=xe.Left,s=!1){const a=((r==null?void 0:r.x)??0)+t.internals.positionAbsolute.x,u=((r==null?void 0:r.y)??0)+t.internals.positionAbsolute.y,{width:c,height:f}=r??_n(t);if(s)return{x:a+c/2,y:u+f/2};switch((r==null?void 0:r.position)??i){case xe.Top:return{x:a+c/2,y:u};case xe.Right:return{x:a+c,y:u+f/2};case xe.Bottom:return{x:a+c/2,y:u+f};case xe.Left:return{x:a,y:u+f/2}}}function Xp(t,r){return t&&(r?t.find(i=>i.id===r):t[0])||null}function ac(t,r){return t?typeof t=="string"?t:`${r?`${r}__`:""}${Object.keys(t).sort().map(s=>`${s}=${t[s]}`).join("&")}`:""}function R2(t,{id:r,defaultColor:i,defaultMarkerStart:s,defaultMarkerEnd:a}){const u=new Set;return t.reduce((c,f)=>([f.markerStart||s,f.markerEnd||a].forEach(h=>{if(h&&typeof h=="object"){const m=ac(h,r);u.has(m)||(c.push({id:m,color:h.color||i,...h}),u.add(m))}}),c),[]).sort((c,f)=>c.id.localeCompare(f.id))}const Bg=1e3,L2=10,Nc={nodeOrigin:[0,0],nodeExtent:wi,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},A2={...Nc,checkEquality:!0};function Cc(t,r){const i={...t};for(const s in r)r[s]!==void 0&&(i[s]=r[s]);return i}function $2(t,r,i){const s=Cc(Nc,i);for(const a of t.values())if(a.parentId)Mc(a,t,r,s);else{const u=Mi(a,s.nodeOrigin),c=Er(a.extent)?a.extent:s.nodeExtent,f=_r(u,c,_n(a));a.internals.positionAbsolute=f}}function D2(t,r){if(!t.handles)return t.measured?r==null?void 0:r.internals.handleBounds:void 0;const i=[],s=[];for(const a of t.handles){const u={id:a.id,width:a.width??1,height:a.height??1,nodeId:t.id,x:a.x,y:a.y,position:a.position,type:a.type};a.type==="source"?i.push(u):a.type==="target"&&s.push(u)}return{source:i,target:s}}function bc(t){return t==="manual"}function uc(t,r,i,s={}){var v,g;const a=Cc(A2,s),u={i:0},c=new Map(r),f=a!=null&&a.elevateNodesOnSelect&&!bc(a.zIndexMode)?Bg:0;let h=t.length>0,m=!1;r.clear(),i.clear();for(const y of t){let w=c.get(y.id);if(a.checkEquality&&y===(w==null?void 0:w.internals.userNode))r.set(y.id,w);else{const _=Mi(y,a.nodeOrigin),C=Er(y.extent)?y.extent:a.nodeExtent,S=_r(_,C,_n(y));w={...a.defaults,...y,measured:{width:(v=y.measured)==null?void 0:v.width,height:(g=y.measured)==null?void 0:g.height},internals:{positionAbsolute:S,handleBounds:D2(y,w),z:Wg(y,f,a.zIndexMode),userNode:y}},r.set(y.id,w)}(w.measured===void 0||w.measured.width===void 0||w.measured.height===void 0)&&!w.hidden&&(h=!1),y.parentId&&Mc(w,r,i,s,u),m||(m=y.selected??!1)}return{nodesInitialized:h,hasSelectedNodes:m}}function O2(t,r){if(!t.parentId)return;const i=r.get(t.parentId);i?i.set(t.id,t):r.set(t.parentId,new Map([[t.id,t]]))}function Mc(t,r,i,s,a){const{elevateNodesOnSelect:u,nodeOrigin:c,nodeExtent:f,zIndexMode:h}=Cc(Nc,s),m=t.parentId,v=r.get(m);if(!v){console.warn(`Parent node ${m} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}O2(t,i),a&&!v.parentId&&v.internals.rootParentIndex===void 0&&h==="auto"&&(v.internals.rootParentIndex=++a.i,v.internals.z=v.internals.z+a.i*L2),a&&v.internals.rootParentIndex!==void 0&&(a.i=v.internals.rootParentIndex);const g=u&&!bc(h)?Bg:0,{x:y,y:w,z:_}=F2(t,v,c,f,g,h),{positionAbsolute:C}=t.internals,S=y!==C.x||w!==C.y;(S||_!==t.internals.z)&&r.set(t.id,{...t,internals:{...t.internals,positionAbsolute:S?{x:y,y:w}:C,z:_}})}function Wg(t,r,i){const s=Yt(t.zIndex)?t.zIndex:0;return bc(i)?s:s+(t.selected?r:0)}function F2(t,r,i,s,a,u){const{x:c,y:f}=r.internals.positionAbsolute,h=_n(t),m=Mi(t,i),v=Er(t.extent)?_r(m,t.extent,h):m;let g=_r({x:c+v.x,y:f+v.y},s,h);t.extent==="parent"&&(g=Ig(g,h,r));const y=Wg(t,a,u),w=r.internals.z??0;return{x:g.x,y:g.y,z:w>=y?w+1:y}}function Pc(t,r,i,s=[0,0]){var c;const a=[],u=new Map;for(const f of t){const h=r.get(f.parentId);if(!h)continue;const m=((c=u.get(f.parentId))==null?void 0:c.expandedRect)??fo(h),v=jg(m,f.rect);u.set(f.parentId,{expandedRect:v,parent:h})}return u.size>0&&u.forEach(({expandedRect:f,parent:h},m)=>{var N;const v=h.internals.positionAbsolute,g=_n(h),y=h.origin??s,w=f.x<v.x?Math.round(Math.abs(v.x-f.x)):0,_=f.y<v.y?Math.round(Math.abs(v.y-f.y)):0,C=Math.max(g.width,Math.round(f.width)),S=Math.max(g.height,Math.round(f.height)),E=(C-g.width)*y[0],I=(S-g.height)*y[1];(w>0||_>0||E||I)&&(a.push({id:m,type:"position",position:{x:h.position.x-w+E,y:h.position.y-_+I}}),(N=i.get(m))==null||N.forEach(M=>{t.some(F=>F.id===M.id)||a.push({id:M.id,type:"position",position:{x:M.position.x+w,y:M.position.y+_}})})),(g.width<f.width||g.height<f.height||w||_)&&a.push({id:m,type:"dimensions",setAttributes:!0,dimensions:{width:C+(w?y[0]*w-E:0),height:S+(_?y[1]*_-I:0)}})}),a}function V2(t,r,i,s,a,u,c){const f=s==null?void 0:s.querySelector(".xyflow__viewport");let h=!1;if(!f)return{changes:[],updatedInternals:h};const m=[],v=window.getComputedStyle(f),{m22:g}=new window.DOMMatrixReadOnly(v.transform),y=[];for(const w of t.values()){const _=r.get(w.id);if(!_)continue;if(_.hidden){r.set(_.id,{..._,internals:{..._.internals,handleBounds:void 0}}),h=!0;continue}const C=Ec(w.nodeElement),S=_.measured.width!==C.width||_.measured.height!==C.height;if(!!(C.width&&C.height&&(S||!_.internals.handleBounds||w.force))){const I=w.nodeElement.getBoundingClientRect(),N=Er(_.extent)?_.extent:u;let{positionAbsolute:M}=_.internals;_.parentId&&_.extent==="parent"?M=Ig(M,C,r.get(_.parentId)):N&&(M=_r(M,N,C));const F={..._,measured:C,internals:{..._.internals,positionAbsolute:M,handleBounds:{source:Vp("source",w.nodeElement,I,g,_.id),target:Vp("target",w.nodeElement,I,g,_.id)}}};r.set(_.id,F),_.parentId&&Mc(F,r,i,{nodeOrigin:a,zIndexMode:c}),h=!0,S&&(m.push({id:_.id,type:"dimensions",dimensions:C}),_.expandParent&&_.parentId&&y.push({id:_.id,parentId:_.parentId,rect:fo(F,a)}))}}if(y.length>0){const w=Pc(y,r,i,a);m.push(...w)}return{changes:m,updatedInternals:h}}async function H2({delta:t,panZoom:r,transform:i,translateExtent:s,width:a,height:u}){if(!r||!t.x&&!t.y)return!1;const c=await r.setViewportConstrained({x:i[0]+t.x,y:i[1]+t.y,zoom:i[2]},[[0,0],[a,u]],s);return!!c&&(c.x!==i[0]||c.y!==i[1]||c.k!==i[2])}function Gp(t,r,i,s,a,u){let c=a;const f=s.get(c)||new Map;s.set(c,f.set(i,r)),c=`${a}-${t}`;const h=s.get(c)||new Map;if(s.set(c,h.set(i,r)),u){c=`${a}-${t}-${u}`;const m=s.get(c)||new Map;s.set(c,m.set(i,r))}}function Ug(t,r,i){t.clear(),r.clear();for(const s of i){const{source:a,target:u,sourceHandle:c=null,targetHandle:f=null}=s,h={edgeId:s.id,source:a,target:u,sourceHandle:c,targetHandle:f},m=`${a}-${c}--${u}-${f}`,v=`${u}-${f}--${a}-${c}`;Gp("source",h,v,t,a,c),Gp("target",h,m,t,u,f),r.set(s.id,s)}}function Yg(t,r){if(!t.parentId)return!1;const i=r.get(t.parentId);return i?i.selected?!0:Yg(i,r):!1}function Qp(t,r,i){var a;let s=t;do{if((a=s==null?void 0:s.matches)!=null&&a.call(s,r))return!0;if(s===i)return!1;s=s==null?void 0:s.parentElement}while(s);return!1}function B2(t,r,i,s){const a=new Map;for(const[u,c]of t)if((c.selected||c.id===s)&&(!c.parentId||!Yg(c,t))&&(c.draggable||r&&typeof c.draggable>"u")){const f=t.get(u);f&&a.set(u,{id:u,position:f.position||{x:0,y:0},distance:{x:i.x-f.internals.positionAbsolute.x,y:i.y-f.internals.positionAbsolute.y},extent:f.extent,parentId:f.parentId,origin:f.origin,expandParent:f.expandParent,internals:{positionAbsolute:f.internals.positionAbsolute||{x:0,y:0}},measured:{width:f.measured.width??0,height:f.measured.height??0}})}return a}function Ou({nodeId:t,dragItems:r,nodeLookup:i,dragging:s=!0}){var c,f,h;const a=[];for(const[m,v]of r){const g=(c=i.get(m))==null?void 0:c.internals.userNode;g&&a.push({...g,position:v.position,dragging:s})}if(!t)return[a[0],a];const u=(f=i.get(t))==null?void 0:f.internals.userNode;return[u?{...u,position:((h=r.get(t))==null?void 0:h.position)||u.position,dragging:s}:a[0],a]}function W2({dragItems:t,snapGrid:r,x:i,y:s}){const a=t.values().next().value;if(!a)return null;const u={x:i-a.distance.x,y:s-a.distance.y},c=zi(u,r);return{x:c.x-u.x,y:c.y-u.y}}function U2({onNodeMouseDown:t,getStoreItems:r,onDragStart:i,onDrag:s,onDragStop:a}){let u={x:null,y:null},c=0,f=new Map,h=!1,m={x:0,y:0},v=null,g=!1,y=null,w=!1,_=!1,C=null;function S({noDragClassName:I,handleSelector:N,domNode:M,isSelectable:F,nodeId:A,nodeClickDistance:W=0}){y=Mt(M);function G({x:V,y:J}){const{nodeLookup:z,nodeExtent:Y,snapGrid:O,snapToGrid:U,nodeOrigin:L,onNodeDrag:j,onSelectionDrag:H,onError:b,updateNodePositions:T}=r();u={x:V,y:J};let te=!1;const oe=f.size>1,ae=oe&&Y?sc(Pi(f)):null,ce=oe&&U?W2({dragItems:f,snapGrid:O,x:V,y:J}):null;for(const[ue,Z]of f){if(!z.has(ue))continue;let se={x:V-Z.distance.x,y:J-Z.distance.y};U&&(se=ce?{x:Math.round(se.x+ce.x),y:Math.round(se.y+ce.y)}:zi(se,O));let ge=null;if(oe&&Y&&!Z.extent&&ae){const{positionAbsolute:me}=Z.internals,Ee=me.x-ae.x+Y[0][0],Me=me.x+Z.measured.width-ae.x2+Y[1][0],Ie=me.y-ae.y+Y[0][1],Re=me.y+Z.measured.height-ae.y2+Y[1][1];ge=[[Ee,Ie],[Me,Re]]}const{position:we,positionAbsolute:ve}=zg({nodeId:ue,nextPosition:se,nodeLookup:z,nodeExtent:ge||Y,nodeOrigin:L,onError:b});te=te||Z.position.x!==we.x||Z.position.y!==we.y,Z.position=we,Z.internals.positionAbsolute=ve}if(_=_||te,!!te&&(T(f,!0),C&&(s||j||!A&&H))){const[ue,Z]=Ou({nodeId:A,dragItems:f,nodeLookup:z});s==null||s(C,f,ue,Z),j==null||j(C,ue,Z),A||H==null||H(C,Z)}}async function q(){if(!v)return;const{transform:V,panBy:J,autoPanSpeed:z,autoPanOnNodeDrag:Y}=r();if(!Y){h=!1,cancelAnimationFrame(c);return}const[O,U]=kc(m,v,z);(O!==0||U!==0)&&(u.x=(u.x??0)-O/V[2],u.y=(u.y??0)-U/V[2],await J({x:O,y:U})&&G(u)),c=requestAnimationFrame(q)}function ee(V){var oe;const{nodeLookup:J,multiSelectionActive:z,nodesDraggable:Y,transform:O,snapGrid:U,snapToGrid:L,selectNodesOnDrag:j,onNodeDragStart:H,onSelectionDragStart:b,unselectNodesAndEdges:T}=r();g=!0,(!j||!F)&&!z&&A&&((oe=J.get(A))!=null&&oe.selected||T()),F&&j&&A&&(t==null||t(A));const te=gi(V.sourceEvent,{transform:O,snapGrid:U,snapToGrid:L,containerBounds:v});if(u=te,f=B2(J,Y,te,A),f.size>0&&(i||H||!A&&b)){const[ae,ce]=Ou({nodeId:A,dragItems:f,nodeLookup:J});i==null||i(V.sourceEvent,f,ae,ce),H==null||H(V.sourceEvent,ae,ce),A||b==null||b(V.sourceEvent,ce)}}const D=ug().clickDistance(W).on("start",V=>{const{domNode:J,nodeDragThreshold:z,transform:Y,snapGrid:O,snapToGrid:U}=r();v=(J==null?void 0:J.getBoundingClientRect())||null,w=!1,_=!1,C=V.sourceEvent,z===0&&ee(V),u=gi(V.sourceEvent,{transform:Y,snapGrid:O,snapToGrid:U,containerBounds:v}),m=Xt(V.sourceEvent,v)}).on("drag",V=>{const{autoPanOnNodeDrag:J,transform:z,snapGrid:Y,snapToGrid:O,nodeDragThreshold:U,nodeLookup:L}=r(),j=gi(V.sourceEvent,{transform:z,snapGrid:Y,snapToGrid:O,containerBounds:v});if(C=V.sourceEvent,(V.sourceEvent.type==="touchmove"&&V.sourceEvent.touches.length>1||A&&!L.has(A))&&(w=!0),!w){if(!h&&J&&g&&(h=!0,q()),!g){const H=Xt(V.sourceEvent,v),b=H.x-m.x,T=H.y-m.y;Math.sqrt(b*b+T*T)>U&&ee(V)}(u.x!==j.xSnapped||u.y!==j.ySnapped)&&f&&g&&(m=Xt(V.sourceEvent,v),G(j))}}).on("end",V=>{if(!g||w){w&&f.size>0&&r().updateNodePositions(f,!1);return}if(h=!1,g=!1,cancelAnimationFrame(c),f.size>0){const{nodeLookup:J,updateNodePositions:z,onNodeDragStop:Y,onSelectionDragStop:O}=r();if(_&&(z(f,!1),_=!1),a||Y||!A&&O){const[U,L]=Ou({nodeId:A,dragItems:f,nodeLookup:J,dragging:!1});a==null||a(V.sourceEvent,f,U,L),Y==null||Y(V.sourceEvent,U,L),A||O==null||O(V.sourceEvent,L)}}}).filter(V=>{const J=V.target;return!V.button&&(!I||!Qp(J,`.${I}`,M))&&(!N||Qp(J,N,M))});y.call(D)}function E(){y==null||y.on(".drag",null)}return{update:S,destroy:E}}function Y2(t,r,i){const s=[],a={x:t.x-i,y:t.y-i,width:i*2,height:i*2};for(const u of r.values())ki(a,fo(u))>0&&s.push(u);return s}const X2=250;function G2(t,r,i,s){var f,h;let a=[],u=1/0;const c=Y2(t,i,r+X2);for(const m of c){const v=[...((f=m.internals.handleBounds)==null?void 0:f.source)??[],...((h=m.internals.handleBounds)==null?void 0:h.target)??[]];for(const g of v){if(s.nodeId===g.nodeId&&s.type===g.type&&s.id===g.id)continue;const{x:y,y:w}=Nr(m,g,g.position,!0),_=Math.sqrt(Math.pow(y-t.x,2)+Math.pow(w-t.y,2));_>r||(_<u?(a=[{...g,x:y,y:w}],u=_):_===u&&a.push({...g,x:y,y:w}))}}if(!a.length)return null;if(a.length>1){const m=s.type==="source"?"target":"source";return a.find(v=>v.type===m)??a[0]}return a[0]}function Xg(t,r,i,s,a,u=!1){var m,v,g;const c=s.get(t);if(!c)return null;const f=a==="strict"?(m=c.internals.handleBounds)==null?void 0:m[r]:[...((v=c.internals.handleBounds)==null?void 0:v.source)??[],...((g=c.internals.handleBounds)==null?void 0:g.target)??[]],h=(i?f==null?void 0:f.find(y=>y.id===i):f==null?void 0:f[0])??null;return h&&u?{...h,...Nr(c,h,h.position,!0)}:h}function Gg(t,r){return t||(r!=null&&r.classList.contains("target")?"target":r!=null&&r.classList.contains("source")?"source":null)}function Q2(t,r){let i=null;return r?i=!0:t&&!r&&(i=!1),i}const Qg=()=>!0;function q2(t,{connectionMode:r,connectionRadius:i,handleId:s,nodeId:a,edgeUpdaterType:u,isTarget:c,domNode:f,nodeLookup:h,lib:m,autoPanOnConnect:v,flowId:g,panBy:y,cancelConnection:w,onConnectStart:_,onConnect:C,onConnectEnd:S,isValidConnection:E=Qg,onReconnectEnd:I,updateConnection:N,getTransform:M,getFromHandle:F,autoPanSpeed:A,dragThreshold:W=1,handleDomNode:G}){const q=Ag(t.target);let ee=0,D;const{x:V,y:J}=Xt(t),z=Gg(u,G),Y=f==null?void 0:f.getBoundingClientRect();let O=!1;if(!Y||!z)return;const U=Xg(a,z,s,h,r);if(!U)return;let L=Xt(t,Y),j=!1,H=null,b=!1,T=null;function te(){if(!v||!Y)return;const[we,ve]=kc(L,Y,A);y({x:we,y:ve}),ee=requestAnimationFrame(te)}const oe={...U,nodeId:a,type:z,position:U.position},ae=h.get(a);let ue={inProgress:!0,isValid:null,from:Nr(ae,oe,xe.Left,!0),fromHandle:oe,fromPosition:oe.position,fromNode:ae,to:L,toHandle:null,toPosition:$p[oe.position],toNode:null,pointer:L};function Z(){O=!0,N(ue),_==null||_(t,{nodeId:a,handleId:s,handleType:z})}W===0&&Z();function se(we){if(!O){const{x:Re,y:ut}=Xt(we),ft=Re-V,rt=ut-J;if(!(ft*ft+rt*rt>W*W))return;Z()}if(!F()||!oe){ge(we);return}const ve=M();L=Xt(we,Y),D=G2(mo(L,ve,!1,[1,1]),i,h,oe),j||(te(),j=!0);const me=qg(we,{handle:D,connectionMode:r,fromNodeId:a,fromHandleId:s,fromType:c?"target":"source",isValidConnection:E,doc:q,lib:m,flowId:g,nodeLookup:h});T=me.handleDomNode,H=me.connection,b=Q2(!!D,me.isValid);const Ee=h.get(a),Me=Ee?Nr(Ee,oe,xe.Left,!0):ue.from,Ie={...ue,from:Me,isValid:b,to:me.toHandle&&b?po({x:me.toHandle.x,y:me.toHandle.y},ve):L,toHandle:me.toHandle,toPosition:b&&me.toHandle?me.toHandle.position:$p[oe.position],toNode:me.toHandle?h.get(me.toHandle.nodeId):null,pointer:L};N(Ie),ue=Ie}function ge(we){if(!("touches"in we&&we.touches.length>0)){if(O){(D||T)&&H&&b&&(C==null||C(H));const{inProgress:ve,...me}=ue,Ee={...me,toPosition:ue.toHandle?ue.toPosition:null};S==null||S(we,Ee),u&&(I==null||I(we,Ee))}w(),cancelAnimationFrame(ee),j=!1,b=!1,H=null,T=null,q.removeEventListener("mousemove",se),q.removeEventListener("mouseup",ge),q.removeEventListener("touchmove",se),q.removeEventListener("touchend",ge)}}q.addEventListener("mousemove",se),q.addEventListener("mouseup",ge),q.addEventListener("touchmove",se),q.addEventListener("touchend",ge)}function qg(t,{handle:r,connectionMode:i,fromNodeId:s,fromHandleId:a,fromType:u,doc:c,lib:f,flowId:h,isValidConnection:m=Qg,nodeLookup:v}){const g=u==="target",y=r?c.querySelector(`.${f}-flow__handle[data-id="${h}-${r==null?void 0:r.nodeId}-${r==null?void 0:r.id}-${r==null?void 0:r.type}"]`):null,{x:w,y:_}=Xt(t),C=c.elementFromPoint(w,_),S=C!=null&&C.classList.contains(`${f}-flow__handle`)?C:y,E={handleDomNode:S,isValid:!1,connection:null,toHandle:null};if(S){const I=Gg(void 0,S),N=S.getAttribute("data-nodeid"),M=S.getAttribute("data-handleid"),F=S.classList.contains("connectable"),A=S.classList.contains("connectableend");if(!N||!I)return E;const W={source:g?N:s,sourceHandle:g?M:a,target:g?s:N,targetHandle:g?a:M};E.connection=W;const q=F&&A&&(i===uo.Strict?g&&I==="source"||!g&&I==="target":N!==s||M!==a);E.isValid=q&&m(W),E.toHandle=Xg(N,I,M,v,i,!0)}return E}const cc={onPointerDown:q2,isValid:qg};function K2({domNode:t,panZoom:r,getTransform:i,getViewScale:s}){const a=Mt(t);function u({translateExtent:f,width:h,height:m,zoomStep:v=1,pannable:g=!0,zoomable:y=!0,inversePan:w=!1}){const _=N=>{if(N.sourceEvent.type!=="wheel"||!r)return;const M=i(),F=N.sourceEvent.ctrlKey&&_i()?10:1,A=-N.sourceEvent.deltaY*(N.sourceEvent.deltaMode===1?.05:N.sourceEvent.deltaMode?1:.002)*v,W=M[2]*Math.pow(2,A*F);r.scaleTo(W)};let C=[0,0];const S=N=>{(N.sourceEvent.type==="mousedown"||N.sourceEvent.type==="touchstart")&&(C=[N.sourceEvent.clientX??N.sourceEvent.touches[0].clientX,N.sourceEvent.clientY??N.sourceEvent.touches[0].clientY])},E=N=>{const M=i();if(N.sourceEvent.type!=="mousemove"&&N.sourceEvent.type!=="touchmove"||!r)return;const F=[N.sourceEvent.clientX??N.sourceEvent.touches[0].clientX,N.sourceEvent.clientY??N.sourceEvent.touches[0].clientY],A=[F[0]-C[0],F[1]-C[1]];C=F;const W=s()*Math.max(M[2],Math.log(M[2]))*(w?-1:1),G={x:M[0]-A[0]*W,y:M[1]-A[1]*W},q=[[0,0],[h,m]];r.setViewportConstrained({x:G.x,y:G.y,zoom:M[2]},q,f)},I=Eg().on("start",S).on("zoom",g?E:null).on("zoom.wheel",y?_:null);a.call(I,{})}function c(){a.on("zoom",null)}return{update:u,destroy:c,pointer:Wt}}const Il=t=>({x:t.x,y:t.y,zoom:t.k}),Fu=({x:t,y:r,zoom:i})=>Ml.translate(t,r).scale(i),no=(t,r)=>t.target.closest(`.${r}`),Kg=(t,r)=>r===2&&Array.isArray(t)&&t.includes(2),Z2=t=>((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2,Vu=(t,r=0,i=Z2,s=()=>{})=>{const a=typeof r=="number"&&r>0;return a||s(),a?t.transition().duration(r).ease(i).on("end",s):t},Zg=t=>{const r=t.ctrlKey&&_i()?10:1;return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*r};function J2({zoomPanValues:t,noWheelClassName:r,d3Selection:i,d3Zoom:s,panOnScrollMode:a,panOnScrollSpeed:u,zoomOnPinch:c,onPanZoomStart:f,onPanZoom:h,onPanZoomEnd:m}){return v=>{if(no(v,r))return v.ctrlKey&&v.preventDefault(),!1;v.preventDefault(),v.stopImmediatePropagation();const g=i.property("__zoom").k||1;if(v.ctrlKey&&c){const S=Wt(v),E=Zg(v),I=g*Math.pow(2,E);s.scaleTo(i,I,S,v);return}const y=v.deltaMode===1?20:1;let w=a===xr.Vertical?0:v.deltaX*y,_=a===xr.Horizontal?0:v.deltaY*y;!_i()&&v.shiftKey&&a!==xr.Vertical&&(w=v.deltaY*y,_=0),s.translateBy(i,-(w/g)*u,-(_/g)*u,{internal:!0});const C=Il(i.property("__zoom"));clearTimeout(t.panScrollTimeout),t.isPanScrolling?(h==null||h(v,C),t.panScrollTimeout=setTimeout(()=>{m==null||m(v,C),t.isPanScrolling=!1},150)):(t.isPanScrolling=!0,f==null||f(v,C))}}function eS({noWheelClassName:t,preventScrolling:r,d3ZoomHandler:i}){return function(s,a){const u=s.type==="wheel",c=!r&&u&&!s.ctrlKey,f=no(s,t);if(s.ctrlKey&&u&&f&&s.preventDefault(),c||f)return null;s.preventDefault(),i.call(this,s,a)}}function tS({zoomPanValues:t,onDraggingChange:r,onPanZoomStart:i}){return s=>{var u,c,f;if((u=s.sourceEvent)!=null&&u.internal)return;const a=Il(s.transform);t.mouseButton=((c=s.sourceEvent)==null?void 0:c.button)||0,t.isZoomingOrPanning=!0,t.prevViewport=a,((f=s.sourceEvent)==null?void 0:f.type)==="mousedown"&&r(!0),i&&(i==null||i(s.sourceEvent,a))}}function nS({zoomPanValues:t,panOnDrag:r,onPaneContextMenu:i,onTransformChange:s,onPanZoom:a}){return u=>{var c,f;t.usedRightMouseButton=!!(i&&Kg(r,t.mouseButton??0)),(c=u.sourceEvent)!=null&&c.sync||s([u.transform.x,u.transform.y,u.transform.k]),a&&!((f=u.sourceEvent)!=null&&f.internal)&&(a==null||a(u.sourceEvent,Il(u.transform)))}}function rS({zoomPanValues:t,panOnDrag:r,panOnScroll:i,onDraggingChange:s,onPanZoomEnd:a,onPaneContextMenu:u}){return c=>{var f;if(!((f=c.sourceEvent)!=null&&f.internal)&&(t.isZoomingOrPanning=!1,u&&Kg(r,t.mouseButton??0)&&!t.usedRightMouseButton&&c.sourceEvent&&u(c.sourceEvent),t.usedRightMouseButton=!1,s(!1),a)){const h=Il(c.transform);t.prevViewport=h,clearTimeout(t.timerId),t.timerId=setTimeout(()=>{a==null||a(c.sourceEvent,h)},i?150:0)}}}function oS({zoomActivationKeyPressed:t,zoomOnScroll:r,zoomOnPinch:i,panOnDrag:s,panOnScroll:a,zoomOnDoubleClick:u,userSelectionActive:c,noWheelClassName:f,noPanClassName:h,lib:m,connectionInProgress:v}){return g=>{var S;const y=t||r,w=i&&g.ctrlKey,_=g.type==="wheel";if(g.button===1&&g.type==="mousedown"&&(no(g,`${m}-flow__node`)||no(g,`${m}-flow__edge`)))return!0;if(!s&&!y&&!a&&!u&&!i||c||v&&!_||no(g,f)&&_||no(g,h)&&(!_||a&&_&&!t)||!i&&g.ctrlKey&&_)return!1;if(!i&&g.type==="touchstart"&&((S=g.touches)==null?void 0:S.length)>1)return g.preventDefault(),!1;if(!y&&!a&&!w&&_||!s&&(g.type==="mousedown"||g.type==="touchstart")||Array.isArray(s)&&!s.includes(g.button)&&g.type==="mousedown")return!1;const C=Array.isArray(s)&&s.includes(g.button)||!g.button||g.button<=1;return(!g.ctrlKey||_)&&C}}function iS({domNode:t,minZoom:r,maxZoom:i,translateExtent:s,viewport:a,onPanZoom:u,onPanZoomStart:c,onPanZoomEnd:f,onDraggingChange:h}){const m={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},v=t.getBoundingClientRect(),g=Eg().scaleExtent([r,i]).translateExtent(s),y=Mt(t).call(g);I({x:a.x,y:a.y,zoom:co(a.zoom,r,i)},[[0,0],[v.width,v.height]],s);const w=y.on("wheel.zoom"),_=y.on("dblclick.zoom");g.wheelDelta(Zg);async function C(D,V){return y?new Promise(J=>{g==null||g.interpolate((V==null?void 0:V.interpolate)==="linear"?hi:ul).transform(Vu(y,V==null?void 0:V.duration,V==null?void 0:V.ease,()=>J(!0)),D)}):!1}function S({noWheelClassName:D,noPanClassName:V,onPaneContextMenu:J,userSelectionActive:z,panOnScroll:Y,panOnDrag:O,panOnScrollMode:U,panOnScrollSpeed:L,preventScrolling:j,zoomOnPinch:H,zoomOnScroll:b,zoomOnDoubleClick:T,zoomActivationKeyPressed:te,lib:oe,onTransformChange:ae,connectionInProgress:ce,paneClickDistance:ue,selectionOnDrag:Z}){z&&!m.isZoomingOrPanning&&E();const se=Y&&!te&&!z;g.clickDistance(Z?1/0:!Yt(ue)||ue<0?0:ue);const ge=se?J2({zoomPanValues:m,noWheelClassName:D,d3Selection:y,d3Zoom:g,panOnScrollMode:U,panOnScrollSpeed:L,zoomOnPinch:H,onPanZoomStart:c,onPanZoom:u,onPanZoomEnd:f}):eS({noWheelClassName:D,preventScrolling:j,d3ZoomHandler:w});y.on("wheel.zoom",ge,{passive:!1});const we=tS({zoomPanValues:m,onDraggingChange:h,onPanZoomStart:c});g.on("start",we);const ve=nS({zoomPanValues:m,panOnDrag:O,onPaneContextMenu:!!J,onPanZoom:u,onTransformChange:ae});g.on("zoom",ve);const me=rS({zoomPanValues:m,panOnDrag:O,panOnScroll:Y,onPaneContextMenu:J,onPanZoomEnd:f,onDraggingChange:h});g.on("end",me);const Ee=oS({zoomActivationKeyPressed:te,panOnDrag:O,zoomOnScroll:b,panOnScroll:Y,zoomOnDoubleClick:T,zoomOnPinch:H,userSelectionActive:z,noPanClassName:V,noWheelClassName:D,lib:oe,connectionInProgress:ce});g.filter(Ee),T?y.on("dblclick.zoom",_):y.on("dblclick.zoom",null)}function E(){g.on("zoom",null)}async function I(D,V,J){const z=Fu(D),Y=g==null?void 0:g.constrain()(z,V,J);return Y&&await C(Y),Y}async function N(D,V){const J=Fu(D);return await C(J,V),J}function M(D){if(y){const V=Fu(D),J=y.property("__zoom");(J.k!==D.zoom||J.x!==D.x||J.y!==D.y)&&(g==null||g.transform(y,V,null,{sync:!0}))}}function F(){const D=y?_g(y.node()):{x:0,y:0,k:1};return{x:D.x,y:D.y,zoom:D.k}}async function A(D,V){return y?new Promise(J=>{g==null||g.interpolate((V==null?void 0:V.interpolate)==="linear"?hi:ul).scaleTo(Vu(y,V==null?void 0:V.duration,V==null?void 0:V.ease,()=>J(!0)),D)}):!1}async function W(D,V){return y?new Promise(J=>{g==null||g.interpolate((V==null?void 0:V.interpolate)==="linear"?hi:ul).scaleBy(Vu(y,V==null?void 0:V.duration,V==null?void 0:V.ease,()=>J(!0)),D)}):!1}function G(D){g==null||g.scaleExtent(D)}function q(D){g==null||g.translateExtent(D)}function ee(D){const V=!Yt(D)||D<0?0:D;g==null||g.clickDistance(V)}return{update:S,destroy:E,setViewport:N,setViewportConstrained:I,getViewport:F,scaleTo:A,scaleBy:W,setScaleExtent:G,setTranslateExtent:q,syncViewport:M,setClickDistance:ee}}var ho;(function(t){t.Line="line",t.Handle="handle"})(ho||(ho={}));function sS({width:t,prevWidth:r,height:i,prevHeight:s,affectsX:a,affectsY:u}){const c=t-r,f=i-s,h=[c>0?1:c<0?-1:0,f>0?1:f<0?-1:0];return c&&a&&(h[0]=h[0]*-1),f&&u&&(h[1]=h[1]*-1),h}function qp(t){const r=t.includes("right")||t.includes("left"),i=t.includes("bottom")||t.includes("top"),s=t.includes("left"),a=t.includes("top");return{isHorizontal:r,isVertical:i,affectsX:s,affectsY:a}}function Xn(t,r){return Math.max(0,r-t)}function Gn(t,r){return Math.max(0,t-r)}function nl(t,r,i){return Math.max(0,r-t,t-i)}function Kp(t,r){return t?!r:r}function lS(t,r,i,s,a,u,c,f){let{affectsX:h,affectsY:m}=r;const{isHorizontal:v,isVertical:g}=r,y=v&&g,{xSnapped:w,ySnapped:_}=i,{minWidth:C,maxWidth:S,minHeight:E,maxHeight:I}=s,{x:N,y:M,width:F,height:A,aspectRatio:W}=t;let G=Math.floor(v?w-t.pointerX:0),q=Math.floor(g?_-t.pointerY:0);const ee=F+(h?-G:G),D=A+(m?-q:q),V=-u[0]*F,J=-u[1]*A;let z=nl(ee,C,S),Y=nl(D,E,I);if(c){let L=0,j=0;h&&G<0?L=Xn(N+G+V,c[0][0]):!h&&G>0&&(L=Gn(N+ee+V,c[1][0])),m&&q<0?j=Xn(M+q+J,c[0][1]):!m&&q>0&&(j=Gn(M+D+J,c[1][1])),z=Math.max(z,L),Y=Math.max(Y,j)}if(f){let L=0,j=0;h&&G>0?L=Gn(N+G,f[0][0]):!h&&G<0&&(L=Xn(N+ee,f[1][0])),m&&q>0?j=Gn(M+q,f[0][1]):!m&&q<0&&(j=Xn(M+D,f[1][1])),z=Math.max(z,L),Y=Math.max(Y,j)}if(a){if(v){const L=nl(ee/W,E,I)*W;if(z=Math.max(z,L),c){let j=0;!h&&!m||h&&!m&&y?j=Gn(M+J+ee/W,c[1][1])*W:j=Xn(M+J+(h?G:-G)/W,c[0][1])*W,z=Math.max(z,j)}if(f){let j=0;!h&&!m||h&&!m&&y?j=Xn(M+ee/W,f[1][1])*W:j=Gn(M+(h?G:-G)/W,f[0][1])*W,z=Math.max(z,j)}}if(g){const L=nl(D*W,C,S)/W;if(Y=Math.max(Y,L),c){let j=0;!h&&!m||m&&!h&&y?j=Gn(N+D*W+V,c[1][0])/W:j=Xn(N+(m?q:-q)*W+V,c[0][0])/W,Y=Math.max(Y,j)}if(f){let j=0;!h&&!m||m&&!h&&y?j=Xn(N+D*W,f[1][0])/W:j=Gn(N+(m?q:-q)*W,f[0][0])/W,Y=Math.max(Y,j)}}}q=q+(q<0?Y:-Y),G=G+(G<0?z:-z),a&&(y?ee>D*W?q=(Kp(h,m)?-G:G)/W:G=(Kp(h,m)?-q:q)*W:v?(q=G/W,m=h):(G=q*W,h=m));const O=h?N+G:N,U=m?M+q:M;return{width:F+(h?-G:G),height:A+(m?-q:q),x:u[0]*G*(h?-1:1)+O,y:u[1]*q*(m?-1:1)+U}}const Jg={width:0,height:0,x:0,y:0},aS={...Jg,pointerX:0,pointerY:0,aspectRatio:1};function uS(t,r,i){const s=r.position.x+t.position.x,a=r.position.y+t.position.y,u=t.measured.width??0,c=t.measured.height??0,f=i[0]*u,h=i[1]*c;return[[s-f,a-h],[s+u-f,a+c-h]]}function cS({domNode:t,nodeId:r,getStoreItems:i,onChange:s,onEnd:a}){const u=Mt(t);let c={controlDirection:qp("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function f({controlPosition:m,boundaries:v,keepAspectRatio:g,resizeDirection:y,onResizeStart:w,onResize:_,onResizeEnd:C,shouldResize:S}){let E={...Jg},I={...aS};c={boundaries:v,resizeDirection:y,keepAspectRatio:g,controlDirection:qp(m)};let N,M=null,F=[],A,W,G,q=!1;const ee=ug().on("start",D=>{const{nodeLookup:V,transform:J,snapGrid:z,snapToGrid:Y,nodeOrigin:O,paneDomNode:U}=i();if(N=V.get(r),!N)return;M=(U==null?void 0:U.getBoundingClientRect())??null;const{xSnapped:L,ySnapped:j}=gi(D.sourceEvent,{transform:J,snapGrid:z,snapToGrid:Y,containerBounds:M});E={width:N.measured.width??0,height:N.measured.height??0,x:N.position.x??0,y:N.position.y??0},I={...E,pointerX:L,pointerY:j,aspectRatio:E.width/E.height},A=void 0,W=Er(N.extent)?N.extent:void 0,N.parentId&&(N.extent==="parent"||N.expandParent)&&(A=V.get(N.parentId)),A&&N.extent==="parent"&&(W=[[0,0],[A.measured.width,A.measured.height]]),F=[],G=void 0;for(const[H,b]of V)if(b.parentId===r&&(F.push({id:H,position:{...b.position},extent:b.extent}),b.extent==="parent"||b.expandParent)){const T=uS(b,N,b.origin??O);G?G=[[Math.min(T[0][0],G[0][0]),Math.min(T[0][1],G[0][1])],[Math.max(T[1][0],G[1][0]),Math.max(T[1][1],G[1][1])]]:G=T}w==null||w(D,{...E})}).on("drag",D=>{const{transform:V,snapGrid:J,snapToGrid:z,nodeOrigin:Y}=i(),O=gi(D.sourceEvent,{transform:V,snapGrid:J,snapToGrid:z,containerBounds:M}),U=[];if(!N)return;const{x:L,y:j,width:H,height:b}=E,T={},te=N.origin??Y,{width:oe,height:ae,x:ce,y:ue}=lS(I,c.controlDirection,O,c.boundaries,c.keepAspectRatio,te,W,G),Z=oe!==H,se=ae!==b,ge=ce!==L&&Z,we=ue!==j&&se;if(!ge&&!we&&!Z&&!se)return;if((ge||we||te[0]===1||te[1]===1)&&(T.x=ge?ce:E.x,T.y=we?ue:E.y,E.x=T.x,E.y=T.y,F.length>0)){const Me=ce-L,Ie=ue-j;for(const Re of F)Re.position={x:Re.position.x-Me+te[0]*(oe-H),y:Re.position.y-Ie+te[1]*(ae-b)},U.push(Re)}if((Z||se)&&(T.width=Z&&(!c.resizeDirection||c.resizeDirection==="horizontal")?oe:E.width,T.height=se&&(!c.resizeDirection||c.resizeDirection==="vertical")?ae:E.height,E.width=T.width,E.height=T.height),A&&N.expandParent){const Me=te[0]*(T.width??0);T.x&&T.x<Me&&(E.x=Me,I.x=I.x-(T.x-Me));const Ie=te[1]*(T.height??0);T.y&&T.y<Ie&&(E.y=Ie,I.y=I.y-(T.y-Ie))}const ve=sS({width:E.width,prevWidth:H,height:E.height,prevHeight:b,affectsX:c.controlDirection.affectsX,affectsY:c.controlDirection.affectsY}),me={...E,direction:ve};(S==null?void 0:S(D,me))!==!1&&(q=!0,_==null||_(D,me),s(T,U))}).on("end",D=>{q&&(C==null||C(D,{...E}),a==null||a({...E}),q=!1)});u.call(ee)}function h(){u.on(".drag",null)}return{update:f,destroy:h}}var Hu={exports:{}},Bu={},Wu={exports:{}},Uu={};/**
|
|
146
|
-
* @license React
|
|
147
|
-
* use-sync-external-store-shim.production.js
|
|
148
|
-
*
|
|
149
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
150
|
-
*
|
|
151
|
-
* This source code is licensed under the MIT license found in the
|
|
152
|
-
* LICENSE file in the root directory of this source tree.
|
|
153
|
-
*/var Zp;function dS(){if(Zp)return Uu;Zp=1;var t=Ni();function r(g,y){return g===y&&(g!==0||1/g===1/y)||g!==g&&y!==y}var i=typeof Object.is=="function"?Object.is:r,s=t.useState,a=t.useEffect,u=t.useLayoutEffect,c=t.useDebugValue;function f(g,y){var w=y(),_=s({inst:{value:w,getSnapshot:y}}),C=_[0].inst,S=_[1];return u(function(){C.value=w,C.getSnapshot=y,h(C)&&S({inst:C})},[g,w,y]),a(function(){return h(C)&&S({inst:C}),g(function(){h(C)&&S({inst:C})})},[g]),c(w),w}function h(g){var y=g.getSnapshot;g=g.value;try{var w=y();return!i(g,w)}catch{return!0}}function m(g,y){return y()}var v=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?m:f;return Uu.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:v,Uu}var Jp;function fS(){return Jp||(Jp=1,Wu.exports=dS()),Wu.exports}/**
|
|
154
|
-
* @license React
|
|
155
|
-
* use-sync-external-store-shim/with-selector.production.js
|
|
156
|
-
*
|
|
157
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
158
|
-
*
|
|
159
|
-
* This source code is licensed under the MIT license found in the
|
|
160
|
-
* LICENSE file in the root directory of this source tree.
|
|
161
|
-
*/var eh;function pS(){if(eh)return Bu;eh=1;var t=Ni(),r=fS();function i(m,v){return m===v&&(m!==0||1/m===1/v)||m!==m&&v!==v}var s=typeof Object.is=="function"?Object.is:i,a=r.useSyncExternalStore,u=t.useRef,c=t.useEffect,f=t.useMemo,h=t.useDebugValue;return Bu.useSyncExternalStoreWithSelector=function(m,v,g,y,w){var _=u(null);if(_.current===null){var C={hasValue:!1,value:null};_.current=C}else C=_.current;_=f(function(){function E(A){if(!I){if(I=!0,N=A,A=y(A),w!==void 0&&C.hasValue){var W=C.value;if(w(W,A))return M=W}return M=A}if(W=M,s(N,A))return W;var G=y(A);return w!==void 0&&w(W,G)?(N=A,W):(N=A,M=G)}var I=!1,N,M,F=g===void 0?null:g;return[function(){return E(v())},F===null?void 0:function(){return E(F())}]},[v,g,y,w]);var S=a(m,_[0],_[1]);return c(function(){C.hasValue=!0,C.value=S},[S]),h(S),S},Bu}var th;function hS(){return th||(th=1,Hu.exports=pS()),Hu.exports}var gS=hS();const mS=Dh(gS),yS={},nh=t=>{let r;const i=new Set,s=(v,g)=>{const y=typeof v=="function"?v(r):v;if(!Object.is(y,r)){const w=r;r=g??(typeof y!="object"||y===null)?y:Object.assign({},r,y),i.forEach(_=>_(r,w))}},a=()=>r,h={setState:s,getState:a,getInitialState:()=>m,subscribe:v=>(i.add(v),()=>i.delete(v)),destroy:()=>{(yS?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),i.clear()}},m=r=t(s,a,h);return h},vS=t=>t?nh(t):nh,{useDebugValue:xS}=Cy,{useSyncExternalStoreWithSelector:wS}=mS,SS=t=>t;function em(t,r=SS,i){const s=wS(t.subscribe,t.getState,t.getServerState||t.getInitialState,r,i);return xS(s),s}const rh=(t,r)=>{const i=vS(t),s=(a,u=r)=>em(i,a,u);return Object.assign(s,i),s},kS=(t,r)=>t?rh(t,r):rh;function Oe(t,r){if(Object.is(t,r))return!0;if(typeof t!="object"||t===null||typeof r!="object"||r===null)return!1;if(t instanceof Map&&r instanceof Map){if(t.size!==r.size)return!1;for(const[s,a]of t)if(!Object.is(a,r.get(s)))return!1;return!0}if(t instanceof Set&&r instanceof Set){if(t.size!==r.size)return!1;for(const s of t)if(!r.has(s))return!1;return!0}const i=Object.keys(t);if(i.length!==Object.keys(r).length)return!1;for(const s of i)if(!Object.prototype.hasOwnProperty.call(r,s)||!Object.is(t[s],r[s]))return!1;return!0}Oh();const jl=B.createContext(null),_S=jl.Provider,tm=Gt.error001("react");function be(t,r){const i=B.useContext(jl);if(i===null)throw new Error(tm);return em(i,t,r)}function Fe(){const t=B.useContext(jl);if(t===null)throw new Error(tm);return B.useMemo(()=>({getState:t.getState,setState:t.setState,subscribe:t.subscribe}),[t])}const oh={display:"none"},ES={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},nm="react-flow__node-desc",rm="react-flow__edge-desc",NS="react-flow__aria-live",CS=t=>t.ariaLiveMessage,bS=t=>t.ariaLabelConfig;function MS({rfId:t}){const r=be(CS);return k.jsx("div",{id:`${NS}-${t}`,"aria-live":"assertive","aria-atomic":"true",style:ES,children:r})}function PS({rfId:t,disableKeyboardA11y:r}){const i=be(bS);return k.jsxs(k.Fragment,{children:[k.jsx("div",{id:`${nm}-${t}`,style:oh,children:r?i["node.a11yDescription.default"]:i["node.a11yDescription.keyboardDisabled"]}),k.jsx("div",{id:`${rm}-${t}`,style:oh,children:i["edge.a11yDescription.default"]}),!r&&k.jsx(MS,{rfId:t})]})}const Tl=B.forwardRef(({position:t="top-left",children:r,className:i,style:s,...a},u)=>{const c=`${t}`.split("-");return k.jsx("div",{className:Xe(["react-flow__panel",i,...c]),style:s,ref:u,...a,children:r})});Tl.displayName="Panel";function zS({proOptions:t,position:r="bottom-right"}){return t!=null&&t.hideAttribution?null:k.jsx(Tl,{position:r,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:k.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const IS=t=>{const r=[],i=[];for(const[,s]of t.nodeLookup)s.selected&&r.push(s.internals.userNode);for(const[,s]of t.edgeLookup)s.selected&&i.push(s);return{selectedNodes:r,selectedEdges:i}},rl=t=>t.id;function jS(t,r){return Oe(t.selectedNodes.map(rl),r.selectedNodes.map(rl))&&Oe(t.selectedEdges.map(rl),r.selectedEdges.map(rl))}function TS({onSelectionChange:t}){const r=Fe(),{selectedNodes:i,selectedEdges:s}=be(IS,jS);return B.useEffect(()=>{const a={nodes:i,edges:s};t==null||t(a),r.getState().onSelectionChangeHandlers.forEach(u=>u(a))},[i,s,t]),null}const RS=t=>!!t.onSelectionChangeHandlers;function LS({onSelectionChange:t}){const r=be(RS);return t||r?k.jsx(TS,{onSelectionChange:t}):null}const om=[0,0],AS={x:0,y:0,zoom:1},$S=["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"],ih=[...$S,"rfId"],DS=t=>({setNodes:t.setNodes,setEdges:t.setEdges,setMinZoom:t.setMinZoom,setMaxZoom:t.setMaxZoom,setTranslateExtent:t.setTranslateExtent,setNodeExtent:t.setNodeExtent,reset:t.reset,setDefaultNodesAndEdges:t.setDefaultNodesAndEdges}),sh={translateExtent:wi,nodeOrigin:om,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function OS(t){const{setNodes:r,setEdges:i,setMinZoom:s,setMaxZoom:a,setTranslateExtent:u,setNodeExtent:c,reset:f,setDefaultNodesAndEdges:h}=be(DS,Oe),m=Fe();B.useEffect(()=>(h(t.defaultNodes,t.defaultEdges),()=>{v.current=sh,f()}),[]);const v=B.useRef(sh);return B.useEffect(()=>{for(const g of ih){const y=t[g],w=v.current[g];y!==w&&(typeof t[g]>"u"||(g==="nodes"?r(y):g==="edges"?i(y):g==="minZoom"?s(y):g==="maxZoom"?a(y):g==="translateExtent"?u(y):g==="nodeExtent"?c(y):g==="ariaLabelConfig"?m.setState({ariaLabelConfig:_2(y)}):g==="fitView"?m.setState({fitViewQueued:y}):g==="fitViewOptions"?m.setState({fitViewOptions:y}):m.setState({[g]:y})))}v.current=t},ih.map(g=>t[g])),null}function lh(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function FS(t){var s;const[r,i]=B.useState(t==="system"?null:t);return B.useEffect(()=>{if(t!=="system"){i(t);return}const a=lh(),u=()=>i(a!=null&&a.matches?"dark":"light");return u(),a==null||a.addEventListener("change",u),()=>{a==null||a.removeEventListener("change",u)}},[t]),r!==null?r:(s=lh())!=null&&s.matches?"dark":"light"}const ah=typeof document<"u"?document:null;function Ei(t=null,r={target:ah,actInsideInputWithModifier:!0}){const[i,s]=B.useState(!1),a=B.useRef(!1),u=B.useRef(new Set([])),[c,f]=B.useMemo(()=>{if(t!==null){const m=(Array.isArray(t)?t:[t]).filter(g=>typeof g=="string").map(g=>g.replace("+",`
|
|
162
|
-
`).replace(`
|
|
163
|
-
|
|
164
|
-
`,`
|
|
165
|
-
+`).split(`
|
|
166
|
-
`)),v=m.reduce((g,y)=>g.concat(...y),[]);return[m,v]}return[[],[]]},[t]);return B.useEffect(()=>{const h=(r==null?void 0:r.target)??ah,m=(r==null?void 0:r.actInsideInputWithModifier)??!0;if(t!==null){const v=w=>{var S,E;if(a.current=w.ctrlKey||w.metaKey||w.shiftKey||w.altKey,(!a.current||a.current&&!m)&&$g(w))return!1;const C=ch(w.code,f);if(u.current.add(w[C]),uh(c,u.current,!1)){const I=((E=(S=w.composedPath)==null?void 0:S.call(w))==null?void 0:E[0])||w.target,N=(I==null?void 0:I.nodeName)==="BUTTON"||(I==null?void 0:I.nodeName)==="A";r.preventDefault!==!1&&(a.current||!N)&&w.preventDefault(),s(!0)}},g=w=>{const _=ch(w.code,f);uh(c,u.current,!0)?(s(!1),u.current.clear()):u.current.delete(w[_]),w.key==="Meta"&&u.current.clear(),a.current=!1},y=()=>{u.current.clear(),s(!1)};return h==null||h.addEventListener("keydown",v),h==null||h.addEventListener("keyup",g),window.addEventListener("blur",y),window.addEventListener("contextmenu",y),()=>{h==null||h.removeEventListener("keydown",v),h==null||h.removeEventListener("keyup",g),window.removeEventListener("blur",y),window.removeEventListener("contextmenu",y)}}},[t,s]),i}function uh(t,r,i){return t.filter(s=>i||s.length===r.size).some(s=>s.every(a=>r.has(a)))}function ch(t,r){return r.includes(t)?"code":"key"}const VS=()=>{const t=Fe();return B.useMemo(()=>({zoomIn:async r=>{const{panZoom:i}=t.getState();return i?i.scaleBy(1.2,r):!1},zoomOut:async r=>{const{panZoom:i}=t.getState();return i?i.scaleBy(1/1.2,r):!1},zoomTo:async(r,i)=>{const{panZoom:s}=t.getState();return s?s.scaleTo(r,i):!1},getZoom:()=>t.getState().transform[2],setViewport:async(r,i)=>{const{transform:[s,a,u],panZoom:c}=t.getState();return c?(await c.setViewport({x:r.x??s,y:r.y??a,zoom:r.zoom??u},i),!0):!1},getViewport:()=>{const[r,i,s]=t.getState().transform;return{x:r,y:i,zoom:s}},setCenter:async(r,i,s)=>t.getState().setCenter(r,i,s),fitBounds:async(r,i)=>{const{width:s,height:a,minZoom:u,maxZoom:c,panZoom:f}=t.getState(),h=_c(r,s,a,u,c,(i==null?void 0:i.padding)??.1);return f?(await f.setViewport(h,{duration:i==null?void 0:i.duration,ease:i==null?void 0:i.ease,interpolate:i==null?void 0:i.interpolate}),!0):!1},screenToFlowPosition:(r,i={})=>{const{transform:s,snapGrid:a,snapToGrid:u,domNode:c}=t.getState();if(!c)return r;const{x:f,y:h}=c.getBoundingClientRect(),m={x:r.x-f,y:r.y-h},v=i.snapGrid??a,g=i.snapToGrid??u;return mo(m,s,g,v)},flowToScreenPosition:r=>{const{transform:i,domNode:s}=t.getState();if(!s)return r;const{x:a,y:u}=s.getBoundingClientRect(),c=po(r,i);return{x:c.x+a,y:c.y+u}}}),[])};function im(t,r){const i=[],s=new Map,a=[];for(const u of t)if(u.type==="add"){a.push(u);continue}else if(u.type==="remove"||u.type==="replace")s.set(u.id,[u]);else{const c=s.get(u.id);c?c.push(u):s.set(u.id,[u])}for(const u of r){const c=s.get(u.id);if(!c){i.push(u);continue}if(c[0].type==="remove")continue;if(c[0].type==="replace"){i.push({...c[0].item});continue}const f={...u};for(const h of c)HS(h,f);i.push(f)}return a.length&&a.forEach(u=>{u.index!==void 0?i.splice(u.index,0,{...u.item}):i.push({...u.item})}),i}function HS(t,r){switch(t.type){case"select":{r.selected=t.selected;break}case"position":{typeof t.position<"u"&&(r.position=t.position),typeof t.dragging<"u"&&(r.dragging=t.dragging);break}case"dimensions":{typeof t.dimensions<"u"&&(r.measured={...t.dimensions},t.setAttributes&&((t.setAttributes===!0||t.setAttributes==="width")&&(r.width=t.dimensions.width),(t.setAttributes===!0||t.setAttributes==="height")&&(r.height=t.dimensions.height))),typeof t.resizing=="boolean"&&(r.resizing=t.resizing);break}}}function BS(t,r){return im(t,r)}function WS(t,r){return im(t,r)}function mr(t,r){return{id:t,type:"select",selected:r}}function ro(t,r=new Set,i=!1){const s=[];for(const[a,u]of t){const c=r.has(a);!(u.selected===void 0&&!c)&&u.selected!==c&&(i&&(u.selected=c),s.push(mr(u.id,c)))}return s}function dh({items:t=[],lookup:r}){var a;const i=[],s=new Map(t.map(u=>[u.id,u]));for(const[u,c]of t.entries()){const f=r.get(c.id),h=((a=f==null?void 0:f.internals)==null?void 0:a.userNode)??f;h!==void 0&&h!==c&&i.push({id:c.id,item:c,type:"replace"}),h===void 0&&i.push({item:c,type:"add",index:u})}for(const[u]of r)s.get(u)===void 0&&i.push({id:u,type:"remove"});return i}function fh(t){return{id:t.id,type:"remove"}}const US=Tg();function YS(t,r,i={}){return P2(t,r,{...i,onError:i.onError??US})}const ph=t=>h2(t),XS=t=>Pg(t);function sm(t){return B.forwardRef(t)}const GS=typeof window<"u"?B.useLayoutEffect:B.useEffect;function hh(t){const[r,i]=B.useState(BigInt(0)),[s]=B.useState(()=>QS(()=>i(a=>a+BigInt(1))));return GS(()=>{const a=s.get();a.length&&(t(a),s.reset())},[r]),s}function QS(t){let r=[];return{get:()=>r,reset:()=>{r=[]},push:i=>{r.push(i),t()}}}const lm=B.createContext(null);function qS({children:t}){const r=Fe(),i=B.useCallback(f=>{const{nodes:h=[],setNodes:m,hasDefaultNodes:v,onNodesChange:g,nodeLookup:y,fitViewQueued:w,onNodesChangeMiddlewareMap:_}=r.getState();let C=h;for(const E of f)C=typeof E=="function"?E(C):E;let S=dh({items:C,lookup:y});for(const E of _.values())S=E(S);v&&m(C),S.length>0?g==null||g(S):w&&window.requestAnimationFrame(()=>{const{fitViewQueued:E,nodes:I,setNodes:N}=r.getState();E&&N(I)})},[]),s=hh(i),a=B.useCallback(f=>{const{edges:h=[],setEdges:m,hasDefaultEdges:v,onEdgesChange:g,edgeLookup:y}=r.getState();let w=h;for(const _ of f)w=typeof _=="function"?_(w):_;v?m(w):g&&g(dh({items:w,lookup:y}))},[]),u=hh(a),c=B.useMemo(()=>({nodeQueue:s,edgeQueue:u}),[]);return k.jsx(lm.Provider,{value:c,children:t})}function KS(){const t=B.useContext(lm);if(!t)throw new Error("useBatchContext must be used within a BatchProvider");return t}const ZS=t=>!!t.panZoom;function zc(){const t=VS(),r=Fe(),i=KS(),s=be(ZS),a=B.useMemo(()=>{const u=g=>r.getState().nodeLookup.get(g),c=g=>{i.nodeQueue.push(g)},f=g=>{i.edgeQueue.push(g)},h=g=>{var E,I;const{nodeLookup:y,nodeOrigin:w}=r.getState(),_=ph(g)?g:y.get(g.id),C=_.parentId?Lg(_.position,_.measured,_.parentId,y,w):_.position,S={..._,position:C,width:((E=_.measured)==null?void 0:E.width)??_.width,height:((I=_.measured)==null?void 0:I.height)??_.height};return fo(S)},m=(g,y,w={replace:!1})=>{c(_=>_.map(C=>{if(C.id===g){const S=typeof y=="function"?y(C):y;return w.replace&&ph(S)?S:{...C,...S}}return C}))},v=(g,y,w={replace:!1})=>{f(_=>_.map(C=>{if(C.id===g){const S=typeof y=="function"?y(C):y;return w.replace&&XS(S)?S:{...C,...S}}return C}))};return{getNodes:()=>r.getState().nodes.map(g=>({...g})),getNode:g=>{var y;return(y=u(g))==null?void 0:y.internals.userNode},getInternalNode:u,getEdges:()=>{const{edges:g=[]}=r.getState();return g.map(y=>({...y}))},getEdge:g=>r.getState().edgeLookup.get(g),setNodes:c,setEdges:f,addNodes:g=>{const y=Array.isArray(g)?g:[g];i.nodeQueue.push(w=>[...w,...y])},addEdges:g=>{const y=Array.isArray(g)?g:[g];i.edgeQueue.push(w=>[...w,...y])},toObject:()=>{const{nodes:g=[],edges:y=[],transform:w}=r.getState(),[_,C,S]=w;return{nodes:g.map(E=>({...E})),edges:y.map(E=>({...E})),viewport:{x:_,y:C,zoom:S}}},deleteElements:async({nodes:g=[],edges:y=[]})=>{const{nodes:w,edges:_,onNodesDelete:C,onEdgesDelete:S,triggerNodeChanges:E,triggerEdgeChanges:I,onDelete:N,onBeforeDelete:M}=r.getState(),{nodes:F,edges:A}=await x2({nodesToRemove:g,edgesToRemove:y,nodes:w,edges:_,onBeforeDelete:M}),W=A.length>0,G=F.length>0;if(W){const q=A.map(fh);S==null||S(A),I(q)}if(G){const q=F.map(fh);C==null||C(F),E(q)}return(G||W)&&(N==null||N({nodes:F,edges:A})),{deletedNodes:F,deletedEdges:A}},getIntersectingNodes:(g,y=!0,w)=>{const _=Op(g),C=_?g:h(g),S=w!==void 0;return C?(w||r.getState().nodes).filter(E=>{const I=r.getState().nodeLookup.get(E.id);if(I&&!_&&(E.id===g.id||!I.internals.positionAbsolute))return!1;const N=fo(S?E:I),M=ki(N,C);return y&&M>0||M>=N.width*N.height||M>=C.width*C.height}):[]},isNodeIntersecting:(g,y,w=!0)=>{const C=Op(g)?g:h(g);if(!C)return!1;const S=ki(C,y);return w&&S>0||S>=y.width*y.height||S>=C.width*C.height},updateNode:m,updateNodeData:(g,y,w={replace:!1})=>{m(g,_=>{const C=typeof y=="function"?y(_):y;return w.replace?{..._,data:C}:{..._,data:{..._.data,...C}}},w)},updateEdge:v,updateEdgeData:(g,y,w={replace:!1})=>{v(g,_=>{const C=typeof y=="function"?y(_):y;return w.replace?{..._,data:C}:{..._,data:{..._.data,...C}}},w)},getNodesBounds:g=>{const{nodeLookup:y,nodeOrigin:w}=r.getState();return g2(g,{nodeLookup:y,nodeOrigin:w})},getHandleConnections:({type:g,id:y,nodeId:w})=>{var _;return Array.from(((_=r.getState().connectionLookup.get(`${w}-${g}${y?`-${y}`:""}`))==null?void 0:_.values())??[])},getNodeConnections:({type:g,handleId:y,nodeId:w})=>{var _;return Array.from(((_=r.getState().connectionLookup.get(`${w}${g?y?`-${g}-${y}`:`-${g}`:""}`))==null?void 0:_.values())??[])},fitView:async g=>{const y=r.getState().fitViewResolver??k2();return r.setState({fitViewQueued:!0,fitViewOptions:g,fitViewResolver:y}),i.nodeQueue.push(w=>[...w]),y.promise}}},[]);return B.useMemo(()=>({...a,...t,viewportInitialized:s}),[s])}const gh=t=>t.selected,JS=typeof window<"u"?window:void 0;function ek({deleteKeyCode:t,multiSelectionKeyCode:r}){const i=Fe(),{deleteElements:s}=zc(),a=Ei(t,{actInsideInputWithModifier:!1}),u=Ei(r,{target:JS});B.useEffect(()=>{if(a){const{edges:c,nodes:f}=i.getState();s({nodes:f.filter(gh),edges:c.filter(gh)}),i.setState({nodesSelectionActive:!1})}},[a]),B.useEffect(()=>{i.setState({multiSelectionActive:u})},[u])}function tk(t){const r=Fe();B.useEffect(()=>{const i=()=>{var a,u,c,f;if(!t.current||!(((u=(a=t.current).checkVisibility)==null?void 0:u.call(a))??!0))return!1;const s=Ec(t.current);(s.height===0||s.width===0)&&((f=(c=r.getState()).onError)==null||f.call(c,"004",Gt.error004())),r.setState({width:s.width||500,height:s.height||500})};if(t.current){i(),window.addEventListener("resize",i);const s=new ResizeObserver(()=>i());return s.observe(t.current),()=>{window.removeEventListener("resize",i),s&&t.current&&s.unobserve(t.current)}}},[])}const Rl={position:"absolute",width:"100%",height:"100%",top:0,left:0},nk=t=>({userSelectionActive:t.userSelectionActive,lib:t.lib,connectionInProgress:t.connection.inProgress});function rk({onPaneContextMenu:t,zoomOnScroll:r=!0,zoomOnPinch:i=!0,panOnScroll:s=!1,panOnScrollSpeed:a=.5,panOnScrollMode:u=xr.Free,zoomOnDoubleClick:c=!0,panOnDrag:f=!0,defaultViewport:h,translateExtent:m,minZoom:v,maxZoom:g,zoomActivationKeyCode:y,preventScrolling:w=!0,children:_,noWheelClassName:C,noPanClassName:S,onViewportChange:E,isControlledViewport:I,paneClickDistance:N,selectionOnDrag:M}){const F=Fe(),A=B.useRef(null),{userSelectionActive:W,lib:G,connectionInProgress:q}=be(nk,Oe),ee=Ei(y),D=B.useRef();tk(A);const V=B.useCallback(J=>{E==null||E({x:J[0],y:J[1],zoom:J[2]}),I||F.setState({transform:J})},[E,I]);return B.useEffect(()=>{if(A.current){D.current=iS({domNode:A.current,minZoom:v,maxZoom:g,translateExtent:m,viewport:h,onDraggingChange:O=>F.setState(U=>U.paneDragging===O?U:{paneDragging:O}),onPanZoomStart:(O,U)=>{const{onViewportChangeStart:L,onMoveStart:j}=F.getState();j==null||j(O,U),L==null||L(U)},onPanZoom:(O,U)=>{const{onViewportChange:L,onMove:j}=F.getState();j==null||j(O,U),L==null||L(U)},onPanZoomEnd:(O,U)=>{const{onViewportChangeEnd:L,onMoveEnd:j}=F.getState();j==null||j(O,U),L==null||L(U)}});const{x:J,y:z,zoom:Y}=D.current.getViewport();return F.setState({panZoom:D.current,transform:[J,z,Y],domNode:A.current.closest(".react-flow")}),()=>{var O;(O=D.current)==null||O.destroy()}}},[]),B.useEffect(()=>{var J;(J=D.current)==null||J.update({onPaneContextMenu:t,zoomOnScroll:r,zoomOnPinch:i,panOnScroll:s,panOnScrollSpeed:a,panOnScrollMode:u,zoomOnDoubleClick:c,panOnDrag:f,zoomActivationKeyPressed:ee,preventScrolling:w,noPanClassName:S,userSelectionActive:W,noWheelClassName:C,lib:G,onTransformChange:V,connectionInProgress:q,selectionOnDrag:M,paneClickDistance:N})},[t,r,i,s,a,u,c,f,ee,w,S,W,C,G,V,q,M,N]),k.jsx("div",{className:"react-flow__renderer",ref:A,style:Rl,children:_})}const ok=t=>({userSelectionActive:t.userSelectionActive,userSelectionRect:t.userSelectionRect});function ik(){const{userSelectionActive:t,userSelectionRect:r}=be(ok,Oe);return t&&r?k.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:r.width,height:r.height,transform:`translate(${r.x}px, ${r.y}px)`}}):null}const Yu=(t,r)=>i=>{i.target===r.current&&(t==null||t(i))},sk=t=>({userSelectionActive:t.userSelectionActive,elementsSelectable:t.elementsSelectable,connectionInProgress:t.connection.inProgress,dragging:t.paneDragging,panBy:t.panBy,autoPanSpeed:t.autoPanSpeed});function lk({isSelecting:t,selectionKeyPressed:r,selectionMode:i=Si.Full,panOnDrag:s,autoPanOnSelection:a,paneClickDistance:u,selectionOnDrag:c,onSelectionStart:f,onSelectionEnd:h,onPaneClick:m,onPaneContextMenu:v,onPaneScroll:g,onPaneMouseEnter:y,onPaneMouseMove:w,onPaneMouseLeave:_,children:C}){const S=B.useRef(0),E=Fe(),{userSelectionActive:I,elementsSelectable:N,dragging:M,connectionInProgress:F,panBy:A,autoPanSpeed:W}=be(sk,Oe),G=N&&(t||I),q=B.useRef(null),ee=B.useRef(),D=B.useRef(new Set),V=B.useRef(new Set),J=B.useRef(!1),z=B.useRef({x:0,y:0}),Y=B.useRef(!1),O=Z=>{if(J.current||F){J.current=!1;return}m==null||m(Z),E.getState().resetSelectedElements(),E.setState({nodesSelectionActive:!1})},U=Z=>{if(Array.isArray(s)&&(s!=null&&s.includes(2))){Z.preventDefault();return}v==null||v(Z)},L=g?Z=>g(Z):void 0,j=Z=>{J.current&&(Z.stopPropagation(),J.current=!1)},H=Z=>{var Re,ut;const{domNode:se,transform:ge}=E.getState();if(ee.current=se==null?void 0:se.getBoundingClientRect(),!ee.current)return;const we=Z.target===q.current;if(!we&&!!Z.target.closest(".nokey")||!t||!(c&&we||r)||Z.button!==0||!Z.isPrimary)return;(ut=(Re=Z.target)==null?void 0:Re.setPointerCapture)==null||ut.call(Re,Z.pointerId),J.current=!1;const{x:Ee,y:Me}=Xt(Z.nativeEvent,ee.current),Ie=mo({x:Ee,y:Me},ge);E.setState({userSelectionRect:{width:0,height:0,startX:Ie.x,startY:Ie.y,x:Ee,y:Me}}),we||(Z.stopPropagation(),Z.preventDefault())};function b(Z,se){const{userSelectionRect:ge}=E.getState();if(!ge)return;const{transform:we,nodeLookup:ve,edgeLookup:me,connectionLookup:Ee,triggerNodeChanges:Me,triggerEdgeChanges:Ie,defaultEdgeOptions:Re}=E.getState(),ut={x:ge.startX,y:ge.startY},{x:ft,y:rt}=po(ut,we),ot={startX:ut.x,startY:ut.y,x:Z<ft?Z:ft,y:se<rt?se:rt,width:Math.abs(Z-ft),height:Math.abs(se-rt)},ln=D.current,qt=V.current;D.current=new Set(Sc(ve,ot,we,i===Si.Partial,!0).map(pt=>pt.id)),V.current=new Set;const Kt=(Re==null?void 0:Re.selectable)??!0;for(const pt of D.current){const zt=Ee.get(pt);if(zt)for(const{edgeId:St}of zt.values()){const It=me.get(St);It&&(It.selectable??Kt)&&V.current.add(St)}}if(!Fp(ln,D.current)){const pt=ro(ve,D.current,!0);Me(pt)}if(!Fp(qt,V.current)){const pt=ro(me,V.current);Ie(pt)}E.setState({userSelectionRect:ot,userSelectionActive:!0,nodesSelectionActive:!1})}function T(){if(!a||!ee.current)return;const[Z,se]=kc(z.current,ee.current,W);A({x:Z,y:se}).then(ge=>{if(!J.current||!ge){S.current=requestAnimationFrame(T);return}const{x:we,y:ve}=z.current;b(we,ve),S.current=requestAnimationFrame(T)})}const te=()=>{cancelAnimationFrame(S.current),S.current=0,Y.current=!1};B.useEffect(()=>()=>te(),[]);const oe=Z=>{const{userSelectionRect:se,transform:ge,resetSelectedElements:we}=E.getState();if(!ee.current||!se)return;const{x:ve,y:me}=Xt(Z.nativeEvent,ee.current);z.current={x:ve,y:me};const Ee=po({x:se.startX,y:se.startY},ge);if(!J.current){const Me=r?0:u;if(Math.hypot(ve-Ee.x,me-Ee.y)<=Me)return;we(),f==null||f(Z)}J.current=!0,Y.current||(T(),Y.current=!0),b(ve,me)},ae=Z=>{var se,ge;Z.button===0&&((ge=(se=Z.target)==null?void 0:se.releasePointerCapture)==null||ge.call(se,Z.pointerId),!I&&Z.target===q.current&&E.getState().userSelectionRect&&(O==null||O(Z)),E.setState({userSelectionActive:!1,userSelectionRect:null}),J.current&&(h==null||h(Z),E.setState({nodesSelectionActive:D.current.size>0})),te())},ce=Z=>{var se,ge;(ge=(se=Z.target)==null?void 0:se.releasePointerCapture)==null||ge.call(se,Z.pointerId),te()},ue=s===!0||Array.isArray(s)&&s.includes(0);return k.jsxs("div",{className:Xe(["react-flow__pane",{draggable:ue,dragging:M,selection:t}]),onClick:G?void 0:Yu(O,q),onContextMenu:Yu(U,q),onWheel:Yu(L,q),onPointerEnter:G?void 0:y,onPointerMove:G?oe:w,onPointerUp:G?ae:void 0,onPointerCancel:G?ce:void 0,onPointerDownCapture:G?H:void 0,onClickCapture:G?j:void 0,onPointerLeave:_,ref:q,style:Rl,children:[C,k.jsx(ik,{})]})}function dc({id:t,store:r,unselect:i=!1,nodeRef:s}){const{addSelectedNodes:a,unselectNodesAndEdges:u,multiSelectionActive:c,nodeLookup:f,onError:h}=r.getState(),m=f.get(t);if(!m){h==null||h("012",Gt.error012(t));return}r.setState({nodesSelectionActive:!1}),m.selected?(i||m.selected&&c)&&(u({nodes:[m],edges:[]}),requestAnimationFrame(()=>{var v;return(v=s==null?void 0:s.current)==null?void 0:v.blur()})):a([t])}function am({nodeRef:t,disabled:r=!1,noDragClassName:i,handleSelector:s,nodeId:a,isSelectable:u,nodeClickDistance:c}){const f=Fe(),[h,m]=B.useState(!1),v=B.useRef();return B.useEffect(()=>{v.current=U2({getStoreItems:()=>f.getState(),onNodeMouseDown:g=>{dc({id:g,store:f,nodeRef:t})},onDragStart:()=>{m(!0)},onDragStop:()=>{m(!1)}})},[]),B.useEffect(()=>{if(!(r||!t.current||!v.current))return v.current.update({noDragClassName:i,handleSelector:s,domNode:t.current,isSelectable:u,nodeId:a,nodeClickDistance:c}),()=>{var g;(g=v.current)==null||g.destroy()}},[i,s,r,u,t,a,c]),h}const ak=t=>r=>r.selected&&(r.draggable||t&&typeof r.draggable>"u");function um(){const t=Fe();return B.useCallback(i=>{const{nodeExtent:s,snapToGrid:a,snapGrid:u,nodesDraggable:c,onError:f,updateNodePositions:h,nodeLookup:m,nodeOrigin:v}=t.getState(),g=new Map,y=ak(c),w=a?u[0]:5,_=a?u[1]:5,C=i.direction.x*w*i.factor,S=i.direction.y*_*i.factor;for(const[,E]of m){if(!y(E))continue;let I={x:E.internals.positionAbsolute.x+C,y:E.internals.positionAbsolute.y+S};a&&(I=zi(I,u));const{position:N,positionAbsolute:M}=zg({nodeId:E.id,nextPosition:I,nodeLookup:m,nodeExtent:s,nodeOrigin:v,onError:f});E.position=N,E.internals.positionAbsolute=M,g.set(E.id,E)}h(g)},[])}const Ic=B.createContext(null),uk=Ic.Provider;Ic.Consumer;const cm=()=>B.useContext(Ic),ck=t=>({connectOnClick:t.connectOnClick,noPanClassName:t.noPanClassName,rfId:t.rfId}),dk=(t,r,i)=>s=>{const{connectionClickStartHandle:a,connectionMode:u,connection:c}=s,{fromHandle:f,toHandle:h,isValid:m}=c,v=(h==null?void 0:h.nodeId)===t&&(h==null?void 0:h.id)===r&&(h==null?void 0:h.type)===i;return{connectingFrom:(f==null?void 0:f.nodeId)===t&&(f==null?void 0:f.id)===r&&(f==null?void 0:f.type)===i,connectingTo:v,clickConnecting:(a==null?void 0:a.nodeId)===t&&(a==null?void 0:a.id)===r&&(a==null?void 0:a.type)===i,isPossibleEndHandle:u===uo.Strict?(f==null?void 0:f.type)!==i:t!==(f==null?void 0:f.nodeId)||r!==(f==null?void 0:f.id),connectionInProcess:!!f,clickConnectionInProcess:!!a,valid:v&&m}};function fk({type:t="source",position:r=xe.Top,isValidConnection:i,isConnectable:s=!0,isConnectableStart:a=!0,isConnectableEnd:u=!0,id:c,onConnect:f,children:h,className:m,onMouseDown:v,onTouchStart:g,...y},w){var Y,O;const _=c||null,C=t==="target",S=Fe(),E=cm(),{connectOnClick:I,noPanClassName:N,rfId:M}=be(ck,Oe),{connectingFrom:F,connectingTo:A,clickConnecting:W,isPossibleEndHandle:G,connectionInProcess:q,clickConnectionInProcess:ee,valid:D}=be(dk(E,_,t),Oe);E||(O=(Y=S.getState()).onError)==null||O.call(Y,"010",Gt.error010());const V=U=>{const{defaultEdgeOptions:L,onConnect:j,hasDefaultEdges:H}=S.getState(),b={...L,...U};if(H){const{edges:T,setEdges:te,onError:oe}=S.getState();te(YS(b,T,{onError:oe}))}j==null||j(b),f==null||f(b)},J=U=>{if(!E)return;const L=Dg(U.nativeEvent);if(a&&(L&&U.button===0||!L)){const j=S.getState();cc.onPointerDown(U.nativeEvent,{handleDomNode:U.currentTarget,autoPanOnConnect:j.autoPanOnConnect,connectionMode:j.connectionMode,connectionRadius:j.connectionRadius,domNode:j.domNode,nodeLookup:j.nodeLookup,lib:j.lib,isTarget:C,handleId:_,nodeId:E,flowId:j.rfId,panBy:j.panBy,cancelConnection:j.cancelConnection,onConnectStart:j.onConnectStart,onConnectEnd:(...H)=>{var b,T;return(T=(b=S.getState()).onConnectEnd)==null?void 0:T.call(b,...H)},updateConnection:j.updateConnection,onConnect:V,isValidConnection:i||((...H)=>{var b,T;return((T=(b=S.getState()).isValidConnection)==null?void 0:T.call(b,...H))??!0}),getTransform:()=>S.getState().transform,getFromHandle:()=>S.getState().connection.fromHandle,autoPanSpeed:j.autoPanSpeed,dragThreshold:j.connectionDragThreshold})}L?v==null||v(U):g==null||g(U)},z=U=>{const{onClickConnectStart:L,onClickConnectEnd:j,connectionClickStartHandle:H,connectionMode:b,isValidConnection:T,lib:te,rfId:oe,nodeLookup:ae,connection:ce}=S.getState();if(!E||!H&&!a)return;if(!H){L==null||L(U.nativeEvent,{nodeId:E,handleId:_,handleType:t}),S.setState({connectionClickStartHandle:{nodeId:E,type:t,id:_}});return}const ue=Ag(U.target),Z=i||T,{connection:se,isValid:ge}=cc.isValid(U.nativeEvent,{handle:{nodeId:E,id:_,type:t},connectionMode:b,fromNodeId:H.nodeId,fromHandleId:H.id||null,fromType:H.type,isValidConnection:Z,flowId:oe,doc:ue,lib:te,nodeLookup:ae});ge&&se&&V(se);const we=structuredClone(ce);delete we.inProgress,we.toPosition=we.toHandle?we.toHandle.position:null,j==null||j(U,we),S.setState({connectionClickStartHandle:null})};return k.jsx("div",{"data-handleid":_,"data-nodeid":E,"data-handlepos":r,"data-id":`${M}-${E}-${_}-${t}`,className:Xe(["react-flow__handle",`react-flow__handle-${r}`,"nodrag",N,m,{source:!C,target:C,connectable:s,connectablestart:a,connectableend:u,clickconnecting:W,connectingfrom:F,connectingto:A,valid:D,connectionindicator:s&&(!q||G)&&(q||ee?u:a)}]),onMouseDown:J,onTouchStart:J,onClick:I?z:void 0,ref:w,...y,children:h})}const kl=B.memo(sm(fk));function pk({data:t,isConnectable:r,sourcePosition:i=xe.Bottom}){return k.jsxs(k.Fragment,{children:[t==null?void 0:t.label,k.jsx(kl,{type:"source",position:i,isConnectable:r})]})}function hk({data:t,isConnectable:r,targetPosition:i=xe.Top,sourcePosition:s=xe.Bottom}){return k.jsxs(k.Fragment,{children:[k.jsx(kl,{type:"target",position:i,isConnectable:r}),t==null?void 0:t.label,k.jsx(kl,{type:"source",position:s,isConnectable:r})]})}function gk(){return null}function mk({data:t,isConnectable:r,targetPosition:i=xe.Top}){return k.jsxs(k.Fragment,{children:[k.jsx(kl,{type:"target",position:i,isConnectable:r}),t==null?void 0:t.label]})}const _l={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},mh={input:pk,default:hk,output:mk,group:gk};function yk(t){var r,i,s,a;return t.internals.handleBounds===void 0?{width:t.width??t.initialWidth??((r=t.style)==null?void 0:r.width),height:t.height??t.initialHeight??((i=t.style)==null?void 0:i.height)}:{width:t.width??((s=t.style)==null?void 0:s.width),height:t.height??((a=t.style)==null?void 0:a.height)}}const vk=t=>{const{width:r,height:i,x:s,y:a}=Pi(t.nodeLookup,{filter:u=>!!u.selected});return{width:Yt(r)?r:null,height:Yt(i)?i:null,userSelectionActive:t.userSelectionActive,transformString:`translate(${t.transform[0]}px,${t.transform[1]}px) scale(${t.transform[2]}) translate(${s}px,${a}px)`}};function xk({onSelectionContextMenu:t,noPanClassName:r,disableKeyboardA11y:i}){const s=Fe(),{width:a,height:u,transformString:c,userSelectionActive:f}=be(vk,Oe),h=um(),m=B.useRef(null);B.useEffect(()=>{var w;i||(w=m.current)==null||w.focus({preventScroll:!0})},[i]);const v=!f&&a!==null&&u!==null;if(am({nodeRef:m,disabled:!v}),!v)return null;const g=t?w=>{const _=s.getState().nodes.filter(C=>C.selected);t(w,_)}:void 0,y=w=>{Object.prototype.hasOwnProperty.call(_l,w.key)&&(w.preventDefault(),h({direction:_l[w.key],factor:w.shiftKey?4:1}))};return k.jsx("div",{className:Xe(["react-flow__nodesselection","react-flow__container",r]),style:{transform:c},children:k.jsx("div",{ref:m,className:"react-flow__nodesselection-rect",onContextMenu:g,tabIndex:i?void 0:-1,onKeyDown:i?void 0:y,style:{width:a,height:u}})})}const yh=typeof window<"u"?window:void 0,wk=t=>({nodesSelectionActive:t.nodesSelectionActive,userSelectionActive:t.userSelectionActive});function dm({children:t,onPaneClick:r,onPaneMouseEnter:i,onPaneMouseMove:s,onPaneMouseLeave:a,onPaneContextMenu:u,onPaneScroll:c,paneClickDistance:f,deleteKeyCode:h,selectionKeyCode:m,selectionOnDrag:v,selectionMode:g,onSelectionStart:y,onSelectionEnd:w,multiSelectionKeyCode:_,panActivationKeyCode:C,zoomActivationKeyCode:S,elementsSelectable:E,zoomOnScroll:I,zoomOnPinch:N,panOnScroll:M,panOnScrollSpeed:F,panOnScrollMode:A,zoomOnDoubleClick:W,panOnDrag:G,autoPanOnSelection:q,defaultViewport:ee,translateExtent:D,minZoom:V,maxZoom:J,preventScrolling:z,onSelectionContextMenu:Y,noWheelClassName:O,noPanClassName:U,disableKeyboardA11y:L,onViewportChange:j,isControlledViewport:H}){const{nodesSelectionActive:b,userSelectionActive:T}=be(wk,Oe),te=Ei(m,{target:yh}),oe=Ei(C,{target:yh}),ae=oe||G,ce=oe||M,ue=v&&ae!==!0,Z=te||T||ue;return ek({deleteKeyCode:h,multiSelectionKeyCode:_}),k.jsx(rk,{onPaneContextMenu:u,elementsSelectable:E,zoomOnScroll:I,zoomOnPinch:N,panOnScroll:ce,panOnScrollSpeed:F,panOnScrollMode:A,zoomOnDoubleClick:W,panOnDrag:!te&&ae,defaultViewport:ee,translateExtent:D,minZoom:V,maxZoom:J,zoomActivationKeyCode:S,preventScrolling:z,noWheelClassName:O,noPanClassName:U,onViewportChange:j,isControlledViewport:H,paneClickDistance:f,selectionOnDrag:ue,children:k.jsxs(lk,{onSelectionStart:y,onSelectionEnd:w,onPaneClick:r,onPaneMouseEnter:i,onPaneMouseMove:s,onPaneMouseLeave:a,onPaneContextMenu:u,onPaneScroll:c,panOnDrag:ae,autoPanOnSelection:q,isSelecting:!!Z,selectionMode:g,selectionKeyPressed:te,paneClickDistance:f,selectionOnDrag:ue,children:[t,b&&k.jsx(xk,{onSelectionContextMenu:Y,noPanClassName:U,disableKeyboardA11y:L})]})})}dm.displayName="FlowRenderer";const Sk=B.memo(dm),kk=t=>r=>t?Sc(r.nodeLookup,{x:0,y:0,width:r.width,height:r.height},r.transform,!0).map(i=>i.id):Array.from(r.nodeLookup.keys());function _k(t){return be(B.useCallback(kk(t),[t]),Oe)}const Ek=t=>t.updateNodeInternals;function Nk(){const t=be(Ek),[r]=B.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(i=>{const s=new Map;i.forEach(a=>{const u=a.target.getAttribute("data-id");s.set(u,{id:u,nodeElement:a.target,force:!0})}),t(s)}));return B.useEffect(()=>()=>{r==null||r.disconnect()},[r]),r}function Ck({node:t,nodeType:r,hasDimensions:i,resizeObserver:s}){const a=Fe(),u=B.useRef(null),c=B.useRef(null),f=B.useRef(t.sourcePosition),h=B.useRef(t.targetPosition),m=B.useRef(r),v=i&&!!t.internals.handleBounds;return B.useEffect(()=>{u.current&&!t.hidden&&(!v||c.current!==u.current)&&(c.current&&(s==null||s.unobserve(c.current)),s==null||s.observe(u.current),c.current=u.current)},[v,t.hidden]),B.useEffect(()=>()=>{c.current&&(s==null||s.unobserve(c.current),c.current=null)},[]),B.useEffect(()=>{if(u.current){const g=m.current!==r,y=f.current!==t.sourcePosition,w=h.current!==t.targetPosition;(g||y||w)&&(m.current=r,f.current=t.sourcePosition,h.current=t.targetPosition,a.getState().updateNodeInternals(new Map([[t.id,{id:t.id,nodeElement:u.current,force:!0}]])))}},[t.id,r,t.sourcePosition,t.targetPosition]),u}function bk({id:t,onClick:r,onMouseEnter:i,onMouseMove:s,onMouseLeave:a,onContextMenu:u,onDoubleClick:c,nodesDraggable:f,elementsSelectable:h,nodesConnectable:m,nodesFocusable:v,resizeObserver:g,noDragClassName:y,noPanClassName:w,disableKeyboardA11y:_,rfId:C,nodeTypes:S,nodeClickDistance:E,onError:I}){const{node:N,internals:M,isParent:F}=be(Z=>{const se=Z.nodeLookup.get(t),ge=Z.parentLookup.has(t);return{node:se,internals:se.internals,isParent:ge}},Oe);let A=N.type||"default",W=(S==null?void 0:S[A])||mh[A];W===void 0&&(I==null||I("003",Gt.error003(A)),A="default",W=(S==null?void 0:S.default)||mh.default);const G=!!(N.draggable||f&&typeof N.draggable>"u"),q=!!(N.selectable||h&&typeof N.selectable>"u"),ee=!!(N.connectable||m&&typeof N.connectable>"u"),D=!!(N.focusable||v&&typeof N.focusable>"u"),V=Fe(),J=Rg(N),z=Ck({node:N,nodeType:A,hasDimensions:J,resizeObserver:g}),Y=am({nodeRef:z,disabled:N.hidden||!G,noDragClassName:y,handleSelector:N.dragHandle,nodeId:t,isSelectable:q,nodeClickDistance:E}),O=um();if(N.hidden)return null;const U=_n(N),L=yk(N),j=q||G||r||i||s||a,H=i?Z=>i(Z,{...M.userNode}):void 0,b=s?Z=>s(Z,{...M.userNode}):void 0,T=a?Z=>a(Z,{...M.userNode}):void 0,te=u?Z=>u(Z,{...M.userNode}):void 0,oe=c?Z=>c(Z,{...M.userNode}):void 0,ae=Z=>{const{selectNodesOnDrag:se,nodeDragThreshold:ge}=V.getState();q&&(!se||!G||ge>0)&&dc({id:t,store:V,nodeRef:z}),r&&r(Z,{...M.userNode})},ce=Z=>{if(!($g(Z.nativeEvent)||_)){if(Ng.includes(Z.key)&&q){const se=Z.key==="Escape";dc({id:t,store:V,unselect:se,nodeRef:z})}else if(G&&N.selected&&Object.prototype.hasOwnProperty.call(_l,Z.key)){Z.preventDefault();const{ariaLabelConfig:se}=V.getState();V.setState({ariaLiveMessage:se["node.a11yDescription.ariaLiveMessage"]({direction:Z.key.replace("Arrow","").toLowerCase(),x:~~M.positionAbsolute.x,y:~~M.positionAbsolute.y})}),O({direction:_l[Z.key],factor:Z.shiftKey?4:1})}}},ue=()=>{var Ee;if(_||!((Ee=z.current)!=null&&Ee.matches(":focus-visible")))return;const{transform:Z,width:se,height:ge,autoPanOnNodeFocus:we,setCenter:ve}=V.getState();if(!we)return;Sc(new Map([[t,N]]),{x:0,y:0,width:se,height:ge},Z,!0).length>0||ve(N.position.x+U.width/2,N.position.y+U.height/2,{zoom:Z[2]})};return k.jsx("div",{className:Xe(["react-flow__node",`react-flow__node-${A}`,{[w]:G},N.className,{selected:N.selected,selectable:q,parent:F,draggable:G,dragging:Y}]),ref:z,style:{zIndex:M.z,transform:`translate(${M.positionAbsolute.x}px,${M.positionAbsolute.y}px)`,pointerEvents:j?"all":"none",visibility:J?"visible":"hidden",...N.style,...L},"data-id":t,"data-testid":`rf__node-${t}`,onMouseEnter:H,onMouseMove:b,onMouseLeave:T,onContextMenu:te,onClick:ae,onDoubleClick:oe,onKeyDown:D?ce:void 0,tabIndex:D?0:void 0,onFocus:D?ue:void 0,role:N.ariaRole??(D?"group":void 0),"aria-roledescription":"node","aria-describedby":_?void 0:`${nm}-${C}`,"aria-label":N.ariaLabel,...N.domAttributes,children:k.jsx(uk,{value:t,children:k.jsx(W,{id:t,data:N.data,type:A,positionAbsoluteX:M.positionAbsolute.x,positionAbsoluteY:M.positionAbsolute.y,selected:N.selected??!1,selectable:q,draggable:G,deletable:N.deletable??!0,isConnectable:ee,sourcePosition:N.sourcePosition,targetPosition:N.targetPosition,dragging:Y,dragHandle:N.dragHandle,zIndex:M.z,parentId:N.parentId,...U})})})}var Mk=B.memo(bk);const Pk=t=>({nodesDraggable:t.nodesDraggable,nodesConnectable:t.nodesConnectable,nodesFocusable:t.nodesFocusable,elementsSelectable:t.elementsSelectable,onError:t.onError});function fm(t){const{nodesDraggable:r,nodesConnectable:i,nodesFocusable:s,elementsSelectable:a,onError:u}=be(Pk,Oe),c=_k(t.onlyRenderVisibleElements),f=Nk();return k.jsx("div",{className:"react-flow__nodes",style:Rl,children:c.map(h=>k.jsx(Mk,{id:h,nodeTypes:t.nodeTypes,nodeExtent:t.nodeExtent,onClick:t.onNodeClick,onMouseEnter:t.onNodeMouseEnter,onMouseMove:t.onNodeMouseMove,onMouseLeave:t.onNodeMouseLeave,onContextMenu:t.onNodeContextMenu,onDoubleClick:t.onNodeDoubleClick,noDragClassName:t.noDragClassName,noPanClassName:t.noPanClassName,rfId:t.rfId,disableKeyboardA11y:t.disableKeyboardA11y,resizeObserver:f,nodesDraggable:r,nodesConnectable:i,nodesFocusable:s,elementsSelectable:a,nodeClickDistance:t.nodeClickDistance,onError:u},h))})}fm.displayName="NodeRenderer";const zk=B.memo(fm);function Ik(t){return be(B.useCallback(i=>{if(!t)return i.edges.map(a=>a.id);const s=[];if(i.width&&i.height)for(const a of i.edges){const u=i.nodeLookup.get(a.source),c=i.nodeLookup.get(a.target);u&&c&&C2({sourceNode:u,targetNode:c,width:i.width,height:i.height,transform:i.transform})&&s.push(a.id)}return s},[t]),Oe)}const jk=({color:t="none",strokeWidth:r=1})=>{const i={strokeWidth:r,...t&&{stroke:t}};return k.jsx("polyline",{className:"arrow",style:i,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},Tk=({color:t="none",strokeWidth:r=1})=>{const i={strokeWidth:r,...t&&{stroke:t,fill:t}};return k.jsx("polyline",{className:"arrowclosed",style:i,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},vh={[wl.Arrow]:jk,[wl.ArrowClosed]:Tk};function Rk(t){const r=Fe();return B.useMemo(()=>{var a,u;return Object.prototype.hasOwnProperty.call(vh,t)?vh[t]:((u=(a=r.getState()).onError)==null||u.call(a,"009",Gt.error009(t)),null)},[t])}const Lk=({id:t,type:r,color:i,width:s=12.5,height:a=12.5,markerUnits:u="strokeWidth",strokeWidth:c,orient:f="auto-start-reverse"})=>{const h=Rk(r);return h?k.jsx("marker",{className:"react-flow__arrowhead",id:t,markerWidth:`${s}`,markerHeight:`${a}`,viewBox:"-10 -10 20 20",markerUnits:u,orient:f,refX:"0",refY:"0",children:k.jsx(h,{color:i,strokeWidth:c})}):null},pm=({defaultColor:t,rfId:r})=>{const i=be(u=>u.edges),s=be(u=>u.defaultEdgeOptions),a=B.useMemo(()=>R2(i,{id:r,defaultColor:t,defaultMarkerStart:s==null?void 0:s.markerStart,defaultMarkerEnd:s==null?void 0:s.markerEnd}),[i,s,r,t]);return a.length?k.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:k.jsx("defs",{children:a.map(u=>k.jsx(Lk,{id:u.id,type:u.type,color:u.color,width:u.width,height:u.height,markerUnits:u.markerUnits,strokeWidth:u.strokeWidth,orient:u.orient},u.id))})}):null};pm.displayName="MarkerDefinitions";var Ak=B.memo(pm);function hm({x:t,y:r,label:i,labelStyle:s,labelShowBg:a=!0,labelBgStyle:u,labelBgPadding:c=[2,4],labelBgBorderRadius:f=2,children:h,className:m,...v}){const[g,y]=B.useState({x:1,y:0,width:0,height:0}),w=Xe(["react-flow__edge-textwrapper",m]),_=B.useRef(null);return B.useEffect(()=>{if(_.current){const C=_.current.getBBox();y({x:C.x,y:C.y,width:C.width,height:C.height})}},[i]),i?k.jsxs("g",{transform:`translate(${t-g.width/2} ${r-g.height/2})`,className:w,visibility:g.width?"visible":"hidden",...v,children:[a&&k.jsx("rect",{width:g.width+2*c[0],x:-c[0],y:-c[1],height:g.height+2*c[1],className:"react-flow__edge-textbg",style:u,rx:f,ry:f}),k.jsx("text",{className:"react-flow__edge-text",y:g.height/2,dy:"0.3em",ref:_,style:s,children:i}),h]}):null}hm.displayName="EdgeText";const $k=B.memo(hm);function Ll({path:t,labelX:r,labelY:i,label:s,labelStyle:a,labelShowBg:u,labelBgStyle:c,labelBgPadding:f,labelBgBorderRadius:h,interactionWidth:m=20,...v}){return k.jsxs(k.Fragment,{children:[k.jsx("path",{...v,d:t,fill:"none",className:Xe(["react-flow__edge-path",v.className])}),m?k.jsx("path",{d:t,fill:"none",strokeOpacity:0,strokeWidth:m,className:"react-flow__edge-interaction"}):null,s&&Yt(r)&&Yt(i)?k.jsx($k,{x:r,y:i,label:s,labelStyle:a,labelShowBg:u,labelBgStyle:c,labelBgPadding:f,labelBgBorderRadius:h}):null]})}function xh({pos:t,x1:r,y1:i,x2:s,y2:a}){return t===xe.Left||t===xe.Right?[.5*(r+s),i]:[r,.5*(i+a)]}function gm({sourceX:t,sourceY:r,sourcePosition:i=xe.Bottom,targetX:s,targetY:a,targetPosition:u=xe.Top}){const[c,f]=xh({pos:i,x1:t,y1:r,x2:s,y2:a}),[h,m]=xh({pos:u,x1:s,y1:a,x2:t,y2:r}),[v,g,y,w]=Og({sourceX:t,sourceY:r,targetX:s,targetY:a,sourceControlX:c,sourceControlY:f,targetControlX:h,targetControlY:m});return[`M${t},${r} C${c},${f} ${h},${m} ${s},${a}`,v,g,y,w]}function mm(t){return B.memo(({id:r,sourceX:i,sourceY:s,targetX:a,targetY:u,sourcePosition:c,targetPosition:f,label:h,labelStyle:m,labelShowBg:v,labelBgStyle:g,labelBgPadding:y,labelBgBorderRadius:w,style:_,markerEnd:C,markerStart:S,interactionWidth:E})=>{const[I,N,M]=gm({sourceX:i,sourceY:s,sourcePosition:c,targetX:a,targetY:u,targetPosition:f}),F=t.isInternal?void 0:r;return k.jsx(Ll,{id:F,path:I,labelX:N,labelY:M,label:h,labelStyle:m,labelShowBg:v,labelBgStyle:g,labelBgPadding:y,labelBgBorderRadius:w,style:_,markerEnd:C,markerStart:S,interactionWidth:E})})}const Dk=mm({isInternal:!1}),ym=mm({isInternal:!0});Dk.displayName="SimpleBezierEdge";ym.displayName="SimpleBezierEdgeInternal";function vm(t){return B.memo(({id:r,sourceX:i,sourceY:s,targetX:a,targetY:u,label:c,labelStyle:f,labelShowBg:h,labelBgStyle:m,labelBgPadding:v,labelBgBorderRadius:g,style:y,sourcePosition:w=xe.Bottom,targetPosition:_=xe.Top,markerEnd:C,markerStart:S,pathOptions:E,interactionWidth:I})=>{const[N,M,F]=lc({sourceX:i,sourceY:s,sourcePosition:w,targetX:a,targetY:u,targetPosition:_,borderRadius:E==null?void 0:E.borderRadius,offset:E==null?void 0:E.offset,stepPosition:E==null?void 0:E.stepPosition}),A=t.isInternal?void 0:r;return k.jsx(Ll,{id:A,path:N,labelX:M,labelY:F,label:c,labelStyle:f,labelShowBg:h,labelBgStyle:m,labelBgPadding:v,labelBgBorderRadius:g,style:y,markerEnd:C,markerStart:S,interactionWidth:I})})}const xm=vm({isInternal:!1}),wm=vm({isInternal:!0});xm.displayName="SmoothStepEdge";wm.displayName="SmoothStepEdgeInternal";function Sm(t){return B.memo(({id:r,...i})=>{var a;const s=t.isInternal?void 0:r;return k.jsx(xm,{...i,id:s,pathOptions:B.useMemo(()=>{var u;return{borderRadius:0,offset:(u=i.pathOptions)==null?void 0:u.offset}},[(a=i.pathOptions)==null?void 0:a.offset])})})}const Ok=Sm({isInternal:!1}),km=Sm({isInternal:!0});Ok.displayName="StepEdge";km.displayName="StepEdgeInternal";function _m(t){return B.memo(({id:r,sourceX:i,sourceY:s,targetX:a,targetY:u,label:c,labelStyle:f,labelShowBg:h,labelBgStyle:m,labelBgPadding:v,labelBgBorderRadius:g,style:y,markerEnd:w,markerStart:_,interactionWidth:C})=>{const[S,E,I]=Hg({sourceX:i,sourceY:s,targetX:a,targetY:u}),N=t.isInternal?void 0:r;return k.jsx(Ll,{id:N,path:S,labelX:E,labelY:I,label:c,labelStyle:f,labelShowBg:h,labelBgStyle:m,labelBgPadding:v,labelBgBorderRadius:g,style:y,markerEnd:w,markerStart:_,interactionWidth:C})})}const Fk=_m({isInternal:!1}),Em=_m({isInternal:!0});Fk.displayName="StraightEdge";Em.displayName="StraightEdgeInternal";function Nm(t){return B.memo(({id:r,sourceX:i,sourceY:s,targetX:a,targetY:u,sourcePosition:c=xe.Bottom,targetPosition:f=xe.Top,label:h,labelStyle:m,labelShowBg:v,labelBgStyle:g,labelBgPadding:y,labelBgBorderRadius:w,style:_,markerEnd:C,markerStart:S,pathOptions:E,interactionWidth:I})=>{const[N,M,F]=Fg({sourceX:i,sourceY:s,sourcePosition:c,targetX:a,targetY:u,targetPosition:f,curvature:E==null?void 0:E.curvature}),A=t.isInternal?void 0:r;return k.jsx(Ll,{id:A,path:N,labelX:M,labelY:F,label:h,labelStyle:m,labelShowBg:v,labelBgStyle:g,labelBgPadding:y,labelBgBorderRadius:w,style:_,markerEnd:C,markerStart:S,interactionWidth:I})})}const Vk=Nm({isInternal:!1}),Cm=Nm({isInternal:!0});Vk.displayName="BezierEdge";Cm.displayName="BezierEdgeInternal";const wh={default:Cm,straight:Em,step:km,smoothstep:wm,simplebezier:ym},Sh={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},Hk=(t,r,i)=>i===xe.Left?t-r:i===xe.Right?t+r:t,Bk=(t,r,i)=>i===xe.Top?t-r:i===xe.Bottom?t+r:t,kh="react-flow__edgeupdater";function _h({position:t,centerX:r,centerY:i,radius:s=10,onMouseDown:a,onMouseEnter:u,onMouseOut:c,type:f}){return k.jsx("circle",{onMouseDown:a,onMouseEnter:u,onMouseOut:c,className:Xe([kh,`${kh}-${f}`]),cx:Hk(r,s,t),cy:Bk(i,s,t),r:s,stroke:"transparent",fill:"transparent"})}function Wk({isReconnectable:t,reconnectRadius:r,edge:i,sourceX:s,sourceY:a,targetX:u,targetY:c,sourcePosition:f,targetPosition:h,onReconnect:m,onReconnectStart:v,onReconnectEnd:g,setReconnecting:y,setUpdateHover:w}){const _=Fe(),C=(M,F)=>{if(M.button!==0)return;const{autoPanOnConnect:A,domNode:W,connectionMode:G,connectionRadius:q,lib:ee,onConnectStart:D,cancelConnection:V,nodeLookup:J,rfId:z,panBy:Y,updateConnection:O}=_.getState(),U=F.type==="target",L=(b,T)=>{y(!1),g==null||g(b,i,F.type,T)},j=b=>m==null?void 0:m(i,b),H=(b,T)=>{y(!0),v==null||v(M,i,F.type),D==null||D(b,T)};cc.onPointerDown(M.nativeEvent,{autoPanOnConnect:A,connectionMode:G,connectionRadius:q,domNode:W,handleId:F.id,nodeId:F.nodeId,nodeLookup:J,isTarget:U,edgeUpdaterType:F.type,lib:ee,flowId:z,cancelConnection:V,panBy:Y,isValidConnection:(...b)=>{var T,te;return((te=(T=_.getState()).isValidConnection)==null?void 0:te.call(T,...b))??!0},onConnect:j,onConnectStart:H,onConnectEnd:(...b)=>{var T,te;return(te=(T=_.getState()).onConnectEnd)==null?void 0:te.call(T,...b)},onReconnectEnd:L,updateConnection:O,getTransform:()=>_.getState().transform,getFromHandle:()=>_.getState().connection.fromHandle,dragThreshold:_.getState().connectionDragThreshold,handleDomNode:M.currentTarget})},S=M=>C(M,{nodeId:i.target,id:i.targetHandle??null,type:"target"}),E=M=>C(M,{nodeId:i.source,id:i.sourceHandle??null,type:"source"}),I=()=>w(!0),N=()=>w(!1);return k.jsxs(k.Fragment,{children:[(t===!0||t==="source")&&k.jsx(_h,{position:f,centerX:s,centerY:a,radius:r,onMouseDown:S,onMouseEnter:I,onMouseOut:N,type:"source"}),(t===!0||t==="target")&&k.jsx(_h,{position:h,centerX:u,centerY:c,radius:r,onMouseDown:E,onMouseEnter:I,onMouseOut:N,type:"target"})]})}function Uk({id:t,edgesFocusable:r,edgesReconnectable:i,elementsSelectable:s,onClick:a,onDoubleClick:u,onContextMenu:c,onMouseEnter:f,onMouseMove:h,onMouseLeave:m,reconnectRadius:v,onReconnect:g,onReconnectStart:y,onReconnectEnd:w,rfId:_,edgeTypes:C,noPanClassName:S,onError:E,disableKeyboardA11y:I}){let N=be(ve=>ve.edgeLookup.get(t));const M=be(ve=>ve.defaultEdgeOptions);N=M?{...M,...N}:N;let F=N.type||"default",A=(C==null?void 0:C[F])||wh[F];A===void 0&&(E==null||E("011",Gt.error011(F)),F="default",A=(C==null?void 0:C.default)||wh.default);const W=!!(N.focusable||r&&typeof N.focusable>"u"),G=typeof g<"u"&&(N.reconnectable||i&&typeof N.reconnectable>"u"),q=!!(N.selectable||s&&typeof N.selectable>"u"),ee=B.useRef(null),[D,V]=B.useState(!1),[J,z]=B.useState(!1),Y=Fe(),{zIndex:O,sourceX:U,sourceY:L,targetX:j,targetY:H,sourcePosition:b,targetPosition:T}=be(B.useCallback(ve=>{const me=ve.nodeLookup.get(N.source),Ee=ve.nodeLookup.get(N.target);if(!me||!Ee)return{zIndex:N.zIndex,...Sh};const Me=T2({id:t,sourceNode:me,targetNode:Ee,sourceHandle:N.sourceHandle||null,targetHandle:N.targetHandle||null,connectionMode:ve.connectionMode,onError:E});return{zIndex:N2({selected:N.selected,zIndex:N.zIndex,sourceNode:me,targetNode:Ee,elevateOnSelect:ve.elevateEdgesOnSelect,zIndexMode:ve.zIndexMode}),...Me||Sh}},[N.source,N.target,N.sourceHandle,N.targetHandle,N.selected,N.zIndex]),Oe),te=B.useMemo(()=>N.markerStart?`url('#${ac(N.markerStart,_)}')`:void 0,[N.markerStart,_]),oe=B.useMemo(()=>N.markerEnd?`url('#${ac(N.markerEnd,_)}')`:void 0,[N.markerEnd,_]);if(N.hidden||U===null||L===null||j===null||H===null)return null;const ae=ve=>{var Ie;const{addSelectedEdges:me,unselectNodesAndEdges:Ee,multiSelectionActive:Me}=Y.getState();q&&(Y.setState({nodesSelectionActive:!1}),N.selected&&Me?(Ee({nodes:[],edges:[N]}),(Ie=ee.current)==null||Ie.blur()):me([t])),a&&a(ve,N)},ce=u?ve=>{u(ve,{...N})}:void 0,ue=c?ve=>{c(ve,{...N})}:void 0,Z=f?ve=>{f(ve,{...N})}:void 0,se=h?ve=>{h(ve,{...N})}:void 0,ge=m?ve=>{m(ve,{...N})}:void 0,we=ve=>{var me;if(!I&&Ng.includes(ve.key)&&q){const{unselectNodesAndEdges:Ee,addSelectedEdges:Me}=Y.getState();ve.key==="Escape"?((me=ee.current)==null||me.blur(),Ee({edges:[N]})):Me([t])}};return k.jsx("svg",{style:{zIndex:O},children:k.jsxs("g",{className:Xe(["react-flow__edge",`react-flow__edge-${F}`,N.className,S,{selected:N.selected,animated:N.animated,inactive:!q&&!a,updating:D,selectable:q}]),onClick:ae,onDoubleClick:ce,onContextMenu:ue,onMouseEnter:Z,onMouseMove:se,onMouseLeave:ge,onKeyDown:W?we:void 0,tabIndex:W?0:void 0,role:N.ariaRole??(W?"group":"img"),"aria-roledescription":"edge","data-id":t,"data-testid":`rf__edge-${t}`,"aria-label":N.ariaLabel===null?void 0:N.ariaLabel||`Edge from ${N.source} to ${N.target}`,"aria-describedby":W?`${rm}-${_}`:void 0,ref:ee,...N.domAttributes,children:[!J&&k.jsx(A,{id:t,source:N.source,target:N.target,type:N.type,selected:N.selected,animated:N.animated,selectable:q,deletable:N.deletable??!0,label:N.label,labelStyle:N.labelStyle,labelShowBg:N.labelShowBg,labelBgStyle:N.labelBgStyle,labelBgPadding:N.labelBgPadding,labelBgBorderRadius:N.labelBgBorderRadius,sourceX:U,sourceY:L,targetX:j,targetY:H,sourcePosition:b,targetPosition:T,data:N.data,style:N.style,sourceHandleId:N.sourceHandle,targetHandleId:N.targetHandle,markerStart:te,markerEnd:oe,pathOptions:"pathOptions"in N?N.pathOptions:void 0,interactionWidth:N.interactionWidth}),G&&k.jsx(Wk,{edge:N,isReconnectable:G,reconnectRadius:v,onReconnect:g,onReconnectStart:y,onReconnectEnd:w,sourceX:U,sourceY:L,targetX:j,targetY:H,sourcePosition:b,targetPosition:T,setUpdateHover:V,setReconnecting:z})]})})}var Yk=B.memo(Uk);const Xk=t=>({edgesFocusable:t.edgesFocusable,edgesReconnectable:t.edgesReconnectable,elementsSelectable:t.elementsSelectable,connectionMode:t.connectionMode,onError:t.onError});function bm({defaultMarkerColor:t,onlyRenderVisibleElements:r,rfId:i,edgeTypes:s,noPanClassName:a,onReconnect:u,onEdgeContextMenu:c,onEdgeMouseEnter:f,onEdgeMouseMove:h,onEdgeMouseLeave:m,onEdgeClick:v,reconnectRadius:g,onEdgeDoubleClick:y,onReconnectStart:w,onReconnectEnd:_,disableKeyboardA11y:C}){const{edgesFocusable:S,edgesReconnectable:E,elementsSelectable:I,onError:N}=be(Xk,Oe),M=Ik(r);return k.jsxs("div",{className:"react-flow__edges",children:[k.jsx(Ak,{defaultColor:t,rfId:i}),M.map(F=>k.jsx(Yk,{id:F,edgesFocusable:S,edgesReconnectable:E,elementsSelectable:I,noPanClassName:a,onReconnect:u,onContextMenu:c,onMouseEnter:f,onMouseMove:h,onMouseLeave:m,onClick:v,reconnectRadius:g,onDoubleClick:y,onReconnectStart:w,onReconnectEnd:_,rfId:i,onError:N,edgeTypes:s,disableKeyboardA11y:C},F))]})}bm.displayName="EdgeRenderer";const Gk=B.memo(bm),Qk=t=>`translate(${t.transform[0]}px,${t.transform[1]}px) scale(${t.transform[2]})`;function qk({children:t}){const r=be(Qk);return k.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:r},children:t})}function Kk(t){const r=zc(),i=B.useRef(!1);B.useEffect(()=>{!i.current&&r.viewportInitialized&&t&&(setTimeout(()=>t(r),1),i.current=!0)},[t,r.viewportInitialized])}const Zk=t=>{var r;return(r=t.panZoom)==null?void 0:r.syncViewport};function Jk(t){const r=be(Zk),i=Fe();return B.useEffect(()=>{t&&(r==null||r(t),i.setState({transform:[t.x,t.y,t.zoom]}))},[t,r]),null}function e_(t){return t.connection.inProgress?{...t.connection,to:mo(t.connection.to,t.transform)}:{...t.connection}}function t_(t){return e_}function n_(t){const r=t_();return be(r,Oe)}const r_=t=>({nodesConnectable:t.nodesConnectable,isValid:t.connection.isValid,inProgress:t.connection.inProgress,width:t.width,height:t.height});function o_({containerStyle:t,style:r,type:i,component:s}){const{nodesConnectable:a,width:u,height:c,isValid:f,inProgress:h}=be(r_,Oe);return!(u&&a&&h)?null:k.jsx("svg",{style:t,width:u,height:c,className:"react-flow__connectionline react-flow__container",children:k.jsx("g",{className:Xe(["react-flow__connection",Mg(f)]),children:k.jsx(Mm,{style:r,type:i,CustomComponent:s,isValid:f})})})}const Mm=({style:t,type:r=Qn.Bezier,CustomComponent:i,isValid:s})=>{const{inProgress:a,from:u,fromNode:c,fromHandle:f,fromPosition:h,to:m,toNode:v,toHandle:g,toPosition:y,pointer:w}=n_();if(!a)return;if(i)return k.jsx(i,{connectionLineType:r,connectionLineStyle:t,fromNode:c,fromHandle:f,fromX:u.x,fromY:u.y,toX:m.x,toY:m.y,fromPosition:h,toPosition:y,connectionStatus:Mg(s),toNode:v,toHandle:g,pointer:w});let _="";const C={sourceX:u.x,sourceY:u.y,sourcePosition:h,targetX:m.x,targetY:m.y,targetPosition:y};switch(r){case Qn.Bezier:[_]=Fg(C);break;case Qn.SimpleBezier:[_]=gm(C);break;case Qn.Step:[_]=lc({...C,borderRadius:0});break;case Qn.SmoothStep:[_]=lc(C);break;default:[_]=Hg(C)}return k.jsx("path",{d:_,fill:"none",className:"react-flow__connection-path",style:t})};Mm.displayName="ConnectionLine";const i_={};function Eh(t=i_){B.useRef(t),Fe(),B.useEffect(()=>{},[t])}function s_(){Fe(),B.useRef(!1),B.useEffect(()=>{},[])}function Pm({nodeTypes:t,edgeTypes:r,onInit:i,onNodeClick:s,onEdgeClick:a,onNodeDoubleClick:u,onEdgeDoubleClick:c,onNodeMouseEnter:f,onNodeMouseMove:h,onNodeMouseLeave:m,onNodeContextMenu:v,onSelectionContextMenu:g,onSelectionStart:y,onSelectionEnd:w,connectionLineType:_,connectionLineStyle:C,connectionLineComponent:S,connectionLineContainerStyle:E,selectionKeyCode:I,selectionOnDrag:N,selectionMode:M,multiSelectionKeyCode:F,panActivationKeyCode:A,zoomActivationKeyCode:W,deleteKeyCode:G,onlyRenderVisibleElements:q,elementsSelectable:ee,defaultViewport:D,translateExtent:V,minZoom:J,maxZoom:z,preventScrolling:Y,defaultMarkerColor:O,zoomOnScroll:U,zoomOnPinch:L,panOnScroll:j,panOnScrollSpeed:H,panOnScrollMode:b,zoomOnDoubleClick:T,panOnDrag:te,autoPanOnSelection:oe,onPaneClick:ae,onPaneMouseEnter:ce,onPaneMouseMove:ue,onPaneMouseLeave:Z,onPaneScroll:se,onPaneContextMenu:ge,paneClickDistance:we,nodeClickDistance:ve,onEdgeContextMenu:me,onEdgeMouseEnter:Ee,onEdgeMouseMove:Me,onEdgeMouseLeave:Ie,reconnectRadius:Re,onReconnect:ut,onReconnectStart:ft,onReconnectEnd:rt,noDragClassName:ot,noWheelClassName:ln,noPanClassName:qt,disableKeyboardA11y:Kt,nodeExtent:pt,rfId:zt,viewport:St,onViewportChange:It}){return Eh(t),Eh(r),s_(),Kk(i),Jk(St),k.jsx(Sk,{onPaneClick:ae,onPaneMouseEnter:ce,onPaneMouseMove:ue,onPaneMouseLeave:Z,onPaneContextMenu:ge,onPaneScroll:se,paneClickDistance:we,deleteKeyCode:G,selectionKeyCode:I,selectionOnDrag:N,selectionMode:M,onSelectionStart:y,onSelectionEnd:w,multiSelectionKeyCode:F,panActivationKeyCode:A,zoomActivationKeyCode:W,elementsSelectable:ee,zoomOnScroll:U,zoomOnPinch:L,zoomOnDoubleClick:T,panOnScroll:j,panOnScrollSpeed:H,panOnScrollMode:b,panOnDrag:te,autoPanOnSelection:oe,defaultViewport:D,translateExtent:V,minZoom:J,maxZoom:z,onSelectionContextMenu:g,preventScrolling:Y,noDragClassName:ot,noWheelClassName:ln,noPanClassName:qt,disableKeyboardA11y:Kt,onViewportChange:It,isControlledViewport:!!St,children:k.jsxs(qk,{children:[k.jsx(Gk,{edgeTypes:r,onEdgeClick:a,onEdgeDoubleClick:c,onReconnect:ut,onReconnectStart:ft,onReconnectEnd:rt,onlyRenderVisibleElements:q,onEdgeContextMenu:me,onEdgeMouseEnter:Ee,onEdgeMouseMove:Me,onEdgeMouseLeave:Ie,reconnectRadius:Re,defaultMarkerColor:O,noPanClassName:qt,disableKeyboardA11y:Kt,rfId:zt}),k.jsx(o_,{style:C,type:_,component:S,containerStyle:E}),k.jsx("div",{className:"react-flow__edgelabel-renderer"}),k.jsx(zk,{nodeTypes:t,onNodeClick:s,onNodeDoubleClick:u,onNodeMouseEnter:f,onNodeMouseMove:h,onNodeMouseLeave:m,onNodeContextMenu:v,nodeClickDistance:ve,onlyRenderVisibleElements:q,noPanClassName:qt,noDragClassName:ot,disableKeyboardA11y:Kt,nodeExtent:pt,rfId:zt}),k.jsx("div",{className:"react-flow__viewport-portal"})]})})}Pm.displayName="GraphView";const l_=B.memo(Pm),a_=Tg(),Nh=({nodes:t,edges:r,defaultNodes:i,defaultEdges:s,width:a,height:u,fitView:c,fitViewOptions:f,minZoom:h=.5,maxZoom:m=2,nodeOrigin:v,nodeExtent:g,zIndexMode:y="basic"}={})=>{const w=new Map,_=new Map,C=new Map,S=new Map,E=s??r??[],I=i??t??[],N=v??[0,0],M=g??wi;Ug(C,S,E);const{nodesInitialized:F}=uc(I,w,_,{nodeOrigin:N,nodeExtent:M,zIndexMode:y});let A=[0,0,1];if(c&&a&&u){const W=Pi(w,{filter:D=>!!((D.width||D.initialWidth)&&(D.height||D.initialHeight))}),{x:G,y:q,zoom:ee}=_c(W,a,u,h,m,(f==null?void 0:f.padding)??.1);A=[G,q,ee]}return{rfId:"1",width:a??0,height:u??0,transform:A,nodes:I,nodesInitialized:F,nodeLookup:w,parentLookup:_,edges:E,edgeLookup:S,connectionLookup:C,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:i!==void 0,hasDefaultEdges:s!==void 0,panZoom:null,minZoom:h,maxZoom:m,translateExtent:wi,nodeExtent:M,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:uo.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:N,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:c??!1,fitViewOptions:f,fitViewResolver:null,connection:{...bg},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:a_,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:Cg,zIndexMode:y,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},u_=({nodes:t,edges:r,defaultNodes:i,defaultEdges:s,width:a,height:u,fitView:c,fitViewOptions:f,minZoom:h,maxZoom:m,nodeOrigin:v,nodeExtent:g,zIndexMode:y})=>kS((w,_)=>{async function C(){const{nodeLookup:S,panZoom:E,fitViewOptions:I,fitViewResolver:N,width:M,height:F,minZoom:A,maxZoom:W}=_();E&&(await v2({nodes:S,width:M,height:F,panZoom:E,minZoom:A,maxZoom:W},I),N==null||N.resolve(!0),w({fitViewResolver:null}))}return{...Nh({nodes:t,edges:r,width:a,height:u,fitView:c,fitViewOptions:f,minZoom:h,maxZoom:m,nodeOrigin:v,nodeExtent:g,defaultNodes:i,defaultEdges:s,zIndexMode:y}),setNodes:S=>{const{nodeLookup:E,parentLookup:I,nodeOrigin:N,elevateNodesOnSelect:M,fitViewQueued:F,zIndexMode:A,nodesSelectionActive:W}=_(),{nodesInitialized:G,hasSelectedNodes:q}=uc(S,E,I,{nodeOrigin:N,nodeExtent:g,elevateNodesOnSelect:M,checkEquality:!0,zIndexMode:A}),ee=W&&q;F&&G?(C(),w({nodes:S,nodesInitialized:G,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:ee})):w({nodes:S,nodesInitialized:G,nodesSelectionActive:ee})},setEdges:S=>{const{connectionLookup:E,edgeLookup:I}=_();Ug(E,I,S),w({edges:S})},setDefaultNodesAndEdges:(S,E)=>{if(S){const{setNodes:I}=_();I(S),w({hasDefaultNodes:!0})}if(E){const{setEdges:I}=_();I(E),w({hasDefaultEdges:!0})}},updateNodeInternals:S=>{const{triggerNodeChanges:E,nodeLookup:I,parentLookup:N,domNode:M,nodeOrigin:F,nodeExtent:A,debug:W,fitViewQueued:G,zIndexMode:q}=_(),{changes:ee,updatedInternals:D}=V2(S,I,N,M,F,A,q);D&&($2(I,N,{nodeOrigin:F,nodeExtent:A,zIndexMode:q}),G?(C(),w({fitViewQueued:!1,fitViewOptions:void 0})):w({}),(ee==null?void 0:ee.length)>0&&(W&&console.log("React Flow: trigger node changes",ee),E==null||E(ee)))},updateNodePositions:(S,E=!1)=>{const I=[];let N=[];const{nodeLookup:M,triggerNodeChanges:F,connection:A,updateConnection:W,onNodesChangeMiddlewareMap:G}=_();for(const[q,ee]of S){const D=M.get(q),V=!!(D!=null&&D.expandParent&&(D!=null&&D.parentId)&&(ee!=null&&ee.position)),J={id:q,type:"position",position:V?{x:Math.max(0,ee.position.x),y:Math.max(0,ee.position.y)}:ee.position,dragging:E};if(D&&A.inProgress&&A.fromNode.id===D.id){const z=Nr(D,A.fromHandle,xe.Left,!0);W({...A,from:z})}V&&D.parentId&&I.push({id:q,parentId:D.parentId,rect:{...ee.internals.positionAbsolute,width:ee.measured.width??0,height:ee.measured.height??0}}),N.push(J)}if(I.length>0){const{parentLookup:q,nodeOrigin:ee}=_(),D=Pc(I,M,q,ee);N.push(...D)}for(const q of G.values())N=q(N);F(N)},triggerNodeChanges:S=>{const{onNodesChange:E,setNodes:I,nodes:N,hasDefaultNodes:M,debug:F}=_();if(S!=null&&S.length){if(M){const A=BS(S,N);I(A)}F&&console.log("React Flow: trigger node changes",S),E==null||E(S)}},triggerEdgeChanges:S=>{const{onEdgesChange:E,setEdges:I,edges:N,hasDefaultEdges:M,debug:F}=_();if(S!=null&&S.length){if(M){const A=WS(S,N);I(A)}F&&console.log("React Flow: trigger edge changes",S),E==null||E(S)}},addSelectedNodes:S=>{const{multiSelectionActive:E,edgeLookup:I,nodeLookup:N,triggerNodeChanges:M,triggerEdgeChanges:F}=_();if(E){const A=S.map(W=>mr(W,!0));M(A);return}M(ro(N,new Set([...S]),!0)),F(ro(I))},addSelectedEdges:S=>{const{multiSelectionActive:E,edgeLookup:I,nodeLookup:N,triggerNodeChanges:M,triggerEdgeChanges:F}=_();if(E){const A=S.map(W=>mr(W,!0));F(A);return}F(ro(I,new Set([...S]))),M(ro(N,new Set,!0))},unselectNodesAndEdges:({nodes:S,edges:E}={})=>{const{edges:I,nodes:N,nodeLookup:M,triggerNodeChanges:F,triggerEdgeChanges:A}=_(),W=S||N,G=E||I,q=[];for(const D of W){if(!D.selected)continue;const V=M.get(D.id);V&&(V.selected=!1),q.push(mr(D.id,!1))}const ee=[];for(const D of G)D.selected&&ee.push(mr(D.id,!1));F(q),A(ee)},setMinZoom:S=>{const{panZoom:E,maxZoom:I}=_();E==null||E.setScaleExtent([S,I]),w({minZoom:S})},setMaxZoom:S=>{const{panZoom:E,minZoom:I}=_();E==null||E.setScaleExtent([I,S]),w({maxZoom:S})},setTranslateExtent:S=>{var E;(E=_().panZoom)==null||E.setTranslateExtent(S),w({translateExtent:S})},resetSelectedElements:()=>{const{edges:S,nodes:E,triggerNodeChanges:I,triggerEdgeChanges:N,elementsSelectable:M}=_();if(!M)return;const F=E.reduce((W,G)=>G.selected?[...W,mr(G.id,!1)]:W,[]),A=S.reduce((W,G)=>G.selected?[...W,mr(G.id,!1)]:W,[]);I(F),N(A)},setNodeExtent:S=>{const{nodes:E,nodeLookup:I,parentLookup:N,nodeOrigin:M,elevateNodesOnSelect:F,nodeExtent:A,zIndexMode:W}=_();S[0][0]===A[0][0]&&S[0][1]===A[0][1]&&S[1][0]===A[1][0]&&S[1][1]===A[1][1]||(uc(E,I,N,{nodeOrigin:M,nodeExtent:S,elevateNodesOnSelect:F,checkEquality:!1,zIndexMode:W}),w({nodeExtent:S}))},panBy:S=>{const{transform:E,width:I,height:N,panZoom:M,translateExtent:F}=_();return H2({delta:S,panZoom:M,transform:E,translateExtent:F,width:I,height:N})},setCenter:async(S,E,I)=>{const{width:N,height:M,maxZoom:F,panZoom:A}=_();if(!A)return!1;const W=typeof(I==null?void 0:I.zoom)<"u"?I.zoom:F;return await A.setViewport({x:N/2-S*W,y:M/2-E*W,zoom:W},{duration:I==null?void 0:I.duration,ease:I==null?void 0:I.ease,interpolate:I==null?void 0:I.interpolate}),!0},cancelConnection:()=>{w({connection:{...bg}})},updateConnection:S=>{w({connection:S})},reset:()=>w({...Nh()})}},Object.is);function c_({initialNodes:t,initialEdges:r,defaultNodes:i,defaultEdges:s,initialWidth:a,initialHeight:u,initialMinZoom:c,initialMaxZoom:f,initialFitViewOptions:h,fitView:m,nodeOrigin:v,nodeExtent:g,zIndexMode:y,children:w}){const[_]=B.useState(()=>u_({nodes:t,edges:r,defaultNodes:i,defaultEdges:s,width:a,height:u,fitView:m,minZoom:c,maxZoom:f,fitViewOptions:h,nodeOrigin:v,nodeExtent:g,zIndexMode:y}));return k.jsx(_S,{value:_,children:k.jsx(qS,{children:w})})}function d_({children:t,nodes:r,edges:i,defaultNodes:s,defaultEdges:a,width:u,height:c,fitView:f,fitViewOptions:h,minZoom:m,maxZoom:v,nodeOrigin:g,nodeExtent:y,zIndexMode:w}){return B.useContext(jl)?k.jsx(k.Fragment,{children:t}):k.jsx(c_,{initialNodes:r,initialEdges:i,defaultNodes:s,defaultEdges:a,initialWidth:u,initialHeight:c,fitView:f,initialFitViewOptions:h,initialMinZoom:m,initialMaxZoom:v,nodeOrigin:g,nodeExtent:y,zIndexMode:w,children:t})}const f_={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function p_({nodes:t,edges:r,defaultNodes:i,defaultEdges:s,className:a,nodeTypes:u,edgeTypes:c,onNodeClick:f,onEdgeClick:h,onInit:m,onMove:v,onMoveStart:g,onMoveEnd:y,onConnect:w,onConnectStart:_,onConnectEnd:C,onClickConnectStart:S,onClickConnectEnd:E,onNodeMouseEnter:I,onNodeMouseMove:N,onNodeMouseLeave:M,onNodeContextMenu:F,onNodeDoubleClick:A,onNodeDragStart:W,onNodeDrag:G,onNodeDragStop:q,onNodesDelete:ee,onEdgesDelete:D,onDelete:V,onSelectionChange:J,onSelectionDragStart:z,onSelectionDrag:Y,onSelectionDragStop:O,onSelectionContextMenu:U,onSelectionStart:L,onSelectionEnd:j,onBeforeDelete:H,connectionMode:b,connectionLineType:T=Qn.Bezier,connectionLineStyle:te,connectionLineComponent:oe,connectionLineContainerStyle:ae,deleteKeyCode:ce="Backspace",selectionKeyCode:ue="Shift",selectionOnDrag:Z=!1,selectionMode:se=Si.Full,panActivationKeyCode:ge="Space",multiSelectionKeyCode:we=_i()?"Meta":"Control",zoomActivationKeyCode:ve=_i()?"Meta":"Control",snapToGrid:me,snapGrid:Ee,onlyRenderVisibleElements:Me=!1,selectNodesOnDrag:Ie,nodesDraggable:Re,autoPanOnNodeFocus:ut,nodesConnectable:ft,nodesFocusable:rt,nodeOrigin:ot=om,edgesFocusable:ln,edgesReconnectable:qt,elementsSelectable:Kt=!0,defaultViewport:pt=AS,minZoom:zt=.5,maxZoom:St=2,translateExtent:It=wi,preventScrolling:Ii=!0,nodeExtent:an,defaultMarkerColor:Kn="#b1b1b7",zoomOnScroll:Al=!0,zoomOnPinch:ji=!0,panOnScroll:Ti=!1,panOnScrollSpeed:$l=.5,panOnScrollMode:yo=xr.Free,zoomOnDoubleClick:vo=!0,panOnDrag:xo=!0,onPaneClick:wo,onPaneMouseEnter:So,onPaneMouseMove:En,onPaneMouseLeave:Nn,onPaneScroll:Ri,onPaneContextMenu:Li,paneClickDistance:Ai=1,nodeClickDistance:$i=0,children:Di,onReconnect:ko,onReconnectStart:Oi,onReconnectEnd:Zn,onEdgeContextMenu:_o,onEdgeDoubleClick:Jn,onEdgeMouseEnter:Dl,onEdgeMouseMove:er,onEdgeMouseLeave:Cr,reconnectRadius:br=10,onNodesChange:Eo,onEdgesChange:Ol,noDragClassName:Fl="nodrag",noWheelClassName:Vl="nowheel",noPanClassName:Zt="nopan",fitView:No,fitViewOptions:Co,connectOnClick:Hl,attributionPosition:Fi,proOptions:Vi,defaultEdgeOptions:Hi,elevateNodesOnSelect:Bi=!0,elevateEdgesOnSelect:Bl=!1,disableKeyboardA11y:Wi=!1,autoPanOnConnect:Ve,autoPanOnNodeDrag:Wl,autoPanOnSelection:bo=!0,autoPanSpeed:Ui,connectionRadius:Mr,isValidConnection:Ul,onError:Yi,style:Pr,id:kt,nodeDragThreshold:Yl,connectionDragThreshold:_t,viewport:Xl,onViewportChange:Gl,width:Ql,height:zr,colorMode:Ir="light",debug:tr,onScroll:un,ariaLabelConfig:ql,zIndexMode:Xi="basic",...Mo},Gi){const nr=kt||"1",rr=FS(Ir),Kl=B.useCallback(jr=>{jr.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),un==null||un(jr)},[un]);return k.jsx("div",{"data-testid":"rf__wrapper",...Mo,onScroll:Kl,style:{...Pr,...f_},ref:Gi,className:Xe(["react-flow",a,rr]),id:kt,role:"application",children:k.jsxs(d_,{nodes:t,edges:r,width:Ql,height:zr,fitView:No,fitViewOptions:Co,minZoom:zt,maxZoom:St,nodeOrigin:ot,nodeExtent:an,zIndexMode:Xi,children:[k.jsx(OS,{nodes:t,edges:r,defaultNodes:i,defaultEdges:s,onConnect:w,onConnectStart:_,onConnectEnd:C,onClickConnectStart:S,onClickConnectEnd:E,nodesDraggable:Re,autoPanOnNodeFocus:ut,nodesConnectable:ft,nodesFocusable:rt,edgesFocusable:ln,edgesReconnectable:qt,elementsSelectable:Kt,elevateNodesOnSelect:Bi,elevateEdgesOnSelect:Bl,minZoom:zt,maxZoom:St,nodeExtent:an,onNodesChange:Eo,onEdgesChange:Ol,snapToGrid:me,snapGrid:Ee,connectionMode:b,translateExtent:It,connectOnClick:Hl,defaultEdgeOptions:Hi,fitView:No,fitViewOptions:Co,onNodesDelete:ee,onEdgesDelete:D,onDelete:V,onNodeDragStart:W,onNodeDrag:G,onNodeDragStop:q,onSelectionDrag:Y,onSelectionDragStart:z,onSelectionDragStop:O,onMove:v,onMoveStart:g,onMoveEnd:y,noPanClassName:Zt,nodeOrigin:ot,rfId:nr,autoPanOnConnect:Ve,autoPanOnNodeDrag:Wl,autoPanSpeed:Ui,onError:Yi,connectionRadius:Mr,isValidConnection:Ul,selectNodesOnDrag:Ie,nodeDragThreshold:Yl,connectionDragThreshold:_t,onBeforeDelete:H,debug:tr,ariaLabelConfig:ql,zIndexMode:Xi}),k.jsx(l_,{onInit:m,onNodeClick:f,onEdgeClick:h,onNodeMouseEnter:I,onNodeMouseMove:N,onNodeMouseLeave:M,onNodeContextMenu:F,onNodeDoubleClick:A,nodeTypes:u,edgeTypes:c,connectionLineType:T,connectionLineStyle:te,connectionLineComponent:oe,connectionLineContainerStyle:ae,selectionKeyCode:ue,selectionOnDrag:Z,selectionMode:se,deleteKeyCode:ce,multiSelectionKeyCode:we,panActivationKeyCode:ge,zoomActivationKeyCode:ve,onlyRenderVisibleElements:Me,defaultViewport:pt,translateExtent:It,minZoom:zt,maxZoom:St,preventScrolling:Ii,zoomOnScroll:Al,zoomOnPinch:ji,zoomOnDoubleClick:vo,panOnScroll:Ti,panOnScrollSpeed:$l,panOnScrollMode:yo,panOnDrag:xo,autoPanOnSelection:bo,onPaneClick:wo,onPaneMouseEnter:So,onPaneMouseMove:En,onPaneMouseLeave:Nn,onPaneScroll:Ri,onPaneContextMenu:Li,paneClickDistance:Ai,nodeClickDistance:$i,onSelectionContextMenu:U,onSelectionStart:L,onSelectionEnd:j,onReconnect:ko,onReconnectStart:Oi,onReconnectEnd:Zn,onEdgeContextMenu:_o,onEdgeDoubleClick:Jn,onEdgeMouseEnter:Dl,onEdgeMouseMove:er,onEdgeMouseLeave:Cr,reconnectRadius:br,defaultMarkerColor:Kn,noDragClassName:Fl,noWheelClassName:Vl,noPanClassName:Zt,rfId:nr,disableKeyboardA11y:Wi,nodeExtent:an,viewport:Xl,onViewportChange:Gl}),k.jsx(LS,{onSelectionChange:J}),Di,k.jsx(zS,{proOptions:Vi,position:Fi}),k.jsx(PS,{rfId:nr,disableKeyboardA11y:Wi})]})})}var h_=sm(p_);function g_({dimensions:t,lineWidth:r,variant:i,className:s}){return k.jsx("path",{strokeWidth:r,d:`M${t[0]/2} 0 V${t[1]} M0 ${t[1]/2} H${t[0]}`,className:Xe(["react-flow__background-pattern",i,s])})}function m_({radius:t,className:r}){return k.jsx("circle",{cx:t,cy:t,r:t,className:Xe(["react-flow__background-pattern","dots",r])})}var qn;(function(t){t.Lines="lines",t.Dots="dots",t.Cross="cross"})(qn||(qn={}));const y_={[qn.Dots]:1,[qn.Lines]:1,[qn.Cross]:6},v_=t=>({transform:t.transform,patternId:`pattern-${t.rfId}`});function zm({id:t,variant:r=qn.Dots,gap:i=20,size:s,lineWidth:a=1,offset:u=0,color:c,bgColor:f,style:h,className:m,patternClassName:v}){const g=B.useRef(null),{transform:y,patternId:w}=be(v_,Oe),_=s||y_[r],C=r===qn.Dots,S=r===qn.Cross,E=Array.isArray(i)?i:[i,i],I=[E[0]*y[2]||1,E[1]*y[2]||1],N=_*y[2],M=Array.isArray(u)?u:[u,u],F=S?[N,N]:I,A=[M[0]*y[2]||1+F[0]/2,M[1]*y[2]||1+F[1]/2],W=`${w}${t||""}`;return k.jsxs("svg",{className:Xe(["react-flow__background",m]),style:{...h,...Rl,"--xy-background-color-props":f,"--xy-background-pattern-color-props":c},ref:g,"data-testid":"rf__background",children:[k.jsx("pattern",{id:W,x:y[0]%I[0],y:y[1]%I[1],width:I[0],height:I[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${A[0]},-${A[1]})`,children:C?k.jsx(m_,{radius:N/2,className:v}):k.jsx(g_,{dimensions:F,lineWidth:a,variant:r,className:v})}),k.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${W})`})]})}zm.displayName="Background";const x_=B.memo(zm);function w_(){return k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:k.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function S_(){return k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:k.jsx("path",{d:"M0 0h32v4.2H0z"})})}function k_(){return k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:k.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 __(){return k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:k.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 E_(){return k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:k.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 ol({children:t,className:r,...i}){return k.jsx("button",{type:"button",className:Xe(["react-flow__controls-button",r]),...i,children:t})}const N_=t=>({isInteractive:t.nodesDraggable||t.nodesConnectable||t.elementsSelectable,minZoomReached:t.transform[2]<=t.minZoom,maxZoomReached:t.transform[2]>=t.maxZoom,ariaLabelConfig:t.ariaLabelConfig});function Im({style:t,showZoom:r=!0,showFitView:i=!0,showInteractive:s=!0,fitViewOptions:a,onZoomIn:u,onZoomOut:c,onFitView:f,onInteractiveChange:h,className:m,children:v,position:g="bottom-left",orientation:y="vertical","aria-label":w}){const _=Fe(),{isInteractive:C,minZoomReached:S,maxZoomReached:E,ariaLabelConfig:I}=be(N_,Oe),{zoomIn:N,zoomOut:M,fitView:F}=zc(),A=()=>{N(),u==null||u()},W=()=>{M(),c==null||c()},G=()=>{F(a),f==null||f()},q=()=>{_.setState({nodesDraggable:!C,nodesConnectable:!C,elementsSelectable:!C}),h==null||h(!C)},ee=y==="horizontal"?"horizontal":"vertical";return k.jsxs(Tl,{className:Xe(["react-flow__controls",ee,m]),position:g,style:t,"data-testid":"rf__controls","aria-label":w??I["controls.ariaLabel"],children:[r&&k.jsxs(k.Fragment,{children:[k.jsx(ol,{onClick:A,className:"react-flow__controls-zoomin",title:I["controls.zoomIn.ariaLabel"],"aria-label":I["controls.zoomIn.ariaLabel"],disabled:E,children:k.jsx(w_,{})}),k.jsx(ol,{onClick:W,className:"react-flow__controls-zoomout",title:I["controls.zoomOut.ariaLabel"],"aria-label":I["controls.zoomOut.ariaLabel"],disabled:S,children:k.jsx(S_,{})})]}),i&&k.jsx(ol,{className:"react-flow__controls-fitview",onClick:G,title:I["controls.fitView.ariaLabel"],"aria-label":I["controls.fitView.ariaLabel"],children:k.jsx(k_,{})}),s&&k.jsx(ol,{className:"react-flow__controls-interactive",onClick:q,title:I["controls.interactive.ariaLabel"],"aria-label":I["controls.interactive.ariaLabel"],children:C?k.jsx(E_,{}):k.jsx(__,{})}),v]})}Im.displayName="Controls";const C_=B.memo(Im);function b_({id:t,x:r,y:i,width:s,height:a,style:u,color:c,strokeColor:f,strokeWidth:h,className:m,borderRadius:v,shapeRendering:g,selected:y,onClick:w}){const{background:_,backgroundColor:C}=u||{},S=c||_||C;return k.jsx("rect",{className:Xe(["react-flow__minimap-node",{selected:y},m]),x:r,y:i,rx:v,ry:v,width:s,height:a,style:{fill:S,stroke:f,strokeWidth:h},shapeRendering:g,onClick:w?E=>w(E,t):void 0})}const M_=B.memo(b_),P_=t=>t.nodes.map(r=>r.id),Xu=t=>t instanceof Function?t:()=>t;function z_({nodeStrokeColor:t,nodeColor:r,nodeClassName:i="",nodeBorderRadius:s=5,nodeStrokeWidth:a,nodeComponent:u=M_,onClick:c}){const f=be(P_,Oe),h=Xu(r),m=Xu(t),v=Xu(i),g=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return k.jsx(k.Fragment,{children:f.map(y=>k.jsx(j_,{id:y,nodeColorFunc:h,nodeStrokeColorFunc:m,nodeClassNameFunc:v,nodeBorderRadius:s,nodeStrokeWidth:a,NodeComponent:u,onClick:c,shapeRendering:g},y))})}function I_({id:t,nodeColorFunc:r,nodeStrokeColorFunc:i,nodeClassNameFunc:s,nodeBorderRadius:a,nodeStrokeWidth:u,shapeRendering:c,NodeComponent:f,onClick:h}){const{node:m,x:v,y:g,width:y,height:w}=be(_=>{const C=_.nodeLookup.get(t);if(!C)return{node:void 0,x:0,y:0,width:0,height:0};const S=C.internals.userNode,{x:E,y:I}=C.internals.positionAbsolute,{width:N,height:M}=_n(S);return{node:S,x:E,y:I,width:N,height:M}},Oe);return!m||m.hidden||!Rg(m)?null:k.jsx(f,{x:v,y:g,width:y,height:w,style:m.style,selected:!!m.selected,className:s(m),color:r(m),borderRadius:a,strokeColor:i(m),strokeWidth:u,shapeRendering:c,onClick:h,id:m.id})}const j_=B.memo(I_);var T_=B.memo(z_);const R_=200,L_=150,A_=t=>!t.hidden,$_=t=>{const r={x:-t.transform[0]/t.transform[2],y:-t.transform[1]/t.transform[2],width:t.width/t.transform[2],height:t.height/t.transform[2]};return{viewBB:r,boundingRect:t.nodeLookup.size>0?jg(Pi(t.nodeLookup,{filter:A_}),r):r,rfId:t.rfId,panZoom:t.panZoom,translateExtent:t.translateExtent,flowWidth:t.width,flowHeight:t.height,ariaLabelConfig:t.ariaLabelConfig}},D_="react-flow__minimap-desc";function jm({style:t,className:r,nodeStrokeColor:i,nodeColor:s,nodeClassName:a="",nodeBorderRadius:u=5,nodeStrokeWidth:c,nodeComponent:f,bgColor:h,maskColor:m,maskStrokeColor:v,maskStrokeWidth:g,position:y="bottom-right",onClick:w,onNodeClick:_,pannable:C=!1,zoomable:S=!1,ariaLabel:E,inversePan:I,zoomStep:N=1,offsetScale:M=5}){const F=Fe(),A=B.useRef(null),{boundingRect:W,viewBB:G,rfId:q,panZoom:ee,translateExtent:D,flowWidth:V,flowHeight:J,ariaLabelConfig:z}=be($_,Oe),Y=(t==null?void 0:t.width)??R_,O=(t==null?void 0:t.height)??L_,U=W.width/Y,L=W.height/O,j=Math.max(U,L),H=j*Y,b=j*O,T=M*j,te=W.x-(H-W.width)/2-T,oe=W.y-(b-W.height)/2-T,ae=H+T*2,ce=b+T*2,ue=`${D_}-${q}`,Z=B.useRef(0),se=B.useRef();Z.current=j,B.useEffect(()=>{if(A.current&&ee)return se.current=K2({domNode:A.current,panZoom:ee,getTransform:()=>F.getState().transform,getViewScale:()=>Z.current}),()=>{var me;(me=se.current)==null||me.destroy()}},[ee]),B.useEffect(()=>{var me;(me=se.current)==null||me.update({translateExtent:D,width:V,height:J,inversePan:I,pannable:C,zoomStep:N,zoomable:S})},[C,S,I,N,D,V,J]);const ge=w?me=>{var Ie;const[Ee,Me]=((Ie=se.current)==null?void 0:Ie.pointer(me))||[0,0];w(me,{x:Ee,y:Me})}:void 0,we=_?B.useCallback((me,Ee)=>{const Me=F.getState().nodeLookup.get(Ee).internals.userNode;_(me,Me)},[]):void 0,ve=E??z["minimap.ariaLabel"];return k.jsx(Tl,{position:y,style:{...t,"--xy-minimap-background-color-props":typeof h=="string"?h:void 0,"--xy-minimap-mask-background-color-props":typeof m=="string"?m:void 0,"--xy-minimap-mask-stroke-color-props":typeof v=="string"?v:void 0,"--xy-minimap-mask-stroke-width-props":typeof g=="number"?g*j:void 0,"--xy-minimap-node-background-color-props":typeof s=="string"?s:void 0,"--xy-minimap-node-stroke-color-props":typeof i=="string"?i:void 0,"--xy-minimap-node-stroke-width-props":typeof c=="number"?c:void 0},className:Xe(["react-flow__minimap",r]),"data-testid":"rf__minimap",children:k.jsxs("svg",{width:Y,height:O,viewBox:`${te} ${oe} ${ae} ${ce}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":ue,ref:A,onClick:ge,children:[ve&&k.jsx("title",{id:ue,children:ve}),k.jsx(T_,{onClick:we,nodeColor:s,nodeStrokeColor:i,nodeBorderRadius:u,nodeClassName:a,nodeStrokeWidth:c,nodeComponent:f}),k.jsx("path",{className:"react-flow__minimap-mask",d:`M${te-T},${oe-T}h${ae+T*2}v${ce+T*2}h${-ae-T*2}z
|
|
167
|
-
M${G.x},${G.y}h${G.width}v${G.height}h${-G.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}jm.displayName="MiniMap";B.memo(jm);const O_=t=>r=>t?`${Math.max(1/r.transform[2],1)}`:void 0,F_={[ho.Line]:"right",[ho.Handle]:"bottom-right"};function V_({nodeId:t,position:r,variant:i=ho.Handle,className:s,style:a=void 0,children:u,color:c,minWidth:f=10,minHeight:h=10,maxWidth:m=Number.MAX_VALUE,maxHeight:v=Number.MAX_VALUE,keepAspectRatio:g=!1,resizeDirection:y,autoScale:w=!0,shouldResize:_,onResizeStart:C,onResize:S,onResizeEnd:E}){const I=cm(),N=typeof t=="string"?t:I,M=Fe(),F=B.useRef(null),A=i===ho.Handle,W=be(B.useCallback(O_(A&&w),[A,w]),Oe),G=B.useRef(null),q=r??F_[i];B.useEffect(()=>{if(!(!F.current||!N))return G.current||(G.current=cS({domNode:F.current,nodeId:N,getStoreItems:()=>{const{nodeLookup:D,transform:V,snapGrid:J,snapToGrid:z,nodeOrigin:Y,domNode:O}=M.getState();return{nodeLookup:D,transform:V,snapGrid:J,snapToGrid:z,nodeOrigin:Y,paneDomNode:O}},onChange:(D,V)=>{const{triggerNodeChanges:J,nodeLookup:z,parentLookup:Y,nodeOrigin:O}=M.getState(),U=[],L={x:D.x,y:D.y},j=z.get(N);if(j&&j.expandParent&&j.parentId){const H=j.origin??O,b=D.width??j.measured.width??0,T=D.height??j.measured.height??0,te={id:j.id,parentId:j.parentId,rect:{width:b,height:T,...Lg({x:D.x??j.position.x,y:D.y??j.position.y},{width:b,height:T},j.parentId,z,H)}},oe=Pc([te],z,Y,O);U.push(...oe),L.x=D.x?Math.max(H[0]*b,D.x):void 0,L.y=D.y?Math.max(H[1]*T,D.y):void 0}if(L.x!==void 0&&L.y!==void 0){const H={id:N,type:"position",position:{...L}};U.push(H)}if(D.width!==void 0&&D.height!==void 0){const b={id:N,type:"dimensions",resizing:!0,setAttributes:y?y==="horizontal"?"width":"height":!0,dimensions:{width:D.width,height:D.height}};U.push(b)}for(const H of V){const b={...H,type:"position"};U.push(b)}J(U)},onEnd:({width:D,height:V})=>{const J={id:N,type:"dimensions",resizing:!1,dimensions:{width:D,height:V}};M.getState().triggerNodeChanges([J])}})),G.current.update({controlPosition:q,boundaries:{minWidth:f,minHeight:h,maxWidth:m,maxHeight:v},keepAspectRatio:g,resizeDirection:y,onResizeStart:C,onResize:S,onResizeEnd:E,shouldResize:_}),()=>{var D;(D=G.current)==null||D.destroy()}},[q,f,h,m,v,g,C,S,E,_]);const ee=q.split("-");return k.jsx("div",{className:Xe(["react-flow__resize-control","nodrag",...ee,i,s]),ref:F,style:{...a,scale:W,...c&&{[A?"backgroundColor":"borderColor"]:c}},children:u})}B.memo(V_);function jc(t){switch(t){case"websocket":return"websocket";case"sse":case"longpoll":return"http";case"libp2p":return"libp2p";case"loopback":return"loopback";default:return"unknown"}}function Tc(t){switch(t){case"websocket":return"WebSocket";case"sse":return"HTTP · SSE";case"longpoll":return"HTTP · long-poll";case"libp2p":return"libp2p";case"loopback":return"Loopback";case void 0:return"unknown";default:return t}}function Rc(t){return t==="websocket"?"ws":t}const H_={websocket:"#22d3ee",http:"#a78bfa",libp2p:"#34d399",loopback:"#64748b",unknown:"#64748b"};function Lc(t){return H_[t]}function Ac(t){return Lc(jc(t))}function $c(t){const r=new Map;for(const i of t){const s=jc(i.transport);r.set(s,(r.get(s)??0)+1)}return[...r.entries()].map(([i,s])=>({family:i,count:s})).sort((i,s)=>s.count-i.count||i.family.localeCompare(s.family))}function B_(t){return $c(t).map(({family:r,count:i})=>`${i} ${Rc(r)}`).join(" / ")}const Gu=["#22d3ee","#a78bfa","#f472b6","#facc15","#34d399","#fb923c","#60a5fa","#f87171"];function Tm(t){let r=0;for(let i=0;i<t.length;i++)r=r*31+t.charCodeAt(i)>>>0;return Gu[r%Gu.length]??Gu[0]}const Ch="__bus",W_=500,bh=320,Mh=160;function U_(t,r,i){const s=[],a=new Set;for(const y of t)a.has(y.nodeId)||(a.add(y.nodeId),s.push(y.nodeId));i&&!a.has(i.nodeId)&&(a.add(i.nodeId),s.push(i.nodeId));const u=new Map(t.map(y=>[y.nodeId,y])),c=s.length>=2,f=[],h=[];c&&f.push({id:Ch,kind:"bus",x:0,y:0,label:"Adapter · bus"});const m=r.slice(0,W_),v=Math.max(0,r.length-m.length),g=new Map;for(const y of m){const w=g.get(y.nodeId)??[];w.push(y),g.set(y.nodeId,w)}return s.forEach((y,w)=>{var M;const _=s.length===1?0:w/s.length*Math.PI*2-Math.PI/2,C=c?Math.cos(_)*bh:0,S=c?Math.sin(_)*bh:0,E=u.get(y),I=(E==null?void 0:E.nodeName)??((i==null?void 0:i.nodeId)===y?i.nodeName:void 0)??y.slice(0,8);f.push({id:y,kind:"server",x:C,y:S,label:I,alive:(E==null?void 0:E.alive)??!0,connCount:(E==null?void 0:E.connections)??((M=g.get(y))==null?void 0:M.length)??0,breakdown:B_(g.get(y)??[])}),c&&h.push({id:`e-bus-${y}`,source:y,target:Ch,kind:"bus"});const N=g.get(y)??[];N.forEach((F,A)=>{const W=A/Math.max(N.length,1)*Math.PI*2;f.push({id:F.id,kind:"conn",x:C+Math.cos(W)*Mh,y:S+Math.sin(W)*Mh,label:F.role,role:F.role,userId:F.userId,rooms:F.rooms,transport:F.transport}),h.push({id:`e-${F.id}`,source:F.id,target:y,kind:"conn"})})}),{nodes:f,edges:h,truncated:v}}function Y_(t){const r=new Set;for(const i of t)for(const s of i.rooms)r.add(s);return[...r].sort()}function X_(t){return t.kind==="bus"?"Adapter · bus":t.kind==="server"?k.jsxs("div",{className:"text-center leading-tight",children:[k.jsx("div",{className:"font-semibold",children:t.label}),k.jsxs("div",{className:"text-[10px] opacity-70",children:[t.connCount," conns",t.breakdown?` · ${t.breakdown}`:"",t.alive?"":" · dead"]})]}):k.jsxs("div",{className:"leading-tight",children:[k.jsx("div",{className:"font-medium",children:t.role}),t.userId?k.jsx("div",{className:"text-[10px] opacity-70",children:t.userId}):null]})}function Ph(t,r){var i;return r.kind==="room"?!!((i=t.rooms)!=null&&i.includes(r.value)):jc(t.transport)===r.value}function G_(t,r){const s={fontSize:11,opacity:r!==null&&t.kind==="conn"&&!Ph(t,r)?.16:1,transition:"opacity 120ms"};if(t.kind==="bus")return{...s,background:"var(--color-card)",border:"1px solid var(--color-primary)",color:"var(--color-primary)",borderRadius:999,padding:"8px 16px",fontWeight:600};if(t.kind==="server")return{...s,background:"var(--color-card)",border:"1px solid var(--color-border)",color:"var(--color-foreground)",borderRadius:12,padding:"8px 12px",minWidth:96};const a=Ac(t.transport),u=r!==null&&t.kind==="conn"&&Ph(t,r);return{...s,background:`${a}1f`,border:`1px solid ${a}`,color:"var(--color-foreground)",borderRadius:8,padding:"4px 9px",boxShadow:u?`0 0 0 2px ${a}`:"none"}}function Q_({topology:t,connections:r,node:i,highlight:s}){const{nodes:a,edges:u,truncated:c}=B.useMemo(()=>{const f=U_(t,r,i),h=f.nodes.map(v=>({id:v.id,position:{x:v.x,y:v.y},data:{label:X_(v)},style:G_(v,s),draggable:!0,connectable:!1,selectable:!1})),m=f.edges.map(v=>({id:v.id,source:v.source,target:v.target,animated:v.kind==="bus",style:{stroke:v.kind==="bus"?"var(--color-primary)":"var(--color-border)",strokeWidth:v.kind==="bus"?1.5:1}}));return{nodes:h,edges:m,truncated:f.truncated}},[t,r,i,s]);return k.jsxs("div",{className:"relative h-full w-full",children:[k.jsxs(h_,{nodes:a,edges:u,fitView:!0,nodesConnectable:!1,edgesFocusable:!1,minZoom:.2,children:[k.jsx(x_,{color:"#2b2b35",gap:20}),k.jsx(C_,{showInteractive:!1})]}),c>0?k.jsxs("div",{className:"absolute left-3 top-3 rounded-md border bg-card/90 px-3 py-1.5 text-xs text-muted-foreground",children:["showing 500 of ",500+c," connections · Control Center targets small clusters"]}):null]})}function il({title:t,children:r}){return k.jsxs("div",{className:"mb-4",children:[k.jsx("div",{className:"mb-1.5 px-1 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground",children:t}),r]})}const sl=()=>k.jsx("div",{className:"px-2 py-0.5 text-xs text-muted-foreground",children:"none"});function q_({roles:t,rooms:r,topics:i,transports:s,selected:a,onSelect:u}){const c=h=>u((a==null?void 0:a.kind)===h.kind&&a.value===h.value?null:h),f=h=>(a==null?void 0:a.kind)===h.kind&&a.value===h.value;return k.jsxs("aside",{className:"w-60 shrink-0 overflow-auto border-l bg-card/30 p-3",children:[k.jsx(il,{title:"Roles",children:t.length===0?k.jsx(sl,{}):t.map(h=>k.jsxs("div",{className:"flex items-center gap-2 px-1 py-0.5 text-sm",children:[k.jsx("span",{className:"h-2.5 w-2.5 rounded-full",style:{background:Tm(h)}}),h]},h))}),k.jsx(il,{title:"Transports · highlight",children:s.length===0?k.jsx(sl,{}):s.map(({family:h,count:m})=>k.jsxs("button",{onClick:()=>c({kind:"transport",value:h}),className:Je("flex w-full items-center gap-2 rounded px-2 py-1 text-left text-sm",f({kind:"transport",value:h})?"bg-accent text-accent-foreground":"hover:bg-accent/50"),children:[k.jsx("span",{className:"h-2.5 w-2.5 rounded-full",style:{background:Lc(h)}}),k.jsx("span",{className:"flex-1 truncate",children:Rc(h)}),k.jsx("span",{className:"text-xs text-muted-foreground",children:m})]},h))}),k.jsx(il,{title:"Rooms · highlight",children:r.length===0?k.jsx(sl,{}):r.map(h=>k.jsx("button",{onClick:()=>c({kind:"room",value:h}),className:Je("block w-full truncate rounded px-2 py-1 text-left text-sm",f({kind:"room",value:h})?"bg-accent text-accent-foreground":"hover:bg-accent/50"),children:h},h))}),k.jsx(il,{title:"Topics · this node",children:i.length===0?k.jsx(sl,{}):i.map(h=>k.jsx("div",{className:"truncate px-2 py-0.5 text-sm text-muted-foreground",children:h},h))})]})}function Rm(t){return{kind:"one",label:Tc(t),color:Ac(t)}}function ll(t,r){const i=r==null?void 0:r.conn(t);return i?Rm(i.transport):void 0}function K_(t,r){var i;switch(t.type){case"connect":return Rm(t.descriptor.transport);case"disconnect":case"room.add":case"room.remove":case"topic.sub":case"topic.unsub":case"msg.request":case"msg.response":return ll(t.connId,r);case"msg.event":return ll(t.target,r);case"msg.broadcast":{const s=((i=r==null?void 0:r.roomWires)==null?void 0:i.call(r,t.room))??[];return s.length?{kind:"many",parts:s.map(a=>({short:Rc(a.family),count:a.count,color:Lc(a.family)}))}:void 0}case"msg.publish":case"msg.serverRequest":case"msg.serverReply":return;case"store.subscribe":case"store.unsubscribe":return ll(t.connId,r);case"store.write":return t.connId?ll(t.connId,r):void 0;case"store.create":case"store.delete":case"store.grant":case"store.revoke":return}}function Lm(t,r,i){return i?`${i} (${t})`:`${t} ${r.slice(0,8)}`}function wn(t,r){const i=r==null?void 0:r.conn(t);return i?Lm(i.role,i.id,i.userId):t.slice(0,8)}function Z_(t,r){var i,s;switch(t.type){case"connect":{const a=t.descriptor;return`${Lm(a.role,a.id,a.userId)} on ${a.nodeName}`}case"disconnect":return`${t.userId??wn(t.connId,r)} on ${(r==null?void 0:r.nodeName(t.nodeId))??t.nodeId.slice(0,8)}`;case"room.add":case"room.remove":return`${wn(t.connId,r)} · ${t.room}`;case"topic.sub":case"topic.unsub":return`${wn(t.connId,r)} · ${t.topic}`;case"msg.request":return`${wn(t.connId,r)} → ${t.name}`;case"msg.response":return`${wn(t.connId,r)} ← ${t.name} · ${t.ok?"ok":((i=t.error)==null?void 0:i.code)??"error"}`;case"msg.event":return`→ ${wn(t.target,r)} · ${t.name}`;case"msg.broadcast":return`${t.room} ⇒ ${t.name}`;case"msg.publish":return t.topic;case"msg.serverRequest":return`→ ${wn(t.target,r)} · ${t.name}`;case"msg.serverReply":return`← ${wn(t.target,r)} · ${t.name} · ${t.ok?"ok":((s=t.error)==null?void 0:s.code)??"error"}`;case"store.create":return`+ ${t.store}/${t.id}`;case"store.delete":return`− ${t.store}/${t.id}`;case"store.write":return`${t.store}/${t.id}`;case"store.grant":return`${t.store}/${t.id} +${t.principal}`;case"store.revoke":return`${t.store}/${t.id} −${t.principal}`;case"store.subscribe":case"store.unsubscribe":return`${wn(t.connId,r)} · ${t.store}/${t.id}`}}function J_(t){return t==="msg.request"||t==="msg.response"||t==="msg.serverRequest"||t==="msg.serverReply"?"requests":t.startsWith("store.")?"stores":t.startsWith("msg.")?"events":"lifecycle"}function eE(t){switch(t.type){case"msg.request":case"msg.serverRequest":return t.input;case"msg.response":case"msg.serverReply":return t.ok?t.output:t.error;case"msg.event":case"msg.broadcast":case"msg.publish":return t.data;case"store.write":return t.data;case"store.grant":return t.perms;default:return}}function tE(t){return t==="connect"?"bg-primary":t==="disconnect"?"bg-destructive":t.startsWith("room")?"bg-violet-400":t.startsWith("topic")?"bg-amber-400":t.startsWith("store")?"bg-orange-400":t==="msg.request"||t==="msg.serverRequest"?"bg-cyan-400":t==="msg.response"||t==="msg.serverReply"?"bg-emerald-400":t==="msg.event"||t==="msg.broadcast"||t==="msg.publish"?"bg-sky-400":"bg-amber-400"}const nE={request:"#22d3ee",event:"#34d399",topic:"#a78bfa",serverRequest:"#60a5fa"};function rE(t){return nE[t]}function Am(t){return new Date(t).toLocaleTimeString()}function $m(t,r=Date.now()){const i=Math.max(0,Math.floor((r-t)/1e3));if(i<60)return`${i}s`;const s=Math.floor(i/60);if(s<60)return`${s}m`;const a=Math.floor(s/60);return a<24?`${a}h ${s%60}m`:`${Math.floor(a/24)}d ${a%24}h`}function oE({connections:t,selectedId:r,onSelect:i}){return t.length===0?k.jsx("p",{className:"text-sm text-muted-foreground",children:"No connections."}):k.jsx("div",{className:"overflow-auto rounded-md border",children:k.jsxs("table",{className:"w-full border-collapse text-sm",children:[k.jsx("thead",{children:k.jsxs("tr",{className:"border-b bg-card/50 text-left text-[11px] uppercase tracking-wide text-muted-foreground",children:[k.jsx("th",{className:"px-3 py-2 font-medium",children:"role"}),k.jsx("th",{className:"px-3 py-2 font-medium",children:"transport"}),k.jsx("th",{className:"px-3 py-2 font-medium",children:"id"}),k.jsx("th",{className:"px-3 py-2 font-medium",children:"user"}),k.jsx("th",{className:"px-3 py-2 font-medium",children:"node"}),k.jsx("th",{className:"px-3 py-2 font-medium",children:"rooms"}),k.jsx("th",{className:"px-3 py-2 font-medium",children:"connected"})]})}),k.jsx("tbody",{children:t.map(s=>k.jsxs("tr",{onClick:()=>i(s.id),className:Je("cursor-pointer border-b last:border-0 hover:bg-accent/40",r===s.id&&"bg-accent/60"),children:[k.jsx("td",{className:"px-3 py-2",children:k.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[k.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:Tm(s.role)}}),s.role]})}),k.jsx("td",{className:"px-3 py-2",children:k.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[k.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:Ac(s.transport)}}),Tc(s.transport)]})}),k.jsx("td",{className:"px-3 py-2 font-mono text-xs",children:s.id.slice(0,8)}),k.jsx("td",{className:"px-3 py-2",children:s.userId??"—"}),k.jsx("td",{className:"px-3 py-2 text-xs",children:s.nodeName}),k.jsx("td",{className:"px-3 py-2 text-muted-foreground",children:s.rooms.length?s.rooms.join(", "):"—"}),k.jsxs("td",{className:"px-3 py-2 text-xs text-muted-foreground",children:[Am(s.connectedAt)," ",k.jsxs("span",{className:"opacity-60",children:["· ",$m(s.connectedAt)]})]})]},s.id))})]})})}function wr({data:t,className:r}){const i=B.useMemo(()=>JSON.stringify(t,null,2),[t]),[s,a]=B.useState(!1),u=()=>{var c;(c=navigator.clipboard)==null||c.writeText(i).then(()=>{a(!0),setTimeout(()=>a(!1),1200)})};return k.jsxs("div",{className:"relative",children:[k.jsx("pre",{className:Je("max-h-[72vh] overflow-auto rounded-md border bg-background/40 p-3 text-xs leading-relaxed",r),children:i}),k.jsx("button",{type:"button",onClick:u,"aria-label":"Copy JSON",title:s?"Copied":"Copy JSON",className:"absolute right-2 top-2 rounded-md border bg-card/80 p-1.5 text-muted-foreground opacity-70 transition-opacity hover:text-foreground hover:opacity-100",children:s?k.jsx($y,{className:"h-3.5 w-3.5"}):k.jsx(Oy,{className:"h-3.5 w-3.5"})})]})}const iE=Bh("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",outline:"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent hover:text-accent-foreground",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}});function Dm({className:t,variant:r,size:i,...s}){return k.jsx("button",{className:Je(iE({variant:r,size:i,className:t})),...s})}function Qu({title:t,children:r}){return k.jsxs("div",{className:"mt-3",children:[k.jsx("div",{className:"mb-1 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground",children:t}),r]})}function sE({client:t,connId:r,onClose:i}){const[s,a]=B.useState(null),[u,c]=B.useState(null);return B.useEffect(()=>{if(!t||!r)return;let f=!0;return a(null),c(null),t.getConn(r).then(h=>{f&&a(h)}).catch(h=>{f&&c(h instanceof Error?h.message:String(h))}),()=>{f=!1}},[t,r]),r?k.jsxs("div",{className:"absolute inset-0 z-10 flex",children:[k.jsx("button",{className:"flex-1 bg-black/40",onClick:i,"aria-label":"Close detail"}),k.jsxs("div",{className:"w-[26rem] overflow-auto border-l bg-card p-4",children:[k.jsxs("div",{className:"flex items-center justify-between",children:[k.jsxs("h3",{className:"text-sm font-semibold",children:["Connection ",r.slice(0,8)]}),k.jsx(Dm,{size:"sm",variant:"ghost",onClick:i,children:"close"})]}),u?k.jsx("p",{className:"mt-3 text-sm text-destructive",children:u}):null,s?k.jsxs(k.Fragment,{children:[k.jsxs("p",{className:"mt-1 text-xs text-muted-foreground",children:[s.descriptor.nodeName," · over ",Tc(s.descriptor.transport)," · connected"," ",Am(s.descriptor.connectedAt)," · ",$m(s.descriptor.connectedAt)," ago"]}),k.jsx(Qu,{title:"descriptor",children:k.jsx(wr,{data:s.descriptor,className:"max-h-72"})}),s.ctxAvailable?k.jsxs(k.Fragment,{children:[k.jsx(Qu,{title:"ctx · node-local, best-effort",children:k.jsx(wr,{data:s.ctx,className:"max-h-72"})}),k.jsx(Qu,{title:"conn.data",children:k.jsx(wr,{data:s.data,className:"max-h-72"})})]}):k.jsxs("p",{className:"mt-3 text-xs text-muted-foreground",children:["ctx / conn.data live on node ",s.descriptor.nodeId.slice(0,8)," — point the Control Center at that node to inspect them."]})]}):u?null:k.jsx("p",{className:"mt-3 text-sm text-muted-foreground",children:"Loading…"})]})]}):null}function lE({flavor:t}){const r=rE(t);return k.jsx("span",{className:"rounded px-1.5 py-0.5 text-[10px] font-medium",style:{background:`${r}22`,color:r,border:`1px solid ${r}66`},children:t})}function aE({message:t}){const[r,i]=B.useState(!1),s=[["input",t.input],["output",t.output],["payload",t.payload]].filter(([,u])=>u!==void 0),a=s.length>0;return k.jsxs("div",{className:"rounded-md border",children:[k.jsxs("button",{onClick:()=>a&&i(u=>!u),disabled:!a,className:"flex w-full items-center gap-2 px-3 py-1.5 text-left",children:[k.jsx(lE,{flavor:t.flavor}),k.jsx("span",{className:"font-mono text-sm",children:t.name}),a?k.jsx("span",{className:"ml-auto text-xs text-muted-foreground",children:r?"−":"+"}):null]}),r?k.jsxs("div",{className:"space-y-2 border-t p-3",children:[s.map(([u,c])=>k.jsxs("div",{children:[k.jsx("div",{className:"mb-1 text-[10px] uppercase tracking-wide text-muted-foreground",children:u}),k.jsx(wr,{data:c,className:"max-h-72"})]},u)),k.jsx("p",{className:"text-[10px] text-muted-foreground",children:"schema · best-effort (refinements / transforms may be dropped)"})]}):null]})}function zh({label:t,messages:r}){return r.length===0?null:k.jsxs("div",{children:[k.jsx("div",{className:"mb-1.5 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground",children:t}),k.jsx("div",{className:"flex flex-col gap-1.5",children:r.map(i=>k.jsx(aE,{message:i},i.name))})]})}function Ih({title:t,dir:r}){return r.clientToServer.length===0&&r.serverToClient.length===0?null:k.jsxs("div",{className:"rounded-lg border bg-card/40 p-3",children:[k.jsx("div",{className:"mb-2 text-sm font-semibold",children:t}),k.jsxs("div",{className:"flex flex-col gap-3",children:[k.jsx(zh,{label:"client → server",messages:r.clientToServer}),k.jsx(zh,{label:"server → client",messages:r.serverToClient})]})]})}function uE({contract:t}){return k.jsxs("div",{className:"flex max-w-3xl flex-col gap-3",children:[k.jsx(Ih,{title:"shared",dir:t.shared}),Object.entries(t.roles).map(([r,i])=>k.jsx(Ih,{title:`role · ${r}`,dir:i},r))]})}const cE=[{id:"lifecycle",label:"Lifecycle"},{id:"requests",label:"Requests"},{id:"events",label:"Events"},{id:"stores",label:"Store"}];function dE({event:t,resolver:r}){const i=K_(t,r);return i?i.kind==="one"?k.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] text-muted-foreground",children:[k.jsx("span",{className:"h-1.5 w-1.5 rounded-full",style:{background:i.color}}),i.label]}):k.jsx("span",{className:"inline-flex items-center gap-1.5 text-[10px] text-muted-foreground",children:i.parts.map(s=>k.jsxs("span",{className:"inline-flex items-center gap-0.5",children:[k.jsx("span",{className:"h-1.5 w-1.5 rounded-full",style:{background:s.color}}),s.short,"×",s.count]},s.short))}):null}function fE({event:t,resolver:r}){const[i,s]=B.useState(!1),a=eE(t),u=a!==void 0;return k.jsxs("li",{className:"rounded-md border",children:[k.jsxs("button",{type:"button",disabled:!u,onClick:()=>s(c=>!c),className:Je("flex w-full items-center gap-2 px-2.5 py-1.5 text-left text-sm",u&&"cursor-pointer hover:bg-accent/40"),children:[k.jsx("span",{className:Je("h-2 w-2 shrink-0 rounded-full",tE(t.type))}),k.jsx("span",{className:"w-28 shrink-0 font-mono text-xs text-muted-foreground",children:t.type}),k.jsx("span",{className:"truncate font-mono text-xs",children:Z_(t,r)}),k.jsxs("span",{className:"ml-auto flex shrink-0 items-center gap-2",children:[k.jsx(dE,{event:t,resolver:r}),u?k.jsx(Dy,{className:Je("h-3.5 w-3.5 text-muted-foreground transition-transform",i&&"rotate-90")}):null]})]}),i&&u?k.jsx("div",{className:"px-2.5 pb-2",children:k.jsx(wr,{data:a,className:"max-h-60"})}):null]})}function pE({events:t,connections:r=[]}){const[i,s]=B.useState(()=>new Set(["lifecycle","requests","events","stores"])),[a,u]=B.useState(!1),[c,f]=B.useState([]),h=()=>{u(w=>(w||f(t),!w))},m=w=>s(_=>{const C=new Set(_);return C.has(w)?C.delete(w):C.add(w),C}),v=B.useMemo(()=>{const w=new Map(r.map(C=>[C.id,C])),_=new Map(r.map(C=>[C.nodeId,C.nodeName]));return{conn:C=>w.get(C),nodeName:C=>_.get(C)??C.slice(0,8),roomWires:C=>$c(r.filter(S=>S.rooms.includes(C)))}},[r]),y=(a?c:t).filter(w=>i.has(J_(w.type)));return k.jsxs("div",{className:"flex h-full flex-col gap-2",children:[k.jsxs("div",{className:"flex items-center gap-1.5",children:[cE.map(w=>k.jsx("button",{onClick:()=>m(w.id),className:Je("rounded-md border px-2 py-1 text-xs transition-colors",i.has(w.id)?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-accent/40"),children:w.label},w.id)),k.jsxs("button",{onClick:h,className:Je("ml-auto inline-flex items-center gap-1.5 rounded-md border px-2 py-1 text-xs transition-colors",a?"bg-amber-400/20 text-amber-300":"text-muted-foreground hover:bg-accent/40"),children:[a?k.jsx(Gy,{className:"h-3.5 w-3.5"}):k.jsx(Xy,{className:"h-3.5 w-3.5"}),a?"Paused":"Pause"]})]}),y.length===0?k.jsx("p",{className:"text-sm text-muted-foreground",children:t.length===0?"Waiting for events…":"No events match the filter."}):k.jsx("ul",{className:"flex min-h-0 flex-1 flex-col gap-1 overflow-auto",children:y.map((w,_)=>k.jsx(fE,{event:w,resolver:v},_))})]})}function hE({client:t}){const[r,i]=B.useState([]),[s,a]=B.useState(null),[u,c]=B.useState([]),[f,h]=B.useState(null),[m,v]=B.useState(null),[g,y]=B.useState(null),w=B.useRef({store:s,id:f});w.current={store:s,id:f},B.useEffect(()=>{t&&t.listStores().then(i).catch(()=>{})},[t]);const _=B.useCallback(S=>{t==null||t.listResources(S).then(c).catch(()=>{})},[t]),C=B.useCallback((S,E)=>{t==null||t.readResource(S,E).then(I=>{v(I),y(null)}).catch(I=>y(I instanceof Error?I.message:String(I)))},[t]);return B.useEffect(()=>{s&&_(s)},[s,_]),B.useEffect(()=>{s&&f&&C(s,f)},[s,f,C]),B.useEffect(()=>{if(t)return t.onEvent(S=>{!("store"in S)||S.store!==w.current.store||(S.type==="store.create"||S.type==="store.delete"?_(S.store):"id"in S&&S.id===w.current.id&&C(S.store,S.id))})},[t,_,C]),k.jsxs("div",{className:"flex h-full gap-3",children:[k.jsxs(jh,{title:"Stores",children:[r.map(S=>k.jsxs(Th,{active:S.name===s,onClick:()=>{a(S.name),h(null),v(null)},children:[k.jsx("span",{className:"truncate",children:S.name}),S.model?k.jsx(Ku,{variant:"muted",className:"ml-auto uppercase",children:S.model}):null]},S.name)),r.length===0&&k.jsx(di,{children:"No stores configured."})]}),k.jsx(jh,{title:"Resources",children:s==null?k.jsx(di,{children:"Select a store."}):u.length===0?k.jsx(di,{children:"No resources."}):u.map(S=>k.jsx(Th,{active:S===f,onClick:()=>h(S),children:k.jsx("span",{className:"truncate font-mono text-xs",children:S})},S))}),k.jsx("div",{className:"flex min-w-0 flex-1 flex-col gap-3 overflow-auto",children:f==null?k.jsx(di,{children:"Select a resource."}):g?k.jsx("p",{className:"text-sm text-destructive",children:g}):m?k.jsxs(k.Fragment,{children:[k.jsxs("section",{children:[k.jsx("h3",{className:"mb-1 text-xs font-semibold text-muted-foreground",children:"Value"}),k.jsx(wr,{data:m.data})]}),k.jsxs("section",{children:[k.jsx("h3",{className:"mb-1 text-xs font-semibold text-muted-foreground",children:"Access rules"}),k.jsx(wr,{data:m.accessRules})]})]}):k.jsx(di,{children:"Loading…"})})]})}function jh({title:t,children:r}){return k.jsxs("div",{className:"flex w-56 shrink-0 flex-col rounded-md border bg-card/40",children:[k.jsx("div",{className:"border-b px-3 py-2 text-xs font-semibold text-muted-foreground",children:t}),k.jsx("div",{className:"flex flex-col gap-0.5 overflow-auto p-1",children:r})]})}function Th({active:t,onClick:r,children:i}){return k.jsx("button",{onClick:r,className:Je("flex items-center gap-2 rounded px-2 py-1.5 text-left text-sm transition-colors",t?"bg-accent text-accent-foreground":"hover:bg-accent/50"),children:i})}function di({children:t}){return k.jsx("p",{className:"p-3 text-sm text-muted-foreground",children:t})}function Om({className:t,...r}){return k.jsx("div",{className:Je("rounded-lg border bg-card text-card-foreground shadow-sm",t),...r})}function Fm({className:t,...r}){return k.jsx("div",{className:Je("flex flex-col gap-1 px-4 py-3 border-b",t),...r})}function Vm({className:t,...r}){return k.jsx("div",{className:Je("text-sm font-semibold tracking-tight",t),...r})}function Hm({className:t,...r}){return k.jsx("div",{className:Je("p-4",t),...r})}function Bm({status:t}){const r=t==="open"?"bg-primary":t==="connecting"?"bg-muted-foreground":"bg-destructive";return k.jsxs("span",{className:"inline-flex items-center gap-2 text-xs text-muted-foreground",children:[k.jsx("span",{className:Je("h-2 w-2 rounded-full",r)}),t]})}function gE({url:t,status:r,onConnect:i}){const[s,a]=B.useState(t);B.useEffect(()=>{a(t)},[t]);const u=s.trim()!==t;return k.jsx("div",{className:"max-w-2xl",children:k.jsxs(Om,{children:[k.jsxs(Fm,{children:[k.jsx(Vm,{children:"Inspector connection"}),k.jsxs("p",{className:"text-xs text-muted-foreground",children:["The WebSocket endpoint of a super-line server started with ",k.jsx("code",{children:"inspector: true"}),". Saved to this browser and reused next time."]})]}),k.jsxs(Hm,{className:"flex flex-col gap-3",children:[k.jsx("label",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",htmlFor:"cc-url",children:"URL"}),k.jsxs("form",{className:"flex items-center gap-2",onSubmit:c=>{c.preventDefault(),i(s.trim())},children:[k.jsx("input",{id:"cc-url",value:s,onChange:c=>a(c.target.value),placeholder:"ws://localhost:3000",className:"h-9 w-full rounded-md border bg-background px-3 text-sm outline-none focus:ring-2 focus:ring-ring"}),k.jsx(Dm,{type:"submit",size:"sm",variant:u?"default":"secondary",children:u?"Connect":"Reconnect"})]}),k.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[k.jsx("span",{children:"Status"}),k.jsx(Bm,{status:r})]})]})]})})}const mE=[{icon:Ky,title:"super-line",href:"https://mertdogar.github.io/super-line/",blurb:"The home page — what super-line is and why typesafe WebSockets."},{icon:Ly,title:"Documentation",href:"https://mertdogar.github.io/super-line/guide/getting-started",blurb:"Guides, the full API reference, and runnable examples."},{icon:By,title:"GitHub",href:"https://github.com/mertdogar/super-line",blurb:"Browse the source, report issues, and contribute."},{icon:Yy,title:"npm",href:"https://www.npmjs.com/package/@super-line/core",blurb:"The @super-line/* packages — core, server, client, react, adapters."}];function yE(){return k.jsx("div",{className:"grid max-w-3xl grid-cols-1 gap-3 sm:grid-cols-2",children:mE.map(t=>k.jsx("a",{href:t.href,target:"_blank",rel:"noreferrer",className:"group block",children:k.jsxs(Om,{className:"h-full transition-colors hover:border-primary/60 hover:bg-accent/30",children:[k.jsx(Fm,{children:k.jsxs(Vm,{className:"flex items-center gap-2",children:[k.jsx(t.icon,{className:"h-4 w-4 text-primary"}),t.title,k.jsx(Vy,{className:"ml-auto h-3.5 w-3.5 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100"})]})}),k.jsx(Hm,{className:"text-xs text-muted-foreground",children:t.blurb})]})},t.title))})}const Rh=[{id:"topology",label:"Topology",icon:Uy},{id:"connections",label:"Connections",icon:Ay},{id:"contract",label:"Contract",icon:Hy},{id:"stores",label:"Stores",icon:Fy},{id:"feed",label:"Live feed",icon:Qy}],Lh=[{id:"settings",label:"Settings",icon:qy},{id:"resources",label:"Resources",icon:Wy}],Wm="superline.cc.url",vE="ws://localhost:3000";function xE(){const t=new URLSearchParams(window.location.search).get("url");if(t)return t;try{const i=localStorage.getItem(Wm);if(i)return i}catch{}const r=window.__CC_DEFAULT_URL__;return r||vE}function Ah({item:t,active:r,onClick:i}){return k.jsxs("button",{onClick:i,className:Je("flex items-center gap-2 rounded-md px-3 py-2 text-sm transition-colors",r?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"),children:[k.jsx(t.icon,{className:"h-4 w-4"}),t.label]})}function wE(){const[t,r]=B.useState(xE),[i,s]=B.useState("topology"),{client:a,status:u}=tv(t),[c,f]=B.useState([]),[h,m]=B.useState([]),[v,g]=B.useState(null),[y,w]=B.useState(null),[_,C]=B.useState([]),[S,E]=B.useState(null),[I,N]=B.useState(null),M=B.useCallback(D=>{r(D);try{localStorage.setItem(Wm,D)}catch{}},[]);B.useEffect(()=>{if(!a||u!=="open")return;let D=!0;const V=()=>{Promise.all([a.getTopology(),a.listConnections(),a.getContract(),a.getNode()]).then(([z,Y,O,U])=>{D&&(f(z),m(Y),g(O),w(U))}).catch(()=>{})};V();const J=a.onEvent(z=>{D&&(C(Y=>[z,...Y].slice(0,200)),V())});return()=>{D=!1,J()}},[a,u]);const F=c.reduce((D,V)=>D+V.connections,0),A=B.useMemo(()=>[...new Set(h.map(D=>D.role))].sort(),[h]),W=B.useMemo(()=>Y_(h),[h]),G=B.useMemo(()=>$c(h),[h]),q=[...Rh,...Lh].find(D=>D.id===i),ee=i==="connections"?`${h.length} connections`:i==="feed"?`${_.length} events`:"";return k.jsxs("div",{className:"flex h-screen w-screen overflow-hidden",children:[k.jsxs("aside",{className:"flex w-56 shrink-0 flex-col border-r bg-card/40",children:[k.jsxs("div",{className:"flex items-center gap-2 px-4 py-4",children:[k.jsx("span",{className:"h-2.5 w-2.5 rounded-full bg-primary"}),k.jsx("span",{className:"text-sm font-semibold tracking-tight",children:"Control Center"})]}),k.jsx("nav",{className:"flex flex-col gap-1 px-2",children:Rh.map(D=>k.jsx(Ah,{item:D,active:i===D.id,onClick:()=>s(D.id)},D.id))}),k.jsx("nav",{className:"mt-auto flex flex-col gap-1 border-t px-2 py-2",children:Lh.map(D=>k.jsx(Ah,{item:D,active:i===D.id,onClick:()=>s(D.id)},D.id))}),k.jsx("div",{className:"px-4 py-3 text-[11px] text-muted-foreground",children:"super-line · v1"})]}),k.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[k.jsxs("header",{className:"flex items-center justify-between gap-3 border-b px-4 py-3",children:[k.jsxs("div",{className:"flex items-center gap-2 text-sm font-semibold",children:[q?k.jsx(q.icon,{className:"h-4 w-4 text-muted-foreground"}):null,q==null?void 0:q.label,ee?k.jsx("span",{className:"text-xs font-normal text-muted-foreground",children:ee}):null]}),k.jsxs("div",{className:"flex items-center gap-3",children:[k.jsx(Bm,{status:u}),k.jsxs(Ku,{variant:"muted",children:[c.length," nodes"]}),k.jsxs(Ku,{variant:"muted",children:[F," conns"]})]})]}),k.jsxs("main",{className:"relative min-h-0 flex-1 overflow-hidden",children:[i==="topology"?k.jsxs("div",{className:"flex h-full",children:[k.jsx("div",{className:"min-w-0 flex-1",children:k.jsx(Q_,{topology:c,connections:h,node:y,highlight:S})}),k.jsx(q_,{roles:A,rooms:W,topics:(y==null?void 0:y.topics)??[],transports:G,selected:S,onSelect:E})]}):k.jsxs("div",{className:"h-full overflow-auto p-4",children:[i==="connections"&&k.jsx(oE,{connections:h,selectedId:I,onSelect:N}),i==="contract"&&(v?k.jsx(uE,{contract:v}):k.jsx("p",{className:"text-sm text-muted-foreground",children:"No contract."})),i==="stores"&&k.jsx(hE,{client:a}),i==="feed"&&k.jsx(pE,{events:_,connections:h}),i==="settings"&&k.jsx(gE,{url:t,status:u,onConnect:M}),i==="resources"&&k.jsx(yE,{})]}),i==="connections"&&k.jsx(sE,{client:a,connId:I,onClose:()=>N(null)})]})]})]})}const $h=document.getElementById("root");$h&&Iy.createRoot($h).render(k.jsx(B.StrictMode,{children:k.jsx(wE,{})}));
|