@johnz4021/illuminate 0.3.0 → 0.4.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 +87 -30
- package/dist/cli.mjs +167 -13
- package/package.json +3 -3
- package/viewer/assets/{elk.bundled-Cc32fJO7.js → elk.bundled-BPr-wH-B.js} +2 -2
- package/viewer/assets/{elk.bundled-Cc32fJO7.js.map → elk.bundled-BPr-wH-B.js.map} +1 -1
- package/viewer/assets/index-CO0dIJ7I.css +1 -0
- package/viewer/assets/index-DhDORCdv.js +71 -0
- package/viewer/assets/index-DhDORCdv.js.map +1 -0
- package/viewer/index.html +2 -2
- package/viewer/assets/index-CNRN0YFF.css +0 -1
- package/viewer/assets/index-DQUK_1bX.js +0 -71
- package/viewer/assets/index-DQUK_1bX.js.map +0 -1
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();var hj=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function xh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var wh={exports:{}},Xs={},kh={exports:{}},oe={};/**
|
|
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 ni=Symbol.for("react.element"),Wy=Symbol.for("react.portal"),Uy=Symbol.for("react.fragment"),Yy=Symbol.for("react.strict_mode"),Xy=Symbol.for("react.profiler"),Ky=Symbol.for("react.provider"),Qy=Symbol.for("react.context"),Gy=Symbol.for("react.forward_ref"),qy=Symbol.for("react.suspense"),Zy=Symbol.for("react.memo"),Jy=Symbol.for("react.lazy"),Yc=Symbol.iterator;function ev(e){return e===null||typeof e!="object"?null:(e=Yc&&e[Yc]||e["@@iterator"],typeof e=="function"?e:null)}var Sh={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Nh=Object.assign,Eh={};function Xr(e,t,n){this.props=e,this.context=t,this.refs=Eh,this.updater=n||Sh}Xr.prototype.isReactComponent={};Xr.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Xr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function _h(){}_h.prototype=Xr.prototype;function xu(e,t,n){this.props=e,this.context=t,this.refs=Eh,this.updater=n||Sh}var wu=xu.prototype=new _h;wu.constructor=xu;Nh(wu,Xr.prototype);wu.isPureReactComponent=!0;var Xc=Array.isArray,Ch=Object.prototype.hasOwnProperty,ku={current:null},jh={key:!0,ref:!0,__self:!0,__source:!0};function Mh(e,t,n){var r,o={},i=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(i=""+t.key),t)Ch.call(t,r)&&!jh.hasOwnProperty(r)&&(o[r]=t[r]);var l=arguments.length-2;if(l===1)o.children=n;else if(1<l){for(var a=Array(l),u=0;u<l;u++)a[u]=arguments[u+2];o.children=a}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)o[r]===void 0&&(o[r]=l[r]);return{$$typeof:ni,type:e,key:i,ref:s,props:o,_owner:ku.current}}function tv(e,t){return{$$typeof:ni,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Su(e){return typeof e=="object"&&e!==null&&e.$$typeof===ni}function nv(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Kc=/\/+/g;function Cl(e,t){return typeof e=="object"&&e!==null&&e.key!=null?nv(""+e.key):t.toString(36)}function Ui(e,t,n,r,o){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(i){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case ni:case Wy:s=!0}}if(s)return s=e,o=o(s),e=r===""?"."+Cl(s,0):r,Xc(o)?(n="",e!=null&&(n=e.replace(Kc,"$&/")+"/"),Ui(o,t,n,"",function(u){return u})):o!=null&&(Su(o)&&(o=tv(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(Kc,"$&/")+"/")+e)),t.push(o)),1;if(s=0,r=r===""?".":r+":",Xc(e))for(var l=0;l<e.length;l++){i=e[l];var a=r+Cl(i,l);s+=Ui(i,t,n,a,o)}else if(a=ev(e),typeof a=="function")for(e=a.call(e),l=0;!(i=e.next()).done;)i=i.value,a=r+Cl(i,l++),s+=Ui(i,t,n,a,o);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function vi(e,t,n){if(e==null)return e;var r=[],o=0;return Ui(e,r,"","",function(i){return t.call(n,i,o++)}),r}function rv(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var De={current:null},Yi={transition:null},ov={ReactCurrentDispatcher:De,ReactCurrentBatchConfig:Yi,ReactCurrentOwner:ku};function $h(){throw Error("act(...) is not supported in production builds of React.")}oe.Children={map:vi,forEach:function(e,t,n){vi(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return vi(e,function(){t++}),t},toArray:function(e){return vi(e,function(t){return t})||[]},only:function(e){if(!Su(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};oe.Component=Xr;oe.Fragment=Uy;oe.Profiler=Xy;oe.PureComponent=xu;oe.StrictMode=Yy;oe.Suspense=qy;oe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ov;oe.act=$h;oe.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Nh({},e.props),o=e.key,i=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,s=ku.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(a in t)Ch.call(t,a)&&!jh.hasOwnProperty(a)&&(r[a]=t[a]===void 0&&l!==void 0?l[a]:t[a])}var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){l=Array(a);for(var u=0;u<a;u++)l[u]=arguments[u+2];r.children=l}return{$$typeof:ni,type:e.type,key:o,ref:i,props:r,_owner:s}};oe.createContext=function(e){return e={$$typeof:Qy,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Ky,_context:e},e.Consumer=e};oe.createElement=Mh;oe.createFactory=function(e){var t=Mh.bind(null,e);return t.type=e,t};oe.createRef=function(){return{current:null}};oe.forwardRef=function(e){return{$$typeof:Gy,render:e}};oe.isValidElement=Su;oe.lazy=function(e){return{$$typeof:Jy,_payload:{_status:-1,_result:e},_init:rv}};oe.memo=function(e,t){return{$$typeof:Zy,type:e,compare:t===void 0?null:t}};oe.startTransition=function(e){var t=Yi.transition;Yi.transition={};try{e()}finally{Yi.transition=t}};oe.unstable_act=$h;oe.useCallback=function(e,t){return De.current.useCallback(e,t)};oe.useContext=function(e){return De.current.useContext(e)};oe.useDebugValue=function(){};oe.useDeferredValue=function(e){return De.current.useDeferredValue(e)};oe.useEffect=function(e,t){return De.current.useEffect(e,t)};oe.useId=function(){return De.current.useId()};oe.useImperativeHandle=function(e,t,n){return De.current.useImperativeHandle(e,t,n)};oe.useInsertionEffect=function(e,t){return De.current.useInsertionEffect(e,t)};oe.useLayoutEffect=function(e,t){return De.current.useLayoutEffect(e,t)};oe.useMemo=function(e,t){return De.current.useMemo(e,t)};oe.useReducer=function(e,t,n){return De.current.useReducer(e,t,n)};oe.useRef=function(e){return De.current.useRef(e)};oe.useState=function(e){return De.current.useState(e)};oe.useSyncExternalStore=function(e,t,n){return De.current.useSyncExternalStore(e,t,n)};oe.useTransition=function(){return De.current.useTransition()};oe.version="18.3.1";kh.exports=oe;var I=kh.exports;const iv=xh(I);/**
|
|
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 sv=I,lv=Symbol.for("react.element"),av=Symbol.for("react.fragment"),uv=Object.prototype.hasOwnProperty,cv=sv.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,dv={key:!0,ref:!0,__self:!0,__source:!0};function Ph(e,t,n){var r,o={},i=null,s=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)uv.call(t,r)&&!dv.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:lv,type:e,key:i,ref:s,props:o,_owner:cv.current}}Xs.Fragment=av;Xs.jsx=Ph;Xs.jsxs=Ph;wh.exports=Xs;var f=wh.exports,bh={exports:{}},Je={},Ih={exports:{}},Th={};/**
|
|
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
|
+
*/(function(e){function t($,M){var L=$.length;$.push(M);e:for(;0<L;){var j=L-1>>>1,R=$[j];if(0<o(R,M))$[j]=M,$[L]=R,L=j;else break e}}function n($){return $.length===0?null:$[0]}function r($){if($.length===0)return null;var M=$[0],L=$.pop();if(L!==M){$[0]=L;e:for(var j=0,R=$.length,V=R>>>1;j<V;){var U=2*(j+1)-1,Q=$[U],B=U+1,X=$[B];if(0>o(Q,L))B<R&&0>o(X,Q)?($[j]=X,$[B]=L,j=B):($[j]=Q,$[U]=L,j=U);else if(B<R&&0>o(X,L))$[j]=X,$[B]=L,j=B;else break e}}return M}function o($,M){var L=$.sortIndex-M.sortIndex;return L!==0?L:$.id-M.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var s=Date,l=s.now();e.unstable_now=function(){return s.now()-l}}var a=[],u=[],d=1,h=null,c=3,p=!1,y=!1,x=!1,k=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function g($){for(var M=n(u);M!==null;){if(M.callback===null)r(u);else if(M.startTime<=$)r(u),M.sortIndex=M.expirationTime,t(a,M);else break;M=n(u)}}function w($){if(x=!1,g($),!y)if(n(a)!==null)y=!0,C(_);else{var M=n(u);M!==null&&T(w,M.startTime-$)}}function _($,M){y=!1,x&&(x=!1,m(P),P=-1),p=!0;var L=c;try{for(g(M),h=n(a);h!==null&&(!(h.expirationTime>M)||$&&!A());){var j=h.callback;if(typeof j=="function"){h.callback=null,c=h.priorityLevel;var R=j(h.expirationTime<=M);M=e.unstable_now(),typeof R=="function"?h.callback=R:h===n(a)&&r(a),g(M)}else r(a);h=n(a)}if(h!==null)var V=!0;else{var U=n(u);U!==null&&T(w,U.startTime-M),V=!1}return V}finally{h=null,c=L,p=!1}}var S=!1,E=null,P=-1,b=5,D=-1;function A(){return!(e.unstable_now()-D<b)}function H(){if(E!==null){var $=e.unstable_now();D=$;var M=!0;try{M=E(!0,$)}finally{M?O():(S=!1,E=null)}}else S=!1}var O;if(typeof v=="function")O=function(){v(H)};else if(typeof MessageChannel<"u"){var N=new MessageChannel,z=N.port2;N.port1.onmessage=H,O=function(){z.postMessage(null)}}else O=function(){k(H,0)};function C($){E=$,S||(S=!0,O())}function T($,M){P=k(function(){$(e.unstable_now())},M)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function($){$.callback=null},e.unstable_continueExecution=function(){y||p||(y=!0,C(_))},e.unstable_forceFrameRate=function($){0>$||125<$?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):b=0<$?Math.floor(1e3/$):5},e.unstable_getCurrentPriorityLevel=function(){return c},e.unstable_getFirstCallbackNode=function(){return n(a)},e.unstable_next=function($){switch(c){case 1:case 2:case 3:var M=3;break;default:M=c}var L=c;c=M;try{return $()}finally{c=L}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function($,M){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var L=c;c=$;try{return M()}finally{c=L}},e.unstable_scheduleCallback=function($,M,L){var j=e.unstable_now();switch(typeof L=="object"&&L!==null?(L=L.delay,L=typeof L=="number"&&0<L?j+L:j):L=j,$){case 1:var R=-1;break;case 2:R=250;break;case 5:R=1073741823;break;case 4:R=1e4;break;default:R=5e3}return R=L+R,$={id:d++,callback:M,priorityLevel:$,startTime:L,expirationTime:R,sortIndex:-1},L>j?($.sortIndex=L,t(u,$),n(a)===null&&$===n(u)&&(x?(m(P),P=-1):x=!0,T(w,L-j))):($.sortIndex=R,t(a,$),y||p||(y=!0,C(_))),$},e.unstable_shouldYield=A,e.unstable_wrapCallback=function($){var M=c;return function(){var L=c;c=M;try{return $.apply(this,arguments)}finally{c=L}}}})(Th);Ih.exports=Th;var fv=Ih.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 hv=I,qe=fv;function W(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var zh=new Set,jo={};function tr(e,t){Pr(e,t),Pr(e+"Capture",t)}function Pr(e,t){for(jo[e]=t,e=0;e<t.length;e++)zh.add(t[e])}var Xt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ua=Object.prototype.hasOwnProperty,pv=/^[: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]*$/,Qc={},Gc={};function mv(e){return ua.call(Gc,e)?!0:ua.call(Qc,e)?!1:pv.test(e)?Gc[e]=!0:(Qc[e]=!0,!1)}function gv(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function yv(e,t,n,r){if(t===null||typeof t>"u"||gv(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Oe(e,t,n,r,o,i,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var Pe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Pe[e]=new Oe(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Pe[t]=new Oe(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Pe[e]=new Oe(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Pe[e]=new Oe(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Pe[e]=new Oe(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Pe[e]=new Oe(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Pe[e]=new Oe(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Pe[e]=new Oe(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Pe[e]=new Oe(e,5,!1,e.toLowerCase(),null,!1,!1)});var Nu=/[\-:]([a-z])/g;function Eu(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Nu,Eu);Pe[t]=new Oe(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Nu,Eu);Pe[t]=new Oe(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Nu,Eu);Pe[t]=new Oe(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Pe[e]=new Oe(e,1,!1,e.toLowerCase(),null,!1,!1)});Pe.xlinkHref=new Oe("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Pe[e]=new Oe(e,1,!1,e.toLowerCase(),null,!0,!0)});function _u(e,t,n,r){var o=Pe.hasOwnProperty(t)?Pe[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(yv(t,n,o,r)&&(n=null),r||o===null?mv(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=n===null?o.type===3?!1:"":n:(t=o.attributeName,r=o.attributeNamespace,n===null?e.removeAttribute(t):(o=o.type,n=o===3||o===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Zt=hv.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,xi=Symbol.for("react.element"),ur=Symbol.for("react.portal"),cr=Symbol.for("react.fragment"),Cu=Symbol.for("react.strict_mode"),ca=Symbol.for("react.profiler"),Lh=Symbol.for("react.provider"),Ah=Symbol.for("react.context"),ju=Symbol.for("react.forward_ref"),da=Symbol.for("react.suspense"),fa=Symbol.for("react.suspense_list"),Mu=Symbol.for("react.memo"),nn=Symbol.for("react.lazy"),Rh=Symbol.for("react.offscreen"),qc=Symbol.iterator;function qr(e){return e===null||typeof e!="object"?null:(e=qc&&e[qc]||e["@@iterator"],typeof e=="function"?e:null)}var ge=Object.assign,jl;function lo(e){if(jl===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);jl=t&&t[1]||""}return`
|
|
34
|
+
`+jl+e}var Ml=!1;function $l(e,t){if(!e||Ml)return"";Ml=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var o=u.stack.split(`
|
|
35
|
+
`),i=r.stack.split(`
|
|
36
|
+
`),s=o.length-1,l=i.length-1;1<=s&&0<=l&&o[s]!==i[l];)l--;for(;1<=s&&0<=l;s--,l--)if(o[s]!==i[l]){if(s!==1||l!==1)do if(s--,l--,0>l||o[s]!==i[l]){var a=`
|
|
37
|
+
`+o[s].replace(" at new "," at ");return e.displayName&&a.includes("<anonymous>")&&(a=a.replace("<anonymous>",e.displayName)),a}while(1<=s&&0<=l);break}}}finally{Ml=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?lo(e):""}function vv(e){switch(e.tag){case 5:return lo(e.type);case 16:return lo("Lazy");case 13:return lo("Suspense");case 19:return lo("SuspenseList");case 0:case 2:case 15:return e=$l(e.type,!1),e;case 11:return e=$l(e.type.render,!1),e;case 1:return e=$l(e.type,!0),e;default:return""}}function ha(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 cr:return"Fragment";case ur:return"Portal";case ca:return"Profiler";case Cu:return"StrictMode";case da:return"Suspense";case fa:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Ah:return(e.displayName||"Context")+".Consumer";case Lh:return(e._context.displayName||"Context")+".Provider";case ju:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Mu:return t=e.displayName||null,t!==null?t:ha(e.type)||"Memo";case nn:t=e._payload,e=e._init;try{return ha(e(t))}catch{}}return null}function xv(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ha(t);case 8:return t===Cu?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function wn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Dh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function wv(e){var t=Dh(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){r=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function wi(e){e._valueTracker||(e._valueTracker=wv(e))}function Oh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Dh(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function us(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 pa(e,t){var n=t.checked;return ge({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Zc(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=wn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Fh(e,t){t=t.checked,t!=null&&_u(e,"checked",t,!1)}function ma(e,t){Fh(e,t);var n=wn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ga(e,t.type,n):t.hasOwnProperty("defaultValue")&&ga(e,t.type,wn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Jc(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function ga(e,t,n){(t!=="number"||us(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ao=Array.isArray;function Sr(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+wn(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function ya(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(W(91));return ge({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ed(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(W(92));if(ao(n)){if(1<n.length)throw Error(W(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:wn(n)}}function Hh(e,t){var n=wn(t.value),r=wn(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function td(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Bh(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 va(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Bh(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var ki,Vh=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(ki=ki||document.createElement("div"),ki.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ki.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Mo(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var mo={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},kv=["Webkit","ms","Moz","O"];Object.keys(mo).forEach(function(e){kv.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),mo[t]=mo[e]})});function Wh(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||mo.hasOwnProperty(e)&&mo[e]?(""+t).trim():t+"px"}function Uh(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=Wh(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var Sv=ge({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 xa(e,t){if(t){if(Sv[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(W(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(W(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(W(61))}if(t.style!=null&&typeof t.style!="object")throw Error(W(62))}}function wa(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ka=null;function $u(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Sa=null,Nr=null,Er=null;function nd(e){if(e=ii(e)){if(typeof Sa!="function")throw Error(W(280));var t=e.stateNode;t&&(t=Zs(t),Sa(e.stateNode,e.type,t))}}function Yh(e){Nr?Er?Er.push(e):Er=[e]:Nr=e}function Xh(){if(Nr){var e=Nr,t=Er;if(Er=Nr=null,nd(e),t)for(e=0;e<t.length;e++)nd(t[e])}}function Kh(e,t){return e(t)}function Qh(){}var Pl=!1;function Gh(e,t,n){if(Pl)return e(t,n);Pl=!0;try{return Kh(e,t,n)}finally{Pl=!1,(Nr!==null||Er!==null)&&(Qh(),Xh())}}function $o(e,t){var n=e.stateNode;if(n===null)return null;var r=Zs(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(W(231,t,typeof n));return n}var Na=!1;if(Xt)try{var Zr={};Object.defineProperty(Zr,"passive",{get:function(){Na=!0}}),window.addEventListener("test",Zr,Zr),window.removeEventListener("test",Zr,Zr)}catch{Na=!1}function Nv(e,t,n,r,o,i,s,l,a){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(d){this.onError(d)}}var go=!1,cs=null,ds=!1,Ea=null,Ev={onError:function(e){go=!0,cs=e}};function _v(e,t,n,r,o,i,s,l,a){go=!1,cs=null,Nv.apply(Ev,arguments)}function Cv(e,t,n,r,o,i,s,l,a){if(_v.apply(this,arguments),go){if(go){var u=cs;go=!1,cs=null}else throw Error(W(198));ds||(ds=!0,Ea=u)}}function nr(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function qh(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function rd(e){if(nr(e)!==e)throw Error(W(188))}function jv(e){var t=e.alternate;if(!t){if(t=nr(e),t===null)throw Error(W(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var i=o.alternate;if(i===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return rd(o),e;if(i===r)return rd(o),t;i=i.sibling}throw Error(W(188))}if(n.return!==r.return)n=o,r=i;else{for(var s=!1,l=o.child;l;){if(l===n){s=!0,n=o,r=i;break}if(l===r){s=!0,r=o,n=i;break}l=l.sibling}if(!s){for(l=i.child;l;){if(l===n){s=!0,n=i,r=o;break}if(l===r){s=!0,r=i,n=o;break}l=l.sibling}if(!s)throw Error(W(189))}}if(n.alternate!==r)throw Error(W(190))}if(n.tag!==3)throw Error(W(188));return n.stateNode.current===n?e:t}function Zh(e){return e=jv(e),e!==null?Jh(e):null}function Jh(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Jh(e);if(t!==null)return t;e=e.sibling}return null}var ep=qe.unstable_scheduleCallback,od=qe.unstable_cancelCallback,Mv=qe.unstable_shouldYield,$v=qe.unstable_requestPaint,xe=qe.unstable_now,Pv=qe.unstable_getCurrentPriorityLevel,Pu=qe.unstable_ImmediatePriority,tp=qe.unstable_UserBlockingPriority,fs=qe.unstable_NormalPriority,bv=qe.unstable_LowPriority,np=qe.unstable_IdlePriority,Ks=null,It=null;function Iv(e){if(It&&typeof It.onCommitFiberRoot=="function")try{It.onCommitFiberRoot(Ks,e,void 0,(e.current.flags&128)===128)}catch{}}var xt=Math.clz32?Math.clz32:Lv,Tv=Math.log,zv=Math.LN2;function Lv(e){return e>>>=0,e===0?32:31-(Tv(e)/zv|0)|0}var Si=64,Ni=4194304;function uo(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 hs(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,s=n&268435455;if(s!==0){var l=s&~o;l!==0?r=uo(l):(i&=s,i!==0&&(r=uo(i)))}else s=n&~o,s!==0?r=uo(s):i!==0&&(r=uo(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-xt(t),o=1<<n,r|=e[n],t&=~o;return r}function Av(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Rv(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var s=31-xt(i),l=1<<s,a=o[s];a===-1?(!(l&n)||l&r)&&(o[s]=Av(l,t)):a<=t&&(e.expiredLanes|=l),i&=~l}}function _a(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function rp(){var e=Si;return Si<<=1,!(Si&4194240)&&(Si=64),e}function bl(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ri(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-xt(t),e[t]=n}function Dv(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-xt(n),i=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~i}}function bu(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-xt(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var ae=0;function op(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var ip,Iu,sp,lp,ap,Ca=!1,Ei=[],fn=null,hn=null,pn=null,Po=new Map,bo=new Map,ln=[],Ov="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 id(e,t){switch(e){case"focusin":case"focusout":fn=null;break;case"dragenter":case"dragleave":hn=null;break;case"mouseover":case"mouseout":pn=null;break;case"pointerover":case"pointerout":Po.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":bo.delete(t.pointerId)}}function Jr(e,t,n,r,o,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[o]},t!==null&&(t=ii(t),t!==null&&Iu(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function Fv(e,t,n,r,o){switch(t){case"focusin":return fn=Jr(fn,e,t,n,r,o),!0;case"dragenter":return hn=Jr(hn,e,t,n,r,o),!0;case"mouseover":return pn=Jr(pn,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return Po.set(i,Jr(Po.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,bo.set(i,Jr(bo.get(i)||null,e,t,n,r,o)),!0}return!1}function up(e){var t=In(e.target);if(t!==null){var n=nr(t);if(n!==null){if(t=n.tag,t===13){if(t=qh(n),t!==null){e.blockedOn=t,ap(e.priority,function(){sp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Xi(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=ja(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);ka=r,n.target.dispatchEvent(r),ka=null}else return t=ii(n),t!==null&&Iu(t),e.blockedOn=n,!1;t.shift()}return!0}function sd(e,t,n){Xi(e)&&n.delete(t)}function Hv(){Ca=!1,fn!==null&&Xi(fn)&&(fn=null),hn!==null&&Xi(hn)&&(hn=null),pn!==null&&Xi(pn)&&(pn=null),Po.forEach(sd),bo.forEach(sd)}function eo(e,t){e.blockedOn===t&&(e.blockedOn=null,Ca||(Ca=!0,qe.unstable_scheduleCallback(qe.unstable_NormalPriority,Hv)))}function Io(e){function t(o){return eo(o,e)}if(0<Ei.length){eo(Ei[0],e);for(var n=1;n<Ei.length;n++){var r=Ei[n];r.blockedOn===e&&(r.blockedOn=null)}}for(fn!==null&&eo(fn,e),hn!==null&&eo(hn,e),pn!==null&&eo(pn,e),Po.forEach(t),bo.forEach(t),n=0;n<ln.length;n++)r=ln[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<ln.length&&(n=ln[0],n.blockedOn===null);)up(n),n.blockedOn===null&&ln.shift()}var _r=Zt.ReactCurrentBatchConfig,ps=!0;function Bv(e,t,n,r){var o=ae,i=_r.transition;_r.transition=null;try{ae=1,Tu(e,t,n,r)}finally{ae=o,_r.transition=i}}function Vv(e,t,n,r){var o=ae,i=_r.transition;_r.transition=null;try{ae=4,Tu(e,t,n,r)}finally{ae=o,_r.transition=i}}function Tu(e,t,n,r){if(ps){var o=ja(e,t,n,r);if(o===null)Hl(e,t,r,ms,n),id(e,r);else if(Fv(o,e,t,n,r))r.stopPropagation();else if(id(e,r),t&4&&-1<Ov.indexOf(e)){for(;o!==null;){var i=ii(o);if(i!==null&&ip(i),i=ja(e,t,n,r),i===null&&Hl(e,t,r,ms,n),i===o)break;o=i}o!==null&&r.stopPropagation()}else Hl(e,t,r,null,n)}}var ms=null;function ja(e,t,n,r){if(ms=null,e=$u(r),e=In(e),e!==null)if(t=nr(e),t===null)e=null;else if(n=t.tag,n===13){if(e=qh(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return ms=e,null}function cp(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(Pv()){case Pu:return 1;case tp:return 4;case fs:case bv:return 16;case np:return 536870912;default:return 16}default:return 16}}var cn=null,zu=null,Ki=null;function dp(){if(Ki)return Ki;var e,t=zu,n=t.length,r,o="value"in cn?cn.value:cn.textContent,i=o.length;for(e=0;e<n&&t[e]===o[e];e++);var s=n-e;for(r=1;r<=s&&t[n-r]===o[i-r];r++);return Ki=o.slice(e,1<r?1-r:void 0)}function Qi(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function _i(){return!0}function ld(){return!1}function et(e){function t(n,r,o,i,s){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=i,this.target=s,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(i):i[l]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?_i:ld,this.isPropagationStopped=ld,this}return ge(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=_i)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=_i)},persist:function(){},isPersistent:_i}),t}var Kr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Lu=et(Kr),oi=ge({},Kr,{view:0,detail:0}),Wv=et(oi),Il,Tl,to,Qs=ge({},oi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Au,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!==to&&(to&&e.type==="mousemove"?(Il=e.screenX-to.screenX,Tl=e.screenY-to.screenY):Tl=Il=0,to=e),Il)},movementY:function(e){return"movementY"in e?e.movementY:Tl}}),ad=et(Qs),Uv=ge({},Qs,{dataTransfer:0}),Yv=et(Uv),Xv=ge({},oi,{relatedTarget:0}),zl=et(Xv),Kv=ge({},Kr,{animationName:0,elapsedTime:0,pseudoElement:0}),Qv=et(Kv),Gv=ge({},Kr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),qv=et(Gv),Zv=ge({},Kr,{data:0}),ud=et(Zv),Jv={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ex={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"},tx={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function nx(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=tx[e])?!!t[e]:!1}function Au(){return nx}var rx=ge({},oi,{key:function(e){if(e.key){var t=Jv[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Qi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?ex[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Au,charCode:function(e){return e.type==="keypress"?Qi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Qi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),ox=et(rx),ix=ge({},Qs,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),cd=et(ix),sx=ge({},oi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Au}),lx=et(sx),ax=ge({},Kr,{propertyName:0,elapsedTime:0,pseudoElement:0}),ux=et(ax),cx=ge({},Qs,{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}),dx=et(cx),fx=[9,13,27,32],Ru=Xt&&"CompositionEvent"in window,yo=null;Xt&&"documentMode"in document&&(yo=document.documentMode);var hx=Xt&&"TextEvent"in window&&!yo,fp=Xt&&(!Ru||yo&&8<yo&&11>=yo),dd=" ",fd=!1;function hp(e,t){switch(e){case"keyup":return fx.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function pp(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var dr=!1;function px(e,t){switch(e){case"compositionend":return pp(t);case"keypress":return t.which!==32?null:(fd=!0,dd);case"textInput":return e=t.data,e===dd&&fd?null:e;default:return null}}function mx(e,t){if(dr)return e==="compositionend"||!Ru&&hp(e,t)?(e=dp(),Ki=zu=cn=null,dr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return fp&&t.locale!=="ko"?null:t.data;default:return null}}var gx={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 hd(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!gx[e.type]:t==="textarea"}function mp(e,t,n,r){Yh(r),t=gs(t,"onChange"),0<t.length&&(n=new Lu("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var vo=null,To=null;function yx(e){Cp(e,0)}function Gs(e){var t=pr(e);if(Oh(t))return e}function vx(e,t){if(e==="change")return t}var gp=!1;if(Xt){var Ll;if(Xt){var Al="oninput"in document;if(!Al){var pd=document.createElement("div");pd.setAttribute("oninput","return;"),Al=typeof pd.oninput=="function"}Ll=Al}else Ll=!1;gp=Ll&&(!document.documentMode||9<document.documentMode)}function md(){vo&&(vo.detachEvent("onpropertychange",yp),To=vo=null)}function yp(e){if(e.propertyName==="value"&&Gs(To)){var t=[];mp(t,To,e,$u(e)),Gh(yx,t)}}function xx(e,t,n){e==="focusin"?(md(),vo=t,To=n,vo.attachEvent("onpropertychange",yp)):e==="focusout"&&md()}function wx(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Gs(To)}function kx(e,t){if(e==="click")return Gs(t)}function Sx(e,t){if(e==="input"||e==="change")return Gs(t)}function Nx(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var St=typeof Object.is=="function"?Object.is:Nx;function zo(e,t){if(St(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!ua.call(t,o)||!St(e[o],t[o]))return!1}return!0}function gd(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function yd(e,t){var n=gd(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=gd(n)}}function vp(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?vp(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function xp(){for(var e=window,t=us();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=us(e.document)}return t}function Du(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Ex(e){var t=xp(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&vp(n.ownerDocument.documentElement,n)){if(r!==null&&Du(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=yd(n,i);var s=yd(n,r);o&&s&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var _x=Xt&&"documentMode"in document&&11>=document.documentMode,fr=null,Ma=null,xo=null,$a=!1;function vd(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;$a||fr==null||fr!==us(r)||(r=fr,"selectionStart"in r&&Du(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),xo&&zo(xo,r)||(xo=r,r=gs(Ma,"onSelect"),0<r.length&&(t=new Lu("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=fr)))}function Ci(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var hr={animationend:Ci("Animation","AnimationEnd"),animationiteration:Ci("Animation","AnimationIteration"),animationstart:Ci("Animation","AnimationStart"),transitionend:Ci("Transition","TransitionEnd")},Rl={},wp={};Xt&&(wp=document.createElement("div").style,"AnimationEvent"in window||(delete hr.animationend.animation,delete hr.animationiteration.animation,delete hr.animationstart.animation),"TransitionEvent"in window||delete hr.transitionend.transition);function qs(e){if(Rl[e])return Rl[e];if(!hr[e])return e;var t=hr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in wp)return Rl[e]=t[n];return e}var kp=qs("animationend"),Sp=qs("animationiteration"),Np=qs("animationstart"),Ep=qs("transitionend"),_p=new Map,xd="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Nn(e,t){_p.set(e,t),tr(t,[e])}for(var Dl=0;Dl<xd.length;Dl++){var Ol=xd[Dl],Cx=Ol.toLowerCase(),jx=Ol[0].toUpperCase()+Ol.slice(1);Nn(Cx,"on"+jx)}Nn(kp,"onAnimationEnd");Nn(Sp,"onAnimationIteration");Nn(Np,"onAnimationStart");Nn("dblclick","onDoubleClick");Nn("focusin","onFocus");Nn("focusout","onBlur");Nn(Ep,"onTransitionEnd");Pr("onMouseEnter",["mouseout","mouseover"]);Pr("onMouseLeave",["mouseout","mouseover"]);Pr("onPointerEnter",["pointerout","pointerover"]);Pr("onPointerLeave",["pointerout","pointerover"]);tr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));tr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));tr("onBeforeInput",["compositionend","keypress","textInput","paste"]);tr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));tr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));tr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var co="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(" "),Mx=new Set("cancel close invalid load scroll toggle".split(" ").concat(co));function wd(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Cv(r,t,void 0,e),e.currentTarget=null}function Cp(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var s=r.length-1;0<=s;s--){var l=r[s],a=l.instance,u=l.currentTarget;if(l=l.listener,a!==i&&o.isPropagationStopped())break e;wd(o,l,u),i=a}else for(s=0;s<r.length;s++){if(l=r[s],a=l.instance,u=l.currentTarget,l=l.listener,a!==i&&o.isPropagationStopped())break e;wd(o,l,u),i=a}}}if(ds)throw e=Ea,ds=!1,Ea=null,e}function ce(e,t){var n=t[za];n===void 0&&(n=t[za]=new Set);var r=e+"__bubble";n.has(r)||(jp(t,e,2,!1),n.add(r))}function Fl(e,t,n){var r=0;t&&(r|=4),jp(n,e,r,t)}var ji="_reactListening"+Math.random().toString(36).slice(2);function Lo(e){if(!e[ji]){e[ji]=!0,zh.forEach(function(n){n!=="selectionchange"&&(Mx.has(n)||Fl(n,!1,e),Fl(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ji]||(t[ji]=!0,Fl("selectionchange",!1,t))}}function jp(e,t,n,r){switch(cp(t)){case 1:var o=Bv;break;case 4:o=Vv;break;default:o=Tu}n=o.bind(null,t,n,e),o=void 0,!Na||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function Hl(e,t,n,r,o){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var l=r.stateNode.containerInfo;if(l===o||l.nodeType===8&&l.parentNode===o)break;if(s===4)for(s=r.return;s!==null;){var a=s.tag;if((a===3||a===4)&&(a=s.stateNode.containerInfo,a===o||a.nodeType===8&&a.parentNode===o))return;s=s.return}for(;l!==null;){if(s=In(l),s===null)return;if(a=s.tag,a===5||a===6){r=i=s;continue e}l=l.parentNode}}r=r.return}Gh(function(){var u=i,d=$u(n),h=[];e:{var c=_p.get(e);if(c!==void 0){var p=Lu,y=e;switch(e){case"keypress":if(Qi(n)===0)break e;case"keydown":case"keyup":p=ox;break;case"focusin":y="focus",p=zl;break;case"focusout":y="blur",p=zl;break;case"beforeblur":case"afterblur":p=zl;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=ad;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=Yv;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=lx;break;case kp:case Sp:case Np:p=Qv;break;case Ep:p=ux;break;case"scroll":p=Wv;break;case"wheel":p=dx;break;case"copy":case"cut":case"paste":p=qv;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=cd}var x=(t&4)!==0,k=!x&&e==="scroll",m=x?c!==null?c+"Capture":null:c;x=[];for(var v=u,g;v!==null;){g=v;var w=g.stateNode;if(g.tag===5&&w!==null&&(g=w,m!==null&&(w=$o(v,m),w!=null&&x.push(Ao(v,w,g)))),k)break;v=v.return}0<x.length&&(c=new p(c,y,null,n,d),h.push({event:c,listeners:x}))}}if(!(t&7)){e:{if(c=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",c&&n!==ka&&(y=n.relatedTarget||n.fromElement)&&(In(y)||y[Kt]))break e;if((p||c)&&(c=d.window===d?d:(c=d.ownerDocument)?c.defaultView||c.parentWindow:window,p?(y=n.relatedTarget||n.toElement,p=u,y=y?In(y):null,y!==null&&(k=nr(y),y!==k||y.tag!==5&&y.tag!==6)&&(y=null)):(p=null,y=u),p!==y)){if(x=ad,w="onMouseLeave",m="onMouseEnter",v="mouse",(e==="pointerout"||e==="pointerover")&&(x=cd,w="onPointerLeave",m="onPointerEnter",v="pointer"),k=p==null?c:pr(p),g=y==null?c:pr(y),c=new x(w,v+"leave",p,n,d),c.target=k,c.relatedTarget=g,w=null,In(d)===u&&(x=new x(m,v+"enter",y,n,d),x.target=g,x.relatedTarget=k,w=x),k=w,p&&y)t:{for(x=p,m=y,v=0,g=x;g;g=rr(g))v++;for(g=0,w=m;w;w=rr(w))g++;for(;0<v-g;)x=rr(x),v--;for(;0<g-v;)m=rr(m),g--;for(;v--;){if(x===m||m!==null&&x===m.alternate)break t;x=rr(x),m=rr(m)}x=null}else x=null;p!==null&&kd(h,c,p,x,!1),y!==null&&k!==null&&kd(h,k,y,x,!0)}}e:{if(c=u?pr(u):window,p=c.nodeName&&c.nodeName.toLowerCase(),p==="select"||p==="input"&&c.type==="file")var _=vx;else if(hd(c))if(gp)_=Sx;else{_=wx;var S=xx}else(p=c.nodeName)&&p.toLowerCase()==="input"&&(c.type==="checkbox"||c.type==="radio")&&(_=kx);if(_&&(_=_(e,u))){mp(h,_,n,d);break e}S&&S(e,c,u),e==="focusout"&&(S=c._wrapperState)&&S.controlled&&c.type==="number"&&ga(c,"number",c.value)}switch(S=u?pr(u):window,e){case"focusin":(hd(S)||S.contentEditable==="true")&&(fr=S,Ma=u,xo=null);break;case"focusout":xo=Ma=fr=null;break;case"mousedown":$a=!0;break;case"contextmenu":case"mouseup":case"dragend":$a=!1,vd(h,n,d);break;case"selectionchange":if(_x)break;case"keydown":case"keyup":vd(h,n,d)}var E;if(Ru)e:{switch(e){case"compositionstart":var P="onCompositionStart";break e;case"compositionend":P="onCompositionEnd";break e;case"compositionupdate":P="onCompositionUpdate";break e}P=void 0}else dr?hp(e,n)&&(P="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(P="onCompositionStart");P&&(fp&&n.locale!=="ko"&&(dr||P!=="onCompositionStart"?P==="onCompositionEnd"&&dr&&(E=dp()):(cn=d,zu="value"in cn?cn.value:cn.textContent,dr=!0)),S=gs(u,P),0<S.length&&(P=new ud(P,e,null,n,d),h.push({event:P,listeners:S}),E?P.data=E:(E=pp(n),E!==null&&(P.data=E)))),(E=hx?px(e,n):mx(e,n))&&(u=gs(u,"onBeforeInput"),0<u.length&&(d=new ud("onBeforeInput","beforeinput",null,n,d),h.push({event:d,listeners:u}),d.data=E))}Cp(h,t)})}function Ao(e,t,n){return{instance:e,listener:t,currentTarget:n}}function gs(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=$o(e,n),i!=null&&r.unshift(Ao(e,i,o)),i=$o(e,t),i!=null&&r.push(Ao(e,i,o))),e=e.return}return r}function rr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function kd(e,t,n,r,o){for(var i=t._reactName,s=[];n!==null&&n!==r;){var l=n,a=l.alternate,u=l.stateNode;if(a!==null&&a===r)break;l.tag===5&&u!==null&&(l=u,o?(a=$o(n,i),a!=null&&s.unshift(Ao(n,a,l))):o||(a=$o(n,i),a!=null&&s.push(Ao(n,a,l)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var $x=/\r\n?/g,Px=/\u0000|\uFFFD/g;function Sd(e){return(typeof e=="string"?e:""+e).replace($x,`
|
|
38
|
+
`).replace(Px,"")}function Mi(e,t,n){if(t=Sd(t),Sd(e)!==t&&n)throw Error(W(425))}function ys(){}var Pa=null,ba=null;function Ia(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Ta=typeof setTimeout=="function"?setTimeout:void 0,bx=typeof clearTimeout=="function"?clearTimeout:void 0,Nd=typeof Promise=="function"?Promise:void 0,Ix=typeof queueMicrotask=="function"?queueMicrotask:typeof Nd<"u"?function(e){return Nd.resolve(null).then(e).catch(Tx)}:Ta;function Tx(e){setTimeout(function(){throw e})}function Bl(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(r===0){e.removeChild(o),Io(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);Io(t)}function mn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Ed(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Qr=Math.random().toString(36).slice(2),$t="__reactFiber$"+Qr,Ro="__reactProps$"+Qr,Kt="__reactContainer$"+Qr,za="__reactEvents$"+Qr,zx="__reactListeners$"+Qr,Lx="__reactHandles$"+Qr;function In(e){var t=e[$t];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Kt]||n[$t]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Ed(e);e!==null;){if(n=e[$t])return n;e=Ed(e)}return t}e=n,n=e.parentNode}return null}function ii(e){return e=e[$t]||e[Kt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function pr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(W(33))}function Zs(e){return e[Ro]||null}var La=[],mr=-1;function En(e){return{current:e}}function de(e){0>mr||(e.current=La[mr],La[mr]=null,mr--)}function ue(e,t){mr++,La[mr]=e.current,e.current=t}var kn={},ze=En(kn),We=En(!1),Un=kn;function br(e,t){var n=e.type.contextTypes;if(!n)return kn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Ue(e){return e=e.childContextTypes,e!=null}function vs(){de(We),de(ze)}function _d(e,t,n){if(ze.current!==kn)throw Error(W(168));ue(ze,t),ue(We,n)}function Mp(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(W(108,xv(e)||"Unknown",o));return ge({},n,r)}function xs(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||kn,Un=ze.current,ue(ze,e),ue(We,We.current),!0}function Cd(e,t,n){var r=e.stateNode;if(!r)throw Error(W(169));n?(e=Mp(e,t,Un),r.__reactInternalMemoizedMergedChildContext=e,de(We),de(ze),ue(ze,e)):de(We),ue(We,n)}var Ht=null,Js=!1,Vl=!1;function $p(e){Ht===null?Ht=[e]:Ht.push(e)}function Ax(e){Js=!0,$p(e)}function _n(){if(!Vl&&Ht!==null){Vl=!0;var e=0,t=ae;try{var n=Ht;for(ae=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Ht=null,Js=!1}catch(o){throw Ht!==null&&(Ht=Ht.slice(e+1)),ep(Pu,_n),o}finally{ae=t,Vl=!1}}return null}var gr=[],yr=0,ws=null,ks=0,nt=[],rt=0,Yn=null,Bt=1,Vt="";function $n(e,t){gr[yr++]=ks,gr[yr++]=ws,ws=e,ks=t}function Pp(e,t,n){nt[rt++]=Bt,nt[rt++]=Vt,nt[rt++]=Yn,Yn=e;var r=Bt;e=Vt;var o=32-xt(r)-1;r&=~(1<<o),n+=1;var i=32-xt(t)+o;if(30<i){var s=o-o%5;i=(r&(1<<s)-1).toString(32),r>>=s,o-=s,Bt=1<<32-xt(t)+o|n<<o|r,Vt=i+e}else Bt=1<<i|n<<o|r,Vt=e}function Ou(e){e.return!==null&&($n(e,1),Pp(e,1,0))}function Fu(e){for(;e===ws;)ws=gr[--yr],gr[yr]=null,ks=gr[--yr],gr[yr]=null;for(;e===Yn;)Yn=nt[--rt],nt[rt]=null,Vt=nt[--rt],nt[rt]=null,Bt=nt[--rt],nt[rt]=null}var Ge=null,Qe=null,he=!1,mt=null;function bp(e,t){var n=ot(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function jd(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Ge=e,Qe=mn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ge=e,Qe=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Yn!==null?{id:Bt,overflow:Vt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=ot(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Ge=e,Qe=null,!0):!1;default:return!1}}function Aa(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Ra(e){if(he){var t=Qe;if(t){var n=t;if(!jd(e,t)){if(Aa(e))throw Error(W(418));t=mn(n.nextSibling);var r=Ge;t&&jd(e,t)?bp(r,n):(e.flags=e.flags&-4097|2,he=!1,Ge=e)}}else{if(Aa(e))throw Error(W(418));e.flags=e.flags&-4097|2,he=!1,Ge=e}}}function Md(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ge=e}function $i(e){if(e!==Ge)return!1;if(!he)return Md(e),he=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Ia(e.type,e.memoizedProps)),t&&(t=Qe)){if(Aa(e))throw Ip(),Error(W(418));for(;t;)bp(e,t),t=mn(t.nextSibling)}if(Md(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(W(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Qe=mn(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Qe=null}}else Qe=Ge?mn(e.stateNode.nextSibling):null;return!0}function Ip(){for(var e=Qe;e;)e=mn(e.nextSibling)}function Ir(){Qe=Ge=null,he=!1}function Hu(e){mt===null?mt=[e]:mt.push(e)}var Rx=Zt.ReactCurrentBatchConfig;function no(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(W(309));var r=n.stateNode}if(!r)throw Error(W(147,e));var o=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(s){var l=o.refs;s===null?delete l[i]:l[i]=s},t._stringRef=i,t)}if(typeof e!="string")throw Error(W(284));if(!n._owner)throw Error(W(290,e))}return e}function Pi(e,t){throw e=Object.prototype.toString.call(t),Error(W(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function $d(e){var t=e._init;return t(e._payload)}function Tp(e){function t(m,v){if(e){var g=m.deletions;g===null?(m.deletions=[v],m.flags|=16):g.push(v)}}function n(m,v){if(!e)return null;for(;v!==null;)t(m,v),v=v.sibling;return null}function r(m,v){for(m=new Map;v!==null;)v.key!==null?m.set(v.key,v):m.set(v.index,v),v=v.sibling;return m}function o(m,v){return m=xn(m,v),m.index=0,m.sibling=null,m}function i(m,v,g){return m.index=g,e?(g=m.alternate,g!==null?(g=g.index,g<v?(m.flags|=2,v):g):(m.flags|=2,v)):(m.flags|=1048576,v)}function s(m){return e&&m.alternate===null&&(m.flags|=2),m}function l(m,v,g,w){return v===null||v.tag!==6?(v=Gl(g,m.mode,w),v.return=m,v):(v=o(v,g),v.return=m,v)}function a(m,v,g,w){var _=g.type;return _===cr?d(m,v,g.props.children,w,g.key):v!==null&&(v.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===nn&&$d(_)===v.type)?(w=o(v,g.props),w.ref=no(m,v,g),w.return=m,w):(w=ns(g.type,g.key,g.props,null,m.mode,w),w.ref=no(m,v,g),w.return=m,w)}function u(m,v,g,w){return v===null||v.tag!==4||v.stateNode.containerInfo!==g.containerInfo||v.stateNode.implementation!==g.implementation?(v=ql(g,m.mode,w),v.return=m,v):(v=o(v,g.children||[]),v.return=m,v)}function d(m,v,g,w,_){return v===null||v.tag!==7?(v=On(g,m.mode,w,_),v.return=m,v):(v=o(v,g),v.return=m,v)}function h(m,v,g){if(typeof v=="string"&&v!==""||typeof v=="number")return v=Gl(""+v,m.mode,g),v.return=m,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case xi:return g=ns(v.type,v.key,v.props,null,m.mode,g),g.ref=no(m,null,v),g.return=m,g;case ur:return v=ql(v,m.mode,g),v.return=m,v;case nn:var w=v._init;return h(m,w(v._payload),g)}if(ao(v)||qr(v))return v=On(v,m.mode,g,null),v.return=m,v;Pi(m,v)}return null}function c(m,v,g,w){var _=v!==null?v.key:null;if(typeof g=="string"&&g!==""||typeof g=="number")return _!==null?null:l(m,v,""+g,w);if(typeof g=="object"&&g!==null){switch(g.$$typeof){case xi:return g.key===_?a(m,v,g,w):null;case ur:return g.key===_?u(m,v,g,w):null;case nn:return _=g._init,c(m,v,_(g._payload),w)}if(ao(g)||qr(g))return _!==null?null:d(m,v,g,w,null);Pi(m,g)}return null}function p(m,v,g,w,_){if(typeof w=="string"&&w!==""||typeof w=="number")return m=m.get(g)||null,l(v,m,""+w,_);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case xi:return m=m.get(w.key===null?g:w.key)||null,a(v,m,w,_);case ur:return m=m.get(w.key===null?g:w.key)||null,u(v,m,w,_);case nn:var S=w._init;return p(m,v,g,S(w._payload),_)}if(ao(w)||qr(w))return m=m.get(g)||null,d(v,m,w,_,null);Pi(v,w)}return null}function y(m,v,g,w){for(var _=null,S=null,E=v,P=v=0,b=null;E!==null&&P<g.length;P++){E.index>P?(b=E,E=null):b=E.sibling;var D=c(m,E,g[P],w);if(D===null){E===null&&(E=b);break}e&&E&&D.alternate===null&&t(m,E),v=i(D,v,P),S===null?_=D:S.sibling=D,S=D,E=b}if(P===g.length)return n(m,E),he&&$n(m,P),_;if(E===null){for(;P<g.length;P++)E=h(m,g[P],w),E!==null&&(v=i(E,v,P),S===null?_=E:S.sibling=E,S=E);return he&&$n(m,P),_}for(E=r(m,E);P<g.length;P++)b=p(E,m,P,g[P],w),b!==null&&(e&&b.alternate!==null&&E.delete(b.key===null?P:b.key),v=i(b,v,P),S===null?_=b:S.sibling=b,S=b);return e&&E.forEach(function(A){return t(m,A)}),he&&$n(m,P),_}function x(m,v,g,w){var _=qr(g);if(typeof _!="function")throw Error(W(150));if(g=_.call(g),g==null)throw Error(W(151));for(var S=_=null,E=v,P=v=0,b=null,D=g.next();E!==null&&!D.done;P++,D=g.next()){E.index>P?(b=E,E=null):b=E.sibling;var A=c(m,E,D.value,w);if(A===null){E===null&&(E=b);break}e&&E&&A.alternate===null&&t(m,E),v=i(A,v,P),S===null?_=A:S.sibling=A,S=A,E=b}if(D.done)return n(m,E),he&&$n(m,P),_;if(E===null){for(;!D.done;P++,D=g.next())D=h(m,D.value,w),D!==null&&(v=i(D,v,P),S===null?_=D:S.sibling=D,S=D);return he&&$n(m,P),_}for(E=r(m,E);!D.done;P++,D=g.next())D=p(E,m,P,D.value,w),D!==null&&(e&&D.alternate!==null&&E.delete(D.key===null?P:D.key),v=i(D,v,P),S===null?_=D:S.sibling=D,S=D);return e&&E.forEach(function(H){return t(m,H)}),he&&$n(m,P),_}function k(m,v,g,w){if(typeof g=="object"&&g!==null&&g.type===cr&&g.key===null&&(g=g.props.children),typeof g=="object"&&g!==null){switch(g.$$typeof){case xi:e:{for(var _=g.key,S=v;S!==null;){if(S.key===_){if(_=g.type,_===cr){if(S.tag===7){n(m,S.sibling),v=o(S,g.props.children),v.return=m,m=v;break e}}else if(S.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===nn&&$d(_)===S.type){n(m,S.sibling),v=o(S,g.props),v.ref=no(m,S,g),v.return=m,m=v;break e}n(m,S);break}else t(m,S);S=S.sibling}g.type===cr?(v=On(g.props.children,m.mode,w,g.key),v.return=m,m=v):(w=ns(g.type,g.key,g.props,null,m.mode,w),w.ref=no(m,v,g),w.return=m,m=w)}return s(m);case ur:e:{for(S=g.key;v!==null;){if(v.key===S)if(v.tag===4&&v.stateNode.containerInfo===g.containerInfo&&v.stateNode.implementation===g.implementation){n(m,v.sibling),v=o(v,g.children||[]),v.return=m,m=v;break e}else{n(m,v);break}else t(m,v);v=v.sibling}v=ql(g,m.mode,w),v.return=m,m=v}return s(m);case nn:return S=g._init,k(m,v,S(g._payload),w)}if(ao(g))return y(m,v,g,w);if(qr(g))return x(m,v,g,w);Pi(m,g)}return typeof g=="string"&&g!==""||typeof g=="number"?(g=""+g,v!==null&&v.tag===6?(n(m,v.sibling),v=o(v,g),v.return=m,m=v):(n(m,v),v=Gl(g,m.mode,w),v.return=m,m=v),s(m)):n(m,v)}return k}var Tr=Tp(!0),zp=Tp(!1),Ss=En(null),Ns=null,vr=null,Bu=null;function Vu(){Bu=vr=Ns=null}function Wu(e){var t=Ss.current;de(Ss),e._currentValue=t}function Da(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Cr(e,t){Ns=e,Bu=vr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Be=!0),e.firstContext=null)}function st(e){var t=e._currentValue;if(Bu!==e)if(e={context:e,memoizedValue:t,next:null},vr===null){if(Ns===null)throw Error(W(308));vr=e,Ns.dependencies={lanes:0,firstContext:e}}else vr=vr.next=e;return t}var Tn=null;function Uu(e){Tn===null?Tn=[e]:Tn.push(e)}function Lp(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,Uu(t)):(n.next=o.next,o.next=n),t.interleaved=n,Qt(e,r)}function Qt(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var rn=!1;function Yu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ap(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Ut(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function gn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,le&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Qt(e,n)}return o=r.interleaved,o===null?(t.next=t,Uu(r)):(t.next=o.next,o.next=t),r.interleaved=t,Qt(e,n)}function Gi(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,bu(e,n)}}function Pd(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=s:i=i.next=s,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Es(e,t,n,r){var o=e.updateQueue;rn=!1;var i=o.firstBaseUpdate,s=o.lastBaseUpdate,l=o.shared.pending;if(l!==null){o.shared.pending=null;var a=l,u=a.next;a.next=null,s===null?i=u:s.next=u,s=a;var d=e.alternate;d!==null&&(d=d.updateQueue,l=d.lastBaseUpdate,l!==s&&(l===null?d.firstBaseUpdate=u:l.next=u,d.lastBaseUpdate=a))}if(i!==null){var h=o.baseState;s=0,d=u=a=null,l=i;do{var c=l.lane,p=l.eventTime;if((r&c)===c){d!==null&&(d=d.next={eventTime:p,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var y=e,x=l;switch(c=t,p=n,x.tag){case 1:if(y=x.payload,typeof y=="function"){h=y.call(p,h,c);break e}h=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=x.payload,c=typeof y=="function"?y.call(p,h,c):y,c==null)break e;h=ge({},h,c);break e;case 2:rn=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,c=o.effects,c===null?o.effects=[l]:c.push(l))}else p={eventTime:p,lane:c,tag:l.tag,payload:l.payload,callback:l.callback,next:null},d===null?(u=d=p,a=h):d=d.next=p,s|=c;if(l=l.next,l===null){if(l=o.shared.pending,l===null)break;c=l,l=c.next,c.next=null,o.lastBaseUpdate=c,o.shared.pending=null}}while(!0);if(d===null&&(a=h),o.baseState=a,o.firstBaseUpdate=u,o.lastBaseUpdate=d,t=o.shared.interleaved,t!==null){o=t;do s|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);Kn|=s,e.lanes=s,e.memoizedState=h}}function bd(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(o!==null){if(r.callback=null,r=n,typeof o!="function")throw Error(W(191,o));o.call(r)}}}var si={},Tt=En(si),Do=En(si),Oo=En(si);function zn(e){if(e===si)throw Error(W(174));return e}function Xu(e,t){switch(ue(Oo,t),ue(Do,e),ue(Tt,si),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:va(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=va(t,e)}de(Tt),ue(Tt,t)}function zr(){de(Tt),de(Do),de(Oo)}function Rp(e){zn(Oo.current);var t=zn(Tt.current),n=va(t,e.type);t!==n&&(ue(Do,e),ue(Tt,n))}function Ku(e){Do.current===e&&(de(Tt),de(Do))}var pe=En(0);function _s(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Wl=[];function Qu(){for(var e=0;e<Wl.length;e++)Wl[e]._workInProgressVersionPrimary=null;Wl.length=0}var qi=Zt.ReactCurrentDispatcher,Ul=Zt.ReactCurrentBatchConfig,Xn=0,me=null,Se=null,_e=null,Cs=!1,wo=!1,Fo=0,Dx=0;function be(){throw Error(W(321))}function Gu(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!St(e[n],t[n]))return!1;return!0}function qu(e,t,n,r,o,i){if(Xn=i,me=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,qi.current=e===null||e.memoizedState===null?Bx:Vx,e=n(r,o),wo){i=0;do{if(wo=!1,Fo=0,25<=i)throw Error(W(301));i+=1,_e=Se=null,t.updateQueue=null,qi.current=Wx,e=n(r,o)}while(wo)}if(qi.current=js,t=Se!==null&&Se.next!==null,Xn=0,_e=Se=me=null,Cs=!1,t)throw Error(W(300));return e}function Zu(){var e=Fo!==0;return Fo=0,e}function jt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return _e===null?me.memoizedState=_e=e:_e=_e.next=e,_e}function lt(){if(Se===null){var e=me.alternate;e=e!==null?e.memoizedState:null}else e=Se.next;var t=_e===null?me.memoizedState:_e.next;if(t!==null)_e=t,Se=e;else{if(e===null)throw Error(W(310));Se=e,e={memoizedState:Se.memoizedState,baseState:Se.baseState,baseQueue:Se.baseQueue,queue:Se.queue,next:null},_e===null?me.memoizedState=_e=e:_e=_e.next=e}return _e}function Ho(e,t){return typeof t=="function"?t(e):t}function Yl(e){var t=lt(),n=t.queue;if(n===null)throw Error(W(311));n.lastRenderedReducer=e;var r=Se,o=r.baseQueue,i=n.pending;if(i!==null){if(o!==null){var s=o.next;o.next=i.next,i.next=s}r.baseQueue=o=i,n.pending=null}if(o!==null){i=o.next,r=r.baseState;var l=s=null,a=null,u=i;do{var d=u.lane;if((Xn&d)===d)a!==null&&(a=a.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var h={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};a===null?(l=a=h,s=r):a=a.next=h,me.lanes|=d,Kn|=d}u=u.next}while(u!==null&&u!==i);a===null?s=r:a.next=l,St(r,t.memoizedState)||(Be=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=a,n.lastRenderedState=r}if(e=n.interleaved,e!==null){o=e;do i=o.lane,me.lanes|=i,Kn|=i,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Xl(e){var t=lt(),n=t.queue;if(n===null)throw Error(W(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(o!==null){n.pending=null;var s=o=o.next;do i=e(i,s.action),s=s.next;while(s!==o);St(i,t.memoizedState)||(Be=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function Dp(){}function Op(e,t){var n=me,r=lt(),o=t(),i=!St(r.memoizedState,o);if(i&&(r.memoizedState=o,Be=!0),r=r.queue,Ju(Bp.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||_e!==null&&_e.memoizedState.tag&1){if(n.flags|=2048,Bo(9,Hp.bind(null,n,r,o,t),void 0,null),Ce===null)throw Error(W(349));Xn&30||Fp(n,t,o)}return o}function Fp(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=me.updateQueue,t===null?(t={lastEffect:null,stores:null},me.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Hp(e,t,n,r){t.value=n,t.getSnapshot=r,Vp(t)&&Wp(e)}function Bp(e,t,n){return n(function(){Vp(t)&&Wp(e)})}function Vp(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!St(e,n)}catch{return!0}}function Wp(e){var t=Qt(e,1);t!==null&&wt(t,e,1,-1)}function Id(e){var t=jt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ho,lastRenderedState:e},t.queue=e,e=e.dispatch=Hx.bind(null,me,e),[t.memoizedState,e]}function Bo(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=me.updateQueue,t===null?(t={lastEffect:null,stores:null},me.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function Up(){return lt().memoizedState}function Zi(e,t,n,r){var o=jt();me.flags|=e,o.memoizedState=Bo(1|t,n,void 0,r===void 0?null:r)}function el(e,t,n,r){var o=lt();r=r===void 0?null:r;var i=void 0;if(Se!==null){var s=Se.memoizedState;if(i=s.destroy,r!==null&&Gu(r,s.deps)){o.memoizedState=Bo(t,n,i,r);return}}me.flags|=e,o.memoizedState=Bo(1|t,n,i,r)}function Td(e,t){return Zi(8390656,8,e,t)}function Ju(e,t){return el(2048,8,e,t)}function Yp(e,t){return el(4,2,e,t)}function Xp(e,t){return el(4,4,e,t)}function Kp(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Qp(e,t,n){return n=n!=null?n.concat([e]):null,el(4,4,Kp.bind(null,t,e),n)}function ec(){}function Gp(e,t){var n=lt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Gu(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function qp(e,t){var n=lt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Gu(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Zp(e,t,n){return Xn&21?(St(n,t)||(n=rp(),me.lanes|=n,Kn|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Be=!0),e.memoizedState=n)}function Ox(e,t){var n=ae;ae=n!==0&&4>n?n:4,e(!0);var r=Ul.transition;Ul.transition={};try{e(!1),t()}finally{ae=n,Ul.transition=r}}function Jp(){return lt().memoizedState}function Fx(e,t,n){var r=vn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},em(e))tm(t,n);else if(n=Lp(e,t,n,r),n!==null){var o=Re();wt(n,e,r,o),nm(n,t,r)}}function Hx(e,t,n){var r=vn(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(em(e))tm(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,l=i(s,n);if(o.hasEagerState=!0,o.eagerState=l,St(l,s)){var a=t.interleaved;a===null?(o.next=o,Uu(t)):(o.next=a.next,a.next=o),t.interleaved=o;return}}catch{}finally{}n=Lp(e,t,o,r),n!==null&&(o=Re(),wt(n,e,r,o),nm(n,t,r))}}function em(e){var t=e.alternate;return e===me||t!==null&&t===me}function tm(e,t){wo=Cs=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function nm(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,bu(e,n)}}var js={readContext:st,useCallback:be,useContext:be,useEffect:be,useImperativeHandle:be,useInsertionEffect:be,useLayoutEffect:be,useMemo:be,useReducer:be,useRef:be,useState:be,useDebugValue:be,useDeferredValue:be,useTransition:be,useMutableSource:be,useSyncExternalStore:be,useId:be,unstable_isNewReconciler:!1},Bx={readContext:st,useCallback:function(e,t){return jt().memoizedState=[e,t===void 0?null:t],e},useContext:st,useEffect:Td,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Zi(4194308,4,Kp.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Zi(4194308,4,e,t)},useInsertionEffect:function(e,t){return Zi(4,2,e,t)},useMemo:function(e,t){var n=jt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=jt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Fx.bind(null,me,e),[r.memoizedState,e]},useRef:function(e){var t=jt();return e={current:e},t.memoizedState=e},useState:Id,useDebugValue:ec,useDeferredValue:function(e){return jt().memoizedState=e},useTransition:function(){var e=Id(!1),t=e[0];return e=Ox.bind(null,e[1]),jt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=me,o=jt();if(he){if(n===void 0)throw Error(W(407));n=n()}else{if(n=t(),Ce===null)throw Error(W(349));Xn&30||Fp(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Td(Bp.bind(null,r,i,e),[e]),r.flags|=2048,Bo(9,Hp.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=jt(),t=Ce.identifierPrefix;if(he){var n=Vt,r=Bt;n=(r&~(1<<32-xt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Fo++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Dx++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Vx={readContext:st,useCallback:Gp,useContext:st,useEffect:Ju,useImperativeHandle:Qp,useInsertionEffect:Yp,useLayoutEffect:Xp,useMemo:qp,useReducer:Yl,useRef:Up,useState:function(){return Yl(Ho)},useDebugValue:ec,useDeferredValue:function(e){var t=lt();return Zp(t,Se.memoizedState,e)},useTransition:function(){var e=Yl(Ho)[0],t=lt().memoizedState;return[e,t]},useMutableSource:Dp,useSyncExternalStore:Op,useId:Jp,unstable_isNewReconciler:!1},Wx={readContext:st,useCallback:Gp,useContext:st,useEffect:Ju,useImperativeHandle:Qp,useInsertionEffect:Yp,useLayoutEffect:Xp,useMemo:qp,useReducer:Xl,useRef:Up,useState:function(){return Xl(Ho)},useDebugValue:ec,useDeferredValue:function(e){var t=lt();return Se===null?t.memoizedState=e:Zp(t,Se.memoizedState,e)},useTransition:function(){var e=Xl(Ho)[0],t=lt().memoizedState;return[e,t]},useMutableSource:Dp,useSyncExternalStore:Op,useId:Jp,unstable_isNewReconciler:!1};function dt(e,t){if(e&&e.defaultProps){t=ge({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Oa(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:ge({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var tl={isMounted:function(e){return(e=e._reactInternals)?nr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Re(),o=vn(e),i=Ut(r,o);i.payload=t,n!=null&&(i.callback=n),t=gn(e,i,o),t!==null&&(wt(t,e,o,r),Gi(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Re(),o=vn(e),i=Ut(r,o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=gn(e,i,o),t!==null&&(wt(t,e,o,r),Gi(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Re(),r=vn(e),o=Ut(n,r);o.tag=2,t!=null&&(o.callback=t),t=gn(e,o,r),t!==null&&(wt(t,e,r,n),Gi(t,e,r))}};function zd(e,t,n,r,o,i,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,s):t.prototype&&t.prototype.isPureReactComponent?!zo(n,r)||!zo(o,i):!0}function rm(e,t,n){var r=!1,o=kn,i=t.contextType;return typeof i=="object"&&i!==null?i=st(i):(o=Ue(t)?Un:ze.current,r=t.contextTypes,i=(r=r!=null)?br(e,o):kn),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=tl,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function Ld(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&tl.enqueueReplaceState(t,t.state,null)}function Fa(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},Yu(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=st(i):(i=Ue(t)?Un:ze.current,o.context=br(e,i)),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Oa(e,t,i,n),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&tl.enqueueReplaceState(o,o.state,null),Es(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function Lr(e,t){try{var n="",r=t;do n+=vv(r),r=r.return;while(r);var o=n}catch(i){o=`
|
|
39
|
+
Error generating stack: `+i.message+`
|
|
40
|
+
`+i.stack}return{value:e,source:t,stack:o,digest:null}}function Kl(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Ha(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Ux=typeof WeakMap=="function"?WeakMap:Map;function om(e,t,n){n=Ut(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){$s||($s=!0,qa=r),Ha(e,t)},n}function im(e,t,n){n=Ut(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){Ha(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){Ha(e,t),typeof r!="function"&&(yn===null?yn=new Set([this]):yn.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function Ad(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Ux;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=iw.bind(null,e,t,n),t.then(e,e))}function Rd(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Dd(e,t,n,r,o){return e.mode&1?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Ut(-1,1),t.tag=2,gn(n,t,1))),n.lanes|=1),e)}var Yx=Zt.ReactCurrentOwner,Be=!1;function Ae(e,t,n,r){t.child=e===null?zp(t,null,n,r):Tr(t,e.child,n,r)}function Od(e,t,n,r,o){n=n.render;var i=t.ref;return Cr(t,o),r=qu(e,t,n,r,i,o),n=Zu(),e!==null&&!Be?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Gt(e,t,o)):(he&&n&&Ou(t),t.flags|=1,Ae(e,t,r,o),t.child)}function Fd(e,t,n,r,o){if(e===null){var i=n.type;return typeof i=="function"&&!ac(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,sm(e,t,i,r,o)):(e=ns(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&o)){var s=i.memoizedProps;if(n=n.compare,n=n!==null?n:zo,n(s,r)&&e.ref===t.ref)return Gt(e,t,o)}return t.flags|=1,e=xn(i,r),e.ref=t.ref,e.return=t,t.child=e}function sm(e,t,n,r,o){if(e!==null){var i=e.memoizedProps;if(zo(i,r)&&e.ref===t.ref)if(Be=!1,t.pendingProps=r=i,(e.lanes&o)!==0)e.flags&131072&&(Be=!0);else return t.lanes=e.lanes,Gt(e,t,o)}return Ba(e,t,n,r,o)}function lm(e,t,n){var r=t.pendingProps,o=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ue(wr,Xe),Xe|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ue(wr,Xe),Xe|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,ue(wr,Xe),Xe|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,ue(wr,Xe),Xe|=r;return Ae(e,t,o,n),t.child}function am(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ba(e,t,n,r,o){var i=Ue(n)?Un:ze.current;return i=br(t,i),Cr(t,o),n=qu(e,t,n,r,i,o),r=Zu(),e!==null&&!Be?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Gt(e,t,o)):(he&&r&&Ou(t),t.flags|=1,Ae(e,t,n,o),t.child)}function Hd(e,t,n,r,o){if(Ue(n)){var i=!0;xs(t)}else i=!1;if(Cr(t,o),t.stateNode===null)Ji(e,t),rm(t,n,r),Fa(t,n,r,o),r=!0;else if(e===null){var s=t.stateNode,l=t.memoizedProps;s.props=l;var a=s.context,u=n.contextType;typeof u=="object"&&u!==null?u=st(u):(u=Ue(n)?Un:ze.current,u=br(t,u));var d=n.getDerivedStateFromProps,h=typeof d=="function"||typeof s.getSnapshotBeforeUpdate=="function";h||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==r||a!==u)&&Ld(t,s,r,u),rn=!1;var c=t.memoizedState;s.state=c,Es(t,r,s,o),a=t.memoizedState,l!==r||c!==a||We.current||rn?(typeof d=="function"&&(Oa(t,n,d,r),a=t.memoizedState),(l=rn||zd(t,n,l,r,c,a,u))?(h||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=a),s.props=r,s.state=a,s.context=u,r=l):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,Ap(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:dt(t.type,l),s.props=u,h=t.pendingProps,c=s.context,a=n.contextType,typeof a=="object"&&a!==null?a=st(a):(a=Ue(n)?Un:ze.current,a=br(t,a));var p=n.getDerivedStateFromProps;(d=typeof p=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==h||c!==a)&&Ld(t,s,r,a),rn=!1,c=t.memoizedState,s.state=c,Es(t,r,s,o);var y=t.memoizedState;l!==h||c!==y||We.current||rn?(typeof p=="function"&&(Oa(t,n,p,r),y=t.memoizedState),(u=rn||zd(t,n,u,r,c,y,a)||!1)?(d||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,y,a),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,y,a)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&c===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&c===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=y),s.props=r,s.state=y,s.context=a,r=u):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&c===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&c===e.memoizedState||(t.flags|=1024),r=!1)}return Va(e,t,n,r,i,o)}function Va(e,t,n,r,o,i){am(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return o&&Cd(t,n,!1),Gt(e,t,i);r=t.stateNode,Yx.current=t;var l=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=Tr(t,e.child,null,i),t.child=Tr(t,null,l,i)):Ae(e,t,l,i),t.memoizedState=r.state,o&&Cd(t,n,!0),t.child}function um(e){var t=e.stateNode;t.pendingContext?_d(e,t.pendingContext,t.pendingContext!==t.context):t.context&&_d(e,t.context,!1),Xu(e,t.containerInfo)}function Bd(e,t,n,r,o){return Ir(),Hu(o),t.flags|=256,Ae(e,t,n,r),t.child}var Wa={dehydrated:null,treeContext:null,retryLane:0};function Ua(e){return{baseLanes:e,cachePool:null,transitions:null}}function cm(e,t,n){var r=t.pendingProps,o=pe.current,i=!1,s=(t.flags&128)!==0,l;if((l=s)||(l=e!==null&&e.memoizedState===null?!1:(o&2)!==0),l?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),ue(pe,o&1),e===null)return Ra(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=r.children,e=r.fallback,i?(r=t.mode,i=t.child,s={mode:"hidden",children:s},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=s):i=ol(s,r,0,null),e=On(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Ua(n),t.memoizedState=Wa,e):tc(t,s));if(o=e.memoizedState,o!==null&&(l=o.dehydrated,l!==null))return Xx(e,t,s,r,l,o,n);if(i){i=r.fallback,s=t.mode,o=e.child,l=o.sibling;var a={mode:"hidden",children:r.children};return!(s&1)&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=a,t.deletions=null):(r=xn(o,a),r.subtreeFlags=o.subtreeFlags&14680064),l!==null?i=xn(l,i):(i=On(i,s,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,s=e.child.memoizedState,s=s===null?Ua(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},i.memoizedState=s,i.childLanes=e.childLanes&~n,t.memoizedState=Wa,r}return i=e.child,e=i.sibling,r=xn(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function tc(e,t){return t=ol({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function bi(e,t,n,r){return r!==null&&Hu(r),Tr(t,e.child,null,n),e=tc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Xx(e,t,n,r,o,i,s){if(n)return t.flags&256?(t.flags&=-257,r=Kl(Error(W(422))),bi(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=ol({mode:"visible",children:r.children},o,0,null),i=On(i,o,s,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&Tr(t,e.child,null,s),t.child.memoizedState=Ua(s),t.memoizedState=Wa,i);if(!(t.mode&1))return bi(e,t,s,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,i=Error(W(419)),r=Kl(i,r,void 0),bi(e,t,s,r)}if(l=(s&e.childLanes)!==0,Be||l){if(r=Ce,r!==null){switch(s&-s){case 4:o=2;break;case 16:o=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:o=32;break;case 536870912:o=268435456;break;default:o=0}o=o&(r.suspendedLanes|s)?0:o,o!==0&&o!==i.retryLane&&(i.retryLane=o,Qt(e,o),wt(r,e,o,-1))}return lc(),r=Kl(Error(W(421))),bi(e,t,s,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=sw.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,Qe=mn(o.nextSibling),Ge=t,he=!0,mt=null,e!==null&&(nt[rt++]=Bt,nt[rt++]=Vt,nt[rt++]=Yn,Bt=e.id,Vt=e.overflow,Yn=t),t=tc(t,r.children),t.flags|=4096,t)}function Vd(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Da(e.return,t,n)}function Ql(e,t,n,r,o){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function dm(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(Ae(e,t,r.children,n),r=pe.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Vd(e,n,t);else if(e.tag===19)Vd(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(ue(pe,r),!(t.mode&1))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&_s(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Ql(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&_s(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Ql(t,!0,n,null,i);break;case"together":Ql(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ji(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Gt(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Kn|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(W(153));if(t.child!==null){for(e=t.child,n=xn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=xn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Kx(e,t,n){switch(t.tag){case 3:um(t),Ir();break;case 5:Rp(t);break;case 1:Ue(t.type)&&xs(t);break;case 4:Xu(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;ue(Ss,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(ue(pe,pe.current&1),t.flags|=128,null):n&t.child.childLanes?cm(e,t,n):(ue(pe,pe.current&1),e=Gt(e,t,n),e!==null?e.sibling:null);ue(pe,pe.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return dm(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),ue(pe,pe.current),r)break;return null;case 22:case 23:return t.lanes=0,lm(e,t,n)}return Gt(e,t,n)}var fm,Ya,hm,pm;fm=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Ya=function(){};hm=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,zn(Tt.current);var i=null;switch(n){case"input":o=pa(e,o),r=pa(e,r),i=[];break;case"select":o=ge({},o,{value:void 0}),r=ge({},r,{value:void 0}),i=[];break;case"textarea":o=ya(e,o),r=ya(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=ys)}xa(n,r);var s;n=null;for(u in o)if(!r.hasOwnProperty(u)&&o.hasOwnProperty(u)&&o[u]!=null)if(u==="style"){var l=o[u];for(s in l)l.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(jo.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var a=r[u];if(l=o!=null?o[u]:void 0,r.hasOwnProperty(u)&&a!==l&&(a!=null||l!=null))if(u==="style")if(l){for(s in l)!l.hasOwnProperty(s)||a&&a.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in a)a.hasOwnProperty(s)&&l[s]!==a[s]&&(n||(n={}),n[s]=a[s])}else n||(i||(i=[]),i.push(u,n)),n=a;else u==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,l=l?l.__html:void 0,a!=null&&l!==a&&(i=i||[]).push(u,a)):u==="children"?typeof a!="string"&&typeof a!="number"||(i=i||[]).push(u,""+a):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(jo.hasOwnProperty(u)?(a!=null&&u==="onScroll"&&ce("scroll",e),i||l===a||(i=[])):(i=i||[]).push(u,a))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};pm=function(e,t,n,r){n!==r&&(t.flags|=4)};function ro(e,t){if(!he)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ie(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Qx(e,t,n){var r=t.pendingProps;switch(Fu(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ie(t),null;case 1:return Ue(t.type)&&vs(),Ie(t),null;case 3:return r=t.stateNode,zr(),de(We),de(ze),Qu(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&($i(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,mt!==null&&(eu(mt),mt=null))),Ya(e,t),Ie(t),null;case 5:Ku(t);var o=zn(Oo.current);if(n=t.type,e!==null&&t.stateNode!=null)hm(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(W(166));return Ie(t),null}if(e=zn(Tt.current),$i(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[$t]=t,r[Ro]=i,e=(t.mode&1)!==0,n){case"dialog":ce("cancel",r),ce("close",r);break;case"iframe":case"object":case"embed":ce("load",r);break;case"video":case"audio":for(o=0;o<co.length;o++)ce(co[o],r);break;case"source":ce("error",r);break;case"img":case"image":case"link":ce("error",r),ce("load",r);break;case"details":ce("toggle",r);break;case"input":Zc(r,i),ce("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},ce("invalid",r);break;case"textarea":ed(r,i),ce("invalid",r)}xa(n,i),o=null;for(var s in i)if(i.hasOwnProperty(s)){var l=i[s];s==="children"?typeof l=="string"?r.textContent!==l&&(i.suppressHydrationWarning!==!0&&Mi(r.textContent,l,e),o=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(i.suppressHydrationWarning!==!0&&Mi(r.textContent,l,e),o=["children",""+l]):jo.hasOwnProperty(s)&&l!=null&&s==="onScroll"&&ce("scroll",r)}switch(n){case"input":wi(r),Jc(r,i,!0);break;case"textarea":wi(r),td(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=ys)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{s=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Bh(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=s.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[$t]=t,e[Ro]=r,fm(e,t,!1,!1),t.stateNode=e;e:{switch(s=wa(n,r),n){case"dialog":ce("cancel",e),ce("close",e),o=r;break;case"iframe":case"object":case"embed":ce("load",e),o=r;break;case"video":case"audio":for(o=0;o<co.length;o++)ce(co[o],e);o=r;break;case"source":ce("error",e),o=r;break;case"img":case"image":case"link":ce("error",e),ce("load",e),o=r;break;case"details":ce("toggle",e),o=r;break;case"input":Zc(e,r),o=pa(e,r),ce("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=ge({},r,{value:void 0}),ce("invalid",e);break;case"textarea":ed(e,r),o=ya(e,r),ce("invalid",e);break;default:o=r}xa(n,o),l=o;for(i in l)if(l.hasOwnProperty(i)){var a=l[i];i==="style"?Uh(e,a):i==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,a!=null&&Vh(e,a)):i==="children"?typeof a=="string"?(n!=="textarea"||a!=="")&&Mo(e,a):typeof a=="number"&&Mo(e,""+a):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(jo.hasOwnProperty(i)?a!=null&&i==="onScroll"&&ce("scroll",e):a!=null&&_u(e,i,a,s))}switch(n){case"input":wi(e),Jc(e,r,!1);break;case"textarea":wi(e),td(e);break;case"option":r.value!=null&&e.setAttribute("value",""+wn(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?Sr(e,!!r.multiple,i,!1):r.defaultValue!=null&&Sr(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=ys)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Ie(t),null;case 6:if(e&&t.stateNode!=null)pm(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(W(166));if(n=zn(Oo.current),zn(Tt.current),$i(t)){if(r=t.stateNode,n=t.memoizedProps,r[$t]=t,(i=r.nodeValue!==n)&&(e=Ge,e!==null))switch(e.tag){case 3:Mi(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Mi(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[$t]=t,t.stateNode=r}return Ie(t),null;case 13:if(de(pe),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(he&&Qe!==null&&t.mode&1&&!(t.flags&128))Ip(),Ir(),t.flags|=98560,i=!1;else if(i=$i(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(W(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(W(317));i[$t]=t}else Ir(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ie(t),i=!1}else mt!==null&&(eu(mt),mt=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||pe.current&1?Ne===0&&(Ne=3):lc())),t.updateQueue!==null&&(t.flags|=4),Ie(t),null);case 4:return zr(),Ya(e,t),e===null&&Lo(t.stateNode.containerInfo),Ie(t),null;case 10:return Wu(t.type._context),Ie(t),null;case 17:return Ue(t.type)&&vs(),Ie(t),null;case 19:if(de(pe),i=t.memoizedState,i===null)return Ie(t),null;if(r=(t.flags&128)!==0,s=i.rendering,s===null)if(r)ro(i,!1);else{if(Ne!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=_s(e),s!==null){for(t.flags|=128,ro(i,!1),r=s.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,s=i.alternate,s===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=s.childLanes,i.lanes=s.lanes,i.child=s.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=s.memoizedProps,i.memoizedState=s.memoizedState,i.updateQueue=s.updateQueue,i.type=s.type,e=s.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ue(pe,pe.current&1|2),t.child}e=e.sibling}i.tail!==null&&xe()>Ar&&(t.flags|=128,r=!0,ro(i,!1),t.lanes=4194304)}else{if(!r)if(e=_s(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ro(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!he)return Ie(t),null}else 2*xe()-i.renderingStartTime>Ar&&n!==1073741824&&(t.flags|=128,r=!0,ro(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(n=i.last,n!==null?n.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=xe(),t.sibling=null,n=pe.current,ue(pe,r?n&1|2:n&1),t):(Ie(t),null);case 22:case 23:return sc(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Xe&1073741824&&(Ie(t),t.subtreeFlags&6&&(t.flags|=8192)):Ie(t),null;case 24:return null;case 25:return null}throw Error(W(156,t.tag))}function Gx(e,t){switch(Fu(t),t.tag){case 1:return Ue(t.type)&&vs(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return zr(),de(We),de(ze),Qu(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Ku(t),null;case 13:if(de(pe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(W(340));Ir()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return de(pe),null;case 4:return zr(),null;case 10:return Wu(t.type._context),null;case 22:case 23:return sc(),null;case 24:return null;default:return null}}var Ii=!1,Te=!1,qx=typeof WeakSet=="function"?WeakSet:Set,K=null;function xr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ve(e,t,r)}else n.current=null}function Xa(e,t,n){try{n()}catch(r){ve(e,t,r)}}var Wd=!1;function Zx(e,t){if(Pa=ps,e=xp(),Du(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var s=0,l=-1,a=-1,u=0,d=0,h=e,c=null;t:for(;;){for(var p;h!==n||o!==0&&h.nodeType!==3||(l=s+o),h!==i||r!==0&&h.nodeType!==3||(a=s+r),h.nodeType===3&&(s+=h.nodeValue.length),(p=h.firstChild)!==null;)c=h,h=p;for(;;){if(h===e)break t;if(c===n&&++u===o&&(l=s),c===i&&++d===r&&(a=s),(p=h.nextSibling)!==null)break;h=c,c=h.parentNode}h=p}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(ba={focusedElem:e,selectionRange:n},ps=!1,K=t;K!==null;)if(t=K,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,K=e;else for(;K!==null;){t=K;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var x=y.memoizedProps,k=y.memoizedState,m=t.stateNode,v=m.getSnapshotBeforeUpdate(t.elementType===t.type?x:dt(t.type,x),k);m.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var g=t.stateNode.containerInfo;g.nodeType===1?g.textContent="":g.nodeType===9&&g.documentElement&&g.removeChild(g.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(W(163))}}catch(w){ve(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,K=e;break}K=t.return}return y=Wd,Wd=!1,y}function ko(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&Xa(t,n,i)}o=o.next}while(o!==r)}}function nl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Ka(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function mm(e){var t=e.alternate;t!==null&&(e.alternate=null,mm(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[$t],delete t[Ro],delete t[za],delete t[zx],delete t[Lx])),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 gm(e){return e.tag===5||e.tag===3||e.tag===4}function Ud(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||gm(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 Qa(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=ys));else if(r!==4&&(e=e.child,e!==null))for(Qa(e,t,n),e=e.sibling;e!==null;)Qa(e,t,n),e=e.sibling}function Ga(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Ga(e,t,n),e=e.sibling;e!==null;)Ga(e,t,n),e=e.sibling}var Me=null,ft=!1;function Jt(e,t,n){for(n=n.child;n!==null;)ym(e,t,n),n=n.sibling}function ym(e,t,n){if(It&&typeof It.onCommitFiberUnmount=="function")try{It.onCommitFiberUnmount(Ks,n)}catch{}switch(n.tag){case 5:Te||xr(n,t);case 6:var r=Me,o=ft;Me=null,Jt(e,t,n),Me=r,ft=o,Me!==null&&(ft?(e=Me,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Me.removeChild(n.stateNode));break;case 18:Me!==null&&(ft?(e=Me,n=n.stateNode,e.nodeType===8?Bl(e.parentNode,n):e.nodeType===1&&Bl(e,n),Io(e)):Bl(Me,n.stateNode));break;case 4:r=Me,o=ft,Me=n.stateNode.containerInfo,ft=!0,Jt(e,t,n),Me=r,ft=o;break;case 0:case 11:case 14:case 15:if(!Te&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&(i&2||i&4)&&Xa(n,t,s),o=o.next}while(o!==r)}Jt(e,t,n);break;case 1:if(!Te&&(xr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){ve(n,t,l)}Jt(e,t,n);break;case 21:Jt(e,t,n);break;case 22:n.mode&1?(Te=(r=Te)||n.memoizedState!==null,Jt(e,t,n),Te=r):Jt(e,t,n);break;default:Jt(e,t,n)}}function Yd(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new qx),t.forEach(function(r){var o=lw.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function ut(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var i=e,s=t,l=s;e:for(;l!==null;){switch(l.tag){case 5:Me=l.stateNode,ft=!1;break e;case 3:Me=l.stateNode.containerInfo,ft=!0;break e;case 4:Me=l.stateNode.containerInfo,ft=!0;break e}l=l.return}if(Me===null)throw Error(W(160));ym(i,s,o),Me=null,ft=!1;var a=o.alternate;a!==null&&(a.return=null),o.return=null}catch(u){ve(o,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)vm(t,e),t=t.sibling}function vm(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(ut(t,e),Ct(e),r&4){try{ko(3,e,e.return),nl(3,e)}catch(x){ve(e,e.return,x)}try{ko(5,e,e.return)}catch(x){ve(e,e.return,x)}}break;case 1:ut(t,e),Ct(e),r&512&&n!==null&&xr(n,n.return);break;case 5:if(ut(t,e),Ct(e),r&512&&n!==null&&xr(n,n.return),e.flags&32){var o=e.stateNode;try{Mo(o,"")}catch(x){ve(e,e.return,x)}}if(r&4&&(o=e.stateNode,o!=null)){var i=e.memoizedProps,s=n!==null?n.memoizedProps:i,l=e.type,a=e.updateQueue;if(e.updateQueue=null,a!==null)try{l==="input"&&i.type==="radio"&&i.name!=null&&Fh(o,i),wa(l,s);var u=wa(l,i);for(s=0;s<a.length;s+=2){var d=a[s],h=a[s+1];d==="style"?Uh(o,h):d==="dangerouslySetInnerHTML"?Vh(o,h):d==="children"?Mo(o,h):_u(o,d,h,u)}switch(l){case"input":ma(o,i);break;case"textarea":Hh(o,i);break;case"select":var c=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var p=i.value;p!=null?Sr(o,!!i.multiple,p,!1):c!==!!i.multiple&&(i.defaultValue!=null?Sr(o,!!i.multiple,i.defaultValue,!0):Sr(o,!!i.multiple,i.multiple?[]:"",!1))}o[Ro]=i}catch(x){ve(e,e.return,x)}}break;case 6:if(ut(t,e),Ct(e),r&4){if(e.stateNode===null)throw Error(W(162));o=e.stateNode,i=e.memoizedProps;try{o.nodeValue=i}catch(x){ve(e,e.return,x)}}break;case 3:if(ut(t,e),Ct(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Io(t.containerInfo)}catch(x){ve(e,e.return,x)}break;case 4:ut(t,e),Ct(e);break;case 13:ut(t,e),Ct(e),o=e.child,o.flags&8192&&(i=o.memoizedState!==null,o.stateNode.isHidden=i,!i||o.alternate!==null&&o.alternate.memoizedState!==null||(oc=xe())),r&4&&Yd(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(Te=(u=Te)||d,ut(t,e),Te=u):ut(t,e),Ct(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(K=e,d=e.child;d!==null;){for(h=K=d;K!==null;){switch(c=K,p=c.child,c.tag){case 0:case 11:case 14:case 15:ko(4,c,c.return);break;case 1:xr(c,c.return);var y=c.stateNode;if(typeof y.componentWillUnmount=="function"){r=c,n=c.return;try{t=r,y.props=t.memoizedProps,y.state=t.memoizedState,y.componentWillUnmount()}catch(x){ve(r,n,x)}}break;case 5:xr(c,c.return);break;case 22:if(c.memoizedState!==null){Kd(h);continue}}p!==null?(p.return=c,K=p):Kd(h)}d=d.sibling}e:for(d=null,h=e;;){if(h.tag===5){if(d===null){d=h;try{o=h.stateNode,u?(i=o.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(l=h.stateNode,a=h.memoizedProps.style,s=a!=null&&a.hasOwnProperty("display")?a.display:null,l.style.display=Wh("display",s))}catch(x){ve(e,e.return,x)}}}else if(h.tag===6){if(d===null)try{h.stateNode.nodeValue=u?"":h.memoizedProps}catch(x){ve(e,e.return,x)}}else if((h.tag!==22&&h.tag!==23||h.memoizedState===null||h===e)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;h.sibling===null;){if(h.return===null||h.return===e)break e;d===h&&(d=null),h=h.return}d===h&&(d=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:ut(t,e),Ct(e),r&4&&Yd(e);break;case 21:break;default:ut(t,e),Ct(e)}}function Ct(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(gm(n)){var r=n;break e}n=n.return}throw Error(W(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(Mo(o,""),r.flags&=-33);var i=Ud(e);Ga(e,i,o);break;case 3:case 4:var s=r.stateNode.containerInfo,l=Ud(e);Qa(e,l,s);break;default:throw Error(W(161))}}catch(a){ve(e,e.return,a)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Jx(e,t,n){K=e,xm(e)}function xm(e,t,n){for(var r=(e.mode&1)!==0;K!==null;){var o=K,i=o.child;if(o.tag===22&&r){var s=o.memoizedState!==null||Ii;if(!s){var l=o.alternate,a=l!==null&&l.memoizedState!==null||Te;l=Ii;var u=Te;if(Ii=s,(Te=a)&&!u)for(K=o;K!==null;)s=K,a=s.child,s.tag===22&&s.memoizedState!==null?Qd(o):a!==null?(a.return=s,K=a):Qd(o);for(;i!==null;)K=i,xm(i),i=i.sibling;K=o,Ii=l,Te=u}Xd(e)}else o.subtreeFlags&8772&&i!==null?(i.return=o,K=i):Xd(e)}}function Xd(e){for(;K!==null;){var t=K;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Te||nl(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Te)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:dt(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&bd(t,i,r);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}bd(t,s,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;var a=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break;case"img":a.src&&(n.src=a.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var h=d.dehydrated;h!==null&&Io(h)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(W(163))}Te||t.flags&512&&Ka(t)}catch(c){ve(t,t.return,c)}}if(t===e){K=null;break}if(n=t.sibling,n!==null){n.return=t.return,K=n;break}K=t.return}}function Kd(e){for(;K!==null;){var t=K;if(t===e){K=null;break}var n=t.sibling;if(n!==null){n.return=t.return,K=n;break}K=t.return}}function Qd(e){for(;K!==null;){var t=K;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{nl(4,t)}catch(a){ve(t,n,a)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(a){ve(t,o,a)}}var i=t.return;try{Ka(t)}catch(a){ve(t,i,a)}break;case 5:var s=t.return;try{Ka(t)}catch(a){ve(t,s,a)}}}catch(a){ve(t,t.return,a)}if(t===e){K=null;break}var l=t.sibling;if(l!==null){l.return=t.return,K=l;break}K=t.return}}var ew=Math.ceil,Ms=Zt.ReactCurrentDispatcher,nc=Zt.ReactCurrentOwner,it=Zt.ReactCurrentBatchConfig,le=0,Ce=null,we=null,$e=0,Xe=0,wr=En(0),Ne=0,Vo=null,Kn=0,rl=0,rc=0,So=null,Fe=null,oc=0,Ar=1/0,Ft=null,$s=!1,qa=null,yn=null,Ti=!1,dn=null,Ps=0,No=0,Za=null,es=-1,ts=0;function Re(){return le&6?xe():es!==-1?es:es=xe()}function vn(e){return e.mode&1?le&2&&$e!==0?$e&-$e:Rx.transition!==null?(ts===0&&(ts=rp()),ts):(e=ae,e!==0||(e=window.event,e=e===void 0?16:cp(e.type)),e):1}function wt(e,t,n,r){if(50<No)throw No=0,Za=null,Error(W(185));ri(e,n,r),(!(le&2)||e!==Ce)&&(e===Ce&&(!(le&2)&&(rl|=n),Ne===4&&an(e,$e)),Ye(e,r),n===1&&le===0&&!(t.mode&1)&&(Ar=xe()+500,Js&&_n()))}function Ye(e,t){var n=e.callbackNode;Rv(e,t);var r=hs(e,e===Ce?$e:0);if(r===0)n!==null&&od(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&od(n),t===1)e.tag===0?Ax(Gd.bind(null,e)):$p(Gd.bind(null,e)),Ix(function(){!(le&6)&&_n()}),n=null;else{switch(op(r)){case 1:n=Pu;break;case 4:n=tp;break;case 16:n=fs;break;case 536870912:n=np;break;default:n=fs}n=jm(n,wm.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function wm(e,t){if(es=-1,ts=0,le&6)throw Error(W(327));var n=e.callbackNode;if(jr()&&e.callbackNode!==n)return null;var r=hs(e,e===Ce?$e:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=bs(e,r);else{t=r;var o=le;le|=2;var i=Sm();(Ce!==e||$e!==t)&&(Ft=null,Ar=xe()+500,Dn(e,t));do try{rw();break}catch(l){km(e,l)}while(!0);Vu(),Ms.current=i,le=o,we!==null?t=0:(Ce=null,$e=0,t=Ne)}if(t!==0){if(t===2&&(o=_a(e),o!==0&&(r=o,t=Ja(e,o))),t===1)throw n=Vo,Dn(e,0),an(e,r),Ye(e,xe()),n;if(t===6)an(e,r);else{if(o=e.current.alternate,!(r&30)&&!tw(o)&&(t=bs(e,r),t===2&&(i=_a(e),i!==0&&(r=i,t=Ja(e,i))),t===1))throw n=Vo,Dn(e,0),an(e,r),Ye(e,xe()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(W(345));case 2:Pn(e,Fe,Ft);break;case 3:if(an(e,r),(r&130023424)===r&&(t=oc+500-xe(),10<t)){if(hs(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){Re(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=Ta(Pn.bind(null,e,Fe,Ft),t);break}Pn(e,Fe,Ft);break;case 4:if(an(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var s=31-xt(r);i=1<<s,s=t[s],s>o&&(o=s),r&=~i}if(r=o,r=xe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*ew(r/1960))-r,10<r){e.timeoutHandle=Ta(Pn.bind(null,e,Fe,Ft),r);break}Pn(e,Fe,Ft);break;case 5:Pn(e,Fe,Ft);break;default:throw Error(W(329))}}}return Ye(e,xe()),e.callbackNode===n?wm.bind(null,e):null}function Ja(e,t){var n=So;return e.current.memoizedState.isDehydrated&&(Dn(e,t).flags|=256),e=bs(e,t),e!==2&&(t=Fe,Fe=n,t!==null&&eu(t)),e}function eu(e){Fe===null?Fe=e:Fe.push.apply(Fe,e)}function tw(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var o=n[r],i=o.getSnapshot;o=o.value;try{if(!St(i(),o))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function an(e,t){for(t&=~rc,t&=~rl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-xt(t),r=1<<n;e[n]=-1,t&=~r}}function Gd(e){if(le&6)throw Error(W(327));jr();var t=hs(e,0);if(!(t&1))return Ye(e,xe()),null;var n=bs(e,t);if(e.tag!==0&&n===2){var r=_a(e);r!==0&&(t=r,n=Ja(e,r))}if(n===1)throw n=Vo,Dn(e,0),an(e,t),Ye(e,xe()),n;if(n===6)throw Error(W(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Pn(e,Fe,Ft),Ye(e,xe()),null}function ic(e,t){var n=le;le|=1;try{return e(t)}finally{le=n,le===0&&(Ar=xe()+500,Js&&_n())}}function Qn(e){dn!==null&&dn.tag===0&&!(le&6)&&jr();var t=le;le|=1;var n=it.transition,r=ae;try{if(it.transition=null,ae=1,e)return e()}finally{ae=r,it.transition=n,le=t,!(le&6)&&_n()}}function sc(){Xe=wr.current,de(wr)}function Dn(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,bx(n)),we!==null)for(n=we.return;n!==null;){var r=n;switch(Fu(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&vs();break;case 3:zr(),de(We),de(ze),Qu();break;case 5:Ku(r);break;case 4:zr();break;case 13:de(pe);break;case 19:de(pe);break;case 10:Wu(r.type._context);break;case 22:case 23:sc()}n=n.return}if(Ce=e,we=e=xn(e.current,null),$e=Xe=t,Ne=0,Vo=null,rc=rl=Kn=0,Fe=So=null,Tn!==null){for(t=0;t<Tn.length;t++)if(n=Tn[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,i=n.pending;if(i!==null){var s=i.next;i.next=o,r.next=s}n.pending=r}Tn=null}return e}function km(e,t){do{var n=we;try{if(Vu(),qi.current=js,Cs){for(var r=me.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}Cs=!1}if(Xn=0,_e=Se=me=null,wo=!1,Fo=0,nc.current=null,n===null||n.return===null){Ne=1,Vo=t,we=null;break}e:{var i=e,s=n.return,l=n,a=t;if(t=$e,l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){var u=a,d=l,h=d.tag;if(!(d.mode&1)&&(h===0||h===11||h===15)){var c=d.alternate;c?(d.updateQueue=c.updateQueue,d.memoizedState=c.memoizedState,d.lanes=c.lanes):(d.updateQueue=null,d.memoizedState=null)}var p=Rd(s);if(p!==null){p.flags&=-257,Dd(p,s,l,i,t),p.mode&1&&Ad(i,u,t),t=p,a=u;var y=t.updateQueue;if(y===null){var x=new Set;x.add(a),t.updateQueue=x}else y.add(a);break e}else{if(!(t&1)){Ad(i,u,t),lc();break e}a=Error(W(426))}}else if(he&&l.mode&1){var k=Rd(s);if(k!==null){!(k.flags&65536)&&(k.flags|=256),Dd(k,s,l,i,t),Hu(Lr(a,l));break e}}i=a=Lr(a,l),Ne!==4&&(Ne=2),So===null?So=[i]:So.push(i),i=s;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var m=om(i,a,t);Pd(i,m);break e;case 1:l=a;var v=i.type,g=i.stateNode;if(!(i.flags&128)&&(typeof v.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(yn===null||!yn.has(g)))){i.flags|=65536,t&=-t,i.lanes|=t;var w=im(i,l,t);Pd(i,w);break e}}i=i.return}while(i!==null)}Em(n)}catch(_){t=_,we===n&&n!==null&&(we=n=n.return);continue}break}while(!0)}function Sm(){var e=Ms.current;return Ms.current=js,e===null?js:e}function lc(){(Ne===0||Ne===3||Ne===2)&&(Ne=4),Ce===null||!(Kn&268435455)&&!(rl&268435455)||an(Ce,$e)}function bs(e,t){var n=le;le|=2;var r=Sm();(Ce!==e||$e!==t)&&(Ft=null,Dn(e,t));do try{nw();break}catch(o){km(e,o)}while(!0);if(Vu(),le=n,Ms.current=r,we!==null)throw Error(W(261));return Ce=null,$e=0,Ne}function nw(){for(;we!==null;)Nm(we)}function rw(){for(;we!==null&&!Mv();)Nm(we)}function Nm(e){var t=Cm(e.alternate,e,Xe);e.memoizedProps=e.pendingProps,t===null?Em(e):we=t,nc.current=null}function Em(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=Gx(n,t),n!==null){n.flags&=32767,we=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ne=6,we=null;return}}else if(n=Qx(n,t,Xe),n!==null){we=n;return}if(t=t.sibling,t!==null){we=t;return}we=t=e}while(t!==null);Ne===0&&(Ne=5)}function Pn(e,t,n){var r=ae,o=it.transition;try{it.transition=null,ae=1,ow(e,t,n,r)}finally{it.transition=o,ae=r}return null}function ow(e,t,n,r){do jr();while(dn!==null);if(le&6)throw Error(W(327));n=e.finishedWork;var o=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(W(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(Dv(e,i),e===Ce&&(we=Ce=null,$e=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Ti||(Ti=!0,jm(fs,function(){return jr(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=it.transition,it.transition=null;var s=ae;ae=1;var l=le;le|=4,nc.current=null,Zx(e,n),vm(n,e),Ex(ba),ps=!!Pa,ba=Pa=null,e.current=n,Jx(n),$v(),le=l,ae=s,it.transition=i}else e.current=n;if(Ti&&(Ti=!1,dn=e,Ps=o),i=e.pendingLanes,i===0&&(yn=null),Iv(n.stateNode),Ye(e,xe()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if($s)throw $s=!1,e=qa,qa=null,e;return Ps&1&&e.tag!==0&&jr(),i=e.pendingLanes,i&1?e===Za?No++:(No=0,Za=e):No=0,_n(),null}function jr(){if(dn!==null){var e=op(Ps),t=it.transition,n=ae;try{if(it.transition=null,ae=16>e?16:e,dn===null)var r=!1;else{if(e=dn,dn=null,Ps=0,le&6)throw Error(W(331));var o=le;for(le|=4,K=e.current;K!==null;){var i=K,s=i.child;if(K.flags&16){var l=i.deletions;if(l!==null){for(var a=0;a<l.length;a++){var u=l[a];for(K=u;K!==null;){var d=K;switch(d.tag){case 0:case 11:case 15:ko(8,d,i)}var h=d.child;if(h!==null)h.return=d,K=h;else for(;K!==null;){d=K;var c=d.sibling,p=d.return;if(mm(d),d===u){K=null;break}if(c!==null){c.return=p,K=c;break}K=p}}}var y=i.alternate;if(y!==null){var x=y.child;if(x!==null){y.child=null;do{var k=x.sibling;x.sibling=null,x=k}while(x!==null)}}K=i}}if(i.subtreeFlags&2064&&s!==null)s.return=i,K=s;else e:for(;K!==null;){if(i=K,i.flags&2048)switch(i.tag){case 0:case 11:case 15:ko(9,i,i.return)}var m=i.sibling;if(m!==null){m.return=i.return,K=m;break e}K=i.return}}var v=e.current;for(K=v;K!==null;){s=K;var g=s.child;if(s.subtreeFlags&2064&&g!==null)g.return=s,K=g;else e:for(s=v;K!==null;){if(l=K,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:nl(9,l)}}catch(_){ve(l,l.return,_)}if(l===s){K=null;break e}var w=l.sibling;if(w!==null){w.return=l.return,K=w;break e}K=l.return}}if(le=o,_n(),It&&typeof It.onPostCommitFiberRoot=="function")try{It.onPostCommitFiberRoot(Ks,e)}catch{}r=!0}return r}finally{ae=n,it.transition=t}}return!1}function qd(e,t,n){t=Lr(n,t),t=om(e,t,1),e=gn(e,t,1),t=Re(),e!==null&&(ri(e,1,t),Ye(e,t))}function ve(e,t,n){if(e.tag===3)qd(e,e,n);else for(;t!==null;){if(t.tag===3){qd(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(yn===null||!yn.has(r))){e=Lr(n,e),e=im(t,e,1),t=gn(t,e,1),e=Re(),t!==null&&(ri(t,1,e),Ye(t,e));break}}t=t.return}}function iw(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Re(),e.pingedLanes|=e.suspendedLanes&n,Ce===e&&($e&n)===n&&(Ne===4||Ne===3&&($e&130023424)===$e&&500>xe()-oc?Dn(e,0):rc|=n),Ye(e,t)}function _m(e,t){t===0&&(e.mode&1?(t=Ni,Ni<<=1,!(Ni&130023424)&&(Ni=4194304)):t=1);var n=Re();e=Qt(e,t),e!==null&&(ri(e,t,n),Ye(e,n))}function sw(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),_m(e,n)}function lw(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(W(314))}r!==null&&r.delete(t),_m(e,n)}var Cm;Cm=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||We.current)Be=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Be=!1,Kx(e,t,n);Be=!!(e.flags&131072)}else Be=!1,he&&t.flags&1048576&&Pp(t,ks,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ji(e,t),e=t.pendingProps;var o=br(t,ze.current);Cr(t,n),o=qu(null,t,r,e,o,n);var i=Zu();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ue(r)?(i=!0,xs(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Yu(t),o.updater=tl,t.stateNode=o,o._reactInternals=t,Fa(t,r,e,n),t=Va(null,t,r,!0,i,n)):(t.tag=0,he&&i&&Ou(t),Ae(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ji(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=uw(r),e=dt(r,e),o){case 0:t=Ba(null,t,r,e,n);break e;case 1:t=Hd(null,t,r,e,n);break e;case 11:t=Od(null,t,r,e,n);break e;case 14:t=Fd(null,t,r,dt(r.type,e),n);break e}throw Error(W(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:dt(r,o),Ba(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:dt(r,o),Hd(e,t,r,o,n);case 3:e:{if(um(t),e===null)throw Error(W(387));r=t.pendingProps,i=t.memoizedState,o=i.element,Ap(e,t),Es(t,r,null,n);var s=t.memoizedState;if(r=s.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=Lr(Error(W(423)),t),t=Bd(e,t,r,n,o);break e}else if(r!==o){o=Lr(Error(W(424)),t),t=Bd(e,t,r,n,o);break e}else for(Qe=mn(t.stateNode.containerInfo.firstChild),Ge=t,he=!0,mt=null,n=zp(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ir(),r===o){t=Gt(e,t,n);break e}Ae(e,t,r,n)}t=t.child}return t;case 5:return Rp(t),e===null&&Ra(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,Ia(r,o)?s=null:i!==null&&Ia(r,i)&&(t.flags|=32),am(e,t),Ae(e,t,s,n),t.child;case 6:return e===null&&Ra(t),null;case 13:return cm(e,t,n);case 4:return Xu(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Tr(t,null,r,n):Ae(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:dt(r,o),Od(e,t,r,o,n);case 7:return Ae(e,t,t.pendingProps,n),t.child;case 8:return Ae(e,t,t.pendingProps.children,n),t.child;case 12:return Ae(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,ue(Ss,r._currentValue),r._currentValue=s,i!==null)if(St(i.value,s)){if(i.children===o.children&&!We.current){t=Gt(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var l=i.dependencies;if(l!==null){s=i.child;for(var a=l.firstContext;a!==null;){if(a.context===r){if(i.tag===1){a=Ut(-1,n&-n),a.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?a.next=a:(a.next=d.next,d.next=a),u.pending=a}}i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),Da(i.return,n,t),l.lanes|=n;break}a=a.next}}else if(i.tag===10)s=i.type===t.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(W(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Da(s,n,t),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===t){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}Ae(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Cr(t,n),o=st(o),r=r(o),t.flags|=1,Ae(e,t,r,n),t.child;case 14:return r=t.type,o=dt(r,t.pendingProps),o=dt(r.type,o),Fd(e,t,r,o,n);case 15:return sm(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:dt(r,o),Ji(e,t),t.tag=1,Ue(r)?(e=!0,xs(t)):e=!1,Cr(t,n),rm(t,r,o),Fa(t,r,o,n),Va(null,t,r,!0,e,n);case 19:return dm(e,t,n);case 22:return lm(e,t,n)}throw Error(W(156,t.tag))};function jm(e,t){return ep(e,t)}function aw(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ot(e,t,n,r){return new aw(e,t,n,r)}function ac(e){return e=e.prototype,!(!e||!e.isReactComponent)}function uw(e){if(typeof e=="function")return ac(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ju)return 11;if(e===Mu)return 14}return 2}function xn(e,t){var n=e.alternate;return n===null?(n=ot(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function ns(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")ac(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case cr:return On(n.children,o,i,t);case Cu:s=8,o|=8;break;case ca:return e=ot(12,n,t,o|2),e.elementType=ca,e.lanes=i,e;case da:return e=ot(13,n,t,o),e.elementType=da,e.lanes=i,e;case fa:return e=ot(19,n,t,o),e.elementType=fa,e.lanes=i,e;case Rh:return ol(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Lh:s=10;break e;case Ah:s=9;break e;case ju:s=11;break e;case Mu:s=14;break e;case nn:s=16,r=null;break e}throw Error(W(130,e==null?e:typeof e,""))}return t=ot(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function On(e,t,n,r){return e=ot(7,e,r,t),e.lanes=n,e}function ol(e,t,n,r){return e=ot(22,e,r,t),e.elementType=Rh,e.lanes=n,e.stateNode={isHidden:!1},e}function Gl(e,t,n){return e=ot(6,e,null,t),e.lanes=n,e}function ql(e,t,n){return t=ot(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function cw(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=bl(0),this.expirationTimes=bl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=bl(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function uc(e,t,n,r,o,i,s,l,a){return e=new cw(e,t,n,l,a),t===1?(t=1,i===!0&&(t|=8)):t=0,i=ot(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Yu(i),e}function dw(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ur,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Mm(e){if(!e)return kn;e=e._reactInternals;e:{if(nr(e)!==e||e.tag!==1)throw Error(W(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ue(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(W(171))}if(e.tag===1){var n=e.type;if(Ue(n))return Mp(e,n,t)}return t}function $m(e,t,n,r,o,i,s,l,a){return e=uc(n,r,!0,e,o,i,s,l,a),e.context=Mm(null),n=e.current,r=Re(),o=vn(n),i=Ut(r,o),i.callback=t??null,gn(n,i,o),e.current.lanes=o,ri(e,o,r),Ye(e,r),e}function il(e,t,n,r){var o=t.current,i=Re(),s=vn(o);return n=Mm(n),t.context===null?t.context=n:t.pendingContext=n,t=Ut(i,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=gn(o,t,s),e!==null&&(wt(e,o,s,i),Gi(e,o,s)),s}function Is(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 Zd(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function cc(e,t){Zd(e,t),(e=e.alternate)&&Zd(e,t)}function fw(){return null}var Pm=typeof reportError=="function"?reportError:function(e){console.error(e)};function dc(e){this._internalRoot=e}sl.prototype.render=dc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(W(409));il(e,t,null,null)};sl.prototype.unmount=dc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Qn(function(){il(null,e,null,null)}),t[Kt]=null}};function sl(e){this._internalRoot=e}sl.prototype.unstable_scheduleHydration=function(e){if(e){var t=lp();e={blockedOn:null,target:e,priority:t};for(var n=0;n<ln.length&&t!==0&&t<ln[n].priority;n++);ln.splice(n,0,e),n===0&&up(e)}};function fc(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ll(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Jd(){}function hw(e,t,n,r,o){if(o){if(typeof r=="function"){var i=r;r=function(){var u=Is(s);i.call(u)}}var s=$m(t,r,e,0,null,!1,!1,"",Jd);return e._reactRootContainer=s,e[Kt]=s.current,Lo(e.nodeType===8?e.parentNode:e),Qn(),s}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var l=r;r=function(){var u=Is(a);l.call(u)}}var a=uc(e,0,!1,null,null,!1,!1,"",Jd);return e._reactRootContainer=a,e[Kt]=a.current,Lo(e.nodeType===8?e.parentNode:e),Qn(function(){il(t,a,n,r)}),a}function al(e,t,n,r,o){var i=n._reactRootContainer;if(i){var s=i;if(typeof o=="function"){var l=o;o=function(){var a=Is(s);l.call(a)}}il(t,s,e,o)}else s=hw(n,t,e,o,r);return Is(s)}ip=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=uo(t.pendingLanes);n!==0&&(bu(t,n|1),Ye(t,xe()),!(le&6)&&(Ar=xe()+500,_n()))}break;case 13:Qn(function(){var r=Qt(e,1);if(r!==null){var o=Re();wt(r,e,1,o)}}),cc(e,1)}};Iu=function(e){if(e.tag===13){var t=Qt(e,134217728);if(t!==null){var n=Re();wt(t,e,134217728,n)}cc(e,134217728)}};sp=function(e){if(e.tag===13){var t=vn(e),n=Qt(e,t);if(n!==null){var r=Re();wt(n,e,t,r)}cc(e,t)}};lp=function(){return ae};ap=function(e,t){var n=ae;try{return ae=e,t()}finally{ae=n}};Sa=function(e,t,n){switch(t){case"input":if(ma(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=Zs(r);if(!o)throw Error(W(90));Oh(r),ma(r,o)}}}break;case"textarea":Hh(e,n);break;case"select":t=n.value,t!=null&&Sr(e,!!n.multiple,t,!1)}};Kh=ic;Qh=Qn;var pw={usingClientEntryPoint:!1,Events:[ii,pr,Zs,Yh,Xh,ic]},oo={findFiberByHostInstance:In,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},mw={bundleType:oo.bundleType,version:oo.version,rendererPackageName:oo.rendererPackageName,rendererConfig:oo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Zt.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Zh(e),e===null?null:e.stateNode},findFiberByHostInstance:oo.findFiberByHostInstance||fw,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 zi=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zi.isDisabled&&zi.supportsFiber)try{Ks=zi.inject(mw),It=zi}catch{}}Je.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=pw;Je.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!fc(t))throw Error(W(200));return dw(e,t,null,n)};Je.createRoot=function(e,t){if(!fc(e))throw Error(W(299));var n=!1,r="",o=Pm;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=uc(e,1,!1,null,null,n,!1,r,o),e[Kt]=t.current,Lo(e.nodeType===8?e.parentNode:e),new dc(t)};Je.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(W(188)):(e=Object.keys(e).join(","),Error(W(268,e)));return e=Zh(t),e=e===null?null:e.stateNode,e};Je.flushSync=function(e){return Qn(e)};Je.hydrate=function(e,t,n){if(!ll(t))throw Error(W(200));return al(null,e,t,!0,n)};Je.hydrateRoot=function(e,t,n){if(!fc(e))throw Error(W(405));var r=n!=null&&n.hydratedSources||null,o=!1,i="",s=Pm;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=$m(t,null,e,1,n??null,o,!1,i,s),e[Kt]=t.current,Lo(e),r)for(e=0;e<r.length;e++)n=r[e],o=n._getVersion,o=o(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new sl(t)};Je.render=function(e,t,n){if(!ll(t))throw Error(W(200));return al(null,e,t,!1,n)};Je.unmountComponentAtNode=function(e){if(!ll(e))throw Error(W(40));return e._reactRootContainer?(Qn(function(){al(null,null,e,!1,function(){e._reactRootContainer=null,e[Kt]=null})}),!0):!1};Je.unstable_batchedUpdates=ic;Je.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!ll(n))throw Error(W(200));if(e==null||e._reactInternals===void 0)throw Error(W(38));return al(e,t,n,!1,r)};Je.version="18.3.1-next-f1338f8080-20240426";function bm(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(bm)}catch(e){console.error(e)}}bm(),bh.exports=Je;var Im=bh.exports,Tm,ef=Im;Tm=ef.createRoot,ef.hydrateRoot;function ke(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,r;n<e.length;n++)(r=ke(e[n]))!==""&&(t+=(t&&" ")+r);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var gw={value:()=>{}};function ul(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new rs(n)}function rs(e){this._=e}function yw(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",o=n.indexOf(".");if(o>=0&&(r=n.slice(o+1),n=n.slice(0,o)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}rs.prototype=ul.prototype={constructor:rs,on:function(e,t){var n=this._,r=yw(e+"",n),o,i=-1,s=r.length;if(arguments.length<2){for(;++i<s;)if((o=(e=r[i]).type)&&(o=vw(n[o],e.name)))return o;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++i<s;)if(o=(e=r[i]).type)n[o]=tf(n[o],e.name,t);else if(t==null)for(o in n)n[o]=tf(n[o],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new rs(e)},call:function(e,t){if((o=arguments.length-2)>0)for(var n=new Array(o),r=0,o,i;r<o;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(i=this._[e],r=0,o=i.length;r<o;++r)i[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],o=0,i=r.length;o<i;++o)r[o].value.apply(t,n)}};function vw(e,t){for(var n=0,r=e.length,o;n<r;++n)if((o=e[n]).name===t)return o.value}function tf(e,t,n){for(var r=0,o=e.length;r<o;++r)if(e[r].name===t){e[r]=gw,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var tu="http://www.w3.org/1999/xhtml";const nf={svg:"http://www.w3.org/2000/svg",xhtml:tu,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function cl(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),nf.hasOwnProperty(t)?{space:nf[t],local:e}:e}function xw(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===tu&&t.documentElement.namespaceURI===tu?t.createElement(e):t.createElementNS(n,e)}}function ww(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function zm(e){var t=cl(e);return(t.local?ww:xw)(t)}function kw(){}function hc(e){return e==null?kw:function(){return this.querySelector(e)}}function Sw(e){typeof e!="function"&&(e=hc(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i=t[o],s=i.length,l=r[o]=new Array(s),a,u,d=0;d<s;++d)(a=i[d])&&(u=e.call(a,a.__data__,d,i))&&("__data__"in a&&(u.__data__=a.__data__),l[d]=u);return new Ze(r,this._parents)}function Nw(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Ew(){return[]}function Lm(e){return e==null?Ew:function(){return this.querySelectorAll(e)}}function _w(e){return function(){return Nw(e.apply(this,arguments))}}function Cw(e){typeof e=="function"?e=_w(e):e=Lm(e);for(var t=this._groups,n=t.length,r=[],o=[],i=0;i<n;++i)for(var s=t[i],l=s.length,a,u=0;u<l;++u)(a=s[u])&&(r.push(e.call(a,a.__data__,u,s)),o.push(a));return new Ze(r,o)}function Am(e){return function(){return this.matches(e)}}function Rm(e){return function(t){return t.matches(e)}}var jw=Array.prototype.find;function Mw(e){return function(){return jw.call(this.children,e)}}function $w(){return this.firstElementChild}function Pw(e){return this.select(e==null?$w:Mw(typeof e=="function"?e:Rm(e)))}var bw=Array.prototype.filter;function Iw(){return Array.from(this.children)}function Tw(e){return function(){return bw.call(this.children,e)}}function zw(e){return this.selectAll(e==null?Iw:Tw(typeof e=="function"?e:Rm(e)))}function Lw(e){typeof e!="function"&&(e=Am(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i=t[o],s=i.length,l=r[o]=[],a,u=0;u<s;++u)(a=i[u])&&e.call(a,a.__data__,u,i)&&l.push(a);return new Ze(r,this._parents)}function Dm(e){return new Array(e.length)}function Aw(){return new Ze(this._enter||this._groups.map(Dm),this._parents)}function Ts(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Ts.prototype={constructor:Ts,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function Rw(e){return function(){return e}}function Dw(e,t,n,r,o,i){for(var s=0,l,a=t.length,u=i.length;s<u;++s)(l=t[s])?(l.__data__=i[s],r[s]=l):n[s]=new Ts(e,i[s]);for(;s<a;++s)(l=t[s])&&(o[s]=l)}function Ow(e,t,n,r,o,i,s){var l,a,u=new Map,d=t.length,h=i.length,c=new Array(d),p;for(l=0;l<d;++l)(a=t[l])&&(c[l]=p=s.call(a,a.__data__,l,t)+"",u.has(p)?o[l]=a:u.set(p,a));for(l=0;l<h;++l)p=s.call(e,i[l],l,i)+"",(a=u.get(p))?(r[l]=a,a.__data__=i[l],u.delete(p)):n[l]=new Ts(e,i[l]);for(l=0;l<d;++l)(a=t[l])&&u.get(c[l])===a&&(o[l]=a)}function Fw(e){return e.__data__}function Hw(e,t){if(!arguments.length)return Array.from(this,Fw);var n=t?Ow:Dw,r=this._parents,o=this._groups;typeof e!="function"&&(e=Rw(e));for(var i=o.length,s=new Array(i),l=new Array(i),a=new Array(i),u=0;u<i;++u){var d=r[u],h=o[u],c=h.length,p=Bw(e.call(d,d&&d.__data__,u,r)),y=p.length,x=l[u]=new Array(y),k=s[u]=new Array(y),m=a[u]=new Array(c);n(d,h,x,k,m,p,t);for(var v=0,g=0,w,_;v<y;++v)if(w=x[v]){for(v>=g&&(g=v+1);!(_=k[g])&&++g<y;);w._next=_||null}}return s=new Ze(s,r),s._enter=l,s._exit=a,s}function Bw(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Vw(){return new Ze(this._exit||this._groups.map(Dm),this._parents)}function Ww(e,t,n){var r=this.enter(),o=this,i=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(o=t(o),o&&(o=o.selection())),n==null?i.remove():n(i),r&&o?r.merge(o).order():o}function Uw(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,o=n.length,i=r.length,s=Math.min(o,i),l=new Array(o),a=0;a<s;++a)for(var u=n[a],d=r[a],h=u.length,c=l[a]=new Array(h),p,y=0;y<h;++y)(p=u[y]||d[y])&&(c[y]=p);for(;a<o;++a)l[a]=n[a];return new Ze(l,this._parents)}function Yw(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],o=r.length-1,i=r[o],s;--o>=0;)(s=r[o])&&(i&&s.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(s,i),i=s);return this}function Xw(e){e||(e=Kw);function t(h,c){return h&&c?e(h.__data__,c.__data__):!h-!c}for(var n=this._groups,r=n.length,o=new Array(r),i=0;i<r;++i){for(var s=n[i],l=s.length,a=o[i]=new Array(l),u,d=0;d<l;++d)(u=s[d])&&(a[d]=u);a.sort(t)}return new Ze(o,this._parents).order()}function Kw(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Qw(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Gw(){return Array.from(this)}function qw(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],o=0,i=r.length;o<i;++o){var s=r[o];if(s)return s}return null}function Zw(){let e=0;for(const t of this)++e;return e}function Jw(){return!this.node()}function e1(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var o=t[n],i=0,s=o.length,l;i<s;++i)(l=o[i])&&e.call(l,l.__data__,i,o);return this}function t1(e){return function(){this.removeAttribute(e)}}function n1(e){return function(){this.removeAttributeNS(e.space,e.local)}}function r1(e,t){return function(){this.setAttribute(e,t)}}function o1(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function i1(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function s1(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function l1(e,t){var n=cl(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?n1:t1:typeof t=="function"?n.local?s1:i1:n.local?o1:r1)(n,t))}function Om(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function a1(e){return function(){this.style.removeProperty(e)}}function u1(e,t,n){return function(){this.style.setProperty(e,t,n)}}function c1(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function d1(e,t,n){return arguments.length>1?this.each((t==null?a1:typeof t=="function"?c1:u1)(e,t,n??"")):Rr(this.node(),e)}function Rr(e,t){return e.style.getPropertyValue(t)||Om(e).getComputedStyle(e,null).getPropertyValue(t)}function f1(e){return function(){delete this[e]}}function h1(e,t){return function(){this[e]=t}}function p1(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function m1(e,t){return arguments.length>1?this.each((t==null?f1:typeof t=="function"?p1:h1)(e,t)):this.node()[e]}function Fm(e){return e.trim().split(/^|\s+/)}function pc(e){return e.classList||new Hm(e)}function Hm(e){this._node=e,this._names=Fm(e.getAttribute("class")||"")}Hm.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Bm(e,t){for(var n=pc(e),r=-1,o=t.length;++r<o;)n.add(t[r])}function Vm(e,t){for(var n=pc(e),r=-1,o=t.length;++r<o;)n.remove(t[r])}function g1(e){return function(){Bm(this,e)}}function y1(e){return function(){Vm(this,e)}}function v1(e,t){return function(){(t.apply(this,arguments)?Bm:Vm)(this,e)}}function x1(e,t){var n=Fm(e+"");if(arguments.length<2){for(var r=pc(this.node()),o=-1,i=n.length;++o<i;)if(!r.contains(n[o]))return!1;return!0}return this.each((typeof t=="function"?v1:t?g1:y1)(n,t))}function w1(){this.textContent=""}function k1(e){return function(){this.textContent=e}}function S1(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function N1(e){return arguments.length?this.each(e==null?w1:(typeof e=="function"?S1:k1)(e)):this.node().textContent}function E1(){this.innerHTML=""}function _1(e){return function(){this.innerHTML=e}}function C1(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function j1(e){return arguments.length?this.each(e==null?E1:(typeof e=="function"?C1:_1)(e)):this.node().innerHTML}function M1(){this.nextSibling&&this.parentNode.appendChild(this)}function $1(){return this.each(M1)}function P1(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function b1(){return this.each(P1)}function I1(e){var t=typeof e=="function"?e:zm(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function T1(){return null}function z1(e,t){var n=typeof e=="function"?e:zm(e),r=t==null?T1:typeof t=="function"?t:hc(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function L1(){var e=this.parentNode;e&&e.removeChild(this)}function A1(){return this.each(L1)}function R1(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function D1(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function O1(e){return this.select(e?D1:R1)}function F1(e){return arguments.length?this.property("__data__",e):this.node().__data__}function H1(e){return function(t){e.call(this,t,this.__data__)}}function B1(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function V1(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,o=t.length,i;n<o;++n)i=t[n],(!e.type||i.type===e.type)&&i.name===e.name?this.removeEventListener(i.type,i.listener,i.options):t[++r]=i;++r?t.length=r:delete this.__on}}}function W1(e,t,n){return function(){var r=this.__on,o,i=H1(t);if(r){for(var s=0,l=r.length;s<l;++s)if((o=r[s]).type===e.type&&o.name===e.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=i,o.options=n),o.value=t;return}}this.addEventListener(e.type,i,n),o={type:e.type,name:e.name,value:t,listener:i,options:n},r?r.push(o):this.__on=[o]}}function U1(e,t,n){var r=B1(e+""),o,i=r.length,s;if(arguments.length<2){var l=this.node().__on;if(l){for(var a=0,u=l.length,d;a<u;++a)for(o=0,d=l[a];o<i;++o)if((s=r[o]).type===d.type&&s.name===d.name)return d.value}return}for(l=t?W1:V1,o=0;o<i;++o)this.each(l(r[o],t,n));return this}function Wm(e,t,n){var r=Om(e),o=r.CustomEvent;typeof o=="function"?o=new o(t,n):(o=r.document.createEvent("Event"),n?(o.initEvent(t,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function Y1(e,t){return function(){return Wm(this,e,t)}}function X1(e,t){return function(){return Wm(this,e,t.apply(this,arguments))}}function K1(e,t){return this.each((typeof t=="function"?X1:Y1)(e,t))}function*Q1(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],o=0,i=r.length,s;o<i;++o)(s=r[o])&&(yield s)}var Um=[null];function Ze(e,t){this._groups=e,this._parents=t}function li(){return new Ze([[document.documentElement]],Um)}function G1(){return this}Ze.prototype=li.prototype={constructor:Ze,select:Sw,selectAll:Cw,selectChild:Pw,selectChildren:zw,filter:Lw,data:Hw,enter:Aw,exit:Vw,join:Ww,merge:Uw,selection:G1,order:Yw,sort:Xw,call:Qw,nodes:Gw,node:qw,size:Zw,empty:Jw,each:e1,attr:l1,style:d1,property:m1,classed:x1,text:N1,html:j1,raise:$1,lower:b1,append:I1,insert:z1,remove:A1,clone:O1,datum:F1,on:U1,dispatch:K1,[Symbol.iterator]:Q1};function Ke(e){return typeof e=="string"?new Ze([[document.querySelector(e)]],[document.documentElement]):new Ze([[e]],Um)}function q1(e){let t;for(;t=e.sourceEvent;)e=t;return e}function ht(e,t){if(e=q1(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}}return[e.pageX,e.pageY]}const Z1={passive:!1},Wo={capture:!0,passive:!1};function Zl(e){e.stopImmediatePropagation()}function Mr(e){e.preventDefault(),e.stopImmediatePropagation()}function Ym(e){var t=e.document.documentElement,n=Ke(e).on("dragstart.drag",Mr,Wo);"onselectstart"in t?n.on("selectstart.drag",Mr,Wo):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Xm(e,t){var n=e.document.documentElement,r=Ke(e).on("dragstart.drag",null);t&&(r.on("click.drag",Mr,Wo),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const Li=e=>()=>e;function nu(e,{sourceEvent:t,subject:n,target:r,identifier:o,active:i,x:s,y:l,dx:a,dy:u,dispatch:d}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:o,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:a,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:d}})}nu.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function J1(e){return!e.ctrlKey&&!e.button}function ek(){return this.parentNode}function tk(e,t){return t??{x:e.x,y:e.y}}function nk(){return navigator.maxTouchPoints||"ontouchstart"in this}function Km(){var e=J1,t=ek,n=tk,r=nk,o={},i=ul("start","drag","end"),s=0,l,a,u,d,h=0;function c(w){w.on("mousedown.drag",p).filter(r).on("touchstart.drag",k).on("touchmove.drag",m,Z1).on("touchend.drag touchcancel.drag",v).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(w,_){if(!(d||!e.call(this,w,_))){var S=g(this,t.call(this,w,_),w,_,"mouse");S&&(Ke(w.view).on("mousemove.drag",y,Wo).on("mouseup.drag",x,Wo),Ym(w.view),Zl(w),u=!1,l=w.clientX,a=w.clientY,S("start",w))}}function y(w){if(Mr(w),!u){var _=w.clientX-l,S=w.clientY-a;u=_*_+S*S>h}o.mouse("drag",w)}function x(w){Ke(w.view).on("mousemove.drag mouseup.drag",null),Xm(w.view,u),Mr(w),o.mouse("end",w)}function k(w,_){if(e.call(this,w,_)){var S=w.changedTouches,E=t.call(this,w,_),P=S.length,b,D;for(b=0;b<P;++b)(D=g(this,E,w,_,S[b].identifier,S[b]))&&(Zl(w),D("start",w,S[b]))}}function m(w){var _=w.changedTouches,S=_.length,E,P;for(E=0;E<S;++E)(P=o[_[E].identifier])&&(Mr(w),P("drag",w,_[E]))}function v(w){var _=w.changedTouches,S=_.length,E,P;for(d&&clearTimeout(d),d=setTimeout(function(){d=null},500),E=0;E<S;++E)(P=o[_[E].identifier])&&(Zl(w),P("end",w,_[E]))}function g(w,_,S,E,P,b){var D=i.copy(),A=ht(b||S,_),H,O,N;if((N=n.call(w,new nu("beforestart",{sourceEvent:S,target:c,identifier:P,active:s,x:A[0],y:A[1],dx:0,dy:0,dispatch:D}),E))!=null)return H=N.x-A[0]||0,O=N.y-A[1]||0,function z(C,T,$){var M=A,L;switch(C){case"start":o[P]=z,L=s++;break;case"end":delete o[P],--s;case"drag":A=ht($||T,_),L=s;break}D.call(C,w,new nu(C,{sourceEvent:T,subject:N,target:c,identifier:P,active:L,x:A[0]+H,y:A[1]+O,dx:A[0]-M[0],dy:A[1]-M[1],dispatch:D}),E)}}return c.filter=function(w){return arguments.length?(e=typeof w=="function"?w:Li(!!w),c):e},c.container=function(w){return arguments.length?(t=typeof w=="function"?w:Li(w),c):t},c.subject=function(w){return arguments.length?(n=typeof w=="function"?w:Li(w),c):n},c.touchable=function(w){return arguments.length?(r=typeof w=="function"?w:Li(!!w),c):r},c.on=function(){var w=i.on.apply(i,arguments);return w===i?c:w},c.clickDistance=function(w){return arguments.length?(h=(w=+w)*w,c):Math.sqrt(h)},c}function mc(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Qm(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function ai(){}var Uo=.7,zs=1/Uo,$r="\\s*([+-]?\\d+)\\s*",Yo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",zt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",rk=/^#([0-9a-f]{3,8})$/,ok=new RegExp(`^rgb\\(${$r},${$r},${$r}\\)$`),ik=new RegExp(`^rgb\\(${zt},${zt},${zt}\\)$`),sk=new RegExp(`^rgba\\(${$r},${$r},${$r},${Yo}\\)$`),lk=new RegExp(`^rgba\\(${zt},${zt},${zt},${Yo}\\)$`),ak=new RegExp(`^hsl\\(${Yo},${zt},${zt}\\)$`),uk=new RegExp(`^hsla\\(${Yo},${zt},${zt},${Yo}\\)$`),rf={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};mc(ai,Gn,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:of,formatHex:of,formatHex8:ck,formatHsl:dk,formatRgb:sf,toString:sf});function of(){return this.rgb().formatHex()}function ck(){return this.rgb().formatHex8()}function dk(){return Gm(this).formatHsl()}function sf(){return this.rgb().formatRgb()}function Gn(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=rk.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?lf(t):n===3?new Ve(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Ai(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Ai(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=ok.exec(e))?new Ve(t[1],t[2],t[3],1):(t=ik.exec(e))?new Ve(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=sk.exec(e))?Ai(t[1],t[2],t[3],t[4]):(t=lk.exec(e))?Ai(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=ak.exec(e))?cf(t[1],t[2]/100,t[3]/100,1):(t=uk.exec(e))?cf(t[1],t[2]/100,t[3]/100,t[4]):rf.hasOwnProperty(e)?lf(rf[e]):e==="transparent"?new Ve(NaN,NaN,NaN,0):null}function lf(e){return new Ve(e>>16&255,e>>8&255,e&255,1)}function Ai(e,t,n,r){return r<=0&&(e=t=n=NaN),new Ve(e,t,n,r)}function fk(e){return e instanceof ai||(e=Gn(e)),e?(e=e.rgb(),new Ve(e.r,e.g,e.b,e.opacity)):new Ve}function ru(e,t,n,r){return arguments.length===1?fk(e):new Ve(e,t,n,r??1)}function Ve(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}mc(Ve,ru,Qm(ai,{brighter(e){return e=e==null?zs:Math.pow(zs,e),new Ve(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Uo:Math.pow(Uo,e),new Ve(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ve(Fn(this.r),Fn(this.g),Fn(this.b),Ls(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:af,formatHex:af,formatHex8:hk,formatRgb:uf,toString:uf}));function af(){return`#${Ln(this.r)}${Ln(this.g)}${Ln(this.b)}`}function hk(){return`#${Ln(this.r)}${Ln(this.g)}${Ln(this.b)}${Ln((isNaN(this.opacity)?1:this.opacity)*255)}`}function uf(){const e=Ls(this.opacity);return`${e===1?"rgb(":"rgba("}${Fn(this.r)}, ${Fn(this.g)}, ${Fn(this.b)}${e===1?")":`, ${e})`}`}function Ls(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Fn(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ln(e){return e=Fn(e),(e<16?"0":"")+e.toString(16)}function cf(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new gt(e,t,n,r)}function Gm(e){if(e instanceof gt)return new gt(e.h,e.s,e.l,e.opacity);if(e instanceof ai||(e=Gn(e)),!e)return new gt;if(e instanceof gt)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),s=NaN,l=i-o,a=(i+o)/2;return l?(t===i?s=(n-r)/l+(n<r)*6:n===i?s=(r-t)/l+2:s=(t-n)/l+4,l/=a<.5?i+o:2-i-o,s*=60):l=a>0&&a<1?0:s,new gt(s,l,a,e.opacity)}function pk(e,t,n,r){return arguments.length===1?Gm(e):new gt(e,t,n,r??1)}function gt(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}mc(gt,pk,Qm(ai,{brighter(e){return e=e==null?zs:Math.pow(zs,e),new gt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Uo:Math.pow(Uo,e),new gt(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new Ve(Jl(e>=240?e-240:e+120,o,r),Jl(e,o,r),Jl(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new gt(df(this.h),Ri(this.s),Ri(this.l),Ls(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Ls(this.opacity);return`${e===1?"hsl(":"hsla("}${df(this.h)}, ${Ri(this.s)*100}%, ${Ri(this.l)*100}%${e===1?")":`, ${e})`}`}}));function df(e){return e=(e||0)%360,e<0?e+360:e}function Ri(e){return Math.max(0,Math.min(1,e||0))}function Jl(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const gc=e=>()=>e;function mk(e,t){return function(n){return e+n*t}}function gk(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function yk(e){return(e=+e)==1?qm:function(t,n){return n-t?gk(t,n,e):gc(isNaN(t)?n:t)}}function qm(e,t){var n=t-e;return n?mk(e,n):gc(isNaN(e)?t:e)}const As=function e(t){var n=yk(t);function r(o,i){var s=n((o=ru(o)).r,(i=ru(i)).r),l=n(o.g,i.g),a=n(o.b,i.b),u=qm(o.opacity,i.opacity);return function(d){return o.r=s(d),o.g=l(d),o.b=a(d),o.opacity=u(d),o+""}}return r.gamma=e,r}(1);function vk(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),o;return function(i){for(o=0;o<n;++o)r[o]=e[o]*(1-i)+t[o]*i;return r}}function xk(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function wk(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,o=new Array(r),i=new Array(n),s;for(s=0;s<r;++s)o[s]=Eo(e[s],t[s]);for(;s<n;++s)i[s]=t[s];return function(l){for(s=0;s<r;++s)i[s]=o[s](l);return i}}function kk(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Mt(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Sk(e,t){var n={},r={},o;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(o in t)o in e?n[o]=Eo(e[o],t[o]):r[o]=t[o];return function(i){for(o in n)r[o]=n[o](i);return r}}var ou=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ea=new RegExp(ou.source,"g");function Nk(e){return function(){return e}}function Ek(e){return function(t){return e(t)+""}}function Zm(e,t){var n=ou.lastIndex=ea.lastIndex=0,r,o,i,s=-1,l=[],a=[];for(e=e+"",t=t+"";(r=ou.exec(e))&&(o=ea.exec(t));)(i=o.index)>n&&(i=t.slice(n,i),l[s]?l[s]+=i:l[++s]=i),(r=r[0])===(o=o[0])?l[s]?l[s]+=o:l[++s]=o:(l[++s]=null,a.push({i:s,x:Mt(r,o)})),n=ea.lastIndex;return n<t.length&&(i=t.slice(n),l[s]?l[s]+=i:l[++s]=i),l.length<2?a[0]?Ek(a[0].x):Nk(t):(t=a.length,function(u){for(var d=0,h;d<t;++d)l[(h=a[d]).i]=h.x(u);return l.join("")})}function Eo(e,t){var n=typeof t,r;return t==null||n==="boolean"?gc(t):(n==="number"?Mt:n==="string"?(r=Gn(t))?(t=r,As):Zm:t instanceof Gn?As:t instanceof Date?kk:xk(t)?vk:Array.isArray(t)?wk:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Sk:Mt)(e,t)}var ff=180/Math.PI,iu={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Jm(e,t,n,r,o,i){var s,l,a;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(a=e*n+t*r)&&(n-=e*a,r-=t*a),(l=Math.sqrt(n*n+r*r))&&(n/=l,r/=l,a/=l),e*r<t*n&&(e=-e,t=-t,a=-a,s=-s),{translateX:o,translateY:i,rotate:Math.atan2(t,e)*ff,skewX:Math.atan(a)*ff,scaleX:s,scaleY:l}}var Di;function _k(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?iu:Jm(t.a,t.b,t.c,t.d,t.e,t.f)}function Ck(e){return e==null||(Di||(Di=document.createElementNS("http://www.w3.org/2000/svg","g")),Di.setAttribute("transform",e),!(e=Di.transform.baseVal.consolidate()))?iu:(e=e.matrix,Jm(e.a,e.b,e.c,e.d,e.e,e.f))}function eg(e,t,n,r){function o(u){return u.length?u.pop()+" ":""}function i(u,d,h,c,p,y){if(u!==h||d!==c){var x=p.push("translate(",null,t,null,n);y.push({i:x-4,x:Mt(u,h)},{i:x-2,x:Mt(d,c)})}else(h||c)&&p.push("translate("+h+t+c+n)}function s(u,d,h,c){u!==d?(u-d>180?d+=360:d-u>180&&(u+=360),c.push({i:h.push(o(h)+"rotate(",null,r)-2,x:Mt(u,d)})):d&&h.push(o(h)+"rotate("+d+r)}function l(u,d,h,c){u!==d?c.push({i:h.push(o(h)+"skewX(",null,r)-2,x:Mt(u,d)}):d&&h.push(o(h)+"skewX("+d+r)}function a(u,d,h,c,p,y){if(u!==h||d!==c){var x=p.push(o(p)+"scale(",null,",",null,")");y.push({i:x-4,x:Mt(u,h)},{i:x-2,x:Mt(d,c)})}else(h!==1||c!==1)&&p.push(o(p)+"scale("+h+","+c+")")}return function(u,d){var h=[],c=[];return u=e(u),d=e(d),i(u.translateX,u.translateY,d.translateX,d.translateY,h,c),s(u.rotate,d.rotate,h,c),l(u.skewX,d.skewX,h,c),a(u.scaleX,u.scaleY,d.scaleX,d.scaleY,h,c),u=d=null,function(p){for(var y=-1,x=c.length,k;++y<x;)h[(k=c[y]).i]=k.x(p);return h.join("")}}}var jk=eg(_k,"px, ","px)","deg)"),Mk=eg(Ck,", ",")",")"),$k=1e-12;function hf(e){return((e=Math.exp(e))+1/e)/2}function Pk(e){return((e=Math.exp(e))-1/e)/2}function bk(e){return((e=Math.exp(2*e))-1)/(e+1)}const os=function e(t,n,r){function o(i,s){var l=i[0],a=i[1],u=i[2],d=s[0],h=s[1],c=s[2],p=d-l,y=h-a,x=p*p+y*y,k,m;if(x<$k)m=Math.log(c/u)/t,k=function(E){return[l+E*p,a+E*y,u*Math.exp(t*E*m)]};else{var v=Math.sqrt(x),g=(c*c-u*u+r*x)/(2*u*n*v),w=(c*c-u*u-r*x)/(2*c*n*v),_=Math.log(Math.sqrt(g*g+1)-g),S=Math.log(Math.sqrt(w*w+1)-w);m=(S-_)/t,k=function(E){var P=E*m,b=hf(_),D=u/(n*v)*(b*bk(t*P+_)-Pk(_));return[l+D*p,a+D*y,u*b/hf(t*P+_)]}}return k.duration=m*1e3*t/Math.SQRT2,k}return o.rho=function(i){var s=Math.max(.001,+i),l=s*s,a=l*l;return e(s,l,a)},o}(Math.SQRT2,2,4);var Dr=0,fo=0,io=0,tg=1e3,Rs,ho,Ds=0,qn=0,dl=0,Xo=typeof performance=="object"&&performance.now?performance:Date,ng=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function yc(){return qn||(ng(Ik),qn=Xo.now()+dl)}function Ik(){qn=0}function Os(){this._call=this._time=this._next=null}Os.prototype=rg.prototype={constructor:Os,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?yc():+n)+(t==null?0:+t),!this._next&&ho!==this&&(ho?ho._next=this:Rs=this,ho=this),this._call=e,this._time=n,su()},stop:function(){this._call&&(this._call=null,this._time=1/0,su())}};function rg(e,t,n){var r=new Os;return r.restart(e,t,n),r}function Tk(){yc(),++Dr;for(var e=Rs,t;e;)(t=qn-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Dr}function pf(){qn=(Ds=Xo.now())+dl,Dr=fo=0;try{Tk()}finally{Dr=0,Lk(),qn=0}}function zk(){var e=Xo.now(),t=e-Ds;t>tg&&(dl-=t,Ds=e)}function Lk(){for(var e,t=Rs,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Rs=n);ho=e,su(r)}function su(e){if(!Dr){fo&&(fo=clearTimeout(fo));var t=e-qn;t>24?(e<1/0&&(fo=setTimeout(pf,e-Xo.now()-dl)),io&&(io=clearInterval(io))):(io||(Ds=Xo.now(),io=setInterval(zk,tg)),Dr=1,ng(pf))}}function mf(e,t,n){var r=new Os;return t=t==null?0:+t,r.restart(o=>{r.stop(),e(o+t)},t,n),r}var Ak=ul("start","end","cancel","interrupt"),Rk=[],og=0,gf=1,lu=2,is=3,yf=4,au=5,ss=6;function fl(e,t,n,r,o,i){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;Dk(e,n,{name:t,index:r,group:o,on:Ak,tween:Rk,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:og})}function vc(e,t){var n=Et(e,t);if(n.state>og)throw new Error("too late; already scheduled");return n}function Lt(e,t){var n=Et(e,t);if(n.state>is)throw new Error("too late; already running");return n}function Et(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function Dk(e,t,n){var r=e.__transition,o;r[t]=n,n.timer=rg(i,0,n.time);function i(u){n.state=gf,n.timer.restart(s,n.delay,n.time),n.delay<=u&&s(u-n.delay)}function s(u){var d,h,c,p;if(n.state!==gf)return a();for(d in r)if(p=r[d],p.name===n.name){if(p.state===is)return mf(s);p.state===yf?(p.state=ss,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete r[d]):+d<t&&(p.state=ss,p.timer.stop(),p.on.call("cancel",e,e.__data__,p.index,p.group),delete r[d])}if(mf(function(){n.state===is&&(n.state=yf,n.timer.restart(l,n.delay,n.time),l(u))}),n.state=lu,n.on.call("start",e,e.__data__,n.index,n.group),n.state===lu){for(n.state=is,o=new Array(c=n.tween.length),d=0,h=-1;d<c;++d)(p=n.tween[d].value.call(e,e.__data__,n.index,n.group))&&(o[++h]=p);o.length=h+1}}function l(u){for(var d=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(a),n.state=au,1),h=-1,c=o.length;++h<c;)o[h].call(e,d);n.state===au&&(n.on.call("end",e,e.__data__,n.index,n.group),a())}function a(){n.state=ss,n.timer.stop(),delete r[t];for(var u in r)return;delete e.__transition}}function ls(e,t){var n=e.__transition,r,o,i=!0,s;if(n){t=t==null?null:t+"";for(s in n){if((r=n[s]).name!==t){i=!1;continue}o=r.state>lu&&r.state<au,r.state=ss,r.timer.stop(),r.on.call(o?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[s]}i&&delete e.__transition}}function Ok(e){return this.each(function(){ls(this,e)})}function Fk(e,t){var n,r;return function(){var o=Lt(this,e),i=o.tween;if(i!==n){r=n=i;for(var s=0,l=r.length;s<l;++s)if(r[s].name===t){r=r.slice(),r.splice(s,1);break}}o.tween=r}}function Hk(e,t,n){var r,o;if(typeof n!="function")throw new Error;return function(){var i=Lt(this,e),s=i.tween;if(s!==r){o=(r=s).slice();for(var l={name:t,value:n},a=0,u=o.length;a<u;++a)if(o[a].name===t){o[a]=l;break}a===u&&o.push(l)}i.tween=o}}function Bk(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=Et(this.node(),n).tween,o=0,i=r.length,s;o<i;++o)if((s=r[o]).name===e)return s.value;return null}return this.each((t==null?Fk:Hk)(n,e,t))}function xc(e,t,n){var r=e._id;return e.each(function(){var o=Lt(this,r);(o.value||(o.value={}))[t]=n.apply(this,arguments)}),function(o){return Et(o,r).value[t]}}function ig(e,t){var n;return(typeof t=="number"?Mt:t instanceof Gn?As:(n=Gn(t))?(t=n,As):Zm)(e,t)}function Vk(e){return function(){this.removeAttribute(e)}}function Wk(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Uk(e,t,n){var r,o=n+"",i;return function(){var s=this.getAttribute(e);return s===o?null:s===r?i:i=t(r=s,n)}}function Yk(e,t,n){var r,o=n+"",i;return function(){var s=this.getAttributeNS(e.space,e.local);return s===o?null:s===r?i:i=t(r=s,n)}}function Xk(e,t,n){var r,o,i;return function(){var s,l=n(this),a;return l==null?void this.removeAttribute(e):(s=this.getAttribute(e),a=l+"",s===a?null:s===r&&a===o?i:(o=a,i=t(r=s,l)))}}function Kk(e,t,n){var r,o,i;return function(){var s,l=n(this),a;return l==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),a=l+"",s===a?null:s===r&&a===o?i:(o=a,i=t(r=s,l)))}}function Qk(e,t){var n=cl(e),r=n==="transform"?Mk:ig;return this.attrTween(e,typeof t=="function"?(n.local?Kk:Xk)(n,r,xc(this,"attr."+e,t)):t==null?(n.local?Wk:Vk)(n):(n.local?Yk:Uk)(n,r,t))}function Gk(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function qk(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function Zk(e,t){var n,r;function o(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&qk(e,i)),n}return o._value=t,o}function Jk(e,t){var n,r;function o(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&Gk(e,i)),n}return o._value=t,o}function eS(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=cl(e);return this.tween(n,(r.local?Zk:Jk)(r,t))}function tS(e,t){return function(){vc(this,e).delay=+t.apply(this,arguments)}}function nS(e,t){return t=+t,function(){vc(this,e).delay=t}}function rS(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?tS:nS)(t,e)):Et(this.node(),t).delay}function oS(e,t){return function(){Lt(this,e).duration=+t.apply(this,arguments)}}function iS(e,t){return t=+t,function(){Lt(this,e).duration=t}}function sS(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?oS:iS)(t,e)):Et(this.node(),t).duration}function lS(e,t){if(typeof t!="function")throw new Error;return function(){Lt(this,e).ease=t}}function aS(e){var t=this._id;return arguments.length?this.each(lS(t,e)):Et(this.node(),t).ease}function uS(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Lt(this,e).ease=n}}function cS(e){if(typeof e!="function")throw new Error;return this.each(uS(this._id,e))}function dS(e){typeof e!="function"&&(e=Am(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i=t[o],s=i.length,l=r[o]=[],a,u=0;u<s;++u)(a=i[u])&&e.call(a,a.__data__,u,i)&&l.push(a);return new qt(r,this._parents,this._name,this._id)}function fS(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,o=n.length,i=Math.min(r,o),s=new Array(r),l=0;l<i;++l)for(var a=t[l],u=n[l],d=a.length,h=s[l]=new Array(d),c,p=0;p<d;++p)(c=a[p]||u[p])&&(h[p]=c);for(;l<r;++l)s[l]=t[l];return new qt(s,this._parents,this._name,this._id)}function hS(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function pS(e,t,n){var r,o,i=hS(t)?vc:Lt;return function(){var s=i(this,e),l=s.on;l!==r&&(o=(r=l).copy()).on(t,n),s.on=o}}function mS(e,t){var n=this._id;return arguments.length<2?Et(this.node(),n).on.on(e):this.each(pS(n,e,t))}function gS(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function yS(){return this.on("end.remove",gS(this._id))}function vS(e){var t=this._name,n=this._id;typeof e!="function"&&(e=hc(e));for(var r=this._groups,o=r.length,i=new Array(o),s=0;s<o;++s)for(var l=r[s],a=l.length,u=i[s]=new Array(a),d,h,c=0;c<a;++c)(d=l[c])&&(h=e.call(d,d.__data__,c,l))&&("__data__"in d&&(h.__data__=d.__data__),u[c]=h,fl(u[c],t,n,c,u,Et(d,n)));return new qt(i,this._parents,t,n)}function xS(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Lm(e));for(var r=this._groups,o=r.length,i=[],s=[],l=0;l<o;++l)for(var a=r[l],u=a.length,d,h=0;h<u;++h)if(d=a[h]){for(var c=e.call(d,d.__data__,h,a),p,y=Et(d,n),x=0,k=c.length;x<k;++x)(p=c[x])&&fl(p,t,n,x,c,y);i.push(c),s.push(d)}return new qt(i,s,t,n)}var wS=li.prototype.constructor;function kS(){return new wS(this._groups,this._parents)}function SS(e,t){var n,r,o;return function(){var i=Rr(this,e),s=(this.style.removeProperty(e),Rr(this,e));return i===s?null:i===n&&s===r?o:o=t(n=i,r=s)}}function sg(e){return function(){this.style.removeProperty(e)}}function NS(e,t,n){var r,o=n+"",i;return function(){var s=Rr(this,e);return s===o?null:s===r?i:i=t(r=s,n)}}function ES(e,t,n){var r,o,i;return function(){var s=Rr(this,e),l=n(this),a=l+"";return l==null&&(a=l=(this.style.removeProperty(e),Rr(this,e))),s===a?null:s===r&&a===o?i:(o=a,i=t(r=s,l))}}function _S(e,t){var n,r,o,i="style."+t,s="end."+i,l;return function(){var a=Lt(this,e),u=a.on,d=a.value[i]==null?l||(l=sg(t)):void 0;(u!==n||o!==d)&&(r=(n=u).copy()).on(s,o=d),a.on=r}}function CS(e,t,n){var r=(e+="")=="transform"?jk:ig;return t==null?this.styleTween(e,SS(e,r)).on("end.style."+e,sg(e)):typeof t=="function"?this.styleTween(e,ES(e,r,xc(this,"style."+e,t))).each(_S(this._id,e)):this.styleTween(e,NS(e,r,t),n).on("end.style."+e,null)}function jS(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function MS(e,t,n){var r,o;function i(){var s=t.apply(this,arguments);return s!==o&&(r=(o=s)&&jS(e,s,n)),r}return i._value=t,i}function $S(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,MS(e,t,n??""))}function PS(e){return function(){this.textContent=e}}function bS(e){return function(){var t=e(this);this.textContent=t??""}}function IS(e){return this.tween("text",typeof e=="function"?bS(xc(this,"text",e)):PS(e==null?"":e+""))}function TS(e){return function(t){this.textContent=e.call(this,t)}}function zS(e){var t,n;function r(){var o=e.apply(this,arguments);return o!==n&&(t=(n=o)&&TS(o)),t}return r._value=e,r}function LS(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,zS(e))}function AS(){for(var e=this._name,t=this._id,n=lg(),r=this._groups,o=r.length,i=0;i<o;++i)for(var s=r[i],l=s.length,a,u=0;u<l;++u)if(a=s[u]){var d=Et(a,t);fl(a,e,n,u,s,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new qt(r,this._parents,e,n)}function RS(){var e,t,n=this,r=n._id,o=n.size();return new Promise(function(i,s){var l={value:s},a={value:function(){--o===0&&i()}};n.each(function(){var u=Lt(this,r),d=u.on;d!==e&&(t=(e=d).copy(),t._.cancel.push(l),t._.interrupt.push(l),t._.end.push(a)),u.on=t}),o===0&&i()})}var DS=0;function qt(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function lg(){return++DS}var Ot=li.prototype;qt.prototype={constructor:qt,select:vS,selectAll:xS,selectChild:Ot.selectChild,selectChildren:Ot.selectChildren,filter:dS,merge:fS,selection:kS,transition:AS,call:Ot.call,nodes:Ot.nodes,node:Ot.node,size:Ot.size,empty:Ot.empty,each:Ot.each,on:mS,attr:Qk,attrTween:eS,style:CS,styleTween:$S,text:IS,textTween:LS,remove:yS,tween:Bk,delay:rS,duration:sS,ease:aS,easeVarying:cS,end:RS,[Symbol.iterator]:Ot[Symbol.iterator]};function OS(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var FS={time:null,delay:0,duration:250,ease:OS};function HS(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function BS(e){var t,n;e instanceof qt?(t=e._id,e=e._name):(t=lg(),(n=FS).time=yc(),e=e==null?null:e+"");for(var r=this._groups,o=r.length,i=0;i<o;++i)for(var s=r[i],l=s.length,a,u=0;u<l;++u)(a=s[u])&&fl(a,e,t,u,s,n||HS(a,t));return new qt(r,this._parents,e,t)}li.prototype.interrupt=Ok;li.prototype.transition=BS;const Oi=e=>()=>e;function VS(e,{sourceEvent:t,target:n,transform:r,dispatch:o}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:o}})}function Wt(e,t,n){this.k=e,this.x=t,this.y=n}Wt.prototype={constructor:Wt,scale:function(e){return e===1?this:new Wt(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Wt(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var hl=new Wt(1,0,0);ag.prototype=Wt.prototype;function ag(e){for(;!e.__zoom;)if(!(e=e.parentNode))return hl;return e.__zoom}function ta(e){e.stopImmediatePropagation()}function so(e){e.preventDefault(),e.stopImmediatePropagation()}function WS(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function US(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function vf(){return this.__zoom||hl}function YS(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function XS(){return navigator.maxTouchPoints||"ontouchstart"in this}function KS(e,t,n){var r=e.invertX(t[0][0])-n[0][0],o=e.invertX(t[1][0])-n[1][0],i=e.invertY(t[0][1])-n[0][1],s=e.invertY(t[1][1])-n[1][1];return e.translate(o>r?(r+o)/2:Math.min(0,r)||Math.max(0,o),s>i?(i+s)/2:Math.min(0,i)||Math.max(0,s))}function ug(){var e=WS,t=US,n=KS,r=YS,o=XS,i=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],l=250,a=os,u=ul("start","zoom","end"),d,h,c,p=500,y=150,x=0,k=10;function m(N){N.property("__zoom",vf).on("wheel.zoom",P,{passive:!1}).on("mousedown.zoom",b).on("dblclick.zoom",D).filter(o).on("touchstart.zoom",A).on("touchmove.zoom",H).on("touchend.zoom touchcancel.zoom",O).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}m.transform=function(N,z,C,T){var $=N.selection?N.selection():N;$.property("__zoom",vf),N!==$?_(N,z,C,T):$.interrupt().each(function(){S(this,arguments).event(T).start().zoom(null,typeof z=="function"?z.apply(this,arguments):z).end()})},m.scaleBy=function(N,z,C,T){m.scaleTo(N,function(){var $=this.__zoom.k,M=typeof z=="function"?z.apply(this,arguments):z;return $*M},C,T)},m.scaleTo=function(N,z,C,T){m.transform(N,function(){var $=t.apply(this,arguments),M=this.__zoom,L=C==null?w($):typeof C=="function"?C.apply(this,arguments):C,j=M.invert(L),R=typeof z=="function"?z.apply(this,arguments):z;return n(g(v(M,R),L,j),$,s)},C,T)},m.translateBy=function(N,z,C,T){m.transform(N,function(){return n(this.__zoom.translate(typeof z=="function"?z.apply(this,arguments):z,typeof C=="function"?C.apply(this,arguments):C),t.apply(this,arguments),s)},null,T)},m.translateTo=function(N,z,C,T,$){m.transform(N,function(){var M=t.apply(this,arguments),L=this.__zoom,j=T==null?w(M):typeof T=="function"?T.apply(this,arguments):T;return n(hl.translate(j[0],j[1]).scale(L.k).translate(typeof z=="function"?-z.apply(this,arguments):-z,typeof C=="function"?-C.apply(this,arguments):-C),M,s)},T,$)};function v(N,z){return z=Math.max(i[0],Math.min(i[1],z)),z===N.k?N:new Wt(z,N.x,N.y)}function g(N,z,C){var T=z[0]-C[0]*N.k,$=z[1]-C[1]*N.k;return T===N.x&&$===N.y?N:new Wt(N.k,T,$)}function w(N){return[(+N[0][0]+ +N[1][0])/2,(+N[0][1]+ +N[1][1])/2]}function _(N,z,C,T){N.on("start.zoom",function(){S(this,arguments).event(T).start()}).on("interrupt.zoom end.zoom",function(){S(this,arguments).event(T).end()}).tween("zoom",function(){var $=this,M=arguments,L=S($,M).event(T),j=t.apply($,M),R=C==null?w(j):typeof C=="function"?C.apply($,M):C,V=Math.max(j[1][0]-j[0][0],j[1][1]-j[0][1]),U=$.__zoom,Q=typeof z=="function"?z.apply($,M):z,B=a(U.invert(R).concat(V/U.k),Q.invert(R).concat(V/Q.k));return function(X){if(X===1)X=Q;else{var F=B(X),Y=V/F[2];X=new Wt(Y,R[0]-F[0]*Y,R[1]-F[1]*Y)}L.zoom(null,X)}})}function S(N,z,C){return!C&&N.__zooming||new E(N,z)}function E(N,z){this.that=N,this.args=z,this.active=0,this.sourceEvent=null,this.extent=t.apply(N,z),this.taps=0}E.prototype={event:function(N){return N&&(this.sourceEvent=N),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(N,z){return this.mouse&&N!=="mouse"&&(this.mouse[1]=z.invert(this.mouse[0])),this.touch0&&N!=="touch"&&(this.touch0[1]=z.invert(this.touch0[0])),this.touch1&&N!=="touch"&&(this.touch1[1]=z.invert(this.touch1[0])),this.that.__zoom=z,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(N){var z=Ke(this.that).datum();u.call(N,this.that,new VS(N,{sourceEvent:this.sourceEvent,target:m,transform:this.that.__zoom,dispatch:u}),z)}};function P(N,...z){if(!e.apply(this,arguments))return;var C=S(this,z).event(N),T=this.__zoom,$=Math.max(i[0],Math.min(i[1],T.k*Math.pow(2,r.apply(this,arguments)))),M=ht(N);if(C.wheel)(C.mouse[0][0]!==M[0]||C.mouse[0][1]!==M[1])&&(C.mouse[1]=T.invert(C.mouse[0]=M)),clearTimeout(C.wheel);else{if(T.k===$)return;C.mouse=[M,T.invert(M)],ls(this),C.start()}so(N),C.wheel=setTimeout(L,y),C.zoom("mouse",n(g(v(T,$),C.mouse[0],C.mouse[1]),C.extent,s));function L(){C.wheel=null,C.end()}}function b(N,...z){if(c||!e.apply(this,arguments))return;var C=N.currentTarget,T=S(this,z,!0).event(N),$=Ke(N.view).on("mousemove.zoom",R,!0).on("mouseup.zoom",V,!0),M=ht(N,C),L=N.clientX,j=N.clientY;Ym(N.view),ta(N),T.mouse=[M,this.__zoom.invert(M)],ls(this),T.start();function R(U){if(so(U),!T.moved){var Q=U.clientX-L,B=U.clientY-j;T.moved=Q*Q+B*B>x}T.event(U).zoom("mouse",n(g(T.that.__zoom,T.mouse[0]=ht(U,C),T.mouse[1]),T.extent,s))}function V(U){$.on("mousemove.zoom mouseup.zoom",null),Xm(U.view,T.moved),so(U),T.event(U).end()}}function D(N,...z){if(e.apply(this,arguments)){var C=this.__zoom,T=ht(N.changedTouches?N.changedTouches[0]:N,this),$=C.invert(T),M=C.k*(N.shiftKey?.5:2),L=n(g(v(C,M),T,$),t.apply(this,z),s);so(N),l>0?Ke(this).transition().duration(l).call(_,L,T,N):Ke(this).call(m.transform,L,T,N)}}function A(N,...z){if(e.apply(this,arguments)){var C=N.touches,T=C.length,$=S(this,z,N.changedTouches.length===T).event(N),M,L,j,R;for(ta(N),L=0;L<T;++L)j=C[L],R=ht(j,this),R=[R,this.__zoom.invert(R),j.identifier],$.touch0?!$.touch1&&$.touch0[2]!==R[2]&&($.touch1=R,$.taps=0):($.touch0=R,M=!0,$.taps=1+!!d);d&&(d=clearTimeout(d)),M&&($.taps<2&&(h=R[0],d=setTimeout(function(){d=null},p)),ls(this),$.start())}}function H(N,...z){if(this.__zooming){var C=S(this,z).event(N),T=N.changedTouches,$=T.length,M,L,j,R;for(so(N),M=0;M<$;++M)L=T[M],j=ht(L,this),C.touch0&&C.touch0[2]===L.identifier?C.touch0[0]=j:C.touch1&&C.touch1[2]===L.identifier&&(C.touch1[0]=j);if(L=C.that.__zoom,C.touch1){var V=C.touch0[0],U=C.touch0[1],Q=C.touch1[0],B=C.touch1[1],X=(X=Q[0]-V[0])*X+(X=Q[1]-V[1])*X,F=(F=B[0]-U[0])*F+(F=B[1]-U[1])*F;L=v(L,Math.sqrt(X/F)),j=[(V[0]+Q[0])/2,(V[1]+Q[1])/2],R=[(U[0]+B[0])/2,(U[1]+B[1])/2]}else if(C.touch0)j=C.touch0[0],R=C.touch0[1];else return;C.zoom("touch",n(g(L,j,R),C.extent,s))}}function O(N,...z){if(this.__zooming){var C=S(this,z).event(N),T=N.changedTouches,$=T.length,M,L;for(ta(N),c&&clearTimeout(c),c=setTimeout(function(){c=null},p),M=0;M<$;++M)L=T[M],C.touch0&&C.touch0[2]===L.identifier?delete C.touch0:C.touch1&&C.touch1[2]===L.identifier&&delete C.touch1;if(C.touch1&&!C.touch0&&(C.touch0=C.touch1,delete C.touch1),C.touch0)C.touch0[1]=this.__zoom.invert(C.touch0[0]);else if(C.end(),C.taps===2&&(L=ht(L,this),Math.hypot(h[0]-L[0],h[1]-L[1])<k)){var j=Ke(this).on("dblclick.zoom");j&&j.apply(this,arguments)}}}return m.wheelDelta=function(N){return arguments.length?(r=typeof N=="function"?N:Oi(+N),m):r},m.filter=function(N){return arguments.length?(e=typeof N=="function"?N:Oi(!!N),m):e},m.touchable=function(N){return arguments.length?(o=typeof N=="function"?N:Oi(!!N),m):o},m.extent=function(N){return arguments.length?(t=typeof N=="function"?N:Oi([[+N[0][0],+N[0][1]],[+N[1][0],+N[1][1]]]),m):t},m.scaleExtent=function(N){return arguments.length?(i[0]=+N[0],i[1]=+N[1],m):[i[0],i[1]]},m.translateExtent=function(N){return arguments.length?(s[0][0]=+N[0][0],s[1][0]=+N[1][0],s[0][1]=+N[0][1],s[1][1]=+N[1][1],m):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},m.constrain=function(N){return arguments.length?(n=N,m):n},m.duration=function(N){return arguments.length?(l=+N,m):l},m.interpolate=function(N){return arguments.length?(a=N,m):a},m.on=function(){var N=u.on.apply(u,arguments);return N===u?m:N},m.clickDistance=function(N){return arguments.length?(x=(N=+N)*N,m):Math.sqrt(x)},m.tapDistance=function(N){return arguments.length?(k=+N,m):k},m}const Nt={error001:(e="react")=>`Seems like you have not used ${e==="svelte"?"SvelteFlowProvider":"ReactFlowProvider"} as an ancestor. Help: https://${e}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:e=>`Node type "${e}" 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:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:r})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:r}", edge id: ${t}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs.",error016:e=>`Edge with id "${e}" does not exist, it may have been removed. This can happen when an edge is deleted before the "onEdgeClick" handler is called.`},Ko=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],cg=["Enter"," ","Escape"],dg={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var Or;(function(e){e.Strict="strict",e.Loose="loose"})(Or||(Or={}));var Hn;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(Hn||(Hn={}));var Qo;(function(e){e.Partial="partial",e.Full="full"})(Qo||(Qo={}));const fg={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var un;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(un||(un={}));var Go;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Go||(Go={}));var J;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(J||(J={}));const xf={[J.Left]:J.Right,[J.Right]:J.Left,[J.Top]:J.Bottom,[J.Bottom]:J.Top},hg=e=>!!e&&typeof e=="object"&&"id"in e&&"source"in e&&"target"in e,QS=e=>!!e&&typeof e=="object"&&"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),wc=e=>!!e&&typeof e=="object"&&"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),ui=(e,t=[0,0])=>{const{width:n,height:r}=_t(e),o=e.origin??t,i=n*o[0],s=r*o[1];return{x:e.position.x-i,y:e.position.y-s}},GS=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};let n=!1;const r=e.reduce((o,i)=>{const s=typeof i=="string";let l=!t.nodeLookup&&!s?i:void 0;return t.nodeLookup&&(l=s?t.nodeLookup.get(i):wc(i)?i:t.nodeLookup.get(i.id)),l?(n=!0,pl(o,Fs(l,t.nodeOrigin))):o},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return n?ml(r):{x:0,y:0,width:0,height:0}},ci=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},r=!1;return e.forEach(o=>{(t.filter===void 0||t.filter(o))&&(n=pl(n,Fs(o)),r=!0)}),r?ml(n):{x:0,y:0,width:0,height:0}},kc=(e,t,[n,r,o]=[0,0,1],i=!1,s=!1)=>{const l=(t.x-n)/o,a=(t.y-r)/o,u=t.width/o,d=t.height/o,h=[];for(const c of e.values()){const{measured:p,selectable:y=!0,hidden:x=!1}=c;if(s&&!y||x)continue;const k=p.width??c.width??c.initialWidth??0,m=p.height??c.height??c.initialHeight??0,{x:v,y:g}=c.internals.positionAbsolute,w=yg(l,a,u,d,v,g,k,m),_=k*m,S=i&&w>0;(!c.internals.handleBounds||S||w>=_||c.dragging)&&h.push(c)}return h},qS=(e,t)=>{const n=new Set;return e.forEach(r=>{n.add(r.id)}),t.filter(r=>n.has(r.source)||n.has(r.target))};function ZS(e,t){const n=new Map,r=t!=null&&t.nodes?new Set(t.nodes.map(o=>o.id)):null;return e.forEach(o=>{let i;if(t!=null&&t.includeHiddenNodes){const{width:s,height:l}=_t(o);i=s>0&&l>0}else i=!!(o.measured.width&&o.measured.height&&!o.hidden);i&&(!r||r.has(o.id))&&n.set(o.id,o)}),n}async function JS({nodes:e,width:t,height:n,panZoom:r,minZoom:o,maxZoom:i},s){if(e.size===0)return!0;const l=ZS(e,s),a=ci(l),u=Nc(a,t,n,(s==null?void 0:s.minZoom)??o,(s==null?void 0:s.maxZoom)??i,(s==null?void 0:s.padding)??.1);return await r.setViewport(u,{duration:s==null?void 0:s.duration,ease:s==null?void 0:s.ease,interpolate:s==null?void 0:s.interpolate}),!0}function pg({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:r=[0,0],nodeExtent:o,onError:i}){const s=n.get(e),l=s.parentId?n.get(s.parentId):void 0,{x:a,y:u}=l?l.internals.positionAbsolute:{x:0,y:0},d=s.origin??r;let h=s.extent||o;if(s.extent==="parent"&&!s.expandParent)if(!l)i==null||i("005",Nt.error005());else{const{width:p,height:y}=_t(l);p&&y&&(h=[[a,u],[a+p,u+y]])}else l&&Jn(s.extent)&&(h=[[s.extent[0][0]+a,s.extent[0][1]+u],[s.extent[1][0]+a,s.extent[1][1]+u]]);const c=Jn(h)?Zn(t,h,s.measured):t;return(s.measured.width===void 0||s.measured.height===void 0)&&(i==null||i("015",Nt.error015())),{position:{x:c.x-a+(s.measured.width??0)*d[0],y:c.y-u+(s.measured.height??0)*d[1]},positionAbsolute:c}}async function eN({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:r,onBeforeDelete:o}){const i=new Set(e.map(c=>c.id)),s=[];for(const c of n){if(c.deletable===!1)continue;const p=i.has(c.id),y=!p&&c.parentId&&s.find(x=>x.id===c.parentId);(p||y)&&s.push(c)}const l=new Set(t.map(c=>c.id)),a=r.filter(c=>c.deletable!==!1),d=qS(s,a);for(const c of a)l.has(c.id)&&!d.find(y=>y.id===c.id)&&d.push(c);if(!o)return{edges:d,nodes:s};const h=await o({nodes:s,edges:d});return typeof h=="boolean"?h?{edges:d,nodes:s}:{edges:[],nodes:[]}:h}const Fr=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),Zn=(e={x:0,y:0},t,n)=>({x:Fr(e.x,t[0][0],t[1][0]-((n==null?void 0:n.width)??0)),y:Fr(e.y,t[0][1],t[1][1]-((n==null?void 0:n.height)??0))});function mg(e,t,n){const{width:r,height:o}=_t(n),{x:i,y:s}=n.internals.positionAbsolute;return Zn(e,[[i,s],[i+r,s+o]],t)}const wf=(e,t,n)=>e<t?Fr(Math.abs(e-t),1,t)/t:e>n?-Fr(Math.abs(e-n),1,t)/t:0,Sc=(e,t,n=15,r=40)=>{const o=wf(e.x,r,t.width-r)*n,i=wf(e.y,r,t.height-r)*n;return[o,i]},pl=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),uu=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),ml=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),qo=(e,t=[0,0])=>{var o,i;const{x:n,y:r}=wc(e)?e.internals.positionAbsolute:ui(e,t);return{x:n,y:r,width:((o=e.measured)==null?void 0:o.width)??e.width??e.initialWidth??0,height:((i=e.measured)==null?void 0:i.height)??e.height??e.initialHeight??0}},Fs=(e,t=[0,0])=>{var o,i;const{x:n,y:r}=wc(e)?e.internals.positionAbsolute:ui(e,t);return{x:n,y:r,x2:n+(((o=e.measured)==null?void 0:o.width)??e.width??e.initialWidth??0),y2:r+(((i=e.measured)==null?void 0:i.height)??e.height??e.initialHeight??0)}},gg=(e,t)=>ml(pl(uu(e),uu(t))),yg=(e,t,n,r,o,i,s,l)=>{const a=Math.max(0,Math.min(e+n,o+s)-Math.max(e,o)),u=Math.max(0,Math.min(t+r,i+l)-Math.max(t,i));return Math.ceil(a*u)},Hs=(e,t)=>yg(e.x,e.y,e.width,e.height,t.x,t.y,t.width,t.height),kf=e=>yt(e.width)&&yt(e.height)&&yt(e.x)&&yt(e.y),yt=e=>!isNaN(e)&&isFinite(e),vg=(e,t)=>(n,r)=>{},di=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),fi=({x:e,y:t},[n,r,o],i=!1,s=[1,1])=>{const l={x:(e-n)/o,y:(t-r)/o};return i?di(l,s):l},Hr=({x:e,y:t},[n,r,o])=>({x:e*o+n,y:t*o+r});function or(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function tN(e,t,n){if(typeof e=="string"||typeof e=="number"){const r=or(e,n),o=or(e,t);return{top:r,right:o,bottom:r,left:o,x:o*2,y:r*2}}if(typeof e=="object"){const r=or(e.top??e.y??0,n),o=or(e.bottom??e.y??0,n),i=or(e.left??e.x??0,t),s=or(e.right??e.x??0,t);return{top:r,right:s,bottom:o,left:i,x:i+s,y:r+o}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function nN(e,t,n,r,o,i){const{x:s,y:l}=Hr(e,[t,n,r]),{x:a,y:u}=Hr({x:e.x+e.width,y:e.y+e.height},[t,n,r]),d=o-a,h=i-u;return{left:Math.floor(s),top:Math.floor(l),right:Math.floor(d),bottom:Math.floor(h)}}const Nc=(e,t,n,r,o,i)=>{const s=tN(i,t,n),l=(t-s.x)/e.width,a=(n-s.y)/e.height,u=Math.min(l,a),d=Fr(u,r,o),h=e.x+e.width/2,c=e.y+e.height/2,p=t/2-h*d,y=n/2-c*d,x=nN(e,p,y,d,t,n),k={left:Math.min(x.left-s.left,0),top:Math.min(x.top-s.top,0),right:Math.min(x.right-s.right,0),bottom:Math.min(x.bottom-s.bottom,0)};return{x:p-k.left+k.right,y:y-k.top+k.bottom,zoom:d}},Zo=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function Jn(e){return e!=null&&e!=="parent"}function _t(e){var t,n;return{width:((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth??0,height:((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight??0}}function xg(e){var t,n;return(((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth)!==void 0&&(((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight)!==void 0}function wg(e,t={width:0,height:0},n,r,o){const i={...e},s=r.get(n);if(s){const l=s.origin||o;i.x+=s.internals.positionAbsolute.x-(t.width??0)*l[0],i.y+=s.internals.positionAbsolute.y-(t.height??0)*l[1]}return i}function Sf(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function rN(){let e,t;return{promise:new Promise((r,o)=>{e=r,t=o}),resolve:e,reject:t}}function oN(e){return{...dg,...e||{}}}function kg(e){return e===null?null:e?"valid":"invalid"}function _o(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:r,containerBounds:o}){const{x:i,y:s}=vt(e),l=fi({x:i-((o==null?void 0:o.left)??0),y:s-((o==null?void 0:o.top)??0)},r),{x:a,y:u}=n?di(l,t):l;return{xSnapped:a,ySnapped:u,...l}}const Ec=e=>({width:e.offsetWidth,height:e.offsetHeight}),Sg=e=>{var t;return((t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},iN=["INPUT","SELECT","TEXTAREA"];function Ng(e){var r,o;const t=((o=(r=e.composedPath)==null?void 0:r.call(e))==null?void 0:o[0])||e.target;return(t==null?void 0:t.nodeType)!==1?!1:iN.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const Eg=e=>"clientX"in e,vt=(e,t)=>{var i,s;const n=Eg(e),r=n?e.clientX:(i=e.touches)==null?void 0:i[0].clientX,o=n?e.clientY:(s=e.touches)==null?void 0:s[0].clientY;return{x:r-((t==null?void 0:t.left)??0),y:o-((t==null?void 0:t.top)??0)}},Nf=(e,t,n,r,o)=>{const i=t.querySelectorAll(`.${e}`);return!i||!i.length?null:Array.from(i).map(s=>{const l=s.getBoundingClientRect();return{id:s.getAttribute("data-handleid"),type:e,nodeId:o,position:s.getAttribute("data-handlepos"),x:(l.left-n.left)/r,y:(l.top-n.top)/r,...Ec(s)}})};function _g({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:o,sourceControlY:i,targetControlX:s,targetControlY:l}){const a=e*.125+o*.375+s*.375+n*.125,u=t*.125+i*.375+l*.375+r*.125,d=Math.abs(a-e),h=Math.abs(u-t);return[a,u,d,h]}function Fi(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function Ef({pos:e,x1:t,y1:n,x2:r,y2:o,c:i}){switch(e){case J.Left:return[t-Fi(t-r,i),n];case J.Right:return[t+Fi(r-t,i),n];case J.Top:return[t,n-Fi(n-o,i)];case J.Bottom:return[t,n+Fi(o-n,i)]}}function _c({sourceX:e,sourceY:t,sourcePosition:n=J.Bottom,targetX:r,targetY:o,targetPosition:i=J.Top,curvature:s=.25}){const[l,a]=Ef({pos:n,x1:e,y1:t,x2:r,y2:o,c:s}),[u,d]=Ef({pos:i,x1:r,y1:o,x2:e,y2:t,c:s}),[h,c,p,y]=_g({sourceX:e,sourceY:t,targetX:r,targetY:o,sourceControlX:l,sourceControlY:a,targetControlX:u,targetControlY:d});return[`M${e},${t} C${l},${a} ${u},${d} ${r},${o}`,h,c,p,y]}function Cg({sourceX:e,sourceY:t,targetX:n,targetY:r}){const o=Math.abs(n-e)/2,i=n<e?n+o:n-o,s=Math.abs(r-t)/2,l=r<t?r+s:r-s;return[i,l,o,s]}function sN({sourceNode:e,targetNode:t,selected:n=!1,zIndex:r=0,elevateOnSelect:o=!1,zIndexMode:i="basic"}){if(i==="manual")return r;const s=o&&n?r+1e3:r,l=Math.max(e.parentId||o&&e.selected?e.internals.z:0,t.parentId||o&&t.selected?t.internals.z:0);return s+l}function lN({sourceNode:e,targetNode:t,width:n,height:r,transform:o}){const i=pl(Fs(e),Fs(t));i.x===i.x2&&(i.x2+=1),i.y===i.y2&&(i.y2+=1);const s={x:-o[0]/o[2],y:-o[1]/o[2],width:n/o[2],height:r/o[2]};return Hs(s,ml(i))>0}const aN=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`xy-edge__${e}${t||""}-${n}${r||""}`,uN=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),cN=(e,t,n={})=>{var i;if(!e.source||!e.target)return(i=n.onError)==null||i.call(n,"006",Nt.error006()),t;const r=n.getEdgeId||aN;let o;return hg(e)?o={...e}:o={...e,id:r(e)},uN(o,t)?t:(o.sourceHandle===null&&delete o.sourceHandle,o.targetHandle===null&&delete o.targetHandle,t.concat(o))};function jg({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[o,i,s,l]=Cg({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,o,i,s,l]}const _f={[J.Left]:{x:-1,y:0},[J.Right]:{x:1,y:0},[J.Top]:{x:0,y:-1},[J.Bottom]:{x:0,y:1}},dN=({source:e,sourcePosition:t=J.Bottom,target:n})=>t===J.Left||t===J.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},Cf=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function fN({source:e,sourcePosition:t=J.Bottom,target:n,targetPosition:r=J.Top,center:o,offset:i,stepPosition:s}){const l=_f[t],a=_f[r],u={x:e.x+l.x*i,y:e.y+l.y*i},d={x:n.x+a.x*i,y:n.y+a.y*i},h=dN({source:u,sourcePosition:t,target:d}),c=h.x!==0?"x":"y",p=h[c];let y=[],x,k;const m={x:0,y:0},v={x:0,y:0},[,,g,w]=Cg({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(l[c]*a[c]===-1){c==="x"?(x=o.x??u.x+(d.x-u.x)*s,k=o.y??(u.y+d.y)/2):(x=o.x??(u.x+d.x)/2,k=o.y??u.y+(d.y-u.y)*s);const P=[{x,y:u.y},{x,y:d.y}],b=[{x:u.x,y:k},{x:d.x,y:k}];l[c]===p?y=c==="x"?P:b:y=c==="x"?b:P}else{const P=[{x:u.x,y:d.y}],b=[{x:d.x,y:u.y}];if(c==="x"?y=l.x===p?b:P:y=l.y===p?P:b,t===r){const N=Math.abs(e[c]-n[c]);if(N<=i){const z=Math.min(i-1,i-N);l[c]===p?m[c]=(u[c]>e[c]?-1:1)*z:v[c]=(d[c]>n[c]?-1:1)*z}}if(t!==r){const N=c==="x"?"y":"x",z=l[c]===a[N],C=u[N]>d[N],T=u[N]<d[N];(l[c]===1&&(!z&&C||z&&T)||l[c]!==1&&(!z&&T||z&&C))&&(y=c==="x"?P:b)}const D={x:u.x+m.x,y:u.y+m.y},A={x:d.x+v.x,y:d.y+v.y},H=Math.max(Math.abs(D.x-y[0].x),Math.abs(A.x-y[0].x)),O=Math.max(Math.abs(D.y-y[0].y),Math.abs(A.y-y[0].y));H>=O?(x=(D.x+A.x)/2,k=y[0].y):(x=y[0].x,k=(D.y+A.y)/2)}const _={x:u.x+m.x,y:u.y+m.y},S={x:d.x+v.x,y:d.y+v.y};return[[e,..._.x!==y[0].x||_.y!==y[0].y?[_]:[],...y,...S.x!==y[y.length-1].x||S.y!==y[y.length-1].y?[S]:[],n],x,k,g,w]}function hN(e,t,n,r){const o=Math.min(Cf(e,t)/2,Cf(t,n)/2,r),{x:i,y:s}=t;if(e.x===i&&i===n.x||e.y===s&&s===n.y)return`L${i} ${s}`;if(e.y===s){const u=e.x<n.x?-1:1,d=e.y<n.y?1:-1;return`L ${i+o*u},${s}Q ${i},${s} ${i},${s+o*d}`}const l=e.x<n.x?1:-1,a=e.y<n.y?-1:1;return`L ${i},${s+o*a}Q ${i},${s} ${i+o*l},${s}`}function Bs({sourceX:e,sourceY:t,sourcePosition:n=J.Bottom,targetX:r,targetY:o,targetPosition:i=J.Top,borderRadius:s=5,centerX:l,centerY:a,offset:u=20,stepPosition:d=.5}){const[h,c,p,y,x]=fN({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:o},targetPosition:i,center:{x:l,y:a},offset:u,stepPosition:d});let k=`M${h[0].x} ${h[0].y}`;for(let m=1;m<h.length-1;m++)k+=hN(h[m-1],h[m],h[m+1],s);return k+=`L${h[h.length-1].x} ${h[h.length-1].y}`,[k,c,p,y,x]}function jf(e){var t;return e&&!!(e.internals.handleBounds||(t=e.handles)!=null&&t.length)&&!!(e.measured.width||e.width||e.initialWidth)}function pN(e){var h;const{sourceNode:t,targetNode:n}=e;if(!jf(t)||!jf(n))return null;const r=t.internals.handleBounds||Mf(t.handles),o=n.internals.handleBounds||Mf(n.handles),i=$f((r==null?void 0:r.source)??[],e.sourceHandle),s=$f(e.connectionMode===Or.Strict?(o==null?void 0:o.target)??[]:((o==null?void 0:o.target)??[]).concat((o==null?void 0:o.source)??[]),e.targetHandle);if(!i||!s)return(h=e.onError)==null||h.call(e,"008",Nt.error008(i?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const l=(i==null?void 0:i.position)||J.Bottom,a=(s==null?void 0:s.position)||J.Top,u=er(t,i,l),d=er(n,s,a);return{sourceX:u.x,sourceY:u.y,targetX:d.x,targetY:d.y,sourcePosition:l,targetPosition:a}}function Mf(e){if(!e)return null;const t=[],n=[];for(const r of e)r.width=r.width??1,r.height=r.height??1,r.type==="source"?t.push(r):r.type==="target"&&n.push(r);return{source:t,target:n}}function er(e,t,n=J.Left,r=!1){const o=((t==null?void 0:t.x)??0)+e.internals.positionAbsolute.x,i=((t==null?void 0:t.y)??0)+e.internals.positionAbsolute.y,{width:s,height:l}=t??_t(e);if(r)return{x:o+s/2,y:i+l/2};switch((t==null?void 0:t.position)??n){case J.Top:return{x:o+s/2,y:i};case J.Right:return{x:o+s,y:i+l/2};case J.Bottom:return{x:o+s/2,y:i+l};case J.Left:return{x:o,y:i+l/2}}}function $f(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function cu(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}function mN(e,{id:t,defaultColor:n,defaultMarkerStart:r,defaultMarkerEnd:o}){const i=new Set;return e.reduce((s,l)=>([l.markerStart||r,l.markerEnd||o].forEach(a=>{if(a&&typeof a=="object"){const u=cu(a,t);i.has(u)||(s.push({id:u,color:a.color||n,...a}),i.add(u))}}),s),[]).sort((s,l)=>s.id.localeCompare(l.id))}const Mg=1e3,gN=10,Cc={nodeOrigin:[0,0],nodeExtent:Ko,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},yN={...Cc,checkEquality:!0};function jc(e,t){const n={...e};for(const r in t)t[r]!==void 0&&(n[r]=t[r]);return n}function vN(e,t,n){const r=jc(Cc,n);for(const o of e.values())if(o.parentId)$c(o,e,t,r);else{const i=ui(o,r.nodeOrigin),s=Jn(o.extent)?o.extent:r.nodeExtent,l=Zn(i,s,_t(o));o.internals.positionAbsolute=l}}function xN(e,t){if(!e.handles)return e.measured?t==null?void 0:t.internals.handleBounds:void 0;const n=[],r=[];for(const o of e.handles){const i={id:o.id,width:o.width??1,height:o.height??1,nodeId:e.id,x:o.x,y:o.y,position:o.position,type:o.type};o.type==="source"?n.push(i):o.type==="target"&&r.push(i)}return{source:n,target:r}}function Mc(e){return e==="manual"}function du(e,t,n,r={}){var d,h;const o=jc(yN,r),i={i:0},s=new Map(t),l=o!=null&&o.elevateNodesOnSelect&&!Mc(o.zIndexMode)?Mg:0;let a=e.length>0,u=!1;t.clear(),n.clear();for(const c of e){let p=s.get(c.id);if(o.checkEquality&&c===(p==null?void 0:p.internals.userNode))t.set(c.id,p);else{const y=ui(c,o.nodeOrigin),x=Jn(c.extent)?c.extent:o.nodeExtent,k=Zn(y,x,_t(c));p={...o.defaults,...c,measured:{width:(d=c.measured)==null?void 0:d.width,height:(h=c.measured)==null?void 0:h.height},internals:{positionAbsolute:k,handleBounds:xN(c,p),z:$g(c,l,o.zIndexMode),userNode:c}},t.set(c.id,p)}(p.measured===void 0||p.measured.width===void 0||p.measured.height===void 0)&&!p.hidden&&(a=!1),c.parentId&&$c(p,t,n,r,i),u||(u=c.selected??!1)}return{nodesInitialized:a,hasSelectedNodes:u}}function wN(e,t){if(!e.parentId)return;const n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function $c(e,t,n,r,o){const{elevateNodesOnSelect:i,nodeOrigin:s,nodeExtent:l,zIndexMode:a}=jc(Cc,r),u=e.parentId,d=t.get(u);if(!d){console.warn(`Parent node ${u} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}wN(e,n),o&&!d.parentId&&d.internals.rootParentIndex===void 0&&a==="auto"&&(d.internals.rootParentIndex=++o.i,d.internals.z=d.internals.z+o.i*gN),o&&d.internals.rootParentIndex!==void 0&&(o.i=d.internals.rootParentIndex);const h=i&&!Mc(a)?Mg:0,{x:c,y:p,z:y}=kN(e,d,s,l,h,a),{positionAbsolute:x}=e.internals,k=c!==x.x||p!==x.y;(k||y!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:k?{x:c,y:p}:x,z:y}})}function $g(e,t,n){const r=yt(e.zIndex)?e.zIndex:0;return Mc(n)?r:r+(e.selected?t:0)}function kN(e,t,n,r,o,i){const{x:s,y:l}=t.internals.positionAbsolute,a=_t(e),u=ui(e,n),d=Jn(e.extent)?Zn(u,e.extent,a):u;let h=Zn({x:s+d.x,y:l+d.y},r,a);e.extent==="parent"&&(h=mg(h,a,t));const c=$g(e,o,i),p=t.internals.z??0;return{x:h.x,y:h.y,z:p>=c?p+1:c}}function Pc(e,t,n,r=[0,0]){var s;const o=[],i=new Map;for(const l of e){const a=t.get(l.parentId);if(!a)continue;const u=((s=i.get(l.parentId))==null?void 0:s.expandedRect)??qo(a),d=gg(u,l.rect);i.set(l.parentId,{expandedRect:d,parent:a})}return i.size>0&&i.forEach(({expandedRect:l,parent:a},u)=>{var g;const d=a.internals.positionAbsolute,h=_t(a),c=a.origin??r,p=l.x<d.x?Math.round(Math.abs(d.x-l.x)):0,y=l.y<d.y?Math.round(Math.abs(d.y-l.y)):0,x=Math.max(h.width,Math.round(l.width)),k=Math.max(h.height,Math.round(l.height)),m=(x-h.width)*c[0],v=(k-h.height)*c[1];(p>0||y>0||m||v)&&(o.push({id:u,type:"position",position:{x:a.position.x-p+m,y:a.position.y-y+v}}),(g=n.get(u))==null||g.forEach(w=>{e.some(_=>_.id===w.id)||o.push({id:w.id,type:"position",position:{x:w.position.x+p,y:w.position.y+y}})})),(h.width<l.width||h.height<l.height||p||y)&&o.push({id:u,type:"dimensions",setAttributes:!0,dimensions:{width:x+(p?c[0]*p-m:0),height:k+(y?c[1]*y-v:0)}})}),o}function SN(e,t,n,r,o,i,s){const l=r==null?void 0:r.querySelector(".xyflow__viewport");let a=!1;if(!l)return{changes:[],updatedInternals:a};const u=[],d=window.getComputedStyle(l),{m22:h}=new window.DOMMatrixReadOnly(d.transform),c=[];for(const p of e.values()){const y=t.get(p.id);if(!y)continue;if(y.hidden){t.set(y.id,{...y,internals:{...y.internals,handleBounds:void 0}}),a=!0;continue}const x=Ec(p.nodeElement),k=y.measured.width!==x.width||y.measured.height!==x.height;if(!!(x.width&&x.height&&(k||!y.internals.handleBounds||p.force))){const v=p.nodeElement.getBoundingClientRect(),g=Jn(y.extent)?y.extent:i;let{positionAbsolute:w}=y.internals;if(y.parentId&&y.extent==="parent"){const S=t.get(y.parentId);S&&(w=mg(w,x,S))}else g&&(w=Zn(w,g,x));const _={...y,measured:x,internals:{...y.internals,positionAbsolute:w,handleBounds:{source:Nf("source",p.nodeElement,v,h,y.id),target:Nf("target",p.nodeElement,v,h,y.id)}}};t.set(y.id,_),y.parentId&&$c(_,t,n,{nodeOrigin:o,zIndexMode:s}),a=!0,k&&(u.push({id:y.id,type:"dimensions",dimensions:x}),y.expandParent&&y.parentId&&c.push({id:y.id,parentId:y.parentId,rect:qo(_,o)}))}}if(c.length>0){const p=Pc(c,t,n,o);u.push(...p)}return{changes:u,updatedInternals:a}}async function NN({delta:e,panZoom:t,transform:n,translateExtent:r,width:o,height:i}){if(!t||!e.x&&!e.y)return!1;const s=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[o,i]],r);return!!s&&(s.x!==n[0]||s.y!==n[1]||s.k!==n[2])}function Pf(e,t,n,r,o,i){let s=o;const l=r.get(s)||new Map;r.set(s,l.set(n,t)),s=`${o}-${e}`;const a=r.get(s)||new Map;if(r.set(s,a.set(n,t)),i){s=`${o}-${e}-${i}`;const u=r.get(s)||new Map;r.set(s,u.set(n,t))}}function Pg(e,t,n){e.clear(),t.clear();for(const r of n){const{source:o,target:i,sourceHandle:s=null,targetHandle:l=null}=r,a={edgeId:r.id,source:o,target:i,sourceHandle:s,targetHandle:l},u=`${o}-${s}--${i}-${l}`,d=`${i}-${l}--${o}-${s}`;Pf("source",a,d,e,o,s),Pf("target",a,u,e,i,l),t.set(r.id,r)}}function bg(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:bg(n,t):!1}function bf(e,t,n){var o;let r=e;do{if((o=r==null?void 0:r.matches)!=null&&o.call(r,t))return!0;if(r===n)return!1;r=r==null?void 0:r.parentElement}while(r);return!1}function EN(e,t,n,r){const o=new Map;for(const[i,s]of e)if((s.selected||s.id===r)&&(!s.parentId||!bg(s,e))&&(s.draggable||t&&typeof s.draggable>"u")){const l=e.get(i);l&&o.set(i,{id:i,position:l.position||{x:0,y:0},distance:{x:n.x-l.internals.positionAbsolute.x,y:n.y-l.internals.positionAbsolute.y},extent:l.extent,parentId:l.parentId,origin:l.origin,expandParent:l.expandParent,internals:{positionAbsolute:l.internals.positionAbsolute||{x:0,y:0}},measured:{width:l.measured.width??0,height:l.measured.height??0}})}return o}function na({nodeId:e,dragItems:t,nodeLookup:n,dragging:r=!0}){var s,l,a;const o=[];for(const[u,d]of t){const h=(s=n.get(u))==null?void 0:s.internals.userNode;h&&o.push({...h,position:d.position,dragging:r})}if(!e)return[o[0],o];const i=(l=n.get(e))==null?void 0:l.internals.userNode;return[i?{...i,position:((a=t.get(e))==null?void 0:a.position)||i.position,dragging:r}:o[0],o]}function _N({dragItems:e,snapGrid:t,x:n,y:r}){const o=e.values().next().value;if(!o)return null;const i={x:n-o.distance.x,y:r-o.distance.y},s=di(i,t);return{x:s.x-i.x,y:s.y-i.y}}function CN({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:r,onDragStop:o}){let i={x:null,y:null},s=0,l=new Map,a=!1,u={x:0,y:0},d=null,h=!1,c=null,p=!1,y=!1,x=null;function k({noDragClassName:v,handleSelector:g,domNode:w,isSelectable:_,nodeId:S,nodeClickDistance:E=0}){c=Ke(w);function P({x:H,y:O}){const{nodeLookup:N,nodeExtent:z,snapGrid:C,snapToGrid:T,nodeOrigin:$,onNodeDrag:M,onSelectionDrag:L,onError:j,updateNodePositions:R}=t();i={x:H,y:O};let V=!1;const U=l.size>1,Q=U&&z?uu(ci(l)):null,B=U&&T?_N({dragItems:l,snapGrid:C,x:H,y:O}):null;for(const[X,F]of l){if(!N.has(X))continue;let Y={x:H-F.distance.x,y:O-F.distance.y};T&&(Y=B?{x:Math.round(Y.x+B.x),y:Math.round(Y.y+B.y)}:di(Y,C));let q=null;if(U&&z&&!F.extent&&Q){const{positionAbsolute:ee}=F.internals,te=ee.x-Q.x+z[0][0],ne=ee.x+F.measured.width-Q.x2+z[1][0],re=ee.y-Q.y+z[0][1],se=ee.y+F.measured.height-Q.y2+z[1][1];q=[[te,re],[ne,se]]}const{position:Z,positionAbsolute:G}=pg({nodeId:X,nextPosition:Y,nodeLookup:N,nodeExtent:q||z,nodeOrigin:$,onError:j});V=V||F.position.x!==Z.x||F.position.y!==Z.y,F.position=Z,F.internals.positionAbsolute=G}if(y=y||V,!!V&&(R(l,!0),x&&(r||M||!S&&L))){const[X,F]=na({nodeId:S,dragItems:l,nodeLookup:N});r==null||r(x,l,X,F),M==null||M(x,X,F),S||L==null||L(x,F)}}async function b(){if(!d)return;const{transform:H,panBy:O,autoPanSpeed:N,autoPanOnNodeDrag:z}=t();if(!z){a=!1,cancelAnimationFrame(s);return}const[C,T]=Sc(u,d,N);(C!==0||T!==0)&&(i.x=(i.x??0)-C/H[2],i.y=(i.y??0)-T/H[2],await O({x:C,y:T})&&P(i)),s=requestAnimationFrame(b)}function D(H){var U;const{nodeLookup:O,multiSelectionActive:N,nodesDraggable:z,transform:C,snapGrid:T,snapToGrid:$,selectNodesOnDrag:M,onNodeDragStart:L,onSelectionDragStart:j,unselectNodesAndEdges:R}=t();h=!0,(!M||!_)&&!N&&S&&((U=O.get(S))!=null&&U.selected||R()),_&&M&&S&&(e==null||e(S));const V=_o(H.sourceEvent,{transform:C,snapGrid:T,snapToGrid:$,containerBounds:d});if(i=V,l=EN(O,z,V,S),l.size>0&&(n||L||!S&&j)){const[Q,B]=na({nodeId:S,dragItems:l,nodeLookup:O});n==null||n(H.sourceEvent,l,Q,B),L==null||L(H.sourceEvent,Q,B),S||j==null||j(H.sourceEvent,B)}}const A=Km().clickDistance(E).on("start",H=>{const{domNode:O,nodeDragThreshold:N,transform:z,snapGrid:C,snapToGrid:T}=t();d=(O==null?void 0:O.getBoundingClientRect())||null,p=!1,y=!1,x=H.sourceEvent,N===0&&D(H),i=_o(H.sourceEvent,{transform:z,snapGrid:C,snapToGrid:T,containerBounds:d}),u=vt(H.sourceEvent,d)}).on("drag",H=>{const{autoPanOnNodeDrag:O,transform:N,snapGrid:z,snapToGrid:C,nodeDragThreshold:T,nodeLookup:$}=t(),M=_o(H.sourceEvent,{transform:N,snapGrid:z,snapToGrid:C,containerBounds:d});if(x=H.sourceEvent,(H.sourceEvent.type==="touchmove"&&H.sourceEvent.touches.length>1||S&&!$.has(S))&&(p=!0),!p){if(!a&&O&&h&&(a=!0,b()),!h){const L=vt(H.sourceEvent,d),j=L.x-u.x,R=L.y-u.y;Math.sqrt(j*j+R*R)>T&&D(H)}(i.x!==M.xSnapped||i.y!==M.ySnapped)&&l&&h&&(u=vt(H.sourceEvent,d),P(M))}}).on("end",H=>{if(!h||p){p&&l.size>0&&t().updateNodePositions(l,!1);return}if(a=!1,h=!1,cancelAnimationFrame(s),l.size>0){const{nodeLookup:O,updateNodePositions:N,onNodeDragStop:z,onSelectionDragStop:C}=t();if(y&&(N(l,!1),y=!1),o||z||!S&&C){const[T,$]=na({nodeId:S,dragItems:l,nodeLookup:O,dragging:!1});o==null||o(H.sourceEvent,l,T,$),z==null||z(H.sourceEvent,T,$),S||C==null||C(H.sourceEvent,$)}}}).filter(H=>{const O=H.target;return!H.button&&(!v||!bf(O,`.${v}`,w))&&(!g||bf(O,g,w))});c.call(A)}function m(){c==null||c.on(".drag",null)}return{update:k,destroy:m}}function jN(e,t,n){const r=[],o={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const i of t.values())Hs(o,qo(i))>0&&r.push(i);return r}const MN=250;function $N(e,t,n,r){var l,a;let o=[],i=1/0;const s=jN(e,n,t+MN);for(const u of s){const d=[...((l=u.internals.handleBounds)==null?void 0:l.source)??[],...((a=u.internals.handleBounds)==null?void 0:a.target)??[]];for(const h of d){if(r.nodeId===h.nodeId&&r.type===h.type&&r.id===h.id)continue;const{x:c,y:p}=er(u,h,h.position,!0),y=Math.sqrt(Math.pow(c-e.x,2)+Math.pow(p-e.y,2));y>t||(y<i?(o=[{...h,x:c,y:p}],i=y):y===i&&o.push({...h,x:c,y:p}))}}if(!o.length)return null;if(o.length>1){const u=r.type==="source"?"target":"source";return o.find(d=>d.type===u)??o[0]}return o[0]}function Ig(e,t,n,r,o,i=!1){var u,d,h;const s=r.get(e);if(!s)return null;const l=o==="strict"?(u=s.internals.handleBounds)==null?void 0:u[t]:[...((d=s.internals.handleBounds)==null?void 0:d.source)??[],...((h=s.internals.handleBounds)==null?void 0:h.target)??[]],a=(n?l==null?void 0:l.find(c=>c.id===n):l==null?void 0:l[0])??null;return a&&i?{...a,...er(s,a,a.position,!0)}:a}function Tg(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function PN(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const zg=()=>!0;function bN(e,{connectionMode:t,connectionRadius:n,handleId:r,nodeId:o,edgeUpdaterType:i,isTarget:s,domNode:l,nodeLookup:a,lib:u,autoPanOnConnect:d,flowId:h,panBy:c,cancelConnection:p,onConnectStart:y,onConnect:x,onConnectEnd:k,isValidConnection:m=zg,onReconnectEnd:v,updateConnection:g,getTransform:w,getFromHandle:_,autoPanSpeed:S,dragThreshold:E=1,handleDomNode:P}){const b=Sg(e.target);let D=0,A;const{x:H,y:O}=vt(e),N=Tg(i,P),z=l==null?void 0:l.getBoundingClientRect();let C=!1;if(!z||!N)return;const T=Ig(o,N,r,a,t);if(!T)return;let $=vt(e,z),M=!1,L=null,j=!1,R=null;function V(){if(!d||!z)return;const[Z,G]=Sc($,z,S);c({x:Z,y:G}),D=requestAnimationFrame(V)}const U={...T,nodeId:o,type:N,position:T.position},Q=a.get(o);let X={inProgress:!0,isValid:null,from:er(Q,U,J.Left,!0),fromHandle:U,fromPosition:U.position,fromNode:Q,to:$,toHandle:null,toPosition:xf[U.position],toNode:null,pointer:$};function F(){C=!0,g(X),y==null||y(e,{nodeId:o,handleId:r,handleType:N})}E===0&&F();function Y(Z){if(!C){const{x:se,y:Ee}=vt(Z),Le=se-H,tt=Ee-O;if(!(Le*Le+tt*tt>E*E))return;F()}if(!_()||!U){q(Z);return}const G=w();$=vt(Z,z),A=$N(fi($,G,!1,[1,1]),n,a,U),M||(V(),M=!0);const ee=Lg(Z,{handle:A,connectionMode:t,fromNodeId:o,fromHandleId:r,fromType:s?"target":"source",isValidConnection:m,doc:b,lib:u,flowId:h,nodeLookup:a});R=ee.handleDomNode,L=ee.connection,j=PN(!!A,ee.isValid);const te=a.get(o),ne=te?er(te,U,J.Left,!0):X.from,re={...X,from:ne,isValid:j,to:ee.toHandle&&j?Hr({x:ee.toHandle.x,y:ee.toHandle.y},G):$,toHandle:ee.toHandle,toPosition:j&&ee.toHandle?ee.toHandle.position:xf[U.position],toNode:ee.toHandle?a.get(ee.toHandle.nodeId):null,pointer:$};g(re),X=re}function q(Z){if(!("touches"in Z&&Z.touches.length>0)){if(C){(A||R)&&L&&j&&(x==null||x(L));const{inProgress:G,...ee}=X,te={...ee,toPosition:X.toHandle?X.toPosition:null};k==null||k(Z,te),i&&(v==null||v(Z,te))}p(),cancelAnimationFrame(D),M=!1,j=!1,L=null,R=null,b.removeEventListener("mousemove",Y),b.removeEventListener("mouseup",q),b.removeEventListener("touchmove",Y),b.removeEventListener("touchend",q)}}b.addEventListener("mousemove",Y),b.addEventListener("mouseup",q),b.addEventListener("touchmove",Y),b.addEventListener("touchend",q)}function Lg(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:o,fromType:i,doc:s,lib:l,flowId:a,isValidConnection:u=zg,nodeLookup:d}){const h=i==="target",c=t?s.querySelector(`.${l}-flow__handle[data-id="${a}-${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`):null,{x:p,y}=vt(e),x=s.elementFromPoint(p,y),k=x!=null&&x.classList.contains(`${l}-flow__handle`)?x:c,m={handleDomNode:k,isValid:!1,connection:null,toHandle:null};if(k){const v=Tg(void 0,k),g=k.getAttribute("data-nodeid"),w=k.getAttribute("data-handleid"),_=k.classList.contains("connectable"),S=k.classList.contains("connectableend");if(!g||!v)return m;const E={source:h?g:r,sourceHandle:h?w:o,target:h?r:g,targetHandle:h?o:w};m.connection=E;const b=_&&S&&(n===Or.Strict?h&&v==="source"||!h&&v==="target":g!==r||w!==o);m.isValid=b&&u(E),m.toHandle=Ig(g,v,w,d,n,!0)}return m}const fu={onPointerDown:bN,isValid:Lg};function IN({domNode:e,panZoom:t,getTransform:n,getViewScale:r}){const o=Ke(e);function i({translateExtent:l,width:a,height:u,zoomStep:d=1,pannable:h=!0,zoomable:c=!0,inversePan:p=!1}){const y=g=>{if(g.sourceEvent.type!=="wheel"||!t)return;const w=n(),_=g.sourceEvent.ctrlKey&&Zo()?10:1,S=-g.sourceEvent.deltaY*(g.sourceEvent.deltaMode===1?.05:g.sourceEvent.deltaMode?1:.002)*d,E=w[2]*Math.pow(2,S*_);t.scaleTo(E)};let x=[0,0];const k=g=>{(g.sourceEvent.type==="mousedown"||g.sourceEvent.type==="touchstart")&&(x=[g.sourceEvent.clientX??g.sourceEvent.touches[0].clientX,g.sourceEvent.clientY??g.sourceEvent.touches[0].clientY])},m=g=>{const w=n();if(g.sourceEvent.type!=="mousemove"&&g.sourceEvent.type!=="touchmove"||!t)return;const _=[g.sourceEvent.clientX??g.sourceEvent.touches[0].clientX,g.sourceEvent.clientY??g.sourceEvent.touches[0].clientY],S=[_[0]-x[0],_[1]-x[1]];x=_;const E=r()*Math.max(w[2],Math.log(w[2]))*(p?-1:1),P={x:w[0]-S[0]*E,y:w[1]-S[1]*E},b=[[0,0],[a,u]];t.setViewportConstrained({x:P.x,y:P.y,zoom:w[2]},b,l)},v=ug().on("start",k).on("zoom",h?m:null).on("zoom.wheel",c?y:null);o.call(v,{})}function s(){o.on("zoom",null)}return{update:i,destroy:s,pointer:ht}}const gl=e=>({x:e.x,y:e.y,zoom:e.k}),ra=({x:e,y:t,zoom:n})=>hl.translate(e,t).scale(n),on=(e,t)=>e.target.closest(`.${t}`),Ag=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),TN=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,oa=(e,t=0,n=TN,r=()=>{})=>{const o=typeof t=="number"&&t>0;return o||r(),o?e.transition().duration(t).ease(n).on("end",r):e},Rg=e=>{const t=e.ctrlKey&&Zo()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function zN({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:r,panOnScrollMode:o,panOnScrollSpeed:i,zoomOnPinch:s,onPanZoomStart:l,onPanZoom:a,onPanZoomEnd:u}){return d=>{if(on(d,t))return d.ctrlKey&&d.preventDefault(),!1;d.preventDefault(),d.stopImmediatePropagation();const h=n.property("__zoom").k||1;if(d.ctrlKey&&s){const k=ht(d),m=Rg(d),v=h*Math.pow(2,m);r.scaleTo(n,v,k,d);return}const c=d.deltaMode===1?20:1;let p=o===Hn.Vertical?0:d.deltaX*c,y=o===Hn.Horizontal?0:d.deltaY*c;!Zo()&&d.shiftKey&&o!==Hn.Vertical&&(p=d.deltaY*c,y=0),r.translateBy(n,-(p/h)*i,-(y/h)*i,{internal:!0});const x=gl(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?a==null||a(d,x):(e.isPanScrolling=!0,l==null||l(d,x)),e.panScrollTimeout=setTimeout(()=>{u==null||u(d,x),e.isPanScrolling=!1},150)}}function LN({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(r,o){const i=r.type==="wheel",s=!t&&i&&!r.ctrlKey,l=on(r,e);if(r.ctrlKey&&i&&l&&r.preventDefault(),s||l)return null;r.preventDefault(),n.call(this,r,o)}}function AN({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return r=>{var i,s,l;if((i=r.sourceEvent)!=null&&i.internal)return;const o=gl(r.transform);e.mouseButton=((s=r.sourceEvent)==null?void 0:s.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=o,((l=r.sourceEvent)==null?void 0:l.type)==="mousedown"&&t(!0),n&&(n==null||n(r.sourceEvent,o))}}function RN({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:r,onPanZoom:o}){return i=>{var s,l;e.usedRightMouseButton=!!(n&&Ag(t,e.mouseButton??0)),(s=i.sourceEvent)!=null&&s.sync||r([i.transform.x,i.transform.y,i.transform.k]),o&&!((l=i.sourceEvent)!=null&&l.internal)&&(o==null||o(i.sourceEvent,gl(i.transform)))}}function DN({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:r,onPanZoomEnd:o,onPaneContextMenu:i}){return s=>{var l;if(!((l=s.sourceEvent)!=null&&l.internal)&&(e.isZoomingOrPanning=!1,i&&Ag(t,e.mouseButton??0)&&!e.usedRightMouseButton&&s.sourceEvent&&i(s.sourceEvent),e.usedRightMouseButton=!1,r(!1),o)){const a=gl(s.transform);e.prevViewport=a,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{o==null||o(s.sourceEvent,a)},n?150:0)}}}function ON({panActivationKeyPressed:e,zoomActivationKeyPressed:t,zoomOnScroll:n,zoomOnPinch:r,panOnDrag:o,panOnScroll:i,zoomOnDoubleClick:s,userSelectionActive:l,noWheelClassName:a,noPanClassName:u,lib:d,connectionInProgress:h}){return c=>{var m;const p=t||n,y=r&&c.ctrlKey,x=c.type==="wheel";if(c.button===1&&c.type==="mousedown"&&(on(c,`${d}-flow__node`)||on(c,`${d}-flow__edge`)||on(c,`${d}-flow__selection`)||on(c,`${d}-flow__nodesselection`)))return!0;if(!o&&!p&&!i&&!s&&!r||l||h&&!x||on(c,a)&&x||on(c,u)&&(!x||i&&x&&!t)||!r&&c.ctrlKey&&x)return!1;if(!r&&c.type==="touchstart"&&((m=c.touches)==null?void 0:m.length)>1)return c.preventDefault(),!1;if(!p&&!i&&!y&&x||!o&&(c.type==="mousedown"||c.type==="touchstart")||Array.isArray(o)&&!o.includes(c.button)&&c.type==="mousedown")return!1;const k=Array.isArray(o)&&o.includes(c.button)||!c.button||c.button<=1;return(!c.ctrlKey||x||e)&&k}}function FN({domNode:e,minZoom:t,maxZoom:n,translateExtent:r,viewport:o,onPanZoom:i,onPanZoomStart:s,onPanZoomEnd:l,onDraggingChange:a}){const u={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},d=e.getBoundingClientRect();let h=[[0,0],[d.width,d.height]];const c=typeof ResizeObserver<"u"?new ResizeObserver(O=>{const N=O[0];N&&(h=[[0,0],[N.contentRect.width,N.contentRect.height]])}):null;c==null||c.observe(e);const p=ug().extent(()=>h).scaleExtent([t,n]).translateExtent(r),y=Ke(e).call(p);w({x:o.x,y:o.y,zoom:Fr(o.zoom,t,n)},[[0,0],[d.width,d.height]],r);const x=y.on("wheel.zoom"),k=y.on("dblclick.zoom");p.wheelDelta(Rg);async function m(O,N){return y?new Promise(z=>{p==null||p.interpolate((N==null?void 0:N.interpolate)==="linear"?Eo:os).transform(oa(y,N==null?void 0:N.duration,N==null?void 0:N.ease,()=>z(!0)),O)}):!1}function v({noWheelClassName:O,noPanClassName:N,onPaneContextMenu:z,userSelectionActive:C,panOnScroll:T,panOnDrag:$,panOnScrollMode:M,panOnScrollSpeed:L,preventScrolling:j,zoomOnPinch:R,zoomOnScroll:V,zoomOnDoubleClick:U,panActivationKeyPressed:Q=!1,zoomActivationKeyPressed:B,lib:X,onTransformChange:F,connectionInProgress:Y,paneClickDistance:q,selectionOnDrag:Z}){C&&!u.isZoomingOrPanning&&g();const G=T&&!B&&!C;p.clickDistance(Z?1/0:!yt(q)||q<0?0:q);const ee=G?zN({zoomPanValues:u,noWheelClassName:O,d3Selection:y,d3Zoom:p,panOnScrollMode:M,panOnScrollSpeed:L,zoomOnPinch:R,onPanZoomStart:s,onPanZoom:i,onPanZoomEnd:l}):LN({noWheelClassName:O,preventScrolling:j,d3ZoomHandler:x});y.on("wheel.zoom",ee,{passive:!1});const te=AN({zoomPanValues:u,onDraggingChange:a,onPanZoomStart:s});p.on("start",te);const ne=RN({zoomPanValues:u,panOnDrag:$,onPaneContextMenu:!!z,onPanZoom:i,onTransformChange:F});p.on("zoom",ne);const re=DN({zoomPanValues:u,panOnDrag:$,panOnScroll:T,onPaneContextMenu:z,onPanZoomEnd:l,onDraggingChange:a});p.on("end",re);const se=ON({panActivationKeyPressed:Q,zoomActivationKeyPressed:B,panOnDrag:$,zoomOnScroll:V,panOnScroll:T,zoomOnDoubleClick:U,zoomOnPinch:R,userSelectionActive:C,noPanClassName:N,noWheelClassName:O,lib:X,connectionInProgress:Y});p.filter(se),U?y.on("dblclick.zoom",k):y.on("dblclick.zoom",null)}function g(){p.on("zoom",null)}async function w(O,N,z){const C=ra(O),T=p==null?void 0:p.constrain()(C,N,z);return T&&await m(T),T}async function _(O,N){const z=ra(O);return await m(z,N),z}function S(O){if(y){const N=ra(O),z=y.property("__zoom");(z.k!==O.zoom||z.x!==O.x||z.y!==O.y)&&(p==null||p.transform(y,N,null,{sync:!0}))}}function E(){const O=y?ag(y.node()):{x:0,y:0,k:1};return{x:O.x,y:O.y,zoom:O.k}}async function P(O,N){return y?new Promise(z=>{p==null||p.interpolate((N==null?void 0:N.interpolate)==="linear"?Eo:os).scaleTo(oa(y,N==null?void 0:N.duration,N==null?void 0:N.ease,()=>z(!0)),O)}):!1}async function b(O,N){return y?new Promise(z=>{p==null||p.interpolate((N==null?void 0:N.interpolate)==="linear"?Eo:os).scaleBy(oa(y,N==null?void 0:N.duration,N==null?void 0:N.ease,()=>z(!0)),O)}):!1}function D(O){p==null||p.scaleExtent(O)}function A(O){p==null||p.translateExtent(O)}function H(O){const N=!yt(O)||O<0?0:O;p==null||p.clickDistance(N)}return{update:v,destroy:g,setViewport:_,setViewportConstrained:w,getViewport:E,scaleTo:P,scaleBy:b,setScaleExtent:D,setTranslateExtent:A,syncViewport:S,setClickDistance:H}}var Br;(function(e){e.Line="line",e.Handle="handle"})(Br||(Br={}));function HN({width:e,prevWidth:t,height:n,prevHeight:r,affectsX:o,affectsY:i}){const s=e-t,l=n-r,a=[s>0?1:s<0?-1:0,l>0?1:l<0?-1:0];return s&&o&&(a[0]=a[0]*-1),l&&i&&(a[1]=a[1]*-1),a}function If(e){const t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),r=e.includes("left"),o=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:r,affectsY:o}}function en(e,t){return Math.max(0,t-e)}function tn(e,t){return Math.max(0,e-t)}function Hi(e,t,n){return Math.max(0,t-e,e-n)}function Tf(e,t){return e?!t:t}function BN(e,t,n,r,o,i,s,l){let{affectsX:a,affectsY:u}=t;const{isHorizontal:d,isVertical:h}=t,c=d&&h,{xSnapped:p,ySnapped:y}=n,{minWidth:x,maxWidth:k,minHeight:m,maxHeight:v}=r,{x:g,y:w,width:_,height:S,aspectRatio:E}=e;let P=Math.floor(d?p-e.pointerX:0),b=Math.floor(h?y-e.pointerY:0);const D=_+(a?-P:P),A=S+(u?-b:b),H=-i[0]*_,O=-i[1]*S;let N=Hi(D,x,k),z=Hi(A,m,v);if(s){let $=0,M=0;a&&P<0?$=en(g+P+H,s[0][0]):!a&&P>0&&($=tn(g+D+H,s[1][0])),u&&b<0?M=en(w+b+O,s[0][1]):!u&&b>0&&(M=tn(w+A+O,s[1][1])),N=Math.max(N,$),z=Math.max(z,M)}if(l){let $=0,M=0;a&&P>0?$=tn(g+P,l[0][0]):!a&&P<0&&($=en(g+D,l[1][0])),u&&b>0?M=tn(w+b,l[0][1]):!u&&b<0&&(M=en(w+A,l[1][1])),N=Math.max(N,$),z=Math.max(z,M)}if(o){if(d){const $=Hi(D/E,m,v)*E;if(N=Math.max(N,$),s){let M=0;!a&&!u||a&&!u&&c?M=tn(w+O+D/E,s[1][1])*E:M=en(w+O+(a?P:-P)/E,s[0][1])*E,N=Math.max(N,M)}if(l){let M=0;!a&&!u||a&&!u&&c?M=en(w+D/E,l[1][1])*E:M=tn(w+(a?P:-P)/E,l[0][1])*E,N=Math.max(N,M)}}if(h){const $=Hi(A*E,x,k)/E;if(z=Math.max(z,$),s){let M=0;!a&&!u||u&&!a&&c?M=tn(g+A*E+H,s[1][0])/E:M=en(g+(u?b:-b)*E+H,s[0][0])/E,z=Math.max(z,M)}if(l){let M=0;!a&&!u||u&&!a&&c?M=en(g+A*E,l[1][0])/E:M=tn(g+(u?b:-b)*E,l[0][0])/E,z=Math.max(z,M)}}}b=b+(b<0?z:-z),P=P+(P<0?N:-N),o&&(c?D>A*E?b=(Tf(a,u)?-P:P)/E:P=(Tf(a,u)?-b:b)*E:d?(b=P/E,u=a):(P=b*E,a=u));const C=a?g+P:g,T=u?w+b:w;return{width:_+(a?-P:P),height:S+(u?-b:b),x:i[0]*P*(a?-1:1)+C,y:i[1]*b*(u?-1:1)+T}}const Dg={width:0,height:0,x:0,y:0},VN={...Dg,pointerX:0,pointerY:0,aspectRatio:1};function WN(e,t,n){const r=t.position.x+e.position.x,o=t.position.y+e.position.y,i=e.measured.width??0,s=e.measured.height??0,l=n[0]*i,a=n[1]*s;return[[r-l,o-a],[r+i-l,o+s-a]]}function UN({domNode:e,nodeId:t,getStoreItems:n,onChange:r,onEnd:o}){const i=Ke(e);let s={controlDirection:If("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function l({controlPosition:u,boundaries:d,keepAspectRatio:h,resizeDirection:c,onResizeStart:p,onResize:y,onResizeEnd:x,shouldResize:k}){let m={...Dg},v={...VN};s={boundaries:d,resizeDirection:c,keepAspectRatio:h,controlDirection:If(u)};let g,w=null,_=[],S,E,P;const b=Km().on("start",D=>{const{nodeLookup:A,transform:H,snapGrid:O,snapToGrid:N,nodeOrigin:z,paneDomNode:C}=n();if(g=A.get(t),!g)return;w=(C==null?void 0:C.getBoundingClientRect())??null;const{xSnapped:T,ySnapped:$}=_o(D.sourceEvent,{transform:H,snapGrid:O,snapToGrid:N,containerBounds:w});m={width:g.measured.width??0,height:g.measured.height??0,x:g.position.x??0,y:g.position.y??0},v={...m,pointerX:T,pointerY:$,aspectRatio:m.width/m.height},S=void 0,E=Jn(g.extent)?g.extent:void 0,g.parentId&&(g.extent==="parent"||g.expandParent)&&(S=A.get(g.parentId)),S&&g.extent==="parent"&&(E=[[0,0],[S.measured.width,S.measured.height]]),_=[],P=void 0;for(const[M,L]of A)if(L.parentId===t&&(_.push({id:M,position:{...L.position},extent:L.extent}),L.extent==="parent"||L.expandParent)){const j=WN(L,g,L.origin??z);P?P=[[Math.min(j[0][0],P[0][0]),Math.min(j[0][1],P[0][1])],[Math.max(j[1][0],P[1][0]),Math.max(j[1][1],P[1][1])]]:P=j}p==null||p(D,{...m})}).on("drag",D=>{const{transform:A,snapGrid:H,snapToGrid:O,nodeOrigin:N}=n(),z=_o(D.sourceEvent,{transform:A,snapGrid:H,snapToGrid:O,containerBounds:w}),C=[];if(!g)return;const{x:T,y:$,width:M,height:L}=m,j={},R=g.origin??N,{width:V,height:U,x:Q,y:B}=BN(v,s.controlDirection,z,s.boundaries,s.keepAspectRatio,R,E,P),X=V!==M,F=U!==L,Y=Q!==T&&X,q=B!==$&&F;if(!Y&&!q&&!X&&!F)return;const Z={prevValues:{...m},startX:v.x,startY:v.y,childNodes:_.map(ne=>({...ne,position:{...ne.position}}))};if((Y||q||R[0]===1||R[1]===1)&&(j.x=Y?Q:m.x,j.y=q?B:m.y,m.x=j.x,m.y=j.y,_.length>0)){const ne=Q-T,re=B-$;for(const se of _)se.position={x:se.position.x-ne+R[0]*(V-M),y:se.position.y-re+R[1]*(U-L)},C.push(se)}if((X||F)&&(j.width=X&&(!s.resizeDirection||s.resizeDirection==="horizontal")?V:m.width,j.height=F&&(!s.resizeDirection||s.resizeDirection==="vertical")?U:m.height,m.width=j.width,m.height=j.height),S&&g.expandParent){const ne=R[0]*(j.width??0);j.x&&j.x<ne&&(m.x=ne,v.x=v.x-(j.x-ne));const re=R[1]*(j.height??0);j.y&&j.y<re&&(m.y=re,v.y=v.y-(j.y-re))}const G=HN({width:m.width,prevWidth:M,height:m.height,prevHeight:L,affectsX:s.controlDirection.affectsX,affectsY:s.controlDirection.affectsY}),ee={...m,direction:G};if((k==null?void 0:k(D,ee))===!1){m=Z.prevValues,v.x=Z.startX,v.y=Z.startY,_.forEach((ne,re)=>{ne.position=Z.childNodes[re].position});return}y==null||y(D,ee),r(j,C)}).on("end",D=>{x==null||x(D,{...m}),o==null||o({...m})});i.call(b)}function a(){i.on(".drag",null)}return{update:l,destroy:a}}var Og={exports:{}},Fg={},Hg={exports:{}},Bg={};/**
|
|
41
|
+
* @license React
|
|
42
|
+
* use-sync-external-store-shim.production.js
|
|
43
|
+
*
|
|
44
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
45
|
+
*
|
|
46
|
+
* This source code is licensed under the MIT license found in the
|
|
47
|
+
* LICENSE file in the root directory of this source tree.
|
|
48
|
+
*/var Vr=I;function YN(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var XN=typeof Object.is=="function"?Object.is:YN,KN=Vr.useState,QN=Vr.useEffect,GN=Vr.useLayoutEffect,qN=Vr.useDebugValue;function ZN(e,t){var n=t(),r=KN({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return GN(function(){o.value=n,o.getSnapshot=t,ia(o)&&i({inst:o})},[e,n,t]),QN(function(){return ia(o)&&i({inst:o}),e(function(){ia(o)&&i({inst:o})})},[e]),qN(n),n}function ia(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!XN(e,n)}catch{return!0}}function JN(e,t){return t()}var eE=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?JN:ZN;Bg.useSyncExternalStore=Vr.useSyncExternalStore!==void 0?Vr.useSyncExternalStore:eE;Hg.exports=Bg;var tE=Hg.exports;/**
|
|
49
|
+
* @license React
|
|
50
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
51
|
+
*
|
|
52
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the MIT license found in the
|
|
55
|
+
* LICENSE file in the root directory of this source tree.
|
|
56
|
+
*/var yl=I,nE=tE;function rE(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var oE=typeof Object.is=="function"?Object.is:rE,iE=nE.useSyncExternalStore,sE=yl.useRef,lE=yl.useEffect,aE=yl.useMemo,uE=yl.useDebugValue;Fg.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=sE(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=aE(function(){function a(p){if(!u){if(u=!0,d=p,p=r(p),o!==void 0&&s.hasValue){var y=s.value;if(o(y,p))return h=y}return h=p}if(y=h,oE(d,p))return y;var x=r(p);return o!==void 0&&o(y,x)?(d=p,y):(d=p,h=x)}var u=!1,d,h,c=n===void 0?null:n;return[function(){return a(t())},c===null?void 0:function(){return a(c())}]},[t,n,r,o]);var l=iE(e,i[0],i[1]);return lE(function(){s.hasValue=!0,s.value=l},[l]),uE(l),l};Og.exports=Fg;var cE=Og.exports;const dE=xh(cE),fE={},zf=e=>{let t;const n=new Set,r=(d,h)=>{const c=typeof d=="function"?d(t):d;if(!Object.is(c,t)){const p=t;t=h??(typeof c!="object"||c===null)?c:Object.assign({},t,c),n.forEach(y=>y(t,p))}},o=()=>t,a={setState:r,getState:o,getInitialState:()=>u,subscribe:d=>(n.add(d),()=>n.delete(d)),destroy:()=>{(fE?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},u=t=e(r,o,a);return a},hE=e=>e?zf(e):zf,{useDebugValue:pE}=iv,{useSyncExternalStoreWithSelector:mE}=dE,gE=e=>e;function Vg(e,t=gE,n){const r=mE(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return pE(r),r}const Lf=(e,t)=>{const n=hE(e),r=(o,i=t)=>Vg(n,o,i);return Object.assign(r,n),r},yE=(e,t)=>e?Lf(e,t):Lf;function ye(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,o]of e)if(!Object.is(o,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}const vl=I.createContext(null),vE=vl.Provider,Wg=Nt.error001("react");function ie(e,t){const n=I.useContext(vl);if(n===null)throw new Error(Wg);return Vg(n,e,t)}function fe(){const e=I.useContext(vl);if(e===null)throw new Error(Wg);return I.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const Af={display:"none"},xE={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},Ug="react-flow__node-desc",Yg="react-flow__edge-desc",wE="react-flow__aria-live",kE=e=>e.ariaLiveMessage,SE=e=>e.ariaLabelConfig;function NE({rfId:e}){const t=ie(kE);return f.jsx("div",{id:`${wE}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:xE,children:t})}function EE({rfId:e,disableKeyboardA11y:t}){const n=ie(SE);return f.jsxs(f.Fragment,{children:[f.jsx("div",{id:`${Ug}-${e}`,style:Af,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),f.jsx("div",{id:`${Yg}-${e}`,style:Af,children:n["edge.a11yDescription.default"]}),!t&&f.jsx(NE,{rfId:e})]})}const hi=I.forwardRef(({position:e="top-left",children:t,className:n,style:r,...o},i)=>{const s=`${e}`.split("-");return f.jsx("div",{className:ke(["react-flow__panel",n,...s]),style:r,ref:i,...o,children:t})});hi.displayName="Panel";const Rf="https://reactflow.dev?utm_source=attribution";function _E({proOptions:e,position:t="bottom-right"}){return I.useEffect(()=>{},[]),e!=null&&e.hideAttribution?null:f.jsx(hi,{position:t,className:"react-flow__attribution","data-message":`Please only hide this attribution when you are subscribed to React Flow Pro: ${Rf}`,children:f.jsx("a",{href:Rf,target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const CE=e=>{const t=[],n=[];for(const[,r]of e.nodeLookup)r.selected&&t.push(r.internals.userNode);for(const[,r]of e.edgeLookup)r.selected&&n.push(r);return{selectedNodes:t,selectedEdges:n}},Bi=e=>e.id;function jE(e,t){return ye(e.selectedNodes.map(Bi),t.selectedNodes.map(Bi))&&ye(e.selectedEdges.map(Bi),t.selectedEdges.map(Bi))}function ME({onSelectionChange:e}){const t=fe(),{selectedNodes:n,selectedEdges:r}=ie(CE,jE);return I.useEffect(()=>{const o={nodes:n,edges:r};e==null||e(o),t.getState().onSelectionChangeHandlers.forEach(i=>i(o))},[n,r,e]),null}const $E=e=>!!e.onSelectionChangeHandlers;function PE({onSelectionChange:e}){const t=ie($E);return e||t?f.jsx(ME,{onSelectionChange:e}):null}const Xg=[0,0],bE={x:0,y:0,zoom:1},IE=["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"],Df=[...IE,"rfId"],TE=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges}),Of={translateExtent:Ko,nodeOrigin:Xg,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function zE(e){const{setNodes:t,setEdges:n,setMinZoom:r,setMaxZoom:o,setTranslateExtent:i,setNodeExtent:s,reset:l,setDefaultNodesAndEdges:a}=ie(TE,ye),u=fe();I.useEffect(()=>(a(e.defaultNodes,e.defaultEdges),()=>{d.current=Of,l()}),[]);const d=I.useRef(Of);return I.useEffect(()=>{for(const h of Df){const c=e[h],p=d.current[h];c!==p&&(typeof e[h]>"u"||(h==="nodes"?t(c):h==="edges"?n(c):h==="minZoom"?r(c):h==="maxZoom"?o(c):h==="translateExtent"?i(c):h==="nodeExtent"?s(c):h==="ariaLabelConfig"?u.setState({ariaLabelConfig:oN(c)}):h==="fitView"?u.setState({fitViewQueued:c}):h==="fitViewOptions"?u.setState({fitViewOptions:c}):u.setState({[h]:c})))}d.current=e},Df.map(h=>e[h])),null}function Ff(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function LE(e){var r;const[t,n]=I.useState(e==="system"?null:e);return I.useEffect(()=>{if(e!=="system"){n(e);return}const o=Ff(),i=()=>n(o!=null&&o.matches?"dark":"light");return i(),o==null||o.addEventListener("change",i),()=>{o==null||o.removeEventListener("change",i)}},[e]),t!==null?t:(r=Ff())!=null&&r.matches?"dark":"light"}const Hf=typeof document<"u"?document:null;function Jo(e=null,t={target:Hf,actInsideInputWithModifier:!0}){const[n,r]=I.useState(!1),o=I.useRef(!1),i=I.useRef(new Set([])),[s,l]=I.useMemo(()=>{if(e!==null){const u=(Array.isArray(e)?e:[e]).filter(h=>typeof h=="string").map(h=>h.replace(/\+/g,`
|
|
57
|
+
`).replace(`
|
|
58
|
+
|
|
59
|
+
`,`
|
|
60
|
+
+`).split(`
|
|
61
|
+
`)),d=u.reduce((h,c)=>h.concat(...c),[]);return[u,d]}return[[],[]]},[e]);return I.useEffect(()=>{const a=(t==null?void 0:t.target)??Hf,u=(t==null?void 0:t.actInsideInputWithModifier)??!0;if(e!==null){const d=p=>{var k,m;if(o.current=p.ctrlKey||p.metaKey||p.shiftKey||p.altKey,(!o.current||o.current&&!u)&&Ng(p))return!1;const x=Vf(p.code,l);if(i.current.add(p[x]),Bf(s,i.current,!1)){const v=((m=(k=p.composedPath)==null?void 0:k.call(p))==null?void 0:m[0])||p.target,g=(v==null?void 0:v.nodeName)==="BUTTON"||(v==null?void 0:v.nodeName)==="A";t.preventDefault!==!1&&(o.current||!g)&&p.preventDefault(),r(!0)}},h=p=>{const y=Vf(p.code,l);Bf(s,i.current,!0)?(r(!1),i.current.clear()):i.current.delete(p[y]),p.key==="Meta"&&i.current.clear(),o.current=!1},c=()=>{i.current.clear(),r(!1)};return a==null||a.addEventListener("keydown",d),a==null||a.addEventListener("keyup",h),window.addEventListener("blur",c),window.addEventListener("contextmenu",c),()=>{a==null||a.removeEventListener("keydown",d),a==null||a.removeEventListener("keyup",h),window.removeEventListener("blur",c),window.removeEventListener("contextmenu",c)}}},[e,r]),n}function Bf(e,t,n){return e.filter(r=>n||r.length===t.size).some(r=>r.every(o=>t.has(o)))}function Vf(e,t){return t.includes(e)?"code":"key"}const AE=()=>{const e=fe();return I.useMemo(()=>({zoomIn:async t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1.2,t):!1},zoomOut:async t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,t):!1},zoomTo:async(t,n)=>{const{panZoom:r}=e.getState();return r?r.scaleTo(t,n):!1},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{const{transform:[r,o,i],panZoom:s}=e.getState();return s?(await s.setViewport({x:t.x??r,y:t.y??o,zoom:t.zoom??i},n),!0):!1},getViewport:()=>{const[t,n,r]=e.getState().transform;return{x:t,y:n,zoom:r}},setCenter:async(t,n,r)=>e.getState().setCenter(t,n,r),fitBounds:async(t,n)=>{const{width:r,height:o,minZoom:i,maxZoom:s,panZoom:l}=e.getState(),a=Nc(t,r,o,i,s,(n==null?void 0:n.padding)??.1);return l?(await l.setViewport(a,{duration:n==null?void 0:n.duration,ease:n==null?void 0:n.ease,interpolate:n==null?void 0:n.interpolate}),!0):!1},screenToFlowPosition:(t,n={})=>{const{transform:r,snapGrid:o,snapToGrid:i,domNode:s}=e.getState();if(!s)return t;const{x:l,y:a}=s.getBoundingClientRect(),u={x:t.x-l,y:t.y-a},d=n.snapGrid??o,h=n.snapToGrid??i;return fi(u,r,h,d)},flowToScreenPosition:t=>{const{transform:n,domNode:r}=e.getState();if(!r)return t;const{x:o,y:i}=r.getBoundingClientRect(),s=Hr(t,n);return{x:s.x+o,y:s.y+i}}}),[])};function Kg(e,t){const n=[],r=new Map,o=[];for(const i of e)if(i.type==="add"){o.push(i);continue}else if(i.type==="remove"||i.type==="replace")r.set(i.id,[i]);else{const s=r.get(i.id);s?s.push(i):r.set(i.id,[i])}for(const i of t){const s=r.get(i.id);if(!s){n.push(i);continue}if(s[0].type==="remove")continue;if(s[0].type==="replace"){n.push({...s[0].item});continue}const l={...i};for(const a of s)RE(a,l);n.push(l)}return o.length&&o.forEach(i=>{i.index!==void 0?n.splice(i.index,0,{...i.item}):n.push({...i.item})}),n}function RE(e,t){switch(e.type){case"select":{t.selected=e.selected;break}case"position":{typeof e.position<"u"&&(t.position=e.position),typeof e.dragging<"u"&&(t.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(t.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(t.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(t.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(t.resizing=e.resizing);break}}}function DE(e,t){return Kg(e,t)}function OE(e,t){return Kg(e,t)}function bn(e,t){return{id:e,type:"select",selected:t}}function kr(e,t=new Set,n=!1){const r=[];for(const[o,i]of e){const s=t.has(o);!(i.selected===void 0&&!s)&&i.selected!==s&&(n&&(i.selected=s),r.push(bn(i.id,s)))}return r}function Wf({items:e=[],lookup:t}){var o;const n=[],r=new Map(e.map(i=>[i.id,i]));for(const[i,s]of e.entries()){const l=t.get(s.id),a=((o=l==null?void 0:l.internals)==null?void 0:o.userNode)??l;a!==void 0&&a!==s&&n.push({id:s.id,item:s,type:"replace"}),a===void 0&&n.push({item:s,type:"add",index:i})}for(const[i]of t)r.get(i)===void 0&&n.push({id:i,type:"remove"});return n}function Uf(e){return{id:e.id,type:"remove"}}const FE=vg();function HE(e,t,n={}){return cN(e,t,{...n,onError:n.onError??FE})}const Yf=e=>QS(e),BE=e=>hg(e);function Qg(e){return I.forwardRef(e)}const Gg=typeof window<"u"?I.useLayoutEffect:I.useEffect;function Xf(e){const[t,n]=I.useState(BigInt(0)),[r]=I.useState(()=>VE(()=>n(o=>o+BigInt(1))));return Gg(()=>{const o=r.get();o.length&&(e(o),r.reset())},[t]),r}function VE(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}const qg=I.createContext(null);function WE({children:e}){const t=fe(),n=I.useCallback(l=>{const{nodes:a=[],setNodes:u,hasDefaultNodes:d,onNodesChange:h,nodeLookup:c,fitViewQueued:p,onNodesChangeMiddlewareMap:y}=t.getState();let x=a;for(const m of l)x=typeof m=="function"?m(x):m;let k=Wf({items:x,lookup:c});for(const m of y.values())k=m(k);d&&u(x),k.length>0?h==null||h(k):p&&window.requestAnimationFrame(()=>{const{fitViewQueued:m,nodes:v,setNodes:g}=t.getState();m&&g(v)})},[]),r=Xf(n),o=I.useCallback(l=>{const{edges:a=[],setEdges:u,hasDefaultEdges:d,onEdgesChange:h,edgeLookup:c}=t.getState();let p=a;for(const y of l)p=typeof y=="function"?y(p):y;d?u(p):h&&h(Wf({items:p,lookup:c}))},[]),i=Xf(o),s=I.useMemo(()=>({nodeQueue:r,edgeQueue:i}),[]);return f.jsx(qg.Provider,{value:s,children:e})}function UE(){const e=I.useContext(qg);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const YE=e=>!!e.panZoom;function pi(){const e=AE(),t=fe(),n=UE(),r=ie(YE),o=I.useMemo(()=>{const i=h=>t.getState().nodeLookup.get(h),s=h=>{n.nodeQueue.push(h)},l=h=>{n.edgeQueue.push(h)},a=h=>{var m,v;const{nodeLookup:c,nodeOrigin:p}=t.getState(),y=Yf(h)?h:c.get(h.id),x=y.parentId?wg(y.position,y.measured,y.parentId,c,p):y.position,k={...y,position:x,width:((m=y.measured)==null?void 0:m.width)??y.width,height:((v=y.measured)==null?void 0:v.height)??y.height};return qo(k)},u=(h,c,p={replace:!1})=>{s(y=>y.map(x=>{if(x.id===h){const k=typeof c=="function"?c(x):c;return p.replace&&Yf(k)?k:{...x,...k}}return x}))},d=(h,c,p={replace:!1})=>{l(y=>y.map(x=>{if(x.id===h){const k=typeof c=="function"?c(x):c;return p.replace&&BE(k)?k:{...x,...k}}return x}))};return{getNodes:()=>t.getState().nodes.map(h=>({...h})),getNode:h=>{var c;return(c=i(h))==null?void 0:c.internals.userNode},getInternalNode:i,getEdges:()=>{const{edges:h=[]}=t.getState();return h.map(c=>({...c}))},getEdge:h=>t.getState().edgeLookup.get(h),setNodes:s,setEdges:l,addNodes:h=>{const c=Array.isArray(h)?h:[h];n.nodeQueue.push(p=>[...p,...c])},addEdges:h=>{const c=Array.isArray(h)?h:[h];n.edgeQueue.push(p=>[...p,...c])},toObject:()=>{const{nodes:h=[],edges:c=[],transform:p}=t.getState(),[y,x,k]=p;return{nodes:h.map(m=>({...m})),edges:c.map(m=>({...m})),viewport:{x:y,y:x,zoom:k}}},deleteElements:async({nodes:h=[],edges:c=[]})=>{const{nodes:p,edges:y,onNodesDelete:x,onEdgesDelete:k,triggerNodeChanges:m,triggerEdgeChanges:v,onDelete:g,onBeforeDelete:w}=t.getState(),{nodes:_,edges:S}=await eN({nodesToRemove:h,edgesToRemove:c,nodes:p,edges:y,onBeforeDelete:w}),E=S.length>0,P=_.length>0;if(E){const b=S.map(Uf);k==null||k(S),v(b)}if(P){const b=_.map(Uf);x==null||x(_),m(b)}return(P||E)&&(g==null||g({nodes:_,edges:S})),{deletedNodes:_,deletedEdges:S}},getIntersectingNodes:(h,c=!0,p)=>{const y=kf(h),x=y?h:a(h),k=p!==void 0;return x?(p||t.getState().nodes).filter(m=>{const v=t.getState().nodeLookup.get(m.id);if(v&&!y&&(m.id===h.id||!v.internals.positionAbsolute))return!1;const g=qo(k?m:v),w=Hs(g,x);return c&&w>0||w>=g.width*g.height||w>=x.width*x.height}):[]},isNodeIntersecting:(h,c,p=!0)=>{const x=kf(h)?h:a(h);if(!x)return!1;const k=Hs(x,c);return p&&k>0||k>=c.width*c.height||k>=x.width*x.height},updateNode:u,updateNodeData:(h,c,p={replace:!1})=>{u(h,y=>{const x=typeof c=="function"?c(y):c;return p.replace?{...y,data:x}:{...y,data:{...y.data,...x}}},p)},updateEdge:d,updateEdgeData:(h,c,p={replace:!1})=>{d(h,y=>{const x=typeof c=="function"?c(y):c;return p.replace?{...y,data:x}:{...y,data:{...y.data,...x}}},p)},getNodesBounds:h=>{const{nodeLookup:c,nodeOrigin:p}=t.getState();return GS(h,{nodeLookup:c,nodeOrigin:p})},getHandleConnections:({type:h,id:c,nodeId:p})=>{var y;return Array.from(((y=t.getState().connectionLookup.get(`${p}-${h}${c?`-${c}`:""}`))==null?void 0:y.values())??[])},getNodeConnections:({type:h,handleId:c,nodeId:p})=>{var y;return Array.from(((y=t.getState().connectionLookup.get(`${p}${h?c?`-${h}-${c}`:`-${h}`:""}`))==null?void 0:y.values())??[])},fitView:async h=>{const c=t.getState().fitViewResolver??rN();return t.setState({fitViewQueued:!0,fitViewOptions:h,fitViewResolver:c}),n.nodeQueue.push(p=>[...p]),c.promise}}},[]);return I.useMemo(()=>({...o,...e,viewportInitialized:r}),[r])}const Kf=e=>e.selected,XE=typeof window<"u"?window:void 0;function KE({deleteKeyCode:e,multiSelectionKeyCode:t}){const n=fe(),{deleteElements:r}=pi(),o=Jo(e,{actInsideInputWithModifier:!1}),i=Jo(t,{target:XE});I.useEffect(()=>{if(o){const{edges:s,nodes:l}=n.getState();r({nodes:l.filter(Kf),edges:s.filter(Kf)}),n.setState({nodesSelectionActive:!1})}},[o]),I.useEffect(()=>{n.setState({multiSelectionActive:i})},[i])}function QE(e){const t=fe();I.useEffect(()=>{const n=()=>{var o,i,s,l;if(!e.current||!(((i=(o=e.current).checkVisibility)==null?void 0:i.call(o))??!0))return!1;const r=Ec(e.current);(r.height===0||r.width===0)&&((l=(s=t.getState()).onError)==null||l.call(s,"004",Nt.error004())),t.setState({width:r.width||500,height:r.height||500})};if(e.current){n(),window.addEventListener("resize",n);const r=new ResizeObserver(()=>n());return r.observe(e.current),()=>{window.removeEventListener("resize",n),r&&e.current&&r.unobserve(e.current)}}},[])}const xl={position:"absolute",width:"100%",height:"100%",top:0,left:0},GE=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function qE({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:r=!1,panActivationKeyPressed:o,panOnScrollSpeed:i=.5,panOnScrollMode:s=Hn.Free,zoomOnDoubleClick:l=!0,panOnDrag:a=!0,defaultViewport:u,translateExtent:d,minZoom:h,maxZoom:c,zoomActivationKeyCode:p,preventScrolling:y=!0,children:x,noWheelClassName:k,noPanClassName:m,onViewportChange:v,isControlledViewport:g,paneClickDistance:w,selectionOnDrag:_}){const S=fe(),E=I.useRef(null),{userSelectionActive:P,lib:b,connectionInProgress:D}=ie(GE,ye),A=Jo(p),H=I.useRef();QE(E);const O=I.useCallback(N=>{v==null||v({x:N[0],y:N[1],zoom:N[2]}),g||S.setState({transform:N})},[v,g]);return I.useEffect(()=>{if(E.current){H.current=FN({domNode:E.current,minZoom:h,maxZoom:c,translateExtent:d,viewport:u,onDraggingChange:T=>S.setState($=>$.paneDragging===T?$:{paneDragging:T}),onPanZoomStart:(T,$)=>{const{onViewportChangeStart:M,onMoveStart:L}=S.getState();L==null||L(T,$),M==null||M($)},onPanZoom:(T,$)=>{const{onViewportChange:M,onMove:L}=S.getState();L==null||L(T,$),M==null||M($)},onPanZoomEnd:(T,$)=>{const{onViewportChangeEnd:M,onMoveEnd:L}=S.getState();L==null||L(T,$),M==null||M($)}});const{x:N,y:z,zoom:C}=H.current.getViewport();return S.setState({panZoom:H.current,transform:[N,z,C],domNode:E.current.closest(".react-flow")}),()=>{var T;(T=H.current)==null||T.destroy()}}},[]),I.useEffect(()=>{var N;(N=H.current)==null||N.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:r,panActivationKeyPressed:o,panOnScrollSpeed:i,panOnScrollMode:s,zoomOnDoubleClick:l,panOnDrag:a,zoomActivationKeyPressed:A,preventScrolling:y,noPanClassName:m,userSelectionActive:P,noWheelClassName:k,lib:b,onTransformChange:O,connectionInProgress:D,selectionOnDrag:_,paneClickDistance:w})},[e,t,n,r,o,i,s,l,a,A,y,m,P,k,b,O,D,_,w]),f.jsx("div",{className:"react-flow__renderer",ref:E,style:xl,children:x})}const ZE=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function JE(){const{userSelectionActive:e,userSelectionRect:t}=ie(ZE,ye);return e&&t?f.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}const sa=(e,t)=>n=>{n.target===t.current&&(e==null||e(n))},e_=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging,panBy:e.panBy,autoPanSpeed:e.autoPanSpeed});function t_({isSelecting:e,selectionKeyPressed:t,selectionMode:n=Qo.Full,panOnDrag:r,autoPanOnSelection:o,paneClickDistance:i,selectionOnDrag:s,onSelectionStart:l,onSelectionEnd:a,onPaneClick:u,onPaneContextMenu:d,onPaneScroll:h,onPaneMouseEnter:c,onPaneMouseMove:p,onPaneMouseLeave:y,children:x}){const k=I.useRef(0),m=fe(),{userSelectionActive:v,elementsSelectable:g,dragging:w,panBy:_,autoPanSpeed:S}=ie(e_,ye),E=g&&(e||v),P=I.useRef(null),b=I.useRef(),D=I.useRef(new Set),A=I.useRef(new Set),H=I.useRef(!1),O=I.useRef(!1),N=I.useRef({x:0,y:0}),z=I.useRef(!1),C=F=>{if(O.current||H.current||m.getState().connection.inProgress){O.current=!1,H.current=!1;return}u==null||u(F),m.getState().resetSelectedElements(),m.setState({nodesSelectionActive:!1})},T=F=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){F.preventDefault();return}d==null||d(F)},$=h?F=>h(F):void 0,M=F=>{O.current&&(F.stopPropagation(),O.current=!1)},L=F=>{var se,Ee;if(F.pointerType==="touch"&&r!==!1&&!t)return;const{domNode:Y,transform:q}=m.getState();if(b.current=Y==null?void 0:Y.getBoundingClientRect(),!b.current)return;const Z=F.target===P.current;if(!Z&&!!F.target.closest(".nokey")||!e||!(s&&Z||t)||F.button!==0||!F.isPrimary)return;(Ee=(se=F.target)==null?void 0:se.setPointerCapture)==null||Ee.call(se,F.pointerId),O.current=!1;const{x:te,y:ne}=vt(F.nativeEvent,b.current),re=fi({x:te,y:ne},q);m.setState({userSelectionRect:{width:0,height:0,startX:re.x,startY:re.y,x:te,y:ne}}),Z||(F.stopPropagation(),F.preventDefault())};function j(F,Y){const{userSelectionRect:q}=m.getState();if(!q)return;const{transform:Z,nodeLookup:G,edgeLookup:ee,connectionLookup:te,triggerNodeChanges:ne,triggerEdgeChanges:re,defaultEdgeOptions:se}=m.getState(),Ee={x:q.startX,y:q.startY},{x:Le,y:tt}=Hr(Ee,Z),At={startX:Ee.x,startY:Ee.y,x:F<Le?F:Le,y:Y<tt?Y:tt,width:Math.abs(F-Le),height:Math.abs(Y-tt)},Gr=D.current,Cn=A.current;D.current=new Set(kc(G,At,Z,n===Qo.Partial,!0).map(at=>at.id)),A.current=new Set;const jn=(se==null?void 0:se.selectable)??!0;for(const at of D.current){const Rt=te.get(at);if(Rt)for(const{edgeId:Dt}of Rt.values()){const Mn=ee.get(Dt);Mn&&(Mn.selectable??jn)&&A.current.add(Dt)}}if(!Sf(Gr,D.current)){const at=kr(G,D.current,!0);ne(at)}if(!Sf(Cn,A.current)){const at=kr(ee,A.current);re(at)}m.setState({userSelectionRect:At,userSelectionActive:!0,nodesSelectionActive:!1})}function R(){if(!o||!b.current)return;const[F,Y]=Sc(N.current,b.current,S);_({x:F,y:Y}).then(q=>{if(!O.current||!q){k.current=requestAnimationFrame(R);return}const{x:Z,y:G}=N.current;j(Z,G),k.current=requestAnimationFrame(R)})}const V=()=>{cancelAnimationFrame(k.current),k.current=0,z.current=!1};I.useEffect(()=>()=>V(),[]);const U=F=>{const{userSelectionRect:Y,transform:q,resetSelectedElements:Z}=m.getState();if(!b.current||!Y)return;const{x:G,y:ee}=vt(F.nativeEvent,b.current);N.current={x:G,y:ee};const te=Hr({x:Y.startX,y:Y.startY},q);if(!O.current){const ne=t?0:i;if(Math.hypot(G-te.x,ee-te.y)<=ne)return;Z(),l==null||l(F)}O.current=!0,z.current||(R(),z.current=!0),j(G,ee)},Q=F=>{var Y,q;if(!E){F.target===P.current&&m.getState().connection.inProgress&&(H.current=!0);return}F.button===0&&((q=(Y=F.target)==null?void 0:Y.releasePointerCapture)==null||q.call(Y,F.pointerId),!v&&F.target===P.current&&m.getState().userSelectionRect&&(C==null||C(F)),m.setState({userSelectionActive:!1,userSelectionRect:null}),O.current&&(a==null||a(F),m.setState({nodesSelectionActive:D.current.size>0})),V())},B=F=>{var Y,q;(q=(Y=F.target)==null?void 0:Y.releasePointerCapture)==null||q.call(Y,F.pointerId),V()},X=r===!0||Array.isArray(r)&&r.includes(0);return f.jsxs("div",{className:ke(["react-flow__pane",{draggable:X,dragging:w,selection:e}]),onClick:E?void 0:sa(C,P),onContextMenu:sa(T,P),onWheel:sa($,P),onPointerEnter:E?void 0:c,onPointerMove:E?U:p,onPointerUp:Q,onPointerCancel:E?B:void 0,onPointerDownCapture:E?L:void 0,onClickCapture:E?M:void 0,onPointerLeave:y,ref:P,style:xl,children:[x,f.jsx(JE,{})]})}function hu({id:e,store:t,unselect:n=!1,nodeRef:r}){const{addSelectedNodes:o,unselectNodesAndEdges:i,multiSelectionActive:s,nodeLookup:l,onError:a}=t.getState(),u=l.get(e);if(!u){a==null||a("012",Nt.error012(e));return}t.setState({nodesSelectionActive:!1}),u.selected?(n||u.selected&&s)&&(i({nodes:[u],edges:[]}),requestAnimationFrame(()=>{var d;return(d=r==null?void 0:r.current)==null?void 0:d.blur()})):o([e])}function Zg({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:o,isSelectable:i,nodeClickDistance:s}){const l=fe(),[a,u]=I.useState(!1),d=I.useRef();return I.useEffect(()=>{if(!t)return d.current=CN({getStoreItems:()=>l.getState(),onNodeMouseDown:h=>{hu({id:h,store:l,nodeRef:e})},onDragStart:()=>{u(!0)},onDragStop:()=>{u(!1)}}),()=>{var h;(h=d.current)==null||h.destroy(),d.current=void 0}},[t,l,e]),I.useEffect(()=>{t||!e.current||!d.current||d.current.update({noDragClassName:n,handleSelector:r,domNode:e.current,isSelectable:i,nodeId:o,nodeClickDistance:s})},[n,r,t,i,e,o,s]),a}const n_=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function Jg(){const e=fe();return I.useCallback(n=>{const{nodeExtent:r,snapToGrid:o,snapGrid:i,nodesDraggable:s,onError:l,updateNodePositions:a,nodeLookup:u,nodeOrigin:d}=e.getState(),h=new Map,c=n_(s),p=o?i[0]:5,y=o?i[1]:5,x=n.direction.x*p*n.factor,k=n.direction.y*y*n.factor;for(const[,m]of u){if(!c(m))continue;let v={x:m.internals.positionAbsolute.x+x,y:m.internals.positionAbsolute.y+k};o&&(v=di(v,i));const{position:g,positionAbsolute:w}=pg({nodeId:m.id,nextPosition:v,nodeLookup:u,nodeExtent:r,nodeOrigin:d,onError:l});m.position=g,m.internals.positionAbsolute=w,h.set(m.id,m)}a(h)},[])}const bc=I.createContext(null),r_=bc.Provider;bc.Consumer;const e0=()=>I.useContext(bc),o_=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),t0=I.createContext(null);function i_({children:e}){const t=ie(o_,ye);return f.jsx(t0.Provider,{value:t,children:e})}function s_(){const e=I.useContext(t0);if(!e)throw new Error("useHandleConfig must be used within a HandleConfigProvider");return e}const l_={connectingFrom:!1,connectingTo:!1,clickConnecting:!1,isPossibleEndHandle:!0,connectionInProcess:!1,clickConnectionInProcess:!1,valid:!1},a_=(e,t,n)=>r=>{const{connectionClickStartHandle:o,connectionMode:i,connection:s}=r,{fromHandle:l,toHandle:a,isValid:u}=s;if(!l&&!o)return l_;const d=(a==null?void 0:a.nodeId)===e&&(a==null?void 0:a.id)===t&&(a==null?void 0:a.type)===n;return{connectingFrom:(l==null?void 0:l.nodeId)===e&&(l==null?void 0:l.id)===t&&(l==null?void 0:l.type)===n,connectingTo:d,clickConnecting:(o==null?void 0:o.nodeId)===e&&(o==null?void 0:o.id)===t&&(o==null?void 0:o.type)===n,isPossibleEndHandle:i===Or.Strict?(l==null?void 0:l.type)!==n:e!==(l==null?void 0:l.nodeId)||t!==(l==null?void 0:l.id),connectionInProcess:!!l,clickConnectionInProcess:!!o,valid:d&&u}};function u_({type:e="source",position:t=J.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:o=!0,isConnectableEnd:i=!0,id:s,onConnect:l,children:a,className:u,onMouseDown:d,onTouchStart:h,...c},p){var z,C;const y=s||null,x=e==="target",k=fe(),m=e0(),{connectOnClick:v,noPanClassName:g,rfId:w}=s_(),{connectingFrom:_,connectingTo:S,clickConnecting:E,isPossibleEndHandle:P,connectionInProcess:b,clickConnectionInProcess:D,valid:A}=ie(a_(m,y,e),ye);m||(C=(z=k.getState()).onError)==null||C.call(z,"010",Nt.error010());const H=T=>{const{defaultEdgeOptions:$,onConnect:M,hasDefaultEdges:L}=k.getState(),j={...$,...T};if(L){const{edges:R,setEdges:V,onError:U}=k.getState();V(HE(j,R,{onError:U}))}M==null||M(j),l==null||l(j)},O=T=>{if(!m)return;const $=Eg(T.nativeEvent);if(o&&($&&T.button===0||!$)){const M=k.getState();fu.onPointerDown(T.nativeEvent,{handleDomNode:T.currentTarget,autoPanOnConnect:M.autoPanOnConnect,connectionMode:M.connectionMode,connectionRadius:M.connectionRadius,domNode:M.domNode,nodeLookup:M.nodeLookup,lib:M.lib,isTarget:x,handleId:y,nodeId:m,flowId:M.rfId,panBy:M.panBy,cancelConnection:M.cancelConnection,onConnectStart:M.onConnectStart,onConnectEnd:(...L)=>{var j,R;return(R=(j=k.getState()).onConnectEnd)==null?void 0:R.call(j,...L)},updateConnection:M.updateConnection,onConnect:H,isValidConnection:n||((...L)=>{var j,R;return((R=(j=k.getState()).isValidConnection)==null?void 0:R.call(j,...L))??!0}),getTransform:()=>k.getState().transform,getFromHandle:()=>k.getState().connection.fromHandle,autoPanSpeed:M.autoPanSpeed,dragThreshold:M.connectionDragThreshold})}$?d==null||d(T):h==null||h(T)},N=T=>{const{onClickConnectStart:$,onClickConnectEnd:M,connectionClickStartHandle:L,connectionMode:j,isValidConnection:R,lib:V,rfId:U,nodeLookup:Q,connection:B}=k.getState();if(!m||!L&&!o)return;if(!L){$==null||$(T.nativeEvent,{nodeId:m,handleId:y,handleType:e}),k.setState({connectionClickStartHandle:{nodeId:m,type:e,id:y}});return}const X=Sg(T.target),F=n||R,{connection:Y,isValid:q}=fu.isValid(T.nativeEvent,{handle:{nodeId:m,id:y,type:e},connectionMode:j,fromNodeId:L.nodeId,fromHandleId:L.id||null,fromType:L.type,isValidConnection:F,flowId:U,doc:X,lib:V,nodeLookup:Q});q&&Y&&H(Y);const Z=structuredClone(B);delete Z.inProgress,Z.toPosition=Z.toHandle?Z.toHandle.position:null,M==null||M(T,Z),k.setState({connectionClickStartHandle:null})};return f.jsx("div",{"data-handleid":y,"data-nodeid":m,"data-handlepos":t,"data-id":`${w}-${m}-${y}-${e}`,className:ke(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",g,u,{source:!x,target:x,connectable:r,connectablestart:o,connectableend:i,clickconnecting:E,connectingfrom:_,connectingto:S,valid:A,connectionindicator:r&&(!b||P)&&(b||D?i:o)}]),onMouseDown:O,onTouchStart:O,onClick:v?N:void 0,ref:p,...c,children:a})}const Wr=I.memo(Qg(u_));function c_({data:e,isConnectable:t,sourcePosition:n=J.Bottom}){return f.jsxs(f.Fragment,{children:[e==null?void 0:e.label,f.jsx(Wr,{type:"source",position:n,isConnectable:t})]})}function d_({data:e,isConnectable:t,targetPosition:n=J.Top,sourcePosition:r=J.Bottom}){return f.jsxs(f.Fragment,{children:[f.jsx(Wr,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label,f.jsx(Wr,{type:"source",position:r,isConnectable:t})]})}function f_(){return null}function h_({data:e,isConnectable:t,targetPosition:n=J.Top}){return f.jsxs(f.Fragment,{children:[f.jsx(Wr,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label]})}const Vs={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},Qf={input:c_,default:d_,output:h_,group:f_};function p_(e){var t,n,r,o;return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??((t=e.style)==null?void 0:t.width),height:e.height??e.initialHeight??((n=e.style)==null?void 0:n.height)}:{width:e.width??((r=e.style)==null?void 0:r.width),height:e.height??((o=e.style)==null?void 0:o.height)}}const m_=e=>{const{width:t,height:n,x:r,y:o}=ci(e.nodeLookup,{filter:i=>!!i.selected});return{width:yt(t)?t:null,height:yt(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${r}px,${o}px)`}};function g_({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const r=fe(),{width:o,height:i,transformString:s,userSelectionActive:l}=ie(m_,ye),a=Jg(),u=I.useRef(null);I.useEffect(()=>{var p;n||(p=u.current)==null||p.focus({preventScroll:!0})},[n]);const d=!l&&o!==null&&i!==null;if(Zg({nodeRef:u,disabled:!d}),!d)return null;const h=e?p=>{const y=r.getState().nodes.filter(x=>x.selected);e(p,y)}:void 0,c=p=>{Object.prototype.hasOwnProperty.call(Vs,p.key)&&(p.preventDefault(),a({direction:Vs[p.key],factor:p.shiftKey?4:1}))};return f.jsx("div",{className:ke(["react-flow__nodesselection","react-flow__container",t]),style:{transform:s},children:f.jsx("div",{ref:u,className:"react-flow__nodesselection-rect",onContextMenu:h,tabIndex:n?void 0:-1,onKeyDown:n?void 0:c,style:{width:o,height:i}})})}const Gf=typeof window<"u"?window:void 0,y_=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function n0({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:o,onPaneContextMenu:i,onPaneScroll:s,paneClickDistance:l,deleteKeyCode:a,selectionKeyCode:u,selectionOnDrag:d,selectionMode:h,onSelectionStart:c,onSelectionEnd:p,multiSelectionKeyCode:y,panActivationKeyCode:x,zoomActivationKeyCode:k,elementsSelectable:m,zoomOnScroll:v,zoomOnPinch:g,panOnScroll:w,panOnScrollSpeed:_,panOnScrollMode:S,zoomOnDoubleClick:E,panOnDrag:P,autoPanOnSelection:b,defaultViewport:D,translateExtent:A,minZoom:H,maxZoom:O,preventScrolling:N,onSelectionContextMenu:z,noWheelClassName:C,noPanClassName:T,disableKeyboardA11y:$,onViewportChange:M,isControlledViewport:L}){const{nodesSelectionActive:j,userSelectionActive:R}=ie(y_,ye),V=Jo(u,{target:Gf}),U=Jo(x,{target:Gf}),Q=U||P,B=U||w,X=d&&Q!==!0,F=V||R||X;return KE({deleteKeyCode:a,multiSelectionKeyCode:y}),f.jsx(qE,{onPaneContextMenu:i,elementsSelectable:m,zoomOnScroll:v,zoomOnPinch:g,panOnScroll:B,panActivationKeyPressed:U,panOnScrollSpeed:_,panOnScrollMode:S,zoomOnDoubleClick:E,panOnDrag:!V&&Q,defaultViewport:D,translateExtent:A,minZoom:H,maxZoom:O,zoomActivationKeyCode:k,preventScrolling:N,noWheelClassName:C,noPanClassName:T,onViewportChange:M,isControlledViewport:L,paneClickDistance:l,selectionOnDrag:X,children:f.jsxs(t_,{onSelectionStart:c,onSelectionEnd:p,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:o,onPaneContextMenu:i,onPaneScroll:s,panOnDrag:Q,autoPanOnSelection:b,isSelecting:!!F,selectionMode:h,selectionKeyPressed:V,paneClickDistance:l,selectionOnDrag:X,children:[e,j&&f.jsx(g_,{onSelectionContextMenu:z,noPanClassName:T,disableKeyboardA11y:$})]})})}n0.displayName="FlowRenderer";const v_=I.memo(n0),x_=e=>t=>e?kc(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(n=>n.id):Array.from(t.nodeLookup.keys());function w_(e){return ie(I.useCallback(x_(e),[e]),ye)}const k_=e=>e.updateNodeInternals;function S_(){const e=ie(k_),[t]=I.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{const r=new Map;n.forEach(o=>{const i=o.target.getAttribute("data-id");r.set(i,{id:i,nodeElement:o.target,force:!0})}),e(r)}));return I.useEffect(()=>()=>{t==null||t.disconnect()},[t]),t}function N_({node:e,nodeType:t,hasDimensions:n,resizeObserver:r}){const o=fe(),i=I.useRef(null),s=I.useRef(null),l=I.useRef(e.sourcePosition),a=I.useRef(e.targetPosition),u=I.useRef(t),d=n&&!!e.internals.handleBounds;return I.useEffect(()=>{i.current&&!e.hidden&&(!d||s.current!==i.current)&&(s.current&&(r==null||r.unobserve(s.current)),r==null||r.observe(i.current),s.current=i.current)},[d,e.hidden]),I.useEffect(()=>()=>{s.current&&(r==null||r.unobserve(s.current),s.current=null)},[]),I.useEffect(()=>{if(i.current){const h=u.current!==t,c=l.current!==e.sourcePosition,p=a.current!==e.targetPosition;(h||c||p)&&(u.current=t,l.current=e.sourcePosition,a.current=e.targetPosition,o.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:i.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),i}function E_({id:e,onClick:t,onMouseEnter:n,onMouseMove:r,onMouseLeave:o,onContextMenu:i,onDoubleClick:s,nodesDraggable:l,elementsSelectable:a,nodesConnectable:u,nodesFocusable:d,resizeObserver:h,noDragClassName:c,noPanClassName:p,disableKeyboardA11y:y,rfId:x,nodeTypes:k,nodeClickDistance:m,onError:v}){const{node:g,internals:w,isParent:_}=ie(F=>{const Y=F.nodeLookup.get(e),q=F.parentLookup.has(e);return{node:Y,internals:Y.internals,isParent:q}},ye);let S=g.type||"default",E=(k==null?void 0:k[S])||Qf[S];E===void 0&&(v==null||v("003",Nt.error003(S)),S="default",E=(k==null?void 0:k.default)||Qf.default);const P=!!(g.draggable||l&&typeof g.draggable>"u"),b=!!(g.selectable||a&&typeof g.selectable>"u"),D=!!(g.connectable||u&&typeof g.connectable>"u"),A=!!(g.focusable||d&&typeof g.focusable>"u"),H=fe(),O=xg(g),N=N_({node:g,nodeType:S,hasDimensions:O,resizeObserver:h}),z=Zg({nodeRef:N,disabled:g.hidden||!P,noDragClassName:c,handleSelector:g.dragHandle,nodeId:e,isSelectable:b,nodeClickDistance:m}),C=Jg();if(g.hidden)return null;const T=_t(g),$=p_(g),M=b||P||t||n||r||o,L=n?F=>n(F,{...w.userNode}):void 0,j=r?F=>r(F,{...w.userNode}):void 0,R=o?F=>o(F,{...w.userNode}):void 0,V=i?F=>i(F,{...w.userNode}):void 0,U=s?F=>s(F,{...w.userNode}):void 0,Q=F=>{const{selectNodesOnDrag:Y,nodeDragThreshold:q}=H.getState();b&&(!Y||!P||q>0)&&hu({id:e,store:H,nodeRef:N}),t&&t(F,{...w.userNode})},B=F=>{if(!(Ng(F.nativeEvent)||y)){if(cg.includes(F.key)&&b){const Y=F.key==="Escape";hu({id:e,store:H,unselect:Y,nodeRef:N})}else if(P&&g.selected&&Object.prototype.hasOwnProperty.call(Vs,F.key)){F.preventDefault();const{ariaLabelConfig:Y}=H.getState();H.setState({ariaLiveMessage:Y["node.a11yDescription.ariaLiveMessage"]({direction:F.key.replace("Arrow","").toLowerCase(),x:~~w.positionAbsolute.x,y:~~w.positionAbsolute.y})}),C({direction:Vs[F.key],factor:F.shiftKey?4:1})}}},X=()=>{var te;if(y||!((te=N.current)!=null&&te.matches(":focus-visible")))return;const{transform:F,width:Y,height:q,autoPanOnNodeFocus:Z,setCenter:G}=H.getState();if(!Z)return;kc(new Map([[e,g]]),{x:0,y:0,width:Y,height:q},F,!0).length>0||G(g.position.x+T.width/2,g.position.y+T.height/2,{zoom:F[2]})};return f.jsx("div",{className:ke(["react-flow__node",`react-flow__node-${S}`,{[p]:P},g.className,{selected:g.selected,selectable:b,parent:_,draggable:P,dragging:z}]),ref:N,style:{zIndex:w.z,transform:`translate(${w.positionAbsolute.x}px,${w.positionAbsolute.y}px)`,pointerEvents:M?"all":"none",visibility:O?"visible":"hidden",...g.style,...$},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:L,onMouseMove:j,onMouseLeave:R,onContextMenu:V,onClick:Q,onDoubleClick:U,onKeyDown:A?B:void 0,tabIndex:A?0:void 0,onFocus:A?X:void 0,role:g.ariaRole??(A?"group":void 0),"aria-roledescription":"node","aria-describedby":y?void 0:`${Ug}-${x}`,"aria-label":g.ariaLabel,...g.domAttributes,children:f.jsx(r_,{value:e,children:f.jsx(E,{id:e,data:g.data,type:S,positionAbsoluteX:w.positionAbsolute.x,positionAbsoluteY:w.positionAbsolute.y,selected:g.selected??!1,selectable:b,draggable:P,deletable:g.deletable??!0,isConnectable:D,sourcePosition:g.sourcePosition,targetPosition:g.targetPosition,dragging:z,dragHandle:g.dragHandle,zIndex:w.z,parentId:g.parentId,...T})})})}var __=I.memo(E_);const C_=e=>({nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function r0(e){const{nodesConnectable:t,nodesFocusable:n,elementsSelectable:r,onError:o}=ie(C_,ye),i=w_(e.onlyRenderVisibleElements),s=S_();return f.jsx("div",{className:"react-flow__nodes",style:xl,children:i.map(l=>f.jsx(__,{id:l,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:s,nodesDraggable:e.nodesDraggable??!0,nodesConnectable:t,nodesFocusable:n,elementsSelectable:r,nodeClickDistance:e.nodeClickDistance,onError:o},l))})}r0.displayName="NodeRenderer";const j_=I.memo(r0);function M_(e){return ie(I.useCallback(n=>{if(!e)return n.edges.map(o=>o.id);const r=[];if(n.width&&n.height)for(const o of n.edges){const i=n.nodeLookup.get(o.source),s=n.nodeLookup.get(o.target);i&&s&&lN({sourceNode:i,targetNode:s,width:n.width,height:n.height,transform:n.transform})&&r.push(o.id)}return r},[e]),ye)}const $_=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e}};return f.jsx("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},P_=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e,fill:e}};return f.jsx("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},qf={[Go.Arrow]:$_,[Go.ArrowClosed]:P_};function b_(e){const t=fe();return I.useMemo(()=>{var o,i;return Object.prototype.hasOwnProperty.call(qf,e)?qf[e]:((i=(o=t.getState()).onError)==null||i.call(o,"009",Nt.error009(e)),null)},[e])}const I_=({id:e,type:t,color:n,width:r=12.5,height:o=12.5,markerUnits:i="strokeWidth",strokeWidth:s,orient:l="auto-start-reverse"})=>{const a=b_(t);return a?f.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${o}`,viewBox:"-10 -10 20 20",markerUnits:i,orient:l,refX:"0",refY:"0",children:f.jsx(a,{color:n,strokeWidth:s})}):null},o0=({defaultColor:e,rfId:t})=>{const n=ie(i=>i.edges),r=ie(i=>i.defaultEdgeOptions),o=I.useMemo(()=>mN(n,{id:t,defaultColor:e,defaultMarkerStart:r==null?void 0:r.markerStart,defaultMarkerEnd:r==null?void 0:r.markerEnd}),[n,r,t,e]);return o.length?f.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:f.jsx("defs",{children:o.map(i=>f.jsx(I_,{id:i.id,type:i.type,color:i.color,width:i.width,height:i.height,markerUnits:i.markerUnits,strokeWidth:i.strokeWidth,orient:i.orient},i.id))})}):null};o0.displayName="MarkerDefinitions";var T_=I.memo(o0);function i0({x:e,y:t,label:n,labelStyle:r,labelShowBg:o=!0,labelBgStyle:i,labelBgPadding:s=[2,4],labelBgBorderRadius:l=2,children:a,className:u,...d}){const[h,c]=I.useState({x:1,y:0,width:0,height:0}),p=ke(["react-flow__edge-textwrapper",u]),y=I.useRef(null);return I.useEffect(()=>{if(y.current){const x=y.current.getBBox();c({x:x.x,y:x.y,width:x.width,height:x.height})}},[n]),n?f.jsxs("g",{transform:`translate(${e-h.width/2} ${t-h.height/2})`,className:p,visibility:h.width?"visible":"hidden",...d,children:[o&&f.jsx("rect",{width:h.width+2*s[0],x:-s[0],y:-s[1],height:h.height+2*s[1],className:"react-flow__edge-textbg",style:i,rx:l,ry:l}),f.jsx("text",{className:"react-flow__edge-text",y:h.height/2,dy:"0.3em",ref:y,style:r,children:n}),a]}):null}i0.displayName="EdgeText";const z_=I.memo(i0);function mi({path:e,labelX:t,labelY:n,label:r,labelStyle:o,labelShowBg:i,labelBgStyle:s,labelBgPadding:l,labelBgBorderRadius:a,interactionWidth:u=20,...d}){return f.jsxs(f.Fragment,{children:[f.jsx("path",{...d,d:e,fill:"none",className:ke(["react-flow__edge-path",d.className])}),u?f.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:u,className:"react-flow__edge-interaction"}):null,r&&yt(t)&&yt(n)?f.jsx(z_,{x:t,y:n,label:r,labelStyle:o,labelShowBg:i,labelBgStyle:s,labelBgPadding:l,labelBgBorderRadius:a}):null]})}function Zf({pos:e,x1:t,y1:n,x2:r,y2:o}){return e===J.Left||e===J.Right?[.5*(t+r),n]:[t,.5*(n+o)]}function s0({sourceX:e,sourceY:t,sourcePosition:n=J.Bottom,targetX:r,targetY:o,targetPosition:i=J.Top}){const[s,l]=Zf({pos:n,x1:e,y1:t,x2:r,y2:o}),[a,u]=Zf({pos:i,x1:r,y1:o,x2:e,y2:t}),[d,h,c,p]=_g({sourceX:e,sourceY:t,targetX:r,targetY:o,sourceControlX:s,sourceControlY:l,targetControlX:a,targetControlY:u});return[`M${e},${t} C${s},${l} ${a},${u} ${r},${o}`,d,h,c,p]}function l0(e){return I.memo(({id:t,sourceX:n,sourceY:r,targetX:o,targetY:i,sourcePosition:s,targetPosition:l,label:a,labelStyle:u,labelShowBg:d,labelBgStyle:h,labelBgPadding:c,labelBgBorderRadius:p,style:y,markerEnd:x,markerStart:k,interactionWidth:m})=>{const[v,g,w]=s0({sourceX:n,sourceY:r,sourcePosition:s,targetX:o,targetY:i,targetPosition:l}),_=e.isInternal?void 0:t;return f.jsx(mi,{id:_,path:v,labelX:g,labelY:w,label:a,labelStyle:u,labelShowBg:d,labelBgStyle:h,labelBgPadding:c,labelBgBorderRadius:p,style:y,markerEnd:x,markerStart:k,interactionWidth:m})})}const L_=l0({isInternal:!1}),a0=l0({isInternal:!0});L_.displayName="SimpleBezierEdge";a0.displayName="SimpleBezierEdgeInternal";function u0(e){return I.memo(({id:t,sourceX:n,sourceY:r,targetX:o,targetY:i,label:s,labelStyle:l,labelShowBg:a,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:h,style:c,sourcePosition:p=J.Bottom,targetPosition:y=J.Top,markerEnd:x,markerStart:k,pathOptions:m,interactionWidth:v})=>{const[g,w,_]=Bs({sourceX:n,sourceY:r,sourcePosition:p,targetX:o,targetY:i,targetPosition:y,borderRadius:m==null?void 0:m.borderRadius,offset:m==null?void 0:m.offset,stepPosition:m==null?void 0:m.stepPosition}),S=e.isInternal?void 0:t;return f.jsx(mi,{id:S,path:g,labelX:w,labelY:_,label:s,labelStyle:l,labelShowBg:a,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:h,style:c,markerEnd:x,markerStart:k,interactionWidth:v})})}const c0=u0({isInternal:!1}),d0=u0({isInternal:!0});c0.displayName="SmoothStepEdge";d0.displayName="SmoothStepEdgeInternal";function f0(e){return I.memo(({id:t,...n})=>{var o;const r=e.isInternal?void 0:t;return f.jsx(c0,{...n,id:r,pathOptions:I.useMemo(()=>{var i;return{borderRadius:0,offset:(i=n.pathOptions)==null?void 0:i.offset}},[(o=n.pathOptions)==null?void 0:o.offset])})})}const A_=f0({isInternal:!1}),h0=f0({isInternal:!0});A_.displayName="StepEdge";h0.displayName="StepEdgeInternal";function p0(e){return I.memo(({id:t,sourceX:n,sourceY:r,targetX:o,targetY:i,label:s,labelStyle:l,labelShowBg:a,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:h,style:c,markerEnd:p,markerStart:y,interactionWidth:x})=>{const[k,m,v]=jg({sourceX:n,sourceY:r,targetX:o,targetY:i}),g=e.isInternal?void 0:t;return f.jsx(mi,{id:g,path:k,labelX:m,labelY:v,label:s,labelStyle:l,labelShowBg:a,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:h,style:c,markerEnd:p,markerStart:y,interactionWidth:x})})}const R_=p0({isInternal:!1}),m0=p0({isInternal:!0});R_.displayName="StraightEdge";m0.displayName="StraightEdgeInternal";function g0(e){return I.memo(({id:t,sourceX:n,sourceY:r,targetX:o,targetY:i,sourcePosition:s=J.Bottom,targetPosition:l=J.Top,label:a,labelStyle:u,labelShowBg:d,labelBgStyle:h,labelBgPadding:c,labelBgBorderRadius:p,style:y,markerEnd:x,markerStart:k,pathOptions:m,interactionWidth:v})=>{const[g,w,_]=_c({sourceX:n,sourceY:r,sourcePosition:s,targetX:o,targetY:i,targetPosition:l,curvature:m==null?void 0:m.curvature}),S=e.isInternal?void 0:t;return f.jsx(mi,{id:S,path:g,labelX:w,labelY:_,label:a,labelStyle:u,labelShowBg:d,labelBgStyle:h,labelBgPadding:c,labelBgBorderRadius:p,style:y,markerEnd:x,markerStart:k,interactionWidth:v})})}const D_=g0({isInternal:!1}),y0=g0({isInternal:!0});D_.displayName="BezierEdge";y0.displayName="BezierEdgeInternal";const Jf={default:y0,straight:m0,step:h0,smoothstep:d0,simplebezier:a0},eh={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null,zIndex:void 0},O_=(e,t,n)=>n===J.Left?e-t:n===J.Right?e+t:e,F_=(e,t,n)=>n===J.Top?e-t:n===J.Bottom?e+t:e,th="react-flow__edgeupdater";function nh({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:o,onMouseEnter:i,onMouseOut:s,type:l}){return f.jsx("circle",{onMouseDown:o,onMouseEnter:i,onMouseOut:s,className:ke([th,`${th}-${l}`]),cx:O_(t,r,e),cy:F_(n,r,e),r,stroke:"transparent",fill:"transparent"})}function H_({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:r,sourceY:o,targetX:i,targetY:s,sourcePosition:l,targetPosition:a,onReconnect:u,onReconnectStart:d,onReconnectEnd:h,setReconnecting:c,setUpdateHover:p}){const y=fe(),x=(w,_)=>{if(w.button!==0)return;const{autoPanOnConnect:S,domNode:E,connectionMode:P,connectionRadius:b,lib:D,onConnectStart:A,cancelConnection:H,nodeLookup:O,rfId:N,panBy:z,updateConnection:C}=y.getState(),T=_.type==="target",$=(j,R)=>{c(!1),h==null||h(j,n,_.type,R)},M=j=>u==null?void 0:u(n,j),L=(j,R)=>{c(!0),d==null||d(w,n,_.type),A==null||A(j,R)};fu.onPointerDown(w.nativeEvent,{autoPanOnConnect:S,connectionMode:P,connectionRadius:b,domNode:E,handleId:_.id,nodeId:_.nodeId,nodeLookup:O,isTarget:T,edgeUpdaterType:_.type,lib:D,flowId:N,cancelConnection:H,panBy:z,isValidConnection:(...j)=>{var R,V;return((V=(R=y.getState()).isValidConnection)==null?void 0:V.call(R,...j))??!0},onConnect:M,onConnectStart:L,onConnectEnd:(...j)=>{var R,V;return(V=(R=y.getState()).onConnectEnd)==null?void 0:V.call(R,...j)},onReconnectEnd:$,updateConnection:C,getTransform:()=>y.getState().transform,getFromHandle:()=>y.getState().connection.fromHandle,dragThreshold:y.getState().connectionDragThreshold,handleDomNode:w.currentTarget})},k=w=>x(w,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),m=w=>x(w,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),v=()=>p(!0),g=()=>p(!1);return f.jsxs(f.Fragment,{children:[(e===!0||e==="source")&&f.jsx(nh,{position:l,centerX:r,centerY:o,radius:t,onMouseDown:k,onMouseEnter:v,onMouseOut:g,type:"source"}),(e===!0||e==="target")&&f.jsx(nh,{position:a,centerX:i,centerY:s,radius:t,onMouseDown:m,onMouseEnter:v,onMouseOut:g,type:"target"})]})}function B_({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:r,onClick:o,onDoubleClick:i,onContextMenu:s,onMouseEnter:l,onMouseMove:a,onMouseLeave:u,reconnectRadius:d,onReconnect:h,onReconnectStart:c,onReconnectEnd:p,rfId:y,edgeTypes:x,noPanClassName:k,onError:m,disableKeyboardA11y:v}){let g=ie(G=>G.edgeLookup.get(e));const w=ie(G=>G.defaultEdgeOptions);g=w?{...w,...g}:g;let _=g.type||"default",S=(x==null?void 0:x[_])||Jf[_];S===void 0&&(m==null||m("011",Nt.error011(_)),_="default",S=(x==null?void 0:x.default)||Jf.default);const E=!!(g.focusable||t&&typeof g.focusable>"u"),P=typeof h<"u"&&(g.reconnectable||n&&typeof g.reconnectable>"u"),b=!!(g.selectable||r&&typeof g.selectable>"u"),D=I.useRef(null),[A,H]=I.useState(!1),[O,N]=I.useState(!1),z=fe(),{zIndex:C=g.zIndex,sourceX:T,sourceY:$,targetX:M,targetY:L,sourcePosition:j,targetPosition:R}=ie(I.useCallback(G=>{const ee=G.nodeLookup.get(g.source),te=G.nodeLookup.get(g.target);if(!ee||!te)return eh;const ne=pN({id:e,sourceNode:ee,targetNode:te,sourceHandle:g.sourceHandle||null,targetHandle:g.targetHandle||null,connectionMode:G.connectionMode,onError:m}),re=sN({selected:g.selected,zIndex:g.zIndex,sourceNode:ee,targetNode:te,elevateOnSelect:G.elevateEdgesOnSelect,zIndexMode:G.zIndexMode});return{...ne||eh,zIndex:re}},[g.source,g.target,g.sourceHandle,g.targetHandle,g.selected,g.zIndex,m]),ye),V=I.useMemo(()=>g.markerStart?`url('#${cu(g.markerStart,y)}')`:void 0,[g.markerStart,y]),U=I.useMemo(()=>g.markerEnd?`url('#${cu(g.markerEnd,y)}')`:void 0,[g.markerEnd,y]);if(g.hidden||T===null||$===null||M===null||L===null)return null;const Q=G=>{var re;const{addSelectedEdges:ee,unselectNodesAndEdges:te,multiSelectionActive:ne}=z.getState();b&&(z.setState({nodesSelectionActive:!1}),g.selected&&ne?(te({nodes:[],edges:[g]}),(re=D.current)==null||re.blur()):ee([e])),o&&o(G,g)},B=i?G=>{i(G,{...g})}:void 0,X=s?G=>{s(G,{...g})}:void 0,F=l?G=>{l(G,{...g})}:void 0,Y=a?G=>{a(G,{...g})}:void 0,q=u?G=>{u(G,{...g})}:void 0,Z=G=>{var ee;if(!v&&cg.includes(G.key)&&b){const{unselectNodesAndEdges:te,addSelectedEdges:ne}=z.getState();G.key==="Escape"?((ee=D.current)==null||ee.blur(),te({edges:[g]})):ne([e])}};return f.jsx("svg",{style:{zIndex:C},children:f.jsxs("g",{className:ke(["react-flow__edge",`react-flow__edge-${_}`,g.className,k,{selected:g.selected,animated:g.animated,inactive:!b&&!o,updating:A,selectable:b}]),onClick:Q,onDoubleClick:B,onContextMenu:X,onMouseEnter:F,onMouseMove:Y,onMouseLeave:q,onKeyDown:E?Z:void 0,tabIndex:E?0:void 0,role:g.ariaRole??(E?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":g.ariaLabel===null?void 0:g.ariaLabel||`Edge from ${g.source} to ${g.target}`,"aria-describedby":E?`${Yg}-${y}`:void 0,ref:D,...g.domAttributes,children:[!O&&f.jsx(S,{id:e,source:g.source,target:g.target,type:g.type,selected:g.selected,animated:g.animated,selectable:b,deletable:g.deletable??!0,label:g.label,labelStyle:g.labelStyle,labelShowBg:g.labelShowBg,labelBgStyle:g.labelBgStyle,labelBgPadding:g.labelBgPadding,labelBgBorderRadius:g.labelBgBorderRadius,sourceX:T,sourceY:$,targetX:M,targetY:L,sourcePosition:j,targetPosition:R,data:g.data,style:g.style,sourceHandleId:g.sourceHandle,targetHandleId:g.targetHandle,markerStart:V,markerEnd:U,pathOptions:"pathOptions"in g?g.pathOptions:void 0,interactionWidth:g.interactionWidth}),P&&f.jsx(H_,{edge:g,isReconnectable:P,reconnectRadius:d,onReconnect:h,onReconnectStart:c,onReconnectEnd:p,sourceX:T,sourceY:$,targetX:M,targetY:L,sourcePosition:j,targetPosition:R,setUpdateHover:H,setReconnecting:N})]})})}var V_=I.memo(B_);const W_=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function v0({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:r,noPanClassName:o,onReconnect:i,onEdgeContextMenu:s,onEdgeMouseEnter:l,onEdgeMouseMove:a,onEdgeMouseLeave:u,onEdgeClick:d,reconnectRadius:h,onEdgeDoubleClick:c,onReconnectStart:p,onReconnectEnd:y,disableKeyboardA11y:x}){const{edgesFocusable:k,edgesReconnectable:m,elementsSelectable:v,onError:g}=ie(W_,ye),w=M_(t);return f.jsxs("div",{className:"react-flow__edges",children:[f.jsx(T_,{defaultColor:e,rfId:n}),w.map(_=>f.jsx(V_,{id:_,edgesFocusable:k,edgesReconnectable:m,elementsSelectable:v,noPanClassName:o,onReconnect:i,onContextMenu:s,onMouseEnter:l,onMouseMove:a,onMouseLeave:u,onClick:d,reconnectRadius:h,onDoubleClick:c,onReconnectStart:p,onReconnectEnd:y,rfId:n,onError:g,edgeTypes:r,disableKeyboardA11y:x},_))]})}v0.displayName="EdgeRenderer";const U_=I.memo(v0),rh=e=>`translate(${e[0]}px,${e[1]}px) scale(${e[2]})`;function Y_({children:e}){const t=fe(),n=I.useRef(null),[r]=I.useState(()=>t.getState().transform);return Gg(()=>{let o=null;const i=()=>{const s=t.getState().transform;o&&s[0]===o[0]&&s[1]===o[1]&&s[2]===o[2]||(o=s,n.current&&(n.current.style.transform=rh(s)))};return i(),t.subscribe(i)},[t]),f.jsx("div",{ref:n,className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:rh(r)},children:e})}function X_(e){const t=pi(),n=I.useRef(!1);I.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const K_=e=>{var t;return(t=e.panZoom)==null?void 0:t.syncViewport};function Q_(e){const t=ie(K_),n=fe();return I.useEffect(()=>{e&&(t==null||t(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function G_(e){return e.connection.inProgress?{...e.connection,to:fi(e.connection.to,e.transform)}:{...e.connection}}function q_(e){return G_}function Z_(e){const t=q_();return ie(t,ye)}const J_=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function eC({containerStyle:e,style:t,type:n,component:r}){const{nodesConnectable:o,width:i,height:s,isValid:l,inProgress:a}=ie(J_,ye);return!(i&&o&&a)?null:f.jsx("svg",{style:e,width:i,height:s,className:"react-flow__connectionline react-flow__container",children:f.jsx("g",{className:ke(["react-flow__connection",kg(l)]),children:f.jsx(x0,{style:t,type:n,CustomComponent:r,isValid:l})})})}const x0=({style:e,type:t=un.Bezier,CustomComponent:n,isValid:r})=>{const{inProgress:o,from:i,fromNode:s,fromHandle:l,fromPosition:a,to:u,toNode:d,toHandle:h,toPosition:c,pointer:p}=Z_();if(!o)return;if(n)return f.jsx(n,{connectionLineType:t,connectionLineStyle:e,fromNode:s,fromHandle:l,fromX:i.x,fromY:i.y,toX:u.x,toY:u.y,fromPosition:a,toPosition:c,connectionStatus:kg(r),toNode:d,toHandle:h,pointer:p});let y="";const x={sourceX:i.x,sourceY:i.y,sourcePosition:a,targetX:u.x,targetY:u.y,targetPosition:c};switch(t){case un.Bezier:[y]=_c(x);break;case un.SimpleBezier:[y]=s0(x);break;case un.Step:[y]=Bs({...x,borderRadius:0});break;case un.SmoothStep:[y]=Bs(x);break;default:[y]=jg(x)}return f.jsx("path",{d:y,fill:"none",className:"react-flow__connection-path",style:e})};x0.displayName="ConnectionLine";const tC={};function oh(e=tC){I.useRef(e),fe(),I.useEffect(()=>{},[e])}function nC(){fe(),I.useRef(!1),I.useEffect(()=>{},[])}function w0({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:r,onEdgeClick:o,onNodeDoubleClick:i,onEdgeDoubleClick:s,onNodeMouseEnter:l,onNodeMouseMove:a,onNodeMouseLeave:u,onNodeContextMenu:d,onSelectionContextMenu:h,onSelectionStart:c,onSelectionEnd:p,connectionLineType:y,connectionLineStyle:x,connectionLineComponent:k,connectionLineContainerStyle:m,selectionKeyCode:v,selectionOnDrag:g,selectionMode:w,multiSelectionKeyCode:_,panActivationKeyCode:S,zoomActivationKeyCode:E,deleteKeyCode:P,onlyRenderVisibleElements:b,elementsSelectable:D,defaultViewport:A,translateExtent:H,minZoom:O,maxZoom:N,preventScrolling:z,defaultMarkerColor:C,zoomOnScroll:T,zoomOnPinch:$,panOnScroll:M,panOnScrollSpeed:L,panOnScrollMode:j,zoomOnDoubleClick:R,panOnDrag:V,autoPanOnSelection:U,onPaneClick:Q,onPaneMouseEnter:B,onPaneMouseMove:X,onPaneMouseLeave:F,onPaneScroll:Y,onPaneContextMenu:q,paneClickDistance:Z,nodeClickDistance:G,onEdgeContextMenu:ee,onEdgeMouseEnter:te,onEdgeMouseMove:ne,onEdgeMouseLeave:re,reconnectRadius:se,onReconnect:Ee,onReconnectStart:Le,onReconnectEnd:tt,noDragClassName:At,noWheelClassName:Gr,noPanClassName:Cn,disableKeyboardA11y:jn,nodeExtent:at,rfId:Rt,viewport:Dt,onViewportChange:Mn,nodesDraggable:Nl}){return oh(e),oh(t),nC(),X_(n),Q_(Dt),f.jsx(v_,{onPaneClick:Q,onPaneMouseEnter:B,onPaneMouseMove:X,onPaneMouseLeave:F,onPaneContextMenu:q,onPaneScroll:Y,paneClickDistance:Z,deleteKeyCode:P,selectionKeyCode:v,selectionOnDrag:g,selectionMode:w,onSelectionStart:c,onSelectionEnd:p,multiSelectionKeyCode:_,panActivationKeyCode:S,zoomActivationKeyCode:E,elementsSelectable:D,zoomOnScroll:T,zoomOnPinch:$,zoomOnDoubleClick:R,panOnScroll:M,panOnScrollSpeed:L,panOnScrollMode:j,panOnDrag:V,autoPanOnSelection:U,defaultViewport:A,translateExtent:H,minZoom:O,maxZoom:N,onSelectionContextMenu:h,preventScrolling:z,noDragClassName:At,noWheelClassName:Gr,noPanClassName:Cn,disableKeyboardA11y:jn,onViewportChange:Mn,isControlledViewport:!!Dt,children:f.jsxs(Y_,{children:[f.jsx(U_,{edgeTypes:t,onEdgeClick:o,onEdgeDoubleClick:s,onReconnect:Ee,onReconnectStart:Le,onReconnectEnd:tt,onlyRenderVisibleElements:b,onEdgeContextMenu:ee,onEdgeMouseEnter:te,onEdgeMouseMove:ne,onEdgeMouseLeave:re,reconnectRadius:se,defaultMarkerColor:C,noPanClassName:Cn,disableKeyboardA11y:jn,rfId:Rt}),f.jsx(eC,{style:x,type:y,component:k,containerStyle:m}),f.jsx("div",{className:"react-flow__edgelabel-renderer"}),f.jsx(j_,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:i,onNodeMouseEnter:l,onNodeMouseMove:a,onNodeMouseLeave:u,onNodeContextMenu:d,nodeClickDistance:G,onlyRenderVisibleElements:b,noPanClassName:Cn,noDragClassName:At,disableKeyboardA11y:jn,nodeExtent:at,rfId:Rt,nodesDraggable:Nl}),f.jsx("div",{className:"react-flow__viewport-portal"})]})})}w0.displayName="GraphView";const rC=I.memo(w0),oC=vg(),ih=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:o,height:i,fitView:s,fitViewOptions:l,minZoom:a=.5,maxZoom:u=2,nodeOrigin:d,nodeExtent:h,zIndexMode:c="basic"}={})=>{const p=new Map,y=new Map,x=new Map,k=new Map,m=r??t??[],v=n??e??[],g=d??[0,0],w=h??Ko;Pg(x,k,m);const{nodesInitialized:_}=du(v,p,y,{nodeOrigin:g,nodeExtent:w,zIndexMode:c});let S=[0,0,1];if(s&&o&&i){const E=ci(p,{filter:A=>!!((A.width||A.initialWidth)&&(A.height||A.initialHeight))}),{x:P,y:b,zoom:D}=Nc(E,o,i,a,u,(l==null?void 0:l.padding)??.1);S=[P,b,D]}return{rfId:"1",width:o??0,height:i??0,transform:S,nodes:v,nodesInitialized:_,nodeLookup:p,parentLookup:y,edges:m,edgeLookup:k,connectionLookup:x,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:a,maxZoom:u,translateExtent:Ko,nodeExtent:w,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Or.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:g,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:s??!1,fitViewOptions:l,fitViewResolver:null,connection:{...fg},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:oC,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:dg,zIndexMode:c,defaultEdgeOptions:void 0,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map,onNodesDelete:void 0,onEdgesDelete:void 0,onDelete:void 0,onBeforeDelete:void 0,onViewportChangeStart:void 0,onViewportChange:void 0,onViewportChangeEnd:void 0,onNodeDragStart:void 0,onNodeDrag:void 0,onNodeDragStop:void 0,onSelectionDragStart:void 0,onSelectionDrag:void 0,onSelectionDragStop:void 0,onMoveStart:void 0,onMove:void 0,onMoveEnd:void 0,onConnect:void 0,onConnectStart:void 0,onConnectEnd:void 0,onClickConnectStart:void 0,onClickConnectEnd:void 0}},iC=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:o,height:i,fitView:s,fitViewOptions:l,minZoom:a,maxZoom:u,nodeOrigin:d,nodeExtent:h,zIndexMode:c})=>yE((p,y)=>{async function x(){const{nodeLookup:k,panZoom:m,fitViewOptions:v,fitViewResolver:g,width:w,height:_,minZoom:S,maxZoom:E}=y();m&&(await JS({nodes:k,width:w,height:_,panZoom:m,minZoom:S,maxZoom:E},v),g==null||g.resolve(!0),p({fitViewResolver:null}))}return{...ih({nodes:e,edges:t,width:o,height:i,fitView:s,fitViewOptions:l,minZoom:a,maxZoom:u,nodeOrigin:d,nodeExtent:h,defaultNodes:n,defaultEdges:r,zIndexMode:c}),setNodes:k=>{const{nodeLookup:m,parentLookup:v,nodeOrigin:g,nodeExtent:w,elevateNodesOnSelect:_,fitViewQueued:S,zIndexMode:E,nodesSelectionActive:P}=y(),{nodesInitialized:b,hasSelectedNodes:D}=du(k,m,v,{nodeOrigin:g,nodeExtent:w,elevateNodesOnSelect:_,checkEquality:!0,zIndexMode:E}),A=P&&D;S&&b?(x(),p({nodes:k,nodesInitialized:b,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:A})):p({nodes:k,nodesInitialized:b,nodesSelectionActive:A})},setEdges:k=>{const{connectionLookup:m,edgeLookup:v}=y();Pg(m,v,k),p({edges:k})},setDefaultNodesAndEdges:(k,m)=>{if(k){const{setNodes:v}=y();v(k),p({hasDefaultNodes:!0})}if(m){const{setEdges:v}=y();v(m),p({hasDefaultEdges:!0})}},updateNodeInternals:k=>{const{triggerNodeChanges:m,nodeLookup:v,parentLookup:g,domNode:w,nodeOrigin:_,nodeExtent:S,debug:E,fitViewQueued:P,zIndexMode:b}=y(),{changes:D,updatedInternals:A}=SN(k,v,g,w,_,S,b);A&&(vN(v,g,{nodeOrigin:_,nodeExtent:S,zIndexMode:b}),P?(x(),p({fitViewQueued:!1,fitViewOptions:void 0})):p({}),(D==null?void 0:D.length)>0&&(E&&console.log("React Flow: trigger node changes",D),m==null||m(D)))},updateNodePositions:(k,m=!1)=>{const v=[];let g=[];const{nodeLookup:w,triggerNodeChanges:_,connection:S,updateConnection:E,onNodesChangeMiddlewareMap:P}=y();for(const[b,D]of k){const A=w.get(b),H=!!(A!=null&&A.expandParent&&(A!=null&&A.parentId)&&(D!=null&&D.position)),O={id:b,type:"position",position:H?{x:Math.max(0,D.position.x),y:Math.max(0,D.position.y)}:D.position,dragging:m};if(A&&S.inProgress&&S.fromNode.id===A.id){const N=er(A,S.fromHandle,J.Left,!0);E({...S,from:N})}H&&A.parentId&&v.push({id:b,parentId:A.parentId,rect:{...D.internals.positionAbsolute,width:D.measured.width??0,height:D.measured.height??0}}),g.push(O)}if(v.length>0){const{parentLookup:b,nodeOrigin:D}=y(),A=Pc(v,w,b,D);g.push(...A)}for(const b of P.values())g=b(g);_(g)},triggerNodeChanges:k=>{const{onNodesChange:m,setNodes:v,nodes:g,hasDefaultNodes:w,debug:_}=y();if(k!=null&&k.length){if(w){const S=DE(k,g);v(S)}_&&console.log("React Flow: trigger node changes",k),m==null||m(k)}},triggerEdgeChanges:k=>{const{onEdgesChange:m,setEdges:v,edges:g,hasDefaultEdges:w,debug:_}=y();if(k!=null&&k.length){if(w){const S=OE(k,g);v(S)}_&&console.log("React Flow: trigger edge changes",k),m==null||m(k)}},addSelectedNodes:k=>{const{multiSelectionActive:m,edgeLookup:v,nodeLookup:g,triggerNodeChanges:w,triggerEdgeChanges:_}=y();if(m){const S=k.map(E=>bn(E,!0));w(S);return}w(kr(g,new Set([...k]),!0)),_(kr(v))},addSelectedEdges:k=>{const{multiSelectionActive:m,edgeLookup:v,nodeLookup:g,triggerNodeChanges:w,triggerEdgeChanges:_}=y();if(m){const S=k.map(E=>bn(E,!0));_(S);return}_(kr(v,new Set([...k]))),w(kr(g,new Set,!0))},unselectNodesAndEdges:({nodes:k,edges:m}={})=>{const{edges:v,nodes:g,nodeLookup:w,triggerNodeChanges:_,triggerEdgeChanges:S}=y(),E=k||g,P=m||v,b=[];for(const A of E){if(!A.selected)continue;const H=w.get(A.id);H&&(H.selected=!1),b.push(bn(A.id,!1))}const D=[];for(const A of P)A.selected&&D.push(bn(A.id,!1));_(b),S(D)},setMinZoom:k=>{const{panZoom:m,maxZoom:v}=y();m==null||m.setScaleExtent([k,v]),p({minZoom:k})},setMaxZoom:k=>{const{panZoom:m,minZoom:v}=y();m==null||m.setScaleExtent([v,k]),p({maxZoom:k})},setTranslateExtent:k=>{var m;(m=y().panZoom)==null||m.setTranslateExtent(k),p({translateExtent:k})},resetSelectedElements:()=>{const{edges:k,nodes:m,triggerNodeChanges:v,triggerEdgeChanges:g,elementsSelectable:w}=y();if(!w)return;const _=m.reduce((E,P)=>P.selected?[...E,bn(P.id,!1)]:E,[]),S=k.reduce((E,P)=>P.selected?[...E,bn(P.id,!1)]:E,[]);v(_),g(S)},setNodeExtent:k=>{const{nodes:m,nodeLookup:v,parentLookup:g,nodeOrigin:w,elevateNodesOnSelect:_,nodeExtent:S,zIndexMode:E}=y();k[0][0]===S[0][0]&&k[0][1]===S[0][1]&&k[1][0]===S[1][0]&&k[1][1]===S[1][1]||(du(m,v,g,{nodeOrigin:w,nodeExtent:k,elevateNodesOnSelect:_,checkEquality:!1,zIndexMode:E}),p({nodeExtent:k}))},panBy:k=>{const{transform:m,width:v,height:g,panZoom:w,translateExtent:_}=y();return NN({delta:k,panZoom:w,transform:m,translateExtent:_,width:v,height:g})},setCenter:async(k,m,v)=>{const{width:g,height:w,maxZoom:_,panZoom:S}=y();if(!S)return!1;const E=typeof(v==null?void 0:v.zoom)<"u"?v.zoom:_;return await S.setViewport({x:g/2-k*E,y:w/2-m*E,zoom:E},{duration:v==null?void 0:v.duration,ease:v==null?void 0:v.ease,interpolate:v==null?void 0:v.interpolate}),!0},cancelConnection:()=>{p({connection:{...fg}})},updateConnection:k=>{p({connection:k})},reset:()=>p({...ih()})}},Object.is);function k0({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:r,initialWidth:o,initialHeight:i,initialMinZoom:s,initialMaxZoom:l,initialFitViewOptions:a,fitView:u,nodeOrigin:d,nodeExtent:h,zIndexMode:c,children:p}){const[y]=I.useState(()=>iC({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:o,height:i,fitView:u,minZoom:s,maxZoom:l,fitViewOptions:a,nodeOrigin:d,nodeExtent:h,zIndexMode:c}));return f.jsx(vE,{value:y,children:f.jsx(WE,{children:f.jsx(i_,{children:p})})})}function sC({children:e,nodes:t,edges:n,defaultNodes:r,defaultEdges:o,width:i,height:s,fitView:l,fitViewOptions:a,minZoom:u,maxZoom:d,nodeOrigin:h,nodeExtent:c,zIndexMode:p}){return I.useContext(vl)?f.jsx(f.Fragment,{children:e}):f.jsx(k0,{initialNodes:t,initialEdges:n,defaultNodes:r,defaultEdges:o,initialWidth:i,initialHeight:s,fitView:l,initialFitViewOptions:a,initialMinZoom:u,initialMaxZoom:d,nodeOrigin:h,nodeExtent:c,zIndexMode:p,children:e})}const lC={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function aC({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:o,nodeTypes:i,edgeTypes:s,onNodeClick:l,onEdgeClick:a,onInit:u,onMove:d,onMoveStart:h,onMoveEnd:c,onConnect:p,onConnectStart:y,onConnectEnd:x,onClickConnectStart:k,onClickConnectEnd:m,onNodeMouseEnter:v,onNodeMouseMove:g,onNodeMouseLeave:w,onNodeContextMenu:_,onNodeDoubleClick:S,onNodeDragStart:E,onNodeDrag:P,onNodeDragStop:b,onNodesDelete:D,onEdgesDelete:A,onDelete:H,onSelectionChange:O,onSelectionDragStart:N,onSelectionDrag:z,onSelectionDragStop:C,onSelectionContextMenu:T,onSelectionStart:$,onSelectionEnd:M,onBeforeDelete:L,connectionMode:j,connectionLineType:R=un.Bezier,connectionLineStyle:V,connectionLineComponent:U,connectionLineContainerStyle:Q,deleteKeyCode:B="Backspace",selectionKeyCode:X="Shift",selectionOnDrag:F=!1,selectionMode:Y=Qo.Full,panActivationKeyCode:q="Space",multiSelectionKeyCode:Z=Zo()?"Meta":"Control",zoomActivationKeyCode:G=Zo()?"Meta":"Control",snapToGrid:ee,snapGrid:te,onlyRenderVisibleElements:ne=!1,selectNodesOnDrag:re,nodesDraggable:se,autoPanOnNodeFocus:Ee,nodesConnectable:Le,nodesFocusable:tt,nodeOrigin:At=Xg,edgesFocusable:Gr,edgesReconnectable:Cn,elementsSelectable:jn=!0,defaultViewport:at=bE,minZoom:Rt=.5,maxZoom:Dt=2,translateExtent:Mn=Ko,preventScrolling:Nl=!0,nodeExtent:El,defaultMarkerColor:H0="#b1b1b7",zoomOnScroll:B0=!0,zoomOnPinch:V0=!0,panOnScroll:W0=!1,panOnScrollSpeed:U0=.5,panOnScrollMode:Y0=Hn.Free,zoomOnDoubleClick:X0=!0,panOnDrag:K0=!0,onPaneClick:Q0,onPaneMouseEnter:G0,onPaneMouseMove:q0,onPaneMouseLeave:Z0,onPaneScroll:J0,onPaneContextMenu:ey,paneClickDistance:ty=1,nodeClickDistance:ny=0,children:ry,onReconnect:oy,onReconnectStart:iy,onReconnectEnd:sy,onEdgeContextMenu:ly,onEdgeDoubleClick:ay,onEdgeMouseEnter:uy,onEdgeMouseMove:cy,onEdgeMouseLeave:dy,reconnectRadius:fy=10,onNodesChange:hy,onEdgesChange:py,noDragClassName:my="nodrag",noWheelClassName:gy="nowheel",noPanClassName:Oc="nopan",fitView:Fc,fitViewOptions:Hc,connectOnClick:yy,attributionPosition:vy,proOptions:xy,defaultEdgeOptions:wy,elevateNodesOnSelect:ky=!0,elevateEdgesOnSelect:Sy=!1,disableKeyboardA11y:Bc=!1,autoPanOnConnect:Ny,autoPanOnNodeDrag:Ey,autoPanOnSelection:_y=!0,autoPanSpeed:Cy,connectionRadius:jy,isValidConnection:My,onError:$y,style:Py,id:Vc,nodeDragThreshold:by,connectionDragThreshold:Iy,viewport:Ty,onViewportChange:zy,width:Ly,height:Ay,colorMode:Ry="light",debug:Dy,onScroll:yi,ariaLabelConfig:Oy,zIndexMode:Wc="basic",...Fy},Hy){const _l=Vc||"1",By=LE(Ry),Vy=I.useCallback(Uc=>{Uc.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),yi==null||yi(Uc)},[yi]);return f.jsx("div",{"data-testid":"rf__wrapper",...Fy,onScroll:Vy,style:{...Py,...lC},ref:Hy,className:ke(["react-flow",o,By]),id:Vc,role:"application",children:f.jsxs(sC,{nodes:e,edges:t,width:Ly,height:Ay,fitView:Fc,fitViewOptions:Hc,minZoom:Rt,maxZoom:Dt,nodeOrigin:At,nodeExtent:El,zIndexMode:Wc,children:[f.jsx(zE,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:p,onConnectStart:y,onConnectEnd:x,onClickConnectStart:k,onClickConnectEnd:m,nodesDraggable:se,autoPanOnNodeFocus:Ee,nodesConnectable:Le,nodesFocusable:tt,edgesFocusable:Gr,edgesReconnectable:Cn,elementsSelectable:jn,elevateNodesOnSelect:ky,elevateEdgesOnSelect:Sy,minZoom:Rt,maxZoom:Dt,nodeExtent:El,onNodesChange:hy,onEdgesChange:py,snapToGrid:ee,snapGrid:te,connectionMode:j,translateExtent:Mn,connectOnClick:yy,defaultEdgeOptions:wy,fitView:Fc,fitViewOptions:Hc,onNodesDelete:D,onEdgesDelete:A,onDelete:H,onNodeDragStart:E,onNodeDrag:P,onNodeDragStop:b,onSelectionDrag:z,onSelectionDragStart:N,onSelectionDragStop:C,onMove:d,onMoveStart:h,onMoveEnd:c,noPanClassName:Oc,nodeOrigin:At,rfId:_l,autoPanOnConnect:Ny,autoPanOnNodeDrag:Ey,autoPanSpeed:Cy,onError:$y,connectionRadius:jy,isValidConnection:My,selectNodesOnDrag:re,nodeDragThreshold:by,connectionDragThreshold:Iy,onBeforeDelete:L,debug:Dy,ariaLabelConfig:Oy,zIndexMode:Wc}),f.jsx(rC,{onInit:u,onNodeClick:l,onEdgeClick:a,onNodeMouseEnter:v,onNodeMouseMove:g,onNodeMouseLeave:w,onNodeContextMenu:_,onNodeDoubleClick:S,nodeTypes:i,edgeTypes:s,connectionLineType:R,connectionLineStyle:V,connectionLineComponent:U,connectionLineContainerStyle:Q,selectionKeyCode:X,selectionOnDrag:F,selectionMode:Y,deleteKeyCode:B,multiSelectionKeyCode:Z,panActivationKeyCode:q,zoomActivationKeyCode:G,onlyRenderVisibleElements:ne,defaultViewport:at,translateExtent:Mn,minZoom:Rt,maxZoom:Dt,preventScrolling:Nl,zoomOnScroll:B0,zoomOnPinch:V0,zoomOnDoubleClick:X0,panOnScroll:W0,panOnScrollSpeed:U0,panOnScrollMode:Y0,panOnDrag:K0,autoPanOnSelection:_y,onPaneClick:Q0,onPaneMouseEnter:G0,onPaneMouseMove:q0,onPaneMouseLeave:Z0,onPaneScroll:J0,onPaneContextMenu:ey,paneClickDistance:ty,nodeClickDistance:ny,onSelectionContextMenu:T,onSelectionStart:$,onSelectionEnd:M,onReconnect:oy,onReconnectStart:iy,onReconnectEnd:sy,onEdgeContextMenu:ly,onEdgeDoubleClick:ay,onEdgeMouseEnter:uy,onEdgeMouseMove:cy,onEdgeMouseLeave:dy,reconnectRadius:fy,defaultMarkerColor:H0,noDragClassName:my,noWheelClassName:gy,noPanClassName:Oc,rfId:_l,disableKeyboardA11y:Bc,nodeExtent:El,viewport:Ty,onViewportChange:zy,nodesDraggable:se}),f.jsx(PE,{onSelectionChange:O}),ry,f.jsx(_E,{proOptions:xy,position:vy}),f.jsx(EE,{rfId:_l,disableKeyboardA11y:Bc})]})})}var uC=Qg(aC);const cC=e=>{var t;return(t=e.domNode)==null?void 0:t.querySelector(".react-flow__edgelabel-renderer")};function dC({children:e}){const t=ie(cC);return t?Im.createPortal(e,t):null}function fC({dimensions:e,lineWidth:t,variant:n,className:r}){return f.jsx("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:ke(["react-flow__background-pattern",n,r])})}function hC({radius:e,className:t}){return f.jsx("circle",{cx:e,cy:e,r:e,className:ke(["react-flow__background-pattern","dots",t])})}var Yt;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(Yt||(Yt={}));const pC={[Yt.Dots]:1,[Yt.Lines]:1,[Yt.Cross]:6},mC=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function S0({id:e,variant:t=Yt.Dots,gap:n=20,size:r,lineWidth:o=1,offset:i=0,color:s,bgColor:l,style:a,className:u,patternClassName:d}){const h=I.useRef(null),{transform:c,patternId:p}=ie(mC,ye),y=r||pC[t],x=t===Yt.Dots,k=t===Yt.Cross,m=Array.isArray(n)?n:[n,n],v=[m[0]*c[2]||1,m[1]*c[2]||1],g=y*c[2],w=Array.isArray(i)?i:[i,i],_=k?[g,g]:v,S=[w[0]*c[2]+_[0]/2,w[1]*c[2]+_[1]/2],E=`${p}${e||""}`;return f.jsxs("svg",{className:ke(["react-flow__background",u]),style:{...a,...xl,"--xy-background-color-props":l,"--xy-background-pattern-color-props":s},ref:h,"data-testid":"rf__background",children:[f.jsx("pattern",{id:E,x:c[0]%v[0],y:c[1]%v[1],width:v[0],height:v[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${S[0]},-${S[1]})`,children:x?f.jsx(hC,{radius:g/2,className:d}):f.jsx(fC,{dimensions:_,lineWidth:o,variant:t,className:d})}),f.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${E})`})]})}S0.displayName="Background";const gC=I.memo(S0);function yC(){return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:f.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function vC(){return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:f.jsx("path",{d:"M0 0h32v4.2H0z"})})}function xC(){return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:f.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 wC(){return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:f.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 kC(){return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:f.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 Vi({children:e,className:t,...n}){return f.jsx("button",{type:"button",className:ke(["react-flow__controls-button",t]),...n,children:e})}const SC=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function N0({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:r=!0,fitViewOptions:o,onZoomIn:i,onZoomOut:s,onFitView:l,onInteractiveChange:a,className:u,children:d,position:h="bottom-left",orientation:c="vertical","aria-label":p}){const y=fe(),{isInteractive:x,minZoomReached:k,maxZoomReached:m,ariaLabelConfig:v}=ie(SC,ye),{zoomIn:g,zoomOut:w,fitView:_}=pi(),S=()=>{g(),i==null||i()},E=()=>{w(),s==null||s()},P=()=>{_(o),l==null||l()},b=()=>{y.setState({nodesDraggable:!x,nodesConnectable:!x,elementsSelectable:!x}),a==null||a(!x)},D=c==="horizontal"?"horizontal":"vertical";return f.jsxs(hi,{className:ke(["react-flow__controls",D,u]),position:h,style:e,"data-testid":"rf__controls","aria-label":p??v["controls.ariaLabel"],children:[t&&f.jsxs(f.Fragment,{children:[f.jsx(Vi,{onClick:S,className:"react-flow__controls-zoomin",title:v["controls.zoomIn.ariaLabel"],"aria-label":v["controls.zoomIn.ariaLabel"],disabled:m,children:f.jsx(yC,{})}),f.jsx(Vi,{onClick:E,className:"react-flow__controls-zoomout",title:v["controls.zoomOut.ariaLabel"],"aria-label":v["controls.zoomOut.ariaLabel"],disabled:k,children:f.jsx(vC,{})})]}),n&&f.jsx(Vi,{className:"react-flow__controls-fitview",onClick:P,title:v["controls.fitView.ariaLabel"],"aria-label":v["controls.fitView.ariaLabel"],children:f.jsx(xC,{})}),r&&f.jsx(Vi,{className:"react-flow__controls-interactive",onClick:b,title:v["controls.interactive.ariaLabel"],"aria-label":v["controls.interactive.ariaLabel"],children:x?f.jsx(kC,{}):f.jsx(wC,{})}),d]})}N0.displayName="Controls";I.memo(N0);function NC({id:e,x:t,y:n,width:r,height:o,style:i,color:s,strokeColor:l,strokeWidth:a,className:u,borderRadius:d,shapeRendering:h,selected:c,onClick:p}){const{background:y,backgroundColor:x}=i||{},k=s||y||x;return f.jsx("rect",{className:ke(["react-flow__minimap-node",{selected:c},u]),x:t,y:n,rx:d,ry:d,width:r,height:o,style:{fill:k,stroke:l,strokeWidth:a},shapeRendering:h,onClick:p?m=>p(m,e):void 0})}const EC=I.memo(NC),_C=e=>e.nodes.map(t=>t.id),la=e=>e instanceof Function?e:()=>e;function CC({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:r=5,nodeStrokeWidth:o,nodeComponent:i=EC,onClick:s}){const l=ie(_C,ye),a=la(t),u=la(e),d=la(n),h=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return f.jsx(f.Fragment,{children:l.map(c=>f.jsx(MC,{id:c,nodeColorFunc:a,nodeStrokeColorFunc:u,nodeClassNameFunc:d,nodeBorderRadius:r,nodeStrokeWidth:o,NodeComponent:i,onClick:s,shapeRendering:h},c))})}function jC({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:r,nodeBorderRadius:o,nodeStrokeWidth:i,shapeRendering:s,NodeComponent:l,onClick:a}){const{node:u,x:d,y:h,width:c,height:p}=ie(y=>{const x=y.nodeLookup.get(e);if(!x)return{node:void 0,x:0,y:0,width:0,height:0};const k=x.internals.userNode,{x:m,y:v}=x.internals.positionAbsolute,{width:g,height:w}=_t(k);return{node:k,x:m,y:v,width:g,height:w}},ye);return!u||u.hidden||!xg(u)?null:f.jsx(l,{x:d,y:h,width:c,height:p,style:u.style,selected:!!u.selected,className:r(u),color:t(u),borderRadius:o,strokeColor:n(u),strokeWidth:i,shapeRendering:s,onClick:a,id:u.id})}const MC=I.memo(jC);var $C=I.memo(CC);const PC=200,bC=150,IC=e=>!e.hidden,TC=e=>{const t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};let n=!1;for(const r of e.nodeLookup.values())if(!r.hidden){n=!0;break}return{viewBB:t,boundingRect:n?gg(ci(e.nodeLookup,{filter:IC}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},sh=(e,t)=>e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height,zC=(e,t)=>sh(e.viewBB,t.viewBB)&&sh(e.boundingRect,t.boundingRect)&&e.rfId===t.rfId&&e.panZoom===t.panZoom&&e.translateExtent===t.translateExtent&&e.flowWidth===t.flowWidth&&e.flowHeight===t.flowHeight&&e.ariaLabelConfig===t.ariaLabelConfig,LC="react-flow__minimap-desc";function E0({style:e,className:t,nodeStrokeColor:n,nodeColor:r,nodeClassName:o="",nodeBorderRadius:i=5,nodeStrokeWidth:s,nodeComponent:l,bgColor:a,maskColor:u,maskStrokeColor:d,maskStrokeWidth:h,position:c="bottom-right",onClick:p,onNodeClick:y,pannable:x=!1,zoomable:k=!1,ariaLabel:m,inversePan:v,zoomStep:g=1,offsetScale:w=5}){const _=fe(),S=I.useRef(null),{boundingRect:E,panZoom:P,viewBB:b,rfId:D,translateExtent:A,flowWidth:H,flowHeight:O,ariaLabelConfig:N}=ie(TC,zC),z=(e==null?void 0:e.width)??PC,C=(e==null?void 0:e.height)??bC,T=E.width/z,$=E.height/C,M=Math.max(T,$),L=M*z,j=M*C,R=w*M,V=E.x-(L-E.width)/2-R,U=E.y-(j-E.height)/2-R,Q=L+R*2,B=j+R*2,X=`${LC}-${D}`,F=I.useRef(0),Y=I.useRef();F.current=M,I.useEffect(()=>{const te=_.getState().panZoom;if(S.current&&te)return Y.current=IN({domNode:S.current,panZoom:te,getTransform:()=>_.getState().transform,getViewScale:()=>F.current}),()=>{var ne;(ne=Y.current)==null||ne.destroy()}},[P]),I.useEffect(()=>{var te;(te=Y.current)==null||te.update({translateExtent:A,width:H,height:O,inversePan:v,pannable:x,zoomStep:g,zoomable:k})},[x,k,v,g,A,H,O]);const q=p?te=>{var se;const[ne,re]=((se=Y.current)==null?void 0:se.pointer(te))||[0,0];p(te,{x:ne,y:re})}:void 0,Z=I.useCallback((te,ne)=>{const re=_.getState().nodeLookup.get(ne).internals.userNode;y==null||y(te,re)},[y]),G=y?Z:void 0,ee=m??N["minimap.ariaLabel"];return f.jsx(hi,{position:c,style:{...e,"--xy-minimap-background-color-props":typeof a=="string"?a:void 0,"--xy-minimap-mask-background-color-props":typeof u=="string"?u:void 0,"--xy-minimap-mask-stroke-color-props":typeof d=="string"?d:void 0,"--xy-minimap-mask-stroke-width-props":typeof h=="number"?h*M:void 0,"--xy-minimap-node-background-color-props":typeof r=="string"?r:void 0,"--xy-minimap-node-stroke-color-props":typeof n=="string"?n:void 0,"--xy-minimap-node-stroke-width-props":typeof s=="number"?s:void 0},className:ke(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:f.jsxs("svg",{width:z,height:C,viewBox:`${V} ${U} ${Q} ${B}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":X,ref:S,onClick:q,children:[ee&&f.jsx("title",{id:X,children:ee}),f.jsx($C,{onClick:G,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:i,nodeClassName:o,nodeStrokeWidth:s,nodeComponent:l}),f.jsx("path",{className:"react-flow__minimap-mask",d:`M${V-R},${U-R}h${Q+R*2}v${B+R*2}h${-Q-R*2}z
|
|
62
|
+
M${b.x},${b.y}h${b.width}v${b.height}h${-b.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}E0.displayName="MiniMap";I.memo(E0);const AC=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,RC={[Br.Line]:"right",[Br.Handle]:"bottom-right"};function DC({nodeId:e,position:t,variant:n=Br.Handle,className:r,style:o=void 0,children:i,color:s,minWidth:l=10,minHeight:a=10,maxWidth:u=Number.MAX_VALUE,maxHeight:d=Number.MAX_VALUE,keepAspectRatio:h=!1,resizeDirection:c,autoScale:p=!0,shouldResize:y,onResizeStart:x,onResize:k,onResizeEnd:m}){const v=e0(),g=typeof e=="string"?e:v,w=fe(),_=I.useRef(null),S=n===Br.Handle,E=ie(I.useCallback(AC(S&&p),[S,p]),ye),P=I.useRef(null),b=t??RC[n];I.useEffect(()=>{if(!(!_.current||!g))return P.current||(P.current=UN({domNode:_.current,nodeId:g,getStoreItems:()=>{const{nodeLookup:A,transform:H,snapGrid:O,snapToGrid:N,nodeOrigin:z,domNode:C}=w.getState();return{nodeLookup:A,transform:H,snapGrid:O,snapToGrid:N,nodeOrigin:z,paneDomNode:C}},onChange:(A,H)=>{const{triggerNodeChanges:O,nodeLookup:N,parentLookup:z,nodeOrigin:C}=w.getState(),T=[],$={x:A.x,y:A.y},M=N.get(g);if(M&&M.expandParent&&M.parentId){const L=M.origin??C,j=A.width??M.measured.width??0,R=A.height??M.measured.height??0,V={id:M.id,parentId:M.parentId,rect:{width:j,height:R,...wg({x:A.x??M.position.x,y:A.y??M.position.y},{width:j,height:R},M.parentId,N,L)}},U=Pc([V],N,z,C);T.push(...U),$.x=A.x?Math.max(L[0]*j,A.x):void 0,$.y=A.y?Math.max(L[1]*R,A.y):void 0}if($.x!==void 0&&$.y!==void 0){const L={id:g,type:"position",position:{...$}};T.push(L)}if(A.width!==void 0&&A.height!==void 0){const j={id:g,type:"dimensions",resizing:!0,setAttributes:c?c==="horizontal"?"width":"height":!0,dimensions:{width:A.width,height:A.height}};T.push(j)}for(const L of H){const j={...L,type:"position"};T.push(j)}O(T)},onEnd:({width:A,height:H})=>{const O={id:g,type:"dimensions",resizing:!1,dimensions:{width:A,height:H}};w.getState().triggerNodeChanges([O])}})),P.current.update({controlPosition:b,boundaries:{minWidth:l,minHeight:a,maxWidth:u,maxHeight:d},keepAspectRatio:h,resizeDirection:c,onResizeStart:x,onResize:k,onResizeEnd:m,shouldResize:y}),()=>{var A;(A=P.current)==null||A.destroy()}},[b,l,a,u,d,h,x,k,m,y]);const D=b.split("-");return f.jsx("div",{className:ke(["react-flow__resize-control","nodrag",...D,n,r]),ref:_,style:{...o,scale:E,...s&&{[S?"backgroundColor":"borderColor"]:s}},children:i})}I.memo(DC);function OC(){const e=new URLSearchParams(location.search).get("t");try{return e&&sessionStorage.setItem("illuminate-token",e),e??sessionStorage.getItem("illuminate-token")??""}catch{return e??""}}const Ur=OC(),Pt=e=>`/${e?`m/${encodeURIComponent(e)}`:""}?t=${encodeURIComponent(Ur)}`,Ws=e=>e.kind==="capture"?`/api/screens/${encodeURIComponent(e.capture)}.png?t=${encodeURIComponent(Ur)}`:`/api/repo-image?file=${encodeURIComponent(e.file)}&t=${encodeURIComponent(Ur)}`;class _0 extends Error{constructor(t,n=[]){super(t),this.problems=n}}async function ct(e,t,n){const r=await fetch(t,{method:e,headers:{"x-illuminate-token":Ur,"content-type":"application/json"},body:n===void 0?void 0:JSON.stringify(n)}),o=await r.json().catch(()=>({}));if(!r.ok)throw new _0(o.error??`Request failed (${r.status})`,o.problems??[]);return o}const bt={list:()=>ct("GET","/api/maps"),get:e=>ct("GET",`/api/maps/${encodeURIComponent(e)}`),make:(e,t)=>ct("POST","/api/maps",{question:e,parent:t}),offer:(e,t,n)=>ct("POST",`/api/maps/${encodeURIComponent(e)}/answers/${encodeURIComponent(t)}/offer`,{choice:n}),ask:(e,t,n)=>ct("POST",`/api/maps/${encodeURIComponent(e)}/ask`,{question:t,selection:n}),approve:(e,t)=>ct("POST",`/api/maps/${encodeURIComponent(e)}/fixes/${encodeURIComponent(t)}/approve`),reject:(e,t)=>ct("POST",`/api/maps/${encodeURIComponent(e)}/fixes/${encodeURIComponent(t)}/reject`),undo:(e,t)=>ct("POST",`/api/maps/${encodeURIComponent(e)}/fixes/${encodeURIComponent(t)}/undo`),code:(e,t,n="now")=>ct("GET",`/api/maps/${encodeURIComponent(e)}/code?item=${encodeURIComponent(t)}${n==="before"?"&when=before":""}`),answerCode:(e,t)=>ct("GET",`/api/maps/${encodeURIComponent(e)}/answers/${encodeURIComponent(t)}/code`),stop:()=>ct("POST","/api/stop")},FC=4e3;function C0(e,t,n){let r=null,o=!1,i=null;const s=()=>{r=new WebSocket(`${location.protocol==="https:"?"wss":"ws"}://${location.host}/ws?t=${encodeURIComponent(Ur)}`),r.onopen=()=>t(!0),r.onmessage=l=>{try{e(JSON.parse(String(l.data)))}catch{}},r.onclose=l=>{t(!1),l.code===FC?(o=!0,n()):o||(i=setTimeout(s,1e3))}};return s(),()=>{o=!0,i&&clearTimeout(i),r==null||r.close()}}const Ic=[{id:"vscode",name:"VS Code"},{id:"cursor",name:"Cursor"},{id:"windsurf",name:"Windsurf"},{id:"zed",name:"Zed"}];function HC(e,t,n,r){const o=`${t.replace(/\\/g,"/").replace(/\/+$/,"")}/${n}`;return`${e}://file${o.startsWith("/")?"":"/"}${o.split("/").map(encodeURIComponent).join("/").replace(/%3A/g,":")}:${r}`}const pu=(...e)=>e.filter(Boolean).join(" "),Tc=e=>{try{return localStorage.getItem(e)}catch{return null}},zc=(e,t)=>{try{localStorage.setItem(e,t)}catch{}};function BC(){const[e,t]=I.useState(()=>{var n;return((n=Ic.find(r=>r.id===Tc("illuminate-editor")))==null?void 0:n.id)??"vscode"});return[e,n=>{zc("illuminate-editor",n),t(n)}]}function j0(e,t){const[n,r]=I.useState(void 0);return I.useEffect(()=>{let o=!0;return e().then(i=>o&&r(i),()=>o&&r(null)),()=>{o=!1}},t),n}const VC=(e,t)=>`${e}:${t}`;function WC({block:e,root:t,editor:n,before:r}){const o=I.useRef(null);I.useEffect(()=>{const u=o.current,d=u==null?void 0:u.querySelector(".code-line.cited");u&&d&&d.offsetTop-u.offsetTop+d.offsetHeight>u.clientHeight&&(u.scrollTop=Math.max(0,d.offsetTop-u.offsetTop-48))},[e.file,e.start,e.cited.join(",")]);const i=new Set(e.cited),s=new Map(e.notes.map(u=>[u.line,u.note])),l=e.cited[0]??e.start,a=Ic.find(u=>u.id===n).name;return f.jsxs("figure",{className:"code-block",children:[f.jsxs("figcaption",{className:"code-cap",children:[f.jsxs("span",{className:"code-where",children:[e.name&&f.jsx("strong",{className:"code-name",children:e.name}),f.jsxs("span",{className:"code-file",children:[e.file,!e.whole&&`:${e.start}`]})]}),!r&&f.jsxs("a",{className:"code-open",href:HC(n,t,e.file,l),title:`Open ${e.file} at line ${l} in ${a}`,children:["Open in ",a]})]}),f.jsx("div",{className:"code-lines",ref:o,tabIndex:0,"aria-label":`Code from ${e.file}`,children:f.jsx("div",{className:"code-inner",children:e.lines.map((u,d)=>{const h=e.start+d;return f.jsxs("div",{"data-at":VC(e.file,h),className:pu("code-line",i.has(h)&&"cited",s.has(h)&&"noted"),children:[f.jsx("span",{className:"code-n",children:h}),f.jsx("span",{className:"code-t",children:u||" "}),s.has(h)&&f.jsx("span",{className:"code-note",children:s.get(h)})]},h)})})})]})}function M0({view:e,jump:t,before:n=!1,what:r}){const[o,i]=BC(),s=I.useRef(null);return I.useEffect(()=>{var u;if(!t)return;const l=[...((u=s.current)==null?void 0:u.querySelectorAll(".code-line"))??[]].find(d=>d.dataset.at===t.at);if(!l)return;l.scrollIntoView({block:"center",behavior:"smooth"}),l.classList.add("flash");const a=setTimeout(()=>l.classList.remove("flash"),1200);return()=>clearTimeout(a)},[t==null?void 0:t.at,t==null?void 0:t.n,e]),f.jsxs("div",{className:"code-view",ref:s,children:[e.blocks.map(l=>f.jsx(WC,{block:l,root:e.root,editor:o,before:n},`${l.file}:${l.start}`)),e.missing>0&&f.jsxs("p",{className:"warn small code-missing",children:[e.missing===1?`1 ${r} isn’t`:`${e.missing} ${r}s aren’t`," in ",n?"that version of the code":"the code any more",", so ",e.missing===1?"it isn’t":"they aren’t"," shown."]}),!n&&e.blocks.length>0&&f.jsxs("label",{className:"code-editor",children:["Links open in"," ",f.jsx("select",{value:o,onChange:l=>i(l.target.value),"aria-label":"Which editor code links open in",children:Ic.map(l=>f.jsx("option",{value:l.id,children:l.name},l.id))})]})]})}function UC({mapId:e,itemId:t,change:n,since:r,stamp:o,jump:i}){const[s,l]=I.useState(n==="removed"?"before":"now"),a=j0(()=>bt.code(e,t,s),[e,t,s,o]),u=n==="changed"&&f.jsxs("div",{className:"seg code-when",role:"group","aria-label":"Which version of the code to show",children:[f.jsxs("button",{className:pu("seg-btn",s==="before"&&"on"),"aria-pressed":s==="before",onClick:()=>l("before"),children:["As it was at ",r]}),f.jsx("button",{className:pu("seg-btn",s==="now"&&"on"),"aria-pressed":s==="now",onClick:()=>l("now"),children:"Now"})]});return a===void 0?u||null:!a||!a.blocks.length&&!a.missing?u?f.jsxs(f.Fragment,{children:[u,f.jsx("p",{className:"muted small",children:"No code to show for that version."})]}):null:f.jsxs(f.Fragment,{children:[u,f.jsx(M0,{view:a,jump:i,before:s==="before",what:"cited line"})]})}function YC({mapId:e,answerId:t,stamp:n}){const r=j0(()=>bt.answerCode(e,t),[e,t,n]);return!r||!r.blocks.length&&!r.missing?null:f.jsx(M0,{view:r,what:"note"})}const XC=()=>$0("illuminate-code"),KC=()=>$0("illuminate-diff");function $0(e){const[t,n]=I.useState(()=>Tc(e)==="show");return[t,r=>{zc(e,r?"show":"hide"),n(r)}]}const Co=(...e)=>e.filter(Boolean).join(" "),sn=e=>`${Math.max(0,Math.min(1,e))*100}%`;function ei(e,t){var r;const n=(r=e==null?void 0:e.screens)==null?void 0:r[t];return(n==null?void 0:n.status)==="confirmed"?n.show:null}function P0(e,t,n){for(const r of n){const o=ei(t,r),i=e.nodes.find(s=>s.id===r);if(o&&i)return{name:i.name,show:o}}return null}const QC=600;function b0({show:e,small:t=!1}){var a;const n=u=>e.page.regions.filter(d=>d.slot===u),r=(a=e.highlight)==null?void 0:a.trim().toLowerCase(),o=u=>{const d=u.id===e.region,h=p=>d&&p.text.trim().toLowerCase()===r,c=t?u.elements.filter(h):u.elements;return f.jsxs("div",{className:Co("wf-region",d&&"wf-on"),children:[f.jsx("span",{className:"wf-label",children:u.label}),f.jsx("span",{className:"wf-els",children:c.map((p,y)=>f.jsx("span",{className:Co("sk",`sk-${p.kind}`,h(p)&&"sk-mark"),title:p.text,children:p.kind==="image"?`▧ ${p.text}`:p.text},y))})]},u.id)},i=u=>n(u).length?f.jsx("div",{className:`wf-slot wf-${u}`,children:n(u).map(o)}):null,s=n("left").length+n("right").length,l=[n("left").length&&"minmax(0, 1fr)",(n("main").length||!s)&&"minmax(0, 2.6fr)",n("right").length&&"minmax(0, 1fr)"].filter(Boolean).join(" ");return f.jsxs("div",{className:Co("wf",t&&"wf-small"),children:[i("top"),(s>0||n("main").length>0)&&f.jsxs("div",{className:"wf-mid",style:{gridTemplateColumns:l},children:[i("left"),i("main"),i("right")]}),i("bottom")]})}function Lc({show:e,name:t}){var i;const[n,r]=I.useState(!1);if(e.kind==="capture"){const s=e.box,l=!!s&&!n,a=s?`${sn(s.x+s.w/2)} ${sn(s.y+s.h/2)}`:void 0;return f.jsxs("figure",{className:"screen",children:[f.jsx("div",{className:"screen-shot",style:{aspectRatio:`${e.width} / ${e.height}`},children:f.jsxs("div",{className:"screen-zoom",style:l?{transform:"scale(2.2)",transformOrigin:a}:void 0,children:[f.jsx("img",{src:Ws(e),alt:`The screen at “${t}”${e.title?`: ${e.title}`:""}`,loading:"lazy"}),s&&f.jsx("i",{className:"screen-mark","aria-hidden":"true",style:{left:sn(s.x),top:sn(s.y),width:sn(s.w),height:sn(s.h)}})]})}),f.jsxs("figcaption",{className:"muted small",children:["Screenshot of ",e.from,s&&f.jsxs(f.Fragment,{children:[" · ",f.jsx("button",{className:"linklike",onClick:()=>r(!n),children:n?"Zoom in":"Show the whole screen"})]})]})]})}if(e.kind==="wireframe")return f.jsxs("figure",{className:"screen",children:[f.jsx("div",{role:"img","aria-label":`Wireframe of ${e.page.name}, the page at “${t}”`,children:f.jsx(b0,{show:e})}),f.jsxs("figcaption",{className:"muted small",children:["Wireframe of ",e.page.name,", from ",e.page.file,". Where things sit is approximate; it isn’t a screenshot."]})]});if(e.kind==="image")return f.jsxs("figure",{className:"screen",children:[f.jsx("div",{className:"screen-image",children:f.jsx("img",{src:Ws(e),alt:`Image used at “${t}”`,loading:"lazy"})}),f.jsx("figcaption",{className:"muted small",children:e.file})]});const o=(i=e.highlight)==null?void 0:i.trim().toLowerCase();return f.jsxs("figure",{className:"screen",children:[f.jsx("div",{className:"screen-sketch",role:"img","aria-label":`Rough sketch of the screen at “${t}”`,children:e.elements.map((s,l)=>f.jsxs("span",{className:Co("sk",`sk-${s.kind}`,s.proposed&&"sk-proposed",o===s.text.trim().toLowerCase()&&"sk-mark"),title:s.proposed?"Proposed: not on the screen yet":void 0,children:[s.kind==="image"?`▧ ${s.text}`:s.text,s.proposed&&f.jsx("i",{className:"sk-new",children:"proposed"})]},l))}),f.jsxs("figcaption",{className:"muted small",children:[e.elements.every(s=>s.proposed)?`Rough sketch of a proposed screen (${e.file})`:`Rough sketch from ${e.file}, not a screenshot`,e.elements.some(s=>s.proposed)&&!e.elements.every(s=>s.proposed)&&" · violet parts are proposed"]})]})}function GC({show:e,name:t}){var r;if(e.kind==="sketch"){const o=(r=e.highlight)==null?void 0:r.trim().toLowerCase(),i=e.elements.slice(0,4);return f.jsxs("div",{className:"thumb thumb-sketch",role:"img","aria-label":`Rough sketch of the screen at “${t}”`,children:[i.map((s,l)=>f.jsx("span",{className:Co("sk",`sk-${s.kind}`,s.proposed&&"sk-proposed",o===s.text.trim().toLowerCase()&&"sk-mark"),children:s.kind==="image"?`▧ ${s.text}`:s.text},l)),e.elements.length>i.length&&f.jsxs("span",{className:"thumb-more",children:["+",e.elements.length-i.length," more"]})]})}if(e.kind==="wireframe")return f.jsx("div",{className:"thumb thumb-wire",role:"img","aria-label":`Wireframe of ${e.page.name}, the page at “${t}”`,children:f.jsx(b0,{show:e,small:!0})});if(e.kind==="image")return f.jsx("div",{className:"thumb thumb-image",children:f.jsx("img",{src:Ws(e),alt:`Image used at “${t}”`,loading:"lazy"})});const n=e.box;return f.jsx("div",{className:"thumb thumb-shot",children:f.jsx("img",{src:Ws(e),alt:`The screen at “${t}”`,loading:"lazy",style:n?{transform:"scale(1.8)",transformOrigin:`${sn(n.x+n.w/2)} ${sn(n.y+n.h/2)}`}:void 0})})}const lh=/^\s*(```|~~~)/,qC=/^\s{0,3}#{1,6}\s+(.*?)\s*#*\s*$/,ZC=/^\s*[-*+•]\s+(.*)$/,JC=/^\s*(\d{1,4})[.)]\s+(.*)$/;function e2(e){const t=e.replace(/\r\n?/g,`
|
|
63
|
+
`).split(`
|
|
64
|
+
`),n=[];let r=[];const o=()=>{r.length&&n.push({kind:"p",text:r.join(`
|
|
65
|
+
`)}),r=[]};for(let i=0;i<t.length;i++){const s=t[i];if(lh.test(s)){o();const h=[];for(i++;i<t.length&&!lh.test(t[i]);i++)h.push(t[i]);n.push({kind:"code",text:h.join(`
|
|
66
|
+
`)});continue}if(!s.trim()){o();continue}const l=qC.exec(s);if(l){o(),n.push({kind:"h",text:l[1]});continue}const a=ZC.exec(s),u=a?null:JC.exec(s);if(a||u){o();const h=a?"ul":"ol",c=n[n.length-1],p=a?a[1]:u[2];c&&c.kind===h?c.items.push(p):n.push(h==="ul"?{kind:h,items:[p]}:{kind:h,items:[p],start:Number(u[1])});continue}const d=n[n.length-1];if(!r.length&&d&&(d.kind==="ul"||d.kind==="ol")&&/^\s+\S/.test(s)){d.items[d.items.length-1]+=` ${s.trim()}`;continue}r.push(s)}return o(),n}const t2=new RegExp("(`+)([^`]+?)\\1|\\*\\*(.+?)\\*\\*|__(.+?)__|\\*(?!\\s)(.+?)\\*|(?<![\\w])_(?!\\s)(.+?)_(?![\\w])|\\[([^\\]]+)\\]\\(([^)\\s]+)\\)","g");function An(e,t="i"){const n=[];let r=0,o=0;const i=s=>{s.split(`
|
|
67
|
+
`).forEach((l,a)=>{a>0&&n.push(f.jsx("br",{},`${t}-br${o++}`)),l&&n.push(l)})};for(const s of e.matchAll(t2)){i(e.slice(r,s.index));const l=`${t}-${o++}`;if(s[2]!==void 0)n.push(f.jsx("code",{children:s[2]},l));else if(s[3]!==void 0||s[4]!==void 0)n.push(f.jsx("strong",{children:An(s[3]??s[4],l)},l));else if(s[5]!==void 0||s[6]!==void 0)n.push(f.jsx("em",{children:An(s[5]??s[6],l)},l));else if(s[7]!==void 0){const a=s[8];n.push(/^https?:\/\//i.test(a)?f.jsx("a",{href:a,target:"_blank",rel:"noreferrer",children:An(s[7],l)},l):f.jsx("span",{children:An(s[7],l)},l))}r=s.index+s[0].length}return i(e.slice(r)),n}function ti({text:e,className:t}){const n=e2(e);return n.length?f.jsx("div",{className:t?`md ${t}`:"md",children:n.map((r,o)=>{const i=`b${o}`;if(r.kind==="p")return f.jsx("p",{children:An(r.text,i)},i);if(r.kind==="h")return f.jsx("p",{className:"md-h",children:An(r.text,i)},i);if(r.kind==="code")return f.jsx("pre",{children:f.jsx("code",{children:r.text})},i);const s=r.items.map((l,a)=>f.jsx("li",{children:An(l,`${i}-${a}`)},`${i}-${a}`));return r.kind==="ul"?f.jsx("ul",{children:s},i):f.jsx("ol",{start:r.start,children:s},i)})}):null}const n2=/^About the walkthrough step “([^”]*)”: /,r2=(e,t)=>`About the walkthrough step “${e}”: ${t}`;function o2(e){const t=n2.exec(e);return t?{question:e.slice(t[0].length),step:t[1]}:{question:e,step:null}}const lr=()=>({nodes:[],edges:[],absences:[]}),po=e=>e.nodes.length+e.edges.length+e.absences.length,i2=e=>({mapId:e,phase:"loading",meta:null,map:null,report:null,job:null,error:null,answers:[],shown:null,selection:lr(),tour:null,peek:!1,views:[],viewIndex:-1,fixes:{},fresh:[],hidden:[],connected:!1}),s2=e=>e.views[e.viewIndex]??null;function gi(e){if(!e.map)return[];const t=new Set([...e.map.areas,...e.map.nodes,...e.map.edges,...e.map.absences].map(n=>n.id));return e.answers.flatMap(n=>{const r=n.added.filter(o=>t.has(o));return r.length?[{answerId:n.id,question:n.question,ids:r,visible:!e.hidden.includes(n.id)}]:[]})}const l2=e=>gi(e).flatMap(t=>t.ids);function I0(e){if(!e.map)return null;const t=new Set(gi(e).filter(o=>!o.visible).flatMap(o=>o.ids));if(!t.size)return e.map;const n=e.map.nodes.filter(o=>!t.has(o.id)),r=new Set(n.map(o=>o.id));return{...e.map,areas:e.map.areas.filter(o=>!t.has(o.id)),nodes:n,edges:e.map.edges.filter(o=>!t.has(o.id)&&r.has(o.from)&&r.has(o.to)),absences:e.map.absences.filter(o=>!t.has(o.id)&&(!o.between||r.has(o.between.from)&&r.has(o.between.to)))}}function a2(e,t){if(!t)return e;const n=(r,o)=>r.filter(i=>o.some(s=>s.id===i));return{nodes:n(e.nodes,t.nodes),edges:n(e.edges,t.edges),absences:n(e.absences,t.absences)}}function u2(e,t){var s,l,a;const n=e.tour[t];if(!n)return null;const r=e.nodes.filter(u=>{var d;return(d=n.focus.areas)==null?void 0:d.includes(u.area)}).map(u=>u.id),o=[...n.focus.nodes??[],...n.focus.edges??[],...n.focus.absences??[],...r],i=(n.focus.edges??[]).length||(n.focus.absences??[]).length?[]:T0(e,new Set(o));return{focus:((s=n.focus.nodes)==null?void 0:s[0])??((l=n.focus.edges)==null?void 0:l[0])??((a=n.focus.absences)==null?void 0:a[0])??null,highlight:[...new Set([...o,...i])]}}function T0(e,t){return e.edges.filter(n=>t.has(n.from)&&t.has(n.to)).map(n=>n.id)}function ah(e,t){const n=[...t.moves.highlight,...t.added],r=e?[...new Set([...n,...T0(e,new Set(n))])]:n;return r.length||t.moves.focus?{focus:t.moves.focus??r[0]??null,highlight:r}:null}function ir(e,t){if(!t)return e;const n=[...e.views.slice(0,e.viewIndex+1),t].slice(-50);return{...e,views:n,viewIndex:n.length-1}}function uh(e,t,n){const r={...t};for(const o of e){if(!o.fix||r[o.fix.id]&&!n)continue;const i=n?n[o.fix.id]:{status:"proposed"};r[o.fix.id]={proposal:o.fix,answerId:o.id,status:(i==null?void 0:i.status)??"rejected",problems:[],edgeId:(i==null?void 0:i.edgeId)??null,closed:(i==null?void 0:i.closed)??[],undoable:(i==null?void 0:i.undoable)??!0}}return r}function c2(e,t){var n;switch(t.type){case"loaded":{const r=t.payload,o=r.map?"ready":r.job?"making":r.failure?"failed":"missing";return{...e,phase:o,meta:r.meta,map:r.map,report:r.report,job:r.job,error:((n=r.failure)==null?void 0:n.error)??null,answers:r.answers,shown:null,fixes:uh(r.answers,e.fixes,r.fixes??{})}}case"missing":return{...e,phase:"missing"};case"connected":return{...e,connected:t.value};case"event":{const r=t.event;if(r.mapId!==e.mapId)return e;if(r.type==="job")return r.status==="started"?{...e,job:{kind:r.job,question:r.question,progress:[]},error:null,phase:r.job==="make"?"making":e.phase}:r.status==="failed"?{...e,job:null,error:r.error??"Something went wrong.",phase:r.job==="make"&&!e.map?"failed":e.phase}:{...e,job:null};if(r.type==="progress")return e.job?{...e,job:{...e.job,progress:[...e.job.progress,r.text].slice(-200)}}:e;if(r.type==="map"){const o=s=>s.filter(l=>r.map.nodes.some(a=>a.id===l)||r.map.edges.some(a=>a.id===l)||r.map.absences.some(a=>a.id===l)),i={nodes:o(e.selection.nodes),edges:o(e.selection.edges),absences:o(e.selection.absences)};return{...e,phase:"ready",meta:r.meta,map:r.map,report:r.report,selection:i}}if(r.type==="answer"){const o=[...e.answers,r.answer],i={...e,answers:o,shown:r.answer.id,tour:null,peek:!1,fresh:r.answer.added,fixes:uh([r.answer],e.fixes,void 0)};return ir(i,ah(e.map,r.answer))}if(r.type==="answerUpdate")return{...e,answers:e.answers.map(o=>o.id===r.answer.id?r.answer:o)};if(r.type==="fix"){const o=e.fixes[r.fixId];if(!o)return e;const i=r.status,s={...e.fixes,[r.fixId]:{...o,status:i,problems:r.problems??[],edgeId:r.edgeId??o.edgeId,closed:r.closed??o.closed,undoable:r.status==="applied"?!0:o.undoable}},l={...e,fixes:s};if(r.status==="applied"&&r.edgeId){const a=o.proposal.connects;return ir(l,{focus:r.edgeId,highlight:[r.edgeId,...a?[a.from,a.to]:[]]})}return l}return e}case"select":{const r=e.selection[t.kind],o=r.includes(t.id),i=t.additive?{...e.selection,[t.kind]:o?r.filter(s=>s!==t.id):[...r,t.id]}:{...lr(),[t.kind]:o&&po(e.selection)===1?[]:[t.id]};return{...e,selection:i}}case"selectMany":return{...e,selection:t.selection};case"clearSelection":return{...e,selection:lr()};case"tour":{if(t.stop===null||!e.map)return{...e,tour:null,peek:!1};const r=Math.max(0,Math.min(t.stop,e.map.tour.length-1));return ir({...e,tour:r,selection:lr()},u2(e.map,r))}case"peek":{if(!t.open)return{...e,peek:!1};const r=e.answers[e.answers.length-1];return r?{...e,peek:!0,shown:e.shown??r.id}:e}case"focus":{if(!e.map)return e;const r=e.map.nodes.some(o=>o.id===t.id)?"nodes":e.map.edges.some(o=>o.id===t.id)?"edges":e.map.absences.some(o=>o.id===t.id)?"absences":null;return r?ir({...e,tour:null,peek:!1,selection:{...lr(),[r]:[t.id]}},{focus:t.id,highlight:[t.id]}):e}case"back":return e.viewIndex>0?{...e,viewIndex:e.viewIndex-1}:e.viewIndex===0?{...e,viewIndex:-1}:e;case"forward":return e.viewIndex<e.views.length-1?{...e,viewIndex:e.viewIndex+1}:e;case"show":{const r=e.answers.find(o=>o.id===t.answerId);return ir({...e,shown:t.answerId,tour:null,peek:!1},r?ah(e.map,r):null)}case"overview":return ir({...e,shown:null,tour:null,peek:!1,selection:lr(),fresh:[]},{focus:null,highlight:[]});case"layer":case"allLayers":{const r=t.type==="layer"?[t.answerId]:gi(e).map(s=>s.answerId),o=t.visible?e.hidden.filter(s=>!r.includes(s)):[...new Set([...e.hidden,...r])],i={...e,hidden:o};return{...i,selection:a2(e.selection,I0(i))}}case"fixStatus":{const r=e.fixes[t.fixId];return r?{...e,fixes:{...e.fixes,[t.fixId]:{...r,status:t.status,problems:t.problems??r.problems}}}:e}case"error":return{...e,error:t.message}}}const Yr=(...e)=>e.filter(Boolean).join(" ");function kt(e,t){const n=e.nodes.find(s=>s.id===t);if(n)return n.name;const r=e.edges.find(s=>s.id===t);if(r)return`${kt(e,r.from)} → ${kt(e,r.to)}`;const o=e.absences.find(s=>s.id===t);if(o)return o.claim;const i=e.areas.find(s=>s.id===t);return(i==null?void 0:i.label)??t}const d2={add:{pending:"Proposed: this isn’t in the code yet.",done:"This was proposed, and the code now has it."},change:{pending:"Proposed: this code would change.",done:"This was proposed to change, and the code here has changed since."},remove:{pending:"Proposed: this code would be removed.",done:"This was proposed for removal, and it’s no longer in the code."}},f2={added:"New since",changed:"Changed since",removed:"Removed since"};function mu(e,t){return e?e.nodes[t]??e.edges[t]??(e.absences[t]?{status:e.absences[t].status,reasons:e.absences[t].reasons}:null):null}function He({eyebrow:e,title:t,children:n,tone:r,className:o}){return f.jsxs("section",{className:Yr("card",r&&`card-${r}`,o),children:[e&&f.jsx("div",{className:"eyebrow",children:e}),t&&f.jsx("h2",{className:"card-title",children:t}),n]})}function h2({map:e,ids:t,onPick:n}){return t.length?f.jsx("div",{className:"chips",children:t.map(({id:r,status:o})=>f.jsxs("button",{className:Yr("chip",o==="proposed"?"chip-proposed":o!=="confirmed"&&"chip-unconfirmed"),onClick:()=>n(r),title:o==="confirmed"?"Confirmed against the code":o==="proposed"?"Part of a proposal, not in the code":"Couldn't confirm against the code",children:[f.jsx("span",{className:o==="confirmed"?"tick":o==="proposed"?"pmark":"qmark",children:o==="confirmed"?"✓":o==="proposed"?"+":"?"}),kt(e,r)]},r))}):null}function ch({lines:e,working:t}){const n=e.slice(-8);return f.jsxs("ul",{className:"progress",children:[n.map((r,o)=>f.jsxs("li",{className:Yr(t&&o===n.length-1&&"running"),children:[f.jsx("span",{className:"ic",children:t&&o===n.length-1?"…":"✓"}),r]},`${o}-${r}`)),!n.length&&t&&f.jsxs("li",{className:"running",children:[f.jsx("span",{className:"ic",children:"…"}),"Starting"]})]})}function p2({fix:e,onApprove:t,onReject:n,onUndo:r,map:o}){const i=e.proposal,s=i.files.filter(l=>l.uncommitted);return e.status==="applied"?f.jsxs(He,{eyebrow:"Fix applied · re-checked",tone:"ok",children:[f.jsxs("ul",{className:"progress",children:[f.jsxs("li",{children:[f.jsx("span",{className:"ic",children:"✓"}),"Changed ",i.files.length," ",i.files.length===1?"file":"files",": ",i.files.map(l=>l.file).join(", ")]}),e.edgeId&&f.jsxs("li",{children:[f.jsx("span",{className:"ic",children:"✓"}),"New confirmed connection: ",kt(o,e.edgeId)]}),e.closed.length>0&&f.jsxs("li",{children:[f.jsx("span",{className:"ic",children:"✓"}),"Closed: ",e.closed.length===1?"the missing connection":`${e.closed.length} missing connections`]})]}),e.undoable?f.jsx("div",{className:"btns",children:f.jsx("button",{className:"btn",onClick:r,children:"Undo this fix"})}):f.jsx("p",{className:"muted small",children:"Undo ended when illuminate stopped. Use git to reverse it."})]}):e.status==="rejected"||e.status==="undone"?f.jsxs(He,{eyebrow:e.status==="undone"?"Fix undone":"Fix rejected",children:[f.jsx(ti,{text:i.summary,className:"muted"}),e.status==="undone"&&f.jsx("div",{className:"btns",children:f.jsx("button",{className:"btn",onClick:t,children:"Apply it again"})})]}):f.jsxs(He,{eyebrow:`Proposed fix · ${i.files.length} ${i.files.length===1?"file":"files"} · nothing changed yet`,tone:"ai",children:[f.jsx(ti,{text:i.summary}),i.connects&&f.jsx("p",{className:"muted small",children:"The green dashed arrow is the connection it adds."}),f.jsx("pre",{className:"diff",children:i.diff.split(`
|
|
68
|
+
`).map((l,a)=>f.jsxs("span",{className:l.startsWith("+ ")?"add":l.startsWith("- ")?"del":l.includes(" · ")?"file":"",children:[l,`
|
|
69
|
+
`]},a))}),s.length>0?f.jsxs("p",{className:"warn small",children:["⚠ ",s.map(l=>l.file).join(", ")," ",s.length===1?"has":"have"," uncommitted changes. They'll be kept; the fix applies on top."]}):null,e.problems.length>0&&f.jsx("ul",{className:"problems",children:e.problems.map(l=>f.jsx("li",{children:l},l))}),f.jsxs("div",{className:"btns",children:[f.jsx("button",{className:"btn primary",disabled:e.status==="applying",onClick:t,children:e.status==="applying"?"Applying…":"Approve"}),f.jsx("button",{className:"btn",onClick:n,children:"Reject"})]}),f.jsx("p",{className:"muted small",children:"Won't apply if these files change first."})]})}function m2({state:e,dispatch:t,onFix:n,onFocus:r,onOffer:o,composer:i}){const s=e.map,l=e.job,a=I.useRef(null);if(I.useEffect(()=>{const h=a.current;h&&(h.scrollTop=h.scrollHeight)},[e.answers.length,l==null?void 0:l.progress.length,!!l]),e.phase==="loading")return f.jsx("aside",{className:"panel",children:f.jsx("div",{className:"panel-scroll",children:f.jsx(He,{children:f.jsx("p",{className:"muted",children:"Loading…"})})})});if(e.phase==="missing")return f.jsx("aside",{className:"panel",children:f.jsx("div",{className:"panel-scroll",children:f.jsx(He,{title:"No map here",children:f.jsx("p",{className:"muted",children:"This map isn't in this repo."})})})});if(!s)return f.jsx("aside",{className:"panel",children:f.jsxs("div",{className:"panel-scroll",children:[l&&f.jsx(He,{eyebrow:"Making your map",title:l.question,tone:"ai",children:f.jsx(ch,{lines:l.progress,working:!0})}),e.phase==="failed"&&f.jsx(He,{title:"The map couldn't be made",tone:"dead",children:f.jsx("p",{children:e.error})})]})});[...e.selection.nodes,...e.selection.edges,...e.selection.absences];const u=gi(e),d=u.length>0&&u.every(h=>!h.visible);return f.jsxs("aside",{className:"panel","aria-label":"Conversation about this map",children:[f.jsxs("header",{className:"panel-head",children:[f.jsx("h2",{className:"panel-title",children:"Conversation"}),u.length>0&&f.jsx("button",{className:"link-btn small",onClick:()=>t({type:"allLayers",visible:d}),children:d?"Show everything":"Show the original map"}),f.jsx("button",{className:"card-close","aria-label":"Close the conversation",title:"Close (Esc). It stays here to reopen.",onClick:()=>t(e.tour!==null?{type:"peek",open:!1}:{type:"overview"}),children:"×"})]}),f.jsxs("div",{className:"panel-scroll",ref:a,children:[e.error&&f.jsxs("div",{className:"banner banner-dead",role:"alert",children:[e.error,f.jsx("button",{className:"link-btn",onClick:()=>t({type:"error",message:null}),children:"Dismiss"})]}),e.answers.map(h=>f.jsx(g2,{answer:h,state:e,dispatch:t,onFix:n,onFocus:r,onOffer:o},h.id)),(l==null?void 0:l.kind)==="ask"&&f.jsxs("article",{className:"turn",children:[f.jsx(z0,{question:l.question}),f.jsx(He,{eyebrow:"Claude is working",tone:"ai",children:f.jsx(ch,{lines:l.progress,working:!0})})]}),!e.answers.length&&!l&&f.jsx("p",{className:"muted small thread-empty",children:"Ask anything about this map. Click a box or arrow first to ask about it."})]}),f.jsx("footer",{className:"panel-foot",children:i})]})}function z0({question:e,about:t}){const{question:n,step:r}=o2(e),o=[r&&`the step “${r}”`,t].filter(Boolean);return f.jsxs("div",{className:"you",children:[f.jsx("p",{className:"you-q",children:n}),o.length>0&&f.jsxs("span",{className:"you-about",children:["About ",o.join(", ")]})]})}function g2({answer:e,state:t,dispatch:n,onFix:r,onFocus:o,onOffer:i}){const s=t.map,l=e.fix?t.fixes[e.fix.id]??null:null,a=e.id===t.shown&&t.tour===null,u=[...e.selection.nodes??[],...e.selection.edges??[],...e.selection.absences??[]].map(x=>kt(s,x)).join(", "),d=gi(t).find(x=>x.answerId===e.id),h=e.problems.filter(x=>x.startsWith("The proposed fix")),c=e.problems.filter(x=>!x.startsWith("The proposed fix")),p=e.refs.filter(x=>{var k;return x.status!=="unknown"&&((k=mu(t.report,x.id))==null?void 0:k.status)==="unconfirmed"}).map(x=>x.id),y=e.moves.highlight.length>0||!!e.moves.focus||e.added.length>0||(e.screens??[]).length>0;return f.jsxs("article",{className:"turn",children:[f.jsx(z0,{question:e.question,about:u||void 0}),e.offer?f.jsx(y2,{answer:e,busy:!!t.job,onOffer:i}):f.jsxs("section",{className:Yr("card","reply",a&&"card-focus"),children:[f.jsxs("div",{className:"reply-meta",children:[f.jsx("span",{children:e.source==="map"?"From the map":"Looked in the code"}),y&&(a?f.jsx("span",{className:"reply-lit",children:"Lit on the map"}):f.jsx("button",{className:"link-btn small",onClick:()=>n({type:"show",answerId:e.id}),children:"Show on the map"}))]}),f.jsx(ti,{text:e.concept,className:"depth-text"}),(e.notes??[]).length>0&&f.jsx(YC,{mapId:t.mapId,answerId:e.id,stamp:t.report}),(e.screens??[]).map(x=>{const k=ei(t.report,x);return k?f.jsx(Lc,{show:k,name:kt(s,x)},x):null}),p.length>0&&f.jsxs("p",{className:"warn small reply-warn",children:["Relies on ",p.length===1?"1 thing":`${p.length} things`," the checker couldn't confirm:"," ",p.map((x,k)=>f.jsxs("span",{children:[k>0&&", ",f.jsx("button",{className:"link-btn small",title:"Show it on the map",onClick:()=>o(x),children:kt(s,x)})]},x))]}),d&&f.jsxs("div",{className:"reply-added",children:[f.jsxs("span",{children:["Added ",d.ids.length," to the map"]}),f.jsx("button",{className:"link-btn small",onClick:()=>n({type:"layer",answerId:e.id,visible:!d.visible}),children:d.visible?"Hide":"Show"})]}),c.length>0&&f.jsxs("details",{className:"problems-box",children:[f.jsxs("summary",{children:[c.length," thing",c.length===1?"":"s"," Claude found but couldn't confirm or show"]}),f.jsx("ul",{className:"problems",children:c.map(x=>f.jsx("li",{children:x},x))})]})]}),l&&f.jsx(p2,{fix:l,map:s,onApprove:()=>r(l.proposal.id,"approve"),onReject:()=>r(l.proposal.id,"reject"),onUndo:()=>r(l.proposal.id,"undo")}),h.length>0&&f.jsxs(He,{eyebrow:"The proposed fix can't be applied",tone:"dead",children:[f.jsx("ul",{className:"problems",children:h.map(x=>f.jsx("li",{children:x.replace("The proposed fix can't be applied: ","")},x))}),f.jsx("p",{className:"muted small",children:"Ask again, or ask for a smaller change."})]})]})}function y2({answer:e,busy:t,onOffer:n}){const r=e.offer;return r.status==="mapped"?f.jsxs(He,{eyebrow:"A different part of the app",children:[f.jsx("p",{className:"muted",children:"You made a new map for this."}),r.mapId&&f.jsx("div",{className:"btns",children:f.jsx("a",{className:"btn primary",href:Pt(r.mapId),children:"Open it"})})]}):r.status==="answered"?f.jsx(He,{eyebrow:"A different part of the app",children:f.jsx("p",{className:"muted",children:"Answered in words, below."})}):f.jsxs(He,{eyebrow:"A different part of the app",tone:"ai",children:[f.jsx("p",{children:"This is about a different part of the app than this map shows."}),r.existing&&f.jsxs("p",{children:["There's already a map for it: “",r.existing.question,"”."]}),f.jsxs("div",{className:"btns",children:[r.existing&&f.jsx("a",{className:"btn primary",href:Pt(r.existing.id),children:"Open that map"}),f.jsx("button",{className:r.existing?"btn":"btn primary",onClick:()=>n(e.id,"map"),children:"Make a new map for this"}),f.jsx("button",{className:"btn",disabled:t,onClick:()=>n(e.id,"words"),title:t?"Claude is still working on this map":void 0,children:"Just answer in words"})]})]})}function v2({mapId:e,map:t,report:n,ids:r,onClose:o}){var b,D,A,H,O;const[i,s]=XC(),[l,a]=KC(),[u,d]=I.useState(null),h=f.jsx("button",{className:"card-close","aria-label":"Close",title:"Close (Esc)",onClick:o,children:"×"});if(r.length>1)return f.jsxs(He,{eyebrow:`Asking about ${r.length} things`,className:"card-selected",children:[h,f.jsx(h2,{map:t,ids:r.map(N=>{var z;return{id:N,status:((z=mu(n,N))==null?void 0:z.status)??"unknown"}}),onPick:()=>{}})]});const c=r[0],p=t.nodes.find(N=>N.id===c),y=t.edges.find(N=>N.id===c),x=t.absences.find(N=>N.id===c),k=mu(n,c),m=(p==null?void 0:p.evidence)??(y==null?void 0:y.evidence)??[],v=k&&"evidence"in k&&k.evidence?k.evidence:[],g=p?"Step":y?"Connection":"Missing connection",w=(k==null?void 0:k.proposal)??null,_=(D=(b=p??y)==null?void 0:b.proposed)==null?void 0:D.note,S=k&&"change"in k?k.change??null:null,E=((H=(A=n==null?void 0:n.since)==null?void 0:A.commit)==null?void 0:H.slice(0,7))??"the commit this map is compared with",P=x?(n==null?void 0:n.absences[x.id])??null:null;return f.jsxs(He,{eyebrow:g,title:kt(t,c),tone:x?"dead":void 0,className:"card-selected",children:[h,((O=p==null?void 0:p.explain)==null?void 0:O.concept)&&f.jsx(ti,{text:p.explain.concept,className:"depth-text"}),p&&ei(n,p.id)&&f.jsx(Lc,{show:ei(n,p.id),name:p.name}),w&&f.jsxs("div",{className:Yr("proposal-note",`proposal-note-${w.state}`),children:[f.jsx("strong",{children:d2[w.kind][w.state]}),_&&f.jsxs(f.Fragment,{children:[" ",_]})]}),S&&f.jsxs("div",{className:Yr("change-note",`change-note-${S.kind}`),children:[f.jsxs("div",{className:"change-head",children:[f.jsxs("span",{children:[f.jsxs("strong",{children:[f2[S.kind]," ",E,"."]}),S.kind==="changed"&&!S.diff&&" A line it cites wasn’t there then.",S.kind==="removed"&&" It was in the code then and is gone now.",S.diff&&f.jsx(x2,{diff:S.diff})]}),S.diff&&f.jsx("button",{className:"link-btn small",onClick:()=>a(!l),children:l?"Hide what changed":"Show what changed"})]}),S.diff&&l&&f.jsx("pre",{className:"diff",children:S.diff.map((N,z)=>f.jsxs("span",{className:N.startsWith("+ ")?"add":N.startsWith("- ")?"del":"",children:[N,`
|
|
70
|
+
`]},z))})]}),x&&P&&f.jsxs("p",{children:[P.found>x.matches?"This may no longer be missing: the search below now finds something.":"Nothing in the code connects these, going by this search."," ","Searched ",P.searched??"?"," ",P.searched===1?"file":"files",x.search.paths?f.jsxs(f.Fragment,{children:[" in ",f.jsx("code",{children:x.search.paths.join(", ")})]}):" (the whole repo)"," for ",f.jsx("code",{children:x.search.pattern}),": ",P.found," ",P.found===1?"match":"matches","."]}),k&&k.status==="unconfirmed"&&f.jsxs("div",{className:"warn small",children:["Couldn't confirm against the code: ",k.reasons.join("; ")]}),m.length>0&&f.jsxs("div",{className:"basis",children:[f.jsxs("div",{className:"code-toggle",children:[f.jsx("div",{className:"eyebrow",children:(S==null?void 0:S.kind)==="removed"?`In the code as it was at ${E}`:"In the code"}),f.jsx("button",{className:"link-btn small",onClick:()=>s(!i),children:i?"Hide the code":"Show the code"})]}),f.jsx("div",{className:"chips",children:m.map((N,z)=>{var $,M;const C=(($=v[z])==null?void 0:$.ok)??!1,T=((M=v[z])==null?void 0:M.foundAt)??N.line;return C?f.jsxs("button",{className:"chip cite",title:"Show this line in the code",onClick:()=>{s(!0),d(L=>({at:`${N.file}:${T}`,n:((L==null?void 0:L.n)??0)+1}))},children:[f.jsx("span",{className:"tick",children:"✓"}),N.file,":",T]},z):f.jsxs("span",{className:"chip static chip-unconfirmed",children:[f.jsx("span",{className:"qmark",children:"?"}),N.file,":",T]},z)})}),i&&(p||y)&&f.jsx(UC,{mapId:e,itemId:c,change:(S==null?void 0:S.kind)??null,since:E,stamp:n,jump:u})]})]})}function x2({diff:e}){const t=e.filter(r=>r.startsWith("+ ")).length,n=e.filter(r=>r.startsWith("- ")).length;return f.jsxs("span",{className:"diff-size",children:[t>0&&f.jsxs("span",{className:"add",children:[" +",t]}),n>0&&f.jsxs("span",{className:"del",children:[" −",n]})]})}function w2({map:e,selection:t,draft:n,busy:r,autoFocus:o,onDraft:i,onRemove:s,step:l,onRemoveStep:a,onSend:u}){const d=I.useRef(null),h=["nodes","edges","absences"].flatMap(c=>t[c].map(p=>({kind:c,id:p})));return I.useEffect(()=>{const c=d.current;c&&(c.style.height="auto",c.style.height=`${Math.min(c.scrollHeight,140)}px`)},[n]),I.useEffect(()=>{var c;n&&((c=d.current)==null||c.focus())},[n===""]),I.useEffect(()=>{var c;o&&((c=d.current)==null||c.focus({preventScroll:!0}))},[]),f.jsxs("form",{className:"composer",onSubmit:c=>{c.preventDefault(),!r&&n.trim()&&u()},children:[l&&f.jsxs("span",{className:"sel-chip sel-step",children:[f.jsxs("span",{className:"sel-text",title:`Walkthrough step: ${l}`,children:["▸ ",l]}),f.jsx("button",{type:"button","aria-label":`Don't ask about the step “${l}”`,onClick:a,children:"×"})]}),h.map(c=>f.jsxs("span",{className:`sel-chip sel-${c.kind}`,children:[f.jsxs("span",{className:"sel-text",title:kt(e,c.id),children:[c.kind==="absences"?"✕ ":"◉ ",kt(e,c.id)]}),f.jsx("button",{type:"button","aria-label":`Remove ${kt(e,c.id)}`,onClick:()=>s(c.kind,c.id),children:"×"})]},`${c.kind}:${c.id}`)),f.jsx("textarea",{ref:d,id:"ask",rows:1,value:n,placeholder:r?"Claude is working…":h.length?"Ask about what you selected…":l?"Ask about this step…":"Ask about this map…",onChange:c=>i(c.target.value),onKeyDown:c=>{c.key==="Enter"&&!c.shiftKey&&(c.preventDefault(),!r&&n.trim()&&u())},"aria-label":"Ask a question about the map"}),f.jsx("button",{type:"submit",className:"send",disabled:r||!n.trim(),"aria-label":"Send",children:"↑"})]})}function k2({map:e,tour:t,onTour:n,selected:r,children:o}){const i=e.tour.length,s=i>0&&t===null;return!s&&!o?null:f.jsxs("div",{className:"dock",children:[s&&f.jsxs("section",{className:"dock-part dock-walk","aria-label":"Walkthrough",children:[f.jsx("h2",{className:"dock-title",children:"Walkthrough"}),f.jsxs("button",{className:"dock-start",onClick:()=>n(0),children:["Take the walkthrough ",f.jsxs("span",{className:"muted",children:[i," ",i===1?"stop":"stops"]})]})]}),o&&f.jsxs("section",{className:"dock-part dock-ask","aria-label":"Ask about the map",children:[f.jsxs("div",{className:"dock-head",children:[f.jsx("h2",{className:"dock-title",children:"Ask about the map"}),f.jsx("span",{className:"dock-hint",children:r?"Shift-click to add more":"Click a box or arrow to ask about it"})]}),o]})]})}function S2({state:e,dispatch:t}){const n=e.answers[e.answers.length-1];return n?f.jsx("div",{className:"history-corner",children:f.jsxs("button",{className:"pill-btn history-btn",onClick:()=>t(e.tour!==null?{type:"peek",open:!0}:{type:"show",answerId:n.id}),title:"Open the conversation about this map",children:[f.jsx("span",{className:"history-arrow",children:"‹"})," Conversation ",f.jsx("span",{className:"muted",children:e.answers.length})]})}):null}const sr=14,je=12;function N2(e,t){const n=l=>l[l.length-1],r=n(t.nodes),o=n(t.edges),i=n(t.absences),s=r!==void 0?`.react-flow__node[data-id="${CSS.escape(r)}"]`:o!==void 0?`.link-label[data-id="${CSS.escape(`e:${o}`)}"]`:i!==void 0?`.link-label[data-id="${CSS.escape(`a:${i}`)}"]`:null;return s?e.querySelector(s):null}const gu="illuminate-bubble-size",L0=300,A0=180;function E2(){try{const e=JSON.parse(Tc(gu)??"null");if(e&&typeof e=="object"&&"w"in e&&"h"in e&&typeof e.w=="number"&&typeof e.h=="number")return{w:Math.max(L0,e.w),h:Math.max(A0,e.h)}}catch{}return null}function _2({mapId:e,map:t,report:n,selection:r,onClose:o}){var _;const i=[...r.nodes,...r.edges,...r.absences],s=i.join(" "),l=I.useRef(null),[a,u]=I.useState(null),d=I.useRef(null),h=pi(),c=ie(S=>S.transform.join(",")),[p,y]=I.useState(""),[x,k]=I.useState(E2),m=S=>{const E=l.current,P=E==null?void 0:E.querySelector(".card-selected"),b=E==null?void 0:E.parentElement;if(!E||!P||!b||!a)return;S.preventDefault();const D=S.clientX,A=S.clientY,H=E.offsetWidth,O=P.offsetHeight,N=b.clientWidth-2*je,z=a.side==="right"?1:-1;let C={w:H,h:O};const T=M=>{C={w:Math.round(Math.max(L0,Math.min(N,H+z*(M.clientX-D)))),h:Math.round(Math.max(A0,O+M.clientY-A))},k(C)},$=()=>{window.removeEventListener("pointermove",T),window.removeEventListener("pointerup",$),document.body.classList.remove("resizing-bubble"),zc(gu,JSON.stringify(C))};window.addEventListener("pointermove",T),window.addEventListener("pointerup",$),document.body.classList.add("resizing-bubble")},v=()=>{try{localStorage.removeItem(gu)}catch{}k(null)};if(I.useLayoutEffect(()=>{const S=l.current;if(!S)return;const E=new ResizeObserver(()=>y(`${S.offsetWidth}x${S.offsetHeight}`));return E.observe(S),()=>E.disconnect()},[s]),I.useLayoutEffect(()=>{const S=l.current,E=S==null?void 0:S.parentElement;if(!S||!E)return;const P=N2(E,r);if(!P){u(null);return}const b=E.getBoundingClientRect(),D=P.getBoundingClientRect(),A={left:D.left-b.left,right:D.right-b.left,top:D.top-b.top,bottom:D.bottom-b.top},H=E.querySelector(".dock"),O=H?H.getBoundingClientRect().top-b.top-je:b.height-je,N=Math.max(160,O-je),z=S.offsetWidth,C=Math.min(S.offsetHeight,N),T=b.width-je-A.right-sr,$=A.left-sr-je,M=T>=z||T>=$?"right":"left",L=M==="right"?A.right+sr:A.left-sr-z,j=Math.max(je,Math.min(L,b.width-je-z)),R=Math.max(je,Math.min(A.top,O-C)),V=Math.max(16,Math.min((A.top+A.bottom)/2-R,C-16));if(u({left:j,top:R,side:M,pointer:V,maxHeight:N}),d.current===s)return;d.current=s;const U=M==="right"?A.left:A.left-sr-z,Q=M==="right"?A.right+sr+z:A.right,B=Q-U<=b.width-2*je,X=B?U:A.left,F=B?Q:A.right,Y=X<je?je-X:F>b.width-je?b.width-je-F:0,q=A.top<je?je-A.top:A.bottom>O?Math.max(O-A.bottom,je-A.top):0;if(Y||q){const Z=h.getViewport();h.setViewport({...Z,x:Z.x+Y,y:Z.y+q},{duration:300})}},[s,c,p]),!i.length)return null;const g=i.length===1?i[0]:null,w=!!g&&((_=ei(n,g))==null?void 0:_.kind)==="wireframe";return f.jsxs("div",{ref:l,className:`box-bubble box-bubble-${(a==null?void 0:a.side)??"right"}${w?" box-bubble-wide":""}`,style:{...a?{left:a.left,top:a.top,"--bubble-max":`${a.maxHeight}px`}:{visibility:"hidden",left:0,top:0},...x?{width:x.w,"--bubble-cap":`${x.h}px`}:{}},role:"dialog","aria-label":"What you selected",children:[a&&f.jsx("i",{className:"box-bubble-pointer",style:{top:a.pointer},"aria-hidden":"true"}),f.jsx(v2,{mapId:e,map:t,report:n,ids:i,onClose:o},s),f.jsx("span",{className:"box-bubble-grip",onPointerDown:m,onDoubleClick:v,title:"Drag to resize. Double-click for the usual size.","aria-hidden":"true"})]})}const C2="modulepreload",j2=function(e){return"/"+e},dh={},M2=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),l=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));o=Promise.allSettled(n.map(a=>{if(a=j2(a),a in dh)return;dh[a]=!0;const u=a.endsWith(".css"),d=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${a}"]${d}`))return;const h=document.createElement("link");if(h.rel=u?"stylesheet":C2,u||(h.as="script"),h.crossOrigin="",h.href=a,l&&h.setAttribute("nonce",l),document.head.appendChild(h),u)return new Promise((c,p)=>{h.addEventListener("load",c),h.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${a}`)))})}))}function i(s){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=s,window.dispatchEvent(l),!l.defaultPrevented)throw s}return o.then(s=>{for(const l of s||[])l.status==="rejected"&&i(l.reason);return t().catch(i)})},Bn=232,Rn=96;function Us(e,t){var i;const n=((i=e.nodes[t])==null?void 0:i.y)??0,r=e.rowTops??[];let o=0;for(const[s,l]of r.entries())n>=l-1&&(o=s);return o}const $2=132;function fh(e,t=!1){return e==="choice"?{w:196,h:132}:e==="action"?{w:196,h:60}:t?{w:232,h:64+$2}:{w:196,h:72}}let P2=null;const Ac=()=>P2??(P2=M2(()=>import("./elk.bundled-BPr-wH-B.js").then(e=>e.e),[]).then(e=>new e.default)),Rc={"elk.algorithm":"layered","elk.layered.nodePlacement.strategy":"NETWORK_SIMPLEX","elk.layered.considerModelOrder.strategy":"NODES_AND_EDGES"};function Dc(e,t){const n=new Set(e.nodes.map(r=>r.id));return[...e.edges.map(r=>({id:`e:${r.id}`,from:r.from,to:r.to})),...e.absences.flatMap(r=>r.between?[{id:`a:${r.id}`,from:r.between.from,to:r.between.to}]:[]),...t.map(r=>({id:`x:${r.id}`,from:r.from,to:r.to}))].filter(r=>n.has(r.from)&&n.has(r.to)&&r.from!==r.to)}const pt={top:52,side:26,bottom:26},ar=64,as=44,b2=56,I2=140;async function R0(e,t,n,r){const o=await e.layout({id:t,layoutOptions:{...Rc,"elk.direction":"DOWN","elk.padding":`[top=${pt.top},left=${pt.side},bottom=${pt.bottom},right=${pt.side}]`,"elk.layered.spacing.nodeNodeBetweenLayers":String(ar),"elk.spacing.nodeNode":String(as)},children:n.map(s=>({id:s.id,width:Bn,height:Rn})),edges:r.map(s=>({id:s.id,sources:[s.from],targets:[s.to]}))}),i={};for(const s of o.children??[])i[s.id]={x:s.x??0,y:s.y??0,w:Bn,h:Rn};return{nodes:i,size:{w:o.width??Bn+2*pt.side,h:o.height??Rn+pt.top+pt.bottom}}}function T2(e,t){const n=e.nodes.filter(o=>!t.has(o.id)),r=new Set(n.map(o=>o.id));return{...e,areas:e.areas.filter(o=>!t.has(o.id)),nodes:n,edges:e.edges.filter(o=>!t.has(o.id)&&r.has(o.from)&&r.has(o.to)),absences:e.absences.filter(o=>!t.has(o.id)&&(!o.between||r.has(o.between.from)&&r.has(o.between.to)))}}async function z2(e,t=[],n=new Set,r=new Set){var _;if(e.view==="journey")return L2(e,t,r);const o=e.nodes.filter(S=>n.has(S.id));if(!o.length)return ph(e,t);const i=T2(e,n),s=new Set(i.nodes.map(S=>S.id)),l=await ph(i,t.filter(S=>s.has(S.from)&&s.has(S.to))),a=await Ac(),u=Object.fromEntries(Object.entries(l.areas).map(([S,E])=>[S,{...E}])),d={...l.nodes},h={},c={};for(const S of o)(c[_=S.area]??(c[_]=[])).push(S);for(const[S,E]of Object.entries(c)){const P=u[S];if(!P)continue;const b=Math.max(1,Math.floor((P.w-2*pt.side+as)/(Bn+as))),D=Math.max(pt.top-ar,...i.nodes.filter(H=>H.area===S).map(H=>{var O;return(((O=d[H.id])==null?void 0:O.y)??0)+Rn}))+ar;E.forEach((H,O)=>{d[H.id]={x:pt.side+O%b*(Bn+as),y:D+Math.floor(O/b)*(Rn+ar),w:Bn,h:Rn}});const A=Math.max(P.h,D+Math.ceil(E.length/b)*(Rn+ar)-ar+pt.bottom);h[S]=A-P.h,P.h=A}const p=Object.fromEntries(Object.entries(l.areas).map(([S,E])=>[S,E])),y=Object.keys(p).sort((S,E)=>p[S].y-p[E].y),x={};for(const S of y){const E=p[S];x[S]=Math.max(0,...y.filter(P=>P!==S&&x[P]!==void 0).filter(P=>{const b=p[P];return b.y+b.h<=E.y+1&&b.x<E.x+E.w&&E.x<b.x+b.w}).map(P=>x[P]+(h[P]??0))),u[S].y+=x[S]}const k=Dc(e,t),m=new Map(e.nodes.map(S=>[S.id,S.area])),v=Math.max(0,...Object.values(u).map(S=>S.x+S.w))+I2;let g=0;for(const S of e.areas){if(u[S.id])continue;const E=e.nodes.filter(D=>D.area===S.id);if(!E.length)continue;const P=k.filter(D=>m.get(D.from)===S.id&&m.get(D.to)===S.id),b=await R0(a,S.id,E,P);Object.assign(d,b.nodes),u[S.id]={x:v,y:g,w:b.size.w,h:b.size.h},g+=b.size.h+b2}const w=Object.values(u);return{areas:u,nodes:d,width:Math.max(0,...w.map(S=>S.x+S.w)),height:Math.max(0,...w.map(S=>S.y+S.h))}}const hh=1900,yu=130;async function L2(e,t,n){const o=await(await Ac()).layout({id:"root",layoutOptions:{...Rc,"elk.direction":"RIGHT","elk.layered.cycleBreaking.strategy":"MODEL_ORDER","elk.layered.spacing.nodeNodeBetweenLayers":"176","elk.spacing.nodeNode":"56","elk.spacing.componentComponent":"72"},children:e.nodes.map(p=>({id:p.id,width:fh(p.kind,n.has(p.id)).w,height:fh(p.kind,n.has(p.id)).h})),edges:Dc(e,t).map(p=>({id:p.id,sources:[p.from],targets:[p.to]}))}),i={};for(const p of o.children??[])i[p.id]={x:p.x??0,y:p.y??0,w:p.width??0,h:p.height??0};const s=o.width??0;if(s<=hh)return{areas:{},nodes:i,width:s,height:o.height??0,flat:!0};const l=[];for(const[p,y]of Object.entries(i).sort((x,k)=>x[1].x+x[1].w/2-(k[1].x+k[1].w/2))){const x=l[l.length-1];x&&y.x+y.w/2<x.right?(x.ids.push(p),x.left=Math.min(x.left,y.x),x.right=Math.max(x.right,y.x+y.w)):l.push({left:y.x,right:y.x+y.w,ids:[p]})}const a=Math.ceil(s/hh),u=Math.ceil(l.length/a);let d=0,h=0;const c=[];for(let p=0;p*u<l.length;p++){const y=l.slice(p*u,(p+1)*u),x=y.flatMap(v=>v.ids),k=y[0].left,m=Math.min(...x.map(v=>i[v].y));c.push(d);for(const v of x)i[v]={...i[v],x:i[v].x-k,y:i[v].y-m+d};d=Math.max(...x.map(v=>i[v].y+i[v].h))+yu,h=Math.max(h,y[y.length-1].right-k)}return{areas:{},nodes:i,width:h,height:d-yu,flat:!0,rowTops:c}}async function ph(e,t){const n=await Ac(),r=new Map(e.nodes.map(d=>[d.id,d.area])),o=Dc(e,t),i={},s={};for(const d of e.areas){const h=e.nodes.filter(y=>y.area===d.id);if(!h.length)continue;const c=o.filter(y=>r.get(y.from)===d.id&&r.get(y.to)===d.id),p=await R0(n,d.id,h,c);Object.assign(i,p.nodes),s[d.id]=p.size}const l=new Map;for(const d of o){const h=r.get(d.from),c=r.get(d.to);h!==c&&s[h]&&s[c]&&l.set(`${h}>${c}`,{from:h,to:c})}const a=await n.layout({id:"root",layoutOptions:{...Rc,"elk.direction":"RIGHT","elk.layered.spacing.nodeNodeBetweenLayers":"120","elk.spacing.nodeNode":"48","elk.spacing.componentComponent":"64"},children:e.areas.filter(d=>s[d.id]).map(d=>({id:d.id,width:s[d.id].w,height:s[d.id].h})),edges:[...l.values()].map((d,h)=>({id:`p${h}`,sources:[d.from],targets:[d.to]}))}),u={};for(const d of a.children??[])u[d.id]={x:d.x??0,y:d.y??0,w:d.width??0,h:d.height??0};return{areas:u,nodes:i,width:a.width??0,height:a.height??0}}function A2(e,t,n,r){if(t.flat){const d=y=>{const x=t.nodes[y];return x?{x:x.x+x.w/2,y:x.y+x.h/2}:{x:0,y:0}},h=d(r).x-d(n).x,c=d(r).y-d(n).y;if(Math.abs(h)<40)return c>=0?["b","t"]:["t","b"];const p=Us(t,r)-Us(t,n);return p?p>0?["b","t"]:["r","b"]:h>=0?["r","l"]:["l","r"]}const o=d=>{var h;return((h=e.nodes.find(c=>c.id===d))==null?void 0:h.area)??""},i=d=>{const h=t.areas[o(d)],c=t.nodes[d];return h&&c?{x:h.x+c.x+c.w/2,y:h.y+c.y+c.h/2}:{x:0,y:0}},s=i(n),l=i(r),a=l.x-s.x,u=l.y-s.y;return o(n)===o(r)||Math.abs(a)<Bn*.75?u>=0?["b","t"]:["t","b"]:a>=0?["r","l"]:["l","r"]}function R2(e,t=[],n=[],r=[]){return JSON.stringify([e.view==="journey"?[e.nodes.map(o=>o.kind),[...r].sort()]:null,[...n].sort(),e.areas.map(o=>o.id),e.nodes.map(o=>`${o.id}@${o.area}`),e.edges.map(o=>`${o.from}>${o.to}`),e.absences.map(o=>o.between?`${o.between.from}~${o.between.to}`:""),t.map(o=>`${o.from}+${o.to}`)])}const Sn=(...e)=>e.filter(Boolean).join(" "),Vn={add:{pending:"Proposed",done:"Now in the code",mark:"+",title:"Proposed: not in the code yet"},change:{pending:"Would change",done:"Changed",mark:"~",title:"Proposed: this code would change"},remove:{pending:"Would be removed",done:"Removed",mark:"−",title:"Proposed: this code would be removed"}},wl=e=>e&&`proposal proposal-${e.kind} proposal-${e.state}`,Wn={added:{label:"Added",mark:"+",title:"New since the commit this map is compared with"},changed:{label:"Changed",mark:"~",title:"Different from the commit this map is compared with"},removed:{label:"Removed",mark:"−",title:"Was in the code at the commit this map is compared with, and is gone now"}},kl=e=>e&&`change change-${e}`,Ys={later:{label:"Not there yet",title:"Added after this version of the code"},gone:{label:"Gone",title:"Removed: it was in the code before, and isn’t now"}};function D2(e){if(!(e!=null&&e.length))return null;const t=e.filter(r=>r.startsWith("+ ")).length,n=e.filter(r=>r.startsWith("- ")).length;return[t&&`+${t}`,n&&`−${n}`].filter(Boolean).join(" ")||null}const O2=[["before","Before","The code as it was at that commit; what was added since is a shadow"],["after","After","The code as it is now; what was removed is a shadow"],["both","Both","The code as it is now, with what was removed drawn in too"]];function F2({commit:e,when:t,onWhen:n}){return f.jsxs("div",{className:"change-key",children:[f.jsx("div",{className:"seg",role:"group","aria-label":"Which version of the code to show",children:O2.map(([r,o,i])=>f.jsx("button",{className:Sn("seg-btn",t===r&&"on"),title:i,"aria-pressed":t===r,onClick:()=>n(r),children:o},r))}),f.jsx("span",{className:"change-key-title",children:t==="before"?`The code at ${e}`:t==="after"?"The code now":`Now, compared with ${e}`}),t==="both"&&f.jsxs("span",{className:"key-item",children:[f.jsx("i",{className:"key-swatch"}),"Same as before"]}),t==="both"&&f.jsxs("span",{className:"key-item",children:[f.jsx("i",{className:"key-swatch key-added"}),"Added"]}),f.jsxs("span",{className:"key-item",children:[f.jsx("i",{className:Sn("key-swatch key-changed",t!=="both"&&"key-quiet")}),t==="before"?"Changes later":"Changed"]}),t==="both"&&f.jsxs("span",{className:"key-item",children:[f.jsx("i",{className:"key-swatch key-removed"}),"Removed (only in the before)"]}),t!=="both"&&f.jsxs("span",{className:"key-item",children:[f.jsx("i",{className:"key-swatch key-ghost"}),t==="before"?"Not there yet":"Gone"]})]})}const Wi={entry:["Where it starts","▸"],store:["Saved data","▤"],external:["Outside the app","↗"],job:["Background job","◷"]},mh=[["t",J.Top],["r",J.Right],["b",J.Bottom],["l",J.Left]];function D0(){return f.jsxs(f.Fragment,{children:[mh.map(([e,t])=>f.jsx(Wr,{id:`s${e}`,type:"source",position:t,className:"handle",isConnectable:!1},`s${e}`)),mh.map(([e,t])=>f.jsx(Wr,{id:`t${e}`,type:"target",position:t,className:"handle",isConnectable:!1},`t${e}`))]})}function H2({data:e}){var t,n,r;return e.journey?f.jsx(B2,{data:e}):f.jsxs("div",{className:Sn("step","nopan",`kind-${e.kind}`,!e.confirmed&&"unconfirmed",wl(e.proposal),kl(e.change),e.quiet&&"quiet",e.ghost&&"ghost",e.selected&&"selected",e.hl&&"hl",e.dim&&"dim"),onClick:o=>{o.stopPropagation(),e.onClick(o.shiftKey||o.metaKey)},children:[f.jsx(D0,{}),(Wi[e.kind]||e.fresh||e.screen||e.proposal||e.change||e.ghost)&&f.jsxs("div",{className:"step-head",children:[e.ghost&&f.jsx("span",{className:"badge-ghost",title:Ys[e.ghost].title,children:Ys[e.ghost].label}),e.proposal&&f.jsx("span",{className:"badge-proposal",children:Vn[e.proposal.kind][e.proposal.state]}),e.change&&f.jsxs("span",{className:"badge-change",title:Wn[e.change].title,children:[e.quiet==="before"?"Changes later":Wn[e.change].label,e.changeSize&&!e.quiet&&f.jsxs("span",{className:"change-size",children:[" ",e.changeSize]})]}),Wi[e.kind]&&!e.proposal&&!e.change&&!e.ghost&&f.jsxs(f.Fragment,{children:[f.jsx("i",{className:"step-mark","aria-hidden":"true",children:Wi[e.kind][1]}),Wi[e.kind][0]]}),e.screen&&f.jsx("span",{className:"badge-screen",title:"Select this step to see the screen",children:"▣ Screen"}),e.fresh&&f.jsx("span",{className:"badge-new",children:"New"})]}),f.jsx("div",{className:"step-name",title:e.name,children:e.name}),f.jsxs("div",{className:"step-code",title:((t=e.proposal)==null?void 0:t.state)==="pending"?Vn[e.proposal.kind].title:e.confirmed?"Confirmed against the code":"The checker couldn't confirm this against the code",children:[((n=e.proposal)==null?void 0:n.state)==="pending"&&e.proposal.kind==="add"?f.jsx("span",{className:"pmark",children:"+"}):((r=e.proposal)==null?void 0:r.state)==="done"&&e.proposal.kind!=="add"?f.jsx("span",{className:"pmark",children:Vn[e.proposal.kind].mark}):e.change&&e.confirmed?f.jsx("span",{className:"cmark",children:Wn[e.change].mark}):f.jsx("span",{className:e.confirmed?"tick":"qmark",children:e.confirmed?"✓":"?"}),f.jsx("span",{className:"step-sub",children:e.sub})]})]})}function B2({data:e}){const t=e.journey,n=e.proposal;return f.jsxs("div",{className:Sn("step","jstep","nopan",`j-${t.shape}`,t.show&&"j-pictured",t.outside&&"j-outside",!e.confirmed&&"unconfirmed",wl(n),kl(e.change),e.quiet&&"quiet",e.ghost&&"ghost",e.selected&&"selected",e.hl&&"hl",e.dim&&"dim"),style:{width:t.w,height:t.h},onClick:r=>{r.stopPropagation(),e.onClick(r.shiftKey||r.metaKey)},children:[f.jsx(D0,{}),t.stage&&f.jsx("div",{className:"j-stage",children:t.stage}),t.shape==="choice"&&f.jsx("svg",{className:"j-diamond",viewBox:"0 0 100 100",preserveAspectRatio:"none","aria-hidden":"true",children:f.jsx("polygon",{points:"50,1 99,50 50,99 1,50",vectorEffect:"non-scaling-stroke"})}),f.jsxs("div",{className:"j-tags",children:[n&&f.jsx("span",{className:"badge-proposal",children:Vn[n.kind][n.state]}),e.ghost&&f.jsx("span",{className:"badge-ghost",title:Ys[e.ghost].title,children:Ys[e.ghost].label}),e.change&&f.jsx("span",{className:"badge-change",title:Wn[e.change].title,children:e.quiet==="before"?"Changes later":Wn[e.change].label}),!e.confirmed&&f.jsx("span",{className:"j-q",title:"The checker couldn't confirm this against the code",children:"?"}),e.fresh&&f.jsx("span",{className:"badge-new",children:"New"})]}),t.show&&f.jsx(GC,{show:t.show,name:e.name}),f.jsx("div",{className:"j-name",title:e.name,children:e.name}),t.outside&&t.shape!=="choice"&&f.jsx("div",{className:"j-note",children:"Outside the app"})]})}function V2({data:e}){return f.jsx("div",{className:Sn("area",e.dim&&"dim"),children:f.jsxs("div",{className:"area-label",children:[e.label,e.note&&f.jsxs("span",{className:"area-note",children:[" ",e.note]})]})})}function W2(e,t,n,r,o){const i=Math.hypot(n-e,r-t)||1,s=-(r-t)/i,l=(n-e)/i,a=(e+n)/2+s*o*2,u=(t+r)/2+l*o*2;return[`M ${e} ${t} Q ${a} ${u} ${n} ${r}`,(e+n)/2+s*o,(t+r)/2+l*o]}function U2(e,t=18){let n=`M ${e[0][0]} ${e[0][1]}`;for(let i=1;i<e.length-1;i++){const[s,l]=e[i-1],[a,u]=e[i],[d,h]=e[i+1],c=Math.min(t,Math.hypot(a-s,u-l)/2),p=Math.min(t,Math.hypot(d-a,h-u)/2),y=Math.sign(a-s),x=Math.sign(u-l),k=Math.sign(d-a),m=Math.sign(h-u);n+=` L ${a-y*c} ${u-x*c} Q ${a} ${u} ${a+k*p} ${u+m*p}`}const r=e[e.length-1];n+=` L ${r[0]} ${r[1]}`;let o=[0,e[0][0],e[0][1]];for(let i=1;i<e.length;i++){const[s,l]=e[i-1],[a,u]=e[i];l===u&&Math.abs(a-s)>o[0]&&(o=[Math.abs(a-s),(s+a)/2,u])}return[n,o[1],o[2]]}function Y2({id:e,sourceX:t,sourceY:n,targetX:r,targetY:o,sourcePosition:i,targetPosition:s,markerEnd:l,data:a}){const[u,d,h]=(a==null?void 0:a.wrapY)!==void 0&&i===J.Right?U2([[t,n],[t+30,n],[t+30,a.wrapY],[r,a.wrapY],[r,o]]):(a==null?void 0:a.wrapY)!==void 0?Bs({sourceX:t,sourceY:n,sourcePosition:i,targetX:r,targetY:o,targetPosition:s,borderRadius:18,centerY:a.wrapY}):a!=null&&a.offset?W2(t,n,r,o,a.offset):_c({sourceX:t,sourceY:n,sourcePosition:i,targetX:r,targetY:o,targetPosition:s});return a?f.jsxs(f.Fragment,{children:[a.selected&&f.jsx("path",{d:u,className:"edge-halo"}),f.jsx(mi,{id:e,path:u,markerEnd:l,interactionWidth:18}),f.jsx(dC,{children:f.jsxs("div",{className:Sn("link-label",`link-${a.variant}`,!a.confirmed&&"unconfirmed",wl(a.proposal),kl(a.change),a.ghost&&"ghost",a.hl&&"hl",a.dim&&"dim",a.selected&&"selected","nodrag nopan"),"data-id":e,style:{transform:`translate(-50%, -50%) translate(${d}px, ${h}px)`},onClick:c=>{var p;c.stopPropagation(),(p=a.onClick)==null||p.call(a,c.shiftKey||c.metaKey)},children:[a.variant==="absence"&&f.jsx("span",{className:"gap-q","aria-hidden":"true",children:"?"}),a.proposal&&f.jsx("span",{className:"pmark",title:a.proposal.state==="done"?Vn[a.proposal.kind].done:Vn[a.proposal.kind].title,children:a.proposal.state==="done"&&a.proposal.kind==="add"?"✓":Vn[a.proposal.kind].mark}),a.change&&f.jsx("span",{className:"cmark",title:Wn[a.change].title,children:Wn[a.change].mark}),f.jsx("span",{className:"link-text",children:a.label}),!a.confirmed&&a.variant==="edge"&&f.jsx("span",{className:"q",children:" ?"})]})})]}):null}const X2={step:H2,area:V2},K2={link:Y2};function gh(e,t){const n=new Set;for(const r of t){e.nodes.some(s=>s.id===r)&&n.add(r);const o=e.edges.find(s=>s.id===r);o&&n.add(o.from).add(o.to);const i=e.absences.find(s=>s.id===r);i!=null&&i.between&&n.add(i.between.from).add(i.between.to)}return[...n]}const Q2="440px",G2=`${QC+40}px`,q2=e=>e.length>28?`${e.slice(0,26)}…`:e;function Z2(e){var P,b,D,A,H,O,N,z;const t=(P=e.ghost)!=null&&P.connects&&e.map.nodes.some(C=>C.id===e.ghost.connects.from)&&e.map.nodes.some(C=>C.id===e.ghost.connects.to)?e.ghost:null,n=I.useMemo(()=>t!=null&&t.connects?[{id:t.id,from:t.connects.from,to:t.connects.to}]:[],[t]),r=I.useMemo(()=>e.map.view==="journey"?e.map.nodes.filter(C=>{var T,$,M;return C.kind!=="action"&&C.kind!=="choice"&&((M=($=(T=e.report)==null?void 0:T.screens)==null?void 0:$[C.id])==null?void 0:M.status)==="confirmed"}).map(C=>C.id):[],[e.map,e.report]),o=R2(e.map,n,e.added,r),[i,s]=I.useState(null),l=pi(),[a,u]=I.useState("both"),h=!!((D=(b=e.report)==null?void 0:b.since)!=null&&D.commit)?a:"both",c=C=>{var T,$,M,L,j,R;return((M=($=(T=e.report)==null?void 0:T.nodes[C])==null?void 0:$.change)==null?void 0:M.kind)??((R=(j=(L=e.report)==null?void 0:L.edges[C])==null?void 0:j.change)==null?void 0:R.kind)??null},p=C=>h==="before"&&c(C)==="added"?"later":h==="after"&&c(C)==="removed"?"gone":null,y=C=>h==="both"||C==="changed"?C:null;I.useEffect(()=>{let C=!0;return z2(e.map,n,new Set(e.added),new Set(r)).then(T=>C&&s({key:o,layout:T})),()=>{C=!1}},[o]);const x=(A=e.view)!=null&&A.highlight.length?new Set(e.view.highlight):null,k=I.useMemo(()=>x?new Set(gh(e.map,[...x])):null,[x,e.map]),m=e.selection,v=I.useMemo(()=>{if(!i)return[];const C=i.layout,T=j=>!k||e.map.nodes.some(R=>R.area===j&&k.has(R.id)),$=e.map.areas.flatMap(j=>{const R=C.areas[j.id];return R?[{id:`area:${j.id}`,type:"area",position:{x:R.x,y:R.y},style:{width:R.w,height:R.h},data:{label:j.label,note:null,dim:!T(j.id)},selectable:!1,draggable:!1,zIndex:0}]:[]}),M=new Map;if(C.flat)for(const j of e.map.areas){const R=e.map.nodes.filter(V=>V.area===j.id&&C.nodes[V.id]).sort((V,U)=>C.nodes[V.id].x-C.nodes[U.id].x||C.nodes[V.id].y-C.nodes[U.id].y)[0];R&&M.set(R.id,j.label)}const L=e.map.nodes.flatMap(j=>{var Q,B,X,F,Y,q,Z,G,ee,te,ne,re,se,Ee,Le;const R=C.nodes[j.id];if(!R)return[];const V=j.evidence[0],U=j.symbol?j.symbol.slice(j.symbol.indexOf("#")+1):V?`${V.file.split("/").pop()}:${V.line}`:"not in the code yet";return[{id:j.id,type:"step",...C.flat?{}:{parentId:`area:${j.area}`,extent:"parent"},position:{x:R.x,y:R.y},data:{name:j.name,sub:U,kind:j.kind,confirmed:!!e.report&&((Q=e.report.nodes[j.id])==null?void 0:Q.status)!=="unconfirmed",proposal:((X=(B=e.report)==null?void 0:B.nodes[j.id])==null?void 0:X.proposal)??null,screen:((q=(Y=(F=e.report)==null?void 0:F.screens)==null?void 0:Y[j.id])==null?void 0:q.status)==="confirmed",selected:m.nodes.includes(j.id),hl:!!(k!=null&&k.has(j.id)),dim:!!k&&!k.has(j.id)&&!m.nodes.includes(j.id),fresh:e.fresh.includes(j.id),change:y(((ee=(G=(Z=e.report)==null?void 0:Z.nodes[j.id])==null?void 0:G.change)==null?void 0:ee.kind)??null),changeSize:D2((re=(ne=(te=e.report)==null?void 0:te.nodes[j.id])==null?void 0:ne.change)==null?void 0:re.diff),ghost:p(j.id),quiet:h==="both"?null:h,...C.flat&&{journey:{w:R.w,h:R.h,shape:j.kind==="choice"?"choice":j.kind==="action"?"action":"screen",outside:j.kind==="external",stage:M.get(j.id)??null,show:r.includes(j.id)?((Le=(Ee=(se=e.report)==null?void 0:se.screens)==null?void 0:Ee[j.id])==null?void 0:Le.show)??null:null}},onClick:tt=>e.onSelect("nodes",j.id,tt)},draggable:!1,zIndex:1}]});return[...$,...L]},[i,e.map,e.report,m,k,e.fresh,e.onSelect,r,h]),g=I.useMemo(()=>{var U,Q;if(!i)return[];const C=B=>({type:Go.ArrowClosed,width:16,height:16,color:B}),T=B=>!!(x!=null&&x.has(B)),$=(B,X)=>{const[F,Y]=A2(e.map,i.layout,B,X);return{sourceHandle:`s${F}`,targetHandle:`t${Y}`}},M=new Map,L=(B,X)=>{const F=i.layout.rowTops,Y=Us(i.layout,B),q=Us(i.layout,X);if(!F||Y===q)return;const Z=Math.max(Y,q),G=M.get(Z)??0;return M.set(Z,G+1),F[Z]-yu/2+(G%2?1:-1)*Math.ceil(G/2)*18},j=e.map.edges.map(B=>{var ee,te,ne,re,se,Ee;const X=!!e.report&&((ee=e.report.edges[B.id])==null?void 0:ee.status)!=="unconfirmed",F=((ne=(te=e.report)==null?void 0:te.edges[B.id])==null?void 0:ne.proposal)??null,Y=y(((Ee=(se=(re=e.report)==null?void 0:re.edges[B.id])==null?void 0:se.change)==null?void 0:Ee.kind)??null),q=p(B.id)??p(B.from)??p(B.to),Z=T(B.id)||!!k&&k.has(B.from)&&k.has(B.to)&&!x,G="edge";return{id:`e:${B.id}`,source:B.from,target:B.to,...$(B.from,B.to),type:"link",className:Sn("link",`link-${G}`,!X&&"unconfirmed",wl(F),kl(Y),q&&"ghost",T(B.id)&&"hl",!!x&&!T(B.id)&&"dim",m.edges.includes(B.id)&&"selected"),markerEnd:C(q?"var(--line)":(F==null?void 0:F.state)==="pending"&&F.kind!=="remove"?"var(--ai)":Y==="added"?"var(--ok)":Y==="removed"?"var(--dead)":T(B.id)?"var(--path)":"var(--line-strong)"),zIndex:2,data:{label:B.label,wrapY:L(B.from,B.to),variant:G,proposal:F,change:Y,ghost:q,confirmed:X,hl:Z,dim:!!x&&!T(B.id)&&!m.edges.includes(B.id),selected:m.edges.includes(B.id),onClick:Le=>e.onSelect("edges",B.id,Le)}}}),R=B=>{var X;return((X=t==null?void 0:t.connects)==null?void 0:X.from)===B.from&&t.connects.to===B.to};for(const B of e.map.absences){if(!B.between||R(B.between))continue;const X=((Q=(U=e.report)==null?void 0:U.absences[B.id])==null?void 0:Q.status)==="confirmed";j.push({id:`a:${B.id}`,hidden:h==="before",source:B.between.from,target:B.between.to,...$(B.between.from,B.between.to),type:"link",className:Sn("link","link-absence",!X&&"unconfirmed",T(B.id)&&"hl",!!x&&!T(B.id)&&"dim",m.absences.includes(B.id)&&"selected"),markerEnd:C("var(--dead)"),zIndex:2,data:{label:q2(B.claim),variant:"absence",confirmed:X,hl:T(B.id),dim:!!x&&!T(B.id)&&!m.absences.includes(B.id),selected:m.absences.includes(B.id),onClick:F=>e.onSelect("absences",B.id,F)}})}t!=null&&t.connects&&j.push({id:`g:${t.id}`,source:t.connects.from,target:t.connects.to,...$(t.connects.from,t.connects.to),type:"link",className:"link link-ghost",markerEnd:C("var(--ok)"),zIndex:3,data:{label:`+ ${t.connects.label}`,variant:"ghost",confirmed:!0,hl:!0,dim:!1,selected:!1}});const V=new Map;for(const B of j){const X=[B.source,B.target].sort().join("|");V.set(X,[...V.get(X)??[],B])}for(const B of V.values())B.length<2||B.forEach((X,F)=>{X.data&&(X.data.offset=(F-(B.length-1)/2)*44)});return j},[i,e.map,e.report,m,x,k,t,e.onSelect,h]),w=ie(C=>C.width),_=I.useRef(0);I.useEffect(()=>{const C=_.current;if(_.current=w,!C||!w||C===w||e.touring)return;const T=l.getViewport();l.setViewport({...T,x:T.x+(w-C)/2})},[w]);const S=JSON.stringify([i==null?void 0:i.key,(H=e.view)==null?void 0:H.focus,(O=e.view)==null?void 0:O.highlight,e.touring,e.tourWide,e.touring?w:null]),E=I.useRef(!0);return I.useEffect(()=>{if(!i)return;const C=e.view?gh(e.map,e.view.highlight.length?e.view.highlight:e.view.focus?[e.view.focus]:[]):[];let T=0,$=0;const M=()=>{const L=l.getNodes();if(T<2||!L.length||!L.every(V=>{var U,Q;return(Q=(U=l.getInternalNode(V.id))==null?void 0:U.measured)==null?void 0:Q.width})){T++<60&&($=requestAnimationFrame(M));return}const j=E.current?0:650;E.current=!1;const R=C.length?{top:"60px",left:e.touring?e.tourWide?G2:Q2:"60px",right:"60px",bottom:"150px"}:{top:"64px",left:"32px",right:"32px",bottom:"130px"};l.fitView(C.length?{nodes:C.map(V=>({id:V})),duration:j,padding:R,maxZoom:1.15}:{duration:j,padding:R,maxZoom:1.1})};return $=requestAnimationFrame(M),()=>cancelAnimationFrame($)},[S]),f.jsxs(uC,{className:i!=null&&i.layout.flat?"journey":void 0,nodes:v,edges:g,nodeTypes:X2,edgeTypes:K2,onNodeClick:()=>{},onEdgeClick:(C,T)=>{T.id.startsWith("e:")&&e.onSelect("edges",T.id.slice(2),C.shiftKey||C.metaKey),T.id.startsWith("a:")&&e.onSelect("absences",T.id.slice(2),C.shiftKey||C.metaKey)},onPaneClick:e.onClear,panOnDrag:!0,elementsSelectable:!1,nodesDraggable:!1,nodesConnectable:!1,minZoom:.15,maxZoom:2,children:[f.jsx(gC,{variant:Yt.Dots,gap:22,size:1.3}),((z=(N=e.report)==null?void 0:N.since)==null?void 0:z.commit)&&f.jsx(hi,{position:"top-left",children:f.jsx(F2,{commit:e.report.since.commit.slice(0,7),when:h,onWhen:u})})]})}function Sl(e){e!==`${location.pathname}${location.search}`&&(history.pushState(null,"",e),window.dispatchEvent(new PopStateEvent("popstate")))}function J2(){const[e,t]=I.useState(location.pathname);return I.useEffect(()=>{const n=()=>t(location.pathname),r=o=>{var s,l;if(o.defaultPrevented||o.button!==0||o.metaKey||o.ctrlKey||o.shiftKey||o.altKey)return;const i=(l=(s=o.target)==null?void 0:s.closest)==null?void 0:l.call(s,"a[href]");!(i instanceof HTMLAnchorElement)||i.target||i.origin!==location.origin||(o.preventDefault(),Sl(`${i.pathname}${i.search}`))};return window.addEventListener("popstate",n),document.addEventListener("click",r),()=>{window.removeEventListener("popstate",n),document.removeEventListener("click",r)}},[]),e}const ej=8e3;function O0({busy:e,onStopped:t,onError:n}){const[r,o]=I.useState(!1);return I.useEffect(()=>{if(!r)return;const i=setTimeout(()=>o(!1),ej),s=l=>{l.key==="Escape"&&o(!1)};return window.addEventListener("keydown",s),()=>{clearTimeout(i),window.removeEventListener("keydown",s)}},[r]),r&&!e?f.jsxs("span",{className:"stop-ask",role:"group","aria-label":"Stop illuminate?",children:[f.jsx("span",{className:"stop-ask-text",children:"Stop illuminate? Maps stay saved."}),f.jsx("button",{className:"pill-btn stop-yes",autoFocus:!0,onClick:()=>{o(!1),bt.stop().then(t,i=>n(i.message))},children:"Stop"}),f.jsx("button",{className:"pill-btn",onClick:()=>o(!1),children:"Keep running"})]}):f.jsx("button",{className:"pill-btn",disabled:e,title:e?"Claude is still working":"Maps stay saved. Undo for applied fixes ends.",onClick:()=>o(!0),children:"Stop illuminate"})}function tj(){return f.jsxs("main",{className:"home",children:[f.jsx("h1",{children:"illuminate has stopped"}),f.jsx("p",{className:"muted lede",children:"You can close this tab."}),f.jsxs("p",{className:"muted lede",children:["Maps are saved in ",f.jsx("code",{children:".illuminate/maps"}),". Run ",f.jsx("code",{children:"illume open"})," in the repo to see them again."]})]})}function nj({onStopped:e}){const[t,n]=I.useState(""),[r,o]=I.useState(null),[i,s]=I.useState([]),[l,a]=I.useState(""),[u,d]=I.useState(null),[h,c]=I.useState(!1);I.useEffect(()=>C0(()=>{},()=>{},e),[e]),I.useEffect(()=>{bt.list().then(y=>{n(y.repo),o(y.maps),s(y.making)},y=>d(y.message))},[]);const p=async()=>{if(l.trim()){c(!0);try{const{id:y}=await bt.make(l.trim());Sl(Pt(y))}catch(y){d(y.message),c(!1)}}};return f.jsxs("main",{className:"home",children:[f.jsxs("div",{className:"home-brand",children:[f.jsx("i",{className:"brand-mark","aria-hidden":"true"}),"illuminate",t&&f.jsx("span",{className:"muted",children:t})]}),f.jsx("h1",{children:"Ask how your code works"}),f.jsx("p",{className:"muted lede",children:"Every box and arrow is checked against the code."}),f.jsxs("form",{className:"home-ask",onSubmit:y=>{y.preventDefault(),p()},children:[f.jsx("input",{id:"question",value:l,onChange:y=>a(y.target.value),placeholder:"What happens when a user signs up?","aria-label":"Your question",autoFocus:!0}),f.jsx("button",{className:"btn primary",disabled:h||!l.trim(),children:h?"Starting…":"Map it"})]}),u&&f.jsx("div",{className:"banner banner-dead",role:"alert",children:u}),i.length>0&&f.jsxs("section",{children:[f.jsx("h2",{className:"section-title",children:"Being made now"}),f.jsx("ul",{className:"maplist",children:i.map(y=>f.jsxs("li",{children:[f.jsx("a",{href:Pt(y.id),children:y.question}),f.jsx("span",{className:"muted small",children:"Claude is exploring…"})]},y.id))})]}),f.jsxs("section",{children:[f.jsx("h2",{className:"section-title",children:"Maps in this repo"}),r===null?f.jsx("p",{className:"muted",children:"Loading…"}):r.length===0?f.jsx("p",{className:"muted",children:"None yet."}):f.jsx("ul",{className:"maplist",children:r.map(y=>f.jsxs("li",{children:[f.jsx("a",{href:Pt(y.id),children:y.question}),f.jsxs("span",{className:"muted small",children:[new Date(y.updatedAt).toLocaleString(),y.commit?` · ${y.commit.slice(0,7)}`:""]})]},y.id))})]}),f.jsx("footer",{className:"home-foot",children:f.jsx(O0,{busy:i.length>0,onStopped:e,onError:d})})]})}const yh="illuminate-panel-width",vu=300,F0=400,rj=360,aa=e=>Math.round(Math.max(vu,Math.min(e,Math.max(vu,window.innerWidth-rj))));function oj(){const[e,t]=I.useState(()=>{const r=Number(localStorage.getItem(yh));return aa(r>0?r:F0)}),n=I.useCallback(r=>{const o=aa(r);t(o),localStorage.setItem(yh,String(o))},[]);return I.useEffect(()=>{const r=()=>t(o=>aa(o));return window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)},[]),[e,n]}function ij({width:e,onWidth:t}){return f.jsx("div",{className:"panel-handle",role:"separator","aria-orientation":"vertical","aria-label":"Panel width","aria-valuenow":e,"aria-valuemin":vu,tabIndex:0,title:"Drag to resize the panel",onPointerDown:n=>{n.preventDefault();const r=n.currentTarget;r.setPointerCapture(n.pointerId),document.body.classList.add("resizing");const o=s=>t(window.innerWidth-s.clientX),i=()=>{r.removeEventListener("pointermove",o),r.removeEventListener("pointerup",i),r.removeEventListener("pointercancel",i),document.body.classList.remove("resizing")};r.addEventListener("pointermove",o),r.addEventListener("pointerup",i),r.addEventListener("pointercancel",i)},onDoubleClick:()=>t(F0),onKeyDown:n=>{n.key==="ArrowLeft"&&(n.preventDefault(),t(e+24)),n.key==="ArrowRight"&&(n.preventDefault(),t(e-24))}})}const vh=(...e)=>e.filter(Boolean).join(" ");function sj({map:e,report:t,stop:n,onTour:r,onAsk:o}){var a;const i=e.tour[n];if(!i)return null;const s=n===e.tour.length-1,l=P0(e,t,i.focus.nodes??[]);return f.jsxs("section",{className:vh("card card-focus tour-bubble",(l==null?void 0:l.show.kind)==="wireframe"&&"tour-wide"),"aria-label":"Walkthrough","aria-live":"polite",children:[f.jsx("button",{className:"card-close","aria-label":"Leave the walkthrough",title:"Leave the walkthrough (Esc)",onClick:()=>r(null),children:"×"}),f.jsxs("div",{className:"tour-head",children:[f.jsxs("span",{className:"eyebrow",children:["Walkthrough, stop ",n+1," of ",e.tour.length]}),f.jsx("span",{className:"dots","aria-hidden":"true",children:e.tour.map((u,d)=>f.jsx("i",{className:vh(d===n&&"on",d<n&&"done")},u.id))})]}),f.jsx("h2",{className:"card-title",children:i.title}),f.jsx(ti,{text:i.text,className:"depth-text"}),l&&f.jsx(Lc,{show:l.show,name:l.name}),(a=i.terms)!=null&&a.length?f.jsxs("p",{className:"muted small",children:["Terms: ",i.terms.join(", ")]}):null,f.jsxs("div",{className:"tour-nav",children:[f.jsx("button",{className:"btn",disabled:n===0,onClick:()=>r(n-1),children:"‹ Back"}),f.jsx("button",{className:"btn",onClick:o,children:"Ask about this step"}),f.jsx("span",{className:"grow"}),s?f.jsx("button",{className:"btn primary",onClick:()=>r(null),children:"Done"}):f.jsx("button",{className:"btn primary",onClick:()=>r(n+1),children:"Next ›"})]}),f.jsx("div",{className:"kbd",children:"← → to step, Esc to leave"})]})}function lj(){return Ur?f.jsx(aj,{}):f.jsxs("main",{className:"home",children:[f.jsx("h1",{children:"Open illuminate from its link"}),f.jsxs("p",{className:"muted lede",children:["Use the link illuminate printed in your terminal (it ends in ",f.jsx("code",{children:"?t=…"}),")."]})]})}function aj(){const[e,t]=I.useState(!1),n=I.useCallback(()=>{window.close(),t(!0)},[]),r=J2();if(e)return f.jsx(tj,{});const o=/^\/m\/([a-z0-9-]{1,80})\/?$/.exec(r);return o?f.jsx(fj,{mapId:o[1],onStopped:n},o[1]):f.jsx(nj,{onStopped:n})}function uj({mapId:e,question:t}){const[n,r]=I.useState([]);I.useEffect(()=>{bt.list().then(i=>r([...i.making.map(s=>({...s,making:!0})),...i.maps.map(s=>({id:s.id,question:s.question}))]),()=>{})},[e]);const o=n.some(i=>i.id===e)?n:[{id:e,question:t},...n];return f.jsx("select",{className:"switcher",value:e,onChange:i=>Sl(Pt(i.target.value)),"aria-label":"Switch to another map",title:"Switch to another map in this repo",children:o.map(i=>f.jsxs("option",{value:i.id,children:[i.question||i.id,i.making?" (being made)":""]},i.id))})}function cj({report:e}){if(!e)return null;const t=e.summary.unconfirmed,{pending:n,done:r}=e.summary.proposals??{pending:0,done:0},o=n+r,i=o?f.jsx("span",{className:"map-status proposals",title:"Parts of this map are a proposal, drawn in violet: they aren't in the code yet, or would change or go. illuminate checks the code to see which have been done.",children:r===0?`${o} proposed ${o===1?"change":"changes"}`:`${r} of ${o} proposed changes done`}):null,s=f.jsxs(f.Fragment,{children:[i,f.jsx(dj,{report:e})]});return t?f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"map-status off",title:"Every time the map is shown, illuminate re-checks it against the code. These parts no longer hold, usually because the code changed after the map was made. They're dashed and marked ? on the map; click one to see why.",children:t===1?"1 part of this map doesn’t match the code":`${t} parts of this map don’t match the code`}),s]}):f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"map-status ok",title:"Every box and arrow on this map was just re-checked and is really in the code, and every gap's search still finds nothing. That shows each part is real; it doesn't show the map covers everything.",children:"✓ Every part is in the code"}),s]})}function dj({report:e}){const t=e.since;if(!t)return null;if(!t.commit)return f.jsx("span",{className:"map-status off",title:`This map compares the code with "${t.ref}", but that isn't a commit in this repo, so nothing could be compared.`,children:"Can’t find the commit this map compares with"});const{added:n,changed:r,removed:o}=e.summary.changes??{added:0,changed:0,removed:0},i=t.date?new Date(t.date).toLocaleString(void 0,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}):null,s=[n&&`${n} added`,r&&`${r} changed`,o&&`${o} removed`].filter(Boolean).join(" · ");return f.jsxs("span",{className:"map-status changes",title:`This map shows the code as it is now, compared with commit ${t.commit.slice(0,7)}${t.subject?` ("${t.subject}")`:""}. illuminate works out from the two versions which boxes and arrows are new, different or gone. It can't tell who made a change.`,children:["Changes since ",t.commit.slice(0,7),i?` (${i})`:"",s?`: ${s}`:": nothing on this map differs"]})}function fj({mapId:e,onStopped:t}){var O,N,z,C,T,$,M,L;const[n,r]=I.useReducer(c2,e,i2),[o,i]=I.useState(""),[s,l]=oj(),a=I.useRef(!1),u=I.useCallback(()=>{bt.get(e).then(j=>r({type:"loaded",payload:j}),j=>r(j instanceof _0&&/No such map/.test(j.message)?{type:"missing"}:{type:"error",message:j.message}))},[e]);I.useEffect(u,[u]),I.useEffect(()=>C0(j=>r({type:"event",event:j}),j=>{r({type:"connected",value:j}),j&&a.current===!1&&n.phase!=="loading"&&u(),a.current=j},t),[]);const[d,h]=I.useState(null);I.useEffect(()=>h(null),[n.tour]);const c=n.map&&n.tour!==null&&d===n.tour?((O=n.map.tour[n.tour])==null?void 0:O.title)??null:null,p=I.useCallback(j=>{const R=j.trim();if(!R||n.job)return;const V=c?r2(c,R):R;bt.ask(e,V,n.selection).then(()=>i(""),U=>r({type:"error",message:U.message}))},[e,n.job,n.selection,c]),y=(j,R)=>{R==="approve"&&r({type:"fixStatus",fixId:j,status:"applying",problems:[]}),bt[R](e,j).catch(V=>{r(R==="approve"?{type:"fixStatus",fixId:j,status:"failed",problems:V.problems.length?V.problems:[V.message]}:{type:"error",message:[V.message,...V.problems].join(" ")})})},x=(j,R)=>{bt.offer(e,j,R).then(V=>{V.id&&Sl(Pt(V.id))},V=>r({type:"error",message:V.message}))};I.useEffect(()=>{const j=R=>{const V=R.target instanceof HTMLTextAreaElement||R.target instanceof HTMLInputElement;if(R.key==="Escape"){po(n.selection)?r({type:"clearSelection"}):n.tour!==null&&n.peek?r({type:"peek",open:!1}):n.tour!==null?r({type:"tour",stop:null}):r({type:"overview"});return}V||n.tour===null||(R.key==="ArrowRight"&&r({type:"tour",stop:n.tour+1}),R.key==="ArrowLeft"&&r({type:"tour",stop:n.tour-1}))};return window.addEventListener("keydown",j),()=>window.removeEventListener("keydown",j)},[n.tour,n.peek,n.selection]);const k=n.answers.find(j=>j.id===n.shown),m=k!=null&&k.fix&&["proposed","applying","failed"].includes(((N=n.fixes[k.fix.id])==null?void 0:N.status)??"")?k.fix:null,v=I.useCallback((j,R,V)=>r({type:"select",kind:j,id:R,additive:V}),[]),g=I.useCallback(()=>r({type:"clearSelection"}),[]),w=I0(n),_=l2(n),S=s2(n),E=!!n.map&&n.tour!==null,b=(!n.map||!!n.error||!!n.job||n.shown!==null)&&(!E||n.peek||!!n.error||((z=n.job)==null?void 0:z.kind)==="ask"),D=E&&((T=P0(n.map,n.report,((C=n.map.tour[n.tour])==null?void 0:C.focus.nodes)??[]))==null?void 0:T.show.kind)==="wireframe",A=b&&!!n.map,H=n.map?f.jsx(w2,{map:n.map,selection:n.selection,draft:o,busy:!!n.job,autoFocus:A,onDraft:i,onRemove:(j,R)=>r({type:"select",kind:j,id:R,additive:!0}),step:c,onRemoveStep:()=>h(null),onSend:()=>p(o)}):null;return f.jsx(k0,{children:f.jsxs("div",{className:"app",children:[f.jsxs("header",{className:"topbar",children:[f.jsxs("a",{className:"brand",href:Pt(),title:"All maps in this repo",children:[f.jsx("i",{className:"brand-mark","aria-hidden":"true"}),"illuminate"]}),f.jsxs("div",{className:"topbar-map",children:[(($=n.meta)==null?void 0:$.parent)&&f.jsxs("a",{className:"crumb",href:Pt(n.meta.parent.mapId),title:`Back to the map this one came from: ${n.meta.parent.question}`,children:["← ",n.meta.parent.question]}),f.jsx(uj,{mapId:e,question:((M=n.map)==null?void 0:M.question)??((L=n.job)==null?void 0:L.question)??""})]}),f.jsx(cj,{report:n.report}),f.jsx("a",{className:"pill-btn",href:Pt(),title:"Ask a new question and make a map for it",children:"New map"}),f.jsx(O0,{busy:!!n.job,onStopped:t,onError:j=>r({type:"error",message:j})}),f.jsx("span",{className:n.connected?"live on":"live",title:n.connected?"Connected to illuminate":"Reconnecting to illuminate…"})]}),f.jsxs("div",{className:b?"body":"body full",style:{"--panel-w":`${s}px`},children:[f.jsx("div",{className:"canvas",children:n.map&&w?f.jsxs(f.Fragment,{children:[f.jsx(Z2,{map:w,report:n.report,selection:n.selection,view:S,fresh:n.fresh,added:_,ghost:m??null,touring:E,tourWide:D,onSelect:v,onClear:g}),!b&&f.jsx(S2,{state:n,dispatch:r}),po(n.selection)>0&&f.jsx(_2,{mapId:e,map:w,report:n.report,selection:n.selection,onClose:g}),E&&po(n.selection)===0&&f.jsx(sj,{map:n.map,report:n.report,stop:n.tour,onTour:j=>r({type:"tour",stop:j}),onAsk:()=>{var j;h(n.tour),(j=document.getElementById("ask"))==null||j.focus()}}),f.jsx(k2,{map:n.map,tour:n.tour,onTour:j=>r({type:"tour",stop:j}),selected:po(n.selection),children:A?null:H})]}):f.jsx("div",{className:"empty",children:n.phase==="making"?f.jsx("div",{className:"pulse",children:"Claude is exploring the code…"}):null})}),b&&f.jsx(ij,{width:s,onWidth:l}),b&&f.jsx(m2,{state:n,dispatch:r,onFix:y,onFocus:j=>r({type:"focus",id:j}),onOffer:x,composer:A?H:null})]})]})})}Tm(document.getElementById("root")).render(f.jsx(I.StrictMode,{children:f.jsx(lj,{})}));export{hj as c,xh as g};
|
|
71
|
+
//# sourceMappingURL=index-DhDORCdv.js.map
|