@zoldia/omnigraph 1.0.0 → 1.2.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 +76 -94
- package/dist/cli.js +396 -1
- package/package.json +12 -3
- package/ui/assets/index-B4R9LC7F.js +23 -0
- package/ui/gif.worker.js +3 -0
- package/ui/index.html +1 -1
- package/ui/assets/index-DKa11qnN.js +0 -11
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),l=(e=>typeof require<`u`?require:typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(typeof require<`u`?require:e)[t]}):e)(function(e){if(typeof require<`u`)return require.apply(this,arguments);throw Error('Calling `require` for "'+e+"\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.")});(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var u=o((e=>{var t=Symbol.for(`react.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.provider`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.iterator;function p(e){return typeof e!=`object`||!e?null:(e=f&&e[f]||e[`@@iterator`],typeof e==`function`?e:null)}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h=Object.assign,g={};function _(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}_.prototype.isReactComponent={},_.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`)},_.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function v(){}v.prototype=_.prototype;function y(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}var b=y.prototype=new v;b.constructor=y,h(b,_.prototype),b.isPureReactComponent=!0;var x=Array.isArray,S=Object.prototype.hasOwnProperty,C={current:null},w={key:!0,ref:!0,__self:!0,__source:!0};function T(e,n,r){var i,a={},o=null,s=null;if(n!=null)for(i in n.ref!==void 0&&(s=n.ref),n.key!==void 0&&(o=``+n.key),n)S.call(n,i)&&!w.hasOwnProperty(i)&&(a[i]=n[i]);var c=arguments.length-2;if(c===1)a.children=r;else if(1<c){for(var l=Array(c),u=0;u<c;u++)l[u]=arguments[u+2];a.children=l}if(e&&e.defaultProps)for(i in c=e.defaultProps,c)a[i]===void 0&&(a[i]=c[i]);return{$$typeof:t,type:e,key:o,ref:s,props:a,_owner:C.current}}function E(e,n){return{$$typeof:t,type:e.type,key:n,ref:e.ref,props:e.props,_owner:e._owner}}function D(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function O(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var k=/\/+/g;function A(e,t){return typeof e==`object`&&e&&e.key!=null?O(``+e.key):t.toString(36)}function j(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0}}if(c)return c=e,o=o(c),e=a===``?`.`+A(c,0):a,x(o)?(i=``,e!=null&&(i=e.replace(k,`$&/`)+`/`),j(o,r,i,``,function(e){return e})):o!=null&&(D(o)&&(o=E(o,i+(!o.key||c&&c.key===o.key?``:(``+o.key).replace(k,`$&/`)+`/`)+e)),r.push(o)),1;if(c=0,a=a===``?`.`:a+`:`,x(e))for(var l=0;l<e.length;l++){s=e[l];var u=a+A(s,l);c+=j(s,r,i,u,o)}else if(u=p(e),typeof u==`function`)for(e=u.call(e),l=0;!(s=e.next()).done;)s=s.value,u=a+A(s,l++),c+=j(s,r,i,u,o);else if(s===`object`)throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`);return c}function M(e,t,n){if(e==null)return e;var r=[],i=0;return j(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function N(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var P={current:null},F={transition:null},ee={ReactCurrentDispatcher:P,ReactCurrentBatchConfig:F,ReactCurrentOwner:C};function te(){throw Error(`act(...) is not supported in production builds of React.`)}e.Children={map:M,forEach:function(e,t,n){M(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return M(e,function(){t++}),t},toArray:function(e){return M(e,function(e){return e})||[]},only:function(e){if(!D(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}},e.Component=_,e.Fragment=r,e.Profiler=a,e.PureComponent=y,e.StrictMode=i,e.Suspense=l,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ee,e.act=te,e.cloneElement=function(e,n,r){if(e==null)throw Error(`React.cloneElement(...): The argument must be a React element, but you passed `+e+`.`);var i=h({},e.props),a=e.key,o=e.ref,s=e._owner;if(n!=null){if(n.ref!==void 0&&(o=n.ref,s=C.current),n.key!==void 0&&(a=``+n.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(l in n)S.call(n,l)&&!w.hasOwnProperty(l)&&(i[l]=n[l]===void 0&&c!==void 0?c[l]:n[l])}var l=arguments.length-2;if(l===1)i.children=r;else if(1<l){c=Array(l);for(var u=0;u<l;u++)c[u]=arguments[u+2];i.children=c}return{$$typeof:t,type:e.type,key:a,ref:o,props:i,_owner:s}},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:o,_context:e},e.Consumer=e},e.createElement=T,e.createFactory=function(e){var t=T.bind(null,e);return t.type=e,t},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=D,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:N}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=F.transition;F.transition={};try{e()}finally{F.transition=t}},e.unstable_act=te,e.useCallback=function(e,t){return P.current.useCallback(e,t)},e.useContext=function(e){return P.current.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e){return P.current.useDeferredValue(e)},e.useEffect=function(e,t){return P.current.useEffect(e,t)},e.useId=function(){return P.current.useId()},e.useImperativeHandle=function(e,t,n){return P.current.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return P.current.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return P.current.useLayoutEffect(e,t)},e.useMemo=function(e,t){return P.current.useMemo(e,t)},e.useReducer=function(e,t,n){return P.current.useReducer(e,t,n)},e.useRef=function(e){return P.current.useRef(e)},e.useState=function(e){return P.current.useState(e)},e.useSyncExternalStore=function(e,t,n){return P.current.useSyncExternalStore(e,t,n)},e.useTransition=function(){return P.current.useTransition()},e.version=`18.3.1`})),d=o(((e,t)=>{t.exports=u()})),f=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=typeof setTimeout==`function`?setTimeout:null,_=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 y(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function b(e){if(h=!1,y(e),!m)if(n(c)!==null)m=!0,M(x);else{var t=n(l);t!==null&&N(b,t.startTime-e)}}function x(t,i){m=!1,h&&(h=!1,_(w),w=-1),p=!0;var a=f;try{for(y(i),d=n(c);d!==null&&(!(d.expirationTime>i)||t&&!D());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=i);i=e.unstable_now(),typeof s==`function`?d.callback=s:d===n(c)&&r(c),y(i)}else r(c);d=n(c)}if(d!==null)var u=!0;else{var g=n(l);g!==null&&N(b,g.startTime-i),u=!1}return u}finally{d=null,f=a,p=!1}}var S=!1,C=null,w=-1,T=5,E=-1;function D(){return!(e.unstable_now()-E<T)}function O(){if(C!==null){var t=e.unstable_now();E=t;var n=!0;try{n=C(!0,t)}finally{n?k():(S=!1,C=null)}}else S=!1}var k;if(typeof v==`function`)k=function(){v(O)};else if(typeof MessageChannel<`u`){var A=new MessageChannel,j=A.port2;A.port1.onmessage=O,k=function(){j.postMessage(null)}}else k=function(){g(O,0)};function M(e){C=e,S||(S=!0,k())}function N(t,n){w=g(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_continueExecution=function(){m||p||(m=!0,M(x))},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):T=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(_(w),w=-1):h=!0,N(b,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,M(x))),r},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),p=o(((e,t)=>{t.exports=f()})),m=o((e=>{var t=d(),n=p();function r(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 i=new Set,a={};function o(e,t){s(e,t),s(e+`Capture`,t)}function s(e,t){for(a[e]=t,e=0;e<t.length;e++)i.add(t[e])}var c=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),l=Object.prototype.hasOwnProperty,u=/^[: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]*$/,f={},m={};function h(e){return l.call(m,e)?!0:l.call(f,e)?!1:u.test(e)?m[e]=!0:(f[e]=!0,!1)}function g(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?(e=e.toLowerCase().slice(0,5),e!==`data-`&&e!==`aria-`):!n.acceptsBooleans;default:return!1}}function _(e,t,n,r){if(t==null||g(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function v(e,t,n,r,i,a,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var y={};`children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style`.split(` `).forEach(function(e){y[e]=new v(e,0,!1,e,null,!1,!1)}),[[`acceptCharset`,`accept-charset`],[`className`,`class`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`]].forEach(function(e){var t=e[0];y[t]=new v(t,1,!1,e[1],null,!1,!1)}),[`contentEditable`,`draggable`,`spellCheck`,`value`].forEach(function(e){y[e]=new v(e,2,!1,e.toLowerCase(),null,!1,!1)}),[`autoReverse`,`externalResourcesRequired`,`focusable`,`preserveAlpha`].forEach(function(e){y[e]=new v(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){y[e]=new v(e,3,!1,e.toLowerCase(),null,!1,!1)}),[`checked`,`multiple`,`muted`,`selected`].forEach(function(e){y[e]=new v(e,3,!0,e,null,!1,!1)}),[`capture`,`download`].forEach(function(e){y[e]=new v(e,4,!1,e,null,!1,!1)}),[`cols`,`rows`,`size`,`span`].forEach(function(e){y[e]=new v(e,6,!1,e,null,!1,!1)}),[`rowSpan`,`start`].forEach(function(e){y[e]=new v(e,5,!1,e.toLowerCase(),null,!1,!1)});var b=/[\-:]([a-z])/g;function x(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(b,x);y[t]=new v(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(b,x);y[t]=new v(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(b,x);y[t]=new v(t,1,!1,e,`http://www.w3.org/XML/1998/namespace`,!1,!1)}),[`tabIndex`,`crossOrigin`].forEach(function(e){y[e]=new v(e,1,!1,e.toLowerCase(),null,!1,!1)}),y.xlinkHref=new v(`xlinkHref`,1,!1,`xlink:href`,`http://www.w3.org/1999/xlink`,!0,!1),[`src`,`href`,`action`,`formAction`].forEach(function(e){y[e]=new v(e,1,!1,e.toLowerCase(),null,!0,!0)});function S(e,t,n,r){var i=y.hasOwnProperty(t)?y[t]:null;(i===null?r||!(2<t.length)||t[0]!==`o`&&t[0]!==`O`||t[1]!==`n`&&t[1]!==`N`:i.type!==0)&&(_(t,n,i,r)&&(n=null),r||i===null?h(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,``+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:``:n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&!0===n?``:``+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var C=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,w=Symbol.for(`react.element`),T=Symbol.for(`react.portal`),E=Symbol.for(`react.fragment`),D=Symbol.for(`react.strict_mode`),O=Symbol.for(`react.profiler`),k=Symbol.for(`react.provider`),A=Symbol.for(`react.context`),j=Symbol.for(`react.forward_ref`),M=Symbol.for(`react.suspense`),N=Symbol.for(`react.suspense_list`),P=Symbol.for(`react.memo`),F=Symbol.for(`react.lazy`),ee=Symbol.for(`react.offscreen`),te=Symbol.iterator;function I(e){return typeof e!=`object`||!e?null:(e=te&&e[te]||e[`@@iterator`],typeof e==`function`?e:null)}var L=Object.assign,R;function ne(e){if(R===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);R=t&&t[1]||``}return`
|
|
2
|
+
`+R+e}var re=!1;function ie(e,t){if(!e||re)return``;re=!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(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&typeof t.stack==`string`){for(var i=t.stack.split(`
|
|
3
|
+
`),a=r.stack.split(`
|
|
4
|
+
`),o=i.length-1,s=a.length-1;1<=o&&0<=s&&i[o]!==a[s];)s--;for(;1<=o&&0<=s;o--,s--)if(i[o]!==a[s]){if(o!==1||s!==1)do if(o--,s--,0>s||i[o]!==a[s]){var c=`
|
|
5
|
+
`+i[o].replace(` at new `,` at `);return e.displayName&&c.includes(`<anonymous>`)&&(c=c.replace(`<anonymous>`,e.displayName)),c}while(1<=o&&0<=s);break}}}finally{re=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:``)?ne(e):``}function ae(e){switch(e.tag){case 5:return ne(e.type);case 16:return ne(`Lazy`);case 13:return ne(`Suspense`);case 19:return ne(`SuspenseList`);case 0:case 2:case 15:return e=ie(e.type,!1),e;case 11:return e=ie(e.type.render,!1),e;case 1:return e=ie(e.type,!0),e;default:return``}}function oe(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 E:return`Fragment`;case T:return`Portal`;case O:return`Profiler`;case D:return`StrictMode`;case M:return`Suspense`;case N:return`SuspenseList`}if(typeof e==`object`)switch(e.$$typeof){case A:return(e.displayName||`Context`)+`.Consumer`;case k:return(e._context.displayName||`Context`)+`.Provider`;case j:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case P:return t=e.displayName||null,t===null?oe(e.type)||`Memo`:t;case F:t=e._payload,e=e._init;try{return oe(e(t))}catch{}}return null}function se(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`:`ForwardRef(`+e+`)`);case 7:return`Fragment`;case 5:return t;case 4:return`Portal`;case 3:return`Root`;case 6:return`Text`;case 16:return oe(t);case 8:return t===D?`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 ce(e){switch(typeof e){case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function le(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function ue(e){var t=le(e)?`checked`:`value`,n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=``+e[t];if(!e.hasOwnProperty(t)&&n!==void 0&&typeof n.get==`function`&&typeof n.set==`function`){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function de(e){e._valueTracker||=ue(e)}function fe(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=le(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function z(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function B(e,t){var n=t.checked;return L({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function pe(e,t){var n=t.defaultValue==null?``:t.defaultValue,r=t.checked==null?t.defaultChecked:t.checked;n=ce(t.value==null?n:t.value),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type===`checkbox`||t.type===`radio`?t.checked!=null:t.value!=null}}function me(e,t){t=t.checked,t!=null&&S(e,`checked`,t,!1)}function V(e,t){me(e,t);var n=ce(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`)?ge(e,t.type,n):t.hasOwnProperty(`defaultValue`)&&ge(e,t.type,ce(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function he(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 ge(e,t,n){(t!==`number`||z(e.ownerDocument)!==e)&&(n==null?e.defaultValue=``+e._wrapperState.initialValue:e.defaultValue!==``+n&&(e.defaultValue=``+n))}var _e=Array.isArray;function ve(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+ce(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function ye(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(r(91));return L({},t,{value:void 0,defaultValue:void 0,children:``+e._wrapperState.initialValue})}function be(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(r(92));if(_e(n)){if(1<n.length)throw Error(r(93));n=n[0]}t=n}t??=``,n=t}e._wrapperState={initialValue:ce(n)}}function xe(e,t){var n=ce(t.value),r=ce(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 Se(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==``&&t!==null&&(e.value=t)}function Ce(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 we(e,t){return e==null||e===`http://www.w3.org/1999/xhtml`?Ce(t):e===`http://www.w3.org/2000/svg`&&t===`foreignObject`?`http://www.w3.org/1999/xhtml`:e}var Te,Ee=function(e){return typeof MSApp<`u`&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!==`http://www.w3.org/2000/svg`||`innerHTML`in e)e.innerHTML=t;else{for(Te||=document.createElement(`div`),Te.innerHTML=`<svg>`+t.valueOf().toString()+`</svg>`,t=Te.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function De(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Oe={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},ke=[`Webkit`,`ms`,`Moz`,`O`];Object.keys(Oe).forEach(function(e){ke.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Oe[t]=Oe[e]})});function Ae(e,t,n){return t==null||typeof t==`boolean`||t===``?``:n||typeof t!=`number`||t===0||Oe.hasOwnProperty(e)&&Oe[e]?(``+t).trim():t+`px`}function je(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=n.indexOf(`--`)===0,i=Ae(n,t[n],r);n===`float`&&(n=`cssFloat`),r?e.setProperty(n,i):e[n]=i}}var Me=L({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 Ne(e,t){if(t){if(Me[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(r(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(r(60));if(typeof t.dangerouslySetInnerHTML!=`object`||!(`__html`in t.dangerouslySetInnerHTML))throw Error(r(61))}if(t.style!=null&&typeof t.style!=`object`)throw Error(r(62))}}function Pe(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 Fe=null;function Ie(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Le=null,Re=null,ze=null;function Be(e){if(e=zi(e)){if(typeof Le!=`function`)throw Error(r(280));var t=e.stateNode;t&&(t=Vi(t),Le(e.stateNode,e.type,t))}}function Ve(e){Re?ze?ze.push(e):ze=[e]:Re=e}function He(){if(Re){var e=Re,t=ze;if(ze=Re=null,Be(e),t)for(e=0;e<t.length;e++)Be(t[e])}}function Ue(e,t){return e(t)}function We(){}var Ge=!1;function Ke(e,t,n){if(Ge)return e(t,n);Ge=!0;try{return Ue(e,t,n)}finally{Ge=!1,(Re!==null||ze!==null)&&(We(),He())}}function qe(e,t){var n=e.stateNode;if(n===null)return null;var i=Vi(n);if(i===null)return null;n=i[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(i=!i.disabled)||(e=e.type,i=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!i;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(r(231,t,typeof n));return n}var Je=!1;if(c)try{var Ye={};Object.defineProperty(Ye,`passive`,{get:function(){Je=!0}}),window.addEventListener(`test`,Ye,Ye),window.removeEventListener(`test`,Ye,Ye)}catch{Je=!1}function Xe(e,t,n,r,i,a,o,s,c){var l=Array.prototype.slice.call(arguments,3);try{t.apply(n,l)}catch(e){this.onError(e)}}var Ze=!1,Qe=null,$e=!1,et=null,tt={onError:function(e){Ze=!0,Qe=e}};function nt(e,t,n,r,i,a,o,s,c){Ze=!1,Qe=null,Xe.apply(tt,arguments)}function rt(e,t,n,i,a,o,s,c,l){if(nt.apply(this,arguments),Ze){if(Ze){var u=Qe;Ze=!1,Qe=null}else throw Error(r(198));$e||($e=!0,et=u)}}function it(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 at(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 ot(e){if(it(e)!==e)throw Error(r(188))}function st(e){var t=e.alternate;if(!t){if(t=it(e),t===null)throw Error(r(188));return t===e?e:null}for(var n=e,i=t;;){var a=n.return;if(a===null)break;var o=a.alternate;if(o===null){if(i=a.return,i!==null){n=i;continue}break}if(a.child===o.child){for(o=a.child;o;){if(o===n)return ot(a),e;if(o===i)return ot(a),t;o=o.sibling}throw Error(r(188))}if(n.return!==i.return)n=a,i=o;else{for(var s=!1,c=a.child;c;){if(c===n){s=!0,n=a,i=o;break}if(c===i){s=!0,i=a,n=o;break}c=c.sibling}if(!s){for(c=o.child;c;){if(c===n){s=!0,n=o,i=a;break}if(c===i){s=!0,i=o,n=a;break}c=c.sibling}if(!s)throw Error(r(189))}}if(n.alternate!==i)throw Error(r(190))}if(n.tag!==3)throw Error(r(188));return n.stateNode.current===n?e:t}function ct(e){return e=st(e),e===null?null:lt(e)}function lt(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=lt(e);if(t!==null)return t;e=e.sibling}return null}var ut=n.unstable_scheduleCallback,dt=n.unstable_cancelCallback,ft=n.unstable_shouldYield,pt=n.unstable_requestPaint,mt=n.unstable_now,ht=n.unstable_getCurrentPriorityLevel,gt=n.unstable_ImmediatePriority,_t=n.unstable_UserBlockingPriority,vt=n.unstable_NormalPriority,yt=n.unstable_LowPriority,bt=n.unstable_IdlePriority,xt=null,St=null;function Ct(e){if(St&&typeof St.onCommitFiberRoot==`function`)try{St.onCommitFiberRoot(xt,e,void 0,(e.current.flags&128)==128)}catch{}}var wt=Math.clz32?Math.clz32:Dt,Tt=Math.log,Et=Math.LN2;function Dt(e){return e>>>=0,e===0?32:31-(Tt(e)/Et|0)|0}var Ot=64,kt=4194304;function At(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 jt(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,o=n&268435455;if(o!==0){var s=o&~i;s===0?(a&=o,a!==0&&(r=At(a))):r=At(s)}else o=n&~i,o===0?a!==0&&(r=At(a)):r=At(o);if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,a=t&-t,i>=a||i===16&&a&4194240))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-wt(t),i=1<<n,r|=e[n],t&=~i;return r}function Mt(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 Nt(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var o=31-wt(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Mt(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}}function Pt(e){return e=e.pendingLanes&-1073741825,e===0?e&1073741824?1073741824:0:e}function Ft(){var e=Ot;return Ot<<=1,!(Ot&4194240)&&(Ot=64),e}function It(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Lt(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-wt(t),e[t]=n}function Rt(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-wt(n),a=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~a}}function zt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-wt(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var H=0;function Bt(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Vt,Ht,Ut,Wt,Gt,Kt=!1,qt=[],Jt=null,Yt=null,Xt=null,Zt=new Map,Qt=new Map,$t=[],en=`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 tn(e,t){switch(e){case`focusin`:case`focusout`:Jt=null;break;case`dragenter`:case`dragleave`:Yt=null;break;case`mouseover`:case`mouseout`:Xt=null;break;case`pointerover`:case`pointerout`:Zt.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Qt.delete(t.pointerId)}}function nn(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=zi(t),t!==null&&Ht(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function rn(e,t,n,r,i){switch(t){case`focusin`:return Jt=nn(Jt,e,t,n,r,i),!0;case`dragenter`:return Yt=nn(Yt,e,t,n,r,i),!0;case`mouseover`:return Xt=nn(Xt,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Zt.set(a,nn(Zt.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Qt.set(a,nn(Qt.get(a)||null,e,t,n,r,i)),!0}return!1}function an(e){var t=Ri(e.target);if(t!==null){var n=it(t);if(n!==null){if(t=n.tag,t===13){if(t=at(n),t!==null){e.blockedOn=t,Gt(e.priority,function(){Ut(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 on(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=_n(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Fe=r,n.target.dispatchEvent(r),Fe=null}else return t=zi(n),t!==null&&Ht(t),e.blockedOn=n,!1;t.shift()}return!0}function sn(e,t,n){on(e)&&n.delete(t)}function cn(){Kt=!1,Jt!==null&&on(Jt)&&(Jt=null),Yt!==null&&on(Yt)&&(Yt=null),Xt!==null&&on(Xt)&&(Xt=null),Zt.forEach(sn),Qt.forEach(sn)}function ln(e,t){e.blockedOn===t&&(e.blockedOn=null,Kt||(Kt=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,cn)))}function un(e){function t(t){return ln(t,e)}if(0<qt.length){ln(qt[0],e);for(var n=1;n<qt.length;n++){var r=qt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Jt!==null&&ln(Jt,e),Yt!==null&&ln(Yt,e),Xt!==null&&ln(Xt,e),Zt.forEach(t),Qt.forEach(t),n=0;n<$t.length;n++)r=$t[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<$t.length&&(n=$t[0],n.blockedOn===null);)an(n),n.blockedOn===null&&$t.shift()}var dn=C.ReactCurrentBatchConfig,fn=!0;function pn(e,t,n,r){var i=H,a=dn.transition;dn.transition=null;try{H=1,hn(e,t,n,r)}finally{H=i,dn.transition=a}}function mn(e,t,n,r){var i=H,a=dn.transition;dn.transition=null;try{H=4,hn(e,t,n,r)}finally{H=i,dn.transition=a}}function hn(e,t,n,r){if(fn){var i=_n(e,t,n,r);if(i===null)ui(e,t,r,gn,n),tn(e,r);else if(rn(i,e,t,n,r))r.stopPropagation();else if(tn(e,r),t&4&&-1<en.indexOf(e)){for(;i!==null;){var a=zi(i);if(a!==null&&Vt(a),a=_n(e,t,n,r),a===null&&ui(e,t,r,gn,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else ui(e,t,r,null,n)}}var gn=null;function _n(e,t,n,r){if(gn=null,e=Ie(r),e=Ri(e),e!==null)if(t=it(e),t===null)e=null;else if(n=t.tag,n===13){if(e=at(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 gn=e,null}function vn(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(ht()){case gt:return 1;case _t:return 4;case vt:case yt:return 16;case bt:return 536870912;default:return 16}default:return 16}}var yn=null,bn=null,xn=null;function Sn(){if(xn)return xn;var e,t=bn,n=t.length,r,i=`value`in yn?yn.value:yn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return xn=i.slice(e,1<r?1-r:void 0)}function Cn(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 wn(){return!0}function Tn(){return!1}function En(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?wn:Tn,this.isPropagationStopped=Tn,this}return L(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=wn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=wn)},persist:function(){},isPersistent:wn}),t}var Dn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},On=En(Dn),kn=L({},Dn,{view:0,detail:0}),An=En(kn),jn,Mn,Nn,Pn=L({},kn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Gn,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!==Nn&&(Nn&&e.type===`mousemove`?(jn=e.screenX-Nn.screenX,Mn=e.screenY-Nn.screenY):Mn=jn=0,Nn=e),jn)},movementY:function(e){return`movementY`in e?e.movementY:Mn}}),Fn=En(Pn),In=En(L({},Pn,{dataTransfer:0})),Ln=En(L({},kn,{relatedTarget:0})),Rn=En(L({},Dn,{animationName:0,elapsedTime:0,pseudoElement:0})),zn=En(L({},Dn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Bn=En(L({},Dn,{data:0})),Vn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Hn={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`},Un={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Wn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Un[e])?!!t[e]:!1}function Gn(){return Wn}var Kn=En(L({},kn,{key:function(e){if(e.key){var t=Vn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=Cn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Hn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Gn,charCode:function(e){return e.type===`keypress`?Cn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?Cn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),qn=En(L({},Pn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Jn=En(L({},kn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Gn})),Yn=En(L({},Dn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Xn=En(L({},Pn,{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})),Zn=[9,13,27,32],Qn=c&&`CompositionEvent`in window,$n=null;c&&`documentMode`in document&&($n=document.documentMode);var er=c&&`TextEvent`in window&&!$n,tr=c&&(!Qn||$n&&8<$n&&11>=$n),nr=` `,rr=!1;function ir(e,t){switch(e){case`keyup`:return Zn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function ar(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var or=!1;function sr(e,t){switch(e){case`compositionend`:return ar(t);case`keypress`:return t.which===32?(rr=!0,nr):null;case`textInput`:return e=t.data,e===nr&&rr?null:e;default:return null}}function cr(e,t){if(or)return e===`compositionend`||!Qn&&ir(e,t)?(e=Sn(),xn=bn=yn=null,or=!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 tr&&t.locale!==`ko`?null:t.data;default:return null}}var lr={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 ur(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!lr[e.type]:t===`textarea`}function dr(e,t,n,r){Ve(r),t=fi(t,`onChange`),0<t.length&&(n=new On(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var fr=null,pr=null;function mr(e){ai(e,0)}function hr(e){if(fe(Bi(e)))return e}function gr(e,t){if(e===`change`)return t}var _r=!1;if(c){var vr;if(c){var yr=`oninput`in document;if(!yr){var br=document.createElement(`div`);br.setAttribute(`oninput`,`return;`),yr=typeof br.oninput==`function`}vr=yr}else vr=!1;_r=vr&&(!document.documentMode||9<document.documentMode)}function xr(){fr&&(fr.detachEvent(`onpropertychange`,Sr),pr=fr=null)}function Sr(e){if(e.propertyName===`value`&&hr(pr)){var t=[];dr(t,pr,e,Ie(e)),Ke(mr,t)}}function Cr(e,t,n){e===`focusin`?(xr(),fr=t,pr=n,fr.attachEvent(`onpropertychange`,Sr)):e===`focusout`&&xr()}function wr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return hr(pr)}function Tr(e,t){if(e===`click`)return hr(t)}function Er(e,t){if(e===`input`||e===`change`)return hr(t)}function Dr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Or=typeof Object.is==`function`?Object.is:Dr;function kr(e,t){if(Or(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!l.call(t,i)||!Or(e[i],t[i]))return!1}return!0}function Ar(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function jr(e,t){var n=Ar(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}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Ar(n)}}function Mr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Mr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Nr(){for(var e=window,t=z();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=z(e.document)}return t}function Pr(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 Fr(e){var t=Nr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Mr(n.ownerDocument.documentElement,n)){if(r!==null&&Pr(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),`selectionStart`in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,a=Math.min(r.start,i);r=r.end===void 0?a:Math.min(r.end,i),!e.extend&&a>r&&(i=r,r=a,a=i),i=jr(n,a);var o=jr(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.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 Ir=c&&`documentMode`in document&&11>=document.documentMode,Lr=null,Rr=null,zr=null,Br=!1;function Vr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Br||Lr==null||Lr!==z(r)||(r=Lr,`selectionStart`in r&&Pr(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}),zr&&kr(zr,r)||(zr=r,r=fi(Rr,`onSelect`),0<r.length&&(t=new On(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Lr)))}function Hr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Ur={animationend:Hr(`Animation`,`AnimationEnd`),animationiteration:Hr(`Animation`,`AnimationIteration`),animationstart:Hr(`Animation`,`AnimationStart`),transitionend:Hr(`Transition`,`TransitionEnd`)},Wr={},Gr={};c&&(Gr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Ur.animationend.animation,delete Ur.animationiteration.animation,delete Ur.animationstart.animation),`TransitionEvent`in window||delete Ur.transitionend.transition);function Kr(e){if(Wr[e])return Wr[e];if(!Ur[e])return e;var t=Ur[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Gr)return Wr[e]=t[n];return e}var qr=Kr(`animationend`),Jr=Kr(`animationiteration`),Yr=Kr(`animationstart`),Xr=Kr(`transitionend`),Zr=new Map,Qr=`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 $r(e,t){Zr.set(e,t),o(t,[e])}for(var ei=0;ei<Qr.length;ei++){var ti=Qr[ei];$r(ti.toLowerCase(),`on`+(ti[0].toUpperCase()+ti.slice(1)))}$r(qr,`onAnimationEnd`),$r(Jr,`onAnimationIteration`),$r(Yr,`onAnimationStart`),$r(`dblclick`,`onDoubleClick`),$r(`focusin`,`onFocus`),$r(`focusout`,`onBlur`),$r(Xr,`onTransitionEnd`),s(`onMouseEnter`,[`mouseout`,`mouseover`]),s(`onMouseLeave`,[`mouseout`,`mouseover`]),s(`onPointerEnter`,[`pointerout`,`pointerover`]),s(`onPointerLeave`,[`pointerout`,`pointerover`]),o(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),o(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),o(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),o(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),o(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),o(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var ni=`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(` `),ri=new Set(`cancel close invalid load scroll toggle`.split(` `).concat(ni));function ii(e,t,n){var r=e.type||`unknown-event`;e.currentTarget=n,rt(r,t,void 0,e),e.currentTarget=null}function ai(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;ii(i,s,l),a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;ii(i,s,l),a=c}}}if($e)throw e=et,$e=!1,et=null,e}function U(e,t){var n=t[Fi];n===void 0&&(n=t[Fi]=new Set);var r=e+`__bubble`;n.has(r)||(li(t,e,2,!1),n.add(r))}function oi(e,t,n){var r=0;t&&(r|=4),li(n,e,r,t)}var si=`_reactListening`+Math.random().toString(36).slice(2);function ci(e){if(!e[si]){e[si]=!0,i.forEach(function(t){t!==`selectionchange`&&(ri.has(t)||oi(t,!1,e),oi(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[si]||(t[si]=!0,oi(`selectionchange`,!1,t))}}function li(e,t,n,r){switch(vn(t)){case 1:var i=pn;break;case 4:i=mn;break;default:i=hn}n=i.bind(null,t,n,e),i=void 0,!Je||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function ui(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var s=r.stateNode.containerInfo;if(s===i||s.nodeType===8&&s.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var c=o.tag;if((c===3||c===4)&&(c=o.stateNode.containerInfo,c===i||c.nodeType===8&&c.parentNode===i))return;o=o.return}for(;s!==null;){if(o=Ri(s),o===null)return;if(c=o.tag,c===5||c===6){r=a=o;continue a}s=s.parentNode}}r=r.return}Ke(function(){var r=a,i=Ie(n),o=[];a:{var s=Zr.get(e);if(s!==void 0){var c=On,l=e;switch(e){case`keypress`:if(Cn(n)===0)break a;case`keydown`:case`keyup`:c=Kn;break;case`focusin`:l=`focus`,c=Ln;break;case`focusout`:l=`blur`,c=Ln;break;case`beforeblur`:case`afterblur`:c=Ln;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:c=Fn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:c=In;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:c=Jn;break;case qr:case Jr:case Yr:c=Rn;break;case Xr:c=Yn;break;case`scroll`:c=An;break;case`wheel`:c=Xn;break;case`copy`:case`cut`:case`paste`:c=zn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:c=qn}var u=(t&4)!=0,d=!u&&e===`scroll`,f=u?s===null?null:s+`Capture`:s;u=[];for(var p=r,m;p!==null;){m=p;var h=m.stateNode;if(m.tag===5&&h!==null&&(m=h,f!==null&&(h=qe(p,f),h!=null&&u.push(di(p,h,m)))),d)break;p=p.return}0<u.length&&(s=new c(s,l,null,n,i),o.push({event:s,listeners:u}))}}if(!(t&7)){a:{if(s=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,s&&n!==Fe&&(l=n.relatedTarget||n.fromElement)&&(Ri(l)||l[Pi]))break a;if((c||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,c?(l=n.relatedTarget||n.toElement,c=r,l=l?Ri(l):null,l!==null&&(d=it(l),l!==d||l.tag!==5&&l.tag!==6)&&(l=null)):(c=null,l=r),c!==l)){if(u=Fn,h=`onMouseLeave`,f=`onMouseEnter`,p=`mouse`,(e===`pointerout`||e===`pointerover`)&&(u=qn,h=`onPointerLeave`,f=`onPointerEnter`,p=`pointer`),d=c==null?s:Bi(c),m=l==null?s:Bi(l),s=new u(h,p+`leave`,c,n,i),s.target=d,s.relatedTarget=m,h=null,Ri(i)===r&&(u=new u(f,p+`enter`,l,n,i),u.target=m,u.relatedTarget=d,h=u),d=h,c&&l)b:{for(u=c,f=l,p=0,m=u;m;m=pi(m))p++;for(m=0,h=f;h;h=pi(h))m++;for(;0<p-m;)u=pi(u),p--;for(;0<m-p;)f=pi(f),m--;for(;p--;){if(u===f||f!==null&&u===f.alternate)break b;u=pi(u),f=pi(f)}u=null}else u=null;c!==null&&mi(o,s,c,u,!1),l!==null&&d!==null&&mi(o,d,l,u,!0)}}a:{if(s=r?Bi(r):window,c=s.nodeName&&s.nodeName.toLowerCase(),c===`select`||c===`input`&&s.type===`file`)var g=gr;else if(ur(s))if(_r)g=Er;else{g=wr;var _=Cr}else (c=s.nodeName)&&c.toLowerCase()===`input`&&(s.type===`checkbox`||s.type===`radio`)&&(g=Tr);if(g&&=g(e,r)){dr(o,g,n,i);break a}_&&_(e,s,r),e===`focusout`&&(_=s._wrapperState)&&_.controlled&&s.type===`number`&&ge(s,`number`,s.value)}switch(_=r?Bi(r):window,e){case`focusin`:(ur(_)||_.contentEditable===`true`)&&(Lr=_,Rr=r,zr=null);break;case`focusout`:zr=Rr=Lr=null;break;case`mousedown`:Br=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Br=!1,Vr(o,n,i);break;case`selectionchange`:if(Ir)break;case`keydown`:case`keyup`:Vr(o,n,i)}var v;if(Qn)b:{switch(e){case`compositionstart`:var y=`onCompositionStart`;break b;case`compositionend`:y=`onCompositionEnd`;break b;case`compositionupdate`:y=`onCompositionUpdate`;break b}y=void 0}else or?ir(e,n)&&(y=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(y=`onCompositionStart`);y&&(tr&&n.locale!==`ko`&&(or||y!==`onCompositionStart`?y===`onCompositionEnd`&&or&&(v=Sn()):(yn=i,bn=`value`in yn?yn.value:yn.textContent,or=!0)),_=fi(r,y),0<_.length&&(y=new Bn(y,e,null,n,i),o.push({event:y,listeners:_}),v?y.data=v:(v=ar(n),v!==null&&(y.data=v)))),(v=er?sr(e,n):cr(e,n))&&(r=fi(r,`onBeforeInput`),0<r.length&&(i=new Bn(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:i,listeners:r}),i.data=v))}ai(o,t)})}function di(e,t,n){return{instance:e,listener:t,currentTarget:n}}function fi(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;i.tag===5&&a!==null&&(i=a,a=qe(e,n),a!=null&&r.unshift(di(e,a,i)),a=qe(e,t),a!=null&&r.push(di(e,a,i))),e=e.return}return r}function pi(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function mi(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(c!==null&&c===r)break;s.tag===5&&l!==null&&(s=l,i?(c=qe(n,a),c!=null&&o.unshift(di(n,c,s))):i||(c=qe(n,a),c!=null&&o.push(di(n,c,s)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var hi=/\r\n?/g,gi=/\u0000|\uFFFD/g;function _i(e){return(typeof e==`string`?e:``+e).replace(hi,`
|
|
6
|
+
`).replace(gi,``)}function vi(e,t,n){if(t=_i(t),_i(e)!==t&&n)throw Error(r(425))}function yi(){}var bi=null,xi=null;function Si(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 Ci=typeof setTimeout==`function`?setTimeout:void 0,wi=typeof clearTimeout==`function`?clearTimeout:void 0,Ti=typeof Promise==`function`?Promise:void 0,Ei=typeof queueMicrotask==`function`?queueMicrotask:Ti===void 0?Ci:function(e){return Ti.resolve(null).then(e).catch(Di)};function Di(e){setTimeout(function(){throw e})}function Oi(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`){if(r===0){e.removeChild(i),un(t);return}r--}else n!==`$`&&n!==`$?`&&n!==`$!`||r++;n=i}while(n);un(t)}function ki(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 Ai(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 ji=Math.random().toString(36).slice(2),Mi=`__reactFiber$`+ji,Ni=`__reactProps$`+ji,Pi=`__reactContainer$`+ji,Fi=`__reactEvents$`+ji,Ii=`__reactListeners$`+ji,Li=`__reactHandles$`+ji;function Ri(e){var t=e[Mi];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Pi]||n[Mi]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Ai(e);e!==null;){if(n=e[Mi])return n;e=Ai(e)}return t}e=n,n=e.parentNode}return null}function zi(e){return e=e[Mi]||e[Pi],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Bi(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(r(33))}function Vi(e){return e[Ni]||null}var Hi=[],Ui=-1;function Wi(e){return{current:e}}function W(e){0>Ui||(e.current=Hi[Ui],Hi[Ui]=null,Ui--)}function G(e,t){Ui++,Hi[Ui]=e.current,e.current=t}var Gi={},Ki=Wi(Gi),qi=Wi(!1),Ji=Gi;function Yi(e,t){var n=e.type.contextTypes;if(!n)return Gi;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in n)i[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Xi(e){return e=e.childContextTypes,e!=null}function Zi(){W(qi),W(Ki)}function Qi(e,t,n){if(Ki.current!==Gi)throw Error(r(168));G(Ki,t),G(qi,n)}function $i(e,t,n){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!=`function`)return n;for(var a in i=i.getChildContext(),i)if(!(a in t))throw Error(r(108,se(e)||`Unknown`,a));return L({},n,i)}function ea(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Gi,Ji=Ki.current,G(Ki,e),G(qi,qi.current),!0}function ta(e,t,n){var i=e.stateNode;if(!i)throw Error(r(169));n?(e=$i(e,t,Ji),i.__reactInternalMemoizedMergedChildContext=e,W(qi),W(Ki),G(Ki,e)):W(qi),G(qi,n)}var na=null,ra=!1,ia=!1;function aa(e){na===null?na=[e]:na.push(e)}function oa(e){ra=!0,aa(e)}function sa(){if(!ia&&na!==null){ia=!0;var e=0,t=H;try{var n=na;for(H=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}na=null,ra=!1}catch(t){throw na!==null&&(na=na.slice(e+1)),ut(gt,sa),t}finally{H=t,ia=!1}}return null}var ca=[],la=0,ua=null,da=0,fa=[],pa=0,ma=null,ha=1,ga=``;function _a(e,t){ca[la++]=da,ca[la++]=ua,ua=e,da=t}function va(e,t,n){fa[pa++]=ha,fa[pa++]=ga,fa[pa++]=ma,ma=e;var r=ha;e=ga;var i=32-wt(r)-1;r&=~(1<<i),n+=1;var a=32-wt(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,ha=1<<32-wt(t)+i|n<<i|r,ga=a+e}else ha=1<<a|n<<i|r,ga=e}function ya(e){e.return!==null&&(_a(e,1),va(e,1,0))}function ba(e){for(;e===ua;)ua=ca[--la],ca[la]=null,da=ca[--la],ca[la]=null;for(;e===ma;)ma=fa[--pa],fa[pa]=null,ga=fa[--pa],fa[pa]=null,ha=fa[--pa],fa[pa]=null}var xa=null,Sa=null,K=!1,q=null;function Ca(e,t){var n=ql(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 wa(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?!1:(e.stateNode=t,xa=e,Sa=ki(t.firstChild),!0);case 6:return t=e.pendingProps===``||t.nodeType!==3?null:t,t===null?!1:(e.stateNode=t,xa=e,Sa=null,!0);case 13:return t=t.nodeType===8?t:null,t===null?!1:(n=ma===null?null:{id:ha,overflow:ga},e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=ql(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,xa=e,Sa=null,!0);default:return!1}}function Ta(e){return(e.mode&1)!=0&&(e.flags&128)==0}function Ea(e){if(K){var t=Sa;if(t){var n=t;if(!wa(e,t)){if(Ta(e))throw Error(r(418));t=ki(n.nextSibling);var i=xa;t&&wa(e,t)?Ca(i,n):(e.flags=e.flags&-4097|2,K=!1,xa=e)}}else{if(Ta(e))throw Error(r(418));e.flags=e.flags&-4097|2,K=!1,xa=e}}}function Da(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;xa=e}function Oa(e){if(e!==xa)return!1;if(!K)return Da(e),K=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!==`head`&&t!==`body`&&!Si(e.type,e.memoizedProps)),t&&=Sa){if(Ta(e))throw ka(),Error(r(418));for(;t;)Ca(e,t),t=ki(t.nextSibling)}if(Da(e),e.tag===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(r(317));a:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`){if(t===0){Sa=ki(e.nextSibling);break a}t--}else n!==`$`&&n!==`$!`&&n!==`$?`||t++}e=e.nextSibling}Sa=null}}else Sa=xa?ki(e.stateNode.nextSibling):null;return!0}function ka(){for(var e=Sa;e;)e=ki(e.nextSibling)}function Aa(){Sa=xa=null,K=!1}function ja(e){q===null?q=[e]:q.push(e)}var Ma=C.ReactCurrentBatchConfig;function Na(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(r(309));var i=n.stateNode}if(!i)throw Error(r(147,e));var a=i,o=``+e;return t!==null&&t.ref!==null&&typeof t.ref==`function`&&t.ref._stringRef===o?t.ref:(t=function(e){var t=a.refs;e===null?delete t[o]:t[o]=e},t._stringRef=o,t)}if(typeof e!=`string`)throw Error(r(284));if(!n._owner)throw Error(r(290,e))}return e}function Pa(e,t){throw e=Object.prototype.toString.call(t),Error(r(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e))}function Fa(e){var t=e._init;return t(e._payload)}function Ia(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function i(e,t){for(e=new Map;t!==null;)t.key===null?e.set(t.index,t):e.set(t.key,t),t=t.sibling;return e}function a(e,t){return e=Xl(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=2,n):(r=r.index,r<n?(t.flags|=2,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=2),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=eu(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===E?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===F&&Fa(i)===t.type)?(r=a(t,n.props),r.ref=Na(e,t,n),r.return=e,r):(r=Zl(n.type,n.key,n.props,null,e.mode,r),r.ref=Na(e,t,n),r.return=e,r)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=tu(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=Ql(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`)return t=eu(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case w:return n=Zl(t.type,t.key,t.props,null,e.mode,n),n.ref=Na(e,null,t),n.return=e,n;case T:return t=tu(t,e.mode,n),t.return=e,t;case F:var r=t._init;return f(e,r(t._payload),n)}if(_e(t)||I(t))return t=Ql(t,e.mode,n,null),t.return=e,t;Pa(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case w:return n.key===i?l(e,t,n,r):null;case T:return n.key===i?u(e,t,n,r):null;case F:return i=n._init,p(e,t,i(n._payload),r)}if(_e(n)||I(n))return i===null?d(e,t,n,r,null):null;Pa(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case w:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case T:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case F:var a=r._init;return m(e,t,n,a(r._payload),i)}if(_e(r)||I(r))return e=e.get(n)||null,d(t,e,r,i,null);Pa(t,r)}return null}function h(r,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(r,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(r,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(r,d),K&&_a(r,h),l;if(d===null){for(;h<s.length;h++)d=f(r,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return K&&_a(r,h),l}for(d=i(r,d);h<s.length;h++)g=m(d,r,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(r,e)}),K&&_a(r,h),l}function g(a,s,c,l){var u=I(c);if(typeof u!=`function`)throw Error(r(150));if(c=u.call(c),c==null)throw Error(r(151));for(var d=u=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),K&&_a(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return K&&_a(a,g),u}for(h=i(a,h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),K&&_a(a,g),u}function _(e,r,i,o){if(typeof i==`object`&&i&&i.type===E&&i.key===null&&(i=i.props.children),typeof i==`object`&&i){switch(i.$$typeof){case w:a:{for(var c=i.key,l=r;l!==null;){if(l.key===c){if(c=i.type,c===E){if(l.tag===7){n(e,l.sibling),r=a(l,i.props.children),r.return=e,e=r;break a}}else if(l.elementType===c||typeof c==`object`&&c&&c.$$typeof===F&&Fa(c)===l.type){n(e,l.sibling),r=a(l,i.props),r.ref=Na(e,l,i),r.return=e,e=r;break a}n(e,l);break}else t(e,l);l=l.sibling}i.type===E?(r=Ql(i.props.children,e.mode,o,i.key),r.return=e,e=r):(o=Zl(i.type,i.key,i.props,null,e.mode,o),o.ref=Na(e,r,i),o.return=e,e=o)}return s(e);case T:a:{for(l=i.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===i.containerInfo&&r.stateNode.implementation===i.implementation){n(e,r.sibling),r=a(r,i.children||[]),r.return=e,e=r;break a}else{n(e,r);break}else t(e,r);r=r.sibling}r=tu(i,e.mode,o),r.return=e,e=r}return s(e);case F:return l=i._init,_(e,r,l(i._payload),o)}if(_e(i))return h(e,r,i,o);if(I(i))return g(e,r,i,o);Pa(e,i)}return typeof i==`string`&&i!==``||typeof i==`number`?(i=``+i,r!==null&&r.tag===6?(n(e,r.sibling),r=a(r,i),r.return=e,e=r):(n(e,r),r=eu(i,e.mode,o),r.return=e,e=r),s(e)):n(e,r)}return _}var La=Ia(!0),Ra=Ia(!1),za=Wi(null),Ba=null,J=null,Va=null;function Ha(){Va=J=Ba=null}function Ua(e){var t=za.current;W(za),e._currentValue=t}function Wa(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Ga(e,t){Ba=e,Va=J=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Ns=!0),e.firstContext=null)}function Ka(e){var t=e._currentValue;if(Va!==e)if(e={context:e,memoizedValue:t,next:null},J===null){if(Ba===null)throw Error(r(308));J=e,Ba.dependencies={lanes:0,firstContext:e}}else J=J.next=e;return t}var qa=null;function Ja(e){qa===null?qa=[e]:qa.push(e)}function Ya(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Ja(t)):(n.next=i.next,i.next=n),t.interleaved=n,Xa(e,r)}function Xa(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 Za=!1;function Qa(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function $a(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 eo(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function to(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Q&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Xa(e,n)}return i=r.interleaved,i===null?(t.next=t,Ja(r)):(t.next=i.next,i.next=t),r.interleaved=t,Xa(e,n)}function no(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194240)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,zt(e,n)}}function Y(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,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 ro(e,t,n,r){var i=e.updateQueue;Za=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane,p=s.eventTime;if((r&f)===f){u!==null&&(u=u.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});a:{var m=e,h=s;switch(f=t,p=n,h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(p,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(p,d,f):m,f==null)break a;d=L({},d,f);break a;case 2:Za=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[s]:f.push(s))}else p={eventTime:p,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;f=s,s=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(1);if(u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else a===null&&(i.shared.lanes=0);Yc|=o,e.lanes=o,e.memoizedState=d}}function io(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var i=e[t],a=i.callback;if(a!==null){if(i.callback=null,i=n,typeof a!=`function`)throw Error(r(191,a));a.call(i)}}}var ao={},oo=Wi(ao),so=Wi(ao),co=Wi(ao);function lo(e){if(e===ao)throw Error(r(174));return e}function uo(e,t){switch(G(co,t),G(so,e),G(oo,ao),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:we(null,``);break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=we(t,e)}W(oo),G(oo,t)}function fo(){W(oo),W(so),W(co)}function po(e){lo(co.current);var t=lo(oo.current),n=we(t,e.type);t!==n&&(G(so,e),G(oo,n))}function mo(e){so.current===e&&(W(oo),W(so))}var ho=Wi(0);function go(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 _o=[];function vo(){for(var e=0;e<_o.length;e++)_o[e]._workInProgressVersionPrimary=null;_o.length=0}var yo=C.ReactCurrentDispatcher,bo=C.ReactCurrentBatchConfig,xo=0,So=null,Co=null,wo=null,To=!1,Eo=!1,Do=0,Oo=0;function ko(){throw Error(r(321))}function Ao(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Or(e[n],t[n]))return!1;return!0}function jo(e,t,n,i,a,o){if(xo=o,So=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,yo.current=e===null||e.memoizedState===null?ps:ms,e=n(i,a),Eo){o=0;do{if(Eo=!1,Do=0,25<=o)throw Error(r(301));o+=1,wo=Co=null,t.updateQueue=null,yo.current=hs,e=n(i,a)}while(Eo)}if(yo.current=X,t=Co!==null&&Co.next!==null,xo=0,wo=Co=So=null,To=!1,t)throw Error(r(300));return e}function Mo(){var e=Do!==0;return Do=0,e}function No(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return wo===null?So.memoizedState=wo=e:wo=wo.next=e,wo}function Po(){if(Co===null){var e=So.alternate;e=e===null?null:e.memoizedState}else e=Co.next;var t=wo===null?So.memoizedState:wo.next;if(t!==null)wo=t,Co=e;else{if(e===null)throw Error(r(310));Co=e,e={memoizedState:Co.memoizedState,baseState:Co.baseState,baseQueue:Co.baseQueue,queue:Co.queue,next:null},wo===null?So.memoizedState=wo=e:wo=wo.next=e}return wo}function Fo(e,t){return typeof t==`function`?t(e):t}function Io(e){var t=Po(),n=t.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=e;var i=Co,a=i.baseQueue,o=n.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}i.baseQueue=a=o,n.pending=null}if(a!==null){o=a.next,i=i.baseState;var c=s=null,l=null,u=o;do{var d=u.lane;if((xo&d)===d)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),i=u.hasEagerState?u.eagerState:e(i,u.action);else{var f={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(c=l=f,s=i):l=l.next=f,So.lanes|=d,Yc|=d}u=u.next}while(u!==null&&u!==o);l===null?s=i:l.next=c,Or(i,t.memoizedState)||(Ns=!0),t.memoizedState=i,t.baseState=s,t.baseQueue=l,n.lastRenderedState=i}if(e=n.interleaved,e!==null){a=e;do o=a.lane,So.lanes|=o,Yc|=o,a=a.next;while(a!==e)}else a===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Lo(e){var t=Po(),n=t.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=e;var i=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Or(o,t.memoizedState)||(Ns=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,i]}function Ro(){}function zo(e,t){var n=So,i=Po(),a=t(),o=!Or(i.memoizedState,a);if(o&&(i.memoizedState=a,Ns=!0),i=i.queue,Zo(Ho.bind(null,n,i,e),[e]),i.getSnapshot!==t||o||wo!==null&&wo.memoizedState.tag&1){if(n.flags|=2048,Ko(9,Vo.bind(null,n,i,a,t),void 0,null),Hc===null)throw Error(r(349));xo&30||Bo(n,t,a)}return a}function Bo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=So.updateQueue,t===null?(t={lastEffect:null,stores:null},So.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Vo(e,t,n,r){t.value=n,t.getSnapshot=r,Uo(t)&&Wo(e)}function Ho(e,t,n){return n(function(){Uo(t)&&Wo(e)})}function Uo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Or(e,n)}catch{return!0}}function Wo(e){var t=Xa(e,1);t!==null&&hl(t,e,1,-1)}function Go(e){var t=No();return typeof e==`function`&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Fo,lastRenderedState:e},t.queue=e,e=e.dispatch=ls.bind(null,So,e),[t.memoizedState,e]}function Ko(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=So.updateQueue,t===null?(t={lastEffect:null,stores:null},So.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 qo(){return Po().memoizedState}function Jo(e,t,n,r){var i=No();So.flags|=e,i.memoizedState=Ko(1|t,n,void 0,r===void 0?null:r)}function Yo(e,t,n,r){var i=Po();r=r===void 0?null:r;var a=void 0;if(Co!==null){var o=Co.memoizedState;if(a=o.destroy,r!==null&&Ao(r,o.deps)){i.memoizedState=Ko(t,n,a,r);return}}So.flags|=e,i.memoizedState=Ko(1|t,n,a,r)}function Xo(e,t){return Jo(8390656,8,e,t)}function Zo(e,t){return Yo(2048,8,e,t)}function Qo(e,t){return Yo(4,2,e,t)}function $o(e,t){return Yo(4,4,e,t)}function es(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 ts(e,t,n){return n=n==null?null:n.concat([e]),Yo(4,4,es.bind(null,t,e),n)}function ns(){}function rs(e,t){var n=Po();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Ao(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function is(e,t){var n=Po();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Ao(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function as(e,t,n){return xo&21?(Or(n,t)||(n=Ft(),So.lanes|=n,Yc|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ns=!0),e.memoizedState=n)}function os(e,t){var n=H;H=n!==0&&4>n?n:4,e(!0);var r=bo.transition;bo.transition={};try{e(!1),t()}finally{H=n,bo.transition=r}}function ss(){return Po().memoizedState}function cs(e,t,n){var r=ml(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},us(e))ds(t,n);else if(n=Ya(e,t,n,r),n!==null){var i=pl();hl(n,e,r,i),fs(n,t,r)}}function ls(e,t,n){var r=ml(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(us(e))ds(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Or(s,o)){var c=t.interleaved;c===null?(i.next=i,Ja(t)):(i.next=c.next,c.next=i),t.interleaved=i;return}}catch{}n=Ya(e,t,i,r),n!==null&&(i=pl(),hl(n,e,r,i),fs(n,t,r))}}function us(e){var t=e.alternate;return e===So||t!==null&&t===So}function ds(e,t){Eo=To=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function fs(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,zt(e,n)}}var X={readContext:Ka,useCallback:ko,useContext:ko,useEffect:ko,useImperativeHandle:ko,useInsertionEffect:ko,useLayoutEffect:ko,useMemo:ko,useReducer:ko,useRef:ko,useState:ko,useDebugValue:ko,useDeferredValue:ko,useTransition:ko,useMutableSource:ko,useSyncExternalStore:ko,useId:ko,unstable_isNewReconciler:!1},ps={readContext:Ka,useCallback:function(e,t){return No().memoizedState=[e,t===void 0?null:t],e},useContext:Ka,useEffect:Xo,useImperativeHandle:function(e,t,n){return n=n==null?null:n.concat([e]),Jo(4194308,4,es.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Jo(4194308,4,e,t)},useInsertionEffect:function(e,t){return Jo(4,2,e,t)},useMemo:function(e,t){var n=No();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=No();return t=n===void 0?t:n(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=cs.bind(null,So,e),[r.memoizedState,e]},useRef:function(e){var t=No();return e={current:e},t.memoizedState=e},useState:Go,useDebugValue:ns,useDeferredValue:function(e){return No().memoizedState=e},useTransition:function(){var e=Go(!1),t=e[0];return e=os.bind(null,e[1]),No().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var i=So,a=No();if(K){if(n===void 0)throw Error(r(407));n=n()}else{if(n=t(),Hc===null)throw Error(r(349));xo&30||Bo(i,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Xo(Ho.bind(null,i,o,e),[e]),i.flags|=2048,Ko(9,Vo.bind(null,i,o,n,t),void 0,null),n},useId:function(){var e=No(),t=Hc.identifierPrefix;if(K){var n=ga,r=ha;n=(r&~(1<<32-wt(r)-1)).toString(32)+n,t=`:`+t+`R`+n,n=Do++,0<n&&(t+=`H`+n.toString(32)),t+=`:`}else n=Oo++,t=`:`+t+`r`+n.toString(32)+`:`;return e.memoizedState=t},unstable_isNewReconciler:!1},ms={readContext:Ka,useCallback:rs,useContext:Ka,useEffect:Zo,useImperativeHandle:ts,useInsertionEffect:Qo,useLayoutEffect:$o,useMemo:is,useReducer:Io,useRef:qo,useState:function(){return Io(Fo)},useDebugValue:ns,useDeferredValue:function(e){return as(Po(),Co.memoizedState,e)},useTransition:function(){return[Io(Fo)[0],Po().memoizedState]},useMutableSource:Ro,useSyncExternalStore:zo,useId:ss,unstable_isNewReconciler:!1},hs={readContext:Ka,useCallback:rs,useContext:Ka,useEffect:Zo,useImperativeHandle:ts,useInsertionEffect:Qo,useLayoutEffect:$o,useMemo:is,useReducer:Lo,useRef:qo,useState:function(){return Lo(Fo)},useDebugValue:ns,useDeferredValue:function(e){var t=Po();return Co===null?t.memoizedState=e:as(t,Co.memoizedState,e)},useTransition:function(){return[Lo(Fo)[0],Po().memoizedState]},useMutableSource:Ro,useSyncExternalStore:zo,useId:ss,unstable_isNewReconciler:!1};function gs(e,t){if(e&&e.defaultProps){for(var n in t=L({},t),e=e.defaultProps,e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function _s(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:L({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var vs={isMounted:function(e){return(e=e._reactInternals)?it(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=pl(),i=ml(e),a=eo(r,i);a.payload=t,n!=null&&(a.callback=n),t=to(e,a,i),t!==null&&(hl(t,e,i,r),no(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=pl(),i=ml(e),a=eo(r,i);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=to(e,a,i),t!==null&&(hl(t,e,i,r),no(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=pl(),r=ml(e),i=eo(n,r);i.tag=2,t!=null&&(i.callback=t),t=to(e,i,r),t!==null&&(hl(t,e,r,n),no(t,e,r))}};function ys(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!kr(n,r)||!kr(i,a):!0}function bs(e,t,n){var r=!1,i=Gi,a=t.contextType;return typeof a==`object`&&a?a=Ka(a):(i=Xi(t)?Ji:Ki.current,r=t.contextTypes,a=(r=r!=null)?Yi(e,i):Gi),t=new t(n,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=vs,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function xs(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&&vs.enqueueReplaceState(t,t.state,null)}function Ss(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Qa(e);var a=t.contextType;typeof a==`object`&&a?i.context=Ka(a):(a=Xi(t)?Ji:Ki.current,i.context=Yi(e,a)),i.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a==`function`&&(_s(e,t,a,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps==`function`||typeof i.getSnapshotBeforeUpdate==`function`||typeof i.UNSAFE_componentWillMount!=`function`&&typeof i.componentWillMount!=`function`||(t=i.state,typeof i.componentWillMount==`function`&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount==`function`&&i.UNSAFE_componentWillMount(),t!==i.state&&vs.enqueueReplaceState(i,i.state,null),ro(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount==`function`&&(e.flags|=4194308)}function Cs(e,t){try{var n=``,r=t;do n+=ae(r),r=r.return;while(r);var i=n}catch(e){i=`
|
|
7
|
+
Error generating stack: `+e.message+`
|
|
8
|
+
`+e.stack}return{value:e,source:t,stack:i,digest:null}}function ws(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Ts(e,t){try{console.error(t.value)}catch(e){setTimeout(function(){throw e})}}var Es=typeof WeakMap==`function`?WeakMap:Map;function Ds(e,t,n){n=eo(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){rl||(rl=!0,il=r),Ts(e,t)},n}function Os(e,t,n){n=eo(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r==`function`){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Ts(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch==`function`&&(n.callback=function(){Ts(e,t),typeof r!=`function`&&(al===null?al=new Set([this]):al.add(this));var n=t.stack;this.componentDidCatch(t.value,{componentStack:n===null?``:n})}),n}function ks(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Es;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Bl.bind(null,e,t,n),t.then(e,e))}function As(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t===null?!0:t.dehydrated!==null),t)return e;e=e.return}while(e!==null);return null}function js(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=eo(-1,1),t.tag=2,to(n,t,1))),n.lanes|=1),e)}var Ms=C.ReactCurrentOwner,Ns=!1;function Ps(e,t,n,r){t.child=e===null?Ra(t,null,n,r):La(t,e.child,n,r)}function Fs(e,t,n,r,i){n=n.render;var a=t.ref;return Ga(t,i),r=jo(e,t,n,r,a,i),n=Mo(),e!==null&&!Ns?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,tc(e,t,i)):(K&&n&&ya(t),t.flags|=1,Ps(e,t,r,i),t.child)}function Is(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Jl(a)&&a.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=a,Ls(e,t,a,r,i)):(e=Zl(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,(e.lanes&i)===0){var o=a.memoizedProps;if(n=n.compare,n=n===null?kr:n,n(o,r)&&e.ref===t.ref)return tc(e,t,i)}return t.flags|=1,e=Xl(a,r),e.ref=t.ref,e.return=t,t.child=e}function Ls(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(kr(a,r)&&e.ref===t.ref)if(Ns=!1,t.pendingProps=r=a,(e.lanes&i)!==0)e.flags&131072&&(Ns=!0);else return t.lanes=e.lanes,tc(e,t,i)}return Bs(e,t,n,r,i)}function Rs(e,t,n){var r=t.pendingProps,i=r.children,a=e===null?null:e.memoizedState;if(r.mode===`hidden`)if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},G(Kc,Gc),Gc|=n;else{if(!(n&1073741824))return e=a===null?n:a.baseLanes|n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,G(Kc,Gc),Gc|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=a===null?n:a.baseLanes,G(Kc,Gc),Gc|=r}else a===null?r=n:(r=a.baseLanes|n,t.memoizedState=null),G(Kc,Gc),Gc|=r;return Ps(e,t,i,n),t.child}function zs(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Bs(e,t,n,r,i){var a=Xi(n)?Ji:Ki.current;return a=Yi(t,a),Ga(t,i),n=jo(e,t,n,r,a,i),r=Mo(),e!==null&&!Ns?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,tc(e,t,i)):(K&&r&&ya(t),t.flags|=1,Ps(e,t,n,i),t.child)}function Vs(e,t,n,r,i){if(Xi(n)){var a=!0;ea(t)}else a=!1;if(Ga(t,i),t.stateNode===null)ec(e,t),bs(t,n,r),Ss(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,s=t.memoizedProps;o.props=s;var c=o.context,l=n.contextType;typeof l==`object`&&l?l=Ka(l):(l=Xi(n)?Ji:Ki.current,l=Yi(t,l));var u=n.getDerivedStateFromProps,d=typeof u==`function`||typeof o.getSnapshotBeforeUpdate==`function`;d||typeof o.UNSAFE_componentWillReceiveProps!=`function`&&typeof o.componentWillReceiveProps!=`function`||(s!==r||c!==l)&&xs(t,o,r,l),Za=!1;var f=t.memoizedState;o.state=f,ro(t,r,o,i),c=t.memoizedState,s!==r||f!==c||qi.current||Za?(typeof u==`function`&&(_s(t,n,u,r),c=t.memoizedState),(s=Za||ys(t,n,s,r,f,c,l))?(d||typeof o.UNSAFE_componentWillMount!=`function`&&typeof o.componentWillMount!=`function`||(typeof o.componentWillMount==`function`&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount==`function`&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount==`function`&&(t.flags|=4194308)):(typeof o.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),o.props=r,o.state=c,o.context=l,r=s):(typeof o.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,$a(e,t),s=t.memoizedProps,l=t.type===t.elementType?s:gs(t.type,s),o.props=l,d=t.pendingProps,f=o.context,c=n.contextType,typeof c==`object`&&c?c=Ka(c):(c=Xi(n)?Ji:Ki.current,c=Yi(t,c));var p=n.getDerivedStateFromProps;(u=typeof p==`function`||typeof o.getSnapshotBeforeUpdate==`function`)||typeof o.UNSAFE_componentWillReceiveProps!=`function`&&typeof o.componentWillReceiveProps!=`function`||(s!==d||f!==c)&&xs(t,o,r,c),Za=!1,f=t.memoizedState,o.state=f,ro(t,r,o,i);var m=t.memoizedState;s!==d||f!==m||qi.current||Za?(typeof p==`function`&&(_s(t,n,p,r),m=t.memoizedState),(l=Za||ys(t,n,l,r,f,m,c)||!1)?(u||typeof o.UNSAFE_componentWillUpdate!=`function`&&typeof o.componentWillUpdate!=`function`||(typeof o.componentWillUpdate==`function`&&o.componentWillUpdate(r,m,c),typeof o.UNSAFE_componentWillUpdate==`function`&&o.UNSAFE_componentWillUpdate(r,m,c)),typeof o.componentDidUpdate==`function`&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof o.componentDidUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),o.props=r,o.state=m,o.context=c,r=l):(typeof o.componentDidUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Hs(e,t,n,r,a,i)}function Hs(e,t,n,r,i,a){zs(e,t);var o=(t.flags&128)!=0;if(!r&&!o)return i&&ta(t,n,!1),tc(e,t,a);r=t.stateNode,Ms.current=t;var s=o&&typeof n.getDerivedStateFromError!=`function`?null:r.render();return t.flags|=1,e!==null&&o?(t.child=La(t,e.child,null,a),t.child=La(t,null,s,a)):Ps(e,t,s,a),t.memoizedState=r.state,i&&ta(t,n,!0),t.child}function Us(e){var t=e.stateNode;t.pendingContext?Qi(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Qi(e,t.context,!1),uo(e,t.containerInfo)}function Ws(e,t,n,r,i){return Aa(),ja(i),t.flags|=256,Ps(e,t,n,r),t.child}var Gs={dehydrated:null,treeContext:null,retryLane:0};function Ks(e){return{baseLanes:e,cachePool:null,transitions:null}}function qs(e,t,n){var r=t.pendingProps,i=ho.current,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(i&2)!=0),s?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),G(ho,i&1),e===null)return Ea(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):(o=r.children,e=r.fallback,a?(r=t.mode,a=t.child,o={mode:`hidden`,children:o},!(r&1)&&a!==null?(a.childLanes=0,a.pendingProps=o):a=$l(o,r,0,null),e=Ql(e,r,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=Ks(n),t.memoizedState=Gs,e):Js(t,o));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return Xs(e,t,o,r,s,i,n);if(a){a=r.fallback,o=t.mode,i=e.child,s=i.sibling;var c={mode:`hidden`,children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=Xl(i,c),r.subtreeFlags=i.subtreeFlags&14680064),s===null?(a=Ql(a,o,n,null),a.flags|=2):a=Xl(s,a),a.return=t,r.return=t,r.sibling=a,t.child=r,r=a,a=t.child,o=e.child.memoizedState,o=o===null?Ks(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},a.memoizedState=o,a.childLanes=e.childLanes&~n,t.memoizedState=Gs,r}return a=e.child,e=a.sibling,r=Xl(a,{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 Js(e,t){return t=$l({mode:`visible`,children:t},e.mode,0,null),t.return=e,e.child=t}function Ys(e,t,n,r){return r!==null&&ja(r),La(t,e.child,null,n),e=Js(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Xs(e,t,n,i,a,o,s){if(n)return t.flags&256?(t.flags&=-257,i=ws(Error(r(422))),Ys(e,t,s,i)):t.memoizedState===null?(o=i.fallback,a=t.mode,i=$l({mode:`visible`,children:i.children},a,0,null),o=Ql(o,a,s,null),o.flags|=2,i.return=t,o.return=t,i.sibling=o,t.child=i,t.mode&1&&La(t,e.child,null,s),t.child.memoizedState=Ks(s),t.memoizedState=Gs,o):(t.child=e.child,t.flags|=128,null);if(!(t.mode&1))return Ys(e,t,s,null);if(a.data===`$!`){if(i=a.nextSibling&&a.nextSibling.dataset,i)var c=i.dgst;return i=c,o=Error(r(419)),i=ws(o,i,void 0),Ys(e,t,s,i)}if(c=(s&e.childLanes)!==0,Ns||c){if(i=Hc,i!==null){switch(s&-s){case 4:a=2;break;case 16:a=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:a=32;break;case 536870912:a=268435456;break;default:a=0}a=(a&(i.suspendedLanes|s))===0?a:0,a!==0&&a!==o.retryLane&&(o.retryLane=a,Xa(e,a),hl(i,e,a,-1))}return kl(),i=ws(Error(r(421))),Ys(e,t,s,i)}return a.data===`$?`?(t.flags|=128,t.child=e.child,t=Hl.bind(null,e),a._reactRetry=t,null):(e=o.treeContext,Sa=ki(a.nextSibling),xa=t,K=!0,q=null,e!==null&&(fa[pa++]=ha,fa[pa++]=ga,fa[pa++]=ma,ha=e.id,ga=e.overflow,ma=t),t=Js(t,i.children),t.flags|=4096,t)}function Zs(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Wa(e.return,t,n)}function Qs(e,t,n,r,i){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function $s(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(Ps(e,t,r.children,n),r=ho.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Zs(e,n,t);else if(e.tag===19)Zs(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(G(ho,r),!(t.mode&1))t.memoizedState=null;else switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&go(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Qs(t,!1,i,n,a);break;case`backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&go(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Qs(t,!0,n,null,a);break;case`together`:Qs(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ec(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function tc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Yc|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,n=Xl(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Xl(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function nc(e,t,n){switch(t.tag){case 3:Us(t),Aa();break;case 5:po(t);break;case 1:Xi(t.type)&&ea(t);break;case 4:uo(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;G(za,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(G(ho,ho.current&1),e=tc(e,t,n),e===null?null:e.sibling):qs(e,t,n):(G(ho,ho.current&1),t.flags|=128,null);G(ho,ho.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return $s(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),G(ho,ho.current),r)break;return null;case 22:case 23:return t.lanes=0,Rs(e,t,n)}return tc(e,t,n)}var rc=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}},ic=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,lo(oo.current);var o=null;switch(n){case`input`:i=B(e,i),r=B(e,r),o=[];break;case`select`:i=L({},i,{value:void 0}),r=L({},r,{value:void 0}),o=[];break;case`textarea`:i=ye(e,i),r=ye(e,r),o=[];break;default:typeof i.onClick!=`function`&&typeof r.onClick==`function`&&(e.onclick=yi)}Ne(n,r);var s;for(u in n=null,i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u===`style`){var c=i[u];for(s in c)c.hasOwnProperty(s)&&(n||={},n[s]=``)}else u!==`dangerouslySetInnerHTML`&&u!==`children`&&u!==`suppressContentEditableWarning`&&u!==`suppressHydrationWarning`&&u!==`autoFocus`&&(a.hasOwnProperty(u)?o||=[]:(o||=[]).push(u,null));for(u in r){var l=r[u];if(c=i?.[u],r.hasOwnProperty(u)&&l!==c&&(l!=null||c!=null))if(u===`style`)if(c){for(s in c)!c.hasOwnProperty(s)||l&&l.hasOwnProperty(s)||(n||={},n[s]=``);for(s in l)l.hasOwnProperty(s)&&c[s]!==l[s]&&(n||={},n[s]=l[s])}else n||(o||=[],o.push(u,n)),n=l;else u===`dangerouslySetInnerHTML`?(l=l?l.__html:void 0,c=c?c.__html:void 0,l!=null&&c!==l&&(o||=[]).push(u,l)):u===`children`?typeof l!=`string`&&typeof l!=`number`||(o||=[]).push(u,``+l):u!==`suppressContentEditableWarning`&&u!==`suppressHydrationWarning`&&(a.hasOwnProperty(u)?(l!=null&&u===`onScroll`&&U(`scroll`,e),o||c===l||(o=[])):(o||=[]).push(u,l))}n&&(o||=[]).push(`style`,n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}},ac=function(e,t,n,r){n!==r&&(t.flags|=4)};function oc(e,t){if(!K)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 sc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function cc(e,t,n){var i=t.pendingProps;switch(ba(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return sc(t),null;case 1:return Xi(t.type)&&Zi(),sc(t),null;case 3:return i=t.stateNode,fo(),W(qi),W(Ki),vo(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Oa(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,q!==null&&(yl(q),q=null))),sc(t),null;case 5:mo(t);var o=lo(co.current);if(n=t.type,e!==null&&t.stateNode!=null)ic(e,t,n,i,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(t.stateNode===null)throw Error(r(166));return sc(t),null}if(e=lo(oo.current),Oa(t)){i=t.stateNode,n=t.type;var s=t.memoizedProps;switch(i[Mi]=t,i[Ni]=s,e=(t.mode&1)!=0,n){case`dialog`:U(`cancel`,i),U(`close`,i);break;case`iframe`:case`object`:case`embed`:U(`load`,i);break;case`video`:case`audio`:for(o=0;o<ni.length;o++)U(ni[o],i);break;case`source`:U(`error`,i);break;case`img`:case`image`:case`link`:U(`error`,i),U(`load`,i);break;case`details`:U(`toggle`,i);break;case`input`:pe(i,s),U(`invalid`,i);break;case`select`:i._wrapperState={wasMultiple:!!s.multiple},U(`invalid`,i);break;case`textarea`:be(i,s),U(`invalid`,i)}for(var c in Ne(n,s),o=null,s)if(s.hasOwnProperty(c)){var l=s[c];c===`children`?typeof l==`string`?i.textContent!==l&&(!0!==s.suppressHydrationWarning&&vi(i.textContent,l,e),o=[`children`,l]):typeof l==`number`&&i.textContent!==``+l&&(!0!==s.suppressHydrationWarning&&vi(i.textContent,l,e),o=[`children`,``+l]):a.hasOwnProperty(c)&&l!=null&&c===`onScroll`&&U(`scroll`,i)}switch(n){case`input`:de(i),he(i,s,!0);break;case`textarea`:de(i),Se(i);break;case`select`:case`option`:break;default:typeof s.onClick==`function`&&(i.onclick=yi)}i=o,t.updateQueue=i,i!==null&&(t.flags|=4)}else{c=o.nodeType===9?o:o.ownerDocument,e===`http://www.w3.org/1999/xhtml`&&(e=Ce(n)),e===`http://www.w3.org/1999/xhtml`?n===`script`?(e=c.createElement(`div`),e.innerHTML=`<script><\/script>`,e=e.removeChild(e.firstChild)):typeof i.is==`string`?e=c.createElement(n,{is:i.is}):(e=c.createElement(n),n===`select`&&(c=e,i.multiple?c.multiple=!0:i.size&&(c.size=i.size))):e=c.createElementNS(e,n),e[Mi]=t,e[Ni]=i,rc(e,t,!1,!1),t.stateNode=e;a:{switch(c=Pe(n,i),n){case`dialog`:U(`cancel`,e),U(`close`,e),o=i;break;case`iframe`:case`object`:case`embed`:U(`load`,e),o=i;break;case`video`:case`audio`:for(o=0;o<ni.length;o++)U(ni[o],e);o=i;break;case`source`:U(`error`,e),o=i;break;case`img`:case`image`:case`link`:U(`error`,e),U(`load`,e),o=i;break;case`details`:U(`toggle`,e),o=i;break;case`input`:pe(e,i),o=B(e,i),U(`invalid`,e);break;case`option`:o=i;break;case`select`:e._wrapperState={wasMultiple:!!i.multiple},o=L({},i,{value:void 0}),U(`invalid`,e);break;case`textarea`:be(e,i),o=ye(e,i),U(`invalid`,e);break;default:o=i}for(s in Ne(n,o),l=o,l)if(l.hasOwnProperty(s)){var u=l[s];s===`style`?je(e,u):s===`dangerouslySetInnerHTML`?(u=u?u.__html:void 0,u!=null&&Ee(e,u)):s===`children`?typeof u==`string`?(n!==`textarea`||u!==``)&&De(e,u):typeof u==`number`&&De(e,``+u):s!==`suppressContentEditableWarning`&&s!==`suppressHydrationWarning`&&s!==`autoFocus`&&(a.hasOwnProperty(s)?u!=null&&s===`onScroll`&&U(`scroll`,e):u!=null&&S(e,s,u,c))}switch(n){case`input`:de(e),he(e,i,!1);break;case`textarea`:de(e),Se(e);break;case`option`:i.value!=null&&e.setAttribute(`value`,``+ce(i.value));break;case`select`:e.multiple=!!i.multiple,s=i.value,s==null?i.defaultValue!=null&&ve(e,!!i.multiple,i.defaultValue,!0):ve(e,!!i.multiple,s,!1);break;default:typeof o.onClick==`function`&&(e.onclick=yi)}switch(n){case`button`:case`input`:case`select`:case`textarea`:i=!!i.autoFocus;break a;case`img`:i=!0;break a;default:i=!1}}i&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return sc(t),null;case 6:if(e&&t.stateNode!=null)ac(e,t,e.memoizedProps,i);else{if(typeof i!=`string`&&t.stateNode===null)throw Error(r(166));if(n=lo(co.current),lo(oo.current),Oa(t)){if(i=t.stateNode,n=t.memoizedProps,i[Mi]=t,(s=i.nodeValue!==n)&&(e=xa,e!==null))switch(e.tag){case 3:vi(i.nodeValue,n,(e.mode&1)!=0);break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&vi(i.nodeValue,n,(e.mode&1)!=0)}s&&(t.flags|=4)}else i=(n.nodeType===9?n:n.ownerDocument).createTextNode(i),i[Mi]=t,t.stateNode=i}return sc(t),null;case 13:if(W(ho),i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(K&&Sa!==null&&t.mode&1&&!(t.flags&128))ka(),Aa(),t.flags|=98560,s=!1;else if(s=Oa(t),i!==null&&i.dehydrated!==null){if(e===null){if(!s)throw Error(r(318));if(s=t.memoizedState,s=s===null?null:s.dehydrated,!s)throw Error(r(317));s[Mi]=t}else Aa(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;sc(t),s=!1}else q!==null&&(yl(q),q=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(i=i!==null,i!==(e!==null&&e.memoizedState!==null)&&i&&(t.child.flags|=8192,t.mode&1&&(e===null||ho.current&1?qc===0&&(qc=3):kl())),t.updateQueue!==null&&(t.flags|=4),sc(t),null);case 4:return fo(),e===null&&ci(t.stateNode.containerInfo),sc(t),null;case 10:return Ua(t.type._context),sc(t),null;case 17:return Xi(t.type)&&Zi(),sc(t),null;case 19:if(W(ho),s=t.memoizedState,s===null)return sc(t),null;if(i=(t.flags&128)!=0,c=s.rendering,c===null)if(i)oc(s,!1);else{if(qc!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(c=go(e),c!==null){for(t.flags|=128,oc(s,!1),i=c.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),t.subtreeFlags=0,i=n,n=t.child;n!==null;)s=n,e=i,s.flags&=14680066,c=s.alternate,c===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=c.childLanes,s.lanes=c.lanes,s.child=c.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=c.memoizedProps,s.memoizedState=c.memoizedState,s.updateQueue=c.updateQueue,s.type=c.type,e=c.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return G(ho,ho.current&1|2),t.child}e=e.sibling}s.tail!==null&&mt()>tl&&(t.flags|=128,i=!0,oc(s,!1),t.lanes=4194304)}else{if(!i)if(e=go(c),e!==null){if(t.flags|=128,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),oc(s,!0),s.tail===null&&s.tailMode===`hidden`&&!c.alternate&&!K)return sc(t),null}else 2*mt()-s.renderingStartTime>tl&&n!==1073741824&&(t.flags|=128,i=!0,oc(s,!1),t.lanes=4194304);s.isBackwards?(c.sibling=t.child,t.child=c):(n=s.last,n===null?t.child=c:n.sibling=c,s.last=c)}return s.tail===null?(sc(t),null):(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=mt(),t.sibling=null,n=ho.current,G(ho,i?n&1|2:n&1),t);case 22:case 23:return Tl(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&t.mode&1?Gc&1073741824&&(sc(t),t.subtreeFlags&6&&(t.flags|=8192)):sc(t),null;case 24:return null;case 25:return null}throw Error(r(156,t.tag))}function lc(e,t){switch(ba(t),t.tag){case 1:return Xi(t.type)&&Zi(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return fo(),W(qi),W(Ki),vo(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return mo(t),null;case 13:if(W(ho),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));Aa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return W(ho),null;case 4:return fo(),null;case 10:return Ua(t.type._context),null;case 22:case 23:return Tl(),null;case 24:return null;default:return null}}var uc=!1,dc=!1,fc=typeof WeakSet==`function`?WeakSet:Set,Z=null;function pc(e,t){var n=e.ref;if(n!==null)if(typeof n==`function`)try{n(null)}catch(n){zl(e,t,n)}else n.current=null}function mc(e,t,n){try{n()}catch(n){zl(e,t,n)}}var hc=!1;function gc(e,t){if(bi=fn,e=Nr(),Pr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(xi={focusedElem:e,selectionRange:n},fn=!1,Z=t;Z!==null;)if(t=Z,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,Z=e;else for(;Z!==null;){t=Z;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var g=h.memoizedProps,_=h.memoizedState,v=t.stateNode;v.__reactInternalSnapshotBeforeUpdate=v.getSnapshotBeforeUpdate(t.elementType===t.type?g:gs(t.type,g),_)}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent=``:y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(e){zl(t,t.return,e)}if(e=t.sibling,e!==null){e.return=t.return,Z=e;break}Z=t.return}return h=hc,hc=!1,h}function _c(e,t,n){var r=t.updateQueue;if(r=r===null?null:r.lastEffect,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&mc(t,n,a)}i=i.next}while(i!==r)}}function vc(e,t){if(t=t.updateQueue,t=t===null?null:t.lastEffect,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 yc(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 bc(e){var t=e.alternate;t!==null&&(e.alternate=null,bc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Mi],delete t[Ni],delete t[Fi],delete t[Ii],delete t[Li])),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 xc(e){return e.tag===5||e.tag===3||e.tag===4}function Sc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||xc(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 a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Cc(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=yi));else if(r!==4&&(e=e.child,e!==null))for(Cc(e,t,n),e=e.sibling;e!==null;)Cc(e,t,n),e=e.sibling}function wc(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(wc(e,t,n),e=e.sibling;e!==null;)wc(e,t,n),e=e.sibling}var Tc=null,Ec=!1;function Dc(e,t,n){for(n=n.child;n!==null;)Oc(e,t,n),n=n.sibling}function Oc(e,t,n){if(St&&typeof St.onCommitFiberUnmount==`function`)try{St.onCommitFiberUnmount(xt,n)}catch{}switch(n.tag){case 5:dc||pc(n,t);case 6:var r=Tc,i=Ec;Tc=null,Dc(e,t,n),Tc=r,Ec=i,Tc!==null&&(Ec?(e=Tc,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Tc.removeChild(n.stateNode));break;case 18:Tc!==null&&(Ec?(e=Tc,n=n.stateNode,e.nodeType===8?Oi(e.parentNode,n):e.nodeType===1&&Oi(e,n),un(e)):Oi(Tc,n.stateNode));break;case 4:r=Tc,i=Ec,Tc=n.stateNode.containerInfo,Ec=!0,Dc(e,t,n),Tc=r,Ec=i;break;case 0:case 11:case 14:case 15:if(!dc&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&mc(n,t,o),i=i.next}while(i!==r)}Dc(e,t,n);break;case 1:if(!dc&&(pc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){zl(n,t,e)}Dc(e,t,n);break;case 21:Dc(e,t,n);break;case 22:n.mode&1?(dc=(r=dc)||n.memoizedState!==null,Dc(e,t,n),dc=r):Dc(e,t,n);break;default:Dc(e,t,n)}}function kc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new fc),t.forEach(function(t){var r=Ul.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))})}}function Ac(e,t){var n=t.deletions;if(n!==null)for(var i=0;i<n.length;i++){var a=n[i];try{var o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 5:Tc=c.stateNode,Ec=!1;break a;case 3:Tc=c.stateNode.containerInfo,Ec=!0;break a;case 4:Tc=c.stateNode.containerInfo,Ec=!0;break a}c=c.return}if(Tc===null)throw Error(r(160));Oc(o,s,a),Tc=null,Ec=!1;var l=a.alternate;l!==null&&(l.return=null),a.return=null}catch(e){zl(a,t,e)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)jc(t,e),t=t.sibling}function jc(e,t){var n=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ac(t,e),Mc(e),i&4){try{_c(3,e,e.return),vc(3,e)}catch(t){zl(e,e.return,t)}try{_c(5,e,e.return)}catch(t){zl(e,e.return,t)}}break;case 1:Ac(t,e),Mc(e),i&512&&n!==null&&pc(n,n.return);break;case 5:if(Ac(t,e),Mc(e),i&512&&n!==null&&pc(n,n.return),e.flags&32){var a=e.stateNode;try{De(a,``)}catch(t){zl(e,e.return,t)}}if(i&4&&(a=e.stateNode,a!=null)){var o=e.memoizedProps,s=n===null?o:n.memoizedProps,c=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{c===`input`&&o.type===`radio`&&o.name!=null&&me(a,o),Pe(c,s);var u=Pe(c,o);for(s=0;s<l.length;s+=2){var d=l[s],f=l[s+1];d===`style`?je(a,f):d===`dangerouslySetInnerHTML`?Ee(a,f):d===`children`?De(a,f):S(a,d,f,u)}switch(c){case`input`:V(a,o);break;case`textarea`:xe(a,o);break;case`select`:var p=a._wrapperState.wasMultiple;a._wrapperState.wasMultiple=!!o.multiple;var m=o.value;m==null?p!==!!o.multiple&&(o.defaultValue==null?ve(a,!!o.multiple,o.multiple?[]:``,!1):ve(a,!!o.multiple,o.defaultValue,!0)):ve(a,!!o.multiple,m,!1)}a[Ni]=o}catch(t){zl(e,e.return,t)}}break;case 6:if(Ac(t,e),Mc(e),i&4){if(e.stateNode===null)throw Error(r(162));a=e.stateNode,o=e.memoizedProps;try{a.nodeValue=o}catch(t){zl(e,e.return,t)}}break;case 3:if(Ac(t,e),Mc(e),i&4&&n!==null&&n.memoizedState.isDehydrated)try{un(t.containerInfo)}catch(t){zl(e,e.return,t)}break;case 4:Ac(t,e),Mc(e);break;case 13:Ac(t,e),Mc(e),a=e.child,a.flags&8192&&(o=a.memoizedState!==null,a.stateNode.isHidden=o,!o||a.alternate!==null&&a.alternate.memoizedState!==null||(el=mt())),i&4&&kc(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(dc=(u=dc)||d,Ac(t,e),dc=u):Ac(t,e),Mc(e),i&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(Z=e,d=e.child;d!==null;){for(f=Z=d;Z!==null;){switch(p=Z,m=p.child,p.tag){case 0:case 11:case 14:case 15:_c(4,p,p.return);break;case 1:pc(p,p.return);var h=p.stateNode;if(typeof h.componentWillUnmount==`function`){i=p,n=p.return;try{t=i,h.props=t.memoizedProps,h.state=t.memoizedState,h.componentWillUnmount()}catch(e){zl(i,n,e)}}break;case 5:pc(p,p.return);break;case 22:if(p.memoizedState!==null){Ic(f);continue}}m===null?Ic(f):(m.return=p,Z=m)}d=d.sibling}a:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{a=f.stateNode,u?(o=a.style,typeof o.setProperty==`function`?o.setProperty(`display`,`none`,`important`):o.display=`none`):(c=f.stateNode,l=f.memoizedProps.style,s=l!=null&&l.hasOwnProperty(`display`)?l.display:null,c.style.display=Ae(`display`,s))}catch(t){zl(e,e.return,t)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=u?``:f.memoizedProps}catch(t){zl(e,e.return,t)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break a;for(;f.sibling===null;){if(f.return===null||f.return===e)break a;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:Ac(t,e),Mc(e),i&4&&kc(e);break;case 21:break;default:Ac(t,e),Mc(e)}}function Mc(e){var t=e.flags;if(t&2){try{a:{for(var n=e.return;n!==null;){if(xc(n)){var i=n;break a}n=n.return}throw Error(r(160))}switch(i.tag){case 5:var a=i.stateNode;i.flags&32&&(De(a,``),i.flags&=-33),wc(e,Sc(e),a);break;case 3:case 4:var o=i.stateNode.containerInfo;Cc(e,Sc(e),o);break;default:throw Error(r(161))}}catch(t){zl(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Nc(e,t,n){Z=e,Pc(e,t,n)}function Pc(e,t,n){for(var r=(e.mode&1)!=0;Z!==null;){var i=Z,a=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||uc;if(!o){var s=i.alternate,c=s!==null&&s.memoizedState!==null||dc;s=uc;var l=dc;if(uc=o,(dc=c)&&!l)for(Z=i;Z!==null;)o=Z,c=o.child,o.tag===22&&o.memoizedState!==null||c===null?Lc(i):(c.return=o,Z=c);for(;a!==null;)Z=a,Pc(a,t,n),a=a.sibling;Z=i,uc=s,dc=l}Fc(e,t,n)}else i.subtreeFlags&8772&&a!==null?(a.return=i,Z=a):Fc(e,t,n)}}function Fc(e){for(;Z!==null;){var t=Z;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:dc||vc(5,t);break;case 1:var i=t.stateNode;if(t.flags&4&&!dc)if(n===null)i.componentDidMount();else{var a=t.elementType===t.type?n.memoizedProps:gs(t.type,n.memoizedProps);i.componentDidUpdate(a,n.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&io(t,o,i);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}io(t,s,n)}break;case 5:var c=t.stateNode;if(n===null&&t.flags&4){n=c;var l=t.memoizedProps;switch(t.type){case`button`:case`input`:case`select`:case`textarea`:l.autoFocus&&n.focus();break;case`img`:l.src&&(n.src=l.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 f=d.dehydrated;f!==null&&un(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}dc||t.flags&512&&yc(t)}catch(e){zl(t,t.return,e)}}if(t===e){Z=null;break}if(n=t.sibling,n!==null){n.return=t.return,Z=n;break}Z=t.return}}function Ic(e){for(;Z!==null;){var t=Z;if(t===e){Z=null;break}var n=t.sibling;if(n!==null){n.return=t.return,Z=n;break}Z=t.return}}function Lc(e){for(;Z!==null;){var t=Z;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{vc(4,t)}catch(e){zl(t,n,e)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount==`function`){var i=t.return;try{r.componentDidMount()}catch(e){zl(t,i,e)}}var a=t.return;try{yc(t)}catch(e){zl(t,a,e)}break;case 5:var o=t.return;try{yc(t)}catch(e){zl(t,o,e)}}}catch(e){zl(t,t.return,e)}if(t===e){Z=null;break}var s=t.sibling;if(s!==null){s.return=t.return,Z=s;break}Z=t.return}}var Rc=Math.ceil,zc=C.ReactCurrentDispatcher,Bc=C.ReactCurrentOwner,Vc=C.ReactCurrentBatchConfig,Q=0,Hc=null,Uc=null,Wc=0,Gc=0,Kc=Wi(0),qc=0,Jc=null,Yc=0,Xc=0,Zc=0,Qc=null,$c=null,el=0,tl=1/0,nl=null,rl=!1,il=null,al=null,ol=!1,sl=null,cl=0,ll=0,ul=null,dl=-1,fl=0;function pl(){return Q&6?mt():dl===-1?dl=mt():dl}function ml(e){return e.mode&1?Q&2&&Wc!==0?Wc&-Wc:Ma.transition===null?(e=H,e===0?(e=window.event,e=e===void 0?16:vn(e.type),e):e):(fl===0&&(fl=Ft()),fl):1}function hl(e,t,n,i){if(50<ll)throw ll=0,ul=null,Error(r(185));Lt(e,n,i),(!(Q&2)||e!==Hc)&&(e===Hc&&(!(Q&2)&&(Xc|=n),qc===4&&xl(e,Wc)),gl(e,i),n===1&&Q===0&&!(t.mode&1)&&(tl=mt()+500,ra&&sa()))}function gl(e,t){var n=e.callbackNode;Nt(e,t);var r=jt(e,e===Hc?Wc:0);if(r===0)n!==null&&dt(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&dt(n),t===1)e.tag===0?oa(Sl.bind(null,e)):aa(Sl.bind(null,e)),Ei(function(){!(Q&6)&&sa()}),n=null;else{switch(Bt(r)){case 1:n=gt;break;case 4:n=_t;break;case 16:n=vt;break;case 536870912:n=bt;break;default:n=vt}n=Gl(n,_l.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function _l(e,t){if(dl=-1,fl=0,Q&6)throw Error(r(327));var n=e.callbackNode;if(Ll()&&e.callbackNode!==n)return null;var i=jt(e,e===Hc?Wc:0);if(i===0)return null;if(i&30||(i&e.expiredLanes)!==0||t)t=Al(e,i);else{t=i;var a=Q;Q|=2;var o=Ol();(Hc!==e||Wc!==t)&&(nl=null,tl=mt()+500,El(e,t));do try{Ml();break}catch(t){Dl(e,t)}while(1);Ha(),zc.current=o,Q=a,Uc===null?(Hc=null,Wc=0,t=qc):t=0}if(t!==0){if(t===2&&(a=Pt(e),a!==0&&(i=a,t=vl(e,a))),t===1)throw n=Jc,El(e,0),xl(e,i),gl(e,mt()),n;if(t===6)xl(e,i);else{if(a=e.current.alternate,!(i&30)&&!bl(a)&&(t=Al(e,i),t===2&&(o=Pt(e),o!==0&&(i=o,t=vl(e,o))),t===1))throw n=Jc,El(e,0),xl(e,i),gl(e,mt()),n;switch(e.finishedWork=a,e.finishedLanes=i,t){case 0:case 1:throw Error(r(345));case 2:Fl(e,$c,nl);break;case 3:if(xl(e,i),(i&130023424)===i&&(t=el+500-mt(),10<t)){if(jt(e,0)!==0)break;if(a=e.suspendedLanes,(a&i)!==i){pl(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=Ci(Fl.bind(null,e,$c,nl),t);break}Fl(e,$c,nl);break;case 4:if(xl(e,i),(i&4194240)===i)break;for(t=e.eventTimes,a=-1;0<i;){var s=31-wt(i);o=1<<s,s=t[s],s>a&&(a=s),i&=~o}if(i=a,i=mt()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*Rc(i/1960))-i,10<i){e.timeoutHandle=Ci(Fl.bind(null,e,$c,nl),i);break}Fl(e,$c,nl);break;case 5:Fl(e,$c,nl);break;default:throw Error(r(329))}}}return gl(e,mt()),e.callbackNode===n?_l.bind(null,e):null}function vl(e,t){var n=Qc;return e.current.memoizedState.isDehydrated&&(El(e,t).flags|=256),e=Al(e,t),e!==2&&(t=$c,$c=n,t!==null&&yl(t)),e}function yl(e){$c===null?$c=e:$c.push.apply($c,e)}function bl(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Or(a(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function xl(e,t){for(t&=~Zc,t&=~Xc,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-wt(t),r=1<<n;e[n]=-1,t&=~r}}function Sl(e){if(Q&6)throw Error(r(327));Ll();var t=jt(e,0);if(!(t&1))return gl(e,mt()),null;var n=Al(e,t);if(e.tag!==0&&n===2){var i=Pt(e);i!==0&&(t=i,n=vl(e,i))}if(n===1)throw n=Jc,El(e,0),xl(e,t),gl(e,mt()),n;if(n===6)throw Error(r(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Fl(e,$c,nl),gl(e,mt()),null}function Cl(e,t){var n=Q;Q|=1;try{return e(t)}finally{Q=n,Q===0&&(tl=mt()+500,ra&&sa())}}function wl(e){sl!==null&&sl.tag===0&&!(Q&6)&&Ll();var t=Q;Q|=1;var n=Vc.transition,r=H;try{if(Vc.transition=null,H=1,e)return e()}finally{H=r,Vc.transition=n,Q=t,!(Q&6)&&sa()}}function Tl(){Gc=Kc.current,W(Kc)}function El(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,wi(n)),Uc!==null)for(n=Uc.return;n!==null;){var r=n;switch(ba(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Zi();break;case 3:fo(),W(qi),W(Ki),vo();break;case 5:mo(r);break;case 4:fo();break;case 13:W(ho);break;case 19:W(ho);break;case 10:Ua(r.type._context);break;case 22:case 23:Tl()}n=n.return}if(Hc=e,Uc=e=Xl(e.current,null),Wc=Gc=t,qc=0,Jc=null,Zc=Xc=Yc=0,$c=Qc=null,qa!==null){for(t=0;t<qa.length;t++)if(n=qa[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,a=n.pending;if(a!==null){var o=a.next;a.next=i,r.next=o}n.pending=r}qa=null}return e}function Dl(e,t){do{var n=Uc;try{if(Ha(),yo.current=X,To){for(var i=So.memoizedState;i!==null;){var a=i.queue;a!==null&&(a.pending=null),i=i.next}To=!1}if(xo=0,wo=Co=So=null,Eo=!1,Do=0,Bc.current=null,n===null||n.return===null){qc=1,Jc=t,Uc=null;break}a:{var o=e,s=n.return,c=n,l=t;if(t=Wc,c.flags|=32768,typeof l==`object`&&l&&typeof l.then==`function`){var u=l,d=c,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var m=As(s);if(m!==null){m.flags&=-257,js(m,s,c,o,t),m.mode&1&&ks(o,u,t),t=m,l=u;var h=t.updateQueue;if(h===null){var g=new Set;g.add(l),t.updateQueue=g}else h.add(l);break a}else{if(!(t&1)){ks(o,u,t),kl();break a}l=Error(r(426))}}else if(K&&c.mode&1){var _=As(s);if(_!==null){!(_.flags&65536)&&(_.flags|=256),js(_,s,c,o,t),ja(Cs(l,c));break a}}o=l=Cs(l,c),qc!==4&&(qc=2),Qc===null?Qc=[o]:Qc.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var v=Ds(o,l,t);Y(o,v);break a;case 1:c=l;var y=o.type,b=o.stateNode;if(!(o.flags&128)&&(typeof y.getDerivedStateFromError==`function`||b!==null&&typeof b.componentDidCatch==`function`&&(al===null||!al.has(b)))){o.flags|=65536,t&=-t,o.lanes|=t;var x=Os(o,c,t);Y(o,x);break a}}o=o.return}while(o!==null)}Pl(n)}catch(e){t=e,Uc===n&&n!==null&&(Uc=n=n.return);continue}break}while(1)}function Ol(){var e=zc.current;return zc.current=X,e===null?X:e}function kl(){(qc===0||qc===3||qc===2)&&(qc=4),Hc===null||!(Yc&268435455)&&!(Xc&268435455)||xl(Hc,Wc)}function Al(e,t){var n=Q;Q|=2;var i=Ol();(Hc!==e||Wc!==t)&&(nl=null,El(e,t));do try{jl();break}catch(t){Dl(e,t)}while(1);if(Ha(),Q=n,zc.current=i,Uc!==null)throw Error(r(261));return Hc=null,Wc=0,qc}function jl(){for(;Uc!==null;)Nl(Uc)}function Ml(){for(;Uc!==null&&!ft();)Nl(Uc)}function Nl(e){var t=Wl(e.alternate,e,Gc);e.memoizedProps=e.pendingProps,t===null?Pl(e):Uc=t,Bc.current=null}function Pl(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=lc(n,t),n!==null){n.flags&=32767,Uc=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{qc=6,Uc=null;return}}else if(n=cc(n,t,Gc),n!==null){Uc=n;return}if(t=t.sibling,t!==null){Uc=t;return}Uc=t=e}while(t!==null);qc===0&&(qc=5)}function Fl(e,t,n){var r=H,i=Vc.transition;try{Vc.transition=null,H=1,Il(e,t,n,r)}finally{Vc.transition=i,H=r}return null}function Il(e,t,n,i){do Ll();while(sl!==null);if(Q&6)throw Error(r(327));n=e.finishedWork;var a=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(r(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(Rt(e,o),e===Hc&&(Uc=Hc=null,Wc=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||ol||(ol=!0,Gl(vt,function(){return Ll(),null})),o=(n.flags&15990)!=0,n.subtreeFlags&15990||o){o=Vc.transition,Vc.transition=null;var s=H;H=1;var c=Q;Q|=4,Bc.current=null,gc(e,n),jc(n,e),Fr(xi),fn=!!bi,xi=bi=null,e.current=n,Nc(n,e,a),pt(),Q=c,H=s,Vc.transition=o}else e.current=n;if(ol&&(ol=!1,sl=e,cl=a),o=e.pendingLanes,o===0&&(al=null),Ct(n.stateNode,i),gl(e,mt()),t!==null)for(i=e.onRecoverableError,n=0;n<t.length;n++)a=t[n],i(a.value,{componentStack:a.stack,digest:a.digest});if(rl)throw rl=!1,e=il,il=null,e;return cl&1&&e.tag!==0&&Ll(),o=e.pendingLanes,o&1?e===ul?ll++:(ll=0,ul=e):ll=0,sa(),null}function Ll(){if(sl!==null){var e=Bt(cl),t=Vc.transition,n=H;try{if(Vc.transition=null,H=16>e?16:e,sl===null)var i=!1;else{if(e=sl,sl=null,cl=0,Q&6)throw Error(r(331));var a=Q;for(Q|=4,Z=e.current;Z!==null;){var o=Z,s=o.child;if(Z.flags&16){var c=o.deletions;if(c!==null){for(var l=0;l<c.length;l++){var u=c[l];for(Z=u;Z!==null;){var d=Z;switch(d.tag){case 0:case 11:case 15:_c(8,d,o)}var f=d.child;if(f!==null)f.return=d,Z=f;else for(;Z!==null;){d=Z;var p=d.sibling,m=d.return;if(bc(d),d===u){Z=null;break}if(p!==null){p.return=m,Z=p;break}Z=m}}}var h=o.alternate;if(h!==null){var g=h.child;if(g!==null){h.child=null;do{var _=g.sibling;g.sibling=null,g=_}while(g!==null)}}Z=o}}if(o.subtreeFlags&2064&&s!==null)s.return=o,Z=s;else b:for(;Z!==null;){if(o=Z,o.flags&2048)switch(o.tag){case 0:case 11:case 15:_c(9,o,o.return)}var v=o.sibling;if(v!==null){v.return=o.return,Z=v;break b}Z=o.return}}var y=e.current;for(Z=y;Z!==null;){s=Z;var b=s.child;if(s.subtreeFlags&2064&&b!==null)b.return=s,Z=b;else b:for(s=y;Z!==null;){if(c=Z,c.flags&2048)try{switch(c.tag){case 0:case 11:case 15:vc(9,c)}}catch(e){zl(c,c.return,e)}if(c===s){Z=null;break b}var x=c.sibling;if(x!==null){x.return=c.return,Z=x;break b}Z=c.return}}if(Q=a,sa(),St&&typeof St.onPostCommitFiberRoot==`function`)try{St.onPostCommitFiberRoot(xt,e)}catch{}i=!0}return i}finally{H=n,Vc.transition=t}}return!1}function Rl(e,t,n){t=Cs(n,t),t=Ds(e,t,1),e=to(e,t,1),t=pl(),e!==null&&(Lt(e,1,t),gl(e,t))}function zl(e,t,n){if(e.tag===3)Rl(e,e,n);else for(;t!==null;){if(t.tag===3){Rl(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(al===null||!al.has(r))){e=Cs(n,e),e=Os(t,e,1),t=to(t,e,1),e=pl(),t!==null&&(Lt(t,1,e),gl(t,e));break}}t=t.return}}function Bl(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=pl(),e.pingedLanes|=e.suspendedLanes&n,Hc===e&&(Wc&n)===n&&(qc===4||qc===3&&(Wc&130023424)===Wc&&500>mt()-el?El(e,0):Zc|=n),gl(e,t)}function Vl(e,t){t===0&&(e.mode&1?(t=kt,kt<<=1,!(kt&130023424)&&(kt=4194304)):t=1);var n=pl();e=Xa(e,t),e!==null&&(Lt(e,t,n),gl(e,n))}function Hl(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Vl(e,n)}function Ul(e,t){var n=0;switch(e.tag){case 13:var i=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(r(314))}i!==null&&i.delete(t),Vl(e,n)}var Wl=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||qi.current)Ns=!0;else{if((e.lanes&n)===0&&!(t.flags&128))return Ns=!1,nc(e,t,n);Ns=!!(e.flags&131072)}else Ns=!1,K&&t.flags&1048576&&va(t,da,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;ec(e,t),e=t.pendingProps;var a=Yi(t,Ki.current);Ga(t,n),a=jo(null,t,i,e,a,n);var o=Mo();return t.flags|=1,typeof a==`object`&&a&&typeof a.render==`function`&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Xi(i)?(o=!0,ea(t)):o=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,Qa(t),a.updater=vs,t.stateNode=a,a._reactInternals=t,Ss(t,i,e,n),t=Hs(null,t,i,!0,o,n)):(t.tag=0,K&&o&&ya(t),Ps(null,t,a,n),t=t.child),t;case 16:i=t.elementType;a:{switch(ec(e,t),e=t.pendingProps,a=i._init,i=a(i._payload),t.type=i,a=t.tag=Yl(i),e=gs(i,e),a){case 0:t=Bs(null,t,i,e,n);break a;case 1:t=Vs(null,t,i,e,n);break a;case 11:t=Fs(null,t,i,e,n);break a;case 14:t=Is(null,t,i,gs(i.type,e),n);break a}throw Error(r(306,i,``))}return t;case 0:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:gs(i,a),Bs(e,t,i,a,n);case 1:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:gs(i,a),Vs(e,t,i,a,n);case 3:a:{if(Us(t),e===null)throw Error(r(387));i=t.pendingProps,o=t.memoizedState,a=o.element,$a(e,t),ro(t,i,null,n);var s=t.memoizedState;if(i=s.element,o.isDehydrated)if(o={element:i,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){a=Cs(Error(r(423)),t),t=Ws(e,t,i,n,a);break a}else if(i!==a){a=Cs(Error(r(424)),t),t=Ws(e,t,i,n,a);break a}else for(Sa=ki(t.stateNode.containerInfo.firstChild),xa=t,K=!0,q=null,n=Ra(t,null,i,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Aa(),i===a){t=tc(e,t,n);break a}Ps(e,t,i,n)}t=t.child}return t;case 5:return po(t),e===null&&Ea(t),i=t.type,a=t.pendingProps,o=e===null?null:e.memoizedProps,s=a.children,Si(i,a)?s=null:o!==null&&Si(i,o)&&(t.flags|=32),zs(e,t),Ps(e,t,s,n),t.child;case 6:return e===null&&Ea(t),null;case 13:return qs(e,t,n);case 4:return uo(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=La(t,null,i,n):Ps(e,t,i,n),t.child;case 11:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:gs(i,a),Fs(e,t,i,a,n);case 7:return Ps(e,t,t.pendingProps,n),t.child;case 8:return Ps(e,t,t.pendingProps.children,n),t.child;case 12:return Ps(e,t,t.pendingProps.children,n),t.child;case 10:a:{if(i=t.type._context,a=t.pendingProps,o=t.memoizedProps,s=a.value,G(za,i._currentValue),i._currentValue=s,o!==null)if(Or(o.value,s)){if(o.children===a.children&&!qi.current){t=tc(e,t,n);break a}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var c=o.dependencies;if(c!==null){s=o.child;for(var l=c.firstContext;l!==null;){if(l.context===i){if(o.tag===1){l=eo(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),Wa(o.return,n,t),c.lanes|=n;break}l=l.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(r(341));s.lanes|=n,c=s.alternate,c!==null&&(c.lanes|=n),Wa(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}Ps(e,t,a.children,n),t=t.child}return t;case 9:return a=t.type,i=t.pendingProps.children,Ga(t,n),a=Ka(a),i=i(a),t.flags|=1,Ps(e,t,i,n),t.child;case 14:return i=t.type,a=gs(i,t.pendingProps),a=gs(i.type,a),Is(e,t,i,a,n);case 15:return Ls(e,t,t.type,t.pendingProps,n);case 17:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:gs(i,a),ec(e,t),t.tag=1,Xi(i)?(e=!0,ea(t)):e=!1,Ga(t,n),bs(t,i,a),Ss(t,i,a,n),Hs(null,t,i,!0,e,n);case 19:return $s(e,t,n);case 22:return Rs(e,t,n)}throw Error(r(156,t.tag))};function Gl(e,t){return ut(e,t)}function Kl(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 ql(e,t,n,r){return new Kl(e,t,n,r)}function Jl(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Yl(e){if(typeof e==`function`)return Jl(e)?1:0;if(e!=null){if(e=e.$$typeof,e===j)return 11;if(e===P)return 14}return 2}function Xl(e,t){var n=e.alternate;return n===null?(n=ql(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 Zl(e,t,n,i,a,o){var s=2;if(i=e,typeof e==`function`)Jl(e)&&(s=1);else if(typeof e==`string`)s=5;else a:switch(e){case E:return Ql(n.children,a,o,t);case D:s=8,a|=8;break;case O:return e=ql(12,n,t,a|2),e.elementType=O,e.lanes=o,e;case M:return e=ql(13,n,t,a),e.elementType=M,e.lanes=o,e;case N:return e=ql(19,n,t,a),e.elementType=N,e.lanes=o,e;case ee:return $l(n,a,o,t);default:if(typeof e==`object`&&e)switch(e.$$typeof){case k:s=10;break a;case A:s=9;break a;case j:s=11;break a;case P:s=14;break a;case F:s=16,i=null;break a}throw Error(r(130,e==null?e:typeof e,``))}return t=ql(s,n,t,a),t.elementType=e,t.type=i,t.lanes=o,t}function Ql(e,t,n,r){return e=ql(7,e,r,t),e.lanes=n,e}function $l(e,t,n,r){return e=ql(22,e,r,t),e.elementType=ee,e.lanes=n,e.stateNode={isHidden:!1},e}function eu(e,t,n){return e=ql(6,e,null,t),e.lanes=n,e}function tu(e,t,n){return t=ql(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function nu(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=It(0),this.expirationTimes=It(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=It(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function ru(e,t,n,r,i,a,o,s,c){return e=new nu(e,t,n,s,c),t===1?(t=1,!0===a&&(t|=8)):t=0,a=ql(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Qa(a),e}function iu(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:T,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}function au(e){if(!e)return Gi;e=e._reactInternals;a:{if(it(e)!==e||e.tag!==1)throw Error(r(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break a;case 1:if(Xi(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break a}}t=t.return}while(t!==null);throw Error(r(171))}if(e.tag===1){var n=e.type;if(Xi(n))return $i(e,n,t)}return t}function ou(e,t,n,r,i,a,o,s,c){return e=ru(n,r,!0,e,i,a,o,s,c),e.context=au(null),n=e.current,r=pl(),i=ml(n),a=eo(r,i),a.callback=t??null,to(n,a,i),e.current.lanes=i,Lt(e,i,r),gl(e,r),e}function su(e,t,n,r){var i=t.current,a=pl(),o=ml(i);return n=au(n),t.context===null?t.context=n:t.pendingContext=n,t=eo(a,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=to(i,t,o),e!==null&&(hl(e,i,o,a),no(e,i,o)),o}function cu(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 lu(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function uu(e,t){lu(e,t),(e=e.alternate)&&lu(e,t)}function du(){return null}var fu=typeof reportError==`function`?reportError:function(e){console.error(e)};function pu(e){this._internalRoot=e}mu.prototype.render=pu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));su(e,t,null,null)},mu.prototype.unmount=pu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;wl(function(){su(null,e,null,null)}),t[Pi]=null}};function mu(e){this._internalRoot=e}mu.prototype.unstable_scheduleHydration=function(e){if(e){var t=Wt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<$t.length&&t!==0&&t<$t[n].priority;n++);$t.splice(n,0,e),n===0&&an(e)}};function hu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function gu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==` react-mount-point-unstable `))}function _u(){}function vu(e,t,n,r,i){if(i){if(typeof r==`function`){var a=r;r=function(){var e=cu(o);a.call(e)}}var o=ou(t,r,e,0,null,!1,!1,``,_u);return e._reactRootContainer=o,e[Pi]=o.current,ci(e.nodeType===8?e.parentNode:e),wl(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r==`function`){var s=r;r=function(){var e=cu(c);s.call(e)}}var c=ru(e,0,!1,null,null,!1,!1,``,_u);return e._reactRootContainer=c,e[Pi]=c.current,ci(e.nodeType===8?e.parentNode:e),wl(function(){su(t,c,n,r)}),c}function yu(e,t,n,r,i){var a=n._reactRootContainer;if(a){var o=a;if(typeof i==`function`){var s=i;i=function(){var e=cu(o);s.call(e)}}su(t,o,e,i)}else o=vu(n,t,e,i,r);return cu(o)}Vt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=At(t.pendingLanes);n!==0&&(zt(t,n|1),gl(t,mt()),!(Q&6)&&(tl=mt()+500,sa()))}break;case 13:wl(function(){var t=Xa(e,1);t!==null&&hl(t,e,1,pl())}),uu(e,1)}},Ht=function(e){if(e.tag===13){var t=Xa(e,134217728);t!==null&&hl(t,e,134217728,pl()),uu(e,134217728)}},Ut=function(e){if(e.tag===13){var t=ml(e),n=Xa(e,t);n!==null&&hl(n,e,t,pl()),uu(e,t)}},Wt=function(){return H},Gt=function(e,t){var n=H;try{return H=e,t()}finally{H=n}},Le=function(e,t,n){switch(t){case`input`:if(V(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 i=n[t];if(i!==e&&i.form===e.form){var a=Vi(i);if(!a)throw Error(r(90));fe(i),V(i,a)}}}break;case`textarea`:xe(e,n);break;case`select`:t=n.value,t!=null&&ve(e,!!n.multiple,t,!1)}},Ue=Cl,We=wl;var bu={usingClientEntryPoint:!1,Events:[zi,Bi,Vi,Ve,He,Cl]},xu={findFiberByHostInstance:Ri,bundleType:0,version:`18.3.1`,rendererPackageName:`react-dom`},Su={bundleType:xu.bundleType,version:xu.version,rendererPackageName:xu.rendererPackageName,rendererConfig:xu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:C.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=ct(e),e===null?null:e.stateNode},findFiberByHostInstance:xu.findFiberByHostInstance||du,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 Cu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Cu.isDisabled&&Cu.supportsFiber)try{xt=Cu.inject(Su),St=Cu}catch{}}e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=bu,e.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!hu(t))throw Error(r(200));return iu(e,t,null,n)},e.createRoot=function(e,t){if(!hu(e))throw Error(r(299));var n=!1,i=``,a=fu;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),t=ru(e,1,!1,null,null,n,!1,i,a),e[Pi]=t.current,ci(e.nodeType===8?e.parentNode:e),new pu(t)},e.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(r(188)):(e=Object.keys(e).join(`,`),Error(r(268,e)));return e=ct(t),e=e===null?null:e.stateNode,e},e.flushSync=function(e){return wl(e)},e.hydrate=function(e,t,n){if(!gu(t))throw Error(r(200));return yu(null,e,t,!0,n)},e.hydrateRoot=function(e,t,n){if(!hu(e))throw Error(r(405));var i=n!=null&&n.hydratedSources||null,a=!1,o=``,s=fu;if(n!=null&&(!0===n.unstable_strictMode&&(a=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=ou(t,null,e,1,n??null,a,!1,o,s),e[Pi]=t.current,ci(e),i)for(e=0;e<i.length;e++)n=i[e],a=n._getVersion,a=a(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,a]:t.mutableSourceEagerHydrationData.push(n,a);return new mu(t)},e.render=function(e,t,n){if(!gu(t))throw Error(r(200));return yu(null,e,t,!1,n)},e.unmountComponentAtNode=function(e){if(!gu(e))throw Error(r(40));return e._reactRootContainer?(wl(function(){yu(null,null,e,!1,function(){e._reactRootContainer=null,e[Pi]=null})}),!0):!1},e.unstable_batchedUpdates=Cl,e.unstable_renderSubtreeIntoContainer=function(e,t,n,i){if(!gu(n))throw Error(r(200));if(e==null||e._reactInternals===void 0)throw Error(r(38));return yu(e,t,n,!1,i)},e.version=`18.3.1-next-f1338f8080-20240426`})),h=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=m()})),g=o((e=>{var t=h();e.createRoot=t.createRoot,e.hydrateRoot=t.hydrateRoot}));function _(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=_(e[n]))!==``&&(t+=(t&&` `)+r);else for(let n in e)e[n]&&(t+=(t&&` `)+n);return t}var v=o((e=>{var t=d();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),y=o(((e,t)=>{t.exports=v()})),b=o((e=>{var t=d(),n=y();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),x=o(((e,t)=>{t.exports=b()})),S=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>{n.clear()}},o=t=e(r,i,a);return a},C=e=>e?S(e):S,w=c(d(),1),T=c(x(),1),{useDebugValue:E}=w.default,{useSyncExternalStoreWithSelector:D}=T.default,O=e=>e;function k(e,t=O,n){let r=D(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return E(r),r}var A=(e,t)=>{let n=C(e),r=(e,r=t)=>k(n,e,r);return Object.assign(r,n),r},j=(e,t)=>e?A(e,t):A;function M(e,t){if(Object.is(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[n,r]of e)if(!Object.is(r,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}let n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}var N={value:()=>{}};function P(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+``)||r in n||/[\s.]/.test(r))throw Error(`illegal type: `+r);n[r]=[]}return new F(n)}function F(e){this._=e}function ee(e,t){return e.trim().split(/^|\s+/).map(function(e){var n=``,r=e.indexOf(`.`);if(r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw Error(`unknown type: `+e);return{type:e,name:n}})}F.prototype=P.prototype={constructor:F,on:function(e,t){var n=this._,r=ee(e+``,n),i,a=-1,o=r.length;if(arguments.length<2){for(;++a<o;)if((i=(e=r[a]).type)&&(i=te(n[i],e.name)))return i;return}if(t!=null&&typeof t!=`function`)throw Error(`invalid callback: `+t);for(;++a<o;)if(i=(e=r[a]).type)n[i]=I(n[i],e.name,t);else if(t==null)for(i in n)n[i]=I(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new F(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=Array(i),r=0,i,a;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(a=this._[e],r=0,i=a.length;r<i;++r)a[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(var r=this._[e],i=0,a=r.length;i<a;++i)r[i].value.apply(t,n)}};function te(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function I(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=N,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var L={svg:`http://www.w3.org/2000/svg`,xhtml:`http://www.w3.org/1999/xhtml`,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`};function R(e){var t=e+=``,n=t.indexOf(`:`);return n>=0&&(t=e.slice(0,n))!==`xmlns`&&(e=e.slice(n+1)),L.hasOwnProperty(t)?{space:L[t],local:e}:e}function ne(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===`http://www.w3.org/1999/xhtml`&&t.documentElement.namespaceURI===`http://www.w3.org/1999/xhtml`?t.createElement(e):t.createElementNS(n,e)}}function re(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function ie(e){var t=R(e);return(t.local?re:ne)(t)}function ae(){}function oe(e){return e==null?ae:function(){return this.querySelector(e)}}function se(e){typeof e!=`function`&&(e=oe(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=Array(o),c,l,u=0;u<o;++u)(c=a[u])&&(l=e.call(c,c.__data__,u,a))&&(`__data__`in c&&(l.__data__=c.__data__),s[u]=l);return new Gt(r,this._parents)}function ce(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function le(){return[]}function ue(e){return e==null?le:function(){return this.querySelectorAll(e)}}function de(e){return function(){return ce(e.apply(this,arguments))}}function fe(e){e=typeof e==`function`?de(e):ue(e);for(var t=this._groups,n=t.length,r=[],i=[],a=0;a<n;++a)for(var o=t[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&(r.push(e.call(c,c.__data__,l,o)),i.push(c));return new Gt(r,i)}function z(e){return function(){return this.matches(e)}}function B(e){return function(t){return t.matches(e)}}var pe=Array.prototype.find;function me(e){return function(){return pe.call(this.children,e)}}function V(){return this.firstElementChild}function he(e){return this.select(e==null?V:me(typeof e==`function`?e:B(e)))}var ge=Array.prototype.filter;function _e(){return Array.from(this.children)}function ve(e){return function(){return ge.call(this.children,e)}}function ye(e){return this.selectAll(e==null?_e:ve(typeof e==`function`?e:B(e)))}function be(e){typeof e!=`function`&&(e=z(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new Gt(r,this._parents)}function xe(e){return Array(e.length)}function Se(){return new Gt(this._enter||this._groups.map(xe),this._parents)}function Ce(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Ce.prototype={constructor:Ce,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 we(e){return function(){return e}}function Te(e,t,n,r,i,a){for(var o=0,s,c=t.length,l=a.length;o<l;++o)(s=t[o])?(s.__data__=a[o],r[o]=s):n[o]=new Ce(e,a[o]);for(;o<c;++o)(s=t[o])&&(i[o]=s)}function Ee(e,t,n,r,i,a,o){var s,c,l=new Map,u=t.length,d=a.length,f=Array(u),p;for(s=0;s<u;++s)(c=t[s])&&(f[s]=p=o.call(c,c.__data__,s,t)+``,l.has(p)?i[s]=c:l.set(p,c));for(s=0;s<d;++s)p=o.call(e,a[s],s,a)+``,(c=l.get(p))?(r[s]=c,c.__data__=a[s],l.delete(p)):n[s]=new Ce(e,a[s]);for(s=0;s<u;++s)(c=t[s])&&l.get(f[s])===c&&(i[s]=c)}function De(e){return e.__data__}function Oe(e,t){if(!arguments.length)return Array.from(this,De);var n=t?Ee:Te,r=this._parents,i=this._groups;typeof e!=`function`&&(e=we(e));for(var a=i.length,o=Array(a),s=Array(a),c=Array(a),l=0;l<a;++l){var u=r[l],d=i[l],f=d.length,p=ke(e.call(u,u&&u.__data__,l,r)),m=p.length,h=s[l]=Array(m),g=o[l]=Array(m);n(u,d,h,g,c[l]=Array(f),p,t);for(var _=0,v=0,y,b;_<m;++_)if(y=h[_]){for(_>=v&&(v=_+1);!(b=g[v])&&++v<m;);y._next=b||null}}return o=new Gt(o,r),o._enter=s,o._exit=c,o}function ke(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function Ae(){return new Gt(this._exit||this._groups.map(xe),this._parents)}function je(e,t,n){var r=this.enter(),i=this,a=this.exit();return typeof e==`function`?(r=e(r),r&&=r.selection()):r=r.append(e+``),t!=null&&(i=t(i),i&&=i.selection()),n==null?a.remove():n(a),r&&i?r.merge(i).order():i}function Me(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,a=r.length,o=Math.min(i,a),s=Array(i),c=0;c<o;++c)for(var l=n[c],u=r[c],d=l.length,f=s[c]=Array(d),p,m=0;m<d;++m)(p=l[m]||u[m])&&(f[m]=p);for(;c<i;++c)s[c]=n[c];return new Gt(s,this._parents)}function Ne(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,a=r[i],o;--i>=0;)(o=r[i])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function Pe(e){e||=Fe;function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}for(var n=this._groups,r=n.length,i=Array(r),a=0;a<r;++a){for(var o=n[a],s=o.length,c=i[a]=Array(s),l,u=0;u<s;++u)(l=o[u])&&(c[u]=l);c.sort(t)}return new Gt(i,this._parents).order()}function Fe(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Ie(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Le(){return Array.from(this)}function Re(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null}function ze(){let e=0;for(let t of this)++e;return e}function Be(){return!this.node()}function Ve(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],a=0,o=i.length,s;a<o;++a)(s=i[a])&&e.call(s,s.__data__,a,i);return this}function He(e){return function(){this.removeAttribute(e)}}function Ue(e){return function(){this.removeAttributeNS(e.space,e.local)}}function We(e,t){return function(){this.setAttribute(e,t)}}function Ge(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Ke(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function qe(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 Je(e,t){var n=R(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?Ue:He:typeof t==`function`?n.local?qe:Ke:n.local?Ge:We)(n,t))}function Ye(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Xe(e){return function(){this.style.removeProperty(e)}}function Ze(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Qe(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function $e(e,t,n){return arguments.length>1?this.each((t==null?Xe:typeof t==`function`?Qe:Ze)(e,t,n??``)):et(this.node(),e)}function et(e,t){return e.style.getPropertyValue(t)||Ye(e).getComputedStyle(e,null).getPropertyValue(t)}function tt(e){return function(){delete this[e]}}function nt(e,t){return function(){this[e]=t}}function rt(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function it(e,t){return arguments.length>1?this.each((t==null?tt:typeof t==`function`?rt:nt)(e,t)):this.node()[e]}function at(e){return e.trim().split(/^|\s+/)}function ot(e){return e.classList||new st(e)}function st(e){this._node=e,this._names=at(e.getAttribute(`class`)||``)}st.prototype={add:function(e){this._names.indexOf(e)<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 ct(e,t){for(var n=ot(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function lt(e,t){for(var n=ot(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function ut(e){return function(){ct(this,e)}}function dt(e){return function(){lt(this,e)}}function ft(e,t){return function(){(t.apply(this,arguments)?ct:lt)(this,e)}}function pt(e,t){var n=at(e+``);if(arguments.length<2){for(var r=ot(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t==`function`?ft:t?ut:dt)(n,t))}function mt(){this.textContent=``}function ht(e){return function(){this.textContent=e}}function gt(e){return function(){this.textContent=e.apply(this,arguments)??``}}function _t(e){return arguments.length?this.each(e==null?mt:(typeof e==`function`?gt:ht)(e)):this.node().textContent}function vt(){this.innerHTML=``}function yt(e){return function(){this.innerHTML=e}}function bt(e){return function(){this.innerHTML=e.apply(this,arguments)??``}}function xt(e){return arguments.length?this.each(e==null?vt:(typeof e==`function`?bt:yt)(e)):this.node().innerHTML}function St(){this.nextSibling&&this.parentNode.appendChild(this)}function Ct(){return this.each(St)}function wt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Tt(){return this.each(wt)}function Et(e){var t=typeof e==`function`?e:ie(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Dt(){return null}function Ot(e,t){var n=typeof e==`function`?e:ie(e),r=t==null?Dt:typeof t==`function`?t:oe(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function kt(){var e=this.parentNode;e&&e.removeChild(this)}function At(){return this.each(kt)}function jt(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Mt(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Nt(e){return this.select(e?Mt:jt)}function Pt(e){return arguments.length?this.property(`__data__`,e):this.node().__data__}function Ft(e){return function(t){e.call(this,t,this.__data__)}}function It(e){return e.trim().split(/^|\s+/).map(function(e){var t=``,n=e.indexOf(`.`);return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}})}function Lt(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,a;n<i;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++r]=a;++r?t.length=r:delete this.__on}}}function Rt(e,t,n){return function(){var r=this.__on,i,a=Ft(t);if(r){for(var o=0,s=r.length;o<s;++o)if((i=r[o]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),i.value=t;return}}this.addEventListener(e.type,a,n),i={type:e.type,name:e.name,value:t,listener:a,options:n},r?r.push(i):this.__on=[i]}}function zt(e,t,n){var r=It(e+``),i,a=r.length,o;if(arguments.length<2){var s=this.node().__on;if(s){for(var c=0,l=s.length,u;c<l;++c)for(i=0,u=s[c];i<a;++i)if((o=r[i]).type===u.type&&o.name===u.name)return u.value}return}for(s=t?Rt:Lt,i=0;i<a;++i)this.each(s(r[i],t,n));return this}function H(e,t,n){var r=Ye(e),i=r.CustomEvent;typeof i==`function`?i=new i(t,n):(i=r.document.createEvent(`Event`),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function Bt(e,t){return function(){return H(this,e,t)}}function Vt(e,t){return function(){return H(this,e,t.apply(this,arguments))}}function Ht(e,t){return this.each((typeof t==`function`?Vt:Bt)(e,t))}function*Ut(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length,o;i<a;++i)(o=r[i])&&(yield o)}var Wt=[null];function Gt(e,t){this._groups=e,this._parents=t}function Kt(){return new Gt([[document.documentElement]],Wt)}function qt(){return this}Gt.prototype=Kt.prototype={constructor:Gt,select:se,selectAll:fe,selectChild:he,selectChildren:ye,filter:be,data:Oe,enter:Se,exit:Ae,join:je,merge:Me,selection:qt,order:Ne,sort:Pe,call:Ie,nodes:Le,node:Re,size:ze,empty:Be,each:Ve,attr:Je,style:$e,property:it,classed:pt,text:_t,html:xt,raise:Ct,lower:Tt,append:Et,insert:Ot,remove:At,clone:Nt,datum:Pt,on:zt,dispatch:Ht,[Symbol.iterator]:Ut};function Jt(e){return typeof e==`string`?new Gt([[document.querySelector(e)]],[document.documentElement]):new Gt([[e]],Wt)}function Yt(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Xt(e,t){if(e=Yt(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}var Zt={passive:!1},Qt={capture:!0,passive:!1};function $t(e){e.stopImmediatePropagation()}function en(e){e.preventDefault(),e.stopImmediatePropagation()}function tn(e){var t=e.document.documentElement,n=Jt(e).on(`dragstart.drag`,en,Qt);`onselectstart`in t?n.on(`selectstart.drag`,en,Qt):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect=`none`)}function nn(e,t){var n=e.document.documentElement,r=Jt(e).on(`dragstart.drag`,null);t&&(r.on(`click.drag`,en,Qt),setTimeout(function(){r.on(`click.drag`,null)},0)),`onselectstart`in n?r.on(`selectstart.drag`,null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}var rn=e=>()=>e;function an(e,{sourceEvent:t,subject:n,target:r,identifier:i,active:a,x:o,y:s,dx:c,dy:l,dispatch:u}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:o,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:l,enumerable:!0,configurable:!0},_:{value:u}})}an.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function on(e){return!e.ctrlKey&&!e.button}function sn(){return this.parentNode}function cn(e,t){return t??{x:e.x,y:e.y}}function ln(){return navigator.maxTouchPoints||`ontouchstart`in this}function un(){var e=on,t=sn,n=cn,r=ln,i={},a=P(`start`,`drag`,`end`),o=0,s,c,l,u,d=0;function f(e){e.on(`mousedown.drag`,p).filter(r).on(`touchstart.drag`,g).on(`touchmove.drag`,_,Zt).on(`touchend.drag touchcancel.drag`,v).style(`touch-action`,`none`).style(`-webkit-tap-highlight-color`,`rgba(0,0,0,0)`)}function p(n,r){if(!(u||!e.call(this,n,r))){var i=y(this,t.call(this,n,r),n,r,`mouse`);i&&(Jt(n.view).on(`mousemove.drag`,m,Qt).on(`mouseup.drag`,h,Qt),tn(n.view),$t(n),l=!1,s=n.clientX,c=n.clientY,i(`start`,n))}}function m(e){if(en(e),!l){var t=e.clientX-s,n=e.clientY-c;l=t*t+n*n>d}i.mouse(`drag`,e)}function h(e){Jt(e.view).on(`mousemove.drag mouseup.drag`,null),nn(e.view,l),en(e),i.mouse(`end`,e)}function g(n,r){if(e.call(this,n,r)){var i=n.changedTouches,a=t.call(this,n,r),o=i.length,s,c;for(s=0;s<o;++s)(c=y(this,a,n,r,i[s].identifier,i[s]))&&($t(n),c(`start`,n,i[s]))}}function _(e){var t=e.changedTouches,n=t.length,r,a;for(r=0;r<n;++r)(a=i[t[r].identifier])&&(en(e),a(`drag`,e,t[r]))}function v(e){var t=e.changedTouches,n=t.length,r,a;for(u&&clearTimeout(u),u=setTimeout(function(){u=null},500),r=0;r<n;++r)(a=i[t[r].identifier])&&($t(e),a(`end`,e,t[r]))}function y(e,t,r,s,c,l){var u=a.copy(),d=Xt(l||r,t),p,m,h;if((h=n.call(e,new an(`beforestart`,{sourceEvent:r,target:f,identifier:c,active:o,x:d[0],y:d[1],dx:0,dy:0,dispatch:u}),s))!=null)return p=h.x-d[0]||0,m=h.y-d[1]||0,function n(r,a,l){var g=d,_;switch(r){case`start`:i[c]=n,_=o++;break;case`end`:delete i[c],--o;case`drag`:d=Xt(l||a,t),_=o;break}u.call(r,e,new an(r,{sourceEvent:a,subject:h,target:f,identifier:c,active:_,x:d[0]+p,y:d[1]+m,dx:d[0]-g[0],dy:d[1]-g[1],dispatch:u}),s)}}return f.filter=function(t){return arguments.length?(e=typeof t==`function`?t:rn(!!t),f):e},f.container=function(e){return arguments.length?(t=typeof e==`function`?e:rn(e),f):t},f.subject=function(e){return arguments.length?(n=typeof e==`function`?e:rn(e),f):n},f.touchable=function(e){return arguments.length?(r=typeof e==`function`?e:rn(!!e),f):r},f.on=function(){var e=a.on.apply(a,arguments);return e===a?f:e},f.clickDistance=function(e){return arguments.length?(d=(e=+e)*e,f):Math.sqrt(d)},f}function dn(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function fn(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function pn(){}var mn=.7,hn=1/mn,gn=`\\s*([+-]?\\d+)\\s*`,_n=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*`,vn=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*`,yn=/^#([0-9a-f]{3,8})$/,bn=RegExp(`^rgb\\(${gn},${gn},${gn}\\)$`),xn=RegExp(`^rgb\\(${vn},${vn},${vn}\\)$`),Sn=RegExp(`^rgba\\(${gn},${gn},${gn},${_n}\\)$`),Cn=RegExp(`^rgba\\(${vn},${vn},${vn},${_n}\\)$`),wn=RegExp(`^hsl\\(${_n},${vn},${vn}\\)$`),Tn=RegExp(`^hsla\\(${_n},${vn},${vn},${_n}\\)$`),En={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};dn(pn,jn,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Dn,formatHex:Dn,formatHex8:On,formatHsl:kn,formatRgb:An,toString:An});function Dn(){return this.rgb().formatHex()}function On(){return this.rgb().formatHex8()}function kn(){return Wn(this).formatHsl()}function An(){return this.rgb().formatRgb()}function jn(e){var t,n;return e=(e+``).trim().toLowerCase(),(t=yn.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Mn(t):n===3?new In(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Nn(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Nn(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=bn.exec(e))?new In(t[1],t[2],t[3],1):(t=xn.exec(e))?new In(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Sn.exec(e))?Nn(t[1],t[2],t[3],t[4]):(t=Cn.exec(e))?Nn(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=wn.exec(e))?Un(t[1],t[2]/100,t[3]/100,1):(t=Tn.exec(e))?Un(t[1],t[2]/100,t[3]/100,t[4]):En.hasOwnProperty(e)?Mn(En[e]):e===`transparent`?new In(NaN,NaN,NaN,0):null}function Mn(e){return new In(e>>16&255,e>>8&255,e&255,1)}function Nn(e,t,n,r){return r<=0&&(e=t=n=NaN),new In(e,t,n,r)}function Pn(e){return e instanceof pn||(e=jn(e)),e?(e=e.rgb(),new In(e.r,e.g,e.b,e.opacity)):new In}function Fn(e,t,n,r){return arguments.length===1?Pn(e):new In(e,t,n,r??1)}function In(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}dn(In,Fn,fn(pn,{brighter(e){return e=e==null?hn:hn**+e,new In(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?mn:mn**+e,new In(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new In(Vn(this.r),Vn(this.g),Vn(this.b),Bn(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:Ln,formatHex:Ln,formatHex8:Rn,formatRgb:zn,toString:zn}));function Ln(){return`#${Hn(this.r)}${Hn(this.g)}${Hn(this.b)}`}function Rn(){return`#${Hn(this.r)}${Hn(this.g)}${Hn(this.b)}${Hn((isNaN(this.opacity)?1:this.opacity)*255)}`}function zn(){let e=Bn(this.opacity);return`${e===1?`rgb(`:`rgba(`}${Vn(this.r)}, ${Vn(this.g)}, ${Vn(this.b)}${e===1?`)`:`, ${e})`}`}function Bn(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Vn(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Hn(e){return e=Vn(e),(e<16?`0`:``)+e.toString(16)}function Un(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Kn(e,t,n,r)}function Wn(e){if(e instanceof Kn)return new Kn(e.h,e.s,e.l,e.opacity);if(e instanceof pn||(e=jn(e)),!e)return new Kn;if(e instanceof Kn)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=t===a?(n-r)/s+(n<r)*6:n===a?(r-t)/s+2:(t-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new Kn(o,s,c,e.opacity)}function Gn(e,t,n,r){return arguments.length===1?Wn(e):new Kn(e,t,n,r??1)}function Kn(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}dn(Kn,Gn,fn(pn,{brighter(e){return e=e==null?hn:hn**+e,new Kn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?mn:mn**+e,new Kn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new In(Yn(e>=240?e-240:e+120,i,r),Yn(e,i,r),Yn(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Kn(qn(this.h),Jn(this.s),Jn(this.l),Bn(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=Bn(this.opacity);return`${e===1?`hsl(`:`hsla(`}${qn(this.h)}, ${Jn(this.s)*100}%, ${Jn(this.l)*100}%${e===1?`)`:`, ${e})`}`}}));function qn(e){return e=(e||0)%360,e<0?e+360:e}function Jn(e){return Math.max(0,Math.min(1,e||0))}function Yn(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}var Xn=e=>()=>e;function Zn(e,t){return function(n){return e+n*t}}function Qn(e,t,n){return e**=+n,t=t**+n-e,n=1/n,function(r){return(e+r*t)**+n}}function $n(e){return(e=+e)==1?er:function(t,n){return n-t?Qn(t,n,e):Xn(isNaN(t)?n:t)}}function er(e,t){var n=t-e;return n?Zn(e,n):Xn(isNaN(e)?t:e)}var tr=(function e(t){var n=$n(t);function r(e,t){var r=n((e=Fn(e)).r,(t=Fn(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=er(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+``}}return r.gamma=e,r})(1);function nr(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var rr=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ir=new RegExp(rr.source,`g`);function ar(e){return function(){return e}}function or(e){return function(t){return e(t)+``}}function sr(e,t){var n=rr.lastIndex=ir.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(e+=``,t+=``;(r=rr.exec(e))&&(i=ir.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:nr(r,i)})),n=ir.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?or(c[0].x):ar(t):(t=c.length,function(e){for(var n=0,r;n<t;++n)s[(r=c[n]).i]=r.x(e);return s.join(``)})}var cr=180/Math.PI,lr={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function ur(e,t,n,r,i,a){var o,s,c;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(c=e*n+t*r)&&(n-=e*c,r-=t*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),e*r<t*n&&(e=-e,t=-t,c=-c,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*cr,skewX:Math.atan(c)*cr,scaleX:o,scaleY:s}}var dr;function fr(e){let t=new(typeof DOMMatrix==`function`?DOMMatrix:WebKitCSSMatrix)(e+``);return t.isIdentity?lr:ur(t.a,t.b,t.c,t.d,t.e,t.f)}function pr(e){return e==null||(dr||=document.createElementNS(`http://www.w3.org/2000/svg`,`g`),dr.setAttribute(`transform`,e),!(e=dr.transform.baseVal.consolidate()))?lr:(e=e.matrix,ur(e.a,e.b,e.c,e.d,e.e,e.f))}function mr(e,t,n,r){function i(e){return e.length?e.pop()+` `:``}function a(e,r,i,a,o,s){if(e!==i||r!==a){var c=o.push(`translate(`,null,t,null,n);s.push({i:c-4,x:nr(e,i)},{i:c-2,x:nr(r,a)})}else (i||a)&&o.push(`translate(`+i+t+a+n)}function o(e,t,n,a){e===t?t&&n.push(i(n)+`rotate(`+t+r):(e-t>180?t+=360:t-e>180&&(e+=360),a.push({i:n.push(i(n)+`rotate(`,null,r)-2,x:nr(e,t)}))}function s(e,t,n,a){e===t?t&&n.push(i(n)+`skewX(`+t+r):a.push({i:n.push(i(n)+`skewX(`,null,r)-2,x:nr(e,t)})}function c(e,t,n,r,a,o){if(e!==n||t!==r){var s=a.push(i(a)+`scale(`,null,`,`,null,`)`);o.push({i:s-4,x:nr(e,n)},{i:s-2,x:nr(t,r)})}else (n!==1||r!==1)&&a.push(i(a)+`scale(`+n+`,`+r+`)`)}return function(t,n){var r=[],i=[];return t=e(t),n=e(n),a(t.translateX,t.translateY,n.translateX,n.translateY,r,i),o(t.rotate,n.rotate,r,i),s(t.skewX,n.skewX,r,i),c(t.scaleX,t.scaleY,n.scaleX,n.scaleY,r,i),t=n=null,function(e){for(var t=-1,n=i.length,a;++t<n;)r[(a=i[t]).i]=a.x(e);return r.join(``)}}}var hr=mr(fr,`px, `,`px)`,`deg)`),gr=mr(pr,`, `,`)`,`)`),_r=1e-12;function vr(e){return((e=Math.exp(e))+1/e)/2}function yr(e){return((e=Math.exp(e))-1/e)/2}function br(e){return((e=Math.exp(2*e))-1)/(e+1)}var xr=(function e(t,n,r){function i(e,i){var a=e[0],o=e[1],s=e[2],c=i[0],l=i[1],u=i[2],d=c-a,f=l-o,p=d*d+f*f,m,h;if(p<_r)h=Math.log(u/s)/t,m=function(e){return[a+e*d,o+e*f,s*Math.exp(t*e*h)]};else{var g=Math.sqrt(p),_=(u*u-s*s+r*p)/(2*s*n*g),v=(u*u-s*s-r*p)/(2*u*n*g),y=Math.log(Math.sqrt(_*_+1)-_);h=(Math.log(Math.sqrt(v*v+1)-v)-y)/t,m=function(e){var r=e*h,i=vr(y),c=s/(n*g)*(i*br(t*r+y)-yr(y));return[a+c*d,o+c*f,s*i/vr(t*r+y)]}}return m.duration=h*1e3*t/Math.SQRT2,m}return i.rho=function(t){var n=Math.max(.001,+t),r=n*n;return e(n,r,r*r)},i})(Math.SQRT2,2,4),Sr=0,Cr=0,wr=0,Tr=1e3,Er,Dr,Or=0,kr=0,Ar=0,jr=typeof performance==`object`&&performance.now?performance:Date,Mr=typeof window==`object`&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Nr(){return kr||=(Mr(Pr),jr.now()+Ar)}function Pr(){kr=0}function Fr(){this._call=this._time=this._next=null}Fr.prototype=Ir.prototype={constructor:Fr,restart:function(e,t,n){if(typeof e!=`function`)throw TypeError(`callback is not a function`);n=(n==null?Nr():+n)+(t==null?0:+t),!this._next&&Dr!==this&&(Dr?Dr._next=this:Er=this,Dr=this),this._call=e,this._time=n,Vr()},stop:function(){this._call&&(this._call=null,this._time=1/0,Vr())}};function Ir(e,t,n){var r=new Fr;return r.restart(e,t,n),r}function Lr(){Nr(),++Sr;for(var e=Er,t;e;)(t=kr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Sr}function Rr(){kr=(Or=jr.now())+Ar,Sr=Cr=0;try{Lr()}finally{Sr=0,Br(),kr=0}}function zr(){var e=jr.now(),t=e-Or;t>Tr&&(Ar-=t,Or=e)}function Br(){for(var e,t=Er,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:Er=n);Dr=e,Vr(r)}function Vr(e){Sr||(Cr&&=clearTimeout(Cr),e-kr>24?(e<1/0&&(Cr=setTimeout(Rr,e-jr.now()-Ar)),wr&&=clearInterval(wr)):(wr||=(Or=jr.now(),setInterval(zr,Tr)),Sr=1,Mr(Rr)))}function Hr(e,t,n){var r=new Fr;return t=t==null?0:+t,r.restart(n=>{r.stop(),e(n+t)},t,n),r}var Ur=P(`start`,`end`,`cancel`,`interrupt`),Wr=[];function Gr(e,t,n,r,i,a){var o=e.__transition;if(!o)e.__transition={};else if(n in o)return;Yr(e,n,{name:t,index:r,group:i,on:Ur,tween:Wr,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function Kr(e,t){var n=Jr(e,t);if(n.state>0)throw Error(`too late; already scheduled`);return n}function qr(e,t){var n=Jr(e,t);if(n.state>3)throw Error(`too late; already running`);return n}function Jr(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw Error(`transition not found`);return n}function Yr(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=Ir(a,0,n.time);function a(e){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=e&&o(e-n.delay)}function o(a){var l,u,d,f;if(n.state!==1)return c();for(l in r)if(f=r[l],f.name===n.name){if(f.state===3)return Hr(o);f.state===4?(f.state=6,f.timer.stop(),f.on.call(`interrupt`,e,e.__data__,f.index,f.group),delete r[l]):+l<t&&(f.state=6,f.timer.stop(),f.on.call(`cancel`,e,e.__data__,f.index,f.group),delete r[l])}if(Hr(function(){n.state===3&&(n.state=4,n.timer.restart(s,n.delay,n.time),s(a))}),n.state=2,n.on.call(`start`,e,e.__data__,n.index,n.group),n.state===2){for(n.state=3,i=Array(d=n.tween.length),l=0,u=-1;l<d;++l)(f=n.tween[l].value.call(e,e.__data__,n.index,n.group))&&(i[++u]=f);i.length=u+1}}function s(t){for(var r=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(c),n.state=5,1),a=-1,o=i.length;++a<o;)i[a].call(e,r);n.state===5&&(n.on.call(`end`,e,e.__data__,n.index,n.group),c())}function c(){for(var i in n.state=6,n.timer.stop(),delete r[t],r)return;delete e.__transition}}function Xr(e,t){var n=e.__transition,r,i,a=!0,o;if(n){for(o in t=t==null?null:t+``,n){if((r=n[o]).name!==t){a=!1;continue}i=r.state>2&&r.state<5,r.state=6,r.timer.stop(),r.on.call(i?`interrupt`:`cancel`,e,e.__data__,r.index,r.group),delete n[o]}a&&delete e.__transition}}function Zr(e){return this.each(function(){Xr(this,e)})}function Qr(e,t){var n,r;return function(){var i=qr(this,e),a=i.tween;if(a!==n){r=n=a;for(var o=0,s=r.length;o<s;++o)if(r[o].name===t){r=r.slice(),r.splice(o,1);break}}i.tween=r}}function $r(e,t,n){var r,i;if(typeof n!=`function`)throw Error();return function(){var a=qr(this,e),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:t,value:n},c=0,l=i.length;c<l;++c)if(i[c].name===t){i[c]=s;break}c===l&&i.push(s)}a.tween=i}}function ei(e,t){var n=this._id;if(e+=``,arguments.length<2){for(var r=Jr(this.node(),n).tween,i=0,a=r.length,o;i<a;++i)if((o=r[i]).name===e)return o.value;return null}return this.each((t==null?Qr:$r)(n,e,t))}function ti(e,t,n){var r=e._id;return e.each(function(){var e=qr(this,r);(e.value||={})[t]=n.apply(this,arguments)}),function(e){return Jr(e,r).value[t]}}function ni(e,t){var n;return(typeof t==`number`?nr:t instanceof jn?tr:(n=jn(t))?(t=n,tr):sr)(e,t)}function ri(e){return function(){this.removeAttribute(e)}}function ii(e){return function(){this.removeAttributeNS(e.space,e.local)}}function ai(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttribute(e);return o===i?null:o===r?a:a=t(r=o,n)}}function U(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttributeNS(e.space,e.local);return o===i?null:o===r?a:a=t(r=o,n)}}function oi(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttribute(e):(o=this.getAttribute(e),c=s+``,o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function si(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),c=s+``,o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function ci(e,t){var n=R(e),r=n===`transform`?gr:ni;return this.attrTween(e,typeof t==`function`?(n.local?si:oi)(n,r,ti(this,`attr.`+e,t)):t==null?(n.local?ii:ri)(n):(n.local?U:ai)(n,r,t))}function li(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function ui(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function di(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&ui(e,i)),n}return i._value=t,i}function fi(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&li(e,i)),n}return i._value=t,i}function pi(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 Error();var r=R(e);return this.tween(n,(r.local?di:fi)(r,t))}function mi(e,t){return function(){Kr(this,e).delay=+t.apply(this,arguments)}}function hi(e,t){return t=+t,function(){Kr(this,e).delay=t}}function gi(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?mi:hi)(t,e)):Jr(this.node(),t).delay}function _i(e,t){return function(){qr(this,e).duration=+t.apply(this,arguments)}}function vi(e,t){return t=+t,function(){qr(this,e).duration=t}}function yi(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?_i:vi)(t,e)):Jr(this.node(),t).duration}function bi(e,t){if(typeof t!=`function`)throw Error();return function(){qr(this,e).ease=t}}function xi(e){var t=this._id;return arguments.length?this.each(bi(t,e)):Jr(this.node(),t).ease}function Si(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!=`function`)throw Error();qr(this,e).ease=n}}function Ci(e){if(typeof e!=`function`)throw Error();return this.each(Si(this._id,e))}function wi(e){typeof e!=`function`&&(e=z(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new Zi(r,this._parents,this._name,this._id)}function Ti(e){if(e._id!==this._id)throw Error();for(var t=this._groups,n=e._groups,r=t.length,i=n.length,a=Math.min(r,i),o=Array(r),s=0;s<a;++s)for(var c=t[s],l=n[s],u=c.length,d=o[s]=Array(u),f,p=0;p<u;++p)(f=c[p]||l[p])&&(d[p]=f);for(;s<r;++s)o[s]=t[s];return new Zi(o,this._parents,this._name,this._id)}function Ei(e){return(e+``).trim().split(/^|\s+/).every(function(e){var t=e.indexOf(`.`);return t>=0&&(e=e.slice(0,t)),!e||e===`start`})}function Di(e,t,n){var r,i,a=Ei(t)?Kr:qr;return function(){var o=a(this,e),s=o.on;s!==r&&(i=(r=s).copy()).on(t,n),o.on=i}}function Oi(e,t){var n=this._id;return arguments.length<2?Jr(this.node(),n).on.on(e):this.each(Di(n,e,t))}function ki(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function Ai(){return this.on(`end.remove`,ki(this._id))}function ji(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=oe(e));for(var r=this._groups,i=r.length,a=Array(i),o=0;o<i;++o)for(var s=r[o],c=s.length,l=a[o]=Array(c),u,d,f=0;f<c;++f)(u=s[f])&&(d=e.call(u,u.__data__,f,s))&&(`__data__`in u&&(d.__data__=u.__data__),l[f]=d,Gr(l[f],t,n,f,l,Jr(u,n)));return new Zi(a,this._parents,t,n)}function Mi(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=ue(e));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var c=r[s],l=c.length,u,d=0;d<l;++d)if(u=c[d]){for(var f=e.call(u,u.__data__,d,c),p,m=Jr(u,n),h=0,g=f.length;h<g;++h)(p=f[h])&&Gr(p,t,n,h,f,m);a.push(f),o.push(u)}return new Zi(a,o,t,n)}var Ni=Kt.prototype.constructor;function Pi(){return new Ni(this._groups,this._parents)}function Fi(e,t){var n,r,i;return function(){var a=et(this,e),o=(this.style.removeProperty(e),et(this,e));return a===o?null:a===n&&o===r?i:i=t(n=a,r=o)}}function Ii(e){return function(){this.style.removeProperty(e)}}function Li(e,t,n){var r,i=n+``,a;return function(){var o=et(this,e);return o===i?null:o===r?a:a=t(r=o,n)}}function Ri(e,t,n){var r,i,a;return function(){var o=et(this,e),s=n(this),c=s+``;return s??(c=s=(this.style.removeProperty(e),et(this,e))),o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s))}}function zi(e,t){var n,r,i,a=`style.`+t,o=`end.`+a,s;return function(){var c=qr(this,e),l=c.on,u=c.value[a]==null?s||=Ii(t):void 0;(l!==n||i!==u)&&(r=(n=l).copy()).on(o,i=u),c.on=r}}function Bi(e,t,n){var r=(e+=``)==`transform`?hr:ni;return t==null?this.styleTween(e,Fi(e,r)).on(`end.style.`+e,Ii(e)):typeof t==`function`?this.styleTween(e,Ri(e,r,ti(this,`style.`+e,t))).each(zi(this._id,e)):this.styleTween(e,Li(e,r,t),n).on(`end.style.`+e,null)}function Vi(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function Hi(e,t,n){var r,i;function a(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&Vi(e,a,n)),r}return a._value=t,a}function Ui(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 Error();return this.tween(r,Hi(e,t,n??``))}function Wi(e){return function(){this.textContent=e}}function W(e){return function(){this.textContent=e(this)??``}}function G(e){return this.tween(`text`,typeof e==`function`?W(ti(this,`text`,e)):Wi(e==null?``:e+``))}function Gi(e){return function(t){this.textContent=e.call(this,t)}}function Ki(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&Gi(r)),t}return r._value=e,r}function qi(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 Error();return this.tween(t,Ki(e))}function Ji(){for(var e=this._name,t=this._id,n=$i(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)if(c=o[l]){var u=Jr(c,t);Gr(c,e,n,l,o,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new Zi(r,this._parents,e,n)}function Yi(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(a,o){var s={value:o},c={value:function(){--i===0&&a()}};n.each(function(){var n=qr(this,r),i=n.on;i!==e&&(t=(e=i).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(c)),n.on=t}),i===0&&a()})}var Xi=0;function Zi(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function Qi(e){return Kt().transition(e)}function $i(){return++Xi}var ea=Kt.prototype;Zi.prototype=Qi.prototype={constructor:Zi,select:ji,selectAll:Mi,selectChild:ea.selectChild,selectChildren:ea.selectChildren,filter:wi,merge:Ti,selection:Pi,transition:Ji,call:ea.call,nodes:ea.nodes,node:ea.node,size:ea.size,empty:ea.empty,each:ea.each,on:Oi,attr:ci,attrTween:pi,style:Bi,styleTween:Ui,text:G,textTween:qi,remove:Ai,tween:ei,delay:gi,duration:yi,ease:xi,easeVarying:Ci,end:Yi,[Symbol.iterator]:ea[Symbol.iterator]};function ta(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var na={time:null,delay:0,duration:250,ease:ta};function ra(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw Error(`transition ${t} not found`);return n}function ia(e){var t,n;e instanceof Zi?(t=e._id,e=e._name):(t=$i(),(n=na).time=Nr(),e=e==null?null:e+``);for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&Gr(c,e,t,l,o,n||ra(c,t));return new Zi(r,this._parents,e,t)}Kt.prototype.interrupt=Zr,Kt.prototype.transition=ia;var aa=e=>()=>e;function oa(e,{sourceEvent:t,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function sa(e,t,n){this.k=e,this.x=t,this.y=n}sa.prototype={constructor:sa,scale:function(e){return e===1?this:new sa(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new sa(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return`translate(`+this.x+`,`+this.y+`) scale(`+this.k+`)`}};var ca=new sa(1,0,0);la.prototype=sa.prototype;function la(e){for(;!e.__zoom;)if(!(e=e.parentNode))return ca;return e.__zoom}function ua(e){e.stopImmediatePropagation()}function da(e){e.preventDefault(),e.stopImmediatePropagation()}function fa(e){return(!e.ctrlKey||e.type===`wheel`)&&!e.button}function pa(){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 ma(){return this.__zoom||ca}function ha(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function ga(){return navigator.maxTouchPoints||`ontouchstart`in this}function _a(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],a=e.invertY(t[0][1])-n[0][1],o=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}function va(){var e=fa,t=pa,n=_a,r=ha,i=ga,a=[0,1/0],o=[[-1/0,-1/0],[1/0,1/0]],s=250,c=xr,l=P(`start`,`zoom`,`end`),u,d,f,p=500,m=150,h=0,g=10;function _(e){e.property(`__zoom`,ma).on(`wheel.zoom`,w,{passive:!1}).on(`mousedown.zoom`,T).on(`dblclick.zoom`,E).filter(i).on(`touchstart.zoom`,D).on(`touchmove.zoom`,O).on(`touchend.zoom touchcancel.zoom`,k).style(`-webkit-tap-highlight-color`,`rgba(0,0,0,0)`)}_.transform=function(e,t,n,r){var i=e.selection?e.selection():e;i.property(`__zoom`,ma),e===i?i.interrupt().each(function(){S(this,arguments).event(r).start().zoom(null,typeof t==`function`?t.apply(this,arguments):t).end()}):x(e,t,n,r)},_.scaleBy=function(e,t,n,r){_.scaleTo(e,function(){return this.__zoom.k*(typeof t==`function`?t.apply(this,arguments):t)},n,r)},_.scaleTo=function(e,r,i,a){_.transform(e,function(){var e=t.apply(this,arguments),a=this.__zoom,s=i==null?b(e):typeof i==`function`?i.apply(this,arguments):i,c=a.invert(s),l=typeof r==`function`?r.apply(this,arguments):r;return n(y(v(a,l),s,c),e,o)},i,a)},_.translateBy=function(e,r,i,a){_.transform(e,function(){return n(this.__zoom.translate(typeof r==`function`?r.apply(this,arguments):r,typeof i==`function`?i.apply(this,arguments):i),t.apply(this,arguments),o)},null,a)},_.translateTo=function(e,r,i,a,s){_.transform(e,function(){var e=t.apply(this,arguments),s=this.__zoom,c=a==null?b(e):typeof a==`function`?a.apply(this,arguments):a;return n(ca.translate(c[0],c[1]).scale(s.k).translate(typeof r==`function`?-r.apply(this,arguments):-r,typeof i==`function`?-i.apply(this,arguments):-i),e,o)},a,s)};function v(e,t){return t=Math.max(a[0],Math.min(a[1],t)),t===e.k?e:new sa(t,e.x,e.y)}function y(e,t,n){var r=t[0]-n[0]*e.k,i=t[1]-n[1]*e.k;return r===e.x&&i===e.y?e:new sa(e.k,r,i)}function b(e){return[(+e[0][0]+ +e[1][0])/2,(+e[0][1]+ +e[1][1])/2]}function x(e,n,r,i){e.on(`start.zoom`,function(){S(this,arguments).event(i).start()}).on(`interrupt.zoom end.zoom`,function(){S(this,arguments).event(i).end()}).tween(`zoom`,function(){var e=this,a=arguments,o=S(e,a).event(i),s=t.apply(e,a),l=r==null?b(s):typeof r==`function`?r.apply(e,a):r,u=Math.max(s[1][0]-s[0][0],s[1][1]-s[0][1]),d=e.__zoom,f=typeof n==`function`?n.apply(e,a):n,p=c(d.invert(l).concat(u/d.k),f.invert(l).concat(u/f.k));return function(e){if(e===1)e=f;else{var t=p(e),n=u/t[2];e=new sa(n,l[0]-t[0]*n,l[1]-t[1]*n)}o.zoom(null,e)}})}function S(e,t,n){return!n&&e.__zooming||new C(e,t)}function C(e,n){this.that=e,this.args=n,this.active=0,this.sourceEvent=null,this.extent=t.apply(e,n),this.taps=0}C.prototype={event:function(e){return e&&(this.sourceEvent=e),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit(`start`)),this},zoom:function(e,t){return this.mouse&&e!==`mouse`&&(this.mouse[1]=t.invert(this.mouse[0])),this.touch0&&e!==`touch`&&(this.touch0[1]=t.invert(this.touch0[0])),this.touch1&&e!==`touch`&&(this.touch1[1]=t.invert(this.touch1[0])),this.that.__zoom=t,this.emit(`zoom`),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit(`end`)),this},emit:function(e){var t=Jt(this.that).datum();l.call(e,this.that,new oa(e,{sourceEvent:this.sourceEvent,target:_,type:e,transform:this.that.__zoom,dispatch:l}),t)}};function w(t,...i){if(!e.apply(this,arguments))return;var s=S(this,i).event(t),c=this.__zoom,l=Math.max(a[0],Math.min(a[1],c.k*2**r.apply(this,arguments))),u=Xt(t);if(s.wheel)(s.mouse[0][0]!==u[0]||s.mouse[0][1]!==u[1])&&(s.mouse[1]=c.invert(s.mouse[0]=u)),clearTimeout(s.wheel);else if(c.k===l)return;else s.mouse=[u,c.invert(u)],Xr(this),s.start();da(t),s.wheel=setTimeout(d,m),s.zoom(`mouse`,n(y(v(c,l),s.mouse[0],s.mouse[1]),s.extent,o));function d(){s.wheel=null,s.end()}}function T(t,...r){if(f||!e.apply(this,arguments))return;var i=t.currentTarget,a=S(this,r,!0).event(t),s=Jt(t.view).on(`mousemove.zoom`,d,!0).on(`mouseup.zoom`,p,!0),c=Xt(t,i),l=t.clientX,u=t.clientY;tn(t.view),ua(t),a.mouse=[c,this.__zoom.invert(c)],Xr(this),a.start();function d(e){if(da(e),!a.moved){var t=e.clientX-l,r=e.clientY-u;a.moved=t*t+r*r>h}a.event(e).zoom(`mouse`,n(y(a.that.__zoom,a.mouse[0]=Xt(e,i),a.mouse[1]),a.extent,o))}function p(e){s.on(`mousemove.zoom mouseup.zoom`,null),nn(e.view,a.moved),da(e),a.event(e).end()}}function E(r,...i){if(e.apply(this,arguments)){var a=this.__zoom,c=Xt(r.changedTouches?r.changedTouches[0]:r,this),l=a.invert(c),u=a.k*(r.shiftKey?.5:2),d=n(y(v(a,u),c,l),t.apply(this,i),o);da(r),s>0?Jt(this).transition().duration(s).call(x,d,c,r):Jt(this).call(_.transform,d,c,r)}}function D(t,...n){if(e.apply(this,arguments)){var r=t.touches,i=r.length,a=S(this,n,t.changedTouches.length===i).event(t),o,s,c,l;for(ua(t),s=0;s<i;++s)c=r[s],l=Xt(c,this),l=[l,this.__zoom.invert(l),c.identifier],a.touch0?!a.touch1&&a.touch0[2]!==l[2]&&(a.touch1=l,a.taps=0):(a.touch0=l,o=!0,a.taps=1+!!u);u&&=clearTimeout(u),o&&(a.taps<2&&(d=l[0],u=setTimeout(function(){u=null},p)),Xr(this),a.start())}}function O(e,...t){if(this.__zooming){var r=S(this,t).event(e),i=e.changedTouches,a=i.length,s,c,l,u;for(da(e),s=0;s<a;++s)c=i[s],l=Xt(c,this),r.touch0&&r.touch0[2]===c.identifier?r.touch0[0]=l:r.touch1&&r.touch1[2]===c.identifier&&(r.touch1[0]=l);if(c=r.that.__zoom,r.touch1){var d=r.touch0[0],f=r.touch0[1],p=r.touch1[0],m=r.touch1[1],h=(h=p[0]-d[0])*h+(h=p[1]-d[1])*h,g=(g=m[0]-f[0])*g+(g=m[1]-f[1])*g;c=v(c,Math.sqrt(h/g)),l=[(d[0]+p[0])/2,(d[1]+p[1])/2],u=[(f[0]+m[0])/2,(f[1]+m[1])/2]}else if(r.touch0)l=r.touch0[0],u=r.touch0[1];else return;r.zoom(`touch`,n(y(c,l,u),r.extent,o))}}function k(e,...t){if(this.__zooming){var n=S(this,t).event(e),r=e.changedTouches,i=r.length,a,o;for(ua(e),f&&clearTimeout(f),f=setTimeout(function(){f=null},p),a=0;a<i;++a)o=r[a],n.touch0&&n.touch0[2]===o.identifier?delete n.touch0:n.touch1&&n.touch1[2]===o.identifier&&delete n.touch1;if(n.touch1&&!n.touch0&&(n.touch0=n.touch1,delete n.touch1),n.touch0)n.touch0[1]=this.__zoom.invert(n.touch0[0]);else if(n.end(),n.taps===2&&(o=Xt(o,this),Math.hypot(d[0]-o[0],d[1]-o[1])<g)){var s=Jt(this).on(`dblclick.zoom`);s&&s.apply(this,arguments)}}}return _.wheelDelta=function(e){return arguments.length?(r=typeof e==`function`?e:aa(+e),_):r},_.filter=function(t){return arguments.length?(e=typeof t==`function`?t:aa(!!t),_):e},_.touchable=function(e){return arguments.length?(i=typeof e==`function`?e:aa(!!e),_):i},_.extent=function(e){return arguments.length?(t=typeof e==`function`?e:aa([[+e[0][0],+e[0][1]],[+e[1][0],+e[1][1]]]),_):t},_.scaleExtent=function(e){return arguments.length?(a[0]=+e[0],a[1]=+e[1],_):[a[0],a[1]]},_.translateExtent=function(e){return arguments.length?(o[0][0]=+e[0][0],o[1][0]=+e[1][0],o[0][1]=+e[0][1],o[1][1]=+e[1][1],_):[[o[0][0],o[0][1]],[o[1][0],o[1][1]]]},_.constrain=function(e){return arguments.length?(n=e,_):n},_.duration=function(e){return arguments.length?(s=+e,_):s},_.interpolate=function(e){return arguments.length?(c=e,_):c},_.on=function(){var e=l.on.apply(l,arguments);return e===l?_:e},_.clickDistance=function(e){return arguments.length?(h=(e=+e)*e,_):Math.sqrt(h)},_.tapDistance=function(e){return arguments.length?(g=+e,_):g},_}h();var ya=(0,w.createContext)(null),ba=ya.Provider,xa={error001:()=>`[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001`,error002:()=>`It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.`,error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>`The React Flow parent container needs a width and a height to render the graph.`,error005:()=>`Only child nodes can use a parent extent.`,error006:()=>`Can't create edge. An edge needs a source and a target.`,error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,t)=>`Couldn't create edge for ${e?`target`:`source`} handle id: "${e?t.targetHandle:t.sourceHandle}", edge id: ${t.id}.`,error010:()=>`Handle: No node id found. Make sure to only use a Handle inside a custom Node.`,error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`},Sa=xa.error001();function K(e,t){let n=(0,w.useContext)(ya);if(n===null)throw Error(Sa);return k(n,e,t)}var q=()=>{let e=(0,w.useContext)(ya);if(e===null)throw Error(Sa);return(0,w.useMemo)(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe,destroy:e.destroy}),[e])},Ca=e=>e.userSelectionActive?`none`:`all`;function wa({position:e,children:t,className:n,style:r,...i}){let a=K(Ca),o=`${e}`.split(`-`);return w.createElement(`div`,{className:_([`react-flow__panel`,n,...o]),style:{...r,pointerEvents:a},...i},t)}function Ta({proOptions:e,position:t=`bottom-right`}){return e?.hideAttribution?null:w.createElement(wa,{position:t,className:`react-flow__attribution`,"data-message":`Please only hide this attribution when you are subscribed to React Flow Pro: https://reactflow.dev/pro`},w.createElement(`a`,{href:`https://reactflow.dev`,target:`_blank`,rel:`noopener noreferrer`,"aria-label":`React Flow attribution`},`React Flow`))}var Ea=(0,w.memo)(({x:e,y:t,label:n,labelStyle:r={},labelShowBg:i=!0,labelBgStyle:a={},labelBgPadding:o=[2,4],labelBgBorderRadius:s=2,children:c,className:l,...u})=>{let d=(0,w.useRef)(null),[f,p]=(0,w.useState)({x:0,y:0,width:0,height:0}),m=_([`react-flow__edge-textwrapper`,l]);return(0,w.useEffect)(()=>{if(d.current){let e=d.current.getBBox();p({x:e.x,y:e.y,width:e.width,height:e.height})}},[n]),n===void 0||!n?null:w.createElement(`g`,{transform:`translate(${e-f.width/2} ${t-f.height/2})`,className:m,visibility:f.width?`visible`:`hidden`,...u},i&&w.createElement(`rect`,{width:f.width+2*o[0],x:-o[0],y:-o[1],height:f.height+2*o[1],className:`react-flow__edge-textbg`,style:a,rx:s,ry:s}),w.createElement(`text`,{className:`react-flow__edge-text`,y:f.height/2,dy:`0.3em`,ref:d,style:r},n),c)}),Da=e=>({width:e.offsetWidth,height:e.offsetHeight}),Oa=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),ka=(e={x:0,y:0},t)=>({x:Oa(e.x,t[0][0],t[1][0]),y:Oa(e.y,t[0][1],t[1][1])}),Aa=(e,t,n)=>e<t?Oa(Math.abs(e-t),1,50)/50:e>n?-Oa(Math.abs(e-n),1,50)/50:0,ja=(e,t)=>[Aa(e.x,35,t.width-35)*20,Aa(e.y,35,t.height-35)*20],Ma=e=>e.getRootNode?.()||window?.document,Na=(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)}),Pa=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),Fa=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),Ia=e=>({...e.positionAbsolute||{x:0,y:0},width:e.width||0,height:e.height||0}),La=(e,t)=>Fa(Na(Pa(e),Pa(t))),Ra=(e,t)=>{let n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),r=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*r)},za=e=>Ba(e.width)&&Ba(e.height)&&Ba(e.x)&&Ba(e.y),Ba=e=>!isNaN(e)&&isFinite(e),J=Symbol.for(`internals`),Va=[`Enter`,` `,`Escape`],Ha=(e,t)=>{},Ua=e=>`nativeEvent`in e;function Wa(e){let t=(Ua(e)?e.nativeEvent:e).composedPath?.()?.[0]||e.target;return[`INPUT`,`SELECT`,`TEXTAREA`].includes(t?.nodeName)||t?.hasAttribute(`contenteditable`)||!!t?.closest(`.nokey`)}var Ga=e=>`clientX`in e,Ka=(e,t)=>{let n=Ga(e),r=n?e.clientX:e.touches?.[0].clientX,i=n?e.clientY:e.touches?.[0].clientY;return{x:r-(t?.left??0),y:i-(t?.top??0)}},qa=()=>typeof navigator<`u`&&navigator?.userAgent?.indexOf(`Mac`)>=0,Ja=({id:e,path:t,labelX:n,labelY:r,label:i,labelStyle:a,labelShowBg:o,labelBgStyle:s,labelBgPadding:c,labelBgBorderRadius:l,style:u,markerEnd:d,markerStart:f,interactionWidth:p=20})=>w.createElement(w.Fragment,null,w.createElement(`path`,{id:e,style:u,d:t,fill:`none`,className:`react-flow__edge-path`,markerEnd:d,markerStart:f}),p&&w.createElement(`path`,{d:t,fill:`none`,strokeOpacity:0,strokeWidth:p,className:`react-flow__edge-interaction`}),i&&Ba(n)&&Ba(r)?w.createElement(Ea,{x:n,y:r,label:i,labelStyle:a,labelShowBg:o,labelBgStyle:s,labelBgPadding:c,labelBgBorderRadius:l}):null);Ja.displayName=`BaseEdge`;function Ya(e,t,n){return n===void 0?n:r=>{let i=t().edges.find(t=>t.id===e);i&&n(r,{...i})}}function Xa({sourceX:e,sourceY:t,targetX:n,targetY:r}){let i=Math.abs(n-e)/2,a=n<e?n+i:n-i,o=Math.abs(r-t)/2;return[a,r<t?r+o:r-o,i,o]}function Za({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:i,sourceControlY:a,targetControlX:o,targetControlY:s}){let c=e*.125+i*.375+o*.375+n*.125,l=t*.125+a*.375+s*.375+r*.125;return[c,l,Math.abs(c-e),Math.abs(l-t)]}var Qa;(function(e){e.Strict=`strict`,e.Loose=`loose`})(Qa||={});var $a;(function(e){e.Free=`free`,e.Vertical=`vertical`,e.Horizontal=`horizontal`})($a||={});var eo;(function(e){e.Partial=`partial`,e.Full=`full`})(eo||={});var to;(function(e){e.Bezier=`default`,e.Straight=`straight`,e.Step=`step`,e.SmoothStep=`smoothstep`,e.SimpleBezier=`simplebezier`})(to||={});var no;(function(e){e.Arrow=`arrow`,e.ArrowClosed=`arrowclosed`})(no||={});var Y;(function(e){e.Left=`left`,e.Top=`top`,e.Right=`right`,e.Bottom=`bottom`})(Y||={});function ro({pos:e,x1:t,y1:n,x2:r,y2:i}){return e===Y.Left||e===Y.Right?[.5*(t+r),n]:[t,.5*(n+i)]}function io({sourceX:e,sourceY:t,sourcePosition:n=Y.Bottom,targetX:r,targetY:i,targetPosition:a=Y.Top}){let[o,s]=ro({pos:n,x1:e,y1:t,x2:r,y2:i}),[c,l]=ro({pos:a,x1:r,y1:i,x2:e,y2:t}),[u,d,f,p]=Za({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:o,sourceControlY:s,targetControlX:c,targetControlY:l});return[`M${e},${t} C${o},${s} ${c},${l} ${r},${i}`,u,d,f,p]}var ao=(0,w.memo)(({sourceX:e,sourceY:t,targetX:n,targetY:r,sourcePosition:i=Y.Bottom,targetPosition:a=Y.Top,label:o,labelStyle:s,labelShowBg:c,labelBgStyle:l,labelBgPadding:u,labelBgBorderRadius:d,style:f,markerEnd:p,markerStart:m,interactionWidth:h})=>{let[g,_,v]=io({sourceX:e,sourceY:t,sourcePosition:i,targetX:n,targetY:r,targetPosition:a});return w.createElement(Ja,{path:g,labelX:_,labelY:v,label:o,labelStyle:s,labelShowBg:c,labelBgStyle:l,labelBgPadding:u,labelBgBorderRadius:d,style:f,markerEnd:p,markerStart:m,interactionWidth:h})});ao.displayName=`SimpleBezierEdge`;var oo={[Y.Left]:{x:-1,y:0},[Y.Right]:{x:1,y:0},[Y.Top]:{x:0,y:-1},[Y.Bottom]:{x:0,y:1}},so=({source:e,sourcePosition:t=Y.Bottom,target:n})=>t===Y.Left||t===Y.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},co=(e,t)=>Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2);function lo({source:e,sourcePosition:t=Y.Bottom,target:n,targetPosition:r=Y.Top,center:i,offset:a}){let o=oo[t],s=oo[r],c={x:e.x+o.x*a,y:e.y+o.y*a},l={x:n.x+s.x*a,y:n.y+s.y*a},u=so({source:c,sourcePosition:t,target:l}),d=u.x===0?`y`:`x`,f=u[d],p=[],m,h,g={x:0,y:0},_={x:0,y:0},[v,y,b,x]=Xa({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(o[d]*s[d]===-1){m=i.x??v,h=i.y??y;let e=[{x:m,y:c.y},{x:m,y:l.y}],t=[{x:c.x,y:h},{x:l.x,y:h}];p=o[d]===f?d===`x`?e:t:d===`x`?t:e}else{let i=[{x:c.x,y:l.y}],u=[{x:l.x,y:c.y}];if(p=d===`x`?o.x===f?u:i:o.y===f?i:u,t===r){let t=Math.abs(e[d]-n[d]);if(t<=a){let r=Math.min(a-1,a-t);o[d]===f?g[d]=(c[d]>e[d]?-1:1)*r:_[d]=(l[d]>n[d]?-1:1)*r}}if(t!==r){let e=d===`x`?`y`:`x`,t=o[d]===s[e],n=c[e]>l[e],r=c[e]<l[e];(o[d]===1&&(!t&&n||t&&r)||o[d]!==1&&(!t&&r||t&&n))&&(p=d===`x`?i:u)}let v={x:c.x+g.x,y:c.y+g.y},y={x:l.x+_.x,y:l.y+_.y};Math.max(Math.abs(v.x-p[0].x),Math.abs(y.x-p[0].x))>=Math.max(Math.abs(v.y-p[0].y),Math.abs(y.y-p[0].y))?(m=(v.x+y.x)/2,h=p[0].y):(m=p[0].x,h=(v.y+y.y)/2)}return[[e,{x:c.x+g.x,y:c.y+g.y},...p,{x:l.x+_.x,y:l.y+_.y},n],m,h,b,x]}function uo(e,t,n,r){let i=Math.min(co(e,t)/2,co(t,n)/2,r),{x:a,y:o}=t;if(e.x===a&&a===n.x||e.y===o&&o===n.y)return`L${a} ${o}`;if(e.y===o){let t=e.x<n.x?-1:1,r=e.y<n.y?1:-1;return`L ${a+i*t},${o}Q ${a},${o} ${a},${o+i*r}`}let s=e.x<n.x?1:-1;return`L ${a},${o+i*(e.y<n.y?-1:1)}Q ${a},${o} ${a+i*s},${o}`}function fo({sourceX:e,sourceY:t,sourcePosition:n=Y.Bottom,targetX:r,targetY:i,targetPosition:a=Y.Top,borderRadius:o=5,centerX:s,centerY:c,offset:l=20}){let[u,d,f,p,m]=lo({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:i},targetPosition:a,center:{x:s,y:c},offset:l});return[u.reduce((e,t,n)=>{let r=``;return r=n>0&&n<u.length-1?uo(u[n-1],t,u[n+1],o):`${n===0?`M`:`L`}${t.x} ${t.y}`,e+=r,e},``),d,f,p,m]}var po=(0,w.memo)(({sourceX:e,sourceY:t,targetX:n,targetY:r,label:i,labelStyle:a,labelShowBg:o,labelBgStyle:s,labelBgPadding:c,labelBgBorderRadius:l,style:u,sourcePosition:d=Y.Bottom,targetPosition:f=Y.Top,markerEnd:p,markerStart:m,pathOptions:h,interactionWidth:g})=>{let[_,v,y]=fo({sourceX:e,sourceY:t,sourcePosition:d,targetX:n,targetY:r,targetPosition:f,borderRadius:h?.borderRadius,offset:h?.offset});return w.createElement(Ja,{path:_,labelX:v,labelY:y,label:i,labelStyle:a,labelShowBg:o,labelBgStyle:s,labelBgPadding:c,labelBgBorderRadius:l,style:u,markerEnd:p,markerStart:m,interactionWidth:g})});po.displayName=`SmoothStepEdge`;var mo=(0,w.memo)(e=>w.createElement(po,{...e,pathOptions:(0,w.useMemo)(()=>({borderRadius:0,offset:e.pathOptions?.offset}),[e.pathOptions?.offset])}));mo.displayName=`StepEdge`;function ho({sourceX:e,sourceY:t,targetX:n,targetY:r}){let[i,a,o,s]=Xa({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,i,a,o,s]}var go=(0,w.memo)(({sourceX:e,sourceY:t,targetX:n,targetY:r,label:i,labelStyle:a,labelShowBg:o,labelBgStyle:s,labelBgPadding:c,labelBgBorderRadius:l,style:u,markerEnd:d,markerStart:f,interactionWidth:p})=>{let[m,h,g]=ho({sourceX:e,sourceY:t,targetX:n,targetY:r});return w.createElement(Ja,{path:m,labelX:h,labelY:g,label:i,labelStyle:a,labelShowBg:o,labelBgStyle:s,labelBgPadding:c,labelBgBorderRadius:l,style:u,markerEnd:d,markerStart:f,interactionWidth:p})});go.displayName=`StraightEdge`;function _o(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function vo({pos:e,x1:t,y1:n,x2:r,y2:i,c:a}){switch(e){case Y.Left:return[t-_o(t-r,a),n];case Y.Right:return[t+_o(r-t,a),n];case Y.Top:return[t,n-_o(n-i,a)];case Y.Bottom:return[t,n+_o(i-n,a)]}}function yo({sourceX:e,sourceY:t,sourcePosition:n=Y.Bottom,targetX:r,targetY:i,targetPosition:a=Y.Top,curvature:o=.25}){let[s,c]=vo({pos:n,x1:e,y1:t,x2:r,y2:i,c:o}),[l,u]=vo({pos:a,x1:r,y1:i,x2:e,y2:t,c:o}),[d,f,p,m]=Za({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:s,sourceControlY:c,targetControlX:l,targetControlY:u});return[`M${e},${t} C${s},${c} ${l},${u} ${r},${i}`,d,f,p,m]}var bo=(0,w.memo)(({sourceX:e,sourceY:t,targetX:n,targetY:r,sourcePosition:i=Y.Bottom,targetPosition:a=Y.Top,label:o,labelStyle:s,labelShowBg:c,labelBgStyle:l,labelBgPadding:u,labelBgBorderRadius:d,style:f,markerEnd:p,markerStart:m,pathOptions:h,interactionWidth:g})=>{let[_,v,y]=yo({sourceX:e,sourceY:t,sourcePosition:i,targetX:n,targetY:r,targetPosition:a,curvature:h?.curvature});return w.createElement(Ja,{path:_,labelX:v,labelY:y,label:o,labelStyle:s,labelShowBg:c,labelBgStyle:l,labelBgPadding:u,labelBgBorderRadius:d,style:f,markerEnd:p,markerStart:m,interactionWidth:g})});bo.displayName=`BezierEdge`;var xo=(0,w.createContext)(null),So=xo.Provider;xo.Consumer;var Co=()=>(0,w.useContext)(xo),wo=e=>`id`in e&&`source`in e&&`target`in e,To=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`reactflow__edge-${e}${t||``}-${n}${r||``}`,Eo=(e,t)=>e===void 0?``:typeof e==`string`?e:`${t?`${t}__`:``}${Object.keys(e).sort().map(t=>`${t}=${e[t]}`).join(`&`)}`,Do=(e,t)=>t.some(t=>t.source===e.source&&t.target===e.target&&(t.sourceHandle===e.sourceHandle||!t.sourceHandle&&!e.sourceHandle)&&(t.targetHandle===e.targetHandle||!t.targetHandle&&!e.targetHandle)),Oo=(e,t)=>{if(!e.source||!e.target)return xa.error006(),t;let n;return n=wo(e)?{...e}:{...e,id:To(e)},Do(n,t)?t:t.concat(n)},ko=({x:e,y:t},[n,r,i],a,[o,s])=>{let c={x:(e-n)/i,y:(t-r)/i};return a?{x:o*Math.round(c.x/o),y:s*Math.round(c.y/s)}:c},Ao=({x:e,y:t},[n,r,i])=>({x:e*i+n,y:t*i+r}),jo=(e,t=[0,0])=>{if(!e)return{x:0,y:0,positionAbsolute:{x:0,y:0}};let n=(e.width??0)*t[0],r=(e.height??0)*t[1],i={x:e.position.x-n,y:e.position.y-r};return{...i,positionAbsolute:e.positionAbsolute?{x:e.positionAbsolute.x-n,y:e.positionAbsolute.y-r}:i}},Mo=(e,t=[0,0])=>e.length===0?{x:0,y:0,width:0,height:0}:Fa(e.reduce((e,n)=>{let{x:r,y:i}=jo(n,t).positionAbsolute;return Na(e,Pa({x:r,y:i,width:n.width||0,height:n.height||0}))},{x:1/0,y:1/0,x2:-1/0,y2:-1/0})),No=(e,t,[n,r,i]=[0,0,1],a=!1,o=!1,s=[0,0])=>{let c={x:(t.x-n)/i,y:(t.y-r)/i,width:t.width/i,height:t.height/i},l=[];return e.forEach(e=>{let{width:t,height:n,selectable:r=!0,hidden:i=!1}=e;if(o&&!r||i)return!1;let{positionAbsolute:u}=jo(e,s),d=Ra(c,{x:u.x,y:u.y,width:t||0,height:n||0}),f=t===void 0||n===void 0||t===null||n===null,p=a&&d>0,m=(t||0)*(n||0);(f||p||d>=m||e.dragging)&&l.push(e)}),l},Po=(e,t)=>{let n=e.map(e=>e.id);return t.filter(e=>n.includes(e.source)||n.includes(e.target))},Fo=(e,t,n,r,i,a=.1)=>{let o=t/(e.width*(1+a)),s=n/(e.height*(1+a)),c=Oa(Math.min(o,s),r,i),l=e.x+e.width/2,u=e.y+e.height/2;return{x:t/2-l*c,y:n/2-u*c,zoom:c}},Io=(e,t=0)=>e.transition().duration(t);function Lo(e,t,n,r){return(t[n]||[]).reduce((t,i)=>(`${e.id}-${i.id}-${n}`!==r&&t.push({id:i.id||null,type:n,nodeId:e.id,x:(e.positionAbsolute?.x??0)+i.x+i.width/2,y:(e.positionAbsolute?.y??0)+i.y+i.height/2}),t),[])}function Ro(e,t,n,r,i,a){let{x:o,y:s}=Ka(e),c=t.elementsFromPoint(o,s).find(e=>e.classList.contains(`react-flow__handle`));if(c){let e=c.getAttribute(`data-nodeid`);if(e){let t=Uo(void 0,c),r=c.getAttribute(`data-handleid`),o=a({nodeId:e,id:r,type:t});if(o){let a=i.find(n=>n.nodeId===e&&n.type===t&&n.id===r);return{handle:{id:r,type:t,nodeId:e,x:a?.x||n.x,y:a?.y||n.y},validHandleResult:o}}}}let l=[],u=1/0;if(i.forEach(e=>{let t=Math.sqrt((e.x-n.x)**2+(e.y-n.y)**2);if(t<=r){let n=a(e);t<=u&&(t<u?l=[{handle:e,validHandleResult:n}]:t===u&&l.push({handle:e,validHandleResult:n}),u=t)}}),!l.length)return{handle:null,validHandleResult:Bo()};if(l.length===1)return l[0];let d=l.some(({validHandleResult:e})=>e.isValid),f=l.some(({handle:e})=>e.type===`target`);return l.find(({handle:e,validHandleResult:t})=>f?e.type===`target`:d?t.isValid:!0)||l[0]}var zo={source:null,target:null,sourceHandle:null,targetHandle:null},Bo=()=>({handleDomNode:null,isValid:!1,connection:zo,endHandle:null});function Vo(e,t,n,r,i,a,o){let s=i===`target`,c=o.querySelector(`.react-flow__handle[data-id="${e?.nodeId}-${e?.id}-${e?.type}"]`),l={...Bo(),handleDomNode:c};if(c){let e=Uo(void 0,c),i=c.getAttribute(`data-nodeid`),o=c.getAttribute(`data-handleid`),u=c.classList.contains(`connectable`),d=c.classList.contains(`connectableend`),f={source:s?i:n,sourceHandle:s?o:r,target:s?n:i,targetHandle:s?r:o};l.connection=f,u&&d&&(t===Qa.Strict?s&&e===`source`||!s&&e===`target`:i!==n||o!==r)&&(l.endHandle={nodeId:i,handleId:o,type:e},l.isValid=a(f))}return l}function Ho({nodes:e,nodeId:t,handleId:n,handleType:r}){return e.reduce((e,i)=>{if(i[J]){let{handleBounds:a}=i[J],o=[],s=[];a&&(o=Lo(i,a,`source`,`${t}-${n}-${r}`),s=Lo(i,a,`target`,`${t}-${n}-${r}`)),e.push(...o,...s)}return e},[])}function Uo(e,t){return e||(t?.classList.contains(`target`)?`target`:t?.classList.contains(`source`)?`source`:null)}function Wo(e){e?.classList.remove(`valid`,`connecting`,`react-flow__handle-valid`,`react-flow__handle-connecting`)}function Go(e,t){let n=null;return t?n=`valid`:e&&!t&&(n=`invalid`),n}function Ko({event:e,handleId:t,nodeId:n,onConnect:r,isTarget:i,getState:a,setState:o,isValidConnection:s,edgeUpdaterType:c,onReconnectEnd:l}){let u=Ma(e.target),{connectionMode:d,domNode:f,autoPanOnConnect:p,connectionRadius:m,onConnectStart:h,panBy:g,getNodes:_,cancelConnection:v}=a(),y=0,b,{x,y:S}=Ka(e),C=u?.elementFromPoint(x,S),w=Uo(c,C),T=f?.getBoundingClientRect();if(!T||!w)return;let E,D=Ka(e,T),O=!1,k=null,A=!1,j=null,M=Ho({nodes:_(),nodeId:n,handleId:t,handleType:w}),N=()=>{if(!p)return;let[e,t]=ja(D,T);g({x:e,y:t}),y=requestAnimationFrame(N)};o({connectionPosition:D,connectionStatus:null,connectionNodeId:n,connectionHandleId:t,connectionHandleType:w,connectionStartHandle:{nodeId:n,handleId:t,type:w},connectionEndHandle:null}),h?.(e,{nodeId:n,handleId:t,handleType:w});function P(e){let{transform:r}=a();D=Ka(e,T);let{handle:c,validHandleResult:l}=Ro(e,u,ko(D,r,!1,[1,1]),m,M,e=>Vo(e,d,n,t,i?`target`:`source`,s,u));if(b=c,O||=(N(),!0),j=l.handleDomNode,k=l.connection,A=l.isValid,o({connectionPosition:b&&A?Ao({x:b.x,y:b.y},r):D,connectionStatus:Go(!!b,A),connectionEndHandle:l.endHandle}),!b&&!A&&!j)return Wo(E);k.source!==k.target&&j&&(Wo(E),E=j,j.classList.add(`connecting`,`react-flow__handle-connecting`),j.classList.toggle(`valid`,A),j.classList.toggle(`react-flow__handle-valid`,A))}function F(e){(b||j)&&k&&A&&r?.(k),a().onConnectEnd?.(e),c&&l?.(e),Wo(E),v(),cancelAnimationFrame(y),O=!1,A=!1,k=null,j=null,u.removeEventListener(`mousemove`,P),u.removeEventListener(`mouseup`,F),u.removeEventListener(`touchmove`,P),u.removeEventListener(`touchend`,F)}u.addEventListener(`mousemove`,P),u.addEventListener(`mouseup`,F),u.addEventListener(`touchmove`,P),u.addEventListener(`touchend`,F)}var qo=()=>!0,Jo=e=>({connectionStartHandle:e.connectionStartHandle,connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName}),Yo=(e,t,n)=>r=>{let{connectionStartHandle:i,connectionEndHandle:a,connectionClickStartHandle:o}=r;return{connecting:i?.nodeId===e&&i?.handleId===t&&i?.type===n||a?.nodeId===e&&a?.handleId===t&&a?.type===n,clickConnecting:o?.nodeId===e&&o?.handleId===t&&o?.type===n}},Xo=(0,w.forwardRef)(({type:e=`source`,position:t=Y.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:i=!0,isConnectableEnd:a=!0,id:o,onConnect:s,children:c,className:l,onMouseDown:u,onTouchStart:d,...f},p)=>{let m=o||null,h=e===`target`,g=q(),v=Co(),{connectOnClick:y,noPanClassName:b}=K(Jo,M),{connecting:x,clickConnecting:S}=K(Yo(v,m,e),M);v||g.getState().onError?.(`010`,xa.error010());let C=e=>{let{defaultEdgeOptions:t,onConnect:n,hasDefaultEdges:r}=g.getState(),i={...t,...e};if(r){let{edges:e,setEdges:t}=g.getState();t(Oo(i,e))}n?.(i),s?.(i)},T=e=>{if(!v)return;let t=Ga(e);i&&(t&&e.button===0||!t)&&Ko({event:e,handleId:m,nodeId:v,onConnect:C,isTarget:h,getState:g.getState,setState:g.setState,isValidConnection:n||g.getState().isValidConnection||qo}),t?u?.(e):d?.(e)},E=t=>{let{onClickConnectStart:r,onClickConnectEnd:a,connectionClickStartHandle:o,connectionMode:s,isValidConnection:c}=g.getState();if(!v||!o&&!i)return;if(!o){r?.(t,{nodeId:v,handleId:m,handleType:e}),g.setState({connectionClickStartHandle:{nodeId:v,type:e,handleId:m}});return}let l=Ma(t.target),u=n||c||qo,{connection:d,isValid:f}=Vo({nodeId:v,id:m,type:e},s,o.nodeId,o.handleId||null,o.type,u,l);f&&C(d),a?.(t),g.setState({connectionClickStartHandle:null})};return w.createElement(`div`,{"data-handleid":m,"data-nodeid":v,"data-handlepos":t,"data-id":`${v}-${m}-${e}`,className:_([`react-flow__handle`,`react-flow__handle-${t}`,`nodrag`,b,l,{source:!h,target:h,connectable:r,connectablestart:i,connectableend:a,connecting:S,connectionindicator:r&&(i&&!x||a&&x)}]),onMouseDown:T,onTouchStart:T,onClick:y?E:void 0,ref:p,...f},c)});Xo.displayName=`Handle`;var Zo=(0,w.memo)(Xo),Qo=({data:e,isConnectable:t,targetPosition:n=Y.Top,sourcePosition:r=Y.Bottom})=>w.createElement(w.Fragment,null,w.createElement(Zo,{type:`target`,position:n,isConnectable:t}),e?.label,w.createElement(Zo,{type:`source`,position:r,isConnectable:t}));Qo.displayName=`DefaultNode`;var $o=(0,w.memo)(Qo),es=({data:e,isConnectable:t,sourcePosition:n=Y.Bottom})=>w.createElement(w.Fragment,null,e?.label,w.createElement(Zo,{type:`source`,position:n,isConnectable:t}));es.displayName=`InputNode`;var ts=(0,w.memo)(es),ns=({data:e,isConnectable:t,targetPosition:n=Y.Top})=>w.createElement(w.Fragment,null,w.createElement(Zo,{type:`target`,position:n,isConnectable:t}),e?.label);ns.displayName=`OutputNode`;var rs=(0,w.memo)(ns),is=()=>null;is.displayName=`GroupNode`;var as=e=>({selectedNodes:e.getNodes().filter(e=>e.selected),selectedEdges:e.edges.filter(e=>e.selected).map(e=>({...e}))}),os=e=>e.id;function ss(e,t){return M(e.selectedNodes.map(os),t.selectedNodes.map(os))&&M(e.selectedEdges.map(os),t.selectedEdges.map(os))}var cs=(0,w.memo)(({onSelectionChange:e})=>{let t=q(),{selectedNodes:n,selectedEdges:r}=K(as,ss);return(0,w.useEffect)(()=>{let i={nodes:n,edges:r};e?.(i),t.getState().onSelectionChange.forEach(e=>e(i))},[n,r,e]),null});cs.displayName=`SelectionListener`;var ls=e=>!!e.onSelectionChange;function us({onSelectionChange:e}){let t=K(ls);return e||t?w.createElement(cs,{onSelectionChange:e}):null}var ds=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset});function fs(e,t){(0,w.useEffect)(()=>{e!==void 0&&t(e)},[e])}function X(e,t,n){(0,w.useEffect)(()=>{t!==void 0&&n({[e]:t})},[t])}var ps=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:i,onConnectStart:a,onConnectEnd:o,onClickConnectStart:s,onClickConnectEnd:c,nodesDraggable:l,nodesConnectable:u,nodesFocusable:d,edgesFocusable:f,edgesUpdatable:p,elevateNodesOnSelect:m,minZoom:h,maxZoom:g,nodeExtent:_,onNodesChange:v,onEdgesChange:y,elementsSelectable:b,connectionMode:x,snapGrid:S,snapToGrid:C,translateExtent:T,connectOnClick:E,defaultEdgeOptions:D,fitView:O,fitViewOptions:k,onNodesDelete:A,onEdgesDelete:j,onNodeDrag:N,onNodeDragStart:P,onNodeDragStop:F,onSelectionDrag:ee,onSelectionDragStart:te,onSelectionDragStop:I,noPanClassName:L,nodeOrigin:R,rfId:ne,autoPanOnConnect:re,autoPanOnNodeDrag:ie,onError:ae,connectionRadius:oe,isValidConnection:se,nodeDragThreshold:ce})=>{let{setNodes:le,setEdges:ue,setDefaultNodesAndEdges:de,setMinZoom:fe,setMaxZoom:z,setTranslateExtent:B,setNodeExtent:pe,reset:me}=K(ds,M),V=q();return(0,w.useEffect)(()=>{let e=r?.map(e=>({...e,...D}));return de(n,e),()=>{me()}},[]),X(`defaultEdgeOptions`,D,V.setState),X(`connectionMode`,x,V.setState),X(`onConnect`,i,V.setState),X(`onConnectStart`,a,V.setState),X(`onConnectEnd`,o,V.setState),X(`onClickConnectStart`,s,V.setState),X(`onClickConnectEnd`,c,V.setState),X(`nodesDraggable`,l,V.setState),X(`nodesConnectable`,u,V.setState),X(`nodesFocusable`,d,V.setState),X(`edgesFocusable`,f,V.setState),X(`edgesUpdatable`,p,V.setState),X(`elementsSelectable`,b,V.setState),X(`elevateNodesOnSelect`,m,V.setState),X(`snapToGrid`,C,V.setState),X(`snapGrid`,S,V.setState),X(`onNodesChange`,v,V.setState),X(`onEdgesChange`,y,V.setState),X(`connectOnClick`,E,V.setState),X(`fitViewOnInit`,O,V.setState),X(`fitViewOnInitOptions`,k,V.setState),X(`onNodesDelete`,A,V.setState),X(`onEdgesDelete`,j,V.setState),X(`onNodeDrag`,N,V.setState),X(`onNodeDragStart`,P,V.setState),X(`onNodeDragStop`,F,V.setState),X(`onSelectionDrag`,ee,V.setState),X(`onSelectionDragStart`,te,V.setState),X(`onSelectionDragStop`,I,V.setState),X(`noPanClassName`,L,V.setState),X(`nodeOrigin`,R,V.setState),X(`rfId`,ne,V.setState),X(`autoPanOnConnect`,re,V.setState),X(`autoPanOnNodeDrag`,ie,V.setState),X(`onError`,ae,V.setState),X(`connectionRadius`,oe,V.setState),X(`isValidConnection`,se,V.setState),X(`nodeDragThreshold`,ce,V.setState),fs(e,le),fs(t,ue),fs(h,fe),fs(g,z),fs(T,B),fs(_,pe),null},ms={display:`none`},hs={position:`absolute`,width:1,height:1,margin:-1,border:0,padding:0,overflow:`hidden`,clip:`rect(0px, 0px, 0px, 0px)`,clipPath:`inset(100%)`},gs=`react-flow__node-desc`,_s=`react-flow__edge-desc`,vs=`react-flow__aria-live`,ys=e=>e.ariaLiveMessage;function bs({rfId:e}){let t=K(ys);return w.createElement(`div`,{id:`${vs}-${e}`,"aria-live":`assertive`,"aria-atomic":`true`,style:hs},t)}function xs({rfId:e,disableKeyboardA11y:t}){return w.createElement(w.Fragment,null,w.createElement(`div`,{id:`${gs}-${e}`,style:ms},`Press enter or space to select a node.`,!t&&`You can then use the arrow keys to move the node around.`,` Press delete to remove it and escape to cancel.`,` `),w.createElement(`div`,{id:`${_s}-${e}`,style:ms},`Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.`),!t&&w.createElement(bs,{rfId:e}))}var Ss=(e=null,t={actInsideInputWithModifier:!0})=>{let[n,r]=(0,w.useState)(!1),i=(0,w.useRef)(!1),a=(0,w.useRef)(new Set([])),[o,s]=(0,w.useMemo)(()=>{if(e!==null){let t=(Array.isArray(e)?e:[e]).filter(e=>typeof e==`string`).map(e=>e.split(`+`));return[t,t.reduce((e,t)=>e.concat(...t),[])]}return[[],[]]},[e]);return(0,w.useEffect)(()=>{let n=typeof document<`u`?document:null,c=t?.target||n;if(e!==null){let e=e=>{if(i.current=e.ctrlKey||e.metaKey||e.shiftKey,(!i.current||i.current&&!t.actInsideInputWithModifier)&&Wa(e))return!1;let n=ws(e.code,s);a.current.add(e[n]),Cs(o,a.current,!1)&&(e.preventDefault(),r(!0))},n=e=>{if((!i.current||i.current&&!t.actInsideInputWithModifier)&&Wa(e))return!1;let n=ws(e.code,s);Cs(o,a.current,!0)?(r(!1),a.current.clear()):a.current.delete(e[n]),e.key===`Meta`&&a.current.clear(),i.current=!1},l=()=>{a.current.clear(),r(!1)};return c?.addEventListener(`keydown`,e),c?.addEventListener(`keyup`,n),window.addEventListener(`blur`,l),()=>{c?.removeEventListener(`keydown`,e),c?.removeEventListener(`keyup`,n),window.removeEventListener(`blur`,l)}}},[e,r]),n};function Cs(e,t,n){return e.filter(e=>n||e.length===t.size).some(e=>e.every(e=>t.has(e)))}function ws(e,t){return t.includes(e)?`code`:`key`}function Ts(e,t,n,r){let i=e.parentNode||e.parentId;if(!i)return n;let a=t.get(i),o=jo(a,r);return Ts(a,t,{x:(n.x??0)+o.x,y:(n.y??0)+o.y,z:(a[J]?.z??0)>(n.z??0)?a[J]?.z??0:n.z??0},r)}function Es(e,t,n){e.forEach(r=>{let i=r.parentNode||r.parentId;if(i&&!e.has(i))throw Error(`Parent node ${i} not found`);if(i||n?.[r.id]){let{x:i,y:a,z:o}=Ts(r,e,{...r.position,z:r[J]?.z??0},t);r.positionAbsolute={x:i,y:a},r[J].z=o,n?.[r.id]&&(r[J].isParent=!0)}})}function Ds(e,t,n,r){let i=new Map,a={},o=r?1e3:0;return e.forEach(e=>{let n=(Ba(e.zIndex)?e.zIndex:0)+(e.selected?o:0),r=t.get(e.id),s={...e,positionAbsolute:{x:e.position.x,y:e.position.y}},c=e.parentNode||e.parentId;c&&(a[c]=!0);let l=r?.type&&r?.type!==e.type;Object.defineProperty(s,J,{enumerable:!1,value:{handleBounds:l?void 0:r?.[J]?.handleBounds,z:n}}),i.set(e.id,s)}),Es(i,n,a),i}function Os(e,t={}){let{getNodes:n,width:r,height:i,minZoom:a,maxZoom:o,d3Zoom:s,d3Selection:c,fitViewOnInitDone:l,fitViewOnInit:u,nodeOrigin:d}=e(),f=t.initial&&!l&&u;if(s&&c&&(f||!t.initial)){let e=n().filter(e=>{let n=t.includeHiddenNodes?e.width&&e.height:!e.hidden;return t.nodes?.length?n&&t.nodes.some(t=>t.id===e.id):n}),l=e.every(e=>e.width&&e.height);if(e.length>0&&l){let{x:n,y:l,zoom:u}=Fo(Mo(e,d),r,i,t.minZoom??a,t.maxZoom??o,t.padding??.1),f=ca.translate(n,l).scale(u);return typeof t.duration==`number`&&t.duration>0?s.transform(Io(c,t.duration),f):s.transform(c,f),!0}}return!1}function ks(e,t){return e.forEach(e=>{let n=t.get(e.id);n&&t.set(n.id,{...n,[J]:n[J],selected:e.selected})}),new Map(t)}function As(e,t){return t.map(t=>{let n=e.find(e=>e.id===t.id);return n&&(t.selected=n.selected),t})}function js({changedNodes:e,changedEdges:t,get:n,set:r}){let{nodeInternals:i,edges:a,onNodesChange:o,onEdgesChange:s,hasDefaultNodes:c,hasDefaultEdges:l}=n();e?.length&&(c&&r({nodeInternals:ks(e,i)}),o?.(e)),t?.length&&(l&&r({edges:As(t,a)}),s?.(t))}var Ms=()=>{},Ns={zoomIn:Ms,zoomOut:Ms,zoomTo:Ms,getZoom:()=>1,setViewport:Ms,getViewport:()=>({x:0,y:0,zoom:1}),fitView:()=>!1,setCenter:Ms,fitBounds:Ms,project:e=>e,screenToFlowPosition:e=>e,flowToScreenPosition:e=>e,viewportInitialized:!1},Ps=e=>({d3Zoom:e.d3Zoom,d3Selection:e.d3Selection}),Fs=()=>{let e=q(),{d3Zoom:t,d3Selection:n}=K(Ps,M);return(0,w.useMemo)(()=>n&&t?{zoomIn:e=>t.scaleBy(Io(n,e?.duration),1.2),zoomOut:e=>t.scaleBy(Io(n,e?.duration),1/1.2),zoomTo:(e,r)=>t.scaleTo(Io(n,r?.duration),e),getZoom:()=>e.getState().transform[2],setViewport:(r,i)=>{let[a,o,s]=e.getState().transform,c=ca.translate(r.x??a,r.y??o).scale(r.zoom??s);t.transform(Io(n,i?.duration),c)},getViewport:()=>{let[t,n,r]=e.getState().transform;return{x:t,y:n,zoom:r}},fitView:t=>Os(e.getState,t),setCenter:(r,i,a)=>{let{width:o,height:s,maxZoom:c}=e.getState(),l=a?.zoom===void 0?c:a.zoom,u=o/2-r*l,d=s/2-i*l,f=ca.translate(u,d).scale(l);t.transform(Io(n,a?.duration),f)},fitBounds:(r,i)=>{let{width:a,height:o,minZoom:s,maxZoom:c}=e.getState(),{x:l,y:u,zoom:d}=Fo(r,a,o,s,c,i?.padding??.1),f=ca.translate(l,u).scale(d);t.transform(Io(n,i?.duration),f)},project:t=>{let{transform:n,snapToGrid:r,snapGrid:i}=e.getState();return console.warn("[DEPRECATED] `project` is deprecated. Instead use `screenToFlowPosition`. There is no need to subtract the react flow bounds anymore! https://reactflow.dev/api-reference/types/react-flow-instance#screen-to-flow-position"),ko(t,n,r,i)},screenToFlowPosition:t=>{let{transform:n,snapToGrid:r,snapGrid:i,domNode:a}=e.getState();if(!a)return t;let{x:o,y:s}=a.getBoundingClientRect();return ko({x:t.x-o,y:t.y-s},n,r,i)},flowToScreenPosition:t=>{let{transform:n,domNode:r}=e.getState();if(!r)return t;let{x:i,y:a}=r.getBoundingClientRect(),o=Ao(t,n);return{x:o.x+i,y:o.y+a}},viewportInitialized:!0}:Ns,[t,n])};function Is(){let e=Fs(),t=q(),n=(0,w.useCallback)(()=>t.getState().getNodes().map(e=>({...e})),[]),r=(0,w.useCallback)(e=>t.getState().nodeInternals.get(e),[]),i=(0,w.useCallback)(()=>{let{edges:e=[]}=t.getState();return e.map(e=>({...e}))},[]),a=(0,w.useCallback)(e=>{let{edges:n=[]}=t.getState();return n.find(t=>t.id===e)},[]),o=(0,w.useCallback)(e=>{let{getNodes:n,setNodes:r,hasDefaultNodes:i,onNodesChange:a}=t.getState(),o=n(),s=typeof e==`function`?e(o):e;i?r(s):a&&a(s.length===0?o.map(e=>({type:`remove`,id:e.id})):s.map(e=>({item:e,type:`reset`})))},[]),s=(0,w.useCallback)(e=>{let{edges:n=[],setEdges:r,hasDefaultEdges:i,onEdgesChange:a}=t.getState(),o=typeof e==`function`?e(n):e;i?r(o):a&&a(o.length===0?n.map(e=>({type:`remove`,id:e.id})):o.map(e=>({item:e,type:`reset`})))},[]),c=(0,w.useCallback)(e=>{let n=Array.isArray(e)?e:[e],{getNodes:r,setNodes:i,hasDefaultNodes:a,onNodesChange:o}=t.getState();a?i([...r(),...n]):o&&o(n.map(e=>({item:e,type:`add`})))},[]),l=(0,w.useCallback)(e=>{let n=Array.isArray(e)?e:[e],{edges:r=[],setEdges:i,hasDefaultEdges:a,onEdgesChange:o}=t.getState();a?i([...r,...n]):o&&o(n.map(e=>({item:e,type:`add`})))},[]),u=(0,w.useCallback)(()=>{let{getNodes:e,edges:n=[],transform:r}=t.getState(),[i,a,o]=r;return{nodes:e().map(e=>({...e})),edges:n.map(e=>({...e})),viewport:{x:i,y:a,zoom:o}}},[]),d=(0,w.useCallback)(({nodes:e,edges:n})=>{let{nodeInternals:r,getNodes:i,edges:a,hasDefaultNodes:o,hasDefaultEdges:s,onNodesDelete:c,onEdgesDelete:l,onNodesChange:u,onEdgesChange:d}=t.getState(),f=(e||[]).map(e=>e.id),p=(n||[]).map(e=>e.id),m=i().reduce((e,t)=>{let n=t.parentNode||t.parentId,r=!f.includes(t.id)&&n&&e.find(e=>e.id===n);return(typeof t.deletable!=`boolean`||t.deletable)&&(f.includes(t.id)||r)&&e.push(t),e},[]),h=a.filter(e=>typeof e.deletable==`boolean`?e.deletable:!0),g=h.filter(e=>p.includes(e.id));if(m||g){let e=Po(m,h),n=[...g,...e],i=n.reduce((e,t)=>(e.includes(t.id)||e.push(t.id),e),[]);(s||o)&&(s&&t.setState({edges:a.filter(e=>!i.includes(e.id))}),o&&(m.forEach(e=>{r.delete(e.id)}),t.setState({nodeInternals:new Map(r)}))),i.length>0&&(l?.(n),d&&d(i.map(e=>({id:e,type:`remove`})))),m.length>0&&(c?.(m),u&&u(m.map(e=>({id:e.id,type:`remove`}))))}},[]),f=(0,w.useCallback)(e=>{let n=za(e),r=n?null:t.getState().nodeInternals.get(e.id);return!n&&!r?[null,null,n]:[n?e:Ia(r),r,n]},[]),p=(0,w.useCallback)((e,n=!0,r)=>{let[i,a,o]=f(e);return i?(r||t.getState().getNodes()).filter(e=>{if(!o&&(e.id===a.id||!e.positionAbsolute))return!1;let t=Ra(Ia(e),i);return n&&t>0||t>=i.width*i.height}):[]},[]),m=(0,w.useCallback)((e,t,n=!0)=>{let[r]=f(e);if(!r)return!1;let i=Ra(r,t);return n&&i>0||i>=r.width*r.height},[]);return(0,w.useMemo)(()=>({...e,getNodes:n,getNode:r,getEdges:i,getEdge:a,setNodes:o,setEdges:s,addNodes:c,addEdges:l,toObject:u,deleteElements:d,getIntersectingNodes:p,isNodeIntersecting:m}),[e,n,r,i,a,o,s,c,l,u,d,p,m])}var Ls={actInsideInputWithModifier:!1},Rs=({deleteKeyCode:e,multiSelectionKeyCode:t})=>{let n=q(),{deleteElements:r}=Is(),i=Ss(e,Ls),a=Ss(t);(0,w.useEffect)(()=>{if(i){let{edges:e,getNodes:t}=n.getState();r({nodes:t().filter(e=>e.selected),edges:e.filter(e=>e.selected)}),n.setState({nodesSelectionActive:!1})}},[i]),(0,w.useEffect)(()=>{n.setState({multiSelectionActive:a})},[a])};function zs(e){let t=q();(0,w.useEffect)(()=>{let n,r=()=>{if(!e.current)return;let n=Da(e.current);(n.height===0||n.width===0)&&t.getState().onError?.(`004`,xa.error004()),t.setState({width:n.width||500,height:n.height||500})};return r(),window.addEventListener(`resize`,r),e.current&&(n=new ResizeObserver(()=>r()),n.observe(e.current)),()=>{window.removeEventListener(`resize`,r),n&&e.current&&n.unobserve(e.current)}},[])}var Bs={position:`absolute`,width:`100%`,height:`100%`,top:0,left:0},Vs=(e,t)=>e.x!==t.x||e.y!==t.y||e.zoom!==t.k,Hs=e=>({x:e.x,y:e.y,zoom:e.k}),Us=(e,t)=>e.target.closest(`.${t}`),Ws=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),Gs=e=>{let t=e.ctrlKey&&qa()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t},Ks=e=>({d3Zoom:e.d3Zoom,d3Selection:e.d3Selection,d3ZoomHandler:e.d3ZoomHandler,userSelectionActive:e.userSelectionActive}),qs=({onMove:e,onMoveStart:t,onMoveEnd:n,onPaneContextMenu:r,zoomOnScroll:i=!0,zoomOnPinch:a=!0,panOnScroll:o=!1,panOnScrollSpeed:s=.5,panOnScrollMode:c=$a.Free,zoomOnDoubleClick:l=!0,elementsSelectable:u,panOnDrag:d=!0,defaultViewport:f,translateExtent:p,minZoom:m,maxZoom:h,zoomActivationKeyCode:g,preventScrolling:_=!0,children:v,noWheelClassName:y,noPanClassName:b})=>{let x=(0,w.useRef)(),S=q(),C=(0,w.useRef)(!1),T=(0,w.useRef)(!1),E=(0,w.useRef)(null),D=(0,w.useRef)({x:0,y:0,zoom:0}),{d3Zoom:O,d3Selection:k,d3ZoomHandler:A,userSelectionActive:j}=K(Ks,M),N=Ss(g),P=(0,w.useRef)(0),F=(0,w.useRef)(!1),ee=(0,w.useRef)();return zs(E),(0,w.useEffect)(()=>{if(E.current){let e=E.current.getBoundingClientRect(),t=va().scaleExtent([m,h]).translateExtent(p),n=Jt(E.current).call(t),r=ca.translate(f.x,f.y).scale(Oa(f.zoom,m,h)),i=[[0,0],[e.width,e.height]],a=t.constrain()(r,i,p);t.transform(n,a),t.wheelDelta(Gs),S.setState({d3Zoom:t,d3Selection:n,d3ZoomHandler:n.on(`wheel.zoom`),transform:[a.x,a.y,a.k],domNode:E.current.closest(`.react-flow`)})}},[]),(0,w.useEffect)(()=>{k&&O&&(o&&!N&&!j?k.on(`wheel.zoom`,r=>{if(Us(r,y))return!1;r.preventDefault(),r.stopImmediatePropagation();let i=k.property(`__zoom`).k||1;if(r.ctrlKey&&a){let e=Xt(r),t=i*2**Gs(r);O.scaleTo(k,t,e,r);return}let o=r.deltaMode===1?20:1,l=c===$a.Vertical?0:r.deltaX*o,u=c===$a.Horizontal?0:r.deltaY*o;!qa()&&r.shiftKey&&c!==$a.Vertical&&(l=r.deltaY*o,u=0),O.translateBy(k,-(l/i)*s,-(u/i)*s,{internal:!0});let d=Hs(k.property(`__zoom`)),{onViewportChangeStart:f,onViewportChange:p,onViewportChangeEnd:m}=S.getState();clearTimeout(ee.current),F.current||(F.current=!0,t?.(r,d),f?.(d)),F.current&&(e?.(r,d),p?.(d),ee.current=setTimeout(()=>{n?.(r,d),m?.(d),F.current=!1},150))},{passive:!1}):A!==void 0&&k.on(`wheel.zoom`,function(e,t){if(!_&&e.type===`wheel`&&!e.ctrlKey||Us(e,y))return null;e.preventDefault(),A.call(this,e,t)},{passive:!1}))},[j,o,c,k,O,A,N,a,_,y,t,e,n]),(0,w.useEffect)(()=>{O&&O.on(`start`,e=>{if(!e.sourceEvent||e.sourceEvent.internal)return null;P.current=e.sourceEvent?.button;let{onViewportChangeStart:n}=S.getState(),r=Hs(e.transform);C.current=!0,D.current=r,e.sourceEvent?.type===`mousedown`&&S.setState({paneDragging:!0}),n?.(r),t?.(e.sourceEvent,r)})},[O,t]),(0,w.useEffect)(()=>{O&&(j&&!C.current?O.on(`zoom`,null):j||O.on(`zoom`,t=>{let{onViewportChange:n}=S.getState();if(S.setState({transform:[t.transform.x,t.transform.y,t.transform.k]}),T.current=!!(r&&Ws(d,P.current??0)),(e||n)&&!t.sourceEvent?.internal){let r=Hs(t.transform);n?.(r),e?.(t.sourceEvent,r)}}))},[j,O,e,d,r]),(0,w.useEffect)(()=>{O&&O.on(`end`,e=>{if(!e.sourceEvent||e.sourceEvent.internal)return null;let{onViewportChangeEnd:t}=S.getState();if(C.current=!1,S.setState({paneDragging:!1}),r&&Ws(d,P.current??0)&&!T.current&&r(e.sourceEvent),T.current=!1,(n||t)&&Vs(D.current,e.transform)){let r=Hs(e.transform);D.current=r,clearTimeout(x.current),x.current=setTimeout(()=>{t?.(r),n?.(e.sourceEvent,r)},o?150:0)}})},[O,o,d,n,r]),(0,w.useEffect)(()=>{O&&O.filter(e=>{let t=N||i,n=a&&e.ctrlKey;if((d===!0||Array.isArray(d)&&d.includes(1))&&e.button===1&&e.type===`mousedown`&&(Us(e,`react-flow__node`)||Us(e,`react-flow__edge`)))return!0;if(!d&&!t&&!o&&!l&&!a||j||!l&&e.type===`dblclick`||Us(e,y)&&e.type===`wheel`||Us(e,b)&&(e.type!==`wheel`||o&&e.type===`wheel`&&!N)||!a&&e.ctrlKey&&e.type===`wheel`||!t&&!o&&!n&&e.type===`wheel`||!d&&(e.type===`mousedown`||e.type===`touchstart`)||Array.isArray(d)&&!d.includes(e.button)&&e.type===`mousedown`)return!1;let r=Array.isArray(d)&&d.includes(e.button)||!e.button||e.button<=1;return(!e.ctrlKey||e.type===`wheel`)&&r})},[j,O,i,a,o,l,d,u,N]),w.createElement(`div`,{className:`react-flow__renderer`,ref:E,style:Bs},v)},Js=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function Ys(){let{userSelectionActive:e,userSelectionRect:t}=K(Js,M);return e&&t?w.createElement(`div`,{className:`react-flow__selection react-flow__container`,style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}function Xs(e,t){let n=t.parentNode||t.parentId,r=e.find(e=>e.id===n);if(r){let e=t.position.x+t.width-r.width,n=t.position.y+t.height-r.height;if(e>0||n>0||t.position.x<0||t.position.y<0){if(r.style={...r.style},r.style.width=r.style.width??r.width,r.style.height=r.style.height??r.height,e>0&&(r.style.width+=e),n>0&&(r.style.height+=n),t.position.x<0){let e=Math.abs(t.position.x);r.position.x=r.position.x-e,r.style.width+=e,t.position.x=0}if(t.position.y<0){let e=Math.abs(t.position.y);r.position.y=r.position.y-e,r.style.height+=e,t.position.y=0}r.width=r.style.width,r.height=r.style.height}}}function Zs(e,t){if(e.some(e=>e.type===`reset`))return e.filter(e=>e.type===`reset`).map(e=>e.item);let n=e.filter(e=>e.type===`add`).map(e=>e.item);return t.reduce((t,n)=>{let r=e.filter(e=>e.id===n.id);if(r.length===0)return t.push(n),t;let i={...n};for(let e of r)if(e)switch(e.type){case`select`:i.selected=e.selected;break;case`position`:e.position!==void 0&&(i.position=e.position),e.positionAbsolute!==void 0&&(i.positionAbsolute=e.positionAbsolute),e.dragging!==void 0&&(i.dragging=e.dragging),i.expandParent&&Xs(t,i);break;case`dimensions`:e.dimensions!==void 0&&(i.width=e.dimensions.width,i.height=e.dimensions.height),e.updateStyle!==void 0&&(i.style={...i.style||{},...e.dimensions}),typeof e.resizing==`boolean`&&(i.resizing=e.resizing),i.expandParent&&Xs(t,i);break;case`remove`:return t}return t.push(i),t},n)}function Qs(e,t){return Zs(e,t)}function $s(e,t){return Zs(e,t)}var ec=(e,t)=>({id:e,type:`select`,selected:t});function tc(e,t){return e.reduce((e,n)=>{let r=t.includes(n.id);return!n.selected&&r?(n.selected=!0,e.push(ec(n.id,!0))):n.selected&&!r&&(n.selected=!1,e.push(ec(n.id,!1))),e},[])}var nc=(e,t)=>n=>{n.target===t.current&&e?.(n)},rc=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging}),ic=(0,w.memo)(({isSelecting:e,selectionMode:t=eo.Full,panOnDrag:n,onSelectionStart:r,onSelectionEnd:i,onPaneClick:a,onPaneContextMenu:o,onPaneScroll:s,onPaneMouseEnter:c,onPaneMouseMove:l,onPaneMouseLeave:u,children:d})=>{let f=(0,w.useRef)(null),p=q(),m=(0,w.useRef)(0),h=(0,w.useRef)(0),g=(0,w.useRef)(),{userSelectionActive:v,elementsSelectable:y,dragging:b}=K(rc,M),x=()=>{p.setState({userSelectionActive:!1,userSelectionRect:null}),m.current=0,h.current=0},S=e=>{a?.(e),p.getState().resetSelectedElements(),p.setState({nodesSelectionActive:!1})},C=e=>{if(Array.isArray(n)&&n?.includes(2)){e.preventDefault();return}o?.(e)},T=s?e=>s(e):void 0,E=t=>{let{resetSelectedElements:n,domNode:i}=p.getState();if(g.current=i?.getBoundingClientRect(),!y||!e||t.button!==0||t.target!==f.current||!g.current)return;let{x:a,y:o}=Ka(t,g.current);n(),p.setState({userSelectionRect:{width:0,height:0,startX:a,startY:o,x:a,y:o}}),r?.(t)},D=n=>{let{userSelectionRect:r,nodeInternals:i,edges:a,transform:o,onNodesChange:s,onEdgesChange:c,nodeOrigin:l,getNodes:u}=p.getState();if(!e||!g.current||!r)return;p.setState({userSelectionActive:!0,nodesSelectionActive:!1});let d=Ka(n,g.current),f=r.startX??0,_=r.startY??0,v={...r,x:d.x<f?d.x:f,y:d.y<_?d.y:_,width:Math.abs(d.x-f),height:Math.abs(d.y-_)},y=u(),b=No(i,v,o,t===eo.Partial,!0,l),x=Po(b,a).map(e=>e.id),S=b.map(e=>e.id);if(m.current!==S.length){m.current=S.length;let e=tc(y,S);e.length&&s?.(e)}if(h.current!==x.length){h.current=x.length;let e=tc(a,x);e.length&&c?.(e)}p.setState({userSelectionRect:v})},O=e=>{if(e.button!==0)return;let{userSelectionRect:t}=p.getState();!v&&t&&e.target===f.current&&S?.(e),p.setState({nodesSelectionActive:m.current>0}),x(),i?.(e)},k=e=>{v&&(p.setState({nodesSelectionActive:m.current>0}),i?.(e)),x()},A=y&&(e||v);return w.createElement(`div`,{className:_([`react-flow__pane`,{dragging:b,selection:e}]),onClick:A?void 0:nc(S,f),onContextMenu:nc(C,f),onWheel:nc(T,f),onMouseEnter:A?void 0:c,onMouseDown:A?E:void 0,onMouseMove:A?D:l,onMouseUp:A?O:void 0,onMouseLeave:A?k:u,ref:f,style:Bs},d,w.createElement(Ys,null))});ic.displayName=`Pane`;function ac(e,t){let n=e.parentNode||e.parentId;if(!n)return!1;let r=t.get(n);return r?r.selected?!0:ac(r,t):!1}function oc(e,t,n){let r=e;do{if(r?.matches(t))return!0;if(r===n.current)return!1;r=r.parentElement}while(r);return!1}function sc(e,t,n,r){return Array.from(e.values()).filter(n=>(n.selected||n.id===r)&&(!n.parentNode||n.parentId||!ac(n,e))&&(n.draggable||t&&n.draggable===void 0)).map(e=>({id:e.id,position:e.position||{x:0,y:0},positionAbsolute:e.positionAbsolute||{x:0,y:0},distance:{x:n.x-(e.positionAbsolute?.x??0),y:n.y-(e.positionAbsolute?.y??0)},delta:{x:0,y:0},extent:e.extent,parentNode:e.parentNode||e.parentId,parentId:e.parentNode||e.parentId,width:e.width,height:e.height,expandParent:e.expandParent}))}function cc(e,t){return!t||t===`parent`?t:[t[0],[t[1][0]-(e.width||0),t[1][1]-(e.height||0)]]}function lc(e,t,n,r,i=[0,0],a){let o=cc(e,e.extent||r),s=o,c=e.parentNode||e.parentId;if(e.extent===`parent`&&!e.expandParent)if(c&&e.width&&e.height){let t=n.get(c),{x:r,y:a}=jo(t,i).positionAbsolute;s=t&&Ba(r)&&Ba(a)&&Ba(t.width)&&Ba(t.height)?[[r+e.width*i[0],a+e.height*i[1]],[r+t.width-e.width+e.width*i[0],a+t.height-e.height+e.height*i[1]]]:s}else a?.(`005`,xa.error005()),s=o;else if(e.extent&&c&&e.extent!==`parent`){let{x:t,y:r}=jo(n.get(c),i).positionAbsolute;s=[[e.extent[0][0]+t,e.extent[0][1]+r],[e.extent[1][0]+t,e.extent[1][1]+r]]}let l={x:0,y:0};c&&(l=jo(n.get(c),i).positionAbsolute);let u=s&&s!==`parent`?ka(t,s):t;return{position:{x:u.x-l.x,y:u.y-l.y},positionAbsolute:u}}function uc({nodeId:e,dragItems:t,nodeInternals:n}){let r=t.map(e=>({...n.get(e.id),position:e.position,positionAbsolute:e.positionAbsolute}));return[e?r.find(t=>t.id===e):r[0],r]}var dc=(e,t,n,r)=>{let i=t.querySelectorAll(e);if(!i||!i.length)return null;let a=Array.from(i),o=t.getBoundingClientRect(),s={x:o.width*r[0],y:o.height*r[1]};return a.map(e=>{let t=e.getBoundingClientRect();return{id:e.getAttribute(`data-handleid`),position:e.getAttribute(`data-handlepos`),x:(t.left-o.left-s.x)/n,y:(t.top-o.top-s.y)/n,...Da(e)}})};function fc(e,t,n){return n===void 0?n:r=>{let i=t().nodeInternals.get(e);i&&n(r,{...i})}}function Z({id:e,store:t,unselect:n=!1,nodeRef:r}){let{addSelectedNodes:i,unselectNodesAndEdges:a,multiSelectionActive:o,nodeInternals:s,onError:c}=t.getState(),l=s.get(e);if(!l){c?.(`012`,xa.error012(e));return}t.setState({nodesSelectionActive:!1}),l.selected?(n||l.selected&&o)&&(a({nodes:[l],edges:[]}),requestAnimationFrame(()=>r?.current?.blur())):i([e])}function pc(){let e=q();return(0,w.useCallback)(({sourceEvent:t})=>{let{transform:n,snapGrid:r,snapToGrid:i}=e.getState(),a=t.touches?t.touches[0].clientX:t.clientX,o=t.touches?t.touches[0].clientY:t.clientY,s={x:(a-n[0])/n[2],y:(o-n[1])/n[2]};return{xSnapped:i?r[0]*Math.round(s.x/r[0]):s.x,ySnapped:i?r[1]*Math.round(s.y/r[1]):s.y,...s}},[])}function mc(e){return(t,n,r)=>e?.(t,r)}function hc({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:i,isSelectable:a,selectNodesOnDrag:o}){let s=q(),[c,l]=(0,w.useState)(!1),u=(0,w.useRef)([]),d=(0,w.useRef)({x:null,y:null}),f=(0,w.useRef)(0),p=(0,w.useRef)(null),m=(0,w.useRef)({x:0,y:0}),h=(0,w.useRef)(null),g=(0,w.useRef)(!1),_=(0,w.useRef)(!1),v=(0,w.useRef)(!1),y=pc();return(0,w.useEffect)(()=>{if(e?.current){let c=Jt(e.current),b=({x:e,y:t})=>{let{nodeInternals:n,onNodeDrag:r,onSelectionDrag:a,updateNodePositions:o,nodeExtent:c,snapGrid:f,snapToGrid:p,nodeOrigin:m,onError:g}=s.getState();d.current={x:e,y:t};let _=!1,v={x:0,y:0,x2:0,y2:0};if(u.current.length>1&&c&&(v=Pa(Mo(u.current,m))),u.current=u.current.map(r=>{let i={x:e-r.distance.x,y:t-r.distance.y};p&&(i.x=f[0]*Math.round(i.x/f[0]),i.y=f[1]*Math.round(i.y/f[1]));let a=[[c[0][0],c[0][1]],[c[1][0],c[1][1]]];u.current.length>1&&c&&!r.extent&&(a[0][0]=r.positionAbsolute.x-v.x+c[0][0],a[1][0]=r.positionAbsolute.x+(r.width??0)-v.x2+c[1][0],a[0][1]=r.positionAbsolute.y-v.y+c[0][1],a[1][1]=r.positionAbsolute.y+(r.height??0)-v.y2+c[1][1]);let o=lc(r,i,n,a,m,g);return _=_||r.position.x!==o.position.x||r.position.y!==o.position.y,r.position=o.position,r.positionAbsolute=o.positionAbsolute,r}),!_)return;o(u.current,!0,!0),l(!0);let y=i?r:mc(a);if(y&&h.current){let[e,t]=uc({nodeId:i,dragItems:u.current,nodeInternals:n});y(h.current,e,t)}},x=()=>{if(!p.current)return;let[e,t]=ja(m.current,p.current);if(e!==0||t!==0){let{transform:n,panBy:r}=s.getState();d.current.x=(d.current.x??0)-e/n[2],d.current.y=(d.current.y??0)-t/n[2],r({x:e,y:t})&&b(d.current)}f.current=requestAnimationFrame(x)},S=t=>{let{nodeInternals:n,multiSelectionActive:r,nodesDraggable:c,unselectNodesAndEdges:l,onNodeDragStart:f,onSelectionDragStart:p}=s.getState();_.current=!0;let m=i?f:mc(p);(!o||!a)&&!r&&i&&(n.get(i)?.selected||l()),i&&a&&o&&Z({id:i,store:s,nodeRef:e});let h=y(t);if(d.current=h,u.current=sc(n,c,h,i),m&&u.current){let[e,r]=uc({nodeId:i,dragItems:u.current,nodeInternals:n});m(t.sourceEvent,e,r)}};if(t)c.on(`.drag`,null);else{let t=un().on(`start`,e=>{let{domNode:t,nodeDragThreshold:n}=s.getState();n===0&&S(e),v.current=!1,d.current=y(e),p.current=t?.getBoundingClientRect()||null,m.current=Ka(e.sourceEvent,p.current)}).on(`drag`,e=>{let t=y(e),{autoPanOnNodeDrag:n,nodeDragThreshold:r}=s.getState();if(e.sourceEvent.type===`touchmove`&&e.sourceEvent.touches.length>1&&(v.current=!0),!v.current){if(!g.current&&_.current&&n&&(g.current=!0,x()),!_.current){let n=t.xSnapped-(d?.current?.x??0),i=t.ySnapped-(d?.current?.y??0);Math.sqrt(n*n+i*i)>r&&S(e)}(d.current.x!==t.xSnapped||d.current.y!==t.ySnapped)&&u.current&&_.current&&(h.current=e.sourceEvent,m.current=Ka(e.sourceEvent,p.current),b(t))}}).on(`end`,e=>{if(!(!_.current||v.current)&&(l(!1),g.current=!1,_.current=!1,cancelAnimationFrame(f.current),u.current)){let{updateNodePositions:t,nodeInternals:n,onNodeDragStop:r,onSelectionDragStop:a}=s.getState(),o=i?r:mc(a);if(t(u.current,!1,!1),o){let[t,r]=uc({nodeId:i,dragItems:u.current,nodeInternals:n});o(e.sourceEvent,t,r)}}}).filter(t=>{let i=t.target;return!t.button&&(!n||!oc(i,`.${n}`,e))&&(!r||oc(i,r,e))});return c.call(t),()=>{c.on(`.drag`,null)}}}},[e,t,n,r,a,s,i,o,y]),c}function gc(){let e=q();return(0,w.useCallback)(t=>{let{nodeInternals:n,nodeExtent:r,updateNodePositions:i,getNodes:a,snapToGrid:o,snapGrid:s,onError:c,nodesDraggable:l}=e.getState(),u=a().filter(e=>e.selected&&(e.draggable||l&&e.draggable===void 0)),d=o?s[0]:5,f=o?s[1]:5,p=t.isShiftPressed?4:1,m=t.x*d*p,h=t.y*f*p;i(u.map(e=>{if(e.positionAbsolute){let t={x:e.positionAbsolute.x+m,y:e.positionAbsolute.y+h};o&&(t.x=s[0]*Math.round(t.x/s[0]),t.y=s[1]*Math.round(t.y/s[1]));let{positionAbsolute:i,position:a}=lc(e,t,n,r,void 0,c);e.position=a,e.positionAbsolute=i}return e}),!0,!1)},[])}var _c={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},vc=e=>{let t=({id:t,type:n,data:r,xPos:i,yPos:a,xPosOrigin:o,yPosOrigin:s,selected:c,onClick:l,onMouseEnter:u,onMouseMove:d,onMouseLeave:f,onContextMenu:p,onDoubleClick:m,style:h,className:g,isDraggable:v,isSelectable:y,isConnectable:b,isFocusable:x,selectNodesOnDrag:S,sourcePosition:C,targetPosition:T,hidden:E,resizeObserver:D,dragHandle:O,zIndex:k,isParent:A,noDragClassName:j,noPanClassName:M,initialized:N,disableKeyboardA11y:P,ariaLabel:F,rfId:ee,hasHandleBounds:te})=>{let I=q(),L=(0,w.useRef)(null),R=(0,w.useRef)(null),ne=(0,w.useRef)(C),re=(0,w.useRef)(T),ie=(0,w.useRef)(n),ae=y||v||l||u||d||f,oe=gc(),se=fc(t,I.getState,u),ce=fc(t,I.getState,d),le=fc(t,I.getState,f),ue=fc(t,I.getState,p),de=fc(t,I.getState,m),fe=e=>{let{nodeDragThreshold:n}=I.getState();if(y&&(!S||!v||n>0)&&Z({id:t,store:I,nodeRef:L}),l){let n=I.getState().nodeInternals.get(t);n&&l(e,{...n})}},z=e=>{Wa(e)||P||(Va.includes(e.key)&&y?Z({id:t,store:I,unselect:e.key===`Escape`,nodeRef:L}):v&&c&&Object.prototype.hasOwnProperty.call(_c,e.key)&&(I.setState({ariaLiveMessage:`Moved selected node ${e.key.replace(`Arrow`,``).toLowerCase()}. New position, x: ${~~i}, y: ${~~a}`}),oe({x:_c[e.key].x,y:_c[e.key].y,isShiftPressed:e.shiftKey})))};(0,w.useEffect)(()=>()=>{R.current&&=(D?.unobserve(R.current),null)},[]),(0,w.useEffect)(()=>{if(L.current&&!E){let e=L.current;(!N||!te||R.current!==e)&&(R.current&&D?.unobserve(R.current),D?.observe(e),R.current=e)}},[E,N,te]),(0,w.useEffect)(()=>{let e=ie.current!==n,r=ne.current!==C,i=re.current!==T;L.current&&(e||r||i)&&(e&&(ie.current=n),r&&(ne.current=C),i&&(re.current=T),I.getState().updateNodeDimensions([{id:t,nodeElement:L.current,forceUpdate:!0}]))},[t,n,C,T]);let B=hc({nodeRef:L,disabled:E||!v,noDragClassName:j,handleSelector:O,nodeId:t,isSelectable:y,selectNodesOnDrag:S});return E?null:w.createElement(`div`,{className:_([`react-flow__node`,`react-flow__node-${n}`,{[M]:v},g,{selected:c,selectable:y,parent:A,dragging:B}]),ref:L,style:{zIndex:k,transform:`translate(${o}px,${s}px)`,pointerEvents:ae?`all`:`none`,visibility:N?`visible`:`hidden`,...h},"data-id":t,"data-testid":`rf__node-${t}`,onMouseEnter:se,onMouseMove:ce,onMouseLeave:le,onContextMenu:ue,onClick:fe,onDoubleClick:de,onKeyDown:x?z:void 0,tabIndex:x?0:void 0,role:x?`button`:void 0,"aria-describedby":P?void 0:`${gs}-${ee}`,"aria-label":F},w.createElement(So,{value:t},w.createElement(e,{id:t,data:r,type:n,xPos:i,yPos:a,selected:c,isConnectable:b,sourcePosition:C,targetPosition:T,dragging:B,dragHandle:O,zIndex:k})))};return t.displayName=`NodeWrapper`,(0,w.memo)(t)},yc=e=>({...Mo(e.getNodes().filter(e=>e.selected),e.nodeOrigin),transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`,userSelectionActive:e.userSelectionActive});function bc({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){let r=q(),{width:i,height:a,x:o,y:s,transformString:c,userSelectionActive:l}=K(yc,M),u=gc(),d=(0,w.useRef)(null);if((0,w.useEffect)(()=>{n||d.current?.focus({preventScroll:!0})},[n]),hc({nodeRef:d}),l||!i||!a)return null;let f=e?t=>{e(t,r.getState().getNodes().filter(e=>e.selected))}:void 0;return w.createElement(`div`,{className:_([`react-flow__nodesselection`,`react-flow__container`,t]),style:{transform:c}},w.createElement(`div`,{ref:d,className:`react-flow__nodesselection-rect`,onContextMenu:f,tabIndex:n?void 0:-1,onKeyDown:n?void 0:e=>{Object.prototype.hasOwnProperty.call(_c,e.key)&&u({x:_c[e.key].x,y:_c[e.key].y,isShiftPressed:e.shiftKey})},style:{width:i,height:a,top:s,left:o}}))}var xc=(0,w.memo)(bc),Sc=e=>e.nodesSelectionActive,Cc=({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:o,deleteKeyCode:s,onMove:c,onMoveStart:l,onMoveEnd:u,selectionKeyCode:d,selectionOnDrag:f,selectionMode:p,onSelectionStart:m,onSelectionEnd:h,multiSelectionKeyCode:g,panActivationKeyCode:_,zoomActivationKeyCode:v,elementsSelectable:y,zoomOnScroll:b,zoomOnPinch:x,panOnScroll:S,panOnScrollSpeed:C,panOnScrollMode:T,zoomOnDoubleClick:E,panOnDrag:D,defaultViewport:O,translateExtent:k,minZoom:A,maxZoom:j,preventScrolling:M,onSelectionContextMenu:N,noWheelClassName:P,noPanClassName:F,disableKeyboardA11y:ee})=>{let te=K(Sc),I=Ss(d),L=Ss(_),R=L||D,ne=L||S,re=I||f&&R!==!0;return Rs({deleteKeyCode:s,multiSelectionKeyCode:g}),w.createElement(qs,{onMove:c,onMoveStart:l,onMoveEnd:u,onPaneContextMenu:a,elementsSelectable:y,zoomOnScroll:b,zoomOnPinch:x,panOnScroll:ne,panOnScrollSpeed:C,panOnScrollMode:T,zoomOnDoubleClick:E,panOnDrag:!I&&R,defaultViewport:O,translateExtent:k,minZoom:A,maxZoom:j,zoomActivationKeyCode:v,preventScrolling:M,noWheelClassName:P,noPanClassName:F},w.createElement(ic,{onSelectionStart:m,onSelectionEnd:h,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:o,panOnDrag:R,isSelecting:!!re,selectionMode:p},e,te&&w.createElement(xc,{onSelectionContextMenu:N,noPanClassName:F,disableKeyboardA11y:ee})))};Cc.displayName=`FlowRenderer`;var wc=(0,w.memo)(Cc);function Tc(e){return K((0,w.useCallback)(t=>e?No(t.nodeInternals,{x:0,y:0,width:t.width,height:t.height},t.transform,!0):t.getNodes(),[e]))}function Ec(e){let t={input:vc(e.input||ts),default:vc(e.default||$o),output:vc(e.output||rs),group:vc(e.group||is)},n=Object.keys(e).filter(e=>![`input`,`default`,`output`,`group`].includes(e)).reduce((t,n)=>(t[n]=vc(e[n]||$o),t),{});return{...t,...n}}var Dc=({x:e,y:t,width:n,height:r,origin:i})=>!n||!r||i[0]<0||i[1]<0||i[0]>1||i[1]>1?{x:e,y:t}:{x:e-n*i[0],y:t-r*i[1]},Oc=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,updateNodeDimensions:e.updateNodeDimensions,onError:e.onError}),kc=e=>{let{nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:i,updateNodeDimensions:a,onError:o}=K(Oc,M),s=Tc(e.onlyRenderVisibleElements),c=(0,w.useRef)(),l=(0,w.useMemo)(()=>{if(typeof ResizeObserver>`u`)return null;let e=new ResizeObserver(e=>{a(e.map(e=>({id:e.target.getAttribute(`data-id`),nodeElement:e.target,forceUpdate:!0})))});return c.current=e,e},[]);return(0,w.useEffect)(()=>()=>{c?.current?.disconnect()},[]),w.createElement(`div`,{className:`react-flow__nodes`,style:Bs},s.map(a=>{let s=a.type||`default`;e.nodeTypes[s]||(o?.(`003`,xa.error003(s)),s=`default`);let c=e.nodeTypes[s]||e.nodeTypes.default,u=!!(a.draggable||t&&a.draggable===void 0),d=!!(a.selectable||i&&a.selectable===void 0),f=!!(a.connectable||n&&a.connectable===void 0),p=!!(a.focusable||r&&a.focusable===void 0),m=e.nodeExtent?ka(a.positionAbsolute,e.nodeExtent):a.positionAbsolute,h=m?.x??0,g=m?.y??0,_=Dc({x:h,y:g,width:a.width??0,height:a.height??0,origin:e.nodeOrigin});return w.createElement(c,{key:a.id,id:a.id,className:a.className,style:a.style,type:s,data:a.data,sourcePosition:a.sourcePosition||Y.Bottom,targetPosition:a.targetPosition||Y.Top,hidden:a.hidden,xPos:h,yPos:g,xPosOrigin:_.x,yPosOrigin:_.y,selectNodesOnDrag:e.selectNodesOnDrag,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,selected:!!a.selected,isDraggable:u,isSelectable:d,isConnectable:f,isFocusable:p,resizeObserver:l,dragHandle:a.dragHandle,zIndex:a[J]?.z??0,isParent:!!a[J]?.isParent,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,initialized:!!a.width&&!!a.height,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,ariaLabel:a.ariaLabel,hasHandleBounds:!!a[J]?.handleBounds})}))};kc.displayName=`NodeRenderer`;var Ac=(0,w.memo)(kc),jc=(e,t,n)=>n===Y.Left?e-t:n===Y.Right?e+t:e,Mc=(e,t,n)=>n===Y.Top?e-t:n===Y.Bottom?e+t:e,Nc=`react-flow__edgeupdater`,Pc=({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:i,onMouseEnter:a,onMouseOut:o,type:s})=>w.createElement(`circle`,{onMouseDown:i,onMouseEnter:a,onMouseOut:o,className:_([Nc,`${Nc}-${s}`]),cx:jc(t,r,e),cy:Mc(n,r,e),r,stroke:`transparent`,fill:`transparent`}),Fc=()=>!0,Ic=e=>{let t=({id:t,className:n,type:r,data:i,onClick:a,onEdgeDoubleClick:o,selected:s,animated:c,label:l,labelStyle:u,labelShowBg:d,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:m,style:h,source:g,target:v,sourceX:y,sourceY:b,targetX:x,targetY:S,sourcePosition:C,targetPosition:T,elementsSelectable:E,hidden:D,sourceHandleId:O,targetHandleId:k,onContextMenu:A,onMouseEnter:j,onMouseMove:M,onMouseLeave:N,reconnectRadius:P,onReconnect:F,onReconnectStart:ee,onReconnectEnd:te,markerEnd:I,markerStart:L,rfId:R,ariaLabel:ne,isFocusable:re,isReconnectable:ie,pathOptions:ae,interactionWidth:oe,disableKeyboardA11y:se})=>{let ce=(0,w.useRef)(null),[le,ue]=(0,w.useState)(!1),[de,fe]=(0,w.useState)(!1),z=q(),B=(0,w.useMemo)(()=>`url('#${Eo(L,R)}')`,[L,R]),pe=(0,w.useMemo)(()=>`url('#${Eo(I,R)}')`,[I,R]);if(D)return null;let me=e=>{let{edges:n,addSelectedEdges:r,unselectNodesAndEdges:i,multiSelectionActive:o}=z.getState(),s=n.find(e=>e.id===t);s&&(E&&(z.setState({nodesSelectionActive:!1}),s.selected&&o?(i({nodes:[],edges:[s]}),ce.current?.blur()):r([t])),a&&a(e,s))},V=Ya(t,z.getState,o),he=Ya(t,z.getState,A),ge=Ya(t,z.getState,j),_e=Ya(t,z.getState,M),ve=Ya(t,z.getState,N),ye=(e,n)=>{if(e.button!==0)return;let{edges:r,isValidConnection:i}=z.getState(),a=n?v:g,o=(n?k:O)||null,s=n?`target`:`source`,c=i||Fc,l=n,u=r.find(e=>e.id===t);fe(!0),ee?.(e,u,s),Ko({event:e,handleId:o,nodeId:a,onConnect:e=>F?.(u,e),isTarget:l,getState:z.getState,setState:z.setState,isValidConnection:c,edgeUpdaterType:s,onReconnectEnd:e=>{fe(!1),te?.(e,u,s)}})},be=e=>ye(e,!0),xe=e=>ye(e,!1),Se=()=>ue(!0),Ce=()=>ue(!1),we=!E&&!a;return w.createElement(`g`,{className:_([`react-flow__edge`,`react-flow__edge-${r}`,n,{selected:s,animated:c,inactive:we,updating:le}]),onClick:me,onDoubleClick:V,onContextMenu:he,onMouseEnter:ge,onMouseMove:_e,onMouseLeave:ve,onKeyDown:re?e=>{if(!se&&Va.includes(e.key)&&E){let{unselectNodesAndEdges:n,addSelectedEdges:r,edges:i}=z.getState();e.key===`Escape`?(ce.current?.blur(),n({edges:[i.find(e=>e.id===t)]})):r([t])}}:void 0,tabIndex:re?0:void 0,role:re?`button`:`img`,"data-testid":`rf__edge-${t}`,"aria-label":ne===null?void 0:ne||`Edge from ${g} to ${v}`,"aria-describedby":re?`${_s}-${R}`:void 0,ref:ce},!de&&w.createElement(e,{id:t,source:g,target:v,selected:s,animated:c,label:l,labelStyle:u,labelShowBg:d,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:m,data:i,style:h,sourceX:y,sourceY:b,targetX:x,targetY:S,sourcePosition:C,targetPosition:T,sourceHandleId:O,targetHandleId:k,markerStart:B,markerEnd:pe,pathOptions:ae,interactionWidth:oe}),ie&&w.createElement(w.Fragment,null,(ie===`source`||ie===!0)&&w.createElement(Pc,{position:C,centerX:y,centerY:b,radius:P,onMouseDown:be,onMouseEnter:Se,onMouseOut:Ce,type:`source`}),(ie===`target`||ie===!0)&&w.createElement(Pc,{position:T,centerX:x,centerY:S,radius:P,onMouseDown:xe,onMouseEnter:Se,onMouseOut:Ce,type:`target`})))};return t.displayName=`EdgeWrapper`,(0,w.memo)(t)};function Lc(e){let t={default:Ic(e.default||bo),straight:Ic(e.bezier||go),step:Ic(e.step||mo),smoothstep:Ic(e.step||po),simplebezier:Ic(e.simplebezier||ao)},n=Object.keys(e).filter(e=>![`default`,`bezier`].includes(e)).reduce((t,n)=>(t[n]=Ic(e[n]||bo),t),{});return{...t,...n}}function Rc(e,t,n=null){let r=(n?.x||0)+t.x,i=(n?.y||0)+t.y,a=n?.width||t.width,o=n?.height||t.height;switch(e){case Y.Top:return{x:r+a/2,y:i};case Y.Right:return{x:r+a,y:i+o/2};case Y.Bottom:return{x:r+a/2,y:i+o};case Y.Left:return{x:r,y:i+o/2}}}function zc(e,t){return e?e.length===1||!t?e[0]:t&&e.find(e=>e.id===t)||null:null}var Bc=(e,t,n,r,i,a)=>{let o=Rc(n,e,t),s=Rc(a,r,i);return{sourceX:o.x,sourceY:o.y,targetX:s.x,targetY:s.y}};function Vc({sourcePos:e,targetPos:t,sourceWidth:n,sourceHeight:r,targetWidth:i,targetHeight:a,width:o,height:s,transform:c}){let l={x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x+n,t.x+i),y2:Math.max(e.y+r,t.y+a)};l.x===l.x2&&(l.x2+=1),l.y===l.y2&&(l.y2+=1);let u=Pa({x:(0-c[0])/c[2],y:(0-c[1])/c[2],width:o/c[2],height:s/c[2]}),d=Math.max(0,Math.min(u.x2,l.x2)-Math.max(u.x,l.x)),f=Math.max(0,Math.min(u.y2,l.y2)-Math.max(u.y,l.y));return Math.ceil(d*f)>0}function Q(e){let t=e?.[J]?.handleBounds||null,n=t&&e?.width&&e?.height&&e?.positionAbsolute?.x!==void 0&&e?.positionAbsolute?.y!==void 0;return[{x:e?.positionAbsolute?.x||0,y:e?.positionAbsolute?.y||0,width:e?.width||0,height:e?.height||0},t,!!n]}var Hc=[{level:0,isMaxLevel:!0,edges:[]}];function Uc(e,t,n=!1){let r=-1,i=e.reduce((e,i)=>{let a=Ba(i.zIndex),o=a?i.zIndex:0;if(n){let e=t.get(i.target),n=t.get(i.source),r=i.selected||e?.selected||n?.selected,s=Math.max(n?.[J]?.z||0,e?.[J]?.z||0,1e3);o=(a?i.zIndex:0)+(r?s:0)}return e[o]?e[o].push(i):e[o]=[i],r=o>r?o:r,e},{}),a=Object.entries(i).map(([e,t])=>{let n=+e;return{edges:t,level:n,isMaxLevel:n===r}});return a.length===0?Hc:a}function Wc(e,t,n){return Uc(K((0,w.useCallback)(n=>e?n.edges.filter(e=>{let r=t.get(e.source),i=t.get(e.target);return r?.width&&r?.height&&i?.width&&i?.height&&Vc({sourcePos:r.positionAbsolute||{x:0,y:0},targetPos:i.positionAbsolute||{x:0,y:0},sourceWidth:r.width,sourceHeight:r.height,targetWidth:i.width,targetHeight:i.height,width:n.width,height:n.height,transform:n.transform})}):n.edges,[e,t])),t,n)}var Gc=({color:e=`none`,strokeWidth:t=1})=>w.createElement(`polyline`,{style:{stroke:e,strokeWidth:t},strokeLinecap:`round`,strokeLinejoin:`round`,fill:`none`,points:`-5,-4 0,0 -5,4`}),Kc=({color:e=`none`,strokeWidth:t=1})=>w.createElement(`polyline`,{style:{stroke:e,fill:e,strokeWidth:t},strokeLinecap:`round`,strokeLinejoin:`round`,points:`-5,-4 0,0 -5,4 -5,-4`}),qc={[no.Arrow]:Gc,[no.ArrowClosed]:Kc};function Jc(e){let t=q();return(0,w.useMemo)(()=>Object.prototype.hasOwnProperty.call(qc,e)?qc[e]:(t.getState().onError?.(`009`,xa.error009(e)),null),[e])}var Yc=({id:e,type:t,color:n,width:r=12.5,height:i=12.5,markerUnits:a=`strokeWidth`,strokeWidth:o,orient:s=`auto-start-reverse`})=>{let c=Jc(t);return c?w.createElement(`marker`,{className:`react-flow__arrowhead`,id:e,markerWidth:`${r}`,markerHeight:`${i}`,viewBox:`-10 -10 20 20`,markerUnits:a,orient:s,refX:`0`,refY:`0`},w.createElement(c,{color:n,strokeWidth:o})):null},Xc=({defaultColor:e,rfId:t})=>n=>{let r=[];return n.edges.reduce((n,i)=>([i.markerStart,i.markerEnd].forEach(i=>{if(i&&typeof i==`object`){let a=Eo(i,t);r.includes(a)||(n.push({id:a,color:i.color||e,...i}),r.push(a))}}),n),[]).sort((e,t)=>e.id.localeCompare(t.id))},Zc=({defaultColor:e,rfId:t})=>{let n=K((0,w.useCallback)(Xc({defaultColor:e,rfId:t}),[e,t]),(e,t)=>!(e.length!==t.length||e.some((e,n)=>e.id!==t[n].id)));return w.createElement(`defs`,null,n.map(e=>w.createElement(Yc,{id:e.id,key:e.id,type:e.type,color:e.color,width:e.width,height:e.height,markerUnits:e.markerUnits,strokeWidth:e.strokeWidth,orient:e.orient})))};Zc.displayName=`MarkerDefinitions`;var Qc=(0,w.memo)(Zc),$c=e=>({nodesConnectable:e.nodesConnectable,edgesFocusable:e.edgesFocusable,edgesUpdatable:e.edgesUpdatable,elementsSelectable:e.elementsSelectable,width:e.width,height:e.height,connectionMode:e.connectionMode,nodeInternals:e.nodeInternals,onError:e.onError}),el=({defaultMarkerColor:e,onlyRenderVisibleElements:t,elevateEdgesOnSelect:n,rfId:r,edgeTypes:i,noPanClassName:a,onEdgeContextMenu:o,onEdgeMouseEnter:s,onEdgeMouseMove:c,onEdgeMouseLeave:l,onEdgeClick:u,onEdgeDoubleClick:d,onReconnect:f,onReconnectStart:p,onReconnectEnd:m,reconnectRadius:h,children:g,disableKeyboardA11y:v})=>{let{edgesFocusable:y,edgesUpdatable:b,elementsSelectable:x,width:S,height:C,connectionMode:T,nodeInternals:E,onError:D}=K($c,M),O=Wc(t,E,n);return S?w.createElement(w.Fragment,null,O.map(({level:t,edges:n,isMaxLevel:g})=>w.createElement(`svg`,{key:t,style:{zIndex:t},width:S,height:C,className:`react-flow__edges react-flow__container`},g&&w.createElement(Qc,{defaultColor:e,rfId:r}),w.createElement(`g`,null,n.map(e=>{let[t,n,g]=Q(E.get(e.source)),[S,C,O]=Q(E.get(e.target));if(!g||!O)return null;let k=e.type||`default`;i[k]||(D?.(`011`,xa.error011(k)),k=`default`);let A=i[k]||i.default,j=T===Qa.Strict?C.target:(C.target??[]).concat(C.source??[]),M=zc(n.source,e.sourceHandle),N=zc(j,e.targetHandle),P=M?.position||Y.Bottom,F=N?.position||Y.Top,ee=!!(e.focusable||y&&e.focusable===void 0),te=e.reconnectable||e.updatable,I=f!==void 0&&(te||b&&te===void 0);if(!M||!N)return D?.(`008`,xa.error008(M,e)),null;let{sourceX:L,sourceY:R,targetX:ne,targetY:re}=Bc(t,M,P,S,N,F);return w.createElement(A,{key:e.id,id:e.id,className:_([e.className,a]),type:k,data:e.data,selected:!!e.selected,animated:!!e.animated,hidden:!!e.hidden,label:e.label,labelStyle:e.labelStyle,labelShowBg:e.labelShowBg,labelBgStyle:e.labelBgStyle,labelBgPadding:e.labelBgPadding,labelBgBorderRadius:e.labelBgBorderRadius,style:e.style,source:e.source,target:e.target,sourceHandleId:e.sourceHandle,targetHandleId:e.targetHandle,markerEnd:e.markerEnd,markerStart:e.markerStart,sourceX:L,sourceY:R,targetX:ne,targetY:re,sourcePosition:P,targetPosition:F,elementsSelectable:x,onContextMenu:o,onMouseEnter:s,onMouseMove:c,onMouseLeave:l,onClick:u,onEdgeDoubleClick:d,onReconnect:f,onReconnectStart:p,onReconnectEnd:m,reconnectRadius:h,rfId:r,ariaLabel:e.ariaLabel,isFocusable:ee,isReconnectable:I,pathOptions:`pathOptions`in e?e.pathOptions:void 0,interactionWidth:e.interactionWidth,disableKeyboardA11y:v})})))),g):null};el.displayName=`EdgeRenderer`;var tl=(0,w.memo)(el),nl=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function rl({children:e}){let t=K(nl);return w.createElement(`div`,{className:`react-flow__viewport react-flow__container`,style:{transform:t}},e)}function il(e){let t=Is(),n=(0,w.useRef)(!1);(0,w.useEffect)(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}var al={[Y.Left]:Y.Right,[Y.Right]:Y.Left,[Y.Top]:Y.Bottom,[Y.Bottom]:Y.Top},ol=({nodeId:e,handleType:t,style:n,type:r=to.Bezier,CustomComponent:i,connectionStatus:a})=>{let{fromNode:o,handleId:s,toX:c,toY:l,connectionMode:u}=K((0,w.useCallback)(t=>({fromNode:t.nodeInternals.get(e),handleId:t.connectionHandleId,toX:(t.connectionPosition.x-t.transform[0])/t.transform[2],toY:(t.connectionPosition.y-t.transform[1])/t.transform[2],connectionMode:t.connectionMode}),[e]),M),d=o?.[J]?.handleBounds,f=d?.[t];if(u===Qa.Loose&&(f||=d?.[t===`source`?`target`:`source`]),!o||!f)return null;let p=s?f.find(e=>e.id===s):f[0],m=p?p.x+p.width/2:(o.width??0)/2,h=p?p.y+p.height/2:o.height??0,g=(o.positionAbsolute?.x??0)+m,_=(o.positionAbsolute?.y??0)+h,v=p?.position,y=v?al[v]:null;if(!v||!y)return null;if(i)return w.createElement(i,{connectionLineType:r,connectionLineStyle:n,fromNode:o,fromHandle:p,fromX:g,fromY:_,toX:c,toY:l,fromPosition:v,toPosition:y,connectionStatus:a});let b=``,x={sourceX:g,sourceY:_,sourcePosition:v,targetX:c,targetY:l,targetPosition:y};return r===to.Bezier?[b]=yo(x):r===to.Step?[b]=fo({...x,borderRadius:0}):r===to.SmoothStep?[b]=fo(x):r===to.SimpleBezier?[b]=io(x):b=`M${g},${_} ${c},${l}`,w.createElement(`path`,{d:b,fill:`none`,className:`react-flow__connection-path`,style:n})};ol.displayName=`ConnectionLine`;var sl=e=>({nodeId:e.connectionNodeId,handleType:e.connectionHandleType,nodesConnectable:e.nodesConnectable,connectionStatus:e.connectionStatus,width:e.width,height:e.height});function cl({containerStyle:e,style:t,type:n,component:r}){let{nodeId:i,handleType:a,nodesConnectable:o,width:s,height:c,connectionStatus:l}=K(sl,M);return i&&a&&s&&o?w.createElement(`svg`,{style:e,width:s,height:c,className:`react-flow__edges react-flow__connectionline react-flow__container`},w.createElement(`g`,{className:_([`react-flow__connection`,l])},w.createElement(ol,{nodeId:i,handleType:a,style:t,type:n,CustomComponent:r,connectionStatus:l}))):null}function ll(e,t){return(0,w.useRef)(null),q(),(0,w.useMemo)(()=>t(e),[e])}var ul=({nodeTypes:e,edgeTypes:t,onMove:n,onMoveStart:r,onMoveEnd:i,onInit:a,onNodeClick:o,onEdgeClick:s,onNodeDoubleClick:c,onEdgeDoubleClick:l,onNodeMouseEnter:u,onNodeMouseMove:d,onNodeMouseLeave:f,onNodeContextMenu:p,onSelectionContextMenu:m,onSelectionStart:h,onSelectionEnd:g,connectionLineType:_,connectionLineStyle:v,connectionLineComponent:y,connectionLineContainerStyle:b,selectionKeyCode:x,selectionOnDrag:S,selectionMode:C,multiSelectionKeyCode:T,panActivationKeyCode:E,zoomActivationKeyCode:D,deleteKeyCode:O,onlyRenderVisibleElements:k,elementsSelectable:A,selectNodesOnDrag:j,defaultViewport:M,translateExtent:N,minZoom:P,maxZoom:F,preventScrolling:ee,defaultMarkerColor:te,zoomOnScroll:I,zoomOnPinch:L,panOnScroll:R,panOnScrollSpeed:ne,panOnScrollMode:re,zoomOnDoubleClick:ie,panOnDrag:ae,onPaneClick:oe,onPaneMouseEnter:se,onPaneMouseMove:ce,onPaneMouseLeave:le,onPaneScroll:ue,onPaneContextMenu:de,onEdgeContextMenu:fe,onEdgeMouseEnter:z,onEdgeMouseMove:B,onEdgeMouseLeave:pe,onReconnect:me,onReconnectStart:V,onReconnectEnd:he,reconnectRadius:ge,noDragClassName:_e,noWheelClassName:ve,noPanClassName:ye,elevateEdgesOnSelect:be,disableKeyboardA11y:xe,nodeOrigin:Se,nodeExtent:Ce,rfId:we})=>{let Te=ll(e,Ec),Ee=ll(t,Lc);return il(a),w.createElement(wc,{onPaneClick:oe,onPaneMouseEnter:se,onPaneMouseMove:ce,onPaneMouseLeave:le,onPaneContextMenu:de,onPaneScroll:ue,deleteKeyCode:O,selectionKeyCode:x,selectionOnDrag:S,selectionMode:C,onSelectionStart:h,onSelectionEnd:g,multiSelectionKeyCode:T,panActivationKeyCode:E,zoomActivationKeyCode:D,elementsSelectable:A,onMove:n,onMoveStart:r,onMoveEnd:i,zoomOnScroll:I,zoomOnPinch:L,zoomOnDoubleClick:ie,panOnScroll:R,panOnScrollSpeed:ne,panOnScrollMode:re,panOnDrag:ae,defaultViewport:M,translateExtent:N,minZoom:P,maxZoom:F,onSelectionContextMenu:m,preventScrolling:ee,noDragClassName:_e,noWheelClassName:ve,noPanClassName:ye,disableKeyboardA11y:xe},w.createElement(rl,null,w.createElement(tl,{edgeTypes:Ee,onEdgeClick:s,onEdgeDoubleClick:l,onlyRenderVisibleElements:k,onEdgeContextMenu:fe,onEdgeMouseEnter:z,onEdgeMouseMove:B,onEdgeMouseLeave:pe,onReconnect:me,onReconnectStart:V,onReconnectEnd:he,reconnectRadius:ge,defaultMarkerColor:te,noPanClassName:ye,elevateEdgesOnSelect:!!be,disableKeyboardA11y:xe,rfId:we},w.createElement(cl,{style:v,type:_,component:y,containerStyle:b})),w.createElement(`div`,{className:`react-flow__edgelabel-renderer`}),w.createElement(Ac,{nodeTypes:Te,onNodeClick:o,onNodeDoubleClick:c,onNodeMouseEnter:u,onNodeMouseMove:d,onNodeMouseLeave:f,onNodeContextMenu:p,selectNodesOnDrag:j,onlyRenderVisibleElements:k,noPanClassName:ye,noDragClassName:_e,disableKeyboardA11y:xe,nodeOrigin:Se,nodeExtent:Ce,rfId:we})))};ul.displayName=`GraphView`;var dl=(0,w.memo)(ul),fl=[[-1/0,-1/0],[1/0,1/0]],pl={rfId:`1`,width:0,height:0,transform:[0,0,1],nodeInternals:new Map,edges:[],onNodesChange:null,onEdgesChange:null,hasDefaultNodes:!1,hasDefaultEdges:!1,d3Zoom:null,d3Selection:null,d3ZoomHandler:void 0,minZoom:.5,maxZoom:2,translateExtent:fl,nodeExtent:fl,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionNodeId:null,connectionHandleId:null,connectionHandleType:`source`,connectionPosition:{x:0,y:0},connectionStatus:null,connectionMode:Qa.Strict,domNode:null,paneDragging:!1,noPanClassName:`nopan`,nodeOrigin:[0,0],nodeDragThreshold:0,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesUpdatable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,fitViewOnInit:!1,fitViewOnInitDone:!1,fitViewOnInitOptions:void 0,onSelectionChange:[],multiSelectionActive:!1,connectionStartHandle:null,connectionEndHandle:null,connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:``,autoPanOnConnect:!0,autoPanOnNodeDrag:!0,connectionRadius:20,onError:Ha,isValidConnection:void 0},ml=()=>j((e,t)=>({...pl,setNodes:n=>{let{nodeInternals:r,nodeOrigin:i,elevateNodesOnSelect:a}=t();e({nodeInternals:Ds(n,r,i,a)})},getNodes:()=>Array.from(t().nodeInternals.values()),setEdges:n=>{let{defaultEdgeOptions:r={}}=t();e({edges:n.map(e=>({...r,...e}))})},setDefaultNodesAndEdges:(n,r)=>{let i=n!==void 0,a=r!==void 0;e({nodeInternals:i?Ds(n,new Map,t().nodeOrigin,t().elevateNodesOnSelect):new Map,edges:a?r:[],hasDefaultNodes:i,hasDefaultEdges:a})},updateNodeDimensions:n=>{let{onNodesChange:r,nodeInternals:i,fitViewOnInit:a,fitViewOnInitDone:o,fitViewOnInitOptions:s,domNode:c,nodeOrigin:l}=t(),u=c?.querySelector(`.react-flow__viewport`);if(!u)return;let d=window.getComputedStyle(u),{m22:f}=new window.DOMMatrixReadOnly(d.transform),p=n.reduce((e,t)=>{let n=i.get(t.id);if(n?.hidden)i.set(n.id,{...n,[J]:{...n[J],handleBounds:void 0}});else if(n){let r=Da(t.nodeElement);r.width&&r.height&&(n.width!==r.width||n.height!==r.height||t.forceUpdate)&&(i.set(n.id,{...n,[J]:{...n[J],handleBounds:{source:dc(`.source`,t.nodeElement,f,l),target:dc(`.target`,t.nodeElement,f,l)}},...r}),e.push({id:n.id,type:`dimensions`,dimensions:r}))}return e},[]);Es(i,l);let m=o||a&&!o&&Os(t,{initial:!0,...s});e({nodeInternals:new Map(i),fitViewOnInitDone:m}),p?.length>0&&r?.(p)},updateNodePositions:(e,n=!0,r=!1)=>{let{triggerNodeChanges:i}=t();i(e.map(e=>{let t={id:e.id,type:`position`,dragging:r};return n&&(t.positionAbsolute=e.positionAbsolute,t.position=e.position),t}))},triggerNodeChanges:n=>{let{onNodesChange:r,nodeInternals:i,hasDefaultNodes:a,nodeOrigin:o,getNodes:s,elevateNodesOnSelect:c}=t();n?.length&&(a&&e({nodeInternals:Ds(Qs(n,s()),i,o,c)}),r?.(n))},addSelectedNodes:n=>{let{multiSelectionActive:r,edges:i,getNodes:a}=t(),o,s=null;r?o=n.map(e=>ec(e,!0)):(o=tc(a(),n),s=tc(i,[])),js({changedNodes:o,changedEdges:s,get:t,set:e})},addSelectedEdges:n=>{let{multiSelectionActive:r,edges:i,getNodes:a}=t(),o,s=null;r?o=n.map(e=>ec(e,!0)):(o=tc(i,n),s=tc(a(),[])),js({changedNodes:s,changedEdges:o,get:t,set:e})},unselectNodesAndEdges:({nodes:n,edges:r}={})=>{let{edges:i,getNodes:a}=t(),o=n||a(),s=r||i;js({changedNodes:o.map(e=>(e.selected=!1,ec(e.id,!1))),changedEdges:s.map(e=>ec(e.id,!1)),get:t,set:e})},setMinZoom:n=>{let{d3Zoom:r,maxZoom:i}=t();r?.scaleExtent([n,i]),e({minZoom:n})},setMaxZoom:n=>{let{d3Zoom:r,minZoom:i}=t();r?.scaleExtent([i,n]),e({maxZoom:n})},setTranslateExtent:n=>{t().d3Zoom?.translateExtent(n),e({translateExtent:n})},resetSelectedElements:()=>{let{edges:n,getNodes:r}=t();js({changedNodes:r().filter(e=>e.selected).map(e=>ec(e.id,!1)),changedEdges:n.filter(e=>e.selected).map(e=>ec(e.id,!1)),get:t,set:e})},setNodeExtent:n=>{let{nodeInternals:r}=t();r.forEach(e=>{e.positionAbsolute=ka(e.position,n)}),e({nodeExtent:n,nodeInternals:new Map(r)})},panBy:e=>{let{transform:n,width:r,height:i,d3Zoom:a,d3Selection:o,translateExtent:s}=t();if(!a||!o||!e.x&&!e.y)return!1;let c=ca.translate(n[0]+e.x,n[1]+e.y).scale(n[2]),l=[[0,0],[r,i]],u=a?.constrain()(c,l,s);return a.transform(o,u),n[0]!==u.x||n[1]!==u.y||n[2]!==u.k},cancelConnection:()=>e({connectionNodeId:pl.connectionNodeId,connectionHandleId:pl.connectionHandleId,connectionHandleType:pl.connectionHandleType,connectionStatus:pl.connectionStatus,connectionStartHandle:pl.connectionStartHandle,connectionEndHandle:pl.connectionEndHandle}),reset:()=>e({...pl})}),Object.is),hl=({children:e})=>{let t=(0,w.useRef)(null);return t.current||=ml(),w.createElement(ba,{value:t.current},e)};hl.displayName=`ReactFlowProvider`;var gl=({children:e})=>(0,w.useContext)(ya)?w.createElement(w.Fragment,null,e):w.createElement(hl,null,e);gl.displayName=`ReactFlowWrapper`;var _l={input:ts,default:$o,output:rs,group:is},vl={default:bo,straight:go,step:mo,smoothstep:po,simplebezier:ao},yl=[0,0],bl=[15,15],xl={x:0,y:0,zoom:1},Sl={width:`100%`,height:`100%`,overflow:`hidden`,position:`relative`,zIndex:0},Cl=(0,w.forwardRef)(({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:i,nodeTypes:a=_l,edgeTypes:o=vl,onNodeClick:s,onEdgeClick:c,onInit:l,onMove:u,onMoveStart:d,onMoveEnd:f,onConnect:p,onConnectStart:m,onConnectEnd:h,onClickConnectStart:g,onClickConnectEnd:v,onNodeMouseEnter:y,onNodeMouseMove:b,onNodeMouseLeave:x,onNodeContextMenu:S,onNodeDoubleClick:C,onNodeDragStart:T,onNodeDrag:E,onNodeDragStop:D,onNodesDelete:O,onEdgesDelete:k,onSelectionChange:A,onSelectionDragStart:j,onSelectionDrag:M,onSelectionDragStop:N,onSelectionContextMenu:P,onSelectionStart:F,onSelectionEnd:ee,connectionMode:te=Qa.Strict,connectionLineType:I=to.Bezier,connectionLineStyle:L,connectionLineComponent:R,connectionLineContainerStyle:ne,deleteKeyCode:re=`Backspace`,selectionKeyCode:ie=`Shift`,selectionOnDrag:ae=!1,selectionMode:oe=eo.Full,panActivationKeyCode:se=`Space`,multiSelectionKeyCode:ce=qa()?`Meta`:`Control`,zoomActivationKeyCode:le=qa()?`Meta`:`Control`,snapToGrid:ue=!1,snapGrid:de=bl,onlyRenderVisibleElements:fe=!1,selectNodesOnDrag:z=!0,nodesDraggable:B,nodesConnectable:pe,nodesFocusable:me,nodeOrigin:V=yl,edgesFocusable:he,edgesUpdatable:ge,elementsSelectable:_e,defaultViewport:ve=xl,minZoom:ye=.5,maxZoom:be=2,translateExtent:xe=fl,preventScrolling:Se=!0,nodeExtent:Ce,defaultMarkerColor:we=`#b1b1b7`,zoomOnScroll:Te=!0,zoomOnPinch:Ee=!0,panOnScroll:De=!1,panOnScrollSpeed:Oe=.5,panOnScrollMode:ke=$a.Free,zoomOnDoubleClick:Ae=!0,panOnDrag:je=!0,onPaneClick:Me,onPaneMouseEnter:Ne,onPaneMouseMove:Pe,onPaneMouseLeave:Fe,onPaneScroll:Ie,onPaneContextMenu:Le,children:Re,onEdgeContextMenu:ze,onEdgeDoubleClick:Be,onEdgeMouseEnter:Ve,onEdgeMouseMove:He,onEdgeMouseLeave:Ue,onEdgeUpdate:We,onEdgeUpdateStart:Ge,onEdgeUpdateEnd:Ke,onReconnect:qe,onReconnectStart:Je,onReconnectEnd:Ye,reconnectRadius:Xe=10,edgeUpdaterRadius:Ze=10,onNodesChange:Qe,onEdgesChange:$e,noDragClassName:et=`nodrag`,noWheelClassName:tt=`nowheel`,noPanClassName:nt=`nopan`,fitView:rt=!1,fitViewOptions:it,connectOnClick:at=!0,attributionPosition:ot,proOptions:st,defaultEdgeOptions:ct,elevateNodesOnSelect:lt=!0,elevateEdgesOnSelect:ut=!1,disableKeyboardA11y:dt=!1,autoPanOnConnect:ft=!0,autoPanOnNodeDrag:pt=!0,connectionRadius:mt=20,isValidConnection:ht,onError:gt,style:_t,id:vt,nodeDragThreshold:yt,...bt},xt)=>{let St=vt||`1`;return w.createElement(`div`,{...bt,style:{..._t,...Sl},ref:xt,className:_([`react-flow`,i]),"data-testid":`rf__wrapper`,id:vt},w.createElement(gl,null,w.createElement(dl,{onInit:l,onMove:u,onMoveStart:d,onMoveEnd:f,onNodeClick:s,onEdgeClick:c,onNodeMouseEnter:y,onNodeMouseMove:b,onNodeMouseLeave:x,onNodeContextMenu:S,onNodeDoubleClick:C,nodeTypes:a,edgeTypes:o,connectionLineType:I,connectionLineStyle:L,connectionLineComponent:R,connectionLineContainerStyle:ne,selectionKeyCode:ie,selectionOnDrag:ae,selectionMode:oe,deleteKeyCode:re,multiSelectionKeyCode:ce,panActivationKeyCode:se,zoomActivationKeyCode:le,onlyRenderVisibleElements:fe,selectNodesOnDrag:z,defaultViewport:ve,translateExtent:xe,minZoom:ye,maxZoom:be,preventScrolling:Se,zoomOnScroll:Te,zoomOnPinch:Ee,zoomOnDoubleClick:Ae,panOnScroll:De,panOnScrollSpeed:Oe,panOnScrollMode:ke,panOnDrag:je,onPaneClick:Me,onPaneMouseEnter:Ne,onPaneMouseMove:Pe,onPaneMouseLeave:Fe,onPaneScroll:Ie,onPaneContextMenu:Le,onSelectionContextMenu:P,onSelectionStart:F,onSelectionEnd:ee,onEdgeContextMenu:ze,onEdgeDoubleClick:Be,onEdgeMouseEnter:Ve,onEdgeMouseMove:He,onEdgeMouseLeave:Ue,onReconnect:qe??We,onReconnectStart:Je??Ge,onReconnectEnd:Ye??Ke,reconnectRadius:Xe??Ze,defaultMarkerColor:we,noDragClassName:et,noWheelClassName:tt,noPanClassName:nt,elevateEdgesOnSelect:ut,rfId:St,disableKeyboardA11y:dt,nodeOrigin:V,nodeExtent:Ce}),w.createElement(ps,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:p,onConnectStart:m,onConnectEnd:h,onClickConnectStart:g,onClickConnectEnd:v,nodesDraggable:B,nodesConnectable:pe,nodesFocusable:me,edgesFocusable:he,edgesUpdatable:ge,elementsSelectable:_e,elevateNodesOnSelect:lt,minZoom:ye,maxZoom:be,nodeExtent:Ce,onNodesChange:Qe,onEdgesChange:$e,snapToGrid:ue,snapGrid:de,connectionMode:te,translateExtent:xe,connectOnClick:at,defaultEdgeOptions:ct,fitView:rt,fitViewOptions:it,onNodesDelete:O,onEdgesDelete:k,onNodeDragStart:T,onNodeDrag:E,onNodeDragStop:D,onSelectionDrag:M,onSelectionDragStart:j,onSelectionDragStop:N,noPanClassName:nt,nodeOrigin:V,rfId:St,autoPanOnConnect:ft,autoPanOnNodeDrag:pt,onError:gt,connectionRadius:mt,isValidConnection:ht,nodeDragThreshold:yt}),w.createElement(us,{onSelectionChange:A}),Re,w.createElement(Ta,{proOptions:st,position:ot}),w.createElement(xs,{rfId:St,disableKeyboardA11y:dt})))});Cl.displayName=`ReactFlow`;function wl(e){return t=>{let[n,r]=(0,w.useState)(t);return[n,r,(0,w.useCallback)(t=>r(n=>e(t,n)),[])]}}var Tl=wl(Qs),El=wl($s),Dl=({id:e,x:t,y:n,width:r,height:i,style:a,color:o,strokeColor:s,strokeWidth:c,className:l,borderRadius:u,shapeRendering:d,onClick:f,selected:p})=>{let{background:m,backgroundColor:h}=a||{},g=o||m||h;return w.createElement(`rect`,{className:_([`react-flow__minimap-node`,{selected:p},l]),x:t,y:n,rx:u,ry:u,width:r,height:i,fill:g,stroke:s,strokeWidth:c,shapeRendering:d,onClick:f?t=>f(t,e):void 0})};Dl.displayName=`MiniMapNode`;var Ol=(0,w.memo)(Dl),kl=e=>e.nodeOrigin,Al=e=>e.getNodes().filter(e=>!e.hidden&&e.width&&e.height),jl=e=>e instanceof Function?e:()=>e;function Ml({nodeStrokeColor:e=`transparent`,nodeColor:t=`#e2e2e2`,nodeClassName:n=``,nodeBorderRadius:r=5,nodeStrokeWidth:i=2,nodeComponent:a=Ol,onClick:o}){let s=K(Al,M),c=K(kl),l=jl(t),u=jl(e),d=jl(n),f=typeof window>`u`||window.chrome?`crispEdges`:`geometricPrecision`;return w.createElement(w.Fragment,null,s.map(e=>{let{x:t,y:n}=jo(e,c).positionAbsolute;return w.createElement(a,{key:e.id,x:t,y:n,width:e.width,height:e.height,style:e.style,selected:e.selected,className:d(e),color:l(e),borderRadius:r,strokeColor:u(e),strokeWidth:i,shapeRendering:f,onClick:o,id:e.id})}))}var Nl=(0,w.memo)(Ml),Pl=200,Fl=150,Il=e=>{let t=e.getNodes(),n={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:n,boundingRect:t.length>0?La(Mo(t,e.nodeOrigin),n):n,rfId:e.rfId}},Ll=`react-flow__minimap-desc`;function Rl({style:e,className:t,nodeStrokeColor:n=`transparent`,nodeColor:r=`#e2e2e2`,nodeClassName:i=``,nodeBorderRadius:a=5,nodeStrokeWidth:o=2,nodeComponent:s,maskColor:c=`rgb(240, 240, 240, 0.6)`,maskStrokeColor:l=`none`,maskStrokeWidth:u=1,position:d=`bottom-right`,onClick:f,onNodeClick:p,pannable:m=!1,zoomable:h=!1,ariaLabel:g=`React Flow mini map`,inversePan:v=!1,zoomStep:y=10,offsetScale:b=5}){let x=q(),S=(0,w.useRef)(null),{boundingRect:C,viewBB:T,rfId:E}=K(Il,M),D=e?.width??Pl,O=e?.height??Fl,k=C.width/D,A=C.height/O,j=Math.max(k,A),N=j*D,P=j*O,F=b*j,ee=C.x-(N-C.width)/2-F,te=C.y-(P-C.height)/2-F,I=N+F*2,L=P+F*2,R=`${Ll}-${E}`,ne=(0,w.useRef)(0);ne.current=j,(0,w.useEffect)(()=>{if(S.current){let e=Jt(S.current),t=va().on(`zoom`,m?e=>{let{transform:t,d3Selection:n,d3Zoom:r,translateExtent:i,width:a,height:o}=x.getState();if(e.sourceEvent.type!==`mousemove`||!n||!r)return;let s=ne.current*Math.max(1,t[2])*(v?-1:1),c={x:t[0]-e.sourceEvent.movementX*s,y:t[1]-e.sourceEvent.movementY*s},l=[[0,0],[a,o]],u=ca.translate(c.x,c.y).scale(t[2]),d=r.constrain()(u,l,i);r.transform(n,d)}:null).on(`zoom.wheel`,h?e=>{let{transform:t,d3Selection:n,d3Zoom:r}=x.getState();if(e.sourceEvent.type!==`wheel`||!n||!r)return;let i=-e.sourceEvent.deltaY*(e.sourceEvent.deltaMode===1?.05:e.sourceEvent.deltaMode?1:.002)*y,a=t[2]*2**i;r.scaleTo(n,a)}:null);return e.call(t),()=>{e.on(`zoom`,null)}}},[m,h,v,y]);let re=f?e=>{let t=Xt(e);f(e,{x:t[0],y:t[1]})}:void 0,ie=p?(e,t)=>{p(e,x.getState().nodeInternals.get(t))}:void 0;return w.createElement(wa,{position:d,style:e,className:_([`react-flow__minimap`,t]),"data-testid":`rf__minimap`},w.createElement(`svg`,{width:D,height:O,viewBox:`${ee} ${te} ${I} ${L}`,role:`img`,"aria-labelledby":R,ref:S,onClick:re},g&&w.createElement(`title`,{id:R},g),w.createElement(Nl,{onClick:ie,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:a,nodeClassName:i,nodeStrokeWidth:o,nodeComponent:s}),w.createElement(`path`,{className:`react-flow__minimap-mask`,d:`M${ee-F},${te-F}h${I+F*2}v${L+F*2}h${-I-F*2}z
|
|
9
|
+
M${T.x},${T.y}h${T.width}v${T.height}h${-T.width}z`,fill:c,fillRule:`evenodd`,stroke:l,strokeWidth:u,pointerEvents:`none`})))}Rl.displayName=`MiniMap`;var zl=(0,w.memo)(Rl);function Bl(){return w.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 32 32`},w.createElement(`path`,{d:`M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z`}))}function Vl(){return w.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 32 5`},w.createElement(`path`,{d:`M0 0h32v4.2H0z`}))}function Hl(){return w.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 32 30`},w.createElement(`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 Ul(){return w.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 25 32`},w.createElement(`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 Wl(){return w.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 25 32`},w.createElement(`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`}))}var Gl=({children:e,className:t,...n})=>w.createElement(`button`,{type:`button`,className:_([`react-flow__controls-button`,t]),...n},e);Gl.displayName=`ControlButton`;var Kl=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom}),ql=({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:r=!0,fitViewOptions:i,onZoomIn:a,onZoomOut:o,onFitView:s,onInteractiveChange:c,className:l,children:u,position:d=`bottom-left`})=>{let f=q(),[p,m]=(0,w.useState)(!1),{isInteractive:h,minZoomReached:g,maxZoomReached:v}=K(Kl,M),{zoomIn:y,zoomOut:b,fitView:x}=Is();if((0,w.useEffect)(()=>{m(!0)},[]),!p)return null;let S=()=>{y(),a?.()},C=()=>{b(),o?.()},T=()=>{x(i),s?.()},E=()=>{f.setState({nodesDraggable:!h,nodesConnectable:!h,elementsSelectable:!h}),c?.(!h)};return w.createElement(wa,{className:_([`react-flow__controls`,l]),position:d,style:e,"data-testid":`rf__controls`},t&&w.createElement(w.Fragment,null,w.createElement(Gl,{onClick:S,className:`react-flow__controls-zoomin`,title:`zoom in`,"aria-label":`zoom in`,disabled:v},w.createElement(Bl,null)),w.createElement(Gl,{onClick:C,className:`react-flow__controls-zoomout`,title:`zoom out`,"aria-label":`zoom out`,disabled:g},w.createElement(Vl,null))),n&&w.createElement(Gl,{className:`react-flow__controls-fitview`,onClick:T,title:`fit view`,"aria-label":`fit view`},w.createElement(Hl,null)),r&&w.createElement(Gl,{className:`react-flow__controls-interactive`,onClick:E,title:`toggle interactivity`,"aria-label":`toggle interactivity`},h?w.createElement(Wl,null):w.createElement(Ul,null)),u)};ql.displayName=`Controls`;var Jl=(0,w.memo)(ql),Yl;(function(e){e.Lines=`lines`,e.Dots=`dots`,e.Cross=`cross`})(Yl||={});function Xl({color:e,dimensions:t,lineWidth:n}){return w.createElement(`path`,{stroke:e,strokeWidth:n,d:`M${t[0]/2} 0 V${t[1]} M0 ${t[1]/2} H${t[0]}`})}function Zl({color:e,radius:t}){return w.createElement(`circle`,{cx:t,cy:t,r:t,fill:e})}var Ql={[Yl.Dots]:`#91919a`,[Yl.Lines]:`#eee`,[Yl.Cross]:`#e2e2e2`},$l={[Yl.Dots]:1,[Yl.Lines]:1,[Yl.Cross]:6},eu=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function tu({id:e,variant:t=Yl.Dots,gap:n=20,size:r,lineWidth:i=1,offset:a=2,color:o,style:s,className:c}){let l=(0,w.useRef)(null),{transform:u,patternId:d}=K(eu,M),f=o||Ql[t],p=r||$l[t],m=t===Yl.Dots,h=t===Yl.Cross,g=Array.isArray(n)?n:[n,n],v=[g[0]*u[2]||1,g[1]*u[2]||1],y=p*u[2],b=h?[y,y]:v,x=m?[y/a,y/a]:[b[0]/a,b[1]/a];return w.createElement(`svg`,{className:_([`react-flow__background`,c]),style:{...s,position:`absolute`,width:`100%`,height:`100%`,top:0,left:0},ref:l,"data-testid":`rf__background`},w.createElement(`pattern`,{id:d+e,x:u[0]%v[0],y:u[1]%v[1],width:v[0],height:v[1],patternUnits:`userSpaceOnUse`,patternTransform:`translate(-${x[0]},-${x[1]})`},m?w.createElement(Zl,{color:f,radius:y/a}):w.createElement(Xl,{dimensions:b,color:f,lineWidth:i})),w.createElement(`rect`,{x:`0`,y:`0`,width:`100%`,height:`100%`,fill:`url(#${d+e})`}))}tu.displayName=`Background`;var nu=(0,w.memo)(tu);function ru(e,t){var n,r=1;e??=0,t??=0;function i(){var i,a=n.length,o,s=0,c=0;for(i=0;i<a;++i)o=n[i],s+=o.x,c+=o.y;for(s=(s/a-e)*r,c=(c/a-t)*r,i=0;i<a;++i)o=n[i],o.x-=s,o.y-=c}return i.initialize=function(e){n=e},i.x=function(t){return arguments.length?(e=+t,i):e},i.y=function(e){return arguments.length?(t=+e,i):t},i.strength=function(e){return arguments.length?(r=+e,i):r},i}function iu(e){let t=+this._x.call(null,e),n=+this._y.call(null,e);return au(this.cover(t,n),t,n,e)}function au(e,t,n,r){if(isNaN(t)||isNaN(n))return e;var i,a=e._root,o={data:r},s=e._x0,c=e._y0,l=e._x1,u=e._y1,d,f,p,m,h,g,_,v;if(!a)return e._root=o,e;for(;a.length;)if((h=t>=(d=(s+l)/2))?s=d:l=d,(g=n>=(f=(c+u)/2))?c=f:u=f,i=a,!(a=a[_=g<<1|h]))return i[_]=o,e;if(p=+e._x.call(null,a.data),m=+e._y.call(null,a.data),t===p&&n===m)return o.next=a,i?i[_]=o:e._root=o,e;do i=i?i[_]=[,,,,]:e._root=[,,,,],(h=t>=(d=(s+l)/2))?s=d:l=d,(g=n>=(f=(c+u)/2))?c=f:u=f;while((_=g<<1|h)==(v=(m>=f)<<1|p>=d));return i[v]=a,i[_]=o,e}function ou(e){var t,n,r=e.length,i,a,o=Array(r),s=Array(r),c=1/0,l=1/0,u=-1/0,d=-1/0;for(n=0;n<r;++n)isNaN(i=+this._x.call(null,t=e[n]))||isNaN(a=+this._y.call(null,t))||(o[n]=i,s[n]=a,i<c&&(c=i),i>u&&(u=i),a<l&&(l=a),a>d&&(d=a));if(c>u||l>d)return this;for(this.cover(c,l).cover(u,d),n=0;n<r;++n)au(this,o[n],s[n],e[n]);return this}function su(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var n=this._x0,r=this._y0,i=this._x1,a=this._y1;if(isNaN(n))i=(n=Math.floor(e))+1,a=(r=Math.floor(t))+1;else{for(var o=i-n||1,s=this._root,c,l;n>e||e>=i||r>t||t>=a;)switch(l=(t<r)<<1|e<n,c=[,,,,],c[l]=s,s=c,o*=2,l){case 0:i=n+o,a=r+o;break;case 1:n=i-o,a=r+o;break;case 2:i=n+o,r=a-o;break;case 3:n=i-o,r=a-o;break}this._root&&this._root.length&&(this._root=s)}return this._x0=n,this._y0=r,this._x1=i,this._y1=a,this}function cu(){var e=[];return this.visit(function(t){if(!t.length)do e.push(t.data);while(t=t.next)}),e}function lu(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function uu(e,t,n,r,i){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=i}function du(e,t,n){var r,i=this._x0,a=this._y0,o,s,c,l,u=this._x1,d=this._y1,f=[],p=this._root,m,h;for(p&&f.push(new uu(p,i,a,u,d)),n==null?n=1/0:(i=e-n,a=t-n,u=e+n,d=t+n,n*=n);m=f.pop();)if(!(!(p=m.node)||(o=m.x0)>u||(s=m.y0)>d||(c=m.x1)<i||(l=m.y1)<a))if(p.length){var g=(o+c)/2,_=(s+l)/2;f.push(new uu(p[3],g,_,c,l),new uu(p[2],o,_,g,l),new uu(p[1],g,s,c,_),new uu(p[0],o,s,g,_)),(h=(t>=_)<<1|e>=g)&&(m=f[f.length-1],f[f.length-1]=f[f.length-1-h],f[f.length-1-h]=m)}else{var v=e-+this._x.call(null,p.data),y=t-+this._y.call(null,p.data),b=v*v+y*y;if(b<n){var x=Math.sqrt(n=b);i=e-x,a=t-x,u=e+x,d=t+x,r=p.data}}return r}function fu(e){if(isNaN(u=+this._x.call(null,e))||isNaN(d=+this._y.call(null,e)))return this;var t,n=this._root,r,i,a,o=this._x0,s=this._y0,c=this._x1,l=this._y1,u,d,f,p,m,h,g,_;if(!n)return this;if(n.length)for(;;){if((m=u>=(f=(o+c)/2))?o=f:c=f,(h=d>=(p=(s+l)/2))?s=p:l=p,t=n,!(n=n[g=h<<1|m]))return this;if(!n.length)break;(t[g+1&3]||t[g+2&3]||t[g+3&3])&&(r=t,_=g)}for(;n.data!==e;)if(i=n,!(n=n.next))return this;return(a=n.next)&&delete n.next,i?(a?i.next=a:delete i.next,this):t?(a?t[g]=a:delete t[g],(n=t[0]||t[1]||t[2]||t[3])&&n===(t[3]||t[2]||t[1]||t[0])&&!n.length&&(r?r[_]=n:this._root=n),this):(this._root=a,this)}function pu(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this}function mu(){return this._root}function hu(){var e=0;return this.visit(function(t){if(!t.length)do++e;while(t=t.next)}),e}function gu(e){var t=[],n,r=this._root,i,a,o,s,c;for(r&&t.push(new uu(r,this._x0,this._y0,this._x1,this._y1));n=t.pop();)if(!e(r=n.node,a=n.x0,o=n.y0,s=n.x1,c=n.y1)&&r.length){var l=(a+s)/2,u=(o+c)/2;(i=r[3])&&t.push(new uu(i,l,u,s,c)),(i=r[2])&&t.push(new uu(i,a,u,l,c)),(i=r[1])&&t.push(new uu(i,l,o,s,u)),(i=r[0])&&t.push(new uu(i,a,o,l,u))}return this}function _u(e){var t=[],n=[],r;for(this._root&&t.push(new uu(this._root,this._x0,this._y0,this._x1,this._y1));r=t.pop();){var i=r.node;if(i.length){var a,o=r.x0,s=r.y0,c=r.x1,l=r.y1,u=(o+c)/2,d=(s+l)/2;(a=i[0])&&t.push(new uu(a,o,s,u,d)),(a=i[1])&&t.push(new uu(a,u,s,c,d)),(a=i[2])&&t.push(new uu(a,o,d,u,l)),(a=i[3])&&t.push(new uu(a,u,d,c,l))}n.push(r)}for(;r=n.pop();)e(r.node,r.x0,r.y0,r.x1,r.y1);return this}function vu(e){return e[0]}function yu(e){return arguments.length?(this._x=e,this):this._x}function bu(e){return e[1]}function xu(e){return arguments.length?(this._y=e,this):this._y}function Su(e,t,n){var r=new Cu(t??vu,n??bu,NaN,NaN,NaN,NaN);return e==null?r:r.addAll(e)}function Cu(e,t,n,r,i,a){this._x=e,this._y=t,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function wu(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var Tu=Su.prototype=Cu.prototype;Tu.copy=function(){var e=new Cu(this._x,this._y,this._x0,this._y0,this._x1,this._y1),t=this._root,n,r;if(!t)return e;if(!t.length)return e._root=wu(t),e;for(n=[{source:t,target:e._root=[,,,,]}];t=n.pop();)for(var i=0;i<4;++i)(r=t.source[i])&&(r.length?n.push({source:r,target:t.target[i]=[,,,,]}):t.target[i]=wu(r));return e},Tu.add=iu,Tu.addAll=ou,Tu.cover=su,Tu.data=cu,Tu.extent=lu,Tu.find=du,Tu.remove=fu,Tu.removeAll=pu,Tu.root=mu,Tu.size=hu,Tu.visit=gu,Tu.visitAfter=_u,Tu.x=yu,Tu.y=xu;function Eu(e){return function(){return e}}function Du(e){return(e()-.5)*1e-6}function Ou(e){return e.x+e.vx}function ku(e){return e.y+e.vy}function Au(e){var t,n,r,i=1,a=1;typeof e!=`function`&&(e=Eu(e==null?1:+e));function o(){for(var e,o=t.length,c,l,u,d,f,p,m=0;m<a;++m)for(c=Su(t,Ou,ku).visitAfter(s),e=0;e<o;++e)l=t[e],f=n[l.index],p=f*f,u=l.x+l.vx,d=l.y+l.vy,c.visit(h);function h(e,t,n,a,o){var s=e.data,c=e.r,m=f+c;if(s){if(s.index>l.index){var h=u-s.x-s.vx,g=d-s.y-s.vy,_=h*h+g*g;_<m*m&&(h===0&&(h=Du(r),_+=h*h),g===0&&(g=Du(r),_+=g*g),_=(m-(_=Math.sqrt(_)))/_*i,l.vx+=(h*=_)*(m=(c*=c)/(p+c)),l.vy+=(g*=_)*m,s.vx-=h*(m=1-m),s.vy-=g*m)}return}return t>u+m||a<u-m||n>d+m||o<d-m}}function s(e){if(e.data)return e.r=n[e.data.index];for(var t=e.r=0;t<4;++t)e[t]&&e[t].r>e.r&&(e.r=e[t].r)}function c(){if(t){var r,i=t.length,a;for(n=Array(i),r=0;r<i;++r)a=t[r],n[a.index]=+e(a,r,t)}}return o.initialize=function(e,n){t=e,r=n,c()},o.iterations=function(e){return arguments.length?(a=+e,o):a},o.strength=function(e){return arguments.length?(i=+e,o):i},o.radius=function(t){return arguments.length?(e=typeof t==`function`?t:Eu(+t),c(),o):e},o}function ju(e){return e.index}function Mu(e,t){var n=e.get(t);if(!n)throw Error(`node not found: `+t);return n}function Nu(e){var t=ju,n=d,r,i=Eu(30),a,o,s,c,l,u=1;e??=[];function d(e){return 1/Math.min(s[e.source.index],s[e.target.index])}function f(t){for(var n=0,i=e.length;n<u;++n)for(var o=0,s,d,f,p,m,h,g;o<i;++o)s=e[o],d=s.source,f=s.target,p=f.x+f.vx-d.x-d.vx||Du(l),m=f.y+f.vy-d.y-d.vy||Du(l),h=Math.sqrt(p*p+m*m),h=(h-a[o])/h*t*r[o],p*=h,m*=h,f.vx-=p*(g=c[o]),f.vy-=m*g,d.vx+=p*(g=1-g),d.vy+=m*g}function p(){if(o){var n,i=o.length,l=e.length,u=new Map(o.map((e,n)=>[t(e,n,o),e])),d;for(n=0,s=Array(i);n<l;++n)d=e[n],d.index=n,typeof d.source!=`object`&&(d.source=Mu(u,d.source)),typeof d.target!=`object`&&(d.target=Mu(u,d.target)),s[d.source.index]=(s[d.source.index]||0)+1,s[d.target.index]=(s[d.target.index]||0)+1;for(n=0,c=Array(l);n<l;++n)d=e[n],c[n]=s[d.source.index]/(s[d.source.index]+s[d.target.index]);r=Array(l),m(),a=Array(l),h()}}function m(){if(o)for(var t=0,i=e.length;t<i;++t)r[t]=+n(e[t],t,e)}function h(){if(o)for(var t=0,n=e.length;t<n;++t)a[t]=+i(e[t],t,e)}return f.initialize=function(e,t){o=e,l=t,p()},f.links=function(t){return arguments.length?(e=t,p(),f):e},f.id=function(e){return arguments.length?(t=e,f):t},f.iterations=function(e){return arguments.length?(u=+e,f):u},f.strength=function(e){return arguments.length?(n=typeof e==`function`?e:Eu(+e),m(),f):n},f.distance=function(e){return arguments.length?(i=typeof e==`function`?e:Eu(+e),h(),f):i},f}var Pu=1664525,Fu=1013904223,Iu=4294967296;function Lu(){let e=1;return()=>(e=(Pu*e+Fu)%Iu)/Iu}function Ru(e){return e.x}function zu(e){return e.y}var Bu=10,Vu=Math.PI*(3-Math.sqrt(5));function Hu(e){var t,n=1,r=.001,i=1-r**(1/300),a=0,o=.6,s=new Map,c=Ir(d),l=P(`tick`,`end`),u=Lu();e??=[];function d(){f(),l.call(`tick`,t),n<r&&(c.stop(),l.call(`end`,t))}function f(r){var c,l=e.length,u;r===void 0&&(r=1);for(var d=0;d<r;++d)for(n+=(a-n)*i,s.forEach(function(e){e(n)}),c=0;c<l;++c)u=e[c],u.fx==null?u.x+=u.vx*=o:(u.x=u.fx,u.vx=0),u.fy==null?u.y+=u.vy*=o:(u.y=u.fy,u.vy=0);return t}function p(){for(var t=0,n=e.length,r;t<n;++t){if(r=e[t],r.index=t,r.fx!=null&&(r.x=r.fx),r.fy!=null&&(r.y=r.fy),isNaN(r.x)||isNaN(r.y)){var i=Bu*Math.sqrt(.5+t),a=t*Vu;r.x=i*Math.cos(a),r.y=i*Math.sin(a)}(isNaN(r.vx)||isNaN(r.vy))&&(r.vx=r.vy=0)}}function m(t){return t.initialize&&t.initialize(e,u),t}return p(),t={tick:f,restart:function(){return c.restart(d),t},stop:function(){return c.stop(),t},nodes:function(n){return arguments.length?(e=n,p(),s.forEach(m),t):e},alpha:function(e){return arguments.length?(n=+e,t):n},alphaMin:function(e){return arguments.length?(r=+e,t):r},alphaDecay:function(e){return arguments.length?(i=+e,t):+i},alphaTarget:function(e){return arguments.length?(a=+e,t):a},velocityDecay:function(e){return arguments.length?(o=1-e,t):1-o},randomSource:function(e){return arguments.length?(u=e,s.forEach(m),t):u},force:function(e,n){return arguments.length>1?(n==null?s.delete(e):s.set(e,m(n)),t):s.get(e)},find:function(t,n,r){var i=0,a=e.length,o,s,c,l,u;for(r==null?r=1/0:r*=r,i=0;i<a;++i)l=e[i],o=t-l.x,s=n-l.y,c=o*o+s*s,c<r&&(u=l,r=c);return u},on:function(e,n){return arguments.length>1?(l.on(e,n),t):l.on(e)}}}function Uu(){var e,t,n,r,i=Eu(-30),a,o=1,s=1/0,c=.81;function l(n){var i,a=e.length,o=Su(e,Ru,zu).visitAfter(d);for(r=n,i=0;i<a;++i)t=e[i],o.visit(f)}function u(){if(e){var t,n=e.length,r;for(a=Array(n),t=0;t<n;++t)r=e[t],a[r.index]=+i(r,t,e)}}function d(e){var t=0,n,r,i=0,o,s,c;if(e.length){for(o=s=c=0;c<4;++c)(n=e[c])&&(r=Math.abs(n.value))&&(t+=n.value,i+=r,o+=r*n.x,s+=r*n.y);e.x=o/i,e.y=s/i}else{n=e,n.x=n.data.x,n.y=n.data.y;do t+=a[n.data.index];while(n=n.next)}e.value=t}function f(e,i,l,u){if(!e.value)return!0;var d=e.x-t.x,f=e.y-t.y,p=u-i,m=d*d+f*f;if(p*p/c<m)return m<s&&(d===0&&(d=Du(n),m+=d*d),f===0&&(f=Du(n),m+=f*f),m<o&&(m=Math.sqrt(o*m)),t.vx+=d*e.value*r/m,t.vy+=f*e.value*r/m),!0;if(!(e.length||m>=s)){(e.data!==t||e.next)&&(d===0&&(d=Du(n),m+=d*d),f===0&&(f=Du(n),m+=f*f),m<o&&(m=Math.sqrt(o*m)));do e.data!==t&&(p=a[e.data.index]*r/m,t.vx+=d*p,t.vy+=f*p);while(e=e.next)}}return l.initialize=function(t,r){e=t,n=r,u()},l.strength=function(e){return arguments.length?(i=typeof e==`function`?e:Eu(+e),u(),l):i},l.distanceMin=function(e){return arguments.length?(o=e*e,l):Math.sqrt(o)},l.distanceMax=function(e){return arguments.length?(s=e*e,l):Math.sqrt(s)},l.theta=function(e){return arguments.length?(c=e*e,l):Math.sqrt(c)},l}var Wu=c(g()),Gu={"nestjs-controller":`#e8534a`,"nestjs-injectable":`#4a90e8`,"nestjs-module":`#f5a623`,"typescript-file":`#7ed321`,"javascript-file":`#f0db4f`,"nextjs-api-route":`#0070f3`,"nextjs-page":`#171717`,"nextjs-layout":`#383838`,"python-file":`#3776ab`,"python-fastapi-route":`#009688`,"python-django-view":`#092e20`,"python-django-model":`#44b78b`,"markdown-file":`#7c3aed`,"markdown-moc":`#a855f7`,"markdown-daily":`#6d28d9`,"markdown-readme":`#8b5cf6`,"php-file":`#777bb4`,"php-laravel-controller":`#ff2d20`,"php-laravel-model":`#f4645f`,"php-laravel-middleware":`#fb503b`,"php-laravel-route":`#ff7043`};function Ku(e,t){return{id:e.id,data:{label:e.label,omniNode:e},position:{x:0,y:0},style:{background:Gu[e.type]??`#888`,color:`#fff`,border:`1px solid rgba(255,255,255,0.2)`,borderRadius:8,padding:`8px 12px`,fontSize:12,fontWeight:600},...t}}function qu(e){let t=e.id.startsWith(`e-http-`);return{id:e.id,source:e.source,target:e.target,label:e.label,data:{omniEdge:e},animated:!0,style:{stroke:t?`#ff9800`:`#888`,strokeWidth:t?2:1,strokeDasharray:t?`6 3`:void 0},labelStyle:t?{fill:`#ff9800`,fontSize:10,fontWeight:600}:void 0}}function Ju(e){let t=(e.metadata.filePath??e.id).replace(/\\/g,`/`),n=t.lastIndexOf(`/`);return n>0?t.substring(0,n):`/`}var Yu=20,Xu=32,Zu=20,Qu=16,$u=40,ed=40,td=4,nd=3;function rd(e,t){let n=e.substring(t.length);return n.startsWith(`/`)&&(n=n.substring(1)),n||`.`}function id(e){if(e.length===0)return``;let t=e[0];for(let n=1;n<e.length;n++)for(;!e[n].startsWith(t);){let e=t.lastIndexOf(`/`);if(e<=0)return``;t=t.substring(0,e)}return t}var ad=({nodes:e,edges:t})=>{let n=new Map;for(let t of e){let e=Ju(t);n.has(e)||n.set(e,[]),n.get(e).push(t)}let r=Array.from(n.keys()),i=id(r),a=r.sort().map(e=>({dir:e,label:rd(e,i),nodes:n.get(e)}));function o(e){let t=Math.min(e.nodes.length,td),n=Math.ceil(e.nodes.length/t);return{cols:t,rows:n,width:t*(172+Zu)-Zu+Yu*2,height:n*(36+Qu)-Qu+Yu*2+Xu}}let s=[],c=0,l=0,u=0,d=0;for(let e of a){let t=o(e),n=`group-${e.dir}`;s.push({id:n,type:`directoryGroup`,data:{label:e.label},position:{x:c,y:l},style:{width:t.width,height:t.height}}),e.nodes.forEach((e,r)=>{let i=r%t.cols,a=Math.floor(r/t.cols);s.push({...Ku(e),parentNode:n,extent:`parent`,position:{x:Yu+i*(172+Zu),y:Xu+Yu+a*(36+Qu)}})}),d=Math.max(d,t.height),u++,u>=nd?(u=0,c=0,l+=d+ed,d=0):c+=t.width+$u}return{nodes:s,edges:t.map(qu)}},od=o(((e,t)=>{var n=`\0`,r=`\0`,i=``,a=class{_isDirected=!0;_isMultigraph=!1;_isCompound=!1;_label;_defaultNodeLabelFn=()=>void 0;_defaultEdgeLabelFn=()=>void 0;_nodes={};_in={};_preds={};_out={};_sucs={};_edgeObjs={};_edgeLabels={};_nodeCount=0;_edgeCount=0;_parent;_children;constructor(e){e&&(this._isDirected=Object.hasOwn(e,`directed`)?e.directed:!0,this._isMultigraph=Object.hasOwn(e,`multigraph`)?e.multigraph:!1,this._isCompound=Object.hasOwn(e,`compound`)?e.compound:!1),this._isCompound&&(this._parent={},this._children={},this._children[r]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return this._defaultNodeLabelFn=e,typeof e!=`function`&&(this._defaultNodeLabelFn=()=>e),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var e=this;return this.nodes().filter(t=>Object.keys(e._in[t]).length===0)}sinks(){var e=this;return this.nodes().filter(t=>Object.keys(e._out[t]).length===0)}setNodes(e,t){var n=arguments,r=this;return e.forEach(function(e){n.length>1?r.setNode(e,t):r.setNode(e)}),this}setNode(e,t){return Object.hasOwn(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=r,this._children[e]={},this._children[r][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Object.hasOwn(this._nodes,e)}removeNode(e){var t=this;if(Object.hasOwn(this._nodes,e)){var n=e=>t.removeEdge(t._edgeObjs[e]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],this.children(e).forEach(function(e){t.setParent(e)}),delete this._children[e]),Object.keys(this._in[e]).forEach(n),delete this._in[e],delete this._preds[e],Object.keys(this._out[e]).forEach(n),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw Error(`Cannot set parent in a non-compound graph`);if(t===void 0)t=r;else{t+=``;for(var n=t;n!==void 0;n=this.parent(n))if(n===e)throw Error(`Setting `+t+` as parent of `+e+` would create a cycle`);this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var t=this._parent[e];if(t!==r)return t}}children(e=r){if(this._isCompound){var t=this._children[e];if(t)return Object.keys(t)}else if(e===r)return this.nodes();else if(this.hasNode(e))return[]}predecessors(e){var t=this._preds[e];if(t)return Object.keys(t)}successors(e){var t=this._sucs[e];if(t)return Object.keys(t)}neighbors(e){var t=this.predecessors(e);if(t){let r=new Set(t);for(var n of this.successors(e))r.add(n);return Array.from(r.values())}}isLeaf(e){return(this.isDirected()?this.successors(e):this.neighbors(e)).length===0}filterNodes(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var n=this;Object.entries(this._nodes).forEach(function([n,r]){e(n)&&t.setNode(n,r)}),Object.values(this._edgeObjs).forEach(function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,n.edge(e))});var r={};function i(e){var a=n.parent(e);return a===void 0||t.hasNode(a)?(r[e]=a,a):a in r?r[a]:i(a)}return this._isCompound&&t.nodes().forEach(e=>t.setParent(e,i(e))),t}setDefaultEdgeLabel(e){return this._defaultEdgeLabelFn=e,typeof e!=`function`&&(this._defaultEdgeLabelFn=()=>e),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(e,t){var n=this,r=arguments;return e.reduce(function(e,i){return r.length>1?n.setEdge(e,i,t):n.setEdge(e,i),i}),this}setEdge(){var e,t,n,r,i=!1,a=arguments[0];typeof a==`object`&&a&&`v`in a?(e=a.v,t=a.w,n=a.name,arguments.length===2&&(r=arguments[1],i=!0)):(e=a,t=arguments[1],n=arguments[3],arguments.length>2&&(r=arguments[2],i=!0)),e=``+e,t=``+t,n!==void 0&&(n=``+n);var s=c(this._isDirected,e,t,n);if(Object.hasOwn(this._edgeLabels,s))return i&&(this._edgeLabels[s]=r),this;if(n!==void 0&&!this._isMultigraph)throw Error(`Cannot set a named edge when isMultigraph = false`);this.setNode(e),this.setNode(t),this._edgeLabels[s]=i?r:this._defaultEdgeLabelFn(e,t,n);var u=l(this._isDirected,e,t,n);return e=u.v,t=u.w,Object.freeze(u),this._edgeObjs[s]=u,o(this._preds[t],e),o(this._sucs[e],t),this._in[t][s]=u,this._out[e][s]=u,this._edgeCount++,this}edge(e,t,n){var r=arguments.length===1?u(this._isDirected,arguments[0]):c(this._isDirected,e,t,n);return this._edgeLabels[r]}edgeAsObj(){let e=this.edge(...arguments);return typeof e==`object`?e:{label:e}}hasEdge(e,t,n){var r=arguments.length===1?u(this._isDirected,arguments[0]):c(this._isDirected,e,t,n);return Object.hasOwn(this._edgeLabels,r)}removeEdge(e,t,n){var r=arguments.length===1?u(this._isDirected,arguments[0]):c(this._isDirected,e,t,n),i=this._edgeObjs[r];return i&&(e=i.v,t=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],s(this._preds[t],e),s(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--),this}inEdges(e,t){var n=this._in[e];if(n){var r=Object.values(n);return t?r.filter(e=>e.v===t):r}}outEdges(e,t){var n=this._out[e];if(n){var r=Object.values(n);return t?r.filter(e=>e.w===t):r}}nodeEdges(e,t){var n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))}};function o(e,t){e[t]?e[t]++:e[t]=1}function s(e,t){--e[t]||delete e[t]}function c(e,t,r,a){var o=``+t,s=``+r;if(!e&&o>s){var c=o;o=s,s=c}return o+i+s+i+(a===void 0?n:a)}function l(e,t,n,r){var i=``+t,a=``+n;if(!e&&i>a){var o=i;i=a,a=o}var s={v:i,w:a};return r&&(s.name=r),s}function u(e,t){return c(e,t.v,t.w,t.name)}t.exports=a})),sd=o(((e,t)=>{t.exports=`2.2.4`})),cd=o(((e,t)=>{t.exports={Graph:od(),version:sd()}})),ld=o(((e,t)=>{var n=od();t.exports={write:r,read:o};function r(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:i(e),edges:a(e)};return e.graph()!==void 0&&(t.value=structuredClone(e.graph())),t}function i(e){return e.nodes().map(function(t){var n=e.node(t),r=e.parent(t),i={v:t};return n!==void 0&&(i.value=n),r!==void 0&&(i.parent=r),i})}function a(e){return e.edges().map(function(t){var n=e.edge(t),r={v:t.v,w:t.w};return t.name!==void 0&&(r.name=t.name),n!==void 0&&(r.value=n),r})}function o(e){var t=new n(e.options).setGraph(e.value);return e.nodes.forEach(function(e){t.setNode(e.v,e.value),e.parent&&t.setParent(e.v,e.parent)}),e.edges.forEach(function(e){t.setEdge({v:e.v,w:e.w,name:e.name},e.value)}),t}})),ud=o(((e,t)=>{t.exports=n;function n(e){var t={},n=[],r;function i(n){Object.hasOwn(t,n)||(t[n]=!0,r.push(n),e.successors(n).forEach(i),e.predecessors(n).forEach(i))}return e.nodes().forEach(function(e){r=[],i(e),r.length&&n.push(r)}),n}})),dd=o(((e,t)=>{t.exports=class{_arr=[];_keyIndices={};size(){return this._arr.length}keys(){return this._arr.map(function(e){return e.key})}has(e){return Object.hasOwn(this._keyIndices,e)}priority(e){var t=this._keyIndices[e];if(t!==void 0)return this._arr[t].priority}min(){if(this.size()===0)throw Error(`Queue underflow`);return this._arr[0].key}add(e,t){var n=this._keyIndices;if(e=String(e),!Object.hasOwn(n,e)){var r=this._arr,i=r.length;return n[e]=i,r.push({key:e,priority:t}),this._decrease(i),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key}decrease(e,t){var n=this._keyIndices[e];if(t>this._arr[n].priority)throw Error(`New priority is greater than current priority. Key: `+e+` Old: `+this._arr[n].priority+` New: `+t);this._arr[n].priority=t,this._decrease(n)}_heapify(e){var t=this._arr,n=2*e,r=n+1,i=e;n<t.length&&(i=t[n].priority<t[i].priority?n:i,r<t.length&&(i=t[r].priority<t[i].priority?r:i),i!==e&&(this._swap(e,i),this._heapify(i)))}_decrease(e){for(var t=this._arr,n=t[e].priority,r;e!==0&&(r=e>>1,!(t[r].priority<n));)this._swap(e,r),e=r}_swap(e,t){var n=this._arr,r=this._keyIndices,i=n[e],a=n[t];n[e]=a,n[t]=i,r[a.key]=e,r[i.key]=t}}})),fd=o(((e,t)=>{var n=dd();t.exports=i;var r=()=>1;function i(e,t,n,i){return a(e,String(t),n||r,i||function(t){return e.outEdges(t)})}function a(e,t,r,i){var a={},o=new n,s,c,l=function(e){var t=e.v===s?e.w:e.v,n=a[t],i=r(e),l=c.distance+i;if(i<0)throw Error(`dijkstra does not allow negative edge weights. Bad edge: `+e+` Weight: `+i);l<n.distance&&(n.distance=l,n.predecessor=s,o.decrease(t,l))};for(e.nodes().forEach(function(e){var n=e===t?0:1/0;a[e]={distance:n},o.add(e,n)});o.size()>0&&(s=o.removeMin(),c=a[s],c.distance!==1/0);)i(s).forEach(l);return a}})),pd=o(((e,t)=>{var n=fd();t.exports=r;function r(e,t,r){return e.nodes().reduce(function(i,a){return i[a]=n(e,a,t,r),i},{})}})),md=o(((e,t)=>{t.exports=n;function n(e){var t=0,n=[],r={},i=[];function a(o){var s=r[o]={onStack:!0,lowlink:t,index:t++};if(n.push(o),e.successors(o).forEach(function(e){Object.hasOwn(r,e)?r[e].onStack&&(s.lowlink=Math.min(s.lowlink,r[e].index)):(a(e),s.lowlink=Math.min(s.lowlink,r[e].lowlink))}),s.lowlink===s.index){var c=[],l;do l=n.pop(),r[l].onStack=!1,c.push(l);while(o!==l);i.push(c)}}return e.nodes().forEach(function(e){Object.hasOwn(r,e)||a(e)}),i}})),hd=o(((e,t)=>{var n=md();t.exports=r;function r(e){return n(e).filter(function(t){return t.length>1||t.length===1&&e.hasEdge(t[0],t[0])})}})),gd=o(((e,t)=>{t.exports=r;var n=()=>1;function r(e,t,r){return i(e,t||n,r||function(t){return e.outEdges(t)})}function i(e,t,n){var r={},i=e.nodes();return i.forEach(function(e){r[e]={},r[e][e]={distance:0},i.forEach(function(t){e!==t&&(r[e][t]={distance:1/0})}),n(e).forEach(function(n){var i=n.v===e?n.w:n.v,a=t(n);r[e][i]={distance:a,predecessor:e}})}),i.forEach(function(e){var t=r[e];i.forEach(function(n){var a=r[n];i.forEach(function(n){var r=a[e],i=t[n],o=a[n],s=r.distance+i.distance;s<o.distance&&(o.distance=s,o.predecessor=i.predecessor)})})}),r}})),_d=o(((e,t)=>{function n(e){var t={},n={},i=[];function a(o){if(Object.hasOwn(n,o))throw new r;Object.hasOwn(t,o)||(n[o]=!0,t[o]=!0,e.predecessors(o).forEach(a),delete n[o],i.push(o))}if(e.sinks().forEach(a),Object.keys(t).length!==e.nodeCount())throw new r;return i}var r=class extends Error{constructor(){super(...arguments)}};t.exports=n,n.CycleException=r})),vd=o(((e,t)=>{var n=_d();t.exports=r;function r(e){try{n(e)}catch(e){if(e instanceof n.CycleException)return!1;throw e}return!0}})),yd=o(((e,t)=>{t.exports=n;function n(e,t,n){Array.isArray(t)||(t=[t]);var a=e.isDirected()?t=>e.successors(t):t=>e.neighbors(t),o=n===`post`?r:i,s=[],c={};return t.forEach(t=>{if(!e.hasNode(t))throw Error(`Graph does not have node: `+t);o(t,a,c,s)}),s}function r(e,t,n,r){for(var i=[[e,!1]];i.length>0;){var o=i.pop();o[1]?r.push(o[0]):Object.hasOwn(n,o[0])||(n[o[0]]=!0,i.push([o[0],!0]),a(t(o[0]),e=>i.push([e,!1])))}}function i(e,t,n,r){for(var i=[e];i.length>0;){var o=i.pop();Object.hasOwn(n,o)||(n[o]=!0,r.push(o),a(t(o),e=>i.push(e)))}}function a(e,t){for(var n=e.length;n--;)t(e[n],n,e);return e}})),bd=o(((e,t)=>{var n=yd();t.exports=r;function r(e,t){return n(e,t,`post`)}})),xd=o(((e,t)=>{var n=yd();t.exports=r;function r(e,t){return n(e,t,`pre`)}})),Sd=o(((e,t)=>{var n=od(),r=dd();t.exports=i;function i(e,t){var i=new n,a={},o=new r,s;function c(e){var n=e.v===s?e.w:e.v,r=o.priority(n);if(r!==void 0){var i=t(e);i<r&&(a[n]=s,o.decrease(n,i))}}if(e.nodeCount()===0)return i;e.nodes().forEach(function(e){o.add(e,1/0),i.setNode(e)}),o.decrease(e.nodes()[0],0);for(var l=!1;o.size()>0;){if(s=o.removeMin(),Object.hasOwn(a,s))i.setEdge(s,a[s]);else if(l)throw Error(`Input graph is not connected: `+e);else l=!0;e.nodeEdges(s).forEach(c)}return i}})),Cd=o(((e,t)=>{t.exports={components:ud(),dijkstra:fd(),dijkstraAll:pd(),findCycles:hd(),floydWarshall:gd(),isAcyclic:vd(),postorder:bd(),preorder:xd(),prim:Sd(),tarjan:md(),topsort:_d()}})),wd=o(((e,t)=>{var n=cd();t.exports={Graph:n.Graph,json:ld(),alg:Cd(),version:n.version}})),Td=o(((e,t)=>{var n=class{constructor(){let e={};e._next=e._prev=e,this._sentinel=e}dequeue(){let e=this._sentinel,t=e._prev;if(t!==e)return r(t),t}enqueue(e){let t=this._sentinel;e._prev&&e._next&&r(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t}toString(){let e=[],t=this._sentinel,n=t._prev;for(;n!==t;)e.push(JSON.stringify(n,i)),n=n._prev;return`[`+e.join(`, `)+`]`}};function r(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function i(e,t){if(e!==`_next`&&e!==`_prev`)return t}t.exports=n})),Ed=o(((e,t)=>{var n=wd().Graph,r=Td();t.exports=a;var i=()=>1;function a(e,t){if(e.nodeCount()<=1)return[];let n=c(e,t||i);return o(n.graph,n.buckets,n.zeroIdx).flatMap(t=>e.outEdges(t.v,t.w))}function o(e,t,n){let r=[],i=t[t.length-1],a=t[0],o;for(;e.nodeCount();){for(;o=a.dequeue();)s(e,t,n,o);for(;o=i.dequeue();)s(e,t,n,o);if(e.nodeCount()){for(let i=t.length-2;i>0;--i)if(o=t[i].dequeue(),o){r=r.concat(s(e,t,n,o,!0));break}}}return r}function s(e,t,n,r,i){let a=i?[]:void 0;return e.inEdges(r.v).forEach(r=>{let o=e.edge(r),s=e.node(r.v);i&&a.push({v:r.v,w:r.w}),s.out-=o,l(t,n,s)}),e.outEdges(r.v).forEach(r=>{let i=e.edge(r),a=r.w,o=e.node(a);o.in-=i,l(t,n,o)}),e.removeNode(r.v),a}function c(e,t){let i=new n,a=0,o=0;e.nodes().forEach(e=>{i.setNode(e,{v:e,in:0,out:0})}),e.edges().forEach(e=>{let n=i.edge(e.v,e.w)||0,r=t(e),s=n+r;i.setEdge(e.v,e.w,s),o=Math.max(o,i.node(e.v).out+=r),a=Math.max(a,i.node(e.w).in+=r)});let s=u(o+a+3).map(()=>new r),c=a+1;return i.nodes().forEach(e=>{l(s,c,i.node(e))}),{graph:i,buckets:s,zeroIdx:c}}function l(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}function u(e){let t=[];for(let n=0;n<e;n++)t.push(n);return t}})),Dd=o(((e,t)=>{var n=wd().Graph;t.exports={addBorderNode:f,addDummyNode:r,applyWithChunking:h,asNonCompoundGraph:a,buildLayerMatrix:l,intersectRect:c,mapValues:w,maxRank:g,normalizeRanks:u,notime:y,partition:_,pick:C,predecessorWeights:s,range:S,removeEmptyRanks:d,simplify:i,successorWeights:o,time:v,uniqueId:x,zipObject:T};function r(e,t,n,r){for(var i=r;e.hasNode(i);)i=x(r);return n.dummy=t,e.setNode(i,n),i}function i(e){let t=new n().setGraph(e.graph());return e.nodes().forEach(n=>t.setNode(n,e.node(n))),e.edges().forEach(n=>{let r=t.edge(n.v,n.w)||{weight:0,minlen:1},i=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})}),t}function a(e){let t=new n({multigraph:e.isMultigraph()}).setGraph(e.graph());return e.nodes().forEach(n=>{e.children(n).length||t.setNode(n,e.node(n))}),e.edges().forEach(n=>{t.setEdge(n,e.edge(n))}),t}function o(e){let t=e.nodes().map(t=>{let n={};return e.outEdges(t).forEach(t=>{n[t.w]=(n[t.w]||0)+e.edge(t).weight}),n});return T(e.nodes(),t)}function s(e){let t=e.nodes().map(t=>{let n={};return e.inEdges(t).forEach(t=>{n[t.v]=(n[t.v]||0)+e.edge(t).weight}),n});return T(e.nodes(),t)}function c(e,t){let n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2;if(!i&&!a)throw Error(`Not possible to find intersection inside of the rectangle`);let c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=s*i/a,l=s):(i<0&&(o=-o),c=o,l=o*a/i),{x:n+c,y:r+l}}function l(e){let t=S(g(e)+1).map(()=>[]);return e.nodes().forEach(n=>{let r=e.node(n),i=r.rank;i!==void 0&&(t[i][r.order]=n)}),t}function u(e){let t=e.nodes().map(t=>{let n=e.node(t).rank;return n===void 0?Number.MAX_VALUE:n}),n=h(Math.min,t);e.nodes().forEach(t=>{let r=e.node(t);Object.hasOwn(r,`rank`)&&(r.rank-=n)})}function d(e){let t=e.nodes().map(t=>e.node(t).rank),n=h(Math.min,t),r=[];e.nodes().forEach(t=>{let i=e.node(t).rank-n;r[i]||(r[i]=[]),r[i].push(t)});let i=0,a=e.graph().nodeRankFactor;Array.from(r).forEach((t,n)=>{t===void 0&&n%a!==0?--i:t!==void 0&&i&&t.forEach(t=>e.node(t).rank+=i)})}function f(e,t,n,i){let a={width:0,height:0};return arguments.length>=4&&(a.rank=n,a.order=i),r(e,`border`,a,t)}function p(e,t=m){let n=[];for(let r=0;r<e.length;r+=t){let i=e.slice(r,r+t);n.push(i)}return n}var m=65535;function h(e,t){if(t.length>m){let n=p(t);return e.apply(null,n.map(t=>e.apply(null,t)))}else return e.apply(null,t)}function g(e){let t=e.nodes().map(t=>{let n=e.node(t).rank;return n===void 0?Number.MIN_VALUE:n});return h(Math.max,t)}function _(e,t){let n={lhs:[],rhs:[]};return e.forEach(e=>{t(e)?n.lhs.push(e):n.rhs.push(e)}),n}function v(e,t){let n=Date.now();try{return t()}finally{console.log(e+` time: `+(Date.now()-n)+`ms`)}}function y(e,t){return t()}var b=0;function x(e){return e+(``+ ++b)}function S(e,t,n=1){t??(t=e,e=0);let r=e=>e<t;n<0&&(r=e=>t<e);let i=[];for(let t=e;r(t);t+=n)i.push(t);return i}function C(e,t){let n={};for(let r of t)e[r]!==void 0&&(n[r]=e[r]);return n}function w(e,t){let n=t;return typeof t==`string`&&(n=e=>e[t]),Object.entries(e).reduce((e,[t,r])=>(e[t]=n(r,t),e),{})}function T(e,t){return e.reduce((e,n,r)=>(e[n]=t[r],e),{})}})),Od=o(((e,t)=>{var n=Ed(),r=Dd().uniqueId;t.exports={run:i,undo:o};function i(e){(e.graph().acyclicer===`greedy`?n(e,t(e)):a(e)).forEach(t=>{let n=e.edge(t);e.removeEdge(t),n.forwardName=t.name,n.reversed=!0,e.setEdge(t.w,t.v,n,r(`rev`))});function t(e){return t=>e.edge(t).weight}}function a(e){let t=[],n={},r={};function i(a){Object.hasOwn(r,a)||(r[a]=!0,n[a]=!0,e.outEdges(a).forEach(e=>{Object.hasOwn(n,e.w)?t.push(e):i(e.w)}),delete n[a])}return e.nodes().forEach(i),t}function o(e){e.edges().forEach(t=>{let n=e.edge(t);if(n.reversed){e.removeEdge(t);let r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}})}})),kd=o(((e,t)=>{var n=Dd();t.exports={run:r,undo:a};function r(e){e.graph().dummyChains=[],e.edges().forEach(t=>i(e,t))}function i(e,t){let r=t.v,i=e.node(r).rank,a=t.w,o=e.node(a).rank,s=t.name,c=e.edge(t),l=c.labelRank;if(o===i+1)return;e.removeEdge(t);let u,d,f;for(f=0,++i;i<o;++f,++i)c.points=[],d={width:0,height:0,edgeLabel:c,edgeObj:t,rank:i},u=n.addDummyNode(e,`edge`,d,`_d`),i===l&&(d.width=c.width,d.height=c.height,d.dummy=`edge-label`,d.labelpos=c.labelpos),e.setEdge(r,u,{weight:c.weight},s),f===0&&e.graph().dummyChains.push(u),r=u;e.setEdge(r,a,{weight:c.weight},s)}function a(e){e.graph().dummyChains.forEach(t=>{let n=e.node(t),r=n.edgeLabel,i;for(e.setEdge(n.edgeObj,r);n.dummy;)i=e.successors(t)[0],e.removeNode(t),r.points.push({x:n.x,y:n.y}),n.dummy===`edge-label`&&(r.x=n.x,r.y=n.y,r.width=n.width,r.height=n.height),t=i,n=e.node(t)})}})),Ad=o(((e,t)=>{var{applyWithChunking:n}=Dd();t.exports={longestPath:r,slack:i};function r(e){var t={};function r(i){var a=e.node(i);if(Object.hasOwn(t,i))return a.rank;t[i]=!0;let o=e.outEdges(i).map(t=>t==null?1/0:r(t.w)-e.edge(t).minlen);var s=n(Math.min,o);return s===1/0&&(s=0),a.rank=s}e.sources().forEach(r)}function i(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}})),jd=o(((e,t)=>{var n=wd().Graph,r=Ad().slack;t.exports=i;function i(e){var t=new n({directed:!1}),i=e.nodes()[0],c=e.nodeCount();t.setNode(i,{});for(var l,u;a(t,e)<c;)l=o(t,e),u=t.hasNode(l.v)?r(e,l):-r(e,l),s(t,e,u);return t}function a(e,t){function n(i){t.nodeEdges(i).forEach(a=>{var o=a.v,s=i===o?a.w:o;!e.hasNode(s)&&!r(t,a)&&(e.setNode(s,{}),e.setEdge(i,s,{}),n(s))})}return e.nodes().forEach(n),e.nodeCount()}function o(e,t){return t.edges().reduce((n,i)=>{let a=1/0;return e.hasNode(i.v)!==e.hasNode(i.w)&&(a=r(t,i)),a<n[0]?[a,i]:n},[1/0,null])[1]}function s(e,t,n){e.nodes().forEach(e=>t.node(e).rank+=n)}})),Md=o(((e,t)=>{var n=jd(),r=Ad().slack,i=Ad().longestPath,a=wd().alg.preorder,o=wd().alg.postorder,s=Dd().simplify;t.exports=c,c.initLowLimValues=f,c.initCutValues=l,c.calcCutValue=d,c.leaveEdge=m,c.enterEdge=h,c.exchangeEdges=g;function c(e){e=s(e),i(e);var t=n(e);f(t),l(t,e);for(var r,a;r=m(t);)a=h(t,e,r),g(t,e,r,a)}function l(e,t){var n=o(e,e.nodes());n=n.slice(0,n.length-1),n.forEach(n=>u(e,t,n))}function u(e,t,n){var r=e.node(n).parent;e.edge(n,r).cutvalue=d(e,t,n)}function d(e,t,n){var r=e.node(n).parent,i=!0,a=t.edge(n,r),o=0;return a||=(i=!1,t.edge(r,n)),o=a.weight,t.nodeEdges(n).forEach(a=>{var s=a.v===n,c=s?a.w:a.v;if(c!==r){var l=s===i,u=t.edge(a).weight;if(o+=l?u:-u,v(e,n,c)){var d=e.edge(n,c).cutvalue;o+=l?-d:d}}}),o}function f(e,t){arguments.length<2&&(t=e.nodes()[0]),p(e,{},1,t)}function p(e,t,n,r,i){var a=n,o=e.node(r);return t[r]=!0,e.neighbors(r).forEach(i=>{Object.hasOwn(t,i)||(n=p(e,t,n,i,r))}),o.low=a,o.lim=n++,i?o.parent=i:delete o.parent,n}function m(e){return e.edges().find(t=>e.edge(t).cutvalue<0)}function h(e,t,n){var i=n.v,a=n.w;t.hasEdge(i,a)||(i=n.w,a=n.v);var o=e.node(i),s=e.node(a),c=o,l=!1;return o.lim>s.lim&&(c=s,l=!0),t.edges().filter(t=>l===y(e,e.node(t.v),c)&&l!==y(e,e.node(t.w),c)).reduce((e,n)=>r(t,n)<r(t,e)?n:e)}function g(e,t,n,r){var i=n.v,a=n.w;e.removeEdge(i,a),e.setEdge(r.v,r.w,{}),f(e),l(e,t),_(e,t)}function _(e,t){var n=a(e,e.nodes().find(e=>!t.node(e).parent));n=n.slice(1),n.forEach(n=>{var r=e.node(n).parent,i=t.edge(n,r),a=!1;i||(i=t.edge(r,n),a=!0),t.node(n).rank=t.node(r).rank+(a?i.minlen:-i.minlen)})}function v(e,t,n){return e.hasEdge(t,n)}function y(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}})),Nd=o(((e,t)=>{var n=Ad().longestPath,r=jd(),i=Md();t.exports=a;function a(e){var t=e.graph().ranker;if(t instanceof Function)return t(e);switch(e.graph().ranker){case`network-simplex`:c(e);break;case`tight-tree`:s(e);break;case`longest-path`:o(e);break;case`none`:break;default:c(e)}}var o=n;function s(e){n(e),r(e)}function c(e){i(e)}})),Pd=o(((e,t)=>{t.exports=n;function n(e){let t=i(e);e.graph().dummyChains.forEach(n=>{let i=e.node(n),a=i.edgeObj,o=r(e,t,a.v,a.w),s=o.path,c=o.lca,l=0,u=s[l],d=!0;for(;n!==a.w;){if(i=e.node(n),d){for(;(u=s[l])!==c&&e.node(u).maxRank<i.rank;)l++;u===c&&(d=!1)}if(!d){for(;l<s.length-1&&e.node(u=s[l+1]).minRank<=i.rank;)l++;u=s[l]}e.setParent(n,u),n=e.successors(n)[0]}})}function r(e,t,n,r){let i=[],a=[],o=Math.min(t[n].low,t[r].low),s=Math.max(t[n].lim,t[r].lim),c,l;c=n;do c=e.parent(c),i.push(c);while(c&&(t[c].low>o||s>t[c].lim));for(l=c,c=r;(c=e.parent(c))!==l;)a.push(c);return{path:i.concat(a.reverse()),lca:l}}function i(e){let t={},n=0;function r(i){let a=n;e.children(i).forEach(r),t[i]={low:a,lim:n++}}return e.children().forEach(r),t}})),Fd=o(((e,t)=>{var n=Dd();t.exports={run:r,cleanup:s};function r(e){let t=n.addDummyNode(e,`root`,{},`_root`),r=a(e),s=Object.values(r),c=n.applyWithChunking(Math.max,s)-1,l=2*c+1;e.graph().nestingRoot=t,e.edges().forEach(t=>e.edge(t).minlen*=l);let u=o(e)+1;e.children().forEach(n=>i(e,t,l,u,c,r,n)),e.graph().nodeRankFactor=l}function i(e,t,r,a,o,s,c){let l=e.children(c);if(!l.length){c!==t&&e.setEdge(t,c,{weight:0,minlen:r});return}let u=n.addBorderNode(e,`_bt`),d=n.addBorderNode(e,`_bb`),f=e.node(c);e.setParent(u,c),f.borderTop=u,e.setParent(d,c),f.borderBottom=d,l.forEach(n=>{i(e,t,r,a,o,s,n);let l=e.node(n),f=l.borderTop?l.borderTop:n,p=l.borderBottom?l.borderBottom:n,m=l.borderTop?a:2*a,h=f===p?o-s[c]+1:1;e.setEdge(u,f,{weight:m,minlen:h,nestingEdge:!0}),e.setEdge(p,d,{weight:m,minlen:h,nestingEdge:!0})}),e.parent(c)||e.setEdge(t,u,{weight:0,minlen:o+s[c]})}function a(e){var t={};function n(r,i){var a=e.children(r);a&&a.length&&a.forEach(e=>n(e,i+1)),t[r]=i}return e.children().forEach(e=>n(e,1)),t}function o(e){return e.edges().reduce((t,n)=>t+e.edge(n).weight,0)}function s(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,e.edges().forEach(t=>{e.edge(t).nestingEdge&&e.removeEdge(t)})}})),Id=o(((e,t)=>{var n=Dd();t.exports=r;function r(e){function t(n){let r=e.children(n),a=e.node(n);if(r.length&&r.forEach(t),Object.hasOwn(a,`minRank`)){a.borderLeft=[],a.borderRight=[];for(let t=a.minRank,r=a.maxRank+1;t<r;++t)i(e,`borderLeft`,`_bl`,n,a,t),i(e,`borderRight`,`_br`,n,a,t)}}e.children().forEach(t)}function i(e,t,r,i,a,o){let s={width:0,height:0,rank:o,borderType:t},c=a[t][o-1],l=n.addDummyNode(e,`border`,s,r);a[t][o]=l,e.setParent(l,i),c&&e.setEdge(c,l,{weight:1})}})),Ld=o(((e,t)=>{t.exports={adjust:n,undo:r};function n(e){let t=e.graph().rankdir.toLowerCase();(t===`lr`||t===`rl`)&&i(e)}function r(e){let t=e.graph().rankdir.toLowerCase();(t===`bt`||t===`rl`)&&o(e),(t===`lr`||t===`rl`)&&(c(e),i(e))}function i(e){e.nodes().forEach(t=>a(e.node(t))),e.edges().forEach(t=>a(e.edge(t)))}function a(e){let t=e.width;e.width=e.height,e.height=t}function o(e){e.nodes().forEach(t=>s(e.node(t))),e.edges().forEach(t=>{let n=e.edge(t);n.points.forEach(s),Object.hasOwn(n,`y`)&&s(n)})}function s(e){e.y=-e.y}function c(e){e.nodes().forEach(t=>l(e.node(t))),e.edges().forEach(t=>{let n=e.edge(t);n.points.forEach(l),Object.hasOwn(n,`x`)&&l(n)})}function l(e){let t=e.x;e.x=e.y,e.y=t}})),Rd=o(((e,t)=>{var n=Dd();t.exports=r;function r(e){let t={},r=e.nodes().filter(t=>!e.children(t).length),i=r.map(t=>e.node(t).rank),a=n.applyWithChunking(Math.max,i),o=n.range(a+1).map(()=>[]);function s(n){t[n]||(t[n]=!0,o[e.node(n).rank].push(n),e.successors(n).forEach(s))}return r.sort((t,n)=>e.node(t).rank-e.node(n).rank).forEach(s),o}})),zd=o(((e,t)=>{var n=Dd().zipObject;t.exports=r;function r(e,t){let n=0;for(let r=1;r<t.length;++r)n+=i(e,t[r-1],t[r]);return n}function i(e,t,r){let i=n(r,r.map((e,t)=>t)),a=t.flatMap(t=>e.outEdges(t).map(t=>({pos:i[t.w],weight:e.edge(t).weight})).sort((e,t)=>e.pos-t.pos)),o=1;for(;o<r.length;)o<<=1;let s=2*o-1;--o;let c=Array(s).fill(0),l=0;return a.forEach(e=>{let t=e.pos+o;c[t]+=e.weight;let n=0;for(;t>0;)t%2&&(n+=c[t+1]),t=t-1>>1,c[t]+=e.weight;l+=e.weight*n}),l}})),Bd=o(((e,t)=>{t.exports=n;function n(e,t=[]){return t.map(t=>{let n=e.inEdges(t);if(n.length){let r=n.reduce((t,n)=>{let r=e.edge(n),i=e.node(n.v);return{sum:t.sum+r.weight*i.order,weight:t.weight+r.weight}},{sum:0,weight:0});return{v:t,barycenter:r.sum/r.weight,weight:r.weight}}else return{v:t}})}})),Vd=o(((e,t)=>{var n=Dd();t.exports=r;function r(e,t){let n={};return e.forEach((e,t)=>{let r=n[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};e.barycenter!==void 0&&(r.barycenter=e.barycenter,r.weight=e.weight)}),t.edges().forEach(e=>{let t=n[e.v],r=n[e.w];t!==void 0&&r!==void 0&&(r.indegree++,t.out.push(n[e.w]))}),i(Object.values(n).filter(e=>!e.indegree))}function i(e){let t=[];function r(e){return t=>{t.merged||(t.barycenter===void 0||e.barycenter===void 0||t.barycenter>=e.barycenter)&&a(e,t)}}function i(t){return n=>{n.in.push(t),--n.indegree===0&&e.push(n)}}for(;e.length;){let n=e.pop();t.push(n),n.in.reverse().forEach(r(n)),n.out.forEach(i(n))}return t.filter(e=>!e.merged).map(e=>n.pick(e,[`vs`,`i`,`barycenter`,`weight`]))}function a(e,t){let n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}})),Hd=o(((e,t)=>{var n=Dd();t.exports=r;function r(e,t){let r=n.partition(e,e=>Object.hasOwn(e,`barycenter`)),o=r.lhs,s=r.rhs.sort((e,t)=>t.i-e.i),c=[],l=0,u=0,d=0;o.sort(a(!!t)),d=i(c,s,d),o.forEach(e=>{d+=e.vs.length,c.push(e.vs),l+=e.barycenter*e.weight,u+=e.weight,d=i(c,s,d)});let f={vs:c.flat(!0)};return u&&(f.barycenter=l/u,f.weight=u),f}function i(e,t,n){let r;for(;t.length&&(r=t[t.length-1]).i<=n;)t.pop(),e.push(r.vs),n++;return n}function a(e){return(t,n)=>t.barycenter<n.barycenter?-1:t.barycenter>n.barycenter?1:e?n.i-t.i:t.i-n.i}})),Ud=o(((e,t)=>{var n=Bd(),r=Vd(),i=Hd();t.exports=a;function a(e,t,c,l){let u=e.children(t),d=e.node(t),f=d?d.borderLeft:void 0,p=d?d.borderRight:void 0,m={};f&&(u=u.filter(e=>e!==f&&e!==p));let h=n(e,u);h.forEach(t=>{if(e.children(t.v).length){let n=a(e,t.v,c,l);m[t.v]=n,Object.hasOwn(n,`barycenter`)&&s(t,n)}});let g=r(h,c);o(g,m);let _=i(g,l);if(f&&(_.vs=[f,_.vs,p].flat(!0),e.predecessors(f).length)){let t=e.node(e.predecessors(f)[0]),n=e.node(e.predecessors(p)[0]);Object.hasOwn(_,`barycenter`)||(_.barycenter=0,_.weight=0),_.barycenter=(_.barycenter*_.weight+t.order+n.order)/(_.weight+2),_.weight+=2}return _}function o(e,t){e.forEach(e=>{e.vs=e.vs.flatMap(e=>t[e]?t[e].vs:e)})}function s(e,t){e.barycenter===void 0?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}})),Wd=o(((e,t)=>{var n=wd().Graph,r=Dd();t.exports=i;function i(e,t,r,i){i||=e.nodes();let o=a(e),s=new n({compound:!0}).setGraph({root:o}).setDefaultNodeLabel(t=>e.node(t));return i.forEach(n=>{let i=e.node(n),a=e.parent(n);(i.rank===t||i.minRank<=t&&t<=i.maxRank)&&(s.setNode(n),s.setParent(n,a||o),e[r](n).forEach(t=>{let r=t.v===n?t.w:t.v,i=s.edge(r,n),a=i===void 0?0:i.weight;s.setEdge(r,n,{weight:e.edge(t).weight+a})}),Object.hasOwn(i,`minRank`)&&s.setNode(n,{borderLeft:i.borderLeft[t],borderRight:i.borderRight[t]}))}),s}function a(e){for(var t;e.hasNode(t=r.uniqueId(`_root`)););return t}})),Gd=o(((e,t)=>{t.exports=n;function n(e,t,n){let r={},i;n.forEach(n=>{let a=e.parent(n),o,s;for(;a;){if(o=e.parent(a),o?(s=r[o],r[o]=a):(s=i,i=a),s&&s!==a){t.setEdge(s,a);return}a=o}})}})),Kd=o(((e,t)=>{var n=Rd(),r=zd(),i=Ud(),a=Wd(),o=Gd(),s=wd().Graph,c=Dd();t.exports=l;function l(e,t){if(t&&typeof t.customOrder==`function`){t.customOrder(e,l);return}let i=c.maxRank(e),a=u(e,c.range(1,i+1),`inEdges`),o=u(e,c.range(i-1,-1,-1),`outEdges`),s=n(e);if(f(e,s),t&&t.disableOptimalOrderHeuristic)return;let p=1/0,m;for(let t=0,n=0;n<4;++t,++n){d(t%2?a:o,t%4>=2),s=c.buildLayerMatrix(e);let i=r(e,s);i<p&&(n=0,m=Object.assign({},s),p=i)}f(e,m)}function u(e,t,n){let r=new Map,i=(e,t)=>{r.has(e)||r.set(e,[]),r.get(e).push(t)};for(let t of e.nodes()){let n=e.node(t);if(typeof n.rank==`number`&&i(n.rank,t),typeof n.minRank==`number`&&typeof n.maxRank==`number`)for(let e=n.minRank;e<=n.maxRank;e++)e!==n.rank&&i(e,t)}return t.map(function(t){return a(e,t,n,r.get(t)||[])})}function d(e,t){let n=new s;e.forEach(function(e){let r=e.graph().root,a=i(e,r,n,t);a.vs.forEach((t,n)=>e.node(t).order=n),o(e,n,a.vs)})}function f(e,t){Object.values(t).forEach(t=>t.forEach((t,n)=>e.node(t).order=n))}})),qd=o(((e,t)=>{var n=wd().Graph,r=Dd();t.exports={positionX:h,findType1Conflicts:i,findType2Conflicts:a,addConflict:s,hasConflict:c,verticalAlignment:l,horizontalCompaction:u,alignCoordinates:p,findSmallestWidthAlignment:f,balance:m};function i(e,t){let n={};function r(t,r){let i=0,a=0,c=t.length,l=r[r.length-1];return r.forEach((t,u)=>{let d=o(e,t),f=d?e.node(d).order:c;(d||t===l)&&(r.slice(a,u+1).forEach(t=>{e.predecessors(t).forEach(r=>{let a=e.node(r),o=a.order;(o<i||f<o)&&!(a.dummy&&e.node(t).dummy)&&s(n,r,t)})}),a=u+1,i=f)}),r}return t.length&&t.reduce(r),n}function a(e,t){let n={};function i(t,i,a,o,c){let l;r.range(i,a).forEach(r=>{l=t[r],e.node(l).dummy&&e.predecessors(l).forEach(t=>{let r=e.node(t);r.dummy&&(r.order<o||r.order>c)&&s(n,t,l)})})}function a(t,n){let r=-1,a,o=0;return n.forEach((s,c)=>{if(e.node(s).dummy===`border`){let t=e.predecessors(s);t.length&&(a=e.node(t[0]).order,i(n,o,c,r,a),o=c,r=a)}i(n,o,n.length,a,t.length)}),n}return t.length&&t.reduce(a),n}function o(e,t){if(e.node(t).dummy)return e.predecessors(t).find(t=>e.node(t).dummy)}function s(e,t,n){if(t>n){let e=t;t=n,n=e}let r=e[t];r||(e[t]=r={}),r[n]=!0}function c(e,t,n){if(t>n){let e=t;t=n,n=e}return!!e[t]&&Object.hasOwn(e[t],n)}function l(e,t,n,r){let i={},a={},o={};return t.forEach(e=>{e.forEach((e,t)=>{i[e]=e,a[e]=e,o[e]=t})}),t.forEach(e=>{let t=-1;e.forEach(e=>{let s=r(e);if(s.length){s=s.sort((e,t)=>o[e]-o[t]);let r=(s.length-1)/2;for(let l=Math.floor(r),u=Math.ceil(r);l<=u;++l){let r=s[l];a[e]===e&&t<o[r]&&!c(n,e,r)&&(a[r]=e,a[e]=i[e]=i[r],t=o[r])}}})}),{root:i,align:a}}function u(e,t,n,r,i){let a={},o=d(e,t,n,i),s=i?`borderLeft`:`borderRight`;function c(e,t){let n=o.nodes(),r=n.pop(),i={};for(;r;)i[r]?e(r):(i[r]=!0,n.push(r),n=n.concat(t(r))),r=n.pop()}function l(e){a[e]=o.inEdges(e).reduce((e,t)=>Math.max(e,a[t.v]+o.edge(t)),0)}function u(t){let n=o.outEdges(t).reduce((e,t)=>Math.min(e,a[t.w]-o.edge(t)),1/0),r=e.node(t);n!==1/0&&r.borderType!==s&&(a[t]=Math.max(a[t],n))}return c(l,o.predecessors.bind(o)),c(u,o.successors.bind(o)),Object.keys(r).forEach(e=>a[e]=a[n[e]]),a}function d(e,t,r,i){let a=new n,o=e.graph(),s=g(o.nodesep,o.edgesep,i);return t.forEach(t=>{let n;t.forEach(t=>{let i=r[t];if(a.setNode(i),n){var o=r[n],c=a.edge(o,i);a.setEdge(o,i,Math.max(s(e,t,n),c||0))}n=t})}),a}function f(e,t){return Object.values(t).reduce((t,n)=>{let r=-1/0,i=1/0;Object.entries(n).forEach(([t,n])=>{let a=_(e,t)/2;r=Math.max(n+a,r),i=Math.min(n-a,i)});let a=r-i;return a<t[0]&&(t=[a,n]),t},[1/0,null])[1]}function p(e,t){let n=Object.values(t),i=r.applyWithChunking(Math.min,n),a=r.applyWithChunking(Math.max,n);[`u`,`d`].forEach(n=>{[`l`,`r`].forEach(o=>{let s=n+o,c=e[s];if(c===t)return;let l=Object.values(c),u=i-r.applyWithChunking(Math.min,l);o!==`l`&&(u=a-r.applyWithChunking(Math.max,l)),u&&(e[s]=r.mapValues(c,e=>e+u))})})}function m(e,t){return r.mapValues(e.ul,(n,r)=>{if(t)return e[t.toLowerCase()][r];{let t=Object.values(e).map(e=>e[r]).sort((e,t)=>e-t);return(t[1]+t[2])/2}})}function h(e){let t=r.buildLayerMatrix(e),n=Object.assign(i(e,t),a(e,t)),o={},s;return[`u`,`d`].forEach(i=>{s=i===`u`?t:Object.values(t).reverse(),[`l`,`r`].forEach(t=>{t===`r`&&(s=s.map(e=>Object.values(e).reverse()));let a=(i===`u`?e.predecessors:e.successors).bind(e),c=l(e,s,n,a),d=u(e,s,c.root,c.align,t===`r`);t===`r`&&(d=r.mapValues(d,e=>-e)),o[i+t]=d})}),p(o,f(e,o)),m(o,e.graph().align)}function g(e,t,n){return(r,i,a)=>{let o=r.node(i),s=r.node(a),c=0,l;if(c+=o.width/2,Object.hasOwn(o,`labelpos`))switch(o.labelpos.toLowerCase()){case`l`:l=-o.width/2;break;case`r`:l=o.width/2;break}if(l&&(c+=n?l:-l),l=0,c+=(o.dummy?t:e)/2,c+=(s.dummy?t:e)/2,c+=s.width/2,Object.hasOwn(s,`labelpos`))switch(s.labelpos.toLowerCase()){case`l`:l=s.width/2;break;case`r`:l=-s.width/2;break}return l&&(c+=n?l:-l),l=0,c}}function _(e,t){return e.node(t).width}})),Jd=o(((e,t)=>{var n=Dd(),r=qd().positionX;t.exports=i;function i(e){e=n.asNonCompoundGraph(e),a(e),Object.entries(r(e)).forEach(([t,n])=>e.node(t).x=n)}function a(e){let t=n.buildLayerMatrix(e),r=e.graph().ranksep,i=0;t.forEach(t=>{let n=t.reduce((t,n)=>{let r=e.node(n).height;return t>r?t:r},0);t.forEach(t=>e.node(t).y=i+n/2),i+=n+r})}})),Yd=o(((e,t)=>{var n=Od(),r=kd(),i=Nd(),a=Dd().normalizeRanks,o=Pd(),s=Dd().removeEmptyRanks,c=Fd(),l=Id(),u=Ld(),d=Kd(),f=Jd(),p=Dd(),m=wd().Graph;t.exports=h;function h(e,t){let n=t&&t.debugTiming?p.time:p.notime;n(`layout`,()=>{let r=n(` buildLayoutGraph`,()=>E(e));n(` runLayout`,()=>g(r,n,t)),n(` updateInputGraph`,()=>_(e,r))})}function g(e,t,m){t(` makeSpaceForEdgeLabels`,()=>D(e)),t(` removeSelfEdges`,()=>ee(e)),t(` acyclic`,()=>n.run(e)),t(` nestingGraph.run`,()=>c.run(e)),t(` rank`,()=>i(p.asNonCompoundGraph(e))),t(` injectEdgeLabelProxies`,()=>O(e)),t(` removeEmptyRanks`,()=>s(e)),t(` nestingGraph.cleanup`,()=>c.cleanup(e)),t(` normalizeRanks`,()=>a(e)),t(` assignRankMinMax`,()=>k(e)),t(` removeEdgeLabelProxies`,()=>A(e)),t(` normalize.run`,()=>r.run(e)),t(` parentDummyChains`,()=>o(e)),t(` addBorderSegments`,()=>l(e)),t(` order`,()=>d(e,m)),t(` insertSelfEdges`,()=>te(e)),t(` adjustCoordinateSystem`,()=>u.adjust(e)),t(` position`,()=>f(e)),t(` positionSelfEdges`,()=>I(e)),t(` removeBorderNodes`,()=>F(e)),t(` normalize.undo`,()=>r.undo(e)),t(` fixupEdgeLabelCoords`,()=>N(e)),t(` undoCoordinateSystem`,()=>u.undo(e)),t(` translateGraph`,()=>j(e)),t(` assignNodeIntersects`,()=>M(e)),t(` reversePoints`,()=>P(e)),t(` acyclic.undo`,()=>n.undo(e))}function _(e,t){e.nodes().forEach(n=>{let r=e.node(n),i=t.node(n);r&&(r.x=i.x,r.y=i.y,r.rank=i.rank,t.children(n).length&&(r.width=i.width,r.height=i.height))}),e.edges().forEach(n=>{let r=e.edge(n),i=t.edge(n);r.points=i.points,Object.hasOwn(i,`x`)&&(r.x=i.x,r.y=i.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}var v=[`nodesep`,`edgesep`,`ranksep`,`marginx`,`marginy`],y={ranksep:50,edgesep:20,nodesep:50,rankdir:`tb`},b=[`acyclicer`,`ranker`,`rankdir`,`align`],x=[`width`,`height`,`rank`],S={width:0,height:0},C=[`minlen`,`weight`,`width`,`height`,`labeloffset`],w={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:`r`},T=[`labelpos`];function E(e){let t=new m({multigraph:!0,compound:!0}),n=R(e.graph());return t.setGraph(Object.assign({},y,L(n,v),p.pick(n,b))),e.nodes().forEach(n=>{let r=L(R(e.node(n)),x);Object.keys(S).forEach(e=>{r[e]===void 0&&(r[e]=S[e])}),t.setNode(n,r),t.setParent(n,e.parent(n))}),e.edges().forEach(n=>{let r=R(e.edge(n));t.setEdge(n,Object.assign({},w,L(r,C),p.pick(r,T)))}),t}function D(e){let t=e.graph();t.ranksep/=2,e.edges().forEach(n=>{let r=e.edge(n);r.minlen*=2,r.labelpos.toLowerCase()!==`c`&&(t.rankdir===`TB`||t.rankdir===`BT`?r.width+=r.labeloffset:r.height+=r.labeloffset)})}function O(e){e.edges().forEach(t=>{let n=e.edge(t);if(n.width&&n.height){let n=e.node(t.v),r={rank:(e.node(t.w).rank-n.rank)/2+n.rank,e:t};p.addDummyNode(e,`edge-proxy`,r,`_ep`)}})}function k(e){let t=0;e.nodes().forEach(n=>{let r=e.node(n);r.borderTop&&(r.minRank=e.node(r.borderTop).rank,r.maxRank=e.node(r.borderBottom).rank,t=Math.max(t,r.maxRank))}),e.graph().maxRank=t}function A(e){e.nodes().forEach(t=>{let n=e.node(t);n.dummy===`edge-proxy`&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))})}function j(e){let t=1/0,n=0,r=1/0,i=0,a=e.graph(),o=a.marginx||0,s=a.marginy||0;function c(e){let a=e.x,o=e.y,s=e.width,c=e.height;t=Math.min(t,a-s/2),n=Math.max(n,a+s/2),r=Math.min(r,o-c/2),i=Math.max(i,o+c/2)}e.nodes().forEach(t=>c(e.node(t))),e.edges().forEach(t=>{let n=e.edge(t);Object.hasOwn(n,`x`)&&c(n)}),t-=o,r-=s,e.nodes().forEach(n=>{let i=e.node(n);i.x-=t,i.y-=r}),e.edges().forEach(n=>{let i=e.edge(n);i.points.forEach(e=>{e.x-=t,e.y-=r}),Object.hasOwn(i,`x`)&&(i.x-=t),Object.hasOwn(i,`y`)&&(i.y-=r)}),a.width=n-t+o,a.height=i-r+s}function M(e){e.edges().forEach(t=>{let n=e.edge(t),r=e.node(t.v),i=e.node(t.w),a,o;n.points?(a=n.points[0],o=n.points[n.points.length-1]):(n.points=[],a=i,o=r),n.points.unshift(p.intersectRect(r,a)),n.points.push(p.intersectRect(i,o))})}function N(e){e.edges().forEach(t=>{let n=e.edge(t);if(Object.hasOwn(n,`x`))switch((n.labelpos===`l`||n.labelpos===`r`)&&(n.width-=n.labeloffset),n.labelpos){case`l`:n.x-=n.width/2+n.labeloffset;break;case`r`:n.x+=n.width/2+n.labeloffset;break}})}function P(e){e.edges().forEach(t=>{let n=e.edge(t);n.reversed&&n.points.reverse()})}function F(e){e.nodes().forEach(t=>{if(e.children(t).length){let n=e.node(t),r=e.node(n.borderTop),i=e.node(n.borderBottom),a=e.node(n.borderLeft[n.borderLeft.length-1]),o=e.node(n.borderRight[n.borderRight.length-1]);n.width=Math.abs(o.x-a.x),n.height=Math.abs(i.y-r.y),n.x=a.x+n.width/2,n.y=r.y+n.height/2}}),e.nodes().forEach(t=>{e.node(t).dummy===`border`&&e.removeNode(t)})}function ee(e){e.edges().forEach(t=>{if(t.v===t.w){var n=e.node(t.v);n.selfEdges||=[],n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function te(e){p.buildLayerMatrix(e).forEach(t=>{var n=0;t.forEach((t,r)=>{var i=e.node(t);i.order=r+n,(i.selfEdges||[]).forEach(t=>{p.addDummyNode(e,`selfedge`,{width:t.label.width,height:t.label.height,rank:i.rank,order:r+ ++n,e:t.e,label:t.label},`_se`)}),delete i.selfEdges})})}function I(e){e.nodes().forEach(t=>{var n=e.node(t);if(n.dummy===`selfedge`){var r=e.node(n.e.v),i=r.x+r.width/2,a=r.y,o=n.x-i,s=r.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:i+2*o/3,y:a-s},{x:i+5*o/6,y:a-s},{x:i+o,y:a},{x:i+5*o/6,y:a+s},{x:i+2*o/3,y:a+s}],n.label.x=n.x,n.label.y=n.y}})}function L(e,t){return p.mapValues(p.pick(e,t),Number)}function R(e){var t={};return e&&Object.entries(e).forEach(([e,n])=>{typeof e==`string`&&(e=e.toLowerCase()),t[e]=n}),t}})),Xd=o(((e,t)=>{var n=Dd(),r=wd().Graph;t.exports={debugOrdering:i};function i(e){let t=n.buildLayerMatrix(e),i=new r({compound:!0,multigraph:!0}).setGraph({});return e.nodes().forEach(t=>{i.setNode(t,{label:t}),i.setParent(t,`layer`+e.node(t).rank)}),e.edges().forEach(e=>i.setEdge(e.v,e.w,{},e.name)),t.forEach((e,t)=>{let n=`layer`+t;i.setNode(n,{rank:`same`}),e.reduce((e,t)=>(i.setEdge(e,t,{style:`invis`}),t))}),i}})),Zd=o(((e,t)=>{t.exports=`1.1.8`})),Qd=c(o(((e,t)=>{t.exports={graphlib:wd(),layout:Yd(),debug:Xd(),util:{time:Dd().time,notime:Dd().notime},version:Zd()}}))()),$d=({nodes:e,edges:t})=>{let n=new Qd.default.graphlib.Graph;n.setDefaultEdgeLabel(()=>({})),n.setGraph({rankdir:`TB`,nodesep:60,ranksep:100});for(let t of e)n.setNode(t.id,{width:172,height:36});for(let e of t)n.hasNode(e.source)&&n.hasNode(e.target)&&n.setEdge(e.source,e.target);return Qd.default.layout(n),{nodes:e.map(e=>{let t=n.node(e.id);return{...Ku(e),position:{x:t.x-172/2,y:t.y-36/2}}}),edges:t.map(qu)}},ef=({nodes:e,edges:t},n)=>{let r=n?.mindmapDirection??`LR`,i=new Qd.default.graphlib.Graph;i.setDefaultEdgeLabel(()=>({})),i.setGraph({rankdir:r,nodesep:40,ranksep:160});for(let t of e)i.setNode(t.id,{width:172,height:36});for(let e of t)i.hasNode(e.source)&&i.hasNode(e.target)&&i.setEdge(e.source,e.target);return Qd.default.layout(i),{nodes:e.map(e=>{let t=i.node(e.id);return{...Ku(e),position:{x:t.x-172/2,y:t.y-36/2}}}),edges:t.map(qu)}},tf=({nodes:e,edges:t})=>{let n=e.map(e=>({id:e.id,omniNode:e})),r=new Map(n.map(e=>[e.id,e])),i=t.filter(e=>r.has(e.source)&&r.has(e.target)).map(e=>({source:e.source,target:e.target})),a=Hu(n).force(`link`,Nu(i).id(e=>e.id).distance(150)).force(`charge`,Uu().strength(-300)).force(`center`,ru(0,0)).force(`collide`,Au(70)).stop(),o=Math.min(300,Math.max(150,e.length));for(let e=0;e<o;e++)a.tick();return{nodes:n.map(e=>({...Ku(e.omniNode),position:{x:e.x??0,y:e.y??0}})),edges:t.map(qu)}},nf=8,rf=200,af=150,of=({nodes:e,edges:t})=>({nodes:e.map((e,t)=>({...Ku(e),position:{x:t%nf*rf,y:Math.floor(t/nf)*af}})),edges:t.map(qu)}),sf=[{key:`directory`,label:`Group by Directory`},{key:`hierarchical`,label:`Hierarchical`},{key:`mindmap`,label:`Mind Map`},{key:`force`,label:`Force-Directed`},{key:`grid`,label:`Grid`}],cf={directory:ad,hierarchical:$d,mindmap:ef,force:tf,grid:of};function lf(e,t,n){return cf[e](t,n)}var uf=o((e=>{var t=d(),n=Symbol.for(`react.element`),r=Symbol.for(`react.fragment`),i=Object.prototype.hasOwnProperty,a=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,r){var s,c={},l=null,u=null;for(s in r!==void 0&&(l=``+r),t.key!==void 0&&(l=``+t.key),t.ref!==void 0&&(u=t.ref),t)i.call(t,s)&&!o.hasOwnProperty(s)&&(c[s]=t[s]);if(e&&e.defaultProps)for(s in t=e.defaultProps,t)c[s]===void 0&&(c[s]=t[s]);return{$$typeof:n,type:e,key:l,ref:u,props:c,_owner:a.current}}e.Fragment=r,e.jsx=s,e.jsxs=s})),$=o(((e,t)=>{t.exports=uf()}))();function df(e){return{ts:`typescript`,tsx:`typescript`,js:`javascript`,jsx:`javascript`,py:`python`,php:`php`}[e.split(`.`).pop()?.toLowerCase()??``]??`text`}var ff={typescript:new Set(`import.export.from.const.let.var.function.class.interface.type.extends.implements.return.if.else.for.while.async.await.new.this.super.static.public.private.protected.readonly.abstract.enum.namespace.module.declare.default.switch.case.break.try.catch.throw.finally.typeof.instanceof.void.null.undefined.true.false.in.of.as`.split(`.`)),javascript:new Set(`import.export.from.const.let.var.function.class.extends.return.if.else.for.while.async.await.new.this.super.static.default.switch.case.break.try.catch.throw.finally.typeof.instanceof.void.null.undefined.true.false.in.of.yield`.split(`.`)),python:new Set(`import.from.def.class.return.if.elif.else.for.while.with.as.try.except.finally.raise.pass.break.continue.and.or.not.in.is.None.True.False.lambda.yield.async.await.self.global.nonlocal.del.assert`.split(`.`)),php:new Set(`use.namespace.class.function.public.private.protected.static.abstract.interface.extends.implements.return.if.else.elseif.for.foreach.while.switch.case.break.try.catch.throw.finally.new.echo.require.require_once.include.include_once.null.true.false.array.const.var.as.trait`.split(`.`))};function pf(e,t){let n=ff[t]??new Set,r=[],i=0;for(;i<e.length;){if(t!==`python`&&e.startsWith(`//`,i)||t===`python`&&e[i]===`#`||t===`php`&&e.startsWith(`//`,i)){r.push((0,$.jsx)(`span`,{style:{color:`#6a737d`},children:e.slice(i)},i));break}if(e[i]===`"`||e[i]===`'`||e[i]==="`"){let t=e[i],n=i+1;for(;n<e.length&&e[n]!==t;)e[n]===`\\`&&n++,n++;n++,r.push((0,$.jsx)(`span`,{style:{color:`#9ecbff`},children:e.slice(i,n)},i)),i=n;continue}if(e[i]===`@`){let t=i+1;for(;t<e.length&&/[\w.]/.test(e[t]);)t++;r.push((0,$.jsx)(`span`,{style:{color:`#b392f0`},children:e.slice(i,t)},i)),i=t;continue}if(/[a-zA-Z_$]/.test(e[i])){let t=i+1;for(;t<e.length&&/[\w$]/.test(e[t]);)t++;let a=e.slice(i,t);n.has(a)?r.push((0,$.jsx)(`span`,{style:{color:`#ff7b72`},children:a},i)):r.push((0,$.jsx)(`span`,{children:a},i)),i=t;continue}if(/\d/.test(e[i])){let t=i+1;for(;t<e.length&&/[\d.xXa-fA-F]/.test(e[t]);)t++;r.push((0,$.jsx)(`span`,{style:{color:`#79c0ff`},children:e.slice(i,t)},i)),i=t;continue}r.push((0,$.jsx)(`span`,{children:e[i]},i)),i++}return r}function mf({filePath:e}){let[t,n]=(0,w.useState)(null),[r,i]=(0,w.useState)(null),[a,o]=(0,w.useState)(!1),[s,c]=(0,w.useState)(!1),l=(0,w.useRef)(null);if((0,w.useEffect)(()=>{n(null),i(null),o(!0),c(!1),fetch(`/api/file?path=${encodeURIComponent(e)}`).then(e=>e.ok?e.json():e.json().then(t=>{throw Error(t.error??`HTTP ${e.status}`)})).then(e=>{n(e.content),o(!1)}).catch(e=>{i(String(e instanceof Error?e.message:e)),o(!1)})},[e]),a)return(0,$.jsx)(`div`,{style:{padding:`8px 0`,fontSize:11,color:`#666`},children:`Loading source...`});if(r)return(0,$.jsx)(`div`,{style:{padding:`8px 0`,fontSize:11,color:`#e8534a`},children:r});if(!t)return null;let u=df(e),d=t.split(`
|
|
10
|
+
`),f=String(d.length).length;return(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:4},children:[(0,$.jsxs)(`p`,{style:{fontSize:11,color:`#666`,marginBottom:0,textTransform:`uppercase`,letterSpacing:`0.5px`,margin:0},children:[`Source (`,d.length,` lines)`]}),(0,$.jsx)(`button`,{onClick:()=>c(!s),style:{background:`none`,border:`none`,color:`#666`,cursor:`pointer`,fontSize:10,padding:`2px 4px`},children:s?`Expand`:`Collapse`})]}),!s&&(0,$.jsx)(`div`,{ref:l,style:{background:`#0a0a1a`,border:`1px solid #333`,borderRadius:4,maxHeight:320,overflowY:`auto`,overflowX:`auto`,fontSize:11,fontFamily:`'Consolas', 'Monaco', 'Courier New', monospace`,lineHeight:1.5},children:(0,$.jsx)(`table`,{style:{borderCollapse:`collapse`,width:`100%`,minWidth:`max-content`},children:(0,$.jsx)(`tbody`,{children:d.map((e,t)=>(0,$.jsxs)(`tr`,{children:[(0,$.jsx)(`td`,{style:{color:`#444`,textAlign:`right`,paddingRight:8,paddingLeft:8,userSelect:`none`,width:f*8+16,borderRight:`1px solid #222`,verticalAlign:`top`},children:t+1}),(0,$.jsx)(`td`,{style:{paddingLeft:8,paddingRight:8,color:`#c9d1d9`,whiteSpace:`pre`},children:pf(e,u)})]},t))})})})]})}var hf={display:`flex`,gap:4,marginBottom:4,alignItems:`center`},gf={flex:1,background:`#1a1a2e`,color:`#e0e0e0`,border:`1px solid #444`,borderRadius:3,padding:`3px 6px`,fontSize:11,outline:`none`,minWidth:0},_f={background:`none`,border:`none`,color:`#e8534a`,cursor:`pointer`,fontSize:14,padding:`0 2px`,lineHeight:1,flexShrink:0};function vf({entries:e,onSet:t,onRemove:n,keyPlaceholder:r=`Key`,valuePlaceholder:i=`Value`}){let[a,o]=(0,w.useState)(``),[s,c]=(0,w.useState)(``),l=Object.entries(e),u=()=>{a.trim()&&(t(a.trim(),s),o(``),c(``))},d=e=>{e.key===`Enter`&&u()};return(0,$.jsxs)(`div`,{children:[l.map(([e,r])=>(0,$.jsxs)(`div`,{style:hf,children:[(0,$.jsx)(`input`,{style:{...gf,fontWeight:600},value:e,readOnly:!0,title:e}),(0,$.jsx)(`input`,{style:gf,value:r,onChange:n=>t(e,n.target.value),title:r}),(0,$.jsx)(`button`,{style:_f,onClick:()=>n(e),title:`Remove`,children:`×`})]},e)),(0,$.jsxs)(`div`,{style:hf,children:[(0,$.jsx)(`input`,{style:gf,value:a,onChange:e=>o(e.target.value),onKeyDown:d,placeholder:r}),(0,$.jsx)(`input`,{style:gf,value:s,onChange:e=>c(e.target.value),onKeyDown:d,placeholder:i}),(0,$.jsx)(`button`,{style:{..._f,color:`#7ed321`,fontSize:16},onClick:u,title:`Add`,children:`+`})]})]})}var yf=[`GET`,`POST`,`PUT`,`PATCH`,`DELETE`,`HEAD`,`OPTIONS`],bf={GET:`#7ed321`,POST:`#f5a623`,PUT:`#4a90e8`,PATCH:`#9b59b6`,DELETE:`#e8534a`,HEAD:`#888`,OPTIONS:`#888`},xf={fontSize:11,color:`#666`,marginBottom:4,textTransform:`uppercase`,letterSpacing:`0.5px`},Sf={width:`100%`,background:`#1a1a2e`,color:`#e0e0e0`,border:`1px solid #444`,borderRadius:4,padding:`6px 8px`,fontSize:12,outline:`none`,boxSizing:`border-box`},Cf={background:`none`,border:`none`,color:`#888`,cursor:`pointer`,fontSize:11,padding:0,textTransform:`uppercase`,letterSpacing:`0.5px`,display:`flex`,alignItems:`center`,gap:4,width:`100%`,textAlign:`left`};function wf({code:e}){let t=`#888`;return e>=200&&e<300?t=`#7ed321`:e>=300&&e<400?t=`#f5a623`:e>=400&&(t=`#e8534a`),(0,$.jsx)(`span`,{style:{background:t,color:`#fff`,borderRadius:4,padding:`2px 8px`,fontSize:12,fontWeight:700,fontFamily:`monospace`},children:e})}function Tf(e){try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}function Ef({request:e,response:t,loading:n,error:r,onMethodChange:i,onUrlChange:a,onSetHeader:o,onRemoveHeader:s,onSetQueryParam:c,onRemoveQueryParam:l,onBodyChange:u,onSend:d,onReset:f}){let[p,m]=(0,w.useState)(!0),[h,g]=(0,w.useState)(!1),[_,v]=(0,w.useState)(!1),[y,b]=(0,w.useState)(!1),x=bf[e.method]??`#888`;return(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:10},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:6},children:[(0,$.jsx)(`select`,{value:e.method,onChange:e=>i(e.target.value),style:{...Sf,width:90,fontWeight:700,color:x,cursor:`pointer`},children:yf.map(e=>(0,$.jsx)(`option`,{value:e,children:e},e))}),(0,$.jsx)(`input`,{value:e.url,onChange:e=>a(e.target.value),placeholder:`/api/endpoint`,style:{...Sf,flex:1},onKeyDown:e=>{e.key===`Enter`&&d()}})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`button`,{style:Cf,onClick:()=>m(!p),children:[(0,$.jsx)(`span`,{style:{fontSize:8},children:p?`▼`:`▶`}),`Headers (`,Object.keys(e.headers).length,`)`]}),p&&(0,$.jsx)(`div`,{style:{marginTop:4},children:(0,$.jsx)(vf,{entries:e.headers,onSet:o,onRemove:s,keyPlaceholder:`Header name`,valuePlaceholder:`Value`})})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`button`,{style:Cf,onClick:()=>g(!h),children:[(0,$.jsx)(`span`,{style:{fontSize:8},children:h?`▼`:`▶`}),`Query Params (`,Object.keys(e.queryParams).length,`)`]}),h&&(0,$.jsx)(`div`,{style:{marginTop:4},children:(0,$.jsx)(vf,{entries:e.queryParams,onSet:c,onRemove:l,keyPlaceholder:`Param name`,valuePlaceholder:`Value`})})]}),e.method!==`GET`&&e.method!==`HEAD`&&(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`button`,{style:Cf,onClick:()=>v(!_),children:[(0,$.jsx)(`span`,{style:{fontSize:8},children:_?`▼`:`▶`}),`Request Body`]}),_&&(0,$.jsx)(`textarea`,{value:e.body??``,onChange:e=>u(e.target.value||null),placeholder:`{"key": "value"}`,style:{...Sf,marginTop:4,minHeight:80,resize:`vertical`,fontFamily:`'Consolas', 'Monaco', monospace`,fontSize:11,lineHeight:1.5}})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:6},children:[(0,$.jsx)(`button`,{onClick:d,disabled:n||!e.url,style:{flex:1,background:n?`#555`:x,color:`#fff`,border:`none`,borderRadius:4,padding:`7px 0`,fontSize:12,fontWeight:700,cursor:n?`wait`:`pointer`,transition:`background 0.15s`},children:n?`Sending...`:`Send`}),(0,$.jsx)(`button`,{onClick:f,style:{background:`#1a1a2e`,color:`#888`,border:`1px solid #444`,borderRadius:4,padding:`7px 12px`,fontSize:11,cursor:`pointer`},children:`Reset`})]}),r&&(0,$.jsx)(`div`,{style:{color:`#e8534a`,fontSize:11,padding:`4px 0`},children:r}),t&&(0,$.jsxs)(`div`,{style:{borderTop:`1px solid #333`,paddingTop:10,display:`flex`,flexDirection:`column`,gap:8},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(wf,{code:t.statusCode}),(0,$.jsx)(`span`,{style:{fontSize:11,color:`#888`},children:t.statusText}),(0,$.jsxs)(`span`,{style:{fontSize:11,color:`#666`,marginLeft:`auto`},children:[t.duration,`ms`]})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`button`,{style:Cf,onClick:()=>b(!y),children:[(0,$.jsx)(`span`,{style:{fontSize:8},children:y?`▼`:`▶`}),`Response Headers (`,Object.keys(t.headers).length,`)`]}),y&&(0,$.jsx)(`div`,{style:{marginTop:4},children:Object.entries(t.headers).map(([e,t])=>(0,$.jsxs)(`div`,{style:{fontSize:10,color:`#aaa`,fontFamily:`monospace`,marginBottom:2},children:[(0,$.jsx)(`span`,{style:{color:`#4a90e8`},children:e}),`: `,t]},e))})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`p`,{style:xf,children:`Response Body`}),(0,$.jsx)(`pre`,{style:{background:`#0a0a1a`,border:`1px solid #333`,borderRadius:4,padding:8,maxHeight:250,overflow:`auto`,fontSize:11,fontFamily:`'Consolas', 'Monaco', monospace`,color:`#c9d1d9`,lineHeight:1.5,margin:0,whiteSpace:`pre-wrap`,wordBreak:`break-word`},children:Tf(t.body)})]})]})]})}var Df={caller:`📄`,"http-call":`🌐`,"route-handler":`🎯`,dependency:`🔗`},Of={caller:`#4a90e8`,"http-call":`#ff9800`,"route-handler":`#7ed321`,dependency:`#9b59b6`};function kf({trace:e,currentStepIndex:t,onStepForward:n,onStepBackward:r,onGoToStep:i,onStop:a,onOpenInApiClient:o}){let s={flex:1,background:`#1a1a2e`,color:`#e0e0e0`,border:`1px solid #444`,borderRadius:4,padding:`6px 0`,fontSize:11,fontWeight:600,cursor:`pointer`};return(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:10},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,$.jsx)(`h3`,{style:{fontSize:13,color:`#fff`,margin:0},children:`Flow Trace`}),(0,$.jsx)(`button`,{onClick:a,style:{background:`none`,border:`none`,color:`#888`,cursor:`pointer`,fontSize:16,padding:0,lineHeight:1},children:`×`})]}),(0,$.jsx)(`div`,{style:{background:`#1a1a2e`,border:`1px solid #ff9800`,borderRadius:4,padding:`6px 10px`,fontSize:11,color:`#ff9800`,fontWeight:600},children:e.steps.find(e=>e.type===`http-call`)?.description??e.edgeId}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:6,alignItems:`center`},children:[(0,$.jsxs)(`button`,{style:{...s,opacity:t===0?.4:1,cursor:t===0?`default`:`pointer`},onClick:r,disabled:t===0,children:[`◀`,` Back`]}),(0,$.jsxs)(`span`,{style:{fontSize:11,color:`#888`,flexShrink:0,textAlign:`center`,minWidth:60},children:[t+1,` / `,e.steps.length]}),(0,$.jsxs)(`button`,{style:{...s,opacity:t>=e.steps.length-1?.4:1,cursor:t>=e.steps.length-1?`default`:`pointer`},onClick:n,disabled:t>=e.steps.length-1,children:[`Next `,`▶`]})]}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:0},children:e.steps.map((n,r)=>{let a=r===t,o=Of[n.type],s=Df[n.type];return(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{onClick:()=>i(r),style:{display:`flex`,alignItems:`flex-start`,gap:8,padding:`8px 10px`,borderRadius:4,background:a?`${o}15`:`transparent`,border:a?`1px solid ${o}`:`1px solid transparent`,cursor:`pointer`,transition:`all 0.15s`},children:[(0,$.jsx)(`div`,{style:{width:24,height:24,borderRadius:`50%`,background:a?o:`#222`,border:`2px solid ${o}`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:12,flexShrink:0},children:s}),(0,$.jsxs)(`div`,{style:{flex:1,minWidth:0},children:[(0,$.jsx)(`div`,{style:{fontSize:12,color:a?`#fff`:`#ccc`,fontWeight:a?700:400},children:n.label}),(0,$.jsx)(`div`,{style:{fontSize:10,color:a?o:`#666`,marginTop:2},children:n.description}),(0,$.jsx)(`div`,{style:{fontSize:9,color:`#555`,marginTop:2,textTransform:`uppercase`,letterSpacing:`0.5px`},children:n.type.replace(`-`,` `)})]})]}),r<e.steps.length-1&&(0,$.jsx)(`div`,{style:{width:2,height:12,background:`#333`,marginLeft:21}})]},r)})}),(0,$.jsx)(`div`,{style:{borderTop:`1px solid #333`,paddingTop:8,display:`flex`,gap:6},children:(0,$.jsx)(`button`,{onClick:o,style:{flex:1,background:`#ff9800`,color:`#fff`,border:`none`,borderRadius:4,padding:`6px 0`,fontSize:11,fontWeight:600,cursor:`pointer`},children:`Open in API Client`})})]})}var Af={marginBottom:16},jf={display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:8},Mf={fontSize:11,color:`#999`,textTransform:`uppercase`,letterSpacing:`0.5px`,fontWeight:700},Nf={background:`none`,border:`1px solid #444`,color:`#888`,fontSize:9,padding:`2px 8px`,borderRadius:3,cursor:`pointer`,transition:`all 0.15s`},Pf={display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`5px 0`},Ff={fontSize:12,color:`#ccc`},If={height:1,background:`#333`,margin:`12px 0`},Lf={background:`#1a1a2e`,color:`#e0e0e0`,border:`1px solid #444`,borderRadius:4,padding:`3px 6px`,fontSize:11,cursor:`pointer`,outline:`none`};function Rf({checked:e,onChange:t}){return(0,$.jsx)(`button`,{onClick:()=>t(!e),style:{width:34,height:18,borderRadius:9,border:`none`,background:e?`#4a90e8`:`#444`,position:`relative`,cursor:`pointer`,transition:`background 0.2s`,flexShrink:0},children:(0,$.jsx)(`span`,{style:{position:`absolute`,top:2,left:e?18:2,width:14,height:14,borderRadius:`50%`,background:`#fff`,transition:`left 0.2s`}})})}function zf({color:e,onChange:t}){let[n,r]=(0,w.useState)(!1),i=(0,w.useRef)(null);return(0,w.useEffect)(()=>{if(!n)return;let e=e=>{i.current&&!i.current.contains(e.target)&&r(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[n]),(0,$.jsxs)(`div`,{ref:i,style:{position:`relative`,display:`inline-flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`button`,{onClick:()=>r(!n),style:{width:22,height:22,borderRadius:4,border:`2px solid #555`,background:e,cursor:`pointer`,padding:0,transition:`border-color 0.15s`},title:e}),(0,$.jsx)(`span`,{style:{fontSize:10,color:`#888`,fontFamily:`monospace`},children:e}),n&&(0,$.jsxs)(`div`,{style:{position:`absolute`,top:28,right:0,zIndex:100,background:`#1a1a2e`,border:`1px solid #444`,borderRadius:6,padding:8,boxShadow:`0 4px 16px rgba(0,0,0,0.5)`},children:[(0,$.jsx)(`input`,{type:`color`,value:e,onChange:e=>t(e.target.value),style:{width:120,height:80,border:`none`,background:`none`,cursor:`pointer`,padding:0}}),(0,$.jsx)(`input`,{type:`text`,value:e,onChange:e=>{/^#[0-9a-f]{0,6}$/i.test(e.target.value)&&t(e.target.value)},style:{...Lf,width:`100%`,marginTop:4,fontFamily:`monospace`,fontSize:11,textAlign:`center`},maxLength:7})]})]})}function Bf({value:e,onChange:t,min:n,max:r,suffix:i}){return(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[(0,$.jsx)(`input`,{type:`range`,min:n,max:r,value:e,onChange:e=>t(Number(e.target.value)),style:{width:60,accentColor:`#4a90e8`,cursor:`pointer`}}),(0,$.jsxs)(`span`,{style:{fontSize:10,color:`#e0e0e0`,fontWeight:600,minWidth:24,textAlign:`right`},children:[e,i??``]})]})}function Vf({title:e,onReset:t}){return(0,$.jsxs)(`div`,{style:jf,children:[(0,$.jsx)(`span`,{style:Mf,children:e}),(0,$.jsx)(`button`,{onClick:t,style:Nf,onMouseEnter:e=>{e.currentTarget.style.borderColor=`#e8534a`,e.currentTarget.style.color=`#e8534a`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`#444`,e.currentTarget.style.color=`#888`},children:`Reset`})]})}function Hf({label:e,children:t}){return(0,$.jsxs)(`div`,{style:Pf,children:[(0,$.jsx)(`span`,{style:Ff,children:e}),t]})}function Uf({settings:e,onUpdateEdgeLabels:t,onUpdateGraph:n,onUpdateSearch:r,onResetEdgeLabels:i,onResetGraph:a,onResetSearch:o,onResetAll:s}){let{edgeLabels:c,graph:l,search:u}=e;return(0,$.jsxs)(`div`,{style:{padding:`12px 16px`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:12},children:[(0,$.jsx)(`h3`,{style:{fontSize:14,color:`#fff`,margin:0,fontWeight:700},children:`Settings`}),(0,$.jsx)(`button`,{onClick:s,style:{...Nf,fontSize:10,padding:`3px 10px`},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#e8534a`,e.currentTarget.style.color=`#e8534a`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`#444`,e.currentTarget.style.color=`#888`},children:`Reset All`})]}),(0,$.jsxs)(`div`,{style:Af,children:[(0,$.jsx)(Vf,{title:`Connection Labels`,onReset:i}),(0,$.jsx)(Hf,{label:`Show "imports"`,children:(0,$.jsx)(Rf,{checked:c.showImportLabels,onChange:e=>t({showImportLabels:e})})}),(0,$.jsx)(Hf,{label:`Show "links to"`,children:(0,$.jsx)(Rf,{checked:c.showLinksToLabels,onChange:e=>t({showLinksToLabels:e})})}),(0,$.jsx)(Hf,{label:`Show "embeds"`,children:(0,$.jsx)(Rf,{checked:c.showEmbedsLabels,onChange:e=>t({showEmbedsLabels:e})})}),(0,$.jsx)(Hf,{label:`Show HTTP methods`,children:(0,$.jsx)(Rf,{checked:c.showHttpLabels,onChange:e=>t({showHttpLabels:e})})}),(0,$.jsx)(`div`,{style:{height:4}}),(0,$.jsx)(Hf,{label:`Label color`,children:(0,$.jsx)(zf,{color:c.labelColor,onChange:e=>t({labelColor:e})})}),(0,$.jsx)(Hf,{label:`Label font size`,children:(0,$.jsx)(Bf,{value:c.labelFontSize,onChange:e=>t({labelFontSize:e}),min:6,max:16,suffix:`px`})})]}),(0,$.jsx)(`div`,{style:If}),(0,$.jsxs)(`div`,{style:Af,children:[(0,$.jsx)(Vf,{title:`Graph`,onReset:a}),(0,$.jsx)(Hf,{label:`Animate transitions`,children:(0,$.jsx)(Rf,{checked:l.animateTransitions,onChange:e=>n({animateTransitions:e})})}),(0,$.jsx)(Hf,{label:`Show minimap`,children:(0,$.jsx)(Rf,{checked:l.minimapVisible,onChange:e=>n({minimapVisible:e})})})]}),(0,$.jsx)(`div`,{style:If}),(0,$.jsxs)(`div`,{style:Af,children:[(0,$.jsx)(Vf,{title:`Search & Filter`,onReset:o}),(0,$.jsx)(Hf,{label:`Default filter mode`,children:(0,$.jsxs)(`select`,{value:u.defaultFilterMode,onChange:e=>r({defaultFilterMode:e.target.value}),style:Lf,children:[(0,$.jsx)(`option`,{value:`hide`,children:`Hide`}),(0,$.jsx)(`option`,{value:`dim`,children:`Dim`})]})}),(0,$.jsx)(Hf,{label:`Default depth`,children:(0,$.jsx)(Bf,{value:u.defaultDepth,onChange:e=>r({defaultDepth:e}),min:0,max:5})})]})]})}var Wf={"nestjs-controller":`Controller`,"nestjs-injectable":`Injectable`,"nestjs-module":`Module`,"typescript-file":`TypeScript`,"javascript-file":`JavaScript`,"nextjs-api-route":`Next.js API`,"nextjs-page":`Next.js Page`,"nextjs-layout":`Next.js Layout`,"markdown-file":`Markdown`,"markdown-moc":`Map of Content`,"markdown-daily":`Daily Note`,"markdown-readme":`README`,"python-file":`Python`,"python-fastapi-route":`FastAPI Route`,"python-django-view":`Django View`,"python-django-model":`Django Model`,"php-file":`PHP`,"php-laravel-controller":`Laravel Controller`,"php-laravel-model":`Laravel Model`,"php-laravel-middleware":`Laravel Middleware`,"php-laravel-route":`Laravel Route`},Gf={width:`100%`,background:`#1a1a2e`,color:`#e0e0e0`,border:`1px solid #444`,borderRadius:4,padding:`4px 8px`,fontSize:12,cursor:`pointer`,outline:`none`},Kf={fontSize:11,color:`#666`,marginBottom:4,textTransform:`uppercase`,letterSpacing:`0.5px`},qf={display:`inline-flex`,alignItems:`center`,gap:4,padding:`3px 8px`,borderRadius:4,fontSize:11,fontWeight:600,cursor:`pointer`,border:`1px solid transparent`,userSelect:`none`,transition:`opacity 0.15s`},Jf={height:1,background:`#333`,margin:`4px 0`},Yf={flex:1,background:`#1a1a2e`,color:`#e0e0e0`,border:`1px solid #444`,borderRadius:4,padding:`5px 0`,fontSize:11,cursor:`pointer`,transition:`background 0.15s`};function Xf({activeTab:e,onTabChange:t,hasTrace:n}){return(0,$.jsx)(`div`,{style:{display:`flex`,borderBottom:`1px solid #333`,flexShrink:0},children:[{key:`controls`,label:`Graph`,icon:`📊`,show:!0},{key:`api-client`,label:`API`,icon:`📡`,show:!0},{key:`flow-tracer`,label:`Trace`,icon:`🔍`,show:n},{key:`settings`,label:`Settings`,icon:`⚙`,show:!0}].filter(e=>e.show).map(n=>(0,$.jsxs)(`button`,{onClick:()=>t(n.key),style:{flex:1,background:e===n.key?`#1a1a2e`:`transparent`,color:e===n.key?`#fff`:`#666`,border:`none`,borderBottom:e===n.key?`2px solid #4a90e8`:`2px solid transparent`,padding:`8px 4px`,fontSize:11,fontWeight:e===n.key?700:400,cursor:`pointer`,transition:`all 0.15s`},children:[n.icon,` `,n.label]},n.key))})}function Zf({onExportPng:e,onExportSvg:t,onExportJson:n,onExportGif:r}){let[i,a]=(0,w.useState)(!1),o=(0,w.useRef)(null);(0,w.useEffect)(()=>{if(!i)return;let e=e=>{o.current&&!o.current.contains(e.target)&&a(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[i]);let s=[{label:`PNG`,desc:`Static image`,onClick:e},{label:`SVG`,desc:`Vector image`,onClick:t},{label:`GIF`,desc:`3s animation`,onClick:r},{label:`JSON`,desc:`Graph data`,onClick:n}];return(0,$.jsxs)(`div`,{ref:o,style:{position:`relative`,flex:1},children:[(0,$.jsxs)(`button`,{onClick:()=>a(e=>!e),style:{...Yf,width:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,gap:4},children:[`Export`,(0,$.jsx)(`span`,{style:{fontSize:8,marginTop:1},children:i?`▲`:`▼`})]}),i&&(0,$.jsx)(`div`,{style:{position:`absolute`,bottom:`100%`,left:0,right:0,marginBottom:4,background:`#1a1a2e`,border:`1px solid #444`,borderRadius:4,overflow:`hidden`,zIndex:20,boxShadow:`0 -4px 12px rgba(0,0,0,0.4)`},children:s.map(e=>(0,$.jsxs)(`button`,{onClick:()=>{e.onClick(),a(!1)},style:{display:`block`,width:`100%`,background:`transparent`,color:`#e0e0e0`,border:`none`,padding:`7px 12px`,fontSize:11,textAlign:`left`,cursor:`pointer`,transition:`background 0.1s`},onMouseEnter:e=>{e.currentTarget.style.background=`#2a2a4e`},onMouseLeave:e=>{e.currentTarget.style.background=`transparent`},children:[(0,$.jsx)(`span`,{style:{fontWeight:600},children:e.label}),(0,$.jsx)(`span`,{style:{color:`#666`,marginLeft:8,fontSize:10},children:e.desc})]},e.label))})]})}function Qf({layoutPreset:e,onLayoutChange:t,mindmapDirection:n,onDirectionChange:r,searchQuery:i,onSearchChange:a,searchFilterMode:o,onSearchFilterModeChange:s,searchDepth:c,onSearchDepthChange:l,activeTypes:u,onTypeToggle:d,availableTypes:f,matchCount:p,totalCount:m,selectedNode:h,onCloseInspector:g,onExportPng:_,onExportSvg:v,onExportJson:y,onExportGif:b,onCompact:x,isCompacting:S}){return(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{padding:`12px 16px 8px`},children:[(0,$.jsxs)(`div`,{style:{marginBottom:10},children:[(0,$.jsx)(`p`,{style:Kf,children:`Layout`}),(0,$.jsx)(`select`,{value:e,onChange:e=>t(e.target.value),style:Gf,children:sf.map(e=>(0,$.jsx)(`option`,{value:e.key,children:e.label},e.key))})]}),e===`mindmap`&&(0,$.jsxs)(`div`,{style:{marginBottom:10},children:[(0,$.jsx)(`p`,{style:Kf,children:`Direction`}),(0,$.jsxs)(`select`,{value:n,onChange:e=>r(e.target.value),style:Gf,children:[(0,$.jsx)(`option`,{value:`LR`,children:`Left to Right`}),(0,$.jsx)(`option`,{value:`RL`,children:`Right to Left`})]})]}),(0,$.jsxs)(`div`,{style:{marginBottom:8},children:[(0,$.jsx)(`p`,{style:Kf,children:`Search`}),(0,$.jsxs)(`div`,{style:{position:`relative`},children:[(0,$.jsx)(`input`,{type:`text`,value:i,onChange:e=>a(e.target.value),placeholder:`Search nodes...`,style:{...Gf,padding:`6px 28px 6px 8px`}}),i&&(0,$.jsx)(`button`,{onClick:()=>a(``),style:{position:`absolute`,right:6,top:`50%`,transform:`translateY(-50%)`,background:`none`,border:`none`,color:`#666`,cursor:`pointer`,fontSize:14,padding:0,lineHeight:1},children:`×`})]}),i&&(0,$.jsxs)(`span`,{style:{fontSize:10,color:`#666`,marginTop:4,display:`block`},children:[p,` of `,m,` nodes`]}),(0,$.jsxs)(`div`,{style:{marginTop:6,display:`flex`,flexDirection:`column`,gap:6},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{fontSize:10,color:`#666`,whiteSpace:`nowrap`},children:`Unmatched:`}),(0,$.jsxs)(`div`,{style:{display:`flex`,borderRadius:4,overflow:`hidden`,border:`1px solid #444`,flexShrink:0},children:[(0,$.jsx)(`button`,{onClick:()=>s(`hide`),style:{background:o===`hide`?`#4a90e8`:`#1a1a2e`,color:o===`hide`?`#fff`:`#888`,border:`none`,padding:`3px 10px`,fontSize:10,fontWeight:600,cursor:`pointer`,transition:`all 0.15s`},children:`Hide`}),(0,$.jsx)(`button`,{onClick:()=>s(`dim`),style:{background:o===`dim`?`#4a90e8`:`#1a1a2e`,color:o===`dim`?`#fff`:`#888`,border:`none`,borderLeft:`1px solid #444`,padding:`3px 10px`,fontSize:10,fontWeight:600,cursor:`pointer`,transition:`all 0.15s`},children:`Dim`})]})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{fontSize:10,color:`#666`,whiteSpace:`nowrap`},children:`Depth:`}),(0,$.jsx)(`input`,{type:`range`,min:0,max:5,value:c,onChange:e=>l(Number(e.target.value)),style:{flex:1,height:4,accentColor:`#4a90e8`,cursor:`pointer`}}),(0,$.jsx)(`span`,{style:{fontSize:10,color:`#e0e0e0`,minWidth:14,textAlign:`right`,fontWeight:600},children:c})]})]})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`p`,{style:Kf,children:`Filter`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:4},children:f.map(e=>{let t=u.has(e),n=Gu[e]??`#888`;return(0,$.jsxs)(`div`,{onClick:()=>d(e),style:{...qf,background:t?n:`transparent`,color:t?`#fff`:`#888`,border:`1px solid ${t?n:`#555`}`,opacity:t?1:.5},children:[(0,$.jsx)(`span`,{style:{width:8,height:8,borderRadius:`50%`,background:n,display:`inline-block`,opacity:t?1:.4}}),Wf[e]??e]},e)})})]}),(0,$.jsxs)(`div`,{style:{marginTop:10},children:[(0,$.jsx)(`p`,{style:Kf,children:`Actions`}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:6},children:[(0,$.jsx)(Zf,{onExportPng:_,onExportSvg:v,onExportJson:y,onExportGif:b}),(0,$.jsx)(`button`,{onClick:x,disabled:S,style:{...Yf,background:S?`#333`:`#1a1a2e`,color:S?`#555`:`#4a90e8`,borderColor:S?`#333`:`#4a90e8`,fontWeight:600,cursor:S?`default`:`pointer`},title:`Compact visible nodes together`,children:`Compact`})]})]})]}),(0,$.jsx)(`div`,{style:Jf}),h?(0,$.jsxs)(`div`,{style:{padding:`10px 16px`,display:`flex`,flexDirection:`column`,gap:8},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,$.jsx)(`h2`,{style:{fontSize:14,color:`#fff`,margin:0},children:h.label}),(0,$.jsx)(`button`,{onClick:g,style:{background:`none`,border:`none`,color:`#888`,cursor:`pointer`,fontSize:16,padding:0,lineHeight:1},children:`×`})]}),(0,$.jsx)(`div`,{children:(0,$.jsx)(`span`,{style:{background:Gu[h.type]??`#888`,borderRadius:4,padding:`2px 8px`,fontSize:10,color:`#fff`,display:`inline-block`},children:h.type})}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`p`,{style:Kf,children:`File Path`}),(0,$.jsx)(`p`,{style:{fontSize:11,color:`#e0e0e0`,wordBreak:`break-all`,margin:0},children:h.metadata.filePath??h.id})]}),h.metadata.route&&(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`p`,{style:Kf,children:`Route`}),(0,$.jsx)(`p`,{style:{fontSize:11,color:`#e0e0e0`,margin:0},children:h.metadata.route})]}),h.metadata.language&&(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`p`,{style:Kf,children:`Language`}),(0,$.jsx)(`p`,{style:{fontSize:11,color:`#e0e0e0`,margin:0},children:h.metadata.language})]}),h.metadata.framework&&(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`p`,{style:Kf,children:`Framework`}),(0,$.jsx)(`p`,{style:{fontSize:11,color:`#e0e0e0`,margin:0},children:h.metadata.framework})]}),h.metadata.namespace&&(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`p`,{style:Kf,children:`Namespace`}),(0,$.jsx)(`p`,{style:{fontSize:11,color:`#e0e0e0`,wordBreak:`break-all`,margin:0},children:h.metadata.namespace})]}),h.metadata.classes&&(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`p`,{style:Kf,children:`Classes`}),(0,$.jsx)(`p`,{style:{fontSize:11,color:`#e0e0e0`,margin:0},children:h.metadata.classes})]}),h.metadata.functions&&(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`p`,{style:Kf,children:`Functions`}),(0,$.jsx)(`p`,{style:{fontSize:11,color:`#e0e0e0`,margin:0},children:h.metadata.functions})]}),h.metadata.methods&&(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`p`,{style:Kf,children:`Methods`}),(0,$.jsx)(`p`,{style:{fontSize:11,color:`#e0e0e0`,margin:0},children:h.metadata.methods})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`p`,{style:Kf,children:`Node ID`}),(0,$.jsx)(`p`,{style:{fontSize:11,color:`#888`,wordBreak:`break-all`,margin:0},children:h.id})]}),(0,$.jsx)(`div`,{style:Jf}),(0,$.jsx)(mf,{filePath:h.metadata.filePath??h.id})]}):(0,$.jsx)(`div`,{style:{padding:`10px 16px`},children:(0,$.jsx)(`p`,{style:{fontSize:11,color:`#555`,fontStyle:`italic`,margin:0},children:`Click a node to inspect`})})]})}var $f=380,ep=260,tp=700,np=`omnigraph-sidebar-width`;function rp(){try{let e=localStorage.getItem(np);if(e){let t=Number(e);if(t>=ep&&t<=tp)return t}}catch{}return $f}function ip(e){let{activeTab:t,onTabChange:n,apiRequest:r,apiResponse:i,apiLoading:a,apiError:o,onApiMethodChange:s,onApiUrlChange:c,onApiSetHeader:l,onApiRemoveHeader:u,onApiSetQueryParam:d,onApiRemoveQueryParam:f,onApiBodyChange:p,onApiSend:m,onApiReset:h,flowTrace:g,flowCurrentStepIndex:_,onFlowStepForward:v,onFlowStepBackward:y,onFlowGoToStep:b,onFlowStop:x,onFlowOpenInApiClient:S,settings:C,onUpdateEdgeLabels:T,onUpdateGraph:E,onUpdateSearch:D,onResetEdgeLabels:O,onResetGraph:k,onResetSearch:A,onResetAll:j}=e,[M,N]=(0,w.useState)(rp),P=(0,w.useRef)(M),F=(0,w.useRef)(!1),ee=(0,w.useRef)(0),te=(0,w.useRef)(0);(0,w.useEffect)(()=>{P.current=M},[M]);let I=(0,w.useCallback)(e=>{e.preventDefault(),F.current=!0,ee.current=e.clientX,te.current=P.current,document.body.style.cursor=`col-resize`,document.body.style.userSelect=`none`},[]);return(0,w.useEffect)(()=>{let e=e=>{if(!F.current)return;let t=ee.current-e.clientX;N(Math.max(ep,Math.min(tp,te.current+t)))},t=()=>{if(F.current){F.current=!1,document.body.style.cursor=``,document.body.style.userSelect=``;try{localStorage.setItem(np,String(P.current))}catch{}}};return window.addEventListener(`mousemove`,e),window.addEventListener(`mouseup`,t),()=>{window.removeEventListener(`mousemove`,e),window.removeEventListener(`mouseup`,t)}},[]),(0,$.jsxs)(`div`,{style:{width:M,background:`#0d0d1e`,borderLeft:`1px solid #333`,display:`flex`,flexDirection:`column`,overflowY:`auto`,flexShrink:0,position:`relative`},children:[(0,$.jsx)(`div`,{onMouseDown:I,style:{position:`absolute`,left:0,top:0,bottom:0,width:5,cursor:`col-resize`,zIndex:10,background:`transparent`},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(74, 144, 232, 0.4)`},onMouseLeave:e=>{F.current||(e.currentTarget.style.background=`transparent`)}}),(0,$.jsx)(Xf,{activeTab:t,onTabChange:n,hasTrace:g!==null}),t===`controls`&&(0,$.jsx)(Qf,{...e}),t===`api-client`&&(0,$.jsx)(`div`,{style:{padding:`12px 16px`},children:(0,$.jsx)(Ef,{request:r,response:i,loading:a,error:o,onMethodChange:s,onUrlChange:c,onSetHeader:l,onRemoveHeader:u,onSetQueryParam:d,onRemoveQueryParam:f,onBodyChange:p,onSend:m,onReset:h})}),t===`flow-tracer`&&g&&(0,$.jsx)(`div`,{style:{padding:`12px 16px`},children:(0,$.jsx)(kf,{trace:g,currentStepIndex:_,onStepForward:v,onStepBackward:y,onGoToStep:b,onStop:x,onOpenInApiClient:S})}),t===`settings`&&(0,$.jsx)(Uf,{settings:C,onUpdateEdgeLabels:T,onUpdateGraph:E,onUpdateSearch:D,onResetEdgeLabels:O,onResetGraph:k,onResetSearch:A,onResetAll:j})]})}function ap({data:e}){return(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,background:`rgba(255, 255, 255, 0.03)`,border:`1px dashed #444`,borderRadius:12},children:(0,$.jsx)(`div`,{style:{padding:`6px 12px`,fontSize:11,fontWeight:600,color:`#777`,letterSpacing:`0.5px`,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`},children:e.label})})}function op(e,t,n,r){return n?r===`hide`?e.filter(e=>t.has(e.id)):e.map(e=>{let n=t.has(e.id);return{...e,style:{...e.style,opacity:n?1:.15,transition:`opacity 0.2s`}}}):e}function sp(e,t,n,r){return n?r===`hide`?e.filter(e=>t.has(e.source)&&t.has(e.target)):e.map(e=>{let n=t.has(e.source)&&t.has(e.target);return{...e,style:{...e.style,opacity:n?1:.08,transition:`opacity 0.2s`},animated:n?e.animated:!1}}):e}function cp({graphData:e,active:t,setNodes:n,setEdges:r,matchingIds:i,isFiltering:a,filterMode:o}){let s=(0,w.useRef)(null),c=(0,w.useRef)([]),l=(0,w.useRef)(new Map),u=(0,w.useRef)(null),d=(0,w.useRef)(!1),f=(0,w.useRef)([]),p=(0,w.useRef)({matchingIds:i,isFiltering:a,filterMode:o});p.current={matchingIds:i,isFiltering:a,filterMode:o};let m=(0,w.useCallback)(()=>{u.current??=(d.current=!0,requestAnimationFrame(()=>{if(u.current=null,!d.current)return;d.current=!1;let e=c.current,{matchingIds:t,isFiltering:r,filterMode:i}=p.current;n(()=>op(e.map(e=>({...e.flowNode,position:{x:e.x??0,y:e.y??0}})),t,r,i))}))},[n]);return(0,w.useEffect)(()=>{if(!t||!e){s.current&&=(s.current.stop(),null),u.current!=null&&(cancelAnimationFrame(u.current),u.current=null);return}let i=e.nodes.length,a=Math.sqrt(i)*30,o=e.nodes.map((e,t)=>{let n=t/i*2*Math.PI;return{id:e.id,x:Math.cos(n)*a,y:Math.sin(n)*a,vx:0,vy:0,flowNode:Ku(e)}}),d=new Map(o.map(e=>[e.id,e]));l.current=d,c.current=o;let h=e.edges.filter(e=>d.has(e.source)&&d.has(e.target)),g=h.map(e=>({source:e.source,target:e.target})),_=h.map(qu);f.current=_;let{matchingIds:v,isFiltering:y,filterMode:b}=p.current;r(sp(_,v,y,b));let x=o.map(e=>({...e.flowNode,position:{x:e.x??0,y:e.y??0}}));n(()=>op(x,v,y,b));let S=Hu(o).force(`link`,Nu(g).id(e=>e.id).distance(120).strength(.2)).force(`charge`,Uu().strength(-250).distanceMax(500)).force(`center`,ru(0,0).strength(.03)).force(`collide`,Au(50).strength(.5)).alphaDecay(.03).velocityDecay(.5).on(`tick`,m);return s.current=S,()=>{S.stop(),s.current=null,u.current!=null&&(cancelAnimationFrame(u.current),u.current=null)}},[t,e,m,r,n]),(0,w.useEffect)(()=>{if(!t||!e)return;let l=s.current,u=c.current,d=[];u.length>0&&(d=op(u.map(e=>({...e.flowNode,position:{x:e.x??0,y:e.y??0}})),i,a,o),n(()=>d));let p=new Set(d.map(e=>e.id)),m=sp(f.current,i,a,o);if(m=m.filter(e=>p.has(e.source)&&p.has(e.target)),r(m),l&&a&&o===`hide`){let e=0,t=0,n=0;for(let r of u)i.has(r.id)&&(e+=r.x??0,t+=r.y??0,n++);n>0&&(e/=n,t/=n),l.force(`charge`,Uu().strength(e=>i.has(e.id)?-100:0).distanceMax(300)),l.force(`center`,ru(e,t).strength(.08)),l.force(`collide`,Au(e=>i.has(e.id)?50:0).strength(.7));for(let e of u)i.has(e.id)?(e.fx=null,e.fy=null):(e.fx=e.x,e.fy=e.y);l.alpha(.4).restart()}else if(l&&!a){l.force(`charge`,Uu().strength(-250).distanceMax(500)),l.force(`center`,ru(0,0).strength(.03)),l.force(`collide`,Au(50).strength(.5));for(let e of u)e.fx=null,e.fy=null;l.alpha(.3).restart()}},[t,e,i,a,o,n,r]),{onNodeDrag:(0,w.useCallback)((e,n)=>{let r=s.current;if(!r||!t)return;let i=l.current.get(n.id);i&&(i.fx=n.position.x,i.fy=n.position.y,i.x=n.position.x,i.y=n.position.y),r.alphaTarget(.15).restart()},[t]),onNodeDragStop:(0,w.useCallback)((e,n)=>{let r=s.current;if(!(!r||!t)){for(let e of c.current)e.fx!=null&&(e.fx=null,e.fy=null);r.alphaTarget(0)}},[t])}}function lp(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i))return e;let n=document.implementation.createHTMLDocument(),r=n.createElement(`base`),i=n.createElement(`a`);return n.head.appendChild(r),n.body.appendChild(i),t&&(r.href=t),i.href=e,i.href}var up=(()=>{let e=0,t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function dp(e){let t=[];for(let n=0,r=e.length;n<r;n++)t.push(e[n]);return t}var fp=null;function pp(e={}){return fp||(e.includeStyleProperties?(fp=e.includeStyleProperties,fp):(fp=dp(window.getComputedStyle(document.documentElement)),fp))}function mp(e,t){let n=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return n?parseFloat(n.replace(`px`,``)):0}function hp(e){let t=mp(e,`border-left-width`),n=mp(e,`border-right-width`);return e.clientWidth+t+n}function gp(e){let t=mp(e,`border-top-width`),n=mp(e,`border-bottom-width`);return e.clientHeight+t+n}function _p(e,t={}){return{width:t.width||hp(e),height:t.height||gp(e)}}function vp(){let e,t;try{t=process}catch{}let n=t&&t.env?t.env.devicePixelRatio:null;return n&&(e=parseInt(n,10),Number.isNaN(e)&&(e=1)),e||window.devicePixelRatio||1}var yp=16384;function bp(e){(e.width>yp||e.height>yp)&&(e.width>yp&&e.height>yp?e.width>e.height?(e.height*=yp/e.width,e.width=yp):(e.width*=yp/e.height,e.height=yp):e.width>yp?(e.height*=yp/e.width,e.width=yp):(e.width*=yp/e.height,e.height=yp))}function xp(e){return new Promise((t,n)=>{let r=new Image;r.onload=()=>{r.decode().then(()=>{requestAnimationFrame(()=>t(r))})},r.onerror=n,r.crossOrigin=`anonymous`,r.decoding=`async`,r.src=e})}async function Sp(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(e=>`data:image/svg+xml;charset=utf-8,${e}`)}async function Cp(e,t,n){let r=`http://www.w3.org/2000/svg`,i=document.createElementNS(r,`svg`),a=document.createElementNS(r,`foreignObject`);return i.setAttribute(`width`,`${t}`),i.setAttribute(`height`,`${n}`),i.setAttribute(`viewBox`,`0 0 ${t} ${n}`),a.setAttribute(`width`,`100%`),a.setAttribute(`height`,`100%`),a.setAttribute(`x`,`0`),a.setAttribute(`y`,`0`),a.setAttribute(`externalResourcesRequired`,`true`),i.appendChild(a),a.appendChild(e),Sp(i)}var wp=(e,t)=>{if(e instanceof t)return!0;let n=Object.getPrototypeOf(e);return n===null?!1:n.constructor.name===t.name||wp(n,t)};function Tp(e){let t=e.getPropertyValue(`content`);return`${e.cssText} content: '${t.replace(/'|"/g,``)}';`}function Ep(e,t){return pp(t).map(t=>`${t}: ${e.getPropertyValue(t)}${e.getPropertyPriority(t)?` !important`:``};`).join(` `)}function Dp(e,t,n,r){let i=`.${e}:${t}`,a=n.cssText?Tp(n):Ep(n,r);return document.createTextNode(`${i}{${a}}`)}function Op(e,t,n,r){let i=window.getComputedStyle(e,n),a=i.getPropertyValue(`content`);if(a===``||a===`none`)return;let o=up();try{t.className=`${t.className} ${o}`}catch{return}let s=document.createElement(`style`);s.appendChild(Dp(o,n,i,r)),t.appendChild(s)}function kp(e,t,n){Op(e,t,`:before`,n),Op(e,t,`:after`,n)}var Ap=`application/font-woff`,jp=`image/jpeg`,Mp={woff:Ap,woff2:Ap,ttf:`application/font-truetype`,eot:`application/vnd.ms-fontobject`,png:`image/png`,jpg:jp,jpeg:jp,gif:`image/gif`,tiff:`image/tiff`,svg:`image/svg+xml`,webp:`image/webp`};function Np(e){let t=/\.([^./]*?)$/g.exec(e);return t?t[1]:``}function Pp(e){return Mp[Np(e).toLowerCase()]||``}function Fp(e){return e.split(/,/)[1]}function Ip(e){return e.search(/^(data:)/)!==-1}function Lp(e,t){return`data:${t};base64,${e}`}async function Rp(e,t,n){let r=await fetch(e,t);if(r.status===404)throw Error(`Resource "${r.url}" not found`);let i=await r.blob();return new Promise((e,t)=>{let a=new FileReader;a.onerror=t,a.onloadend=()=>{try{e(n({res:r,result:a.result}))}catch(e){t(e)}},a.readAsDataURL(i)})}var zp={};function Bp(e,t,n){let r=e.replace(/\?.*/,``);return n&&(r=e),/ttf|otf|eot|woff2?/i.test(r)&&(r=r.replace(/.*\//,``)),t?`[${t}]${r}`:r}async function Vp(e,t,n){let r=Bp(e,t,n.includeQueryParams);if(zp[r]!=null)return zp[r];n.cacheBust&&(e+=(/\?/.test(e)?`&`:`?`)+new Date().getTime());let i;try{i=Lp(await Rp(e,n.fetchRequestInit,({res:e,result:n})=>(t||=e.headers.get(`Content-Type`)||``,Fp(n))),t)}catch(t){i=n.imagePlaceholder||``;let r=`Failed to fetch resource: ${e}`;t&&(r=typeof t==`string`?t:t.message),r&&console.warn(r)}return zp[r]=i,i}async function Hp(e){let t=e.toDataURL();return t===`data:,`?e.cloneNode(!1):xp(t)}async function Up(e,t){if(e.currentSrc){let t=document.createElement(`canvas`),n=t.getContext(`2d`);return t.width=e.clientWidth,t.height=e.clientHeight,n?.drawImage(e,0,0,t.width,t.height),xp(t.toDataURL())}let n=e.poster;return xp(await Vp(n,Pp(n),t))}async function Wp(e,t){try{if(e?.contentDocument?.body)return await em(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function Gp(e,t){return wp(e,HTMLCanvasElement)?Hp(e):wp(e,HTMLVideoElement)?Up(e,t):wp(e,HTMLIFrameElement)?Wp(e,t):e.cloneNode(qp(e))}var Kp=e=>e.tagName!=null&&e.tagName.toUpperCase()===`SLOT`,qp=e=>e.tagName!=null&&e.tagName.toUpperCase()===`SVG`;async function Jp(e,t,n){if(qp(t))return t;let r=[];return r=Kp(e)&&e.assignedNodes?dp(e.assignedNodes()):wp(e,HTMLIFrameElement)&&e.contentDocument?.body?dp(e.contentDocument.body.childNodes):dp((e.shadowRoot??e).childNodes),r.length===0||wp(e,HTMLVideoElement)||await r.reduce((e,r)=>e.then(()=>em(r,n)).then(e=>{e&&t.appendChild(e)}),Promise.resolve()),t}function Yp(e,t,n){let r=t.style;if(!r)return;let i=window.getComputedStyle(e);i.cssText?(r.cssText=i.cssText,r.transformOrigin=i.transformOrigin):pp(n).forEach(n=>{let a=i.getPropertyValue(n);n===`font-size`&&a.endsWith(`px`)&&(a=`${Math.floor(parseFloat(a.substring(0,a.length-2)))-.1}px`),wp(e,HTMLIFrameElement)&&n===`display`&&a===`inline`&&(a=`block`),n===`d`&&t.getAttribute(`d`)&&(a=`path(${t.getAttribute(`d`)})`),r.setProperty(n,a,i.getPropertyPriority(n))})}function Xp(e,t){wp(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),wp(e,HTMLInputElement)&&t.setAttribute(`value`,e.value)}function Zp(e,t){if(wp(e,HTMLSelectElement)){let n=t,r=Array.from(n.children).find(t=>e.value===t.getAttribute(`value`));r&&r.setAttribute(`selected`,``)}}function Qp(e,t,n){return wp(t,Element)&&(Yp(e,t,n),kp(e,t,n),Xp(e,t),Zp(e,t)),t}async function $p(e,t){let n=e.querySelectorAll?e.querySelectorAll(`use`):[];if(n.length===0)return e;let r={};for(let i=0;i<n.length;i++){let a=n[i].getAttribute(`xlink:href`);if(a){let n=e.querySelector(a),i=document.querySelector(a);!n&&i&&!r[a]&&(r[a]=await em(i,t,!0))}}let i=Object.values(r);if(i.length){let t=`http://www.w3.org/1999/xhtml`,n=document.createElementNS(t,`svg`);n.setAttribute(`xmlns`,t),n.style.position=`absolute`,n.style.width=`0`,n.style.height=`0`,n.style.overflow=`hidden`,n.style.display=`none`;let r=document.createElementNS(t,`defs`);n.appendChild(r);for(let e=0;e<i.length;e++)r.appendChild(i[e]);e.appendChild(n)}return e}async function em(e,t,n){return!n&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(e=>Gp(e,t)).then(n=>Jp(e,n,t)).then(n=>Qp(e,n,t)).then(e=>$p(e,t))}var tm=/url\((['"]?)([^'"]+?)\1\)/g,nm=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,rm=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function im(e){let t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,`\\$1`);return RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,`g`)}function am(e){let t=[];return e.replace(tm,(e,n,r)=>(t.push(r),e)),t.filter(e=>!Ip(e))}async function om(e,t,n,r,i){try{let a=n?lp(t,n):t,o=Pp(t),s;return s=i?Lp(await i(a),o):await Vp(a,o,r),e.replace(im(t),`$1${s}$3`)}catch{}return e}function sm(e,{preferredFontFormat:t}){return t?e.replace(rm,e=>{for(;;){let[n,,r]=nm.exec(e)||[];if(!r)return``;if(r===t)return`src: ${n};`}}):e}function cm(e){return e.search(tm)!==-1}async function lm(e,t,n){if(!cm(e))return e;let r=sm(e,n);return am(r).reduce((e,r)=>e.then(e=>om(e,r,t,n)),Promise.resolve(r))}async function um(e,t,n){let r=t.style?.getPropertyValue(e);if(r){let i=await lm(r,null,n);return t.style.setProperty(e,i,t.style.getPropertyPriority(e)),!0}return!1}async function dm(e,t){await um(`background`,e,t)||await um(`background-image`,e,t),await um(`mask`,e,t)||await um(`-webkit-mask`,e,t)||await um(`mask-image`,e,t)||await um(`-webkit-mask-image`,e,t)}async function fm(e,t){let n=wp(e,HTMLImageElement);if(!(n&&!Ip(e.src))&&!(wp(e,SVGImageElement)&&!Ip(e.href.baseVal)))return;let r=n?e.src:e.href.baseVal,i=await Vp(r,Pp(r),t);await new Promise((r,a)=>{e.onload=r,e.onerror=t.onImageErrorHandler?(...e)=>{try{r(t.onImageErrorHandler(...e))}catch(e){a(e)}}:a;let o=e;o.decode&&=r,o.loading===`lazy`&&(o.loading=`eager`),n?(e.srcset=``,e.src=i):e.href.baseVal=i})}async function pm(e,t){let n=dp(e.childNodes).map(e=>mm(e,t));await Promise.all(n).then(()=>e)}async function mm(e,t){wp(e,Element)&&(await dm(e,t),await fm(e,t),await pm(e,t))}function hm(e,t){let{style:n}=e;t.backgroundColor&&(n.backgroundColor=t.backgroundColor),t.width&&(n.width=`${t.width}px`),t.height&&(n.height=`${t.height}px`);let r=t.style;return r!=null&&Object.keys(r).forEach(e=>{n[e]=r[e]}),e}var gm={};async function _m(e){let t=gm[e];return t??(t={url:e,cssText:await(await fetch(e)).text()},gm[e]=t,t)}async function vm(e,t){let n=e.cssText,r=/url\(["']?([^"')]+)["']?\)/g,i=(n.match(/url\([^)]+\)/g)||[]).map(async i=>{let a=i.replace(r,`$1`);return a.startsWith(`https://`)||(a=new URL(a,e.url).href),Rp(a,t.fetchRequestInit,({result:e})=>(n=n.replace(i,`url(${e})`),[i,e]))});return Promise.all(i).then(()=>n)}function ym(e){if(e==null)return[];let t=[],n=e.replace(/(\/\*[\s\S]*?\*\/)/gi,``),r=RegExp(`((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})`,`gi`);for(;;){let e=r.exec(n);if(e===null)break;t.push(e[0])}n=n.replace(r,``);let i=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,a=RegExp(`((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})`,`gi`);for(;;){let e=i.exec(n);if(e===null){if(e=a.exec(n),e===null)break;i.lastIndex=a.lastIndex}else a.lastIndex=i.lastIndex;t.push(e[0])}return t}async function bm(e,t){let n=[],r=[];return e.forEach(n=>{if(`cssRules`in n)try{dp(n.cssRules||[]).forEach((e,i)=>{if(e.type===CSSRule.IMPORT_RULE){let a=i+1,o=e.href,s=_m(o).then(e=>vm(e,t)).then(e=>ym(e).forEach(e=>{try{n.insertRule(e,e.startsWith(`@import`)?a+=1:n.cssRules.length)}catch(t){console.error(`Error inserting rule from remote css`,{rule:e,error:t})}})).catch(e=>{console.error(`Error loading remote css`,e.toString())});r.push(s)}})}catch(i){let a=e.find(e=>e.href==null)||document.styleSheets[0];n.href!=null&&r.push(_m(n.href).then(e=>vm(e,t)).then(e=>ym(e).forEach(e=>{a.insertRule(e,a.cssRules.length)})).catch(e=>{console.error(`Error loading remote stylesheet`,e)})),console.error(`Error inlining remote css file`,i)}}),Promise.all(r).then(()=>(e.forEach(e=>{if(`cssRules`in e)try{dp(e.cssRules||[]).forEach(e=>{n.push(e)})}catch(t){console.error(`Error while reading CSS rules from ${e.href}`,t)}}),n))}function xm(e){return e.filter(e=>e.type===CSSRule.FONT_FACE_RULE).filter(e=>cm(e.style.getPropertyValue(`src`)))}async function Sm(e,t){if(e.ownerDocument==null)throw Error(`Provided element is not within a Document`);return xm(await bm(dp(e.ownerDocument.styleSheets),t))}function Cm(e){return e.trim().replace(/["']/g,``)}function wm(e){let t=new Set;function n(e){(e.style.fontFamily||getComputedStyle(e).fontFamily).split(`,`).forEach(e=>{t.add(Cm(e))}),Array.from(e.children).forEach(e=>{e instanceof HTMLElement&&n(e)})}return n(e),t}async function Tm(e,t){let n=await Sm(e,t),r=wm(e);return(await Promise.all(n.filter(e=>r.has(Cm(e.style.fontFamily))).map(e=>{let n=e.parentStyleSheet?e.parentStyleSheet.href:null;return lm(e.cssText,n,t)}))).join(`
|
|
11
|
+
`)}async function Em(e,t){let n=t.fontEmbedCSS==null?t.skipFonts?null:await Tm(e,t):t.fontEmbedCSS;if(n){let t=document.createElement(`style`),r=document.createTextNode(n);t.appendChild(r),e.firstChild?e.insertBefore(t,e.firstChild):e.appendChild(t)}}async function Dm(e,t={}){let{width:n,height:r}=_p(e,t),i=await em(e,t,!0);return await Em(i,t),await mm(i,t),hm(i,t),await Cp(i,n,r)}async function Om(e,t={}){let{width:n,height:r}=_p(e,t),i=await xp(await Dm(e,t)),a=document.createElement(`canvas`),o=a.getContext(`2d`),s=t.pixelRatio||vp(),c=t.canvasWidth||n,l=t.canvasHeight||r;return a.width=c*s,a.height=l*s,t.skipAutoScale||bp(a),a.style.width=`${c}`,a.style.height=`${l}`,t.backgroundColor&&(o.fillStyle=t.backgroundColor,o.fillRect(0,0,a.width,a.height)),o.drawImage(i,0,0,a.width,a.height),a}async function km(e,t={}){return(await Om(e,t)).toDataURL()}var Am=c(o(((e,t)=>{(function(n){if(typeof e==`object`&&t!==void 0)t.exports=n();else if(typeof define==`function`&&define.amd)define([],n);else{var r=typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:this;r.GIF=n()}})(function(){return function e(t,n,r){function i(o,s){if(!n[o]){if(!t[o]){var c=typeof l==`function`&&l;if(!s&&c)return c(o,!0);if(a)return a(o,!0);var u=Error(`Cannot find module '`+o+`'`);throw u.code=`MODULE_NOT_FOUND`,u}var d=n[o]={exports:{}};t[o][0].call(d.exports,function(e){var n=t[o][1][e];return i(n||e)},d,d.exports,e,t,n,r)}return n[o].exports}for(var a=typeof l==`function`&&l,o=0;o<r.length;o++)i(r[o]);return i}({1:[function(e,t,n){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}t.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(e){if(!a(e)||e<0||isNaN(e))throw TypeError(`n must be a positive number`);return this._maxListeners=e,this},r.prototype.emit=function(e){var t,n,r,a,c,l;if(this._events||={},e===`error`&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;var u=Error(`Uncaught, unspecified "error" event. (`+t+`)`);throw u.context=t,u}if(n=this._events[e],s(n))return!1;if(i(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),n.apply(this,a)}else if(o(n))for(a=Array.prototype.slice.call(arguments,1),l=n.slice(),r=l.length,c=0;c<r;c++)l[c].apply(this,a);return!0},r.prototype.addListener=function(e,t){var n;if(!i(t))throw TypeError(`listener must be a function`);return this._events||={},this._events.newListener&&this.emit(`newListener`,e,i(t.listener)?t.listener:t),this._events[e]?o(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,o(this._events[e])&&!this._events[e].warned&&(n=s(this._maxListeners)?r.defaultMaxListeners:this._maxListeners,n&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,console.error(`(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.`,this._events[e].length),typeof console.trace==`function`&&console.trace())),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(e,t){if(!i(t))throw TypeError(`listener must be a function`);var n=!1;function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}return r.listener=t,this.on(e,r),this},r.prototype.removeListener=function(e,t){var n,r,a,s;if(!i(t))throw TypeError(`listener must be a function`);if(!this._events||!this._events[e])return this;if(n=this._events[e],a=n.length,r=-1,n===t||i(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit(`removeListener`,e,t);else if(o(n)){for(s=a;s-- >0;)if(n[s]===t||n[s].listener&&n[s].listener===t){r=s;break}if(r<0)return this;n.length===1?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit(`removeListener`,e,t)}return this},r.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[e]&&delete this._events[e],this;if(arguments.length===0){for(t in this._events)t!==`removeListener`&&this.removeAllListeners(t);return this.removeAllListeners(`removeListener`),this._events={},this}if(n=this._events[e],i(n))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},r.prototype.listeners=function(e){return!this._events||!this._events[e]?[]:i(this._events[e])?[this._events[e]]:this._events[e].slice()},r.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(i(t))return 1;if(t)return t.length}return 0},r.listenerCount=function(e,t){return e.listenerCount(t)};function i(e){return typeof e==`function`}function a(e){return typeof e==`number`}function o(e){return typeof e==`object`&&!!e}function s(e){return e===void 0}},{}],2:[function(e,t,n){var r,i,a,o,s=navigator.userAgent.toLowerCase();o=navigator.platform.toLowerCase(),r=s.match(/(opera|ie|firefox|chrome|version)[\s\/:]([\w\d\.]+)?.*?(safari|version[\s\/:]([\w\d\.]+)|$)/)||[null,`unknown`,0],a=r[1]===`ie`&&document.documentMode,i={name:r[1]===`version`?r[3]:r[1],version:a||parseFloat(r[1]===`opera`&&r[4]?r[4]:r[2]),platform:{name:s.match(/ip(?:ad|od|hone)/)?`ios`:(s.match(/(?:webos|android)/)||o.match(/mac|win|linux/)||[`other`])[0]}},i[i.name]=!0,i[i.name+parseInt(i.version,10)]=!0,i.platform[i.platform.name]=!0,t.exports=i},{}],3:[function(e,t,n){var r,i,a,o=function(e,t){for(var n in t)s.call(t,n)&&(e[n]=t[n]);function r(){this.constructor=e}return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},s={}.hasOwnProperty,c=[].indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(t in this&&this[t]===e)return t;return-1},l=[].slice;r=e(`events`).EventEmitter,a=e(`./browser.coffee`),i=function(e){var t,n;o(r,e),t={workerScript:`gif.worker.js`,workers:2,repeat:0,background:`#fff`,quality:10,width:null,height:null,transparent:null,debug:!1,dither:!1},n={delay:500,copy:!1};function r(e){var n,r,i;for(r in this.running=!1,this.options={},this.frames=[],this.freeWorkers=[],this.activeWorkers=[],this.setOptions(e),t)i=t[r],(n=this.options)[r]??(n[r]=i)}return r.prototype.setOption=function(e,t){if(this.options[e]=t,this._canvas!=null&&(e===`width`||e===`height`))return this._canvas[e]=t},r.prototype.setOptions=function(e){var t,n=[],r;for(t in e)s.call(e,t)&&(r=e[t],n.push(this.setOption(t,r)));return n},r.prototype.addFrame=function(e,t){var r,i;for(i in t??={},r={},r.transparent=this.options.transparent,n)r[i]=t[i]||n[i];if(this.options.width??this.setOption(`width`,e.width),this.options.height??this.setOption(`height`,e.height),typeof ImageData<`u`&&ImageData!==null&&e instanceof ImageData)r.data=e.data;else if(typeof CanvasRenderingContext2D<`u`&&CanvasRenderingContext2D!==null&&e instanceof CanvasRenderingContext2D||typeof WebGLRenderingContext<`u`&&WebGLRenderingContext!==null&&e instanceof WebGLRenderingContext)t.copy?r.data=this.getContextData(e):r.context=e;else if(e.childNodes!=null)t.copy?r.data=this.getImageData(e):r.image=e;else throw Error(`Invalid image`);return this.frames.push(r)},r.prototype.render=function(){var e,t,n;if(this.running)throw Error(`Already running`);if(this.options.width==null||this.options.height==null)throw Error(`Width and height must be set prior to rendering`);if(this.running=!0,this.nextFrame=0,this.finishedFrames=0,this.imageParts=function(){var e,t,n=[];for(e=0,t=this.frames.length;0<=t?e<t:e>t;0<=t?++e:--e)n.push(null);return n}.call(this),t=this.spawnWorkers(),this.options.globalPalette===!0)this.renderNextFrame();else for(e=0,n=t;0<=n?e<n:e>n;0<=n?++e:--e)this.renderNextFrame();return this.emit(`start`),this.emit(`progress`,0)},r.prototype.abort=function(){for(var e;e=this.activeWorkers.shift(),e!=null;)this.log(`killing active worker`),e.terminate();return this.running=!1,this.emit(`abort`)},r.prototype.spawnWorkers=function(){var e=Math.min(this.options.workers,this.frames.length),t,n;return(function(){n=[];for(var r=t=this.freeWorkers.length;t<=e?r<e:r>e;t<=e?r++:r--)n.push(r);return n}).apply(this).forEach(function(e){return function(t){var n;return e.log(`spawning worker `+t),n=new Worker(e.options.workerScript),n.onmessage=function(t){return e.activeWorkers.splice(e.activeWorkers.indexOf(n),1),e.freeWorkers.push(n),e.frameFinished(t.data)},e.freeWorkers.push(n)}}(this)),e},r.prototype.frameFinished=function(e){var t,n;if(this.log(`frame `+e.index+` finished - `+this.activeWorkers.length+` active`),this.finishedFrames++,this.emit(`progress`,this.finishedFrames/this.frames.length),this.imageParts[e.index]=e,this.options.globalPalette===!0&&(this.options.globalPalette=e.globalPalette,this.log(`global palette analyzed`),this.frames.length>2))for(t=1,n=this.freeWorkers.length;1<=n?t<n:t>n;1<=n?++t:--t)this.renderNextFrame();return c.call(this.imageParts,null)>=0?this.renderNextFrame():this.finishRendering()},r.prototype.finishRendering=function(){var e,t,n,r,i,a,o,s=0,c,l,u,d,f,p=this.imageParts,m,h;for(i=0,c=p.length;i<c;i++)t=p[i],s+=(t.data.length-1)*t.pageSize+t.cursor;for(s+=t.pageSize-t.cursor,this.log(`rendering finished - filesize `+Math.round(s/1e3)+`kb`),e=new Uint8Array(s),d=0,m=this.imageParts,a=0,l=m.length;a<l;a++)for(t=m[a],h=t.data,n=o=0,u=h.length;o<u;n=++o)f=h[n],e.set(f,d),n===t.data.length-1?d+=t.cursor:d+=t.pageSize;return r=new Blob([e],{type:`image/gif`}),this.emit(`finished`,r,e)},r.prototype.renderNextFrame=function(){var e,t,n;if(this.freeWorkers.length===0)throw Error(`No free workers`);if(!(this.nextFrame>=this.frames.length))return e=this.frames[this.nextFrame++],n=this.freeWorkers.shift(),t=this.getTask(e),this.log(`starting frame `+(t.index+1)+` of `+this.frames.length),this.activeWorkers.push(n),n.postMessage(t)},r.prototype.getContextData=function(e){return e.getImageData(0,0,this.options.width,this.options.height).data},r.prototype.getImageData=function(e){var t;return this._canvas??(this._canvas=document.createElement(`canvas`),this._canvas.width=this.options.width,this._canvas.height=this.options.height),t=this._canvas.getContext(`2d`),t.setFill=this.options.background,t.fillRect(0,0,this.options.width,this.options.height),t.drawImage(e,0,0),this.getContextData(t)},r.prototype.getTask=function(e){var t=this.frames.indexOf(e),n={index:t,last:t===this.frames.length-1,delay:e.delay,transparent:e.transparent,width:this.options.width,height:this.options.height,quality:this.options.quality,dither:this.options.dither,globalPalette:this.options.globalPalette,repeat:this.options.repeat,canTransfer:a.name===`chrome`};if(e.data!=null)n.data=e.data;else if(e.context!=null)n.data=this.getContextData(e.context);else if(e.image!=null)n.data=this.getImageData(e.image);else throw Error(`Invalid frame`);return n},r.prototype.log=function(){var e=1<=arguments.length?l.call(arguments,0):[];if(this.options.debug)return console.log.apply(console,e)},r}(r),t.exports=i},{"./browser.coffee":2,events:1}]},{},[3])(3)})}))()),jm=1e3,Mm=30,Nm=jm/1e3*Mm,Pm=Math.round(1e3/Mm),Fm=2,Im=10,Lm={active:!1,phase:`idle`,percent:0,message:``};function Rm(){return document.querySelector(`.react-flow__viewport`)}function zm(e){let t=e.classList;return t?!t.contains(`react-flow__minimap`)&&!t.contains(`react-flow__controls`):!0}function Bm(e){return new Promise((t,n)=>{let r=new Image;r.onload=()=>t(r),r.onerror=n,r.src=e})}function Vm(){return Array.from(document.querySelectorAll(`.react-flow__edge.animated path:not(.react-flow__edge-interaction)`))}function Hm(e){let t=(0,w.useRef)(!1),[n,r]=(0,w.useState)(Lm),i=(0,w.useCallback)((e,t)=>{let n=document.createElement(`a`);n.href=e,n.download=t,document.body.appendChild(n),n.click(),document.body.removeChild(n)},[]),a=(0,w.useCallback)((e,t)=>{let n=URL.createObjectURL(e),r=document.createElement(`a`);r.href=n,r.download=t,document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(n)},[]);return{exportPng:(0,w.useCallback)(async()=>{let e=Rm();if(e)try{i(await km(e,{backgroundColor:`#1a1a2e`,pixelRatio:2,filter:zm}),`omnigraph.png`)}catch(e){console.error(`PNG export failed:`,e)}},[i]),exportSvg:(0,w.useCallback)(async()=>{let e=Rm();if(e)try{i(await Dm(e,{backgroundColor:`#1a1a2e`,filter:zm}),`omnigraph.svg`)}catch(e){console.error(`SVG export failed:`,e)}},[i]),exportJson:(0,w.useCallback)(()=>{if(!e)return;let t=JSON.stringify(e,null,2),n=new Blob([t],{type:`application/json`}),r=URL.createObjectURL(n);i(r,`omnigraph.json`),URL.revokeObjectURL(r)},[e,i]),exportGif:(0,w.useCallback)(async()=>{let e=Rm();if(!e||t.current)return;t.current=!0,r({active:!0,phase:`capturing`,percent:0,message:`Preparing frames...`});let n=document.createElement(`style`);n.textContent=`
|
|
12
|
+
.react-flow__edge.animated path {
|
|
13
|
+
animation: none !important;
|
|
14
|
+
}
|
|
15
|
+
`,document.head.appendChild(n);let i=Vm();try{for(let e of i)e.style.strokeDasharray=`5`,e.style.strokeDashoffset=String(Im);let t=await Bm(await km(e,{backgroundColor:`#1a1a2e`,pixelRatio:Fm,filter:zm})),n=t.naturalWidth,o=t.naturalHeight,s=new Am.default({workers:4,quality:1,width:n,height:o,workerScript:`/gif.worker.js`,repeat:0,dither:!1});for(let t=0;t<Nm;t++){let a=Im*(1-t/Nm);for(let e of i)e.style.strokeDashoffset=String(a);await new Promise(e=>requestAnimationFrame(()=>requestAnimationFrame(e))),r({active:!0,phase:`capturing`,percent:Math.round(t/Nm*60),message:`Capturing frame ${t+1} of ${Nm}`});let c=await Bm(await km(e,{backgroundColor:`#1a1a2e`,pixelRatio:Fm,filter:zm})),l=document.createElement(`canvas`);l.width=n,l.height=o;let u=l.getContext(`2d`);u.drawImage(c,0,0,n,o),s.addFrame(u,{delay:Pm,copy:!0})}r({active:!0,phase:`encoding`,percent:60,message:`Encoding GIF...`}),a(await new Promise((e,t)=>{s.on(`progress`,e=>{r({active:!0,phase:`encoding`,percent:60+Math.round(e*40),message:`Encoding GIF... ${Math.round(e*100)}%`})}),s.on(`finished`,t=>e(t)),s.on(`abort`,()=>t(Error(`GIF rendering aborted`))),s.render()}),`omnigraph.gif`)}catch(e){console.error(`GIF export failed:`,e)}finally{for(let e of i)e.style.strokeDasharray=``,e.style.strokeDashoffset=``;document.head.removeChild(n),t.current=!1,r(Lm)}},[a]),gifProgress:n}}var Um={method:`GET`,url:``,headers:{},queryParams:{},body:null};function Wm(){let[e,t]=(0,w.useState)({...Um}),[n,r]=(0,w.useState)(null),[i,a]=(0,w.useState)(!1),[o,s]=(0,w.useState)(null);return{request:e,response:n,loading:i,error:o,setMethod:(0,w.useCallback)(e=>{t(t=>({...t,method:e}))},[]),setUrl:(0,w.useCallback)(e=>{t(t=>({...t,url:e}))},[]),setHeader:(0,w.useCallback)((e,n)=>{t(t=>({...t,headers:{...t.headers,[e]:n}}))},[]),removeHeader:(0,w.useCallback)(e=>{t(t=>{let n={...t.headers};return delete n[e],{...t,headers:n}})},[]),setQueryParam:(0,w.useCallback)((e,n)=>{t(t=>({...t,queryParams:{...t.queryParams,[e]:n}}))},[]),removeQueryParam:(0,w.useCallback)(e=>{t(t=>{let n={...t.queryParams};return delete n[e],{...t,queryParams:n}})},[]),setBody:(0,w.useCallback)(e=>{t(t=>({...t,body:e}))},[]),prefill:(0,w.useCallback)((e,n)=>{t({method:e,url:n,headers:{"Content-Type":`application/json`},queryParams:{},body:null}),r(null),s(null)},[]),send:(0,w.useCallback)(async()=>{a(!0),s(null),r(null);try{r(await(await fetch(`/api/proxy`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)})).json())}catch(e){s(e instanceof Error?e.message:String(e))}finally{a(!1)}},[e]),reset:(0,w.useCallback)(()=>{t({...Um}),r(null),s(null)},[])}}var Gm=3,Km=20;function qm(e,t,n,r,i){if(i>=Gm||r.has(e))return[];r.add(e);let a=[],o=n.get(`target:${e}`)??[];for(let e of o){if(r.has(e.source))continue;let o=t.nodes.find(t=>t.id===e.source);if(!o)continue;let s=qm(e.source,t,n,r,i+1);if(a.push(...s),a.push({nodeId:e.source,label:o.label,description:`Imports from ${o.label}`,edgeId:e.id,type:`caller`}),a.length>=Km)break}return a}function Jm(e,t,n,r,i){if(i>=Gm||r.has(e))return[];r.add(e);let a=[],o=n.get(`source:${e}`)??[];for(let e of o){if(r.has(e.target))continue;let o=t.nodes.find(t=>t.id===e.target);if(!o)continue;if(a.push({nodeId:e.target,label:o.label,description:`Depends on ${o.label}`,edgeId:e.id,type:`dependency`}),a.length>=Km)break;let s=Jm(e.target,t,n,r,i+1);a.push(...s)}return a}function Ym(e,t){let n=t.nodes.find(t=>t.id===e.source),r=t.nodes.find(t=>t.id===e.target);if(!n||!r)return null;let i=new Map;for(let e of t.edges){let t=`source:${e.source}`,n=`target:${e.target}`;i.has(t)||i.set(t,[]),i.has(n)||i.set(n,[]),i.get(t).push(e),i.get(n).push(e)}let a=new Set,o=[],s=qm(e.source,t,i,new Set,0);o.push(...s),a.add(e.source),o.push({nodeId:e.source,label:n.label,description:`Makes ${e.label||`HTTP`} call`,edgeId:null,type:`http-call`}),a.add(e.target),o.push({nodeId:e.target,label:r.label,description:`Handles request at ${r.metadata.route||e.label||`route`}`,edgeId:e.id,type:`route-handler`});let c=Jm(e.target,t,i,a,0);return o.push(...c),{id:`trace-${e.id}`,edgeId:e.id,steps:o.slice(0,Km)}}function Xm(e){let[t,n]=(0,w.useState)(null),[r,i]=(0,w.useState)(0),a=(0,w.useMemo)(()=>!t||!e?null:Ym(t,e),[t,e]),o=(0,w.useCallback)(e=>{n(e),i(0)},[]),s=(0,w.useCallback)(()=>{n(null),i(0)},[]),c=(0,w.useCallback)(()=>{a&&i(e=>Math.min(e+1,a.steps.length-1))},[a]),l=(0,w.useCallback)(()=>{i(e=>Math.max(e-1,0))},[]),u=(0,w.useCallback)(e=>{a&&i(Math.max(0,Math.min(e,a.steps.length-1)))},[a]);return{trace:a,currentStepIndex:r,currentStep:a?.steps[r]??null,startTrace:o,stopTrace:s,stepForward:c,stepBackward:l,goToStep:u,isTracing:a!==null}}var Zm={showImportLabels:!1,showLinksToLabels:!1,showEmbedsLabels:!1,showHttpLabels:!0,labelColor:`#888888`,labelFontSize:10},Qm={autoCompact:!1,animateTransitions:!0,minimapVisible:!0},$m={defaultFilterMode:`hide`,defaultDepth:2},eh={edgeLabels:{...Zm},graph:{...Qm},search:{...$m}},th=`omnigraph-settings`;function nh(){try{let e=localStorage.getItem(th);if(!e)return{...eh};let t=JSON.parse(e);return{edgeLabels:{...Zm,...t.edgeLabels},graph:{...Qm,...t.graph},search:{...$m,...t.search}}}catch{return{...eh}}}function rh(e){try{localStorage.setItem(th,JSON.stringify(e))}catch{}}function ih(){let[e,t]=(0,w.useState)(nh);return(0,w.useEffect)(()=>{rh(e)},[e]),{settings:e,updateEdgeLabels:(0,w.useCallback)(e=>{t(t=>({...t,edgeLabels:{...t.edgeLabels,...e}}))},[]),updateGraph:(0,w.useCallback)(e=>{t(t=>({...t,graph:{...t.graph,...e}}))},[]),updateSearch:(0,w.useCallback)(e=>{t(t=>({...t,search:{...t.search,...e}}))},[]),resetEdgeLabels:(0,w.useCallback)(()=>{t(e=>({...e,edgeLabels:{...Zm}}))},[]),resetGraph:(0,w.useCallback)(()=>{t(e=>({...e,graph:{...Qm}}))},[]),resetSearch:(0,w.useCallback)(()=>{t(e=>({...e,search:{...$m}}))},[]),resetAll:(0,w.useCallback)(()=>{t({...eh,edgeLabels:{...Zm},graph:{...Qm},search:{...$m}})},[])}}var ah={directoryGroup:ap},oh=`
|
|
16
|
+
.compact-transition .react-flow__node {
|
|
17
|
+
transition: transform 0.45s ease-out !important;
|
|
18
|
+
}
|
|
19
|
+
`;function sh(e,t,n){let r=t.toLowerCase(),i=new Set;for(let t of e.nodes)n.has(t.type)&&(r&&!t.label.toLowerCase().includes(r)&&!t.id.toLowerCase().includes(r)||i.add(t.id));return i}function ch(e,t,n){if(e.size===0)return e;let r=new Map;for(let e of t)r.has(e.source)||r.set(e.source,new Set),r.has(e.target)||r.set(e.target,new Set),r.get(e.source).add(e.target),r.get(e.target).add(e.source);let i=new Set(e),a=new Set(e);for(let e=0;e<n;e++){let e=new Set;for(let t of a){let n=r.get(t);if(n)for(let t of n)i.has(t)||(i.add(t),e.add(t))}if(e.size===0)break;a=e}return i}function lh(e,t){if(e.length<=1)return e;let n=new Set(e.map(e=>e.id)),r=t.filter(e=>n.has(e.source)&&n.has(e.target)).map(e=>({source:e.source,target:e.target})),i=new Map;for(let t of e)i.set(t.id,0);for(let e of r)i.set(e.source,(i.get(e.source)??0)+1),i.set(e.target,(i.get(e.target)??0)+1);let a=0;for(let e of i.values())e>a&&(a=e);let o=new Set;for(let[e,t]of i)t===a&&a>0&&o.add(e);if(o.size===0)for(let t of e)o.add(t.id);let s=0,c=0,l=e.filter(e=>o.has(e.id));for(let e of l)s+=e.position.x,c+=e.position.y;s/=l.length,c/=l.length;let u=o.size===1,d=e.map(e=>{let t=o.has(e.id);return{id:e.id,x:e.position.x,y:e.position.y,isHub:t,...u&&t?{fx:e.position.x,fy:e.position.y}:{}}}),f=e.length,p=Math.max(140,Math.min(220,f*8)),m=Math.max(-300,Math.min(-80,-f*6)),h=Hu(d).force(`center`,ru(s,c).strength(u?.06:.12)).force(`charge`,Uu().strength(m).distanceMax(500)).force(`collide`,Au(100).strength(.9).iterations(3)).force(`link`,Nu(r).id(e=>e.id).distance(p).strength(e=>{let t=o.has(e.source.id??e.source),n=o.has(e.target.id??e.target);return t||n?.6:.35})).alphaDecay(.035).velocityDecay(.35).stop();for(let e=0;e<120;e++)h.tick();let g=new Map;for(let e of d)g.set(e.id,{x:e.x??0,y:e.y??0});return e.map(e=>{let t=g.get(e.id);return t?{...e,position:t}:e})}function uh(e){let t=new Map;for(let n of e)n.type===`directoryGroup`&&t.set(n.id,n.position);function n(n){let r=n.position.x,i=n.position.y,a=n.parentNode,o=new Set;for(;a&&!o.has(a);){o.add(a);let n=t.get(a);n&&(r+=n.x,i+=n.y),a=e.find(e=>e.id===a)?.parentNode}return{x:r,y:i}}return e.filter(e=>e.type!==`directoryGroup`).map(e=>{if(!e.parentNode)return e;let t=n(e),{parentNode:r,extent:i,...a}=e;return{...a,position:t}})}function dh(e,t,n,r,i){if(!r)return{nodes:e,edges:t};if(i===`hide`){let r=uh(e).filter(e=>n.has(e.id)),i=new Set(r.map(e=>e.id));return{nodes:r,edges:t.filter(e=>i.has(e.source)&&i.has(e.target))}}return{nodes:e.map(e=>{if(e.type===`directoryGroup`)return e;let t=n.has(e.id);return{...e,style:{...e.style,opacity:t?1:.15,transition:`opacity 0.2s`}}}),edges:t.map(e=>{let t=n.has(e.source)&&n.has(e.target);return{...e,style:{...e.style,opacity:t?1:.08,transition:`opacity 0.2s`},animated:t?e.animated:!1}})}}function fh(e,t,n,r){return n?{nodes:e.map(e=>{if(e.type===`directoryGroup`)return e;let t=e.id===n;return{...e,style:{...e.style,opacity:t?1:.25,boxShadow:t?`0 0 16px 4px rgba(74, 144, 232, 0.6)`:void 0,transition:`opacity 0.3s, box-shadow 0.3s`}}}),edges:t.map(e=>{let t=e.id===r;return{...e,style:{...e.style,opacity:t?1:.1,strokeWidth:t?3:e.style?.strokeWidth??1,transition:`opacity 0.3s, stroke-width 0.3s`},animated:t}})}:{nodes:e,edges:t}}function ph(){let[e,t]=(0,w.useState)(null),[n,r]=(0,w.useState)(`directory`),[i,a]=(0,w.useState)(`LR`),[o,s,c]=Tl([]),[l,u,d]=El([]),[f,p]=(0,w.useState)(null),[m,h]=(0,w.useState)(!0),[g,_]=(0,w.useState)(null),[v,y]=(0,w.useState)(``),[b,x]=(0,w.useState)(new Set),[S,C]=(0,w.useState)(`hide`),[T,E]=(0,w.useState)(2),[D,O]=(0,w.useState)(`controls`),[k,A]=(0,w.useState)(!1),j=(0,w.useRef)(null),M=(0,w.useRef)(null),{fitView:N}=Is(),{settings:P,updateEdgeLabels:F,updateGraph:ee,updateSearch:te,resetEdgeLabels:I,resetGraph:L,resetSearch:R,resetAll:ne}=ih(),re=(0,w.useRef)(!1);(0,w.useEffect)(()=>{re.current||(re.current=!0,C(P.search.defaultFilterMode),E(P.search.defaultDepth))},[]);let[ie,ae]=(0,w.useState)([]),[oe,se]=(0,w.useState)([]),ce=n===`force`,{exportPng:le,exportSvg:ue,exportJson:de,exportGif:fe,gifProgress:z}=Hm(e),B=Wm(),pe=Xm(e),me=(0,w.useMemo)(()=>{if(!e)return[];let t=new Set(e.nodes.map(e=>e.type));return Array.from(t).sort()},[e]);(0,w.useEffect)(()=>{me.length>0&&b.size===0&&x(new Set(me))},[me]);let V=v!==``||b.size!==me.length,he=(0,w.useMemo)(()=>{if(!e)return new Set;let t=sh(e,v,b);return v!==``&&t.size>0&&(t=ch(t,e.edges,T)),t},[e,v,b,T]),{onNodeDrag:ge,onNodeDragStop:_e}=cp({graphData:e,active:ce,setNodes:s,setEdges:u,matchingIds:he,isFiltering:V,filterMode:S});(0,w.useEffect)(()=>{fetch(`/api/graph`).then(e=>e.json()).then(e=>{t(e),h(!1)}).catch(e=>{_(String(e)),h(!1)})},[]),(0,w.useEffect)(()=>{if(!e)return;if(ce){ae([]),se([]),setTimeout(()=>N({padding:.1}),200);return}let t=lf(n,e,{mindmapDirection:i});ae(t.nodes),se(t.edges),setTimeout(()=>N({padding:.1}),50)},[e,n,i]);let ve=(0,w.useCallback)(e=>{let{showImportLabels:t,showLinksToLabels:n,showEmbedsLabels:r,showHttpLabels:i,labelColor:a,labelFontSize:o}=P.edgeLabels;return e.map(e=>{let s=typeof e.label==`string`?e.label:``,c=!1;return s===`imports`&&!t&&(c=!0),s===`links to`&&!n&&(c=!0),s===`embeds`&&!r&&(c=!0),/^(GET|POST|PUT|PATCH|DELETE|HEAD|OPTIONS)\s+/i.test(s)&&!i&&(c=!0),{...e,label:c?void 0:e.label,labelStyle:c?void 0:{...e.labelStyle??{},fill:a,fontSize:o}}})},[P.edgeLabels]),ye=(0,w.useCallback)(()=>{k||(A(!0),j.current&&clearTimeout(j.current),s(e=>{let t=lh(uh(e),l),r=new Map;for(let e of t)r.set(e.id,e.position);return M.current={positions:r,fingerprint:`${n}|${v}|${S}|${Array.from(b).sort().join(`,`)}|${T}`},t}),j.current=setTimeout(()=>{A(!1),j.current=null,N({padding:.15,duration:350})},500))},[k,l,N,s,n,v,S,b,T]);(0,w.useEffect)(()=>{if(!e||ce)return;let{nodes:t,edges:r}=dh(ie,oe,he,V,S),i=M.current,a=`${n}|${v}|${S}|${Array.from(b).sort().join(`,`)}|${T}`;if(i&&i.fingerprint===a?t=t.map(e=>{let t=i.positions.get(e.id);return t?{...e,position:t}:e}):i&&i.fingerprint!==a&&(M.current=null),r=ve(r),pe.isTracing&&pe.currentStep){let e=fh(t,r,pe.currentStep.nodeId,pe.currentStep.edgeId);t=e.nodes,r=e.edges}let o=new Set(t.map(e=>e.id));r=r.filter(e=>o.has(e.source)&&o.has(e.target)),s(t),u(r)},[ie,oe,he,V,ce,S,pe.isTracing,pe.currentStep,ve,n,v,b,T]);let be=he.size,xe=(0,w.useCallback)(e=>{x(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),Se=(0,w.useCallback)((e,t)=>{t.data.omniNode&&(p(t.data.omniNode),O(`controls`))},[]),Ce=(0,w.useCallback)((e,t)=>{if(t.id.startsWith(`e-http-`)&&t.data?.omniEdge){let e=t.data.omniEdge,n=e.label.match(/^(GET|POST|PUT|PATCH|DELETE|HEAD|OPTIONS)\s+(.+)$/i);n?B.prefill(n[1].toUpperCase(),n[2]):B.prefill(`GET`,e.label),O(`api-client`),pe.startTrace(e)}},[B,pe]),we=(0,w.useCallback)(()=>{p(null)},[]),Te=(0,w.useCallback)(()=>{if(pe.trace){let e=pe.trace.steps.find(e=>e.type===`http-call`);if(e){let t=e.description.match(/Makes\s+(GET|POST|PUT|PATCH|DELETE|HEAD|OPTIONS)\s+(.+)\s+call$/i);t&&B.prefill(t[1].toUpperCase(),t[2])}}O(`api-client`)},[pe.trace,B]);if(m)return(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,height:`100vh`,background:`#1a1a2e`,color:`#fff`},children:(0,$.jsx)(`p`,{children:`Analyzing codebase…`})});if(g)return(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,height:`100vh`,background:`#1a1a2e`,color:`#e8534a`},children:(0,$.jsxs)(`p`,{children:[`Error: `,g]})});let Ee=k&&!ce&&P.graph.animateTransitions;return(0,$.jsxs)(`div`,{style:{display:`flex`,height:`100vh`,background:`#1a1a2e`},children:[Ee&&(0,$.jsx)(`style`,{children:oh}),(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`},children:[(0,$.jsxs)(Cl,{className:Ee?`compact-transition`:``,nodes:o,edges:l,onNodesChange:c,onEdgesChange:d,onNodeClick:z.active?void 0:Se,onEdgeClick:z.active?void 0:Ce,onNodeDrag:z.active?void 0:ce?ge:void 0,onNodeDragStop:z.active?void 0:ce?_e:void 0,onPaneClick:z.active?void 0:we,nodeTypes:ah,panOnDrag:!z.active,zoomOnScroll:!z.active,zoomOnDoubleClick:!z.active,zoomOnPinch:!z.active,nodesDraggable:!z.active,nodesConnectable:!1,elementsSelectable:!z.active,minZoom:.05,maxZoom:2,fitView:!0,children:[(0,$.jsx)(nu,{color:`#333`,gap:16}),(0,$.jsx)(Jl,{}),P.graph.minimapVisible&&(0,$.jsx)(zl,{nodeColor:e=>Gu[e.data?.omniNode?.type]??`#888`,style:{background:`#0d0d1e`},zoomable:!0,pannable:!0,maskColor:`rgba(10, 10, 30, 0.7)`})]}),z.active&&(0,$.jsxs)(`div`,{style:{position:`absolute`,inset:0,background:`rgba(10, 10, 30, 0.75)`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,zIndex:50,pointerEvents:`all`},children:[(0,$.jsx)(`div`,{style:{width:56,height:56,border:`4px solid rgba(74, 144, 232, 0.2)`,borderTopColor:`#4a90e8`,borderRadius:`50%`,animation:`omnigraph-spin 0.8s linear infinite`,marginBottom:20}}),(0,$.jsx)(`div`,{style:{color:`#fff`,fontSize:16,fontWeight:600,marginBottom:8},children:`Exporting to GIF`}),(0,$.jsx)(`div`,{style:{color:`#aaa`,fontSize:13,marginBottom:16},children:z.message}),(0,$.jsx)(`div`,{style:{width:240,height:6,background:`rgba(255,255,255,0.1)`,borderRadius:3,overflow:`hidden`},children:(0,$.jsx)(`div`,{style:{height:`100%`,width:`${z.percent}%`,background:`linear-gradient(90deg, #4a90e8, #63b3ed)`,borderRadius:3,transition:`width 0.2s ease`}})}),(0,$.jsxs)(`div`,{style:{color:`#666`,fontSize:11,marginTop:6},children:[z.percent,`%`]})]}),z.active&&(0,$.jsx)(`style`,{children:`
|
|
20
|
+
@keyframes omnigraph-spin {
|
|
21
|
+
to { transform: rotate(360deg); }
|
|
22
|
+
}
|
|
23
|
+
`})]}),(0,$.jsx)(ip,{activeTab:D,onTabChange:O,layoutPreset:n,onLayoutChange:r,mindmapDirection:i,onDirectionChange:a,searchQuery:v,onSearchChange:y,searchFilterMode:S,onSearchFilterModeChange:C,searchDepth:T,onSearchDepthChange:E,activeTypes:b,onTypeToggle:xe,availableTypes:me,matchCount:be,totalCount:e?.nodes.length??0,onCompact:ye,isCompacting:k,selectedNode:f,onCloseInspector:()=>p(null),onExportPng:le,onExportSvg:ue,onExportJson:de,onExportGif:fe,apiRequest:B.request,apiResponse:B.response,apiLoading:B.loading,apiError:B.error,onApiMethodChange:B.setMethod,onApiUrlChange:B.setUrl,onApiSetHeader:B.setHeader,onApiRemoveHeader:B.removeHeader,onApiSetQueryParam:B.setQueryParam,onApiRemoveQueryParam:B.removeQueryParam,onApiBodyChange:B.setBody,onApiSend:B.send,onApiReset:B.reset,flowTrace:pe.trace,flowCurrentStepIndex:pe.currentStepIndex,onFlowStepForward:pe.stepForward,onFlowStepBackward:pe.stepBackward,onFlowGoToStep:pe.goToStep,onFlowStop:()=>{pe.stopTrace(),O(`controls`)},onFlowOpenInApiClient:Te,settings:P,onUpdateEdgeLabels:F,onUpdateGraph:ee,onUpdateSearch:te,onResetEdgeLabels:I,onResetGraph:L,onResetSearch:R,onResetAll:ne})]})}function mh(){return(0,$.jsx)(hl,{children:(0,$.jsx)(ph,{})})}Wu.createRoot(document.getElementById(`root`)).render((0,$.jsx)(w.StrictMode,{children:(0,$.jsx)(mh,{})}));
|