flowyml 1.1.0__py3-none-any.whl → 1.3.0__py3-none-any.whl
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.
- flowyml/__init__.py +3 -0
- flowyml/assets/base.py +10 -0
- flowyml/assets/metrics.py +6 -0
- flowyml/cli/main.py +108 -2
- flowyml/cli/run.py +9 -2
- flowyml/core/execution_status.py +52 -0
- flowyml/core/hooks.py +106 -0
- flowyml/core/observability.py +210 -0
- flowyml/core/orchestrator.py +274 -0
- flowyml/core/pipeline.py +193 -231
- flowyml/core/project.py +34 -2
- flowyml/core/remote_orchestrator.py +109 -0
- flowyml/core/resources.py +22 -5
- flowyml/core/retry_policy.py +80 -0
- flowyml/core/step.py +18 -1
- flowyml/core/submission_result.py +53 -0
- flowyml/core/versioning.py +2 -2
- flowyml/integrations/keras.py +95 -22
- flowyml/monitoring/alerts.py +2 -2
- flowyml/stacks/__init__.py +15 -0
- flowyml/stacks/aws.py +599 -0
- flowyml/stacks/azure.py +295 -0
- flowyml/stacks/components.py +24 -2
- flowyml/stacks/gcp.py +158 -11
- flowyml/stacks/local.py +5 -0
- flowyml/storage/artifacts.py +15 -5
- flowyml/storage/materializers/__init__.py +2 -0
- flowyml/storage/materializers/cloudpickle.py +74 -0
- flowyml/storage/metadata.py +166 -5
- flowyml/ui/backend/main.py +41 -1
- flowyml/ui/backend/routers/assets.py +356 -15
- flowyml/ui/backend/routers/client.py +46 -0
- flowyml/ui/backend/routers/execution.py +13 -2
- flowyml/ui/backend/routers/experiments.py +48 -12
- flowyml/ui/backend/routers/metrics.py +213 -0
- flowyml/ui/backend/routers/pipelines.py +63 -7
- flowyml/ui/backend/routers/projects.py +33 -7
- flowyml/ui/backend/routers/runs.py +150 -8
- flowyml/ui/frontend/dist/assets/index-DcYwrn2j.css +1 -0
- flowyml/ui/frontend/dist/assets/index-Dlz_ygOL.js +592 -0
- flowyml/ui/frontend/dist/index.html +2 -2
- flowyml/ui/frontend/src/App.jsx +4 -1
- flowyml/ui/frontend/src/app/assets/page.jsx +260 -230
- flowyml/ui/frontend/src/app/dashboard/page.jsx +38 -7
- flowyml/ui/frontend/src/app/experiments/page.jsx +61 -314
- flowyml/ui/frontend/src/app/observability/page.jsx +277 -0
- flowyml/ui/frontend/src/app/pipelines/page.jsx +79 -402
- flowyml/ui/frontend/src/app/projects/[projectId]/_components/ProjectArtifactsList.jsx +151 -0
- flowyml/ui/frontend/src/app/projects/[projectId]/_components/ProjectExperimentsList.jsx +145 -0
- flowyml/ui/frontend/src/app/projects/[projectId]/_components/ProjectHeader.jsx +45 -0
- flowyml/ui/frontend/src/app/projects/[projectId]/_components/ProjectHierarchy.jsx +467 -0
- flowyml/ui/frontend/src/app/projects/[projectId]/_components/ProjectMetricsPanel.jsx +253 -0
- flowyml/ui/frontend/src/app/projects/[projectId]/_components/ProjectPipelinesList.jsx +105 -0
- flowyml/ui/frontend/src/app/projects/[projectId]/_components/ProjectRelations.jsx +189 -0
- flowyml/ui/frontend/src/app/projects/[projectId]/_components/ProjectRunsList.jsx +136 -0
- flowyml/ui/frontend/src/app/projects/[projectId]/_components/ProjectTabs.jsx +95 -0
- flowyml/ui/frontend/src/app/projects/[projectId]/page.jsx +326 -0
- flowyml/ui/frontend/src/app/projects/page.jsx +13 -3
- flowyml/ui/frontend/src/app/runs/[runId]/page.jsx +79 -10
- flowyml/ui/frontend/src/app/runs/page.jsx +82 -424
- flowyml/ui/frontend/src/app/settings/page.jsx +1 -0
- flowyml/ui/frontend/src/app/tokens/page.jsx +62 -16
- flowyml/ui/frontend/src/components/AssetDetailsPanel.jsx +373 -0
- flowyml/ui/frontend/src/components/AssetLineageGraph.jsx +291 -0
- flowyml/ui/frontend/src/components/AssetStatsDashboard.jsx +302 -0
- flowyml/ui/frontend/src/components/AssetTreeHierarchy.jsx +477 -0
- flowyml/ui/frontend/src/components/ExperimentDetailsPanel.jsx +227 -0
- flowyml/ui/frontend/src/components/NavigationTree.jsx +401 -0
- flowyml/ui/frontend/src/components/PipelineDetailsPanel.jsx +239 -0
- flowyml/ui/frontend/src/components/PipelineGraph.jsx +67 -3
- flowyml/ui/frontend/src/components/ProjectSelector.jsx +115 -0
- flowyml/ui/frontend/src/components/RunDetailsPanel.jsx +298 -0
- flowyml/ui/frontend/src/components/header/Header.jsx +48 -1
- flowyml/ui/frontend/src/components/plugins/ZenMLIntegration.jsx +106 -0
- flowyml/ui/frontend/src/components/sidebar/Sidebar.jsx +52 -26
- flowyml/ui/frontend/src/components/ui/DataView.jsx +35 -17
- flowyml/ui/frontend/src/components/ui/ErrorBoundary.jsx +118 -0
- flowyml/ui/frontend/src/contexts/ProjectContext.jsx +2 -2
- flowyml/ui/frontend/src/contexts/ToastContext.jsx +116 -0
- flowyml/ui/frontend/src/layouts/MainLayout.jsx +5 -1
- flowyml/ui/frontend/src/router/index.jsx +4 -0
- flowyml/ui/frontend/src/utils/date.js +10 -0
- flowyml/ui/frontend/src/utils/downloads.js +11 -0
- flowyml/utils/config.py +6 -0
- flowyml/utils/stack_config.py +45 -3
- {flowyml-1.1.0.dist-info → flowyml-1.3.0.dist-info}/METADATA +113 -12
- {flowyml-1.1.0.dist-info → flowyml-1.3.0.dist-info}/RECORD +90 -53
- {flowyml-1.1.0.dist-info → flowyml-1.3.0.dist-info}/licenses/LICENSE +1 -1
- flowyml/ui/frontend/dist/assets/index-DFNQnrUj.js +0 -448
- flowyml/ui/frontend/dist/assets/index-pWI271rZ.css +0 -1
- {flowyml-1.1.0.dist-info → flowyml-1.3.0.dist-info}/WHEEL +0 -0
- {flowyml-1.1.0.dist-info → flowyml-1.3.0.dist-info}/entry_points.txt +0 -0
|
@@ -1,448 +0,0 @@
|
|
|
1
|
-
function EC(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const s in n)if(s!=="default"&&!(s in e)){const i=Object.getOwnPropertyDescriptor(n,s);i&&Object.defineProperty(e,s,i.get?i:{enumerable:!0,get:()=>n[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function r(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(s){if(s.ep)return;s.ep=!0;const i=r(s);fetch(s.href,i)}})();var cc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function fd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var CC={exports:{}},hd={},TC={exports:{}},be={};/**
|
|
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 Fl=Symbol.for("react.element"),G3=Symbol.for("react.portal"),K3=Symbol.for("react.fragment"),Y3=Symbol.for("react.strict_mode"),X3=Symbol.for("react.profiler"),Z3=Symbol.for("react.provider"),Q3=Symbol.for("react.context"),J3=Symbol.for("react.forward_ref"),e5=Symbol.for("react.suspense"),t5=Symbol.for("react.memo"),r5=Symbol.for("react.lazy"),T1=Symbol.iterator;function n5(e){return e===null||typeof e!="object"?null:(e=T1&&e[T1]||e["@@iterator"],typeof e=="function"?e:null)}var PC={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},MC=Object.assign,RC={};function $a(e,t,r){this.props=e,this.context=t,this.refs=RC,this.updater=r||PC}$a.prototype.isReactComponent={};$a.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};$a.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function AC(){}AC.prototype=$a.prototype;function av(e,t,r){this.props=e,this.context=t,this.refs=RC,this.updater=r||PC}var ov=av.prototype=new AC;ov.constructor=av;MC(ov,$a.prototype);ov.isPureReactComponent=!0;var P1=Array.isArray,DC=Object.prototype.hasOwnProperty,lv={current:null},IC={key:!0,ref:!0,__self:!0,__source:!0};function LC(e,t,r){var n,s={},i=null,a=null;if(t!=null)for(n in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(i=""+t.key),t)DC.call(t,n)&&!IC.hasOwnProperty(n)&&(s[n]=t[n]);var o=arguments.length-2;if(o===1)s.children=r;else if(1<o){for(var l=Array(o),d=0;d<o;d++)l[d]=arguments[d+2];s.children=l}if(e&&e.defaultProps)for(n in o=e.defaultProps,o)s[n]===void 0&&(s[n]=o[n]);return{$$typeof:Fl,type:e,key:i,ref:a,props:s,_owner:lv.current}}function s5(e,t){return{$$typeof:Fl,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function cv(e){return typeof e=="object"&&e!==null&&e.$$typeof===Fl}function i5(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var M1=/\/+/g;function pf(e,t){return typeof e=="object"&&e!==null&&e.key!=null?i5(""+e.key):t.toString(36)}function Kc(e,t,r,n,s){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(i){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case Fl:case G3:a=!0}}if(a)return a=e,s=s(a),e=n===""?"."+pf(a,0):n,P1(s)?(r="",e!=null&&(r=e.replace(M1,"$&/")+"/"),Kc(s,t,r,"",function(d){return d})):s!=null&&(cv(s)&&(s=s5(s,r+(!s.key||a&&a.key===s.key?"":(""+s.key).replace(M1,"$&/")+"/")+e)),t.push(s)),1;if(a=0,n=n===""?".":n+":",P1(e))for(var o=0;o<e.length;o++){i=e[o];var l=n+pf(i,o);a+=Kc(i,t,r,l,s)}else if(l=n5(e),typeof l=="function")for(e=l.call(e),o=0;!(i=e.next()).done;)i=i.value,l=n+pf(i,o++),a+=Kc(i,t,r,l,s);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function uc(e,t,r){if(e==null)return e;var n=[],s=0;return Kc(e,n,"","",function(i){return t.call(r,i,s++)}),n}function a5(e){if(e._status===-1){var t=e._result;t=t(),t.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=t)}if(e._status===1)return e._result.default;throw e._result}var Kt={current:null},Yc={transition:null},o5={ReactCurrentDispatcher:Kt,ReactCurrentBatchConfig:Yc,ReactCurrentOwner:lv};function OC(){throw Error("act(...) is not supported in production builds of React.")}be.Children={map:uc,forEach:function(e,t,r){uc(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return uc(e,function(){t++}),t},toArray:function(e){return uc(e,function(t){return t})||[]},only:function(e){if(!cv(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};be.Component=$a;be.Fragment=K3;be.Profiler=X3;be.PureComponent=av;be.StrictMode=Y3;be.Suspense=e5;be.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=o5;be.act=OC;be.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=MC({},e.props),s=e.key,i=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,a=lv.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var o=e.type.defaultProps;for(l in t)DC.call(t,l)&&!IC.hasOwnProperty(l)&&(n[l]=t[l]===void 0&&o!==void 0?o[l]:t[l])}var l=arguments.length-2;if(l===1)n.children=r;else if(1<l){o=Array(l);for(var d=0;d<l;d++)o[d]=arguments[d+2];n.children=o}return{$$typeof:Fl,type:e.type,key:s,ref:i,props:n,_owner:a}};be.createContext=function(e){return e={$$typeof:Q3,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Z3,_context:e},e.Consumer=e};be.createElement=LC;be.createFactory=function(e){var t=LC.bind(null,e);return t.type=e,t};be.createRef=function(){return{current:null}};be.forwardRef=function(e){return{$$typeof:J3,render:e}};be.isValidElement=cv;be.lazy=function(e){return{$$typeof:r5,_payload:{_status:-1,_result:e},_init:a5}};be.memo=function(e,t){return{$$typeof:t5,type:e,compare:t===void 0?null:t}};be.startTransition=function(e){var t=Yc.transition;Yc.transition={};try{e()}finally{Yc.transition=t}};be.unstable_act=OC;be.useCallback=function(e,t){return Kt.current.useCallback(e,t)};be.useContext=function(e){return Kt.current.useContext(e)};be.useDebugValue=function(){};be.useDeferredValue=function(e){return Kt.current.useDeferredValue(e)};be.useEffect=function(e,t){return Kt.current.useEffect(e,t)};be.useId=function(){return Kt.current.useId()};be.useImperativeHandle=function(e,t,r){return Kt.current.useImperativeHandle(e,t,r)};be.useInsertionEffect=function(e,t){return Kt.current.useInsertionEffect(e,t)};be.useLayoutEffect=function(e,t){return Kt.current.useLayoutEffect(e,t)};be.useMemo=function(e,t){return Kt.current.useMemo(e,t)};be.useReducer=function(e,t,r){return Kt.current.useReducer(e,t,r)};be.useRef=function(e){return Kt.current.useRef(e)};be.useState=function(e){return Kt.current.useState(e)};be.useSyncExternalStore=function(e,t,r){return Kt.current.useSyncExternalStore(e,t,r)};be.useTransition=function(){return Kt.current.useTransition()};be.version="18.3.1";TC.exports=be;var k=TC.exports;const B=fd(k),l5=EC({__proto__:null,default:B},[k]);/**
|
|
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 c5=k,u5=Symbol.for("react.element"),d5=Symbol.for("react.fragment"),f5=Object.prototype.hasOwnProperty,h5=c5.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p5={key:!0,ref:!0,__self:!0,__source:!0};function zC(e,t,r){var n,s={},i=null,a=null;r!==void 0&&(i=""+r),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(a=t.ref);for(n in t)f5.call(t,n)&&!p5.hasOwnProperty(n)&&(s[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)s[n]===void 0&&(s[n]=t[n]);return{$$typeof:u5,type:e,key:i,ref:a,props:s,_owner:h5.current}}hd.Fragment=d5;hd.jsx=zC;hd.jsxs=zC;CC.exports=hd;var c=CC.exports,my={},FC={exports:{}},mr={},$C={exports:{}},VC={};/**
|
|
18
|
-
* @license React
|
|
19
|
-
* scheduler.production.min.js
|
|
20
|
-
*
|
|
21
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
22
|
-
*
|
|
23
|
-
* This source code is licensed under the MIT license found in the
|
|
24
|
-
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/(function(e){function t(A,P){var z=A.length;A.push(P);e:for(;0<z;){var q=z-1>>>1,U=A[q];if(0<s(U,P))A[q]=P,A[z]=U,z=q;else break e}}function r(A){return A.length===0?null:A[0]}function n(A){if(A.length===0)return null;var P=A[0],z=A.pop();if(z!==P){A[0]=z;e:for(var q=0,U=A.length,K=U>>>1;q<K;){var G=2*(q+1)-1,X=A[G],ie=G+1,le=A[ie];if(0>s(X,z))ie<U&&0>s(le,X)?(A[q]=le,A[ie]=z,q=ie):(A[q]=X,A[G]=z,q=G);else if(ie<U&&0>s(le,z))A[q]=le,A[ie]=z,q=ie;else break e}}return P}function s(A,P){var z=A.sortIndex-P.sortIndex;return z!==0?z:A.id-P.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,o=a.now();e.unstable_now=function(){return a.now()-o}}var l=[],d=[],u=1,f=null,h=3,p=!1,m=!1,g=!1,b=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(A){for(var P=r(d);P!==null;){if(P.callback===null)n(d);else if(P.startTime<=A)n(d),P.sortIndex=P.expirationTime,t(l,P);else break;P=r(d)}}function w(A){if(g=!1,v(A),!m)if(r(l)!==null)m=!0,I(_);else{var P=r(d);P!==null&&V(w,P.startTime-A)}}function _(A,P){m=!1,g&&(g=!1,x(E),E=-1),p=!0;var z=h;try{for(v(P),f=r(l);f!==null&&(!(f.expirationTime>P)||A&&!D());){var q=f.callback;if(typeof q=="function"){f.callback=null,h=f.priorityLevel;var U=q(f.expirationTime<=P);P=e.unstable_now(),typeof U=="function"?f.callback=U:f===r(l)&&n(l),v(P)}else n(l);f=r(l)}if(f!==null)var K=!0;else{var G=r(d);G!==null&&V(w,G.startTime-P),K=!1}return K}finally{f=null,h=z,p=!1}}var N=!1,j=null,E=-1,M=5,C=-1;function D(){return!(e.unstable_now()-C<M)}function F(){if(j!==null){var A=e.unstable_now();C=A;var P=!0;try{P=j(!0,A)}finally{P?T():(N=!1,j=null)}}else N=!1}var T;if(typeof y=="function")T=function(){y(F)};else if(typeof MessageChannel<"u"){var S=new MessageChannel,O=S.port2;S.port1.onmessage=F,T=function(){O.postMessage(null)}}else T=function(){b(F,0)};function I(A){j=A,N||(N=!0,T())}function V(A,P){E=b(function(){A(e.unstable_now())},P)}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(A){A.callback=null},e.unstable_continueExecution=function(){m||p||(m=!0,I(_))},e.unstable_forceFrameRate=function(A){0>A||125<A?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<A?Math.floor(1e3/A):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return r(l)},e.unstable_next=function(A){switch(h){case 1:case 2:case 3:var P=3;break;default:P=h}var z=h;h=P;try{return A()}finally{h=z}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(A,P){switch(A){case 1:case 2:case 3:case 4:case 5:break;default:A=3}var z=h;h=A;try{return P()}finally{h=z}},e.unstable_scheduleCallback=function(A,P,z){var q=e.unstable_now();switch(typeof z=="object"&&z!==null?(z=z.delay,z=typeof z=="number"&&0<z?q+z:q):z=q,A){case 1:var U=-1;break;case 2:U=250;break;case 5:U=1073741823;break;case 4:U=1e4;break;default:U=5e3}return U=z+U,A={id:u++,callback:P,priorityLevel:A,startTime:z,expirationTime:U,sortIndex:-1},z>q?(A.sortIndex=z,t(d,A),r(l)===null&&A===r(d)&&(g?(x(E),E=-1):g=!0,V(w,z-q))):(A.sortIndex=U,t(l,A),m||p||(m=!0,I(_))),A},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(A){var P=h;return function(){var z=h;h=P;try{return A.apply(this,arguments)}finally{h=z}}}})(VC);$C.exports=VC;var m5=$C.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 g5=k,hr=m5;function W(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var qC=new Set,tl={};function Ni(e,t){_a(e,t),_a(e+"Capture",t)}function _a(e,t){for(tl[e]=t,e=0;e<t.length;e++)qC.add(t[e])}var Mn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),gy=Object.prototype.hasOwnProperty,y5=/^[: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]*$/,R1={},A1={};function x5(e){return gy.call(A1,e)?!0:gy.call(R1,e)?!1:y5.test(e)?A1[e]=!0:(R1[e]=!0,!1)}function v5(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function b5(e,t,r,n){if(t===null||typeof t>"u"||v5(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Yt(e,t,r,n,s,i,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=s,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var It={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){It[e]=new Yt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];It[t]=new Yt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){It[e]=new Yt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){It[e]=new Yt(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){It[e]=new Yt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){It[e]=new Yt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){It[e]=new Yt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){It[e]=new Yt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){It[e]=new Yt(e,5,!1,e.toLowerCase(),null,!1,!1)});var uv=/[\-:]([a-z])/g;function dv(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(uv,dv);It[t]=new Yt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(uv,dv);It[t]=new Yt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(uv,dv);It[t]=new Yt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){It[e]=new Yt(e,1,!1,e.toLowerCase(),null,!1,!1)});It.xlinkHref=new Yt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){It[e]=new Yt(e,1,!1,e.toLowerCase(),null,!0,!0)});function fv(e,t,r,n){var s=It.hasOwnProperty(t)?It[t]:null;(s!==null?s.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(b5(t,r,s,n)&&(r=null),n||s===null?x5(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):s.mustUseProperty?e[s.propertyName]=r===null?s.type===3?!1:"":r:(t=s.attributeName,n=s.attributeNamespace,r===null?e.removeAttribute(t):(s=s.type,r=s===3||s===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}var Vn=g5.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,dc=Symbol.for("react.element"),Gi=Symbol.for("react.portal"),Ki=Symbol.for("react.fragment"),hv=Symbol.for("react.strict_mode"),yy=Symbol.for("react.profiler"),BC=Symbol.for("react.provider"),UC=Symbol.for("react.context"),pv=Symbol.for("react.forward_ref"),xy=Symbol.for("react.suspense"),vy=Symbol.for("react.suspense_list"),mv=Symbol.for("react.memo"),as=Symbol.for("react.lazy"),HC=Symbol.for("react.offscreen"),D1=Symbol.iterator;function to(e){return e===null||typeof e!="object"?null:(e=D1&&e[D1]||e["@@iterator"],typeof e=="function"?e:null)}var rt=Object.assign,mf;function _o(e){if(mf===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);mf=t&&t[1]||""}return`
|
|
34
|
-
`+mf+e}var gf=!1;function yf(e,t){if(!e||gf)return"";gf=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(d){var n=d}Reflect.construct(e,[],t)}else{try{t.call()}catch(d){n=d}e.call(t.prototype)}else{try{throw Error()}catch(d){n=d}e()}}catch(d){if(d&&n&&typeof d.stack=="string"){for(var s=d.stack.split(`
|
|
35
|
-
`),i=n.stack.split(`
|
|
36
|
-
`),a=s.length-1,o=i.length-1;1<=a&&0<=o&&s[a]!==i[o];)o--;for(;1<=a&&0<=o;a--,o--)if(s[a]!==i[o]){if(a!==1||o!==1)do if(a--,o--,0>o||s[a]!==i[o]){var l=`
|
|
37
|
-
`+s[a].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=a&&0<=o);break}}}finally{gf=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?_o(e):""}function w5(e){switch(e.tag){case 5:return _o(e.type);case 16:return _o("Lazy");case 13:return _o("Suspense");case 19:return _o("SuspenseList");case 0:case 2:case 15:return e=yf(e.type,!1),e;case 11:return e=yf(e.type.render,!1),e;case 1:return e=yf(e.type,!0),e;default:return""}}function by(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 Ki:return"Fragment";case Gi:return"Portal";case yy:return"Profiler";case hv:return"StrictMode";case xy:return"Suspense";case vy:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case UC:return(e.displayName||"Context")+".Consumer";case BC:return(e._context.displayName||"Context")+".Provider";case pv:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case mv:return t=e.displayName||null,t!==null?t:by(e.type)||"Memo";case as:t=e._payload,e=e._init;try{return by(e(t))}catch{}}return null}function k5(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return by(t);case 8:return t===hv?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Cs(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function WC(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function j5(e){var t=WC(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var s=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(a){n=""+a,i.call(this,a)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(a){n=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function fc(e){e._valueTracker||(e._valueTracker=j5(e))}function GC(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=WC(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function mu(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 wy(e,t){var r=t.checked;return rt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function I1(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=Cs(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function KC(e,t){t=t.checked,t!=null&&fv(e,"checked",t,!1)}function ky(e,t){KC(e,t);var r=Cs(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?jy(e,t.type,r):t.hasOwnProperty("defaultValue")&&jy(e,t.type,Cs(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function L1(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function jy(e,t,r){(t!=="number"||mu(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var So=Array.isArray;function da(e,t,r,n){if(e=e.options,t){t={};for(var s=0;s<r.length;s++)t["$"+r[s]]=!0;for(r=0;r<e.length;r++)s=t.hasOwnProperty("$"+e[r].value),e[r].selected!==s&&(e[r].selected=s),s&&n&&(e[r].defaultSelected=!0)}else{for(r=""+Cs(r),t=null,s=0;s<e.length;s++){if(e[s].value===r){e[s].selected=!0,n&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function _y(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(W(91));return rt({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function O1(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(W(92));if(So(r)){if(1<r.length)throw Error(W(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:Cs(r)}}function YC(e,t){var r=Cs(t.value),n=Cs(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),n!=null&&(e.defaultValue=""+n)}function z1(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function XC(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 Sy(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?XC(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var hc,ZC=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,n,s){MSApp.execUnsafeLocalFunction(function(){return e(t,r,n,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(hc=hc||document.createElement("div"),hc.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=hc.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function rl(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Fo={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},_5=["Webkit","ms","Moz","O"];Object.keys(Fo).forEach(function(e){_5.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Fo[t]=Fo[e]})});function QC(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Fo.hasOwnProperty(e)&&Fo[e]?(""+t).trim():t+"px"}function JC(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,s=QC(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,s):e[r]=s}}var S5=rt({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 Ny(e,t){if(t){if(S5[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(W(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(W(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(W(61))}if(t.style!=null&&typeof t.style!="object")throw Error(W(62))}}function Ey(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Cy=null;function gv(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ty=null,fa=null,ha=null;function F1(e){if(e=ql(e)){if(typeof Ty!="function")throw Error(W(280));var t=e.stateNode;t&&(t=xd(t),Ty(e.stateNode,e.type,t))}}function eT(e){fa?ha?ha.push(e):ha=[e]:fa=e}function tT(){if(fa){var e=fa,t=ha;if(ha=fa=null,F1(e),t)for(e=0;e<t.length;e++)F1(t[e])}}function rT(e,t){return e(t)}function nT(){}var xf=!1;function sT(e,t,r){if(xf)return e(t,r);xf=!0;try{return rT(e,t,r)}finally{xf=!1,(fa!==null||ha!==null)&&(nT(),tT())}}function nl(e,t){var r=e.stateNode;if(r===null)return null;var n=xd(r);if(n===null)return null;r=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(W(231,t,typeof r));return r}var Py=!1;if(Mn)try{var ro={};Object.defineProperty(ro,"passive",{get:function(){Py=!0}}),window.addEventListener("test",ro,ro),window.removeEventListener("test",ro,ro)}catch{Py=!1}function N5(e,t,r,n,s,i,a,o,l){var d=Array.prototype.slice.call(arguments,3);try{t.apply(r,d)}catch(u){this.onError(u)}}var $o=!1,gu=null,yu=!1,My=null,E5={onError:function(e){$o=!0,gu=e}};function C5(e,t,r,n,s,i,a,o,l){$o=!1,gu=null,N5.apply(E5,arguments)}function T5(e,t,r,n,s,i,a,o,l){if(C5.apply(this,arguments),$o){if($o){var d=gu;$o=!1,gu=null}else throw Error(W(198));yu||(yu=!0,My=d)}}function Ei(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function iT(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function $1(e){if(Ei(e)!==e)throw Error(W(188))}function P5(e){var t=e.alternate;if(!t){if(t=Ei(e),t===null)throw Error(W(188));return t!==e?null:e}for(var r=e,n=t;;){var s=r.return;if(s===null)break;var i=s.alternate;if(i===null){if(n=s.return,n!==null){r=n;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===r)return $1(s),e;if(i===n)return $1(s),t;i=i.sibling}throw Error(W(188))}if(r.return!==n.return)r=s,n=i;else{for(var a=!1,o=s.child;o;){if(o===r){a=!0,r=s,n=i;break}if(o===n){a=!0,n=s,r=i;break}o=o.sibling}if(!a){for(o=i.child;o;){if(o===r){a=!0,r=i,n=s;break}if(o===n){a=!0,n=i,r=s;break}o=o.sibling}if(!a)throw Error(W(189))}}if(r.alternate!==n)throw Error(W(190))}if(r.tag!==3)throw Error(W(188));return r.stateNode.current===r?e:t}function aT(e){return e=P5(e),e!==null?oT(e):null}function oT(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=oT(e);if(t!==null)return t;e=e.sibling}return null}var lT=hr.unstable_scheduleCallback,V1=hr.unstable_cancelCallback,M5=hr.unstable_shouldYield,R5=hr.unstable_requestPaint,dt=hr.unstable_now,A5=hr.unstable_getCurrentPriorityLevel,yv=hr.unstable_ImmediatePriority,cT=hr.unstable_UserBlockingPriority,xu=hr.unstable_NormalPriority,D5=hr.unstable_LowPriority,uT=hr.unstable_IdlePriority,pd=null,ln=null;function I5(e){if(ln&&typeof ln.onCommitFiberRoot=="function")try{ln.onCommitFiberRoot(pd,e,void 0,(e.current.flags&128)===128)}catch{}}var Gr=Math.clz32?Math.clz32:z5,L5=Math.log,O5=Math.LN2;function z5(e){return e>>>=0,e===0?32:31-(L5(e)/O5|0)|0}var pc=64,mc=4194304;function No(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 vu(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,s=e.suspendedLanes,i=e.pingedLanes,a=r&268435455;if(a!==0){var o=a&~s;o!==0?n=No(o):(i&=a,i!==0&&(n=No(i)))}else a=r&~s,a!==0?n=No(a):i!==0&&(n=No(i));if(n===0)return 0;if(t!==0&&t!==n&&!(t&s)&&(s=n&-n,i=t&-t,s>=i||s===16&&(i&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)r=31-Gr(t),s=1<<r,n|=e[r],t&=~s;return n}function F5(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function $5(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes;0<i;){var a=31-Gr(i),o=1<<a,l=s[a];l===-1?(!(o&r)||o&n)&&(s[a]=F5(o,t)):l<=t&&(e.expiredLanes|=o),i&=~o}}function Ry(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function dT(){var e=pc;return pc<<=1,!(pc&4194240)&&(pc=64),e}function vf(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function $l(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Gr(t),e[t]=r}function V5(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0<r;){var s=31-Gr(r),i=1<<s;t[s]=0,n[s]=-1,e[s]=-1,r&=~i}}function xv(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-Gr(r),s=1<<n;s&t|e[n]&t&&(e[n]|=t),r&=~s}}var Re=0;function fT(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var hT,vv,pT,mT,gT,Ay=!1,gc=[],ys=null,xs=null,vs=null,sl=new Map,il=new Map,us=[],q5="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 q1(e,t){switch(e){case"focusin":case"focusout":ys=null;break;case"dragenter":case"dragleave":xs=null;break;case"mouseover":case"mouseout":vs=null;break;case"pointerover":case"pointerout":sl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":il.delete(t.pointerId)}}function no(e,t,r,n,s,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:i,targetContainers:[s]},t!==null&&(t=ql(t),t!==null&&vv(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function B5(e,t,r,n,s){switch(t){case"focusin":return ys=no(ys,e,t,r,n,s),!0;case"dragenter":return xs=no(xs,e,t,r,n,s),!0;case"mouseover":return vs=no(vs,e,t,r,n,s),!0;case"pointerover":var i=s.pointerId;return sl.set(i,no(sl.get(i)||null,e,t,r,n,s)),!0;case"gotpointercapture":return i=s.pointerId,il.set(i,no(il.get(i)||null,e,t,r,n,s)),!0}return!1}function yT(e){var t=ei(e.target);if(t!==null){var r=Ei(t);if(r!==null){if(t=r.tag,t===13){if(t=iT(r),t!==null){e.blockedOn=t,gT(e.priority,function(){pT(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Xc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=Dy(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);Cy=n,r.target.dispatchEvent(n),Cy=null}else return t=ql(r),t!==null&&vv(t),e.blockedOn=r,!1;t.shift()}return!0}function B1(e,t,r){Xc(e)&&r.delete(t)}function U5(){Ay=!1,ys!==null&&Xc(ys)&&(ys=null),xs!==null&&Xc(xs)&&(xs=null),vs!==null&&Xc(vs)&&(vs=null),sl.forEach(B1),il.forEach(B1)}function so(e,t){e.blockedOn===t&&(e.blockedOn=null,Ay||(Ay=!0,hr.unstable_scheduleCallback(hr.unstable_NormalPriority,U5)))}function al(e){function t(s){return so(s,e)}if(0<gc.length){so(gc[0],e);for(var r=1;r<gc.length;r++){var n=gc[r];n.blockedOn===e&&(n.blockedOn=null)}}for(ys!==null&&so(ys,e),xs!==null&&so(xs,e),vs!==null&&so(vs,e),sl.forEach(t),il.forEach(t),r=0;r<us.length;r++)n=us[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<us.length&&(r=us[0],r.blockedOn===null);)yT(r),r.blockedOn===null&&us.shift()}var pa=Vn.ReactCurrentBatchConfig,bu=!0;function H5(e,t,r,n){var s=Re,i=pa.transition;pa.transition=null;try{Re=1,bv(e,t,r,n)}finally{Re=s,pa.transition=i}}function W5(e,t,r,n){var s=Re,i=pa.transition;pa.transition=null;try{Re=4,bv(e,t,r,n)}finally{Re=s,pa.transition=i}}function bv(e,t,r,n){if(bu){var s=Dy(e,t,r,n);if(s===null)Tf(e,t,n,wu,r),q1(e,n);else if(B5(s,e,t,r,n))n.stopPropagation();else if(q1(e,n),t&4&&-1<q5.indexOf(e)){for(;s!==null;){var i=ql(s);if(i!==null&&hT(i),i=Dy(e,t,r,n),i===null&&Tf(e,t,n,wu,r),i===s)break;s=i}s!==null&&n.stopPropagation()}else Tf(e,t,n,null,r)}}var wu=null;function Dy(e,t,r,n){if(wu=null,e=gv(n),e=ei(e),e!==null)if(t=Ei(e),t===null)e=null;else if(r=t.tag,r===13){if(e=iT(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return wu=e,null}function xT(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(A5()){case yv:return 1;case cT:return 4;case xu:case D5:return 16;case uT:return 536870912;default:return 16}default:return 16}}var ps=null,wv=null,Zc=null;function vT(){if(Zc)return Zc;var e,t=wv,r=t.length,n,s="value"in ps?ps.value:ps.textContent,i=s.length;for(e=0;e<r&&t[e]===s[e];e++);var a=r-e;for(n=1;n<=a&&t[r-n]===s[i-n];n++);return Zc=s.slice(e,1<n?1-n:void 0)}function Qc(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function yc(){return!0}function U1(){return!1}function gr(e){function t(r,n,s,i,a){this._reactName=r,this._targetInst=s,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null;for(var o in e)e.hasOwnProperty(o)&&(r=e[o],this[o]=r?r(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?yc:U1,this.isPropagationStopped=U1,this}return rt(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=yc)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=yc)},persist:function(){},isPersistent:yc}),t}var Va={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},kv=gr(Va),Vl=rt({},Va,{view:0,detail:0}),G5=gr(Vl),bf,wf,io,md=rt({},Vl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:jv,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!==io&&(io&&e.type==="mousemove"?(bf=e.screenX-io.screenX,wf=e.screenY-io.screenY):wf=bf=0,io=e),bf)},movementY:function(e){return"movementY"in e?e.movementY:wf}}),H1=gr(md),K5=rt({},md,{dataTransfer:0}),Y5=gr(K5),X5=rt({},Vl,{relatedTarget:0}),kf=gr(X5),Z5=rt({},Va,{animationName:0,elapsedTime:0,pseudoElement:0}),Q5=gr(Z5),J5=rt({},Va,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),eD=gr(J5),tD=rt({},Va,{data:0}),W1=gr(tD),rD={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},nD={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"},sD={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function iD(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=sD[e])?!!t[e]:!1}function jv(){return iD}var aD=rt({},Vl,{key:function(e){if(e.key){var t=rD[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Qc(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?nD[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:jv,charCode:function(e){return e.type==="keypress"?Qc(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Qc(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),oD=gr(aD),lD=rt({},md,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),G1=gr(lD),cD=rt({},Vl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:jv}),uD=gr(cD),dD=rt({},Va,{propertyName:0,elapsedTime:0,pseudoElement:0}),fD=gr(dD),hD=rt({},md,{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}),pD=gr(hD),mD=[9,13,27,32],_v=Mn&&"CompositionEvent"in window,Vo=null;Mn&&"documentMode"in document&&(Vo=document.documentMode);var gD=Mn&&"TextEvent"in window&&!Vo,bT=Mn&&(!_v||Vo&&8<Vo&&11>=Vo),K1=" ",Y1=!1;function wT(e,t){switch(e){case"keyup":return mD.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function kT(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Yi=!1;function yD(e,t){switch(e){case"compositionend":return kT(t);case"keypress":return t.which!==32?null:(Y1=!0,K1);case"textInput":return e=t.data,e===K1&&Y1?null:e;default:return null}}function xD(e,t){if(Yi)return e==="compositionend"||!_v&&wT(e,t)?(e=vT(),Zc=wv=ps=null,Yi=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return bT&&t.locale!=="ko"?null:t.data;default:return null}}var vD={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 X1(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!vD[e.type]:t==="textarea"}function jT(e,t,r,n){eT(n),t=ku(t,"onChange"),0<t.length&&(r=new kv("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var qo=null,ol=null;function bD(e){DT(e,0)}function gd(e){var t=Qi(e);if(GC(t))return e}function wD(e,t){if(e==="change")return t}var _T=!1;if(Mn){var jf;if(Mn){var _f="oninput"in document;if(!_f){var Z1=document.createElement("div");Z1.setAttribute("oninput","return;"),_f=typeof Z1.oninput=="function"}jf=_f}else jf=!1;_T=jf&&(!document.documentMode||9<document.documentMode)}function Q1(){qo&&(qo.detachEvent("onpropertychange",ST),ol=qo=null)}function ST(e){if(e.propertyName==="value"&&gd(ol)){var t=[];jT(t,ol,e,gv(e)),sT(bD,t)}}function kD(e,t,r){e==="focusin"?(Q1(),qo=t,ol=r,qo.attachEvent("onpropertychange",ST)):e==="focusout"&&Q1()}function jD(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return gd(ol)}function _D(e,t){if(e==="click")return gd(t)}function SD(e,t){if(e==="input"||e==="change")return gd(t)}function ND(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Zr=typeof Object.is=="function"?Object.is:ND;function ll(e,t){if(Zr(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var s=r[n];if(!gy.call(t,s)||!Zr(e[s],t[s]))return!1}return!0}function J1(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ew(e,t){var r=J1(e);e=0;for(var n;r;){if(r.nodeType===3){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=J1(r)}}function NT(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?NT(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ET(){for(var e=window,t=mu();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=mu(e.document)}return t}function Sv(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function ED(e){var t=ET(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&NT(r.ownerDocument.documentElement,r)){if(n!==null&&Sv(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=r.textContent.length,i=Math.min(n.start,s);n=n.end===void 0?i:Math.min(n.end,s),!e.extend&&i>n&&(s=n,n=i,i=s),s=ew(r,i);var a=ew(r,n);s&&a&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),i>n?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var CD=Mn&&"documentMode"in document&&11>=document.documentMode,Xi=null,Iy=null,Bo=null,Ly=!1;function tw(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Ly||Xi==null||Xi!==mu(n)||(n=Xi,"selectionStart"in n&&Sv(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Bo&&ll(Bo,n)||(Bo=n,n=ku(Iy,"onSelect"),0<n.length&&(t=new kv("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=Xi)))}function xc(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Zi={animationend:xc("Animation","AnimationEnd"),animationiteration:xc("Animation","AnimationIteration"),animationstart:xc("Animation","AnimationStart"),transitionend:xc("Transition","TransitionEnd")},Sf={},CT={};Mn&&(CT=document.createElement("div").style,"AnimationEvent"in window||(delete Zi.animationend.animation,delete Zi.animationiteration.animation,delete Zi.animationstart.animation),"TransitionEvent"in window||delete Zi.transitionend.transition);function yd(e){if(Sf[e])return Sf[e];if(!Zi[e])return e;var t=Zi[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in CT)return Sf[e]=t[r];return e}var TT=yd("animationend"),PT=yd("animationiteration"),MT=yd("animationstart"),RT=yd("transitionend"),AT=new Map,rw="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 Ls(e,t){AT.set(e,t),Ni(t,[e])}for(var Nf=0;Nf<rw.length;Nf++){var Ef=rw[Nf],TD=Ef.toLowerCase(),PD=Ef[0].toUpperCase()+Ef.slice(1);Ls(TD,"on"+PD)}Ls(TT,"onAnimationEnd");Ls(PT,"onAnimationIteration");Ls(MT,"onAnimationStart");Ls("dblclick","onDoubleClick");Ls("focusin","onFocus");Ls("focusout","onBlur");Ls(RT,"onTransitionEnd");_a("onMouseEnter",["mouseout","mouseover"]);_a("onMouseLeave",["mouseout","mouseover"]);_a("onPointerEnter",["pointerout","pointerover"]);_a("onPointerLeave",["pointerout","pointerover"]);Ni("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Ni("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Ni("onBeforeInput",["compositionend","keypress","textInput","paste"]);Ni("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Ni("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Ni("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Eo="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(" "),MD=new Set("cancel close invalid load scroll toggle".split(" ").concat(Eo));function nw(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,T5(n,t,void 0,e),e.currentTarget=null}function DT(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],s=n.event;n=n.listeners;e:{var i=void 0;if(t)for(var a=n.length-1;0<=a;a--){var o=n[a],l=o.instance,d=o.currentTarget;if(o=o.listener,l!==i&&s.isPropagationStopped())break e;nw(s,o,d),i=l}else for(a=0;a<n.length;a++){if(o=n[a],l=o.instance,d=o.currentTarget,o=o.listener,l!==i&&s.isPropagationStopped())break e;nw(s,o,d),i=l}}}if(yu)throw e=My,yu=!1,My=null,e}function Ve(e,t){var r=t[Vy];r===void 0&&(r=t[Vy]=new Set);var n=e+"__bubble";r.has(n)||(IT(t,e,2,!1),r.add(n))}function Cf(e,t,r){var n=0;t&&(n|=4),IT(r,e,n,t)}var vc="_reactListening"+Math.random().toString(36).slice(2);function cl(e){if(!e[vc]){e[vc]=!0,qC.forEach(function(r){r!=="selectionchange"&&(MD.has(r)||Cf(r,!1,e),Cf(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[vc]||(t[vc]=!0,Cf("selectionchange",!1,t))}}function IT(e,t,r,n){switch(xT(t)){case 1:var s=H5;break;case 4:s=W5;break;default:s=bv}r=s.bind(null,t,r,e),s=void 0,!Py||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),n?s!==void 0?e.addEventListener(t,r,{capture:!0,passive:s}):e.addEventListener(t,r,!0):s!==void 0?e.addEventListener(t,r,{passive:s}):e.addEventListener(t,r,!1)}function Tf(e,t,r,n,s){var i=n;if(!(t&1)&&!(t&2)&&n!==null)e:for(;;){if(n===null)return;var a=n.tag;if(a===3||a===4){var o=n.stateNode.containerInfo;if(o===s||o.nodeType===8&&o.parentNode===s)break;if(a===4)for(a=n.return;a!==null;){var l=a.tag;if((l===3||l===4)&&(l=a.stateNode.containerInfo,l===s||l.nodeType===8&&l.parentNode===s))return;a=a.return}for(;o!==null;){if(a=ei(o),a===null)return;if(l=a.tag,l===5||l===6){n=i=a;continue e}o=o.parentNode}}n=n.return}sT(function(){var d=i,u=gv(r),f=[];e:{var h=AT.get(e);if(h!==void 0){var p=kv,m=e;switch(e){case"keypress":if(Qc(r)===0)break e;case"keydown":case"keyup":p=oD;break;case"focusin":m="focus",p=kf;break;case"focusout":m="blur",p=kf;break;case"beforeblur":case"afterblur":p=kf;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":p=H1;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=Y5;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=uD;break;case TT:case PT:case MT:p=Q5;break;case RT:p=fD;break;case"scroll":p=G5;break;case"wheel":p=pD;break;case"copy":case"cut":case"paste":p=eD;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=G1}var g=(t&4)!==0,b=!g&&e==="scroll",x=g?h!==null?h+"Capture":null:h;g=[];for(var y=d,v;y!==null;){v=y;var w=v.stateNode;if(v.tag===5&&w!==null&&(v=w,x!==null&&(w=nl(y,x),w!=null&&g.push(ul(y,w,v)))),b)break;y=y.return}0<g.length&&(h=new p(h,m,null,r,u),f.push({event:h,listeners:g}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",h&&r!==Cy&&(m=r.relatedTarget||r.fromElement)&&(ei(m)||m[Rn]))break e;if((p||h)&&(h=u.window===u?u:(h=u.ownerDocument)?h.defaultView||h.parentWindow:window,p?(m=r.relatedTarget||r.toElement,p=d,m=m?ei(m):null,m!==null&&(b=Ei(m),m!==b||m.tag!==5&&m.tag!==6)&&(m=null)):(p=null,m=d),p!==m)){if(g=H1,w="onMouseLeave",x="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(g=G1,w="onPointerLeave",x="onPointerEnter",y="pointer"),b=p==null?h:Qi(p),v=m==null?h:Qi(m),h=new g(w,y+"leave",p,r,u),h.target=b,h.relatedTarget=v,w=null,ei(u)===d&&(g=new g(x,y+"enter",m,r,u),g.target=v,g.relatedTarget=b,w=g),b=w,p&&m)t:{for(g=p,x=m,y=0,v=g;v;v=Fi(v))y++;for(v=0,w=x;w;w=Fi(w))v++;for(;0<y-v;)g=Fi(g),y--;for(;0<v-y;)x=Fi(x),v--;for(;y--;){if(g===x||x!==null&&g===x.alternate)break t;g=Fi(g),x=Fi(x)}g=null}else g=null;p!==null&&sw(f,h,p,g,!1),m!==null&&b!==null&&sw(f,b,m,g,!0)}}e:{if(h=d?Qi(d):window,p=h.nodeName&&h.nodeName.toLowerCase(),p==="select"||p==="input"&&h.type==="file")var _=wD;else if(X1(h))if(_T)_=SD;else{_=jD;var N=kD}else(p=h.nodeName)&&p.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(_=_D);if(_&&(_=_(e,d))){jT(f,_,r,u);break e}N&&N(e,h,d),e==="focusout"&&(N=h._wrapperState)&&N.controlled&&h.type==="number"&&jy(h,"number",h.value)}switch(N=d?Qi(d):window,e){case"focusin":(X1(N)||N.contentEditable==="true")&&(Xi=N,Iy=d,Bo=null);break;case"focusout":Bo=Iy=Xi=null;break;case"mousedown":Ly=!0;break;case"contextmenu":case"mouseup":case"dragend":Ly=!1,tw(f,r,u);break;case"selectionchange":if(CD)break;case"keydown":case"keyup":tw(f,r,u)}var j;if(_v)e:{switch(e){case"compositionstart":var E="onCompositionStart";break e;case"compositionend":E="onCompositionEnd";break e;case"compositionupdate":E="onCompositionUpdate";break e}E=void 0}else Yi?wT(e,r)&&(E="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(E="onCompositionStart");E&&(bT&&r.locale!=="ko"&&(Yi||E!=="onCompositionStart"?E==="onCompositionEnd"&&Yi&&(j=vT()):(ps=u,wv="value"in ps?ps.value:ps.textContent,Yi=!0)),N=ku(d,E),0<N.length&&(E=new W1(E,e,null,r,u),f.push({event:E,listeners:N}),j?E.data=j:(j=kT(r),j!==null&&(E.data=j)))),(j=gD?yD(e,r):xD(e,r))&&(d=ku(d,"onBeforeInput"),0<d.length&&(u=new W1("onBeforeInput","beforeinput",null,r,u),f.push({event:u,listeners:d}),u.data=j))}DT(f,t)})}function ul(e,t,r){return{instance:e,listener:t,currentTarget:r}}function ku(e,t){for(var r=t+"Capture",n=[];e!==null;){var s=e,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=nl(e,r),i!=null&&n.unshift(ul(e,i,s)),i=nl(e,t),i!=null&&n.push(ul(e,i,s))),e=e.return}return n}function Fi(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function sw(e,t,r,n,s){for(var i=t._reactName,a=[];r!==null&&r!==n;){var o=r,l=o.alternate,d=o.stateNode;if(l!==null&&l===n)break;o.tag===5&&d!==null&&(o=d,s?(l=nl(r,i),l!=null&&a.unshift(ul(r,l,o))):s||(l=nl(r,i),l!=null&&a.push(ul(r,l,o)))),r=r.return}a.length!==0&&e.push({event:t,listeners:a})}var RD=/\r\n?/g,AD=/\u0000|\uFFFD/g;function iw(e){return(typeof e=="string"?e:""+e).replace(RD,`
|
|
38
|
-
`).replace(AD,"")}function bc(e,t,r){if(t=iw(t),iw(e)!==t&&r)throw Error(W(425))}function ju(){}var Oy=null,zy=null;function Fy(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var $y=typeof setTimeout=="function"?setTimeout:void 0,DD=typeof clearTimeout=="function"?clearTimeout:void 0,aw=typeof Promise=="function"?Promise:void 0,ID=typeof queueMicrotask=="function"?queueMicrotask:typeof aw<"u"?function(e){return aw.resolve(null).then(e).catch(LD)}:$y;function LD(e){setTimeout(function(){throw e})}function Pf(e,t){var r=t,n=0;do{var s=r.nextSibling;if(e.removeChild(r),s&&s.nodeType===8)if(r=s.data,r==="/$"){if(n===0){e.removeChild(s),al(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=s}while(r);al(t)}function bs(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function ow(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var qa=Math.random().toString(36).slice(2),an="__reactFiber$"+qa,dl="__reactProps$"+qa,Rn="__reactContainer$"+qa,Vy="__reactEvents$"+qa,OD="__reactListeners$"+qa,zD="__reactHandles$"+qa;function ei(e){var t=e[an];if(t)return t;for(var r=e.parentNode;r;){if(t=r[Rn]||r[an]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=ow(e);e!==null;){if(r=e[an])return r;e=ow(e)}return t}e=r,r=e.parentNode}return null}function ql(e){return e=e[an]||e[Rn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Qi(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(W(33))}function xd(e){return e[dl]||null}var qy=[],Ji=-1;function Os(e){return{current:e}}function qe(e){0>Ji||(e.current=qy[Ji],qy[Ji]=null,Ji--)}function Ie(e,t){Ji++,qy[Ji]=e.current,e.current=t}var Ts={},Ut=Os(Ts),rr=Os(!1),mi=Ts;function Sa(e,t){var r=e.type.contextTypes;if(!r)return Ts;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in r)s[i]=t[i];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function nr(e){return e=e.childContextTypes,e!=null}function _u(){qe(rr),qe(Ut)}function lw(e,t,r){if(Ut.current!==Ts)throw Error(W(168));Ie(Ut,t),Ie(rr,r)}function LT(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var s in n)if(!(s in t))throw Error(W(108,k5(e)||"Unknown",s));return rt({},r,n)}function Su(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ts,mi=Ut.current,Ie(Ut,e),Ie(rr,rr.current),!0}function cw(e,t,r){var n=e.stateNode;if(!n)throw Error(W(169));r?(e=LT(e,t,mi),n.__reactInternalMemoizedMergedChildContext=e,qe(rr),qe(Ut),Ie(Ut,e)):qe(rr),Ie(rr,r)}var kn=null,vd=!1,Mf=!1;function OT(e){kn===null?kn=[e]:kn.push(e)}function FD(e){vd=!0,OT(e)}function zs(){if(!Mf&&kn!==null){Mf=!0;var e=0,t=Re;try{var r=kn;for(Re=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}kn=null,vd=!1}catch(s){throw kn!==null&&(kn=kn.slice(e+1)),lT(yv,zs),s}finally{Re=t,Mf=!1}}return null}var ea=[],ta=0,Nu=null,Eu=0,_r=[],Sr=0,gi=null,jn=1,_n="";function Gs(e,t){ea[ta++]=Eu,ea[ta++]=Nu,Nu=e,Eu=t}function zT(e,t,r){_r[Sr++]=jn,_r[Sr++]=_n,_r[Sr++]=gi,gi=e;var n=jn;e=_n;var s=32-Gr(n)-1;n&=~(1<<s),r+=1;var i=32-Gr(t)+s;if(30<i){var a=s-s%5;i=(n&(1<<a)-1).toString(32),n>>=a,s-=a,jn=1<<32-Gr(t)+s|r<<s|n,_n=i+e}else jn=1<<i|r<<s|n,_n=e}function Nv(e){e.return!==null&&(Gs(e,1),zT(e,1,0))}function Ev(e){for(;e===Nu;)Nu=ea[--ta],ea[ta]=null,Eu=ea[--ta],ea[ta]=null;for(;e===gi;)gi=_r[--Sr],_r[Sr]=null,_n=_r[--Sr],_r[Sr]=null,jn=_r[--Sr],_r[Sr]=null}var fr=null,dr=null,Ge=!1,Hr=null;function FT(e,t){var r=Er(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function uw(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,fr=e,dr=bs(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,fr=e,dr=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=gi!==null?{id:jn,overflow:_n}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=Er(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,fr=e,dr=null,!0):!1;default:return!1}}function By(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Uy(e){if(Ge){var t=dr;if(t){var r=t;if(!uw(e,t)){if(By(e))throw Error(W(418));t=bs(r.nextSibling);var n=fr;t&&uw(e,t)?FT(n,r):(e.flags=e.flags&-4097|2,Ge=!1,fr=e)}}else{if(By(e))throw Error(W(418));e.flags=e.flags&-4097|2,Ge=!1,fr=e}}}function dw(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;fr=e}function wc(e){if(e!==fr)return!1;if(!Ge)return dw(e),Ge=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Fy(e.type,e.memoizedProps)),t&&(t=dr)){if(By(e))throw $T(),Error(W(418));for(;t;)FT(e,t),t=bs(t.nextSibling)}if(dw(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(W(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){dr=bs(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}dr=null}}else dr=fr?bs(e.stateNode.nextSibling):null;return!0}function $T(){for(var e=dr;e;)e=bs(e.nextSibling)}function Na(){dr=fr=null,Ge=!1}function Cv(e){Hr===null?Hr=[e]:Hr.push(e)}var $D=Vn.ReactCurrentBatchConfig;function ao(e,t,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(W(309));var n=r.stateNode}if(!n)throw Error(W(147,e));var s=n,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(a){var o=s.refs;a===null?delete o[i]:o[i]=a},t._stringRef=i,t)}if(typeof e!="string")throw Error(W(284));if(!r._owner)throw Error(W(290,e))}return e}function kc(e,t){throw e=Object.prototype.toString.call(t),Error(W(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function fw(e){var t=e._init;return t(e._payload)}function VT(e){function t(x,y){if(e){var v=x.deletions;v===null?(x.deletions=[y],x.flags|=16):v.push(y)}}function r(x,y){if(!e)return null;for(;y!==null;)t(x,y),y=y.sibling;return null}function n(x,y){for(x=new Map;y!==null;)y.key!==null?x.set(y.key,y):x.set(y.index,y),y=y.sibling;return x}function s(x,y){return x=_s(x,y),x.index=0,x.sibling=null,x}function i(x,y,v){return x.index=v,e?(v=x.alternate,v!==null?(v=v.index,v<y?(x.flags|=2,y):v):(x.flags|=2,y)):(x.flags|=1048576,y)}function a(x){return e&&x.alternate===null&&(x.flags|=2),x}function o(x,y,v,w){return y===null||y.tag!==6?(y=zf(v,x.mode,w),y.return=x,y):(y=s(y,v),y.return=x,y)}function l(x,y,v,w){var _=v.type;return _===Ki?u(x,y,v.props.children,w,v.key):y!==null&&(y.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===as&&fw(_)===y.type)?(w=s(y,v.props),w.ref=ao(x,y,v),w.return=x,w):(w=iu(v.type,v.key,v.props,null,x.mode,w),w.ref=ao(x,y,v),w.return=x,w)}function d(x,y,v,w){return y===null||y.tag!==4||y.stateNode.containerInfo!==v.containerInfo||y.stateNode.implementation!==v.implementation?(y=Ff(v,x.mode,w),y.return=x,y):(y=s(y,v.children||[]),y.return=x,y)}function u(x,y,v,w,_){return y===null||y.tag!==7?(y=ui(v,x.mode,w,_),y.return=x,y):(y=s(y,v),y.return=x,y)}function f(x,y,v){if(typeof y=="string"&&y!==""||typeof y=="number")return y=zf(""+y,x.mode,v),y.return=x,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case dc:return v=iu(y.type,y.key,y.props,null,x.mode,v),v.ref=ao(x,null,y),v.return=x,v;case Gi:return y=Ff(y,x.mode,v),y.return=x,y;case as:var w=y._init;return f(x,w(y._payload),v)}if(So(y)||to(y))return y=ui(y,x.mode,v,null),y.return=x,y;kc(x,y)}return null}function h(x,y,v,w){var _=y!==null?y.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return _!==null?null:o(x,y,""+v,w);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case dc:return v.key===_?l(x,y,v,w):null;case Gi:return v.key===_?d(x,y,v,w):null;case as:return _=v._init,h(x,y,_(v._payload),w)}if(So(v)||to(v))return _!==null?null:u(x,y,v,w,null);kc(x,v)}return null}function p(x,y,v,w,_){if(typeof w=="string"&&w!==""||typeof w=="number")return x=x.get(v)||null,o(y,x,""+w,_);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case dc:return x=x.get(w.key===null?v:w.key)||null,l(y,x,w,_);case Gi:return x=x.get(w.key===null?v:w.key)||null,d(y,x,w,_);case as:var N=w._init;return p(x,y,v,N(w._payload),_)}if(So(w)||to(w))return x=x.get(v)||null,u(y,x,w,_,null);kc(y,w)}return null}function m(x,y,v,w){for(var _=null,N=null,j=y,E=y=0,M=null;j!==null&&E<v.length;E++){j.index>E?(M=j,j=null):M=j.sibling;var C=h(x,j,v[E],w);if(C===null){j===null&&(j=M);break}e&&j&&C.alternate===null&&t(x,j),y=i(C,y,E),N===null?_=C:N.sibling=C,N=C,j=M}if(E===v.length)return r(x,j),Ge&&Gs(x,E),_;if(j===null){for(;E<v.length;E++)j=f(x,v[E],w),j!==null&&(y=i(j,y,E),N===null?_=j:N.sibling=j,N=j);return Ge&&Gs(x,E),_}for(j=n(x,j);E<v.length;E++)M=p(j,x,E,v[E],w),M!==null&&(e&&M.alternate!==null&&j.delete(M.key===null?E:M.key),y=i(M,y,E),N===null?_=M:N.sibling=M,N=M);return e&&j.forEach(function(D){return t(x,D)}),Ge&&Gs(x,E),_}function g(x,y,v,w){var _=to(v);if(typeof _!="function")throw Error(W(150));if(v=_.call(v),v==null)throw Error(W(151));for(var N=_=null,j=y,E=y=0,M=null,C=v.next();j!==null&&!C.done;E++,C=v.next()){j.index>E?(M=j,j=null):M=j.sibling;var D=h(x,j,C.value,w);if(D===null){j===null&&(j=M);break}e&&j&&D.alternate===null&&t(x,j),y=i(D,y,E),N===null?_=D:N.sibling=D,N=D,j=M}if(C.done)return r(x,j),Ge&&Gs(x,E),_;if(j===null){for(;!C.done;E++,C=v.next())C=f(x,C.value,w),C!==null&&(y=i(C,y,E),N===null?_=C:N.sibling=C,N=C);return Ge&&Gs(x,E),_}for(j=n(x,j);!C.done;E++,C=v.next())C=p(j,x,E,C.value,w),C!==null&&(e&&C.alternate!==null&&j.delete(C.key===null?E:C.key),y=i(C,y,E),N===null?_=C:N.sibling=C,N=C);return e&&j.forEach(function(F){return t(x,F)}),Ge&&Gs(x,E),_}function b(x,y,v,w){if(typeof v=="object"&&v!==null&&v.type===Ki&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case dc:e:{for(var _=v.key,N=y;N!==null;){if(N.key===_){if(_=v.type,_===Ki){if(N.tag===7){r(x,N.sibling),y=s(N,v.props.children),y.return=x,x=y;break e}}else if(N.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===as&&fw(_)===N.type){r(x,N.sibling),y=s(N,v.props),y.ref=ao(x,N,v),y.return=x,x=y;break e}r(x,N);break}else t(x,N);N=N.sibling}v.type===Ki?(y=ui(v.props.children,x.mode,w,v.key),y.return=x,x=y):(w=iu(v.type,v.key,v.props,null,x.mode,w),w.ref=ao(x,y,v),w.return=x,x=w)}return a(x);case Gi:e:{for(N=v.key;y!==null;){if(y.key===N)if(y.tag===4&&y.stateNode.containerInfo===v.containerInfo&&y.stateNode.implementation===v.implementation){r(x,y.sibling),y=s(y,v.children||[]),y.return=x,x=y;break e}else{r(x,y);break}else t(x,y);y=y.sibling}y=Ff(v,x.mode,w),y.return=x,x=y}return a(x);case as:return N=v._init,b(x,y,N(v._payload),w)}if(So(v))return m(x,y,v,w);if(to(v))return g(x,y,v,w);kc(x,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,y!==null&&y.tag===6?(r(x,y.sibling),y=s(y,v),y.return=x,x=y):(r(x,y),y=zf(v,x.mode,w),y.return=x,x=y),a(x)):r(x,y)}return b}var Ea=VT(!0),qT=VT(!1),Cu=Os(null),Tu=null,ra=null,Tv=null;function Pv(){Tv=ra=Tu=null}function Mv(e){var t=Cu.current;qe(Cu),e._currentValue=t}function Hy(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function ma(e,t){Tu=e,Tv=ra=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Jt=!0),e.firstContext=null)}function Rr(e){var t=e._currentValue;if(Tv!==e)if(e={context:e,memoizedValue:t,next:null},ra===null){if(Tu===null)throw Error(W(308));ra=e,Tu.dependencies={lanes:0,firstContext:e}}else ra=ra.next=e;return t}var ti=null;function Rv(e){ti===null?ti=[e]:ti.push(e)}function BT(e,t,r,n){var s=t.interleaved;return s===null?(r.next=r,Rv(t)):(r.next=s.next,s.next=r),t.interleaved=r,An(e,n)}function An(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var os=!1;function Av(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function UT(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Cn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ws(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,Ee&2){var s=n.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),n.pending=t,An(e,r)}return s=n.interleaved,s===null?(t.next=t,Rv(n)):(t.next=s.next,s.next=t),n.interleaved=t,An(e,r)}function Jc(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,xv(e,r)}}function hw(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var s=null,i=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};i===null?s=i=a:i=i.next=a,r=r.next}while(r!==null);i===null?s=i=t:i=i.next=t}else s=i=t;r={baseState:n.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function Pu(e,t,r,n){var s=e.updateQueue;os=!1;var i=s.firstBaseUpdate,a=s.lastBaseUpdate,o=s.shared.pending;if(o!==null){s.shared.pending=null;var l=o,d=l.next;l.next=null,a===null?i=d:a.next=d,a=l;var u=e.alternate;u!==null&&(u=u.updateQueue,o=u.lastBaseUpdate,o!==a&&(o===null?u.firstBaseUpdate=d:o.next=d,u.lastBaseUpdate=l))}if(i!==null){var f=s.baseState;a=0,u=d=l=null,o=i;do{var h=o.lane,p=o.eventTime;if((n&h)===h){u!==null&&(u=u.next={eventTime:p,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var m=e,g=o;switch(h=t,p=r,g.tag){case 1:if(m=g.payload,typeof m=="function"){f=m.call(p,f,h);break e}f=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,h=typeof m=="function"?m.call(p,f,h):m,h==null)break e;f=rt({},f,h);break e;case 2:os=!0}}o.callback!==null&&o.lane!==0&&(e.flags|=64,h=s.effects,h===null?s.effects=[o]:h.push(o))}else p={eventTime:p,lane:h,tag:o.tag,payload:o.payload,callback:o.callback,next:null},u===null?(d=u=p,l=f):u=u.next=p,a|=h;if(o=o.next,o===null){if(o=s.shared.pending,o===null)break;h=o,o=h.next,h.next=null,s.lastBaseUpdate=h,s.shared.pending=null}}while(!0);if(u===null&&(l=f),s.baseState=l,s.firstBaseUpdate=d,s.lastBaseUpdate=u,t=s.shared.interleaved,t!==null){s=t;do a|=s.lane,s=s.next;while(s!==t)}else i===null&&(s.shared.lanes=0);xi|=a,e.lanes=a,e.memoizedState=f}}function pw(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],s=n.callback;if(s!==null){if(n.callback=null,n=r,typeof s!="function")throw Error(W(191,s));s.call(n)}}}var Bl={},cn=Os(Bl),fl=Os(Bl),hl=Os(Bl);function ri(e){if(e===Bl)throw Error(W(174));return e}function Dv(e,t){switch(Ie(hl,t),Ie(fl,e),Ie(cn,Bl),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Sy(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Sy(t,e)}qe(cn),Ie(cn,t)}function Ca(){qe(cn),qe(fl),qe(hl)}function HT(e){ri(hl.current);var t=ri(cn.current),r=Sy(t,e.type);t!==r&&(Ie(fl,e),Ie(cn,r))}function Iv(e){fl.current===e&&(qe(cn),qe(fl))}var Je=Os(0);function Mu(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Rf=[];function Lv(){for(var e=0;e<Rf.length;e++)Rf[e]._workInProgressVersionPrimary=null;Rf.length=0}var eu=Vn.ReactCurrentDispatcher,Af=Vn.ReactCurrentBatchConfig,yi=0,tt=null,bt=null,_t=null,Ru=!1,Uo=!1,pl=0,VD=0;function Ft(){throw Error(W(321))}function Ov(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Zr(e[r],t[r]))return!1;return!0}function zv(e,t,r,n,s,i){if(yi=i,tt=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,eu.current=e===null||e.memoizedState===null?HD:WD,e=r(n,s),Uo){i=0;do{if(Uo=!1,pl=0,25<=i)throw Error(W(301));i+=1,_t=bt=null,t.updateQueue=null,eu.current=GD,e=r(n,s)}while(Uo)}if(eu.current=Au,t=bt!==null&&bt.next!==null,yi=0,_t=bt=tt=null,Ru=!1,t)throw Error(W(300));return e}function Fv(){var e=pl!==0;return pl=0,e}function sn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return _t===null?tt.memoizedState=_t=e:_t=_t.next=e,_t}function Ar(){if(bt===null){var e=tt.alternate;e=e!==null?e.memoizedState:null}else e=bt.next;var t=_t===null?tt.memoizedState:_t.next;if(t!==null)_t=t,bt=e;else{if(e===null)throw Error(W(310));bt=e,e={memoizedState:bt.memoizedState,baseState:bt.baseState,baseQueue:bt.baseQueue,queue:bt.queue,next:null},_t===null?tt.memoizedState=_t=e:_t=_t.next=e}return _t}function ml(e,t){return typeof t=="function"?t(e):t}function Df(e){var t=Ar(),r=t.queue;if(r===null)throw Error(W(311));r.lastRenderedReducer=e;var n=bt,s=n.baseQueue,i=r.pending;if(i!==null){if(s!==null){var a=s.next;s.next=i.next,i.next=a}n.baseQueue=s=i,r.pending=null}if(s!==null){i=s.next,n=n.baseState;var o=a=null,l=null,d=i;do{var u=d.lane;if((yi&u)===u)l!==null&&(l=l.next={lane:0,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null}),n=d.hasEagerState?d.eagerState:e(n,d.action);else{var f={lane:u,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null};l===null?(o=l=f,a=n):l=l.next=f,tt.lanes|=u,xi|=u}d=d.next}while(d!==null&&d!==i);l===null?a=n:l.next=o,Zr(n,t.memoizedState)||(Jt=!0),t.memoizedState=n,t.baseState=a,t.baseQueue=l,r.lastRenderedState=n}if(e=r.interleaved,e!==null){s=e;do i=s.lane,tt.lanes|=i,xi|=i,s=s.next;while(s!==e)}else s===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function If(e){var t=Ar(),r=t.queue;if(r===null)throw Error(W(311));r.lastRenderedReducer=e;var n=r.dispatch,s=r.pending,i=t.memoizedState;if(s!==null){r.pending=null;var a=s=s.next;do i=e(i,a.action),a=a.next;while(a!==s);Zr(i,t.memoizedState)||(Jt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),r.lastRenderedState=i}return[i,n]}function WT(){}function GT(e,t){var r=tt,n=Ar(),s=t(),i=!Zr(n.memoizedState,s);if(i&&(n.memoizedState=s,Jt=!0),n=n.queue,$v(XT.bind(null,r,n,e),[e]),n.getSnapshot!==t||i||_t!==null&&_t.memoizedState.tag&1){if(r.flags|=2048,gl(9,YT.bind(null,r,n,s,t),void 0,null),St===null)throw Error(W(349));yi&30||KT(r,t,s)}return s}function KT(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=tt.updateQueue,t===null?(t={lastEffect:null,stores:null},tt.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function YT(e,t,r,n){t.value=r,t.getSnapshot=n,ZT(t)&&QT(e)}function XT(e,t,r){return r(function(){ZT(t)&&QT(e)})}function ZT(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Zr(e,r)}catch{return!0}}function QT(e){var t=An(e,1);t!==null&&Kr(t,e,1,-1)}function mw(e){var t=sn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ml,lastRenderedState:e},t.queue=e,e=e.dispatch=UD.bind(null,tt,e),[t.memoizedState,e]}function gl(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=tt.updateQueue,t===null?(t={lastEffect:null,stores:null},tt.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e)),e}function JT(){return Ar().memoizedState}function tu(e,t,r,n){var s=sn();tt.flags|=e,s.memoizedState=gl(1|t,r,void 0,n===void 0?null:n)}function bd(e,t,r,n){var s=Ar();n=n===void 0?null:n;var i=void 0;if(bt!==null){var a=bt.memoizedState;if(i=a.destroy,n!==null&&Ov(n,a.deps)){s.memoizedState=gl(t,r,i,n);return}}tt.flags|=e,s.memoizedState=gl(1|t,r,i,n)}function gw(e,t){return tu(8390656,8,e,t)}function $v(e,t){return bd(2048,8,e,t)}function eP(e,t){return bd(4,2,e,t)}function tP(e,t){return bd(4,4,e,t)}function rP(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function nP(e,t,r){return r=r!=null?r.concat([e]):null,bd(4,4,rP.bind(null,t,e),r)}function Vv(){}function sP(e,t){var r=Ar();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Ov(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function iP(e,t){var r=Ar();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Ov(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function aP(e,t,r){return yi&21?(Zr(r,t)||(r=dT(),tt.lanes|=r,xi|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Jt=!0),e.memoizedState=r)}function qD(e,t){var r=Re;Re=r!==0&&4>r?r:4,e(!0);var n=Af.transition;Af.transition={};try{e(!1),t()}finally{Re=r,Af.transition=n}}function oP(){return Ar().memoizedState}function BD(e,t,r){var n=js(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},lP(e))cP(t,r);else if(r=BT(e,t,r,n),r!==null){var s=Gt();Kr(r,e,n,s),uP(r,t,n)}}function UD(e,t,r){var n=js(e),s={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(lP(e))cP(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var a=t.lastRenderedState,o=i(a,r);if(s.hasEagerState=!0,s.eagerState=o,Zr(o,a)){var l=t.interleaved;l===null?(s.next=s,Rv(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}r=BT(e,t,s,n),r!==null&&(s=Gt(),Kr(r,e,n,s),uP(r,t,n))}}function lP(e){var t=e.alternate;return e===tt||t!==null&&t===tt}function cP(e,t){Uo=Ru=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function uP(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,xv(e,r)}}var Au={readContext:Rr,useCallback:Ft,useContext:Ft,useEffect:Ft,useImperativeHandle:Ft,useInsertionEffect:Ft,useLayoutEffect:Ft,useMemo:Ft,useReducer:Ft,useRef:Ft,useState:Ft,useDebugValue:Ft,useDeferredValue:Ft,useTransition:Ft,useMutableSource:Ft,useSyncExternalStore:Ft,useId:Ft,unstable_isNewReconciler:!1},HD={readContext:Rr,useCallback:function(e,t){return sn().memoizedState=[e,t===void 0?null:t],e},useContext:Rr,useEffect:gw,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,tu(4194308,4,rP.bind(null,t,e),r)},useLayoutEffect:function(e,t){return tu(4194308,4,e,t)},useInsertionEffect:function(e,t){return tu(4,2,e,t)},useMemo:function(e,t){var r=sn();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=sn();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=BD.bind(null,tt,e),[n.memoizedState,e]},useRef:function(e){var t=sn();return e={current:e},t.memoizedState=e},useState:mw,useDebugValue:Vv,useDeferredValue:function(e){return sn().memoizedState=e},useTransition:function(){var e=mw(!1),t=e[0];return e=qD.bind(null,e[1]),sn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=tt,s=sn();if(Ge){if(r===void 0)throw Error(W(407));r=r()}else{if(r=t(),St===null)throw Error(W(349));yi&30||KT(n,t,r)}s.memoizedState=r;var i={value:r,getSnapshot:t};return s.queue=i,gw(XT.bind(null,n,i,e),[e]),n.flags|=2048,gl(9,YT.bind(null,n,i,r,t),void 0,null),r},useId:function(){var e=sn(),t=St.identifierPrefix;if(Ge){var r=_n,n=jn;r=(n&~(1<<32-Gr(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=pl++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=VD++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},WD={readContext:Rr,useCallback:sP,useContext:Rr,useEffect:$v,useImperativeHandle:nP,useInsertionEffect:eP,useLayoutEffect:tP,useMemo:iP,useReducer:Df,useRef:JT,useState:function(){return Df(ml)},useDebugValue:Vv,useDeferredValue:function(e){var t=Ar();return aP(t,bt.memoizedState,e)},useTransition:function(){var e=Df(ml)[0],t=Ar().memoizedState;return[e,t]},useMutableSource:WT,useSyncExternalStore:GT,useId:oP,unstable_isNewReconciler:!1},GD={readContext:Rr,useCallback:sP,useContext:Rr,useEffect:$v,useImperativeHandle:nP,useInsertionEffect:eP,useLayoutEffect:tP,useMemo:iP,useReducer:If,useRef:JT,useState:function(){return If(ml)},useDebugValue:Vv,useDeferredValue:function(e){var t=Ar();return bt===null?t.memoizedState=e:aP(t,bt.memoizedState,e)},useTransition:function(){var e=If(ml)[0],t=Ar().memoizedState;return[e,t]},useMutableSource:WT,useSyncExternalStore:GT,useId:oP,unstable_isNewReconciler:!1};function Vr(e,t){if(e&&e.defaultProps){t=rt({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function Wy(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:rt({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var wd={isMounted:function(e){return(e=e._reactInternals)?Ei(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=Gt(),s=js(e),i=Cn(n,s);i.payload=t,r!=null&&(i.callback=r),t=ws(e,i,s),t!==null&&(Kr(t,e,s,n),Jc(t,e,s))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=Gt(),s=js(e),i=Cn(n,s);i.tag=1,i.payload=t,r!=null&&(i.callback=r),t=ws(e,i,s),t!==null&&(Kr(t,e,s,n),Jc(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=Gt(),n=js(e),s=Cn(r,n);s.tag=2,t!=null&&(s.callback=t),t=ws(e,s,n),t!==null&&(Kr(t,e,n,r),Jc(t,e,n))}};function yw(e,t,r,n,s,i,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,i,a):t.prototype&&t.prototype.isPureReactComponent?!ll(r,n)||!ll(s,i):!0}function dP(e,t,r){var n=!1,s=Ts,i=t.contextType;return typeof i=="object"&&i!==null?i=Rr(i):(s=nr(t)?mi:Ut.current,n=t.contextTypes,i=(n=n!=null)?Sa(e,s):Ts),t=new t(r,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=wd,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=i),t}function xw(e,t,r,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&wd.enqueueReplaceState(t,t.state,null)}function Gy(e,t,r,n){var s=e.stateNode;s.props=r,s.state=e.memoizedState,s.refs={},Av(e);var i=t.contextType;typeof i=="object"&&i!==null?s.context=Rr(i):(i=nr(t)?mi:Ut.current,s.context=Sa(e,i)),s.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Wy(e,t,i,r),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&wd.enqueueReplaceState(s,s.state,null),Pu(e,r,s,n),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function Ta(e,t){try{var r="",n=t;do r+=w5(n),n=n.return;while(n);var s=r}catch(i){s=`
|
|
39
|
-
Error generating stack: `+i.message+`
|
|
40
|
-
`+i.stack}return{value:e,source:t,stack:s,digest:null}}function Lf(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function Ky(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var KD=typeof WeakMap=="function"?WeakMap:Map;function fP(e,t,r){r=Cn(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){Iu||(Iu=!0,sx=n),Ky(e,t)},r}function hP(e,t,r){r=Cn(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var s=t.value;r.payload=function(){return n(s)},r.callback=function(){Ky(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(r.callback=function(){Ky(e,t),typeof n!="function"&&(ks===null?ks=new Set([this]):ks.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),r}function vw(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new KD;var s=new Set;n.set(t,s)}else s=n.get(t),s===void 0&&(s=new Set,n.set(t,s));s.has(r)||(s.add(r),e=lI.bind(null,e,t,r),t.then(e,e))}function bw(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function ww(e,t,r,n,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=Cn(-1,1),t.tag=2,ws(r,t,1))),r.lanes|=1),e)}var YD=Vn.ReactCurrentOwner,Jt=!1;function Ht(e,t,r,n){t.child=e===null?qT(t,null,r,n):Ea(t,e.child,r,n)}function kw(e,t,r,n,s){r=r.render;var i=t.ref;return ma(t,s),n=zv(e,t,r,n,i,s),r=Fv(),e!==null&&!Jt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Dn(e,t,s)):(Ge&&r&&Nv(t),t.flags|=1,Ht(e,t,n,s),t.child)}function jw(e,t,r,n,s){if(e===null){var i=r.type;return typeof i=="function"&&!Yv(i)&&i.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=i,pP(e,t,i,n,s)):(e=iu(r.type,null,n,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&s)){var a=i.memoizedProps;if(r=r.compare,r=r!==null?r:ll,r(a,n)&&e.ref===t.ref)return Dn(e,t,s)}return t.flags|=1,e=_s(i,n),e.ref=t.ref,e.return=t,t.child=e}function pP(e,t,r,n,s){if(e!==null){var i=e.memoizedProps;if(ll(i,n)&&e.ref===t.ref)if(Jt=!1,t.pendingProps=n=i,(e.lanes&s)!==0)e.flags&131072&&(Jt=!0);else return t.lanes=e.lanes,Dn(e,t,s)}return Yy(e,t,r,n,s)}function mP(e,t,r){var n=t.pendingProps,s=n.children,i=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ie(sa,lr),lr|=r;else{if(!(r&1073741824))return e=i!==null?i.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ie(sa,lr),lr|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=i!==null?i.baseLanes:r,Ie(sa,lr),lr|=n}else i!==null?(n=i.baseLanes|r,t.memoizedState=null):n=r,Ie(sa,lr),lr|=n;return Ht(e,t,s,r),t.child}function gP(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function Yy(e,t,r,n,s){var i=nr(r)?mi:Ut.current;return i=Sa(t,i),ma(t,s),r=zv(e,t,r,n,i,s),n=Fv(),e!==null&&!Jt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Dn(e,t,s)):(Ge&&n&&Nv(t),t.flags|=1,Ht(e,t,r,s),t.child)}function _w(e,t,r,n,s){if(nr(r)){var i=!0;Su(t)}else i=!1;if(ma(t,s),t.stateNode===null)ru(e,t),dP(t,r,n),Gy(t,r,n,s),n=!0;else if(e===null){var a=t.stateNode,o=t.memoizedProps;a.props=o;var l=a.context,d=r.contextType;typeof d=="object"&&d!==null?d=Rr(d):(d=nr(r)?mi:Ut.current,d=Sa(t,d));var u=r.getDerivedStateFromProps,f=typeof u=="function"||typeof a.getSnapshotBeforeUpdate=="function";f||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(o!==n||l!==d)&&xw(t,a,n,d),os=!1;var h=t.memoizedState;a.state=h,Pu(t,n,a,s),l=t.memoizedState,o!==n||h!==l||rr.current||os?(typeof u=="function"&&(Wy(t,r,u,n),l=t.memoizedState),(o=os||yw(t,r,o,n,h,l,d))?(f||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=l),a.props=n,a.state=l,a.context=d,n=o):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{a=t.stateNode,UT(e,t),o=t.memoizedProps,d=t.type===t.elementType?o:Vr(t.type,o),a.props=d,f=t.pendingProps,h=a.context,l=r.contextType,typeof l=="object"&&l!==null?l=Rr(l):(l=nr(r)?mi:Ut.current,l=Sa(t,l));var p=r.getDerivedStateFromProps;(u=typeof p=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(o!==f||h!==l)&&xw(t,a,n,l),os=!1,h=t.memoizedState,a.state=h,Pu(t,n,a,s);var m=t.memoizedState;o!==f||h!==m||rr.current||os?(typeof p=="function"&&(Wy(t,r,p,n),m=t.memoizedState),(d=os||yw(t,r,d,n,h,m,l)||!1)?(u||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(n,m,l),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(n,m,l)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||o===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=m),a.props=n,a.state=m,a.context=l,n=d):(typeof a.componentDidUpdate!="function"||o===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),n=!1)}return Xy(e,t,r,n,i,s)}function Xy(e,t,r,n,s,i){gP(e,t);var a=(t.flags&128)!==0;if(!n&&!a)return s&&cw(t,r,!1),Dn(e,t,i);n=t.stateNode,YD.current=t;var o=a&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&a?(t.child=Ea(t,e.child,null,i),t.child=Ea(t,null,o,i)):Ht(e,t,o,i),t.memoizedState=n.state,s&&cw(t,r,!0),t.child}function yP(e){var t=e.stateNode;t.pendingContext?lw(e,t.pendingContext,t.pendingContext!==t.context):t.context&&lw(e,t.context,!1),Dv(e,t.containerInfo)}function Sw(e,t,r,n,s){return Na(),Cv(s),t.flags|=256,Ht(e,t,r,n),t.child}var Zy={dehydrated:null,treeContext:null,retryLane:0};function Qy(e){return{baseLanes:e,cachePool:null,transitions:null}}function xP(e,t,r){var n=t.pendingProps,s=Je.current,i=!1,a=(t.flags&128)!==0,o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:(s&2)!==0),o?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),Ie(Je,s&1),e===null)return Uy(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(a=n.children,e=n.fallback,i?(n=t.mode,i=t.child,a={mode:"hidden",children:a},!(n&1)&&i!==null?(i.childLanes=0,i.pendingProps=a):i=_d(a,n,0,null),e=ui(e,n,r,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Qy(r),t.memoizedState=Zy,e):qv(t,a));if(s=e.memoizedState,s!==null&&(o=s.dehydrated,o!==null))return XD(e,t,a,n,o,s,r);if(i){i=n.fallback,a=t.mode,s=e.child,o=s.sibling;var l={mode:"hidden",children:n.children};return!(a&1)&&t.child!==s?(n=t.child,n.childLanes=0,n.pendingProps=l,t.deletions=null):(n=_s(s,l),n.subtreeFlags=s.subtreeFlags&14680064),o!==null?i=_s(o,i):(i=ui(i,a,r,null),i.flags|=2),i.return=t,n.return=t,n.sibling=i,t.child=n,n=i,i=t.child,a=e.child.memoizedState,a=a===null?Qy(r):{baseLanes:a.baseLanes|r,cachePool:null,transitions:a.transitions},i.memoizedState=a,i.childLanes=e.childLanes&~r,t.memoizedState=Zy,n}return i=e.child,e=i.sibling,n=_s(i,{mode:"visible",children:n.children}),!(t.mode&1)&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function qv(e,t){return t=_d({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function jc(e,t,r,n){return n!==null&&Cv(n),Ea(t,e.child,null,r),e=qv(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function XD(e,t,r,n,s,i,a){if(r)return t.flags&256?(t.flags&=-257,n=Lf(Error(W(422))),jc(e,t,a,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=n.fallback,s=t.mode,n=_d({mode:"visible",children:n.children},s,0,null),i=ui(i,s,a,null),i.flags|=2,n.return=t,i.return=t,n.sibling=i,t.child=n,t.mode&1&&Ea(t,e.child,null,a),t.child.memoizedState=Qy(a),t.memoizedState=Zy,i);if(!(t.mode&1))return jc(e,t,a,null);if(s.data==="$!"){if(n=s.nextSibling&&s.nextSibling.dataset,n)var o=n.dgst;return n=o,i=Error(W(419)),n=Lf(i,n,void 0),jc(e,t,a,n)}if(o=(a&e.childLanes)!==0,Jt||o){if(n=St,n!==null){switch(a&-a){case 4:s=2;break;case 16:s=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:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(n.suspendedLanes|a)?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,An(e,s),Kr(n,e,s,-1))}return Kv(),n=Lf(Error(W(421))),jc(e,t,a,n)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=cI.bind(null,e),s._reactRetry=t,null):(e=i.treeContext,dr=bs(s.nextSibling),fr=t,Ge=!0,Hr=null,e!==null&&(_r[Sr++]=jn,_r[Sr++]=_n,_r[Sr++]=gi,jn=e.id,_n=e.overflow,gi=t),t=qv(t,n.children),t.flags|=4096,t)}function Nw(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),Hy(e.return,t,r)}function Of(e,t,r,n,s){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:s}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=n,i.tail=r,i.tailMode=s)}function vP(e,t,r){var n=t.pendingProps,s=n.revealOrder,i=n.tail;if(Ht(e,t,n.children,r),n=Je.current,n&2)n=n&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Nw(e,r,t);else if(e.tag===19)Nw(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if(Ie(Je,n),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(r=t.child,s=null;r!==null;)e=r.alternate,e!==null&&Mu(e)===null&&(s=r),r=r.sibling;r=s,r===null?(s=t.child,t.child=null):(s=r.sibling,r.sibling=null),Of(t,!1,s,r,i);break;case"backwards":for(r=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Mu(e)===null){t.child=s;break}e=s.sibling,s.sibling=r,r=s,s=e}Of(t,!0,r,null,i);break;case"together":Of(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ru(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Dn(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),xi|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(W(153));if(t.child!==null){for(e=t.child,r=_s(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=_s(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function ZD(e,t,r){switch(t.tag){case 3:yP(t),Na();break;case 5:HT(t);break;case 1:nr(t.type)&&Su(t);break;case 4:Dv(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,s=t.memoizedProps.value;Ie(Cu,n._currentValue),n._currentValue=s;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(Ie(Je,Je.current&1),t.flags|=128,null):r&t.child.childLanes?xP(e,t,r):(Ie(Je,Je.current&1),e=Dn(e,t,r),e!==null?e.sibling:null);Ie(Je,Je.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return vP(e,t,r);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),Ie(Je,Je.current),n)break;return null;case 22:case 23:return t.lanes=0,mP(e,t,r)}return Dn(e,t,r)}var bP,Jy,wP,kP;bP=function(e,t){for(var r=t.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===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};Jy=function(){};wP=function(e,t,r,n){var s=e.memoizedProps;if(s!==n){e=t.stateNode,ri(cn.current);var i=null;switch(r){case"input":s=wy(e,s),n=wy(e,n),i=[];break;case"select":s=rt({},s,{value:void 0}),n=rt({},n,{value:void 0}),i=[];break;case"textarea":s=_y(e,s),n=_y(e,n),i=[];break;default:typeof s.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=ju)}Ny(r,n);var a;r=null;for(d in s)if(!n.hasOwnProperty(d)&&s.hasOwnProperty(d)&&s[d]!=null)if(d==="style"){var o=s[d];for(a in o)o.hasOwnProperty(a)&&(r||(r={}),r[a]="")}else d!=="dangerouslySetInnerHTML"&&d!=="children"&&d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&d!=="autoFocus"&&(tl.hasOwnProperty(d)?i||(i=[]):(i=i||[]).push(d,null));for(d in n){var l=n[d];if(o=s!=null?s[d]:void 0,n.hasOwnProperty(d)&&l!==o&&(l!=null||o!=null))if(d==="style")if(o){for(a in o)!o.hasOwnProperty(a)||l&&l.hasOwnProperty(a)||(r||(r={}),r[a]="");for(a in l)l.hasOwnProperty(a)&&o[a]!==l[a]&&(r||(r={}),r[a]=l[a])}else r||(i||(i=[]),i.push(d,r)),r=l;else d==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,o=o?o.__html:void 0,l!=null&&o!==l&&(i=i||[]).push(d,l)):d==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(d,""+l):d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&(tl.hasOwnProperty(d)?(l!=null&&d==="onScroll"&&Ve("scroll",e),i||o===l||(i=[])):(i=i||[]).push(d,l))}r&&(i=i||[]).push("style",r);var d=i;(t.updateQueue=d)&&(t.flags|=4)}};kP=function(e,t,r,n){r!==n&&(t.flags|=4)};function oo(e,t){if(!Ge)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function $t(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var s=e.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags&14680064,n|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags,n|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function QD(e,t,r){var n=t.pendingProps;switch(Ev(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return $t(t),null;case 1:return nr(t.type)&&_u(),$t(t),null;case 3:return n=t.stateNode,Ca(),qe(rr),qe(Ut),Lv(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(wc(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Hr!==null&&(ox(Hr),Hr=null))),Jy(e,t),$t(t),null;case 5:Iv(t);var s=ri(hl.current);if(r=t.type,e!==null&&t.stateNode!=null)wP(e,t,r,n,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(W(166));return $t(t),null}if(e=ri(cn.current),wc(t)){n=t.stateNode,r=t.type;var i=t.memoizedProps;switch(n[an]=t,n[dl]=i,e=(t.mode&1)!==0,r){case"dialog":Ve("cancel",n),Ve("close",n);break;case"iframe":case"object":case"embed":Ve("load",n);break;case"video":case"audio":for(s=0;s<Eo.length;s++)Ve(Eo[s],n);break;case"source":Ve("error",n);break;case"img":case"image":case"link":Ve("error",n),Ve("load",n);break;case"details":Ve("toggle",n);break;case"input":I1(n,i),Ve("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!i.multiple},Ve("invalid",n);break;case"textarea":O1(n,i),Ve("invalid",n)}Ny(r,i),s=null;for(var a in i)if(i.hasOwnProperty(a)){var o=i[a];a==="children"?typeof o=="string"?n.textContent!==o&&(i.suppressHydrationWarning!==!0&&bc(n.textContent,o,e),s=["children",o]):typeof o=="number"&&n.textContent!==""+o&&(i.suppressHydrationWarning!==!0&&bc(n.textContent,o,e),s=["children",""+o]):tl.hasOwnProperty(a)&&o!=null&&a==="onScroll"&&Ve("scroll",n)}switch(r){case"input":fc(n),L1(n,i,!0);break;case"textarea":fc(n),z1(n);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(n.onclick=ju)}n=s,t.updateQueue=n,n!==null&&(t.flags|=4)}else{a=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=XC(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=a.createElement(r,{is:n.is}):(e=a.createElement(r),r==="select"&&(a=e,n.multiple?a.multiple=!0:n.size&&(a.size=n.size))):e=a.createElementNS(e,r),e[an]=t,e[dl]=n,bP(e,t,!1,!1),t.stateNode=e;e:{switch(a=Ey(r,n),r){case"dialog":Ve("cancel",e),Ve("close",e),s=n;break;case"iframe":case"object":case"embed":Ve("load",e),s=n;break;case"video":case"audio":for(s=0;s<Eo.length;s++)Ve(Eo[s],e);s=n;break;case"source":Ve("error",e),s=n;break;case"img":case"image":case"link":Ve("error",e),Ve("load",e),s=n;break;case"details":Ve("toggle",e),s=n;break;case"input":I1(e,n),s=wy(e,n),Ve("invalid",e);break;case"option":s=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},s=rt({},n,{value:void 0}),Ve("invalid",e);break;case"textarea":O1(e,n),s=_y(e,n),Ve("invalid",e);break;default:s=n}Ny(r,s),o=s;for(i in o)if(o.hasOwnProperty(i)){var l=o[i];i==="style"?JC(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&ZC(e,l)):i==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&rl(e,l):typeof l=="number"&&rl(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(tl.hasOwnProperty(i)?l!=null&&i==="onScroll"&&Ve("scroll",e):l!=null&&fv(e,i,l,a))}switch(r){case"input":fc(e),L1(e,n,!1);break;case"textarea":fc(e),z1(e);break;case"option":n.value!=null&&e.setAttribute("value",""+Cs(n.value));break;case"select":e.multiple=!!n.multiple,i=n.value,i!=null?da(e,!!n.multiple,i,!1):n.defaultValue!=null&&da(e,!!n.multiple,n.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=ju)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return $t(t),null;case 6:if(e&&t.stateNode!=null)kP(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(W(166));if(r=ri(hl.current),ri(cn.current),wc(t)){if(n=t.stateNode,r=t.memoizedProps,n[an]=t,(i=n.nodeValue!==r)&&(e=fr,e!==null))switch(e.tag){case 3:bc(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&bc(n.nodeValue,r,(e.mode&1)!==0)}i&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[an]=t,t.stateNode=n}return $t(t),null;case 13:if(qe(Je),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ge&&dr!==null&&t.mode&1&&!(t.flags&128))$T(),Na(),t.flags|=98560,i=!1;else if(i=wc(t),n!==null&&n.dehydrated!==null){if(e===null){if(!i)throw Error(W(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(W(317));i[an]=t}else Na(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;$t(t),i=!1}else Hr!==null&&(ox(Hr),Hr=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=r,t):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(t.child.flags|=8192,t.mode&1&&(e===null||Je.current&1?wt===0&&(wt=3):Kv())),t.updateQueue!==null&&(t.flags|=4),$t(t),null);case 4:return Ca(),Jy(e,t),e===null&&cl(t.stateNode.containerInfo),$t(t),null;case 10:return Mv(t.type._context),$t(t),null;case 17:return nr(t.type)&&_u(),$t(t),null;case 19:if(qe(Je),i=t.memoizedState,i===null)return $t(t),null;if(n=(t.flags&128)!==0,a=i.rendering,a===null)if(n)oo(i,!1);else{if(wt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=Mu(e),a!==null){for(t.flags|=128,oo(i,!1),n=a.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)i=r,e=n,i.flags&=14680066,a=i.alternate,a===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=a.childLanes,i.lanes=a.lanes,i.child=a.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=a.memoizedProps,i.memoizedState=a.memoizedState,i.updateQueue=a.updateQueue,i.type=a.type,e=a.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return Ie(Je,Je.current&1|2),t.child}e=e.sibling}i.tail!==null&&dt()>Pa&&(t.flags|=128,n=!0,oo(i,!1),t.lanes=4194304)}else{if(!n)if(e=Mu(a),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),oo(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!Ge)return $t(t),null}else 2*dt()-i.renderingStartTime>Pa&&r!==1073741824&&(t.flags|=128,n=!0,oo(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(r=i.last,r!==null?r.sibling=a:t.child=a,i.last=a)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=dt(),t.sibling=null,r=Je.current,Ie(Je,n?r&1|2:r&1),t):($t(t),null);case 22:case 23:return Gv(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?lr&1073741824&&($t(t),t.subtreeFlags&6&&(t.flags|=8192)):$t(t),null;case 24:return null;case 25:return null}throw Error(W(156,t.tag))}function JD(e,t){switch(Ev(t),t.tag){case 1:return nr(t.type)&&_u(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ca(),qe(rr),qe(Ut),Lv(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Iv(t),null;case 13:if(qe(Je),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(W(340));Na()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return qe(Je),null;case 4:return Ca(),null;case 10:return Mv(t.type._context),null;case 22:case 23:return Gv(),null;case 24:return null;default:return null}}var _c=!1,Vt=!1,eI=typeof WeakSet=="function"?WeakSet:Set,J=null;function na(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){at(e,t,n)}else r.current=null}function ex(e,t,r){try{r()}catch(n){at(e,t,n)}}var Ew=!1;function tI(e,t){if(Oy=bu,e=ET(),Sv(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var s=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var a=0,o=-1,l=-1,d=0,u=0,f=e,h=null;t:for(;;){for(var p;f!==r||s!==0&&f.nodeType!==3||(o=a+s),f!==i||n!==0&&f.nodeType!==3||(l=a+n),f.nodeType===3&&(a+=f.nodeValue.length),(p=f.firstChild)!==null;)h=f,f=p;for(;;){if(f===e)break t;if(h===r&&++d===s&&(o=a),h===i&&++u===n&&(l=a),(p=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=p}r=o===-1||l===-1?null:{start:o,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(zy={focusedElem:e,selectionRange:r},bu=!1,J=t;J!==null;)if(t=J,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,J=e;else for(;J!==null;){t=J;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var g=m.memoizedProps,b=m.memoizedState,x=t.stateNode,y=x.getSnapshotBeforeUpdate(t.elementType===t.type?g:Vr(t.type,g),b);x.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(W(163))}}catch(w){at(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,J=e;break}J=t.return}return m=Ew,Ew=!1,m}function Ho(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var s=n=n.next;do{if((s.tag&e)===e){var i=s.destroy;s.destroy=void 0,i!==void 0&&ex(t,r,i)}s=s.next}while(s!==n)}}function kd(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function tx(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function jP(e){var t=e.alternate;t!==null&&(e.alternate=null,jP(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[an],delete t[dl],delete t[Vy],delete t[OD],delete t[zD])),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 _P(e){return e.tag===5||e.tag===3||e.tag===4}function Cw(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||_P(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 rx(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=ju));else if(n!==4&&(e=e.child,e!==null))for(rx(e,t,r),e=e.sibling;e!==null;)rx(e,t,r),e=e.sibling}function nx(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(nx(e,t,r),e=e.sibling;e!==null;)nx(e,t,r),e=e.sibling}var Mt=null,qr=!1;function Qn(e,t,r){for(r=r.child;r!==null;)SP(e,t,r),r=r.sibling}function SP(e,t,r){if(ln&&typeof ln.onCommitFiberUnmount=="function")try{ln.onCommitFiberUnmount(pd,r)}catch{}switch(r.tag){case 5:Vt||na(r,t);case 6:var n=Mt,s=qr;Mt=null,Qn(e,t,r),Mt=n,qr=s,Mt!==null&&(qr?(e=Mt,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Mt.removeChild(r.stateNode));break;case 18:Mt!==null&&(qr?(e=Mt,r=r.stateNode,e.nodeType===8?Pf(e.parentNode,r):e.nodeType===1&&Pf(e,r),al(e)):Pf(Mt,r.stateNode));break;case 4:n=Mt,s=qr,Mt=r.stateNode.containerInfo,qr=!0,Qn(e,t,r),Mt=n,qr=s;break;case 0:case 11:case 14:case 15:if(!Vt&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){s=n=n.next;do{var i=s,a=i.destroy;i=i.tag,a!==void 0&&(i&2||i&4)&&ex(r,t,a),s=s.next}while(s!==n)}Qn(e,t,r);break;case 1:if(!Vt&&(na(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(o){at(r,t,o)}Qn(e,t,r);break;case 21:Qn(e,t,r);break;case 22:r.mode&1?(Vt=(n=Vt)||r.memoizedState!==null,Qn(e,t,r),Vt=n):Qn(e,t,r);break;default:Qn(e,t,r)}}function Tw(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new eI),t.forEach(function(n){var s=uI.bind(null,e,n);r.has(n)||(r.add(n),n.then(s,s))})}}function Fr(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var s=r[n];try{var i=e,a=t,o=a;e:for(;o!==null;){switch(o.tag){case 5:Mt=o.stateNode,qr=!1;break e;case 3:Mt=o.stateNode.containerInfo,qr=!0;break e;case 4:Mt=o.stateNode.containerInfo,qr=!0;break e}o=o.return}if(Mt===null)throw Error(W(160));SP(i,a,s),Mt=null,qr=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(d){at(s,t,d)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)NP(t,e),t=t.sibling}function NP(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Fr(t,e),nn(e),n&4){try{Ho(3,e,e.return),kd(3,e)}catch(g){at(e,e.return,g)}try{Ho(5,e,e.return)}catch(g){at(e,e.return,g)}}break;case 1:Fr(t,e),nn(e),n&512&&r!==null&&na(r,r.return);break;case 5:if(Fr(t,e),nn(e),n&512&&r!==null&&na(r,r.return),e.flags&32){var s=e.stateNode;try{rl(s,"")}catch(g){at(e,e.return,g)}}if(n&4&&(s=e.stateNode,s!=null)){var i=e.memoizedProps,a=r!==null?r.memoizedProps:i,o=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{o==="input"&&i.type==="radio"&&i.name!=null&&KC(s,i),Ey(o,a);var d=Ey(o,i);for(a=0;a<l.length;a+=2){var u=l[a],f=l[a+1];u==="style"?JC(s,f):u==="dangerouslySetInnerHTML"?ZC(s,f):u==="children"?rl(s,f):fv(s,u,f,d)}switch(o){case"input":ky(s,i);break;case"textarea":YC(s,i);break;case"select":var h=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var p=i.value;p!=null?da(s,!!i.multiple,p,!1):h!==!!i.multiple&&(i.defaultValue!=null?da(s,!!i.multiple,i.defaultValue,!0):da(s,!!i.multiple,i.multiple?[]:"",!1))}s[dl]=i}catch(g){at(e,e.return,g)}}break;case 6:if(Fr(t,e),nn(e),n&4){if(e.stateNode===null)throw Error(W(162));s=e.stateNode,i=e.memoizedProps;try{s.nodeValue=i}catch(g){at(e,e.return,g)}}break;case 3:if(Fr(t,e),nn(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{al(t.containerInfo)}catch(g){at(e,e.return,g)}break;case 4:Fr(t,e),nn(e);break;case 13:Fr(t,e),nn(e),s=e.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(Hv=dt())),n&4&&Tw(e);break;case 22:if(u=r!==null&&r.memoizedState!==null,e.mode&1?(Vt=(d=Vt)||u,Fr(t,e),Vt=d):Fr(t,e),nn(e),n&8192){if(d=e.memoizedState!==null,(e.stateNode.isHidden=d)&&!u&&e.mode&1)for(J=e,u=e.child;u!==null;){for(f=J=u;J!==null;){switch(h=J,p=h.child,h.tag){case 0:case 11:case 14:case 15:Ho(4,h,h.return);break;case 1:na(h,h.return);var m=h.stateNode;if(typeof m.componentWillUnmount=="function"){n=h,r=h.return;try{t=n,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(g){at(n,r,g)}}break;case 5:na(h,h.return);break;case 22:if(h.memoizedState!==null){Mw(f);continue}}p!==null?(p.return=h,J=p):Mw(f)}u=u.sibling}e:for(u=null,f=e;;){if(f.tag===5){if(u===null){u=f;try{s=f.stateNode,d?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(o=f.stateNode,l=f.memoizedProps.style,a=l!=null&&l.hasOwnProperty("display")?l.display:null,o.style.display=QC("display",a))}catch(g){at(e,e.return,g)}}}else if(f.tag===6){if(u===null)try{f.stateNode.nodeValue=d?"":f.memoizedProps}catch(g){at(e,e.return,g)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;u===f&&(u=null),f=f.return}u===f&&(u=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:Fr(t,e),nn(e),n&4&&Tw(e);break;case 21:break;default:Fr(t,e),nn(e)}}function nn(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(_P(r)){var n=r;break e}r=r.return}throw Error(W(160))}switch(n.tag){case 5:var s=n.stateNode;n.flags&32&&(rl(s,""),n.flags&=-33);var i=Cw(e);nx(e,i,s);break;case 3:case 4:var a=n.stateNode.containerInfo,o=Cw(e);rx(e,o,a);break;default:throw Error(W(161))}}catch(l){at(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function rI(e,t,r){J=e,EP(e)}function EP(e,t,r){for(var n=(e.mode&1)!==0;J!==null;){var s=J,i=s.child;if(s.tag===22&&n){var a=s.memoizedState!==null||_c;if(!a){var o=s.alternate,l=o!==null&&o.memoizedState!==null||Vt;o=_c;var d=Vt;if(_c=a,(Vt=l)&&!d)for(J=s;J!==null;)a=J,l=a.child,a.tag===22&&a.memoizedState!==null?Rw(s):l!==null?(l.return=a,J=l):Rw(s);for(;i!==null;)J=i,EP(i),i=i.sibling;J=s,_c=o,Vt=d}Pw(e)}else s.subtreeFlags&8772&&i!==null?(i.return=s,J=i):Pw(e)}}function Pw(e){for(;J!==null;){var t=J;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Vt||kd(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!Vt)if(r===null)n.componentDidMount();else{var s=t.elementType===t.type?r.memoizedProps:Vr(t.type,r.memoizedProps);n.componentDidUpdate(s,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&pw(t,i,n);break;case 3:var a=t.updateQueue;if(a!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}pw(t,a,r)}break;case 5:var o=t.stateNode;if(r===null&&t.flags&4){r=o;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break;case"img":l.src&&(r.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var d=t.alternate;if(d!==null){var u=d.memoizedState;if(u!==null){var f=u.dehydrated;f!==null&&al(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(W(163))}Vt||t.flags&512&&tx(t)}catch(h){at(t,t.return,h)}}if(t===e){J=null;break}if(r=t.sibling,r!==null){r.return=t.return,J=r;break}J=t.return}}function Mw(e){for(;J!==null;){var t=J;if(t===e){J=null;break}var r=t.sibling;if(r!==null){r.return=t.return,J=r;break}J=t.return}}function Rw(e){for(;J!==null;){var t=J;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{kd(4,t)}catch(l){at(t,r,l)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var s=t.return;try{n.componentDidMount()}catch(l){at(t,s,l)}}var i=t.return;try{tx(t)}catch(l){at(t,i,l)}break;case 5:var a=t.return;try{tx(t)}catch(l){at(t,a,l)}}}catch(l){at(t,t.return,l)}if(t===e){J=null;break}var o=t.sibling;if(o!==null){o.return=t.return,J=o;break}J=t.return}}var nI=Math.ceil,Du=Vn.ReactCurrentDispatcher,Bv=Vn.ReactCurrentOwner,Pr=Vn.ReactCurrentBatchConfig,Ee=0,St=null,mt=null,At=0,lr=0,sa=Os(0),wt=0,yl=null,xi=0,jd=0,Uv=0,Wo=null,Qt=null,Hv=0,Pa=1/0,wn=null,Iu=!1,sx=null,ks=null,Sc=!1,ms=null,Lu=0,Go=0,ix=null,nu=-1,su=0;function Gt(){return Ee&6?dt():nu!==-1?nu:nu=dt()}function js(e){return e.mode&1?Ee&2&&At!==0?At&-At:$D.transition!==null?(su===0&&(su=dT()),su):(e=Re,e!==0||(e=window.event,e=e===void 0?16:xT(e.type)),e):1}function Kr(e,t,r,n){if(50<Go)throw Go=0,ix=null,Error(W(185));$l(e,r,n),(!(Ee&2)||e!==St)&&(e===St&&(!(Ee&2)&&(jd|=r),wt===4&&ds(e,At)),sr(e,n),r===1&&Ee===0&&!(t.mode&1)&&(Pa=dt()+500,vd&&zs()))}function sr(e,t){var r=e.callbackNode;$5(e,t);var n=vu(e,e===St?At:0);if(n===0)r!==null&&V1(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&V1(r),t===1)e.tag===0?FD(Aw.bind(null,e)):OT(Aw.bind(null,e)),ID(function(){!(Ee&6)&&zs()}),r=null;else{switch(fT(n)){case 1:r=yv;break;case 4:r=cT;break;case 16:r=xu;break;case 536870912:r=uT;break;default:r=xu}r=IP(r,CP.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function CP(e,t){if(nu=-1,su=0,Ee&6)throw Error(W(327));var r=e.callbackNode;if(ga()&&e.callbackNode!==r)return null;var n=vu(e,e===St?At:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=Ou(e,n);else{t=n;var s=Ee;Ee|=2;var i=PP();(St!==e||At!==t)&&(wn=null,Pa=dt()+500,ci(e,t));do try{aI();break}catch(o){TP(e,o)}while(!0);Pv(),Du.current=i,Ee=s,mt!==null?t=0:(St=null,At=0,t=wt)}if(t!==0){if(t===2&&(s=Ry(e),s!==0&&(n=s,t=ax(e,s))),t===1)throw r=yl,ci(e,0),ds(e,n),sr(e,dt()),r;if(t===6)ds(e,n);else{if(s=e.current.alternate,!(n&30)&&!sI(s)&&(t=Ou(e,n),t===2&&(i=Ry(e),i!==0&&(n=i,t=ax(e,i))),t===1))throw r=yl,ci(e,0),ds(e,n),sr(e,dt()),r;switch(e.finishedWork=s,e.finishedLanes=n,t){case 0:case 1:throw Error(W(345));case 2:Ks(e,Qt,wn);break;case 3:if(ds(e,n),(n&130023424)===n&&(t=Hv+500-dt(),10<t)){if(vu(e,0)!==0)break;if(s=e.suspendedLanes,(s&n)!==n){Gt(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=$y(Ks.bind(null,e,Qt,wn),t);break}Ks(e,Qt,wn);break;case 4:if(ds(e,n),(n&4194240)===n)break;for(t=e.eventTimes,s=-1;0<n;){var a=31-Gr(n);i=1<<a,a=t[a],a>s&&(s=a),n&=~i}if(n=s,n=dt()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*nI(n/1960))-n,10<n){e.timeoutHandle=$y(Ks.bind(null,e,Qt,wn),n);break}Ks(e,Qt,wn);break;case 5:Ks(e,Qt,wn);break;default:throw Error(W(329))}}}return sr(e,dt()),e.callbackNode===r?CP.bind(null,e):null}function ax(e,t){var r=Wo;return e.current.memoizedState.isDehydrated&&(ci(e,t).flags|=256),e=Ou(e,t),e!==2&&(t=Qt,Qt=r,t!==null&&ox(t)),e}function ox(e){Qt===null?Qt=e:Qt.push.apply(Qt,e)}function sI(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var s=r[n],i=s.getSnapshot;s=s.value;try{if(!Zr(i(),s))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function ds(e,t){for(t&=~Uv,t&=~jd,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-Gr(t),n=1<<r;e[r]=-1,t&=~n}}function Aw(e){if(Ee&6)throw Error(W(327));ga();var t=vu(e,0);if(!(t&1))return sr(e,dt()),null;var r=Ou(e,t);if(e.tag!==0&&r===2){var n=Ry(e);n!==0&&(t=n,r=ax(e,n))}if(r===1)throw r=yl,ci(e,0),ds(e,t),sr(e,dt()),r;if(r===6)throw Error(W(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ks(e,Qt,wn),sr(e,dt()),null}function Wv(e,t){var r=Ee;Ee|=1;try{return e(t)}finally{Ee=r,Ee===0&&(Pa=dt()+500,vd&&zs())}}function vi(e){ms!==null&&ms.tag===0&&!(Ee&6)&&ga();var t=Ee;Ee|=1;var r=Pr.transition,n=Re;try{if(Pr.transition=null,Re=1,e)return e()}finally{Re=n,Pr.transition=r,Ee=t,!(Ee&6)&&zs()}}function Gv(){lr=sa.current,qe(sa)}function ci(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,DD(r)),mt!==null)for(r=mt.return;r!==null;){var n=r;switch(Ev(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&_u();break;case 3:Ca(),qe(rr),qe(Ut),Lv();break;case 5:Iv(n);break;case 4:Ca();break;case 13:qe(Je);break;case 19:qe(Je);break;case 10:Mv(n.type._context);break;case 22:case 23:Gv()}r=r.return}if(St=e,mt=e=_s(e.current,null),At=lr=t,wt=0,yl=null,Uv=jd=xi=0,Qt=Wo=null,ti!==null){for(t=0;t<ti.length;t++)if(r=ti[t],n=r.interleaved,n!==null){r.interleaved=null;var s=n.next,i=r.pending;if(i!==null){var a=i.next;i.next=s,n.next=a}r.pending=n}ti=null}return e}function TP(e,t){do{var r=mt;try{if(Pv(),eu.current=Au,Ru){for(var n=tt.memoizedState;n!==null;){var s=n.queue;s!==null&&(s.pending=null),n=n.next}Ru=!1}if(yi=0,_t=bt=tt=null,Uo=!1,pl=0,Bv.current=null,r===null||r.return===null){wt=1,yl=t,mt=null;break}e:{var i=e,a=r.return,o=r,l=t;if(t=At,o.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var d=l,u=o,f=u.tag;if(!(u.mode&1)&&(f===0||f===11||f===15)){var h=u.alternate;h?(u.updateQueue=h.updateQueue,u.memoizedState=h.memoizedState,u.lanes=h.lanes):(u.updateQueue=null,u.memoizedState=null)}var p=bw(a);if(p!==null){p.flags&=-257,ww(p,a,o,i,t),p.mode&1&&vw(i,d,t),t=p,l=d;var m=t.updateQueue;if(m===null){var g=new Set;g.add(l),t.updateQueue=g}else m.add(l);break e}else{if(!(t&1)){vw(i,d,t),Kv();break e}l=Error(W(426))}}else if(Ge&&o.mode&1){var b=bw(a);if(b!==null){!(b.flags&65536)&&(b.flags|=256),ww(b,a,o,i,t),Cv(Ta(l,o));break e}}i=l=Ta(l,o),wt!==4&&(wt=2),Wo===null?Wo=[i]:Wo.push(i),i=a;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var x=fP(i,l,t);hw(i,x);break e;case 1:o=l;var y=i.type,v=i.stateNode;if(!(i.flags&128)&&(typeof y.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(ks===null||!ks.has(v)))){i.flags|=65536,t&=-t,i.lanes|=t;var w=hP(i,o,t);hw(i,w);break e}}i=i.return}while(i!==null)}RP(r)}catch(_){t=_,mt===r&&r!==null&&(mt=r=r.return);continue}break}while(!0)}function PP(){var e=Du.current;return Du.current=Au,e===null?Au:e}function Kv(){(wt===0||wt===3||wt===2)&&(wt=4),St===null||!(xi&268435455)&&!(jd&268435455)||ds(St,At)}function Ou(e,t){var r=Ee;Ee|=2;var n=PP();(St!==e||At!==t)&&(wn=null,ci(e,t));do try{iI();break}catch(s){TP(e,s)}while(!0);if(Pv(),Ee=r,Du.current=n,mt!==null)throw Error(W(261));return St=null,At=0,wt}function iI(){for(;mt!==null;)MP(mt)}function aI(){for(;mt!==null&&!M5();)MP(mt)}function MP(e){var t=DP(e.alternate,e,lr);e.memoizedProps=e.pendingProps,t===null?RP(e):mt=t,Bv.current=null}function RP(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=JD(r,t),r!==null){r.flags&=32767,mt=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{wt=6,mt=null;return}}else if(r=QD(r,t,lr),r!==null){mt=r;return}if(t=t.sibling,t!==null){mt=t;return}mt=t=e}while(t!==null);wt===0&&(wt=5)}function Ks(e,t,r){var n=Re,s=Pr.transition;try{Pr.transition=null,Re=1,oI(e,t,r,n)}finally{Pr.transition=s,Re=n}return null}function oI(e,t,r,n){do ga();while(ms!==null);if(Ee&6)throw Error(W(327));r=e.finishedWork;var s=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(W(177));e.callbackNode=null,e.callbackPriority=0;var i=r.lanes|r.childLanes;if(V5(e,i),e===St&&(mt=St=null,At=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||Sc||(Sc=!0,IP(xu,function(){return ga(),null})),i=(r.flags&15990)!==0,r.subtreeFlags&15990||i){i=Pr.transition,Pr.transition=null;var a=Re;Re=1;var o=Ee;Ee|=4,Bv.current=null,tI(e,r),NP(r,e),ED(zy),bu=!!Oy,zy=Oy=null,e.current=r,rI(r),R5(),Ee=o,Re=a,Pr.transition=i}else e.current=r;if(Sc&&(Sc=!1,ms=e,Lu=s),i=e.pendingLanes,i===0&&(ks=null),I5(r.stateNode),sr(e,dt()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)s=t[r],n(s.value,{componentStack:s.stack,digest:s.digest});if(Iu)throw Iu=!1,e=sx,sx=null,e;return Lu&1&&e.tag!==0&&ga(),i=e.pendingLanes,i&1?e===ix?Go++:(Go=0,ix=e):Go=0,zs(),null}function ga(){if(ms!==null){var e=fT(Lu),t=Pr.transition,r=Re;try{if(Pr.transition=null,Re=16>e?16:e,ms===null)var n=!1;else{if(e=ms,ms=null,Lu=0,Ee&6)throw Error(W(331));var s=Ee;for(Ee|=4,J=e.current;J!==null;){var i=J,a=i.child;if(J.flags&16){var o=i.deletions;if(o!==null){for(var l=0;l<o.length;l++){var d=o[l];for(J=d;J!==null;){var u=J;switch(u.tag){case 0:case 11:case 15:Ho(8,u,i)}var f=u.child;if(f!==null)f.return=u,J=f;else for(;J!==null;){u=J;var h=u.sibling,p=u.return;if(jP(u),u===d){J=null;break}if(h!==null){h.return=p,J=h;break}J=p}}}var m=i.alternate;if(m!==null){var g=m.child;if(g!==null){m.child=null;do{var b=g.sibling;g.sibling=null,g=b}while(g!==null)}}J=i}}if(i.subtreeFlags&2064&&a!==null)a.return=i,J=a;else e:for(;J!==null;){if(i=J,i.flags&2048)switch(i.tag){case 0:case 11:case 15:Ho(9,i,i.return)}var x=i.sibling;if(x!==null){x.return=i.return,J=x;break e}J=i.return}}var y=e.current;for(J=y;J!==null;){a=J;var v=a.child;if(a.subtreeFlags&2064&&v!==null)v.return=a,J=v;else e:for(a=y;J!==null;){if(o=J,o.flags&2048)try{switch(o.tag){case 0:case 11:case 15:kd(9,o)}}catch(_){at(o,o.return,_)}if(o===a){J=null;break e}var w=o.sibling;if(w!==null){w.return=o.return,J=w;break e}J=o.return}}if(Ee=s,zs(),ln&&typeof ln.onPostCommitFiberRoot=="function")try{ln.onPostCommitFiberRoot(pd,e)}catch{}n=!0}return n}finally{Re=r,Pr.transition=t}}return!1}function Dw(e,t,r){t=Ta(r,t),t=fP(e,t,1),e=ws(e,t,1),t=Gt(),e!==null&&($l(e,1,t),sr(e,t))}function at(e,t,r){if(e.tag===3)Dw(e,e,r);else for(;t!==null;){if(t.tag===3){Dw(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(ks===null||!ks.has(n))){e=Ta(r,e),e=hP(t,e,1),t=ws(t,e,1),e=Gt(),t!==null&&($l(t,1,e),sr(t,e));break}}t=t.return}}function lI(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=Gt(),e.pingedLanes|=e.suspendedLanes&r,St===e&&(At&r)===r&&(wt===4||wt===3&&(At&130023424)===At&&500>dt()-Hv?ci(e,0):Uv|=r),sr(e,t)}function AP(e,t){t===0&&(e.mode&1?(t=mc,mc<<=1,!(mc&130023424)&&(mc=4194304)):t=1);var r=Gt();e=An(e,t),e!==null&&($l(e,t,r),sr(e,r))}function cI(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),AP(e,r)}function uI(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,s=e.memoizedState;s!==null&&(r=s.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(W(314))}n!==null&&n.delete(t),AP(e,r)}var DP;DP=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||rr.current)Jt=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return Jt=!1,ZD(e,t,r);Jt=!!(e.flags&131072)}else Jt=!1,Ge&&t.flags&1048576&&zT(t,Eu,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;ru(e,t),e=t.pendingProps;var s=Sa(t,Ut.current);ma(t,r),s=zv(null,t,n,e,s,r);var i=Fv();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,nr(n)?(i=!0,Su(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Av(t),s.updater=wd,t.stateNode=s,s._reactInternals=t,Gy(t,n,e,r),t=Xy(null,t,n,!0,i,r)):(t.tag=0,Ge&&i&&Nv(t),Ht(null,t,s,r),t=t.child),t;case 16:n=t.elementType;e:{switch(ru(e,t),e=t.pendingProps,s=n._init,n=s(n._payload),t.type=n,s=t.tag=fI(n),e=Vr(n,e),s){case 0:t=Yy(null,t,n,e,r);break e;case 1:t=_w(null,t,n,e,r);break e;case 11:t=kw(null,t,n,e,r);break e;case 14:t=jw(null,t,n,Vr(n.type,e),r);break e}throw Error(W(306,n,""))}return t;case 0:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:Vr(n,s),Yy(e,t,n,s,r);case 1:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:Vr(n,s),_w(e,t,n,s,r);case 3:e:{if(yP(t),e===null)throw Error(W(387));n=t.pendingProps,i=t.memoizedState,s=i.element,UT(e,t),Pu(t,n,null,r);var a=t.memoizedState;if(n=a.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){s=Ta(Error(W(423)),t),t=Sw(e,t,n,r,s);break e}else if(n!==s){s=Ta(Error(W(424)),t),t=Sw(e,t,n,r,s);break e}else for(dr=bs(t.stateNode.containerInfo.firstChild),fr=t,Ge=!0,Hr=null,r=qT(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Na(),n===s){t=Dn(e,t,r);break e}Ht(e,t,n,r)}t=t.child}return t;case 5:return HT(t),e===null&&Uy(t),n=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,a=s.children,Fy(n,s)?a=null:i!==null&&Fy(n,i)&&(t.flags|=32),gP(e,t),Ht(e,t,a,r),t.child;case 6:return e===null&&Uy(t),null;case 13:return xP(e,t,r);case 4:return Dv(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Ea(t,null,n,r):Ht(e,t,n,r),t.child;case 11:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:Vr(n,s),kw(e,t,n,s,r);case 7:return Ht(e,t,t.pendingProps,r),t.child;case 8:return Ht(e,t,t.pendingProps.children,r),t.child;case 12:return Ht(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,s=t.pendingProps,i=t.memoizedProps,a=s.value,Ie(Cu,n._currentValue),n._currentValue=a,i!==null)if(Zr(i.value,a)){if(i.children===s.children&&!rr.current){t=Dn(e,t,r);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var o=i.dependencies;if(o!==null){a=i.child;for(var l=o.firstContext;l!==null;){if(l.context===n){if(i.tag===1){l=Cn(-1,r&-r),l.tag=2;var d=i.updateQueue;if(d!==null){d=d.shared;var u=d.pending;u===null?l.next=l:(l.next=u.next,u.next=l),d.pending=l}}i.lanes|=r,l=i.alternate,l!==null&&(l.lanes|=r),Hy(i.return,r,t),o.lanes|=r;break}l=l.next}}else if(i.tag===10)a=i.type===t.type?null:i.child;else if(i.tag===18){if(a=i.return,a===null)throw Error(W(341));a.lanes|=r,o=a.alternate,o!==null&&(o.lanes|=r),Hy(a,r,t),a=i.sibling}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===t){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}Ht(e,t,s.children,r),t=t.child}return t;case 9:return s=t.type,n=t.pendingProps.children,ma(t,r),s=Rr(s),n=n(s),t.flags|=1,Ht(e,t,n,r),t.child;case 14:return n=t.type,s=Vr(n,t.pendingProps),s=Vr(n.type,s),jw(e,t,n,s,r);case 15:return pP(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:Vr(n,s),ru(e,t),t.tag=1,nr(n)?(e=!0,Su(t)):e=!1,ma(t,r),dP(t,n,s),Gy(t,n,s,r),Xy(null,t,n,!0,e,r);case 19:return vP(e,t,r);case 22:return mP(e,t,r)}throw Error(W(156,t.tag))};function IP(e,t){return lT(e,t)}function dI(e,t,r,n){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=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Er(e,t,r,n){return new dI(e,t,r,n)}function Yv(e){return e=e.prototype,!(!e||!e.isReactComponent)}function fI(e){if(typeof e=="function")return Yv(e)?1:0;if(e!=null){if(e=e.$$typeof,e===pv)return 11;if(e===mv)return 14}return 2}function _s(e,t){var r=e.alternate;return r===null?(r=Er(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,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,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function iu(e,t,r,n,s,i){var a=2;if(n=e,typeof e=="function")Yv(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Ki:return ui(r.children,s,i,t);case hv:a=8,s|=8;break;case yy:return e=Er(12,r,t,s|2),e.elementType=yy,e.lanes=i,e;case xy:return e=Er(13,r,t,s),e.elementType=xy,e.lanes=i,e;case vy:return e=Er(19,r,t,s),e.elementType=vy,e.lanes=i,e;case HC:return _d(r,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case BC:a=10;break e;case UC:a=9;break e;case pv:a=11;break e;case mv:a=14;break e;case as:a=16,n=null;break e}throw Error(W(130,e==null?e:typeof e,""))}return t=Er(a,r,t,s),t.elementType=e,t.type=n,t.lanes=i,t}function ui(e,t,r,n){return e=Er(7,e,n,t),e.lanes=r,e}function _d(e,t,r,n){return e=Er(22,e,n,t),e.elementType=HC,e.lanes=r,e.stateNode={isHidden:!1},e}function zf(e,t,r){return e=Er(6,e,null,t),e.lanes=r,e}function Ff(e,t,r){return t=Er(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function hI(e,t,r,n,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=vf(0),this.expirationTimes=vf(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=vf(0),this.identifierPrefix=n,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Xv(e,t,r,n,s,i,a,o,l){return e=new hI(e,t,r,o,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Er(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Av(i),e}function pI(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Gi,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function LP(e){if(!e)return Ts;e=e._reactInternals;e:{if(Ei(e)!==e||e.tag!==1)throw Error(W(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(nr(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(W(171))}if(e.tag===1){var r=e.type;if(nr(r))return LT(e,r,t)}return t}function OP(e,t,r,n,s,i,a,o,l){return e=Xv(r,n,!0,e,s,i,a,o,l),e.context=LP(null),r=e.current,n=Gt(),s=js(r),i=Cn(n,s),i.callback=t??null,ws(r,i,s),e.current.lanes=s,$l(e,s,n),sr(e,n),e}function Sd(e,t,r,n){var s=t.current,i=Gt(),a=js(s);return r=LP(r),t.context===null?t.context=r:t.pendingContext=r,t=Cn(i,a),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=ws(s,t,a),e!==null&&(Kr(e,s,a,i),Jc(e,s,a)),a}function zu(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 Iw(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function Zv(e,t){Iw(e,t),(e=e.alternate)&&Iw(e,t)}function mI(){return null}var zP=typeof reportError=="function"?reportError:function(e){console.error(e)};function Qv(e){this._internalRoot=e}Nd.prototype.render=Qv.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(W(409));Sd(e,t,null,null)};Nd.prototype.unmount=Qv.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;vi(function(){Sd(null,e,null,null)}),t[Rn]=null}};function Nd(e){this._internalRoot=e}Nd.prototype.unstable_scheduleHydration=function(e){if(e){var t=mT();e={blockedOn:null,target:e,priority:t};for(var r=0;r<us.length&&t!==0&&t<us[r].priority;r++);us.splice(r,0,e),r===0&&yT(e)}};function Jv(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Ed(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Lw(){}function gI(e,t,r,n,s){if(s){if(typeof n=="function"){var i=n;n=function(){var d=zu(a);i.call(d)}}var a=OP(t,n,e,0,null,!1,!1,"",Lw);return e._reactRootContainer=a,e[Rn]=a.current,cl(e.nodeType===8?e.parentNode:e),vi(),a}for(;s=e.lastChild;)e.removeChild(s);if(typeof n=="function"){var o=n;n=function(){var d=zu(l);o.call(d)}}var l=Xv(e,0,!1,null,null,!1,!1,"",Lw);return e._reactRootContainer=l,e[Rn]=l.current,cl(e.nodeType===8?e.parentNode:e),vi(function(){Sd(t,l,r,n)}),l}function Cd(e,t,r,n,s){var i=r._reactRootContainer;if(i){var a=i;if(typeof s=="function"){var o=s;s=function(){var l=zu(a);o.call(l)}}Sd(t,a,e,s)}else a=gI(r,t,e,s,n);return zu(a)}hT=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=No(t.pendingLanes);r!==0&&(xv(t,r|1),sr(t,dt()),!(Ee&6)&&(Pa=dt()+500,zs()))}break;case 13:vi(function(){var n=An(e,1);if(n!==null){var s=Gt();Kr(n,e,1,s)}}),Zv(e,1)}};vv=function(e){if(e.tag===13){var t=An(e,134217728);if(t!==null){var r=Gt();Kr(t,e,134217728,r)}Zv(e,134217728)}};pT=function(e){if(e.tag===13){var t=js(e),r=An(e,t);if(r!==null){var n=Gt();Kr(r,e,t,n)}Zv(e,t)}};mT=function(){return Re};gT=function(e,t){var r=Re;try{return Re=e,t()}finally{Re=r}};Ty=function(e,t,r){switch(t){case"input":if(ky(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var s=xd(n);if(!s)throw Error(W(90));GC(n),ky(n,s)}}}break;case"textarea":YC(e,r);break;case"select":t=r.value,t!=null&&da(e,!!r.multiple,t,!1)}};rT=Wv;nT=vi;var yI={usingClientEntryPoint:!1,Events:[ql,Qi,xd,eT,tT,Wv]},lo={findFiberByHostInstance:ei,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},xI={bundleType:lo.bundleType,version:lo.version,rendererPackageName:lo.rendererPackageName,rendererConfig:lo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Vn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=aT(e),e===null?null:e.stateNode},findFiberByHostInstance:lo.findFiberByHostInstance||mI,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 Nc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Nc.isDisabled&&Nc.supportsFiber)try{pd=Nc.inject(xI),ln=Nc}catch{}}mr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=yI;mr.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Jv(t))throw Error(W(200));return pI(e,t,null,r)};mr.createRoot=function(e,t){if(!Jv(e))throw Error(W(299));var r=!1,n="",s=zP;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=Xv(e,1,!1,null,null,r,!1,n,s),e[Rn]=t.current,cl(e.nodeType===8?e.parentNode:e),new Qv(t)};mr.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(W(188)):(e=Object.keys(e).join(","),Error(W(268,e)));return e=aT(t),e=e===null?null:e.stateNode,e};mr.flushSync=function(e){return vi(e)};mr.hydrate=function(e,t,r){if(!Ed(t))throw Error(W(200));return Cd(null,e,t,!0,r)};mr.hydrateRoot=function(e,t,r){if(!Jv(e))throw Error(W(405));var n=r!=null&&r.hydratedSources||null,s=!1,i="",a=zP;if(r!=null&&(r.unstable_strictMode===!0&&(s=!0),r.identifierPrefix!==void 0&&(i=r.identifierPrefix),r.onRecoverableError!==void 0&&(a=r.onRecoverableError)),t=OP(t,null,e,1,r??null,s,!1,i,a),e[Rn]=t.current,cl(e),n)for(e=0;e<n.length;e++)r=n[e],s=r._getVersion,s=s(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,s]:t.mutableSourceEagerHydrationData.push(r,s);return new Nd(t)};mr.render=function(e,t,r){if(!Ed(t))throw Error(W(200));return Cd(null,e,t,!1,r)};mr.unmountComponentAtNode=function(e){if(!Ed(e))throw Error(W(40));return e._reactRootContainer?(vi(function(){Cd(null,null,e,!1,function(){e._reactRootContainer=null,e[Rn]=null})}),!0):!1};mr.unstable_batchedUpdates=Wv;mr.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!Ed(r))throw Error(W(200));if(e==null||e._reactInternals===void 0)throw Error(W(38));return Cd(e,t,r,!1,n)};mr.version="18.3.1-next-f1338f8080-20240426";function FP(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(FP)}catch(e){console.error(e)}}FP(),FC.exports=mr;var eb=FC.exports;const vI=fd(eb),bI=EC({__proto__:null,default:vI},[eb]);var Ow=eb;my.createRoot=Ow.createRoot,my.hydrateRoot=Ow.hydrateRoot;/**
|
|
41
|
-
* @remix-run/router v1.23.1
|
|
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 We(){return We=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},We.apply(this,arguments)}var ht;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(ht||(ht={}));const zw="popstate";function wI(e){e===void 0&&(e={});function t(n,s){let{pathname:i,search:a,hash:o}=n.location;return xl("",{pathname:i,search:a,hash:o},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function r(n,s){return typeof s=="string"?s:wi(s)}return jI(t,r,null,e)}function xe(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function bi(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function kI(){return Math.random().toString(36).substr(2,8)}function Fw(e,t){return{usr:e.state,key:e.key,idx:t}}function xl(e,t,r,n){return r===void 0&&(r=null),We({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Fs(t):t,{state:r,key:t&&t.key||n||kI()})}function wi(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function Fs(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function jI(e,t,r,n){n===void 0&&(n={});let{window:s=document.defaultView,v5Compat:i=!1}=n,a=s.history,o=ht.Pop,l=null,d=u();d==null&&(d=0,a.replaceState(We({},a.state,{idx:d}),""));function u(){return(a.state||{idx:null}).idx}function f(){o=ht.Pop;let b=u(),x=b==null?null:b-d;d=b,l&&l({action:o,location:g.location,delta:x})}function h(b,x){o=ht.Push;let y=xl(g.location,b,x);d=u()+1;let v=Fw(y,d),w=g.createHref(y);try{a.pushState(v,"",w)}catch(_){if(_ instanceof DOMException&&_.name==="DataCloneError")throw _;s.location.assign(w)}i&&l&&l({action:o,location:g.location,delta:1})}function p(b,x){o=ht.Replace;let y=xl(g.location,b,x);d=u();let v=Fw(y,d),w=g.createHref(y);a.replaceState(v,"",w),i&&l&&l({action:o,location:g.location,delta:0})}function m(b){let x=s.location.origin!=="null"?s.location.origin:s.location.href,y=typeof b=="string"?b:wi(b);return y=y.replace(/ $/,"%20"),xe(x,"No window.location.(origin|href) available to create URL for href: "+y),new URL(y,x)}let g={get action(){return o},get location(){return e(s,a)},listen(b){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(zw,f),l=b,()=>{s.removeEventListener(zw,f),l=null}},createHref(b){return t(s,b)},createURL:m,encodeLocation(b){let x=m(b);return{pathname:x.pathname,search:x.search,hash:x.hash}},push:h,replace:p,go(b){return a.go(b)}};return g}var Pe;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Pe||(Pe={}));const _I=new Set(["lazy","caseSensitive","path","id","index","children"]);function SI(e){return e.index===!0}function Fu(e,t,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),e.map((s,i)=>{let a=[...r,String(i)],o=typeof s.id=="string"?s.id:a.join("-");if(xe(s.index!==!0||!s.children,"Cannot specify children on an index route"),xe(!n[o],'Found a route id collision on id "'+o+`". Route id's must be globally unique within Data Router usages`),SI(s)){let l=We({},s,t(s),{id:o});return n[o]=l,l}else{let l=We({},s,t(s),{id:o,children:void 0});return n[o]=l,s.children&&(l.children=Fu(s.children,t,a,n)),l}})}function Qs(e,t,r){return r===void 0&&(r="/"),au(e,t,r,!1)}function au(e,t,r,n){let s=typeof t=="string"?Fs(t):t,i=In(s.pathname||"/",r);if(i==null)return null;let a=$P(e);EI(a);let o=null;for(let l=0;o==null&&l<a.length;++l){let d=zI(i);o=LI(a[l],d,n)}return o}function NI(e,t){let{route:r,pathname:n,params:s}=e;return{id:r.id,pathname:n,params:s,data:t[r.id],handle:r.handle}}function $P(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let s=(i,a,o)=>{let l={relativePath:o===void 0?i.path||"":o,caseSensitive:i.caseSensitive===!0,childrenIndex:a,route:i};l.relativePath.startsWith("/")&&(xe(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let d=Tn([n,l.relativePath]),u=r.concat(l);i.children&&i.children.length>0&&(xe(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+d+'".')),$P(i.children,t,u,d)),!(i.path==null&&!i.index)&&t.push({path:d,score:DI(d,i.index),routesMeta:u})};return e.forEach((i,a)=>{var o;if(i.path===""||!((o=i.path)!=null&&o.includes("?")))s(i,a);else for(let l of VP(i.path))s(i,a,l)}),t}function VP(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,s=r.endsWith("?"),i=r.replace(/\?$/,"");if(n.length===0)return s?[i,""]:[i];let a=VP(n.join("/")),o=[];return o.push(...a.map(l=>l===""?i:[i,l].join("/"))),s&&o.push(...a),o.map(l=>e.startsWith("/")&&l===""?"/":l)}function EI(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:II(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const CI=/^:[\w-]+$/,TI=3,PI=2,MI=1,RI=10,AI=-2,$w=e=>e==="*";function DI(e,t){let r=e.split("/"),n=r.length;return r.some($w)&&(n+=AI),t&&(n+=PI),r.filter(s=>!$w(s)).reduce((s,i)=>s+(CI.test(i)?TI:i===""?MI:RI),n)}function II(e,t){return e.length===t.length&&e.slice(0,-1).every((n,s)=>n===t[s])?e[e.length-1]-t[t.length-1]:0}function LI(e,t,r){r===void 0&&(r=!1);let{routesMeta:n}=e,s={},i="/",a=[];for(let o=0;o<n.length;++o){let l=n[o],d=o===n.length-1,u=i==="/"?t:t.slice(i.length)||"/",f=$u({path:l.relativePath,caseSensitive:l.caseSensitive,end:d},u),h=l.route;if(!f&&d&&r&&!n[n.length-1].route.index&&(f=$u({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},u)),!f)return null;Object.assign(s,f.params),a.push({params:s,pathname:Tn([i,f.pathname]),pathnameBase:qI(Tn([i,f.pathnameBase])),route:h}),f.pathnameBase!=="/"&&(i=Tn([i,f.pathnameBase]))}return a}function $u(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=OI(e.path,e.caseSensitive,e.end),s=t.match(r);if(!s)return null;let i=s[0],a=i.replace(/(.)\/+$/,"$1"),o=s.slice(1);return{params:n.reduce((d,u,f)=>{let{paramName:h,isOptional:p}=u;if(h==="*"){let g=o[f]||"";a=i.slice(0,i.length-g.length).replace(/(.)\/+$/,"$1")}const m=o[f];return p&&!m?d[h]=void 0:d[h]=(m||"").replace(/%2F/g,"/"),d},{}),pathname:i,pathnameBase:a,pattern:e}}function OI(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),bi(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 n=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,o,l)=>(n.push({paramName:o,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),n]}function zI(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return bi(!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 ("+t+").")),e}}function In(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}const FI=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,$I=e=>FI.test(e);function VI(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:s=""}=typeof e=="string"?Fs(e):e,i;if(r)if($I(r))i=r;else{if(r.includes("//")){let a=r;r=r.replace(/\/\/+/g,"/"),bi(!1,"Pathnames cannot have embedded double slashes - normalizing "+(a+" -> "+r))}r.startsWith("/")?i=Vw(r.substring(1),"/"):i=Vw(r,t)}else i=t;return{pathname:i,search:BI(n),hash:UI(s)}}function Vw(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?r.length>1&&r.pop():s!=="."&&r.push(s)}),r.length>1?r.join("/"):"/"}function $f(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. 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 qP(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function tb(e,t){let r=qP(e);return t?r.map((n,s)=>s===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function rb(e,t,r,n){n===void 0&&(n=!1);let s;typeof e=="string"?s=Fs(e):(s=We({},e),xe(!s.pathname||!s.pathname.includes("?"),$f("?","pathname","search",s)),xe(!s.pathname||!s.pathname.includes("#"),$f("#","pathname","hash",s)),xe(!s.search||!s.search.includes("#"),$f("#","search","hash",s)));let i=e===""||s.pathname==="",a=i?"/":s.pathname,o;if(a==null)o=r;else{let f=t.length-1;if(!n&&a.startsWith("..")){let h=a.split("/");for(;h[0]==="..";)h.shift(),f-=1;s.pathname=h.join("/")}o=f>=0?t[f]:"/"}let l=VI(s,o),d=a&&a!=="/"&&a.endsWith("/"),u=(i||a===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(d||u)&&(l.pathname+="/"),l}const Tn=e=>e.join("/").replace(/\/\/+/g,"/"),qI=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),BI=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,UI=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class Vu{constructor(t,r,n,s){s===void 0&&(s=!1),this.status=t,this.statusText=r||"",this.internal=s,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function vl(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const BP=["post","put","patch","delete"],HI=new Set(BP),WI=["get",...BP],GI=new Set(WI),KI=new Set([301,302,303,307,308]),YI=new Set([307,308]),Vf={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},XI={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},co={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},nb=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ZI=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),UP="remix-router-transitions";function QI(e){const t=e.window?e.window:typeof window<"u"?window:void 0,r=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",n=!r;xe(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let s;if(e.mapRouteProperties)s=e.mapRouteProperties;else if(e.detectErrorBoundary){let R=e.detectErrorBoundary;s=L=>({hasErrorBoundary:R(L)})}else s=ZI;let i={},a=Fu(e.routes,s,void 0,i),o,l=e.basename||"/",d=e.dataStrategy||rL,u=e.patchRoutesOnNavigation,f=We({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),h=null,p=new Set,m=null,g=null,b=null,x=e.hydrationData!=null,y=Qs(a,e.history.location,l),v=!1,w=null;if(y==null&&!u){let R=Zt(404,{pathname:e.history.location.pathname}),{matches:L,route:$}=Qw(a);y=L,w={[$.id]:R}}y&&!e.hydrationData&&Ii(y,a,e.history.location.pathname).active&&(y=null);let _;if(y)if(y.some(R=>R.route.lazy))_=!1;else if(!y.some(R=>R.route.loader))_=!0;else if(f.v7_partialHydration){let R=e.hydrationData?e.hydrationData.loaderData:null,L=e.hydrationData?e.hydrationData.errors:null;if(L){let $=y.findIndex(H=>L[H.route.id]!==void 0);_=y.slice(0,$+1).every(H=>!cx(H.route,R,L))}else _=y.every($=>!cx($.route,R,L))}else _=e.hydrationData!=null;else if(_=!1,y=[],f.v7_partialHydration){let R=Ii(null,a,e.history.location.pathname);R.active&&R.matches&&(v=!0,y=R.matches)}let N,j={historyAction:e.history.action,location:e.history.location,matches:y,initialized:_,navigation:Vf,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||w,fetchers:new Map,blockers:new Map},E=ht.Pop,M=!1,C,D=!1,F=new Map,T=null,S=!1,O=!1,I=[],V=new Set,A=new Map,P=0,z=-1,q=new Map,U=new Set,K=new Map,G=new Map,X=new Set,ie=new Map,le=new Map,we;function _e(){if(h=e.history.listen(R=>{let{action:L,location:$,delta:H}=R;if(we){we(),we=void 0;return}bi(le.size===0||H!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let Y=Kn({currentLocation:j.location,nextLocation:$,historyAction:L});if(Y&&H!=null){let oe=new Promise(ue=>{we=ue});e.history.go(H*-1),Gn(Y,{state:"blocked",location:$,proceed(){Gn(Y,{state:"proceeding",proceed:void 0,reset:void 0,location:$}),oe.then(()=>e.history.go(H))},reset(){let ue=new Map(j.blockers);ue.set(Y,co),ve({blockers:ue})}});return}return De(L,$)}),r){gL(t,F);let R=()=>yL(t,F);t.addEventListener("pagehide",R),T=()=>t.removeEventListener("pagehide",R)}return j.initialized||De(ht.Pop,j.location,{initialHydration:!0}),N}function ke(){h&&h(),T&&T(),p.clear(),C&&C.abort(),j.fetchers.forEach((R,L)=>Qe(L)),j.blockers.forEach((R,L)=>Wn(L))}function lt(R){return p.add(R),()=>p.delete(R)}function ve(R,L){L===void 0&&(L={}),j=We({},j,R);let $=[],H=[];f.v7_fetcherPersist&&j.fetchers.forEach((Y,oe)=>{Y.state==="idle"&&(X.has(oe)?H.push(oe):$.push(oe))}),X.forEach(Y=>{!j.fetchers.has(Y)&&!A.has(Y)&&H.push(Y)}),[...p].forEach(Y=>Y(j,{deletedFetchers:H,viewTransitionOpts:L.viewTransitionOpts,flushSync:L.flushSync===!0})),f.v7_fetcherPersist?($.forEach(Y=>j.fetchers.delete(Y)),H.forEach(Y=>Qe(Y))):H.forEach(Y=>X.delete(Y))}function Be(R,L,$){var H,Y;let{flushSync:oe}=$===void 0?{}:$,ue=j.actionData!=null&&j.navigation.formMethod!=null&&Br(j.navigation.formMethod)&&j.navigation.state==="loading"&&((H=R.state)==null?void 0:H._isRedirect)!==!0,ee;L.actionData?Object.keys(L.actionData).length>0?ee=L.actionData:ee=null:ue?ee=j.actionData:ee=null;let re=L.loaderData?Xw(j.loaderData,L.loaderData,L.matches||[],L.errors):j.loaderData,Z=j.blockers;Z.size>0&&(Z=new Map(Z),Z.forEach((je,vt)=>Z.set(vt,co)));let se=M===!0||j.navigation.formMethod!=null&&Br(j.navigation.formMethod)&&((Y=R.state)==null?void 0:Y._isRedirect)!==!0;o&&(a=o,o=void 0),S||E===ht.Pop||(E===ht.Push?e.history.push(R,R.state):E===ht.Replace&&e.history.replace(R,R.state));let he;if(E===ht.Pop){let je=F.get(j.location.pathname);je&&je.has(R.pathname)?he={currentLocation:j.location,nextLocation:R}:F.has(R.pathname)&&(he={currentLocation:R,nextLocation:j.location})}else if(D){let je=F.get(j.location.pathname);je?je.add(R.pathname):(je=new Set([R.pathname]),F.set(j.location.pathname,je)),he={currentLocation:j.location,nextLocation:R}}ve(We({},L,{actionData:ee,loaderData:re,historyAction:E,location:R,initialized:!0,navigation:Vf,revalidation:"idle",restoreScrollPosition:lc(R,L.matches||j.matches),preventScrollReset:se,blockers:Z}),{viewTransitionOpts:he,flushSync:oe===!0}),E=ht.Pop,M=!1,D=!1,S=!1,O=!1,I=[]}async function ct(R,L){if(typeof R=="number"){e.history.go(R);return}let $=lx(j.location,j.matches,l,f.v7_prependBasename,R,f.v7_relativeSplatPath,L==null?void 0:L.fromRouteId,L==null?void 0:L.relative),{path:H,submission:Y,error:oe}=qw(f.v7_normalizeFormMethod,!1,$,L),ue=j.location,ee=xl(j.location,H,L&&L.state);ee=We({},ee,e.history.encodeLocation(ee));let re=L&&L.replace!=null?L.replace:void 0,Z=ht.Push;re===!0?Z=ht.Replace:re===!1||Y!=null&&Br(Y.formMethod)&&Y.formAction===j.location.pathname+j.location.search&&(Z=ht.Replace);let se=L&&"preventScrollReset"in L?L.preventScrollReset===!0:void 0,he=(L&&L.flushSync)===!0,je=Kn({currentLocation:ue,nextLocation:ee,historyAction:Z});if(je){Gn(je,{state:"blocked",location:ee,proceed(){Gn(je,{state:"proceeding",proceed:void 0,reset:void 0,location:ee}),ct(R,L)},reset(){let vt=new Map(j.blockers);vt.set(je,co),ve({blockers:vt})}});return}return await De(Z,ee,{submission:Y,pendingError:oe,preventScrollReset:se,replace:L&&L.replace,enableViewTransition:L&&L.viewTransition,flushSync:he})}function ce(){if(Xt(),ve({revalidation:"loading"}),j.navigation.state!=="submitting"){if(j.navigation.state==="idle"){De(j.historyAction,j.location,{startUninterruptedRevalidation:!0});return}De(E||j.historyAction,j.navigation.location,{overrideNavigation:j.navigation,enableViewTransition:D===!0})}}async function De(R,L,$){C&&C.abort(),C=null,E=R,S=($&&$.startUninterruptedRevalidation)===!0,df(j.location,j.matches),M=($&&$.preventScrollReset)===!0,D=($&&$.enableViewTransition)===!0;let H=o||a,Y=$&&$.overrideNavigation,oe=$!=null&&$.initialHydration&&j.matches&&j.matches.length>0&&!v?j.matches:Qs(H,L,l),ue=($&&$.flushSync)===!0;if(oe&&j.initialized&&!O&&lL(j.location,L)&&!($&&$.submission&&Br($.submission.formMethod))){Be(L,{matches:oe},{flushSync:ue});return}let ee=Ii(oe,H,L.pathname);if(ee.active&&ee.matches&&(oe=ee.matches),!oe){let{error:Ae,notFoundMatches:Ne,route:Ue}=Bs(L.pathname);Be(L,{matches:Ne,loaderData:{},errors:{[Ue.id]:Ae}},{flushSync:ue});return}C=new AbortController;let re=$i(e.history,L,C.signal,$&&$.submission),Z;if($&&$.pendingError)Z=[Js(oe).route.id,{type:Pe.error,error:$.pendingError}];else if($&&$.submission&&Br($.submission.formMethod)){let Ae=await ne(re,L,$.submission,oe,ee.active,{replace:$.replace,flushSync:ue});if(Ae.shortCircuited)return;if(Ae.pendingActionResult){let[Ne,Ue]=Ae.pendingActionResult;if(cr(Ue)&&vl(Ue.error)&&Ue.error.status===404){C=null,Be(L,{matches:Ae.matches,loaderData:{},errors:{[Ne]:Ue.error}});return}}oe=Ae.matches||oe,Z=Ae.pendingActionResult,Y=qf(L,$.submission),ue=!1,ee.active=!1,re=$i(e.history,re.url,re.signal)}let{shortCircuited:se,matches:he,loaderData:je,errors:vt}=await te(re,L,oe,ee.active,Y,$&&$.submission,$&&$.fetcherSubmission,$&&$.replace,$&&$.initialHydration===!0,ue,Z);se||(C=null,Be(L,We({matches:he||oe},Zw(Z),{loaderData:je,errors:vt})))}async function ne(R,L,$,H,Y,oe){oe===void 0&&(oe={}),Xt();let ue=pL(L,$);if(ve({navigation:ue},{flushSync:oe.flushSync===!0}),Y){let Z=await Li(H,L.pathname,R.signal);if(Z.type==="aborted")return{shortCircuited:!0};if(Z.type==="error"){let se=Js(Z.partialMatches).route.id;return{matches:Z.partialMatches,pendingActionResult:[se,{type:Pe.error,error:Z.error}]}}else if(Z.matches)H=Z.matches;else{let{notFoundMatches:se,error:he,route:je}=Bs(L.pathname);return{matches:se,pendingActionResult:[je.id,{type:Pe.error,error:he}]}}}let ee,re=Co(H,L);if(!re.route.action&&!re.route.lazy)ee={type:Pe.error,error:Zt(405,{method:R.method,pathname:L.pathname,routeId:re.route.id})};else if(ee=(await Pt("action",j,R,[re],H,null))[re.route.id],R.signal.aborted)return{shortCircuited:!0};if(ni(ee)){let Z;return oe&&oe.replace!=null?Z=oe.replace:Z=Gw(ee.response.headers.get("Location"),new URL(R.url),l)===j.location.pathname+j.location.search,await nt(R,ee,!0,{submission:$,replace:Z}),{shortCircuited:!0}}if(gs(ee))throw Zt(400,{type:"defer-action"});if(cr(ee)){let Z=Js(H,re.route.id);return(oe&&oe.replace)!==!0&&(E=ht.Push),{matches:H,pendingActionResult:[Z.route.id,ee]}}return{matches:H,pendingActionResult:[re.route.id,ee]}}async function te(R,L,$,H,Y,oe,ue,ee,re,Z,se){let he=Y||qf(L,oe),je=oe||ue||e2(he),vt=!S&&(!f.v7_partialHydration||!re);if(H){if(vt){let He=ze(se);ve(We({navigation:he},He!==void 0?{actionData:He}:{}),{flushSync:Z})}let Se=await Li($,L.pathname,R.signal);if(Se.type==="aborted")return{shortCircuited:!0};if(Se.type==="error"){let He=Js(Se.partialMatches).route.id;return{matches:Se.partialMatches,loaderData:{},errors:{[He]:Se.error}}}else if(Se.matches)$=Se.matches;else{let{error:He,notFoundMatches:Zn,route:yn}=Bs(L.pathname);return{matches:Zn,loaderData:{},errors:{[yn.id]:He}}}}let Ae=o||a,[Ne,Ue]=Uw(e.history,j,$,je,L,f.v7_partialHydration&&re===!0,f.v7_skipActionErrorRevalidation,O,I,V,X,K,U,Ae,l,se);if(Di(Se=>!($&&$.some(He=>He.route.id===Se))||Ne&&Ne.some(He=>He.route.id===Se)),z=++P,Ne.length===0&&Ue.length===0){let Se=rn();return Be(L,We({matches:$,loaderData:{},errors:se&&cr(se[1])?{[se[0]]:se[1].error}:null},Zw(se),Se?{fetchers:new Map(j.fetchers)}:{}),{flushSync:Z}),{shortCircuited:!0}}if(vt){let Se={};if(!H){Se.navigation=he;let He=ze(se);He!==void 0&&(Se.actionData=He)}Ue.length>0&&(Se.fetchers=or(Ue)),ve(Se,{flushSync:Z})}Ue.forEach(Se=>{Fe(Se.key),Se.controller&&A.set(Se.key,Se.controller)});let Yn=()=>Ue.forEach(Se=>Fe(Se.key));C&&C.signal.addEventListener("abort",Yn);let{loaderResults:Xn,fetcherResults:zr}=await xr(j,$,Ne,Ue,R);if(R.signal.aborted)return{shortCircuited:!0};C&&C.signal.removeEventListener("abort",Yn),Ue.forEach(Se=>A.delete(Se.key));let wr=Ec(Xn);if(wr)return await nt(R,wr.result,!0,{replace:ee}),{shortCircuited:!0};if(wr=Ec(zr),wr)return U.add(wr.key),await nt(R,wr.result,!0,{replace:ee}),{shortCircuited:!0};let{loaderData:eo,errors:Us}=Yw(j,$,Xn,se,Ue,zr,ie);ie.forEach((Se,He)=>{Se.subscribe(Zn=>{(Zn||Se.done)&&ie.delete(He)})}),f.v7_partialHydration&&re&&j.errors&&(Us=We({},j.errors,Us));let gn=rn(),Oi=vr(z),Hs=gn||Oi||Ue.length>0;return We({matches:$,loaderData:eo,errors:Us},Hs?{fetchers:new Map(j.fetchers)}:{})}function ze(R){if(R&&!cr(R[1]))return{[R[0]]:R[1].data};if(j.actionData)return Object.keys(j.actionData).length===0?null:j.actionData}function or(R){return R.forEach(L=>{let $=j.fetchers.get(L.key),H=uo(void 0,$?$.data:void 0);j.fetchers.set(L.key,H)}),new Map(j.fetchers)}function yr(R,L,$,H){if(n)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");Fe(R);let Y=(H&&H.flushSync)===!0,oe=o||a,ue=lx(j.location,j.matches,l,f.v7_prependBasename,$,f.v7_relativeSplatPath,L,H==null?void 0:H.relative),ee=Qs(oe,ue,l),re=Ii(ee,oe,ue);if(re.active&&re.matches&&(ee=re.matches),!ee){xt(R,L,Zt(404,{pathname:ue}),{flushSync:Y});return}let{path:Z,submission:se,error:he}=qw(f.v7_normalizeFormMethod,!0,ue,H);if(he){xt(R,L,he,{flushSync:Y});return}let je=Co(ee,Z),vt=(H&&H.preventScrollReset)===!0;if(se&&Br(se.formMethod)){Tt(R,L,Z,je,ee,re.active,Y,vt,se);return}K.set(R,{routeId:L,path:Z}),Ze(R,L,Z,je,ee,re.active,Y,vt,se)}async function Tt(R,L,$,H,Y,oe,ue,ee,re){Xt(),K.delete(R);function Z(ft){if(!ft.route.action&&!ft.route.lazy){let zi=Zt(405,{method:re.formMethod,pathname:$,routeId:L});return xt(R,L,zi,{flushSync:ue}),!0}return!1}if(!oe&&Z(H))return;let se=j.fetchers.get(R);st(R,mL(re,se),{flushSync:ue});let he=new AbortController,je=$i(e.history,$,he.signal,re);if(oe){let ft=await Li(Y,new URL(je.url).pathname,je.signal,R);if(ft.type==="aborted")return;if(ft.type==="error"){xt(R,L,ft.error,{flushSync:ue});return}else if(ft.matches){if(Y=ft.matches,H=Co(Y,$),Z(H))return}else{xt(R,L,Zt(404,{pathname:$}),{flushSync:ue});return}}A.set(R,he);let vt=P,Ne=(await Pt("action",j,je,[H],Y,R))[H.route.id];if(je.signal.aborted){A.get(R)===he&&A.delete(R);return}if(f.v7_fetcherPersist&&X.has(R)){if(ni(Ne)||cr(Ne)){st(R,ss(void 0));return}}else{if(ni(Ne))if(A.delete(R),z>vt){st(R,ss(void 0));return}else return U.add(R),st(R,uo(re)),nt(je,Ne,!1,{fetcherSubmission:re,preventScrollReset:ee});if(cr(Ne)){xt(R,L,Ne.error);return}}if(gs(Ne))throw Zt(400,{type:"defer-action"});let Ue=j.navigation.location||j.location,Yn=$i(e.history,Ue,he.signal),Xn=o||a,zr=j.navigation.state!=="idle"?Qs(Xn,j.navigation.location,l):j.matches;xe(zr,"Didn't find any matches after fetcher action");let wr=++P;q.set(R,wr);let eo=uo(re,Ne.data);j.fetchers.set(R,eo);let[Us,gn]=Uw(e.history,j,zr,re,Ue,!1,f.v7_skipActionErrorRevalidation,O,I,V,X,K,U,Xn,l,[H.route.id,Ne]);gn.filter(ft=>ft.key!==R).forEach(ft=>{let zi=ft.key,C1=j.fetchers.get(zi),W3=uo(void 0,C1?C1.data:void 0);j.fetchers.set(zi,W3),Fe(zi),ft.controller&&A.set(zi,ft.controller)}),ve({fetchers:new Map(j.fetchers)});let Oi=()=>gn.forEach(ft=>Fe(ft.key));he.signal.addEventListener("abort",Oi);let{loaderResults:Hs,fetcherResults:Se}=await xr(j,zr,Us,gn,Yn);if(he.signal.aborted)return;he.signal.removeEventListener("abort",Oi),q.delete(R),A.delete(R),gn.forEach(ft=>A.delete(ft.key));let He=Ec(Hs);if(He)return nt(Yn,He.result,!1,{preventScrollReset:ee});if(He=Ec(Se),He)return U.add(He.key),nt(Yn,He.result,!1,{preventScrollReset:ee});let{loaderData:Zn,errors:yn}=Yw(j,zr,Hs,void 0,gn,Se,ie);if(j.fetchers.has(R)){let ft=ss(Ne.data);j.fetchers.set(R,ft)}vr(wr),j.navigation.state==="loading"&&wr>z?(xe(E,"Expected pending action"),C&&C.abort(),Be(j.navigation.location,{matches:zr,loaderData:Zn,errors:yn,fetchers:new Map(j.fetchers)})):(ve({errors:yn,loaderData:Xw(j.loaderData,Zn,zr,yn),fetchers:new Map(j.fetchers)}),O=!1)}async function Ze(R,L,$,H,Y,oe,ue,ee,re){let Z=j.fetchers.get(R);st(R,uo(re,Z?Z.data:void 0),{flushSync:ue});let se=new AbortController,he=$i(e.history,$,se.signal);if(oe){let Ne=await Li(Y,new URL(he.url).pathname,he.signal,R);if(Ne.type==="aborted")return;if(Ne.type==="error"){xt(R,L,Ne.error,{flushSync:ue});return}else if(Ne.matches)Y=Ne.matches,H=Co(Y,$);else{xt(R,L,Zt(404,{pathname:$}),{flushSync:ue});return}}A.set(R,se);let je=P,Ae=(await Pt("loader",j,he,[H],Y,R))[H.route.id];if(gs(Ae)&&(Ae=await sb(Ae,he.signal,!0)||Ae),A.get(R)===se&&A.delete(R),!he.signal.aborted){if(X.has(R)){st(R,ss(void 0));return}if(ni(Ae))if(z>je){st(R,ss(void 0));return}else{U.add(R),await nt(he,Ae,!1,{preventScrollReset:ee});return}if(cr(Ae)){xt(R,L,Ae.error);return}xe(!gs(Ae),"Unhandled fetcher deferred data"),st(R,ss(Ae.data))}}async function nt(R,L,$,H){let{submission:Y,fetcherSubmission:oe,preventScrollReset:ue,replace:ee}=H===void 0?{}:H;L.response.headers.has("X-Remix-Revalidate")&&(O=!0);let re=L.response.headers.get("Location");xe(re,"Expected a Location header on the redirect Response"),re=Gw(re,new URL(R.url),l);let Z=xl(j.location,re,{_isRedirect:!0});if(r){let Ne=!1;if(L.response.headers.has("X-Remix-Reload-Document"))Ne=!0;else if(nb.test(re)){const Ue=e.history.createURL(re);Ne=Ue.origin!==t.location.origin||In(Ue.pathname,l)==null}if(Ne){ee?t.location.replace(re):t.location.assign(re);return}}C=null;let se=ee===!0||L.response.headers.has("X-Remix-Replace")?ht.Replace:ht.Push,{formMethod:he,formAction:je,formEncType:vt}=j.navigation;!Y&&!oe&&he&&je&&vt&&(Y=e2(j.navigation));let Ae=Y||oe;if(YI.has(L.response.status)&&Ae&&Br(Ae.formMethod))await De(se,Z,{submission:We({},Ae,{formAction:re}),preventScrollReset:ue||M,enableViewTransition:$?D:void 0});else{let Ne=qf(Z,Y);await De(se,Z,{overrideNavigation:Ne,fetcherSubmission:oe,preventScrollReset:ue||M,enableViewTransition:$?D:void 0})}}async function Pt(R,L,$,H,Y,oe){let ue,ee={};try{ue=await nL(d,R,L,$,H,Y,oe,i,s)}catch(re){return H.forEach(Z=>{ee[Z.route.id]={type:Pe.error,error:re}}),ee}for(let[re,Z]of Object.entries(ue))if(cL(Z)){let se=Z.result;ee[re]={type:Pe.redirect,response:aL(se,$,re,Y,l,f.v7_relativeSplatPath)}}else ee[re]=await iL(Z);return ee}async function xr(R,L,$,H,Y){let oe=R.matches,ue=Pt("loader",R,Y,$,L,null),ee=Promise.all(H.map(async se=>{if(se.matches&&se.match&&se.controller){let je=(await Pt("loader",R,$i(e.history,se.path,se.controller.signal),[se.match],se.matches,se.key))[se.match.route.id];return{[se.key]:je}}else return Promise.resolve({[se.key]:{type:Pe.error,error:Zt(404,{pathname:se.path})}})})),re=await ue,Z=(await ee).reduce((se,he)=>Object.assign(se,he),{});return await Promise.all([fL(L,re,Y.signal,oe,R.loaderData),hL(L,Z,H)]),{loaderResults:re,fetcherResults:Z}}function Xt(){O=!0,I.push(...Di()),K.forEach((R,L)=>{A.has(L)&&V.add(L),Fe(L)})}function st(R,L,$){$===void 0&&($={}),j.fetchers.set(R,L),ve({fetchers:new Map(j.fetchers)},{flushSync:($&&$.flushSync)===!0})}function xt(R,L,$,H){H===void 0&&(H={});let Y=Js(j.matches,L);Qe(R),ve({errors:{[Y.route.id]:$},fetchers:new Map(j.fetchers)},{flushSync:(H&&H.flushSync)===!0})}function Or(R){return G.set(R,(G.get(R)||0)+1),X.has(R)&&X.delete(R),j.fetchers.get(R)||XI}function Qe(R){let L=j.fetchers.get(R);A.has(R)&&!(L&&L.state==="loading"&&q.has(R))&&Fe(R),K.delete(R),q.delete(R),U.delete(R),f.v7_fetcherPersist&&X.delete(R),V.delete(R),j.fetchers.delete(R)}function zt(R){let L=(G.get(R)||0)-1;L<=0?(G.delete(R),X.add(R),f.v7_fetcherPersist||Qe(R)):G.set(R,L),ve({fetchers:new Map(j.fetchers)})}function Fe(R){let L=A.get(R);L&&(L.abort(),A.delete(R))}function jt(R){for(let L of R){let $=Or(L),H=ss($.data);j.fetchers.set(L,H)}}function rn(){let R=[],L=!1;for(let $ of U){let H=j.fetchers.get($);xe(H,"Expected fetcher: "+$),H.state==="loading"&&(U.delete($),R.push($),L=!0)}return jt(R),L}function vr(R){let L=[];for(let[$,H]of q)if(H<R){let Y=j.fetchers.get($);xe(Y,"Expected fetcher: "+$),Y.state==="loading"&&(Fe($),q.delete($),L.push($))}return jt(L),L.length>0}function br(R,L){let $=j.blockers.get(R)||co;return le.get(R)!==L&&le.set(R,L),$}function Wn(R){j.blockers.delete(R),le.delete(R)}function Gn(R,L){let $=j.blockers.get(R)||co;xe($.state==="unblocked"&&L.state==="blocked"||$.state==="blocked"&&L.state==="blocked"||$.state==="blocked"&&L.state==="proceeding"||$.state==="blocked"&&L.state==="unblocked"||$.state==="proceeding"&&L.state==="unblocked","Invalid blocker state transition: "+$.state+" -> "+L.state);let H=new Map(j.blockers);H.set(R,L),ve({blockers:H})}function Kn(R){let{currentLocation:L,nextLocation:$,historyAction:H}=R;if(le.size===0)return;le.size>1&&bi(!1,"A router only supports one blocker at a time");let Y=Array.from(le.entries()),[oe,ue]=Y[Y.length-1],ee=j.blockers.get(oe);if(!(ee&&ee.state==="proceeding")&&ue({currentLocation:L,nextLocation:$,historyAction:H}))return oe}function Bs(R){let L=Zt(404,{pathname:R}),$=o||a,{matches:H,route:Y}=Qw($);return Di(),{notFoundMatches:H,route:Y,error:L}}function Di(R){let L=[];return ie.forEach(($,H)=>{(!R||R(H))&&($.cancel(),L.push(H),ie.delete(H))}),L}function mn(R,L,$){if(m=R,b=L,g=$||null,!x&&j.navigation===Vf){x=!0;let H=lc(j.location,j.matches);H!=null&&ve({restoreScrollPosition:H})}return()=>{m=null,b=null,g=null}}function oc(R,L){return g&&g(R,L.map(H=>NI(H,j.loaderData)))||R.key}function df(R,L){if(m&&b){let $=oc(R,L);m[$]=b()}}function lc(R,L){if(m){let $=oc(R,L),H=m[$];if(typeof H=="number")return H}return null}function Ii(R,L,$){if(u)if(R){if(Object.keys(R[0].params).length>0)return{active:!0,matches:au(L,$,l,!0)}}else return{active:!0,matches:au(L,$,l,!0)||[]};return{active:!1,matches:null}}async function Li(R,L,$,H){if(!u)return{type:"success",matches:R};let Y=R;for(;;){let oe=o==null,ue=o||a,ee=i;try{await u({signal:$,path:L,matches:Y,fetcherKey:H,patch:(se,he)=>{$.aborted||Ww(se,he,ue,ee,s)}})}catch(se){return{type:"error",error:se,partialMatches:Y}}finally{oe&&!$.aborted&&(a=[...a])}if($.aborted)return{type:"aborted"};let re=Qs(ue,L,l);if(re)return{type:"success",matches:re};let Z=au(ue,L,l,!0);if(!Z||Y.length===Z.length&&Y.every((se,he)=>se.route.id===Z[he].route.id))return{type:"success",matches:null};Y=Z}}function ff(R){i={},o=Fu(R,s,void 0,i)}function hf(R,L){let $=o==null;Ww(R,L,o||a,i,s),$&&(a=[...a],ve({}))}return N={get basename(){return l},get future(){return f},get state(){return j},get routes(){return a},get window(){return t},initialize:_e,subscribe:lt,enableScrollRestoration:mn,navigate:ct,fetch:yr,revalidate:ce,createHref:R=>e.history.createHref(R),encodeLocation:R=>e.history.encodeLocation(R),getFetcher:Or,deleteFetcher:zt,dispose:ke,getBlocker:br,deleteBlocker:Wn,patchRoutes:hf,_internalFetchControllers:A,_internalActiveDeferreds:ie,_internalSetRoutes:ff},N}function JI(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function lx(e,t,r,n,s,i,a,o){let l,d;if(a){l=[];for(let f of t)if(l.push(f),f.route.id===a){d=f;break}}else l=t,d=t[t.length-1];let u=rb(s||".",tb(l,i),In(e.pathname,r)||e.pathname,o==="path");if(s==null&&(u.search=e.search,u.hash=e.hash),(s==null||s===""||s===".")&&d){let f=ib(u.search);if(d.route.index&&!f)u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index";else if(!d.route.index&&f){let h=new URLSearchParams(u.search),p=h.getAll("index");h.delete("index"),p.filter(g=>g).forEach(g=>h.append("index",g));let m=h.toString();u.search=m?"?"+m:""}}return n&&r!=="/"&&(u.pathname=u.pathname==="/"?r:Tn([r,u.pathname])),wi(u)}function qw(e,t,r,n){if(!n||!JI(n))return{path:r};if(n.formMethod&&!dL(n.formMethod))return{path:r,error:Zt(405,{method:n.formMethod})};let s=()=>({path:r,error:Zt(400,{type:"invalid-body"})}),i=n.formMethod||"get",a=e?i.toUpperCase():i.toLowerCase(),o=GP(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!Br(a))return s();let h=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((p,m)=>{let[g,b]=m;return""+p+g+"="+b+`
|
|
50
|
-
`},""):String(n.body);return{path:r,submission:{formMethod:a,formAction:o,formEncType:n.formEncType,formData:void 0,json:void 0,text:h}}}else if(n.formEncType==="application/json"){if(!Br(a))return s();try{let h=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:a,formAction:o,formEncType:n.formEncType,formData:void 0,json:h,text:void 0}}}catch{return s()}}}xe(typeof FormData=="function","FormData is not available in this environment");let l,d;if(n.formData)l=ux(n.formData),d=n.formData;else if(n.body instanceof FormData)l=ux(n.body),d=n.body;else if(n.body instanceof URLSearchParams)l=n.body,d=Kw(l);else if(n.body==null)l=new URLSearchParams,d=new FormData;else try{l=new URLSearchParams(n.body),d=Kw(l)}catch{return s()}let u={formMethod:a,formAction:o,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:d,json:void 0,text:void 0};if(Br(u.formMethod))return{path:r,submission:u};let f=Fs(r);return t&&f.search&&ib(f.search)&&l.append("index",""),f.search="?"+l,{path:wi(f),submission:u}}function Bw(e,t,r){r===void 0&&(r=!1);let n=e.findIndex(s=>s.route.id===t);return n>=0?e.slice(0,r?n+1:n):e}function Uw(e,t,r,n,s,i,a,o,l,d,u,f,h,p,m,g){let b=g?cr(g[1])?g[1].error:g[1].data:void 0,x=e.createURL(t.location),y=e.createURL(s),v=r;i&&t.errors?v=Bw(r,Object.keys(t.errors)[0],!0):g&&cr(g[1])&&(v=Bw(r,g[0]));let w=g?g[1].statusCode:void 0,_=a&&w&&w>=400,N=v.filter((E,M)=>{let{route:C}=E;if(C.lazy)return!0;if(C.loader==null)return!1;if(i)return cx(C,t.loaderData,t.errors);if(eL(t.loaderData,t.matches[M],E)||l.some(T=>T===E.route.id))return!0;let D=t.matches[M],F=E;return Hw(E,We({currentUrl:x,currentParams:D.params,nextUrl:y,nextParams:F.params},n,{actionResult:b,actionStatus:w,defaultShouldRevalidate:_?!1:o||x.pathname+x.search===y.pathname+y.search||x.search!==y.search||HP(D,F)}))}),j=[];return f.forEach((E,M)=>{if(i||!r.some(S=>S.route.id===E.routeId)||u.has(M))return;let C=Qs(p,E.path,m);if(!C){j.push({key:M,routeId:E.routeId,path:E.path,matches:null,match:null,controller:null});return}let D=t.fetchers.get(M),F=Co(C,E.path),T=!1;h.has(M)?T=!1:d.has(M)?(d.delete(M),T=!0):D&&D.state!=="idle"&&D.data===void 0?T=o:T=Hw(F,We({currentUrl:x,currentParams:t.matches[t.matches.length-1].params,nextUrl:y,nextParams:r[r.length-1].params},n,{actionResult:b,actionStatus:w,defaultShouldRevalidate:_?!1:o})),T&&j.push({key:M,routeId:E.routeId,path:E.path,matches:C,match:F,controller:new AbortController})}),[N,j]}function cx(e,t,r){if(e.lazy)return!0;if(!e.loader)return!1;let n=t!=null&&t[e.id]!==void 0,s=r!=null&&r[e.id]!==void 0;return!n&&s?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!n&&!s}function eL(e,t,r){let n=!t||r.route.id!==t.route.id,s=e[r.route.id]===void 0;return n||s}function HP(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function Hw(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}function Ww(e,t,r,n,s){var i;let a;if(e){let d=n[e];xe(d,"No route found to patch children into: routeId = "+e),d.children||(d.children=[]),a=d.children}else a=r;let o=t.filter(d=>!a.some(u=>WP(d,u))),l=Fu(o,s,[e||"_","patch",String(((i=a)==null?void 0:i.length)||"0")],n);a.push(...l)}function WP(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children.every((r,n)=>{var s;return(s=t.children)==null?void 0:s.some(i=>WP(r,i))}):!1}async function tL(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let s=r[e.id];xe(s,"No route found in manifest");let i={};for(let a in n){let l=s[a]!==void 0&&a!=="hasErrorBoundary";bi(!l,'Route "'+s.id+'" has a static property "'+a+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+a+'" will be ignored.')),!l&&!_I.has(a)&&(i[a]=n[a])}Object.assign(s,i),Object.assign(s,We({},t(s),{lazy:void 0}))}async function rL(e){let{matches:t}=e,r=t.filter(s=>s.shouldLoad);return(await Promise.all(r.map(s=>s.resolve()))).reduce((s,i,a)=>Object.assign(s,{[r[a].route.id]:i}),{})}async function nL(e,t,r,n,s,i,a,o,l,d){let u=i.map(p=>p.route.lazy?tL(p.route,l,o):void 0),f=i.map((p,m)=>{let g=u[m],b=s.some(y=>y.route.id===p.route.id);return We({},p,{shouldLoad:b,resolve:async y=>(y&&n.method==="GET"&&(p.route.lazy||p.route.loader)&&(b=!0),b?sL(t,n,p,g,y,d):Promise.resolve({type:Pe.data,result:void 0}))})}),h=await e({matches:f,request:n,params:i[0].params,fetcherKey:a,context:d});try{await Promise.all(u)}catch{}return h}async function sL(e,t,r,n,s,i){let a,o,l=d=>{let u,f=new Promise((m,g)=>u=g);o=()=>u(),t.signal.addEventListener("abort",o);let h=m=>typeof d!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+r.route.id+"]"))):d({request:t,params:r.params,context:i},...m!==void 0?[m]:[]),p=(async()=>{try{return{type:"data",result:await(s?s(g=>h(g)):h())}}catch(m){return{type:"error",result:m}}})();return Promise.race([p,f])};try{let d=r.route[e];if(n)if(d){let u,[f]=await Promise.all([l(d).catch(h=>{u=h}),n]);if(u!==void 0)throw u;a=f}else if(await n,d=r.route[e],d)a=await l(d);else if(e==="action"){let u=new URL(t.url),f=u.pathname+u.search;throw Zt(405,{method:t.method,pathname:f,routeId:r.route.id})}else return{type:Pe.data,result:void 0};else if(d)a=await l(d);else{let u=new URL(t.url),f=u.pathname+u.search;throw Zt(404,{pathname:f})}xe(a.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+r.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(d){return{type:Pe.error,result:d}}finally{o&&t.signal.removeEventListener("abort",o)}return a}async function iL(e){let{result:t,type:r}=e;if(KP(t)){let f;try{let h=t.headers.get("Content-Type");h&&/\bapplication\/json\b/.test(h)?t.body==null?f=null:f=await t.json():f=await t.text()}catch(h){return{type:Pe.error,error:h}}return r===Pe.error?{type:Pe.error,error:new Vu(t.status,t.statusText,f),statusCode:t.status,headers:t.headers}:{type:Pe.data,data:f,statusCode:t.status,headers:t.headers}}if(r===Pe.error){if(Jw(t)){var n,s;if(t.data instanceof Error){var i,a;return{type:Pe.error,error:t.data,statusCode:(i=t.init)==null?void 0:i.status,headers:(a=t.init)!=null&&a.headers?new Headers(t.init.headers):void 0}}return{type:Pe.error,error:new Vu(((n=t.init)==null?void 0:n.status)||500,void 0,t.data),statusCode:vl(t)?t.status:void 0,headers:(s=t.init)!=null&&s.headers?new Headers(t.init.headers):void 0}}return{type:Pe.error,error:t,statusCode:vl(t)?t.status:void 0}}if(uL(t)){var o,l;return{type:Pe.deferred,deferredData:t,statusCode:(o=t.init)==null?void 0:o.status,headers:((l=t.init)==null?void 0:l.headers)&&new Headers(t.init.headers)}}if(Jw(t)){var d,u;return{type:Pe.data,data:t.data,statusCode:(d=t.init)==null?void 0:d.status,headers:(u=t.init)!=null&&u.headers?new Headers(t.init.headers):void 0}}return{type:Pe.data,data:t}}function aL(e,t,r,n,s,i){let a=e.headers.get("Location");if(xe(a,"Redirects returned/thrown from loaders/actions must have a Location header"),!nb.test(a)){let o=n.slice(0,n.findIndex(l=>l.route.id===r)+1);a=lx(new URL(t.url),o,s,!0,a,i),e.headers.set("Location",a)}return e}function Gw(e,t,r){if(nb.test(e)){let n=e,s=n.startsWith("//")?new URL(t.protocol+n):new URL(n),i=In(s.pathname,r)!=null;if(s.origin===t.origin&&i)return s.pathname+s.search+s.hash}return e}function $i(e,t,r,n){let s=e.createURL(GP(t)).toString(),i={signal:r};if(n&&Br(n.formMethod)){let{formMethod:a,formEncType:o}=n;i.method=a.toUpperCase(),o==="application/json"?(i.headers=new Headers({"Content-Type":o}),i.body=JSON.stringify(n.json)):o==="text/plain"?i.body=n.text:o==="application/x-www-form-urlencoded"&&n.formData?i.body=ux(n.formData):i.body=n.formData}return new Request(s,i)}function ux(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function Kw(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function oL(e,t,r,n,s){let i={},a=null,o,l=!1,d={},u=r&&cr(r[1])?r[1].error:void 0;return e.forEach(f=>{if(!(f.route.id in t))return;let h=f.route.id,p=t[h];if(xe(!ni(p),"Cannot handle redirect results in processLoaderData"),cr(p)){let m=p.error;u!==void 0&&(m=u,u=void 0),a=a||{};{let g=Js(e,h);a[g.route.id]==null&&(a[g.route.id]=m)}i[h]=void 0,l||(l=!0,o=vl(p.error)?p.error.status:500),p.headers&&(d[h]=p.headers)}else gs(p)?(n.set(h,p.deferredData),i[h]=p.deferredData.data,p.statusCode!=null&&p.statusCode!==200&&!l&&(o=p.statusCode),p.headers&&(d[h]=p.headers)):(i[h]=p.data,p.statusCode&&p.statusCode!==200&&!l&&(o=p.statusCode),p.headers&&(d[h]=p.headers))}),u!==void 0&&r&&(a={[r[0]]:u},i[r[0]]=void 0),{loaderData:i,errors:a,statusCode:o||200,loaderHeaders:d}}function Yw(e,t,r,n,s,i,a){let{loaderData:o,errors:l}=oL(t,r,n,a);return s.forEach(d=>{let{key:u,match:f,controller:h}=d,p=i[u];if(xe(p,"Did not find corresponding fetcher result"),!(h&&h.signal.aborted))if(cr(p)){let m=Js(e.matches,f==null?void 0:f.route.id);l&&l[m.route.id]||(l=We({},l,{[m.route.id]:p.error})),e.fetchers.delete(u)}else if(ni(p))xe(!1,"Unhandled fetcher revalidation redirect");else if(gs(p))xe(!1,"Unhandled fetcher deferred data");else{let m=ss(p.data);e.fetchers.set(u,m)}}),{loaderData:o,errors:l}}function Xw(e,t,r,n){let s=We({},t);for(let i of r){let a=i.route.id;if(t.hasOwnProperty(a)?t[a]!==void 0&&(s[a]=t[a]):e[a]!==void 0&&i.route.loader&&(s[a]=e[a]),n&&n.hasOwnProperty(a))break}return s}function Zw(e){return e?cr(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Js(e,t){return(t?e.slice(0,e.findIndex(n=>n.route.id===t)+1):[...e]).reverse().find(n=>n.route.hasErrorBoundary===!0)||e[0]}function Qw(e){let t=e.length===1?e[0]:e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Zt(e,t){let{pathname:r,routeId:n,method:s,type:i,message:a}=t===void 0?{}:t,o="Unknown Server Error",l="Unknown @remix-run/router error";return e===400?(o="Bad Request",s&&r&&n?l="You made a "+s+' request to "'+r+'" but '+('did not provide a `loader` for route "'+n+'", ')+"so there is no way to handle the request.":i==="defer-action"?l="defer() is not supported in actions":i==="invalid-body"&&(l="Unable to encode submission body")):e===403?(o="Forbidden",l='Route "'+n+'" does not match URL "'+r+'"'):e===404?(o="Not Found",l='No route matches URL "'+r+'"'):e===405&&(o="Method Not Allowed",s&&r&&n?l="You made a "+s.toUpperCase()+' request to "'+r+'" but '+('did not provide an `action` for route "'+n+'", ')+"so there is no way to handle the request.":s&&(l='Invalid request method "'+s.toUpperCase()+'"')),new Vu(e||500,o,new Error(l),!0)}function Ec(e){let t=Object.entries(e);for(let r=t.length-1;r>=0;r--){let[n,s]=t[r];if(ni(s))return{key:n,result:s}}}function GP(e){let t=typeof e=="string"?Fs(e):e;return wi(We({},t,{hash:""}))}function lL(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function cL(e){return KP(e.result)&&KI.has(e.result.status)}function gs(e){return e.type===Pe.deferred}function cr(e){return e.type===Pe.error}function ni(e){return(e&&e.type)===Pe.redirect}function Jw(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function uL(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function KP(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function dL(e){return GI.has(e.toLowerCase())}function Br(e){return HI.has(e.toLowerCase())}async function fL(e,t,r,n,s){let i=Object.entries(t);for(let a=0;a<i.length;a++){let[o,l]=i[a],d=e.find(h=>(h==null?void 0:h.route.id)===o);if(!d)continue;let u=n.find(h=>h.route.id===d.route.id),f=u!=null&&!HP(u,d)&&(s&&s[d.route.id])!==void 0;gs(l)&&f&&await sb(l,r,!1).then(h=>{h&&(t[o]=h)})}}async function hL(e,t,r){for(let n=0;n<r.length;n++){let{key:s,routeId:i,controller:a}=r[n],o=t[s];e.find(d=>(d==null?void 0:d.route.id)===i)&&gs(o)&&(xe(a,"Expected an AbortController for revalidating fetcher deferred result"),await sb(o,a.signal,!0).then(d=>{d&&(t[s]=d)}))}}async function sb(e,t,r){if(r===void 0&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:Pe.data,data:e.deferredData.unwrappedData}}catch(s){return{type:Pe.error,error:s}}return{type:Pe.data,data:e.deferredData.data}}}function ib(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Co(e,t){let r=typeof t=="string"?Fs(t).search:t.search;if(e[e.length-1].route.index&&ib(r||""))return e[e.length-1];let n=qP(e);return n[n.length-1]}function e2(e){let{formMethod:t,formAction:r,formEncType:n,text:s,formData:i,json:a}=e;if(!(!t||!r||!n)){if(s!=null)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:s};if(i!=null)return{formMethod:t,formAction:r,formEncType:n,formData:i,json:void 0,text:void 0};if(a!==void 0)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:a,text:void 0}}}function qf(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function pL(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function uo(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function mL(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function ss(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function gL(e,t){try{let r=e.sessionStorage.getItem(UP);if(r){let n=JSON.parse(r);for(let[s,i]of Object.entries(n||{}))i&&Array.isArray(i)&&t.set(s,new Set(i||[]))}}catch{}}function yL(e,t){if(t.size>0){let r={};for(let[n,s]of t)r[n]=[...s];try{e.sessionStorage.setItem(UP,JSON.stringify(r))}catch(n){bi(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}/**
|
|
51
|
-
* React Router v6.30.2
|
|
52
|
-
*
|
|
53
|
-
* Copyright (c) Remix Software Inc.
|
|
54
|
-
*
|
|
55
|
-
* This source code is licensed under the MIT license found in the
|
|
56
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
57
|
-
*
|
|
58
|
-
* @license MIT
|
|
59
|
-
*/function qu(){return qu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},qu.apply(this,arguments)}const Ul=k.createContext(null),ab=k.createContext(null),$s=k.createContext(null),ob=k.createContext(null),qn=k.createContext({outlet:null,matches:[],isDataRoute:!1}),YP=k.createContext(null);function xL(e,t){let{relative:r}=t===void 0?{}:t;Hl()||xe(!1);let{basename:n,navigator:s}=k.useContext($s),{hash:i,pathname:a,search:o}=Td(e,{relative:r}),l=a;return n!=="/"&&(l=a==="/"?n:Tn([n,a])),s.createHref({pathname:l,search:o,hash:i})}function Hl(){return k.useContext(ob)!=null}function Ci(){return Hl()||xe(!1),k.useContext(ob).location}function XP(e){k.useContext($s).static||k.useLayoutEffect(e)}function vL(){let{isDataRoute:e}=k.useContext(qn);return e?AL():bL()}function bL(){Hl()||xe(!1);let e=k.useContext(Ul),{basename:t,future:r,navigator:n}=k.useContext($s),{matches:s}=k.useContext(qn),{pathname:i}=Ci(),a=JSON.stringify(tb(s,r.v7_relativeSplatPath)),o=k.useRef(!1);return XP(()=>{o.current=!0}),k.useCallback(function(d,u){if(u===void 0&&(u={}),!o.current)return;if(typeof d=="number"){n.go(d);return}let f=rb(d,JSON.parse(a),i,u.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:Tn([t,f.pathname])),(u.replace?n.replace:n.push)(f,u.state,u)},[t,n,a,i,e])}const wL=k.createContext(null);function kL(e){let t=k.useContext(qn).outlet;return t&&k.createElement(wL.Provider,{value:e},t)}function ZP(){let{matches:e}=k.useContext(qn),t=e[e.length-1];return t?t.params:{}}function Td(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=k.useContext($s),{matches:s}=k.useContext(qn),{pathname:i}=Ci(),a=JSON.stringify(tb(s,n.v7_relativeSplatPath));return k.useMemo(()=>rb(e,JSON.parse(a),i,r==="path"),[e,a,i,r])}function jL(e,t,r,n){Hl()||xe(!1);let{navigator:s}=k.useContext($s),{matches:i}=k.useContext(qn),a=i[i.length-1],o=a?a.params:{};a&&a.pathname;let l=a?a.pathnameBase:"/";a&&a.route;let d=Ci(),u;u=d;let f=u.pathname||"/",h=f;if(l!=="/"){let g=l.replace(/^\//,"").split("/");h="/"+f.replace(/^\//,"").split("/").slice(g.length).join("/")}let p=Qs(e,{pathname:h});return CL(p&&p.map(g=>Object.assign({},g,{params:Object.assign({},o,g.params),pathname:Tn([l,s.encodeLocation?s.encodeLocation(g.pathname).pathname:g.pathname]),pathnameBase:g.pathnameBase==="/"?l:Tn([l,s.encodeLocation?s.encodeLocation(g.pathnameBase).pathname:g.pathnameBase])})),i,r,n)}function _L(){let e=RL(),t=vl(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return k.createElement(k.Fragment,null,k.createElement("h2",null,"Unexpected Application Error!"),k.createElement("h3",{style:{fontStyle:"italic"}},t),r?k.createElement("pre",{style:s},r):null,null)}const SL=k.createElement(_L,null);class NL extends k.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?k.createElement(qn.Provider,{value:this.props.routeContext},k.createElement(YP.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function EL(e){let{routeContext:t,match:r,children:n}=e,s=k.useContext(Ul);return s&&s.static&&s.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=r.route.id),k.createElement(qn.Provider,{value:t},n)}function CL(e,t,r,n){var s;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var i;if(!r)return null;if(r.errors)e=r.matches;else if((i=n)!=null&&i.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let a=e,o=(s=r)==null?void 0:s.errors;if(o!=null){let u=a.findIndex(f=>f.route.id&&(o==null?void 0:o[f.route.id])!==void 0);u>=0||xe(!1),a=a.slice(0,Math.min(a.length,u+1))}let l=!1,d=-1;if(r&&n&&n.v7_partialHydration)for(let u=0;u<a.length;u++){let f=a[u];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(d=u),f.route.id){let{loaderData:h,errors:p}=r,m=f.route.loader&&h[f.route.id]===void 0&&(!p||p[f.route.id]===void 0);if(f.route.lazy||m){l=!0,d>=0?a=a.slice(0,d+1):a=[a[0]];break}}}return a.reduceRight((u,f,h)=>{let p,m=!1,g=null,b=null;r&&(p=o&&f.route.id?o[f.route.id]:void 0,g=f.route.errorElement||SL,l&&(d<0&&h===0?(DL("route-fallback"),m=!0,b=null):d===h&&(m=!0,b=f.route.hydrateFallbackElement||null)));let x=t.concat(a.slice(0,h+1)),y=()=>{let v;return p?v=g:m?v=b:f.route.Component?v=k.createElement(f.route.Component,null):f.route.element?v=f.route.element:v=u,k.createElement(EL,{match:f,routeContext:{outlet:u,matches:x,isDataRoute:r!=null},children:v})};return r&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?k.createElement(NL,{location:r.location,revalidation:r.revalidation,component:g,error:p,children:y(),routeContext:{outlet:null,matches:x,isDataRoute:!0}}):y()},null)}var QP=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(QP||{}),JP=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}(JP||{});function TL(e){let t=k.useContext(Ul);return t||xe(!1),t}function PL(e){let t=k.useContext(ab);return t||xe(!1),t}function ML(e){let t=k.useContext(qn);return t||xe(!1),t}function eM(e){let t=ML(),r=t.matches[t.matches.length-1];return r.route.id||xe(!1),r.route.id}function RL(){var e;let t=k.useContext(YP),r=PL(JP.UseRouteError),n=eM();return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function AL(){let{router:e}=TL(QP.UseNavigateStable),t=eM(),r=k.useRef(!1);return XP(()=>{r.current=!0}),k.useCallback(function(s,i){i===void 0&&(i={}),r.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,qu({fromRouteId:t},i)))},[e,t])}const t2={};function DL(e,t,r){t2[e]||(t2[e]=!0)}function IL(e,t){e==null||e.v7_startTransition,(e==null?void 0:e.v7_relativeSplatPath)===void 0&&(!t||t.v7_relativeSplatPath),t&&(t.v7_fetcherPersist,t.v7_normalizeFormMethod,t.v7_partialHydration,t.v7_skipActionErrorRevalidation)}function LL(e){return kL(e.context)}function OL(e){let{basename:t="/",children:r=null,location:n,navigationType:s=ht.Pop,navigator:i,static:a=!1,future:o}=e;Hl()&&xe(!1);let l=t.replace(/^\/*/,"/"),d=k.useMemo(()=>({basename:l,navigator:i,static:a,future:qu({v7_relativeSplatPath:!1},o)}),[l,o,i,a]);typeof n=="string"&&(n=Fs(n));let{pathname:u="/",search:f="",hash:h="",state:p=null,key:m="default"}=n,g=k.useMemo(()=>{let b=In(u,l);return b==null?null:{location:{pathname:b,search:f,hash:h,state:p,key:m},navigationType:s}},[l,u,f,h,p,m,s]);return g==null?null:k.createElement($s.Provider,{value:d},k.createElement(ob.Provider,{children:r,value:g}))}new Promise(()=>{});function zL(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:k.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:k.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:k.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/**
|
|
60
|
-
* React Router DOM v6.30.2
|
|
61
|
-
*
|
|
62
|
-
* Copyright (c) Remix Software Inc.
|
|
63
|
-
*
|
|
64
|
-
* This source code is licensed under the MIT license found in the
|
|
65
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
66
|
-
*
|
|
67
|
-
* @license MIT
|
|
68
|
-
*/function Ma(){return Ma=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ma.apply(this,arguments)}function tM(e,t){if(e==null)return{};var r={},n=Object.keys(e),s,i;for(i=0;i<n.length;i++)s=n[i],!(t.indexOf(s)>=0)&&(r[s]=e[s]);return r}function FL(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function $L(e,t){return e.button===0&&(!t||t==="_self")&&!FL(e)}const VL=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],qL=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],BL="6";try{window.__reactRouterVersion=BL}catch{}function UL(e,t){return QI({basename:void 0,future:Ma({},void 0,{v7_prependBasename:!0}),history:wI({window:void 0}),hydrationData:HL(),routes:e,mapRouteProperties:zL,dataStrategy:void 0,patchRoutesOnNavigation:void 0,window:void 0}).initialize()}function HL(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=Ma({},t,{errors:WL(t.errors)})),t}function WL(e){if(!e)return null;let t=Object.entries(e),r={};for(let[n,s]of t)if(s&&s.__type==="RouteErrorResponse")r[n]=new Vu(s.status,s.statusText,s.data,s.internal===!0);else if(s&&s.__type==="Error"){if(s.__subType){let i=window[s.__subType];if(typeof i=="function")try{let a=new i(s.message);a.stack="",r[n]=a}catch{}}if(r[n]==null){let i=new Error(s.message);i.stack="",r[n]=i}}else r[n]=s;return r}const rM=k.createContext({isTransitioning:!1}),GL=k.createContext(new Map),KL="startTransition",r2=l5[KL],YL="flushSync",n2=bI[YL];function XL(e){r2?r2(e):e()}function fo(e){n2?n2(e):e()}class ZL{constructor(){this.status="pending",this.promise=new Promise((t,r)=>{this.resolve=n=>{this.status==="pending"&&(this.status="resolved",t(n))},this.reject=n=>{this.status==="pending"&&(this.status="rejected",r(n))}})}}function QL(e){let{fallbackElement:t,router:r,future:n}=e,[s,i]=k.useState(r.state),[a,o]=k.useState(),[l,d]=k.useState({isTransitioning:!1}),[u,f]=k.useState(),[h,p]=k.useState(),[m,g]=k.useState(),b=k.useRef(new Map),{v7_startTransition:x}=n||{},y=k.useCallback(E=>{x?XL(E):E()},[x]),v=k.useCallback((E,M)=>{let{deletedFetchers:C,flushSync:D,viewTransitionOpts:F}=M;E.fetchers.forEach((S,O)=>{S.data!==void 0&&b.current.set(O,S.data)}),C.forEach(S=>b.current.delete(S));let T=r.window==null||r.window.document==null||typeof r.window.document.startViewTransition!="function";if(!F||T){D?fo(()=>i(E)):y(()=>i(E));return}if(D){fo(()=>{h&&(u&&u.resolve(),h.skipTransition()),d({isTransitioning:!0,flushSync:!0,currentLocation:F.currentLocation,nextLocation:F.nextLocation})});let S=r.window.document.startViewTransition(()=>{fo(()=>i(E))});S.finished.finally(()=>{fo(()=>{f(void 0),p(void 0),o(void 0),d({isTransitioning:!1})})}),fo(()=>p(S));return}h?(u&&u.resolve(),h.skipTransition(),g({state:E,currentLocation:F.currentLocation,nextLocation:F.nextLocation})):(o(E),d({isTransitioning:!0,flushSync:!1,currentLocation:F.currentLocation,nextLocation:F.nextLocation}))},[r.window,h,u,b,y]);k.useLayoutEffect(()=>r.subscribe(v),[r,v]),k.useEffect(()=>{l.isTransitioning&&!l.flushSync&&f(new ZL)},[l]),k.useEffect(()=>{if(u&&a&&r.window){let E=a,M=u.promise,C=r.window.document.startViewTransition(async()=>{y(()=>i(E)),await M});C.finished.finally(()=>{f(void 0),p(void 0),o(void 0),d({isTransitioning:!1})}),p(C)}},[y,a,u,r.window]),k.useEffect(()=>{u&&a&&s.location.key===a.location.key&&u.resolve()},[u,h,s.location,a]),k.useEffect(()=>{!l.isTransitioning&&m&&(o(m.state),d({isTransitioning:!0,flushSync:!1,currentLocation:m.currentLocation,nextLocation:m.nextLocation}),g(void 0))},[l.isTransitioning,m]),k.useEffect(()=>{},[]);let w=k.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:E=>r.navigate(E),push:(E,M,C)=>r.navigate(E,{state:M,preventScrollReset:C==null?void 0:C.preventScrollReset}),replace:(E,M,C)=>r.navigate(E,{replace:!0,state:M,preventScrollReset:C==null?void 0:C.preventScrollReset})}),[r]),_=r.basename||"/",N=k.useMemo(()=>({router:r,navigator:w,static:!1,basename:_}),[r,w,_]),j=k.useMemo(()=>({v7_relativeSplatPath:r.future.v7_relativeSplatPath}),[r.future.v7_relativeSplatPath]);return k.useEffect(()=>IL(n,r.future),[n,r.future]),k.createElement(k.Fragment,null,k.createElement(Ul.Provider,{value:N},k.createElement(ab.Provider,{value:s},k.createElement(GL.Provider,{value:b.current},k.createElement(rM.Provider,{value:l},k.createElement(OL,{basename:_,location:s.location,navigationType:s.historyAction,navigator:w,future:j},s.initialized||r.future.v7_partialHydration?k.createElement(JL,{routes:r.routes,future:r.future,state:s}):t))))),null)}const JL=k.memo(e6);function e6(e){let{routes:t,future:r,state:n}=e;return jL(t,void 0,n,r)}const t6=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",r6=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Nt=k.forwardRef(function(t,r){let{onClick:n,relative:s,reloadDocument:i,replace:a,state:o,target:l,to:d,preventScrollReset:u,viewTransition:f}=t,h=tM(t,VL),{basename:p}=k.useContext($s),m,g=!1;if(typeof d=="string"&&r6.test(d)&&(m=d,t6))try{let v=new URL(window.location.href),w=d.startsWith("//")?new URL(v.protocol+d):new URL(d),_=In(w.pathname,p);w.origin===v.origin&&_!=null?d=_+w.search+w.hash:g=!0}catch{}let b=xL(d,{relative:s}),x=i6(d,{replace:a,state:o,target:l,preventScrollReset:u,relative:s,viewTransition:f});function y(v){n&&n(v),v.defaultPrevented||x(v)}return k.createElement("a",Ma({},h,{href:m||b,onClick:g||i?n:y,ref:r,target:l}))}),n6=k.forwardRef(function(t,r){let{"aria-current":n="page",caseSensitive:s=!1,className:i="",end:a=!1,style:o,to:l,viewTransition:d,children:u}=t,f=tM(t,qL),h=Td(l,{relative:f.relative}),p=Ci(),m=k.useContext(ab),{navigator:g,basename:b}=k.useContext($s),x=m!=null&&a6(h)&&d===!0,y=g.encodeLocation?g.encodeLocation(h).pathname:h.pathname,v=p.pathname,w=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;s||(v=v.toLowerCase(),w=w?w.toLowerCase():null,y=y.toLowerCase()),w&&b&&(w=In(w,b)||w);const _=y!=="/"&&y.endsWith("/")?y.length-1:y.length;let N=v===y||!a&&v.startsWith(y)&&v.charAt(_)==="/",j=w!=null&&(w===y||!a&&w.startsWith(y)&&w.charAt(y.length)==="/"),E={isActive:N,isPending:j,isTransitioning:x},M=N?n:void 0,C;typeof i=="function"?C=i(E):C=[i,N?"active":null,j?"pending":null,x?"transitioning":null].filter(Boolean).join(" ");let D=typeof o=="function"?o(E):o;return k.createElement(Nt,Ma({},f,{"aria-current":M,className:C,ref:r,style:D,to:l,viewTransition:d}),typeof u=="function"?u(E):u)});var dx;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(dx||(dx={}));var s2;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(s2||(s2={}));function s6(e){let t=k.useContext(Ul);return t||xe(!1),t}function i6(e,t){let{target:r,replace:n,state:s,preventScrollReset:i,relative:a,viewTransition:o}=t===void 0?{}:t,l=vL(),d=Ci(),u=Td(e,{relative:a});return k.useCallback(f=>{if($L(f,r)){f.preventDefault();let h=n!==void 0?n:wi(d)===wi(u);l(e,{replace:h,state:s,preventScrollReset:i,relative:a,viewTransition:o})}},[d,l,u,n,s,r,e,i,a,o])}function a6(e,t){t===void 0&&(t={});let r=k.useContext(rM);r==null&&xe(!1);let{basename:n}=s6(dx.useViewTransitionState),s=Td(e,{relative:t.relative});if(!r.isTransitioning)return!1;let i=In(r.currentLocation.pathname,n)||r.currentLocation.pathname,a=In(r.nextLocation.pathname,n)||r.nextLocation.pathname;return $u(s.pathname,a)!=null||$u(s.pathname,i)!=null}const nM=k.createContext();function o6({children:e}){const[t,r]=k.useState(()=>{const s=localStorage.getItem("flowyml-theme");return s?(document.documentElement.classList.remove("light","dark"),document.documentElement.classList.add(s),s):window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?(document.documentElement.classList.remove("light"),document.documentElement.classList.add("dark"),"dark"):(document.documentElement.classList.remove("dark"),document.documentElement.classList.add("light"),"light")});k.useEffect(()=>{document.documentElement.classList.remove("light","dark"),document.documentElement.classList.add(t),localStorage.setItem("flowyml-theme",t)},[t]);const n=()=>{r(s=>s==="light"?"dark":"light")};return c.jsx(nM.Provider,{value:{theme:t,setTheme:r,toggleTheme:n},children:e})}function l6(){const e=k.useContext(nM);if(!e)throw new Error("useTheme must be used within ThemeProvider");return e}const sM=k.createContext();function c6({children:e}){const[t,r]=k.useState(()=>localStorage.getItem("flowyml-selected-project")||null),[n,s]=k.useState([]),[i,a]=k.useState(!0);k.useEffect(()=>{fetch("/api/projects/").then(u=>u.json()).then(u=>{s(u||[]),a(!1)}).catch(u=>{console.error("Failed to fetch projects:",u),a(!1)})},[]),k.useEffect(()=>{t?localStorage.setItem("flowyml-selected-project",t):localStorage.removeItem("flowyml-selected-project")},[t]);const o=u=>{r(u)},l=()=>{r(null)},d=async()=>{a(!0);try{const f=await(await fetch("/api/projects/")).json();s(f||[])}catch(u){console.error("Failed to refresh projects:",u)}finally{a(!1)}};return c.jsx(sM.Provider,{value:{selectedProject:t,projects:n,loading:i,selectProject:o,clearProject:l,refreshProjects:d},children:e})}function Bn(){const e=k.useContext(sM);if(!e)throw new Error("useProject must be used within ProjectProvider");return e}/**
|
|
69
|
-
* @license lucide-react v0.344.0 - ISC
|
|
70
|
-
*
|
|
71
|
-
* This source code is licensed under the ISC license.
|
|
72
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
73
|
-
*/var u6={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"};/**
|
|
74
|
-
* @license lucide-react v0.344.0 - ISC
|
|
75
|
-
*
|
|
76
|
-
* This source code is licensed under the ISC license.
|
|
77
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
78
|
-
*/const d6=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),Q=(e,t)=>{const r=k.forwardRef(({color:n="currentColor",size:s=24,strokeWidth:i=2,absoluteStrokeWidth:a,className:o="",children:l,...d},u)=>k.createElement("svg",{ref:u,...u6,width:s,height:s,stroke:n,strokeWidth:a?Number(i)*24/Number(s):i,className:["lucide",`lucide-${d6(e)}`,o].join(" "),...d},[...t.map(([f,h])=>k.createElement(f,h)),...Array.isArray(l)?l:[l]]));return r.displayName=`${e}`,r};/**
|
|
79
|
-
* @license lucide-react v0.344.0 - ISC
|
|
80
|
-
*
|
|
81
|
-
* This source code is licensed under the ISC license.
|
|
82
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
83
|
-
*/const Bt=Q("Activity",[["path",{d:"M22 12h-4l-3 9L9 3l-3 9H2",key:"d5dnw9"}]]);/**
|
|
84
|
-
* @license lucide-react v0.344.0 - ISC
|
|
85
|
-
*
|
|
86
|
-
* This source code is licensed under the ISC license.
|
|
87
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
88
|
-
*/const Pd=Q("AlertCircle",[["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"}]]);/**
|
|
89
|
-
* @license lucide-react v0.344.0 - ISC
|
|
90
|
-
*
|
|
91
|
-
* This source code is licensed under the ISC license.
|
|
92
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
93
|
-
*/const f6=Q("ArrowDownCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 8v8",key:"napkw2"}],["path",{d:"m8 12 4 4 4-4",key:"k98ssh"}]]);/**
|
|
94
|
-
* @license lucide-react v0.344.0 - ISC
|
|
95
|
-
*
|
|
96
|
-
* This source code is licensed under the ISC license.
|
|
97
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
98
|
-
*/const Ps=Q("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
|
|
99
|
-
* @license lucide-react v0.344.0 - ISC
|
|
100
|
-
*
|
|
101
|
-
* This source code is licensed under the ISC license.
|
|
102
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
103
|
-
*/const h6=Q("ArrowUpCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 12-4-4-4 4",key:"177agl"}],["path",{d:"M12 16V8",key:"1sbj14"}]]);/**
|
|
104
|
-
* @license lucide-react v0.344.0 - ISC
|
|
105
|
-
*
|
|
106
|
-
* This source code is licensed under the ISC license.
|
|
107
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
108
|
-
*/const p6=Q("ArrowUpDown",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);/**
|
|
109
|
-
* @license lucide-react v0.344.0 - ISC
|
|
110
|
-
*
|
|
111
|
-
* This source code is licensed under the ISC license.
|
|
112
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
113
|
-
*/const bl=Q("BarChart2",[["line",{x1:"18",x2:"18",y1:"20",y2:"10",key:"1xfpm4"}],["line",{x1:"12",x2:"12",y1:"20",y2:"4",key:"be30l9"}],["line",{x1:"6",x2:"6",y1:"20",y2:"14",key:"1r4le6"}]]);/**
|
|
114
|
-
* @license lucide-react v0.344.0 - ISC
|
|
115
|
-
*
|
|
116
|
-
* This source code is licensed under the ISC license.
|
|
117
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
118
|
-
*/const m6=Q("BarChart3",[["path",{d:"M3 3v18h18",key:"1s2lah"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
|
|
119
|
-
* @license lucide-react v0.344.0 - ISC
|
|
120
|
-
*
|
|
121
|
-
* This source code is licensed under the ISC license.
|
|
122
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
123
|
-
*/const Ra=Q("Box",[["path",{d:"M21 8a2 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.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);/**
|
|
124
|
-
* @license lucide-react v0.344.0 - ISC
|
|
125
|
-
*
|
|
126
|
-
* This source code is licensed under the ISC license.
|
|
127
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
128
|
-
*/const ir=Q("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
|
|
129
|
-
* @license lucide-react v0.344.0 - ISC
|
|
130
|
-
*
|
|
131
|
-
* This source code is licensed under the ISC license.
|
|
132
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
133
|
-
*/const g6=Q("CheckCircle2",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
134
|
-
* @license lucide-react v0.344.0 - ISC
|
|
135
|
-
*
|
|
136
|
-
* This source code is licensed under the ISC license.
|
|
137
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
138
|
-
*/const Dt=Q("CheckCircle",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
|
|
139
|
-
* @license lucide-react v0.344.0 - ISC
|
|
140
|
-
*
|
|
141
|
-
* This source code is licensed under the ISC license.
|
|
142
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
143
|
-
*/const iM=Q("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
144
|
-
* @license lucide-react v0.344.0 - ISC
|
|
145
|
-
*
|
|
146
|
-
* This source code is licensed under the ISC license.
|
|
147
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
148
|
-
*/const y6=Q("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
149
|
-
* @license lucide-react v0.344.0 - ISC
|
|
150
|
-
*
|
|
151
|
-
* This source code is licensed under the ISC license.
|
|
152
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
153
|
-
*/const x6=Q("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
|
|
154
|
-
* @license lucide-react v0.344.0 - ISC
|
|
155
|
-
*
|
|
156
|
-
* This source code is licensed under the ISC license.
|
|
157
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
158
|
-
*/const wl=Q("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
159
|
-
* @license lucide-react v0.344.0 - ISC
|
|
160
|
-
*
|
|
161
|
-
* This source code is licensed under the ISC license.
|
|
162
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
163
|
-
*/const Lt=Q("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
|
|
164
|
-
* @license lucide-react v0.344.0 - ISC
|
|
165
|
-
*
|
|
166
|
-
* This source code is licensed under the ISC license.
|
|
167
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
168
|
-
*/const v6=Q("Code2",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);/**
|
|
169
|
-
* @license lucide-react v0.344.0 - ISC
|
|
170
|
-
*
|
|
171
|
-
* This source code is licensed under the ISC license.
|
|
172
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
173
|
-
*/const Bu=Q("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
|
|
174
|
-
* @license lucide-react v0.344.0 - ISC
|
|
175
|
-
*
|
|
176
|
-
* This source code is licensed under the ISC license.
|
|
177
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
178
|
-
*/const Dr=Q("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
|
|
179
|
-
* @license lucide-react v0.344.0 - ISC
|
|
180
|
-
*
|
|
181
|
-
* This source code is licensed under the ISC license.
|
|
182
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
183
|
-
*/const b6=Q("DollarSign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]);/**
|
|
184
|
-
* @license lucide-react v0.344.0 - ISC
|
|
185
|
-
*
|
|
186
|
-
* This source code is licensed under the ISC license.
|
|
187
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
188
|
-
*/const lb=Q("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
|
|
189
|
-
* @license lucide-react v0.344.0 - ISC
|
|
190
|
-
*
|
|
191
|
-
* This source code is licensed under the ISC license.
|
|
192
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
193
|
-
*/const w6=Q("EyeOff",[["path",{d:"M9.88 9.88a3 3 0 1 0 4.24 4.24",key:"1jxqfv"}],["path",{d:"M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68",key:"9wicm4"}],["path",{d:"M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61",key:"1jreej"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]]);/**
|
|
194
|
-
* @license lucide-react v0.344.0 - ISC
|
|
195
|
-
*
|
|
196
|
-
* This source code is licensed under the ISC license.
|
|
197
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
198
|
-
*/const fx=Q("Eye",[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
199
|
-
* @license lucide-react v0.344.0 - ISC
|
|
200
|
-
*
|
|
201
|
-
* This source code is licensed under the ISC license.
|
|
202
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
203
|
-
*/const kl=Q("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
|
|
204
|
-
* @license lucide-react v0.344.0 - ISC
|
|
205
|
-
*
|
|
206
|
-
* This source code is licensed under the ISC license.
|
|
207
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
208
|
-
*/const aM=Q("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/**
|
|
209
|
-
* @license lucide-react v0.344.0 - ISC
|
|
210
|
-
*
|
|
211
|
-
* This source code is licensed under the ISC license.
|
|
212
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
213
|
-
*/const Ko=Q("FlaskConical",[["path",{d:"M10 2v7.527a2 2 0 0 1-.211.896L4.72 20.55a1 1 0 0 0 .9 1.45h12.76a1 1 0 0 0 .9-1.45l-5.069-10.127A2 2 0 0 1 14 9.527V2",key:"pzvekw"}],["path",{d:"M8.5 2h7",key:"csnxdl"}],["path",{d:"M7 16h10",key:"wp8him"}]]);/**
|
|
214
|
-
* @license lucide-react v0.344.0 - ISC
|
|
215
|
-
*
|
|
216
|
-
* This source code is licensed under the ISC license.
|
|
217
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
218
|
-
*/const k6=Q("FolderKanban",[["path",{d:"M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z",key:"1fr9dc"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M12 10v2",key:"hh53o1"}],["path",{d:"M16 10v6",key:"1d6xys"}]]);/**
|
|
219
|
-
* @license lucide-react v0.344.0 - ISC
|
|
220
|
-
*
|
|
221
|
-
* This source code is licensed under the ISC license.
|
|
222
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
223
|
-
*/const i2=Q("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/**
|
|
224
|
-
* @license lucide-react v0.344.0 - ISC
|
|
225
|
-
*
|
|
226
|
-
* This source code is licensed under the ISC license.
|
|
227
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
228
|
-
*/const Md=Q("FolderPlus",[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
|
|
229
|
-
* @license lucide-react v0.344.0 - ISC
|
|
230
|
-
*
|
|
231
|
-
* This source code is licensed under the ISC license.
|
|
232
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
233
|
-
*/const Bf=Q("Folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
|
|
234
|
-
* @license lucide-react v0.344.0 - ISC
|
|
235
|
-
*
|
|
236
|
-
* This source code is licensed under the ISC license.
|
|
237
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
238
|
-
*/const Uu=Q("Globe",[["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"}]]);/**
|
|
239
|
-
* @license lucide-react v0.344.0 - ISC
|
|
240
|
-
*
|
|
241
|
-
* This source code is licensed under the ISC license.
|
|
242
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
243
|
-
*/const Uf=Q("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/**
|
|
244
|
-
* @license lucide-react v0.344.0 - ISC
|
|
245
|
-
*
|
|
246
|
-
* This source code is licensed under the ISC license.
|
|
247
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
248
|
-
*/const j6=Q("Home",[["path",{d:"m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"y5dka4"}],["polyline",{points:"9 22 9 12 15 12 15 22",key:"e2us08"}]]);/**
|
|
249
|
-
* @license lucide-react v0.344.0 - ISC
|
|
250
|
-
*
|
|
251
|
-
* This source code is licensed under the ISC license.
|
|
252
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
253
|
-
*/const a2=Q("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
|
|
254
|
-
* @license lucide-react v0.344.0 - ISC
|
|
255
|
-
*
|
|
256
|
-
* This source code is licensed under the ISC license.
|
|
257
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
258
|
-
*/const ya=Q("Key",[["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["path",{d:"m15.5 7.5 3 3L22 7l-3-3",key:"1rn1fs"}]]);/**
|
|
259
|
-
* @license lucide-react v0.344.0 - ISC
|
|
260
|
-
*
|
|
261
|
-
* This source code is licensed under the ISC license.
|
|
262
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
263
|
-
*/const Yo=Q("Layers",[["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:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/**
|
|
264
|
-
* @license lucide-react v0.344.0 - ISC
|
|
265
|
-
*
|
|
266
|
-
* This source code is licensed under the ISC license.
|
|
267
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
268
|
-
*/const _6=Q("LayoutDashboard",[["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"}]]);/**
|
|
269
|
-
* @license lucide-react v0.344.0 - ISC
|
|
270
|
-
*
|
|
271
|
-
* This source code is licensed under the ISC license.
|
|
272
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
273
|
-
*/const S6=Q("LayoutGrid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]);/**
|
|
274
|
-
* @license lucide-react v0.344.0 - ISC
|
|
275
|
-
*
|
|
276
|
-
* This source code is licensed under the ISC license.
|
|
277
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
278
|
-
*/const N6=Q("Link",[["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"}]]);/**
|
|
279
|
-
* @license lucide-react v0.344.0 - ISC
|
|
280
|
-
*
|
|
281
|
-
* This source code is licensed under the ISC license.
|
|
282
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
283
|
-
*/const E6=Q("List",[["line",{x1:"8",x2:"21",y1:"6",y2:"6",key:"7ey8pc"}],["line",{x1:"8",x2:"21",y1:"12",y2:"12",key:"rjfblc"}],["line",{x1:"8",x2:"21",y1:"18",y2:"18",key:"c3b1m8"}],["line",{x1:"3",x2:"3.01",y1:"6",y2:"6",key:"1g7gq3"}],["line",{x1:"3",x2:"3.01",y1:"12",y2:"12",key:"1pjlvk"}],["line",{x1:"3",x2:"3.01",y1:"18",y2:"18",key:"28t2mc"}]]);/**
|
|
284
|
-
* @license lucide-react v0.344.0 - ISC
|
|
285
|
-
*
|
|
286
|
-
* This source code is licensed under the ISC license.
|
|
287
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
288
|
-
*/const jl=Q("Loader2",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
289
|
-
* @license lucide-react v0.344.0 - ISC
|
|
290
|
-
*
|
|
291
|
-
* This source code is licensed under the ISC license.
|
|
292
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
293
|
-
*/const Hu=Q("Loader",[["line",{x1:"12",x2:"12",y1:"2",y2:"6",key:"gza1u7"}],["line",{x1:"12",x2:"12",y1:"18",y2:"22",key:"1qhbu9"}],["line",{x1:"4.93",x2:"7.76",y1:"4.93",y2:"7.76",key:"xae44r"}],["line",{x1:"16.24",x2:"19.07",y1:"16.24",y2:"19.07",key:"bxnmvf"}],["line",{x1:"2",x2:"6",y1:"12",y2:"12",key:"89khin"}],["line",{x1:"18",x2:"22",y1:"12",y2:"12",key:"pb8tfm"}],["line",{x1:"4.93",x2:"7.76",y1:"19.07",y2:"16.24",key:"1uxjnu"}],["line",{x1:"16.24",x2:"19.07",y1:"7.76",y2:"4.93",key:"6duxfx"}]]);/**
|
|
294
|
-
* @license lucide-react v0.344.0 - ISC
|
|
295
|
-
*
|
|
296
|
-
* This source code is licensed under the ISC license.
|
|
297
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
298
|
-
*/const C6=Q("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
|
|
299
|
-
* @license lucide-react v0.344.0 - ISC
|
|
300
|
-
*
|
|
301
|
-
* This source code is licensed under the ISC license.
|
|
302
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
303
|
-
*/const oM=Q("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
|
|
304
|
-
* @license lucide-react v0.344.0 - ISC
|
|
305
|
-
*
|
|
306
|
-
* This source code is licensed under the ISC license.
|
|
307
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
308
|
-
*/const T6=Q("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
|
|
309
|
-
* @license lucide-react v0.344.0 - ISC
|
|
310
|
-
*
|
|
311
|
-
* This source code is licensed under the ISC license.
|
|
312
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
313
|
-
*/const ki=Q("Package",[["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}],["path",{d:"M21 8a2 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.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);/**
|
|
314
|
-
* @license lucide-react v0.344.0 - ISC
|
|
315
|
-
*
|
|
316
|
-
* This source code is licensed under the ISC license.
|
|
317
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
318
|
-
*/const o2=Q("Pause",[["rect",{width:"4",height:"16",x:"6",y:"4",key:"iffhe4"}],["rect",{width:"4",height:"16",x:"14",y:"4",key:"sjin7j"}]]);/**
|
|
319
|
-
* @license lucide-react v0.344.0 - ISC
|
|
320
|
-
*
|
|
321
|
-
* This source code is licensed under the ISC license.
|
|
322
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
323
|
-
*/const Wu=Q("PlayCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polygon",{points:"10 8 16 12 10 16 10 8",key:"1cimsy"}]]);/**
|
|
324
|
-
* @license lucide-react v0.344.0 - ISC
|
|
325
|
-
*
|
|
326
|
-
* This source code is licensed under the ISC license.
|
|
327
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
328
|
-
*/const l2=Q("Play",[["polygon",{points:"5 3 19 12 5 21 5 3",key:"191637"}]]);/**
|
|
329
|
-
* @license lucide-react v0.344.0 - ISC
|
|
330
|
-
*
|
|
331
|
-
* This source code is licensed under the ISC license.
|
|
332
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
333
|
-
*/const Ss=Q("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
334
|
-
* @license lucide-react v0.344.0 - ISC
|
|
335
|
-
*
|
|
336
|
-
* This source code is licensed under the ISC license.
|
|
337
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
338
|
-
*/const lM=Q("RefreshCw",[["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"}]]);/**
|
|
339
|
-
* @license lucide-react v0.344.0 - ISC
|
|
340
|
-
*
|
|
341
|
-
* This source code is licensed under the ISC license.
|
|
342
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
343
|
-
*/const hx=Q("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
344
|
-
* @license lucide-react v0.344.0 - ISC
|
|
345
|
-
*
|
|
346
|
-
* This source code is licensed under the ISC license.
|
|
347
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
348
|
-
*/const cM=Q("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/**
|
|
349
|
-
* @license lucide-react v0.344.0 - ISC
|
|
350
|
-
*
|
|
351
|
-
* This source code is licensed under the ISC license.
|
|
352
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
353
|
-
*/const uM=Q("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
354
|
-
* @license lucide-react v0.344.0 - ISC
|
|
355
|
-
*
|
|
356
|
-
* This source code is licensed under the ISC license.
|
|
357
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
358
|
-
*/const px=Q("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/**
|
|
359
|
-
* @license lucide-react v0.344.0 - ISC
|
|
360
|
-
*
|
|
361
|
-
* This source code is licensed under the ISC license.
|
|
362
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
363
|
-
*/const P6=Q("Star",[["polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2",key:"8f66p6"}]]);/**
|
|
364
|
-
* @license lucide-react v0.344.0 - ISC
|
|
365
|
-
*
|
|
366
|
-
* This source code is licensed under the ISC license.
|
|
367
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
368
|
-
*/const M6=Q("Sun",[["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"}]]);/**
|
|
369
|
-
* @license lucide-react v0.344.0 - ISC
|
|
370
|
-
*
|
|
371
|
-
* This source code is licensed under the ISC license.
|
|
372
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
373
|
-
*/const R6=Q("Table",[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]]);/**
|
|
374
|
-
* @license lucide-react v0.344.0 - ISC
|
|
375
|
-
*
|
|
376
|
-
* This source code is licensed under the ISC license.
|
|
377
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
378
|
-
*/const A6=Q("Tag",[["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"}]]);/**
|
|
379
|
-
* @license lucide-react v0.344.0 - ISC
|
|
380
|
-
*
|
|
381
|
-
* This source code is licensed under the ISC license.
|
|
382
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
383
|
-
*/const ji=Q("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
|
|
384
|
-
* @license lucide-react v0.344.0 - ISC
|
|
385
|
-
*
|
|
386
|
-
* This source code is licensed under the ISC license.
|
|
387
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
388
|
-
*/const D6=Q("TrendingDown",[["polyline",{points:"22 17 13.5 8.5 8.5 13.5 2 7",key:"1r2t7k"}],["polyline",{points:"16 17 22 17 22 11",key:"11uiuu"}]]);/**
|
|
389
|
-
* @license lucide-react v0.344.0 - ISC
|
|
390
|
-
*
|
|
391
|
-
* This source code is licensed under the ISC license.
|
|
392
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
393
|
-
*/const Wl=Q("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/**
|
|
394
|
-
* @license lucide-react v0.344.0 - ISC
|
|
395
|
-
*
|
|
396
|
-
* This source code is licensed under the ISC license.
|
|
397
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
398
|
-
*/const Wi=Q("Trophy",[["path",{d:"M6 9H4.5a2.5 2.5 0 0 1 0-5H6",key:"17hqa7"}],["path",{d:"M18 9h1.5a2.5 2.5 0 0 0 0-5H18",key:"lmptdp"}],["path",{d:"M4 22h16",key:"57wxv0"}],["path",{d:"M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22",key:"1nw9bq"}],["path",{d:"M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22",key:"1np0yb"}],["path",{d:"M18 2H6v7a6 6 0 0 0 12 0V2Z",key:"u46fv3"}]]);/**
|
|
399
|
-
* @license lucide-react v0.344.0 - ISC
|
|
400
|
-
*
|
|
401
|
-
* This source code is licensed under the ISC license.
|
|
402
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
403
|
-
*/const Yr=Q("XCircle",[["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"}]]);/**
|
|
404
|
-
* @license lucide-react v0.344.0 - ISC
|
|
405
|
-
*
|
|
406
|
-
* This source code is licensed under the ISC license.
|
|
407
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
408
|
-
*/const cb=Q("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
|
|
409
|
-
* @license lucide-react v0.344.0 - ISC
|
|
410
|
-
*
|
|
411
|
-
* This source code is licensed under the ISC license.
|
|
412
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
413
|
-
*/const Gu=Q("Zap",[["polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2",key:"45s27k"}]]),ub=k.createContext({});function db(e){const t=k.useRef(null);return t.current===null&&(t.current=e()),t.current}const fb=typeof window<"u",dM=fb?k.useLayoutEffect:k.useEffect,Rd=k.createContext(null);function hb(e,t){e.indexOf(t)===-1&&e.push(t)}function pb(e,t){const r=e.indexOf(t);r>-1&&e.splice(r,1)}const Ln=(e,t,r)=>r>t?t:r<e?e:r;let mb=()=>{};const On={},fM=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function hM(e){return typeof e=="object"&&e!==null}const pM=e=>/^0[^.\s]+$/u.test(e);function gb(e){let t;return()=>(t===void 0&&(t=e()),t)}const Mr=e=>e,I6=(e,t)=>r=>t(e(r)),Gl=(...e)=>e.reduce(I6),_l=(e,t,r)=>{const n=t-e;return n===0?1:(r-e)/n};class yb{constructor(){this.subscriptions=[]}add(t){return hb(this.subscriptions,t),()=>pb(this.subscriptions,t)}notify(t,r,n){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,r,n);else for(let i=0;i<s;i++){const a=this.subscriptions[i];a&&a(t,r,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const un=e=>e*1e3,Cr=e=>e/1e3;function mM(e,t){return t?e*(1e3/t):0}const gM=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,L6=1e-7,O6=12;function z6(e,t,r,n,s){let i,a,o=0;do a=t+(r-t)/2,i=gM(a,n,s)-e,i>0?r=a:t=a;while(Math.abs(i)>L6&&++o<O6);return a}function Kl(e,t,r,n){if(e===t&&r===n)return Mr;const s=i=>z6(i,0,1,e,r);return i=>i===0||i===1?i:gM(s(i),t,n)}const yM=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,xM=e=>t=>1-e(1-t),vM=Kl(.33,1.53,.69,.99),xb=xM(vM),bM=yM(xb),wM=e=>(e*=2)<1?.5*xb(e):.5*(2-Math.pow(2,-10*(e-1))),vb=e=>1-Math.sin(Math.acos(e)),kM=xM(vb),jM=yM(vb),F6=Kl(.42,0,1,1),$6=Kl(0,0,.58,1),_M=Kl(.42,0,.58,1),V6=e=>Array.isArray(e)&&typeof e[0]!="number",SM=e=>Array.isArray(e)&&typeof e[0]=="number",q6={linear:Mr,easeIn:F6,easeInOut:_M,easeOut:$6,circIn:vb,circInOut:jM,circOut:kM,backIn:xb,backInOut:bM,backOut:vM,anticipate:wM},B6=e=>typeof e=="string",c2=e=>{if(SM(e)){mb(e.length===4);const[t,r,n,s]=e;return Kl(t,r,n,s)}else if(B6(e))return q6[e];return e},Cc=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function U6(e,t){let r=new Set,n=new Set,s=!1,i=!1;const a=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function l(u){a.has(u)&&(d.schedule(u),e()),u(o)}const d={schedule:(u,f=!1,h=!1)=>{const m=h&&s?r:n;return f&&a.add(u),m.has(u)||m.add(u),u},cancel:u=>{n.delete(u),a.delete(u)},process:u=>{if(o=u,s){i=!0;return}s=!0,[r,n]=[n,r],r.forEach(l),r.clear(),s=!1,i&&(i=!1,d.process(u))}};return d}const H6=40;function NM(e,t){let r=!1,n=!0;const s={delta:0,timestamp:0,isProcessing:!1},i=()=>r=!0,a=Cc.reduce((v,w)=>(v[w]=U6(i),v),{}),{setup:o,read:l,resolveKeyframes:d,preUpdate:u,update:f,preRender:h,render:p,postRender:m}=a,g=()=>{const v=On.useManualTiming?s.timestamp:performance.now();r=!1,On.useManualTiming||(s.delta=n?1e3/60:Math.max(Math.min(v-s.timestamp,H6),1)),s.timestamp=v,s.isProcessing=!0,o.process(s),l.process(s),d.process(s),u.process(s),f.process(s),h.process(s),p.process(s),m.process(s),s.isProcessing=!1,r&&t&&(n=!1,e(g))},b=()=>{r=!0,n=!0,s.isProcessing||e(g)};return{schedule:Cc.reduce((v,w)=>{const _=a[w];return v[w]=(N,j=!1,E=!1)=>(r||b(),_.schedule(N,j,E)),v},{}),cancel:v=>{for(let w=0;w<Cc.length;w++)a[Cc[w]].cancel(v)},state:s,steps:a}}const{schedule:Ke,cancel:Ms,state:Rt,steps:Hf}=NM(typeof requestAnimationFrame<"u"?requestAnimationFrame:Mr,!0);let ou;function W6(){ou=void 0}const er={now:()=>(ou===void 0&&er.set(Rt.isProcessing||On.useManualTiming?Rt.timestamp:performance.now()),ou),set:e=>{ou=e,queueMicrotask(W6)}},EM=e=>t=>typeof t=="string"&&t.startsWith(e),bb=EM("--"),G6=EM("var(--"),wb=e=>G6(e)?K6.test(e.split("/*")[0].trim()):!1,K6=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Ba={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Sl={...Ba,transform:e=>Ln(0,1,e)},Tc={...Ba,default:1},Xo=e=>Math.round(e*1e5)/1e5,kb=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Y6(e){return e==null}const X6=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,jb=(e,t)=>r=>!!(typeof r=="string"&&X6.test(r)&&r.startsWith(e)||t&&!Y6(r)&&Object.prototype.hasOwnProperty.call(r,t)),CM=(e,t,r)=>n=>{if(typeof n!="string")return n;const[s,i,a,o]=n.match(kb);return{[e]:parseFloat(s),[t]:parseFloat(i),[r]:parseFloat(a),alpha:o!==void 0?parseFloat(o):1}},Z6=e=>Ln(0,255,e),Wf={...Ba,transform:e=>Math.round(Z6(e))},si={test:jb("rgb","red"),parse:CM("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+Wf.transform(e)+", "+Wf.transform(t)+", "+Wf.transform(r)+", "+Xo(Sl.transform(n))+")"};function Q6(e){let t="",r="",n="",s="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),n=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),n=e.substring(3,4),s=e.substring(4,5),t+=t,r+=r,n+=n,s+=s),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:s?parseInt(s,16)/255:1}}const mx={test:jb("#"),parse:Q6,transform:si.transform},Yl=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),is=Yl("deg"),dn=Yl("%"),de=Yl("px"),J6=Yl("vh"),eO=Yl("vw"),u2={...dn,parse:e=>dn.parse(e)/100,transform:e=>dn.transform(e*100)},ia={test:jb("hsl","hue"),parse:CM("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+dn.transform(Xo(t))+", "+dn.transform(Xo(r))+", "+Xo(Sl.transform(n))+")"},pt={test:e=>si.test(e)||mx.test(e)||ia.test(e),parse:e=>si.test(e)?si.parse(e):ia.test(e)?ia.parse(e):mx.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?si.transform(e):ia.transform(e),getAnimatableNone:e=>{const t=pt.parse(e);return t.alpha=0,pt.transform(t)}},tO=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function rO(e){var t,r;return isNaN(e)&&typeof e=="string"&&(((t=e.match(kb))==null?void 0:t.length)||0)+(((r=e.match(tO))==null?void 0:r.length)||0)>0}const TM="number",PM="color",nO="var",sO="var(",d2="${}",iO=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Nl(e){const t=e.toString(),r=[],n={color:[],number:[],var:[]},s=[];let i=0;const o=t.replace(iO,l=>(pt.test(l)?(n.color.push(i),s.push(PM),r.push(pt.parse(l))):l.startsWith(sO)?(n.var.push(i),s.push(nO),r.push(l)):(n.number.push(i),s.push(TM),r.push(parseFloat(l))),++i,d2)).split(d2);return{values:r,split:o,indexes:n,types:s}}function MM(e){return Nl(e).values}function RM(e){const{split:t,types:r}=Nl(e),n=t.length;return s=>{let i="";for(let a=0;a<n;a++)if(i+=t[a],s[a]!==void 0){const o=r[a];o===TM?i+=Xo(s[a]):o===PM?i+=pt.transform(s[a]):i+=s[a]}return i}}const aO=e=>typeof e=="number"?0:pt.test(e)?pt.getAnimatableNone(e):e;function oO(e){const t=MM(e);return RM(e)(t.map(aO))}const Rs={test:rO,parse:MM,createTransformer:RM,getAnimatableNone:oO};function Gf(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function lO({hue:e,saturation:t,lightness:r,alpha:n}){e/=360,t/=100,r/=100;let s=0,i=0,a=0;if(!t)s=i=a=r;else{const o=r<.5?r*(1+t):r+t-r*t,l=2*r-o;s=Gf(l,o,e+1/3),i=Gf(l,o,e),a=Gf(l,o,e-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(a*255),alpha:n}}function Ku(e,t){return r=>r>0?t:e}const et=(e,t,r)=>e+(t-e)*r,Kf=(e,t,r)=>{const n=e*e,s=r*(t*t-n)+n;return s<0?0:Math.sqrt(s)},cO=[mx,si,ia],uO=e=>cO.find(t=>t.test(e));function f2(e){const t=uO(e);if(!t)return!1;let r=t.parse(e);return t===ia&&(r=lO(r)),r}const h2=(e,t)=>{const r=f2(e),n=f2(t);if(!r||!n)return Ku(e,t);const s={...r};return i=>(s.red=Kf(r.red,n.red,i),s.green=Kf(r.green,n.green,i),s.blue=Kf(r.blue,n.blue,i),s.alpha=et(r.alpha,n.alpha,i),si.transform(s))},gx=new Set(["none","hidden"]);function dO(e,t){return gx.has(e)?r=>r<=0?e:t:r=>r>=1?t:e}function fO(e,t){return r=>et(e,t,r)}function _b(e){return typeof e=="number"?fO:typeof e=="string"?wb(e)?Ku:pt.test(e)?h2:mO:Array.isArray(e)?AM:typeof e=="object"?pt.test(e)?h2:hO:Ku}function AM(e,t){const r=[...e],n=r.length,s=e.map((i,a)=>_b(i)(i,t[a]));return i=>{for(let a=0;a<n;a++)r[a]=s[a](i);return r}}function hO(e,t){const r={...e,...t},n={};for(const s in r)e[s]!==void 0&&t[s]!==void 0&&(n[s]=_b(e[s])(e[s],t[s]));return s=>{for(const i in n)r[i]=n[i](s);return r}}function pO(e,t){const r=[],n={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const i=t.types[s],a=e.indexes[i][n[i]],o=e.values[a]??0;r[s]=o,n[i]++}return r}const mO=(e,t)=>{const r=Rs.createTransformer(t),n=Nl(e),s=Nl(t);return n.indexes.var.length===s.indexes.var.length&&n.indexes.color.length===s.indexes.color.length&&n.indexes.number.length>=s.indexes.number.length?gx.has(e)&&!s.values.length||gx.has(t)&&!n.values.length?dO(e,t):Gl(AM(pO(n,s),s.values),r):Ku(e,t)};function DM(e,t,r){return typeof e=="number"&&typeof t=="number"&&typeof r=="number"?et(e,t,r):_b(e)(e,t)}const gO=e=>{const t=({timestamp:r})=>e(r);return{start:(r=!0)=>Ke.update(t,r),stop:()=>Ms(t),now:()=>Rt.isProcessing?Rt.timestamp:er.now()}},IM=(e,t,r=10)=>{let n="";const s=Math.max(Math.round(t/r),2);for(let i=0;i<s;i++)n+=Math.round(e(i/(s-1))*1e4)/1e4+", ";return`linear(${n.substring(0,n.length-2)})`},Yu=2e4;function Sb(e){let t=0;const r=50;let n=e.next(t);for(;!n.done&&t<Yu;)t+=r,n=e.next(t);return t>=Yu?1/0:t}function yO(e,t=100,r){const n=r({...e,keyframes:[0,t]}),s=Math.min(Sb(n),Yu);return{type:"keyframes",ease:i=>n.next(s*i).value/t,duration:Cr(s)}}const xO=5;function LM(e,t,r){const n=Math.max(t-xO,0);return mM(r-e(n),t-n)}const it={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Yf=.001;function vO({duration:e=it.duration,bounce:t=it.bounce,velocity:r=it.velocity,mass:n=it.mass}){let s,i,a=1-t;a=Ln(it.minDamping,it.maxDamping,a),e=Ln(it.minDuration,it.maxDuration,Cr(e)),a<1?(s=d=>{const u=d*a,f=u*e,h=u-r,p=yx(d,a),m=Math.exp(-f);return Yf-h/p*m},i=d=>{const f=d*a*e,h=f*r+r,p=Math.pow(a,2)*Math.pow(d,2)*e,m=Math.exp(-f),g=yx(Math.pow(d,2),a);return(-s(d)+Yf>0?-1:1)*((h-p)*m)/g}):(s=d=>{const u=Math.exp(-d*e),f=(d-r)*e+1;return-Yf+u*f},i=d=>{const u=Math.exp(-d*e),f=(r-d)*(e*e);return u*f});const o=5/e,l=wO(s,i,o);if(e=un(e),isNaN(l))return{stiffness:it.stiffness,damping:it.damping,duration:e};{const d=Math.pow(l,2)*n;return{stiffness:d,damping:a*2*Math.sqrt(n*d),duration:e}}}const bO=12;function wO(e,t,r){let n=r;for(let s=1;s<bO;s++)n=n-e(n)/t(n);return n}function yx(e,t){return e*Math.sqrt(1-t*t)}const kO=["duration","bounce"],jO=["stiffness","damping","mass"];function p2(e,t){return t.some(r=>e[r]!==void 0)}function _O(e){let t={velocity:it.velocity,stiffness:it.stiffness,damping:it.damping,mass:it.mass,isResolvedFromDuration:!1,...e};if(!p2(e,jO)&&p2(e,kO))if(e.visualDuration){const r=e.visualDuration,n=2*Math.PI/(r*1.2),s=n*n,i=2*Ln(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:it.mass,stiffness:s,damping:i}}else{const r=vO(e);t={...t,...r,mass:it.mass},t.isResolvedFromDuration=!0}return t}function Xu(e=it.visualDuration,t=it.bounce){const r=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:n,restDelta:s}=r;const i=r.keyframes[0],a=r.keyframes[r.keyframes.length-1],o={done:!1,value:i},{stiffness:l,damping:d,mass:u,duration:f,velocity:h,isResolvedFromDuration:p}=_O({...r,velocity:-Cr(r.velocity||0)}),m=h||0,g=d/(2*Math.sqrt(l*u)),b=a-i,x=Cr(Math.sqrt(l/u)),y=Math.abs(b)<5;n||(n=y?it.restSpeed.granular:it.restSpeed.default),s||(s=y?it.restDelta.granular:it.restDelta.default);let v;if(g<1){const _=yx(x,g);v=N=>{const j=Math.exp(-g*x*N);return a-j*((m+g*x*b)/_*Math.sin(_*N)+b*Math.cos(_*N))}}else if(g===1)v=_=>a-Math.exp(-x*_)*(b+(m+x*b)*_);else{const _=x*Math.sqrt(g*g-1);v=N=>{const j=Math.exp(-g*x*N),E=Math.min(_*N,300);return a-j*((m+g*x*b)*Math.sinh(E)+_*b*Math.cosh(E))/_}}const w={calculatedDuration:p&&f||null,next:_=>{const N=v(_);if(p)o.done=_>=f;else{let j=_===0?m:0;g<1&&(j=_===0?un(m):LM(v,_,N));const E=Math.abs(j)<=n,M=Math.abs(a-N)<=s;o.done=E&&M}return o.value=o.done?a:N,o},toString:()=>{const _=Math.min(Sb(w),Yu),N=IM(j=>w.next(_*j).value,_,30);return _+"ms "+N},toTransition:()=>{}};return w}Xu.applyToOptions=e=>{const t=yO(e,100,Xu);return e.ease=t.ease,e.duration=un(t.duration),e.type="keyframes",e};function xx({keyframes:e,velocity:t=0,power:r=.8,timeConstant:n=325,bounceDamping:s=10,bounceStiffness:i=500,modifyTarget:a,min:o,max:l,restDelta:d=.5,restSpeed:u}){const f=e[0],h={done:!1,value:f},p=E=>o!==void 0&&E<o||l!==void 0&&E>l,m=E=>o===void 0?l:l===void 0||Math.abs(o-E)<Math.abs(l-E)?o:l;let g=r*t;const b=f+g,x=a===void 0?b:a(b);x!==b&&(g=x-f);const y=E=>-g*Math.exp(-E/n),v=E=>x+y(E),w=E=>{const M=y(E),C=v(E);h.done=Math.abs(M)<=d,h.value=h.done?x:C};let _,N;const j=E=>{p(h.value)&&(_=E,N=Xu({keyframes:[h.value,m(h.value)],velocity:LM(v,E,h.value),damping:s,stiffness:i,restDelta:d,restSpeed:u}))};return j(0),{calculatedDuration:null,next:E=>{let M=!1;return!N&&_===void 0&&(M=!0,w(E),j(E)),_!==void 0&&E>=_?N.next(E-_):(!M&&w(E),h)}}}function SO(e,t,r){const n=[],s=r||On.mix||DM,i=e.length-1;for(let a=0;a<i;a++){let o=s(e[a],e[a+1]);if(t){const l=Array.isArray(t)?t[a]||Mr:t;o=Gl(l,o)}n.push(o)}return n}function NO(e,t,{clamp:r=!0,ease:n,mixer:s}={}){const i=e.length;if(mb(i===t.length),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const o=SO(t,n,s),l=o.length,d=u=>{if(a&&u<e[0])return t[0];let f=0;if(l>1)for(;f<e.length-2&&!(u<e[f+1]);f++);const h=_l(e[f],e[f+1],u);return o[f](h)};return r?u=>d(Ln(e[0],e[i-1],u)):d}function EO(e,t){const r=e[e.length-1];for(let n=1;n<=t;n++){const s=_l(0,t,n);e.push(et(r,1,s))}}function CO(e){const t=[0];return EO(t,e.length-1),t}function TO(e,t){return e.map(r=>r*t)}function PO(e,t){return e.map(()=>t||_M).splice(0,e.length-1)}function Zo({duration:e=300,keyframes:t,times:r,ease:n="easeInOut"}){const s=V6(n)?n.map(c2):c2(n),i={done:!1,value:t[0]},a=TO(r&&r.length===t.length?r:CO(t),e),o=NO(a,t,{ease:Array.isArray(s)?s:PO(t,s)});return{calculatedDuration:e,next:l=>(i.value=o(l),i.done=l>=e,i)}}const MO=e=>e!==null;function Nb(e,{repeat:t,repeatType:r="loop"},n,s=1){const i=e.filter(MO),o=s<0||t&&r!=="loop"&&t%2===1?0:i.length-1;return!o||n===void 0?i[o]:n}const RO={decay:xx,inertia:xx,tween:Zo,keyframes:Zo,spring:Xu};function OM(e){typeof e.type=="string"&&(e.type=RO[e.type])}class Eb{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,r){return this.finished.then(t,r)}}const AO=e=>e/100;class Cb extends Eb{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var n,s;const{motionValue:r}=this.options;r&&r.updatedAt!==er.now()&&this.tick(er.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(s=(n=this.options).onStop)==null||s.call(n))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;OM(t);const{type:r=Zo,repeat:n=0,repeatDelay:s=0,repeatType:i,velocity:a=0}=t;let{keyframes:o}=t;const l=r||Zo;l!==Zo&&typeof o[0]!="number"&&(this.mixKeyframes=Gl(AO,DM(o[0],o[1])),o=[0,100]);const d=l({...t,keyframes:o});i==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...o].reverse(),velocity:-a})),d.calculatedDuration===null&&(d.calculatedDuration=Sb(d));const{calculatedDuration:u}=d;this.calculatedDuration=u,this.resolvedDuration=u+s,this.totalDuration=this.resolvedDuration*(n+1)-s,this.generator=d}updateTime(t){const r=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=r}tick(t,r=!1){const{generator:n,totalDuration:s,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:l}=this;if(this.startTime===null)return n.next(0);const{delay:d=0,keyframes:u,repeat:f,repeatType:h,repeatDelay:p,type:m,onUpdate:g,finalKeyframe:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),r?this.currentTime=t:this.updateTime(t);const x=this.currentTime-d*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?x<0:x>s;this.currentTime=Math.max(x,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let v=this.currentTime,w=n;if(f){const E=Math.min(this.currentTime,s)/o;let M=Math.floor(E),C=E%1;!C&&E>=1&&(C=1),C===1&&M--,M=Math.min(M,f+1),!!(M%2)&&(h==="reverse"?(C=1-C,p&&(C-=p/o)):h==="mirror"&&(w=a)),v=Ln(0,1,C)*o}const _=y?{done:!1,value:u[0]}:w.next(v);i&&(_.value=i(_.value));let{done:N}=_;!y&&l!==null&&(N=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const j=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&N);return j&&m!==xx&&(_.value=Nb(u,this.options,b,this.speed)),g&&g(_.value),j&&this.finish(),_}then(t,r){return this.finished.then(t,r)}get duration(){return Cr(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Cr(t)}get time(){return Cr(this.currentTime)}set time(t){var r;t=un(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(r=this.driver)==null||r.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(er.now());const r=this.playbackSpeed!==t;this.playbackSpeed=t,r&&(this.time=Cr(this.currentTime))}play(){var s,i;if(this.isStopped)return;const{driver:t=gO,startTime:r}=this.options;this.driver||(this.driver=t(a=>this.tick(a))),(i=(s=this.options).onPlay)==null||i.call(s);const n=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=n):this.holdTime!==null?this.startTime=n-this.holdTime:this.startTime||(this.startTime=r??n),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(er.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,r;this.notifyFinished(),this.teardown(),this.state="finished",(r=(t=this.options).onComplete)==null||r.call(t)}cancel(){var t,r;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(r=(t=this.options).onCancel)==null||r.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var r;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(r=this.driver)==null||r.stop(),t.observe(this)}}function DO(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const ii=e=>e*180/Math.PI,vx=e=>{const t=ii(Math.atan2(e[1],e[0]));return bx(t)},IO={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:vx,rotateZ:vx,skewX:e=>ii(Math.atan(e[1])),skewY:e=>ii(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},bx=e=>(e=e%360,e<0&&(e+=360),e),m2=vx,g2=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),y2=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),LO={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:g2,scaleY:y2,scale:e=>(g2(e)+y2(e))/2,rotateX:e=>bx(ii(Math.atan2(e[6],e[5]))),rotateY:e=>bx(ii(Math.atan2(-e[2],e[0]))),rotateZ:m2,rotate:m2,skewX:e=>ii(Math.atan(e[4])),skewY:e=>ii(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function wx(e){return e.includes("scale")?1:0}function kx(e,t){if(!e||e==="none")return wx(t);const r=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,s;if(r)n=LO,s=r;else{const o=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=IO,s=o}if(!s)return wx(t);const i=n[t],a=s[1].split(",").map(zO);return typeof i=="function"?i(a):a[i]}const OO=(e,t)=>{const{transform:r="none"}=getComputedStyle(e);return kx(r,t)};function zO(e){return parseFloat(e.trim())}const Ua=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ha=new Set(Ua),x2=e=>e===Ba||e===de,FO=new Set(["x","y","z"]),$O=Ua.filter(e=>!FO.has(e));function VO(e){const t=[];return $O.forEach(r=>{const n=e.getValue(r);n!==void 0&&(t.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),t}const di={width:({x:e},{paddingLeft:t="0",paddingRight:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),height:({y:e},{paddingTop:t="0",paddingBottom:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>kx(t,"x"),y:(e,{transform:t})=>kx(t,"y")};di.translateX=di.x;di.translateY=di.y;const fi=new Set;let jx=!1,_x=!1,Sx=!1;function zM(){if(_x){const e=Array.from(fi).filter(n=>n.needsMeasurement),t=new Set(e.map(n=>n.element)),r=new Map;t.forEach(n=>{const s=VO(n);s.length&&(r.set(n,s),n.render())}),e.forEach(n=>n.measureInitialState()),t.forEach(n=>{n.render();const s=r.get(n);s&&s.forEach(([i,a])=>{var o;(o=n.getValue(i))==null||o.set(a)})}),e.forEach(n=>n.measureEndState()),e.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}_x=!1,jx=!1,fi.forEach(e=>e.complete(Sx)),fi.clear()}function FM(){fi.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(_x=!0)})}function qO(){Sx=!0,FM(),zM(),Sx=!1}class Tb{constructor(t,r,n,s,i,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=r,this.name=n,this.motionValue=s,this.element=i,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(fi.add(this),jx||(jx=!0,Ke.read(FM),Ke.resolveKeyframes(zM))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:r,element:n,motionValue:s}=this;if(t[0]===null){const i=s==null?void 0:s.get(),a=t[t.length-1];if(i!==void 0)t[0]=i;else if(n&&r){const o=n.readValue(r,a);o!=null&&(t[0]=o)}t[0]===void 0&&(t[0]=a),s&&i===void 0&&s.set(t[0])}DO(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),fi.delete(this)}cancel(){this.state==="scheduled"&&(fi.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const BO=e=>e.startsWith("--");function UO(e,t,r){BO(t)?e.style.setProperty(t,r):e.style[t]=r}const HO=gb(()=>window.ScrollTimeline!==void 0),WO={};function GO(e,t){const r=gb(e);return()=>WO[t]??r()}const $M=GO(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),To=([e,t,r,n])=>`cubic-bezier(${e}, ${t}, ${r}, ${n})`,v2={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:To([0,.65,.55,1]),circOut:To([.55,0,1,.45]),backIn:To([.31,.01,.66,-.59]),backOut:To([.33,1.53,.69,.99])};function VM(e,t){if(e)return typeof e=="function"?$M()?IM(e,t):"ease-out":SM(e)?To(e):Array.isArray(e)?e.map(r=>VM(r,t)||v2.easeOut):v2[e]}function KO(e,t,r,{delay:n=0,duration:s=300,repeat:i=0,repeatType:a="loop",ease:o="easeOut",times:l}={},d=void 0){const u={[t]:r};l&&(u.offset=l);const f=VM(o,s);Array.isArray(f)&&(u.easing=f);const h={delay:n,duration:s,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:i+1,direction:a==="reverse"?"alternate":"normal"};return d&&(h.pseudoElement=d),e.animate(u,h)}function qM(e){return typeof e=="function"&&"applyToOptions"in e}function YO({type:e,...t}){return qM(e)&&$M()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class XO extends Eb{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:r,name:n,keyframes:s,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:l}=t;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=t,mb(typeof t.type!="string");const d=YO(t);this.animation=KO(r,n,s,d,i),d.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const u=Nb(s,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(u):UO(r,n,u),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,r;(r=(t=this.animation).finish)==null||r.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,r;this.isPseudoElement||(r=(t=this.animation).commitStyles)==null||r.call(t)}get duration(){var r,n;const t=((n=(r=this.animation.effect)==null?void 0:r.getComputedTiming)==null?void 0:n.call(r).duration)||0;return Cr(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Cr(t)}get time(){return Cr(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=un(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:r}){var n;return this.allowFlatten&&((n=this.animation.effect)==null||n.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&HO()?(this.animation.timeline=t,Mr):r(this)}}const BM={anticipate:wM,backInOut:bM,circInOut:jM};function ZO(e){return e in BM}function QO(e){typeof e.ease=="string"&&ZO(e.ease)&&(e.ease=BM[e.ease])}const b2=10;class JO extends XO{constructor(t){QO(t),OM(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:r,onUpdate:n,onComplete:s,element:i,...a}=this.options;if(!r)return;if(t!==void 0){r.set(t);return}const o=new Cb({...a,autoplay:!1}),l=un(this.finishedTime??this.time);r.setWithVelocity(o.sample(l-b2).value,o.sample(l).value,b2),o.stop()}}const w2=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Rs.test(e)||e==="0")&&!e.startsWith("url("));function ez(e){const t=e[0];if(e.length===1)return!0;for(let r=0;r<e.length;r++)if(e[r]!==t)return!0}function tz(e,t,r,n){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],a=w2(s,t),o=w2(i,t);return!a||!o?!1:ez(e)||(r==="spring"||qM(r))&&n}function Nx(e){e.duration=0,e.type="keyframes"}const rz=new Set(["opacity","clipPath","filter","transform"]),nz=gb(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function sz(e){var u;const{motionValue:t,name:r,repeatDelay:n,repeatType:s,damping:i,type:a}=e;if(!(((u=t==null?void 0:t.owner)==null?void 0:u.current)instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:d}=t.owner.getProps();return nz()&&r&&rz.has(r)&&(r!=="transform"||!d)&&!l&&!n&&s!=="mirror"&&i!==0&&a!=="inertia"}const iz=40;class az extends Eb{constructor({autoplay:t=!0,delay:r=0,type:n="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:a="loop",keyframes:o,name:l,motionValue:d,element:u,...f}){var m;super(),this.stop=()=>{var g,b;this._animation&&(this._animation.stop(),(g=this.stopTimeline)==null||g.call(this)),(b=this.keyframeResolver)==null||b.cancel()},this.createdAt=er.now();const h={autoplay:t,delay:r,type:n,repeat:s,repeatDelay:i,repeatType:a,name:l,motionValue:d,element:u,...f},p=(u==null?void 0:u.KeyframeResolver)||Tb;this.keyframeResolver=new p(o,(g,b,x)=>this.onKeyframesResolved(g,b,h,!x),l,d,u),(m=this.keyframeResolver)==null||m.scheduleResolve()}onKeyframesResolved(t,r,n,s){this.keyframeResolver=void 0;const{name:i,type:a,velocity:o,delay:l,isHandoff:d,onUpdate:u}=n;this.resolvedAt=er.now(),tz(t,i,a,o)||((On.instantAnimations||!l)&&(u==null||u(Nb(t,n,r))),t[0]=t[t.length-1],Nx(n),n.repeat=0);const h={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>iz?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:r,...n,keyframes:t},p=!d&&sz(h)?new JO({...h,element:h.motionValue.owner.current}):new Cb(h);p.finished.then(()=>this.notifyFinished()).catch(Mr),this.pendingTimeline&&(this.stopTimeline=p.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=p}get finished(){return this._animation?this.animation.finished:this._finished}then(t,r){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),qO()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}const oz=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function lz(e){const t=oz.exec(e);if(!t)return[,];const[,r,n,s]=t;return[`--${r??n}`,s]}function UM(e,t,r=1){const[n,s]=lz(e);if(!n)return;const i=window.getComputedStyle(t).getPropertyValue(n);if(i){const a=i.trim();return fM(a)?parseFloat(a):a}return wb(s)?UM(s,t,r+1):s}function Pb(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const HM=new Set(["width","height","top","left","right","bottom",...Ua]),cz={test:e=>e==="auto",parse:e=>e},WM=e=>t=>t.test(e),GM=[Ba,de,dn,is,eO,J6,cz],k2=e=>GM.find(WM(e));function uz(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||pM(e):!0}const dz=new Set(["brightness","contrast","saturate","opacity"]);function fz(e){const[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[n]=r.match(kb)||[];if(!n)return e;const s=r.replace(n,"");let i=dz.has(t)?1:0;return n!==r&&(i*=100),t+"("+i+s+")"}const hz=/\b([a-z-]*)\(.*?\)/gu,Ex={...Rs,getAnimatableNone:e=>{const t=e.match(hz);return t?t.map(fz).join(" "):e}},j2={...Ba,transform:Math.round},pz={rotate:is,rotateX:is,rotateY:is,rotateZ:is,scale:Tc,scaleX:Tc,scaleY:Tc,scaleZ:Tc,skew:is,skewX:is,skewY:is,distance:de,translateX:de,translateY:de,translateZ:de,x:de,y:de,z:de,perspective:de,transformPerspective:de,opacity:Sl,originX:u2,originY:u2,originZ:de},Mb={borderWidth:de,borderTopWidth:de,borderRightWidth:de,borderBottomWidth:de,borderLeftWidth:de,borderRadius:de,radius:de,borderTopLeftRadius:de,borderTopRightRadius:de,borderBottomRightRadius:de,borderBottomLeftRadius:de,width:de,maxWidth:de,height:de,maxHeight:de,top:de,right:de,bottom:de,left:de,padding:de,paddingTop:de,paddingRight:de,paddingBottom:de,paddingLeft:de,margin:de,marginTop:de,marginRight:de,marginBottom:de,marginLeft:de,backgroundPositionX:de,backgroundPositionY:de,...pz,zIndex:j2,fillOpacity:Sl,strokeOpacity:Sl,numOctaves:j2},mz={...Mb,color:pt,backgroundColor:pt,outlineColor:pt,fill:pt,stroke:pt,borderColor:pt,borderTopColor:pt,borderRightColor:pt,borderBottomColor:pt,borderLeftColor:pt,filter:Ex,WebkitFilter:Ex},KM=e=>mz[e];function YM(e,t){let r=KM(e);return r!==Ex&&(r=Rs),r.getAnimatableNone?r.getAnimatableNone(t):void 0}const gz=new Set(["auto","none","0"]);function yz(e,t,r){let n=0,s;for(;n<e.length&&!s;){const i=e[n];typeof i=="string"&&!gz.has(i)&&Nl(i).values.length&&(s=e[n]),n++}if(s&&r)for(const i of t)e[i]=YM(r,s)}class xz extends Tb{constructor(t,r,n,s,i){super(t,r,n,s,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:r,name:n}=this;if(!r||!r.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let d=t[l];if(typeof d=="string"&&(d=d.trim(),wb(d))){const u=UM(d,r.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!HM.has(n)||t.length!==2)return;const[s,i]=t,a=k2(s),o=k2(i);if(a!==o)if(x2(a)&&x2(o))for(let l=0;l<t.length;l++){const d=t[l];typeof d=="string"&&(t[l]=parseFloat(d))}else di[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:r}=this,n=[];for(let s=0;s<t.length;s++)(t[s]===null||uz(t[s]))&&n.push(s);n.length&&yz(t,n,r)}measureInitialState(){const{element:t,unresolvedKeyframes:r,name:n}=this;if(!t||!t.current)return;n==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=di[n](t.measureViewportBox(),window.getComputedStyle(t.current)),r[0]=this.measuredOrigin;const s=r[r.length-1];s!==void 0&&t.getValue(n,s).jump(s,!1)}measureEndState(){var o;const{element:t,name:r,unresolvedKeyframes:n}=this;if(!t||!t.current)return;const s=t.getValue(r);s&&s.jump(this.measuredOrigin,!1);const i=n.length-1,a=n[i];n[i]=di[r](t.measureViewportBox(),window.getComputedStyle(t.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),(o=this.removedTransforms)!=null&&o.length&&this.removedTransforms.forEach(([l,d])=>{t.getValue(l).set(d)}),this.resolveNoneKeyframes()}}function vz(e,t,r){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let n=document;const s=(r==null?void 0:r[e])??n.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e)}const XM=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function ZM(e){return hM(e)&&"offsetHeight"in e}const _2=30,bz=e=>!isNaN(parseFloat(e));class wz{constructor(t,r={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=n=>{var i;const s=er.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&((i=this.events.change)==null||i.notify(this.current),this.dependents))for(const a of this.dependents)a.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=r.owner}setCurrent(t){this.current=t,this.updatedAt=er.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=bz(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,r){this.events[t]||(this.events[t]=new yb);const n=this.events[t].add(r);return t==="change"?()=>{n(),Ke.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,r){this.passiveEffect=t,this.stopPassiveEffect=r}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,r,n){this.set(r),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,r=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,r&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=er.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>_2)return 0;const r=Math.min(this.updatedAt-this.prevUpdatedAt,_2);return mM(parseFloat(this.current)-parseFloat(this.prevFrameValue),r)}start(t){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=t(r),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,r;(t=this.dependents)==null||t.clear(),(r=this.events.destroy)==null||r.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Aa(e,t){return new wz(e,t)}const{schedule:Rb}=NM(queueMicrotask,!1),$r={x:!1,y:!1};function QM(){return $r.x||$r.y}function kz(e){return e==="x"||e==="y"?$r[e]?null:($r[e]=!0,()=>{$r[e]=!1}):$r.x||$r.y?null:($r.x=$r.y=!0,()=>{$r.x=$r.y=!1})}function JM(e,t){const r=vz(e),n=new AbortController,s={passive:!0,...t,signal:n.signal};return[r,s,()=>n.abort()]}function S2(e){return!(e.pointerType==="touch"||QM())}function jz(e,t,r={}){const[n,s,i]=JM(e,r),a=o=>{if(!S2(o))return;const{target:l}=o,d=t(l,o);if(typeof d!="function"||!l)return;const u=f=>{S2(f)&&(d(f),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,s)};return n.forEach(o=>{o.addEventListener("pointerenter",a,s)}),i}const eR=(e,t)=>t?e===t?!0:eR(e,t.parentElement):!1,Ab=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,_z=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Sz(e){return _z.has(e.tagName)||e.tabIndex!==-1}const lu=new WeakSet;function N2(e){return t=>{t.key==="Enter"&&e(t)}}function Xf(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Nz=(e,t)=>{const r=e.currentTarget;if(!r)return;const n=N2(()=>{if(lu.has(r))return;Xf(r,"down");const s=N2(()=>{Xf(r,"up")}),i=()=>Xf(r,"cancel");r.addEventListener("keyup",s,t),r.addEventListener("blur",i,t)});r.addEventListener("keydown",n,t),r.addEventListener("blur",()=>r.removeEventListener("keydown",n),t)};function E2(e){return Ab(e)&&!QM()}function Ez(e,t,r={}){const[n,s,i]=JM(e,r),a=o=>{const l=o.currentTarget;if(!E2(o))return;lu.add(l);const d=t(l,o),u=(p,m)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",h),lu.has(l)&&lu.delete(l),E2(p)&&typeof d=="function"&&d(p,{success:m})},f=p=>{u(p,l===window||l===document||r.useGlobalTarget||eR(l,p.target))},h=p=>{u(p,!1)};window.addEventListener("pointerup",f,s),window.addEventListener("pointercancel",h,s)};return n.forEach(o=>{(r.useGlobalTarget?window:o).addEventListener("pointerdown",a,s),ZM(o)&&(o.addEventListener("focus",d=>Nz(d,s)),!Sz(o)&&!o.hasAttribute("tabindex")&&(o.tabIndex=0))}),i}function tR(e){return hM(e)&&"ownerSVGElement"in e}function Cz(e){return tR(e)&&e.tagName==="svg"}const qt=e=>!!(e&&e.getVelocity),Tz=[...GM,pt,Rs],Pz=e=>Tz.find(WM(e)),Db=k.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function C2(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Mz(...e){return t=>{let r=!1;const n=e.map(s=>{const i=C2(s,t);return!r&&typeof i=="function"&&(r=!0),i});if(r)return()=>{for(let s=0;s<n.length;s++){const i=n[s];typeof i=="function"?i():C2(e[s],null)}}}}function Rz(...e){return k.useCallback(Mz(...e),e)}class Az extends k.Component{getSnapshotBeforeUpdate(t){const r=this.props.childRef.current;if(r&&t.isPresent&&!this.props.isPresent){const n=r.offsetParent,s=ZM(n)&&n.offsetWidth||0,i=this.props.sizeRef.current;i.height=r.offsetHeight||0,i.width=r.offsetWidth||0,i.top=r.offsetTop,i.left=r.offsetLeft,i.right=s-i.width-i.left}return null}componentDidUpdate(){}render(){return this.props.children}}function Dz({children:e,isPresent:t,anchorX:r,root:n}){const s=k.useId(),i=k.useRef(null),a=k.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:o}=k.useContext(Db),l=Rz(i,e==null?void 0:e.ref);return k.useInsertionEffect(()=>{const{width:d,height:u,top:f,left:h,right:p}=a.current;if(t||!i.current||!d||!u)return;const m=r==="left"?`left: ${h}`:`right: ${p}`;i.current.dataset.motionPopId=s;const g=document.createElement("style");o&&(g.nonce=o);const b=n??document.head;return b.appendChild(g),g.sheet&&g.sheet.insertRule(`
|
|
414
|
-
[data-motion-pop-id="${s}"] {
|
|
415
|
-
position: absolute !important;
|
|
416
|
-
width: ${d}px !important;
|
|
417
|
-
height: ${u}px !important;
|
|
418
|
-
${m}px !important;
|
|
419
|
-
top: ${f}px !important;
|
|
420
|
-
}
|
|
421
|
-
`),()=>{b.contains(g)&&b.removeChild(g)}},[t]),c.jsx(Az,{isPresent:t,childRef:i,sizeRef:a,children:k.cloneElement(e,{ref:l})})}const Iz=({children:e,initial:t,isPresent:r,onExitComplete:n,custom:s,presenceAffectsLayout:i,mode:a,anchorX:o,root:l})=>{const d=db(Lz),u=k.useId();let f=!0,h=k.useMemo(()=>(f=!1,{id:u,initial:t,isPresent:r,custom:s,onExitComplete:p=>{d.set(p,!0);for(const m of d.values())if(!m)return;n&&n()},register:p=>(d.set(p,!1),()=>d.delete(p))}),[r,d,n]);return i&&f&&(h={...h}),k.useMemo(()=>{d.forEach((p,m)=>d.set(m,!1))},[r]),k.useEffect(()=>{!r&&!d.size&&n&&n()},[r]),a==="popLayout"&&(e=c.jsx(Dz,{isPresent:r,anchorX:o,root:l,children:e})),c.jsx(Rd.Provider,{value:h,children:e})};function Lz(){return new Map}function rR(e=!0){const t=k.useContext(Rd);if(t===null)return[!0,null];const{isPresent:r,onExitComplete:n,register:s}=t,i=k.useId();k.useEffect(()=>{if(e)return s(i)},[e]);const a=k.useCallback(()=>e&&n&&n(i),[i,n,e]);return!r&&n?[!1,a]:[!0]}const Pc=e=>e.key||"";function T2(e){const t=[];return k.Children.forEach(e,r=>{k.isValidElement(r)&&t.push(r)}),t}const Xl=({children:e,custom:t,initial:r=!0,onExitComplete:n,presenceAffectsLayout:s=!0,mode:i="sync",propagate:a=!1,anchorX:o="left",root:l})=>{const[d,u]=rR(a),f=k.useMemo(()=>T2(e),[e]),h=a&&!d?[]:f.map(Pc),p=k.useRef(!0),m=k.useRef(f),g=db(()=>new Map),[b,x]=k.useState(f),[y,v]=k.useState(f);dM(()=>{p.current=!1,m.current=f;for(let N=0;N<y.length;N++){const j=Pc(y[N]);h.includes(j)?g.delete(j):g.get(j)!==!0&&g.set(j,!1)}},[y,h.length,h.join("-")]);const w=[];if(f!==b){let N=[...f];for(let j=0;j<y.length;j++){const E=y[j],M=Pc(E);h.includes(M)||(N.splice(j,0,E),w.push(E))}return i==="wait"&&w.length&&(N=w),v(T2(N)),x(f),null}const{forceRender:_}=k.useContext(ub);return c.jsx(c.Fragment,{children:y.map(N=>{const j=Pc(N),E=a&&!d?!1:f===y||h.includes(j),M=()=>{if(g.has(j))g.set(j,!0);else return;let C=!0;g.forEach(D=>{D||(C=!1)}),C&&(_==null||_(),v(m.current),a&&(u==null||u()),n&&n())};return c.jsx(Iz,{isPresent:E,initial:!p.current||r?void 0:!1,custom:t,presenceAffectsLayout:s,mode:i,root:l,onExitComplete:E?void 0:M,anchorX:o,children:N},j)})})},nR=k.createContext({strict:!1}),P2={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Da={};for(const e in P2)Da[e]={isEnabled:t=>P2[e].some(r=>!!t[r])};function Oz(e){for(const t in e)Da[t]={...Da[t],...e[t]}}const zz=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Zu(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||zz.has(e)}let sR=e=>!Zu(e);function Fz(e){typeof e=="function"&&(sR=t=>t.startsWith("on")?!Zu(t):e(t))}try{Fz(require("@emotion/is-prop-valid").default)}catch{}function $z(e,t,r){const n={};for(const s in e)s==="values"&&typeof e.values=="object"||(sR(s)||r===!0&&Zu(s)||!t&&!Zu(s)||e.draggable&&s.startsWith("onDrag"))&&(n[s]=e[s]);return n}const Ad=k.createContext({});function Dd(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function El(e){return typeof e=="string"||Array.isArray(e)}const Ib=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Lb=["initial",...Ib];function Id(e){return Dd(e.animate)||Lb.some(t=>El(e[t]))}function iR(e){return!!(Id(e)||e.variants)}function Vz(e,t){if(Id(e)){const{initial:r,animate:n}=e;return{initial:r===!1||El(r)?r:void 0,animate:El(n)?n:void 0}}return e.inherit!==!1?t:{}}function qz(e){const{initial:t,animate:r}=Vz(e,k.useContext(Ad));return k.useMemo(()=>({initial:t,animate:r}),[M2(t),M2(r)])}function M2(e){return Array.isArray(e)?e.join(" "):e}const Cl={};function Bz(e){for(const t in e)Cl[t]=e[t],bb(t)&&(Cl[t].isCSSVariable=!0)}function aR(e,{layout:t,layoutId:r}){return Ha.has(e)||e.startsWith("origin")||(t||r!==void 0)&&(!!Cl[e]||e==="opacity")}const Uz={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Hz=Ua.length;function Wz(e,t,r){let n="",s=!0;for(let i=0;i<Hz;i++){const a=Ua[i],o=e[a];if(o===void 0)continue;let l=!0;if(typeof o=="number"?l=o===(a.startsWith("scale")?1:0):l=parseFloat(o)===0,!l||r){const d=XM(o,Mb[a]);if(!l){s=!1;const u=Uz[a]||a;n+=`${u}(${d}) `}r&&(t[a]=d)}}return n=n.trim(),r?n=r(t,s?"":n):s&&(n="none"),n}function Ob(e,t,r){const{style:n,vars:s,transformOrigin:i}=e;let a=!1,o=!1;for(const l in t){const d=t[l];if(Ha.has(l)){a=!0;continue}else if(bb(l)){s[l]=d;continue}else{const u=XM(d,Mb[l]);l.startsWith("origin")?(o=!0,i[l]=u):n[l]=u}}if(t.transform||(a||r?n.transform=Wz(t,e.transform,r):n.transform&&(n.transform="none")),o){const{originX:l="50%",originY:d="50%",originZ:u=0}=i;n.transformOrigin=`${l} ${d} ${u}`}}const zb=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function oR(e,t,r){for(const n in t)!qt(t[n])&&!aR(n,r)&&(e[n]=t[n])}function Gz({transformTemplate:e},t){return k.useMemo(()=>{const r=zb();return Ob(r,t,e),Object.assign({},r.vars,r.style)},[t])}function Kz(e,t){const r=e.style||{},n={};return oR(n,r,e),Object.assign(n,Gz(e,t)),n}function Yz(e,t){const r={},n=Kz(e,t);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=n,r}const Xz={offset:"stroke-dashoffset",array:"stroke-dasharray"},Zz={offset:"strokeDashoffset",array:"strokeDasharray"};function Qz(e,t,r=1,n=0,s=!0){e.pathLength=1;const i=s?Xz:Zz;e[i.offset]=de.transform(-n);const a=de.transform(t),o=de.transform(r);e[i.array]=`${a} ${o}`}function lR(e,{attrX:t,attrY:r,attrScale:n,pathLength:s,pathSpacing:i=1,pathOffset:a=0,...o},l,d,u){if(Ob(e,o,d),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:h}=e;f.transform&&(h.transform=f.transform,delete f.transform),(h.transform||f.transformOrigin)&&(h.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),h.transform&&(h.transformBox=(u==null?void 0:u.transformBox)??"fill-box",delete f.transformBox),t!==void 0&&(f.x=t),r!==void 0&&(f.y=r),n!==void 0&&(f.scale=n),s!==void 0&&Qz(f,s,i,a,!1)}const cR=()=>({...zb(),attrs:{}}),uR=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Jz(e,t,r,n){const s=k.useMemo(()=>{const i=cR();return lR(i,t,uR(n),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};oR(i,e.style,e),s.style={...i,...s.style}}return s}const eF=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Fb(e){return typeof e!="string"||e.includes("-")?!1:!!(eF.indexOf(e)>-1||/[A-Z]/u.test(e))}function tF(e,t,r,{latestValues:n},s,i=!1){const o=(Fb(e)?Jz:Yz)(t,n,s,e),l=$z(t,typeof e=="string",i),d=e!==k.Fragment?{...l,...o,ref:r}:{},{children:u}=t,f=k.useMemo(()=>qt(u)?u.get():u,[u]);return k.createElement(e,{...d,children:f})}function R2(e){const t=[{},{}];return e==null||e.values.forEach((r,n)=>{t[0][n]=r.get(),t[1][n]=r.getVelocity()}),t}function $b(e,t,r,n){if(typeof t=="function"){const[s,i]=R2(n);t=t(r!==void 0?r:e.custom,s,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,i]=R2(n);t=t(r!==void 0?r:e.custom,s,i)}return t}function cu(e){return qt(e)?e.get():e}function rF({scrapeMotionValuesFromProps:e,createRenderState:t},r,n,s){return{latestValues:nF(r,n,s,e),renderState:t()}}function nF(e,t,r,n){const s={},i=n(e,{});for(const h in i)s[h]=cu(i[h]);let{initial:a,animate:o}=e;const l=Id(e),d=iR(e);t&&d&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),o===void 0&&(o=t.animate));let u=r?r.initial===!1:!1;u=u||a===!1;const f=u?o:a;if(f&&typeof f!="boolean"&&!Dd(f)){const h=Array.isArray(f)?f:[f];for(let p=0;p<h.length;p++){const m=$b(e,h[p]);if(m){const{transitionEnd:g,transition:b,...x}=m;for(const y in x){let v=x[y];if(Array.isArray(v)){const w=u?v.length-1:0;v=v[w]}v!==null&&(s[y]=v)}for(const y in g)s[y]=g[y]}}}return s}const dR=e=>(t,r)=>{const n=k.useContext(Ad),s=k.useContext(Rd),i=()=>rF(e,t,n,s);return r?i():db(i)};function Vb(e,t,r){var i;const{style:n}=e,s={};for(const a in n)(qt(n[a])||t.style&&qt(t.style[a])||aR(a,e)||((i=r==null?void 0:r.getValue(a))==null?void 0:i.liveStyle)!==void 0)&&(s[a]=n[a]);return s}const sF=dR({scrapeMotionValuesFromProps:Vb,createRenderState:zb});function fR(e,t,r){const n=Vb(e,t,r);for(const s in e)if(qt(e[s])||qt(t[s])){const i=Ua.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;n[i]=e[s]}return n}const iF=dR({scrapeMotionValuesFromProps:fR,createRenderState:cR}),aF=Symbol.for("motionComponentSymbol");function aa(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function oF(e,t,r){return k.useCallback(n=>{n&&e.onMount&&e.onMount(n),t&&(n?t.mount(n):t.unmount()),r&&(typeof r=="function"?r(n):aa(r)&&(r.current=n))},[t])}const qb=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),lF="framerAppearId",hR="data-"+qb(lF),pR=k.createContext({});function cF(e,t,r,n,s){var g,b;const{visualElement:i}=k.useContext(Ad),a=k.useContext(nR),o=k.useContext(Rd),l=k.useContext(Db).reducedMotion,d=k.useRef(null);n=n||a.renderer,!d.current&&n&&(d.current=n(e,{visualState:t,parent:i,props:r,presenceContext:o,blockInitialAnimation:o?o.initial===!1:!1,reducedMotionConfig:l}));const u=d.current,f=k.useContext(pR);u&&!u.projection&&s&&(u.type==="html"||u.type==="svg")&&uF(d.current,r,s,f);const h=k.useRef(!1);k.useInsertionEffect(()=>{u&&h.current&&u.update(r,o)});const p=r[hR],m=k.useRef(!!p&&!((g=window.MotionHandoffIsComplete)!=null&&g.call(window,p))&&((b=window.MotionHasOptimisedAnimation)==null?void 0:b.call(window,p)));return dM(()=>{u&&(h.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),u.scheduleRenderMicrotask(),m.current&&u.animationState&&u.animationState.animateChanges())}),k.useEffect(()=>{u&&(!m.current&&u.animationState&&u.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{var x;(x=window.MotionHandoffMarkAsComplete)==null||x.call(window,p)}),m.current=!1),u.enteringChildren=void 0)}),u}function uF(e,t,r,n){const{layoutId:s,layout:i,drag:a,dragConstraints:o,layoutScroll:l,layoutRoot:d,layoutCrossfade:u}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:mR(e.parent)),e.projection.setOptions({layoutId:s,layout:i,alwaysMeasureLayout:!!a||o&&aa(o),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:n,crossfade:u,layoutScroll:l,layoutRoot:d})}function mR(e){if(e)return e.options.allowProjection!==!1?e.projection:mR(e.parent)}function Zf(e,{forwardMotionProps:t=!1}={},r,n){r&&Oz(r);const s=Fb(e)?iF:sF;function i(o,l){let d;const u={...k.useContext(Db),...o,layoutId:dF(o)},{isStatic:f}=u,h=qz(o),p=s(o,f);if(!f&&fb){fF();const m=hF(u);d=m.MeasureLayout,h.visualElement=cF(e,p,u,n,m.ProjectionNode)}return c.jsxs(Ad.Provider,{value:h,children:[d&&h.visualElement?c.jsx(d,{visualElement:h.visualElement,...u}):null,tF(e,o,oF(p,h.visualElement,l),p,f,t)]})}i.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const a=k.forwardRef(i);return a[aF]=e,a}function dF({layoutId:e}){const t=k.useContext(ub).id;return t&&e!==void 0?t+"-"+e:e}function fF(e,t){k.useContext(nR).strict}function hF(e){const{drag:t,layout:r}=Da;if(!t&&!r)return{};const n={...t,...r};return{MeasureLayout:t!=null&&t.isEnabled(e)||r!=null&&r.isEnabled(e)?n.MeasureLayout:void 0,ProjectionNode:n.ProjectionNode}}function pF(e,t){if(typeof Proxy>"u")return Zf;const r=new Map,n=(i,a)=>Zf(i,a,e,t),s=(i,a)=>n(i,a);return new Proxy(s,{get:(i,a)=>a==="create"?n:(r.has(a)||r.set(a,Zf(a,void 0,e,t)),r.get(a))})}function gR({top:e,left:t,right:r,bottom:n}){return{x:{min:t,max:r},y:{min:e,max:n}}}function mF({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function gF(e,t){if(!t)return e;const r=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}function Qf(e){return e===void 0||e===1}function Cx({scale:e,scaleX:t,scaleY:r}){return!Qf(e)||!Qf(t)||!Qf(r)}function Ys(e){return Cx(e)||yR(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function yR(e){return A2(e.x)||A2(e.y)}function A2(e){return e&&e!=="0%"}function Qu(e,t,r){const n=e-r,s=t*n;return r+s}function D2(e,t,r,n,s){return s!==void 0&&(e=Qu(e,s,n)),Qu(e,r,n)+t}function Tx(e,t=0,r=1,n,s){e.min=D2(e.min,t,r,n,s),e.max=D2(e.max,t,r,n,s)}function xR(e,{x:t,y:r}){Tx(e.x,t.translate,t.scale,t.originPoint),Tx(e.y,r.translate,r.scale,r.originPoint)}const I2=.999999999999,L2=1.0000000000001;function yF(e,t,r,n=!1){const s=r.length;if(!s)return;t.x=t.y=1;let i,a;for(let o=0;o<s;o++){i=r[o],a=i.projectionDelta;const{visualElement:l}=i.options;l&&l.props.style&&l.props.style.display==="contents"||(n&&i.options.layoutScroll&&i.scroll&&i!==i.root&&la(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,xR(e,a)),n&&Ys(i.latestValues)&&la(e,i.latestValues))}t.x<L2&&t.x>I2&&(t.x=1),t.y<L2&&t.y>I2&&(t.y=1)}function oa(e,t){e.min=e.min+t,e.max=e.max+t}function O2(e,t,r,n,s=.5){const i=et(e.min,e.max,s);Tx(e,t,r,i,n)}function la(e,t){O2(e.x,t.x,t.scaleX,t.scale,t.originX),O2(e.y,t.y,t.scaleY,t.scale,t.originY)}function vR(e,t){return gR(gF(e.getBoundingClientRect(),t))}function xF(e,t,r){const n=vR(e,r),{scroll:s}=t;return s&&(oa(n.x,s.offset.x),oa(n.y,s.offset.y)),n}const z2=()=>({translate:0,scale:1,origin:0,originPoint:0}),ca=()=>({x:z2(),y:z2()}),F2=()=>({min:0,max:0}),ut=()=>({x:F2(),y:F2()}),Px={current:null},bR={current:!1};function vF(){if(bR.current=!0,!!fb)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Px.current=e.matches;e.addEventListener("change",t),t()}else Px.current=!1}const bF=new WeakMap;function wF(e,t,r){for(const n in t){const s=t[n],i=r[n];if(qt(s))e.addValue(n,s);else if(qt(i))e.addValue(n,Aa(s,{owner:e}));else if(i!==s)if(e.hasValue(n)){const a=e.getValue(n);a.liveStyle===!0?a.jump(s):a.hasAnimated||a.set(s)}else{const a=e.getStaticValue(n);e.addValue(n,Aa(a!==void 0?a:s,{owner:e}))}}for(const n in r)t[n]===void 0&&e.removeValue(n);return t}const $2=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class kF{scrapeMotionValuesFromProps(t,r,n){return{}}constructor({parent:t,props:r,presenceContext:n,reducedMotionConfig:s,blockInitialAnimation:i,visualState:a},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Tb,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const h=er.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,Ke.render(this.render,!1,!0))};const{latestValues:l,renderState:d}=a;this.latestValues=l,this.baseTarget={...l},this.initialValues=r.initial?{...l}:{},this.renderState=d,this.parent=t,this.props=r,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=o,this.blockInitialAnimation=!!i,this.isControllingVariants=Id(r),this.isVariantNode=iR(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...f}=this.scrapeMotionValuesFromProps(r,{},this);for(const h in f){const p=f[h];l[h]!==void 0&&qt(p)&&p.set(l[h])}}mount(t){var r;this.current=t,bF.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),bR.current||vF(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Px.current,(r=this.parent)==null||r.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var t;this.projection&&this.projection.unmount(),Ms(this.notifyUpdate),Ms(this.render),this.valueSubscriptions.forEach(r=>r()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const r in this.events)this.events[r].clear();for(const r in this.features){const n=this.features[r];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,r){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=Ha.has(t);n&&this.onBindTransform&&this.onBindTransform();const s=r.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&Ke.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,r)),this.valueSubscriptions.set(t,()=>{s(),i&&i(),r.owner&&r.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Da){const r=Da[t];if(!r)continue;const{isEnabled:n,Feature:s}=r;if(!this.features[t]&&s&&n(this.props)&&(this.features[t]=new s(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):ut()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,r){this.latestValues[t]=r}update(t,r){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=r;for(let n=0;n<$2.length;n++){const s=$2[n];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const i="on"+s,a=t[i];a&&(this.propEventSubscriptions[s]=this.on(s,a))}this.prevMotionValues=wF(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const r=this.getClosestVariantNode();if(r)return r.variantChildren&&r.variantChildren.add(t),()=>r.variantChildren.delete(t)}addValue(t,r){const n=this.values.get(t);r!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,r),this.values.set(t,r),this.latestValues[t]=r.get())}removeValue(t){this.values.delete(t);const r=this.valueSubscriptions.get(t);r&&(r(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,r){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return n===void 0&&r!==void 0&&(n=Aa(r===null?void 0:r,{owner:this}),this.addValue(t,n)),n}readValue(t,r){let n=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return n!=null&&(typeof n=="string"&&(fM(n)||pM(n))?n=parseFloat(n):!Pz(n)&&Rs.test(r)&&(n=YM(t,r)),this.setBaseTarget(t,qt(n)?n.get():n)),qt(n)?n.get():n}setBaseTarget(t,r){this.baseTarget[t]=r}getBaseTarget(t){var i;const{initial:r}=this.props;let n;if(typeof r=="string"||typeof r=="object"){const a=$b(this.props,r,(i=this.presenceContext)==null?void 0:i.custom);a&&(n=a[t])}if(r&&n!==void 0)return n;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!qt(s)?s:this.initialValues[t]!==void 0&&n===void 0?void 0:this.baseTarget[t]}on(t,r){return this.events[t]||(this.events[t]=new yb),this.events[t].add(r)}notify(t,...r){this.events[t]&&this.events[t].notify(...r)}scheduleRenderMicrotask(){Rb.render(this.render)}}class wR extends kF{constructor(){super(...arguments),this.KeyframeResolver=xz}sortInstanceNodePosition(t,r){return t.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(t,r){return t.style?t.style[r]:void 0}removeValueFromRenderState(t,{vars:r,style:n}){delete r[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;qt(t)&&(this.childSubscription=t.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}}function kR(e,{style:t,vars:r},n,s){const i=e.style;let a;for(a in t)i[a]=t[a];s==null||s.applyProjectionStyles(i,n);for(a in r)i.setProperty(a,r[a])}function jF(e){return window.getComputedStyle(e)}class _F extends wR{constructor(){super(...arguments),this.type="html",this.renderInstance=kR}readValueFromInstance(t,r){var n;if(Ha.has(r))return(n=this.projection)!=null&&n.isProjecting?wx(r):OO(t,r);{const s=jF(t),i=(bb(r)?s.getPropertyValue(r):s[r])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:r}){return vR(t,r)}build(t,r,n){Ob(t,r,n.transformTemplate)}scrapeMotionValuesFromProps(t,r,n){return Vb(t,r,n)}}const jR=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function SF(e,t,r,n){kR(e,t,void 0,n);for(const s in t.attrs)e.setAttribute(jR.has(s)?s:qb(s),t.attrs[s])}class NF extends wR{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ut}getBaseTargetFromProps(t,r){return t[r]}readValueFromInstance(t,r){if(Ha.has(r)){const n=KM(r);return n&&n.default||0}return r=jR.has(r)?r:qb(r),t.getAttribute(r)}scrapeMotionValuesFromProps(t,r,n){return fR(t,r,n)}build(t,r,n){lR(t,r,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,r,n,s){SF(t,r,n,s)}mount(t){this.isSVGTag=uR(t.tagName),super.mount(t)}}const EF=(e,t)=>Fb(e)?new NF(t):new _F(t,{allowProjection:e!==k.Fragment});function xa(e,t,r){const n=e.getProps();return $b(n,t,r!==void 0?r:n.custom,e)}const Mx=e=>Array.isArray(e);function CF(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,Aa(r))}function TF(e){return Mx(e)?e[e.length-1]||0:e}function PF(e,t){const r=xa(e,t);let{transitionEnd:n={},transition:s={},...i}=r||{};i={...i,...n};for(const a in i){const o=TF(i[a]);CF(e,a,o)}}function MF(e){return!!(qt(e)&&e.add)}function Rx(e,t){const r=e.getValue("willChange");if(MF(r))return r.add(t);if(!r&&On.WillChange){const n=new On.WillChange("auto");e.addValue("willChange",n),n.add(t)}}function _R(e){return e.props[hR]}const RF=e=>e!==null;function AF(e,{repeat:t,repeatType:r="loop"},n){const s=e.filter(RF),i=t&&r!=="loop"&&t%2===1?0:s.length-1;return s[i]}const DF={type:"spring",stiffness:500,damping:25,restSpeed:10},IF=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),LF={type:"keyframes",duration:.8},OF={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},zF=(e,{keyframes:t})=>t.length>2?LF:Ha.has(e)?e.startsWith("scale")?IF(t[1]):DF:OF;function FF({when:e,delay:t,delayChildren:r,staggerChildren:n,staggerDirection:s,repeat:i,repeatType:a,repeatDelay:o,from:l,elapsed:d,...u}){return!!Object.keys(u).length}const Bb=(e,t,r,n={},s,i)=>a=>{const o=Pb(n,e)||{},l=o.delay||n.delay||0;let{elapsed:d=0}=n;d=d-un(l);const u={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:t.getVelocity(),...o,delay:-d,onUpdate:h=>{t.set(h),o.onUpdate&&o.onUpdate(h)},onComplete:()=>{a(),o.onComplete&&o.onComplete()},name:e,motionValue:t,element:i?void 0:s};FF(o)||Object.assign(u,zF(e,u)),u.duration&&(u.duration=un(u.duration)),u.repeatDelay&&(u.repeatDelay=un(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let f=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Nx(u),u.delay===0&&(f=!0)),(On.instantAnimations||On.skipAnimations)&&(f=!0,Nx(u),u.delay=0),u.allowFlatten=!o.type&&!o.ease,f&&!i&&t.get()!==void 0){const h=AF(u.keyframes,o);if(h!==void 0){Ke.update(()=>{u.onUpdate(h),u.onComplete()});return}}return o.isSync?new Cb(u):new az(u)};function $F({protectedKeys:e,needsAnimating:t},r){const n=e.hasOwnProperty(r)&&t[r]!==!0;return t[r]=!1,n}function SR(e,t,{delay:r=0,transitionOverride:n,type:s}={}){let{transition:i=e.getDefaultTransition(),transitionEnd:a,...o}=t;n&&(i=n);const l=[],d=s&&e.animationState&&e.animationState.getState()[s];for(const u in o){const f=e.getValue(u,e.latestValues[u]??null),h=o[u];if(h===void 0||d&&$F(d,u))continue;const p={delay:r,...Pb(i||{},u)},m=f.get();if(m!==void 0&&!f.isAnimating&&!Array.isArray(h)&&h===m&&!p.velocity)continue;let g=!1;if(window.MotionHandoffAnimation){const x=_R(e);if(x){const y=window.MotionHandoffAnimation(x,u,Ke);y!==null&&(p.startTime=y,g=!0)}}Rx(e,u),f.start(Bb(u,f,h,e.shouldReduceMotion&&HM.has(u)?{type:!1}:p,e,g));const b=f.animation;b&&l.push(b)}return a&&Promise.all(l).then(()=>{Ke.update(()=>{a&&PF(e,a)})}),l}function NR(e,t,r,n=0,s=1){const i=Array.from(e).sort((d,u)=>d.sortNodePosition(u)).indexOf(t),a=e.size,o=(a-1)*n;return typeof r=="function"?r(i,a):s===1?i*n:o-i*n}function Ax(e,t,r={}){var l;const n=xa(e,t,r.type==="exit"?(l=e.presenceContext)==null?void 0:l.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=n||{};r.transitionOverride&&(s=r.transitionOverride);const i=n?()=>Promise.all(SR(e,n,r)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(d=0)=>{const{delayChildren:u=0,staggerChildren:f,staggerDirection:h}=s;return VF(e,t,d,u,f,h,r)}:()=>Promise.resolve(),{when:o}=s;if(o){const[d,u]=o==="beforeChildren"?[i,a]:[a,i];return d().then(()=>u())}else return Promise.all([i(),a(r.delay)])}function VF(e,t,r=0,n=0,s=0,i=1,a){const o=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),o.push(Ax(l,t,{...a,delay:r+(typeof n=="function"?0:n)+NR(e.variantChildren,l,n,s,i)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(o)}function qF(e,t,r={}){e.notify("AnimationStart",t);let n;if(Array.isArray(t)){const s=t.map(i=>Ax(e,i,r));n=Promise.all(s)}else if(typeof t=="string")n=Ax(e,t,r);else{const s=typeof t=="function"?xa(e,t,r.custom):t;n=Promise.all(SR(e,s,r))}return n.then(()=>{e.notify("AnimationComplete",t)})}function ER(e,t){if(!Array.isArray(t))return!1;const r=t.length;if(r!==e.length)return!1;for(let n=0;n<r;n++)if(t[n]!==e[n])return!1;return!0}const BF=Lb.length;function CR(e){if(!e)return;if(!e.isControllingVariants){const r=e.parent?CR(e.parent)||{}:{};return e.props.initial!==void 0&&(r.initial=e.props.initial),r}const t={};for(let r=0;r<BF;r++){const n=Lb[r],s=e.props[n];(El(s)||s===!1)&&(t[n]=s)}return t}const UF=[...Ib].reverse(),HF=Ib.length;function WF(e){return t=>Promise.all(t.map(({animation:r,options:n})=>qF(e,r,n)))}function GF(e){let t=WF(e),r=V2(),n=!0;const s=l=>(d,u)=>{var h;const f=xa(e,u,l==="exit"?(h=e.presenceContext)==null?void 0:h.custom:void 0);if(f){const{transition:p,transitionEnd:m,...g}=f;d={...d,...g,...m}}return d};function i(l){t=l(e)}function a(l){const{props:d}=e,u=CR(e.parent)||{},f=[],h=new Set;let p={},m=1/0;for(let b=0;b<HF;b++){const x=UF[b],y=r[x],v=d[x]!==void 0?d[x]:u[x],w=El(v),_=x===l?y.isActive:null;_===!1&&(m=b);let N=v===u[x]&&v!==d[x]&&w;if(N&&n&&e.manuallyAnimateOnMount&&(N=!1),y.protectedKeys={...p},!y.isActive&&_===null||!v&&!y.prevProp||Dd(v)||typeof v=="boolean")continue;const j=KF(y.prevProp,v);let E=j||x===l&&y.isActive&&!N&&w||b>m&&w,M=!1;const C=Array.isArray(v)?v:[v];let D=C.reduce(s(x),{});_===!1&&(D={});const{prevResolvedValues:F={}}=y,T={...F,...D},S=V=>{E=!0,h.has(V)&&(M=!0,h.delete(V)),y.needsAnimating[V]=!0;const A=e.getValue(V);A&&(A.liveStyle=!1)};for(const V in T){const A=D[V],P=F[V];if(p.hasOwnProperty(V))continue;let z=!1;Mx(A)&&Mx(P)?z=!ER(A,P):z=A!==P,z?A!=null?S(V):h.add(V):A!==void 0&&h.has(V)?S(V):y.protectedKeys[V]=!0}y.prevProp=v,y.prevResolvedValues=D,y.isActive&&(p={...p,...D}),n&&e.blockInitialAnimation&&(E=!1);const O=N&&j;E&&(!O||M)&&f.push(...C.map(V=>{const A={type:x};if(typeof V=="string"&&n&&!O&&e.manuallyAnimateOnMount&&e.parent){const{parent:P}=e,z=xa(P,V);if(P.enteringChildren&&z){const{delayChildren:q}=z.transition||{};A.delay=NR(P.enteringChildren,e,q)}}return{animation:V,options:A}}))}if(h.size){const b={};if(typeof d.initial!="boolean"){const x=xa(e,Array.isArray(d.initial)?d.initial[0]:d.initial);x&&x.transition&&(b.transition=x.transition)}h.forEach(x=>{const y=e.getBaseTarget(x),v=e.getValue(x);v&&(v.liveStyle=!0),b[x]=y??null}),f.push({animation:b})}let g=!!f.length;return n&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(g=!1),n=!1,g?t(f):Promise.resolve()}function o(l,d){var f;if(r[l].isActive===d)return Promise.resolve();(f=e.variantChildren)==null||f.forEach(h=>{var p;return(p=h.animationState)==null?void 0:p.setActive(l,d)}),r[l].isActive=d;const u=a(l);for(const h in r)r[h].protectedKeys={};return u}return{animateChanges:a,setActive:o,setAnimateFunction:i,getState:()=>r,reset:()=>{r=V2()}}}function KF(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!ER(t,e):!1}function Ws(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function V2(){return{animate:Ws(!0),whileInView:Ws(),whileHover:Ws(),whileTap:Ws(),whileDrag:Ws(),whileFocus:Ws(),exit:Ws()}}class Vs{constructor(t){this.isMounted=!1,this.node=t}update(){}}class YF extends Vs{constructor(t){super(t),t.animationState||(t.animationState=GF(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Dd(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:r}=this.node.prevProps||{};t!==r&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let XF=0;class ZF extends Vs{constructor(){super(...arguments),this.id=XF++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:r}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;const s=this.node.animationState.setActive("exit",!t);r&&!t&&s.then(()=>{r(this.id)})}mount(){const{register:t,onExitComplete:r}=this.node.presenceContext||{};r&&r(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const QF={animation:{Feature:YF},exit:{Feature:ZF}};function Tl(e,t,r,n={passive:!0}){return e.addEventListener(t,r,n),()=>e.removeEventListener(t,r)}function Zl(e){return{point:{x:e.pageX,y:e.pageY}}}const JF=e=>t=>Ab(t)&&e(t,Zl(t));function Qo(e,t,r,n){return Tl(e,t,JF(r),n)}const TR=1e-4,e7=1-TR,t7=1+TR,PR=.01,r7=0-PR,n7=0+PR;function Wt(e){return e.max-e.min}function s7(e,t,r){return Math.abs(e-t)<=r}function q2(e,t,r,n=.5){e.origin=n,e.originPoint=et(t.min,t.max,e.origin),e.scale=Wt(r)/Wt(t),e.translate=et(r.min,r.max,e.origin)-e.originPoint,(e.scale>=e7&&e.scale<=t7||isNaN(e.scale))&&(e.scale=1),(e.translate>=r7&&e.translate<=n7||isNaN(e.translate))&&(e.translate=0)}function Jo(e,t,r,n){q2(e.x,t.x,r.x,n?n.originX:void 0),q2(e.y,t.y,r.y,n?n.originY:void 0)}function B2(e,t,r){e.min=r.min+t.min,e.max=e.min+Wt(t)}function i7(e,t,r){B2(e.x,t.x,r.x),B2(e.y,t.y,r.y)}function U2(e,t,r){e.min=t.min-r.min,e.max=e.min+Wt(t)}function el(e,t,r){U2(e.x,t.x,r.x),U2(e.y,t.y,r.y)}function jr(e){return[e("x"),e("y")]}const MR=({current:e})=>e?e.ownerDocument.defaultView:null,H2=(e,t)=>Math.abs(e-t);function a7(e,t){const r=H2(e.x,t.x),n=H2(e.y,t.y);return Math.sqrt(r**2+n**2)}class RR{constructor(t,r,{transformPagePoint:n,contextWindow:s=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=eh(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,m=a7(h.offset,{x:0,y:0})>=this.distanceThreshold;if(!p&&!m)return;const{point:g}=h,{timestamp:b}=Rt;this.history.push({...g,timestamp:b});const{onStart:x,onMove:y}=this.handlers;p||(x&&x(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,h)},this.handlePointerMove=(h,p)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=Jf(p,this.transformPagePoint),Ke.update(this.updatePoint,!0)},this.handlePointerUp=(h,p)=>{this.end();const{onEnd:m,onSessionEnd:g,resumeAnimation:b}=this.handlers;if(this.dragSnapToOrigin&&b&&b(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=eh(h.type==="pointercancel"?this.lastMoveEventInfo:Jf(p,this.transformPagePoint),this.history);this.startEvent&&m&&m(h,x),g&&g(h,x)},!Ab(t))return;this.dragSnapToOrigin=i,this.handlers=r,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=s||window;const o=Zl(t),l=Jf(o,this.transformPagePoint),{point:d}=l,{timestamp:u}=Rt;this.history=[{...d,timestamp:u}];const{onSessionStart:f}=r;f&&f(t,eh(l,this.history)),this.removeListeners=Gl(Qo(this.contextWindow,"pointermove",this.handlePointerMove),Qo(this.contextWindow,"pointerup",this.handlePointerUp),Qo(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Ms(this.updatePoint)}}function Jf(e,t){return t?{point:t(e.point)}:e}function W2(e,t){return{x:e.x-t.x,y:e.y-t.y}}function eh({point:e},t){return{point:e,delta:W2(e,AR(t)),offset:W2(e,o7(t)),velocity:l7(t,.1)}}function o7(e){return e[0]}function AR(e){return e[e.length-1]}function l7(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,n=null;const s=AR(e);for(;r>=0&&(n=e[r],!(s.timestamp-n.timestamp>un(t)));)r--;if(!n)return{x:0,y:0};const i=Cr(s.timestamp-n.timestamp);if(i===0)return{x:0,y:0};const a={x:(s.x-n.x)/i,y:(s.y-n.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function c7(e,{min:t,max:r},n){return t!==void 0&&e<t?e=n?et(t,e,n.min):Math.max(e,t):r!==void 0&&e>r&&(e=n?et(r,e,n.max):Math.min(e,r)),e}function G2(e,t,r){return{min:t!==void 0?e.min+t:void 0,max:r!==void 0?e.max+r-(e.max-e.min):void 0}}function u7(e,{top:t,left:r,bottom:n,right:s}){return{x:G2(e.x,r,s),y:G2(e.y,t,n)}}function K2(e,t){let r=t.min-e.min,n=t.max-e.max;return t.max-t.min<e.max-e.min&&([r,n]=[n,r]),{min:r,max:n}}function d7(e,t){return{x:K2(e.x,t.x),y:K2(e.y,t.y)}}function f7(e,t){let r=.5;const n=Wt(e),s=Wt(t);return s>n?r=_l(t.min,t.max-n,e.min):n>s&&(r=_l(e.min,e.max-s,t.min)),Ln(0,1,r)}function h7(e,t){const r={};return t.min!==void 0&&(r.min=t.min-e.min),t.max!==void 0&&(r.max=t.max-e.min),r}const Dx=.35;function p7(e=Dx){return e===!1?e=0:e===!0&&(e=Dx),{x:Y2(e,"left","right"),y:Y2(e,"top","bottom")}}function Y2(e,t,r){return{min:X2(e,t),max:X2(e,r)}}function X2(e,t){return typeof e=="number"?e:e[t]||0}const m7=new WeakMap;class g7{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=ut(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:r=!1,distanceThreshold:n}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=f=>{const{dragSnapToOrigin:h}=this.getProps();h?this.pauseAnimation():this.stopAnimation(),r&&this.snapToCursor(Zl(f).point)},a=(f,h)=>{const{drag:p,dragPropagation:m,onDragStart:g}=this.getProps();if(p&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=kz(p),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=h,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),jr(x=>{let y=this.getAxisMotionValue(x).get()||0;if(dn.test(y)){const{projection:v}=this.visualElement;if(v&&v.layout){const w=v.layout.layoutBox[x];w&&(y=Wt(w)*(parseFloat(y)/100))}}this.originPoint[x]=y}),g&&Ke.postRender(()=>g(f,h)),Rx(this.visualElement,"transform");const{animationState:b}=this.visualElement;b&&b.setActive("whileDrag",!0)},o=(f,h)=>{this.latestPointerEvent=f,this.latestPanInfo=h;const{dragPropagation:p,dragDirectionLock:m,onDirectionLock:g,onDrag:b}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:x}=h;if(m&&this.currentDirection===null){this.currentDirection=y7(x),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",h.point,x),this.updateAxis("y",h.point,x),this.visualElement.render(),b&&b(f,h)},l=(f,h)=>{this.latestPointerEvent=f,this.latestPanInfo=h,this.stop(f,h),this.latestPointerEvent=null,this.latestPanInfo=null},d=()=>jr(f=>{var h;return this.getAnimationState(f)==="paused"&&((h=this.getAxisMotionValue(f).animation)==null?void 0:h.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new RR(t,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:l,resumeAnimation:d},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:n,contextWindow:MR(this.visualElement)})}stop(t,r){const n=t||this.latestPointerEvent,s=r||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!s||!n)return;const{velocity:a}=s;this.startAnimation(a);const{onDragEnd:o}=this.getProps();o&&Ke.postRender(()=>o(n,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:r}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),r&&r.setActive("whileDrag",!1)}updateAxis(t,r,n){const{drag:s}=this.getProps();if(!n||!Mc(t,s,this.currentDirection))return;const i=this.getAxisMotionValue(t);let a=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(a=c7(a,this.constraints[t],this.elastic[t])),i.set(a)}resolveConstraints(){var i;const{dragConstraints:t,dragElastic:r}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(i=this.visualElement.projection)==null?void 0:i.layout,s=this.constraints;t&&aa(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&n?this.constraints=u7(n.layoutBox,t):this.constraints=!1,this.elastic=p7(r),s!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&jr(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=h7(n.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!aa(t))return!1;const n=t.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const i=xF(n,s.root,this.visualElement.getTransformPagePoint());let a=d7(s.layout.layoutBox,i);if(r){const o=r(mF(a));this.hasMutatedConstraints=!!o,o&&(a=gR(o))}return a}startAnimation(t){const{drag:r,dragMomentum:n,dragElastic:s,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),l=this.constraints||{},d=jr(u=>{if(!Mc(u,r,this.currentDirection))return;let f=l&&l[u]||{};a&&(f={min:0,max:0});const h=s?200:1e6,p=s?40:1e7,m={type:"inertia",velocity:n?t[u]:0,bounceStiffness:h,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...i,...f};return this.startAxisValueAnimation(u,m)});return Promise.all(d).then(o)}startAxisValueAnimation(t,r){const n=this.getAxisMotionValue(t);return Rx(this.visualElement,t),n.start(Bb(t,n,0,r,this.visualElement,!1))}stopAnimation(){jr(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){jr(t=>{var r;return(r=this.getAxisMotionValue(t).animation)==null?void 0:r.pause()})}getAnimationState(t){var r;return(r=this.getAxisMotionValue(t).animation)==null?void 0:r.state}getAxisMotionValue(t){const r=`_drag${t.toUpperCase()}`,n=this.visualElement.getProps(),s=n[r];return s||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){jr(r=>{const{drag:n}=this.getProps();if(!Mc(r,n,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(r);if(s&&s.layout){const{min:a,max:o}=s.layout.layoutBox[r];i.set(t[r]-et(a,o,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:r}=this.getProps(),{projection:n}=this.visualElement;if(!aa(r)||!n||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};jr(a=>{const o=this.getAxisMotionValue(a);if(o&&this.constraints!==!1){const l=o.get();s[a]=f7({min:l,max:l},this.constraints[a])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),jr(a=>{if(!Mc(a,t,null))return;const o=this.getAxisMotionValue(a),{min:l,max:d}=this.constraints[a];o.set(et(l,d,s[a]))})}addListeners(){if(!this.visualElement.current)return;m7.set(this.visualElement,this);const t=this.visualElement.current,r=Qo(t,"pointerdown",l=>{const{drag:d,dragListener:u=!0}=this.getProps();d&&u&&this.start(l)}),n=()=>{const{dragConstraints:l}=this.getProps();aa(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,i=s.addEventListener("measure",n);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),Ke.read(n);const a=Tl(window,"resize",()=>this.scalePositionWithinConstraints()),o=s.addEventListener("didUpdate",({delta:l,hasLayoutChanged:d})=>{this.isDragging&&d&&(jr(u=>{const f=this.getAxisMotionValue(u);f&&(this.originPoint[u]+=l[u].translate,f.set(f.get()+l[u].translate))}),this.visualElement.render())});return()=>{a(),r(),i(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:n=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:a=Dx,dragMomentum:o=!0}=t;return{...t,drag:r,dragDirectionLock:n,dragPropagation:s,dragConstraints:i,dragElastic:a,dragMomentum:o}}}function Mc(e,t,r){return(t===!0||t===e)&&(r===null||r===e)}function y7(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}class x7 extends Vs{constructor(t){super(t),this.removeGroupControls=Mr,this.removeListeners=Mr,this.controls=new g7(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Mr}unmount(){this.removeGroupControls(),this.removeListeners()}}const Z2=e=>(t,r)=>{e&&Ke.postRender(()=>e(t,r))};class v7 extends Vs{constructor(){super(...arguments),this.removePointerDownListener=Mr}onPointerDown(t){this.session=new RR(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:MR(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:r,onPan:n,onPanEnd:s}=this.node.getProps();return{onSessionStart:Z2(t),onStart:Z2(r),onMove:n,onEnd:(i,a)=>{delete this.session,s&&Ke.postRender(()=>s(i,a))}}}mount(){this.removePointerDownListener=Qo(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const uu={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Q2(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ho={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(de.test(e))e=parseFloat(e);else return e;const r=Q2(e,t.target.x),n=Q2(e,t.target.y);return`${r}% ${n}%`}},b7={correct:(e,{treeScale:t,projectionDelta:r})=>{const n=e,s=Rs.parse(e);if(s.length>5)return n;const i=Rs.createTransformer(e),a=typeof s[0]!="number"?1:0,o=r.x.scale*t.x,l=r.y.scale*t.y;s[0+a]/=o,s[1+a]/=l;const d=et(o,l,.5);return typeof s[2+a]=="number"&&(s[2+a]/=d),typeof s[3+a]=="number"&&(s[3+a]/=d),i(s)}};let th=!1;class w7 extends k.Component{componentDidMount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:n,layoutId:s}=this.props,{projection:i}=t;Bz(k7),i&&(r.group&&r.group.add(i),n&&n.register&&s&&n.register(i),th&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),uu.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:r,visualElement:n,drag:s,isPresent:i}=this.props,{projection:a}=n;return a&&(a.isPresent=i,th=!0,s||t.layoutDependency!==r||r===void 0||t.isPresent!==i?a.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?a.promote():a.relegate()||Ke.postRender(()=>{const o=a.getStack();(!o||!o.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Rb.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:n}=this.props,{projection:s}=t;th=!0,s&&(s.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(s),n&&n.deregister&&n.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function DR(e){const[t,r]=rR(),n=k.useContext(ub);return c.jsx(w7,{...e,layoutGroup:n,switchLayoutGroup:k.useContext(pR),isPresent:t,safeToRemove:r})}const k7={borderRadius:{...ho,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ho,borderTopRightRadius:ho,borderBottomLeftRadius:ho,borderBottomRightRadius:ho,boxShadow:b7};function j7(e,t,r){const n=qt(e)?e:Aa(e);return n.start(Bb("",n,t,r)),n.animation}const _7=(e,t)=>e.depth-t.depth;class S7{constructor(){this.children=[],this.isDirty=!1}add(t){hb(this.children,t),this.isDirty=!0}remove(t){pb(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(_7),this.isDirty=!1,this.children.forEach(t)}}function N7(e,t){const r=er.now(),n=({timestamp:s})=>{const i=s-r;i>=t&&(Ms(n),e(i-t))};return Ke.setup(n,!0),()=>Ms(n)}const IR=["TopLeft","TopRight","BottomLeft","BottomRight"],E7=IR.length,J2=e=>typeof e=="string"?parseFloat(e):e,ek=e=>typeof e=="number"||de.test(e);function C7(e,t,r,n,s,i){s?(e.opacity=et(0,r.opacity??1,T7(n)),e.opacityExit=et(t.opacity??1,0,P7(n))):i&&(e.opacity=et(t.opacity??1,r.opacity??1,n));for(let a=0;a<E7;a++){const o=`border${IR[a]}Radius`;let l=tk(t,o),d=tk(r,o);if(l===void 0&&d===void 0)continue;l||(l=0),d||(d=0),l===0||d===0||ek(l)===ek(d)?(e[o]=Math.max(et(J2(l),J2(d),n),0),(dn.test(d)||dn.test(l))&&(e[o]+="%")):e[o]=d}(t.rotate||r.rotate)&&(e.rotate=et(t.rotate||0,r.rotate||0,n))}function tk(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const T7=LR(0,.5,kM),P7=LR(.5,.95,Mr);function LR(e,t,r){return n=>n<e?0:n>t?1:r(_l(e,t,n))}function rk(e,t){e.min=t.min,e.max=t.max}function kr(e,t){rk(e.x,t.x),rk(e.y,t.y)}function nk(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function sk(e,t,r,n,s){return e-=t,e=Qu(e,1/r,n),s!==void 0&&(e=Qu(e,1/s,n)),e}function M7(e,t=0,r=1,n=.5,s,i=e,a=e){if(dn.test(t)&&(t=parseFloat(t),t=et(a.min,a.max,t/100)-a.min),typeof t!="number")return;let o=et(i.min,i.max,n);e===i&&(o-=t),e.min=sk(e.min,t,r,o,s),e.max=sk(e.max,t,r,o,s)}function ik(e,t,[r,n,s],i,a){M7(e,t[r],t[n],t[s],t.scale,i,a)}const R7=["x","scaleX","originX"],A7=["y","scaleY","originY"];function ak(e,t,r,n){ik(e.x,t,R7,r?r.x:void 0,n?n.x:void 0),ik(e.y,t,A7,r?r.y:void 0,n?n.y:void 0)}function ok(e){return e.translate===0&&e.scale===1}function OR(e){return ok(e.x)&&ok(e.y)}function lk(e,t){return e.min===t.min&&e.max===t.max}function D7(e,t){return lk(e.x,t.x)&&lk(e.y,t.y)}function ck(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function zR(e,t){return ck(e.x,t.x)&&ck(e.y,t.y)}function uk(e){return Wt(e.x)/Wt(e.y)}function dk(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class I7{constructor(){this.members=[]}add(t){hb(this.members,t),t.scheduleRender()}remove(t){if(pb(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(t){const r=this.members.findIndex(s=>t===s);if(r===0)return!1;let n;for(let s=r;s>=0;s--){const i=this.members[s];if(i.isPresent!==!1){n=i;break}}return n?(this.promote(n),!0):!1}promote(t,r){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,r&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:s}=t.options;s===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:r,resumingFrom:n}=t;r.onExitComplete&&r.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function L7(e,t,r){let n="";const s=e.x.translate/t.x,i=e.y.translate/t.y,a=(r==null?void 0:r.z)||0;if((s||i||a)&&(n=`translate3d(${s}px, ${i}px, ${a}px) `),(t.x!==1||t.y!==1)&&(n+=`scale(${1/t.x}, ${1/t.y}) `),r){const{transformPerspective:d,rotate:u,rotateX:f,rotateY:h,skewX:p,skewY:m}=r;d&&(n=`perspective(${d}px) ${n}`),u&&(n+=`rotate(${u}deg) `),f&&(n+=`rotateX(${f}deg) `),h&&(n+=`rotateY(${h}deg) `),p&&(n+=`skewX(${p}deg) `),m&&(n+=`skewY(${m}deg) `)}const o=e.x.scale*t.x,l=e.y.scale*t.y;return(o!==1||l!==1)&&(n+=`scale(${o}, ${l})`),n||"none"}const rh=["","X","Y","Z"],O7=1e3;let z7=0;function nh(e,t,r,n){const{latestValues:s}=t;s[e]&&(r[e]=s[e],t.setStaticValue(e,0),n&&(n[e]=0))}function FR(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const r=_R(t);if(window.MotionHasOptimisedAnimation(r,"transform")){const{layout:s,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(r,"transform",Ke,!(s||i))}const{parent:n}=e;n&&!n.hasCheckedOptimisedAppear&&FR(n)}function $R({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:n,resetTransform:s}){return class{constructor(a={},o=t==null?void 0:t()){this.id=z7++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(V7),this.nodes.forEach(H7),this.nodes.forEach(W7),this.nodes.forEach(q7)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=o?o.root||o:this,this.path=o?[...o.path,o]:[],this.parent=o,this.depth=o?o.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new S7)}addEventListener(a,o){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new yb),this.eventHandlers.get(a).add(o)}notifyListeners(a,...o){const l=this.eventHandlers.get(a);l&&l.notify(...o)}hasListeners(a){return this.eventHandlers.has(a)}mount(a){if(this.instance)return;this.isSVG=tR(a)&&!Cz(a),this.instance=a;const{layoutId:o,layout:l,visualElement:d}=this.options;if(d&&!d.current&&d.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||o)&&(this.isLayoutDirty=!0),e){let u,f=0;const h=()=>this.root.updateBlockedByResize=!1;Ke.read(()=>{f=window.innerWidth}),e(a,()=>{const p=window.innerWidth;p!==f&&(f=p,this.root.updateBlockedByResize=!0,u&&u(),u=N7(h,250),uu.hasAnimatedSinceResize&&(uu.hasAnimatedSinceResize=!1,this.nodes.forEach(pk)))})}o&&this.root.registerSharedNode(o,this),this.options.animate!==!1&&d&&(o||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:f,hasRelativeLayoutChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||d.getDefaultTransition()||Z7,{onLayoutAnimationStart:g,onLayoutAnimationComplete:b}=d.getProps(),x=!this.targetLayout||!zR(this.targetLayout,p),y=!f&&h;if(this.options.layoutRoot||this.resumeFrom||y||f&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={...Pb(m,"layout"),onPlay:g,onComplete:b};(d.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(u,y)}else f||pk(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Ms(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(G7),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&FR(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const f=this.path[u];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:o,layout:l}=this.options;if(o===void 0&&!l)return;const d=this.getTransformTemplate();this.prevTransformTemplateValue=d?d(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(fk);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(hk);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(U7),this.nodes.forEach(F7),this.nodes.forEach($7)):this.nodes.forEach(hk),this.clearAllSnapshots();const o=er.now();Rt.delta=Ln(0,1e3/60,o-Rt.timestamp),Rt.timestamp=o,Rt.isProcessing=!0,Hf.update.process(Rt),Hf.preRender.process(Rt),Hf.render.process(Rt),Rt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Rb.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(B7),this.sharedNodes.forEach(K7)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ke.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ke.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Wt(this.snapshot.measuredBox.x)&&!Wt(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=ut(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:o}=this.options;o&&o.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let o=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(o=!1),o&&this.instance){const l=n(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:l,offset:r(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!s)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,o=this.projectionDelta&&!OR(this.projectionDelta),l=this.getTransformTemplate(),d=l?l(this.latestValues,""):void 0,u=d!==this.prevTransformTemplateValue;a&&this.instance&&(o||Ys(this.latestValues)||u)&&(s(this.instance,d),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const o=this.measurePageBox();let l=this.removeElementScroll(o);return a&&(l=this.removeTransform(l)),Q7(l),{animationId:this.root.animationId,measuredBox:o,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var d;const{visualElement:a}=this.options;if(!a)return ut();const o=a.measureViewportBox();if(!(((d=this.scroll)==null?void 0:d.wasRoot)||this.path.some(J7))){const{scroll:u}=this.root;u&&(oa(o.x,u.offset.x),oa(o.y,u.offset.y))}return o}removeElementScroll(a){var l;const o=ut();if(kr(o,a),(l=this.scroll)!=null&&l.wasRoot)return o;for(let d=0;d<this.path.length;d++){const u=this.path[d],{scroll:f,options:h}=u;u!==this.root&&f&&h.layoutScroll&&(f.wasRoot&&kr(o,a),oa(o.x,f.offset.x),oa(o.y,f.offset.y))}return o}applyTransform(a,o=!1){const l=ut();kr(l,a);for(let d=0;d<this.path.length;d++){const u=this.path[d];!o&&u.options.layoutScroll&&u.scroll&&u!==u.root&&la(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Ys(u.latestValues)&&la(l,u.latestValues)}return Ys(this.latestValues)&&la(l,this.latestValues),l}removeTransform(a){const o=ut();kr(o,a);for(let l=0;l<this.path.length;l++){const d=this.path[l];if(!d.instance||!Ys(d.latestValues))continue;Cx(d.latestValues)&&d.updateSnapshot();const u=ut(),f=d.measurePageBox();kr(u,f),ak(o,d.latestValues,d.snapshot?d.snapshot.layoutBox:void 0,u)}return Ys(this.latestValues)&&ak(o,this.latestValues),o}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Rt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var h;const o=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=o.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=o.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=o.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==o;if(!(a||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(h=this.parent)!=null&&h.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:f}=this.options;if(!(!this.layout||!(u||f))){if(this.resolvedRelativeTargetAt=Rt.timestamp,!this.targetDelta&&!this.relativeTarget){const p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ut(),this.relativeTargetOrigin=ut(),el(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),kr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=ut(),this.targetWithTransforms=ut()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),i7(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):kr(this.target,this.layout.layoutBox),xR(this.target,this.targetDelta)):kr(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const p=this.getClosestProjectingParent();p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ut(),this.relativeTargetOrigin=ut(),el(this.relativeTargetOrigin,this.target,p.target),kr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Cx(this.parent.latestValues)||yR(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var m;const a=this.getLead(),o=!!this.resumingFrom||this!==a;let l=!0;if((this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty)&&(l=!1),o&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Rt.timestamp&&(l=!1),l)return;const{layout:d,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(d||u))return;kr(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,h=this.treeScale.y;yF(this.layoutCorrected,this.treeScale,this.path,o),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=ut());const{target:p}=a;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(nk(this.prevProjectionDelta.x,this.projectionDelta.x),nk(this.prevProjectionDelta.y,this.projectionDelta.y)),Jo(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==h||!dk(this.projectionDelta.x,this.prevProjectionDelta.x)||!dk(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var o;if((o=this.options.visualElement)==null||o.scheduleRender(),a){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ca(),this.projectionDelta=ca(),this.projectionDeltaWithTransform=ca()}setAnimationOrigin(a,o=!1){const l=this.snapshot,d=l?l.latestValues:{},u={...this.latestValues},f=ca();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!o;const h=ut(),p=l?l.source:void 0,m=this.layout?this.layout.source:void 0,g=p!==m,b=this.getStack(),x=!b||b.members.length<=1,y=!!(g&&!x&&this.options.crossfade===!0&&!this.path.some(X7));this.animationProgress=0;let v;this.mixTargetDelta=w=>{const _=w/1e3;mk(f.x,a.x,_),mk(f.y,a.y,_),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(el(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Y7(this.relativeTarget,this.relativeTargetOrigin,h,_),v&&D7(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=ut()),kr(v,this.relativeTarget)),g&&(this.animationValues=u,C7(u,d,this.latestValues,_,y,x)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=_},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){var o,l,d;this.notifyListeners("animationStart"),(o=this.currentAnimation)==null||o.stop(),(d=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||d.stop(),this.pendingAnimation&&(Ms(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ke.update(()=>{uu.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Aa(0)),this.currentAnimation=j7(this.motionValue,[0,1e3],{...a,velocity:0,isSync:!0,onUpdate:u=>{this.mixTargetDelta(u),a.onUpdate&&a.onUpdate(u)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(O7),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:o,target:l,layout:d,latestValues:u}=a;if(!(!o||!l||!d)){if(this!==a&&this.layout&&d&&VR(this.options.animationType,this.layout.layoutBox,d.layoutBox)){l=this.target||ut();const f=Wt(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+f;const h=Wt(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+h}kr(o,l),la(o,u),Jo(this.projectionDeltaWithTransform,this.layoutCorrected,o,u)}}registerSharedNode(a,o){this.sharedNodes.has(a)||this.sharedNodes.set(a,new I7),this.sharedNodes.get(a).add(o);const d=o.options.initialPromotionConfig;o.promote({transition:d?d.transition:void 0,preserveFollowOpacity:d&&d.shouldPreserveFollowOpacity?d.shouldPreserveFollowOpacity(o):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())==null?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())==null?void 0:o.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:o,preserveFollowOpacity:l}={}){const d=this.getStack();d&&d.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),o&&this.setOptions({transition:o})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let o=!1;const{latestValues:l}=a;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(o=!0),!o)return;const d={};l.z&&nh("z",a,d,this.animationValues);for(let u=0;u<rh.length;u++)nh(`rotate${rh[u]}`,a,d,this.animationValues),nh(`skew${rh[u]}`,a,d,this.animationValues);a.render();for(const u in d)a.setStaticValue(u,d[u]),this.animationValues&&(this.animationValues[u]=d[u]);a.scheduleRender()}applyProjectionStyles(a,o){if(!this.instance||this.isSVG)return;if(!this.isVisible){a.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,a.visibility="",a.opacity="",a.pointerEvents=cu(o==null?void 0:o.pointerEvents)||"",a.transform=l?l(this.latestValues,""):"none";return}const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){this.options.layoutId&&(a.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,a.pointerEvents=cu(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!Ys(this.latestValues)&&(a.transform=l?l({},""):"none",this.hasProjected=!1);return}a.visibility="";const u=d.animationValues||d.latestValues;this.applyTransformsToTarget();let f=L7(this.projectionDeltaWithTransform,this.treeScale,u);l&&(f=l(u,f)),a.transform=f;const{x:h,y:p}=this.projectionDelta;a.transformOrigin=`${h.origin*100}% ${p.origin*100}% 0`,d.animationValues?a.opacity=d===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:a.opacity=d===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const m in Cl){if(u[m]===void 0)continue;const{correct:g,applyTo:b,isCSSVariable:x}=Cl[m],y=f==="none"?u[m]:g(u[m],d);if(b){const v=b.length;for(let w=0;w<v;w++)a[b[w]]=y}else x?this.options.visualElement.renderState.vars[m]=y:a[m]=y}this.options.layoutId&&(a.pointerEvents=d===this?cu(o==null?void 0:o.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var o;return(o=a.currentAnimation)==null?void 0:o.stop()}),this.root.nodes.forEach(fk),this.root.sharedNodes.clear()}}}function F7(e){e.updateLayout()}function $7(e){var r;const t=((r=e.resumeFrom)==null?void 0:r.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:s}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;i==="size"?jr(f=>{const h=a?t.measuredBox[f]:t.layoutBox[f],p=Wt(h);h.min=n[f].min,h.max=h.min+p}):VR(i,t.layoutBox,n)&&jr(f=>{const h=a?t.measuredBox[f]:t.layoutBox[f],p=Wt(n[f]);h.max=h.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+p)});const o=ca();Jo(o,n,t.layoutBox);const l=ca();a?Jo(l,e.applyTransform(s,!0),t.measuredBox):Jo(l,n,t.layoutBox);const d=!OR(o);let u=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:h,layout:p}=f;if(h&&p){const m=ut();el(m,t.layoutBox,h.layoutBox);const g=ut();el(g,n,p.layoutBox),zR(m,g)||(u=!0),f.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=m,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:l,layoutDelta:o,hasLayoutChanged:d,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function V7(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function q7(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function B7(e){e.clearSnapshot()}function fk(e){e.clearMeasurements()}function hk(e){e.isLayoutDirty=!1}function U7(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function pk(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function H7(e){e.resolveTargetDelta()}function W7(e){e.calcProjection()}function G7(e){e.resetSkewAndRotation()}function K7(e){e.removeLeadSnapshot()}function mk(e,t,r){e.translate=et(t.translate,0,r),e.scale=et(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function gk(e,t,r,n){e.min=et(t.min,r.min,n),e.max=et(t.max,r.max,n)}function Y7(e,t,r,n){gk(e.x,t.x,r.x,n),gk(e.y,t.y,r.y,n)}function X7(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Z7={duration:.45,ease:[.4,0,.1,1]},yk=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),xk=yk("applewebkit/")&&!yk("chrome/")?Math.round:Mr;function vk(e){e.min=xk(e.min),e.max=xk(e.max)}function Q7(e){vk(e.x),vk(e.y)}function VR(e,t,r){return e==="position"||e==="preserve-aspect"&&!s7(uk(t),uk(r),.2)}function J7(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const e$=$R({attachResizeListener:(e,t)=>Tl(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),sh={current:void 0},qR=$R({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!sh.current){const e=new e$({});e.mount(window),e.setOptions({layoutScroll:!0}),sh.current=e}return sh.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),t$={pan:{Feature:v7},drag:{Feature:x7,ProjectionNode:qR,MeasureLayout:DR}};function bk(e,t,r){const{props:n}=e;e.animationState&&n.whileHover&&e.animationState.setActive("whileHover",r==="Start");const s="onHover"+r,i=n[s];i&&Ke.postRender(()=>i(t,Zl(t)))}class r$ extends Vs{mount(){const{current:t}=this.node;t&&(this.unmount=jz(t,(r,n)=>(bk(this.node,n,"Start"),s=>bk(this.node,s,"End"))))}unmount(){}}class n$ extends Vs{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Gl(Tl(this.node.current,"focus",()=>this.onFocus()),Tl(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function wk(e,t,r){const{props:n}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&n.whileTap&&e.animationState.setActive("whileTap",r==="Start");const s="onTap"+(r==="End"?"":r),i=n[s];i&&Ke.postRender(()=>i(t,Zl(t)))}class s$ extends Vs{mount(){const{current:t}=this.node;t&&(this.unmount=Ez(t,(r,n)=>(wk(this.node,n,"Start"),(s,{success:i})=>wk(this.node,s,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Ix=new WeakMap,ih=new WeakMap,i$=e=>{const t=Ix.get(e.target);t&&t(e)},a$=e=>{e.forEach(i$)};function o$({root:e,...t}){const r=e||document;ih.has(r)||ih.set(r,{});const n=ih.get(r),s=JSON.stringify(t);return n[s]||(n[s]=new IntersectionObserver(a$,{root:e,...t})),n[s]}function l$(e,t,r){const n=o$(t);return Ix.set(e,r),n.observe(e),()=>{Ix.delete(e),n.unobserve(e)}}const c$={some:0,all:1};class u$ extends Vs{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:r,margin:n,amount:s="some",once:i}=t,a={root:r?r.current:void 0,rootMargin:n,threshold:typeof s=="number"?s:c$[s]},o=l=>{const{isIntersecting:d}=l;if(this.isInView===d||(this.isInView=d,i&&!d&&this.hasEnteredView))return;d&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",d);const{onViewportEnter:u,onViewportLeave:f}=this.node.getProps(),h=d?u:f;h&&h(l)};return l$(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:r}=this.node;["amount","margin","root"].some(d$(t,r))&&this.startObserver()}unmount(){}}function d$({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}const f$={inView:{Feature:u$},tap:{Feature:s$},focus:{Feature:n$},hover:{Feature:r$}},h$={layout:{ProjectionNode:qR,MeasureLayout:DR}},p$={...QF,...f$,...t$,...h$},Le=pF(p$,EF),m$=[{icon:_6,label:"Dashboard",path:"/"},{icon:k6,label:"Projects",path:"/projects"},{icon:Wu,label:"Pipelines",path:"/pipelines"},{icon:ir,label:"Schedules",path:"/schedules"},{icon:Wu,label:"Runs",path:"/runs"},{icon:Wi,label:"Leaderboard",path:"/leaderboard"},{icon:Dr,label:"Assets",path:"/assets"},{icon:Ko,label:"Experiments",path:"/experiments"},{icon:oM,label:"Traces",path:"/traces"}],g$=[{icon:ki,label:"Plugins",path:"/plugins"},{icon:ya,label:"API Tokens",path:"/tokens"},{icon:uM,label:"Settings",path:"/settings"}];function y$({collapsed:e,setCollapsed:t}){const r=Ci();return c.jsxs(Le.aside,{initial:!1,animate:{width:e?80:256},className:"h-screen bg-white dark:bg-slate-800 border-r border-slate-200 dark:border-slate-700 flex flex-col shadow-sm z-20 relative",children:[c.jsxs("div",{className:"p-6 border-b border-slate-100 dark:border-slate-700 flex items-center gap-3 h-[73px]",children:[c.jsx("div",{className:"w-8 h-8 min-w-[32px] bg-primary-600 rounded-lg flex items-center justify-center shadow-lg shadow-primary-500/30",children:c.jsx(Wu,{className:"text-white w-5 h-5"})}),c.jsx(Xl,{children:!e&&c.jsx(Le.h1,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},exit:{opacity:0,x:-10},className:"text-xl font-bold text-slate-900 dark:text-white tracking-tight whitespace-nowrap overflow-hidden",children:"flowyml"})})]}),c.jsxs("nav",{className:"flex-1 p-4 space-y-1 overflow-y-auto overflow-x-hidden scrollbar-thin scrollbar-thumb-slate-200 dark:scrollbar-thumb-slate-700",children:[c.jsx("div",{className:`px-4 py-2 text-xs font-semibold text-slate-400 dark:text-slate-500 uppercase tracking-wider transition-opacity duration-200 ${e?"opacity-0 h-0":"opacity-100"}`,children:"Platform"}),m$.map(n=>c.jsx(kk,{to:n.path,icon:n.icon,label:n.label,collapsed:e,isActive:r.pathname===n.path},n.path)),c.jsx("div",{className:`px-4 py-2 text-xs font-semibold text-slate-400 dark:text-slate-500 uppercase tracking-wider mt-4 transition-opacity duration-200 ${e?"opacity-0 h-0":"opacity-100"}`,children:"Settings"}),g$.map(n=>c.jsx(kk,{to:n.path,icon:n.icon,label:n.label,collapsed:e,isActive:r.pathname===n.path},n.path))]}),c.jsx("div",{className:"p-4 border-t border-slate-100 dark:border-slate-700",children:c.jsx("div",{className:`bg-slate-50 dark:bg-slate-900 rounded-lg p-4 border border-slate-100 dark:border-slate-700 transition-all duration-200 ${e?"p-2 flex justify-center":""}`,children:e?c.jsx("div",{className:"w-2 h-2 rounded-full bg-emerald-500",title:"Online"}):c.jsxs(c.Fragment,{children:[c.jsx("p",{className:"text-xs font-medium text-slate-500 dark:text-slate-400 whitespace-nowrap",children:"flowyml v0.1.0"}),c.jsx("p",{className:"text-xs text-slate-400 dark:text-slate-500 mt-1 whitespace-nowrap",children:"Local Environment"})]})})}),c.jsx("button",{onClick:()=>t(!e),className:"absolute -right-3 top-20 bg-white dark:bg-slate-800 border border-slate-200 dark:border-slate-700 rounded-full p-1 shadow-md text-slate-500 hover:text-primary-600 dark:hover:text-primary-400 transition-colors",children:e?c.jsx(wl,{size:14}):c.jsx(x6,{size:14})})]})}function kk({to:e,icon:t,label:r,collapsed:n,isActive:s}){return c.jsxs(n6,{to:e,className:`flex items-center gap-3 px-4 py-2.5 rounded-lg transition-all duration-200 group relative ${s?"bg-primary-50 dark:bg-primary-900/20 text-primary-700 dark:text-primary-400 font-medium shadow-sm":"text-slate-600 dark:text-slate-400 hover:bg-slate-50 dark:hover:bg-slate-700 hover:text-slate-900 dark:hover:text-white"}`,title:n?r:void 0,children:[c.jsx("span",{className:`transition-colors flex-shrink-0 ${s?"text-primary-600 dark:text-primary-400":"text-slate-400 group-hover:text-slate-600 dark:group-hover:text-slate-300"}`,children:c.jsx(t,{size:20})}),!n&&c.jsx("span",{className:"text-sm whitespace-nowrap overflow-hidden text-ellipsis",children:r}),n&&s&&c.jsx("div",{className:"absolute left-0 top-1/2 -translate-y-1/2 w-1 h-8 bg-primary-600 rounded-r-full"})]})}function x$(){const{selectedProject:e,projects:t,loading:r,selectProject:n,clearProject:s}=Bn(),[i,a]=B.useState(!1),o=t.find(l=>l.name===e);return c.jsxs("div",{className:"relative",children:[c.jsxs("button",{onClick:()=>a(!i),className:"flex items-center gap-2 px-4 py-2 bg-white dark:bg-slate-800 border border-slate-200 dark:border-slate-700 rounded-lg hover:bg-slate-50 dark:hover:bg-slate-700 transition-colors min-w-[200px]",children:[e?c.jsxs(c.Fragment,{children:[c.jsx(i2,{size:18,className:"text-primary-600 dark:text-primary-400"}),c.jsxs("div",{className:"flex-1 text-left",children:[c.jsx("div",{className:"text-sm font-medium text-slate-900 dark:text-white",children:(o==null?void 0:o.name)||e}),(o==null?void 0:o.description)&&c.jsx("div",{className:"text-xs text-slate-500 dark:text-slate-400 truncate max-w-[150px]",children:o.description})]})]}):c.jsxs(c.Fragment,{children:[c.jsx(Uu,{size:18,className:"text-slate-400"}),c.jsx("span",{className:"flex-1 text-left text-sm font-medium text-slate-700 dark:text-slate-300",children:"All Projects"})]}),c.jsx(y6,{size:16,className:`text-slate-400 transition-transform ${i?"rotate-180":""}`})]}),c.jsx(Xl,{children:i&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>a(!1)}),c.jsxs(Le.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.15},className:"absolute top-full mt-2 left-0 w-full min-w-[280px] bg-white dark:bg-slate-800 border border-slate-200 dark:border-slate-700 rounded-lg shadow-xl z-20 max-h-[400px] overflow-y-auto",children:[c.jsxs("button",{onClick:()=>{s(),a(!1)},className:`w-full flex items-center gap-3 px-4 py-3 hover:bg-slate-50 dark:hover:bg-slate-700 transition-colors ${e?"":"bg-primary-50 dark:bg-primary-900/20"}`,children:[c.jsx(Uu,{size:18,className:"text-slate-400"}),c.jsxs("div",{className:"flex-1 text-left",children:[c.jsx("div",{className:"text-sm font-medium text-slate-900 dark:text-white",children:"All Projects"}),c.jsx("div",{className:"text-xs text-slate-500 dark:text-slate-400",children:"View data from all projects"})]}),!e&&c.jsx("div",{className:"w-2 h-2 rounded-full bg-primary-600"})]}),c.jsx("div",{className:"border-t border-slate-200 dark:border-slate-700"}),r?c.jsx("div",{className:"px-4 py-8 text-center text-slate-500 dark:text-slate-400 text-sm",children:"Loading projects..."}):t.length===0?c.jsx("div",{className:"px-4 py-8 text-center text-slate-500 dark:text-slate-400 text-sm",children:"No projects yet"}):t.map(l=>c.jsxs("button",{onClick:()=>{n(l.name),a(!1)},className:`w-full flex items-center gap-3 px-4 py-3 hover:bg-slate-50 dark:hover:bg-slate-700 transition-colors ${e===l.name?"bg-primary-50 dark:bg-primary-900/20":""}`,children:[c.jsx(i2,{size:18,className:e===l.name?"text-primary-600 dark:text-primary-400":"text-slate-400"}),c.jsxs("div",{className:"flex-1 text-left",children:[c.jsx("div",{className:"text-sm font-medium text-slate-900 dark:text-white",children:l.name}),l.description&&c.jsx("div",{className:"text-xs text-slate-500 dark:text-slate-400",children:l.description})]}),e===l.name&&c.jsx("div",{className:"w-2 h-2 rounded-full bg-primary-600"})]},l.name))]})]})})]})}function v$(){const{theme:e,toggleTheme:t}=l6(),n=Ci().pathname.split("/").filter(s=>s);return c.jsxs("header",{className:"bg-white dark:bg-slate-800 border-b border-slate-200 dark:border-slate-700 px-6 py-4 flex items-center justify-between shadow-sm z-10",children:[c.jsx("div",{className:"flex items-center gap-4 flex-1",children:c.jsxs("nav",{className:"flex items-center text-sm text-slate-500 dark:text-slate-400",children:[c.jsx(Nt,{to:"/",className:"hover:text-primary-600 dark:hover:text-primary-400 transition-colors",children:c.jsx(j6,{size:16})}),n.length>0&&c.jsx(wl,{size:14,className:"mx-2 text-slate-300 dark:text-slate-600"}),n.map((s,i)=>{const a=`/${n.slice(0,i+1).join("/")}`,o=i===n.length-1,l=s.charAt(0).toUpperCase()+s.slice(1).replace(/-/g," ");return c.jsxs(B.Fragment,{children:[o?c.jsx("span",{className:"font-medium text-slate-900 dark:text-white",children:l}):c.jsx(Nt,{to:a,className:"hover:text-primary-600 dark:hover:text-primary-400 transition-colors",children:l}),!o&&c.jsx(wl,{size:14,className:"mx-2 text-slate-300 dark:text-slate-600"})]},s)})]})}),c.jsxs("div",{className:"flex items-center gap-4",children:[c.jsx(x$,{}),c.jsx("div",{className:"h-6 w-px bg-slate-200 dark:bg-slate-700 mx-2"}),c.jsx("button",{onClick:t,className:"p-2 rounded-lg hover:bg-slate-100 dark:hover:bg-slate-700 transition-colors text-slate-500 hover:text-primary-600 dark:text-slate-400 dark:hover:text-primary-400","aria-label":"Toggle theme",children:e==="dark"?c.jsx(M6,{size:20}):c.jsx(T6,{size:20})})]})]})}function b$(){const[e,t]=k.useState(!1);return c.jsxs("div",{className:"flex h-screen bg-slate-50 dark:bg-slate-900 overflow-hidden",children:[c.jsx(y$,{collapsed:e,setCollapsed:t}),c.jsxs("div",{className:"flex-1 flex flex-col min-w-0",children:[c.jsx(v$,{}),c.jsx("main",{className:"flex-1 overflow-y-auto p-6 scrollbar-thin scrollbar-thumb-slate-200 dark:scrollbar-thumb-slate-700",children:c.jsx("div",{className:"max-w-7xl mx-auto w-full",children:c.jsx(LL,{})})})]})]})}let Rc=null;const w$=async()=>{if(Rc)return Rc;try{return Rc=await(await fetch("/api/config")).json(),Rc}catch(e){return console.error("Failed to fetch config:",e),{execution_mode:"local"}}},k$=async()=>{const e=await w$();return e.execution_mode==="remote"&&e.remote_server_url?e.remote_server_url:""},gt=async(e,t={})=>{const r=await k$(),n=e.startsWith("/")?e:`/${e}`,s=`${r}${n}`;return fetch(s,t)};function BR(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(r=BR(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function j$(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=BR(e))&&(n&&(n+=" "),n+=t);return n}const Ub="-",_$=e=>{const t=N$(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:a=>{const o=a.split(Ub);return o[0]===""&&o.length!==1&&o.shift(),UR(o,t)||S$(a)},getConflictingClassGroupIds:(a,o)=>{const l=r[a]||[];return o&&n[a]?[...l,...n[a]]:l}}},UR=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),s=n?UR(e.slice(1),n):void 0;if(s)return s;if(t.validators.length===0)return;const i=e.join(Ub);return(a=t.validators.find(({validator:o})=>o(i)))==null?void 0:a.classGroupId},jk=/^\[(.+)\]$/,S$=e=>{if(jk.test(e)){const t=jk.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},N$=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return C$(Object.entries(e.classGroups),r).forEach(([i,a])=>{Lx(a,n,i,t)}),n},Lx=(e,t,r,n)=>{e.forEach(s=>{if(typeof s=="string"){const i=s===""?t:_k(t,s);i.classGroupId=r;return}if(typeof s=="function"){if(E$(s)){Lx(s(n),t,r,n);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([i,a])=>{Lx(a,_k(t,i),r,n)})})},_k=(e,t)=>{let r=e;return t.split(Ub).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},E$=e=>e.isThemeGetter,C$=(e,t)=>t?e.map(([r,n])=>{const s=n.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([a,o])=>[t+a,o])):i);return[r,s]}):e,T$=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const s=(i,a)=>{r.set(i,a),t++,t>e&&(t=0,n=r,r=new Map)};return{get(i){let a=r.get(i);if(a!==void 0)return a;if((a=n.get(i))!==void 0)return s(i,a),a},set(i,a){r.has(i)?r.set(i,a):s(i,a)}}},HR="!",P$=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,s=t[0],i=t.length,a=o=>{const l=[];let d=0,u=0,f;for(let b=0;b<o.length;b++){let x=o[b];if(d===0){if(x===s&&(n||o.slice(b,b+i)===t)){l.push(o.slice(u,b)),u=b+i;continue}if(x==="/"){f=b;continue}}x==="["?d++:x==="]"&&d--}const h=l.length===0?o:o.substring(u),p=h.startsWith(HR),m=p?h.substring(1):h,g=f&&f>u?f-u:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:g}};return r?o=>r({className:o,parseClassName:a}):a},M$=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t},R$=e=>({cache:T$(e.cacheSize),parseClassName:P$(e),..._$(e)}),A$=/\s+/,D$=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s}=t,i=[],a=e.trim().split(A$);let o="";for(let l=a.length-1;l>=0;l-=1){const d=a[l],{modifiers:u,hasImportantModifier:f,baseClassName:h,maybePostfixModifierPosition:p}=r(d);let m=!!p,g=n(m?h.substring(0,p):h);if(!g){if(!m){o=d+(o.length>0?" "+o:o);continue}if(g=n(h),!g){o=d+(o.length>0?" "+o:o);continue}m=!1}const b=M$(u).join(":"),x=f?b+HR:b,y=x+g;if(i.includes(y))continue;i.push(y);const v=s(g,m);for(let w=0;w<v.length;++w){const _=v[w];i.push(x+_)}o=d+(o.length>0?" "+o:o)}return o};function I$(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=WR(t))&&(n&&(n+=" "),n+=r);return n}const WR=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=WR(e[n]))&&(r&&(r+=" "),r+=t);return r};function L$(e,...t){let r,n,s,i=a;function a(l){const d=t.reduce((u,f)=>f(u),e());return r=R$(d),n=r.cache.get,s=r.cache.set,i=o,o(l)}function o(l){const d=n(l);if(d)return d;const u=D$(l,r);return s(l,u),u}return function(){return i(I$.apply(null,arguments))}}const $e=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},GR=/^\[(?:([a-z-]+):)?(.+)\]$/i,O$=/^\d+\/\d+$/,z$=new Set(["px","full","screen"]),F$=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,$$=/\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$/,V$=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,q$=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,B$=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,xn=e=>va(e)||z$.has(e)||O$.test(e),Jn=e=>Wa(e,"length",Z$),va=e=>!!e&&!Number.isNaN(Number(e)),ah=e=>Wa(e,"number",va),po=e=>!!e&&Number.isInteger(Number(e)),U$=e=>e.endsWith("%")&&va(e.slice(0,-1)),pe=e=>GR.test(e),es=e=>F$.test(e),H$=new Set(["length","size","percentage"]),W$=e=>Wa(e,H$,KR),G$=e=>Wa(e,"position",KR),K$=new Set(["image","url"]),Y$=e=>Wa(e,K$,J$),X$=e=>Wa(e,"",Q$),mo=()=>!0,Wa=(e,t,r)=>{const n=GR.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},Z$=e=>$$.test(e)&&!V$.test(e),KR=()=>!1,Q$=e=>q$.test(e),J$=e=>B$.test(e),e8=()=>{const e=$e("colors"),t=$e("spacing"),r=$e("blur"),n=$e("brightness"),s=$e("borderColor"),i=$e("borderRadius"),a=$e("borderSpacing"),o=$e("borderWidth"),l=$e("contrast"),d=$e("grayscale"),u=$e("hueRotate"),f=$e("invert"),h=$e("gap"),p=$e("gradientColorStops"),m=$e("gradientColorStopPositions"),g=$e("inset"),b=$e("margin"),x=$e("opacity"),y=$e("padding"),v=$e("saturate"),w=$e("scale"),_=$e("sepia"),N=$e("skew"),j=$e("space"),E=$e("translate"),M=()=>["auto","contain","none"],C=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto",pe,t],F=()=>[pe,t],T=()=>["",xn,Jn],S=()=>["auto",va,pe],O=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],I=()=>["solid","dashed","dotted","double","none"],V=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],A=()=>["start","end","center","between","around","evenly","stretch"],P=()=>["","0",pe],z=()=>["auto","avoid","all","avoid-page","page","left","right","column"],q=()=>[va,pe];return{cacheSize:500,separator:":",theme:{colors:[mo],spacing:[xn,Jn],blur:["none","",es,pe],brightness:q(),borderColor:[e],borderRadius:["none","","full",es,pe],borderSpacing:F(),borderWidth:T(),contrast:q(),grayscale:P(),hueRotate:q(),invert:P(),gap:F(),gradientColorStops:[e],gradientColorStopPositions:[U$,Jn],inset:D(),margin:D(),opacity:q(),padding:F(),saturate:q(),scale:q(),sepia:P(),skew:q(),space:F(),translate:F()},classGroups:{aspect:[{aspect:["auto","square","video",pe]}],container:["container"],columns:[{columns:[es]}],"break-after":[{"break-after":z()}],"break-before":[{"break-before":z()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...O(),pe]}],overflow:[{overflow:C()}],"overflow-x":[{"overflow-x":C()}],"overflow-y":[{"overflow-y":C()}],overscroll:[{overscroll:M()}],"overscroll-x":[{"overscroll-x":M()}],"overscroll-y":[{"overscroll-y":M()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",po,pe]}],basis:[{basis:D()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",pe]}],grow:[{grow:P()}],shrink:[{shrink:P()}],order:[{order:["first","last","none",po,pe]}],"grid-cols":[{"grid-cols":[mo]}],"col-start-end":[{col:["auto",{span:["full",po,pe]},pe]}],"col-start":[{"col-start":S()}],"col-end":[{"col-end":S()}],"grid-rows":[{"grid-rows":[mo]}],"row-start-end":[{row:["auto",{span:[po,pe]},pe]}],"row-start":[{"row-start":S()}],"row-end":[{"row-end":S()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",pe]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",pe]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...A()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...A(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...A(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[j]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[j]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",pe,t]}],"min-w":[{"min-w":[pe,t,"min","max","fit"]}],"max-w":[{"max-w":[pe,t,"none","full","min","max","fit","prose",{screen:[es]},es]}],h:[{h:[pe,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[pe,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[pe,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[pe,t,"auto","min","max","fit"]}],"font-size":[{text:["base",es,Jn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ah]}],"font-family":[{font:[mo]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",pe]}],"line-clamp":[{"line-clamp":["none",va,ah]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",xn,pe]}],"list-image":[{"list-image":["none",pe]}],"list-style-type":[{list:["none","disc","decimal",pe]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[x]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[x]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...I(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",xn,Jn]}],"underline-offset":[{"underline-offset":["auto",xn,pe]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:F()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",pe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",pe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[x]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...O(),G$]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",W$]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Y$]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[o]}],"border-w-x":[{"border-x":[o]}],"border-w-y":[{"border-y":[o]}],"border-w-s":[{"border-s":[o]}],"border-w-e":[{"border-e":[o]}],"border-w-t":[{"border-t":[o]}],"border-w-r":[{"border-r":[o]}],"border-w-b":[{"border-b":[o]}],"border-w-l":[{"border-l":[o]}],"border-opacity":[{"border-opacity":[x]}],"border-style":[{border:[...I(),"hidden"]}],"divide-x":[{"divide-x":[o]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[o]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[x]}],"divide-style":[{divide:I()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...I()]}],"outline-offset":[{"outline-offset":[xn,pe]}],"outline-w":[{outline:[xn,Jn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:T()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[x]}],"ring-offset-w":[{"ring-offset":[xn,Jn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",es,X$]}],"shadow-color":[{shadow:[mo]}],opacity:[{opacity:[x]}],"mix-blend":[{"mix-blend":[...V(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":V()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",es,pe]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[f]}],saturate:[{saturate:[v]}],sepia:[{sepia:[_]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[x]}],"backdrop-saturate":[{"backdrop-saturate":[v]}],"backdrop-sepia":[{"backdrop-sepia":[_]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",pe]}],duration:[{duration:q()}],ease:[{ease:["linear","in","out","in-out",pe]}],delay:[{delay:q()}],animate:[{animate:["none","spin","ping","pulse","bounce",pe]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[w]}],"scale-x":[{"scale-x":[w]}],"scale-y":[{"scale-y":[w]}],rotate:[{rotate:[po,pe]}],"translate-x":[{"translate-x":[E]}],"translate-y":[{"translate-y":[E]}],"skew-x":[{"skew-x":[N]}],"skew-y":[{"skew-y":[N]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",pe]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",pe]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":F()}],"scroll-mx":[{"scroll-mx":F()}],"scroll-my":[{"scroll-my":F()}],"scroll-ms":[{"scroll-ms":F()}],"scroll-me":[{"scroll-me":F()}],"scroll-mt":[{"scroll-mt":F()}],"scroll-mr":[{"scroll-mr":F()}],"scroll-mb":[{"scroll-mb":F()}],"scroll-ml":[{"scroll-ml":F()}],"scroll-p":[{"scroll-p":F()}],"scroll-px":[{"scroll-px":F()}],"scroll-py":[{"scroll-py":F()}],"scroll-ps":[{"scroll-ps":F()}],"scroll-pe":[{"scroll-pe":F()}],"scroll-pt":[{"scroll-pt":F()}],"scroll-pr":[{"scroll-pr":F()}],"scroll-pb":[{"scroll-pb":F()}],"scroll-pl":[{"scroll-pl":F()}],"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",pe]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[xn,Jn,ah]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},t8=L$(e8);function Ga(...e){return t8(j$(e))}function Me({className:e,children:t,hover:r=!0,...n}){return c.jsx(Le.div,{whileHover:r?{y:-2,boxShadow:"0 10px 30px -10px rgba(0,0,0,0.1)"}:{},transition:{duration:.2},className:Ga("bg-white dark:bg-slate-800 rounded-xl border border-slate-100 dark:border-slate-700 shadow-sm p-6","transition-colors duration-200",e),...n,children:t})}function YR({className:e,children:t,...r}){return c.jsx("div",{className:Ga("flex flex-col space-y-1.5 mb-4",e),...r,children:t})}function XR({className:e,children:t,...r}){return c.jsx("h3",{className:Ga("font-semibold leading-none tracking-tight text-slate-900 dark:text-white",e),...r,children:t})}function Ox({className:e,children:t,...r}){return c.jsx("div",{className:Ga("",e),...r,children:t})}const r8={default:"bg-slate-100 text-slate-800",primary:"bg-primary-50 text-primary-700 border border-primary-100",success:"bg-emerald-50 text-emerald-700 border border-emerald-100",warning:"bg-amber-50 text-amber-700 border border-amber-100",danger:"bg-rose-50 text-rose-700 border border-rose-100",outline:"bg-transparent border border-slate-200 text-slate-600"};function Et({className:e,variant:t="default",children:r,...n}){return c.jsx("span",{className:Ga("inline-flex items-center rounded-md px-2 py-1 text-xs font-medium ring-1 ring-inset ring-black/5",r8[t],e),...n,children:r})}const ZR=6048e5,n8=864e5,Sk=Symbol.for("constructDateFrom");function As(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Sk in e?e[Sk](t):e instanceof Date?new e.constructor(t):new Date(t)}function Qr(e,t){return As(t||e,e)}let s8={};function Ld(){return s8}function Pl(e,t){var o,l,d,u;const r=Ld(),n=(t==null?void 0:t.weekStartsOn)??((l=(o=t==null?void 0:t.locale)==null?void 0:o.options)==null?void 0:l.weekStartsOn)??r.weekStartsOn??((u=(d=r.locale)==null?void 0:d.options)==null?void 0:u.weekStartsOn)??0,s=Qr(e,t==null?void 0:t.in),i=s.getDay(),a=(i<n?7:0)+i-n;return s.setDate(s.getDate()-a),s.setHours(0,0,0,0),s}function Ju(e,t){return Pl(e,{...t,weekStartsOn:1})}function QR(e,t){const r=Qr(e,t==null?void 0:t.in),n=r.getFullYear(),s=As(r,0);s.setFullYear(n+1,0,4),s.setHours(0,0,0,0);const i=Ju(s),a=As(r,0);a.setFullYear(n,0,4),a.setHours(0,0,0,0);const o=Ju(a);return r.getTime()>=i.getTime()?n+1:r.getTime()>=o.getTime()?n:n-1}function Nk(e){const t=Qr(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function i8(e,...t){const r=As.bind(null,t.find(n=>typeof n=="object"));return t.map(r)}function Ek(e,t){const r=Qr(e,t==null?void 0:t.in);return r.setHours(0,0,0,0),r}function a8(e,t,r){const[n,s]=i8(r==null?void 0:r.in,e,t),i=Ek(n),a=Ek(s),o=+i-Nk(i),l=+a-Nk(a);return Math.round((o-l)/n8)}function o8(e,t){const r=QR(e,t),n=As(e,0);return n.setFullYear(r,0,4),n.setHours(0,0,0,0),Ju(n)}function l8(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function c8(e){return!(!l8(e)&&typeof e!="number"||isNaN(+Qr(e)))}function u8(e,t){const r=Qr(e,t==null?void 0:t.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}const d8={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},f8=(e,t,r)=>{let n;const s=d8[e];return typeof s=="string"?n=s:t===1?n=s.one:n=s.other.replace("{{count}}",t.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n};function oh(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}const h8={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},p8={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},m8={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},g8={date:oh({formats:h8,defaultWidth:"full"}),time:oh({formats:p8,defaultWidth:"full"}),dateTime:oh({formats:m8,defaultWidth:"full"})},y8={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},x8=(e,t,r,n)=>y8[e];function go(e){return(t,r)=>{const n=r!=null&&r.context?String(r.context):"standalone";let s;if(n==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,o=r!=null&&r.width?String(r.width):a;s=e.formattingValues[o]||e.formattingValues[a]}else{const a=e.defaultWidth,o=r!=null&&r.width?String(r.width):e.defaultWidth;s=e.values[o]||e.values[a]}const i=e.argumentCallback?e.argumentCallback(t):t;return s[i]}}const v8={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},b8={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},w8={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},k8={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},j8={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},_8={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},S8=(e,t)=>{const r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},N8={ordinalNumber:S8,era:go({values:v8,defaultWidth:"wide"}),quarter:go({values:b8,defaultWidth:"wide",argumentCallback:e=>e-1}),month:go({values:w8,defaultWidth:"wide"}),day:go({values:k8,defaultWidth:"wide"}),dayPeriod:go({values:j8,defaultWidth:"wide",formattingValues:_8,defaultFormattingWidth:"wide"})};function yo(e){return(t,r={})=>{const n=r.width,s=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],i=t.match(s);if(!i)return null;const a=i[0],o=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(o)?C8(o,f=>f.test(a)):E8(o,f=>f.test(a));let d;d=e.valueCallback?e.valueCallback(l):l,d=r.valueCallback?r.valueCallback(d):d;const u=t.slice(a.length);return{value:d,rest:u}}}function E8(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function C8(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function T8(e){return(t,r={})=>{const n=t.match(e.matchPattern);if(!n)return null;const s=n[0],i=t.match(e.parsePattern);if(!i)return null;let a=e.valueCallback?e.valueCallback(i[0]):i[0];a=r.valueCallback?r.valueCallback(a):a;const o=t.slice(s.length);return{value:a,rest:o}}}const P8=/^(\d+)(th|st|nd|rd)?/i,M8=/\d+/i,R8={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},A8={any:[/^b/i,/^(a|c)/i]},D8={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},I8={any:[/1/i,/2/i,/3/i,/4/i]},L8={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},O8={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},z8={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},F8={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},$8={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},V8={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},q8={ordinalNumber:T8({matchPattern:P8,parsePattern:M8,valueCallback:e=>parseInt(e,10)}),era:yo({matchPatterns:R8,defaultMatchWidth:"wide",parsePatterns:A8,defaultParseWidth:"any"}),quarter:yo({matchPatterns:D8,defaultMatchWidth:"wide",parsePatterns:I8,defaultParseWidth:"any",valueCallback:e=>e+1}),month:yo({matchPatterns:L8,defaultMatchWidth:"wide",parsePatterns:O8,defaultParseWidth:"any"}),day:yo({matchPatterns:z8,defaultMatchWidth:"wide",parsePatterns:F8,defaultParseWidth:"any"}),dayPeriod:yo({matchPatterns:$8,defaultMatchWidth:"any",parsePatterns:V8,defaultParseWidth:"any"})},B8={code:"en-US",formatDistance:f8,formatLong:g8,formatRelative:x8,localize:N8,match:q8,options:{weekStartsOn:0,firstWeekContainsDate:1}};function U8(e,t){const r=Qr(e,t==null?void 0:t.in);return a8(r,u8(r))+1}function H8(e,t){const r=Qr(e,t==null?void 0:t.in),n=+Ju(r)-+o8(r);return Math.round(n/ZR)+1}function JR(e,t){var u,f,h,p;const r=Qr(e,t==null?void 0:t.in),n=r.getFullYear(),s=Ld(),i=(t==null?void 0:t.firstWeekContainsDate)??((f=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??s.firstWeekContainsDate??((p=(h=s.locale)==null?void 0:h.options)==null?void 0:p.firstWeekContainsDate)??1,a=As((t==null?void 0:t.in)||e,0);a.setFullYear(n+1,0,i),a.setHours(0,0,0,0);const o=Pl(a,t),l=As((t==null?void 0:t.in)||e,0);l.setFullYear(n,0,i),l.setHours(0,0,0,0);const d=Pl(l,t);return+r>=+o?n+1:+r>=+d?n:n-1}function W8(e,t){var o,l,d,u;const r=Ld(),n=(t==null?void 0:t.firstWeekContainsDate)??((l=(o=t==null?void 0:t.locale)==null?void 0:o.options)==null?void 0:l.firstWeekContainsDate)??r.firstWeekContainsDate??((u=(d=r.locale)==null?void 0:d.options)==null?void 0:u.firstWeekContainsDate)??1,s=JR(e,t),i=As((t==null?void 0:t.in)||e,0);return i.setFullYear(s,0,n),i.setHours(0,0,0,0),Pl(i,t)}function G8(e,t){const r=Qr(e,t==null?void 0:t.in),n=+Pl(r,t)-+W8(r,t);return Math.round(n/ZR)+1}function Te(e,t){const r=e<0?"-":"",n=Math.abs(e).toString().padStart(t,"0");return r+n}const ts={y(e,t){const r=e.getFullYear(),n=r>0?r:1-r;return Te(t==="yy"?n%100:n,t.length)},M(e,t){const r=e.getMonth();return t==="M"?String(r+1):Te(r+1,2)},d(e,t){return Te(e.getDate(),t.length)},a(e,t){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h(e,t){return Te(e.getHours()%12||12,t.length)},H(e,t){return Te(e.getHours(),t.length)},m(e,t){return Te(e.getMinutes(),t.length)},s(e,t){return Te(e.getSeconds(),t.length)},S(e,t){const r=t.length,n=e.getMilliseconds(),s=Math.trunc(n*Math.pow(10,r-3));return Te(s,t.length)}},Vi={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Ck={G:function(e,t,r){const n=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});case"GGGG":default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if(t==="yo"){const n=e.getFullYear(),s=n>0?n:1-n;return r.ordinalNumber(s,{unit:"year"})}return ts.y(e,t)},Y:function(e,t,r,n){const s=JR(e,n),i=s>0?s:1-s;if(t==="YY"){const a=i%100;return Te(a,2)}return t==="Yo"?r.ordinalNumber(i,{unit:"year"}):Te(i,t.length)},R:function(e,t){const r=QR(e);return Te(r,t.length)},u:function(e,t){const r=e.getFullYear();return Te(r,t.length)},Q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return Te(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return Te(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){const n=e.getMonth();switch(t){case"M":case"MM":return ts.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){const n=e.getMonth();switch(t){case"L":return String(n+1);case"LL":return Te(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){const s=G8(e,n);return t==="wo"?r.ordinalNumber(s,{unit:"week"}):Te(s,t.length)},I:function(e,t,r){const n=H8(e);return t==="Io"?r.ordinalNumber(n,{unit:"week"}):Te(n,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):ts.d(e,t)},D:function(e,t,r){const n=U8(e);return t==="Do"?r.ordinalNumber(n,{unit:"dayOfYear"}):Te(n,t.length)},E:function(e,t,r){const n=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});case"EEEE":default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){const s=e.getDay(),i=(s-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return Te(i,2);case"eo":return r.ordinalNumber(i,{unit:"day"});case"eee":return r.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(s,{width:"short",context:"formatting"});case"eeee":default:return r.day(s,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){const s=e.getDay(),i=(s-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return Te(i,t.length);case"co":return r.ordinalNumber(i,{unit:"day"});case"ccc":return r.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(s,{width:"narrow",context:"standalone"});case"cccccc":return r.day(s,{width:"short",context:"standalone"});case"cccc":default:return r.day(s,{width:"wide",context:"standalone"})}},i:function(e,t,r){const n=e.getDay(),s=n===0?7:n;switch(t){case"i":return String(s);case"ii":return Te(s,t.length);case"io":return r.ordinalNumber(s,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});case"iiii":default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){const s=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(s,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(e,t,r){const n=e.getHours();let s;switch(n===12?s=Vi.noon:n===0?s=Vi.midnight:s=n/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(s,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(e,t,r){const n=e.getHours();let s;switch(n>=17?s=Vi.evening:n>=12?s=Vi.afternoon:n>=4?s=Vi.morning:s=Vi.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(s,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(e,t,r){if(t==="ho"){let n=e.getHours()%12;return n===0&&(n=12),r.ordinalNumber(n,{unit:"hour"})}return ts.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):ts.H(e,t)},K:function(e,t,r){const n=e.getHours()%12;return t==="Ko"?r.ordinalNumber(n,{unit:"hour"}):Te(n,t.length)},k:function(e,t,r){let n=e.getHours();return n===0&&(n=24),t==="ko"?r.ordinalNumber(n,{unit:"hour"}):Te(n,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):ts.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):ts.s(e,t)},S:function(e,t){return ts.S(e,t)},X:function(e,t,r){const n=e.getTimezoneOffset();if(n===0)return"Z";switch(t){case"X":return Pk(n);case"XXXX":case"XX":return Xs(n);case"XXXXX":case"XXX":default:return Xs(n,":")}},x:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"x":return Pk(n);case"xxxx":case"xx":return Xs(n);case"xxxxx":case"xxx":default:return Xs(n,":")}},O:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Tk(n,":");case"OOOO":default:return"GMT"+Xs(n,":")}},z:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Tk(n,":");case"zzzz":default:return"GMT"+Xs(n,":")}},t:function(e,t,r){const n=Math.trunc(+e/1e3);return Te(n,t.length)},T:function(e,t,r){return Te(+e,t.length)}};function Tk(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),s=Math.trunc(n/60),i=n%60;return i===0?r+String(s):r+String(s)+t+Te(i,2)}function Pk(e,t){return e%60===0?(e>0?"-":"+")+Te(Math.abs(e)/60,2):Xs(e,t)}function Xs(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),s=Te(Math.trunc(n/60),2),i=Te(n%60,2);return r+s+t+i}const Mk=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},eA=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},K8=(e,t)=>{const r=e.match(/(P+)(p+)?/)||[],n=r[1],s=r[2];if(!s)return Mk(e,t);let i;switch(n){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",Mk(n,t)).replace("{{time}}",eA(s,t))},Y8={p:eA,P:K8},X8=/^D+$/,Z8=/^Y+$/,Q8=["D","DD","YY","YYYY"];function J8(e){return X8.test(e)}function eV(e){return Z8.test(e)}function tV(e,t,r){const n=rV(e,t,r);if(console.warn(n),Q8.includes(e))throw new RangeError(n)}function rV(e,t,r){const n=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const nV=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,sV=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,iV=/^'([^]*?)'?$/,aV=/''/g,oV=/[a-zA-Z]/;function Ye(e,t,r){var u,f,h,p;const n=Ld(),s=n.locale??B8,i=n.firstWeekContainsDate??((f=(u=n.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??1,a=n.weekStartsOn??((p=(h=n.locale)==null?void 0:h.options)==null?void 0:p.weekStartsOn)??0,o=Qr(e,r==null?void 0:r.in);if(!c8(o))throw new RangeError("Invalid time value");let l=t.match(sV).map(m=>{const g=m[0];if(g==="p"||g==="P"){const b=Y8[g];return b(m,s.formatLong)}return m}).join("").match(nV).map(m=>{if(m==="''")return{isToken:!1,value:"'"};const g=m[0];if(g==="'")return{isToken:!1,value:lV(m)};if(Ck[g])return{isToken:!0,value:m};if(g.match(oV))throw new RangeError("Format string contains an unescaped latin alphabet character `"+g+"`");return{isToken:!1,value:m}});s.localize.preprocessor&&(l=s.localize.preprocessor(o,l));const d={firstWeekContainsDate:i,weekStartsOn:a,locale:s};return l.map(m=>{if(!m.isToken)return m.value;const g=m.value;(eV(g)||J8(g))&&tV(g,t,String(e));const b=Ck[g[0]];return b(o,g,s.localize,d)}).join("")}function lV(e){const t=e.match(iV);return t?t[1].replace(aV,"'"):e}function cV(){const[e,t]=k.useState(null),[r,n]=k.useState([]),[s,i]=k.useState(!0),{selectedProject:a}=Bn();if(k.useEffect(()=>{(async()=>{i(!0);try{const u=a?`/api/stats?project=${encodeURIComponent(a)}`:"/api/stats",f=a?`/api/runs?limit=5&project=${encodeURIComponent(a)}`:"/api/runs?limit=5",[h,p]=await Promise.all([gt(u).then(m=>m.json()),gt(f).then(m=>m.json())]);t(h),n(p.runs||[])}catch(u){console.error(u)}finally{i(!1)}})()},[a]),s)return c.jsx("div",{className:"flex items-center justify-center h-96",children:c.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary-600"})});const o={hidden:{opacity:0},show:{opacity:1,transition:{staggerChildren:.1}}},l={hidden:{opacity:0,y:20},show:{opacity:1,y:0}};return c.jsxs(Le.div,{initial:"hidden",animate:"show",variants:o,className:"space-y-8",children:[c.jsxs(Le.div,{variants:l,className:"relative overflow-hidden bg-gradient-to-br from-primary-500 via-primary-600 to-purple-600 rounded-2xl p-8 text-white shadow-xl",children:[c.jsx("div",{className:"absolute top-0 right-0 w-64 h-64 bg-white/10 rounded-full -mr-32 -mt-32"}),c.jsx("div",{className:"absolute bottom-0 left-0 w-48 h-48 bg-white/10 rounded-full -ml-24 -mb-24"}),c.jsxs("div",{className:"relative z-10",children:[c.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[c.jsx(Gu,{size:32,className:"text-yellow-300"}),c.jsx("h1",{className:"text-4xl font-bold",children:"Welcome to flowyml"})]}),c.jsx("p",{className:"text-primary-100 text-lg max-w-2xl",children:"Your lightweight, artifact-centric ML orchestration platform. Build, run, and track your ML pipelines with ease."}),c.jsxs("div",{className:"mt-6 flex gap-3",children:[c.jsx(Nt,{to:"/pipelines",children:c.jsx("button",{className:"px-6 py-2.5 bg-white text-primary-600 rounded-lg font-semibold hover:bg-primary-50 transition-colors shadow-lg",children:"View Pipelines"})}),c.jsx(Nt,{to:"/runs",children:c.jsx("button",{className:"px-6 py-2.5 bg-primary-700/50 backdrop-blur-sm text-white rounded-lg font-semibold hover:bg-primary-700/70 transition-colors border border-white/20",children:"Recent Runs"})})]})]})]}),c.jsxs(Le.div,{variants:l,className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6",children:[c.jsx(Ac,{icon:c.jsx(Yo,{size:24}),label:"Total Pipelines",value:(e==null?void 0:e.pipelines)||0,trend:"+12%",color:"blue"}),c.jsx(Ac,{icon:c.jsx(Bt,{size:24}),label:"Pipeline Runs",value:(e==null?void 0:e.runs)||0,trend:"+23%",color:"purple"}),c.jsx(Ac,{icon:c.jsx(Dr,{size:24}),label:"Artifacts",value:(e==null?void 0:e.artifacts)||0,trend:"+8%",color:"emerald"}),c.jsx(Ac,{icon:c.jsx(Dt,{size:24}),label:"Success Rate",value:(e==null?void 0:e.runs)>0?`${Math.round(e.completed_runs/e.runs*100)}%`:"0%",trend:"+5%",color:"cyan"})]}),c.jsxs(Le.div,{variants:l,className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[c.jsxs("div",{className:"lg:col-span-2",children:[c.jsxs("div",{className:"flex items-center justify-between mb-6",children:[c.jsxs("h3",{className:"text-xl font-bold text-slate-900 flex items-center gap-2",children:[c.jsx(Lt,{className:"text-primary-500",size:24}),"Recent Runs"]}),c.jsxs(Nt,{to:"/runs",className:"text-sm font-semibold text-primary-600 hover:text-primary-700 flex items-center gap-1",children:["View All ",c.jsx(Ps,{size:16})]})]}),c.jsx("div",{className:"space-y-3",children:r.length>0?r.map((d,u)=>c.jsx(uV,{run:d,index:u},d.run_id)):c.jsxs(Me,{className:"p-12 text-center border-dashed",children:[c.jsx(Bt,{className:"mx-auto text-slate-300 mb-3",size:32}),c.jsx("p",{className:"text-slate-500",children:"No recent runs"})]})})]}),c.jsxs("div",{children:[c.jsxs("h3",{className:"text-xl font-bold text-slate-900 mb-6 flex items-center gap-2",children:[c.jsx(Wl,{className:"text-primary-500",size:24}),"Quick Stats"]}),c.jsxs("div",{className:"space-y-3",children:[c.jsx(Dc,{label:"Completed Today",value:(e==null?void 0:e.completed_runs)||0,icon:c.jsx(Dt,{size:18}),color:"emerald"}),c.jsx(Dc,{label:"Failed Runs",value:(e==null?void 0:e.failed_runs)||0,icon:c.jsx(Yr,{size:18}),color:"rose"}),c.jsx(Dc,{label:"Avg Duration",value:e!=null&&e.avg_duration?`${e.avg_duration.toFixed(1)}s`:"0s",icon:c.jsx(Lt,{size:18}),color:"blue"}),c.jsx(Dc,{label:"Cache Hit Rate",value:"87%",icon:c.jsx(Gu,{size:18}),color:"amber"})]})]})]})]})}function Ac({icon:e,label:t,value:r,trend:n,color:s}){const i={blue:"from-blue-500 to-cyan-500",purple:"from-purple-500 to-pink-500",emerald:"from-emerald-500 to-teal-500",cyan:"from-cyan-500 to-blue-500"};return c.jsxs(Me,{className:"relative overflow-hidden group hover:shadow-lg transition-all duration-200",children:[c.jsx("div",{className:`absolute inset-0 bg-gradient-to-br ${i[s]} opacity-0 group-hover:opacity-5 transition-opacity`}),c.jsxs("div",{className:"relative",children:[c.jsxs("div",{className:"flex items-start justify-between mb-4",children:[c.jsx("div",{className:`p-3 rounded-xl bg-gradient-to-br ${i[s]} text-white shadow-lg`,children:e}),c.jsx("span",{className:"text-xs font-semibold text-emerald-600 bg-emerald-50 px-2 py-1 rounded-full",children:n})]}),c.jsx("p",{className:"text-sm text-slate-500 font-medium mb-1",children:t}),c.jsx("p",{className:"text-3xl font-bold text-slate-900",children:r})]})]})}function uV({run:e,index:t}){const r={completed:{icon:c.jsx(Dt,{size:16}),color:"text-emerald-500",bg:"bg-emerald-50"},failed:{icon:c.jsx(Yr,{size:16}),color:"text-rose-500",bg:"bg-rose-50"},running:{icon:c.jsx(Bt,{size:16,className:"animate-pulse"}),color:"text-amber-500",bg:"bg-amber-50"}},n=r[e.status]||r.completed;return c.jsx(Le.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:t*.1},children:c.jsx(Nt,{to:`/runs/${e.run_id}`,children:c.jsx(Me,{className:"group hover:shadow-md hover:border-primary-200 transition-all duration-200",children:c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("div",{className:`p-2 rounded-lg ${n.bg} ${n.color}`,children:n.icon}),c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsx("h4",{className:"font-semibold text-slate-900 truncate group-hover:text-primary-600 transition-colors",children:e.pipeline_name}),c.jsxs("div",{className:"flex items-center gap-2 text-xs text-slate-500 mt-0.5",children:[c.jsx("span",{className:"font-mono",children:e.run_id.substring(0,8)}),e.start_time&&c.jsxs(c.Fragment,{children:[c.jsx("span",{children:"•"}),c.jsx("span",{children:Ye(new Date(e.start_time),"MMM d, HH:mm")})]})]})]}),c.jsx(Et,{variant:e.status==="completed"?"success":e.status==="failed"?"danger":"warning",className:"text-xs",children:e.status})]})})})})}function Dc({label:e,value:t,icon:r,color:n}){const s={emerald:"bg-emerald-50 text-emerald-600",rose:"bg-rose-50 text-rose-600",blue:"bg-blue-50 text-blue-600",amber:"bg-amber-50 text-amber-600"};return c.jsx(Me,{className:"hover:shadow-md transition-shadow duration-200",children:c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{children:[c.jsx("p",{className:"text-sm text-slate-500 font-medium mb-1",children:e}),c.jsx("p",{className:"text-2xl font-bold text-slate-900",children:t})]}),c.jsx("div",{className:`p-2.5 rounded-lg ${s[n]}`,children:r})]})})}const dV={primary:"bg-primary-600 text-white hover:bg-primary-700 shadow-md shadow-primary-500/20",secondary:"bg-white text-slate-900 border border-slate-200 hover:bg-slate-50",ghost:"bg-transparent text-slate-600 hover:bg-slate-100",danger:"bg-rose-600 text-white hover:bg-rose-700 shadow-md shadow-rose-500/20"},fV={sm:"h-8 px-3 text-xs",md:"h-10 px-4 py-2",lg:"h-12 px-8 text-lg",icon:"h-10 w-10"};function me({className:e,variant:t="primary",size:r="md",children:n,...s}){return c.jsx(Le.button,{whileTap:{scale:.98},className:Ga("inline-flex items-center justify-center rounded-lg font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500 disabled:pointer-events-none disabled:opacity-50",dV[t],fV[r],e),...s,children:n})}function Ka({title:e,subtitle:t,actions:r,items:n=[],columns:s=[],renderGrid:i,renderList:a,searchPlaceholder:o="Search...",initialView:l="grid",emptyState:d,loading:u=!1}){const[f,h]=k.useState(l),[p,m]=k.useState(""),[g,b]=k.useState({key:null,direction:"asc"}),y=[...n.filter(w=>{if(!p)return!0;const _=p.toLowerCase();return Object.values(w).some(N=>String(N).toLowerCase().includes(_))})].sort((w,_)=>{if(!g.key)return 0;const N=w[g.key],j=_[g.key];return N<j?g.direction==="asc"?-1:1:N>j?g.direction==="asc"?1:-1:0}),v=w=>{b(_=>({key:w,direction:_.key===w&&_.direction==="asc"?"desc":"asc"}))};return c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"flex flex-col md:flex-row md:items-center justify-between gap-4",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"text-2xl font-bold text-slate-900 dark:text-white",children:e}),t&&c.jsx("p",{className:"text-slate-500 dark:text-slate-400 mt-1",children:t})]}),r&&c.jsx("div",{className:"flex gap-2",children:r})]}),c.jsxs("div",{className:"flex flex-col md:flex-row gap-4 items-center justify-between bg-white dark:bg-slate-800 p-4 rounded-xl border border-slate-200 dark:border-slate-700 shadow-sm",children:[c.jsxs("div",{className:"relative w-full md:w-96",children:[c.jsx(hx,{className:"absolute left-3 top-1/2 -translate-y-1/2 text-slate-400 w-4 h-4"}),c.jsx("input",{type:"text",placeholder:o,value:p,onChange:w=>m(w.target.value),className:"w-full pl-10 pr-4 py-2 bg-slate-50 dark:bg-slate-900 border border-slate-200 dark:border-slate-700 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 text-sm text-slate-900 dark:text-white"})]}),c.jsx("div",{className:"flex items-center gap-2 w-full md:w-auto justify-end",children:c.jsxs("div",{className:"flex bg-slate-100 dark:bg-slate-900 p-1 rounded-lg border border-slate-200 dark:border-slate-700",children:[c.jsx("button",{onClick:()=>h("grid"),className:`p-2 rounded-md transition-all ${f==="grid"?"bg-white dark:bg-slate-800 shadow-sm text-primary-600":"text-slate-500 hover:text-slate-700 dark:hover:text-slate-300"}`,title:"Grid View",children:c.jsx(S6,{size:18})}),c.jsx("button",{onClick:()=>h("list"),className:`p-2 rounded-md transition-all ${f==="list"?"bg-white dark:bg-slate-800 shadow-sm text-primary-600":"text-slate-500 hover:text-slate-700 dark:hover:text-slate-300"}`,title:"List View",children:c.jsx(E6,{size:18})}),c.jsx("button",{onClick:()=>h("table"),className:`p-2 rounded-md transition-all ${f==="table"?"bg-white dark:bg-slate-800 shadow-sm text-primary-600":"text-slate-500 hover:text-slate-700 dark:hover:text-slate-300"}`,title:"Table View",children:c.jsx(R6,{size:18})})]})})]}),u?c.jsx("div",{className:"flex justify-center py-12",children:c.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-500"})}):y.length===0?d||c.jsxs("div",{className:"text-center py-12 bg-slate-50 dark:bg-slate-800/50 rounded-xl border-2 border-dashed border-slate-200 dark:border-slate-700",children:[c.jsx("div",{className:"flex justify-center mb-4",children:c.jsx(hx,{className:"w-12 h-12 text-slate-300 dark:text-slate-600"})}),c.jsx("h3",{className:"text-lg font-medium text-slate-900 dark:text-white",children:"No items found"}),c.jsx("p",{className:"text-slate-500 dark:text-slate-400 mt-1",children:p?`No results matching "${p}"`:"Get started by creating a new item."})]}):c.jsxs("div",{className:"animate-in fade-in duration-300",children:[f==="grid"&&c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:y.map((w,_)=>c.jsx("div",{children:i(w)},_))}),f==="list"&&c.jsx("div",{className:"space-y-4",children:y.map((w,_)=>c.jsx("div",{children:a?a(w):i(w)},_))}),f==="table"&&c.jsx("div",{className:"bg-white dark:bg-slate-800 rounded-xl border border-slate-200 dark:border-slate-700 overflow-hidden shadow-sm",children:c.jsx("div",{className:"overflow-x-auto",children:c.jsxs("table",{className:"w-full text-sm text-left",children:[c.jsx("thead",{className:"text-xs text-slate-500 uppercase bg-slate-50 dark:bg-slate-900/50 border-b border-slate-200 dark:border-slate-700",children:c.jsx("tr",{children:s.map((w,_)=>c.jsx("th",{className:"px-6 py-3 font-medium cursor-pointer hover:bg-slate-100 dark:hover:bg-slate-800 transition-colors",onClick:()=>w.sortable&&v(w.key),children:c.jsxs("div",{className:"flex items-center gap-2",children:[w.header,w.sortable&&c.jsx(p6,{size:14,className:"text-slate-400"})]})},_))})}),c.jsx("tbody",{className:"divide-y divide-slate-200 dark:divide-slate-700",children:y.map((w,_)=>c.jsx("tr",{className:"bg-white dark:bg-slate-800 hover:bg-slate-50 dark:hover:bg-slate-700/50 transition-colors",children:s.map((N,j)=>c.jsx("td",{className:"px-6 py-4",children:N.render?N.render(w):w[N.key]},j))},_))})]})})})]})]})}function hV(){const[e,t]=k.useState([]),[r,n]=k.useState(!0),[s,i]=k.useState([]),{selectedProject:a}=Bn(),o=async()=>{n(!0);try{const u=a?`/api/pipelines?project=${encodeURIComponent(a)}`:"/api/pipelines",f=a?`/api/runs?project=${encodeURIComponent(a)}`:"/api/runs",p=await(await gt(u)).json(),g=await(await gt(f)).json(),b=p.pipelines.map(x=>{const y=g.runs.filter(C=>C.pipeline_name===x),v=y.filter(C=>C.status==="completed"),w=y.filter(C=>C.status==="failed"),_=y.length>0?y.reduce((C,D)=>C+(D.duration||0),0)/y.length:0,N=y.length>0?y.sort((C,D)=>new Date(D.start_time)-new Date(C.start_time))[0]:null,j=y.map(C=>C.project).filter(Boolean),E={};j.forEach(C=>E[C]=(E[C]||0)+1);const M=Object.keys(E).sort((C,D)=>E[D]-E[C])[0]||null;return{name:x,totalRuns:y.length,completedRuns:v.length,failedRuns:w.length,successRate:y.length>0?v.length/y.length*100:0,avgDuration:_,lastRun:N,project:M}});t(b)}catch(u){console.error(u)}finally{n(!1)}};k.useEffect(()=>{o()},[a]);const l=[{header:c.jsx("input",{type:"checkbox",checked:s.length===e.length&&e.length>0,onChange:u=>{u.target.checked?i(e.map(f=>f.name)):i([])},className:"w-4 h-4 rounded border-slate-300 text-primary-600 focus:ring-primary-500"}),key:"select",render:u=>c.jsx("input",{type:"checkbox",checked:s.includes(u.name),onChange:f=>{f.target.checked?i([...s,u.name]):i(s.filter(h=>h!==u.name))},onClick:f=>f.stopPropagation(),className:"w-4 h-4 rounded border-slate-300 text-primary-600 focus:ring-primary-500"})},{header:"Pipeline",key:"name",sortable:!0,render:u=>c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("div",{className:"p-2 bg-gradient-to-br from-primary-500 to-purple-500 rounded-lg text-white",children:c.jsx(Yo,{size:16})}),c.jsx("span",{className:"font-medium text-slate-900 dark:text-white",children:u.name})]})},{header:"Project",key:"project",render:u=>c.jsx("span",{className:"text-sm text-slate-600 dark:text-slate-400",children:u.project||"-"})},{header:"Success Rate",key:"successRate",sortable:!0,render:u=>{const f=u.successRate,h=f>=80?"text-emerald-600 bg-emerald-50":f>=50?"text-amber-600 bg-amber-50":"text-rose-600 bg-rose-50";return c.jsxs("span",{className:`px-2 py-1 rounded text-xs font-semibold ${h}`,children:[f.toFixed(0),"%"]})}},{header:"Total Runs",key:"totalRuns",sortable:!0,render:u=>c.jsxs("div",{className:"flex items-center gap-2 text-slate-600 dark:text-slate-400",children:[c.jsx(Bt,{size:14}),u.totalRuns]})},{header:"Avg Duration",key:"avgDuration",sortable:!0,render:u=>c.jsxs("div",{className:"flex items-center gap-2 text-slate-600 dark:text-slate-400",children:[c.jsx(Lt,{size:14}),u.avgDuration>0?`${u.avgDuration.toFixed(1)}s`:"-"]})},{header:"Last Run",key:"lastRun",render:u=>u.lastRun?c.jsx("div",{className:"text-sm text-slate-500",children:Ye(new Date(u.lastRun.start_time),"MMM d, HH:mm")}):"-"},{header:"Actions",key:"actions",render:u=>c.jsxs(Nt,{to:`/runs?pipeline=${encodeURIComponent(u.name)}`,className:"text-primary-600 hover:text-primary-700 font-medium text-sm flex items-center gap-1",children:["View Runs ",c.jsx(Ps,{size:14})]})}],d=u=>{const f=u.successRate||0,h=f>=80?"emerald":f>=50?"amber":"rose",m={emerald:{bg:"bg-emerald-50",text:"text-emerald-600"},amber:{bg:"bg-amber-50",text:"text-amber-600"},rose:{bg:"bg-rose-50",text:"text-rose-600"}}[h];return c.jsxs(Me,{className:"group cursor-pointer hover:shadow-xl hover:border-primary-300 transition-all duration-200 overflow-hidden h-full",children:[c.jsxs("div",{className:"flex items-start justify-between mb-4",children:[c.jsx("div",{className:"p-3 bg-gradient-to-br from-primary-500 to-purple-500 rounded-xl text-white group-hover:scale-110 transition-transform shadow-lg",children:c.jsx(Yo,{size:24})}),c.jsxs("div",{className:"flex flex-col items-end gap-1",children:[u.totalRuns>0&&c.jsxs(Et,{variant:"secondary",className:"text-xs bg-slate-100 text-slate-600",children:[u.totalRuns," runs"]}),f>0&&c.jsxs("div",{className:`text-xs font-semibold px-2 py-0.5 rounded ${m.bg} ${m.text}`,children:[f.toFixed(0),"% success"]})]})]}),c.jsx("h3",{className:"text-lg font-bold text-slate-900 dark:text-white mb-3 group-hover:text-primary-600 transition-colors",children:u.name}),c.jsxs("div",{className:"grid grid-cols-2 gap-3 mb-4",children:[c.jsx(Ic,{icon:c.jsx(Bt,{size:14}),label:"Total",value:u.totalRuns,color:"blue"}),c.jsx(Ic,{icon:c.jsx(Dt,{size:14}),label:"Success",value:u.completedRuns,color:"emerald"}),c.jsx(Ic,{icon:c.jsx(Lt,{size:14}),label:"Avg Time",value:u.avgDuration>0?`${u.avgDuration.toFixed(1)}s`:"-",color:"purple"}),c.jsx(Ic,{icon:c.jsx(Yr,{size:14}),label:"Failed",value:u.failedRuns,color:"rose"})]}),u.lastRun&&c.jsx("div",{className:"pt-4 border-t border-slate-100 dark:border-slate-700",children:c.jsxs("div",{className:"flex items-center justify-between text-xs",children:[c.jsxs("span",{className:"text-slate-500 flex items-center gap-1",children:[c.jsx(ir,{size:12}),"Last run"]}),c.jsx("span",{className:"text-slate-700 dark:text-slate-300 font-medium",children:Ye(new Date(u.lastRun.start_time),"MMM d, HH:mm")})]})}),c.jsxs(Nt,{to:`/runs?pipeline=${encodeURIComponent(u.name)}`,className:"mt-4 flex items-center justify-center gap-2 py-2 px-4 bg-slate-50 dark:bg-slate-700 hover:bg-primary-50 dark:hover:bg-primary-900/20 text-slate-700 dark:text-slate-200 hover:text-primary-600 rounded-lg transition-all group-hover:bg-primary-50",children:[c.jsx("span",{className:"text-sm font-semibold",children:"View Runs"}),c.jsx(Ps,{size:16,className:"group-hover:translate-x-1 transition-transform"})]})]})};return c.jsx("div",{className:"p-6 max-w-7xl mx-auto",children:c.jsx(Ka,{title:"Pipelines",subtitle:"View and manage your ML pipelines",items:e,loading:r,columns:l,renderGrid:d,actions:c.jsx(pV,{selectedPipelines:s,onComplete:()=>{o(),i([])}}),emptyState:c.jsxs("div",{className:"text-center py-16 bg-slate-50 dark:bg-slate-800/30 rounded-xl border-2 border-dashed border-slate-200 dark:border-slate-700",children:[c.jsx("div",{className:"mx-auto w-20 h-20 bg-slate-100 dark:bg-slate-700 rounded-2xl flex items-center justify-center mb-6",children:c.jsx(Yo,{className:"text-slate-400",size:32})}),c.jsx("h3",{className:"text-xl font-bold text-slate-900 dark:text-white mb-2",children:"No pipelines found"}),c.jsx("p",{className:"text-slate-500 max-w-md mx-auto",children:"Create your first pipeline by defining steps and running them with flowyml"})]})})})}function Ic({icon:e,label:t,value:r,color:n}){const s={blue:"bg-blue-50 text-blue-600",emerald:"bg-emerald-50 text-emerald-600",purple:"bg-purple-50 text-purple-600",rose:"bg-rose-50 text-rose-600"};return c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("div",{className:`p-1.5 rounded ${s[n]}`,children:e}),c.jsxs("div",{children:[c.jsx("p",{className:"text-xs text-slate-500",children:t}),c.jsx("p",{className:"text-sm font-bold text-slate-900 dark:text-white",children:r})]})]})}function pV({selectedPipelines:e,onComplete:t}){const[r,n]=k.useState(!1),[s,i]=k.useState([]),[a,o]=k.useState(!1);k.useEffect(()=>{r&&fetch("/api/projects/").then(d=>d.json()).then(d=>i(d)).catch(d=>console.error("Failed to load projects:",d))},[r]);const l=async d=>{o(!0);try{const u=e.map(h=>fetch(`/api/pipelines/${h}/project`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({project_name:d})}));await Promise.all(u);const f=document.createElement("div");f.className="fixed top-4 right-4 px-4 py-3 rounded-lg shadow-lg z-50 bg-green-500 text-white",f.textContent=`Added ${e.length} pipeline(s) to project ${d}`,document.body.appendChild(f),setTimeout(()=>document.body.removeChild(f),3e3),n(!1),t&&t()}catch(u){console.error("Failed to update projects:",u)}finally{o(!1)}};return c.jsxs("div",{className:"relative",children:[c.jsxs("button",{onClick:()=>n(!r),disabled:a||e.length===0,className:"flex items-center gap-2 px-3 py-1.5 text-sm font-medium text-slate-600 dark:text-slate-300 bg-white dark:bg-slate-800 border border-slate-200 dark:border-slate-700 rounded-lg hover:bg-slate-50 dark:hover:bg-slate-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[c.jsx(Md,{size:16}),a?"Updating...":`Add to Project (${e.length})`]}),r&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>n(!1)}),c.jsxs("div",{className:"absolute right-0 mt-2 w-56 bg-white dark:bg-slate-800 rounded-xl shadow-xl border border-slate-200 dark:border-slate-700 z-20",children:[c.jsx("div",{className:"p-2 border-b border-slate-100 dark:border-slate-700",children:c.jsx("span",{className:"text-xs font-semibold text-slate-500 px-2",children:"Select Project"})}),c.jsx("div",{className:"max-h-64 overflow-y-auto p-1",children:s.length>0?s.map(d=>c.jsx("button",{onClick:()=>l(d.name),disabled:a,className:"w-full text-left px-3 py-2 text-sm text-slate-700 dark:text-slate-200 hover:bg-slate-50 dark:hover:bg-slate-700 rounded-lg transition-colors disabled:opacity-50",children:d.name},d.name)):c.jsx("div",{className:"px-3 py-2 text-sm text-slate-400 italic",children:"No projects found"})})]})]})]})}const Rk={completed:{icon:Dt,label:"Completed",color:"text-emerald-600 dark:text-emerald-400",bg:"bg-emerald-50 dark:bg-emerald-900/20",border:"border-emerald-200 dark:border-emerald-800"},success:{icon:Dt,label:"Success",color:"text-emerald-600 dark:text-emerald-400",bg:"bg-emerald-50 dark:bg-emerald-900/20",border:"border-emerald-200 dark:border-emerald-800"},failed:{icon:Yr,label:"Failed",color:"text-rose-600 dark:text-rose-400",bg:"bg-rose-50 dark:bg-rose-900/20",border:"border-rose-200 dark:border-rose-800"},running:{icon:Hu,label:"Running",color:"text-blue-600 dark:text-blue-400",bg:"bg-blue-50 dark:bg-blue-900/20",border:"border-blue-200 dark:border-blue-800",animate:!0},pending:{icon:Lt,label:"Pending",color:"text-amber-600 dark:text-amber-400",bg:"bg-amber-50 dark:bg-amber-900/20",border:"border-amber-200 dark:border-amber-800"},queued:{icon:Lt,label:"Queued",color:"text-slate-600 dark:text-slate-400",bg:"bg-slate-50 dark:bg-slate-900/20",border:"border-slate-200 dark:border-slate-700"},initializing:{icon:Wu,label:"Initializing",color:"text-blue-600 dark:text-blue-400",bg:"bg-blue-50 dark:bg-blue-900/20",border:"border-blue-200 dark:border-blue-800"},cached:{icon:Dt,label:"Cached",color:"text-cyan-600 dark:text-cyan-400",bg:"bg-cyan-50 dark:bg-cyan-900/20",border:"border-cyan-200 dark:border-cyan-800"}};function mV({status:e,size:t="md",showLabel:r=!0,className:n="",iconOnly:s=!1}){const i=Rk[e==null?void 0:e.toLowerCase()]||Rk.pending,a=i.icon,o={sm:{icon:14,text:"text-xs",padding:"px-2 py-0.5"},md:{icon:16,text:"text-sm",padding:"px-2.5 py-1"},lg:{icon:20,text:"text-base",padding:"px-3 py-1.5"}},{icon:l,text:d,padding:u}=o[t];return s?c.jsx(a,{size:l,className:`${i.color} ${i.animate?"animate-spin":""} ${n}`}):c.jsxs("div",{className:`inline-flex items-center gap-1.5 ${u} rounded-full border ${i.bg} ${i.border} ${n}`,children:[c.jsx(a,{size:l,className:`${i.color} ${i.animate?"animate-spin":""}`}),r&&c.jsx("span",{className:`font-medium ${i.color} ${d}`,children:i.label})]})}function gV({status:e,className:t=""}){return c.jsx(mV,{status:e,size:"sm",className:t})}function Ql({icon:e,title:t,description:r,action:n,actionLabel:s,onAction:i,className:a=""}){return c.jsxs("div",{className:`flex flex-col items-center justify-center py-16 px-4 text-center ${a}`,children:[c.jsx("div",{className:"w-20 h-20 bg-gradient-to-br from-slate-100 to-slate-200 dark:from-slate-800 dark:to-slate-700 rounded-2xl flex items-center justify-center mb-6 shadow-inner",children:e&&c.jsx(e,{className:"text-slate-400 dark:text-slate-500",size:40})}),c.jsx("h3",{className:"text-xl font-bold text-slate-900 dark:text-white mb-2",children:t}),r&&c.jsx("p",{className:"text-slate-500 dark:text-slate-400 max-w-md mb-6",children:r}),(n||s&&i)&&c.jsx("div",{children:n||c.jsx(me,{onClick:i,children:s})})]})}function yV(){const[e,t]=k.useState([]),[r,n]=k.useState(!0),[s,i]=k.useState("all"),[a,o]=k.useState([]),{selectedProject:l}=Bn(),d=async()=>{n(!0);try{const m=l?`/api/runs?project=${encodeURIComponent(l)}`:"/api/runs",b=await(await gt(m)).json();t(b.runs||[])}catch(m){console.error(m)}finally{n(!1)}};k.useEffect(()=>{d()},[l]);const u=e.filter(m=>s==="all"?!0:m.status===s),f={total:e.length,completed:e.filter(m=>m.status==="completed").length,failed:e.filter(m=>m.status==="failed").length,running:e.filter(m=>m.status==="running").length},h=[{header:c.jsx("input",{type:"checkbox",checked:a.length===u.length&&u.length>0,onChange:m=>{m.target.checked?o(u.map(g=>g.run_id)):o([])},className:"w-4 h-4 rounded border-slate-300 text-primary-600 focus:ring-primary-500"}),key:"select",render:m=>c.jsx("input",{type:"checkbox",checked:a.includes(m.run_id),onChange:g=>{g.target.checked?o([...a,m.run_id]):o(a.filter(b=>b!==m.run_id))},onClick:g=>g.stopPropagation(),className:"w-4 h-4 rounded border-slate-300 text-primary-600 focus:ring-primary-500"})},{header:"Status",key:"status",sortable:!0,render:m=>c.jsx(gV,{status:m.status})},{header:"Pipeline",key:"pipeline_name",sortable:!0,render:m=>c.jsx("span",{className:"font-medium text-slate-900 dark:text-white",children:m.pipeline_name})},{header:"Project",key:"project",sortable:!0,render:m=>c.jsx("span",{className:"text-sm text-slate-600 dark:text-slate-400",children:m.project||"-"})},{header:"Run ID",key:"run_id",render:m=>c.jsxs("span",{className:"font-mono text-xs bg-slate-100 dark:bg-slate-700 px-2 py-1 rounded text-slate-600 dark:text-slate-300",children:[m.run_id.substring(0,8),"..."]})},{header:"Start Time",key:"start_time",sortable:!0,render:m=>c.jsxs("div",{className:"flex items-center gap-2 text-slate-500",children:[c.jsx(ir,{size:14}),m.start_time?Ye(new Date(m.start_time),"MMM d, HH:mm:ss"):"-"]})},{header:"Duration",key:"duration",sortable:!0,render:m=>c.jsxs("div",{className:"flex items-center gap-2 text-slate-500",children:[c.jsx(Lt,{size:14}),m.duration?`${m.duration.toFixed(2)}s`:"-"]})},{header:"Actions",key:"actions",render:m=>c.jsxs(Nt,{to:`/runs/${m.run_id}`,className:"text-primary-600 hover:text-primary-700 font-medium text-sm flex items-center gap-1",children:["Details ",c.jsx(Ps,{size:14})]})}],p=m=>{const g={completed:{icon:c.jsx(Dt,{size:20}),color:"text-emerald-500",bg:"bg-emerald-50",border:"border-emerald-200",badge:"success"},failed:{icon:c.jsx(Yr,{size:20}),color:"text-rose-500",bg:"bg-rose-50",border:"border-rose-200",badge:"danger"},running:{icon:c.jsx(Hu,{size:20,className:"animate-spin"}),color:"text-amber-500",bg:"bg-amber-50",border:"border-amber-200",badge:"warning"}},b=g[m.status]||g.completed;return c.jsx(Nt,{to:`/runs/${m.run_id}`,children:c.jsxs(Me,{className:`group hover:shadow-lg transition-all duration-200 border-l-4 ${b.border} hover:border-l-primary-400 h-full`,children:[c.jsxs("div",{className:"flex items-center justify-between mb-4",children:[c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("div",{className:`p-2 rounded-lg ${b.bg} ${b.color}`,children:b.icon}),c.jsxs("div",{children:[c.jsx("h3",{className:"font-bold text-slate-900 dark:text-white truncate max-w-[150px]",title:m.pipeline_name,children:m.pipeline_name}),c.jsx("div",{className:"text-xs text-slate-500 font-mono",children:m.run_id.substring(0,8)})]})]}),c.jsx(Et,{variant:b.badge,className:"text-xs uppercase tracking-wide",children:m.status})]}),c.jsxs("div",{className:"space-y-2 text-sm text-slate-500 dark:text-slate-400",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("span",{className:"flex items-center gap-2",children:[c.jsx(ir,{size:14})," Started"]}),c.jsx("span",{children:m.start_time?Ye(new Date(m.start_time),"MMM d, HH:mm"):"-"})]}),c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("span",{className:"flex items-center gap-2",children:[c.jsx(Lt,{size:14})," Duration"]}),c.jsx("span",{children:m.duration?`${m.duration.toFixed(2)}s`:"-"})]})]}),m.steps&&c.jsxs("div",{className:"mt-4 pt-4 border-t border-slate-100 dark:border-slate-700",children:[c.jsxs("div",{className:"flex justify-between text-xs mb-1",children:[c.jsx("span",{className:"text-slate-500",children:"Progress"}),c.jsxs("span",{className:"font-medium text-slate-900 dark:text-white",children:[Object.values(m.steps).filter(x=>x.success).length," / ",Object.keys(m.steps).length]})]}),c.jsx("div",{className:"w-full h-1.5 bg-slate-100 dark:bg-slate-700 rounded-full overflow-hidden",children:c.jsx("div",{className:`h-full ${b.color.replace("text-","bg-")} transition-all duration-300`,style:{width:`${Object.values(m.steps).filter(x=>x.success).length/Object.keys(m.steps).length*100}%`}})})]})]})})};return r?c.jsx("div",{className:"flex items-center justify-center h-96",children:c.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary-600"})}):c.jsxs("div",{className:"p-6 max-w-7xl mx-auto space-y-8",children:[c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:[c.jsx(Lc,{label:"Total Runs",value:f.total,icon:c.jsx(Bt,{size:20}),color:"slate",active:s==="all",onClick:()=>i("all")}),c.jsx(Lc,{label:"Completed",value:f.completed,icon:c.jsx(Dt,{size:20}),color:"emerald",active:s==="completed",onClick:()=>i("completed")}),c.jsx(Lc,{label:"Failed",value:f.failed,icon:c.jsx(Yr,{size:20}),color:"rose",active:s==="failed",onClick:()=>i("failed")}),c.jsx(Lc,{label:"Running",value:f.running,icon:c.jsx(Hu,{size:20}),color:"amber",active:s==="running",onClick:()=>i("running")})]}),c.jsx(Ka,{title:"Pipeline Runs",subtitle:"Monitor and track all your pipeline executions",items:u,loading:r,columns:h,renderGrid:p,initialView:"table",actions:c.jsx("div",{className:"flex items-center gap-2",children:c.jsx(xV,{selectedRuns:a,onComplete:()=>{d(),o([])}})}),emptyState:c.jsx(Ql,{icon:Bt,title:"No runs found",description:s==="all"?"Run a pipeline to see it here":`No ${s} runs found. Try a different filter.`})})]})}function xV({selectedRuns:e,onComplete:t}){const[r,n]=k.useState(!1),[s,i]=k.useState([]),[a,o]=k.useState(!1);k.useEffect(()=>{r&&fetch("/api/projects/").then(u=>u.json()).then(u=>i(u)).catch(u=>console.error("Failed to load projects:",u))},[r]);const l=async u=>{o(!0);try{const f=e.map(h=>fetch(`/api/runs/${h}/project`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({project_name:u})}));await Promise.all(f),d("success",`Added ${e.length} run(s) to project ${u}`),n(!1),t&&t()}catch(f){console.error("Failed to update projects:",f),d("error","Failed to update project attribution")}finally{o(!1)}},d=(u,f)=>{const h=document.createElement("div");h.className=`fixed top-4 right-4 px-4 py-3 rounded-lg shadow-lg z-50 ${u==="success"?"bg-green-500":"bg-red-500"} text-white animate-in slide-in-from-right`,h.textContent=f,document.body.appendChild(h),setTimeout(()=>{h.classList.add("animate-out","fade-out"),setTimeout(()=>document.body.removeChild(h),300)},3e3)};return c.jsxs("div",{className:"relative",children:[c.jsxs("button",{onClick:()=>n(!r),disabled:a||e.length===0,className:"flex items-center gap-2 px-3 py-1.5 text-sm font-medium text-slate-600 dark:text-slate-300 bg-white dark:bg-slate-800 border border-slate-200 dark:border-slate-700 rounded-lg hover:bg-slate-50 dark:hover:bg-slate-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[c.jsx(Md,{size:16}),a?"Updating...":`Add to Project (${e.length})`]}),r&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>n(!1)}),c.jsxs("div",{className:"absolute right-0 mt-2 w-56 bg-white dark:bg-slate-800 rounded-xl shadow-xl border border-slate-200 dark:border-slate-700 z-20 overflow-hidden animate-in fade-in zoom-in-95 duration-100",children:[c.jsx("div",{className:"p-2 border-b border-slate-100 dark:border-slate-700",children:c.jsx("span",{className:"text-xs font-semibold text-slate-500 px-2",children:"Select Project"})}),c.jsx("div",{className:"max-h-64 overflow-y-auto p-1",children:s.length>0?s.map(u=>c.jsx("button",{onClick:()=>l(u.name),disabled:a,className:"w-full text-left px-3 py-2 text-sm text-slate-700 dark:text-slate-200 hover:bg-slate-50 dark:hover:bg-slate-700 rounded-lg transition-colors disabled:opacity-50",children:u.name},u.name)):c.jsx("div",{className:"px-3 py-2 text-sm text-slate-400 italic",children:"No projects found"})})]})]})]})}function Lc({label:e,value:t,icon:r,color:n,active:s,onClick:i}){const o={slate:{bg:"bg-slate-50",text:"text-slate-600",border:"border-slate-200",activeBg:"bg-slate-100",activeBorder:"border-slate-300"},emerald:{bg:"bg-emerald-50",text:"text-emerald-600",border:"border-emerald-200",activeBg:"bg-emerald-100",activeBorder:"border-emerald-300"},rose:{bg:"bg-rose-50",text:"text-rose-600",border:"border-rose-200",activeBg:"bg-rose-100",activeBorder:"border-rose-300"},amber:{bg:"bg-amber-50",text:"text-amber-600",border:"border-amber-200",activeBg:"bg-amber-100",activeBorder:"border-amber-300"}}[n];return c.jsx(Me,{className:`cursor-pointer transition-all duration-200 hover:shadow-md border-2 ${s?o.activeBorder:"border-transparent"}`,onClick:i,children:c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{children:[c.jsx("p",{className:"text-sm text-slate-500 font-medium mb-1",children:e}),c.jsx("p",{className:"text-3xl font-bold text-slate-900 dark:text-white",children:t})]}),c.jsx("div",{className:`p-3 rounded-xl ${s?o.activeBg:o.bg} ${o.text}`,children:r})]})})}function Ot(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let r=0,n;r<e.length;r++)(n=Ot(e[r]))!==""&&(t+=(t&&" ")+n);else for(let r in e)e[r]&&(t+=(t&&" ")+r);return t}var tA={exports:{}},rA={},nA={exports:{}},sA={};/**
|
|
422
|
-
* @license React
|
|
423
|
-
* use-sync-external-store-shim.production.js
|
|
424
|
-
*
|
|
425
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
426
|
-
*
|
|
427
|
-
* This source code is licensed under the MIT license found in the
|
|
428
|
-
* LICENSE file in the root directory of this source tree.
|
|
429
|
-
*/var Ia=k;function vV(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var bV=typeof Object.is=="function"?Object.is:vV,wV=Ia.useState,kV=Ia.useEffect,jV=Ia.useLayoutEffect,_V=Ia.useDebugValue;function SV(e,t){var r=t(),n=wV({inst:{value:r,getSnapshot:t}}),s=n[0].inst,i=n[1];return jV(function(){s.value=r,s.getSnapshot=t,lh(s)&&i({inst:s})},[e,r,t]),kV(function(){return lh(s)&&i({inst:s}),e(function(){lh(s)&&i({inst:s})})},[e]),_V(r),r}function lh(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!bV(e,r)}catch{return!0}}function NV(e,t){return t()}var EV=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?NV:SV;sA.useSyncExternalStore=Ia.useSyncExternalStore!==void 0?Ia.useSyncExternalStore:EV;nA.exports=sA;var CV=nA.exports;/**
|
|
430
|
-
* @license React
|
|
431
|
-
* use-sync-external-store-shim/with-selector.production.js
|
|
432
|
-
*
|
|
433
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
434
|
-
*
|
|
435
|
-
* This source code is licensed under the MIT license found in the
|
|
436
|
-
* LICENSE file in the root directory of this source tree.
|
|
437
|
-
*/var Od=k,TV=CV;function PV(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var MV=typeof Object.is=="function"?Object.is:PV,RV=TV.useSyncExternalStore,AV=Od.useRef,DV=Od.useEffect,IV=Od.useMemo,LV=Od.useDebugValue;rA.useSyncExternalStoreWithSelector=function(e,t,r,n,s){var i=AV(null);if(i.current===null){var a={hasValue:!1,value:null};i.current=a}else a=i.current;i=IV(function(){function l(p){if(!d){if(d=!0,u=p,p=n(p),s!==void 0&&a.hasValue){var m=a.value;if(s(m,p))return f=m}return f=p}if(m=f,MV(u,p))return m;var g=n(p);return s!==void 0&&s(m,g)?(u=p,m):(u=p,f=g)}var d=!1,u,f,h=r===void 0?null:r;return[function(){return l(t())},h===null?void 0:function(){return l(h())}]},[t,r,n,s]);var o=RV(e,i[0],i[1]);return DV(function(){a.hasValue=!0,a.value=o},[o]),LV(o),o};tA.exports=rA;var OV=tA.exports;const zV=fd(OV),FV={},Ak=e=>{let t;const r=new Set,n=(u,f)=>{const h=typeof u=="function"?u(t):u;if(!Object.is(h,t)){const p=t;t=f??(typeof h!="object"||h===null)?h:Object.assign({},t,h),r.forEach(m=>m(t,p))}},s=()=>t,l={setState:n,getState:s,getInitialState:()=>d,subscribe:u=>(r.add(u),()=>r.delete(u)),destroy:()=>{(FV?"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()}},d=t=e(n,s,l);return l},$V=e=>e?Ak(e):Ak,{useDebugValue:VV}=B,{useSyncExternalStoreWithSelector:qV}=zV,BV=e=>e;function iA(e,t=BV,r){const n=qV(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,r);return VV(n),n}const Dk=(e,t)=>{const r=$V(e),n=(s,i=t)=>iA(r,s,i);return Object.assign(n,r),n},UV=(e,t)=>e?Dk(e,t):Dk;function Ct(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[n,s]of e)if(!Object.is(s,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}const r=Object.keys(e);if(r.length!==Object.keys(t).length)return!1;for(const n of r)if(!Object.prototype.hasOwnProperty.call(t,n)||!Object.is(e[n],t[n]))return!1;return!0}var HV={value:()=>{}};function zd(){for(var e=0,t=arguments.length,r={},n;e<t;++e){if(!(n=arguments[e]+"")||n in r||/[\s.]/.test(n))throw new Error("illegal type: "+n);r[n]=[]}return new du(r)}function du(e){this._=e}function WV(e,t){return e.trim().split(/^|\s+/).map(function(r){var n="",s=r.indexOf(".");if(s>=0&&(n=r.slice(s+1),r=r.slice(0,s)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}du.prototype=zd.prototype={constructor:du,on:function(e,t){var r=this._,n=WV(e+"",r),s,i=-1,a=n.length;if(arguments.length<2){for(;++i<a;)if((s=(e=n[i]).type)&&(s=GV(r[s],e.name)))return s;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++i<a;)if(s=(e=n[i]).type)r[s]=Ik(r[s],e.name,t);else if(t==null)for(s in r)r[s]=Ik(r[s],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new du(e)},call:function(e,t){if((s=arguments.length-2)>0)for(var r=new Array(s),n=0,s,i;n<s;++n)r[n]=arguments[n+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(i=this._[e],n=0,s=i.length;n<s;++n)i[n].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var n=this._[e],s=0,i=n.length;s<i;++s)n[s].value.apply(t,r)}};function GV(e,t){for(var r=0,n=e.length,s;r<n;++r)if((s=e[r]).name===t)return s.value}function Ik(e,t,r){for(var n=0,s=e.length;n<s;++n)if(e[n].name===t){e[n]=HV,e=e.slice(0,n).concat(e.slice(n+1));break}return r!=null&&e.push({name:t,value:r}),e}var zx="http://www.w3.org/1999/xhtml";const Lk={svg:"http://www.w3.org/2000/svg",xhtml:zx,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Fd(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),Lk.hasOwnProperty(t)?{space:Lk[t],local:e}:e}function KV(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===zx&&t.documentElement.namespaceURI===zx?t.createElement(e):t.createElementNS(r,e)}}function YV(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function aA(e){var t=Fd(e);return(t.local?YV:KV)(t)}function XV(){}function Hb(e){return e==null?XV:function(){return this.querySelector(e)}}function ZV(e){typeof e!="function"&&(e=Hb(e));for(var t=this._groups,r=t.length,n=new Array(r),s=0;s<r;++s)for(var i=t[s],a=i.length,o=n[s]=new Array(a),l,d,u=0;u<a;++u)(l=i[u])&&(d=e.call(l,l.__data__,u,i))&&("__data__"in l&&(d.__data__=l.__data__),o[u]=d);return new pr(n,this._parents)}function QV(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function JV(){return[]}function oA(e){return e==null?JV:function(){return this.querySelectorAll(e)}}function eq(e){return function(){return QV(e.apply(this,arguments))}}function tq(e){typeof e=="function"?e=eq(e):e=oA(e);for(var t=this._groups,r=t.length,n=[],s=[],i=0;i<r;++i)for(var a=t[i],o=a.length,l,d=0;d<o;++d)(l=a[d])&&(n.push(e.call(l,l.__data__,d,a)),s.push(l));return new pr(n,s)}function lA(e){return function(){return this.matches(e)}}function cA(e){return function(t){return t.matches(e)}}var rq=Array.prototype.find;function nq(e){return function(){return rq.call(this.children,e)}}function sq(){return this.firstElementChild}function iq(e){return this.select(e==null?sq:nq(typeof e=="function"?e:cA(e)))}var aq=Array.prototype.filter;function oq(){return Array.from(this.children)}function lq(e){return function(){return aq.call(this.children,e)}}function cq(e){return this.selectAll(e==null?oq:lq(typeof e=="function"?e:cA(e)))}function uq(e){typeof e!="function"&&(e=lA(e));for(var t=this._groups,r=t.length,n=new Array(r),s=0;s<r;++s)for(var i=t[s],a=i.length,o=n[s]=[],l,d=0;d<a;++d)(l=i[d])&&e.call(l,l.__data__,d,i)&&o.push(l);return new pr(n,this._parents)}function uA(e){return new Array(e.length)}function dq(){return new pr(this._enter||this._groups.map(uA),this._parents)}function ed(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}ed.prototype={constructor:ed,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function fq(e){return function(){return e}}function hq(e,t,r,n,s,i){for(var a=0,o,l=t.length,d=i.length;a<d;++a)(o=t[a])?(o.__data__=i[a],n[a]=o):r[a]=new ed(e,i[a]);for(;a<l;++a)(o=t[a])&&(s[a]=o)}function pq(e,t,r,n,s,i,a){var o,l,d=new Map,u=t.length,f=i.length,h=new Array(u),p;for(o=0;o<u;++o)(l=t[o])&&(h[o]=p=a.call(l,l.__data__,o,t)+"",d.has(p)?s[o]=l:d.set(p,l));for(o=0;o<f;++o)p=a.call(e,i[o],o,i)+"",(l=d.get(p))?(n[o]=l,l.__data__=i[o],d.delete(p)):r[o]=new ed(e,i[o]);for(o=0;o<u;++o)(l=t[o])&&d.get(h[o])===l&&(s[o]=l)}function mq(e){return e.__data__}function gq(e,t){if(!arguments.length)return Array.from(this,mq);var r=t?pq:hq,n=this._parents,s=this._groups;typeof e!="function"&&(e=fq(e));for(var i=s.length,a=new Array(i),o=new Array(i),l=new Array(i),d=0;d<i;++d){var u=n[d],f=s[d],h=f.length,p=yq(e.call(u,u&&u.__data__,d,n)),m=p.length,g=o[d]=new Array(m),b=a[d]=new Array(m),x=l[d]=new Array(h);r(u,f,g,b,x,p,t);for(var y=0,v=0,w,_;y<m;++y)if(w=g[y]){for(y>=v&&(v=y+1);!(_=b[v])&&++v<m;);w._next=_||null}}return a=new pr(a,n),a._enter=o,a._exit=l,a}function yq(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function xq(){return new pr(this._exit||this._groups.map(uA),this._parents)}function vq(e,t,r){var n=this.enter(),s=this,i=this.exit();return typeof e=="function"?(n=e(n),n&&(n=n.selection())):n=n.append(e+""),t!=null&&(s=t(s),s&&(s=s.selection())),r==null?i.remove():r(i),n&&s?n.merge(s).order():s}function bq(e){for(var t=e.selection?e.selection():e,r=this._groups,n=t._groups,s=r.length,i=n.length,a=Math.min(s,i),o=new Array(s),l=0;l<a;++l)for(var d=r[l],u=n[l],f=d.length,h=o[l]=new Array(f),p,m=0;m<f;++m)(p=d[m]||u[m])&&(h[m]=p);for(;l<s;++l)o[l]=r[l];return new pr(o,this._parents)}function wq(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var n=e[t],s=n.length-1,i=n[s],a;--s>=0;)(a=n[s])&&(i&&a.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(a,i),i=a);return this}function kq(e){e||(e=jq);function t(f,h){return f&&h?e(f.__data__,h.__data__):!f-!h}for(var r=this._groups,n=r.length,s=new Array(n),i=0;i<n;++i){for(var a=r[i],o=a.length,l=s[i]=new Array(o),d,u=0;u<o;++u)(d=a[u])&&(l[u]=d);l.sort(t)}return new pr(s,this._parents).order()}function jq(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function _q(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Sq(){return Array.from(this)}function Nq(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var n=e[t],s=0,i=n.length;s<i;++s){var a=n[s];if(a)return a}return null}function Eq(){let e=0;for(const t of this)++e;return e}function Cq(){return!this.node()}function Tq(e){for(var t=this._groups,r=0,n=t.length;r<n;++r)for(var s=t[r],i=0,a=s.length,o;i<a;++i)(o=s[i])&&e.call(o,o.__data__,i,s);return this}function Pq(e){return function(){this.removeAttribute(e)}}function Mq(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Rq(e,t){return function(){this.setAttribute(e,t)}}function Aq(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Dq(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function Iq(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function Lq(e,t){var r=Fd(e);if(arguments.length<2){var n=this.node();return r.local?n.getAttributeNS(r.space,r.local):n.getAttribute(r)}return this.each((t==null?r.local?Mq:Pq:typeof t=="function"?r.local?Iq:Dq:r.local?Aq:Rq)(r,t))}function dA(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Oq(e){return function(){this.style.removeProperty(e)}}function zq(e,t,r){return function(){this.style.setProperty(e,t,r)}}function Fq(e,t,r){return function(){var n=t.apply(this,arguments);n==null?this.style.removeProperty(e):this.style.setProperty(e,n,r)}}function $q(e,t,r){return arguments.length>1?this.each((t==null?Oq:typeof t=="function"?Fq:zq)(e,t,r??"")):La(this.node(),e)}function La(e,t){return e.style.getPropertyValue(t)||dA(e).getComputedStyle(e,null).getPropertyValue(t)}function Vq(e){return function(){delete this[e]}}function qq(e,t){return function(){this[e]=t}}function Bq(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function Uq(e,t){return arguments.length>1?this.each((t==null?Vq:typeof t=="function"?Bq:qq)(e,t)):this.node()[e]}function fA(e){return e.trim().split(/^|\s+/)}function Wb(e){return e.classList||new hA(e)}function hA(e){this._node=e,this._names=fA(e.getAttribute("class")||"")}hA.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function pA(e,t){for(var r=Wb(e),n=-1,s=t.length;++n<s;)r.add(t[n])}function mA(e,t){for(var r=Wb(e),n=-1,s=t.length;++n<s;)r.remove(t[n])}function Hq(e){return function(){pA(this,e)}}function Wq(e){return function(){mA(this,e)}}function Gq(e,t){return function(){(t.apply(this,arguments)?pA:mA)(this,e)}}function Kq(e,t){var r=fA(e+"");if(arguments.length<2){for(var n=Wb(this.node()),s=-1,i=r.length;++s<i;)if(!n.contains(r[s]))return!1;return!0}return this.each((typeof t=="function"?Gq:t?Hq:Wq)(r,t))}function Yq(){this.textContent=""}function Xq(e){return function(){this.textContent=e}}function Zq(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function Qq(e){return arguments.length?this.each(e==null?Yq:(typeof e=="function"?Zq:Xq)(e)):this.node().textContent}function Jq(){this.innerHTML=""}function e9(e){return function(){this.innerHTML=e}}function t9(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function r9(e){return arguments.length?this.each(e==null?Jq:(typeof e=="function"?t9:e9)(e)):this.node().innerHTML}function n9(){this.nextSibling&&this.parentNode.appendChild(this)}function s9(){return this.each(n9)}function i9(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function a9(){return this.each(i9)}function o9(e){var t=typeof e=="function"?e:aA(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function l9(){return null}function c9(e,t){var r=typeof e=="function"?e:aA(e),n=t==null?l9:typeof t=="function"?t:Hb(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}function u9(){var e=this.parentNode;e&&e.removeChild(this)}function d9(){return this.each(u9)}function f9(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function h9(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function p9(e){return this.select(e?h9:f9)}function m9(e){return arguments.length?this.property("__data__",e):this.node().__data__}function g9(e){return function(t){e.call(this,t,this.__data__)}}function y9(e){return e.trim().split(/^|\s+/).map(function(t){var r="",n=t.indexOf(".");return n>=0&&(r=t.slice(n+1),t=t.slice(0,n)),{type:t,name:r}})}function x9(e){return function(){var t=this.__on;if(t){for(var r=0,n=-1,s=t.length,i;r<s;++r)i=t[r],(!e.type||i.type===e.type)&&i.name===e.name?this.removeEventListener(i.type,i.listener,i.options):t[++n]=i;++n?t.length=n:delete this.__on}}}function v9(e,t,r){return function(){var n=this.__on,s,i=g9(t);if(n){for(var a=0,o=n.length;a<o;++a)if((s=n[a]).type===e.type&&s.name===e.name){this.removeEventListener(s.type,s.listener,s.options),this.addEventListener(s.type,s.listener=i,s.options=r),s.value=t;return}}this.addEventListener(e.type,i,r),s={type:e.type,name:e.name,value:t,listener:i,options:r},n?n.push(s):this.__on=[s]}}function b9(e,t,r){var n=y9(e+""),s,i=n.length,a;if(arguments.length<2){var o=this.node().__on;if(o){for(var l=0,d=o.length,u;l<d;++l)for(s=0,u=o[l];s<i;++s)if((a=n[s]).type===u.type&&a.name===u.name)return u.value}return}for(o=t?v9:x9,s=0;s<i;++s)this.each(o(n[s],t,r));return this}function gA(e,t,r){var n=dA(e),s=n.CustomEvent;typeof s=="function"?s=new s(t,r):(s=n.document.createEvent("Event"),r?(s.initEvent(t,r.bubbles,r.cancelable),s.detail=r.detail):s.initEvent(t,!1,!1)),e.dispatchEvent(s)}function w9(e,t){return function(){return gA(this,e,t)}}function k9(e,t){return function(){return gA(this,e,t.apply(this,arguments))}}function j9(e,t){return this.each((typeof t=="function"?k9:w9)(e,t))}function*_9(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var n=e[t],s=0,i=n.length,a;s<i;++s)(a=n[s])&&(yield a)}var yA=[null];function pr(e,t){this._groups=e,this._parents=t}function Jl(){return new pr([[document.documentElement]],yA)}function S9(){return this}pr.prototype=Jl.prototype={constructor:pr,select:ZV,selectAll:tq,selectChild:iq,selectChildren:cq,filter:uq,data:gq,enter:dq,exit:xq,join:vq,merge:bq,selection:S9,order:wq,sort:kq,call:_q,nodes:Sq,node:Nq,size:Eq,empty:Cq,each:Tq,attr:Lq,style:$q,property:Uq,classed:Kq,text:Qq,html:r9,raise:s9,lower:a9,append:o9,insert:c9,remove:d9,clone:p9,datum:m9,on:b9,dispatch:j9,[Symbol.iterator]:_9};function Nr(e){return typeof e=="string"?new pr([[document.querySelector(e)]],[document.documentElement]):new pr([[e]],yA)}function N9(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Ur(e,t){if(e=N9(e),t===void 0&&(t=e.currentTarget),t){var r=t.ownerSVGElement||t;if(r.createSVGPoint){var n=r.createSVGPoint();return n.x=e.clientX,n.y=e.clientY,n=n.matrixTransform(t.getScreenCTM().inverse()),[n.x,n.y]}if(t.getBoundingClientRect){var s=t.getBoundingClientRect();return[e.clientX-s.left-t.clientLeft,e.clientY-s.top-t.clientTop]}}return[e.pageX,e.pageY]}const E9={passive:!1},Ml={capture:!0,passive:!1};function ch(e){e.stopImmediatePropagation()}function ba(e){e.preventDefault(),e.stopImmediatePropagation()}function xA(e){var t=e.document.documentElement,r=Nr(e).on("dragstart.drag",ba,Ml);"onselectstart"in t?r.on("selectstart.drag",ba,Ml):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function vA(e,t){var r=e.document.documentElement,n=Nr(e).on("dragstart.drag",null);t&&(n.on("click.drag",ba,Ml),setTimeout(function(){n.on("click.drag",null)},0)),"onselectstart"in r?n.on("selectstart.drag",null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect)}const Oc=e=>()=>e;function Fx(e,{sourceEvent:t,subject:r,target:n,identifier:s,active:i,x:a,y:o,dx:l,dy:d,dispatch:u}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},identifier:{value:s,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:o,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:d,enumerable:!0,configurable:!0},_:{value:u}})}Fx.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function C9(e){return!e.ctrlKey&&!e.button}function T9(){return this.parentNode}function P9(e,t){return t??{x:e.x,y:e.y}}function M9(){return navigator.maxTouchPoints||"ontouchstart"in this}function R9(){var e=C9,t=T9,r=P9,n=M9,s={},i=zd("start","drag","end"),a=0,o,l,d,u,f=0;function h(w){w.on("mousedown.drag",p).filter(n).on("touchstart.drag",b).on("touchmove.drag",x,E9).on("touchend.drag touchcancel.drag",y).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(w,_){if(!(u||!e.call(this,w,_))){var N=v(this,t.call(this,w,_),w,_,"mouse");N&&(Nr(w.view).on("mousemove.drag",m,Ml).on("mouseup.drag",g,Ml),xA(w.view),ch(w),d=!1,o=w.clientX,l=w.clientY,N("start",w))}}function m(w){if(ba(w),!d){var _=w.clientX-o,N=w.clientY-l;d=_*_+N*N>f}s.mouse("drag",w)}function g(w){Nr(w.view).on("mousemove.drag mouseup.drag",null),vA(w.view,d),ba(w),s.mouse("end",w)}function b(w,_){if(e.call(this,w,_)){var N=w.changedTouches,j=t.call(this,w,_),E=N.length,M,C;for(M=0;M<E;++M)(C=v(this,j,w,_,N[M].identifier,N[M]))&&(ch(w),C("start",w,N[M]))}}function x(w){var _=w.changedTouches,N=_.length,j,E;for(j=0;j<N;++j)(E=s[_[j].identifier])&&(ba(w),E("drag",w,_[j]))}function y(w){var _=w.changedTouches,N=_.length,j,E;for(u&&clearTimeout(u),u=setTimeout(function(){u=null},500),j=0;j<N;++j)(E=s[_[j].identifier])&&(ch(w),E("end",w,_[j]))}function v(w,_,N,j,E,M){var C=i.copy(),D=Ur(M||N,_),F,T,S;if((S=r.call(w,new Fx("beforestart",{sourceEvent:N,target:h,identifier:E,active:a,x:D[0],y:D[1],dx:0,dy:0,dispatch:C}),j))!=null)return F=S.x-D[0]||0,T=S.y-D[1]||0,function O(I,V,A){var P=D,z;switch(I){case"start":s[E]=O,z=a++;break;case"end":delete s[E],--a;case"drag":D=Ur(A||V,_),z=a;break}C.call(I,w,new Fx(I,{sourceEvent:V,subject:S,target:h,identifier:E,active:z,x:D[0]+F,y:D[1]+T,dx:D[0]-P[0],dy:D[1]-P[1],dispatch:C}),j)}}return h.filter=function(w){return arguments.length?(e=typeof w=="function"?w:Oc(!!w),h):e},h.container=function(w){return arguments.length?(t=typeof w=="function"?w:Oc(w),h):t},h.subject=function(w){return arguments.length?(r=typeof w=="function"?w:Oc(w),h):r},h.touchable=function(w){return arguments.length?(n=typeof w=="function"?w:Oc(!!w),h):n},h.on=function(){var w=i.on.apply(i,arguments);return w===i?h:w},h.clickDistance=function(w){return arguments.length?(f=(w=+w)*w,h):Math.sqrt(f)},h}function Gb(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function bA(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function ec(){}var Rl=.7,td=1/Rl,wa="\\s*([+-]?\\d+)\\s*",Al="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",fn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",A9=/^#([0-9a-f]{3,8})$/,D9=new RegExp(`^rgb\\(${wa},${wa},${wa}\\)$`),I9=new RegExp(`^rgb\\(${fn},${fn},${fn}\\)$`),L9=new RegExp(`^rgba\\(${wa},${wa},${wa},${Al}\\)$`),O9=new RegExp(`^rgba\\(${fn},${fn},${fn},${Al}\\)$`),z9=new RegExp(`^hsl\\(${Al},${fn},${fn}\\)$`),F9=new RegExp(`^hsla\\(${Al},${fn},${fn},${Al}\\)$`),Ok={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};Gb(ec,Dl,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:zk,formatHex:zk,formatHex8:$9,formatHsl:V9,formatRgb:Fk,toString:Fk});function zk(){return this.rgb().formatHex()}function $9(){return this.rgb().formatHex8()}function V9(){return wA(this).formatHsl()}function Fk(){return this.rgb().formatRgb()}function Dl(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=A9.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?$k(t):r===3?new tr(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?zc(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?zc(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=D9.exec(e))?new tr(t[1],t[2],t[3],1):(t=I9.exec(e))?new tr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=L9.exec(e))?zc(t[1],t[2],t[3],t[4]):(t=O9.exec(e))?zc(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=z9.exec(e))?Bk(t[1],t[2]/100,t[3]/100,1):(t=F9.exec(e))?Bk(t[1],t[2]/100,t[3]/100,t[4]):Ok.hasOwnProperty(e)?$k(Ok[e]):e==="transparent"?new tr(NaN,NaN,NaN,0):null}function $k(e){return new tr(e>>16&255,e>>8&255,e&255,1)}function zc(e,t,r,n){return n<=0&&(e=t=r=NaN),new tr(e,t,r,n)}function q9(e){return e instanceof ec||(e=Dl(e)),e?(e=e.rgb(),new tr(e.r,e.g,e.b,e.opacity)):new tr}function $x(e,t,r,n){return arguments.length===1?q9(e):new tr(e,t,r,n??1)}function tr(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}Gb(tr,$x,bA(ec,{brighter(e){return e=e==null?td:Math.pow(td,e),new tr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Rl:Math.pow(Rl,e),new tr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new tr(hi(this.r),hi(this.g),hi(this.b),rd(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:Vk,formatHex:Vk,formatHex8:B9,formatRgb:qk,toString:qk}));function Vk(){return`#${ai(this.r)}${ai(this.g)}${ai(this.b)}`}function B9(){return`#${ai(this.r)}${ai(this.g)}${ai(this.b)}${ai((isNaN(this.opacity)?1:this.opacity)*255)}`}function qk(){const e=rd(this.opacity);return`${e===1?"rgb(":"rgba("}${hi(this.r)}, ${hi(this.g)}, ${hi(this.b)}${e===1?")":`, ${e})`}`}function rd(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function hi(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ai(e){return e=hi(e),(e<16?"0":"")+e.toString(16)}function Bk(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Wr(e,t,r,n)}function wA(e){if(e instanceof Wr)return new Wr(e.h,e.s,e.l,e.opacity);if(e instanceof ec||(e=Dl(e)),!e)return new Wr;if(e instanceof Wr)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,s=Math.min(t,r,n),i=Math.max(t,r,n),a=NaN,o=i-s,l=(i+s)/2;return o?(t===i?a=(r-n)/o+(r<n)*6:r===i?a=(n-t)/o+2:a=(t-r)/o+4,o/=l<.5?i+s:2-i-s,a*=60):o=l>0&&l<1?0:a,new Wr(a,o,l,e.opacity)}function U9(e,t,r,n){return arguments.length===1?wA(e):new Wr(e,t,r,n??1)}function Wr(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}Gb(Wr,U9,bA(ec,{brighter(e){return e=e==null?td:Math.pow(td,e),new Wr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Rl:Math.pow(Rl,e),new Wr(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,s=2*r-n;return new tr(uh(e>=240?e-240:e+120,s,n),uh(e,s,n),uh(e<120?e+240:e-120,s,n),this.opacity)},clamp(){return new Wr(Uk(this.h),Fc(this.s),Fc(this.l),rd(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=rd(this.opacity);return`${e===1?"hsl(":"hsla("}${Uk(this.h)}, ${Fc(this.s)*100}%, ${Fc(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Uk(e){return e=(e||0)%360,e<0?e+360:e}function Fc(e){return Math.max(0,Math.min(1,e||0))}function uh(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const kA=e=>()=>e;function H9(e,t){return function(r){return e+r*t}}function W9(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function G9(e){return(e=+e)==1?jA:function(t,r){return r-t?W9(t,r,e):kA(isNaN(t)?r:t)}}function jA(e,t){var r=t-e;return r?H9(e,r):kA(isNaN(e)?t:e)}const Hk=function e(t){var r=G9(t);function n(s,i){var a=r((s=$x(s)).r,(i=$x(i)).r),o=r(s.g,i.g),l=r(s.b,i.b),d=jA(s.opacity,i.opacity);return function(u){return s.r=a(u),s.g=o(u),s.b=l(u),s.opacity=d(u),s+""}}return n.gamma=e,n}(1);function ls(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var Vx=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,dh=new RegExp(Vx.source,"g");function K9(e){return function(){return e}}function Y9(e){return function(t){return e(t)+""}}function X9(e,t){var r=Vx.lastIndex=dh.lastIndex=0,n,s,i,a=-1,o=[],l=[];for(e=e+"",t=t+"";(n=Vx.exec(e))&&(s=dh.exec(t));)(i=s.index)>r&&(i=t.slice(r,i),o[a]?o[a]+=i:o[++a]=i),(n=n[0])===(s=s[0])?o[a]?o[a]+=s:o[++a]=s:(o[++a]=null,l.push({i:a,x:ls(n,s)})),r=dh.lastIndex;return r<t.length&&(i=t.slice(r),o[a]?o[a]+=i:o[++a]=i),o.length<2?l[0]?Y9(l[0].x):K9(t):(t=l.length,function(d){for(var u=0,f;u<t;++u)o[(f=l[u]).i]=f.x(d);return o.join("")})}var Wk=180/Math.PI,qx={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function _A(e,t,r,n,s,i){var a,o,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(l=e*r+t*n)&&(r-=e*l,n-=t*l),(o=Math.sqrt(r*r+n*n))&&(r/=o,n/=o,l/=o),e*n<t*r&&(e=-e,t=-t,l=-l,a=-a),{translateX:s,translateY:i,rotate:Math.atan2(t,e)*Wk,skewX:Math.atan(l)*Wk,scaleX:a,scaleY:o}}var $c;function Z9(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?qx:_A(t.a,t.b,t.c,t.d,t.e,t.f)}function Q9(e){return e==null||($c||($c=document.createElementNS("http://www.w3.org/2000/svg","g")),$c.setAttribute("transform",e),!(e=$c.transform.baseVal.consolidate()))?qx:(e=e.matrix,_A(e.a,e.b,e.c,e.d,e.e,e.f))}function SA(e,t,r,n){function s(d){return d.length?d.pop()+" ":""}function i(d,u,f,h,p,m){if(d!==f||u!==h){var g=p.push("translate(",null,t,null,r);m.push({i:g-4,x:ls(d,f)},{i:g-2,x:ls(u,h)})}else(f||h)&&p.push("translate("+f+t+h+r)}function a(d,u,f,h){d!==u?(d-u>180?u+=360:u-d>180&&(d+=360),h.push({i:f.push(s(f)+"rotate(",null,n)-2,x:ls(d,u)})):u&&f.push(s(f)+"rotate("+u+n)}function o(d,u,f,h){d!==u?h.push({i:f.push(s(f)+"skewX(",null,n)-2,x:ls(d,u)}):u&&f.push(s(f)+"skewX("+u+n)}function l(d,u,f,h,p,m){if(d!==f||u!==h){var g=p.push(s(p)+"scale(",null,",",null,")");m.push({i:g-4,x:ls(d,f)},{i:g-2,x:ls(u,h)})}else(f!==1||h!==1)&&p.push(s(p)+"scale("+f+","+h+")")}return function(d,u){var f=[],h=[];return d=e(d),u=e(u),i(d.translateX,d.translateY,u.translateX,u.translateY,f,h),a(d.rotate,u.rotate,f,h),o(d.skewX,u.skewX,f,h),l(d.scaleX,d.scaleY,u.scaleX,u.scaleY,f,h),d=u=null,function(p){for(var m=-1,g=h.length,b;++m<g;)f[(b=h[m]).i]=b.x(p);return f.join("")}}}var J9=SA(Z9,"px, ","px)","deg)"),eB=SA(Q9,", ",")",")"),tB=1e-12;function Gk(e){return((e=Math.exp(e))+1/e)/2}function rB(e){return((e=Math.exp(e))-1/e)/2}function nB(e){return((e=Math.exp(2*e))-1)/(e+1)}const sB=function e(t,r,n){function s(i,a){var o=i[0],l=i[1],d=i[2],u=a[0],f=a[1],h=a[2],p=u-o,m=f-l,g=p*p+m*m,b,x;if(g<tB)x=Math.log(h/d)/t,b=function(j){return[o+j*p,l+j*m,d*Math.exp(t*j*x)]};else{var y=Math.sqrt(g),v=(h*h-d*d+n*g)/(2*d*r*y),w=(h*h-d*d-n*g)/(2*h*r*y),_=Math.log(Math.sqrt(v*v+1)-v),N=Math.log(Math.sqrt(w*w+1)-w);x=(N-_)/t,b=function(j){var E=j*x,M=Gk(_),C=d/(r*y)*(M*nB(t*E+_)-rB(_));return[o+C*p,l+C*m,d*M/Gk(t*E+_)]}}return b.duration=x*1e3*t/Math.SQRT2,b}return s.rho=function(i){var a=Math.max(.001,+i),o=a*a,l=o*o;return e(a,o,l)},s}(Math.SQRT2,2,4);var Oa=0,Po=0,xo=0,NA=1e3,nd,Mo,sd=0,_i=0,$d=0,Il=typeof performance=="object"&&performance.now?performance:Date,EA=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Kb(){return _i||(EA(iB),_i=Il.now()+$d)}function iB(){_i=0}function id(){this._call=this._time=this._next=null}id.prototype=CA.prototype={constructor:id,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?Kb():+r)+(t==null?0:+t),!this._next&&Mo!==this&&(Mo?Mo._next=this:nd=this,Mo=this),this._call=e,this._time=r,Bx()},stop:function(){this._call&&(this._call=null,this._time=1/0,Bx())}};function CA(e,t,r){var n=new id;return n.restart(e,t,r),n}function aB(){Kb(),++Oa;for(var e=nd,t;e;)(t=_i-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Oa}function Kk(){_i=(sd=Il.now())+$d,Oa=Po=0;try{aB()}finally{Oa=0,lB(),_i=0}}function oB(){var e=Il.now(),t=e-sd;t>NA&&($d-=t,sd=e)}function lB(){for(var e,t=nd,r,n=1/0;t;)t._call?(n>t._time&&(n=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:nd=r);Mo=e,Bx(n)}function Bx(e){if(!Oa){Po&&(Po=clearTimeout(Po));var t=e-_i;t>24?(e<1/0&&(Po=setTimeout(Kk,e-Il.now()-$d)),xo&&(xo=clearInterval(xo))):(xo||(sd=Il.now(),xo=setInterval(oB,NA)),Oa=1,EA(Kk))}}function Yk(e,t,r){var n=new id;return t=t==null?0:+t,n.restart(s=>{n.stop(),e(s+t)},t,r),n}var cB=zd("start","end","cancel","interrupt"),uB=[],TA=0,Xk=1,Ux=2,fu=3,Zk=4,Hx=5,hu=6;function Vd(e,t,r,n,s,i){var a=e.__transition;if(!a)e.__transition={};else if(r in a)return;dB(e,r,{name:t,index:n,group:s,on:cB,tween:uB,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:TA})}function Yb(e,t){var r=Jr(e,t);if(r.state>TA)throw new Error("too late; already scheduled");return r}function hn(e,t){var r=Jr(e,t);if(r.state>fu)throw new Error("too late; already running");return r}function Jr(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function dB(e,t,r){var n=e.__transition,s;n[t]=r,r.timer=CA(i,0,r.time);function i(d){r.state=Xk,r.timer.restart(a,r.delay,r.time),r.delay<=d&&a(d-r.delay)}function a(d){var u,f,h,p;if(r.state!==Xk)return l();for(u in n)if(p=n[u],p.name===r.name){if(p.state===fu)return Yk(a);p.state===Zk?(p.state=hu,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete n[u]):+u<t&&(p.state=hu,p.timer.stop(),p.on.call("cancel",e,e.__data__,p.index,p.group),delete n[u])}if(Yk(function(){r.state===fu&&(r.state=Zk,r.timer.restart(o,r.delay,r.time),o(d))}),r.state=Ux,r.on.call("start",e,e.__data__,r.index,r.group),r.state===Ux){for(r.state=fu,s=new Array(h=r.tween.length),u=0,f=-1;u<h;++u)(p=r.tween[u].value.call(e,e.__data__,r.index,r.group))&&(s[++f]=p);s.length=f+1}}function o(d){for(var u=d<r.duration?r.ease.call(null,d/r.duration):(r.timer.restart(l),r.state=Hx,1),f=-1,h=s.length;++f<h;)s[f].call(e,u);r.state===Hx&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=hu,r.timer.stop(),delete n[t];for(var d in n)return;delete e.__transition}}function pu(e,t){var r=e.__transition,n,s,i=!0,a;if(r){t=t==null?null:t+"";for(a in r){if((n=r[a]).name!==t){i=!1;continue}s=n.state>Ux&&n.state<Hx,n.state=hu,n.timer.stop(),n.on.call(s?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete r[a]}i&&delete e.__transition}}function fB(e){return this.each(function(){pu(this,e)})}function hB(e,t){var r,n;return function(){var s=hn(this,e),i=s.tween;if(i!==r){n=r=i;for(var a=0,o=n.length;a<o;++a)if(n[a].name===t){n=n.slice(),n.splice(a,1);break}}s.tween=n}}function pB(e,t,r){var n,s;if(typeof r!="function")throw new Error;return function(){var i=hn(this,e),a=i.tween;if(a!==n){s=(n=a).slice();for(var o={name:t,value:r},l=0,d=s.length;l<d;++l)if(s[l].name===t){s[l]=o;break}l===d&&s.push(o)}i.tween=s}}function mB(e,t){var r=this._id;if(e+="",arguments.length<2){for(var n=Jr(this.node(),r).tween,s=0,i=n.length,a;s<i;++s)if((a=n[s]).name===e)return a.value;return null}return this.each((t==null?hB:pB)(r,e,t))}function Xb(e,t,r){var n=e._id;return e.each(function(){var s=hn(this,n);(s.value||(s.value={}))[t]=r.apply(this,arguments)}),function(s){return Jr(s,n).value[t]}}function PA(e,t){var r;return(typeof t=="number"?ls:t instanceof Dl?Hk:(r=Dl(t))?(t=r,Hk):X9)(e,t)}function gB(e){return function(){this.removeAttribute(e)}}function yB(e){return function(){this.removeAttributeNS(e.space,e.local)}}function xB(e,t,r){var n,s=r+"",i;return function(){var a=this.getAttribute(e);return a===s?null:a===n?i:i=t(n=a,r)}}function vB(e,t,r){var n,s=r+"",i;return function(){var a=this.getAttributeNS(e.space,e.local);return a===s?null:a===n?i:i=t(n=a,r)}}function bB(e,t,r){var n,s,i;return function(){var a,o=r(this),l;return o==null?void this.removeAttribute(e):(a=this.getAttribute(e),l=o+"",a===l?null:a===n&&l===s?i:(s=l,i=t(n=a,o)))}}function wB(e,t,r){var n,s,i;return function(){var a,o=r(this),l;return o==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),l=o+"",a===l?null:a===n&&l===s?i:(s=l,i=t(n=a,o)))}}function kB(e,t){var r=Fd(e),n=r==="transform"?eB:PA;return this.attrTween(e,typeof t=="function"?(r.local?wB:bB)(r,n,Xb(this,"attr."+e,t)):t==null?(r.local?yB:gB)(r):(r.local?vB:xB)(r,n,t))}function jB(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function _B(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function SB(e,t){var r,n;function s(){var i=t.apply(this,arguments);return i!==n&&(r=(n=i)&&_B(e,i)),r}return s._value=t,s}function NB(e,t){var r,n;function s(){var i=t.apply(this,arguments);return i!==n&&(r=(n=i)&&jB(e,i)),r}return s._value=t,s}function EB(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var n=Fd(e);return this.tween(r,(n.local?SB:NB)(n,t))}function CB(e,t){return function(){Yb(this,e).delay=+t.apply(this,arguments)}}function TB(e,t){return t=+t,function(){Yb(this,e).delay=t}}function PB(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?CB:TB)(t,e)):Jr(this.node(),t).delay}function MB(e,t){return function(){hn(this,e).duration=+t.apply(this,arguments)}}function RB(e,t){return t=+t,function(){hn(this,e).duration=t}}function AB(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?MB:RB)(t,e)):Jr(this.node(),t).duration}function DB(e,t){if(typeof t!="function")throw new Error;return function(){hn(this,e).ease=t}}function IB(e){var t=this._id;return arguments.length?this.each(DB(t,e)):Jr(this.node(),t).ease}function LB(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;hn(this,e).ease=r}}function OB(e){if(typeof e!="function")throw new Error;return this.each(LB(this._id,e))}function zB(e){typeof e!="function"&&(e=lA(e));for(var t=this._groups,r=t.length,n=new Array(r),s=0;s<r;++s)for(var i=t[s],a=i.length,o=n[s]=[],l,d=0;d<a;++d)(l=i[d])&&e.call(l,l.__data__,d,i)&&o.push(l);return new zn(n,this._parents,this._name,this._id)}function FB(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,n=t.length,s=r.length,i=Math.min(n,s),a=new Array(n),o=0;o<i;++o)for(var l=t[o],d=r[o],u=l.length,f=a[o]=new Array(u),h,p=0;p<u;++p)(h=l[p]||d[p])&&(f[p]=h);for(;o<n;++o)a[o]=t[o];return new zn(a,this._parents,this._name,this._id)}function $B(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function VB(e,t,r){var n,s,i=$B(t)?Yb:hn;return function(){var a=i(this,e),o=a.on;o!==n&&(s=(n=o).copy()).on(t,r),a.on=s}}function qB(e,t){var r=this._id;return arguments.length<2?Jr(this.node(),r).on.on(e):this.each(VB(r,e,t))}function BB(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function UB(){return this.on("end.remove",BB(this._id))}function HB(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Hb(e));for(var n=this._groups,s=n.length,i=new Array(s),a=0;a<s;++a)for(var o=n[a],l=o.length,d=i[a]=new Array(l),u,f,h=0;h<l;++h)(u=o[h])&&(f=e.call(u,u.__data__,h,o))&&("__data__"in u&&(f.__data__=u.__data__),d[h]=f,Vd(d[h],t,r,h,d,Jr(u,r)));return new zn(i,this._parents,t,r)}function WB(e){var t=this._name,r=this._id;typeof e!="function"&&(e=oA(e));for(var n=this._groups,s=n.length,i=[],a=[],o=0;o<s;++o)for(var l=n[o],d=l.length,u,f=0;f<d;++f)if(u=l[f]){for(var h=e.call(u,u.__data__,f,l),p,m=Jr(u,r),g=0,b=h.length;g<b;++g)(p=h[g])&&Vd(p,t,r,g,h,m);i.push(h),a.push(u)}return new zn(i,a,t,r)}var GB=Jl.prototype.constructor;function KB(){return new GB(this._groups,this._parents)}function YB(e,t){var r,n,s;return function(){var i=La(this,e),a=(this.style.removeProperty(e),La(this,e));return i===a?null:i===r&&a===n?s:s=t(r=i,n=a)}}function MA(e){return function(){this.style.removeProperty(e)}}function XB(e,t,r){var n,s=r+"",i;return function(){var a=La(this,e);return a===s?null:a===n?i:i=t(n=a,r)}}function ZB(e,t,r){var n,s,i;return function(){var a=La(this,e),o=r(this),l=o+"";return o==null&&(l=o=(this.style.removeProperty(e),La(this,e))),a===l?null:a===n&&l===s?i:(s=l,i=t(n=a,o))}}function QB(e,t){var r,n,s,i="style."+t,a="end."+i,o;return function(){var l=hn(this,e),d=l.on,u=l.value[i]==null?o||(o=MA(t)):void 0;(d!==r||s!==u)&&(n=(r=d).copy()).on(a,s=u),l.on=n}}function JB(e,t,r){var n=(e+="")=="transform"?J9:PA;return t==null?this.styleTween(e,YB(e,n)).on("end.style."+e,MA(e)):typeof t=="function"?this.styleTween(e,ZB(e,n,Xb(this,"style."+e,t))).each(QB(this._id,e)):this.styleTween(e,XB(e,n,t),r).on("end.style."+e,null)}function eU(e,t,r){return function(n){this.style.setProperty(e,t.call(this,n),r)}}function tU(e,t,r){var n,s;function i(){var a=t.apply(this,arguments);return a!==s&&(n=(s=a)&&eU(e,a,r)),n}return i._value=t,i}function rU(e,t,r){var n="style."+(e+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;return this.tween(n,tU(e,t,r??""))}function nU(e){return function(){this.textContent=e}}function sU(e){return function(){var t=e(this);this.textContent=t??""}}function iU(e){return this.tween("text",typeof e=="function"?sU(Xb(this,"text",e)):nU(e==null?"":e+""))}function aU(e){return function(t){this.textContent=e.call(this,t)}}function oU(e){var t,r;function n(){var s=e.apply(this,arguments);return s!==r&&(t=(r=s)&&aU(s)),t}return n._value=e,n}function lU(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,oU(e))}function cU(){for(var e=this._name,t=this._id,r=RA(),n=this._groups,s=n.length,i=0;i<s;++i)for(var a=n[i],o=a.length,l,d=0;d<o;++d)if(l=a[d]){var u=Jr(l,t);Vd(l,e,r,d,a,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new zn(n,this._parents,e,r)}function uU(){var e,t,r=this,n=r._id,s=r.size();return new Promise(function(i,a){var o={value:a},l={value:function(){--s===0&&i()}};r.each(function(){var d=hn(this,n),u=d.on;u!==e&&(t=(e=u).copy(),t._.cancel.push(o),t._.interrupt.push(o),t._.end.push(l)),d.on=t}),s===0&&i()})}var dU=0;function zn(e,t,r,n){this._groups=e,this._parents=t,this._name=r,this._id=n}function RA(){return++dU}var vn=Jl.prototype;zn.prototype={constructor:zn,select:HB,selectAll:WB,selectChild:vn.selectChild,selectChildren:vn.selectChildren,filter:zB,merge:FB,selection:KB,transition:cU,call:vn.call,nodes:vn.nodes,node:vn.node,size:vn.size,empty:vn.empty,each:vn.each,on:qB,attr:kB,attrTween:EB,style:JB,styleTween:rU,text:iU,textTween:lU,remove:UB,tween:mB,delay:PB,duration:AB,ease:IB,easeVarying:OB,end:uU,[Symbol.iterator]:vn[Symbol.iterator]};function fU(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var hU={time:null,delay:0,duration:250,ease:fU};function pU(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}function mU(e){var t,r;e instanceof zn?(t=e._id,e=e._name):(t=RA(),(r=hU).time=Kb(),e=e==null?null:e+"");for(var n=this._groups,s=n.length,i=0;i<s;++i)for(var a=n[i],o=a.length,l,d=0;d<o;++d)(l=a[d])&&Vd(l,e,t,d,a,r||pU(l,t));return new zn(n,this._parents,e,t)}Jl.prototype.interrupt=fB;Jl.prototype.transition=mU;const Vc=e=>()=>e;function gU(e,{sourceEvent:t,target:r,transform:n,dispatch:s}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},transform:{value:n,enumerable:!0,configurable:!0},_:{value:s}})}function Sn(e,t,r){this.k=e,this.x=t,this.y=r}Sn.prototype={constructor:Sn,scale:function(e){return e===1?this:new Sn(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Sn(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Pn=new Sn(1,0,0);Sn.prototype;function fh(e){e.stopImmediatePropagation()}function vo(e){e.preventDefault(),e.stopImmediatePropagation()}function yU(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function xU(){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 Qk(){return this.__zoom||Pn}function vU(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function bU(){return navigator.maxTouchPoints||"ontouchstart"in this}function wU(e,t,r){var n=e.invertX(t[0][0])-r[0][0],s=e.invertX(t[1][0])-r[1][0],i=e.invertY(t[0][1])-r[0][1],a=e.invertY(t[1][1])-r[1][1];return e.translate(s>n?(n+s)/2:Math.min(0,n)||Math.max(0,s),a>i?(i+a)/2:Math.min(0,i)||Math.max(0,a))}function AA(){var e=yU,t=xU,r=wU,n=vU,s=bU,i=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],o=250,l=sB,d=zd("start","zoom","end"),u,f,h,p=500,m=150,g=0,b=10;function x(S){S.property("__zoom",Qk).on("wheel.zoom",E,{passive:!1}).on("mousedown.zoom",M).on("dblclick.zoom",C).filter(s).on("touchstart.zoom",D).on("touchmove.zoom",F).on("touchend.zoom touchcancel.zoom",T).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}x.transform=function(S,O,I,V){var A=S.selection?S.selection():S;A.property("__zoom",Qk),S!==A?_(S,O,I,V):A.interrupt().each(function(){N(this,arguments).event(V).start().zoom(null,typeof O=="function"?O.apply(this,arguments):O).end()})},x.scaleBy=function(S,O,I,V){x.scaleTo(S,function(){var A=this.__zoom.k,P=typeof O=="function"?O.apply(this,arguments):O;return A*P},I,V)},x.scaleTo=function(S,O,I,V){x.transform(S,function(){var A=t.apply(this,arguments),P=this.__zoom,z=I==null?w(A):typeof I=="function"?I.apply(this,arguments):I,q=P.invert(z),U=typeof O=="function"?O.apply(this,arguments):O;return r(v(y(P,U),z,q),A,a)},I,V)},x.translateBy=function(S,O,I,V){x.transform(S,function(){return r(this.__zoom.translate(typeof O=="function"?O.apply(this,arguments):O,typeof I=="function"?I.apply(this,arguments):I),t.apply(this,arguments),a)},null,V)},x.translateTo=function(S,O,I,V,A){x.transform(S,function(){var P=t.apply(this,arguments),z=this.__zoom,q=V==null?w(P):typeof V=="function"?V.apply(this,arguments):V;return r(Pn.translate(q[0],q[1]).scale(z.k).translate(typeof O=="function"?-O.apply(this,arguments):-O,typeof I=="function"?-I.apply(this,arguments):-I),P,a)},V,A)};function y(S,O){return O=Math.max(i[0],Math.min(i[1],O)),O===S.k?S:new Sn(O,S.x,S.y)}function v(S,O,I){var V=O[0]-I[0]*S.k,A=O[1]-I[1]*S.k;return V===S.x&&A===S.y?S:new Sn(S.k,V,A)}function w(S){return[(+S[0][0]+ +S[1][0])/2,(+S[0][1]+ +S[1][1])/2]}function _(S,O,I,V){S.on("start.zoom",function(){N(this,arguments).event(V).start()}).on("interrupt.zoom end.zoom",function(){N(this,arguments).event(V).end()}).tween("zoom",function(){var A=this,P=arguments,z=N(A,P).event(V),q=t.apply(A,P),U=I==null?w(q):typeof I=="function"?I.apply(A,P):I,K=Math.max(q[1][0]-q[0][0],q[1][1]-q[0][1]),G=A.__zoom,X=typeof O=="function"?O.apply(A,P):O,ie=l(G.invert(U).concat(K/G.k),X.invert(U).concat(K/X.k));return function(le){if(le===1)le=X;else{var we=ie(le),_e=K/we[2];le=new Sn(_e,U[0]-we[0]*_e,U[1]-we[1]*_e)}z.zoom(null,le)}})}function N(S,O,I){return!I&&S.__zooming||new j(S,O)}function j(S,O){this.that=S,this.args=O,this.active=0,this.sourceEvent=null,this.extent=t.apply(S,O),this.taps=0}j.prototype={event:function(S){return S&&(this.sourceEvent=S),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(S,O){return this.mouse&&S!=="mouse"&&(this.mouse[1]=O.invert(this.mouse[0])),this.touch0&&S!=="touch"&&(this.touch0[1]=O.invert(this.touch0[0])),this.touch1&&S!=="touch"&&(this.touch1[1]=O.invert(this.touch1[0])),this.that.__zoom=O,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(S){var O=Nr(this.that).datum();d.call(S,this.that,new gU(S,{sourceEvent:this.sourceEvent,target:x,transform:this.that.__zoom,dispatch:d}),O)}};function E(S,...O){if(!e.apply(this,arguments))return;var I=N(this,O).event(S),V=this.__zoom,A=Math.max(i[0],Math.min(i[1],V.k*Math.pow(2,n.apply(this,arguments)))),P=Ur(S);if(I.wheel)(I.mouse[0][0]!==P[0]||I.mouse[0][1]!==P[1])&&(I.mouse[1]=V.invert(I.mouse[0]=P)),clearTimeout(I.wheel);else{if(V.k===A)return;I.mouse=[P,V.invert(P)],pu(this),I.start()}vo(S),I.wheel=setTimeout(z,m),I.zoom("mouse",r(v(y(V,A),I.mouse[0],I.mouse[1]),I.extent,a));function z(){I.wheel=null,I.end()}}function M(S,...O){if(h||!e.apply(this,arguments))return;var I=S.currentTarget,V=N(this,O,!0).event(S),A=Nr(S.view).on("mousemove.zoom",U,!0).on("mouseup.zoom",K,!0),P=Ur(S,I),z=S.clientX,q=S.clientY;xA(S.view),fh(S),V.mouse=[P,this.__zoom.invert(P)],pu(this),V.start();function U(G){if(vo(G),!V.moved){var X=G.clientX-z,ie=G.clientY-q;V.moved=X*X+ie*ie>g}V.event(G).zoom("mouse",r(v(V.that.__zoom,V.mouse[0]=Ur(G,I),V.mouse[1]),V.extent,a))}function K(G){A.on("mousemove.zoom mouseup.zoom",null),vA(G.view,V.moved),vo(G),V.event(G).end()}}function C(S,...O){if(e.apply(this,arguments)){var I=this.__zoom,V=Ur(S.changedTouches?S.changedTouches[0]:S,this),A=I.invert(V),P=I.k*(S.shiftKey?.5:2),z=r(v(y(I,P),V,A),t.apply(this,O),a);vo(S),o>0?Nr(this).transition().duration(o).call(_,z,V,S):Nr(this).call(x.transform,z,V,S)}}function D(S,...O){if(e.apply(this,arguments)){var I=S.touches,V=I.length,A=N(this,O,S.changedTouches.length===V).event(S),P,z,q,U;for(fh(S),z=0;z<V;++z)q=I[z],U=Ur(q,this),U=[U,this.__zoom.invert(U),q.identifier],A.touch0?!A.touch1&&A.touch0[2]!==U[2]&&(A.touch1=U,A.taps=0):(A.touch0=U,P=!0,A.taps=1+!!u);u&&(u=clearTimeout(u)),P&&(A.taps<2&&(f=U[0],u=setTimeout(function(){u=null},p)),pu(this),A.start())}}function F(S,...O){if(this.__zooming){var I=N(this,O).event(S),V=S.changedTouches,A=V.length,P,z,q,U;for(vo(S),P=0;P<A;++P)z=V[P],q=Ur(z,this),I.touch0&&I.touch0[2]===z.identifier?I.touch0[0]=q:I.touch1&&I.touch1[2]===z.identifier&&(I.touch1[0]=q);if(z=I.that.__zoom,I.touch1){var K=I.touch0[0],G=I.touch0[1],X=I.touch1[0],ie=I.touch1[1],le=(le=X[0]-K[0])*le+(le=X[1]-K[1])*le,we=(we=ie[0]-G[0])*we+(we=ie[1]-G[1])*we;z=y(z,Math.sqrt(le/we)),q=[(K[0]+X[0])/2,(K[1]+X[1])/2],U=[(G[0]+ie[0])/2,(G[1]+ie[1])/2]}else if(I.touch0)q=I.touch0[0],U=I.touch0[1];else return;I.zoom("touch",r(v(z,q,U),I.extent,a))}}function T(S,...O){if(this.__zooming){var I=N(this,O).event(S),V=S.changedTouches,A=V.length,P,z;for(fh(S),h&&clearTimeout(h),h=setTimeout(function(){h=null},p),P=0;P<A;++P)z=V[P],I.touch0&&I.touch0[2]===z.identifier?delete I.touch0:I.touch1&&I.touch1[2]===z.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&&(z=Ur(z,this),Math.hypot(f[0]-z[0],f[1]-z[1])<b)){var q=Nr(this).on("dblclick.zoom");q&&q.apply(this,arguments)}}}return x.wheelDelta=function(S){return arguments.length?(n=typeof S=="function"?S:Vc(+S),x):n},x.filter=function(S){return arguments.length?(e=typeof S=="function"?S:Vc(!!S),x):e},x.touchable=function(S){return arguments.length?(s=typeof S=="function"?S:Vc(!!S),x):s},x.extent=function(S){return arguments.length?(t=typeof S=="function"?S:Vc([[+S[0][0],+S[0][1]],[+S[1][0],+S[1][1]]]),x):t},x.scaleExtent=function(S){return arguments.length?(i[0]=+S[0],i[1]=+S[1],x):[i[0],i[1]]},x.translateExtent=function(S){return arguments.length?(a[0][0]=+S[0][0],a[1][0]=+S[1][0],a[0][1]=+S[0][1],a[1][1]=+S[1][1],x):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},x.constrain=function(S){return arguments.length?(r=S,x):r},x.duration=function(S){return arguments.length?(o=+S,x):o},x.interpolate=function(S){return arguments.length?(l=S,x):l},x.on=function(){var S=d.on.apply(d,arguments);return S===d?x:S},x.clickDistance=function(S){return arguments.length?(g=(S=+S)*S,x):Math.sqrt(g)},x.tapDistance=function(S){return arguments.length?(b=+S,x):b},x}const qd=k.createContext(null),kU=qd.Provider,Fn={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,t)=>`Couldn't create edge for ${e?"target":"source"} handle id: "${e?t.targetHandle:t.sourceHandle}", edge id: ${t.id}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`},DA=Fn.error001();function Oe(e,t){const r=k.useContext(qd);if(r===null)throw new Error(DA);return iA(r,e,t)}const kt=()=>{const e=k.useContext(qd);if(e===null)throw new Error(DA);return k.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe,destroy:e.destroy}),[e])},jU=e=>e.userSelectionActive?"none":"all";function Zb({position:e,children:t,className:r,style:n,...s}){const i=Oe(jU),a=`${e}`.split("-");return B.createElement("div",{className:Ot(["react-flow__panel",r,...a]),style:{...n,pointerEvents:i},...s},t)}function _U({proOptions:e,position:t="bottom-right"}){return e!=null&&e.hideAttribution?null:B.createElement(Zb,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://reactflow.dev/pro"},B.createElement("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution"},"React Flow"))}const SU=({x:e,y:t,label:r,labelStyle:n={},labelShowBg:s=!0,labelBgStyle:i={},labelBgPadding:a=[2,4],labelBgBorderRadius:o=2,children:l,className:d,...u})=>{const f=k.useRef(null),[h,p]=k.useState({x:0,y:0,width:0,height:0}),m=Ot(["react-flow__edge-textwrapper",d]);return k.useEffect(()=>{if(f.current){const g=f.current.getBBox();p({x:g.x,y:g.y,width:g.width,height:g.height})}},[r]),typeof r>"u"||!r?null:B.createElement("g",{transform:`translate(${e-h.width/2} ${t-h.height/2})`,className:m,visibility:h.width?"visible":"hidden",...u},s&&B.createElement("rect",{width:h.width+2*a[0],x:-a[0],y:-a[1],height:h.height+2*a[1],className:"react-flow__edge-textbg",style:i,rx:o,ry:o}),B.createElement("text",{className:"react-flow__edge-text",y:h.height/2,dy:"0.3em",ref:f,style:n},r),l)};var NU=k.memo(SU);const Qb=e=>({width:e.offsetWidth,height:e.offsetHeight}),za=(e,t=0,r=1)=>Math.min(Math.max(e,t),r),Jb=(e={x:0,y:0},t)=>({x:za(e.x,t[0][0],t[1][0]),y:za(e.y,t[0][1],t[1][1])}),Jk=(e,t,r)=>e<t?za(Math.abs(e-t),1,50)/50:e>r?-za(Math.abs(e-r),1,50)/50:0,IA=(e,t)=>{const r=Jk(e.x,35,t.width-35)*20,n=Jk(e.y,35,t.height-35)*20;return[r,n]},LA=e=>{var t;return((t=e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},OA=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),Ll=({x:e,y:t,width:r,height:n})=>({x:e,y:t,x2:e+r,y2:t+n}),zA=({x:e,y:t,x2:r,y2:n})=>({x:e,y:t,width:r-e,height:n-t}),ej=e=>({...e.positionAbsolute||{x:0,y:0},width:e.width||0,height:e.height||0}),EU=(e,t)=>zA(OA(Ll(e),Ll(t))),Wx=(e,t)=>{const r=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),n=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(r*n)},CU=e=>Tr(e.width)&&Tr(e.height)&&Tr(e.x)&&Tr(e.y),Tr=e=>!isNaN(e)&&isFinite(e),ot=Symbol.for("internals"),FA=["Enter"," ","Escape"],TU=(e,t)=>{},PU=e=>"nativeEvent"in e;function Gx(e){var s,i;const t=PU(e)?e.nativeEvent:e,r=((i=(s=t.composedPath)==null?void 0:s.call(t))==null?void 0:i[0])||e.target;return["INPUT","SELECT","TEXTAREA"].includes(r==null?void 0:r.nodeName)||(r==null?void 0:r.hasAttribute("contenteditable"))||!!(r!=null&&r.closest(".nokey"))}const $A=e=>"clientX"in e,Ns=(e,t)=>{var i,a;const r=$A(e),n=r?e.clientX:(i=e.touches)==null?void 0:i[0].clientX,s=r?e.clientY:(a=e.touches)==null?void 0:a[0].clientY;return{x:n-((t==null?void 0:t.left)??0),y:s-((t==null?void 0:t.top)??0)}},ad=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0},tc=({id:e,path:t,labelX:r,labelY:n,label:s,labelStyle:i,labelShowBg:a,labelBgStyle:o,labelBgPadding:l,labelBgBorderRadius:d,style:u,markerEnd:f,markerStart:h,interactionWidth:p=20})=>B.createElement(B.Fragment,null,B.createElement("path",{id:e,style:u,d:t,fill:"none",className:"react-flow__edge-path",markerEnd:f,markerStart:h}),p&&B.createElement("path",{d:t,fill:"none",strokeOpacity:0,strokeWidth:p,className:"react-flow__edge-interaction"}),s&&Tr(r)&&Tr(n)?B.createElement(NU,{x:r,y:n,label:s,labelStyle:i,labelShowBg:a,labelBgStyle:o,labelBgPadding:l,labelBgBorderRadius:d}):null);tc.displayName="BaseEdge";function bo(e,t,r){return r===void 0?r:n=>{const s=t().edges.find(i=>i.id===e);s&&r(n,{...s})}}function VA({sourceX:e,sourceY:t,targetX:r,targetY:n}){const s=Math.abs(r-e)/2,i=r<e?r+s:r-s,a=Math.abs(n-t)/2,o=n<t?n+a:n-a;return[i,o,s,a]}function qA({sourceX:e,sourceY:t,targetX:r,targetY:n,sourceControlX:s,sourceControlY:i,targetControlX:a,targetControlY:o}){const l=e*.125+s*.375+a*.375+r*.125,d=t*.125+i*.375+o*.375+n*.125,u=Math.abs(l-e),f=Math.abs(d-t);return[l,d,u,f]}var Si;(function(e){e.Strict="strict",e.Loose="loose"})(Si||(Si={}));var oi;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(oi||(oi={}));var Ol;(function(e){e.Partial="partial",e.Full="full"})(Ol||(Ol={}));var fs;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(fs||(fs={}));var Fa;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Fa||(Fa={}));var ae;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(ae||(ae={}));function tj({pos:e,x1:t,y1:r,x2:n,y2:s}){return e===ae.Left||e===ae.Right?[.5*(t+n),r]:[t,.5*(r+s)]}function BA({sourceX:e,sourceY:t,sourcePosition:r=ae.Bottom,targetX:n,targetY:s,targetPosition:i=ae.Top}){const[a,o]=tj({pos:r,x1:e,y1:t,x2:n,y2:s}),[l,d]=tj({pos:i,x1:n,y1:s,x2:e,y2:t}),[u,f,h,p]=qA({sourceX:e,sourceY:t,targetX:n,targetY:s,sourceControlX:a,sourceControlY:o,targetControlX:l,targetControlY:d});return[`M${e},${t} C${a},${o} ${l},${d} ${n},${s}`,u,f,h,p]}const e1=k.memo(({sourceX:e,sourceY:t,targetX:r,targetY:n,sourcePosition:s=ae.Bottom,targetPosition:i=ae.Top,label:a,labelStyle:o,labelShowBg:l,labelBgStyle:d,labelBgPadding:u,labelBgBorderRadius:f,style:h,markerEnd:p,markerStart:m,interactionWidth:g})=>{const[b,x,y]=BA({sourceX:e,sourceY:t,sourcePosition:s,targetX:r,targetY:n,targetPosition:i});return B.createElement(tc,{path:b,labelX:x,labelY:y,label:a,labelStyle:o,labelShowBg:l,labelBgStyle:d,labelBgPadding:u,labelBgBorderRadius:f,style:h,markerEnd:p,markerStart:m,interactionWidth:g})});e1.displayName="SimpleBezierEdge";const rj={[ae.Left]:{x:-1,y:0},[ae.Right]:{x:1,y:0},[ae.Top]:{x:0,y:-1},[ae.Bottom]:{x:0,y:1}},MU=({source:e,sourcePosition:t=ae.Bottom,target:r})=>t===ae.Left||t===ae.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},nj=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function RU({source:e,sourcePosition:t=ae.Bottom,target:r,targetPosition:n=ae.Top,center:s,offset:i}){const a=rj[t],o=rj[n],l={x:e.x+a.x*i,y:e.y+a.y*i},d={x:r.x+o.x*i,y:r.y+o.y*i},u=MU({source:l,sourcePosition:t,target:d}),f=u.x!==0?"x":"y",h=u[f];let p=[],m,g;const b={x:0,y:0},x={x:0,y:0},[y,v,w,_]=VA({sourceX:e.x,sourceY:e.y,targetX:r.x,targetY:r.y});if(a[f]*o[f]===-1){m=s.x??y,g=s.y??v;const j=[{x:m,y:l.y},{x:m,y:d.y}],E=[{x:l.x,y:g},{x:d.x,y:g}];a[f]===h?p=f==="x"?j:E:p=f==="x"?E:j}else{const j=[{x:l.x,y:d.y}],E=[{x:d.x,y:l.y}];if(f==="x"?p=a.x===h?E:j:p=a.y===h?j:E,t===n){const T=Math.abs(e[f]-r[f]);if(T<=i){const S=Math.min(i-1,i-T);a[f]===h?b[f]=(l[f]>e[f]?-1:1)*S:x[f]=(d[f]>r[f]?-1:1)*S}}if(t!==n){const T=f==="x"?"y":"x",S=a[f]===o[T],O=l[T]>d[T],I=l[T]<d[T];(a[f]===1&&(!S&&O||S&&I)||a[f]!==1&&(!S&&I||S&&O))&&(p=f==="x"?j:E)}const M={x:l.x+b.x,y:l.y+b.y},C={x:d.x+x.x,y:d.y+x.y},D=Math.max(Math.abs(M.x-p[0].x),Math.abs(C.x-p[0].x)),F=Math.max(Math.abs(M.y-p[0].y),Math.abs(C.y-p[0].y));D>=F?(m=(M.x+C.x)/2,g=p[0].y):(m=p[0].x,g=(M.y+C.y)/2)}return[[e,{x:l.x+b.x,y:l.y+b.y},...p,{x:d.x+x.x,y:d.y+x.y},r],m,g,w,_]}function AU(e,t,r,n){const s=Math.min(nj(e,t)/2,nj(t,r)/2,n),{x:i,y:a}=t;if(e.x===i&&i===r.x||e.y===a&&a===r.y)return`L${i} ${a}`;if(e.y===a){const d=e.x<r.x?-1:1,u=e.y<r.y?1:-1;return`L ${i+s*d},${a}Q ${i},${a} ${i},${a+s*u}`}const o=e.x<r.x?1:-1,l=e.y<r.y?-1:1;return`L ${i},${a+s*l}Q ${i},${a} ${i+s*o},${a}`}function Kx({sourceX:e,sourceY:t,sourcePosition:r=ae.Bottom,targetX:n,targetY:s,targetPosition:i=ae.Top,borderRadius:a=5,centerX:o,centerY:l,offset:d=20}){const[u,f,h,p,m]=RU({source:{x:e,y:t},sourcePosition:r,target:{x:n,y:s},targetPosition:i,center:{x:o,y:l},offset:d});return[u.reduce((b,x,y)=>{let v="";return y>0&&y<u.length-1?v=AU(u[y-1],x,u[y+1],a):v=`${y===0?"M":"L"}${x.x} ${x.y}`,b+=v,b},""),f,h,p,m]}const Bd=k.memo(({sourceX:e,sourceY:t,targetX:r,targetY:n,label:s,labelStyle:i,labelShowBg:a,labelBgStyle:o,labelBgPadding:l,labelBgBorderRadius:d,style:u,sourcePosition:f=ae.Bottom,targetPosition:h=ae.Top,markerEnd:p,markerStart:m,pathOptions:g,interactionWidth:b})=>{const[x,y,v]=Kx({sourceX:e,sourceY:t,sourcePosition:f,targetX:r,targetY:n,targetPosition:h,borderRadius:g==null?void 0:g.borderRadius,offset:g==null?void 0:g.offset});return B.createElement(tc,{path:x,labelX:y,labelY:v,label:s,labelStyle:i,labelShowBg:a,labelBgStyle:o,labelBgPadding:l,labelBgBorderRadius:d,style:u,markerEnd:p,markerStart:m,interactionWidth:b})});Bd.displayName="SmoothStepEdge";const t1=k.memo(e=>{var t;return B.createElement(Bd,{...e,pathOptions:k.useMemo(()=>{var r;return{borderRadius:0,offset:(r=e.pathOptions)==null?void 0:r.offset}},[(t=e.pathOptions)==null?void 0:t.offset])})});t1.displayName="StepEdge";function DU({sourceX:e,sourceY:t,targetX:r,targetY:n}){const[s,i,a,o]=VA({sourceX:e,sourceY:t,targetX:r,targetY:n});return[`M ${e},${t}L ${r},${n}`,s,i,a,o]}const r1=k.memo(({sourceX:e,sourceY:t,targetX:r,targetY:n,label:s,labelStyle:i,labelShowBg:a,labelBgStyle:o,labelBgPadding:l,labelBgBorderRadius:d,style:u,markerEnd:f,markerStart:h,interactionWidth:p})=>{const[m,g,b]=DU({sourceX:e,sourceY:t,targetX:r,targetY:n});return B.createElement(tc,{path:m,labelX:g,labelY:b,label:s,labelStyle:i,labelShowBg:a,labelBgStyle:o,labelBgPadding:l,labelBgBorderRadius:d,style:u,markerEnd:f,markerStart:h,interactionWidth:p})});r1.displayName="StraightEdge";function qc(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function sj({pos:e,x1:t,y1:r,x2:n,y2:s,c:i}){switch(e){case ae.Left:return[t-qc(t-n,i),r];case ae.Right:return[t+qc(n-t,i),r];case ae.Top:return[t,r-qc(r-s,i)];case ae.Bottom:return[t,r+qc(s-r,i)]}}function UA({sourceX:e,sourceY:t,sourcePosition:r=ae.Bottom,targetX:n,targetY:s,targetPosition:i=ae.Top,curvature:a=.25}){const[o,l]=sj({pos:r,x1:e,y1:t,x2:n,y2:s,c:a}),[d,u]=sj({pos:i,x1:n,y1:s,x2:e,y2:t,c:a}),[f,h,p,m]=qA({sourceX:e,sourceY:t,targetX:n,targetY:s,sourceControlX:o,sourceControlY:l,targetControlX:d,targetControlY:u});return[`M${e},${t} C${o},${l} ${d},${u} ${n},${s}`,f,h,p,m]}const od=k.memo(({sourceX:e,sourceY:t,targetX:r,targetY:n,sourcePosition:s=ae.Bottom,targetPosition:i=ae.Top,label:a,labelStyle:o,labelShowBg:l,labelBgStyle:d,labelBgPadding:u,labelBgBorderRadius:f,style:h,markerEnd:p,markerStart:m,pathOptions:g,interactionWidth:b})=>{const[x,y,v]=UA({sourceX:e,sourceY:t,sourcePosition:s,targetX:r,targetY:n,targetPosition:i,curvature:g==null?void 0:g.curvature});return B.createElement(tc,{path:x,labelX:y,labelY:v,label:a,labelStyle:o,labelShowBg:l,labelBgStyle:d,labelBgPadding:u,labelBgBorderRadius:f,style:h,markerEnd:p,markerStart:m,interactionWidth:b})});od.displayName="BezierEdge";const n1=k.createContext(null),IU=n1.Provider;n1.Consumer;const LU=()=>k.useContext(n1),OU=e=>"id"in e&&"source"in e&&"target"in e,zU=({source:e,sourceHandle:t,target:r,targetHandle:n})=>`reactflow__edge-${e}${t||""}-${r}${n||""}`,Yx=(e,t)=>typeof e>"u"?"":typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(n=>`${n}=${e[n]}`).join("&")}`,FU=(e,t)=>t.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)),$U=(e,t)=>{if(!e.source||!e.target)return t;let r;return OU(e)?r={...e}:r={...e,id:zU(e)},FU(r,t)?t:t.concat(r)},Xx=({x:e,y:t},[r,n,s],i,[a,o])=>{const l={x:(e-r)/s,y:(t-n)/s};return i?{x:a*Math.round(l.x/a),y:o*Math.round(l.y/o)}:l},HA=({x:e,y:t},[r,n,s])=>({x:e*s+r,y:t*s+n}),pi=(e,t=[0,0])=>{if(!e)return{x:0,y:0,positionAbsolute:{x:0,y:0}};const r=(e.width??0)*t[0],n=(e.height??0)*t[1],s={x:e.position.x-r,y:e.position.y-n};return{...s,positionAbsolute:e.positionAbsolute?{x:e.positionAbsolute.x-r,y:e.positionAbsolute.y-n}:s}},Ud=(e,t=[0,0])=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const r=e.reduce((n,s)=>{const{x:i,y:a}=pi(s,t).positionAbsolute;return OA(n,Ll({x:i,y:a,width:s.width||0,height:s.height||0}))},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return zA(r)},WA=(e,t,[r,n,s]=[0,0,1],i=!1,a=!1,o=[0,0])=>{const l={x:(t.x-r)/s,y:(t.y-n)/s,width:t.width/s,height:t.height/s},d=[];return e.forEach(u=>{const{width:f,height:h,selectable:p=!0,hidden:m=!1}=u;if(a&&!p||m)return!1;const{positionAbsolute:g}=pi(u,o),b={x:g.x,y:g.y,width:f||0,height:h||0},x=Wx(l,b),y=typeof f>"u"||typeof h>"u"||f===null||h===null,v=i&&x>0,w=(f||0)*(h||0);(y||v||x>=w||u.dragging)&&d.push(u)}),d},GA=(e,t)=>{const r=e.map(n=>n.id);return t.filter(n=>r.includes(n.source)||r.includes(n.target))},KA=(e,t,r,n,s,i=.1)=>{const a=t/(e.width*(1+i)),o=r/(e.height*(1+i)),l=Math.min(a,o),d=za(l,n,s),u=e.x+e.width/2,f=e.y+e.height/2,h=t/2-u*d,p=r/2-f*d;return{x:h,y:p,zoom:d}},Zs=(e,t=0)=>e.transition().duration(t);function ij(e,t,r,n){return(t[r]||[]).reduce((s,i)=>{var a,o;return`${e.id}-${i.id}-${r}`!==n&&s.push({id:i.id||null,type:r,nodeId:e.id,x:(((a=e.positionAbsolute)==null?void 0:a.x)??0)+i.x+i.width/2,y:(((o=e.positionAbsolute)==null?void 0:o.y)??0)+i.y+i.height/2}),s},[])}function VU(e,t,r,n,s,i){const{x:a,y:o}=Ns(e),d=t.elementsFromPoint(a,o).find(m=>m.classList.contains("react-flow__handle"));if(d){const m=d.getAttribute("data-nodeid");if(m){const g=s1(void 0,d),b=d.getAttribute("data-handleid"),x=i({nodeId:m,id:b,type:g});if(x){const y=s.find(v=>v.nodeId===m&&v.type===g&&v.id===b);return{handle:{id:b,type:g,nodeId:m,x:(y==null?void 0:y.x)||r.x,y:(y==null?void 0:y.y)||r.y},validHandleResult:x}}}}let u=[],f=1/0;if(s.forEach(m=>{const g=Math.sqrt((m.x-r.x)**2+(m.y-r.y)**2);if(g<=n){const b=i(m);g<=f&&(g<f?u=[{handle:m,validHandleResult:b}]:g===f&&u.push({handle:m,validHandleResult:b}),f=g)}}),!u.length)return{handle:null,validHandleResult:YA()};if(u.length===1)return u[0];const h=u.some(({validHandleResult:m})=>m.isValid),p=u.some(({handle:m})=>m.type==="target");return u.find(({handle:m,validHandleResult:g})=>p?m.type==="target":h?g.isValid:!0)||u[0]}const qU={source:null,target:null,sourceHandle:null,targetHandle:null},YA=()=>({handleDomNode:null,isValid:!1,connection:qU,endHandle:null});function XA(e,t,r,n,s,i,a){const o=s==="target",l=a.querySelector(`.react-flow__handle[data-id="${e==null?void 0:e.nodeId}-${e==null?void 0:e.id}-${e==null?void 0:e.type}"]`),d={...YA(),handleDomNode:l};if(l){const u=s1(void 0,l),f=l.getAttribute("data-nodeid"),h=l.getAttribute("data-handleid"),p=l.classList.contains("connectable"),m=l.classList.contains("connectableend"),g={source:o?f:r,sourceHandle:o?h:n,target:o?r:f,targetHandle:o?n:h};d.connection=g,p&&m&&(t===Si.Strict?o&&u==="source"||!o&&u==="target":f!==r||h!==n)&&(d.endHandle={nodeId:f,handleId:h,type:u},d.isValid=i(g))}return d}function BU({nodes:e,nodeId:t,handleId:r,handleType:n}){return e.reduce((s,i)=>{if(i[ot]){const{handleBounds:a}=i[ot];let o=[],l=[];a&&(o=ij(i,a,"source",`${t}-${r}-${n}`),l=ij(i,a,"target",`${t}-${r}-${n}`)),s.push(...o,...l)}return s},[])}function s1(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function hh(e){e==null||e.classList.remove("valid","connecting","react-flow__handle-valid","react-flow__handle-connecting")}function UU(e,t){let r=null;return t?r="valid":e&&!t&&(r="invalid"),r}function ZA({event:e,handleId:t,nodeId:r,onConnect:n,isTarget:s,getState:i,setState:a,isValidConnection:o,edgeUpdaterType:l,onReconnectEnd:d}){const u=LA(e.target),{connectionMode:f,domNode:h,autoPanOnConnect:p,connectionRadius:m,onConnectStart:g,panBy:b,getNodes:x,cancelConnection:y}=i();let v=0,w;const{x:_,y:N}=Ns(e),j=u==null?void 0:u.elementFromPoint(_,N),E=s1(l,j),M=h==null?void 0:h.getBoundingClientRect();if(!M||!E)return;let C,D=Ns(e,M),F=!1,T=null,S=!1,O=null;const I=BU({nodes:x(),nodeId:r,handleId:t,handleType:E}),V=()=>{if(!p)return;const[z,q]=IA(D,M);b({x:z,y:q}),v=requestAnimationFrame(V)};a({connectionPosition:D,connectionStatus:null,connectionNodeId:r,connectionHandleId:t,connectionHandleType:E,connectionStartHandle:{nodeId:r,handleId:t,type:E},connectionEndHandle:null}),g==null||g(e,{nodeId:r,handleId:t,handleType:E});function A(z){const{transform:q}=i();D=Ns(z,M);const{handle:U,validHandleResult:K}=VU(z,u,Xx(D,q,!1,[1,1]),m,I,G=>XA(G,f,r,t,s?"target":"source",o,u));if(w=U,F||(V(),F=!0),O=K.handleDomNode,T=K.connection,S=K.isValid,a({connectionPosition:w&&S?HA({x:w.x,y:w.y},q):D,connectionStatus:UU(!!w,S),connectionEndHandle:K.endHandle}),!w&&!S&&!O)return hh(C);T.source!==T.target&&O&&(hh(C),C=O,O.classList.add("connecting","react-flow__handle-connecting"),O.classList.toggle("valid",S),O.classList.toggle("react-flow__handle-valid",S))}function P(z){var q,U;(w||O)&&T&&S&&(n==null||n(T)),(U=(q=i()).onConnectEnd)==null||U.call(q,z),l&&(d==null||d(z)),hh(C),y(),cancelAnimationFrame(v),F=!1,S=!1,T=null,O=null,u.removeEventListener("mousemove",A),u.removeEventListener("mouseup",P),u.removeEventListener("touchmove",A),u.removeEventListener("touchend",P)}u.addEventListener("mousemove",A),u.addEventListener("mouseup",P),u.addEventListener("touchmove",A),u.addEventListener("touchend",P)}const aj=()=>!0,HU=e=>({connectionStartHandle:e.connectionStartHandle,connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName}),WU=(e,t,r)=>n=>{const{connectionStartHandle:s,connectionEndHandle:i,connectionClickStartHandle:a}=n;return{connecting:(s==null?void 0:s.nodeId)===e&&(s==null?void 0:s.handleId)===t&&(s==null?void 0:s.type)===r||(i==null?void 0:i.nodeId)===e&&(i==null?void 0:i.handleId)===t&&(i==null?void 0:i.type)===r,clickConnecting:(a==null?void 0:a.nodeId)===e&&(a==null?void 0:a.handleId)===t&&(a==null?void 0:a.type)===r}},QA=k.forwardRef(({type:e="source",position:t=ae.Top,isValidConnection:r,isConnectable:n=!0,isConnectableStart:s=!0,isConnectableEnd:i=!0,id:a,onConnect:o,children:l,className:d,onMouseDown:u,onTouchStart:f,...h},p)=>{var M,C;const m=a||null,g=e==="target",b=kt(),x=LU(),{connectOnClick:y,noPanClassName:v}=Oe(HU,Ct),{connecting:w,clickConnecting:_}=Oe(WU(x,m,e),Ct);x||(C=(M=b.getState()).onError)==null||C.call(M,"010",Fn.error010());const N=D=>{const{defaultEdgeOptions:F,onConnect:T,hasDefaultEdges:S}=b.getState(),O={...F,...D};if(S){const{edges:I,setEdges:V}=b.getState();V($U(O,I))}T==null||T(O),o==null||o(O)},j=D=>{if(!x)return;const F=$A(D);s&&(F&&D.button===0||!F)&&ZA({event:D,handleId:m,nodeId:x,onConnect:N,isTarget:g,getState:b.getState,setState:b.setState,isValidConnection:r||b.getState().isValidConnection||aj}),F?u==null||u(D):f==null||f(D)},E=D=>{const{onClickConnectStart:F,onClickConnectEnd:T,connectionClickStartHandle:S,connectionMode:O,isValidConnection:I}=b.getState();if(!x||!S&&!s)return;if(!S){F==null||F(D,{nodeId:x,handleId:m,handleType:e}),b.setState({connectionClickStartHandle:{nodeId:x,type:e,handleId:m}});return}const V=LA(D.target),A=r||I||aj,{connection:P,isValid:z}=XA({nodeId:x,id:m,type:e},O,S.nodeId,S.handleId||null,S.type,A,V);z&&N(P),T==null||T(D),b.setState({connectionClickStartHandle:null})};return B.createElement("div",{"data-handleid":m,"data-nodeid":x,"data-handlepos":t,"data-id":`${x}-${m}-${e}`,className:Ot(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",v,d,{source:!g,target:g,connectable:n,connectablestart:s,connectableend:i,connecting:_,connectionindicator:n&&(s&&!w||i&&w)}]),onMouseDown:j,onTouchStart:j,onClick:y?E:void 0,ref:p,...h},l)});QA.displayName="Handle";var Ds=k.memo(QA);const JA=({data:e,isConnectable:t,targetPosition:r=ae.Top,sourcePosition:n=ae.Bottom})=>B.createElement(B.Fragment,null,B.createElement(Ds,{type:"target",position:r,isConnectable:t}),e==null?void 0:e.label,B.createElement(Ds,{type:"source",position:n,isConnectable:t}));JA.displayName="DefaultNode";var Zx=k.memo(JA);const e4=({data:e,isConnectable:t,sourcePosition:r=ae.Bottom})=>B.createElement(B.Fragment,null,e==null?void 0:e.label,B.createElement(Ds,{type:"source",position:r,isConnectable:t}));e4.displayName="InputNode";var t4=k.memo(e4);const r4=({data:e,isConnectable:t,targetPosition:r=ae.Top})=>B.createElement(B.Fragment,null,B.createElement(Ds,{type:"target",position:r,isConnectable:t}),e==null?void 0:e.label);r4.displayName="OutputNode";var n4=k.memo(r4);const i1=()=>null;i1.displayName="GroupNode";const GU=e=>({selectedNodes:e.getNodes().filter(t=>t.selected),selectedEdges:e.edges.filter(t=>t.selected).map(t=>({...t}))}),Bc=e=>e.id;function KU(e,t){return Ct(e.selectedNodes.map(Bc),t.selectedNodes.map(Bc))&&Ct(e.selectedEdges.map(Bc),t.selectedEdges.map(Bc))}const s4=k.memo(({onSelectionChange:e})=>{const t=kt(),{selectedNodes:r,selectedEdges:n}=Oe(GU,KU);return k.useEffect(()=>{const s={nodes:r,edges:n};e==null||e(s),t.getState().onSelectionChange.forEach(i=>i(s))},[r,n,e]),null});s4.displayName="SelectionListener";const YU=e=>!!e.onSelectionChange;function XU({onSelectionChange:e}){const t=Oe(YU);return e||t?B.createElement(s4,{onSelectionChange:e}):null}const ZU=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset});function qi(e,t){k.useEffect(()=>{typeof e<"u"&&t(e)},[e])}function ye(e,t,r){k.useEffect(()=>{typeof t<"u"&&r({[e]:t})},[t])}const QU=({nodes:e,edges:t,defaultNodes:r,defaultEdges:n,onConnect:s,onConnectStart:i,onConnectEnd:a,onClickConnectStart:o,onClickConnectEnd:l,nodesDraggable:d,nodesConnectable:u,nodesFocusable:f,edgesFocusable:h,edgesUpdatable:p,elevateNodesOnSelect:m,minZoom:g,maxZoom:b,nodeExtent:x,onNodesChange:y,onEdgesChange:v,elementsSelectable:w,connectionMode:_,snapGrid:N,snapToGrid:j,translateExtent:E,connectOnClick:M,defaultEdgeOptions:C,fitView:D,fitViewOptions:F,onNodesDelete:T,onEdgesDelete:S,onNodeDrag:O,onNodeDragStart:I,onNodeDragStop:V,onSelectionDrag:A,onSelectionDragStart:P,onSelectionDragStop:z,noPanClassName:q,nodeOrigin:U,rfId:K,autoPanOnConnect:G,autoPanOnNodeDrag:X,onError:ie,connectionRadius:le,isValidConnection:we,nodeDragThreshold:_e})=>{const{setNodes:ke,setEdges:lt,setDefaultNodesAndEdges:ve,setMinZoom:Be,setMaxZoom:ct,setTranslateExtent:ce,setNodeExtent:De,reset:ne}=Oe(ZU,Ct),te=kt();return k.useEffect(()=>{const ze=n==null?void 0:n.map(or=>({...or,...C}));return ve(r,ze),()=>{ne()}},[]),ye("defaultEdgeOptions",C,te.setState),ye("connectionMode",_,te.setState),ye("onConnect",s,te.setState),ye("onConnectStart",i,te.setState),ye("onConnectEnd",a,te.setState),ye("onClickConnectStart",o,te.setState),ye("onClickConnectEnd",l,te.setState),ye("nodesDraggable",d,te.setState),ye("nodesConnectable",u,te.setState),ye("nodesFocusable",f,te.setState),ye("edgesFocusable",h,te.setState),ye("edgesUpdatable",p,te.setState),ye("elementsSelectable",w,te.setState),ye("elevateNodesOnSelect",m,te.setState),ye("snapToGrid",j,te.setState),ye("snapGrid",N,te.setState),ye("onNodesChange",y,te.setState),ye("onEdgesChange",v,te.setState),ye("connectOnClick",M,te.setState),ye("fitViewOnInit",D,te.setState),ye("fitViewOnInitOptions",F,te.setState),ye("onNodesDelete",T,te.setState),ye("onEdgesDelete",S,te.setState),ye("onNodeDrag",O,te.setState),ye("onNodeDragStart",I,te.setState),ye("onNodeDragStop",V,te.setState),ye("onSelectionDrag",A,te.setState),ye("onSelectionDragStart",P,te.setState),ye("onSelectionDragStop",z,te.setState),ye("noPanClassName",q,te.setState),ye("nodeOrigin",U,te.setState),ye("rfId",K,te.setState),ye("autoPanOnConnect",G,te.setState),ye("autoPanOnNodeDrag",X,te.setState),ye("onError",ie,te.setState),ye("connectionRadius",le,te.setState),ye("isValidConnection",we,te.setState),ye("nodeDragThreshold",_e,te.setState),qi(e,ke),qi(t,lt),qi(g,Be),qi(b,ct),qi(E,ce),qi(x,De),null},oj={display:"none"},JU={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},i4="react-flow__node-desc",a4="react-flow__edge-desc",eH="react-flow__aria-live",tH=e=>e.ariaLiveMessage;function rH({rfId:e}){const t=Oe(tH);return B.createElement("div",{id:`${eH}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:JU},t)}function nH({rfId:e,disableKeyboardA11y:t}){return B.createElement(B.Fragment,null,B.createElement("div",{id:`${i4}-${e}`,style:oj},"Press enter or space to select a node.",!t&&"You can then use the arrow keys to move the node around."," Press delete to remove it and escape to cancel."," "),B.createElement("div",{id:`${a4}-${e}`,style:oj},"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel."),!t&&B.createElement(rH,{rfId:e}))}var zl=(e=null,t={actInsideInputWithModifier:!0})=>{const[r,n]=k.useState(!1),s=k.useRef(!1),i=k.useRef(new Set([])),[a,o]=k.useMemo(()=>{if(e!==null){const d=(Array.isArray(e)?e:[e]).filter(f=>typeof f=="string").map(f=>f.split("+")),u=d.reduce((f,h)=>f.concat(...h),[]);return[d,u]}return[[],[]]},[e]);return k.useEffect(()=>{const l=typeof document<"u"?document:null,d=(t==null?void 0:t.target)||l;if(e!==null){const u=p=>{if(s.current=p.ctrlKey||p.metaKey||p.shiftKey,(!s.current||s.current&&!t.actInsideInputWithModifier)&&Gx(p))return!1;const g=cj(p.code,o);i.current.add(p[g]),lj(a,i.current,!1)&&(p.preventDefault(),n(!0))},f=p=>{if((!s.current||s.current&&!t.actInsideInputWithModifier)&&Gx(p))return!1;const g=cj(p.code,o);lj(a,i.current,!0)?(n(!1),i.current.clear()):i.current.delete(p[g]),p.key==="Meta"&&i.current.clear(),s.current=!1},h=()=>{i.current.clear(),n(!1)};return d==null||d.addEventListener("keydown",u),d==null||d.addEventListener("keyup",f),window.addEventListener("blur",h),()=>{d==null||d.removeEventListener("keydown",u),d==null||d.removeEventListener("keyup",f),window.removeEventListener("blur",h)}}},[e,n]),r};function lj(e,t,r){return e.filter(n=>r||n.length===t.size).some(n=>n.every(s=>t.has(s)))}function cj(e,t){return t.includes(e)?"code":"key"}function o4(e,t,r,n){var o,l;const s=e.parentNode||e.parentId;if(!s)return r;const i=t.get(s),a=pi(i,n);return o4(i,t,{x:(r.x??0)+a.x,y:(r.y??0)+a.y,z:(((o=i[ot])==null?void 0:o.z)??0)>(r.z??0)?((l=i[ot])==null?void 0:l.z)??0:r.z??0},n)}function l4(e,t,r){e.forEach(n=>{var i;const s=n.parentNode||n.parentId;if(s&&!e.has(s))throw new Error(`Parent node ${s} not found`);if(s||r!=null&&r[n.id]){const{x:a,y:o,z:l}=o4(n,e,{...n.position,z:((i=n[ot])==null?void 0:i.z)??0},t);n.positionAbsolute={x:a,y:o},n[ot].z=l,r!=null&&r[n.id]&&(n[ot].isParent=!0)}})}function ph(e,t,r,n){const s=new Map,i={},a=n?1e3:0;return e.forEach(o=>{var p;const l=(Tr(o.zIndex)?o.zIndex:0)+(o.selected?a:0),d=t.get(o.id),u={...o,positionAbsolute:{x:o.position.x,y:o.position.y}},f=o.parentNode||o.parentId;f&&(i[f]=!0);const h=(d==null?void 0:d.type)&&(d==null?void 0:d.type)!==o.type;Object.defineProperty(u,ot,{enumerable:!1,value:{handleBounds:h||(p=d==null?void 0:d[ot])==null?void 0:p.handleBounds,z:l}}),s.set(o.id,u)}),l4(s,r,i),s}function c4(e,t={}){const{getNodes:r,width:n,height:s,minZoom:i,maxZoom:a,d3Zoom:o,d3Selection:l,fitViewOnInitDone:d,fitViewOnInit:u,nodeOrigin:f}=e(),h=t.initial&&!d&&u;if(o&&l&&(h||!t.initial)){const m=r().filter(b=>{var y;const x=t.includeHiddenNodes?b.width&&b.height:!b.hidden;return(y=t.nodes)!=null&&y.length?x&&t.nodes.some(v=>v.id===b.id):x}),g=m.every(b=>b.width&&b.height);if(m.length>0&&g){const b=Ud(m,f),{x,y,zoom:v}=KA(b,n,s,t.minZoom??i,t.maxZoom??a,t.padding??.1),w=Pn.translate(x,y).scale(v);return typeof t.duration=="number"&&t.duration>0?o.transform(Zs(l,t.duration),w):o.transform(l,w),!0}}return!1}function sH(e,t){return e.forEach(r=>{const n=t.get(r.id);n&&t.set(n.id,{...n,[ot]:n[ot],selected:r.selected})}),new Map(t)}function iH(e,t){return t.map(r=>{const n=e.find(s=>s.id===r.id);return n&&(r.selected=n.selected),r})}function Uc({changedNodes:e,changedEdges:t,get:r,set:n}){const{nodeInternals:s,edges:i,onNodesChange:a,onEdgesChange:o,hasDefaultNodes:l,hasDefaultEdges:d}=r();e!=null&&e.length&&(l&&n({nodeInternals:sH(e,s)}),a==null||a(e)),t!=null&&t.length&&(d&&n({edges:iH(t,i)}),o==null||o(t))}const Bi=()=>{},aH={zoomIn:Bi,zoomOut:Bi,zoomTo:Bi,getZoom:()=>1,setViewport:Bi,getViewport:()=>({x:0,y:0,zoom:1}),fitView:()=>!1,setCenter:Bi,fitBounds:Bi,project:e=>e,screenToFlowPosition:e=>e,flowToScreenPosition:e=>e,viewportInitialized:!1},oH=e=>({d3Zoom:e.d3Zoom,d3Selection:e.d3Selection}),lH=()=>{const e=kt(),{d3Zoom:t,d3Selection:r}=Oe(oH,Ct);return k.useMemo(()=>r&&t?{zoomIn:s=>t.scaleBy(Zs(r,s==null?void 0:s.duration),1.2),zoomOut:s=>t.scaleBy(Zs(r,s==null?void 0:s.duration),1/1.2),zoomTo:(s,i)=>t.scaleTo(Zs(r,i==null?void 0:i.duration),s),getZoom:()=>e.getState().transform[2],setViewport:(s,i)=>{const[a,o,l]=e.getState().transform,d=Pn.translate(s.x??a,s.y??o).scale(s.zoom??l);t.transform(Zs(r,i==null?void 0:i.duration),d)},getViewport:()=>{const[s,i,a]=e.getState().transform;return{x:s,y:i,zoom:a}},fitView:s=>c4(e.getState,s),setCenter:(s,i,a)=>{const{width:o,height:l,maxZoom:d}=e.getState(),u=typeof(a==null?void 0:a.zoom)<"u"?a.zoom:d,f=o/2-s*u,h=l/2-i*u,p=Pn.translate(f,h).scale(u);t.transform(Zs(r,a==null?void 0:a.duration),p)},fitBounds:(s,i)=>{const{width:a,height:o,minZoom:l,maxZoom:d}=e.getState(),{x:u,y:f,zoom:h}=KA(s,a,o,l,d,(i==null?void 0:i.padding)??.1),p=Pn.translate(u,f).scale(h);t.transform(Zs(r,i==null?void 0:i.duration),p)},project:s=>{const{transform:i,snapToGrid:a,snapGrid:o}=e.getState();return console.warn("[DEPRECATED] `project` is deprecated. Instead use `screenToFlowPosition`. There is no need to subtract the react flow bounds anymore! https://reactflow.dev/api-reference/types/react-flow-instance#screen-to-flow-position"),Xx(s,i,a,o)},screenToFlowPosition:s=>{const{transform:i,snapToGrid:a,snapGrid:o,domNode:l}=e.getState();if(!l)return s;const{x:d,y:u}=l.getBoundingClientRect(),f={x:s.x-d,y:s.y-u};return Xx(f,i,a,o)},flowToScreenPosition:s=>{const{transform:i,domNode:a}=e.getState();if(!a)return s;const{x:o,y:l}=a.getBoundingClientRect(),d=HA(s,i);return{x:d.x+o,y:d.y+l}},viewportInitialized:!0}:aH,[t,r])};function a1(){const e=lH(),t=kt(),r=k.useCallback(()=>t.getState().getNodes().map(g=>({...g})),[]),n=k.useCallback(g=>t.getState().nodeInternals.get(g),[]),s=k.useCallback(()=>{const{edges:g=[]}=t.getState();return g.map(b=>({...b}))},[]),i=k.useCallback(g=>{const{edges:b=[]}=t.getState();return b.find(x=>x.id===g)},[]),a=k.useCallback(g=>{const{getNodes:b,setNodes:x,hasDefaultNodes:y,onNodesChange:v}=t.getState(),w=b(),_=typeof g=="function"?g(w):g;if(y)x(_);else if(v){const N=_.length===0?w.map(j=>({type:"remove",id:j.id})):_.map(j=>({item:j,type:"reset"}));v(N)}},[]),o=k.useCallback(g=>{const{edges:b=[],setEdges:x,hasDefaultEdges:y,onEdgesChange:v}=t.getState(),w=typeof g=="function"?g(b):g;if(y)x(w);else if(v){const _=w.length===0?b.map(N=>({type:"remove",id:N.id})):w.map(N=>({item:N,type:"reset"}));v(_)}},[]),l=k.useCallback(g=>{const b=Array.isArray(g)?g:[g],{getNodes:x,setNodes:y,hasDefaultNodes:v,onNodesChange:w}=t.getState();if(v){const N=[...x(),...b];y(N)}else if(w){const _=b.map(N=>({item:N,type:"add"}));w(_)}},[]),d=k.useCallback(g=>{const b=Array.isArray(g)?g:[g],{edges:x=[],setEdges:y,hasDefaultEdges:v,onEdgesChange:w}=t.getState();if(v)y([...x,...b]);else if(w){const _=b.map(N=>({item:N,type:"add"}));w(_)}},[]),u=k.useCallback(()=>{const{getNodes:g,edges:b=[],transform:x}=t.getState(),[y,v,w]=x;return{nodes:g().map(_=>({..._})),edges:b.map(_=>({..._})),viewport:{x:y,y:v,zoom:w}}},[]),f=k.useCallback(({nodes:g,edges:b})=>{const{nodeInternals:x,getNodes:y,edges:v,hasDefaultNodes:w,hasDefaultEdges:_,onNodesDelete:N,onEdgesDelete:j,onNodesChange:E,onEdgesChange:M}=t.getState(),C=(g||[]).map(O=>O.id),D=(b||[]).map(O=>O.id),F=y().reduce((O,I)=>{const V=I.parentNode||I.parentId,A=!C.includes(I.id)&&V&&O.find(z=>z.id===V);return(typeof I.deletable=="boolean"?I.deletable:!0)&&(C.includes(I.id)||A)&&O.push(I),O},[]),T=v.filter(O=>typeof O.deletable=="boolean"?O.deletable:!0),S=T.filter(O=>D.includes(O.id));if(F||S){const O=GA(F,T),I=[...S,...O],V=I.reduce((A,P)=>(A.includes(P.id)||A.push(P.id),A),[]);if((_||w)&&(_&&t.setState({edges:v.filter(A=>!V.includes(A.id))}),w&&(F.forEach(A=>{x.delete(A.id)}),t.setState({nodeInternals:new Map(x)}))),V.length>0&&(j==null||j(I),M&&M(V.map(A=>({id:A,type:"remove"})))),F.length>0&&(N==null||N(F),E)){const A=F.map(P=>({id:P.id,type:"remove"}));E(A)}}},[]),h=k.useCallback(g=>{const b=CU(g),x=b?null:t.getState().nodeInternals.get(g.id);return!b&&!x?[null,null,b]:[b?g:ej(x),x,b]},[]),p=k.useCallback((g,b=!0,x)=>{const[y,v,w]=h(g);return y?(x||t.getState().getNodes()).filter(_=>{if(!w&&(_.id===v.id||!_.positionAbsolute))return!1;const N=ej(_),j=Wx(N,y);return b&&j>0||j>=y.width*y.height}):[]},[]),m=k.useCallback((g,b,x=!0)=>{const[y]=h(g);if(!y)return!1;const v=Wx(y,b);return x&&v>0||v>=y.width*y.height},[]);return k.useMemo(()=>({...e,getNodes:r,getNode:n,getEdges:s,getEdge:i,setNodes:a,setEdges:o,addNodes:l,addEdges:d,toObject:u,deleteElements:f,getIntersectingNodes:p,isNodeIntersecting:m}),[e,r,n,s,i,a,o,l,d,u,f,p,m])}const cH={actInsideInputWithModifier:!1};var uH=({deleteKeyCode:e,multiSelectionKeyCode:t})=>{const r=kt(),{deleteElements:n}=a1(),s=zl(e,cH),i=zl(t);k.useEffect(()=>{if(s){const{edges:a,getNodes:o}=r.getState(),l=o().filter(u=>u.selected),d=a.filter(u=>u.selected);n({nodes:l,edges:d}),r.setState({nodesSelectionActive:!1})}},[s]),k.useEffect(()=>{r.setState({multiSelectionActive:i})},[i])};function dH(e){const t=kt();k.useEffect(()=>{let r;const n=()=>{var i,a;if(!e.current)return;const s=Qb(e.current);(s.height===0||s.width===0)&&((a=(i=t.getState()).onError)==null||a.call(i,"004",Fn.error004())),t.setState({width:s.width||500,height:s.height||500})};return n(),window.addEventListener("resize",n),e.current&&(r=new ResizeObserver(()=>n()),r.observe(e.current)),()=>{window.removeEventListener("resize",n),r&&e.current&&r.unobserve(e.current)}},[])}const o1={position:"absolute",width:"100%",height:"100%",top:0,left:0},fH=(e,t)=>e.x!==t.x||e.y!==t.y||e.zoom!==t.k,Hc=e=>({x:e.x,y:e.y,zoom:e.k}),Ui=(e,t)=>e.target.closest(`.${t}`),uj=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),dj=e=>{const t=e.ctrlKey&&ad()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t},hH=e=>({d3Zoom:e.d3Zoom,d3Selection:e.d3Selection,d3ZoomHandler:e.d3ZoomHandler,userSelectionActive:e.userSelectionActive}),pH=({onMove:e,onMoveStart:t,onMoveEnd:r,onPaneContextMenu:n,zoomOnScroll:s=!0,zoomOnPinch:i=!0,panOnScroll:a=!1,panOnScrollSpeed:o=.5,panOnScrollMode:l=oi.Free,zoomOnDoubleClick:d=!0,elementsSelectable:u,panOnDrag:f=!0,defaultViewport:h,translateExtent:p,minZoom:m,maxZoom:g,zoomActivationKeyCode:b,preventScrolling:x=!0,children:y,noWheelClassName:v,noPanClassName:w})=>{const _=k.useRef(),N=kt(),j=k.useRef(!1),E=k.useRef(!1),M=k.useRef(null),C=k.useRef({x:0,y:0,zoom:0}),{d3Zoom:D,d3Selection:F,d3ZoomHandler:T,userSelectionActive:S}=Oe(hH,Ct),O=zl(b),I=k.useRef(0),V=k.useRef(!1),A=k.useRef();return dH(M),k.useEffect(()=>{if(M.current){const P=M.current.getBoundingClientRect(),z=AA().scaleExtent([m,g]).translateExtent(p),q=Nr(M.current).call(z),U=Pn.translate(h.x,h.y).scale(za(h.zoom,m,g)),K=[[0,0],[P.width,P.height]],G=z.constrain()(U,K,p);z.transform(q,G),z.wheelDelta(dj),N.setState({d3Zoom:z,d3Selection:q,d3ZoomHandler:q.on("wheel.zoom"),transform:[G.x,G.y,G.k],domNode:M.current.closest(".react-flow")})}},[]),k.useEffect(()=>{F&&D&&(a&&!O&&!S?F.on("wheel.zoom",P=>{if(Ui(P,v))return!1;P.preventDefault(),P.stopImmediatePropagation();const z=F.property("__zoom").k||1;if(P.ctrlKey&&i){const we=Ur(P),_e=dj(P),ke=z*Math.pow(2,_e);D.scaleTo(F,ke,we,P);return}const q=P.deltaMode===1?20:1;let U=l===oi.Vertical?0:P.deltaX*q,K=l===oi.Horizontal?0:P.deltaY*q;!ad()&&P.shiftKey&&l!==oi.Vertical&&(U=P.deltaY*q,K=0),D.translateBy(F,-(U/z)*o,-(K/z)*o,{internal:!0});const G=Hc(F.property("__zoom")),{onViewportChangeStart:X,onViewportChange:ie,onViewportChangeEnd:le}=N.getState();clearTimeout(A.current),V.current||(V.current=!0,t==null||t(P,G),X==null||X(G)),V.current&&(e==null||e(P,G),ie==null||ie(G),A.current=setTimeout(()=>{r==null||r(P,G),le==null||le(G),V.current=!1},150))},{passive:!1}):typeof T<"u"&&F.on("wheel.zoom",function(P,z){if(!x&&P.type==="wheel"&&!P.ctrlKey||Ui(P,v))return null;P.preventDefault(),T.call(this,P,z)},{passive:!1}))},[S,a,l,F,D,T,O,i,x,v,t,e,r]),k.useEffect(()=>{D&&D.on("start",P=>{var U,K;if(!P.sourceEvent||P.sourceEvent.internal)return null;I.current=(U=P.sourceEvent)==null?void 0:U.button;const{onViewportChangeStart:z}=N.getState(),q=Hc(P.transform);j.current=!0,C.current=q,((K=P.sourceEvent)==null?void 0:K.type)==="mousedown"&&N.setState({paneDragging:!0}),z==null||z(q),t==null||t(P.sourceEvent,q)})},[D,t]),k.useEffect(()=>{D&&(S&&!j.current?D.on("zoom",null):S||D.on("zoom",P=>{var q;const{onViewportChange:z}=N.getState();if(N.setState({transform:[P.transform.x,P.transform.y,P.transform.k]}),E.current=!!(n&&uj(f,I.current??0)),(e||z)&&!((q=P.sourceEvent)!=null&&q.internal)){const U=Hc(P.transform);z==null||z(U),e==null||e(P.sourceEvent,U)}}))},[S,D,e,f,n]),k.useEffect(()=>{D&&D.on("end",P=>{if(!P.sourceEvent||P.sourceEvent.internal)return null;const{onViewportChangeEnd:z}=N.getState();if(j.current=!1,N.setState({paneDragging:!1}),n&&uj(f,I.current??0)&&!E.current&&n(P.sourceEvent),E.current=!1,(r||z)&&fH(C.current,P.transform)){const q=Hc(P.transform);C.current=q,clearTimeout(_.current),_.current=setTimeout(()=>{z==null||z(q),r==null||r(P.sourceEvent,q)},a?150:0)}})},[D,a,f,r,n]),k.useEffect(()=>{D&&D.filter(P=>{const z=O||s,q=i&&P.ctrlKey;if((f===!0||Array.isArray(f)&&f.includes(1))&&P.button===1&&P.type==="mousedown"&&(Ui(P,"react-flow__node")||Ui(P,"react-flow__edge")))return!0;if(!f&&!z&&!a&&!d&&!i||S||!d&&P.type==="dblclick"||Ui(P,v)&&P.type==="wheel"||Ui(P,w)&&(P.type!=="wheel"||a&&P.type==="wheel"&&!O)||!i&&P.ctrlKey&&P.type==="wheel"||!z&&!a&&!q&&P.type==="wheel"||!f&&(P.type==="mousedown"||P.type==="touchstart")||Array.isArray(f)&&!f.includes(P.button)&&P.type==="mousedown")return!1;const U=Array.isArray(f)&&f.includes(P.button)||!P.button||P.button<=1;return(!P.ctrlKey||P.type==="wheel")&&U})},[S,D,s,i,a,d,f,u,O]),B.createElement("div",{className:"react-flow__renderer",ref:M,style:o1},y)},mH=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function gH(){const{userSelectionActive:e,userSelectionRect:t}=Oe(mH,Ct);return e&&t?B.createElement("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}function fj(e,t){const r=t.parentNode||t.parentId,n=e.find(s=>s.id===r);if(n){const s=t.position.x+t.width-n.width,i=t.position.y+t.height-n.height;if(s>0||i>0||t.position.x<0||t.position.y<0){if(n.style={...n.style},n.style.width=n.style.width??n.width,n.style.height=n.style.height??n.height,s>0&&(n.style.width+=s),i>0&&(n.style.height+=i),t.position.x<0){const a=Math.abs(t.position.x);n.position.x=n.position.x-a,n.style.width+=a,t.position.x=0}if(t.position.y<0){const a=Math.abs(t.position.y);n.position.y=n.position.y-a,n.style.height+=a,t.position.y=0}n.width=n.style.width,n.height=n.style.height}}}function u4(e,t){if(e.some(n=>n.type==="reset"))return e.filter(n=>n.type==="reset").map(n=>n.item);const r=e.filter(n=>n.type==="add").map(n=>n.item);return t.reduce((n,s)=>{const i=e.filter(o=>o.id===s.id);if(i.length===0)return n.push(s),n;const a={...s};for(const o of i)if(o)switch(o.type){case"select":{a.selected=o.selected;break}case"position":{typeof o.position<"u"&&(a.position=o.position),typeof o.positionAbsolute<"u"&&(a.positionAbsolute=o.positionAbsolute),typeof o.dragging<"u"&&(a.dragging=o.dragging),a.expandParent&&fj(n,a);break}case"dimensions":{typeof o.dimensions<"u"&&(a.width=o.dimensions.width,a.height=o.dimensions.height),typeof o.updateStyle<"u"&&(a.style={...a.style||{},...o.dimensions}),typeof o.resizing=="boolean"&&(a.resizing=o.resizing),a.expandParent&&fj(n,a);break}case"remove":return n}return n.push(a),n},r)}function d4(e,t){return u4(e,t)}function yH(e,t){return u4(e,t)}const cs=(e,t)=>({id:e,type:"select",selected:t});function ua(e,t){return e.reduce((r,n)=>{const s=t.includes(n.id);return!n.selected&&s?(n.selected=!0,r.push(cs(n.id,!0))):n.selected&&!s&&(n.selected=!1,r.push(cs(n.id,!1))),r},[])}const mh=(e,t)=>r=>{r.target===t.current&&(e==null||e(r))},xH=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging}),f4=k.memo(({isSelecting:e,selectionMode:t=Ol.Full,panOnDrag:r,onSelectionStart:n,onSelectionEnd:s,onPaneClick:i,onPaneContextMenu:a,onPaneScroll:o,onPaneMouseEnter:l,onPaneMouseMove:d,onPaneMouseLeave:u,children:f})=>{const h=k.useRef(null),p=kt(),m=k.useRef(0),g=k.useRef(0),b=k.useRef(),{userSelectionActive:x,elementsSelectable:y,dragging:v}=Oe(xH,Ct),w=()=>{p.setState({userSelectionActive:!1,userSelectionRect:null}),m.current=0,g.current=0},_=T=>{i==null||i(T),p.getState().resetSelectedElements(),p.setState({nodesSelectionActive:!1})},N=T=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){T.preventDefault();return}a==null||a(T)},j=o?T=>o(T):void 0,E=T=>{const{resetSelectedElements:S,domNode:O}=p.getState();if(b.current=O==null?void 0:O.getBoundingClientRect(),!y||!e||T.button!==0||T.target!==h.current||!b.current)return;const{x:I,y:V}=Ns(T,b.current);S(),p.setState({userSelectionRect:{width:0,height:0,startX:I,startY:V,x:I,y:V}}),n==null||n(T)},M=T=>{const{userSelectionRect:S,nodeInternals:O,edges:I,transform:V,onNodesChange:A,onEdgesChange:P,nodeOrigin:z,getNodes:q}=p.getState();if(!e||!b.current||!S)return;p.setState({userSelectionActive:!0,nodesSelectionActive:!1});const U=Ns(T,b.current),K=S.startX??0,G=S.startY??0,X={...S,x:U.x<K?U.x:K,y:U.y<G?U.y:G,width:Math.abs(U.x-K),height:Math.abs(U.y-G)},ie=q(),le=WA(O,X,V,t===Ol.Partial,!0,z),we=GA(le,I).map(ke=>ke.id),_e=le.map(ke=>ke.id);if(m.current!==_e.length){m.current=_e.length;const ke=ua(ie,_e);ke.length&&(A==null||A(ke))}if(g.current!==we.length){g.current=we.length;const ke=ua(I,we);ke.length&&(P==null||P(ke))}p.setState({userSelectionRect:X})},C=T=>{if(T.button!==0)return;const{userSelectionRect:S}=p.getState();!x&&S&&T.target===h.current&&(_==null||_(T)),p.setState({nodesSelectionActive:m.current>0}),w(),s==null||s(T)},D=T=>{x&&(p.setState({nodesSelectionActive:m.current>0}),s==null||s(T)),w()},F=y&&(e||x);return B.createElement("div",{className:Ot(["react-flow__pane",{dragging:v,selection:e}]),onClick:F?void 0:mh(_,h),onContextMenu:mh(N,h),onWheel:mh(j,h),onMouseEnter:F?void 0:l,onMouseDown:F?E:void 0,onMouseMove:F?M:d,onMouseUp:F?C:void 0,onMouseLeave:F?D:u,ref:h,style:o1},f,B.createElement(gH,null))});f4.displayName="Pane";function h4(e,t){const r=e.parentNode||e.parentId;if(!r)return!1;const n=t.get(r);return n?n.selected?!0:h4(n,t):!1}function hj(e,t,r){let n=e;do{if(n!=null&&n.matches(t))return!0;if(n===r.current)return!1;n=n.parentElement}while(n);return!1}function vH(e,t,r,n){return Array.from(e.values()).filter(s=>(s.selected||s.id===n)&&(!s.parentNode||s.parentId||!h4(s,e))&&(s.draggable||t&&typeof s.draggable>"u")).map(s=>{var i,a;return{id:s.id,position:s.position||{x:0,y:0},positionAbsolute:s.positionAbsolute||{x:0,y:0},distance:{x:r.x-(((i=s.positionAbsolute)==null?void 0:i.x)??0),y:r.y-(((a=s.positionAbsolute)==null?void 0:a.y)??0)},delta:{x:0,y:0},extent:s.extent,parentNode:s.parentNode||s.parentId,parentId:s.parentNode||s.parentId,width:s.width,height:s.height,expandParent:s.expandParent}})}function bH(e,t){return!t||t==="parent"?t:[t[0],[t[1][0]-(e.width||0),t[1][1]-(e.height||0)]]}function p4(e,t,r,n,s=[0,0],i){const a=bH(e,e.extent||n);let o=a;const l=e.parentNode||e.parentId;if(e.extent==="parent"&&!e.expandParent)if(l&&e.width&&e.height){const f=r.get(l),{x:h,y:p}=pi(f,s).positionAbsolute;o=f&&Tr(h)&&Tr(p)&&Tr(f.width)&&Tr(f.height)?[[h+e.width*s[0],p+e.height*s[1]],[h+f.width-e.width+e.width*s[0],p+f.height-e.height+e.height*s[1]]]:o}else i==null||i("005",Fn.error005()),o=a;else if(e.extent&&l&&e.extent!=="parent"){const f=r.get(l),{x:h,y:p}=pi(f,s).positionAbsolute;o=[[e.extent[0][0]+h,e.extent[0][1]+p],[e.extent[1][0]+h,e.extent[1][1]+p]]}let d={x:0,y:0};if(l){const f=r.get(l);d=pi(f,s).positionAbsolute}const u=o&&o!=="parent"?Jb(t,o):t;return{position:{x:u.x-d.x,y:u.y-d.y},positionAbsolute:u}}function gh({nodeId:e,dragItems:t,nodeInternals:r}){const n=t.map(s=>({...r.get(s.id),position:s.position,positionAbsolute:s.positionAbsolute}));return[e?n.find(s=>s.id===e):n[0],n]}const pj=(e,t,r,n)=>{const s=t.querySelectorAll(e);if(!s||!s.length)return null;const i=Array.from(s),a=t.getBoundingClientRect(),o={x:a.width*n[0],y:a.height*n[1]};return i.map(l=>{const d=l.getBoundingClientRect();return{id:l.getAttribute("data-handleid"),position:l.getAttribute("data-handlepos"),x:(d.left-a.left-o.x)/r,y:(d.top-a.top-o.y)/r,...Qb(l)}})};function wo(e,t,r){return r===void 0?r:n=>{const s=t().nodeInternals.get(e);s&&r(n,{...s})}}function Qx({id:e,store:t,unselect:r=!1,nodeRef:n}){const{addSelectedNodes:s,unselectNodesAndEdges:i,multiSelectionActive:a,nodeInternals:o,onError:l}=t.getState(),d=o.get(e);if(!d){l==null||l("012",Fn.error012(e));return}t.setState({nodesSelectionActive:!1}),d.selected?(r||d.selected&&a)&&(i({nodes:[d],edges:[]}),requestAnimationFrame(()=>{var u;return(u=n==null?void 0:n.current)==null?void 0:u.blur()})):s([e])}function wH(){const e=kt();return k.useCallback(({sourceEvent:r})=>{const{transform:n,snapGrid:s,snapToGrid:i}=e.getState(),a=r.touches?r.touches[0].clientX:r.clientX,o=r.touches?r.touches[0].clientY:r.clientY,l={x:(a-n[0])/n[2],y:(o-n[1])/n[2]};return{xSnapped:i?s[0]*Math.round(l.x/s[0]):l.x,ySnapped:i?s[1]*Math.round(l.y/s[1]):l.y,...l}},[])}function yh(e){return(t,r,n)=>e==null?void 0:e(t,n)}function m4({nodeRef:e,disabled:t=!1,noDragClassName:r,handleSelector:n,nodeId:s,isSelectable:i,selectNodesOnDrag:a}){const o=kt(),[l,d]=k.useState(!1),u=k.useRef([]),f=k.useRef({x:null,y:null}),h=k.useRef(0),p=k.useRef(null),m=k.useRef({x:0,y:0}),g=k.useRef(null),b=k.useRef(!1),x=k.useRef(!1),y=k.useRef(!1),v=wH();return k.useEffect(()=>{if(e!=null&&e.current){const w=Nr(e.current),_=({x:E,y:M})=>{const{nodeInternals:C,onNodeDrag:D,onSelectionDrag:F,updateNodePositions:T,nodeExtent:S,snapGrid:O,snapToGrid:I,nodeOrigin:V,onError:A}=o.getState();f.current={x:E,y:M};let P=!1,z={x:0,y:0,x2:0,y2:0};if(u.current.length>1&&S){const U=Ud(u.current,V);z=Ll(U)}if(u.current=u.current.map(U=>{const K={x:E-U.distance.x,y:M-U.distance.y};I&&(K.x=O[0]*Math.round(K.x/O[0]),K.y=O[1]*Math.round(K.y/O[1]));const G=[[S[0][0],S[0][1]],[S[1][0],S[1][1]]];u.current.length>1&&S&&!U.extent&&(G[0][0]=U.positionAbsolute.x-z.x+S[0][0],G[1][0]=U.positionAbsolute.x+(U.width??0)-z.x2+S[1][0],G[0][1]=U.positionAbsolute.y-z.y+S[0][1],G[1][1]=U.positionAbsolute.y+(U.height??0)-z.y2+S[1][1]);const X=p4(U,K,C,G,V,A);return P=P||U.position.x!==X.position.x||U.position.y!==X.position.y,U.position=X.position,U.positionAbsolute=X.positionAbsolute,U}),!P)return;T(u.current,!0,!0),d(!0);const q=s?D:yh(F);if(q&&g.current){const[U,K]=gh({nodeId:s,dragItems:u.current,nodeInternals:C});q(g.current,U,K)}},N=()=>{if(!p.current)return;const[E,M]=IA(m.current,p.current);if(E!==0||M!==0){const{transform:C,panBy:D}=o.getState();f.current.x=(f.current.x??0)-E/C[2],f.current.y=(f.current.y??0)-M/C[2],D({x:E,y:M})&&_(f.current)}h.current=requestAnimationFrame(N)},j=E=>{var V;const{nodeInternals:M,multiSelectionActive:C,nodesDraggable:D,unselectNodesAndEdges:F,onNodeDragStart:T,onSelectionDragStart:S}=o.getState();x.current=!0;const O=s?T:yh(S);(!a||!i)&&!C&&s&&((V=M.get(s))!=null&&V.selected||F()),s&&i&&a&&Qx({id:s,store:o,nodeRef:e});const I=v(E);if(f.current=I,u.current=vH(M,D,I,s),O&&u.current){const[A,P]=gh({nodeId:s,dragItems:u.current,nodeInternals:M});O(E.sourceEvent,A,P)}};if(t)w.on(".drag",null);else{const E=R9().on("start",M=>{const{domNode:C,nodeDragThreshold:D}=o.getState();D===0&&j(M),y.current=!1;const F=v(M);f.current=F,p.current=(C==null?void 0:C.getBoundingClientRect())||null,m.current=Ns(M.sourceEvent,p.current)}).on("drag",M=>{var T,S;const C=v(M),{autoPanOnNodeDrag:D,nodeDragThreshold:F}=o.getState();if(M.sourceEvent.type==="touchmove"&&M.sourceEvent.touches.length>1&&(y.current=!0),!y.current){if(!b.current&&x.current&&D&&(b.current=!0,N()),!x.current){const O=C.xSnapped-(((T=f==null?void 0:f.current)==null?void 0:T.x)??0),I=C.ySnapped-(((S=f==null?void 0:f.current)==null?void 0:S.y)??0);Math.sqrt(O*O+I*I)>F&&j(M)}(f.current.x!==C.xSnapped||f.current.y!==C.ySnapped)&&u.current&&x.current&&(g.current=M.sourceEvent,m.current=Ns(M.sourceEvent,p.current),_(C))}}).on("end",M=>{if(!(!x.current||y.current)&&(d(!1),b.current=!1,x.current=!1,cancelAnimationFrame(h.current),u.current)){const{updateNodePositions:C,nodeInternals:D,onNodeDragStop:F,onSelectionDragStop:T}=o.getState(),S=s?F:yh(T);if(C(u.current,!1,!1),S){const[O,I]=gh({nodeId:s,dragItems:u.current,nodeInternals:D});S(M.sourceEvent,O,I)}}}).filter(M=>{const C=M.target;return!M.button&&(!r||!hj(C,`.${r}`,e))&&(!n||hj(C,n,e))});return w.call(E),()=>{w.on(".drag",null)}}}},[e,t,r,n,i,o,s,a,v]),l}function g4(){const e=kt();return k.useCallback(r=>{const{nodeInternals:n,nodeExtent:s,updateNodePositions:i,getNodes:a,snapToGrid:o,snapGrid:l,onError:d,nodesDraggable:u}=e.getState(),f=a().filter(y=>y.selected&&(y.draggable||u&&typeof y.draggable>"u")),h=o?l[0]:5,p=o?l[1]:5,m=r.isShiftPressed?4:1,g=r.x*h*m,b=r.y*p*m,x=f.map(y=>{if(y.positionAbsolute){const v={x:y.positionAbsolute.x+g,y:y.positionAbsolute.y+b};o&&(v.x=l[0]*Math.round(v.x/l[0]),v.y=l[1]*Math.round(v.y/l[1]));const{positionAbsolute:w,position:_}=p4(y,v,n,s,void 0,d);y.position=_,y.positionAbsolute=w}return y});i(x,!0,!1)},[])}const ka={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};var ko=e=>{const t=({id:r,type:n,data:s,xPos:i,yPos:a,xPosOrigin:o,yPosOrigin:l,selected:d,onClick:u,onMouseEnter:f,onMouseMove:h,onMouseLeave:p,onContextMenu:m,onDoubleClick:g,style:b,className:x,isDraggable:y,isSelectable:v,isConnectable:w,isFocusable:_,selectNodesOnDrag:N,sourcePosition:j,targetPosition:E,hidden:M,resizeObserver:C,dragHandle:D,zIndex:F,isParent:T,noDragClassName:S,noPanClassName:O,initialized:I,disableKeyboardA11y:V,ariaLabel:A,rfId:P,hasHandleBounds:z})=>{const q=kt(),U=k.useRef(null),K=k.useRef(null),G=k.useRef(j),X=k.useRef(E),ie=k.useRef(n),le=v||y||u||f||h||p,we=g4(),_e=wo(r,q.getState,f),ke=wo(r,q.getState,h),lt=wo(r,q.getState,p),ve=wo(r,q.getState,m),Be=wo(r,q.getState,g),ct=ne=>{const{nodeDragThreshold:te}=q.getState();if(v&&(!N||!y||te>0)&&Qx({id:r,store:q,nodeRef:U}),u){const ze=q.getState().nodeInternals.get(r);ze&&u(ne,{...ze})}},ce=ne=>{if(!Gx(ne)&&!V)if(FA.includes(ne.key)&&v){const te=ne.key==="Escape";Qx({id:r,store:q,unselect:te,nodeRef:U})}else y&&d&&Object.prototype.hasOwnProperty.call(ka,ne.key)&&(q.setState({ariaLiveMessage:`Moved selected node ${ne.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~i}, y: ${~~a}`}),we({x:ka[ne.key].x,y:ka[ne.key].y,isShiftPressed:ne.shiftKey}))};k.useEffect(()=>()=>{K.current&&(C==null||C.unobserve(K.current),K.current=null)},[]),k.useEffect(()=>{if(U.current&&!M){const ne=U.current;(!I||!z||K.current!==ne)&&(K.current&&(C==null||C.unobserve(K.current)),C==null||C.observe(ne),K.current=ne)}},[M,I,z]),k.useEffect(()=>{const ne=ie.current!==n,te=G.current!==j,ze=X.current!==E;U.current&&(ne||te||ze)&&(ne&&(ie.current=n),te&&(G.current=j),ze&&(X.current=E),q.getState().updateNodeDimensions([{id:r,nodeElement:U.current,forceUpdate:!0}]))},[r,n,j,E]);const De=m4({nodeRef:U,disabled:M||!y,noDragClassName:S,handleSelector:D,nodeId:r,isSelectable:v,selectNodesOnDrag:N});return M?null:B.createElement("div",{className:Ot(["react-flow__node",`react-flow__node-${n}`,{[O]:y},x,{selected:d,selectable:v,parent:T,dragging:De}]),ref:U,style:{zIndex:F,transform:`translate(${o}px,${l}px)`,pointerEvents:le?"all":"none",visibility:I?"visible":"hidden",...b},"data-id":r,"data-testid":`rf__node-${r}`,onMouseEnter:_e,onMouseMove:ke,onMouseLeave:lt,onContextMenu:ve,onClick:ct,onDoubleClick:Be,onKeyDown:_?ce:void 0,tabIndex:_?0:void 0,role:_?"button":void 0,"aria-describedby":V?void 0:`${i4}-${P}`,"aria-label":A},B.createElement(IU,{value:r},B.createElement(e,{id:r,data:s,type:n,xPos:i,yPos:a,selected:d,isConnectable:w,sourcePosition:j,targetPosition:E,dragging:De,dragHandle:D,zIndex:F})))};return t.displayName="NodeWrapper",k.memo(t)};const kH=e=>{const t=e.getNodes().filter(r=>r.selected);return{...Ud(t,e.nodeOrigin),transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`,userSelectionActive:e.userSelectionActive}};function jH({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:r}){const n=kt(),{width:s,height:i,x:a,y:o,transformString:l,userSelectionActive:d}=Oe(kH,Ct),u=g4(),f=k.useRef(null);if(k.useEffect(()=>{var m;r||(m=f.current)==null||m.focus({preventScroll:!0})},[r]),m4({nodeRef:f}),d||!s||!i)return null;const h=e?m=>{const g=n.getState().getNodes().filter(b=>b.selected);e(m,g)}:void 0,p=m=>{Object.prototype.hasOwnProperty.call(ka,m.key)&&u({x:ka[m.key].x,y:ka[m.key].y,isShiftPressed:m.shiftKey})};return B.createElement("div",{className:Ot(["react-flow__nodesselection","react-flow__container",t]),style:{transform:l}},B.createElement("div",{ref:f,className:"react-flow__nodesselection-rect",onContextMenu:h,tabIndex:r?void 0:-1,onKeyDown:r?void 0:p,style:{width:s,height:i,top:o,left:a}}))}var _H=k.memo(jH);const SH=e=>e.nodesSelectionActive,y4=({children:e,onPaneClick:t,onPaneMouseEnter:r,onPaneMouseMove:n,onPaneMouseLeave:s,onPaneContextMenu:i,onPaneScroll:a,deleteKeyCode:o,onMove:l,onMoveStart:d,onMoveEnd:u,selectionKeyCode:f,selectionOnDrag:h,selectionMode:p,onSelectionStart:m,onSelectionEnd:g,multiSelectionKeyCode:b,panActivationKeyCode:x,zoomActivationKeyCode:y,elementsSelectable:v,zoomOnScroll:w,zoomOnPinch:_,panOnScroll:N,panOnScrollSpeed:j,panOnScrollMode:E,zoomOnDoubleClick:M,panOnDrag:C,defaultViewport:D,translateExtent:F,minZoom:T,maxZoom:S,preventScrolling:O,onSelectionContextMenu:I,noWheelClassName:V,noPanClassName:A,disableKeyboardA11y:P})=>{const z=Oe(SH),q=zl(f),U=zl(x),K=U||C,G=U||N,X=q||h&&K!==!0;return uH({deleteKeyCode:o,multiSelectionKeyCode:b}),B.createElement(pH,{onMove:l,onMoveStart:d,onMoveEnd:u,onPaneContextMenu:i,elementsSelectable:v,zoomOnScroll:w,zoomOnPinch:_,panOnScroll:G,panOnScrollSpeed:j,panOnScrollMode:E,zoomOnDoubleClick:M,panOnDrag:!q&&K,defaultViewport:D,translateExtent:F,minZoom:T,maxZoom:S,zoomActivationKeyCode:y,preventScrolling:O,noWheelClassName:V,noPanClassName:A},B.createElement(f4,{onSelectionStart:m,onSelectionEnd:g,onPaneClick:t,onPaneMouseEnter:r,onPaneMouseMove:n,onPaneMouseLeave:s,onPaneContextMenu:i,onPaneScroll:a,panOnDrag:K,isSelecting:!!X,selectionMode:p},e,z&&B.createElement(_H,{onSelectionContextMenu:I,noPanClassName:A,disableKeyboardA11y:P})))};y4.displayName="FlowRenderer";var NH=k.memo(y4);function EH(e){return Oe(k.useCallback(r=>e?WA(r.nodeInternals,{x:0,y:0,width:r.width,height:r.height},r.transform,!0):r.getNodes(),[e]))}function CH(e){const t={input:ko(e.input||t4),default:ko(e.default||Zx),output:ko(e.output||n4),group:ko(e.group||i1)},r={},n=Object.keys(e).filter(s=>!["input","default","output","group"].includes(s)).reduce((s,i)=>(s[i]=ko(e[i]||Zx),s),r);return{...t,...n}}const TH=({x:e,y:t,width:r,height:n,origin:s})=>!r||!n?{x:e,y:t}:s[0]<0||s[1]<0||s[0]>1||s[1]>1?{x:e,y:t}:{x:e-r*s[0],y:t-n*s[1]},PH=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,updateNodeDimensions:e.updateNodeDimensions,onError:e.onError}),x4=e=>{const{nodesDraggable:t,nodesConnectable:r,nodesFocusable:n,elementsSelectable:s,updateNodeDimensions:i,onError:a}=Oe(PH,Ct),o=EH(e.onlyRenderVisibleElements),l=k.useRef(),d=k.useMemo(()=>{if(typeof ResizeObserver>"u")return null;const u=new ResizeObserver(f=>{const h=f.map(p=>({id:p.target.getAttribute("data-id"),nodeElement:p.target,forceUpdate:!0}));i(h)});return l.current=u,u},[]);return k.useEffect(()=>()=>{var u;(u=l==null?void 0:l.current)==null||u.disconnect()},[]),B.createElement("div",{className:"react-flow__nodes",style:o1},o.map(u=>{var _,N,j;let f=u.type||"default";e.nodeTypes[f]||(a==null||a("003",Fn.error003(f)),f="default");const h=e.nodeTypes[f]||e.nodeTypes.default,p=!!(u.draggable||t&&typeof u.draggable>"u"),m=!!(u.selectable||s&&typeof u.selectable>"u"),g=!!(u.connectable||r&&typeof u.connectable>"u"),b=!!(u.focusable||n&&typeof u.focusable>"u"),x=e.nodeExtent?Jb(u.positionAbsolute,e.nodeExtent):u.positionAbsolute,y=(x==null?void 0:x.x)??0,v=(x==null?void 0:x.y)??0,w=TH({x:y,y:v,width:u.width??0,height:u.height??0,origin:e.nodeOrigin});return B.createElement(h,{key:u.id,id:u.id,className:u.className,style:u.style,type:f,data:u.data,sourcePosition:u.sourcePosition||ae.Bottom,targetPosition:u.targetPosition||ae.Top,hidden:u.hidden,xPos:y,yPos:v,xPosOrigin:w.x,yPosOrigin:w.y,selectNodesOnDrag:e.selectNodesOnDrag,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,selected:!!u.selected,isDraggable:p,isSelectable:m,isConnectable:g,isFocusable:b,resizeObserver:d,dragHandle:u.dragHandle,zIndex:((_=u[ot])==null?void 0:_.z)??0,isParent:!!((N=u[ot])!=null&&N.isParent),noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,initialized:!!u.width&&!!u.height,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,ariaLabel:u.ariaLabel,hasHandleBounds:!!((j=u[ot])!=null&&j.handleBounds)})}))};x4.displayName="NodeRenderer";var MH=k.memo(x4);const RH=(e,t,r)=>r===ae.Left?e-t:r===ae.Right?e+t:e,AH=(e,t,r)=>r===ae.Top?e-t:r===ae.Bottom?e+t:e,mj="react-flow__edgeupdater",gj=({position:e,centerX:t,centerY:r,radius:n=10,onMouseDown:s,onMouseEnter:i,onMouseOut:a,type:o})=>B.createElement("circle",{onMouseDown:s,onMouseEnter:i,onMouseOut:a,className:Ot([mj,`${mj}-${o}`]),cx:RH(t,n,e),cy:AH(r,n,e),r:n,stroke:"transparent",fill:"transparent"}),DH=()=>!0;var Hi=e=>{const t=({id:r,className:n,type:s,data:i,onClick:a,onEdgeDoubleClick:o,selected:l,animated:d,label:u,labelStyle:f,labelShowBg:h,labelBgStyle:p,labelBgPadding:m,labelBgBorderRadius:g,style:b,source:x,target:y,sourceX:v,sourceY:w,targetX:_,targetY:N,sourcePosition:j,targetPosition:E,elementsSelectable:M,hidden:C,sourceHandleId:D,targetHandleId:F,onContextMenu:T,onMouseEnter:S,onMouseMove:O,onMouseLeave:I,reconnectRadius:V,onReconnect:A,onReconnectStart:P,onReconnectEnd:z,markerEnd:q,markerStart:U,rfId:K,ariaLabel:G,isFocusable:X,isReconnectable:ie,pathOptions:le,interactionWidth:we,disableKeyboardA11y:_e})=>{const ke=k.useRef(null),[lt,ve]=k.useState(!1),[Be,ct]=k.useState(!1),ce=kt(),De=k.useMemo(()=>`url('#${Yx(U,K)}')`,[U,K]),ne=k.useMemo(()=>`url('#${Yx(q,K)}')`,[q,K]);if(C)return null;const te=Qe=>{var br;const{edges:zt,addSelectedEdges:Fe,unselectNodesAndEdges:jt,multiSelectionActive:rn}=ce.getState(),vr=zt.find(Wn=>Wn.id===r);vr&&(M&&(ce.setState({nodesSelectionActive:!1}),vr.selected&&rn?(jt({nodes:[],edges:[vr]}),(br=ke.current)==null||br.blur()):Fe([r])),a&&a(Qe,vr))},ze=bo(r,ce.getState,o),or=bo(r,ce.getState,T),yr=bo(r,ce.getState,S),Tt=bo(r,ce.getState,O),Ze=bo(r,ce.getState,I),nt=(Qe,zt)=>{if(Qe.button!==0)return;const{edges:Fe,isValidConnection:jt}=ce.getState(),rn=zt?y:x,vr=(zt?F:D)||null,br=zt?"target":"source",Wn=jt||DH,Gn=zt,Kn=Fe.find(mn=>mn.id===r);ct(!0),P==null||P(Qe,Kn,br);const Bs=mn=>{ct(!1),z==null||z(mn,Kn,br)};ZA({event:Qe,handleId:vr,nodeId:rn,onConnect:mn=>A==null?void 0:A(Kn,mn),isTarget:Gn,getState:ce.getState,setState:ce.setState,isValidConnection:Wn,edgeUpdaterType:br,onReconnectEnd:Bs})},Pt=Qe=>nt(Qe,!0),xr=Qe=>nt(Qe,!1),Xt=()=>ve(!0),st=()=>ve(!1),xt=!M&&!a,Or=Qe=>{var zt;if(!_e&&FA.includes(Qe.key)&&M){const{unselectNodesAndEdges:Fe,addSelectedEdges:jt,edges:rn}=ce.getState();Qe.key==="Escape"?((zt=ke.current)==null||zt.blur(),Fe({edges:[rn.find(br=>br.id===r)]})):jt([r])}};return B.createElement("g",{className:Ot(["react-flow__edge",`react-flow__edge-${s}`,n,{selected:l,animated:d,inactive:xt,updating:lt}]),onClick:te,onDoubleClick:ze,onContextMenu:or,onMouseEnter:yr,onMouseMove:Tt,onMouseLeave:Ze,onKeyDown:X?Or:void 0,tabIndex:X?0:void 0,role:X?"button":"img","data-testid":`rf__edge-${r}`,"aria-label":G===null?void 0:G||`Edge from ${x} to ${y}`,"aria-describedby":X?`${a4}-${K}`:void 0,ref:ke},!Be&&B.createElement(e,{id:r,source:x,target:y,selected:l,animated:d,label:u,labelStyle:f,labelShowBg:h,labelBgStyle:p,labelBgPadding:m,labelBgBorderRadius:g,data:i,style:b,sourceX:v,sourceY:w,targetX:_,targetY:N,sourcePosition:j,targetPosition:E,sourceHandleId:D,targetHandleId:F,markerStart:De,markerEnd:ne,pathOptions:le,interactionWidth:we}),ie&&B.createElement(B.Fragment,null,(ie==="source"||ie===!0)&&B.createElement(gj,{position:j,centerX:v,centerY:w,radius:V,onMouseDown:Pt,onMouseEnter:Xt,onMouseOut:st,type:"source"}),(ie==="target"||ie===!0)&&B.createElement(gj,{position:E,centerX:_,centerY:N,radius:V,onMouseDown:xr,onMouseEnter:Xt,onMouseOut:st,type:"target"})))};return t.displayName="EdgeWrapper",k.memo(t)};function IH(e){const t={default:Hi(e.default||od),straight:Hi(e.bezier||r1),step:Hi(e.step||t1),smoothstep:Hi(e.step||Bd),simplebezier:Hi(e.simplebezier||e1)},r={},n=Object.keys(e).filter(s=>!["default","bezier"].includes(s)).reduce((s,i)=>(s[i]=Hi(e[i]||od),s),r);return{...t,...n}}function yj(e,t,r=null){const n=((r==null?void 0:r.x)||0)+t.x,s=((r==null?void 0:r.y)||0)+t.y,i=(r==null?void 0:r.width)||t.width,a=(r==null?void 0:r.height)||t.height;switch(e){case ae.Top:return{x:n+i/2,y:s};case ae.Right:return{x:n+i,y:s+a/2};case ae.Bottom:return{x:n+i/2,y:s+a};case ae.Left:return{x:n,y:s+a/2}}}function xj(e,t){return e?e.length===1||!t?e[0]:t&&e.find(r=>r.id===t)||null:null}const LH=(e,t,r,n,s,i)=>{const a=yj(r,e,t),o=yj(i,n,s);return{sourceX:a.x,sourceY:a.y,targetX:o.x,targetY:o.y}};function OH({sourcePos:e,targetPos:t,sourceWidth:r,sourceHeight:n,targetWidth:s,targetHeight:i,width:a,height:o,transform:l}){const d={x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x+r,t.x+s),y2:Math.max(e.y+n,t.y+i)};d.x===d.x2&&(d.x2+=1),d.y===d.y2&&(d.y2+=1);const u=Ll({x:(0-l[0])/l[2],y:(0-l[1])/l[2],width:a/l[2],height:o/l[2]}),f=Math.max(0,Math.min(u.x2,d.x2)-Math.max(u.x,d.x)),h=Math.max(0,Math.min(u.y2,d.y2)-Math.max(u.y,d.y));return Math.ceil(f*h)>0}function vj(e){var n,s,i,a,o;const t=((n=e==null?void 0:e[ot])==null?void 0:n.handleBounds)||null,r=t&&(e==null?void 0:e.width)&&(e==null?void 0:e.height)&&typeof((s=e==null?void 0:e.positionAbsolute)==null?void 0:s.x)<"u"&&typeof((i=e==null?void 0:e.positionAbsolute)==null?void 0:i.y)<"u";return[{x:((a=e==null?void 0:e.positionAbsolute)==null?void 0:a.x)||0,y:((o=e==null?void 0:e.positionAbsolute)==null?void 0:o.y)||0,width:(e==null?void 0:e.width)||0,height:(e==null?void 0:e.height)||0},t,!!r]}const zH=[{level:0,isMaxLevel:!0,edges:[]}];function FH(e,t,r=!1){let n=-1;const s=e.reduce((a,o)=>{var u,f;const l=Tr(o.zIndex);let d=l?o.zIndex:0;if(r){const h=t.get(o.target),p=t.get(o.source),m=o.selected||(h==null?void 0:h.selected)||(p==null?void 0:p.selected),g=Math.max(((u=p==null?void 0:p[ot])==null?void 0:u.z)||0,((f=h==null?void 0:h[ot])==null?void 0:f.z)||0,1e3);d=(l?o.zIndex:0)+(m?g:0)}return a[d]?a[d].push(o):a[d]=[o],n=d>n?d:n,a},{}),i=Object.entries(s).map(([a,o])=>{const l=+a;return{edges:o,level:l,isMaxLevel:l===n}});return i.length===0?zH:i}function $H(e,t,r){const n=Oe(k.useCallback(s=>e?s.edges.filter(i=>{const a=t.get(i.source),o=t.get(i.target);return(a==null?void 0:a.width)&&(a==null?void 0:a.height)&&(o==null?void 0:o.width)&&(o==null?void 0:o.height)&&OH({sourcePos:a.positionAbsolute||{x:0,y:0},targetPos:o.positionAbsolute||{x:0,y:0},sourceWidth:a.width,sourceHeight:a.height,targetWidth:o.width,targetHeight:o.height,width:s.width,height:s.height,transform:s.transform})}):s.edges,[e,t]));return FH(n,t,r)}const VH=({color:e="none",strokeWidth:t=1})=>B.createElement("polyline",{style:{stroke:e,strokeWidth:t},strokeLinecap:"round",strokeLinejoin:"round",fill:"none",points:"-5,-4 0,0 -5,4"}),qH=({color:e="none",strokeWidth:t=1})=>B.createElement("polyline",{style:{stroke:e,fill:e,strokeWidth:t},strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"}),bj={[Fa.Arrow]:VH,[Fa.ArrowClosed]:qH};function BH(e){const t=kt();return k.useMemo(()=>{var s,i;return Object.prototype.hasOwnProperty.call(bj,e)?bj[e]:((i=(s=t.getState()).onError)==null||i.call(s,"009",Fn.error009(e)),null)},[e])}const UH=({id:e,type:t,color:r,width:n=12.5,height:s=12.5,markerUnits:i="strokeWidth",strokeWidth:a,orient:o="auto-start-reverse"})=>{const l=BH(t);return l?B.createElement("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${n}`,markerHeight:`${s}`,viewBox:"-10 -10 20 20",markerUnits:i,orient:o,refX:"0",refY:"0"},B.createElement(l,{color:r,strokeWidth:a})):null},HH=({defaultColor:e,rfId:t})=>r=>{const n=[];return r.edges.reduce((s,i)=>([i.markerStart,i.markerEnd].forEach(a=>{if(a&&typeof a=="object"){const o=Yx(a,t);n.includes(o)||(s.push({id:o,color:a.color||e,...a}),n.push(o))}}),s),[]).sort((s,i)=>s.id.localeCompare(i.id))},v4=({defaultColor:e,rfId:t})=>{const r=Oe(k.useCallback(HH({defaultColor:e,rfId:t}),[e,t]),(n,s)=>!(n.length!==s.length||n.some((i,a)=>i.id!==s[a].id)));return B.createElement("defs",null,r.map(n=>B.createElement(UH,{id:n.id,key:n.id,type:n.type,color:n.color,width:n.width,height:n.height,markerUnits:n.markerUnits,strokeWidth:n.strokeWidth,orient:n.orient})))};v4.displayName="MarkerDefinitions";var WH=k.memo(v4);const GH=e=>({nodesConnectable:e.nodesConnectable,edgesFocusable:e.edgesFocusable,edgesUpdatable:e.edgesUpdatable,elementsSelectable:e.elementsSelectable,width:e.width,height:e.height,connectionMode:e.connectionMode,nodeInternals:e.nodeInternals,onError:e.onError}),b4=({defaultMarkerColor:e,onlyRenderVisibleElements:t,elevateEdgesOnSelect:r,rfId:n,edgeTypes:s,noPanClassName:i,onEdgeContextMenu:a,onEdgeMouseEnter:o,onEdgeMouseMove:l,onEdgeMouseLeave:d,onEdgeClick:u,onEdgeDoubleClick:f,onReconnect:h,onReconnectStart:p,onReconnectEnd:m,reconnectRadius:g,children:b,disableKeyboardA11y:x})=>{const{edgesFocusable:y,edgesUpdatable:v,elementsSelectable:w,width:_,height:N,connectionMode:j,nodeInternals:E,onError:M}=Oe(GH,Ct),C=$H(t,E,r);return _?B.createElement(B.Fragment,null,C.map(({level:D,edges:F,isMaxLevel:T})=>B.createElement("svg",{key:D,style:{zIndex:D},width:_,height:N,className:"react-flow__edges react-flow__container"},T&&B.createElement(WH,{defaultColor:e,rfId:n}),B.createElement("g",null,F.map(S=>{const[O,I,V]=vj(E.get(S.source)),[A,P,z]=vj(E.get(S.target));if(!V||!z)return null;let q=S.type||"default";s[q]||(M==null||M("011",Fn.error011(q)),q="default");const U=s[q]||s.default,K=j===Si.Strict?P.target:(P.target??[]).concat(P.source??[]),G=xj(I.source,S.sourceHandle),X=xj(K,S.targetHandle),ie=(G==null?void 0:G.position)||ae.Bottom,le=(X==null?void 0:X.position)||ae.Top,we=!!(S.focusable||y&&typeof S.focusable>"u"),_e=S.reconnectable||S.updatable,ke=typeof h<"u"&&(_e||v&&typeof _e>"u");if(!G||!X)return M==null||M("008",Fn.error008(G,S)),null;const{sourceX:lt,sourceY:ve,targetX:Be,targetY:ct}=LH(O,G,ie,A,X,le);return B.createElement(U,{key:S.id,id:S.id,className:Ot([S.className,i]),type:q,data:S.data,selected:!!S.selected,animated:!!S.animated,hidden:!!S.hidden,label:S.label,labelStyle:S.labelStyle,labelShowBg:S.labelShowBg,labelBgStyle:S.labelBgStyle,labelBgPadding:S.labelBgPadding,labelBgBorderRadius:S.labelBgBorderRadius,style:S.style,source:S.source,target:S.target,sourceHandleId:S.sourceHandle,targetHandleId:S.targetHandle,markerEnd:S.markerEnd,markerStart:S.markerStart,sourceX:lt,sourceY:ve,targetX:Be,targetY:ct,sourcePosition:ie,targetPosition:le,elementsSelectable:w,onContextMenu:a,onMouseEnter:o,onMouseMove:l,onMouseLeave:d,onClick:u,onEdgeDoubleClick:f,onReconnect:h,onReconnectStart:p,onReconnectEnd:m,reconnectRadius:g,rfId:n,ariaLabel:S.ariaLabel,isFocusable:we,isReconnectable:ke,pathOptions:"pathOptions"in S?S.pathOptions:void 0,interactionWidth:S.interactionWidth,disableKeyboardA11y:x})})))),b):null};b4.displayName="EdgeRenderer";var KH=k.memo(b4);const YH=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function XH({children:e}){const t=Oe(YH);return B.createElement("div",{className:"react-flow__viewport react-flow__container",style:{transform:t}},e)}function ZH(e){const t=a1(),r=k.useRef(!1);k.useEffect(()=>{!r.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),r.current=!0)},[e,t.viewportInitialized])}const QH={[ae.Left]:ae.Right,[ae.Right]:ae.Left,[ae.Top]:ae.Bottom,[ae.Bottom]:ae.Top},w4=({nodeId:e,handleType:t,style:r,type:n=fs.Bezier,CustomComponent:s,connectionStatus:i})=>{var N,j,E;const{fromNode:a,handleId:o,toX:l,toY:d,connectionMode:u}=Oe(k.useCallback(M=>({fromNode:M.nodeInternals.get(e),handleId:M.connectionHandleId,toX:(M.connectionPosition.x-M.transform[0])/M.transform[2],toY:(M.connectionPosition.y-M.transform[1])/M.transform[2],connectionMode:M.connectionMode}),[e]),Ct),f=(N=a==null?void 0:a[ot])==null?void 0:N.handleBounds;let h=f==null?void 0:f[t];if(u===Si.Loose&&(h=h||(f==null?void 0:f[t==="source"?"target":"source"])),!a||!h)return null;const p=o?h.find(M=>M.id===o):h[0],m=p?p.x+p.width/2:(a.width??0)/2,g=p?p.y+p.height/2:a.height??0,b=(((j=a.positionAbsolute)==null?void 0:j.x)??0)+m,x=(((E=a.positionAbsolute)==null?void 0:E.y)??0)+g,y=p==null?void 0:p.position,v=y?QH[y]:null;if(!y||!v)return null;if(s)return B.createElement(s,{connectionLineType:n,connectionLineStyle:r,fromNode:a,fromHandle:p,fromX:b,fromY:x,toX:l,toY:d,fromPosition:y,toPosition:v,connectionStatus:i});let w="";const _={sourceX:b,sourceY:x,sourcePosition:y,targetX:l,targetY:d,targetPosition:v};return n===fs.Bezier?[w]=UA(_):n===fs.Step?[w]=Kx({..._,borderRadius:0}):n===fs.SmoothStep?[w]=Kx(_):n===fs.SimpleBezier?[w]=BA(_):w=`M${b},${x} ${l},${d}`,B.createElement("path",{d:w,fill:"none",className:"react-flow__connection-path",style:r})};w4.displayName="ConnectionLine";const JH=e=>({nodeId:e.connectionNodeId,handleType:e.connectionHandleType,nodesConnectable:e.nodesConnectable,connectionStatus:e.connectionStatus,width:e.width,height:e.height});function eW({containerStyle:e,style:t,type:r,component:n}){const{nodeId:s,handleType:i,nodesConnectable:a,width:o,height:l,connectionStatus:d}=Oe(JH,Ct);return!(s&&i&&o&&a)?null:B.createElement("svg",{style:e,width:o,height:l,className:"react-flow__edges react-flow__connectionline react-flow__container"},B.createElement("g",{className:Ot(["react-flow__connection",d])},B.createElement(w4,{nodeId:s,handleType:i,style:t,type:r,CustomComponent:n,connectionStatus:d})))}function wj(e,t){return k.useRef(null),kt(),k.useMemo(()=>t(e),[e])}const k4=({nodeTypes:e,edgeTypes:t,onMove:r,onMoveStart:n,onMoveEnd:s,onInit:i,onNodeClick:a,onEdgeClick:o,onNodeDoubleClick:l,onEdgeDoubleClick:d,onNodeMouseEnter:u,onNodeMouseMove:f,onNodeMouseLeave:h,onNodeContextMenu:p,onSelectionContextMenu:m,onSelectionStart:g,onSelectionEnd:b,connectionLineType:x,connectionLineStyle:y,connectionLineComponent:v,connectionLineContainerStyle:w,selectionKeyCode:_,selectionOnDrag:N,selectionMode:j,multiSelectionKeyCode:E,panActivationKeyCode:M,zoomActivationKeyCode:C,deleteKeyCode:D,onlyRenderVisibleElements:F,elementsSelectable:T,selectNodesOnDrag:S,defaultViewport:O,translateExtent:I,minZoom:V,maxZoom:A,preventScrolling:P,defaultMarkerColor:z,zoomOnScroll:q,zoomOnPinch:U,panOnScroll:K,panOnScrollSpeed:G,panOnScrollMode:X,zoomOnDoubleClick:ie,panOnDrag:le,onPaneClick:we,onPaneMouseEnter:_e,onPaneMouseMove:ke,onPaneMouseLeave:lt,onPaneScroll:ve,onPaneContextMenu:Be,onEdgeContextMenu:ct,onEdgeMouseEnter:ce,onEdgeMouseMove:De,onEdgeMouseLeave:ne,onReconnect:te,onReconnectStart:ze,onReconnectEnd:or,reconnectRadius:yr,noDragClassName:Tt,noWheelClassName:Ze,noPanClassName:nt,elevateEdgesOnSelect:Pt,disableKeyboardA11y:xr,nodeOrigin:Xt,nodeExtent:st,rfId:xt})=>{const Or=wj(e,CH),Qe=wj(t,IH);return ZH(i),B.createElement(NH,{onPaneClick:we,onPaneMouseEnter:_e,onPaneMouseMove:ke,onPaneMouseLeave:lt,onPaneContextMenu:Be,onPaneScroll:ve,deleteKeyCode:D,selectionKeyCode:_,selectionOnDrag:N,selectionMode:j,onSelectionStart:g,onSelectionEnd:b,multiSelectionKeyCode:E,panActivationKeyCode:M,zoomActivationKeyCode:C,elementsSelectable:T,onMove:r,onMoveStart:n,onMoveEnd:s,zoomOnScroll:q,zoomOnPinch:U,zoomOnDoubleClick:ie,panOnScroll:K,panOnScrollSpeed:G,panOnScrollMode:X,panOnDrag:le,defaultViewport:O,translateExtent:I,minZoom:V,maxZoom:A,onSelectionContextMenu:m,preventScrolling:P,noDragClassName:Tt,noWheelClassName:Ze,noPanClassName:nt,disableKeyboardA11y:xr},B.createElement(XH,null,B.createElement(KH,{edgeTypes:Qe,onEdgeClick:o,onEdgeDoubleClick:d,onlyRenderVisibleElements:F,onEdgeContextMenu:ct,onEdgeMouseEnter:ce,onEdgeMouseMove:De,onEdgeMouseLeave:ne,onReconnect:te,onReconnectStart:ze,onReconnectEnd:or,reconnectRadius:yr,defaultMarkerColor:z,noPanClassName:nt,elevateEdgesOnSelect:!!Pt,disableKeyboardA11y:xr,rfId:xt},B.createElement(eW,{style:y,type:x,component:v,containerStyle:w})),B.createElement("div",{className:"react-flow__edgelabel-renderer"}),B.createElement(MH,{nodeTypes:Or,onNodeClick:a,onNodeDoubleClick:l,onNodeMouseEnter:u,onNodeMouseMove:f,onNodeMouseLeave:h,onNodeContextMenu:p,selectNodesOnDrag:S,onlyRenderVisibleElements:F,noPanClassName:nt,noDragClassName:Tt,disableKeyboardA11y:xr,nodeOrigin:Xt,nodeExtent:st,rfId:xt})))};k4.displayName="GraphView";var tW=k.memo(k4);const Jx=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],rs={rfId:"1",width:0,height:0,transform:[0,0,1],nodeInternals:new Map,edges:[],onNodesChange:null,onEdgesChange:null,hasDefaultNodes:!1,hasDefaultEdges:!1,d3Zoom:null,d3Selection:null,d3ZoomHandler:void 0,minZoom:.5,maxZoom:2,translateExtent:Jx,nodeExtent:Jx,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionNodeId:null,connectionHandleId:null,connectionHandleType:"source",connectionPosition:{x:0,y:0},connectionStatus:null,connectionMode:Si.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:[0,0],nodeDragThreshold:0,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesUpdatable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,fitViewOnInit:!1,fitViewOnInitDone:!1,fitViewOnInitOptions:void 0,onSelectionChange:[],multiSelectionActive:!1,connectionStartHandle:null,connectionEndHandle:null,connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,connectionRadius:20,onError:TU,isValidConnection:void 0},rW=()=>UV((e,t)=>({...rs,setNodes:r=>{const{nodeInternals:n,nodeOrigin:s,elevateNodesOnSelect:i}=t();e({nodeInternals:ph(r,n,s,i)})},getNodes:()=>Array.from(t().nodeInternals.values()),setEdges:r=>{const{defaultEdgeOptions:n={}}=t();e({edges:r.map(s=>({...n,...s}))})},setDefaultNodesAndEdges:(r,n)=>{const s=typeof r<"u",i=typeof n<"u",a=s?ph(r,new Map,t().nodeOrigin,t().elevateNodesOnSelect):new Map;e({nodeInternals:a,edges:i?n:[],hasDefaultNodes:s,hasDefaultEdges:i})},updateNodeDimensions:r=>{const{onNodesChange:n,nodeInternals:s,fitViewOnInit:i,fitViewOnInitDone:a,fitViewOnInitOptions:o,domNode:l,nodeOrigin:d}=t(),u=l==null?void 0:l.querySelector(".react-flow__viewport");if(!u)return;const f=window.getComputedStyle(u),{m22:h}=new window.DOMMatrixReadOnly(f.transform),p=r.reduce((g,b)=>{const x=s.get(b.id);if(x!=null&&x.hidden)s.set(x.id,{...x,[ot]:{...x[ot],handleBounds:void 0}});else if(x){const y=Qb(b.nodeElement);!!(y.width&&y.height&&(x.width!==y.width||x.height!==y.height||b.forceUpdate))&&(s.set(x.id,{...x,[ot]:{...x[ot],handleBounds:{source:pj(".source",b.nodeElement,h,d),target:pj(".target",b.nodeElement,h,d)}},...y}),g.push({id:x.id,type:"dimensions",dimensions:y}))}return g},[]);l4(s,d);const m=a||i&&!a&&c4(t,{initial:!0,...o});e({nodeInternals:new Map(s),fitViewOnInitDone:m}),(p==null?void 0:p.length)>0&&(n==null||n(p))},updateNodePositions:(r,n=!0,s=!1)=>{const{triggerNodeChanges:i}=t(),a=r.map(o=>{const l={id:o.id,type:"position",dragging:s};return n&&(l.positionAbsolute=o.positionAbsolute,l.position=o.position),l});i(a)},triggerNodeChanges:r=>{const{onNodesChange:n,nodeInternals:s,hasDefaultNodes:i,nodeOrigin:a,getNodes:o,elevateNodesOnSelect:l}=t();if(r!=null&&r.length){if(i){const d=d4(r,o()),u=ph(d,s,a,l);e({nodeInternals:u})}n==null||n(r)}},addSelectedNodes:r=>{const{multiSelectionActive:n,edges:s,getNodes:i}=t();let a,o=null;n?a=r.map(l=>cs(l,!0)):(a=ua(i(),r),o=ua(s,[])),Uc({changedNodes:a,changedEdges:o,get:t,set:e})},addSelectedEdges:r=>{const{multiSelectionActive:n,edges:s,getNodes:i}=t();let a,o=null;n?a=r.map(l=>cs(l,!0)):(a=ua(s,r),o=ua(i(),[])),Uc({changedNodes:o,changedEdges:a,get:t,set:e})},unselectNodesAndEdges:({nodes:r,edges:n}={})=>{const{edges:s,getNodes:i}=t(),a=r||i(),o=n||s,l=a.map(u=>(u.selected=!1,cs(u.id,!1))),d=o.map(u=>cs(u.id,!1));Uc({changedNodes:l,changedEdges:d,get:t,set:e})},setMinZoom:r=>{const{d3Zoom:n,maxZoom:s}=t();n==null||n.scaleExtent([r,s]),e({minZoom:r})},setMaxZoom:r=>{const{d3Zoom:n,minZoom:s}=t();n==null||n.scaleExtent([s,r]),e({maxZoom:r})},setTranslateExtent:r=>{var n;(n=t().d3Zoom)==null||n.translateExtent(r),e({translateExtent:r})},resetSelectedElements:()=>{const{edges:r,getNodes:n}=t(),i=n().filter(o=>o.selected).map(o=>cs(o.id,!1)),a=r.filter(o=>o.selected).map(o=>cs(o.id,!1));Uc({changedNodes:i,changedEdges:a,get:t,set:e})},setNodeExtent:r=>{const{nodeInternals:n}=t();n.forEach(s=>{s.positionAbsolute=Jb(s.position,r)}),e({nodeExtent:r,nodeInternals:new Map(n)})},panBy:r=>{const{transform:n,width:s,height:i,d3Zoom:a,d3Selection:o,translateExtent:l}=t();if(!a||!o||!r.x&&!r.y)return!1;const d=Pn.translate(n[0]+r.x,n[1]+r.y).scale(n[2]),u=[[0,0],[s,i]],f=a==null?void 0:a.constrain()(d,u,l);return a.transform(o,f),n[0]!==f.x||n[1]!==f.y||n[2]!==f.k},cancelConnection:()=>e({connectionNodeId:rs.connectionNodeId,connectionHandleId:rs.connectionHandleId,connectionHandleType:rs.connectionHandleType,connectionStatus:rs.connectionStatus,connectionStartHandle:rs.connectionStartHandle,connectionEndHandle:rs.connectionEndHandle}),reset:()=>e({...rs})}),Object.is),j4=({children:e})=>{const t=k.useRef(null);return t.current||(t.current=rW()),B.createElement(kU,{value:t.current},e)};j4.displayName="ReactFlowProvider";const _4=({children:e})=>k.useContext(qd)?B.createElement(B.Fragment,null,e):B.createElement(j4,null,e);_4.displayName="ReactFlowWrapper";const nW={input:t4,default:Zx,output:n4,group:i1},sW={default:od,straight:r1,step:t1,smoothstep:Bd,simplebezier:e1},iW=[0,0],aW=[15,15],oW={x:0,y:0,zoom:1},lW={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0},S4=k.forwardRef(({nodes:e,edges:t,defaultNodes:r,defaultEdges:n,className:s,nodeTypes:i=nW,edgeTypes:a=sW,onNodeClick:o,onEdgeClick:l,onInit:d,onMove:u,onMoveStart:f,onMoveEnd:h,onConnect:p,onConnectStart:m,onConnectEnd:g,onClickConnectStart:b,onClickConnectEnd:x,onNodeMouseEnter:y,onNodeMouseMove:v,onNodeMouseLeave:w,onNodeContextMenu:_,onNodeDoubleClick:N,onNodeDragStart:j,onNodeDrag:E,onNodeDragStop:M,onNodesDelete:C,onEdgesDelete:D,onSelectionChange:F,onSelectionDragStart:T,onSelectionDrag:S,onSelectionDragStop:O,onSelectionContextMenu:I,onSelectionStart:V,onSelectionEnd:A,connectionMode:P=Si.Strict,connectionLineType:z=fs.Bezier,connectionLineStyle:q,connectionLineComponent:U,connectionLineContainerStyle:K,deleteKeyCode:G="Backspace",selectionKeyCode:X="Shift",selectionOnDrag:ie=!1,selectionMode:le=Ol.Full,panActivationKeyCode:we="Space",multiSelectionKeyCode:_e=ad()?"Meta":"Control",zoomActivationKeyCode:ke=ad()?"Meta":"Control",snapToGrid:lt=!1,snapGrid:ve=aW,onlyRenderVisibleElements:Be=!1,selectNodesOnDrag:ct=!0,nodesDraggable:ce,nodesConnectable:De,nodesFocusable:ne,nodeOrigin:te=iW,edgesFocusable:ze,edgesUpdatable:or,elementsSelectable:yr,defaultViewport:Tt=oW,minZoom:Ze=.5,maxZoom:nt=2,translateExtent:Pt=Jx,preventScrolling:xr=!0,nodeExtent:Xt,defaultMarkerColor:st="#b1b1b7",zoomOnScroll:xt=!0,zoomOnPinch:Or=!0,panOnScroll:Qe=!1,panOnScrollSpeed:zt=.5,panOnScrollMode:Fe=oi.Free,zoomOnDoubleClick:jt=!0,panOnDrag:rn=!0,onPaneClick:vr,onPaneMouseEnter:br,onPaneMouseMove:Wn,onPaneMouseLeave:Gn,onPaneScroll:Kn,onPaneContextMenu:Bs,children:Di,onEdgeContextMenu:mn,onEdgeDoubleClick:oc,onEdgeMouseEnter:df,onEdgeMouseMove:lc,onEdgeMouseLeave:Ii,onEdgeUpdate:Li,onEdgeUpdateStart:ff,onEdgeUpdateEnd:hf,onReconnect:R,onReconnectStart:L,onReconnectEnd:$,reconnectRadius:H=10,edgeUpdaterRadius:Y=10,onNodesChange:oe,onEdgesChange:ue,noDragClassName:ee="nodrag",noWheelClassName:re="nowheel",noPanClassName:Z="nopan",fitView:se=!1,fitViewOptions:he,connectOnClick:je=!0,attributionPosition:vt,proOptions:Ae,defaultEdgeOptions:Ne,elevateNodesOnSelect:Ue=!0,elevateEdgesOnSelect:Yn=!1,disableKeyboardA11y:Xn=!1,autoPanOnConnect:zr=!0,autoPanOnNodeDrag:wr=!0,connectionRadius:eo=20,isValidConnection:Us,onError:gn,style:Oi,id:Hs,nodeDragThreshold:Se,...He},Zn)=>{const yn=Hs||"1";return B.createElement("div",{...He,style:{...Oi,...lW},ref:Zn,className:Ot(["react-flow",s]),"data-testid":"rf__wrapper",id:Hs},B.createElement(_4,null,B.createElement(tW,{onInit:d,onMove:u,onMoveStart:f,onMoveEnd:h,onNodeClick:o,onEdgeClick:l,onNodeMouseEnter:y,onNodeMouseMove:v,onNodeMouseLeave:w,onNodeContextMenu:_,onNodeDoubleClick:N,nodeTypes:i,edgeTypes:a,connectionLineType:z,connectionLineStyle:q,connectionLineComponent:U,connectionLineContainerStyle:K,selectionKeyCode:X,selectionOnDrag:ie,selectionMode:le,deleteKeyCode:G,multiSelectionKeyCode:_e,panActivationKeyCode:we,zoomActivationKeyCode:ke,onlyRenderVisibleElements:Be,selectNodesOnDrag:ct,defaultViewport:Tt,translateExtent:Pt,minZoom:Ze,maxZoom:nt,preventScrolling:xr,zoomOnScroll:xt,zoomOnPinch:Or,zoomOnDoubleClick:jt,panOnScroll:Qe,panOnScrollSpeed:zt,panOnScrollMode:Fe,panOnDrag:rn,onPaneClick:vr,onPaneMouseEnter:br,onPaneMouseMove:Wn,onPaneMouseLeave:Gn,onPaneScroll:Kn,onPaneContextMenu:Bs,onSelectionContextMenu:I,onSelectionStart:V,onSelectionEnd:A,onEdgeContextMenu:mn,onEdgeDoubleClick:oc,onEdgeMouseEnter:df,onEdgeMouseMove:lc,onEdgeMouseLeave:Ii,onReconnect:R??Li,onReconnectStart:L??ff,onReconnectEnd:$??hf,reconnectRadius:H??Y,defaultMarkerColor:st,noDragClassName:ee,noWheelClassName:re,noPanClassName:Z,elevateEdgesOnSelect:Yn,rfId:yn,disableKeyboardA11y:Xn,nodeOrigin:te,nodeExtent:Xt}),B.createElement(QU,{nodes:e,edges:t,defaultNodes:r,defaultEdges:n,onConnect:p,onConnectStart:m,onConnectEnd:g,onClickConnectStart:b,onClickConnectEnd:x,nodesDraggable:ce,nodesConnectable:De,nodesFocusable:ne,edgesFocusable:ze,edgesUpdatable:or,elementsSelectable:yr,elevateNodesOnSelect:Ue,minZoom:Ze,maxZoom:nt,nodeExtent:Xt,onNodesChange:oe,onEdgesChange:ue,snapToGrid:lt,snapGrid:ve,connectionMode:P,translateExtent:Pt,connectOnClick:je,defaultEdgeOptions:Ne,fitView:se,fitViewOptions:he,onNodesDelete:C,onEdgesDelete:D,onNodeDragStart:j,onNodeDrag:E,onNodeDragStop:M,onSelectionDrag:S,onSelectionDragStart:T,onSelectionDragStop:O,noPanClassName:Z,nodeOrigin:te,rfId:yn,autoPanOnConnect:zr,autoPanOnNodeDrag:wr,onError:gn,connectionRadius:eo,isValidConnection:Us,nodeDragThreshold:Se}),B.createElement(XU,{onSelectionChange:F}),Di,B.createElement(_U,{proOptions:Ae,position:vt}),B.createElement(nH,{rfId:yn,disableKeyboardA11y:Xn})))});S4.displayName="ReactFlow";function N4(e){return t=>{const[r,n]=k.useState(t),s=k.useCallback(i=>n(a=>e(i,a)),[]);return[r,n,s]}}const cW=N4(d4),uW=N4(yH),E4=({id:e,x:t,y:r,width:n,height:s,style:i,color:a,strokeColor:o,strokeWidth:l,className:d,borderRadius:u,shapeRendering:f,onClick:h,selected:p})=>{const{background:m,backgroundColor:g}=i||{},b=a||m||g;return B.createElement("rect",{className:Ot(["react-flow__minimap-node",{selected:p},d]),x:t,y:r,rx:u,ry:u,width:n,height:s,fill:b,stroke:o,strokeWidth:l,shapeRendering:f,onClick:h?x=>h(x,e):void 0})};E4.displayName="MiniMapNode";var dW=k.memo(E4);const fW=e=>e.nodeOrigin,hW=e=>e.getNodes().filter(t=>!t.hidden&&t.width&&t.height),xh=e=>e instanceof Function?e:()=>e;function pW({nodeStrokeColor:e="transparent",nodeColor:t="#e2e2e2",nodeClassName:r="",nodeBorderRadius:n=5,nodeStrokeWidth:s=2,nodeComponent:i=dW,onClick:a}){const o=Oe(hW,Ct),l=Oe(fW),d=xh(t),u=xh(e),f=xh(r),h=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return B.createElement(B.Fragment,null,o.map(p=>{const{x:m,y:g}=pi(p,l).positionAbsolute;return B.createElement(i,{key:p.id,x:m,y:g,width:p.width,height:p.height,style:p.style,selected:p.selected,className:f(p),color:d(p),borderRadius:n,strokeColor:u(p),strokeWidth:s,shapeRendering:h,onClick:a,id:p.id})}))}var mW=k.memo(pW);const gW=200,yW=150,xW=e=>{const t=e.getNodes(),r={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:r,boundingRect:t.length>0?EU(Ud(t,e.nodeOrigin),r):r,rfId:e.rfId}},vW="react-flow__minimap-desc";function C4({style:e,className:t,nodeStrokeColor:r="transparent",nodeColor:n="#e2e2e2",nodeClassName:s="",nodeBorderRadius:i=5,nodeStrokeWidth:a=2,nodeComponent:o,maskColor:l="rgb(240, 240, 240, 0.6)",maskStrokeColor:d="none",maskStrokeWidth:u=1,position:f="bottom-right",onClick:h,onNodeClick:p,pannable:m=!1,zoomable:g=!1,ariaLabel:b="React Flow mini map",inversePan:x=!1,zoomStep:y=10,offsetScale:v=5}){const w=kt(),_=k.useRef(null),{boundingRect:N,viewBB:j,rfId:E}=Oe(xW,Ct),M=(e==null?void 0:e.width)??gW,C=(e==null?void 0:e.height)??yW,D=N.width/M,F=N.height/C,T=Math.max(D,F),S=T*M,O=T*C,I=v*T,V=N.x-(S-N.width)/2-I,A=N.y-(O-N.height)/2-I,P=S+I*2,z=O+I*2,q=`${vW}-${E}`,U=k.useRef(0);U.current=T,k.useEffect(()=>{if(_.current){const X=Nr(_.current),ie=_e=>{const{transform:ke,d3Selection:lt,d3Zoom:ve}=w.getState();if(_e.sourceEvent.type!=="wheel"||!lt||!ve)return;const Be=-_e.sourceEvent.deltaY*(_e.sourceEvent.deltaMode===1?.05:_e.sourceEvent.deltaMode?1:.002)*y,ct=ke[2]*Math.pow(2,Be);ve.scaleTo(lt,ct)},le=_e=>{const{transform:ke,d3Selection:lt,d3Zoom:ve,translateExtent:Be,width:ct,height:ce}=w.getState();if(_e.sourceEvent.type!=="mousemove"||!lt||!ve)return;const De=U.current*Math.max(1,ke[2])*(x?-1:1),ne={x:ke[0]-_e.sourceEvent.movementX*De,y:ke[1]-_e.sourceEvent.movementY*De},te=[[0,0],[ct,ce]],ze=Pn.translate(ne.x,ne.y).scale(ke[2]),or=ve.constrain()(ze,te,Be);ve.transform(lt,or)},we=AA().on("zoom",m?le:null).on("zoom.wheel",g?ie:null);return X.call(we),()=>{X.on("zoom",null)}}},[m,g,x,y]);const K=h?X=>{const ie=Ur(X);h(X,{x:ie[0],y:ie[1]})}:void 0,G=p?(X,ie)=>{const le=w.getState().nodeInternals.get(ie);p(X,le)}:void 0;return B.createElement(Zb,{position:f,style:e,className:Ot(["react-flow__minimap",t]),"data-testid":"rf__minimap"},B.createElement("svg",{width:M,height:C,viewBox:`${V} ${A} ${P} ${z}`,role:"img","aria-labelledby":q,ref:_,onClick:K},b&&B.createElement("title",{id:q},b),B.createElement(mW,{onClick:G,nodeColor:n,nodeStrokeColor:r,nodeBorderRadius:i,nodeClassName:s,nodeStrokeWidth:a,nodeComponent:o}),B.createElement("path",{className:"react-flow__minimap-mask",d:`M${V-I},${A-I}h${P+I*2}v${z+I*2}h${-P-I*2}z
|
|
438
|
-
M${j.x},${j.y}h${j.width}v${j.height}h${-j.width}z`,fill:l,fillRule:"evenodd",stroke:d,strokeWidth:u,pointerEvents:"none"})))}C4.displayName="MiniMap";var bW=k.memo(C4);function wW(){return B.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},B.createElement("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"}))}function kW(){return B.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},B.createElement("path",{d:"M0 0h32v4.2H0z"}))}function jW(){return B.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},B.createElement("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"}))}function _W(){return B.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},B.createElement("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"}))}function SW(){return B.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},B.createElement("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"}))}const Ro=({children:e,className:t,...r})=>B.createElement("button",{type:"button",className:Ot(["react-flow__controls-button",t]),...r},e);Ro.displayName="ControlButton";const NW=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom}),T4=({style:e,showZoom:t=!0,showFitView:r=!0,showInteractive:n=!0,fitViewOptions:s,onZoomIn:i,onZoomOut:a,onFitView:o,onInteractiveChange:l,className:d,children:u,position:f="bottom-left"})=>{const h=kt(),[p,m]=k.useState(!1),{isInteractive:g,minZoomReached:b,maxZoomReached:x}=Oe(NW,Ct),{zoomIn:y,zoomOut:v,fitView:w}=a1();if(k.useEffect(()=>{m(!0)},[]),!p)return null;const _=()=>{y(),i==null||i()},N=()=>{v(),a==null||a()},j=()=>{w(s),o==null||o()},E=()=>{h.setState({nodesDraggable:!g,nodesConnectable:!g,elementsSelectable:!g}),l==null||l(!g)};return B.createElement(Zb,{className:Ot(["react-flow__controls",d]),position:f,style:e,"data-testid":"rf__controls"},t&&B.createElement(B.Fragment,null,B.createElement(Ro,{onClick:_,className:"react-flow__controls-zoomin",title:"zoom in","aria-label":"zoom in",disabled:x},B.createElement(wW,null)),B.createElement(Ro,{onClick:N,className:"react-flow__controls-zoomout",title:"zoom out","aria-label":"zoom out",disabled:b},B.createElement(kW,null))),r&&B.createElement(Ro,{className:"react-flow__controls-fitview",onClick:j,title:"fit view","aria-label":"fit view"},B.createElement(jW,null)),n&&B.createElement(Ro,{className:"react-flow__controls-interactive",onClick:E,title:"toggle interactivity","aria-label":"toggle interactivity"},g?B.createElement(SW,null):B.createElement(_W,null)),u)};T4.displayName="Controls";var EW=k.memo(T4),Xr;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(Xr||(Xr={}));function CW({color:e,dimensions:t,lineWidth:r}){return B.createElement("path",{stroke:e,strokeWidth:r,d:`M${t[0]/2} 0 V${t[1]} M0 ${t[1]/2} H${t[0]}`})}function TW({color:e,radius:t}){return B.createElement("circle",{cx:t,cy:t,r:t,fill:e})}const PW={[Xr.Dots]:"#91919a",[Xr.Lines]:"#eee",[Xr.Cross]:"#e2e2e2"},MW={[Xr.Dots]:1,[Xr.Lines]:1,[Xr.Cross]:6},RW=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function P4({id:e,variant:t=Xr.Dots,gap:r=20,size:n,lineWidth:s=1,offset:i=2,color:a,style:o,className:l}){const d=k.useRef(null),{transform:u,patternId:f}=Oe(RW,Ct),h=a||PW[t],p=n||MW[t],m=t===Xr.Dots,g=t===Xr.Cross,b=Array.isArray(r)?r:[r,r],x=[b[0]*u[2]||1,b[1]*u[2]||1],y=p*u[2],v=g?[y,y]:x,w=m?[y/i,y/i]:[v[0]/i,v[1]/i];return B.createElement("svg",{className:Ot(["react-flow__background",l]),style:{...o,position:"absolute",width:"100%",height:"100%",top:0,left:0},ref:d,"data-testid":"rf__background"},B.createElement("pattern",{id:f+e,x:u[0]%x[0],y:u[1]%x[1],width:x[0],height:x[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${w[0]},-${w[1]})`},m?B.createElement(TW,{color:h,radius:y/i}):B.createElement(CW,{dimensions:v,color:h,lineWidth:s})),B.createElement("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${f+e})`}))}P4.displayName="Background";var AW=k.memo(P4);function l1(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var vh,kj;function DW(){if(kj)return vh;kj=1;function e(){this.__data__=[],this.size=0}return vh=e,vh}var bh,jj;function Ya(){if(jj)return bh;jj=1;function e(t,r){return t===r||t!==t&&r!==r}return bh=e,bh}var wh,_j;function Hd(){if(_j)return wh;_j=1;var e=Ya();function t(r,n){for(var s=r.length;s--;)if(e(r[s][0],n))return s;return-1}return wh=t,wh}var kh,Sj;function IW(){if(Sj)return kh;Sj=1;var e=Hd(),t=Array.prototype,r=t.splice;function n(s){var i=this.__data__,a=e(i,s);if(a<0)return!1;var o=i.length-1;return a==o?i.pop():r.call(i,a,1),--this.size,!0}return kh=n,kh}var jh,Nj;function LW(){if(Nj)return jh;Nj=1;var e=Hd();function t(r){var n=this.__data__,s=e(n,r);return s<0?void 0:n[s][1]}return jh=t,jh}var _h,Ej;function OW(){if(Ej)return _h;Ej=1;var e=Hd();function t(r){return e(this.__data__,r)>-1}return _h=t,_h}var Sh,Cj;function zW(){if(Cj)return Sh;Cj=1;var e=Hd();function t(r,n){var s=this.__data__,i=e(s,r);return i<0?(++this.size,s.push([r,n])):s[i][1]=n,this}return Sh=t,Sh}var Nh,Tj;function Wd(){if(Tj)return Nh;Tj=1;var e=DW(),t=IW(),r=LW(),n=OW(),s=zW();function i(a){var o=-1,l=a==null?0:a.length;for(this.clear();++o<l;){var d=a[o];this.set(d[0],d[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=r,i.prototype.has=n,i.prototype.set=s,Nh=i,Nh}var Eh,Pj;function FW(){if(Pj)return Eh;Pj=1;var e=Wd();function t(){this.__data__=new e,this.size=0}return Eh=t,Eh}var Ch,Mj;function $W(){if(Mj)return Ch;Mj=1;function e(t){var r=this.__data__,n=r.delete(t);return this.size=r.size,n}return Ch=e,Ch}var Th,Rj;function VW(){if(Rj)return Th;Rj=1;function e(t){return this.__data__.get(t)}return Th=e,Th}var Ph,Aj;function qW(){if(Aj)return Ph;Aj=1;function e(t){return this.__data__.has(t)}return Ph=e,Ph}var Mh,Dj;function M4(){if(Dj)return Mh;Dj=1;var e=typeof cc=="object"&&cc&&cc.Object===Object&&cc;return Mh=e,Mh}var Rh,Ij;function en(){if(Ij)return Rh;Ij=1;var e=M4(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return Rh=r,Rh}var Ah,Lj;function Xa(){if(Lj)return Ah;Lj=1;var e=en(),t=e.Symbol;return Ah=t,Ah}var Dh,Oj;function BW(){if(Oj)return Dh;Oj=1;var e=Xa(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,s=e?e.toStringTag:void 0;function i(a){var o=r.call(a,s),l=a[s];try{a[s]=void 0;var d=!0}catch{}var u=n.call(a);return d&&(o?a[s]=l:delete a[s]),u}return Dh=i,Dh}var Ih,zj;function UW(){if(zj)return Ih;zj=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return Ih=r,Ih}var Lh,Fj;function Ti(){if(Fj)return Lh;Fj=1;var e=Xa(),t=BW(),r=UW(),n="[object Null]",s="[object Undefined]",i=e?e.toStringTag:void 0;function a(o){return o==null?o===void 0?s:n:i&&i in Object(o)?t(o):r(o)}return Lh=a,Lh}var Oh,$j;function Ir(){if($j)return Oh;$j=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return Oh=e,Oh}var zh,Vj;function rc(){if(Vj)return zh;Vj=1;var e=Ti(),t=Ir(),r="[object AsyncFunction]",n="[object Function]",s="[object GeneratorFunction]",i="[object Proxy]";function a(o){if(!t(o))return!1;var l=e(o);return l==n||l==s||l==r||l==i}return zh=a,zh}var Fh,qj;function HW(){if(qj)return Fh;qj=1;var e=en(),t=e["__core-js_shared__"];return Fh=t,Fh}var $h,Bj;function WW(){if(Bj)return $h;Bj=1;var e=HW(),t=function(){var n=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}();function r(n){return!!t&&t in n}return $h=r,$h}var Vh,Uj;function R4(){if(Uj)return Vh;Uj=1;var e=Function.prototype,t=e.toString;function r(n){if(n!=null){try{return t.call(n)}catch{}try{return n+""}catch{}}return""}return Vh=r,Vh}var qh,Hj;function GW(){if(Hj)return qh;Hj=1;var e=rc(),t=WW(),r=Ir(),n=R4(),s=/[\\^$.*+?()[\]{}|]/g,i=/^\[object .+?Constructor\]$/,a=Function.prototype,o=Object.prototype,l=a.toString,d=o.hasOwnProperty,u=RegExp("^"+l.call(d).replace(s,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function f(h){if(!r(h)||t(h))return!1;var p=e(h)?u:i;return p.test(n(h))}return qh=f,qh}var Bh,Wj;function KW(){if(Wj)return Bh;Wj=1;function e(t,r){return t==null?void 0:t[r]}return Bh=e,Bh}var Uh,Gj;function Pi(){if(Gj)return Uh;Gj=1;var e=GW(),t=KW();function r(n,s){var i=t(n,s);return e(i)?i:void 0}return Uh=r,Uh}var Hh,Kj;function c1(){if(Kj)return Hh;Kj=1;var e=Pi(),t=en(),r=e(t,"Map");return Hh=r,Hh}var Wh,Yj;function Gd(){if(Yj)return Wh;Yj=1;var e=Pi(),t=e(Object,"create");return Wh=t,Wh}var Gh,Xj;function YW(){if(Xj)return Gh;Xj=1;var e=Gd();function t(){this.__data__=e?e(null):{},this.size=0}return Gh=t,Gh}var Kh,Zj;function XW(){if(Zj)return Kh;Zj=1;function e(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}return Kh=e,Kh}var Yh,Qj;function ZW(){if(Qj)return Yh;Qj=1;var e=Gd(),t="__lodash_hash_undefined__",r=Object.prototype,n=r.hasOwnProperty;function s(i){var a=this.__data__;if(e){var o=a[i];return o===t?void 0:o}return n.call(a,i)?a[i]:void 0}return Yh=s,Yh}var Xh,Jj;function QW(){if(Jj)return Xh;Jj=1;var e=Gd(),t=Object.prototype,r=t.hasOwnProperty;function n(s){var i=this.__data__;return e?i[s]!==void 0:r.call(i,s)}return Xh=n,Xh}var Zh,e_;function JW(){if(e_)return Zh;e_=1;var e=Gd(),t="__lodash_hash_undefined__";function r(n,s){var i=this.__data__;return this.size+=this.has(n)?0:1,i[n]=e&&s===void 0?t:s,this}return Zh=r,Zh}var Qh,t_;function eG(){if(t_)return Qh;t_=1;var e=YW(),t=XW(),r=ZW(),n=QW(),s=JW();function i(a){var o=-1,l=a==null?0:a.length;for(this.clear();++o<l;){var d=a[o];this.set(d[0],d[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=r,i.prototype.has=n,i.prototype.set=s,Qh=i,Qh}var Jh,r_;function tG(){if(r_)return Jh;r_=1;var e=eG(),t=Wd(),r=c1();function n(){this.size=0,this.__data__={hash:new e,map:new(r||t),string:new e}}return Jh=n,Jh}var ep,n_;function rG(){if(n_)return ep;n_=1;function e(t){var r=typeof t;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?t!=="__proto__":t===null}return ep=e,ep}var tp,s_;function Kd(){if(s_)return tp;s_=1;var e=rG();function t(r,n){var s=r.__data__;return e(n)?s[typeof n=="string"?"string":"hash"]:s.map}return tp=t,tp}var rp,i_;function nG(){if(i_)return rp;i_=1;var e=Kd();function t(r){var n=e(this,r).delete(r);return this.size-=n?1:0,n}return rp=t,rp}var np,a_;function sG(){if(a_)return np;a_=1;var e=Kd();function t(r){return e(this,r).get(r)}return np=t,np}var sp,o_;function iG(){if(o_)return sp;o_=1;var e=Kd();function t(r){return e(this,r).has(r)}return sp=t,sp}var ip,l_;function aG(){if(l_)return ip;l_=1;var e=Kd();function t(r,n){var s=e(this,r),i=s.size;return s.set(r,n),this.size+=s.size==i?0:1,this}return ip=t,ip}var ap,c_;function u1(){if(c_)return ap;c_=1;var e=tG(),t=nG(),r=sG(),n=iG(),s=aG();function i(a){var o=-1,l=a==null?0:a.length;for(this.clear();++o<l;){var d=a[o];this.set(d[0],d[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=r,i.prototype.has=n,i.prototype.set=s,ap=i,ap}var op,u_;function oG(){if(u_)return op;u_=1;var e=Wd(),t=c1(),r=u1(),n=200;function s(i,a){var o=this.__data__;if(o instanceof e){var l=o.__data__;if(!t||l.length<n-1)return l.push([i,a]),this.size=++o.size,this;o=this.__data__=new r(l)}return o.set(i,a),this.size=o.size,this}return op=s,op}var lp,d_;function Yd(){if(d_)return lp;d_=1;var e=Wd(),t=FW(),r=$W(),n=VW(),s=qW(),i=oG();function a(o){var l=this.__data__=new e(o);this.size=l.size}return a.prototype.clear=t,a.prototype.delete=r,a.prototype.get=n,a.prototype.has=s,a.prototype.set=i,lp=a,lp}var cp,f_;function d1(){if(f_)return cp;f_=1;function e(t,r){for(var n=-1,s=t==null?0:t.length;++n<s&&r(t[n],n,t)!==!1;);return t}return cp=e,cp}var up,h_;function A4(){if(h_)return up;h_=1;var e=Pi(),t=function(){try{var r=e(Object,"defineProperty");return r({},"",{}),r}catch{}}();return up=t,up}var dp,p_;function Xd(){if(p_)return dp;p_=1;var e=A4();function t(r,n,s){n=="__proto__"&&e?e(r,n,{configurable:!0,enumerable:!0,value:s,writable:!0}):r[n]=s}return dp=t,dp}var fp,m_;function Zd(){if(m_)return fp;m_=1;var e=Xd(),t=Ya(),r=Object.prototype,n=r.hasOwnProperty;function s(i,a,o){var l=i[a];(!(n.call(i,a)&&t(l,o))||o===void 0&&!(a in i))&&e(i,a,o)}return fp=s,fp}var hp,g_;function nc(){if(g_)return hp;g_=1;var e=Zd(),t=Xd();function r(n,s,i,a){var o=!i;i||(i={});for(var l=-1,d=s.length;++l<d;){var u=s[l],f=a?a(i[u],n[u],u,i,n):void 0;f===void 0&&(f=n[u]),o?t(i,u,f):e(i,u,f)}return i}return hp=r,hp}var pp,y_;function lG(){if(y_)return pp;y_=1;function e(t,r){for(var n=-1,s=Array(t);++n<t;)s[n]=r(n);return s}return pp=e,pp}var mp,x_;function pn(){if(x_)return mp;x_=1;function e(t){return t!=null&&typeof t=="object"}return mp=e,mp}var gp,v_;function cG(){if(v_)return gp;v_=1;var e=Ti(),t=pn(),r="[object Arguments]";function n(s){return t(s)&&e(s)==r}return gp=n,gp}var yp,b_;function sc(){if(b_)return yp;b_=1;var e=cG(),t=pn(),r=Object.prototype,n=r.hasOwnProperty,s=r.propertyIsEnumerable,i=e(function(){return arguments}())?e:function(a){return t(a)&&n.call(a,"callee")&&!s.call(a,"callee")};return yp=i,yp}var xp,w_;function yt(){if(w_)return xp;w_=1;var e=Array.isArray;return xp=e,xp}var Ao={exports:{}},vp,k_;function uG(){if(k_)return vp;k_=1;function e(){return!1}return vp=e,vp}Ao.exports;var j_;function Za(){return j_||(j_=1,function(e,t){var r=en(),n=uG(),s=t&&!t.nodeType&&t,i=s&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===s,o=a?r.Buffer:void 0,l=o?o.isBuffer:void 0,d=l||n;e.exports=d}(Ao,Ao.exports)),Ao.exports}var bp,__;function Qd(){if(__)return bp;__=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function r(n,s){var i=typeof n;return s=s??e,!!s&&(i=="number"||i!="symbol"&&t.test(n))&&n>-1&&n%1==0&&n<s}return bp=r,bp}var wp,S_;function f1(){if(S_)return wp;S_=1;var e=9007199254740991;function t(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=e}return wp=t,wp}var kp,N_;function dG(){if(N_)return kp;N_=1;var e=Ti(),t=f1(),r=pn(),n="[object Arguments]",s="[object Array]",i="[object Boolean]",a="[object Date]",o="[object Error]",l="[object Function]",d="[object Map]",u="[object Number]",f="[object Object]",h="[object RegExp]",p="[object Set]",m="[object String]",g="[object WeakMap]",b="[object ArrayBuffer]",x="[object DataView]",y="[object Float32Array]",v="[object Float64Array]",w="[object Int8Array]",_="[object Int16Array]",N="[object Int32Array]",j="[object Uint8Array]",E="[object Uint8ClampedArray]",M="[object Uint16Array]",C="[object Uint32Array]",D={};D[y]=D[v]=D[w]=D[_]=D[N]=D[j]=D[E]=D[M]=D[C]=!0,D[n]=D[s]=D[b]=D[i]=D[x]=D[a]=D[o]=D[l]=D[d]=D[u]=D[f]=D[h]=D[p]=D[m]=D[g]=!1;function F(T){return r(T)&&t(T.length)&&!!D[e(T)]}return kp=F,kp}var jp,E_;function Jd(){if(E_)return jp;E_=1;function e(t){return function(r){return t(r)}}return jp=e,jp}var Do={exports:{}};Do.exports;var C_;function h1(){return C_||(C_=1,function(e,t){var r=M4(),n=t&&!t.nodeType&&t,s=n&&!0&&e&&!e.nodeType&&e,i=s&&s.exports===n,a=i&&r.process,o=function(){try{var l=s&&s.require&&s.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();e.exports=o}(Do,Do.exports)),Do.exports}var _p,T_;function ic(){if(T_)return _p;T_=1;var e=dG(),t=Jd(),r=h1(),n=r&&r.isTypedArray,s=n?t(n):e;return _p=s,_p}var Sp,P_;function D4(){if(P_)return Sp;P_=1;var e=lG(),t=sc(),r=yt(),n=Za(),s=Qd(),i=ic(),a=Object.prototype,o=a.hasOwnProperty;function l(d,u){var f=r(d),h=!f&&t(d),p=!f&&!h&&n(d),m=!f&&!h&&!p&&i(d),g=f||h||p||m,b=g?e(d.length,String):[],x=b.length;for(var y in d)(u||o.call(d,y))&&!(g&&(y=="length"||p&&(y=="offset"||y=="parent")||m&&(y=="buffer"||y=="byteLength"||y=="byteOffset")||s(y,x)))&&b.push(y);return b}return Sp=l,Sp}var Np,M_;function ef(){if(M_)return Np;M_=1;var e=Object.prototype;function t(r){var n=r&&r.constructor,s=typeof n=="function"&&n.prototype||e;return r===s}return Np=t,Np}var Ep,R_;function I4(){if(R_)return Ep;R_=1;function e(t,r){return function(n){return t(r(n))}}return Ep=e,Ep}var Cp,A_;function fG(){if(A_)return Cp;A_=1;var e=I4(),t=e(Object.keys,Object);return Cp=t,Cp}var Tp,D_;function p1(){if(D_)return Tp;D_=1;var e=ef(),t=fG(),r=Object.prototype,n=r.hasOwnProperty;function s(i){if(!e(i))return t(i);var a=[];for(var o in Object(i))n.call(i,o)&&o!="constructor"&&a.push(o);return a}return Tp=s,Tp}var Pp,I_;function Un(){if(I_)return Pp;I_=1;var e=rc(),t=f1();function r(n){return n!=null&&t(n.length)&&!e(n)}return Pp=r,Pp}var Mp,L_;function qs(){if(L_)return Mp;L_=1;var e=D4(),t=p1(),r=Un();function n(s){return r(s)?e(s):t(s)}return Mp=n,Mp}var Rp,O_;function hG(){if(O_)return Rp;O_=1;var e=nc(),t=qs();function r(n,s){return n&&e(s,t(s),n)}return Rp=r,Rp}var Ap,z_;function pG(){if(z_)return Ap;z_=1;function e(t){var r=[];if(t!=null)for(var n in Object(t))r.push(n);return r}return Ap=e,Ap}var Dp,F_;function mG(){if(F_)return Dp;F_=1;var e=Ir(),t=ef(),r=pG(),n=Object.prototype,s=n.hasOwnProperty;function i(a){if(!e(a))return r(a);var o=t(a),l=[];for(var d in a)d=="constructor"&&(o||!s.call(a,d))||l.push(d);return l}return Dp=i,Dp}var Ip,$_;function Mi(){if($_)return Ip;$_=1;var e=D4(),t=mG(),r=Un();function n(s){return r(s)?e(s,!0):t(s)}return Ip=n,Ip}var Lp,V_;function gG(){if(V_)return Lp;V_=1;var e=nc(),t=Mi();function r(n,s){return n&&e(s,t(s),n)}return Lp=r,Lp}var Io={exports:{}};Io.exports;var q_;function L4(){return q_||(q_=1,function(e,t){var r=en(),n=t&&!t.nodeType&&t,s=n&&!0&&e&&!e.nodeType&&e,i=s&&s.exports===n,a=i?r.Buffer:void 0,o=a?a.allocUnsafe:void 0;function l(d,u){if(u)return d.slice();var f=d.length,h=o?o(f):new d.constructor(f);return d.copy(h),h}e.exports=l}(Io,Io.exports)),Io.exports}var Op,B_;function O4(){if(B_)return Op;B_=1;function e(t,r){var n=-1,s=t.length;for(r||(r=Array(s));++n<s;)r[n]=t[n];return r}return Op=e,Op}var zp,U_;function z4(){if(U_)return zp;U_=1;function e(t,r){for(var n=-1,s=t==null?0:t.length,i=0,a=[];++n<s;){var o=t[n];r(o,n,t)&&(a[i++]=o)}return a}return zp=e,zp}var Fp,H_;function F4(){if(H_)return Fp;H_=1;function e(){return[]}return Fp=e,Fp}var $p,W_;function m1(){if(W_)return $p;W_=1;var e=z4(),t=F4(),r=Object.prototype,n=r.propertyIsEnumerable,s=Object.getOwnPropertySymbols,i=s?function(a){return a==null?[]:(a=Object(a),e(s(a),function(o){return n.call(a,o)}))}:t;return $p=i,$p}var Vp,G_;function yG(){if(G_)return Vp;G_=1;var e=nc(),t=m1();function r(n,s){return e(n,t(n),s)}return Vp=r,Vp}var qp,K_;function g1(){if(K_)return qp;K_=1;function e(t,r){for(var n=-1,s=r.length,i=t.length;++n<s;)t[i+n]=r[n];return t}return qp=e,qp}var Bp,Y_;function tf(){if(Y_)return Bp;Y_=1;var e=I4(),t=e(Object.getPrototypeOf,Object);return Bp=t,Bp}var Up,X_;function $4(){if(X_)return Up;X_=1;var e=g1(),t=tf(),r=m1(),n=F4(),s=Object.getOwnPropertySymbols,i=s?function(a){for(var o=[];a;)e(o,r(a)),a=t(a);return o}:n;return Up=i,Up}var Hp,Z_;function xG(){if(Z_)return Hp;Z_=1;var e=nc(),t=$4();function r(n,s){return e(n,t(n),s)}return Hp=r,Hp}var Wp,Q_;function V4(){if(Q_)return Wp;Q_=1;var e=g1(),t=yt();function r(n,s,i){var a=s(n);return t(n)?a:e(a,i(n))}return Wp=r,Wp}var Gp,J_;function q4(){if(J_)return Gp;J_=1;var e=V4(),t=m1(),r=qs();function n(s){return e(s,r,t)}return Gp=n,Gp}var Kp,eS;function vG(){if(eS)return Kp;eS=1;var e=V4(),t=$4(),r=Mi();function n(s){return e(s,r,t)}return Kp=n,Kp}var Yp,tS;function bG(){if(tS)return Yp;tS=1;var e=Pi(),t=en(),r=e(t,"DataView");return Yp=r,Yp}var Xp,rS;function wG(){if(rS)return Xp;rS=1;var e=Pi(),t=en(),r=e(t,"Promise");return Xp=r,Xp}var Zp,nS;function B4(){if(nS)return Zp;nS=1;var e=Pi(),t=en(),r=e(t,"Set");return Zp=r,Zp}var Qp,sS;function kG(){if(sS)return Qp;sS=1;var e=Pi(),t=en(),r=e(t,"WeakMap");return Qp=r,Qp}var Jp,iS;function Qa(){if(iS)return Jp;iS=1;var e=bG(),t=c1(),r=wG(),n=B4(),s=kG(),i=Ti(),a=R4(),o="[object Map]",l="[object Object]",d="[object Promise]",u="[object Set]",f="[object WeakMap]",h="[object DataView]",p=a(e),m=a(t),g=a(r),b=a(n),x=a(s),y=i;return(e&&y(new e(new ArrayBuffer(1)))!=h||t&&y(new t)!=o||r&&y(r.resolve())!=d||n&&y(new n)!=u||s&&y(new s)!=f)&&(y=function(v){var w=i(v),_=w==l?v.constructor:void 0,N=_?a(_):"";if(N)switch(N){case p:return h;case m:return o;case g:return d;case b:return u;case x:return f}return w}),Jp=y,Jp}var em,aS;function jG(){if(aS)return em;aS=1;var e=Object.prototype,t=e.hasOwnProperty;function r(n){var s=n.length,i=new n.constructor(s);return s&&typeof n[0]=="string"&&t.call(n,"index")&&(i.index=n.index,i.input=n.input),i}return em=r,em}var tm,oS;function U4(){if(oS)return tm;oS=1;var e=en(),t=e.Uint8Array;return tm=t,tm}var rm,lS;function y1(){if(lS)return rm;lS=1;var e=U4();function t(r){var n=new r.constructor(r.byteLength);return new e(n).set(new e(r)),n}return rm=t,rm}var nm,cS;function _G(){if(cS)return nm;cS=1;var e=y1();function t(r,n){var s=n?e(r.buffer):r.buffer;return new r.constructor(s,r.byteOffset,r.byteLength)}return nm=t,nm}var sm,uS;function SG(){if(uS)return sm;uS=1;var e=/\w*$/;function t(r){var n=new r.constructor(r.source,e.exec(r));return n.lastIndex=r.lastIndex,n}return sm=t,sm}var im,dS;function NG(){if(dS)return im;dS=1;var e=Xa(),t=e?e.prototype:void 0,r=t?t.valueOf:void 0;function n(s){return r?Object(r.call(s)):{}}return im=n,im}var am,fS;function H4(){if(fS)return am;fS=1;var e=y1();function t(r,n){var s=n?e(r.buffer):r.buffer;return new r.constructor(s,r.byteOffset,r.length)}return am=t,am}var om,hS;function EG(){if(hS)return om;hS=1;var e=y1(),t=_G(),r=SG(),n=NG(),s=H4(),i="[object Boolean]",a="[object Date]",o="[object Map]",l="[object Number]",d="[object RegExp]",u="[object Set]",f="[object String]",h="[object Symbol]",p="[object ArrayBuffer]",m="[object DataView]",g="[object Float32Array]",b="[object Float64Array]",x="[object Int8Array]",y="[object Int16Array]",v="[object Int32Array]",w="[object Uint8Array]",_="[object Uint8ClampedArray]",N="[object Uint16Array]",j="[object Uint32Array]";function E(M,C,D){var F=M.constructor;switch(C){case p:return e(M);case i:case a:return new F(+M);case m:return t(M,D);case g:case b:case x:case y:case v:case w:case _:case N:case j:return s(M,D);case o:return new F;case l:case f:return new F(M);case d:return r(M);case u:return new F;case h:return n(M)}}return om=E,om}var lm,pS;function W4(){if(pS)return lm;pS=1;var e=Ir(),t=Object.create,r=function(){function n(){}return function(s){if(!e(s))return{};if(t)return t(s);n.prototype=s;var i=new n;return n.prototype=void 0,i}}();return lm=r,lm}var cm,mS;function G4(){if(mS)return cm;mS=1;var e=W4(),t=tf(),r=ef();function n(s){return typeof s.constructor=="function"&&!r(s)?e(t(s)):{}}return cm=n,cm}var um,gS;function CG(){if(gS)return um;gS=1;var e=Qa(),t=pn(),r="[object Map]";function n(s){return t(s)&&e(s)==r}return um=n,um}var dm,yS;function TG(){if(yS)return dm;yS=1;var e=CG(),t=Jd(),r=h1(),n=r&&r.isMap,s=n?t(n):e;return dm=s,dm}var fm,xS;function PG(){if(xS)return fm;xS=1;var e=Qa(),t=pn(),r="[object Set]";function n(s){return t(s)&&e(s)==r}return fm=n,fm}var hm,vS;function MG(){if(vS)return hm;vS=1;var e=PG(),t=Jd(),r=h1(),n=r&&r.isSet,s=n?t(n):e;return hm=s,hm}var pm,bS;function K4(){if(bS)return pm;bS=1;var e=Yd(),t=d1(),r=Zd(),n=hG(),s=gG(),i=L4(),a=O4(),o=yG(),l=xG(),d=q4(),u=vG(),f=Qa(),h=jG(),p=EG(),m=G4(),g=yt(),b=Za(),x=TG(),y=Ir(),v=MG(),w=qs(),_=Mi(),N=1,j=2,E=4,M="[object Arguments]",C="[object Array]",D="[object Boolean]",F="[object Date]",T="[object Error]",S="[object Function]",O="[object GeneratorFunction]",I="[object Map]",V="[object Number]",A="[object Object]",P="[object RegExp]",z="[object Set]",q="[object String]",U="[object Symbol]",K="[object WeakMap]",G="[object ArrayBuffer]",X="[object DataView]",ie="[object Float32Array]",le="[object Float64Array]",we="[object Int8Array]",_e="[object Int16Array]",ke="[object Int32Array]",lt="[object Uint8Array]",ve="[object Uint8ClampedArray]",Be="[object Uint16Array]",ct="[object Uint32Array]",ce={};ce[M]=ce[C]=ce[G]=ce[X]=ce[D]=ce[F]=ce[ie]=ce[le]=ce[we]=ce[_e]=ce[ke]=ce[I]=ce[V]=ce[A]=ce[P]=ce[z]=ce[q]=ce[U]=ce[lt]=ce[ve]=ce[Be]=ce[ct]=!0,ce[T]=ce[S]=ce[K]=!1;function De(ne,te,ze,or,yr,Tt){var Ze,nt=te&N,Pt=te&j,xr=te&E;if(ze&&(Ze=yr?ze(ne,or,yr,Tt):ze(ne)),Ze!==void 0)return Ze;if(!y(ne))return ne;var Xt=g(ne);if(Xt){if(Ze=h(ne),!nt)return a(ne,Ze)}else{var st=f(ne),xt=st==S||st==O;if(b(ne))return i(ne,nt);if(st==A||st==M||xt&&!yr){if(Ze=Pt||xt?{}:m(ne),!nt)return Pt?l(ne,s(Ze,ne)):o(ne,n(Ze,ne))}else{if(!ce[st])return yr?ne:{};Ze=p(ne,st,nt)}}Tt||(Tt=new e);var Or=Tt.get(ne);if(Or)return Or;Tt.set(ne,Ze),v(ne)?ne.forEach(function(Fe){Ze.add(De(Fe,te,ze,Fe,ne,Tt))}):x(ne)&&ne.forEach(function(Fe,jt){Ze.set(jt,De(Fe,te,ze,jt,ne,Tt))});var Qe=xr?Pt?u:d:Pt?_:w,zt=Xt?void 0:Qe(ne);return t(zt||ne,function(Fe,jt){zt&&(jt=Fe,Fe=ne[jt]),r(Ze,jt,De(Fe,te,ze,jt,ne,Tt))}),Ze}return pm=De,pm}var mm,wS;function RG(){if(wS)return mm;wS=1;var e=K4(),t=4;function r(n){return e(n,t)}return mm=r,mm}var gm,kS;function x1(){if(kS)return gm;kS=1;function e(t){return function(){return t}}return gm=e,gm}var ym,jS;function AG(){if(jS)return ym;jS=1;function e(t){return function(r,n,s){for(var i=-1,a=Object(r),o=s(r),l=o.length;l--;){var d=o[t?l:++i];if(n(a[d],d,a)===!1)break}return r}}return ym=e,ym}var xm,_S;function v1(){if(_S)return xm;_S=1;var e=AG(),t=e();return xm=t,xm}var vm,SS;function b1(){if(SS)return vm;SS=1;var e=v1(),t=qs();function r(n,s){return n&&e(n,s,t)}return vm=r,vm}var bm,NS;function DG(){if(NS)return bm;NS=1;var e=Un();function t(r,n){return function(s,i){if(s==null)return s;if(!e(s))return r(s,i);for(var a=s.length,o=n?a:-1,l=Object(s);(n?o--:++o<a)&&i(l[o],o,l)!==!1;);return s}}return bm=t,bm}var wm,ES;function rf(){if(ES)return wm;ES=1;var e=b1(),t=DG(),r=t(e);return wm=r,wm}var km,CS;function Ri(){if(CS)return km;CS=1;function e(t){return t}return km=e,km}var jm,TS;function Y4(){if(TS)return jm;TS=1;var e=Ri();function t(r){return typeof r=="function"?r:e}return jm=t,jm}var _m,PS;function X4(){if(PS)return _m;PS=1;var e=d1(),t=rf(),r=Y4(),n=yt();function s(i,a){var o=n(i)?e:t;return o(i,r(a))}return _m=s,_m}var Sm,MS;function Z4(){return MS||(MS=1,Sm=X4()),Sm}var Nm,RS;function IG(){if(RS)return Nm;RS=1;var e=rf();function t(r,n){var s=[];return e(r,function(i,a,o){n(i,a,o)&&s.push(i)}),s}return Nm=t,Nm}var Em,AS;function LG(){if(AS)return Em;AS=1;var e="__lodash_hash_undefined__";function t(r){return this.__data__.set(r,e),this}return Em=t,Em}var Cm,DS;function OG(){if(DS)return Cm;DS=1;function e(t){return this.__data__.has(t)}return Cm=e,Cm}var Tm,IS;function Q4(){if(IS)return Tm;IS=1;var e=u1(),t=LG(),r=OG();function n(s){var i=-1,a=s==null?0:s.length;for(this.__data__=new e;++i<a;)this.add(s[i])}return n.prototype.add=n.prototype.push=t,n.prototype.has=r,Tm=n,Tm}var Pm,LS;function zG(){if(LS)return Pm;LS=1;function e(t,r){for(var n=-1,s=t==null?0:t.length;++n<s;)if(r(t[n],n,t))return!0;return!1}return Pm=e,Pm}var Mm,OS;function J4(){if(OS)return Mm;OS=1;function e(t,r){return t.has(r)}return Mm=e,Mm}var Rm,zS;function e3(){if(zS)return Rm;zS=1;var e=Q4(),t=zG(),r=J4(),n=1,s=2;function i(a,o,l,d,u,f){var h=l&n,p=a.length,m=o.length;if(p!=m&&!(h&&m>p))return!1;var g=f.get(a),b=f.get(o);if(g&&b)return g==o&&b==a;var x=-1,y=!0,v=l&s?new e:void 0;for(f.set(a,o),f.set(o,a);++x<p;){var w=a[x],_=o[x];if(d)var N=h?d(_,w,x,o,a,f):d(w,_,x,a,o,f);if(N!==void 0){if(N)continue;y=!1;break}if(v){if(!t(o,function(j,E){if(!r(v,E)&&(w===j||u(w,j,l,d,f)))return v.push(E)})){y=!1;break}}else if(!(w===_||u(w,_,l,d,f))){y=!1;break}}return f.delete(a),f.delete(o),y}return Rm=i,Rm}var Am,FS;function FG(){if(FS)return Am;FS=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(s,i){n[++r]=[i,s]}),n}return Am=e,Am}var Dm,$S;function w1(){if($S)return Dm;$S=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(s){n[++r]=s}),n}return Dm=e,Dm}var Im,VS;function $G(){if(VS)return Im;VS=1;var e=Xa(),t=U4(),r=Ya(),n=e3(),s=FG(),i=w1(),a=1,o=2,l="[object Boolean]",d="[object Date]",u="[object Error]",f="[object Map]",h="[object Number]",p="[object RegExp]",m="[object Set]",g="[object String]",b="[object Symbol]",x="[object ArrayBuffer]",y="[object DataView]",v=e?e.prototype:void 0,w=v?v.valueOf:void 0;function _(N,j,E,M,C,D,F){switch(E){case y:if(N.byteLength!=j.byteLength||N.byteOffset!=j.byteOffset)return!1;N=N.buffer,j=j.buffer;case x:return!(N.byteLength!=j.byteLength||!D(new t(N),new t(j)));case l:case d:case h:return r(+N,+j);case u:return N.name==j.name&&N.message==j.message;case p:case g:return N==j+"";case f:var T=s;case m:var S=M&a;if(T||(T=i),N.size!=j.size&&!S)return!1;var O=F.get(N);if(O)return O==j;M|=o,F.set(N,j);var I=n(T(N),T(j),M,C,D,F);return F.delete(N),I;case b:if(w)return w.call(N)==w.call(j)}return!1}return Im=_,Im}var Lm,qS;function VG(){if(qS)return Lm;qS=1;var e=q4(),t=1,r=Object.prototype,n=r.hasOwnProperty;function s(i,a,o,l,d,u){var f=o&t,h=e(i),p=h.length,m=e(a),g=m.length;if(p!=g&&!f)return!1;for(var b=p;b--;){var x=h[b];if(!(f?x in a:n.call(a,x)))return!1}var y=u.get(i),v=u.get(a);if(y&&v)return y==a&&v==i;var w=!0;u.set(i,a),u.set(a,i);for(var _=f;++b<p;){x=h[b];var N=i[x],j=a[x];if(l)var E=f?l(j,N,x,a,i,u):l(N,j,x,i,a,u);if(!(E===void 0?N===j||d(N,j,o,l,u):E)){w=!1;break}_||(_=x=="constructor")}if(w&&!_){var M=i.constructor,C=a.constructor;M!=C&&"constructor"in i&&"constructor"in a&&!(typeof M=="function"&&M instanceof M&&typeof C=="function"&&C instanceof C)&&(w=!1)}return u.delete(i),u.delete(a),w}return Lm=s,Lm}var Om,BS;function qG(){if(BS)return Om;BS=1;var e=Yd(),t=e3(),r=$G(),n=VG(),s=Qa(),i=yt(),a=Za(),o=ic(),l=1,d="[object Arguments]",u="[object Array]",f="[object Object]",h=Object.prototype,p=h.hasOwnProperty;function m(g,b,x,y,v,w){var _=i(g),N=i(b),j=_?u:s(g),E=N?u:s(b);j=j==d?f:j,E=E==d?f:E;var M=j==f,C=E==f,D=j==E;if(D&&a(g)){if(!a(b))return!1;_=!0,M=!1}if(D&&!M)return w||(w=new e),_||o(g)?t(g,b,x,y,v,w):r(g,b,j,x,y,v,w);if(!(x&l)){var F=M&&p.call(g,"__wrapped__"),T=C&&p.call(b,"__wrapped__");if(F||T){var S=F?g.value():g,O=T?b.value():b;return w||(w=new e),v(S,O,x,y,w)}}return D?(w||(w=new e),n(g,b,x,y,v,w)):!1}return Om=m,Om}var zm,US;function t3(){if(US)return zm;US=1;var e=qG(),t=pn();function r(n,s,i,a,o){return n===s?!0:n==null||s==null||!t(n)&&!t(s)?n!==n&&s!==s:e(n,s,i,a,r,o)}return zm=r,zm}var Fm,HS;function BG(){if(HS)return Fm;HS=1;var e=Yd(),t=t3(),r=1,n=2;function s(i,a,o,l){var d=o.length,u=d,f=!l;if(i==null)return!u;for(i=Object(i);d--;){var h=o[d];if(f&&h[2]?h[1]!==i[h[0]]:!(h[0]in i))return!1}for(;++d<u;){h=o[d];var p=h[0],m=i[p],g=h[1];if(f&&h[2]){if(m===void 0&&!(p in i))return!1}else{var b=new e;if(l)var x=l(m,g,p,i,a,b);if(!(x===void 0?t(g,m,r|n,l,b):x))return!1}}return!0}return Fm=s,Fm}var $m,WS;function r3(){if(WS)return $m;WS=1;var e=Ir();function t(r){return r===r&&!e(r)}return $m=t,$m}var Vm,GS;function UG(){if(GS)return Vm;GS=1;var e=r3(),t=qs();function r(n){for(var s=t(n),i=s.length;i--;){var a=s[i],o=n[a];s[i]=[a,o,e(o)]}return s}return Vm=r,Vm}var qm,KS;function n3(){if(KS)return qm;KS=1;function e(t,r){return function(n){return n==null?!1:n[t]===r&&(r!==void 0||t in Object(n))}}return qm=e,qm}var Bm,YS;function HG(){if(YS)return Bm;YS=1;var e=BG(),t=UG(),r=n3();function n(s){var i=t(s);return i.length==1&&i[0][2]?r(i[0][0],i[0][1]):function(a){return a===s||e(a,s,i)}}return Bm=n,Bm}var Um,XS;function Ja(){if(XS)return Um;XS=1;var e=Ti(),t=pn(),r="[object Symbol]";function n(s){return typeof s=="symbol"||t(s)&&e(s)==r}return Um=n,Um}var Hm,ZS;function k1(){if(ZS)return Hm;ZS=1;var e=yt(),t=Ja(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function s(i,a){if(e(i))return!1;var o=typeof i;return o=="number"||o=="symbol"||o=="boolean"||i==null||t(i)?!0:n.test(i)||!r.test(i)||a!=null&&i in Object(a)}return Hm=s,Hm}var Wm,QS;function WG(){if(QS)return Wm;QS=1;var e=u1(),t="Expected a function";function r(n,s){if(typeof n!="function"||s!=null&&typeof s!="function")throw new TypeError(t);var i=function(){var a=arguments,o=s?s.apply(this,a):a[0],l=i.cache;if(l.has(o))return l.get(o);var d=n.apply(this,a);return i.cache=l.set(o,d)||l,d};return i.cache=new(r.Cache||e),i}return r.Cache=e,Wm=r,Wm}var Gm,JS;function GG(){if(JS)return Gm;JS=1;var e=WG(),t=500;function r(n){var s=e(n,function(a){return i.size===t&&i.clear(),a}),i=s.cache;return s}return Gm=r,Gm}var Km,eN;function KG(){if(eN)return Km;eN=1;var e=GG(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,n=e(function(s){var i=[];return s.charCodeAt(0)===46&&i.push(""),s.replace(t,function(a,o,l,d){i.push(l?d.replace(r,"$1"):o||a)}),i});return Km=n,Km}var Ym,tN;function nf(){if(tN)return Ym;tN=1;function e(t,r){for(var n=-1,s=t==null?0:t.length,i=Array(s);++n<s;)i[n]=r(t[n],n,t);return i}return Ym=e,Ym}var Xm,rN;function YG(){if(rN)return Xm;rN=1;var e=Xa(),t=nf(),r=yt(),n=Ja(),s=e?e.prototype:void 0,i=s?s.toString:void 0;function a(o){if(typeof o=="string")return o;if(r(o))return t(o,a)+"";if(n(o))return i?i.call(o):"";var l=o+"";return l=="0"&&1/o==-1/0?"-0":l}return Xm=a,Xm}var Zm,nN;function s3(){if(nN)return Zm;nN=1;var e=YG();function t(r){return r==null?"":e(r)}return Zm=t,Zm}var Qm,sN;function sf(){if(sN)return Qm;sN=1;var e=yt(),t=k1(),r=KG(),n=s3();function s(i,a){return e(i)?i:t(i,a)?[i]:r(n(i))}return Qm=s,Qm}var Jm,iN;function ac(){if(iN)return Jm;iN=1;var e=Ja();function t(r){if(typeof r=="string"||e(r))return r;var n=r+"";return n=="0"&&1/r==-1/0?"-0":n}return Jm=t,Jm}var e0,aN;function af(){if(aN)return e0;aN=1;var e=sf(),t=ac();function r(n,s){s=e(s,n);for(var i=0,a=s.length;n!=null&&i<a;)n=n[t(s[i++])];return i&&i==a?n:void 0}return e0=r,e0}var t0,oN;function XG(){if(oN)return t0;oN=1;var e=af();function t(r,n,s){var i=r==null?void 0:e(r,n);return i===void 0?s:i}return t0=t,t0}var r0,lN;function ZG(){if(lN)return r0;lN=1;function e(t,r){return t!=null&&r in Object(t)}return r0=e,r0}var n0,cN;function i3(){if(cN)return n0;cN=1;var e=sf(),t=sc(),r=yt(),n=Qd(),s=f1(),i=ac();function a(o,l,d){l=e(l,o);for(var u=-1,f=l.length,h=!1;++u<f;){var p=i(l[u]);if(!(h=o!=null&&d(o,p)))break;o=o[p]}return h||++u!=f?h:(f=o==null?0:o.length,!!f&&s(f)&&n(p,f)&&(r(o)||t(o)))}return n0=a,n0}var s0,uN;function a3(){if(uN)return s0;uN=1;var e=ZG(),t=i3();function r(n,s){return n!=null&&t(n,s,e)}return s0=r,s0}var i0,dN;function QG(){if(dN)return i0;dN=1;var e=t3(),t=XG(),r=a3(),n=k1(),s=r3(),i=n3(),a=ac(),o=1,l=2;function d(u,f){return n(u)&&s(f)?i(a(u),f):function(h){var p=t(h,u);return p===void 0&&p===f?r(h,u):e(f,p,o|l)}}return i0=d,i0}var a0,fN;function o3(){if(fN)return a0;fN=1;function e(t){return function(r){return r==null?void 0:r[t]}}return a0=e,a0}var o0,hN;function JG(){if(hN)return o0;hN=1;var e=af();function t(r){return function(n){return e(n,r)}}return o0=t,o0}var l0,pN;function eK(){if(pN)return l0;pN=1;var e=o3(),t=JG(),r=k1(),n=ac();function s(i){return r(i)?e(n(i)):t(i)}return l0=s,l0}var c0,mN;function Hn(){if(mN)return c0;mN=1;var e=HG(),t=QG(),r=Ri(),n=yt(),s=eK();function i(a){return typeof a=="function"?a:a==null?r:typeof a=="object"?n(a)?t(a[0],a[1]):e(a):s(a)}return c0=i,c0}var u0,gN;function l3(){if(gN)return u0;gN=1;var e=z4(),t=IG(),r=Hn(),n=yt();function s(i,a){var o=n(i)?e:t;return o(i,r(a,3))}return u0=s,u0}var d0,yN;function tK(){if(yN)return d0;yN=1;var e=Object.prototype,t=e.hasOwnProperty;function r(n,s){return n!=null&&t.call(n,s)}return d0=r,d0}var f0,xN;function c3(){if(xN)return f0;xN=1;var e=tK(),t=i3();function r(n,s){return n!=null&&t(n,s,e)}return f0=r,f0}var h0,vN;function rK(){if(vN)return h0;vN=1;var e=p1(),t=Qa(),r=sc(),n=yt(),s=Un(),i=Za(),a=ef(),o=ic(),l="[object Map]",d="[object Set]",u=Object.prototype,f=u.hasOwnProperty;function h(p){if(p==null)return!0;if(s(p)&&(n(p)||typeof p=="string"||typeof p.splice=="function"||i(p)||o(p)||r(p)))return!p.length;var m=t(p);if(m==l||m==d)return!p.size;if(a(p))return!e(p).length;for(var g in p)if(f.call(p,g))return!1;return!0}return h0=h,h0}var p0,bN;function u3(){if(bN)return p0;bN=1;function e(t){return t===void 0}return p0=e,p0}var m0,wN;function d3(){if(wN)return m0;wN=1;var e=rf(),t=Un();function r(n,s){var i=-1,a=t(n)?Array(n.length):[];return e(n,function(o,l,d){a[++i]=s(o,l,d)}),a}return m0=r,m0}var g0,kN;function f3(){if(kN)return g0;kN=1;var e=nf(),t=Hn(),r=d3(),n=yt();function s(i,a){var o=n(i)?e:r;return o(i,t(a,3))}return g0=s,g0}var y0,jN;function nK(){if(jN)return y0;jN=1;function e(t,r,n,s){var i=-1,a=t==null?0:t.length;for(s&&a&&(n=t[++i]);++i<a;)n=r(n,t[i],i,t);return n}return y0=e,y0}var x0,_N;function sK(){if(_N)return x0;_N=1;function e(t,r,n,s,i){return i(t,function(a,o,l){n=s?(s=!1,a):r(n,a,o,l)}),n}return x0=e,x0}var v0,SN;function h3(){if(SN)return v0;SN=1;var e=nK(),t=rf(),r=Hn(),n=sK(),s=yt();function i(a,o,l){var d=s(a)?e:n,u=arguments.length<3;return d(a,r(o,4),l,u,t)}return v0=i,v0}var b0,NN;function iK(){if(NN)return b0;NN=1;var e=Ti(),t=yt(),r=pn(),n="[object String]";function s(i){return typeof i=="string"||!t(i)&&r(i)&&e(i)==n}return b0=s,b0}var w0,EN;function aK(){if(EN)return w0;EN=1;var e=o3(),t=e("length");return w0=t,w0}var k0,CN;function oK(){if(CN)return k0;CN=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",s=t+r+n,i="\\ufe0e\\ufe0f",a="\\u200d",o=RegExp("["+a+e+s+i+"]");function l(d){return o.test(d)}return k0=l,k0}var j0,TN;function lK(){if(TN)return j0;TN=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",s=t+r+n,i="\\ufe0e\\ufe0f",a="["+e+"]",o="["+s+"]",l="\\ud83c[\\udffb-\\udfff]",d="(?:"+o+"|"+l+")",u="[^"+e+"]",f="(?:\\ud83c[\\udde6-\\uddff]){2}",h="[\\ud800-\\udbff][\\udc00-\\udfff]",p="\\u200d",m=d+"?",g="["+i+"]?",b="(?:"+p+"(?:"+[u,f,h].join("|")+")"+g+m+")*",x=g+m+b,y="(?:"+[u+o+"?",o,f,h,a].join("|")+")",v=RegExp(l+"(?="+l+")|"+y+x,"g");function w(_){for(var N=v.lastIndex=0;v.test(_);)++N;return N}return j0=w,j0}var _0,PN;function cK(){if(PN)return _0;PN=1;var e=aK(),t=oK(),r=lK();function n(s){return t(s)?r(s):e(s)}return _0=n,_0}var S0,MN;function uK(){if(MN)return S0;MN=1;var e=p1(),t=Qa(),r=Un(),n=iK(),s=cK(),i="[object Map]",a="[object Set]";function o(l){if(l==null)return 0;if(r(l))return n(l)?s(l):l.length;var d=t(l);return d==i||d==a?l.size:e(l).length}return S0=o,S0}var N0,RN;function dK(){if(RN)return N0;RN=1;var e=d1(),t=W4(),r=b1(),n=Hn(),s=tf(),i=yt(),a=Za(),o=rc(),l=Ir(),d=ic();function u(f,h,p){var m=i(f),g=m||a(f)||d(f);if(h=n(h,4),p==null){var b=f&&f.constructor;g?p=m?new b:[]:l(f)?p=o(b)?t(s(f)):{}:p={}}return(g?e:r)(f,function(x,y,v){return h(p,x,y,v)}),p}return N0=u,N0}var E0,AN;function fK(){if(AN)return E0;AN=1;var e=Xa(),t=sc(),r=yt(),n=e?e.isConcatSpreadable:void 0;function s(i){return r(i)||t(i)||!!(n&&i&&i[n])}return E0=s,E0}var C0,DN;function j1(){if(DN)return C0;DN=1;var e=g1(),t=fK();function r(n,s,i,a,o){var l=-1,d=n.length;for(i||(i=t),o||(o=[]);++l<d;){var u=n[l];s>0&&i(u)?s>1?r(u,s-1,i,a,o):e(o,u):a||(o[o.length]=u)}return o}return C0=r,C0}var T0,IN;function hK(){if(IN)return T0;IN=1;function e(t,r,n){switch(n.length){case 0:return t.call(r);case 1:return t.call(r,n[0]);case 2:return t.call(r,n[0],n[1]);case 3:return t.call(r,n[0],n[1],n[2])}return t.apply(r,n)}return T0=e,T0}var P0,LN;function p3(){if(LN)return P0;LN=1;var e=hK(),t=Math.max;function r(n,s,i){return s=t(s===void 0?n.length-1:s,0),function(){for(var a=arguments,o=-1,l=t(a.length-s,0),d=Array(l);++o<l;)d[o]=a[s+o];o=-1;for(var u=Array(s+1);++o<s;)u[o]=a[o];return u[s]=i(d),e(n,this,u)}}return P0=r,P0}var M0,ON;function pK(){if(ON)return M0;ON=1;var e=x1(),t=A4(),r=Ri(),n=t?function(s,i){return t(s,"toString",{configurable:!0,enumerable:!1,value:e(i),writable:!0})}:r;return M0=n,M0}var R0,zN;function mK(){if(zN)return R0;zN=1;var e=800,t=16,r=Date.now;function n(s){var i=0,a=0;return function(){var o=r(),l=t-(o-a);if(a=o,l>0){if(++i>=e)return arguments[0]}else i=0;return s.apply(void 0,arguments)}}return R0=n,R0}var A0,FN;function m3(){if(FN)return A0;FN=1;var e=pK(),t=mK(),r=t(e);return A0=r,A0}var D0,$N;function of(){if($N)return D0;$N=1;var e=Ri(),t=p3(),r=m3();function n(s,i){return r(t(s,i,e),s+"")}return D0=n,D0}var I0,VN;function g3(){if(VN)return I0;VN=1;function e(t,r,n,s){for(var i=t.length,a=n+(s?1:-1);s?a--:++a<i;)if(r(t[a],a,t))return a;return-1}return I0=e,I0}var L0,qN;function gK(){if(qN)return L0;qN=1;function e(t){return t!==t}return L0=e,L0}var O0,BN;function yK(){if(BN)return O0;BN=1;function e(t,r,n){for(var s=n-1,i=t.length;++s<i;)if(t[s]===r)return s;return-1}return O0=e,O0}var z0,UN;function xK(){if(UN)return z0;UN=1;var e=g3(),t=gK(),r=yK();function n(s,i,a){return i===i?r(s,i,a):e(s,t,a)}return z0=n,z0}var F0,HN;function vK(){if(HN)return F0;HN=1;var e=xK();function t(r,n){var s=r==null?0:r.length;return!!s&&e(r,n,0)>-1}return F0=t,F0}var $0,WN;function bK(){if(WN)return $0;WN=1;function e(t,r,n){for(var s=-1,i=t==null?0:t.length;++s<i;)if(n(r,t[s]))return!0;return!1}return $0=e,$0}var V0,GN;function wK(){if(GN)return V0;GN=1;function e(){}return V0=e,V0}var q0,KN;function kK(){if(KN)return q0;KN=1;var e=B4(),t=wK(),r=w1(),n=1/0,s=e&&1/r(new e([,-0]))[1]==n?function(i){return new e(i)}:t;return q0=s,q0}var B0,YN;function jK(){if(YN)return B0;YN=1;var e=Q4(),t=vK(),r=bK(),n=J4(),s=kK(),i=w1(),a=200;function o(l,d,u){var f=-1,h=t,p=l.length,m=!0,g=[],b=g;if(u)m=!1,h=r;else if(p>=a){var x=d?null:s(l);if(x)return i(x);m=!1,h=n,b=new e}else b=d?[]:g;e:for(;++f<p;){var y=l[f],v=d?d(y):y;if(y=u||y!==0?y:0,m&&v===v){for(var w=b.length;w--;)if(b[w]===v)continue e;d&&b.push(v),g.push(y)}else h(b,v,u)||(b!==g&&b.push(v),g.push(y))}return g}return B0=o,B0}var U0,XN;function y3(){if(XN)return U0;XN=1;var e=Un(),t=pn();function r(n){return t(n)&&e(n)}return U0=r,U0}var H0,ZN;function _K(){if(ZN)return H0;ZN=1;var e=j1(),t=of(),r=jK(),n=y3(),s=t(function(i){return r(e(i,1,n,!0))});return H0=s,H0}var W0,QN;function SK(){if(QN)return W0;QN=1;var e=nf();function t(r,n){return e(n,function(s){return r[s]})}return W0=t,W0}var G0,JN;function x3(){if(JN)return G0;JN=1;var e=SK(),t=qs();function r(n){return n==null?[]:e(n,t(n))}return G0=r,G0}var K0,eE;function Lr(){if(eE)return K0;eE=1;var e;if(typeof l1=="function")try{e={clone:RG(),constant:x1(),each:Z4(),filter:l3(),has:c3(),isArray:yt(),isEmpty:rK(),isFunction:rc(),isUndefined:u3(),keys:qs(),map:f3(),reduce:h3(),size:uK(),transform:dK(),union:_K(),values:x3()}}catch{}return e||(e=window._),K0=e,K0}var Y0,tE;function _1(){if(tE)return Y0;tE=1;var e=Lr();Y0=s;var t="\0",r="\0",n="";function s(u){this._isDirected=e.has(u,"directed")?u.directed:!0,this._isMultigraph=e.has(u,"multigraph")?u.multigraph:!1,this._isCompound=e.has(u,"compound")?u.compound:!1,this._label=void 0,this._defaultNodeLabelFn=e.constant(void 0),this._defaultEdgeLabelFn=e.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[r]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}s.prototype._nodeCount=0,s.prototype._edgeCount=0,s.prototype.isDirected=function(){return this._isDirected},s.prototype.isMultigraph=function(){return this._isMultigraph},s.prototype.isCompound=function(){return this._isCompound},s.prototype.setGraph=function(u){return this._label=u,this},s.prototype.graph=function(){return this._label},s.prototype.setDefaultNodeLabel=function(u){return e.isFunction(u)||(u=e.constant(u)),this._defaultNodeLabelFn=u,this},s.prototype.nodeCount=function(){return this._nodeCount},s.prototype.nodes=function(){return e.keys(this._nodes)},s.prototype.sources=function(){var u=this;return e.filter(this.nodes(),function(f){return e.isEmpty(u._in[f])})},s.prototype.sinks=function(){var u=this;return e.filter(this.nodes(),function(f){return e.isEmpty(u._out[f])})},s.prototype.setNodes=function(u,f){var h=arguments,p=this;return e.each(u,function(m){h.length>1?p.setNode(m,f):p.setNode(m)}),this},s.prototype.setNode=function(u,f){return e.has(this._nodes,u)?(arguments.length>1&&(this._nodes[u]=f),this):(this._nodes[u]=arguments.length>1?f:this._defaultNodeLabelFn(u),this._isCompound&&(this._parent[u]=r,this._children[u]={},this._children[r][u]=!0),this._in[u]={},this._preds[u]={},this._out[u]={},this._sucs[u]={},++this._nodeCount,this)},s.prototype.node=function(u){return this._nodes[u]},s.prototype.hasNode=function(u){return e.has(this._nodes,u)},s.prototype.removeNode=function(u){var f=this;if(e.has(this._nodes,u)){var h=function(p){f.removeEdge(f._edgeObjs[p])};delete this._nodes[u],this._isCompound&&(this._removeFromParentsChildList(u),delete this._parent[u],e.each(this.children(u),function(p){f.setParent(p)}),delete this._children[u]),e.each(e.keys(this._in[u]),h),delete this._in[u],delete this._preds[u],e.each(e.keys(this._out[u]),h),delete this._out[u],delete this._sucs[u],--this._nodeCount}return this},s.prototype.setParent=function(u,f){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(e.isUndefined(f))f=r;else{f+="";for(var h=f;!e.isUndefined(h);h=this.parent(h))if(h===u)throw new Error("Setting "+f+" as parent of "+u+" would create a cycle");this.setNode(f)}return this.setNode(u),this._removeFromParentsChildList(u),this._parent[u]=f,this._children[f][u]=!0,this},s.prototype._removeFromParentsChildList=function(u){delete this._children[this._parent[u]][u]},s.prototype.parent=function(u){if(this._isCompound){var f=this._parent[u];if(f!==r)return f}},s.prototype.children=function(u){if(e.isUndefined(u)&&(u=r),this._isCompound){var f=this._children[u];if(f)return e.keys(f)}else{if(u===r)return this.nodes();if(this.hasNode(u))return[]}},s.prototype.predecessors=function(u){var f=this._preds[u];if(f)return e.keys(f)},s.prototype.successors=function(u){var f=this._sucs[u];if(f)return e.keys(f)},s.prototype.neighbors=function(u){var f=this.predecessors(u);if(f)return e.union(f,this.successors(u))},s.prototype.isLeaf=function(u){var f;return this.isDirected()?f=this.successors(u):f=this.neighbors(u),f.length===0},s.prototype.filterNodes=function(u){var f=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});f.setGraph(this.graph());var h=this;e.each(this._nodes,function(g,b){u(b)&&f.setNode(b,g)}),e.each(this._edgeObjs,function(g){f.hasNode(g.v)&&f.hasNode(g.w)&&f.setEdge(g,h.edge(g))});var p={};function m(g){var b=h.parent(g);return b===void 0||f.hasNode(b)?(p[g]=b,b):b in p?p[b]:m(b)}return this._isCompound&&e.each(f.nodes(),function(g){f.setParent(g,m(g))}),f},s.prototype.setDefaultEdgeLabel=function(u){return e.isFunction(u)||(u=e.constant(u)),this._defaultEdgeLabelFn=u,this},s.prototype.edgeCount=function(){return this._edgeCount},s.prototype.edges=function(){return e.values(this._edgeObjs)},s.prototype.setPath=function(u,f){var h=this,p=arguments;return e.reduce(u,function(m,g){return p.length>1?h.setEdge(m,g,f):h.setEdge(m,g),g}),this},s.prototype.setEdge=function(){var u,f,h,p,m=!1,g=arguments[0];typeof g=="object"&&g!==null&&"v"in g?(u=g.v,f=g.w,h=g.name,arguments.length===2&&(p=arguments[1],m=!0)):(u=g,f=arguments[1],h=arguments[3],arguments.length>2&&(p=arguments[2],m=!0)),u=""+u,f=""+f,e.isUndefined(h)||(h=""+h);var b=o(this._isDirected,u,f,h);if(e.has(this._edgeLabels,b))return m&&(this._edgeLabels[b]=p),this;if(!e.isUndefined(h)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(u),this.setNode(f),this._edgeLabels[b]=m?p:this._defaultEdgeLabelFn(u,f,h);var x=l(this._isDirected,u,f,h);return u=x.v,f=x.w,Object.freeze(x),this._edgeObjs[b]=x,i(this._preds[f],u),i(this._sucs[u],f),this._in[f][b]=x,this._out[u][b]=x,this._edgeCount++,this},s.prototype.edge=function(u,f,h){var p=arguments.length===1?d(this._isDirected,arguments[0]):o(this._isDirected,u,f,h);return this._edgeLabels[p]},s.prototype.hasEdge=function(u,f,h){var p=arguments.length===1?d(this._isDirected,arguments[0]):o(this._isDirected,u,f,h);return e.has(this._edgeLabels,p)},s.prototype.removeEdge=function(u,f,h){var p=arguments.length===1?d(this._isDirected,arguments[0]):o(this._isDirected,u,f,h),m=this._edgeObjs[p];return m&&(u=m.v,f=m.w,delete this._edgeLabels[p],delete this._edgeObjs[p],a(this._preds[f],u),a(this._sucs[u],f),delete this._in[f][p],delete this._out[u][p],this._edgeCount--),this},s.prototype.inEdges=function(u,f){var h=this._in[u];if(h){var p=e.values(h);return f?e.filter(p,function(m){return m.v===f}):p}},s.prototype.outEdges=function(u,f){var h=this._out[u];if(h){var p=e.values(h);return f?e.filter(p,function(m){return m.w===f}):p}},s.prototype.nodeEdges=function(u,f){var h=this.inEdges(u,f);if(h)return h.concat(this.outEdges(u,f))};function i(u,f){u[f]?u[f]++:u[f]=1}function a(u,f){--u[f]||delete u[f]}function o(u,f,h,p){var m=""+f,g=""+h;if(!u&&m>g){var b=m;m=g,g=b}return m+n+g+n+(e.isUndefined(p)?t:p)}function l(u,f,h,p){var m=""+f,g=""+h;if(!u&&m>g){var b=m;m=g,g=b}var x={v:m,w:g};return p&&(x.name=p),x}function d(u,f){return o(u,f.v,f.w,f.name)}return Y0}var X0,rE;function NK(){return rE||(rE=1,X0="2.1.8"),X0}var Z0,nE;function EK(){return nE||(nE=1,Z0={Graph:_1(),version:NK()}),Z0}var Q0,sE;function CK(){if(sE)return Q0;sE=1;var e=Lr(),t=_1();Q0={write:r,read:i};function r(a){var o={options:{directed:a.isDirected(),multigraph:a.isMultigraph(),compound:a.isCompound()},nodes:n(a),edges:s(a)};return e.isUndefined(a.graph())||(o.value=e.clone(a.graph())),o}function n(a){return e.map(a.nodes(),function(o){var l=a.node(o),d=a.parent(o),u={v:o};return e.isUndefined(l)||(u.value=l),e.isUndefined(d)||(u.parent=d),u})}function s(a){return e.map(a.edges(),function(o){var l=a.edge(o),d={v:o.v,w:o.w};return e.isUndefined(o.name)||(d.name=o.name),e.isUndefined(l)||(d.value=l),d})}function i(a){var o=new t(a.options).setGraph(a.value);return e.each(a.nodes,function(l){o.setNode(l.v,l.value),l.parent&&o.setParent(l.v,l.parent)}),e.each(a.edges,function(l){o.setEdge({v:l.v,w:l.w,name:l.name},l.value)}),o}return Q0}var J0,iE;function TK(){if(iE)return J0;iE=1;var e=Lr();J0=t;function t(r){var n={},s=[],i;function a(o){e.has(n,o)||(n[o]=!0,i.push(o),e.each(r.successors(o),a),e.each(r.predecessors(o),a))}return e.each(r.nodes(),function(o){i=[],a(o),i.length&&s.push(i)}),s}return J0}var eg,aE;function v3(){if(aE)return eg;aE=1;var e=Lr();eg=t;function t(){this._arr=[],this._keyIndices={}}return t.prototype.size=function(){return this._arr.length},t.prototype.keys=function(){return this._arr.map(function(r){return r.key})},t.prototype.has=function(r){return e.has(this._keyIndices,r)},t.prototype.priority=function(r){var n=this._keyIndices[r];if(n!==void 0)return this._arr[n].priority},t.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},t.prototype.add=function(r,n){var s=this._keyIndices;if(r=String(r),!e.has(s,r)){var i=this._arr,a=i.length;return s[r]=a,i.push({key:r,priority:n}),this._decrease(a),!0}return!1},t.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var r=this._arr.pop();return delete this._keyIndices[r.key],this._heapify(0),r.key},t.prototype.decrease=function(r,n){var s=this._keyIndices[r];if(n>this._arr[s].priority)throw new Error("New priority is greater than current priority. Key: "+r+" Old: "+this._arr[s].priority+" New: "+n);this._arr[s].priority=n,this._decrease(s)},t.prototype._heapify=function(r){var n=this._arr,s=2*r,i=s+1,a=r;s<n.length&&(a=n[s].priority<n[a].priority?s:a,i<n.length&&(a=n[i].priority<n[a].priority?i:a),a!==r&&(this._swap(r,a),this._heapify(a)))},t.prototype._decrease=function(r){for(var n=this._arr,s=n[r].priority,i;r!==0&&(i=r>>1,!(n[i].priority<s));)this._swap(r,i),r=i},t.prototype._swap=function(r,n){var s=this._arr,i=this._keyIndices,a=s[r],o=s[n];s[r]=o,s[n]=a,i[o.key]=r,i[a.key]=n},eg}var tg,oE;function b3(){if(oE)return tg;oE=1;var e=Lr(),t=v3();tg=n;var r=e.constant(1);function n(i,a,o,l){return s(i,String(a),o||r,l||function(d){return i.outEdges(d)})}function s(i,a,o,l){var d={},u=new t,f,h,p=function(m){var g=m.v!==f?m.v:m.w,b=d[g],x=o(m),y=h.distance+x;if(x<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+m+" Weight: "+x);y<b.distance&&(b.distance=y,b.predecessor=f,u.decrease(g,y))};for(i.nodes().forEach(function(m){var g=m===a?0:Number.POSITIVE_INFINITY;d[m]={distance:g},u.add(m,g)});u.size()>0&&(f=u.removeMin(),h=d[f],h.distance!==Number.POSITIVE_INFINITY);)l(f).forEach(p);return d}return tg}var rg,lE;function PK(){if(lE)return rg;lE=1;var e=b3(),t=Lr();rg=r;function r(n,s,i){return t.transform(n.nodes(),function(a,o){a[o]=e(n,o,s,i)},{})}return rg}var ng,cE;function w3(){if(cE)return ng;cE=1;var e=Lr();ng=t;function t(r){var n=0,s=[],i={},a=[];function o(l){var d=i[l]={onStack:!0,lowlink:n,index:n++};if(s.push(l),r.successors(l).forEach(function(h){e.has(i,h)?i[h].onStack&&(d.lowlink=Math.min(d.lowlink,i[h].index)):(o(h),d.lowlink=Math.min(d.lowlink,i[h].lowlink))}),d.lowlink===d.index){var u=[],f;do f=s.pop(),i[f].onStack=!1,u.push(f);while(l!==f);a.push(u)}}return r.nodes().forEach(function(l){e.has(i,l)||o(l)}),a}return ng}var sg,uE;function MK(){if(uE)return sg;uE=1;var e=Lr(),t=w3();sg=r;function r(n){return e.filter(t(n),function(s){return s.length>1||s.length===1&&n.hasEdge(s[0],s[0])})}return sg}var ig,dE;function RK(){if(dE)return ig;dE=1;var e=Lr();ig=r;var t=e.constant(1);function r(s,i,a){return n(s,i||t,a||function(o){return s.outEdges(o)})}function n(s,i,a){var o={},l=s.nodes();return l.forEach(function(d){o[d]={},o[d][d]={distance:0},l.forEach(function(u){d!==u&&(o[d][u]={distance:Number.POSITIVE_INFINITY})}),a(d).forEach(function(u){var f=u.v===d?u.w:u.v,h=i(u);o[d][f]={distance:h,predecessor:d}})}),l.forEach(function(d){var u=o[d];l.forEach(function(f){var h=o[f];l.forEach(function(p){var m=h[d],g=u[p],b=h[p],x=m.distance+g.distance;x<b.distance&&(b.distance=x,b.predecessor=g.predecessor)})})}),o}return ig}var ag,fE;function k3(){if(fE)return ag;fE=1;var e=Lr();ag=t,t.CycleException=r;function t(n){var s={},i={},a=[];function o(l){if(e.has(i,l))throw new r;e.has(s,l)||(i[l]=!0,s[l]=!0,e.each(n.predecessors(l),o),delete i[l],a.push(l))}if(e.each(n.sinks(),o),e.size(s)!==n.nodeCount())throw new r;return a}function r(){}return r.prototype=new Error,ag}var og,hE;function AK(){if(hE)return og;hE=1;var e=k3();og=t;function t(r){try{e(r)}catch(n){if(n instanceof e.CycleException)return!1;throw n}return!0}return og}var lg,pE;function j3(){if(pE)return lg;pE=1;var e=Lr();lg=t;function t(n,s,i){e.isArray(s)||(s=[s]);var a=(n.isDirected()?n.successors:n.neighbors).bind(n),o=[],l={};return e.each(s,function(d){if(!n.hasNode(d))throw new Error("Graph does not have node: "+d);r(n,d,i==="post",l,a,o)}),o}function r(n,s,i,a,o,l){e.has(a,s)||(a[s]=!0,i||l.push(s),e.each(o(s),function(d){r(n,d,i,a,o,l)}),i&&l.push(s))}return lg}var cg,mE;function DK(){if(mE)return cg;mE=1;var e=j3();cg=t;function t(r,n){return e(r,n,"post")}return cg}var ug,gE;function IK(){if(gE)return ug;gE=1;var e=j3();ug=t;function t(r,n){return e(r,n,"pre")}return ug}var dg,yE;function LK(){if(yE)return dg;yE=1;var e=Lr(),t=_1(),r=v3();dg=n;function n(s,i){var a=new t,o={},l=new r,d;function u(h){var p=h.v===d?h.w:h.v,m=l.priority(p);if(m!==void 0){var g=i(h);g<m&&(o[p]=d,l.decrease(p,g))}}if(s.nodeCount()===0)return a;e.each(s.nodes(),function(h){l.add(h,Number.POSITIVE_INFINITY),a.setNode(h)}),l.decrease(s.nodes()[0],0);for(var f=!1;l.size()>0;){if(d=l.removeMin(),e.has(o,d))a.setEdge(d,o[d]);else{if(f)throw new Error("Input graph is not connected: "+s);f=!0}s.nodeEdges(d).forEach(u)}return a}return dg}var fg,xE;function OK(){return xE||(xE=1,fg={components:TK(),dijkstra:b3(),dijkstraAll:PK(),findCycles:MK(),floydWarshall:RK(),isAcyclic:AK(),postorder:DK(),preorder:IK(),prim:LK(),tarjan:w3(),topsort:k3()}),fg}var hg,vE;function zK(){if(vE)return hg;vE=1;var e=EK();return hg={Graph:e.Graph,json:CK(),alg:OK(),version:e.version},hg}var ld;if(typeof l1=="function")try{ld=zK()}catch{}ld||(ld=window.graphlib);var tn=ld,pg,bE;function FK(){if(bE)return pg;bE=1;var e=K4(),t=1,r=4;function n(s){return e(s,t|r)}return pg=n,pg}var mg,wE;function lf(){if(wE)return mg;wE=1;var e=Ya(),t=Un(),r=Qd(),n=Ir();function s(i,a,o){if(!n(o))return!1;var l=typeof a;return(l=="number"?t(o)&&r(a,o.length):l=="string"&&a in o)?e(o[a],i):!1}return mg=s,mg}var gg,kE;function $K(){if(kE)return gg;kE=1;var e=of(),t=Ya(),r=lf(),n=Mi(),s=Object.prototype,i=s.hasOwnProperty,a=e(function(o,l){o=Object(o);var d=-1,u=l.length,f=u>2?l[2]:void 0;for(f&&r(l[0],l[1],f)&&(u=1);++d<u;)for(var h=l[d],p=n(h),m=-1,g=p.length;++m<g;){var b=p[m],x=o[b];(x===void 0||t(x,s[b])&&!i.call(o,b))&&(o[b]=h[b])}return o});return gg=a,gg}var yg,jE;function VK(){if(jE)return yg;jE=1;var e=Hn(),t=Un(),r=qs();function n(s){return function(i,a,o){var l=Object(i);if(!t(i)){var d=e(a,3);i=r(i),a=function(f){return d(l[f],f,l)}}var u=s(i,a,o);return u>-1?l[d?i[u]:u]:void 0}}return yg=n,yg}var xg,_E;function qK(){if(_E)return xg;_E=1;var e=/\s/;function t(r){for(var n=r.length;n--&&e.test(r.charAt(n)););return n}return xg=t,xg}var vg,SE;function BK(){if(SE)return vg;SE=1;var e=qK(),t=/^\s+/;function r(n){return n&&n.slice(0,e(n)+1).replace(t,"")}return vg=r,vg}var bg,NE;function UK(){if(NE)return bg;NE=1;var e=BK(),t=Ir(),r=Ja(),n=NaN,s=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,a=/^0o[0-7]+$/i,o=parseInt;function l(d){if(typeof d=="number")return d;if(r(d))return n;if(t(d)){var u=typeof d.valueOf=="function"?d.valueOf():d;d=t(u)?u+"":u}if(typeof d!="string")return d===0?d:+d;d=e(d);var f=i.test(d);return f||a.test(d)?o(d.slice(2),f?2:8):s.test(d)?n:+d}return bg=l,bg}var wg,EE;function _3(){if(EE)return wg;EE=1;var e=UK(),t=1/0,r=17976931348623157e292;function n(s){if(!s)return s===0?s:0;if(s=e(s),s===t||s===-t){var i=s<0?-1:1;return i*r}return s===s?s:0}return wg=n,wg}var kg,CE;function HK(){if(CE)return kg;CE=1;var e=_3();function t(r){var n=e(r),s=n%1;return n===n?s?n-s:n:0}return kg=t,kg}var jg,TE;function WK(){if(TE)return jg;TE=1;var e=g3(),t=Hn(),r=HK(),n=Math.max;function s(i,a,o){var l=i==null?0:i.length;if(!l)return-1;var d=o==null?0:r(o);return d<0&&(d=n(l+d,0)),e(i,t(a,3),d)}return jg=s,jg}var _g,PE;function GK(){if(PE)return _g;PE=1;var e=VK(),t=WK(),r=e(t);return _g=r,_g}var Sg,ME;function S3(){if(ME)return Sg;ME=1;var e=j1();function t(r){var n=r==null?0:r.length;return n?e(r,1):[]}return Sg=t,Sg}var Ng,RE;function KK(){if(RE)return Ng;RE=1;var e=v1(),t=Y4(),r=Mi();function n(s,i){return s==null?s:e(s,t(i),r)}return Ng=n,Ng}var Eg,AE;function YK(){if(AE)return Eg;AE=1;function e(t){var r=t==null?0:t.length;return r?t[r-1]:void 0}return Eg=e,Eg}var Cg,DE;function XK(){if(DE)return Cg;DE=1;var e=Xd(),t=b1(),r=Hn();function n(s,i){var a={};return i=r(i,3),t(s,function(o,l,d){e(a,l,i(o,l,d))}),a}return Cg=n,Cg}var Tg,IE;function S1(){if(IE)return Tg;IE=1;var e=Ja();function t(r,n,s){for(var i=-1,a=r.length;++i<a;){var o=r[i],l=n(o);if(l!=null&&(d===void 0?l===l&&!e(l):s(l,d)))var d=l,u=o}return u}return Tg=t,Tg}var Pg,LE;function ZK(){if(LE)return Pg;LE=1;function e(t,r){return t>r}return Pg=e,Pg}var Mg,OE;function QK(){if(OE)return Mg;OE=1;var e=S1(),t=ZK(),r=Ri();function n(s){return s&&s.length?e(s,r,t):void 0}return Mg=n,Mg}var Rg,zE;function N3(){if(zE)return Rg;zE=1;var e=Xd(),t=Ya();function r(n,s,i){(i!==void 0&&!t(n[s],i)||i===void 0&&!(s in n))&&e(n,s,i)}return Rg=r,Rg}var Ag,FE;function JK(){if(FE)return Ag;FE=1;var e=Ti(),t=tf(),r=pn(),n="[object Object]",s=Function.prototype,i=Object.prototype,a=s.toString,o=i.hasOwnProperty,l=a.call(Object);function d(u){if(!r(u)||e(u)!=n)return!1;var f=t(u);if(f===null)return!0;var h=o.call(f,"constructor")&&f.constructor;return typeof h=="function"&&h instanceof h&&a.call(h)==l}return Ag=d,Ag}var Dg,$E;function E3(){if($E)return Dg;$E=1;function e(t,r){if(!(r==="constructor"&&typeof t[r]=="function")&&r!="__proto__")return t[r]}return Dg=e,Dg}var Ig,VE;function eY(){if(VE)return Ig;VE=1;var e=nc(),t=Mi();function r(n){return e(n,t(n))}return Ig=r,Ig}var Lg,qE;function tY(){if(qE)return Lg;qE=1;var e=N3(),t=L4(),r=H4(),n=O4(),s=G4(),i=sc(),a=yt(),o=y3(),l=Za(),d=rc(),u=Ir(),f=JK(),h=ic(),p=E3(),m=eY();function g(b,x,y,v,w,_,N){var j=p(b,y),E=p(x,y),M=N.get(E);if(M){e(b,y,M);return}var C=_?_(j,E,y+"",b,x,N):void 0,D=C===void 0;if(D){var F=a(E),T=!F&&l(E),S=!F&&!T&&h(E);C=E,F||T||S?a(j)?C=j:o(j)?C=n(j):T?(D=!1,C=t(E,!0)):S?(D=!1,C=r(E,!0)):C=[]:f(E)||i(E)?(C=j,i(j)?C=m(j):(!u(j)||d(j))&&(C=s(E))):D=!1}D&&(N.set(E,C),w(C,E,v,_,N),N.delete(E)),e(b,y,C)}return Lg=g,Lg}var Og,BE;function rY(){if(BE)return Og;BE=1;var e=Yd(),t=N3(),r=v1(),n=tY(),s=Ir(),i=Mi(),a=E3();function o(l,d,u,f,h){l!==d&&r(d,function(p,m){if(h||(h=new e),s(p))n(l,d,m,u,o,f,h);else{var g=f?f(a(l,m),p,m+"",l,d,h):void 0;g===void 0&&(g=p),t(l,m,g)}},i)}return Og=o,Og}var zg,UE;function nY(){if(UE)return zg;UE=1;var e=of(),t=lf();function r(n){return e(function(s,i){var a=-1,o=i.length,l=o>1?i[o-1]:void 0,d=o>2?i[2]:void 0;for(l=n.length>3&&typeof l=="function"?(o--,l):void 0,d&&t(i[0],i[1],d)&&(l=o<3?void 0:l,o=1),s=Object(s);++a<o;){var u=i[a];u&&n(s,u,a,l)}return s})}return zg=r,zg}var Fg,HE;function sY(){if(HE)return Fg;HE=1;var e=rY(),t=nY(),r=t(function(n,s,i){e(n,s,i)});return Fg=r,Fg}var $g,WE;function C3(){if(WE)return $g;WE=1;function e(t,r){return t<r}return $g=e,$g}var Vg,GE;function iY(){if(GE)return Vg;GE=1;var e=S1(),t=C3(),r=Ri();function n(s){return s&&s.length?e(s,r,t):void 0}return Vg=n,Vg}var qg,KE;function aY(){if(KE)return qg;KE=1;var e=S1(),t=Hn(),r=C3();function n(s,i){return s&&s.length?e(s,t(i,2),r):void 0}return qg=n,qg}var Bg,YE;function oY(){if(YE)return Bg;YE=1;var e=en(),t=function(){return e.Date.now()};return Bg=t,Bg}var Ug,XE;function lY(){if(XE)return Ug;XE=1;var e=Zd(),t=sf(),r=Qd(),n=Ir(),s=ac();function i(a,o,l,d){if(!n(a))return a;o=t(o,a);for(var u=-1,f=o.length,h=f-1,p=a;p!=null&&++u<f;){var m=s(o[u]),g=l;if(m==="__proto__"||m==="constructor"||m==="prototype")return a;if(u!=h){var b=p[m];g=d?d(b,m,p):void 0,g===void 0&&(g=n(b)?b:r(o[u+1])?[]:{})}e(p,m,g),p=p[m]}return a}return Ug=i,Ug}var Hg,ZE;function cY(){if(ZE)return Hg;ZE=1;var e=af(),t=lY(),r=sf();function n(s,i,a){for(var o=-1,l=i.length,d={};++o<l;){var u=i[o],f=e(s,u);a(f,u)&&t(d,r(u,s),f)}return d}return Hg=n,Hg}var Wg,QE;function uY(){if(QE)return Wg;QE=1;var e=cY(),t=a3();function r(n,s){return e(n,s,function(i,a){return t(n,a)})}return Wg=r,Wg}var Gg,JE;function dY(){if(JE)return Gg;JE=1;var e=S3(),t=p3(),r=m3();function n(s){return r(t(s,void 0,e),s+"")}return Gg=n,Gg}var Kg,eC;function fY(){if(eC)return Kg;eC=1;var e=uY(),t=dY(),r=t(function(n,s){return n==null?{}:e(n,s)});return Kg=r,Kg}var Yg,tC;function hY(){if(tC)return Yg;tC=1;var e=Math.ceil,t=Math.max;function r(n,s,i,a){for(var o=-1,l=t(e((s-n)/(i||1)),0),d=Array(l);l--;)d[a?l:++o]=n,n+=i;return d}return Yg=r,Yg}var Xg,rC;function pY(){if(rC)return Xg;rC=1;var e=hY(),t=lf(),r=_3();function n(s){return function(i,a,o){return o&&typeof o!="number"&&t(i,a,o)&&(a=o=void 0),i=r(i),a===void 0?(a=i,i=0):a=r(a),o=o===void 0?i<a?1:-1:r(o),e(i,a,o,s)}}return Xg=n,Xg}var Zg,nC;function mY(){if(nC)return Zg;nC=1;var e=pY(),t=e();return Zg=t,Zg}var Qg,sC;function gY(){if(sC)return Qg;sC=1;function e(t,r){var n=t.length;for(t.sort(r);n--;)t[n]=t[n].value;return t}return Qg=e,Qg}var Jg,iC;function yY(){if(iC)return Jg;iC=1;var e=Ja();function t(r,n){if(r!==n){var s=r!==void 0,i=r===null,a=r===r,o=e(r),l=n!==void 0,d=n===null,u=n===n,f=e(n);if(!d&&!f&&!o&&r>n||o&&l&&u&&!d&&!f||i&&l&&u||!s&&u||!a)return 1;if(!i&&!o&&!f&&r<n||f&&s&&a&&!i&&!o||d&&s&&a||!l&&a||!u)return-1}return 0}return Jg=t,Jg}var ey,aC;function xY(){if(aC)return ey;aC=1;var e=yY();function t(r,n,s){for(var i=-1,a=r.criteria,o=n.criteria,l=a.length,d=s.length;++i<l;){var u=e(a[i],o[i]);if(u){if(i>=d)return u;var f=s[i];return u*(f=="desc"?-1:1)}}return r.index-n.index}return ey=t,ey}var ty,oC;function vY(){if(oC)return ty;oC=1;var e=nf(),t=af(),r=Hn(),n=d3(),s=gY(),i=Jd(),a=xY(),o=Ri(),l=yt();function d(u,f,h){f.length?f=e(f,function(g){return l(g)?function(b){return t(b,g.length===1?g[0]:g)}:g}):f=[o];var p=-1;f=e(f,i(r));var m=n(u,function(g,b,x){var y=e(f,function(v){return v(g)});return{criteria:y,index:++p,value:g}});return s(m,function(g,b){return a(g,b,h)})}return ty=d,ty}var ry,lC;function bY(){if(lC)return ry;lC=1;var e=j1(),t=vY(),r=of(),n=lf(),s=r(function(i,a){if(i==null)return[];var o=a.length;return o>1&&n(i,a[0],a[1])?a=[]:o>2&&n(a[0],a[1],a[2])&&(a=[a[0]]),t(i,e(a,1),[])});return ry=s,ry}var ny,cC;function wY(){if(cC)return ny;cC=1;var e=s3(),t=0;function r(n){var s=++t;return e(n)+s}return ny=r,ny}var sy,uC;function kY(){if(uC)return sy;uC=1;function e(t,r,n){for(var s=-1,i=t.length,a=r.length,o={};++s<i;){var l=s<a?r[s]:void 0;n(o,t[s],l)}return o}return sy=e,sy}var iy,dC;function jY(){if(dC)return iy;dC=1;var e=Zd(),t=kY();function r(n,s){return t(n||[],s||[],e)}return iy=r,iy}var cd;if(typeof l1=="function")try{cd={cloneDeep:FK(),constant:x1(),defaults:$K(),each:Z4(),filter:l3(),find:GK(),flatten:S3(),forEach:X4(),forIn:KK(),has:c3(),isUndefined:u3(),last:YK(),map:f3(),mapValues:XK(),max:QK(),merge:sY(),min:iY(),minBy:aY(),now:oY(),pick:fY(),range:mY(),reduce:h3(),sortBy:bY(),uniqueId:wY(),values:x3(),zipObject:jY()}}catch{}cd||(cd=window._);var Xe=cd,_Y=cf;function cf(){var e={};e._next=e._prev=e,this._sentinel=e}cf.prototype.dequeue=function(){var e=this._sentinel,t=e._prev;if(t!==e)return T3(t),t};cf.prototype.enqueue=function(e){var t=this._sentinel;e._prev&&e._next&&T3(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t};cf.prototype.toString=function(){for(var e=[],t=this._sentinel,r=t._prev;r!==t;)e.push(JSON.stringify(r,SY)),r=r._prev;return"["+e.join(", ")+"]"};function T3(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function SY(e,t){if(e!=="_next"&&e!=="_prev")return t}var Nn=Xe,NY=tn.Graph,EY=_Y,CY=PY,TY=Nn.constant(1);function PY(e,t){if(e.nodeCount()<=1)return[];var r=RY(e,t||TY),n=MY(r.graph,r.buckets,r.zeroIdx);return Nn.flatten(Nn.map(n,function(s){return e.outEdges(s.v,s.w)}),!0)}function MY(e,t,r){for(var n=[],s=t[t.length-1],i=t[0],a;e.nodeCount();){for(;a=i.dequeue();)ay(e,t,r,a);for(;a=s.dequeue();)ay(e,t,r,a);if(e.nodeCount()){for(var o=t.length-2;o>0;--o)if(a=t[o].dequeue(),a){n=n.concat(ay(e,t,r,a,!0));break}}}return n}function ay(e,t,r,n,s){var i=s?[]:void 0;return Nn.forEach(e.inEdges(n.v),function(a){var o=e.edge(a),l=e.node(a.v);s&&i.push({v:a.v,w:a.w}),l.out-=o,ev(t,r,l)}),Nn.forEach(e.outEdges(n.v),function(a){var o=e.edge(a),l=a.w,d=e.node(l);d.in-=o,ev(t,r,d)}),e.removeNode(n.v),i}function RY(e,t){var r=new NY,n=0,s=0;Nn.forEach(e.nodes(),function(o){r.setNode(o,{v:o,in:0,out:0})}),Nn.forEach(e.edges(),function(o){var l=r.edge(o.v,o.w)||0,d=t(o),u=l+d;r.setEdge(o.v,o.w,u),s=Math.max(s,r.node(o.v).out+=d),n=Math.max(n,r.node(o.w).in+=d)});var i=Nn.range(s+n+3).map(function(){return new EY}),a=n+1;return Nn.forEach(r.nodes(),function(o){ev(i,a,r.node(o))}),{graph:r,buckets:i,zeroIdx:a}}function ev(e,t,r){r.out?r.in?e[r.out-r.in+t].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}var li=Xe,AY=CY,DY={run:IY,undo:OY};function IY(e){var t=e.graph().acyclicer==="greedy"?AY(e,r(e)):LY(e);li.forEach(t,function(n){var s=e.edge(n);e.removeEdge(n),s.forwardName=n.name,s.reversed=!0,e.setEdge(n.w,n.v,s,li.uniqueId("rev"))});function r(n){return function(s){return n.edge(s).weight}}}function LY(e){var t=[],r={},n={};function s(i){li.has(n,i)||(n[i]=!0,r[i]=!0,li.forEach(e.outEdges(i),function(a){li.has(r,a.w)?t.push(a):s(a.w)}),delete r[i])}return li.forEach(e.nodes(),s),t}function OY(e){li.forEach(e.edges(),function(t){var r=e.edge(t);if(r.reversed){e.removeEdge(t);var n=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(t.w,t.v,r,n)}})}var Ce=Xe,P3=tn.Graph,ar={addDummyNode:M3,simplify:zY,asNonCompoundGraph:FY,successorWeights:$Y,predecessorWeights:VY,intersectRect:qY,buildLayerMatrix:BY,normalizeRanks:UY,removeEmptyRanks:HY,addBorderNode:WY,maxRank:R3,partition:GY,time:KY,notime:YY};function M3(e,t,r,n){var s;do s=Ce.uniqueId(n);while(e.hasNode(s));return r.dummy=t,e.setNode(s,r),s}function zY(e){var t=new P3().setGraph(e.graph());return Ce.forEach(e.nodes(),function(r){t.setNode(r,e.node(r))}),Ce.forEach(e.edges(),function(r){var n=t.edge(r.v,r.w)||{weight:0,minlen:1},s=e.edge(r);t.setEdge(r.v,r.w,{weight:n.weight+s.weight,minlen:Math.max(n.minlen,s.minlen)})}),t}function FY(e){var t=new P3({multigraph:e.isMultigraph()}).setGraph(e.graph());return Ce.forEach(e.nodes(),function(r){e.children(r).length||t.setNode(r,e.node(r))}),Ce.forEach(e.edges(),function(r){t.setEdge(r,e.edge(r))}),t}function $Y(e){var t=Ce.map(e.nodes(),function(r){var n={};return Ce.forEach(e.outEdges(r),function(s){n[s.w]=(n[s.w]||0)+e.edge(s).weight}),n});return Ce.zipObject(e.nodes(),t)}function VY(e){var t=Ce.map(e.nodes(),function(r){var n={};return Ce.forEach(e.inEdges(r),function(s){n[s.v]=(n[s.v]||0)+e.edge(s).weight}),n});return Ce.zipObject(e.nodes(),t)}function qY(e,t){var r=e.x,n=e.y,s=t.x-r,i=t.y-n,a=e.width/2,o=e.height/2;if(!s&&!i)throw new Error("Not possible to find intersection inside of the rectangle");var l,d;return Math.abs(i)*a>Math.abs(s)*o?(i<0&&(o=-o),l=o*s/i,d=o):(s<0&&(a=-a),l=a,d=a*i/s),{x:r+l,y:n+d}}function BY(e){var t=Ce.map(Ce.range(R3(e)+1),function(){return[]});return Ce.forEach(e.nodes(),function(r){var n=e.node(r),s=n.rank;Ce.isUndefined(s)||(t[s][n.order]=r)}),t}function UY(e){var t=Ce.min(Ce.map(e.nodes(),function(r){return e.node(r).rank}));Ce.forEach(e.nodes(),function(r){var n=e.node(r);Ce.has(n,"rank")&&(n.rank-=t)})}function HY(e){var t=Ce.min(Ce.map(e.nodes(),function(i){return e.node(i).rank})),r=[];Ce.forEach(e.nodes(),function(i){var a=e.node(i).rank-t;r[a]||(r[a]=[]),r[a].push(i)});var n=0,s=e.graph().nodeRankFactor;Ce.forEach(r,function(i,a){Ce.isUndefined(i)&&a%s!==0?--n:n&&Ce.forEach(i,function(o){e.node(o).rank+=n})})}function WY(e,t,r,n){var s={width:0,height:0};return arguments.length>=4&&(s.rank=r,s.order=n),M3(e,"border",s,t)}function R3(e){return Ce.max(Ce.map(e.nodes(),function(t){var r=e.node(t).rank;if(!Ce.isUndefined(r))return r}))}function GY(e,t){var r={lhs:[],rhs:[]};return Ce.forEach(e,function(n){t(n)?r.lhs.push(n):r.rhs.push(n)}),r}function KY(e,t){var r=Ce.now();try{return t()}finally{console.log(e+" time: "+(Ce.now()-r)+"ms")}}function YY(e,t){return t()}var A3=Xe,XY=ar,ZY={run:QY,undo:eX};function QY(e){e.graph().dummyChains=[],A3.forEach(e.edges(),function(t){JY(e,t)})}function JY(e,t){var r=t.v,n=e.node(r).rank,s=t.w,i=e.node(s).rank,a=t.name,o=e.edge(t),l=o.labelRank;if(i!==n+1){e.removeEdge(t);var d,u,f;for(f=0,++n;n<i;++f,++n)o.points=[],u={width:0,height:0,edgeLabel:o,edgeObj:t,rank:n},d=XY.addDummyNode(e,"edge",u,"_d"),n===l&&(u.width=o.width,u.height=o.height,u.dummy="edge-label",u.labelpos=o.labelpos),e.setEdge(r,d,{weight:o.weight},a),f===0&&e.graph().dummyChains.push(d),r=d;e.setEdge(r,s,{weight:o.weight},a)}}function eX(e){A3.forEach(e.graph().dummyChains,function(t){var r=e.node(t),n=r.edgeLabel,s;for(e.setEdge(r.edgeObj,n);r.dummy;)s=e.successors(t)[0],e.removeNode(t),n.points.push({x:r.x,y:r.y}),r.dummy==="edge-label"&&(n.x=r.x,n.y=r.y,n.width=r.width,n.height=r.height),t=s,r=e.node(t)})}var Wc=Xe,uf={longestPath:tX,slack:rX};function tX(e){var t={};function r(n){var s=e.node(n);if(Wc.has(t,n))return s.rank;t[n]=!0;var i=Wc.min(Wc.map(e.outEdges(n),function(a){return r(a.w)-e.edge(a).minlen}));return(i===Number.POSITIVE_INFINITY||i===void 0||i===null)&&(i=0),s.rank=i}Wc.forEach(e.sources(),r)}function rX(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}var ud=Xe,nX=tn.Graph,dd=uf.slack,D3=sX;function sX(e){var t=new nX({directed:!1}),r=e.nodes()[0],n=e.nodeCount();t.setNode(r,{});for(var s,i;iX(t,e)<n;)s=aX(t,e),i=t.hasNode(s.v)?dd(e,s):-dd(e,s),oX(t,e,i);return t}function iX(e,t){function r(n){ud.forEach(t.nodeEdges(n),function(s){var i=s.v,a=n===i?s.w:i;!e.hasNode(a)&&!dd(t,s)&&(e.setNode(a,{}),e.setEdge(n,a,{}),r(a))})}return ud.forEach(e.nodes(),r),e.nodeCount()}function aX(e,t){return ud.minBy(t.edges(),function(r){if(e.hasNode(r.v)!==e.hasNode(r.w))return dd(t,r)})}function oX(e,t,r){ud.forEach(e.nodes(),function(n){t.node(n).rank+=r})}var $n=Xe,lX=D3,cX=uf.slack,uX=uf.longestPath,dX=tn.alg.preorder,fX=tn.alg.postorder,hX=ar.simplify,pX=Ai;Ai.initLowLimValues=E1;Ai.initCutValues=N1;Ai.calcCutValue=I3;Ai.leaveEdge=O3;Ai.enterEdge=z3;Ai.exchangeEdges=F3;function Ai(e){e=hX(e),uX(e);var t=lX(e);E1(t),N1(t,e);for(var r,n;r=O3(t);)n=z3(t,e,r),F3(t,e,r,n)}function N1(e,t){var r=fX(e,e.nodes());r=r.slice(0,r.length-1),$n.forEach(r,function(n){mX(e,t,n)})}function mX(e,t,r){var n=e.node(r),s=n.parent;e.edge(r,s).cutvalue=I3(e,t,r)}function I3(e,t,r){var n=e.node(r),s=n.parent,i=!0,a=t.edge(r,s),o=0;return a||(i=!1,a=t.edge(s,r)),o=a.weight,$n.forEach(t.nodeEdges(r),function(l){var d=l.v===r,u=d?l.w:l.v;if(u!==s){var f=d===i,h=t.edge(l).weight;if(o+=f?h:-h,yX(e,r,u)){var p=e.edge(r,u).cutvalue;o+=f?-p:p}}}),o}function E1(e,t){arguments.length<2&&(t=e.nodes()[0]),L3(e,{},1,t)}function L3(e,t,r,n,s){var i=r,a=e.node(n);return t[n]=!0,$n.forEach(e.neighbors(n),function(o){$n.has(t,o)||(r=L3(e,t,r,o,n))}),a.low=i,a.lim=r++,s?a.parent=s:delete a.parent,r}function O3(e){return $n.find(e.edges(),function(t){return e.edge(t).cutvalue<0})}function z3(e,t,r){var n=r.v,s=r.w;t.hasEdge(n,s)||(n=r.w,s=r.v);var i=e.node(n),a=e.node(s),o=i,l=!1;i.lim>a.lim&&(o=a,l=!0);var d=$n.filter(t.edges(),function(u){return l===fC(e,e.node(u.v),o)&&l!==fC(e,e.node(u.w),o)});return $n.minBy(d,function(u){return cX(t,u)})}function F3(e,t,r,n){var s=r.v,i=r.w;e.removeEdge(s,i),e.setEdge(n.v,n.w,{}),E1(e),N1(e,t),gX(e,t)}function gX(e,t){var r=$n.find(e.nodes(),function(s){return!t.node(s).parent}),n=dX(e,r);n=n.slice(1),$n.forEach(n,function(s){var i=e.node(s).parent,a=t.edge(s,i),o=!1;a||(a=t.edge(i,s),o=!0),t.node(s).rank=t.node(i).rank+(o?a.minlen:-a.minlen)})}function yX(e,t,r){return e.hasEdge(t,r)}function fC(e,t,r){return r.low<=t.lim&&t.lim<=r.lim}var xX=uf,$3=xX.longestPath,vX=D3,bX=pX,wX=kX;function kX(e){switch(e.graph().ranker){case"network-simplex":hC(e);break;case"tight-tree":_X(e);break;case"longest-path":jX(e);break;default:hC(e)}}var jX=$3;function _X(e){$3(e),vX(e)}function hC(e){bX(e)}var tv=Xe,SX=NX;function NX(e){var t=CX(e);tv.forEach(e.graph().dummyChains,function(r){for(var n=e.node(r),s=n.edgeObj,i=EX(e,t,s.v,s.w),a=i.path,o=i.lca,l=0,d=a[l],u=!0;r!==s.w;){if(n=e.node(r),u){for(;(d=a[l])!==o&&e.node(d).maxRank<n.rank;)l++;d===o&&(u=!1)}if(!u){for(;l<a.length-1&&e.node(d=a[l+1]).minRank<=n.rank;)l++;d=a[l]}e.setParent(r,d),r=e.successors(r)[0]}})}function EX(e,t,r,n){var s=[],i=[],a=Math.min(t[r].low,t[n].low),o=Math.max(t[r].lim,t[n].lim),l,d;l=r;do l=e.parent(l),s.push(l);while(l&&(t[l].low>a||o>t[l].lim));for(d=l,l=n;(l=e.parent(l))!==d;)i.push(l);return{path:s.concat(i.reverse()),lca:d}}function CX(e){var t={},r=0;function n(s){var i=r;tv.forEach(e.children(s),n),t[s]={low:i,lim:r++}}return tv.forEach(e.children(),n),t}var En=Xe,rv=ar,TX={run:PX,cleanup:AX};function PX(e){var t=rv.addDummyNode(e,"root",{},"_root"),r=MX(e),n=En.max(En.values(r))-1,s=2*n+1;e.graph().nestingRoot=t,En.forEach(e.edges(),function(a){e.edge(a).minlen*=s});var i=RX(e)+1;En.forEach(e.children(),function(a){V3(e,t,s,i,n,r,a)}),e.graph().nodeRankFactor=s}function V3(e,t,r,n,s,i,a){var o=e.children(a);if(!o.length){a!==t&&e.setEdge(t,a,{weight:0,minlen:r});return}var l=rv.addBorderNode(e,"_bt"),d=rv.addBorderNode(e,"_bb"),u=e.node(a);e.setParent(l,a),u.borderTop=l,e.setParent(d,a),u.borderBottom=d,En.forEach(o,function(f){V3(e,t,r,n,s,i,f);var h=e.node(f),p=h.borderTop?h.borderTop:f,m=h.borderBottom?h.borderBottom:f,g=h.borderTop?n:2*n,b=p!==m?1:s-i[a]+1;e.setEdge(l,p,{weight:g,minlen:b,nestingEdge:!0}),e.setEdge(m,d,{weight:g,minlen:b,nestingEdge:!0})}),e.parent(a)||e.setEdge(t,l,{weight:0,minlen:s+i[a]})}function MX(e){var t={};function r(n,s){var i=e.children(n);i&&i.length&&En.forEach(i,function(a){r(a,s+1)}),t[n]=s}return En.forEach(e.children(),function(n){r(n,1)}),t}function RX(e){return En.reduce(e.edges(),function(t,r){return t+e.edge(r).weight},0)}function AX(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,En.forEach(e.edges(),function(r){var n=e.edge(r);n.nestingEdge&&e.removeEdge(r)})}var oy=Xe,DX=ar,IX=LX;function LX(e){function t(r){var n=e.children(r),s=e.node(r);if(n.length&&oy.forEach(n,t),oy.has(s,"minRank")){s.borderLeft=[],s.borderRight=[];for(var i=s.minRank,a=s.maxRank+1;i<a;++i)pC(e,"borderLeft","_bl",r,s,i),pC(e,"borderRight","_br",r,s,i)}}oy.forEach(e.children(),t)}function pC(e,t,r,n,s,i){var a={width:0,height:0,rank:i,borderType:t},o=s[t][i-1],l=DX.addDummyNode(e,"border",a,r);s[t][i]=l,e.setParent(l,n),o&&e.setEdge(o,l,{weight:1})}var on=Xe,OX={adjust:zX,undo:FX};function zX(e){var t=e.graph().rankdir.toLowerCase();(t==="lr"||t==="rl")&&q3(e)}function FX(e){var t=e.graph().rankdir.toLowerCase();(t==="bt"||t==="rl")&&$X(e),(t==="lr"||t==="rl")&&(VX(e),q3(e))}function q3(e){on.forEach(e.nodes(),function(t){mC(e.node(t))}),on.forEach(e.edges(),function(t){mC(e.edge(t))})}function mC(e){var t=e.width;e.width=e.height,e.height=t}function $X(e){on.forEach(e.nodes(),function(t){ly(e.node(t))}),on.forEach(e.edges(),function(t){var r=e.edge(t);on.forEach(r.points,ly),on.has(r,"y")&&ly(r)})}function ly(e){e.y=-e.y}function VX(e){on.forEach(e.nodes(),function(t){cy(e.node(t))}),on.forEach(e.edges(),function(t){var r=e.edge(t);on.forEach(r.points,cy),on.has(r,"x")&&cy(r)})}function cy(e){var t=e.x;e.x=e.y,e.y=t}var bn=Xe,qX=BX;function BX(e){var t={},r=bn.filter(e.nodes(),function(o){return!e.children(o).length}),n=bn.max(bn.map(r,function(o){return e.node(o).rank})),s=bn.map(bn.range(n+1),function(){return[]});function i(o){if(!bn.has(t,o)){t[o]=!0;var l=e.node(o);s[l.rank].push(o),bn.forEach(e.successors(o),i)}}var a=bn.sortBy(r,function(o){return e.node(o).rank});return bn.forEach(a,i),s}var ns=Xe,UX=HX;function HX(e,t){for(var r=0,n=1;n<t.length;++n)r+=WX(e,t[n-1],t[n]);return r}function WX(e,t,r){for(var n=ns.zipObject(r,ns.map(r,function(d,u){return u})),s=ns.flatten(ns.map(t,function(d){return ns.sortBy(ns.map(e.outEdges(d),function(u){return{pos:n[u.w],weight:e.edge(u).weight}}),"pos")}),!0),i=1;i<r.length;)i<<=1;var a=2*i-1;i-=1;var o=ns.map(new Array(a),function(){return 0}),l=0;return ns.forEach(s.forEach(function(d){var u=d.pos+i;o[u]+=d.weight;for(var f=0;u>0;)u%2&&(f+=o[u+1]),u=u-1>>1,o[u]+=d.weight;l+=d.weight*f})),l}var gC=Xe,GX=KX;function KX(e,t){return gC.map(t,function(r){var n=e.inEdges(r);if(n.length){var s=gC.reduce(n,function(i,a){var o=e.edge(a),l=e.node(a.v);return{sum:i.sum+o.weight*l.order,weight:i.weight+o.weight}},{sum:0,weight:0});return{v:r,barycenter:s.sum/s.weight,weight:s.weight}}else return{v:r}})}var ur=Xe,YX=XX;function XX(e,t){var r={};ur.forEach(e,function(s,i){var a=r[s.v]={indegree:0,in:[],out:[],vs:[s.v],i};ur.isUndefined(s.barycenter)||(a.barycenter=s.barycenter,a.weight=s.weight)}),ur.forEach(t.edges(),function(s){var i=r[s.v],a=r[s.w];!ur.isUndefined(i)&&!ur.isUndefined(a)&&(a.indegree++,i.out.push(r[s.w]))});var n=ur.filter(r,function(s){return!s.indegree});return ZX(n)}function ZX(e){var t=[];function r(i){return function(a){a.merged||(ur.isUndefined(a.barycenter)||ur.isUndefined(i.barycenter)||a.barycenter>=i.barycenter)&&QX(i,a)}}function n(i){return function(a){a.in.push(i),--a.indegree===0&&e.push(a)}}for(;e.length;){var s=e.pop();t.push(s),ur.forEach(s.in.reverse(),r(s)),ur.forEach(s.out,n(s))}return ur.map(ur.filter(t,function(i){return!i.merged}),function(i){return ur.pick(i,["vs","i","barycenter","weight"])})}function QX(e,t){var r=0,n=0;e.weight&&(r+=e.barycenter*e.weight,n+=e.weight),t.weight&&(r+=t.barycenter*t.weight,n+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=r/n,e.weight=n,e.i=Math.min(t.i,e.i),t.merged=!0}var Lo=Xe,JX=ar,eZ=tZ;function tZ(e,t){var r=JX.partition(e,function(u){return Lo.has(u,"barycenter")}),n=r.lhs,s=Lo.sortBy(r.rhs,function(u){return-u.i}),i=[],a=0,o=0,l=0;n.sort(rZ(!!t)),l=yC(i,s,l),Lo.forEach(n,function(u){l+=u.vs.length,i.push(u.vs),a+=u.barycenter*u.weight,o+=u.weight,l=yC(i,s,l)});var d={vs:Lo.flatten(i,!0)};return o&&(d.barycenter=a/o,d.weight=o),d}function yC(e,t,r){for(var n;t.length&&(n=Lo.last(t)).i<=r;)t.pop(),e.push(n.vs),r++;return r}function rZ(e){return function(t,r){return t.barycenter<r.barycenter?-1:t.barycenter>r.barycenter?1:e?r.i-t.i:t.i-r.i}}var hs=Xe,nZ=GX,sZ=YX,iZ=eZ,aZ=B3;function B3(e,t,r,n){var s=e.children(t),i=e.node(t),a=i?i.borderLeft:void 0,o=i?i.borderRight:void 0,l={};a&&(s=hs.filter(s,function(m){return m!==a&&m!==o}));var d=nZ(e,s);hs.forEach(d,function(m){if(e.children(m.v).length){var g=B3(e,m.v,r,n);l[m.v]=g,hs.has(g,"barycenter")&&lZ(m,g)}});var u=sZ(d,r);oZ(u,l);var f=iZ(u,n);if(a&&(f.vs=hs.flatten([a,f.vs,o],!0),e.predecessors(a).length)){var h=e.node(e.predecessors(a)[0]),p=e.node(e.predecessors(o)[0]);hs.has(f,"barycenter")||(f.barycenter=0,f.weight=0),f.barycenter=(f.barycenter*f.weight+h.order+p.order)/(f.weight+2),f.weight+=2}return f}function oZ(e,t){hs.forEach(e,function(r){r.vs=hs.flatten(r.vs.map(function(n){return t[n]?t[n].vs:n}),!0)})}function lZ(e,t){hs.isUndefined(e.barycenter)?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}var Oo=Xe,cZ=tn.Graph,uZ=dZ;function dZ(e,t,r){var n=fZ(e),s=new cZ({compound:!0}).setGraph({root:n}).setDefaultNodeLabel(function(i){return e.node(i)});return Oo.forEach(e.nodes(),function(i){var a=e.node(i),o=e.parent(i);(a.rank===t||a.minRank<=t&&t<=a.maxRank)&&(s.setNode(i),s.setParent(i,o||n),Oo.forEach(e[r](i),function(l){var d=l.v===i?l.w:l.v,u=s.edge(d,i),f=Oo.isUndefined(u)?0:u.weight;s.setEdge(d,i,{weight:e.edge(l).weight+f})}),Oo.has(a,"minRank")&&s.setNode(i,{borderLeft:a.borderLeft[t],borderRight:a.borderRight[t]}))}),s}function fZ(e){for(var t;e.hasNode(t=Oo.uniqueId("_root")););return t}var hZ=Xe,pZ=mZ;function mZ(e,t,r){var n={},s;hZ.forEach(r,function(i){for(var a=e.parent(i),o,l;a;){if(o=e.parent(a),o?(l=n[o],n[o]=a):(l=s,s=a),l&&l!==a){t.setEdge(l,a);return}a=o}})}var Es=Xe,gZ=qX,yZ=UX,xZ=aZ,vZ=uZ,bZ=pZ,wZ=tn.Graph,xC=ar,kZ=jZ;function jZ(e){var t=xC.maxRank(e),r=vC(e,Es.range(1,t+1),"inEdges"),n=vC(e,Es.range(t-1,-1,-1),"outEdges"),s=gZ(e);bC(e,s);for(var i=Number.POSITIVE_INFINITY,a,o=0,l=0;l<4;++o,++l){_Z(o%2?r:n,o%4>=2),s=xC.buildLayerMatrix(e);var d=yZ(e,s);d<i&&(l=0,a=Es.cloneDeep(s),i=d)}bC(e,a)}function vC(e,t,r){return Es.map(t,function(n){return vZ(e,n,r)})}function _Z(e,t){var r=new wZ;Es.forEach(e,function(n){var s=n.graph().root,i=xZ(n,s,r,t);Es.forEach(i.vs,function(a,o){n.node(a).order=o}),bZ(n,r,i.vs)})}function bC(e,t){Es.forEach(t,function(r){Es.forEach(r,function(n,s){e.node(n).order=s})})}var fe=Xe,SZ=tn.Graph,NZ=ar,EZ={positionX:zZ};function CZ(e,t){var r={};function n(s,i){var a=0,o=0,l=s.length,d=fe.last(i);return fe.forEach(i,function(u,f){var h=PZ(e,u),p=h?e.node(h).order:l;(h||u===d)&&(fe.forEach(i.slice(o,f+1),function(m){fe.forEach(e.predecessors(m),function(g){var b=e.node(g),x=b.order;(x<a||p<x)&&!(b.dummy&&e.node(m).dummy)&&U3(r,g,m)})}),o=f+1,a=p)}),i}return fe.reduce(t,n),r}function TZ(e,t){var r={};function n(i,a,o,l,d){var u;fe.forEach(fe.range(a,o),function(f){u=i[f],e.node(u).dummy&&fe.forEach(e.predecessors(u),function(h){var p=e.node(h);p.dummy&&(p.order<l||p.order>d)&&U3(r,h,u)})})}function s(i,a){var o=-1,l,d=0;return fe.forEach(a,function(u,f){if(e.node(u).dummy==="border"){var h=e.predecessors(u);h.length&&(l=e.node(h[0]).order,n(a,d,f,o,l),d=f,o=l)}n(a,d,a.length,l,i.length)}),a}return fe.reduce(t,s),r}function PZ(e,t){if(e.node(t).dummy)return fe.find(e.predecessors(t),function(r){return e.node(r).dummy})}function U3(e,t,r){if(t>r){var n=t;t=r,r=n}var s=e[t];s||(e[t]=s={}),s[r]=!0}function MZ(e,t,r){if(t>r){var n=t;t=r,r=n}return fe.has(e[t],r)}function RZ(e,t,r,n){var s={},i={},a={};return fe.forEach(t,function(o){fe.forEach(o,function(l,d){s[l]=l,i[l]=l,a[l]=d})}),fe.forEach(t,function(o){var l=-1;fe.forEach(o,function(d){var u=n(d);if(u.length){u=fe.sortBy(u,function(g){return a[g]});for(var f=(u.length-1)/2,h=Math.floor(f),p=Math.ceil(f);h<=p;++h){var m=u[h];i[d]===d&&l<a[m]&&!MZ(r,d,m)&&(i[m]=d,i[d]=s[d]=s[m],l=a[m])}}})}),{root:s,align:i}}function AZ(e,t,r,n,s){var i={},a=DZ(e,t,r,s),o=s?"borderLeft":"borderRight";function l(f,h){for(var p=a.nodes(),m=p.pop(),g={};m;)g[m]?f(m):(g[m]=!0,p.push(m),p=p.concat(h(m))),m=p.pop()}function d(f){i[f]=a.inEdges(f).reduce(function(h,p){return Math.max(h,i[p.v]+a.edge(p))},0)}function u(f){var h=a.outEdges(f).reduce(function(m,g){return Math.min(m,i[g.w]-a.edge(g))},Number.POSITIVE_INFINITY),p=e.node(f);h!==Number.POSITIVE_INFINITY&&p.borderType!==o&&(i[f]=Math.max(i[f],h))}return l(d,a.predecessors.bind(a)),l(u,a.successors.bind(a)),fe.forEach(n,function(f){i[f]=i[r[f]]}),i}function DZ(e,t,r,n){var s=new SZ,i=e.graph(),a=FZ(i.nodesep,i.edgesep,n);return fe.forEach(t,function(o){var l;fe.forEach(o,function(d){var u=r[d];if(s.setNode(u),l){var f=r[l],h=s.edge(f,u);s.setEdge(f,u,Math.max(a(e,d,l),h||0))}l=d})}),s}function IZ(e,t){return fe.minBy(fe.values(t),function(r){var n=Number.NEGATIVE_INFINITY,s=Number.POSITIVE_INFINITY;return fe.forIn(r,function(i,a){var o=$Z(e,a)/2;n=Math.max(i+o,n),s=Math.min(i-o,s)}),n-s})}function LZ(e,t){var r=fe.values(t),n=fe.min(r),s=fe.max(r);fe.forEach(["u","d"],function(i){fe.forEach(["l","r"],function(a){var o=i+a,l=e[o],d;if(l!==t){var u=fe.values(l);d=a==="l"?n-fe.min(u):s-fe.max(u),d&&(e[o]=fe.mapValues(l,function(f){return f+d}))}})})}function OZ(e,t){return fe.mapValues(e.ul,function(r,n){if(t)return e[t.toLowerCase()][n];var s=fe.sortBy(fe.map(e,n));return(s[1]+s[2])/2})}function zZ(e){var t=NZ.buildLayerMatrix(e),r=fe.merge(CZ(e,t),TZ(e,t)),n={},s;fe.forEach(["u","d"],function(a){s=a==="u"?t:fe.values(t).reverse(),fe.forEach(["l","r"],function(o){o==="r"&&(s=fe.map(s,function(f){return fe.values(f).reverse()}));var l=(a==="u"?e.predecessors:e.successors).bind(e),d=RZ(e,s,r,l),u=AZ(e,s,d.root,d.align,o==="r");o==="r"&&(u=fe.mapValues(u,function(f){return-f})),n[a+o]=u})});var i=IZ(e,n);return LZ(n,i),OZ(n,e.graph().align)}function FZ(e,t,r){return function(n,s,i){var a=n.node(s),o=n.node(i),l=0,d;if(l+=a.width/2,fe.has(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":d=-a.width/2;break;case"r":d=a.width/2;break}if(d&&(l+=r?d:-d),d=0,l+=(a.dummy?t:e)/2,l+=(o.dummy?t:e)/2,l+=o.width/2,fe.has(o,"labelpos"))switch(o.labelpos.toLowerCase()){case"l":d=o.width/2;break;case"r":d=-o.width/2;break}return d&&(l+=r?d:-d),d=0,l}}function $Z(e,t){return e.node(t).width}var zo=Xe,H3=ar,VZ=EZ.positionX,qZ=BZ;function BZ(e){e=H3.asNonCompoundGraph(e),UZ(e),zo.forEach(VZ(e),function(t,r){e.node(r).x=t})}function UZ(e){var t=H3.buildLayerMatrix(e),r=e.graph().ranksep,n=0;zo.forEach(t,function(s){var i=zo.max(zo.map(s,function(a){return e.node(a).height}));zo.forEach(s,function(a){e.node(a).y=n+i/2}),n+=i+r})}var ge=Xe,wC=DY,kC=ZY,HZ=wX,WZ=ar.normalizeRanks,GZ=SX,KZ=ar.removeEmptyRanks,jC=TX,YZ=IX,_C=OX,XZ=kZ,ZZ=qZ,Is=ar,QZ=tn.Graph,JZ=eQ;function eQ(e,t){var r=t&&t.debugTiming?Is.time:Is.notime;r("layout",function(){var n=r(" buildLayoutGraph",function(){return dQ(e)});r(" runLayout",function(){tQ(n,r)}),r(" updateInputGraph",function(){rQ(e,n)})})}function tQ(e,t){t(" makeSpaceForEdgeLabels",function(){fQ(e)}),t(" removeSelfEdges",function(){wQ(e)}),t(" acyclic",function(){wC.run(e)}),t(" nestingGraph.run",function(){jC.run(e)}),t(" rank",function(){HZ(Is.asNonCompoundGraph(e))}),t(" injectEdgeLabelProxies",function(){hQ(e)}),t(" removeEmptyRanks",function(){KZ(e)}),t(" nestingGraph.cleanup",function(){jC.cleanup(e)}),t(" normalizeRanks",function(){WZ(e)}),t(" assignRankMinMax",function(){pQ(e)}),t(" removeEdgeLabelProxies",function(){mQ(e)}),t(" normalize.run",function(){kC.run(e)}),t(" parentDummyChains",function(){GZ(e)}),t(" addBorderSegments",function(){YZ(e)}),t(" order",function(){XZ(e)}),t(" insertSelfEdges",function(){kQ(e)}),t(" adjustCoordinateSystem",function(){_C.adjust(e)}),t(" position",function(){ZZ(e)}),t(" positionSelfEdges",function(){jQ(e)}),t(" removeBorderNodes",function(){bQ(e)}),t(" normalize.undo",function(){kC.undo(e)}),t(" fixupEdgeLabelCoords",function(){xQ(e)}),t(" undoCoordinateSystem",function(){_C.undo(e)}),t(" translateGraph",function(){gQ(e)}),t(" assignNodeIntersects",function(){yQ(e)}),t(" reversePoints",function(){vQ(e)}),t(" acyclic.undo",function(){wC.undo(e)})}function rQ(e,t){ge.forEach(e.nodes(),function(r){var n=e.node(r),s=t.node(r);n&&(n.x=s.x,n.y=s.y,t.children(r).length&&(n.width=s.width,n.height=s.height))}),ge.forEach(e.edges(),function(r){var n=e.edge(r),s=t.edge(r);n.points=s.points,ge.has(s,"x")&&(n.x=s.x,n.y=s.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}var nQ=["nodesep","edgesep","ranksep","marginx","marginy"],sQ={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},iQ=["acyclicer","ranker","rankdir","align"],aQ=["width","height"],oQ={width:0,height:0},lQ=["minlen","weight","width","height","labeloffset"],cQ={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},uQ=["labelpos"];function dQ(e){var t=new QZ({multigraph:!0,compound:!0}),r=dy(e.graph());return t.setGraph(ge.merge({},sQ,uy(r,nQ),ge.pick(r,iQ))),ge.forEach(e.nodes(),function(n){var s=dy(e.node(n));t.setNode(n,ge.defaults(uy(s,aQ),oQ)),t.setParent(n,e.parent(n))}),ge.forEach(e.edges(),function(n){var s=dy(e.edge(n));t.setEdge(n,ge.merge({},cQ,uy(s,lQ),ge.pick(s,uQ)))}),t}function fQ(e){var t=e.graph();t.ranksep/=2,ge.forEach(e.edges(),function(r){var n=e.edge(r);n.minlen*=2,n.labelpos.toLowerCase()!=="c"&&(t.rankdir==="TB"||t.rankdir==="BT"?n.width+=n.labeloffset:n.height+=n.labeloffset)})}function hQ(e){ge.forEach(e.edges(),function(t){var r=e.edge(t);if(r.width&&r.height){var n=e.node(t.v),s=e.node(t.w),i={rank:(s.rank-n.rank)/2+n.rank,e:t};Is.addDummyNode(e,"edge-proxy",i,"_ep")}})}function pQ(e){var t=0;ge.forEach(e.nodes(),function(r){var n=e.node(r);n.borderTop&&(n.minRank=e.node(n.borderTop).rank,n.maxRank=e.node(n.borderBottom).rank,t=ge.max(t,n.maxRank))}),e.graph().maxRank=t}function mQ(e){ge.forEach(e.nodes(),function(t){var r=e.node(t);r.dummy==="edge-proxy"&&(e.edge(r.e).labelRank=r.rank,e.removeNode(t))})}function gQ(e){var t=Number.POSITIVE_INFINITY,r=0,n=Number.POSITIVE_INFINITY,s=0,i=e.graph(),a=i.marginx||0,o=i.marginy||0;function l(d){var u=d.x,f=d.y,h=d.width,p=d.height;t=Math.min(t,u-h/2),r=Math.max(r,u+h/2),n=Math.min(n,f-p/2),s=Math.max(s,f+p/2)}ge.forEach(e.nodes(),function(d){l(e.node(d))}),ge.forEach(e.edges(),function(d){var u=e.edge(d);ge.has(u,"x")&&l(u)}),t-=a,n-=o,ge.forEach(e.nodes(),function(d){var u=e.node(d);u.x-=t,u.y-=n}),ge.forEach(e.edges(),function(d){var u=e.edge(d);ge.forEach(u.points,function(f){f.x-=t,f.y-=n}),ge.has(u,"x")&&(u.x-=t),ge.has(u,"y")&&(u.y-=n)}),i.width=r-t+a,i.height=s-n+o}function yQ(e){ge.forEach(e.edges(),function(t){var r=e.edge(t),n=e.node(t.v),s=e.node(t.w),i,a;r.points?(i=r.points[0],a=r.points[r.points.length-1]):(r.points=[],i=s,a=n),r.points.unshift(Is.intersectRect(n,i)),r.points.push(Is.intersectRect(s,a))})}function xQ(e){ge.forEach(e.edges(),function(t){var r=e.edge(t);if(ge.has(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function vQ(e){ge.forEach(e.edges(),function(t){var r=e.edge(t);r.reversed&&r.points.reverse()})}function bQ(e){ge.forEach(e.nodes(),function(t){if(e.children(t).length){var r=e.node(t),n=e.node(r.borderTop),s=e.node(r.borderBottom),i=e.node(ge.last(r.borderLeft)),a=e.node(ge.last(r.borderRight));r.width=Math.abs(a.x-i.x),r.height=Math.abs(s.y-n.y),r.x=i.x+r.width/2,r.y=n.y+r.height/2}}),ge.forEach(e.nodes(),function(t){e.node(t).dummy==="border"&&e.removeNode(t)})}function wQ(e){ge.forEach(e.edges(),function(t){if(t.v===t.w){var r=e.node(t.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function kQ(e){var t=Is.buildLayerMatrix(e);ge.forEach(t,function(r){var n=0;ge.forEach(r,function(s,i){var a=e.node(s);a.order=i+n,ge.forEach(a.selfEdges,function(o){Is.addDummyNode(e,"selfedge",{width:o.label.width,height:o.label.height,rank:a.rank,order:i+ ++n,e:o.e,label:o.label},"_se")}),delete a.selfEdges})})}function jQ(e){ge.forEach(e.nodes(),function(t){var r=e.node(t);if(r.dummy==="selfedge"){var n=e.node(r.e.v),s=n.x+n.width/2,i=n.y,a=r.x-s,o=n.height/2;e.setEdge(r.e,r.label),e.removeNode(t),r.label.points=[{x:s+2*a/3,y:i-o},{x:s+5*a/6,y:i-o},{x:s+a,y:i},{x:s+5*a/6,y:i+o},{x:s+2*a/3,y:i+o}],r.label.x=r.x,r.label.y=r.y}})}function uy(e,t){return ge.mapValues(ge.pick(e,t),Number)}function dy(e){var t={};return ge.forEach(e,function(r,n){t[n.toLowerCase()]=r}),t}var Gc=Xe,_Q=ar,SQ=tn.Graph,NQ={debugOrdering:EQ};function EQ(e){var t=_Q.buildLayerMatrix(e),r=new SQ({compound:!0,multigraph:!0}).setGraph({});return Gc.forEach(e.nodes(),function(n){r.setNode(n,{label:n}),r.setParent(n,"layer"+e.node(n).rank)}),Gc.forEach(e.edges(),function(n){r.setEdge(n.v,n.w,{},n.name)}),Gc.forEach(t,function(n,s){var i="layer"+s;r.setNode(i,{rank:"same"}),Gc.reduce(n,function(a,o){return r.setEdge(a,o,{style:"invis"}),o})}),r}var CQ="0.8.5",TQ={graphlib:tn,layout:JZ,debug:NQ,util:{time:ar.time,notime:ar.notime},version:CQ};const SC=fd(TQ),nv=240,sv=100,NC=180,iv=50,PQ=(e,t,r="TB")=>{const n=new SC.graphlib.Graph;n.setDefaultEdgeLabel(()=>({}));const s=r==="LR";return n.setGraph({rankdir:r,nodesep:80,ranksep:100}),e.forEach(i=>{const a=i.type==="artifact"?NC:nv,o=i.type==="artifact"?iv:sv;n.setNode(i.id,{width:a,height:o})}),t.forEach(i=>{n.setEdge(i.source,i.target)}),SC.layout(n),e.forEach(i=>{const a=n.node(i.id);i.targetPosition=s?"left":"top",i.sourcePosition=s?"right":"bottom";const o=i.type==="artifact"?NC:nv,l=i.type==="artifact"?iv:sv;return i.position={x:a.x-o/2,y:a.y-l/2},i}),{nodes:e,edges:t}};function MQ({dag:e,steps:t,selectedStep:r,onStepSelect:n}){const{nodes:s,edges:i}=k.useMemo(()=>{if(!e||!e.nodes)return{nodes:[],edges:[]};const b=[],x=[],y=new Set,v=new Map,w=_=>{if(v.has(_))return v.get(_);const N=`artifact-${_}`;return y.has(N)||(b.push({id:N,type:"artifact",data:{label:_}}),y.add(N),v.set(_,N)),N};return e.nodes.forEach(_=>{var E,M;const N=(t==null?void 0:t[_.id])||{},j=N.success?"success":N.error?"failed":N.running?"running":"pending";b.push({id:_.id,type:"step",data:{label:_.name,status:j,duration:N.duration,cached:N.cached,selected:r===_.id}}),(E=_.inputs)==null||E.forEach(C=>{const D=w(C);x.push({id:`e-${D}-${_.id}`,source:D,target:_.id,type:"smoothstep",animated:!0,style:{stroke:"#94a3b8",strokeWidth:2},markerEnd:{type:Fa.ArrowClosed,color:"#94a3b8"}})}),(M=_.outputs)==null||M.forEach(C=>{const D=w(C);x.push({id:`e-${_.id}-${D}`,source:_.id,target:D,type:"smoothstep",animated:!0,style:{stroke:"#94a3b8",strokeWidth:2},markerEnd:{type:Fa.ArrowClosed,color:"#94a3b8"}})})}),{nodes:b,edges:x}},[e,t,r]),{nodes:a,edges:o}=k.useMemo(()=>PQ(s,i,"TB"),[s,i]),[l,d,u]=cW(a),[f,h,p]=uW(o);k.useEffect(()=>{d(a.map(b=>b.type==="step"?{...b,data:{...b.data,selected:r===b.id}}:b)),h(o)},[a,o,r,d,h]);const m=k.useCallback((b,x)=>{x.type==="step"&&n&&n(x.id)},[n]),g=k.useMemo(()=>({step:RQ,artifact:AQ}),[]);return c.jsx("div",{className:"w-full h-full bg-slate-50/50 rounded-xl border border-slate-200 overflow-hidden",children:c.jsxs(S4,{nodes:l,edges:f,onNodesChange:u,onEdgesChange:p,onNodeClick:m,nodeTypes:g,fitView:!0,attributionPosition:"bottom-left",minZoom:.2,maxZoom:1.5,defaultViewport:{x:0,y:0,zoom:.8},fitViewOptions:{padding:.2},children:[c.jsx(AW,{color:"#e2e8f0",gap:20,size:1}),c.jsx(EW,{className:"bg-white border border-slate-200 shadow-sm rounded-lg"}),c.jsx(bW,{nodeColor:b=>b.type==="step"?"#3b82f6":"#cbd5e1",maskColor:"rgba(241, 245, 249, 0.7)",className:"bg-white border border-slate-200 shadow-sm rounded-lg"})]})})}function RQ({data:e}){const t={success:{icon:c.jsx(Dt,{size:18}),color:"text-emerald-600",bg:"bg-white",border:"border-emerald-500",ring:"ring-emerald-200",shadow:"shadow-emerald-100"},failed:{icon:c.jsx(Yr,{size:18}),color:"text-rose-600",bg:"bg-white",border:"border-rose-500",ring:"ring-rose-200",shadow:"shadow-rose-100"},running:{icon:c.jsx(Hu,{size:18,className:"animate-spin"}),color:"text-amber-600",bg:"bg-white",border:"border-amber-500",ring:"ring-amber-200",shadow:"shadow-amber-100"},pending:{icon:c.jsx(Lt,{size:18}),color:"text-slate-400",bg:"bg-slate-50",border:"border-slate-300",ring:"ring-slate-200",shadow:"shadow-slate-100"}},r=t[e.status]||t.pending;return c.jsxs("div",{className:`
|
|
439
|
-
relative px-4 py-3 rounded-lg border-2 transition-all duration-200
|
|
440
|
-
${r.bg} ${r.border}
|
|
441
|
-
${e.selected?`ring-4 ${r.ring} shadow-lg`:`hover:shadow-md ${r.shadow}`}
|
|
442
|
-
`,style:{width:nv,height:sv},children:[c.jsx(Ds,{type:"target",position:ae.Top,className:"!bg-slate-400 !w-2 !h-2"}),c.jsxs("div",{className:"flex flex-col h-full justify-between",children:[c.jsxs("div",{className:"flex items-start gap-3",children:[c.jsx("div",{className:`p-1.5 rounded-md bg-slate-50 border border-slate-100 ${r.color}`,children:r.icon}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsx("h3",{className:"font-bold text-slate-900 text-sm truncate",title:e.label,children:e.label}),c.jsx("p",{className:"text-xs text-slate-500 capitalize",children:e.status})]})]}),e.duration!==void 0&&c.jsxs("div",{className:"flex items-center justify-between pt-2 border-t border-slate-100 mt-1",children:[c.jsxs("span",{className:"text-xs text-slate-400 font-mono",children:[e.duration.toFixed(2),"s"]}),e.cached&&c.jsx("span",{className:"text-[10px] font-bold text-blue-600 bg-blue-50 px-1.5 py-0.5 rounded uppercase tracking-wider",children:"Cached"})]})]}),c.jsx(Ds,{type:"source",position:ae.Bottom,className:"!bg-slate-400 !w-2 !h-2"})]})}function AQ({data:e}){return c.jsxs("div",{className:"px-3 py-2 rounded-full bg-slate-100 border border-slate-300 flex items-center justify-center gap-2 shadow-sm min-w-[120px]",style:{height:iv},children:[c.jsx(Ds,{type:"target",position:ae.Top,className:"!bg-slate-400 !w-2 !h-2"}),c.jsx(Dr,{size:12,className:"text-slate-500"}),c.jsx("span",{className:"text-xs font-medium text-slate-700 truncate max-w-[140px]",title:e.label,children:e.label}),c.jsx(Ds,{type:"source",position:ae.Bottom,className:"!bg-slate-400 !w-2 !h-2"})]})}function DQ({code:e,language:t="python",title:r,className:n=""}){const[s,i]=k.useState(!1),a=()=>{navigator.clipboard.writeText(e),i(!0),setTimeout(()=>i(!1),2e3)};return c.jsxs("div",{className:`relative group ${n}`,children:[r&&c.jsxs("div",{className:"flex items-center justify-between px-4 py-2 bg-slate-800 dark:bg-slate-900 border-b border-slate-700 rounded-t-lg",children:[c.jsx("span",{className:"text-sm font-medium text-slate-300",children:r}),c.jsx("span",{className:"text-xs text-slate-500 uppercase font-mono",children:t})]}),c.jsxs("div",{className:"relative",children:[c.jsx("pre",{className:`p-4 bg-slate-900 dark:bg-slate-950 text-slate-100 text-sm font-mono overflow-x-auto leading-relaxed ${r?"":"rounded-t-lg"} rounded-b-lg`,children:c.jsx("code",{className:`language-${t}`,children:e})}),c.jsx("button",{onClick:a,className:"absolute top-3 right-3 p-2 bg-slate-800 hover:bg-slate-700 text-slate-400 hover:text-slate-200 rounded-md transition-all opacity-0 group-hover:opacity-100",title:"Copy to clipboard",children:s?c.jsx(iM,{size:14}):c.jsx(Bu,{size:14})})]})]})}function IQ(){var v,w;const{runId:e}=ZP(),[t,r]=k.useState(null),[n,s]=k.useState([]),[i,a]=k.useState([]),[o,l]=k.useState(!0),[d,u]=k.useState(null),[f,h]=k.useState("overview"),[p,m]=k.useState(null);if(k.useEffect(()=>{(async()=>{try{const[N,j]=await Promise.all([gt(`/api/runs/${e}`),gt(`/api/assets?run_id=${e}`)]),E=await N.json(),M=await j.json();let C=[];try{const D=await gt(`/api/runs/${e}/metrics`);D.ok&&(C=(await D.json()).metrics||[])}catch(D){console.warn("Failed to fetch metrics",D)}r(E),s(M.assets||[]),a(C),E.steps&&Object.keys(E.steps).length>0&&u(Object.keys(E.steps)[0]),l(!1)}catch(N){console.error(N),l(!1)}})()},[e]),o)return c.jsx("div",{className:"flex items-center justify-center h-96",children:c.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary-600"})});if(!t)return c.jsx("div",{className:"p-8 text-center text-slate-500",children:"Run not found"});const g=t.status==="completed"?"success":t.status==="failed"?"danger":"warning",b=d?(v=t.steps)==null?void 0:v[d]:null,x=n.filter(_=>_.step===d),y=i.filter(_=>_.step===d||_.name.startsWith(d));return c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"flex items-center justify-between bg-white p-6 rounded-xl border border-slate-100 shadow-sm",children:[c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[c.jsx(Nt,{to:"/runs",className:"text-sm text-slate-500 hover:text-slate-700 transition-colors",children:"Runs"}),c.jsx(wl,{size:14,className:"text-slate-300"}),c.jsx("span",{className:"text-sm text-slate-900 font-medium",children:t.run_id})]}),c.jsxs("h2",{className:"text-2xl font-bold text-slate-900 flex items-center gap-3",children:[c.jsx("div",{className:`w-3 h-3 rounded-full ${t.status==="completed"?"bg-emerald-500":t.status==="failed"?"bg-rose-500":"bg-amber-500"}`}),"Run: ",c.jsx("span",{className:"font-mono text-slate-500",children:t.run_id.substring(0,8)})]}),c.jsxs("p",{className:"text-slate-500 mt-1 flex items-center gap-2",children:[c.jsx(Yo,{size:16}),"Pipeline: ",c.jsx("span",{className:"font-medium text-slate-700",children:t.pipeline_name})]})]}),c.jsxs("div",{className:"flex flex-col items-end gap-2",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(VQ,{runId:t.run_id,currentProject:t.project}),c.jsx(Et,{variant:g,className:"text-sm px-4 py-1.5 uppercase tracking-wide shadow-sm",children:t.status})]}),c.jsxs("span",{className:"text-xs text-slate-400 font-mono",children:["ID: ",t.run_id]})]})]}),c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[c.jsx(fy,{icon:c.jsx(Lt,{size:24}),label:"Duration",value:t.duration?`${t.duration.toFixed(2)}s`:"-",color:"blue"}),c.jsx(fy,{icon:c.jsx(ir,{size:24}),label:"Started At",value:t.start_time?Ye(new Date(t.start_time),"MMM d, HH:mm:ss"):"-",color:"purple"}),c.jsx(fy,{icon:c.jsx(Dt,{size:24}),label:"Steps Completed",value:`${t.steps?Object.values(t.steps).filter(_=>_.success).length:0} / ${t.steps?Object.keys(t.steps).length:0}`,color:"emerald"})]}),c.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[c.jsxs("div",{className:"lg:col-span-2",children:[c.jsxs("h3",{className:"text-xl font-bold text-slate-900 mb-4 flex items-center gap-2",children:[c.jsx(Bt,{className:"text-primary-500"})," Pipeline Execution Graph"]}),c.jsx("div",{className:"h-[600px]",children:t.dag?c.jsx(MQ,{dag:t.dag,steps:t.steps,selectedStep:d,onStepSelect:u}):c.jsx(Me,{className:"h-full flex items-center justify-center",children:c.jsx("p",{className:"text-slate-500",children:"DAG visualization not available"})})})]}),c.jsxs("div",{children:[c.jsxs("h3",{className:"text-xl font-bold text-slate-900 mb-4 flex items-center gap-2",children:[c.jsx(a2,{className:"text-primary-500"})," Step Details"]}),b?c.jsxs(Me,{className:"overflow-hidden",children:[c.jsxs("div",{className:"pb-4 border-b border-slate-100",children:[c.jsx("h4",{className:"text-lg font-bold text-slate-900 mb-2",children:d}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(Et,{variant:b.success?"success":"danger",className:"text-xs",children:b.success?"Success":"Failed"}),b.cached&&c.jsx(Et,{variant:"secondary",className:"text-xs bg-blue-50 text-blue-700",children:"Cached"}),c.jsxs("span",{className:"text-xs font-mono text-slate-500 bg-slate-100 px-2 py-0.5 rounded",children:[(w=b.duration)==null?void 0:w.toFixed(2),"s"]})]})]}),c.jsxs("div",{className:"flex gap-2 border-b border-slate-100 mt-4",children:[c.jsxs(hy,{active:f==="overview",onClick:()=>h("overview"),children:[c.jsx(a2,{size:16})," Overview"]}),c.jsxs(hy,{active:f==="code",onClick:()=>h("code"),children:[c.jsx(v6,{size:16})," Code"]}),c.jsxs(hy,{active:f==="artifacts",onClick:()=>h("artifacts"),children:[c.jsx(ki,{size:16})," Artifacts"]})]}),c.jsxs("div",{className:"mt-4 max-h-[450px] overflow-y-auto",children:[f==="overview"&&c.jsx(LQ,{stepData:b,metrics:y}),f==="code"&&c.jsx(zQ,{sourceCode:b.source_code}),f==="artifacts"&&c.jsx(FQ,{artifacts:x,onArtifactClick:m})]})]}):c.jsx(Me,{className:"p-12 text-center",children:c.jsx("p",{className:"text-slate-500",children:"Select a step to view details"})})]})]}),c.jsx($Q,{artifact:p,onClose:()=>m(null)})]})}function fy({icon:e,label:t,value:r,color:n}){const s={blue:"bg-blue-50 text-blue-600",purple:"bg-purple-50 text-purple-600",emerald:"bg-emerald-50 text-emerald-600"};return c.jsx(Me,{className:"hover:shadow-md transition-shadow duration-200",children:c.jsxs("div",{className:"flex items-center gap-4",children:[c.jsx("div",{className:`p-3 rounded-xl ${s[n]}`,children:e}),c.jsxs("div",{children:[c.jsx("p",{className:"text-sm text-slate-500 font-medium",children:t}),c.jsx("p",{className:"text-xl font-bold text-slate-900",children:r})]})]})})}function hy({active:e,onClick:t,children:r}){return c.jsx("button",{onClick:t,className:`
|
|
443
|
-
flex items-center gap-2 px-4 py-2 text-sm font-medium transition-colors
|
|
444
|
-
${e?"text-primary-600 border-b-2 border-primary-600":"text-slate-500 hover:text-slate-700"}
|
|
445
|
-
`,children:r})}function LQ({stepData:e,metrics:t}){var n,s,i,a;const r=o=>{if(!o)return"N/A";if(o<1)return`${(o*1e3).toFixed(0)}ms`;if(o<60)return`${o.toFixed(2)}s`;const l=Math.floor(o/60),d=(o%60).toFixed(0);return`${l}m ${d}s`};return c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[c.jsxs("div",{className:"p-4 bg-gradient-to-br from-slate-50 to-white rounded-xl border border-slate-200",children:[c.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[c.jsx(Lt,{size:14,className:"text-slate-400"}),c.jsx("span",{className:"text-xs font-medium text-slate-500 uppercase tracking-wide",children:"Duration"})]}),c.jsx("p",{className:"text-2xl font-bold text-slate-900",children:r(e.duration)})]}),c.jsxs("div",{className:"p-4 bg-gradient-to-br from-slate-50 to-white rounded-xl border border-slate-200",children:[c.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[c.jsx(Bt,{size:14,className:"text-slate-400"}),c.jsx("span",{className:"text-xs font-medium text-slate-500 uppercase tracking-wide",children:"Status"})]}),c.jsx("div",{className:"flex items-center gap-2",children:e.success?c.jsxs(c.Fragment,{children:[c.jsx(Dt,{size:20,className:"text-emerald-500"}),c.jsx("span",{className:"text-lg font-bold text-emerald-700",children:"Success"})]}):e.error?c.jsxs(c.Fragment,{children:[c.jsx(Yr,{size:20,className:"text-rose-500"}),c.jsx("span",{className:"text-lg font-bold text-rose-700",children:"Failed"})]}):c.jsxs(c.Fragment,{children:[c.jsx(Lt,{size:20,className:"text-amber-500"}),c.jsx("span",{className:"text-lg font-bold text-amber-700",children:"Pending"})]})})]})]}),(((n=e.inputs)==null?void 0:n.length)>0||((s=e.outputs)==null?void 0:s.length)>0)&&c.jsxs("div",{className:"space-y-4",children:[c.jsxs("h5",{className:"text-sm font-bold text-slate-700 uppercase tracking-wide flex items-center gap-2",children:[c.jsx(Dr,{size:16}),"Data Flow"]}),c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[((i=e.inputs)==null?void 0:i.length)>0&&c.jsxs("div",{className:"p-4 bg-blue-50/50 dark:bg-blue-900/10 rounded-xl border border-blue-100 dark:border-blue-800",children:[c.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[c.jsx(f6,{size:16,className:"text-blue-600"}),c.jsx("span",{className:"text-sm font-semibold text-blue-900 dark:text-blue-100",children:"Inputs"}),c.jsx(Et,{variant:"secondary",className:"ml-auto text-xs",children:e.inputs.length})]}),c.jsx("div",{className:"space-y-1.5",children:e.inputs.map((o,l)=>c.jsxs("div",{className:"flex items-center gap-2 p-2 bg-white dark:bg-slate-800 rounded-lg border border-blue-100 dark:border-blue-800/50",children:[c.jsx(Dr,{size:12,className:"text-blue-500 flex-shrink-0"}),c.jsx("span",{className:"text-sm font-mono text-slate-700 dark:text-slate-200 truncate",children:o})]},l))})]}),((a=e.outputs)==null?void 0:a.length)>0&&c.jsxs("div",{className:"p-4 bg-purple-50/50 dark:bg-purple-900/10 rounded-xl border border-purple-100 dark:border-purple-800",children:[c.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[c.jsx(h6,{size:16,className:"text-purple-600"}),c.jsx("span",{className:"text-sm font-semibold text-purple-900 dark:text-purple-100",children:"Outputs"}),c.jsx(Et,{variant:"secondary",className:"ml-auto text-xs",children:e.outputs.length})]}),c.jsx("div",{className:"space-y-1.5",children:e.outputs.map((o,l)=>c.jsxs("div",{className:"flex items-center gap-2 p-2 bg-white dark:bg-slate-800 rounded-lg border border-purple-100 dark:border-purple-800/50",children:[c.jsx(Ra,{size:12,className:"text-purple-500 flex-shrink-0"}),c.jsx("span",{className:"text-sm font-mono text-slate-700 dark:text-slate-200 truncate",children:o})]},l))})]})]})]}),e.tags&&Object.keys(e.tags).length>0&&c.jsxs("div",{children:[c.jsxs("h5",{className:"text-sm font-bold text-slate-700 uppercase tracking-wide mb-3 flex items-center gap-2",children:[c.jsx(A6,{size:16}),"Metadata"]}),c.jsx("div",{className:"grid grid-cols-2 gap-3",children:Object.entries(e.tags).map(([o,l])=>c.jsxs("div",{className:"p-3 bg-slate-50 dark:bg-slate-800 rounded-lg border border-slate-200 dark:border-slate-700",children:[c.jsx("div",{className:"text-xs text-slate-500 dark:text-slate-400 mb-1",children:o}),c.jsx("div",{className:"text-sm font-mono font-medium text-slate-900 dark:text-white truncate",children:String(l)})]},o))})]}),e.cached&&c.jsx("div",{className:"p-4 bg-gradient-to-r from-blue-50 to-cyan-50 dark:from-blue-900/20 dark:to-cyan-900/20 rounded-xl border-2 border-blue-200 dark:border-blue-800",children:c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx(Gu,{size:24,className:"text-blue-600"}),c.jsxs("div",{children:[c.jsx("h6",{className:"font-bold text-blue-900 dark:text-blue-100",children:"Cached Result"}),c.jsx("p",{className:"text-sm text-blue-700 dark:text-blue-300",children:"This step used cached results from a previous run"})]})]})}),e.error&&c.jsxs("div",{children:[c.jsxs("h5",{className:"text-sm font-bold text-rose-700 uppercase tracking-wide mb-3 flex items-center gap-2",children:[c.jsx(Pd,{size:16}),"Error Details"]}),c.jsx("div",{className:"p-4 bg-rose-50 dark:bg-rose-900/20 rounded-xl border-2 border-rose-200 dark:border-rose-800",children:c.jsx("pre",{className:"text-sm font-mono text-rose-700 dark:text-rose-300 whitespace-pre-wrap overflow-x-auto",children:e.error})})]}),(t==null?void 0:t.length)>0&&c.jsxs("div",{children:[c.jsxs("h5",{className:"text-sm font-bold text-slate-700 uppercase tracking-wide mb-3 flex items-center gap-2",children:[c.jsx(Wl,{size:16}),"Performance Metrics"]}),c.jsx("div",{className:"grid grid-cols-2 gap-3",children:t.map((o,l)=>c.jsx(OQ,{metric:o},l))})]})]})}function OQ({metric:e}){const t=typeof e.value=="number",r=t?e.value.toFixed(4):e.value;return c.jsxs("div",{className:"p-3 bg-gradient-to-br from-slate-50 to-white rounded-lg border border-slate-200 hover:border-primary-300 transition-all group",children:[c.jsx("span",{className:"text-xs text-slate-500 block truncate mb-1",title:e.name,children:e.name}),c.jsxs("div",{className:"flex items-baseline gap-2",children:[c.jsx("span",{className:"text-xl font-mono font-bold text-slate-900 group-hover:text-primary-600 transition-colors",children:r}),t&&e.value>0&&c.jsx(Wl,{size:14,className:"text-emerald-500"})]})]})}function zQ({sourceCode:e}){return c.jsx(DQ,{code:e||"# Source code not available",language:"python",title:"Step Source Code"})}function FQ({artifacts:e,onArtifactClick:t}){return c.jsxs("div",{children:[c.jsx("h5",{className:"text-sm font-semibold text-slate-700 mb-3",children:"Produced Artifacts"}),(e==null?void 0:e.length)>0?c.jsx("div",{className:"space-y-2",children:e.map(r=>c.jsxs(Le.div,{whileHover:{scale:1.02},whileTap:{scale:.98},onClick:()=>t(r),className:"group flex items-center gap-3 p-3 bg-slate-50 hover:bg-white rounded-lg border border-slate-100 hover:border-primary-300 hover:shadow-md transition-all cursor-pointer",children:[c.jsx("div",{className:"p-2 bg-white rounded-md text-slate-500 shadow-sm group-hover:text-primary-600 group-hover:scale-110 transition-all",children:r.type==="Dataset"?c.jsx(Dr,{size:18}):r.type==="Model"?c.jsx(Ra,{size:18}):r.type==="Metrics"?c.jsx(bl,{size:18}):c.jsx(kl,{size:18})}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsx("p",{className:"text-sm font-semibold text-slate-900 truncate group-hover:text-primary-600 transition-colors",children:r.name}),c.jsx("p",{className:"text-xs text-slate-500 truncate",children:r.type})]}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(C6,{size:14,className:"text-slate-300 group-hover:text-primary-400 transition-colors"}),c.jsx(Ps,{size:14,className:"text-slate-300 group-hover:text-primary-400 opacity-0 group-hover:opacity-100 transition-all"})]})]},r.artifact_id))}):c.jsx("p",{className:"text-sm text-slate-500 italic",children:"No artifacts produced by this step"})]})}function $Q({artifact:e,onClose:t}){return e?c.jsx(Xl,{children:c.jsx(Le.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/50 backdrop-blur-sm z-50 flex items-center justify-center p-4",onClick:t,children:c.jsxs(Le.div,{initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},onClick:r=>r.stopPropagation(),className:"bg-white rounded-2xl shadow-2xl max-w-3xl w-full max-h-[80vh] overflow-hidden",children:[c.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-slate-100 bg-gradient-to-r from-primary-50 to-purple-50",children:[c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("div",{className:"p-3 bg-white rounded-xl shadow-sm",children:e.type==="Dataset"?c.jsx(Dr,{size:24,className:"text-blue-600"}):e.type==="Model"?c.jsx(Ra,{size:24,className:"text-purple-600"}):e.type==="Metrics"?c.jsx(bl,{size:24,className:"text-emerald-600"}):c.jsx(kl,{size:24,className:"text-slate-600"})}),c.jsxs("div",{children:[c.jsx("h3",{className:"text-xl font-bold text-slate-900",children:e.name}),c.jsx("p",{className:"text-sm text-slate-500",children:e.type})]})]}),c.jsx("button",{onClick:t,className:"p-2 hover:bg-white rounded-lg transition-colors",children:c.jsx(cb,{size:20,className:"text-slate-400"})})]}),c.jsx("div",{className:"p-6 overflow-y-auto max-h-[60vh]",children:c.jsxs("div",{className:"space-y-4",children:[e.properties&&Object.keys(e.properties).length>0&&c.jsxs("div",{children:[c.jsx("h4",{className:"text-sm font-semibold text-slate-700 mb-3",children:"Properties"}),c.jsx("div",{className:"grid grid-cols-2 gap-3",children:Object.entries(e.properties).map(([r,n])=>c.jsxs("div",{className:"p-3 bg-slate-50 rounded-lg border border-slate-100",children:[c.jsx("span",{className:"text-xs text-slate-500 block mb-1",children:r}),c.jsx("span",{className:"text-sm font-mono font-semibold text-slate-900",children:typeof n=="object"?JSON.stringify(n):String(n)})]},r))})]}),e.value&&c.jsxs("div",{children:[c.jsx("h4",{className:"text-sm font-semibold text-slate-700 mb-3",children:"Value Preview"}),c.jsx("pre",{className:"p-4 bg-slate-900 text-slate-100 rounded-lg text-xs font-mono overflow-x-auto",children:e.value})]}),c.jsxs("div",{children:[c.jsx("h4",{className:"text-sm font-semibold text-slate-700 mb-3",children:"Metadata"}),c.jsxs("div",{className:"space-y-2 text-sm",children:[c.jsxs("div",{className:"flex justify-between",children:[c.jsx("span",{className:"text-slate-500",children:"Artifact ID:"}),c.jsx("span",{className:"font-mono text-xs text-slate-700",children:e.artifact_id})]}),c.jsxs("div",{className:"flex justify-between",children:[c.jsx("span",{className:"text-slate-500",children:"Step:"}),c.jsx("span",{className:"font-medium text-slate-700",children:e.step})]}),e.created_at&&c.jsxs("div",{className:"flex justify-between",children:[c.jsx("span",{className:"text-slate-500",children:"Created:"}),c.jsx("span",{className:"text-slate-700",children:Ye(new Date(e.created_at),"MMM d, yyyy HH:mm:ss")})]})]})]})]})}),c.jsxs("div",{className:"p-4 border-t border-slate-100 bg-slate-50 flex justify-end gap-2",children:[c.jsx(me,{variant:"ghost",onClick:t,children:"Close"}),c.jsx(me,{variant:"primary",children:"Download"})]})]})})}):null}function VQ({runId:e,currentProject:t}){const[r,n]=k.useState(!1),[s,i]=k.useState([]),[a,o]=k.useState(!1);k.useEffect(()=>{r&&fetch("/api/projects/").then(d=>d.json()).then(d=>i(d)).catch(d=>console.error("Failed to load projects:",d))},[r]);const l=async d=>{o(!0);try{await fetch(`/api/runs/${e}/project`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({project_name:d})});const u=document.createElement("div");u.className="fixed top-4 right-4 px-4 py-3 rounded-lg shadow-lg z-50 bg-green-500 text-white",u.textContent=`Run added to project ${d}`,document.body.appendChild(u),setTimeout(()=>document.body.removeChild(u),3e3),n(!1),setTimeout(()=>window.location.reload(),500)}catch(u){console.error("Failed to update project:",u)}finally{o(!1)}};return c.jsxs("div",{className:"relative",children:[c.jsxs("button",{onClick:()=>n(!r),disabled:a,className:"flex items-center gap-2 px-3 py-1.5 text-sm font-medium text-slate-600 dark:text-slate-300 bg-white dark:bg-slate-800 border border-slate-200 dark:border-slate-700 rounded-lg hover:bg-slate-50 dark:hover:bg-slate-700 transition-colors disabled:opacity-50",title:t?`Current project: ${t}`:"Add to project",children:[c.jsx(Md,{size:16}),t||"Add to Project"]}),r&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>n(!1)}),c.jsxs("div",{className:"absolute right-0 mt-2 w-56 bg-white dark:bg-slate-800 rounded-xl shadow-xl border border-slate-200 dark:border-slate-700 z-20",children:[c.jsx("div",{className:"p-2 border-b border-slate-100 dark:border-slate-700",children:c.jsx("span",{className:"text-xs font-semibold text-slate-500 px-2",children:"Select Project"})}),c.jsx("div",{className:"max-h-64 overflow-y-auto p-1",children:s.length>0?s.map(d=>c.jsxs("button",{onClick:()=>l(d.name),disabled:a,className:`w-full text-left px-3 py-2 text-sm rounded-lg transition-colors ${d.name===t?"bg-primary-50 dark:bg-primary-900/20 text-primary-700 dark:text-primary-300 font-medium":"text-slate-700 dark:text-slate-200 hover:bg-slate-50 dark:hover:bg-slate-700"}`,children:[d.name," ",d.name===t&&"✓"]},d.name)):c.jsx("div",{className:"px-3 py-2 text-sm text-slate-400",children:"No projects found"})})]})]})]})}function qQ({label:e,value:t,icon:r,className:n="",valueClassName:s=""}){return c.jsxs("div",{className:`flex items-start justify-between p-3 bg-slate-50 dark:bg-slate-800/50 rounded-lg border border-slate-200 dark:border-slate-700 ${n}`,children:[c.jsxs("div",{className:"flex items-center gap-2",children:[r&&c.jsx("span",{className:"text-slate-400",children:r}),c.jsx("span",{className:"text-sm font-medium text-slate-600 dark:text-slate-400",children:e})]}),c.jsx("span",{className:`text-sm font-mono font-semibold text-slate-900 dark:text-white text-right ${s}`,children:t})]})}function BQ({items:e,columns:t=2,className:r=""}){return c.jsx("div",{className:`grid grid-cols-1 md:grid-cols-${t} gap-3 ${r}`,children:e.map((n,s)=>c.jsx(qQ,{...n},s))})}function UQ(){const[e,t]=k.useState([]),[r,n]=k.useState(!0),[s,i]=k.useState("all"),[a,o]=k.useState(null),{selectedProject:l}=Bn();k.useEffect(()=>{(async()=>{n(!0);try{const m=l?`/api/assets?limit=50&project=${encodeURIComponent(l)}`:"/api/assets?limit=50",b=await(await gt(m)).json();t(b.assets||[])}catch(m){console.error(m)}finally{n(!1)}})()},[l]);const d=["all",...new Set(e.map(p=>p.type))],u=e.filter(p=>s==="all"||p.type===s),f=[{header:"Type",key:"type",sortable:!0,render:p=>{const m={Dataset:{icon:c.jsx(Dr,{size:16}),color:"text-blue-600",bg:"bg-blue-50"},Model:{icon:c.jsx(Ra,{size:16}),color:"text-purple-600",bg:"bg-purple-50"},Metrics:{icon:c.jsx(bl,{size:16}),color:"text-emerald-600",bg:"bg-emerald-50"},default:{icon:c.jsx(kl,{size:16}),color:"text-slate-600",bg:"bg-slate-50"}},g=m[p.type]||m.default;return c.jsxs("div",{className:`flex items-center gap-2 px-2 py-1 rounded-md w-fit ${g.bg} ${g.color}`,children:[g.icon,c.jsx("span",{className:"text-xs font-medium",children:p.type})]})}},{header:"Name",key:"name",sortable:!0,render:p=>c.jsx("span",{className:"font-medium text-slate-900 dark:text-white",children:p.name})},{header:"Step",key:"step",sortable:!0,render:p=>c.jsx("span",{className:"font-mono text-xs text-slate-500",children:p.step})},{header:"Pipeline",key:"pipeline",sortable:!0,render:p=>c.jsx("span",{className:"text-sm text-slate-600 dark:text-slate-400",children:p.pipeline_name||"-"})},{header:"Project",key:"project",sortable:!0,render:p=>c.jsx("span",{className:"text-sm text-slate-600 dark:text-slate-400",children:p.project||"-"})},{header:"Run ID",key:"run_id",render:p=>p.run_id?c.jsxs(Nt,{to:`/runs/${p.run_id}`,className:"font-mono text-xs bg-slate-100 dark:bg-slate-700 px-2 py-1 rounded text-primary-600 dark:text-primary-400 hover:bg-primary-50 dark:hover:bg-primary-900/20 transition-colors",children:[p.run_id.substring(0,8),"..."]}):c.jsx("span",{className:"font-mono text-xs text-slate-400",children:"-"})},{header:"Created",key:"created_at",sortable:!0,render:p=>c.jsxs("div",{className:"flex items-center gap-2 text-slate-500",children:[c.jsx(ir,{size:14}),p.created_at?Ye(new Date(p.created_at),"MMM d, HH:mm"):"-"]})},{header:"Actions",key:"actions",render:p=>c.jsxs("button",{onClick:()=>o(p),className:"text-primary-600 hover:text-primary-700 font-medium text-sm flex items-center gap-1",children:["View ",c.jsx(fx,{size:14})]})}],h=p=>{const m={Dataset:{icon:c.jsx(Dr,{size:20}),color:"blue"},Model:{icon:c.jsx(Ra,{size:20}),color:"purple"},Metrics:{icon:c.jsx(bl,{size:20}),color:"emerald"},default:{icon:c.jsx(kl,{size:20}),color:"slate"}},g=m[p.type]||m.default,b={blue:"from-blue-500 to-cyan-500",purple:"from-purple-500 to-pink-500",emerald:"from-emerald-500 to-teal-500",slate:"from-slate-500 to-slate-600"};return c.jsxs(Me,{className:"group cursor-pointer hover:shadow-xl hover:border-primary-300 transition-all duration-200 overflow-hidden h-full",onClick:()=>o(p),children:[c.jsxs("div",{className:"flex items-start justify-between mb-3",children:[c.jsx("div",{className:`p-3 rounded-xl bg-gradient-to-br ${b[g.color]} text-white shadow-lg group-hover:scale-110 transition-transform`,children:g.icon}),c.jsx("button",{className:"p-2 hover:bg-slate-100 dark:hover:bg-slate-700 rounded-lg transition-colors opacity-0 group-hover:opacity-100",children:c.jsx(fx,{size:16,className:"text-slate-400"})})]}),c.jsx("h4",{className:"font-bold text-slate-900 dark:text-white mb-1 truncate group-hover:text-primary-600 transition-colors",children:p.name}),c.jsxs("div",{className:"space-y-2 text-xs text-slate-500 dark:text-slate-400",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("span",{children:"Step:"}),c.jsx("span",{className:"font-mono text-slate-700 dark:text-slate-300 truncate ml-2",children:p.step})]}),p.created_at&&c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("span",{children:"Created:"}),c.jsx("span",{className:"text-slate-700 dark:text-slate-300",children:Ye(new Date(p.created_at),"MMM d, HH:mm")})]})]}),p.properties&&Object.keys(p.properties).length>0&&c.jsx("div",{className:"mt-3 pt-3 border-t border-slate-100 dark:border-slate-700",children:c.jsxs("span",{className:"text-xs text-slate-500",children:[Object.keys(p.properties).length," properties"]})})]})};return r?c.jsx("div",{className:"flex items-center justify-center h-96",children:c.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary-600"})}):c.jsxs("div",{className:"p-6 max-w-7xl mx-auto space-y-6",children:[c.jsxs("div",{className:"flex items-center gap-2 overflow-x-auto pb-2",children:[c.jsx(aM,{size:16,className:"text-slate-400 shrink-0"}),c.jsx("div",{className:"flex gap-2",children:d.map(p=>c.jsxs("button",{onClick:()=>i(p),className:`px-3 py-1.5 rounded-lg text-sm font-medium transition-all whitespace-nowrap ${s===p?"bg-primary-500 text-white shadow-md":"bg-slate-100 dark:bg-slate-800 text-slate-600 dark:text-slate-300 hover:bg-slate-200 dark:hover:bg-slate-700"}`,children:[p==="all"?"All Types":p,p!=="all"&&c.jsxs("span",{className:"ml-1.5 text-xs opacity-75",children:["(",e.filter(m=>m.type===p).length,")"]})]},p))})]}),c.jsx(Ka,{title:"Artifacts",subtitle:"Browse and manage pipeline artifacts and outputs",items:u,loading:r,columns:f,renderGrid:h,emptyState:c.jsx(Ql,{icon:ki,title:"No artifacts found",description:s!=="all"?"Try adjusting your filters":"Run a pipeline to generate artifacts"})}),c.jsx(HQ,{asset:a,onClose:()=>o(null)})]})}function HQ({asset:e,onClose:t}){if(!e)return null;const r={Dataset:{icon:c.jsx(Dr,{size:24}),color:"text-blue-600",bg:"bg-blue-50"},Model:{icon:c.jsx(Ra,{size:24}),color:"text-purple-600",bg:"bg-purple-50"},Metrics:{icon:c.jsx(bl,{size:24}),color:"text-emerald-600",bg:"bg-emerald-50"},default:{icon:c.jsx(kl,{size:24}),color:"text-slate-600",bg:"bg-slate-50"}},n=r[e.type]||r.default;return c.jsx(Xl,{children:c.jsx(Le.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/50 backdrop-blur-sm z-50 flex items-center justify-center p-4",onClick:t,children:c.jsxs(Le.div,{initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},onClick:s=>s.stopPropagation(),className:"bg-white dark:bg-slate-800 rounded-2xl shadow-2xl max-w-4xl w-full max-h-[85vh] overflow-hidden border border-slate-200 dark:border-slate-700",children:[c.jsxs("div",{className:`flex items-center justify-between p-6 border-b border-slate-100 dark:border-slate-700 ${n.bg} dark:bg-slate-800`,children:[c.jsxs("div",{className:"flex items-center gap-4",children:[c.jsx("div",{className:`p-3 bg-white dark:bg-slate-700 rounded-xl shadow-sm ${n.color}`,children:n.icon}),c.jsxs("div",{children:[c.jsx("h3",{className:"text-2xl font-bold text-slate-900 dark:text-white",children:e.name}),c.jsxs("p",{className:"text-sm text-slate-500 mt-1",children:[e.type," • ",e.step]})]})]}),c.jsx("button",{onClick:t,className:"p-2 hover:bg-white dark:hover:bg-slate-700 rounded-lg transition-colors",children:c.jsx(cb,{size:20,className:"text-slate-400"})})]}),c.jsx("div",{className:"p-6 overflow-y-auto max-h-[calc(85vh-200px)]",children:c.jsxs("div",{className:"space-y-6",children:[e.properties&&Object.keys(e.properties).length>0&&c.jsxs("div",{children:[c.jsx("h4",{className:"text-lg font-semibold text-slate-900 dark:text-white mb-4",children:"Properties"}),c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:Object.entries(e.properties).map(([s,i])=>c.jsxs("div",{className:"p-4 bg-slate-50 dark:bg-slate-700/50 rounded-lg border border-slate-100 dark:border-slate-700",children:[c.jsx("span",{className:"text-sm text-slate-500 dark:text-slate-400 block mb-2 font-medium",children:s}),c.jsx("span",{className:"text-base font-mono font-semibold text-slate-900 dark:text-white break-all",children:typeof i=="object"?JSON.stringify(i,null,2):String(i)})]},s))})]}),e.value&&c.jsxs("div",{children:[c.jsx("h4",{className:"text-lg font-semibold text-slate-900 dark:text-white mb-4",children:"Value Preview"}),c.jsx("pre",{className:"p-4 bg-slate-900 text-slate-100 rounded-lg text-sm font-mono overflow-x-auto leading-relaxed",children:e.value})]}),c.jsxs("div",{children:[c.jsx("h4",{className:"text-lg font-semibold text-slate-900 dark:text-white mb-4",children:"Metadata"}),c.jsx(BQ,{items:[{label:"Artifact ID",value:e.artifact_id,valueClassName:"font-mono text-xs"},{label:"Type",value:e.type},{label:"Step",value:e.step},{label:"Run ID",value:e.run_id,valueClassName:"font-mono text-xs"},...e.created_at?[{label:"Created At",value:Ye(new Date(e.created_at),"MMM d, yyyy HH:mm:ss")}]:[],...e.path?[{label:"Path",value:e.path,valueClassName:"font-mono text-xs"}]:[]],columns:2})]})]})}),c.jsxs("div",{className:"p-4 border-t border-slate-100 dark:border-slate-700 bg-slate-50 dark:bg-slate-800 flex justify-between items-center",children:[c.jsx("span",{className:"text-sm text-slate-500",children:e.created_at&&`Created ${Ye(new Date(e.created_at),"MMM d, yyyy")}`}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx(me,{variant:"ghost",onClick:t,children:"Close"}),c.jsxs(me,{variant:"primary",className:"flex items-center gap-2",children:[c.jsx(lb,{size:16}),"Download"]})]})]})]})})})}function WQ(){const[e,t]=k.useState([]),[r,n]=k.useState(!0),[s,i]=k.useState([]),{selectedProject:a}=Bn();k.useEffect(()=>{(async()=>{n(!0);try{const u=a?`/api/experiments?project=${encodeURIComponent(a)}`:"/api/experiments",h=await(await fetch(u)).json();t(h.experiments||[])}catch(u){console.error(u)}finally{n(!1)}})()},[a]);const o=[{header:c.jsx("input",{type:"checkbox",checked:s.length===e.length&&e.length>0,onChange:d=>{d.target.checked?i(e.map(u=>u.name)):i([])},className:"w-4 h-4 rounded border-slate-300 text-primary-600 focus:ring-primary-500"}),key:"select",render:d=>c.jsx("input",{type:"checkbox",checked:s.includes(d.name),onChange:u=>{u.target.checked?i([...s,d.name]):i(s.filter(f=>f!==d.name))},onClick:u=>u.stopPropagation(),className:"w-4 h-4 rounded border-slate-300 text-primary-600 focus:ring-primary-500"})},{header:"Experiment",key:"name",sortable:!0,render:d=>c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("div",{className:"p-2 bg-purple-50 dark:bg-purple-900/20 rounded-lg text-purple-600 dark:text-purple-400",children:c.jsx(Ko,{size:16})}),c.jsxs("div",{children:[c.jsx("div",{className:"font-medium text-slate-900 dark:text-white",children:d.name}),d.description&&c.jsx("div",{className:"text-xs text-slate-500 truncate max-w-[200px]",children:d.description})]})]})},{header:"Project",key:"project",sortable:!0,render:d=>c.jsx("span",{className:"text-sm text-slate-600 dark:text-slate-400",children:d.project||"-"})},{header:"Pipeline",key:"pipeline",sortable:!0,render:d=>c.jsx("span",{className:"text-sm text-slate-600 dark:text-slate-400",children:d.pipeline_name||"-"})},{header:"Runs",key:"run_count",sortable:!0,render:d=>c.jsxs(Et,{variant:"secondary",className:"bg-slate-100 dark:bg-slate-800 text-slate-600 dark:text-slate-300",children:[d.run_count||0," runs"]})},{header:"Created",key:"created_at",sortable:!0,render:d=>c.jsxs("div",{className:"flex items-center gap-2 text-slate-500",children:[c.jsx(ir,{size:14}),d.created_at?Ye(new Date(d.created_at),"MMM d, HH:mm"):"-"]})},{header:"Actions",key:"actions",render:d=>c.jsx(Nt,{to:`/experiments/${d.experiment_id}`,children:c.jsxs(me,{variant:"ghost",size:"sm",className:"text-primary-600 hover:text-primary-700 hover:bg-primary-50 dark:hover:bg-primary-900/20",children:["View Details ",c.jsx(Ps,{size:14,className:"ml-1"})]})})}],l=d=>c.jsx(Nt,{to:`/experiments/${d.experiment_id}`,children:c.jsxs(Me,{className:"group cursor-pointer hover:border-primary-300 hover:shadow-lg h-full transition-all duration-200 overflow-hidden relative",children:[c.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-purple-50/50 to-pink-50/50 dark:from-purple-900/10 dark:to-pink-900/10 opacity-0 group-hover:opacity-100 transition-opacity duration-200"}),c.jsxs("div",{className:"relative",children:[c.jsxs("div",{className:"flex items-start justify-between mb-4",children:[c.jsx("div",{className:"p-3 bg-purple-50 dark:bg-purple-900/20 rounded-xl text-purple-600 dark:text-purple-400 group-hover:bg-purple-600 group-hover:text-white transition-all duration-200 group-hover:scale-110",children:c.jsx(Ko,{size:24})}),c.jsxs(Et,{variant:"default",className:"bg-slate-100 dark:bg-slate-800 text-slate-600 dark:text-slate-300 group-hover:bg-purple-100 dark:group-hover:bg-purple-900/30 group-hover:text-purple-700 dark:group-hover:text-purple-300 transition-colors",children:[d.run_count||0," runs"]})]}),c.jsx("h3",{className:"text-lg font-bold text-slate-900 dark:text-white mb-2 group-hover:text-purple-700 dark:group-hover:text-purple-400 transition-colors",children:d.name}),c.jsx("p",{className:"text-sm text-slate-500 dark:text-slate-400 mb-4 line-clamp-2 min-h-[2.5rem]",children:d.description||"No description provided"}),c.jsxs("div",{className:"flex items-center justify-between pt-4 border-t border-slate-100 dark:border-slate-700",children:[c.jsxs("span",{className:"text-xs text-slate-400 font-medium flex items-center gap-1",children:[c.jsx(ir,{size:12}),d.created_at?Ye(new Date(d.created_at),"MMM d, yyyy"):"-"]}),c.jsxs("span",{className:"text-sm font-semibold text-primary-600 group-hover:text-primary-700 dark:text-primary-400 dark:group-hover:text-primary-300 flex items-center gap-1 group-hover:gap-2 transition-all",children:["View ",c.jsx(Ps,{size:16,className:"group-hover:translate-x-1 transition-transform"})]})]})]})]})});return r?c.jsx("div",{className:"flex items-center justify-center h-96",children:c.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary-600"})}):c.jsx("div",{className:"p-6 max-w-7xl mx-auto",children:c.jsx(Ka,{title:"Experiments",subtitle:"Track and compare your ML experiments with detailed metrics and parameters",items:e,loading:r,columns:o,renderGrid:l,actions:c.jsx(GQ,{selectedExperiments:s,onComplete:()=>{window.location.reload()}}),emptyState:c.jsx(Ql,{icon:Ko,title:"No experiments yet",description:"Start tracking your ML experiments using the Experiment API to compare runs and optimize your models.",action:c.jsx("div",{className:"inline-block px-4 py-2 bg-slate-100 dark:bg-slate-800 rounded-lg text-sm font-mono text-slate-600 dark:text-slate-300 border border-slate-200 dark:border-slate-700",children:c.jsx("code",{children:"from flowy.tracking import Experiment"})})})})})}function GQ({selectedExperiments:e,onComplete:t}){const[r,n]=k.useState(!1),[s,i]=k.useState([]),[a,o]=k.useState(!1);k.useEffect(()=>{r&&fetch("/api/projects/").then(d=>d.json()).then(d=>i(d)).catch(d=>console.error("Failed to load projects:",d))},[r]);const l=async d=>{o(!0);try{const u=e.map(h=>fetch(`/api/experiments/${h}/project`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({project_name:d})}));await Promise.all(u);const f=document.createElement("div");f.className="fixed top-4 right-4 px-4 py-3 rounded-lg shadow-lg z-50 bg-green-500 text-white",f.textContent=`Added ${e.length} experiment(s) to project ${d}`,document.body.appendChild(f),setTimeout(()=>document.body.removeChild(f),3e3),n(!1),t&&t()}catch(u){console.error("Failed to update projects:",u)}finally{o(!1)}};return c.jsxs("div",{className:"relative",children:[c.jsxs("button",{onClick:()=>n(!r),disabled:a||e.length===0,className:"flex items-center gap-2 px-3 py-1.5 text-sm font-medium text-slate-600 dark:text-slate-300 bg-white dark:bg-slate-800 border border-slate-200 dark:border-slate-700 rounded-lg hover:bg-slate-50 dark:hover:bg-slate-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[c.jsx(Md,{size:16}),a?"Updating...":`Add to Project (${e.length})`]}),r&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>n(!1)}),c.jsxs("div",{className:"absolute right-0 mt-2 w-56 bg-white dark:bg-slate-800 rounded-xl shadow-xl border border-slate-200 dark:border-slate-700 z-20",children:[c.jsx("div",{className:"p-2 border-b border-slate-100 dark:border-slate-700",children:c.jsx("span",{className:"text-xs font-semibold text-slate-500 px-2",children:"Select Project"})}),c.jsx("div",{className:"max-h-64 overflow-y-auto p-1",children:s.length>0?s.map(d=>c.jsx("button",{onClick:()=>l(d.name),disabled:a,className:"w-full text-left px-3 py-2 text-sm text-slate-700 dark:text-slate-200 hover:bg-slate-50 dark:hover:bg-slate-700 rounded-lg transition-colors disabled:opacity-50",children:d.name},d.name)):c.jsx("div",{className:"px-3 py-2 text-sm text-slate-400 italic",children:"No projects found"})})]})]})]})}function KQ(){var o;const{experimentId:e}=ZP(),[t,r]=k.useState(null),[n,s]=k.useState(!0);if(k.useEffect(()=>{gt(`/api/experiments/${e}`).then(l=>l.json()).then(l=>{r(l),s(!1)}).catch(l=>{console.error(l),s(!1)})},[e]),n)return c.jsx("div",{className:"flex items-center justify-center h-96",children:c.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary-600"})});if(!t)return c.jsx("div",{className:"p-8 text-center",children:c.jsx("p",{className:"text-slate-500",children:"Experiment not found"})});const i={hidden:{opacity:0},show:{opacity:1,transition:{staggerChildren:.1}}},a={hidden:{opacity:0,y:20},show:{opacity:1,y:0}};return c.jsxs(Le.div,{initial:"hidden",animate:"show",variants:i,className:"space-y-8",children:[c.jsxs(Le.div,{variants:a,className:"bg-white p-6 rounded-xl border border-slate-100 shadow-sm",children:[c.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[c.jsx(Nt,{to:"/experiments",className:"text-sm text-slate-500 hover:text-slate-700 transition-colors",children:"Experiments"}),c.jsx(wl,{size:14,className:"text-slate-300"}),c.jsx("span",{className:"text-sm text-slate-900 font-medium",children:t.name})]}),c.jsx("div",{className:"flex items-start justify-between",children:c.jsxs("div",{className:"flex items-center gap-4",children:[c.jsx("div",{className:"p-3 bg-gradient-to-br from-purple-500 to-pink-500 rounded-xl shadow-lg",children:c.jsx(Ko,{className:"text-white",size:28})}),c.jsxs("div",{children:[c.jsx("h2",{className:"text-3xl font-bold text-slate-900 tracking-tight",children:t.name}),c.jsx("p",{className:"text-slate-500 mt-1",children:t.description||"No description"})]})]})})]}),c.jsxs(Le.div,{variants:a,className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[c.jsx(py,{icon:c.jsx(Bt,{size:24}),label:"Total Runs",value:((o=t.runs)==null?void 0:o.length)||0,color:"blue"}),c.jsx(py,{icon:c.jsx(Wl,{size:24}),label:"Best Performance",value:YQ(t.runs),color:"emerald"}),c.jsx(py,{icon:c.jsx(ir,{size:24}),label:"Last Run",value:XQ(t.runs),color:"purple"})]}),c.jsxs(Le.div,{variants:a,children:[c.jsxs("div",{className:"flex items-center gap-2 mb-6",children:[c.jsx(m6,{className:"text-primary-500",size:24}),c.jsx("h3",{className:"text-xl font-bold text-slate-900",children:"Runs Comparison"})]}),t.runs&&t.runs.length>0?c.jsx(Me,{className:"p-0 overflow-hidden",children:c.jsx("div",{className:"overflow-x-auto",children:c.jsxs("table",{className:"w-full text-left",children:[c.jsx("thead",{className:"bg-gradient-to-r from-slate-50 to-slate-100/50 border-b border-slate-200",children:c.jsxs("tr",{children:[c.jsx("th",{className:"px-6 py-4 font-semibold text-xs text-slate-600 uppercase tracking-wider",children:"Run ID"}),c.jsx("th",{className:"px-6 py-4 font-semibold text-xs text-slate-600 uppercase tracking-wider",children:"Date"}),c.jsx("th",{className:"px-6 py-4 font-semibold text-xs text-slate-600 uppercase tracking-wider",children:"Metrics"}),c.jsx("th",{className:"px-6 py-4 font-semibold text-xs text-slate-600 uppercase tracking-wider",children:"Parameters"}),c.jsx("th",{className:"px-6 py-4 font-semibold text-xs text-slate-600 uppercase tracking-wider"})]})}),c.jsx("tbody",{className:"divide-y divide-slate-100",children:t.runs.map((l,d)=>c.jsxs(Le.tr,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:d*.05},className:"hover:bg-slate-50/70 transition-colors group",children:[c.jsx("td",{className:"px-6 py-4 font-mono text-sm text-slate-700 font-medium",children:c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("div",{className:"w-2 h-2 rounded-full bg-primary-400 opacity-0 group-hover:opacity-100 transition-opacity"}),l.run_id.substring(0,12)]})}),c.jsx("td",{className:"px-6 py-4 text-sm text-slate-500",children:l.timestamp?Ye(new Date(l.timestamp),"MMM d, HH:mm:ss"):"-"}),c.jsx("td",{className:"px-6 py-4",children:c.jsxs("div",{className:"flex flex-wrap gap-2",children:[Object.entries(l.metrics||{}).map(([u,f])=>c.jsxs(Et,{variant:"outline",className:"font-mono text-xs bg-blue-50 text-blue-700 border-blue-200",children:[u,": ",typeof f=="number"?f.toFixed(4):f]},u)),Object.keys(l.metrics||{}).length===0&&c.jsx("span",{className:"text-xs text-slate-400 italic",children:"No metrics"})]})}),c.jsx("td",{className:"px-6 py-4",children:c.jsxs("div",{className:"flex flex-wrap gap-2",children:[Object.entries(l.parameters||{}).map(([u,f])=>c.jsxs("span",{className:"text-xs text-slate-600 bg-slate-100 px-2.5 py-1 rounded-md font-medium",children:[u,"=",String(f)]},u)),Object.keys(l.parameters||{}).length===0&&c.jsx("span",{className:"text-xs text-slate-400 italic",children:"No params"})]})}),c.jsx("td",{className:"px-6 py-4 text-right",children:c.jsx(Nt,{to:`/runs/${l.run_id}`,children:c.jsx(me,{variant:"ghost",size:"sm",className:"opacity-0 group-hover:opacity-100 transition-opacity",children:"View Run"})})})]},l.run_id))})]})})}):c.jsx(Me,{className:"p-12 text-center border-dashed",children:c.jsx("p",{className:"text-slate-500",children:"No runs recorded for this experiment yet."})})]})]})}function py({icon:e,label:t,value:r,color:n}){const s={blue:"bg-blue-50 text-blue-600",purple:"bg-purple-50 text-purple-600",emerald:"bg-emerald-50 text-emerald-600"};return c.jsx(Me,{className:"hover:shadow-md transition-shadow duration-200",children:c.jsxs("div",{className:"flex items-center gap-4",children:[c.jsx("div",{className:`p-3 rounded-xl ${s[n]}`,children:e}),c.jsxs("div",{children:[c.jsx("p",{className:"text-sm text-slate-500 font-medium",children:t}),c.jsx("p",{className:"text-2xl font-bold text-slate-900",children:r})]})]})})}function YQ(e){if(!e||e.length===0)return"-";const t=["accuracy","f1_score","precision","recall"];for(const r of t){const n=e.map(s=>{var i;return(i=s.metrics)==null?void 0:i[r]}).filter(s=>typeof s=="number");if(n.length>0)return`${Math.max(...n).toFixed(4)} (${r})`}return"N/A"}function XQ(e){var r;if(!e||e.length===0)return"-";const t=[...e].sort((n,s)=>{const i=n.timestamp?new Date(n.timestamp):new Date(0);return(s.timestamp?new Date(s.timestamp):new Date(0))-i});return(r=t[0])!=null&&r.timestamp?Ye(new Date(t[0].timestamp),"MMM d, HH:mm"):"-"}function ZQ(){const[e,t]=k.useState([]),[r,n]=k.useState(null),[s,i]=k.useState(!0),[a,o]=k.useState("all"),{selectedProject:l}=Bn();k.useEffect(()=>{d()},[a,l]);const d=async()=>{i(!0);try{const g=new URLSearchParams;a!=="all"&&g.append("event_type",a),l&&g.append("project",l);const x=await(await gt(`/api/traces?${g}`)).json();t(x)}catch(g){console.error("Failed to fetch traces:",g)}finally{i(!1)}},u=async g=>{try{const x=await(await gt(`/api/traces/${g}`)).json();n(x)}catch(b){console.error("Failed to fetch trace details:",b)}},f=g=>g?`${(g*1e3).toFixed(0)}ms`:"N/A",h=g=>{switch(g){case"success":return"text-green-400";case"error":return"text-red-400";case"running":return"text-yellow-400";default:return"text-gray-400"}},p=g=>{switch(g){case"llm":return c.jsx(oM,{className:"w-4 h-4"});case"tool":return c.jsx(Gu,{className:"w-4 h-4"});default:return c.jsx(Bt,{className:"w-4 h-4"})}},m=({events:g,level:b=0})=>g?c.jsx("div",{className:`pl-${b*4}`,children:g.map((x,y)=>c.jsxs("div",{className:"mb-2",children:[c.jsxs("div",{className:"flex items-center gap-2 p-2 bg-gray-800/50 rounded border border-gray-700/50 hover:border-blue-500/50 transition-colors",children:[c.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[p(x.event_type),c.jsx("span",{className:"font-medium",children:x.name}),c.jsx("span",{className:`text-sm ${h(x.status)}`,children:x.status})]}),c.jsxs("div",{className:"flex items-center gap-4 text-sm text-gray-400",children:[x.duration&&c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsx(Lt,{className:"w-3 h-3"}),f(x.duration)]}),x.total_tokens>0&&c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsx(Bt,{className:"w-3 h-3"}),x.total_tokens," tokens"]}),x.cost>0&&c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsx(b6,{className:"w-3 h-3"}),"$",x.cost.toFixed(4)]})]})]}),x.children&&x.children.length>0&&c.jsx("div",{className:"ml-6 mt-2 border-l-2 border-gray-700/50 pl-2",children:c.jsx(m,{events:x.children,level:b+1})})]},y))}):null;return c.jsxs("div",{className:"p-6",children:[c.jsxs("div",{className:"flex justify-between items-center mb-6",children:[c.jsx("h1",{className:"text-2xl font-bold",children:"🔍 LLM Traces"}),c.jsxs("div",{className:"flex gap-2",children:[c.jsxs("select",{value:a,onChange:g=>o(g.target.value),className:"px-4 py-2 bg-gray-800 border border-gray-700 rounded-lg",children:[c.jsx("option",{value:"all",children:"All Types"}),c.jsx("option",{value:"llm",children:"LLM Calls"}),c.jsx("option",{value:"tool",children:"Tool Calls"}),c.jsx("option",{value:"chain",children:"Chains"}),c.jsx("option",{value:"agent",children:"Agents"})]}),c.jsx("button",{onClick:d,className:"px-4 py-2 bg-blue-600 hover:bg-blue-700 rounded-lg transition-colors",children:"Refresh"})]})]}),s?c.jsxs("div",{className:"text-center py-12",children:[c.jsx("div",{className:"inline-block animate-spin rounded-full h-8 w-8 border-b-2 border-blue-500"}),c.jsx("p",{className:"mt-4 text-gray-400",children:"Loading traces..."})]}):e.length===0?c.jsxs("div",{className:"text-center py-12 bg-gray-800/30 rounded-lg border-2 border-dashed border-gray-700",children:[c.jsx(Bt,{className:"w-12 h-12 mx-auto text-gray-600 mb-4"}),c.jsx("p",{className:"text-gray-400",children:"No traces found"}),c.jsx("p",{className:"text-sm text-gray-500 mt-2",children:"Use @trace_llm decorator to track LLM calls"})]}):c.jsx("div",{className:"grid gap-4",children:e.map(g=>{const b=g.trace_id;return c.jsxs("div",{className:"bg-gray-800/50 rounded-lg border border-gray-700/50 p-4 hover:border-blue-500/50 transition-all cursor-pointer",onClick:()=>u(b),children:[c.jsxs("div",{className:"flex items-start justify-between mb-3",children:[c.jsxs("div",{className:"flex items-center gap-3",children:[p(g.event_type),c.jsxs("div",{children:[c.jsx("h3",{className:"font-semibold text-lg",children:g.name}),c.jsxs("p",{className:"text-sm text-gray-400",children:["Trace ID: ",b.slice(0,8),"..."]})]})]}),c.jsx("span",{className:`px-3 py-1 rounded-full text-sm ${h(g.status)}`,children:g.status})]}),c.jsxs("div",{className:"grid grid-cols-4 gap-4 text-sm",children:[c.jsxs("div",{children:[c.jsx("span",{className:"text-gray-500",children:"Duration:"}),c.jsx("span",{className:"ml-2 text-gray-300",children:f(g.duration)})]}),g.model&&c.jsxs("div",{children:[c.jsx("span",{className:"text-gray-500",children:"Model:"}),c.jsx("span",{className:"ml-2 text-gray-300",children:g.model})]}),g.total_tokens>0&&c.jsxs("div",{children:[c.jsx("span",{className:"text-gray-500",children:"Tokens:"}),c.jsxs("span",{className:"ml-2 text-gray-300",children:[g.total_tokens," (",g.prompt_tokens,"/",g.completion_tokens,")"]})]}),g.cost>0&&c.jsxs("div",{children:[c.jsx("span",{className:"text-gray-500",children:"Cost:"}),c.jsxs("span",{className:"ml-2 text-gray-300",children:["$",g.cost.toFixed(4)]})]})]})]},g.event_id)})}),r&&c.jsx("div",{className:"fixed inset-0 bg-black/80 flex items-center justify-center p-6 z-50",children:c.jsxs("div",{className:"bg-gray-900 rounded-lg max-w-4xl w-full max-h-[80vh] overflow-auto border border-gray-700",children:[c.jsxs("div",{className:"sticky top-0 bg-gray-900 border-b border-gray-700 p-4 flex justify-between items-center",children:[c.jsx("h2",{className:"text-xl font-bold",children:"Trace Details"}),c.jsx("button",{onClick:()=>n(null),className:"px-4 py-2 bg-gray-800 hover:bg-gray-700 rounded-lg",children:"Close"})]}),c.jsx("div",{className:"p-6",children:c.jsx(m,{events:r})})]})})]})}function QQ(){const[e,t]=k.useState([]),[r,n]=k.useState(!0),[s,i]=k.useState(!1),[a,o]=k.useState(""),[l,d]=k.useState(""),[u,f]=k.useState({}),{setSelectedProject:h}=Bn();k.useEffect(()=>{p()},[]);const p=async()=>{try{const v=await(await gt("/api/projects/")).json(),w=Array.isArray(v)?v:v.projects||[],_=await Promise.all(w.map(async N=>{try{const E=await(await fetch(`/api/runs?project=${encodeURIComponent(N.name)}`)).json(),M=new Set((E.runs||[]).map(F=>F.pipeline_name)),D=await(await fetch(`/api/assets?project=${encodeURIComponent(N.name)}`)).json();return{...N,runs:(E.runs||[]).length,pipelines:M.size,artifacts:(D.artifacts||[]).length}}catch(j){return console.error(`Failed to fetch stats for project ${N.name}:`,j),{...N,runs:0,pipelines:0,artifacts:0}}}));t(_)}catch(y){console.error("Failed to fetch projects:",y)}finally{n(!1)}},m=async y=>{y.preventDefault();try{(await gt("/api/projects/",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:a,description:l})})).ok&&(i(!1),o(""),d(""),p())}catch(v){console.error("Failed to create project:",v)}},g=async y=>{if(confirm(`Are you sure you want to delete project "${y}"?`))try{(await gt(`/api/projects/${y}`,{method:"DELETE"})).ok&&p()}catch(v){console.error("Failed to delete project:",v)}},b=[{header:"Project Name",key:"name",sortable:!0,render:y=>c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("div",{className:"p-2 bg-blue-500/10 rounded-lg",children:c.jsx(Bf,{className:"w-5 h-5 text-blue-500"})}),c.jsxs("div",{children:[c.jsx("div",{className:"font-medium text-slate-900 dark:text-white",children:y.name}),c.jsxs("div",{className:"text-xs text-slate-500",children:["Created ",Ye(new Date(y.created_at),"MMM d, yyyy")]})]})]})},{header:"Description",key:"description",render:y=>c.jsx("span",{className:"text-slate-500 dark:text-slate-400 truncate max-w-xs block",children:y.description||"No description"})},{header:"Stats",key:"stats",render:y=>{const v=u[y.name]||{runs:0,pipelines:0,artifacts:0};return c.jsxs("div",{className:"flex gap-4 text-sm text-slate-500",children:[c.jsxs("span",{className:"flex items-center gap-1",children:[c.jsx(Bt,{size:14})," ",v.pipelines||0]}),c.jsxs("span",{className:"flex items-center gap-1",children:[c.jsx(Lt,{size:14})," ",v.runs||0]}),c.jsxs("span",{className:"flex items-center gap-1",children:[c.jsx(Dr,{size:14})," ",v.artifacts||0]})]})}},{header:"Actions",key:"actions",render:y=>c.jsx("button",{onClick:v=>{v.stopPropagation(),g(y.name)},className:"p-2 text-slate-400 hover:text-red-500 transition-colors",children:c.jsx(ji,{size:16})})}],x=y=>{const v=u[y.name]||{runs:0,pipelines:0,artifacts:0};return c.jsx(Nt,{to:`/runs?project=${encodeURIComponent(y.name)}`,onClick:()=>h(y.name),className:"block",children:c.jsxs("div",{className:"bg-white dark:bg-slate-800 rounded-xl border border-slate-200 dark:border-slate-700 p-6 hover:border-blue-500/50 hover:shadow-md transition-all group cursor-pointer",children:[c.jsxs("div",{className:"flex justify-between items-start mb-4",children:[c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("div",{className:"p-3 bg-blue-500/10 rounded-xl group-hover:bg-blue-500/20 transition-colors",children:c.jsx(Bf,{className:"w-6 h-6 text-blue-600 dark:text-blue-400"})}),c.jsxs("div",{children:[c.jsx("h3",{className:"font-bold text-lg text-slate-900 dark:text-white",children:y.name}),c.jsxs("p",{className:"text-xs text-slate-500",children:["Created ",Ye(new Date(y.created_at),"MMM d, yyyy")]})]})]}),c.jsx("button",{onClick:w=>{w.preventDefault(),w.stopPropagation(),g(y.name)},className:"text-slate-400 hover:text-red-500 transition-colors opacity-0 group-hover:opacity-100",children:c.jsx(ji,{className:"w-4 h-4"})})]}),c.jsx("p",{className:"text-slate-500 dark:text-slate-400 mb-6 h-10 overflow-hidden text-sm line-clamp-2",children:y.description||"No description provided."}),c.jsxs("div",{className:"grid grid-cols-3 gap-4 border-t border-slate-100 dark:border-slate-700 pt-4",children:[c.jsxs("div",{className:"text-center",children:[c.jsxs("div",{className:"flex items-center justify-center gap-1 text-slate-400 text-xs mb-1",children:[c.jsx(Bt,{className:"w-3 h-3"})," Pipelines"]}),c.jsx("span",{className:"font-bold text-slate-700 dark:text-slate-200",children:v.pipelines||0})]}),c.jsxs("div",{className:"text-center",children:[c.jsxs("div",{className:"flex items-center justify-center gap-1 text-slate-400 text-xs mb-1",children:[c.jsx(Lt,{className:"w-3 h-3"})," Runs"]}),c.jsx("span",{className:"font-bold text-slate-700 dark:text-slate-200",children:v.runs||0})]}),c.jsxs("div",{className:"text-center",children:[c.jsxs("div",{className:"flex items-center justify-center gap-1 text-slate-400 text-xs mb-1",children:[c.jsx(Dr,{className:"w-3 h-3"})," Artifacts"]}),c.jsx("span",{className:"font-bold text-slate-700 dark:text-slate-200",children:v.artifacts||0})]})]})]})})};return c.jsxs("div",{className:"p-6 max-w-7xl mx-auto",children:[c.jsx(Ka,{title:"Projects",subtitle:"Manage your ML projects and workspaces",items:e,loading:r,columns:b,renderGrid:x,actions:c.jsxs(me,{onClick:()=>i(!0),className:"flex items-center gap-2",children:[c.jsx(Ss,{size:18}),"New Project"]}),emptyState:c.jsxs("div",{className:"text-center py-12 bg-slate-50 dark:bg-slate-800/30 rounded-xl border-2 border-dashed border-slate-200 dark:border-slate-700",children:[c.jsx(Bf,{className:"w-12 h-12 mx-auto text-slate-400 mb-4"}),c.jsx("h3",{className:"text-lg font-medium text-slate-900 dark:text-white",children:"No projects found"}),c.jsx("p",{className:"text-slate-500 mb-6",children:"Get started by creating your first project."}),c.jsx(me,{onClick:()=>i(!0),children:"Create Project"})]})}),s&&c.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-50 animate-in fade-in duration-200",children:c.jsxs("div",{className:"bg-white dark:bg-slate-800 p-6 rounded-xl w-full max-w-md border border-slate-200 dark:border-slate-700 shadow-xl",children:[c.jsx("h2",{className:"text-xl font-bold mb-4 text-slate-900 dark:text-white",children:"Create New Project"}),c.jsxs("form",{onSubmit:m,children:[c.jsxs("div",{className:"mb-4",children:[c.jsx("label",{className:"block text-sm font-medium mb-1 text-slate-700 dark:text-slate-300",children:"Project Name"}),c.jsx("input",{type:"text",value:a,onChange:y=>o(y.target.value),className:"w-full px-3 py-2 bg-slate-50 dark:bg-slate-700 rounded-lg border border-slate-200 dark:border-slate-600 focus:border-blue-500 outline-none text-slate-900 dark:text-white",required:!0,placeholder:"e.g., recommendation-system"})]}),c.jsxs("div",{className:"mb-6",children:[c.jsx("label",{className:"block text-sm font-medium mb-1 text-slate-700 dark:text-slate-300",children:"Description"}),c.jsx("textarea",{value:l,onChange:y=>d(y.target.value),className:"w-full px-3 py-2 bg-slate-50 dark:bg-slate-700 rounded-lg border border-slate-200 dark:border-slate-600 focus:border-blue-500 outline-none text-slate-900 dark:text-white",rows:"3",placeholder:"Brief description of the project..."})]}),c.jsxs("div",{className:"flex justify-end gap-3",children:[c.jsx("button",{type:"button",onClick:()=>i(!1),className:"px-4 py-2 text-slate-600 dark:text-slate-300 hover:bg-slate-100 dark:hover:bg-slate-700 rounded-lg transition-colors",children:"Cancel"}),c.jsx(me,{type:"submit",children:"Create Project"})]})]})]})})]})}function JQ(){const{selectedProject:e}=Bn(),[t,r]=k.useState([]),[n,s]=k.useState({registered:[],templates:[],metadata:[]}),[i,a]=k.useState(null),[o,l]=k.useState(!0),[d,u]=k.useState(!1),[f,h]=k.useState(!1),[p,m]=k.useState(null),[g,b]=k.useState([]),[x,y]=k.useState(!1),[v,w]=k.useState({name:"",pipeline_name:"",schedule_type:"daily",hour:0,minute:0,interval_seconds:3600,cron_expression:"* * * * *",timezone:"UTC",project_name:e||null});k.useEffect(()=>{_();const T=setInterval(_,1e4);return()=>clearInterval(T)},[e]);const _=async()=>{try{const T=e?`?project=${e}`:"",[S,O,I]=await Promise.all([fetch(`/api/schedules/${T}`),fetch(`/api/schedules/registered-pipelines${T}`),fetch("/api/schedules/health")]),V=await S.json(),A=await O.json();let P=null;I.ok&&(P=await I.json()),r(V),s(A),a(P)}catch(T){console.error("Failed to fetch data:",T)}finally{l(!1)}},N=async T=>{y(!0);try{const O=await(await fetch(`/api/schedules/${T}/history`)).json();b(O)}catch(S){console.error("Failed to fetch history:",S)}finally{y(!1)}},j=T=>{m(T),h(!0),N(T.pipeline_name)},E=async T=>{T.preventDefault();try{const S=await fetch("/api/schedules",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...v,project_name:e||null})});if(S.ok)u(!1),w({name:"",pipeline_name:"",schedule_type:"daily",hour:0,minute:0,interval_seconds:3600,cron_expression:"* * * * *",timezone:"UTC"}),_();else{const O=await S.json();alert(`Failed to create schedule: ${O.detail}`)}}catch(S){console.error("Failed to create schedule:",S)}},M=async(T,S)=>{try{await fetch(`/api/schedules/${T}/${S?"disable":"enable"}`,{method:"POST"}),_()}catch(O){console.error("Failed to toggle schedule:",O)}},C=async T=>{if(confirm(`Delete schedule "${T}"?`))try{await fetch(`/api/schedules/${T}`,{method:"DELETE"}),_()}catch(S){console.error("Failed to delete schedule:",S)}},D=[{header:"Pipeline",key:"pipeline_name",sortable:!0,render:T=>c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("div",{className:`p-2 rounded-lg ${T.enabled?"bg-emerald-50 text-emerald-600":"bg-slate-100 text-slate-400"}`,children:c.jsx(Lt,{size:16})}),c.jsxs("div",{children:[c.jsx("div",{className:"font-medium text-slate-900 dark:text-white",children:T.pipeline_name}),c.jsxs("div",{className:"text-xs text-slate-500 flex items-center gap-1",children:[c.jsx(Uu,{size:10})," ",T.timezone]})]})]})},{header:"Type",key:"schedule_type",sortable:!0,render:T=>c.jsxs("div",{className:"flex flex-col",children:[c.jsx(Et,{variant:"secondary",className:"capitalize w-fit mb-1",children:T.schedule_type}),c.jsx("span",{className:"text-xs font-mono text-slate-500",children:T.schedule_value})]})},{header:"Next Run",key:"next_run",sortable:!0,render:T=>c.jsxs("div",{className:"flex items-center gap-2 text-slate-500",children:[c.jsx(ir,{size:14}),T.next_run?Ye(new Date(T.next_run),"MMM d, HH:mm:ss"):"N/A"]})},{header:"Status",key:"enabled",sortable:!0,render:T=>c.jsxs("div",{className:`flex items-center gap-2 text-sm ${T.enabled?"text-emerald-600":"text-slate-400"}`,children:[T.enabled?c.jsx(Dt,{size:14}):c.jsx(Yr,{size:14}),c.jsx("span",{className:"font-medium",children:T.enabled?"Active":"Paused"})]})},{header:"Actions",key:"actions",render:T=>c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("button",{onClick:()=>j(T),className:"p-1.5 rounded-lg bg-blue-50 text-blue-600 hover:bg-blue-100 transition-colors",title:"History",children:c.jsx(Uf,{size:16})}),c.jsx("button",{onClick:()=>M(T.pipeline_name,T.enabled),className:`p-1.5 rounded-lg transition-colors ${T.enabled?"bg-amber-50 text-amber-600 hover:bg-amber-100":"bg-emerald-50 text-emerald-600 hover:bg-emerald-100"}`,title:T.enabled?"Pause":"Resume",children:T.enabled?c.jsx(o2,{size:16}):c.jsx(l2,{size:16})}),c.jsx("button",{onClick:()=>C(T.pipeline_name),className:"p-1.5 rounded-lg bg-rose-50 text-rose-600 hover:bg-rose-100 transition-colors",title:"Delete",children:c.jsx(ji,{size:16})})]})}],F=T=>c.jsxs(Me,{className:"group hover:shadow-lg transition-all duration-200 border-l-4 border-l-transparent hover:border-l-primary-500 h-full",children:[c.jsxs("div",{className:"flex items-start justify-between mb-4",children:[c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("div",{className:`p-3 rounded-xl ${T.enabled?"bg-emerald-50 text-emerald-600":"bg-slate-100 text-slate-400"}`,children:c.jsx(Lt,{size:24})}),c.jsxs("div",{children:[c.jsx("h3",{className:"font-bold text-slate-900 dark:text-white truncate max-w-[150px]",title:T.pipeline_name,children:T.pipeline_name}),c.jsxs("div",{className:`text-xs font-medium flex items-center gap-1 ${T.enabled?"text-emerald-600":"text-slate-400"}`,children:[T.enabled?c.jsx(Dt,{size:12}):c.jsx(Yr,{size:12}),T.enabled?"Active":"Paused"]})]})]}),c.jsx(Et,{variant:"secondary",className:"capitalize",children:T.schedule_type})]}),c.jsxs("div",{className:"space-y-3 mb-4",children:[c.jsxs("div",{className:"flex items-center justify-between text-sm",children:[c.jsxs("span",{className:"text-slate-500 flex items-center gap-2",children:[c.jsx(ir,{size:14})," Next Run"]}),c.jsx("span",{className:"font-mono text-slate-700 dark:text-slate-300",children:T.next_run?Ye(new Date(T.next_run),"MMM d, HH:mm"):"N/A"})]}),c.jsxs("div",{className:"flex items-center justify-between text-sm",children:[c.jsxs("span",{className:"text-slate-500 flex items-center gap-2",children:[c.jsx(Uu,{size:14})," Timezone"]}),c.jsx("span",{className:"text-slate-700 dark:text-slate-300",children:T.timezone})]})]}),c.jsxs("div",{className:"flex items-center gap-2 pt-4 border-t border-slate-100 dark:border-slate-700",children:[c.jsx(me,{variant:"ghost",className:"text-blue-600 hover:bg-blue-50 hover:text-blue-700",onClick:()=>j(T),title:"History",children:c.jsx(Uf,{size:16})}),c.jsx(me,{variant:"outline",className:`flex-1 flex items-center justify-center gap-2 ${T.enabled?"text-amber-600 border-amber-200 hover:bg-amber-50":"text-emerald-600 border-emerald-200 hover:bg-emerald-50"}`,onClick:()=>M(T.pipeline_name,T.enabled),children:T.enabled?c.jsxs(c.Fragment,{children:[c.jsx(o2,{size:14})," Pause"]}):c.jsxs(c.Fragment,{children:[c.jsx(l2,{size:14})," Resume"]})}),c.jsx(me,{variant:"ghost",className:"text-rose-600 hover:bg-rose-50 hover:text-rose-700",onClick:()=>C(T.pipeline_name),children:c.jsx(ji,{size:16})})]})]});return c.jsxs("div",{className:"p-6 max-w-7xl mx-auto",children:[i&&i.metrics&&c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4 mb-8",children:[c.jsxs(Me,{className:"p-4 flex items-center gap-4",children:[c.jsx("div",{className:`p-3 rounded-full ${i.status==="running"?"bg-emerald-100 text-emerald-600":"bg-rose-100 text-rose-600"}`,children:c.jsx(Bt,{size:24})}),c.jsxs("div",{children:[c.jsx("div",{className:"text-sm text-slate-500",children:"Scheduler Status"}),c.jsx("div",{className:"text-lg font-bold capitalize",children:i.status})]})]}),c.jsxs(Me,{className:"p-4",children:[c.jsx("div",{className:"text-sm text-slate-500 mb-1",children:"Total Runs"}),c.jsx("div",{className:"text-2xl font-bold",children:i.metrics.total_runs})]}),c.jsxs(Me,{className:"p-4",children:[c.jsx("div",{className:"text-sm text-slate-500 mb-1",children:"Success Rate"}),c.jsxs("div",{className:"text-2xl font-bold text-emerald-600",children:[(i.metrics.success_rate*100).toFixed(1),"%"]})]}),c.jsxs(Me,{className:"p-4",children:[c.jsx("div",{className:"text-sm text-slate-500 mb-1",children:"Active Schedules"}),c.jsxs("div",{className:"text-2xl font-bold",children:[i.enabled_schedules," / ",i.num_schedules]})]})]}),c.jsx(Ka,{title:"Schedules",subtitle:"Manage automated pipeline executions",items:t,loading:o,columns:D,renderGrid:F,actions:c.jsxs(me,{onClick:()=>u(!0),className:"flex items-center gap-2",children:[c.jsx(Ss,{size:18}),"New Schedule"]}),emptyState:c.jsx(Ql,{icon:ir,title:"No active schedules",description:"Automate your pipelines by creating a schedule.",action:c.jsx(me,{onClick:()=>u(!0),children:"Create your first schedule"})})}),d&&c.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-50 p-4",children:c.jsxs("div",{className:"bg-white dark:bg-slate-800 p-6 rounded-2xl w-full max-w-md border border-slate-200 dark:border-slate-700 shadow-2xl animate-in fade-in zoom-in duration-200 max-h-[90vh] overflow-y-auto",children:[c.jsx("h2",{className:"text-xl font-bold mb-4 text-slate-900 dark:text-white",children:"Create Schedule"}),c.jsxs("form",{onSubmit:E,children:[c.jsxs("div",{className:"mb-4",children:[c.jsx("label",{className:"block text-sm font-medium mb-1 text-slate-700 dark:text-slate-300",children:"Schedule Name"}),c.jsx("input",{type:"text",value:v.name,onChange:T=>w({...v,name:T.target.value}),className:"w-full px-3 py-2 bg-slate-50 dark:bg-slate-900 rounded-lg border border-slate-200 dark:border-slate-700 focus:ring-2 focus:ring-primary-500 outline-none transition-all",required:!0,placeholder:"e.g., daily_etl_job"})]}),c.jsxs("div",{className:"mb-4",children:[c.jsx("label",{className:"block text-sm font-medium mb-1 text-slate-700 dark:text-slate-300",children:"Pipeline"}),c.jsxs("select",{value:v.pipeline_name,onChange:T=>w({...v,pipeline_name:T.target.value}),className:"w-full px-3 py-2 bg-slate-50 dark:bg-slate-900 rounded-lg border border-slate-200 dark:border-slate-700 focus:ring-2 focus:ring-primary-500 outline-none transition-all",required:!0,children:[c.jsx("option",{value:"",children:"Select a pipeline..."}),n.registered.length>0&&c.jsx("optgroup",{label:`Registered Pipelines (${n.registered.length})`,children:n.registered.map(T=>c.jsx("option",{value:T,children:T},T))}),n.templates.length>0&&c.jsx("optgroup",{label:`Templates (${n.templates.length})`,children:n.templates.map(T=>c.jsx("option",{value:T,children:T},T))}),n.metadata.length>0&&c.jsx("optgroup",{label:`Historical Pipelines (${n.metadata.length})`,children:n.metadata.map(T=>c.jsx("option",{value:T,children:T},`meta-${T}`))})]}),n.registered.length===0&&n.templates.length===0&&n.metadata.length===0&&c.jsx("p",{className:"text-xs text-amber-600 mt-1",children:"No pipelines available. Run a pipeline first or register one using @register_pipeline."})]}),c.jsxs("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[c.jsxs("div",{children:[c.jsx("label",{className:"block text-sm font-medium mb-1 text-slate-700 dark:text-slate-300",children:"Type"}),c.jsxs("select",{value:v.schedule_type,onChange:T=>w({...v,schedule_type:T.target.value}),className:"w-full px-3 py-2 bg-slate-50 dark:bg-slate-900 rounded-lg border border-slate-200 dark:border-slate-700 focus:ring-2 focus:ring-primary-500 outline-none transition-all",children:[c.jsx("option",{value:"daily",children:"Daily"}),c.jsx("option",{value:"hourly",children:"Hourly"}),c.jsx("option",{value:"interval",children:"Interval"}),c.jsx("option",{value:"cron",children:"Cron"})]})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-sm font-medium mb-1 text-slate-700 dark:text-slate-300",children:"Timezone"}),c.jsxs("select",{value:v.timezone,onChange:T=>w({...v,timezone:T.target.value}),className:"w-full px-3 py-2 bg-slate-50 dark:bg-slate-900 rounded-lg border border-slate-200 dark:border-slate-700 focus:ring-2 focus:ring-primary-500 outline-none transition-all",children:[c.jsx("option",{value:"UTC",children:"UTC"}),c.jsx("option",{value:"America/New_York",children:"New York (EST/EDT)"}),c.jsx("option",{value:"America/Los_Angeles",children:"Los Angeles (PST/PDT)"}),c.jsx("option",{value:"Europe/London",children:"London (GMT/BST)"}),c.jsx("option",{value:"Europe/Paris",children:"Paris (CET/CEST)"}),c.jsx("option",{value:"Asia/Tokyo",children:"Tokyo (JST)"}),c.jsx("option",{value:"Asia/Shanghai",children:"Shanghai (CST)"})]})]})]}),v.schedule_type==="daily"&&c.jsxs("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[c.jsxs("div",{children:[c.jsx("label",{className:"block text-sm font-medium mb-1 text-slate-700 dark:text-slate-300",children:"Hour (0-23)"}),c.jsx("input",{type:"number",min:"0",max:"23",value:v.hour,onChange:T=>w({...v,hour:parseInt(T.target.value)}),className:"w-full px-3 py-2 bg-slate-50 dark:bg-slate-900 rounded-lg border border-slate-200 dark:border-slate-700 focus:ring-2 focus:ring-primary-500 outline-none transition-all"})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-sm font-medium mb-1 text-slate-700 dark:text-slate-300",children:"Minute (0-59)"}),c.jsx("input",{type:"number",min:"0",max:"59",value:v.minute,onChange:T=>w({...v,minute:parseInt(T.target.value)}),className:"w-full px-3 py-2 bg-slate-50 dark:bg-slate-900 rounded-lg border border-slate-200 dark:border-slate-700 focus:ring-2 focus:ring-primary-500 outline-none transition-all"})]})]}),v.schedule_type==="hourly"&&c.jsxs("div",{className:"mb-4",children:[c.jsx("label",{className:"block text-sm font-medium mb-1 text-slate-700 dark:text-slate-300",children:"Minute (0-59)"}),c.jsx("input",{type:"number",min:"0",max:"59",value:v.minute,onChange:T=>w({...v,minute:parseInt(T.target.value)}),className:"w-full px-3 py-2 bg-slate-50 dark:bg-slate-900 rounded-lg border border-slate-200 dark:border-slate-700 focus:ring-2 focus:ring-primary-500 outline-none transition-all"})]}),v.schedule_type==="interval"&&c.jsxs("div",{className:"mb-4",children:[c.jsx("label",{className:"block text-sm font-medium mb-1 text-slate-700 dark:text-slate-300",children:"Interval (seconds)"}),c.jsx("input",{type:"number",min:"1",value:v.interval_seconds,onChange:T=>w({...v,interval_seconds:parseInt(T.target.value)}),className:"w-full px-3 py-2 bg-slate-50 dark:bg-slate-900 rounded-lg border border-slate-200 dark:border-slate-700 focus:ring-2 focus:ring-primary-500 outline-none transition-all"})]}),v.schedule_type==="cron"&&c.jsxs("div",{className:"mb-4",children:[c.jsx("label",{className:"block text-sm font-medium mb-1 text-slate-700 dark:text-slate-300",children:"Cron Expression"}),c.jsx("input",{type:"text",value:v.cron_expression,onChange:T=>w({...v,cron_expression:T.target.value}),className:"w-full px-3 py-2 bg-slate-50 dark:bg-slate-900 rounded-lg border border-slate-200 dark:border-slate-700 focus:ring-2 focus:ring-primary-500 outline-none transition-all font-mono",placeholder:"* * * * *"}),c.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Format: minute hour day month day-of-week"})]}),c.jsxs("div",{className:"flex justify-end gap-3 mt-6",children:[c.jsx(me,{variant:"ghost",type:"button",onClick:()=>u(!1),children:"Cancel"}),c.jsx(me,{type:"submit",variant:"primary",children:"Create Schedule"})]})]})]})}),f&&p&&c.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-50 p-4",children:c.jsxs("div",{className:"bg-white dark:bg-slate-800 p-6 rounded-2xl w-full max-w-2xl border border-slate-200 dark:border-slate-700 shadow-2xl animate-in fade-in zoom-in duration-200 max-h-[90vh] overflow-y-auto",children:[c.jsxs("div",{className:"flex items-center justify-between mb-6",children:[c.jsxs("div",{children:[c.jsxs("h2",{className:"text-xl font-bold text-slate-900 dark:text-white flex items-center gap-2",children:[c.jsx(Uf,{size:20}),"Execution History"]}),c.jsx("p",{className:"text-slate-500 text-sm",children:p.pipeline_name})]}),c.jsx(me,{variant:"ghost",onClick:()=>h(!1),children:c.jsx(Yr,{size:20})})]}),x?c.jsx("div",{className:"flex justify-center py-8",children:c.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-500"})}):g.length>0?c.jsx("div",{className:"space-y-4",children:g.map((T,S)=>c.jsxs("div",{className:"flex items-center justify-between p-4 bg-slate-50 dark:bg-slate-900 rounded-xl border border-slate-100 dark:border-slate-700",children:[c.jsxs("div",{className:"flex items-center gap-4",children:[c.jsx("div",{className:`p-2 rounded-full ${T.success?"bg-emerald-100 text-emerald-600":"bg-rose-100 text-rose-600"}`,children:T.success?c.jsx(Dt,{size:16}):c.jsx(Pd,{size:16})}),c.jsxs("div",{children:[c.jsx("div",{className:"font-medium text-slate-900 dark:text-white",children:Ye(new Date(T.started_at),"MMM d, yyyy HH:mm:ss")}),c.jsxs("div",{className:"text-xs text-slate-500",children:["Duration: ",T.duration_seconds?`${T.duration_seconds.toFixed(2)}s`:"N/A"]})]})]}),!T.success&&c.jsx("div",{className:"text-sm text-rose-600 max-w-xs truncate",title:T.error,children:T.error})]},S))}):c.jsx("div",{className:"text-center py-8 text-slate-500",children:"No execution history found."})]})})]})}function eJ(){const[e,t]=k.useState("accuracy"),[r,n]=k.useState(null),[s,i]=k.useState(!0);k.useEffect(()=>{a()},[e]);const a=async()=>{i(!0);try{const l=await(await gt(`/api/leaderboard/${e}`)).json();n(l)}catch(o){console.error("Failed to fetch leaderboard:",o)}finally{i(!1)}};return c.jsxs("div",{className:"p-6",children:[c.jsxs("div",{className:"flex justify-between items-center mb-6",children:[c.jsxs("h1",{className:"text-2xl font-bold flex items-center gap-2 text-slate-900 dark:text-white",children:[c.jsx(Wi,{className:"text-yellow-500"}),"Model Leaderboard"]}),c.jsxs("div",{className:"flex items-center gap-2 bg-white dark:bg-slate-800 rounded-lg p-1 border border-slate-200 dark:border-slate-700",children:[c.jsx(aM,{className:"w-4 h-4 ml-2 text-slate-400 dark:text-slate-500"}),c.jsxs("select",{value:e,onChange:o=>t(o.target.value),className:"bg-transparent border-none outline-none text-sm px-2 py-1 text-slate-700 dark:text-slate-200",children:[c.jsx("option",{value:"accuracy",children:"Accuracy"}),c.jsx("option",{value:"loss",children:"Loss"}),c.jsx("option",{value:"f1_score",children:"F1 Score"}),c.jsx("option",{value:"latency",children:"Latency"})]})]})]}),s?c.jsx("div",{className:"text-center py-12",children:c.jsx("div",{className:"inline-block animate-spin rounded-full h-8 w-8 border-b-2 border-yellow-500"})}):!r||r.models.length===0?c.jsx(Ql,{icon:Wi,title:`No models found for metric: ${e}`,description:"Generate sample data to populate the leaderboard.",action:c.jsxs(me,{onClick:async()=>{i(!0);try{await gt("/api/leaderboard/generate_sample_data",{method:"POST"}),a()}catch(o){console.error("Failed to generate sample data:",o),i(!1)}},className:"flex items-center gap-2",children:[c.jsx(lM,{size:16}),"Generate Sample Data"]})}):c.jsx("div",{className:"bg-white dark:bg-slate-800/50 rounded-lg border border-slate-200 dark:border-slate-700 overflow-hidden",children:c.jsxs("table",{className:"w-full",children:[c.jsx("thead",{children:c.jsxs("tr",{className:"bg-slate-50 dark:bg-slate-800 border-b border-slate-200 dark:border-slate-700",children:[c.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 dark:text-slate-400 uppercase tracking-wider",children:"Rank"}),c.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 dark:text-slate-400 uppercase tracking-wider",children:"Model"}),c.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 dark:text-slate-400 uppercase tracking-wider",children:"Score"}),c.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 dark:text-slate-400 uppercase tracking-wider",children:"Run ID"}),c.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 dark:text-slate-400 uppercase tracking-wider",children:"Date"})]})}),c.jsx("tbody",{className:"divide-y divide-slate-100 dark:divide-slate-700",children:r.models.map((o,l)=>c.jsxs("tr",{className:"hover:bg-slate-50 dark:hover:bg-slate-700/50 transition-colors",children:[c.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:c.jsxs("div",{className:"flex items-center gap-2",children:[l===0&&c.jsx(Wi,{className:"w-4 h-4 text-yellow-500"}),l===1&&c.jsx(Wi,{className:"w-4 h-4 text-slate-400"}),l===2&&c.jsx(Wi,{className:"w-4 h-4 text-amber-600"}),c.jsxs("span",{className:`font-bold ${l<3?"text-slate-900 dark:text-white":"text-slate-500 dark:text-slate-400"}`,children:["#",o.rank]})]})}),c.jsx("td",{className:"px-6 py-4 whitespace-nowrap font-medium text-slate-900 dark:text-white",children:o.model_name}),c.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"text-lg font-bold text-blue-600 dark:text-blue-400",children:o.score.toFixed(4)}),r.higher_is_better?c.jsx(Wl,{className:"w-4 h-4 text-green-500"}):c.jsx(D6,{className:"w-4 h-4 text-green-500"})]})}),c.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-slate-500 dark:text-slate-400 font-mono",children:o.run_id.substring(0,8)}),c.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-slate-500 dark:text-slate-400",children:o.timestamp?Ye(new Date(o.timestamp),"MMM d, HH:mm"):"-"})]},o.run_id))})]})})]})}const jo="/api";class tJ{async getAvailablePlugins(){try{const t=await fetch(`${jo}/plugins/available`);if(!t.ok)throw new Error("Failed to fetch available plugins");return await t.json()}catch(t){return console.error("Error fetching available plugins:",t),[]}}async getInstalledPlugins(){try{const t=await fetch(`${jo}/plugins/installed`);if(!t.ok)throw new Error("Failed to fetch installed plugins");return await t.json()}catch(t){return console.error("Error fetching installed plugins:",t),[]}}async installPlugin(t){try{const r=await fetch(`${jo}/plugins/install`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({plugin_id:t})});if(!r.ok){const n=await r.json();throw new Error(n.detail||"Installation failed")}return await r.json()}catch(r){throw console.error("Error installing plugin:",r),r}}async uninstallPlugin(t){try{const r=await fetch(`${jo}/plugins/uninstall/${t}`,{method:"POST"});if(!r.ok){const n=await r.json();throw new Error(n.detail||"Uninstall failed")}return await r.json()}catch(r){throw console.error("Error uninstalling plugin:",r),r}}async importZenMLStack(t){try{const r=await fetch(`${jo}/plugins/import-stack`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({stack_name:t})});if(!r.ok){const n=await r.json();throw new Error(n.detail||"Import failed")}return await r.json()}catch(r){throw console.error("Error importing stack:",r),r}}}const ja=new tJ;function rJ({isOpen:e,onClose:t,onAdd:r}){const[n,s]=k.useState("package"),[i,a]=k.useState(""),[o,l]=k.useState(""),d=()=>{n==="package"&&i?(r({type:"package",value:i}),a(""),t()):n==="url"&&o&&(r({type:"url",value:o}),l(""),t())};return e?c.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",onClick:t,children:c.jsxs("div",{className:"bg-white dark:bg-slate-800 rounded-xl p-6 max-w-md w-full mx-4 shadow-2xl",onClick:u=>u.stopPropagation(),children:[c.jsxs("div",{className:"flex items-center justify-between mb-4",children:[c.jsx("h3",{className:"text-lg font-semibold text-slate-900 dark:text-white",children:"Add Plugin"}),c.jsx("button",{onClick:t,className:"p-1 hover:bg-slate-100 dark:hover:bg-slate-700 rounded-lg transition-colors",children:c.jsx(cb,{size:20,className:"text-slate-500"})})]}),c.jsxs("div",{className:"flex gap-2 mb-4 bg-slate-100 dark:bg-slate-900 p-1 rounded-lg",children:[c.jsx("button",{onClick:()=>s("package"),className:`flex-1 px-4 py-2 rounded-md text-sm font-medium transition-all ${n==="package"?"bg-white dark:bg-slate-700 text-slate-900 dark:text-white shadow-sm":"text-slate-500 dark:text-slate-400 hover:text-slate-700 dark:hover:text-slate-300"}`,children:c.jsxs("div",{className:"flex items-center justify-center gap-2",children:[c.jsx(ki,{size:16}),"Package Name"]})}),c.jsx("button",{onClick:()=>s("url"),className:`flex-1 px-4 py-2 rounded-md text-sm font-medium transition-all ${n==="url"?"bg-white dark:bg-slate-700 text-slate-900 dark:text-white shadow-sm":"text-slate-500 dark:text-slate-400 hover:text-slate-700 dark:hover:text-slate-300"}`,children:c.jsxs("div",{className:"flex items-center justify-center gap-2",children:[c.jsx(N6,{size:16}),"URL/Git"]})})]}),c.jsx("div",{className:"mb-4",children:n==="package"?c.jsxs("div",{children:[c.jsx("label",{className:"block text-sm font-medium text-slate-700 dark:text-slate-300 mb-2",children:"Package Name"}),c.jsx("input",{type:"text",placeholder:"e.g., zenml-kubernetes",value:i,onChange:u=>a(u.target.value),className:"w-full px-3 py-2 bg-slate-50 dark:bg-slate-900 border border-slate-200 dark:border-slate-700 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500"}),c.jsx("p",{className:"text-xs text-slate-500 dark:text-slate-400 mt-1",children:"Install from PyPI by package name"})]}):c.jsxs("div",{children:[c.jsx("label",{className:"block text-sm font-medium text-slate-700 dark:text-slate-300 mb-2",children:"URL"}),c.jsx("input",{type:"text",placeholder:"e.g., git+https://github.com/...",value:o,onChange:u=>l(u.target.value),className:"w-full px-3 py-2 bg-slate-50 dark:bg-slate-900 border border-slate-200 dark:border-slate-700 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500"}),c.jsx("p",{className:"text-xs text-slate-500 dark:text-slate-400 mt-1",children:"Install from Git repository or URL"})]})}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx(me,{variant:"outline",onClick:t,className:"flex-1",children:"Cancel"}),c.jsx(me,{onClick:d,disabled:n==="package"?!i:!o,className:"flex-1",children:"Install"})]})]})}):null}function nJ(){const[e,t]=k.useState(""),[r,n]=k.useState([]),[s,i]=k.useState(!0),[a,o]=k.useState(null),[l,d]=k.useState(!1);k.useEffect(()=>{u()},[]);const u=async()=>{try{i(!0);const m=await ja.getAvailablePlugins();n(m)}catch(m){console.error("Failed to load plugins:",m)}finally{i(!1)}},f=r.filter(m=>m.name.toLowerCase().includes(e.toLowerCase())||m.description.toLowerCase().includes(e.toLowerCase())),h=async m=>{o(m);try{await ja.installPlugin(m),n(g=>g.map(b=>b.id===m?{...b,installed:!0}:b))}catch(g){console.error("Install failed:",g),alert(`Installation failed: ${g.message}`)}finally{o(null)}},p=async({type:m,value:g})=>{o("manual");try{await ja.installPlugin(g),await u(),alert(`Successfully installed ${g}`)}catch(b){console.error("Install failed:",b),alert(`Installation failed: ${b.message}`)}finally{o(null)}};return s?c.jsx("div",{className:"flex justify-center items-center py-12",children:c.jsx(jl,{className:"animate-spin text-primary-500",size:32})}):c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"flex gap-4",children:[c.jsxs("div",{className:"relative flex-1",children:[c.jsx(hx,{className:"absolute left-3 top-1/2 -translate-y-1/2 text-slate-400",size:18}),c.jsx("input",{type:"text",placeholder:"Search plugins...",value:e,onChange:m=>t(m.target.value),className:"w-full pl-10 pr-4 py-2 bg-slate-50 dark:bg-slate-800 border border-slate-200 dark:border-slate-700 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500"})]}),c.jsxs(me,{onClick:()=>d(!0),className:"flex items-center gap-2",children:[c.jsx(Ss,{size:18}),"Add Plugin"]})]}),c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:f.map(m=>c.jsxs("div",{className:"p-4 border border-slate-200 dark:border-slate-700 rounded-xl hover:border-primary-500/50 dark:hover:border-primary-500/50 transition-colors bg-white dark:bg-slate-800/50",children:[c.jsxs("div",{className:"flex justify-between items-start mb-2",children:[c.jsxs("div",{children:[c.jsx("h3",{className:"font-semibold text-slate-900 dark:text-white",children:m.name}),c.jsxs("div",{className:"flex items-center gap-2 text-xs text-slate-500 dark:text-slate-400 mt-1",children:[c.jsxs("span",{children:["v",m.version]}),c.jsx("span",{children:"•"}),c.jsxs("span",{children:["by ",m.author]})]})]}),m.installed?c.jsxs(Et,{variant:"success",className:"flex items-center gap-1",children:[c.jsx(Dt,{size:12})," Installed"]}):c.jsx(me,{size:"sm",variant:"outline",onClick:()=>h(m.id),disabled:a===m.id||a==="manual",children:a===m.id?c.jsxs(c.Fragment,{children:[c.jsx(jl,{size:12,className:"animate-spin mr-1"}),"Installing..."]}):"Install"})]}),c.jsx("p",{className:"text-sm text-slate-600 dark:text-slate-300 mb-4 line-clamp-2",children:m.description}),c.jsxs("div",{className:"flex items-center justify-between mt-auto",children:[c.jsx("div",{className:"flex gap-2",children:m.tags.map(g=>c.jsx("span",{className:"px-2 py-0.5 bg-slate-100 dark:bg-slate-700 text-slate-600 dark:text-slate-300 text-xs rounded-full",children:g},g))}),c.jsxs("div",{className:"flex items-center gap-3 text-xs text-slate-400",children:[c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsx(lb,{size:12})," ",m.downloads]}),c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsx(P6,{size:12})," ",m.stars]})]})]})]},m.id))})]}),c.jsx(rJ,{isOpen:l,onClose:()=>d(!1),onAdd:p})]})}function sJ(){const[e,t]=k.useState([]),[r,n]=k.useState(!0),[s,i]=k.useState(null),[a,o]=k.useState(!1);k.useEffect(()=>{l()},[]);const l=async()=>{try{n(!0);const f=await ja.getInstalledPlugins();t(f)}catch(f){console.error("Failed to load installed plugins:",f)}finally{n(!1),o(!1)}},d=async()=>{o(!0),await l()},u=async f=>{if(confirm("Are you sure you want to uninstall this plugin?")){i(f);try{await ja.uninstallPlugin(f),t(h=>h.filter(p=>p.id!==f))}catch(h){console.error("Uninstall failed:",h),alert(`Uninstall failed: ${h.message}`)}finally{i(null)}}};return r?c.jsx("div",{className:"flex justify-center items-center py-12",children:c.jsx(jl,{className:"animate-spin text-primary-500",size:32})}):e.length===0?c.jsxs("div",{className:"text-center py-12 text-slate-500 dark:text-slate-400",children:[c.jsx("p",{children:"No plugins installed yet."}),c.jsx("p",{className:"text-sm mt-2",children:"Install plugins from the Browser tab"})]}):c.jsxs("div",{className:"space-y-4",children:[c.jsx("div",{className:"flex justify-end",children:c.jsxs(me,{variant:"outline",size:"sm",onClick:d,disabled:a,className:"flex items-center gap-2",children:[c.jsx(lM,{size:14,className:a?"animate-spin":""}),"Refresh"]})}),e.map(f=>c.jsxs("div",{className:"flex items-center justify-between p-4 bg-white dark:bg-slate-800/50 border border-slate-200 dark:border-slate-700 rounded-xl",children:[c.jsxs("div",{className:"flex items-start gap-4",children:[c.jsx("div",{className:"p-2 bg-primary-50 dark:bg-primary-900/20 rounded-lg",children:c.jsx(uM,{className:"text-primary-500",size:24})}),c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("h3",{className:"font-semibold text-slate-900 dark:text-white",children:f.name}),c.jsxs(Et,{variant:"outline",className:"text-xs",children:["v",f.version]}),c.jsx(Et,{variant:"success",className:"text-xs",children:"Active"})]}),c.jsx("p",{className:"text-sm text-slate-500 dark:text-slate-400 mt-1",children:f.description})]})]}),c.jsx("div",{className:"flex items-center gap-2",children:c.jsx(me,{variant:"ghost",size:"sm",className:"text-red-500 hover:text-red-600 hover:bg-red-50 dark:hover:bg-red-900/20",title:"Uninstall",onClick:()=>u(f.id),disabled:s===f.id,children:s===f.id?c.jsx(jl,{size:16,className:"animate-spin"}):c.jsx(ji,{size:16})})})]},f.id))]})}function iJ(){const[e,t]=k.useState(""),[r,n]=k.useState("idle"),[s,i]=k.useState([]),a=async()=>{if(e){n("importing"),i(["Connecting to ZenML client...","Fetching stack details..."]);try{const o=await ja.importZenMLStack(e);i(l=>[...l,`Found stack '${e}' with ${o.components.length} components.`]),await new Promise(l=>setTimeout(l,800)),i(l=>[...l,"Generating flowyml configuration...","Import successful!"]),n("success")}catch(o){console.error("Import failed:",o),i(l=>[...l,`Error: ${o.message}`]),n("error")}}};return c.jsxs("div",{className:"space-y-6",children:[c.jsx("div",{className:"bg-slate-50 dark:bg-slate-800/50 p-4 rounded-xl border border-slate-200 dark:border-slate-700",children:c.jsxs("div",{className:"flex items-start gap-3",children:[c.jsx(cM,{className:"text-primary-500 mt-1",size:20}),c.jsxs("div",{children:[c.jsx("h3",{className:"font-medium text-slate-900 dark:text-white",children:"Import ZenML Stack"}),c.jsx("p",{className:"text-sm text-slate-500 dark:text-slate-400 mt-1",children:"Migrate your existing ZenML infrastructure to flowyml. We'll automatically detect your components and generate the necessary configuration."})]})]})}),c.jsxs("div",{className:"flex gap-4 items-end",children:[c.jsxs("div",{className:"flex-1 space-y-2",children:[c.jsx("label",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:"ZenML Stack Name"}),c.jsx("input",{type:"text",placeholder:"e.g., production-stack",value:e,onChange:o=>t(o.target.value),className:"w-full px-3 py-2 bg-white dark:bg-slate-800 border border-slate-200 dark:border-slate-700 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500"})]}),c.jsx(me,{onClick:a,disabled:r==="importing"||!e,className:"flex items-center gap-2",children:r==="importing"?c.jsxs(c.Fragment,{children:[c.jsx(jl,{size:16,className:"animate-spin"}),"Importing..."]}):c.jsxs(c.Fragment,{children:["Start Import",c.jsx(Ps,{size:16})]})})]}),r!=="idle"&&c.jsxs("div",{className:"bg-slate-900 rounded-xl p-4 font-mono text-sm overflow-hidden",children:[c.jsx("div",{className:"space-y-1",children:s.map((o,l)=>c.jsxs("div",{className:"flex items-center gap-2 text-slate-300",children:[c.jsx("span",{className:"text-slate-600",children:"➜"}),o]},l))}),r==="success"&&c.jsxs("div",{className:"mt-4 pt-4 border-t border-slate-800 flex items-center gap-2 text-green-400",children:[c.jsx(Dt,{size:16}),c.jsx("span",{children:"Stack imported successfully! You can now use it in your pipelines."})]}),r==="error"&&c.jsxs("div",{className:"mt-4 pt-4 border-t border-slate-800 flex items-center gap-2 text-red-400",children:[c.jsx(Pd,{size:16}),c.jsx("span",{children:"Failed to import stack. Please check the name and try again."})]})]})]})}function aJ(){const[e,t]=k.useState("browser"),r=[{id:"browser",label:"Plugin Browser",icon:ki},{id:"installed",label:"Installed",icon:lb},{id:"zenml",label:"ZenML Integration",icon:cM}];return c.jsxs(Me,{className:"overflow-hidden",children:[c.jsxs(YR,{className:"border-b border-slate-100 dark:border-slate-800 bg-slate-50/50 dark:bg-slate-900/50 pb-0",children:[c.jsx("div",{className:"flex items-center justify-between mb-4",children:c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(ki,{size:20,className:"text-primary-500"}),c.jsx(XR,{children:"Plugins & Integrations"})]})}),c.jsx("div",{className:"flex gap-6",children:r.map(n=>{const s=n.icon,i=e===n.id;return c.jsxs("button",{onClick:()=>t(n.id),className:`
|
|
446
|
-
flex items-center gap-2 pb-3 text-sm font-medium transition-all relative
|
|
447
|
-
${i?"text-primary-600 dark:text-primary-400":"text-slate-500 dark:text-slate-400 hover:text-slate-700 dark:hover:text-slate-200"}
|
|
448
|
-
`,children:[c.jsx(s,{size:16}),n.label,i&&c.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-0.5 bg-primary-500 rounded-t-full"})]},n.id)})})]}),c.jsxs(Ox,{className:"p-6",children:[e==="browser"&&c.jsx(nJ,{}),e==="installed"&&c.jsx(sJ,{}),e==="zenml"&&c.jsx(iJ,{})]})]})}function oJ(){const e={hidden:{opacity:0},show:{opacity:1,transition:{staggerChildren:.1}}},t={hidden:{opacity:0,y:20},show:{opacity:1,y:0}};return c.jsxs(Le.div,{initial:"hidden",animate:"show",variants:e,className:"space-y-6",children:[c.jsxs(Le.div,{variants:t,children:[c.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[c.jsx("div",{className:"p-2 bg-gradient-to-br from-purple-600 to-purple-800 rounded-lg",children:c.jsx(ki,{className:"text-white",size:24})}),c.jsx("h2",{className:"text-3xl font-bold text-slate-900 dark:text-white tracking-tight",children:"Plugins & Integrations"})]}),c.jsx("p",{className:"text-slate-500 dark:text-slate-400 mt-2",children:"Extend flowyml with plugins from ZenML, Airflow, and other ecosystems. Browse, install, and manage integrations seamlessly."})]}),c.jsx(Le.div,{variants:t,children:c.jsx(aJ,{})})]})}function lJ(){const[e,t]=k.useState([]),[r,n]=k.useState(!0),[s,i]=k.useState(!1),[a,o]=k.useState(""),[l,d]=k.useState(null),[u,f]=k.useState(new Set);k.useEffect(()=>{h()},[]);const h=async()=>{try{const v=await(await fetch("/api/execution/tokens")).json();t(v.tokens||[])}catch(y){console.error("Failed to fetch tokens:",y)}finally{n(!1)}},p=async y=>{y.preventDefault();try{const w=await(await fetch("/api/execution/tokens",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:a})})).json();d(w.token),o(""),h()}catch(v){console.error("Failed to create token:",v)}},m=async y=>{if(confirm("Are you sure you want to delete this token? This action cannot be undone."))try{await fetch(`/api/execution/tokens/${y}`,{method:"DELETE"}),h()}catch(v){console.error("Failed to delete token:",v)}},g=y=>{navigator.clipboard.writeText(y)},b=y=>{f(v=>{const w=new Set(v);return w.has(y)?w.delete(y):w.add(y),w})},x=y=>`${y.substring(0,8)}${"•".repeat(32)}${y.substring(y.length-8)}`;return r?c.jsx("div",{className:"flex items-center justify-center min-h-screen",children:c.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary-600"})}):c.jsxs("div",{className:"p-6 max-w-6xl mx-auto space-y-6",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{children:[c.jsxs("h1",{className:"text-3xl font-bold text-slate-900 dark:text-white flex items-center gap-3",children:[c.jsx("div",{className:"p-3 bg-gradient-to-br from-primary-500 to-purple-500 rounded-xl text-white",children:c.jsx(ya,{size:28})}),"API Tokens"]}),c.jsx("p",{className:"text-slate-500 dark:text-slate-400 mt-2",children:"Manage API tokens for programmatic access to flowyml"})]}),c.jsxs(me,{onClick:()=>i(!0),className:"flex items-center gap-2 bg-gradient-to-r from-primary-600 to-purple-600 hover:from-primary-700 hover:to-purple-700",children:[c.jsx(Ss,{size:16}),"Create Token"]})]}),c.jsx(Me,{className:"border-l-4 border-l-amber-500 bg-amber-50 dark:bg-amber-900/10",children:c.jsxs("div",{className:"flex items-start gap-3",children:[c.jsx(px,{className:"text-amber-600 dark:text-amber-400 flex-shrink-0 mt-0.5",size:20}),c.jsxs("div",{children:[c.jsx("h3",{className:"font-semibold text-amber-900 dark:text-amber-200",children:"Security Notice"}),c.jsx("p",{className:"text-sm text-amber-800 dark:text-amber-300 mt-1",children:"Treat your API tokens like passwords. Never share them publicly or commit them to version control."})]})]})}),c.jsx("div",{className:"grid gap-4",children:e.length===0?c.jsxs(Me,{className:"text-center py-16 bg-slate-50 dark:bg-slate-800/30",children:[c.jsx("div",{className:"mx-auto w-20 h-20 bg-slate-100 dark:bg-slate-700 rounded-2xl flex items-center justify-center mb-6",children:c.jsx(ya,{className:"text-slate-400",size:32})}),c.jsx("h3",{className:"text-xl font-bold text-slate-900 dark:text-white mb-2",children:"No API tokens yet"}),c.jsx("p",{className:"text-slate-500 max-w-md mx-auto mb-6",children:"Create your first API token to start making programmatic requests to flowyml"}),c.jsxs(me,{onClick:()=>i(!0),className:"bg-primary-600 hover:bg-primary-700",children:[c.jsx(Ss,{size:16,className:"mr-2"}),"Create Your First Token"]})]}):e.map(y=>c.jsx(Me,{className:"hover:shadow-lg transition-all duration-200",children:c.jsxs("div",{className:"flex items-center justify-between gap-4",children:[c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[c.jsx("div",{className:"p-2 bg-primary-50 dark:bg-primary-900/20 rounded-lg",children:c.jsx(ya,{className:"text-primary-600 dark:text-primary-400",size:20})}),c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsx("h3",{className:"text-lg font-semibold text-slate-900 dark:text-white truncate",children:y.name}),c.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[c.jsxs("span",{className:"text-xs text-slate-500 dark:text-slate-400 flex items-center gap-1",children:[c.jsx(ir,{size:12}),"Created ",Ye(new Date(y.created_at),"MMM d, yyyy")]}),c.jsx(Et,{variant:"secondary",className:"text-xs",children:y.id})]})]})]}),c.jsx("div",{className:"bg-slate-50 dark:bg-slate-800 rounded-lg p-3 font-mono text-sm border border-slate-200 dark:border-slate-700",children:c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("code",{className:"flex-1 truncate text-slate-700 dark:text-slate-300",children:u.has(y.id)?y.token:x(y.token)}),c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsx("button",{onClick:()=>b(y.id),className:"p-1.5 hover:bg-slate-200 dark:hover:bg-slate-700 rounded transition-colors",title:u.has(y.id)?"Hide token":"Show token",children:u.has(y.id)?c.jsx(w6,{size:16,className:"text-slate-500"}):c.jsx(fx,{size:16,className:"text-slate-500"})}),c.jsx("button",{onClick:()=>g(y.token),className:"p-1.5 hover:bg-slate-200 dark:hover:bg-slate-700 rounded transition-colors",title:"Copy to clipboard",children:c.jsx(Bu,{size:16,className:"text-slate-500"})})]})]})})]}),c.jsx(me,{onClick:()=>m(y.id),variant:"ghost",className:"text-rose-600 hover:text-rose-700 hover:bg-rose-50 dark:hover:bg-rose-900/20 flex-shrink-0",children:c.jsx(ji,{size:18})})]})},y.id))}),s&&c.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",children:c.jsxs(Me,{className:"max-w-lg w-full",children:[c.jsxs("h2",{className:"text-2xl font-bold text-slate-900 dark:text-white mb-4 flex items-center gap-2",children:[c.jsx(Ss,{className:"text-primary-600",size:24}),"Create New Token"]}),c.jsxs("form",{onSubmit:p,className:"space-y-4",children:[c.jsxs("div",{children:[c.jsx("label",{className:"block text-sm font-medium text-slate-700 dark:text-slate-300 mb-2",children:"Token Name"}),c.jsx("input",{type:"text",value:a,onChange:y=>o(y.target.value),placeholder:"e.g., Production API, CI/CD Pipeline",className:"w-full px-4 py-2 border border-slate-300 dark:border-slate-600 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-transparent bg-white dark:bg-slate-800 text-slate-900 dark:text-white",required:!0}),c.jsx("p",{className:"text-xs text-slate-500 dark:text-slate-400 mt-1",children:"Choose a descriptive name to identify this token's purpose"})]}),c.jsxs("div",{className:"flex gap-3 justify-end pt-4",children:[c.jsx(me,{type:"button",variant:"ghost",onClick:()=>i(!1),children:"Cancel"}),c.jsx(me,{type:"submit",className:"bg-primary-600 hover:bg-primary-700",children:"Create Token"})]})]})]})}),l&&c.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",children:c.jsxs(Me,{className:"max-w-2xl w-full",children:[c.jsxs("div",{className:"text-center mb-6",children:[c.jsx("div",{className:"mx-auto w-16 h-16 bg-green-100 dark:bg-green-900/20 rounded-full flex items-center justify-center mb-4",children:c.jsx(g6,{className:"text-green-600 dark:text-green-400",size:32})}),c.jsx("h2",{className:"text-2xl font-bold text-slate-900 dark:text-white",children:"Token Created Successfully!"}),c.jsx("p",{className:"text-slate-500 dark:text-slate-400 mt-2",children:"Copy this token now. You won't be able to see it again."})]}),c.jsx("div",{className:"bg-slate-50 dark:bg-slate-800 rounded-lg p-4 mb-6 border-2 border-primary-200 dark:border-primary-800",children:c.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[c.jsx("code",{className:"flex-1 font-mono text-sm break-all text-slate-900 dark:text-white",children:l}),c.jsx("button",{onClick:()=>g(l),className:"p-2 bg-primary-600 hover:bg-primary-700 text-white rounded-lg transition-colors flex-shrink-0",title:"Copy to clipboard",children:c.jsx(Bu,{size:18})})]})}),c.jsx("div",{className:"bg-amber-50 dark:bg-amber-900/10 border border-amber-200 dark:border-amber-800 rounded-lg p-4 mb-6",children:c.jsxs("div",{className:"flex gap-2",children:[c.jsx(px,{className:"text-amber-600 dark:text-amber-400 flex-shrink-0",size:20}),c.jsxs("div",{className:"text-sm text-amber-800 dark:text-amber-200",children:[c.jsx("strong",{children:"Important:"})," Store this token securely. It won't be displayed again."]})]})}),c.jsx(me,{onClick:()=>{d(null),i(!1)},className:"w-full bg-primary-600 hover:bg-primary-700",children:"I've Saved My Token"})]})})]})}function cJ(){const[e,t]=k.useState([]),[r,n]=k.useState(!0),[s,i]=k.useState(!1),[a,o]=k.useState(null),[l,d]=k.useState(null);k.useEffect(()=>{u()},[]);const u=async()=>{try{const h=await gt("/api/execution/tokens");if(h.status===401){t([]),n(!1);return}const p=await h.json();t(p.tokens||[])}catch(h){console.error("Failed to fetch tokens:",h),d("Failed to load tokens")}finally{n(!1)}},f=async()=>{try{const h=await gt("/api/execution/tokens/init",{method:"POST"}),p=await h.json();h.ok?(o(p.token),await u()):d(p.detail)}catch{d("Failed to create initial token")}};return r?c.jsx("div",{className:"flex items-center justify-center h-96",children:c.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary-600"})}):c.jsxs("div",{className:"space-y-6 max-w-6xl mx-auto",children:[c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[c.jsx("div",{className:"p-2 bg-gradient-to-br from-amber-600 to-orange-800 rounded-lg",children:c.jsx(ya,{className:"text-white",size:24})}),c.jsx("h2",{className:"text-3xl font-bold text-slate-900 dark:text-white tracking-tight",children:"API Tokens"})]}),c.jsx("p",{className:"text-slate-500 dark:text-slate-400 mt-2",children:"Manage API tokens for authenticating CLI and SDK requests"})]}),l&&c.jsxs("div",{className:"bg-rose-50 dark:bg-rose-900/20 border border-rose-200 dark:border-rose-800 rounded-lg p-4 flex items-start gap-3",children:[c.jsx(Pd,{className:"text-rose-600 shrink-0",size:20}),c.jsxs("div",{children:[c.jsx("h4",{className:"font-medium text-rose-900 dark:text-rose-200",children:"Error"}),c.jsx("p",{className:"text-sm text-rose-700 dark:text-rose-300 mt-1",children:l})]})]}),a&&c.jsx(dJ,{token:a,onClose:()=>o(null)}),e.length===0&&!a&&c.jsx(Me,{children:c.jsxs(Ox,{className:"py-16 text-center",children:[c.jsx("div",{className:"mx-auto w-20 h-20 bg-amber-100 dark:bg-amber-900/30 rounded-2xl flex items-center justify-center mb-6",children:c.jsx(ya,{className:"text-amber-600",size:32})}),c.jsx("h3",{className:"text-xl font-bold text-slate-900 dark:text-white mb-2",children:"No API Tokens Yet"}),c.jsx("p",{className:"text-slate-500 dark:text-slate-400 max-w-md mx-auto mb-6",children:"Create your first admin token to start using the flowyml API"}),c.jsxs(me,{onClick:f,className:"flex items-center gap-2 mx-auto",children:[c.jsx(Ss,{size:18}),"Create Initial Token"]})]})}),e.length>0&&c.jsxs(Me,{children:[c.jsx(YR,{children:c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx(XR,{children:"Active Tokens"}),c.jsxs(me,{onClick:()=>i(!0),variant:"primary",className:"flex items-center gap-2",children:[c.jsx(Ss,{size:18}),"Create Token"]})]})}),c.jsx(Ox,{children:c.jsx("div",{className:"space-y-3",children:e.map((h,p)=>c.jsx(uJ,{token:h,onRevoke:u},p))})})]}),s&&c.jsx(fJ,{onClose:()=>i(!1),onCreate:h=>{o(h),i(!1),u()}})]})}function uJ({token:e,onRevoke:t}){var a;const[r,n]=k.useState(!1),s=async()=>{try{await fetch(`/ api / execution / tokens / ${e.name} `,{method:"DELETE"}),t()}catch(o){console.error("Failed to revoke token:",o)}},i={read:"bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-300",write:"bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-300",execute:"bg-purple-100 text-purple-700 dark:bg-purple-900/30 dark:text-purple-300",admin:"bg-rose-100 text-rose-700 dark:bg-rose-900/30 dark:text-rose-300"};return c.jsxs("div",{className:"p-4 bg-slate-50 dark:bg-slate-800/50 rounded-lg border border-slate-200 dark:border-slate-700 hover:border-primary-300 dark:hover:border-primary-700 transition-colors",children:[c.jsxs("div",{className:"flex items-start justify-between",children:[c.jsxs("div",{className:"flex-1",children:[c.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[c.jsx("h4",{className:"font-semibold text-slate-900 dark:text-white",children:e.name}),e.project&&c.jsx(Et,{variant:"secondary",className:"text-xs",children:e.project})]}),c.jsx("div",{className:"flex flex-wrap gap-2 mb-3",children:(a=e.permissions)==null?void 0:a.map(o=>c.jsx("span",{className:`px - 2 py - 0.5 rounded text - xs font - medium ${i[o]||"bg-slate-100 text-slate-700"} `,children:o},o))}),c.jsxs("div",{className:"flex items-center gap-4 text-xs text-slate-500 dark:text-slate-400",children:[c.jsxs("span",{className:"flex items-center gap-1",children:[c.jsx(ir,{size:12}),"Created: ",Ye(new Date(e.created_at),"MMM d, yyyy")]}),e.last_used&&c.jsxs("span",{children:["Last used: ",Ye(new Date(e.last_used),"MMM d, yyyy")]})]})]}),c.jsx("button",{onClick:()=>n(!0),className:"p-2 hover:bg-rose-100 dark:hover:bg-rose-900/30 text-slate-400 hover:text-rose-600 rounded-lg transition-colors",children:c.jsx(ji,{size:16})})]}),r&&c.jsxs("div",{className:"mt-3 pt-3 border-t border-slate-200 dark:border-slate-700",children:[c.jsx("p",{className:"text-sm text-slate-600 dark:text-slate-400 mb-3",children:"Are you sure you want to revoke this token? This action cannot be undone."}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx(me,{variant:"danger",size:"sm",onClick:s,children:"Yes, Revoke"}),c.jsx(me,{variant:"ghost",size:"sm",onClick:()=>n(!1),children:"Cancel"})]})]})]})}function dJ({token:e,onClose:t}){const[r,n]=k.useState(!1),s=()=>{navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!1),2e3)};return c.jsxs(Le.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},className:"bg-gradient-to-br from-emerald-50 to-teal-50 dark:from-emerald-900/20 dark:to-teal-900/20 border-2 border-emerald-300 dark:border-emerald-700 rounded-lg p-6",children:[c.jsx("div",{className:"flex items-start justify-between mb-4",children:c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("div",{className:"p-2 bg-emerald-500 rounded-lg",children:c.jsx(px,{className:"text-white",size:20})}),c.jsxs("div",{children:[c.jsx("h3",{className:"font-bold text-emerald-900 dark:text-emerald-200",children:"Token Created Successfully!"}),c.jsx("p",{className:"text-sm text-emerald-700 dark:text-emerald-300 mt-1",children:"Save this token now - it won't be shown again"})]})]})}),c.jsx("div",{className:"bg-white dark:bg-slate-800 rounded-lg p-4 border border-emerald-200 dark:border-emerald-800",children:c.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[c.jsx("code",{className:"flex-1 font-mono text-sm text-slate-900 dark:text-white break-all",children:e}),c.jsx("button",{onClick:s,className:"p-2 hover:bg-slate-100 dark:hover:bg-slate-700 rounded transition-colors shrink-0",children:r?c.jsx(iM,{className:"text-emerald-600",size:18}):c.jsx(Bu,{className:"text-slate-400",size:18})})]})}),c.jsx(me,{variant:"ghost",onClick:t,className:"mt-4 w-full",children:"I've saved my token"})]})}function fJ({onClose:e,onCreate:t}){const[r,n]=k.useState(""),[s,i]=k.useState(""),[a,o]=k.useState(["read","write","execute"]),[l,d]=k.useState(!1),[u,f]=k.useState(null),[h,p]=k.useState([]),[m,g]=k.useState(!0);k.useEffect(()=>{b()},[]);const b=async()=>{try{const w=await(await gt("/api/projects/")).json();p(w||[])}catch(v){console.error("Failed to fetch projects:",v)}finally{g(!1)}},x=async()=>{if(!r){f("Token name is required");return}d(!0),f(null);try{const v=await fetch("/api/execution/tokens",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:r,project:s||null,permissions:a})}),w=await v.json();v.ok?t(w.token):f(w.detail)}catch{f("Failed to create token")}finally{d(!1)}},y=v=>{o(w=>w.includes(v)?w.filter(_=>_!==v):[...w,v])};return c.jsx(Xl,{children:c.jsx(Le.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/50 backdrop-blur-sm z-50 flex items-center justify-center p-4",onClick:e,children:c.jsxs(Le.div,{initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},onClick:v=>v.stopPropagation(),className:"bg-white dark:bg-slate-800 rounded-2xl shadow-2xl max-w-lg w-full border border-slate-200 dark:border-slate-700",children:[c.jsxs("div",{className:"p-6 border-b border-slate-100 dark:border-slate-700",children:[c.jsx("h3",{className:"text-2xl font-bold text-slate-900 dark:text-white",children:"Create New Token"}),c.jsx("p",{className:"text-sm text-slate-500 dark:text-slate-400 mt-1",children:"Generate a new API token for authentication"})]}),c.jsxs("div",{className:"p-6 space-y-4",children:[u&&c.jsx("div",{className:"bg-rose-50 dark:bg-rose-900/20 border border-rose-200 dark:border-rose-800 rounded-lg p-3 text-sm text-rose-700 dark:text-rose-300",children:u}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-sm font-medium text-slate-700 dark:text-slate-300 mb-1",children:"Token Name *"}),c.jsx("input",{type:"text",value:r,onChange:v=>n(v.target.value),placeholder:"e.g., Production CLI Token",className:"w-full px-3 py-2 border border-slate-200 dark:border-slate-700 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 bg-white dark:bg-slate-900 text-slate-900 dark:text-white"})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-sm font-medium text-slate-700 dark:text-slate-300 mb-1",children:"Project Scope"}),c.jsxs("select",{value:s,onChange:v=>i(v.target.value),disabled:m,className:"w-full px-3 py-2 border border-slate-200 dark:border-slate-700 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 bg-white dark:bg-slate-900 text-slate-900 dark:text-white",children:[c.jsx("option",{value:"",children:"All Projects"}),h.map(v=>c.jsx("option",{value:v.name,children:v.name},v.name))]}),c.jsx("p",{className:"text-xs text-slate-500 dark:text-slate-400 mt-1",children:"Restrict this token to a specific project or allow access to all"})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-sm font-medium text-slate-700 dark:text-slate-300 mb-2",children:"Permissions"}),c.jsx("div",{className:"space-y-2",children:["read","write","execute","admin"].map(v=>c.jsxs("label",{className:"flex items-center gap-3 p-3 bg-slate-50 dark:bg-slate-900/50 rounded-lg cursor-pointer hover:bg-slate-100 dark:hover:bg-slate-700/50",children:[c.jsx("input",{type:"checkbox",checked:a.includes(v),onChange:()=>y(v),className:"w-4 h-4 text-primary-600 border-slate-300 rounded focus:ring-primary-500"}),c.jsxs("div",{className:"flex-1",children:[c.jsx("span",{className:"font-medium text-slate-900 dark:text-white capitalize",children:v}),c.jsxs("p",{className:"text-xs text-slate-500 dark:text-slate-400 mt-0.5",children:[v==="read"&&"View pipelines, runs, and artifacts",v==="write"&&"Modify configurations and metadata",v==="execute"&&"Run pipelines and workflows",v==="admin"&&"Full access including token management"]})]})]},v))})]})]}),c.jsxs("div",{className:"p-6 border-t border-slate-100 dark:border-slate-700 flex gap-3",children:[c.jsx(me,{variant:"ghost",onClick:e,className:"flex-1",children:"Cancel"}),c.jsx(me,{onClick:x,disabled:l,className:"flex-1",children:l?"Creating...":"Create Token"})]})]})})})}const hJ=UL([{path:"/",element:c.jsx(b$,{}),children:[{index:!0,element:c.jsx(cV,{})},{path:"pipelines",element:c.jsx(hV,{})},{path:"runs",element:c.jsx(yV,{})},{path:"runs/:runId",element:c.jsx(IQ,{})},{path:"assets",element:c.jsx(UQ,{})},{path:"experiments",element:c.jsx(WQ,{})},{path:"experiments/:experimentId",element:c.jsx(KQ,{})},{path:"traces",element:c.jsx(ZQ,{})},{path:"projects",element:c.jsx(QQ,{})},{path:"schedules",element:c.jsx(JQ,{})},{path:"leaderboard",element:c.jsx(eJ,{})},{path:"plugins",element:c.jsx(oJ,{})},{path:"settings",element:c.jsx(lJ,{})},{path:"tokens",element:c.jsx(cJ,{})}]}]);function pJ(){return c.jsx(o6,{children:c.jsx(c6,{children:c.jsx(QL,{router:hJ})})})}my.createRoot(document.getElementById("root")).render(c.jsx(B.StrictMode,{children:c.jsx(pJ,{})}));
|