@launchsecure/launch-kit 0.0.12 → 0.0.14

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.
@@ -1,404 +0,0 @@
1
- function EP(e,n){for(var r=0;r<n.length;r++){const o=n[r];if(typeof o!="string"&&!Array.isArray(o)){for(const i in o)if(i!=="default"&&!(i in e)){const s=Object.getOwnPropertyDescriptor(o,i);s&&Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>o[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))o(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&o(a)}).observe(document,{childList:!0,subtree:!0});function r(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function o(i){if(i.ep)return;i.ep=!0;const s=r(i);fetch(i.href,s)}})();function su(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ew={exports:{}},au={},tw={exports:{}},fe={};/**
2
- * @license React
3
- * react.production.min.js
4
- *
5
- * Copyright (c) Facebook, Inc. and its affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var ha=Symbol.for("react.element"),kP=Symbol.for("react.portal"),NP=Symbol.for("react.fragment"),PP=Symbol.for("react.strict_mode"),MP=Symbol.for("react.profiler"),RP=Symbol.for("react.provider"),jP=Symbol.for("react.context"),AP=Symbol.for("react.forward_ref"),TP=Symbol.for("react.suspense"),IP=Symbol.for("react.memo"),$P=Symbol.for("react.lazy"),Gg=Symbol.iterator;function OP(e){return e===null||typeof e!="object"?null:(e=Gg&&e[Gg]||e["@@iterator"],typeof e=="function"?e:null)}var nw={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},rw=Object.assign,ow={};function Mi(e,n,r){this.props=e,this.context=n,this.refs=ow,this.updater=r||nw}Mi.prototype.isReactComponent={};Mi.prototype.setState=function(e,n){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,n,"setState")};Mi.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function iw(){}iw.prototype=Mi.prototype;function hh(e,n,r){this.props=e,this.context=n,this.refs=ow,this.updater=r||nw}var mh=hh.prototype=new iw;mh.constructor=hh;rw(mh,Mi.prototype);mh.isPureReactComponent=!0;var Yg=Array.isArray,sw=Object.prototype.hasOwnProperty,gh={current:null},aw={key:!0,ref:!0,__self:!0,__source:!0};function lw(e,n,r){var o,i={},s=null,a=null;if(n!=null)for(o in n.ref!==void 0&&(a=n.ref),n.key!==void 0&&(s=""+n.key),n)sw.call(n,o)&&!aw.hasOwnProperty(o)&&(i[o]=n[o]);var l=arguments.length-2;if(l===1)i.children=r;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];i.children=c}if(e&&e.defaultProps)for(o in l=e.defaultProps,l)i[o]===void 0&&(i[o]=l[o]);return{$$typeof:ha,type:e,key:s,ref:a,props:i,_owner:gh.current}}function DP(e,n){return{$$typeof:ha,type:e.type,key:n,ref:e.ref,props:e.props,_owner:e._owner}}function yh(e){return typeof e=="object"&&e!==null&&e.$$typeof===ha}function LP(e){var n={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return n[r]})}var Xg=/\/+/g;function yd(e,n){return typeof e=="object"&&e!==null&&e.key!=null?LP(""+e.key):n.toString(36)}function Al(e,n,r,o,i){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(s){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case ha:case kP:a=!0}}if(a)return a=e,i=i(a),e=o===""?"."+yd(a,0):o,Yg(i)?(r="",e!=null&&(r=e.replace(Xg,"$&/")+"/"),Al(i,n,r,"",function(u){return u})):i!=null&&(yh(i)&&(i=DP(i,r+(!i.key||a&&a.key===i.key?"":(""+i.key).replace(Xg,"$&/")+"/")+e)),n.push(i)),1;if(a=0,o=o===""?".":o+":",Yg(e))for(var l=0;l<e.length;l++){s=e[l];var c=o+yd(s,l);a+=Al(s,n,r,c,i)}else if(c=OP(e),typeof c=="function")for(e=c.call(e),l=0;!(s=e.next()).done;)s=s.value,c=o+yd(s,l++),a+=Al(s,n,r,c,i);else if(s==="object")throw n=String(e),Error("Objects are not valid as a React child (found: "+(n==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":n)+"). If you meant to render a collection of children, use an array instead.");return a}function Ha(e,n,r){if(e==null)return e;var o=[],i=0;return Al(e,o,"","",function(s){return n.call(r,s,i++)}),o}function zP(e){if(e._status===-1){var n=e._result;n=n(),n.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var st={current:null},Tl={transition:null},FP={ReactCurrentDispatcher:st,ReactCurrentBatchConfig:Tl,ReactCurrentOwner:gh};function cw(){throw Error("act(...) is not supported in production builds of React.")}fe.Children={map:Ha,forEach:function(e,n,r){Ha(e,function(){n.apply(this,arguments)},r)},count:function(e){var n=0;return Ha(e,function(){n++}),n},toArray:function(e){return Ha(e,function(n){return n})||[]},only:function(e){if(!yh(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};fe.Component=Mi;fe.Fragment=NP;fe.Profiler=MP;fe.PureComponent=hh;fe.StrictMode=PP;fe.Suspense=TP;fe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=FP;fe.act=cw;fe.cloneElement=function(e,n,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var o=rw({},e.props),i=e.key,s=e.ref,a=e._owner;if(n!=null){if(n.ref!==void 0&&(s=n.ref,a=gh.current),n.key!==void 0&&(i=""+n.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in n)sw.call(n,c)&&!aw.hasOwnProperty(c)&&(o[c]=n[c]===void 0&&l!==void 0?l[c]:n[c])}var c=arguments.length-2;if(c===1)o.children=r;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];o.children=l}return{$$typeof:ha,type:e.type,key:i,ref:s,props:o,_owner:a}};fe.createContext=function(e){return e={$$typeof:jP,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:RP,_context:e},e.Consumer=e};fe.createElement=lw;fe.createFactory=function(e){var n=lw.bind(null,e);return n.type=e,n};fe.createRef=function(){return{current:null}};fe.forwardRef=function(e){return{$$typeof:AP,render:e}};fe.isValidElement=yh;fe.lazy=function(e){return{$$typeof:$P,_payload:{_status:-1,_result:e},_init:zP}};fe.memo=function(e,n){return{$$typeof:IP,type:e,compare:n===void 0?null:n}};fe.startTransition=function(e){var n=Tl.transition;Tl.transition={};try{e()}finally{Tl.transition=n}};fe.unstable_act=cw;fe.useCallback=function(e,n){return st.current.useCallback(e,n)};fe.useContext=function(e){return st.current.useContext(e)};fe.useDebugValue=function(){};fe.useDeferredValue=function(e){return st.current.useDeferredValue(e)};fe.useEffect=function(e,n){return st.current.useEffect(e,n)};fe.useId=function(){return st.current.useId()};fe.useImperativeHandle=function(e,n,r){return st.current.useImperativeHandle(e,n,r)};fe.useInsertionEffect=function(e,n){return st.current.useInsertionEffect(e,n)};fe.useLayoutEffect=function(e,n){return st.current.useLayoutEffect(e,n)};fe.useMemo=function(e,n){return st.current.useMemo(e,n)};fe.useReducer=function(e,n,r){return st.current.useReducer(e,n,r)};fe.useRef=function(e){return st.current.useRef(e)};fe.useState=function(e){return st.current.useState(e)};fe.useSyncExternalStore=function(e,n,r){return st.current.useSyncExternalStore(e,n,r)};fe.useTransition=function(){return st.current.useTransition()};fe.version="18.3.1";tw.exports=fe;var h=tw.exports;const Je=su(h),lu=EP({__proto__:null,default:Je},[h]);/**
10
- * @license React
11
- * react-jsx-runtime.production.min.js
12
- *
13
- * Copyright (c) Facebook, Inc. and its affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */var VP=h,BP=Symbol.for("react.element"),HP=Symbol.for("react.fragment"),WP=Object.prototype.hasOwnProperty,UP=VP.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,GP={key:!0,ref:!0,__self:!0,__source:!0};function uw(e,n,r){var o,i={},s=null,a=null;r!==void 0&&(s=""+r),n.key!==void 0&&(s=""+n.key),n.ref!==void 0&&(a=n.ref);for(o in n)WP.call(n,o)&&!GP.hasOwnProperty(o)&&(i[o]=n[o]);if(e&&e.defaultProps)for(o in n=e.defaultProps,n)i[o]===void 0&&(i[o]=n[o]);return{$$typeof:BP,type:e,key:s,ref:a,props:i,_owner:UP.current}}au.Fragment=HP;au.jsx=uw;au.jsxs=uw;ew.exports=au;var g=ew.exports,Ef={},dw={exports:{}},Rt={},fw={exports:{}},pw={};/**
18
- * @license React
19
- * scheduler.production.min.js
20
- *
21
- * Copyright (c) Facebook, Inc. and its affiliates.
22
- *
23
- * This source code is licensed under the MIT license found in the
24
- * LICENSE file in the root directory of this source tree.
25
- */(function(e){function n(R,j){var O=R.length;R.push(j);e:for(;0<O;){var G=O-1>>>1,$=R[G];if(0<i($,j))R[G]=j,R[O]=$,O=G;else break e}}function r(R){return R.length===0?null:R[0]}function o(R){if(R.length===0)return null;var j=R[0],O=R.pop();if(O!==j){R[0]=O;e:for(var G=0,$=R.length,X=$>>>1;G<X;){var H=2*(G+1)-1,W=R[H],z=H+1,U=R[z];if(0>i(W,O))z<$&&0>i(U,W)?(R[G]=U,R[z]=O,G=z):(R[G]=W,R[H]=O,G=H);else if(z<$&&0>i(U,O))R[G]=U,R[z]=O,G=z;else break e}}return j}function i(R,j){var O=R.sortIndex-j.sortIndex;return O!==0?O:R.id-j.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var a=Date,l=a.now();e.unstable_now=function(){return a.now()-l}}var c=[],u=[],f=1,d=null,p=3,m=!1,y=!1,b=!1,_=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(R){for(var j=r(u);j!==null;){if(j.callback===null)o(u);else if(j.startTime<=R)o(u),j.sortIndex=j.expirationTime,n(c,j);else break;j=r(u)}}function S(R){if(b=!1,w(R),!y)if(r(c)!==null)y=!0,I(C);else{var j=r(u);j!==null&&F(S,j.startTime-R)}}function C(R,j){y=!1,b&&(b=!1,v(N),N=-1),m=!0;var O=p;try{for(w(j),d=r(c);d!==null&&(!(d.expirationTime>j)||R&&!A());){var G=d.callback;if(typeof G=="function"){d.callback=null,p=d.priorityLevel;var $=G(d.expirationTime<=j);j=e.unstable_now(),typeof $=="function"?d.callback=$:d===r(c)&&o(c),w(j)}else o(c);d=r(c)}if(d!==null)var X=!0;else{var H=r(u);H!==null&&F(S,H.startTime-j),X=!1}return X}finally{d=null,p=O,m=!1}}var E=!1,k=null,N=-1,M=5,T=-1;function A(){return!(e.unstable_now()-T<M)}function D(){if(k!==null){var R=e.unstable_now();T=R;var j=!0;try{j=k(!0,R)}finally{j?V():(E=!1,k=null)}}else E=!1}var V;if(typeof x=="function")V=function(){x(D)};else if(typeof MessageChannel<"u"){var P=new MessageChannel,L=P.port2;P.port1.onmessage=D,V=function(){L.postMessage(null)}}else V=function(){_(D,0)};function I(R){k=R,E||(E=!0,V())}function F(R,j){N=_(function(){R(e.unstable_now())},j)}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(R){R.callback=null},e.unstable_continueExecution=function(){y||m||(y=!0,I(C))},e.unstable_forceFrameRate=function(R){0>R||125<R?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<R?Math.floor(1e3/R):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return r(c)},e.unstable_next=function(R){switch(p){case 1:case 2:case 3:var j=3;break;default:j=p}var O=p;p=j;try{return R()}finally{p=O}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(R,j){switch(R){case 1:case 2:case 3:case 4:case 5:break;default:R=3}var O=p;p=R;try{return j()}finally{p=O}},e.unstable_scheduleCallback=function(R,j,O){var G=e.unstable_now();switch(typeof O=="object"&&O!==null?(O=O.delay,O=typeof O=="number"&&0<O?G+O:G):O=G,R){case 1:var $=-1;break;case 2:$=250;break;case 5:$=1073741823;break;case 4:$=1e4;break;default:$=5e3}return $=O+$,R={id:f++,callback:j,priorityLevel:R,startTime:O,expirationTime:$,sortIndex:-1},O>G?(R.sortIndex=O,n(u,R),r(c)===null&&R===r(u)&&(b?(v(N),N=-1):b=!0,F(S,O-G))):(R.sortIndex=$,n(c,R),y||m||(y=!0,I(C))),R},e.unstable_shouldYield=A,e.unstable_wrapCallback=function(R){var j=p;return function(){var O=p;p=j;try{return R.apply(this,arguments)}finally{p=O}}}})(pw);fw.exports=pw;var YP=fw.exports;/**
26
- * @license React
27
- * react-dom.production.min.js
28
- *
29
- * Copyright (c) Facebook, Inc. and its affiliates.
30
- *
31
- * This source code is licensed under the MIT license found in the
32
- * LICENSE file in the root directory of this source tree.
33
- */var XP=h,Pt=YP;function q(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)n+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var hw=new Set,Is={};function wo(e,n){ci(e,n),ci(e+"Capture",n)}function ci(e,n){for(Is[e]=n,e=0;e<n.length;e++)hw.add(n[e])}var Hn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),kf=Object.prototype.hasOwnProperty,KP=/^[: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]*$/,Kg={},qg={};function qP(e){return kf.call(qg,e)?!0:kf.call(Kg,e)?!1:KP.test(e)?qg[e]=!0:(Kg[e]=!0,!1)}function ZP(e,n,r,o){if(r!==null&&r.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return o?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function QP(e,n,r,o){if(n===null||typeof n>"u"||ZP(e,n,r,o))return!0;if(o)return!1;if(r!==null)switch(r.type){case 3:return!n;case 4:return n===!1;case 5:return isNaN(n);case 6:return isNaN(n)||1>n}return!1}function at(e,n,r,o,i,s,a){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=o,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=e,this.type=n,this.sanitizeURL=s,this.removeEmptyString=a}var Xe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Xe[e]=new at(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];Xe[n]=new at(n,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Xe[e]=new at(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Xe[e]=new at(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){Xe[e]=new at(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Xe[e]=new at(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Xe[e]=new at(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Xe[e]=new at(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Xe[e]=new at(e,5,!1,e.toLowerCase(),null,!1,!1)});var vh=/[\-:]([a-z])/g;function xh(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var n=e.replace(vh,xh);Xe[n]=new at(n,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var n=e.replace(vh,xh);Xe[n]=new at(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var n=e.replace(vh,xh);Xe[n]=new at(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Xe[e]=new at(e,1,!1,e.toLowerCase(),null,!1,!1)});Xe.xlinkHref=new at("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Xe[e]=new at(e,1,!1,e.toLowerCase(),null,!0,!0)});function wh(e,n,r,o){var i=Xe.hasOwnProperty(n)?Xe[n]:null;(i!==null?i.type!==0:o||!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(QP(n,r,i,o)&&(r=null),o||i===null?qP(n)&&(r===null?e.removeAttribute(n):e.setAttribute(n,""+r)):i.mustUseProperty?e[i.propertyName]=r===null?i.type===3?!1:"":r:(n=i.attributeName,o=i.attributeNamespace,r===null?e.removeAttribute(n):(i=i.type,r=i===3||i===4&&r===!0?"":""+r,o?e.setAttributeNS(o,n,r):e.setAttribute(n,r))))}var qn=XP.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Wa=Symbol.for("react.element"),zo=Symbol.for("react.portal"),Fo=Symbol.for("react.fragment"),bh=Symbol.for("react.strict_mode"),Nf=Symbol.for("react.profiler"),mw=Symbol.for("react.provider"),gw=Symbol.for("react.context"),_h=Symbol.for("react.forward_ref"),Pf=Symbol.for("react.suspense"),Mf=Symbol.for("react.suspense_list"),Sh=Symbol.for("react.memo"),cr=Symbol.for("react.lazy"),yw=Symbol.for("react.offscreen"),Zg=Symbol.iterator;function Wi(e){return e===null||typeof e!="object"?null:(e=Zg&&e[Zg]||e["@@iterator"],typeof e=="function"?e:null)}var $e=Object.assign,vd;function cs(e){if(vd===void 0)try{throw Error()}catch(r){var n=r.stack.trim().match(/\n( *(at )?)/);vd=n&&n[1]||""}return`
34
- `+vd+e}var xd=!1;function wd(e,n){if(!e||xd)return"";xd=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(n)if(n=function(){throw Error()},Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(n,[])}catch(u){var o=u}Reflect.construct(e,[],n)}else{try{n.call()}catch(u){o=u}e.call(n.prototype)}else{try{throw Error()}catch(u){o=u}e()}}catch(u){if(u&&o&&typeof u.stack=="string"){for(var i=u.stack.split(`
35
- `),s=o.stack.split(`
36
- `),a=i.length-1,l=s.length-1;1<=a&&0<=l&&i[a]!==s[l];)l--;for(;1<=a&&0<=l;a--,l--)if(i[a]!==s[l]){if(a!==1||l!==1)do if(a--,l--,0>l||i[a]!==s[l]){var c=`
37
- `+i[a].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=a&&0<=l);break}}}finally{xd=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?cs(e):""}function JP(e){switch(e.tag){case 5:return cs(e.type);case 16:return cs("Lazy");case 13:return cs("Suspense");case 19:return cs("SuspenseList");case 0:case 2:case 15:return e=wd(e.type,!1),e;case 11:return e=wd(e.type.render,!1),e;case 1:return e=wd(e.type,!0),e;default:return""}}function Rf(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 Fo:return"Fragment";case zo:return"Portal";case Nf:return"Profiler";case bh:return"StrictMode";case Pf:return"Suspense";case Mf:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case gw:return(e.displayName||"Context")+".Consumer";case mw:return(e._context.displayName||"Context")+".Provider";case _h:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Sh:return n=e.displayName||null,n!==null?n:Rf(e.type)||"Memo";case cr:n=e._payload,e=e._init;try{return Rf(e(n))}catch{}}return null}function eM(e){var n=e.type;switch(e.tag){case 24:return"Cache";case 9:return(n.displayName||"Context")+".Consumer";case 10:return(n._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=n.render,e=e.displayName||e.name||"",n.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Rf(n);case 8:return n===bh?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n}return null}function Mr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function vw(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function tM(e){var n=vw(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),o=""+e[n];if(!e.hasOwnProperty(n)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,s=r.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return i.call(this)},set:function(a){o=""+a,s.call(this,a)}}),Object.defineProperty(e,n,{enumerable:r.enumerable}),{getValue:function(){return o},setValue:function(a){o=""+a},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function Ua(e){e._valueTracker||(e._valueTracker=tM(e))}function xw(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var r=n.getValue(),o="";return e&&(o=vw(e)?e.checked?"true":"false":e.value),e=o,e!==r?(n.setValue(e),!0):!1}function tc(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function jf(e,n){var r=n.checked;return $e({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function Qg(e,n){var r=n.defaultValue==null?"":n.defaultValue,o=n.checked!=null?n.checked:n.defaultChecked;r=Mr(n.value!=null?n.value:r),e._wrapperState={initialChecked:o,initialValue:r,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function ww(e,n){n=n.checked,n!=null&&wh(e,"checked",n,!1)}function Af(e,n){ww(e,n);var r=Mr(n.value),o=n.type;if(r!=null)o==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(o==="submit"||o==="reset"){e.removeAttribute("value");return}n.hasOwnProperty("value")?Tf(e,n.type,r):n.hasOwnProperty("defaultValue")&&Tf(e,n.type,Mr(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(e.defaultChecked=!!n.defaultChecked)}function Jg(e,n,r){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var o=n.type;if(!(o!=="submit"&&o!=="reset"||n.value!==void 0&&n.value!==null))return;n=""+e._wrapperState.initialValue,r||n===e.value||(e.value=n),e.defaultValue=n}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function Tf(e,n,r){(n!=="number"||tc(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var us=Array.isArray;function Jo(e,n,r,o){if(e=e.options,n){n={};for(var i=0;i<r.length;i++)n["$"+r[i]]=!0;for(r=0;r<e.length;r++)i=n.hasOwnProperty("$"+e[r].value),e[r].selected!==i&&(e[r].selected=i),i&&o&&(e[r].defaultSelected=!0)}else{for(r=""+Mr(r),n=null,i=0;i<e.length;i++){if(e[i].value===r){e[i].selected=!0,o&&(e[i].defaultSelected=!0);return}n!==null||e[i].disabled||(n=e[i])}n!==null&&(n.selected=!0)}}function If(e,n){if(n.dangerouslySetInnerHTML!=null)throw Error(q(91));return $e({},n,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ey(e,n){var r=n.value;if(r==null){if(r=n.children,n=n.defaultValue,r!=null){if(n!=null)throw Error(q(92));if(us(r)){if(1<r.length)throw Error(q(93));r=r[0]}n=r}n==null&&(n=""),r=n}e._wrapperState={initialValue:Mr(r)}}function bw(e,n){var r=Mr(n.value),o=Mr(n.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),n.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),o!=null&&(e.defaultValue=""+o)}function ty(e){var n=e.textContent;n===e._wrapperState.initialValue&&n!==""&&n!==null&&(e.value=n)}function _w(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 $f(e,n){return e==null||e==="http://www.w3.org/1999/xhtml"?_w(n):e==="http://www.w3.org/2000/svg"&&n==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Ga,Sw=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(n,r,o,i){MSApp.execUnsafeLocalFunction(function(){return e(n,r,o,i)})}:e}(function(e,n){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=n;else{for(Ga=Ga||document.createElement("div"),Ga.innerHTML="<svg>"+n.valueOf().toString()+"</svg>",n=Ga.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}});function $s(e,n){if(n){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=n;return}}e.textContent=n}var xs={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},nM=["Webkit","ms","Moz","O"];Object.keys(xs).forEach(function(e){nM.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),xs[n]=xs[e]})});function Cw(e,n,r){return n==null||typeof n=="boolean"||n===""?"":r||typeof n!="number"||n===0||xs.hasOwnProperty(e)&&xs[e]?(""+n).trim():n+"px"}function Ew(e,n){e=e.style;for(var r in n)if(n.hasOwnProperty(r)){var o=r.indexOf("--")===0,i=Cw(r,n[r],o);r==="float"&&(r="cssFloat"),o?e.setProperty(r,i):e[r]=i}}var rM=$e({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 Of(e,n){if(n){if(rM[e]&&(n.children!=null||n.dangerouslySetInnerHTML!=null))throw Error(q(137,e));if(n.dangerouslySetInnerHTML!=null){if(n.children!=null)throw Error(q(60));if(typeof n.dangerouslySetInnerHTML!="object"||!("__html"in n.dangerouslySetInnerHTML))throw Error(q(61))}if(n.style!=null&&typeof n.style!="object")throw Error(q(62))}}function Df(e,n){if(e.indexOf("-")===-1)return typeof n.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Lf=null;function Ch(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var zf=null,ei=null,ti=null;function ny(e){if(e=ya(e)){if(typeof zf!="function")throw Error(q(280));var n=e.stateNode;n&&(n=pu(n),zf(e.stateNode,e.type,n))}}function kw(e){ei?ti?ti.push(e):ti=[e]:ei=e}function Nw(){if(ei){var e=ei,n=ti;if(ti=ei=null,ny(e),n)for(e=0;e<n.length;e++)ny(n[e])}}function Pw(e,n){return e(n)}function Mw(){}var bd=!1;function Rw(e,n,r){if(bd)return e(n,r);bd=!0;try{return Pw(e,n,r)}finally{bd=!1,(ei!==null||ti!==null)&&(Mw(),Nw())}}function Os(e,n){var r=e.stateNode;if(r===null)return null;var o=pu(r);if(o===null)return null;r=o[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(q(231,n,typeof r));return r}var Ff=!1;if(Hn)try{var Ui={};Object.defineProperty(Ui,"passive",{get:function(){Ff=!0}}),window.addEventListener("test",Ui,Ui),window.removeEventListener("test",Ui,Ui)}catch{Ff=!1}function oM(e,n,r,o,i,s,a,l,c){var u=Array.prototype.slice.call(arguments,3);try{n.apply(r,u)}catch(f){this.onError(f)}}var ws=!1,nc=null,rc=!1,Vf=null,iM={onError:function(e){ws=!0,nc=e}};function sM(e,n,r,o,i,s,a,l,c){ws=!1,nc=null,oM.apply(iM,arguments)}function aM(e,n,r,o,i,s,a,l,c){if(sM.apply(this,arguments),ws){if(ws){var u=nc;ws=!1,nc=null}else throw Error(q(198));rc||(rc=!0,Vf=u)}}function bo(e){var n=e,r=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,n.flags&4098&&(r=n.return),e=n.return;while(e)}return n.tag===3?r:null}function jw(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function ry(e){if(bo(e)!==e)throw Error(q(188))}function lM(e){var n=e.alternate;if(!n){if(n=bo(e),n===null)throw Error(q(188));return n!==e?null:e}for(var r=e,o=n;;){var i=r.return;if(i===null)break;var s=i.alternate;if(s===null){if(o=i.return,o!==null){r=o;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===r)return ry(i),e;if(s===o)return ry(i),n;s=s.sibling}throw Error(q(188))}if(r.return!==o.return)r=i,o=s;else{for(var a=!1,l=i.child;l;){if(l===r){a=!0,r=i,o=s;break}if(l===o){a=!0,o=i,r=s;break}l=l.sibling}if(!a){for(l=s.child;l;){if(l===r){a=!0,r=s,o=i;break}if(l===o){a=!0,o=s,r=i;break}l=l.sibling}if(!a)throw Error(q(189))}}if(r.alternate!==o)throw Error(q(190))}if(r.tag!==3)throw Error(q(188));return r.stateNode.current===r?e:n}function Aw(e){return e=lM(e),e!==null?Tw(e):null}function Tw(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var n=Tw(e);if(n!==null)return n;e=e.sibling}return null}var Iw=Pt.unstable_scheduleCallback,oy=Pt.unstable_cancelCallback,cM=Pt.unstable_shouldYield,uM=Pt.unstable_requestPaint,De=Pt.unstable_now,dM=Pt.unstable_getCurrentPriorityLevel,Eh=Pt.unstable_ImmediatePriority,$w=Pt.unstable_UserBlockingPriority,oc=Pt.unstable_NormalPriority,fM=Pt.unstable_LowPriority,Ow=Pt.unstable_IdlePriority,cu=null,xn=null;function pM(e){if(xn&&typeof xn.onCommitFiberRoot=="function")try{xn.onCommitFiberRoot(cu,e,void 0,(e.current.flags&128)===128)}catch{}}var rn=Math.clz32?Math.clz32:gM,hM=Math.log,mM=Math.LN2;function gM(e){return e>>>=0,e===0?32:31-(hM(e)/mM|0)|0}var Ya=64,Xa=4194304;function ds(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 ic(e,n){var r=e.pendingLanes;if(r===0)return 0;var o=0,i=e.suspendedLanes,s=e.pingedLanes,a=r&268435455;if(a!==0){var l=a&~i;l!==0?o=ds(l):(s&=a,s!==0&&(o=ds(s)))}else a=r&~i,a!==0?o=ds(a):s!==0&&(o=ds(s));if(o===0)return 0;if(n!==0&&n!==o&&!(n&i)&&(i=o&-o,s=n&-n,i>=s||i===16&&(s&4194240)!==0))return n;if(o&4&&(o|=r&16),n=e.entangledLanes,n!==0)for(e=e.entanglements,n&=o;0<n;)r=31-rn(n),i=1<<r,o|=e[r],n&=~i;return o}function yM(e,n){switch(e){case 1:case 2:case 4:return n+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function vM(e,n){for(var r=e.suspendedLanes,o=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var a=31-rn(s),l=1<<a,c=i[a];c===-1?(!(l&r)||l&o)&&(i[a]=yM(l,n)):c<=n&&(e.expiredLanes|=l),s&=~l}}function Bf(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Dw(){var e=Ya;return Ya<<=1,!(Ya&4194240)&&(Ya=64),e}function _d(e){for(var n=[],r=0;31>r;r++)n.push(e);return n}function ma(e,n,r){e.pendingLanes|=n,n!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,n=31-rn(n),e[n]=r}function xM(e,n){var r=e.pendingLanes&~n;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=n,e.mutableReadLanes&=n,e.entangledLanes&=n,n=e.entanglements;var o=e.eventTimes;for(e=e.expirationTimes;0<r;){var i=31-rn(r),s=1<<i;n[i]=0,o[i]=-1,e[i]=-1,r&=~s}}function kh(e,n){var r=e.entangledLanes|=n;for(e=e.entanglements;r;){var o=31-rn(r),i=1<<o;i&n|e[o]&n&&(e[o]|=n),r&=~i}}var we=0;function Lw(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var zw,Nh,Fw,Vw,Bw,Hf=!1,Ka=[],vr=null,xr=null,wr=null,Ds=new Map,Ls=new Map,fr=[],wM="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 iy(e,n){switch(e){case"focusin":case"focusout":vr=null;break;case"dragenter":case"dragleave":xr=null;break;case"mouseover":case"mouseout":wr=null;break;case"pointerover":case"pointerout":Ds.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ls.delete(n.pointerId)}}function Gi(e,n,r,o,i,s){return e===null||e.nativeEvent!==s?(e={blockedOn:n,domEventName:r,eventSystemFlags:o,nativeEvent:s,targetContainers:[i]},n!==null&&(n=ya(n),n!==null&&Nh(n)),e):(e.eventSystemFlags|=o,n=e.targetContainers,i!==null&&n.indexOf(i)===-1&&n.push(i),e)}function bM(e,n,r,o,i){switch(n){case"focusin":return vr=Gi(vr,e,n,r,o,i),!0;case"dragenter":return xr=Gi(xr,e,n,r,o,i),!0;case"mouseover":return wr=Gi(wr,e,n,r,o,i),!0;case"pointerover":var s=i.pointerId;return Ds.set(s,Gi(Ds.get(s)||null,e,n,r,o,i)),!0;case"gotpointercapture":return s=i.pointerId,Ls.set(s,Gi(Ls.get(s)||null,e,n,r,o,i)),!0}return!1}function Hw(e){var n=Zr(e.target);if(n!==null){var r=bo(n);if(r!==null){if(n=r.tag,n===13){if(n=jw(r),n!==null){e.blockedOn=n,Bw(e.priority,function(){Fw(r)});return}}else if(n===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Il(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var r=Wf(e.domEventName,e.eventSystemFlags,n[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var o=new r.constructor(r.type,r);Lf=o,r.target.dispatchEvent(o),Lf=null}else return n=ya(r),n!==null&&Nh(n),e.blockedOn=r,!1;n.shift()}return!0}function sy(e,n,r){Il(e)&&r.delete(n)}function _M(){Hf=!1,vr!==null&&Il(vr)&&(vr=null),xr!==null&&Il(xr)&&(xr=null),wr!==null&&Il(wr)&&(wr=null),Ds.forEach(sy),Ls.forEach(sy)}function Yi(e,n){e.blockedOn===n&&(e.blockedOn=null,Hf||(Hf=!0,Pt.unstable_scheduleCallback(Pt.unstable_NormalPriority,_M)))}function zs(e){function n(i){return Yi(i,e)}if(0<Ka.length){Yi(Ka[0],e);for(var r=1;r<Ka.length;r++){var o=Ka[r];o.blockedOn===e&&(o.blockedOn=null)}}for(vr!==null&&Yi(vr,e),xr!==null&&Yi(xr,e),wr!==null&&Yi(wr,e),Ds.forEach(n),Ls.forEach(n),r=0;r<fr.length;r++)o=fr[r],o.blockedOn===e&&(o.blockedOn=null);for(;0<fr.length&&(r=fr[0],r.blockedOn===null);)Hw(r),r.blockedOn===null&&fr.shift()}var ni=qn.ReactCurrentBatchConfig,sc=!0;function SM(e,n,r,o){var i=we,s=ni.transition;ni.transition=null;try{we=1,Ph(e,n,r,o)}finally{we=i,ni.transition=s}}function CM(e,n,r,o){var i=we,s=ni.transition;ni.transition=null;try{we=4,Ph(e,n,r,o)}finally{we=i,ni.transition=s}}function Ph(e,n,r,o){if(sc){var i=Wf(e,n,r,o);if(i===null)Ad(e,n,o,ac,r),iy(e,o);else if(bM(i,e,n,r,o))o.stopPropagation();else if(iy(e,o),n&4&&-1<wM.indexOf(e)){for(;i!==null;){var s=ya(i);if(s!==null&&zw(s),s=Wf(e,n,r,o),s===null&&Ad(e,n,o,ac,r),s===i)break;i=s}i!==null&&o.stopPropagation()}else Ad(e,n,o,null,r)}}var ac=null;function Wf(e,n,r,o){if(ac=null,e=Ch(o),e=Zr(e),e!==null)if(n=bo(e),n===null)e=null;else if(r=n.tag,r===13){if(e=jw(n),e!==null)return e;e=null}else if(r===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null);return ac=e,null}function Ww(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(dM()){case Eh:return 1;case $w:return 4;case oc:case fM:return 16;case Ow:return 536870912;default:return 16}default:return 16}}var mr=null,Mh=null,$l=null;function Uw(){if($l)return $l;var e,n=Mh,r=n.length,o,i="value"in mr?mr.value:mr.textContent,s=i.length;for(e=0;e<r&&n[e]===i[e];e++);var a=r-e;for(o=1;o<=a&&n[r-o]===i[s-o];o++);return $l=i.slice(e,1<o?1-o:void 0)}function Ol(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function qa(){return!0}function ay(){return!1}function jt(e){function n(r,o,i,s,a){this._reactName=r,this._targetInst=i,this.type=o,this.nativeEvent=s,this.target=a,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(r=e[l],this[l]=r?r(s):s[l]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?qa:ay,this.isPropagationStopped=ay,this}return $e(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=qa)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=qa)},persist:function(){},isPersistent:qa}),n}var Ri={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Rh=jt(Ri),ga=$e({},Ri,{view:0,detail:0}),EM=jt(ga),Sd,Cd,Xi,uu=$e({},ga,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:jh,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!==Xi&&(Xi&&e.type==="mousemove"?(Sd=e.screenX-Xi.screenX,Cd=e.screenY-Xi.screenY):Cd=Sd=0,Xi=e),Sd)},movementY:function(e){return"movementY"in e?e.movementY:Cd}}),ly=jt(uu),kM=$e({},uu,{dataTransfer:0}),NM=jt(kM),PM=$e({},ga,{relatedTarget:0}),Ed=jt(PM),MM=$e({},Ri,{animationName:0,elapsedTime:0,pseudoElement:0}),RM=jt(MM),jM=$e({},Ri,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),AM=jt(jM),TM=$e({},Ri,{data:0}),cy=jt(TM),IM={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},$M={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"},OM={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function DM(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=OM[e])?!!n[e]:!1}function jh(){return DM}var LM=$e({},ga,{key:function(e){if(e.key){var n=IM[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=Ol(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?$M[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:jh,charCode:function(e){return e.type==="keypress"?Ol(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ol(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),zM=jt(LM),FM=$e({},uu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),uy=jt(FM),VM=$e({},ga,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:jh}),BM=jt(VM),HM=$e({},Ri,{propertyName:0,elapsedTime:0,pseudoElement:0}),WM=jt(HM),UM=$e({},uu,{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}),GM=jt(UM),YM=[9,13,27,32],Ah=Hn&&"CompositionEvent"in window,bs=null;Hn&&"documentMode"in document&&(bs=document.documentMode);var XM=Hn&&"TextEvent"in window&&!bs,Gw=Hn&&(!Ah||bs&&8<bs&&11>=bs),dy=" ",fy=!1;function Yw(e,n){switch(e){case"keyup":return YM.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Xw(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Vo=!1;function KM(e,n){switch(e){case"compositionend":return Xw(n);case"keypress":return n.which!==32?null:(fy=!0,dy);case"textInput":return e=n.data,e===dy&&fy?null:e;default:return null}}function qM(e,n){if(Vo)return e==="compositionend"||!Ah&&Yw(e,n)?(e=Uw(),$l=Mh=mr=null,Vo=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return Gw&&n.locale!=="ko"?null:n.data;default:return null}}var ZM={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 py(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!ZM[e.type]:n==="textarea"}function Kw(e,n,r,o){kw(o),n=lc(n,"onChange"),0<n.length&&(r=new Rh("onChange","change",null,r,o),e.push({event:r,listeners:n}))}var _s=null,Fs=null;function QM(e){s1(e,0)}function du(e){var n=Wo(e);if(xw(n))return e}function JM(e,n){if(e==="change")return n}var qw=!1;if(Hn){var kd;if(Hn){var Nd="oninput"in document;if(!Nd){var hy=document.createElement("div");hy.setAttribute("oninput","return;"),Nd=typeof hy.oninput=="function"}kd=Nd}else kd=!1;qw=kd&&(!document.documentMode||9<document.documentMode)}function my(){_s&&(_s.detachEvent("onpropertychange",Zw),Fs=_s=null)}function Zw(e){if(e.propertyName==="value"&&du(Fs)){var n=[];Kw(n,Fs,e,Ch(e)),Rw(QM,n)}}function eR(e,n,r){e==="focusin"?(my(),_s=n,Fs=r,_s.attachEvent("onpropertychange",Zw)):e==="focusout"&&my()}function tR(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return du(Fs)}function nR(e,n){if(e==="click")return du(n)}function rR(e,n){if(e==="input"||e==="change")return du(n)}function oR(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var sn=typeof Object.is=="function"?Object.is:oR;function Vs(e,n){if(sn(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var r=Object.keys(e),o=Object.keys(n);if(r.length!==o.length)return!1;for(o=0;o<r.length;o++){var i=r[o];if(!kf.call(n,i)||!sn(e[i],n[i]))return!1}return!0}function gy(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function yy(e,n){var r=gy(e);e=0;for(var o;r;){if(r.nodeType===3){if(o=e+r.textContent.length,e<=n&&o>=n)return{node:r,offset:n-e};e=o}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=gy(r)}}function Qw(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?Qw(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Jw(){for(var e=window,n=tc();n instanceof e.HTMLIFrameElement;){try{var r=typeof n.contentWindow.location.href=="string"}catch{r=!1}if(r)e=n.contentWindow;else break;n=tc(e.document)}return n}function Th(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}function iR(e){var n=Jw(),r=e.focusedElem,o=e.selectionRange;if(n!==r&&r&&r.ownerDocument&&Qw(r.ownerDocument.documentElement,r)){if(o!==null&&Th(r)){if(n=o.start,e=o.end,e===void 0&&(e=n),"selectionStart"in r)r.selectionStart=n,r.selectionEnd=Math.min(e,r.value.length);else if(e=(n=r.ownerDocument||document)&&n.defaultView||window,e.getSelection){e=e.getSelection();var i=r.textContent.length,s=Math.min(o.start,i);o=o.end===void 0?s:Math.min(o.end,i),!e.extend&&s>o&&(i=o,o=s,s=i),i=yy(r,s);var a=yy(r,o);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(n=n.createRange(),n.setStart(i.node,i.offset),e.removeAllRanges(),s>o?(e.addRange(n),e.extend(a.node,a.offset)):(n.setEnd(a.node,a.offset),e.addRange(n)))}}for(n=[],e=r;e=e.parentNode;)e.nodeType===1&&n.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<n.length;r++)e=n[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var sR=Hn&&"documentMode"in document&&11>=document.documentMode,Bo=null,Uf=null,Ss=null,Gf=!1;function vy(e,n,r){var o=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Gf||Bo==null||Bo!==tc(o)||(o=Bo,"selectionStart"in o&&Th(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),Ss&&Vs(Ss,o)||(Ss=o,o=lc(Uf,"onSelect"),0<o.length&&(n=new Rh("onSelect","select",null,n,r),e.push({event:n,listeners:o}),n.target=Bo)))}function Za(e,n){var r={};return r[e.toLowerCase()]=n.toLowerCase(),r["Webkit"+e]="webkit"+n,r["Moz"+e]="moz"+n,r}var Ho={animationend:Za("Animation","AnimationEnd"),animationiteration:Za("Animation","AnimationIteration"),animationstart:Za("Animation","AnimationStart"),transitionend:Za("Transition","TransitionEnd")},Pd={},e1={};Hn&&(e1=document.createElement("div").style,"AnimationEvent"in window||(delete Ho.animationend.animation,delete Ho.animationiteration.animation,delete Ho.animationstart.animation),"TransitionEvent"in window||delete Ho.transitionend.transition);function fu(e){if(Pd[e])return Pd[e];if(!Ho[e])return e;var n=Ho[e],r;for(r in n)if(n.hasOwnProperty(r)&&r in e1)return Pd[e]=n[r];return e}var t1=fu("animationend"),n1=fu("animationiteration"),r1=fu("animationstart"),o1=fu("transitionend"),i1=new Map,xy="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,n){i1.set(e,n),wo(n,[e])}for(var Md=0;Md<xy.length;Md++){var Rd=xy[Md],aR=Rd.toLowerCase(),lR=Rd[0].toUpperCase()+Rd.slice(1);$r(aR,"on"+lR)}$r(t1,"onAnimationEnd");$r(n1,"onAnimationIteration");$r(r1,"onAnimationStart");$r("dblclick","onDoubleClick");$r("focusin","onFocus");$r("focusout","onBlur");$r(o1,"onTransitionEnd");ci("onMouseEnter",["mouseout","mouseover"]);ci("onMouseLeave",["mouseout","mouseover"]);ci("onPointerEnter",["pointerout","pointerover"]);ci("onPointerLeave",["pointerout","pointerover"]);wo("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));wo("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));wo("onBeforeInput",["compositionend","keypress","textInput","paste"]);wo("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));wo("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));wo("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var fs="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(" "),cR=new Set("cancel close invalid load scroll toggle".split(" ").concat(fs));function wy(e,n,r){var o=e.type||"unknown-event";e.currentTarget=r,aM(o,n,void 0,e),e.currentTarget=null}function s1(e,n){n=(n&4)!==0;for(var r=0;r<e.length;r++){var o=e[r],i=o.event;o=o.listeners;e:{var s=void 0;if(n)for(var a=o.length-1;0<=a;a--){var l=o[a],c=l.instance,u=l.currentTarget;if(l=l.listener,c!==s&&i.isPropagationStopped())break e;wy(i,l,u),s=c}else for(a=0;a<o.length;a++){if(l=o[a],c=l.instance,u=l.currentTarget,l=l.listener,c!==s&&i.isPropagationStopped())break e;wy(i,l,u),s=c}}}if(rc)throw e=Vf,rc=!1,Vf=null,e}function Ce(e,n){var r=n[Zf];r===void 0&&(r=n[Zf]=new Set);var o=e+"__bubble";r.has(o)||(a1(n,e,2,!1),r.add(o))}function jd(e,n,r){var o=0;n&&(o|=4),a1(r,e,o,n)}var Qa="_reactListening"+Math.random().toString(36).slice(2);function Bs(e){if(!e[Qa]){e[Qa]=!0,hw.forEach(function(r){r!=="selectionchange"&&(cR.has(r)||jd(r,!1,e),jd(r,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[Qa]||(n[Qa]=!0,jd("selectionchange",!1,n))}}function a1(e,n,r,o){switch(Ww(n)){case 1:var i=SM;break;case 4:i=CM;break;default:i=Ph}r=i.bind(null,n,r,e),i=void 0,!Ff||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(i=!0),o?i!==void 0?e.addEventListener(n,r,{capture:!0,passive:i}):e.addEventListener(n,r,!0):i!==void 0?e.addEventListener(n,r,{passive:i}):e.addEventListener(n,r,!1)}function Ad(e,n,r,o,i){var s=o;if(!(n&1)&&!(n&2)&&o!==null)e:for(;;){if(o===null)return;var a=o.tag;if(a===3||a===4){var l=o.stateNode.containerInfo;if(l===i||l.nodeType===8&&l.parentNode===i)break;if(a===4)for(a=o.return;a!==null;){var c=a.tag;if((c===3||c===4)&&(c=a.stateNode.containerInfo,c===i||c.nodeType===8&&c.parentNode===i))return;a=a.return}for(;l!==null;){if(a=Zr(l),a===null)return;if(c=a.tag,c===5||c===6){o=s=a;continue e}l=l.parentNode}}o=o.return}Rw(function(){var u=s,f=Ch(r),d=[];e:{var p=i1.get(e);if(p!==void 0){var m=Rh,y=e;switch(e){case"keypress":if(Ol(r)===0)break e;case"keydown":case"keyup":m=zM;break;case"focusin":y="focus",m=Ed;break;case"focusout":y="blur",m=Ed;break;case"beforeblur":case"afterblur":m=Ed;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":m=ly;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=NM;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=BM;break;case t1:case n1:case r1:m=RM;break;case o1:m=WM;break;case"scroll":m=EM;break;case"wheel":m=GM;break;case"copy":case"cut":case"paste":m=AM;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=uy}var b=(n&4)!==0,_=!b&&e==="scroll",v=b?p!==null?p+"Capture":null:p;b=[];for(var x=u,w;x!==null;){w=x;var S=w.stateNode;if(w.tag===5&&S!==null&&(w=S,v!==null&&(S=Os(x,v),S!=null&&b.push(Hs(x,S,w)))),_)break;x=x.return}0<b.length&&(p=new m(p,y,null,r,f),d.push({event:p,listeners:b}))}}if(!(n&7)){e:{if(p=e==="mouseover"||e==="pointerover",m=e==="mouseout"||e==="pointerout",p&&r!==Lf&&(y=r.relatedTarget||r.fromElement)&&(Zr(y)||y[Wn]))break e;if((m||p)&&(p=f.window===f?f:(p=f.ownerDocument)?p.defaultView||p.parentWindow:window,m?(y=r.relatedTarget||r.toElement,m=u,y=y?Zr(y):null,y!==null&&(_=bo(y),y!==_||y.tag!==5&&y.tag!==6)&&(y=null)):(m=null,y=u),m!==y)){if(b=ly,S="onMouseLeave",v="onMouseEnter",x="mouse",(e==="pointerout"||e==="pointerover")&&(b=uy,S="onPointerLeave",v="onPointerEnter",x="pointer"),_=m==null?p:Wo(m),w=y==null?p:Wo(y),p=new b(S,x+"leave",m,r,f),p.target=_,p.relatedTarget=w,S=null,Zr(f)===u&&(b=new b(v,x+"enter",y,r,f),b.target=w,b.relatedTarget=_,S=b),_=S,m&&y)t:{for(b=m,v=y,x=0,w=b;w;w=No(w))x++;for(w=0,S=v;S;S=No(S))w++;for(;0<x-w;)b=No(b),x--;for(;0<w-x;)v=No(v),w--;for(;x--;){if(b===v||v!==null&&b===v.alternate)break t;b=No(b),v=No(v)}b=null}else b=null;m!==null&&by(d,p,m,b,!1),y!==null&&_!==null&&by(d,_,y,b,!0)}}e:{if(p=u?Wo(u):window,m=p.nodeName&&p.nodeName.toLowerCase(),m==="select"||m==="input"&&p.type==="file")var C=JM;else if(py(p))if(qw)C=rR;else{C=tR;var E=eR}else(m=p.nodeName)&&m.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(C=nR);if(C&&(C=C(e,u))){Kw(d,C,r,f);break e}E&&E(e,p,u),e==="focusout"&&(E=p._wrapperState)&&E.controlled&&p.type==="number"&&Tf(p,"number",p.value)}switch(E=u?Wo(u):window,e){case"focusin":(py(E)||E.contentEditable==="true")&&(Bo=E,Uf=u,Ss=null);break;case"focusout":Ss=Uf=Bo=null;break;case"mousedown":Gf=!0;break;case"contextmenu":case"mouseup":case"dragend":Gf=!1,vy(d,r,f);break;case"selectionchange":if(sR)break;case"keydown":case"keyup":vy(d,r,f)}var k;if(Ah)e:{switch(e){case"compositionstart":var N="onCompositionStart";break e;case"compositionend":N="onCompositionEnd";break e;case"compositionupdate":N="onCompositionUpdate";break e}N=void 0}else Vo?Yw(e,r)&&(N="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(N="onCompositionStart");N&&(Gw&&r.locale!=="ko"&&(Vo||N!=="onCompositionStart"?N==="onCompositionEnd"&&Vo&&(k=Uw()):(mr=f,Mh="value"in mr?mr.value:mr.textContent,Vo=!0)),E=lc(u,N),0<E.length&&(N=new cy(N,e,null,r,f),d.push({event:N,listeners:E}),k?N.data=k:(k=Xw(r),k!==null&&(N.data=k)))),(k=XM?KM(e,r):qM(e,r))&&(u=lc(u,"onBeforeInput"),0<u.length&&(f=new cy("onBeforeInput","beforeinput",null,r,f),d.push({event:f,listeners:u}),f.data=k))}s1(d,n)})}function Hs(e,n,r){return{instance:e,listener:n,currentTarget:r}}function lc(e,n){for(var r=n+"Capture",o=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=Os(e,r),s!=null&&o.unshift(Hs(e,s,i)),s=Os(e,n),s!=null&&o.push(Hs(e,s,i))),e=e.return}return o}function No(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function by(e,n,r,o,i){for(var s=n._reactName,a=[];r!==null&&r!==o;){var l=r,c=l.alternate,u=l.stateNode;if(c!==null&&c===o)break;l.tag===5&&u!==null&&(l=u,i?(c=Os(r,s),c!=null&&a.unshift(Hs(r,c,l))):i||(c=Os(r,s),c!=null&&a.push(Hs(r,c,l)))),r=r.return}a.length!==0&&e.push({event:n,listeners:a})}var uR=/\r\n?/g,dR=/\u0000|\uFFFD/g;function _y(e){return(typeof e=="string"?e:""+e).replace(uR,`
38
- `).replace(dR,"")}function Ja(e,n,r){if(n=_y(n),_y(e)!==n&&r)throw Error(q(425))}function cc(){}var Yf=null,Xf=null;function Kf(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var qf=typeof setTimeout=="function"?setTimeout:void 0,fR=typeof clearTimeout=="function"?clearTimeout:void 0,Sy=typeof Promise=="function"?Promise:void 0,pR=typeof queueMicrotask=="function"?queueMicrotask:typeof Sy<"u"?function(e){return Sy.resolve(null).then(e).catch(hR)}:qf;function hR(e){setTimeout(function(){throw e})}function Td(e,n){var r=n,o=0;do{var i=r.nextSibling;if(e.removeChild(r),i&&i.nodeType===8)if(r=i.data,r==="/$"){if(o===0){e.removeChild(i),zs(n);return}o--}else r!=="$"&&r!=="$?"&&r!=="$!"||o++;r=i}while(r);zs(n)}function br(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n==="$"||n==="$!"||n==="$?")break;if(n==="/$")return null}}return e}function Cy(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(n===0)return e;n--}else r==="/$"&&n++}e=e.previousSibling}return null}var ji=Math.random().toString(36).slice(2),mn="__reactFiber$"+ji,Ws="__reactProps$"+ji,Wn="__reactContainer$"+ji,Zf="__reactEvents$"+ji,mR="__reactListeners$"+ji,gR="__reactHandles$"+ji;function Zr(e){var n=e[mn];if(n)return n;for(var r=e.parentNode;r;){if(n=r[Wn]||r[mn]){if(r=n.alternate,n.child!==null||r!==null&&r.child!==null)for(e=Cy(e);e!==null;){if(r=e[mn])return r;e=Cy(e)}return n}e=r,r=e.parentNode}return null}function ya(e){return e=e[mn]||e[Wn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Wo(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(q(33))}function pu(e){return e[Ws]||null}var Qf=[],Uo=-1;function Or(e){return{current:e}}function ke(e){0>Uo||(e.current=Qf[Uo],Qf[Uo]=null,Uo--)}function _e(e,n){Uo++,Qf[Uo]=e.current,e.current=n}var Rr={},nt=Or(Rr),ht=Or(!1),so=Rr;function ui(e,n){var r=e.type.contextTypes;if(!r)return Rr;var o=e.stateNode;if(o&&o.__reactInternalMemoizedUnmaskedChildContext===n)return o.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in r)i[s]=n[s];return o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=i),i}function mt(e){return e=e.childContextTypes,e!=null}function uc(){ke(ht),ke(nt)}function Ey(e,n,r){if(nt.current!==Rr)throw Error(q(168));_e(nt,n),_e(ht,r)}function l1(e,n,r){var o=e.stateNode;if(n=n.childContextTypes,typeof o.getChildContext!="function")return r;o=o.getChildContext();for(var i in o)if(!(i in n))throw Error(q(108,eM(e)||"Unknown",i));return $e({},r,o)}function dc(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Rr,so=nt.current,_e(nt,e),_e(ht,ht.current),!0}function ky(e,n,r){var o=e.stateNode;if(!o)throw Error(q(169));r?(e=l1(e,n,so),o.__reactInternalMemoizedMergedChildContext=e,ke(ht),ke(nt),_e(nt,e)):ke(ht),_e(ht,r)}var In=null,hu=!1,Id=!1;function c1(e){In===null?In=[e]:In.push(e)}function yR(e){hu=!0,c1(e)}function Dr(){if(!Id&&In!==null){Id=!0;var e=0,n=we;try{var r=In;for(we=1;e<r.length;e++){var o=r[e];do o=o(!0);while(o!==null)}In=null,hu=!1}catch(i){throw In!==null&&(In=In.slice(e+1)),Iw(Eh,Dr),i}finally{we=n,Id=!1}}return null}var Go=[],Yo=0,fc=null,pc=0,Dt=[],Lt=0,ao=null,On=1,Dn="";function Xr(e,n){Go[Yo++]=pc,Go[Yo++]=fc,fc=e,pc=n}function u1(e,n,r){Dt[Lt++]=On,Dt[Lt++]=Dn,Dt[Lt++]=ao,ao=e;var o=On;e=Dn;var i=32-rn(o)-1;o&=~(1<<i),r+=1;var s=32-rn(n)+i;if(30<s){var a=i-i%5;s=(o&(1<<a)-1).toString(32),o>>=a,i-=a,On=1<<32-rn(n)+i|r<<i|o,Dn=s+e}else On=1<<s|r<<i|o,Dn=e}function Ih(e){e.return!==null&&(Xr(e,1),u1(e,1,0))}function $h(e){for(;e===fc;)fc=Go[--Yo],Go[Yo]=null,pc=Go[--Yo],Go[Yo]=null;for(;e===ao;)ao=Dt[--Lt],Dt[Lt]=null,Dn=Dt[--Lt],Dt[Lt]=null,On=Dt[--Lt],Dt[Lt]=null}var Et=null,Ct=null,Pe=!1,Qt=null;function d1(e,n){var r=Ft(5,null,null,0);r.elementType="DELETED",r.stateNode=n,r.return=e,n=e.deletions,n===null?(e.deletions=[r],e.flags|=16):n.push(r)}function Ny(e,n){switch(e.tag){case 5:var r=e.type;return n=n.nodeType!==1||r.toLowerCase()!==n.nodeName.toLowerCase()?null:n,n!==null?(e.stateNode=n,Et=e,Ct=br(n.firstChild),!0):!1;case 6:return n=e.pendingProps===""||n.nodeType!==3?null:n,n!==null?(e.stateNode=n,Et=e,Ct=null,!0):!1;case 13:return n=n.nodeType!==8?null:n,n!==null?(r=ao!==null?{id:On,overflow:Dn}:null,e.memoizedState={dehydrated:n,treeContext:r,retryLane:1073741824},r=Ft(18,null,null,0),r.stateNode=n,r.return=e,e.child=r,Et=e,Ct=null,!0):!1;default:return!1}}function Jf(e){return(e.mode&1)!==0&&(e.flags&128)===0}function ep(e){if(Pe){var n=Ct;if(n){var r=n;if(!Ny(e,n)){if(Jf(e))throw Error(q(418));n=br(r.nextSibling);var o=Et;n&&Ny(e,n)?d1(o,r):(e.flags=e.flags&-4097|2,Pe=!1,Et=e)}}else{if(Jf(e))throw Error(q(418));e.flags=e.flags&-4097|2,Pe=!1,Et=e}}}function Py(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Et=e}function el(e){if(e!==Et)return!1;if(!Pe)return Py(e),Pe=!0,!1;var n;if((n=e.tag!==3)&&!(n=e.tag!==5)&&(n=e.type,n=n!=="head"&&n!=="body"&&!Kf(e.type,e.memoizedProps)),n&&(n=Ct)){if(Jf(e))throw f1(),Error(q(418));for(;n;)d1(e,n),n=br(n.nextSibling)}if(Py(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(q(317));e:{for(e=e.nextSibling,n=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(n===0){Ct=br(e.nextSibling);break e}n--}else r!=="$"&&r!=="$!"&&r!=="$?"||n++}e=e.nextSibling}Ct=null}}else Ct=Et?br(e.stateNode.nextSibling):null;return!0}function f1(){for(var e=Ct;e;)e=br(e.nextSibling)}function di(){Ct=Et=null,Pe=!1}function Oh(e){Qt===null?Qt=[e]:Qt.push(e)}var vR=qn.ReactCurrentBatchConfig;function Ki(e,n,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(q(309));var o=r.stateNode}if(!o)throw Error(q(147,e));var i=o,s=""+e;return n!==null&&n.ref!==null&&typeof n.ref=="function"&&n.ref._stringRef===s?n.ref:(n=function(a){var l=i.refs;a===null?delete l[s]:l[s]=a},n._stringRef=s,n)}if(typeof e!="string")throw Error(q(284));if(!r._owner)throw Error(q(290,e))}return e}function tl(e,n){throw e=Object.prototype.toString.call(n),Error(q(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e))}function My(e){var n=e._init;return n(e._payload)}function p1(e){function n(v,x){if(e){var w=v.deletions;w===null?(v.deletions=[x],v.flags|=16):w.push(x)}}function r(v,x){if(!e)return null;for(;x!==null;)n(v,x),x=x.sibling;return null}function o(v,x){for(v=new Map;x!==null;)x.key!==null?v.set(x.key,x):v.set(x.index,x),x=x.sibling;return v}function i(v,x){return v=Er(v,x),v.index=0,v.sibling=null,v}function s(v,x,w){return v.index=w,e?(w=v.alternate,w!==null?(w=w.index,w<x?(v.flags|=2,x):w):(v.flags|=2,x)):(v.flags|=1048576,x)}function a(v){return e&&v.alternate===null&&(v.flags|=2),v}function l(v,x,w,S){return x===null||x.tag!==6?(x=Vd(w,v.mode,S),x.return=v,x):(x=i(x,w),x.return=v,x)}function c(v,x,w,S){var C=w.type;return C===Fo?f(v,x,w.props.children,S,w.key):x!==null&&(x.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===cr&&My(C)===x.type)?(S=i(x,w.props),S.ref=Ki(v,x,w),S.return=v,S):(S=Hl(w.type,w.key,w.props,null,v.mode,S),S.ref=Ki(v,x,w),S.return=v,S)}function u(v,x,w,S){return x===null||x.tag!==4||x.stateNode.containerInfo!==w.containerInfo||x.stateNode.implementation!==w.implementation?(x=Bd(w,v.mode,S),x.return=v,x):(x=i(x,w.children||[]),x.return=v,x)}function f(v,x,w,S,C){return x===null||x.tag!==7?(x=no(w,v.mode,S,C),x.return=v,x):(x=i(x,w),x.return=v,x)}function d(v,x,w){if(typeof x=="string"&&x!==""||typeof x=="number")return x=Vd(""+x,v.mode,w),x.return=v,x;if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Wa:return w=Hl(x.type,x.key,x.props,null,v.mode,w),w.ref=Ki(v,null,x),w.return=v,w;case zo:return x=Bd(x,v.mode,w),x.return=v,x;case cr:var S=x._init;return d(v,S(x._payload),w)}if(us(x)||Wi(x))return x=no(x,v.mode,w,null),x.return=v,x;tl(v,x)}return null}function p(v,x,w,S){var C=x!==null?x.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return C!==null?null:l(v,x,""+w,S);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Wa:return w.key===C?c(v,x,w,S):null;case zo:return w.key===C?u(v,x,w,S):null;case cr:return C=w._init,p(v,x,C(w._payload),S)}if(us(w)||Wi(w))return C!==null?null:f(v,x,w,S,null);tl(v,w)}return null}function m(v,x,w,S,C){if(typeof S=="string"&&S!==""||typeof S=="number")return v=v.get(w)||null,l(x,v,""+S,C);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Wa:return v=v.get(S.key===null?w:S.key)||null,c(x,v,S,C);case zo:return v=v.get(S.key===null?w:S.key)||null,u(x,v,S,C);case cr:var E=S._init;return m(v,x,w,E(S._payload),C)}if(us(S)||Wi(S))return v=v.get(w)||null,f(x,v,S,C,null);tl(x,S)}return null}function y(v,x,w,S){for(var C=null,E=null,k=x,N=x=0,M=null;k!==null&&N<w.length;N++){k.index>N?(M=k,k=null):M=k.sibling;var T=p(v,k,w[N],S);if(T===null){k===null&&(k=M);break}e&&k&&T.alternate===null&&n(v,k),x=s(T,x,N),E===null?C=T:E.sibling=T,E=T,k=M}if(N===w.length)return r(v,k),Pe&&Xr(v,N),C;if(k===null){for(;N<w.length;N++)k=d(v,w[N],S),k!==null&&(x=s(k,x,N),E===null?C=k:E.sibling=k,E=k);return Pe&&Xr(v,N),C}for(k=o(v,k);N<w.length;N++)M=m(k,v,N,w[N],S),M!==null&&(e&&M.alternate!==null&&k.delete(M.key===null?N:M.key),x=s(M,x,N),E===null?C=M:E.sibling=M,E=M);return e&&k.forEach(function(A){return n(v,A)}),Pe&&Xr(v,N),C}function b(v,x,w,S){var C=Wi(w);if(typeof C!="function")throw Error(q(150));if(w=C.call(w),w==null)throw Error(q(151));for(var E=C=null,k=x,N=x=0,M=null,T=w.next();k!==null&&!T.done;N++,T=w.next()){k.index>N?(M=k,k=null):M=k.sibling;var A=p(v,k,T.value,S);if(A===null){k===null&&(k=M);break}e&&k&&A.alternate===null&&n(v,k),x=s(A,x,N),E===null?C=A:E.sibling=A,E=A,k=M}if(T.done)return r(v,k),Pe&&Xr(v,N),C;if(k===null){for(;!T.done;N++,T=w.next())T=d(v,T.value,S),T!==null&&(x=s(T,x,N),E===null?C=T:E.sibling=T,E=T);return Pe&&Xr(v,N),C}for(k=o(v,k);!T.done;N++,T=w.next())T=m(k,v,N,T.value,S),T!==null&&(e&&T.alternate!==null&&k.delete(T.key===null?N:T.key),x=s(T,x,N),E===null?C=T:E.sibling=T,E=T);return e&&k.forEach(function(D){return n(v,D)}),Pe&&Xr(v,N),C}function _(v,x,w,S){if(typeof w=="object"&&w!==null&&w.type===Fo&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case Wa:e:{for(var C=w.key,E=x;E!==null;){if(E.key===C){if(C=w.type,C===Fo){if(E.tag===7){r(v,E.sibling),x=i(E,w.props.children),x.return=v,v=x;break e}}else if(E.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===cr&&My(C)===E.type){r(v,E.sibling),x=i(E,w.props),x.ref=Ki(v,E,w),x.return=v,v=x;break e}r(v,E);break}else n(v,E);E=E.sibling}w.type===Fo?(x=no(w.props.children,v.mode,S,w.key),x.return=v,v=x):(S=Hl(w.type,w.key,w.props,null,v.mode,S),S.ref=Ki(v,x,w),S.return=v,v=S)}return a(v);case zo:e:{for(E=w.key;x!==null;){if(x.key===E)if(x.tag===4&&x.stateNode.containerInfo===w.containerInfo&&x.stateNode.implementation===w.implementation){r(v,x.sibling),x=i(x,w.children||[]),x.return=v,v=x;break e}else{r(v,x);break}else n(v,x);x=x.sibling}x=Bd(w,v.mode,S),x.return=v,v=x}return a(v);case cr:return E=w._init,_(v,x,E(w._payload),S)}if(us(w))return y(v,x,w,S);if(Wi(w))return b(v,x,w,S);tl(v,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,x!==null&&x.tag===6?(r(v,x.sibling),x=i(x,w),x.return=v,v=x):(r(v,x),x=Vd(w,v.mode,S),x.return=v,v=x),a(v)):r(v,x)}return _}var fi=p1(!0),h1=p1(!1),hc=Or(null),mc=null,Xo=null,Dh=null;function Lh(){Dh=Xo=mc=null}function zh(e){var n=hc.current;ke(hc),e._currentValue=n}function tp(e,n,r){for(;e!==null;){var o=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,o!==null&&(o.childLanes|=n)):o!==null&&(o.childLanes&n)!==n&&(o.childLanes|=n),e===r)break;e=e.return}}function ri(e,n){mc=e,Dh=Xo=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&n&&(ft=!0),e.firstContext=null)}function Ht(e){var n=e._currentValue;if(Dh!==e)if(e={context:e,memoizedValue:n,next:null},Xo===null){if(mc===null)throw Error(q(308));Xo=e,mc.dependencies={lanes:0,firstContext:e}}else Xo=Xo.next=e;return n}var Qr=null;function Fh(e){Qr===null?Qr=[e]:Qr.push(e)}function m1(e,n,r,o){var i=n.interleaved;return i===null?(r.next=r,Fh(n)):(r.next=i.next,i.next=r),n.interleaved=r,Un(e,o)}function Un(e,n){e.lanes|=n;var r=e.alternate;for(r!==null&&(r.lanes|=n),r=e,e=e.return;e!==null;)e.childLanes|=n,r=e.alternate,r!==null&&(r.childLanes|=n),r=e,e=e.return;return r.tag===3?r.stateNode:null}var ur=!1;function Vh(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function g1(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Fn(e,n){return{eventTime:e,lane:n,tag:0,payload:null,callback:null,next:null}}function _r(e,n,r){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,ve&2){var i=o.pending;return i===null?n.next=n:(n.next=i.next,i.next=n),o.pending=n,Un(e,r)}return i=o.interleaved,i===null?(n.next=n,Fh(o)):(n.next=i.next,i.next=n),o.interleaved=n,Un(e,r)}function Dl(e,n,r){if(n=n.updateQueue,n!==null&&(n=n.shared,(r&4194240)!==0)){var o=n.lanes;o&=e.pendingLanes,r|=o,n.lanes=r,kh(e,r)}}function Ry(e,n){var r=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,r===o)){var i=null,s=null;if(r=r.firstBaseUpdate,r!==null){do{var a={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};s===null?i=s=a:s=s.next=a,r=r.next}while(r!==null);s===null?i=s=n:s=s.next=n}else i=s=n;r={baseState:o.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:o.shared,effects:o.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=n:e.next=n,r.lastBaseUpdate=n}function gc(e,n,r,o){var i=e.updateQueue;ur=!1;var s=i.firstBaseUpdate,a=i.lastBaseUpdate,l=i.shared.pending;if(l!==null){i.shared.pending=null;var c=l,u=c.next;c.next=null,a===null?s=u:a.next=u,a=c;var f=e.alternate;f!==null&&(f=f.updateQueue,l=f.lastBaseUpdate,l!==a&&(l===null?f.firstBaseUpdate=u:l.next=u,f.lastBaseUpdate=c))}if(s!==null){var d=i.baseState;a=0,f=u=c=null,l=s;do{var p=l.lane,m=l.eventTime;if((o&p)===p){f!==null&&(f=f.next={eventTime:m,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var y=e,b=l;switch(p=n,m=r,b.tag){case 1:if(y=b.payload,typeof y=="function"){d=y.call(m,d,p);break e}d=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=b.payload,p=typeof y=="function"?y.call(m,d,p):y,p==null)break e;d=$e({},d,p);break e;case 2:ur=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,p=i.effects,p===null?i.effects=[l]:p.push(l))}else m={eventTime:m,lane:p,tag:l.tag,payload:l.payload,callback:l.callback,next:null},f===null?(u=f=m,c=d):f=f.next=m,a|=p;if(l=l.next,l===null){if(l=i.shared.pending,l===null)break;p=l,l=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(!0);if(f===null&&(c=d),i.baseState=c,i.firstBaseUpdate=u,i.lastBaseUpdate=f,n=i.shared.interleaved,n!==null){i=n;do a|=i.lane,i=i.next;while(i!==n)}else s===null&&(i.shared.lanes=0);co|=a,e.lanes=a,e.memoizedState=d}}function jy(e,n,r){if(e=n.effects,n.effects=null,e!==null)for(n=0;n<e.length;n++){var o=e[n],i=o.callback;if(i!==null){if(o.callback=null,o=r,typeof i!="function")throw Error(q(191,i));i.call(o)}}}var va={},wn=Or(va),Us=Or(va),Gs=Or(va);function Jr(e){if(e===va)throw Error(q(174));return e}function Bh(e,n){switch(_e(Gs,n),_e(Us,e),_e(wn,va),e=n.nodeType,e){case 9:case 11:n=(n=n.documentElement)?n.namespaceURI:$f(null,"");break;default:e=e===8?n.parentNode:n,n=e.namespaceURI||null,e=e.tagName,n=$f(n,e)}ke(wn),_e(wn,n)}function pi(){ke(wn),ke(Us),ke(Gs)}function y1(e){Jr(Gs.current);var n=Jr(wn.current),r=$f(n,e.type);n!==r&&(_e(Us,e),_e(wn,r))}function Hh(e){Us.current===e&&(ke(wn),ke(Us))}var Ae=Or(0);function yc(e){for(var n=e;n!==null;){if(n.tag===13){var r=n.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return n}else if(n.tag===19&&n.memoizedProps.revealOrder!==void 0){if(n.flags&128)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var $d=[];function Wh(){for(var e=0;e<$d.length;e++)$d[e]._workInProgressVersionPrimary=null;$d.length=0}var Ll=qn.ReactCurrentDispatcher,Od=qn.ReactCurrentBatchConfig,lo=0,Te=null,Ve=null,We=null,vc=!1,Cs=!1,Ys=0,xR=0;function qe(){throw Error(q(321))}function Uh(e,n){if(n===null)return!1;for(var r=0;r<n.length&&r<e.length;r++)if(!sn(e[r],n[r]))return!1;return!0}function Gh(e,n,r,o,i,s){if(lo=s,Te=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,Ll.current=e===null||e.memoizedState===null?SR:CR,e=r(o,i),Cs){s=0;do{if(Cs=!1,Ys=0,25<=s)throw Error(q(301));s+=1,We=Ve=null,n.updateQueue=null,Ll.current=ER,e=r(o,i)}while(Cs)}if(Ll.current=xc,n=Ve!==null&&Ve.next!==null,lo=0,We=Ve=Te=null,vc=!1,n)throw Error(q(300));return e}function Yh(){var e=Ys!==0;return Ys=0,e}function pn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return We===null?Te.memoizedState=We=e:We=We.next=e,We}function Wt(){if(Ve===null){var e=Te.alternate;e=e!==null?e.memoizedState:null}else e=Ve.next;var n=We===null?Te.memoizedState:We.next;if(n!==null)We=n,Ve=e;else{if(e===null)throw Error(q(310));Ve=e,e={memoizedState:Ve.memoizedState,baseState:Ve.baseState,baseQueue:Ve.baseQueue,queue:Ve.queue,next:null},We===null?Te.memoizedState=We=e:We=We.next=e}return We}function Xs(e,n){return typeof n=="function"?n(e):n}function Dd(e){var n=Wt(),r=n.queue;if(r===null)throw Error(q(311));r.lastRenderedReducer=e;var o=Ve,i=o.baseQueue,s=r.pending;if(s!==null){if(i!==null){var a=i.next;i.next=s.next,s.next=a}o.baseQueue=i=s,r.pending=null}if(i!==null){s=i.next,o=o.baseState;var l=a=null,c=null,u=s;do{var f=u.lane;if((lo&f)===f)c!==null&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),o=u.hasEagerState?u.eagerState:e(o,u.action);else{var d={lane:f,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};c===null?(l=c=d,a=o):c=c.next=d,Te.lanes|=f,co|=f}u=u.next}while(u!==null&&u!==s);c===null?a=o:c.next=l,sn(o,n.memoizedState)||(ft=!0),n.memoizedState=o,n.baseState=a,n.baseQueue=c,r.lastRenderedState=o}if(e=r.interleaved,e!==null){i=e;do s=i.lane,Te.lanes|=s,co|=s,i=i.next;while(i!==e)}else i===null&&(r.lanes=0);return[n.memoizedState,r.dispatch]}function Ld(e){var n=Wt(),r=n.queue;if(r===null)throw Error(q(311));r.lastRenderedReducer=e;var o=r.dispatch,i=r.pending,s=n.memoizedState;if(i!==null){r.pending=null;var a=i=i.next;do s=e(s,a.action),a=a.next;while(a!==i);sn(s,n.memoizedState)||(ft=!0),n.memoizedState=s,n.baseQueue===null&&(n.baseState=s),r.lastRenderedState=s}return[s,o]}function v1(){}function x1(e,n){var r=Te,o=Wt(),i=n(),s=!sn(o.memoizedState,i);if(s&&(o.memoizedState=i,ft=!0),o=o.queue,Xh(_1.bind(null,r,o,e),[e]),o.getSnapshot!==n||s||We!==null&&We.memoizedState.tag&1){if(r.flags|=2048,Ks(9,b1.bind(null,r,o,i,n),void 0,null),Ue===null)throw Error(q(349));lo&30||w1(r,n,i)}return i}function w1(e,n,r){e.flags|=16384,e={getSnapshot:n,value:r},n=Te.updateQueue,n===null?(n={lastEffect:null,stores:null},Te.updateQueue=n,n.stores=[e]):(r=n.stores,r===null?n.stores=[e]:r.push(e))}function b1(e,n,r,o){n.value=r,n.getSnapshot=o,S1(n)&&C1(e)}function _1(e,n,r){return r(function(){S1(n)&&C1(e)})}function S1(e){var n=e.getSnapshot;e=e.value;try{var r=n();return!sn(e,r)}catch{return!0}}function C1(e){var n=Un(e,1);n!==null&&on(n,e,1,-1)}function Ay(e){var n=pn();return typeof e=="function"&&(e=e()),n.memoizedState=n.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Xs,lastRenderedState:e},n.queue=e,e=e.dispatch=_R.bind(null,Te,e),[n.memoizedState,e]}function Ks(e,n,r,o){return e={tag:e,create:n,destroy:r,deps:o,next:null},n=Te.updateQueue,n===null?(n={lastEffect:null,stores:null},Te.updateQueue=n,n.lastEffect=e.next=e):(r=n.lastEffect,r===null?n.lastEffect=e.next=e:(o=r.next,r.next=e,e.next=o,n.lastEffect=e)),e}function E1(){return Wt().memoizedState}function zl(e,n,r,o){var i=pn();Te.flags|=e,i.memoizedState=Ks(1|n,r,void 0,o===void 0?null:o)}function mu(e,n,r,o){var i=Wt();o=o===void 0?null:o;var s=void 0;if(Ve!==null){var a=Ve.memoizedState;if(s=a.destroy,o!==null&&Uh(o,a.deps)){i.memoizedState=Ks(n,r,s,o);return}}Te.flags|=e,i.memoizedState=Ks(1|n,r,s,o)}function Ty(e,n){return zl(8390656,8,e,n)}function Xh(e,n){return mu(2048,8,e,n)}function k1(e,n){return mu(4,2,e,n)}function N1(e,n){return mu(4,4,e,n)}function P1(e,n){if(typeof n=="function")return e=e(),n(e),function(){n(null)};if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function M1(e,n,r){return r=r!=null?r.concat([e]):null,mu(4,4,P1.bind(null,n,e),r)}function Kh(){}function R1(e,n){var r=Wt();n=n===void 0?null:n;var o=r.memoizedState;return o!==null&&n!==null&&Uh(n,o[1])?o[0]:(r.memoizedState=[e,n],e)}function j1(e,n){var r=Wt();n=n===void 0?null:n;var o=r.memoizedState;return o!==null&&n!==null&&Uh(n,o[1])?o[0]:(e=e(),r.memoizedState=[e,n],e)}function A1(e,n,r){return lo&21?(sn(r,n)||(r=Dw(),Te.lanes|=r,co|=r,e.baseState=!0),n):(e.baseState&&(e.baseState=!1,ft=!0),e.memoizedState=r)}function wR(e,n){var r=we;we=r!==0&&4>r?r:4,e(!0);var o=Od.transition;Od.transition={};try{e(!1),n()}finally{we=r,Od.transition=o}}function T1(){return Wt().memoizedState}function bR(e,n,r){var o=Cr(e);if(r={lane:o,action:r,hasEagerState:!1,eagerState:null,next:null},I1(e))$1(n,r);else if(r=m1(e,n,r,o),r!==null){var i=it();on(r,e,o,i),O1(r,n,o)}}function _R(e,n,r){var o=Cr(e),i={lane:o,action:r,hasEagerState:!1,eagerState:null,next:null};if(I1(e))$1(n,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=n.lastRenderedReducer,s!==null))try{var a=n.lastRenderedState,l=s(a,r);if(i.hasEagerState=!0,i.eagerState=l,sn(l,a)){var c=n.interleaved;c===null?(i.next=i,Fh(n)):(i.next=c.next,c.next=i),n.interleaved=i;return}}catch{}finally{}r=m1(e,n,i,o),r!==null&&(i=it(),on(r,e,o,i),O1(r,n,o))}}function I1(e){var n=e.alternate;return e===Te||n!==null&&n===Te}function $1(e,n){Cs=vc=!0;var r=e.pending;r===null?n.next=n:(n.next=r.next,r.next=n),e.pending=n}function O1(e,n,r){if(r&4194240){var o=n.lanes;o&=e.pendingLanes,r|=o,n.lanes=r,kh(e,r)}}var xc={readContext:Ht,useCallback:qe,useContext:qe,useEffect:qe,useImperativeHandle:qe,useInsertionEffect:qe,useLayoutEffect:qe,useMemo:qe,useReducer:qe,useRef:qe,useState:qe,useDebugValue:qe,useDeferredValue:qe,useTransition:qe,useMutableSource:qe,useSyncExternalStore:qe,useId:qe,unstable_isNewReconciler:!1},SR={readContext:Ht,useCallback:function(e,n){return pn().memoizedState=[e,n===void 0?null:n],e},useContext:Ht,useEffect:Ty,useImperativeHandle:function(e,n,r){return r=r!=null?r.concat([e]):null,zl(4194308,4,P1.bind(null,n,e),r)},useLayoutEffect:function(e,n){return zl(4194308,4,e,n)},useInsertionEffect:function(e,n){return zl(4,2,e,n)},useMemo:function(e,n){var r=pn();return n=n===void 0?null:n,e=e(),r.memoizedState=[e,n],e},useReducer:function(e,n,r){var o=pn();return n=r!==void 0?r(n):n,o.memoizedState=o.baseState=n,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},o.queue=e,e=e.dispatch=bR.bind(null,Te,e),[o.memoizedState,e]},useRef:function(e){var n=pn();return e={current:e},n.memoizedState=e},useState:Ay,useDebugValue:Kh,useDeferredValue:function(e){return pn().memoizedState=e},useTransition:function(){var e=Ay(!1),n=e[0];return e=wR.bind(null,e[1]),pn().memoizedState=e,[n,e]},useMutableSource:function(){},useSyncExternalStore:function(e,n,r){var o=Te,i=pn();if(Pe){if(r===void 0)throw Error(q(407));r=r()}else{if(r=n(),Ue===null)throw Error(q(349));lo&30||w1(o,n,r)}i.memoizedState=r;var s={value:r,getSnapshot:n};return i.queue=s,Ty(_1.bind(null,o,s,e),[e]),o.flags|=2048,Ks(9,b1.bind(null,o,s,r,n),void 0,null),r},useId:function(){var e=pn(),n=Ue.identifierPrefix;if(Pe){var r=Dn,o=On;r=(o&~(1<<32-rn(o)-1)).toString(32)+r,n=":"+n+"R"+r,r=Ys++,0<r&&(n+="H"+r.toString(32)),n+=":"}else r=xR++,n=":"+n+"r"+r.toString(32)+":";return e.memoizedState=n},unstable_isNewReconciler:!1},CR={readContext:Ht,useCallback:R1,useContext:Ht,useEffect:Xh,useImperativeHandle:M1,useInsertionEffect:k1,useLayoutEffect:N1,useMemo:j1,useReducer:Dd,useRef:E1,useState:function(){return Dd(Xs)},useDebugValue:Kh,useDeferredValue:function(e){var n=Wt();return A1(n,Ve.memoizedState,e)},useTransition:function(){var e=Dd(Xs)[0],n=Wt().memoizedState;return[e,n]},useMutableSource:v1,useSyncExternalStore:x1,useId:T1,unstable_isNewReconciler:!1},ER={readContext:Ht,useCallback:R1,useContext:Ht,useEffect:Xh,useImperativeHandle:M1,useInsertionEffect:k1,useLayoutEffect:N1,useMemo:j1,useReducer:Ld,useRef:E1,useState:function(){return Ld(Xs)},useDebugValue:Kh,useDeferredValue:function(e){var n=Wt();return Ve===null?n.memoizedState=e:A1(n,Ve.memoizedState,e)},useTransition:function(){var e=Ld(Xs)[0],n=Wt().memoizedState;return[e,n]},useMutableSource:v1,useSyncExternalStore:x1,useId:T1,unstable_isNewReconciler:!1};function Kt(e,n){if(e&&e.defaultProps){n=$e({},n),e=e.defaultProps;for(var r in e)n[r]===void 0&&(n[r]=e[r]);return n}return n}function np(e,n,r,o){n=e.memoizedState,r=r(o,n),r=r==null?n:$e({},n,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var gu={isMounted:function(e){return(e=e._reactInternals)?bo(e)===e:!1},enqueueSetState:function(e,n,r){e=e._reactInternals;var o=it(),i=Cr(e),s=Fn(o,i);s.payload=n,r!=null&&(s.callback=r),n=_r(e,s,i),n!==null&&(on(n,e,i,o),Dl(n,e,i))},enqueueReplaceState:function(e,n,r){e=e._reactInternals;var o=it(),i=Cr(e),s=Fn(o,i);s.tag=1,s.payload=n,r!=null&&(s.callback=r),n=_r(e,s,i),n!==null&&(on(n,e,i,o),Dl(n,e,i))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var r=it(),o=Cr(e),i=Fn(r,o);i.tag=2,n!=null&&(i.callback=n),n=_r(e,i,o),n!==null&&(on(n,e,o,r),Dl(n,e,o))}};function Iy(e,n,r,o,i,s,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,s,a):n.prototype&&n.prototype.isPureReactComponent?!Vs(r,o)||!Vs(i,s):!0}function D1(e,n,r){var o=!1,i=Rr,s=n.contextType;return typeof s=="object"&&s!==null?s=Ht(s):(i=mt(n)?so:nt.current,o=n.contextTypes,s=(o=o!=null)?ui(e,i):Rr),n=new n(r,s),e.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,n.updater=gu,e.stateNode=n,n._reactInternals=e,o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),n}function $y(e,n,r,o){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(r,o),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(r,o),n.state!==e&&gu.enqueueReplaceState(n,n.state,null)}function rp(e,n,r,o){var i=e.stateNode;i.props=r,i.state=e.memoizedState,i.refs={},Vh(e);var s=n.contextType;typeof s=="object"&&s!==null?i.context=Ht(s):(s=mt(n)?so:nt.current,i.context=ui(e,s)),i.state=e.memoizedState,s=n.getDerivedStateFromProps,typeof s=="function"&&(np(e,n,s,r),i.state=e.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(n=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),n!==i.state&&gu.enqueueReplaceState(i,i.state,null),gc(e,r,i,o),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function hi(e,n){try{var r="",o=n;do r+=JP(o),o=o.return;while(o);var i=r}catch(s){i=`
39
- Error generating stack: `+s.message+`
40
- `+s.stack}return{value:e,source:n,stack:i,digest:null}}function zd(e,n,r){return{value:e,source:null,stack:r??null,digest:n??null}}function op(e,n){try{console.error(n.value)}catch(r){setTimeout(function(){throw r})}}var kR=typeof WeakMap=="function"?WeakMap:Map;function L1(e,n,r){r=Fn(-1,r),r.tag=3,r.payload={element:null};var o=n.value;return r.callback=function(){bc||(bc=!0,hp=o),op(e,n)},r}function z1(e,n,r){r=Fn(-1,r),r.tag=3;var o=e.type.getDerivedStateFromError;if(typeof o=="function"){var i=n.value;r.payload=function(){return o(i)},r.callback=function(){op(e,n)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(r.callback=function(){op(e,n),typeof o!="function"&&(Sr===null?Sr=new Set([this]):Sr.add(this));var a=n.stack;this.componentDidCatch(n.value,{componentStack:a!==null?a:""})}),r}function Oy(e,n,r){var o=e.pingCache;if(o===null){o=e.pingCache=new kR;var i=new Set;o.set(n,i)}else i=o.get(n),i===void 0&&(i=new Set,o.set(n,i));i.has(r)||(i.add(r),e=FR.bind(null,e,n,r),n.then(e,e))}function Dy(e){do{var n;if((n=e.tag===13)&&(n=e.memoizedState,n=n!==null?n.dehydrated!==null:!0),n)return e;e=e.return}while(e!==null);return null}function Ly(e,n,r,o,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===n?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(n=Fn(-1,1),n.tag=2,_r(r,n,1))),r.lanes|=1),e)}var NR=qn.ReactCurrentOwner,ft=!1;function rt(e,n,r,o){n.child=e===null?h1(n,null,r,o):fi(n,e.child,r,o)}function zy(e,n,r,o,i){r=r.render;var s=n.ref;return ri(n,i),o=Gh(e,n,r,o,s,i),r=Yh(),e!==null&&!ft?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~i,Gn(e,n,i)):(Pe&&r&&Ih(n),n.flags|=1,rt(e,n,o,i),n.child)}function Fy(e,n,r,o,i){if(e===null){var s=r.type;return typeof s=="function"&&!rm(s)&&s.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(n.tag=15,n.type=s,F1(e,n,s,o,i)):(e=Hl(r.type,null,o,n,n.mode,i),e.ref=n.ref,e.return=n,n.child=e)}if(s=e.child,!(e.lanes&i)){var a=s.memoizedProps;if(r=r.compare,r=r!==null?r:Vs,r(a,o)&&e.ref===n.ref)return Gn(e,n,i)}return n.flags|=1,e=Er(s,o),e.ref=n.ref,e.return=n,n.child=e}function F1(e,n,r,o,i){if(e!==null){var s=e.memoizedProps;if(Vs(s,o)&&e.ref===n.ref)if(ft=!1,n.pendingProps=o=s,(e.lanes&i)!==0)e.flags&131072&&(ft=!0);else return n.lanes=e.lanes,Gn(e,n,i)}return ip(e,n,r,o,i)}function V1(e,n,r){var o=n.pendingProps,i=o.children,s=e!==null?e.memoizedState:null;if(o.mode==="hidden")if(!(n.mode&1))n.memoizedState={baseLanes:0,cachePool:null,transitions:null},_e(qo,_t),_t|=r;else{if(!(r&1073741824))return e=s!==null?s.baseLanes|r:r,n.lanes=n.childLanes=1073741824,n.memoizedState={baseLanes:e,cachePool:null,transitions:null},n.updateQueue=null,_e(qo,_t),_t|=e,null;n.memoizedState={baseLanes:0,cachePool:null,transitions:null},o=s!==null?s.baseLanes:r,_e(qo,_t),_t|=o}else s!==null?(o=s.baseLanes|r,n.memoizedState=null):o=r,_e(qo,_t),_t|=o;return rt(e,n,i,r),n.child}function B1(e,n){var r=n.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(n.flags|=512,n.flags|=2097152)}function ip(e,n,r,o,i){var s=mt(r)?so:nt.current;return s=ui(n,s),ri(n,i),r=Gh(e,n,r,o,s,i),o=Yh(),e!==null&&!ft?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~i,Gn(e,n,i)):(Pe&&o&&Ih(n),n.flags|=1,rt(e,n,r,i),n.child)}function Vy(e,n,r,o,i){if(mt(r)){var s=!0;dc(n)}else s=!1;if(ri(n,i),n.stateNode===null)Fl(e,n),D1(n,r,o),rp(n,r,o,i),o=!0;else if(e===null){var a=n.stateNode,l=n.memoizedProps;a.props=l;var c=a.context,u=r.contextType;typeof u=="object"&&u!==null?u=Ht(u):(u=mt(r)?so:nt.current,u=ui(n,u));var f=r.getDerivedStateFromProps,d=typeof f=="function"||typeof a.getSnapshotBeforeUpdate=="function";d||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==o||c!==u)&&$y(n,a,o,u),ur=!1;var p=n.memoizedState;a.state=p,gc(n,o,a,i),c=n.memoizedState,l!==o||p!==c||ht.current||ur?(typeof f=="function"&&(np(n,r,f,o),c=n.memoizedState),(l=ur||Iy(n,r,l,o,p,c,u))?(d||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(n.flags|=4194308)):(typeof a.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=o,n.memoizedState=c),a.props=o,a.state=c,a.context=u,o=l):(typeof a.componentDidMount=="function"&&(n.flags|=4194308),o=!1)}else{a=n.stateNode,g1(e,n),l=n.memoizedProps,u=n.type===n.elementType?l:Kt(n.type,l),a.props=u,d=n.pendingProps,p=a.context,c=r.contextType,typeof c=="object"&&c!==null?c=Ht(c):(c=mt(r)?so:nt.current,c=ui(n,c));var m=r.getDerivedStateFromProps;(f=typeof m=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==d||p!==c)&&$y(n,a,o,c),ur=!1,p=n.memoizedState,a.state=p,gc(n,o,a,i);var y=n.memoizedState;l!==d||p!==y||ht.current||ur?(typeof m=="function"&&(np(n,r,m,o),y=n.memoizedState),(u=ur||Iy(n,r,u,o,p,y,c)||!1)?(f||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(o,y,c),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(o,y,c)),typeof a.componentDidUpdate=="function"&&(n.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof a.componentDidUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(n.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(n.flags|=1024),n.memoizedProps=o,n.memoizedState=y),a.props=o,a.state=y,a.context=c,o=u):(typeof a.componentDidUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(n.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(n.flags|=1024),o=!1)}return sp(e,n,r,o,s,i)}function sp(e,n,r,o,i,s){B1(e,n);var a=(n.flags&128)!==0;if(!o&&!a)return i&&ky(n,r,!1),Gn(e,n,s);o=n.stateNode,NR.current=n;var l=a&&typeof r.getDerivedStateFromError!="function"?null:o.render();return n.flags|=1,e!==null&&a?(n.child=fi(n,e.child,null,s),n.child=fi(n,null,l,s)):rt(e,n,l,s),n.memoizedState=o.state,i&&ky(n,r,!0),n.child}function H1(e){var n=e.stateNode;n.pendingContext?Ey(e,n.pendingContext,n.pendingContext!==n.context):n.context&&Ey(e,n.context,!1),Bh(e,n.containerInfo)}function By(e,n,r,o,i){return di(),Oh(i),n.flags|=256,rt(e,n,r,o),n.child}var ap={dehydrated:null,treeContext:null,retryLane:0};function lp(e){return{baseLanes:e,cachePool:null,transitions:null}}function W1(e,n,r){var o=n.pendingProps,i=Ae.current,s=!1,a=(n.flags&128)!==0,l;if((l=a)||(l=e!==null&&e.memoizedState===null?!1:(i&2)!==0),l?(s=!0,n.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),_e(Ae,i&1),e===null)return ep(n),e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(n.mode&1?e.data==="$!"?n.lanes=8:n.lanes=1073741824:n.lanes=1,null):(a=o.children,e=o.fallback,s?(o=n.mode,s=n.child,a={mode:"hidden",children:a},!(o&1)&&s!==null?(s.childLanes=0,s.pendingProps=a):s=xu(a,o,0,null),e=no(e,o,r,null),s.return=n,e.return=n,s.sibling=e,n.child=s,n.child.memoizedState=lp(r),n.memoizedState=ap,e):qh(n,a));if(i=e.memoizedState,i!==null&&(l=i.dehydrated,l!==null))return PR(e,n,a,o,l,i,r);if(s){s=o.fallback,a=n.mode,i=e.child,l=i.sibling;var c={mode:"hidden",children:o.children};return!(a&1)&&n.child!==i?(o=n.child,o.childLanes=0,o.pendingProps=c,n.deletions=null):(o=Er(i,c),o.subtreeFlags=i.subtreeFlags&14680064),l!==null?s=Er(l,s):(s=no(s,a,r,null),s.flags|=2),s.return=n,o.return=n,o.sibling=s,n.child=o,o=s,s=n.child,a=e.child.memoizedState,a=a===null?lp(r):{baseLanes:a.baseLanes|r,cachePool:null,transitions:a.transitions},s.memoizedState=a,s.childLanes=e.childLanes&~r,n.memoizedState=ap,o}return s=e.child,e=s.sibling,o=Er(s,{mode:"visible",children:o.children}),!(n.mode&1)&&(o.lanes=r),o.return=n,o.sibling=null,e!==null&&(r=n.deletions,r===null?(n.deletions=[e],n.flags|=16):r.push(e)),n.child=o,n.memoizedState=null,o}function qh(e,n){return n=xu({mode:"visible",children:n},e.mode,0,null),n.return=e,e.child=n}function nl(e,n,r,o){return o!==null&&Oh(o),fi(n,e.child,null,r),e=qh(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function PR(e,n,r,o,i,s,a){if(r)return n.flags&256?(n.flags&=-257,o=zd(Error(q(422))),nl(e,n,a,o)):n.memoizedState!==null?(n.child=e.child,n.flags|=128,null):(s=o.fallback,i=n.mode,o=xu({mode:"visible",children:o.children},i,0,null),s=no(s,i,a,null),s.flags|=2,o.return=n,s.return=n,o.sibling=s,n.child=o,n.mode&1&&fi(n,e.child,null,a),n.child.memoizedState=lp(a),n.memoizedState=ap,s);if(!(n.mode&1))return nl(e,n,a,null);if(i.data==="$!"){if(o=i.nextSibling&&i.nextSibling.dataset,o)var l=o.dgst;return o=l,s=Error(q(419)),o=zd(s,o,void 0),nl(e,n,a,o)}if(l=(a&e.childLanes)!==0,ft||l){if(o=Ue,o!==null){switch(a&-a){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(o.suspendedLanes|a)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,Un(e,i),on(o,e,i,-1))}return nm(),o=zd(Error(q(421))),nl(e,n,a,o)}return i.data==="$?"?(n.flags|=128,n.child=e.child,n=VR.bind(null,e),i._reactRetry=n,null):(e=s.treeContext,Ct=br(i.nextSibling),Et=n,Pe=!0,Qt=null,e!==null&&(Dt[Lt++]=On,Dt[Lt++]=Dn,Dt[Lt++]=ao,On=e.id,Dn=e.overflow,ao=n),n=qh(n,o.children),n.flags|=4096,n)}function Hy(e,n,r){e.lanes|=n;var o=e.alternate;o!==null&&(o.lanes|=n),tp(e.return,n,r)}function Fd(e,n,r,o,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:o,tail:r,tailMode:i}:(s.isBackwards=n,s.rendering=null,s.renderingStartTime=0,s.last=o,s.tail=r,s.tailMode=i)}function U1(e,n,r){var o=n.pendingProps,i=o.revealOrder,s=o.tail;if(rt(e,n,o.children,r),o=Ae.current,o&2)o=o&1|2,n.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Hy(e,r,n);else if(e.tag===19)Hy(e,r,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}o&=1}if(_e(Ae,o),!(n.mode&1))n.memoizedState=null;else switch(i){case"forwards":for(r=n.child,i=null;r!==null;)e=r.alternate,e!==null&&yc(e)===null&&(i=r),r=r.sibling;r=i,r===null?(i=n.child,n.child=null):(i=r.sibling,r.sibling=null),Fd(n,!1,i,r,s);break;case"backwards":for(r=null,i=n.child,n.child=null;i!==null;){if(e=i.alternate,e!==null&&yc(e)===null){n.child=i;break}e=i.sibling,i.sibling=r,r=i,i=e}Fd(n,!0,r,null,s);break;case"together":Fd(n,!1,null,null,void 0);break;default:n.memoizedState=null}return n.child}function Fl(e,n){!(n.mode&1)&&e!==null&&(e.alternate=null,n.alternate=null,n.flags|=2)}function Gn(e,n,r){if(e!==null&&(n.dependencies=e.dependencies),co|=n.lanes,!(r&n.childLanes))return null;if(e!==null&&n.child!==e.child)throw Error(q(153));if(n.child!==null){for(e=n.child,r=Er(e,e.pendingProps),n.child=r,r.return=n;e.sibling!==null;)e=e.sibling,r=r.sibling=Er(e,e.pendingProps),r.return=n;r.sibling=null}return n.child}function MR(e,n,r){switch(n.tag){case 3:H1(n),di();break;case 5:y1(n);break;case 1:mt(n.type)&&dc(n);break;case 4:Bh(n,n.stateNode.containerInfo);break;case 10:var o=n.type._context,i=n.memoizedProps.value;_e(hc,o._currentValue),o._currentValue=i;break;case 13:if(o=n.memoizedState,o!==null)return o.dehydrated!==null?(_e(Ae,Ae.current&1),n.flags|=128,null):r&n.child.childLanes?W1(e,n,r):(_e(Ae,Ae.current&1),e=Gn(e,n,r),e!==null?e.sibling:null);_e(Ae,Ae.current&1);break;case 19:if(o=(r&n.childLanes)!==0,e.flags&128){if(o)return U1(e,n,r);n.flags|=128}if(i=n.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),_e(Ae,Ae.current),o)break;return null;case 22:case 23:return n.lanes=0,V1(e,n,r)}return Gn(e,n,r)}var G1,cp,Y1,X1;G1=function(e,n){for(var r=n.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===n)break;for(;r.sibling===null;){if(r.return===null||r.return===n)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};cp=function(){};Y1=function(e,n,r,o){var i=e.memoizedProps;if(i!==o){e=n.stateNode,Jr(wn.current);var s=null;switch(r){case"input":i=jf(e,i),o=jf(e,o),s=[];break;case"select":i=$e({},i,{value:void 0}),o=$e({},o,{value:void 0}),s=[];break;case"textarea":i=If(e,i),o=If(e,o),s=[];break;default:typeof i.onClick!="function"&&typeof o.onClick=="function"&&(e.onclick=cc)}Of(r,o);var a;r=null;for(u in i)if(!o.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var l=i[u];for(a in l)l.hasOwnProperty(a)&&(r||(r={}),r[a]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Is.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in o){var c=o[u];if(l=i!=null?i[u]:void 0,o.hasOwnProperty(u)&&c!==l&&(c!=null||l!=null))if(u==="style")if(l){for(a in l)!l.hasOwnProperty(a)||c&&c.hasOwnProperty(a)||(r||(r={}),r[a]="");for(a in c)c.hasOwnProperty(a)&&l[a]!==c[a]&&(r||(r={}),r[a]=c[a])}else r||(s||(s=[]),s.push(u,r)),r=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,l=l?l.__html:void 0,c!=null&&l!==c&&(s=s||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(s=s||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Is.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&Ce("scroll",e),s||l===c||(s=[])):(s=s||[]).push(u,c))}r&&(s=s||[]).push("style",r);var u=s;(n.updateQueue=u)&&(n.flags|=4)}};X1=function(e,n,r,o){r!==o&&(n.flags|=4)};function qi(e,n){if(!Pe)switch(e.tailMode){case"hidden":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var o=null;r!==null;)r.alternate!==null&&(o=r),r=r.sibling;o===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function Ze(e){var n=e.alternate!==null&&e.alternate.child===e.child,r=0,o=0;if(n)for(var i=e.child;i!==null;)r|=i.lanes|i.childLanes,o|=i.subtreeFlags&14680064,o|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)r|=i.lanes|i.childLanes,o|=i.subtreeFlags,o|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=o,e.childLanes=r,n}function RR(e,n,r){var o=n.pendingProps;switch($h(n),n.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ze(n),null;case 1:return mt(n.type)&&uc(),Ze(n),null;case 3:return o=n.stateNode,pi(),ke(ht),ke(nt),Wh(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(e===null||e.child===null)&&(el(n)?n.flags|=4:e===null||e.memoizedState.isDehydrated&&!(n.flags&256)||(n.flags|=1024,Qt!==null&&(yp(Qt),Qt=null))),cp(e,n),Ze(n),null;case 5:Hh(n);var i=Jr(Gs.current);if(r=n.type,e!==null&&n.stateNode!=null)Y1(e,n,r,o,i),e.ref!==n.ref&&(n.flags|=512,n.flags|=2097152);else{if(!o){if(n.stateNode===null)throw Error(q(166));return Ze(n),null}if(e=Jr(wn.current),el(n)){o=n.stateNode,r=n.type;var s=n.memoizedProps;switch(o[mn]=n,o[Ws]=s,e=(n.mode&1)!==0,r){case"dialog":Ce("cancel",o),Ce("close",o);break;case"iframe":case"object":case"embed":Ce("load",o);break;case"video":case"audio":for(i=0;i<fs.length;i++)Ce(fs[i],o);break;case"source":Ce("error",o);break;case"img":case"image":case"link":Ce("error",o),Ce("load",o);break;case"details":Ce("toggle",o);break;case"input":Qg(o,s),Ce("invalid",o);break;case"select":o._wrapperState={wasMultiple:!!s.multiple},Ce("invalid",o);break;case"textarea":ey(o,s),Ce("invalid",o)}Of(r,s),i=null;for(var a in s)if(s.hasOwnProperty(a)){var l=s[a];a==="children"?typeof l=="string"?o.textContent!==l&&(s.suppressHydrationWarning!==!0&&Ja(o.textContent,l,e),i=["children",l]):typeof l=="number"&&o.textContent!==""+l&&(s.suppressHydrationWarning!==!0&&Ja(o.textContent,l,e),i=["children",""+l]):Is.hasOwnProperty(a)&&l!=null&&a==="onScroll"&&Ce("scroll",o)}switch(r){case"input":Ua(o),Jg(o,s,!0);break;case"textarea":Ua(o),ty(o);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(o.onclick=cc)}o=i,n.updateQueue=o,o!==null&&(n.flags|=4)}else{a=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=_w(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof o.is=="string"?e=a.createElement(r,{is:o.is}):(e=a.createElement(r),r==="select"&&(a=e,o.multiple?a.multiple=!0:o.size&&(a.size=o.size))):e=a.createElementNS(e,r),e[mn]=n,e[Ws]=o,G1(e,n,!1,!1),n.stateNode=e;e:{switch(a=Df(r,o),r){case"dialog":Ce("cancel",e),Ce("close",e),i=o;break;case"iframe":case"object":case"embed":Ce("load",e),i=o;break;case"video":case"audio":for(i=0;i<fs.length;i++)Ce(fs[i],e);i=o;break;case"source":Ce("error",e),i=o;break;case"img":case"image":case"link":Ce("error",e),Ce("load",e),i=o;break;case"details":Ce("toggle",e),i=o;break;case"input":Qg(e,o),i=jf(e,o),Ce("invalid",e);break;case"option":i=o;break;case"select":e._wrapperState={wasMultiple:!!o.multiple},i=$e({},o,{value:void 0}),Ce("invalid",e);break;case"textarea":ey(e,o),i=If(e,o),Ce("invalid",e);break;default:i=o}Of(r,i),l=i;for(s in l)if(l.hasOwnProperty(s)){var c=l[s];s==="style"?Ew(e,c):s==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&Sw(e,c)):s==="children"?typeof c=="string"?(r!=="textarea"||c!=="")&&$s(e,c):typeof c=="number"&&$s(e,""+c):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(Is.hasOwnProperty(s)?c!=null&&s==="onScroll"&&Ce("scroll",e):c!=null&&wh(e,s,c,a))}switch(r){case"input":Ua(e),Jg(e,o,!1);break;case"textarea":Ua(e),ty(e);break;case"option":o.value!=null&&e.setAttribute("value",""+Mr(o.value));break;case"select":e.multiple=!!o.multiple,s=o.value,s!=null?Jo(e,!!o.multiple,s,!1):o.defaultValue!=null&&Jo(e,!!o.multiple,o.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=cc)}switch(r){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}}o&&(n.flags|=4)}n.ref!==null&&(n.flags|=512,n.flags|=2097152)}return Ze(n),null;case 6:if(e&&n.stateNode!=null)X1(e,n,e.memoizedProps,o);else{if(typeof o!="string"&&n.stateNode===null)throw Error(q(166));if(r=Jr(Gs.current),Jr(wn.current),el(n)){if(o=n.stateNode,r=n.memoizedProps,o[mn]=n,(s=o.nodeValue!==r)&&(e=Et,e!==null))switch(e.tag){case 3:Ja(o.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ja(o.nodeValue,r,(e.mode&1)!==0)}s&&(n.flags|=4)}else o=(r.nodeType===9?r:r.ownerDocument).createTextNode(o),o[mn]=n,n.stateNode=o}return Ze(n),null;case 13:if(ke(Ae),o=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Pe&&Ct!==null&&n.mode&1&&!(n.flags&128))f1(),di(),n.flags|=98560,s=!1;else if(s=el(n),o!==null&&o.dehydrated!==null){if(e===null){if(!s)throw Error(q(318));if(s=n.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(q(317));s[mn]=n}else di(),!(n.flags&128)&&(n.memoizedState=null),n.flags|=4;Ze(n),s=!1}else Qt!==null&&(yp(Qt),Qt=null),s=!0;if(!s)return n.flags&65536?n:null}return n.flags&128?(n.lanes=r,n):(o=o!==null,o!==(e!==null&&e.memoizedState!==null)&&o&&(n.child.flags|=8192,n.mode&1&&(e===null||Ae.current&1?Be===0&&(Be=3):nm())),n.updateQueue!==null&&(n.flags|=4),Ze(n),null);case 4:return pi(),cp(e,n),e===null&&Bs(n.stateNode.containerInfo),Ze(n),null;case 10:return zh(n.type._context),Ze(n),null;case 17:return mt(n.type)&&uc(),Ze(n),null;case 19:if(ke(Ae),s=n.memoizedState,s===null)return Ze(n),null;if(o=(n.flags&128)!==0,a=s.rendering,a===null)if(o)qi(s,!1);else{if(Be!==0||e!==null&&e.flags&128)for(e=n.child;e!==null;){if(a=yc(e),a!==null){for(n.flags|=128,qi(s,!1),o=a.updateQueue,o!==null&&(n.updateQueue=o,n.flags|=4),n.subtreeFlags=0,o=r,r=n.child;r!==null;)s=r,e=o,s.flags&=14680066,a=s.alternate,a===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=a.childLanes,s.lanes=a.lanes,s.child=a.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=a.memoizedProps,s.memoizedState=a.memoizedState,s.updateQueue=a.updateQueue,s.type=a.type,e=a.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return _e(Ae,Ae.current&1|2),n.child}e=e.sibling}s.tail!==null&&De()>mi&&(n.flags|=128,o=!0,qi(s,!1),n.lanes=4194304)}else{if(!o)if(e=yc(a),e!==null){if(n.flags|=128,o=!0,r=e.updateQueue,r!==null&&(n.updateQueue=r,n.flags|=4),qi(s,!0),s.tail===null&&s.tailMode==="hidden"&&!a.alternate&&!Pe)return Ze(n),null}else 2*De()-s.renderingStartTime>mi&&r!==1073741824&&(n.flags|=128,o=!0,qi(s,!1),n.lanes=4194304);s.isBackwards?(a.sibling=n.child,n.child=a):(r=s.last,r!==null?r.sibling=a:n.child=a,s.last=a)}return s.tail!==null?(n=s.tail,s.rendering=n,s.tail=n.sibling,s.renderingStartTime=De(),n.sibling=null,r=Ae.current,_e(Ae,o?r&1|2:r&1),n):(Ze(n),null);case 22:case 23:return tm(),o=n.memoizedState!==null,e!==null&&e.memoizedState!==null!==o&&(n.flags|=8192),o&&n.mode&1?_t&1073741824&&(Ze(n),n.subtreeFlags&6&&(n.flags|=8192)):Ze(n),null;case 24:return null;case 25:return null}throw Error(q(156,n.tag))}function jR(e,n){switch($h(n),n.tag){case 1:return mt(n.type)&&uc(),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return pi(),ke(ht),ke(nt),Wh(),e=n.flags,e&65536&&!(e&128)?(n.flags=e&-65537|128,n):null;case 5:return Hh(n),null;case 13:if(ke(Ae),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(q(340));di()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return ke(Ae),null;case 4:return pi(),null;case 10:return zh(n.type._context),null;case 22:case 23:return tm(),null;case 24:return null;default:return null}}var rl=!1,et=!1,AR=typeof WeakSet=="function"?WeakSet:Set,re=null;function Ko(e,n){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(o){Oe(e,n,o)}else r.current=null}function up(e,n,r){try{r()}catch(o){Oe(e,n,o)}}var Wy=!1;function TR(e,n){if(Yf=sc,e=Jw(),Th(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var o=r.getSelection&&r.getSelection();if(o&&o.rangeCount!==0){r=o.anchorNode;var i=o.anchorOffset,s=o.focusNode;o=o.focusOffset;try{r.nodeType,s.nodeType}catch{r=null;break e}var a=0,l=-1,c=-1,u=0,f=0,d=e,p=null;t:for(;;){for(var m;d!==r||i!==0&&d.nodeType!==3||(l=a+i),d!==s||o!==0&&d.nodeType!==3||(c=a+o),d.nodeType===3&&(a+=d.nodeValue.length),(m=d.firstChild)!==null;)p=d,d=m;for(;;){if(d===e)break t;if(p===r&&++u===i&&(l=a),p===s&&++f===o&&(c=a),(m=d.nextSibling)!==null)break;d=p,p=d.parentNode}d=m}r=l===-1||c===-1?null:{start:l,end:c}}else r=null}r=r||{start:0,end:0}}else r=null;for(Xf={focusedElem:e,selectionRange:r},sc=!1,re=n;re!==null;)if(n=re,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,re=e;else for(;re!==null;){n=re;try{var y=n.alternate;if(n.flags&1024)switch(n.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var b=y.memoizedProps,_=y.memoizedState,v=n.stateNode,x=v.getSnapshotBeforeUpdate(n.elementType===n.type?b:Kt(n.type,b),_);v.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var w=n.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(q(163))}}catch(S){Oe(n,n.return,S)}if(e=n.sibling,e!==null){e.return=n.return,re=e;break}re=n.return}return y=Wy,Wy=!1,y}function Es(e,n,r){var o=n.updateQueue;if(o=o!==null?o.lastEffect:null,o!==null){var i=o=o.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&up(n,r,s)}i=i.next}while(i!==o)}}function yu(e,n){if(n=n.updateQueue,n=n!==null?n.lastEffect:null,n!==null){var r=n=n.next;do{if((r.tag&e)===e){var o=r.create;r.destroy=o()}r=r.next}while(r!==n)}}function dp(e){var n=e.ref;if(n!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof n=="function"?n(e):n.current=e}}function K1(e){var n=e.alternate;n!==null&&(e.alternate=null,K1(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&(delete n[mn],delete n[Ws],delete n[Zf],delete n[mR],delete n[gR])),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 q1(e){return e.tag===5||e.tag===3||e.tag===4}function Uy(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||q1(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function fp(e,n,r){var o=e.tag;if(o===5||o===6)e=e.stateNode,n?r.nodeType===8?r.parentNode.insertBefore(e,n):r.insertBefore(e,n):(r.nodeType===8?(n=r.parentNode,n.insertBefore(e,r)):(n=r,n.appendChild(e)),r=r._reactRootContainer,r!=null||n.onclick!==null||(n.onclick=cc));else if(o!==4&&(e=e.child,e!==null))for(fp(e,n,r),e=e.sibling;e!==null;)fp(e,n,r),e=e.sibling}function pp(e,n,r){var o=e.tag;if(o===5||o===6)e=e.stateNode,n?r.insertBefore(e,n):r.appendChild(e);else if(o!==4&&(e=e.child,e!==null))for(pp(e,n,r),e=e.sibling;e!==null;)pp(e,n,r),e=e.sibling}var Ge=null,Zt=!1;function er(e,n,r){for(r=r.child;r!==null;)Z1(e,n,r),r=r.sibling}function Z1(e,n,r){if(xn&&typeof xn.onCommitFiberUnmount=="function")try{xn.onCommitFiberUnmount(cu,r)}catch{}switch(r.tag){case 5:et||Ko(r,n);case 6:var o=Ge,i=Zt;Ge=null,er(e,n,r),Ge=o,Zt=i,Ge!==null&&(Zt?(e=Ge,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Ge.removeChild(r.stateNode));break;case 18:Ge!==null&&(Zt?(e=Ge,r=r.stateNode,e.nodeType===8?Td(e.parentNode,r):e.nodeType===1&&Td(e,r),zs(e)):Td(Ge,r.stateNode));break;case 4:o=Ge,i=Zt,Ge=r.stateNode.containerInfo,Zt=!0,er(e,n,r),Ge=o,Zt=i;break;case 0:case 11:case 14:case 15:if(!et&&(o=r.updateQueue,o!==null&&(o=o.lastEffect,o!==null))){i=o=o.next;do{var s=i,a=s.destroy;s=s.tag,a!==void 0&&(s&2||s&4)&&up(r,n,a),i=i.next}while(i!==o)}er(e,n,r);break;case 1:if(!et&&(Ko(r,n),o=r.stateNode,typeof o.componentWillUnmount=="function"))try{o.props=r.memoizedProps,o.state=r.memoizedState,o.componentWillUnmount()}catch(l){Oe(r,n,l)}er(e,n,r);break;case 21:er(e,n,r);break;case 22:r.mode&1?(et=(o=et)||r.memoizedState!==null,er(e,n,r),et=o):er(e,n,r);break;default:er(e,n,r)}}function Gy(e){var n=e.updateQueue;if(n!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new AR),n.forEach(function(o){var i=BR.bind(null,e,o);r.has(o)||(r.add(o),o.then(i,i))})}}function Ut(e,n){var r=n.deletions;if(r!==null)for(var o=0;o<r.length;o++){var i=r[o];try{var s=e,a=n,l=a;e:for(;l!==null;){switch(l.tag){case 5:Ge=l.stateNode,Zt=!1;break e;case 3:Ge=l.stateNode.containerInfo,Zt=!0;break e;case 4:Ge=l.stateNode.containerInfo,Zt=!0;break e}l=l.return}if(Ge===null)throw Error(q(160));Z1(s,a,i),Ge=null,Zt=!1;var c=i.alternate;c!==null&&(c.return=null),i.return=null}catch(u){Oe(i,n,u)}}if(n.subtreeFlags&12854)for(n=n.child;n!==null;)Q1(n,e),n=n.sibling}function Q1(e,n){var r=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ut(n,e),fn(e),o&4){try{Es(3,e,e.return),yu(3,e)}catch(b){Oe(e,e.return,b)}try{Es(5,e,e.return)}catch(b){Oe(e,e.return,b)}}break;case 1:Ut(n,e),fn(e),o&512&&r!==null&&Ko(r,r.return);break;case 5:if(Ut(n,e),fn(e),o&512&&r!==null&&Ko(r,r.return),e.flags&32){var i=e.stateNode;try{$s(i,"")}catch(b){Oe(e,e.return,b)}}if(o&4&&(i=e.stateNode,i!=null)){var s=e.memoizedProps,a=r!==null?r.memoizedProps:s,l=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{l==="input"&&s.type==="radio"&&s.name!=null&&ww(i,s),Df(l,a);var u=Df(l,s);for(a=0;a<c.length;a+=2){var f=c[a],d=c[a+1];f==="style"?Ew(i,d):f==="dangerouslySetInnerHTML"?Sw(i,d):f==="children"?$s(i,d):wh(i,f,d,u)}switch(l){case"input":Af(i,s);break;case"textarea":bw(i,s);break;case"select":var p=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var m=s.value;m!=null?Jo(i,!!s.multiple,m,!1):p!==!!s.multiple&&(s.defaultValue!=null?Jo(i,!!s.multiple,s.defaultValue,!0):Jo(i,!!s.multiple,s.multiple?[]:"",!1))}i[Ws]=s}catch(b){Oe(e,e.return,b)}}break;case 6:if(Ut(n,e),fn(e),o&4){if(e.stateNode===null)throw Error(q(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(b){Oe(e,e.return,b)}}break;case 3:if(Ut(n,e),fn(e),o&4&&r!==null&&r.memoizedState.isDehydrated)try{zs(n.containerInfo)}catch(b){Oe(e,e.return,b)}break;case 4:Ut(n,e),fn(e);break;case 13:Ut(n,e),fn(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(Jh=De())),o&4&&Gy(e);break;case 22:if(f=r!==null&&r.memoizedState!==null,e.mode&1?(et=(u=et)||f,Ut(n,e),et=u):Ut(n,e),fn(e),o&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!f&&e.mode&1)for(re=e,f=e.child;f!==null;){for(d=re=f;re!==null;){switch(p=re,m=p.child,p.tag){case 0:case 11:case 14:case 15:Es(4,p,p.return);break;case 1:Ko(p,p.return);var y=p.stateNode;if(typeof y.componentWillUnmount=="function"){o=p,r=p.return;try{n=o,y.props=n.memoizedProps,y.state=n.memoizedState,y.componentWillUnmount()}catch(b){Oe(o,r,b)}}break;case 5:Ko(p,p.return);break;case 22:if(p.memoizedState!==null){Xy(d);continue}}m!==null?(m.return=p,re=m):Xy(d)}f=f.sibling}e:for(f=null,d=e;;){if(d.tag===5){if(f===null){f=d;try{i=d.stateNode,u?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(l=d.stateNode,c=d.memoizedProps.style,a=c!=null&&c.hasOwnProperty("display")?c.display:null,l.style.display=Cw("display",a))}catch(b){Oe(e,e.return,b)}}}else if(d.tag===6){if(f===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(b){Oe(e,e.return,b)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;f===d&&(f=null),d=d.return}f===d&&(f=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:Ut(n,e),fn(e),o&4&&Gy(e);break;case 21:break;default:Ut(n,e),fn(e)}}function fn(e){var n=e.flags;if(n&2){try{e:{for(var r=e.return;r!==null;){if(q1(r)){var o=r;break e}r=r.return}throw Error(q(160))}switch(o.tag){case 5:var i=o.stateNode;o.flags&32&&($s(i,""),o.flags&=-33);var s=Uy(e);pp(e,s,i);break;case 3:case 4:var a=o.stateNode.containerInfo,l=Uy(e);fp(e,l,a);break;default:throw Error(q(161))}}catch(c){Oe(e,e.return,c)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function IR(e,n,r){re=e,J1(e)}function J1(e,n,r){for(var o=(e.mode&1)!==0;re!==null;){var i=re,s=i.child;if(i.tag===22&&o){var a=i.memoizedState!==null||rl;if(!a){var l=i.alternate,c=l!==null&&l.memoizedState!==null||et;l=rl;var u=et;if(rl=a,(et=c)&&!u)for(re=i;re!==null;)a=re,c=a.child,a.tag===22&&a.memoizedState!==null?Ky(i):c!==null?(c.return=a,re=c):Ky(i);for(;s!==null;)re=s,J1(s),s=s.sibling;re=i,rl=l,et=u}Yy(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,re=s):Yy(e)}}function Yy(e){for(;re!==null;){var n=re;if(n.flags&8772){var r=n.alternate;try{if(n.flags&8772)switch(n.tag){case 0:case 11:case 15:et||yu(5,n);break;case 1:var o=n.stateNode;if(n.flags&4&&!et)if(r===null)o.componentDidMount();else{var i=n.elementType===n.type?r.memoizedProps:Kt(n.type,r.memoizedProps);o.componentDidUpdate(i,r.memoizedState,o.__reactInternalSnapshotBeforeUpdate)}var s=n.updateQueue;s!==null&&jy(n,s,o);break;case 3:var a=n.updateQueue;if(a!==null){if(r=null,n.child!==null)switch(n.child.tag){case 5:r=n.child.stateNode;break;case 1:r=n.child.stateNode}jy(n,a,r)}break;case 5:var l=n.stateNode;if(r===null&&n.flags&4){r=l;var c=n.memoizedProps;switch(n.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&r.focus();break;case"img":c.src&&(r.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(n.memoizedState===null){var u=n.alternate;if(u!==null){var f=u.memoizedState;if(f!==null){var d=f.dehydrated;d!==null&&zs(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(q(163))}et||n.flags&512&&dp(n)}catch(p){Oe(n,n.return,p)}}if(n===e){re=null;break}if(r=n.sibling,r!==null){r.return=n.return,re=r;break}re=n.return}}function Xy(e){for(;re!==null;){var n=re;if(n===e){re=null;break}var r=n.sibling;if(r!==null){r.return=n.return,re=r;break}re=n.return}}function Ky(e){for(;re!==null;){var n=re;try{switch(n.tag){case 0:case 11:case 15:var r=n.return;try{yu(4,n)}catch(c){Oe(n,r,c)}break;case 1:var o=n.stateNode;if(typeof o.componentDidMount=="function"){var i=n.return;try{o.componentDidMount()}catch(c){Oe(n,i,c)}}var s=n.return;try{dp(n)}catch(c){Oe(n,s,c)}break;case 5:var a=n.return;try{dp(n)}catch(c){Oe(n,a,c)}}}catch(c){Oe(n,n.return,c)}if(n===e){re=null;break}var l=n.sibling;if(l!==null){l.return=n.return,re=l;break}re=n.return}}var $R=Math.ceil,wc=qn.ReactCurrentDispatcher,Zh=qn.ReactCurrentOwner,Vt=qn.ReactCurrentBatchConfig,ve=0,Ue=null,Le=null,Ye=0,_t=0,qo=Or(0),Be=0,qs=null,co=0,vu=0,Qh=0,ks=null,dt=null,Jh=0,mi=1/0,Tn=null,bc=!1,hp=null,Sr=null,ol=!1,gr=null,_c=0,Ns=0,mp=null,Vl=-1,Bl=0;function it(){return ve&6?De():Vl!==-1?Vl:Vl=De()}function Cr(e){return e.mode&1?ve&2&&Ye!==0?Ye&-Ye:vR.transition!==null?(Bl===0&&(Bl=Dw()),Bl):(e=we,e!==0||(e=window.event,e=e===void 0?16:Ww(e.type)),e):1}function on(e,n,r,o){if(50<Ns)throw Ns=0,mp=null,Error(q(185));ma(e,r,o),(!(ve&2)||e!==Ue)&&(e===Ue&&(!(ve&2)&&(vu|=r),Be===4&&pr(e,Ye)),gt(e,o),r===1&&ve===0&&!(n.mode&1)&&(mi=De()+500,hu&&Dr()))}function gt(e,n){var r=e.callbackNode;vM(e,n);var o=ic(e,e===Ue?Ye:0);if(o===0)r!==null&&oy(r),e.callbackNode=null,e.callbackPriority=0;else if(n=o&-o,e.callbackPriority!==n){if(r!=null&&oy(r),n===1)e.tag===0?yR(qy.bind(null,e)):c1(qy.bind(null,e)),pR(function(){!(ve&6)&&Dr()}),r=null;else{switch(Lw(o)){case 1:r=Eh;break;case 4:r=$w;break;case 16:r=oc;break;case 536870912:r=Ow;break;default:r=oc}r=ab(r,eb.bind(null,e))}e.callbackPriority=n,e.callbackNode=r}}function eb(e,n){if(Vl=-1,Bl=0,ve&6)throw Error(q(327));var r=e.callbackNode;if(oi()&&e.callbackNode!==r)return null;var o=ic(e,e===Ue?Ye:0);if(o===0)return null;if(o&30||o&e.expiredLanes||n)n=Sc(e,o);else{n=o;var i=ve;ve|=2;var s=nb();(Ue!==e||Ye!==n)&&(Tn=null,mi=De()+500,to(e,n));do try{LR();break}catch(l){tb(e,l)}while(!0);Lh(),wc.current=s,ve=i,Le!==null?n=0:(Ue=null,Ye=0,n=Be)}if(n!==0){if(n===2&&(i=Bf(e),i!==0&&(o=i,n=gp(e,i))),n===1)throw r=qs,to(e,0),pr(e,o),gt(e,De()),r;if(n===6)pr(e,o);else{if(i=e.current.alternate,!(o&30)&&!OR(i)&&(n=Sc(e,o),n===2&&(s=Bf(e),s!==0&&(o=s,n=gp(e,s))),n===1))throw r=qs,to(e,0),pr(e,o),gt(e,De()),r;switch(e.finishedWork=i,e.finishedLanes=o,n){case 0:case 1:throw Error(q(345));case 2:Kr(e,dt,Tn);break;case 3:if(pr(e,o),(o&130023424)===o&&(n=Jh+500-De(),10<n)){if(ic(e,0)!==0)break;if(i=e.suspendedLanes,(i&o)!==o){it(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=qf(Kr.bind(null,e,dt,Tn),n);break}Kr(e,dt,Tn);break;case 4:if(pr(e,o),(o&4194240)===o)break;for(n=e.eventTimes,i=-1;0<o;){var a=31-rn(o);s=1<<a,a=n[a],a>i&&(i=a),o&=~s}if(o=i,o=De()-o,o=(120>o?120:480>o?480:1080>o?1080:1920>o?1920:3e3>o?3e3:4320>o?4320:1960*$R(o/1960))-o,10<o){e.timeoutHandle=qf(Kr.bind(null,e,dt,Tn),o);break}Kr(e,dt,Tn);break;case 5:Kr(e,dt,Tn);break;default:throw Error(q(329))}}}return gt(e,De()),e.callbackNode===r?eb.bind(null,e):null}function gp(e,n){var r=ks;return e.current.memoizedState.isDehydrated&&(to(e,n).flags|=256),e=Sc(e,n),e!==2&&(n=dt,dt=r,n!==null&&yp(n)),e}function yp(e){dt===null?dt=e:dt.push.apply(dt,e)}function OR(e){for(var n=e;;){if(n.flags&16384){var r=n.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var o=0;o<r.length;o++){var i=r[o],s=i.getSnapshot;i=i.value;try{if(!sn(s(),i))return!1}catch{return!1}}}if(r=n.child,n.subtreeFlags&16384&&r!==null)r.return=n,n=r;else{if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function pr(e,n){for(n&=~Qh,n&=~vu,e.suspendedLanes|=n,e.pingedLanes&=~n,e=e.expirationTimes;0<n;){var r=31-rn(n),o=1<<r;e[r]=-1,n&=~o}}function qy(e){if(ve&6)throw Error(q(327));oi();var n=ic(e,0);if(!(n&1))return gt(e,De()),null;var r=Sc(e,n);if(e.tag!==0&&r===2){var o=Bf(e);o!==0&&(n=o,r=gp(e,o))}if(r===1)throw r=qs,to(e,0),pr(e,n),gt(e,De()),r;if(r===6)throw Error(q(345));return e.finishedWork=e.current.alternate,e.finishedLanes=n,Kr(e,dt,Tn),gt(e,De()),null}function em(e,n){var r=ve;ve|=1;try{return e(n)}finally{ve=r,ve===0&&(mi=De()+500,hu&&Dr())}}function uo(e){gr!==null&&gr.tag===0&&!(ve&6)&&oi();var n=ve;ve|=1;var r=Vt.transition,o=we;try{if(Vt.transition=null,we=1,e)return e()}finally{we=o,Vt.transition=r,ve=n,!(ve&6)&&Dr()}}function tm(){_t=qo.current,ke(qo)}function to(e,n){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,fR(r)),Le!==null)for(r=Le.return;r!==null;){var o=r;switch($h(o),o.tag){case 1:o=o.type.childContextTypes,o!=null&&uc();break;case 3:pi(),ke(ht),ke(nt),Wh();break;case 5:Hh(o);break;case 4:pi();break;case 13:ke(Ae);break;case 19:ke(Ae);break;case 10:zh(o.type._context);break;case 22:case 23:tm()}r=r.return}if(Ue=e,Le=e=Er(e.current,null),Ye=_t=n,Be=0,qs=null,Qh=vu=co=0,dt=ks=null,Qr!==null){for(n=0;n<Qr.length;n++)if(r=Qr[n],o=r.interleaved,o!==null){r.interleaved=null;var i=o.next,s=r.pending;if(s!==null){var a=s.next;s.next=i,o.next=a}r.pending=o}Qr=null}return e}function tb(e,n){do{var r=Le;try{if(Lh(),Ll.current=xc,vc){for(var o=Te.memoizedState;o!==null;){var i=o.queue;i!==null&&(i.pending=null),o=o.next}vc=!1}if(lo=0,We=Ve=Te=null,Cs=!1,Ys=0,Zh.current=null,r===null||r.return===null){Be=1,qs=n,Le=null;break}e:{var s=e,a=r.return,l=r,c=n;if(n=Ye,l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,f=l,d=f.tag;if(!(f.mode&1)&&(d===0||d===11||d===15)){var p=f.alternate;p?(f.updateQueue=p.updateQueue,f.memoizedState=p.memoizedState,f.lanes=p.lanes):(f.updateQueue=null,f.memoizedState=null)}var m=Dy(a);if(m!==null){m.flags&=-257,Ly(m,a,l,s,n),m.mode&1&&Oy(s,u,n),n=m,c=u;var y=n.updateQueue;if(y===null){var b=new Set;b.add(c),n.updateQueue=b}else y.add(c);break e}else{if(!(n&1)){Oy(s,u,n),nm();break e}c=Error(q(426))}}else if(Pe&&l.mode&1){var _=Dy(a);if(_!==null){!(_.flags&65536)&&(_.flags|=256),Ly(_,a,l,s,n),Oh(hi(c,l));break e}}s=c=hi(c,l),Be!==4&&(Be=2),ks===null?ks=[s]:ks.push(s),s=a;do{switch(s.tag){case 3:s.flags|=65536,n&=-n,s.lanes|=n;var v=L1(s,c,n);Ry(s,v);break e;case 1:l=c;var x=s.type,w=s.stateNode;if(!(s.flags&128)&&(typeof x.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(Sr===null||!Sr.has(w)))){s.flags|=65536,n&=-n,s.lanes|=n;var S=z1(s,l,n);Ry(s,S);break e}}s=s.return}while(s!==null)}ob(r)}catch(C){n=C,Le===r&&r!==null&&(Le=r=r.return);continue}break}while(!0)}function nb(){var e=wc.current;return wc.current=xc,e===null?xc:e}function nm(){(Be===0||Be===3||Be===2)&&(Be=4),Ue===null||!(co&268435455)&&!(vu&268435455)||pr(Ue,Ye)}function Sc(e,n){var r=ve;ve|=2;var o=nb();(Ue!==e||Ye!==n)&&(Tn=null,to(e,n));do try{DR();break}catch(i){tb(e,i)}while(!0);if(Lh(),ve=r,wc.current=o,Le!==null)throw Error(q(261));return Ue=null,Ye=0,Be}function DR(){for(;Le!==null;)rb(Le)}function LR(){for(;Le!==null&&!cM();)rb(Le)}function rb(e){var n=sb(e.alternate,e,_t);e.memoizedProps=e.pendingProps,n===null?ob(e):Le=n,Zh.current=null}function ob(e){var n=e;do{var r=n.alternate;if(e=n.return,n.flags&32768){if(r=jR(r,n),r!==null){r.flags&=32767,Le=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Be=6,Le=null;return}}else if(r=RR(r,n,_t),r!==null){Le=r;return}if(n=n.sibling,n!==null){Le=n;return}Le=n=e}while(n!==null);Be===0&&(Be=5)}function Kr(e,n,r){var o=we,i=Vt.transition;try{Vt.transition=null,we=1,zR(e,n,r,o)}finally{Vt.transition=i,we=o}return null}function zR(e,n,r,o){do oi();while(gr!==null);if(ve&6)throw Error(q(327));r=e.finishedWork;var i=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(q(177));e.callbackNode=null,e.callbackPriority=0;var s=r.lanes|r.childLanes;if(xM(e,s),e===Ue&&(Le=Ue=null,Ye=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||ol||(ol=!0,ab(oc,function(){return oi(),null})),s=(r.flags&15990)!==0,r.subtreeFlags&15990||s){s=Vt.transition,Vt.transition=null;var a=we;we=1;var l=ve;ve|=4,Zh.current=null,TR(e,r),Q1(r,e),iR(Xf),sc=!!Yf,Xf=Yf=null,e.current=r,IR(r),uM(),ve=l,we=a,Vt.transition=s}else e.current=r;if(ol&&(ol=!1,gr=e,_c=i),s=e.pendingLanes,s===0&&(Sr=null),pM(r.stateNode),gt(e,De()),n!==null)for(o=e.onRecoverableError,r=0;r<n.length;r++)i=n[r],o(i.value,{componentStack:i.stack,digest:i.digest});if(bc)throw bc=!1,e=hp,hp=null,e;return _c&1&&e.tag!==0&&oi(),s=e.pendingLanes,s&1?e===mp?Ns++:(Ns=0,mp=e):Ns=0,Dr(),null}function oi(){if(gr!==null){var e=Lw(_c),n=Vt.transition,r=we;try{if(Vt.transition=null,we=16>e?16:e,gr===null)var o=!1;else{if(e=gr,gr=null,_c=0,ve&6)throw Error(q(331));var i=ve;for(ve|=4,re=e.current;re!==null;){var s=re,a=s.child;if(re.flags&16){var l=s.deletions;if(l!==null){for(var c=0;c<l.length;c++){var u=l[c];for(re=u;re!==null;){var f=re;switch(f.tag){case 0:case 11:case 15:Es(8,f,s)}var d=f.child;if(d!==null)d.return=f,re=d;else for(;re!==null;){f=re;var p=f.sibling,m=f.return;if(K1(f),f===u){re=null;break}if(p!==null){p.return=m,re=p;break}re=m}}}var y=s.alternate;if(y!==null){var b=y.child;if(b!==null){y.child=null;do{var _=b.sibling;b.sibling=null,b=_}while(b!==null)}}re=s}}if(s.subtreeFlags&2064&&a!==null)a.return=s,re=a;else e:for(;re!==null;){if(s=re,s.flags&2048)switch(s.tag){case 0:case 11:case 15:Es(9,s,s.return)}var v=s.sibling;if(v!==null){v.return=s.return,re=v;break e}re=s.return}}var x=e.current;for(re=x;re!==null;){a=re;var w=a.child;if(a.subtreeFlags&2064&&w!==null)w.return=a,re=w;else e:for(a=x;re!==null;){if(l=re,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:yu(9,l)}}catch(C){Oe(l,l.return,C)}if(l===a){re=null;break e}var S=l.sibling;if(S!==null){S.return=l.return,re=S;break e}re=l.return}}if(ve=i,Dr(),xn&&typeof xn.onPostCommitFiberRoot=="function")try{xn.onPostCommitFiberRoot(cu,e)}catch{}o=!0}return o}finally{we=r,Vt.transition=n}}return!1}function Zy(e,n,r){n=hi(r,n),n=L1(e,n,1),e=_r(e,n,1),n=it(),e!==null&&(ma(e,1,n),gt(e,n))}function Oe(e,n,r){if(e.tag===3)Zy(e,e,r);else for(;n!==null;){if(n.tag===3){Zy(n,e,r);break}else if(n.tag===1){var o=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(Sr===null||!Sr.has(o))){e=hi(r,e),e=z1(n,e,1),n=_r(n,e,1),e=it(),n!==null&&(ma(n,1,e),gt(n,e));break}}n=n.return}}function FR(e,n,r){var o=e.pingCache;o!==null&&o.delete(n),n=it(),e.pingedLanes|=e.suspendedLanes&r,Ue===e&&(Ye&r)===r&&(Be===4||Be===3&&(Ye&130023424)===Ye&&500>De()-Jh?to(e,0):Qh|=r),gt(e,n)}function ib(e,n){n===0&&(e.mode&1?(n=Xa,Xa<<=1,!(Xa&130023424)&&(Xa=4194304)):n=1);var r=it();e=Un(e,n),e!==null&&(ma(e,n,r),gt(e,r))}function VR(e){var n=e.memoizedState,r=0;n!==null&&(r=n.retryLane),ib(e,r)}function BR(e,n){var r=0;switch(e.tag){case 13:var o=e.stateNode,i=e.memoizedState;i!==null&&(r=i.retryLane);break;case 19:o=e.stateNode;break;default:throw Error(q(314))}o!==null&&o.delete(n),ib(e,r)}var sb;sb=function(e,n,r){if(e!==null)if(e.memoizedProps!==n.pendingProps||ht.current)ft=!0;else{if(!(e.lanes&r)&&!(n.flags&128))return ft=!1,MR(e,n,r);ft=!!(e.flags&131072)}else ft=!1,Pe&&n.flags&1048576&&u1(n,pc,n.index);switch(n.lanes=0,n.tag){case 2:var o=n.type;Fl(e,n),e=n.pendingProps;var i=ui(n,nt.current);ri(n,r),i=Gh(null,n,o,e,i,r);var s=Yh();return n.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(n.tag=1,n.memoizedState=null,n.updateQueue=null,mt(o)?(s=!0,dc(n)):s=!1,n.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Vh(n),i.updater=gu,n.stateNode=i,i._reactInternals=n,rp(n,o,e,r),n=sp(null,n,o,!0,s,r)):(n.tag=0,Pe&&s&&Ih(n),rt(null,n,i,r),n=n.child),n;case 16:o=n.elementType;e:{switch(Fl(e,n),e=n.pendingProps,i=o._init,o=i(o._payload),n.type=o,i=n.tag=WR(o),e=Kt(o,e),i){case 0:n=ip(null,n,o,e,r);break e;case 1:n=Vy(null,n,o,e,r);break e;case 11:n=zy(null,n,o,e,r);break e;case 14:n=Fy(null,n,o,Kt(o.type,e),r);break e}throw Error(q(306,o,""))}return n;case 0:return o=n.type,i=n.pendingProps,i=n.elementType===o?i:Kt(o,i),ip(e,n,o,i,r);case 1:return o=n.type,i=n.pendingProps,i=n.elementType===o?i:Kt(o,i),Vy(e,n,o,i,r);case 3:e:{if(H1(n),e===null)throw Error(q(387));o=n.pendingProps,s=n.memoizedState,i=s.element,g1(e,n),gc(n,o,null,r);var a=n.memoizedState;if(o=a.element,s.isDehydrated)if(s={element:o,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},n.updateQueue.baseState=s,n.memoizedState=s,n.flags&256){i=hi(Error(q(423)),n),n=By(e,n,o,r,i);break e}else if(o!==i){i=hi(Error(q(424)),n),n=By(e,n,o,r,i);break e}else for(Ct=br(n.stateNode.containerInfo.firstChild),Et=n,Pe=!0,Qt=null,r=h1(n,null,o,r),n.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(di(),o===i){n=Gn(e,n,r);break e}rt(e,n,o,r)}n=n.child}return n;case 5:return y1(n),e===null&&ep(n),o=n.type,i=n.pendingProps,s=e!==null?e.memoizedProps:null,a=i.children,Kf(o,i)?a=null:s!==null&&Kf(o,s)&&(n.flags|=32),B1(e,n),rt(e,n,a,r),n.child;case 6:return e===null&&ep(n),null;case 13:return W1(e,n,r);case 4:return Bh(n,n.stateNode.containerInfo),o=n.pendingProps,e===null?n.child=fi(n,null,o,r):rt(e,n,o,r),n.child;case 11:return o=n.type,i=n.pendingProps,i=n.elementType===o?i:Kt(o,i),zy(e,n,o,i,r);case 7:return rt(e,n,n.pendingProps,r),n.child;case 8:return rt(e,n,n.pendingProps.children,r),n.child;case 12:return rt(e,n,n.pendingProps.children,r),n.child;case 10:e:{if(o=n.type._context,i=n.pendingProps,s=n.memoizedProps,a=i.value,_e(hc,o._currentValue),o._currentValue=a,s!==null)if(sn(s.value,a)){if(s.children===i.children&&!ht.current){n=Gn(e,n,r);break e}}else for(s=n.child,s!==null&&(s.return=n);s!==null;){var l=s.dependencies;if(l!==null){a=s.child;for(var c=l.firstContext;c!==null;){if(c.context===o){if(s.tag===1){c=Fn(-1,r&-r),c.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var f=u.pending;f===null?c.next=c:(c.next=f.next,f.next=c),u.pending=c}}s.lanes|=r,c=s.alternate,c!==null&&(c.lanes|=r),tp(s.return,r,n),l.lanes|=r;break}c=c.next}}else if(s.tag===10)a=s.type===n.type?null:s.child;else if(s.tag===18){if(a=s.return,a===null)throw Error(q(341));a.lanes|=r,l=a.alternate,l!==null&&(l.lanes|=r),tp(a,r,n),a=s.sibling}else a=s.child;if(a!==null)a.return=s;else for(a=s;a!==null;){if(a===n){a=null;break}if(s=a.sibling,s!==null){s.return=a.return,a=s;break}a=a.return}s=a}rt(e,n,i.children,r),n=n.child}return n;case 9:return i=n.type,o=n.pendingProps.children,ri(n,r),i=Ht(i),o=o(i),n.flags|=1,rt(e,n,o,r),n.child;case 14:return o=n.type,i=Kt(o,n.pendingProps),i=Kt(o.type,i),Fy(e,n,o,i,r);case 15:return F1(e,n,n.type,n.pendingProps,r);case 17:return o=n.type,i=n.pendingProps,i=n.elementType===o?i:Kt(o,i),Fl(e,n),n.tag=1,mt(o)?(e=!0,dc(n)):e=!1,ri(n,r),D1(n,o,i),rp(n,o,i,r),sp(null,n,o,!0,e,r);case 19:return U1(e,n,r);case 22:return V1(e,n,r)}throw Error(q(156,n.tag))};function ab(e,n){return Iw(e,n)}function HR(e,n,r,o){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ft(e,n,r,o){return new HR(e,n,r,o)}function rm(e){return e=e.prototype,!(!e||!e.isReactComponent)}function WR(e){if(typeof e=="function")return rm(e)?1:0;if(e!=null){if(e=e.$$typeof,e===_h)return 11;if(e===Sh)return 14}return 2}function Er(e,n){var r=e.alternate;return r===null?(r=Ft(e.tag,n,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=n,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,n=e.dependencies,r.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Hl(e,n,r,o,i,s){var a=2;if(o=e,typeof e=="function")rm(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Fo:return no(r.children,i,s,n);case bh:a=8,i|=8;break;case Nf:return e=Ft(12,r,n,i|2),e.elementType=Nf,e.lanes=s,e;case Pf:return e=Ft(13,r,n,i),e.elementType=Pf,e.lanes=s,e;case Mf:return e=Ft(19,r,n,i),e.elementType=Mf,e.lanes=s,e;case yw:return xu(r,i,s,n);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case mw:a=10;break e;case gw:a=9;break e;case _h:a=11;break e;case Sh:a=14;break e;case cr:a=16,o=null;break e}throw Error(q(130,e==null?e:typeof e,""))}return n=Ft(a,r,n,i),n.elementType=e,n.type=o,n.lanes=s,n}function no(e,n,r,o){return e=Ft(7,e,o,n),e.lanes=r,e}function xu(e,n,r,o){return e=Ft(22,e,o,n),e.elementType=yw,e.lanes=r,e.stateNode={isHidden:!1},e}function Vd(e,n,r){return e=Ft(6,e,null,n),e.lanes=r,e}function Bd(e,n,r){return n=Ft(4,e.children!==null?e.children:[],e.key,n),n.lanes=r,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function UR(e,n,r,o,i){this.tag=n,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=_d(0),this.expirationTimes=_d(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=_d(0),this.identifierPrefix=o,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function om(e,n,r,o,i,s,a,l,c){return e=new UR(e,n,r,l,c),n===1?(n=1,s===!0&&(n|=8)):n=0,s=Ft(3,null,null,n),e.current=s,s.stateNode=e,s.memoizedState={element:o,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Vh(s),e}function GR(e,n,r){var o=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:zo,key:o==null?null:""+o,children:e,containerInfo:n,implementation:r}}function lb(e){if(!e)return Rr;e=e._reactInternals;e:{if(bo(e)!==e||e.tag!==1)throw Error(q(170));var n=e;do{switch(n.tag){case 3:n=n.stateNode.context;break e;case 1:if(mt(n.type)){n=n.stateNode.__reactInternalMemoizedMergedChildContext;break e}}n=n.return}while(n!==null);throw Error(q(171))}if(e.tag===1){var r=e.type;if(mt(r))return l1(e,r,n)}return n}function cb(e,n,r,o,i,s,a,l,c){return e=om(r,o,!0,e,i,s,a,l,c),e.context=lb(null),r=e.current,o=it(),i=Cr(r),s=Fn(o,i),s.callback=n??null,_r(r,s,i),e.current.lanes=i,ma(e,i,o),gt(e,o),e}function wu(e,n,r,o){var i=n.current,s=it(),a=Cr(i);return r=lb(r),n.context===null?n.context=r:n.pendingContext=r,n=Fn(s,a),n.payload={element:e},o=o===void 0?null:o,o!==null&&(n.callback=o),e=_r(i,n,a),e!==null&&(on(e,i,a,s),Dl(e,i,a)),a}function Cc(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 Qy(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<n?r:n}}function im(e,n){Qy(e,n),(e=e.alternate)&&Qy(e,n)}function YR(){return null}var ub=typeof reportError=="function"?reportError:function(e){console.error(e)};function sm(e){this._internalRoot=e}bu.prototype.render=sm.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(q(409));wu(e,n,null,null)};bu.prototype.unmount=sm.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;uo(function(){wu(null,e,null,null)}),n[Wn]=null}};function bu(e){this._internalRoot=e}bu.prototype.unstable_scheduleHydration=function(e){if(e){var n=Vw();e={blockedOn:null,target:e,priority:n};for(var r=0;r<fr.length&&n!==0&&n<fr[r].priority;r++);fr.splice(r,0,e),r===0&&Hw(e)}};function am(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function _u(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Jy(){}function XR(e,n,r,o,i){if(i){if(typeof o=="function"){var s=o;o=function(){var u=Cc(a);s.call(u)}}var a=cb(n,o,e,0,null,!1,!1,"",Jy);return e._reactRootContainer=a,e[Wn]=a.current,Bs(e.nodeType===8?e.parentNode:e),uo(),a}for(;i=e.lastChild;)e.removeChild(i);if(typeof o=="function"){var l=o;o=function(){var u=Cc(c);l.call(u)}}var c=om(e,0,!1,null,null,!1,!1,"",Jy);return e._reactRootContainer=c,e[Wn]=c.current,Bs(e.nodeType===8?e.parentNode:e),uo(function(){wu(n,c,r,o)}),c}function Su(e,n,r,o,i){var s=r._reactRootContainer;if(s){var a=s;if(typeof i=="function"){var l=i;i=function(){var c=Cc(a);l.call(c)}}wu(n,a,e,i)}else a=XR(r,n,e,i,o);return Cc(a)}zw=function(e){switch(e.tag){case 3:var n=e.stateNode;if(n.current.memoizedState.isDehydrated){var r=ds(n.pendingLanes);r!==0&&(kh(n,r|1),gt(n,De()),!(ve&6)&&(mi=De()+500,Dr()))}break;case 13:uo(function(){var o=Un(e,1);if(o!==null){var i=it();on(o,e,1,i)}}),im(e,1)}};Nh=function(e){if(e.tag===13){var n=Un(e,134217728);if(n!==null){var r=it();on(n,e,134217728,r)}im(e,134217728)}};Fw=function(e){if(e.tag===13){var n=Cr(e),r=Un(e,n);if(r!==null){var o=it();on(r,e,n,o)}im(e,n)}};Vw=function(){return we};Bw=function(e,n){var r=we;try{return we=e,n()}finally{we=r}};zf=function(e,n,r){switch(n){case"input":if(Af(e,r),n=r.name,r.type==="radio"&&n!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+n)+'][type="radio"]'),n=0;n<r.length;n++){var o=r[n];if(o!==e&&o.form===e.form){var i=pu(o);if(!i)throw Error(q(90));xw(o),Af(o,i)}}}break;case"textarea":bw(e,r);break;case"select":n=r.value,n!=null&&Jo(e,!!r.multiple,n,!1)}};Pw=em;Mw=uo;var KR={usingClientEntryPoint:!1,Events:[ya,Wo,pu,kw,Nw,em]},Zi={findFiberByHostInstance:Zr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},qR={bundleType:Zi.bundleType,version:Zi.version,rendererPackageName:Zi.rendererPackageName,rendererConfig:Zi.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:qn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Aw(e),e===null?null:e.stateNode},findFiberByHostInstance:Zi.findFiberByHostInstance||YR,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 il=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!il.isDisabled&&il.supportsFiber)try{cu=il.inject(qR),xn=il}catch{}}Rt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=KR;Rt.createPortal=function(e,n){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!am(n))throw Error(q(200));return GR(e,n,null,r)};Rt.createRoot=function(e,n){if(!am(e))throw Error(q(299));var r=!1,o="",i=ub;return n!=null&&(n.unstable_strictMode===!0&&(r=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(i=n.onRecoverableError)),n=om(e,1,!1,null,null,r,!1,o,i),e[Wn]=n.current,Bs(e.nodeType===8?e.parentNode:e),new sm(n)};Rt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(q(188)):(e=Object.keys(e).join(","),Error(q(268,e)));return e=Aw(n),e=e===null?null:e.stateNode,e};Rt.flushSync=function(e){return uo(e)};Rt.hydrate=function(e,n,r){if(!_u(n))throw Error(q(200));return Su(null,e,n,!0,r)};Rt.hydrateRoot=function(e,n,r){if(!am(e))throw Error(q(405));var o=r!=null&&r.hydratedSources||null,i=!1,s="",a=ub;if(r!=null&&(r.unstable_strictMode===!0&&(i=!0),r.identifierPrefix!==void 0&&(s=r.identifierPrefix),r.onRecoverableError!==void 0&&(a=r.onRecoverableError)),n=cb(n,null,e,1,r??null,i,!1,s,a),e[Wn]=n.current,Bs(e),o)for(e=0;e<o.length;e++)r=o[e],i=r._getVersion,i=i(r._source),n.mutableSourceEagerHydrationData==null?n.mutableSourceEagerHydrationData=[r,i]:n.mutableSourceEagerHydrationData.push(r,i);return new bu(n)};Rt.render=function(e,n,r){if(!_u(n))throw Error(q(200));return Su(null,e,n,!1,r)};Rt.unmountComponentAtNode=function(e){if(!_u(e))throw Error(q(40));return e._reactRootContainer?(uo(function(){Su(null,null,e,!1,function(){e._reactRootContainer=null,e[Wn]=null})}),!0):!1};Rt.unstable_batchedUpdates=em;Rt.unstable_renderSubtreeIntoContainer=function(e,n,r,o){if(!_u(r))throw Error(q(200));if(e==null||e._reactInternals===void 0)throw Error(q(38));return Su(e,n,r,!1,o)};Rt.version="18.3.1-next-f1338f8080-20240426";function db(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(db)}catch(e){console.error(e)}}db(),dw.exports=Rt;var _o=dw.exports;const ZR=su(_o);var ev=_o;Ef.createRoot=ev.createRoot,Ef.hydrateRoot=ev.hydrateRoot;/**
41
- * @remix-run/router v1.23.2
42
- *
43
- * Copyright (c) Remix Software Inc.
44
- *
45
- * This source code is licensed under the MIT license found in the
46
- * LICENSE.md file in the root directory of this source tree.
47
- *
48
- * @license MIT
49
- */function Zs(){return Zs=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},Zs.apply(this,arguments)}var yr;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(yr||(yr={}));const tv="popstate";function QR(e){e===void 0&&(e={});function n(o,i){let{pathname:s,search:a,hash:l}=o.location;return vp("",{pathname:s,search:a,hash:l},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function r(o,i){return typeof i=="string"?i:Ec(i)}return ej(n,r,null,e)}function Ie(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function lm(e,n){if(!e){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function JR(){return Math.random().toString(36).substr(2,8)}function nv(e,n){return{usr:e.state,key:e.key,idx:n}}function vp(e,n,r,o){return r===void 0&&(r=null),Zs({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof n=="string"?Ai(n):n,{state:r,key:n&&n.key||o||JR()})}function Ec(e){let{pathname:n="/",search:r="",hash:o=""}=e;return r&&r!=="?"&&(n+=r.charAt(0)==="?"?r:"?"+r),o&&o!=="#"&&(n+=o.charAt(0)==="#"?o:"#"+o),n}function Ai(e){let n={};if(e){let r=e.indexOf("#");r>=0&&(n.hash=e.substr(r),e=e.substr(0,r));let o=e.indexOf("?");o>=0&&(n.search=e.substr(o),e=e.substr(0,o)),e&&(n.pathname=e)}return n}function ej(e,n,r,o){o===void 0&&(o={});let{window:i=document.defaultView,v5Compat:s=!1}=o,a=i.history,l=yr.Pop,c=null,u=f();u==null&&(u=0,a.replaceState(Zs({},a.state,{idx:u}),""));function f(){return(a.state||{idx:null}).idx}function d(){l=yr.Pop;let _=f(),v=_==null?null:_-u;u=_,c&&c({action:l,location:b.location,delta:v})}function p(_,v){l=yr.Push;let x=vp(b.location,_,v);u=f()+1;let w=nv(x,u),S=b.createHref(x);try{a.pushState(w,"",S)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;i.location.assign(S)}s&&c&&c({action:l,location:b.location,delta:1})}function m(_,v){l=yr.Replace;let x=vp(b.location,_,v);u=f();let w=nv(x,u),S=b.createHref(x);a.replaceState(w,"",S),s&&c&&c({action:l,location:b.location,delta:0})}function y(_){let v=i.location.origin!=="null"?i.location.origin:i.location.href,x=typeof _=="string"?_:Ec(_);return x=x.replace(/ $/,"%20"),Ie(v,"No window.location.(origin|href) available to create URL for href: "+x),new URL(x,v)}let b={get action(){return l},get location(){return e(i,a)},listen(_){if(c)throw new Error("A history only accepts one active listener");return i.addEventListener(tv,d),c=_,()=>{i.removeEventListener(tv,d),c=null}},createHref(_){return n(i,_)},createURL:y,encodeLocation(_){let v=y(_);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:p,replace:m,go(_){return a.go(_)}};return b}var rv;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(rv||(rv={}));function tj(e,n,r){return r===void 0&&(r="/"),nj(e,n,r)}function nj(e,n,r,o){let i=typeof n=="string"?Ai(n):n,s=gi(i.pathname||"/",r);if(s==null)return null;let a=fb(e);rj(a);let l=null;for(let c=0;l==null&&c<a.length;++c){let u=hj(s);l=fj(a[c],u)}return l}function fb(e,n,r,o){n===void 0&&(n=[]),r===void 0&&(r=[]),o===void 0&&(o="");let i=(s,a,l)=>{let c={relativePath:l===void 0?s.path||"":l,caseSensitive:s.caseSensitive===!0,childrenIndex:a,route:s};c.relativePath.startsWith("/")&&(Ie(c.relativePath.startsWith(o),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+o+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(o.length));let u=kr([o,c.relativePath]),f=r.concat(c);s.children&&s.children.length>0&&(Ie(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),fb(s.children,n,f,u)),!(s.path==null&&!s.index)&&n.push({path:u,score:uj(u,s.index),routesMeta:f})};return e.forEach((s,a)=>{var l;if(s.path===""||!((l=s.path)!=null&&l.includes("?")))i(s,a);else for(let c of pb(s.path))i(s,a,c)}),n}function pb(e){let n=e.split("/");if(n.length===0)return[];let[r,...o]=n,i=r.endsWith("?"),s=r.replace(/\?$/,"");if(o.length===0)return i?[s,""]:[s];let a=pb(o.join("/")),l=[];return l.push(...a.map(c=>c===""?s:[s,c].join("/"))),i&&l.push(...a),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function rj(e){e.sort((n,r)=>n.score!==r.score?r.score-n.score:dj(n.routesMeta.map(o=>o.childrenIndex),r.routesMeta.map(o=>o.childrenIndex)))}const oj=/^:[\w-]+$/,ij=3,sj=2,aj=1,lj=10,cj=-2,ov=e=>e==="*";function uj(e,n){let r=e.split("/"),o=r.length;return r.some(ov)&&(o+=cj),n&&(o+=sj),r.filter(i=>!ov(i)).reduce((i,s)=>i+(oj.test(s)?ij:s===""?aj:lj),o)}function dj(e,n){return e.length===n.length&&e.slice(0,-1).every((o,i)=>o===n[i])?e[e.length-1]-n[n.length-1]:0}function fj(e,n,r){let{routesMeta:o}=e,i={},s="/",a=[];for(let l=0;l<o.length;++l){let c=o[l],u=l===o.length-1,f=s==="/"?n:n.slice(s.length)||"/",d=xp({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},f),p=c.route;if(!d)return null;Object.assign(i,d.params),a.push({params:i,pathname:kr([s,d.pathname]),pathnameBase:xj(kr([s,d.pathnameBase])),route:p}),d.pathnameBase!=="/"&&(s=kr([s,d.pathnameBase]))}return a}function xp(e,n){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,o]=pj(e.path,e.caseSensitive,e.end),i=n.match(r);if(!i)return null;let s=i[0],a=s.replace(/(.)\/+$/,"$1"),l=i.slice(1);return{params:o.reduce((u,f,d)=>{let{paramName:p,isOptional:m}=f;if(p==="*"){let b=l[d]||"";a=s.slice(0,s.length-b.length).replace(/(.)\/+$/,"$1")}const y=l[d];return m&&!y?u[p]=void 0:u[p]=(y||"").replace(/%2F/g,"/"),u},{}),pathname:s,pathnameBase:a,pattern:e}}function pj(e,n,r){n===void 0&&(n=!1),r===void 0&&(r=!0),lm(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let o=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,l,c)=>(o.push({paramName:l,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(o.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,n?void 0:"i"),o]}function hj(e){try{return e.split("/").map(n=>decodeURIComponent(n).replace(/\//g,"%2F")).join("/")}catch(n){return lm(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+n+").")),e}}function gi(e,n){if(n==="/")return e;if(!e.toLowerCase().startsWith(n.toLowerCase()))return null;let r=n.endsWith("/")?n.length-1:n.length,o=e.charAt(r);return o&&o!=="/"?null:e.slice(r)||"/"}const mj=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,gj=e=>mj.test(e);function yj(e,n){n===void 0&&(n="/");let{pathname:r,search:o="",hash:i=""}=typeof e=="string"?Ai(e):e,s;if(r)if(gj(r))s=r;else{if(r.includes("//")){let a=r;r=r.replace(/\/\/+/g,"/"),lm(!1,"Pathnames cannot have embedded double slashes - normalizing "+(a+" -> "+r))}r.startsWith("/")?s=iv(r.substring(1),"/"):s=iv(r,n)}else s=n;return{pathname:s,search:wj(o),hash:bj(i)}}function iv(e,n){let r=n.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function Hd(e,n,r,o){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+n+"` field ["+JSON.stringify(o)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function vj(e){return e.filter((n,r)=>r===0||n.route.path&&n.route.path.length>0)}function cm(e,n){let r=vj(e);return n?r.map((o,i)=>i===r.length-1?o.pathname:o.pathnameBase):r.map(o=>o.pathnameBase)}function um(e,n,r,o){o===void 0&&(o=!1);let i;typeof e=="string"?i=Ai(e):(i=Zs({},e),Ie(!i.pathname||!i.pathname.includes("?"),Hd("?","pathname","search",i)),Ie(!i.pathname||!i.pathname.includes("#"),Hd("#","pathname","hash",i)),Ie(!i.search||!i.search.includes("#"),Hd("#","search","hash",i)));let s=e===""||i.pathname==="",a=s?"/":i.pathname,l;if(a==null)l=r;else{let d=n.length-1;if(!o&&a.startsWith("..")){let p=a.split("/");for(;p[0]==="..";)p.shift(),d-=1;i.pathname=p.join("/")}l=d>=0?n[d]:"/"}let c=yj(i,l),u=a&&a!=="/"&&a.endsWith("/"),f=(s||a===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(u||f)&&(c.pathname+="/"),c}const kr=e=>e.join("/").replace(/\/\/+/g,"/"),xj=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),wj=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,bj=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function _j(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const hb=["post","put","patch","delete"];new Set(hb);const Sj=["get",...hb];new Set(Sj);/**
50
- * React Router v6.30.3
51
- *
52
- * Copyright (c) Remix Software Inc.
53
- *
54
- * This source code is licensed under the MIT license found in the
55
- * LICENSE.md file in the root directory of this source tree.
56
- *
57
- * @license MIT
58
- */function Qs(){return Qs=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},Qs.apply(this,arguments)}const Cu=h.createContext(null),mb=h.createContext(null),Zn=h.createContext(null),Eu=h.createContext(null),Lr=h.createContext({outlet:null,matches:[],isDataRoute:!1}),gb=h.createContext(null);function Cj(e,n){let{relative:r}=n===void 0?{}:n;Ti()||Ie(!1);let{basename:o,navigator:i}=h.useContext(Zn),{hash:s,pathname:a,search:l}=ku(e,{relative:r}),c=a;return o!=="/"&&(c=a==="/"?o:kr([o,a])),i.createHref({pathname:c,search:l,hash:s})}function Ti(){return h.useContext(Eu)!=null}function Ii(){return Ti()||Ie(!1),h.useContext(Eu).location}function yb(e){h.useContext(Zn).static||h.useLayoutEffect(e)}function vb(){let{isDataRoute:e}=h.useContext(Lr);return e?Dj():Ej()}function Ej(){Ti()||Ie(!1);let e=h.useContext(Cu),{basename:n,future:r,navigator:o}=h.useContext(Zn),{matches:i}=h.useContext(Lr),{pathname:s}=Ii(),a=JSON.stringify(cm(i,r.v7_relativeSplatPath)),l=h.useRef(!1);return yb(()=>{l.current=!0}),h.useCallback(function(u,f){if(f===void 0&&(f={}),!l.current)return;if(typeof u=="number"){o.go(u);return}let d=um(u,JSON.parse(a),s,f.relative==="path");e==null&&n!=="/"&&(d.pathname=d.pathname==="/"?n:kr([n,d.pathname])),(f.replace?o.replace:o.push)(d,f.state,f)},[n,o,a,s,e])}function ku(e,n){let{relative:r}=n===void 0?{}:n,{future:o}=h.useContext(Zn),{matches:i}=h.useContext(Lr),{pathname:s}=Ii(),a=JSON.stringify(cm(i,o.v7_relativeSplatPath));return h.useMemo(()=>um(e,JSON.parse(a),s,r==="path"),[e,a,s,r])}function kj(e,n){return Nj(e,n)}function Nj(e,n,r,o){Ti()||Ie(!1);let{navigator:i}=h.useContext(Zn),{matches:s}=h.useContext(Lr),a=s[s.length-1],l=a?a.params:{};a&&a.pathname;let c=a?a.pathnameBase:"/";a&&a.route;let u=Ii(),f;if(n){var d;let _=typeof n=="string"?Ai(n):n;c==="/"||(d=_.pathname)!=null&&d.startsWith(c)||Ie(!1),f=_}else f=u;let p=f.pathname||"/",m=p;if(c!=="/"){let _=c.replace(/^\//,"").split("/");m="/"+p.replace(/^\//,"").split("/").slice(_.length).join("/")}let y=tj(e,{pathname:m}),b=Aj(y&&y.map(_=>Object.assign({},_,{params:Object.assign({},l,_.params),pathname:kr([c,i.encodeLocation?i.encodeLocation(_.pathname).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?c:kr([c,i.encodeLocation?i.encodeLocation(_.pathnameBase).pathname:_.pathnameBase])})),s,r,o);return n&&b?h.createElement(Eu.Provider,{value:{location:Qs({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:yr.Pop}},b):b}function Pj(){let e=Oj(),n=_j(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return h.createElement(h.Fragment,null,h.createElement("h2",null,"Unexpected Application Error!"),h.createElement("h3",{style:{fontStyle:"italic"}},n),r?h.createElement("pre",{style:i},r):null,null)}const Mj=h.createElement(Pj,null);class Rj extends h.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,r){return r.location!==n.location||r.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:r.error,location:r.location,revalidation:n.revalidation||r.revalidation}}componentDidCatch(n,r){console.error("React Router caught the following error during render",n,r)}render(){return this.state.error!==void 0?h.createElement(Lr.Provider,{value:this.props.routeContext},h.createElement(gb.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function jj(e){let{routeContext:n,match:r,children:o}=e,i=h.useContext(Cu);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),h.createElement(Lr.Provider,{value:n},o)}function Aj(e,n,r,o){var i;if(n===void 0&&(n=[]),r===void 0&&(r=null),o===void 0&&(o=null),e==null){var s;if(!r)return null;if(r.errors)e=r.matches;else if((s=o)!=null&&s.v7_partialHydration&&n.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let a=e,l=(i=r)==null?void 0:i.errors;if(l!=null){let f=a.findIndex(d=>d.route.id&&(l==null?void 0:l[d.route.id])!==void 0);f>=0||Ie(!1),a=a.slice(0,Math.min(a.length,f+1))}let c=!1,u=-1;if(r&&o&&o.v7_partialHydration)for(let f=0;f<a.length;f++){let d=a[f];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(u=f),d.route.id){let{loaderData:p,errors:m}=r,y=d.route.loader&&p[d.route.id]===void 0&&(!m||m[d.route.id]===void 0);if(d.route.lazy||y){c=!0,u>=0?a=a.slice(0,u+1):a=[a[0]];break}}}return a.reduceRight((f,d,p)=>{let m,y=!1,b=null,_=null;r&&(m=l&&d.route.id?l[d.route.id]:void 0,b=d.route.errorElement||Mj,c&&(u<0&&p===0?(Lj("route-fallback"),y=!0,_=null):u===p&&(y=!0,_=d.route.hydrateFallbackElement||null)));let v=n.concat(a.slice(0,p+1)),x=()=>{let w;return m?w=b:y?w=_:d.route.Component?w=h.createElement(d.route.Component,null):d.route.element?w=d.route.element:w=f,h.createElement(jj,{match:d,routeContext:{outlet:f,matches:v,isDataRoute:r!=null},children:w})};return r&&(d.route.ErrorBoundary||d.route.errorElement||p===0)?h.createElement(Rj,{location:r.location,revalidation:r.revalidation,component:b,error:m,children:x(),routeContext:{outlet:null,matches:v,isDataRoute:!0}}):x()},null)}var xb=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(xb||{}),wb=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(wb||{});function Tj(e){let n=h.useContext(Cu);return n||Ie(!1),n}function Ij(e){let n=h.useContext(mb);return n||Ie(!1),n}function $j(e){let n=h.useContext(Lr);return n||Ie(!1),n}function bb(e){let n=$j(),r=n.matches[n.matches.length-1];return r.route.id||Ie(!1),r.route.id}function Oj(){var e;let n=h.useContext(gb),r=Ij(),o=bb();return n!==void 0?n:(e=r.errors)==null?void 0:e[o]}function Dj(){let{router:e}=Tj(xb.UseNavigateStable),n=bb(wb.UseNavigateStable),r=h.useRef(!1);return yb(()=>{r.current=!0}),h.useCallback(function(i,s){s===void 0&&(s={}),r.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,Qs({fromRouteId:n},s)))},[e,n])}const sv={};function Lj(e,n,r){sv[e]||(sv[e]=!0)}function zj(e,n){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Fj(e){let{to:n,replace:r,state:o,relative:i}=e;Ti()||Ie(!1);let{future:s,static:a}=h.useContext(Zn),{matches:l}=h.useContext(Lr),{pathname:c}=Ii(),u=vb(),f=um(n,cm(l,s.v7_relativeSplatPath),c,i==="path"),d=JSON.stringify(f);return h.useEffect(()=>u(JSON.parse(d),{replace:r,state:o,relative:i}),[u,d,i,r,o]),null}function ar(e){Ie(!1)}function Vj(e){let{basename:n="/",children:r=null,location:o,navigationType:i=yr.Pop,navigator:s,static:a=!1,future:l}=e;Ti()&&Ie(!1);let c=n.replace(/^\/*/,"/"),u=h.useMemo(()=>({basename:c,navigator:s,static:a,future:Qs({v7_relativeSplatPath:!1},l)}),[c,l,s,a]);typeof o=="string"&&(o=Ai(o));let{pathname:f="/",search:d="",hash:p="",state:m=null,key:y="default"}=o,b=h.useMemo(()=>{let _=gi(f,c);return _==null?null:{location:{pathname:_,search:d,hash:p,state:m,key:y},navigationType:i}},[c,f,d,p,m,y,i]);return b==null?null:h.createElement(Zn.Provider,{value:u},h.createElement(Eu.Provider,{children:r,value:b}))}function Bj(e){let{children:n,location:r}=e;return kj(wp(n),r)}new Promise(()=>{});function wp(e,n){n===void 0&&(n=[]);let r=[];return h.Children.forEach(e,(o,i)=>{if(!h.isValidElement(o))return;let s=[...n,i];if(o.type===h.Fragment){r.push.apply(r,wp(o.props.children,s));return}o.type!==ar&&Ie(!1),!o.props.index||!o.props.children||Ie(!1);let a={id:o.props.id||s.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,loader:o.props.loader,action:o.props.action,errorElement:o.props.errorElement,ErrorBoundary:o.props.ErrorBoundary,hasErrorBoundary:o.props.ErrorBoundary!=null||o.props.errorElement!=null,shouldRevalidate:o.props.shouldRevalidate,handle:o.props.handle,lazy:o.props.lazy};o.props.children&&(a.children=wp(o.props.children,s)),r.push(a)}),r}/**
59
- * React Router DOM v6.30.3
60
- *
61
- * Copyright (c) Remix Software Inc.
62
- *
63
- * This source code is licensed under the MIT license found in the
64
- * LICENSE.md file in the root directory of this source tree.
65
- *
66
- * @license MIT
67
- */function kc(){return kc=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},kc.apply(this,arguments)}function _b(e,n){if(e==null)return{};var r={},o=Object.keys(e),i,s;for(s=0;s<o.length;s++)i=o[s],!(n.indexOf(i)>=0)&&(r[i]=e[i]);return r}function Hj(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Wj(e,n){return e.button===0&&(!n||n==="_self")&&!Hj(e)}const Uj=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Gj=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],Yj="6";try{window.__reactRouterVersion=Yj}catch{}const Xj=h.createContext({isTransitioning:!1}),Kj="startTransition",av=lu[Kj];function qj(e){let{basename:n,children:r,future:o,window:i}=e,s=h.useRef();s.current==null&&(s.current=QR({window:i,v5Compat:!0}));let a=s.current,[l,c]=h.useState({action:a.action,location:a.location}),{v7_startTransition:u}=o||{},f=h.useCallback(d=>{u&&av?av(()=>c(d)):c(d)},[c,u]);return h.useLayoutEffect(()=>a.listen(f),[a,f]),h.useEffect(()=>zj(o),[o]),h.createElement(Vj,{basename:n,children:r,location:l.location,navigationType:l.action,navigator:a,future:o})}const Zj=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Qj=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Jj=h.forwardRef(function(n,r){let{onClick:o,relative:i,reloadDocument:s,replace:a,state:l,target:c,to:u,preventScrollReset:f,viewTransition:d}=n,p=_b(n,Uj),{basename:m}=h.useContext(Zn),y,b=!1;if(typeof u=="string"&&Qj.test(u)&&(y=u,Zj))try{let w=new URL(window.location.href),S=u.startsWith("//")?new URL(w.protocol+u):new URL(u),C=gi(S.pathname,m);S.origin===w.origin&&C!=null?u=C+S.search+S.hash:b=!0}catch{}let _=Cj(u,{relative:i}),v=n3(u,{replace:a,state:l,target:c,preventScrollReset:f,relative:i,viewTransition:d});function x(w){o&&o(w),w.defaultPrevented||v(w)}return h.createElement("a",kc({},p,{href:y||_,onClick:b||s?o:x,ref:r,target:c}))}),e3=h.forwardRef(function(n,r){let{"aria-current":o="page",caseSensitive:i=!1,className:s="",end:a=!1,style:l,to:c,viewTransition:u,children:f}=n,d=_b(n,Gj),p=ku(c,{relative:d.relative}),m=Ii(),y=h.useContext(mb),{navigator:b,basename:_}=h.useContext(Zn),v=y!=null&&r3(p)&&u===!0,x=b.encodeLocation?b.encodeLocation(p).pathname:p.pathname,w=m.pathname,S=y&&y.navigation&&y.navigation.location?y.navigation.location.pathname:null;i||(w=w.toLowerCase(),S=S?S.toLowerCase():null,x=x.toLowerCase()),S&&_&&(S=gi(S,_)||S);const C=x!=="/"&&x.endsWith("/")?x.length-1:x.length;let E=w===x||!a&&w.startsWith(x)&&w.charAt(C)==="/",k=S!=null&&(S===x||!a&&S.startsWith(x)&&S.charAt(x.length)==="/"),N={isActive:E,isPending:k,isTransitioning:v},M=E?o:void 0,T;typeof s=="function"?T=s(N):T=[s,E?"active":null,k?"pending":null,v?"transitioning":null].filter(Boolean).join(" ");let A=typeof l=="function"?l(N):l;return h.createElement(Jj,kc({},d,{"aria-current":M,className:T,ref:r,style:A,to:c,viewTransition:u}),typeof f=="function"?f(N):f)});var bp;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(bp||(bp={}));var lv;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(lv||(lv={}));function t3(e){let n=h.useContext(Cu);return n||Ie(!1),n}function n3(e,n){let{target:r,replace:o,state:i,preventScrollReset:s,relative:a,viewTransition:l}=n===void 0?{}:n,c=vb(),u=Ii(),f=ku(e,{relative:a});return h.useCallback(d=>{if(Wj(d,r)){d.preventDefault();let p=o!==void 0?o:Ec(u)===Ec(f);c(e,{replace:p,state:i,preventScrollReset:s,relative:a,viewTransition:l})}},[u,c,f,o,i,r,e,s,a,l])}function r3(e,n){n===void 0&&(n={});let r=h.useContext(Xj);r==null&&Ie(!1);let{basename:o}=t3(bp.useViewTransitionState),i=ku(e,{relative:n.relative});if(!r.isTransitioning)return!1;let s=gi(r.currentLocation.pathname,o)||r.currentLocation.pathname,a=gi(r.nextLocation.pathname,o)||r.nextLocation.pathname;return xp(i.pathname,a)!=null||xp(i.pathname,s)!=null}const Sb=h.createContext({theme:"system",resolvedTheme:"light",setTheme:()=>{}});function o3(){return h.useContext(Sb)}function i3(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function cv(e){return e==="system"?i3():e}function s3({children:e}){const[n,r]=h.useState(()=>localStorage.getItem("launchpod-theme")||"system"),[o,i]=h.useState(()=>cv(localStorage.getItem("launchpod-theme")||"system")),s=h.useCallback(l=>{const c=cv(l);i(c),document.documentElement.classList.toggle("dark",c==="dark")},[]),a=h.useCallback(l=>{r(l),localStorage.setItem("launchpod-theme",l),s(l)},[s]);return h.useEffect(()=>{s(n);const l=window.matchMedia("(prefers-color-scheme: dark)"),c=()=>{n==="system"&&s("system")};return l.addEventListener("change",c),()=>l.removeEventListener("change",c)},[n,s]),g.jsx(Sb.Provider,{value:{theme:n,resolvedTheme:o,setTheme:a},children:e})}function Cb(e){var n,r,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(n=0;n<i;n++)e[n]&&(r=Cb(e[n]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function Eb(){for(var e,n,r=0,o="",i=arguments.length;r<i;r++)(e=arguments[r])&&(n=Cb(e))&&(o&&(o+=" "),o+=n);return o}const a3=(e,n)=>{const r=new Array(e.length+n.length);for(let o=0;o<e.length;o++)r[o]=e[o];for(let o=0;o<n.length;o++)r[e.length+o]=n[o];return r},l3=(e,n)=>({classGroupId:e,validator:n}),kb=(e=new Map,n=null,r)=>({nextPart:e,validators:n,classGroupId:r}),Nc="-",uv=[],c3="arbitrary..",u3=e=>{const n=f3(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return d3(a);const l=a.split(Nc),c=l[0]===""&&l.length>1?1:0;return Nb(l,c,n)},getConflictingClassGroupIds:(a,l)=>{if(l){const c=o[a],u=r[a];return c?u?a3(u,c):c:u||uv}return r[a]||uv}}},Nb=(e,n,r)=>{if(e.length-n===0)return r.classGroupId;const i=e[n],s=r.nextPart.get(i);if(s){const u=Nb(e,n+1,s);if(u)return u}const a=r.validators;if(a===null)return;const l=n===0?e.join(Nc):e.slice(n).join(Nc),c=a.length;for(let u=0;u<c;u++){const f=a[u];if(f.validator(l))return f.classGroupId}},d3=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const n=e.slice(1,-1),r=n.indexOf(":"),o=n.slice(0,r);return o?c3+o:void 0})(),f3=e=>{const{theme:n,classGroups:r}=e;return p3(r,n)},p3=(e,n)=>{const r=kb();for(const o in e){const i=e[o];dm(i,r,o,n)}return r},dm=(e,n,r,o)=>{const i=e.length;for(let s=0;s<i;s++){const a=e[s];h3(a,n,r,o)}},h3=(e,n,r,o)=>{if(typeof e=="string"){m3(e,n,r);return}if(typeof e=="function"){g3(e,n,r,o);return}y3(e,n,r,o)},m3=(e,n,r)=>{const o=e===""?n:Pb(n,e);o.classGroupId=r},g3=(e,n,r,o)=>{if(v3(e)){dm(e(o),n,r,o);return}n.validators===null&&(n.validators=[]),n.validators.push(l3(r,e))},y3=(e,n,r,o)=>{const i=Object.entries(e),s=i.length;for(let a=0;a<s;a++){const[l,c]=i[a];dm(c,Pb(n,l),r,o)}},Pb=(e,n)=>{let r=e;const o=n.split(Nc),i=o.length;for(let s=0;s<i;s++){const a=o[s];let l=r.nextPart.get(a);l||(l=kb(),r.nextPart.set(a,l)),r=l}return r},v3=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,x3=e=>{if(e<1)return{get:()=>{},set:()=>{}};let n=0,r=Object.create(null),o=Object.create(null);const i=(s,a)=>{r[s]=a,n++,n>e&&(n=0,o=r,r=Object.create(null))};return{get(s){let a=r[s];if(a!==void 0)return a;if((a=o[s])!==void 0)return i(s,a),a},set(s,a){s in r?r[s]=a:i(s,a)}}},_p="!",dv=":",w3=[],fv=(e,n,r,o,i)=>({modifiers:e,hasImportantModifier:n,baseClassName:r,maybePostfixModifierPosition:o,isExternal:i}),b3=e=>{const{prefix:n,experimentalParseClassName:r}=e;let o=i=>{const s=[];let a=0,l=0,c=0,u;const f=i.length;for(let b=0;b<f;b++){const _=i[b];if(a===0&&l===0){if(_===dv){s.push(i.slice(c,b)),c=b+1;continue}if(_==="/"){u=b;continue}}_==="["?a++:_==="]"?a--:_==="("?l++:_===")"&&l--}const d=s.length===0?i:i.slice(c);let p=d,m=!1;d.endsWith(_p)?(p=d.slice(0,-1),m=!0):d.startsWith(_p)&&(p=d.slice(1),m=!0);const y=u&&u>c?u-c:void 0;return fv(s,m,p,y)};if(n){const i=n+dv,s=o;o=a=>a.startsWith(i)?s(a.slice(i.length)):fv(w3,!1,a,void 0,!0)}if(r){const i=o;o=s=>r({className:s,parseClassName:i})}return o},_3=e=>{const n=new Map;return e.orderSensitiveModifiers.forEach((r,o)=>{n.set(r,1e6+o)}),r=>{const o=[];let i=[];for(let s=0;s<r.length;s++){const a=r[s],l=a[0]==="[",c=n.has(a);l||c?(i.length>0&&(i.sort(),o.push(...i),i=[]),o.push(a)):i.push(a)}return i.length>0&&(i.sort(),o.push(...i)),o}},S3=e=>({cache:x3(e.cacheSize),parseClassName:b3(e),sortModifiers:_3(e),...u3(e)}),C3=/\s+/,E3=(e,n)=>{const{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:i,sortModifiers:s}=n,a=[],l=e.trim().split(C3);let c="";for(let u=l.length-1;u>=0;u-=1){const f=l[u],{isExternal:d,modifiers:p,hasImportantModifier:m,baseClassName:y,maybePostfixModifierPosition:b}=r(f);if(d){c=f+(c.length>0?" "+c:c);continue}let _=!!b,v=o(_?y.substring(0,b):y);if(!v){if(!_){c=f+(c.length>0?" "+c:c);continue}if(v=o(y),!v){c=f+(c.length>0?" "+c:c);continue}_=!1}const x=p.length===0?"":p.length===1?p[0]:s(p).join(":"),w=m?x+_p:x,S=w+v;if(a.indexOf(S)>-1)continue;a.push(S);const C=i(v,_);for(let E=0;E<C.length;++E){const k=C[E];a.push(w+k)}c=f+(c.length>0?" "+c:c)}return c},k3=(...e)=>{let n=0,r,o,i="";for(;n<e.length;)(r=e[n++])&&(o=Mb(r))&&(i&&(i+=" "),i+=o);return i},Mb=e=>{if(typeof e=="string")return e;let n,r="";for(let o=0;o<e.length;o++)e[o]&&(n=Mb(e[o]))&&(r&&(r+=" "),r+=n);return r},N3=(e,...n)=>{let r,o,i,s;const a=c=>{const u=n.reduce((f,d)=>d(f),e());return r=S3(u),o=r.cache.get,i=r.cache.set,s=l,l(c)},l=c=>{const u=o(c);if(u)return u;const f=E3(c,r);return i(c,f),f};return s=a,(...c)=>s(k3(...c))},P3=[],Fe=e=>{const n=r=>r[e]||P3;return n.isThemeGetter=!0,n},Rb=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,jb=/^\((?:(\w[\w-]*):)?(.+)\)$/i,M3=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,R3=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,j3=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,A3=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,T3=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,I3=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,tr=e=>M3.test(e),de=e=>!!e&&!Number.isNaN(Number(e)),nr=e=>!!e&&Number.isInteger(Number(e)),Wd=e=>e.endsWith("%")&&de(e.slice(0,-1)),Pn=e=>R3.test(e),Ab=()=>!0,$3=e=>j3.test(e)&&!A3.test(e),fm=()=>!1,O3=e=>T3.test(e),D3=e=>I3.test(e),L3=e=>!oe(e)&&!ie(e),z3=e=>zr(e,$b,fm),oe=e=>Rb.test(e),Ur=e=>zr(e,Ob,$3),pv=e=>zr(e,Y3,de),F3=e=>zr(e,Lb,Ab),V3=e=>zr(e,Db,fm),hv=e=>zr(e,Tb,fm),B3=e=>zr(e,Ib,D3),sl=e=>zr(e,zb,O3),ie=e=>jb.test(e),Qi=e=>So(e,Ob),H3=e=>So(e,Db),mv=e=>So(e,Tb),W3=e=>So(e,$b),U3=e=>So(e,Ib),al=e=>So(e,zb,!0),G3=e=>So(e,Lb,!0),zr=(e,n,r)=>{const o=Rb.exec(e);return o?o[1]?n(o[1]):r(o[2]):!1},So=(e,n,r=!1)=>{const o=jb.exec(e);return o?o[1]?n(o[1]):r:!1},Tb=e=>e==="position"||e==="percentage",Ib=e=>e==="image"||e==="url",$b=e=>e==="length"||e==="size"||e==="bg-size",Ob=e=>e==="length",Y3=e=>e==="number",Db=e=>e==="family-name",Lb=e=>e==="number"||e==="weight",zb=e=>e==="shadow",X3=()=>{const e=Fe("color"),n=Fe("font"),r=Fe("text"),o=Fe("font-weight"),i=Fe("tracking"),s=Fe("leading"),a=Fe("breakpoint"),l=Fe("container"),c=Fe("spacing"),u=Fe("radius"),f=Fe("shadow"),d=Fe("inset-shadow"),p=Fe("text-shadow"),m=Fe("drop-shadow"),y=Fe("blur"),b=Fe("perspective"),_=Fe("aspect"),v=Fe("ease"),x=Fe("animate"),w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[...S(),ie,oe],E=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto","contain","none"],N=()=>[ie,oe,c],M=()=>[tr,"full","auto",...N()],T=()=>[nr,"none","subgrid",ie,oe],A=()=>["auto",{span:["full",nr,ie,oe]},nr,ie,oe],D=()=>[nr,"auto",ie,oe],V=()=>["auto","min","max","fr",ie,oe],P=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],L=()=>["start","end","center","stretch","center-safe","end-safe"],I=()=>["auto",...N()],F=()=>[tr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...N()],R=()=>[tr,"screen","full","dvw","lvw","svw","min","max","fit",...N()],j=()=>[tr,"screen","full","lh","dvh","lvh","svh","min","max","fit",...N()],O=()=>[e,ie,oe],G=()=>[...S(),mv,hv,{position:[ie,oe]}],$=()=>["no-repeat",{repeat:["","x","y","space","round"]}],X=()=>["auto","cover","contain",W3,z3,{size:[ie,oe]}],H=()=>[Wd,Qi,Ur],W=()=>["","none","full",u,ie,oe],z=()=>["",de,Qi,Ur],U=()=>["solid","dashed","dotted","double"],Y=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],K=()=>[de,Wd,mv,hv],Z=()=>["","none",y,ie,oe],ee=()=>["none",de,ie,oe],Q=()=>["none",de,ie,oe],te=()=>[de,ie,oe],ce=()=>[tr,"full",...N()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Pn],breakpoint:[Pn],color:[Ab],container:[Pn],"drop-shadow":[Pn],ease:["in","out","in-out"],font:[L3],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Pn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Pn],shadow:[Pn],spacing:["px",de],text:[Pn],"text-shadow":[Pn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",tr,oe,ie,_]}],container:["container"],columns:[{columns:[de,oe,ie,l]}],"break-after":[{"break-after":w()}],"break-before":[{"break-before":w()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:C()}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:M()}],"inset-x":[{"inset-x":M()}],"inset-y":[{"inset-y":M()}],start:[{"inset-s":M(),start:M()}],end:[{"inset-e":M(),end:M()}],"inset-bs":[{"inset-bs":M()}],"inset-be":[{"inset-be":M()}],top:[{top:M()}],right:[{right:M()}],bottom:[{bottom:M()}],left:[{left:M()}],visibility:["visible","invisible","collapse"],z:[{z:[nr,"auto",ie,oe]}],basis:[{basis:[tr,"full","auto",l,...N()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[de,tr,"auto","initial","none",oe]}],grow:[{grow:["",de,ie,oe]}],shrink:[{shrink:["",de,ie,oe]}],order:[{order:[nr,"first","last","none",ie,oe]}],"grid-cols":[{"grid-cols":T()}],"col-start-end":[{col:A()}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":T()}],"row-start-end":[{row:A()}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":V()}],"auto-rows":[{"auto-rows":V()}],gap:[{gap:N()}],"gap-x":[{"gap-x":N()}],"gap-y":[{"gap-y":N()}],"justify-content":[{justify:[...P(),"normal"]}],"justify-items":[{"justify-items":[...L(),"normal"]}],"justify-self":[{"justify-self":["auto",...L()]}],"align-content":[{content:["normal",...P()]}],"align-items":[{items:[...L(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...L(),{baseline:["","last"]}]}],"place-content":[{"place-content":P()}],"place-items":[{"place-items":[...L(),"baseline"]}],"place-self":[{"place-self":["auto",...L()]}],p:[{p:N()}],px:[{px:N()}],py:[{py:N()}],ps:[{ps:N()}],pe:[{pe:N()}],pbs:[{pbs:N()}],pbe:[{pbe:N()}],pt:[{pt:N()}],pr:[{pr:N()}],pb:[{pb:N()}],pl:[{pl:N()}],m:[{m:I()}],mx:[{mx:I()}],my:[{my:I()}],ms:[{ms:I()}],me:[{me:I()}],mbs:[{mbs:I()}],mbe:[{mbe:I()}],mt:[{mt:I()}],mr:[{mr:I()}],mb:[{mb:I()}],ml:[{ml:I()}],"space-x":[{"space-x":N()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":N()}],"space-y-reverse":["space-y-reverse"],size:[{size:F()}],"inline-size":[{inline:["auto",...R()]}],"min-inline-size":[{"min-inline":["auto",...R()]}],"max-inline-size":[{"max-inline":["none",...R()]}],"block-size":[{block:["auto",...j()]}],"min-block-size":[{"min-block":["auto",...j()]}],"max-block-size":[{"max-block":["none",...j()]}],w:[{w:[l,"screen",...F()]}],"min-w":[{"min-w":[l,"screen","none",...F()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[a]},...F()]}],h:[{h:["screen","lh",...F()]}],"min-h":[{"min-h":["screen","lh","none",...F()]}],"max-h":[{"max-h":["screen","lh",...F()]}],"font-size":[{text:["base",r,Qi,Ur]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,G3,F3]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Wd,oe]}],"font-family":[{font:[H3,V3,n]}],"font-features":[{"font-features":[oe]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,ie,oe]}],"line-clamp":[{"line-clamp":[de,"none",ie,pv]}],leading:[{leading:[s,...N()]}],"list-image":[{"list-image":["none",ie,oe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ie,oe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:O()}],"text-color":[{text:O()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...U(),"wavy"]}],"text-decoration-thickness":[{decoration:[de,"from-font","auto",ie,Ur]}],"text-decoration-color":[{decoration:O()}],"underline-offset":[{"underline-offset":[de,"auto",ie,oe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ie,oe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ie,oe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:G()}],"bg-repeat":[{bg:$()}],"bg-size":[{bg:X()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},nr,ie,oe],radial:["",ie,oe],conic:[nr,ie,oe]},U3,B3]}],"bg-color":[{bg:O()}],"gradient-from-pos":[{from:H()}],"gradient-via-pos":[{via:H()}],"gradient-to-pos":[{to:H()}],"gradient-from":[{from:O()}],"gradient-via":[{via:O()}],"gradient-to":[{to:O()}],rounded:[{rounded:W()}],"rounded-s":[{"rounded-s":W()}],"rounded-e":[{"rounded-e":W()}],"rounded-t":[{"rounded-t":W()}],"rounded-r":[{"rounded-r":W()}],"rounded-b":[{"rounded-b":W()}],"rounded-l":[{"rounded-l":W()}],"rounded-ss":[{"rounded-ss":W()}],"rounded-se":[{"rounded-se":W()}],"rounded-ee":[{"rounded-ee":W()}],"rounded-es":[{"rounded-es":W()}],"rounded-tl":[{"rounded-tl":W()}],"rounded-tr":[{"rounded-tr":W()}],"rounded-br":[{"rounded-br":W()}],"rounded-bl":[{"rounded-bl":W()}],"border-w":[{border:z()}],"border-w-x":[{"border-x":z()}],"border-w-y":[{"border-y":z()}],"border-w-s":[{"border-s":z()}],"border-w-e":[{"border-e":z()}],"border-w-bs":[{"border-bs":z()}],"border-w-be":[{"border-be":z()}],"border-w-t":[{"border-t":z()}],"border-w-r":[{"border-r":z()}],"border-w-b":[{"border-b":z()}],"border-w-l":[{"border-l":z()}],"divide-x":[{"divide-x":z()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":z()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...U(),"hidden","none"]}],"divide-style":[{divide:[...U(),"hidden","none"]}],"border-color":[{border:O()}],"border-color-x":[{"border-x":O()}],"border-color-y":[{"border-y":O()}],"border-color-s":[{"border-s":O()}],"border-color-e":[{"border-e":O()}],"border-color-bs":[{"border-bs":O()}],"border-color-be":[{"border-be":O()}],"border-color-t":[{"border-t":O()}],"border-color-r":[{"border-r":O()}],"border-color-b":[{"border-b":O()}],"border-color-l":[{"border-l":O()}],"divide-color":[{divide:O()}],"outline-style":[{outline:[...U(),"none","hidden"]}],"outline-offset":[{"outline-offset":[de,ie,oe]}],"outline-w":[{outline:["",de,Qi,Ur]}],"outline-color":[{outline:O()}],shadow:[{shadow:["","none",f,al,sl]}],"shadow-color":[{shadow:O()}],"inset-shadow":[{"inset-shadow":["none",d,al,sl]}],"inset-shadow-color":[{"inset-shadow":O()}],"ring-w":[{ring:z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:O()}],"ring-offset-w":[{"ring-offset":[de,Ur]}],"ring-offset-color":[{"ring-offset":O()}],"inset-ring-w":[{"inset-ring":z()}],"inset-ring-color":[{"inset-ring":O()}],"text-shadow":[{"text-shadow":["none",p,al,sl]}],"text-shadow-color":[{"text-shadow":O()}],opacity:[{opacity:[de,ie,oe]}],"mix-blend":[{"mix-blend":[...Y(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Y()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[de]}],"mask-image-linear-from-pos":[{"mask-linear-from":K()}],"mask-image-linear-to-pos":[{"mask-linear-to":K()}],"mask-image-linear-from-color":[{"mask-linear-from":O()}],"mask-image-linear-to-color":[{"mask-linear-to":O()}],"mask-image-t-from-pos":[{"mask-t-from":K()}],"mask-image-t-to-pos":[{"mask-t-to":K()}],"mask-image-t-from-color":[{"mask-t-from":O()}],"mask-image-t-to-color":[{"mask-t-to":O()}],"mask-image-r-from-pos":[{"mask-r-from":K()}],"mask-image-r-to-pos":[{"mask-r-to":K()}],"mask-image-r-from-color":[{"mask-r-from":O()}],"mask-image-r-to-color":[{"mask-r-to":O()}],"mask-image-b-from-pos":[{"mask-b-from":K()}],"mask-image-b-to-pos":[{"mask-b-to":K()}],"mask-image-b-from-color":[{"mask-b-from":O()}],"mask-image-b-to-color":[{"mask-b-to":O()}],"mask-image-l-from-pos":[{"mask-l-from":K()}],"mask-image-l-to-pos":[{"mask-l-to":K()}],"mask-image-l-from-color":[{"mask-l-from":O()}],"mask-image-l-to-color":[{"mask-l-to":O()}],"mask-image-x-from-pos":[{"mask-x-from":K()}],"mask-image-x-to-pos":[{"mask-x-to":K()}],"mask-image-x-from-color":[{"mask-x-from":O()}],"mask-image-x-to-color":[{"mask-x-to":O()}],"mask-image-y-from-pos":[{"mask-y-from":K()}],"mask-image-y-to-pos":[{"mask-y-to":K()}],"mask-image-y-from-color":[{"mask-y-from":O()}],"mask-image-y-to-color":[{"mask-y-to":O()}],"mask-image-radial":[{"mask-radial":[ie,oe]}],"mask-image-radial-from-pos":[{"mask-radial-from":K()}],"mask-image-radial-to-pos":[{"mask-radial-to":K()}],"mask-image-radial-from-color":[{"mask-radial-from":O()}],"mask-image-radial-to-color":[{"mask-radial-to":O()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":S()}],"mask-image-conic-pos":[{"mask-conic":[de]}],"mask-image-conic-from-pos":[{"mask-conic-from":K()}],"mask-image-conic-to-pos":[{"mask-conic-to":K()}],"mask-image-conic-from-color":[{"mask-conic-from":O()}],"mask-image-conic-to-color":[{"mask-conic-to":O()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:G()}],"mask-repeat":[{mask:$()}],"mask-size":[{mask:X()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ie,oe]}],filter:[{filter:["","none",ie,oe]}],blur:[{blur:Z()}],brightness:[{brightness:[de,ie,oe]}],contrast:[{contrast:[de,ie,oe]}],"drop-shadow":[{"drop-shadow":["","none",m,al,sl]}],"drop-shadow-color":[{"drop-shadow":O()}],grayscale:[{grayscale:["",de,ie,oe]}],"hue-rotate":[{"hue-rotate":[de,ie,oe]}],invert:[{invert:["",de,ie,oe]}],saturate:[{saturate:[de,ie,oe]}],sepia:[{sepia:["",de,ie,oe]}],"backdrop-filter":[{"backdrop-filter":["","none",ie,oe]}],"backdrop-blur":[{"backdrop-blur":Z()}],"backdrop-brightness":[{"backdrop-brightness":[de,ie,oe]}],"backdrop-contrast":[{"backdrop-contrast":[de,ie,oe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",de,ie,oe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[de,ie,oe]}],"backdrop-invert":[{"backdrop-invert":["",de,ie,oe]}],"backdrop-opacity":[{"backdrop-opacity":[de,ie,oe]}],"backdrop-saturate":[{"backdrop-saturate":[de,ie,oe]}],"backdrop-sepia":[{"backdrop-sepia":["",de,ie,oe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":N()}],"border-spacing-x":[{"border-spacing-x":N()}],"border-spacing-y":[{"border-spacing-y":N()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ie,oe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[de,"initial",ie,oe]}],ease:[{ease:["linear","initial",v,ie,oe]}],delay:[{delay:[de,ie,oe]}],animate:[{animate:["none",x,ie,oe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,ie,oe]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:ee()}],"rotate-x":[{"rotate-x":ee()}],"rotate-y":[{"rotate-y":ee()}],"rotate-z":[{"rotate-z":ee()}],scale:[{scale:Q()}],"scale-x":[{"scale-x":Q()}],"scale-y":[{"scale-y":Q()}],"scale-z":[{"scale-z":Q()}],"scale-3d":["scale-3d"],skew:[{skew:te()}],"skew-x":[{"skew-x":te()}],"skew-y":[{"skew-y":te()}],transform:[{transform:[ie,oe,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ce()}],"translate-x":[{"translate-x":ce()}],"translate-y":[{"translate-y":ce()}],"translate-z":[{"translate-z":ce()}],"translate-none":["translate-none"],accent:[{accent:O()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:O()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ie,oe]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mbs":[{"scroll-mbs":N()}],"scroll-mbe":[{"scroll-mbe":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pbs":[{"scroll-pbs":N()}],"scroll-pbe":[{"scroll-pbe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ie,oe]}],fill:[{fill:["none",...O()]}],"stroke-w":[{stroke:[de,Qi,Ur,pv]}],stroke:[{stroke:["none",...O()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},K3=N3(X3);function se(...e){return K3(Eb(e))}function Fb(e,n=[]){let r=[];function o(s,a){const l=h.createContext(a);l.displayName=s+"Context";const c=r.length;r=[...r,a];const u=d=>{var v;const{scope:p,children:m,...y}=d,b=((v=p==null?void 0:p[e])==null?void 0:v[c])||l,_=h.useMemo(()=>y,Object.values(y));return g.jsx(b.Provider,{value:_,children:m})};u.displayName=s+"Provider";function f(d,p){var b;const m=((b=p==null?void 0:p[e])==null?void 0:b[c])||l,y=h.useContext(m);if(y)return y;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[u,f]}const i=()=>{const s=r.map(a=>h.createContext(a));return function(l){const c=(l==null?void 0:l[e])||s;return h.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[o,q3(i,...n)]}function q3(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=o.reduce((l,{useScope:c,scopeName:u})=>{const d=c(s)[`__scope${u}`];return{...l,...d}},{});return h.useMemo(()=>({[`__scope${n.scopeName}`]:a}),[a])}};return r.scopeName=n.scopeName,r}function Sn(e){const n=h.useRef(e);return h.useEffect(()=>{n.current=e}),h.useMemo(()=>(...r)=>{var o;return(o=n.current)==null?void 0:o.call(n,...r)},[])}var He=globalThis!=null&&globalThis.document?h.useLayoutEffect:()=>{};function gv(e,n){if(typeof e=="function")return e(n);e!=null&&(e.current=n)}function Se(...e){return n=>{let r=!1;const o=e.map(i=>{const s=gv(i,n);return!r&&typeof s=="function"&&(r=!0),s});if(r)return()=>{for(let i=0;i<o.length;i++){const s=o[i];typeof s=="function"?s():gv(e[i],null)}}}}function he(...e){return h.useCallback(Se(...e),e)}var Z3=Symbol.for("react.lazy"),Pc=lu[" use ".trim().toString()];function Q3(e){return typeof e=="object"&&e!==null&&"then"in e}function Vb(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Z3&&"_payload"in e&&Q3(e._payload)}function Bb(e){const n=J3(e),r=h.forwardRef((o,i)=>{let{children:s,...a}=o;Vb(s)&&typeof Pc=="function"&&(s=Pc(s._payload));const l=h.Children.toArray(s),c=l.find(tA);if(c){const u=c.props.children,f=l.map(d=>d===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:d);return g.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,f):null})}return g.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}var Hb=Bb("Slot");function J3(e){const n=h.forwardRef((r,o)=>{let{children:i,...s}=r;if(Vb(i)&&typeof Pc=="function"&&(i=Pc(i._payload)),h.isValidElement(i)){const a=rA(i),l=nA(s,i.props);return i.type!==h.Fragment&&(l.ref=o?Se(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var eA=Symbol("radix.slottable");function tA(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===eA}function nA(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function rA(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var oA=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],lt=oA.reduce((e,n)=>{const r=Bb(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{}),Wb={exports:{}},Ub={};/**
68
- * @license React
69
- * use-sync-external-store-shim.production.js
70
- *
71
- * Copyright (c) Meta Platforms, Inc. and affiliates.
72
- *
73
- * This source code is licensed under the MIT license found in the
74
- * LICENSE file in the root directory of this source tree.
75
- */var yi=h;function iA(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var sA=typeof Object.is=="function"?Object.is:iA,aA=yi.useState,lA=yi.useEffect,cA=yi.useLayoutEffect,uA=yi.useDebugValue;function dA(e,n){var r=n(),o=aA({inst:{value:r,getSnapshot:n}}),i=o[0].inst,s=o[1];return cA(function(){i.value=r,i.getSnapshot=n,Ud(i)&&s({inst:i})},[e,r,n]),lA(function(){return Ud(i)&&s({inst:i}),e(function(){Ud(i)&&s({inst:i})})},[e]),uA(r),r}function Ud(e){var n=e.getSnapshot;e=e.value;try{var r=n();return!sA(e,r)}catch{return!0}}function fA(e,n){return n()}var pA=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?fA:dA;Ub.useSyncExternalStore=yi.useSyncExternalStore!==void 0?yi.useSyncExternalStore:pA;Wb.exports=Ub;var Gb=Wb.exports;function hA(){return Gb.useSyncExternalStore(mA,()=>!0,()=>!1)}function mA(){return()=>{}}var pm="Avatar",[gA]=Fb(pm),[yA,Yb]=gA(pm),Xb=h.forwardRef((e,n)=>{const{__scopeAvatar:r,...o}=e,[i,s]=h.useState("idle");return g.jsx(yA,{scope:r,imageLoadingStatus:i,onImageLoadingStatusChange:s,children:g.jsx(lt.span,{...o,ref:n})})});Xb.displayName=pm;var Kb="AvatarImage",qb=h.forwardRef((e,n)=>{const{__scopeAvatar:r,src:o,onLoadingStatusChange:i=()=>{},...s}=e,a=Yb(Kb,r),l=vA(o,s),c=Sn(u=>{i(u),a.onImageLoadingStatusChange(u)});return He(()=>{l!=="idle"&&c(l)},[l,c]),l==="loaded"?g.jsx(lt.img,{...s,ref:n,src:o}):null});qb.displayName=Kb;var Zb="AvatarFallback",Qb=h.forwardRef((e,n)=>{const{__scopeAvatar:r,delayMs:o,...i}=e,s=Yb(Zb,r),[a,l]=h.useState(o===void 0);return h.useEffect(()=>{if(o!==void 0){const c=window.setTimeout(()=>l(!0),o);return()=>window.clearTimeout(c)}},[o]),a&&s.imageLoadingStatus!=="loaded"?g.jsx(lt.span,{...i,ref:n}):null});Qb.displayName=Zb;function yv(e,n){return e?n?(e.src!==n&&(e.src=n),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function vA(e,{referrerPolicy:n,crossOrigin:r}){const o=hA(),i=h.useRef(null),s=o?(i.current||(i.current=new window.Image),i.current):null,[a,l]=h.useState(()=>yv(s,e));return He(()=>{l(yv(s,e))},[s,e]),He(()=>{const c=d=>()=>{l(d)};if(!s)return;const u=c("loaded"),f=c("error");return s.addEventListener("load",u),s.addEventListener("error",f),n&&(s.referrerPolicy=n),typeof r=="string"&&(s.crossOrigin=r),()=>{s.removeEventListener("load",u),s.removeEventListener("error",f)}},[s,r,n]),a}var Jb=Xb,e_=qb,t_=Qb;const xA=h.forwardRef(({className:e,...n},r)=>g.jsx(Jb,{ref:r,className:se("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...n}));xA.displayName=Jb.displayName;const wA=h.forwardRef(({className:e,...n},r)=>g.jsx(e_,{ref:r,className:se("aspect-square h-full w-full",e),...n}));wA.displayName=e_.displayName;const bA=h.forwardRef(({className:e,...n},r)=>g.jsx(t_,{ref:r,className:se("flex h-full w-full items-center justify-center rounded-full bg-primary/10 text-primary font-medium",e),...n}));bA.displayName=t_.displayName;const vv=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,xv=Eb,hm=(e,n)=>r=>{var o;if((n==null?void 0:n.variants)==null)return xv(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:i,defaultVariants:s}=n,a=Object.keys(i).map(u=>{const f=r==null?void 0:r[u],d=s==null?void 0:s[u];if(f===null)return null;const p=vv(f)||vv(d);return i[u][p]}),l=r&&Object.entries(r).reduce((u,f)=>{let[d,p]=f;return p===void 0||(u[d]=p),u},{}),c=n==null||(o=n.compoundVariants)===null||o===void 0?void 0:o.reduce((u,f)=>{let{class:d,className:p,...m}=f;return Object.entries(m).every(y=>{let[b,_]=y;return Array.isArray(_)?_.includes({...s,...l}[b]):{...s,...l}[b]===_})?[...u,d,p]:u},[]);return xv(e,a,c,r==null?void 0:r.class,r==null?void 0:r.className)};/**
76
- * @license lucide-react v0.576.0 - ISC
77
- *
78
- * This source code is licensed under the ISC license.
79
- * See the LICENSE file in the root directory of this source tree.
80
- */const n_=(...e)=>e.filter((n,r,o)=>!!n&&n.trim()!==""&&o.indexOf(n)===r).join(" ").trim();/**
81
- * @license lucide-react v0.576.0 - ISC
82
- *
83
- * This source code is licensed under the ISC license.
84
- * See the LICENSE file in the root directory of this source tree.
85
- */const _A=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
86
- * @license lucide-react v0.576.0 - ISC
87
- *
88
- * This source code is licensed under the ISC license.
89
- * See the LICENSE file in the root directory of this source tree.
90
- */const SA=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,r,o)=>o?o.toUpperCase():r.toLowerCase());/**
91
- * @license lucide-react v0.576.0 - ISC
92
- *
93
- * This source code is licensed under the ISC license.
94
- * See the LICENSE file in the root directory of this source tree.
95
- */const wv=e=>{const n=SA(e);return n.charAt(0).toUpperCase()+n.slice(1)};/**
96
- * @license lucide-react v0.576.0 - ISC
97
- *
98
- * This source code is licensed under the ISC license.
99
- * See the LICENSE file in the root directory of this source tree.
100
- */var CA={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
101
- * @license lucide-react v0.576.0 - ISC
102
- *
103
- * This source code is licensed under the ISC license.
104
- * See the LICENSE file in the root directory of this source tree.
105
- */const EA=e=>{for(const n in e)if(n.startsWith("aria-")||n==="role"||n==="title")return!0;return!1};/**
106
- * @license lucide-react v0.576.0 - ISC
107
- *
108
- * This source code is licensed under the ISC license.
109
- * See the LICENSE file in the root directory of this source tree.
110
- */const kA=h.forwardRef(({color:e="currentColor",size:n=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:i="",children:s,iconNode:a,...l},c)=>h.createElement("svg",{ref:c,...CA,width:n,height:n,stroke:e,strokeWidth:o?Number(r)*24/Number(n):r,className:n_("lucide",i),...!s&&!EA(l)&&{"aria-hidden":"true"},...l},[...a.map(([u,f])=>h.createElement(u,f)),...Array.isArray(s)?s:[s]]));/**
111
- * @license lucide-react v0.576.0 - ISC
112
- *
113
- * This source code is licensed under the ISC license.
114
- * See the LICENSE file in the root directory of this source tree.
115
- */const pe=(e,n)=>{const r=h.forwardRef(({className:o,...i},s)=>h.createElement(kA,{ref:s,iconNode:n,className:n_(`lucide-${_A(wv(e))}`,`lucide-${e}`,o),...i}));return r.displayName=wv(e),r};/**
116
- * @license lucide-react v0.576.0 - ISC
117
- *
118
- * This source code is licensed under the ISC license.
119
- * See the LICENSE file in the root directory of this source tree.
120
- */const NA=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],mm=pe("arrow-left",NA);/**
121
- * @license lucide-react v0.576.0 - ISC
122
- *
123
- * This source code is licensed under the ISC license.
124
- * See the LICENSE file in the root directory of this source tree.
125
- */const PA=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],MA=pe("arrow-right",PA);/**
126
- * @license lucide-react v0.576.0 - ISC
127
- *
128
- * This source code is licensed under the ISC license.
129
- * See the LICENSE file in the root directory of this source tree.
130
- */const RA=[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]],gm=pe("boxes",RA);/**
131
- * @license lucide-react v0.576.0 - ISC
132
- *
133
- * This source code is licensed under the ISC license.
134
- * See the LICENSE file in the root directory of this source tree.
135
- */const jA=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],ym=pe("check",jA);/**
136
- * @license lucide-react v0.576.0 - ISC
137
- *
138
- * This source code is licensed under the ISC license.
139
- * See the LICENSE file in the root directory of this source tree.
140
- */const AA=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],vm=pe("chevron-down",AA);/**
141
- * @license lucide-react v0.576.0 - ISC
142
- *
143
- * This source code is licensed under the ISC license.
144
- * See the LICENSE file in the root directory of this source tree.
145
- */const TA=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Js=pe("chevron-right",TA);/**
146
- * @license lucide-react v0.576.0 - ISC
147
- *
148
- * This source code is licensed under the ISC license.
149
- * See the LICENSE file in the root directory of this source tree.
150
- */const IA=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],$A=pe("chevron-up",IA);/**
151
- * @license lucide-react v0.576.0 - ISC
152
- *
153
- * This source code is licensed under the ISC license.
154
- * See the LICENSE file in the root directory of this source tree.
155
- */const OA=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],DA=pe("circle-alert",OA);/**
156
- * @license lucide-react v0.576.0 - ISC
157
- *
158
- * This source code is licensed under the ISC license.
159
- * See the LICENSE file in the root directory of this source tree.
160
- */const LA=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],bv=pe("circle-check-big",LA);/**
161
- * @license lucide-react v0.576.0 - ISC
162
- *
163
- * This source code is licensed under the ISC license.
164
- * See the LICENSE file in the root directory of this source tree.
165
- */const zA=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],FA=pe("circle-x",zA);/**
166
- * @license lucide-react v0.576.0 - ISC
167
- *
168
- * This source code is licensed under the ISC license.
169
- * See the LICENSE file in the root directory of this source tree.
170
- */const VA=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],BA=pe("circle",VA);/**
171
- * @license lucide-react v0.576.0 - ISC
172
- *
173
- * This source code is licensed under the ISC license.
174
- * See the LICENSE file in the root directory of this source tree.
175
- */const HA=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],xm=pe("database",HA);/**
176
- * @license lucide-react v0.576.0 - ISC
177
- *
178
- * This source code is licensed under the ISC license.
179
- * See the LICENSE file in the root directory of this source tree.
180
- */const WA=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]],UA=pe("file-code",WA);/**
181
- * @license lucide-react v0.576.0 - ISC
182
- *
183
- * This source code is licensed under the ISC license.
184
- * See the LICENSE file in the root directory of this source tree.
185
- */const GA=[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]],YA=pe("git-branch",GA);/**
186
- * @license lucide-react v0.576.0 - ISC
187
- *
188
- * This source code is licensed under the ISC license.
189
- * See the LICENSE file in the root directory of this source tree.
190
- */const XA=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],wm=pe("globe",XA);/**
191
- * @license lucide-react v0.576.0 - ISC
192
- *
193
- * This source code is licensed under the ISC license.
194
- * See the LICENSE file in the root directory of this source tree.
195
- */const KA=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],xa=pe("layers",KA);/**
196
- * @license lucide-react v0.576.0 - ISC
197
- *
198
- * This source code is licensed under the ISC license.
199
- * See the LICENSE file in the root directory of this source tree.
200
- */const qA=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],ZA=pe("layout-dashboard",qA);/**
201
- * @license lucide-react v0.576.0 - ISC
202
- *
203
- * This source code is licensed under the ISC license.
204
- * See the LICENSE file in the root directory of this source tree.
205
- */const QA=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],_v=pe("link",QA);/**
206
- * @license lucide-react v0.576.0 - ISC
207
- *
208
- * This source code is licensed under the ISC license.
209
- * See the LICENSE file in the root directory of this source tree.
210
- */const JA=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],eT=pe("list",JA);/**
211
- * @license lucide-react v0.576.0 - ISC
212
- *
213
- * This source code is licensed under the ISC license.
214
- * See the LICENSE file in the root directory of this source tree.
215
- */const tT=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],nT=pe("map-pin",tT);/**
216
- * @license lucide-react v0.576.0 - ISC
217
- *
218
- * This source code is licensed under the ISC license.
219
- * See the LICENSE file in the root directory of this source tree.
220
- */const rT=[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]],oT=pe("map",rT);/**
221
- * @license lucide-react v0.576.0 - ISC
222
- *
223
- * This source code is licensed under the ISC license.
224
- * See the LICENSE file in the root directory of this source tree.
225
- */const iT=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],sT=pe("moon",iT);/**
226
- * @license lucide-react v0.576.0 - ISC
227
- *
228
- * This source code is licensed under the ISC license.
229
- * See the LICENSE file in the root directory of this source tree.
230
- */const aT=[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]],lT=pe("network",aT);/**
231
- * @license lucide-react v0.576.0 - ISC
232
- *
233
- * This source code is licensed under the ISC license.
234
- * See the LICENSE file in the root directory of this source tree.
235
- */const cT=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],Sv=pe("package",cT);/**
236
- * @license lucide-react v0.576.0 - ISC
237
- *
238
- * This source code is licensed under the ISC license.
239
- * See the LICENSE file in the root directory of this source tree.
240
- */const uT=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Gd=pe("plus",uT);/**
241
- * @license lucide-react v0.576.0 - ISC
242
- *
243
- * This source code is licensed under the ISC license.
244
- * See the LICENSE file in the root directory of this source tree.
245
- */const dT=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],r_=pe("refresh-cw",dT);/**
246
- * @license lucide-react v0.576.0 - ISC
247
- *
248
- * This source code is licensed under the ISC license.
249
- * See the LICENSE file in the root directory of this source tree.
250
- */const fT=[["circle",{cx:"6",cy:"19",r:"3",key:"1kj8tv"}],["path",{d:"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15",key:"1d8sl"}],["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}]],pT=pe("route",fT);/**
251
- * @license lucide-react v0.576.0 - ISC
252
- *
253
- * This source code is licensed under the ISC license.
254
- * See the LICENSE file in the root directory of this source tree.
255
- */const hT=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],mT=pe("save",hT);/**
256
- * @license lucide-react v0.576.0 - ISC
257
- *
258
- * This source code is licensed under the ISC license.
259
- * See the LICENSE file in the root directory of this source tree.
260
- */const gT=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],yT=pe("search",gT);/**
261
- * @license lucide-react v0.576.0 - ISC
262
- *
263
- * This source code is licensed under the ISC license.
264
- * See the LICENSE file in the root directory of this source tree.
265
- */const vT=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],o_=pe("settings",vT);/**
266
- * @license lucide-react v0.576.0 - ISC
267
- *
268
- * This source code is licensed under the ISC license.
269
- * See the LICENSE file in the root directory of this source tree.
270
- */const xT=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],wT=pe("sun",xT);/**
271
- * @license lucide-react v0.576.0 - ISC
272
- *
273
- * This source code is licensed under the ISC license.
274
- * See the LICENSE file in the root directory of this source tree.
275
- */const bT=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]],_T=pe("tag",bT);/**
276
- * @license lucide-react v0.576.0 - ISC
277
- *
278
- * This source code is licensed under the ISC license.
279
- * See the LICENSE file in the root directory of this source tree.
280
- */const ST=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Yd=pe("trash-2",ST);/**
281
- * @license lucide-react v0.576.0 - ISC
282
- *
283
- * This source code is licensed under the ISC license.
284
- * See the LICENSE file in the root directory of this source tree.
285
- */const CT=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],ET=pe("triangle-alert",CT);/**
286
- * @license lucide-react v0.576.0 - ISC
287
- *
288
- * This source code is licensed under the ISC license.
289
- * See the LICENSE file in the root directory of this source tree.
290
- */const kT=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Mc=pe("x",kT);/**
291
- * @license lucide-react v0.576.0 - ISC
292
- *
293
- * This source code is licensed under the ISC license.
294
- * See the LICENSE file in the root directory of this source tree.
295
- */const NT=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],PT=pe("zap",NT),MT=h.forwardRef(({...e},n)=>g.jsx("nav",{ref:n,"aria-label":"breadcrumb",...e}));MT.displayName="Breadcrumb";const RT=h.forwardRef(({className:e,...n},r)=>g.jsx("ol",{ref:r,className:se("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",e),...n}));RT.displayName="BreadcrumbList";const jT=h.forwardRef(({className:e,...n},r)=>g.jsx("li",{ref:r,className:se("inline-flex items-center gap-1.5",e),...n}));jT.displayName="BreadcrumbItem";const AT=h.forwardRef(({asChild:e,className:n,...r},o)=>{const i=e?Hb:"a";return g.jsx(i,{ref:o,className:se("transition-colors hover:text-foreground",n),...r})});AT.displayName="BreadcrumbLink";const TT=h.forwardRef(({className:e,...n},r)=>g.jsx("span",{ref:r,role:"link","aria-disabled":"true","aria-current":"page",className:se("font-normal text-foreground",e),...n}));TT.displayName="BreadcrumbPage";const IT=hm("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),i_=h.forwardRef(({className:e,variant:n,size:r,asChild:o=!1,...i},s)=>{const a=o?Hb:"button";return g.jsx(a,{className:se(IT({variant:n,size:r,className:e})),ref:s,...i})});i_.displayName="Button";const $T=h.forwardRef(({className:e,onClick:n,...r},o)=>{const i=h.useRef(null),[s,a]=h.useState(!1);return h.useEffect(()=>{var u;const l=i.current;if(!l)return;const c=!!n||((u=l.parentElement)==null?void 0:u.tagName)==="A"||!!l.querySelector(":scope > a");a(c)},[n]),g.jsx("div",{ref:l=>{i.current=l,typeof o=="function"?o(l):o&&(o.current=l)},className:se("ls-card rounded-xl bg-card text-card-foreground",s&&"interactive",e),onClick:n,...r})});$T.displayName="Card";const OT=h.forwardRef(({className:e,...n},r)=>g.jsx("div",{ref:r,className:se("flex flex-col space-y-1.5 p-6",e),...n}));OT.displayName="CardHeader";const DT=h.forwardRef(({className:e,...n},r)=>g.jsx("div",{ref:r,className:se("font-semibold leading-none tracking-tight",e),...n}));DT.displayName="CardTitle";const LT=h.forwardRef(({className:e,...n},r)=>g.jsx("div",{ref:r,className:se("text-sm text-muted-foreground",e),...n}));LT.displayName="CardDescription";const zT=h.forwardRef(({className:e,...n},r)=>g.jsx("div",{ref:r,className:se("p-6 pt-0",e),...n}));zT.displayName="CardContent";const FT=h.forwardRef(({className:e,...n},r)=>g.jsx("div",{ref:r,className:se("flex items-center p-6 pt-0",e),...n}));FT.displayName="CardFooter";function VT(e,n=[]){let r=[];function o(s,a){const l=h.createContext(a),c=r.length;r=[...r,a];const u=d=>{var v;const{scope:p,children:m,...y}=d,b=((v=p==null?void 0:p[e])==null?void 0:v[c])||l,_=h.useMemo(()=>y,Object.values(y));return g.jsx(b.Provider,{value:_,children:m})};u.displayName=s+"Provider";function f(d,p){var b;const m=((b=p==null?void 0:p[e])==null?void 0:b[c])||l,y=h.useContext(m);if(y)return y;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[u,f]}const i=()=>{const s=r.map(a=>h.createContext(a));return function(l){const c=(l==null?void 0:l[e])||s;return h.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[o,BT(i,...n)]}function BT(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=o.reduce((l,{useScope:c,scopeName:u})=>{const d=c(s)[`__scope${u}`];return{...l,...d}},{});return h.useMemo(()=>({[`__scope${n.scopeName}`]:a}),[a])}};return r.scopeName=n.scopeName,r}function ne(e,n,{checkForDefaultPrevented:r=!0}={}){return function(i){if(e==null||e(i),r===!1||!i.defaultPrevented)return n==null?void 0:n(i)}}var HT=lu[" useInsertionEffect ".trim().toString()]||He;function wa({prop:e,defaultProp:n,onChange:r=()=>{},caller:o}){const[i,s,a]=WT({defaultProp:n,onChange:r}),l=e!==void 0,c=l?e:i;{const f=h.useRef(e!==void 0);h.useEffect(()=>{const d=f.current;d!==l&&console.warn(`${o} is changing from ${d?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=l},[l,o])}const u=h.useCallback(f=>{var d;if(l){const p=UT(f)?f(e):f;p!==e&&((d=a.current)==null||d.call(a,p))}else s(f)},[l,e,s,a]);return[c,u]}function WT({defaultProp:e,onChange:n}){const[r,o]=h.useState(e),i=h.useRef(r),s=h.useRef(n);return HT(()=>{s.current=n},[n]),h.useEffect(()=>{var a;i.current!==r&&((a=s.current)==null||a.call(s,r),i.current=r)},[r,i]),[r,o,s]}function UT(e){return typeof e=="function"}function bm(e){const n=h.useRef({value:e,previous:e});return h.useMemo(()=>(n.current.value!==e&&(n.current.previous=n.current.value,n.current.value=e),n.current.previous),[e])}function _m(e){const[n,r]=h.useState(void 0);return He(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const s=i[0];let a,l;if("borderBoxSize"in s){const c=s.borderBoxSize,u=Array.isArray(c)?c[0]:c;a=u.inlineSize,l=u.blockSize}else a=e.offsetWidth,l=e.offsetHeight;r({width:a,height:l})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else r(void 0)},[e]),n}function GT(e,n){return h.useReducer((r,o)=>n[r][o]??r,e)}var yt=e=>{const{present:n,children:r}=e,o=YT(n),i=typeof r=="function"?r({present:o.isPresent}):h.Children.only(r),s=he(o.ref,XT(i));return typeof r=="function"||o.isPresent?h.cloneElement(i,{ref:s}):null};yt.displayName="Presence";function YT(e){const[n,r]=h.useState(),o=h.useRef(null),i=h.useRef(e),s=h.useRef("none"),a=e?"mounted":"unmounted",[l,c]=GT(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return h.useEffect(()=>{const u=ll(o.current);s.current=l==="mounted"?u:"none"},[l]),He(()=>{const u=o.current,f=i.current;if(f!==e){const p=s.current,m=ll(u);e?c("MOUNT"):m==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(f&&p!==m?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,c]),He(()=>{if(n){let u;const f=n.ownerDocument.defaultView??window,d=m=>{const b=ll(o.current).includes(CSS.escape(m.animationName));if(m.target===n&&b&&(c("ANIMATION_END"),!i.current)){const _=n.style.animationFillMode;n.style.animationFillMode="forwards",u=f.setTimeout(()=>{n.style.animationFillMode==="forwards"&&(n.style.animationFillMode=_)})}},p=m=>{m.target===n&&(s.current=ll(o.current))};return n.addEventListener("animationstart",p),n.addEventListener("animationcancel",d),n.addEventListener("animationend",d),()=>{f.clearTimeout(u),n.removeEventListener("animationstart",p),n.removeEventListener("animationcancel",d),n.removeEventListener("animationend",d)}}else c("ANIMATION_END")},[n,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:h.useCallback(u=>{o.current=u?getComputedStyle(u):null,r(u)},[])}}function ll(e){return(e==null?void 0:e.animationName)||"none"}function XT(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function KT(e){const n=qT(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(QT);if(c){const u=c.props.children,f=l.map(d=>d===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:d);return g.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,f):null})}return g.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function qT(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=e5(i),l=JT(s,i.props);return i.type!==h.Fragment&&(l.ref=o?Se(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var ZT=Symbol("radix.slottable");function QT(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ZT}function JT(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function e5(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var t5=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Sm=t5.reduce((e,n)=>{const r=KT(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{}),Nu="Checkbox",[n5]=VT(Nu),[r5,Cm]=n5(Nu);function o5(e){const{__scopeCheckbox:n,checked:r,children:o,defaultChecked:i,disabled:s,form:a,name:l,onCheckedChange:c,required:u,value:f="on",internal_do_not_use_render:d}=e,[p,m]=wa({prop:r,defaultProp:i??!1,onChange:c,caller:Nu}),[y,b]=h.useState(null),[_,v]=h.useState(null),x=h.useRef(!1),w=y?!!a||!!y.closest("form"):!0,S={checked:p,disabled:s,setChecked:m,control:y,setControl:b,name:l,form:a,value:f,hasConsumerStoppedPropagationRef:x,required:u,defaultChecked:Nr(i)?!1:i,isFormControl:w,bubbleInput:_,setBubbleInput:v};return g.jsx(r5,{scope:n,...S,children:i5(d)?d(S):o})}var s_="CheckboxTrigger",a_=h.forwardRef(({__scopeCheckbox:e,onKeyDown:n,onClick:r,...o},i)=>{const{control:s,value:a,disabled:l,checked:c,required:u,setControl:f,setChecked:d,hasConsumerStoppedPropagationRef:p,isFormControl:m,bubbleInput:y}=Cm(s_,e),b=he(i,f),_=h.useRef(c);return h.useEffect(()=>{const v=s==null?void 0:s.form;if(v){const x=()=>d(_.current);return v.addEventListener("reset",x),()=>v.removeEventListener("reset",x)}},[s,d]),g.jsx(Sm.button,{type:"button",role:"checkbox","aria-checked":Nr(c)?"mixed":c,"aria-required":u,"data-state":f_(c),"data-disabled":l?"":void 0,disabled:l,value:a,...o,ref:b,onKeyDown:ne(n,v=>{v.key==="Enter"&&v.preventDefault()}),onClick:ne(r,v=>{d(x=>Nr(x)?!0:!x),y&&m&&(p.current=v.isPropagationStopped(),p.current||v.stopPropagation())})})});a_.displayName=s_;var Em=h.forwardRef((e,n)=>{const{__scopeCheckbox:r,name:o,checked:i,defaultChecked:s,required:a,disabled:l,value:c,onCheckedChange:u,form:f,...d}=e;return g.jsx(o5,{__scopeCheckbox:r,checked:i,defaultChecked:s,disabled:l,required:a,onCheckedChange:u,name:o,form:f,value:c,internal_do_not_use_render:({isFormControl:p})=>g.jsxs(g.Fragment,{children:[g.jsx(a_,{...d,ref:n,__scopeCheckbox:r}),p&&g.jsx(d_,{__scopeCheckbox:r})]})})});Em.displayName=Nu;var l_="CheckboxIndicator",c_=h.forwardRef((e,n)=>{const{__scopeCheckbox:r,forceMount:o,...i}=e,s=Cm(l_,r);return g.jsx(yt,{present:o||Nr(s.checked)||s.checked===!0,children:g.jsx(Sm.span,{"data-state":f_(s.checked),"data-disabled":s.disabled?"":void 0,...i,ref:n,style:{pointerEvents:"none",...e.style}})})});c_.displayName=l_;var u_="CheckboxBubbleInput",d_=h.forwardRef(({__scopeCheckbox:e,...n},r)=>{const{control:o,hasConsumerStoppedPropagationRef:i,checked:s,defaultChecked:a,required:l,disabled:c,name:u,value:f,form:d,bubbleInput:p,setBubbleInput:m}=Cm(u_,e),y=he(r,m),b=bm(s),_=_m(o);h.useEffect(()=>{const x=p;if(!x)return;const w=window.HTMLInputElement.prototype,C=Object.getOwnPropertyDescriptor(w,"checked").set,E=!i.current;if(b!==s&&C){const k=new Event("click",{bubbles:E});x.indeterminate=Nr(s),C.call(x,Nr(s)?!1:s),x.dispatchEvent(k)}},[p,b,s,i]);const v=h.useRef(Nr(s)?!1:s);return g.jsx(Sm.input,{type:"checkbox","aria-hidden":!0,defaultChecked:a??v.current,required:l,disabled:c,name:u,value:f,form:d,...n,tabIndex:-1,ref:y,style:{...n.style,..._,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});d_.displayName=u_;function i5(e){return typeof e=="function"}function Nr(e){return e==="indeterminate"}function f_(e){return Nr(e)?"indeterminate":e?"checked":"unchecked"}const s5=h.forwardRef(({className:e,...n},r)=>g.jsx(Em,{ref:r,className:se("grid place-content-center peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...n,children:g.jsx(c_,{className:se("grid place-content-center text-current"),children:g.jsx(ym,{className:"h-4 w-4"})})}));s5.displayName=Em.displayName;var a5=lu[" useId ".trim().toString()]||(()=>{}),l5=0;function kt(e){const[n,r]=h.useState(a5());return He(()=>{r(o=>o??String(l5++))},[e]),n?`radix-${n}`:""}var Cv=1,c5=.9,u5=.8,d5=.17,Xd=.1,Kd=.999,f5=.9999,p5=.99,h5=/[\\\/_+.#"@\[\(\{&]/,m5=/[\\\/_+.#"@\[\(\{&]/g,g5=/[\s-]/,p_=/[\s-]/g;function Sp(e,n,r,o,i,s,a){if(s===n.length)return i===e.length?Cv:p5;var l=`${i},${s}`;if(a[l]!==void 0)return a[l];for(var c=o.charAt(s),u=r.indexOf(c,i),f=0,d,p,m,y;u>=0;)d=Sp(e,n,r,o,u+1,s+1,a),d>f&&(u===i?d*=Cv:h5.test(e.charAt(u-1))?(d*=u5,m=e.slice(i,u-1).match(m5),m&&i>0&&(d*=Math.pow(Kd,m.length))):g5.test(e.charAt(u-1))?(d*=c5,y=e.slice(i,u-1).match(p_),y&&i>0&&(d*=Math.pow(Kd,y.length))):(d*=d5,i>0&&(d*=Math.pow(Kd,u-i))),e.charAt(u)!==n.charAt(s)&&(d*=f5)),(d<Xd&&r.charAt(u-1)===o.charAt(s+1)||o.charAt(s+1)===o.charAt(s)&&r.charAt(u-1)!==o.charAt(s))&&(p=Sp(e,n,r,o,u+1,s+2,a),p*Xd>d&&(d=p*Xd)),d>f&&(f=d),u=r.indexOf(c,u+1);return a[l]=f,f}function Ev(e){return e.toLowerCase().replace(p_," ")}function y5(e,n,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,Sp(e,n,Ev(e),Ev(n),0,0,{})}function v5(e,n){const r=h.createContext(n),o=s=>{const{children:a,...l}=s,c=h.useMemo(()=>l,Object.values(l));return g.jsx(r.Provider,{value:c,children:a})};o.displayName=e+"Provider";function i(s){const a=h.useContext(r);if(a)return a;if(n!==void 0)return n;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[o,i]}function x5(e,n=[]){let r=[];function o(s,a){const l=h.createContext(a),c=r.length;r=[...r,a];const u=d=>{var v;const{scope:p,children:m,...y}=d,b=((v=p==null?void 0:p[e])==null?void 0:v[c])||l,_=h.useMemo(()=>y,Object.values(y));return g.jsx(b.Provider,{value:_,children:m})};u.displayName=s+"Provider";function f(d,p){var b;const m=((b=p==null?void 0:p[e])==null?void 0:b[c])||l,y=h.useContext(m);if(y)return y;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[u,f]}const i=()=>{const s=r.map(a=>h.createContext(a));return function(l){const c=(l==null?void 0:l[e])||s;return h.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[o,w5(i,...n)]}function w5(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=o.reduce((l,{useScope:c,scopeName:u})=>{const d=c(s)[`__scope${u}`];return{...l,...d}},{});return h.useMemo(()=>({[`__scope${n.scopeName}`]:a}),[a])}};return r.scopeName=n.scopeName,r}function b5(e){const n=_5(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(C5);if(c){const u=c.props.children,f=l.map(d=>d===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:d);return g.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,f):null})}return g.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function _5(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=k5(i),l=E5(s,i.props);return i.type!==h.Fragment&&(l.ref=o?Se(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var S5=Symbol("radix.slottable");function C5(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===S5}function E5(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function k5(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var N5=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],h_=N5.reduce((e,n)=>{const r=b5(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{});function P5(e,n){e&&_o.flushSync(()=>e.dispatchEvent(n))}function M5(e,n=globalThis==null?void 0:globalThis.document){const r=Sn(e);h.useEffect(()=>{const o=i=>{i.key==="Escape"&&r(i)};return n.addEventListener("keydown",o,{capture:!0}),()=>n.removeEventListener("keydown",o,{capture:!0})},[r,n])}var R5="DismissableLayer",Cp="dismissableLayer.update",j5="dismissableLayer.pointerDownOutside",A5="dismissableLayer.focusOutside",kv,m_=h.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),$i=h.forwardRef((e,n)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:a,onDismiss:l,...c}=e,u=h.useContext(m_),[f,d]=h.useState(null),p=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=h.useState({}),y=he(n,k=>d(k)),b=Array.from(u.layers),[_]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=b.indexOf(_),x=f?b.indexOf(f):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,S=x>=v,C=$5(k=>{const N=k.target,M=[...u.branches].some(T=>T.contains(N));!S||M||(i==null||i(k),a==null||a(k),k.defaultPrevented||l==null||l())},p),E=O5(k=>{const N=k.target;[...u.branches].some(T=>T.contains(N))||(s==null||s(k),a==null||a(k),k.defaultPrevented||l==null||l())},p);return M5(k=>{x===u.layers.size-1&&(o==null||o(k),!k.defaultPrevented&&l&&(k.preventDefault(),l()))},p),h.useEffect(()=>{if(f)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(kv=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),Nv(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=kv)}},[f,p,r,u]),h.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),Nv())},[f,u]),h.useEffect(()=>{const k=()=>m({});return document.addEventListener(Cp,k),()=>document.removeEventListener(Cp,k)},[]),g.jsx(h_.div,{...c,ref:y,style:{pointerEvents:w?S?"auto":"none":void 0,...e.style},onFocusCapture:ne(e.onFocusCapture,E.onFocusCapture),onBlurCapture:ne(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:ne(e.onPointerDownCapture,C.onPointerDownCapture)})});$i.displayName=R5;var T5="DismissableLayerBranch",I5=h.forwardRef((e,n)=>{const r=h.useContext(m_),o=h.useRef(null),i=he(n,o);return h.useEffect(()=>{const s=o.current;if(s)return r.branches.add(s),()=>{r.branches.delete(s)}},[r.branches]),g.jsx(h_.div,{...e,ref:i})});I5.displayName=T5;function $5(e,n=globalThis==null?void 0:globalThis.document){const r=Sn(e),o=h.useRef(!1),i=h.useRef(()=>{});return h.useEffect(()=>{const s=l=>{if(l.target&&!o.current){let c=function(){g_(j5,r,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(n.removeEventListener("click",i.current),i.current=c,n.addEventListener("click",i.current,{once:!0})):c()}else n.removeEventListener("click",i.current);o.current=!1},a=window.setTimeout(()=>{n.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),n.removeEventListener("pointerdown",s),n.removeEventListener("click",i.current)}},[n,r]),{onPointerDownCapture:()=>o.current=!0}}function O5(e,n=globalThis==null?void 0:globalThis.document){const r=Sn(e),o=h.useRef(!1);return h.useEffect(()=>{const i=s=>{s.target&&!o.current&&g_(A5,r,{originalEvent:s},{discrete:!1})};return n.addEventListener("focusin",i),()=>n.removeEventListener("focusin",i)},[n,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Nv(){const e=new CustomEvent(Cp);document.dispatchEvent(e)}function g_(e,n,r,{discrete:o}){const i=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});n&&i.addEventListener(e,n,{once:!0}),o?P5(i,s):i.dispatchEvent(s)}function D5(e){const n=L5(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(F5);if(c){const u=c.props.children,f=l.map(d=>d===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:d);return g.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,f):null})}return g.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function L5(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=B5(i),l=V5(s,i.props);return i.type!==h.Fragment&&(l.ref=o?Se(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var z5=Symbol("radix.slottable");function F5(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===z5}function V5(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function B5(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var H5=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],W5=H5.reduce((e,n)=>{const r=D5(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{}),qd="focusScope.autoFocusOnMount",Zd="focusScope.autoFocusOnUnmount",Pv={bubbles:!1,cancelable:!0},U5="FocusScope",ba=h.forwardRef((e,n)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...a}=e,[l,c]=h.useState(null),u=Sn(i),f=Sn(s),d=h.useRef(null),p=he(n,b=>c(b)),m=h.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;h.useEffect(()=>{if(o){let b=function(w){if(m.paused||!l)return;const S=w.target;l.contains(S)?d.current=S:lr(d.current,{select:!0})},_=function(w){if(m.paused||!l)return;const S=w.relatedTarget;S!==null&&(l.contains(S)||lr(d.current,{select:!0}))},v=function(w){if(document.activeElement===document.body)for(const C of w)C.removedNodes.length>0&&lr(l)};document.addEventListener("focusin",b),document.addEventListener("focusout",_);const x=new MutationObserver(v);return l&&x.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",b),document.removeEventListener("focusout",_),x.disconnect()}}},[o,l,m.paused]),h.useEffect(()=>{if(l){Rv.add(m);const b=document.activeElement;if(!l.contains(b)){const v=new CustomEvent(qd,Pv);l.addEventListener(qd,u),l.dispatchEvent(v),v.defaultPrevented||(G5(Z5(y_(l)),{select:!0}),document.activeElement===b&&lr(l))}return()=>{l.removeEventListener(qd,u),setTimeout(()=>{const v=new CustomEvent(Zd,Pv);l.addEventListener(Zd,f),l.dispatchEvent(v),v.defaultPrevented||lr(b??document.body,{select:!0}),l.removeEventListener(Zd,f),Rv.remove(m)},0)}}},[l,u,f,m]);const y=h.useCallback(b=>{if(!r&&!o||m.paused)return;const _=b.key==="Tab"&&!b.altKey&&!b.ctrlKey&&!b.metaKey,v=document.activeElement;if(_&&v){const x=b.currentTarget,[w,S]=Y5(x);w&&S?!b.shiftKey&&v===S?(b.preventDefault(),r&&lr(w,{select:!0})):b.shiftKey&&v===w&&(b.preventDefault(),r&&lr(S,{select:!0})):v===x&&b.preventDefault()}},[r,o,m.paused]);return g.jsx(W5.div,{tabIndex:-1,...a,ref:p,onKeyDown:y})});ba.displayName=U5;function G5(e,{select:n=!1}={}){const r=document.activeElement;for(const o of e)if(lr(o,{select:n}),document.activeElement!==r)return}function Y5(e){const n=y_(e),r=Mv(n,e),o=Mv(n.reverse(),e);return[r,o]}function y_(e){const n=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const i=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||i?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)n.push(r.currentNode);return n}function Mv(e,n){for(const r of e)if(!X5(r,{upTo:n}))return r}function X5(e,{upTo:n}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(n!==void 0&&e===n)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function K5(e){return e instanceof HTMLInputElement&&"select"in e}function lr(e,{select:n=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&K5(e)&&n&&e.select()}}var Rv=q5();function q5(){let e=[];return{add(n){const r=e[0];n!==r&&(r==null||r.pause()),e=jv(e,n),e.unshift(n)},remove(n){var r;e=jv(e,n),(r=e[0])==null||r.resume()}}}function jv(e,n){const r=[...e],o=r.indexOf(n);return o!==-1&&r.splice(o,1),r}function Z5(e){return e.filter(n=>n.tagName!=="A")}function Q5(e){const n=J5(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(tI);if(c){const u=c.props.children,f=l.map(d=>d===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:d);return g.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,f):null})}return g.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function J5(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=rI(i),l=nI(s,i.props);return i.type!==h.Fragment&&(l.ref=o?Se(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var eI=Symbol("radix.slottable");function tI(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===eI}function nI(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function rI(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var oI=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],iI=oI.reduce((e,n)=>{const r=Q5(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{}),sI="Portal",Oi=h.forwardRef((e,n)=>{var l;const{container:r,...o}=e,[i,s]=h.useState(!1);He(()=>s(!0),[]);const a=r||i&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return a?ZR.createPortal(g.jsx(iI.div,{...o,ref:n}),a):null});Oi.displayName=sI;function v_(e){const n=aI(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(cI);if(c){const u=c.props.children,f=l.map(d=>d===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:d);return g.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,f):null})}return g.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function aI(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=dI(i),l=uI(s,i.props);return i.type!==h.Fragment&&(l.ref=o?Se(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var lI=Symbol("radix.slottable");function cI(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===lI}function uI(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function dI(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var fI=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],_a=fI.reduce((e,n)=>{const r=v_(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{}),Qd=0;function Pu(){h.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Av()),document.body.insertAdjacentElement("beforeend",e[1]??Av()),Qd++,()=>{Qd===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),Qd--}},[])}function Av(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var gn=function(){return gn=Object.assign||function(n){for(var r,o=1,i=arguments.length;o<i;o++){r=arguments[o];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(n[s]=r[s])}return n},gn.apply(this,arguments)};function x_(e,n){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(e);i<o.length;i++)n.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(r[o[i]]=e[o[i]]);return r}function pI(e,n,r){if(r||arguments.length===2)for(var o=0,i=n.length,s;o<i;o++)(s||!(o in n))&&(s||(s=Array.prototype.slice.call(n,0,o)),s[o]=n[o]);return e.concat(s||Array.prototype.slice.call(n))}var Wl="right-scroll-bar-position",Ul="width-before-scroll-bar",hI="with-scroll-bars-hidden",mI="--removed-body-scroll-bar-size";function Jd(e,n){return typeof e=="function"?e(n):e&&(e.current=n),e}function gI(e,n){var r=h.useState(function(){return{value:e,callback:n,facade:{get current(){return r.value},set current(o){var i=r.value;i!==o&&(r.value=o,r.callback(o,i))}}}})[0];return r.callback=n,r.facade}var yI=typeof window<"u"?h.useLayoutEffect:h.useEffect,Tv=new WeakMap;function vI(e,n){var r=gI(null,function(o){return e.forEach(function(i){return Jd(i,o)})});return yI(function(){var o=Tv.get(r);if(o){var i=new Set(o),s=new Set(e),a=r.current;i.forEach(function(l){s.has(l)||Jd(l,null)}),s.forEach(function(l){i.has(l)||Jd(l,a)})}Tv.set(r,e)},[e]),r}function xI(e){return e}function wI(e,n){n===void 0&&(n=xI);var r=[],o=!1,i={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(s){var a=n(s,o);return r.push(a),function(){r=r.filter(function(l){return l!==a})}},assignSyncMedium:function(s){for(o=!0;r.length;){var a=r;r=[],a.forEach(s)}r={push:function(l){return s(l)},filter:function(){return r}}},assignMedium:function(s){o=!0;var a=[];if(r.length){var l=r;r=[],l.forEach(s),a=r}var c=function(){var f=a;a=[],f.forEach(s)},u=function(){return Promise.resolve().then(c)};u(),r={push:function(f){a.push(f),u()},filter:function(f){return a=a.filter(f),r}}}};return i}function bI(e){e===void 0&&(e={});var n=wI(null);return n.options=gn({async:!0,ssr:!1},e),n}var w_=function(e){var n=e.sideCar,r=x_(e,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=n.read();if(!o)throw new Error("Sidecar medium not found");return h.createElement(o,gn({},r))};w_.isSideCarExport=!0;function _I(e,n){return e.useMedium(n),w_}var b_=bI(),ef=function(){},Mu=h.forwardRef(function(e,n){var r=h.useRef(null),o=h.useState({onScrollCapture:ef,onWheelCapture:ef,onTouchMoveCapture:ef}),i=o[0],s=o[1],a=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,f=e.enabled,d=e.shards,p=e.sideCar,m=e.noRelative,y=e.noIsolation,b=e.inert,_=e.allowPinchZoom,v=e.as,x=v===void 0?"div":v,w=e.gapMode,S=x_(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=p,E=vI([r,n]),k=gn(gn({},S),i);return h.createElement(h.Fragment,null,f&&h.createElement(C,{sideCar:b_,removeScrollBar:u,shards:d,noRelative:m,noIsolation:y,inert:b,setCallbacks:s,allowPinchZoom:!!_,lockRef:r,gapMode:w}),a?h.cloneElement(h.Children.only(l),gn(gn({},k),{ref:E})):h.createElement(x,gn({},k,{className:c,ref:E}),l))});Mu.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Mu.classNames={fullWidth:Ul,zeroRight:Wl};var SI=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function CI(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var n=SI();return n&&e.setAttribute("nonce",n),e}function EI(e,n){e.styleSheet?e.styleSheet.cssText=n:e.appendChild(document.createTextNode(n))}function kI(e){var n=document.head||document.getElementsByTagName("head")[0];n.appendChild(e)}var NI=function(){var e=0,n=null;return{add:function(r){e==0&&(n=CI())&&(EI(n,r),kI(n)),e++},remove:function(){e--,!e&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},PI=function(){var e=NI();return function(n,r){h.useEffect(function(){return e.add(n),function(){e.remove()}},[n&&r])}},__=function(){var e=PI(),n=function(r){var o=r.styles,i=r.dynamic;return e(o,i),null};return n},MI={left:0,top:0,right:0,gap:0},tf=function(e){return parseInt(e||"",10)||0},RI=function(e){var n=window.getComputedStyle(document.body),r=n[e==="padding"?"paddingLeft":"marginLeft"],o=n[e==="padding"?"paddingTop":"marginTop"],i=n[e==="padding"?"paddingRight":"marginRight"];return[tf(r),tf(o),tf(i)]},jI=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return MI;var n=RI(e),r=document.documentElement.clientWidth,o=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,o-r+n[2]-n[0])}},AI=__(),ii="data-scroll-locked",TI=function(e,n,r,o){var i=e.left,s=e.top,a=e.right,l=e.gap;return r===void 0&&(r="margin"),`
296
- .`.concat(hI,` {
297
- overflow: hidden `).concat(o,`;
298
- padding-right: `).concat(l,"px ").concat(o,`;
299
- }
300
- body[`).concat(ii,`] {
301
- overflow: hidden `).concat(o,`;
302
- overscroll-behavior: contain;
303
- `).concat([n&&"position: relative ".concat(o,";"),r==="margin"&&`
304
- padding-left: `.concat(i,`px;
305
- padding-top: `).concat(s,`px;
306
- padding-right: `).concat(a,`px;
307
- margin-left:0;
308
- margin-top:0;
309
- margin-right: `).concat(l,"px ").concat(o,`;
310
- `),r==="padding"&&"padding-right: ".concat(l,"px ").concat(o,";")].filter(Boolean).join(""),`
311
- }
312
-
313
- .`).concat(Wl,` {
314
- right: `).concat(l,"px ").concat(o,`;
315
- }
316
-
317
- .`).concat(Ul,` {
318
- margin-right: `).concat(l,"px ").concat(o,`;
319
- }
320
-
321
- .`).concat(Wl," .").concat(Wl,` {
322
- right: 0 `).concat(o,`;
323
- }
324
-
325
- .`).concat(Ul," .").concat(Ul,` {
326
- margin-right: 0 `).concat(o,`;
327
- }
328
-
329
- body[`).concat(ii,`] {
330
- `).concat(mI,": ").concat(l,`px;
331
- }
332
- `)},Iv=function(){var e=parseInt(document.body.getAttribute(ii)||"0",10);return isFinite(e)?e:0},II=function(){h.useEffect(function(){return document.body.setAttribute(ii,(Iv()+1).toString()),function(){var e=Iv()-1;e<=0?document.body.removeAttribute(ii):document.body.setAttribute(ii,e.toString())}},[])},$I=function(e){var n=e.noRelative,r=e.noImportant,o=e.gapMode,i=o===void 0?"margin":o;II();var s=h.useMemo(function(){return jI(i)},[i]);return h.createElement(AI,{styles:TI(s,!n,i,r?"":"!important")})},Ep=!1;if(typeof window<"u")try{var cl=Object.defineProperty({},"passive",{get:function(){return Ep=!0,!0}});window.addEventListener("test",cl,cl),window.removeEventListener("test",cl,cl)}catch{Ep=!1}var Po=Ep?{passive:!1}:!1,OI=function(e){return e.tagName==="TEXTAREA"},S_=function(e,n){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[n]!=="hidden"&&!(r.overflowY===r.overflowX&&!OI(e)&&r[n]==="visible")},DI=function(e){return S_(e,"overflowY")},LI=function(e){return S_(e,"overflowX")},$v=function(e,n){var r=n.ownerDocument,o=n;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var i=C_(e,o);if(i){var s=E_(e,o),a=s[1],l=s[2];if(a>l)return!0}o=o.parentNode}while(o&&o!==r.body);return!1},zI=function(e){var n=e.scrollTop,r=e.scrollHeight,o=e.clientHeight;return[n,r,o]},FI=function(e){var n=e.scrollLeft,r=e.scrollWidth,o=e.clientWidth;return[n,r,o]},C_=function(e,n){return e==="v"?DI(n):LI(n)},E_=function(e,n){return e==="v"?zI(n):FI(n)},VI=function(e,n){return e==="h"&&n==="rtl"?-1:1},BI=function(e,n,r,o,i){var s=VI(e,window.getComputedStyle(n).direction),a=s*o,l=r.target,c=n.contains(l),u=!1,f=a>0,d=0,p=0;do{if(!l)break;var m=E_(e,l),y=m[0],b=m[1],_=m[2],v=b-_-s*y;(y||v)&&C_(e,l)&&(d+=v,p+=y);var x=l.parentNode;l=x&&x.nodeType===Node.DOCUMENT_FRAGMENT_NODE?x.host:x}while(!c&&l!==document.body||c&&(n.contains(l)||n===l));return(f&&Math.abs(d)<1||!f&&Math.abs(p)<1)&&(u=!0),u},ul=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ov=function(e){return[e.deltaX,e.deltaY]},Dv=function(e){return e&&"current"in e?e.current:e},HI=function(e,n){return e[0]===n[0]&&e[1]===n[1]},WI=function(e){return`
333
- .block-interactivity-`.concat(e,` {pointer-events: none;}
334
- .allow-interactivity-`).concat(e,` {pointer-events: all;}
335
- `)},UI=0,Mo=[];function GI(e){var n=h.useRef([]),r=h.useRef([0,0]),o=h.useRef(),i=h.useState(UI++)[0],s=h.useState(__)[0],a=h.useRef(e);h.useEffect(function(){a.current=e},[e]),h.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var b=pI([e.lockRef.current],(e.shards||[]).map(Dv),!0).filter(Boolean);return b.forEach(function(_){return _.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),b.forEach(function(_){return _.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var l=h.useCallback(function(b,_){if("touches"in b&&b.touches.length===2||b.type==="wheel"&&b.ctrlKey)return!a.current.allowPinchZoom;var v=ul(b),x=r.current,w="deltaX"in b?b.deltaX:x[0]-v[0],S="deltaY"in b?b.deltaY:x[1]-v[1],C,E=b.target,k=Math.abs(w)>Math.abs(S)?"h":"v";if("touches"in b&&k==="h"&&E.type==="range")return!1;var N=window.getSelection(),M=N&&N.anchorNode,T=M?M===E||M.contains(E):!1;if(T)return!1;var A=$v(k,E);if(!A)return!0;if(A?C=k:(C=k==="v"?"h":"v",A=$v(k,E)),!A)return!1;if(!o.current&&"changedTouches"in b&&(w||S)&&(o.current=C),!C)return!0;var D=o.current||C;return BI(D,_,b,D==="h"?w:S)},[]),c=h.useCallback(function(b){var _=b;if(!(!Mo.length||Mo[Mo.length-1]!==s)){var v="deltaY"in _?Ov(_):ul(_),x=n.current.filter(function(C){return C.name===_.type&&(C.target===_.target||_.target===C.shadowParent)&&HI(C.delta,v)})[0];if(x&&x.should){_.cancelable&&_.preventDefault();return}if(!x){var w=(a.current.shards||[]).map(Dv).filter(Boolean).filter(function(C){return C.contains(_.target)}),S=w.length>0?l(_,w[0]):!a.current.noIsolation;S&&_.cancelable&&_.preventDefault()}}},[]),u=h.useCallback(function(b,_,v,x){var w={name:b,delta:_,target:v,should:x,shadowParent:YI(v)};n.current.push(w),setTimeout(function(){n.current=n.current.filter(function(S){return S!==w})},1)},[]),f=h.useCallback(function(b){r.current=ul(b),o.current=void 0},[]),d=h.useCallback(function(b){u(b.type,Ov(b),b.target,l(b,e.lockRef.current))},[]),p=h.useCallback(function(b){u(b.type,ul(b),b.target,l(b,e.lockRef.current))},[]);h.useEffect(function(){return Mo.push(s),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",c,Po),document.addEventListener("touchmove",c,Po),document.addEventListener("touchstart",f,Po),function(){Mo=Mo.filter(function(b){return b!==s}),document.removeEventListener("wheel",c,Po),document.removeEventListener("touchmove",c,Po),document.removeEventListener("touchstart",f,Po)}},[]);var m=e.removeScrollBar,y=e.inert;return h.createElement(h.Fragment,null,y?h.createElement(s,{styles:WI(i)}):null,m?h.createElement($I,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function YI(e){for(var n=null;e!==null;)e instanceof ShadowRoot&&(n=e.host,e=e.host),e=e.parentNode;return n}const XI=_I(b_,GI);var Sa=h.forwardRef(function(e,n){return h.createElement(Mu,gn({},e,{ref:n,sideCar:XI}))});Sa.classNames=Mu.classNames;var KI=function(e){if(typeof document>"u")return null;var n=Array.isArray(e)?e[0]:e;return n.ownerDocument.body},Ro=new WeakMap,dl=new WeakMap,fl={},nf=0,k_=function(e){return e&&(e.host||k_(e.parentNode))},qI=function(e,n){return n.map(function(r){if(e.contains(r))return r;var o=k_(r);return o&&e.contains(o)?o:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},ZI=function(e,n,r,o){var i=qI(n,Array.isArray(e)?e:[e]);fl[r]||(fl[r]=new WeakMap);var s=fl[r],a=[],l=new Set,c=new Set(i),u=function(d){!d||l.has(d)||(l.add(d),u(d.parentNode))};i.forEach(u);var f=function(d){!d||c.has(d)||Array.prototype.forEach.call(d.children,function(p){if(l.has(p))f(p);else try{var m=p.getAttribute(o),y=m!==null&&m!=="false",b=(Ro.get(p)||0)+1,_=(s.get(p)||0)+1;Ro.set(p,b),s.set(p,_),a.push(p),b===1&&y&&dl.set(p,!0),_===1&&p.setAttribute(r,"true"),y||p.setAttribute(o,"true")}catch(v){console.error("aria-hidden: cannot operate on ",p,v)}})};return f(n),l.clear(),nf++,function(){a.forEach(function(d){var p=Ro.get(d)-1,m=s.get(d)-1;Ro.set(d,p),s.set(d,m),p||(dl.has(d)||d.removeAttribute(o),dl.delete(d)),m||d.removeAttribute(r)}),nf--,nf||(Ro=new WeakMap,Ro=new WeakMap,dl=new WeakMap,fl={})}},Ru=function(e,n,r){r===void 0&&(r="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),i=KI(e);return i?(o.push.apply(o,Array.from(i.querySelectorAll("[aria-live], script"))),ZI(o,i,r,"aria-hidden")):function(){return null}},ju="Dialog",[N_]=x5(ju),[QI,cn]=N_(ju),P_=e=>{const{__scopeDialog:n,children:r,open:o,defaultOpen:i,onOpenChange:s,modal:a=!0}=e,l=h.useRef(null),c=h.useRef(null),[u,f]=wa({prop:o,defaultProp:i??!1,onChange:s,caller:ju});return g.jsx(QI,{scope:n,triggerRef:l,contentRef:c,contentId:kt(),titleId:kt(),descriptionId:kt(),open:u,onOpenChange:f,onOpenToggle:h.useCallback(()=>f(d=>!d),[f]),modal:a,children:r})};P_.displayName=ju;var M_="DialogTrigger",JI=h.forwardRef((e,n)=>{const{__scopeDialog:r,...o}=e,i=cn(M_,r),s=he(n,i.triggerRef);return g.jsx(_a.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Pm(i.open),...o,ref:s,onClick:ne(e.onClick,i.onOpenToggle)})});JI.displayName=M_;var km="DialogPortal",[e$,R_]=N_(km,{forceMount:void 0}),j_=e=>{const{__scopeDialog:n,forceMount:r,children:o,container:i}=e,s=cn(km,n);return g.jsx(e$,{scope:n,forceMount:r,children:h.Children.map(o,a=>g.jsx(yt,{present:r||s.open,children:g.jsx(Oi,{asChild:!0,container:i,children:a})}))})};j_.displayName=km;var Rc="DialogOverlay",A_=h.forwardRef((e,n)=>{const r=R_(Rc,e.__scopeDialog),{forceMount:o=r.forceMount,...i}=e,s=cn(Rc,e.__scopeDialog);return s.modal?g.jsx(yt,{present:o||s.open,children:g.jsx(n$,{...i,ref:n})}):null});A_.displayName=Rc;var t$=v_("DialogOverlay.RemoveScroll"),n$=h.forwardRef((e,n)=>{const{__scopeDialog:r,...o}=e,i=cn(Rc,r);return g.jsx(Sa,{as:t$,allowPinchZoom:!0,shards:[i.contentRef],children:g.jsx(_a.div,{"data-state":Pm(i.open),...o,ref:n,style:{pointerEvents:"auto",...o.style}})})}),fo="DialogContent",T_=h.forwardRef((e,n)=>{const r=R_(fo,e.__scopeDialog),{forceMount:o=r.forceMount,...i}=e,s=cn(fo,e.__scopeDialog);return g.jsx(yt,{present:o||s.open,children:s.modal?g.jsx(r$,{...i,ref:n}):g.jsx(o$,{...i,ref:n})})});T_.displayName=fo;var r$=h.forwardRef((e,n)=>{const r=cn(fo,e.__scopeDialog),o=h.useRef(null),i=he(n,r.contentRef,o);return h.useEffect(()=>{const s=o.current;if(s)return Ru(s)},[]),g.jsx(I_,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ne(e.onCloseAutoFocus,s=>{var a;s.preventDefault(),(a=r.triggerRef.current)==null||a.focus()}),onPointerDownOutside:ne(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,l=a.button===0&&a.ctrlKey===!0;(a.button===2||l)&&s.preventDefault()}),onFocusOutside:ne(e.onFocusOutside,s=>s.preventDefault())})}),o$=h.forwardRef((e,n)=>{const r=cn(fo,e.__scopeDialog),o=h.useRef(!1),i=h.useRef(!1);return g.jsx(I_,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var a,l;(a=e.onCloseAutoFocus)==null||a.call(e,s),s.defaultPrevented||(o.current||(l=r.triggerRef.current)==null||l.focus(),s.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:s=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,s),s.defaultPrevented||(o.current=!0,s.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const a=s.target;((u=r.triggerRef.current)==null?void 0:u.contains(a))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}})}),I_=h.forwardRef((e,n)=>{const{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:s,...a}=e,l=cn(fo,r),c=h.useRef(null),u=he(n,c);return Pu(),g.jsxs(g.Fragment,{children:[g.jsx(ba,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:s,children:g.jsx($i,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":Pm(l.open),...a,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),g.jsxs(g.Fragment,{children:[g.jsx(i$,{titleId:l.titleId}),g.jsx(a$,{contentRef:c,descriptionId:l.descriptionId})]})]})}),Nm="DialogTitle",$_=h.forwardRef((e,n)=>{const{__scopeDialog:r,...o}=e,i=cn(Nm,r);return g.jsx(_a.h2,{id:i.titleId,...o,ref:n})});$_.displayName=Nm;var O_="DialogDescription",D_=h.forwardRef((e,n)=>{const{__scopeDialog:r,...o}=e,i=cn(O_,r);return g.jsx(_a.p,{id:i.descriptionId,...o,ref:n})});D_.displayName=O_;var L_="DialogClose",z_=h.forwardRef((e,n)=>{const{__scopeDialog:r,...o}=e,i=cn(L_,r);return g.jsx(_a.button,{type:"button",...o,ref:n,onClick:ne(e.onClick,()=>i.onOpenChange(!1))})});z_.displayName=L_;function Pm(e){return e?"open":"closed"}var F_="DialogTitleWarning",[dK,V_]=v5(F_,{contentName:fo,titleName:Nm,docsSlug:"dialog"}),i$=({titleId:e})=>{const n=V_(F_),r=`\`${n.contentName}\` requires a \`${n.titleName}\` for the component to be accessible for screen reader users.
336
-
337
- If you want to hide the \`${n.titleName}\`, you can wrap it with our VisuallyHidden component.
338
-
339
- For more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return h.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},s$="DialogDescriptionWarning",a$=({contentRef:e,descriptionId:n})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${V_(s$).contentName}}.`;return h.useEffect(()=>{var s;const i=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");n&&i&&(document.getElementById(n)||console.warn(o))},[o,e,n]),null},l$=P_,Mm=j_,Ca=A_,Ea=T_,Au=$_,Tu=D_,B_=z_,Ji='[cmdk-group=""]',rf='[cmdk-group-items=""]',c$='[cmdk-group-heading=""]',H_='[cmdk-item=""]',Lv=`${H_}:not([aria-disabled="true"])`,kp="cmdk-item-select",Do="data-value",u$=(e,n,r)=>y5(e,n,r),W_=h.createContext(void 0),ka=()=>h.useContext(W_),U_=h.createContext(void 0),Rm=()=>h.useContext(U_),G_=h.createContext(void 0),Y_=h.forwardRef((e,n)=>{let r=Lo(()=>{var $,X;return{search:"",value:(X=($=e.value)!=null?$:e.defaultValue)!=null?X:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),o=Lo(()=>new Set),i=Lo(()=>new Map),s=Lo(()=>new Map),a=Lo(()=>new Set),l=X_(e),{label:c,children:u,value:f,onValueChange:d,filter:p,shouldFilter:m,loop:y,disablePointerSelection:b=!1,vimBindings:_=!0,...v}=e,x=kt(),w=kt(),S=kt(),C=h.useRef(null),E=b$();po(()=>{if(f!==void 0){let $=f.trim();r.current.value=$,k.emit()}},[f]),po(()=>{E(6,V)},[]);let k=h.useMemo(()=>({subscribe:$=>(a.current.add($),()=>a.current.delete($)),snapshot:()=>r.current,setState:($,X,H)=>{var W,z,U,Y;if(!Object.is(r.current[$],X)){if(r.current[$]=X,$==="search")D(),T(),E(1,A);else if($==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let K=document.getElementById(S);K?K.focus():(W=document.getElementById(x))==null||W.focus()}if(E(7,()=>{var K;r.current.selectedItemId=(K=P())==null?void 0:K.id,k.emit()}),H||E(5,V),((z=l.current)==null?void 0:z.value)!==void 0){let K=X??"";(Y=(U=l.current).onValueChange)==null||Y.call(U,K);return}}k.emit()}},emit:()=>{a.current.forEach($=>$())}}),[]),N=h.useMemo(()=>({value:($,X,H)=>{var W;X!==((W=s.current.get($))==null?void 0:W.value)&&(s.current.set($,{value:X,keywords:H}),r.current.filtered.items.set($,M(X,H)),E(2,()=>{T(),k.emit()}))},item:($,X)=>(o.current.add($),X&&(i.current.has(X)?i.current.get(X).add($):i.current.set(X,new Set([$]))),E(3,()=>{D(),T(),r.current.value||A(),k.emit()}),()=>{s.current.delete($),o.current.delete($),r.current.filtered.items.delete($);let H=P();E(4,()=>{D(),(H==null?void 0:H.getAttribute("id"))===$&&A(),k.emit()})}),group:$=>(i.current.has($)||i.current.set($,new Set),()=>{s.current.delete($),i.current.delete($)}),filter:()=>l.current.shouldFilter,label:c||e["aria-label"],getDisablePointerSelection:()=>l.current.disablePointerSelection,listId:x,inputId:S,labelId:w,listInnerRef:C}),[]);function M($,X){var H,W;let z=(W=(H=l.current)==null?void 0:H.filter)!=null?W:u$;return $?z($,r.current.search,X):0}function T(){if(!r.current.search||l.current.shouldFilter===!1)return;let $=r.current.filtered.items,X=[];r.current.filtered.groups.forEach(W=>{let z=i.current.get(W),U=0;z.forEach(Y=>{let K=$.get(Y);U=Math.max(K,U)}),X.push([W,U])});let H=C.current;L().sort((W,z)=>{var U,Y;let K=W.getAttribute("id"),Z=z.getAttribute("id");return((U=$.get(Z))!=null?U:0)-((Y=$.get(K))!=null?Y:0)}).forEach(W=>{let z=W.closest(rf);z?z.appendChild(W.parentElement===z?W:W.closest(`${rf} > *`)):H.appendChild(W.parentElement===H?W:W.closest(`${rf} > *`))}),X.sort((W,z)=>z[1]-W[1]).forEach(W=>{var z;let U=(z=C.current)==null?void 0:z.querySelector(`${Ji}[${Do}="${encodeURIComponent(W[0])}"]`);U==null||U.parentElement.appendChild(U)})}function A(){let $=L().find(H=>H.getAttribute("aria-disabled")!=="true"),X=$==null?void 0:$.getAttribute(Do);k.setState("value",X||void 0)}function D(){var $,X,H,W;if(!r.current.search||l.current.shouldFilter===!1){r.current.filtered.count=o.current.size;return}r.current.filtered.groups=new Set;let z=0;for(let U of o.current){let Y=(X=($=s.current.get(U))==null?void 0:$.value)!=null?X:"",K=(W=(H=s.current.get(U))==null?void 0:H.keywords)!=null?W:[],Z=M(Y,K);r.current.filtered.items.set(U,Z),Z>0&&z++}for(let[U,Y]of i.current)for(let K of Y)if(r.current.filtered.items.get(K)>0){r.current.filtered.groups.add(U);break}r.current.filtered.count=z}function V(){var $,X,H;let W=P();W&&((($=W.parentElement)==null?void 0:$.firstChild)===W&&((H=(X=W.closest(Ji))==null?void 0:X.querySelector(c$))==null||H.scrollIntoView({block:"nearest"})),W.scrollIntoView({block:"nearest"}))}function P(){var $;return($=C.current)==null?void 0:$.querySelector(`${H_}[aria-selected="true"]`)}function L(){var $;return Array.from((($=C.current)==null?void 0:$.querySelectorAll(Lv))||[])}function I($){let X=L()[$];X&&k.setState("value",X.getAttribute(Do))}function F($){var X;let H=P(),W=L(),z=W.findIndex(Y=>Y===H),U=W[z+$];(X=l.current)!=null&&X.loop&&(U=z+$<0?W[W.length-1]:z+$===W.length?W[0]:W[z+$]),U&&k.setState("value",U.getAttribute(Do))}function R($){let X=P(),H=X==null?void 0:X.closest(Ji),W;for(;H&&!W;)H=$>0?x$(H,Ji):w$(H,Ji),W=H==null?void 0:H.querySelector(Lv);W?k.setState("value",W.getAttribute(Do)):F($)}let j=()=>I(L().length-1),O=$=>{$.preventDefault(),$.metaKey?j():$.altKey?R(1):F(1)},G=$=>{$.preventDefault(),$.metaKey?I(0):$.altKey?R(-1):F(-1)};return h.createElement(lt.div,{ref:n,tabIndex:-1,...v,"cmdk-root":"",onKeyDown:$=>{var X;(X=v.onKeyDown)==null||X.call(v,$);let H=$.nativeEvent.isComposing||$.keyCode===229;if(!($.defaultPrevented||H))switch($.key){case"n":case"j":{_&&$.ctrlKey&&O($);break}case"ArrowDown":{O($);break}case"p":case"k":{_&&$.ctrlKey&&G($);break}case"ArrowUp":{G($);break}case"Home":{$.preventDefault(),I(0);break}case"End":{$.preventDefault(),j();break}case"Enter":{$.preventDefault();let W=P();if(W){let z=new Event(kp);W.dispatchEvent(z)}}}}},h.createElement("label",{"cmdk-label":"",htmlFor:N.inputId,id:N.labelId,style:S$},c),Iu(e,$=>h.createElement(U_.Provider,{value:k},h.createElement(W_.Provider,{value:N},$))))}),d$=h.forwardRef((e,n)=>{var r,o;let i=kt(),s=h.useRef(null),a=h.useContext(G_),l=ka(),c=X_(e),u=(o=(r=c.current)==null?void 0:r.forceMount)!=null?o:a==null?void 0:a.forceMount;po(()=>{if(!u)return l.item(i,a==null?void 0:a.id)},[u]);let f=K_(i,s,[e.value,e.children,s],e.keywords),d=Rm(),p=jr(E=>E.value&&E.value===f.current),m=jr(E=>u||l.filter()===!1?!0:E.search?E.filtered.items.get(i)>0:!0);h.useEffect(()=>{let E=s.current;if(!(!E||e.disabled))return E.addEventListener(kp,y),()=>E.removeEventListener(kp,y)},[m,e.onSelect,e.disabled]);function y(){var E,k;b(),(k=(E=c.current).onSelect)==null||k.call(E,f.current)}function b(){d.setState("value",f.current,!0)}if(!m)return null;let{disabled:_,value:v,onSelect:x,forceMount:w,keywords:S,...C}=e;return h.createElement(lt.div,{ref:Se(s,n),...C,id:i,"cmdk-item":"",role:"option","aria-disabled":!!_,"aria-selected":!!p,"data-disabled":!!_,"data-selected":!!p,onPointerMove:_||l.getDisablePointerSelection()?void 0:b,onClick:_?void 0:y},e.children)}),f$=h.forwardRef((e,n)=>{let{heading:r,children:o,forceMount:i,...s}=e,a=kt(),l=h.useRef(null),c=h.useRef(null),u=kt(),f=ka(),d=jr(m=>i||f.filter()===!1?!0:m.search?m.filtered.groups.has(a):!0);po(()=>f.group(a),[]),K_(a,l,[e.value,e.heading,c]);let p=h.useMemo(()=>({id:a,forceMount:i}),[i]);return h.createElement(lt.div,{ref:Se(l,n),...s,"cmdk-group":"",role:"presentation",hidden:d?void 0:!0},r&&h.createElement("div",{ref:c,"cmdk-group-heading":"","aria-hidden":!0,id:u},r),Iu(e,m=>h.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?u:void 0},h.createElement(G_.Provider,{value:p},m))))}),p$=h.forwardRef((e,n)=>{let{alwaysRender:r,...o}=e,i=h.useRef(null),s=jr(a=>!a.search);return!r&&!s?null:h.createElement(lt.div,{ref:Se(i,n),...o,"cmdk-separator":"",role:"separator"})}),h$=h.forwardRef((e,n)=>{let{onValueChange:r,...o}=e,i=e.value!=null,s=Rm(),a=jr(u=>u.search),l=jr(u=>u.selectedItemId),c=ka();return h.useEffect(()=>{e.value!=null&&s.setState("search",e.value)},[e.value]),h.createElement(lt.input,{ref:n,...o,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":l,id:c.inputId,type:"text",value:i?e.value:a,onChange:u=>{i||s.setState("search",u.target.value),r==null||r(u.target.value)}})}),m$=h.forwardRef((e,n)=>{let{children:r,label:o="Suggestions",...i}=e,s=h.useRef(null),a=h.useRef(null),l=jr(u=>u.selectedItemId),c=ka();return h.useEffect(()=>{if(a.current&&s.current){let u=a.current,f=s.current,d,p=new ResizeObserver(()=>{d=requestAnimationFrame(()=>{let m=u.offsetHeight;f.style.setProperty("--cmdk-list-height",m.toFixed(1)+"px")})});return p.observe(u),()=>{cancelAnimationFrame(d),p.unobserve(u)}}},[]),h.createElement(lt.div,{ref:Se(s,n),...i,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":l,"aria-label":o,id:c.listId},Iu(e,u=>h.createElement("div",{ref:Se(a,c.listInnerRef),"cmdk-list-sizer":""},u)))}),g$=h.forwardRef((e,n)=>{let{open:r,onOpenChange:o,overlayClassName:i,contentClassName:s,container:a,...l}=e;return h.createElement(l$,{open:r,onOpenChange:o},h.createElement(Mm,{container:a},h.createElement(Ca,{"cmdk-overlay":"",className:i}),h.createElement(Ea,{"aria-label":e.label,"cmdk-dialog":"",className:s},h.createElement(Y_,{ref:n,...l}))))}),y$=h.forwardRef((e,n)=>jr(r=>r.filtered.count===0)?h.createElement(lt.div,{ref:n,...e,"cmdk-empty":"",role:"presentation"}):null),v$=h.forwardRef((e,n)=>{let{progress:r,children:o,label:i="Loading...",...s}=e;return h.createElement(lt.div,{ref:n,...s,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},Iu(e,a=>h.createElement("div",{"aria-hidden":!0},a)))}),vt=Object.assign(Y_,{List:m$,Item:d$,Input:h$,Group:f$,Separator:p$,Dialog:g$,Empty:y$,Loading:v$});function x$(e,n){let r=e.nextElementSibling;for(;r;){if(r.matches(n))return r;r=r.nextElementSibling}}function w$(e,n){let r=e.previousElementSibling;for(;r;){if(r.matches(n))return r;r=r.previousElementSibling}}function X_(e){let n=h.useRef(e);return po(()=>{n.current=e}),n}var po=typeof window>"u"?h.useEffect:h.useLayoutEffect;function Lo(e){let n=h.useRef();return n.current===void 0&&(n.current=e()),n}function jr(e){let n=Rm(),r=()=>e(n.snapshot());return h.useSyncExternalStore(n.subscribe,r,r)}function K_(e,n,r,o=[]){let i=h.useRef(),s=ka();return po(()=>{var a;let l=(()=>{var u;for(let f of r){if(typeof f=="string")return f.trim();if(typeof f=="object"&&"current"in f)return f.current?(u=f.current.textContent)==null?void 0:u.trim():i.current}})(),c=o.map(u=>u.trim());s.value(e,l,c),(a=n.current)==null||a.setAttribute(Do,l),i.current=l}),i}var b$=()=>{let[e,n]=h.useState(),r=Lo(()=>new Map);return po(()=>{r.current.forEach(o=>o()),r.current=new Map},[e]),(o,i)=>{r.current.set(o,i),n({})}};function _$(e){let n=e.type;return typeof n=="function"?n(e.props):"render"in n?n.render(e.props):e}function Iu({asChild:e,children:n},r){return e&&h.isValidElement(n)?h.cloneElement(_$(n),{ref:n.ref},r(n.props.children)):r(n)}var S$={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const C$=h.forwardRef(({className:e,...n},r)=>g.jsx(vt,{ref:r,className:se("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...n}));C$.displayName=vt.displayName;const E$=h.forwardRef(({className:e,...n},r)=>g.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[g.jsx(yT,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),g.jsx(vt.Input,{ref:r,className:se("flex h-9 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...n})]}));E$.displayName=vt.Input.displayName;const k$=h.forwardRef(({className:e,onWheel:n,...r},o)=>g.jsx(vt.List,{ref:o,className:se("overflow-y-auto overflow-x-hidden",e),style:{maxHeight:300},onWheel:n??(i=>{i.currentTarget.scrollTop+=i.deltaY}),...r}));k$.displayName=vt.List.displayName;const N$=h.forwardRef((e,n)=>g.jsx(vt.Empty,{ref:n,className:"py-6 text-center text-sm",...e}));N$.displayName=vt.Empty.displayName;const P$=h.forwardRef(({className:e,...n},r)=>g.jsx(vt.Group,{ref:r,className:se("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...n}));P$.displayName=vt.Group.displayName;const M$=h.forwardRef(({className:e,...n},r)=>g.jsx(vt.Separator,{ref:r,className:se("-mx-1 h-px bg-border",e),...n}));M$.displayName=vt.Separator.displayName;const R$=h.forwardRef(({className:e,...n},r)=>g.jsx(vt.Item,{ref:r,className:se("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...n}));R$.displayName=vt.Item.displayName;const j$=Mm,q_=h.forwardRef(({className:e,...n},r)=>g.jsx(Ca,{ref:r,className:se("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...n}));q_.displayName=Ca.displayName;const A$=h.forwardRef(({className:e,children:n,...r},o)=>g.jsxs(j$,{children:[g.jsx(q_,{}),g.jsxs(Ea,{ref:o,className:se("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...r,children:[n,g.jsxs(B_,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[g.jsx(Mc,{className:"h-4 w-4"}),g.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));A$.displayName=Ea.displayName;const T$=h.forwardRef(({className:e,...n},r)=>g.jsx(Au,{ref:r,className:se("text-lg font-semibold leading-none tracking-tight",e),...n}));T$.displayName=Au.displayName;const I$=h.forwardRef(({className:e,...n},r)=>g.jsx(Tu,{ref:r,className:se("text-sm text-muted-foreground",e),...n}));I$.displayName=Tu.displayName;function $$(e,n=[]){let r=[];function o(s,a){const l=h.createContext(a),c=r.length;r=[...r,a];const u=d=>{var v;const{scope:p,children:m,...y}=d,b=((v=p==null?void 0:p[e])==null?void 0:v[c])||l,_=h.useMemo(()=>y,Object.values(y));return g.jsx(b.Provider,{value:_,children:m})};u.displayName=s+"Provider";function f(d,p){var b;const m=((b=p==null?void 0:p[e])==null?void 0:b[c])||l,y=h.useContext(m);if(y)return y;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[u,f]}const i=()=>{const s=r.map(a=>h.createContext(a));return function(l){const c=(l==null?void 0:l[e])||s;return h.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[o,O$(i,...n)]}function O$(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=o.reduce((l,{useScope:c,scopeName:u})=>{const d=c(s)[`__scope${u}`];return{...l,...d}},{});return h.useMemo(()=>({[`__scope${n.scopeName}`]:a}),[a])}};return r.scopeName=n.scopeName,r}function D$(e){const n=L$(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(F$);if(c){const u=c.props.children,f=l.map(d=>d===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:d);return g.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,f):null})}return g.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function L$(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=B$(i),l=V$(s,i.props);return i.type!==h.Fragment&&(l.ref=o?Se(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var z$=Symbol("radix.slottable");function F$(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===z$}function V$(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function B$(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var H$=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],W$=H$.reduce((e,n)=>{const r=D$(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{});function U$(e,n=[]){let r=[];function o(s,a){const l=h.createContext(a),c=r.length;r=[...r,a];const u=d=>{var v;const{scope:p,children:m,...y}=d,b=((v=p==null?void 0:p[e])==null?void 0:v[c])||l,_=h.useMemo(()=>y,Object.values(y));return g.jsx(b.Provider,{value:_,children:m})};u.displayName=s+"Provider";function f(d,p){var b;const m=((b=p==null?void 0:p[e])==null?void 0:b[c])||l,y=h.useContext(m);if(y)return y;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[u,f]}const i=()=>{const s=r.map(a=>h.createContext(a));return function(l){const c=(l==null?void 0:l[e])||s;return h.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[o,G$(i,...n)]}function G$(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=o.reduce((l,{useScope:c,scopeName:u})=>{const d=c(s)[`__scope${u}`];return{...l,...d}},{});return h.useMemo(()=>({[`__scope${n.scopeName}`]:a}),[a])}};return r.scopeName=n.scopeName,r}function zv(e){const n=Y$(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(K$);if(c){const u=c.props.children,f=l.map(d=>d===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:d);return g.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,f):null})}return g.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function Y$(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=Z$(i),l=q$(s,i.props);return i.type!==h.Fragment&&(l.ref=o?Se(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var X$=Symbol("radix.slottable");function K$(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===X$}function q$(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function Z$(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function jm(e){const n=e+"CollectionProvider",[r,o]=U$(n),[i,s]=r(n,{collectionRef:{current:null},itemMap:new Map}),a=b=>{const{scope:_,children:v}=b,x=Je.useRef(null),w=Je.useRef(new Map).current;return g.jsx(i,{scope:_,itemMap:w,collectionRef:x,children:v})};a.displayName=n;const l=e+"CollectionSlot",c=zv(l),u=Je.forwardRef((b,_)=>{const{scope:v,children:x}=b,w=s(l,v),S=he(_,w.collectionRef);return g.jsx(c,{ref:S,children:x})});u.displayName=l;const f=e+"CollectionItemSlot",d="data-radix-collection-item",p=zv(f),m=Je.forwardRef((b,_)=>{const{scope:v,children:x,...w}=b,S=Je.useRef(null),C=he(_,S),E=s(f,v);return Je.useEffect(()=>(E.itemMap.set(S,{ref:S,...w}),()=>void E.itemMap.delete(S))),g.jsx(p,{[d]:"",ref:C,children:x})});m.displayName=f;function y(b){const _=s(e+"CollectionConsumer",b);return Je.useCallback(()=>{const x=_.collectionRef.current;if(!x)return[];const w=Array.from(x.querySelectorAll(`[${d}]`));return Array.from(_.itemMap.values()).sort((E,k)=>w.indexOf(E.ref.current)-w.indexOf(k.ref.current))},[_.collectionRef,_.itemMap])}return[{Provider:a,Slot:u,ItemSlot:m},y,o]}function Q$(e,n=[]){let r=[];function o(s,a){const l=h.createContext(a),c=r.length;r=[...r,a];const u=d=>{var v;const{scope:p,children:m,...y}=d,b=((v=p==null?void 0:p[e])==null?void 0:v[c])||l,_=h.useMemo(()=>y,Object.values(y));return g.jsx(b.Provider,{value:_,children:m})};u.displayName=s+"Provider";function f(d,p){var b;const m=((b=p==null?void 0:p[e])==null?void 0:b[c])||l,y=h.useContext(m);if(y)return y;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[u,f]}const i=()=>{const s=r.map(a=>h.createContext(a));return function(l){const c=(l==null?void 0:l[e])||s;return h.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[o,J$(i,...n)]}function J$(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=o.reduce((l,{useScope:c,scopeName:u})=>{const d=c(s)[`__scope${u}`];return{...l,...d}},{});return h.useMemo(()=>({[`__scope${n.scopeName}`]:a}),[a])}};return r.scopeName=n.scopeName,r}var eO=h.createContext(void 0);function Z_(e){const n=h.useContext(eO);return e||n||"ltr"}const tO=["top","right","bottom","left"],Ar=Math.min,St=Math.max,jc=Math.round,pl=Math.floor,bn=e=>({x:e,y:e}),nO={left:"right",right:"left",bottom:"top",top:"bottom"};function Np(e,n,r){return St(e,Ar(n,r))}function Yn(e,n){return typeof e=="function"?e(n):e}function Xn(e){return e.split("-")[0]}function Di(e){return e.split("-")[1]}function Am(e){return e==="x"?"y":"x"}function Tm(e){return e==="y"?"height":"width"}function yn(e){const n=e[0];return n==="t"||n==="b"?"y":"x"}function Im(e){return Am(yn(e))}function rO(e,n,r){r===void 0&&(r=!1);const o=Di(e),i=Im(e),s=Tm(i);let a=i==="x"?o===(r?"end":"start")?"right":"left":o==="start"?"bottom":"top";return n.reference[s]>n.floating[s]&&(a=Ac(a)),[a,Ac(a)]}function oO(e){const n=Ac(e);return[Pp(e),n,Pp(n)]}function Pp(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Fv=["left","right"],Vv=["right","left"],iO=["top","bottom"],sO=["bottom","top"];function aO(e,n,r){switch(e){case"top":case"bottom":return r?n?Vv:Fv:n?Fv:Vv;case"left":case"right":return n?iO:sO;default:return[]}}function lO(e,n,r,o){const i=Di(e);let s=aO(Xn(e),r==="start",o);return i&&(s=s.map(a=>a+"-"+i),n&&(s=s.concat(s.map(Pp)))),s}function Ac(e){const n=Xn(e);return nO[n]+e.slice(n.length)}function cO(e){return{top:0,right:0,bottom:0,left:0,...e}}function Q_(e){return typeof e!="number"?cO(e):{top:e,right:e,bottom:e,left:e}}function Tc(e){const{x:n,y:r,width:o,height:i}=e;return{width:o,height:i,top:r,left:n,right:n+o,bottom:r+i,x:n,y:r}}function Bv(e,n,r){let{reference:o,floating:i}=e;const s=yn(n),a=Im(n),l=Tm(a),c=Xn(n),u=s==="y",f=o.x+o.width/2-i.width/2,d=o.y+o.height/2-i.height/2,p=o[l]/2-i[l]/2;let m;switch(c){case"top":m={x:f,y:o.y-i.height};break;case"bottom":m={x:f,y:o.y+o.height};break;case"right":m={x:o.x+o.width,y:d};break;case"left":m={x:o.x-i.width,y:d};break;default:m={x:o.x,y:o.y}}switch(Di(n)){case"start":m[a]-=p*(r&&u?-1:1);break;case"end":m[a]+=p*(r&&u?-1:1);break}return m}async function uO(e,n){var r;n===void 0&&(n={});const{x:o,y:i,platform:s,rects:a,elements:l,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:p=!1,padding:m=0}=Yn(n,e),y=Q_(m),_=l[p?d==="floating"?"reference":"floating":d],v=Tc(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(_)))==null||r?_:_.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:u,rootBoundary:f,strategy:c})),x=d==="floating"?{x:o,y:i,width:a.floating.width,height:a.floating.height}:a.reference,w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),S=await(s.isElement==null?void 0:s.isElement(w))?await(s.getScale==null?void 0:s.getScale(w))||{x:1,y:1}:{x:1,y:1},C=Tc(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:x,offsetParent:w,strategy:c}):x);return{top:(v.top-C.top+y.top)/S.y,bottom:(C.bottom-v.bottom+y.bottom)/S.y,left:(v.left-C.left+y.left)/S.x,right:(C.right-v.right+y.right)/S.x}}const dO=50,fO=async(e,n,r)=>{const{placement:o="bottom",strategy:i="absolute",middleware:s=[],platform:a}=r,l=a.detectOverflow?a:{...a,detectOverflow:uO},c=await(a.isRTL==null?void 0:a.isRTL(n));let u=await a.getElementRects({reference:e,floating:n,strategy:i}),{x:f,y:d}=Bv(u,o,c),p=o,m=0;const y={};for(let b=0;b<s.length;b++){const _=s[b];if(!_)continue;const{name:v,fn:x}=_,{x:w,y:S,data:C,reset:E}=await x({x:f,y:d,initialPlacement:o,placement:p,strategy:i,middlewareData:y,rects:u,platform:l,elements:{reference:e,floating:n}});f=w??f,d=S??d,y[v]={...y[v],...C},E&&m<dO&&(m++,typeof E=="object"&&(E.placement&&(p=E.placement),E.rects&&(u=E.rects===!0?await a.getElementRects({reference:e,floating:n,strategy:i}):E.rects),{x:f,y:d}=Bv(u,p,c)),b=-1)}return{x:f,y:d,placement:p,strategy:i,middlewareData:y}},pO=e=>({name:"arrow",options:e,async fn(n){const{x:r,y:o,placement:i,rects:s,platform:a,elements:l,middlewareData:c}=n,{element:u,padding:f=0}=Yn(e,n)||{};if(u==null)return{};const d=Q_(f),p={x:r,y:o},m=Im(i),y=Tm(m),b=await a.getDimensions(u),_=m==="y",v=_?"top":"left",x=_?"bottom":"right",w=_?"clientHeight":"clientWidth",S=s.reference[y]+s.reference[m]-p[m]-s.floating[y],C=p[m]-s.reference[m],E=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let k=E?E[w]:0;(!k||!await(a.isElement==null?void 0:a.isElement(E)))&&(k=l.floating[w]||s.floating[y]);const N=S/2-C/2,M=k/2-b[y]/2-1,T=Ar(d[v],M),A=Ar(d[x],M),D=T,V=k-b[y]-A,P=k/2-b[y]/2+N,L=Np(D,P,V),I=!c.arrow&&Di(i)!=null&&P!==L&&s.reference[y]/2-(P<D?T:A)-b[y]/2<0,F=I?P<D?P-D:P-V:0;return{[m]:p[m]+F,data:{[m]:L,centerOffset:P-L-F,...I&&{alignmentOffset:F}},reset:I}}}),hO=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(n){var r,o;const{placement:i,middlewareData:s,rects:a,initialPlacement:l,platform:c,elements:u}=n,{mainAxis:f=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:b=!0,..._}=Yn(e,n);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const v=Xn(i),x=yn(l),w=Xn(l)===l,S=await(c.isRTL==null?void 0:c.isRTL(u.floating)),C=p||(w||!b?[Ac(l)]:oO(l)),E=y!=="none";!p&&E&&C.push(...lO(l,b,y,S));const k=[l,...C],N=await c.detectOverflow(n,_),M=[];let T=((o=s.flip)==null?void 0:o.overflows)||[];if(f&&M.push(N[v]),d){const P=rO(i,a,S);M.push(N[P[0]],N[P[1]])}if(T=[...T,{placement:i,overflows:M}],!M.every(P=>P<=0)){var A,D;const P=(((A=s.flip)==null?void 0:A.index)||0)+1,L=k[P];if(L&&(!(d==="alignment"?x!==yn(L):!1)||T.every(R=>yn(R.placement)===x?R.overflows[0]>0:!0)))return{data:{index:P,overflows:T},reset:{placement:L}};let I=(D=T.filter(F=>F.overflows[0]<=0).sort((F,R)=>F.overflows[1]-R.overflows[1])[0])==null?void 0:D.placement;if(!I)switch(m){case"bestFit":{var V;const F=(V=T.filter(R=>{if(E){const j=yn(R.placement);return j===x||j==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(j=>j>0).reduce((j,O)=>j+O,0)]).sort((R,j)=>R[1]-j[1])[0])==null?void 0:V[0];F&&(I=F);break}case"initialPlacement":I=l;break}if(i!==I)return{reset:{placement:I}}}return{}}}};function Hv(e,n){return{top:e.top-n.height,right:e.right-n.width,bottom:e.bottom-n.height,left:e.left-n.width}}function Wv(e){return tO.some(n=>e[n]>=0)}const mO=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(n){const{rects:r,platform:o}=n,{strategy:i="referenceHidden",...s}=Yn(e,n);switch(i){case"referenceHidden":{const a=await o.detectOverflow(n,{...s,elementContext:"reference"}),l=Hv(a,r.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:Wv(l)}}}case"escaped":{const a=await o.detectOverflow(n,{...s,altBoundary:!0}),l=Hv(a,r.floating);return{data:{escapedOffsets:l,escaped:Wv(l)}}}default:return{}}}}},J_=new Set(["left","top"]);async function gO(e,n){const{placement:r,platform:o,elements:i}=e,s=await(o.isRTL==null?void 0:o.isRTL(i.floating)),a=Xn(r),l=Di(r),c=yn(r)==="y",u=J_.has(a)?-1:1,f=s&&c?-1:1,d=Yn(n,e);let{mainAxis:p,crossAxis:m,alignmentAxis:y}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&typeof y=="number"&&(m=l==="end"?y*-1:y),c?{x:m*f,y:p*u}:{x:p*u,y:m*f}}const yO=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(n){var r,o;const{x:i,y:s,placement:a,middlewareData:l}=n,c=await gO(n,e);return a===((r=l.offset)==null?void 0:r.placement)&&(o=l.arrow)!=null&&o.alignmentOffset?{}:{x:i+c.x,y:s+c.y,data:{...c,placement:a}}}}},vO=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(n){const{x:r,y:o,placement:i,platform:s}=n,{mainAxis:a=!0,crossAxis:l=!1,limiter:c={fn:v=>{let{x,y:w}=v;return{x,y:w}}},...u}=Yn(e,n),f={x:r,y:o},d=await s.detectOverflow(n,u),p=yn(Xn(i)),m=Am(p);let y=f[m],b=f[p];if(a){const v=m==="y"?"top":"left",x=m==="y"?"bottom":"right",w=y+d[v],S=y-d[x];y=Np(w,y,S)}if(l){const v=p==="y"?"top":"left",x=p==="y"?"bottom":"right",w=b+d[v],S=b-d[x];b=Np(w,b,S)}const _=c.fn({...n,[m]:y,[p]:b});return{..._,data:{x:_.x-r,y:_.y-o,enabled:{[m]:a,[p]:l}}}}}},xO=function(e){return e===void 0&&(e={}),{options:e,fn(n){const{x:r,y:o,placement:i,rects:s,middlewareData:a}=n,{offset:l=0,mainAxis:c=!0,crossAxis:u=!0}=Yn(e,n),f={x:r,y:o},d=yn(i),p=Am(d);let m=f[p],y=f[d];const b=Yn(l,n),_=typeof b=="number"?{mainAxis:b,crossAxis:0}:{mainAxis:0,crossAxis:0,...b};if(c){const w=p==="y"?"height":"width",S=s.reference[p]-s.floating[w]+_.mainAxis,C=s.reference[p]+s.reference[w]-_.mainAxis;m<S?m=S:m>C&&(m=C)}if(u){var v,x;const w=p==="y"?"width":"height",S=J_.has(Xn(i)),C=s.reference[d]-s.floating[w]+(S&&((v=a.offset)==null?void 0:v[d])||0)+(S?0:_.crossAxis),E=s.reference[d]+s.reference[w]+(S?0:((x=a.offset)==null?void 0:x[d])||0)-(S?_.crossAxis:0);y<C?y=C:y>E&&(y=E)}return{[p]:m,[d]:y}}}},wO=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(n){var r,o;const{placement:i,rects:s,platform:a,elements:l}=n,{apply:c=()=>{},...u}=Yn(e,n),f=await a.detectOverflow(n,u),d=Xn(i),p=Di(i),m=yn(i)==="y",{width:y,height:b}=s.floating;let _,v;d==="top"||d==="bottom"?(_=d,v=p===(await(a.isRTL==null?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(v=d,_=p==="end"?"top":"bottom");const x=b-f.top-f.bottom,w=y-f.left-f.right,S=Ar(b-f[_],x),C=Ar(y-f[v],w),E=!n.middlewareData.shift;let k=S,N=C;if((r=n.middlewareData.shift)!=null&&r.enabled.x&&(N=w),(o=n.middlewareData.shift)!=null&&o.enabled.y&&(k=x),E&&!p){const T=St(f.left,0),A=St(f.right,0),D=St(f.top,0),V=St(f.bottom,0);m?N=y-2*(T!==0||A!==0?T+A:St(f.left,f.right)):k=b-2*(D!==0||V!==0?D+V:St(f.top,f.bottom))}await c({...n,availableWidth:N,availableHeight:k});const M=await a.getDimensions(l.floating);return y!==M.width||b!==M.height?{reset:{rects:!0}}:{}}}};function $u(){return typeof window<"u"}function Li(e){return eS(e)?(e.nodeName||"").toLowerCase():"#document"}function Nt(e){var n;return(e==null||(n=e.ownerDocument)==null?void 0:n.defaultView)||window}function kn(e){var n;return(n=(eS(e)?e.ownerDocument:e.document)||window.document)==null?void 0:n.documentElement}function eS(e){return $u()?e instanceof Node||e instanceof Nt(e).Node:!1}function an(e){return $u()?e instanceof Element||e instanceof Nt(e).Element:!1}function Qn(e){return $u()?e instanceof HTMLElement||e instanceof Nt(e).HTMLElement:!1}function Uv(e){return!$u()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Nt(e).ShadowRoot}function Na(e){const{overflow:n,overflowX:r,overflowY:o,display:i}=ln(e);return/auto|scroll|overlay|hidden|clip/.test(n+o+r)&&i!=="inline"&&i!=="contents"}function bO(e){return/^(table|td|th)$/.test(Li(e))}function Ou(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const _O=/transform|translate|scale|rotate|perspective|filter/,SO=/paint|layout|strict|content/,Gr=e=>!!e&&e!=="none";let of;function $m(e){const n=an(e)?ln(e):e;return Gr(n.transform)||Gr(n.translate)||Gr(n.scale)||Gr(n.rotate)||Gr(n.perspective)||!Om()&&(Gr(n.backdropFilter)||Gr(n.filter))||_O.test(n.willChange||"")||SO.test(n.contain||"")}function CO(e){let n=Tr(e);for(;Qn(n)&&!vi(n);){if($m(n))return n;if(Ou(n))return null;n=Tr(n)}return null}function Om(){return of==null&&(of=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),of}function vi(e){return/^(html|body|#document)$/.test(Li(e))}function ln(e){return Nt(e).getComputedStyle(e)}function Du(e){return an(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Tr(e){if(Li(e)==="html")return e;const n=e.assignedSlot||e.parentNode||Uv(e)&&e.host||kn(e);return Uv(n)?n.host:n}function tS(e){const n=Tr(e);return vi(n)?e.ownerDocument?e.ownerDocument.body:e.body:Qn(n)&&Na(n)?n:tS(n)}function ea(e,n,r){var o;n===void 0&&(n=[]),r===void 0&&(r=!0);const i=tS(e),s=i===((o=e.ownerDocument)==null?void 0:o.body),a=Nt(i);if(s){const l=Mp(a);return n.concat(a,a.visualViewport||[],Na(i)?i:[],l&&r?ea(l):[])}else return n.concat(i,ea(i,[],r))}function Mp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function nS(e){const n=ln(e);let r=parseFloat(n.width)||0,o=parseFloat(n.height)||0;const i=Qn(e),s=i?e.offsetWidth:r,a=i?e.offsetHeight:o,l=jc(r)!==s||jc(o)!==a;return l&&(r=s,o=a),{width:r,height:o,$:l}}function Dm(e){return an(e)?e:e.contextElement}function si(e){const n=Dm(e);if(!Qn(n))return bn(1);const r=n.getBoundingClientRect(),{width:o,height:i,$:s}=nS(n);let a=(s?jc(r.width):r.width)/o,l=(s?jc(r.height):r.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const EO=bn(0);function rS(e){const n=Nt(e);return!Om()||!n.visualViewport?EO:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function kO(e,n,r){return n===void 0&&(n=!1),!r||n&&r!==Nt(e)?!1:n}function ho(e,n,r,o){n===void 0&&(n=!1),r===void 0&&(r=!1);const i=e.getBoundingClientRect(),s=Dm(e);let a=bn(1);n&&(o?an(o)&&(a=si(o)):a=si(e));const l=kO(s,r,o)?rS(s):bn(0);let c=(i.left+l.x)/a.x,u=(i.top+l.y)/a.y,f=i.width/a.x,d=i.height/a.y;if(s){const p=Nt(s),m=o&&an(o)?Nt(o):o;let y=p,b=Mp(y);for(;b&&o&&m!==y;){const _=si(b),v=b.getBoundingClientRect(),x=ln(b),w=v.left+(b.clientLeft+parseFloat(x.paddingLeft))*_.x,S=v.top+(b.clientTop+parseFloat(x.paddingTop))*_.y;c*=_.x,u*=_.y,f*=_.x,d*=_.y,c+=w,u+=S,y=Nt(b),b=Mp(y)}}return Tc({width:f,height:d,x:c,y:u})}function Lu(e,n){const r=Du(e).scrollLeft;return n?n.left+r:ho(kn(e)).left+r}function oS(e,n){const r=e.getBoundingClientRect(),o=r.left+n.scrollLeft-Lu(e,r),i=r.top+n.scrollTop;return{x:o,y:i}}function NO(e){let{elements:n,rect:r,offsetParent:o,strategy:i}=e;const s=i==="fixed",a=kn(o),l=n?Ou(n.floating):!1;if(o===a||l&&s)return r;let c={scrollLeft:0,scrollTop:0},u=bn(1);const f=bn(0),d=Qn(o);if((d||!d&&!s)&&((Li(o)!=="body"||Na(a))&&(c=Du(o)),d)){const m=ho(o);u=si(o),f.x=m.x+o.clientLeft,f.y=m.y+o.clientTop}const p=a&&!d&&!s?oS(a,c):bn(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-c.scrollLeft*u.x+f.x+p.x,y:r.y*u.y-c.scrollTop*u.y+f.y+p.y}}function PO(e){return Array.from(e.getClientRects())}function MO(e){const n=kn(e),r=Du(e),o=e.ownerDocument.body,i=St(n.scrollWidth,n.clientWidth,o.scrollWidth,o.clientWidth),s=St(n.scrollHeight,n.clientHeight,o.scrollHeight,o.clientHeight);let a=-r.scrollLeft+Lu(e);const l=-r.scrollTop;return ln(o).direction==="rtl"&&(a+=St(n.clientWidth,o.clientWidth)-i),{width:i,height:s,x:a,y:l}}const Gv=25;function RO(e,n){const r=Nt(e),o=kn(e),i=r.visualViewport;let s=o.clientWidth,a=o.clientHeight,l=0,c=0;if(i){s=i.width,a=i.height;const f=Om();(!f||f&&n==="fixed")&&(l=i.offsetLeft,c=i.offsetTop)}const u=Lu(o);if(u<=0){const f=o.ownerDocument,d=f.body,p=getComputedStyle(d),m=f.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,y=Math.abs(o.clientWidth-d.clientWidth-m);y<=Gv&&(s-=y)}else u<=Gv&&(s+=u);return{width:s,height:a,x:l,y:c}}function jO(e,n){const r=ho(e,!0,n==="fixed"),o=r.top+e.clientTop,i=r.left+e.clientLeft,s=Qn(e)?si(e):bn(1),a=e.clientWidth*s.x,l=e.clientHeight*s.y,c=i*s.x,u=o*s.y;return{width:a,height:l,x:c,y:u}}function Yv(e,n,r){let o;if(n==="viewport")o=RO(e,r);else if(n==="document")o=MO(kn(e));else if(an(n))o=jO(n,r);else{const i=rS(e);o={x:n.x-i.x,y:n.y-i.y,width:n.width,height:n.height}}return Tc(o)}function iS(e,n){const r=Tr(e);return r===n||!an(r)||vi(r)?!1:ln(r).position==="fixed"||iS(r,n)}function AO(e,n){const r=n.get(e);if(r)return r;let o=ea(e,[],!1).filter(l=>an(l)&&Li(l)!=="body"),i=null;const s=ln(e).position==="fixed";let a=s?Tr(e):e;for(;an(a)&&!vi(a);){const l=ln(a),c=$m(a);!c&&l.position==="fixed"&&(i=null),(s?!c&&!i:!c&&l.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||Na(a)&&!c&&iS(e,a))?o=o.filter(f=>f!==a):i=l,a=Tr(a)}return n.set(e,o),o}function TO(e){let{element:n,boundary:r,rootBoundary:o,strategy:i}=e;const a=[...r==="clippingAncestors"?Ou(n)?[]:AO(n,this._c):[].concat(r),o],l=Yv(n,a[0],i);let c=l.top,u=l.right,f=l.bottom,d=l.left;for(let p=1;p<a.length;p++){const m=Yv(n,a[p],i);c=St(m.top,c),u=Ar(m.right,u),f=Ar(m.bottom,f),d=St(m.left,d)}return{width:u-d,height:f-c,x:d,y:c}}function IO(e){const{width:n,height:r}=nS(e);return{width:n,height:r}}function $O(e,n,r){const o=Qn(n),i=kn(n),s=r==="fixed",a=ho(e,!0,s,n);let l={scrollLeft:0,scrollTop:0};const c=bn(0);function u(){c.x=Lu(i)}if(o||!o&&!s)if((Li(n)!=="body"||Na(i))&&(l=Du(n)),o){const m=ho(n,!0,s,n);c.x=m.x+n.clientLeft,c.y=m.y+n.clientTop}else i&&u();s&&!o&&i&&u();const f=i&&!o&&!s?oS(i,l):bn(0),d=a.left+l.scrollLeft-c.x-f.x,p=a.top+l.scrollTop-c.y-f.y;return{x:d,y:p,width:a.width,height:a.height}}function sf(e){return ln(e).position==="static"}function Xv(e,n){if(!Qn(e)||ln(e).position==="fixed")return null;if(n)return n(e);let r=e.offsetParent;return kn(e)===r&&(r=r.ownerDocument.body),r}function sS(e,n){const r=Nt(e);if(Ou(e))return r;if(!Qn(e)){let i=Tr(e);for(;i&&!vi(i);){if(an(i)&&!sf(i))return i;i=Tr(i)}return r}let o=Xv(e,n);for(;o&&bO(o)&&sf(o);)o=Xv(o,n);return o&&vi(o)&&sf(o)&&!$m(o)?r:o||CO(e)||r}const OO=async function(e){const n=this.getOffsetParent||sS,r=this.getDimensions,o=await r(e.floating);return{reference:$O(e.reference,await n(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function DO(e){return ln(e).direction==="rtl"}const LO={convertOffsetParentRelativeRectToViewportRelativeRect:NO,getDocumentElement:kn,getClippingRect:TO,getOffsetParent:sS,getElementRects:OO,getClientRects:PO,getDimensions:IO,getScale:si,isElement:an,isRTL:DO};function aS(e,n){return e.x===n.x&&e.y===n.y&&e.width===n.width&&e.height===n.height}function zO(e,n){let r=null,o;const i=kn(e);function s(){var l;clearTimeout(o),(l=r)==null||l.disconnect(),r=null}function a(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),s();const u=e.getBoundingClientRect(),{left:f,top:d,width:p,height:m}=u;if(l||n(),!p||!m)return;const y=pl(d),b=pl(i.clientWidth-(f+p)),_=pl(i.clientHeight-(d+m)),v=pl(f),w={rootMargin:-y+"px "+-b+"px "+-_+"px "+-v+"px",threshold:St(0,Ar(1,c))||1};let S=!0;function C(E){const k=E[0].intersectionRatio;if(k!==c){if(!S)return a();k?a(!1,k):o=setTimeout(()=>{a(!1,1e-7)},1e3)}k===1&&!aS(u,e.getBoundingClientRect())&&a(),S=!1}try{r=new IntersectionObserver(C,{...w,root:i.ownerDocument})}catch{r=new IntersectionObserver(C,w)}r.observe(e)}return a(!0),s}function FO(e,n,r,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=o,u=Dm(e),f=i||s?[...u?ea(u):[],...n?ea(n):[]]:[];f.forEach(v=>{i&&v.addEventListener("scroll",r,{passive:!0}),s&&v.addEventListener("resize",r)});const d=u&&l?zO(u,r):null;let p=-1,m=null;a&&(m=new ResizeObserver(v=>{let[x]=v;x&&x.target===u&&m&&n&&(m.unobserve(n),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var w;(w=m)==null||w.observe(n)})),r()}),u&&!c&&m.observe(u),n&&m.observe(n));let y,b=c?ho(e):null;c&&_();function _(){const v=ho(e);b&&!aS(b,v)&&r(),b=v,y=requestAnimationFrame(_)}return r(),()=>{var v;f.forEach(x=>{i&&x.removeEventListener("scroll",r),s&&x.removeEventListener("resize",r)}),d==null||d(),(v=m)==null||v.disconnect(),m=null,c&&cancelAnimationFrame(y)}}const VO=yO,BO=vO,HO=hO,WO=wO,UO=mO,Kv=pO,GO=xO,YO=(e,n,r)=>{const o=new Map,i={platform:LO,...r},s={...i.platform,_c:o};return fO(e,n,{...i,platform:s})};var XO=typeof document<"u",KO=function(){},Gl=XO?h.useLayoutEffect:KO;function Ic(e,n){if(e===n)return!0;if(typeof e!=typeof n)return!1;if(typeof e=="function"&&e.toString()===n.toString())return!0;let r,o,i;if(e&&n&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==n.length)return!1;for(o=r;o--!==0;)if(!Ic(e[o],n[o]))return!1;return!0}if(i=Object.keys(e),r=i.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!{}.hasOwnProperty.call(n,i[o]))return!1;for(o=r;o--!==0;){const s=i[o];if(!(s==="_owner"&&e.$$typeof)&&!Ic(e[s],n[s]))return!1}return!0}return e!==e&&n!==n}function lS(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function qv(e,n){const r=lS(e);return Math.round(n*r)/r}function af(e){const n=h.useRef(e);return Gl(()=>{n.current=e}),n}function qO(e){e===void 0&&(e={});const{placement:n="bottom",strategy:r="absolute",middleware:o=[],platform:i,elements:{reference:s,floating:a}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[f,d]=h.useState({x:0,y:0,strategy:r,placement:n,middlewareData:{},isPositioned:!1}),[p,m]=h.useState(o);Ic(p,o)||m(o);const[y,b]=h.useState(null),[_,v]=h.useState(null),x=h.useCallback(R=>{R!==E.current&&(E.current=R,b(R))},[]),w=h.useCallback(R=>{R!==k.current&&(k.current=R,v(R))},[]),S=s||y,C=a||_,E=h.useRef(null),k=h.useRef(null),N=h.useRef(f),M=c!=null,T=af(c),A=af(i),D=af(u),V=h.useCallback(()=>{if(!E.current||!k.current)return;const R={placement:n,strategy:r,middleware:p};A.current&&(R.platform=A.current),YO(E.current,k.current,R).then(j=>{const O={...j,isPositioned:D.current!==!1};P.current&&!Ic(N.current,O)&&(N.current=O,_o.flushSync(()=>{d(O)}))})},[p,n,r,A,D]);Gl(()=>{u===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,d(R=>({...R,isPositioned:!1})))},[u]);const P=h.useRef(!1);Gl(()=>(P.current=!0,()=>{P.current=!1}),[]),Gl(()=>{if(S&&(E.current=S),C&&(k.current=C),S&&C){if(T.current)return T.current(S,C,V);V()}},[S,C,V,T,M]);const L=h.useMemo(()=>({reference:E,floating:k,setReference:x,setFloating:w}),[x,w]),I=h.useMemo(()=>({reference:S,floating:C}),[S,C]),F=h.useMemo(()=>{const R={position:r,left:0,top:0};if(!I.floating)return R;const j=qv(I.floating,f.x),O=qv(I.floating,f.y);return l?{...R,transform:"translate("+j+"px, "+O+"px)",...lS(I.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:j,top:O}},[r,l,I.floating,f.x,f.y]);return h.useMemo(()=>({...f,update:V,refs:L,elements:I,floatingStyles:F}),[f,V,L,I,F])}const ZO=e=>{function n(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:o,padding:i}=typeof e=="function"?e(r):e;return o&&n(o)?o.current!=null?Kv({element:o.current,padding:i}).fn(r):{}:o?Kv({element:o,padding:i}).fn(r):{}}}},QO=(e,n)=>{const r=VO(e);return{name:r.name,fn:r.fn,options:[e,n]}},JO=(e,n)=>{const r=BO(e);return{name:r.name,fn:r.fn,options:[e,n]}},e4=(e,n)=>({fn:GO(e).fn,options:[e,n]}),t4=(e,n)=>{const r=HO(e);return{name:r.name,fn:r.fn,options:[e,n]}},n4=(e,n)=>{const r=WO(e);return{name:r.name,fn:r.fn,options:[e,n]}},r4=(e,n)=>{const r=UO(e);return{name:r.name,fn:r.fn,options:[e,n]}},o4=(e,n)=>{const r=ZO(e);return{name:r.name,fn:r.fn,options:[e,n]}};function i4(e){const n=s4(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(l4);if(c){const u=c.props.children,f=l.map(d=>d===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:d);return g.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,f):null})}return g.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function s4(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=u4(i),l=c4(s,i.props);return i.type!==h.Fragment&&(l.ref=o?Se(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var a4=Symbol("radix.slottable");function l4(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===a4}function c4(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function u4(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var d4=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],f4=d4.reduce((e,n)=>{const r=i4(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{}),p4="Arrow",cS=h.forwardRef((e,n)=>{const{children:r,width:o=10,height:i=5,...s}=e;return g.jsx(f4.svg,{...s,ref:n,width:o,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:g.jsx("polygon",{points:"0,0 30,0 15,10"})})});cS.displayName=p4;var h4=cS;function m4(e,n=[]){let r=[];function o(s,a){const l=h.createContext(a),c=r.length;r=[...r,a];const u=d=>{var v;const{scope:p,children:m,...y}=d,b=((v=p==null?void 0:p[e])==null?void 0:v[c])||l,_=h.useMemo(()=>y,Object.values(y));return g.jsx(b.Provider,{value:_,children:m})};u.displayName=s+"Provider";function f(d,p){var b;const m=((b=p==null?void 0:p[e])==null?void 0:b[c])||l,y=h.useContext(m);if(y)return y;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[u,f]}const i=()=>{const s=r.map(a=>h.createContext(a));return function(l){const c=(l==null?void 0:l[e])||s;return h.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[o,g4(i,...n)]}function g4(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=o.reduce((l,{useScope:c,scopeName:u})=>{const d=c(s)[`__scope${u}`];return{...l,...d}},{});return h.useMemo(()=>({[`__scope${n.scopeName}`]:a}),[a])}};return r.scopeName=n.scopeName,r}function y4(e){const n=v4(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(w4);if(c){const u=c.props.children,f=l.map(d=>d===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:d);return g.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,f):null})}return g.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function v4(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=_4(i),l=b4(s,i.props);return i.type!==h.Fragment&&(l.ref=o?Se(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var x4=Symbol("radix.slottable");function w4(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===x4}function b4(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function _4(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var S4=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],uS=S4.reduce((e,n)=>{const r=y4(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{}),dS="Popper",[fS,Fr]=m4(dS),[fK,pS]=fS(dS),hS="PopperAnchor",mS=h.forwardRef((e,n)=>{const{__scopePopper:r,virtualRef:o,...i}=e,s=pS(hS,r),a=h.useRef(null),l=he(n,a),c=h.useRef(null);return h.useEffect(()=>{const u=c.current;c.current=(o==null?void 0:o.current)||a.current,u!==c.current&&s.onAnchorChange(c.current)}),o?null:g.jsx(uS.div,{...i,ref:l})});mS.displayName=hS;var Lm="PopperContent",[C4,E4]=fS(Lm),gS=h.forwardRef((e,n)=>{var U,Y,K,Z,ee,Q;const{__scopePopper:r,side:o="bottom",sideOffset:i=0,align:s="center",alignOffset:a=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:d="partial",hideWhenDetached:p=!1,updatePositionStrategy:m="optimized",onPlaced:y,...b}=e,_=pS(Lm,r),[v,x]=h.useState(null),w=he(n,te=>x(te)),[S,C]=h.useState(null),E=_m(S),k=(E==null?void 0:E.width)??0,N=(E==null?void 0:E.height)??0,M=o+(s!=="center"?"-"+s:""),T=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},A=Array.isArray(u)?u:[u],D=A.length>0,V={padding:T,boundary:A.filter(N4),altBoundary:D},{refs:P,floatingStyles:L,placement:I,isPositioned:F,middlewareData:R}=qO({strategy:"fixed",placement:M,whileElementsMounted:(...te)=>FO(...te,{animationFrame:m==="always"}),elements:{reference:_.anchor},middleware:[QO({mainAxis:i+N,alignmentAxis:a}),c&&JO({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?e4():void 0,...V}),c&&t4({...V}),n4({...V,apply:({elements:te,rects:ce,availableWidth:me,availableHeight:ue})=>{const{width:ye,height:dn}=ce.reference,ut=te.floating.style;ut.setProperty("--radix-popper-available-width",`${me}px`),ut.setProperty("--radix-popper-available-height",`${ue}px`),ut.setProperty("--radix-popper-anchor-width",`${ye}px`),ut.setProperty("--radix-popper-anchor-height",`${dn}px`)}}),S&&o4({element:S,padding:l}),P4({arrowWidth:k,arrowHeight:N}),p&&r4({strategy:"referenceHidden",...V})]}),[j,O]=xS(I),G=Sn(y);He(()=>{F&&(G==null||G())},[F,G]);const $=(U=R.arrow)==null?void 0:U.x,X=(Y=R.arrow)==null?void 0:Y.y,H=((K=R.arrow)==null?void 0:K.centerOffset)!==0,[W,z]=h.useState();return He(()=>{v&&z(window.getComputedStyle(v).zIndex)},[v]),g.jsx("div",{ref:P.setFloating,"data-radix-popper-content-wrapper":"",style:{...L,transform:F?L.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:W,"--radix-popper-transform-origin":[(Z=R.transformOrigin)==null?void 0:Z.x,(ee=R.transformOrigin)==null?void 0:ee.y].join(" "),...((Q=R.hide)==null?void 0:Q.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:g.jsx(C4,{scope:r,placedSide:j,onArrowChange:C,arrowX:$,arrowY:X,shouldHideArrow:H,children:g.jsx(uS.div,{"data-side":j,"data-align":O,...b,ref:w,style:{...b.style,animation:F?void 0:"none"}})})})});gS.displayName=Lm;var yS="PopperArrow",k4={top:"bottom",right:"left",bottom:"top",left:"right"},vS=h.forwardRef(function(n,r){const{__scopePopper:o,...i}=n,s=E4(yS,o),a=k4[s.placedSide];return g.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:g.jsx(h4,{...i,ref:r,style:{...i.style,display:"block"}})})});vS.displayName=yS;function N4(e){return e!==null}var P4=e=>({name:"transformOrigin",options:e,fn(n){var _,v,x;const{placement:r,rects:o,middlewareData:i}=n,a=((_=i.arrow)==null?void 0:_.centerOffset)!==0,l=a?0:e.arrowWidth,c=a?0:e.arrowHeight,[u,f]=xS(r),d={start:"0%",center:"50%",end:"100%"}[f],p=(((v=i.arrow)==null?void 0:v.x)??0)+l/2,m=(((x=i.arrow)==null?void 0:x.y)??0)+c/2;let y="",b="";return u==="bottom"?(y=a?d:`${p}px`,b=`${-c}px`):u==="top"?(y=a?d:`${p}px`,b=`${o.floating.height+c}px`):u==="right"?(y=`${-c}px`,b=a?d:`${m}px`):u==="left"&&(y=`${o.floating.width+c}px`,b=a?d:`${m}px`),{data:{x:y,y:b}}}});function xS(e){const[n,r="center"]=e.split("-");return[n,r]}var Pa=mS,zu=gS,Fu=vS;function wS(e){const n=M4(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(j4);if(c){const u=c.props.children,f=l.map(d=>d===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:d);return g.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,f):null})}return g.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function M4(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=T4(i),l=A4(s,i.props);return i.type!==h.Fragment&&(l.ref=o?Se(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var R4=Symbol("radix.slottable");function j4(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===R4}function A4(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function T4(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var I4=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ma=I4.reduce((e,n)=>{const r=wS(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{});function $4(e,n){e&&_o.flushSync(()=>e.dispatchEvent(n))}function O4(e,n=[]){let r=[];function o(s,a){const l=h.createContext(a),c=r.length;r=[...r,a];const u=d=>{var v;const{scope:p,children:m,...y}=d,b=((v=p==null?void 0:p[e])==null?void 0:v[c])||l,_=h.useMemo(()=>y,Object.values(y));return g.jsx(b.Provider,{value:_,children:m})};u.displayName=s+"Provider";function f(d,p){var b;const m=((b=p==null?void 0:p[e])==null?void 0:b[c])||l,y=h.useContext(m);if(y)return y;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[u,f]}const i=()=>{const s=r.map(a=>h.createContext(a));return function(l){const c=(l==null?void 0:l[e])||s;return h.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[o,D4(i,...n)]}function D4(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=o.reduce((l,{useScope:c,scopeName:u})=>{const d=c(s)[`__scope${u}`];return{...l,...d}},{});return h.useMemo(()=>({[`__scope${n.scopeName}`]:a}),[a])}};return r.scopeName=n.scopeName,r}function L4(e){const n=z4(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(V4);if(c){const u=c.props.children,f=l.map(d=>d===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:d);return g.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,f):null})}return g.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function z4(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=H4(i),l=B4(s,i.props);return i.type!==h.Fragment&&(l.ref=o?Se(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var F4=Symbol("radix.slottable");function V4(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===F4}function B4(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function H4(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var W4=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],bS=W4.reduce((e,n)=>{const r=L4(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{}),lf="rovingFocusGroup.onEntryFocus",U4={bubbles:!1,cancelable:!0},Ra="RovingFocusGroup",[Rp,_S,G4]=jm(Ra),[Y4,Vu]=O4(Ra,[G4]),[X4,K4]=Y4(Ra),SS=h.forwardRef((e,n)=>g.jsx(Rp.Provider,{scope:e.__scopeRovingFocusGroup,children:g.jsx(Rp.Slot,{scope:e.__scopeRovingFocusGroup,children:g.jsx(q4,{...e,ref:n})})}));SS.displayName=Ra;var q4=h.forwardRef((e,n)=>{const{__scopeRovingFocusGroup:r,orientation:o,loop:i=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...d}=e,p=h.useRef(null),m=he(n,p),y=Z_(s),[b,_]=wa({prop:a,defaultProp:l??null,onChange:c,caller:Ra}),[v,x]=h.useState(!1),w=Sn(u),S=_S(r),C=h.useRef(!1),[E,k]=h.useState(0);return h.useEffect(()=>{const N=p.current;if(N)return N.addEventListener(lf,w),()=>N.removeEventListener(lf,w)},[w]),g.jsx(X4,{scope:r,orientation:o,dir:y,loop:i,currentTabStopId:b,onItemFocus:h.useCallback(N=>_(N),[_]),onItemShiftTab:h.useCallback(()=>x(!0),[]),onFocusableItemAdd:h.useCallback(()=>k(N=>N+1),[]),onFocusableItemRemove:h.useCallback(()=>k(N=>N-1),[]),children:g.jsx(bS.div,{tabIndex:v||E===0?-1:0,"data-orientation":o,...d,ref:m,style:{outline:"none",...e.style},onMouseDown:ne(e.onMouseDown,()=>{C.current=!0}),onFocus:ne(e.onFocus,N=>{const M=!C.current;if(N.target===N.currentTarget&&M&&!v){const T=new CustomEvent(lf,U4);if(N.currentTarget.dispatchEvent(T),!T.defaultPrevented){const A=S().filter(I=>I.focusable),D=A.find(I=>I.active),V=A.find(I=>I.id===b),L=[D,V,...A].filter(Boolean).map(I=>I.ref.current);kS(L,f)}}C.current=!1}),onBlur:ne(e.onBlur,()=>x(!1))})})}),CS="RovingFocusGroupItem",ES=h.forwardRef((e,n)=>{const{__scopeRovingFocusGroup:r,focusable:o=!0,active:i=!1,tabStopId:s,children:a,...l}=e,c=kt(),u=s||c,f=K4(CS,r),d=f.currentTabStopId===u,p=_S(r),{onFocusableItemAdd:m,onFocusableItemRemove:y,currentTabStopId:b}=f;return h.useEffect(()=>{if(o)return m(),()=>y()},[o,m,y]),g.jsx(Rp.ItemSlot,{scope:r,id:u,focusable:o,active:i,children:g.jsx(bS.span,{tabIndex:d?0:-1,"data-orientation":f.orientation,...l,ref:n,onMouseDown:ne(e.onMouseDown,_=>{o?f.onItemFocus(u):_.preventDefault()}),onFocus:ne(e.onFocus,()=>f.onItemFocus(u)),onKeyDown:ne(e.onKeyDown,_=>{if(_.key==="Tab"&&_.shiftKey){f.onItemShiftTab();return}if(_.target!==_.currentTarget)return;const v=J4(_,f.orientation,f.dir);if(v!==void 0){if(_.metaKey||_.ctrlKey||_.altKey||_.shiftKey)return;_.preventDefault();let w=p().filter(S=>S.focusable).map(S=>S.ref.current);if(v==="last")w.reverse();else if(v==="prev"||v==="next"){v==="prev"&&w.reverse();const S=w.indexOf(_.currentTarget);w=f.loop?eD(w,S+1):w.slice(S+1)}setTimeout(()=>kS(w))}}),children:typeof a=="function"?a({isCurrentTabStop:d,hasTabStop:b!=null}):a})})});ES.displayName=CS;var Z4={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Q4(e,n){return n!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function J4(e,n,r){const o=Q4(e.key,r);if(!(n==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(n==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return Z4[o]}function kS(e,n=!1){const r=document.activeElement;for(const o of e)if(o===r||(o.focus({preventScroll:n}),document.activeElement!==r))return}function eD(e,n){return e.map((r,o)=>e[(n+o)%e.length])}var NS=SS,PS=ES,jp=["Enter"," "],tD=["ArrowDown","PageUp","Home"],MS=["ArrowUp","PageDown","End"],nD=[...tD,...MS],rD={ltr:[...jp,"ArrowRight"],rtl:[...jp,"ArrowLeft"]},oD={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Bu="Menu",[ta,iD,sD]=jm(Bu),[Co,RS]=Q$(Bu,[sD,Fr,Vu]),zm=Fr(),jS=Vu(),[pK,Eo]=Co(Bu),[hK,ja]=Co(Bu),aD="MenuAnchor",Fm=h.forwardRef((e,n)=>{const{__scopeMenu:r,...o}=e,i=zm(r);return g.jsx(Pa,{...i,...o,ref:n})});Fm.displayName=aD;var Vm="MenuPortal",[lD,AS]=Co(Vm,{forceMount:void 0}),TS=e=>{const{__scopeMenu:n,forceMount:r,children:o,container:i}=e,s=Eo(Vm,n);return g.jsx(lD,{scope:n,forceMount:r,children:g.jsx(yt,{present:r||s.open,children:g.jsx(Oi,{asChild:!0,container:i,children:o})})})};TS.displayName=Vm;var Bt="MenuContent",[cD,Bm]=Co(Bt),IS=h.forwardRef((e,n)=>{const r=AS(Bt,e.__scopeMenu),{forceMount:o=r.forceMount,...i}=e,s=Eo(Bt,e.__scopeMenu),a=ja(Bt,e.__scopeMenu);return g.jsx(ta.Provider,{scope:e.__scopeMenu,children:g.jsx(yt,{present:o||s.open,children:g.jsx(ta.Slot,{scope:e.__scopeMenu,children:a.modal?g.jsx(uD,{...i,ref:n}):g.jsx(dD,{...i,ref:n})})})})}),uD=h.forwardRef((e,n)=>{const r=Eo(Bt,e.__scopeMenu),o=h.useRef(null),i=he(n,o);return h.useEffect(()=>{const s=o.current;if(s)return Ru(s)},[]),g.jsx(Hm,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:ne(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),dD=h.forwardRef((e,n)=>{const r=Eo(Bt,e.__scopeMenu);return g.jsx(Hm,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),fD=wS("MenuContent.ScrollLock"),Hm=h.forwardRef((e,n)=>{const{__scopeMenu:r,loop:o=!1,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:a,disableOutsidePointerEvents:l,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:p,onDismiss:m,disableOutsideScroll:y,...b}=e,_=Eo(Bt,r),v=ja(Bt,r),x=zm(r),w=jS(r),S=iD(r),[C,E]=h.useState(null),k=h.useRef(null),N=he(n,k,_.onContentChange),M=h.useRef(0),T=h.useRef(""),A=h.useRef(0),D=h.useRef(null),V=h.useRef("right"),P=h.useRef(0),L=y?Sa:h.Fragment,I=y?{as:fD,allowPinchZoom:!0}:void 0,F=j=>{var U,Y;const O=T.current+j,G=S().filter(K=>!K.disabled),$=document.activeElement,X=(U=G.find(K=>K.ref.current===$))==null?void 0:U.textValue,H=G.map(K=>K.textValue),W=CD(H,O,X),z=(Y=G.find(K=>K.textValue===W))==null?void 0:Y.ref.current;(function K(Z){T.current=Z,window.clearTimeout(M.current),Z!==""&&(M.current=window.setTimeout(()=>K(""),1e3))})(O),z&&setTimeout(()=>z.focus())};h.useEffect(()=>()=>window.clearTimeout(M.current),[]),Pu();const R=h.useCallback(j=>{var G,$;return V.current===((G=D.current)==null?void 0:G.side)&&kD(j,($=D.current)==null?void 0:$.area)},[]);return g.jsx(cD,{scope:r,searchRef:T,onItemEnter:h.useCallback(j=>{R(j)&&j.preventDefault()},[R]),onItemLeave:h.useCallback(j=>{var O;R(j)||((O=k.current)==null||O.focus(),E(null))},[R]),onTriggerLeave:h.useCallback(j=>{R(j)&&j.preventDefault()},[R]),pointerGraceTimerRef:A,onPointerGraceIntentChange:h.useCallback(j=>{D.current=j},[]),children:g.jsx(L,{...I,children:g.jsx(ba,{asChild:!0,trapped:i,onMountAutoFocus:ne(s,j=>{var O;j.preventDefault(),(O=k.current)==null||O.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:g.jsx($i,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:p,onDismiss:m,children:g.jsx(NS,{asChild:!0,...w,dir:v.dir,orientation:"vertical",loop:o,currentTabStopId:C,onCurrentTabStopIdChange:E,onEntryFocus:ne(c,j=>{v.isUsingKeyboardRef.current||j.preventDefault()}),preventScrollOnEntryFocus:!0,children:g.jsx(zu,{role:"menu","aria-orientation":"vertical","data-state":qS(_.open),"data-radix-menu-content":"",dir:v.dir,...x,...b,ref:N,style:{outline:"none",...b.style},onKeyDown:ne(b.onKeyDown,j=>{const G=j.target.closest("[data-radix-menu-content]")===j.currentTarget,$=j.ctrlKey||j.altKey||j.metaKey,X=j.key.length===1;G&&(j.key==="Tab"&&j.preventDefault(),!$&&X&&F(j.key));const H=k.current;if(j.target!==H||!nD.includes(j.key))return;j.preventDefault();const z=S().filter(U=>!U.disabled).map(U=>U.ref.current);MS.includes(j.key)&&z.reverse(),_D(z)}),onBlur:ne(e.onBlur,j=>{j.currentTarget.contains(j.target)||(window.clearTimeout(M.current),T.current="")}),onPointerMove:ne(e.onPointerMove,na(j=>{const O=j.target,G=P.current!==j.clientX;if(j.currentTarget.contains(O)&&G){const $=j.clientX>P.current?"right":"left";V.current=$,P.current=j.clientX}}))})})})})})})});IS.displayName=Bt;var pD="MenuGroup",Wm=h.forwardRef((e,n)=>{const{__scopeMenu:r,...o}=e;return g.jsx(Ma.div,{role:"group",...o,ref:n})});Wm.displayName=pD;var hD="MenuLabel",$S=h.forwardRef((e,n)=>{const{__scopeMenu:r,...o}=e;return g.jsx(Ma.div,{...o,ref:n})});$S.displayName=hD;var $c="MenuItem",Zv="menu.itemSelect",Hu=h.forwardRef((e,n)=>{const{disabled:r=!1,onSelect:o,...i}=e,s=h.useRef(null),a=ja($c,e.__scopeMenu),l=Bm($c,e.__scopeMenu),c=he(n,s),u=h.useRef(!1),f=()=>{const d=s.current;if(!r&&d){const p=new CustomEvent(Zv,{bubbles:!0,cancelable:!0});d.addEventListener(Zv,m=>o==null?void 0:o(m),{once:!0}),$4(d,p),p.defaultPrevented?u.current=!1:a.onClose()}};return g.jsx(OS,{...i,ref:c,disabled:r,onClick:ne(e.onClick,f),onPointerDown:d=>{var p;(p=e.onPointerDown)==null||p.call(e,d),u.current=!0},onPointerUp:ne(e.onPointerUp,d=>{var p;u.current||(p=d.currentTarget)==null||p.click()}),onKeyDown:ne(e.onKeyDown,d=>{const p=l.searchRef.current!=="";r||p&&d.key===" "||jp.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});Hu.displayName=$c;var OS=h.forwardRef((e,n)=>{const{__scopeMenu:r,disabled:o=!1,textValue:i,...s}=e,a=Bm($c,r),l=jS(r),c=h.useRef(null),u=he(n,c),[f,d]=h.useState(!1),[p,m]=h.useState("");return h.useEffect(()=>{const y=c.current;y&&m((y.textContent??"").trim())},[s.children]),g.jsx(ta.ItemSlot,{scope:r,disabled:o,textValue:i??p,children:g.jsx(PS,{asChild:!0,...l,focusable:!o,children:g.jsx(Ma.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...s,ref:u,onPointerMove:ne(e.onPointerMove,na(y=>{o?a.onItemLeave(y):(a.onItemEnter(y),y.defaultPrevented||y.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ne(e.onPointerLeave,na(y=>a.onItemLeave(y))),onFocus:ne(e.onFocus,()=>d(!0)),onBlur:ne(e.onBlur,()=>d(!1))})})})}),mD="MenuCheckboxItem",DS=h.forwardRef((e,n)=>{const{checked:r=!1,onCheckedChange:o,...i}=e;return g.jsx(BS,{scope:e.__scopeMenu,checked:r,children:g.jsx(Hu,{role:"menuitemcheckbox","aria-checked":Oc(r)?"mixed":r,...i,ref:n,"data-state":Gm(r),onSelect:ne(i.onSelect,()=>o==null?void 0:o(Oc(r)?!0:!r),{checkForDefaultPrevented:!1})})})});DS.displayName=mD;var LS="MenuRadioGroup",[gD,yD]=Co(LS,{value:void 0,onValueChange:()=>{}}),zS=h.forwardRef((e,n)=>{const{value:r,onValueChange:o,...i}=e,s=Sn(o);return g.jsx(gD,{scope:e.__scopeMenu,value:r,onValueChange:s,children:g.jsx(Wm,{...i,ref:n})})});zS.displayName=LS;var FS="MenuRadioItem",VS=h.forwardRef((e,n)=>{const{value:r,...o}=e,i=yD(FS,e.__scopeMenu),s=r===i.value;return g.jsx(BS,{scope:e.__scopeMenu,checked:s,children:g.jsx(Hu,{role:"menuitemradio","aria-checked":s,...o,ref:n,"data-state":Gm(s),onSelect:ne(o.onSelect,()=>{var a;return(a=i.onValueChange)==null?void 0:a.call(i,r)},{checkForDefaultPrevented:!1})})})});VS.displayName=FS;var Um="MenuItemIndicator",[BS,vD]=Co(Um,{checked:!1}),HS=h.forwardRef((e,n)=>{const{__scopeMenu:r,forceMount:o,...i}=e,s=vD(Um,r);return g.jsx(yt,{present:o||Oc(s.checked)||s.checked===!0,children:g.jsx(Ma.span,{...i,ref:n,"data-state":Gm(s.checked)})})});HS.displayName=Um;var xD="MenuSeparator",WS=h.forwardRef((e,n)=>{const{__scopeMenu:r,...o}=e;return g.jsx(Ma.div,{role:"separator","aria-orientation":"horizontal",...o,ref:n})});WS.displayName=xD;var wD="MenuArrow",US=h.forwardRef((e,n)=>{const{__scopeMenu:r,...o}=e,i=zm(r);return g.jsx(Fu,{...i,...o,ref:n})});US.displayName=wD;var bD="MenuSub",[mK,GS]=Co(bD),ps="MenuSubTrigger",YS=h.forwardRef((e,n)=>{const r=Eo(ps,e.__scopeMenu),o=ja(ps,e.__scopeMenu),i=GS(ps,e.__scopeMenu),s=Bm(ps,e.__scopeMenu),a=h.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:c}=s,u={__scopeMenu:e.__scopeMenu},f=h.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return h.useEffect(()=>f,[f]),h.useEffect(()=>{const d=l.current;return()=>{window.clearTimeout(d),c(null)}},[l,c]),g.jsx(Fm,{asChild:!0,...u,children:g.jsx(OS,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":i.contentId,"data-state":qS(r.open),...e,ref:Se(n,i.onTriggerChange),onClick:d=>{var p;(p=e.onClick)==null||p.call(e,d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:ne(e.onPointerMove,na(d=>{s.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!r.open&&!a.current&&(s.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{r.onOpenChange(!0),f()},100))})),onPointerLeave:ne(e.onPointerLeave,na(d=>{var m,y;f();const p=(m=r.content)==null?void 0:m.getBoundingClientRect();if(p){const b=(y=r.content)==null?void 0:y.dataset.side,_=b==="right",v=_?-5:5,x=p[_?"left":"right"],w=p[_?"right":"left"];s.onPointerGraceIntentChange({area:[{x:d.clientX+v,y:d.clientY},{x,y:p.top},{x:w,y:p.top},{x:w,y:p.bottom},{x,y:p.bottom}],side:b}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(d),d.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:ne(e.onKeyDown,d=>{var m;const p=s.searchRef.current!=="";e.disabled||p&&d.key===" "||rD[o.dir].includes(d.key)&&(r.onOpenChange(!0),(m=r.content)==null||m.focus(),d.preventDefault())})})})});YS.displayName=ps;var XS="MenuSubContent",KS=h.forwardRef((e,n)=>{const r=AS(Bt,e.__scopeMenu),{forceMount:o=r.forceMount,...i}=e,s=Eo(Bt,e.__scopeMenu),a=ja(Bt,e.__scopeMenu),l=GS(XS,e.__scopeMenu),c=h.useRef(null),u=he(n,c);return g.jsx(ta.Provider,{scope:e.__scopeMenu,children:g.jsx(yt,{present:o||s.open,children:g.jsx(ta.Slot,{scope:e.__scopeMenu,children:g.jsx(Hm,{id:l.contentId,"aria-labelledby":l.triggerId,...i,ref:u,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var d;a.isUsingKeyboardRef.current&&((d=c.current)==null||d.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:ne(e.onFocusOutside,f=>{f.target!==l.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:ne(e.onEscapeKeyDown,f=>{a.onClose(),f.preventDefault()}),onKeyDown:ne(e.onKeyDown,f=>{var m;const d=f.currentTarget.contains(f.target),p=oD[a.dir].includes(f.key);d&&p&&(s.onOpenChange(!1),(m=l.trigger)==null||m.focus(),f.preventDefault())})})})})})});KS.displayName=XS;function qS(e){return e?"open":"closed"}function Oc(e){return e==="indeterminate"}function Gm(e){return Oc(e)?"indeterminate":e?"checked":"unchecked"}function _D(e){const n=document.activeElement;for(const r of e)if(r===n||(r.focus(),document.activeElement!==n))return}function SD(e,n){return e.map((r,o)=>e[(n+o)%e.length])}function CD(e,n,r){const i=n.length>1&&Array.from(n).every(u=>u===n[0])?n[0]:n,s=r?e.indexOf(r):-1;let a=SD(e,Math.max(s,0));i.length===1&&(a=a.filter(u=>u!==r));const c=a.find(u=>u.toLowerCase().startsWith(i.toLowerCase()));return c!==r?c:void 0}function ED(e,n){const{x:r,y:o}=e;let i=!1;for(let s=0,a=n.length-1;s<n.length;a=s++){const l=n[s],c=n[a],u=l.x,f=l.y,d=c.x,p=c.y;f>o!=p>o&&r<(d-u)*(o-f)/(p-f)+u&&(i=!i)}return i}function kD(e,n){if(!n)return!1;const r={x:e.clientX,y:e.clientY};return ED(r,n)}function na(e){return n=>n.pointerType==="mouse"?e(n):void 0}var ND=Fm,PD=TS,MD=IS,RD=Wm,jD=$S,AD=Hu,TD=DS,ID=zS,$D=VS,OD=HS,DD=WS,LD=US,zD=YS,FD=KS,ZS="DropdownMenu",[VD]=$$(ZS,[RS]),xt=RS(),[gK,QS]=VD(ZS),JS="DropdownMenuTrigger",BD=h.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,disabled:o=!1,...i}=e,s=QS(JS,r),a=xt(r);return g.jsx(ND,{asChild:!0,...a,children:g.jsx(W$.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...i,ref:Se(n,s.triggerRef),onPointerDown:ne(e.onPointerDown,l=>{!o&&l.button===0&&l.ctrlKey===!1&&(s.onOpenToggle(),s.open||l.preventDefault())}),onKeyDown:ne(e.onKeyDown,l=>{o||(["Enter"," "].includes(l.key)&&s.onOpenToggle(),l.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});BD.displayName=JS;var HD="DropdownMenuPortal",eC=e=>{const{__scopeDropdownMenu:n,...r}=e,o=xt(n);return g.jsx(PD,{...o,...r})};eC.displayName=HD;var tC="DropdownMenuContent",nC=h.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=QS(tC,r),s=xt(r),a=h.useRef(!1);return g.jsx(MD,{id:i.contentId,"aria-labelledby":i.triggerId,...s,...o,ref:n,onCloseAutoFocus:ne(e.onCloseAutoFocus,l=>{var c;a.current||(c=i.triggerRef.current)==null||c.focus(),a.current=!1,l.preventDefault()}),onInteractOutside:ne(e.onInteractOutside,l=>{const c=l.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,f=c.button===2||u;(!i.modal||f)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});nC.displayName=tC;var WD="DropdownMenuGroup",UD=h.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=xt(r);return g.jsx(RD,{...i,...o,ref:n})});UD.displayName=WD;var GD="DropdownMenuLabel",rC=h.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=xt(r);return g.jsx(jD,{...i,...o,ref:n})});rC.displayName=GD;var YD="DropdownMenuItem",oC=h.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=xt(r);return g.jsx(AD,{...i,...o,ref:n})});oC.displayName=YD;var XD="DropdownMenuCheckboxItem",iC=h.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=xt(r);return g.jsx(TD,{...i,...o,ref:n})});iC.displayName=XD;var KD="DropdownMenuRadioGroup",qD=h.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=xt(r);return g.jsx(ID,{...i,...o,ref:n})});qD.displayName=KD;var ZD="DropdownMenuRadioItem",sC=h.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=xt(r);return g.jsx($D,{...i,...o,ref:n})});sC.displayName=ZD;var QD="DropdownMenuItemIndicator",aC=h.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=xt(r);return g.jsx(OD,{...i,...o,ref:n})});aC.displayName=QD;var JD="DropdownMenuSeparator",lC=h.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=xt(r);return g.jsx(DD,{...i,...o,ref:n})});lC.displayName=JD;var eL="DropdownMenuArrow",tL=h.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=xt(r);return g.jsx(LD,{...i,...o,ref:n})});tL.displayName=eL;var nL="DropdownMenuSubTrigger",cC=h.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=xt(r);return g.jsx(zD,{...i,...o,ref:n})});cC.displayName=nL;var rL="DropdownMenuSubContent",uC=h.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=xt(r);return g.jsx(FD,{...i,...o,ref:n,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});uC.displayName=rL;var oL=eC,dC=nC,fC=rC,pC=oC,hC=iC,mC=sC,gC=aC,yC=lC,vC=cC,xC=uC;const iL=h.forwardRef(({className:e,inset:n,children:r,...o},i)=>g.jsxs(vC,{ref:i,className:se("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",n&&"pl-8",e),...o,children:[r,g.jsx(Js,{className:"ml-auto"})]}));iL.displayName=vC.displayName;const sL=h.forwardRef(({className:e,...n},r)=>g.jsx(xC,{ref:r,className:se("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",e),...n}));sL.displayName=xC.displayName;const aL=h.forwardRef(({className:e,sideOffset:n=4,...r},o)=>g.jsx(oL,{children:g.jsx(dC,{ref:o,sideOffset:n,className:se("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",e),...r})}));aL.displayName=dC.displayName;const lL=h.forwardRef(({className:e,inset:n,...r},o)=>g.jsx(pC,{ref:o,className:se("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",n&&"pl-8",e),...r}));lL.displayName=pC.displayName;const cL=h.forwardRef(({className:e,children:n,checked:r,...o},i)=>g.jsxs(hC,{ref:i,className:se("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:r,...o,children:[g.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:g.jsx(gC,{children:g.jsx(ym,{className:"h-4 w-4"})})}),n]}));cL.displayName=hC.displayName;const uL=h.forwardRef(({className:e,children:n,...r},o)=>g.jsxs(mC,{ref:o,className:se("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[g.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:g.jsx(gC,{children:g.jsx(BA,{className:"h-2 w-2 fill-current"})})}),n]}));uL.displayName=mC.displayName;const dL=h.forwardRef(({className:e,inset:n,...r},o)=>g.jsx(fC,{ref:o,className:se("px-2 py-1.5 text-sm font-semibold",n&&"pl-8",e),...r}));dL.displayName=fC.displayName;const fL=h.forwardRef(({className:e,...n},r)=>g.jsx(yC,{ref:r,className:se("-mx-1 my-1 h-px bg-muted",e),...n}));fL.displayName=yC.displayName;const pL=h.forwardRef(({className:e,type:n,...r},o)=>g.jsx("input",{type:n,className:se("flex h-9 w-full rounded-md border border-transparent bg-input px-3 py-1 text-base transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground/50 placeholder:font-light focus-visible:outline-none focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:o,...r}));pL.displayName="Input";var hL="Label",wC=h.forwardRef((e,n)=>g.jsx(lt.label,{...e,ref:n,onMouseDown:r=>{var i;r.target.closest("button, input, select, textarea")||((i=e.onMouseDown)==null||i.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));wC.displayName=hL;var bC=wC;const mL=hm("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),gL=h.forwardRef(({className:e,...n},r)=>g.jsx(bC,{ref:r,className:se(mL(),e),...n}));gL.displayName=bC.displayName;function yL(e,n=[]){let r=[];function o(s,a){const l=h.createContext(a),c=r.length;r=[...r,a];const u=d=>{var v;const{scope:p,children:m,...y}=d,b=((v=p==null?void 0:p[e])==null?void 0:v[c])||l,_=h.useMemo(()=>y,Object.values(y));return g.jsx(b.Provider,{value:_,children:m})};u.displayName=s+"Provider";function f(d,p){var b;const m=((b=p==null?void 0:p[e])==null?void 0:b[c])||l,y=h.useContext(m);if(y)return y;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[u,f]}const i=()=>{const s=r.map(a=>h.createContext(a));return function(l){const c=(l==null?void 0:l[e])||s;return h.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[o,vL(i,...n)]}function vL(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=o.reduce((l,{useScope:c,scopeName:u})=>{const d=c(s)[`__scope${u}`];return{...l,...d}},{});return h.useMemo(()=>({[`__scope${n.scopeName}`]:a}),[a])}};return r.scopeName=n.scopeName,r}function _C(e){const n=xL(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(bL);if(c){const u=c.props.children,f=l.map(d=>d===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:d);return g.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,f):null})}return g.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function xL(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=SL(i),l=_L(s,i.props);return i.type!==h.Fragment&&(l.ref=o?Se(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var wL=Symbol("radix.slottable");function bL(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===wL}function _L(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function SL(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var CL=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],SC=CL.reduce((e,n)=>{const r=_C(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{}),CC="Popover",[EC]=yL(CC,[Fr]),Wu=Fr(),[yK,Vr]=EC(CC),kC="PopoverAnchor",EL=h.forwardRef((e,n)=>{const{__scopePopover:r,...o}=e,i=Vr(kC,r),s=Wu(r),{onCustomAnchorAdd:a,onCustomAnchorRemove:l}=i;return h.useEffect(()=>(a(),()=>l()),[a,l]),g.jsx(Pa,{...s,...o,ref:n})});EL.displayName=kC;var NC="PopoverTrigger",kL=h.forwardRef((e,n)=>{const{__scopePopover:r,...o}=e,i=Vr(NC,r),s=Wu(r),a=he(n,i.triggerRef),l=g.jsx(SC.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":AC(i.open),...o,ref:a,onClick:ne(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?l:g.jsx(Pa,{asChild:!0,...s,children:l})});kL.displayName=NC;var Ym="PopoverPortal",[NL,PL]=EC(Ym,{forceMount:void 0}),PC=e=>{const{__scopePopover:n,forceMount:r,children:o,container:i}=e,s=Vr(Ym,n);return g.jsx(NL,{scope:n,forceMount:r,children:g.jsx(yt,{present:r||s.open,children:g.jsx(Oi,{asChild:!0,container:i,children:o})})})};PC.displayName=Ym;var xi="PopoverContent",MC=h.forwardRef((e,n)=>{const r=PL(xi,e.__scopePopover),{forceMount:o=r.forceMount,...i}=e,s=Vr(xi,e.__scopePopover);return g.jsx(yt,{present:o||s.open,children:s.modal?g.jsx(RL,{...i,ref:n}):g.jsx(jL,{...i,ref:n})})});MC.displayName=xi;var ML=_C("PopoverContent.RemoveScroll"),RL=h.forwardRef((e,n)=>{const r=Vr(xi,e.__scopePopover),o=h.useRef(null),i=he(n,o),s=h.useRef(!1);return h.useEffect(()=>{const a=o.current;if(a)return Ru(a)},[]),g.jsx(Sa,{as:ML,allowPinchZoom:!0,children:g.jsx(RC,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ne(e.onCloseAutoFocus,a=>{var l;a.preventDefault(),s.current||(l=r.triggerRef.current)==null||l.focus()}),onPointerDownOutside:ne(e.onPointerDownOutside,a=>{const l=a.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,u=l.button===2||c;s.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:ne(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),jL=h.forwardRef((e,n)=>{const r=Vr(xi,e.__scopePopover),o=h.useRef(!1),i=h.useRef(!1);return g.jsx(RC,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var a,l;(a=e.onCloseAutoFocus)==null||a.call(e,s),s.defaultPrevented||(o.current||(l=r.triggerRef.current)==null||l.focus(),s.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:s=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,s),s.defaultPrevented||(o.current=!0,s.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const a=s.target;((u=r.triggerRef.current)==null?void 0:u.contains(a))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}})}),RC=h.forwardRef((e,n)=>{const{__scopePopover:r,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:f,...d}=e,p=Vr(xi,r),m=Wu(r);return Pu(),g.jsx(ba,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:s,children:g.jsx($i,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:f,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onDismiss:()=>p.onOpenChange(!1),children:g.jsx(zu,{"data-state":AC(p.open),role:"dialog",id:p.contentId,...m,...d,ref:n,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),jC="PopoverClose",AL=h.forwardRef((e,n)=>{const{__scopePopover:r,...o}=e,i=Vr(jC,r);return g.jsx(SC.button,{type:"button",...o,ref:n,onClick:ne(e.onClick,()=>i.onOpenChange(!1))})});AL.displayName=jC;var TL="PopoverArrow",IL=h.forwardRef((e,n)=>{const{__scopePopover:r,...o}=e,i=Wu(r);return g.jsx(Fu,{...i,...o,ref:n})});IL.displayName=TL;function AC(e){return e?"open":"closed"}var $L=PC,TC=MC;const OL=h.forwardRef(({className:e,align:n="start",sideOffset:r=4,...o},i)=>g.jsx($L,{children:g.jsx(TC,{ref:i,align:n,sideOffset:r,className:se("z-50 w-[var(--radix-popover-trigger-width)] rounded-md border bg-popover p-0 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})}));OL.displayName=TC.displayName;var Xm="Progress",Km=100,[DL]=Fb(Xm),[LL,zL]=DL(Xm),IC=h.forwardRef((e,n)=>{const{__scopeProgress:r,value:o=null,max:i,getValueLabel:s=FL,...a}=e;(i||i===0)&&!Qv(i)&&console.error(VL(`${i}`,"Progress"));const l=Qv(i)?i:Km;o!==null&&!Jv(o,l)&&console.error(BL(`${o}`,"Progress"));const c=Jv(o,l)?o:null,u=Dc(c)?s(c,l):void 0;return g.jsx(LL,{scope:r,value:c,max:l,children:g.jsx(lt.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":Dc(c)?c:void 0,"aria-valuetext":u,role:"progressbar","data-state":DC(c,l),"data-value":c??void 0,"data-max":l,...a,ref:n})})});IC.displayName=Xm;var $C="ProgressIndicator",OC=h.forwardRef((e,n)=>{const{__scopeProgress:r,...o}=e,i=zL($C,r);return g.jsx(lt.div,{"data-state":DC(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...o,ref:n})});OC.displayName=$C;function FL(e,n){return`${Math.round(e/n*100)}%`}function DC(e,n){return e==null?"indeterminate":e===n?"complete":"loading"}function Dc(e){return typeof e=="number"}function Qv(e){return Dc(e)&&!isNaN(e)&&e>0}function Jv(e,n){return Dc(e)&&!isNaN(e)&&e<=n&&e>=0}function VL(e,n){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${n}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Km}\`.`}function BL(e,n){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${n}\`. The \`value\` prop must be:
340
- - a positive number
341
- - less than the value passed to \`max\` (or ${Km} if no \`max\` prop is set)
342
- - \`null\` or \`undefined\` if the progress is indeterminate.
343
-
344
- Defaulting to \`null\`.`}var LC=IC,HL=OC;const WL=h.forwardRef(({className:e,value:n,...r},o)=>g.jsx(LC,{ref:o,className:se("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",e),...r,children:g.jsx(HL,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(n||0)}%)`}})}));WL.displayName=LC.displayName;function e0(e,[n,r]){return Math.min(r,Math.max(n,e))}function UL(e,n=[]){let r=[];function o(s,a){const l=h.createContext(a),c=r.length;r=[...r,a];const u=d=>{var v;const{scope:p,children:m,...y}=d,b=((v=p==null?void 0:p[e])==null?void 0:v[c])||l,_=h.useMemo(()=>y,Object.values(y));return g.jsx(b.Provider,{value:_,children:m})};u.displayName=s+"Provider";function f(d,p){var b;const m=((b=p==null?void 0:p[e])==null?void 0:b[c])||l,y=h.useContext(m);if(y)return y;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[u,f]}const i=()=>{const s=r.map(a=>h.createContext(a));return function(l){const c=(l==null?void 0:l[e])||s;return h.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[o,GL(i,...n)]}function GL(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=o.reduce((l,{useScope:c,scopeName:u})=>{const d=c(s)[`__scope${u}`];return{...l,...d}},{});return h.useMemo(()=>({[`__scope${n.scopeName}`]:a}),[a])}};return r.scopeName=n.scopeName,r}function zC(e){const n=YL(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(KL);if(c){const u=c.props.children,f=l.map(d=>d===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:d);return g.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,f):null})}return g.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function YL(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=ZL(i),l=qL(s,i.props);return i.type!==h.Fragment&&(l.ref=o?Se(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var XL=Symbol("radix.slottable");function KL(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===XL}function qL(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function ZL(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var QL=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],At=QL.reduce((e,n)=>{const r=zC(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{});function JL(e){const n=e6(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(n6);if(c){const u=c.props.children,f=l.map(d=>d===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:d);return g.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,f):null})}return g.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function e6(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=o6(i),l=r6(s,i.props);return i.type!==h.Fragment&&(l.ref=o?Se(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var t6=Symbol("radix.slottable");function n6(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===t6}function r6(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function o6(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var i6=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],s6=i6.reduce((e,n)=>{const r=JL(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{}),FC=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),a6="VisuallyHidden",VC=h.forwardRef((e,n)=>g.jsx(s6.span,{...e,ref:n,style:{...FC,...e.style}}));VC.displayName=a6;var l6=VC,c6=[" ","Enter","ArrowUp","ArrowDown"],u6=[" ","Enter"],Uu="Select",[qm,Gu,d6]=jm(Uu),[zi]=UL(Uu,[d6,Fr]),Zm=Fr(),[vK,Br]=zi(Uu),[xK,f6]=zi(Uu),BC="SelectTrigger",HC=h.forwardRef((e,n)=>{const{__scopeSelect:r,disabled:o=!1,...i}=e,s=Zm(r),a=Br(BC,r),l=a.disabled||o,c=he(n,a.onTriggerChange),u=Gu(r),f=h.useRef("touch"),[d,p,m]=d2(b=>{const _=u().filter(w=>!w.disabled),v=_.find(w=>w.value===a.value),x=f2(_,b,v);x!==void 0&&a.onValueChange(x.value)}),y=b=>{l||(a.onOpenChange(!0),m()),b&&(a.triggerPointerDownPosRef.current={x:Math.round(b.pageX),y:Math.round(b.pageY)})};return g.jsx(Pa,{asChild:!0,...s,children:g.jsx(At.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":u2(a.value)?"":void 0,...i,ref:c,onClick:ne(i.onClick,b=>{b.currentTarget.focus(),f.current!=="mouse"&&y(b)}),onPointerDown:ne(i.onPointerDown,b=>{f.current=b.pointerType;const _=b.target;_.hasPointerCapture(b.pointerId)&&_.releasePointerCapture(b.pointerId),b.button===0&&b.ctrlKey===!1&&b.pointerType==="mouse"&&(y(b),b.preventDefault())}),onKeyDown:ne(i.onKeyDown,b=>{const _=d.current!=="";!(b.ctrlKey||b.altKey||b.metaKey)&&b.key.length===1&&p(b.key),!(_&&b.key===" ")&&c6.includes(b.key)&&(y(),b.preventDefault())})})})});HC.displayName=BC;var WC="SelectValue",p6=h.forwardRef((e,n)=>{const{__scopeSelect:r,className:o,style:i,children:s,placeholder:a="",...l}=e,c=Br(WC,r),{onValueNodeHasChildrenChange:u}=c,f=s!==void 0,d=he(n,c.onValueNodeChange);return He(()=>{u(f)},[u,f]),g.jsx(At.span,{...l,ref:d,style:{pointerEvents:"none"},children:u2(c.value)?g.jsx(g.Fragment,{children:a}):s})});p6.displayName=WC;var h6="SelectIcon",UC=h.forwardRef((e,n)=>{const{__scopeSelect:r,children:o,...i}=e;return g.jsx(At.span,{"aria-hidden":!0,...i,ref:n,children:o||"▼"})});UC.displayName=h6;var m6="SelectPortal",GC=e=>g.jsx(Oi,{asChild:!0,...e});GC.displayName=m6;var mo="SelectContent",YC=h.forwardRef((e,n)=>{const r=Br(mo,e.__scopeSelect),[o,i]=h.useState();if(He(()=>{i(new DocumentFragment)},[]),!r.open){const s=o;return s?_o.createPortal(g.jsx(XC,{scope:e.__scopeSelect,children:g.jsx(qm.Slot,{scope:e.__scopeSelect,children:g.jsx("div",{children:e.children})})}),s):null}return g.jsx(KC,{...e,ref:n})});YC.displayName=mo;var Xt=10,[XC,Hr]=zi(mo),g6="SelectContentImpl",y6=zC("SelectContent.RemoveScroll"),KC=h.forwardRef((e,n)=>{const{__scopeSelect:r,position:o="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:s,onPointerDownOutside:a,side:l,sideOffset:c,align:u,alignOffset:f,arrowPadding:d,collisionBoundary:p,collisionPadding:m,sticky:y,hideWhenDetached:b,avoidCollisions:_,...v}=e,x=Br(mo,r),[w,S]=h.useState(null),[C,E]=h.useState(null),k=he(n,U=>S(U)),[N,M]=h.useState(null),[T,A]=h.useState(null),D=Gu(r),[V,P]=h.useState(!1),L=h.useRef(!1);h.useEffect(()=>{if(w)return Ru(w)},[w]),Pu();const I=h.useCallback(U=>{const[Y,...K]=D().map(Q=>Q.ref.current),[Z]=K.slice(-1),ee=document.activeElement;for(const Q of U)if(Q===ee||(Q==null||Q.scrollIntoView({block:"nearest"}),Q===Y&&C&&(C.scrollTop=0),Q===Z&&C&&(C.scrollTop=C.scrollHeight),Q==null||Q.focus(),document.activeElement!==ee))return},[D,C]),F=h.useCallback(()=>I([N,w]),[I,N,w]);h.useEffect(()=>{V&&F()},[V,F]);const{onOpenChange:R,triggerPointerDownPosRef:j}=x;h.useEffect(()=>{if(w){let U={x:0,y:0};const Y=Z=>{var ee,Q;U={x:Math.abs(Math.round(Z.pageX)-(((ee=j.current)==null?void 0:ee.x)??0)),y:Math.abs(Math.round(Z.pageY)-(((Q=j.current)==null?void 0:Q.y)??0))}},K=Z=>{U.x<=10&&U.y<=10?Z.preventDefault():w.contains(Z.target)||R(!1),document.removeEventListener("pointermove",Y),j.current=null};return j.current!==null&&(document.addEventListener("pointermove",Y),document.addEventListener("pointerup",K,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Y),document.removeEventListener("pointerup",K,{capture:!0})}}},[w,R,j]),h.useEffect(()=>{const U=()=>R(!1);return window.addEventListener("blur",U),window.addEventListener("resize",U),()=>{window.removeEventListener("blur",U),window.removeEventListener("resize",U)}},[R]);const[O,G]=d2(U=>{const Y=D().filter(ee=>!ee.disabled),K=Y.find(ee=>ee.ref.current===document.activeElement),Z=f2(Y,U,K);Z&&setTimeout(()=>Z.ref.current.focus())}),$=h.useCallback((U,Y,K)=>{const Z=!L.current&&!K;(x.value!==void 0&&x.value===Y||Z)&&(M(U),Z&&(L.current=!0))},[x.value]),X=h.useCallback(()=>w==null?void 0:w.focus(),[w]),H=h.useCallback((U,Y,K)=>{const Z=!L.current&&!K;(x.value!==void 0&&x.value===Y||Z)&&A(U)},[x.value]),W=o==="popper"?Ap:qC,z=W===Ap?{side:l,sideOffset:c,align:u,alignOffset:f,arrowPadding:d,collisionBoundary:p,collisionPadding:m,sticky:y,hideWhenDetached:b,avoidCollisions:_}:{};return g.jsx(XC,{scope:r,content:w,viewport:C,onViewportChange:E,itemRefCallback:$,selectedItem:N,onItemLeave:X,itemTextRefCallback:H,focusSelectedItem:F,selectedItemText:T,position:o,isPositioned:V,searchRef:O,children:g.jsx(Sa,{as:y6,allowPinchZoom:!0,children:g.jsx(ba,{asChild:!0,trapped:x.open,onMountAutoFocus:U=>{U.preventDefault()},onUnmountAutoFocus:ne(i,U=>{var Y;(Y=x.trigger)==null||Y.focus({preventScroll:!0}),U.preventDefault()}),children:g.jsx($i,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:U=>U.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:g.jsx(W,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:U=>U.preventDefault(),...v,...z,onPlaced:()=>P(!0),ref:k,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:ne(v.onKeyDown,U=>{const Y=U.ctrlKey||U.altKey||U.metaKey;if(U.key==="Tab"&&U.preventDefault(),!Y&&U.key.length===1&&G(U.key),["ArrowUp","ArrowDown","Home","End"].includes(U.key)){let Z=D().filter(ee=>!ee.disabled).map(ee=>ee.ref.current);if(["ArrowUp","End"].includes(U.key)&&(Z=Z.slice().reverse()),["ArrowUp","ArrowDown"].includes(U.key)){const ee=U.target,Q=Z.indexOf(ee);Z=Z.slice(Q+1)}setTimeout(()=>I(Z)),U.preventDefault()}})})})})})})});KC.displayName=g6;var v6="SelectItemAlignedPosition",qC=h.forwardRef((e,n)=>{const{__scopeSelect:r,onPlaced:o,...i}=e,s=Br(mo,r),a=Hr(mo,r),[l,c]=h.useState(null),[u,f]=h.useState(null),d=he(n,k=>f(k)),p=Gu(r),m=h.useRef(!1),y=h.useRef(!0),{viewport:b,selectedItem:_,selectedItemText:v,focusSelectedItem:x}=a,w=h.useCallback(()=>{if(s.trigger&&s.valueNode&&l&&u&&b&&_&&v){const k=s.trigger.getBoundingClientRect(),N=u.getBoundingClientRect(),M=s.valueNode.getBoundingClientRect(),T=v.getBoundingClientRect();if(s.dir!=="rtl"){const ee=T.left-N.left,Q=M.left-ee,te=k.left-Q,ce=k.width+te,me=Math.max(ce,N.width),ue=window.innerWidth-Xt,ye=e0(Q,[Xt,Math.max(Xt,ue-me)]);l.style.minWidth=ce+"px",l.style.left=ye+"px"}else{const ee=N.right-T.right,Q=window.innerWidth-M.right-ee,te=window.innerWidth-k.right-Q,ce=k.width+te,me=Math.max(ce,N.width),ue=window.innerWidth-Xt,ye=e0(Q,[Xt,Math.max(Xt,ue-me)]);l.style.minWidth=ce+"px",l.style.right=ye+"px"}const A=p(),D=window.innerHeight-Xt*2,V=b.scrollHeight,P=window.getComputedStyle(u),L=parseInt(P.borderTopWidth,10),I=parseInt(P.paddingTop,10),F=parseInt(P.borderBottomWidth,10),R=parseInt(P.paddingBottom,10),j=L+I+V+R+F,O=Math.min(_.offsetHeight*5,j),G=window.getComputedStyle(b),$=parseInt(G.paddingTop,10),X=parseInt(G.paddingBottom,10),H=k.top+k.height/2-Xt,W=D-H,z=_.offsetHeight/2,U=_.offsetTop+z,Y=L+I+U,K=j-Y;if(Y<=H){const ee=A.length>0&&_===A[A.length-1].ref.current;l.style.bottom="0px";const Q=u.clientHeight-b.offsetTop-b.offsetHeight,te=Math.max(W,z+(ee?X:0)+Q+F),ce=Y+te;l.style.height=ce+"px"}else{const ee=A.length>0&&_===A[0].ref.current;l.style.top="0px";const te=Math.max(H,L+b.offsetTop+(ee?$:0)+z)+K;l.style.height=te+"px",b.scrollTop=Y-H+b.offsetTop}l.style.margin=`${Xt}px 0`,l.style.minHeight=O+"px",l.style.maxHeight=D+"px",o==null||o(),requestAnimationFrame(()=>m.current=!0)}},[p,s.trigger,s.valueNode,l,u,b,_,v,s.dir,o]);He(()=>w(),[w]);const[S,C]=h.useState();He(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);const E=h.useCallback(k=>{k&&y.current===!0&&(w(),x==null||x(),y.current=!1)},[w,x]);return g.jsx(w6,{scope:r,contentWrapper:l,shouldExpandOnScrollRef:m,onScrollButtonChange:E,children:g.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:g.jsx(At.div,{...i,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});qC.displayName=v6;var x6="SelectPopperPosition",Ap=h.forwardRef((e,n)=>{const{__scopeSelect:r,align:o="start",collisionPadding:i=Xt,...s}=e,a=Zm(r);return g.jsx(zu,{...a,...s,ref:n,align:o,collisionPadding:i,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Ap.displayName=x6;var[w6,Qm]=zi(mo,{}),Tp="SelectViewport",ZC=h.forwardRef((e,n)=>{const{__scopeSelect:r,nonce:o,...i}=e,s=Hr(Tp,r),a=Qm(Tp,r),l=he(n,s.onViewportChange),c=h.useRef(0);return g.jsxs(g.Fragment,{children:[g.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),g.jsx(qm.Slot,{scope:r,children:g.jsx(At.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:ne(i.onScroll,u=>{const f=u.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:p}=a;if(p!=null&&p.current&&d){const m=Math.abs(c.current-f.scrollTop);if(m>0){const y=window.innerHeight-Xt*2,b=parseFloat(d.style.minHeight),_=parseFloat(d.style.height),v=Math.max(b,_);if(v<y){const x=v+m,w=Math.min(y,x),S=x-w;d.style.height=w+"px",d.style.bottom==="0px"&&(f.scrollTop=S>0?S:0,d.style.justifyContent="flex-end")}}}c.current=f.scrollTop})})})]})});ZC.displayName=Tp;var QC="SelectGroup",[b6,_6]=zi(QC),S6=h.forwardRef((e,n)=>{const{__scopeSelect:r,...o}=e,i=kt();return g.jsx(b6,{scope:r,id:i,children:g.jsx(At.div,{role:"group","aria-labelledby":i,...o,ref:n})})});S6.displayName=QC;var JC="SelectLabel",e2=h.forwardRef((e,n)=>{const{__scopeSelect:r,...o}=e,i=_6(JC,r);return g.jsx(At.div,{id:i.id,...o,ref:n})});e2.displayName=JC;var Lc="SelectItem",[C6,t2]=zi(Lc),n2=h.forwardRef((e,n)=>{const{__scopeSelect:r,value:o,disabled:i=!1,textValue:s,...a}=e,l=Br(Lc,r),c=Hr(Lc,r),u=l.value===o,[f,d]=h.useState(s??""),[p,m]=h.useState(!1),y=he(n,x=>{var w;return(w=c.itemRefCallback)==null?void 0:w.call(c,x,o,i)}),b=kt(),_=h.useRef("touch"),v=()=>{i||(l.onValueChange(o),l.onOpenChange(!1))};if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return g.jsx(C6,{scope:r,value:o,disabled:i,textId:b,isSelected:u,onItemTextChange:h.useCallback(x=>{d(w=>w||((x==null?void 0:x.textContent)??"").trim())},[]),children:g.jsx(qm.ItemSlot,{scope:r,value:o,disabled:i,textValue:f,children:g.jsx(At.div,{role:"option","aria-labelledby":b,"data-highlighted":p?"":void 0,"aria-selected":u&&p,"data-state":u?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...a,ref:y,onFocus:ne(a.onFocus,()=>m(!0)),onBlur:ne(a.onBlur,()=>m(!1)),onClick:ne(a.onClick,()=>{_.current!=="mouse"&&v()}),onPointerUp:ne(a.onPointerUp,()=>{_.current==="mouse"&&v()}),onPointerDown:ne(a.onPointerDown,x=>{_.current=x.pointerType}),onPointerMove:ne(a.onPointerMove,x=>{var w;_.current=x.pointerType,i?(w=c.onItemLeave)==null||w.call(c):_.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ne(a.onPointerLeave,x=>{var w;x.currentTarget===document.activeElement&&((w=c.onItemLeave)==null||w.call(c))}),onKeyDown:ne(a.onKeyDown,x=>{var S;((S=c.searchRef)==null?void 0:S.current)!==""&&x.key===" "||(u6.includes(x.key)&&v(),x.key===" "&&x.preventDefault())})})})})});n2.displayName=Lc;var hs="SelectItemText",r2=h.forwardRef((e,n)=>{const{__scopeSelect:r,className:o,style:i,...s}=e,a=Br(hs,r),l=Hr(hs,r),c=t2(hs,r),u=f6(hs,r),[f,d]=h.useState(null),p=he(n,v=>d(v),c.onItemTextChange,v=>{var x;return(x=l.itemTextRefCallback)==null?void 0:x.call(l,v,c.value,c.disabled)}),m=f==null?void 0:f.textContent,y=h.useMemo(()=>g.jsx("option",{value:c.value,disabled:c.disabled,children:m},c.value),[c.disabled,c.value,m]),{onNativeOptionAdd:b,onNativeOptionRemove:_}=u;return He(()=>(b(y),()=>_(y)),[b,_,y]),g.jsxs(g.Fragment,{children:[g.jsx(At.span,{id:c.textId,...s,ref:p}),c.isSelected&&a.valueNode&&!a.valueNodeHasChildren?_o.createPortal(s.children,a.valueNode):null]})});r2.displayName=hs;var o2="SelectItemIndicator",i2=h.forwardRef((e,n)=>{const{__scopeSelect:r,...o}=e;return t2(o2,r).isSelected?g.jsx(At.span,{"aria-hidden":!0,...o,ref:n}):null});i2.displayName=o2;var Ip="SelectScrollUpButton",s2=h.forwardRef((e,n)=>{const r=Hr(Ip,e.__scopeSelect),o=Qm(Ip,e.__scopeSelect),[i,s]=h.useState(!1),a=he(n,o.onScrollButtonChange);return He(()=>{if(r.viewport&&r.isPositioned){let l=function(){const u=c.scrollTop>0;s(u)};const c=r.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),i?g.jsx(l2,{...e,ref:a,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=r;l&&c&&(l.scrollTop=l.scrollTop-c.offsetHeight)}}):null});s2.displayName=Ip;var $p="SelectScrollDownButton",a2=h.forwardRef((e,n)=>{const r=Hr($p,e.__scopeSelect),o=Qm($p,e.__scopeSelect),[i,s]=h.useState(!1),a=he(n,o.onScrollButtonChange);return He(()=>{if(r.viewport&&r.isPositioned){let l=function(){const u=c.scrollHeight-c.clientHeight,f=Math.ceil(c.scrollTop)<u;s(f)};const c=r.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),i?g.jsx(l2,{...e,ref:a,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=r;l&&c&&(l.scrollTop=l.scrollTop+c.offsetHeight)}}):null});a2.displayName=$p;var l2=h.forwardRef((e,n)=>{const{__scopeSelect:r,onAutoScroll:o,...i}=e,s=Hr("SelectScrollButton",r),a=h.useRef(null),l=Gu(r),c=h.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return h.useEffect(()=>()=>c(),[c]),He(()=>{var f;const u=l().find(d=>d.ref.current===document.activeElement);(f=u==null?void 0:u.ref.current)==null||f.scrollIntoView({block:"nearest"})},[l]),g.jsx(At.div,{"aria-hidden":!0,...i,ref:n,style:{flexShrink:0,...i.style},onPointerDown:ne(i.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(o,50))}),onPointerMove:ne(i.onPointerMove,()=>{var u;(u=s.onItemLeave)==null||u.call(s),a.current===null&&(a.current=window.setInterval(o,50))}),onPointerLeave:ne(i.onPointerLeave,()=>{c()})})}),E6="SelectSeparator",c2=h.forwardRef((e,n)=>{const{__scopeSelect:r,...o}=e;return g.jsx(At.div,{"aria-hidden":!0,...o,ref:n})});c2.displayName=E6;var Op="SelectArrow",k6=h.forwardRef((e,n)=>{const{__scopeSelect:r,...o}=e,i=Zm(r),s=Br(Op,r),a=Hr(Op,r);return s.open&&a.position==="popper"?g.jsx(Fu,{...i,...o,ref:n}):null});k6.displayName=Op;var N6="SelectBubbleInput",P6=h.forwardRef(({__scopeSelect:e,value:n,...r},o)=>{const i=h.useRef(null),s=he(o,i),a=bm(n);return h.useEffect(()=>{const l=i.current;if(!l)return;const c=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(c,"value").set;if(a!==n&&f){const d=new Event("change",{bubbles:!0});f.call(l,n),l.dispatchEvent(d)}},[a,n]),g.jsx(At.select,{...r,style:{...FC,...r.style},ref:s,defaultValue:n})});P6.displayName=N6;function u2(e){return e===""||e===void 0}function d2(e){const n=Sn(e),r=h.useRef(""),o=h.useRef(0),i=h.useCallback(a=>{const l=r.current+a;n(l),function c(u){r.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>c(""),1e3))}(l)},[n]),s=h.useCallback(()=>{r.current="",window.clearTimeout(o.current)},[]);return h.useEffect(()=>()=>window.clearTimeout(o.current),[]),[r,i,s]}function f2(e,n,r){const i=n.length>1&&Array.from(n).every(u=>u===n[0])?n[0]:n,s=r?e.indexOf(r):-1;let a=M6(e,Math.max(s,0));i.length===1&&(a=a.filter(u=>u!==r));const c=a.find(u=>u.textValue.toLowerCase().startsWith(i.toLowerCase()));return c!==r?c:void 0}function M6(e,n){return e.map((r,o)=>e[(n+o)%e.length])}var p2=HC,R6=UC,j6=GC,h2=YC,A6=ZC,m2=e2,g2=n2,T6=r2,I6=i2,y2=s2,v2=a2,x2=c2;const $6=h.forwardRef(({className:e,children:n,...r},o)=>g.jsxs(p2,{ref:o,className:se("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-transparent bg-input px-3 py-2 text-sm ring-offset-background data-[placeholder]:text-muted-foreground/50 data-[placeholder]:font-light focus:outline-none focus:border-ring focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...r,children:[n,g.jsx(R6,{asChild:!0,children:g.jsx(vm,{className:"h-4 w-4 opacity-50"})})]}));$6.displayName=p2.displayName;const w2=h.forwardRef(({className:e,...n},r)=>g.jsx(y2,{ref:r,className:se("flex cursor-default items-center justify-center py-1",e),...n,children:g.jsx($A,{className:"h-4 w-4"})}));w2.displayName=y2.displayName;const b2=h.forwardRef(({className:e,...n},r)=>g.jsx(v2,{ref:r,className:se("flex cursor-default items-center justify-center py-1",e),...n,children:g.jsx(vm,{className:"h-4 w-4"})}));b2.displayName=v2.displayName;const O6=h.forwardRef(({className:e,children:n,position:r="popper",...o},i)=>g.jsx(j6,{children:g.jsxs(h2,{ref:i,className:se("relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-select-content-transform-origin]",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...o,children:[g.jsx(w2,{}),g.jsx(A6,{className:se("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:n}),g.jsx(b2,{})]})}));O6.displayName=h2.displayName;const D6=h.forwardRef(({className:e,...n},r)=>g.jsx(m2,{ref:r,className:se("px-2 py-1.5 text-sm font-semibold",e),...n}));D6.displayName=m2.displayName;const L6=h.forwardRef(({className:e,children:n,...r},o)=>g.jsxs(g2,{ref:o,className:se("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[g.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:g.jsx(I6,{children:g.jsx(ym,{className:"h-4 w-4"})})}),g.jsx(T6,{children:n})]}));L6.displayName=g2.displayName;const z6=h.forwardRef(({className:e,...n},r)=>g.jsx(x2,{ref:r,className:se("-mx-1 my-1 h-px bg-muted",e),...n}));z6.displayName=x2.displayName;var F6="Separator",t0="horizontal",V6=["horizontal","vertical"],_2=h.forwardRef((e,n)=>{const{decorative:r,orientation:o=t0,...i}=e,s=B6(o)?o:t0,l=r?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return g.jsx(lt.div,{"data-orientation":s,...l,...i,ref:n})});_2.displayName=F6;function B6(e){return V6.includes(e)}var S2=_2;const H6=h.forwardRef(({className:e,orientation:n="horizontal",decorative:r=!0,...o},i)=>g.jsx(S2,{ref:i,decorative:r,orientation:n,className:se("shrink-0 bg-border",n==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...o}));H6.displayName=S2.displayName;const W6=Mm,C2=h.forwardRef(({className:e,...n},r)=>g.jsx(Ca,{className:se("fixed inset-0 z-50 bg-black/80 [will-change:opacity] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...n,ref:r}));C2.displayName=Ca.displayName;const U6=hm("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out [will-change:transform,opacity] data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),G6=h.forwardRef(({side:e="right",className:n,children:r,...o},i)=>g.jsxs(W6,{children:[g.jsx(C2,{}),g.jsxs(Ea,{ref:i,className:se(U6({side:e}),n),...o,children:[g.jsxs(B_,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[g.jsx(Mc,{className:"h-4 w-4"}),g.jsx("span",{className:"sr-only",children:"Close"})]}),r]})]}));G6.displayName=Ea.displayName;const Y6=h.forwardRef(({className:e,...n},r)=>g.jsx(Au,{ref:r,className:se("text-lg font-semibold text-foreground",e),...n}));Y6.displayName=Au.displayName;const X6=h.forwardRef(({className:e,...n},r)=>g.jsx(Tu,{ref:r,className:se("text-sm text-muted-foreground",e),...n}));X6.displayName=Tu.displayName;function K6(e,n=[]){let r=[];function o(s,a){const l=h.createContext(a),c=r.length;r=[...r,a];const u=d=>{var v;const{scope:p,children:m,...y}=d,b=((v=p==null?void 0:p[e])==null?void 0:v[c])||l,_=h.useMemo(()=>y,Object.values(y));return g.jsx(b.Provider,{value:_,children:m})};u.displayName=s+"Provider";function f(d,p){var b;const m=((b=p==null?void 0:p[e])==null?void 0:b[c])||l,y=h.useContext(m);if(y)return y;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[u,f]}const i=()=>{const s=r.map(a=>h.createContext(a));return function(l){const c=(l==null?void 0:l[e])||s;return h.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[o,q6(i,...n)]}function q6(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=o.reduce((l,{useScope:c,scopeName:u})=>{const d=c(s)[`__scope${u}`];return{...l,...d}},{});return h.useMemo(()=>({[`__scope${n.scopeName}`]:a}),[a])}};return r.scopeName=n.scopeName,r}function Z6(e){const n=Q6(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(e8);if(c){const u=c.props.children,f=l.map(d=>d===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:d);return g.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,f):null})}return g.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function Q6(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=n8(i),l=t8(s,i.props);return i.type!==h.Fragment&&(l.ref=o?Se(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var J6=Symbol("radix.slottable");function e8(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===J6}function t8(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function n8(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var r8=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],E2=r8.reduce((e,n)=>{const r=Z6(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{}),Yu="Switch",[o8]=K6(Yu),[i8,s8]=o8(Yu),k2=h.forwardRef((e,n)=>{const{__scopeSwitch:r,name:o,checked:i,defaultChecked:s,required:a,disabled:l,value:c="on",onCheckedChange:u,form:f,...d}=e,[p,m]=h.useState(null),y=he(n,w=>m(w)),b=h.useRef(!1),_=p?f||!!p.closest("form"):!0,[v,x]=wa({prop:i,defaultProp:s??!1,onChange:u,caller:Yu});return g.jsxs(i8,{scope:r,checked:v,disabled:l,children:[g.jsx(E2.button,{type:"button",role:"switch","aria-checked":v,"aria-required":a,"data-state":R2(v),"data-disabled":l?"":void 0,disabled:l,value:c,...d,ref:y,onClick:ne(e.onClick,w=>{x(S=>!S),_&&(b.current=w.isPropagationStopped(),b.current||w.stopPropagation())})}),_&&g.jsx(M2,{control:p,bubbles:!b.current,name:o,value:c,checked:v,required:a,disabled:l,form:f,style:{transform:"translateX(-100%)"}})]})});k2.displayName=Yu;var N2="SwitchThumb",P2=h.forwardRef((e,n)=>{const{__scopeSwitch:r,...o}=e,i=s8(N2,r);return g.jsx(E2.span,{"data-state":R2(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:n})});P2.displayName=N2;var a8="SwitchBubbleInput",M2=h.forwardRef(({__scopeSwitch:e,control:n,checked:r,bubbles:o=!0,...i},s)=>{const a=h.useRef(null),l=he(a,s),c=bm(r),u=_m(n);return h.useEffect(()=>{const f=a.current;if(!f)return;const d=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(d,"checked").set;if(c!==r&&m){const y=new Event("click",{bubbles:o});m.call(f,r),f.dispatchEvent(y)}},[c,r,o]),g.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...i,tabIndex:-1,ref:l,style:{...i.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});M2.displayName=a8;function R2(e){return e?"checked":"unchecked"}var j2=k2,l8=P2;const c8=h.forwardRef(({className:e,...n},r)=>g.jsx(j2,{ref:r,className:se("peer inline-flex h-4 w-7 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...n,children:g.jsx(l8,{className:se("pointer-events-none block h-3 w-3 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-3 data-[state=unchecked]:translate-x-0")})}));c8.displayName=j2.displayName;function u8(e){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}Array(12).fill(0);let Dp=1;class d8{constructor(){this.subscribe=n=>(this.subscribers.push(n),()=>{const r=this.subscribers.indexOf(n);this.subscribers.splice(r,1)}),this.publish=n=>{this.subscribers.forEach(r=>r(n))},this.addToast=n=>{this.publish(n),this.toasts=[...this.toasts,n]},this.create=n=>{var r;const{message:o,...i}=n,s=typeof(n==null?void 0:n.id)=="number"||((r=n.id)==null?void 0:r.length)>0?n.id:Dp++,a=this.toasts.find(c=>c.id===s),l=n.dismissible===void 0?!0:n.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),a?this.toasts=this.toasts.map(c=>c.id===s?(this.publish({...c,...n,id:s,title:o}),{...c,...n,id:s,dismissible:l,title:o}):c):this.addToast({title:o,...i,dismissible:l,id:s}),s},this.dismiss=n=>(n?(this.dismissedToasts.add(n),requestAnimationFrame(()=>this.subscribers.forEach(r=>r({id:n,dismiss:!0})))):this.toasts.forEach(r=>{this.subscribers.forEach(o=>o({id:r.id,dismiss:!0}))}),n),this.message=(n,r)=>this.create({...r,message:n}),this.error=(n,r)=>this.create({...r,message:n,type:"error"}),this.success=(n,r)=>this.create({...r,type:"success",message:n}),this.info=(n,r)=>this.create({...r,type:"info",message:n}),this.warning=(n,r)=>this.create({...r,type:"warning",message:n}),this.loading=(n,r)=>this.create({...r,type:"loading",message:n}),this.promise=(n,r)=>{if(!r)return;let o;r.loading!==void 0&&(o=this.create({...r,promise:n,type:"loading",message:r.loading,description:typeof r.description!="function"?r.description:void 0}));const i=Promise.resolve(n instanceof Function?n():n);let s=o!==void 0,a;const l=i.then(async u=>{if(a=["resolve",u],Je.isValidElement(u))s=!1,this.create({id:o,type:"default",message:u});else if(p8(u)&&!u.ok){s=!1;const d=typeof r.error=="function"?await r.error(`HTTP error! status: ${u.status}`):r.error,p=typeof r.description=="function"?await r.description(`HTTP error! status: ${u.status}`):r.description,y=typeof d=="object"&&!Je.isValidElement(d)?d:{message:d};this.create({id:o,type:"error",description:p,...y})}else if(u instanceof Error){s=!1;const d=typeof r.error=="function"?await r.error(u):r.error,p=typeof r.description=="function"?await r.description(u):r.description,y=typeof d=="object"&&!Je.isValidElement(d)?d:{message:d};this.create({id:o,type:"error",description:p,...y})}else if(r.success!==void 0){s=!1;const d=typeof r.success=="function"?await r.success(u):r.success,p=typeof r.description=="function"?await r.description(u):r.description,y=typeof d=="object"&&!Je.isValidElement(d)?d:{message:d};this.create({id:o,type:"success",description:p,...y})}}).catch(async u=>{if(a=["reject",u],r.error!==void 0){s=!1;const f=typeof r.error=="function"?await r.error(u):r.error,d=typeof r.description=="function"?await r.description(u):r.description,m=typeof f=="object"&&!Je.isValidElement(f)?f:{message:f};this.create({id:o,type:"error",description:d,...m})}}).finally(()=>{s&&(this.dismiss(o),o=void 0),r.finally==null||r.finally.call(r)}),c=()=>new Promise((u,f)=>l.then(()=>a[0]==="reject"?f(a[1]):u(a[1])).catch(f));return typeof o!="string"&&typeof o!="number"?{unwrap:c}:Object.assign(o,{unwrap:c})},this.custom=(n,r)=>{const o=(r==null?void 0:r.id)||Dp++;return this.create({jsx:n(o),id:o,...r}),o},this.getActiveToasts=()=>this.toasts.filter(n=>!this.dismissedToasts.has(n.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const $t=new d8,f8=(e,n)=>{const r=(n==null?void 0:n.id)||Dp++;return $t.addToast({title:e,...n,id:r}),r},p8=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",h8=f8,m8=()=>$t.toasts,g8=()=>$t.getActiveToasts();Object.assign(h8,{success:$t.success,info:$t.info,warning:$t.warning,error:$t.error,custom:$t.custom,message:$t.message,promise:$t.promise,dismiss:$t.dismiss,loading:$t.loading},{getHistory:m8,getToasts:g8});u8("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function y8(e,n=[]){let r=[];function o(s,a){const l=h.createContext(a),c=r.length;r=[...r,a];const u=d=>{var v;const{scope:p,children:m,...y}=d,b=((v=p==null?void 0:p[e])==null?void 0:v[c])||l,_=h.useMemo(()=>y,Object.values(y));return g.jsx(b.Provider,{value:_,children:m})};u.displayName=s+"Provider";function f(d,p){var b;const m=((b=p==null?void 0:p[e])==null?void 0:b[c])||l,y=h.useContext(m);if(y)return y;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[u,f]}const i=()=>{const s=r.map(a=>h.createContext(a));return function(l){const c=(l==null?void 0:l[e])||s;return h.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[o,v8(i,...n)]}function v8(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=o.reduce((l,{useScope:c,scopeName:u})=>{const d=c(s)[`__scope${u}`];return{...l,...d}},{});return h.useMemo(()=>({[`__scope${n.scopeName}`]:a}),[a])}};return r.scopeName=n.scopeName,r}function x8(e){const n=w8(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(_8);if(c){const u=c.props.children,f=l.map(d=>d===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:d);return g.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,f):null})}return g.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function w8(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=C8(i),l=S8(s,i.props);return i.type!==h.Fragment&&(l.ref=o?Se(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var b8=Symbol("radix.slottable");function _8(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===b8}function S8(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function C8(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var E8=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Xu=E8.reduce((e,n)=>{const r=x8(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{}),Ku="Tabs",[k8]=y8(Ku,[Vu]),A2=Vu(),[N8,Jm]=k8(Ku),P8=h.forwardRef((e,n)=>{const{__scopeTabs:r,value:o,onValueChange:i,defaultValue:s,orientation:a="horizontal",dir:l,activationMode:c="automatic",...u}=e,f=Z_(l),[d,p]=wa({prop:o,onChange:i,defaultProp:s??"",caller:Ku});return g.jsx(N8,{scope:r,baseId:kt(),value:d,onValueChange:p,orientation:a,dir:f,activationMode:c,children:g.jsx(Xu.div,{dir:f,"data-orientation":a,...u,ref:n})})});P8.displayName=Ku;var T2="TabsList",I2=h.forwardRef((e,n)=>{const{__scopeTabs:r,loop:o=!0,...i}=e,s=Jm(T2,r),a=A2(r);return g.jsx(NS,{asChild:!0,...a,orientation:s.orientation,dir:s.dir,loop:o,children:g.jsx(Xu.div,{role:"tablist","aria-orientation":s.orientation,...i,ref:n})})});I2.displayName=T2;var $2="TabsTrigger",O2=h.forwardRef((e,n)=>{const{__scopeTabs:r,value:o,disabled:i=!1,...s}=e,a=Jm($2,r),l=A2(r),c=z2(a.baseId,o),u=F2(a.baseId,o),f=o===a.value;return g.jsx(PS,{asChild:!0,...l,focusable:!i,active:f,children:g.jsx(Xu.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":u,"data-state":f?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:c,...s,ref:n,onMouseDown:ne(e.onMouseDown,d=>{!i&&d.button===0&&d.ctrlKey===!1?a.onValueChange(o):d.preventDefault()}),onKeyDown:ne(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&a.onValueChange(o)}),onFocus:ne(e.onFocus,()=>{const d=a.activationMode!=="manual";!f&&!i&&d&&a.onValueChange(o)})})})});O2.displayName=$2;var D2="TabsContent",L2=h.forwardRef((e,n)=>{const{__scopeTabs:r,value:o,forceMount:i,children:s,...a}=e,l=Jm(D2,r),c=z2(l.baseId,o),u=F2(l.baseId,o),f=o===l.value,d=h.useRef(f);return h.useEffect(()=>{const p=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(p)},[]),g.jsx(yt,{present:i||f,children:({present:p})=>g.jsx(Xu.div,{"data-state":f?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":c,hidden:!p,id:u,tabIndex:0,...a,ref:n,style:{...e.style,animationDuration:d.current?"0s":void 0},children:p&&s})})});L2.displayName=D2;function z2(e,n){return`${e}-trigger-${n}`}function F2(e,n){return`${e}-content-${n}`}var V2=I2,B2=O2,H2=L2;const M8=h.forwardRef(({className:e,...n},r)=>g.jsx(V2,{ref:r,className:se("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...n}));M8.displayName=V2.displayName;const R8=h.forwardRef(({className:e,...n},r)=>g.jsx(B2,{ref:r,className:se("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-primary/10 data-[state=active]:text-primary data-[state=active]:shadow-sm",e),...n}));R8.displayName=B2.displayName;const j8=h.forwardRef(({className:e,...n},r)=>g.jsx(H2,{ref:r,className:se("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...n}));j8.displayName=H2.displayName;const A8=h.forwardRef(({className:e,...n},r)=>g.jsx("textarea",{className:se("flex min-h-[60px] w-full rounded-md border border-transparent bg-input px-3 py-2 text-base placeholder:text-muted-foreground/50 placeholder:font-light focus-visible:outline-none focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));A8.displayName="Textarea";function T8(e,n=[]){let r=[];function o(s,a){const l=h.createContext(a),c=r.length;r=[...r,a];const u=d=>{var v;const{scope:p,children:m,...y}=d,b=((v=p==null?void 0:p[e])==null?void 0:v[c])||l,_=h.useMemo(()=>y,Object.values(y));return g.jsx(b.Provider,{value:_,children:m})};u.displayName=s+"Provider";function f(d,p){var b;const m=((b=p==null?void 0:p[e])==null?void 0:b[c])||l,y=h.useContext(m);if(y)return y;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[u,f]}const i=()=>{const s=r.map(a=>h.createContext(a));return function(l){const c=(l==null?void 0:l[e])||s;return h.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[o,I8(i,...n)]}function I8(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=o.reduce((l,{useScope:c,scopeName:u})=>{const d=c(s)[`__scope${u}`];return{...l,...d}},{});return h.useMemo(()=>({[`__scope${n.scopeName}`]:a}),[a])}};return r.scopeName=n.scopeName,r}function $8(e){const n=O8(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(L8);if(c){const u=c.props.children,f=l.map(d=>d===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:d);return g.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,f):null})}return g.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function O8(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=F8(i),l=z8(s,i.props);return i.type!==h.Fragment&&(l.ref=o?Se(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var W2=Symbol("radix.slottable");function D8(e){const n=({children:r})=>g.jsx(g.Fragment,{children:r});return n.displayName=`${e}.Slottable`,n.__radixId=W2,n}function L8(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===W2}function z8(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function F8(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var V8=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],B8=V8.reduce((e,n)=>{const r=$8(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{}),[qu]=T8("Tooltip",[Fr]),eg=Fr(),H8="TooltipProvider",n0="tooltip.open",[wK,U2]=qu(H8),G2="Tooltip",[bK,Aa]=qu(G2),Lp="TooltipTrigger",W8=h.forwardRef((e,n)=>{const{__scopeTooltip:r,...o}=e,i=Aa(Lp,r),s=U2(Lp,r),a=eg(r),l=h.useRef(null),c=he(n,l,i.onTriggerChange),u=h.useRef(!1),f=h.useRef(!1),d=h.useCallback(()=>u.current=!1,[]);return h.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),g.jsx(Pa,{asChild:!0,...a,children:g.jsx(B8.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...o,ref:c,onPointerMove:ne(e.onPointerMove,p=>{p.pointerType!=="touch"&&!f.current&&!s.isPointerInTransitRef.current&&(i.onTriggerEnter(),f.current=!0)}),onPointerLeave:ne(e.onPointerLeave,()=>{i.onTriggerLeave(),f.current=!1}),onPointerDown:ne(e.onPointerDown,()=>{i.open&&i.onClose(),u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:ne(e.onFocus,()=>{u.current||i.onOpen()}),onBlur:ne(e.onBlur,i.onClose),onClick:ne(e.onClick,i.onClose)})})});W8.displayName=Lp;var tg="TooltipPortal",[U8,G8]=qu(tg,{forceMount:void 0}),Y2=e=>{const{__scopeTooltip:n,forceMount:r,children:o,container:i}=e,s=Aa(tg,n);return g.jsx(U8,{scope:n,forceMount:r,children:g.jsx(yt,{present:r||s.open,children:g.jsx(Oi,{asChild:!0,container:i,children:o})})})};Y2.displayName=tg;var wi="TooltipContent",X2=h.forwardRef((e,n)=>{const r=G8(wi,e.__scopeTooltip),{forceMount:o=r.forceMount,side:i="top",...s}=e,a=Aa(wi,e.__scopeTooltip);return g.jsx(yt,{present:o||a.open,children:a.disableHoverableContent?g.jsx(K2,{side:i,...s,ref:n}):g.jsx(Y8,{side:i,...s,ref:n})})}),Y8=h.forwardRef((e,n)=>{const r=Aa(wi,e.__scopeTooltip),o=U2(wi,e.__scopeTooltip),i=h.useRef(null),s=he(n,i),[a,l]=h.useState(null),{trigger:c,onClose:u}=r,f=i.current,{onPointerInTransitChange:d}=o,p=h.useCallback(()=>{l(null),d(!1)},[d]),m=h.useCallback((y,b)=>{const _=y.currentTarget,v={x:y.clientX,y:y.clientY},x=Q8(v,_.getBoundingClientRect()),w=J8(v,x),S=ez(b.getBoundingClientRect()),C=nz([...w,...S]);l(C),d(!0)},[d]);return h.useEffect(()=>()=>p(),[p]),h.useEffect(()=>{if(c&&f){const y=_=>m(_,f),b=_=>m(_,c);return c.addEventListener("pointerleave",y),f.addEventListener("pointerleave",b),()=>{c.removeEventListener("pointerleave",y),f.removeEventListener("pointerleave",b)}}},[c,f,m,p]),h.useEffect(()=>{if(a){const y=b=>{const _=b.target,v={x:b.clientX,y:b.clientY},x=(c==null?void 0:c.contains(_))||(f==null?void 0:f.contains(_)),w=!tz(v,a);x?p():w&&(p(),u())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[c,f,a,u,p]),g.jsx(K2,{...e,ref:s})}),[X8,K8]=qu(G2,{isInside:!1}),q8=D8("TooltipContent"),K2=h.forwardRef((e,n)=>{const{__scopeTooltip:r,children:o,"aria-label":i,onEscapeKeyDown:s,onPointerDownOutside:a,...l}=e,c=Aa(wi,r),u=eg(r),{onClose:f}=c;return h.useEffect(()=>(document.addEventListener(n0,f),()=>document.removeEventListener(n0,f)),[f]),h.useEffect(()=>{if(c.trigger){const d=p=>{const m=p.target;m!=null&&m.contains(c.trigger)&&f()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[c.trigger,f]),g.jsx($i,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:d=>d.preventDefault(),onDismiss:f,children:g.jsxs(zu,{"data-state":c.stateAttribute,...u,...l,ref:n,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[g.jsx(q8,{children:o}),g.jsx(X8,{scope:r,isInside:!0,children:g.jsx(l6,{id:c.contentId,role:"tooltip",children:i||o})})]})})});X2.displayName=wi;var q2="TooltipArrow",Z8=h.forwardRef((e,n)=>{const{__scopeTooltip:r,...o}=e,i=eg(r);return K8(q2,r).isInside?null:g.jsx(Fu,{...i,...o,ref:n})});Z8.displayName=q2;function Q8(e,n){const r=Math.abs(n.top-e.y),o=Math.abs(n.bottom-e.y),i=Math.abs(n.right-e.x),s=Math.abs(n.left-e.x);switch(Math.min(r,o,i,s)){case s:return"left";case i:return"right";case r:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function J8(e,n,r=5){const o=[];switch(n){case"top":o.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":o.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":o.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":o.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return o}function ez(e){const{top:n,right:r,bottom:o,left:i}=e;return[{x:i,y:n},{x:r,y:n},{x:r,y:o},{x:i,y:o}]}function tz(e,n){const{x:r,y:o}=e;let i=!1;for(let s=0,a=n.length-1;s<n.length;a=s++){const l=n[s],c=n[a],u=l.x,f=l.y,d=c.x,p=c.y;f>o!=p>o&&r<(d-u)*(o-f)/(p-f)+u&&(i=!i)}return i}function nz(e){const n=e.slice();return n.sort((r,o)=>r.x<o.x?-1:r.x>o.x?1:r.y<o.y?-1:r.y>o.y?1:0),rz(n)}function rz(e){if(e.length<=1)return e.slice();const n=[];for(let o=0;o<e.length;o++){const i=e[o];for(;n.length>=2;){const s=n[n.length-1],a=n[n.length-2];if((s.x-a.x)*(i.y-a.y)>=(s.y-a.y)*(i.x-a.x))n.pop();else break}n.push(i)}n.pop();const r=[];for(let o=e.length-1;o>=0;o--){const i=e[o];for(;r.length>=2;){const s=r[r.length-1],a=r[r.length-2];if((s.x-a.x)*(i.y-a.y)>=(s.y-a.y)*(i.x-a.x))r.pop();else break}r.push(i)}return r.pop(),n.length===1&&r.length===1&&n[0].x===r[0].x&&n[0].y===r[0].y?n:n.concat(r)}var oz=Y2,Z2=X2;const iz=h.forwardRef(({className:e,sideOffset:n=4,...r},o)=>g.jsx(oz,{children:g.jsx(Z2,{ref:o,sideOffset:n,className:se("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]",e),...r})}));iz.displayName=Z2.displayName;function sz(){const{setTheme:e,resolvedTheme:n}=o3();return g.jsxs(i_,{variant:"ghost",size:"icon",className:"relative h-8 w-8",onClick:()=>e(n==="dark"?"light":"dark"),children:[g.jsx(wT,{className:"h-4 w-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),g.jsx(sT,{className:"absolute h-4 w-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),g.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}function az(){return g.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[g.jsx("circle",{cx:"6",cy:"6",r:"2.5"}),g.jsx("circle",{cx:"18",cy:"6",r:"2.5"}),g.jsx("circle",{cx:"12",cy:"14",r:"2.5"}),g.jsx("circle",{cx:"6",cy:"20",r:"1.8"}),g.jsx("circle",{cx:"18",cy:"20",r:"1.8"}),g.jsx("path",{d:"M7.6 7.6 10.7 12.5"}),g.jsx("path",{d:"M16.4 7.6 13.3 12.5"}),g.jsx("path",{d:"M10.5 15.5 7.2 19"}),g.jsx("path",{d:"M13.5 15.5 16.8 19"})]})}function lz(){return g.jsxs("header",{className:"sticky top-0 z-40 flex h-[var(--header-height)] items-center border-b bg-background/80 px-4 shadow-sm backdrop-blur-md",children:[g.jsxs("span",{className:"logo",children:[g.jsx("span",{className:"logo-icon",children:g.jsx(az,{})}),g.jsx("span",{className:"logo-text",children:"LaunchChart"})]}),g.jsx("div",{className:"ml-auto flex items-center gap-2",children:g.jsx(sz,{})})]})}const cz=[{to:"/overview",label:"Overview",icon:ZA},{to:"/modules",label:"Modules",icon:gm},{to:"/sitemap",label:"Sitemap",icon:oT},{to:"/journeys",label:"User Journeys",icon:pT},{to:"/project-graph",label:"Project Graph",icon:lT},{to:"/settings",label:"Settings",icon:o_}],uz="sidebar-nav-item active relative flex items-center gap-3 overflow-hidden rounded-lg px-3 py-1.5 text-sm bg-gradient-to-r from-sidebar-primary/20 via-transparent via-80% to-transparent font-medium text-sidebar-foreground before:absolute before:left-0 before:top-0 before:h-full before:w-[3px] before:rounded-full before:bg-sidebar-primary",dz="sidebar-nav-item relative flex w-full items-center gap-3 overflow-hidden rounded-lg px-3 py-1.5 text-sm font-normal text-sidebar-muted-foreground transition-colors duration-200 hover:text-sidebar-foreground bg-transparent border-none cursor-pointer";function fz(){return g.jsx("aside",{className:"hidden lg:flex lg:flex-col w-[var(--sidebar-width)] sidebar-gradient",children:g.jsx("nav",{className:"flex-1 overflow-y-auto px-3 py-4",children:g.jsx("ul",{className:"space-y-1",children:cz.map(e=>{const n=e.icon;return g.jsx("li",{children:g.jsxs(e3,{to:e.to,className:({isActive:r})=>r?uz:dz,children:[g.jsx(n,{className:"h-4 w-4 shrink-0"}),e.label]})},e.to)})})})})}function pz(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var o,i,s,a,l=[],c=!0,u=!1;try{if(s=(r=r.call(e)).next,n===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(o=s.call(r)).done)&&(l.push(o.value),l.length!==n);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return l}}function hz(e,n,r){return n=_z(n),n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function r0(e,n){return yz(e)||pz(e,n)||Q2(e,n)||wz()}function mz(e){return gz(e)||vz(e)||Q2(e)||xz()}function gz(e){if(Array.isArray(e))return zp(e)}function yz(e){if(Array.isArray(e))return e}function vz(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Q2(e,n){if(e){if(typeof e=="string")return zp(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return zp(e,n)}}function zp(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,o=new Array(n);r<n;r++)o[r]=e[r];return o}function xz(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
345
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wz(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
346
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bz(e,n){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,n);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function _z(e){var n=bz(e,"string");return typeof n=="symbol"?n:String(n)}var Sz=function(n,r){var o=new Set(r);return Object.assign.apply(Object,[{}].concat(mz(Object.entries(n).filter(function(i){var s=r0(i,1),a=s[0];return!o.has(a)}).map(function(i){var s=r0(i,2),a=s[0],l=s[1];return hz({},a,l)}))))};function Fp(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,o=Array(n);r<n;r++)o[r]=e[r];return o}function Cz(e){if(Array.isArray(e))return e}function Ez(e){if(Array.isArray(e))return Fp(e)}function kz(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Nz(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var o,i,s,a,l=[],c=!0,u=!1;try{if(s=(r=r.call(e)).next,n!==0)for(;!(c=(o=s.call(r)).done)&&(l.push(o.value),l.length!==n);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return l}}function Pz(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
347
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Mz(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
348
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Rz(e,n){return Cz(e)||Nz(e,n)||J2(e,n)||Pz()}function o0(e){return Ez(e)||kz(e)||J2(e)||Mz()}function J2(e,n){if(e){if(typeof e=="string")return Fp(e,n);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Fp(e,n):void 0}}function jz(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.wrapperElementType,o=r===void 0?"div":r,i=n.nodeMapper,s=i===void 0?function(f){return f}:i,a=n.methodNames,l=a===void 0?[]:a,c=n.initPropNames,u=c===void 0?[]:c;return h.forwardRef(function(f,d){var p=h.useRef(),m=h.useMemo(function(){var _=Object.fromEntries(u.filter(function(v){return f.hasOwnProperty(v)}).map(function(v){return[v,f[v]]}));return e(_)},[]);i0(function(){m(s(p.current))},h.useLayoutEffect),i0(function(){return m._destructor instanceof Function?m._destructor:void 0});var y=h.useCallback(function(_){for(var v=arguments.length,x=new Array(v>1?v-1:0),w=1;w<v;w++)x[w-1]=arguments[w];return m[_]instanceof Function?m[_].apply(m,x):void 0},[m]),b=h.useRef({});return Object.keys(Sz(f,[].concat(o0(l),o0(u)))).filter(function(_){return b.current[_]!==f[_]}).forEach(function(_){return y(_,f[_])}),b.current=f,h.useImperativeHandle(d,function(){return Object.fromEntries(l.map(function(_){return[_,function(){for(var v=arguments.length,x=new Array(v),w=0;w<v;w++)x[w]=arguments[w];return y.apply(void 0,[_].concat(x))}]}))},[y]),Je.createElement(o,{ref:p})})}function i0(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:h.useEffect,r=h.useRef(),o=h.useRef(!1),i=h.useRef(!1),s=h.useState(0),a=Rz(s,2);a[0];var l=a[1];o.current&&(i.current=!0),n(function(){return o.current||(r.current=e(),o.current=!0),l(function(c){return c+1}),function(){i.current&&r.current&&r.current()}},[])}var Vp="http://www.w3.org/1999/xhtml";const s0={svg:"http://www.w3.org/2000/svg",xhtml:Vp,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Zu(e){var n=e+="",r=n.indexOf(":");return r>=0&&(n=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),s0.hasOwnProperty(n)?{space:s0[n],local:e}:e}function Az(e){return function(){var n=this.ownerDocument,r=this.namespaceURI;return r===Vp&&n.documentElement.namespaceURI===Vp?n.createElement(e):n.createElementNS(r,e)}}function Tz(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function eE(e){var n=Zu(e);return(n.local?Tz:Az)(n)}function Iz(){}function ng(e){return e==null?Iz:function(){return this.querySelector(e)}}function $z(e){typeof e!="function"&&(e=ng(e));for(var n=this._groups,r=n.length,o=new Array(r),i=0;i<r;++i)for(var s=n[i],a=s.length,l=o[i]=new Array(a),c,u,f=0;f<a;++f)(c=s[f])&&(u=e.call(c,c.__data__,f,s))&&("__data__"in c&&(u.__data__=c.__data__),l[f]=u);return new Mt(o,this._parents)}function Oz(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Dz(){return[]}function tE(e){return e==null?Dz:function(){return this.querySelectorAll(e)}}function Lz(e){return function(){return Oz(e.apply(this,arguments))}}function zz(e){typeof e=="function"?e=Lz(e):e=tE(e);for(var n=this._groups,r=n.length,o=[],i=[],s=0;s<r;++s)for(var a=n[s],l=a.length,c,u=0;u<l;++u)(c=a[u])&&(o.push(e.call(c,c.__data__,u,a)),i.push(c));return new Mt(o,i)}function nE(e){return function(){return this.matches(e)}}function rE(e){return function(n){return n.matches(e)}}var Fz=Array.prototype.find;function Vz(e){return function(){return Fz.call(this.children,e)}}function Bz(){return this.firstElementChild}function Hz(e){return this.select(e==null?Bz:Vz(typeof e=="function"?e:rE(e)))}var Wz=Array.prototype.filter;function Uz(){return Array.from(this.children)}function Gz(e){return function(){return Wz.call(this.children,e)}}function Yz(e){return this.selectAll(e==null?Uz:Gz(typeof e=="function"?e:rE(e)))}function Xz(e){typeof e!="function"&&(e=nE(e));for(var n=this._groups,r=n.length,o=new Array(r),i=0;i<r;++i)for(var s=n[i],a=s.length,l=o[i]=[],c,u=0;u<a;++u)(c=s[u])&&e.call(c,c.__data__,u,s)&&l.push(c);return new Mt(o,this._parents)}function oE(e){return new Array(e.length)}function Kz(){return new Mt(this._enter||this._groups.map(oE),this._parents)}function zc(e,n){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=n}zc.prototype={constructor:zc,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,n){return this._parent.insertBefore(e,n)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function qz(e){return function(){return e}}function Zz(e,n,r,o,i,s){for(var a=0,l,c=n.length,u=s.length;a<u;++a)(l=n[a])?(l.__data__=s[a],o[a]=l):r[a]=new zc(e,s[a]);for(;a<c;++a)(l=n[a])&&(i[a]=l)}function Qz(e,n,r,o,i,s,a){var l,c,u=new Map,f=n.length,d=s.length,p=new Array(f),m;for(l=0;l<f;++l)(c=n[l])&&(p[l]=m=a.call(c,c.__data__,l,n)+"",u.has(m)?i[l]=c:u.set(m,c));for(l=0;l<d;++l)m=a.call(e,s[l],l,s)+"",(c=u.get(m))?(o[l]=c,c.__data__=s[l],u.delete(m)):r[l]=new zc(e,s[l]);for(l=0;l<f;++l)(c=n[l])&&u.get(p[l])===c&&(i[l]=c)}function Jz(e){return e.__data__}function e9(e,n){if(!arguments.length)return Array.from(this,Jz);var r=n?Qz:Zz,o=this._parents,i=this._groups;typeof e!="function"&&(e=qz(e));for(var s=i.length,a=new Array(s),l=new Array(s),c=new Array(s),u=0;u<s;++u){var f=o[u],d=i[u],p=d.length,m=t9(e.call(f,f&&f.__data__,u,o)),y=m.length,b=l[u]=new Array(y),_=a[u]=new Array(y),v=c[u]=new Array(p);r(f,d,b,_,v,m,n);for(var x=0,w=0,S,C;x<y;++x)if(S=b[x]){for(x>=w&&(w=x+1);!(C=_[w])&&++w<y;);S._next=C||null}}return a=new Mt(a,o),a._enter=l,a._exit=c,a}function t9(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function n9(){return new Mt(this._exit||this._groups.map(oE),this._parents)}function r9(e,n,r){var o=this.enter(),i=this,s=this.exit();return typeof e=="function"?(o=e(o),o&&(o=o.selection())):o=o.append(e+""),n!=null&&(i=n(i),i&&(i=i.selection())),r==null?s.remove():r(s),o&&i?o.merge(i).order():i}function o9(e){for(var n=e.selection?e.selection():e,r=this._groups,o=n._groups,i=r.length,s=o.length,a=Math.min(i,s),l=new Array(i),c=0;c<a;++c)for(var u=r[c],f=o[c],d=u.length,p=l[c]=new Array(d),m,y=0;y<d;++y)(m=u[y]||f[y])&&(p[y]=m);for(;c<i;++c)l[c]=r[c];return new Mt(l,this._parents)}function i9(){for(var e=this._groups,n=-1,r=e.length;++n<r;)for(var o=e[n],i=o.length-1,s=o[i],a;--i>=0;)(a=o[i])&&(s&&a.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(a,s),s=a);return this}function s9(e){e||(e=a9);function n(d,p){return d&&p?e(d.__data__,p.__data__):!d-!p}for(var r=this._groups,o=r.length,i=new Array(o),s=0;s<o;++s){for(var a=r[s],l=a.length,c=i[s]=new Array(l),u,f=0;f<l;++f)(u=a[f])&&(c[f]=u);c.sort(n)}return new Mt(i,this._parents).order()}function a9(e,n){return e<n?-1:e>n?1:e>=n?0:NaN}function l9(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function c9(){return Array.from(this)}function u9(){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var o=e[n],i=0,s=o.length;i<s;++i){var a=o[i];if(a)return a}return null}function d9(){let e=0;for(const n of this)++e;return e}function f9(){return!this.node()}function p9(e){for(var n=this._groups,r=0,o=n.length;r<o;++r)for(var i=n[r],s=0,a=i.length,l;s<a;++s)(l=i[s])&&e.call(l,l.__data__,s,i);return this}function h9(e){return function(){this.removeAttribute(e)}}function m9(e){return function(){this.removeAttributeNS(e.space,e.local)}}function g9(e,n){return function(){this.setAttribute(e,n)}}function y9(e,n){return function(){this.setAttributeNS(e.space,e.local,n)}}function v9(e,n){return function(){var r=n.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function x9(e,n){return function(){var r=n.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function w9(e,n){var r=Zu(e);if(arguments.length<2){var o=this.node();return r.local?o.getAttributeNS(r.space,r.local):o.getAttribute(r)}return this.each((n==null?r.local?m9:h9:typeof n=="function"?r.local?x9:v9:r.local?y9:g9)(r,n))}function iE(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function b9(e){return function(){this.style.removeProperty(e)}}function _9(e,n,r){return function(){this.style.setProperty(e,n,r)}}function S9(e,n,r){return function(){var o=n.apply(this,arguments);o==null?this.style.removeProperty(e):this.style.setProperty(e,o,r)}}function C9(e,n,r){return arguments.length>1?this.each((n==null?b9:typeof n=="function"?S9:_9)(e,n,r??"")):bi(this.node(),e)}function bi(e,n){return e.style.getPropertyValue(n)||iE(e).getComputedStyle(e,null).getPropertyValue(n)}function E9(e){return function(){delete this[e]}}function k9(e,n){return function(){this[e]=n}}function N9(e,n){return function(){var r=n.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function P9(e,n){return arguments.length>1?this.each((n==null?E9:typeof n=="function"?N9:k9)(e,n)):this.node()[e]}function sE(e){return e.trim().split(/^|\s+/)}function rg(e){return e.classList||new aE(e)}function aE(e){this._node=e,this._names=sE(e.getAttribute("class")||"")}aE.prototype={add:function(e){var n=this._names.indexOf(e);n<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var n=this._names.indexOf(e);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function lE(e,n){for(var r=rg(e),o=-1,i=n.length;++o<i;)r.add(n[o])}function cE(e,n){for(var r=rg(e),o=-1,i=n.length;++o<i;)r.remove(n[o])}function M9(e){return function(){lE(this,e)}}function R9(e){return function(){cE(this,e)}}function j9(e,n){return function(){(n.apply(this,arguments)?lE:cE)(this,e)}}function A9(e,n){var r=sE(e+"");if(arguments.length<2){for(var o=rg(this.node()),i=-1,s=r.length;++i<s;)if(!o.contains(r[i]))return!1;return!0}return this.each((typeof n=="function"?j9:n?M9:R9)(r,n))}function T9(){this.textContent=""}function I9(e){return function(){this.textContent=e}}function $9(e){return function(){var n=e.apply(this,arguments);this.textContent=n??""}}function O9(e){return arguments.length?this.each(e==null?T9:(typeof e=="function"?$9:I9)(e)):this.node().textContent}function D9(){this.innerHTML=""}function L9(e){return function(){this.innerHTML=e}}function z9(e){return function(){var n=e.apply(this,arguments);this.innerHTML=n??""}}function F9(e){return arguments.length?this.each(e==null?D9:(typeof e=="function"?z9:L9)(e)):this.node().innerHTML}function V9(){this.nextSibling&&this.parentNode.appendChild(this)}function B9(){return this.each(V9)}function H9(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function W9(){return this.each(H9)}function U9(e){var n=typeof e=="function"?e:eE(e);return this.select(function(){return this.appendChild(n.apply(this,arguments))})}function G9(){return null}function Y9(e,n){var r=typeof e=="function"?e:eE(e),o=n==null?G9:typeof n=="function"?n:ng(n);return this.select(function(){return this.insertBefore(r.apply(this,arguments),o.apply(this,arguments)||null)})}function X9(){var e=this.parentNode;e&&e.removeChild(this)}function K9(){return this.each(X9)}function q9(){var e=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(e,this.nextSibling):e}function Z9(){var e=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(e,this.nextSibling):e}function Q9(e){return this.select(e?Z9:q9)}function J9(e){return arguments.length?this.property("__data__",e):this.node().__data__}function eF(e){return function(n){e.call(this,n,this.__data__)}}function tF(e){return e.trim().split(/^|\s+/).map(function(n){var r="",o=n.indexOf(".");return o>=0&&(r=n.slice(o+1),n=n.slice(0,o)),{type:n,name:r}})}function nF(e){return function(){var n=this.__on;if(n){for(var r=0,o=-1,i=n.length,s;r<i;++r)s=n[r],(!e.type||s.type===e.type)&&s.name===e.name?this.removeEventListener(s.type,s.listener,s.options):n[++o]=s;++o?n.length=o:delete this.__on}}}function rF(e,n,r){return function(){var o=this.__on,i,s=eF(n);if(o){for(var a=0,l=o.length;a<l;++a)if((i=o[a]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=s,i.options=r),i.value=n;return}}this.addEventListener(e.type,s,r),i={type:e.type,name:e.name,value:n,listener:s,options:r},o?o.push(i):this.__on=[i]}}function oF(e,n,r){var o=tF(e+""),i,s=o.length,a;if(arguments.length<2){var l=this.node().__on;if(l){for(var c=0,u=l.length,f;c<u;++c)for(i=0,f=l[c];i<s;++i)if((a=o[i]).type===f.type&&a.name===f.name)return f.value}return}for(l=n?rF:nF,i=0;i<s;++i)this.each(l(o[i],n,r));return this}function uE(e,n,r){var o=iE(e),i=o.CustomEvent;typeof i=="function"?i=new i(n,r):(i=o.document.createEvent("Event"),r?(i.initEvent(n,r.bubbles,r.cancelable),i.detail=r.detail):i.initEvent(n,!1,!1)),e.dispatchEvent(i)}function iF(e,n){return function(){return uE(this,e,n)}}function sF(e,n){return function(){return uE(this,e,n.apply(this,arguments))}}function aF(e,n){return this.each((typeof n=="function"?sF:iF)(e,n))}function*lF(){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var o=e[n],i=0,s=o.length,a;i<s;++i)(a=o[i])&&(yield a)}var dE=[null];function Mt(e,n){this._groups=e,this._parents=n}function Ta(){return new Mt([[document.documentElement]],dE)}function cF(){return this}Mt.prototype=Ta.prototype={constructor:Mt,select:$z,selectAll:zz,selectChild:Hz,selectChildren:Yz,filter:Xz,data:e9,enter:Kz,exit:n9,join:r9,merge:o9,selection:cF,order:i9,sort:s9,call:l9,nodes:c9,node:u9,size:d9,empty:f9,each:p9,attr:w9,style:C9,property:P9,classed:A9,text:O9,html:F9,raise:B9,lower:W9,append:U9,insert:Y9,remove:K9,clone:Q9,datum:J9,on:oF,dispatch:aF,[Symbol.iterator]:lF};function tt(e){return typeof e=="string"?new Mt([[document.querySelector(e)]],[document.documentElement]):new Mt([[e]],dE)}function uF(e){let n;for(;n=e.sourceEvent;)e=n;return e}function Ot(e,n){if(e=uF(e),n===void 0&&(n=e.currentTarget),n){var r=n.ownerSVGElement||n;if(r.createSVGPoint){var o=r.createSVGPoint();return o.x=e.clientX,o.y=e.clientY,o=o.matrixTransform(n.getScreenCTM().inverse()),[o.x,o.y]}if(n.getBoundingClientRect){var i=n.getBoundingClientRect();return[e.clientX-i.left-n.clientLeft,e.clientY-i.top-n.clientTop]}}return[e.pageX,e.pageY]}var dF={value:()=>{}};function Ia(){for(var e=0,n=arguments.length,r={},o;e<n;++e){if(!(o=arguments[e]+"")||o in r||/[\s.]/.test(o))throw new Error("illegal type: "+o);r[o]=[]}return new Yl(r)}function Yl(e){this._=e}function fF(e,n){return e.trim().split(/^|\s+/).map(function(r){var o="",i=r.indexOf(".");if(i>=0&&(o=r.slice(i+1),r=r.slice(0,i)),r&&!n.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:o}})}Yl.prototype=Ia.prototype={constructor:Yl,on:function(e,n){var r=this._,o=fF(e+"",r),i,s=-1,a=o.length;if(arguments.length<2){for(;++s<a;)if((i=(e=o[s]).type)&&(i=pF(r[i],e.name)))return i;return}if(n!=null&&typeof n!="function")throw new Error("invalid callback: "+n);for(;++s<a;)if(i=(e=o[s]).type)r[i]=a0(r[i],e.name,n);else if(n==null)for(i in r)r[i]=a0(r[i],e.name,null);return this},copy:function(){var e={},n=this._;for(var r in n)e[r]=n[r].slice();return new Yl(e)},call:function(e,n){if((i=arguments.length-2)>0)for(var r=new Array(i),o=0,i,s;o<i;++o)r[o]=arguments[o+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(s=this._[e],o=0,i=s.length;o<i;++o)s[o].value.apply(n,r)},apply:function(e,n,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var o=this._[e],i=0,s=o.length;i<s;++i)o[i].value.apply(n,r)}};function pF(e,n){for(var r=0,o=e.length,i;r<o;++r)if((i=e[r]).name===n)return i.value}function a0(e,n,r){for(var o=0,i=e.length;o<i;++o)if(e[o].name===n){e[o]=dF,e=e.slice(0,o).concat(e.slice(o+1));break}return r!=null&&e.push({name:n,value:r}),e}const hF={passive:!1},ra={capture:!0,passive:!1};function cf(e){e.stopImmediatePropagation()}function ai(e){e.preventDefault(),e.stopImmediatePropagation()}function fE(e){var n=e.document.documentElement,r=tt(e).on("dragstart.drag",ai,ra);"onselectstart"in n?r.on("selectstart.drag",ai,ra):(n.__noselect=n.style.MozUserSelect,n.style.MozUserSelect="none")}function pE(e,n){var r=e.document.documentElement,o=tt(e).on("dragstart.drag",null);n&&(o.on("click.drag",ai,ra),setTimeout(function(){o.on("click.drag",null)},0)),"onselectstart"in r?o.on("selectstart.drag",null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect)}const hl=e=>()=>e;function Bp(e,{sourceEvent:n,subject:r,target:o,identifier:i,active:s,x:a,y:l,dx:c,dy:u,dispatch:f}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:s,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:f}})}Bp.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function mF(e){return!e.ctrlKey&&!e.button}function gF(){return this.parentNode}function yF(e,n){return n??{x:e.x,y:e.y}}function vF(){return navigator.maxTouchPoints||"ontouchstart"in this}function og(){var e=mF,n=gF,r=yF,o=vF,i={},s=Ia("start","drag","end"),a=0,l,c,u,f,d=0;function p(S){S.on("mousedown.drag",m).filter(o).on("touchstart.drag",_).on("touchmove.drag",v,hF).on("touchend.drag touchcancel.drag",x).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function m(S,C){if(!(f||!e.call(this,S,C))){var E=w(this,n.call(this,S,C),S,C,"mouse");E&&(tt(S.view).on("mousemove.drag",y,ra).on("mouseup.drag",b,ra),fE(S.view),cf(S),u=!1,l=S.clientX,c=S.clientY,E("start",S))}}function y(S){if(ai(S),!u){var C=S.clientX-l,E=S.clientY-c;u=C*C+E*E>d}i.mouse("drag",S)}function b(S){tt(S.view).on("mousemove.drag mouseup.drag",null),pE(S.view,u),ai(S),i.mouse("end",S)}function _(S,C){if(e.call(this,S,C)){var E=S.changedTouches,k=n.call(this,S,C),N=E.length,M,T;for(M=0;M<N;++M)(T=w(this,k,S,C,E[M].identifier,E[M]))&&(cf(S),T("start",S,E[M]))}}function v(S){var C=S.changedTouches,E=C.length,k,N;for(k=0;k<E;++k)(N=i[C[k].identifier])&&(ai(S),N("drag",S,C[k]))}function x(S){var C=S.changedTouches,E=C.length,k,N;for(f&&clearTimeout(f),f=setTimeout(function(){f=null},500),k=0;k<E;++k)(N=i[C[k].identifier])&&(cf(S),N("end",S,C[k]))}function w(S,C,E,k,N,M){var T=s.copy(),A=Ot(M||E,C),D,V,P;if((P=r.call(S,new Bp("beforestart",{sourceEvent:E,target:p,identifier:N,active:a,x:A[0],y:A[1],dx:0,dy:0,dispatch:T}),k))!=null)return D=P.x-A[0]||0,V=P.y-A[1]||0,function L(I,F,R){var j=A,O;switch(I){case"start":i[N]=L,O=a++;break;case"end":delete i[N],--a;case"drag":A=Ot(R||F,C),O=a;break}T.call(I,S,new Bp(I,{sourceEvent:F,subject:P,target:p,identifier:N,active:O,x:A[0]+D,y:A[1]+V,dx:A[0]-j[0],dy:A[1]-j[1],dispatch:T}),k)}}return p.filter=function(S){return arguments.length?(e=typeof S=="function"?S:hl(!!S),p):e},p.container=function(S){return arguments.length?(n=typeof S=="function"?S:hl(S),p):n},p.subject=function(S){return arguments.length?(r=typeof S=="function"?S:hl(S),p):r},p.touchable=function(S){return arguments.length?(o=typeof S=="function"?S:hl(!!S),p):o},p.on=function(){var S=s.on.apply(s,arguments);return S===s?p:S},p.clickDistance=function(S){return arguments.length?(d=(S=+S)*S,p):Math.sqrt(d)},p}function ig(e,n,r){e.prototype=n.prototype=r,r.constructor=e}function hE(e,n){var r=Object.create(e.prototype);for(var o in n)r[o]=n[o];return r}function $a(){}var oa=.7,Fc=1/oa,li="\\s*([+-]?\\d+)\\s*",ia="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",_n="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",xF=/^#([0-9a-f]{3,8})$/,wF=new RegExp(`^rgb\\(${li},${li},${li}\\)$`),bF=new RegExp(`^rgb\\(${_n},${_n},${_n}\\)$`),_F=new RegExp(`^rgba\\(${li},${li},${li},${ia}\\)$`),SF=new RegExp(`^rgba\\(${_n},${_n},${_n},${ia}\\)$`),CF=new RegExp(`^hsl\\(${ia},${_n},${_n}\\)$`),EF=new RegExp(`^hsla\\(${ia},${_n},${_n},${ia}\\)$`),l0={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};ig($a,go,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:c0,formatHex:c0,formatHex8:kF,formatHsl:NF,formatRgb:u0,toString:u0});function c0(){return this.rgb().formatHex()}function kF(){return this.rgb().formatHex8()}function NF(){return mE(this).formatHsl()}function u0(){return this.rgb().formatRgb()}function go(e){var n,r;return e=(e+"").trim().toLowerCase(),(n=xF.exec(e))?(r=n[1].length,n=parseInt(n[1],16),r===6?d0(n):r===3?new pt(n>>8&15|n>>4&240,n>>4&15|n&240,(n&15)<<4|n&15,1):r===8?ml(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):r===4?ml(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|n&240,((n&15)<<4|n&15)/255):null):(n=wF.exec(e))?new pt(n[1],n[2],n[3],1):(n=bF.exec(e))?new pt(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=_F.exec(e))?ml(n[1],n[2],n[3],n[4]):(n=SF.exec(e))?ml(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=CF.exec(e))?h0(n[1],n[2]/100,n[3]/100,1):(n=EF.exec(e))?h0(n[1],n[2]/100,n[3]/100,n[4]):l0.hasOwnProperty(e)?d0(l0[e]):e==="transparent"?new pt(NaN,NaN,NaN,0):null}function d0(e){return new pt(e>>16&255,e>>8&255,e&255,1)}function ml(e,n,r,o){return o<=0&&(e=n=r=NaN),new pt(e,n,r,o)}function PF(e){return e instanceof $a||(e=go(e)),e?(e=e.rgb(),new pt(e.r,e.g,e.b,e.opacity)):new pt}function Hp(e,n,r,o){return arguments.length===1?PF(e):new pt(e,n,r,o??1)}function pt(e,n,r,o){this.r=+e,this.g=+n,this.b=+r,this.opacity=+o}ig(pt,Hp,hE($a,{brighter(e){return e=e==null?Fc:Math.pow(Fc,e),new pt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?oa:Math.pow(oa,e),new pt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new pt(ro(this.r),ro(this.g),ro(this.b),Vc(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:f0,formatHex:f0,formatHex8:MF,formatRgb:p0,toString:p0}));function f0(){return`#${eo(this.r)}${eo(this.g)}${eo(this.b)}`}function MF(){return`#${eo(this.r)}${eo(this.g)}${eo(this.b)}${eo((isNaN(this.opacity)?1:this.opacity)*255)}`}function p0(){const e=Vc(this.opacity);return`${e===1?"rgb(":"rgba("}${ro(this.r)}, ${ro(this.g)}, ${ro(this.b)}${e===1?")":`, ${e})`}`}function Vc(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ro(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function eo(e){return e=ro(e),(e<16?"0":"")+e.toString(16)}function h0(e,n,r,o){return o<=0?e=n=r=NaN:r<=0||r>=1?e=n=NaN:n<=0&&(e=NaN),new Jt(e,n,r,o)}function mE(e){if(e instanceof Jt)return new Jt(e.h,e.s,e.l,e.opacity);if(e instanceof $a||(e=go(e)),!e)return new Jt;if(e instanceof Jt)return e;e=e.rgb();var n=e.r/255,r=e.g/255,o=e.b/255,i=Math.min(n,r,o),s=Math.max(n,r,o),a=NaN,l=s-i,c=(s+i)/2;return l?(n===s?a=(r-o)/l+(r<o)*6:r===s?a=(o-n)/l+2:a=(n-r)/l+4,l/=c<.5?s+i:2-s-i,a*=60):l=c>0&&c<1?0:a,new Jt(a,l,c,e.opacity)}function RF(e,n,r,o){return arguments.length===1?mE(e):new Jt(e,n,r,o??1)}function Jt(e,n,r,o){this.h=+e,this.s=+n,this.l=+r,this.opacity=+o}ig(Jt,RF,hE($a,{brighter(e){return e=e==null?Fc:Math.pow(Fc,e),new Jt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?oa:Math.pow(oa,e),new Jt(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,n=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,o=r+(r<.5?r:1-r)*n,i=2*r-o;return new pt(uf(e>=240?e-240:e+120,i,o),uf(e,i,o),uf(e<120?e+240:e-120,i,o),this.opacity)},clamp(){return new Jt(m0(this.h),gl(this.s),gl(this.l),Vc(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Vc(this.opacity);return`${e===1?"hsl(":"hsla("}${m0(this.h)}, ${gl(this.s)*100}%, ${gl(this.l)*100}%${e===1?")":`, ${e})`}`}}));function m0(e){return e=(e||0)%360,e<0?e+360:e}function gl(e){return Math.max(0,Math.min(1,e||0))}function uf(e,n,r){return(e<60?n+(r-n)*e/60:e<180?r:e<240?n+(r-n)*(240-e)/60:n)*255}const sg=e=>()=>e;function jF(e,n){return function(r){return e+r*n}}function AF(e,n,r){return e=Math.pow(e,r),n=Math.pow(n,r)-e,r=1/r,function(o){return Math.pow(e+o*n,r)}}function TF(e){return(e=+e)==1?gE:function(n,r){return r-n?AF(n,r,e):sg(isNaN(n)?r:n)}}function gE(e,n){var r=n-e;return r?jF(e,r):sg(isNaN(e)?n:e)}const Bc=function e(n){var r=TF(n);function o(i,s){var a=r((i=Hp(i)).r,(s=Hp(s)).r),l=r(i.g,s.g),c=r(i.b,s.b),u=gE(i.opacity,s.opacity);return function(f){return i.r=a(f),i.g=l(f),i.b=c(f),i.opacity=u(f),i+""}}return o.gamma=e,o}(1);function IF(e,n){n||(n=[]);var r=e?Math.min(n.length,e.length):0,o=n.slice(),i;return function(s){for(i=0;i<r;++i)o[i]=e[i]*(1-s)+n[i]*s;return o}}function $F(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function OF(e,n){var r=n?n.length:0,o=e?Math.min(r,e.length):0,i=new Array(o),s=new Array(r),a;for(a=0;a<o;++a)i[a]=Ps(e[a],n[a]);for(;a<r;++a)s[a]=n[a];return function(l){for(a=0;a<o;++a)s[a]=i[a](l);return s}}function DF(e,n){var r=new Date;return e=+e,n=+n,function(o){return r.setTime(e*(1-o)+n*o),r}}function hn(e,n){return e=+e,n=+n,function(r){return e*(1-r)+n*r}}function LF(e,n){var r={},o={},i;(e===null||typeof e!="object")&&(e={}),(n===null||typeof n!="object")&&(n={});for(i in n)i in e?r[i]=Ps(e[i],n[i]):o[i]=n[i];return function(s){for(i in r)o[i]=r[i](s);return o}}var Wp=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,df=new RegExp(Wp.source,"g");function zF(e){return function(){return e}}function FF(e){return function(n){return e(n)+""}}function yE(e,n){var r=Wp.lastIndex=df.lastIndex=0,o,i,s,a=-1,l=[],c=[];for(e=e+"",n=n+"";(o=Wp.exec(e))&&(i=df.exec(n));)(s=i.index)>r&&(s=n.slice(r,s),l[a]?l[a]+=s:l[++a]=s),(o=o[0])===(i=i[0])?l[a]?l[a]+=i:l[++a]=i:(l[++a]=null,c.push({i:a,x:hn(o,i)})),r=df.lastIndex;return r<n.length&&(s=n.slice(r),l[a]?l[a]+=s:l[++a]=s),l.length<2?c[0]?FF(c[0].x):zF(n):(n=c.length,function(u){for(var f=0,d;f<n;++f)l[(d=c[f]).i]=d.x(u);return l.join("")})}function Ps(e,n){var r=typeof n,o;return n==null||r==="boolean"?sg(n):(r==="number"?hn:r==="string"?(o=go(n))?(n=o,Bc):yE:n instanceof go?Bc:n instanceof Date?DF:$F(n)?IF:Array.isArray(n)?OF:typeof n.valueOf!="function"&&typeof n.toString!="function"||isNaN(n)?LF:hn)(e,n)}var g0=180/Math.PI,Up={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function vE(e,n,r,o,i,s){var a,l,c;return(a=Math.sqrt(e*e+n*n))&&(e/=a,n/=a),(c=e*r+n*o)&&(r-=e*c,o-=n*c),(l=Math.sqrt(r*r+o*o))&&(r/=l,o/=l,c/=l),e*o<n*r&&(e=-e,n=-n,c=-c,a=-a),{translateX:i,translateY:s,rotate:Math.atan2(n,e)*g0,skewX:Math.atan(c)*g0,scaleX:a,scaleY:l}}var yl;function VF(e){const n=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return n.isIdentity?Up:vE(n.a,n.b,n.c,n.d,n.e,n.f)}function BF(e){return e==null||(yl||(yl=document.createElementNS("http://www.w3.org/2000/svg","g")),yl.setAttribute("transform",e),!(e=yl.transform.baseVal.consolidate()))?Up:(e=e.matrix,vE(e.a,e.b,e.c,e.d,e.e,e.f))}function xE(e,n,r,o){function i(u){return u.length?u.pop()+" ":""}function s(u,f,d,p,m,y){if(u!==d||f!==p){var b=m.push("translate(",null,n,null,r);y.push({i:b-4,x:hn(u,d)},{i:b-2,x:hn(f,p)})}else(d||p)&&m.push("translate("+d+n+p+r)}function a(u,f,d,p){u!==f?(u-f>180?f+=360:f-u>180&&(u+=360),p.push({i:d.push(i(d)+"rotate(",null,o)-2,x:hn(u,f)})):f&&d.push(i(d)+"rotate("+f+o)}function l(u,f,d,p){u!==f?p.push({i:d.push(i(d)+"skewX(",null,o)-2,x:hn(u,f)}):f&&d.push(i(d)+"skewX("+f+o)}function c(u,f,d,p,m,y){if(u!==d||f!==p){var b=m.push(i(m)+"scale(",null,",",null,")");y.push({i:b-4,x:hn(u,d)},{i:b-2,x:hn(f,p)})}else(d!==1||p!==1)&&m.push(i(m)+"scale("+d+","+p+")")}return function(u,f){var d=[],p=[];return u=e(u),f=e(f),s(u.translateX,u.translateY,f.translateX,f.translateY,d,p),a(u.rotate,f.rotate,d,p),l(u.skewX,f.skewX,d,p),c(u.scaleX,u.scaleY,f.scaleX,f.scaleY,d,p),u=f=null,function(m){for(var y=-1,b=p.length,_;++y<b;)d[(_=p[y]).i]=_.x(m);return d.join("")}}}var HF=xE(VF,"px, ","px)","deg)"),WF=xE(BF,", ",")",")"),UF=1e-12;function y0(e){return((e=Math.exp(e))+1/e)/2}function GF(e){return((e=Math.exp(e))-1/e)/2}function YF(e){return((e=Math.exp(2*e))-1)/(e+1)}const Xl=function e(n,r,o){function i(s,a){var l=s[0],c=s[1],u=s[2],f=a[0],d=a[1],p=a[2],m=f-l,y=d-c,b=m*m+y*y,_,v;if(b<UF)v=Math.log(p/u)/n,_=function(k){return[l+k*m,c+k*y,u*Math.exp(n*k*v)]};else{var x=Math.sqrt(b),w=(p*p-u*u+o*b)/(2*u*r*x),S=(p*p-u*u-o*b)/(2*p*r*x),C=Math.log(Math.sqrt(w*w+1)-w),E=Math.log(Math.sqrt(S*S+1)-S);v=(E-C)/n,_=function(k){var N=k*v,M=y0(C),T=u/(r*x)*(M*YF(n*N+C)-GF(C));return[l+T*m,c+T*y,u*M/y0(n*N+C)]}}return _.duration=v*1e3*n/Math.SQRT2,_}return i.rho=function(s){var a=Math.max(.001,+s),l=a*a,c=l*l;return e(a,l,c)},i}(Math.SQRT2,2,4);var _i=0,ms=0,es=0,wE=1e3,Hc,gs,Wc=0,yo=0,Qu=0,sa=typeof performance=="object"&&performance.now?performance:Date,bE=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function ag(){return yo||(bE(XF),yo=sa.now()+Qu)}function XF(){yo=0}function Uc(){this._call=this._time=this._next=null}Uc.prototype=lg.prototype={constructor:Uc,restart:function(e,n,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?ag():+r)+(n==null?0:+n),!this._next&&gs!==this&&(gs?gs._next=this:Hc=this,gs=this),this._call=e,this._time=r,Gp()},stop:function(){this._call&&(this._call=null,this._time=1/0,Gp())}};function lg(e,n,r){var o=new Uc;return o.restart(e,n,r),o}function KF(){ag(),++_i;for(var e=Hc,n;e;)(n=yo-e._time)>=0&&e._call.call(void 0,n),e=e._next;--_i}function v0(){yo=(Wc=sa.now())+Qu,_i=ms=0;try{KF()}finally{_i=0,ZF(),yo=0}}function qF(){var e=sa.now(),n=e-Wc;n>wE&&(Qu-=n,Wc=e)}function ZF(){for(var e,n=Hc,r,o=1/0;n;)n._call?(o>n._time&&(o=n._time),e=n,n=n._next):(r=n._next,n._next=null,n=e?e._next=r:Hc=r);gs=e,Gp(o)}function Gp(e){if(!_i){ms&&(ms=clearTimeout(ms));var n=e-yo;n>24?(e<1/0&&(ms=setTimeout(v0,e-sa.now()-Qu)),es&&(es=clearInterval(es))):(es||(Wc=sa.now(),es=setInterval(qF,wE)),_i=1,bE(v0))}}function x0(e,n,r){var o=new Uc;return n=n==null?0:+n,o.restart(i=>{o.stop(),e(i+n)},n,r),o}var QF=Ia("start","end","cancel","interrupt"),JF=[],_E=0,w0=1,Yp=2,Kl=3,b0=4,Xp=5,ql=6;function Ju(e,n,r,o,i,s){var a=e.__transition;if(!a)e.__transition={};else if(r in a)return;e7(e,r,{name:n,index:o,group:i,on:QF,tween:JF,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:_E})}function cg(e,n){var r=un(e,n);if(r.state>_E)throw new Error("too late; already scheduled");return r}function Nn(e,n){var r=un(e,n);if(r.state>Kl)throw new Error("too late; already running");return r}function un(e,n){var r=e.__transition;if(!r||!(r=r[n]))throw new Error("transition not found");return r}function e7(e,n,r){var o=e.__transition,i;o[n]=r,r.timer=lg(s,0,r.time);function s(u){r.state=w0,r.timer.restart(a,r.delay,r.time),r.delay<=u&&a(u-r.delay)}function a(u){var f,d,p,m;if(r.state!==w0)return c();for(f in o)if(m=o[f],m.name===r.name){if(m.state===Kl)return x0(a);m.state===b0?(m.state=ql,m.timer.stop(),m.on.call("interrupt",e,e.__data__,m.index,m.group),delete o[f]):+f<n&&(m.state=ql,m.timer.stop(),m.on.call("cancel",e,e.__data__,m.index,m.group),delete o[f])}if(x0(function(){r.state===Kl&&(r.state=b0,r.timer.restart(l,r.delay,r.time),l(u))}),r.state=Yp,r.on.call("start",e,e.__data__,r.index,r.group),r.state===Yp){for(r.state=Kl,i=new Array(p=r.tween.length),f=0,d=-1;f<p;++f)(m=r.tween[f].value.call(e,e.__data__,r.index,r.group))&&(i[++d]=m);i.length=d+1}}function l(u){for(var f=u<r.duration?r.ease.call(null,u/r.duration):(r.timer.restart(c),r.state=Xp,1),d=-1,p=i.length;++d<p;)i[d].call(e,f);r.state===Xp&&(r.on.call("end",e,e.__data__,r.index,r.group),c())}function c(){r.state=ql,r.timer.stop(),delete o[n];for(var u in o)return;delete e.__transition}}function Zl(e,n){var r=e.__transition,o,i,s=!0,a;if(r){n=n==null?null:n+"";for(a in r){if((o=r[a]).name!==n){s=!1;continue}i=o.state>Yp&&o.state<Xp,o.state=ql,o.timer.stop(),o.on.call(i?"interrupt":"cancel",e,e.__data__,o.index,o.group),delete r[a]}s&&delete e.__transition}}function t7(e){return this.each(function(){Zl(this,e)})}function n7(e,n){var r,o;return function(){var i=Nn(this,e),s=i.tween;if(s!==r){o=r=s;for(var a=0,l=o.length;a<l;++a)if(o[a].name===n){o=o.slice(),o.splice(a,1);break}}i.tween=o}}function r7(e,n,r){var o,i;if(typeof r!="function")throw new Error;return function(){var s=Nn(this,e),a=s.tween;if(a!==o){i=(o=a).slice();for(var l={name:n,value:r},c=0,u=i.length;c<u;++c)if(i[c].name===n){i[c]=l;break}c===u&&i.push(l)}s.tween=i}}function o7(e,n){var r=this._id;if(e+="",arguments.length<2){for(var o=un(this.node(),r).tween,i=0,s=o.length,a;i<s;++i)if((a=o[i]).name===e)return a.value;return null}return this.each((n==null?n7:r7)(r,e,n))}function ug(e,n,r){var o=e._id;return e.each(function(){var i=Nn(this,o);(i.value||(i.value={}))[n]=r.apply(this,arguments)}),function(i){return un(i,o).value[n]}}function SE(e,n){var r;return(typeof n=="number"?hn:n instanceof go?Bc:(r=go(n))?(n=r,Bc):yE)(e,n)}function i7(e){return function(){this.removeAttribute(e)}}function s7(e){return function(){this.removeAttributeNS(e.space,e.local)}}function a7(e,n,r){var o,i=r+"",s;return function(){var a=this.getAttribute(e);return a===i?null:a===o?s:s=n(o=a,r)}}function l7(e,n,r){var o,i=r+"",s;return function(){var a=this.getAttributeNS(e.space,e.local);return a===i?null:a===o?s:s=n(o=a,r)}}function c7(e,n,r){var o,i,s;return function(){var a,l=r(this),c;return l==null?void this.removeAttribute(e):(a=this.getAttribute(e),c=l+"",a===c?null:a===o&&c===i?s:(i=c,s=n(o=a,l)))}}function u7(e,n,r){var o,i,s;return function(){var a,l=r(this),c;return l==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),c=l+"",a===c?null:a===o&&c===i?s:(i=c,s=n(o=a,l)))}}function d7(e,n){var r=Zu(e),o=r==="transform"?WF:SE;return this.attrTween(e,typeof n=="function"?(r.local?u7:c7)(r,o,ug(this,"attr."+e,n)):n==null?(r.local?s7:i7)(r):(r.local?l7:a7)(r,o,n))}function f7(e,n){return function(r){this.setAttribute(e,n.call(this,r))}}function p7(e,n){return function(r){this.setAttributeNS(e.space,e.local,n.call(this,r))}}function h7(e,n){var r,o;function i(){var s=n.apply(this,arguments);return s!==o&&(r=(o=s)&&p7(e,s)),r}return i._value=n,i}function m7(e,n){var r,o;function i(){var s=n.apply(this,arguments);return s!==o&&(r=(o=s)&&f7(e,s)),r}return i._value=n,i}function g7(e,n){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(n==null)return this.tween(r,null);if(typeof n!="function")throw new Error;var o=Zu(e);return this.tween(r,(o.local?h7:m7)(o,n))}function y7(e,n){return function(){cg(this,e).delay=+n.apply(this,arguments)}}function v7(e,n){return n=+n,function(){cg(this,e).delay=n}}function x7(e){var n=this._id;return arguments.length?this.each((typeof e=="function"?y7:v7)(n,e)):un(this.node(),n).delay}function w7(e,n){return function(){Nn(this,e).duration=+n.apply(this,arguments)}}function b7(e,n){return n=+n,function(){Nn(this,e).duration=n}}function _7(e){var n=this._id;return arguments.length?this.each((typeof e=="function"?w7:b7)(n,e)):un(this.node(),n).duration}function S7(e,n){if(typeof n!="function")throw new Error;return function(){Nn(this,e).ease=n}}function C7(e){var n=this._id;return arguments.length?this.each(S7(n,e)):un(this.node(),n).ease}function E7(e,n){return function(){var r=n.apply(this,arguments);if(typeof r!="function")throw new Error;Nn(this,e).ease=r}}function k7(e){if(typeof e!="function")throw new Error;return this.each(E7(this._id,e))}function N7(e){typeof e!="function"&&(e=nE(e));for(var n=this._groups,r=n.length,o=new Array(r),i=0;i<r;++i)for(var s=n[i],a=s.length,l=o[i]=[],c,u=0;u<a;++u)(c=s[u])&&e.call(c,c.__data__,u,s)&&l.push(c);return new Kn(o,this._parents,this._name,this._id)}function P7(e){if(e._id!==this._id)throw new Error;for(var n=this._groups,r=e._groups,o=n.length,i=r.length,s=Math.min(o,i),a=new Array(o),l=0;l<s;++l)for(var c=n[l],u=r[l],f=c.length,d=a[l]=new Array(f),p,m=0;m<f;++m)(p=c[m]||u[m])&&(d[m]=p);for(;l<o;++l)a[l]=n[l];return new Kn(a,this._parents,this._name,this._id)}function M7(e){return(e+"").trim().split(/^|\s+/).every(function(n){var r=n.indexOf(".");return r>=0&&(n=n.slice(0,r)),!n||n==="start"})}function R7(e,n,r){var o,i,s=M7(n)?cg:Nn;return function(){var a=s(this,e),l=a.on;l!==o&&(i=(o=l).copy()).on(n,r),a.on=i}}function j7(e,n){var r=this._id;return arguments.length<2?un(this.node(),r).on.on(e):this.each(R7(r,e,n))}function A7(e){return function(){var n=this.parentNode;for(var r in this.__transition)if(+r!==e)return;n&&n.removeChild(this)}}function T7(){return this.on("end.remove",A7(this._id))}function I7(e){var n=this._name,r=this._id;typeof e!="function"&&(e=ng(e));for(var o=this._groups,i=o.length,s=new Array(i),a=0;a<i;++a)for(var l=o[a],c=l.length,u=s[a]=new Array(c),f,d,p=0;p<c;++p)(f=l[p])&&(d=e.call(f,f.__data__,p,l))&&("__data__"in f&&(d.__data__=f.__data__),u[p]=d,Ju(u[p],n,r,p,u,un(f,r)));return new Kn(s,this._parents,n,r)}function $7(e){var n=this._name,r=this._id;typeof e!="function"&&(e=tE(e));for(var o=this._groups,i=o.length,s=[],a=[],l=0;l<i;++l)for(var c=o[l],u=c.length,f,d=0;d<u;++d)if(f=c[d]){for(var p=e.call(f,f.__data__,d,c),m,y=un(f,r),b=0,_=p.length;b<_;++b)(m=p[b])&&Ju(m,n,r,b,p,y);s.push(p),a.push(f)}return new Kn(s,a,n,r)}var O7=Ta.prototype.constructor;function D7(){return new O7(this._groups,this._parents)}function L7(e,n){var r,o,i;return function(){var s=bi(this,e),a=(this.style.removeProperty(e),bi(this,e));return s===a?null:s===r&&a===o?i:i=n(r=s,o=a)}}function CE(e){return function(){this.style.removeProperty(e)}}function z7(e,n,r){var o,i=r+"",s;return function(){var a=bi(this,e);return a===i?null:a===o?s:s=n(o=a,r)}}function F7(e,n,r){var o,i,s;return function(){var a=bi(this,e),l=r(this),c=l+"";return l==null&&(c=l=(this.style.removeProperty(e),bi(this,e))),a===c?null:a===o&&c===i?s:(i=c,s=n(o=a,l))}}function V7(e,n){var r,o,i,s="style."+n,a="end."+s,l;return function(){var c=Nn(this,e),u=c.on,f=c.value[s]==null?l||(l=CE(n)):void 0;(u!==r||i!==f)&&(o=(r=u).copy()).on(a,i=f),c.on=o}}function B7(e,n,r){var o=(e+="")=="transform"?HF:SE;return n==null?this.styleTween(e,L7(e,o)).on("end.style."+e,CE(e)):typeof n=="function"?this.styleTween(e,F7(e,o,ug(this,"style."+e,n))).each(V7(this._id,e)):this.styleTween(e,z7(e,o,n),r).on("end.style."+e,null)}function H7(e,n,r){return function(o){this.style.setProperty(e,n.call(this,o),r)}}function W7(e,n,r){var o,i;function s(){var a=n.apply(this,arguments);return a!==i&&(o=(i=a)&&H7(e,a,r)),o}return s._value=n,s}function U7(e,n,r){var o="style."+(e+="");if(arguments.length<2)return(o=this.tween(o))&&o._value;if(n==null)return this.tween(o,null);if(typeof n!="function")throw new Error;return this.tween(o,W7(e,n,r??""))}function G7(e){return function(){this.textContent=e}}function Y7(e){return function(){var n=e(this);this.textContent=n??""}}function X7(e){return this.tween("text",typeof e=="function"?Y7(ug(this,"text",e)):G7(e==null?"":e+""))}function K7(e){return function(n){this.textContent=e.call(this,n)}}function q7(e){var n,r;function o(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&K7(i)),n}return o._value=e,o}function Z7(e){var n="text";if(arguments.length<1)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;return this.tween(n,q7(e))}function Q7(){for(var e=this._name,n=this._id,r=EE(),o=this._groups,i=o.length,s=0;s<i;++s)for(var a=o[s],l=a.length,c,u=0;u<l;++u)if(c=a[u]){var f=un(c,n);Ju(c,e,r,u,a,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new Kn(o,this._parents,e,r)}function J7(){var e,n,r=this,o=r._id,i=r.size();return new Promise(function(s,a){var l={value:a},c={value:function(){--i===0&&s()}};r.each(function(){var u=Nn(this,o),f=u.on;f!==e&&(n=(e=f).copy(),n._.cancel.push(l),n._.interrupt.push(l),n._.end.push(c)),u.on=n}),i===0&&s()})}var eV=0;function Kn(e,n,r,o){this._groups=e,this._parents=n,this._name=r,this._id=o}function EE(){return++eV}var Mn=Ta.prototype;Kn.prototype={constructor:Kn,select:I7,selectAll:$7,selectChild:Mn.selectChild,selectChildren:Mn.selectChildren,filter:N7,merge:P7,selection:D7,transition:Q7,call:Mn.call,nodes:Mn.nodes,node:Mn.node,size:Mn.size,empty:Mn.empty,each:Mn.each,on:j7,attr:d7,attrTween:g7,style:B7,styleTween:U7,text:X7,textTween:Z7,remove:T7,tween:o7,delay:x7,duration:_7,ease:C7,easeVarying:k7,end:J7,[Symbol.iterator]:Mn[Symbol.iterator]};function tV(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var nV={time:null,delay:0,duration:250,ease:tV};function rV(e,n){for(var r;!(r=e.__transition)||!(r=r[n]);)if(!(e=e.parentNode))throw new Error(`transition ${n} not found`);return r}function oV(e){var n,r;e instanceof Kn?(n=e._id,e=e._name):(n=EE(),(r=nV).time=ag(),e=e==null?null:e+"");for(var o=this._groups,i=o.length,s=0;s<i;++s)for(var a=o[s],l=a.length,c,u=0;u<l;++u)(c=a[u])&&Ju(c,e,n,u,a,r||rV(c,n));return new Kn(o,this._parents,e,n)}Ta.prototype.interrupt=t7;Ta.prototype.transition=oV;const vl=e=>()=>e;function iV(e,{sourceEvent:n,target:r,transform:o,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},transform:{value:o,enumerable:!0,configurable:!0},_:{value:i}})}function Ln(e,n,r){this.k=e,this.x=n,this.y=r}Ln.prototype={constructor:Ln,scale:function(e){return e===1?this:new Ln(this.k*e,this.x,this.y)},translate:function(e,n){return e===0&n===0?this:new Ln(this.k,this.x+this.k*e,this.y+this.k*n)},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 ed=new Ln(1,0,0);qt.prototype=Ln.prototype;function qt(e){for(;!e.__zoom;)if(!(e=e.parentNode))return ed;return e.__zoom}function ff(e){e.stopImmediatePropagation()}function ts(e){e.preventDefault(),e.stopImmediatePropagation()}function sV(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function aV(){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 _0(){return this.__zoom||ed}function lV(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function cV(){return navigator.maxTouchPoints||"ontouchstart"in this}function uV(e,n,r){var o=e.invertX(n[0][0])-r[0][0],i=e.invertX(n[1][0])-r[1][0],s=e.invertY(n[0][1])-r[0][1],a=e.invertY(n[1][1])-r[1][1];return e.translate(i>o?(o+i)/2:Math.min(0,o)||Math.max(0,i),a>s?(s+a)/2:Math.min(0,s)||Math.max(0,a))}function dg(){var e=sV,n=aV,r=uV,o=lV,i=cV,s=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],l=250,c=Xl,u=Ia("start","zoom","end"),f,d,p,m=500,y=150,b=0,_=10;function v(P){P.property("__zoom",_0).on("wheel.zoom",N,{passive:!1}).on("mousedown.zoom",M).on("dblclick.zoom",T).filter(i).on("touchstart.zoom",A).on("touchmove.zoom",D).on("touchend.zoom touchcancel.zoom",V).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}v.transform=function(P,L,I,F){var R=P.selection?P.selection():P;R.property("__zoom",_0),P!==R?C(P,L,I,F):R.interrupt().each(function(){E(this,arguments).event(F).start().zoom(null,typeof L=="function"?L.apply(this,arguments):L).end()})},v.scaleBy=function(P,L,I,F){v.scaleTo(P,function(){var R=this.__zoom.k,j=typeof L=="function"?L.apply(this,arguments):L;return R*j},I,F)},v.scaleTo=function(P,L,I,F){v.transform(P,function(){var R=n.apply(this,arguments),j=this.__zoom,O=I==null?S(R):typeof I=="function"?I.apply(this,arguments):I,G=j.invert(O),$=typeof L=="function"?L.apply(this,arguments):L;return r(w(x(j,$),O,G),R,a)},I,F)},v.translateBy=function(P,L,I,F){v.transform(P,function(){return r(this.__zoom.translate(typeof L=="function"?L.apply(this,arguments):L,typeof I=="function"?I.apply(this,arguments):I),n.apply(this,arguments),a)},null,F)},v.translateTo=function(P,L,I,F,R){v.transform(P,function(){var j=n.apply(this,arguments),O=this.__zoom,G=F==null?S(j):typeof F=="function"?F.apply(this,arguments):F;return r(ed.translate(G[0],G[1]).scale(O.k).translate(typeof L=="function"?-L.apply(this,arguments):-L,typeof I=="function"?-I.apply(this,arguments):-I),j,a)},F,R)};function x(P,L){return L=Math.max(s[0],Math.min(s[1],L)),L===P.k?P:new Ln(L,P.x,P.y)}function w(P,L,I){var F=L[0]-I[0]*P.k,R=L[1]-I[1]*P.k;return F===P.x&&R===P.y?P:new Ln(P.k,F,R)}function S(P){return[(+P[0][0]+ +P[1][0])/2,(+P[0][1]+ +P[1][1])/2]}function C(P,L,I,F){P.on("start.zoom",function(){E(this,arguments).event(F).start()}).on("interrupt.zoom end.zoom",function(){E(this,arguments).event(F).end()}).tween("zoom",function(){var R=this,j=arguments,O=E(R,j).event(F),G=n.apply(R,j),$=I==null?S(G):typeof I=="function"?I.apply(R,j):I,X=Math.max(G[1][0]-G[0][0],G[1][1]-G[0][1]),H=R.__zoom,W=typeof L=="function"?L.apply(R,j):L,z=c(H.invert($).concat(X/H.k),W.invert($).concat(X/W.k));return function(U){if(U===1)U=W;else{var Y=z(U),K=X/Y[2];U=new Ln(K,$[0]-Y[0]*K,$[1]-Y[1]*K)}O.zoom(null,U)}})}function E(P,L,I){return!I&&P.__zooming||new k(P,L)}function k(P,L){this.that=P,this.args=L,this.active=0,this.sourceEvent=null,this.extent=n.apply(P,L),this.taps=0}k.prototype={event:function(P){return P&&(this.sourceEvent=P),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(P,L){return this.mouse&&P!=="mouse"&&(this.mouse[1]=L.invert(this.mouse[0])),this.touch0&&P!=="touch"&&(this.touch0[1]=L.invert(this.touch0[0])),this.touch1&&P!=="touch"&&(this.touch1[1]=L.invert(this.touch1[0])),this.that.__zoom=L,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(P){var L=tt(this.that).datum();u.call(P,this.that,new iV(P,{sourceEvent:this.sourceEvent,target:v,transform:this.that.__zoom,dispatch:u}),L)}};function N(P,...L){if(!e.apply(this,arguments))return;var I=E(this,L).event(P),F=this.__zoom,R=Math.max(s[0],Math.min(s[1],F.k*Math.pow(2,o.apply(this,arguments)))),j=Ot(P);if(I.wheel)(I.mouse[0][0]!==j[0]||I.mouse[0][1]!==j[1])&&(I.mouse[1]=F.invert(I.mouse[0]=j)),clearTimeout(I.wheel);else{if(F.k===R)return;I.mouse=[j,F.invert(j)],Zl(this),I.start()}ts(P),I.wheel=setTimeout(O,y),I.zoom("mouse",r(w(x(F,R),I.mouse[0],I.mouse[1]),I.extent,a));function O(){I.wheel=null,I.end()}}function M(P,...L){if(p||!e.apply(this,arguments))return;var I=P.currentTarget,F=E(this,L,!0).event(P),R=tt(P.view).on("mousemove.zoom",$,!0).on("mouseup.zoom",X,!0),j=Ot(P,I),O=P.clientX,G=P.clientY;fE(P.view),ff(P),F.mouse=[j,this.__zoom.invert(j)],Zl(this),F.start();function $(H){if(ts(H),!F.moved){var W=H.clientX-O,z=H.clientY-G;F.moved=W*W+z*z>b}F.event(H).zoom("mouse",r(w(F.that.__zoom,F.mouse[0]=Ot(H,I),F.mouse[1]),F.extent,a))}function X(H){R.on("mousemove.zoom mouseup.zoom",null),pE(H.view,F.moved),ts(H),F.event(H).end()}}function T(P,...L){if(e.apply(this,arguments)){var I=this.__zoom,F=Ot(P.changedTouches?P.changedTouches[0]:P,this),R=I.invert(F),j=I.k*(P.shiftKey?.5:2),O=r(w(x(I,j),F,R),n.apply(this,L),a);ts(P),l>0?tt(this).transition().duration(l).call(C,O,F,P):tt(this).call(v.transform,O,F,P)}}function A(P,...L){if(e.apply(this,arguments)){var I=P.touches,F=I.length,R=E(this,L,P.changedTouches.length===F).event(P),j,O,G,$;for(ff(P),O=0;O<F;++O)G=I[O],$=Ot(G,this),$=[$,this.__zoom.invert($),G.identifier],R.touch0?!R.touch1&&R.touch0[2]!==$[2]&&(R.touch1=$,R.taps=0):(R.touch0=$,j=!0,R.taps=1+!!f);f&&(f=clearTimeout(f)),j&&(R.taps<2&&(d=$[0],f=setTimeout(function(){f=null},m)),Zl(this),R.start())}}function D(P,...L){if(this.__zooming){var I=E(this,L).event(P),F=P.changedTouches,R=F.length,j,O,G,$;for(ts(P),j=0;j<R;++j)O=F[j],G=Ot(O,this),I.touch0&&I.touch0[2]===O.identifier?I.touch0[0]=G:I.touch1&&I.touch1[2]===O.identifier&&(I.touch1[0]=G);if(O=I.that.__zoom,I.touch1){var X=I.touch0[0],H=I.touch0[1],W=I.touch1[0],z=I.touch1[1],U=(U=W[0]-X[0])*U+(U=W[1]-X[1])*U,Y=(Y=z[0]-H[0])*Y+(Y=z[1]-H[1])*Y;O=x(O,Math.sqrt(U/Y)),G=[(X[0]+W[0])/2,(X[1]+W[1])/2],$=[(H[0]+z[0])/2,(H[1]+z[1])/2]}else if(I.touch0)G=I.touch0[0],$=I.touch0[1];else return;I.zoom("touch",r(w(O,G,$),I.extent,a))}}function V(P,...L){if(this.__zooming){var I=E(this,L).event(P),F=P.changedTouches,R=F.length,j,O;for(ff(P),p&&clearTimeout(p),p=setTimeout(function(){p=null},m),j=0;j<R;++j)O=F[j],I.touch0&&I.touch0[2]===O.identifier?delete I.touch0:I.touch1&&I.touch1[2]===O.identifier&&delete I.touch1;if(I.touch1&&!I.touch0&&(I.touch0=I.touch1,delete I.touch1),I.touch0)I.touch0[1]=this.__zoom.invert(I.touch0[0]);else if(I.end(),I.taps===2&&(O=Ot(O,this),Math.hypot(d[0]-O[0],d[1]-O[1])<_)){var G=tt(this).on("dblclick.zoom");G&&G.apply(this,arguments)}}}return v.wheelDelta=function(P){return arguments.length?(o=typeof P=="function"?P:vl(+P),v):o},v.filter=function(P){return arguments.length?(e=typeof P=="function"?P:vl(!!P),v):e},v.touchable=function(P){return arguments.length?(i=typeof P=="function"?P:vl(!!P),v):i},v.extent=function(P){return arguments.length?(n=typeof P=="function"?P:vl([[+P[0][0],+P[0][1]],[+P[1][0],+P[1][1]]]),v):n},v.scaleExtent=function(P){return arguments.length?(s[0]=+P[0],s[1]=+P[1],v):[s[0],s[1]]},v.translateExtent=function(P){return arguments.length?(a[0][0]=+P[0][0],a[1][0]=+P[1][0],a[0][1]=+P[0][1],a[1][1]=+P[1][1],v):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},v.constrain=function(P){return arguments.length?(r=P,v):r},v.duration=function(P){return arguments.length?(l=+P,v):l},v.interpolate=function(P){return arguments.length?(c=P,v):c},v.on=function(){var P=u.on.apply(u,arguments);return P===u?v:P},v.clickDistance=function(P){return arguments.length?(b=(P=+P)*P,v):Math.sqrt(b)},v.tapDistance=function(P){return arguments.length?(_=+P,v):_},v}class S0 extends Map{constructor(n,r=pV){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),n!=null)for(const[o,i]of n)this.set(o,i)}get(n){return super.get(C0(this,n))}has(n){return super.has(C0(this,n))}set(n,r){return super.set(dV(this,n),r)}delete(n){return super.delete(fV(this,n))}}function C0({_intern:e,_key:n},r){const o=n(r);return e.has(o)?e.get(o):r}function dV({_intern:e,_key:n},r){const o=n(r);return e.has(o)?e.get(o):(e.set(o,r),r)}function fV({_intern:e,_key:n},r){const o=n(r);return e.has(o)&&(r=e.get(o),e.delete(o)),r}function pV(e){return e!==null&&typeof e=="object"?e.valueOf():e}function E0(e,n){let r;if(n===void 0)for(const o of e)o!=null&&(r<o||r===void 0&&o>=o)&&(r=o);else{let o=-1;for(let i of e)(i=n(i,++o,e))!=null&&(r<i||r===void 0&&i>=i)&&(r=i)}return r}function k0(e,n){let r;if(n===void 0)for(const o of e)o!=null&&(r>o||r===void 0&&o>=o)&&(r=o);else{let o=-1;for(let i of e)(i=n(i,++o,e))!=null&&(r>i||r===void 0&&i>=i)&&(r=i)}return r}function hV(e,n){let r=0;for(let o of e)(o=+o)&&(r+=o);return r}var mV=typeof global=="object"&&global&&global.Object===Object&&global,gV=typeof self=="object"&&self&&self.Object===Object&&self,kE=mV||gV||Function("return this")(),Gc=kE.Symbol,NE=Object.prototype,yV=NE.hasOwnProperty,vV=NE.toString,ns=Gc?Gc.toStringTag:void 0;function xV(e){var n=yV.call(e,ns),r=e[ns];try{e[ns]=void 0;var o=!0}catch{}var i=vV.call(e);return o&&(n?e[ns]=r:delete e[ns]),i}var wV=Object.prototype,bV=wV.toString;function _V(e){return bV.call(e)}var SV="[object Null]",CV="[object Undefined]",N0=Gc?Gc.toStringTag:void 0;function EV(e){return e==null?e===void 0?CV:SV:N0&&N0 in Object(e)?xV(e):_V(e)}function kV(e){return e!=null&&typeof e=="object"}var NV="[object Symbol]";function PV(e){return typeof e=="symbol"||kV(e)&&EV(e)==NV}var MV=/\s/;function RV(e){for(var n=e.length;n--&&MV.test(e.charAt(n)););return n}var jV=/^\s+/;function AV(e){return e&&e.slice(0,RV(e)+1).replace(jV,"")}function Yc(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}var P0=NaN,TV=/^[-+]0x[0-9a-f]+$/i,IV=/^0b[01]+$/i,$V=/^0o[0-7]+$/i,OV=parseInt;function M0(e){if(typeof e=="number")return e;if(PV(e))return P0;if(Yc(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=Yc(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=AV(e);var r=IV.test(e);return r||$V.test(e)?OV(e.slice(2),r?2:8):TV.test(e)?P0:+e}var pf=function(){return kE.Date.now()},DV="Expected a function",LV=Math.max,zV=Math.min;function PE(e,n,r){var o,i,s,a,l,c,u=0,f=!1,d=!1,p=!0;if(typeof e!="function")throw new TypeError(DV);n=M0(n)||0,Yc(r)&&(f=!!r.leading,d="maxWait"in r,s=d?LV(M0(r.maxWait)||0,n):s,p="trailing"in r?!!r.trailing:p);function m(E){var k=o,N=i;return o=i=void 0,u=E,a=e.apply(N,k),a}function y(E){return u=E,l=setTimeout(v,n),f?m(E):a}function b(E){var k=E-c,N=E-u,M=n-k;return d?zV(M,s-N):M}function _(E){var k=E-c,N=E-u;return c===void 0||k>=n||k<0||d&&N>=s}function v(){var E=pf();if(_(E))return x(E);l=setTimeout(v,b(E))}function x(E){return l=void 0,p&&o?m(E):(o=i=void 0,a)}function w(){l!==void 0&&clearTimeout(l),u=0,o=c=i=l=void 0}function S(){return l===void 0?a:x(pf())}function C(){var E=pf(),k=_(E);if(o=arguments,i=this,c=E,k){if(l===void 0)return y(c);if(d)return clearTimeout(l),l=setTimeout(v,n),m(c)}return l===void 0&&(l=setTimeout(v,n)),a}return C.cancel=w,C.flush=S,C}var FV="Expected a function";function VV(e,n,r){var o=!0,i=!0;if(typeof e!="function")throw new TypeError(FV);return Yc(r)&&(o="leading"in r?!!r.leading:o,i="trailing"in r?!!r.trailing:i),PE(e,n,{leading:o,maxWait:n,trailing:i})}var oo=Object.freeze({Linear:Object.freeze({None:function(e){return e},In:function(e){return e},Out:function(e){return e},InOut:function(e){return e}}),Quadratic:Object.freeze({In:function(e){return e*e},Out:function(e){return e*(2-e)},InOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)}}),Cubic:Object.freeze({In:function(e){return e*e*e},Out:function(e){return--e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}}),Quartic:Object.freeze({In:function(e){return e*e*e*e},Out:function(e){return 1- --e*e*e*e},InOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)}}),Quintic:Object.freeze({In:function(e){return e*e*e*e*e},Out:function(e){return--e*e*e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)}}),Sinusoidal:Object.freeze({In:function(e){return 1-Math.sin((1-e)*Math.PI/2)},Out:function(e){return Math.sin(e*Math.PI/2)},InOut:function(e){return .5*(1-Math.sin(Math.PI*(.5-e)))}}),Exponential:Object.freeze({In:function(e){return e===0?0:Math.pow(1024,e-1)},Out:function(e){return e===1?1:1-Math.pow(2,-10*e)},InOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(-Math.pow(2,-10*(e-1))+2)}}),Circular:Object.freeze({In:function(e){return 1-Math.sqrt(1-e*e)},Out:function(e){return Math.sqrt(1- --e*e)},InOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)}}),Elastic:Object.freeze({In:function(e){return e===0?0:e===1?1:-Math.pow(2,10*(e-1))*Math.sin((e-1.1)*5*Math.PI)},Out:function(e){return e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e-.1)*5*Math.PI)+1},InOut:function(e){return e===0?0:e===1?1:(e*=2,e<1?-.5*Math.pow(2,10*(e-1))*Math.sin((e-1.1)*5*Math.PI):.5*Math.pow(2,-10*(e-1))*Math.sin((e-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(e){var n=1.70158;return e===1?1:e*e*((n+1)*e-n)},Out:function(e){var n=1.70158;return e===0?0:--e*e*((n+1)*e+n)+1},InOut:function(e){var n=2.5949095;return(e*=2)<1?.5*(e*e*((n+1)*e-n)):.5*((e-=2)*e*((n+1)*e+n)+2)}}),Bounce:Object.freeze({In:function(e){return 1-oo.Bounce.Out(1-e)},Out:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},InOut:function(e){return e<.5?oo.Bounce.In(e*2)*.5:oo.Bounce.Out(e*2-1)*.5+.5}}),generatePow:function(e){return e===void 0&&(e=4),e=e<Number.EPSILON?Number.EPSILON:e,e=e>1e4?1e4:e,{In:function(n){return Math.pow(n,e)},Out:function(n){return 1-Math.pow(1-n,e)},InOut:function(n){return n<.5?Math.pow(n*2,e)/2:(1-Math.pow(2-n*2,e))/2+.5}}}}),ys=function(){return performance.now()},ME=function(){function e(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];this._tweens={},this._tweensAddedDuringUpdate={},this.add.apply(this,n)}return e.prototype.getAll=function(){var n=this;return Object.keys(this._tweens).map(function(r){return n._tweens[r]})},e.prototype.removeAll=function(){this._tweens={}},e.prototype.add=function(){for(var n,r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];for(var i=0,s=r;i<s.length;i++){var a=s[i];(n=a._group)===null||n===void 0||n.remove(a),a._group=this,this._tweens[a.getId()]=a,this._tweensAddedDuringUpdate[a.getId()]=a}},e.prototype.remove=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];for(var o=0,i=n;o<i.length;o++){var s=i[o];s._group=void 0,delete this._tweens[s.getId()],delete this._tweensAddedDuringUpdate[s.getId()]}},e.prototype.allStopped=function(){return this.getAll().every(function(n){return!n.isPlaying()})},e.prototype.update=function(n,r){n===void 0&&(n=ys()),r===void 0&&(r=!0);var o=Object.keys(this._tweens);if(o.length!==0)for(;o.length>0;){this._tweensAddedDuringUpdate={};for(var i=0;i<o.length;i++){var s=this._tweens[o[i]],a=!r;s&&s.update(n,a)===!1&&!r&&this.remove(s)}o=Object.keys(this._tweensAddedDuringUpdate)}},e}(),Kp={Linear:function(e,n){var r=e.length-1,o=r*n,i=Math.floor(o),s=Kp.Utils.Linear;return n<0?s(e[0],e[1],o):n>1?s(e[r],e[r-1],r-o):s(e[i],e[i+1>r?r:i+1],o-i)},Utils:{Linear:function(e,n,r){return(n-e)*r+e}}},RE=function(){function e(){}return e.nextId=function(){return e._nextId++},e._nextId=0,e}(),qp=new ME,R0=function(){function e(n,r){this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=oo.Linear.None,this._interpolationFunction=Kp.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=RE.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1,this._object=n,typeof r=="object"?(this._group=r,r.add(this)):r===!0&&(this._group=qp,qp.add(this))}return e.prototype.getId=function(){return this._id},e.prototype.isPlaying=function(){return this._isPlaying},e.prototype.isPaused=function(){return this._isPaused},e.prototype.getDuration=function(){return this._duration},e.prototype.to=function(n,r){if(r===void 0&&(r=1e3),this._isPlaying)throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=n,this._propertiesAreSetUp=!1,this._duration=r<0?0:r,this},e.prototype.duration=function(n){return n===void 0&&(n=1e3),this._duration=n<0?0:n,this},e.prototype.dynamic=function(n){return n===void 0&&(n=!1),this._isDynamic=n,this},e.prototype.start=function(n,r){if(n===void 0&&(n=ys()),r===void 0&&(r=!1),this._isPlaying)return this;if(this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var o in this._valuesStartRepeat)this._swapEndStartRepeatValues(o),this._valuesStart[o]=this._valuesStartRepeat[o]}if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=n,this._startTime+=this._delayTime,!this._propertiesAreSetUp||r){if(this._propertiesAreSetUp=!0,!this._isDynamic){var i={};for(var s in this._valuesEnd)i[s]=this._valuesEnd[s];this._valuesEnd=i}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,r)}return this},e.prototype.startFromCurrentValues=function(n){return this.start(n,!0)},e.prototype._setupProperties=function(n,r,o,i,s){for(var a in o){var l=n[a],c=Array.isArray(l),u=c?"array":typeof l,f=!c&&Array.isArray(o[a]);if(!(u==="undefined"||u==="function")){if(f){var d=o[a];if(d.length===0)continue;for(var p=[l],m=0,y=d.length;m<y;m+=1){var b=this._handleRelativeValue(l,d[m]);if(isNaN(b)){f=!1,console.warn("Found invalid interpolation list. Skipping.");break}p.push(b)}f&&(o[a]=p)}if((u==="object"||c)&&l&&!f){r[a]=c?[]:{};var _=l;for(var v in _)r[a][v]=_[v];i[a]=c?[]:{};var d=o[a];if(!this._isDynamic){var x={};for(var v in d)x[v]=d[v];o[a]=d=x}this._setupProperties(_,r[a],d,i[a],s)}else(typeof r[a]>"u"||s)&&(r[a]=l),c||(r[a]*=1),f?i[a]=o[a].slice().reverse():i[a]=r[a]||0}}},e.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},e.prototype.end=function(){return this._goToEnd=!0,this.update(this._startTime+this._duration),this},e.prototype.pause=function(n){return n===void 0&&(n=ys()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=n,this)},e.prototype.resume=function(n){return n===void 0&&(n=ys()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=n-this._pauseStart,this._pauseStart=0,this)},e.prototype.stopChainedTweens=function(){for(var n=0,r=this._chainedTweens.length;n<r;n++)this._chainedTweens[n].stop();return this},e.prototype.group=function(n){return n?(n.add(this),this):(console.warn("tween.group() without args has been removed, use group.add(tween) instead."),this)},e.prototype.remove=function(){var n;return(n=this._group)===null||n===void 0||n.remove(this),this},e.prototype.delay=function(n){return n===void 0&&(n=0),this._delayTime=n,this},e.prototype.repeat=function(n){return n===void 0&&(n=0),this._initialRepeat=n,this._repeat=n,this},e.prototype.repeatDelay=function(n){return this._repeatDelayTime=n,this},e.prototype.yoyo=function(n){return n===void 0&&(n=!1),this._yoyo=n,this},e.prototype.easing=function(n){return n===void 0&&(n=oo.Linear.None),this._easingFunction=n,this},e.prototype.interpolation=function(n){return n===void 0&&(n=Kp.Linear),this._interpolationFunction=n,this},e.prototype.chain=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return this._chainedTweens=n,this},e.prototype.onStart=function(n){return this._onStartCallback=n,this},e.prototype.onEveryStart=function(n){return this._onEveryStartCallback=n,this},e.prototype.onUpdate=function(n){return this._onUpdateCallback=n,this},e.prototype.onRepeat=function(n){return this._onRepeatCallback=n,this},e.prototype.onComplete=function(n){return this._onCompleteCallback=n,this},e.prototype.onStop=function(n){return this._onStopCallback=n,this},e.prototype.update=function(n,r){var o=this,i;if(n===void 0&&(n=ys()),r===void 0&&(r=e.autoStartOnUpdate),this._isPaused)return!0;var s;if(!this._goToEnd&&!this._isPlaying)if(r)this.start(n,!0);else return!1;if(this._goToEnd=!1,n<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0);var a=n-this._startTime,l=this._duration+((i=this._repeatDelayTime)!==null&&i!==void 0?i:this._delayTime),c=this._duration+this._repeat*l,u=function(){if(o._duration===0||a>c)return 1;var b=Math.trunc(a/l),_=a-b*l,v=Math.min(_/o._duration,1);return v===0&&a===o._duration?1:v},f=u(),d=this._easingFunction(f);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,d),this._onUpdateCallback&&this._onUpdateCallback(this._object,f),this._duration===0||a>=this._duration)if(this._repeat>0){var p=Math.min(Math.trunc((a-this._duration)/l)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=p);for(s in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[s]=="string"&&(this._valuesStartRepeat[s]=this._valuesStartRepeat[s]+parseFloat(this._valuesEnd[s])),this._yoyo&&this._swapEndStartRepeatValues(s),this._valuesStart[s]=this._valuesStartRepeat[s];return this._yoyo&&(this._reversed=!this._reversed),this._startTime+=l*p,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var m=0,y=this._chainedTweens.length;m<y;m++)this._chainedTweens[m].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},e.prototype._updateProperties=function(n,r,o,i){for(var s in o)if(r[s]!==void 0){var a=r[s]||0,l=o[s],c=Array.isArray(n[s]),u=Array.isArray(l),f=!c&&u;f?n[s]=this._interpolationFunction(l,i):typeof l=="object"&&l?this._updateProperties(n[s],a,l,i):(l=this._handleRelativeValue(a,l),typeof l=="number"&&(n[s]=a+(l-a)*i))}},e.prototype._handleRelativeValue=function(n,r){return typeof r!="string"?r:r.charAt(0)==="+"||r.charAt(0)==="-"?n+parseFloat(r):parseFloat(r)},e.prototype._swapEndStartRepeatValues=function(n){var r=this._valuesStartRepeat[n],o=this._valuesEnd[n];typeof o=="string"?this._valuesStartRepeat[n]=this._valuesStartRepeat[n]+parseFloat(o):this._valuesStartRepeat[n]=this._valuesEnd[n],this._valuesEnd[n]=r},e.autoStartOnUpdate=!1,e}();RE.nextId;var Cn=qp;Cn.getAll.bind(Cn);Cn.removeAll.bind(Cn);Cn.add.bind(Cn);Cn.remove.bind(Cn);Cn.update.bind(Cn);function j0(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,o=Array(n);r<n;r++)o[r]=e[r];return o}function BV(e){if(Array.isArray(e))return e}function HV(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function WV(e,n,r){return Object.defineProperty(e,"prototype",{writable:!1}),e}function UV(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var o,i,s,a,l=[],c=!0,u=!1;try{if(s=(r=r.call(e)).next,n!==0)for(;!(c=(o=s.call(r)).done)&&(l.push(o.value),l.length!==n);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return l}}function GV(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
349
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function YV(e,n){return BV(e)||UV(e,n)||XV(e,n)||GV()}function XV(e,n){if(e){if(typeof e=="string")return j0(e,n);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?j0(e,n):void 0}}var KV=WV(function e(n,r){var o=r.default,i=o===void 0?null:o,s=r.triggerUpdate,a=s===void 0?!0:s,l=r.onChange,c=l===void 0?function(u,f){}:l;HV(this,e),this.name=n,this.defaultVal=i,this.triggerUpdate=a,this.onChange=c});function fg(e){var n=e.stateInit,r=n===void 0?function(){return{}}:n,o=e.props,i=o===void 0?{}:o,s=e.methods,a=s===void 0?{}:s,l=e.aliases,c=l===void 0?{}:l,u=e.init,f=u===void 0?function(){}:u,d=e.update,p=d===void 0?function(){}:d,m=Object.keys(i).map(function(y){return new KV(y,i[y])});return function y(){for(var b=arguments.length,_=new Array(b),v=0;v<b;v++)_[v]=arguments[v];var x=!!(this instanceof y&&this.constructor),w=x?_.shift():void 0,S=_[0],C=S===void 0?{}:S,E=Object.assign({},r instanceof Function?r(C):r,{initialised:!1}),k={};function N(A){return M(A,C),T(),N}var M=function(D,V){f.call(N,D,E,V),E.initialised=!0},T=PE(function(){E.initialised&&(p.call(N,E,k),k={})},1);return m.forEach(function(A){N[A.name]=D(A);function D(V){var P=V.name,L=V.triggerUpdate,I=L===void 0?!1:L,F=V.onChange,R=F===void 0?function(G,$){}:F,j=V.defaultVal,O=j===void 0?null:j;return function(G){var $=E[P];if(!arguments.length)return $;var X=G===void 0?O:G;return E[P]=X,R.call(N,X,E,$),!k.hasOwnProperty(P)&&(k[P]=$),I&&T(),N}}}),Object.keys(a).forEach(function(A){N[A]=function(){for(var D,V=arguments.length,P=new Array(V),L=0;L<V;L++)P[L]=arguments[L];return(D=a[A]).call.apply(D,[N,E].concat(P))}}),Object.entries(c).forEach(function(A){var D=YV(A,2),V=D[0],P=D[1];return N[V]=N[P]}),N.resetProps=function(){return m.forEach(function(A){N[A.name](A.defaultVal)}),N},N.resetProps(),E._rerender=T,x&&w&&N(w),N}}var xe=function(e){return typeof e=="function"?e:typeof e=="string"?function(n){return n[e]}:function(n){return e}};function Xc(e){"@babel/helpers - typeof";return Xc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Xc(e)}var qV=/^\s+/,ZV=/\s+$/;function ae(e,n){if(e=e||"",n=n||{},e instanceof ae)return e;if(!(this instanceof ae))return new ae(e,n);var r=QV(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=Math.round(100*this._a)/100,this._format=n.format||r.format,this._gradientType=n.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=r.ok}ae.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var n=this.toRgb();return(n.r*299+n.g*587+n.b*114)/1e3},getLuminance:function(){var n=this.toRgb(),r,o,i,s,a,l;return r=n.r/255,o=n.g/255,i=n.b/255,r<=.03928?s=r/12.92:s=Math.pow((r+.055)/1.055,2.4),o<=.03928?a=o/12.92:a=Math.pow((o+.055)/1.055,2.4),i<=.03928?l=i/12.92:l=Math.pow((i+.055)/1.055,2.4),.2126*s+.7152*a+.0722*l},setAlpha:function(n){return this._a=jE(n),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var n=T0(this._r,this._g,this._b);return{h:n.h*360,s:n.s,v:n.v,a:this._a}},toHsvString:function(){var n=T0(this._r,this._g,this._b),r=Math.round(n.h*360),o=Math.round(n.s*100),i=Math.round(n.v*100);return this._a==1?"hsv("+r+", "+o+"%, "+i+"%)":"hsva("+r+", "+o+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var n=A0(this._r,this._g,this._b);return{h:n.h*360,s:n.s,l:n.l,a:this._a}},toHslString:function(){var n=A0(this._r,this._g,this._b),r=Math.round(n.h*360),o=Math.round(n.s*100),i=Math.round(n.l*100);return this._a==1?"hsl("+r+", "+o+"%, "+i+"%)":"hsla("+r+", "+o+"%, "+i+"%, "+this._roundA+")"},toHex:function(n){return I0(this._r,this._g,this._b,n)},toHexString:function(n){return"#"+this.toHex(n)},toHex8:function(n){return nB(this._r,this._g,this._b,this._a,n)},toHex8String:function(n){return"#"+this.toHex8(n)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(Ne(this._r,255)*100)+"%",g:Math.round(Ne(this._g,255)*100)+"%",b:Math.round(Ne(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(Ne(this._r,255)*100)+"%, "+Math.round(Ne(this._g,255)*100)+"%, "+Math.round(Ne(this._b,255)*100)+"%)":"rgba("+Math.round(Ne(this._r,255)*100)+"%, "+Math.round(Ne(this._g,255)*100)+"%, "+Math.round(Ne(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:hB[I0(this._r,this._g,this._b,!0)]||!1},toFilter:function(n){var r="#"+$0(this._r,this._g,this._b,this._a),o=r,i=this._gradientType?"GradientType = 1, ":"";if(n){var s=ae(n);o="#"+$0(s._r,s._g,s._b,s._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+r+",endColorstr="+o+")"},toString:function(n){var r=!!n;n=n||this._format;var o=!1,i=this._a<1&&this._a>=0,s=!r&&i&&(n==="hex"||n==="hex6"||n==="hex3"||n==="hex4"||n==="hex8"||n==="name");return s?n==="name"&&this._a===0?this.toName():this.toRgbString():(n==="rgb"&&(o=this.toRgbString()),n==="prgb"&&(o=this.toPercentageRgbString()),(n==="hex"||n==="hex6")&&(o=this.toHexString()),n==="hex3"&&(o=this.toHexString(!0)),n==="hex4"&&(o=this.toHex8String(!0)),n==="hex8"&&(o=this.toHex8String()),n==="name"&&(o=this.toName()),n==="hsl"&&(o=this.toHslString()),n==="hsv"&&(o=this.toHsvString()),o||this.toHexString())},clone:function(){return ae(this.toString())},_applyModification:function(n,r){var o=n.apply(null,[this].concat([].slice.call(r)));return this._r=o._r,this._g=o._g,this._b=o._b,this.setAlpha(o._a),this},lighten:function(){return this._applyModification(sB,arguments)},brighten:function(){return this._applyModification(aB,arguments)},darken:function(){return this._applyModification(lB,arguments)},desaturate:function(){return this._applyModification(rB,arguments)},saturate:function(){return this._applyModification(oB,arguments)},greyscale:function(){return this._applyModification(iB,arguments)},spin:function(){return this._applyModification(cB,arguments)},_applyCombination:function(n,r){return n.apply(null,[this].concat([].slice.call(r)))},analogous:function(){return this._applyCombination(fB,arguments)},complement:function(){return this._applyCombination(uB,arguments)},monochromatic:function(){return this._applyCombination(pB,arguments)},splitcomplement:function(){return this._applyCombination(dB,arguments)},triad:function(){return this._applyCombination(O0,[3])},tetrad:function(){return this._applyCombination(O0,[4])}};ae.fromRatio=function(e,n){if(Xc(e)=="object"){var r={};for(var o in e)e.hasOwnProperty(o)&&(o==="a"?r[o]=e[o]:r[o]=vs(e[o]));e=r}return ae(e,n)};function QV(e){var n={r:0,g:0,b:0},r=1,o=null,i=null,s=null,a=!1,l=!1;return typeof e=="string"&&(e=vB(e)),Xc(e)=="object"&&(Rn(e.r)&&Rn(e.g)&&Rn(e.b)?(n=JV(e.r,e.g,e.b),a=!0,l=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Rn(e.h)&&Rn(e.s)&&Rn(e.v)?(o=vs(e.s),i=vs(e.v),n=tB(e.h,o,i),a=!0,l="hsv"):Rn(e.h)&&Rn(e.s)&&Rn(e.l)&&(o=vs(e.s),s=vs(e.l),n=eB(e.h,o,s),a=!0,l="hsl"),e.hasOwnProperty("a")&&(r=e.a)),r=jE(r),{ok:a,format:e.format||l,r:Math.min(255,Math.max(n.r,0)),g:Math.min(255,Math.max(n.g,0)),b:Math.min(255,Math.max(n.b,0)),a:r}}function JV(e,n,r){return{r:Ne(e,255)*255,g:Ne(n,255)*255,b:Ne(r,255)*255}}function A0(e,n,r){e=Ne(e,255),n=Ne(n,255),r=Ne(r,255);var o=Math.max(e,n,r),i=Math.min(e,n,r),s,a,l=(o+i)/2;if(o==i)s=a=0;else{var c=o-i;switch(a=l>.5?c/(2-o-i):c/(o+i),o){case e:s=(n-r)/c+(n<r?6:0);break;case n:s=(r-e)/c+2;break;case r:s=(e-n)/c+4;break}s/=6}return{h:s,s:a,l}}function eB(e,n,r){var o,i,s;e=Ne(e,360),n=Ne(n,100),r=Ne(r,100);function a(u,f,d){return d<0&&(d+=1),d>1&&(d-=1),d<1/6?u+(f-u)*6*d:d<1/2?f:d<2/3?u+(f-u)*(2/3-d)*6:u}if(n===0)o=i=s=r;else{var l=r<.5?r*(1+n):r+n-r*n,c=2*r-l;o=a(c,l,e+1/3),i=a(c,l,e),s=a(c,l,e-1/3)}return{r:o*255,g:i*255,b:s*255}}function T0(e,n,r){e=Ne(e,255),n=Ne(n,255),r=Ne(r,255);var o=Math.max(e,n,r),i=Math.min(e,n,r),s,a,l=o,c=o-i;if(a=o===0?0:c/o,o==i)s=0;else{switch(o){case e:s=(n-r)/c+(n<r?6:0);break;case n:s=(r-e)/c+2;break;case r:s=(e-n)/c+4;break}s/=6}return{h:s,s:a,v:l}}function tB(e,n,r){e=Ne(e,360)*6,n=Ne(n,100),r=Ne(r,100);var o=Math.floor(e),i=e-o,s=r*(1-n),a=r*(1-i*n),l=r*(1-(1-i)*n),c=o%6,u=[r,a,s,s,l,r][c],f=[l,r,r,a,s,s][c],d=[s,s,l,r,r,a][c];return{r:u*255,g:f*255,b:d*255}}function I0(e,n,r,o){var i=[en(Math.round(e).toString(16)),en(Math.round(n).toString(16)),en(Math.round(r).toString(16))];return o&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function nB(e,n,r,o,i){var s=[en(Math.round(e).toString(16)),en(Math.round(n).toString(16)),en(Math.round(r).toString(16)),en(AE(o))];return i&&s[0].charAt(0)==s[0].charAt(1)&&s[1].charAt(0)==s[1].charAt(1)&&s[2].charAt(0)==s[2].charAt(1)&&s[3].charAt(0)==s[3].charAt(1)?s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0)+s[3].charAt(0):s.join("")}function $0(e,n,r,o){var i=[en(AE(o)),en(Math.round(e).toString(16)),en(Math.round(n).toString(16)),en(Math.round(r).toString(16))];return i.join("")}ae.equals=function(e,n){return!e||!n?!1:ae(e).toRgbString()==ae(n).toRgbString()};ae.random=function(){return ae.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function rB(e,n){n=n===0?0:n||10;var r=ae(e).toHsl();return r.s-=n/100,r.s=td(r.s),ae(r)}function oB(e,n){n=n===0?0:n||10;var r=ae(e).toHsl();return r.s+=n/100,r.s=td(r.s),ae(r)}function iB(e){return ae(e).desaturate(100)}function sB(e,n){n=n===0?0:n||10;var r=ae(e).toHsl();return r.l+=n/100,r.l=td(r.l),ae(r)}function aB(e,n){n=n===0?0:n||10;var r=ae(e).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(n/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(n/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(n/100)))),ae(r)}function lB(e,n){n=n===0?0:n||10;var r=ae(e).toHsl();return r.l-=n/100,r.l=td(r.l),ae(r)}function cB(e,n){var r=ae(e).toHsl(),o=(r.h+n)%360;return r.h=o<0?360+o:o,ae(r)}function uB(e){var n=ae(e).toHsl();return n.h=(n.h+180)%360,ae(n)}function O0(e,n){if(isNaN(n)||n<=0)throw new Error("Argument to polyad must be a positive number");for(var r=ae(e).toHsl(),o=[ae(e)],i=360/n,s=1;s<n;s++)o.push(ae({h:(r.h+s*i)%360,s:r.s,l:r.l}));return o}function dB(e){var n=ae(e).toHsl(),r=n.h;return[ae(e),ae({h:(r+72)%360,s:n.s,l:n.l}),ae({h:(r+216)%360,s:n.s,l:n.l})]}function fB(e,n,r){n=n||6,r=r||30;var o=ae(e).toHsl(),i=360/r,s=[ae(e)];for(o.h=(o.h-(i*n>>1)+720)%360;--n;)o.h=(o.h+i)%360,s.push(ae(o));return s}function pB(e,n){n=n||6;for(var r=ae(e).toHsv(),o=r.h,i=r.s,s=r.v,a=[],l=1/n;n--;)a.push(ae({h:o,s:i,v:s})),s=(s+l)%1;return a}ae.mix=function(e,n,r){r=r===0?0:r||50;var o=ae(e).toRgb(),i=ae(n).toRgb(),s=r/100,a={r:(i.r-o.r)*s+o.r,g:(i.g-o.g)*s+o.g,b:(i.b-o.b)*s+o.b,a:(i.a-o.a)*s+o.a};return ae(a)};ae.readability=function(e,n){var r=ae(e),o=ae(n);return(Math.max(r.getLuminance(),o.getLuminance())+.05)/(Math.min(r.getLuminance(),o.getLuminance())+.05)};ae.isReadable=function(e,n,r){var o=ae.readability(e,n),i,s;switch(s=!1,i=xB(r),i.level+i.size){case"AAsmall":case"AAAlarge":s=o>=4.5;break;case"AAlarge":s=o>=3;break;case"AAAsmall":s=o>=7;break}return s};ae.mostReadable=function(e,n,r){var o=null,i=0,s,a,l,c;r=r||{},a=r.includeFallbackColors,l=r.level,c=r.size;for(var u=0;u<n.length;u++)s=ae.readability(e,n[u]),s>i&&(i=s,o=ae(n[u]));return ae.isReadable(e,o,{level:l,size:c})||!a?o:(r.includeFallbackColors=!1,ae.mostReadable(e,["#fff","#000"],r))};var Zp=ae.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},hB=ae.hexNames=mB(Zp);function mB(e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[e[r]]=r);return n}function jE(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Ne(e,n){gB(e)&&(e="100%");var r=yB(e);return e=Math.min(n,Math.max(0,parseFloat(e))),r&&(e=parseInt(e*n,10)/100),Math.abs(e-n)<1e-6?1:e%n/parseFloat(n)}function td(e){return Math.min(1,Math.max(0,e))}function bt(e){return parseInt(e,16)}function gB(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function yB(e){return typeof e=="string"&&e.indexOf("%")!=-1}function en(e){return e.length==1?"0"+e:""+e}function vs(e){return e<=1&&(e=e*100+"%"),e}function AE(e){return Math.round(parseFloat(e)*255).toString(16)}function D0(e){return bt(e)/255}var Yt=function(){var e="[-\\+]?\\d+%?",n="[-\\+]?\\d*\\.\\d+%?",r="(?:"+n+")|(?:"+e+")",o="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?",i="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?";return{CSS_UNIT:new RegExp(r),rgb:new RegExp("rgb"+o),rgba:new RegExp("rgba"+i),hsl:new RegExp("hsl"+o),hsla:new RegExp("hsla"+i),hsv:new RegExp("hsv"+o),hsva:new RegExp("hsva"+i),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function Rn(e){return!!Yt.CSS_UNIT.exec(e)}function vB(e){e=e.replace(qV,"").replace(ZV,"").toLowerCase();var n=!1;if(Zp[e])e=Zp[e],n=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=Yt.rgb.exec(e))?{r:r[1],g:r[2],b:r[3]}:(r=Yt.rgba.exec(e))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=Yt.hsl.exec(e))?{h:r[1],s:r[2],l:r[3]}:(r=Yt.hsla.exec(e))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=Yt.hsv.exec(e))?{h:r[1],s:r[2],v:r[3]}:(r=Yt.hsva.exec(e))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=Yt.hex8.exec(e))?{r:bt(r[1]),g:bt(r[2]),b:bt(r[3]),a:D0(r[4]),format:n?"name":"hex8"}:(r=Yt.hex6.exec(e))?{r:bt(r[1]),g:bt(r[2]),b:bt(r[3]),format:n?"name":"hex"}:(r=Yt.hex4.exec(e))?{r:bt(r[1]+""+r[1]),g:bt(r[2]+""+r[2]),b:bt(r[3]+""+r[3]),a:D0(r[4]+""+r[4]),format:n?"name":"hex8"}:(r=Yt.hex3.exec(e))?{r:bt(r[1]+""+r[1]),g:bt(r[2]+""+r[2]),b:bt(r[3]+""+r[3]),format:n?"name":"hex"}:!1}function xB(e){var n,r;return e=e||{level:"AA",size:"small"},n=(e.level||"AA").toUpperCase(),r=(e.size||"small").toLowerCase(),n!=="AA"&&n!=="AAA"&&(n="AA"),r!=="small"&&r!=="large"&&(r="small"),{level:n,size:r}}function Qp(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,o=Array(n);r<n;r++)o[r]=e[r];return o}function wB(e){if(Array.isArray(e))return Qp(e)}function TE(e,n,r){if(typeof e=="function"?e===n:e.has(n))return arguments.length<3?n:r;throw new TypeError("Private element is not present on this object")}function bB(e,n){if(n.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _B(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Tt(e,n){return e.get(TE(e,n))}function L0(e,n,r){bB(e,n),n.set(e,r)}function z0(e,n,r){return e.set(TE(e,n),r),r}function SB(e,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,MB(o.key),o)}}function CB(e,n,r){return n&&SB(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function EB(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function kB(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
350
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function NB(e){return wB(e)||EB(e)||RB(e)||kB()}function PB(e,n){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,n);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function MB(e){var n=PB(e,"string");return typeof n=="symbol"?n:n+""}function RB(e,n){if(e){if(typeof e=="string")return Qp(e,n);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Qp(e,n):void 0}}var jB=123,AB=function(n){return"#".concat(Math.min(n,Math.pow(2,24)).toString(16).padStart(6,"0"))},IE=function(n,r,o){return(n<<16)+(r<<8)+o},TB=function(n){var r=ae(n).toRgb(),o=r.r,i=r.g,s=r.b;return IE(o,i,s)},F0=function(n,r){return n*jB%Math.pow(2,r)},Yr=new WeakMap,jn=new WeakMap,IB=function(){function e(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:6;_B(this,e),L0(this,Yr,void 0),L0(this,jn,void 0),z0(jn,this,n),this.reset()}return CB(e,[{key:"reset",value:function(){z0(Yr,this,["__reserved for background__"])}},{key:"register",value:function(r){if(Tt(Yr,this).length>=Math.pow(2,24-Tt(jn,this)))return null;var o=Tt(Yr,this).length,i=F0(o,Tt(jn,this)),s=AB(o+(i<<24-Tt(jn,this)));return Tt(Yr,this).push(r),s}},{key:"lookup",value:function(r){if(!r)return null;var o=typeof r=="string"?TB(r):IE.apply(void 0,NB(r));if(!o)return null;var i=o&Math.pow(2,24-Tt(jn,this))-1,s=o>>24-Tt(jn,this)&Math.pow(2,Tt(jn,this))-1;return F0(i,Tt(jn,this))!==s||i>=Tt(Yr,this).length?null:Tt(Yr,this)[i]}}])}(),Oa,Me,$E,OE,dr,V0,DE,LE,hf,Ql,Ms,zE,pg,Jp,eh,Kc={},qc=[],$B=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,nd=Array.isArray;function vn(e,n){for(var r in n)e[r]=n[r];return e}function hg(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function OB(e,n,r){var o,i,s,a={};for(s in n)s=="key"?o=n[s]:s=="ref"?i=n[s]:a[s]=n[s];if(arguments.length>2&&(a.children=arguments.length>3?Oa.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(s in e.defaultProps)a[s]===void 0&&(a[s]=e.defaultProps[s]);return Rs(e,a,o,i,null)}function Rs(e,n,r,o,i){var s={type:e,props:n,key:r,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++$E,__i:-1,__u:0};return i==null&&Me.vnode!=null&&Me.vnode(s),s}function rd(e){return e.children}function Jl(e,n){this.props=e,this.context=n}function Si(e,n){if(n==null)return e.__?Si(e.__,e.__i+1):null;for(var r;n<e.__k.length;n++)if((r=e.__k[n])!=null&&r.__e!=null)return r.__e;return typeof e.type=="function"?Si(e):null}function DB(e){if(e.__P&&e.__d){var n=e.__v,r=n.__e,o=[],i=[],s=vn({},n);s.__v=n.__v+1,Me.vnode&&Me.vnode(s),mg(e.__P,s,n,e.__n,e.__P.namespaceURI,32&n.__u?[r]:null,o,r??Si(n),!!(32&n.__u),i),s.__v=n.__v,s.__.__k[s.__i]=s,HE(o,s,i),n.__e=n.__=null,s.__e!=r&&FE(s)}}function FE(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(n){if(n!=null&&n.__e!=null)return e.__e=e.__c.base=n.__e}),FE(e)}function B0(e){(!e.__d&&(e.__d=!0)&&dr.push(e)&&!Zc.__r++||V0!=Me.debounceRendering)&&((V0=Me.debounceRendering)||DE)(Zc)}function Zc(){try{for(var e,n=1;dr.length;)dr.length>n&&dr.sort(LE),e=dr.shift(),n=dr.length,DB(e)}finally{dr.length=Zc.__r=0}}function VE(e,n,r,o,i,s,a,l,c,u,f){var d,p,m,y,b,_,v,x=o&&o.__k||qc,w=n.length;for(c=LB(r,n,x,c,w),d=0;d<w;d++)(m=r.__k[d])!=null&&(p=m.__i!=-1&&x[m.__i]||Kc,m.__i=d,_=mg(e,m,p,i,s,a,l,c,u,f),y=m.__e,m.ref&&p.ref!=m.ref&&(p.ref&&gg(p.ref,null,m),f.push(m.ref,m.__c||y,m)),b==null&&y!=null&&(b=y),(v=!!(4&m.__u))||p.__k===m.__k?(c=BE(m,c,e,v),v&&p.__e&&(p.__e=null)):typeof m.type=="function"&&_!==void 0?c=_:y&&(c=y.nextSibling),m.__u&=-7);return r.__e=b,c}function LB(e,n,r,o,i){var s,a,l,c,u,f=r.length,d=f,p=0;for(e.__k=new Array(i),s=0;s<i;s++)(a=n[s])!=null&&typeof a!="boolean"&&typeof a!="function"?(typeof a=="string"||typeof a=="number"||typeof a=="bigint"||a.constructor==String?a=e.__k[s]=Rs(null,a,null,null,null):nd(a)?a=e.__k[s]=Rs(rd,{children:a},null,null,null):a.constructor===void 0&&a.__b>0?a=e.__k[s]=Rs(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):e.__k[s]=a,c=s+p,a.__=e,a.__b=e.__b+1,l=null,(u=a.__i=zB(a,r,c,d))!=-1&&(d--,(l=r[u])&&(l.__u|=2)),l==null||l.__v==null?(u==-1&&(i>f?p--:i<f&&p++),typeof a.type!="function"&&(a.__u|=4)):u!=c&&(u==c-1?p--:u==c+1?p++:(u>c?p--:p++,a.__u|=4))):e.__k[s]=null;if(d)for(s=0;s<f;s++)(l=r[s])!=null&&!(2&l.__u)&&(l.__e==o&&(o=Si(l)),UE(l,l));return o}function BE(e,n,r,o){var i,s;if(typeof e.type=="function"){for(i=e.__k,s=0;i&&s<i.length;s++)i[s]&&(i[s].__=e,n=BE(i[s],n,r,o));return n}e.__e!=n&&(o&&(n&&e.type&&!n.parentNode&&(n=Si(e)),r.insertBefore(e.__e,n||null)),n=e.__e);do n=n&&n.nextSibling;while(n!=null&&n.nodeType==8);return n}function zB(e,n,r,o){var i,s,a,l=e.key,c=e.type,u=n[r],f=u!=null&&(2&u.__u)==0;if(u===null&&l==null||f&&l==u.key&&c==u.type)return r;if(o>(f?1:0)){for(i=r-1,s=r+1;i>=0||s<n.length;)if((u=n[a=i>=0?i--:s++])!=null&&!(2&u.__u)&&l==u.key&&c==u.type)return a}return-1}function H0(e,n,r){n[0]=="-"?e.setProperty(n,r??""):e[n]=r==null?"":typeof r!="number"||$B.test(n)?r:r+"px"}function xl(e,n,r,o,i){var s,a;e:if(n=="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof o=="string"&&(e.style.cssText=o=""),o)for(n in o)r&&n in r||H0(e.style,n,"");if(r)for(n in r)o&&r[n]==o[n]||H0(e.style,n,r[n])}else if(n[0]=="o"&&n[1]=="n")s=n!=(n=n.replace(zE,"$1")),a=n.toLowerCase(),n=a in e||n=="onFocusOut"||n=="onFocusIn"?a.slice(2):n.slice(2),e.l||(e.l={}),e.l[n+s]=r,r?o?r[Ms]=o[Ms]:(r[Ms]=pg,e.addEventListener(n,s?eh:Jp,s)):e.removeEventListener(n,s?eh:Jp,s);else{if(i=="http://www.w3.org/2000/svg")n=n.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(n!="width"&&n!="height"&&n!="href"&&n!="list"&&n!="form"&&n!="tabIndex"&&n!="download"&&n!="rowSpan"&&n!="colSpan"&&n!="role"&&n!="popover"&&n in e)try{e[n]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&n[4]!="-"?e.removeAttribute(n):e.setAttribute(n,n=="popover"&&r==1?"":r))}}function W0(e){return function(n){if(this.l){var r=this.l[n.type+e];if(n[Ql]==null)n[Ql]=pg++;else if(n[Ql]<r[Ms])return;return r(Me.event?Me.event(n):n)}}}function mg(e,n,r,o,i,s,a,l,c,u){var f,d,p,m,y,b,_,v,x,w,S,C,E,k,N,M=n.type;if(n.constructor!==void 0)return null;128&r.__u&&(c=!!(32&r.__u),s=[l=n.__e=r.__e]),(f=Me.__b)&&f(n);e:if(typeof M=="function")try{if(v=n.props,x=M.prototype&&M.prototype.render,w=(f=M.contextType)&&o[f.__c],S=f?w?w.props.value:f.__:o,r.__c?_=(d=n.__c=r.__c).__=d.__E:(x?n.__c=d=new M(v,S):(n.__c=d=new Jl(v,S),d.constructor=M,d.render=VB),w&&w.sub(d),d.state||(d.state={}),d.__n=o,p=d.__d=!0,d.__h=[],d._sb=[]),x&&d.__s==null&&(d.__s=d.state),x&&M.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=vn({},d.__s)),vn(d.__s,M.getDerivedStateFromProps(v,d.__s))),m=d.props,y=d.state,d.__v=n,p)x&&M.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),x&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(x&&M.getDerivedStateFromProps==null&&v!==m&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(v,S),n.__v==r.__v||!d.__e&&d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(v,d.__s,S)===!1){n.__v!=r.__v&&(d.props=v,d.state=d.__s,d.__d=!1),n.__e=r.__e,n.__k=r.__k,n.__k.some(function(T){T&&(T.__=n)}),qc.push.apply(d.__h,d._sb),d._sb=[],d.__h.length&&a.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(v,d.__s,S),x&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(m,y,b)})}if(d.context=S,d.props=v,d.__P=e,d.__e=!1,C=Me.__r,E=0,x)d.state=d.__s,d.__d=!1,C&&C(n),f=d.render(d.props,d.state,d.context),qc.push.apply(d.__h,d._sb),d._sb=[];else do d.__d=!1,C&&C(n),f=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++E<25);d.state=d.__s,d.getChildContext!=null&&(o=vn(vn({},o),d.getChildContext())),x&&!p&&d.getSnapshotBeforeUpdate!=null&&(b=d.getSnapshotBeforeUpdate(m,y)),k=f!=null&&f.type===rd&&f.key==null?WE(f.props.children):f,l=VE(e,nd(k)?k:[k],n,r,o,i,s,a,l,c,u),d.base=n.__e,n.__u&=-161,d.__h.length&&a.push(d),_&&(d.__E=d.__=null)}catch(T){if(n.__v=null,c||s!=null)if(T.then){for(n.__u|=c?160:128;l&&l.nodeType==8&&l.nextSibling;)l=l.nextSibling;s[s.indexOf(l)]=null,n.__e=l}else{for(N=s.length;N--;)hg(s[N]);th(n)}else n.__e=r.__e,n.__k=r.__k,T.then||th(n);Me.__e(T,n,r)}else s==null&&n.__v==r.__v?(n.__k=r.__k,n.__e=r.__e):l=n.__e=FB(r.__e,n,r,o,i,s,a,c,u);return(f=Me.diffed)&&f(n),128&n.__u?void 0:l}function th(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(th))}function HE(e,n,r){for(var o=0;o<r.length;o++)gg(r[o],r[++o],r[++o]);Me.__c&&Me.__c(n,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(s){s.call(i)})}catch(s){Me.__e(s,i.__v)}})}function WE(e){return typeof e!="object"||e==null||e.__b>0?e:nd(e)?e.map(WE):vn({},e)}function FB(e,n,r,o,i,s,a,l,c){var u,f,d,p,m,y,b,_=r.props||Kc,v=n.props,x=n.type;if(x=="svg"?i="http://www.w3.org/2000/svg":x=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),s!=null){for(u=0;u<s.length;u++)if((m=s[u])&&"setAttribute"in m==!!x&&(x?m.localName==x:m.nodeType==3)){e=m,s[u]=null;break}}if(e==null){if(x==null)return document.createTextNode(v);e=document.createElementNS(i,x,v.is&&v),l&&(Me.__m&&Me.__m(n,s),l=!1),s=null}if(x==null)_===v||l&&e.data==v||(e.data=v);else{if(s=s&&Oa.call(e.childNodes),!l&&s!=null)for(_={},u=0;u<e.attributes.length;u++)_[(m=e.attributes[u]).name]=m.value;for(u in _)m=_[u],u=="dangerouslySetInnerHTML"?d=m:u=="children"||u in v||u=="value"&&"defaultValue"in v||u=="checked"&&"defaultChecked"in v||xl(e,u,null,m,i);for(u in v)m=v[u],u=="children"?p=m:u=="dangerouslySetInnerHTML"?f=m:u=="value"?y=m:u=="checked"?b=m:l&&typeof m!="function"||_[u]===m||xl(e,u,m,_[u],i);if(f)l||d&&(f.__html==d.__html||f.__html==e.innerHTML)||(e.innerHTML=f.__html),n.__k=[];else if(d&&(e.innerHTML=""),VE(n.type=="template"?e.content:e,nd(p)?p:[p],n,r,o,x=="foreignObject"?"http://www.w3.org/1999/xhtml":i,s,a,s?s[0]:r.__k&&Si(r,0),l,c),s!=null)for(u=s.length;u--;)hg(s[u]);l||(u="value",x=="progress"&&y==null?e.removeAttribute("value"):y!=null&&(y!==e[u]||x=="progress"&&!y||x=="option"&&y!=_[u])&&xl(e,u,y,_[u],i),u="checked",b!=null&&b!=e[u]&&xl(e,u,b,_[u],i))}return e}function gg(e,n,r){try{if(typeof e=="function"){var o=typeof e.__u=="function";o&&e.__u(),o&&n==null||(e.__u=e(n))}else e.current=n}catch(i){Me.__e(i,r)}}function UE(e,n,r){var o,i;if(Me.unmount&&Me.unmount(e),(o=e.ref)&&(o.current&&o.current!=e.__e||gg(o,null,n)),(o=e.__c)!=null){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(s){Me.__e(s,n)}o.base=o.__P=null}if(o=e.__k)for(i=0;i<o.length;i++)o[i]&&UE(o[i],n,r||typeof e.type!="function");r||hg(e.__e),e.__c=e.__=e.__e=void 0}function VB(e,n,r){return this.constructor(e,r)}function BB(e,n,r){var o,i,s,a;n==document&&(n=document.documentElement),Me.__&&Me.__(e,n),i=(o=!1)?null:n.__k,s=[],a=[],mg(n,e=n.__k=OB(rd,null,[e]),i||Kc,Kc,n.namespaceURI,i?null:n.firstChild?Oa.call(n.childNodes):null,s,i?i.__e:n.firstChild,o,a),HE(s,e,a)}function GE(e,n,r){var o,i,s,a,l=vn({},e.props);for(s in e.type&&e.type.defaultProps&&(a=e.type.defaultProps),n)s=="key"?o=n[s]:s=="ref"?i=n[s]:l[s]=n[s]===void 0&&a!=null?a[s]:n[s];return arguments.length>2&&(l.children=arguments.length>3?Oa.call(arguments,2):r),Rs(e.type,l,o||e.key,i||e.ref,null)}Oa=qc.slice,Me={__e:function(e,n,r,o){for(var i,s,a;n=n.__;)if((i=n.__c)&&!i.__)try{if((s=i.constructor)&&s.getDerivedStateFromError!=null&&(i.setState(s.getDerivedStateFromError(e)),a=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,o||{}),a=i.__d),a)return i.__E=i}catch(l){e=l}throw e}},$E=0,OE=function(e){return e!=null&&e.constructor===void 0},Jl.prototype.setState=function(e,n){var r;r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=vn({},this.state),typeof e=="function"&&(e=e(vn({},r),this.props)),e&&vn(r,e),e!=null&&this.__v&&(n&&this._sb.push(n),B0(this))},Jl.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),B0(this))},Jl.prototype.render=rd,dr=[],DE=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,LE=function(e,n){return e.__v.__b-n.__v.__b},Zc.__r=0,hf=Math.random().toString(8),Ql="__d"+hf,Ms="__a"+hf,zE=/(PointerCapture)$|Capture$/i,pg=0,Jp=W0(!1),eh=W0(!0);function U0(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,o=Array(n);r<n;r++)o[r]=e[r];return o}function HB(e){if(Array.isArray(e))return e}function WB(e,n,r){return(n=qB(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function UB(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var o,i,s,a,l=[],c=!0,u=!1;try{if(s=(r=r.call(e)).next,n!==0)for(;!(c=(o=s.call(r)).done)&&(l.push(o.value),l.length!==n);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return l}}function GB(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
351
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function G0(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,o)}return r}function YB(e){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?G0(Object(r),!0).forEach(function(o){WB(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):G0(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function XB(e,n){return HB(e)||UB(e,n)||ZB(e,n)||GB()}function KB(e,n){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,n);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function qB(e){var n=KB(e,"string");return typeof n=="symbol"?n:n+""}function Qc(e){"@babel/helpers - typeof";return Qc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Qc(e)}function ZB(e,n){if(e){if(typeof e=="string")return U0(e,n);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?U0(e,n):void 0}}var nh=function(n){if(Qc(n)!=="object")return n;var r=GE(n);if(r.props){var o;r.props=YB({},r.props),r!=null&&(o=r.props)!==null&&o!==void 0&&o.children&&(r.props.children=Array.isArray(r.props.children)?r.props.children.map(nh):nh(r.props.children))}return r},QB=function(n){return OE(GE(n))},JB=function(n,r){delete r.__k,BB(nh(n),r)};function eH(e,n){n===void 0&&(n={});var r=n.insertAt;if(!(typeof document>"u")){var o=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",r==="top"&&o.firstChild?o.insertBefore(i,o.firstChild):o.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var tH=`.float-tooltip-kap {
352
- position: absolute;
353
- width: max-content; /* prevent shrinking near right edge */
354
- max-width: max(50%, 150px);
355
- padding: 3px 5px;
356
- border-radius: 3px;
357
- font: 12px sans-serif;
358
- color: #eee;
359
- background: rgba(0,0,0,0.6);
360
- pointer-events: none;
361
- }
362
- `;eH(tH);var nH=fg({props:{content:{default:!1},offsetX:{triggerUpdate:!1},offsetY:{triggerUpdate:!1}},init:function(n,r){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=o.style,s=i===void 0?{}:i,a=!!n&&Qc(n)==="object"&&!!n.node&&typeof n.node=="function",l=tt(a?n.node():n);l.style("position")==="static"&&l.style("position","relative"),r.tooltipEl=l.append("div").attr("class","float-tooltip-kap"),Object.entries(s).forEach(function(u){var f=XB(u,2),d=f[0],p=f[1];return r.tooltipEl.style(d,p)}),r.tooltipEl.style("left","-10000px").style("display","none");var c="tooltip-".concat(Math.round(Math.random()*1e12));r.mouseInside=!1,l.on("mousemove.".concat(c),function(u){r.mouseInside=!0;var f=Ot(u),d=l.node(),p=d.offsetWidth,m=d.offsetHeight,y=[r.offsetX===null||r.offsetX===void 0?"-".concat(f[0]/p*100,"%"):typeof r.offsetX=="number"?"calc(-50% + ".concat(r.offsetX,"px)"):r.offsetX,r.offsetY===null||r.offsetY===void 0?m>130&&m-f[1]<100?"calc(-100% - 6px)":"21px":typeof r.offsetY=="number"?r.offsetY<0?"calc(-100% - ".concat(Math.abs(r.offsetY),"px)"):"".concat(r.offsetY,"px"):r.offsetY];r.tooltipEl.style("left",f[0]+"px").style("top",f[1]+"px").style("transform","translate(".concat(y.join(","),")")),r.content&&r.tooltipEl.style("display","inline")}),l.on("mouseover.".concat(c),function(){r.mouseInside=!0,r.content&&r.tooltipEl.style("display","inline")}),l.on("mouseout.".concat(c),function(){r.mouseInside=!1,r.tooltipEl.style("display","none")})},update:function(n){n.tooltipEl.style("display",n.content&&n.mouseInside?"inline":"none"),n.content?n.content instanceof HTMLElement?(n.tooltipEl.text(""),n.tooltipEl.append(function(){return n.content})):typeof n.content=="string"?n.tooltipEl.html(n.content):QB(n.content)?(n.tooltipEl.text(""),JB(n.content,n.tooltipEl.node())):(n.tooltipEl.style("display","none"),console.warn("Tooltip content is invalid, skipping.",n.content,n.content.toString())):n.tooltipEl.text("")}});function rH(e,n,r){var o,i=1;e==null&&(e=0),n==null&&(n=0),r==null&&(r=0);function s(){var a,l=o.length,c,u=0,f=0,d=0;for(a=0;a<l;++a)c=o[a],u+=c.x||0,f+=c.y||0,d+=c.z||0;for(u=(u/l-e)*i,f=(f/l-n)*i,d=(d/l-r)*i,a=0;a<l;++a)c=o[a],u&&(c.x-=u),f&&(c.y-=f),d&&(c.z-=d)}return s.initialize=function(a){o=a},s.x=function(a){return arguments.length?(e=+a,s):e},s.y=function(a){return arguments.length?(n=+a,s):n},s.z=function(a){return arguments.length?(r=+a,s):r},s.strength=function(a){return arguments.length?(i=+a,s):i},s}function oH(e){const n=+this._x.call(null,e);return YE(this.cover(n),n,e)}function YE(e,n,r){if(isNaN(n))return e;var o,i=e._root,s={data:r},a=e._x0,l=e._x1,c,u,f,d,p;if(!i)return e._root=s,e;for(;i.length;)if((f=n>=(c=(a+l)/2))?a=c:l=c,o=i,!(i=i[d=+f]))return o[d]=s,e;if(u=+e._x.call(null,i.data),n===u)return s.next=i,o?o[d]=s:e._root=s,e;do o=o?o[d]=new Array(2):e._root=new Array(2),(f=n>=(c=(a+l)/2))?a=c:l=c;while((d=+f)==(p=+(u>=c)));return o[p]=i,o[d]=s,e}function iH(e){Array.isArray(e)||(e=Array.from(e));const n=e.length,r=new Float64Array(n);let o=1/0,i=-1/0;for(let s=0,a;s<n;++s)isNaN(a=+this._x.call(null,e[s]))||(r[s]=a,a<o&&(o=a),a>i&&(i=a));if(o>i)return this;this.cover(o).cover(i);for(let s=0;s<n;++s)YE(this,r[s],e[s]);return this}function sH(e){if(isNaN(e=+e))return this;var n=this._x0,r=this._x1;if(isNaN(n))r=(n=Math.floor(e))+1;else{for(var o=r-n||1,i=this._root,s,a;n>e||e>=r;)switch(a=+(e<n),s=new Array(2),s[a]=i,i=s,o*=2,a){case 0:r=n+o;break;case 1:n=r-o;break}this._root&&this._root.length&&(this._root=i)}return this._x0=n,this._x1=r,this}function aH(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function lH(e){return arguments.length?this.cover(+e[0][0]).cover(+e[1][0]):isNaN(this._x0)?void 0:[[this._x0],[this._x1]]}function Vn(e,n,r){this.node=e,this.x0=n,this.x1=r}function cH(e,n){var r,o=this._x0,i,s,a=this._x1,l=[],c=this._root,u,f;for(c&&l.push(new Vn(c,o,a)),n==null?n=1/0:(o=e-n,a=e+n);u=l.pop();)if(!(!(c=u.node)||(i=u.x0)>a||(s=u.x1)<o))if(c.length){var d=(i+s)/2;l.push(new Vn(c[1],d,s),new Vn(c[0],i,d)),(f=+(e>=d))&&(u=l[l.length-1],l[l.length-1]=l[l.length-1-f],l[l.length-1-f]=u)}else{var p=Math.abs(e-+this._x.call(null,c.data));p<n&&(n=p,o=e-p,a=e+p,r=c.data)}return r}function uH(e){if(isNaN(c=+this._x.call(null,e)))return this;var n,r=this._root,o,i,s,a=this._x0,l=this._x1,c,u,f,d,p;if(!r)return this;if(r.length)for(;;){if((f=c>=(u=(a+l)/2))?a=u:l=u,n=r,!(r=r[d=+f]))return this;if(!r.length)break;n[d+1&1]&&(o=n,p=d)}for(;r.data!==e;)if(i=r,!(r=r.next))return this;return(s=r.next)&&delete r.next,i?(s?i.next=s:delete i.next,this):n?(s?n[d]=s:delete n[d],(r=n[0]||n[1])&&r===(n[1]||n[0])&&!r.length&&(o?o[p]=r:this._root=r),this):(this._root=s,this)}function dH(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function fH(){return this._root}function pH(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function hH(e){var n=[],r,o=this._root,i,s,a;for(o&&n.push(new Vn(o,this._x0,this._x1));r=n.pop();)if(!e(o=r.node,s=r.x0,a=r.x1)&&o.length){var l=(s+a)/2;(i=o[1])&&n.push(new Vn(i,l,a)),(i=o[0])&&n.push(new Vn(i,s,l))}return this}function mH(e){var n=[],r=[],o;for(this._root&&n.push(new Vn(this._root,this._x0,this._x1));o=n.pop();){var i=o.node;if(i.length){var s,a=o.x0,l=o.x1,c=(a+l)/2;(s=i[0])&&n.push(new Vn(s,a,c)),(s=i[1])&&n.push(new Vn(s,c,l))}r.push(o)}for(;o=r.pop();)e(o.node,o.x0,o.x1);return this}function gH(e){return e[0]}function yH(e){return arguments.length?(this._x=e,this):this._x}function XE(e,n){var r=new yg(n??gH,NaN,NaN);return e==null?r:r.addAll(e)}function yg(e,n,r){this._x=e,this._x0=n,this._x1=r,this._root=void 0}function Y0(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var wt=XE.prototype=yg.prototype;wt.copy=function(){var e=new yg(this._x,this._x0,this._x1),n=this._root,r,o;if(!n)return e;if(!n.length)return e._root=Y0(n),e;for(r=[{source:n,target:e._root=new Array(2)}];n=r.pop();)for(var i=0;i<2;++i)(o=n.source[i])&&(o.length?r.push({source:o,target:n.target[i]=new Array(2)}):n.target[i]=Y0(o));return e};wt.add=oH;wt.addAll=iH;wt.cover=sH;wt.data=aH;wt.extent=lH;wt.find=cH;wt.remove=uH;wt.removeAll=dH;wt.root=fH;wt.size=pH;wt.visit=hH;wt.visitAfter=mH;wt.x=yH;function vH(e){const n=+this._x.call(null,e),r=+this._y.call(null,e);return KE(this.cover(n,r),n,r,e)}function KE(e,n,r,o){if(isNaN(n)||isNaN(r))return e;var i,s=e._root,a={data:o},l=e._x0,c=e._y0,u=e._x1,f=e._y1,d,p,m,y,b,_,v,x;if(!s)return e._root=a,e;for(;s.length;)if((b=n>=(d=(l+u)/2))?l=d:u=d,(_=r>=(p=(c+f)/2))?c=p:f=p,i=s,!(s=s[v=_<<1|b]))return i[v]=a,e;if(m=+e._x.call(null,s.data),y=+e._y.call(null,s.data),n===m&&r===y)return a.next=s,i?i[v]=a:e._root=a,e;do i=i?i[v]=new Array(4):e._root=new Array(4),(b=n>=(d=(l+u)/2))?l=d:u=d,(_=r>=(p=(c+f)/2))?c=p:f=p;while((v=_<<1|b)===(x=(y>=p)<<1|m>=d));return i[x]=s,i[v]=a,e}function xH(e){var n,r,o=e.length,i,s,a=new Array(o),l=new Array(o),c=1/0,u=1/0,f=-1/0,d=-1/0;for(r=0;r<o;++r)isNaN(i=+this._x.call(null,n=e[r]))||isNaN(s=+this._y.call(null,n))||(a[r]=i,l[r]=s,i<c&&(c=i),i>f&&(f=i),s<u&&(u=s),s>d&&(d=s));if(c>f||u>d)return this;for(this.cover(c,u).cover(f,d),r=0;r<o;++r)KE(this,a[r],l[r],e[r]);return this}function wH(e,n){if(isNaN(e=+e)||isNaN(n=+n))return this;var r=this._x0,o=this._y0,i=this._x1,s=this._y1;if(isNaN(r))i=(r=Math.floor(e))+1,s=(o=Math.floor(n))+1;else{for(var a=i-r||1,l=this._root,c,u;r>e||e>=i||o>n||n>=s;)switch(u=(n<o)<<1|e<r,c=new Array(4),c[u]=l,l=c,a*=2,u){case 0:i=r+a,s=o+a;break;case 1:r=i-a,s=o+a;break;case 2:i=r+a,o=s-a;break;case 3:r=i-a,o=s-a;break}this._root&&this._root.length&&(this._root=l)}return this._x0=r,this._y0=o,this._x1=i,this._y1=s,this}function bH(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function _H(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 ot(e,n,r,o,i){this.node=e,this.x0=n,this.y0=r,this.x1=o,this.y1=i}function SH(e,n,r){var o,i=this._x0,s=this._y0,a,l,c,u,f=this._x1,d=this._y1,p=[],m=this._root,y,b;for(m&&p.push(new ot(m,i,s,f,d)),r==null?r=1/0:(i=e-r,s=n-r,f=e+r,d=n+r,r*=r);y=p.pop();)if(!(!(m=y.node)||(a=y.x0)>f||(l=y.y0)>d||(c=y.x1)<i||(u=y.y1)<s))if(m.length){var _=(a+c)/2,v=(l+u)/2;p.push(new ot(m[3],_,v,c,u),new ot(m[2],a,v,_,u),new ot(m[1],_,l,c,v),new ot(m[0],a,l,_,v)),(b=(n>=v)<<1|e>=_)&&(y=p[p.length-1],p[p.length-1]=p[p.length-1-b],p[p.length-1-b]=y)}else{var x=e-+this._x.call(null,m.data),w=n-+this._y.call(null,m.data),S=x*x+w*w;if(S<r){var C=Math.sqrt(r=S);i=e-C,s=n-C,f=e+C,d=n+C,o=m.data}}return o}function CH(e){if(isNaN(f=+this._x.call(null,e))||isNaN(d=+this._y.call(null,e)))return this;var n,r=this._root,o,i,s,a=this._x0,l=this._y0,c=this._x1,u=this._y1,f,d,p,m,y,b,_,v;if(!r)return this;if(r.length)for(;;){if((y=f>=(p=(a+c)/2))?a=p:c=p,(b=d>=(m=(l+u)/2))?l=m:u=m,n=r,!(r=r[_=b<<1|y]))return this;if(!r.length)break;(n[_+1&3]||n[_+2&3]||n[_+3&3])&&(o=n,v=_)}for(;r.data!==e;)if(i=r,!(r=r.next))return this;return(s=r.next)&&delete r.next,i?(s?i.next=s:delete i.next,this):n?(s?n[_]=s:delete n[_],(r=n[0]||n[1]||n[2]||n[3])&&r===(n[3]||n[2]||n[1]||n[0])&&!r.length&&(o?o[v]=r:this._root=r),this):(this._root=s,this)}function EH(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function kH(){return this._root}function NH(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function PH(e){var n=[],r,o=this._root,i,s,a,l,c;for(o&&n.push(new ot(o,this._x0,this._y0,this._x1,this._y1));r=n.pop();)if(!e(o=r.node,s=r.x0,a=r.y0,l=r.x1,c=r.y1)&&o.length){var u=(s+l)/2,f=(a+c)/2;(i=o[3])&&n.push(new ot(i,u,f,l,c)),(i=o[2])&&n.push(new ot(i,s,f,u,c)),(i=o[1])&&n.push(new ot(i,u,a,l,f)),(i=o[0])&&n.push(new ot(i,s,a,u,f))}return this}function MH(e){var n=[],r=[],o;for(this._root&&n.push(new ot(this._root,this._x0,this._y0,this._x1,this._y1));o=n.pop();){var i=o.node;if(i.length){var s,a=o.x0,l=o.y0,c=o.x1,u=o.y1,f=(a+c)/2,d=(l+u)/2;(s=i[0])&&n.push(new ot(s,a,l,f,d)),(s=i[1])&&n.push(new ot(s,f,l,c,d)),(s=i[2])&&n.push(new ot(s,a,d,f,u)),(s=i[3])&&n.push(new ot(s,f,d,c,u))}r.push(o)}for(;o=r.pop();)e(o.node,o.x0,o.y0,o.x1,o.y1);return this}function RH(e){return e[0]}function jH(e){return arguments.length?(this._x=e,this):this._x}function AH(e){return e[1]}function TH(e){return arguments.length?(this._y=e,this):this._y}function qE(e,n,r){var o=new vg(n??RH,r??AH,NaN,NaN,NaN,NaN);return e==null?o:o.addAll(e)}function vg(e,n,r,o,i,s){this._x=e,this._y=n,this._x0=r,this._y0=o,this._x1=i,this._y1=s,this._root=void 0}function X0(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var ct=qE.prototype=vg.prototype;ct.copy=function(){var e=new vg(this._x,this._y,this._x0,this._y0,this._x1,this._y1),n=this._root,r,o;if(!n)return e;if(!n.length)return e._root=X0(n),e;for(r=[{source:n,target:e._root=new Array(4)}];n=r.pop();)for(var i=0;i<4;++i)(o=n.source[i])&&(o.length?r.push({source:o,target:n.target[i]=new Array(4)}):n.target[i]=X0(o));return e};ct.add=vH;ct.addAll=xH;ct.cover=wH;ct.data=bH;ct.extent=_H;ct.find=SH;ct.remove=CH;ct.removeAll=EH;ct.root=kH;ct.size=NH;ct.visit=PH;ct.visitAfter=MH;ct.x=jH;ct.y=TH;function IH(e){const n=+this._x.call(null,e),r=+this._y.call(null,e),o=+this._z.call(null,e);return ZE(this.cover(n,r,o),n,r,o,e)}function ZE(e,n,r,o,i){if(isNaN(n)||isNaN(r)||isNaN(o))return e;var s,a=e._root,l={data:i},c=e._x0,u=e._y0,f=e._z0,d=e._x1,p=e._y1,m=e._z1,y,b,_,v,x,w,S,C,E,k,N;if(!a)return e._root=l,e;for(;a.length;)if((S=n>=(y=(c+d)/2))?c=y:d=y,(C=r>=(b=(u+p)/2))?u=b:p=b,(E=o>=(_=(f+m)/2))?f=_:m=_,s=a,!(a=a[k=E<<2|C<<1|S]))return s[k]=l,e;if(v=+e._x.call(null,a.data),x=+e._y.call(null,a.data),w=+e._z.call(null,a.data),n===v&&r===x&&o===w)return l.next=a,s?s[k]=l:e._root=l,e;do s=s?s[k]=new Array(8):e._root=new Array(8),(S=n>=(y=(c+d)/2))?c=y:d=y,(C=r>=(b=(u+p)/2))?u=b:p=b,(E=o>=(_=(f+m)/2))?f=_:m=_;while((k=E<<2|C<<1|S)===(N=(w>=_)<<2|(x>=b)<<1|v>=y));return s[N]=a,s[k]=l,e}function $H(e){Array.isArray(e)||(e=Array.from(e));const n=e.length,r=new Float64Array(n),o=new Float64Array(n),i=new Float64Array(n);let s=1/0,a=1/0,l=1/0,c=-1/0,u=-1/0,f=-1/0;for(let d=0,p,m,y,b;d<n;++d)isNaN(m=+this._x.call(null,p=e[d]))||isNaN(y=+this._y.call(null,p))||isNaN(b=+this._z.call(null,p))||(r[d]=m,o[d]=y,i[d]=b,m<s&&(s=m),m>c&&(c=m),y<a&&(a=y),y>u&&(u=y),b<l&&(l=b),b>f&&(f=b));if(s>c||a>u||l>f)return this;this.cover(s,a,l).cover(c,u,f);for(let d=0;d<n;++d)ZE(this,r[d],o[d],i[d],e[d]);return this}function OH(e,n,r){if(isNaN(e=+e)||isNaN(n=+n)||isNaN(r=+r))return this;var o=this._x0,i=this._y0,s=this._z0,a=this._x1,l=this._y1,c=this._z1;if(isNaN(o))a=(o=Math.floor(e))+1,l=(i=Math.floor(n))+1,c=(s=Math.floor(r))+1;else{for(var u=a-o||1,f=this._root,d,p;o>e||e>=a||i>n||n>=l||s>r||r>=c;)switch(p=(r<s)<<2|(n<i)<<1|e<o,d=new Array(8),d[p]=f,f=d,u*=2,p){case 0:a=o+u,l=i+u,c=s+u;break;case 1:o=a-u,l=i+u,c=s+u;break;case 2:a=o+u,i=l-u,c=s+u;break;case 3:o=a-u,i=l-u,c=s+u;break;case 4:a=o+u,l=i+u,s=c-u;break;case 5:o=a-u,l=i+u,s=c-u;break;case 6:a=o+u,i=l-u,s=c-u;break;case 7:o=a-u,i=l-u,s=c-u;break}this._root&&this._root.length&&(this._root=f)}return this._x0=o,this._y0=i,this._z0=s,this._x1=a,this._y1=l,this._z1=c,this}function DH(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function LH(e){return arguments.length?this.cover(+e[0][0],+e[0][1],+e[0][2]).cover(+e[1][0],+e[1][1],+e[1][2]):isNaN(this._x0)?void 0:[[this._x0,this._y0,this._z0],[this._x1,this._y1,this._z1]]}function be(e,n,r,o,i,s,a){this.node=e,this.x0=n,this.y0=r,this.z0=o,this.x1=i,this.y1=s,this.z1=a}function zH(e,n,r,o){var i,s=this._x0,a=this._y0,l=this._z0,c,u,f,d,p,m,y=this._x1,b=this._y1,_=this._z1,v=[],x=this._root,w,S;for(x&&v.push(new be(x,s,a,l,y,b,_)),o==null?o=1/0:(s=e-o,a=n-o,l=r-o,y=e+o,b=n+o,_=r+o,o*=o);w=v.pop();)if(!(!(x=w.node)||(c=w.x0)>y||(u=w.y0)>b||(f=w.z0)>_||(d=w.x1)<s||(p=w.y1)<a||(m=w.z1)<l))if(x.length){var C=(c+d)/2,E=(u+p)/2,k=(f+m)/2;v.push(new be(x[7],C,E,k,d,p,m),new be(x[6],c,E,k,C,p,m),new be(x[5],C,u,k,d,E,m),new be(x[4],c,u,k,C,E,m),new be(x[3],C,E,f,d,p,k),new be(x[2],c,E,f,C,p,k),new be(x[1],C,u,f,d,E,k),new be(x[0],c,u,f,C,E,k)),(S=(r>=k)<<2|(n>=E)<<1|e>=C)&&(w=v[v.length-1],v[v.length-1]=v[v.length-1-S],v[v.length-1-S]=w)}else{var N=e-+this._x.call(null,x.data),M=n-+this._y.call(null,x.data),T=r-+this._z.call(null,x.data),A=N*N+M*M+T*T;if(A<o){var D=Math.sqrt(o=A);s=e-D,a=n-D,l=r-D,y=e+D,b=n+D,_=r+D,i=x.data}}return i}const FH=(e,n,r,o,i,s)=>Math.sqrt((e-o)**2+(n-i)**2+(r-s)**2);function VH(e,n,r,o){const i=[],s=e-o,a=n-o,l=r-o,c=e+o,u=n+o,f=r+o;return this.visit((d,p,m,y,b,_,v)=>{if(!d.length)do{const x=d.data;FH(e,n,r,this._x(x),this._y(x),this._z(x))<=o&&i.push(x)}while(d=d.next);return p>c||m>u||y>f||b<s||_<a||v<l}),i}function BH(e){if(isNaN(p=+this._x.call(null,e))||isNaN(m=+this._y.call(null,e))||isNaN(y=+this._z.call(null,e)))return this;var n,r=this._root,o,i,s,a=this._x0,l=this._y0,c=this._z0,u=this._x1,f=this._y1,d=this._z1,p,m,y,b,_,v,x,w,S,C,E;if(!r)return this;if(r.length)for(;;){if((x=p>=(b=(a+u)/2))?a=b:u=b,(w=m>=(_=(l+f)/2))?l=_:f=_,(S=y>=(v=(c+d)/2))?c=v:d=v,n=r,!(r=r[C=S<<2|w<<1|x]))return this;if(!r.length)break;(n[C+1&7]||n[C+2&7]||n[C+3&7]||n[C+4&7]||n[C+5&7]||n[C+6&7]||n[C+7&7])&&(o=n,E=C)}for(;r.data!==e;)if(i=r,!(r=r.next))return this;return(s=r.next)&&delete r.next,i?(s?i.next=s:delete i.next,this):n?(s?n[C]=s:delete n[C],(r=n[0]||n[1]||n[2]||n[3]||n[4]||n[5]||n[6]||n[7])&&r===(n[7]||n[6]||n[5]||n[4]||n[3]||n[2]||n[1]||n[0])&&!r.length&&(o?o[E]=r:this._root=r),this):(this._root=s,this)}function HH(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function WH(){return this._root}function UH(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function GH(e){var n=[],r,o=this._root,i,s,a,l,c,u,f;for(o&&n.push(new be(o,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));r=n.pop();)if(!e(o=r.node,s=r.x0,a=r.y0,l=r.z0,c=r.x1,u=r.y1,f=r.z1)&&o.length){var d=(s+c)/2,p=(a+u)/2,m=(l+f)/2;(i=o[7])&&n.push(new be(i,d,p,m,c,u,f)),(i=o[6])&&n.push(new be(i,s,p,m,d,u,f)),(i=o[5])&&n.push(new be(i,d,a,m,c,p,f)),(i=o[4])&&n.push(new be(i,s,a,m,d,p,f)),(i=o[3])&&n.push(new be(i,d,p,l,c,u,m)),(i=o[2])&&n.push(new be(i,s,p,l,d,u,m)),(i=o[1])&&n.push(new be(i,d,a,l,c,p,m)),(i=o[0])&&n.push(new be(i,s,a,l,d,p,m))}return this}function YH(e){var n=[],r=[],o;for(this._root&&n.push(new be(this._root,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));o=n.pop();){var i=o.node;if(i.length){var s,a=o.x0,l=o.y0,c=o.z0,u=o.x1,f=o.y1,d=o.z1,p=(a+u)/2,m=(l+f)/2,y=(c+d)/2;(s=i[0])&&n.push(new be(s,a,l,c,p,m,y)),(s=i[1])&&n.push(new be(s,p,l,c,u,m,y)),(s=i[2])&&n.push(new be(s,a,m,c,p,f,y)),(s=i[3])&&n.push(new be(s,p,m,c,u,f,y)),(s=i[4])&&n.push(new be(s,a,l,y,p,m,d)),(s=i[5])&&n.push(new be(s,p,l,y,u,m,d)),(s=i[6])&&n.push(new be(s,a,m,y,p,f,d)),(s=i[7])&&n.push(new be(s,p,m,y,u,f,d))}r.push(o)}for(;o=r.pop();)e(o.node,o.x0,o.y0,o.z0,o.x1,o.y1,o.z1);return this}function XH(e){return e[0]}function KH(e){return arguments.length?(this._x=e,this):this._x}function qH(e){return e[1]}function ZH(e){return arguments.length?(this._y=e,this):this._y}function QH(e){return e[2]}function JH(e){return arguments.length?(this._z=e,this):this._z}function QE(e,n,r,o){var i=new xg(n??XH,r??qH,o??QH,NaN,NaN,NaN,NaN,NaN,NaN);return e==null?i:i.addAll(e)}function xg(e,n,r,o,i,s,a,l,c){this._x=e,this._y=n,this._z=r,this._x0=o,this._y0=i,this._z0=s,this._x1=a,this._y1=l,this._z1=c,this._root=void 0}function K0(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var Ke=QE.prototype=xg.prototype;Ke.copy=function(){var e=new xg(this._x,this._y,this._z,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1),n=this._root,r,o;if(!n)return e;if(!n.length)return e._root=K0(n),e;for(r=[{source:n,target:e._root=new Array(8)}];n=r.pop();)for(var i=0;i<8;++i)(o=n.source[i])&&(o.length?r.push({source:o,target:n.target[i]=new Array(8)}):n.target[i]=K0(o));return e};Ke.add=IH;Ke.addAll=$H;Ke.cover=OH;Ke.data=DH;Ke.extent=LH;Ke.find=zH;Ke.findAllWithinRadius=VH;Ke.remove=BH;Ke.removeAll=HH;Ke.root=WH;Ke.size=UH;Ke.visit=GH;Ke.visitAfter=YH;Ke.x=KH;Ke.y=ZH;Ke.z=JH;function zn(e){return function(){return e}}function $n(e){return(e()-.5)*1e-6}function eW(e){return e.index}function q0(e,n){var r=e.get(n);if(!r)throw new Error("node not found: "+n);return r}function tW(e){var n=eW,r=p,o,i=zn(30),s,a,l,c,u,f,d=1;e==null&&(e=[]);function p(v){return 1/Math.min(c[v.source.index],c[v.target.index])}function m(v){for(var x=0,w=e.length;x<d;++x)for(var S=0,C,E,k,N=0,M=0,T=0,A,D;S<w;++S)C=e[S],E=C.source,k=C.target,N=k.x+k.vx-E.x-E.vx||$n(f),l>1&&(M=k.y+k.vy-E.y-E.vy||$n(f)),l>2&&(T=k.z+k.vz-E.z-E.vz||$n(f)),A=Math.sqrt(N*N+M*M+T*T),A=(A-s[S])/A*v*o[S],N*=A,M*=A,T*=A,k.vx-=N*(D=u[S]),l>1&&(k.vy-=M*D),l>2&&(k.vz-=T*D),E.vx+=N*(D=1-D),l>1&&(E.vy+=M*D),l>2&&(E.vz+=T*D)}function y(){if(a){var v,x=a.length,w=e.length,S=new Map(a.map((E,k)=>[n(E,k,a),E])),C;for(v=0,c=new Array(x);v<w;++v)C=e[v],C.index=v,typeof C.source!="object"&&(C.source=q0(S,C.source)),typeof C.target!="object"&&(C.target=q0(S,C.target)),c[C.source.index]=(c[C.source.index]||0)+1,c[C.target.index]=(c[C.target.index]||0)+1;for(v=0,u=new Array(w);v<w;++v)C=e[v],u[v]=c[C.source.index]/(c[C.source.index]+c[C.target.index]);o=new Array(w),b(),s=new Array(w),_()}}function b(){if(a)for(var v=0,x=e.length;v<x;++v)o[v]=+r(e[v],v,e)}function _(){if(a)for(var v=0,x=e.length;v<x;++v)s[v]=+i(e[v],v,e)}return m.initialize=function(v,...x){a=v,f=x.find(w=>typeof w=="function")||Math.random,l=x.find(w=>[1,2,3].includes(w))||2,y()},m.links=function(v){return arguments.length?(e=v,y(),m):e},m.id=function(v){return arguments.length?(n=v,m):n},m.iterations=function(v){return arguments.length?(d=+v,m):d},m.strength=function(v){return arguments.length?(r=typeof v=="function"?v:zn(+v),b(),m):r},m.distance=function(v){return arguments.length?(i=typeof v=="function"?v:zn(+v),_(),m):i},m}const nW=1664525,rW=1013904223,Z0=4294967296;function oW(){let e=1;return()=>(e=(nW*e+rW)%Z0)/Z0}var Q0=3;function mf(e){return e.x}function J0(e){return e.y}function iW(e){return e.z}var sW=10,aW=Math.PI*(3-Math.sqrt(5)),lW=Math.PI*20/(9+Math.sqrt(221));function cW(e,n){n=n||2;var r=Math.min(Q0,Math.max(1,Math.round(n))),o,i=1,s=.001,a=1-Math.pow(s,1/300),l=0,c=.6,u=new Map,f=lg(m),d=Ia("tick","end"),p=oW();e==null&&(e=[]);function m(){y(),d.call("tick",o),i<s&&(f.stop(),d.call("end",o))}function y(v){var x,w=e.length,S;v===void 0&&(v=1);for(var C=0;C<v;++C)for(i+=(l-i)*a,u.forEach(function(E){E(i)}),x=0;x<w;++x)S=e[x],S.fx==null?S.x+=S.vx*=c:(S.x=S.fx,S.vx=0),r>1&&(S.fy==null?S.y+=S.vy*=c:(S.y=S.fy,S.vy=0)),r>2&&(S.fz==null?S.z+=S.vz*=c:(S.z=S.fz,S.vz=0));return o}function b(){for(var v=0,x=e.length,w;v<x;++v){if(w=e[v],w.index=v,w.fx!=null&&(w.x=w.fx),w.fy!=null&&(w.y=w.fy),w.fz!=null&&(w.z=w.fz),isNaN(w.x)||r>1&&isNaN(w.y)||r>2&&isNaN(w.z)){var S=sW*(r>2?Math.cbrt(.5+v):r>1?Math.sqrt(.5+v):v),C=v*aW,E=v*lW;r===1?w.x=S:r===2?(w.x=S*Math.cos(C),w.y=S*Math.sin(C)):(w.x=S*Math.sin(C)*Math.cos(E),w.y=S*Math.cos(C),w.z=S*Math.sin(C)*Math.sin(E))}(isNaN(w.vx)||r>1&&isNaN(w.vy)||r>2&&isNaN(w.vz))&&(w.vx=0,r>1&&(w.vy=0),r>2&&(w.vz=0))}}function _(v){return v.initialize&&v.initialize(e,p,r),v}return b(),o={tick:y,restart:function(){return f.restart(m),o},stop:function(){return f.stop(),o},numDimensions:function(v){return arguments.length?(r=Math.min(Q0,Math.max(1,Math.round(v))),u.forEach(_),o):r},nodes:function(v){return arguments.length?(e=v,b(),u.forEach(_),o):e},alpha:function(v){return arguments.length?(i=+v,o):i},alphaMin:function(v){return arguments.length?(s=+v,o):s},alphaDecay:function(v){return arguments.length?(a=+v,o):+a},alphaTarget:function(v){return arguments.length?(l=+v,o):l},velocityDecay:function(v){return arguments.length?(c=1-v,o):1-c},randomSource:function(v){return arguments.length?(p=v,u.forEach(_),o):p},force:function(v,x){return arguments.length>1?(x==null?u.delete(v):u.set(v,_(x)),o):u.get(v)},find:function(){var v=Array.prototype.slice.call(arguments),x=v.shift()||0,w=(r>1?v.shift():null)||0,S=(r>2?v.shift():null)||0,C=v.shift()||1/0,E=0,k=e.length,N,M,T,A,D,V;for(C*=C,E=0;E<k;++E)D=e[E],N=x-D.x,M=w-(D.y||0),T=S-(D.z||0),A=N*N+M*M+T*T,A<C&&(V=D,C=A);return V},on:function(v,x){return arguments.length>1?(d.on(v,x),o):d.on(v)}}}function uW(){var e,n,r,o,i,s=zn(-30),a,l=1,c=1/0,u=.81;function f(y){var b,_=e.length,v=(n===1?XE(e,mf):n===2?qE(e,mf,J0):n===3?QE(e,mf,J0,iW):null).visitAfter(p);for(i=y,b=0;b<_;++b)r=e[b],v.visit(m)}function d(){if(e){var y,b=e.length,_;for(a=new Array(b),y=0;y<b;++y)_=e[y],a[_.index]=+s(_,y,e)}}function p(y){var b=0,_,v,x=0,w,S,C,E,k=y.length;if(k){for(w=S=C=E=0;E<k;++E)(_=y[E])&&(v=Math.abs(_.value))&&(b+=_.value,x+=v,w+=v*(_.x||0),S+=v*(_.y||0),C+=v*(_.z||0));b*=Math.sqrt(4/k),y.x=w/x,n>1&&(y.y=S/x),n>2&&(y.z=C/x)}else{_=y,_.x=_.data.x,n>1&&(_.y=_.data.y),n>2&&(_.z=_.data.z);do b+=a[_.data.index];while(_=_.next)}y.value=b}function m(y,b,_,v,x){if(!y.value)return!0;var w=[_,v,x][n-1],S=y.x-r.x,C=n>1?y.y-r.y:0,E=n>2?y.z-r.z:0,k=w-b,N=S*S+C*C+E*E;if(k*k/u<N)return N<c&&(S===0&&(S=$n(o),N+=S*S),n>1&&C===0&&(C=$n(o),N+=C*C),n>2&&E===0&&(E=$n(o),N+=E*E),N<l&&(N=Math.sqrt(l*N)),r.vx+=S*y.value*i/N,n>1&&(r.vy+=C*y.value*i/N),n>2&&(r.vz+=E*y.value*i/N)),!0;if(y.length||N>=c)return;(y.data!==r||y.next)&&(S===0&&(S=$n(o),N+=S*S),n>1&&C===0&&(C=$n(o),N+=C*C),n>2&&E===0&&(E=$n(o),N+=E*E),N<l&&(N=Math.sqrt(l*N)));do y.data!==r&&(k=a[y.data.index]*i/N,r.vx+=S*k,n>1&&(r.vy+=C*k),n>2&&(r.vz+=E*k));while(y=y.next)}return f.initialize=function(y,...b){e=y,o=b.find(_=>typeof _=="function")||Math.random,n=b.find(_=>[1,2,3].includes(_))||2,d()},f.strength=function(y){return arguments.length?(s=typeof y=="function"?y:zn(+y),d(),f):s},f.distanceMin=function(y){return arguments.length?(l=y*y,f):Math.sqrt(l)},f.distanceMax=function(y){return arguments.length?(c=y*y,f):Math.sqrt(c)},f.theta=function(y){return arguments.length?(u=y*y,f):Math.sqrt(u)},f}function dW(e,n,r,o){var i,s,a=zn(.1),l,c;typeof e!="function"&&(e=zn(+e)),n==null&&(n=0),r==null&&(r=0),o==null&&(o=0);function u(d){for(var p=0,m=i.length;p<m;++p){var y=i[p],b=y.x-n||1e-6,_=(y.y||0)-r||1e-6,v=(y.z||0)-o||1e-6,x=Math.sqrt(b*b+_*_+v*v),w=(c[p]-x)*l[p]*d/x;y.vx+=b*w,s>1&&(y.vy+=_*w),s>2&&(y.vz+=v*w)}}function f(){if(i){var d,p=i.length;for(l=new Array(p),c=new Array(p),d=0;d<p;++d)c[d]=+e(i[d],d,i),l[d]=isNaN(c[d])?0:+a(i[d],d,i)}}return u.initialize=function(d,...p){i=d,s=p.find(m=>[1,2,3].includes(m))||2,f()},u.strength=function(d){return arguments.length?(a=typeof d=="function"?d:zn(+d),f(),u):a},u.radius=function(d){return arguments.length?(e=typeof d=="function"?d:zn(+d),f(),u):e},u.x=function(d){return arguments.length?(n=+d,u):n},u.y=function(d){return arguments.length?(r=+d,u):r},u.z=function(d){return arguments.length?(o=+d,u):o},u}const{abs:rs,cos:An,sin:jo,acos:fW,atan2:os,sqrt:rr,pow:It}=Math;function is(e){return e<0?-It(-e,1/3):It(e,1/3)}const JE=Math.PI,wl=2*JE,or=JE/2,pW=1e-6,gf=Number.MAX_SAFE_INTEGER||9007199254740991,yf=Number.MIN_SAFE_INTEGER||-9007199254740991,hW={x:0,y:0,z:0},J={Tvalues:[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213],Cvalues:[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872],arcfn:function(e,n){const r=n(e);let o=r.x*r.x+r.y*r.y;return typeof r.z<"u"&&(o+=r.z*r.z),rr(o)},compute:function(e,n,r){if(e===0)return n[0].t=0,n[0];const o=n.length-1;if(e===1)return n[o].t=1,n[o];const i=1-e;let s=n;if(o===0)return n[0].t=e,n[0];if(o===1){const l={x:i*s[0].x+e*s[1].x,y:i*s[0].y+e*s[1].y,t:e};return r&&(l.z=i*s[0].z+e*s[1].z),l}if(o<4){let l=i*i,c=e*e,u,f,d,p=0;o===2?(s=[s[0],s[1],s[2],hW],u=l,f=i*e*2,d=c):o===3&&(u=l*i,f=l*e*3,d=i*c*3,p=e*c);const m={x:u*s[0].x+f*s[1].x+d*s[2].x+p*s[3].x,y:u*s[0].y+f*s[1].y+d*s[2].y+p*s[3].y,t:e};return r&&(m.z=u*s[0].z+f*s[1].z+d*s[2].z+p*s[3].z),m}const a=JSON.parse(JSON.stringify(n));for(;a.length>1;){for(let l=0;l<a.length-1;l++)a[l]={x:a[l].x+(a[l+1].x-a[l].x)*e,y:a[l].y+(a[l+1].y-a[l].y)*e},typeof a[l].z<"u"&&(a[l].z=a[l].z+(a[l+1].z-a[l].z)*e);a.splice(a.length-1,1)}return a[0].t=e,a[0]},computeWithRatios:function(e,n,r,o){const i=1-e,s=r,a=n;let l=s[0],c=s[1],u=s[2],f=s[3],d;if(l*=i,c*=e,a.length===2)return d=l+c,{x:(l*a[0].x+c*a[1].x)/d,y:(l*a[0].y+c*a[1].y)/d,z:o?(l*a[0].z+c*a[1].z)/d:!1,t:e};if(l*=i,c*=2*i,u*=e*e,a.length===3)return d=l+c+u,{x:(l*a[0].x+c*a[1].x+u*a[2].x)/d,y:(l*a[0].y+c*a[1].y+u*a[2].y)/d,z:o?(l*a[0].z+c*a[1].z+u*a[2].z)/d:!1,t:e};if(l*=i,c*=1.5*i,u*=3*i,f*=e*e*e,a.length===4)return d=l+c+u+f,{x:(l*a[0].x+c*a[1].x+u*a[2].x+f*a[3].x)/d,y:(l*a[0].y+c*a[1].y+u*a[2].y+f*a[3].y)/d,z:o?(l*a[0].z+c*a[1].z+u*a[2].z+f*a[3].z)/d:!1,t:e}},derive:function(e,n){const r=[];for(let o=e,i=o.length,s=i-1;i>1;i--,s--){const a=[];for(let l=0,c;l<s;l++)c={x:s*(o[l+1].x-o[l].x),y:s*(o[l+1].y-o[l].y)},n&&(c.z=s*(o[l+1].z-o[l].z)),a.push(c);r.push(a),o=a}return r},between:function(e,n,r){return n<=e&&e<=r||J.approximately(e,n)||J.approximately(e,r)},approximately:function(e,n,r){return rs(e-n)<=(r||pW)},length:function(e){const r=J.Tvalues.length;let o=0;for(let i=0,s;i<r;i++)s=.5*J.Tvalues[i]+.5,o+=J.Cvalues[i]*J.arcfn(s,e);return .5*o},map:function(e,n,r,o,i){const s=r-n,a=i-o,l=e-n,c=l/s;return o+a*c},lerp:function(e,n,r){const o={x:n.x+e*(r.x-n.x),y:n.y+e*(r.y-n.y)};return n.z!==void 0&&r.z!==void 0&&(o.z=n.z+e*(r.z-n.z)),o},pointToString:function(e){let n=e.x+"/"+e.y;return typeof e.z<"u"&&(n+="/"+e.z),n},pointsToString:function(e){return"["+e.map(J.pointToString).join(", ")+"]"},copy:function(e){return JSON.parse(JSON.stringify(e))},angle:function(e,n,r){const o=n.x-e.x,i=n.y-e.y,s=r.x-e.x,a=r.y-e.y,l=o*a-i*s,c=o*s+i*a;return os(l,c)},round:function(e,n){const r=""+e,o=r.indexOf(".");return parseFloat(r.substring(0,o+1+n))},dist:function(e,n){const r=e.x-n.x,o=e.y-n.y;return rr(r*r+o*o)},closest:function(e,n){let r=It(2,63),o,i;return e.forEach(function(s,a){i=J.dist(n,s),i<r&&(r=i,o=a)}),{mdist:r,mpos:o}},abcratio:function(e,n){if(n!==2&&n!==3)return!1;if(typeof e>"u")e=.5;else if(e===0||e===1)return e;const r=It(e,n)+It(1-e,n),o=r-1;return rs(o/r)},projectionratio:function(e,n){if(n!==2&&n!==3)return!1;if(typeof e>"u")e=.5;else if(e===0||e===1)return e;const r=It(1-e,n),o=It(e,n)+r;return r/o},lli8:function(e,n,r,o,i,s,a,l){const c=(e*o-n*r)*(i-a)-(e-r)*(i*l-s*a),u=(e*o-n*r)*(s-l)-(n-o)*(i*l-s*a),f=(e-r)*(s-l)-(n-o)*(i-a);return f==0?!1:{x:c/f,y:u/f}},lli4:function(e,n,r,o){const i=e.x,s=e.y,a=n.x,l=n.y,c=r.x,u=r.y,f=o.x,d=o.y;return J.lli8(i,s,a,l,c,u,f,d)},lli:function(e,n){return J.lli4(e,e.c,n,n.c)},makeline:function(e,n){return new Ee(e.x,e.y,(e.x+n.x)/2,(e.y+n.y)/2,n.x,n.y)},findbbox:function(e){let n=gf,r=gf,o=yf,i=yf;return e.forEach(function(s){const a=s.bbox();n>a.x.min&&(n=a.x.min),r>a.y.min&&(r=a.y.min),o<a.x.max&&(o=a.x.max),i<a.y.max&&(i=a.y.max)}),{x:{min:n,mid:(n+o)/2,max:o,size:o-n},y:{min:r,mid:(r+i)/2,max:i,size:i-r}}},shapeintersections:function(e,n,r,o,i){if(!J.bboxoverlap(n,o))return[];const s=[],a=[e.startcap,e.forward,e.back,e.endcap],l=[r.startcap,r.forward,r.back,r.endcap];return a.forEach(function(c){c.virtual||l.forEach(function(u){if(u.virtual)return;const f=c.intersects(u,i);f.length>0&&(f.c1=c,f.c2=u,f.s1=e,f.s2=r,s.push(f))})}),s},makeshape:function(e,n,r){const o=n.points.length,i=e.points.length,s=J.makeline(n.points[o-1],e.points[0]),a=J.makeline(e.points[i-1],n.points[0]),l={startcap:s,forward:e,back:n,endcap:a,bbox:J.findbbox([s,e,n,a])};return l.intersections=function(c){return J.shapeintersections(l,l.bbox,c,c.bbox,r)},l},getminmax:function(e,n,r){if(!r)return{min:0,max:0};let o=gf,i=yf,s,a;r.indexOf(0)===-1&&(r=[0].concat(r)),r.indexOf(1)===-1&&r.push(1);for(let l=0,c=r.length;l<c;l++)s=r[l],a=e.get(s),a[n]<o&&(o=a[n]),a[n]>i&&(i=a[n]);return{min:o,mid:(o+i)/2,max:i,size:i-o}},align:function(e,n){const r=n.p1.x,o=n.p1.y,i=-os(n.p2.y-o,n.p2.x-r),s=function(a){return{x:(a.x-r)*An(i)-(a.y-o)*jo(i),y:(a.x-r)*jo(i)+(a.y-o)*An(i)}};return e.map(s)},roots:function(e,n){n=n||{p1:{x:0,y:0},p2:{x:1,y:0}};const r=e.length-1,o=J.align(e,n),i=function(k){return 0<=k&&k<=1};if(r===2){const k=o[0].y,N=o[1].y,M=o[2].y,T=k-2*N+M;if(T!==0){const A=-rr(N*N-k*M),D=-k+N,V=-(A+D)/T,P=-(-A+D)/T;return[V,P].filter(i)}else if(N!==M&&T===0)return[(2*N-M)/(2*N-2*M)].filter(i);return[]}const s=o[0].y,a=o[1].y,l=o[2].y,c=o[3].y;let u=-s+3*a-3*l+c,f=3*s-6*a+3*l,d=-3*s+3*a,p=s;if(J.approximately(u,0)){if(J.approximately(f,0))return J.approximately(d,0)?[]:[-p/d].filter(i);const k=rr(d*d-4*f*p),N=2*f;return[(k-d)/N,(-d-k)/N].filter(i)}f/=u,d/=u,p/=u;const m=(3*d-f*f)/3,y=m/3,b=(2*f*f*f-9*f*d+27*p)/27,_=b/2,v=_*_+y*y*y;let x,w,S,C,E;if(v<0){const k=-m/3,N=k*k*k,M=rr(N),T=-b/(2*M),A=T<-1?-1:T>1?1:T,D=fW(A),V=is(M),P=2*V;return S=P*An(D/3)-f/3,C=P*An((D+wl)/3)-f/3,E=P*An((D+2*wl)/3)-f/3,[S,C,E].filter(i)}else{if(v===0)return x=_<0?is(-_):-is(_),S=2*x-f/3,C=-x-f/3,[S,C].filter(i);{const k=rr(v);return x=is(-_+k),w=is(_+k),[x-w-f/3].filter(i)}}},droots:function(e){if(e.length===3){const n=e[0],r=e[1],o=e[2],i=n-2*r+o;if(i!==0){const s=-rr(r*r-n*o),a=-n+r,l=-(s+a)/i,c=-(-s+a)/i;return[l,c]}else if(r!==o&&i===0)return[(2*r-o)/(2*(r-o))];return[]}if(e.length===2){const n=e[0],r=e[1];return n!==r?[n/(n-r)]:[]}return[]},curvature:function(e,n,r,o,i){let s,a,l,c,u=0,f=0;const d=J.compute(e,n),p=J.compute(e,r),m=d.x*d.x+d.y*d.y;if(o?(s=rr(It(d.y*p.z-p.y*d.z,2)+It(d.z*p.x-p.z*d.x,2)+It(d.x*p.y-p.x*d.y,2)),a=It(m+d.z*d.z,3/2)):(s=d.x*p.y-d.y*p.x,a=It(m,3/2)),s===0||a===0)return{k:0,r:0};if(u=s/a,f=a/s,!i){const y=J.curvature(e-.001,n,r,o,!0).k,b=J.curvature(e+.001,n,r,o,!0).k;c=(b-u+(u-y))/2,l=(rs(b-u)+rs(u-y))/2}return{k:u,r:f,dk:c,adk:l}},inflections:function(e){if(e.length<4)return[];const n=J.align(e,{p1:e[0],p2:e.slice(-1)[0]}),r=n[2].x*n[1].y,o=n[3].x*n[1].y,i=n[1].x*n[2].y,s=n[3].x*n[2].y,a=18*(-3*r+2*o+3*i-s),l=18*(3*r-o-3*i),c=18*(i-r);if(J.approximately(a,0)){if(!J.approximately(l,0)){let p=-c/l;if(0<=p&&p<=1)return[p]}return[]}const u=2*a;if(J.approximately(u,0))return[];const f=l*l-4*a*c;if(f<0)return[];const d=Math.sqrt(f);return[(d-l)/u,-(l+d)/u].filter(function(p){return 0<=p&&p<=1})},bboxoverlap:function(e,n){const r=["x","y"],o=r.length;for(let i=0,s,a,l,c;i<o;i++)if(s=r[i],a=e[s].mid,l=n[s].mid,c=(e[s].size+n[s].size)/2,rs(a-l)>=c)return!1;return!0},expandbox:function(e,n){n.x.min<e.x.min&&(e.x.min=n.x.min),n.y.min<e.y.min&&(e.y.min=n.y.min),n.z&&n.z.min<e.z.min&&(e.z.min=n.z.min),n.x.max>e.x.max&&(e.x.max=n.x.max),n.y.max>e.y.max&&(e.y.max=n.y.max),n.z&&n.z.max>e.z.max&&(e.z.max=n.z.max),e.x.mid=(e.x.min+e.x.max)/2,e.y.mid=(e.y.min+e.y.max)/2,e.z&&(e.z.mid=(e.z.min+e.z.max)/2),e.x.size=e.x.max-e.x.min,e.y.size=e.y.max-e.y.min,e.z&&(e.z.size=e.z.max-e.z.min)},pairiteration:function(e,n,r){const o=e.bbox(),i=n.bbox(),s=1e5,a=r||.5;if(o.x.size+o.y.size<a&&i.x.size+i.y.size<a)return[(s*(e._t1+e._t2)/2|0)/s+"/"+(s*(n._t1+n._t2)/2|0)/s];let l=e.split(.5),c=n.split(.5),u=[{left:l.left,right:c.left},{left:l.left,right:c.right},{left:l.right,right:c.right},{left:l.right,right:c.left}];u=u.filter(function(d){return J.bboxoverlap(d.left.bbox(),d.right.bbox())});let f=[];return u.length===0||(u.forEach(function(d){f=f.concat(J.pairiteration(d.left,d.right,a))}),f=f.filter(function(d,p){return f.indexOf(d)===p})),f},getccenter:function(e,n,r){const o=n.x-e.x,i=n.y-e.y,s=r.x-n.x,a=r.y-n.y,l=o*An(or)-i*jo(or),c=o*jo(or)+i*An(or),u=s*An(or)-a*jo(or),f=s*jo(or)+a*An(or),d=(e.x+n.x)/2,p=(e.y+n.y)/2,m=(n.x+r.x)/2,y=(n.y+r.y)/2,b=d+l,_=p+c,v=m+u,x=y+f,w=J.lli8(d,p,b,_,m,y,v,x),S=J.dist(w,e);let C=os(e.y-w.y,e.x-w.x),E=os(n.y-w.y,n.x-w.x),k=os(r.y-w.y,r.x-w.x),N;return C<k?((C>E||E>k)&&(C+=wl),C>k&&(N=k,k=C,C=N)):k<E&&E<C?(N=k,k=C,C=N):k+=wl,w.s=C,w.e=k,w.r=S,w},numberSort:function(e,n){return e-n}};class js{constructor(n){this.curves=[],this._3d=!1,n&&(this.curves=n,this._3d=this.curves[0]._3d)}valueOf(){return this.toString()}toString(){return"["+this.curves.map(function(n){return J.pointsToString(n.points)}).join(", ")+"]"}addCurve(n){this.curves.push(n),this._3d=this._3d||n._3d}length(){return this.curves.map(function(n){return n.length()}).reduce(function(n,r){return n+r})}curve(n){return this.curves[n]}bbox(){const n=this.curves;for(var r=n[0].bbox(),o=1;o<n.length;o++)J.expandbox(r,n[o].bbox());return r}offset(n){const r=[];return this.curves.forEach(function(o){r.push(...o.offset(n))}),new js(r)}}const{abs:ss,min:ex,max:tx,cos:mW,sin:gW,acos:yW,sqrt:as}=Math,vW=Math.PI;class Ee{constructor(n){let r=n&&n.forEach?n:Array.from(arguments).slice(),o=!1;if(typeof r[0]=="object"){o=r.length;const m=[];r.forEach(function(y){["x","y","z"].forEach(function(b){typeof y[b]<"u"&&m.push(y[b])})}),r=m}let i=!1;const s=r.length;if(o){if(o>4){if(arguments.length!==1)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");i=!0}}else if(s!==6&&s!==8&&s!==9&&s!==12&&arguments.length!==1)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");const a=this._3d=!i&&(s===9||s===12)||n&&n[0]&&typeof n[0].z<"u",l=this.points=[];for(let m=0,y=a?3:2;m<s;m+=y){var c={x:r[m],y:r[m+1]};a&&(c.z=r[m+2]),l.push(c)}const u=this.order=l.length-1,f=this.dims=["x","y"];a&&f.push("z"),this.dimlen=f.length;const d=J.align(l,{p1:l[0],p2:l[u]}),p=J.dist(l[0],l[u]);this._linear=d.reduce((m,y)=>m+ss(y.y),0)<p/50,this._lut=[],this._t1=0,this._t2=1,this.update()}static quadraticFromPoints(n,r,o,i){if(typeof i>"u"&&(i=.5),i===0)return new Ee(r,r,o);if(i===1)return new Ee(n,r,r);const s=Ee.getABC(2,n,r,o,i);return new Ee(n,s.A,o)}static cubicFromPoints(n,r,o,i,s){typeof i>"u"&&(i=.5);const a=Ee.getABC(3,n,r,o,i);typeof s>"u"&&(s=J.dist(r,a.C));const l=s*(1-i)/i,c=J.dist(n,o),u=(o.x-n.x)/c,f=(o.y-n.y)/c,d=s*u,p=s*f,m=l*u,y=l*f,b={x:r.x-d,y:r.y-p},_={x:r.x+m,y:r.y+y},v=a.A,x={x:v.x+(b.x-v.x)/(1-i),y:v.y+(b.y-v.y)/(1-i)},w={x:v.x+(_.x-v.x)/i,y:v.y+(_.y-v.y)/i},S={x:n.x+(x.x-n.x)/i,y:n.y+(x.y-n.y)/i},C={x:o.x+(w.x-o.x)/(1-i),y:o.y+(w.y-o.y)/(1-i)};return new Ee(n,S,C,o)}static getUtils(){return J}getUtils(){return Ee.getUtils()}static get PolyBezier(){return js}valueOf(){return this.toString()}toString(){return J.pointsToString(this.points)}toSVG(){if(this._3d)return!1;const n=this.points,r=n[0].x,o=n[0].y,i=["M",r,o,this.order===2?"Q":"C"];for(let s=1,a=n.length;s<a;s++)i.push(n[s].x),i.push(n[s].y);return i.join(" ")}setRatios(n){if(n.length!==this.points.length)throw new Error("incorrect number of ratio values");this.ratios=n,this._lut=[]}verify(){const n=this.coordDigest();n!==this._print&&(this._print=n,this.update())}coordDigest(){return this.points.map(function(n,r){return""+r+n.x+n.y+(n.z?n.z:0)}).join("")}update(){this._lut=[],this.dpoints=J.derive(this.points,this._3d),this.computedirection()}computedirection(){const n=this.points,r=J.angle(n[0],n[this.order],n[1]);this.clockwise=r>0}length(){return J.length(this.derivative.bind(this))}static getABC(n=2,r,o,i,s=.5){const a=J.projectionratio(s,n),l=1-a,c={x:a*r.x+l*i.x,y:a*r.y+l*i.y},u=J.abcratio(s,n);return{A:{x:o.x+(o.x-c.x)/u,y:o.y+(o.y-c.y)/u},B:o,C:c,S:r,E:i}}getABC(n,r){r=r||this.get(n);let o=this.points[0],i=this.points[this.order];return Ee.getABC(this.order,o,r,i,n)}getLUT(n){if(this.verify(),n=n||100,this._lut.length===n+1)return this._lut;this._lut=[],n++,this._lut=[];for(let r=0,o,i;r<n;r++)i=r/(n-1),o=this.compute(i),o.t=i,this._lut.push(o);return this._lut}on(n,r){r=r||5;const o=this.getLUT(),i=[];for(let s=0,a,l=0;s<o.length;s++)a=o[s],J.dist(a,n)<r&&(i.push(a),l+=s/o.length);return i.length?t/=i.length:!1}project(n){const r=this.getLUT(),o=r.length-1,i=J.closest(r,n),s=i.mpos,a=(s-1)/o,l=(s+1)/o,c=.1/o;let u=i.mdist,f=a,d=f,p;u+=1;for(let m;f<l+c;f+=c)p=this.compute(f),m=J.dist(n,p),m<u&&(u=m,d=f);return d=d<0?0:d>1?1:d,p=this.compute(d),p.t=d,p.d=u,p}get(n){return this.compute(n)}point(n){return this.points[n]}compute(n){return this.ratios?J.computeWithRatios(n,this.points,this.ratios,this._3d):J.compute(n,this.points,this._3d,this.ratios)}raise(){const n=this.points,r=[n[0]],o=n.length;for(let i=1,s,a;i<o;i++)s=n[i],a=n[i-1],r[i]={x:(o-i)/o*s.x+i/o*a.x,y:(o-i)/o*s.y+i/o*a.y};return r[o]=n[o-1],new Ee(r)}derivative(n){return J.compute(n,this.dpoints[0],this._3d)}dderivative(n){return J.compute(n,this.dpoints[1],this._3d)}align(){let n=this.points;return new Ee(J.align(n,{p1:n[0],p2:n[n.length-1]}))}curvature(n){return J.curvature(n,this.dpoints[0],this.dpoints[1],this._3d)}inflections(){return J.inflections(this.points)}normal(n){return this._3d?this.__normal3(n):this.__normal2(n)}__normal2(n){const r=this.derivative(n),o=as(r.x*r.x+r.y*r.y);return{t:n,x:-r.y/o,y:r.x/o}}__normal3(n){const r=this.derivative(n),o=this.derivative(n+.01),i=as(r.x*r.x+r.y*r.y+r.z*r.z),s=as(o.x*o.x+o.y*o.y+o.z*o.z);r.x/=i,r.y/=i,r.z/=i,o.x/=s,o.y/=s,o.z/=s;const a={x:o.y*r.z-o.z*r.y,y:o.z*r.x-o.x*r.z,z:o.x*r.y-o.y*r.x},l=as(a.x*a.x+a.y*a.y+a.z*a.z);a.x/=l,a.y/=l,a.z/=l;const c=[a.x*a.x,a.x*a.y-a.z,a.x*a.z+a.y,a.x*a.y+a.z,a.y*a.y,a.y*a.z-a.x,a.x*a.z-a.y,a.y*a.z+a.x,a.z*a.z];return{t:n,x:c[0]*r.x+c[1]*r.y+c[2]*r.z,y:c[3]*r.x+c[4]*r.y+c[5]*r.z,z:c[6]*r.x+c[7]*r.y+c[8]*r.z}}hull(n){let r=this.points,o=[],i=[],s=0;for(i[s++]=r[0],i[s++]=r[1],i[s++]=r[2],this.order===3&&(i[s++]=r[3]);r.length>1;){o=[];for(let a=0,l,c=r.length-1;a<c;a++)l=J.lerp(n,r[a],r[a+1]),i[s++]=l,o.push(l);r=o}return i}split(n,r){if(n===0&&r)return this.split(r).left;if(r===1)return this.split(n).right;const o=this.hull(n),i={left:this.order===2?new Ee([o[0],o[3],o[5]]):new Ee([o[0],o[4],o[7],o[9]]),right:this.order===2?new Ee([o[5],o[4],o[2]]):new Ee([o[9],o[8],o[6],o[3]]),span:o};return i.left._t1=J.map(0,0,1,this._t1,this._t2),i.left._t2=J.map(n,0,1,this._t1,this._t2),i.right._t1=J.map(n,0,1,this._t1,this._t2),i.right._t2=J.map(1,0,1,this._t1,this._t2),r?(r=J.map(r,n,1,0,1),i.right.split(r).left):i}extrema(){const n={};let r=[];return this.dims.forEach((function(o){let i=function(a){return a[o]},s=this.dpoints[0].map(i);n[o]=J.droots(s),this.order===3&&(s=this.dpoints[1].map(i),n[o]=n[o].concat(J.droots(s))),n[o]=n[o].filter(function(a){return a>=0&&a<=1}),r=r.concat(n[o].sort(J.numberSort))}).bind(this)),n.values=r.sort(J.numberSort).filter(function(o,i){return r.indexOf(o)===i}),n}bbox(){const n=this.extrema(),r={};return this.dims.forEach((function(o){r[o]=J.getminmax(this,o,n[o])}).bind(this)),r}overlaps(n){const r=this.bbox(),o=n.bbox();return J.bboxoverlap(r,o)}offset(n,r){if(typeof r<"u"){const o=this.get(n),i=this.normal(n),s={c:o,n:i,x:o.x+i.x*r,y:o.y+i.y*r};return this._3d&&(s.z=o.z+i.z*r),s}if(this._linear){const o=this.normal(0),i=this.points.map(function(s){const a={x:s.x+n*o.x,y:s.y+n*o.y};return s.z&&o.z&&(a.z=s.z+n*o.z),a});return[new Ee(i)]}return this.reduce().map(function(o){return o._linear?o.offset(n)[0]:o.scale(n)})}simple(){if(this.order===3){const i=J.angle(this.points[0],this.points[3],this.points[1]),s=J.angle(this.points[0],this.points[3],this.points[2]);if(i>0&&s<0||i<0&&s>0)return!1}const n=this.normal(0),r=this.normal(1);let o=n.x*r.x+n.y*r.y;return this._3d&&(o+=n.z*r.z),ss(yW(o))<vW/3}reduce(){let n,r=0,o=0,i=.01,s,a=[],l=[],c=this.extrema().values;for(c.indexOf(0)===-1&&(c=[0].concat(c)),c.indexOf(1)===-1&&c.push(1),r=c[0],n=1;n<c.length;n++)o=c[n],s=this.split(r,o),s._t1=r,s._t2=o,a.push(s),r=o;return a.forEach(function(u){for(r=0,o=0;o<=1;)for(o=r+i;o<=1+i;o+=i)if(s=u.split(r,o),!s.simple()){if(o-=i,ss(r-o)<i)return[];s=u.split(r,o),s._t1=J.map(r,0,1,u._t1,u._t2),s._t2=J.map(o,0,1,u._t1,u._t2),l.push(s),r=o;break}r<1&&(s=u.split(r,1),s._t1=J.map(r,0,1,u._t1,u._t2),s._t2=u._t2,l.push(s))}),l}translate(n,r,o){o=typeof o=="number"?o:r;const i=this.order;let s=this.points.map((a,l)=>(1-l/i)*r+l/i*o);return new Ee(this.points.map((a,l)=>({x:a.x+n.x*s[l],y:a.y+n.y*s[l]})))}scale(n){const r=this.order;let o=!1;if(typeof n=="function"&&(o=n),o&&r===2)return this.raise().scale(o);const i=this.clockwise,s=this.points;if(this._linear)return this.translate(this.normal(0),o?o(0):n,o?o(1):n);const a=o?o(0):n,l=o?o(1):n,c=[this.offset(0,10),this.offset(1,10)],u=[],f=J.lli4(c[0],c[0].c,c[1],c[1].c);if(!f)throw new Error("cannot scale this curve. Try reducing it first.");return[0,1].forEach(function(d){const p=u[d*r]=J.copy(s[d*r]);p.x+=(d?l:a)*c[d].n.x,p.y+=(d?l:a)*c[d].n.y}),o?([0,1].forEach(function(d){if(!(r===2&&d)){var p=s[d+1],m={x:p.x-f.x,y:p.y-f.y},y=o?o((d+1)/r):n;o&&!i&&(y=-y);var b=as(m.x*m.x+m.y*m.y);m.x/=b,m.y/=b,u[d+1]={x:p.x+y*m.x,y:p.y+y*m.y}}}),new Ee(u)):([0,1].forEach(d=>{if(r===2&&d)return;const p=u[d*r],m=this.derivative(d),y={x:p.x+m.x,y:p.y+m.y};u[d+1]=J.lli4(p,y,f,s[d+1])}),new Ee(u))}outline(n,r,o,i){if(r=r===void 0?n:r,this._linear){const C=this.normal(0),E=this.points[0],k=this.points[this.points.length-1];let N,M,T;o===void 0&&(o=n,i=r),N={x:E.x+C.x*n,y:E.y+C.y*n},T={x:k.x+C.x*o,y:k.y+C.y*o},M={x:(N.x+T.x)/2,y:(N.y+T.y)/2};const A=[N,M,T];N={x:E.x-C.x*r,y:E.y-C.y*r},T={x:k.x-C.x*i,y:k.y-C.y*i},M={x:(N.x+T.x)/2,y:(N.y+T.y)/2};const D=[T,M,N],V=J.makeline(D[2],A[0]),P=J.makeline(A[2],D[0]),L=[V,new Ee(A),P,new Ee(D)];return new js(L)}const s=this.reduce(),a=s.length,l=[];let c=[],u,f=0,d=this.length();const p=typeof o<"u"&&typeof i<"u";function m(C,E,k,N,M){return function(T){const A=N/k,D=(N+M)/k,V=E-C;return J.map(T,0,1,C+A*V,C+D*V)}}s.forEach(function(C){const E=C.length();p?(l.push(C.scale(m(n,o,d,f,E))),c.push(C.scale(m(-r,-i,d,f,E)))):(l.push(C.scale(n)),c.push(C.scale(-r))),f+=E}),c=c.map(function(C){return u=C.points,u[3]?C.points=[u[3],u[2],u[1],u[0]]:C.points=[u[2],u[1],u[0]],C}).reverse();const y=l[0].points[0],b=l[a-1].points[l[a-1].points.length-1],_=c[a-1].points[c[a-1].points.length-1],v=c[0].points[0],x=J.makeline(_,y),w=J.makeline(b,v),S=[x].concat(l).concat([w]).concat(c);return new js(S)}outlineshapes(n,r,o){r=r||n;const i=this.outline(n,r).curves,s=[];for(let a=1,l=i.length;a<l/2;a++){const c=J.makeshape(i[a],i[l-a],o);c.startcap.virtual=a>1,c.endcap.virtual=a<l/2-1,s.push(c)}return s}intersects(n,r){return n?n.p1&&n.p2?this.lineIntersects(n):(n instanceof Ee&&(n=n.reduce()),this.curveintersects(this.reduce(),n,r)):this.selfintersects(r)}lineIntersects(n){const r=ex(n.p1.x,n.p2.x),o=ex(n.p1.y,n.p2.y),i=tx(n.p1.x,n.p2.x),s=tx(n.p1.y,n.p2.y);return J.roots(this.points,n).filter(a=>{var l=this.get(a);return J.between(l.x,r,i)&&J.between(l.y,o,s)})}selfintersects(n){const r=this.reduce(),o=r.length-2,i=[];for(let s=0,a,l,c;s<o;s++)l=r.slice(s,s+1),c=r.slice(s+2),a=this.curveintersects(l,c,n),i.push(...a);return i}curveintersects(n,r,o){const i=[];n.forEach(function(a){r.forEach(function(l){a.overlaps(l)&&i.push({left:a,right:l})})});let s=[];return i.forEach(function(a){const l=J.pairiteration(a.left,a.right,o);l.length>0&&(s=s.concat(l))}),s}arcs(n){return n=n||.5,this._iterate(n,[])}_error(n,r,o,i){const s=(i-o)/4,a=this.get(o+s),l=this.get(i-s),c=J.dist(n,r),u=J.dist(n,a),f=J.dist(n,l);return ss(u-c)+ss(f-c)}_iterate(n,r){let o=0,i=1,s;do{s=0,i=1;let a=this.get(o),l,c,u,f,d=!1,p=!1,m,y=i,b=1;do if(p=d,f=u,y=(o+i)/2,l=this.get(y),c=this.get(i),u=J.getccenter(a,l,c),u.interval={start:o,end:i},d=this._error(u,a,o,i)<=n,m=p&&!d,m||(b=i),d){if(i>=1){if(u.interval.end=b=1,f=u,i>1){let v={x:u.x+u.r*mW(u.e),y:u.y+u.r*gW(u.e)};u.e+=J.angle({x:u.x,y:u.y},v,this.get(1))}break}i=i+(i-o)/2}else i=y;while(!m&&s++<100);if(s>=100)break;f=f||u,r.push(f),o=b}while(i<1);return r}}function rh(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,o=Array(n);r<n;r++)o[r]=e[r];return o}function xW(e){if(Array.isArray(e))return e}function wW(e){if(Array.isArray(e))return rh(e)}function bW(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function _W(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var o,i,s,a,l=[],c=!0,u=!1;try{if(s=(r=r.call(e)).next,n!==0)for(;!(c=(o=s.call(r)).done)&&(l.push(o.value),l.length!==n);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return l}}function SW(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
363
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function CW(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
364
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function EW(e,n){if(e==null)return{};var r,o,i=kW(e,n);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o<s.length;o++)r=s[o],n.includes(r)||{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function kW(e,n){if(e==null)return{};var r={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(n.includes(o))continue;r[o]=e[o]}return r}function NW(e,n){return xW(e)||_W(e,n)||ek(e,n)||SW()}function PW(e){return wW(e)||bW(e)||ek(e)||CW()}function MW(e,n){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,n);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function RW(e){var n=MW(e,"string");return typeof n=="symbol"?n:n+""}function ek(e,n){if(e){if(typeof e=="string")return rh(e,n);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?rh(e,n):void 0}}var jW=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,i=(n instanceof Array?n.length?n:[void 0]:[n]).map(function(l){return{keyAccessor:l,isProp:!(l instanceof Function)}}),s=e.reduce(function(l,c){var u=l,f=c;return i.forEach(function(d,p){var m=d.keyAccessor,y=d.isProp,b;if(y){var _=f,v=_[m],x=EW(_,[m].map(RW));b=v,f=x}else b=m(f,p);p+1<i.length?(u.hasOwnProperty(b)||(u[b]={}),u=u[b]):r?(u.hasOwnProperty(b)||(u[b]=[]),u[b].push(f)):u[b]=f}),l},{});r instanceof Function&&function l(c){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;u===i.length?Object.keys(c).forEach(function(f){return c[f]=r(c[f])}):Object.values(c).forEach(function(f){return l(f,u+1)})}(s);var a=s;return o&&(a=[],function l(c){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];u.length===i.length?a.push({keys:u,vals:c}):Object.entries(c).forEach(function(f){var d=NW(f,2),p=d[0],m=d[1];return l(m,[].concat(PW(u),[p]))})}(s),n instanceof Array&&n.length===0&&a.length===1&&(a[0].keys=[])),a};function AW(e,n){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(n).domain(e);break}return this}const nx=Symbol("implicit");function tk(){var e=new S0,n=[],r=[],o=nx;function i(s){let a=e.get(s);if(a===void 0){if(o!==nx)return o;e.set(s,a=n.push(s)-1)}return r[a%r.length]}return i.domain=function(s){if(!arguments.length)return n.slice();n=[],e=new S0;for(const a of s)e.has(a)||e.set(a,n.push(a)-1);return i},i.range=function(s){return arguments.length?(r=Array.from(s),i):r.slice()},i.unknown=function(s){return arguments.length?(o=s,i):o},i.copy=function(){return tk(n,r).unknown(o)},AW.apply(i,arguments),i}function TW(e){for(var n=e.length/6|0,r=new Array(n),o=0;o<n;)r[o]="#"+e.slice(o*6,++o*6);return r}const IW=TW("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928");function $W(e,n){n===void 0&&(n={});var r=n.insertAt;if(!(typeof document>"u")){var o=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",r==="top"&&o.firstChild?o.insertBefore(i,o.firstChild):o.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var OW=`.force-graph-container canvas {
365
- display: block;
366
- user-select: none;
367
- outline: none;
368
- -webkit-tap-highlight-color: transparent;
369
- }
370
-
371
- .force-graph-container .clickable {
372
- cursor: pointer;
373
- }
374
-
375
- .force-graph-container .grabbable {
376
- cursor: move;
377
- cursor: grab;
378
- cursor: -moz-grab;
379
- cursor: -webkit-grab;
380
- }
381
-
382
- .force-graph-container .grabbable:active {
383
- cursor: grabbing;
384
- cursor: -moz-grabbing;
385
- cursor: -webkit-grabbing;
386
- }
387
- `;$W(OW);function oh(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,o=Array(n);r<n;r++)o[r]=e[r];return o}function DW(e){if(Array.isArray(e))return e}function LW(e){if(Array.isArray(e))return oh(e)}function rx(e,n,r){if(nk())return Reflect.construct.apply(null,arguments);var o=[null];o.push.apply(o,n);var i=new(e.bind.apply(e,o));return i}function aa(e,n,r){return(n=WW(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function nk(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(nk=function(){return!!e})()}function zW(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function FW(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var o,i,s,a,l=[],c=!0,u=!1;try{if(s=(r=r.call(e)).next,n!==0)for(;!(c=(o=s.call(r)).done)&&(l.push(o.value),l.length!==n);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return l}}function VW(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
388
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function BW(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
389
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ox(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,o)}return r}function Ao(e){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?ox(Object(r),!0).forEach(function(o){aa(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ox(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function As(e,n){return DW(e)||FW(e,n)||rk(e,n)||VW()}function zt(e){return LW(e)||zW(e)||rk(e)||BW()}function HW(e,n){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,n);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function WW(e){var n=HW(e,"string");return typeof n=="symbol"?n:n+""}function ih(e){"@babel/helpers - typeof";return ih=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ih(e)}function rk(e,n){if(e){if(typeof e=="string")return oh(e,n);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?oh(e,n):void 0}}var UW=tk(IW);function ix(e,n,r){!n||typeof r!="string"||e.filter(function(o){return!o[r]}).forEach(function(o){o[r]=UW(n(o))})}function GW(e,n){var r=e.nodes,o=e.links,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=i.nodeFilter,a=s===void 0?function(){return!0}:s,l=i.onLoopError,c=l===void 0?function(m){throw"Invalid DAG structure! Found cycle in node path: ".concat(m.join(" -> "),".")}:l,u={};r.forEach(function(m){return u[n(m)]={data:m,out:[],depth:-1,skip:!a(m)}}),o.forEach(function(m){var y=m.source,b=m.target,_=S(y),v=S(b);if(!u.hasOwnProperty(_))throw"Missing source node with id: ".concat(_);if(!u.hasOwnProperty(v))throw"Missing target node with id: ".concat(v);var x=u[_],w=u[v];x.out.push(w);function S(C){return ih(C)==="object"?n(C):C}});var f=[];p(Object.values(u));var d=Object.assign.apply(Object,[{}].concat(zt(Object.entries(u).filter(function(m){var y=As(m,2),b=y[1];return!b.skip}).map(function(m){var y=As(m,2),b=y[0],_=y[1];return aa({},b,_.depth)}))));return d;function p(m){for(var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],b=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,_=function(){var S=m[v];if(y.indexOf(S)!==-1){var C=[].concat(zt(y.slice(y.indexOf(S))),[S]).map(function(E){return n(E.data)});return f.some(function(E){return E.length===C.length&&E.every(function(k,N){return k===C[N]})})||(f.push(C),c(C)),1}b>S.depth&&(S.depth=b,p(S.out,[].concat(zt(y),[S]),b+(S.skip?0:1)))},v=0,x=m.length;v<x;v++)_()}}var YW=2,Qe=function(n,r){return r.onNeedsRedraw&&r.onNeedsRedraw()},sx=function(n,r){if(!r.isShadow){var o=xe(r.linkDirectionalParticles);r.graphData.links.forEach(function(i){var s=Math.round(Math.abs(o(i)));s?i.__photons=zt(Array(s)).map(function(){return{}}):delete i.__photons})}},Jc=fg({props:{graphData:{default:{nodes:[],links:[]},onChange:function(n,r){r.engineRunning=!1,sx(n,r)}},dagMode:{onChange:function(n,r){!n&&(r.graphData.nodes||[]).forEach(function(o){return o.fx=o.fy=void 0})}},dagLevelDistance:{},dagNodeFilter:{default:function(n){return!0}},onDagError:{triggerUpdate:!1},nodeRelSize:{default:4,triggerUpdate:!1,onChange:Qe},nodeId:{default:"id"},nodeVal:{default:"val",triggerUpdate:!1,onChange:Qe},nodeColor:{default:"color",triggerUpdate:!1,onChange:Qe},nodeAutoColorBy:{},nodeCanvasObject:{triggerUpdate:!1,onChange:Qe},nodeCanvasObjectMode:{default:function(){return"replace"},triggerUpdate:!1,onChange:Qe},nodeVisibility:{default:!0,triggerUpdate:!1,onChange:Qe},linkSource:{default:"source"},linkTarget:{default:"target"},linkVisibility:{default:!0,triggerUpdate:!1,onChange:Qe},linkColor:{default:"color",triggerUpdate:!1,onChange:Qe},linkAutoColorBy:{},linkLineDash:{triggerUpdate:!1,onChange:Qe},linkWidth:{default:1,triggerUpdate:!1,onChange:Qe},linkCurvature:{default:0,triggerUpdate:!1,onChange:Qe},linkCanvasObject:{triggerUpdate:!1,onChange:Qe},linkCanvasObjectMode:{default:function(){return"replace"},triggerUpdate:!1,onChange:Qe},linkDirectionalArrowLength:{default:0,triggerUpdate:!1,onChange:Qe},linkDirectionalArrowColor:{triggerUpdate:!1,onChange:Qe},linkDirectionalArrowRelPos:{default:.5,triggerUpdate:!1,onChange:Qe},linkDirectionalParticles:{default:0,triggerUpdate:!1,onChange:sx},linkDirectionalParticleSpeed:{default:.01,triggerUpdate:!1},linkDirectionalParticleOffset:{default:0,triggerUpdate:!1},linkDirectionalParticleWidth:{default:4,triggerUpdate:!1},linkDirectionalParticleColor:{triggerUpdate:!1},linkDirectionalParticleCanvasObject:{triggerUpdate:!1},globalScale:{default:1,triggerUpdate:!1},d3AlphaMin:{default:0,triggerUpdate:!1},d3AlphaDecay:{default:.0228,triggerUpdate:!1,onChange:function(n,r){r.forceLayout.alphaDecay(n)}},d3AlphaTarget:{default:0,triggerUpdate:!1,onChange:function(n,r){r.forceLayout.alphaTarget(n)}},d3VelocityDecay:{default:.4,triggerUpdate:!1,onChange:function(n,r){r.forceLayout.velocityDecay(n)}},warmupTicks:{default:0,triggerUpdate:!1},cooldownTicks:{default:1/0,triggerUpdate:!1},cooldownTime:{default:15e3,triggerUpdate:!1},onUpdate:{default:function(){},triggerUpdate:!1},onFinishUpdate:{default:function(){},triggerUpdate:!1},onEngineTick:{default:function(){},triggerUpdate:!1},onEngineStop:{default:function(){},triggerUpdate:!1},onNeedsRedraw:{triggerUpdate:!1},isShadow:{default:!1,triggerUpdate:!1}},methods:{d3Force:function(n,r,o){return o===void 0?n.forceLayout.force(r):(n.forceLayout.force(r,o),this)},d3ReheatSimulation:function(n){return n.forceLayout.alpha(1),this.resetCountdown(),this},resetCountdown:function(n){return n.cntTicks=0,n.startTickTime=new Date,n.engineRunning=!0,this},isEngineRunning:function(n){return!!n.engineRunning},tickFrame:function(n){return!n.isShadow&&r(),i(),!n.isShadow&&s(),!n.isShadow&&a(),o(),this;function r(){n.engineRunning&&(++n.cntTicks>n.cooldownTicks||new Date-n.startTickTime>n.cooldownTime||n.d3AlphaMin>0&&n.forceLayout.alpha()<n.d3AlphaMin?(n.engineRunning=!1,n.onEngineStop()):(n.forceLayout.tick(),n.onEngineTick()))}function o(){var l=xe(n.nodeVisibility),c=xe(n.nodeVal),u=xe(n.nodeColor),f=xe(n.nodeCanvasObjectMode),d=n.ctx,p=n.isShadow/n.globalScale,m=n.graphData.nodes.filter(l);d.save(),m.forEach(function(y){var b=f(y);if(n.nodeCanvasObject&&(b==="before"||b==="replace")&&(n.nodeCanvasObject(y,d,n.globalScale),b==="replace")){d.restore();return}var _=Math.sqrt(Math.max(0,c(y)||1))*n.nodeRelSize+p;d.beginPath(),d.arc(y.x,y.y,_,0,2*Math.PI,!1),d.fillStyle=u(y)||"rgba(31, 120, 180, 0.92)",d.fill(),n.nodeCanvasObject&&b==="after"&&n.nodeCanvasObject(y,n.ctx,n.globalScale)}),d.restore()}function i(){var l=xe(n.linkVisibility),c=xe(n.linkColor),u=xe(n.linkWidth),f=xe(n.linkLineDash),d=xe(n.linkCurvature),p=xe(n.linkCanvasObjectMode),m=n.ctx,y=n.isShadow*2,b=n.graphData.links.filter(l);b.forEach(E);var _=[],v=[],x=b;if(n.linkCanvasObject){var w=[],S=[];b.forEach(function(k){return({before:_,after:v,replace:w}[p(k)]||S).push(k)}),x=[].concat(zt(_),v,S),_=_.concat(w)}m.save(),_.forEach(function(k){return n.linkCanvasObject(k,m,n.globalScale)}),m.restore();var C=jW(x,[c,u,f]);m.save(),Object.entries(C).forEach(function(k){var N=As(k,2),M=N[0],T=N[1],A=!M||M==="undefined"?"rgba(0,0,0,0.15)":M;Object.entries(T).forEach(function(D){var V=As(D,2),P=V[0],L=V[1],I=(P||1)/n.globalScale+y;Object.entries(L).forEach(function(F){var R=As(F,2);R[0];var j=R[1],O=f(j[0]);m.beginPath(),j.forEach(function(G){var $=G.source,X=G.target;if(!(!$||!X||!$.hasOwnProperty("x")||!X.hasOwnProperty("x"))){m.moveTo($.x,$.y);var H=G.__controlPoints;H?m[H.length===2?"quadraticCurveTo":"bezierCurveTo"].apply(m,zt(H).concat([X.x,X.y])):m.lineTo(X.x,X.y)}}),m.strokeStyle=A,m.lineWidth=I,m.setLineDash(O||[]),m.stroke()})})}),m.restore(),m.save(),v.forEach(function(k){return n.linkCanvasObject(k,m,n.globalScale)}),m.restore();function E(k){var N=d(k);if(!N){k.__controlPoints=null;return}var M=k.source,T=k.target;if(!(!M||!T||!M.hasOwnProperty("x")||!T.hasOwnProperty("x"))){var A=Math.sqrt(Math.pow(T.x-M.x,2)+Math.pow(T.y-M.y,2));if(A>0){var D=Math.atan2(T.y-M.y,T.x-M.x),V=A*N,P={x:(M.x+T.x)/2+V*Math.cos(D-Math.PI/2),y:(M.y+T.y)/2+V*Math.sin(D-Math.PI/2)};k.__controlPoints=[P.x,P.y]}else{var L=N*70;k.__controlPoints=[T.x,T.y-L,T.x+L,T.y]}}}}function s(){var l=1.6,c=.2,u=xe(n.linkDirectionalArrowLength),f=xe(n.linkDirectionalArrowRelPos),d=xe(n.linkVisibility),p=xe(n.linkDirectionalArrowColor||n.linkColor),m=xe(n.nodeVal),y=n.ctx;y.save(),n.graphData.links.filter(d).forEach(function(b){var _=u(b);if(!(!_||_<0)){var v=b.source,x=b.target;if(!(!v||!x||!v.hasOwnProperty("x")||!x.hasOwnProperty("x"))){var w=Math.sqrt(Math.max(0,m(v)||1))*n.nodeRelSize,S=Math.sqrt(Math.max(0,m(x)||1))*n.nodeRelSize,C=Math.min(1,Math.max(0,f(b))),E=p(b)||"rgba(0,0,0,0.28)",k=_/l/2,N=b.__controlPoints&&rx(Ee,[v.x,v.y].concat(zt(b.__controlPoints),[x.x,x.y])),M=N?function(I){return N.get(I)}:function(I){return{x:v.x+(x.x-v.x)*I||0,y:v.y+(x.y-v.y)*I||0}},T=N?N.length():Math.sqrt(Math.pow(x.x-v.x,2)+Math.pow(x.y-v.y,2)),A=w+_+(T-w-S-_)*C,D=M(A/T),V=M((A-_)/T),P=M((A-_*(1-c))/T),L=Math.atan2(D.y-V.y,D.x-V.x)-Math.PI/2;y.beginPath(),y.moveTo(D.x,D.y),y.lineTo(V.x+k*Math.cos(L),V.y+k*Math.sin(L)),y.lineTo(P.x,P.y),y.lineTo(V.x-k*Math.cos(L),V.y-k*Math.sin(L)),y.fillStyle=E,y.fill()}}}),y.restore()}function a(){var l=xe(n.linkDirectionalParticles),c=xe(n.linkDirectionalParticleSpeed),u=xe(n.linkDirectionalParticleOffset),f=xe(n.linkDirectionalParticleWidth),d=xe(n.linkVisibility),p=xe(n.linkDirectionalParticleColor||n.linkColor),m=n.ctx;m.save(),n.graphData.links.filter(d).forEach(function(y){var b=l(y);if(!(!y.hasOwnProperty("__photons")||!y.__photons.length)){var _=y.source,v=y.target;if(!(!_||!v||!_.hasOwnProperty("x")||!v.hasOwnProperty("x"))){var x=c(y),w=Math.abs(u(y)),S=y.__photons||[],C=Math.max(0,f(y)/2)/Math.sqrt(n.globalScale),E=p(y)||"rgba(0,0,0,0.28)";m.fillStyle=E;var k=y.__controlPoints?rx(Ee,[_.x,_.y].concat(zt(y.__controlPoints),[v.x,v.y])):null,N=0,M=!1;S.forEach(function(T){var A=!!T.__singleHop;if(T.hasOwnProperty("__progressRatio")||(T.__progressRatio=A?0:(N+w)/b),!A&&N++,T.__progressRatio+=x,T.__progressRatio>=1)if(!A)T.__progressRatio=T.__progressRatio%1;else{M=!0;return}var D=T.__progressRatio,V=k?k.get(D):{x:_.x+(v.x-_.x)*D||0,y:_.y+(v.y-_.y)*D||0};n.linkDirectionalParticleCanvasObject?n.linkDirectionalParticleCanvasObject(V.x,V.y,y,m,n.globalScale):(m.beginPath(),m.arc(V.x,V.y,C,0,2*Math.PI,!1),m.fill())}),M&&(y.__photons=y.__photons.filter(function(T){return!T.__singleHop||T.__progressRatio<=1}))}}}),m.restore()}},emitParticle:function(n,r){return r&&(!r.__photons&&(r.__photons=[]),r.__photons.push({__singleHop:!0})),this}},stateInit:function(){return{forceLayout:cW().force("link",tW()).force("charge",uW()).force("center",rH()).force("dagRadial",null).stop(),engineRunning:!1}},init:function(n,r){r.ctx=n},update:function(n,r){n.engineRunning=!1,n.onUpdate(),n.nodeAutoColorBy!==null&&ix(n.graphData.nodes,xe(n.nodeAutoColorBy),n.nodeColor),n.linkAutoColorBy!==null&&ix(n.graphData.links,xe(n.linkAutoColorBy),n.linkColor),n.graphData.links.forEach(function(p){p.source=p[n.linkSource],p.target=p[n.linkTarget]}),n.forceLayout.stop().alpha(1).nodes(n.graphData.nodes);var o=n.forceLayout.force("link");o&&o.id(function(p){return p[n.nodeId]}).links(n.graphData.links);var i=n.dagMode&&GW(n.graphData,function(p){return p[n.nodeId]},{nodeFilter:n.dagNodeFilter,onLoopError:n.onDagError||void 0}),s=Math.max.apply(Math,zt(Object.values(i||[]))),a=n.dagLevelDistance||n.graphData.nodes.length/(s||1)*YW*(["radialin","radialout"].indexOf(n.dagMode)!==-1?.7:1);if(["lr","rl","td","bu"].includes(r.dagMode)){var l=["lr","rl"].includes(r.dagMode)?"fx":"fy";n.graphData.nodes.filter(n.dagNodeFilter).forEach(function(p){return delete p[l]})}if(["lr","rl","td","bu"].includes(n.dagMode)){var c=["rl","bu"].includes(n.dagMode),u=function(m){return(i[m[n.nodeId]]-s/2)*a*(c?-1:1)},f=["lr","rl"].includes(n.dagMode)?"fx":"fy";n.graphData.nodes.filter(n.dagNodeFilter).forEach(function(p){return p[f]=u(p)})}n.forceLayout.force("dagRadial",["radialin","radialout"].indexOf(n.dagMode)!==-1?dW(function(p){var m=i[p[n.nodeId]]||-1;return(n.dagMode==="radialin"?s-m:m)*a}).strength(function(p){return n.dagNodeFilter(p)?1:0}):null);for(var d=0;d<n.warmupTicks&&!(n.d3AlphaMin>0&&n.forceLayout.alpha()<n.d3AlphaMin);d++)n.forceLayout.tick();this.resetCountdown(),n.onFinishUpdate()}});function ok(e,n){var r=e instanceof Array?e:[e],o=new n;return o._destructor&&o._destructor(),{linkProp:function(s){return{default:o[s](),onChange:function(l,c){r.forEach(function(u){return c[u][s](l)})},triggerUpdate:!1}},linkMethod:function(s){return function(a){for(var l=arguments.length,c=new Array(l>1?l-1:0),u=1;u<l;u++)c[u-1]=arguments[u];var f=[];return r.forEach(function(d){var p=a[d],m=p[s].apply(p,c);m!==p&&f.push(m)}),f.length?f[0]:this}}}}var XW=800,KW=4,qW=5,ik=ok("forceGraph",Jc),ZW=ok(["forceGraph","shadowGraph"],Jc),QW=Object.assign.apply(Object,zt(["nodeColor","nodeAutoColorBy","nodeCanvasObject","nodeCanvasObjectMode","linkColor","linkAutoColorBy","linkLineDash","linkWidth","linkCanvasObject","linkCanvasObjectMode","linkDirectionalArrowLength","linkDirectionalArrowColor","linkDirectionalArrowRelPos","linkDirectionalParticles","linkDirectionalParticleSpeed","linkDirectionalParticleOffset","linkDirectionalParticleWidth","linkDirectionalParticleColor","linkDirectionalParticleCanvasObject","dagMode","dagLevelDistance","dagNodeFilter","onDagError","d3AlphaMin","d3AlphaDecay","d3VelocityDecay","warmupTicks","cooldownTicks","cooldownTime","onEngineTick","onEngineStop"].map(function(e){return aa({},e,ik.linkProp(e))})).concat(zt(["nodeRelSize","nodeId","nodeVal","nodeVisibility","linkSource","linkTarget","linkVisibility","linkCurvature"].map(function(e){return aa({},e,ZW.linkProp(e))})))),JW=Object.assign.apply(Object,zt(["d3Force","d3ReheatSimulation","emitParticle"].map(function(e){return aa({},e,ik.linkMethod(e))})));function vf(e){if(e.canvas){var n=e.canvas.width,r=e.canvas.height;n===300&&r===150&&(n=r=0);var o=window.devicePixelRatio;n/=o,r/=o,[e.canvas,e.shadowCanvas].forEach(function(s){s.style.width="".concat(e.width,"px"),s.style.height="".concat(e.height,"px"),s.width=e.width*o,s.height=e.height*o,!n&&!r&&s.getContext("2d").scale(o,o)});var i=qt(e.canvas).k;e.zoom.translateBy(e.zoom.__baseElem,(e.width-n)/2/i,(e.height-r)/2/i),e.needsRedraw=!0}}function sk(e){var n=window.devicePixelRatio;e.setTransform(n,0,0,n,0,0)}function ax(e,n,r){e.save(),sk(e),e.clearRect(0,0,n,r),e.restore()}var eU=fg({props:Ao({width:{default:window.innerWidth,onChange:function(n,r){return vf(r)},triggerUpdate:!1},height:{default:window.innerHeight,onChange:function(n,r){return vf(r)},triggerUpdate:!1},graphData:{default:{nodes:[],links:[]},onChange:function(n,r){[n.nodes,n.links].every(function(i){return(i||[]).every(function(s){return!s.hasOwnProperty("__indexColor")})})&&r.colorTracker.reset(),[{type:"Node",objs:n.nodes},{type:"Link",objs:n.links}].forEach(o),r.forceGraph.graphData(n),r.shadowGraph.graphData(n);function o(i){var s=i.type,a=i.objs;a.filter(function(l){if(!l.hasOwnProperty("__indexColor"))return!0;var c=r.colorTracker.lookup(l.__indexColor);return!c||!c.hasOwnProperty("d")||c.d!==l}).forEach(function(l){l.__indexColor=r.colorTracker.register({type:s,d:l})})}},triggerUpdate:!1},backgroundColor:{onChange:function(n,r){r.canvas&&n&&(r.canvas.style.background=n)},triggerUpdate:!1},nodeLabel:{default:"name",triggerUpdate:!1},nodePointerAreaPaint:{onChange:function(n,r){r.shadowGraph.nodeCanvasObject(n?function(o,i,s){return n(o,o.__indexColor,i,s)}:null),r.flushShadowCanvas&&r.flushShadowCanvas()},triggerUpdate:!1},linkPointerAreaPaint:{onChange:function(n,r){r.shadowGraph.linkCanvasObject(n?function(o,i,s){return n(o,o.__indexColor,i,s)}:null),r.flushShadowCanvas&&r.flushShadowCanvas()},triggerUpdate:!1},linkLabel:{default:"name",triggerUpdate:!1},linkHoverPrecision:{default:4,triggerUpdate:!1},minZoom:{default:.01,onChange:function(n,r){r.zoom.scaleExtent([n,r.zoom.scaleExtent()[1]])},triggerUpdate:!1},maxZoom:{default:1e3,onChange:function(n,r){r.zoom.scaleExtent([r.zoom.scaleExtent()[0],n])},triggerUpdate:!1},enableNodeDrag:{default:!0,triggerUpdate:!1},enableZoomInteraction:{default:!0,triggerUpdate:!1},enablePanInteraction:{default:!0,triggerUpdate:!1},enableZoomPanInteraction:{default:!0,triggerUpdate:!1},enablePointerInteraction:{default:!0,onChange:function(n,r){r.hoverObj=null},triggerUpdate:!1},autoPauseRedraw:{default:!0,triggerUpdate:!1},onNodeDrag:{default:function(){},triggerUpdate:!1},onNodeDragEnd:{default:function(){},triggerUpdate:!1},onNodeClick:{triggerUpdate:!1},onNodeRightClick:{triggerUpdate:!1},onNodeHover:{triggerUpdate:!1},onLinkClick:{triggerUpdate:!1},onLinkRightClick:{triggerUpdate:!1},onLinkHover:{triggerUpdate:!1},onBackgroundClick:{triggerUpdate:!1},onBackgroundRightClick:{triggerUpdate:!1},showPointerCursor:{default:!0,triggerUpdate:!1},onZoom:{triggerUpdate:!1},onZoomEnd:{triggerUpdate:!1},onRenderFramePre:{triggerUpdate:!1},onRenderFramePost:{triggerUpdate:!1}},QW),aliases:{stopAnimation:"pauseAnimation"},methods:Ao({graph2ScreenCoords:function(n,r,o){var i=qt(n.canvas);return{x:r*i.k+i.x,y:o*i.k+i.y}},screen2GraphCoords:function(n,r,o){var i=qt(n.canvas);return{x:(r-i.x)/i.k,y:(o-i.y)/i.k}},centerAt:function(n,r,o,i){if(!n.canvas)return null;if(r!==void 0||o!==void 0){var s=Object.assign({},r!==void 0?{x:r}:{},o!==void 0?{y:o}:{});return i?n.tweenGroup.add(new R0(a()).to(s,i).easing(oo.Quadratic.Out).onUpdate(l).onComplete(function(){n.tweenGroup.remove(this)}).start()):l(s),this}return a();function a(){var c=qt(n.canvas);return{x:(n.width/2-c.x)/c.k,y:(n.height/2-c.y)/c.k}}function l(c){var u=c.x,f=c.y;n.zoom.translateTo(n.zoom.__baseElem,u===void 0?a().x:u,f===void 0?a().y:f),n.needsRedraw=!0}},zoom:function(n,r,o){if(!n.canvas)return null;if(r!==void 0)return o?n.tweenGroup.add(new R0({k:i()}).to({k:r},o).easing(oo.Quadratic.Out).onUpdate(function(a){var l=a.k;return s(l)}).onComplete(function(){n.tweenGroup.remove(this)}).start()):s(r),this;return i();function i(){return qt(n.canvas).k}function s(a){n.zoom.scaleTo(n.zoom.__baseElem,a),n.needsRedraw=!0}},zoomToFit:function(n){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:10,i=arguments.length,s=new Array(i>3?i-3:0),a=3;a<i;a++)s[a-3]=arguments[a];var l=this.getGraphBbox.apply(this,s);if(l){var c={x:(l.x[0]+l.x[1])/2,y:(l.y[0]+l.y[1])/2},u=Math.max(1e-12,Math.min(1e12,(n.width-o*2)/(l.x[1]-l.x[0]),(n.height-o*2)/(l.y[1]-l.y[0])));this.centerAt(c.x,c.y,r),this.zoom(u,r)}return this},getGraphBbox:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){return!0},o=xe(n.nodeVal),i=function(l){return Math.sqrt(Math.max(0,o(l)||1))*n.nodeRelSize},s=n.graphData.nodes.filter(r).map(function(a){return{x:a.x,y:a.y,r:i(a)}});return s.length?{x:[k0(s,function(a){return a.x-a.r}),E0(s,function(a){return a.x+a.r})],y:[k0(s,function(a){return a.y-a.r}),E0(s,function(a){return a.y+a.r})]}:null},pauseAnimation:function(n){return n.animationFrameRequestId&&(cancelAnimationFrame(n.animationFrameRequestId),n.animationFrameRequestId=null),this},resumeAnimation:function(n){return n.animationFrameRequestId||this._animationCycle(),this},_destructor:function(){this.pauseAnimation(),this.graphData({nodes:[],links:[]})}},JW),stateInit:function(){return{lastSetZoom:1,zoom:dg(),forceGraph:new Jc,shadowGraph:new Jc().cooldownTicks(0).nodeColor("__indexColor").linkColor("__indexColor").isShadow(!0),colorTracker:new IB,tweenGroup:new ME}},init:function(n,r){var o=this;n.innerHTML="";var i=document.createElement("div");i.classList.add("force-graph-container"),i.style.position="relative",n.appendChild(i),r.canvas=document.createElement("canvas"),r.backgroundColor&&(r.canvas.style.background=r.backgroundColor),i.appendChild(r.canvas),r.shadowCanvas=document.createElement("canvas");var s=r.canvas.getContext("2d"),a=r.shadowCanvas.getContext("2d",{willReadFrequently:!0}),l={x:-1e12,y:-1e12},c=function(){var d=null,p=window.devicePixelRatio,m=l.x>0&&l.y>0?a.getImageData(l.x*p,l.y*p,1,1):null;return m&&(d=r.colorTracker.lookup(m.data)),d};tt(r.canvas).call(og().subject(function(){if(!r.enableNodeDrag)return null;var f=c();return f&&f.type==="Node"?f.d:null}).on("start",function(f){var d=f.subject;d.__initialDragPos={x:d.x,y:d.y,fx:d.fx,fy:d.fy},f.active||(d.fx=d.x,d.fy=d.y),r.canvas.classList.add("grabbable")}).on("drag",function(f){var d=f.subject,p=d.__initialDragPos,m=f,y=qt(r.canvas).k,b={x:p.x+(m.x-p.x)/y-d.x,y:p.y+(m.y-p.y)/y-d.y};["x","y"].forEach(function(_){return d["f".concat(_)]=d[_]=p[_]+(m[_]-p[_])/y}),!(!d.__dragged&&qW>=Math.sqrt(hV(["x","y"].map(function(_){return Math.pow(f[_]-p[_],2)}))))&&(r.forceGraph.d3AlphaTarget(.3).resetCountdown(),r.isPointerDragging=!0,d.__dragged=!0,r.onNodeDrag(d,b))}).on("end",function(f){var d=f.subject,p=d.__initialDragPos,m={x:d.x-p.x,y:d.y-p.y};p.fx===void 0&&(d.fx=void 0),p.fy===void 0&&(d.fy=void 0),delete d.__initialDragPos,r.forceGraph.d3AlphaTarget()&&r.forceGraph.d3AlphaTarget(0).resetCountdown(),r.canvas.classList.remove("grabbable"),r.isPointerDragging=!1,d.__dragged&&(delete d.__dragged,r.onNodeDragEnd(d,m))})),r.zoom(r.zoom.__baseElem=tt(r.canvas)),r.zoom.__baseElem.on("dblclick.zoom",null),r.zoom.filter(function(f){return!f.button&&r.enableZoomPanInteraction&&(f.type!=="wheel"||xe(r.enableZoomInteraction)(f))&&(f.type==="wheel"||xe(r.enablePanInteraction)(f))}).on("zoom",function(f){var d=f.transform;[s,a].forEach(function(p){sk(p),p.translate(d.x,d.y),p.scale(d.k,d.k)}),r.isPointerDragging=!0,r.onZoom&&r.onZoom(Ao(Ao({},d),o.centerAt())),r.needsRedraw=!0}).on("end",function(f){r.isPointerDragging=!1,r.onZoomEnd&&r.onZoomEnd(Ao(Ao({},f.transform),o.centerAt()))}),vf(r),r.forceGraph.onNeedsRedraw(function(){return r.needsRedraw=!0}).onFinishUpdate(function(){qt(r.canvas).k===r.lastSetZoom&&r.graphData.nodes.length&&(r.zoom.scaleTo(r.zoom.__baseElem,r.lastSetZoom=KW/Math.cbrt(r.graphData.nodes.length)),r.needsRedraw=!0)}),r.tooltip=new nH(i),["pointermove","pointerdown"].forEach(function(f){return i.addEventListener(f,function(d){f==="pointerdown"&&(r.isPointerPressed=!0,r.pointerDownEvent=d),!r.isPointerDragging&&d.type==="pointermove"&&r.onBackgroundClick&&(d.pressure>0||r.isPointerPressed)&&(d.pointerType==="mouse"||d.movementX===void 0||[d.movementX,d.movementY].some(function(y){return Math.abs(y)>1}))&&(r.isPointerDragging=!0);var p=m(i);l.x=d.pageX-p.left,l.y=d.pageY-p.top;function m(y){var b=y.getBoundingClientRect(),_=window.pageXOffset||document.documentElement.scrollLeft,v=window.pageYOffset||document.documentElement.scrollTop;return{top:b.top+v,left:b.left+_}}},{passive:!0})}),i.addEventListener("pointerup",function(f){if(r.isPointerPressed){if(r.isPointerPressed=!1,r.isPointerDragging){r.isPointerDragging=!1;return}var d=[f,r.pointerDownEvent];requestAnimationFrame(function(){if(f.button===0)if(r.hoverObj){var p=r["on".concat(r.hoverObj.type,"Click")];p&&p.apply(void 0,[r.hoverObj.d].concat(d))}else r.onBackgroundClick&&r.onBackgroundClick.apply(r,d);if(f.button===2)if(r.hoverObj){var m=r["on".concat(r.hoverObj.type,"RightClick")];m&&m.apply(void 0,[r.hoverObj.d].concat(d))}else r.onBackgroundRightClick&&r.onBackgroundRightClick.apply(r,d)})}},{passive:!0}),i.addEventListener("contextmenu",function(f){return!r.onBackgroundRightClick&&!r.onNodeRightClick&&!r.onLinkRightClick?!0:(f.preventDefault(),!1)}),r.forceGraph(s),r.shadowGraph(a);var u=VV(function(){ax(a,r.width,r.height),r.shadowGraph.linkWidth(function(d){return xe(r.linkWidth)(d)+r.linkHoverPrecision});var f=qt(r.canvas);r.shadowGraph.globalScale(f.k).tickFrame()},XW);r.flushShadowCanvas=u.flush,(this._animationCycle=function f(){var d=!r.autoPauseRedraw||!!r.needsRedraw||r.forceGraph.isEngineRunning()||r.graphData.links.some(function(w){return w.__photons&&w.__photons.length});if(r.needsRedraw=!1,r.enablePointerInteraction){var p=r.isPointerDragging?null:c();if(p!==r.hoverObj){var m=r.hoverObj,y=m?m.type:null,b=p?p.type:null;if(y&&y!==b){var _=r["on".concat(y,"Hover")];_&&_(null,m.d)}if(b){var v=r["on".concat(b,"Hover")];v&&v(p.d,y===b?m.d:null)}r.tooltip.content(p&&xe(r["".concat(p.type.toLowerCase(),"Label")])(p.d)||null),r.canvas.classList[(p&&r["on".concat(b,"Click")]||!p&&r.onBackgroundClick)&&xe(r.showPointerCursor)(p==null?void 0:p.d)?"add":"remove"]("clickable"),r.hoverObj=p}d&&u()}if(d){ax(s,r.width,r.height);var x=qt(r.canvas).k;r.onRenderFramePre&&r.onRenderFramePre(s,x),r.forceGraph.globalScale(x).tickFrame(),r.onRenderFramePost&&r.onRenderFramePost(s,x)}r.tweenGroup.update(),r.animationFrameRequestId=requestAnimationFrame(f)})()},update:function(n){}}),ak={exports:{}},tU="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",nU=tU,rU=nU;function lk(){}function ck(){}ck.resetWarningCache=lk;var oU=function(){function e(o,i,s,a,l,c){if(c!==rU){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function n(){return e}var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:n,element:e,elementType:e,instanceOf:n,node:e,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:ck,resetWarningCache:lk};return r.PropTypes=r,r};ak.exports=oU();var iU=ak.exports;const B=su(iU),od={width:B.number,height:B.number,graphData:B.shape({nodes:B.arrayOf(B.object).isRequired,links:B.arrayOf(B.object).isRequired}),backgroundColor:B.string,nodeRelSize:B.number,nodeId:B.string,nodeLabel:B.oneOfType([B.string,B.func]),nodeVal:B.oneOfType([B.number,B.string,B.func]),nodeVisibility:B.oneOfType([B.bool,B.string,B.func]),nodeColor:B.oneOfType([B.string,B.func]),nodeAutoColorBy:B.oneOfType([B.string,B.func]),onNodeHover:B.func,onNodeClick:B.func,linkSource:B.string,linkTarget:B.string,linkLabel:B.oneOfType([B.string,B.func]),linkVisibility:B.oneOfType([B.bool,B.string,B.func]),linkColor:B.oneOfType([B.string,B.func]),linkAutoColorBy:B.oneOfType([B.string,B.func]),linkWidth:B.oneOfType([B.number,B.string,B.func]),linkCurvature:B.oneOfType([B.number,B.string,B.func]),linkDirectionalArrowLength:B.oneOfType([B.number,B.string,B.func]),linkDirectionalArrowColor:B.oneOfType([B.string,B.func]),linkDirectionalArrowRelPos:B.oneOfType([B.number,B.string,B.func]),linkDirectionalParticles:B.oneOfType([B.number,B.string,B.func]),linkDirectionalParticleSpeed:B.oneOfType([B.number,B.string,B.func]),linkDirectionalParticleOffset:B.oneOfType([B.number,B.string,B.func]),linkDirectionalParticleWidth:B.oneOfType([B.number,B.string,B.func]),linkDirectionalParticleColor:B.oneOfType([B.string,B.func]),onLinkHover:B.func,onLinkClick:B.func,dagMode:B.oneOf(["td","bu","lr","rl","zin","zout","radialin","radialout"]),dagLevelDistance:B.number,dagNodeFilter:B.func,onDagError:B.func,d3AlphaMin:B.number,d3AlphaDecay:B.number,d3VelocityDecay:B.number,warmupTicks:B.number,cooldownTicks:B.number,cooldownTime:B.number,onEngineTick:B.func,onEngineStop:B.func,getGraphBbox:B.func},uk={zoomToFit:B.func,onNodeRightClick:B.func,onNodeDrag:B.func,onNodeDragEnd:B.func,onLinkRightClick:B.func,linkHoverPrecision:B.number,onBackgroundClick:B.func,onBackgroundRightClick:B.func,showPointerCursor:B.oneOfType([B.bool,B.func]),enablePointerInteraction:B.bool,enableNodeDrag:B.bool},wg={showNavInfo:B.bool,nodeOpacity:B.number,nodeResolution:B.number,nodeThreeObject:B.oneOfType([B.object,B.string,B.func]),nodeThreeObjectExtend:B.oneOfType([B.bool,B.string,B.func]),nodePositionUpdate:B.func,linkOpacity:B.number,linkResolution:B.number,linkCurveRotation:B.oneOfType([B.number,B.string,B.func]),linkMaterial:B.oneOfType([B.object,B.string,B.func]),linkThreeObject:B.oneOfType([B.object,B.string,B.func]),linkThreeObjectExtend:B.oneOfType([B.bool,B.string,B.func]),linkPositionUpdate:B.func,linkDirectionalArrowResolution:B.number,linkDirectionalParticleResolution:B.number,linkDirectionalParticleThreeObject:B.oneOfType([B.object,B.string,B.func]),forceEngine:B.oneOf(["d3","ngraph"]),ngraphPhysics:B.object,numDimensions:B.oneOf([1,2,3])},sU=Object.assign({},od,uk,{linkLineDash:B.oneOfType([B.arrayOf(B.number),B.string,B.func]),nodeCanvasObjectMode:B.oneOfType([B.string,B.func]),nodeCanvasObject:B.func,nodePointerAreaPaint:B.func,linkCanvasObjectMode:B.oneOfType([B.string,B.func]),linkCanvasObject:B.func,linkPointerAreaPaint:B.func,linkDirectionalParticleCanvasObject:B.func,autoPauseRedraw:B.bool,minZoom:B.number,maxZoom:B.number,enableZoomInteraction:B.oneOfType([B.bool,B.func]),enablePanInteraction:B.oneOfType([B.bool,B.func]),onZoom:B.func,onZoomEnd:B.func,onRenderFramePre:B.func,onRenderFramePost:B.func});Object.assign({},od,uk,wg,{enableNavigationControls:B.bool,controlType:B.oneOf(["trackball","orbit","fly"]),rendererConfig:B.object,extraRenderers:B.arrayOf(B.shape({render:B.func.isRequired}))});Object.assign({},od,wg,{nodeDesc:B.oneOfType([B.string,B.func]),linkDesc:B.oneOfType([B.string,B.func])});Object.assign({},od,wg,{markerAttrs:B.object,yOffset:B.number,glScale:B.number});const bg=jz(eU,{methodNames:["emitParticle","d3Force","d3ReheatSimulation","stopAnimation","pauseAnimation","resumeAnimation","centerAt","zoom","zoomToFit","getGraphBbox","screen2GraphCoords","graph2ScreenCoords"]});bg.displayName="ForceGraph2D";bg.propTypes=sU;const ls={ui:"#60a5fa",api:"#34d399",db:"#f59e0b"},aU="rgba(244, 114, 182, 0.6)",lU="rgba(148, 163, 184, 0.25)";function cU(){const[e,n]=h.useState(null),[r,o]=h.useState(null),[i,s]=h.useState(!0),[a,l]=h.useState(!1),[c,u]=h.useState(new Set(["ui","api","db"])),[f,d]=h.useState(null),p=h.useRef(null),[m,y]=h.useState({width:0,height:0}),b=(x=!1)=>{x?l(!0):s(!0),o(null),fetch(`/api/project-graph${x?"?regenerate=1":""}`).then(w=>w.json()).then(w=>{"error"in w?o(w.error):n(w)}).catch(w=>o(String(w))).finally(()=>{s(!1),l(!1)})};h.useEffect(()=>{b(!1)},[]),h.useEffect(()=>{if(!p.current)return;const x=p.current,w=()=>y({width:x.clientWidth,height:x.clientHeight});w();const S=new ResizeObserver(w);return S.observe(x),()=>S.disconnect()},[e]);const _=h.useMemo(()=>{if(!e)return{nodes:[],links:[]};const x=e.nodes.filter(C=>c.has(C.layer)),w=new Set(x.map(C=>C.id)),S=e.links.filter(C=>{const E=typeof C.source=="string"?C.source:C.source.id,k=typeof C.target=="string"?C.target:C.target.id;return w.has(E)&&w.has(k)});return{nodes:x,links:S}},[e,c]),v=x=>{const w=new Set(c);w.has(x)?w.delete(x):w.add(x),w.size!==0&&u(w)};return g.jsxs("div",{className:"flex h-full flex-col",children:[g.jsxs("div",{className:"flex flex-wrap items-center gap-3 border-b border-sidebar-border px-6 py-3",children:[g.jsx("h1",{className:"text-lg font-semibold",children:"Project Graph"}),e&&g.jsxs("span",{className:"text-xs text-muted-foreground",children:[_.nodes.length," nodes · ",_.links.length," links"]}),g.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[["ui","api","db"].map(x=>g.jsxs("button",{type:"button",onClick:()=>v(x),className:"flex items-center gap-1.5 rounded-md border border-sidebar-border px-2.5 py-1 text-xs transition-opacity",style:{opacity:c.has(x)?1:.4,borderColor:c.has(x)?ls[x]:void 0},children:[g.jsx("span",{className:"h-2 w-2 rounded-full",style:{backgroundColor:ls[x]}}),x.toUpperCase(),e&&` (${e.stats.byLayer[x]})`]},x)),g.jsx("button",{type:"button",onClick:()=>b(!0),disabled:a||i,className:"rounded-md border border-sidebar-border px-2.5 py-1 text-xs hover:bg-sidebar-accent disabled:opacity-50",children:a?"Regenerating…":"Regenerate"})]})]}),g.jsxs("div",{ref:p,className:"relative flex-1 overflow-hidden",children:[i&&g.jsx("div",{className:"absolute inset-0 flex items-center justify-center text-muted-foreground",children:"Loading graph…"}),r&&g.jsx("div",{className:"absolute inset-0 flex items-center justify-center text-destructive",children:r}),e&&m.width>0&&g.jsx(bg,{width:m.width,height:m.height,graphData:_,nodeId:"id",nodeLabel:x=>`${x.layer}/${x.type}: ${x.name}`,nodeRelSize:3,nodeColor:x=>ls[x.layer],linkColor:x=>x.cross?aU:lU,linkWidth:x=>x.cross?1:.5,linkDirectionalParticles:0,cooldownTicks:120,onNodeHover:x=>d(x),backgroundColor:"transparent",nodeCanvasObjectMode:()=>"after",nodeCanvasObject:(x,w,S)=>{if(S<1.4||x.x===void 0||x.y===void 0)return;const C=x.name,E=11/S;w.font=`${E}px -apple-system, system-ui, sans-serif`;const k=w.measureText(C).width,N=3/S,M=1.5/S;w.fillStyle="rgba(15, 15, 20, 0.75)",w.fillRect(x.x-k/2-N,x.y+5/S-M,k+N*2,E+M*2),w.textAlign="center",w.textBaseline="top",w.fillStyle=ls[x.layer],w.fillText(C,x.x,x.y+5/S)}}),f&&g.jsxs("div",{className:"pointer-events-none absolute bottom-4 left-4 max-w-md rounded-lg border border-sidebar-border bg-background/90 px-3 py-2 text-xs shadow-lg backdrop-blur",children:[g.jsxs("div",{className:"font-semibold",style:{color:ls[f.layer]},children:[f.layer.toUpperCase()," · ",f.type]}),g.jsx("div",{className:"font-mono",children:f.name}),g.jsx("div",{className:"text-muted-foreground",children:f.path}),f.module&&g.jsxs("div",{className:"text-muted-foreground",children:["module: ",f.module]})]})]})]})}function Bn(e){var n;return((n=e.tags)==null?void 0:n.module)??e.module??null}function _g(e){var n;return(n=e.tags)!=null&&n.screen?e.tags.screen==="true":e.type==="page"||e.type==="layout"}function la(e){return e.split(/[-_]/).map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join(" ")}function Ir(e){if(e.route){const n=e.route.split("/").filter(Boolean).filter(r=>!r.startsWith("(")&&!r.startsWith(":")&&!r.startsWith("["));return n.length>0?n[n.length-1].split(/[-_]/).map(o=>o.charAt(0).toUpperCase()+o.slice(1)).join(" "):"Home"}return e.name}const uU=new Set(["lib","db","config","external","middleware","server-lib","services","mcp","layout","shared-ui"]);function dU(){const[e,n]=h.useState(null),[r,o]=h.useState("loading"),[i,s]=h.useState(null),[a,l]=h.useState(!1),c=h.useCallback(async()=>{try{const p=await fetch("/api/raw-graphs");if(!p.ok)throw new Error(`HTTP ${p.status}`);const m=await p.json();n(m);const y=!!(m.ui||m.api||m.db);o(y?"ready":"empty")}catch(p){s(String(p)),o("error")}},[]);h.useEffect(()=>{c()},[c]);const u=h.useCallback(async()=>{l(!0),s(null);try{const p=await fetch("/api/generate-graph",{method:"POST"});if(!p.ok)throw new Error(`HTTP ${p.status}`);const m=await p.json();if(!m.ok)throw new Error(m.error??"Generation failed");n({ui:m.ui,api:m.api,db:m.db});const y=!!(m.ui||m.api||m.db);o(y?"ready":"empty")}catch(p){s(String(p))}finally{l(!1)}},[]),{moduleBuckets:f,counts:d}=h.useMemo(()=>{if(!(e!=null&&e.ui)||!(e!=null&&e.api)||!(e!=null&&e.db))return{moduleBuckets:[],counts:null};const p=e.ui.nodes.filter(v=>_g(v)&&Bn(v)&&!uU.has(Bn(v))),m=new Map;for(const v of p){const x=Bn(v);m.has(x)||m.set(x,[]),m.get(x).push(v)}const y=[],b=new Map;for(const[v,x]of m)x.length===1?y.push(...x):b.set(v,x);const _=[...b.entries()].map(([v,x])=>({module:v,screens:x})).sort((v,x)=>x.screens.length-v.screens.length);return y.length>0&&_.push({module:"misc",screens:y}),{moduleBuckets:_,counts:{screens:p.length,modules:_.length,endpoints:e.api.nodes.length,tables:e.db.nodes.length,components:e.ui.nodes.filter(v=>v.type==="component").length}}},[e]);return r==="loading"?g.jsx("div",{className:"flex h-full items-center justify-center",children:g.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading overview…"})}):r==="empty"?g.jsx(fU,{onGenerate:u,busy:a,error:i}):r==="error"?g.jsx("div",{className:"flex h-full items-center justify-center p-8",children:g.jsxs("div",{className:"max-w-md text-center",children:[g.jsx("p",{className:"text-sm text-foreground",children:"Failed to load graph"}),g.jsx("p",{className:"mt-2 text-xs text-muted-foreground",children:i}),g.jsx("button",{type:"button",onClick:c,className:"mt-4 rounded-md border border-sidebar-border px-3 py-1.5 text-xs text-foreground hover:bg-sidebar-accent",children:"Retry"})]})}):d?g.jsx("div",{className:"h-full overflow-y-auto",children:g.jsxs("div",{className:"mx-auto max-w-6xl px-8 py-8",children:[g.jsxs("header",{className:"mb-8 flex items-start justify-between gap-4",children:[g.jsxs("div",{children:[g.jsx("h1",{className:"text-2xl font-semibold text-foreground",children:"Project Overview"}),g.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"A high-level map of the modules, screens, and systems in this project."})]}),g.jsxs("button",{type:"button",onClick:u,disabled:a,className:"flex shrink-0 items-center gap-1.5 rounded-md border border-sidebar-border px-3 py-1.5 text-xs text-muted-foreground transition-colors hover:bg-sidebar-accent hover:text-foreground disabled:cursor-not-allowed disabled:opacity-60",children:[g.jsx(r_,{className:`h-3 w-3 ${a?"animate-spin":""}`}),a?"Regenerating…":"Regenerate graph"]})]}),i&&g.jsx("div",{className:"mb-4 rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-xs text-destructive",children:i}),g.jsxs("div",{className:"mb-8 grid grid-cols-2 gap-3 md:grid-cols-4",children:[g.jsx(bl,{icon:g.jsx(gm,{className:"h-4 w-4"}),label:"Modules",value:d.modules}),g.jsx(bl,{icon:g.jsx(xa,{className:"h-4 w-4"}),label:"Screens",value:d.screens}),g.jsx(bl,{icon:g.jsx(wm,{className:"h-4 w-4"}),label:"API endpoints",value:d.endpoints}),g.jsx(bl,{icon:g.jsx(xm,{className:"h-4 w-4"}),label:"Database tables",value:d.tables})]}),g.jsxs("section",{children:[g.jsx("h2",{className:"mb-3 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Capability map"}),g.jsx("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-3",children:f.map(p=>g.jsx(pU,{module:p.module,screens:p.screens},p.module))})]})]})}):null}function fU({onGenerate:e,busy:n,error:r}){return g.jsx("div",{className:"flex h-full items-center justify-center p-8",children:g.jsxs("div",{className:"max-w-md text-center",children:[g.jsx("div",{className:"mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-sidebar-primary/15 text-sidebar-primary",children:g.jsx(PT,{className:"h-6 w-6"})}),g.jsx("h2",{className:"mt-4 text-lg font-semibold text-foreground",children:"No graph yet"}),g.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"LaunchChart hasn't generated a project graph for this workspace. Generate one to see modules, screens, API endpoints, and database tables."}),g.jsxs("button",{type:"button",onClick:e,disabled:n,className:"mt-6 inline-flex items-center gap-2 rounded-md bg-sidebar-primary px-4 py-2 text-sm font-medium text-white shadow-sm transition-colors hover:bg-sidebar-primary/90 disabled:cursor-not-allowed disabled:opacity-60",children:[g.jsx(r_,{className:`h-4 w-4 ${n?"animate-spin":""}`}),n?"Generating…":"Generate graph"]}),g.jsx("p",{className:"mt-3 text-[11px] text-muted-foreground",children:"This scans your source tree — takes a few seconds."}),r&&g.jsx("div",{className:"mt-4 rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-xs text-destructive",children:r})]})})}function bl({icon:e,label:n,value:r}){return g.jsxs("div",{className:"rounded-lg border border-sidebar-border bg-background/40 px-4 py-3",children:[g.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[e,g.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider",children:n})]}),g.jsx("p",{className:"mt-1 text-2xl font-semibold tabular-nums text-foreground",children:r})]})}function pU({module:e,screens:n}){const r=n.slice(0,6),o=n.length-r.length;return g.jsxs("div",{className:"rounded-lg border border-sidebar-border bg-background/40 p-5 transition-colors hover:border-sidebar-primary/50",children:[g.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[g.jsx("h3",{className:"text-base font-semibold text-foreground",children:la(e)}),g.jsxs("span",{className:"rounded bg-sidebar-accent px-2 py-0.5 text-[10px] font-medium tabular-nums text-muted-foreground",children:[n.length," screens"]})]}),g.jsxs("ul",{className:"space-y-1",children:[r.map(i=>g.jsxs("li",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[g.jsx("span",{className:"h-1 w-1 shrink-0 rounded-full bg-sidebar-primary/60"}),g.jsx("span",{className:"truncate text-foreground/90",children:Ir(i)})]},i.id)),o>0&&g.jsxs("li",{className:"pl-3 pt-1 text-[11px] italic text-muted-foreground",children:["+",o," more"]})]})]})}function ze(e){if(typeof e=="string"||typeof e=="number")return""+e;let n="";if(Array.isArray(e))for(let r=0,o;r<e.length;r++)(o=ze(e[r]))!==""&&(n+=(n&&" ")+o);else for(let r in e)e[r]&&(n+=(n&&" ")+r);return n}const En={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:n,sourceHandle:r,targetHandle:o})=>`Couldn't create edge for ${e} handle id: "${e==="source"?r:o}", edge id: ${n}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs."},ca=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],dk=["Enter"," ","Escape"],fk={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:n,y:r})=>`Moved selected node ${e}. New position, x: ${n}, y: ${r}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var Ci;(function(e){e.Strict="strict",e.Loose="loose"})(Ci||(Ci={}));var io;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(io||(io={}));var ua;(function(e){e.Partial="partial",e.Full="full"})(ua||(ua={}));const pk={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var hr;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(hr||(hr={}));var eu;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(eu||(eu={}));var le;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(le||(le={}));const lx={[le.Left]:le.Right,[le.Right]:le.Left,[le.Top]:le.Bottom,[le.Bottom]:le.Top};function hk(e){return e===null?null:e?"valid":"invalid"}const mk=e=>"id"in e&&"source"in e&&"target"in e,hU=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),Sg=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),Da=(e,n=[0,0])=>{const{width:r,height:o}=Jn(e),i=e.origin??n,s=r*i[0],a=o*i[1];return{x:e.position.x-s,y:e.position.y-a}},mU=(e,n={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const r=e.reduce((o,i)=>{const s=typeof i=="string";let a=!n.nodeLookup&&!s?i:void 0;n.nodeLookup&&(a=s?n.nodeLookup.get(i):Sg(i)?i:n.nodeLookup.get(i.id));const l=a?tu(a,n.nodeOrigin):{x:0,y:0,x2:0,y2:0};return id(o,l)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return sd(r)},La=(e,n={})=>{let r={x:1/0,y:1/0,x2:-1/0,y2:-1/0},o=!1;return e.forEach(i=>{(n.filter===void 0||n.filter(i))&&(r=id(r,tu(i)),o=!0)}),o?sd(r):{x:0,y:0,width:0,height:0}},Cg=(e,n,[r,o,i]=[0,0,1],s=!1,a=!1)=>{const l={...Fa(n,[r,o,i]),width:n.width/i,height:n.height/i},c=[];for(const u of e.values()){const{measured:f,selectable:d=!0,hidden:p=!1}=u;if(a&&!d||p)continue;const m=f.width??u.width??u.initialWidth??null,y=f.height??u.height??u.initialHeight??null,b=da(l,ki(u)),_=(m??0)*(y??0),v=s&&b>0;(!u.internals.handleBounds||v||b>=_||u.dragging)&&c.push(u)}return c},gU=(e,n)=>{const r=new Set;return e.forEach(o=>{r.add(o.id)}),n.filter(o=>r.has(o.source)||r.has(o.target))};function yU(e,n){const r=new Map,o=n!=null&&n.nodes?new Set(n.nodes.map(i=>i.id)):null;return e.forEach(i=>{i.measured.width&&i.measured.height&&((n==null?void 0:n.includeHiddenNodes)||!i.hidden)&&(!o||o.has(i.id))&&r.set(i.id,i)}),r}async function vU({nodes:e,width:n,height:r,panZoom:o,minZoom:i,maxZoom:s},a){if(e.size===0)return Promise.resolve(!0);const l=yU(e,a),c=La(l),u=Eg(c,n,r,(a==null?void 0:a.minZoom)??i,(a==null?void 0:a.maxZoom)??s,(a==null?void 0:a.padding)??.1);return await o.setViewport(u,{duration:a==null?void 0:a.duration,ease:a==null?void 0:a.ease,interpolate:a==null?void 0:a.interpolate}),Promise.resolve(!0)}function gk({nodeId:e,nextPosition:n,nodeLookup:r,nodeOrigin:o=[0,0],nodeExtent:i,onError:s}){const a=r.get(e),l=a.parentId?r.get(a.parentId):void 0,{x:c,y:u}=l?l.internals.positionAbsolute:{x:0,y:0},f=a.origin??o;let d=a.extent||i;if(a.extent==="parent"&&!a.expandParent)if(!l)s==null||s("005",En.error005());else{const m=l.measured.width,y=l.measured.height;m&&y&&(d=[[c,u],[c+m,u+y]])}else l&&Ni(a.extent)&&(d=[[a.extent[0][0]+c,a.extent[0][1]+u],[a.extent[1][0]+c,a.extent[1][1]+u]]);const p=Ni(d)?vo(n,d,a.measured):n;return(a.measured.width===void 0||a.measured.height===void 0)&&(s==null||s("015",En.error015())),{position:{x:p.x-c+(a.measured.width??0)*f[0],y:p.y-u+(a.measured.height??0)*f[1]},positionAbsolute:p}}async function xU({nodesToRemove:e=[],edgesToRemove:n=[],nodes:r,edges:o,onBeforeDelete:i}){const s=new Set(e.map(p=>p.id)),a=[];for(const p of r){if(p.deletable===!1)continue;const m=s.has(p.id),y=!m&&p.parentId&&a.find(b=>b.id===p.parentId);(m||y)&&a.push(p)}const l=new Set(n.map(p=>p.id)),c=o.filter(p=>p.deletable!==!1),f=gU(a,c);for(const p of c)l.has(p.id)&&!f.find(y=>y.id===p.id)&&f.push(p);if(!i)return{edges:f,nodes:a};const d=await i({nodes:a,edges:f});return typeof d=="boolean"?d?{edges:f,nodes:a}:{edges:[],nodes:[]}:d}const Ei=(e,n=0,r=1)=>Math.min(Math.max(e,n),r),vo=(e={x:0,y:0},n,r)=>({x:Ei(e.x,n[0][0],n[1][0]-((r==null?void 0:r.width)??0)),y:Ei(e.y,n[0][1],n[1][1]-((r==null?void 0:r.height)??0))});function yk(e,n,r){const{width:o,height:i}=Jn(r),{x:s,y:a}=r.internals.positionAbsolute;return vo(e,[[s,a],[s+o,a+i]],n)}const cx=(e,n,r)=>e<n?Ei(Math.abs(e-n),1,n)/n:e>r?-Ei(Math.abs(e-r),1,n)/n:0,vk=(e,n,r=15,o=40)=>{const i=cx(e.x,o,n.width-o)*r,s=cx(e.y,o,n.height-o)*r;return[i,s]},id=(e,n)=>({x:Math.min(e.x,n.x),y:Math.min(e.y,n.y),x2:Math.max(e.x2,n.x2),y2:Math.max(e.y2,n.y2)}),sh=({x:e,y:n,width:r,height:o})=>({x:e,y:n,x2:e+r,y2:n+o}),sd=({x:e,y:n,x2:r,y2:o})=>({x:e,y:n,width:r-e,height:o-n}),ki=(e,n=[0,0])=>{var i,s;const{x:r,y:o}=Sg(e)?e.internals.positionAbsolute:Da(e,n);return{x:r,y:o,width:((i=e.measured)==null?void 0:i.width)??e.width??e.initialWidth??0,height:((s=e.measured)==null?void 0:s.height)??e.height??e.initialHeight??0}},tu=(e,n=[0,0])=>{var i,s;const{x:r,y:o}=Sg(e)?e.internals.positionAbsolute:Da(e,n);return{x:r,y:o,x2:r+(((i=e.measured)==null?void 0:i.width)??e.width??e.initialWidth??0),y2:o+(((s=e.measured)==null?void 0:s.height)??e.height??e.initialHeight??0)}},xk=(e,n)=>sd(id(sh(e),sh(n))),da=(e,n)=>{const r=Math.max(0,Math.min(e.x+e.width,n.x+n.width)-Math.max(e.x,n.x)),o=Math.max(0,Math.min(e.y+e.height,n.y+n.height)-Math.max(e.y,n.y));return Math.ceil(r*o)},ux=e=>tn(e.width)&&tn(e.height)&&tn(e.x)&&tn(e.y),tn=e=>!isNaN(e)&&isFinite(e),wU=(e,n)=>{},za=(e,n=[1,1])=>({x:n[0]*Math.round(e.x/n[0]),y:n[1]*Math.round(e.y/n[1])}),Fa=({x:e,y:n},[r,o,i],s=!1,a=[1,1])=>{const l={x:(e-r)/i,y:(n-o)/i};return s?za(l,a):l},nu=({x:e,y:n},[r,o,i])=>({x:e*i+r,y:n*i+o});function To(e,n){if(typeof e=="number")return Math.floor((n-n/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const r=parseFloat(e);if(!Number.isNaN(r))return Math.floor(r)}if(typeof e=="string"&&e.endsWith("%")){const r=parseFloat(e);if(!Number.isNaN(r))return Math.floor(n*r*.01)}return console.error(`[React Flow] The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function bU(e,n,r){if(typeof e=="string"||typeof e=="number"){const o=To(e,r),i=To(e,n);return{top:o,right:i,bottom:o,left:i,x:i*2,y:o*2}}if(typeof e=="object"){const o=To(e.top??e.y??0,r),i=To(e.bottom??e.y??0,r),s=To(e.left??e.x??0,n),a=To(e.right??e.x??0,n);return{top:o,right:a,bottom:i,left:s,x:s+a,y:o+i}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function _U(e,n,r,o,i,s){const{x:a,y:l}=nu(e,[n,r,o]),{x:c,y:u}=nu({x:e.x+e.width,y:e.y+e.height},[n,r,o]),f=i-c,d=s-u;return{left:Math.floor(a),top:Math.floor(l),right:Math.floor(f),bottom:Math.floor(d)}}const Eg=(e,n,r,o,i,s)=>{const a=bU(s,n,r),l=(n-a.x)/e.width,c=(r-a.y)/e.height,u=Math.min(l,c),f=Ei(u,o,i),d=e.x+e.width/2,p=e.y+e.height/2,m=n/2-d*f,y=r/2-p*f,b=_U(e,m,y,f,n,r),_={left:Math.min(b.left-a.left,0),top:Math.min(b.top-a.top,0),right:Math.min(b.right-a.right,0),bottom:Math.min(b.bottom-a.bottom,0)};return{x:m-_.left+_.right,y:y-_.top+_.bottom,zoom:f}},fa=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function Ni(e){return e!=null&&e!=="parent"}function Jn(e){var n,r;return{width:((n=e.measured)==null?void 0:n.width)??e.width??e.initialWidth??0,height:((r=e.measured)==null?void 0:r.height)??e.height??e.initialHeight??0}}function wk(e){var n,r;return(((n=e.measured)==null?void 0:n.width)??e.width??e.initialWidth)!==void 0&&(((r=e.measured)==null?void 0:r.height)??e.height??e.initialHeight)!==void 0}function bk(e,n={width:0,height:0},r,o,i){const s={...e},a=o.get(r);if(a){const l=a.origin||i;s.x+=a.internals.positionAbsolute.x-(n.width??0)*l[0],s.y+=a.internals.positionAbsolute.y-(n.height??0)*l[1]}return s}function dx(e,n){if(e.size!==n.size)return!1;for(const r of e)if(!n.has(r))return!1;return!0}function SU(){let e,n;return{promise:new Promise((o,i)=>{e=o,n=i}),resolve:e,reject:n}}function CU(e){return{...fk,...e||{}}}function Ts(e,{snapGrid:n=[0,0],snapToGrid:r=!1,transform:o,containerBounds:i}){const{x:s,y:a}=nn(e),l=Fa({x:s-((i==null?void 0:i.left)??0),y:a-((i==null?void 0:i.top)??0)},o),{x:c,y:u}=r?za(l,n):l;return{xSnapped:c,ySnapped:u,...l}}const kg=e=>({width:e.offsetWidth,height:e.offsetHeight}),_k=e=>{var n;return((n=e==null?void 0:e.getRootNode)==null?void 0:n.call(e))||(window==null?void 0:window.document)},EU=["INPUT","SELECT","TEXTAREA"];function Sk(e){var o,i;const n=((i=(o=e.composedPath)==null?void 0:o.call(e))==null?void 0:i[0])||e.target;return(n==null?void 0:n.nodeType)!==1?!1:EU.includes(n.nodeName)||n.hasAttribute("contenteditable")||!!n.closest(".nokey")}const Ck=e=>"clientX"in e,nn=(e,n)=>{var s,a;const r=Ck(e),o=r?e.clientX:(s=e.touches)==null?void 0:s[0].clientX,i=r?e.clientY:(a=e.touches)==null?void 0:a[0].clientY;return{x:o-((n==null?void 0:n.left)??0),y:i-((n==null?void 0:n.top)??0)}},fx=(e,n,r,o,i)=>{const s=n.querySelectorAll(`.${e}`);return!s||!s.length?null:Array.from(s).map(a=>{const l=a.getBoundingClientRect();return{id:a.getAttribute("data-handleid"),type:e,nodeId:i,position:a.getAttribute("data-handlepos"),x:(l.left-r.left)/o,y:(l.top-r.top)/o,...kg(a)}})};function Ek({sourceX:e,sourceY:n,targetX:r,targetY:o,sourceControlX:i,sourceControlY:s,targetControlX:a,targetControlY:l}){const c=e*.125+i*.375+a*.375+r*.125,u=n*.125+s*.375+l*.375+o*.125,f=Math.abs(c-e),d=Math.abs(u-n);return[c,u,f,d]}function _l(e,n){return e>=0?.5*e:n*25*Math.sqrt(-e)}function px({pos:e,x1:n,y1:r,x2:o,y2:i,c:s}){switch(e){case le.Left:return[n-_l(n-o,s),r];case le.Right:return[n+_l(o-n,s),r];case le.Top:return[n,r-_l(r-i,s)];case le.Bottom:return[n,r+_l(i-r,s)]}}function kk({sourceX:e,sourceY:n,sourcePosition:r=le.Bottom,targetX:o,targetY:i,targetPosition:s=le.Top,curvature:a=.25}){const[l,c]=px({pos:r,x1:e,y1:n,x2:o,y2:i,c:a}),[u,f]=px({pos:s,x1:o,y1:i,x2:e,y2:n,c:a}),[d,p,m,y]=Ek({sourceX:e,sourceY:n,targetX:o,targetY:i,sourceControlX:l,sourceControlY:c,targetControlX:u,targetControlY:f});return[`M${e},${n} C${l},${c} ${u},${f} ${o},${i}`,d,p,m,y]}function Nk({sourceX:e,sourceY:n,targetX:r,targetY:o}){const i=Math.abs(r-e)/2,s=r<e?r+i:r-i,a=Math.abs(o-n)/2,l=o<n?o+a:o-a;return[s,l,i,a]}function kU({sourceNode:e,targetNode:n,selected:r=!1,zIndex:o=0,elevateOnSelect:i=!1,zIndexMode:s="basic"}){if(s==="manual")return o;const a=i&&r?o+1e3:o,l=Math.max(e.parentId||i&&e.selected?e.internals.z:0,n.parentId||i&&n.selected?n.internals.z:0);return a+l}function NU({sourceNode:e,targetNode:n,width:r,height:o,transform:i}){const s=id(tu(e),tu(n));s.x===s.x2&&(s.x2+=1),s.y===s.y2&&(s.y2+=1);const a={x:-i[0]/i[2],y:-i[1]/i[2],width:r/i[2],height:o/i[2]};return da(a,sd(s))>0}const PU=({source:e,sourceHandle:n,target:r,targetHandle:o})=>`xy-edge__${e}${n||""}-${r}${o||""}`,MU=(e,n)=>n.some(r=>r.source===e.source&&r.target===e.target&&(r.sourceHandle===e.sourceHandle||!r.sourceHandle&&!e.sourceHandle)&&(r.targetHandle===e.targetHandle||!r.targetHandle&&!e.targetHandle)),RU=(e,n,r={})=>{if(!e.source||!e.target)return n;const o=r.getEdgeId||PU;let i;return mk(e)?i={...e}:i={...e,id:o(e)},MU(i,n)?n:(i.sourceHandle===null&&delete i.sourceHandle,i.targetHandle===null&&delete i.targetHandle,n.concat(i))};function Pk({sourceX:e,sourceY:n,targetX:r,targetY:o}){const[i,s,a,l]=Nk({sourceX:e,sourceY:n,targetX:r,targetY:o});return[`M ${e},${n}L ${r},${o}`,i,s,a,l]}const hx={[le.Left]:{x:-1,y:0},[le.Right]:{x:1,y:0},[le.Top]:{x:0,y:-1},[le.Bottom]:{x:0,y:1}},jU=({source:e,sourcePosition:n=le.Bottom,target:r})=>n===le.Left||n===le.Right?e.x<r.x?{x:1,y:0}:{x:-1,y:0}:e.y<r.y?{x:0,y:1}:{x:0,y:-1},mx=(e,n)=>Math.sqrt(Math.pow(n.x-e.x,2)+Math.pow(n.y-e.y,2));function AU({source:e,sourcePosition:n=le.Bottom,target:r,targetPosition:o=le.Top,center:i,offset:s,stepPosition:a}){const l=hx[n],c=hx[o],u={x:e.x+l.x*s,y:e.y+l.y*s},f={x:r.x+c.x*s,y:r.y+c.y*s},d=jU({source:u,sourcePosition:n,target:f}),p=d.x!==0?"x":"y",m=d[p];let y=[],b,_;const v={x:0,y:0},x={x:0,y:0},[,,w,S]=Nk({sourceX:e.x,sourceY:e.y,targetX:r.x,targetY:r.y});if(l[p]*c[p]===-1){p==="x"?(b=i.x??u.x+(f.x-u.x)*a,_=i.y??(u.y+f.y)/2):(b=i.x??(u.x+f.x)/2,_=i.y??u.y+(f.y-u.y)*a);const N=[{x:b,y:u.y},{x:b,y:f.y}],M=[{x:u.x,y:_},{x:f.x,y:_}];l[p]===m?y=p==="x"?N:M:y=p==="x"?M:N}else{const N=[{x:u.x,y:f.y}],M=[{x:f.x,y:u.y}];if(p==="x"?y=l.x===m?M:N:y=l.y===m?N:M,n===o){const P=Math.abs(e[p]-r[p]);if(P<=s){const L=Math.min(s-1,s-P);l[p]===m?v[p]=(u[p]>e[p]?-1:1)*L:x[p]=(f[p]>r[p]?-1:1)*L}}if(n!==o){const P=p==="x"?"y":"x",L=l[p]===c[P],I=u[P]>f[P],F=u[P]<f[P];(l[p]===1&&(!L&&I||L&&F)||l[p]!==1&&(!L&&F||L&&I))&&(y=p==="x"?N:M)}const T={x:u.x+v.x,y:u.y+v.y},A={x:f.x+x.x,y:f.y+x.y},D=Math.max(Math.abs(T.x-y[0].x),Math.abs(A.x-y[0].x)),V=Math.max(Math.abs(T.y-y[0].y),Math.abs(A.y-y[0].y));D>=V?(b=(T.x+A.x)/2,_=y[0].y):(b=y[0].x,_=(T.y+A.y)/2)}const C={x:u.x+v.x,y:u.y+v.y},E={x:f.x+x.x,y:f.y+x.y};return[[e,...C.x!==y[0].x||C.y!==y[0].y?[C]:[],...y,...E.x!==y[y.length-1].x||E.y!==y[y.length-1].y?[E]:[],r],b,_,w,S]}function TU(e,n,r,o){const i=Math.min(mx(e,n)/2,mx(n,r)/2,o),{x:s,y:a}=n;if(e.x===s&&s===r.x||e.y===a&&a===r.y)return`L${s} ${a}`;if(e.y===a){const u=e.x<r.x?-1:1,f=e.y<r.y?1:-1;return`L ${s+i*u},${a}Q ${s},${a} ${s},${a+i*f}`}const l=e.x<r.x?1:-1,c=e.y<r.y?-1:1;return`L ${s},${a+i*c}Q ${s},${a} ${s+i*l},${a}`}function ah({sourceX:e,sourceY:n,sourcePosition:r=le.Bottom,targetX:o,targetY:i,targetPosition:s=le.Top,borderRadius:a=5,centerX:l,centerY:c,offset:u=20,stepPosition:f=.5}){const[d,p,m,y,b]=AU({source:{x:e,y:n},sourcePosition:r,target:{x:o,y:i},targetPosition:s,center:{x:l,y:c},offset:u,stepPosition:f});let _=`M${d[0].x} ${d[0].y}`;for(let v=1;v<d.length-1;v++)_+=TU(d[v-1],d[v],d[v+1],a);return _+=`L${d[d.length-1].x} ${d[d.length-1].y}`,[_,p,m,y,b]}function gx(e){var n;return e&&!!(e.internals.handleBounds||(n=e.handles)!=null&&n.length)&&!!(e.measured.width||e.width||e.initialWidth)}function IU(e){var d;const{sourceNode:n,targetNode:r}=e;if(!gx(n)||!gx(r))return null;const o=n.internals.handleBounds||yx(n.handles),i=r.internals.handleBounds||yx(r.handles),s=vx((o==null?void 0:o.source)??[],e.sourceHandle),a=vx(e.connectionMode===Ci.Strict?(i==null?void 0:i.target)??[]:((i==null?void 0:i.target)??[]).concat((i==null?void 0:i.source)??[]),e.targetHandle);if(!s||!a)return(d=e.onError)==null||d.call(e,"008",En.error008(s?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const l=(s==null?void 0:s.position)||le.Bottom,c=(a==null?void 0:a.position)||le.Top,u=xo(n,s,l),f=xo(r,a,c);return{sourceX:u.x,sourceY:u.y,targetX:f.x,targetY:f.y,sourcePosition:l,targetPosition:c}}function yx(e){if(!e)return null;const n=[],r=[];for(const o of e)o.width=o.width??1,o.height=o.height??1,o.type==="source"?n.push(o):o.type==="target"&&r.push(o);return{source:n,target:r}}function xo(e,n,r=le.Left,o=!1){const i=((n==null?void 0:n.x)??0)+e.internals.positionAbsolute.x,s=((n==null?void 0:n.y)??0)+e.internals.positionAbsolute.y,{width:a,height:l}=n??Jn(e);if(o)return{x:i+a/2,y:s+l/2};switch((n==null?void 0:n.position)??r){case le.Top:return{x:i+a/2,y:s};case le.Right:return{x:i+a,y:s+l/2};case le.Bottom:return{x:i+a/2,y:s+l};case le.Left:return{x:i,y:s+l/2}}}function vx(e,n){return e&&(n?e.find(r=>r.id===n):e[0])||null}function lh(e,n){return e?typeof e=="string"?e:`${n?`${n}__`:""}${Object.keys(e).sort().map(o=>`${o}=${e[o]}`).join("&")}`:""}function $U(e,{id:n,defaultColor:r,defaultMarkerStart:o,defaultMarkerEnd:i}){const s=new Set;return e.reduce((a,l)=>([l.markerStart||o,l.markerEnd||i].forEach(c=>{if(c&&typeof c=="object"){const u=lh(c,n);s.has(u)||(a.push({id:u,color:c.color||r,...c}),s.add(u))}}),a),[]).sort((a,l)=>a.id.localeCompare(l.id))}const Mk=1e3,OU=10,Ng={nodeOrigin:[0,0],nodeExtent:ca,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},DU={...Ng,checkEquality:!0};function Pg(e,n){const r={...e};for(const o in n)n[o]!==void 0&&(r[o]=n[o]);return r}function LU(e,n,r){const o=Pg(Ng,r);for(const i of e.values())if(i.parentId)Rg(i,e,n,o);else{const s=Da(i,o.nodeOrigin),a=Ni(i.extent)?i.extent:o.nodeExtent,l=vo(s,a,Jn(i));i.internals.positionAbsolute=l}}function zU(e,n){if(!e.handles)return e.measured?n==null?void 0:n.internals.handleBounds:void 0;const r=[],o=[];for(const i of e.handles){const s={id:i.id,width:i.width??1,height:i.height??1,nodeId:e.id,x:i.x,y:i.y,position:i.position,type:i.type};i.type==="source"?r.push(s):i.type==="target"&&o.push(s)}return{source:r,target:o}}function Mg(e){return e==="manual"}function ch(e,n,r,o={}){var f,d;const i=Pg(DU,o),s={i:0},a=new Map(n),l=i!=null&&i.elevateNodesOnSelect&&!Mg(i.zIndexMode)?Mk:0;let c=e.length>0,u=!1;n.clear(),r.clear();for(const p of e){let m=a.get(p.id);if(i.checkEquality&&p===(m==null?void 0:m.internals.userNode))n.set(p.id,m);else{const y=Da(p,i.nodeOrigin),b=Ni(p.extent)?p.extent:i.nodeExtent,_=vo(y,b,Jn(p));m={...i.defaults,...p,measured:{width:(f=p.measured)==null?void 0:f.width,height:(d=p.measured)==null?void 0:d.height},internals:{positionAbsolute:_,handleBounds:zU(p,m),z:Rk(p,l,i.zIndexMode),userNode:p}},n.set(p.id,m)}(m.measured===void 0||m.measured.width===void 0||m.measured.height===void 0)&&!m.hidden&&(c=!1),p.parentId&&Rg(m,n,r,o,s),u||(u=p.selected??!1)}return{nodesInitialized:c,hasSelectedNodes:u}}function FU(e,n){if(!e.parentId)return;const r=n.get(e.parentId);r?r.set(e.id,e):n.set(e.parentId,new Map([[e.id,e]]))}function Rg(e,n,r,o,i){const{elevateNodesOnSelect:s,nodeOrigin:a,nodeExtent:l,zIndexMode:c}=Pg(Ng,o),u=e.parentId,f=n.get(u);if(!f){console.warn(`Parent node ${u} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}FU(e,r),i&&!f.parentId&&f.internals.rootParentIndex===void 0&&c==="auto"&&(f.internals.rootParentIndex=++i.i,f.internals.z=f.internals.z+i.i*OU),i&&f.internals.rootParentIndex!==void 0&&(i.i=f.internals.rootParentIndex);const d=s&&!Mg(c)?Mk:0,{x:p,y:m,z:y}=VU(e,f,a,l,d,c),{positionAbsolute:b}=e.internals,_=p!==b.x||m!==b.y;(_||y!==e.internals.z)&&n.set(e.id,{...e,internals:{...e.internals,positionAbsolute:_?{x:p,y:m}:b,z:y}})}function Rk(e,n,r){const o=tn(e.zIndex)?e.zIndex:0;return Mg(r)?o:o+(e.selected?n:0)}function VU(e,n,r,o,i,s){const{x:a,y:l}=n.internals.positionAbsolute,c=Jn(e),u=Da(e,r),f=Ni(e.extent)?vo(u,e.extent,c):u;let d=vo({x:a+f.x,y:l+f.y},o,c);e.extent==="parent"&&(d=yk(d,c,n));const p=Rk(e,i,s),m=n.internals.z??0;return{x:d.x,y:d.y,z:m>=p?m+1:p}}function jg(e,n,r,o=[0,0]){var a;const i=[],s=new Map;for(const l of e){const c=n.get(l.parentId);if(!c)continue;const u=((a=s.get(l.parentId))==null?void 0:a.expandedRect)??ki(c),f=xk(u,l.rect);s.set(l.parentId,{expandedRect:f,parent:c})}return s.size>0&&s.forEach(({expandedRect:l,parent:c},u)=>{var w;const f=c.internals.positionAbsolute,d=Jn(c),p=c.origin??o,m=l.x<f.x?Math.round(Math.abs(f.x-l.x)):0,y=l.y<f.y?Math.round(Math.abs(f.y-l.y)):0,b=Math.max(d.width,Math.round(l.width)),_=Math.max(d.height,Math.round(l.height)),v=(b-d.width)*p[0],x=(_-d.height)*p[1];(m>0||y>0||v||x)&&(i.push({id:u,type:"position",position:{x:c.position.x-m+v,y:c.position.y-y+x}}),(w=r.get(u))==null||w.forEach(S=>{e.some(C=>C.id===S.id)||i.push({id:S.id,type:"position",position:{x:S.position.x+m,y:S.position.y+y}})})),(d.width<l.width||d.height<l.height||m||y)&&i.push({id:u,type:"dimensions",setAttributes:!0,dimensions:{width:b+(m?p[0]*m-v:0),height:_+(y?p[1]*y-x:0)}})}),i}function BU(e,n,r,o,i,s,a){const l=o==null?void 0:o.querySelector(".xyflow__viewport");let c=!1;if(!l)return{changes:[],updatedInternals:c};const u=[],f=window.getComputedStyle(l),{m22:d}=new window.DOMMatrixReadOnly(f.transform),p=[];for(const m of e.values()){const y=n.get(m.id);if(!y)continue;if(y.hidden){n.set(y.id,{...y,internals:{...y.internals,handleBounds:void 0}}),c=!0;continue}const b=kg(m.nodeElement),_=y.measured.width!==b.width||y.measured.height!==b.height;if(!!(b.width&&b.height&&(_||!y.internals.handleBounds||m.force))){const x=m.nodeElement.getBoundingClientRect(),w=Ni(y.extent)?y.extent:s;let{positionAbsolute:S}=y.internals;y.parentId&&y.extent==="parent"?S=yk(S,b,n.get(y.parentId)):w&&(S=vo(S,w,b));const C={...y,measured:b,internals:{...y.internals,positionAbsolute:S,handleBounds:{source:fx("source",m.nodeElement,x,d,y.id),target:fx("target",m.nodeElement,x,d,y.id)}}};n.set(y.id,C),y.parentId&&Rg(C,n,r,{nodeOrigin:i,zIndexMode:a}),c=!0,_&&(u.push({id:y.id,type:"dimensions",dimensions:b}),y.expandParent&&y.parentId&&p.push({id:y.id,parentId:y.parentId,rect:ki(C,i)}))}}if(p.length>0){const m=jg(p,n,r,i);u.push(...m)}return{changes:u,updatedInternals:c}}async function HU({delta:e,panZoom:n,transform:r,translateExtent:o,width:i,height:s}){if(!n||!e.x&&!e.y)return Promise.resolve(!1);const a=await n.setViewportConstrained({x:r[0]+e.x,y:r[1]+e.y,zoom:r[2]},[[0,0],[i,s]],o),l=!!a&&(a.x!==r[0]||a.y!==r[1]||a.k!==r[2]);return Promise.resolve(l)}function xx(e,n,r,o,i,s){let a=i;const l=o.get(a)||new Map;o.set(a,l.set(r,n)),a=`${i}-${e}`;const c=o.get(a)||new Map;if(o.set(a,c.set(r,n)),s){a=`${i}-${e}-${s}`;const u=o.get(a)||new Map;o.set(a,u.set(r,n))}}function jk(e,n,r){e.clear(),n.clear();for(const o of r){const{source:i,target:s,sourceHandle:a=null,targetHandle:l=null}=o,c={edgeId:o.id,source:i,target:s,sourceHandle:a,targetHandle:l},u=`${i}-${a}--${s}-${l}`,f=`${s}-${l}--${i}-${a}`;xx("source",c,f,e,i,a),xx("target",c,u,e,s,l),n.set(o.id,o)}}function Ak(e,n){if(!e.parentId)return!1;const r=n.get(e.parentId);return r?r.selected?!0:Ak(r,n):!1}function wx(e,n,r){var i;let o=e;do{if((i=o==null?void 0:o.matches)!=null&&i.call(o,n))return!0;if(o===r)return!1;o=o==null?void 0:o.parentElement}while(o);return!1}function WU(e,n,r,o){const i=new Map;for(const[s,a]of e)if((a.selected||a.id===o)&&(!a.parentId||!Ak(a,e))&&(a.draggable||n&&typeof a.draggable>"u")){const l=e.get(s);l&&i.set(s,{id:s,position:l.position||{x:0,y:0},distance:{x:r.x-l.internals.positionAbsolute.x,y:r.y-l.internals.positionAbsolute.y},extent:l.extent,parentId:l.parentId,origin:l.origin,expandParent:l.expandParent,internals:{positionAbsolute:l.internals.positionAbsolute||{x:0,y:0}},measured:{width:l.measured.width??0,height:l.measured.height??0}})}return i}function xf({nodeId:e,dragItems:n,nodeLookup:r,dragging:o=!0}){var a,l,c;const i=[];for(const[u,f]of n){const d=(a=r.get(u))==null?void 0:a.internals.userNode;d&&i.push({...d,position:f.position,dragging:o})}if(!e)return[i[0],i];const s=(l=r.get(e))==null?void 0:l.internals.userNode;return[s?{...s,position:((c=n.get(e))==null?void 0:c.position)||s.position,dragging:o}:i[0],i]}function UU({dragItems:e,snapGrid:n,x:r,y:o}){const i=e.values().next().value;if(!i)return null;const s={x:r-i.distance.x,y:o-i.distance.y},a=za(s,n);return{x:a.x-s.x,y:a.y-s.y}}function GU({onNodeMouseDown:e,getStoreItems:n,onDragStart:r,onDrag:o,onDragStop:i}){let s={x:null,y:null},a=0,l=new Map,c=!1,u={x:0,y:0},f=null,d=!1,p=null,m=!1,y=!1,b=null;function _({noDragClassName:x,handleSelector:w,domNode:S,isSelectable:C,nodeId:E,nodeClickDistance:k=0}){p=tt(S);function N({x:D,y:V}){const{nodeLookup:P,nodeExtent:L,snapGrid:I,snapToGrid:F,nodeOrigin:R,onNodeDrag:j,onSelectionDrag:O,onError:G,updateNodePositions:$}=n();s={x:D,y:V};let X=!1;const H=l.size>1,W=H&&L?sh(La(l)):null,z=H&&F?UU({dragItems:l,snapGrid:I,x:D,y:V}):null;for(const[U,Y]of l){if(!P.has(U))continue;let K={x:D-Y.distance.x,y:V-Y.distance.y};F&&(K=z?{x:Math.round(K.x+z.x),y:Math.round(K.y+z.y)}:za(K,I));let Z=null;if(H&&L&&!Y.extent&&W){const{positionAbsolute:te}=Y.internals,ce=te.x-W.x+L[0][0],me=te.x+Y.measured.width-W.x2+L[1][0],ue=te.y-W.y+L[0][1],ye=te.y+Y.measured.height-W.y2+L[1][1];Z=[[ce,ue],[me,ye]]}const{position:ee,positionAbsolute:Q}=gk({nodeId:U,nextPosition:K,nodeLookup:P,nodeExtent:Z||L,nodeOrigin:R,onError:G});X=X||Y.position.x!==ee.x||Y.position.y!==ee.y,Y.position=ee,Y.internals.positionAbsolute=Q}if(y=y||X,!!X&&($(l,!0),b&&(o||j||!E&&O))){const[U,Y]=xf({nodeId:E,dragItems:l,nodeLookup:P});o==null||o(b,l,U,Y),j==null||j(b,U,Y),E||O==null||O(b,Y)}}async function M(){if(!f)return;const{transform:D,panBy:V,autoPanSpeed:P,autoPanOnNodeDrag:L}=n();if(!L){c=!1,cancelAnimationFrame(a);return}const[I,F]=vk(u,f,P);(I!==0||F!==0)&&(s.x=(s.x??0)-I/D[2],s.y=(s.y??0)-F/D[2],await V({x:I,y:F})&&N(s)),a=requestAnimationFrame(M)}function T(D){var H;const{nodeLookup:V,multiSelectionActive:P,nodesDraggable:L,transform:I,snapGrid:F,snapToGrid:R,selectNodesOnDrag:j,onNodeDragStart:O,onSelectionDragStart:G,unselectNodesAndEdges:$}=n();d=!0,(!j||!C)&&!P&&E&&((H=V.get(E))!=null&&H.selected||$()),C&&j&&E&&(e==null||e(E));const X=Ts(D.sourceEvent,{transform:I,snapGrid:F,snapToGrid:R,containerBounds:f});if(s=X,l=WU(V,L,X,E),l.size>0&&(r||O||!E&&G)){const[W,z]=xf({nodeId:E,dragItems:l,nodeLookup:V});r==null||r(D.sourceEvent,l,W,z),O==null||O(D.sourceEvent,W,z),E||G==null||G(D.sourceEvent,z)}}const A=og().clickDistance(k).on("start",D=>{const{domNode:V,nodeDragThreshold:P,transform:L,snapGrid:I,snapToGrid:F}=n();f=(V==null?void 0:V.getBoundingClientRect())||null,m=!1,y=!1,b=D.sourceEvent,P===0&&T(D),s=Ts(D.sourceEvent,{transform:L,snapGrid:I,snapToGrid:F,containerBounds:f}),u=nn(D.sourceEvent,f)}).on("drag",D=>{const{autoPanOnNodeDrag:V,transform:P,snapGrid:L,snapToGrid:I,nodeDragThreshold:F,nodeLookup:R}=n(),j=Ts(D.sourceEvent,{transform:P,snapGrid:L,snapToGrid:I,containerBounds:f});if(b=D.sourceEvent,(D.sourceEvent.type==="touchmove"&&D.sourceEvent.touches.length>1||E&&!R.has(E))&&(m=!0),!m){if(!c&&V&&d&&(c=!0,M()),!d){const O=nn(D.sourceEvent,f),G=O.x-u.x,$=O.y-u.y;Math.sqrt(G*G+$*$)>F&&T(D)}(s.x!==j.xSnapped||s.y!==j.ySnapped)&&l&&d&&(u=nn(D.sourceEvent,f),N(j))}}).on("end",D=>{if(!(!d||m)&&(c=!1,d=!1,cancelAnimationFrame(a),l.size>0)){const{nodeLookup:V,updateNodePositions:P,onNodeDragStop:L,onSelectionDragStop:I}=n();if(y&&(P(l,!1),y=!1),i||L||!E&&I){const[F,R]=xf({nodeId:E,dragItems:l,nodeLookup:V,dragging:!1});i==null||i(D.sourceEvent,l,F,R),L==null||L(D.sourceEvent,F,R),E||I==null||I(D.sourceEvent,R)}}}).filter(D=>{const V=D.target;return!D.button&&(!x||!wx(V,`.${x}`,S))&&(!w||wx(V,w,S))});p.call(A)}function v(){p==null||p.on(".drag",null)}return{update:_,destroy:v}}function YU(e,n,r){const o=[],i={x:e.x-r,y:e.y-r,width:r*2,height:r*2};for(const s of n.values())da(i,ki(s))>0&&o.push(s);return o}const XU=250;function KU(e,n,r,o){var l,c;let i=[],s=1/0;const a=YU(e,r,n+XU);for(const u of a){const f=[...((l=u.internals.handleBounds)==null?void 0:l.source)??[],...((c=u.internals.handleBounds)==null?void 0:c.target)??[]];for(const d of f){if(o.nodeId===d.nodeId&&o.type===d.type&&o.id===d.id)continue;const{x:p,y:m}=xo(u,d,d.position,!0),y=Math.sqrt(Math.pow(p-e.x,2)+Math.pow(m-e.y,2));y>n||(y<s?(i=[{...d,x:p,y:m}],s=y):y===s&&i.push({...d,x:p,y:m}))}}if(!i.length)return null;if(i.length>1){const u=o.type==="source"?"target":"source";return i.find(f=>f.type===u)??i[0]}return i[0]}function Tk(e,n,r,o,i,s=!1){var u,f,d;const a=o.get(e);if(!a)return null;const l=i==="strict"?(u=a.internals.handleBounds)==null?void 0:u[n]:[...((f=a.internals.handleBounds)==null?void 0:f.source)??[],...((d=a.internals.handleBounds)==null?void 0:d.target)??[]],c=(r?l==null?void 0:l.find(p=>p.id===r):l==null?void 0:l[0])??null;return c&&s?{...c,...xo(a,c,c.position,!0)}:c}function Ik(e,n){return e||(n!=null&&n.classList.contains("target")?"target":n!=null&&n.classList.contains("source")?"source":null)}function qU(e,n){let r=null;return n?r=!0:e&&!n&&(r=!1),r}const $k=()=>!0;function ZU(e,{connectionMode:n,connectionRadius:r,handleId:o,nodeId:i,edgeUpdaterType:s,isTarget:a,domNode:l,nodeLookup:c,lib:u,autoPanOnConnect:f,flowId:d,panBy:p,cancelConnection:m,onConnectStart:y,onConnect:b,onConnectEnd:_,isValidConnection:v=$k,onReconnectEnd:x,updateConnection:w,getTransform:S,getFromHandle:C,autoPanSpeed:E,dragThreshold:k=1,handleDomNode:N}){const M=_k(e.target);let T=0,A;const{x:D,y:V}=nn(e),P=Ik(s,N),L=l==null?void 0:l.getBoundingClientRect();let I=!1;if(!L||!P)return;const F=Tk(i,P,o,c,n);if(!F)return;let R=nn(e,L),j=!1,O=null,G=!1,$=null;function X(){if(!f||!L)return;const[ee,Q]=vk(R,L,E);p({x:ee,y:Q}),T=requestAnimationFrame(X)}const H={...F,nodeId:i,type:P,position:F.position},W=c.get(i);let U={inProgress:!0,isValid:null,from:xo(W,H,le.Left,!0),fromHandle:H,fromPosition:H.position,fromNode:W,to:R,toHandle:null,toPosition:lx[H.position],toNode:null,pointer:R};function Y(){I=!0,w(U),y==null||y(e,{nodeId:i,handleId:o,handleType:P})}k===0&&Y();function K(ee){if(!I){const{x:ye,y:dn}=nn(ee),ut=ye-D,Wr=dn-V;if(!(ut*ut+Wr*Wr>k*k))return;Y()}if(!C()||!H){Z(ee);return}const Q=S();R=nn(ee,L),A=KU(Fa(R,Q,!1,[1,1]),r,c,H),j||(X(),j=!0);const te=Ok(ee,{handle:A,connectionMode:n,fromNodeId:i,fromHandleId:o,fromType:a?"target":"source",isValidConnection:v,doc:M,lib:u,flowId:d,nodeLookup:c});$=te.handleDomNode,O=te.connection,G=qU(!!A,te.isValid);const ce=c.get(i),me=ce?xo(ce,H,le.Left,!0):U.from,ue={...U,from:me,isValid:G,to:te.toHandle&&G?nu({x:te.toHandle.x,y:te.toHandle.y},Q):R,toHandle:te.toHandle,toPosition:G&&te.toHandle?te.toHandle.position:lx[H.position],toNode:te.toHandle?c.get(te.toHandle.nodeId):null,pointer:R};w(ue),U=ue}function Z(ee){if(!("touches"in ee&&ee.touches.length>0)){if(I){(A||$)&&O&&G&&(b==null||b(O));const{inProgress:Q,...te}=U,ce={...te,toPosition:U.toHandle?U.toPosition:null};_==null||_(ee,ce),s&&(x==null||x(ee,ce))}m(),cancelAnimationFrame(T),j=!1,G=!1,O=null,$=null,M.removeEventListener("mousemove",K),M.removeEventListener("mouseup",Z),M.removeEventListener("touchmove",K),M.removeEventListener("touchend",Z)}}M.addEventListener("mousemove",K),M.addEventListener("mouseup",Z),M.addEventListener("touchmove",K),M.addEventListener("touchend",Z)}function Ok(e,{handle:n,connectionMode:r,fromNodeId:o,fromHandleId:i,fromType:s,doc:a,lib:l,flowId:c,isValidConnection:u=$k,nodeLookup:f}){const d=s==="target",p=n?a.querySelector(`.${l}-flow__handle[data-id="${c}-${n==null?void 0:n.nodeId}-${n==null?void 0:n.id}-${n==null?void 0:n.type}"]`):null,{x:m,y}=nn(e),b=a.elementFromPoint(m,y),_=b!=null&&b.classList.contains(`${l}-flow__handle`)?b:p,v={handleDomNode:_,isValid:!1,connection:null,toHandle:null};if(_){const x=Ik(void 0,_),w=_.getAttribute("data-nodeid"),S=_.getAttribute("data-handleid"),C=_.classList.contains("connectable"),E=_.classList.contains("connectableend");if(!w||!x)return v;const k={source:d?w:o,sourceHandle:d?S:i,target:d?o:w,targetHandle:d?i:S};v.connection=k;const M=C&&E&&(r===Ci.Strict?d&&x==="source"||!d&&x==="target":w!==o||S!==i);v.isValid=M&&u(k),v.toHandle=Tk(w,x,S,f,r,!0)}return v}const uh={onPointerDown:ZU,isValid:Ok};function QU({domNode:e,panZoom:n,getTransform:r,getViewScale:o}){const i=tt(e);function s({translateExtent:l,width:c,height:u,zoomStep:f=1,pannable:d=!0,zoomable:p=!0,inversePan:m=!1}){const y=w=>{if(w.sourceEvent.type!=="wheel"||!n)return;const S=r(),C=w.sourceEvent.ctrlKey&&fa()?10:1,E=-w.sourceEvent.deltaY*(w.sourceEvent.deltaMode===1?.05:w.sourceEvent.deltaMode?1:.002)*f,k=S[2]*Math.pow(2,E*C);n.scaleTo(k)};let b=[0,0];const _=w=>{(w.sourceEvent.type==="mousedown"||w.sourceEvent.type==="touchstart")&&(b=[w.sourceEvent.clientX??w.sourceEvent.touches[0].clientX,w.sourceEvent.clientY??w.sourceEvent.touches[0].clientY])},v=w=>{const S=r();if(w.sourceEvent.type!=="mousemove"&&w.sourceEvent.type!=="touchmove"||!n)return;const C=[w.sourceEvent.clientX??w.sourceEvent.touches[0].clientX,w.sourceEvent.clientY??w.sourceEvent.touches[0].clientY],E=[C[0]-b[0],C[1]-b[1]];b=C;const k=o()*Math.max(S[2],Math.log(S[2]))*(m?-1:1),N={x:S[0]-E[0]*k,y:S[1]-E[1]*k},M=[[0,0],[c,u]];n.setViewportConstrained({x:N.x,y:N.y,zoom:S[2]},M,l)},x=dg().on("start",_).on("zoom",d?v:null).on("zoom.wheel",p?y:null);i.call(x,{})}function a(){i.on("zoom",null)}return{update:s,destroy:a,pointer:Ot}}const ad=e=>({x:e.x,y:e.y,zoom:e.k}),wf=({x:e,y:n,zoom:r})=>ed.translate(e,n).scale(r),Zo=(e,n)=>e.target.closest(`.${n}`),Dk=(e,n)=>n===2&&Array.isArray(e)&&e.includes(2),JU=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,bf=(e,n=0,r=JU,o=()=>{})=>{const i=typeof n=="number"&&n>0;return i||o(),i?e.transition().duration(n).ease(r).on("end",o):e},Lk=e=>{const n=e.ctrlKey&&fa()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*n};function eG({zoomPanValues:e,noWheelClassName:n,d3Selection:r,d3Zoom:o,panOnScrollMode:i,panOnScrollSpeed:s,zoomOnPinch:a,onPanZoomStart:l,onPanZoom:c,onPanZoomEnd:u}){return f=>{if(Zo(f,n))return f.ctrlKey&&f.preventDefault(),!1;f.preventDefault(),f.stopImmediatePropagation();const d=r.property("__zoom").k||1;if(f.ctrlKey&&a){const _=Ot(f),v=Lk(f),x=d*Math.pow(2,v);o.scaleTo(r,x,_,f);return}const p=f.deltaMode===1?20:1;let m=i===io.Vertical?0:f.deltaX*p,y=i===io.Horizontal?0:f.deltaY*p;!fa()&&f.shiftKey&&i!==io.Vertical&&(m=f.deltaY*p,y=0),o.translateBy(r,-(m/d)*s,-(y/d)*s,{internal:!0});const b=ad(r.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(c==null||c(f,b),e.panScrollTimeout=setTimeout(()=>{u==null||u(f,b),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,l==null||l(f,b))}}function tG({noWheelClassName:e,preventScrolling:n,d3ZoomHandler:r}){return function(o,i){const s=o.type==="wheel",a=!n&&s&&!o.ctrlKey,l=Zo(o,e);if(o.ctrlKey&&s&&l&&o.preventDefault(),a||l)return null;o.preventDefault(),r.call(this,o,i)}}function nG({zoomPanValues:e,onDraggingChange:n,onPanZoomStart:r}){return o=>{var s,a,l;if((s=o.sourceEvent)!=null&&s.internal)return;const i=ad(o.transform);e.mouseButton=((a=o.sourceEvent)==null?void 0:a.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=i,((l=o.sourceEvent)==null?void 0:l.type)==="mousedown"&&n(!0),r&&(r==null||r(o.sourceEvent,i))}}function rG({zoomPanValues:e,panOnDrag:n,onPaneContextMenu:r,onTransformChange:o,onPanZoom:i}){return s=>{var a,l;e.usedRightMouseButton=!!(r&&Dk(n,e.mouseButton??0)),(a=s.sourceEvent)!=null&&a.sync||o([s.transform.x,s.transform.y,s.transform.k]),i&&!((l=s.sourceEvent)!=null&&l.internal)&&(i==null||i(s.sourceEvent,ad(s.transform)))}}function oG({zoomPanValues:e,panOnDrag:n,panOnScroll:r,onDraggingChange:o,onPanZoomEnd:i,onPaneContextMenu:s}){return a=>{var l;if(!((l=a.sourceEvent)!=null&&l.internal)&&(e.isZoomingOrPanning=!1,s&&Dk(n,e.mouseButton??0)&&!e.usedRightMouseButton&&a.sourceEvent&&s(a.sourceEvent),e.usedRightMouseButton=!1,o(!1),i)){const c=ad(a.transform);e.prevViewport=c,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{i==null||i(a.sourceEvent,c)},r?150:0)}}}function iG({zoomActivationKeyPressed:e,zoomOnScroll:n,zoomOnPinch:r,panOnDrag:o,panOnScroll:i,zoomOnDoubleClick:s,userSelectionActive:a,noWheelClassName:l,noPanClassName:c,lib:u,connectionInProgress:f}){return d=>{var _;const p=e||n,m=r&&d.ctrlKey,y=d.type==="wheel";if(d.button===1&&d.type==="mousedown"&&(Zo(d,`${u}-flow__node`)||Zo(d,`${u}-flow__edge`)))return!0;if(!o&&!p&&!i&&!s&&!r||a||f&&!y||Zo(d,l)&&y||Zo(d,c)&&(!y||i&&y&&!e)||!r&&d.ctrlKey&&y)return!1;if(!r&&d.type==="touchstart"&&((_=d.touches)==null?void 0:_.length)>1)return d.preventDefault(),!1;if(!p&&!i&&!m&&y||!o&&(d.type==="mousedown"||d.type==="touchstart")||Array.isArray(o)&&!o.includes(d.button)&&d.type==="mousedown")return!1;const b=Array.isArray(o)&&o.includes(d.button)||!d.button||d.button<=1;return(!d.ctrlKey||y)&&b}}function sG({domNode:e,minZoom:n,maxZoom:r,translateExtent:o,viewport:i,onPanZoom:s,onPanZoomStart:a,onPanZoomEnd:l,onDraggingChange:c}){const u={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},f=e.getBoundingClientRect(),d=dg().scaleExtent([n,r]).translateExtent(o),p=tt(e).call(d);x({x:i.x,y:i.y,zoom:Ei(i.zoom,n,r)},[[0,0],[f.width,f.height]],o);const m=p.on("wheel.zoom"),y=p.on("dblclick.zoom");d.wheelDelta(Lk);function b(A,D){return p?new Promise(V=>{d==null||d.interpolate((D==null?void 0:D.interpolate)==="linear"?Ps:Xl).transform(bf(p,D==null?void 0:D.duration,D==null?void 0:D.ease,()=>V(!0)),A)}):Promise.resolve(!1)}function _({noWheelClassName:A,noPanClassName:D,onPaneContextMenu:V,userSelectionActive:P,panOnScroll:L,panOnDrag:I,panOnScrollMode:F,panOnScrollSpeed:R,preventScrolling:j,zoomOnPinch:O,zoomOnScroll:G,zoomOnDoubleClick:$,zoomActivationKeyPressed:X,lib:H,onTransformChange:W,connectionInProgress:z,paneClickDistance:U,selectionOnDrag:Y}){P&&!u.isZoomingOrPanning&&v();const K=L&&!X&&!P;d.clickDistance(Y?1/0:!tn(U)||U<0?0:U);const Z=K?eG({zoomPanValues:u,noWheelClassName:A,d3Selection:p,d3Zoom:d,panOnScrollMode:F,panOnScrollSpeed:R,zoomOnPinch:O,onPanZoomStart:a,onPanZoom:s,onPanZoomEnd:l}):tG({noWheelClassName:A,preventScrolling:j,d3ZoomHandler:m});if(p.on("wheel.zoom",Z,{passive:!1}),!P){const Q=nG({zoomPanValues:u,onDraggingChange:c,onPanZoomStart:a});d.on("start",Q);const te=rG({zoomPanValues:u,panOnDrag:I,onPaneContextMenu:!!V,onPanZoom:s,onTransformChange:W});d.on("zoom",te);const ce=oG({zoomPanValues:u,panOnDrag:I,panOnScroll:L,onPaneContextMenu:V,onPanZoomEnd:l,onDraggingChange:c});d.on("end",ce)}const ee=iG({zoomActivationKeyPressed:X,panOnDrag:I,zoomOnScroll:G,panOnScroll:L,zoomOnDoubleClick:$,zoomOnPinch:O,userSelectionActive:P,noPanClassName:D,noWheelClassName:A,lib:H,connectionInProgress:z});d.filter(ee),$?p.on("dblclick.zoom",y):p.on("dblclick.zoom",null)}function v(){d.on("zoom",null)}async function x(A,D,V){const P=wf(A),L=d==null?void 0:d.constrain()(P,D,V);return L&&await b(L),new Promise(I=>I(L))}async function w(A,D){const V=wf(A);return await b(V,D),new Promise(P=>P(V))}function S(A){if(p){const D=wf(A),V=p.property("__zoom");(V.k!==A.zoom||V.x!==A.x||V.y!==A.y)&&(d==null||d.transform(p,D,null,{sync:!0}))}}function C(){const A=p?qt(p.node()):{x:0,y:0,k:1};return{x:A.x,y:A.y,zoom:A.k}}function E(A,D){return p?new Promise(V=>{d==null||d.interpolate((D==null?void 0:D.interpolate)==="linear"?Ps:Xl).scaleTo(bf(p,D==null?void 0:D.duration,D==null?void 0:D.ease,()=>V(!0)),A)}):Promise.resolve(!1)}function k(A,D){return p?new Promise(V=>{d==null||d.interpolate((D==null?void 0:D.interpolate)==="linear"?Ps:Xl).scaleBy(bf(p,D==null?void 0:D.duration,D==null?void 0:D.ease,()=>V(!0)),A)}):Promise.resolve(!1)}function N(A){d==null||d.scaleExtent(A)}function M(A){d==null||d.translateExtent(A)}function T(A){const D=!tn(A)||A<0?0:A;d==null||d.clickDistance(D)}return{update:_,destroy:v,setViewport:w,setViewportConstrained:x,getViewport:C,scaleTo:E,scaleBy:k,setScaleExtent:N,setTranslateExtent:M,syncViewport:S,setClickDistance:T}}var Pi;(function(e){e.Line="line",e.Handle="handle"})(Pi||(Pi={}));function aG({width:e,prevWidth:n,height:r,prevHeight:o,affectsX:i,affectsY:s}){const a=e-n,l=r-o,c=[a>0?1:a<0?-1:0,l>0?1:l<0?-1:0];return a&&i&&(c[0]=c[0]*-1),l&&s&&(c[1]=c[1]*-1),c}function bx(e){const n=e.includes("right")||e.includes("left"),r=e.includes("bottom")||e.includes("top"),o=e.includes("left"),i=e.includes("top");return{isHorizontal:n,isVertical:r,affectsX:o,affectsY:i}}function ir(e,n){return Math.max(0,n-e)}function sr(e,n){return Math.max(0,e-n)}function Sl(e,n,r){return Math.max(0,n-e,e-r)}function _x(e,n){return e?!n:n}function lG(e,n,r,o,i,s,a,l){let{affectsX:c,affectsY:u}=n;const{isHorizontal:f,isVertical:d}=n,p=f&&d,{xSnapped:m,ySnapped:y}=r,{minWidth:b,maxWidth:_,minHeight:v,maxHeight:x}=o,{x:w,y:S,width:C,height:E,aspectRatio:k}=e;let N=Math.floor(f?m-e.pointerX:0),M=Math.floor(d?y-e.pointerY:0);const T=C+(c?-N:N),A=E+(u?-M:M),D=-s[0]*C,V=-s[1]*E;let P=Sl(T,b,_),L=Sl(A,v,x);if(a){let R=0,j=0;c&&N<0?R=ir(w+N+D,a[0][0]):!c&&N>0&&(R=sr(w+T+D,a[1][0])),u&&M<0?j=ir(S+M+V,a[0][1]):!u&&M>0&&(j=sr(S+A+V,a[1][1])),P=Math.max(P,R),L=Math.max(L,j)}if(l){let R=0,j=0;c&&N>0?R=sr(w+N,l[0][0]):!c&&N<0&&(R=ir(w+T,l[1][0])),u&&M>0?j=sr(S+M,l[0][1]):!u&&M<0&&(j=ir(S+A,l[1][1])),P=Math.max(P,R),L=Math.max(L,j)}if(i){if(f){const R=Sl(T/k,v,x)*k;if(P=Math.max(P,R),a){let j=0;!c&&!u||c&&!u&&p?j=sr(S+V+T/k,a[1][1])*k:j=ir(S+V+(c?N:-N)/k,a[0][1])*k,P=Math.max(P,j)}if(l){let j=0;!c&&!u||c&&!u&&p?j=ir(S+T/k,l[1][1])*k:j=sr(S+(c?N:-N)/k,l[0][1])*k,P=Math.max(P,j)}}if(d){const R=Sl(A*k,b,_)/k;if(L=Math.max(L,R),a){let j=0;!c&&!u||u&&!c&&p?j=sr(w+A*k+D,a[1][0])/k:j=ir(w+(u?M:-M)*k+D,a[0][0])/k,L=Math.max(L,j)}if(l){let j=0;!c&&!u||u&&!c&&p?j=ir(w+A*k,l[1][0])/k:j=sr(w+(u?M:-M)*k,l[0][0])/k,L=Math.max(L,j)}}}M=M+(M<0?L:-L),N=N+(N<0?P:-P),i&&(p?T>A*k?M=(_x(c,u)?-N:N)/k:N=(_x(c,u)?-M:M)*k:f?(M=N/k,u=c):(N=M*k,c=u));const I=c?w+N:w,F=u?S+M:S;return{width:C+(c?-N:N),height:E+(u?-M:M),x:s[0]*N*(c?-1:1)+I,y:s[1]*M*(u?-1:1)+F}}const zk={width:0,height:0,x:0,y:0},cG={...zk,pointerX:0,pointerY:0,aspectRatio:1};function uG(e){return[[0,0],[e.measured.width,e.measured.height]]}function dG(e,n,r){const o=n.position.x+e.position.x,i=n.position.y+e.position.y,s=e.measured.width??0,a=e.measured.height??0,l=r[0]*s,c=r[1]*a;return[[o-l,i-c],[o+s-l,i+a-c]]}function fG({domNode:e,nodeId:n,getStoreItems:r,onChange:o,onEnd:i}){const s=tt(e);let a={controlDirection:bx("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function l({controlPosition:u,boundaries:f,keepAspectRatio:d,resizeDirection:p,onResizeStart:m,onResize:y,onResizeEnd:b,shouldResize:_}){let v={...zk},x={...cG};a={boundaries:f,resizeDirection:p,keepAspectRatio:d,controlDirection:bx(u)};let w,S=null,C=[],E,k,N,M=!1;const T=og().on("start",A=>{const{nodeLookup:D,transform:V,snapGrid:P,snapToGrid:L,nodeOrigin:I,paneDomNode:F}=r();if(w=D.get(n),!w)return;S=(F==null?void 0:F.getBoundingClientRect())??null;const{xSnapped:R,ySnapped:j}=Ts(A.sourceEvent,{transform:V,snapGrid:P,snapToGrid:L,containerBounds:S});v={width:w.measured.width??0,height:w.measured.height??0,x:w.position.x??0,y:w.position.y??0},x={...v,pointerX:R,pointerY:j,aspectRatio:v.width/v.height},E=void 0,w.parentId&&(w.extent==="parent"||w.expandParent)&&(E=D.get(w.parentId),k=E&&w.extent==="parent"?uG(E):void 0),C=[],N=void 0;for(const[O,G]of D)if(G.parentId===n&&(C.push({id:O,position:{...G.position},extent:G.extent}),G.extent==="parent"||G.expandParent)){const $=dG(G,w,G.origin??I);N?N=[[Math.min($[0][0],N[0][0]),Math.min($[0][1],N[0][1])],[Math.max($[1][0],N[1][0]),Math.max($[1][1],N[1][1])]]:N=$}m==null||m(A,{...v})}).on("drag",A=>{const{transform:D,snapGrid:V,snapToGrid:P,nodeOrigin:L}=r(),I=Ts(A.sourceEvent,{transform:D,snapGrid:V,snapToGrid:P,containerBounds:S}),F=[];if(!w)return;const{x:R,y:j,width:O,height:G}=v,$={},X=w.origin??L,{width:H,height:W,x:z,y:U}=lG(x,a.controlDirection,I,a.boundaries,a.keepAspectRatio,X,k,N),Y=H!==O,K=W!==G,Z=z!==R&&Y,ee=U!==j&&K;if(!Z&&!ee&&!Y&&!K)return;if((Z||ee||X[0]===1||X[1]===1)&&($.x=Z?z:v.x,$.y=ee?U:v.y,v.x=$.x,v.y=$.y,C.length>0)){const me=z-R,ue=U-j;for(const ye of C)ye.position={x:ye.position.x-me+X[0]*(H-O),y:ye.position.y-ue+X[1]*(W-G)},F.push(ye)}if((Y||K)&&($.width=Y&&(!a.resizeDirection||a.resizeDirection==="horizontal")?H:v.width,$.height=K&&(!a.resizeDirection||a.resizeDirection==="vertical")?W:v.height,v.width=$.width,v.height=$.height),E&&w.expandParent){const me=X[0]*($.width??0);$.x&&$.x<me&&(v.x=me,x.x=x.x-($.x-me));const ue=X[1]*($.height??0);$.y&&$.y<ue&&(v.y=ue,x.y=x.y-($.y-ue))}const Q=aG({width:v.width,prevWidth:O,height:v.height,prevHeight:G,affectsX:a.controlDirection.affectsX,affectsY:a.controlDirection.affectsY}),te={...v,direction:Q};(_==null?void 0:_(A,te))!==!1&&(M=!0,y==null||y(A,te),o($,F))}).on("end",A=>{M&&(b==null||b(A,{...v}),i==null||i({...v}),M=!1)});s.call(T)}function c(){s.on(".drag",null)}return{update:l,destroy:c}}var Fk={exports:{}},Vk={};/**
390
- * @license React
391
- * use-sync-external-store-shim/with-selector.production.js
392
- *
393
- * Copyright (c) Meta Platforms, Inc. and affiliates.
394
- *
395
- * This source code is licensed under the MIT license found in the
396
- * LICENSE file in the root directory of this source tree.
397
- */var ld=h,pG=Gb;function hG(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var mG=typeof Object.is=="function"?Object.is:hG,gG=pG.useSyncExternalStore,yG=ld.useRef,vG=ld.useEffect,xG=ld.useMemo,wG=ld.useDebugValue;Vk.useSyncExternalStoreWithSelector=function(e,n,r,o,i){var s=yG(null);if(s.current===null){var a={hasValue:!1,value:null};s.current=a}else a=s.current;s=xG(function(){function c(m){if(!u){if(u=!0,f=m,m=o(m),i!==void 0&&a.hasValue){var y=a.value;if(i(y,m))return d=y}return d=m}if(y=d,mG(f,m))return y;var b=o(m);return i!==void 0&&i(y,b)?(f=m,y):(f=m,d=b)}var u=!1,f,d,p=r===void 0?null:r;return[function(){return c(n())},p===null?void 0:function(){return c(p())}]},[n,r,o,i]);var l=gG(e,s[0],s[1]);return vG(function(){a.hasValue=!0,a.value=l},[l]),wG(l),l};Fk.exports=Vk;var bG=Fk.exports;const _G=su(bG),SG={},Sx=e=>{let n;const r=new Set,o=(f,d)=>{const p=typeof f=="function"?f(n):f;if(!Object.is(p,n)){const m=n;n=d??(typeof p!="object"||p===null)?p:Object.assign({},n,p),r.forEach(y=>y(n,m))}},i=()=>n,c={setState:o,getState:i,getInitialState:()=>u,subscribe:f=>(r.add(f),()=>r.delete(f)),destroy:()=>{(SG?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}},u=n=e(o,i,c);return c},CG=e=>e?Sx(e):Sx,{useDebugValue:EG}=Je,{useSyncExternalStoreWithSelector:kG}=_G,NG=e=>e;function Bk(e,n=NG,r){const o=kG(e.subscribe,e.getState,e.getServerState||e.getInitialState,n,r);return EG(o),o}const Cx=(e,n)=>{const r=CG(e),o=(i,s=n)=>Bk(r,i,s);return Object.assign(o,r),o},PG=(e,n)=>e?Cx(e,n):Cx;function Re(e,n){if(Object.is(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;if(e instanceof Map&&n instanceof Map){if(e.size!==n.size)return!1;for(const[o,i]of e)if(!Object.is(i,n.get(o)))return!1;return!0}if(e instanceof Set&&n instanceof Set){if(e.size!==n.size)return!1;for(const o of e)if(!n.has(o))return!1;return!0}const r=Object.keys(e);if(r.length!==Object.keys(n).length)return!1;for(const o of r)if(!Object.prototype.hasOwnProperty.call(n,o)||!Object.is(e[o],n[o]))return!1;return!0}const cd=h.createContext(null),MG=cd.Provider,Hk=En.error001();function ge(e,n){const r=h.useContext(cd);if(r===null)throw new Error(Hk);return Bk(r,e,n)}function je(){const e=h.useContext(cd);if(e===null)throw new Error(Hk);return h.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const Ex={display:"none"},RG={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},Wk="react-flow__node-desc",Uk="react-flow__edge-desc",jG="react-flow__aria-live",AG=e=>e.ariaLiveMessage,TG=e=>e.ariaLabelConfig;function IG({rfId:e}){const n=ge(AG);return g.jsx("div",{id:`${jG}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:RG,children:n})}function $G({rfId:e,disableKeyboardA11y:n}){const r=ge(TG);return g.jsxs(g.Fragment,{children:[g.jsx("div",{id:`${Wk}-${e}`,style:Ex,children:n?r["node.a11yDescription.default"]:r["node.a11yDescription.keyboardDisabled"]}),g.jsx("div",{id:`${Uk}-${e}`,style:Ex,children:r["edge.a11yDescription.default"]}),!n&&g.jsx(IG,{rfId:e})]})}const ud=h.forwardRef(({position:e="top-left",children:n,className:r,style:o,...i},s)=>{const a=`${e}`.split("-");return g.jsx("div",{className:ze(["react-flow__panel",r,...a]),style:o,ref:s,...i,children:n})});ud.displayName="Panel";function OG({proOptions:e,position:n="bottom-right"}){return e!=null&&e.hideAttribution?null:g.jsx(ud,{position:n,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:g.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const DG=e=>{const n=[],r=[];for(const[,o]of e.nodeLookup)o.selected&&n.push(o.internals.userNode);for(const[,o]of e.edgeLookup)o.selected&&r.push(o);return{selectedNodes:n,selectedEdges:r}},Cl=e=>e.id;function LG(e,n){return Re(e.selectedNodes.map(Cl),n.selectedNodes.map(Cl))&&Re(e.selectedEdges.map(Cl),n.selectedEdges.map(Cl))}function zG({onSelectionChange:e}){const n=je(),{selectedNodes:r,selectedEdges:o}=ge(DG,LG);return h.useEffect(()=>{const i={nodes:r,edges:o};e==null||e(i),n.getState().onSelectionChangeHandlers.forEach(s=>s(i))},[r,o,e]),null}const FG=e=>!!e.onSelectionChangeHandlers;function VG({onSelectionChange:e}){const n=ge(FG);return e||n?g.jsx(zG,{onSelectionChange:e}):null}const dh=typeof window<"u"?h.useLayoutEffect:h.useEffect,Gk=[0,0],BG={x:0,y:0,zoom:1},HG=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode"],kx=[...HG,"rfId"],WG=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges}),Nx={translateExtent:ca,nodeOrigin:Gk,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function UG(e){const{setNodes:n,setEdges:r,setMinZoom:o,setMaxZoom:i,setTranslateExtent:s,setNodeExtent:a,reset:l,setDefaultNodesAndEdges:c}=ge(WG,Re),u=je();dh(()=>(c(e.defaultNodes,e.defaultEdges),()=>{f.current=Nx,l()}),[]);const f=h.useRef(Nx);return dh(()=>{for(const d of kx){const p=e[d],m=f.current[d];p!==m&&(typeof e[d]>"u"||(d==="nodes"?n(p):d==="edges"?r(p):d==="minZoom"?o(p):d==="maxZoom"?i(p):d==="translateExtent"?s(p):d==="nodeExtent"?a(p):d==="ariaLabelConfig"?u.setState({ariaLabelConfig:CU(p)}):d==="fitView"?u.setState({fitViewQueued:p}):d==="fitViewOptions"?u.setState({fitViewOptions:p}):u.setState({[d]:p})))}f.current=e},kx.map(d=>e[d])),null}function Px(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function GG(e){var o;const[n,r]=h.useState(e==="system"?null:e);return h.useEffect(()=>{if(e!=="system"){r(e);return}const i=Px(),s=()=>r(i!=null&&i.matches?"dark":"light");return s(),i==null||i.addEventListener("change",s),()=>{i==null||i.removeEventListener("change",s)}},[e]),n!==null?n:(o=Px())!=null&&o.matches?"dark":"light"}const Mx=typeof document<"u"?document:null;function pa(e=null,n={target:Mx,actInsideInputWithModifier:!0}){const[r,o]=h.useState(!1),i=h.useRef(!1),s=h.useRef(new Set([])),[a,l]=h.useMemo(()=>{if(e!==null){const u=(Array.isArray(e)?e:[e]).filter(d=>typeof d=="string").map(d=>d.replace("+",`
398
- `).replace(`
399
-
400
- `,`
401
- +`).split(`
402
- `)),f=u.reduce((d,p)=>d.concat(...p),[]);return[u,f]}return[[],[]]},[e]);return h.useEffect(()=>{const c=(n==null?void 0:n.target)??Mx,u=(n==null?void 0:n.actInsideInputWithModifier)??!0;if(e!==null){const f=m=>{var _,v;if(i.current=m.ctrlKey||m.metaKey||m.shiftKey||m.altKey,(!i.current||i.current&&!u)&&Sk(m))return!1;const b=jx(m.code,l);if(s.current.add(m[b]),Rx(a,s.current,!1)){const x=((v=(_=m.composedPath)==null?void 0:_.call(m))==null?void 0:v[0])||m.target,w=(x==null?void 0:x.nodeName)==="BUTTON"||(x==null?void 0:x.nodeName)==="A";n.preventDefault!==!1&&(i.current||!w)&&m.preventDefault(),o(!0)}},d=m=>{const y=jx(m.code,l);Rx(a,s.current,!0)?(o(!1),s.current.clear()):s.current.delete(m[y]),m.key==="Meta"&&s.current.clear(),i.current=!1},p=()=>{s.current.clear(),o(!1)};return c==null||c.addEventListener("keydown",f),c==null||c.addEventListener("keyup",d),window.addEventListener("blur",p),window.addEventListener("contextmenu",p),()=>{c==null||c.removeEventListener("keydown",f),c==null||c.removeEventListener("keyup",d),window.removeEventListener("blur",p),window.removeEventListener("contextmenu",p)}}},[e,o]),r}function Rx(e,n,r){return e.filter(o=>r||o.length===n.size).some(o=>o.every(i=>n.has(i)))}function jx(e,n){return n.includes(e)?"code":"key"}const YG=()=>{const e=je();return h.useMemo(()=>({zoomIn:n=>{const{panZoom:r}=e.getState();return r?r.scaleBy(1.2,n):Promise.resolve(!1)},zoomOut:n=>{const{panZoom:r}=e.getState();return r?r.scaleBy(1/1.2,n):Promise.resolve(!1)},zoomTo:(n,r)=>{const{panZoom:o}=e.getState();return o?o.scaleTo(n,r):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(n,r)=>{const{transform:[o,i,s],panZoom:a}=e.getState();return a?(await a.setViewport({x:n.x??o,y:n.y??i,zoom:n.zoom??s},r),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[n,r,o]=e.getState().transform;return{x:n,y:r,zoom:o}},setCenter:async(n,r,o)=>e.getState().setCenter(n,r,o),fitBounds:async(n,r)=>{const{width:o,height:i,minZoom:s,maxZoom:a,panZoom:l}=e.getState(),c=Eg(n,o,i,s,a,(r==null?void 0:r.padding)??.1);return l?(await l.setViewport(c,{duration:r==null?void 0:r.duration,ease:r==null?void 0:r.ease,interpolate:r==null?void 0:r.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(n,r={})=>{const{transform:o,snapGrid:i,snapToGrid:s,domNode:a}=e.getState();if(!a)return n;const{x:l,y:c}=a.getBoundingClientRect(),u={x:n.x-l,y:n.y-c},f=r.snapGrid??i,d=r.snapToGrid??s;return Fa(u,o,d,f)},flowToScreenPosition:n=>{const{transform:r,domNode:o}=e.getState();if(!o)return n;const{x:i,y:s}=o.getBoundingClientRect(),a=nu(n,r);return{x:a.x+i,y:a.y+s}}}),[])};function Yk(e,n){const r=[],o=new Map,i=[];for(const s of e)if(s.type==="add"){i.push(s);continue}else if(s.type==="remove"||s.type==="replace")o.set(s.id,[s]);else{const a=o.get(s.id);a?a.push(s):o.set(s.id,[s])}for(const s of n){const a=o.get(s.id);if(!a){r.push(s);continue}if(a[0].type==="remove")continue;if(a[0].type==="replace"){r.push({...a[0].item});continue}const l={...s};for(const c of a)XG(c,l);r.push(l)}return i.length&&i.forEach(s=>{s.index!==void 0?r.splice(s.index,0,{...s.item}):r.push({...s.item})}),r}function XG(e,n){switch(e.type){case"select":{n.selected=e.selected;break}case"position":{typeof e.position<"u"&&(n.position=e.position),typeof e.dragging<"u"&&(n.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(n.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(n.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(n.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(n.resizing=e.resizing);break}}}function KG(e,n){return Yk(e,n)}function qG(e,n){return Yk(e,n)}function qr(e,n){return{id:e,type:"select",selected:n}}function Qo(e,n=new Set,r=!1){const o=[];for(const[i,s]of e){const a=n.has(i);!(s.selected===void 0&&!a)&&s.selected!==a&&(r&&(s.selected=a),o.push(qr(s.id,a)))}return o}function Ax({items:e=[],lookup:n}){var i;const r=[],o=new Map(e.map(s=>[s.id,s]));for(const[s,a]of e.entries()){const l=n.get(a.id),c=((i=l==null?void 0:l.internals)==null?void 0:i.userNode)??l;c!==void 0&&c!==a&&r.push({id:a.id,item:a,type:"replace"}),c===void 0&&r.push({item:a,type:"add",index:s})}for(const[s]of n)o.get(s)===void 0&&r.push({id:s,type:"remove"});return r}function Tx(e){return{id:e.id,type:"remove"}}const Ix=e=>hU(e),ZG=e=>mk(e);function Xk(e){return h.forwardRef(e)}function $x(e){const[n,r]=h.useState(BigInt(0)),[o]=h.useState(()=>QG(()=>r(i=>i+BigInt(1))));return dh(()=>{const i=o.get();i.length&&(e(i),o.reset())},[n]),o}function QG(e){let n=[];return{get:()=>n,reset:()=>{n=[]},push:r=>{n.push(r),e()}}}const Kk=h.createContext(null);function JG({children:e}){const n=je(),r=h.useCallback(l=>{const{nodes:c=[],setNodes:u,hasDefaultNodes:f,onNodesChange:d,nodeLookup:p,fitViewQueued:m,onNodesChangeMiddlewareMap:y}=n.getState();let b=c;for(const v of l)b=typeof v=="function"?v(b):v;let _=Ax({items:b,lookup:p});for(const v of y.values())_=v(_);f&&u(b),_.length>0?d==null||d(_):m&&window.requestAnimationFrame(()=>{const{fitViewQueued:v,nodes:x,setNodes:w}=n.getState();v&&w(x)})},[]),o=$x(r),i=h.useCallback(l=>{const{edges:c=[],setEdges:u,hasDefaultEdges:f,onEdgesChange:d,edgeLookup:p}=n.getState();let m=c;for(const y of l)m=typeof y=="function"?y(m):y;f?u(m):d&&d(Ax({items:m,lookup:p}))},[]),s=$x(i),a=h.useMemo(()=>({nodeQueue:o,edgeQueue:s}),[]);return g.jsx(Kk.Provider,{value:a,children:e})}function eY(){const e=h.useContext(Kk);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const tY=e=>!!e.panZoom;function Ag(){const e=YG(),n=je(),r=eY(),o=ge(tY),i=h.useMemo(()=>{const s=d=>n.getState().nodeLookup.get(d),a=d=>{r.nodeQueue.push(d)},l=d=>{r.edgeQueue.push(d)},c=d=>{var v,x;const{nodeLookup:p,nodeOrigin:m}=n.getState(),y=Ix(d)?d:p.get(d.id),b=y.parentId?bk(y.position,y.measured,y.parentId,p,m):y.position,_={...y,position:b,width:((v=y.measured)==null?void 0:v.width)??y.width,height:((x=y.measured)==null?void 0:x.height)??y.height};return ki(_)},u=(d,p,m={replace:!1})=>{a(y=>y.map(b=>{if(b.id===d){const _=typeof p=="function"?p(b):p;return m.replace&&Ix(_)?_:{...b,..._}}return b}))},f=(d,p,m={replace:!1})=>{l(y=>y.map(b=>{if(b.id===d){const _=typeof p=="function"?p(b):p;return m.replace&&ZG(_)?_:{...b,..._}}return b}))};return{getNodes:()=>n.getState().nodes.map(d=>({...d})),getNode:d=>{var p;return(p=s(d))==null?void 0:p.internals.userNode},getInternalNode:s,getEdges:()=>{const{edges:d=[]}=n.getState();return d.map(p=>({...p}))},getEdge:d=>n.getState().edgeLookup.get(d),setNodes:a,setEdges:l,addNodes:d=>{const p=Array.isArray(d)?d:[d];r.nodeQueue.push(m=>[...m,...p])},addEdges:d=>{const p=Array.isArray(d)?d:[d];r.edgeQueue.push(m=>[...m,...p])},toObject:()=>{const{nodes:d=[],edges:p=[],transform:m}=n.getState(),[y,b,_]=m;return{nodes:d.map(v=>({...v})),edges:p.map(v=>({...v})),viewport:{x:y,y:b,zoom:_}}},deleteElements:async({nodes:d=[],edges:p=[]})=>{const{nodes:m,edges:y,onNodesDelete:b,onEdgesDelete:_,triggerNodeChanges:v,triggerEdgeChanges:x,onDelete:w,onBeforeDelete:S}=n.getState(),{nodes:C,edges:E}=await xU({nodesToRemove:d,edgesToRemove:p,nodes:m,edges:y,onBeforeDelete:S}),k=E.length>0,N=C.length>0;if(k){const M=E.map(Tx);_==null||_(E),x(M)}if(N){const M=C.map(Tx);b==null||b(C),v(M)}return(N||k)&&(w==null||w({nodes:C,edges:E})),{deletedNodes:C,deletedEdges:E}},getIntersectingNodes:(d,p=!0,m)=>{const y=ux(d),b=y?d:c(d),_=m!==void 0;return b?(m||n.getState().nodes).filter(v=>{const x=n.getState().nodeLookup.get(v.id);if(x&&!y&&(v.id===d.id||!x.internals.positionAbsolute))return!1;const w=ki(_?v:x),S=da(w,b);return p&&S>0||S>=w.width*w.height||S>=b.width*b.height}):[]},isNodeIntersecting:(d,p,m=!0)=>{const b=ux(d)?d:c(d);if(!b)return!1;const _=da(b,p);return m&&_>0||_>=p.width*p.height||_>=b.width*b.height},updateNode:u,updateNodeData:(d,p,m={replace:!1})=>{u(d,y=>{const b=typeof p=="function"?p(y):p;return m.replace?{...y,data:b}:{...y,data:{...y.data,...b}}},m)},updateEdge:f,updateEdgeData:(d,p,m={replace:!1})=>{f(d,y=>{const b=typeof p=="function"?p(y):p;return m.replace?{...y,data:b}:{...y,data:{...y.data,...b}}},m)},getNodesBounds:d=>{const{nodeLookup:p,nodeOrigin:m}=n.getState();return mU(d,{nodeLookup:p,nodeOrigin:m})},getHandleConnections:({type:d,id:p,nodeId:m})=>{var y;return Array.from(((y=n.getState().connectionLookup.get(`${m}-${d}${p?`-${p}`:""}`))==null?void 0:y.values())??[])},getNodeConnections:({type:d,handleId:p,nodeId:m})=>{var y;return Array.from(((y=n.getState().connectionLookup.get(`${m}${d?p?`-${d}-${p}`:`-${d}`:""}`))==null?void 0:y.values())??[])},fitView:async d=>{const p=n.getState().fitViewResolver??SU();return n.setState({fitViewQueued:!0,fitViewOptions:d,fitViewResolver:p}),r.nodeQueue.push(m=>[...m]),p.promise}}},[]);return h.useMemo(()=>({...i,...e,viewportInitialized:o}),[o])}const Ox=e=>e.selected,nY=typeof window<"u"?window:void 0;function rY({deleteKeyCode:e,multiSelectionKeyCode:n}){const r=je(),{deleteElements:o}=Ag(),i=pa(e,{actInsideInputWithModifier:!1}),s=pa(n,{target:nY});h.useEffect(()=>{if(i){const{edges:a,nodes:l}=r.getState();o({nodes:l.filter(Ox),edges:a.filter(Ox)}),r.setState({nodesSelectionActive:!1})}},[i]),h.useEffect(()=>{r.setState({multiSelectionActive:s})},[s])}function oY(e){const n=je();h.useEffect(()=>{const r=()=>{var i,s,a,l;if(!e.current||!(((s=(i=e.current).checkVisibility)==null?void 0:s.call(i))??!0))return!1;const o=kg(e.current);(o.height===0||o.width===0)&&((l=(a=n.getState()).onError)==null||l.call(a,"004",En.error004())),n.setState({width:o.width||500,height:o.height||500})};if(e.current){r(),window.addEventListener("resize",r);const o=new ResizeObserver(()=>r());return o.observe(e.current),()=>{window.removeEventListener("resize",r),o&&e.current&&o.unobserve(e.current)}}},[])}const dd={position:"absolute",width:"100%",height:"100%",top:0,left:0},iY=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function sY({onPaneContextMenu:e,zoomOnScroll:n=!0,zoomOnPinch:r=!0,panOnScroll:o=!1,panOnScrollSpeed:i=.5,panOnScrollMode:s=io.Free,zoomOnDoubleClick:a=!0,panOnDrag:l=!0,defaultViewport:c,translateExtent:u,minZoom:f,maxZoom:d,zoomActivationKeyCode:p,preventScrolling:m=!0,children:y,noWheelClassName:b,noPanClassName:_,onViewportChange:v,isControlledViewport:x,paneClickDistance:w,selectionOnDrag:S}){const C=je(),E=h.useRef(null),{userSelectionActive:k,lib:N,connectionInProgress:M}=ge(iY,Re),T=pa(p),A=h.useRef();oY(E);const D=h.useCallback(V=>{v==null||v({x:V[0],y:V[1],zoom:V[2]}),x||C.setState({transform:V})},[v,x]);return h.useEffect(()=>{if(E.current){A.current=sG({domNode:E.current,minZoom:f,maxZoom:d,translateExtent:u,viewport:c,onDraggingChange:I=>C.setState(F=>F.paneDragging===I?F:{paneDragging:I}),onPanZoomStart:(I,F)=>{const{onViewportChangeStart:R,onMoveStart:j}=C.getState();j==null||j(I,F),R==null||R(F)},onPanZoom:(I,F)=>{const{onViewportChange:R,onMove:j}=C.getState();j==null||j(I,F),R==null||R(F)},onPanZoomEnd:(I,F)=>{const{onViewportChangeEnd:R,onMoveEnd:j}=C.getState();j==null||j(I,F),R==null||R(F)}});const{x:V,y:P,zoom:L}=A.current.getViewport();return C.setState({panZoom:A.current,transform:[V,P,L],domNode:E.current.closest(".react-flow")}),()=>{var I;(I=A.current)==null||I.destroy()}}},[]),h.useEffect(()=>{var V;(V=A.current)==null||V.update({onPaneContextMenu:e,zoomOnScroll:n,zoomOnPinch:r,panOnScroll:o,panOnScrollSpeed:i,panOnScrollMode:s,zoomOnDoubleClick:a,panOnDrag:l,zoomActivationKeyPressed:T,preventScrolling:m,noPanClassName:_,userSelectionActive:k,noWheelClassName:b,lib:N,onTransformChange:D,connectionInProgress:M,selectionOnDrag:S,paneClickDistance:w})},[e,n,r,o,i,s,a,l,T,m,_,k,b,N,D,M,S,w]),g.jsx("div",{className:"react-flow__renderer",ref:E,style:dd,children:y})}const aY=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function lY(){const{userSelectionActive:e,userSelectionRect:n}=ge(aY,Re);return e&&n?g.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:n.width,height:n.height,transform:`translate(${n.x}px, ${n.y}px)`}}):null}const _f=(e,n)=>r=>{r.target===n.current&&(e==null||e(r))},cY=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function uY({isSelecting:e,selectionKeyPressed:n,selectionMode:r=ua.Full,panOnDrag:o,paneClickDistance:i,selectionOnDrag:s,onSelectionStart:a,onSelectionEnd:l,onPaneClick:c,onPaneContextMenu:u,onPaneScroll:f,onPaneMouseEnter:d,onPaneMouseMove:p,onPaneMouseLeave:m,children:y}){const b=je(),{userSelectionActive:_,elementsSelectable:v,dragging:x,connectionInProgress:w}=ge(cY,Re),S=v&&(e||_),C=h.useRef(null),E=h.useRef(),k=h.useRef(new Set),N=h.useRef(new Set),M=h.useRef(!1),T=R=>{if(M.current||w){M.current=!1;return}c==null||c(R),b.getState().resetSelectedElements(),b.setState({nodesSelectionActive:!1})},A=R=>{if(Array.isArray(o)&&(o!=null&&o.includes(2))){R.preventDefault();return}u==null||u(R)},D=f?R=>f(R):void 0,V=R=>{M.current&&(R.stopPropagation(),M.current=!1)},P=R=>{var W,z;const{domNode:j}=b.getState();if(E.current=j==null?void 0:j.getBoundingClientRect(),!E.current)return;const O=R.target===C.current;if(!O&&!!R.target.closest(".nokey")||!e||!(s&&O||n)||R.button!==0||!R.isPrimary)return;(z=(W=R.target)==null?void 0:W.setPointerCapture)==null||z.call(W,R.pointerId),M.current=!1;const{x:X,y:H}=nn(R.nativeEvent,E.current);b.setState({userSelectionRect:{width:0,height:0,startX:X,startY:H,x:X,y:H}}),O||(R.stopPropagation(),R.preventDefault())},L=R=>{const{userSelectionRect:j,transform:O,nodeLookup:G,edgeLookup:$,connectionLookup:X,triggerNodeChanges:H,triggerEdgeChanges:W,defaultEdgeOptions:z,resetSelectedElements:U}=b.getState();if(!E.current||!j)return;const{x:Y,y:K}=nn(R.nativeEvent,E.current),{startX:Z,startY:ee}=j;if(!M.current){const ue=n?0:i;if(Math.hypot(Y-Z,K-ee)<=ue)return;U(),a==null||a(R)}M.current=!0;const Q={startX:Z,startY:ee,x:Y<Z?Y:Z,y:K<ee?K:ee,width:Math.abs(Y-Z),height:Math.abs(K-ee)},te=k.current,ce=N.current;k.current=new Set(Cg(G,Q,O,r===ua.Partial,!0).map(ue=>ue.id)),N.current=new Set;const me=(z==null?void 0:z.selectable)??!0;for(const ue of k.current){const ye=X.get(ue);if(ye)for(const{edgeId:dn}of ye.values()){const ut=$.get(dn);ut&&(ut.selectable??me)&&N.current.add(dn)}}if(!dx(te,k.current)){const ue=Qo(G,k.current,!0);H(ue)}if(!dx(ce,N.current)){const ue=Qo($,N.current);W(ue)}b.setState({userSelectionRect:Q,userSelectionActive:!0,nodesSelectionActive:!1})},I=R=>{var j,O;R.button===0&&((O=(j=R.target)==null?void 0:j.releasePointerCapture)==null||O.call(j,R.pointerId),!_&&R.target===C.current&&b.getState().userSelectionRect&&(T==null||T(R)),b.setState({userSelectionActive:!1,userSelectionRect:null}),M.current&&(l==null||l(R),b.setState({nodesSelectionActive:k.current.size>0})))},F=o===!0||Array.isArray(o)&&o.includes(0);return g.jsxs("div",{className:ze(["react-flow__pane",{draggable:F,dragging:x,selection:e}]),onClick:S?void 0:_f(T,C),onContextMenu:_f(A,C),onWheel:_f(D,C),onPointerEnter:S?void 0:d,onPointerMove:S?L:p,onPointerUp:S?I:void 0,onPointerDownCapture:S?P:void 0,onClickCapture:S?V:void 0,onPointerLeave:m,ref:C,style:dd,children:[y,g.jsx(lY,{})]})}function fh({id:e,store:n,unselect:r=!1,nodeRef:o}){const{addSelectedNodes:i,unselectNodesAndEdges:s,multiSelectionActive:a,nodeLookup:l,onError:c}=n.getState(),u=l.get(e);if(!u){c==null||c("012",En.error012(e));return}n.setState({nodesSelectionActive:!1}),u.selected?(r||u.selected&&a)&&(s({nodes:[u],edges:[]}),requestAnimationFrame(()=>{var f;return(f=o==null?void 0:o.current)==null?void 0:f.blur()})):i([e])}function qk({nodeRef:e,disabled:n=!1,noDragClassName:r,handleSelector:o,nodeId:i,isSelectable:s,nodeClickDistance:a}){const l=je(),[c,u]=h.useState(!1),f=h.useRef();return h.useEffect(()=>{f.current=GU({getStoreItems:()=>l.getState(),onNodeMouseDown:d=>{fh({id:d,store:l,nodeRef:e})},onDragStart:()=>{u(!0)},onDragStop:()=>{u(!1)}})},[]),h.useEffect(()=>{if(!(n||!e.current||!f.current))return f.current.update({noDragClassName:r,handleSelector:o,domNode:e.current,isSelectable:s,nodeId:i,nodeClickDistance:a}),()=>{var d;(d=f.current)==null||d.destroy()}},[r,o,n,s,e,i,a]),c}const dY=e=>n=>n.selected&&(n.draggable||e&&typeof n.draggable>"u");function Zk(){const e=je();return h.useCallback(r=>{const{nodeExtent:o,snapToGrid:i,snapGrid:s,nodesDraggable:a,onError:l,updateNodePositions:c,nodeLookup:u,nodeOrigin:f}=e.getState(),d=new Map,p=dY(a),m=i?s[0]:5,y=i?s[1]:5,b=r.direction.x*m*r.factor,_=r.direction.y*y*r.factor;for(const[,v]of u){if(!p(v))continue;let x={x:v.internals.positionAbsolute.x+b,y:v.internals.positionAbsolute.y+_};i&&(x=za(x,s));const{position:w,positionAbsolute:S}=gk({nodeId:v.id,nextPosition:x,nodeLookup:u,nodeExtent:o,nodeOrigin:f,onError:l});v.position=w,v.internals.positionAbsolute=S,d.set(v.id,v)}c(d)},[])}const Tg=h.createContext(null),fY=Tg.Provider;Tg.Consumer;const Qk=()=>h.useContext(Tg),pY=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),hY=(e,n,r)=>o=>{const{connectionClickStartHandle:i,connectionMode:s,connection:a}=o,{fromHandle:l,toHandle:c,isValid:u}=a,f=(c==null?void 0:c.nodeId)===e&&(c==null?void 0:c.id)===n&&(c==null?void 0:c.type)===r;return{connectingFrom:(l==null?void 0:l.nodeId)===e&&(l==null?void 0:l.id)===n&&(l==null?void 0:l.type)===r,connectingTo:f,clickConnecting:(i==null?void 0:i.nodeId)===e&&(i==null?void 0:i.id)===n&&(i==null?void 0:i.type)===r,isPossibleEndHandle:s===Ci.Strict?(l==null?void 0:l.type)!==r:e!==(l==null?void 0:l.nodeId)||n!==(l==null?void 0:l.id),connectionInProcess:!!l,clickConnectionInProcess:!!i,valid:f&&u}};function mY({type:e="source",position:n=le.Top,isValidConnection:r,isConnectable:o=!0,isConnectableStart:i=!0,isConnectableEnd:s=!0,id:a,onConnect:l,children:c,className:u,onMouseDown:f,onTouchStart:d,...p},m){var L,I;const y=a||null,b=e==="target",_=je(),v=Qk(),{connectOnClick:x,noPanClassName:w,rfId:S}=ge(pY,Re),{connectingFrom:C,connectingTo:E,clickConnecting:k,isPossibleEndHandle:N,connectionInProcess:M,clickConnectionInProcess:T,valid:A}=ge(hY(v,y,e),Re);v||(I=(L=_.getState()).onError)==null||I.call(L,"010",En.error010());const D=F=>{const{defaultEdgeOptions:R,onConnect:j,hasDefaultEdges:O}=_.getState(),G={...R,...F};if(O){const{edges:$,setEdges:X}=_.getState();X(RU(G,$))}j==null||j(G),l==null||l(G)},V=F=>{if(!v)return;const R=Ck(F.nativeEvent);if(i&&(R&&F.button===0||!R)){const j=_.getState();uh.onPointerDown(F.nativeEvent,{handleDomNode:F.currentTarget,autoPanOnConnect:j.autoPanOnConnect,connectionMode:j.connectionMode,connectionRadius:j.connectionRadius,domNode:j.domNode,nodeLookup:j.nodeLookup,lib:j.lib,isTarget:b,handleId:y,nodeId:v,flowId:j.rfId,panBy:j.panBy,cancelConnection:j.cancelConnection,onConnectStart:j.onConnectStart,onConnectEnd:(...O)=>{var G,$;return($=(G=_.getState()).onConnectEnd)==null?void 0:$.call(G,...O)},updateConnection:j.updateConnection,onConnect:D,isValidConnection:r||((...O)=>{var G,$;return(($=(G=_.getState()).isValidConnection)==null?void 0:$.call(G,...O))??!0}),getTransform:()=>_.getState().transform,getFromHandle:()=>_.getState().connection.fromHandle,autoPanSpeed:j.autoPanSpeed,dragThreshold:j.connectionDragThreshold})}R?f==null||f(F):d==null||d(F)},P=F=>{const{onClickConnectStart:R,onClickConnectEnd:j,connectionClickStartHandle:O,connectionMode:G,isValidConnection:$,lib:X,rfId:H,nodeLookup:W,connection:z}=_.getState();if(!v||!O&&!i)return;if(!O){R==null||R(F.nativeEvent,{nodeId:v,handleId:y,handleType:e}),_.setState({connectionClickStartHandle:{nodeId:v,type:e,id:y}});return}const U=_k(F.target),Y=r||$,{connection:K,isValid:Z}=uh.isValid(F.nativeEvent,{handle:{nodeId:v,id:y,type:e},connectionMode:G,fromNodeId:O.nodeId,fromHandleId:O.id||null,fromType:O.type,isValidConnection:Y,flowId:H,doc:U,lib:X,nodeLookup:W});Z&&K&&D(K);const ee=structuredClone(z);delete ee.inProgress,ee.toPosition=ee.toHandle?ee.toHandle.position:null,j==null||j(F,ee),_.setState({connectionClickStartHandle:null})};return g.jsx("div",{"data-handleid":y,"data-nodeid":v,"data-handlepos":n,"data-id":`${S}-${v}-${y}-${e}`,className:ze(["react-flow__handle",`react-flow__handle-${n}`,"nodrag",w,u,{source:!b,target:b,connectable:o,connectablestart:i,connectableend:s,clickconnecting:k,connectingfrom:C,connectingto:E,valid:A,connectionindicator:o&&(!M||N)&&(M||T?s:i)}]),onMouseDown:V,onTouchStart:V,onClick:x?P:void 0,ref:m,...p,children:c})}const ru=h.memo(Xk(mY));function gY({data:e,isConnectable:n,sourcePosition:r=le.Bottom}){return g.jsxs(g.Fragment,{children:[e==null?void 0:e.label,g.jsx(ru,{type:"source",position:r,isConnectable:n})]})}function yY({data:e,isConnectable:n,targetPosition:r=le.Top,sourcePosition:o=le.Bottom}){return g.jsxs(g.Fragment,{children:[g.jsx(ru,{type:"target",position:r,isConnectable:n}),e==null?void 0:e.label,g.jsx(ru,{type:"source",position:o,isConnectable:n})]})}function vY(){return null}function xY({data:e,isConnectable:n,targetPosition:r=le.Top}){return g.jsxs(g.Fragment,{children:[g.jsx(ru,{type:"target",position:r,isConnectable:n}),e==null?void 0:e.label]})}const ou={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},Dx={input:gY,default:yY,output:xY,group:vY};function wY(e){var n,r,o,i;return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??((n=e.style)==null?void 0:n.width),height:e.height??e.initialHeight??((r=e.style)==null?void 0:r.height)}:{width:e.width??((o=e.style)==null?void 0:o.width),height:e.height??((i=e.style)==null?void 0:i.height)}}const bY=e=>{const{width:n,height:r,x:o,y:i}=La(e.nodeLookup,{filter:s=>!!s.selected});return{width:tn(n)?n:null,height:tn(r)?r:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${o}px,${i}px)`}};function _Y({onSelectionContextMenu:e,noPanClassName:n,disableKeyboardA11y:r}){const o=je(),{width:i,height:s,transformString:a,userSelectionActive:l}=ge(bY,Re),c=Zk(),u=h.useRef(null);h.useEffect(()=>{var m;r||(m=u.current)==null||m.focus({preventScroll:!0})},[r]);const f=!l&&i!==null&&s!==null;if(qk({nodeRef:u,disabled:!f}),!f)return null;const d=e?m=>{const y=o.getState().nodes.filter(b=>b.selected);e(m,y)}:void 0,p=m=>{Object.prototype.hasOwnProperty.call(ou,m.key)&&(m.preventDefault(),c({direction:ou[m.key],factor:m.shiftKey?4:1}))};return g.jsx("div",{className:ze(["react-flow__nodesselection","react-flow__container",n]),style:{transform:a},children:g.jsx("div",{ref:u,className:"react-flow__nodesselection-rect",onContextMenu:d,tabIndex:r?void 0:-1,onKeyDown:r?void 0:p,style:{width:i,height:s}})})}const Lx=typeof window<"u"?window:void 0,SY=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function Jk({children:e,onPaneClick:n,onPaneMouseEnter:r,onPaneMouseMove:o,onPaneMouseLeave:i,onPaneContextMenu:s,onPaneScroll:a,paneClickDistance:l,deleteKeyCode:c,selectionKeyCode:u,selectionOnDrag:f,selectionMode:d,onSelectionStart:p,onSelectionEnd:m,multiSelectionKeyCode:y,panActivationKeyCode:b,zoomActivationKeyCode:_,elementsSelectable:v,zoomOnScroll:x,zoomOnPinch:w,panOnScroll:S,panOnScrollSpeed:C,panOnScrollMode:E,zoomOnDoubleClick:k,panOnDrag:N,defaultViewport:M,translateExtent:T,minZoom:A,maxZoom:D,preventScrolling:V,onSelectionContextMenu:P,noWheelClassName:L,noPanClassName:I,disableKeyboardA11y:F,onViewportChange:R,isControlledViewport:j}){const{nodesSelectionActive:O,userSelectionActive:G}=ge(SY,Re),$=pa(u,{target:Lx}),X=pa(b,{target:Lx}),H=X||N,W=X||S,z=f&&H!==!0,U=$||G||z;return rY({deleteKeyCode:c,multiSelectionKeyCode:y}),g.jsx(sY,{onPaneContextMenu:s,elementsSelectable:v,zoomOnScroll:x,zoomOnPinch:w,panOnScroll:W,panOnScrollSpeed:C,panOnScrollMode:E,zoomOnDoubleClick:k,panOnDrag:!$&&H,defaultViewport:M,translateExtent:T,minZoom:A,maxZoom:D,zoomActivationKeyCode:_,preventScrolling:V,noWheelClassName:L,noPanClassName:I,onViewportChange:R,isControlledViewport:j,paneClickDistance:l,selectionOnDrag:z,children:g.jsxs(uY,{onSelectionStart:p,onSelectionEnd:m,onPaneClick:n,onPaneMouseEnter:r,onPaneMouseMove:o,onPaneMouseLeave:i,onPaneContextMenu:s,onPaneScroll:a,panOnDrag:H,isSelecting:!!U,selectionMode:d,selectionKeyPressed:$,paneClickDistance:l,selectionOnDrag:z,children:[e,O&&g.jsx(_Y,{onSelectionContextMenu:P,noPanClassName:I,disableKeyboardA11y:F})]})})}Jk.displayName="FlowRenderer";const CY=h.memo(Jk),EY=e=>n=>e?Cg(n.nodeLookup,{x:0,y:0,width:n.width,height:n.height},n.transform,!0).map(r=>r.id):Array.from(n.nodeLookup.keys());function kY(e){return ge(h.useCallback(EY(e),[e]),Re)}const NY=e=>e.updateNodeInternals;function PY(){const e=ge(NY),[n]=h.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(r=>{const o=new Map;r.forEach(i=>{const s=i.target.getAttribute("data-id");o.set(s,{id:s,nodeElement:i.target,force:!0})}),e(o)}));return h.useEffect(()=>()=>{n==null||n.disconnect()},[n]),n}function MY({node:e,nodeType:n,hasDimensions:r,resizeObserver:o}){const i=je(),s=h.useRef(null),a=h.useRef(null),l=h.useRef(e.sourcePosition),c=h.useRef(e.targetPosition),u=h.useRef(n),f=r&&!!e.internals.handleBounds;return h.useEffect(()=>{s.current&&!e.hidden&&(!f||a.current!==s.current)&&(a.current&&(o==null||o.unobserve(a.current)),o==null||o.observe(s.current),a.current=s.current)},[f,e.hidden]),h.useEffect(()=>()=>{a.current&&(o==null||o.unobserve(a.current),a.current=null)},[]),h.useEffect(()=>{if(s.current){const d=u.current!==n,p=l.current!==e.sourcePosition,m=c.current!==e.targetPosition;(d||p||m)&&(u.current=n,l.current=e.sourcePosition,c.current=e.targetPosition,i.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:s.current,force:!0}]])))}},[e.id,n,e.sourcePosition,e.targetPosition]),s}function RY({id:e,onClick:n,onMouseEnter:r,onMouseMove:o,onMouseLeave:i,onContextMenu:s,onDoubleClick:a,nodesDraggable:l,elementsSelectable:c,nodesConnectable:u,nodesFocusable:f,resizeObserver:d,noDragClassName:p,noPanClassName:m,disableKeyboardA11y:y,rfId:b,nodeTypes:_,nodeClickDistance:v,onError:x}){const{node:w,internals:S,isParent:C}=ge(Y=>{const K=Y.nodeLookup.get(e),Z=Y.parentLookup.has(e);return{node:K,internals:K.internals,isParent:Z}},Re);let E=w.type||"default",k=(_==null?void 0:_[E])||Dx[E];k===void 0&&(x==null||x("003",En.error003(E)),E="default",k=(_==null?void 0:_.default)||Dx.default);const N=!!(w.draggable||l&&typeof w.draggable>"u"),M=!!(w.selectable||c&&typeof w.selectable>"u"),T=!!(w.connectable||u&&typeof w.connectable>"u"),A=!!(w.focusable||f&&typeof w.focusable>"u"),D=je(),V=wk(w),P=MY({node:w,nodeType:E,hasDimensions:V,resizeObserver:d}),L=qk({nodeRef:P,disabled:w.hidden||!N,noDragClassName:p,handleSelector:w.dragHandle,nodeId:e,isSelectable:M,nodeClickDistance:v}),I=Zk();if(w.hidden)return null;const F=Jn(w),R=wY(w),j=M||N||n||r||o||i,O=r?Y=>r(Y,{...S.userNode}):void 0,G=o?Y=>o(Y,{...S.userNode}):void 0,$=i?Y=>i(Y,{...S.userNode}):void 0,X=s?Y=>s(Y,{...S.userNode}):void 0,H=a?Y=>a(Y,{...S.userNode}):void 0,W=Y=>{const{selectNodesOnDrag:K,nodeDragThreshold:Z}=D.getState();M&&(!K||!N||Z>0)&&fh({id:e,store:D,nodeRef:P}),n&&n(Y,{...S.userNode})},z=Y=>{if(!(Sk(Y.nativeEvent)||y)){if(dk.includes(Y.key)&&M){const K=Y.key==="Escape";fh({id:e,store:D,unselect:K,nodeRef:P})}else if(N&&w.selected&&Object.prototype.hasOwnProperty.call(ou,Y.key)){Y.preventDefault();const{ariaLabelConfig:K}=D.getState();D.setState({ariaLiveMessage:K["node.a11yDescription.ariaLiveMessage"]({direction:Y.key.replace("Arrow","").toLowerCase(),x:~~S.positionAbsolute.x,y:~~S.positionAbsolute.y})}),I({direction:ou[Y.key],factor:Y.shiftKey?4:1})}}},U=()=>{var ce;if(y||!((ce=P.current)!=null&&ce.matches(":focus-visible")))return;const{transform:Y,width:K,height:Z,autoPanOnNodeFocus:ee,setCenter:Q}=D.getState();if(!ee)return;Cg(new Map([[e,w]]),{x:0,y:0,width:K,height:Z},Y,!0).length>0||Q(w.position.x+F.width/2,w.position.y+F.height/2,{zoom:Y[2]})};return g.jsx("div",{className:ze(["react-flow__node",`react-flow__node-${E}`,{[m]:N},w.className,{selected:w.selected,selectable:M,parent:C,draggable:N,dragging:L}]),ref:P,style:{zIndex:S.z,transform:`translate(${S.positionAbsolute.x}px,${S.positionAbsolute.y}px)`,pointerEvents:j?"all":"none",visibility:V?"visible":"hidden",...w.style,...R},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:O,onMouseMove:G,onMouseLeave:$,onContextMenu:X,onClick:W,onDoubleClick:H,onKeyDown:A?z:void 0,tabIndex:A?0:void 0,onFocus:A?U:void 0,role:w.ariaRole??(A?"group":void 0),"aria-roledescription":"node","aria-describedby":y?void 0:`${Wk}-${b}`,"aria-label":w.ariaLabel,...w.domAttributes,children:g.jsx(fY,{value:e,children:g.jsx(k,{id:e,data:w.data,type:E,positionAbsoluteX:S.positionAbsolute.x,positionAbsoluteY:S.positionAbsolute.y,selected:w.selected??!1,selectable:M,draggable:N,deletable:w.deletable??!0,isConnectable:T,sourcePosition:w.sourcePosition,targetPosition:w.targetPosition,dragging:L,dragHandle:w.dragHandle,zIndex:S.z,parentId:w.parentId,...F})})})}var jY=h.memo(RY);const AY=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function eN(e){const{nodesDraggable:n,nodesConnectable:r,nodesFocusable:o,elementsSelectable:i,onError:s}=ge(AY,Re),a=kY(e.onlyRenderVisibleElements),l=PY();return g.jsx("div",{className:"react-flow__nodes",style:dd,children:a.map(c=>g.jsx(jY,{id:c,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:l,nodesDraggable:n,nodesConnectable:r,nodesFocusable:o,elementsSelectable:i,nodeClickDistance:e.nodeClickDistance,onError:s},c))})}eN.displayName="NodeRenderer";const TY=h.memo(eN);function IY(e){return ge(h.useCallback(r=>{if(!e)return r.edges.map(i=>i.id);const o=[];if(r.width&&r.height)for(const i of r.edges){const s=r.nodeLookup.get(i.source),a=r.nodeLookup.get(i.target);s&&a&&NU({sourceNode:s,targetNode:a,width:r.width,height:r.height,transform:r.transform})&&o.push(i.id)}return o},[e]),Re)}const $Y=({color:e="none",strokeWidth:n=1})=>{const r={strokeWidth:n,...e&&{stroke:e}};return g.jsx("polyline",{className:"arrow",style:r,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},OY=({color:e="none",strokeWidth:n=1})=>{const r={strokeWidth:n,...e&&{stroke:e,fill:e}};return g.jsx("polyline",{className:"arrowclosed",style:r,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},zx={[eu.Arrow]:$Y,[eu.ArrowClosed]:OY};function DY(e){const n=je();return h.useMemo(()=>{var i,s;return Object.prototype.hasOwnProperty.call(zx,e)?zx[e]:((s=(i=n.getState()).onError)==null||s.call(i,"009",En.error009(e)),null)},[e])}const LY=({id:e,type:n,color:r,width:o=12.5,height:i=12.5,markerUnits:s="strokeWidth",strokeWidth:a,orient:l="auto-start-reverse"})=>{const c=DY(n);return c?g.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${o}`,markerHeight:`${i}`,viewBox:"-10 -10 20 20",markerUnits:s,orient:l,refX:"0",refY:"0",children:g.jsx(c,{color:r,strokeWidth:a})}):null},tN=({defaultColor:e,rfId:n})=>{const r=ge(s=>s.edges),o=ge(s=>s.defaultEdgeOptions),i=h.useMemo(()=>$U(r,{id:n,defaultColor:e,defaultMarkerStart:o==null?void 0:o.markerStart,defaultMarkerEnd:o==null?void 0:o.markerEnd}),[r,o,n,e]);return i.length?g.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:g.jsx("defs",{children:i.map(s=>g.jsx(LY,{id:s.id,type:s.type,color:s.color,width:s.width,height:s.height,markerUnits:s.markerUnits,strokeWidth:s.strokeWidth,orient:s.orient},s.id))})}):null};tN.displayName="MarkerDefinitions";var zY=h.memo(tN);function nN({x:e,y:n,label:r,labelStyle:o,labelShowBg:i=!0,labelBgStyle:s,labelBgPadding:a=[2,4],labelBgBorderRadius:l=2,children:c,className:u,...f}){const[d,p]=h.useState({x:1,y:0,width:0,height:0}),m=ze(["react-flow__edge-textwrapper",u]),y=h.useRef(null);return h.useEffect(()=>{if(y.current){const b=y.current.getBBox();p({x:b.x,y:b.y,width:b.width,height:b.height})}},[r]),r?g.jsxs("g",{transform:`translate(${e-d.width/2} ${n-d.height/2})`,className:m,visibility:d.width?"visible":"hidden",...f,children:[i&&g.jsx("rect",{width:d.width+2*a[0],x:-a[0],y:-a[1],height:d.height+2*a[1],className:"react-flow__edge-textbg",style:s,rx:l,ry:l}),g.jsx("text",{className:"react-flow__edge-text",y:d.height/2,dy:"0.3em",ref:y,style:o,children:r}),c]}):null}nN.displayName="EdgeText";const FY=h.memo(nN);function fd({path:e,labelX:n,labelY:r,label:o,labelStyle:i,labelShowBg:s,labelBgStyle:a,labelBgPadding:l,labelBgBorderRadius:c,interactionWidth:u=20,...f}){return g.jsxs(g.Fragment,{children:[g.jsx("path",{...f,d:e,fill:"none",className:ze(["react-flow__edge-path",f.className])}),u?g.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:u,className:"react-flow__edge-interaction"}):null,o&&tn(n)&&tn(r)?g.jsx(FY,{x:n,y:r,label:o,labelStyle:i,labelShowBg:s,labelBgStyle:a,labelBgPadding:l,labelBgBorderRadius:c}):null]})}function Fx({pos:e,x1:n,y1:r,x2:o,y2:i}){return e===le.Left||e===le.Right?[.5*(n+o),r]:[n,.5*(r+i)]}function rN({sourceX:e,sourceY:n,sourcePosition:r=le.Bottom,targetX:o,targetY:i,targetPosition:s=le.Top}){const[a,l]=Fx({pos:r,x1:e,y1:n,x2:o,y2:i}),[c,u]=Fx({pos:s,x1:o,y1:i,x2:e,y2:n}),[f,d,p,m]=Ek({sourceX:e,sourceY:n,targetX:o,targetY:i,sourceControlX:a,sourceControlY:l,targetControlX:c,targetControlY:u});return[`M${e},${n} C${a},${l} ${c},${u} ${o},${i}`,f,d,p,m]}function oN(e){return h.memo(({id:n,sourceX:r,sourceY:o,targetX:i,targetY:s,sourcePosition:a,targetPosition:l,label:c,labelStyle:u,labelShowBg:f,labelBgStyle:d,labelBgPadding:p,labelBgBorderRadius:m,style:y,markerEnd:b,markerStart:_,interactionWidth:v})=>{const[x,w,S]=rN({sourceX:r,sourceY:o,sourcePosition:a,targetX:i,targetY:s,targetPosition:l}),C=e.isInternal?void 0:n;return g.jsx(fd,{id:C,path:x,labelX:w,labelY:S,label:c,labelStyle:u,labelShowBg:f,labelBgStyle:d,labelBgPadding:p,labelBgBorderRadius:m,style:y,markerEnd:b,markerStart:_,interactionWidth:v})})}const VY=oN({isInternal:!1}),iN=oN({isInternal:!0});VY.displayName="SimpleBezierEdge";iN.displayName="SimpleBezierEdgeInternal";function sN(e){return h.memo(({id:n,sourceX:r,sourceY:o,targetX:i,targetY:s,label:a,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:f,labelBgBorderRadius:d,style:p,sourcePosition:m=le.Bottom,targetPosition:y=le.Top,markerEnd:b,markerStart:_,pathOptions:v,interactionWidth:x})=>{const[w,S,C]=ah({sourceX:r,sourceY:o,sourcePosition:m,targetX:i,targetY:s,targetPosition:y,borderRadius:v==null?void 0:v.borderRadius,offset:v==null?void 0:v.offset,stepPosition:v==null?void 0:v.stepPosition}),E=e.isInternal?void 0:n;return g.jsx(fd,{id:E,path:w,labelX:S,labelY:C,label:a,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:f,labelBgBorderRadius:d,style:p,markerEnd:b,markerStart:_,interactionWidth:x})})}const aN=sN({isInternal:!1}),lN=sN({isInternal:!0});aN.displayName="SmoothStepEdge";lN.displayName="SmoothStepEdgeInternal";function cN(e){return h.memo(({id:n,...r})=>{var i;const o=e.isInternal?void 0:n;return g.jsx(aN,{...r,id:o,pathOptions:h.useMemo(()=>{var s;return{borderRadius:0,offset:(s=r.pathOptions)==null?void 0:s.offset}},[(i=r.pathOptions)==null?void 0:i.offset])})})}const BY=cN({isInternal:!1}),uN=cN({isInternal:!0});BY.displayName="StepEdge";uN.displayName="StepEdgeInternal";function dN(e){return h.memo(({id:n,sourceX:r,sourceY:o,targetX:i,targetY:s,label:a,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:f,labelBgBorderRadius:d,style:p,markerEnd:m,markerStart:y,interactionWidth:b})=>{const[_,v,x]=Pk({sourceX:r,sourceY:o,targetX:i,targetY:s}),w=e.isInternal?void 0:n;return g.jsx(fd,{id:w,path:_,labelX:v,labelY:x,label:a,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:f,labelBgBorderRadius:d,style:p,markerEnd:m,markerStart:y,interactionWidth:b})})}const HY=dN({isInternal:!1}),fN=dN({isInternal:!0});HY.displayName="StraightEdge";fN.displayName="StraightEdgeInternal";function pN(e){return h.memo(({id:n,sourceX:r,sourceY:o,targetX:i,targetY:s,sourcePosition:a=le.Bottom,targetPosition:l=le.Top,label:c,labelStyle:u,labelShowBg:f,labelBgStyle:d,labelBgPadding:p,labelBgBorderRadius:m,style:y,markerEnd:b,markerStart:_,pathOptions:v,interactionWidth:x})=>{const[w,S,C]=kk({sourceX:r,sourceY:o,sourcePosition:a,targetX:i,targetY:s,targetPosition:l,curvature:v==null?void 0:v.curvature}),E=e.isInternal?void 0:n;return g.jsx(fd,{id:E,path:w,labelX:S,labelY:C,label:c,labelStyle:u,labelShowBg:f,labelBgStyle:d,labelBgPadding:p,labelBgBorderRadius:m,style:y,markerEnd:b,markerStart:_,interactionWidth:x})})}const WY=pN({isInternal:!1}),hN=pN({isInternal:!0});WY.displayName="BezierEdge";hN.displayName="BezierEdgeInternal";const Vx={default:hN,straight:fN,step:uN,smoothstep:lN,simplebezier:iN},Bx={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},UY=(e,n,r)=>r===le.Left?e-n:r===le.Right?e+n:e,GY=(e,n,r)=>r===le.Top?e-n:r===le.Bottom?e+n:e,Hx="react-flow__edgeupdater";function Wx({position:e,centerX:n,centerY:r,radius:o=10,onMouseDown:i,onMouseEnter:s,onMouseOut:a,type:l}){return g.jsx("circle",{onMouseDown:i,onMouseEnter:s,onMouseOut:a,className:ze([Hx,`${Hx}-${l}`]),cx:UY(n,o,e),cy:GY(r,o,e),r:o,stroke:"transparent",fill:"transparent"})}function YY({isReconnectable:e,reconnectRadius:n,edge:r,sourceX:o,sourceY:i,targetX:s,targetY:a,sourcePosition:l,targetPosition:c,onReconnect:u,onReconnectStart:f,onReconnectEnd:d,setReconnecting:p,setUpdateHover:m}){const y=je(),b=(S,C)=>{if(S.button!==0)return;const{autoPanOnConnect:E,domNode:k,connectionMode:N,connectionRadius:M,lib:T,onConnectStart:A,cancelConnection:D,nodeLookup:V,rfId:P,panBy:L,updateConnection:I}=y.getState(),F=C.type==="target",R=(G,$)=>{p(!1),d==null||d(G,r,C.type,$)},j=G=>u==null?void 0:u(r,G),O=(G,$)=>{p(!0),f==null||f(S,r,C.type),A==null||A(G,$)};uh.onPointerDown(S.nativeEvent,{autoPanOnConnect:E,connectionMode:N,connectionRadius:M,domNode:k,handleId:C.id,nodeId:C.nodeId,nodeLookup:V,isTarget:F,edgeUpdaterType:C.type,lib:T,flowId:P,cancelConnection:D,panBy:L,isValidConnection:(...G)=>{var $,X;return((X=($=y.getState()).isValidConnection)==null?void 0:X.call($,...G))??!0},onConnect:j,onConnectStart:O,onConnectEnd:(...G)=>{var $,X;return(X=($=y.getState()).onConnectEnd)==null?void 0:X.call($,...G)},onReconnectEnd:R,updateConnection:I,getTransform:()=>y.getState().transform,getFromHandle:()=>y.getState().connection.fromHandle,dragThreshold:y.getState().connectionDragThreshold,handleDomNode:S.currentTarget})},_=S=>b(S,{nodeId:r.target,id:r.targetHandle??null,type:"target"}),v=S=>b(S,{nodeId:r.source,id:r.sourceHandle??null,type:"source"}),x=()=>m(!0),w=()=>m(!1);return g.jsxs(g.Fragment,{children:[(e===!0||e==="source")&&g.jsx(Wx,{position:l,centerX:o,centerY:i,radius:n,onMouseDown:_,onMouseEnter:x,onMouseOut:w,type:"source"}),(e===!0||e==="target")&&g.jsx(Wx,{position:c,centerX:s,centerY:a,radius:n,onMouseDown:v,onMouseEnter:x,onMouseOut:w,type:"target"})]})}function XY({id:e,edgesFocusable:n,edgesReconnectable:r,elementsSelectable:o,onClick:i,onDoubleClick:s,onContextMenu:a,onMouseEnter:l,onMouseMove:c,onMouseLeave:u,reconnectRadius:f,onReconnect:d,onReconnectStart:p,onReconnectEnd:m,rfId:y,edgeTypes:b,noPanClassName:_,onError:v,disableKeyboardA11y:x}){let w=ge(Q=>Q.edgeLookup.get(e));const S=ge(Q=>Q.defaultEdgeOptions);w=S?{...S,...w}:w;let C=w.type||"default",E=(b==null?void 0:b[C])||Vx[C];E===void 0&&(v==null||v("011",En.error011(C)),C="default",E=(b==null?void 0:b.default)||Vx.default);const k=!!(w.focusable||n&&typeof w.focusable>"u"),N=typeof d<"u"&&(w.reconnectable||r&&typeof w.reconnectable>"u"),M=!!(w.selectable||o&&typeof w.selectable>"u"),T=h.useRef(null),[A,D]=h.useState(!1),[V,P]=h.useState(!1),L=je(),{zIndex:I,sourceX:F,sourceY:R,targetX:j,targetY:O,sourcePosition:G,targetPosition:$}=ge(h.useCallback(Q=>{const te=Q.nodeLookup.get(w.source),ce=Q.nodeLookup.get(w.target);if(!te||!ce)return{zIndex:w.zIndex,...Bx};const me=IU({id:e,sourceNode:te,targetNode:ce,sourceHandle:w.sourceHandle||null,targetHandle:w.targetHandle||null,connectionMode:Q.connectionMode,onError:v});return{zIndex:kU({selected:w.selected,zIndex:w.zIndex,sourceNode:te,targetNode:ce,elevateOnSelect:Q.elevateEdgesOnSelect,zIndexMode:Q.zIndexMode}),...me||Bx}},[w.source,w.target,w.sourceHandle,w.targetHandle,w.selected,w.zIndex]),Re),X=h.useMemo(()=>w.markerStart?`url('#${lh(w.markerStart,y)}')`:void 0,[w.markerStart,y]),H=h.useMemo(()=>w.markerEnd?`url('#${lh(w.markerEnd,y)}')`:void 0,[w.markerEnd,y]);if(w.hidden||F===null||R===null||j===null||O===null)return null;const W=Q=>{var ue;const{addSelectedEdges:te,unselectNodesAndEdges:ce,multiSelectionActive:me}=L.getState();M&&(L.setState({nodesSelectionActive:!1}),w.selected&&me?(ce({nodes:[],edges:[w]}),(ue=T.current)==null||ue.blur()):te([e])),i&&i(Q,w)},z=s?Q=>{s(Q,{...w})}:void 0,U=a?Q=>{a(Q,{...w})}:void 0,Y=l?Q=>{l(Q,{...w})}:void 0,K=c?Q=>{c(Q,{...w})}:void 0,Z=u?Q=>{u(Q,{...w})}:void 0,ee=Q=>{var te;if(!x&&dk.includes(Q.key)&&M){const{unselectNodesAndEdges:ce,addSelectedEdges:me}=L.getState();Q.key==="Escape"?((te=T.current)==null||te.blur(),ce({edges:[w]})):me([e])}};return g.jsx("svg",{style:{zIndex:I},children:g.jsxs("g",{className:ze(["react-flow__edge",`react-flow__edge-${C}`,w.className,_,{selected:w.selected,animated:w.animated,inactive:!M&&!i,updating:A,selectable:M}]),onClick:W,onDoubleClick:z,onContextMenu:U,onMouseEnter:Y,onMouseMove:K,onMouseLeave:Z,onKeyDown:k?ee:void 0,tabIndex:k?0:void 0,role:w.ariaRole??(k?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":w.ariaLabel===null?void 0:w.ariaLabel||`Edge from ${w.source} to ${w.target}`,"aria-describedby":k?`${Uk}-${y}`:void 0,ref:T,...w.domAttributes,children:[!V&&g.jsx(E,{id:e,source:w.source,target:w.target,type:w.type,selected:w.selected,animated:w.animated,selectable:M,deletable:w.deletable??!0,label:w.label,labelStyle:w.labelStyle,labelShowBg:w.labelShowBg,labelBgStyle:w.labelBgStyle,labelBgPadding:w.labelBgPadding,labelBgBorderRadius:w.labelBgBorderRadius,sourceX:F,sourceY:R,targetX:j,targetY:O,sourcePosition:G,targetPosition:$,data:w.data,style:w.style,sourceHandleId:w.sourceHandle,targetHandleId:w.targetHandle,markerStart:X,markerEnd:H,pathOptions:"pathOptions"in w?w.pathOptions:void 0,interactionWidth:w.interactionWidth}),N&&g.jsx(YY,{edge:w,isReconnectable:N,reconnectRadius:f,onReconnect:d,onReconnectStart:p,onReconnectEnd:m,sourceX:F,sourceY:R,targetX:j,targetY:O,sourcePosition:G,targetPosition:$,setUpdateHover:D,setReconnecting:P})]})})}var KY=h.memo(XY);const qY=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function mN({defaultMarkerColor:e,onlyRenderVisibleElements:n,rfId:r,edgeTypes:o,noPanClassName:i,onReconnect:s,onEdgeContextMenu:a,onEdgeMouseEnter:l,onEdgeMouseMove:c,onEdgeMouseLeave:u,onEdgeClick:f,reconnectRadius:d,onEdgeDoubleClick:p,onReconnectStart:m,onReconnectEnd:y,disableKeyboardA11y:b}){const{edgesFocusable:_,edgesReconnectable:v,elementsSelectable:x,onError:w}=ge(qY,Re),S=IY(n);return g.jsxs("div",{className:"react-flow__edges",children:[g.jsx(zY,{defaultColor:e,rfId:r}),S.map(C=>g.jsx(KY,{id:C,edgesFocusable:_,edgesReconnectable:v,elementsSelectable:x,noPanClassName:i,onReconnect:s,onContextMenu:a,onMouseEnter:l,onMouseMove:c,onMouseLeave:u,onClick:f,reconnectRadius:d,onDoubleClick:p,onReconnectStart:m,onReconnectEnd:y,rfId:r,onError:w,edgeTypes:o,disableKeyboardA11y:b},C))]})}mN.displayName="EdgeRenderer";const ZY=h.memo(mN),QY=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function JY({children:e}){const n=ge(QY);return g.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:n},children:e})}function eX(e){const n=Ag(),r=h.useRef(!1);h.useEffect(()=>{!r.current&&n.viewportInitialized&&e&&(setTimeout(()=>e(n),1),r.current=!0)},[e,n.viewportInitialized])}const tX=e=>{var n;return(n=e.panZoom)==null?void 0:n.syncViewport};function nX(e){const n=ge(tX),r=je();return h.useEffect(()=>{e&&(n==null||n(e),r.setState({transform:[e.x,e.y,e.zoom]}))},[e,n]),null}function rX(e){return e.connection.inProgress?{...e.connection,to:Fa(e.connection.to,e.transform)}:{...e.connection}}function oX(e){return rX}function iX(e){const n=oX();return ge(n,Re)}const sX=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function aX({containerStyle:e,style:n,type:r,component:o}){const{nodesConnectable:i,width:s,height:a,isValid:l,inProgress:c}=ge(sX,Re);return!(s&&i&&c)?null:g.jsx("svg",{style:e,width:s,height:a,className:"react-flow__connectionline react-flow__container",children:g.jsx("g",{className:ze(["react-flow__connection",hk(l)]),children:g.jsx(gN,{style:n,type:r,CustomComponent:o,isValid:l})})})}const gN=({style:e,type:n=hr.Bezier,CustomComponent:r,isValid:o})=>{const{inProgress:i,from:s,fromNode:a,fromHandle:l,fromPosition:c,to:u,toNode:f,toHandle:d,toPosition:p,pointer:m}=iX();if(!i)return;if(r)return g.jsx(r,{connectionLineType:n,connectionLineStyle:e,fromNode:a,fromHandle:l,fromX:s.x,fromY:s.y,toX:u.x,toY:u.y,fromPosition:c,toPosition:p,connectionStatus:hk(o),toNode:f,toHandle:d,pointer:m});let y="";const b={sourceX:s.x,sourceY:s.y,sourcePosition:c,targetX:u.x,targetY:u.y,targetPosition:p};switch(n){case hr.Bezier:[y]=kk(b);break;case hr.SimpleBezier:[y]=rN(b);break;case hr.Step:[y]=ah({...b,borderRadius:0});break;case hr.SmoothStep:[y]=ah(b);break;default:[y]=Pk(b)}return g.jsx("path",{d:y,fill:"none",className:"react-flow__connection-path",style:e})};gN.displayName="ConnectionLine";const lX={};function Ux(e=lX){h.useRef(e),je(),h.useEffect(()=>{},[e])}function cX(){je(),h.useRef(!1),h.useEffect(()=>{},[])}function yN({nodeTypes:e,edgeTypes:n,onInit:r,onNodeClick:o,onEdgeClick:i,onNodeDoubleClick:s,onEdgeDoubleClick:a,onNodeMouseEnter:l,onNodeMouseMove:c,onNodeMouseLeave:u,onNodeContextMenu:f,onSelectionContextMenu:d,onSelectionStart:p,onSelectionEnd:m,connectionLineType:y,connectionLineStyle:b,connectionLineComponent:_,connectionLineContainerStyle:v,selectionKeyCode:x,selectionOnDrag:w,selectionMode:S,multiSelectionKeyCode:C,panActivationKeyCode:E,zoomActivationKeyCode:k,deleteKeyCode:N,onlyRenderVisibleElements:M,elementsSelectable:T,defaultViewport:A,translateExtent:D,minZoom:V,maxZoom:P,preventScrolling:L,defaultMarkerColor:I,zoomOnScroll:F,zoomOnPinch:R,panOnScroll:j,panOnScrollSpeed:O,panOnScrollMode:G,zoomOnDoubleClick:$,panOnDrag:X,onPaneClick:H,onPaneMouseEnter:W,onPaneMouseMove:z,onPaneMouseLeave:U,onPaneScroll:Y,onPaneContextMenu:K,paneClickDistance:Z,nodeClickDistance:ee,onEdgeContextMenu:Q,onEdgeMouseEnter:te,onEdgeMouseMove:ce,onEdgeMouseLeave:me,reconnectRadius:ue,onReconnect:ye,onReconnectStart:dn,onReconnectEnd:ut,noDragClassName:Wr,noWheelClassName:Fi,noPanClassName:Vi,disableKeyboardA11y:Bi,nodeExtent:hd,rfId:Va,viewport:ko,onViewportChange:Hi}){return Ux(e),Ux(n),cX(),eX(r),nX(ko),g.jsx(CY,{onPaneClick:H,onPaneMouseEnter:W,onPaneMouseMove:z,onPaneMouseLeave:U,onPaneContextMenu:K,onPaneScroll:Y,paneClickDistance:Z,deleteKeyCode:N,selectionKeyCode:x,selectionOnDrag:w,selectionMode:S,onSelectionStart:p,onSelectionEnd:m,multiSelectionKeyCode:C,panActivationKeyCode:E,zoomActivationKeyCode:k,elementsSelectable:T,zoomOnScroll:F,zoomOnPinch:R,zoomOnDoubleClick:$,panOnScroll:j,panOnScrollSpeed:O,panOnScrollMode:G,panOnDrag:X,defaultViewport:A,translateExtent:D,minZoom:V,maxZoom:P,onSelectionContextMenu:d,preventScrolling:L,noDragClassName:Wr,noWheelClassName:Fi,noPanClassName:Vi,disableKeyboardA11y:Bi,onViewportChange:Hi,isControlledViewport:!!ko,children:g.jsxs(JY,{children:[g.jsx(ZY,{edgeTypes:n,onEdgeClick:i,onEdgeDoubleClick:a,onReconnect:ye,onReconnectStart:dn,onReconnectEnd:ut,onlyRenderVisibleElements:M,onEdgeContextMenu:Q,onEdgeMouseEnter:te,onEdgeMouseMove:ce,onEdgeMouseLeave:me,reconnectRadius:ue,defaultMarkerColor:I,noPanClassName:Vi,disableKeyboardA11y:Bi,rfId:Va}),g.jsx(aX,{style:b,type:y,component:_,containerStyle:v}),g.jsx("div",{className:"react-flow__edgelabel-renderer"}),g.jsx(TY,{nodeTypes:e,onNodeClick:o,onNodeDoubleClick:s,onNodeMouseEnter:l,onNodeMouseMove:c,onNodeMouseLeave:u,onNodeContextMenu:f,nodeClickDistance:ee,onlyRenderVisibleElements:M,noPanClassName:Vi,noDragClassName:Wr,disableKeyboardA11y:Bi,nodeExtent:hd,rfId:Va}),g.jsx("div",{className:"react-flow__viewport-portal"})]})})}yN.displayName="GraphView";const uX=h.memo(yN),Gx=({nodes:e,edges:n,defaultNodes:r,defaultEdges:o,width:i,height:s,fitView:a,fitViewOptions:l,minZoom:c=.5,maxZoom:u=2,nodeOrigin:f,nodeExtent:d,zIndexMode:p="basic"}={})=>{const m=new Map,y=new Map,b=new Map,_=new Map,v=o??n??[],x=r??e??[],w=f??[0,0],S=d??ca;jk(b,_,v);const{nodesInitialized:C}=ch(x,m,y,{nodeOrigin:w,nodeExtent:S,zIndexMode:p});let E=[0,0,1];if(a&&i&&s){const k=La(m,{filter:A=>!!((A.width||A.initialWidth)&&(A.height||A.initialHeight))}),{x:N,y:M,zoom:T}=Eg(k,i,s,c,u,(l==null?void 0:l.padding)??.1);E=[N,M,T]}return{rfId:"1",width:i??0,height:s??0,transform:E,nodes:x,nodesInitialized:C,nodeLookup:m,parentLookup:y,edges:v,edgeLookup:_,connectionLookup:b,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:r!==void 0,hasDefaultEdges:o!==void 0,panZoom:null,minZoom:c,maxZoom:u,translateExtent:ca,nodeExtent:S,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Ci.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:w,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:a??!1,fitViewOptions:l,fitViewResolver:null,connection:{...pk},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:wU,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:fk,zIndexMode:p,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},dX=({nodes:e,edges:n,defaultNodes:r,defaultEdges:o,width:i,height:s,fitView:a,fitViewOptions:l,minZoom:c,maxZoom:u,nodeOrigin:f,nodeExtent:d,zIndexMode:p})=>PG((m,y)=>{async function b(){const{nodeLookup:_,panZoom:v,fitViewOptions:x,fitViewResolver:w,width:S,height:C,minZoom:E,maxZoom:k}=y();v&&(await vU({nodes:_,width:S,height:C,panZoom:v,minZoom:E,maxZoom:k},x),w==null||w.resolve(!0),m({fitViewResolver:null}))}return{...Gx({nodes:e,edges:n,width:i,height:s,fitView:a,fitViewOptions:l,minZoom:c,maxZoom:u,nodeOrigin:f,nodeExtent:d,defaultNodes:r,defaultEdges:o,zIndexMode:p}),setNodes:_=>{const{nodeLookup:v,parentLookup:x,nodeOrigin:w,elevateNodesOnSelect:S,fitViewQueued:C,zIndexMode:E,nodesSelectionActive:k}=y(),{nodesInitialized:N,hasSelectedNodes:M}=ch(_,v,x,{nodeOrigin:w,nodeExtent:d,elevateNodesOnSelect:S,checkEquality:!0,zIndexMode:E}),T=k&&M;C&&N?(b(),m({nodes:_,nodesInitialized:N,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:T})):m({nodes:_,nodesInitialized:N,nodesSelectionActive:T})},setEdges:_=>{const{connectionLookup:v,edgeLookup:x}=y();jk(v,x,_),m({edges:_})},setDefaultNodesAndEdges:(_,v)=>{if(_){const{setNodes:x}=y();x(_),m({hasDefaultNodes:!0})}if(v){const{setEdges:x}=y();x(v),m({hasDefaultEdges:!0})}},updateNodeInternals:_=>{const{triggerNodeChanges:v,nodeLookup:x,parentLookup:w,domNode:S,nodeOrigin:C,nodeExtent:E,debug:k,fitViewQueued:N,zIndexMode:M}=y(),{changes:T,updatedInternals:A}=BU(_,x,w,S,C,E,M);A&&(LU(x,w,{nodeOrigin:C,nodeExtent:E,zIndexMode:M}),N?(b(),m({fitViewQueued:!1,fitViewOptions:void 0})):m({}),(T==null?void 0:T.length)>0&&(k&&console.log("React Flow: trigger node changes",T),v==null||v(T)))},updateNodePositions:(_,v=!1)=>{const x=[];let w=[];const{nodeLookup:S,triggerNodeChanges:C,connection:E,updateConnection:k,onNodesChangeMiddlewareMap:N}=y();for(const[M,T]of _){const A=S.get(M),D=!!(A!=null&&A.expandParent&&(A!=null&&A.parentId)&&(T!=null&&T.position)),V={id:M,type:"position",position:D?{x:Math.max(0,T.position.x),y:Math.max(0,T.position.y)}:T.position,dragging:v};if(A&&E.inProgress&&E.fromNode.id===A.id){const P=xo(A,E.fromHandle,le.Left,!0);k({...E,from:P})}D&&A.parentId&&x.push({id:M,parentId:A.parentId,rect:{...T.internals.positionAbsolute,width:T.measured.width??0,height:T.measured.height??0}}),w.push(V)}if(x.length>0){const{parentLookup:M,nodeOrigin:T}=y(),A=jg(x,S,M,T);w.push(...A)}for(const M of N.values())w=M(w);C(w)},triggerNodeChanges:_=>{const{onNodesChange:v,setNodes:x,nodes:w,hasDefaultNodes:S,debug:C}=y();if(_!=null&&_.length){if(S){const E=KG(_,w);x(E)}C&&console.log("React Flow: trigger node changes",_),v==null||v(_)}},triggerEdgeChanges:_=>{const{onEdgesChange:v,setEdges:x,edges:w,hasDefaultEdges:S,debug:C}=y();if(_!=null&&_.length){if(S){const E=qG(_,w);x(E)}C&&console.log("React Flow: trigger edge changes",_),v==null||v(_)}},addSelectedNodes:_=>{const{multiSelectionActive:v,edgeLookup:x,nodeLookup:w,triggerNodeChanges:S,triggerEdgeChanges:C}=y();if(v){const E=_.map(k=>qr(k,!0));S(E);return}S(Qo(w,new Set([..._]),!0)),C(Qo(x))},addSelectedEdges:_=>{const{multiSelectionActive:v,edgeLookup:x,nodeLookup:w,triggerNodeChanges:S,triggerEdgeChanges:C}=y();if(v){const E=_.map(k=>qr(k,!0));C(E);return}C(Qo(x,new Set([..._]))),S(Qo(w,new Set,!0))},unselectNodesAndEdges:({nodes:_,edges:v}={})=>{const{edges:x,nodes:w,nodeLookup:S,triggerNodeChanges:C,triggerEdgeChanges:E}=y(),k=_||w,N=v||x,M=[];for(const A of k){if(!A.selected)continue;const D=S.get(A.id);D&&(D.selected=!1),M.push(qr(A.id,!1))}const T=[];for(const A of N)A.selected&&T.push(qr(A.id,!1));C(M),E(T)},setMinZoom:_=>{const{panZoom:v,maxZoom:x}=y();v==null||v.setScaleExtent([_,x]),m({minZoom:_})},setMaxZoom:_=>{const{panZoom:v,minZoom:x}=y();v==null||v.setScaleExtent([x,_]),m({maxZoom:_})},setTranslateExtent:_=>{var v;(v=y().panZoom)==null||v.setTranslateExtent(_),m({translateExtent:_})},resetSelectedElements:()=>{const{edges:_,nodes:v,triggerNodeChanges:x,triggerEdgeChanges:w,elementsSelectable:S}=y();if(!S)return;const C=v.reduce((k,N)=>N.selected?[...k,qr(N.id,!1)]:k,[]),E=_.reduce((k,N)=>N.selected?[...k,qr(N.id,!1)]:k,[]);x(C),w(E)},setNodeExtent:_=>{const{nodes:v,nodeLookup:x,parentLookup:w,nodeOrigin:S,elevateNodesOnSelect:C,nodeExtent:E,zIndexMode:k}=y();_[0][0]===E[0][0]&&_[0][1]===E[0][1]&&_[1][0]===E[1][0]&&_[1][1]===E[1][1]||(ch(v,x,w,{nodeOrigin:S,nodeExtent:_,elevateNodesOnSelect:C,checkEquality:!1,zIndexMode:k}),m({nodeExtent:_}))},panBy:_=>{const{transform:v,width:x,height:w,panZoom:S,translateExtent:C}=y();return HU({delta:_,panZoom:S,transform:v,translateExtent:C,width:x,height:w})},setCenter:async(_,v,x)=>{const{width:w,height:S,maxZoom:C,panZoom:E}=y();if(!E)return Promise.resolve(!1);const k=typeof(x==null?void 0:x.zoom)<"u"?x.zoom:C;return await E.setViewport({x:w/2-_*k,y:S/2-v*k,zoom:k},{duration:x==null?void 0:x.duration,ease:x==null?void 0:x.ease,interpolate:x==null?void 0:x.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{m({connection:{...pk}})},updateConnection:_=>{m({connection:_})},reset:()=>m({...Gx()})}},Object.is);function pd({initialNodes:e,initialEdges:n,defaultNodes:r,defaultEdges:o,initialWidth:i,initialHeight:s,initialMinZoom:a,initialMaxZoom:l,initialFitViewOptions:c,fitView:u,nodeOrigin:f,nodeExtent:d,zIndexMode:p,children:m}){const[y]=h.useState(()=>dX({nodes:e,edges:n,defaultNodes:r,defaultEdges:o,width:i,height:s,fitView:u,minZoom:a,maxZoom:l,fitViewOptions:c,nodeOrigin:f,nodeExtent:d,zIndexMode:p}));return g.jsx(MG,{value:y,children:g.jsx(JG,{children:m})})}function fX({children:e,nodes:n,edges:r,defaultNodes:o,defaultEdges:i,width:s,height:a,fitView:l,fitViewOptions:c,minZoom:u,maxZoom:f,nodeOrigin:d,nodeExtent:p,zIndexMode:m}){return h.useContext(cd)?g.jsx(g.Fragment,{children:e}):g.jsx(pd,{initialNodes:n,initialEdges:r,defaultNodes:o,defaultEdges:i,initialWidth:s,initialHeight:a,fitView:l,initialFitViewOptions:c,initialMinZoom:u,initialMaxZoom:f,nodeOrigin:d,nodeExtent:p,zIndexMode:m,children:e})}const pX={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function hX({nodes:e,edges:n,defaultNodes:r,defaultEdges:o,className:i,nodeTypes:s,edgeTypes:a,onNodeClick:l,onEdgeClick:c,onInit:u,onMove:f,onMoveStart:d,onMoveEnd:p,onConnect:m,onConnectStart:y,onConnectEnd:b,onClickConnectStart:_,onClickConnectEnd:v,onNodeMouseEnter:x,onNodeMouseMove:w,onNodeMouseLeave:S,onNodeContextMenu:C,onNodeDoubleClick:E,onNodeDragStart:k,onNodeDrag:N,onNodeDragStop:M,onNodesDelete:T,onEdgesDelete:A,onDelete:D,onSelectionChange:V,onSelectionDragStart:P,onSelectionDrag:L,onSelectionDragStop:I,onSelectionContextMenu:F,onSelectionStart:R,onSelectionEnd:j,onBeforeDelete:O,connectionMode:G,connectionLineType:$=hr.Bezier,connectionLineStyle:X,connectionLineComponent:H,connectionLineContainerStyle:W,deleteKeyCode:z="Backspace",selectionKeyCode:U="Shift",selectionOnDrag:Y=!1,selectionMode:K=ua.Full,panActivationKeyCode:Z="Space",multiSelectionKeyCode:ee=fa()?"Meta":"Control",zoomActivationKeyCode:Q=fa()?"Meta":"Control",snapToGrid:te,snapGrid:ce,onlyRenderVisibleElements:me=!1,selectNodesOnDrag:ue,nodesDraggable:ye,autoPanOnNodeFocus:dn,nodesConnectable:ut,nodesFocusable:Wr,nodeOrigin:Fi=Gk,edgesFocusable:Vi,edgesReconnectable:Bi,elementsSelectable:hd=!0,defaultViewport:Va=BG,minZoom:ko=.5,maxZoom:Hi=2,translateExtent:Lg=ca,preventScrolling:_N=!0,nodeExtent:md,defaultMarkerColor:SN="#b1b1b7",zoomOnScroll:CN=!0,zoomOnPinch:EN=!0,panOnScroll:kN=!1,panOnScrollSpeed:NN=.5,panOnScrollMode:PN=io.Free,zoomOnDoubleClick:MN=!0,panOnDrag:RN=!0,onPaneClick:jN,onPaneMouseEnter:AN,onPaneMouseMove:TN,onPaneMouseLeave:IN,onPaneScroll:$N,onPaneContextMenu:ON,paneClickDistance:DN=1,nodeClickDistance:LN=0,children:zN,onReconnect:FN,onReconnectStart:VN,onReconnectEnd:BN,onEdgeContextMenu:HN,onEdgeDoubleClick:WN,onEdgeMouseEnter:UN,onEdgeMouseMove:GN,onEdgeMouseLeave:YN,reconnectRadius:XN=10,onNodesChange:KN,onEdgesChange:qN,noDragClassName:ZN="nodrag",noWheelClassName:QN="nowheel",noPanClassName:zg="nopan",fitView:Fg,fitViewOptions:Vg,connectOnClick:JN,attributionPosition:eP,proOptions:tP,defaultEdgeOptions:nP,elevateNodesOnSelect:rP=!0,elevateEdgesOnSelect:oP=!1,disableKeyboardA11y:Bg=!1,autoPanOnConnect:iP,autoPanOnNodeDrag:sP,autoPanSpeed:aP,connectionRadius:lP,isValidConnection:cP,onError:uP,style:dP,id:Hg,nodeDragThreshold:fP,connectionDragThreshold:pP,viewport:hP,onViewportChange:mP,width:gP,height:yP,colorMode:vP="light",debug:xP,onScroll:Ba,ariaLabelConfig:wP,zIndexMode:Wg="basic",...bP},_P){const gd=Hg||"1",SP=GG(vP),CP=h.useCallback(Ug=>{Ug.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),Ba==null||Ba(Ug)},[Ba]);return g.jsx("div",{"data-testid":"rf__wrapper",...bP,onScroll:CP,style:{...dP,...pX},ref:_P,className:ze(["react-flow",i,SP]),id:Hg,role:"application",children:g.jsxs(fX,{nodes:e,edges:n,width:gP,height:yP,fitView:Fg,fitViewOptions:Vg,minZoom:ko,maxZoom:Hi,nodeOrigin:Fi,nodeExtent:md,zIndexMode:Wg,children:[g.jsx(UG,{nodes:e,edges:n,defaultNodes:r,defaultEdges:o,onConnect:m,onConnectStart:y,onConnectEnd:b,onClickConnectStart:_,onClickConnectEnd:v,nodesDraggable:ye,autoPanOnNodeFocus:dn,nodesConnectable:ut,nodesFocusable:Wr,edgesFocusable:Vi,edgesReconnectable:Bi,elementsSelectable:hd,elevateNodesOnSelect:rP,elevateEdgesOnSelect:oP,minZoom:ko,maxZoom:Hi,nodeExtent:md,onNodesChange:KN,onEdgesChange:qN,snapToGrid:te,snapGrid:ce,connectionMode:G,translateExtent:Lg,connectOnClick:JN,defaultEdgeOptions:nP,fitView:Fg,fitViewOptions:Vg,onNodesDelete:T,onEdgesDelete:A,onDelete:D,onNodeDragStart:k,onNodeDrag:N,onNodeDragStop:M,onSelectionDrag:L,onSelectionDragStart:P,onSelectionDragStop:I,onMove:f,onMoveStart:d,onMoveEnd:p,noPanClassName:zg,nodeOrigin:Fi,rfId:gd,autoPanOnConnect:iP,autoPanOnNodeDrag:sP,autoPanSpeed:aP,onError:uP,connectionRadius:lP,isValidConnection:cP,selectNodesOnDrag:ue,nodeDragThreshold:fP,connectionDragThreshold:pP,onBeforeDelete:O,debug:xP,ariaLabelConfig:wP,zIndexMode:Wg}),g.jsx(uX,{onInit:u,onNodeClick:l,onEdgeClick:c,onNodeMouseEnter:x,onNodeMouseMove:w,onNodeMouseLeave:S,onNodeContextMenu:C,onNodeDoubleClick:E,nodeTypes:s,edgeTypes:a,connectionLineType:$,connectionLineStyle:X,connectionLineComponent:H,connectionLineContainerStyle:W,selectionKeyCode:U,selectionOnDrag:Y,selectionMode:K,deleteKeyCode:z,multiSelectionKeyCode:ee,panActivationKeyCode:Z,zoomActivationKeyCode:Q,onlyRenderVisibleElements:me,defaultViewport:Va,translateExtent:Lg,minZoom:ko,maxZoom:Hi,preventScrolling:_N,zoomOnScroll:CN,zoomOnPinch:EN,zoomOnDoubleClick:MN,panOnScroll:kN,panOnScrollSpeed:NN,panOnScrollMode:PN,panOnDrag:RN,onPaneClick:jN,onPaneMouseEnter:AN,onPaneMouseMove:TN,onPaneMouseLeave:IN,onPaneScroll:$N,onPaneContextMenu:ON,paneClickDistance:DN,nodeClickDistance:LN,onSelectionContextMenu:F,onSelectionStart:R,onSelectionEnd:j,onReconnect:FN,onReconnectStart:VN,onReconnectEnd:BN,onEdgeContextMenu:HN,onEdgeDoubleClick:WN,onEdgeMouseEnter:UN,onEdgeMouseMove:GN,onEdgeMouseLeave:YN,reconnectRadius:XN,defaultMarkerColor:SN,noDragClassName:ZN,noWheelClassName:QN,noPanClassName:zg,rfId:gd,disableKeyboardA11y:Bg,nodeExtent:md,viewport:hP,onViewportChange:mP}),g.jsx(VG,{onSelectionChange:V}),zN,g.jsx(OG,{proOptions:tP,position:eP}),g.jsx($G,{rfId:gd,disableKeyboardA11y:Bg})]})})}var Ig=Xk(hX);function mX({dimensions:e,lineWidth:n,variant:r,className:o}){return g.jsx("path",{strokeWidth:n,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:ze(["react-flow__background-pattern",r,o])})}function gX({radius:e,className:n}){return g.jsx("circle",{cx:e,cy:e,r:e,className:ze(["react-flow__background-pattern","dots",n])})}var Pr;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(Pr||(Pr={}));const yX={[Pr.Dots]:1,[Pr.Lines]:1,[Pr.Cross]:6},vX=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function vN({id:e,variant:n=Pr.Dots,gap:r=20,size:o,lineWidth:i=1,offset:s=0,color:a,bgColor:l,style:c,className:u,patternClassName:f}){const d=h.useRef(null),{transform:p,patternId:m}=ge(vX,Re),y=o||yX[n],b=n===Pr.Dots,_=n===Pr.Cross,v=Array.isArray(r)?r:[r,r],x=[v[0]*p[2]||1,v[1]*p[2]||1],w=y*p[2],S=Array.isArray(s)?s:[s,s],C=_?[w,w]:x,E=[S[0]*p[2]||1+C[0]/2,S[1]*p[2]||1+C[1]/2],k=`${m}${e||""}`;return g.jsxs("svg",{className:ze(["react-flow__background",u]),style:{...c,...dd,"--xy-background-color-props":l,"--xy-background-pattern-color-props":a},ref:d,"data-testid":"rf__background",children:[g.jsx("pattern",{id:k,x:p[0]%x[0],y:p[1]%x[1],width:x[0],height:x[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${E[0]},-${E[1]})`,children:b?g.jsx(gX,{radius:w/2,className:f}):g.jsx(mX,{dimensions:C,lineWidth:i,variant:n,className:f})}),g.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${k})`})]})}vN.displayName="Background";const $g=h.memo(vN);function xX(){return g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:g.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function wX(){return g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:g.jsx("path",{d:"M0 0h32v4.2H0z"})})}function bX(){return g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:g.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function _X(){return g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:g.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function SX(){return g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:g.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function El({children:e,className:n,...r}){return g.jsx("button",{type:"button",className:ze(["react-flow__controls-button",n]),...r,children:e})}const CX=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function xN({style:e,showZoom:n=!0,showFitView:r=!0,showInteractive:o=!0,fitViewOptions:i,onZoomIn:s,onZoomOut:a,onFitView:l,onInteractiveChange:c,className:u,children:f,position:d="bottom-left",orientation:p="vertical","aria-label":m}){const y=je(),{isInteractive:b,minZoomReached:_,maxZoomReached:v,ariaLabelConfig:x}=ge(CX,Re),{zoomIn:w,zoomOut:S,fitView:C}=Ag(),E=()=>{w(),s==null||s()},k=()=>{S(),a==null||a()},N=()=>{C(i),l==null||l()},M=()=>{y.setState({nodesDraggable:!b,nodesConnectable:!b,elementsSelectable:!b}),c==null||c(!b)},T=p==="horizontal"?"horizontal":"vertical";return g.jsxs(ud,{className:ze(["react-flow__controls",T,u]),position:d,style:e,"data-testid":"rf__controls","aria-label":m??x["controls.ariaLabel"],children:[n&&g.jsxs(g.Fragment,{children:[g.jsx(El,{onClick:E,className:"react-flow__controls-zoomin",title:x["controls.zoomIn.ariaLabel"],"aria-label":x["controls.zoomIn.ariaLabel"],disabled:v,children:g.jsx(xX,{})}),g.jsx(El,{onClick:k,className:"react-flow__controls-zoomout",title:x["controls.zoomOut.ariaLabel"],"aria-label":x["controls.zoomOut.ariaLabel"],disabled:_,children:g.jsx(wX,{})})]}),r&&g.jsx(El,{className:"react-flow__controls-fitview",onClick:N,title:x["controls.fitView.ariaLabel"],"aria-label":x["controls.fitView.ariaLabel"],children:g.jsx(bX,{})}),o&&g.jsx(El,{className:"react-flow__controls-interactive",onClick:M,title:x["controls.interactive.ariaLabel"],"aria-label":x["controls.interactive.ariaLabel"],children:b?g.jsx(SX,{}):g.jsx(_X,{})}),f]})}xN.displayName="Controls";const Og=h.memo(xN);function EX({id:e,x:n,y:r,width:o,height:i,style:s,color:a,strokeColor:l,strokeWidth:c,className:u,borderRadius:f,shapeRendering:d,selected:p,onClick:m}){const{background:y,backgroundColor:b}=s||{},_=a||y||b;return g.jsx("rect",{className:ze(["react-flow__minimap-node",{selected:p},u]),x:n,y:r,rx:f,ry:f,width:o,height:i,style:{fill:_,stroke:l,strokeWidth:c},shapeRendering:d,onClick:m?v=>m(v,e):void 0})}const kX=h.memo(EX),NX=e=>e.nodes.map(n=>n.id),Sf=e=>e instanceof Function?e:()=>e;function PX({nodeStrokeColor:e,nodeColor:n,nodeClassName:r="",nodeBorderRadius:o=5,nodeStrokeWidth:i,nodeComponent:s=kX,onClick:a}){const l=ge(NX,Re),c=Sf(n),u=Sf(e),f=Sf(r),d=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return g.jsx(g.Fragment,{children:l.map(p=>g.jsx(RX,{id:p,nodeColorFunc:c,nodeStrokeColorFunc:u,nodeClassNameFunc:f,nodeBorderRadius:o,nodeStrokeWidth:i,NodeComponent:s,onClick:a,shapeRendering:d},p))})}function MX({id:e,nodeColorFunc:n,nodeStrokeColorFunc:r,nodeClassNameFunc:o,nodeBorderRadius:i,nodeStrokeWidth:s,shapeRendering:a,NodeComponent:l,onClick:c}){const{node:u,x:f,y:d,width:p,height:m}=ge(y=>{const b=y.nodeLookup.get(e);if(!b)return{node:void 0,x:0,y:0,width:0,height:0};const _=b.internals.userNode,{x:v,y:x}=b.internals.positionAbsolute,{width:w,height:S}=Jn(_);return{node:_,x:v,y:x,width:w,height:S}},Re);return!u||u.hidden||!wk(u)?null:g.jsx(l,{x:f,y:d,width:p,height:m,style:u.style,selected:!!u.selected,className:o(u),color:n(u),borderRadius:i,strokeColor:r(u),strokeWidth:s,shapeRendering:a,onClick:c,id:u.id})}const RX=h.memo(MX);var jX=h.memo(PX);const AX=200,TX=150,IX=e=>!e.hidden,$X=e=>{const 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:e.nodeLookup.size>0?xk(La(e.nodeLookup,{filter:IX}),n):n,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},OX="react-flow__minimap-desc";function wN({style:e,className:n,nodeStrokeColor:r,nodeColor:o,nodeClassName:i="",nodeBorderRadius:s=5,nodeStrokeWidth:a,nodeComponent:l,bgColor:c,maskColor:u,maskStrokeColor:f,maskStrokeWidth:d,position:p="bottom-right",onClick:m,onNodeClick:y,pannable:b=!1,zoomable:_=!1,ariaLabel:v,inversePan:x,zoomStep:w=1,offsetScale:S=5}){const C=je(),E=h.useRef(null),{boundingRect:k,viewBB:N,rfId:M,panZoom:T,translateExtent:A,flowWidth:D,flowHeight:V,ariaLabelConfig:P}=ge($X,Re),L=(e==null?void 0:e.width)??AX,I=(e==null?void 0:e.height)??TX,F=k.width/L,R=k.height/I,j=Math.max(F,R),O=j*L,G=j*I,$=S*j,X=k.x-(O-k.width)/2-$,H=k.y-(G-k.height)/2-$,W=O+$*2,z=G+$*2,U=`${OX}-${M}`,Y=h.useRef(0),K=h.useRef();Y.current=j,h.useEffect(()=>{if(E.current&&T)return K.current=QU({domNode:E.current,panZoom:T,getTransform:()=>C.getState().transform,getViewScale:()=>Y.current}),()=>{var te;(te=K.current)==null||te.destroy()}},[T]),h.useEffect(()=>{var te;(te=K.current)==null||te.update({translateExtent:A,width:D,height:V,inversePan:x,pannable:b,zoomStep:w,zoomable:_})},[b,_,x,w,A,D,V]);const Z=m?te=>{var ue;const[ce,me]=((ue=K.current)==null?void 0:ue.pointer(te))||[0,0];m(te,{x:ce,y:me})}:void 0,ee=y?h.useCallback((te,ce)=>{const me=C.getState().nodeLookup.get(ce).internals.userNode;y(te,me)},[]):void 0,Q=v??P["minimap.ariaLabel"];return g.jsx(ud,{position:p,style:{...e,"--xy-minimap-background-color-props":typeof c=="string"?c:void 0,"--xy-minimap-mask-background-color-props":typeof u=="string"?u:void 0,"--xy-minimap-mask-stroke-color-props":typeof f=="string"?f:void 0,"--xy-minimap-mask-stroke-width-props":typeof d=="number"?d*j:void 0,"--xy-minimap-node-background-color-props":typeof o=="string"?o:void 0,"--xy-minimap-node-stroke-color-props":typeof r=="string"?r:void 0,"--xy-minimap-node-stroke-width-props":typeof a=="number"?a:void 0},className:ze(["react-flow__minimap",n]),"data-testid":"rf__minimap",children:g.jsxs("svg",{width:L,height:I,viewBox:`${X} ${H} ${W} ${z}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":U,ref:E,onClick:Z,children:[Q&&g.jsx("title",{id:U,children:Q}),g.jsx(jX,{onClick:ee,nodeColor:o,nodeStrokeColor:r,nodeBorderRadius:s,nodeClassName:i,nodeStrokeWidth:a,nodeComponent:l}),g.jsx("path",{className:"react-flow__minimap-mask",d:`M${X-$},${H-$}h${W+$*2}v${z+$*2}h${-W-$*2}z
403
- M${N.x},${N.y}h${N.width}v${N.height}h${-N.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}wN.displayName="MiniMap";h.memo(wN);const DX=e=>n=>e?`${Math.max(1/n.transform[2],1)}`:void 0,LX={[Pi.Line]:"right",[Pi.Handle]:"bottom-right"};function zX({nodeId:e,position:n,variant:r=Pi.Handle,className:o,style:i=void 0,children:s,color:a,minWidth:l=10,minHeight:c=10,maxWidth:u=Number.MAX_VALUE,maxHeight:f=Number.MAX_VALUE,keepAspectRatio:d=!1,resizeDirection:p,autoScale:m=!0,shouldResize:y,onResizeStart:b,onResize:_,onResizeEnd:v}){const x=Qk(),w=typeof e=="string"?e:x,S=je(),C=h.useRef(null),E=r===Pi.Handle,k=ge(h.useCallback(DX(E&&m),[E,m]),Re),N=h.useRef(null),M=n??LX[r];h.useEffect(()=>{if(!(!C.current||!w))return N.current||(N.current=fG({domNode:C.current,nodeId:w,getStoreItems:()=>{const{nodeLookup:A,transform:D,snapGrid:V,snapToGrid:P,nodeOrigin:L,domNode:I}=S.getState();return{nodeLookup:A,transform:D,snapGrid:V,snapToGrid:P,nodeOrigin:L,paneDomNode:I}},onChange:(A,D)=>{const{triggerNodeChanges:V,nodeLookup:P,parentLookup:L,nodeOrigin:I}=S.getState(),F=[],R={x:A.x,y:A.y},j=P.get(w);if(j&&j.expandParent&&j.parentId){const O=j.origin??I,G=A.width??j.measured.width??0,$=A.height??j.measured.height??0,X={id:j.id,parentId:j.parentId,rect:{width:G,height:$,...bk({x:A.x??j.position.x,y:A.y??j.position.y},{width:G,height:$},j.parentId,P,O)}},H=jg([X],P,L,I);F.push(...H),R.x=A.x?Math.max(O[0]*G,A.x):void 0,R.y=A.y?Math.max(O[1]*$,A.y):void 0}if(R.x!==void 0&&R.y!==void 0){const O={id:w,type:"position",position:{...R}};F.push(O)}if(A.width!==void 0&&A.height!==void 0){const G={id:w,type:"dimensions",resizing:!0,setAttributes:p?p==="horizontal"?"width":"height":!0,dimensions:{width:A.width,height:A.height}};F.push(G)}for(const O of D){const G={...O,type:"position"};F.push(G)}V(F)},onEnd:({width:A,height:D})=>{const V={id:w,type:"dimensions",resizing:!1,dimensions:{width:A,height:D}};S.getState().triggerNodeChanges([V])}})),N.current.update({controlPosition:M,boundaries:{minWidth:l,minHeight:c,maxWidth:u,maxHeight:f},keepAspectRatio:d,resizeDirection:p,onResizeStart:b,onResize:_,onResizeEnd:v,shouldResize:y}),()=>{var A;(A=N.current)==null||A.destroy()}},[M,l,c,u,f,d,b,_,v,y]);const T=M.split("-");return g.jsx("div",{className:ze(["react-flow__resize-control","nodrag",...T,r,o]),ref:C,style:{...i,scale:k,...a&&{[E?"backgroundColor":"borderColor"]:a}},children:s})}h.memo(zX);const Yx=3,kl={screen:0,hook:160,api:340,table:520},ph=220,Xx=40;function Nl(e,n){const r=new Map,o=e.length,s=-(o*ph+(o-1)*Xx)/2;return e.forEach((a,l)=>{r.set(a,{x:s+l*(ph+Xx),y:n})}),r}function Kx(e,n,r){const o=e.map(i=>{const a=(r.get(i)??[]).map(c=>{var u;return((u=n.get(c))==null?void 0:u.x)??0}),l=a.length>0?a.reduce((c,u)=>c+u,0)/a.length:0;return{id:i,avg:l}});return o.sort((i,s)=>i.avg-s.avg),o.map(i=>i.id)}function Pl(e){const n={width:ph,padding:"10px 12px",borderRadius:10,border:"1px solid rgba(255, 255, 255, 0.14)",background:"rgba(48, 50, 72, 0.96)",color:"#f2f2f6",fontSize:12,fontFamily:"inherit",boxShadow:"0 2px 10px rgba(0, 0, 0, 0.4)"};return e==="screen"?{...n,borderColor:"rgba(139, 92, 246, 0.9)",background:"linear-gradient(135deg, rgba(139,92,246,0.45) 0%, rgba(58, 48, 90, 0.96) 100%)",boxShadow:"0 2px 14px rgba(139, 92, 246, 0.25)"}:e==="api"?{...n,borderColor:"rgba(139, 92, 246, 0.55)"}:e==="table"?{...n,borderColor:"rgba(34, 197, 94, 0.55)",background:"rgba(38, 58, 48, 0.96)"}:n}function Ml(e,n,r){const o=e==="screen"?xa:e==="hook"?UA:e==="api"?wm:xm;return g.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:3},children:[g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[g.jsx(o,{style:{width:12,height:12,opacity:.7}}),g.jsx("span",{style:{fontWeight:600},children:n})]}),r&&g.jsx("span",{style:{fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSize:10,opacity:.7,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:r})]})}function FX({screen:e,graphs:n,onNodeSelect:r,selectedNodeId:o}){const{nodes:i,edges:s,empty:a}=h.useMemo(()=>{if(!n.ui||!n.api||!n.db)return{nodes:[],edges:[],empty:!0};const v=new Map;for(const H of n.ui.edges)H.type==="imports"&&(v.has(H.source)||v.set(H.source,[]),v.get(H.source).push(H.target));const x=new Set([e.id]);{let H=[e.id];for(let W=0;W<Yx&&H.length>0;W++){const z=[];for(const U of H)for(const Y of v.get(U)??[])x.has(Y)||(x.add(Y),z.push(Y));H=z}}const w=new Map;for(const H of n.ui.cross_refs??[])H.type!=="calls_api"&&H.type!=="references_api"||H.layer!=="api"||x.has(H.source)&&(w.has(H.source)||w.set(H.source,[]),w.get(H.source).push(H.target));const S=new Set;for(const H of w.values())for(const W of H)S.add(W);if(S.size===0)return{nodes:[],edges:[],empty:!0};const C=(v.get(e.id)??[]).filter(H=>H!==e.id),E=[],k=new Map;for(const H of C){const W=new Set([H]);let z=[H];for(let Y=0;Y<Yx&&z.length>0;Y++){const K=[];for(const Z of z)for(const ee of v.get(Z)??[])W.has(ee)||(W.add(ee),K.push(ee));z=K}const U=new Set;for(const Y of W)for(const K of w.get(Y)??[])U.add(K);U.size>0&&(E.push(H),k.set(H,U))}const N=new Set(w.get(e.id)??[]),M=n.api.nodes.filter(H=>S.has(H.id)),T=new Set,A=new Map;for(const H of M){const W=(H.db_models??[]).map(z=>z);A.set(H.id,W);for(const z of W)T.add(z)}const D=n.db.nodes.filter(H=>T.has(H.name)||T.has(H.name.toLowerCase())),V=new Map;for(const H of D)V.set(H.name,H.id),V.set(H.name.toLowerCase(),H.id);const P=[],L=[],I=Nl([e.id],kl.screen);P.push({id:`screen:${e.id}`,position:I.get(e.id),data:{label:Ml("screen",Ir(e),e.route??void 0)},style:Pl("screen"),sourcePosition:"bottom",targetPosition:"top"});const F=[...E].sort((H,W)=>{const z=[...k.get(H)??[]],U=[...k.get(W)??[]],Y=M.map(Z=>Z.id),K=Z=>{const ee=Z.map(Q=>Y.indexOf(Q)).filter(Q=>Q>=0);return ee.length>0?ee.reduce((Q,te)=>Q+te,0)/ee.length:0};return K(z)-K(U)});if(F.length>0){const H=Nl(F,kl.hook);for(const W of F){const z=W.split("/").pop()??W;P.push({id:`hook:${W}`,position:H.get(W),data:{label:Ml("hook",z.replace(/\.tsx?$/,""),W)},style:Pl("hook"),sourcePosition:"bottom",targetPosition:"top"}),L.push({id:`e:screen-${W}`,source:`screen:${e.id}`,target:`hook:${W}`,animated:!1,style:{stroke:"rgba(139,92,246,0.95)"}})}}const R=new Map;for(const H of E){const W=P.find(z=>z.id===`hook:${H}`);W&&R.set(H,W.position)}R.set(e.id,I.get(e.id));const j=new Map;for(const H of S){const W=[];N.has(H)&&W.push(e.id);for(const[z,U]of k.entries())U.has(H)&&W.push(z);j.set(H,W)}const O=Kx(M.map(H=>H.id),R,j);if(O.length>0){const H=Nl(O,kl.api);for(const W of M)P.push({id:`api:${W.id}`,position:H.get(W.id),data:{label:Ml("api",`${W.methods.join(",")} ${W.path.split("/").pop()||"/"}`,W.path)},style:Pl("api"),sourcePosition:"bottom",targetPosition:"top"});for(const W of N)S.has(W)&&L.push({id:`e:screen-api-${W}`,source:`screen:${e.id}`,target:`api:${W}`,style:{stroke:"rgba(139,92,246,0.95)"}});for(const[W,z]of k.entries())for(const U of z)L.push({id:`e:${W}-${U}`,source:`hook:${W}`,target:`api:${U}`,style:{stroke:"rgba(139,92,246,0.95)"}})}const G=new Map;for(const H of O){const W=P.find(z=>z.id===`api:${H}`);W&&G.set(H,W.position)}const $=new Map;for(const H of M){const W=A.get(H.id)??[];for(const z of W){const U=V.get(z)??V.get(z.toLowerCase());U&&($.has(U)||$.set(U,[]),$.get(U).push(H.id))}}const X=Kx(D.map(H=>H.id),G,$);if(X.length>0){const H=Nl(X,kl.table);for(const W of D)P.push({id:`table:${W.id}`,position:H.get(W.id),data:{label:Ml("table",W.name)},style:Pl("table"),sourcePosition:"bottom",targetPosition:"top"});for(const W of M){const z=A.get(W.id)??[];for(const U of z){const Y=V.get(U)??V.get(U.toLowerCase());Y&&L.push({id:`e:${W.id}-${Y}`,source:`api:${W.id}`,target:`table:${Y}`,style:{stroke:"rgba(34,197,94,0.95)"}})}}}return{nodes:P,edges:L,empty:!1}},[e,n]),l=h.useRef(null),c=i,u=s,f=h.useCallback(v=>{const x=l.current;if(!x)return;const w=new Set([v]),S=new Set;for(const C of s)C.source===v&&(w.add(C.target),S.add(C.id)),C.target===v&&(w.add(C.source),S.add(C.id));x.querySelectorAll(".react-flow__node").forEach(C=>{const E=C.getAttribute("data-id")??"";C.style.opacity=w.has(E)?"1":"0.15",C.style.transition="opacity 120ms ease"}),x.querySelectorAll(".react-flow__edge").forEach(C=>{const E=C.getAttribute("data-id")??"",k=S.has(E);C.style.opacity=k?"1":"0.08",C.style.transition="opacity 120ms ease",k&&C.classList.add("animated")})},[s]),d=h.useCallback(()=>{const v=l.current;v&&(v.querySelectorAll(".react-flow__node").forEach(x=>{x.style.opacity="",x.style.transition=""}),v.querySelectorAll(".react-flow__edge").forEach(x=>{x.style.opacity="",x.style.transition="",x.classList.remove("animated")}))},[]),p=h.useCallback((v,x)=>{f(x.id)},[f]),m=h.useCallback(()=>{d()},[d]),y=(v,x)=>{const[w,...S]=x.id.split(":"),C=S.join(":"),E={screen:"ui",hook:"ui",api:"api",table:"db"};r==null||r(C,E[w]??"ui")};if(a)return g.jsx("div",{className:"flex h-full items-center justify-center p-8",children:g.jsxs("div",{className:"text-center",children:[g.jsx("h3",{className:"text-sm font-semibold text-foreground",children:Ir(e)}),g.jsx("p",{className:"mt-2 text-xs text-muted-foreground",children:"No API or database dependencies detected for this screen."})]})});const{focusedNodes:b,focusedEdges:_}=h.useMemo(()=>{var C;if(!o)return{focusedNodes:c,focusedEdges:u};const v=(C=c.find(E=>{const[,...k]=E.id.split(":");return k.join(":")===o}))==null?void 0:C.id;if(!v)return{focusedNodes:c,focusedEdges:u};const x=new Set([v]);for(const E of u)E.source===v&&x.add(E.target),E.target===v&&x.add(E.source);const w=c.filter(E=>x.has(E.id)),S=u.filter(E=>x.has(E.source)&&x.has(E.target));return{focusedNodes:w,focusedEdges:S}},[c,u,o]);return g.jsx("div",{ref:l,className:"relative h-full w-full",children:g.jsx(pd,{children:g.jsxs(Ig,{nodes:b,edges:_,fitView:!0,fitViewOptions:{padding:.3},proOptions:{hideAttribution:!0},minZoom:.2,maxZoom:1.5,nodesDraggable:!1,nodesConnectable:!1,elementsSelectable:!1,onNodeMouseEnter:p,onNodeMouseLeave:m,onNodeClick:y,children:[g.jsx($g,{color:"rgba(255,255,255,0.05)",gap:24}),g.jsx(Og,{showInteractive:!1})]},o??"full")})})}const ec=220,qx=40,VX=110,BX=0,HX=180,Io=6;function Zx(e){const n={width:ec,padding:"10px 12px",borderRadius:10,border:"1px solid rgba(255, 255, 255, 0.14)",background:"rgba(48, 50, 72, 0.96)",color:"#f2f2f6",fontSize:12,fontFamily:"inherit",boxShadow:"0 2px 10px rgba(0, 0, 0, 0.4)"};return e?{...n,borderColor:"rgba(139, 92, 246, 0.9)",background:"linear-gradient(135deg, rgba(139,92,246,0.45) 0%, rgba(58, 48, 90, 0.96) 100%)",boxShadow:"0 2px 14px rgba(139, 92, 246, 0.25)"}:{...n,cursor:"pointer"}}function Qx(e,n,r){const o=r?gm:xa;return g.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:3},children:[g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[g.jsx(o,{style:{width:12,height:12,opacity:.7}}),g.jsx("span",{style:{fontWeight:600},children:e})]}),n&&g.jsx("span",{style:{fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSize:10,opacity:.7,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:n})]})}function WX({module:e,screens:n,onScreenClick:r}){const{nodes:o,edges:i}=h.useMemo(()=>{const a=[],l=[];Math.max(1,Math.ceil(n.length/Io)),Math.min(Io,n.length);const c=0;return a.push({id:`module:${e}`,position:{x:c-ec/2,y:BX},data:{label:Qx(la(e),`${n.length} screens`,!0)},style:Zx(!0),sourcePosition:"bottom",targetPosition:"top",selectable:!1,draggable:!1}),n.forEach((u,f)=>{const d=Math.floor(f/Io),p=f%Io,m=Math.min(Io,n.length-d*Io),y=m*ec+(m-1)*qx,_=c-y/2+p*(ec+qx),v=HX+d*VX;a.push({id:`screen:${u.id}`,position:{x:_,y:v},data:{label:Qx(Ir(u),u.route??void 0,!1),screenId:u.id},style:Zx(!1),sourcePosition:"bottom",targetPosition:"top",draggable:!1}),l.push({id:`e:module-${u.id}`,source:`module:${e}`,target:`screen:${u.id}`,style:{stroke:"rgba(139,92,246,0.95)"}})}),{nodes:a,edges:l}},[e,n]),s=(a,l)=>{const c=l.data.screenId;c&&r(c)};return g.jsx("div",{className:"h-full w-full",children:g.jsx(pd,{children:g.jsxs(Ig,{nodes:o,edges:i,fitView:!0,fitViewOptions:{padding:.2},proOptions:{hideAttribution:!0},minZoom:.2,maxZoom:1.5,nodesConnectable:!1,onNodeClick:s,children:[g.jsx($g,{color:"rgba(255,255,255,0.05)",gap:24}),g.jsx(Og,{showInteractive:!1})]})})})}function UX(e,n,r){var o;if(n==="ui"&&r.ui){const i=r.ui.nodes.find(s=>s.id===e);if(i)return{id:i.id,name:i.name,type:i.type,layer:n,route:i.route,module:((o=i.tags)==null?void 0:o.module)??i.module??null,exports:i.exports,tags:i.tags}}if(n==="api"&&r.api){const i=r.api.nodes.find(s=>s.id===e);if(i)return{id:i.id,name:i.name,type:i.type,layer:n,methods:i.methods,path:i.path,db_models:i.db_models,tags:i.tags}}if(n==="db"&&r.db){const i=r.db.nodes.find(s=>s.id===e);if(i)return{id:i.id,name:i.name,type:i.type,layer:n,columns:i.columns,tags:i.tags}}return null}function GX(e,n,r){const o=[];if(n==="ui"&&r.ui)for(const i of r.ui.edges){if(i.source===e){const s=r.ui.nodes.find(a=>a.id===i.target);s&&o.push({nodeId:i.target,nodeName:s.name,edgeType:i.type,direction:"outgoing"})}if(i.target===e){const s=r.ui.nodes.find(a=>a.id===i.source);s&&o.push({nodeId:i.source,nodeName:s.name,edgeType:i.type,direction:"incoming"})}}return o}function YX(e,n){const r=[],o=[];if(!n.ui)return{to:r,from:o};for(const i of n.ui.edges)if(i.type==="navigates"){if(i.source===e){const s=n.ui.nodes.find(a=>a.id===i.target);s&&r.push(s)}if(i.target===e){const s=n.ui.nodes.find(a=>a.id===i.source);s&&o.push(s)}}return{to:r,from:o}}const XX={ui:xa,api:wm,db:xm},KX={page:"bg-violet-500/20 text-violet-300",layout:"bg-indigo-500/20 text-indigo-300",component:"bg-blue-500/20 text-blue-300",hook:"bg-sky-500/20 text-sky-300",context:"bg-teal-500/20 text-teal-300",util:"bg-slate-500/20 text-slate-300",config:"bg-amber-500/20 text-amber-300",endpoint:"bg-violet-500/20 text-violet-300",table:"bg-emerald-500/20 text-emerald-300",enum:"bg-orange-500/20 text-orange-300"};function qX({type:e}){const n=KX[e]??"bg-zinc-500/20 text-zinc-300";return g.jsx("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-medium uppercase tracking-wider ${n}`,children:e})}function $o({children:e}){return g.jsx("h3",{className:"mb-2 text-[11px] font-semibold uppercase tracking-wider text-slate-400",children:e})}function Rl({label:e,edges:n,icon:r,onNavigate:o}){return n.length===0?null:g.jsxs("div",{className:"mb-3",children:[g.jsxs("div",{className:"mb-1.5 flex items-center gap-1.5 text-[10px] font-medium uppercase tracking-wider text-slate-500",children:[g.jsx(r,{className:"h-3 w-3"}),e,g.jsxs("span",{className:"text-slate-600",children:["(",n.length,")"]})]}),g.jsx("ul",{className:"space-y-0.5",children:n.map(i=>g.jsx("li",{children:g.jsxs("button",{type:"button",onClick:()=>o(i.nodeId),className:"flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-xs text-slate-300 transition-colors hover:bg-slate-700/50 hover:text-slate-100",children:[g.jsx(Js,{className:"h-3 w-3 shrink-0 text-slate-500"}),g.jsx("span",{className:"truncate",children:i.nodeName}),g.jsx("span",{className:"ml-auto shrink-0 text-[10px] text-slate-600",children:i.edgeType})]})},`${i.direction}-${i.edgeType}-${i.nodeId}`))})]})}function ZX({filePath:e}){const[n,r]=h.useState(null),[o,i]=h.useState(!0),[s,a]=h.useState(null);if(h.useEffect(()=>{i(!0),a(null),r(null);const c=[e];e.startsWith("src/")||c.push(`src/${e}`);async function u(){for(const f of c)try{const d=await fetch(`/api/file-content?path=${encodeURIComponent(f)}`);if(!d.ok)continue;const p=await d.json();r(p.content),i(!1);return}catch{continue}a("File not found"),i(!1)}u()},[e]),o)return g.jsx("p",{className:"px-3 py-2 text-xs text-slate-500",children:"Loading source..."});if(s)return g.jsxs("p",{className:"px-3 py-2 text-xs text-red-400",children:["Failed to load: ",s]});if(!n)return null;const l=n.split(`
404
- `);return g.jsx("div",{className:"overflow-auto rounded border border-slate-700/50 bg-slate-900/80",children:g.jsx("pre",{className:"p-3 text-[11px] leading-[1.6]",children:g.jsx("code",{children:l.map((c,u)=>g.jsxs("div",{className:"flex",children:[g.jsx("span",{className:"mr-4 inline-block w-8 select-none text-right text-slate-600",children:u+1}),g.jsx("span",{className:"flex-1 text-slate-300",children:c||" "})]},u))})})})}function bN({nodeId:e,nodeLayer:n,graphs:r,onClose:o,onNavigate:i}){const s=UX(e,n,r),a=GX(e,n,r),l=n==="ui"?YX(e,r):{to:[],from:[]},c=a.filter(y=>y.edgeType==="renders"&&y.direction==="outgoing"),u=a.filter(y=>y.edgeType==="renders"&&y.direction==="incoming"),f=a.filter(y=>y.edgeType==="imports"&&y.direction==="outgoing"),d=a.filter(y=>y.edgeType==="imports"&&y.direction==="incoming");if(!s)return g.jsx("div",{className:"flex h-full flex-col bg-slate-900/95",children:g.jsxs("div",{className:"flex items-center justify-between border-b border-slate-700/50 px-4 py-3",children:[g.jsx("span",{className:"text-sm text-slate-400",children:"Node not found"}),g.jsx("button",{type:"button",onClick:o,className:"rounded p-1 hover:bg-slate-700/50",children:g.jsx(Mc,{className:"h-4 w-4 text-slate-400"})})]})});const p=XX[n],m=y=>i(y,"ui");return g.jsxs("div",{className:"flex h-full flex-col bg-slate-900/95 overflow-hidden",children:[g.jsxs("div",{className:"flex items-center gap-3 border-b border-slate-700/50 px-5 py-4",children:[g.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-slate-800",children:g.jsx(p,{className:"h-4 w-4 text-slate-400"})}),g.jsxs("div",{className:"min-w-0 flex-1",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("h2",{className:"truncate text-sm font-semibold text-slate-100",children:s.name}),g.jsx(qX,{type:s.type})]}),g.jsx("p",{className:"mt-0.5 truncate font-mono text-[10px] text-slate-500",children:s.id})]}),g.jsx("button",{type:"button",onClick:o,className:"rounded-md p-1.5 text-slate-400 transition-colors hover:bg-slate-700/50 hover:text-slate-200",children:g.jsx(Mc,{className:"h-4 w-4"})})]}),g.jsxs("div",{className:"flex-1 overflow-y-auto px-5 py-4 space-y-5",children:[g.jsxs("section",{children:[g.jsx($o,{children:"Info"}),g.jsxs("div",{className:"space-y-1.5 text-xs",children:[s.module&&g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"w-16 shrink-0 text-slate-500",children:"Module"}),g.jsx("span",{className:`text-slate-300 ${s.module==="untagged"?"text-yellow-500/70 italic":""}`,children:s.module})]}),s.route&&g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"w-16 shrink-0 text-slate-500",children:"Route"}),g.jsx("span",{className:"font-mono text-slate-300",children:s.route})]}),s.methods&&s.methods.length>0&&g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"w-16 shrink-0 text-slate-500",children:"Methods"}),g.jsx("span",{className:"flex gap-1",children:s.methods.map(y=>g.jsx("span",{className:"rounded bg-violet-500/15 px-1.5 py-0.5 font-mono text-[10px] text-violet-300",children:y},y))})]}),s.path&&g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"w-16 shrink-0 text-slate-500",children:"Path"}),g.jsx("span",{className:"font-mono text-slate-300",children:s.path})]}),s.exports&&s.exports.length>0&&g.jsxs("div",{className:"flex items-start gap-2",children:[g.jsx("span",{className:"w-16 shrink-0 pt-0.5 text-slate-500",children:"Exports"}),g.jsx("div",{className:"flex flex-wrap gap-1",children:s.exports.map(y=>g.jsx("span",{className:"rounded bg-slate-700/50 px-1.5 py-0.5 font-mono text-[10px] text-slate-300",children:y},y))})]}),s.db_models&&s.db_models.length>0&&g.jsxs("div",{className:"flex items-start gap-2",children:[g.jsx("span",{className:"w-16 shrink-0 pt-0.5 text-slate-500",children:"Models"}),g.jsx("div",{className:"flex flex-wrap gap-1",children:s.db_models.map(y=>g.jsx("span",{className:"rounded bg-emerald-500/15 px-1.5 py-0.5 font-mono text-[10px] text-emerald-300",children:y},y))})]})]})]}),s.tags&&Object.keys(s.tags).length>0&&g.jsxs("section",{children:[g.jsx($o,{children:"Tags"}),g.jsx("div",{className:"flex flex-wrap gap-1.5",children:Object.entries(s.tags).map(([y,b])=>g.jsxs("span",{className:`inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-[10px] ${y==="module"||y==="screen"?"bg-purple-500/15 text-purple-300":"bg-sky-500/15 text-sky-300"}`,children:[g.jsxs("span",{className:"font-medium",children:[y,":"]}),g.jsx("span",{children:b})]},y))})]}),s.columns&&s.columns.length>0&&g.jsxs("section",{children:[g.jsx($o,{children:"Columns"}),g.jsx("div",{className:"overflow-hidden rounded border border-slate-700/50",children:g.jsxs("table",{className:"w-full text-xs",children:[g.jsx("thead",{children:g.jsxs("tr",{className:"border-b border-slate-700/50 bg-slate-800/50",children:[g.jsx("th",{className:"px-3 py-1.5 text-left font-medium text-slate-400",children:"Name"}),g.jsx("th",{className:"px-3 py-1.5 text-left font-medium text-slate-400",children:"Type"})]})}),g.jsx("tbody",{children:s.columns.map(y=>g.jsxs("tr",{className:"border-b border-slate-800/50 last:border-0",children:[g.jsx("td",{className:"px-3 py-1.5 font-mono text-slate-300",children:y.name}),g.jsx("td",{className:"px-3 py-1.5 font-mono text-slate-500",children:y.type})]},y.name))})]})})]}),(c.length>0||u.length>0||f.length>0||d.length>0)&&g.jsxs("section",{children:[g.jsx($o,{children:"Component Tree"}),g.jsx(Rl,{label:"Renders",edges:c,icon:MA,onNavigate:m}),g.jsx(Rl,{label:"Rendered by",edges:u,icon:mm,onNavigate:m}),g.jsx(Rl,{label:"Imports",edges:f,icon:Sv,onNavigate:m}),g.jsx(Rl,{label:"Imported by",edges:d,icon:Sv,onNavigate:m})]}),(l.to.length>0||l.from.length>0)&&g.jsxs("section",{children:[g.jsx($o,{children:"Navigation"}),l.to.length>0&&g.jsxs("div",{className:"mb-3",children:[g.jsxs("div",{className:"mb-1.5 flex items-center gap-1.5 text-[10px] font-medium uppercase tracking-wider text-slate-500",children:[g.jsx(_v,{className:"h-3 w-3"}),"Navigates to",g.jsxs("span",{className:"text-slate-600",children:["(",l.to.length,")"]})]}),g.jsx("ul",{className:"space-y-0.5",children:l.to.map(y=>g.jsx("li",{children:g.jsxs("button",{type:"button",onClick:()=>m(y.id),className:"flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-xs text-slate-300 transition-colors hover:bg-slate-700/50 hover:text-slate-100",children:[g.jsx(Js,{className:"h-3 w-3 shrink-0 text-slate-500"}),g.jsx("span",{className:"truncate",children:y.name}),y.route&&g.jsx("span",{className:"ml-auto shrink-0 font-mono text-[10px] text-slate-600",children:y.route})]})},y.id))})]}),l.from.length>0&&g.jsxs("div",{className:"mb-3",children:[g.jsxs("div",{className:"mb-1.5 flex items-center gap-1.5 text-[10px] font-medium uppercase tracking-wider text-slate-500",children:[g.jsx(_v,{className:"h-3 w-3"}),"Navigated from",g.jsxs("span",{className:"text-slate-600",children:["(",l.from.length,")"]})]}),g.jsx("ul",{className:"space-y-0.5",children:l.from.map(y=>g.jsx("li",{children:g.jsxs("button",{type:"button",onClick:()=>m(y.id),className:"flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-xs text-slate-300 transition-colors hover:bg-slate-700/50 hover:text-slate-100",children:[g.jsx(Js,{className:"h-3 w-3 shrink-0 text-slate-500"}),g.jsx("span",{className:"truncate",children:y.name}),y.route&&g.jsx("span",{className:"ml-auto shrink-0 font-mono text-[10px] text-slate-600",children:y.route})]})},y.id))})]})]}),g.jsxs("section",{children:[g.jsx($o,{children:"Source Code"}),g.jsx(ZX,{filePath:s.id})]})]})]})}function QX(){var v;const[e,n]=h.useState(null),[r,o]=h.useState(null),[i,s]=h.useState(null),[a,l]=h.useState(null),[c,u]=h.useState(null),[f,d]=h.useState("ui");h.useEffect(()=>{fetch("/api/raw-graphs").then(x=>{if(!x.ok)throw new Error(`HTTP ${x.status}`);return x.json()}).then(x=>n(x)).catch(x=>o(String(x)))},[]);const p=h.useMemo(()=>e!=null&&e.ui?e.ui.nodes.filter(x=>_g(x)&&Bn(x)):[],[e]),m=h.useMemo(()=>{const x=new Map;for(const E of p){const k=Bn(E);x.has(k)||x.set(k,[]),x.get(k).push(E)}const w=[],S=new Map;for(const[E,k]of x)k.length===1?w.push(...k):S.set(E,k);const C=[...S.entries()].map(([E,k])=>({module:E,screens:k})).sort((E,k)=>k.screens.length-E.screens.length);return w.length>0&&C.push({module:"misc",screens:w}),C.sort((E,k)=>E.module==="untagged"?1:k.module==="untagged"?-1:E.module==="misc"?1:k.module==="misc"?-1:k.screens.length-E.screens.length),C},[p]),y=i??((v=m[0])==null?void 0:v.module)??null,b=h.useMemo(()=>{var x;return y?((x=m.find(w=>w.module===y))==null?void 0:x.screens)??[]:[]},[m,y]),_=h.useMemo(()=>!(e!=null&&e.ui)||!a?null:e.ui.nodes.find(x=>x.id===a)??null,[e,a]);return r?g.jsx(eK,{message:r}):e?g.jsxs("div",{className:"flex h-full min-h-0",children:[g.jsxs("div",{className:`flex w-64 flex-col border-r border-sidebar-border bg-sidebar-background/40 ${c?"hidden":""}`,children:[g.jsxs("div",{className:"border-b border-sidebar-border px-4 py-3",children:[g.jsx("h2",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Modules"}),g.jsxs("p",{className:"mt-0.5 text-[11px] text-muted-foreground",children:[m.length," modules · ",p.length," screens"]})]}),g.jsx("ul",{className:"flex-1 overflow-y-auto px-2 py-2",children:m.map(x=>{const w=x.module===y;return g.jsx("li",{children:g.jsxs("button",{type:"button",onClick:()=>{s(x.module),l(null),u(null)},className:`flex w-full items-center justify-between rounded-md px-3 py-2 text-sm transition-colors ${w?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"} ${x.module==="untagged"?"border border-dashed border-yellow-500/30":""}`,children:[g.jsxs("span",{className:"flex items-center gap-2",children:[g.jsx(xa,{className:`h-3.5 w-3.5 shrink-0 ${x.module==="untagged"?"text-yellow-500/70":"opacity-70"}`}),la(x.module)]}),g.jsx("span",{className:"text-xs tabular-nums text-muted-foreground",children:x.screens.length})]})},x.module)})})]}),g.jsx("div",{className:"flex flex-1 flex-col overflow-hidden",children:_?g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"flex items-center gap-3 border-b border-sidebar-border px-6 py-4",children:[g.jsxs("button",{type:"button",onClick:()=>{l(null),u(null)},className:"flex items-center gap-1.5 rounded-md border border-sidebar-border px-2.5 py-1 text-xs text-muted-foreground transition-colors hover:bg-sidebar-accent hover:text-foreground",children:[g.jsx(mm,{className:"h-3 w-3"}),"Back"]}),g.jsxs("div",{className:"min-w-0",children:[g.jsx("h1",{className:"truncate text-lg font-semibold text-foreground",children:Ir(_)}),_.route&&g.jsx("p",{className:"mt-0.5 truncate font-mono text-[11px] text-muted-foreground",children:_.route})]})]}),g.jsx("div",{className:"flex-1 min-h-0",children:g.jsx(FX,{screen:_,graphs:e,selectedNodeId:c,onNodeSelect:(x,w)=>{u(x),d(w)}})})]}):g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"border-b border-sidebar-border px-6 py-4",children:[g.jsx("h1",{className:"text-lg font-semibold text-foreground",children:y?la(y):"Select a module"}),g.jsxs("p",{className:"mt-0.5 text-xs text-muted-foreground",children:[b.length," screens · click a screen to drill in"]})]}),g.jsx("div",{className:"flex-1 min-h-0",children:y&&b.length>0?g.jsx(WX,{module:y,screens:b,onScreenClick:l},y):g.jsx("div",{className:"flex h-full items-center justify-center",children:g.jsx("p",{className:"text-sm text-muted-foreground",children:y?"No screens in this module.":"Select a module."})})})]})}),c&&e&&g.jsx("div",{className:"flex w-[420px] shrink-0 flex-col border-l border-sidebar-border bg-slate-900/95",children:g.jsx(bN,{nodeId:c,nodeLayer:f,graphs:e,onClose:()=>u(null),onNavigate:(x,w)=>{u(x),d(w)}})})]}):g.jsx(JX,{})}function JX(){return g.jsx("div",{className:"flex h-full items-center justify-center",children:g.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading graph data…"})})}function eK({message:e}){return g.jsx("div",{className:"flex h-full items-center justify-center p-8",children:g.jsxs("div",{className:"max-w-md text-center",children:[g.jsx("h2",{className:"text-sm font-semibold text-foreground",children:"Failed to load graph"}),g.jsx("p",{className:"mt-2 text-xs text-muted-foreground",children:e})]})})}function tK(){return g.jsx("div",{className:"flex h-full items-center justify-center p-8",children:g.jsxs("div",{className:"text-center",children:[g.jsx("h1",{className:"text-2xl font-semibold text-foreground",children:"User Journeys"}),g.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"User journey flowcharts coming soon."})]})})}const nK={admin:"#8b5cf6",auth:"#f59e0b",settings:"#6366f1",project:"#3b82f6",org:"#10b981",root:"#64748b",misc:"#94a3b8"};function iu(e){return e?nK[e]??`hsl(${Math.abs(rK(e))%360}, 60%, 55%)`:"#64748b"}function rK(e){let n=0;for(let r=0;r<e.length;r++)n=Math.imul(31,n)+e.charCodeAt(r)|0;return n}function oK(e){const n=e.ui.nodes.filter(l=>_g(l)),r=new Set(n.map(l=>l.id)),o=new Map;for(const l of e.ui.edges)(l.type==="imports"||l.type==="renders")&&(o.has(l.target)||o.set(l.target,new Set),o.get(l.target).add(l.source));function i(l){const c=new Set,u=new Set,f=[l];for(;f.length>0;){const d=f.pop();if(!u.has(d)){if(u.add(d),r.has(d)){c.add(d);continue}for(const p of o.get(d)??[])f.push(p)}}return c}const s=new Map,a=new Map;for(const l of e.ui.edges){if(l.type!=="navigates"||!r.has(l.target))continue;const c=r.has(l.source)?[l.source]:[...i(l.source)];for(const u of c)u!==l.target&&(s.has(u)||s.set(u,new Set),s.get(u).add(l.target),a.has(l.target)||a.set(l.target,new Set),a.get(l.target).add(u))}return{screens:n,screenIdSet:r,outgoing:s,incoming:a}}function iK(e){const n={segment:"/",fullRoute:"/",screen:null,children:[]},r=[...e].sort((o,i)=>(o.route??"").split("/").length-(i.route??"").split("/").length);for(const o of r){if(!o.route)continue;if(o.route==="/"){n.screen=o;continue}const i=o.route.split("/").filter(Boolean);let s=n;for(let a=0;a<i.length;a++){const l=i[a],c="/"+i.slice(0,a+1).join("/");let u=s.children.find(f=>f.segment===l);u||(u={segment:l,fullRoute:c,screen:null,children:[]},s.children.push(u)),s=u}s.screen=o}return n}function Dg({node:e,depth:n,onSelect:r,selectedId:o}){var f;const[i,s]=h.useState(n<2),a=e.children.length>0,l=e.screen?Bn(e.screen):null,c=iu(l),u=((f=e.screen)==null?void 0:f.id)===o;return g.jsxs("div",{children:[g.jsxs("div",{className:`flex items-center gap-1 py-0.5 px-1.5 rounded transition-colors cursor-pointer text-xs ${u?"bg-purple-500/20 text-foreground":"text-muted-foreground hover:bg-white/5 hover:text-foreground"}`,style:{paddingLeft:n*14+4},onClick:()=>{e.screen&&r(e.screen.id),a&&s(!i)},children:[a?g.jsx("button",{onClick:d=>{d.stopPropagation(),s(!i)},className:"p-0.5 shrink-0",children:i?g.jsx(vm,{className:"h-2.5 w-2.5"}):g.jsx(Js,{className:"h-2.5 w-2.5"})}):g.jsx("span",{className:"w-3.5"}),e.screen&&g.jsx("span",{className:"w-1.5 h-1.5 rounded-full shrink-0",style:{backgroundColor:c}}),g.jsx("span",{className:"truncate",children:e.screen?Ir(e.screen):e.segment})]}),i&&a&&e.children.sort((d,p)=>d.segment.localeCompare(p.segment)).map(d=>g.jsx(Dg,{node:d,depth:n+1,onSelect:r,selectedId:o},d.fullRoute))]})}const Cf=200,Gt=200,jl=56,Jx=120,Oo=30;function sK({focusId:e,screens:n,outgoing:r,incoming:o,onNavigate:i,onDetail:s}){var w,S;const a=h.useRef(null),l=h.useMemo(()=>new Map(n.map(C=>[C.id,C])),[n]),c=l.get(e),{flowNodes:u,flowEdges:f}=h.useMemo(()=>{var P;if(!c)return{flowNodes:[],flowEdges:[]};const C=[...r.get(e)??[]].filter(L=>l.has(L)),E=[...o.get(e)??[]].filter(L=>l.has(L)),k=[],N=[],M=(L,I,F,R)=>{const j=l.get(L),O=Bn(j),G=iu(O);return{id:L,position:{x:I,y:F},data:{label:g.jsxs("div",{style:{pointerEvents:"none"},children:[g.jsx("div",{style:{fontWeight:R?700:500,fontSize:R?13:11,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:Ir(j)}),g.jsx("div",{style:{fontSize:9,opacity:.5,marginTop:2,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:j.route}),O&&O!=="root"&&g.jsx("div",{style:{fontSize:8,marginTop:2,color:G,textTransform:"uppercase",letterSpacing:"0.05em",fontWeight:500},children:la(O)})]})},style:{width:R?Gt+40:Gt,height:R?jl+10:jl,background:R?`linear-gradient(135deg, ${G}30, ${G}15)`:`linear-gradient(135deg, ${G}15, ${G}08)`,border:`${R?2:1}px solid ${G}${R?"80":"40"}`,borderRadius:10,padding:"8px 12px",color:"#e2e8f0",cursor:R?"default":"pointer",boxShadow:R?`0 0 20px ${G}20`:"none"},sourcePosition:"bottom",targetPosition:"top"}},A=-(E.length*(Gt+Oo)-Oo)/2+Gt/2;for(let L=0;L<E.length;L++){const I=E[L];k.push(M(I,A+L*(Gt+Oo)-Gt/2,Cf-Jx-jl,!1));const F=((P=r.get(e))==null?void 0:P.has(I))??!1;N.push({id:`in-${I}`,source:I,target:e,type:"smoothstep",animated:!0,style:{stroke:F?"rgba(251,191,36,0.5)":"rgba(139,92,246,0.5)",strokeWidth:1.5,strokeDasharray:F?"4 4":void 0},markerEnd:{type:"arrowclosed",color:F?"rgba(251,191,36,0.7)":"rgba(139,92,246,0.7)"},label:F?"↺":void 0,labelStyle:{fontSize:12,fill:"#fbbf24"}})}k.push(M(e,-Gt/2-20,Cf,!0));const V=-(C.length*(Gt+Oo)-Oo)/2+Gt/2;for(let L=0;L<C.length;L++){const I=C[L];E.includes(I)||(k.push(M(I,V+L*(Gt+Oo)-Gt/2,Cf+Jx+jl+10,!1)),N.push({id:`out-${I}`,source:e,target:I,type:"smoothstep",animated:!0,style:{stroke:"rgba(139,92,246,0.5)",strokeWidth:1.5},markerEnd:{type:"arrowclosed",color:"rgba(139,92,246,0.7)"}}))}return{flowNodes:k,flowEdges:N}},[e,c,l,r,o]),d=h.useCallback(C=>{const E=a.current;if(!E)return;const k=new Set([C]),N=new Set;for(const M of f)M.source===C&&(k.add(M.target),N.add(M.id)),M.target===C&&(k.add(M.source),N.add(M.id));E.querySelectorAll(".react-flow__node").forEach(M=>{M.style.opacity=k.has(M.getAttribute("data-id")??"")?"1":"0.25",M.style.transition="opacity 120ms ease"}),E.querySelectorAll(".react-flow__edge").forEach(M=>{const T=M.getAttribute("data-id")??"";M.style.opacity=N.has(T)?"1":"0.1",M.style.transition="opacity 120ms ease"})},[f]),p=h.useCallback(()=>{const C=a.current;C&&(C.querySelectorAll(".react-flow__node").forEach(E=>{E.style.opacity="",E.style.transition=""}),C.querySelectorAll(".react-flow__edge").forEach(E=>{E.style.opacity="",E.style.transition=""}))},[]),m=h.useCallback((C,E)=>{E.id!==e&&d(E.id)},[d,e]),y=h.useCallback(()=>p(),[p]),b=h.useCallback((C,E)=>{E.id!==e&&i(E.id)},[e,i]),_=h.useCallback((C,E)=>s(E.id),[s]);if(!c)return null;const v=((w=o.get(e))==null?void 0:w.size)??0,x=((S=r.get(e))==null?void 0:S.size)??0;return g.jsxs("div",{className:"flex flex-1 flex-col min-h-0",children:[g.jsxs("div",{className:"px-5 py-3 border-b border-sidebar-border/50",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"w-2.5 h-2.5 rounded-full",style:{backgroundColor:iu(Bn(c))}}),g.jsx("h2",{className:"text-sm font-semibold text-foreground",children:Ir(c)}),g.jsx("span",{className:"font-mono text-[10px] text-muted-foreground/50",children:c.route})]}),g.jsxs("p",{className:"text-[10px] text-muted-foreground mt-0.5",children:[v," incoming · ",x," outgoing",v===0&&x===0&&" · no navigation links detected",g.jsx("span",{className:"ml-2 opacity-50",children:"click to navigate · double-click for details"})]})]}),g.jsx("div",{ref:a,className:"flex-1 min-h-0",children:g.jsx(pd,{children:g.jsxs(Ig,{nodes:u,edges:f,fitView:!0,fitViewOptions:{padding:.4},proOptions:{hideAttribution:!0},minZoom:.3,maxZoom:1.5,nodesDraggable:!1,nodesConnectable:!1,elementsSelectable:!1,onNodeMouseEnter:m,onNodeMouseLeave:y,onNodeClick:b,onNodeDoubleClick:_,children:[g.jsx($g,{color:"rgba(255,255,255,0.03)",gap:24}),g.jsx(Og,{showInteractive:!1})]},e)})})]})}function aK({tree:e,noRouteScreens:n,onSelect:r,selectedId:o}){return g.jsxs("div",{className:"flex-1 overflow-y-auto px-4 py-3",children:[g.jsx(Dg,{node:e,depth:0,onSelect:r,selectedId:o}),n.length>0&&g.jsxs("div",{className:"mt-4 pt-3 border-t border-sidebar-border",children:[g.jsxs("div",{className:"flex items-center gap-2 mb-1.5 px-1.5",children:[g.jsx(ET,{className:"h-3 w-3 text-yellow-500/70"}),g.jsxs("span",{className:"text-[10px] font-medium text-muted-foreground uppercase tracking-wider",children:["Layouts (",n.length,")"]})]}),n.map(i=>g.jsxs("button",{onClick:()=>r(i.id),className:`flex items-center gap-1.5 w-full px-3 py-0.5 rounded text-xs transition-colors ${o===i.id?"bg-purple-500/15 text-foreground":"text-muted-foreground hover:bg-white/5"}`,children:[g.jsx("span",{className:"w-1.5 h-1.5 rounded-full shrink-0",style:{backgroundColor:iu(Bn(i))}}),i.name]},i.id))]})]})}function lK(){const[e,n]=h.useState(null),[r,o]=h.useState(null),[i,s]=h.useState(null),[a,l]=h.useState(null),[c,u]=h.useState("visual"),[f,d]=h.useState([]);h.useEffect(()=>{fetch("/api/raw-graphs").then(S=>{if(!S.ok)throw new Error(`HTTP ${S.status}`);return S.json()}).then(S=>n(S)).catch(S=>o(String(S)))},[]);const{screens:p,outgoing:m,incoming:y,tree:b,noRouteScreens:_,navCount:v}=h.useMemo(()=>{if(!(e!=null&&e.ui))return{screens:[],outgoing:new Map,incoming:new Map,tree:null,noRouteScreens:[],navCount:0};const S=oK(e),C=S.screens.filter(N=>N.route),E=S.screens.filter(N=>!N.route);let k=0;for(const N of S.outgoing.values())k+=N.size;return{screens:S.screens,outgoing:S.outgoing,incoming:S.incoming,tree:iK(C),noRouteScreens:E,navCount:k}},[e]);h.useEffect(()=>{if(!i&&p.length>0){const S=p.find(C=>C.route==="/");s((S==null?void 0:S.id)??p[0].id)}},[p,i]);const x=h.useCallback(S=>{d(C=>i?[...C,i]:C),s(S)},[i]),w=h.useCallback(()=>{d(S=>{const C=[...S],E=C.pop();return E&&s(E),C})},[]);return r?g.jsx("div",{className:"flex h-full items-center justify-center",children:g.jsx("p",{className:"text-sm text-red-400",children:r})}):!e||!b?g.jsx("div",{className:"flex h-full items-center justify-center",children:g.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})}):g.jsxs("div",{className:"flex h-full min-h-0",children:[g.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[g.jsxs("div",{className:"border-b border-sidebar-border px-6 py-3 flex items-center justify-between",children:[g.jsxs("div",{className:"flex items-center gap-3",children:[c==="visual"&&f.length>0&&g.jsx("button",{onClick:w,className:"p-1 rounded-md hover:bg-white/10 text-muted-foreground hover:text-foreground transition-colors",children:g.jsx(mm,{className:"h-4 w-4"})}),g.jsx(nT,{className:"h-5 w-5 text-muted-foreground"}),g.jsxs("div",{children:[g.jsx("h1",{className:"text-lg font-semibold text-foreground",children:"Sitemap"}),g.jsxs("p",{className:"mt-0.5 text-xs text-muted-foreground",children:[p.filter(S=>S.route).length," screens · ",v," links"]})]})]}),g.jsxs("div",{className:"flex items-center gap-1 bg-muted/30 rounded-lg p-0.5",children:[g.jsxs("button",{onClick:()=>u("visual"),className:`flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs font-medium transition-colors ${c==="visual"?"bg-purple-600 text-white":"text-muted-foreground hover:text-foreground"}`,children:[g.jsx(YA,{className:"h-3.5 w-3.5"}),"Visual"]}),g.jsxs("button",{onClick:()=>u("list"),className:`flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs font-medium transition-colors ${c==="list"?"bg-purple-600 text-white":"text-muted-foreground hover:text-foreground"}`,children:[g.jsx(eT,{className:"h-3.5 w-3.5"}),"List"]})]})]}),c==="list"?g.jsx(aK,{tree:b,noRouteScreens:_,onSelect:S=>{s(S),u("visual")},selectedId:i}):i?g.jsx(sK,{focusId:i,screens:p,outgoing:m,incoming:y,onNavigate:x,onDetail:l}):null]}),c==="visual"&&g.jsxs("div",{className:"w-56 shrink-0 border-l border-sidebar-border overflow-y-auto bg-sidebar-background/30",children:[g.jsx("div",{className:"px-3 py-2 border-b border-sidebar-border/50",children:g.jsx("h3",{className:"text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:"All Screens"})}),g.jsx("div",{className:"py-1",children:g.jsx(Dg,{node:b,depth:0,onSelect:x,selectedId:i})})]}),a&&e&&g.jsx("div",{className:"flex w-[400px] shrink-0 flex-col border-l border-sidebar-border bg-slate-900/95",children:g.jsx(bN,{nodeId:a,nodeLayer:"ui",graphs:e,onClose:()=>l(null),onNavigate:S=>{l(null),x(S)}})})]})}function cK(){const[e,n]=h.useState(null),[r,o]=h.useState(!0),[i,s]=h.useState(!1),[a,l]=h.useState(!1),[c,u]=h.useState(null),[f,d]=h.useState(new Set),[p,m]=h.useState("fetch-resolver"),[y,b]=h.useState([]),[_,v]=h.useState(""),[x,w]=h.useState("crosslayer"),[S,C]=h.useState(""),[E,k]=h.useState(new Set),[N,M]=h.useState({module:!0,screen:!0}),[T,A]=h.useState([]),[D,V]=h.useState([]),[P,L]=h.useState(""),[I,F]=h.useState(""),[R,j]=h.useState(""),O=h.useCallback(async()=>{var z,U,Y,K,Z,ee,Q,te,ce,me;try{const ue=await fetch("/api/parser-config");if(!ue.ok)throw new Error(`HTTP ${ue.status}`);const ye=await ue.json();n(ye),d(new Set(((z=ye.config.parsers)==null?void 0:z.disabled)??[])),m(((Y=(U=ye.config.parsers)==null?void 0:U.primary)==null?void 0:Y.crosslayer)??"fetch-resolver"),b(((K=ye.config.parsers)==null?void 0:K.custom)??[]),C(ye.config.port?String(ye.config.port):""),k(new Set(((Z=ye.config.taggers)==null?void 0:Z.disabled)??[])),M(((ee=ye.config.taggers)==null?void 0:ee.trackUntagged)??{module:!0,screen:!0}),A(((te=(Q=ye.config.taggers)==null?void 0:Q.module)==null?void 0:te.rules)??[]),V(((me=(ce=ye.config.taggers)==null?void 0:ce.module)==null?void 0:me.trivialGroups)??[]),o(!1)}catch(ue){u(String(ue)),o(!1)}},[]);h.useEffect(()=>{O()},[O]);const G=h.useCallback(async()=>{s(!0),l(!1),u(null);try{const z={};E.size>0&&(z.disabled=[...E]),Object.keys(N).length>0&&(z.trackUntagged=N);const U={};T.length>0&&(U.rules=T),D.length>0&&(U.trivialGroups=D),Object.keys(U).length>0&&(z.module=U);const Y=S.trim()?parseInt(S.trim(),10):void 0,K={...Y&&!isNaN(Y)&&{port:Y},parsers:{primary:{crosslayer:p},disabled:[...f],custom:y.length>0?y:void 0},...Object.keys(z).length>0&&{taggers:z}};K.parsers.disabled.length===0&&delete K.parsers.disabled,K.parsers.custom||delete K.parsers.custom;const Z=await fetch("/api/parser-config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(K)});if(!Z.ok)throw new Error(`HTTP ${Z.status}`);l(!0),setTimeout(()=>l(!1),3e3)}catch(z){u(String(z))}finally{s(!1)}},[p,f,y,E,N,T,D,S]),$=z=>{d(U=>{const Y=new Set(U);return Y.has(z)?Y.delete(z):Y.add(z),Y})},X=()=>{_.trim()&&(b(z=>[...z,{path:_.trim(),layer:x}]),v(""))},H=z=>{b(U=>U.filter((Y,K)=>K!==z))};if(r)return g.jsx("div",{className:"flex items-center justify-center h-full text-muted-foreground",children:"Loading configuration..."});const W=[...((e==null?void 0:e.detection)??[]).map(z=>({...z,kind:"standard"})),...((e==null?void 0:e.crosslayerParsers)??[]).map(z=>({id:z.id,layer:"crosslayer",label:z.label,detected:!0,kind:"crosslayer"}))];return g.jsxs("div",{className:"h-full overflow-y-auto p-6",children:[g.jsxs("div",{className:"flex items-center justify-between mb-6",children:[g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx(o_,{className:"h-6 w-6 text-muted-foreground"}),g.jsx("h1",{className:"text-xl font-semibold",children:"Parser Configuration"})]}),g.jsxs("button",{onClick:G,disabled:i,className:"flex items-center gap-2 px-4 py-2 rounded-lg bg-purple-600 hover:bg-purple-500 text-white text-sm font-medium transition-colors disabled:opacity-50",children:[a?g.jsx(bv,{className:"h-4 w-4"}):g.jsx(mT,{className:"h-4 w-4"}),i?"Saving...":a?"Saved":"Save"]})]}),c&&g.jsxs("div",{className:"flex items-center gap-2 p-3 rounded-lg bg-red-500/10 text-red-400 text-sm mb-6",children:[g.jsx(DA,{className:"h-4 w-4 shrink-0"}),c]}),g.jsxs("section",{className:"mb-6 space-y-3",children:[g.jsx("h2",{className:"text-sm font-medium text-muted-foreground uppercase tracking-wider",children:"Server"}),g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx("label",{className:"text-sm text-muted-foreground w-24 shrink-0",children:"Port"}),g.jsx("input",{type:"text",value:S,onChange:z=>C(z.target.value),placeholder:"Random",className:"w-32 px-3 py-1.5 text-sm rounded-lg border border-border/50 bg-background text-foreground placeholder:text-muted-foreground"}),g.jsx("span",{className:"text-xs text-muted-foreground",children:"Leave empty for random port on each start"})]})]}),g.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-6",children:[g.jsxs("div",{className:"space-y-6",children:[g.jsxs("section",{className:"space-y-3",children:[g.jsx("h2",{className:"text-sm font-medium text-muted-foreground uppercase tracking-wider",children:"Stack Detection"}),g.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-3 xl:grid-cols-1 gap-2",children:((e==null?void 0:e.detection)??[]).map(z=>g.jsxs("div",{className:`flex items-center gap-2 p-3 rounded-lg border ${z.detected?"border-green-500/30 bg-green-500/5":"border-border/50 bg-muted/20 opacity-50"}`,children:[z.detected?g.jsx(bv,{className:"h-4 w-4 text-green-500 shrink-0"}):g.jsx(FA,{className:"h-4 w-4 text-muted-foreground shrink-0"}),g.jsxs("div",{children:[g.jsx("div",{className:"text-sm font-medium",children:z.label}),g.jsxs("div",{className:"text-xs text-muted-foreground",children:[z.layer," layer"]})]})]},z.id))})]}),g.jsxs("section",{className:"space-y-3",children:[g.jsx("h2",{className:"text-sm font-medium text-muted-foreground uppercase tracking-wider",children:"Primary Cross-Layer Parser"}),g.jsx("p",{className:"text-xs text-muted-foreground",children:'API calls detected by other parsers but not by the primary will be flagged as "out of pattern".'}),g.jsx("div",{className:"space-y-2",children:((e==null?void 0:e.crosslayerParsers)??[]).map(z=>g.jsxs("label",{className:`flex items-center gap-3 p-3 rounded-lg border cursor-pointer transition-colors ${p===z.id?"border-purple-500/50 bg-purple-500/5":"border-border/50 bg-card hover:border-border"}`,children:[g.jsx("input",{type:"radio",name:"primary",value:z.id,checked:p===z.id,onChange:()=>m(z.id),className:"accent-purple-600"}),g.jsxs("div",{children:[g.jsx("div",{className:"text-sm font-medium",children:z.label}),g.jsx("div",{className:"text-xs text-muted-foreground",children:z.id})]})]},z.id))})]})]}),g.jsxs("div",{className:"space-y-6",children:[g.jsxs("section",{className:"space-y-3",children:[g.jsx("h2",{className:"text-sm font-medium text-muted-foreground uppercase tracking-wider",children:"Parsers"}),g.jsx("div",{className:"space-y-2",children:W.map(z=>g.jsxs("div",{className:"flex items-center justify-between p-3 rounded-lg border border-border/50 bg-card",children:[g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx("button",{onClick:()=>$(z.id),className:`w-10 h-5 rounded-full transition-colors relative shrink-0 ${f.has(z.id)?"bg-muted":"bg-purple-600"}`,children:g.jsx("span",{className:`block absolute top-0.5 left-0.5 h-4 w-4 rounded-full bg-white transition-all ${f.has(z.id)?"left-0.5":"left-[22px]"}`})}),g.jsxs("div",{children:[g.jsx("div",{className:"text-sm font-medium",children:z.label}),g.jsxs("div",{className:"text-xs text-muted-foreground",children:[z.id," — ",z.layer]})]})]}),z.kind==="crosslayer"&&g.jsx("span",{className:"text-xs px-2 py-0.5 rounded bg-purple-500/10 text-purple-400",children:"cross-layer"})]},z.id))})]}),g.jsxs("section",{className:"space-y-3",children:[g.jsx("h2",{className:"text-sm font-medium text-muted-foreground uppercase tracking-wider",children:"Custom Parsers"}),g.jsx("p",{className:"text-xs text-muted-foreground",children:"JS files exporting a parser object. Path relative to project root."}),y.length>0&&g.jsx("div",{className:"space-y-2",children:y.map((z,U)=>g.jsxs("div",{className:"flex items-center gap-2 p-2 rounded-lg border border-border/50 bg-card",children:[g.jsx("code",{className:"text-xs flex-1 text-muted-foreground",children:z.path}),g.jsx("span",{className:"text-xs px-2 py-0.5 rounded bg-muted text-muted-foreground",children:z.layer}),g.jsx("button",{onClick:()=>H(U),className:"text-red-400 hover:text-red-300",children:g.jsx(Yd,{className:"h-3.5 w-3.5"})})]},U))}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("input",{type:"text",value:_,onChange:z=>v(z.target.value),placeholder:"./parsers/my-parser.js",className:"flex-1 px-3 py-1.5 text-sm rounded-lg border border-border/50 bg-background text-foreground placeholder:text-muted-foreground",onKeyDown:z=>z.key==="Enter"&&X()}),g.jsxs("select",{value:x,onChange:z=>w(z.target.value),className:"px-2 py-1.5 text-sm rounded-lg border border-border/50 bg-background text-foreground",children:[g.jsx("option",{value:"crosslayer",children:"crosslayer"}),g.jsx("option",{value:"ui",children:"ui"}),g.jsx("option",{value:"api",children:"api"}),g.jsx("option",{value:"db",children:"db"})]}),g.jsx("button",{onClick:X,className:"p-1.5 rounded-lg border border-border/50 hover:bg-muted transition-colors",children:g.jsx(Gd,{className:"h-4 w-4"})})]})]})]})]}),g.jsxs("div",{className:"mt-8 border-t border-border/30 pt-6",children:[g.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[g.jsx(_T,{className:"h-5 w-5 text-muted-foreground"}),g.jsx("h2",{className:"text-lg font-semibold",children:"Taggers"})]}),g.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-6",children:[g.jsxs("section",{className:"space-y-3",children:[g.jsx("h3",{className:"text-sm font-medium text-muted-foreground uppercase tracking-wider",children:"Built-in Taggers"}),[{id:"module",label:"Module",description:"Assigns modules from directory structure"},{id:"screen",label:"Screen",description:"Marks pages and layouts as screens"}].map(z=>g.jsxs("div",{className:"p-3 rounded-lg border border-border/50 bg-card space-y-2",children:[g.jsx("div",{className:"flex items-center justify-between",children:g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx("button",{onClick:()=>k(U=>{const Y=new Set(U);return Y.has(z.id)?Y.delete(z.id):Y.add(z.id),Y}),className:`w-10 h-5 rounded-full transition-colors relative shrink-0 ${E.has(z.id)?"bg-muted":"bg-purple-600"}`,children:g.jsx("span",{className:`block absolute top-0.5 left-0.5 h-4 w-4 rounded-full bg-white transition-all ${E.has(z.id)?"left-0.5":"left-[22px]"}`})}),g.jsxs("div",{children:[g.jsx("div",{className:"text-sm font-medium",children:z.label}),g.jsx("div",{className:"text-xs text-muted-foreground",children:z.description})]})]})}),g.jsxs("label",{className:"flex items-center gap-2 text-xs text-muted-foreground pl-[52px]",children:[g.jsx("input",{type:"checkbox",checked:N[z.id]??!0,onChange:U=>M(Y=>({...Y,[z.id]:U.target.checked})),className:"accent-purple-600"}),"Track untagged nodes"]})]},z.id))]}),g.jsxs("section",{className:"space-y-3",children:[g.jsx("h3",{className:"text-sm font-medium text-muted-foreground uppercase tracking-wider",children:"Module Rules"}),g.jsx("p",{className:"text-xs text-muted-foreground",children:"Custom glob patterns to assign modules. Matched before auto-detection."}),T.length>0&&g.jsx("div",{className:"space-y-2",children:T.map((z,U)=>g.jsxs("div",{className:"flex items-center gap-2 p-2 rounded-lg border border-border/50 bg-card",children:[g.jsx("code",{className:"text-xs flex-1 text-muted-foreground",children:z.match}),g.jsx("span",{className:"text-xs px-2 py-0.5 rounded bg-purple-500/10 text-purple-400",children:z.module}),g.jsx("button",{onClick:()=>A(Y=>Y.filter((K,Z)=>Z!==U)),className:"text-red-400 hover:text-red-300",children:g.jsx(Yd,{className:"h-3.5 w-3.5"})})]},U))}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("input",{type:"text",value:I,onChange:z=>F(z.target.value),placeholder:"app/(admin)/**",className:"flex-1 px-3 py-1.5 text-sm rounded-lg border border-border/50 bg-background text-foreground placeholder:text-muted-foreground"}),g.jsx("input",{type:"text",value:R,onChange:z=>j(z.target.value),placeholder:"admin",className:"w-28 px-3 py-1.5 text-sm rounded-lg border border-border/50 bg-background text-foreground placeholder:text-muted-foreground"}),g.jsx("button",{onClick:()=>{I.trim()&&R.trim()&&(A(z=>[...z,{match:I.trim(),module:R.trim()}]),F(""),j(""))},className:"p-1.5 rounded-lg border border-border/50 hover:bg-muted transition-colors",children:g.jsx(Gd,{className:"h-4 w-4"})})]})]}),g.jsxs("section",{className:"space-y-3",children:[g.jsx("h3",{className:"text-sm font-medium text-muted-foreground uppercase tracking-wider",children:"Trivial Route Groups"}),g.jsx("p",{className:"text-xs text-muted-foreground",children:"Route groups that are auth/layout wrappers, not feature modules. These are skipped during module detection."}),D.length>0&&g.jsx("div",{className:"flex flex-wrap gap-1.5",children:D.map((z,U)=>g.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full px-2.5 py-1 text-xs bg-muted text-muted-foreground",children:["(",z,")",g.jsx("button",{onClick:()=>V(Y=>Y.filter((K,Z)=>Z!==U)),className:"text-red-400 hover:text-red-300 ml-0.5",children:g.jsx(Yd,{className:"h-3 w-3"})})]},U))}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("input",{type:"text",value:P,onChange:z=>L(z.target.value),placeholder:"protected",className:"flex-1 px-3 py-1.5 text-sm rounded-lg border border-border/50 bg-background text-foreground placeholder:text-muted-foreground",onKeyDown:z=>{z.key==="Enter"&&P.trim()&&(V(U=>[...U,P.trim()]),L(""))}}),g.jsx("button",{onClick:()=>{P.trim()&&(V(z=>[...z,P.trim()]),L(""))},className:"p-1.5 rounded-lg border border-border/50 hover:bg-muted transition-colors",children:g.jsx(Gd,{className:"h-4 w-4"})})]})]})]})]})]})}function uK(){return g.jsxs("div",{className:"flex h-screen flex-col overflow-hidden bg-background text-foreground",children:[g.jsx(lz,{}),g.jsxs("div",{className:"flex flex-1 min-h-0",children:[g.jsx(fz,{}),g.jsx("main",{className:"flex-1 min-h-0 overflow-hidden content-gradient",children:g.jsxs(Bj,{children:[g.jsx(ar,{path:"/overview",element:g.jsx(dU,{})}),g.jsx(ar,{path:"/modules",element:g.jsx(QX,{})}),g.jsx(ar,{path:"/sitemap",element:g.jsx(lK,{})}),g.jsx(ar,{path:"/journeys",element:g.jsx(tK,{})}),g.jsx(ar,{path:"/project-graph",element:g.jsx(cU,{})}),g.jsx(ar,{path:"/settings",element:g.jsx(cK,{})}),g.jsx(ar,{path:"*",element:g.jsx(Fj,{to:"/overview",replace:!0})})]})})]})]})}Ef.createRoot(document.getElementById("root")).render(g.jsx(Je.StrictMode,{children:g.jsx(qj,{children:g.jsx(s3,{children:g.jsx(uK,{})})})}));