@holdpoint/cli 0.1.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/builder-ui/assets/index-BxfWKnb5.js +437 -0
- package/dist/builder-ui/assets/index-BxfWKnb5.js.map +1 -0
- package/dist/builder-ui/assets/index-DkLHZ-in.css +1 -0
- package/dist/builder-ui/favicon.svg +10 -0
- package/dist/builder-ui/index.html +14 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +995 -0
- package/dist/index.js.map +1 -0
- package/dist/templates/MASTER_PROMPT.md +309 -0
- package/dist/templates/_base.yaml +52 -0
- package/dist/templates/fullstack.yaml +93 -0
- package/dist/templates/go.yaml +60 -0
- package/dist/templates/nextjs.yaml +76 -0
- package/dist/templates/python.yaml +60 -0
- package/dist/templates/typescript.yaml +55 -0
- package/package.json +72 -0
|
@@ -0,0 +1,437 @@
|
|
|
1
|
+
var eA=Object.defineProperty;var Kv=e=>{throw TypeError(e)};var tA=(e,t,r)=>t in e?eA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var gt=(e,t,r)=>tA(e,typeof t!="symbol"?t+"":t,r),tp=(e,t,r)=>t.has(e)||Kv("Cannot "+r);var le=(e,t,r)=>(tp(e,t,"read from private field"),r?r.call(e):t.get(e)),Zt=(e,t,r)=>t.has(e)?Kv("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),it=(e,t,r,a)=>(tp(e,t,"write to private field"),a?a.call(e,r):t.set(e,r),r),Pe=(e,t,r)=>(tp(e,t,"access private method"),r);function nA(e,t){for(var r=0;r<t.length;r++){const a=t[r];if(typeof a!="string"&&!Array.isArray(a)){for(const o in a)if(o!=="default"&&!(o in e)){const s=Object.getOwnPropertyDescriptor(a,o);s&&Object.defineProperty(e,o,s.get?s:{enumerable:!0,get:()=>a[o]})}}}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 o of document.querySelectorAll('link[rel="modulepreload"]'))a(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const u of s.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&a(u)}).observe(document,{childList:!0,subtree:!0});function r(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerPolicy&&(s.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?s.credentials="include":o.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function a(o){if(o.ep)return;o.ep=!0;const s=r(o);fetch(o.href,s)}})();function df(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var np={exports:{}},Wl={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and 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 Wv;function iA(){if(Wv)return Wl;Wv=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(a,o,s){var u=null;if(s!==void 0&&(u=""+s),o.key!==void 0&&(u=""+o.key),"key"in o){s={};for(var f in o)f!=="key"&&(s[f]=o[f])}else s=o;return o=s.ref,{$$typeof:e,type:a,key:u,ref:o!==void 0?o:null,props:s}}return Wl.Fragment=t,Wl.jsx=r,Wl.jsxs=r,Wl}var Jv;function rA(){return Jv||(Jv=1,np.exports=iA()),np.exports}var S=rA(),ip={exports:{}},Oe={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and 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 ex;function aA(){if(ex)return Oe;ex=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),v=Symbol.iterator;function x(R){return R===null||typeof R!="object"?null:(R=v&&R[v]||R["@@iterator"],typeof R=="function"?R:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,E={};function C(R,Y,J){this.props=R,this.context=Y,this.refs=E,this.updater=J||b}C.prototype.isReactComponent={},C.prototype.setState=function(R,Y){if(typeof R!="object"&&typeof R!="function"&&R!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,R,Y,"setState")},C.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function N(){}N.prototype=C.prototype;function A(R,Y,J){this.props=R,this.context=Y,this.refs=E,this.updater=J||b}var T=A.prototype=new N;T.constructor=A,w(T,C.prototype),T.isPureReactComponent=!0;var D=Array.isArray;function L(){}var j={H:null,A:null,T:null,S:null},I=Object.prototype.hasOwnProperty;function Z(R,Y,J){var ne=J.ref;return{$$typeof:e,type:R,key:Y,ref:ne!==void 0?ne:null,props:J}}function te(R,Y){return Z(R.type,Y,R.props)}function G(R){return typeof R=="object"&&R!==null&&R.$$typeof===e}function q(R){var Y={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(J){return Y[J]})}var ie=/\/+/g;function z(R,Y){return typeof R=="object"&&R!==null&&R.key!=null?q(""+R.key):Y.toString(36)}function F(R){switch(R.status){case"fulfilled":return R.value;case"rejected":throw R.reason;default:switch(typeof R.status=="string"?R.then(L,L):(R.status="pending",R.then(function(Y){R.status==="pending"&&(R.status="fulfilled",R.value=Y)},function(Y){R.status==="pending"&&(R.status="rejected",R.reason=Y)})),R.status){case"fulfilled":return R.value;case"rejected":throw R.reason}}throw R}function k(R,Y,J,ne,se){var fe=typeof R;(fe==="undefined"||fe==="boolean")&&(R=null);var de=!1;if(R===null)de=!0;else switch(fe){case"bigint":case"string":case"number":de=!0;break;case"object":switch(R.$$typeof){case e:case t:de=!0;break;case y:return de=R._init,k(de(R._payload),Y,J,ne,se)}}if(de)return se=se(R),de=ne===""?"."+z(R,0):ne,D(se)?(J="",de!=null&&(J=de.replace(ie,"$&/")+"/"),k(se,Y,J,"",function(Ae){return Ae})):se!=null&&(G(se)&&(se=te(se,J+(se.key==null||R&&R.key===se.key?"":(""+se.key).replace(ie,"$&/")+"/")+de)),Y.push(se)),1;de=0;var ce=ne===""?".":ne+":";if(D(R))for(var he=0;he<R.length;he++)ne=R[he],fe=ce+z(ne,he),de+=k(ne,Y,J,fe,se);else if(he=x(R),typeof he=="function")for(R=he.call(R),he=0;!(ne=R.next()).done;)ne=ne.value,fe=ce+z(ne,he++),de+=k(ne,Y,J,fe,se);else if(fe==="object"){if(typeof R.then=="function")return k(F(R),Y,J,ne,se);throw Y=String(R),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.")}return de}function B(R,Y,J){if(R==null)return R;var ne=[],se=0;return k(R,ne,"","",function(fe){return Y.call(J,fe,se++)}),ne}function H(R){if(R._status===-1){var Y=R._result;Y=Y(),Y.then(function(J){(R._status===0||R._status===-1)&&(R._status=1,R._result=J)},function(J){(R._status===0||R._status===-1)&&(R._status=2,R._result=J)}),R._status===-1&&(R._status=0,R._result=Y)}if(R._status===1)return R._result.default;throw R._result}var $=typeof reportError=="function"?reportError:function(R){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Y=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof R=="object"&&R!==null&&typeof R.message=="string"?String(R.message):String(R),error:R});if(!window.dispatchEvent(Y))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",R);return}console.error(R)},K={map:B,forEach:function(R,Y,J){B(R,function(){Y.apply(this,arguments)},J)},count:function(R){var Y=0;return B(R,function(){Y++}),Y},toArray:function(R){return B(R,function(Y){return Y})||[]},only:function(R){if(!G(R))throw Error("React.Children.only expected to receive a single React element child.");return R}};return Oe.Activity=g,Oe.Children=K,Oe.Component=C,Oe.Fragment=r,Oe.Profiler=o,Oe.PureComponent=A,Oe.StrictMode=a,Oe.Suspense=h,Oe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=j,Oe.__COMPILER_RUNTIME={__proto__:null,c:function(R){return j.H.useMemoCache(R)}},Oe.cache=function(R){return function(){return R.apply(null,arguments)}},Oe.cacheSignal=function(){return null},Oe.cloneElement=function(R,Y,J){if(R==null)throw Error("The argument must be a React element, but you passed "+R+".");var ne=w({},R.props),se=R.key;if(Y!=null)for(fe in Y.key!==void 0&&(se=""+Y.key),Y)!I.call(Y,fe)||fe==="key"||fe==="__self"||fe==="__source"||fe==="ref"&&Y.ref===void 0||(ne[fe]=Y[fe]);var fe=arguments.length-2;if(fe===1)ne.children=J;else if(1<fe){for(var de=Array(fe),ce=0;ce<fe;ce++)de[ce]=arguments[ce+2];ne.children=de}return Z(R.type,se,ne)},Oe.createContext=function(R){return R={$$typeof:u,_currentValue:R,_currentValue2:R,_threadCount:0,Provider:null,Consumer:null},R.Provider=R,R.Consumer={$$typeof:s,_context:R},R},Oe.createElement=function(R,Y,J){var ne,se={},fe=null;if(Y!=null)for(ne in Y.key!==void 0&&(fe=""+Y.key),Y)I.call(Y,ne)&&ne!=="key"&&ne!=="__self"&&ne!=="__source"&&(se[ne]=Y[ne]);var de=arguments.length-2;if(de===1)se.children=J;else if(1<de){for(var ce=Array(de),he=0;he<de;he++)ce[he]=arguments[he+2];se.children=ce}if(R&&R.defaultProps)for(ne in de=R.defaultProps,de)se[ne]===void 0&&(se[ne]=de[ne]);return Z(R,fe,se)},Oe.createRef=function(){return{current:null}},Oe.forwardRef=function(R){return{$$typeof:f,render:R}},Oe.isValidElement=G,Oe.lazy=function(R){return{$$typeof:y,_payload:{_status:-1,_result:R},_init:H}},Oe.memo=function(R,Y){return{$$typeof:p,type:R,compare:Y===void 0?null:Y}},Oe.startTransition=function(R){var Y=j.T,J={};j.T=J;try{var ne=R(),se=j.S;se!==null&&se(J,ne),typeof ne=="object"&&ne!==null&&typeof ne.then=="function"&&ne.then(L,$)}catch(fe){$(fe)}finally{Y!==null&&J.types!==null&&(Y.types=J.types),j.T=Y}},Oe.unstable_useCacheRefresh=function(){return j.H.useCacheRefresh()},Oe.use=function(R){return j.H.use(R)},Oe.useActionState=function(R,Y,J){return j.H.useActionState(R,Y,J)},Oe.useCallback=function(R,Y){return j.H.useCallback(R,Y)},Oe.useContext=function(R){return j.H.useContext(R)},Oe.useDebugValue=function(){},Oe.useDeferredValue=function(R,Y){return j.H.useDeferredValue(R,Y)},Oe.useEffect=function(R,Y){return j.H.useEffect(R,Y)},Oe.useEffectEvent=function(R){return j.H.useEffectEvent(R)},Oe.useId=function(){return j.H.useId()},Oe.useImperativeHandle=function(R,Y,J){return j.H.useImperativeHandle(R,Y,J)},Oe.useInsertionEffect=function(R,Y){return j.H.useInsertionEffect(R,Y)},Oe.useLayoutEffect=function(R,Y){return j.H.useLayoutEffect(R,Y)},Oe.useMemo=function(R,Y){return j.H.useMemo(R,Y)},Oe.useOptimistic=function(R,Y){return j.H.useOptimistic(R,Y)},Oe.useReducer=function(R,Y,J){return j.H.useReducer(R,Y,J)},Oe.useRef=function(R){return j.H.useRef(R)},Oe.useState=function(R){return j.H.useState(R)},Oe.useSyncExternalStore=function(R,Y,J){return j.H.useSyncExternalStore(R,Y,J)},Oe.useTransition=function(){return j.H.useTransition()},Oe.version="19.2.6",Oe}var tx;function Os(){return tx||(tx=1,ip.exports=aA()),ip.exports}var O=Os();const Ve=df(O),z1=nA({__proto__:null,default:Ve},[O]);var rp={exports:{}},Jl={},ap={exports:{}},op={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var nx;function oA(){return nx||(nx=1,(function(e){function t(k,B){var H=k.length;k.push(B);e:for(;0<H;){var $=H-1>>>1,K=k[$];if(0<o(K,B))k[$]=B,k[H]=K,H=$;else break e}}function r(k){return k.length===0?null:k[0]}function a(k){if(k.length===0)return null;var B=k[0],H=k.pop();if(H!==B){k[0]=H;e:for(var $=0,K=k.length,R=K>>>1;$<R;){var Y=2*($+1)-1,J=k[Y],ne=Y+1,se=k[ne];if(0>o(J,H))ne<K&&0>o(se,J)?(k[$]=se,k[ne]=H,$=ne):(k[$]=J,k[Y]=H,$=Y);else if(ne<K&&0>o(se,H))k[$]=se,k[ne]=H,$=ne;else break e}}return B}function o(k,B){var H=k.sortIndex-B.sortIndex;return H!==0?H:k.id-B.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var u=Date,f=u.now();e.unstable_now=function(){return u.now()-f}}var h=[],p=[],y=1,g=null,v=3,x=!1,b=!1,w=!1,E=!1,C=typeof setTimeout=="function"?setTimeout:null,N=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;function T(k){for(var B=r(p);B!==null;){if(B.callback===null)a(p);else if(B.startTime<=k)a(p),B.sortIndex=B.expirationTime,t(h,B);else break;B=r(p)}}function D(k){if(w=!1,T(k),!b)if(r(h)!==null)b=!0,L||(L=!0,q());else{var B=r(p);B!==null&&F(D,B.startTime-k)}}var L=!1,j=-1,I=5,Z=-1;function te(){return E?!0:!(e.unstable_now()-Z<I)}function G(){if(E=!1,L){var k=e.unstable_now();Z=k;var B=!0;try{e:{b=!1,w&&(w=!1,N(j),j=-1),x=!0;var H=v;try{t:{for(T(k),g=r(h);g!==null&&!(g.expirationTime>k&&te());){var $=g.callback;if(typeof $=="function"){g.callback=null,v=g.priorityLevel;var K=$(g.expirationTime<=k);if(k=e.unstable_now(),typeof K=="function"){g.callback=K,T(k),B=!0;break t}g===r(h)&&a(h),T(k)}else a(h);g=r(h)}if(g!==null)B=!0;else{var R=r(p);R!==null&&F(D,R.startTime-k),B=!1}}break e}finally{g=null,v=H,x=!1}B=void 0}}finally{B?q():L=!1}}}var q;if(typeof A=="function")q=function(){A(G)};else if(typeof MessageChannel<"u"){var ie=new MessageChannel,z=ie.port2;ie.port1.onmessage=G,q=function(){z.postMessage(null)}}else q=function(){C(G,0)};function F(k,B){j=C(function(){k(e.unstable_now())},B)}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(k){k.callback=null},e.unstable_forceFrameRate=function(k){0>k||125<k?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<k?Math.floor(1e3/k):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_next=function(k){switch(v){case 1:case 2:case 3:var B=3;break;default:B=v}var H=v;v=B;try{return k()}finally{v=H}},e.unstable_requestPaint=function(){E=!0},e.unstable_runWithPriority=function(k,B){switch(k){case 1:case 2:case 3:case 4:case 5:break;default:k=3}var H=v;v=k;try{return B()}finally{v=H}},e.unstable_scheduleCallback=function(k,B,H){var $=e.unstable_now();switch(typeof H=="object"&&H!==null?(H=H.delay,H=typeof H=="number"&&0<H?$+H:$):H=$,k){case 1:var K=-1;break;case 2:K=250;break;case 5:K=1073741823;break;case 4:K=1e4;break;default:K=5e3}return K=H+K,k={id:y++,callback:B,priorityLevel:k,startTime:H,expirationTime:K,sortIndex:-1},H>$?(k.sortIndex=H,t(p,k),r(h)===null&&k===r(p)&&(w?(N(j),j=-1):w=!0,F(D,H-$))):(k.sortIndex=K,t(h,k),b||x||(b=!0,L||(L=!0,q()))),k},e.unstable_shouldYield=te,e.unstable_wrapCallback=function(k){var B=v;return function(){var H=v;v=B;try{return k.apply(this,arguments)}finally{v=H}}}})(op)),op}var ix;function lA(){return ix||(ix=1,ap.exports=oA()),ap.exports}var lp={exports:{}},Ut={};/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Meta Platforms, Inc. and 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 rx;function sA(){if(rx)return Ut;rx=1;var e=Os();function t(h){var p="https://react.dev/errors/"+h;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)p+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+h+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var a={d:{f:r,r:function(){throw Error(t(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},o=Symbol.for("react.portal");function s(h,p,y){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:g==null?null:""+g,children:h,containerInfo:p,implementation:y}}var u=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(h,p){if(h==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return Ut.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,Ut.createPortal=function(h,p){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(t(299));return s(h,p,null,y)},Ut.flushSync=function(h){var p=u.T,y=a.p;try{if(u.T=null,a.p=2,h)return h()}finally{u.T=p,a.p=y,a.d.f()}},Ut.preconnect=function(h,p){typeof h=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,a.d.C(h,p))},Ut.prefetchDNS=function(h){typeof h=="string"&&a.d.D(h)},Ut.preinit=function(h,p){if(typeof h=="string"&&p&&typeof p.as=="string"){var y=p.as,g=f(y,p.crossOrigin),v=typeof p.integrity=="string"?p.integrity:void 0,x=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;y==="style"?a.d.S(h,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:g,integrity:v,fetchPriority:x}):y==="script"&&a.d.X(h,{crossOrigin:g,integrity:v,fetchPriority:x,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},Ut.preinitModule=function(h,p){if(typeof h=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var y=f(p.as,p.crossOrigin);a.d.M(h,{crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&a.d.M(h)},Ut.preload=function(h,p){if(typeof h=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var y=p.as,g=f(y,p.crossOrigin);a.d.L(h,y,{crossOrigin:g,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},Ut.preloadModule=function(h,p){if(typeof h=="string")if(p){var y=f(p.as,p.crossOrigin);a.d.m(h,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else a.d.m(h)},Ut.requestFormReset=function(h){a.d.r(h)},Ut.unstable_batchedUpdates=function(h,p){return h(p)},Ut.useFormState=function(h,p,y){return u.H.useFormState(h,p,y)},Ut.useFormStatus=function(){return u.H.useHostTransitionStatus()},Ut.version="19.2.6",Ut}var ax;function L1(){if(ax)return lp.exports;ax=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),lp.exports=sA(),lp.exports}/**
|
|
34
|
+
* @license React
|
|
35
|
+
* react-dom-client.production.js
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the MIT license found in the
|
|
40
|
+
* LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/var ox;function cA(){if(ox)return Jl;ox=1;var e=lA(),t=Os(),r=L1();function a(n){var i="https://react.dev/errors/"+n;if(1<arguments.length){i+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)i+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+n+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function s(n){var i=n,l=n;if(n.alternate)for(;i.return;)i=i.return;else{n=i;do i=n,(i.flags&4098)!==0&&(l=i.return),n=i.return;while(n)}return i.tag===3?l:null}function u(n){if(n.tag===13){var i=n.memoizedState;if(i===null&&(n=n.alternate,n!==null&&(i=n.memoizedState)),i!==null)return i.dehydrated}return null}function f(n){if(n.tag===31){var i=n.memoizedState;if(i===null&&(n=n.alternate,n!==null&&(i=n.memoizedState)),i!==null)return i.dehydrated}return null}function h(n){if(s(n)!==n)throw Error(a(188))}function p(n){var i=n.alternate;if(!i){if(i=s(n),i===null)throw Error(a(188));return i!==n?null:n}for(var l=n,c=i;;){var d=l.return;if(d===null)break;var m=d.alternate;if(m===null){if(c=d.return,c!==null){l=c;continue}break}if(d.child===m.child){for(m=d.child;m;){if(m===l)return h(d),n;if(m===c)return h(d),i;m=m.sibling}throw Error(a(188))}if(l.return!==c.return)l=d,c=m;else{for(var _=!1,M=d.child;M;){if(M===l){_=!0,l=d,c=m;break}if(M===c){_=!0,c=d,l=m;break}M=M.sibling}if(!_){for(M=m.child;M;){if(M===l){_=!0,l=m,c=d;break}if(M===c){_=!0,c=m,l=d;break}M=M.sibling}if(!_)throw Error(a(189))}}if(l.alternate!==c)throw Error(a(190))}if(l.tag!==3)throw Error(a(188));return l.stateNode.current===l?n:i}function y(n){var i=n.tag;if(i===5||i===26||i===27||i===6)return n;for(n=n.child;n!==null;){if(i=y(n),i!==null)return i;n=n.sibling}return null}var g=Object.assign,v=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),N=Symbol.for("react.consumer"),A=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),j=Symbol.for("react.memo"),I=Symbol.for("react.lazy"),Z=Symbol.for("react.activity"),te=Symbol.for("react.memo_cache_sentinel"),G=Symbol.iterator;function q(n){return n===null||typeof n!="object"?null:(n=G&&n[G]||n["@@iterator"],typeof n=="function"?n:null)}var ie=Symbol.for("react.client.reference");function z(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===ie?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case w:return"Fragment";case C:return"Profiler";case E:return"StrictMode";case D:return"Suspense";case L:return"SuspenseList";case Z:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case b:return"Portal";case A:return n.displayName||"Context";case N:return(n._context.displayName||"Context")+".Consumer";case T:var i=n.render;return n=n.displayName,n||(n=i.displayName||i.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case j:return i=n.displayName||null,i!==null?i:z(n.type)||"Memo";case I:i=n._payload,n=n._init;try{return z(n(i))}catch{}}return null}var F=Array.isArray,k=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,B=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H={pending:!1,data:null,method:null,action:null},$=[],K=-1;function R(n){return{current:n}}function Y(n){0>K||(n.current=$[K],$[K]=null,K--)}function J(n,i){K++,$[K]=n.current,n.current=i}var ne=R(null),se=R(null),fe=R(null),de=R(null);function ce(n,i){switch(J(fe,i),J(se,n),J(ne,null),i.nodeType){case 9:case 11:n=(n=i.documentElement)&&(n=n.namespaceURI)?bv(n):0;break;default:if(n=i.tagName,i=i.namespaceURI)i=bv(i),n=wv(i,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}Y(ne),J(ne,n)}function he(){Y(ne),Y(se),Y(fe)}function Ae(n){n.memoizedState!==null&&J(de,n);var i=ne.current,l=wv(i,n.type);i!==l&&(J(se,n),J(ne,l))}function Ee(n){se.current===n&&(Y(ne),Y(se)),de.current===n&&(Y(de),Fl._currentValue=H)}var _e,be;function ke(n){if(_e===void 0)try{throw Error()}catch(l){var i=l.stack.trim().match(/\n( *(at )?)/);_e=i&&i[1]||"",be=-1<l.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+_e+n+be}var Fe=!1;function Le(n,i){if(!n||Fe)return"";Fe=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(i){var oe=function(){throw Error()};if(Object.defineProperty(oe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(oe,[])}catch(ee){var W=ee}Reflect.construct(n,[],oe)}else{try{oe.call()}catch(ee){W=ee}n.call(oe.prototype)}}else{try{throw Error()}catch(ee){W=ee}(oe=n())&&typeof oe.catch=="function"&&oe.catch(function(){})}}catch(ee){if(ee&&W&&typeof ee.stack=="string")return[ee.stack,W.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var d=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");d&&d.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var m=c.DetermineComponentFrameRoot(),_=m[0],M=m[1];if(_&&M){var U=_.split(`
|
|
44
|
+
`),P=M.split(`
|
|
45
|
+
`);for(d=c=0;c<U.length&&!U[c].includes("DetermineComponentFrameRoot");)c++;for(;d<P.length&&!P[d].includes("DetermineComponentFrameRoot");)d++;if(c===U.length||d===P.length)for(c=U.length-1,d=P.length-1;1<=c&&0<=d&&U[c]!==P[d];)d--;for(;1<=c&&0<=d;c--,d--)if(U[c]!==P[d]){if(c!==1||d!==1)do if(c--,d--,0>d||U[c]!==P[d]){var re=`
|
|
46
|
+
`+U[c].replace(" at new "," at ");return n.displayName&&re.includes("<anonymous>")&&(re=re.replace("<anonymous>",n.displayName)),re}while(1<=c&&0<=d);break}}}finally{Fe=!1,Error.prepareStackTrace=l}return(l=n?n.displayName||n.name:"")?ke(l):""}function yt(n,i){switch(n.tag){case 26:case 27:case 5:return ke(n.type);case 16:return ke("Lazy");case 13:return n.child!==i&&i!==null?ke("Suspense Fallback"):ke("Suspense");case 19:return ke("SuspenseList");case 0:case 15:return Le(n.type,!1);case 11:return Le(n.type.render,!1);case 1:return Le(n.type,!0);case 31:return ke("Activity");default:return""}}function dn(n){try{var i="",l=null;do i+=yt(n,l),l=n,n=n.return;while(n);return i}catch(c){return`
|
|
47
|
+
Error generating stack: `+c.message+`
|
|
48
|
+
`+c.stack}}var Ot=Object.prototype.hasOwnProperty,Hn=e.unstable_scheduleCallback,gi=e.unstable_cancelCallback,Zr=e.unstable_shouldYield,Xr=e.unstable_requestPaint,Dt=e.unstable_now,Da=e.unstable_getCurrentPriorityLevel,yi=e.unstable_ImmediatePriority,Ji=e.unstable_UserBlockingPriority,Fr=e.unstable_NormalPriority,Bf=e.unstable_LowPriority,ja=e.unstable_IdlePriority,Uf=e.log,Yf=e.unstable_setDisableYieldValue,Qr=null,qt=null;function Kn(n){if(typeof Uf=="function"&&Yf(n),qt&&typeof qt.setStrictMode=="function")try{qt.setStrictMode(Qr,n)}catch{}}var Gt=Math.clz32?Math.clz32:qf,$f=Math.log,Vf=Math.LN2;function qf(n){return n>>>=0,n===0?32:31-($f(n)/Vf|0)|0}var za=256,La=262144,Ha=4194304;function vi(n){var i=n&42;if(i!==0)return i;switch(n&-n){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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function Ba(n,i,l){var c=n.pendingLanes;if(c===0)return 0;var d=0,m=n.suspendedLanes,_=n.pingedLanes;n=n.warmLanes;var M=c&134217727;return M!==0?(c=M&~m,c!==0?d=vi(c):(_&=M,_!==0?d=vi(_):l||(l=M&~n,l!==0&&(d=vi(l))))):(M=c&~m,M!==0?d=vi(M):_!==0?d=vi(_):l||(l=c&~n,l!==0&&(d=vi(l)))),d===0?0:i!==0&&i!==d&&(i&m)===0&&(m=d&-d,l=i&-i,m>=l||m===32&&(l&4194048)!==0)?i:d}function Pr(n,i){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&i)===0}function Gf(n,i){switch(n){case 1:case 2:case 4:case 8:case 64:return i+250;case 16:case 32: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 i+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Us(){var n=Ha;return Ha<<=1,(Ha&62914560)===0&&(Ha=4194304),n}function al(n){for(var i=[],l=0;31>l;l++)i.push(n);return i}function Kr(n,i){n.pendingLanes|=i,i!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function If(n,i,l,c,d,m){var _=n.pendingLanes;n.pendingLanes=l,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=l,n.entangledLanes&=l,n.errorRecoveryDisabledLanes&=l,n.shellSuspendCounter=0;var M=n.entanglements,U=n.expirationTimes,P=n.hiddenUpdates;for(l=_&~l;0<l;){var re=31-Gt(l),oe=1<<re;M[re]=0,U[re]=-1;var W=P[re];if(W!==null)for(P[re]=null,re=0;re<W.length;re++){var ee=W[re];ee!==null&&(ee.lane&=-536870913)}l&=~oe}c!==0&&Ys(n,c,0),m!==0&&d===0&&n.tag!==0&&(n.suspendedLanes|=m&~(_&~i))}function Ys(n,i,l){n.pendingLanes|=i,n.suspendedLanes&=~i;var c=31-Gt(i);n.entangledLanes|=i,n.entanglements[c]=n.entanglements[c]|1073741824|l&261930}function $s(n,i){var l=n.entangledLanes|=i;for(n=n.entanglements;l;){var c=31-Gt(l),d=1<<c;d&i|n[c]&i&&(n[c]|=i),l&=~d}}function Vs(n,i){var l=i&-i;return l=(l&42)!==0?1:ol(l),(l&(n.suspendedLanes|i))!==0?0:l}function ol(n){switch(n){case 2:n=1;break;case 8:n=4;break;case 32:n=16;break;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:n=128;break;case 268435456:n=134217728;break;default:n=0}return n}function ll(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function qs(){var n=B.p;return n!==0?n:(n=window.event,n===void 0?32:Gv(n.type))}function Gs(n,i){var l=B.p;try{return B.p=n,i()}finally{B.p=l}}var Wn=Math.random().toString(36).slice(2),Nt="__reactFiber$"+Wn,Bt="__reactProps$"+Wn,xi="__reactContainer$"+Wn,Ua="__reactEvents$"+Wn,Is="__reactListeners$"+Wn,Zf="__reactHandles$"+Wn,Zs="__reactResources$"+Wn,Wr="__reactMarker$"+Wn;function sl(n){delete n[Nt],delete n[Bt],delete n[Ua],delete n[Is],delete n[Zf]}function er(n){var i=n[Nt];if(i)return i;for(var l=n.parentNode;l;){if(i=l[xi]||l[Nt]){if(l=i.alternate,i.child!==null||l!==null&&l.child!==null)for(n=Tv(n);n!==null;){if(l=n[Nt])return l;n=Tv(n)}return i}n=l,l=n.parentNode}return null}function tr(n){if(n=n[Nt]||n[xi]){var i=n.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return n}return null}function nr(n){var i=n.tag;if(i===5||i===26||i===27||i===6)return n.stateNode;throw Error(a(33))}function ir(n){var i=n[Zs];return i||(i=n[Zs]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function vt(n){n[Wr]=!0}var Xs=new Set,Fs={};function bi(n,i){rr(n,i),rr(n+"Capture",i)}function rr(n,i){for(Fs[n]=i,n=0;n<i.length;n++)Xs.add(i[n])}var Xf=RegExp("^[: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]*$"),cl={},Qs={};function Ff(n){return Ot.call(Qs,n)?!0:Ot.call(cl,n)?!1:Xf.test(n)?Qs[n]=!0:(cl[n]=!0,!1)}function Ya(n,i,l){if(Ff(i))if(l===null)n.removeAttribute(i);else{switch(typeof l){case"undefined":case"function":case"symbol":n.removeAttribute(i);return;case"boolean":var c=i.toLowerCase().slice(0,5);if(c!=="data-"&&c!=="aria-"){n.removeAttribute(i);return}}n.setAttribute(i,""+l)}}function $a(n,i,l){if(l===null)n.removeAttribute(i);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(i);return}n.setAttribute(i,""+l)}}function Bn(n,i,l,c){if(c===null)n.removeAttribute(l);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(l);return}n.setAttributeNS(i,l,""+c)}}function Qt(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function Ps(n){var i=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function Qf(n,i,l){var c=Object.getOwnPropertyDescriptor(n.constructor.prototype,i);if(!n.hasOwnProperty(i)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var d=c.get,m=c.set;return Object.defineProperty(n,i,{configurable:!0,get:function(){return d.call(this)},set:function(_){l=""+_,m.call(this,_)}}),Object.defineProperty(n,i,{enumerable:c.enumerable}),{getValue:function(){return l},setValue:function(_){l=""+_},stopTracking:function(){n._valueTracker=null,delete n[i]}}}}function ar(n){if(!n._valueTracker){var i=Ps(n)?"checked":"value";n._valueTracker=Qf(n,i,""+n[i])}}function Ks(n){if(!n)return!1;var i=n._valueTracker;if(!i)return!0;var l=i.getValue(),c="";return n&&(c=Ps(n)?n.checked?"true":"false":n.value),n=c,n!==l?(i.setValue(n),!0):!1}function Jr(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}var Pf=/[\n"\\]/g;function Pt(n){return n.replace(Pf,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function ea(n,i,l,c,d,m,_,M){n.name="",_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?n.type=_:n.removeAttribute("type"),i!=null?_==="number"?(i===0&&n.value===""||n.value!=i)&&(n.value=""+Qt(i)):n.value!==""+Qt(i)&&(n.value=""+Qt(i)):_!=="submit"&&_!=="reset"||n.removeAttribute("value"),i!=null?ul(n,_,Qt(i)):l!=null?ul(n,_,Qt(l)):c!=null&&n.removeAttribute("value"),d==null&&m!=null&&(n.defaultChecked=!!m),d!=null&&(n.checked=d&&typeof d!="function"&&typeof d!="symbol"),M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"?n.name=""+Qt(M):n.removeAttribute("name")}function Ws(n,i,l,c,d,m,_,M){if(m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(n.type=m),i!=null||l!=null){if(!(m!=="submit"&&m!=="reset"||i!=null)){ar(n);return}l=l!=null?""+Qt(l):"",i=i!=null?""+Qt(i):l,M||i===n.value||(n.value=i),n.defaultValue=i}c=c??d,c=typeof c!="function"&&typeof c!="symbol"&&!!c,n.checked=M?n.checked:!!c,n.defaultChecked=!!c,_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"&&(n.name=_),ar(n)}function ul(n,i,l){i==="number"&&Jr(n.ownerDocument)===n||n.defaultValue===""+l||(n.defaultValue=""+l)}function wi(n,i,l,c){if(n=n.options,i){i={};for(var d=0;d<l.length;d++)i["$"+l[d]]=!0;for(l=0;l<n.length;l++)d=i.hasOwnProperty("$"+n[l].value),n[l].selected!==d&&(n[l].selected=d),d&&c&&(n[l].defaultSelected=!0)}else{for(l=""+Qt(l),i=null,d=0;d<n.length;d++){if(n[d].value===l){n[d].selected=!0,c&&(n[d].defaultSelected=!0);return}i!==null||n[d].disabled||(i=n[d])}i!==null&&(i.selected=!0)}}function mg(n,i,l){if(i!=null&&(i=""+Qt(i),i!==n.value&&(n.value=i),l==null)){n.defaultValue!==i&&(n.defaultValue=i);return}n.defaultValue=l!=null?""+Qt(l):""}function gg(n,i,l,c){if(i==null){if(c!=null){if(l!=null)throw Error(a(92));if(F(c)){if(1<c.length)throw Error(a(93));c=c[0]}l=c}l==null&&(l=""),i=l}l=Qt(i),n.defaultValue=l,c=n.textContent,c===l&&c!==""&&c!==null&&(n.value=c),ar(n)}function Va(n,i){if(i){var l=n.firstChild;if(l&&l===n.lastChild&&l.nodeType===3){l.nodeValue=i;return}}n.textContent=i}var QE=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function yg(n,i,l){var c=i.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?c?n.setProperty(i,""):i==="float"?n.cssFloat="":n[i]="":c?n.setProperty(i,l):typeof l!="number"||l===0||QE.has(i)?i==="float"?n.cssFloat=l:n[i]=(""+l).trim():n[i]=l+"px"}function vg(n,i,l){if(i!=null&&typeof i!="object")throw Error(a(62));if(n=n.style,l!=null){for(var c in l)!l.hasOwnProperty(c)||i!=null&&i.hasOwnProperty(c)||(c.indexOf("--")===0?n.setProperty(c,""):c==="float"?n.cssFloat="":n[c]="");for(var d in i)c=i[d],i.hasOwnProperty(d)&&l[d]!==c&&yg(n,d,c)}else for(var m in i)i.hasOwnProperty(m)&&yg(n,m,i[m])}function Kf(n){if(n.indexOf("-")===-1)return!1;switch(n){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 PE=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),KE=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Js(n){return KE.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function _i(){}var Wf=null;function Jf(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var qa=null,Ga=null;function xg(n){var i=tr(n);if(i&&(n=i.stateNode)){var l=n[Bt]||null;e:switch(n=i.stateNode,i.type){case"input":if(ea(n,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),i=l.name,l.type==="radio"&&i!=null){for(l=n;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+Pt(""+i)+'"][type="radio"]'),i=0;i<l.length;i++){var c=l[i];if(c!==n&&c.form===n.form){var d=c[Bt]||null;if(!d)throw Error(a(90));ea(c,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name)}}for(i=0;i<l.length;i++)c=l[i],c.form===n.form&&Ks(c)}break e;case"textarea":mg(n,l.value,l.defaultValue);break e;case"select":i=l.value,i!=null&&wi(n,!!l.multiple,i,!1)}}}var ed=!1;function bg(n,i,l){if(ed)return n(i,l);ed=!0;try{var c=n(i);return c}finally{if(ed=!1,(qa!==null||Ga!==null)&&(Yc(),qa&&(i=qa,n=Ga,Ga=qa=null,xg(i),n)))for(i=0;i<n.length;i++)xg(n[i])}}function fl(n,i){var l=n.stateNode;if(l===null)return null;var c=l[Bt]||null;if(c===null)return null;l=c[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(n=n.type,c=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!c;break e;default:n=!1}if(n)return null;if(l&&typeof l!="function")throw Error(a(231,i,typeof l));return l}var Si=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),td=!1;if(Si)try{var dl={};Object.defineProperty(dl,"passive",{get:function(){td=!0}}),window.addEventListener("test",dl,dl),window.removeEventListener("test",dl,dl)}catch{td=!1}var or=null,nd=null,ec=null;function wg(){if(ec)return ec;var n,i=nd,l=i.length,c,d="value"in or?or.value:or.textContent,m=d.length;for(n=0;n<l&&i[n]===d[n];n++);var _=l-n;for(c=1;c<=_&&i[l-c]===d[m-c];c++);return ec=d.slice(n,1<c?1-c:void 0)}function tc(n){var i=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&i===13&&(n=13)):n=i,n===10&&(n=13),32<=n||n===13?n:0}function nc(){return!0}function _g(){return!1}function Kt(n){function i(l,c,d,m,_){this._reactName=l,this._targetInst=d,this.type=c,this.nativeEvent=m,this.target=_,this.currentTarget=null;for(var M in n)n.hasOwnProperty(M)&&(l=n[M],this[M]=l?l(m):m[M]);return this.isDefaultPrevented=(m.defaultPrevented!=null?m.defaultPrevented:m.returnValue===!1)?nc:_g,this.isPropagationStopped=_g,this}return g(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=nc)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=nc)},persist:function(){},isPersistent:nc}),i}var ta={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ic=Kt(ta),hl=g({},ta,{view:0,detail:0}),WE=Kt(hl),id,rd,pl,rc=g({},hl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:od,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==pl&&(pl&&n.type==="mousemove"?(id=n.screenX-pl.screenX,rd=n.screenY-pl.screenY):rd=id=0,pl=n),id)},movementY:function(n){return"movementY"in n?n.movementY:rd}}),Sg=Kt(rc),JE=g({},rc,{dataTransfer:0}),e2=Kt(JE),t2=g({},hl,{relatedTarget:0}),ad=Kt(t2),n2=g({},ta,{animationName:0,elapsedTime:0,pseudoElement:0}),i2=Kt(n2),r2=g({},ta,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),a2=Kt(r2),o2=g({},ta,{data:0}),Eg=Kt(o2),l2={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},s2={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"},c2={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function u2(n){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(n):(n=c2[n])?!!i[n]:!1}function od(){return u2}var f2=g({},hl,{key:function(n){if(n.key){var i=l2[n.key]||n.key;if(i!=="Unidentified")return i}return n.type==="keypress"?(n=tc(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?s2[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:od,charCode:function(n){return n.type==="keypress"?tc(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?tc(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),d2=Kt(f2),h2=g({},rc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Cg=Kt(h2),p2=g({},hl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:od}),m2=Kt(p2),g2=g({},ta,{propertyName:0,elapsedTime:0,pseudoElement:0}),y2=Kt(g2),v2=g({},rc,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),x2=Kt(v2),b2=g({},ta,{newState:0,oldState:0}),w2=Kt(b2),_2=[9,13,27,32],ld=Si&&"CompositionEvent"in window,ml=null;Si&&"documentMode"in document&&(ml=document.documentMode);var S2=Si&&"TextEvent"in window&&!ml,Ag=Si&&(!ld||ml&&8<ml&&11>=ml),Ng=" ",Tg=!1;function Mg(n,i){switch(n){case"keyup":return _2.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Og(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var Ia=!1;function E2(n,i){switch(n){case"compositionend":return Og(i);case"keypress":return i.which!==32?null:(Tg=!0,Ng);case"textInput":return n=i.data,n===Ng&&Tg?null:n;default:return null}}function C2(n,i){if(Ia)return n==="compositionend"||!ld&&Mg(n,i)?(n=wg(),ec=nd=or=null,Ia=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return Ag&&i.locale!=="ko"?null:i.data;default:return null}}var A2={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 kg(n){var i=n&&n.nodeName&&n.nodeName.toLowerCase();return i==="input"?!!A2[n.type]:i==="textarea"}function Rg(n,i,l,c){qa?Ga?Ga.push(c):Ga=[c]:qa=c,i=Xc(i,"onChange"),0<i.length&&(l=new ic("onChange","change",null,l,c),n.push({event:l,listeners:i}))}var gl=null,yl=null;function N2(n){pv(n,0)}function ac(n){var i=nr(n);if(Ks(i))return n}function Dg(n,i){if(n==="change")return i}var jg=!1;if(Si){var sd;if(Si){var cd="oninput"in document;if(!cd){var zg=document.createElement("div");zg.setAttribute("oninput","return;"),cd=typeof zg.oninput=="function"}sd=cd}else sd=!1;jg=sd&&(!document.documentMode||9<document.documentMode)}function Lg(){gl&&(gl.detachEvent("onpropertychange",Hg),yl=gl=null)}function Hg(n){if(n.propertyName==="value"&&ac(yl)){var i=[];Rg(i,yl,n,Jf(n)),bg(N2,i)}}function T2(n,i,l){n==="focusin"?(Lg(),gl=i,yl=l,gl.attachEvent("onpropertychange",Hg)):n==="focusout"&&Lg()}function M2(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return ac(yl)}function O2(n,i){if(n==="click")return ac(i)}function k2(n,i){if(n==="input"||n==="change")return ac(i)}function R2(n,i){return n===i&&(n!==0||1/n===1/i)||n!==n&&i!==i}var hn=typeof Object.is=="function"?Object.is:R2;function vl(n,i){if(hn(n,i))return!0;if(typeof n!="object"||n===null||typeof i!="object"||i===null)return!1;var l=Object.keys(n),c=Object.keys(i);if(l.length!==c.length)return!1;for(c=0;c<l.length;c++){var d=l[c];if(!Ot.call(i,d)||!hn(n[d],i[d]))return!1}return!0}function Bg(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function Ug(n,i){var l=Bg(n);n=0;for(var c;l;){if(l.nodeType===3){if(c=n+l.textContent.length,n<=i&&c>=i)return{node:l,offset:i-n};n=c}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Bg(l)}}function Yg(n,i){return n&&i?n===i?!0:n&&n.nodeType===3?!1:i&&i.nodeType===3?Yg(n,i.parentNode):"contains"in n?n.contains(i):n.compareDocumentPosition?!!(n.compareDocumentPosition(i)&16):!1:!1}function $g(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var i=Jr(n.document);i instanceof n.HTMLIFrameElement;){try{var l=typeof i.contentWindow.location.href=="string"}catch{l=!1}if(l)n=i.contentWindow;else break;i=Jr(n.document)}return i}function ud(n){var i=n&&n.nodeName&&n.nodeName.toLowerCase();return i&&(i==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||i==="textarea"||n.contentEditable==="true")}var D2=Si&&"documentMode"in document&&11>=document.documentMode,Za=null,fd=null,xl=null,dd=!1;function Vg(n,i,l){var c=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;dd||Za==null||Za!==Jr(c)||(c=Za,"selectionStart"in c&&ud(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),xl&&vl(xl,c)||(xl=c,c=Xc(fd,"onSelect"),0<c.length&&(i=new ic("onSelect","select",null,i,l),n.push({event:i,listeners:c}),i.target=Za)))}function na(n,i){var l={};return l[n.toLowerCase()]=i.toLowerCase(),l["Webkit"+n]="webkit"+i,l["Moz"+n]="moz"+i,l}var Xa={animationend:na("Animation","AnimationEnd"),animationiteration:na("Animation","AnimationIteration"),animationstart:na("Animation","AnimationStart"),transitionrun:na("Transition","TransitionRun"),transitionstart:na("Transition","TransitionStart"),transitioncancel:na("Transition","TransitionCancel"),transitionend:na("Transition","TransitionEnd")},hd={},qg={};Si&&(qg=document.createElement("div").style,"AnimationEvent"in window||(delete Xa.animationend.animation,delete Xa.animationiteration.animation,delete Xa.animationstart.animation),"TransitionEvent"in window||delete Xa.transitionend.transition);function ia(n){if(hd[n])return hd[n];if(!Xa[n])return n;var i=Xa[n],l;for(l in i)if(i.hasOwnProperty(l)&&l in qg)return hd[n]=i[l];return n}var Gg=ia("animationend"),Ig=ia("animationiteration"),Zg=ia("animationstart"),j2=ia("transitionrun"),z2=ia("transitionstart"),L2=ia("transitioncancel"),Xg=ia("transitionend"),Fg=new Map,pd="abort auxClick beforeToggle 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(" ");pd.push("scrollEnd");function Un(n,i){Fg.set(n,i),bi(i,[n])}var oc=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var i=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof n=="object"&&n!==null&&typeof n.message=="string"?String(n.message):String(n),error:n});if(!window.dispatchEvent(i))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)},Cn=[],Fa=0,md=0;function lc(){for(var n=Fa,i=md=Fa=0;i<n;){var l=Cn[i];Cn[i++]=null;var c=Cn[i];Cn[i++]=null;var d=Cn[i];Cn[i++]=null;var m=Cn[i];if(Cn[i++]=null,c!==null&&d!==null){var _=c.pending;_===null?d.next=d:(d.next=_.next,_.next=d),c.pending=d}m!==0&&Qg(l,d,m)}}function sc(n,i,l,c){Cn[Fa++]=n,Cn[Fa++]=i,Cn[Fa++]=l,Cn[Fa++]=c,md|=c,n.lanes|=c,n=n.alternate,n!==null&&(n.lanes|=c)}function gd(n,i,l,c){return sc(n,i,l,c),cc(n)}function ra(n,i){return sc(n,null,null,i),cc(n)}function Qg(n,i,l){n.lanes|=l;var c=n.alternate;c!==null&&(c.lanes|=l);for(var d=!1,m=n.return;m!==null;)m.childLanes|=l,c=m.alternate,c!==null&&(c.childLanes|=l),m.tag===22&&(n=m.stateNode,n===null||n._visibility&1||(d=!0)),n=m,m=m.return;return n.tag===3?(m=n.stateNode,d&&i!==null&&(d=31-Gt(l),n=m.hiddenUpdates,c=n[d],c===null?n[d]=[i]:c.push(i),i.lane=l|536870912),m):null}function cc(n){if(50<$l)throw $l=0,Ch=null,Error(a(185));for(var i=n.return;i!==null;)n=i,i=n.return;return n.tag===3?n.stateNode:null}var Qa={};function H2(n,i,l,c){this.tag=n,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function pn(n,i,l,c){return new H2(n,i,l,c)}function yd(n){return n=n.prototype,!(!n||!n.isReactComponent)}function Ei(n,i){var l=n.alternate;return l===null?(l=pn(n.tag,i,n.key,n.mode),l.elementType=n.elementType,l.type=n.type,l.stateNode=n.stateNode,l.alternate=n,n.alternate=l):(l.pendingProps=i,l.type=n.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=n.flags&65011712,l.childLanes=n.childLanes,l.lanes=n.lanes,l.child=n.child,l.memoizedProps=n.memoizedProps,l.memoizedState=n.memoizedState,l.updateQueue=n.updateQueue,i=n.dependencies,l.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},l.sibling=n.sibling,l.index=n.index,l.ref=n.ref,l.refCleanup=n.refCleanup,l}function Pg(n,i){n.flags&=65011714;var l=n.alternate;return l===null?(n.childLanes=0,n.lanes=i,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=l.childLanes,n.lanes=l.lanes,n.child=l.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=l.memoizedProps,n.memoizedState=l.memoizedState,n.updateQueue=l.updateQueue,n.type=l.type,i=l.dependencies,n.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),n}function uc(n,i,l,c,d,m){var _=0;if(c=n,typeof n=="function")yd(n)&&(_=1);else if(typeof n=="string")_=VC(n,l,ne.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case Z:return n=pn(31,l,i,d),n.elementType=Z,n.lanes=m,n;case w:return aa(l.children,d,m,i);case E:_=8,d|=24;break;case C:return n=pn(12,l,i,d|2),n.elementType=C,n.lanes=m,n;case D:return n=pn(13,l,i,d),n.elementType=D,n.lanes=m,n;case L:return n=pn(19,l,i,d),n.elementType=L,n.lanes=m,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case A:_=10;break e;case N:_=9;break e;case T:_=11;break e;case j:_=14;break e;case I:_=16,c=null;break e}_=29,l=Error(a(130,n===null?"null":typeof n,"")),c=null}return i=pn(_,l,i,d),i.elementType=n,i.type=c,i.lanes=m,i}function aa(n,i,l,c){return n=pn(7,n,c,i),n.lanes=l,n}function vd(n,i,l){return n=pn(6,n,null,i),n.lanes=l,n}function Kg(n){var i=pn(18,null,null,0);return i.stateNode=n,i}function xd(n,i,l){return i=pn(4,n.children!==null?n.children:[],n.key,i),i.lanes=l,i.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},i}var Wg=new WeakMap;function An(n,i){if(typeof n=="object"&&n!==null){var l=Wg.get(n);return l!==void 0?l:(i={value:n,source:i,stack:dn(i)},Wg.set(n,i),i)}return{value:n,source:i,stack:dn(i)}}var Pa=[],Ka=0,fc=null,bl=0,Nn=[],Tn=0,lr=null,Jn=1,ei="";function Ci(n,i){Pa[Ka++]=bl,Pa[Ka++]=fc,fc=n,bl=i}function Jg(n,i,l){Nn[Tn++]=Jn,Nn[Tn++]=ei,Nn[Tn++]=lr,lr=n;var c=Jn;n=ei;var d=32-Gt(c)-1;c&=~(1<<d),l+=1;var m=32-Gt(i)+d;if(30<m){var _=d-d%5;m=(c&(1<<_)-1).toString(32),c>>=_,d-=_,Jn=1<<32-Gt(i)+d|l<<d|c,ei=m+n}else Jn=1<<m|l<<d|c,ei=n}function bd(n){n.return!==null&&(Ci(n,1),Jg(n,1,0))}function wd(n){for(;n===fc;)fc=Pa[--Ka],Pa[Ka]=null,bl=Pa[--Ka],Pa[Ka]=null;for(;n===lr;)lr=Nn[--Tn],Nn[Tn]=null,ei=Nn[--Tn],Nn[Tn]=null,Jn=Nn[--Tn],Nn[Tn]=null}function e0(n,i){Nn[Tn++]=Jn,Nn[Tn++]=ei,Nn[Tn++]=lr,Jn=i.id,ei=i.overflow,lr=n}var jt=null,at=null,$e=!1,sr=null,Mn=!1,_d=Error(a(519));function cr(n){var i=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw wl(An(i,n)),_d}function t0(n){var i=n.stateNode,l=n.type,c=n.memoizedProps;switch(i[Nt]=n,i[Bt]=c,l){case"dialog":Be("cancel",i),Be("close",i);break;case"iframe":case"object":case"embed":Be("load",i);break;case"video":case"audio":for(l=0;l<ql.length;l++)Be(ql[l],i);break;case"source":Be("error",i);break;case"img":case"image":case"link":Be("error",i),Be("load",i);break;case"details":Be("toggle",i);break;case"input":Be("invalid",i),Ws(i,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0);break;case"select":Be("invalid",i);break;case"textarea":Be("invalid",i),gg(i,c.value,c.defaultValue,c.children)}l=c.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||i.textContent===""+l||c.suppressHydrationWarning===!0||vv(i.textContent,l)?(c.popover!=null&&(Be("beforetoggle",i),Be("toggle",i)),c.onScroll!=null&&Be("scroll",i),c.onScrollEnd!=null&&Be("scrollend",i),c.onClick!=null&&(i.onclick=_i),i=!0):i=!1,i||cr(n,!0)}function n0(n){for(jt=n.return;jt;)switch(jt.tag){case 5:case 31:case 13:Mn=!1;return;case 27:case 3:Mn=!0;return;default:jt=jt.return}}function Wa(n){if(n!==jt)return!1;if(!$e)return n0(n),$e=!0,!1;var i=n.tag,l;if((l=i!==3&&i!==27)&&((l=i===5)&&(l=n.type,l=!(l!=="form"&&l!=="button")||Yh(n.type,n.memoizedProps)),l=!l),l&&at&&cr(n),n0(n),i===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(317));at=Nv(n)}else if(i===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(317));at=Nv(n)}else i===27?(i=at,Sr(n.type)?(n=Ih,Ih=null,at=n):at=i):at=jt?kn(n.stateNode.nextSibling):null;return!0}function oa(){at=jt=null,$e=!1}function Sd(){var n=sr;return n!==null&&(tn===null?tn=n:tn.push.apply(tn,n),sr=null),n}function wl(n){sr===null?sr=[n]:sr.push(n)}var Ed=R(null),la=null,Ai=null;function ur(n,i,l){J(Ed,i._currentValue),i._currentValue=l}function Ni(n){n._currentValue=Ed.current,Y(Ed)}function Cd(n,i,l){for(;n!==null;){var c=n.alternate;if((n.childLanes&i)!==i?(n.childLanes|=i,c!==null&&(c.childLanes|=i)):c!==null&&(c.childLanes&i)!==i&&(c.childLanes|=i),n===l)break;n=n.return}}function Ad(n,i,l,c){var d=n.child;for(d!==null&&(d.return=n);d!==null;){var m=d.dependencies;if(m!==null){var _=d.child;m=m.firstContext;e:for(;m!==null;){var M=m;m=d;for(var U=0;U<i.length;U++)if(M.context===i[U]){m.lanes|=l,M=m.alternate,M!==null&&(M.lanes|=l),Cd(m.return,l,n),c||(_=null);break e}m=M.next}}else if(d.tag===18){if(_=d.return,_===null)throw Error(a(341));_.lanes|=l,m=_.alternate,m!==null&&(m.lanes|=l),Cd(_,l,n),_=null}else _=d.child;if(_!==null)_.return=d;else for(_=d;_!==null;){if(_===n){_=null;break}if(d=_.sibling,d!==null){d.return=_.return,_=d;break}_=_.return}d=_}}function Ja(n,i,l,c){n=null;for(var d=i,m=!1;d!==null;){if(!m){if((d.flags&524288)!==0)m=!0;else if((d.flags&262144)!==0)break}if(d.tag===10){var _=d.alternate;if(_===null)throw Error(a(387));if(_=_.memoizedProps,_!==null){var M=d.type;hn(d.pendingProps.value,_.value)||(n!==null?n.push(M):n=[M])}}else if(d===de.current){if(_=d.alternate,_===null)throw Error(a(387));_.memoizedState.memoizedState!==d.memoizedState.memoizedState&&(n!==null?n.push(Fl):n=[Fl])}d=d.return}n!==null&&Ad(i,n,l,c),i.flags|=262144}function dc(n){for(n=n.firstContext;n!==null;){if(!hn(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function sa(n){la=n,Ai=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function zt(n){return i0(la,n)}function hc(n,i){return la===null&&sa(n),i0(n,i)}function i0(n,i){var l=i._currentValue;if(i={context:i,memoizedValue:l,next:null},Ai===null){if(n===null)throw Error(a(308));Ai=i,n.dependencies={lanes:0,firstContext:i},n.flags|=524288}else Ai=Ai.next=i;return l}var B2=typeof AbortController<"u"?AbortController:function(){var n=[],i=this.signal={aborted:!1,addEventListener:function(l,c){n.push(c)}};this.abort=function(){i.aborted=!0,n.forEach(function(l){return l()})}},U2=e.unstable_scheduleCallback,Y2=e.unstable_NormalPriority,xt={$$typeof:A,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Nd(){return{controller:new B2,data:new Map,refCount:0}}function _l(n){n.refCount--,n.refCount===0&&U2(Y2,function(){n.controller.abort()})}var Sl=null,Td=0,eo=0,to=null;function $2(n,i){if(Sl===null){var l=Sl=[];Td=0,eo=kh(),to={status:"pending",value:void 0,then:function(c){l.push(c)}}}return Td++,i.then(r0,r0),i}function r0(){if(--Td===0&&Sl!==null){to!==null&&(to.status="fulfilled");var n=Sl;Sl=null,eo=0,to=null;for(var i=0;i<n.length;i++)(0,n[i])()}}function V2(n,i){var l=[],c={status:"pending",value:null,reason:null,then:function(d){l.push(d)}};return n.then(function(){c.status="fulfilled",c.value=i;for(var d=0;d<l.length;d++)(0,l[d])(i)},function(d){for(c.status="rejected",c.reason=d,d=0;d<l.length;d++)(0,l[d])(void 0)}),c}var a0=k.S;k.S=function(n,i){Vy=Dt(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&$2(n,i),a0!==null&&a0(n,i)};var ca=R(null);function Md(){var n=ca.current;return n!==null?n:rt.pooledCache}function pc(n,i){i===null?J(ca,ca.current):J(ca,i.pool)}function o0(){var n=Md();return n===null?null:{parent:xt._currentValue,pool:n}}var no=Error(a(460)),Od=Error(a(474)),mc=Error(a(542)),gc={then:function(){}};function l0(n){return n=n.status,n==="fulfilled"||n==="rejected"}function s0(n,i,l){switch(l=n[l],l===void 0?n.push(i):l!==i&&(i.then(_i,_i),i=l),i.status){case"fulfilled":return i.value;case"rejected":throw n=i.reason,u0(n),n;default:if(typeof i.status=="string")i.then(_i,_i);else{if(n=rt,n!==null&&100<n.shellSuspendCounter)throw Error(a(482));n=i,n.status="pending",n.then(function(c){if(i.status==="pending"){var d=i;d.status="fulfilled",d.value=c}},function(c){if(i.status==="pending"){var d=i;d.status="rejected",d.reason=c}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw n=i.reason,u0(n),n}throw fa=i,no}}function ua(n){try{var i=n._init;return i(n._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(fa=l,no):l}}var fa=null;function c0(){if(fa===null)throw Error(a(459));var n=fa;return fa=null,n}function u0(n){if(n===no||n===mc)throw Error(a(483))}var io=null,El=0;function yc(n){var i=El;return El+=1,io===null&&(io=[]),s0(io,n,i)}function Cl(n,i){i=i.props.ref,n.ref=i!==void 0?i:null}function vc(n,i){throw i.$$typeof===v?Error(a(525)):(n=Object.prototype.toString.call(i),Error(a(31,n==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":n)))}function f0(n){function i(X,V){if(n){var Q=X.deletions;Q===null?(X.deletions=[V],X.flags|=16):Q.push(V)}}function l(X,V){if(!n)return null;for(;V!==null;)i(X,V),V=V.sibling;return null}function c(X){for(var V=new Map;X!==null;)X.key!==null?V.set(X.key,X):V.set(X.index,X),X=X.sibling;return V}function d(X,V){return X=Ei(X,V),X.index=0,X.sibling=null,X}function m(X,V,Q){return X.index=Q,n?(Q=X.alternate,Q!==null?(Q=Q.index,Q<V?(X.flags|=67108866,V):Q):(X.flags|=67108866,V)):(X.flags|=1048576,V)}function _(X){return n&&X.alternate===null&&(X.flags|=67108866),X}function M(X,V,Q,ae){return V===null||V.tag!==6?(V=vd(Q,X.mode,ae),V.return=X,V):(V=d(V,Q),V.return=X,V)}function U(X,V,Q,ae){var Se=Q.type;return Se===w?re(X,V,Q.props.children,ae,Q.key):V!==null&&(V.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===I&&ua(Se)===V.type)?(V=d(V,Q.props),Cl(V,Q),V.return=X,V):(V=uc(Q.type,Q.key,Q.props,null,X.mode,ae),Cl(V,Q),V.return=X,V)}function P(X,V,Q,ae){return V===null||V.tag!==4||V.stateNode.containerInfo!==Q.containerInfo||V.stateNode.implementation!==Q.implementation?(V=xd(Q,X.mode,ae),V.return=X,V):(V=d(V,Q.children||[]),V.return=X,V)}function re(X,V,Q,ae,Se){return V===null||V.tag!==7?(V=aa(Q,X.mode,ae,Se),V.return=X,V):(V=d(V,Q),V.return=X,V)}function oe(X,V,Q){if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return V=vd(""+V,X.mode,Q),V.return=X,V;if(typeof V=="object"&&V!==null){switch(V.$$typeof){case x:return Q=uc(V.type,V.key,V.props,null,X.mode,Q),Cl(Q,V),Q.return=X,Q;case b:return V=xd(V,X.mode,Q),V.return=X,V;case I:return V=ua(V),oe(X,V,Q)}if(F(V)||q(V))return V=aa(V,X.mode,Q,null),V.return=X,V;if(typeof V.then=="function")return oe(X,yc(V),Q);if(V.$$typeof===A)return oe(X,hc(X,V),Q);vc(X,V)}return null}function W(X,V,Q,ae){var Se=V!==null?V.key:null;if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return Se!==null?null:M(X,V,""+Q,ae);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case x:return Q.key===Se?U(X,V,Q,ae):null;case b:return Q.key===Se?P(X,V,Q,ae):null;case I:return Q=ua(Q),W(X,V,Q,ae)}if(F(Q)||q(Q))return Se!==null?null:re(X,V,Q,ae,null);if(typeof Q.then=="function")return W(X,V,yc(Q),ae);if(Q.$$typeof===A)return W(X,V,hc(X,Q),ae);vc(X,Q)}return null}function ee(X,V,Q,ae,Se){if(typeof ae=="string"&&ae!==""||typeof ae=="number"||typeof ae=="bigint")return X=X.get(Q)||null,M(V,X,""+ae,Se);if(typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case x:return X=X.get(ae.key===null?Q:ae.key)||null,U(V,X,ae,Se);case b:return X=X.get(ae.key===null?Q:ae.key)||null,P(V,X,ae,Se);case I:return ae=ua(ae),ee(X,V,Q,ae,Se)}if(F(ae)||q(ae))return X=X.get(Q)||null,re(V,X,ae,Se,null);if(typeof ae.then=="function")return ee(X,V,Q,yc(ae),Se);if(ae.$$typeof===A)return ee(X,V,Q,hc(V,ae),Se);vc(V,ae)}return null}function me(X,V,Q,ae){for(var Se=null,Ie=null,ve=V,De=V=0,Ye=null;ve!==null&&De<Q.length;De++){ve.index>De?(Ye=ve,ve=null):Ye=ve.sibling;var Ze=W(X,ve,Q[De],ae);if(Ze===null){ve===null&&(ve=Ye);break}n&&ve&&Ze.alternate===null&&i(X,ve),V=m(Ze,V,De),Ie===null?Se=Ze:Ie.sibling=Ze,Ie=Ze,ve=Ye}if(De===Q.length)return l(X,ve),$e&&Ci(X,De),Se;if(ve===null){for(;De<Q.length;De++)ve=oe(X,Q[De],ae),ve!==null&&(V=m(ve,V,De),Ie===null?Se=ve:Ie.sibling=ve,Ie=ve);return $e&&Ci(X,De),Se}for(ve=c(ve);De<Q.length;De++)Ye=ee(ve,X,De,Q[De],ae),Ye!==null&&(n&&Ye.alternate!==null&&ve.delete(Ye.key===null?De:Ye.key),V=m(Ye,V,De),Ie===null?Se=Ye:Ie.sibling=Ye,Ie=Ye);return n&&ve.forEach(function(Tr){return i(X,Tr)}),$e&&Ci(X,De),Se}function Ce(X,V,Q,ae){if(Q==null)throw Error(a(151));for(var Se=null,Ie=null,ve=V,De=V=0,Ye=null,Ze=Q.next();ve!==null&&!Ze.done;De++,Ze=Q.next()){ve.index>De?(Ye=ve,ve=null):Ye=ve.sibling;var Tr=W(X,ve,Ze.value,ae);if(Tr===null){ve===null&&(ve=Ye);break}n&&ve&&Tr.alternate===null&&i(X,ve),V=m(Tr,V,De),Ie===null?Se=Tr:Ie.sibling=Tr,Ie=Tr,ve=Ye}if(Ze.done)return l(X,ve),$e&&Ci(X,De),Se;if(ve===null){for(;!Ze.done;De++,Ze=Q.next())Ze=oe(X,Ze.value,ae),Ze!==null&&(V=m(Ze,V,De),Ie===null?Se=Ze:Ie.sibling=Ze,Ie=Ze);return $e&&Ci(X,De),Se}for(ve=c(ve);!Ze.done;De++,Ze=Q.next())Ze=ee(ve,X,De,Ze.value,ae),Ze!==null&&(n&&Ze.alternate!==null&&ve.delete(Ze.key===null?De:Ze.key),V=m(Ze,V,De),Ie===null?Se=Ze:Ie.sibling=Ze,Ie=Ze);return n&&ve.forEach(function(JC){return i(X,JC)}),$e&&Ci(X,De),Se}function nt(X,V,Q,ae){if(typeof Q=="object"&&Q!==null&&Q.type===w&&Q.key===null&&(Q=Q.props.children),typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case x:e:{for(var Se=Q.key;V!==null;){if(V.key===Se){if(Se=Q.type,Se===w){if(V.tag===7){l(X,V.sibling),ae=d(V,Q.props.children),ae.return=X,X=ae;break e}}else if(V.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===I&&ua(Se)===V.type){l(X,V.sibling),ae=d(V,Q.props),Cl(ae,Q),ae.return=X,X=ae;break e}l(X,V);break}else i(X,V);V=V.sibling}Q.type===w?(ae=aa(Q.props.children,X.mode,ae,Q.key),ae.return=X,X=ae):(ae=uc(Q.type,Q.key,Q.props,null,X.mode,ae),Cl(ae,Q),ae.return=X,X=ae)}return _(X);case b:e:{for(Se=Q.key;V!==null;){if(V.key===Se)if(V.tag===4&&V.stateNode.containerInfo===Q.containerInfo&&V.stateNode.implementation===Q.implementation){l(X,V.sibling),ae=d(V,Q.children||[]),ae.return=X,X=ae;break e}else{l(X,V);break}else i(X,V);V=V.sibling}ae=xd(Q,X.mode,ae),ae.return=X,X=ae}return _(X);case I:return Q=ua(Q),nt(X,V,Q,ae)}if(F(Q))return me(X,V,Q,ae);if(q(Q)){if(Se=q(Q),typeof Se!="function")throw Error(a(150));return Q=Se.call(Q),Ce(X,V,Q,ae)}if(typeof Q.then=="function")return nt(X,V,yc(Q),ae);if(Q.$$typeof===A)return nt(X,V,hc(X,Q),ae);vc(X,Q)}return typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint"?(Q=""+Q,V!==null&&V.tag===6?(l(X,V.sibling),ae=d(V,Q),ae.return=X,X=ae):(l(X,V),ae=vd(Q,X.mode,ae),ae.return=X,X=ae),_(X)):l(X,V)}return function(X,V,Q,ae){try{El=0;var Se=nt(X,V,Q,ae);return io=null,Se}catch(ve){if(ve===no||ve===mc)throw ve;var Ie=pn(29,ve,null,X.mode);return Ie.lanes=ae,Ie.return=X,Ie}finally{}}}var da=f0(!0),d0=f0(!1),fr=!1;function kd(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Rd(n,i){n=n.updateQueue,i.updateQueue===n&&(i.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function dr(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function hr(n,i,l){var c=n.updateQueue;if(c===null)return null;if(c=c.shared,(Qe&2)!==0){var d=c.pending;return d===null?i.next=i:(i.next=d.next,d.next=i),c.pending=i,i=cc(n),Qg(n,null,l),i}return sc(n,c,i,l),cc(n)}function Al(n,i,l){if(i=i.updateQueue,i!==null&&(i=i.shared,(l&4194048)!==0)){var c=i.lanes;c&=n.pendingLanes,l|=c,i.lanes=l,$s(n,l)}}function Dd(n,i){var l=n.updateQueue,c=n.alternate;if(c!==null&&(c=c.updateQueue,l===c)){var d=null,m=null;if(l=l.firstBaseUpdate,l!==null){do{var _={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};m===null?d=m=_:m=m.next=_,l=l.next}while(l!==null);m===null?d=m=i:m=m.next=i}else d=m=i;l={baseState:c.baseState,firstBaseUpdate:d,lastBaseUpdate:m,shared:c.shared,callbacks:c.callbacks},n.updateQueue=l;return}n=l.lastBaseUpdate,n===null?l.firstBaseUpdate=i:n.next=i,l.lastBaseUpdate=i}var jd=!1;function Nl(){if(jd){var n=to;if(n!==null)throw n}}function Tl(n,i,l,c){jd=!1;var d=n.updateQueue;fr=!1;var m=d.firstBaseUpdate,_=d.lastBaseUpdate,M=d.shared.pending;if(M!==null){d.shared.pending=null;var U=M,P=U.next;U.next=null,_===null?m=P:_.next=P,_=U;var re=n.alternate;re!==null&&(re=re.updateQueue,M=re.lastBaseUpdate,M!==_&&(M===null?re.firstBaseUpdate=P:M.next=P,re.lastBaseUpdate=U))}if(m!==null){var oe=d.baseState;_=0,re=P=U=null,M=m;do{var W=M.lane&-536870913,ee=W!==M.lane;if(ee?(Ue&W)===W:(c&W)===W){W!==0&&W===eo&&(jd=!0),re!==null&&(re=re.next={lane:0,tag:M.tag,payload:M.payload,callback:null,next:null});e:{var me=n,Ce=M;W=i;var nt=l;switch(Ce.tag){case 1:if(me=Ce.payload,typeof me=="function"){oe=me.call(nt,oe,W);break e}oe=me;break e;case 3:me.flags=me.flags&-65537|128;case 0:if(me=Ce.payload,W=typeof me=="function"?me.call(nt,oe,W):me,W==null)break e;oe=g({},oe,W);break e;case 2:fr=!0}}W=M.callback,W!==null&&(n.flags|=64,ee&&(n.flags|=8192),ee=d.callbacks,ee===null?d.callbacks=[W]:ee.push(W))}else ee={lane:W,tag:M.tag,payload:M.payload,callback:M.callback,next:null},re===null?(P=re=ee,U=oe):re=re.next=ee,_|=W;if(M=M.next,M===null){if(M=d.shared.pending,M===null)break;ee=M,M=ee.next,ee.next=null,d.lastBaseUpdate=ee,d.shared.pending=null}}while(!0);re===null&&(U=oe),d.baseState=U,d.firstBaseUpdate=P,d.lastBaseUpdate=re,m===null&&(d.shared.lanes=0),vr|=_,n.lanes=_,n.memoizedState=oe}}function h0(n,i){if(typeof n!="function")throw Error(a(191,n));n.call(i)}function p0(n,i){var l=n.callbacks;if(l!==null)for(n.callbacks=null,n=0;n<l.length;n++)h0(l[n],i)}var ro=R(null),xc=R(0);function m0(n,i){n=Li,J(xc,n),J(ro,i),Li=n|i.baseLanes}function zd(){J(xc,Li),J(ro,ro.current)}function Ld(){Li=xc.current,Y(ro),Y(xc)}var mn=R(null),On=null;function pr(n){var i=n.alternate;J(pt,pt.current&1),J(mn,n),On===null&&(i===null||ro.current!==null||i.memoizedState!==null)&&(On=n)}function Hd(n){J(pt,pt.current),J(mn,n),On===null&&(On=n)}function g0(n){n.tag===22?(J(pt,pt.current),J(mn,n),On===null&&(On=n)):mr()}function mr(){J(pt,pt.current),J(mn,mn.current)}function gn(n){Y(mn),On===n&&(On=null),Y(pt)}var pt=R(0);function bc(n){for(var i=n;i!==null;){if(i.tag===13){var l=i.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||qh(l)||Gh(l)))return i}else if(i.tag===19&&(i.memoizedProps.revealOrder==="forwards"||i.memoizedProps.revealOrder==="backwards"||i.memoizedProps.revealOrder==="unstable_legacy-backwards"||i.memoizedProps.revealOrder==="together")){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===n)break;for(;i.sibling===null;){if(i.return===null||i.return===n)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var Ti=0,Re=null,et=null,bt=null,wc=!1,ao=!1,ha=!1,_c=0,Ml=0,oo=null,q2=0;function dt(){throw Error(a(321))}function Bd(n,i){if(i===null)return!1;for(var l=0;l<i.length&&l<n.length;l++)if(!hn(n[l],i[l]))return!1;return!0}function Ud(n,i,l,c,d,m){return Ti=m,Re=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,k.H=n===null||n.memoizedState===null?J0:eh,ha=!1,m=l(c,d),ha=!1,ao&&(m=v0(i,l,c,d)),y0(n),m}function y0(n){k.H=Rl;var i=et!==null&&et.next!==null;if(Ti=0,bt=et=Re=null,wc=!1,Ml=0,oo=null,i)throw Error(a(300));n===null||wt||(n=n.dependencies,n!==null&&dc(n)&&(wt=!0))}function v0(n,i,l,c){Re=n;var d=0;do{if(ao&&(oo=null),Ml=0,ao=!1,25<=d)throw Error(a(301));if(d+=1,bt=et=null,n.updateQueue!=null){var m=n.updateQueue;m.lastEffect=null,m.events=null,m.stores=null,m.memoCache!=null&&(m.memoCache.index=0)}k.H=ey,m=i(l,c)}while(ao);return m}function G2(){var n=k.H,i=n.useState()[0];return i=typeof i.then=="function"?Ol(i):i,n=n.useState()[0],(et!==null?et.memoizedState:null)!==n&&(Re.flags|=1024),i}function Yd(){var n=_c!==0;return _c=0,n}function $d(n,i,l){i.updateQueue=n.updateQueue,i.flags&=-2053,n.lanes&=~l}function Vd(n){if(wc){for(n=n.memoizedState;n!==null;){var i=n.queue;i!==null&&(i.pending=null),n=n.next}wc=!1}Ti=0,bt=et=Re=null,ao=!1,Ml=_c=0,oo=null}function It(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return bt===null?Re.memoizedState=bt=n:bt=bt.next=n,bt}function mt(){if(et===null){var n=Re.alternate;n=n!==null?n.memoizedState:null}else n=et.next;var i=bt===null?Re.memoizedState:bt.next;if(i!==null)bt=i,et=n;else{if(n===null)throw Re.alternate===null?Error(a(467)):Error(a(310));et=n,n={memoizedState:et.memoizedState,baseState:et.baseState,baseQueue:et.baseQueue,queue:et.queue,next:null},bt===null?Re.memoizedState=bt=n:bt=bt.next=n}return bt}function Sc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ol(n){var i=Ml;return Ml+=1,oo===null&&(oo=[]),n=s0(oo,n,i),i=Re,(bt===null?i.memoizedState:bt.next)===null&&(i=i.alternate,k.H=i===null||i.memoizedState===null?J0:eh),n}function Ec(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return Ol(n);if(n.$$typeof===A)return zt(n)}throw Error(a(438,String(n)))}function qd(n){var i=null,l=Re.updateQueue;if(l!==null&&(i=l.memoCache),i==null){var c=Re.alternate;c!==null&&(c=c.updateQueue,c!==null&&(c=c.memoCache,c!=null&&(i={data:c.data.map(function(d){return d.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),l===null&&(l=Sc(),Re.updateQueue=l),l.memoCache=i,l=i.data[i.index],l===void 0)for(l=i.data[i.index]=Array(n),c=0;c<n;c++)l[c]=te;return i.index++,l}function Mi(n,i){return typeof i=="function"?i(n):i}function Cc(n){var i=mt();return Gd(i,et,n)}function Gd(n,i,l){var c=n.queue;if(c===null)throw Error(a(311));c.lastRenderedReducer=l;var d=n.baseQueue,m=c.pending;if(m!==null){if(d!==null){var _=d.next;d.next=m.next,m.next=_}i.baseQueue=d=m,c.pending=null}if(m=n.baseState,d===null)n.memoizedState=m;else{i=d.next;var M=_=null,U=null,P=i,re=!1;do{var oe=P.lane&-536870913;if(oe!==P.lane?(Ue&oe)===oe:(Ti&oe)===oe){var W=P.revertLane;if(W===0)U!==null&&(U=U.next={lane:0,revertLane:0,gesture:null,action:P.action,hasEagerState:P.hasEagerState,eagerState:P.eagerState,next:null}),oe===eo&&(re=!0);else if((Ti&W)===W){P=P.next,W===eo&&(re=!0);continue}else oe={lane:0,revertLane:P.revertLane,gesture:null,action:P.action,hasEagerState:P.hasEagerState,eagerState:P.eagerState,next:null},U===null?(M=U=oe,_=m):U=U.next=oe,Re.lanes|=W,vr|=W;oe=P.action,ha&&l(m,oe),m=P.hasEagerState?P.eagerState:l(m,oe)}else W={lane:oe,revertLane:P.revertLane,gesture:P.gesture,action:P.action,hasEagerState:P.hasEagerState,eagerState:P.eagerState,next:null},U===null?(M=U=W,_=m):U=U.next=W,Re.lanes|=oe,vr|=oe;P=P.next}while(P!==null&&P!==i);if(U===null?_=m:U.next=M,!hn(m,n.memoizedState)&&(wt=!0,re&&(l=to,l!==null)))throw l;n.memoizedState=m,n.baseState=_,n.baseQueue=U,c.lastRenderedState=m}return d===null&&(c.lanes=0),[n.memoizedState,c.dispatch]}function Id(n){var i=mt(),l=i.queue;if(l===null)throw Error(a(311));l.lastRenderedReducer=n;var c=l.dispatch,d=l.pending,m=i.memoizedState;if(d!==null){l.pending=null;var _=d=d.next;do m=n(m,_.action),_=_.next;while(_!==d);hn(m,i.memoizedState)||(wt=!0),i.memoizedState=m,i.baseQueue===null&&(i.baseState=m),l.lastRenderedState=m}return[m,c]}function x0(n,i,l){var c=Re,d=mt(),m=$e;if(m){if(l===void 0)throw Error(a(407));l=l()}else l=i();var _=!hn((et||d).memoizedState,l);if(_&&(d.memoizedState=l,wt=!0),d=d.queue,Fd(_0.bind(null,c,d,n),[n]),d.getSnapshot!==i||_||bt!==null&&bt.memoizedState.tag&1){if(c.flags|=2048,lo(9,{destroy:void 0},w0.bind(null,c,d,l,i),null),rt===null)throw Error(a(349));m||(Ti&127)!==0||b0(c,i,l)}return l}function b0(n,i,l){n.flags|=16384,n={getSnapshot:i,value:l},i=Re.updateQueue,i===null?(i=Sc(),Re.updateQueue=i,i.stores=[n]):(l=i.stores,l===null?i.stores=[n]:l.push(n))}function w0(n,i,l,c){i.value=l,i.getSnapshot=c,S0(i)&&E0(n)}function _0(n,i,l){return l(function(){S0(i)&&E0(n)})}function S0(n){var i=n.getSnapshot;n=n.value;try{var l=i();return!hn(n,l)}catch{return!0}}function E0(n){var i=ra(n,2);i!==null&&nn(i,n,2)}function Zd(n){var i=It();if(typeof n=="function"){var l=n;if(n=l(),ha){Kn(!0);try{l()}finally{Kn(!1)}}}return i.memoizedState=i.baseState=n,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mi,lastRenderedState:n},i}function C0(n,i,l,c){return n.baseState=l,Gd(n,et,typeof c=="function"?c:Mi)}function I2(n,i,l,c,d){if(Tc(n))throw Error(a(485));if(n=i.action,n!==null){var m={payload:d,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(_){m.listeners.push(_)}};k.T!==null?l(!0):m.isTransition=!1,c(m),l=i.pending,l===null?(m.next=i.pending=m,A0(i,m)):(m.next=l.next,i.pending=l.next=m)}}function A0(n,i){var l=i.action,c=i.payload,d=n.state;if(i.isTransition){var m=k.T,_={};k.T=_;try{var M=l(d,c),U=k.S;U!==null&&U(_,M),N0(n,i,M)}catch(P){Xd(n,i,P)}finally{m!==null&&_.types!==null&&(m.types=_.types),k.T=m}}else try{m=l(d,c),N0(n,i,m)}catch(P){Xd(n,i,P)}}function N0(n,i,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(c){T0(n,i,c)},function(c){return Xd(n,i,c)}):T0(n,i,l)}function T0(n,i,l){i.status="fulfilled",i.value=l,M0(i),n.state=l,i=n.pending,i!==null&&(l=i.next,l===i?n.pending=null:(l=l.next,i.next=l,A0(n,l)))}function Xd(n,i,l){var c=n.pending;if(n.pending=null,c!==null){c=c.next;do i.status="rejected",i.reason=l,M0(i),i=i.next;while(i!==c)}n.action=null}function M0(n){n=n.listeners;for(var i=0;i<n.length;i++)(0,n[i])()}function O0(n,i){return i}function k0(n,i){if($e){var l=rt.formState;if(l!==null){e:{var c=Re;if($e){if(at){t:{for(var d=at,m=Mn;d.nodeType!==8;){if(!m){d=null;break t}if(d=kn(d.nextSibling),d===null){d=null;break t}}m=d.data,d=m==="F!"||m==="F"?d:null}if(d){at=kn(d.nextSibling),c=d.data==="F!";break e}}cr(c)}c=!1}c&&(i=l[0])}}return l=It(),l.memoizedState=l.baseState=i,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:O0,lastRenderedState:i},l.queue=c,l=P0.bind(null,Re,c),c.dispatch=l,c=Zd(!1),m=Jd.bind(null,Re,!1,c.queue),c=It(),d={state:i,dispatch:null,action:n,pending:null},c.queue=d,l=I2.bind(null,Re,d,m,l),d.dispatch=l,c.memoizedState=n,[i,l,!1]}function R0(n){var i=mt();return D0(i,et,n)}function D0(n,i,l){if(i=Gd(n,i,O0)[0],n=Cc(Mi)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var c=Ol(i)}catch(_){throw _===no?mc:_}else c=i;i=mt();var d=i.queue,m=d.dispatch;return l!==i.memoizedState&&(Re.flags|=2048,lo(9,{destroy:void 0},Z2.bind(null,d,l),null)),[c,m,n]}function Z2(n,i){n.action=i}function j0(n){var i=mt(),l=et;if(l!==null)return D0(i,l,n);mt(),i=i.memoizedState,l=mt();var c=l.queue.dispatch;return l.memoizedState=n,[i,c,!1]}function lo(n,i,l,c){return n={tag:n,create:l,deps:c,inst:i,next:null},i=Re.updateQueue,i===null&&(i=Sc(),Re.updateQueue=i),l=i.lastEffect,l===null?i.lastEffect=n.next=n:(c=l.next,l.next=n,n.next=c,i.lastEffect=n),n}function z0(){return mt().memoizedState}function Ac(n,i,l,c){var d=It();Re.flags|=n,d.memoizedState=lo(1|i,{destroy:void 0},l,c===void 0?null:c)}function Nc(n,i,l,c){var d=mt();c=c===void 0?null:c;var m=d.memoizedState.inst;et!==null&&c!==null&&Bd(c,et.memoizedState.deps)?d.memoizedState=lo(i,m,l,c):(Re.flags|=n,d.memoizedState=lo(1|i,m,l,c))}function L0(n,i){Ac(8390656,8,n,i)}function Fd(n,i){Nc(2048,8,n,i)}function X2(n){Re.flags|=4;var i=Re.updateQueue;if(i===null)i=Sc(),Re.updateQueue=i,i.events=[n];else{var l=i.events;l===null?i.events=[n]:l.push(n)}}function H0(n){var i=mt().memoizedState;return X2({ref:i,nextImpl:n}),function(){if((Qe&2)!==0)throw Error(a(440));return i.impl.apply(void 0,arguments)}}function B0(n,i){return Nc(4,2,n,i)}function U0(n,i){return Nc(4,4,n,i)}function Y0(n,i){if(typeof i=="function"){n=n();var l=i(n);return function(){typeof l=="function"?l():i(null)}}if(i!=null)return n=n(),i.current=n,function(){i.current=null}}function $0(n,i,l){l=l!=null?l.concat([n]):null,Nc(4,4,Y0.bind(null,i,n),l)}function Qd(){}function V0(n,i){var l=mt();i=i===void 0?null:i;var c=l.memoizedState;return i!==null&&Bd(i,c[1])?c[0]:(l.memoizedState=[n,i],n)}function q0(n,i){var l=mt();i=i===void 0?null:i;var c=l.memoizedState;if(i!==null&&Bd(i,c[1]))return c[0];if(c=n(),ha){Kn(!0);try{n()}finally{Kn(!1)}}return l.memoizedState=[c,i],c}function Pd(n,i,l){return l===void 0||(Ti&1073741824)!==0&&(Ue&261930)===0?n.memoizedState=i:(n.memoizedState=l,n=Gy(),Re.lanes|=n,vr|=n,l)}function G0(n,i,l,c){return hn(l,i)?l:ro.current!==null?(n=Pd(n,l,c),hn(n,i)||(wt=!0),n):(Ti&42)===0||(Ti&1073741824)!==0&&(Ue&261930)===0?(wt=!0,n.memoizedState=l):(n=Gy(),Re.lanes|=n,vr|=n,i)}function I0(n,i,l,c,d){var m=B.p;B.p=m!==0&&8>m?m:8;var _=k.T,M={};k.T=M,Jd(n,!1,i,l);try{var U=d(),P=k.S;if(P!==null&&P(M,U),U!==null&&typeof U=="object"&&typeof U.then=="function"){var re=V2(U,c);kl(n,i,re,xn(n))}else kl(n,i,c,xn(n))}catch(oe){kl(n,i,{then:function(){},status:"rejected",reason:oe},xn())}finally{B.p=m,_!==null&&M.types!==null&&(_.types=M.types),k.T=_}}function F2(){}function Kd(n,i,l,c){if(n.tag!==5)throw Error(a(476));var d=Z0(n).queue;I0(n,d,i,H,l===null?F2:function(){return X0(n),l(c)})}function Z0(n){var i=n.memoizedState;if(i!==null)return i;i={memoizedState:H,baseState:H,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mi,lastRenderedState:H},next:null};var l={};return i.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mi,lastRenderedState:l},next:null},n.memoizedState=i,n=n.alternate,n!==null&&(n.memoizedState=i),i}function X0(n){var i=Z0(n);i.next===null&&(i=n.alternate.memoizedState),kl(n,i.next.queue,{},xn())}function Wd(){return zt(Fl)}function F0(){return mt().memoizedState}function Q0(){return mt().memoizedState}function Q2(n){for(var i=n.return;i!==null;){switch(i.tag){case 24:case 3:var l=xn();n=dr(l);var c=hr(i,n,l);c!==null&&(nn(c,i,l),Al(c,i,l)),i={cache:Nd()},n.payload=i;return}i=i.return}}function P2(n,i,l){var c=xn();l={lane:c,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Tc(n)?K0(i,l):(l=gd(n,i,l,c),l!==null&&(nn(l,n,c),W0(l,i,c)))}function P0(n,i,l){var c=xn();kl(n,i,l,c)}function kl(n,i,l,c){var d={lane:c,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Tc(n))K0(i,d);else{var m=n.alternate;if(n.lanes===0&&(m===null||m.lanes===0)&&(m=i.lastRenderedReducer,m!==null))try{var _=i.lastRenderedState,M=m(_,l);if(d.hasEagerState=!0,d.eagerState=M,hn(M,_))return sc(n,i,d,0),rt===null&&lc(),!1}catch{}finally{}if(l=gd(n,i,d,c),l!==null)return nn(l,n,c),W0(l,i,c),!0}return!1}function Jd(n,i,l,c){if(c={lane:2,revertLane:kh(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},Tc(n)){if(i)throw Error(a(479))}else i=gd(n,l,c,2),i!==null&&nn(i,n,2)}function Tc(n){var i=n.alternate;return n===Re||i!==null&&i===Re}function K0(n,i){ao=wc=!0;var l=n.pending;l===null?i.next=i:(i.next=l.next,l.next=i),n.pending=i}function W0(n,i,l){if((l&4194048)!==0){var c=i.lanes;c&=n.pendingLanes,l|=c,i.lanes=l,$s(n,l)}}var Rl={readContext:zt,use:Ec,useCallback:dt,useContext:dt,useEffect:dt,useImperativeHandle:dt,useLayoutEffect:dt,useInsertionEffect:dt,useMemo:dt,useReducer:dt,useRef:dt,useState:dt,useDebugValue:dt,useDeferredValue:dt,useTransition:dt,useSyncExternalStore:dt,useId:dt,useHostTransitionStatus:dt,useFormState:dt,useActionState:dt,useOptimistic:dt,useMemoCache:dt,useCacheRefresh:dt};Rl.useEffectEvent=dt;var J0={readContext:zt,use:Ec,useCallback:function(n,i){return It().memoizedState=[n,i===void 0?null:i],n},useContext:zt,useEffect:L0,useImperativeHandle:function(n,i,l){l=l!=null?l.concat([n]):null,Ac(4194308,4,Y0.bind(null,i,n),l)},useLayoutEffect:function(n,i){return Ac(4194308,4,n,i)},useInsertionEffect:function(n,i){Ac(4,2,n,i)},useMemo:function(n,i){var l=It();i=i===void 0?null:i;var c=n();if(ha){Kn(!0);try{n()}finally{Kn(!1)}}return l.memoizedState=[c,i],c},useReducer:function(n,i,l){var c=It();if(l!==void 0){var d=l(i);if(ha){Kn(!0);try{l(i)}finally{Kn(!1)}}}else d=i;return c.memoizedState=c.baseState=d,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:d},c.queue=n,n=n.dispatch=P2.bind(null,Re,n),[c.memoizedState,n]},useRef:function(n){var i=It();return n={current:n},i.memoizedState=n},useState:function(n){n=Zd(n);var i=n.queue,l=P0.bind(null,Re,i);return i.dispatch=l,[n.memoizedState,l]},useDebugValue:Qd,useDeferredValue:function(n,i){var l=It();return Pd(l,n,i)},useTransition:function(){var n=Zd(!1);return n=I0.bind(null,Re,n.queue,!0,!1),It().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,i,l){var c=Re,d=It();if($e){if(l===void 0)throw Error(a(407));l=l()}else{if(l=i(),rt===null)throw Error(a(349));(Ue&127)!==0||b0(c,i,l)}d.memoizedState=l;var m={value:l,getSnapshot:i};return d.queue=m,L0(_0.bind(null,c,m,n),[n]),c.flags|=2048,lo(9,{destroy:void 0},w0.bind(null,c,m,l,i),null),l},useId:function(){var n=It(),i=rt.identifierPrefix;if($e){var l=ei,c=Jn;l=(c&~(1<<32-Gt(c)-1)).toString(32)+l,i="_"+i+"R_"+l,l=_c++,0<l&&(i+="H"+l.toString(32)),i+="_"}else l=q2++,i="_"+i+"r_"+l.toString(32)+"_";return n.memoizedState=i},useHostTransitionStatus:Wd,useFormState:k0,useActionState:k0,useOptimistic:function(n){var i=It();i.memoizedState=i.baseState=n;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=l,i=Jd.bind(null,Re,!0,l),l.dispatch=i,[n,i]},useMemoCache:qd,useCacheRefresh:function(){return It().memoizedState=Q2.bind(null,Re)},useEffectEvent:function(n){var i=It(),l={impl:n};return i.memoizedState=l,function(){if((Qe&2)!==0)throw Error(a(440));return l.impl.apply(void 0,arguments)}}},eh={readContext:zt,use:Ec,useCallback:V0,useContext:zt,useEffect:Fd,useImperativeHandle:$0,useInsertionEffect:B0,useLayoutEffect:U0,useMemo:q0,useReducer:Cc,useRef:z0,useState:function(){return Cc(Mi)},useDebugValue:Qd,useDeferredValue:function(n,i){var l=mt();return G0(l,et.memoizedState,n,i)},useTransition:function(){var n=Cc(Mi)[0],i=mt().memoizedState;return[typeof n=="boolean"?n:Ol(n),i]},useSyncExternalStore:x0,useId:F0,useHostTransitionStatus:Wd,useFormState:R0,useActionState:R0,useOptimistic:function(n,i){var l=mt();return C0(l,et,n,i)},useMemoCache:qd,useCacheRefresh:Q0};eh.useEffectEvent=H0;var ey={readContext:zt,use:Ec,useCallback:V0,useContext:zt,useEffect:Fd,useImperativeHandle:$0,useInsertionEffect:B0,useLayoutEffect:U0,useMemo:q0,useReducer:Id,useRef:z0,useState:function(){return Id(Mi)},useDebugValue:Qd,useDeferredValue:function(n,i){var l=mt();return et===null?Pd(l,n,i):G0(l,et.memoizedState,n,i)},useTransition:function(){var n=Id(Mi)[0],i=mt().memoizedState;return[typeof n=="boolean"?n:Ol(n),i]},useSyncExternalStore:x0,useId:F0,useHostTransitionStatus:Wd,useFormState:j0,useActionState:j0,useOptimistic:function(n,i){var l=mt();return et!==null?C0(l,et,n,i):(l.baseState=n,[n,l.queue.dispatch])},useMemoCache:qd,useCacheRefresh:Q0};ey.useEffectEvent=H0;function th(n,i,l,c){i=n.memoizedState,l=l(c,i),l=l==null?i:g({},i,l),n.memoizedState=l,n.lanes===0&&(n.updateQueue.baseState=l)}var nh={enqueueSetState:function(n,i,l){n=n._reactInternals;var c=xn(),d=dr(c);d.payload=i,l!=null&&(d.callback=l),i=hr(n,d,c),i!==null&&(nn(i,n,c),Al(i,n,c))},enqueueReplaceState:function(n,i,l){n=n._reactInternals;var c=xn(),d=dr(c);d.tag=1,d.payload=i,l!=null&&(d.callback=l),i=hr(n,d,c),i!==null&&(nn(i,n,c),Al(i,n,c))},enqueueForceUpdate:function(n,i){n=n._reactInternals;var l=xn(),c=dr(l);c.tag=2,i!=null&&(c.callback=i),i=hr(n,c,l),i!==null&&(nn(i,n,l),Al(i,n,l))}};function ty(n,i,l,c,d,m,_){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(c,m,_):i.prototype&&i.prototype.isPureReactComponent?!vl(l,c)||!vl(d,m):!0}function ny(n,i,l,c){n=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(l,c),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(l,c),i.state!==n&&nh.enqueueReplaceState(i,i.state,null)}function pa(n,i){var l=i;if("ref"in i){l={};for(var c in i)c!=="ref"&&(l[c]=i[c])}if(n=n.defaultProps){l===i&&(l=g({},l));for(var d in n)l[d]===void 0&&(l[d]=n[d])}return l}function iy(n){oc(n)}function ry(n){console.error(n)}function ay(n){oc(n)}function Mc(n,i){try{var l=n.onUncaughtError;l(i.value,{componentStack:i.stack})}catch(c){setTimeout(function(){throw c})}}function oy(n,i,l){try{var c=n.onCaughtError;c(l.value,{componentStack:l.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(d){setTimeout(function(){throw d})}}function ih(n,i,l){return l=dr(l),l.tag=3,l.payload={element:null},l.callback=function(){Mc(n,i)},l}function ly(n){return n=dr(n),n.tag=3,n}function sy(n,i,l,c){var d=l.type.getDerivedStateFromError;if(typeof d=="function"){var m=c.value;n.payload=function(){return d(m)},n.callback=function(){oy(i,l,c)}}var _=l.stateNode;_!==null&&typeof _.componentDidCatch=="function"&&(n.callback=function(){oy(i,l,c),typeof d!="function"&&(xr===null?xr=new Set([this]):xr.add(this));var M=c.stack;this.componentDidCatch(c.value,{componentStack:M!==null?M:""})})}function K2(n,i,l,c,d){if(l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(i=l.alternate,i!==null&&Ja(i,l,d,!0),l=mn.current,l!==null){switch(l.tag){case 31:case 13:return On===null?$c():l.alternate===null&&ht===0&&(ht=3),l.flags&=-257,l.flags|=65536,l.lanes=d,c===gc?l.flags|=16384:(i=l.updateQueue,i===null?l.updateQueue=new Set([c]):i.add(c),Th(n,c,d)),!1;case 22:return l.flags|=65536,c===gc?l.flags|=16384:(i=l.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([c])},l.updateQueue=i):(l=i.retryQueue,l===null?i.retryQueue=new Set([c]):l.add(c)),Th(n,c,d)),!1}throw Error(a(435,l.tag))}return Th(n,c,d),$c(),!1}if($e)return i=mn.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=d,c!==_d&&(n=Error(a(422),{cause:c}),wl(An(n,l)))):(c!==_d&&(i=Error(a(423),{cause:c}),wl(An(i,l))),n=n.current.alternate,n.flags|=65536,d&=-d,n.lanes|=d,c=An(c,l),d=ih(n.stateNode,c,d),Dd(n,d),ht!==4&&(ht=2)),!1;var m=Error(a(520),{cause:c});if(m=An(m,l),Yl===null?Yl=[m]:Yl.push(m),ht!==4&&(ht=2),i===null)return!0;c=An(c,l),l=i;do{switch(l.tag){case 3:return l.flags|=65536,n=d&-d,l.lanes|=n,n=ih(l.stateNode,c,n),Dd(l,n),!1;case 1:if(i=l.type,m=l.stateNode,(l.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(xr===null||!xr.has(m))))return l.flags|=65536,d&=-d,l.lanes|=d,d=ly(d),sy(d,n,l,c),Dd(l,d),!1}l=l.return}while(l!==null);return!1}var rh=Error(a(461)),wt=!1;function Lt(n,i,l,c){i.child=n===null?d0(i,null,l,c):da(i,n.child,l,c)}function cy(n,i,l,c,d){l=l.render;var m=i.ref;if("ref"in c){var _={};for(var M in c)M!=="ref"&&(_[M]=c[M])}else _=c;return sa(i),c=Ud(n,i,l,_,m,d),M=Yd(),n!==null&&!wt?($d(n,i,d),Oi(n,i,d)):($e&&M&&bd(i),i.flags|=1,Lt(n,i,c,d),i.child)}function uy(n,i,l,c,d){if(n===null){var m=l.type;return typeof m=="function"&&!yd(m)&&m.defaultProps===void 0&&l.compare===null?(i.tag=15,i.type=m,fy(n,i,m,c,d)):(n=uc(l.type,null,c,i,i.mode,d),n.ref=i.ref,n.return=i,i.child=n)}if(m=n.child,!dh(n,d)){var _=m.memoizedProps;if(l=l.compare,l=l!==null?l:vl,l(_,c)&&n.ref===i.ref)return Oi(n,i,d)}return i.flags|=1,n=Ei(m,c),n.ref=i.ref,n.return=i,i.child=n}function fy(n,i,l,c,d){if(n!==null){var m=n.memoizedProps;if(vl(m,c)&&n.ref===i.ref)if(wt=!1,i.pendingProps=c=m,dh(n,d))(n.flags&131072)!==0&&(wt=!0);else return i.lanes=n.lanes,Oi(n,i,d)}return ah(n,i,l,c,d)}function dy(n,i,l,c){var d=c.children,m=n!==null?n.memoizedState:null;if(n===null&&i.stateNode===null&&(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),c.mode==="hidden"){if((i.flags&128)!==0){if(m=m!==null?m.baseLanes|l:l,n!==null){for(c=i.child=n.child,d=0;c!==null;)d=d|c.lanes|c.childLanes,c=c.sibling;c=d&~m}else c=0,i.child=null;return hy(n,i,m,l,c)}if((l&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},n!==null&&pc(i,m!==null?m.cachePool:null),m!==null?m0(i,m):zd(),g0(i);else return c=i.lanes=536870912,hy(n,i,m!==null?m.baseLanes|l:l,l,c)}else m!==null?(pc(i,m.cachePool),m0(i,m),mr(),i.memoizedState=null):(n!==null&&pc(i,null),zd(),mr());return Lt(n,i,d,l),i.child}function Dl(n,i){return n!==null&&n.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function hy(n,i,l,c,d){var m=Md();return m=m===null?null:{parent:xt._currentValue,pool:m},i.memoizedState={baseLanes:l,cachePool:m},n!==null&&pc(i,null),zd(),g0(i),n!==null&&Ja(n,i,c,!0),i.childLanes=d,null}function Oc(n,i){return i=Rc({mode:i.mode,children:i.children},n.mode),i.ref=n.ref,n.child=i,i.return=n,i}function py(n,i,l){return da(i,n.child,null,l),n=Oc(i,i.pendingProps),n.flags|=2,gn(i),i.memoizedState=null,n}function W2(n,i,l){var c=i.pendingProps,d=(i.flags&128)!==0;if(i.flags&=-129,n===null){if($e){if(c.mode==="hidden")return n=Oc(i,c),i.lanes=536870912,Dl(null,n);if(Hd(i),(n=at)?(n=Av(n,Mn),n=n!==null&&n.data==="&"?n:null,n!==null&&(i.memoizedState={dehydrated:n,treeContext:lr!==null?{id:Jn,overflow:ei}:null,retryLane:536870912,hydrationErrors:null},l=Kg(n),l.return=i,i.child=l,jt=i,at=null)):n=null,n===null)throw cr(i);return i.lanes=536870912,null}return Oc(i,c)}var m=n.memoizedState;if(m!==null){var _=m.dehydrated;if(Hd(i),d)if(i.flags&256)i.flags&=-257,i=py(n,i,l);else if(i.memoizedState!==null)i.child=n.child,i.flags|=128,i=null;else throw Error(a(558));else if(wt||Ja(n,i,l,!1),d=(l&n.childLanes)!==0,wt||d){if(c=rt,c!==null&&(_=Vs(c,l),_!==0&&_!==m.retryLane))throw m.retryLane=_,ra(n,_),nn(c,n,_),rh;$c(),i=py(n,i,l)}else n=m.treeContext,at=kn(_.nextSibling),jt=i,$e=!0,sr=null,Mn=!1,n!==null&&e0(i,n),i=Oc(i,c),i.flags|=4096;return i}return n=Ei(n.child,{mode:c.mode,children:c.children}),n.ref=i.ref,i.child=n,n.return=i,n}function kc(n,i){var l=i.ref;if(l===null)n!==null&&n.ref!==null&&(i.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(a(284));(n===null||n.ref!==l)&&(i.flags|=4194816)}}function ah(n,i,l,c,d){return sa(i),l=Ud(n,i,l,c,void 0,d),c=Yd(),n!==null&&!wt?($d(n,i,d),Oi(n,i,d)):($e&&c&&bd(i),i.flags|=1,Lt(n,i,l,d),i.child)}function my(n,i,l,c,d,m){return sa(i),i.updateQueue=null,l=v0(i,c,l,d),y0(n),c=Yd(),n!==null&&!wt?($d(n,i,m),Oi(n,i,m)):($e&&c&&bd(i),i.flags|=1,Lt(n,i,l,m),i.child)}function gy(n,i,l,c,d){if(sa(i),i.stateNode===null){var m=Qa,_=l.contextType;typeof _=="object"&&_!==null&&(m=zt(_)),m=new l(c,m),i.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,m.updater=nh,i.stateNode=m,m._reactInternals=i,m=i.stateNode,m.props=c,m.state=i.memoizedState,m.refs={},kd(i),_=l.contextType,m.context=typeof _=="object"&&_!==null?zt(_):Qa,m.state=i.memoizedState,_=l.getDerivedStateFromProps,typeof _=="function"&&(th(i,l,_,c),m.state=i.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof m.getSnapshotBeforeUpdate=="function"||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(_=m.state,typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount(),_!==m.state&&nh.enqueueReplaceState(m,m.state,null),Tl(i,c,m,d),Nl(),m.state=i.memoizedState),typeof m.componentDidMount=="function"&&(i.flags|=4194308),c=!0}else if(n===null){m=i.stateNode;var M=i.memoizedProps,U=pa(l,M);m.props=U;var P=m.context,re=l.contextType;_=Qa,typeof re=="object"&&re!==null&&(_=zt(re));var oe=l.getDerivedStateFromProps;re=typeof oe=="function"||typeof m.getSnapshotBeforeUpdate=="function",M=i.pendingProps!==M,re||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(M||P!==_)&&ny(i,m,c,_),fr=!1;var W=i.memoizedState;m.state=W,Tl(i,c,m,d),Nl(),P=i.memoizedState,M||W!==P||fr?(typeof oe=="function"&&(th(i,l,oe,c),P=i.memoizedState),(U=fr||ty(i,l,U,c,W,P,_))?(re||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(i.flags|=4194308)):(typeof m.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=c,i.memoizedState=P),m.props=c,m.state=P,m.context=_,c=U):(typeof m.componentDidMount=="function"&&(i.flags|=4194308),c=!1)}else{m=i.stateNode,Rd(n,i),_=i.memoizedProps,re=pa(l,_),m.props=re,oe=i.pendingProps,W=m.context,P=l.contextType,U=Qa,typeof P=="object"&&P!==null&&(U=zt(P)),M=l.getDerivedStateFromProps,(P=typeof M=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(_!==oe||W!==U)&&ny(i,m,c,U),fr=!1,W=i.memoizedState,m.state=W,Tl(i,c,m,d),Nl();var ee=i.memoizedState;_!==oe||W!==ee||fr||n!==null&&n.dependencies!==null&&dc(n.dependencies)?(typeof M=="function"&&(th(i,l,M,c),ee=i.memoizedState),(re=fr||ty(i,l,re,c,W,ee,U)||n!==null&&n.dependencies!==null&&dc(n.dependencies))?(P||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(c,ee,U),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(c,ee,U)),typeof m.componentDidUpdate=="function"&&(i.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof m.componentDidUpdate!="function"||_===n.memoizedProps&&W===n.memoizedState||(i.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||_===n.memoizedProps&&W===n.memoizedState||(i.flags|=1024),i.memoizedProps=c,i.memoizedState=ee),m.props=c,m.state=ee,m.context=U,c=re):(typeof m.componentDidUpdate!="function"||_===n.memoizedProps&&W===n.memoizedState||(i.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||_===n.memoizedProps&&W===n.memoizedState||(i.flags|=1024),c=!1)}return m=c,kc(n,i),c=(i.flags&128)!==0,m||c?(m=i.stateNode,l=c&&typeof l.getDerivedStateFromError!="function"?null:m.render(),i.flags|=1,n!==null&&c?(i.child=da(i,n.child,null,d),i.child=da(i,null,l,d)):Lt(n,i,l,d),i.memoizedState=m.state,n=i.child):n=Oi(n,i,d),n}function yy(n,i,l,c){return oa(),i.flags|=256,Lt(n,i,l,c),i.child}var oh={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function lh(n){return{baseLanes:n,cachePool:o0()}}function sh(n,i,l){return n=n!==null?n.childLanes&~l:0,i&&(n|=vn),n}function vy(n,i,l){var c=i.pendingProps,d=!1,m=(i.flags&128)!==0,_;if((_=m)||(_=n!==null&&n.memoizedState===null?!1:(pt.current&2)!==0),_&&(d=!0,i.flags&=-129),_=(i.flags&32)!==0,i.flags&=-33,n===null){if($e){if(d?pr(i):mr(),(n=at)?(n=Av(n,Mn),n=n!==null&&n.data!=="&"?n:null,n!==null&&(i.memoizedState={dehydrated:n,treeContext:lr!==null?{id:Jn,overflow:ei}:null,retryLane:536870912,hydrationErrors:null},l=Kg(n),l.return=i,i.child=l,jt=i,at=null)):n=null,n===null)throw cr(i);return Gh(n)?i.lanes=32:i.lanes=536870912,null}var M=c.children;return c=c.fallback,d?(mr(),d=i.mode,M=Rc({mode:"hidden",children:M},d),c=aa(c,d,l,null),M.return=i,c.return=i,M.sibling=c,i.child=M,c=i.child,c.memoizedState=lh(l),c.childLanes=sh(n,_,l),i.memoizedState=oh,Dl(null,c)):(pr(i),ch(i,M))}var U=n.memoizedState;if(U!==null&&(M=U.dehydrated,M!==null)){if(m)i.flags&256?(pr(i),i.flags&=-257,i=uh(n,i,l)):i.memoizedState!==null?(mr(),i.child=n.child,i.flags|=128,i=null):(mr(),M=c.fallback,d=i.mode,c=Rc({mode:"visible",children:c.children},d),M=aa(M,d,l,null),M.flags|=2,c.return=i,M.return=i,c.sibling=M,i.child=c,da(i,n.child,null,l),c=i.child,c.memoizedState=lh(l),c.childLanes=sh(n,_,l),i.memoizedState=oh,i=Dl(null,c));else if(pr(i),Gh(M)){if(_=M.nextSibling&&M.nextSibling.dataset,_)var P=_.dgst;_=P,c=Error(a(419)),c.stack="",c.digest=_,wl({value:c,source:null,stack:null}),i=uh(n,i,l)}else if(wt||Ja(n,i,l,!1),_=(l&n.childLanes)!==0,wt||_){if(_=rt,_!==null&&(c=Vs(_,l),c!==0&&c!==U.retryLane))throw U.retryLane=c,ra(n,c),nn(_,n,c),rh;qh(M)||$c(),i=uh(n,i,l)}else qh(M)?(i.flags|=192,i.child=n.child,i=null):(n=U.treeContext,at=kn(M.nextSibling),jt=i,$e=!0,sr=null,Mn=!1,n!==null&&e0(i,n),i=ch(i,c.children),i.flags|=4096);return i}return d?(mr(),M=c.fallback,d=i.mode,U=n.child,P=U.sibling,c=Ei(U,{mode:"hidden",children:c.children}),c.subtreeFlags=U.subtreeFlags&65011712,P!==null?M=Ei(P,M):(M=aa(M,d,l,null),M.flags|=2),M.return=i,c.return=i,c.sibling=M,i.child=c,Dl(null,c),c=i.child,M=n.child.memoizedState,M===null?M=lh(l):(d=M.cachePool,d!==null?(U=xt._currentValue,d=d.parent!==U?{parent:U,pool:U}:d):d=o0(),M={baseLanes:M.baseLanes|l,cachePool:d}),c.memoizedState=M,c.childLanes=sh(n,_,l),i.memoizedState=oh,Dl(n.child,c)):(pr(i),l=n.child,n=l.sibling,l=Ei(l,{mode:"visible",children:c.children}),l.return=i,l.sibling=null,n!==null&&(_=i.deletions,_===null?(i.deletions=[n],i.flags|=16):_.push(n)),i.child=l,i.memoizedState=null,l)}function ch(n,i){return i=Rc({mode:"visible",children:i},n.mode),i.return=n,n.child=i}function Rc(n,i){return n=pn(22,n,null,i),n.lanes=0,n}function uh(n,i,l){return da(i,n.child,null,l),n=ch(i,i.pendingProps.children),n.flags|=2,i.memoizedState=null,n}function xy(n,i,l){n.lanes|=i;var c=n.alternate;c!==null&&(c.lanes|=i),Cd(n.return,i,l)}function fh(n,i,l,c,d,m){var _=n.memoizedState;_===null?n.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:c,tail:l,tailMode:d,treeForkCount:m}:(_.isBackwards=i,_.rendering=null,_.renderingStartTime=0,_.last=c,_.tail=l,_.tailMode=d,_.treeForkCount=m)}function by(n,i,l){var c=i.pendingProps,d=c.revealOrder,m=c.tail;c=c.children;var _=pt.current,M=(_&2)!==0;if(M?(_=_&1|2,i.flags|=128):_&=1,J(pt,_),Lt(n,i,c,l),c=$e?bl:0,!M&&n!==null&&(n.flags&128)!==0)e:for(n=i.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&xy(n,l,i);else if(n.tag===19)xy(n,l,i);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===i)break e;for(;n.sibling===null;){if(n.return===null||n.return===i)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(d){case"forwards":for(l=i.child,d=null;l!==null;)n=l.alternate,n!==null&&bc(n)===null&&(d=l),l=l.sibling;l=d,l===null?(d=i.child,i.child=null):(d=l.sibling,l.sibling=null),fh(i,!1,d,l,m,c);break;case"backwards":case"unstable_legacy-backwards":for(l=null,d=i.child,i.child=null;d!==null;){if(n=d.alternate,n!==null&&bc(n)===null){i.child=d;break}n=d.sibling,d.sibling=l,l=d,d=n}fh(i,!0,l,null,m,c);break;case"together":fh(i,!1,null,null,void 0,c);break;default:i.memoizedState=null}return i.child}function Oi(n,i,l){if(n!==null&&(i.dependencies=n.dependencies),vr|=i.lanes,(l&i.childLanes)===0)if(n!==null){if(Ja(n,i,l,!1),(l&i.childLanes)===0)return null}else return null;if(n!==null&&i.child!==n.child)throw Error(a(153));if(i.child!==null){for(n=i.child,l=Ei(n,n.pendingProps),i.child=l,l.return=i;n.sibling!==null;)n=n.sibling,l=l.sibling=Ei(n,n.pendingProps),l.return=i;l.sibling=null}return i.child}function dh(n,i){return(n.lanes&i)!==0?!0:(n=n.dependencies,!!(n!==null&&dc(n)))}function J2(n,i,l){switch(i.tag){case 3:ce(i,i.stateNode.containerInfo),ur(i,xt,n.memoizedState.cache),oa();break;case 27:case 5:Ae(i);break;case 4:ce(i,i.stateNode.containerInfo);break;case 10:ur(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,Hd(i),null;break;case 13:var c=i.memoizedState;if(c!==null)return c.dehydrated!==null?(pr(i),i.flags|=128,null):(l&i.child.childLanes)!==0?vy(n,i,l):(pr(i),n=Oi(n,i,l),n!==null?n.sibling:null);pr(i);break;case 19:var d=(n.flags&128)!==0;if(c=(l&i.childLanes)!==0,c||(Ja(n,i,l,!1),c=(l&i.childLanes)!==0),d){if(c)return by(n,i,l);i.flags|=128}if(d=i.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),J(pt,pt.current),c)break;return null;case 22:return i.lanes=0,dy(n,i,l,i.pendingProps);case 24:ur(i,xt,n.memoizedState.cache)}return Oi(n,i,l)}function wy(n,i,l){if(n!==null)if(n.memoizedProps!==i.pendingProps)wt=!0;else{if(!dh(n,l)&&(i.flags&128)===0)return wt=!1,J2(n,i,l);wt=(n.flags&131072)!==0}else wt=!1,$e&&(i.flags&1048576)!==0&&Jg(i,bl,i.index);switch(i.lanes=0,i.tag){case 16:e:{var c=i.pendingProps;if(n=ua(i.elementType),i.type=n,typeof n=="function")yd(n)?(c=pa(n,c),i.tag=1,i=gy(null,i,n,c,l)):(i.tag=0,i=ah(null,i,n,c,l));else{if(n!=null){var d=n.$$typeof;if(d===T){i.tag=11,i=cy(null,i,n,c,l);break e}else if(d===j){i.tag=14,i=uy(null,i,n,c,l);break e}}throw i=z(n)||n,Error(a(306,i,""))}}return i;case 0:return ah(n,i,i.type,i.pendingProps,l);case 1:return c=i.type,d=pa(c,i.pendingProps),gy(n,i,c,d,l);case 3:e:{if(ce(i,i.stateNode.containerInfo),n===null)throw Error(a(387));c=i.pendingProps;var m=i.memoizedState;d=m.element,Rd(n,i),Tl(i,c,null,l);var _=i.memoizedState;if(c=_.cache,ur(i,xt,c),c!==m.cache&&Ad(i,[xt],l,!0),Nl(),c=_.element,m.isDehydrated)if(m={element:c,isDehydrated:!1,cache:_.cache},i.updateQueue.baseState=m,i.memoizedState=m,i.flags&256){i=yy(n,i,c,l);break e}else if(c!==d){d=An(Error(a(424)),i),wl(d),i=yy(n,i,c,l);break e}else{switch(n=i.stateNode.containerInfo,n.nodeType){case 9:n=n.body;break;default:n=n.nodeName==="HTML"?n.ownerDocument.body:n}for(at=kn(n.firstChild),jt=i,$e=!0,sr=null,Mn=!0,l=d0(i,null,c,l),i.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(oa(),c===d){i=Oi(n,i,l);break e}Lt(n,i,c,l)}i=i.child}return i;case 26:return kc(n,i),n===null?(l=Rv(i.type,null,i.pendingProps,null))?i.memoizedState=l:$e||(l=i.type,n=i.pendingProps,c=Fc(fe.current).createElement(l),c[Nt]=i,c[Bt]=n,Ht(c,l,n),vt(c),i.stateNode=c):i.memoizedState=Rv(i.type,n.memoizedProps,i.pendingProps,n.memoizedState),null;case 27:return Ae(i),n===null&&$e&&(c=i.stateNode=Mv(i.type,i.pendingProps,fe.current),jt=i,Mn=!0,d=at,Sr(i.type)?(Ih=d,at=kn(c.firstChild)):at=d),Lt(n,i,i.pendingProps.children,l),kc(n,i),n===null&&(i.flags|=4194304),i.child;case 5:return n===null&&$e&&((d=c=at)&&(c=MC(c,i.type,i.pendingProps,Mn),c!==null?(i.stateNode=c,jt=i,at=kn(c.firstChild),Mn=!1,d=!0):d=!1),d||cr(i)),Ae(i),d=i.type,m=i.pendingProps,_=n!==null?n.memoizedProps:null,c=m.children,Yh(d,m)?c=null:_!==null&&Yh(d,_)&&(i.flags|=32),i.memoizedState!==null&&(d=Ud(n,i,G2,null,null,l),Fl._currentValue=d),kc(n,i),Lt(n,i,c,l),i.child;case 6:return n===null&&$e&&((n=l=at)&&(l=OC(l,i.pendingProps,Mn),l!==null?(i.stateNode=l,jt=i,at=null,n=!0):n=!1),n||cr(i)),null;case 13:return vy(n,i,l);case 4:return ce(i,i.stateNode.containerInfo),c=i.pendingProps,n===null?i.child=da(i,null,c,l):Lt(n,i,c,l),i.child;case 11:return cy(n,i,i.type,i.pendingProps,l);case 7:return Lt(n,i,i.pendingProps,l),i.child;case 8:return Lt(n,i,i.pendingProps.children,l),i.child;case 12:return Lt(n,i,i.pendingProps.children,l),i.child;case 10:return c=i.pendingProps,ur(i,i.type,c.value),Lt(n,i,c.children,l),i.child;case 9:return d=i.type._context,c=i.pendingProps.children,sa(i),d=zt(d),c=c(d),i.flags|=1,Lt(n,i,c,l),i.child;case 14:return uy(n,i,i.type,i.pendingProps,l);case 15:return fy(n,i,i.type,i.pendingProps,l);case 19:return by(n,i,l);case 31:return W2(n,i,l);case 22:return dy(n,i,l,i.pendingProps);case 24:return sa(i),c=zt(xt),n===null?(d=Md(),d===null&&(d=rt,m=Nd(),d.pooledCache=m,m.refCount++,m!==null&&(d.pooledCacheLanes|=l),d=m),i.memoizedState={parent:c,cache:d},kd(i),ur(i,xt,d)):((n.lanes&l)!==0&&(Rd(n,i),Tl(i,null,null,l),Nl()),d=n.memoizedState,m=i.memoizedState,d.parent!==c?(d={parent:c,cache:c},i.memoizedState=d,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=d),ur(i,xt,c)):(c=m.cache,ur(i,xt,c),c!==d.cache&&Ad(i,[xt],l,!0))),Lt(n,i,i.pendingProps.children,l),i.child;case 29:throw i.pendingProps}throw Error(a(156,i.tag))}function ki(n){n.flags|=4}function hh(n,i,l,c,d){if((i=(n.mode&32)!==0)&&(i=!1),i){if(n.flags|=16777216,(d&335544128)===d)if(n.stateNode.complete)n.flags|=8192;else if(Fy())n.flags|=8192;else throw fa=gc,Od}else n.flags&=-16777217}function _y(n,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!Hv(i))if(Fy())n.flags|=8192;else throw fa=gc,Od}function Dc(n,i){i!==null&&(n.flags|=4),n.flags&16384&&(i=n.tag!==22?Us():536870912,n.lanes|=i,fo|=i)}function jl(n,i){if(!$e)switch(n.tailMode){case"hidden":i=n.tail;for(var l=null;i!==null;)i.alternate!==null&&(l=i),i=i.sibling;l===null?n.tail=null:l.sibling=null;break;case"collapsed":l=n.tail;for(var c=null;l!==null;)l.alternate!==null&&(c=l),l=l.sibling;c===null?i||n.tail===null?n.tail=null:n.tail.sibling=null:c.sibling=null}}function ot(n){var i=n.alternate!==null&&n.alternate.child===n.child,l=0,c=0;if(i)for(var d=n.child;d!==null;)l|=d.lanes|d.childLanes,c|=d.subtreeFlags&65011712,c|=d.flags&65011712,d.return=n,d=d.sibling;else for(d=n.child;d!==null;)l|=d.lanes|d.childLanes,c|=d.subtreeFlags,c|=d.flags,d.return=n,d=d.sibling;return n.subtreeFlags|=c,n.childLanes=l,i}function eC(n,i,l){var c=i.pendingProps;switch(wd(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ot(i),null;case 1:return ot(i),null;case 3:return l=i.stateNode,c=null,n!==null&&(c=n.memoizedState.cache),i.memoizedState.cache!==c&&(i.flags|=2048),Ni(xt),he(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(n===null||n.child===null)&&(Wa(i)?ki(i):n===null||n.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,Sd())),ot(i),null;case 26:var d=i.type,m=i.memoizedState;return n===null?(ki(i),m!==null?(ot(i),_y(i,m)):(ot(i),hh(i,d,null,c,l))):m?m!==n.memoizedState?(ki(i),ot(i),_y(i,m)):(ot(i),i.flags&=-16777217):(n=n.memoizedProps,n!==c&&ki(i),ot(i),hh(i,d,n,c,l)),null;case 27:if(Ee(i),l=fe.current,d=i.type,n!==null&&i.stateNode!=null)n.memoizedProps!==c&&ki(i);else{if(!c){if(i.stateNode===null)throw Error(a(166));return ot(i),null}n=ne.current,Wa(i)?t0(i):(n=Mv(d,c,l),i.stateNode=n,ki(i))}return ot(i),null;case 5:if(Ee(i),d=i.type,n!==null&&i.stateNode!=null)n.memoizedProps!==c&&ki(i);else{if(!c){if(i.stateNode===null)throw Error(a(166));return ot(i),null}if(m=ne.current,Wa(i))t0(i);else{var _=Fc(fe.current);switch(m){case 1:m=_.createElementNS("http://www.w3.org/2000/svg",d);break;case 2:m=_.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;default:switch(d){case"svg":m=_.createElementNS("http://www.w3.org/2000/svg",d);break;case"math":m=_.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;case"script":m=_.createElement("div"),m.innerHTML="<script><\/script>",m=m.removeChild(m.firstChild);break;case"select":m=typeof c.is=="string"?_.createElement("select",{is:c.is}):_.createElement("select"),c.multiple?m.multiple=!0:c.size&&(m.size=c.size);break;default:m=typeof c.is=="string"?_.createElement(d,{is:c.is}):_.createElement(d)}}m[Nt]=i,m[Bt]=c;e:for(_=i.child;_!==null;){if(_.tag===5||_.tag===6)m.appendChild(_.stateNode);else if(_.tag!==4&&_.tag!==27&&_.child!==null){_.child.return=_,_=_.child;continue}if(_===i)break e;for(;_.sibling===null;){if(_.return===null||_.return===i)break e;_=_.return}_.sibling.return=_.return,_=_.sibling}i.stateNode=m;e:switch(Ht(m,d,c),d){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}c&&ki(i)}}return ot(i),hh(i,i.type,n===null?null:n.memoizedProps,i.pendingProps,l),null;case 6:if(n&&i.stateNode!=null)n.memoizedProps!==c&&ki(i);else{if(typeof c!="string"&&i.stateNode===null)throw Error(a(166));if(n=fe.current,Wa(i)){if(n=i.stateNode,l=i.memoizedProps,c=null,d=jt,d!==null)switch(d.tag){case 27:case 5:c=d.memoizedProps}n[Nt]=i,n=!!(n.nodeValue===l||c!==null&&c.suppressHydrationWarning===!0||vv(n.nodeValue,l)),n||cr(i,!0)}else n=Fc(n).createTextNode(c),n[Nt]=i,i.stateNode=n}return ot(i),null;case 31:if(l=i.memoizedState,n===null||n.memoizedState!==null){if(c=Wa(i),l!==null){if(n===null){if(!c)throw Error(a(318));if(n=i.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(557));n[Nt]=i}else oa(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;ot(i),n=!1}else l=Sd(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=l),n=!0;if(!n)return i.flags&256?(gn(i),i):(gn(i),null);if((i.flags&128)!==0)throw Error(a(558))}return ot(i),null;case 13:if(c=i.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(d=Wa(i),c!==null&&c.dehydrated!==null){if(n===null){if(!d)throw Error(a(318));if(d=i.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(a(317));d[Nt]=i}else oa(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;ot(i),d=!1}else d=Sd(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=d),d=!0;if(!d)return i.flags&256?(gn(i),i):(gn(i),null)}return gn(i),(i.flags&128)!==0?(i.lanes=l,i):(l=c!==null,n=n!==null&&n.memoizedState!==null,l&&(c=i.child,d=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(d=c.alternate.memoizedState.cachePool.pool),m=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(m=c.memoizedState.cachePool.pool),m!==d&&(c.flags|=2048)),l!==n&&l&&(i.child.flags|=8192),Dc(i,i.updateQueue),ot(i),null);case 4:return he(),n===null&&zh(i.stateNode.containerInfo),ot(i),null;case 10:return Ni(i.type),ot(i),null;case 19:if(Y(pt),c=i.memoizedState,c===null)return ot(i),null;if(d=(i.flags&128)!==0,m=c.rendering,m===null)if(d)jl(c,!1);else{if(ht!==0||n!==null&&(n.flags&128)!==0)for(n=i.child;n!==null;){if(m=bc(n),m!==null){for(i.flags|=128,jl(c,!1),n=m.updateQueue,i.updateQueue=n,Dc(i,n),i.subtreeFlags=0,n=l,l=i.child;l!==null;)Pg(l,n),l=l.sibling;return J(pt,pt.current&1|2),$e&&Ci(i,c.treeForkCount),i.child}n=n.sibling}c.tail!==null&&Dt()>Bc&&(i.flags|=128,d=!0,jl(c,!1),i.lanes=4194304)}else{if(!d)if(n=bc(m),n!==null){if(i.flags|=128,d=!0,n=n.updateQueue,i.updateQueue=n,Dc(i,n),jl(c,!0),c.tail===null&&c.tailMode==="hidden"&&!m.alternate&&!$e)return ot(i),null}else 2*Dt()-c.renderingStartTime>Bc&&l!==536870912&&(i.flags|=128,d=!0,jl(c,!1),i.lanes=4194304);c.isBackwards?(m.sibling=i.child,i.child=m):(n=c.last,n!==null?n.sibling=m:i.child=m,c.last=m)}return c.tail!==null?(n=c.tail,c.rendering=n,c.tail=n.sibling,c.renderingStartTime=Dt(),n.sibling=null,l=pt.current,J(pt,d?l&1|2:l&1),$e&&Ci(i,c.treeForkCount),n):(ot(i),null);case 22:case 23:return gn(i),Ld(),c=i.memoizedState!==null,n!==null?n.memoizedState!==null!==c&&(i.flags|=8192):c&&(i.flags|=8192),c?(l&536870912)!==0&&(i.flags&128)===0&&(ot(i),i.subtreeFlags&6&&(i.flags|=8192)):ot(i),l=i.updateQueue,l!==null&&Dc(i,l.retryQueue),l=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(l=n.memoizedState.cachePool.pool),c=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(c=i.memoizedState.cachePool.pool),c!==l&&(i.flags|=2048),n!==null&&Y(ca),null;case 24:return l=null,n!==null&&(l=n.memoizedState.cache),i.memoizedState.cache!==l&&(i.flags|=2048),Ni(xt),ot(i),null;case 25:return null;case 30:return null}throw Error(a(156,i.tag))}function tC(n,i){switch(wd(i),i.tag){case 1:return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 3:return Ni(xt),he(),n=i.flags,(n&65536)!==0&&(n&128)===0?(i.flags=n&-65537|128,i):null;case 26:case 27:case 5:return Ee(i),null;case 31:if(i.memoizedState!==null){if(gn(i),i.alternate===null)throw Error(a(340));oa()}return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 13:if(gn(i),n=i.memoizedState,n!==null&&n.dehydrated!==null){if(i.alternate===null)throw Error(a(340));oa()}return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 19:return Y(pt),null;case 4:return he(),null;case 10:return Ni(i.type),null;case 22:case 23:return gn(i),Ld(),n!==null&&Y(ca),n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 24:return Ni(xt),null;case 25:return null;default:return null}}function Sy(n,i){switch(wd(i),i.tag){case 3:Ni(xt),he();break;case 26:case 27:case 5:Ee(i);break;case 4:he();break;case 31:i.memoizedState!==null&&gn(i);break;case 13:gn(i);break;case 19:Y(pt);break;case 10:Ni(i.type);break;case 22:case 23:gn(i),Ld(),n!==null&&Y(ca);break;case 24:Ni(xt)}}function zl(n,i){try{var l=i.updateQueue,c=l!==null?l.lastEffect:null;if(c!==null){var d=c.next;l=d;do{if((l.tag&n)===n){c=void 0;var m=l.create,_=l.inst;c=m(),_.destroy=c}l=l.next}while(l!==d)}}catch(M){Je(i,i.return,M)}}function gr(n,i,l){try{var c=i.updateQueue,d=c!==null?c.lastEffect:null;if(d!==null){var m=d.next;c=m;do{if((c.tag&n)===n){var _=c.inst,M=_.destroy;if(M!==void 0){_.destroy=void 0,d=i;var U=l,P=M;try{P()}catch(re){Je(d,U,re)}}}c=c.next}while(c!==m)}}catch(re){Je(i,i.return,re)}}function Ey(n){var i=n.updateQueue;if(i!==null){var l=n.stateNode;try{p0(i,l)}catch(c){Je(n,n.return,c)}}}function Cy(n,i,l){l.props=pa(n.type,n.memoizedProps),l.state=n.memoizedState;try{l.componentWillUnmount()}catch(c){Je(n,i,c)}}function Ll(n,i){try{var l=n.ref;if(l!==null){switch(n.tag){case 26:case 27:case 5:var c=n.stateNode;break;case 30:c=n.stateNode;break;default:c=n.stateNode}typeof l=="function"?n.refCleanup=l(c):l.current=c}}catch(d){Je(n,i,d)}}function ti(n,i){var l=n.ref,c=n.refCleanup;if(l!==null)if(typeof c=="function")try{c()}catch(d){Je(n,i,d)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(d){Je(n,i,d)}else l.current=null}function Ay(n){var i=n.type,l=n.memoizedProps,c=n.stateNode;try{e:switch(i){case"button":case"input":case"select":case"textarea":l.autoFocus&&c.focus();break e;case"img":l.src?c.src=l.src:l.srcSet&&(c.srcset=l.srcSet)}}catch(d){Je(n,n.return,d)}}function ph(n,i,l){try{var c=n.stateNode;SC(c,n.type,l,i),c[Bt]=i}catch(d){Je(n,n.return,d)}}function Ny(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&Sr(n.type)||n.tag===4}function mh(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||Ny(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.tag===27&&Sr(n.type)||n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function gh(n,i,l){var c=n.tag;if(c===5||c===6)n=n.stateNode,i?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(n,i):(i=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,i.appendChild(n),l=l._reactRootContainer,l!=null||i.onclick!==null||(i.onclick=_i));else if(c!==4&&(c===27&&Sr(n.type)&&(l=n.stateNode,i=null),n=n.child,n!==null))for(gh(n,i,l),n=n.sibling;n!==null;)gh(n,i,l),n=n.sibling}function jc(n,i,l){var c=n.tag;if(c===5||c===6)n=n.stateNode,i?l.insertBefore(n,i):l.appendChild(n);else if(c!==4&&(c===27&&Sr(n.type)&&(l=n.stateNode),n=n.child,n!==null))for(jc(n,i,l),n=n.sibling;n!==null;)jc(n,i,l),n=n.sibling}function Ty(n){var i=n.stateNode,l=n.memoizedProps;try{for(var c=n.type,d=i.attributes;d.length;)i.removeAttributeNode(d[0]);Ht(i,c,l),i[Nt]=n,i[Bt]=l}catch(m){Je(n,n.return,m)}}var Ri=!1,_t=!1,yh=!1,My=typeof WeakSet=="function"?WeakSet:Set,kt=null;function nC(n,i){if(n=n.containerInfo,Bh=tu,n=$g(n),ud(n)){if("selectionStart"in n)var l={start:n.selectionStart,end:n.selectionEnd};else e:{l=(l=n.ownerDocument)&&l.defaultView||window;var c=l.getSelection&&l.getSelection();if(c&&c.rangeCount!==0){l=c.anchorNode;var d=c.anchorOffset,m=c.focusNode;c=c.focusOffset;try{l.nodeType,m.nodeType}catch{l=null;break e}var _=0,M=-1,U=-1,P=0,re=0,oe=n,W=null;t:for(;;){for(var ee;oe!==l||d!==0&&oe.nodeType!==3||(M=_+d),oe!==m||c!==0&&oe.nodeType!==3||(U=_+c),oe.nodeType===3&&(_+=oe.nodeValue.length),(ee=oe.firstChild)!==null;)W=oe,oe=ee;for(;;){if(oe===n)break t;if(W===l&&++P===d&&(M=_),W===m&&++re===c&&(U=_),(ee=oe.nextSibling)!==null)break;oe=W,W=oe.parentNode}oe=ee}l=M===-1||U===-1?null:{start:M,end:U}}else l=null}l=l||{start:0,end:0}}else l=null;for(Uh={focusedElem:n,selectionRange:l},tu=!1,kt=i;kt!==null;)if(i=kt,n=i.child,(i.subtreeFlags&1028)!==0&&n!==null)n.return=i,kt=n;else for(;kt!==null;){switch(i=kt,m=i.alternate,n=i.flags,i.tag){case 0:if((n&4)!==0&&(n=i.updateQueue,n=n!==null?n.events:null,n!==null))for(l=0;l<n.length;l++)d=n[l],d.ref.impl=d.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&m!==null){n=void 0,l=i,d=m.memoizedProps,m=m.memoizedState,c=l.stateNode;try{var me=pa(l.type,d);n=c.getSnapshotBeforeUpdate(me,m),c.__reactInternalSnapshotBeforeUpdate=n}catch(Ce){Je(l,l.return,Ce)}}break;case 3:if((n&1024)!==0){if(n=i.stateNode.containerInfo,l=n.nodeType,l===9)Vh(n);else if(l===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":Vh(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((n&1024)!==0)throw Error(a(163))}if(n=i.sibling,n!==null){n.return=i.return,kt=n;break}kt=i.return}}function Oy(n,i,l){var c=l.flags;switch(l.tag){case 0:case 11:case 15:ji(n,l),c&4&&zl(5,l);break;case 1:if(ji(n,l),c&4)if(n=l.stateNode,i===null)try{n.componentDidMount()}catch(_){Je(l,l.return,_)}else{var d=pa(l.type,i.memoizedProps);i=i.memoizedState;try{n.componentDidUpdate(d,i,n.__reactInternalSnapshotBeforeUpdate)}catch(_){Je(l,l.return,_)}}c&64&&Ey(l),c&512&&Ll(l,l.return);break;case 3:if(ji(n,l),c&64&&(n=l.updateQueue,n!==null)){if(i=null,l.child!==null)switch(l.child.tag){case 27:case 5:i=l.child.stateNode;break;case 1:i=l.child.stateNode}try{p0(n,i)}catch(_){Je(l,l.return,_)}}break;case 27:i===null&&c&4&&Ty(l);case 26:case 5:ji(n,l),i===null&&c&4&&Ay(l),c&512&&Ll(l,l.return);break;case 12:ji(n,l);break;case 31:ji(n,l),c&4&&Dy(n,l);break;case 13:ji(n,l),c&4&&jy(n,l),c&64&&(n=l.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(l=fC.bind(null,l),kC(n,l))));break;case 22:if(c=l.memoizedState!==null||Ri,!c){i=i!==null&&i.memoizedState!==null||_t,d=Ri;var m=_t;Ri=c,(_t=i)&&!m?zi(n,l,(l.subtreeFlags&8772)!==0):ji(n,l),Ri=d,_t=m}break;case 30:break;default:ji(n,l)}}function ky(n){var i=n.alternate;i!==null&&(n.alternate=null,ky(i)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(i=n.stateNode,i!==null&&sl(i)),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}var st=null,Wt=!1;function Di(n,i,l){for(l=l.child;l!==null;)Ry(n,i,l),l=l.sibling}function Ry(n,i,l){if(qt&&typeof qt.onCommitFiberUnmount=="function")try{qt.onCommitFiberUnmount(Qr,l)}catch{}switch(l.tag){case 26:_t||ti(l,i),Di(n,i,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:_t||ti(l,i);var c=st,d=Wt;Sr(l.type)&&(st=l.stateNode,Wt=!1),Di(n,i,l),Il(l.stateNode),st=c,Wt=d;break;case 5:_t||ti(l,i);case 6:if(c=st,d=Wt,st=null,Di(n,i,l),st=c,Wt=d,st!==null)if(Wt)try{(st.nodeType===9?st.body:st.nodeName==="HTML"?st.ownerDocument.body:st).removeChild(l.stateNode)}catch(m){Je(l,i,m)}else try{st.removeChild(l.stateNode)}catch(m){Je(l,i,m)}break;case 18:st!==null&&(Wt?(n=st,Ev(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,l.stateNode),bo(n)):Ev(st,l.stateNode));break;case 4:c=st,d=Wt,st=l.stateNode.containerInfo,Wt=!0,Di(n,i,l),st=c,Wt=d;break;case 0:case 11:case 14:case 15:gr(2,l,i),_t||gr(4,l,i),Di(n,i,l);break;case 1:_t||(ti(l,i),c=l.stateNode,typeof c.componentWillUnmount=="function"&&Cy(l,i,c)),Di(n,i,l);break;case 21:Di(n,i,l);break;case 22:_t=(c=_t)||l.memoizedState!==null,Di(n,i,l),_t=c;break;default:Di(n,i,l)}}function Dy(n,i){if(i.memoizedState===null&&(n=i.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{bo(n)}catch(l){Je(i,i.return,l)}}}function jy(n,i){if(i.memoizedState===null&&(n=i.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{bo(n)}catch(l){Je(i,i.return,l)}}function iC(n){switch(n.tag){case 31:case 13:case 19:var i=n.stateNode;return i===null&&(i=n.stateNode=new My),i;case 22:return n=n.stateNode,i=n._retryCache,i===null&&(i=n._retryCache=new My),i;default:throw Error(a(435,n.tag))}}function zc(n,i){var l=iC(n);i.forEach(function(c){if(!l.has(c)){l.add(c);var d=dC.bind(null,n,c);c.then(d,d)}})}function Jt(n,i){var l=i.deletions;if(l!==null)for(var c=0;c<l.length;c++){var d=l[c],m=n,_=i,M=_;e:for(;M!==null;){switch(M.tag){case 27:if(Sr(M.type)){st=M.stateNode,Wt=!1;break e}break;case 5:st=M.stateNode,Wt=!1;break e;case 3:case 4:st=M.stateNode.containerInfo,Wt=!0;break e}M=M.return}if(st===null)throw Error(a(160));Ry(m,_,d),st=null,Wt=!1,m=d.alternate,m!==null&&(m.return=null),d.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)zy(i,n),i=i.sibling}var Yn=null;function zy(n,i){var l=n.alternate,c=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:Jt(i,n),en(n),c&4&&(gr(3,n,n.return),zl(3,n),gr(5,n,n.return));break;case 1:Jt(i,n),en(n),c&512&&(_t||l===null||ti(l,l.return)),c&64&&Ri&&(n=n.updateQueue,n!==null&&(c=n.callbacks,c!==null&&(l=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=l===null?c:l.concat(c))));break;case 26:var d=Yn;if(Jt(i,n),en(n),c&512&&(_t||l===null||ti(l,l.return)),c&4){var m=l!==null?l.memoizedState:null;if(c=n.memoizedState,l===null)if(c===null)if(n.stateNode===null){e:{c=n.type,l=n.memoizedProps,d=d.ownerDocument||d;t:switch(c){case"title":m=d.getElementsByTagName("title")[0],(!m||m[Wr]||m[Nt]||m.namespaceURI==="http://www.w3.org/2000/svg"||m.hasAttribute("itemprop"))&&(m=d.createElement(c),d.head.insertBefore(m,d.querySelector("head > title"))),Ht(m,c,l),m[Nt]=n,vt(m),c=m;break e;case"link":var _=zv("link","href",d).get(c+(l.href||""));if(_){for(var M=0;M<_.length;M++)if(m=_[M],m.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&m.getAttribute("rel")===(l.rel==null?null:l.rel)&&m.getAttribute("title")===(l.title==null?null:l.title)&&m.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){_.splice(M,1);break t}}m=d.createElement(c),Ht(m,c,l),d.head.appendChild(m);break;case"meta":if(_=zv("meta","content",d).get(c+(l.content||""))){for(M=0;M<_.length;M++)if(m=_[M],m.getAttribute("content")===(l.content==null?null:""+l.content)&&m.getAttribute("name")===(l.name==null?null:l.name)&&m.getAttribute("property")===(l.property==null?null:l.property)&&m.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&m.getAttribute("charset")===(l.charSet==null?null:l.charSet)){_.splice(M,1);break t}}m=d.createElement(c),Ht(m,c,l),d.head.appendChild(m);break;default:throw Error(a(468,c))}m[Nt]=n,vt(m),c=m}n.stateNode=c}else Lv(d,n.type,n.stateNode);else n.stateNode=jv(d,c,n.memoizedProps);else m!==c?(m===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):m.count--,c===null?Lv(d,n.type,n.stateNode):jv(d,c,n.memoizedProps)):c===null&&n.stateNode!==null&&ph(n,n.memoizedProps,l.memoizedProps)}break;case 27:Jt(i,n),en(n),c&512&&(_t||l===null||ti(l,l.return)),l!==null&&c&4&&ph(n,n.memoizedProps,l.memoizedProps);break;case 5:if(Jt(i,n),en(n),c&512&&(_t||l===null||ti(l,l.return)),n.flags&32){d=n.stateNode;try{Va(d,"")}catch(me){Je(n,n.return,me)}}c&4&&n.stateNode!=null&&(d=n.memoizedProps,ph(n,d,l!==null?l.memoizedProps:d)),c&1024&&(yh=!0);break;case 6:if(Jt(i,n),en(n),c&4){if(n.stateNode===null)throw Error(a(162));c=n.memoizedProps,l=n.stateNode;try{l.nodeValue=c}catch(me){Je(n,n.return,me)}}break;case 3:if(Kc=null,d=Yn,Yn=Qc(i.containerInfo),Jt(i,n),Yn=d,en(n),c&4&&l!==null&&l.memoizedState.isDehydrated)try{bo(i.containerInfo)}catch(me){Je(n,n.return,me)}yh&&(yh=!1,Ly(n));break;case 4:c=Yn,Yn=Qc(n.stateNode.containerInfo),Jt(i,n),en(n),Yn=c;break;case 12:Jt(i,n),en(n);break;case 31:Jt(i,n),en(n),c&4&&(c=n.updateQueue,c!==null&&(n.updateQueue=null,zc(n,c)));break;case 13:Jt(i,n),en(n),n.child.flags&8192&&n.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Hc=Dt()),c&4&&(c=n.updateQueue,c!==null&&(n.updateQueue=null,zc(n,c)));break;case 22:d=n.memoizedState!==null;var U=l!==null&&l.memoizedState!==null,P=Ri,re=_t;if(Ri=P||d,_t=re||U,Jt(i,n),_t=re,Ri=P,en(n),c&8192)e:for(i=n.stateNode,i._visibility=d?i._visibility&-2:i._visibility|1,d&&(l===null||U||Ri||_t||ma(n)),l=null,i=n;;){if(i.tag===5||i.tag===26){if(l===null){U=l=i;try{if(m=U.stateNode,d)_=m.style,typeof _.setProperty=="function"?_.setProperty("display","none","important"):_.display="none";else{M=U.stateNode;var oe=U.memoizedProps.style,W=oe!=null&&oe.hasOwnProperty("display")?oe.display:null;M.style.display=W==null||typeof W=="boolean"?"":(""+W).trim()}}catch(me){Je(U,U.return,me)}}}else if(i.tag===6){if(l===null){U=i;try{U.stateNode.nodeValue=d?"":U.memoizedProps}catch(me){Je(U,U.return,me)}}}else if(i.tag===18){if(l===null){U=i;try{var ee=U.stateNode;d?Cv(ee,!0):Cv(U.stateNode,!1)}catch(me){Je(U,U.return,me)}}}else if((i.tag!==22&&i.tag!==23||i.memoizedState===null||i===n)&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===n)break e;for(;i.sibling===null;){if(i.return===null||i.return===n)break e;l===i&&(l=null),i=i.return}l===i&&(l=null),i.sibling.return=i.return,i=i.sibling}c&4&&(c=n.updateQueue,c!==null&&(l=c.retryQueue,l!==null&&(c.retryQueue=null,zc(n,l))));break;case 19:Jt(i,n),en(n),c&4&&(c=n.updateQueue,c!==null&&(n.updateQueue=null,zc(n,c)));break;case 30:break;case 21:break;default:Jt(i,n),en(n)}}function en(n){var i=n.flags;if(i&2){try{for(var l,c=n.return;c!==null;){if(Ny(c)){l=c;break}c=c.return}if(l==null)throw Error(a(160));switch(l.tag){case 27:var d=l.stateNode,m=mh(n);jc(n,m,d);break;case 5:var _=l.stateNode;l.flags&32&&(Va(_,""),l.flags&=-33);var M=mh(n);jc(n,M,_);break;case 3:case 4:var U=l.stateNode.containerInfo,P=mh(n);gh(n,P,U);break;default:throw Error(a(161))}}catch(re){Je(n,n.return,re)}n.flags&=-3}i&4096&&(n.flags&=-4097)}function Ly(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var i=n;Ly(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),n=n.sibling}}function ji(n,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)Oy(n,i.alternate,i),i=i.sibling}function ma(n){for(n=n.child;n!==null;){var i=n;switch(i.tag){case 0:case 11:case 14:case 15:gr(4,i,i.return),ma(i);break;case 1:ti(i,i.return);var l=i.stateNode;typeof l.componentWillUnmount=="function"&&Cy(i,i.return,l),ma(i);break;case 27:Il(i.stateNode);case 26:case 5:ti(i,i.return),ma(i);break;case 22:i.memoizedState===null&&ma(i);break;case 30:ma(i);break;default:ma(i)}n=n.sibling}}function zi(n,i,l){for(l=l&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var c=i.alternate,d=n,m=i,_=m.flags;switch(m.tag){case 0:case 11:case 15:zi(d,m,l),zl(4,m);break;case 1:if(zi(d,m,l),c=m,d=c.stateNode,typeof d.componentDidMount=="function")try{d.componentDidMount()}catch(P){Je(c,c.return,P)}if(c=m,d=c.updateQueue,d!==null){var M=c.stateNode;try{var U=d.shared.hiddenCallbacks;if(U!==null)for(d.shared.hiddenCallbacks=null,d=0;d<U.length;d++)h0(U[d],M)}catch(P){Je(c,c.return,P)}}l&&_&64&&Ey(m),Ll(m,m.return);break;case 27:Ty(m);case 26:case 5:zi(d,m,l),l&&c===null&&_&4&&Ay(m),Ll(m,m.return);break;case 12:zi(d,m,l);break;case 31:zi(d,m,l),l&&_&4&&Dy(d,m);break;case 13:zi(d,m,l),l&&_&4&&jy(d,m);break;case 22:m.memoizedState===null&&zi(d,m,l),Ll(m,m.return);break;case 30:break;default:zi(d,m,l)}i=i.sibling}}function vh(n,i){var l=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(l=n.memoizedState.cachePool.pool),n=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(n=i.memoizedState.cachePool.pool),n!==l&&(n!=null&&n.refCount++,l!=null&&_l(l))}function xh(n,i){n=null,i.alternate!==null&&(n=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==n&&(i.refCount++,n!=null&&_l(n))}function $n(n,i,l,c){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)Hy(n,i,l,c),i=i.sibling}function Hy(n,i,l,c){var d=i.flags;switch(i.tag){case 0:case 11:case 15:$n(n,i,l,c),d&2048&&zl(9,i);break;case 1:$n(n,i,l,c);break;case 3:$n(n,i,l,c),d&2048&&(n=null,i.alternate!==null&&(n=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==n&&(i.refCount++,n!=null&&_l(n)));break;case 12:if(d&2048){$n(n,i,l,c),n=i.stateNode;try{var m=i.memoizedProps,_=m.id,M=m.onPostCommit;typeof M=="function"&&M(_,i.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(U){Je(i,i.return,U)}}else $n(n,i,l,c);break;case 31:$n(n,i,l,c);break;case 13:$n(n,i,l,c);break;case 23:break;case 22:m=i.stateNode,_=i.alternate,i.memoizedState!==null?m._visibility&2?$n(n,i,l,c):Hl(n,i):m._visibility&2?$n(n,i,l,c):(m._visibility|=2,so(n,i,l,c,(i.subtreeFlags&10256)!==0||!1)),d&2048&&vh(_,i);break;case 24:$n(n,i,l,c),d&2048&&xh(i.alternate,i);break;default:$n(n,i,l,c)}}function so(n,i,l,c,d){for(d=d&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var m=n,_=i,M=l,U=c,P=_.flags;switch(_.tag){case 0:case 11:case 15:so(m,_,M,U,d),zl(8,_);break;case 23:break;case 22:var re=_.stateNode;_.memoizedState!==null?re._visibility&2?so(m,_,M,U,d):Hl(m,_):(re._visibility|=2,so(m,_,M,U,d)),d&&P&2048&&vh(_.alternate,_);break;case 24:so(m,_,M,U,d),d&&P&2048&&xh(_.alternate,_);break;default:so(m,_,M,U,d)}i=i.sibling}}function Hl(n,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var l=n,c=i,d=c.flags;switch(c.tag){case 22:Hl(l,c),d&2048&&vh(c.alternate,c);break;case 24:Hl(l,c),d&2048&&xh(c.alternate,c);break;default:Hl(l,c)}i=i.sibling}}var Bl=8192;function co(n,i,l){if(n.subtreeFlags&Bl)for(n=n.child;n!==null;)By(n,i,l),n=n.sibling}function By(n,i,l){switch(n.tag){case 26:co(n,i,l),n.flags&Bl&&n.memoizedState!==null&&qC(l,Yn,n.memoizedState,n.memoizedProps);break;case 5:co(n,i,l);break;case 3:case 4:var c=Yn;Yn=Qc(n.stateNode.containerInfo),co(n,i,l),Yn=c;break;case 22:n.memoizedState===null&&(c=n.alternate,c!==null&&c.memoizedState!==null?(c=Bl,Bl=16777216,co(n,i,l),Bl=c):co(n,i,l));break;default:co(n,i,l)}}function Uy(n){var i=n.alternate;if(i!==null&&(n=i.child,n!==null)){i.child=null;do i=n.sibling,n.sibling=null,n=i;while(n!==null)}}function Ul(n){var i=n.deletions;if((n.flags&16)!==0){if(i!==null)for(var l=0;l<i.length;l++){var c=i[l];kt=c,$y(c,n)}Uy(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)Yy(n),n=n.sibling}function Yy(n){switch(n.tag){case 0:case 11:case 15:Ul(n),n.flags&2048&&gr(9,n,n.return);break;case 3:Ul(n);break;case 12:Ul(n);break;case 22:var i=n.stateNode;n.memoizedState!==null&&i._visibility&2&&(n.return===null||n.return.tag!==13)?(i._visibility&=-3,Lc(n)):Ul(n);break;default:Ul(n)}}function Lc(n){var i=n.deletions;if((n.flags&16)!==0){if(i!==null)for(var l=0;l<i.length;l++){var c=i[l];kt=c,$y(c,n)}Uy(n)}for(n=n.child;n!==null;){switch(i=n,i.tag){case 0:case 11:case 15:gr(8,i,i.return),Lc(i);break;case 22:l=i.stateNode,l._visibility&2&&(l._visibility&=-3,Lc(i));break;default:Lc(i)}n=n.sibling}}function $y(n,i){for(;kt!==null;){var l=kt;switch(l.tag){case 0:case 11:case 15:gr(8,l,i);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var c=l.memoizedState.cachePool.pool;c!=null&&c.refCount++}break;case 24:_l(l.memoizedState.cache)}if(c=l.child,c!==null)c.return=l,kt=c;else e:for(l=n;kt!==null;){c=kt;var d=c.sibling,m=c.return;if(ky(c),c===l){kt=null;break e}if(d!==null){d.return=m,kt=d;break e}kt=m}}}var rC={getCacheForType:function(n){var i=zt(xt),l=i.data.get(n);return l===void 0&&(l=n(),i.data.set(n,l)),l},cacheSignal:function(){return zt(xt).controller.signal}},aC=typeof WeakMap=="function"?WeakMap:Map,Qe=0,rt=null,He=null,Ue=0,We=0,yn=null,yr=!1,uo=!1,bh=!1,Li=0,ht=0,vr=0,ga=0,wh=0,vn=0,fo=0,Yl=null,tn=null,_h=!1,Hc=0,Vy=0,Bc=1/0,Uc=null,xr=null,Tt=0,br=null,ho=null,Hi=0,Sh=0,Eh=null,qy=null,$l=0,Ch=null;function xn(){return(Qe&2)!==0&&Ue!==0?Ue&-Ue:k.T!==null?kh():qs()}function Gy(){if(vn===0)if((Ue&536870912)===0||$e){var n=La;La<<=1,(La&3932160)===0&&(La=262144),vn=n}else vn=536870912;return n=mn.current,n!==null&&(n.flags|=32),vn}function nn(n,i,l){(n===rt&&(We===2||We===9)||n.cancelPendingCommit!==null)&&(po(n,0),wr(n,Ue,vn,!1)),Kr(n,l),((Qe&2)===0||n!==rt)&&(n===rt&&((Qe&2)===0&&(ga|=l),ht===4&&wr(n,Ue,vn,!1)),ni(n))}function Iy(n,i,l){if((Qe&6)!==0)throw Error(a(327));var c=!l&&(i&127)===0&&(i&n.expiredLanes)===0||Pr(n,i),d=c?sC(n,i):Nh(n,i,!0),m=c;do{if(d===0){uo&&!c&&wr(n,i,0,!1);break}else{if(l=n.current.alternate,m&&!oC(l)){d=Nh(n,i,!1),m=!1;continue}if(d===2){if(m=i,n.errorRecoveryDisabledLanes&m)var _=0;else _=n.pendingLanes&-536870913,_=_!==0?_:_&536870912?536870912:0;if(_!==0){i=_;e:{var M=n;d=Yl;var U=M.current.memoizedState.isDehydrated;if(U&&(po(M,_).flags|=256),_=Nh(M,_,!1),_!==2){if(bh&&!U){M.errorRecoveryDisabledLanes|=m,ga|=m,d=4;break e}m=tn,tn=d,m!==null&&(tn===null?tn=m:tn.push.apply(tn,m))}d=_}if(m=!1,d!==2)continue}}if(d===1){po(n,0),wr(n,i,0,!0);break}e:{switch(c=n,m=d,m){case 0:case 1:throw Error(a(345));case 4:if((i&4194048)!==i)break;case 6:wr(c,i,vn,!yr);break e;case 2:tn=null;break;case 3:case 5:break;default:throw Error(a(329))}if((i&62914560)===i&&(d=Hc+300-Dt(),10<d)){if(wr(c,i,vn,!yr),Ba(c,0,!0)!==0)break e;Hi=i,c.timeoutHandle=_v(Zy.bind(null,c,l,tn,Uc,_h,i,vn,ga,fo,yr,m,"Throttled",-0,0),d);break e}Zy(c,l,tn,Uc,_h,i,vn,ga,fo,yr,m,null,-0,0)}}break}while(!0);ni(n)}function Zy(n,i,l,c,d,m,_,M,U,P,re,oe,W,ee){if(n.timeoutHandle=-1,oe=i.subtreeFlags,oe&8192||(oe&16785408)===16785408){oe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:_i},By(i,m,oe);var me=(m&62914560)===m?Hc-Dt():(m&4194048)===m?Vy-Dt():0;if(me=GC(oe,me),me!==null){Hi=m,n.cancelPendingCommit=me(ev.bind(null,n,i,m,l,c,d,_,M,U,re,oe,null,W,ee)),wr(n,m,_,!P);return}}ev(n,i,m,l,c,d,_,M,U)}function oC(n){for(var i=n;;){var l=i.tag;if((l===0||l===11||l===15)&&i.flags&16384&&(l=i.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var c=0;c<l.length;c++){var d=l[c],m=d.getSnapshot;d=d.value;try{if(!hn(m(),d))return!1}catch{return!1}}if(l=i.child,i.subtreeFlags&16384&&l!==null)l.return=i,i=l;else{if(i===n)break;for(;i.sibling===null;){if(i.return===null||i.return===n)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function wr(n,i,l,c){i&=~wh,i&=~ga,n.suspendedLanes|=i,n.pingedLanes&=~i,c&&(n.warmLanes|=i),c=n.expirationTimes;for(var d=i;0<d;){var m=31-Gt(d),_=1<<m;c[m]=-1,d&=~_}l!==0&&Ys(n,l,i)}function Yc(){return(Qe&6)===0?(Vl(0),!1):!0}function Ah(){if(He!==null){if(We===0)var n=He.return;else n=He,Ai=la=null,Vd(n),io=null,El=0,n=He;for(;n!==null;)Sy(n.alternate,n),n=n.return;He=null}}function po(n,i){var l=n.timeoutHandle;l!==-1&&(n.timeoutHandle=-1,AC(l)),l=n.cancelPendingCommit,l!==null&&(n.cancelPendingCommit=null,l()),Hi=0,Ah(),rt=n,He=l=Ei(n.current,null),Ue=i,We=0,yn=null,yr=!1,uo=Pr(n,i),bh=!1,fo=vn=wh=ga=vr=ht=0,tn=Yl=null,_h=!1,(i&8)!==0&&(i|=i&32);var c=n.entangledLanes;if(c!==0)for(n=n.entanglements,c&=i;0<c;){var d=31-Gt(c),m=1<<d;i|=n[d],c&=~m}return Li=i,lc(),l}function Xy(n,i){Re=null,k.H=Rl,i===no||i===mc?(i=c0(),We=3):i===Od?(i=c0(),We=4):We=i===rh?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,yn=i,He===null&&(ht=1,Mc(n,An(i,n.current)))}function Fy(){var n=mn.current;return n===null?!0:(Ue&4194048)===Ue?On===null:(Ue&62914560)===Ue||(Ue&536870912)!==0?n===On:!1}function Qy(){var n=k.H;return k.H=Rl,n===null?Rl:n}function Py(){var n=k.A;return k.A=rC,n}function $c(){ht=4,yr||(Ue&4194048)!==Ue&&mn.current!==null||(uo=!0),(vr&134217727)===0&&(ga&134217727)===0||rt===null||wr(rt,Ue,vn,!1)}function Nh(n,i,l){var c=Qe;Qe|=2;var d=Qy(),m=Py();(rt!==n||Ue!==i)&&(Uc=null,po(n,i)),i=!1;var _=ht;e:do try{if(We!==0&&He!==null){var M=He,U=yn;switch(We){case 8:Ah(),_=6;break e;case 3:case 2:case 9:case 6:mn.current===null&&(i=!0);var P=We;if(We=0,yn=null,mo(n,M,U,P),l&&uo){_=0;break e}break;default:P=We,We=0,yn=null,mo(n,M,U,P)}}lC(),_=ht;break}catch(re){Xy(n,re)}while(!0);return i&&n.shellSuspendCounter++,Ai=la=null,Qe=c,k.H=d,k.A=m,He===null&&(rt=null,Ue=0,lc()),_}function lC(){for(;He!==null;)Ky(He)}function sC(n,i){var l=Qe;Qe|=2;var c=Qy(),d=Py();rt!==n||Ue!==i?(Uc=null,Bc=Dt()+500,po(n,i)):uo=Pr(n,i);e:do try{if(We!==0&&He!==null){i=He;var m=yn;t:switch(We){case 1:We=0,yn=null,mo(n,i,m,1);break;case 2:case 9:if(l0(m)){We=0,yn=null,Wy(i);break}i=function(){We!==2&&We!==9||rt!==n||(We=7),ni(n)},m.then(i,i);break e;case 3:We=7;break e;case 4:We=5;break e;case 7:l0(m)?(We=0,yn=null,Wy(i)):(We=0,yn=null,mo(n,i,m,7));break;case 5:var _=null;switch(He.tag){case 26:_=He.memoizedState;case 5:case 27:var M=He;if(_?Hv(_):M.stateNode.complete){We=0,yn=null;var U=M.sibling;if(U!==null)He=U;else{var P=M.return;P!==null?(He=P,Vc(P)):He=null}break t}}We=0,yn=null,mo(n,i,m,5);break;case 6:We=0,yn=null,mo(n,i,m,6);break;case 8:Ah(),ht=6;break e;default:throw Error(a(462))}}cC();break}catch(re){Xy(n,re)}while(!0);return Ai=la=null,k.H=c,k.A=d,Qe=l,He!==null?0:(rt=null,Ue=0,lc(),ht)}function cC(){for(;He!==null&&!Zr();)Ky(He)}function Ky(n){var i=wy(n.alternate,n,Li);n.memoizedProps=n.pendingProps,i===null?Vc(n):He=i}function Wy(n){var i=n,l=i.alternate;switch(i.tag){case 15:case 0:i=my(l,i,i.pendingProps,i.type,void 0,Ue);break;case 11:i=my(l,i,i.pendingProps,i.type.render,i.ref,Ue);break;case 5:Vd(i);default:Sy(l,i),i=He=Pg(i,Li),i=wy(l,i,Li)}n.memoizedProps=n.pendingProps,i===null?Vc(n):He=i}function mo(n,i,l,c){Ai=la=null,Vd(i),io=null,El=0;var d=i.return;try{if(K2(n,d,i,l,Ue)){ht=1,Mc(n,An(l,n.current)),He=null;return}}catch(m){if(d!==null)throw He=d,m;ht=1,Mc(n,An(l,n.current)),He=null;return}i.flags&32768?($e||c===1?n=!0:uo||(Ue&536870912)!==0?n=!1:(yr=n=!0,(c===2||c===9||c===3||c===6)&&(c=mn.current,c!==null&&c.tag===13&&(c.flags|=16384))),Jy(i,n)):Vc(i)}function Vc(n){var i=n;do{if((i.flags&32768)!==0){Jy(i,yr);return}n=i.return;var l=eC(i.alternate,i,Li);if(l!==null){He=l;return}if(i=i.sibling,i!==null){He=i;return}He=i=n}while(i!==null);ht===0&&(ht=5)}function Jy(n,i){do{var l=tC(n.alternate,n);if(l!==null){l.flags&=32767,He=l;return}if(l=n.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!i&&(n=n.sibling,n!==null)){He=n;return}He=n=l}while(n!==null);ht=6,He=null}function ev(n,i,l,c,d,m,_,M,U){n.cancelPendingCommit=null;do qc();while(Tt!==0);if((Qe&6)!==0)throw Error(a(327));if(i!==null){if(i===n.current)throw Error(a(177));if(m=i.lanes|i.childLanes,m|=md,If(n,l,m,_,M,U),n===rt&&(He=rt=null,Ue=0),ho=i,br=n,Hi=l,Sh=m,Eh=d,qy=c,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,hC(Fr,function(){return av(),null})):(n.callbackNode=null,n.callbackPriority=0),c=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||c){c=k.T,k.T=null,d=B.p,B.p=2,_=Qe,Qe|=4;try{nC(n,i,l)}finally{Qe=_,B.p=d,k.T=c}}Tt=1,tv(),nv(),iv()}}function tv(){if(Tt===1){Tt=0;var n=br,i=ho,l=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||l){l=k.T,k.T=null;var c=B.p;B.p=2;var d=Qe;Qe|=4;try{zy(i,n);var m=Uh,_=$g(n.containerInfo),M=m.focusedElem,U=m.selectionRange;if(_!==M&&M&&M.ownerDocument&&Yg(M.ownerDocument.documentElement,M)){if(U!==null&&ud(M)){var P=U.start,re=U.end;if(re===void 0&&(re=P),"selectionStart"in M)M.selectionStart=P,M.selectionEnd=Math.min(re,M.value.length);else{var oe=M.ownerDocument||document,W=oe&&oe.defaultView||window;if(W.getSelection){var ee=W.getSelection(),me=M.textContent.length,Ce=Math.min(U.start,me),nt=U.end===void 0?Ce:Math.min(U.end,me);!ee.extend&&Ce>nt&&(_=nt,nt=Ce,Ce=_);var X=Ug(M,Ce),V=Ug(M,nt);if(X&&V&&(ee.rangeCount!==1||ee.anchorNode!==X.node||ee.anchorOffset!==X.offset||ee.focusNode!==V.node||ee.focusOffset!==V.offset)){var Q=oe.createRange();Q.setStart(X.node,X.offset),ee.removeAllRanges(),Ce>nt?(ee.addRange(Q),ee.extend(V.node,V.offset)):(Q.setEnd(V.node,V.offset),ee.addRange(Q))}}}}for(oe=[],ee=M;ee=ee.parentNode;)ee.nodeType===1&&oe.push({element:ee,left:ee.scrollLeft,top:ee.scrollTop});for(typeof M.focus=="function"&&M.focus(),M=0;M<oe.length;M++){var ae=oe[M];ae.element.scrollLeft=ae.left,ae.element.scrollTop=ae.top}}tu=!!Bh,Uh=Bh=null}finally{Qe=d,B.p=c,k.T=l}}n.current=i,Tt=2}}function nv(){if(Tt===2){Tt=0;var n=br,i=ho,l=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||l){l=k.T,k.T=null;var c=B.p;B.p=2;var d=Qe;Qe|=4;try{Oy(n,i.alternate,i)}finally{Qe=d,B.p=c,k.T=l}}Tt=3}}function iv(){if(Tt===4||Tt===3){Tt=0,Xr();var n=br,i=ho,l=Hi,c=qy;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?Tt=5:(Tt=0,ho=br=null,rv(n,n.pendingLanes));var d=n.pendingLanes;if(d===0&&(xr=null),ll(l),i=i.stateNode,qt&&typeof qt.onCommitFiberRoot=="function")try{qt.onCommitFiberRoot(Qr,i,void 0,(i.current.flags&128)===128)}catch{}if(c!==null){i=k.T,d=B.p,B.p=2,k.T=null;try{for(var m=n.onRecoverableError,_=0;_<c.length;_++){var M=c[_];m(M.value,{componentStack:M.stack})}}finally{k.T=i,B.p=d}}(Hi&3)!==0&&qc(),ni(n),d=n.pendingLanes,(l&261930)!==0&&(d&42)!==0?n===Ch?$l++:($l=0,Ch=n):$l=0,Vl(0)}}function rv(n,i){(n.pooledCacheLanes&=i)===0&&(i=n.pooledCache,i!=null&&(n.pooledCache=null,_l(i)))}function qc(){return tv(),nv(),iv(),av()}function av(){if(Tt!==5)return!1;var n=br,i=Sh;Sh=0;var l=ll(Hi),c=k.T,d=B.p;try{B.p=32>l?32:l,k.T=null,l=Eh,Eh=null;var m=br,_=Hi;if(Tt=0,ho=br=null,Hi=0,(Qe&6)!==0)throw Error(a(331));var M=Qe;if(Qe|=4,Yy(m.current),Hy(m,m.current,_,l),Qe=M,Vl(0,!1),qt&&typeof qt.onPostCommitFiberRoot=="function")try{qt.onPostCommitFiberRoot(Qr,m)}catch{}return!0}finally{B.p=d,k.T=c,rv(n,i)}}function ov(n,i,l){i=An(l,i),i=ih(n.stateNode,i,2),n=hr(n,i,2),n!==null&&(Kr(n,2),ni(n))}function Je(n,i,l){if(n.tag===3)ov(n,n,l);else for(;i!==null;){if(i.tag===3){ov(i,n,l);break}else if(i.tag===1){var c=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(xr===null||!xr.has(c))){n=An(l,n),l=ly(2),c=hr(i,l,2),c!==null&&(sy(l,c,i,n),Kr(c,2),ni(c));break}}i=i.return}}function Th(n,i,l){var c=n.pingCache;if(c===null){c=n.pingCache=new aC;var d=new Set;c.set(i,d)}else d=c.get(i),d===void 0&&(d=new Set,c.set(i,d));d.has(l)||(bh=!0,d.add(l),n=uC.bind(null,n,i,l),i.then(n,n))}function uC(n,i,l){var c=n.pingCache;c!==null&&c.delete(i),n.pingedLanes|=n.suspendedLanes&l,n.warmLanes&=~l,rt===n&&(Ue&l)===l&&(ht===4||ht===3&&(Ue&62914560)===Ue&&300>Dt()-Hc?(Qe&2)===0&&po(n,0):wh|=l,fo===Ue&&(fo=0)),ni(n)}function lv(n,i){i===0&&(i=Us()),n=ra(n,i),n!==null&&(Kr(n,i),ni(n))}function fC(n){var i=n.memoizedState,l=0;i!==null&&(l=i.retryLane),lv(n,l)}function dC(n,i){var l=0;switch(n.tag){case 31:case 13:var c=n.stateNode,d=n.memoizedState;d!==null&&(l=d.retryLane);break;case 19:c=n.stateNode;break;case 22:c=n.stateNode._retryCache;break;default:throw Error(a(314))}c!==null&&c.delete(i),lv(n,l)}function hC(n,i){return Hn(n,i)}var Gc=null,go=null,Mh=!1,Ic=!1,Oh=!1,_r=0;function ni(n){n!==go&&n.next===null&&(go===null?Gc=go=n:go=go.next=n),Ic=!0,Mh||(Mh=!0,mC())}function Vl(n,i){if(!Oh&&Ic){Oh=!0;do for(var l=!1,c=Gc;c!==null;){if(n!==0){var d=c.pendingLanes;if(d===0)var m=0;else{var _=c.suspendedLanes,M=c.pingedLanes;m=(1<<31-Gt(42|n)+1)-1,m&=d&~(_&~M),m=m&201326741?m&201326741|1:m?m|2:0}m!==0&&(l=!0,fv(c,m))}else m=Ue,m=Ba(c,c===rt?m:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(m&3)===0||Pr(c,m)||(l=!0,fv(c,m));c=c.next}while(l);Oh=!1}}function pC(){sv()}function sv(){Ic=Mh=!1;var n=0;_r!==0&&CC()&&(n=_r);for(var i=Dt(),l=null,c=Gc;c!==null;){var d=c.next,m=cv(c,i);m===0?(c.next=null,l===null?Gc=d:l.next=d,d===null&&(go=l)):(l=c,(n!==0||(m&3)!==0)&&(Ic=!0)),c=d}Tt!==0&&Tt!==5||Vl(n),_r!==0&&(_r=0)}function cv(n,i){for(var l=n.suspendedLanes,c=n.pingedLanes,d=n.expirationTimes,m=n.pendingLanes&-62914561;0<m;){var _=31-Gt(m),M=1<<_,U=d[_];U===-1?((M&l)===0||(M&c)!==0)&&(d[_]=Gf(M,i)):U<=i&&(n.expiredLanes|=M),m&=~M}if(i=rt,l=Ue,l=Ba(n,n===i?l:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),c=n.callbackNode,l===0||n===i&&(We===2||We===9)||n.cancelPendingCommit!==null)return c!==null&&c!==null&&gi(c),n.callbackNode=null,n.callbackPriority=0;if((l&3)===0||Pr(n,l)){if(i=l&-l,i===n.callbackPriority)return i;switch(c!==null&&gi(c),ll(l)){case 2:case 8:l=Ji;break;case 32:l=Fr;break;case 268435456:l=ja;break;default:l=Fr}return c=uv.bind(null,n),l=Hn(l,c),n.callbackPriority=i,n.callbackNode=l,i}return c!==null&&c!==null&&gi(c),n.callbackPriority=2,n.callbackNode=null,2}function uv(n,i){if(Tt!==0&&Tt!==5)return n.callbackNode=null,n.callbackPriority=0,null;var l=n.callbackNode;if(qc()&&n.callbackNode!==l)return null;var c=Ue;return c=Ba(n,n===rt?c:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),c===0?null:(Iy(n,c,i),cv(n,Dt()),n.callbackNode!=null&&n.callbackNode===l?uv.bind(null,n):null)}function fv(n,i){if(qc())return null;Iy(n,i,!0)}function mC(){NC(function(){(Qe&6)!==0?Hn(yi,pC):sv()})}function kh(){if(_r===0){var n=eo;n===0&&(n=za,za<<=1,(za&261888)===0&&(za=256)),_r=n}return _r}function dv(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:Js(""+n)}function hv(n,i){var l=i.ownerDocument.createElement("input");return l.name=i.name,l.value=i.value,n.id&&l.setAttribute("form",n.id),i.parentNode.insertBefore(l,i),n=new FormData(n),l.parentNode.removeChild(l),n}function gC(n,i,l,c,d){if(i==="submit"&&l&&l.stateNode===d){var m=dv((d[Bt]||null).action),_=c.submitter;_&&(i=(i=_[Bt]||null)?dv(i.formAction):_.getAttribute("formAction"),i!==null&&(m=i,_=null));var M=new ic("action","action",null,c,d);n.push({event:M,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if(_r!==0){var U=_?hv(d,_):new FormData(d);Kd(l,{pending:!0,data:U,method:d.method,action:m},null,U)}}else typeof m=="function"&&(M.preventDefault(),U=_?hv(d,_):new FormData(d),Kd(l,{pending:!0,data:U,method:d.method,action:m},m,U))},currentTarget:d}]})}}for(var Rh=0;Rh<pd.length;Rh++){var Dh=pd[Rh],yC=Dh.toLowerCase(),vC=Dh[0].toUpperCase()+Dh.slice(1);Un(yC,"on"+vC)}Un(Gg,"onAnimationEnd"),Un(Ig,"onAnimationIteration"),Un(Zg,"onAnimationStart"),Un("dblclick","onDoubleClick"),Un("focusin","onFocus"),Un("focusout","onBlur"),Un(j2,"onTransitionRun"),Un(z2,"onTransitionStart"),Un(L2,"onTransitionCancel"),Un(Xg,"onTransitionEnd"),rr("onMouseEnter",["mouseout","mouseover"]),rr("onMouseLeave",["mouseout","mouseover"]),rr("onPointerEnter",["pointerout","pointerover"]),rr("onPointerLeave",["pointerout","pointerover"]),bi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),bi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),bi("onBeforeInput",["compositionend","keypress","textInput","paste"]),bi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),bi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),bi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ql="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(" "),xC=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ql));function pv(n,i){i=(i&4)!==0;for(var l=0;l<n.length;l++){var c=n[l],d=c.event;c=c.listeners;e:{var m=void 0;if(i)for(var _=c.length-1;0<=_;_--){var M=c[_],U=M.instance,P=M.currentTarget;if(M=M.listener,U!==m&&d.isPropagationStopped())break e;m=M,d.currentTarget=P;try{m(d)}catch(re){oc(re)}d.currentTarget=null,m=U}else for(_=0;_<c.length;_++){if(M=c[_],U=M.instance,P=M.currentTarget,M=M.listener,U!==m&&d.isPropagationStopped())break e;m=M,d.currentTarget=P;try{m(d)}catch(re){oc(re)}d.currentTarget=null,m=U}}}}function Be(n,i){var l=i[Ua];l===void 0&&(l=i[Ua]=new Set);var c=n+"__bubble";l.has(c)||(mv(i,n,2,!1),l.add(c))}function jh(n,i,l){var c=0;i&&(c|=4),mv(l,n,c,i)}var Zc="_reactListening"+Math.random().toString(36).slice(2);function zh(n){if(!n[Zc]){n[Zc]=!0,Xs.forEach(function(l){l!=="selectionchange"&&(xC.has(l)||jh(l,!1,n),jh(l,!0,n))});var i=n.nodeType===9?n:n.ownerDocument;i===null||i[Zc]||(i[Zc]=!0,jh("selectionchange",!1,i))}}function mv(n,i,l,c){switch(Gv(i)){case 2:var d=XC;break;case 8:d=FC;break;default:d=Ph}l=d.bind(null,i,l,n),d=void 0,!td||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(d=!0),c?d!==void 0?n.addEventListener(i,l,{capture:!0,passive:d}):n.addEventListener(i,l,!0):d!==void 0?n.addEventListener(i,l,{passive:d}):n.addEventListener(i,l,!1)}function Lh(n,i,l,c,d){var m=c;if((i&1)===0&&(i&2)===0&&c!==null)e:for(;;){if(c===null)return;var _=c.tag;if(_===3||_===4){var M=c.stateNode.containerInfo;if(M===d)break;if(_===4)for(_=c.return;_!==null;){var U=_.tag;if((U===3||U===4)&&_.stateNode.containerInfo===d)return;_=_.return}for(;M!==null;){if(_=er(M),_===null)return;if(U=_.tag,U===5||U===6||U===26||U===27){c=m=_;continue e}M=M.parentNode}}c=c.return}bg(function(){var P=m,re=Jf(l),oe=[];e:{var W=Fg.get(n);if(W!==void 0){var ee=ic,me=n;switch(n){case"keypress":if(tc(l)===0)break e;case"keydown":case"keyup":ee=d2;break;case"focusin":me="focus",ee=ad;break;case"focusout":me="blur",ee=ad;break;case"beforeblur":case"afterblur":ee=ad;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ee=Sg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ee=e2;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ee=m2;break;case Gg:case Ig:case Zg:ee=i2;break;case Xg:ee=y2;break;case"scroll":case"scrollend":ee=WE;break;case"wheel":ee=x2;break;case"copy":case"cut":case"paste":ee=a2;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ee=Cg;break;case"toggle":case"beforetoggle":ee=w2}var Ce=(i&4)!==0,nt=!Ce&&(n==="scroll"||n==="scrollend"),X=Ce?W!==null?W+"Capture":null:W;Ce=[];for(var V=P,Q;V!==null;){var ae=V;if(Q=ae.stateNode,ae=ae.tag,ae!==5&&ae!==26&&ae!==27||Q===null||X===null||(ae=fl(V,X),ae!=null&&Ce.push(Gl(V,ae,Q))),nt)break;V=V.return}0<Ce.length&&(W=new ee(W,me,null,l,re),oe.push({event:W,listeners:Ce}))}}if((i&7)===0){e:{if(W=n==="mouseover"||n==="pointerover",ee=n==="mouseout"||n==="pointerout",W&&l!==Wf&&(me=l.relatedTarget||l.fromElement)&&(er(me)||me[xi]))break e;if((ee||W)&&(W=re.window===re?re:(W=re.ownerDocument)?W.defaultView||W.parentWindow:window,ee?(me=l.relatedTarget||l.toElement,ee=P,me=me?er(me):null,me!==null&&(nt=s(me),Ce=me.tag,me!==nt||Ce!==5&&Ce!==27&&Ce!==6)&&(me=null)):(ee=null,me=P),ee!==me)){if(Ce=Sg,ae="onMouseLeave",X="onMouseEnter",V="mouse",(n==="pointerout"||n==="pointerover")&&(Ce=Cg,ae="onPointerLeave",X="onPointerEnter",V="pointer"),nt=ee==null?W:nr(ee),Q=me==null?W:nr(me),W=new Ce(ae,V+"leave",ee,l,re),W.target=nt,W.relatedTarget=Q,ae=null,er(re)===P&&(Ce=new Ce(X,V+"enter",me,l,re),Ce.target=Q,Ce.relatedTarget=nt,ae=Ce),nt=ae,ee&&me)t:{for(Ce=bC,X=ee,V=me,Q=0,ae=X;ae;ae=Ce(ae))Q++;ae=0;for(var Se=V;Se;Se=Ce(Se))ae++;for(;0<Q-ae;)X=Ce(X),Q--;for(;0<ae-Q;)V=Ce(V),ae--;for(;Q--;){if(X===V||V!==null&&X===V.alternate){Ce=X;break t}X=Ce(X),V=Ce(V)}Ce=null}else Ce=null;ee!==null&&gv(oe,W,ee,Ce,!1),me!==null&&nt!==null&&gv(oe,nt,me,Ce,!0)}}e:{if(W=P?nr(P):window,ee=W.nodeName&&W.nodeName.toLowerCase(),ee==="select"||ee==="input"&&W.type==="file")var Ie=Dg;else if(kg(W))if(jg)Ie=k2;else{Ie=M2;var ve=T2}else ee=W.nodeName,!ee||ee.toLowerCase()!=="input"||W.type!=="checkbox"&&W.type!=="radio"?P&&Kf(P.elementType)&&(Ie=Dg):Ie=O2;if(Ie&&(Ie=Ie(n,P))){Rg(oe,Ie,l,re);break e}ve&&ve(n,W,P),n==="focusout"&&P&&W.type==="number"&&P.memoizedProps.value!=null&&ul(W,"number",W.value)}switch(ve=P?nr(P):window,n){case"focusin":(kg(ve)||ve.contentEditable==="true")&&(Za=ve,fd=P,xl=null);break;case"focusout":xl=fd=Za=null;break;case"mousedown":dd=!0;break;case"contextmenu":case"mouseup":case"dragend":dd=!1,Vg(oe,l,re);break;case"selectionchange":if(D2)break;case"keydown":case"keyup":Vg(oe,l,re)}var De;if(ld)e:{switch(n){case"compositionstart":var Ye="onCompositionStart";break e;case"compositionend":Ye="onCompositionEnd";break e;case"compositionupdate":Ye="onCompositionUpdate";break e}Ye=void 0}else Ia?Mg(n,l)&&(Ye="onCompositionEnd"):n==="keydown"&&l.keyCode===229&&(Ye="onCompositionStart");Ye&&(Ag&&l.locale!=="ko"&&(Ia||Ye!=="onCompositionStart"?Ye==="onCompositionEnd"&&Ia&&(De=wg()):(or=re,nd="value"in or?or.value:or.textContent,Ia=!0)),ve=Xc(P,Ye),0<ve.length&&(Ye=new Eg(Ye,n,null,l,re),oe.push({event:Ye,listeners:ve}),De?Ye.data=De:(De=Og(l),De!==null&&(Ye.data=De)))),(De=S2?E2(n,l):C2(n,l))&&(Ye=Xc(P,"onBeforeInput"),0<Ye.length&&(ve=new Eg("onBeforeInput","beforeinput",null,l,re),oe.push({event:ve,listeners:Ye}),ve.data=De)),gC(oe,n,P,l,re)}pv(oe,i)})}function Gl(n,i,l){return{instance:n,listener:i,currentTarget:l}}function Xc(n,i){for(var l=i+"Capture",c=[];n!==null;){var d=n,m=d.stateNode;if(d=d.tag,d!==5&&d!==26&&d!==27||m===null||(d=fl(n,l),d!=null&&c.unshift(Gl(n,d,m)),d=fl(n,i),d!=null&&c.push(Gl(n,d,m))),n.tag===3)return c;n=n.return}return[]}function bC(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function gv(n,i,l,c,d){for(var m=i._reactName,_=[];l!==null&&l!==c;){var M=l,U=M.alternate,P=M.stateNode;if(M=M.tag,U!==null&&U===c)break;M!==5&&M!==26&&M!==27||P===null||(U=P,d?(P=fl(l,m),P!=null&&_.unshift(Gl(l,P,U))):d||(P=fl(l,m),P!=null&&_.push(Gl(l,P,U)))),l=l.return}_.length!==0&&n.push({event:i,listeners:_})}var wC=/\r\n?/g,_C=/\u0000|\uFFFD/g;function yv(n){return(typeof n=="string"?n:""+n).replace(wC,`
|
|
49
|
+
`).replace(_C,"")}function vv(n,i){return i=yv(i),yv(n)===i}function tt(n,i,l,c,d,m){switch(l){case"children":typeof c=="string"?i==="body"||i==="textarea"&&c===""||Va(n,c):(typeof c=="number"||typeof c=="bigint")&&i!=="body"&&Va(n,""+c);break;case"className":$a(n,"class",c);break;case"tabIndex":$a(n,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":$a(n,l,c);break;case"style":vg(n,c,m);break;case"data":if(i!=="object"){$a(n,"data",c);break}case"src":case"href":if(c===""&&(i!=="a"||l!=="href")){n.removeAttribute(l);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){n.removeAttribute(l);break}c=Js(""+c),n.setAttribute(l,c);break;case"action":case"formAction":if(typeof c=="function"){n.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof m=="function"&&(l==="formAction"?(i!=="input"&&tt(n,i,"name",d.name,d,null),tt(n,i,"formEncType",d.formEncType,d,null),tt(n,i,"formMethod",d.formMethod,d,null),tt(n,i,"formTarget",d.formTarget,d,null)):(tt(n,i,"encType",d.encType,d,null),tt(n,i,"method",d.method,d,null),tt(n,i,"target",d.target,d,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){n.removeAttribute(l);break}c=Js(""+c),n.setAttribute(l,c);break;case"onClick":c!=null&&(n.onclick=_i);break;case"onScroll":c!=null&&Be("scroll",n);break;case"onScrollEnd":c!=null&&Be("scrollend",n);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(a(61));if(l=c.__html,l!=null){if(d.children!=null)throw Error(a(60));n.innerHTML=l}}break;case"multiple":n.multiple=c&&typeof c!="function"&&typeof c!="symbol";break;case"muted":n.muted=c&&typeof c!="function"&&typeof c!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(c==null||typeof c=="function"||typeof c=="boolean"||typeof c=="symbol"){n.removeAttribute("xlink:href");break}l=Js(""+c),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":c!=null&&typeof c!="function"&&typeof c!="symbol"?n.setAttribute(l,""+c):n.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":c&&typeof c!="function"&&typeof c!="symbol"?n.setAttribute(l,""):n.removeAttribute(l);break;case"capture":case"download":c===!0?n.setAttribute(l,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?n.setAttribute(l,c):n.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?n.setAttribute(l,c):n.removeAttribute(l);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?n.removeAttribute(l):n.setAttribute(l,c);break;case"popover":Be("beforetoggle",n),Be("toggle",n),Ya(n,"popover",c);break;case"xlinkActuate":Bn(n,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":Bn(n,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":Bn(n,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":Bn(n,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":Bn(n,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":Bn(n,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":Bn(n,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":Bn(n,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":Bn(n,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":Ya(n,"is",c);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=PE.get(l)||l,Ya(n,l,c))}}function Hh(n,i,l,c,d,m){switch(l){case"style":vg(n,c,m);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(a(61));if(l=c.__html,l!=null){if(d.children!=null)throw Error(a(60));n.innerHTML=l}}break;case"children":typeof c=="string"?Va(n,c):(typeof c=="number"||typeof c=="bigint")&&Va(n,""+c);break;case"onScroll":c!=null&&Be("scroll",n);break;case"onScrollEnd":c!=null&&Be("scrollend",n);break;case"onClick":c!=null&&(n.onclick=_i);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Fs.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(d=l.endsWith("Capture"),i=l.slice(2,d?l.length-7:void 0),m=n[Bt]||null,m=m!=null?m[l]:null,typeof m=="function"&&n.removeEventListener(i,m,d),typeof c=="function")){typeof m!="function"&&m!==null&&(l in n?n[l]=null:n.hasAttribute(l)&&n.removeAttribute(l)),n.addEventListener(i,c,d);break e}l in n?n[l]=c:c===!0?n.setAttribute(l,""):Ya(n,l,c)}}}function Ht(n,i,l){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Be("error",n),Be("load",n);var c=!1,d=!1,m;for(m in l)if(l.hasOwnProperty(m)){var _=l[m];if(_!=null)switch(m){case"src":c=!0;break;case"srcSet":d=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:tt(n,i,m,_,l,null)}}d&&tt(n,i,"srcSet",l.srcSet,l,null),c&&tt(n,i,"src",l.src,l,null);return;case"input":Be("invalid",n);var M=m=_=d=null,U=null,P=null;for(c in l)if(l.hasOwnProperty(c)){var re=l[c];if(re!=null)switch(c){case"name":d=re;break;case"type":_=re;break;case"checked":U=re;break;case"defaultChecked":P=re;break;case"value":m=re;break;case"defaultValue":M=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(a(137,i));break;default:tt(n,i,c,re,l,null)}}Ws(n,m,M,U,P,_,d,!1);return;case"select":Be("invalid",n),c=_=m=null;for(d in l)if(l.hasOwnProperty(d)&&(M=l[d],M!=null))switch(d){case"value":m=M;break;case"defaultValue":_=M;break;case"multiple":c=M;default:tt(n,i,d,M,l,null)}i=m,l=_,n.multiple=!!c,i!=null?wi(n,!!c,i,!1):l!=null&&wi(n,!!c,l,!0);return;case"textarea":Be("invalid",n),m=d=c=null;for(_ in l)if(l.hasOwnProperty(_)&&(M=l[_],M!=null))switch(_){case"value":c=M;break;case"defaultValue":d=M;break;case"children":m=M;break;case"dangerouslySetInnerHTML":if(M!=null)throw Error(a(91));break;default:tt(n,i,_,M,l,null)}gg(n,c,d,m);return;case"option":for(U in l)if(l.hasOwnProperty(U)&&(c=l[U],c!=null))switch(U){case"selected":n.selected=c&&typeof c!="function"&&typeof c!="symbol";break;default:tt(n,i,U,c,l,null)}return;case"dialog":Be("beforetoggle",n),Be("toggle",n),Be("cancel",n),Be("close",n);break;case"iframe":case"object":Be("load",n);break;case"video":case"audio":for(c=0;c<ql.length;c++)Be(ql[c],n);break;case"image":Be("error",n),Be("load",n);break;case"details":Be("toggle",n);break;case"embed":case"source":case"link":Be("error",n),Be("load",n);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(P in l)if(l.hasOwnProperty(P)&&(c=l[P],c!=null))switch(P){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:tt(n,i,P,c,l,null)}return;default:if(Kf(i)){for(re in l)l.hasOwnProperty(re)&&(c=l[re],c!==void 0&&Hh(n,i,re,c,l,void 0));return}}for(M in l)l.hasOwnProperty(M)&&(c=l[M],c!=null&&tt(n,i,M,c,l,null))}function SC(n,i,l,c){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var d=null,m=null,_=null,M=null,U=null,P=null,re=null;for(ee in l){var oe=l[ee];if(l.hasOwnProperty(ee)&&oe!=null)switch(ee){case"checked":break;case"value":break;case"defaultValue":U=oe;default:c.hasOwnProperty(ee)||tt(n,i,ee,null,c,oe)}}for(var W in c){var ee=c[W];if(oe=l[W],c.hasOwnProperty(W)&&(ee!=null||oe!=null))switch(W){case"type":m=ee;break;case"name":d=ee;break;case"checked":P=ee;break;case"defaultChecked":re=ee;break;case"value":_=ee;break;case"defaultValue":M=ee;break;case"children":case"dangerouslySetInnerHTML":if(ee!=null)throw Error(a(137,i));break;default:ee!==oe&&tt(n,i,W,ee,c,oe)}}ea(n,_,M,U,P,re,m,d);return;case"select":ee=_=M=W=null;for(m in l)if(U=l[m],l.hasOwnProperty(m)&&U!=null)switch(m){case"value":break;case"multiple":ee=U;default:c.hasOwnProperty(m)||tt(n,i,m,null,c,U)}for(d in c)if(m=c[d],U=l[d],c.hasOwnProperty(d)&&(m!=null||U!=null))switch(d){case"value":W=m;break;case"defaultValue":M=m;break;case"multiple":_=m;default:m!==U&&tt(n,i,d,m,c,U)}i=M,l=_,c=ee,W!=null?wi(n,!!l,W,!1):!!c!=!!l&&(i!=null?wi(n,!!l,i,!0):wi(n,!!l,l?[]:"",!1));return;case"textarea":ee=W=null;for(M in l)if(d=l[M],l.hasOwnProperty(M)&&d!=null&&!c.hasOwnProperty(M))switch(M){case"value":break;case"children":break;default:tt(n,i,M,null,c,d)}for(_ in c)if(d=c[_],m=l[_],c.hasOwnProperty(_)&&(d!=null||m!=null))switch(_){case"value":W=d;break;case"defaultValue":ee=d;break;case"children":break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(a(91));break;default:d!==m&&tt(n,i,_,d,c,m)}mg(n,W,ee);return;case"option":for(var me in l)if(W=l[me],l.hasOwnProperty(me)&&W!=null&&!c.hasOwnProperty(me))switch(me){case"selected":n.selected=!1;break;default:tt(n,i,me,null,c,W)}for(U in c)if(W=c[U],ee=l[U],c.hasOwnProperty(U)&&W!==ee&&(W!=null||ee!=null))switch(U){case"selected":n.selected=W&&typeof W!="function"&&typeof W!="symbol";break;default:tt(n,i,U,W,c,ee)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Ce in l)W=l[Ce],l.hasOwnProperty(Ce)&&W!=null&&!c.hasOwnProperty(Ce)&&tt(n,i,Ce,null,c,W);for(P in c)if(W=c[P],ee=l[P],c.hasOwnProperty(P)&&W!==ee&&(W!=null||ee!=null))switch(P){case"children":case"dangerouslySetInnerHTML":if(W!=null)throw Error(a(137,i));break;default:tt(n,i,P,W,c,ee)}return;default:if(Kf(i)){for(var nt in l)W=l[nt],l.hasOwnProperty(nt)&&W!==void 0&&!c.hasOwnProperty(nt)&&Hh(n,i,nt,void 0,c,W);for(re in c)W=c[re],ee=l[re],!c.hasOwnProperty(re)||W===ee||W===void 0&&ee===void 0||Hh(n,i,re,W,c,ee);return}}for(var X in l)W=l[X],l.hasOwnProperty(X)&&W!=null&&!c.hasOwnProperty(X)&&tt(n,i,X,null,c,W);for(oe in c)W=c[oe],ee=l[oe],!c.hasOwnProperty(oe)||W===ee||W==null&&ee==null||tt(n,i,oe,W,c,ee)}function xv(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function EC(){if(typeof performance.getEntriesByType=="function"){for(var n=0,i=0,l=performance.getEntriesByType("resource"),c=0;c<l.length;c++){var d=l[c],m=d.transferSize,_=d.initiatorType,M=d.duration;if(m&&M&&xv(_)){for(_=0,M=d.responseEnd,c+=1;c<l.length;c++){var U=l[c],P=U.startTime;if(P>M)break;var re=U.transferSize,oe=U.initiatorType;re&&xv(oe)&&(U=U.responseEnd,_+=re*(U<M?1:(M-P)/(U-P)))}if(--c,i+=8*(m+_)/(d.duration/1e3),n++,10<n)break}}if(0<n)return i/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?n:5}var Bh=null,Uh=null;function Fc(n){return n.nodeType===9?n:n.ownerDocument}function bv(n){switch(n){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function wv(n,i){if(n===0)switch(i){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&i==="foreignObject"?0:n}function Yh(n,i){return n==="textarea"||n==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.children=="bigint"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var $h=null;function CC(){var n=window.event;return n&&n.type==="popstate"?n===$h?!1:($h=n,!0):($h=null,!1)}var _v=typeof setTimeout=="function"?setTimeout:void 0,AC=typeof clearTimeout=="function"?clearTimeout:void 0,Sv=typeof Promise=="function"?Promise:void 0,NC=typeof queueMicrotask=="function"?queueMicrotask:typeof Sv<"u"?function(n){return Sv.resolve(null).then(n).catch(TC)}:_v;function TC(n){setTimeout(function(){throw n})}function Sr(n){return n==="head"}function Ev(n,i){var l=i,c=0;do{var d=l.nextSibling;if(n.removeChild(l),d&&d.nodeType===8)if(l=d.data,l==="/$"||l==="/&"){if(c===0){n.removeChild(d),bo(i);return}c--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")c++;else if(l==="html")Il(n.ownerDocument.documentElement);else if(l==="head"){l=n.ownerDocument.head,Il(l);for(var m=l.firstChild;m;){var _=m.nextSibling,M=m.nodeName;m[Wr]||M==="SCRIPT"||M==="STYLE"||M==="LINK"&&m.rel.toLowerCase()==="stylesheet"||l.removeChild(m),m=_}}else l==="body"&&Il(n.ownerDocument.body);l=d}while(l);bo(i)}function Cv(n,i){var l=n;n=0;do{var c=l.nextSibling;if(l.nodeType===1?i?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(i?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),c&&c.nodeType===8)if(l=c.data,l==="/$"){if(n===0)break;n--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||n++;l=c}while(l)}function Vh(n){var i=n.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var l=i;switch(i=i.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":Vh(l),sl(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}n.removeChild(l)}}function MC(n,i,l,c){for(;n.nodeType===1;){var d=l;if(n.nodeName.toLowerCase()!==i.toLowerCase()){if(!c&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(c){if(!n[Wr])switch(i){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(m=n.getAttribute("rel"),m==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(m!==d.rel||n.getAttribute("href")!==(d.href==null||d.href===""?null:d.href)||n.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin)||n.getAttribute("title")!==(d.title==null?null:d.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(m=n.getAttribute("src"),(m!==(d.src==null?null:d.src)||n.getAttribute("type")!==(d.type==null?null:d.type)||n.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin))&&m&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(i==="input"&&n.type==="hidden"){var m=d.name==null?null:""+d.name;if(d.type==="hidden"&&n.getAttribute("name")===m)return n}else return n;if(n=kn(n.nextSibling),n===null)break}return null}function OC(n,i,l){if(i==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!l||(n=kn(n.nextSibling),n===null))return null;return n}function Av(n,i){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!i||(n=kn(n.nextSibling),n===null))return null;return n}function qh(n){return n.data==="$?"||n.data==="$~"}function Gh(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function kC(n,i){var l=n.ownerDocument;if(n.data==="$~")n._reactRetry=i;else if(n.data!=="$?"||l.readyState!=="loading")i();else{var c=function(){i(),l.removeEventListener("DOMContentLoaded",c)};l.addEventListener("DOMContentLoaded",c),n._reactRetry=c}}function kn(n){for(;n!=null;n=n.nextSibling){var i=n.nodeType;if(i===1||i===3)break;if(i===8){if(i=n.data,i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"||i==="F!"||i==="F")break;if(i==="/$"||i==="/&")return null}}return n}var Ih=null;function Nv(n){n=n.nextSibling;for(var i=0;n;){if(n.nodeType===8){var l=n.data;if(l==="/$"||l==="/&"){if(i===0)return kn(n.nextSibling);i--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||i++}n=n.nextSibling}return null}function Tv(n){n=n.previousSibling;for(var i=0;n;){if(n.nodeType===8){var l=n.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(i===0)return n;i--}else l!=="/$"&&l!=="/&"||i++}n=n.previousSibling}return null}function Mv(n,i,l){switch(i=Fc(l),n){case"html":if(n=i.documentElement,!n)throw Error(a(452));return n;case"head":if(n=i.head,!n)throw Error(a(453));return n;case"body":if(n=i.body,!n)throw Error(a(454));return n;default:throw Error(a(451))}}function Il(n){for(var i=n.attributes;i.length;)n.removeAttributeNode(i[0]);sl(n)}var Rn=new Map,Ov=new Set;function Qc(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var Bi=B.d;B.d={f:RC,r:DC,D:jC,C:zC,L:LC,m:HC,X:UC,S:BC,M:YC};function RC(){var n=Bi.f(),i=Yc();return n||i}function DC(n){var i=tr(n);i!==null&&i.tag===5&&i.type==="form"?X0(i):Bi.r(n)}var yo=typeof document>"u"?null:document;function kv(n,i,l){var c=yo;if(c&&typeof i=="string"&&i){var d=Pt(i);d='link[rel="'+n+'"][href="'+d+'"]',typeof l=="string"&&(d+='[crossorigin="'+l+'"]'),Ov.has(d)||(Ov.add(d),n={rel:n,crossOrigin:l,href:i},c.querySelector(d)===null&&(i=c.createElement("link"),Ht(i,"link",n),vt(i),c.head.appendChild(i)))}}function jC(n){Bi.D(n),kv("dns-prefetch",n,null)}function zC(n,i){Bi.C(n,i),kv("preconnect",n,i)}function LC(n,i,l){Bi.L(n,i,l);var c=yo;if(c&&n&&i){var d='link[rel="preload"][as="'+Pt(i)+'"]';i==="image"&&l&&l.imageSrcSet?(d+='[imagesrcset="'+Pt(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(d+='[imagesizes="'+Pt(l.imageSizes)+'"]')):d+='[href="'+Pt(n)+'"]';var m=d;switch(i){case"style":m=vo(n);break;case"script":m=xo(n)}Rn.has(m)||(n=g({rel:"preload",href:i==="image"&&l&&l.imageSrcSet?void 0:n,as:i},l),Rn.set(m,n),c.querySelector(d)!==null||i==="style"&&c.querySelector(Zl(m))||i==="script"&&c.querySelector(Xl(m))||(i=c.createElement("link"),Ht(i,"link",n),vt(i),c.head.appendChild(i)))}}function HC(n,i){Bi.m(n,i);var l=yo;if(l&&n){var c=i&&typeof i.as=="string"?i.as:"script",d='link[rel="modulepreload"][as="'+Pt(c)+'"][href="'+Pt(n)+'"]',m=d;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=xo(n)}if(!Rn.has(m)&&(n=g({rel:"modulepreload",href:n},i),Rn.set(m,n),l.querySelector(d)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Xl(m)))return}c=l.createElement("link"),Ht(c,"link",n),vt(c),l.head.appendChild(c)}}}function BC(n,i,l){Bi.S(n,i,l);var c=yo;if(c&&n){var d=ir(c).hoistableStyles,m=vo(n);i=i||"default";var _=d.get(m);if(!_){var M={loading:0,preload:null};if(_=c.querySelector(Zl(m)))M.loading=5;else{n=g({rel:"stylesheet",href:n,"data-precedence":i},l),(l=Rn.get(m))&&Zh(n,l);var U=_=c.createElement("link");vt(U),Ht(U,"link",n),U._p=new Promise(function(P,re){U.onload=P,U.onerror=re}),U.addEventListener("load",function(){M.loading|=1}),U.addEventListener("error",function(){M.loading|=2}),M.loading|=4,Pc(_,i,c)}_={type:"stylesheet",instance:_,count:1,state:M},d.set(m,_)}}}function UC(n,i){Bi.X(n,i);var l=yo;if(l&&n){var c=ir(l).hoistableScripts,d=xo(n),m=c.get(d);m||(m=l.querySelector(Xl(d)),m||(n=g({src:n,async:!0},i),(i=Rn.get(d))&&Xh(n,i),m=l.createElement("script"),vt(m),Ht(m,"link",n),l.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},c.set(d,m))}}function YC(n,i){Bi.M(n,i);var l=yo;if(l&&n){var c=ir(l).hoistableScripts,d=xo(n),m=c.get(d);m||(m=l.querySelector(Xl(d)),m||(n=g({src:n,async:!0,type:"module"},i),(i=Rn.get(d))&&Xh(n,i),m=l.createElement("script"),vt(m),Ht(m,"link",n),l.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},c.set(d,m))}}function Rv(n,i,l,c){var d=(d=fe.current)?Qc(d):null;if(!d)throw Error(a(446));switch(n){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(i=vo(l.href),l=ir(d).hoistableStyles,c=l.get(i),c||(c={type:"style",instance:null,count:0,state:null},l.set(i,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){n=vo(l.href);var m=ir(d).hoistableStyles,_=m.get(n);if(_||(d=d.ownerDocument||d,_={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},m.set(n,_),(m=d.querySelector(Zl(n)))&&!m._p&&(_.instance=m,_.state.loading=5),Rn.has(n)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Rn.set(n,l),m||$C(d,n,l,_.state))),i&&c===null)throw Error(a(528,""));return _}if(i&&c!==null)throw Error(a(529,""));return null;case"script":return i=l.async,l=l.src,typeof l=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=xo(l),l=ir(d).hoistableScripts,c=l.get(i),c||(c={type:"script",instance:null,count:0,state:null},l.set(i,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,n))}}function vo(n){return'href="'+Pt(n)+'"'}function Zl(n){return'link[rel="stylesheet"]['+n+"]"}function Dv(n){return g({},n,{"data-precedence":n.precedence,precedence:null})}function $C(n,i,l,c){n.querySelector('link[rel="preload"][as="style"]['+i+"]")?c.loading=1:(i=n.createElement("link"),c.preload=i,i.addEventListener("load",function(){return c.loading|=1}),i.addEventListener("error",function(){return c.loading|=2}),Ht(i,"link",l),vt(i),n.head.appendChild(i))}function xo(n){return'[src="'+Pt(n)+'"]'}function Xl(n){return"script[async]"+n}function jv(n,i,l){if(i.count++,i.instance===null)switch(i.type){case"style":var c=n.querySelector('style[data-href~="'+Pt(l.href)+'"]');if(c)return i.instance=c,vt(c),c;var d=g({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return c=(n.ownerDocument||n).createElement("style"),vt(c),Ht(c,"style",d),Pc(c,l.precedence,n),i.instance=c;case"stylesheet":d=vo(l.href);var m=n.querySelector(Zl(d));if(m)return i.state.loading|=4,i.instance=m,vt(m),m;c=Dv(l),(d=Rn.get(d))&&Zh(c,d),m=(n.ownerDocument||n).createElement("link"),vt(m);var _=m;return _._p=new Promise(function(M,U){_.onload=M,_.onerror=U}),Ht(m,"link",c),i.state.loading|=4,Pc(m,l.precedence,n),i.instance=m;case"script":return m=xo(l.src),(d=n.querySelector(Xl(m)))?(i.instance=d,vt(d),d):(c=l,(d=Rn.get(m))&&(c=g({},l),Xh(c,d)),n=n.ownerDocument||n,d=n.createElement("script"),vt(d),Ht(d,"link",c),n.head.appendChild(d),i.instance=d);case"void":return null;default:throw Error(a(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(c=i.instance,i.state.loading|=4,Pc(c,l.precedence,n));return i.instance}function Pc(n,i,l){for(var c=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),d=c.length?c[c.length-1]:null,m=d,_=0;_<c.length;_++){var M=c[_];if(M.dataset.precedence===i)m=M;else if(m!==d)break}m?m.parentNode.insertBefore(n,m.nextSibling):(i=l.nodeType===9?l.head:l,i.insertBefore(n,i.firstChild))}function Zh(n,i){n.crossOrigin==null&&(n.crossOrigin=i.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=i.referrerPolicy),n.title==null&&(n.title=i.title)}function Xh(n,i){n.crossOrigin==null&&(n.crossOrigin=i.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=i.referrerPolicy),n.integrity==null&&(n.integrity=i.integrity)}var Kc=null;function zv(n,i,l){if(Kc===null){var c=new Map,d=Kc=new Map;d.set(l,c)}else d=Kc,c=d.get(l),c||(c=new Map,d.set(l,c));if(c.has(n))return c;for(c.set(n,null),l=l.getElementsByTagName(n),d=0;d<l.length;d++){var m=l[d];if(!(m[Wr]||m[Nt]||n==="link"&&m.getAttribute("rel")==="stylesheet")&&m.namespaceURI!=="http://www.w3.org/2000/svg"){var _=m.getAttribute(i)||"";_=n+_;var M=c.get(_);M?M.push(m):c.set(_,[m])}}return c}function Lv(n,i,l){n=n.ownerDocument||n,n.head.insertBefore(l,i==="title"?n.querySelector("head > title"):null)}function VC(n,i,l){if(l===1||i.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof i.precedence!="string"||typeof i.href!="string"||i.href==="")break;return!0;case"link":if(typeof i.rel!="string"||typeof i.href!="string"||i.href===""||i.onLoad||i.onError)break;switch(i.rel){case"stylesheet":return n=i.disabled,typeof i.precedence=="string"&&n==null;default:return!0}case"script":if(i.async&&typeof i.async!="function"&&typeof i.async!="symbol"&&!i.onLoad&&!i.onError&&i.src&&typeof i.src=="string")return!0}return!1}function Hv(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function qC(n,i,l,c){if(l.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var d=vo(c.href),m=i.querySelector(Zl(d));if(m){i=m._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(n.count++,n=Wc.bind(n),i.then(n,n)),l.state.loading|=4,l.instance=m,vt(m);return}m=i.ownerDocument||i,c=Dv(c),(d=Rn.get(d))&&Zh(c,d),m=m.createElement("link"),vt(m);var _=m;_._p=new Promise(function(M,U){_.onload=M,_.onerror=U}),Ht(m,"link",c),l.instance=m}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(l,i),(i=l.state.preload)&&(l.state.loading&3)===0&&(n.count++,l=Wc.bind(n),i.addEventListener("load",l),i.addEventListener("error",l))}}var Fh=0;function GC(n,i){return n.stylesheets&&n.count===0&&eu(n,n.stylesheets),0<n.count||0<n.imgCount?function(l){var c=setTimeout(function(){if(n.stylesheets&&eu(n,n.stylesheets),n.unsuspend){var m=n.unsuspend;n.unsuspend=null,m()}},6e4+i);0<n.imgBytes&&Fh===0&&(Fh=62500*EC());var d=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&eu(n,n.stylesheets),n.unsuspend)){var m=n.unsuspend;n.unsuspend=null,m()}},(n.imgBytes>Fh?50:800)+i);return n.unsuspend=l,function(){n.unsuspend=null,clearTimeout(c),clearTimeout(d)}}:null}function Wc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)eu(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var Jc=null;function eu(n,i){n.stylesheets=null,n.unsuspend!==null&&(n.count++,Jc=new Map,i.forEach(IC,n),Jc=null,Wc.call(n))}function IC(n,i){if(!(i.state.loading&4)){var l=Jc.get(n);if(l)var c=l.get(null);else{l=new Map,Jc.set(n,l);for(var d=n.querySelectorAll("link[data-precedence],style[data-precedence]"),m=0;m<d.length;m++){var _=d[m];(_.nodeName==="LINK"||_.getAttribute("media")!=="not all")&&(l.set(_.dataset.precedence,_),c=_)}c&&l.set(null,c)}d=i.instance,_=d.getAttribute("data-precedence"),m=l.get(_)||c,m===c&&l.set(null,d),l.set(_,d),this.count++,c=Wc.bind(this),d.addEventListener("load",c),d.addEventListener("error",c),m?m.parentNode.insertBefore(d,m.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(d,n.firstChild)),i.state.loading|=4}}var Fl={$$typeof:A,Provider:null,Consumer:null,_currentValue:H,_currentValue2:H,_threadCount:0};function ZC(n,i,l,c,d,m,_,M,U){this.tag=1,this.containerInfo=n,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=al(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=al(0),this.hiddenUpdates=al(null),this.identifierPrefix=c,this.onUncaughtError=d,this.onCaughtError=m,this.onRecoverableError=_,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=U,this.incompleteTransitions=new Map}function Bv(n,i,l,c,d,m,_,M,U,P,re,oe){return n=new ZC(n,i,l,_,U,P,re,oe,M),i=1,m===!0&&(i|=24),m=pn(3,null,null,i),n.current=m,m.stateNode=n,i=Nd(),i.refCount++,n.pooledCache=i,i.refCount++,m.memoizedState={element:c,isDehydrated:l,cache:i},kd(m),n}function Uv(n){return n?(n=Qa,n):Qa}function Yv(n,i,l,c,d,m){d=Uv(d),c.context===null?c.context=d:c.pendingContext=d,c=dr(i),c.payload={element:l},m=m===void 0?null:m,m!==null&&(c.callback=m),l=hr(n,c,i),l!==null&&(nn(l,n,i),Al(l,n,i))}function $v(n,i){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var l=n.retryLane;n.retryLane=l!==0&&l<i?l:i}}function Qh(n,i){$v(n,i),(n=n.alternate)&&$v(n,i)}function Vv(n){if(n.tag===13||n.tag===31){var i=ra(n,67108864);i!==null&&nn(i,n,67108864),Qh(n,67108864)}}function qv(n){if(n.tag===13||n.tag===31){var i=xn();i=ol(i);var l=ra(n,i);l!==null&&nn(l,n,i),Qh(n,i)}}var tu=!0;function XC(n,i,l,c){var d=k.T;k.T=null;var m=B.p;try{B.p=2,Ph(n,i,l,c)}finally{B.p=m,k.T=d}}function FC(n,i,l,c){var d=k.T;k.T=null;var m=B.p;try{B.p=8,Ph(n,i,l,c)}finally{B.p=m,k.T=d}}function Ph(n,i,l,c){if(tu){var d=Kh(c);if(d===null)Lh(n,i,c,nu,l),Iv(n,c);else if(PC(d,n,i,l,c))c.stopPropagation();else if(Iv(n,c),i&4&&-1<QC.indexOf(n)){for(;d!==null;){var m=tr(d);if(m!==null)switch(m.tag){case 3:if(m=m.stateNode,m.current.memoizedState.isDehydrated){var _=vi(m.pendingLanes);if(_!==0){var M=m;for(M.pendingLanes|=2,M.entangledLanes|=2;_;){var U=1<<31-Gt(_);M.entanglements[1]|=U,_&=~U}ni(m),(Qe&6)===0&&(Bc=Dt()+500,Vl(0))}}break;case 31:case 13:M=ra(m,2),M!==null&&nn(M,m,2),Yc(),Qh(m,2)}if(m=Kh(c),m===null&&Lh(n,i,c,nu,l),m===d)break;d=m}d!==null&&c.stopPropagation()}else Lh(n,i,c,null,l)}}function Kh(n){return n=Jf(n),Wh(n)}var nu=null;function Wh(n){if(nu=null,n=er(n),n!==null){var i=s(n);if(i===null)n=null;else{var l=i.tag;if(l===13){if(n=u(i),n!==null)return n;n=null}else if(l===31){if(n=f(i),n!==null)return n;n=null}else if(l===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;n=null}else i!==n&&(n=null)}}return nu=n,null}function Gv(n){switch(n){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Da()){case yi:return 2;case Ji:return 8;case Fr:case Bf:return 32;case ja:return 268435456;default:return 32}default:return 32}}var Jh=!1,Er=null,Cr=null,Ar=null,Ql=new Map,Pl=new Map,Nr=[],QC="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".split(" ");function Iv(n,i){switch(n){case"focusin":case"focusout":Er=null;break;case"dragenter":case"dragleave":Cr=null;break;case"mouseover":case"mouseout":Ar=null;break;case"pointerover":case"pointerout":Ql.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":Pl.delete(i.pointerId)}}function Kl(n,i,l,c,d,m){return n===null||n.nativeEvent!==m?(n={blockedOn:i,domEventName:l,eventSystemFlags:c,nativeEvent:m,targetContainers:[d]},i!==null&&(i=tr(i),i!==null&&Vv(i)),n):(n.eventSystemFlags|=c,i=n.targetContainers,d!==null&&i.indexOf(d)===-1&&i.push(d),n)}function PC(n,i,l,c,d){switch(i){case"focusin":return Er=Kl(Er,n,i,l,c,d),!0;case"dragenter":return Cr=Kl(Cr,n,i,l,c,d),!0;case"mouseover":return Ar=Kl(Ar,n,i,l,c,d),!0;case"pointerover":var m=d.pointerId;return Ql.set(m,Kl(Ql.get(m)||null,n,i,l,c,d)),!0;case"gotpointercapture":return m=d.pointerId,Pl.set(m,Kl(Pl.get(m)||null,n,i,l,c,d)),!0}return!1}function Zv(n){var i=er(n.target);if(i!==null){var l=s(i);if(l!==null){if(i=l.tag,i===13){if(i=u(l),i!==null){n.blockedOn=i,Gs(n.priority,function(){qv(l)});return}}else if(i===31){if(i=f(l),i!==null){n.blockedOn=i,Gs(n.priority,function(){qv(l)});return}}else if(i===3&&l.stateNode.current.memoizedState.isDehydrated){n.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}n.blockedOn=null}function iu(n){if(n.blockedOn!==null)return!1;for(var i=n.targetContainers;0<i.length;){var l=Kh(n.nativeEvent);if(l===null){l=n.nativeEvent;var c=new l.constructor(l.type,l);Wf=c,l.target.dispatchEvent(c),Wf=null}else return i=tr(l),i!==null&&Vv(i),n.blockedOn=l,!1;i.shift()}return!0}function Xv(n,i,l){iu(n)&&l.delete(i)}function KC(){Jh=!1,Er!==null&&iu(Er)&&(Er=null),Cr!==null&&iu(Cr)&&(Cr=null),Ar!==null&&iu(Ar)&&(Ar=null),Ql.forEach(Xv),Pl.forEach(Xv)}function ru(n,i){n.blockedOn===i&&(n.blockedOn=null,Jh||(Jh=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,KC)))}var au=null;function Fv(n){au!==n&&(au=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){au===n&&(au=null);for(var i=0;i<n.length;i+=3){var l=n[i],c=n[i+1],d=n[i+2];if(typeof c!="function"){if(Wh(c||l)===null)continue;break}var m=tr(l);m!==null&&(n.splice(i,3),i-=3,Kd(m,{pending:!0,data:d,method:l.method,action:c},c,d))}}))}function bo(n){function i(U){return ru(U,n)}Er!==null&&ru(Er,n),Cr!==null&&ru(Cr,n),Ar!==null&&ru(Ar,n),Ql.forEach(i),Pl.forEach(i);for(var l=0;l<Nr.length;l++){var c=Nr[l];c.blockedOn===n&&(c.blockedOn=null)}for(;0<Nr.length&&(l=Nr[0],l.blockedOn===null);)Zv(l),l.blockedOn===null&&Nr.shift();if(l=(n.ownerDocument||n).$$reactFormReplay,l!=null)for(c=0;c<l.length;c+=3){var d=l[c],m=l[c+1],_=d[Bt]||null;if(typeof m=="function")_||Fv(l);else if(_){var M=null;if(m&&m.hasAttribute("formAction")){if(d=m,_=m[Bt]||null)M=_.formAction;else if(Wh(d)!==null)continue}else M=_.action;typeof M=="function"?l[c+1]=M:(l.splice(c,3),c-=3),Fv(l)}}}function Qv(){function n(m){m.canIntercept&&m.info==="react-transition"&&m.intercept({handler:function(){return new Promise(function(_){return d=_})},focusReset:"manual",scroll:"manual"})}function i(){d!==null&&(d(),d=null),c||setTimeout(l,20)}function l(){if(!c&&!navigation.transition){var m=navigation.currentEntry;m&&m.url!=null&&navigation.navigate(m.url,{state:m.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var c=!1,d=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",i),navigation.addEventListener("navigateerror",i),setTimeout(l,100),function(){c=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),d!==null&&(d(),d=null)}}}function ep(n){this._internalRoot=n}ou.prototype.render=ep.prototype.render=function(n){var i=this._internalRoot;if(i===null)throw Error(a(409));var l=i.current,c=xn();Yv(l,c,n,i,null,null)},ou.prototype.unmount=ep.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var i=n.containerInfo;Yv(n.current,2,null,n,null,null),Yc(),i[xi]=null}};function ou(n){this._internalRoot=n}ou.prototype.unstable_scheduleHydration=function(n){if(n){var i=qs();n={blockedOn:null,target:n,priority:i};for(var l=0;l<Nr.length&&i!==0&&i<Nr[l].priority;l++);Nr.splice(l,0,n),l===0&&Zv(n)}};var Pv=t.version;if(Pv!=="19.2.6")throw Error(a(527,Pv,"19.2.6"));B.findDOMNode=function(n){var i=n._reactInternals;if(i===void 0)throw typeof n.render=="function"?Error(a(188)):(n=Object.keys(n).join(","),Error(a(268,n)));return n=p(i),n=n!==null?y(n):null,n=n===null?null:n.stateNode,n};var WC={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:k,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var lu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!lu.isDisabled&&lu.supportsFiber)try{Qr=lu.inject(WC),qt=lu}catch{}}return Jl.createRoot=function(n,i){if(!o(n))throw Error(a(299));var l=!1,c="",d=iy,m=ry,_=ay;return i!=null&&(i.unstable_strictMode===!0&&(l=!0),i.identifierPrefix!==void 0&&(c=i.identifierPrefix),i.onUncaughtError!==void 0&&(d=i.onUncaughtError),i.onCaughtError!==void 0&&(m=i.onCaughtError),i.onRecoverableError!==void 0&&(_=i.onRecoverableError)),i=Bv(n,1,!1,null,null,l,c,null,d,m,_,Qv),n[xi]=i.current,zh(n),new ep(i)},Jl.hydrateRoot=function(n,i,l){if(!o(n))throw Error(a(299));var c=!1,d="",m=iy,_=ry,M=ay,U=null;return l!=null&&(l.unstable_strictMode===!0&&(c=!0),l.identifierPrefix!==void 0&&(d=l.identifierPrefix),l.onUncaughtError!==void 0&&(m=l.onUncaughtError),l.onCaughtError!==void 0&&(_=l.onCaughtError),l.onRecoverableError!==void 0&&(M=l.onRecoverableError),l.formState!==void 0&&(U=l.formState)),i=Bv(n,1,!0,i,l??null,c,d,U,m,_,M,Qv),i.context=Uv(null),l=i.current,c=xn(),c=ol(c),d=dr(c),d.callback=null,hr(l,d,c),l=c,i.current.lanes=l,Kr(i,l),ni(i),n[xi]=i.current,zh(n),new ou(i)},Jl.version="19.2.6",Jl}var lx;function uA(){if(lx)return rp.exports;lx=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),rp.exports=cA(),rp.exports}var fA=uA();const dA=df(fA);function At(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let r=0,a;r<e.length;r++)(a=At(e[r]))!==""&&(t+=(t&&" ")+a);else for(let r in e)e[r]&&(t+=(t&&" ")+r);return t}var hA={value:()=>{}};function hf(){for(var e=0,t=arguments.length,r={},a;e<t;++e){if(!(a=arguments[e]+"")||a in r||/[\s.]/.test(a))throw new Error("illegal type: "+a);r[a]=[]}return new Eu(r)}function Eu(e){this._=e}function pA(e,t){return e.trim().split(/^|\s+/).map(function(r){var a="",o=r.indexOf(".");if(o>=0&&(a=r.slice(o+1),r=r.slice(0,o)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:a}})}Eu.prototype=hf.prototype={constructor:Eu,on:function(e,t){var r=this._,a=pA(e+"",r),o,s=-1,u=a.length;if(arguments.length<2){for(;++s<u;)if((o=(e=a[s]).type)&&(o=mA(r[o],e.name)))return o;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++s<u;)if(o=(e=a[s]).type)r[o]=sx(r[o],e.name,t);else if(t==null)for(o in r)r[o]=sx(r[o],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new Eu(e)},call:function(e,t){if((o=arguments.length-2)>0)for(var r=new Array(o),a=0,o,s;a<o;++a)r[a]=arguments[a+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(s=this._[e],a=0,o=s.length;a<o;++a)s[a].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var a=this._[e],o=0,s=a.length;o<s;++o)a[o].value.apply(t,r)}};function mA(e,t){for(var r=0,a=e.length,o;r<a;++r)if((o=e[r]).name===t)return o.value}function sx(e,t,r){for(var a=0,o=e.length;a<o;++a)if(e[a].name===t){e[a]=hA,e=e.slice(0,a).concat(e.slice(a+1));break}return r!=null&&e.push({name:t,value:r}),e}var $p="http://www.w3.org/1999/xhtml";const cx={svg:"http://www.w3.org/2000/svg",xhtml:$p,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function pf(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),cx.hasOwnProperty(t)?{space:cx[t],local:e}:e}function gA(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===$p&&t.documentElement.namespaceURI===$p?t.createElement(e):t.createElementNS(r,e)}}function yA(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function H1(e){var t=pf(e);return(t.local?yA:gA)(t)}function vA(){}function Am(e){return e==null?vA:function(){return this.querySelector(e)}}function xA(e){typeof e!="function"&&(e=Am(e));for(var t=this._groups,r=t.length,a=new Array(r),o=0;o<r;++o)for(var s=t[o],u=s.length,f=a[o]=new Array(u),h,p,y=0;y<u;++y)(h=s[y])&&(p=e.call(h,h.__data__,y,s))&&("__data__"in h&&(p.__data__=h.__data__),f[y]=p);return new En(a,this._parents)}function bA(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function wA(){return[]}function B1(e){return e==null?wA:function(){return this.querySelectorAll(e)}}function _A(e){return function(){return bA(e.apply(this,arguments))}}function SA(e){typeof e=="function"?e=_A(e):e=B1(e);for(var t=this._groups,r=t.length,a=[],o=[],s=0;s<r;++s)for(var u=t[s],f=u.length,h,p=0;p<f;++p)(h=u[p])&&(a.push(e.call(h,h.__data__,p,u)),o.push(h));return new En(a,o)}function U1(e){return function(){return this.matches(e)}}function Y1(e){return function(t){return t.matches(e)}}var EA=Array.prototype.find;function CA(e){return function(){return EA.call(this.children,e)}}function AA(){return this.firstElementChild}function NA(e){return this.select(e==null?AA:CA(typeof e=="function"?e:Y1(e)))}var TA=Array.prototype.filter;function MA(){return Array.from(this.children)}function OA(e){return function(){return TA.call(this.children,e)}}function kA(e){return this.selectAll(e==null?MA:OA(typeof e=="function"?e:Y1(e)))}function RA(e){typeof e!="function"&&(e=U1(e));for(var t=this._groups,r=t.length,a=new Array(r),o=0;o<r;++o)for(var s=t[o],u=s.length,f=a[o]=[],h,p=0;p<u;++p)(h=s[p])&&e.call(h,h.__data__,p,s)&&f.push(h);return new En(a,this._parents)}function $1(e){return new Array(e.length)}function DA(){return new En(this._enter||this._groups.map($1),this._parents)}function Hu(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Hu.prototype={constructor:Hu,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 jA(e){return function(){return e}}function zA(e,t,r,a,o,s){for(var u=0,f,h=t.length,p=s.length;u<p;++u)(f=t[u])?(f.__data__=s[u],a[u]=f):r[u]=new Hu(e,s[u]);for(;u<h;++u)(f=t[u])&&(o[u]=f)}function LA(e,t,r,a,o,s,u){var f,h,p=new Map,y=t.length,g=s.length,v=new Array(y),x;for(f=0;f<y;++f)(h=t[f])&&(v[f]=x=u.call(h,h.__data__,f,t)+"",p.has(x)?o[f]=h:p.set(x,h));for(f=0;f<g;++f)x=u.call(e,s[f],f,s)+"",(h=p.get(x))?(a[f]=h,h.__data__=s[f],p.delete(x)):r[f]=new Hu(e,s[f]);for(f=0;f<y;++f)(h=t[f])&&p.get(v[f])===h&&(o[f]=h)}function HA(e){return e.__data__}function BA(e,t){if(!arguments.length)return Array.from(this,HA);var r=t?LA:zA,a=this._parents,o=this._groups;typeof e!="function"&&(e=jA(e));for(var s=o.length,u=new Array(s),f=new Array(s),h=new Array(s),p=0;p<s;++p){var y=a[p],g=o[p],v=g.length,x=UA(e.call(y,y&&y.__data__,p,a)),b=x.length,w=f[p]=new Array(b),E=u[p]=new Array(b),C=h[p]=new Array(v);r(y,g,w,E,C,x,t);for(var N=0,A=0,T,D;N<b;++N)if(T=w[N]){for(N>=A&&(A=N+1);!(D=E[A])&&++A<b;);T._next=D||null}}return u=new En(u,a),u._enter=f,u._exit=h,u}function UA(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function YA(){return new En(this._exit||this._groups.map($1),this._parents)}function $A(e,t,r){var a=this.enter(),o=this,s=this.exit();return typeof e=="function"?(a=e(a),a&&(a=a.selection())):a=a.append(e+""),t!=null&&(o=t(o),o&&(o=o.selection())),r==null?s.remove():r(s),a&&o?a.merge(o).order():o}function VA(e){for(var t=e.selection?e.selection():e,r=this._groups,a=t._groups,o=r.length,s=a.length,u=Math.min(o,s),f=new Array(o),h=0;h<u;++h)for(var p=r[h],y=a[h],g=p.length,v=f[h]=new Array(g),x,b=0;b<g;++b)(x=p[b]||y[b])&&(v[b]=x);for(;h<o;++h)f[h]=r[h];return new En(f,this._parents)}function qA(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var a=e[t],o=a.length-1,s=a[o],u;--o>=0;)(u=a[o])&&(s&&u.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(u,s),s=u);return this}function GA(e){e||(e=IA);function t(g,v){return g&&v?e(g.__data__,v.__data__):!g-!v}for(var r=this._groups,a=r.length,o=new Array(a),s=0;s<a;++s){for(var u=r[s],f=u.length,h=o[s]=new Array(f),p,y=0;y<f;++y)(p=u[y])&&(h[y]=p);h.sort(t)}return new En(o,this._parents).order()}function IA(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function ZA(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function XA(){return Array.from(this)}function FA(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var a=e[t],o=0,s=a.length;o<s;++o){var u=a[o];if(u)return u}return null}function QA(){let e=0;for(const t of this)++e;return e}function PA(){return!this.node()}function KA(e){for(var t=this._groups,r=0,a=t.length;r<a;++r)for(var o=t[r],s=0,u=o.length,f;s<u;++s)(f=o[s])&&e.call(f,f.__data__,s,o);return this}function WA(e){return function(){this.removeAttribute(e)}}function JA(e){return function(){this.removeAttributeNS(e.space,e.local)}}function eN(e,t){return function(){this.setAttribute(e,t)}}function tN(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function nN(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function iN(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 rN(e,t){var r=pf(e);if(arguments.length<2){var a=this.node();return r.local?a.getAttributeNS(r.space,r.local):a.getAttribute(r)}return this.each((t==null?r.local?JA:WA:typeof t=="function"?r.local?iN:nN:r.local?tN:eN)(r,t))}function V1(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function aN(e){return function(){this.style.removeProperty(e)}}function oN(e,t,r){return function(){this.style.setProperty(e,t,r)}}function lN(e,t,r){return function(){var a=t.apply(this,arguments);a==null?this.style.removeProperty(e):this.style.setProperty(e,a,r)}}function sN(e,t,r){return arguments.length>1?this.each((t==null?aN:typeof t=="function"?lN:oN)(e,t,r??"")):Uo(this.node(),e)}function Uo(e,t){return e.style.getPropertyValue(t)||V1(e).getComputedStyle(e,null).getPropertyValue(t)}function cN(e){return function(){delete this[e]}}function uN(e,t){return function(){this[e]=t}}function fN(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function dN(e,t){return arguments.length>1?this.each((t==null?cN:typeof t=="function"?fN:uN)(e,t)):this.node()[e]}function q1(e){return e.trim().split(/^|\s+/)}function Nm(e){return e.classList||new G1(e)}function G1(e){this._node=e,this._names=q1(e.getAttribute("class")||"")}G1.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 I1(e,t){for(var r=Nm(e),a=-1,o=t.length;++a<o;)r.add(t[a])}function Z1(e,t){for(var r=Nm(e),a=-1,o=t.length;++a<o;)r.remove(t[a])}function hN(e){return function(){I1(this,e)}}function pN(e){return function(){Z1(this,e)}}function mN(e,t){return function(){(t.apply(this,arguments)?I1:Z1)(this,e)}}function gN(e,t){var r=q1(e+"");if(arguments.length<2){for(var a=Nm(this.node()),o=-1,s=r.length;++o<s;)if(!a.contains(r[o]))return!1;return!0}return this.each((typeof t=="function"?mN:t?hN:pN)(r,t))}function yN(){this.textContent=""}function vN(e){return function(){this.textContent=e}}function xN(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function bN(e){return arguments.length?this.each(e==null?yN:(typeof e=="function"?xN:vN)(e)):this.node().textContent}function wN(){this.innerHTML=""}function _N(e){return function(){this.innerHTML=e}}function SN(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function EN(e){return arguments.length?this.each(e==null?wN:(typeof e=="function"?SN:_N)(e)):this.node().innerHTML}function CN(){this.nextSibling&&this.parentNode.appendChild(this)}function AN(){return this.each(CN)}function NN(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function TN(){return this.each(NN)}function MN(e){var t=typeof e=="function"?e:H1(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function ON(){return null}function kN(e,t){var r=typeof e=="function"?e:H1(e),a=t==null?ON:typeof t=="function"?t:Am(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),a.apply(this,arguments)||null)})}function RN(){var e=this.parentNode;e&&e.removeChild(this)}function DN(){return this.each(RN)}function jN(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function zN(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function LN(e){return this.select(e?zN:jN)}function HN(e){return arguments.length?this.property("__data__",e):this.node().__data__}function BN(e){return function(t){e.call(this,t,this.__data__)}}function UN(e){return e.trim().split(/^|\s+/).map(function(t){var r="",a=t.indexOf(".");return a>=0&&(r=t.slice(a+1),t=t.slice(0,a)),{type:t,name:r}})}function YN(e){return function(){var t=this.__on;if(t){for(var r=0,a=-1,o=t.length,s;r<o;++r)s=t[r],(!e.type||s.type===e.type)&&s.name===e.name?this.removeEventListener(s.type,s.listener,s.options):t[++a]=s;++a?t.length=a:delete this.__on}}}function $N(e,t,r){return function(){var a=this.__on,o,s=BN(t);if(a){for(var u=0,f=a.length;u<f;++u)if((o=a[u]).type===e.type&&o.name===e.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=s,o.options=r),o.value=t;return}}this.addEventListener(e.type,s,r),o={type:e.type,name:e.name,value:t,listener:s,options:r},a?a.push(o):this.__on=[o]}}function VN(e,t,r){var a=UN(e+""),o,s=a.length,u;if(arguments.length<2){var f=this.node().__on;if(f){for(var h=0,p=f.length,y;h<p;++h)for(o=0,y=f[h];o<s;++o)if((u=a[o]).type===y.type&&u.name===y.name)return y.value}return}for(f=t?$N:YN,o=0;o<s;++o)this.each(f(a[o],t,r));return this}function X1(e,t,r){var a=V1(e),o=a.CustomEvent;typeof o=="function"?o=new o(t,r):(o=a.document.createEvent("Event"),r?(o.initEvent(t,r.bubbles,r.cancelable),o.detail=r.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function qN(e,t){return function(){return X1(this,e,t)}}function GN(e,t){return function(){return X1(this,e,t.apply(this,arguments))}}function IN(e,t){return this.each((typeof t=="function"?GN:qN)(e,t))}function*ZN(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var a=e[t],o=0,s=a.length,u;o<s;++o)(u=a[o])&&(yield u)}var F1=[null];function En(e,t){this._groups=e,this._parents=t}function ks(){return new En([[document.documentElement]],F1)}function XN(){return this}En.prototype=ks.prototype={constructor:En,select:xA,selectAll:SA,selectChild:NA,selectChildren:kA,filter:RA,data:BA,enter:DA,exit:YA,join:$A,merge:VA,selection:XN,order:qA,sort:GA,call:ZA,nodes:XA,node:FA,size:QA,empty:PA,each:KA,attr:rN,style:sN,property:dN,classed:gN,text:bN,html:EN,raise:AN,lower:TN,append:MN,insert:kN,remove:DN,clone:LN,datum:HN,on:VN,dispatch:IN,[Symbol.iterator]:ZN};function wn(e){return typeof e=="string"?new En([[document.querySelector(e)]],[document.documentElement]):new En([[e]],F1)}function FN(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Vn(e,t){if(e=FN(e),t===void 0&&(t=e.currentTarget),t){var r=t.ownerSVGElement||t;if(r.createSVGPoint){var a=r.createSVGPoint();return a.x=e.clientX,a.y=e.clientY,a=a.matrixTransform(t.getScreenCTM().inverse()),[a.x,a.y]}if(t.getBoundingClientRect){var o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}}return[e.pageX,e.pageY]}const QN={passive:!1},hs={capture:!0,passive:!1};function sp(e){e.stopImmediatePropagation()}function Do(e){e.preventDefault(),e.stopImmediatePropagation()}function Q1(e){var t=e.document.documentElement,r=wn(e).on("dragstart.drag",Do,hs);"onselectstart"in t?r.on("selectstart.drag",Do,hs):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function P1(e,t){var r=e.document.documentElement,a=wn(e).on("dragstart.drag",null);t&&(a.on("click.drag",Do,hs),setTimeout(function(){a.on("click.drag",null)},0)),"onselectstart"in r?a.on("selectstart.drag",null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect)}const su=e=>()=>e;function Vp(e,{sourceEvent:t,subject:r,target:a,identifier:o,active:s,x:u,y:f,dx:h,dy:p,dispatch:y}){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:a,enumerable:!0,configurable:!0},identifier:{value:o,enumerable:!0,configurable:!0},active:{value:s,enumerable:!0,configurable:!0},x:{value:u,enumerable:!0,configurable:!0},y:{value:f,enumerable:!0,configurable:!0},dx:{value:h,enumerable:!0,configurable:!0},dy:{value:p,enumerable:!0,configurable:!0},_:{value:y}})}Vp.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function PN(e){return!e.ctrlKey&&!e.button}function KN(){return this.parentNode}function WN(e,t){return t??{x:e.x,y:e.y}}function JN(){return navigator.maxTouchPoints||"ontouchstart"in this}function K1(){var e=PN,t=KN,r=WN,a=JN,o={},s=hf("start","drag","end"),u=0,f,h,p,y,g=0;function v(T){T.on("mousedown.drag",x).filter(a).on("touchstart.drag",E).on("touchmove.drag",C,QN).on("touchend.drag touchcancel.drag",N).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function x(T,D){if(!(y||!e.call(this,T,D))){var L=A(this,t.call(this,T,D),T,D,"mouse");L&&(wn(T.view).on("mousemove.drag",b,hs).on("mouseup.drag",w,hs),Q1(T.view),sp(T),p=!1,f=T.clientX,h=T.clientY,L("start",T))}}function b(T){if(Do(T),!p){var D=T.clientX-f,L=T.clientY-h;p=D*D+L*L>g}o.mouse("drag",T)}function w(T){wn(T.view).on("mousemove.drag mouseup.drag",null),P1(T.view,p),Do(T),o.mouse("end",T)}function E(T,D){if(e.call(this,T,D)){var L=T.changedTouches,j=t.call(this,T,D),I=L.length,Z,te;for(Z=0;Z<I;++Z)(te=A(this,j,T,D,L[Z].identifier,L[Z]))&&(sp(T),te("start",T,L[Z]))}}function C(T){var D=T.changedTouches,L=D.length,j,I;for(j=0;j<L;++j)(I=o[D[j].identifier])&&(Do(T),I("drag",T,D[j]))}function N(T){var D=T.changedTouches,L=D.length,j,I;for(y&&clearTimeout(y),y=setTimeout(function(){y=null},500),j=0;j<L;++j)(I=o[D[j].identifier])&&(sp(T),I("end",T,D[j]))}function A(T,D,L,j,I,Z){var te=s.copy(),G=Vn(Z||L,D),q,ie,z;if((z=r.call(T,new Vp("beforestart",{sourceEvent:L,target:v,identifier:I,active:u,x:G[0],y:G[1],dx:0,dy:0,dispatch:te}),j))!=null)return q=z.x-G[0]||0,ie=z.y-G[1]||0,function F(k,B,H){var $=G,K;switch(k){case"start":o[I]=F,K=u++;break;case"end":delete o[I],--u;case"drag":G=Vn(H||B,D),K=u;break}te.call(k,T,new Vp(k,{sourceEvent:B,subject:z,target:v,identifier:I,active:K,x:G[0]+q,y:G[1]+ie,dx:G[0]-$[0],dy:G[1]-$[1],dispatch:te}),j)}}return v.filter=function(T){return arguments.length?(e=typeof T=="function"?T:su(!!T),v):e},v.container=function(T){return arguments.length?(t=typeof T=="function"?T:su(T),v):t},v.subject=function(T){return arguments.length?(r=typeof T=="function"?T:su(T),v):r},v.touchable=function(T){return arguments.length?(a=typeof T=="function"?T:su(!!T),v):a},v.on=function(){var T=s.on.apply(s,arguments);return T===s?v:T},v.clickDistance=function(T){return arguments.length?(g=(T=+T)*T,v):Math.sqrt(g)},v}function Tm(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function W1(e,t){var r=Object.create(e.prototype);for(var a in t)r[a]=t[a];return r}function Rs(){}var ps=.7,Bu=1/ps,jo="\\s*([+-]?\\d+)\\s*",ms="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",si="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",eT=/^#([0-9a-f]{3,8})$/,tT=new RegExp(`^rgb\\(${jo},${jo},${jo}\\)$`),nT=new RegExp(`^rgb\\(${si},${si},${si}\\)$`),iT=new RegExp(`^rgba\\(${jo},${jo},${jo},${ms}\\)$`),rT=new RegExp(`^rgba\\(${si},${si},${si},${ms}\\)$`),aT=new RegExp(`^hsl\\(${ms},${si},${si}\\)$`),oT=new RegExp(`^hsla\\(${ms},${si},${si},${ms}\\)$`),ux={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};Tm(Rs,Ca,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:fx,formatHex:fx,formatHex8:lT,formatHsl:sT,formatRgb:dx,toString:dx});function fx(){return this.rgb().formatHex()}function lT(){return this.rgb().formatHex8()}function sT(){return J1(this).formatHsl()}function dx(){return this.rgb().formatRgb()}function Ca(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=eT.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?hx(t):r===3?new sn(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?cu(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?cu(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=tT.exec(e))?new sn(t[1],t[2],t[3],1):(t=nT.exec(e))?new sn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=iT.exec(e))?cu(t[1],t[2],t[3],t[4]):(t=rT.exec(e))?cu(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=aT.exec(e))?gx(t[1],t[2]/100,t[3]/100,1):(t=oT.exec(e))?gx(t[1],t[2]/100,t[3]/100,t[4]):ux.hasOwnProperty(e)?hx(ux[e]):e==="transparent"?new sn(NaN,NaN,NaN,0):null}function hx(e){return new sn(e>>16&255,e>>8&255,e&255,1)}function cu(e,t,r,a){return a<=0&&(e=t=r=NaN),new sn(e,t,r,a)}function cT(e){return e instanceof Rs||(e=Ca(e)),e?(e=e.rgb(),new sn(e.r,e.g,e.b,e.opacity)):new sn}function qp(e,t,r,a){return arguments.length===1?cT(e):new sn(e,t,r,a??1)}function sn(e,t,r,a){this.r=+e,this.g=+t,this.b=+r,this.opacity=+a}Tm(sn,qp,W1(Rs,{brighter(e){return e=e==null?Bu:Math.pow(Bu,e),new sn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?ps:Math.pow(ps,e),new sn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new sn(wa(this.r),wa(this.g),wa(this.b),Uu(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:px,formatHex:px,formatHex8:uT,formatRgb:mx,toString:mx}));function px(){return`#${xa(this.r)}${xa(this.g)}${xa(this.b)}`}function uT(){return`#${xa(this.r)}${xa(this.g)}${xa(this.b)}${xa((isNaN(this.opacity)?1:this.opacity)*255)}`}function mx(){const e=Uu(this.opacity);return`${e===1?"rgb(":"rgba("}${wa(this.r)}, ${wa(this.g)}, ${wa(this.b)}${e===1?")":`, ${e})`}`}function Uu(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function wa(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function xa(e){return e=wa(e),(e<16?"0":"")+e.toString(16)}function gx(e,t,r,a){return a<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new qn(e,t,r,a)}function J1(e){if(e instanceof qn)return new qn(e.h,e.s,e.l,e.opacity);if(e instanceof Rs||(e=Ca(e)),!e)return new qn;if(e instanceof qn)return e;e=e.rgb();var t=e.r/255,r=e.g/255,a=e.b/255,o=Math.min(t,r,a),s=Math.max(t,r,a),u=NaN,f=s-o,h=(s+o)/2;return f?(t===s?u=(r-a)/f+(r<a)*6:r===s?u=(a-t)/f+2:u=(t-r)/f+4,f/=h<.5?s+o:2-s-o,u*=60):f=h>0&&h<1?0:u,new qn(u,f,h,e.opacity)}function fT(e,t,r,a){return arguments.length===1?J1(e):new qn(e,t,r,a??1)}function qn(e,t,r,a){this.h=+e,this.s=+t,this.l=+r,this.opacity=+a}Tm(qn,fT,W1(Rs,{brighter(e){return e=e==null?Bu:Math.pow(Bu,e),new qn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ps:Math.pow(ps,e),new qn(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,a=r+(r<.5?r:1-r)*t,o=2*r-a;return new sn(cp(e>=240?e-240:e+120,o,a),cp(e,o,a),cp(e<120?e+240:e-120,o,a),this.opacity)},clamp(){return new qn(yx(this.h),uu(this.s),uu(this.l),Uu(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=Uu(this.opacity);return`${e===1?"hsl(":"hsla("}${yx(this.h)}, ${uu(this.s)*100}%, ${uu(this.l)*100}%${e===1?")":`, ${e})`}`}}));function yx(e){return e=(e||0)%360,e<0?e+360:e}function uu(e){return Math.max(0,Math.min(1,e||0))}function cp(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 Mm=e=>()=>e;function dT(e,t){return function(r){return e+r*t}}function hT(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(a){return Math.pow(e+a*t,r)}}function pT(e){return(e=+e)==1?ew:function(t,r){return r-t?hT(t,r,e):Mm(isNaN(t)?r:t)}}function ew(e,t){var r=t-e;return r?dT(e,r):Mm(isNaN(e)?t:e)}const Yu=(function e(t){var r=pT(t);function a(o,s){var u=r((o=qp(o)).r,(s=qp(s)).r),f=r(o.g,s.g),h=r(o.b,s.b),p=ew(o.opacity,s.opacity);return function(y){return o.r=u(y),o.g=f(y),o.b=h(y),o.opacity=p(y),o+""}}return a.gamma=e,a})(1);function mT(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,a=t.slice(),o;return function(s){for(o=0;o<r;++o)a[o]=e[o]*(1-s)+t[o]*s;return a}}function gT(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function yT(e,t){var r=t?t.length:0,a=e?Math.min(r,e.length):0,o=new Array(a),s=new Array(r),u;for(u=0;u<a;++u)o[u]=fs(e[u],t[u]);for(;u<r;++u)s[u]=t[u];return function(f){for(u=0;u<a;++u)s[u]=o[u](f);return s}}function vT(e,t){var r=new Date;return e=+e,t=+t,function(a){return r.setTime(e*(1-a)+t*a),r}}function ai(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function xT(e,t){var r={},a={},o;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(o in t)o in e?r[o]=fs(e[o],t[o]):a[o]=t[o];return function(s){for(o in r)a[o]=r[o](s);return a}}var Gp=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,up=new RegExp(Gp.source,"g");function bT(e){return function(){return e}}function wT(e){return function(t){return e(t)+""}}function tw(e,t){var r=Gp.lastIndex=up.lastIndex=0,a,o,s,u=-1,f=[],h=[];for(e=e+"",t=t+"";(a=Gp.exec(e))&&(o=up.exec(t));)(s=o.index)>r&&(s=t.slice(r,s),f[u]?f[u]+=s:f[++u]=s),(a=a[0])===(o=o[0])?f[u]?f[u]+=o:f[++u]=o:(f[++u]=null,h.push({i:u,x:ai(a,o)})),r=up.lastIndex;return r<t.length&&(s=t.slice(r),f[u]?f[u]+=s:f[++u]=s),f.length<2?h[0]?wT(h[0].x):bT(t):(t=h.length,function(p){for(var y=0,g;y<t;++y)f[(g=h[y]).i]=g.x(p);return f.join("")})}function fs(e,t){var r=typeof t,a;return t==null||r==="boolean"?Mm(t):(r==="number"?ai:r==="string"?(a=Ca(t))?(t=a,Yu):tw:t instanceof Ca?Yu:t instanceof Date?vT:gT(t)?mT:Array.isArray(t)?yT:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?xT:ai)(e,t)}var vx=180/Math.PI,Ip={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function nw(e,t,r,a,o,s){var u,f,h;return(u=Math.sqrt(e*e+t*t))&&(e/=u,t/=u),(h=e*r+t*a)&&(r-=e*h,a-=t*h),(f=Math.sqrt(r*r+a*a))&&(r/=f,a/=f,h/=f),e*a<t*r&&(e=-e,t=-t,h=-h,u=-u),{translateX:o,translateY:s,rotate:Math.atan2(t,e)*vx,skewX:Math.atan(h)*vx,scaleX:u,scaleY:f}}var fu;function _T(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Ip:nw(t.a,t.b,t.c,t.d,t.e,t.f)}function ST(e){return e==null||(fu||(fu=document.createElementNS("http://www.w3.org/2000/svg","g")),fu.setAttribute("transform",e),!(e=fu.transform.baseVal.consolidate()))?Ip:(e=e.matrix,nw(e.a,e.b,e.c,e.d,e.e,e.f))}function iw(e,t,r,a){function o(p){return p.length?p.pop()+" ":""}function s(p,y,g,v,x,b){if(p!==g||y!==v){var w=x.push("translate(",null,t,null,r);b.push({i:w-4,x:ai(p,g)},{i:w-2,x:ai(y,v)})}else(g||v)&&x.push("translate("+g+t+v+r)}function u(p,y,g,v){p!==y?(p-y>180?y+=360:y-p>180&&(p+=360),v.push({i:g.push(o(g)+"rotate(",null,a)-2,x:ai(p,y)})):y&&g.push(o(g)+"rotate("+y+a)}function f(p,y,g,v){p!==y?v.push({i:g.push(o(g)+"skewX(",null,a)-2,x:ai(p,y)}):y&&g.push(o(g)+"skewX("+y+a)}function h(p,y,g,v,x,b){if(p!==g||y!==v){var w=x.push(o(x)+"scale(",null,",",null,")");b.push({i:w-4,x:ai(p,g)},{i:w-2,x:ai(y,v)})}else(g!==1||v!==1)&&x.push(o(x)+"scale("+g+","+v+")")}return function(p,y){var g=[],v=[];return p=e(p),y=e(y),s(p.translateX,p.translateY,y.translateX,y.translateY,g,v),u(p.rotate,y.rotate,g,v),f(p.skewX,y.skewX,g,v),h(p.scaleX,p.scaleY,y.scaleX,y.scaleY,g,v),p=y=null,function(x){for(var b=-1,w=v.length,E;++b<w;)g[(E=v[b]).i]=E.x(x);return g.join("")}}}var ET=iw(_T,"px, ","px)","deg)"),CT=iw(ST,", ",")",")"),AT=1e-12;function xx(e){return((e=Math.exp(e))+1/e)/2}function NT(e){return((e=Math.exp(e))-1/e)/2}function TT(e){return((e=Math.exp(2*e))-1)/(e+1)}const Cu=(function e(t,r,a){function o(s,u){var f=s[0],h=s[1],p=s[2],y=u[0],g=u[1],v=u[2],x=y-f,b=g-h,w=x*x+b*b,E,C;if(w<AT)C=Math.log(v/p)/t,E=function(j){return[f+j*x,h+j*b,p*Math.exp(t*j*C)]};else{var N=Math.sqrt(w),A=(v*v-p*p+a*w)/(2*p*r*N),T=(v*v-p*p-a*w)/(2*v*r*N),D=Math.log(Math.sqrt(A*A+1)-A),L=Math.log(Math.sqrt(T*T+1)-T);C=(L-D)/t,E=function(j){var I=j*C,Z=xx(D),te=p/(r*N)*(Z*TT(t*I+D)-NT(D));return[f+te*x,h+te*b,p*Z/xx(t*I+D)]}}return E.duration=C*1e3*t/Math.SQRT2,E}return o.rho=function(s){var u=Math.max(.001,+s),f=u*u,h=f*f;return e(u,f,h)},o})(Math.SQRT2,2,4);var Yo=0,as=0,es=0,rw=1e3,$u,os,Vu=0,Aa=0,mf=0,gs=typeof performance=="object"&&performance.now?performance:Date,aw=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Om(){return Aa||(aw(MT),Aa=gs.now()+mf)}function MT(){Aa=0}function qu(){this._call=this._time=this._next=null}qu.prototype=ow.prototype={constructor:qu,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?Om():+r)+(t==null?0:+t),!this._next&&os!==this&&(os?os._next=this:$u=this,os=this),this._call=e,this._time=r,Zp()},stop:function(){this._call&&(this._call=null,this._time=1/0,Zp())}};function ow(e,t,r){var a=new qu;return a.restart(e,t,r),a}function OT(){Om(),++Yo;for(var e=$u,t;e;)(t=Aa-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Yo}function bx(){Aa=(Vu=gs.now())+mf,Yo=as=0;try{OT()}finally{Yo=0,RT(),Aa=0}}function kT(){var e=gs.now(),t=e-Vu;t>rw&&(mf-=t,Vu=e)}function RT(){for(var e,t=$u,r,a=1/0;t;)t._call?(a>t._time&&(a=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:$u=r);os=e,Zp(a)}function Zp(e){if(!Yo){as&&(as=clearTimeout(as));var t=e-Aa;t>24?(e<1/0&&(as=setTimeout(bx,e-gs.now()-mf)),es&&(es=clearInterval(es))):(es||(Vu=gs.now(),es=setInterval(kT,rw)),Yo=1,aw(bx))}}function wx(e,t,r){var a=new qu;return t=t==null?0:+t,a.restart(o=>{a.stop(),e(o+t)},t,r),a}var DT=hf("start","end","cancel","interrupt"),jT=[],lw=0,_x=1,Xp=2,Au=3,Sx=4,Fp=5,Nu=6;function gf(e,t,r,a,o,s){var u=e.__transition;if(!u)e.__transition={};else if(r in u)return;zT(e,r,{name:t,index:a,group:o,on:DT,tween:jT,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:lw})}function km(e,t){var r=Fn(e,t);if(r.state>lw)throw new Error("too late; already scheduled");return r}function pi(e,t){var r=Fn(e,t);if(r.state>Au)throw new Error("too late; already running");return r}function Fn(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function zT(e,t,r){var a=e.__transition,o;a[t]=r,r.timer=ow(s,0,r.time);function s(p){r.state=_x,r.timer.restart(u,r.delay,r.time),r.delay<=p&&u(p-r.delay)}function u(p){var y,g,v,x;if(r.state!==_x)return h();for(y in a)if(x=a[y],x.name===r.name){if(x.state===Au)return wx(u);x.state===Sx?(x.state=Nu,x.timer.stop(),x.on.call("interrupt",e,e.__data__,x.index,x.group),delete a[y]):+y<t&&(x.state=Nu,x.timer.stop(),x.on.call("cancel",e,e.__data__,x.index,x.group),delete a[y])}if(wx(function(){r.state===Au&&(r.state=Sx,r.timer.restart(f,r.delay,r.time),f(p))}),r.state=Xp,r.on.call("start",e,e.__data__,r.index,r.group),r.state===Xp){for(r.state=Au,o=new Array(v=r.tween.length),y=0,g=-1;y<v;++y)(x=r.tween[y].value.call(e,e.__data__,r.index,r.group))&&(o[++g]=x);o.length=g+1}}function f(p){for(var y=p<r.duration?r.ease.call(null,p/r.duration):(r.timer.restart(h),r.state=Fp,1),g=-1,v=o.length;++g<v;)o[g].call(e,y);r.state===Fp&&(r.on.call("end",e,e.__data__,r.index,r.group),h())}function h(){r.state=Nu,r.timer.stop(),delete a[t];for(var p in a)return;delete e.__transition}}function Tu(e,t){var r=e.__transition,a,o,s=!0,u;if(r){t=t==null?null:t+"";for(u in r){if((a=r[u]).name!==t){s=!1;continue}o=a.state>Xp&&a.state<Fp,a.state=Nu,a.timer.stop(),a.on.call(o?"interrupt":"cancel",e,e.__data__,a.index,a.group),delete r[u]}s&&delete e.__transition}}function LT(e){return this.each(function(){Tu(this,e)})}function HT(e,t){var r,a;return function(){var o=pi(this,e),s=o.tween;if(s!==r){a=r=s;for(var u=0,f=a.length;u<f;++u)if(a[u].name===t){a=a.slice(),a.splice(u,1);break}}o.tween=a}}function BT(e,t,r){var a,o;if(typeof r!="function")throw new Error;return function(){var s=pi(this,e),u=s.tween;if(u!==a){o=(a=u).slice();for(var f={name:t,value:r},h=0,p=o.length;h<p;++h)if(o[h].name===t){o[h]=f;break}h===p&&o.push(f)}s.tween=o}}function UT(e,t){var r=this._id;if(e+="",arguments.length<2){for(var a=Fn(this.node(),r).tween,o=0,s=a.length,u;o<s;++o)if((u=a[o]).name===e)return u.value;return null}return this.each((t==null?HT:BT)(r,e,t))}function Rm(e,t,r){var a=e._id;return e.each(function(){var o=pi(this,a);(o.value||(o.value={}))[t]=r.apply(this,arguments)}),function(o){return Fn(o,a).value[t]}}function sw(e,t){var r;return(typeof t=="number"?ai:t instanceof Ca?Yu:(r=Ca(t))?(t=r,Yu):tw)(e,t)}function YT(e){return function(){this.removeAttribute(e)}}function $T(e){return function(){this.removeAttributeNS(e.space,e.local)}}function VT(e,t,r){var a,o=r+"",s;return function(){var u=this.getAttribute(e);return u===o?null:u===a?s:s=t(a=u,r)}}function qT(e,t,r){var a,o=r+"",s;return function(){var u=this.getAttributeNS(e.space,e.local);return u===o?null:u===a?s:s=t(a=u,r)}}function GT(e,t,r){var a,o,s;return function(){var u,f=r(this),h;return f==null?void this.removeAttribute(e):(u=this.getAttribute(e),h=f+"",u===h?null:u===a&&h===o?s:(o=h,s=t(a=u,f)))}}function IT(e,t,r){var a,o,s;return function(){var u,f=r(this),h;return f==null?void this.removeAttributeNS(e.space,e.local):(u=this.getAttributeNS(e.space,e.local),h=f+"",u===h?null:u===a&&h===o?s:(o=h,s=t(a=u,f)))}}function ZT(e,t){var r=pf(e),a=r==="transform"?CT:sw;return this.attrTween(e,typeof t=="function"?(r.local?IT:GT)(r,a,Rm(this,"attr."+e,t)):t==null?(r.local?$T:YT)(r):(r.local?qT:VT)(r,a,t))}function XT(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function FT(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function QT(e,t){var r,a;function o(){var s=t.apply(this,arguments);return s!==a&&(r=(a=s)&&FT(e,s)),r}return o._value=t,o}function PT(e,t){var r,a;function o(){var s=t.apply(this,arguments);return s!==a&&(r=(a=s)&&XT(e,s)),r}return o._value=t,o}function KT(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 a=pf(e);return this.tween(r,(a.local?QT:PT)(a,t))}function WT(e,t){return function(){km(this,e).delay=+t.apply(this,arguments)}}function JT(e,t){return t=+t,function(){km(this,e).delay=t}}function eM(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?WT:JT)(t,e)):Fn(this.node(),t).delay}function tM(e,t){return function(){pi(this,e).duration=+t.apply(this,arguments)}}function nM(e,t){return t=+t,function(){pi(this,e).duration=t}}function iM(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?tM:nM)(t,e)):Fn(this.node(),t).duration}function rM(e,t){if(typeof t!="function")throw new Error;return function(){pi(this,e).ease=t}}function aM(e){var t=this._id;return arguments.length?this.each(rM(t,e)):Fn(this.node(),t).ease}function oM(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;pi(this,e).ease=r}}function lM(e){if(typeof e!="function")throw new Error;return this.each(oM(this._id,e))}function sM(e){typeof e!="function"&&(e=U1(e));for(var t=this._groups,r=t.length,a=new Array(r),o=0;o<r;++o)for(var s=t[o],u=s.length,f=a[o]=[],h,p=0;p<u;++p)(h=s[p])&&e.call(h,h.__data__,p,s)&&f.push(h);return new Ii(a,this._parents,this._name,this._id)}function cM(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,a=t.length,o=r.length,s=Math.min(a,o),u=new Array(a),f=0;f<s;++f)for(var h=t[f],p=r[f],y=h.length,g=u[f]=new Array(y),v,x=0;x<y;++x)(v=h[x]||p[x])&&(g[x]=v);for(;f<a;++f)u[f]=t[f];return new Ii(u,this._parents,this._name,this._id)}function uM(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 fM(e,t,r){var a,o,s=uM(t)?km:pi;return function(){var u=s(this,e),f=u.on;f!==a&&(o=(a=f).copy()).on(t,r),u.on=o}}function dM(e,t){var r=this._id;return arguments.length<2?Fn(this.node(),r).on.on(e):this.each(fM(r,e,t))}function hM(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function pM(){return this.on("end.remove",hM(this._id))}function mM(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Am(e));for(var a=this._groups,o=a.length,s=new Array(o),u=0;u<o;++u)for(var f=a[u],h=f.length,p=s[u]=new Array(h),y,g,v=0;v<h;++v)(y=f[v])&&(g=e.call(y,y.__data__,v,f))&&("__data__"in y&&(g.__data__=y.__data__),p[v]=g,gf(p[v],t,r,v,p,Fn(y,r)));return new Ii(s,this._parents,t,r)}function gM(e){var t=this._name,r=this._id;typeof e!="function"&&(e=B1(e));for(var a=this._groups,o=a.length,s=[],u=[],f=0;f<o;++f)for(var h=a[f],p=h.length,y,g=0;g<p;++g)if(y=h[g]){for(var v=e.call(y,y.__data__,g,h),x,b=Fn(y,r),w=0,E=v.length;w<E;++w)(x=v[w])&&gf(x,t,r,w,v,b);s.push(v),u.push(y)}return new Ii(s,u,t,r)}var yM=ks.prototype.constructor;function vM(){return new yM(this._groups,this._parents)}function xM(e,t){var r,a,o;return function(){var s=Uo(this,e),u=(this.style.removeProperty(e),Uo(this,e));return s===u?null:s===r&&u===a?o:o=t(r=s,a=u)}}function cw(e){return function(){this.style.removeProperty(e)}}function bM(e,t,r){var a,o=r+"",s;return function(){var u=Uo(this,e);return u===o?null:u===a?s:s=t(a=u,r)}}function wM(e,t,r){var a,o,s;return function(){var u=Uo(this,e),f=r(this),h=f+"";return f==null&&(h=f=(this.style.removeProperty(e),Uo(this,e))),u===h?null:u===a&&h===o?s:(o=h,s=t(a=u,f))}}function _M(e,t){var r,a,o,s="style."+t,u="end."+s,f;return function(){var h=pi(this,e),p=h.on,y=h.value[s]==null?f||(f=cw(t)):void 0;(p!==r||o!==y)&&(a=(r=p).copy()).on(u,o=y),h.on=a}}function SM(e,t,r){var a=(e+="")=="transform"?ET:sw;return t==null?this.styleTween(e,xM(e,a)).on("end.style."+e,cw(e)):typeof t=="function"?this.styleTween(e,wM(e,a,Rm(this,"style."+e,t))).each(_M(this._id,e)):this.styleTween(e,bM(e,a,t),r).on("end.style."+e,null)}function EM(e,t,r){return function(a){this.style.setProperty(e,t.call(this,a),r)}}function CM(e,t,r){var a,o;function s(){var u=t.apply(this,arguments);return u!==o&&(a=(o=u)&&EM(e,u,r)),a}return s._value=t,s}function AM(e,t,r){var a="style."+(e+="");if(arguments.length<2)return(a=this.tween(a))&&a._value;if(t==null)return this.tween(a,null);if(typeof t!="function")throw new Error;return this.tween(a,CM(e,t,r??""))}function NM(e){return function(){this.textContent=e}}function TM(e){return function(){var t=e(this);this.textContent=t??""}}function MM(e){return this.tween("text",typeof e=="function"?TM(Rm(this,"text",e)):NM(e==null?"":e+""))}function OM(e){return function(t){this.textContent=e.call(this,t)}}function kM(e){var t,r;function a(){var o=e.apply(this,arguments);return o!==r&&(t=(r=o)&&OM(o)),t}return a._value=e,a}function RM(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,kM(e))}function DM(){for(var e=this._name,t=this._id,r=uw(),a=this._groups,o=a.length,s=0;s<o;++s)for(var u=a[s],f=u.length,h,p=0;p<f;++p)if(h=u[p]){var y=Fn(h,t);gf(h,e,r,p,u,{time:y.time+y.delay+y.duration,delay:0,duration:y.duration,ease:y.ease})}return new Ii(a,this._parents,e,r)}function jM(){var e,t,r=this,a=r._id,o=r.size();return new Promise(function(s,u){var f={value:u},h={value:function(){--o===0&&s()}};r.each(function(){var p=pi(this,a),y=p.on;y!==e&&(t=(e=y).copy(),t._.cancel.push(f),t._.interrupt.push(f),t._.end.push(h)),p.on=t}),o===0&&s()})}var zM=0;function Ii(e,t,r,a){this._groups=e,this._parents=t,this._name=r,this._id=a}function uw(){return++zM}var Ui=ks.prototype;Ii.prototype={constructor:Ii,select:mM,selectAll:gM,selectChild:Ui.selectChild,selectChildren:Ui.selectChildren,filter:sM,merge:cM,selection:vM,transition:DM,call:Ui.call,nodes:Ui.nodes,node:Ui.node,size:Ui.size,empty:Ui.empty,each:Ui.each,on:dM,attr:ZT,attrTween:KT,style:SM,styleTween:AM,text:MM,textTween:RM,remove:pM,tween:UT,delay:eM,duration:iM,ease:aM,easeVarying:lM,end:jM,[Symbol.iterator]:Ui[Symbol.iterator]};function LM(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var HM={time:null,delay:0,duration:250,ease:LM};function BM(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 UM(e){var t,r;e instanceof Ii?(t=e._id,e=e._name):(t=uw(),(r=HM).time=Om(),e=e==null?null:e+"");for(var a=this._groups,o=a.length,s=0;s<o;++s)for(var u=a[s],f=u.length,h,p=0;p<f;++p)(h=u[p])&&gf(h,e,t,p,u,r||BM(h,t));return new Ii(a,this._parents,e,t)}ks.prototype.interrupt=LT;ks.prototype.transition=UM;const du=e=>()=>e;function YM(e,{sourceEvent:t,target:r,transform:a,dispatch:o}){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:a,enumerable:!0,configurable:!0},_:{value:o}})}function Vi(e,t,r){this.k=e,this.x=t,this.y=r}Vi.prototype={constructor:Vi,scale:function(e){return e===1?this:new Vi(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Vi(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 yf=new Vi(1,0,0);fw.prototype=Vi.prototype;function fw(e){for(;!e.__zoom;)if(!(e=e.parentNode))return yf;return e.__zoom}function fp(e){e.stopImmediatePropagation()}function ts(e){e.preventDefault(),e.stopImmediatePropagation()}function $M(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function VM(){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 Ex(){return this.__zoom||yf}function qM(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function GM(){return navigator.maxTouchPoints||"ontouchstart"in this}function IM(e,t,r){var a=e.invertX(t[0][0])-r[0][0],o=e.invertX(t[1][0])-r[1][0],s=e.invertY(t[0][1])-r[0][1],u=e.invertY(t[1][1])-r[1][1];return e.translate(o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o),u>s?(s+u)/2:Math.min(0,s)||Math.max(0,u))}function dw(){var e=$M,t=VM,r=IM,a=qM,o=GM,s=[0,1/0],u=[[-1/0,-1/0],[1/0,1/0]],f=250,h=Cu,p=hf("start","zoom","end"),y,g,v,x=500,b=150,w=0,E=10;function C(z){z.property("__zoom",Ex).on("wheel.zoom",I,{passive:!1}).on("mousedown.zoom",Z).on("dblclick.zoom",te).filter(o).on("touchstart.zoom",G).on("touchmove.zoom",q).on("touchend.zoom touchcancel.zoom",ie).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}C.transform=function(z,F,k,B){var H=z.selection?z.selection():z;H.property("__zoom",Ex),z!==H?D(z,F,k,B):H.interrupt().each(function(){L(this,arguments).event(B).start().zoom(null,typeof F=="function"?F.apply(this,arguments):F).end()})},C.scaleBy=function(z,F,k,B){C.scaleTo(z,function(){var H=this.__zoom.k,$=typeof F=="function"?F.apply(this,arguments):F;return H*$},k,B)},C.scaleTo=function(z,F,k,B){C.transform(z,function(){var H=t.apply(this,arguments),$=this.__zoom,K=k==null?T(H):typeof k=="function"?k.apply(this,arguments):k,R=$.invert(K),Y=typeof F=="function"?F.apply(this,arguments):F;return r(A(N($,Y),K,R),H,u)},k,B)},C.translateBy=function(z,F,k,B){C.transform(z,function(){return r(this.__zoom.translate(typeof F=="function"?F.apply(this,arguments):F,typeof k=="function"?k.apply(this,arguments):k),t.apply(this,arguments),u)},null,B)},C.translateTo=function(z,F,k,B,H){C.transform(z,function(){var $=t.apply(this,arguments),K=this.__zoom,R=B==null?T($):typeof B=="function"?B.apply(this,arguments):B;return r(yf.translate(R[0],R[1]).scale(K.k).translate(typeof F=="function"?-F.apply(this,arguments):-F,typeof k=="function"?-k.apply(this,arguments):-k),$,u)},B,H)};function N(z,F){return F=Math.max(s[0],Math.min(s[1],F)),F===z.k?z:new Vi(F,z.x,z.y)}function A(z,F,k){var B=F[0]-k[0]*z.k,H=F[1]-k[1]*z.k;return B===z.x&&H===z.y?z:new Vi(z.k,B,H)}function T(z){return[(+z[0][0]+ +z[1][0])/2,(+z[0][1]+ +z[1][1])/2]}function D(z,F,k,B){z.on("start.zoom",function(){L(this,arguments).event(B).start()}).on("interrupt.zoom end.zoom",function(){L(this,arguments).event(B).end()}).tween("zoom",function(){var H=this,$=arguments,K=L(H,$).event(B),R=t.apply(H,$),Y=k==null?T(R):typeof k=="function"?k.apply(H,$):k,J=Math.max(R[1][0]-R[0][0],R[1][1]-R[0][1]),ne=H.__zoom,se=typeof F=="function"?F.apply(H,$):F,fe=h(ne.invert(Y).concat(J/ne.k),se.invert(Y).concat(J/se.k));return function(de){if(de===1)de=se;else{var ce=fe(de),he=J/ce[2];de=new Vi(he,Y[0]-ce[0]*he,Y[1]-ce[1]*he)}K.zoom(null,de)}})}function L(z,F,k){return!k&&z.__zooming||new j(z,F)}function j(z,F){this.that=z,this.args=F,this.active=0,this.sourceEvent=null,this.extent=t.apply(z,F),this.taps=0}j.prototype={event:function(z){return z&&(this.sourceEvent=z),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(z,F){return this.mouse&&z!=="mouse"&&(this.mouse[1]=F.invert(this.mouse[0])),this.touch0&&z!=="touch"&&(this.touch0[1]=F.invert(this.touch0[0])),this.touch1&&z!=="touch"&&(this.touch1[1]=F.invert(this.touch1[0])),this.that.__zoom=F,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(z){var F=wn(this.that).datum();p.call(z,this.that,new YM(z,{sourceEvent:this.sourceEvent,target:C,transform:this.that.__zoom,dispatch:p}),F)}};function I(z,...F){if(!e.apply(this,arguments))return;var k=L(this,F).event(z),B=this.__zoom,H=Math.max(s[0],Math.min(s[1],B.k*Math.pow(2,a.apply(this,arguments)))),$=Vn(z);if(k.wheel)(k.mouse[0][0]!==$[0]||k.mouse[0][1]!==$[1])&&(k.mouse[1]=B.invert(k.mouse[0]=$)),clearTimeout(k.wheel);else{if(B.k===H)return;k.mouse=[$,B.invert($)],Tu(this),k.start()}ts(z),k.wheel=setTimeout(K,b),k.zoom("mouse",r(A(N(B,H),k.mouse[0],k.mouse[1]),k.extent,u));function K(){k.wheel=null,k.end()}}function Z(z,...F){if(v||!e.apply(this,arguments))return;var k=z.currentTarget,B=L(this,F,!0).event(z),H=wn(z.view).on("mousemove.zoom",Y,!0).on("mouseup.zoom",J,!0),$=Vn(z,k),K=z.clientX,R=z.clientY;Q1(z.view),fp(z),B.mouse=[$,this.__zoom.invert($)],Tu(this),B.start();function Y(ne){if(ts(ne),!B.moved){var se=ne.clientX-K,fe=ne.clientY-R;B.moved=se*se+fe*fe>w}B.event(ne).zoom("mouse",r(A(B.that.__zoom,B.mouse[0]=Vn(ne,k),B.mouse[1]),B.extent,u))}function J(ne){H.on("mousemove.zoom mouseup.zoom",null),P1(ne.view,B.moved),ts(ne),B.event(ne).end()}}function te(z,...F){if(e.apply(this,arguments)){var k=this.__zoom,B=Vn(z.changedTouches?z.changedTouches[0]:z,this),H=k.invert(B),$=k.k*(z.shiftKey?.5:2),K=r(A(N(k,$),B,H),t.apply(this,F),u);ts(z),f>0?wn(this).transition().duration(f).call(D,K,B,z):wn(this).call(C.transform,K,B,z)}}function G(z,...F){if(e.apply(this,arguments)){var k=z.touches,B=k.length,H=L(this,F,z.changedTouches.length===B).event(z),$,K,R,Y;for(fp(z),K=0;K<B;++K)R=k[K],Y=Vn(R,this),Y=[Y,this.__zoom.invert(Y),R.identifier],H.touch0?!H.touch1&&H.touch0[2]!==Y[2]&&(H.touch1=Y,H.taps=0):(H.touch0=Y,$=!0,H.taps=1+!!y);y&&(y=clearTimeout(y)),$&&(H.taps<2&&(g=Y[0],y=setTimeout(function(){y=null},x)),Tu(this),H.start())}}function q(z,...F){if(this.__zooming){var k=L(this,F).event(z),B=z.changedTouches,H=B.length,$,K,R,Y;for(ts(z),$=0;$<H;++$)K=B[$],R=Vn(K,this),k.touch0&&k.touch0[2]===K.identifier?k.touch0[0]=R:k.touch1&&k.touch1[2]===K.identifier&&(k.touch1[0]=R);if(K=k.that.__zoom,k.touch1){var J=k.touch0[0],ne=k.touch0[1],se=k.touch1[0],fe=k.touch1[1],de=(de=se[0]-J[0])*de+(de=se[1]-J[1])*de,ce=(ce=fe[0]-ne[0])*ce+(ce=fe[1]-ne[1])*ce;K=N(K,Math.sqrt(de/ce)),R=[(J[0]+se[0])/2,(J[1]+se[1])/2],Y=[(ne[0]+fe[0])/2,(ne[1]+fe[1])/2]}else if(k.touch0)R=k.touch0[0],Y=k.touch0[1];else return;k.zoom("touch",r(A(K,R,Y),k.extent,u))}}function ie(z,...F){if(this.__zooming){var k=L(this,F).event(z),B=z.changedTouches,H=B.length,$,K;for(fp(z),v&&clearTimeout(v),v=setTimeout(function(){v=null},x),$=0;$<H;++$)K=B[$],k.touch0&&k.touch0[2]===K.identifier?delete k.touch0:k.touch1&&k.touch1[2]===K.identifier&&delete k.touch1;if(k.touch1&&!k.touch0&&(k.touch0=k.touch1,delete k.touch1),k.touch0)k.touch0[1]=this.__zoom.invert(k.touch0[0]);else if(k.end(),k.taps===2&&(K=Vn(K,this),Math.hypot(g[0]-K[0],g[1]-K[1])<E)){var R=wn(this).on("dblclick.zoom");R&&R.apply(this,arguments)}}}return C.wheelDelta=function(z){return arguments.length?(a=typeof z=="function"?z:du(+z),C):a},C.filter=function(z){return arguments.length?(e=typeof z=="function"?z:du(!!z),C):e},C.touchable=function(z){return arguments.length?(o=typeof z=="function"?z:du(!!z),C):o},C.extent=function(z){return arguments.length?(t=typeof z=="function"?z:du([[+z[0][0],+z[0][1]],[+z[1][0],+z[1][1]]]),C):t},C.scaleExtent=function(z){return arguments.length?(s[0]=+z[0],s[1]=+z[1],C):[s[0],s[1]]},C.translateExtent=function(z){return arguments.length?(u[0][0]=+z[0][0],u[1][0]=+z[1][0],u[0][1]=+z[0][1],u[1][1]=+z[1][1],C):[[u[0][0],u[0][1]],[u[1][0],u[1][1]]]},C.constrain=function(z){return arguments.length?(r=z,C):r},C.duration=function(z){return arguments.length?(f=+z,C):f},C.interpolate=function(z){return arguments.length?(h=z,C):h},C.on=function(){var z=p.on.apply(p,arguments);return z===p?C:z},C.clickDistance=function(z){return arguments.length?(w=(z=+z)*z,C):Math.sqrt(w)},C.tapDistance=function(z){return arguments.length?(E=+z,C):E},C}const di={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:r,targetHandle:a})=>`Couldn't create edge for ${e} handle id: "${e==="source"?r:a}", edge id: ${t}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs."},ys=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],hw=["Enter"," ","Escape"],pw={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:r})=>`Moved selected node ${e}. New position, x: ${t}, y: ${r}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var $o;(function(e){e.Strict="strict",e.Loose="loose"})($o||($o={}));var _a;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(_a||(_a={}));var vs;(function(e){e.Partial="partial",e.Full="full"})(vs||(vs={}));const mw={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var zr;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(zr||(zr={}));var Gu;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Gu||(Gu={}));var ye;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(ye||(ye={}));const Cx={[ye.Left]:ye.Right,[ye.Right]:ye.Left,[ye.Top]:ye.Bottom,[ye.Bottom]:ye.Top};function gw(e){return e===null?null:e?"valid":"invalid"}const yw=e=>"id"in e&&"source"in e&&"target"in e,ZM=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),Dm=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),Ds=(e,t=[0,0])=>{const{width:r,height:a}=Ki(e),o=e.origin??t,s=r*o[0],u=a*o[1];return{x:e.position.x-s,y:e.position.y-u}},XM=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const r=e.reduce((a,o)=>{const s=typeof o=="string";let u=!t.nodeLookup&&!s?o:void 0;t.nodeLookup&&(u=s?t.nodeLookup.get(o):Dm(o)?o:t.nodeLookup.get(o.id));const f=u?Iu(u,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return vf(a,f)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return xf(r)},js=(e,t={})=>{let r={x:1/0,y:1/0,x2:-1/0,y2:-1/0},a=!1;return e.forEach(o=>{(t.filter===void 0||t.filter(o))&&(r=vf(r,Iu(o)),a=!0)}),a?xf(r):{x:0,y:0,width:0,height:0}},jm=(e,t,[r,a,o]=[0,0,1],s=!1,u=!1)=>{const f={...Ls(t,[r,a,o]),width:t.width/o,height:t.height/o},h=[];for(const p of e.values()){const{measured:y,selectable:g=!0,hidden:v=!1}=p;if(u&&!g||v)continue;const x=y.width??p.width??p.initialWidth??null,b=y.height??p.height??p.initialHeight??null,w=xs(f,qo(p)),E=(x??0)*(b??0),C=s&&w>0;(!p.internals.handleBounds||C||w>=E||p.dragging)&&h.push(p)}return h},FM=(e,t)=>{const r=new Set;return e.forEach(a=>{r.add(a.id)}),t.filter(a=>r.has(a.source)||r.has(a.target))};function QM(e,t){const r=new Map,a=t!=null&&t.nodes?new Set(t.nodes.map(o=>o.id)):null;return e.forEach(o=>{o.measured.width&&o.measured.height&&((t==null?void 0:t.includeHiddenNodes)||!o.hidden)&&(!a||a.has(o.id))&&r.set(o.id,o)}),r}async function PM({nodes:e,width:t,height:r,panZoom:a,minZoom:o,maxZoom:s},u){if(e.size===0)return Promise.resolve(!0);const f=QM(e,u),h=js(f),p=zm(h,t,r,(u==null?void 0:u.minZoom)??o,(u==null?void 0:u.maxZoom)??s,(u==null?void 0:u.padding)??.1);return await a.setViewport(p,{duration:u==null?void 0:u.duration,ease:u==null?void 0:u.ease,interpolate:u==null?void 0:u.interpolate}),Promise.resolve(!0)}function vw({nodeId:e,nextPosition:t,nodeLookup:r,nodeOrigin:a=[0,0],nodeExtent:o,onError:s}){const u=r.get(e),f=u.parentId?r.get(u.parentId):void 0,{x:h,y:p}=f?f.internals.positionAbsolute:{x:0,y:0},y=u.origin??a;let g=u.extent||o;if(u.extent==="parent"&&!u.expandParent)if(!f)s==null||s("005",di.error005());else{const x=f.measured.width,b=f.measured.height;x&&b&&(g=[[h,p],[h+x,p+b]])}else f&&Go(u.extent)&&(g=[[u.extent[0][0]+h,u.extent[0][1]+p],[u.extent[1][0]+h,u.extent[1][1]+p]]);const v=Go(g)?Na(t,g,u.measured):t;return(u.measured.width===void 0||u.measured.height===void 0)&&(s==null||s("015",di.error015())),{position:{x:v.x-h+(u.measured.width??0)*y[0],y:v.y-p+(u.measured.height??0)*y[1]},positionAbsolute:v}}async function KM({nodesToRemove:e=[],edgesToRemove:t=[],nodes:r,edges:a,onBeforeDelete:o}){const s=new Set(e.map(v=>v.id)),u=[];for(const v of r){if(v.deletable===!1)continue;const x=s.has(v.id),b=!x&&v.parentId&&u.find(w=>w.id===v.parentId);(x||b)&&u.push(v)}const f=new Set(t.map(v=>v.id)),h=a.filter(v=>v.deletable!==!1),y=FM(u,h);for(const v of h)f.has(v.id)&&!y.find(b=>b.id===v.id)&&y.push(v);if(!o)return{edges:y,nodes:u};const g=await o({nodes:u,edges:y});return typeof g=="boolean"?g?{edges:y,nodes:u}:{edges:[],nodes:[]}:g}const Vo=(e,t=0,r=1)=>Math.min(Math.max(e,t),r),Na=(e={x:0,y:0},t,r)=>({x:Vo(e.x,t[0][0],t[1][0]-((r==null?void 0:r.width)??0)),y:Vo(e.y,t[0][1],t[1][1]-((r==null?void 0:r.height)??0))});function xw(e,t,r){const{width:a,height:o}=Ki(r),{x:s,y:u}=r.internals.positionAbsolute;return Na(e,[[s,u],[s+a,u+o]],t)}const Ax=(e,t,r)=>e<t?Vo(Math.abs(e-t),1,t)/t:e>r?-Vo(Math.abs(e-r),1,t)/t:0,bw=(e,t,r=15,a=40)=>{const o=Ax(e.x,a,t.width-a)*r,s=Ax(e.y,a,t.height-a)*r;return[o,s]},vf=(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)}),Qp=({x:e,y:t,width:r,height:a})=>({x:e,y:t,x2:e+r,y2:t+a}),xf=({x:e,y:t,x2:r,y2:a})=>({x:e,y:t,width:r-e,height:a-t}),qo=(e,t=[0,0])=>{var o,s;const{x:r,y:a}=Dm(e)?e.internals.positionAbsolute:Ds(e,t);return{x:r,y:a,width:((o=e.measured)==null?void 0:o.width)??e.width??e.initialWidth??0,height:((s=e.measured)==null?void 0:s.height)??e.height??e.initialHeight??0}},Iu=(e,t=[0,0])=>{var o,s;const{x:r,y:a}=Dm(e)?e.internals.positionAbsolute:Ds(e,t);return{x:r,y:a,x2:r+(((o=e.measured)==null?void 0:o.width)??e.width??e.initialWidth??0),y2:a+(((s=e.measured)==null?void 0:s.height)??e.height??e.initialHeight??0)}},ww=(e,t)=>xf(vf(Qp(e),Qp(t))),xs=(e,t)=>{const r=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),a=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(r*a)},Nx=e=>Gn(e.width)&&Gn(e.height)&&Gn(e.x)&&Gn(e.y),Gn=e=>!isNaN(e)&&isFinite(e),WM=(e,t)=>{},zs=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),Ls=({x:e,y:t},[r,a,o],s=!1,u=[1,1])=>{const f={x:(e-r)/o,y:(t-a)/o};return s?zs(f,u):f},Zu=({x:e,y:t},[r,a,o])=>({x:e*o+r,y:t*o+a});function wo(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const r=parseFloat(e);if(!Number.isNaN(r))return Math.floor(r)}if(typeof e=="string"&&e.endsWith("%")){const r=parseFloat(e);if(!Number.isNaN(r))return Math.floor(t*r*.01)}return console.error(`[React Flow] The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function JM(e,t,r){if(typeof e=="string"||typeof e=="number"){const a=wo(e,r),o=wo(e,t);return{top:a,right:o,bottom:a,left:o,x:o*2,y:a*2}}if(typeof e=="object"){const a=wo(e.top??e.y??0,r),o=wo(e.bottom??e.y??0,r),s=wo(e.left??e.x??0,t),u=wo(e.right??e.x??0,t);return{top:a,right:u,bottom:o,left:s,x:s+u,y:a+o}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function eO(e,t,r,a,o,s){const{x:u,y:f}=Zu(e,[t,r,a]),{x:h,y:p}=Zu({x:e.x+e.width,y:e.y+e.height},[t,r,a]),y=o-h,g=s-p;return{left:Math.floor(u),top:Math.floor(f),right:Math.floor(y),bottom:Math.floor(g)}}const zm=(e,t,r,a,o,s)=>{const u=JM(s,t,r),f=(t-u.x)/e.width,h=(r-u.y)/e.height,p=Math.min(f,h),y=Vo(p,a,o),g=e.x+e.width/2,v=e.y+e.height/2,x=t/2-g*y,b=r/2-v*y,w=eO(e,x,b,y,t,r),E={left:Math.min(w.left-u.left,0),top:Math.min(w.top-u.top,0),right:Math.min(w.right-u.right,0),bottom:Math.min(w.bottom-u.bottom,0)};return{x:x-E.left+E.right,y:b-E.top+E.bottom,zoom:y}},bs=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function Go(e){return e!=null&&e!=="parent"}function Ki(e){var t,r;return{width:((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth??0,height:((r=e.measured)==null?void 0:r.height)??e.height??e.initialHeight??0}}function _w(e){var t,r;return(((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth)!==void 0&&(((r=e.measured)==null?void 0:r.height)??e.height??e.initialHeight)!==void 0}function Sw(e,t={width:0,height:0},r,a,o){const s={...e},u=a.get(r);if(u){const f=u.origin||o;s.x+=u.internals.positionAbsolute.x-(t.width??0)*f[0],s.y+=u.internals.positionAbsolute.y-(t.height??0)*f[1]}return s}function Tx(e,t){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}function tO(){let e,t;return{promise:new Promise((a,o)=>{e=a,t=o}),resolve:e,reject:t}}function nO(e){return{...pw,...e||{}}}function ds(e,{snapGrid:t=[0,0],snapToGrid:r=!1,transform:a,containerBounds:o}){const{x:s,y:u}=In(e),f=Ls({x:s-((o==null?void 0:o.left)??0),y:u-((o==null?void 0:o.top)??0)},a),{x:h,y:p}=r?zs(f,t):f;return{xSnapped:h,ySnapped:p,...f}}const Lm=e=>({width:e.offsetWidth,height:e.offsetHeight}),Ew=e=>{var t;return((t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},iO=["INPUT","SELECT","TEXTAREA"];function Cw(e){var a,o;const t=((o=(a=e.composedPath)==null?void 0:a.call(e))==null?void 0:o[0])||e.target;return(t==null?void 0:t.nodeType)!==1?!1:iO.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const Aw=e=>"clientX"in e,In=(e,t)=>{var s,u;const r=Aw(e),a=r?e.clientX:(s=e.touches)==null?void 0:s[0].clientX,o=r?e.clientY:(u=e.touches)==null?void 0:u[0].clientY;return{x:a-((t==null?void 0:t.left)??0),y:o-((t==null?void 0:t.top)??0)}},Mx=(e,t,r,a,o)=>{const s=t.querySelectorAll(`.${e}`);return!s||!s.length?null:Array.from(s).map(u=>{const f=u.getBoundingClientRect();return{id:u.getAttribute("data-handleid"),type:e,nodeId:o,position:u.getAttribute("data-handlepos"),x:(f.left-r.left)/a,y:(f.top-r.top)/a,...Lm(u)}})};function Nw({sourceX:e,sourceY:t,targetX:r,targetY:a,sourceControlX:o,sourceControlY:s,targetControlX:u,targetControlY:f}){const h=e*.125+o*.375+u*.375+r*.125,p=t*.125+s*.375+f*.375+a*.125,y=Math.abs(h-e),g=Math.abs(p-t);return[h,p,y,g]}function hu(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function Ox({pos:e,x1:t,y1:r,x2:a,y2:o,c:s}){switch(e){case ye.Left:return[t-hu(t-a,s),r];case ye.Right:return[t+hu(a-t,s),r];case ye.Top:return[t,r-hu(r-o,s)];case ye.Bottom:return[t,r+hu(o-r,s)]}}function Tw({sourceX:e,sourceY:t,sourcePosition:r=ye.Bottom,targetX:a,targetY:o,targetPosition:s=ye.Top,curvature:u=.25}){const[f,h]=Ox({pos:r,x1:e,y1:t,x2:a,y2:o,c:u}),[p,y]=Ox({pos:s,x1:a,y1:o,x2:e,y2:t,c:u}),[g,v,x,b]=Nw({sourceX:e,sourceY:t,targetX:a,targetY:o,sourceControlX:f,sourceControlY:h,targetControlX:p,targetControlY:y});return[`M${e},${t} C${f},${h} ${p},${y} ${a},${o}`,g,v,x,b]}function Mw({sourceX:e,sourceY:t,targetX:r,targetY:a}){const o=Math.abs(r-e)/2,s=r<e?r+o:r-o,u=Math.abs(a-t)/2,f=a<t?a+u:a-u;return[s,f,o,u]}function rO({sourceNode:e,targetNode:t,selected:r=!1,zIndex:a=0,elevateOnSelect:o=!1,zIndexMode:s="basic"}){if(s==="manual")return a;const u=o&&r?a+1e3:a,f=Math.max(e.parentId||o&&e.selected?e.internals.z:0,t.parentId||o&&t.selected?t.internals.z:0);return u+f}function aO({sourceNode:e,targetNode:t,width:r,height:a,transform:o}){const s=vf(Iu(e),Iu(t));s.x===s.x2&&(s.x2+=1),s.y===s.y2&&(s.y2+=1);const u={x:-o[0]/o[2],y:-o[1]/o[2],width:r/o[2],height:a/o[2]};return xs(u,xf(s))>0}const oO=({source:e,sourceHandle:t,target:r,targetHandle:a})=>`xy-edge__${e}${t||""}-${r}${a||""}`,lO=(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)),Ow=(e,t,r={})=>{if(!e.source||!e.target)return t;const a=r.getEdgeId||oO;let o;return yw(e)?o={...e}:o={...e,id:a(e)},lO(o,t)?t:(o.sourceHandle===null&&delete o.sourceHandle,o.targetHandle===null&&delete o.targetHandle,t.concat(o))};function kw({sourceX:e,sourceY:t,targetX:r,targetY:a}){const[o,s,u,f]=Mw({sourceX:e,sourceY:t,targetX:r,targetY:a});return[`M ${e},${t}L ${r},${a}`,o,s,u,f]}const kx={[ye.Left]:{x:-1,y:0},[ye.Right]:{x:1,y:0},[ye.Top]:{x:0,y:-1},[ye.Bottom]:{x:0,y:1}},sO=({source:e,sourcePosition:t=ye.Bottom,target:r})=>t===ye.Left||t===ye.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},Rx=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function cO({source:e,sourcePosition:t=ye.Bottom,target:r,targetPosition:a=ye.Top,center:o,offset:s,stepPosition:u}){const f=kx[t],h=kx[a],p={x:e.x+f.x*s,y:e.y+f.y*s},y={x:r.x+h.x*s,y:r.y+h.y*s},g=sO({source:p,sourcePosition:t,target:y}),v=g.x!==0?"x":"y",x=g[v];let b=[],w,E;const C={x:0,y:0},N={x:0,y:0},[,,A,T]=Mw({sourceX:e.x,sourceY:e.y,targetX:r.x,targetY:r.y});if(f[v]*h[v]===-1){v==="x"?(w=o.x??p.x+(y.x-p.x)*u,E=o.y??(p.y+y.y)/2):(w=o.x??(p.x+y.x)/2,E=o.y??p.y+(y.y-p.y)*u);const I=[{x:w,y:p.y},{x:w,y:y.y}],Z=[{x:p.x,y:E},{x:y.x,y:E}];f[v]===x?b=v==="x"?I:Z:b=v==="x"?Z:I}else{const I=[{x:p.x,y:y.y}],Z=[{x:y.x,y:p.y}];if(v==="x"?b=f.x===x?Z:I:b=f.y===x?I:Z,t===a){const z=Math.abs(e[v]-r[v]);if(z<=s){const F=Math.min(s-1,s-z);f[v]===x?C[v]=(p[v]>e[v]?-1:1)*F:N[v]=(y[v]>r[v]?-1:1)*F}}if(t!==a){const z=v==="x"?"y":"x",F=f[v]===h[z],k=p[z]>y[z],B=p[z]<y[z];(f[v]===1&&(!F&&k||F&&B)||f[v]!==1&&(!F&&B||F&&k))&&(b=v==="x"?I:Z)}const te={x:p.x+C.x,y:p.y+C.y},G={x:y.x+N.x,y:y.y+N.y},q=Math.max(Math.abs(te.x-b[0].x),Math.abs(G.x-b[0].x)),ie=Math.max(Math.abs(te.y-b[0].y),Math.abs(G.y-b[0].y));q>=ie?(w=(te.x+G.x)/2,E=b[0].y):(w=b[0].x,E=(te.y+G.y)/2)}const D={x:p.x+C.x,y:p.y+C.y},L={x:y.x+N.x,y:y.y+N.y};return[[e,...D.x!==b[0].x||D.y!==b[0].y?[D]:[],...b,...L.x!==b[b.length-1].x||L.y!==b[b.length-1].y?[L]:[],r],w,E,A,T]}function uO(e,t,r,a){const o=Math.min(Rx(e,t)/2,Rx(t,r)/2,a),{x:s,y:u}=t;if(e.x===s&&s===r.x||e.y===u&&u===r.y)return`L${s} ${u}`;if(e.y===u){const p=e.x<r.x?-1:1,y=e.y<r.y?1:-1;return`L ${s+o*p},${u}Q ${s},${u} ${s},${u+o*y}`}const f=e.x<r.x?1:-1,h=e.y<r.y?-1:1;return`L ${s},${u+o*h}Q ${s},${u} ${s+o*f},${u}`}function Pp({sourceX:e,sourceY:t,sourcePosition:r=ye.Bottom,targetX:a,targetY:o,targetPosition:s=ye.Top,borderRadius:u=5,centerX:f,centerY:h,offset:p=20,stepPosition:y=.5}){const[g,v,x,b,w]=cO({source:{x:e,y:t},sourcePosition:r,target:{x:a,y:o},targetPosition:s,center:{x:f,y:h},offset:p,stepPosition:y});let E=`M${g[0].x} ${g[0].y}`;for(let C=1;C<g.length-1;C++)E+=uO(g[C-1],g[C],g[C+1],u);return E+=`L${g[g.length-1].x} ${g[g.length-1].y}`,[E,v,x,b,w]}function Dx(e){var t;return e&&!!(e.internals.handleBounds||(t=e.handles)!=null&&t.length)&&!!(e.measured.width||e.width||e.initialWidth)}function fO(e){var g;const{sourceNode:t,targetNode:r}=e;if(!Dx(t)||!Dx(r))return null;const a=t.internals.handleBounds||jx(t.handles),o=r.internals.handleBounds||jx(r.handles),s=zx((a==null?void 0:a.source)??[],e.sourceHandle),u=zx(e.connectionMode===$o.Strict?(o==null?void 0:o.target)??[]:((o==null?void 0:o.target)??[]).concat((o==null?void 0:o.source)??[]),e.targetHandle);if(!s||!u)return(g=e.onError)==null||g.call(e,"008",di.error008(s?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const f=(s==null?void 0:s.position)||ye.Bottom,h=(u==null?void 0:u.position)||ye.Top,p=Ta(t,s,f),y=Ta(r,u,h);return{sourceX:p.x,sourceY:p.y,targetX:y.x,targetY:y.y,sourcePosition:f,targetPosition:h}}function jx(e){if(!e)return null;const t=[],r=[];for(const a of e)a.width=a.width??1,a.height=a.height??1,a.type==="source"?t.push(a):a.type==="target"&&r.push(a);return{source:t,target:r}}function Ta(e,t,r=ye.Left,a=!1){const o=((t==null?void 0:t.x)??0)+e.internals.positionAbsolute.x,s=((t==null?void 0:t.y)??0)+e.internals.positionAbsolute.y,{width:u,height:f}=t??Ki(e);if(a)return{x:o+u/2,y:s+f/2};switch((t==null?void 0:t.position)??r){case ye.Top:return{x:o+u/2,y:s};case ye.Right:return{x:o+u,y:s+f/2};case ye.Bottom:return{x:o+u/2,y:s+f};case ye.Left:return{x:o,y:s+f/2}}}function zx(e,t){return e&&(t?e.find(r=>r.id===t):e[0])||null}function Kp(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(a=>`${a}=${e[a]}`).join("&")}`:""}function dO(e,{id:t,defaultColor:r,defaultMarkerStart:a,defaultMarkerEnd:o}){const s=new Set;return e.reduce((u,f)=>([f.markerStart||a,f.markerEnd||o].forEach(h=>{if(h&&typeof h=="object"){const p=Kp(h,t);s.has(p)||(u.push({id:p,color:h.color||r,...h}),s.add(p))}}),u),[]).sort((u,f)=>u.id.localeCompare(f.id))}const Rw=1e3,hO=10,Hm={nodeOrigin:[0,0],nodeExtent:ys,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},pO={...Hm,checkEquality:!0};function Bm(e,t){const r={...e};for(const a in t)t[a]!==void 0&&(r[a]=t[a]);return r}function mO(e,t,r){const a=Bm(Hm,r);for(const o of e.values())if(o.parentId)Ym(o,e,t,a);else{const s=Ds(o,a.nodeOrigin),u=Go(o.extent)?o.extent:a.nodeExtent,f=Na(s,u,Ki(o));o.internals.positionAbsolute=f}}function gO(e,t){if(!e.handles)return e.measured?t==null?void 0:t.internals.handleBounds:void 0;const r=[],a=[];for(const o of e.handles){const s={id:o.id,width:o.width??1,height:o.height??1,nodeId:e.id,x:o.x,y:o.y,position:o.position,type:o.type};o.type==="source"?r.push(s):o.type==="target"&&a.push(s)}return{source:r,target:a}}function Um(e){return e==="manual"}function Wp(e,t,r,a={}){var y,g;const o=Bm(pO,a),s={i:0},u=new Map(t),f=o!=null&&o.elevateNodesOnSelect&&!Um(o.zIndexMode)?Rw:0;let h=e.length>0,p=!1;t.clear(),r.clear();for(const v of e){let x=u.get(v.id);if(o.checkEquality&&v===(x==null?void 0:x.internals.userNode))t.set(v.id,x);else{const b=Ds(v,o.nodeOrigin),w=Go(v.extent)?v.extent:o.nodeExtent,E=Na(b,w,Ki(v));x={...o.defaults,...v,measured:{width:(y=v.measured)==null?void 0:y.width,height:(g=v.measured)==null?void 0:g.height},internals:{positionAbsolute:E,handleBounds:gO(v,x),z:Dw(v,f,o.zIndexMode),userNode:v}},t.set(v.id,x)}(x.measured===void 0||x.measured.width===void 0||x.measured.height===void 0)&&!x.hidden&&(h=!1),v.parentId&&Ym(x,t,r,a,s),p||(p=v.selected??!1)}return{nodesInitialized:h,hasSelectedNodes:p}}function yO(e,t){if(!e.parentId)return;const r=t.get(e.parentId);r?r.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function Ym(e,t,r,a,o){const{elevateNodesOnSelect:s,nodeOrigin:u,nodeExtent:f,zIndexMode:h}=Bm(Hm,a),p=e.parentId,y=t.get(p);if(!y){console.warn(`Parent node ${p} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}yO(e,r),o&&!y.parentId&&y.internals.rootParentIndex===void 0&&h==="auto"&&(y.internals.rootParentIndex=++o.i,y.internals.z=y.internals.z+o.i*hO),o&&y.internals.rootParentIndex!==void 0&&(o.i=y.internals.rootParentIndex);const g=s&&!Um(h)?Rw:0,{x:v,y:x,z:b}=vO(e,y,u,f,g,h),{positionAbsolute:w}=e.internals,E=v!==w.x||x!==w.y;(E||b!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:E?{x:v,y:x}:w,z:b}})}function Dw(e,t,r){const a=Gn(e.zIndex)?e.zIndex:0;return Um(r)?a:a+(e.selected?t:0)}function vO(e,t,r,a,o,s){const{x:u,y:f}=t.internals.positionAbsolute,h=Ki(e),p=Ds(e,r),y=Go(e.extent)?Na(p,e.extent,h):p;let g=Na({x:u+y.x,y:f+y.y},a,h);e.extent==="parent"&&(g=xw(g,h,t));const v=Dw(e,o,s),x=t.internals.z??0;return{x:g.x,y:g.y,z:x>=v?x+1:v}}function $m(e,t,r,a=[0,0]){var u;const o=[],s=new Map;for(const f of e){const h=t.get(f.parentId);if(!h)continue;const p=((u=s.get(f.parentId))==null?void 0:u.expandedRect)??qo(h),y=ww(p,f.rect);s.set(f.parentId,{expandedRect:y,parent:h})}return s.size>0&&s.forEach(({expandedRect:f,parent:h},p)=>{var A;const y=h.internals.positionAbsolute,g=Ki(h),v=h.origin??a,x=f.x<y.x?Math.round(Math.abs(y.x-f.x)):0,b=f.y<y.y?Math.round(Math.abs(y.y-f.y)):0,w=Math.max(g.width,Math.round(f.width)),E=Math.max(g.height,Math.round(f.height)),C=(w-g.width)*v[0],N=(E-g.height)*v[1];(x>0||b>0||C||N)&&(o.push({id:p,type:"position",position:{x:h.position.x-x+C,y:h.position.y-b+N}}),(A=r.get(p))==null||A.forEach(T=>{e.some(D=>D.id===T.id)||o.push({id:T.id,type:"position",position:{x:T.position.x+x,y:T.position.y+b}})})),(g.width<f.width||g.height<f.height||x||b)&&o.push({id:p,type:"dimensions",setAttributes:!0,dimensions:{width:w+(x?v[0]*x-C:0),height:E+(b?v[1]*b-N:0)}})}),o}function xO(e,t,r,a,o,s,u){const f=a==null?void 0:a.querySelector(".xyflow__viewport");let h=!1;if(!f)return{changes:[],updatedInternals:h};const p=[],y=window.getComputedStyle(f),{m22:g}=new window.DOMMatrixReadOnly(y.transform),v=[];for(const x of e.values()){const b=t.get(x.id);if(!b)continue;if(b.hidden){t.set(b.id,{...b,internals:{...b.internals,handleBounds:void 0}}),h=!0;continue}const w=Lm(x.nodeElement),E=b.measured.width!==w.width||b.measured.height!==w.height;if(!!(w.width&&w.height&&(E||!b.internals.handleBounds||x.force))){const N=x.nodeElement.getBoundingClientRect(),A=Go(b.extent)?b.extent:s;let{positionAbsolute:T}=b.internals;b.parentId&&b.extent==="parent"?T=xw(T,w,t.get(b.parentId)):A&&(T=Na(T,A,w));const D={...b,measured:w,internals:{...b.internals,positionAbsolute:T,handleBounds:{source:Mx("source",x.nodeElement,N,g,b.id),target:Mx("target",x.nodeElement,N,g,b.id)}}};t.set(b.id,D),b.parentId&&Ym(D,t,r,{nodeOrigin:o,zIndexMode:u}),h=!0,E&&(p.push({id:b.id,type:"dimensions",dimensions:w}),b.expandParent&&b.parentId&&v.push({id:b.id,parentId:b.parentId,rect:qo(D,o)}))}}if(v.length>0){const x=$m(v,t,r,o);p.push(...x)}return{changes:p,updatedInternals:h}}async function bO({delta:e,panZoom:t,transform:r,translateExtent:a,width:o,height:s}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);const u=await t.setViewportConstrained({x:r[0]+e.x,y:r[1]+e.y,zoom:r[2]},[[0,0],[o,s]],a),f=!!u&&(u.x!==r[0]||u.y!==r[1]||u.k!==r[2]);return Promise.resolve(f)}function Lx(e,t,r,a,o,s){let u=o;const f=a.get(u)||new Map;a.set(u,f.set(r,t)),u=`${o}-${e}`;const h=a.get(u)||new Map;if(a.set(u,h.set(r,t)),s){u=`${o}-${e}-${s}`;const p=a.get(u)||new Map;a.set(u,p.set(r,t))}}function jw(e,t,r){e.clear(),t.clear();for(const a of r){const{source:o,target:s,sourceHandle:u=null,targetHandle:f=null}=a,h={edgeId:a.id,source:o,target:s,sourceHandle:u,targetHandle:f},p=`${o}-${u}--${s}-${f}`,y=`${s}-${f}--${o}-${u}`;Lx("source",h,y,e,o,u),Lx("target",h,p,e,s,f),t.set(a.id,a)}}function zw(e,t){if(!e.parentId)return!1;const r=t.get(e.parentId);return r?r.selected?!0:zw(r,t):!1}function Hx(e,t,r){var o;let a=e;do{if((o=a==null?void 0:a.matches)!=null&&o.call(a,t))return!0;if(a===r)return!1;a=a==null?void 0:a.parentElement}while(a);return!1}function wO(e,t,r,a){const o=new Map;for(const[s,u]of e)if((u.selected||u.id===a)&&(!u.parentId||!zw(u,e))&&(u.draggable||t&&typeof u.draggable>"u")){const f=e.get(s);f&&o.set(s,{id:s,position:f.position||{x:0,y:0},distance:{x:r.x-f.internals.positionAbsolute.x,y:r.y-f.internals.positionAbsolute.y},extent:f.extent,parentId:f.parentId,origin:f.origin,expandParent:f.expandParent,internals:{positionAbsolute:f.internals.positionAbsolute||{x:0,y:0}},measured:{width:f.measured.width??0,height:f.measured.height??0}})}return o}function dp({nodeId:e,dragItems:t,nodeLookup:r,dragging:a=!0}){var u,f,h;const o=[];for(const[p,y]of t){const g=(u=r.get(p))==null?void 0:u.internals.userNode;g&&o.push({...g,position:y.position,dragging:a})}if(!e)return[o[0],o];const s=(f=r.get(e))==null?void 0:f.internals.userNode;return[s?{...s,position:((h=t.get(e))==null?void 0:h.position)||s.position,dragging:a}:o[0],o]}function _O({dragItems:e,snapGrid:t,x:r,y:a}){const o=e.values().next().value;if(!o)return null;const s={x:r-o.distance.x,y:a-o.distance.y},u=zs(s,t);return{x:u.x-s.x,y:u.y-s.y}}function SO({onNodeMouseDown:e,getStoreItems:t,onDragStart:r,onDrag:a,onDragStop:o}){let s={x:null,y:null},u=0,f=new Map,h=!1,p={x:0,y:0},y=null,g=!1,v=null,x=!1,b=!1,w=null;function E({noDragClassName:N,handleSelector:A,domNode:T,isSelectable:D,nodeId:L,nodeClickDistance:j=0}){v=wn(T);function I({x:q,y:ie}){const{nodeLookup:z,nodeExtent:F,snapGrid:k,snapToGrid:B,nodeOrigin:H,onNodeDrag:$,onSelectionDrag:K,onError:R,updateNodePositions:Y}=t();s={x:q,y:ie};let J=!1;const ne=f.size>1,se=ne&&F?Qp(js(f)):null,fe=ne&&B?_O({dragItems:f,snapGrid:k,x:q,y:ie}):null;for(const[de,ce]of f){if(!z.has(de))continue;let he={x:q-ce.distance.x,y:ie-ce.distance.y};B&&(he=fe?{x:Math.round(he.x+fe.x),y:Math.round(he.y+fe.y)}:zs(he,k));let Ae=null;if(ne&&F&&!ce.extent&&se){const{positionAbsolute:be}=ce.internals,ke=be.x-se.x+F[0][0],Fe=be.x+ce.measured.width-se.x2+F[1][0],Le=be.y-se.y+F[0][1],yt=be.y+ce.measured.height-se.y2+F[1][1];Ae=[[ke,Le],[Fe,yt]]}const{position:Ee,positionAbsolute:_e}=vw({nodeId:de,nextPosition:he,nodeLookup:z,nodeExtent:Ae||F,nodeOrigin:H,onError:R});J=J||ce.position.x!==Ee.x||ce.position.y!==Ee.y,ce.position=Ee,ce.internals.positionAbsolute=_e}if(b=b||J,!!J&&(Y(f,!0),w&&(a||$||!L&&K))){const[de,ce]=dp({nodeId:L,dragItems:f,nodeLookup:z});a==null||a(w,f,de,ce),$==null||$(w,de,ce),L||K==null||K(w,ce)}}async function Z(){if(!y)return;const{transform:q,panBy:ie,autoPanSpeed:z,autoPanOnNodeDrag:F}=t();if(!F){h=!1,cancelAnimationFrame(u);return}const[k,B]=bw(p,y,z);(k!==0||B!==0)&&(s.x=(s.x??0)-k/q[2],s.y=(s.y??0)-B/q[2],await ie({x:k,y:B})&&I(s)),u=requestAnimationFrame(Z)}function te(q){var ne;const{nodeLookup:ie,multiSelectionActive:z,nodesDraggable:F,transform:k,snapGrid:B,snapToGrid:H,selectNodesOnDrag:$,onNodeDragStart:K,onSelectionDragStart:R,unselectNodesAndEdges:Y}=t();g=!0,(!$||!D)&&!z&&L&&((ne=ie.get(L))!=null&&ne.selected||Y()),D&&$&&L&&(e==null||e(L));const J=ds(q.sourceEvent,{transform:k,snapGrid:B,snapToGrid:H,containerBounds:y});if(s=J,f=wO(ie,F,J,L),f.size>0&&(r||K||!L&&R)){const[se,fe]=dp({nodeId:L,dragItems:f,nodeLookup:ie});r==null||r(q.sourceEvent,f,se,fe),K==null||K(q.sourceEvent,se,fe),L||R==null||R(q.sourceEvent,fe)}}const G=K1().clickDistance(j).on("start",q=>{const{domNode:ie,nodeDragThreshold:z,transform:F,snapGrid:k,snapToGrid:B}=t();y=(ie==null?void 0:ie.getBoundingClientRect())||null,x=!1,b=!1,w=q.sourceEvent,z===0&&te(q),s=ds(q.sourceEvent,{transform:F,snapGrid:k,snapToGrid:B,containerBounds:y}),p=In(q.sourceEvent,y)}).on("drag",q=>{const{autoPanOnNodeDrag:ie,transform:z,snapGrid:F,snapToGrid:k,nodeDragThreshold:B,nodeLookup:H}=t(),$=ds(q.sourceEvent,{transform:z,snapGrid:F,snapToGrid:k,containerBounds:y});if(w=q.sourceEvent,(q.sourceEvent.type==="touchmove"&&q.sourceEvent.touches.length>1||L&&!H.has(L))&&(x=!0),!x){if(!h&&ie&&g&&(h=!0,Z()),!g){const K=In(q.sourceEvent,y),R=K.x-p.x,Y=K.y-p.y;Math.sqrt(R*R+Y*Y)>B&&te(q)}(s.x!==$.xSnapped||s.y!==$.ySnapped)&&f&&g&&(p=In(q.sourceEvent,y),I($))}}).on("end",q=>{if(!(!g||x)&&(h=!1,g=!1,cancelAnimationFrame(u),f.size>0)){const{nodeLookup:ie,updateNodePositions:z,onNodeDragStop:F,onSelectionDragStop:k}=t();if(b&&(z(f,!1),b=!1),o||F||!L&&k){const[B,H]=dp({nodeId:L,dragItems:f,nodeLookup:ie,dragging:!1});o==null||o(q.sourceEvent,f,B,H),F==null||F(q.sourceEvent,B,H),L||k==null||k(q.sourceEvent,H)}}}).filter(q=>{const ie=q.target;return!q.button&&(!N||!Hx(ie,`.${N}`,T))&&(!A||Hx(ie,A,T))});v.call(G)}function C(){v==null||v.on(".drag",null)}return{update:E,destroy:C}}function EO(e,t,r){const a=[],o={x:e.x-r,y:e.y-r,width:r*2,height:r*2};for(const s of t.values())xs(o,qo(s))>0&&a.push(s);return a}const CO=250;function AO(e,t,r,a){var f,h;let o=[],s=1/0;const u=EO(e,r,t+CO);for(const p of u){const y=[...((f=p.internals.handleBounds)==null?void 0:f.source)??[],...((h=p.internals.handleBounds)==null?void 0:h.target)??[]];for(const g of y){if(a.nodeId===g.nodeId&&a.type===g.type&&a.id===g.id)continue;const{x:v,y:x}=Ta(p,g,g.position,!0),b=Math.sqrt(Math.pow(v-e.x,2)+Math.pow(x-e.y,2));b>t||(b<s?(o=[{...g,x:v,y:x}],s=b):b===s&&o.push({...g,x:v,y:x}))}}if(!o.length)return null;if(o.length>1){const p=a.type==="source"?"target":"source";return o.find(y=>y.type===p)??o[0]}return o[0]}function Lw(e,t,r,a,o,s=!1){var p,y,g;const u=a.get(e);if(!u)return null;const f=o==="strict"?(p=u.internals.handleBounds)==null?void 0:p[t]:[...((y=u.internals.handleBounds)==null?void 0:y.source)??[],...((g=u.internals.handleBounds)==null?void 0:g.target)??[]],h=(r?f==null?void 0:f.find(v=>v.id===r):f==null?void 0:f[0])??null;return h&&s?{...h,...Ta(u,h,h.position,!0)}:h}function Hw(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function NO(e,t){let r=null;return t?r=!0:e&&!t&&(r=!1),r}const Bw=()=>!0;function TO(e,{connectionMode:t,connectionRadius:r,handleId:a,nodeId:o,edgeUpdaterType:s,isTarget:u,domNode:f,nodeLookup:h,lib:p,autoPanOnConnect:y,flowId:g,panBy:v,cancelConnection:x,onConnectStart:b,onConnect:w,onConnectEnd:E,isValidConnection:C=Bw,onReconnectEnd:N,updateConnection:A,getTransform:T,getFromHandle:D,autoPanSpeed:L,dragThreshold:j=1,handleDomNode:I}){const Z=Ew(e.target);let te=0,G;const{x:q,y:ie}=In(e),z=Hw(s,I),F=f==null?void 0:f.getBoundingClientRect();let k=!1;if(!F||!z)return;const B=Lw(o,z,a,h,t);if(!B)return;let H=In(e,F),$=!1,K=null,R=!1,Y=null;function J(){if(!y||!F)return;const[Ee,_e]=bw(H,F,L);v({x:Ee,y:_e}),te=requestAnimationFrame(J)}const ne={...B,nodeId:o,type:z,position:B.position},se=h.get(o);let de={inProgress:!0,isValid:null,from:Ta(se,ne,ye.Left,!0),fromHandle:ne,fromPosition:ne.position,fromNode:se,to:H,toHandle:null,toPosition:Cx[ne.position],toNode:null,pointer:H};function ce(){k=!0,A(de),b==null||b(e,{nodeId:o,handleId:a,handleType:z})}j===0&&ce();function he(Ee){if(!k){const{x:yt,y:dn}=In(Ee),Ot=yt-q,Hn=dn-ie;if(!(Ot*Ot+Hn*Hn>j*j))return;ce()}if(!D()||!ne){Ae(Ee);return}const _e=T();H=In(Ee,F),G=AO(Ls(H,_e,!1,[1,1]),r,h,ne),$||(J(),$=!0);const be=Uw(Ee,{handle:G,connectionMode:t,fromNodeId:o,fromHandleId:a,fromType:u?"target":"source",isValidConnection:C,doc:Z,lib:p,flowId:g,nodeLookup:h});Y=be.handleDomNode,K=be.connection,R=NO(!!G,be.isValid);const ke=h.get(o),Fe=ke?Ta(ke,ne,ye.Left,!0):de.from,Le={...de,from:Fe,isValid:R,to:be.toHandle&&R?Zu({x:be.toHandle.x,y:be.toHandle.y},_e):H,toHandle:be.toHandle,toPosition:R&&be.toHandle?be.toHandle.position:Cx[ne.position],toNode:be.toHandle?h.get(be.toHandle.nodeId):null,pointer:H};A(Le),de=Le}function Ae(Ee){if(!("touches"in Ee&&Ee.touches.length>0)){if(k){(G||Y)&&K&&R&&(w==null||w(K));const{inProgress:_e,...be}=de,ke={...be,toPosition:de.toHandle?de.toPosition:null};E==null||E(Ee,ke),s&&(N==null||N(Ee,ke))}x(),cancelAnimationFrame(te),$=!1,R=!1,K=null,Y=null,Z.removeEventListener("mousemove",he),Z.removeEventListener("mouseup",Ae),Z.removeEventListener("touchmove",he),Z.removeEventListener("touchend",Ae)}}Z.addEventListener("mousemove",he),Z.addEventListener("mouseup",Ae),Z.addEventListener("touchmove",he),Z.addEventListener("touchend",Ae)}function Uw(e,{handle:t,connectionMode:r,fromNodeId:a,fromHandleId:o,fromType:s,doc:u,lib:f,flowId:h,isValidConnection:p=Bw,nodeLookup:y}){const g=s==="target",v=t?u.querySelector(`.${f}-flow__handle[data-id="${h}-${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`):null,{x,y:b}=In(e),w=u.elementFromPoint(x,b),E=w!=null&&w.classList.contains(`${f}-flow__handle`)?w:v,C={handleDomNode:E,isValid:!1,connection:null,toHandle:null};if(E){const N=Hw(void 0,E),A=E.getAttribute("data-nodeid"),T=E.getAttribute("data-handleid"),D=E.classList.contains("connectable"),L=E.classList.contains("connectableend");if(!A||!N)return C;const j={source:g?A:a,sourceHandle:g?T:o,target:g?a:A,targetHandle:g?o:T};C.connection=j;const Z=D&&L&&(r===$o.Strict?g&&N==="source"||!g&&N==="target":A!==a||T!==o);C.isValid=Z&&p(j),C.toHandle=Lw(A,N,T,y,r,!0)}return C}const Jp={onPointerDown:TO,isValid:Uw};function MO({domNode:e,panZoom:t,getTransform:r,getViewScale:a}){const o=wn(e);function s({translateExtent:f,width:h,height:p,zoomStep:y=1,pannable:g=!0,zoomable:v=!0,inversePan:x=!1}){const b=A=>{if(A.sourceEvent.type!=="wheel"||!t)return;const T=r(),D=A.sourceEvent.ctrlKey&&bs()?10:1,L=-A.sourceEvent.deltaY*(A.sourceEvent.deltaMode===1?.05:A.sourceEvent.deltaMode?1:.002)*y,j=T[2]*Math.pow(2,L*D);t.scaleTo(j)};let w=[0,0];const E=A=>{(A.sourceEvent.type==="mousedown"||A.sourceEvent.type==="touchstart")&&(w=[A.sourceEvent.clientX??A.sourceEvent.touches[0].clientX,A.sourceEvent.clientY??A.sourceEvent.touches[0].clientY])},C=A=>{const T=r();if(A.sourceEvent.type!=="mousemove"&&A.sourceEvent.type!=="touchmove"||!t)return;const D=[A.sourceEvent.clientX??A.sourceEvent.touches[0].clientX,A.sourceEvent.clientY??A.sourceEvent.touches[0].clientY],L=[D[0]-w[0],D[1]-w[1]];w=D;const j=a()*Math.max(T[2],Math.log(T[2]))*(x?-1:1),I={x:T[0]-L[0]*j,y:T[1]-L[1]*j},Z=[[0,0],[h,p]];t.setViewportConstrained({x:I.x,y:I.y,zoom:T[2]},Z,f)},N=dw().on("start",E).on("zoom",g?C:null).on("zoom.wheel",v?b:null);o.call(N,{})}function u(){o.on("zoom",null)}return{update:s,destroy:u,pointer:Vn}}const bf=e=>({x:e.x,y:e.y,zoom:e.k}),hp=({x:e,y:t,zoom:r})=>yf.translate(e,t).scale(r),Mo=(e,t)=>e.target.closest(`.${t}`),Yw=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),OO=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,pp=(e,t=0,r=OO,a=()=>{})=>{const o=typeof t=="number"&&t>0;return o||a(),o?e.transition().duration(t).ease(r).on("end",a):e},$w=e=>{const t=e.ctrlKey&&bs()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function kO({zoomPanValues:e,noWheelClassName:t,d3Selection:r,d3Zoom:a,panOnScrollMode:o,panOnScrollSpeed:s,zoomOnPinch:u,onPanZoomStart:f,onPanZoom:h,onPanZoomEnd:p}){return y=>{if(Mo(y,t))return y.ctrlKey&&y.preventDefault(),!1;y.preventDefault(),y.stopImmediatePropagation();const g=r.property("__zoom").k||1;if(y.ctrlKey&&u){const E=Vn(y),C=$w(y),N=g*Math.pow(2,C);a.scaleTo(r,N,E,y);return}const v=y.deltaMode===1?20:1;let x=o===_a.Vertical?0:y.deltaX*v,b=o===_a.Horizontal?0:y.deltaY*v;!bs()&&y.shiftKey&&o!==_a.Vertical&&(x=y.deltaY*v,b=0),a.translateBy(r,-(x/g)*s,-(b/g)*s,{internal:!0});const w=bf(r.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(h==null||h(y,w),e.panScrollTimeout=setTimeout(()=>{p==null||p(y,w),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,f==null||f(y,w))}}function RO({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:r}){return function(a,o){const s=a.type==="wheel",u=!t&&s&&!a.ctrlKey,f=Mo(a,e);if(a.ctrlKey&&s&&f&&a.preventDefault(),u||f)return null;a.preventDefault(),r.call(this,a,o)}}function DO({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:r}){return a=>{var s,u,f;if((s=a.sourceEvent)!=null&&s.internal)return;const o=bf(a.transform);e.mouseButton=((u=a.sourceEvent)==null?void 0:u.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=o,((f=a.sourceEvent)==null?void 0:f.type)==="mousedown"&&t(!0),r&&(r==null||r(a.sourceEvent,o))}}function jO({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:r,onTransformChange:a,onPanZoom:o}){return s=>{var u,f;e.usedRightMouseButton=!!(r&&Yw(t,e.mouseButton??0)),(u=s.sourceEvent)!=null&&u.sync||a([s.transform.x,s.transform.y,s.transform.k]),o&&!((f=s.sourceEvent)!=null&&f.internal)&&(o==null||o(s.sourceEvent,bf(s.transform)))}}function zO({zoomPanValues:e,panOnDrag:t,panOnScroll:r,onDraggingChange:a,onPanZoomEnd:o,onPaneContextMenu:s}){return u=>{var f;if(!((f=u.sourceEvent)!=null&&f.internal)&&(e.isZoomingOrPanning=!1,s&&Yw(t,e.mouseButton??0)&&!e.usedRightMouseButton&&u.sourceEvent&&s(u.sourceEvent),e.usedRightMouseButton=!1,a(!1),o)){const h=bf(u.transform);e.prevViewport=h,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{o==null||o(u.sourceEvent,h)},r?150:0)}}}function LO({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:r,panOnDrag:a,panOnScroll:o,zoomOnDoubleClick:s,userSelectionActive:u,noWheelClassName:f,noPanClassName:h,lib:p,connectionInProgress:y}){return g=>{var E;const v=e||t,x=r&&g.ctrlKey,b=g.type==="wheel";if(g.button===1&&g.type==="mousedown"&&(Mo(g,`${p}-flow__node`)||Mo(g,`${p}-flow__edge`)))return!0;if(!a&&!v&&!o&&!s&&!r||u||y&&!b||Mo(g,f)&&b||Mo(g,h)&&(!b||o&&b&&!e)||!r&&g.ctrlKey&&b)return!1;if(!r&&g.type==="touchstart"&&((E=g.touches)==null?void 0:E.length)>1)return g.preventDefault(),!1;if(!v&&!o&&!x&&b||!a&&(g.type==="mousedown"||g.type==="touchstart")||Array.isArray(a)&&!a.includes(g.button)&&g.type==="mousedown")return!1;const w=Array.isArray(a)&&a.includes(g.button)||!g.button||g.button<=1;return(!g.ctrlKey||b)&&w}}function HO({domNode:e,minZoom:t,maxZoom:r,translateExtent:a,viewport:o,onPanZoom:s,onPanZoomStart:u,onPanZoomEnd:f,onDraggingChange:h}){const p={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},y=e.getBoundingClientRect(),g=dw().scaleExtent([t,r]).translateExtent(a),v=wn(e).call(g);N({x:o.x,y:o.y,zoom:Vo(o.zoom,t,r)},[[0,0],[y.width,y.height]],a);const x=v.on("wheel.zoom"),b=v.on("dblclick.zoom");g.wheelDelta($w);function w(G,q){return v?new Promise(ie=>{g==null||g.interpolate((q==null?void 0:q.interpolate)==="linear"?fs:Cu).transform(pp(v,q==null?void 0:q.duration,q==null?void 0:q.ease,()=>ie(!0)),G)}):Promise.resolve(!1)}function E({noWheelClassName:G,noPanClassName:q,onPaneContextMenu:ie,userSelectionActive:z,panOnScroll:F,panOnDrag:k,panOnScrollMode:B,panOnScrollSpeed:H,preventScrolling:$,zoomOnPinch:K,zoomOnScroll:R,zoomOnDoubleClick:Y,zoomActivationKeyPressed:J,lib:ne,onTransformChange:se,connectionInProgress:fe,paneClickDistance:de,selectionOnDrag:ce}){z&&!p.isZoomingOrPanning&&C();const he=F&&!J&&!z;g.clickDistance(ce?1/0:!Gn(de)||de<0?0:de);const Ae=he?kO({zoomPanValues:p,noWheelClassName:G,d3Selection:v,d3Zoom:g,panOnScrollMode:B,panOnScrollSpeed:H,zoomOnPinch:K,onPanZoomStart:u,onPanZoom:s,onPanZoomEnd:f}):RO({noWheelClassName:G,preventScrolling:$,d3ZoomHandler:x});if(v.on("wheel.zoom",Ae,{passive:!1}),!z){const _e=DO({zoomPanValues:p,onDraggingChange:h,onPanZoomStart:u});g.on("start",_e);const be=jO({zoomPanValues:p,panOnDrag:k,onPaneContextMenu:!!ie,onPanZoom:s,onTransformChange:se});g.on("zoom",be);const ke=zO({zoomPanValues:p,panOnDrag:k,panOnScroll:F,onPaneContextMenu:ie,onPanZoomEnd:f,onDraggingChange:h});g.on("end",ke)}const Ee=LO({zoomActivationKeyPressed:J,panOnDrag:k,zoomOnScroll:R,panOnScroll:F,zoomOnDoubleClick:Y,zoomOnPinch:K,userSelectionActive:z,noPanClassName:q,noWheelClassName:G,lib:ne,connectionInProgress:fe});g.filter(Ee),Y?v.on("dblclick.zoom",b):v.on("dblclick.zoom",null)}function C(){g.on("zoom",null)}async function N(G,q,ie){const z=hp(G),F=g==null?void 0:g.constrain()(z,q,ie);return F&&await w(F),new Promise(k=>k(F))}async function A(G,q){const ie=hp(G);return await w(ie,q),new Promise(z=>z(ie))}function T(G){if(v){const q=hp(G),ie=v.property("__zoom");(ie.k!==G.zoom||ie.x!==G.x||ie.y!==G.y)&&(g==null||g.transform(v,q,null,{sync:!0}))}}function D(){const G=v?fw(v.node()):{x:0,y:0,k:1};return{x:G.x,y:G.y,zoom:G.k}}function L(G,q){return v?new Promise(ie=>{g==null||g.interpolate((q==null?void 0:q.interpolate)==="linear"?fs:Cu).scaleTo(pp(v,q==null?void 0:q.duration,q==null?void 0:q.ease,()=>ie(!0)),G)}):Promise.resolve(!1)}function j(G,q){return v?new Promise(ie=>{g==null||g.interpolate((q==null?void 0:q.interpolate)==="linear"?fs:Cu).scaleBy(pp(v,q==null?void 0:q.duration,q==null?void 0:q.ease,()=>ie(!0)),G)}):Promise.resolve(!1)}function I(G){g==null||g.scaleExtent(G)}function Z(G){g==null||g.translateExtent(G)}function te(G){const q=!Gn(G)||G<0?0:G;g==null||g.clickDistance(q)}return{update:E,destroy:C,setViewport:A,setViewportConstrained:N,getViewport:D,scaleTo:L,scaleBy:j,setScaleExtent:I,setTranslateExtent:Z,syncViewport:T,setClickDistance:te}}var Io;(function(e){e.Line="line",e.Handle="handle"})(Io||(Io={}));function BO({width:e,prevWidth:t,height:r,prevHeight:a,affectsX:o,affectsY:s}){const u=e-t,f=r-a,h=[u>0?1:u<0?-1:0,f>0?1:f<0?-1:0];return u&&o&&(h[0]=h[0]*-1),f&&s&&(h[1]=h[1]*-1),h}function Bx(e){const t=e.includes("right")||e.includes("left"),r=e.includes("bottom")||e.includes("top"),a=e.includes("left"),o=e.includes("top");return{isHorizontal:t,isVertical:r,affectsX:a,affectsY:o}}function Mr(e,t){return Math.max(0,t-e)}function Or(e,t){return Math.max(0,e-t)}function pu(e,t,r){return Math.max(0,t-e,e-r)}function Ux(e,t){return e?!t:t}function UO(e,t,r,a,o,s,u,f){let{affectsX:h,affectsY:p}=t;const{isHorizontal:y,isVertical:g}=t,v=y&&g,{xSnapped:x,ySnapped:b}=r,{minWidth:w,maxWidth:E,minHeight:C,maxHeight:N}=a,{x:A,y:T,width:D,height:L,aspectRatio:j}=e;let I=Math.floor(y?x-e.pointerX:0),Z=Math.floor(g?b-e.pointerY:0);const te=D+(h?-I:I),G=L+(p?-Z:Z),q=-s[0]*D,ie=-s[1]*L;let z=pu(te,w,E),F=pu(G,C,N);if(u){let H=0,$=0;h&&I<0?H=Mr(A+I+q,u[0][0]):!h&&I>0&&(H=Or(A+te+q,u[1][0])),p&&Z<0?$=Mr(T+Z+ie,u[0][1]):!p&&Z>0&&($=Or(T+G+ie,u[1][1])),z=Math.max(z,H),F=Math.max(F,$)}if(f){let H=0,$=0;h&&I>0?H=Or(A+I,f[0][0]):!h&&I<0&&(H=Mr(A+te,f[1][0])),p&&Z>0?$=Or(T+Z,f[0][1]):!p&&Z<0&&($=Mr(T+G,f[1][1])),z=Math.max(z,H),F=Math.max(F,$)}if(o){if(y){const H=pu(te/j,C,N)*j;if(z=Math.max(z,H),u){let $=0;!h&&!p||h&&!p&&v?$=Or(T+ie+te/j,u[1][1])*j:$=Mr(T+ie+(h?I:-I)/j,u[0][1])*j,z=Math.max(z,$)}if(f){let $=0;!h&&!p||h&&!p&&v?$=Mr(T+te/j,f[1][1])*j:$=Or(T+(h?I:-I)/j,f[0][1])*j,z=Math.max(z,$)}}if(g){const H=pu(G*j,w,E)/j;if(F=Math.max(F,H),u){let $=0;!h&&!p||p&&!h&&v?$=Or(A+G*j+q,u[1][0])/j:$=Mr(A+(p?Z:-Z)*j+q,u[0][0])/j,F=Math.max(F,$)}if(f){let $=0;!h&&!p||p&&!h&&v?$=Mr(A+G*j,f[1][0])/j:$=Or(A+(p?Z:-Z)*j,f[0][0])/j,F=Math.max(F,$)}}}Z=Z+(Z<0?F:-F),I=I+(I<0?z:-z),o&&(v?te>G*j?Z=(Ux(h,p)?-I:I)/j:I=(Ux(h,p)?-Z:Z)*j:y?(Z=I/j,p=h):(I=Z*j,h=p));const k=h?A+I:A,B=p?T+Z:T;return{width:D+(h?-I:I),height:L+(p?-Z:Z),x:s[0]*I*(h?-1:1)+k,y:s[1]*Z*(p?-1:1)+B}}const Vw={width:0,height:0,x:0,y:0},YO={...Vw,pointerX:0,pointerY:0,aspectRatio:1};function $O(e){return[[0,0],[e.measured.width,e.measured.height]]}function VO(e,t,r){const a=t.position.x+e.position.x,o=t.position.y+e.position.y,s=e.measured.width??0,u=e.measured.height??0,f=r[0]*s,h=r[1]*u;return[[a-f,o-h],[a+s-f,o+u-h]]}function qO({domNode:e,nodeId:t,getStoreItems:r,onChange:a,onEnd:o}){const s=wn(e);let u={controlDirection:Bx("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function f({controlPosition:p,boundaries:y,keepAspectRatio:g,resizeDirection:v,onResizeStart:x,onResize:b,onResizeEnd:w,shouldResize:E}){let C={...Vw},N={...YO};u={boundaries:y,resizeDirection:v,keepAspectRatio:g,controlDirection:Bx(p)};let A,T=null,D=[],L,j,I,Z=!1;const te=K1().on("start",G=>{const{nodeLookup:q,transform:ie,snapGrid:z,snapToGrid:F,nodeOrigin:k,paneDomNode:B}=r();if(A=q.get(t),!A)return;T=(B==null?void 0:B.getBoundingClientRect())??null;const{xSnapped:H,ySnapped:$}=ds(G.sourceEvent,{transform:ie,snapGrid:z,snapToGrid:F,containerBounds:T});C={width:A.measured.width??0,height:A.measured.height??0,x:A.position.x??0,y:A.position.y??0},N={...C,pointerX:H,pointerY:$,aspectRatio:C.width/C.height},L=void 0,A.parentId&&(A.extent==="parent"||A.expandParent)&&(L=q.get(A.parentId),j=L&&A.extent==="parent"?$O(L):void 0),D=[],I=void 0;for(const[K,R]of q)if(R.parentId===t&&(D.push({id:K,position:{...R.position},extent:R.extent}),R.extent==="parent"||R.expandParent)){const Y=VO(R,A,R.origin??k);I?I=[[Math.min(Y[0][0],I[0][0]),Math.min(Y[0][1],I[0][1])],[Math.max(Y[1][0],I[1][0]),Math.max(Y[1][1],I[1][1])]]:I=Y}x==null||x(G,{...C})}).on("drag",G=>{const{transform:q,snapGrid:ie,snapToGrid:z,nodeOrigin:F}=r(),k=ds(G.sourceEvent,{transform:q,snapGrid:ie,snapToGrid:z,containerBounds:T}),B=[];if(!A)return;const{x:H,y:$,width:K,height:R}=C,Y={},J=A.origin??F,{width:ne,height:se,x:fe,y:de}=UO(N,u.controlDirection,k,u.boundaries,u.keepAspectRatio,J,j,I),ce=ne!==K,he=se!==R,Ae=fe!==H&&ce,Ee=de!==$&&he;if(!Ae&&!Ee&&!ce&&!he)return;if((Ae||Ee||J[0]===1||J[1]===1)&&(Y.x=Ae?fe:C.x,Y.y=Ee?de:C.y,C.x=Y.x,C.y=Y.y,D.length>0)){const Fe=fe-H,Le=de-$;for(const yt of D)yt.position={x:yt.position.x-Fe+J[0]*(ne-K),y:yt.position.y-Le+J[1]*(se-R)},B.push(yt)}if((ce||he)&&(Y.width=ce&&(!u.resizeDirection||u.resizeDirection==="horizontal")?ne:C.width,Y.height=he&&(!u.resizeDirection||u.resizeDirection==="vertical")?se:C.height,C.width=Y.width,C.height=Y.height),L&&A.expandParent){const Fe=J[0]*(Y.width??0);Y.x&&Y.x<Fe&&(C.x=Fe,N.x=N.x-(Y.x-Fe));const Le=J[1]*(Y.height??0);Y.y&&Y.y<Le&&(C.y=Le,N.y=N.y-(Y.y-Le))}const _e=BO({width:C.width,prevWidth:K,height:C.height,prevHeight:R,affectsX:u.controlDirection.affectsX,affectsY:u.controlDirection.affectsY}),be={...C,direction:_e};(E==null?void 0:E(G,be))!==!1&&(Z=!0,b==null||b(G,be),a(Y,B))}).on("end",G=>{Z&&(w==null||w(G,{...C}),o==null||o({...C}),Z=!1)});s.call(te)}function h(){s.on(".drag",null)}return{update:f,destroy:h}}var mp={exports:{}},gp={},yp={exports:{}},vp={};/**
|
|
50
|
+
* @license React
|
|
51
|
+
* use-sync-external-store-shim.production.js
|
|
52
|
+
*
|
|
53
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
54
|
+
*
|
|
55
|
+
* This source code is licensed under the MIT license found in the
|
|
56
|
+
* LICENSE file in the root directory of this source tree.
|
|
57
|
+
*/var Yx;function GO(){if(Yx)return vp;Yx=1;var e=Os();function t(g,v){return g===v&&(g!==0||1/g===1/v)||g!==g&&v!==v}var r=typeof Object.is=="function"?Object.is:t,a=e.useState,o=e.useEffect,s=e.useLayoutEffect,u=e.useDebugValue;function f(g,v){var x=v(),b=a({inst:{value:x,getSnapshot:v}}),w=b[0].inst,E=b[1];return s(function(){w.value=x,w.getSnapshot=v,h(w)&&E({inst:w})},[g,x,v]),o(function(){return h(w)&&E({inst:w}),g(function(){h(w)&&E({inst:w})})},[g]),u(x),x}function h(g){var v=g.getSnapshot;g=g.value;try{var x=v();return!r(g,x)}catch{return!0}}function p(g,v){return v()}var y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?p:f;return vp.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:y,vp}var $x;function IO(){return $x||($x=1,yp.exports=GO()),yp.exports}/**
|
|
58
|
+
* @license React
|
|
59
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
60
|
+
*
|
|
61
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
62
|
+
*
|
|
63
|
+
* This source code is licensed under the MIT license found in the
|
|
64
|
+
* LICENSE file in the root directory of this source tree.
|
|
65
|
+
*/var Vx;function ZO(){if(Vx)return gp;Vx=1;var e=Os(),t=IO();function r(p,y){return p===y&&(p!==0||1/p===1/y)||p!==p&&y!==y}var a=typeof Object.is=="function"?Object.is:r,o=t.useSyncExternalStore,s=e.useRef,u=e.useEffect,f=e.useMemo,h=e.useDebugValue;return gp.useSyncExternalStoreWithSelector=function(p,y,g,v,x){var b=s(null);if(b.current===null){var w={hasValue:!1,value:null};b.current=w}else w=b.current;b=f(function(){function C(L){if(!N){if(N=!0,A=L,L=v(L),x!==void 0&&w.hasValue){var j=w.value;if(x(j,L))return T=j}return T=L}if(j=T,a(A,L))return j;var I=v(L);return x!==void 0&&x(j,I)?(A=L,j):(A=L,T=I)}var N=!1,A,T,D=g===void 0?null:g;return[function(){return C(y())},D===null?void 0:function(){return C(D())}]},[y,g,v,x]);var E=o(p,b[0],b[1]);return u(function(){w.hasValue=!0,w.value=E},[E]),h(E),E},gp}var qx;function XO(){return qx||(qx=1,mp.exports=ZO()),mp.exports}var FO=XO();const QO=df(FO),PO={},Gx=e=>{let t;const r=new Set,a=(y,g)=>{const v=typeof y=="function"?y(t):y;if(!Object.is(v,t)){const x=t;t=g??(typeof v!="object"||v===null)?v:Object.assign({},t,v),r.forEach(b=>b(t,x))}},o=()=>t,h={setState:a,getState:o,getInitialState:()=>p,subscribe:y=>(r.add(y),()=>r.delete(y)),destroy:()=>{(PO?"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()}},p=t=e(a,o,h);return h},KO=e=>e?Gx(e):Gx,{useDebugValue:WO}=Ve,{useSyncExternalStoreWithSelector:JO}=QO,e3=e=>e;function qw(e,t=e3,r){const a=JO(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,r);return WO(a),a}const Ix=(e,t)=>{const r=KO(e),a=(o,s=t)=>qw(r,o,s);return Object.assign(a,r),a},t3=(e,t)=>e?Ix(e,t):Ix;function ut(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[a,o]of e)if(!Object.is(o,t.get(a)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const a of e)if(!t.has(a))return!1;return!0}const r=Object.keys(e);if(r.length!==Object.keys(t).length)return!1;for(const a of r)if(!Object.prototype.hasOwnProperty.call(t,a)||!Object.is(e[a],t[a]))return!1;return!0}var Vm=L1();const n3=df(Vm),wf=O.createContext(null),i3=wf.Provider,Gw=di.error001();function Ge(e,t){const r=O.useContext(wf);if(r===null)throw new Error(Gw);return qw(r,e,t)}function ft(){const e=O.useContext(wf);if(e===null)throw new Error(Gw);return O.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const Zx={display:"none"},r3={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},Iw="react-flow__node-desc",Zw="react-flow__edge-desc",a3="react-flow__aria-live",o3=e=>e.ariaLiveMessage,l3=e=>e.ariaLabelConfig;function s3({rfId:e}){const t=Ge(o3);return S.jsx("div",{id:`${a3}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:r3,children:t})}function c3({rfId:e,disableKeyboardA11y:t}){const r=Ge(l3);return S.jsxs(S.Fragment,{children:[S.jsx("div",{id:`${Iw}-${e}`,style:Zx,children:t?r["node.a11yDescription.default"]:r["node.a11yDescription.keyboardDisabled"]}),S.jsx("div",{id:`${Zw}-${e}`,style:Zx,children:r["edge.a11yDescription.default"]}),!t&&S.jsx(s3,{rfId:e})]})}const _f=O.forwardRef(({position:e="top-left",children:t,className:r,style:a,...o},s)=>{const u=`${e}`.split("-");return S.jsx("div",{className:At(["react-flow__panel",r,...u]),style:a,ref:s,...o,children:t})});_f.displayName="Panel";function u3({proOptions:e,position:t="bottom-right"}){return e!=null&&e.hideAttribution?null:S.jsx(_f,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:S.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const f3=e=>{const t=[],r=[];for(const[,a]of e.nodeLookup)a.selected&&t.push(a.internals.userNode);for(const[,a]of e.edgeLookup)a.selected&&r.push(a);return{selectedNodes:t,selectedEdges:r}},mu=e=>e.id;function d3(e,t){return ut(e.selectedNodes.map(mu),t.selectedNodes.map(mu))&&ut(e.selectedEdges.map(mu),t.selectedEdges.map(mu))}function h3({onSelectionChange:e}){const t=ft(),{selectedNodes:r,selectedEdges:a}=Ge(f3,d3);return O.useEffect(()=>{const o={nodes:r,edges:a};e==null||e(o),t.getState().onSelectionChangeHandlers.forEach(s=>s(o))},[r,a,e]),null}const p3=e=>!!e.onSelectionChangeHandlers;function m3({onSelectionChange:e}){const t=Ge(p3);return e||t?S.jsx(h3,{onSelectionChange:e}):null}const em=typeof window<"u"?O.useLayoutEffect:O.useEffect,Xw=[0,0],g3={x:0,y:0,zoom:1},y3=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode"],Xx=[...y3,"rfId"],v3=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges}),Fx={translateExtent:ys,nodeOrigin:Xw,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function x3(e){const{setNodes:t,setEdges:r,setMinZoom:a,setMaxZoom:o,setTranslateExtent:s,setNodeExtent:u,reset:f,setDefaultNodesAndEdges:h}=Ge(v3,ut),p=ft();em(()=>(h(e.defaultNodes,e.defaultEdges),()=>{y.current=Fx,f()}),[]);const y=O.useRef(Fx);return em(()=>{for(const g of Xx){const v=e[g],x=y.current[g];v!==x&&(typeof e[g]>"u"||(g==="nodes"?t(v):g==="edges"?r(v):g==="minZoom"?a(v):g==="maxZoom"?o(v):g==="translateExtent"?s(v):g==="nodeExtent"?u(v):g==="ariaLabelConfig"?p.setState({ariaLabelConfig:nO(v)}):g==="fitView"?p.setState({fitViewQueued:v}):g==="fitViewOptions"?p.setState({fitViewOptions:v}):p.setState({[g]:v})))}y.current=e},Xx.map(g=>e[g])),null}function Qx(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function b3(e){var a;const[t,r]=O.useState(e==="system"?null:e);return O.useEffect(()=>{if(e!=="system"){r(e);return}const o=Qx(),s=()=>r(o!=null&&o.matches?"dark":"light");return s(),o==null||o.addEventListener("change",s),()=>{o==null||o.removeEventListener("change",s)}},[e]),t!==null?t:(a=Qx())!=null&&a.matches?"dark":"light"}const Px=typeof document<"u"?document:null;function ws(e=null,t={target:Px,actInsideInputWithModifier:!0}){const[r,a]=O.useState(!1),o=O.useRef(!1),s=O.useRef(new Set([])),[u,f]=O.useMemo(()=>{if(e!==null){const p=(Array.isArray(e)?e:[e]).filter(g=>typeof g=="string").map(g=>g.replace("+",`
|
|
66
|
+
`).replace(`
|
|
67
|
+
|
|
68
|
+
`,`
|
|
69
|
+
+`).split(`
|
|
70
|
+
`)),y=p.reduce((g,v)=>g.concat(...v),[]);return[p,y]}return[[],[]]},[e]);return O.useEffect(()=>{const h=(t==null?void 0:t.target)??Px,p=(t==null?void 0:t.actInsideInputWithModifier)??!0;if(e!==null){const y=x=>{var E,C;if(o.current=x.ctrlKey||x.metaKey||x.shiftKey||x.altKey,(!o.current||o.current&&!p)&&Cw(x))return!1;const w=Wx(x.code,f);if(s.current.add(x[w]),Kx(u,s.current,!1)){const N=((C=(E=x.composedPath)==null?void 0:E.call(x))==null?void 0:C[0])||x.target,A=(N==null?void 0:N.nodeName)==="BUTTON"||(N==null?void 0:N.nodeName)==="A";t.preventDefault!==!1&&(o.current||!A)&&x.preventDefault(),a(!0)}},g=x=>{const b=Wx(x.code,f);Kx(u,s.current,!0)?(a(!1),s.current.clear()):s.current.delete(x[b]),x.key==="Meta"&&s.current.clear(),o.current=!1},v=()=>{s.current.clear(),a(!1)};return h==null||h.addEventListener("keydown",y),h==null||h.addEventListener("keyup",g),window.addEventListener("blur",v),window.addEventListener("contextmenu",v),()=>{h==null||h.removeEventListener("keydown",y),h==null||h.removeEventListener("keyup",g),window.removeEventListener("blur",v),window.removeEventListener("contextmenu",v)}}},[e,a]),r}function Kx(e,t,r){return e.filter(a=>r||a.length===t.size).some(a=>a.every(o=>t.has(o)))}function Wx(e,t){return t.includes(e)?"code":"key"}const w3=()=>{const e=ft();return O.useMemo(()=>({zoomIn:t=>{const{panZoom:r}=e.getState();return r?r.scaleBy(1.2,t):Promise.resolve(!1)},zoomOut:t=>{const{panZoom:r}=e.getState();return r?r.scaleBy(1/1.2,t):Promise.resolve(!1)},zoomTo:(t,r)=>{const{panZoom:a}=e.getState();return a?a.scaleTo(t,r):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(t,r)=>{const{transform:[a,o,s],panZoom:u}=e.getState();return u?(await u.setViewport({x:t.x??a,y:t.y??o,zoom:t.zoom??s},r),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[t,r,a]=e.getState().transform;return{x:t,y:r,zoom:a}},setCenter:async(t,r,a)=>e.getState().setCenter(t,r,a),fitBounds:async(t,r)=>{const{width:a,height:o,minZoom:s,maxZoom:u,panZoom:f}=e.getState(),h=zm(t,a,o,s,u,(r==null?void 0:r.padding)??.1);return f?(await f.setViewport(h,{duration:r==null?void 0:r.duration,ease:r==null?void 0:r.ease,interpolate:r==null?void 0:r.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(t,r={})=>{const{transform:a,snapGrid:o,snapToGrid:s,domNode:u}=e.getState();if(!u)return t;const{x:f,y:h}=u.getBoundingClientRect(),p={x:t.x-f,y:t.y-h},y=r.snapGrid??o,g=r.snapToGrid??s;return Ls(p,a,g,y)},flowToScreenPosition:t=>{const{transform:r,domNode:a}=e.getState();if(!a)return t;const{x:o,y:s}=a.getBoundingClientRect(),u=Zu(t,r);return{x:u.x+o,y:u.y+s}}}),[])};function Fw(e,t){const r=[],a=new Map,o=[];for(const s of e)if(s.type==="add"){o.push(s);continue}else if(s.type==="remove"||s.type==="replace")a.set(s.id,[s]);else{const u=a.get(s.id);u?u.push(s):a.set(s.id,[s])}for(const s of t){const u=a.get(s.id);if(!u){r.push(s);continue}if(u[0].type==="remove")continue;if(u[0].type==="replace"){r.push({...u[0].item});continue}const f={...s};for(const h of u)_3(h,f);r.push(f)}return o.length&&o.forEach(s=>{s.index!==void 0?r.splice(s.index,0,{...s.item}):r.push({...s.item})}),r}function _3(e,t){switch(e.type){case"select":{t.selected=e.selected;break}case"position":{typeof e.position<"u"&&(t.position=e.position),typeof e.dragging<"u"&&(t.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(t.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(t.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(t.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(t.resizing=e.resizing);break}}}function Qw(e,t){return Fw(e,t)}function Pw(e,t){return Fw(e,t)}function va(e,t){return{id:e,type:"select",selected:t}}function Oo(e,t=new Set,r=!1){const a=[];for(const[o,s]of e){const u=t.has(o);!(s.selected===void 0&&!u)&&s.selected!==u&&(r&&(s.selected=u),a.push(va(s.id,u)))}return a}function Jx({items:e=[],lookup:t}){var o;const r=[],a=new Map(e.map(s=>[s.id,s]));for(const[s,u]of e.entries()){const f=t.get(u.id),h=((o=f==null?void 0:f.internals)==null?void 0:o.userNode)??f;h!==void 0&&h!==u&&r.push({id:u.id,item:u,type:"replace"}),h===void 0&&r.push({item:u,type:"add",index:s})}for(const[s]of t)a.get(s)===void 0&&r.push({id:s,type:"remove"});return r}function eb(e){return{id:e.id,type:"remove"}}const tb=e=>ZM(e),S3=e=>yw(e);function Kw(e){return O.forwardRef(e)}function nb(e){const[t,r]=O.useState(BigInt(0)),[a]=O.useState(()=>E3(()=>r(o=>o+BigInt(1))));return em(()=>{const o=a.get();o.length&&(e(o),a.reset())},[t]),a}function E3(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:r=>{t.push(r),e()}}}const Ww=O.createContext(null);function C3({children:e}){const t=ft(),r=O.useCallback(f=>{const{nodes:h=[],setNodes:p,hasDefaultNodes:y,onNodesChange:g,nodeLookup:v,fitViewQueued:x,onNodesChangeMiddlewareMap:b}=t.getState();let w=h;for(const C of f)w=typeof C=="function"?C(w):C;let E=Jx({items:w,lookup:v});for(const C of b.values())E=C(E);y&&p(w),E.length>0?g==null||g(E):x&&window.requestAnimationFrame(()=>{const{fitViewQueued:C,nodes:N,setNodes:A}=t.getState();C&&A(N)})},[]),a=nb(r),o=O.useCallback(f=>{const{edges:h=[],setEdges:p,hasDefaultEdges:y,onEdgesChange:g,edgeLookup:v}=t.getState();let x=h;for(const b of f)x=typeof b=="function"?b(x):b;y?p(x):g&&g(Jx({items:x,lookup:v}))},[]),s=nb(o),u=O.useMemo(()=>({nodeQueue:a,edgeQueue:s}),[]);return S.jsx(Ww.Provider,{value:u,children:e})}function A3(){const e=O.useContext(Ww);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const N3=e=>!!e.panZoom;function Sf(){const e=w3(),t=ft(),r=A3(),a=Ge(N3),o=O.useMemo(()=>{const s=g=>t.getState().nodeLookup.get(g),u=g=>{r.nodeQueue.push(g)},f=g=>{r.edgeQueue.push(g)},h=g=>{var C,N;const{nodeLookup:v,nodeOrigin:x}=t.getState(),b=tb(g)?g:v.get(g.id),w=b.parentId?Sw(b.position,b.measured,b.parentId,v,x):b.position,E={...b,position:w,width:((C=b.measured)==null?void 0:C.width)??b.width,height:((N=b.measured)==null?void 0:N.height)??b.height};return qo(E)},p=(g,v,x={replace:!1})=>{u(b=>b.map(w=>{if(w.id===g){const E=typeof v=="function"?v(w):v;return x.replace&&tb(E)?E:{...w,...E}}return w}))},y=(g,v,x={replace:!1})=>{f(b=>b.map(w=>{if(w.id===g){const E=typeof v=="function"?v(w):v;return x.replace&&S3(E)?E:{...w,...E}}return w}))};return{getNodes:()=>t.getState().nodes.map(g=>({...g})),getNode:g=>{var v;return(v=s(g))==null?void 0:v.internals.userNode},getInternalNode:s,getEdges:()=>{const{edges:g=[]}=t.getState();return g.map(v=>({...v}))},getEdge:g=>t.getState().edgeLookup.get(g),setNodes:u,setEdges:f,addNodes:g=>{const v=Array.isArray(g)?g:[g];r.nodeQueue.push(x=>[...x,...v])},addEdges:g=>{const v=Array.isArray(g)?g:[g];r.edgeQueue.push(x=>[...x,...v])},toObject:()=>{const{nodes:g=[],edges:v=[],transform:x}=t.getState(),[b,w,E]=x;return{nodes:g.map(C=>({...C})),edges:v.map(C=>({...C})),viewport:{x:b,y:w,zoom:E}}},deleteElements:async({nodes:g=[],edges:v=[]})=>{const{nodes:x,edges:b,onNodesDelete:w,onEdgesDelete:E,triggerNodeChanges:C,triggerEdgeChanges:N,onDelete:A,onBeforeDelete:T}=t.getState(),{nodes:D,edges:L}=await KM({nodesToRemove:g,edgesToRemove:v,nodes:x,edges:b,onBeforeDelete:T}),j=L.length>0,I=D.length>0;if(j){const Z=L.map(eb);E==null||E(L),N(Z)}if(I){const Z=D.map(eb);w==null||w(D),C(Z)}return(I||j)&&(A==null||A({nodes:D,edges:L})),{deletedNodes:D,deletedEdges:L}},getIntersectingNodes:(g,v=!0,x)=>{const b=Nx(g),w=b?g:h(g),E=x!==void 0;return w?(x||t.getState().nodes).filter(C=>{const N=t.getState().nodeLookup.get(C.id);if(N&&!b&&(C.id===g.id||!N.internals.positionAbsolute))return!1;const A=qo(E?C:N),T=xs(A,w);return v&&T>0||T>=A.width*A.height||T>=w.width*w.height}):[]},isNodeIntersecting:(g,v,x=!0)=>{const w=Nx(g)?g:h(g);if(!w)return!1;const E=xs(w,v);return x&&E>0||E>=v.width*v.height||E>=w.width*w.height},updateNode:p,updateNodeData:(g,v,x={replace:!1})=>{p(g,b=>{const w=typeof v=="function"?v(b):v;return x.replace?{...b,data:w}:{...b,data:{...b.data,...w}}},x)},updateEdge:y,updateEdgeData:(g,v,x={replace:!1})=>{y(g,b=>{const w=typeof v=="function"?v(b):v;return x.replace?{...b,data:w}:{...b,data:{...b.data,...w}}},x)},getNodesBounds:g=>{const{nodeLookup:v,nodeOrigin:x}=t.getState();return XM(g,{nodeLookup:v,nodeOrigin:x})},getHandleConnections:({type:g,id:v,nodeId:x})=>{var b;return Array.from(((b=t.getState().connectionLookup.get(`${x}-${g}${v?`-${v}`:""}`))==null?void 0:b.values())??[])},getNodeConnections:({type:g,handleId:v,nodeId:x})=>{var b;return Array.from(((b=t.getState().connectionLookup.get(`${x}${g?v?`-${g}-${v}`:`-${g}`:""}`))==null?void 0:b.values())??[])},fitView:async g=>{const v=t.getState().fitViewResolver??tO();return t.setState({fitViewQueued:!0,fitViewOptions:g,fitViewResolver:v}),r.nodeQueue.push(x=>[...x]),v.promise}}},[]);return O.useMemo(()=>({...o,...e,viewportInitialized:a}),[a])}const ib=e=>e.selected,T3=typeof window<"u"?window:void 0;function M3({deleteKeyCode:e,multiSelectionKeyCode:t}){const r=ft(),{deleteElements:a}=Sf(),o=ws(e,{actInsideInputWithModifier:!1}),s=ws(t,{target:T3});O.useEffect(()=>{if(o){const{edges:u,nodes:f}=r.getState();a({nodes:f.filter(ib),edges:u.filter(ib)}),r.setState({nodesSelectionActive:!1})}},[o]),O.useEffect(()=>{r.setState({multiSelectionActive:s})},[s])}function O3(e){const t=ft();O.useEffect(()=>{const r=()=>{var o,s,u,f;if(!e.current||!(((s=(o=e.current).checkVisibility)==null?void 0:s.call(o))??!0))return!1;const a=Lm(e.current);(a.height===0||a.width===0)&&((f=(u=t.getState()).onError)==null||f.call(u,"004",di.error004())),t.setState({width:a.width||500,height:a.height||500})};if(e.current){r(),window.addEventListener("resize",r);const a=new ResizeObserver(()=>r());return a.observe(e.current),()=>{window.removeEventListener("resize",r),a&&e.current&&a.unobserve(e.current)}}},[])}const Ef={position:"absolute",width:"100%",height:"100%",top:0,left:0},k3=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function R3({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:r=!0,panOnScroll:a=!1,panOnScrollSpeed:o=.5,panOnScrollMode:s=_a.Free,zoomOnDoubleClick:u=!0,panOnDrag:f=!0,defaultViewport:h,translateExtent:p,minZoom:y,maxZoom:g,zoomActivationKeyCode:v,preventScrolling:x=!0,children:b,noWheelClassName:w,noPanClassName:E,onViewportChange:C,isControlledViewport:N,paneClickDistance:A,selectionOnDrag:T}){const D=ft(),L=O.useRef(null),{userSelectionActive:j,lib:I,connectionInProgress:Z}=Ge(k3,ut),te=ws(v),G=O.useRef();O3(L);const q=O.useCallback(ie=>{C==null||C({x:ie[0],y:ie[1],zoom:ie[2]}),N||D.setState({transform:ie})},[C,N]);return O.useEffect(()=>{if(L.current){G.current=HO({domNode:L.current,minZoom:y,maxZoom:g,translateExtent:p,viewport:h,onDraggingChange:k=>D.setState(B=>B.paneDragging===k?B:{paneDragging:k}),onPanZoomStart:(k,B)=>{const{onViewportChangeStart:H,onMoveStart:$}=D.getState();$==null||$(k,B),H==null||H(B)},onPanZoom:(k,B)=>{const{onViewportChange:H,onMove:$}=D.getState();$==null||$(k,B),H==null||H(B)},onPanZoomEnd:(k,B)=>{const{onViewportChangeEnd:H,onMoveEnd:$}=D.getState();$==null||$(k,B),H==null||H(B)}});const{x:ie,y:z,zoom:F}=G.current.getViewport();return D.setState({panZoom:G.current,transform:[ie,z,F],domNode:L.current.closest(".react-flow")}),()=>{var k;(k=G.current)==null||k.destroy()}}},[]),O.useEffect(()=>{var ie;(ie=G.current)==null||ie.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:r,panOnScroll:a,panOnScrollSpeed:o,panOnScrollMode:s,zoomOnDoubleClick:u,panOnDrag:f,zoomActivationKeyPressed:te,preventScrolling:x,noPanClassName:E,userSelectionActive:j,noWheelClassName:w,lib:I,onTransformChange:q,connectionInProgress:Z,selectionOnDrag:T,paneClickDistance:A})},[e,t,r,a,o,s,u,f,te,x,E,j,w,I,q,Z,T,A]),S.jsx("div",{className:"react-flow__renderer",ref:L,style:Ef,children:b})}const D3=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function j3(){const{userSelectionActive:e,userSelectionRect:t}=Ge(D3,ut);return e&&t?S.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}const xp=(e,t)=>r=>{r.target===t.current&&(e==null||e(r))},z3=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function L3({isSelecting:e,selectionKeyPressed:t,selectionMode:r=vs.Full,panOnDrag:a,paneClickDistance:o,selectionOnDrag:s,onSelectionStart:u,onSelectionEnd:f,onPaneClick:h,onPaneContextMenu:p,onPaneScroll:y,onPaneMouseEnter:g,onPaneMouseMove:v,onPaneMouseLeave:x,children:b}){const w=ft(),{userSelectionActive:E,elementsSelectable:C,dragging:N,connectionInProgress:A}=Ge(z3,ut),T=C&&(e||E),D=O.useRef(null),L=O.useRef(),j=O.useRef(new Set),I=O.useRef(new Set),Z=O.useRef(!1),te=H=>{if(Z.current||A){Z.current=!1;return}h==null||h(H),w.getState().resetSelectedElements(),w.setState({nodesSelectionActive:!1})},G=H=>{if(Array.isArray(a)&&(a!=null&&a.includes(2))){H.preventDefault();return}p==null||p(H)},q=y?H=>y(H):void 0,ie=H=>{Z.current&&(H.stopPropagation(),Z.current=!1)},z=H=>{var se,fe;const{domNode:$}=w.getState();if(L.current=$==null?void 0:$.getBoundingClientRect(),!L.current)return;const K=H.target===D.current;if(!K&&!!H.target.closest(".nokey")||!e||!(s&&K||t)||H.button!==0||!H.isPrimary)return;(fe=(se=H.target)==null?void 0:se.setPointerCapture)==null||fe.call(se,H.pointerId),Z.current=!1;const{x:J,y:ne}=In(H.nativeEvent,L.current);w.setState({userSelectionRect:{width:0,height:0,startX:J,startY:ne,x:J,y:ne}}),K||(H.stopPropagation(),H.preventDefault())},F=H=>{const{userSelectionRect:$,transform:K,nodeLookup:R,edgeLookup:Y,connectionLookup:J,triggerNodeChanges:ne,triggerEdgeChanges:se,defaultEdgeOptions:fe,resetSelectedElements:de}=w.getState();if(!L.current||!$)return;const{x:ce,y:he}=In(H.nativeEvent,L.current),{startX:Ae,startY:Ee}=$;if(!Z.current){const Le=t?0:o;if(Math.hypot(ce-Ae,he-Ee)<=Le)return;de(),u==null||u(H)}Z.current=!0;const _e={startX:Ae,startY:Ee,x:ce<Ae?ce:Ae,y:he<Ee?he:Ee,width:Math.abs(ce-Ae),height:Math.abs(he-Ee)},be=j.current,ke=I.current;j.current=new Set(jm(R,_e,K,r===vs.Partial,!0).map(Le=>Le.id)),I.current=new Set;const Fe=(fe==null?void 0:fe.selectable)??!0;for(const Le of j.current){const yt=J.get(Le);if(yt)for(const{edgeId:dn}of yt.values()){const Ot=Y.get(dn);Ot&&(Ot.selectable??Fe)&&I.current.add(dn)}}if(!Tx(be,j.current)){const Le=Oo(R,j.current,!0);ne(Le)}if(!Tx(ke,I.current)){const Le=Oo(Y,I.current);se(Le)}w.setState({userSelectionRect:_e,userSelectionActive:!0,nodesSelectionActive:!1})},k=H=>{var $,K;H.button===0&&((K=($=H.target)==null?void 0:$.releasePointerCapture)==null||K.call($,H.pointerId),!E&&H.target===D.current&&w.getState().userSelectionRect&&(te==null||te(H)),w.setState({userSelectionActive:!1,userSelectionRect:null}),Z.current&&(f==null||f(H),w.setState({nodesSelectionActive:j.current.size>0})))},B=a===!0||Array.isArray(a)&&a.includes(0);return S.jsxs("div",{className:At(["react-flow__pane",{draggable:B,dragging:N,selection:e}]),onClick:T?void 0:xp(te,D),onContextMenu:xp(G,D),onWheel:xp(q,D),onPointerEnter:T?void 0:g,onPointerMove:T?F:v,onPointerUp:T?k:void 0,onPointerDownCapture:T?z:void 0,onClickCapture:T?ie:void 0,onPointerLeave:x,ref:D,style:Ef,children:[b,S.jsx(j3,{})]})}function tm({id:e,store:t,unselect:r=!1,nodeRef:a}){const{addSelectedNodes:o,unselectNodesAndEdges:s,multiSelectionActive:u,nodeLookup:f,onError:h}=t.getState(),p=f.get(e);if(!p){h==null||h("012",di.error012(e));return}t.setState({nodesSelectionActive:!1}),p.selected?(r||p.selected&&u)&&(s({nodes:[p],edges:[]}),requestAnimationFrame(()=>{var y;return(y=a==null?void 0:a.current)==null?void 0:y.blur()})):o([e])}function Jw({nodeRef:e,disabled:t=!1,noDragClassName:r,handleSelector:a,nodeId:o,isSelectable:s,nodeClickDistance:u}){const f=ft(),[h,p]=O.useState(!1),y=O.useRef();return O.useEffect(()=>{y.current=SO({getStoreItems:()=>f.getState(),onNodeMouseDown:g=>{tm({id:g,store:f,nodeRef:e})},onDragStart:()=>{p(!0)},onDragStop:()=>{p(!1)}})},[]),O.useEffect(()=>{if(!(t||!e.current||!y.current))return y.current.update({noDragClassName:r,handleSelector:a,domNode:e.current,isSelectable:s,nodeId:o,nodeClickDistance:u}),()=>{var g;(g=y.current)==null||g.destroy()}},[r,a,t,s,e,o,u]),h}const H3=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function e_(){const e=ft();return O.useCallback(r=>{const{nodeExtent:a,snapToGrid:o,snapGrid:s,nodesDraggable:u,onError:f,updateNodePositions:h,nodeLookup:p,nodeOrigin:y}=e.getState(),g=new Map,v=H3(u),x=o?s[0]:5,b=o?s[1]:5,w=r.direction.x*x*r.factor,E=r.direction.y*b*r.factor;for(const[,C]of p){if(!v(C))continue;let N={x:C.internals.positionAbsolute.x+w,y:C.internals.positionAbsolute.y+E};o&&(N=zs(N,s));const{position:A,positionAbsolute:T}=vw({nodeId:C.id,nextPosition:N,nodeLookup:p,nodeExtent:a,nodeOrigin:y,onError:f});C.position=A,C.internals.positionAbsolute=T,g.set(C.id,C)}h(g)},[])}const qm=O.createContext(null),B3=qm.Provider;qm.Consumer;const t_=()=>O.useContext(qm),U3=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),Y3=(e,t,r)=>a=>{const{connectionClickStartHandle:o,connectionMode:s,connection:u}=a,{fromHandle:f,toHandle:h,isValid:p}=u,y=(h==null?void 0:h.nodeId)===e&&(h==null?void 0:h.id)===t&&(h==null?void 0:h.type)===r;return{connectingFrom:(f==null?void 0:f.nodeId)===e&&(f==null?void 0:f.id)===t&&(f==null?void 0:f.type)===r,connectingTo:y,clickConnecting:(o==null?void 0:o.nodeId)===e&&(o==null?void 0:o.id)===t&&(o==null?void 0:o.type)===r,isPossibleEndHandle:s===$o.Strict?(f==null?void 0:f.type)!==r:e!==(f==null?void 0:f.nodeId)||t!==(f==null?void 0:f.id),connectionInProcess:!!f,clickConnectionInProcess:!!o,valid:y&&p}};function $3({type:e="source",position:t=ye.Top,isValidConnection:r,isConnectable:a=!0,isConnectableStart:o=!0,isConnectableEnd:s=!0,id:u,onConnect:f,children:h,className:p,onMouseDown:y,onTouchStart:g,...v},x){var F,k;const b=u||null,w=e==="target",E=ft(),C=t_(),{connectOnClick:N,noPanClassName:A,rfId:T}=Ge(U3,ut),{connectingFrom:D,connectingTo:L,clickConnecting:j,isPossibleEndHandle:I,connectionInProcess:Z,clickConnectionInProcess:te,valid:G}=Ge(Y3(C,b,e),ut);C||(k=(F=E.getState()).onError)==null||k.call(F,"010",di.error010());const q=B=>{const{defaultEdgeOptions:H,onConnect:$,hasDefaultEdges:K}=E.getState(),R={...H,...B};if(K){const{edges:Y,setEdges:J}=E.getState();J(Ow(R,Y))}$==null||$(R),f==null||f(R)},ie=B=>{if(!C)return;const H=Aw(B.nativeEvent);if(o&&(H&&B.button===0||!H)){const $=E.getState();Jp.onPointerDown(B.nativeEvent,{handleDomNode:B.currentTarget,autoPanOnConnect:$.autoPanOnConnect,connectionMode:$.connectionMode,connectionRadius:$.connectionRadius,domNode:$.domNode,nodeLookup:$.nodeLookup,lib:$.lib,isTarget:w,handleId:b,nodeId:C,flowId:$.rfId,panBy:$.panBy,cancelConnection:$.cancelConnection,onConnectStart:$.onConnectStart,onConnectEnd:(...K)=>{var R,Y;return(Y=(R=E.getState()).onConnectEnd)==null?void 0:Y.call(R,...K)},updateConnection:$.updateConnection,onConnect:q,isValidConnection:r||((...K)=>{var R,Y;return((Y=(R=E.getState()).isValidConnection)==null?void 0:Y.call(R,...K))??!0}),getTransform:()=>E.getState().transform,getFromHandle:()=>E.getState().connection.fromHandle,autoPanSpeed:$.autoPanSpeed,dragThreshold:$.connectionDragThreshold})}H?y==null||y(B):g==null||g(B)},z=B=>{const{onClickConnectStart:H,onClickConnectEnd:$,connectionClickStartHandle:K,connectionMode:R,isValidConnection:Y,lib:J,rfId:ne,nodeLookup:se,connection:fe}=E.getState();if(!C||!K&&!o)return;if(!K){H==null||H(B.nativeEvent,{nodeId:C,handleId:b,handleType:e}),E.setState({connectionClickStartHandle:{nodeId:C,type:e,id:b}});return}const de=Ew(B.target),ce=r||Y,{connection:he,isValid:Ae}=Jp.isValid(B.nativeEvent,{handle:{nodeId:C,id:b,type:e},connectionMode:R,fromNodeId:K.nodeId,fromHandleId:K.id||null,fromType:K.type,isValidConnection:ce,flowId:ne,doc:de,lib:J,nodeLookup:se});Ae&&he&&q(he);const Ee=structuredClone(fe);delete Ee.inProgress,Ee.toPosition=Ee.toHandle?Ee.toHandle.position:null,$==null||$(B,Ee),E.setState({connectionClickStartHandle:null})};return S.jsx("div",{"data-handleid":b,"data-nodeid":C,"data-handlepos":t,"data-id":`${T}-${C}-${b}-${e}`,className:At(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",A,p,{source:!w,target:w,connectable:a,connectablestart:o,connectableend:s,clickconnecting:j,connectingfrom:D,connectingto:L,valid:G,connectionindicator:a&&(!Z||I)&&(Z||te?s:o)}]),onMouseDown:ie,onTouchStart:ie,onClick:N?z:void 0,ref:x,...v,children:h})}const zn=O.memo(Kw($3));function V3({data:e,isConnectable:t,sourcePosition:r=ye.Bottom}){return S.jsxs(S.Fragment,{children:[e==null?void 0:e.label,S.jsx(zn,{type:"source",position:r,isConnectable:t})]})}function q3({data:e,isConnectable:t,targetPosition:r=ye.Top,sourcePosition:a=ye.Bottom}){return S.jsxs(S.Fragment,{children:[S.jsx(zn,{type:"target",position:r,isConnectable:t}),e==null?void 0:e.label,S.jsx(zn,{type:"source",position:a,isConnectable:t})]})}function G3(){return null}function I3({data:e,isConnectable:t,targetPosition:r=ye.Top}){return S.jsxs(S.Fragment,{children:[S.jsx(zn,{type:"target",position:r,isConnectable:t}),e==null?void 0:e.label]})}const Xu={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},rb={input:V3,default:q3,output:I3,group:G3};function Z3(e){var t,r,a,o;return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??((t=e.style)==null?void 0:t.width),height:e.height??e.initialHeight??((r=e.style)==null?void 0:r.height)}:{width:e.width??((a=e.style)==null?void 0:a.width),height:e.height??((o=e.style)==null?void 0:o.height)}}const X3=e=>{const{width:t,height:r,x:a,y:o}=js(e.nodeLookup,{filter:s=>!!s.selected});return{width:Gn(t)?t:null,height:Gn(r)?r:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${a}px,${o}px)`}};function F3({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:r}){const a=ft(),{width:o,height:s,transformString:u,userSelectionActive:f}=Ge(X3,ut),h=e_(),p=O.useRef(null);O.useEffect(()=>{var x;r||(x=p.current)==null||x.focus({preventScroll:!0})},[r]);const y=!f&&o!==null&&s!==null;if(Jw({nodeRef:p,disabled:!y}),!y)return null;const g=e?x=>{const b=a.getState().nodes.filter(w=>w.selected);e(x,b)}:void 0,v=x=>{Object.prototype.hasOwnProperty.call(Xu,x.key)&&(x.preventDefault(),h({direction:Xu[x.key],factor:x.shiftKey?4:1}))};return S.jsx("div",{className:At(["react-flow__nodesselection","react-flow__container",t]),style:{transform:u},children:S.jsx("div",{ref:p,className:"react-flow__nodesselection-rect",onContextMenu:g,tabIndex:r?void 0:-1,onKeyDown:r?void 0:v,style:{width:o,height:s}})})}const ab=typeof window<"u"?window:void 0,Q3=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function n_({children:e,onPaneClick:t,onPaneMouseEnter:r,onPaneMouseMove:a,onPaneMouseLeave:o,onPaneContextMenu:s,onPaneScroll:u,paneClickDistance:f,deleteKeyCode:h,selectionKeyCode:p,selectionOnDrag:y,selectionMode:g,onSelectionStart:v,onSelectionEnd:x,multiSelectionKeyCode:b,panActivationKeyCode:w,zoomActivationKeyCode:E,elementsSelectable:C,zoomOnScroll:N,zoomOnPinch:A,panOnScroll:T,panOnScrollSpeed:D,panOnScrollMode:L,zoomOnDoubleClick:j,panOnDrag:I,defaultViewport:Z,translateExtent:te,minZoom:G,maxZoom:q,preventScrolling:ie,onSelectionContextMenu:z,noWheelClassName:F,noPanClassName:k,disableKeyboardA11y:B,onViewportChange:H,isControlledViewport:$}){const{nodesSelectionActive:K,userSelectionActive:R}=Ge(Q3,ut),Y=ws(p,{target:ab}),J=ws(w,{target:ab}),ne=J||I,se=J||T,fe=y&&ne!==!0,de=Y||R||fe;return M3({deleteKeyCode:h,multiSelectionKeyCode:b}),S.jsx(R3,{onPaneContextMenu:s,elementsSelectable:C,zoomOnScroll:N,zoomOnPinch:A,panOnScroll:se,panOnScrollSpeed:D,panOnScrollMode:L,zoomOnDoubleClick:j,panOnDrag:!Y&&ne,defaultViewport:Z,translateExtent:te,minZoom:G,maxZoom:q,zoomActivationKeyCode:E,preventScrolling:ie,noWheelClassName:F,noPanClassName:k,onViewportChange:H,isControlledViewport:$,paneClickDistance:f,selectionOnDrag:fe,children:S.jsxs(L3,{onSelectionStart:v,onSelectionEnd:x,onPaneClick:t,onPaneMouseEnter:r,onPaneMouseMove:a,onPaneMouseLeave:o,onPaneContextMenu:s,onPaneScroll:u,panOnDrag:ne,isSelecting:!!de,selectionMode:g,selectionKeyPressed:Y,paneClickDistance:f,selectionOnDrag:fe,children:[e,K&&S.jsx(F3,{onSelectionContextMenu:z,noPanClassName:k,disableKeyboardA11y:B})]})})}n_.displayName="FlowRenderer";const P3=O.memo(n_),K3=e=>t=>e?jm(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(r=>r.id):Array.from(t.nodeLookup.keys());function W3(e){return Ge(O.useCallback(K3(e),[e]),ut)}const J3=e=>e.updateNodeInternals;function ek(){const e=Ge(J3),[t]=O.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(r=>{const a=new Map;r.forEach(o=>{const s=o.target.getAttribute("data-id");a.set(s,{id:s,nodeElement:o.target,force:!0})}),e(a)}));return O.useEffect(()=>()=>{t==null||t.disconnect()},[t]),t}function tk({node:e,nodeType:t,hasDimensions:r,resizeObserver:a}){const o=ft(),s=O.useRef(null),u=O.useRef(null),f=O.useRef(e.sourcePosition),h=O.useRef(e.targetPosition),p=O.useRef(t),y=r&&!!e.internals.handleBounds;return O.useEffect(()=>{s.current&&!e.hidden&&(!y||u.current!==s.current)&&(u.current&&(a==null||a.unobserve(u.current)),a==null||a.observe(s.current),u.current=s.current)},[y,e.hidden]),O.useEffect(()=>()=>{u.current&&(a==null||a.unobserve(u.current),u.current=null)},[]),O.useEffect(()=>{if(s.current){const g=p.current!==t,v=f.current!==e.sourcePosition,x=h.current!==e.targetPosition;(g||v||x)&&(p.current=t,f.current=e.sourcePosition,h.current=e.targetPosition,o.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:s.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),s}function nk({id:e,onClick:t,onMouseEnter:r,onMouseMove:a,onMouseLeave:o,onContextMenu:s,onDoubleClick:u,nodesDraggable:f,elementsSelectable:h,nodesConnectable:p,nodesFocusable:y,resizeObserver:g,noDragClassName:v,noPanClassName:x,disableKeyboardA11y:b,rfId:w,nodeTypes:E,nodeClickDistance:C,onError:N}){const{node:A,internals:T,isParent:D}=Ge(ce=>{const he=ce.nodeLookup.get(e),Ae=ce.parentLookup.has(e);return{node:he,internals:he.internals,isParent:Ae}},ut);let L=A.type||"default",j=(E==null?void 0:E[L])||rb[L];j===void 0&&(N==null||N("003",di.error003(L)),L="default",j=(E==null?void 0:E.default)||rb.default);const I=!!(A.draggable||f&&typeof A.draggable>"u"),Z=!!(A.selectable||h&&typeof A.selectable>"u"),te=!!(A.connectable||p&&typeof A.connectable>"u"),G=!!(A.focusable||y&&typeof A.focusable>"u"),q=ft(),ie=_w(A),z=tk({node:A,nodeType:L,hasDimensions:ie,resizeObserver:g}),F=Jw({nodeRef:z,disabled:A.hidden||!I,noDragClassName:v,handleSelector:A.dragHandle,nodeId:e,isSelectable:Z,nodeClickDistance:C}),k=e_();if(A.hidden)return null;const B=Ki(A),H=Z3(A),$=Z||I||t||r||a||o,K=r?ce=>r(ce,{...T.userNode}):void 0,R=a?ce=>a(ce,{...T.userNode}):void 0,Y=o?ce=>o(ce,{...T.userNode}):void 0,J=s?ce=>s(ce,{...T.userNode}):void 0,ne=u?ce=>u(ce,{...T.userNode}):void 0,se=ce=>{const{selectNodesOnDrag:he,nodeDragThreshold:Ae}=q.getState();Z&&(!he||!I||Ae>0)&&tm({id:e,store:q,nodeRef:z}),t&&t(ce,{...T.userNode})},fe=ce=>{if(!(Cw(ce.nativeEvent)||b)){if(hw.includes(ce.key)&&Z){const he=ce.key==="Escape";tm({id:e,store:q,unselect:he,nodeRef:z})}else if(I&&A.selected&&Object.prototype.hasOwnProperty.call(Xu,ce.key)){ce.preventDefault();const{ariaLabelConfig:he}=q.getState();q.setState({ariaLiveMessage:he["node.a11yDescription.ariaLiveMessage"]({direction:ce.key.replace("Arrow","").toLowerCase(),x:~~T.positionAbsolute.x,y:~~T.positionAbsolute.y})}),k({direction:Xu[ce.key],factor:ce.shiftKey?4:1})}}},de=()=>{var ke;if(b||!((ke=z.current)!=null&&ke.matches(":focus-visible")))return;const{transform:ce,width:he,height:Ae,autoPanOnNodeFocus:Ee,setCenter:_e}=q.getState();if(!Ee)return;jm(new Map([[e,A]]),{x:0,y:0,width:he,height:Ae},ce,!0).length>0||_e(A.position.x+B.width/2,A.position.y+B.height/2,{zoom:ce[2]})};return S.jsx("div",{className:At(["react-flow__node",`react-flow__node-${L}`,{[x]:I},A.className,{selected:A.selected,selectable:Z,parent:D,draggable:I,dragging:F}]),ref:z,style:{zIndex:T.z,transform:`translate(${T.positionAbsolute.x}px,${T.positionAbsolute.y}px)`,pointerEvents:$?"all":"none",visibility:ie?"visible":"hidden",...A.style,...H},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:K,onMouseMove:R,onMouseLeave:Y,onContextMenu:J,onClick:se,onDoubleClick:ne,onKeyDown:G?fe:void 0,tabIndex:G?0:void 0,onFocus:G?de:void 0,role:A.ariaRole??(G?"group":void 0),"aria-roledescription":"node","aria-describedby":b?void 0:`${Iw}-${w}`,"aria-label":A.ariaLabel,...A.domAttributes,children:S.jsx(B3,{value:e,children:S.jsx(j,{id:e,data:A.data,type:L,positionAbsoluteX:T.positionAbsolute.x,positionAbsoluteY:T.positionAbsolute.y,selected:A.selected??!1,selectable:Z,draggable:I,deletable:A.deletable??!0,isConnectable:te,sourcePosition:A.sourcePosition,targetPosition:A.targetPosition,dragging:F,dragHandle:A.dragHandle,zIndex:T.z,parentId:A.parentId,...B})})})}var ik=O.memo(nk);const rk=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function i_(e){const{nodesDraggable:t,nodesConnectable:r,nodesFocusable:a,elementsSelectable:o,onError:s}=Ge(rk,ut),u=W3(e.onlyRenderVisibleElements),f=ek();return S.jsx("div",{className:"react-flow__nodes",style:Ef,children:u.map(h=>S.jsx(ik,{id:h,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:f,nodesDraggable:t,nodesConnectable:r,nodesFocusable:a,elementsSelectable:o,nodeClickDistance:e.nodeClickDistance,onError:s},h))})}i_.displayName="NodeRenderer";const ak=O.memo(i_);function ok(e){return Ge(O.useCallback(r=>{if(!e)return r.edges.map(o=>o.id);const a=[];if(r.width&&r.height)for(const o of r.edges){const s=r.nodeLookup.get(o.source),u=r.nodeLookup.get(o.target);s&&u&&aO({sourceNode:s,targetNode:u,width:r.width,height:r.height,transform:r.transform})&&a.push(o.id)}return a},[e]),ut)}const lk=({color:e="none",strokeWidth:t=1})=>{const r={strokeWidth:t,...e&&{stroke:e}};return S.jsx("polyline",{className:"arrow",style:r,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},sk=({color:e="none",strokeWidth:t=1})=>{const r={strokeWidth:t,...e&&{stroke:e,fill:e}};return S.jsx("polyline",{className:"arrowclosed",style:r,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},ob={[Gu.Arrow]:lk,[Gu.ArrowClosed]:sk};function ck(e){const t=ft();return O.useMemo(()=>{var o,s;return Object.prototype.hasOwnProperty.call(ob,e)?ob[e]:((s=(o=t.getState()).onError)==null||s.call(o,"009",di.error009(e)),null)},[e])}const uk=({id:e,type:t,color:r,width:a=12.5,height:o=12.5,markerUnits:s="strokeWidth",strokeWidth:u,orient:f="auto-start-reverse"})=>{const h=ck(t);return h?S.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${a}`,markerHeight:`${o}`,viewBox:"-10 -10 20 20",markerUnits:s,orient:f,refX:"0",refY:"0",children:S.jsx(h,{color:r,strokeWidth:u})}):null},r_=({defaultColor:e,rfId:t})=>{const r=Ge(s=>s.edges),a=Ge(s=>s.defaultEdgeOptions),o=O.useMemo(()=>dO(r,{id:t,defaultColor:e,defaultMarkerStart:a==null?void 0:a.markerStart,defaultMarkerEnd:a==null?void 0:a.markerEnd}),[r,a,t,e]);return o.length?S.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:S.jsx("defs",{children:o.map(s=>S.jsx(uk,{id:s.id,type:s.type,color:s.color,width:s.width,height:s.height,markerUnits:s.markerUnits,strokeWidth:s.strokeWidth,orient:s.orient},s.id))})}):null};r_.displayName="MarkerDefinitions";var fk=O.memo(r_);function a_({x:e,y:t,label:r,labelStyle:a,labelShowBg:o=!0,labelBgStyle:s,labelBgPadding:u=[2,4],labelBgBorderRadius:f=2,children:h,className:p,...y}){const[g,v]=O.useState({x:1,y:0,width:0,height:0}),x=At(["react-flow__edge-textwrapper",p]),b=O.useRef(null);return O.useEffect(()=>{if(b.current){const w=b.current.getBBox();v({x:w.x,y:w.y,width:w.width,height:w.height})}},[r]),r?S.jsxs("g",{transform:`translate(${e-g.width/2} ${t-g.height/2})`,className:x,visibility:g.width?"visible":"hidden",...y,children:[o&&S.jsx("rect",{width:g.width+2*u[0],x:-u[0],y:-u[1],height:g.height+2*u[1],className:"react-flow__edge-textbg",style:s,rx:f,ry:f}),S.jsx("text",{className:"react-flow__edge-text",y:g.height/2,dy:"0.3em",ref:b,style:a,children:r}),h]}):null}a_.displayName="EdgeText";const dk=O.memo(a_);function Cf({path:e,labelX:t,labelY:r,label:a,labelStyle:o,labelShowBg:s,labelBgStyle:u,labelBgPadding:f,labelBgBorderRadius:h,interactionWidth:p=20,...y}){return S.jsxs(S.Fragment,{children:[S.jsx("path",{...y,d:e,fill:"none",className:At(["react-flow__edge-path",y.className])}),p?S.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:p,className:"react-flow__edge-interaction"}):null,a&&Gn(t)&&Gn(r)?S.jsx(dk,{x:t,y:r,label:a,labelStyle:o,labelShowBg:s,labelBgStyle:u,labelBgPadding:f,labelBgBorderRadius:h}):null]})}function lb({pos:e,x1:t,y1:r,x2:a,y2:o}){return e===ye.Left||e===ye.Right?[.5*(t+a),r]:[t,.5*(r+o)]}function o_({sourceX:e,sourceY:t,sourcePosition:r=ye.Bottom,targetX:a,targetY:o,targetPosition:s=ye.Top}){const[u,f]=lb({pos:r,x1:e,y1:t,x2:a,y2:o}),[h,p]=lb({pos:s,x1:a,y1:o,x2:e,y2:t}),[y,g,v,x]=Nw({sourceX:e,sourceY:t,targetX:a,targetY:o,sourceControlX:u,sourceControlY:f,targetControlX:h,targetControlY:p});return[`M${e},${t} C${u},${f} ${h},${p} ${a},${o}`,y,g,v,x]}function l_(e){return O.memo(({id:t,sourceX:r,sourceY:a,targetX:o,targetY:s,sourcePosition:u,targetPosition:f,label:h,labelStyle:p,labelShowBg:y,labelBgStyle:g,labelBgPadding:v,labelBgBorderRadius:x,style:b,markerEnd:w,markerStart:E,interactionWidth:C})=>{const[N,A,T]=o_({sourceX:r,sourceY:a,sourcePosition:u,targetX:o,targetY:s,targetPosition:f}),D=e.isInternal?void 0:t;return S.jsx(Cf,{id:D,path:N,labelX:A,labelY:T,label:h,labelStyle:p,labelShowBg:y,labelBgStyle:g,labelBgPadding:v,labelBgBorderRadius:x,style:b,markerEnd:w,markerStart:E,interactionWidth:C})})}const hk=l_({isInternal:!1}),s_=l_({isInternal:!0});hk.displayName="SimpleBezierEdge";s_.displayName="SimpleBezierEdgeInternal";function c_(e){return O.memo(({id:t,sourceX:r,sourceY:a,targetX:o,targetY:s,label:u,labelStyle:f,labelShowBg:h,labelBgStyle:p,labelBgPadding:y,labelBgBorderRadius:g,style:v,sourcePosition:x=ye.Bottom,targetPosition:b=ye.Top,markerEnd:w,markerStart:E,pathOptions:C,interactionWidth:N})=>{const[A,T,D]=Pp({sourceX:r,sourceY:a,sourcePosition:x,targetX:o,targetY:s,targetPosition:b,borderRadius:C==null?void 0:C.borderRadius,offset:C==null?void 0:C.offset,stepPosition:C==null?void 0:C.stepPosition}),L=e.isInternal?void 0:t;return S.jsx(Cf,{id:L,path:A,labelX:T,labelY:D,label:u,labelStyle:f,labelShowBg:h,labelBgStyle:p,labelBgPadding:y,labelBgBorderRadius:g,style:v,markerEnd:w,markerStart:E,interactionWidth:N})})}const u_=c_({isInternal:!1}),f_=c_({isInternal:!0});u_.displayName="SmoothStepEdge";f_.displayName="SmoothStepEdgeInternal";function d_(e){return O.memo(({id:t,...r})=>{var o;const a=e.isInternal?void 0:t;return S.jsx(u_,{...r,id:a,pathOptions:O.useMemo(()=>{var s;return{borderRadius:0,offset:(s=r.pathOptions)==null?void 0:s.offset}},[(o=r.pathOptions)==null?void 0:o.offset])})})}const pk=d_({isInternal:!1}),h_=d_({isInternal:!0});pk.displayName="StepEdge";h_.displayName="StepEdgeInternal";function p_(e){return O.memo(({id:t,sourceX:r,sourceY:a,targetX:o,targetY:s,label:u,labelStyle:f,labelShowBg:h,labelBgStyle:p,labelBgPadding:y,labelBgBorderRadius:g,style:v,markerEnd:x,markerStart:b,interactionWidth:w})=>{const[E,C,N]=kw({sourceX:r,sourceY:a,targetX:o,targetY:s}),A=e.isInternal?void 0:t;return S.jsx(Cf,{id:A,path:E,labelX:C,labelY:N,label:u,labelStyle:f,labelShowBg:h,labelBgStyle:p,labelBgPadding:y,labelBgBorderRadius:g,style:v,markerEnd:x,markerStart:b,interactionWidth:w})})}const mk=p_({isInternal:!1}),m_=p_({isInternal:!0});mk.displayName="StraightEdge";m_.displayName="StraightEdgeInternal";function g_(e){return O.memo(({id:t,sourceX:r,sourceY:a,targetX:o,targetY:s,sourcePosition:u=ye.Bottom,targetPosition:f=ye.Top,label:h,labelStyle:p,labelShowBg:y,labelBgStyle:g,labelBgPadding:v,labelBgBorderRadius:x,style:b,markerEnd:w,markerStart:E,pathOptions:C,interactionWidth:N})=>{const[A,T,D]=Tw({sourceX:r,sourceY:a,sourcePosition:u,targetX:o,targetY:s,targetPosition:f,curvature:C==null?void 0:C.curvature}),L=e.isInternal?void 0:t;return S.jsx(Cf,{id:L,path:A,labelX:T,labelY:D,label:h,labelStyle:p,labelShowBg:y,labelBgStyle:g,labelBgPadding:v,labelBgBorderRadius:x,style:b,markerEnd:w,markerStart:E,interactionWidth:N})})}const gk=g_({isInternal:!1}),y_=g_({isInternal:!0});gk.displayName="BezierEdge";y_.displayName="BezierEdgeInternal";const sb={default:y_,straight:m_,step:h_,smoothstep:f_,simplebezier:s_},cb={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},yk=(e,t,r)=>r===ye.Left?e-t:r===ye.Right?e+t:e,vk=(e,t,r)=>r===ye.Top?e-t:r===ye.Bottom?e+t:e,ub="react-flow__edgeupdater";function fb({position:e,centerX:t,centerY:r,radius:a=10,onMouseDown:o,onMouseEnter:s,onMouseOut:u,type:f}){return S.jsx("circle",{onMouseDown:o,onMouseEnter:s,onMouseOut:u,className:At([ub,`${ub}-${f}`]),cx:yk(t,a,e),cy:vk(r,a,e),r:a,stroke:"transparent",fill:"transparent"})}function xk({isReconnectable:e,reconnectRadius:t,edge:r,sourceX:a,sourceY:o,targetX:s,targetY:u,sourcePosition:f,targetPosition:h,onReconnect:p,onReconnectStart:y,onReconnectEnd:g,setReconnecting:v,setUpdateHover:x}){const b=ft(),w=(T,D)=>{if(T.button!==0)return;const{autoPanOnConnect:L,domNode:j,connectionMode:I,connectionRadius:Z,lib:te,onConnectStart:G,cancelConnection:q,nodeLookup:ie,rfId:z,panBy:F,updateConnection:k}=b.getState(),B=D.type==="target",H=(R,Y)=>{v(!1),g==null||g(R,r,D.type,Y)},$=R=>p==null?void 0:p(r,R),K=(R,Y)=>{v(!0),y==null||y(T,r,D.type),G==null||G(R,Y)};Jp.onPointerDown(T.nativeEvent,{autoPanOnConnect:L,connectionMode:I,connectionRadius:Z,domNode:j,handleId:D.id,nodeId:D.nodeId,nodeLookup:ie,isTarget:B,edgeUpdaterType:D.type,lib:te,flowId:z,cancelConnection:q,panBy:F,isValidConnection:(...R)=>{var Y,J;return((J=(Y=b.getState()).isValidConnection)==null?void 0:J.call(Y,...R))??!0},onConnect:$,onConnectStart:K,onConnectEnd:(...R)=>{var Y,J;return(J=(Y=b.getState()).onConnectEnd)==null?void 0:J.call(Y,...R)},onReconnectEnd:H,updateConnection:k,getTransform:()=>b.getState().transform,getFromHandle:()=>b.getState().connection.fromHandle,dragThreshold:b.getState().connectionDragThreshold,handleDomNode:T.currentTarget})},E=T=>w(T,{nodeId:r.target,id:r.targetHandle??null,type:"target"}),C=T=>w(T,{nodeId:r.source,id:r.sourceHandle??null,type:"source"}),N=()=>x(!0),A=()=>x(!1);return S.jsxs(S.Fragment,{children:[(e===!0||e==="source")&&S.jsx(fb,{position:f,centerX:a,centerY:o,radius:t,onMouseDown:E,onMouseEnter:N,onMouseOut:A,type:"source"}),(e===!0||e==="target")&&S.jsx(fb,{position:h,centerX:s,centerY:u,radius:t,onMouseDown:C,onMouseEnter:N,onMouseOut:A,type:"target"})]})}function bk({id:e,edgesFocusable:t,edgesReconnectable:r,elementsSelectable:a,onClick:o,onDoubleClick:s,onContextMenu:u,onMouseEnter:f,onMouseMove:h,onMouseLeave:p,reconnectRadius:y,onReconnect:g,onReconnectStart:v,onReconnectEnd:x,rfId:b,edgeTypes:w,noPanClassName:E,onError:C,disableKeyboardA11y:N}){let A=Ge(_e=>_e.edgeLookup.get(e));const T=Ge(_e=>_e.defaultEdgeOptions);A=T?{...T,...A}:A;let D=A.type||"default",L=(w==null?void 0:w[D])||sb[D];L===void 0&&(C==null||C("011",di.error011(D)),D="default",L=(w==null?void 0:w.default)||sb.default);const j=!!(A.focusable||t&&typeof A.focusable>"u"),I=typeof g<"u"&&(A.reconnectable||r&&typeof A.reconnectable>"u"),Z=!!(A.selectable||a&&typeof A.selectable>"u"),te=O.useRef(null),[G,q]=O.useState(!1),[ie,z]=O.useState(!1),F=ft(),{zIndex:k,sourceX:B,sourceY:H,targetX:$,targetY:K,sourcePosition:R,targetPosition:Y}=Ge(O.useCallback(_e=>{const be=_e.nodeLookup.get(A.source),ke=_e.nodeLookup.get(A.target);if(!be||!ke)return{zIndex:A.zIndex,...cb};const Fe=fO({id:e,sourceNode:be,targetNode:ke,sourceHandle:A.sourceHandle||null,targetHandle:A.targetHandle||null,connectionMode:_e.connectionMode,onError:C});return{zIndex:rO({selected:A.selected,zIndex:A.zIndex,sourceNode:be,targetNode:ke,elevateOnSelect:_e.elevateEdgesOnSelect,zIndexMode:_e.zIndexMode}),...Fe||cb}},[A.source,A.target,A.sourceHandle,A.targetHandle,A.selected,A.zIndex]),ut),J=O.useMemo(()=>A.markerStart?`url('#${Kp(A.markerStart,b)}')`:void 0,[A.markerStart,b]),ne=O.useMemo(()=>A.markerEnd?`url('#${Kp(A.markerEnd,b)}')`:void 0,[A.markerEnd,b]);if(A.hidden||B===null||H===null||$===null||K===null)return null;const se=_e=>{var Le;const{addSelectedEdges:be,unselectNodesAndEdges:ke,multiSelectionActive:Fe}=F.getState();Z&&(F.setState({nodesSelectionActive:!1}),A.selected&&Fe?(ke({nodes:[],edges:[A]}),(Le=te.current)==null||Le.blur()):be([e])),o&&o(_e,A)},fe=s?_e=>{s(_e,{...A})}:void 0,de=u?_e=>{u(_e,{...A})}:void 0,ce=f?_e=>{f(_e,{...A})}:void 0,he=h?_e=>{h(_e,{...A})}:void 0,Ae=p?_e=>{p(_e,{...A})}:void 0,Ee=_e=>{var be;if(!N&&hw.includes(_e.key)&&Z){const{unselectNodesAndEdges:ke,addSelectedEdges:Fe}=F.getState();_e.key==="Escape"?((be=te.current)==null||be.blur(),ke({edges:[A]})):Fe([e])}};return S.jsx("svg",{style:{zIndex:k},children:S.jsxs("g",{className:At(["react-flow__edge",`react-flow__edge-${D}`,A.className,E,{selected:A.selected,animated:A.animated,inactive:!Z&&!o,updating:G,selectable:Z}]),onClick:se,onDoubleClick:fe,onContextMenu:de,onMouseEnter:ce,onMouseMove:he,onMouseLeave:Ae,onKeyDown:j?Ee:void 0,tabIndex:j?0:void 0,role:A.ariaRole??(j?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":A.ariaLabel===null?void 0:A.ariaLabel||`Edge from ${A.source} to ${A.target}`,"aria-describedby":j?`${Zw}-${b}`:void 0,ref:te,...A.domAttributes,children:[!ie&&S.jsx(L,{id:e,source:A.source,target:A.target,type:A.type,selected:A.selected,animated:A.animated,selectable:Z,deletable:A.deletable??!0,label:A.label,labelStyle:A.labelStyle,labelShowBg:A.labelShowBg,labelBgStyle:A.labelBgStyle,labelBgPadding:A.labelBgPadding,labelBgBorderRadius:A.labelBgBorderRadius,sourceX:B,sourceY:H,targetX:$,targetY:K,sourcePosition:R,targetPosition:Y,data:A.data,style:A.style,sourceHandleId:A.sourceHandle,targetHandleId:A.targetHandle,markerStart:J,markerEnd:ne,pathOptions:"pathOptions"in A?A.pathOptions:void 0,interactionWidth:A.interactionWidth}),I&&S.jsx(xk,{edge:A,isReconnectable:I,reconnectRadius:y,onReconnect:g,onReconnectStart:v,onReconnectEnd:x,sourceX:B,sourceY:H,targetX:$,targetY:K,sourcePosition:R,targetPosition:Y,setUpdateHover:q,setReconnecting:z})]})})}var wk=O.memo(bk);const _k=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function v_({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:r,edgeTypes:a,noPanClassName:o,onReconnect:s,onEdgeContextMenu:u,onEdgeMouseEnter:f,onEdgeMouseMove:h,onEdgeMouseLeave:p,onEdgeClick:y,reconnectRadius:g,onEdgeDoubleClick:v,onReconnectStart:x,onReconnectEnd:b,disableKeyboardA11y:w}){const{edgesFocusable:E,edgesReconnectable:C,elementsSelectable:N,onError:A}=Ge(_k,ut),T=ok(t);return S.jsxs("div",{className:"react-flow__edges",children:[S.jsx(fk,{defaultColor:e,rfId:r}),T.map(D=>S.jsx(wk,{id:D,edgesFocusable:E,edgesReconnectable:C,elementsSelectable:N,noPanClassName:o,onReconnect:s,onContextMenu:u,onMouseEnter:f,onMouseMove:h,onMouseLeave:p,onClick:y,reconnectRadius:g,onDoubleClick:v,onReconnectStart:x,onReconnectEnd:b,rfId:r,onError:A,edgeTypes:a,disableKeyboardA11y:w},D))]})}v_.displayName="EdgeRenderer";const Sk=O.memo(v_),Ek=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function Ck({children:e}){const t=Ge(Ek);return S.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function Ak(e){const t=Sf(),r=O.useRef(!1);O.useEffect(()=>{!r.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),r.current=!0)},[e,t.viewportInitialized])}const Nk=e=>{var t;return(t=e.panZoom)==null?void 0:t.syncViewport};function Tk(e){const t=Ge(Nk),r=ft();return O.useEffect(()=>{e&&(t==null||t(e),r.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function Mk(e){return e.connection.inProgress?{...e.connection,to:Ls(e.connection.to,e.transform)}:{...e.connection}}function Ok(e){return Mk}function kk(e){const t=Ok();return Ge(t,ut)}const Rk=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function Dk({containerStyle:e,style:t,type:r,component:a}){const{nodesConnectable:o,width:s,height:u,isValid:f,inProgress:h}=Ge(Rk,ut);return!(s&&o&&h)?null:S.jsx("svg",{style:e,width:s,height:u,className:"react-flow__connectionline react-flow__container",children:S.jsx("g",{className:At(["react-flow__connection",gw(f)]),children:S.jsx(x_,{style:t,type:r,CustomComponent:a,isValid:f})})})}const x_=({style:e,type:t=zr.Bezier,CustomComponent:r,isValid:a})=>{const{inProgress:o,from:s,fromNode:u,fromHandle:f,fromPosition:h,to:p,toNode:y,toHandle:g,toPosition:v,pointer:x}=kk();if(!o)return;if(r)return S.jsx(r,{connectionLineType:t,connectionLineStyle:e,fromNode:u,fromHandle:f,fromX:s.x,fromY:s.y,toX:p.x,toY:p.y,fromPosition:h,toPosition:v,connectionStatus:gw(a),toNode:y,toHandle:g,pointer:x});let b="";const w={sourceX:s.x,sourceY:s.y,sourcePosition:h,targetX:p.x,targetY:p.y,targetPosition:v};switch(t){case zr.Bezier:[b]=Tw(w);break;case zr.SimpleBezier:[b]=o_(w);break;case zr.Step:[b]=Pp({...w,borderRadius:0});break;case zr.SmoothStep:[b]=Pp(w);break;default:[b]=kw(w)}return S.jsx("path",{d:b,fill:"none",className:"react-flow__connection-path",style:e})};x_.displayName="ConnectionLine";const jk={};function db(e=jk){O.useRef(e),ft(),O.useEffect(()=>{},[e])}function zk(){ft(),O.useRef(!1),O.useEffect(()=>{},[])}function b_({nodeTypes:e,edgeTypes:t,onInit:r,onNodeClick:a,onEdgeClick:o,onNodeDoubleClick:s,onEdgeDoubleClick:u,onNodeMouseEnter:f,onNodeMouseMove:h,onNodeMouseLeave:p,onNodeContextMenu:y,onSelectionContextMenu:g,onSelectionStart:v,onSelectionEnd:x,connectionLineType:b,connectionLineStyle:w,connectionLineComponent:E,connectionLineContainerStyle:C,selectionKeyCode:N,selectionOnDrag:A,selectionMode:T,multiSelectionKeyCode:D,panActivationKeyCode:L,zoomActivationKeyCode:j,deleteKeyCode:I,onlyRenderVisibleElements:Z,elementsSelectable:te,defaultViewport:G,translateExtent:q,minZoom:ie,maxZoom:z,preventScrolling:F,defaultMarkerColor:k,zoomOnScroll:B,zoomOnPinch:H,panOnScroll:$,panOnScrollSpeed:K,panOnScrollMode:R,zoomOnDoubleClick:Y,panOnDrag:J,onPaneClick:ne,onPaneMouseEnter:se,onPaneMouseMove:fe,onPaneMouseLeave:de,onPaneScroll:ce,onPaneContextMenu:he,paneClickDistance:Ae,nodeClickDistance:Ee,onEdgeContextMenu:_e,onEdgeMouseEnter:be,onEdgeMouseMove:ke,onEdgeMouseLeave:Fe,reconnectRadius:Le,onReconnect:yt,onReconnectStart:dn,onReconnectEnd:Ot,noDragClassName:Hn,noWheelClassName:gi,noPanClassName:Zr,disableKeyboardA11y:Xr,nodeExtent:Dt,rfId:Da,viewport:yi,onViewportChange:Ji}){return db(e),db(t),zk(),Ak(r),Tk(yi),S.jsx(P3,{onPaneClick:ne,onPaneMouseEnter:se,onPaneMouseMove:fe,onPaneMouseLeave:de,onPaneContextMenu:he,onPaneScroll:ce,paneClickDistance:Ae,deleteKeyCode:I,selectionKeyCode:N,selectionOnDrag:A,selectionMode:T,onSelectionStart:v,onSelectionEnd:x,multiSelectionKeyCode:D,panActivationKeyCode:L,zoomActivationKeyCode:j,elementsSelectable:te,zoomOnScroll:B,zoomOnPinch:H,zoomOnDoubleClick:Y,panOnScroll:$,panOnScrollSpeed:K,panOnScrollMode:R,panOnDrag:J,defaultViewport:G,translateExtent:q,minZoom:ie,maxZoom:z,onSelectionContextMenu:g,preventScrolling:F,noDragClassName:Hn,noWheelClassName:gi,noPanClassName:Zr,disableKeyboardA11y:Xr,onViewportChange:Ji,isControlledViewport:!!yi,children:S.jsxs(Ck,{children:[S.jsx(Sk,{edgeTypes:t,onEdgeClick:o,onEdgeDoubleClick:u,onReconnect:yt,onReconnectStart:dn,onReconnectEnd:Ot,onlyRenderVisibleElements:Z,onEdgeContextMenu:_e,onEdgeMouseEnter:be,onEdgeMouseMove:ke,onEdgeMouseLeave:Fe,reconnectRadius:Le,defaultMarkerColor:k,noPanClassName:Zr,disableKeyboardA11y:Xr,rfId:Da}),S.jsx(Dk,{style:w,type:b,component:E,containerStyle:C}),S.jsx("div",{className:"react-flow__edgelabel-renderer"}),S.jsx(ak,{nodeTypes:e,onNodeClick:a,onNodeDoubleClick:s,onNodeMouseEnter:f,onNodeMouseMove:h,onNodeMouseLeave:p,onNodeContextMenu:y,nodeClickDistance:Ee,onlyRenderVisibleElements:Z,noPanClassName:Zr,noDragClassName:Hn,disableKeyboardA11y:Xr,nodeExtent:Dt,rfId:Da}),S.jsx("div",{className:"react-flow__viewport-portal"})]})})}b_.displayName="GraphView";const Lk=O.memo(b_),hb=({nodes:e,edges:t,defaultNodes:r,defaultEdges:a,width:o,height:s,fitView:u,fitViewOptions:f,minZoom:h=.5,maxZoom:p=2,nodeOrigin:y,nodeExtent:g,zIndexMode:v="basic"}={})=>{const x=new Map,b=new Map,w=new Map,E=new Map,C=a??t??[],N=r??e??[],A=y??[0,0],T=g??ys;jw(w,E,C);const{nodesInitialized:D}=Wp(N,x,b,{nodeOrigin:A,nodeExtent:T,zIndexMode:v});let L=[0,0,1];if(u&&o&&s){const j=js(x,{filter:G=>!!((G.width||G.initialWidth)&&(G.height||G.initialHeight))}),{x:I,y:Z,zoom:te}=zm(j,o,s,h,p,(f==null?void 0:f.padding)??.1);L=[I,Z,te]}return{rfId:"1",width:o??0,height:s??0,transform:L,nodes:N,nodesInitialized:D,nodeLookup:x,parentLookup:b,edges:C,edgeLookup:E,connectionLookup:w,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:r!==void 0,hasDefaultEdges:a!==void 0,panZoom:null,minZoom:h,maxZoom:p,translateExtent:ys,nodeExtent:T,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:$o.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:A,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:u??!1,fitViewOptions:f,fitViewResolver:null,connection:{...mw},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:WM,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:pw,zIndexMode:v,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},Hk=({nodes:e,edges:t,defaultNodes:r,defaultEdges:a,width:o,height:s,fitView:u,fitViewOptions:f,minZoom:h,maxZoom:p,nodeOrigin:y,nodeExtent:g,zIndexMode:v})=>t3((x,b)=>{async function w(){const{nodeLookup:E,panZoom:C,fitViewOptions:N,fitViewResolver:A,width:T,height:D,minZoom:L,maxZoom:j}=b();C&&(await PM({nodes:E,width:T,height:D,panZoom:C,minZoom:L,maxZoom:j},N),A==null||A.resolve(!0),x({fitViewResolver:null}))}return{...hb({nodes:e,edges:t,width:o,height:s,fitView:u,fitViewOptions:f,minZoom:h,maxZoom:p,nodeOrigin:y,nodeExtent:g,defaultNodes:r,defaultEdges:a,zIndexMode:v}),setNodes:E=>{const{nodeLookup:C,parentLookup:N,nodeOrigin:A,elevateNodesOnSelect:T,fitViewQueued:D,zIndexMode:L,nodesSelectionActive:j}=b(),{nodesInitialized:I,hasSelectedNodes:Z}=Wp(E,C,N,{nodeOrigin:A,nodeExtent:g,elevateNodesOnSelect:T,checkEquality:!0,zIndexMode:L}),te=j&&Z;D&&I?(w(),x({nodes:E,nodesInitialized:I,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:te})):x({nodes:E,nodesInitialized:I,nodesSelectionActive:te})},setEdges:E=>{const{connectionLookup:C,edgeLookup:N}=b();jw(C,N,E),x({edges:E})},setDefaultNodesAndEdges:(E,C)=>{if(E){const{setNodes:N}=b();N(E),x({hasDefaultNodes:!0})}if(C){const{setEdges:N}=b();N(C),x({hasDefaultEdges:!0})}},updateNodeInternals:E=>{const{triggerNodeChanges:C,nodeLookup:N,parentLookup:A,domNode:T,nodeOrigin:D,nodeExtent:L,debug:j,fitViewQueued:I,zIndexMode:Z}=b(),{changes:te,updatedInternals:G}=xO(E,N,A,T,D,L,Z);G&&(mO(N,A,{nodeOrigin:D,nodeExtent:L,zIndexMode:Z}),I?(w(),x({fitViewQueued:!1,fitViewOptions:void 0})):x({}),(te==null?void 0:te.length)>0&&(j&&console.log("React Flow: trigger node changes",te),C==null||C(te)))},updateNodePositions:(E,C=!1)=>{const N=[];let A=[];const{nodeLookup:T,triggerNodeChanges:D,connection:L,updateConnection:j,onNodesChangeMiddlewareMap:I}=b();for(const[Z,te]of E){const G=T.get(Z),q=!!(G!=null&&G.expandParent&&(G!=null&&G.parentId)&&(te!=null&&te.position)),ie={id:Z,type:"position",position:q?{x:Math.max(0,te.position.x),y:Math.max(0,te.position.y)}:te.position,dragging:C};if(G&&L.inProgress&&L.fromNode.id===G.id){const z=Ta(G,L.fromHandle,ye.Left,!0);j({...L,from:z})}q&&G.parentId&&N.push({id:Z,parentId:G.parentId,rect:{...te.internals.positionAbsolute,width:te.measured.width??0,height:te.measured.height??0}}),A.push(ie)}if(N.length>0){const{parentLookup:Z,nodeOrigin:te}=b(),G=$m(N,T,Z,te);A.push(...G)}for(const Z of I.values())A=Z(A);D(A)},triggerNodeChanges:E=>{const{onNodesChange:C,setNodes:N,nodes:A,hasDefaultNodes:T,debug:D}=b();if(E!=null&&E.length){if(T){const L=Qw(E,A);N(L)}D&&console.log("React Flow: trigger node changes",E),C==null||C(E)}},triggerEdgeChanges:E=>{const{onEdgesChange:C,setEdges:N,edges:A,hasDefaultEdges:T,debug:D}=b();if(E!=null&&E.length){if(T){const L=Pw(E,A);N(L)}D&&console.log("React Flow: trigger edge changes",E),C==null||C(E)}},addSelectedNodes:E=>{const{multiSelectionActive:C,edgeLookup:N,nodeLookup:A,triggerNodeChanges:T,triggerEdgeChanges:D}=b();if(C){const L=E.map(j=>va(j,!0));T(L);return}T(Oo(A,new Set([...E]),!0)),D(Oo(N))},addSelectedEdges:E=>{const{multiSelectionActive:C,edgeLookup:N,nodeLookup:A,triggerNodeChanges:T,triggerEdgeChanges:D}=b();if(C){const L=E.map(j=>va(j,!0));D(L);return}D(Oo(N,new Set([...E]))),T(Oo(A,new Set,!0))},unselectNodesAndEdges:({nodes:E,edges:C}={})=>{const{edges:N,nodes:A,nodeLookup:T,triggerNodeChanges:D,triggerEdgeChanges:L}=b(),j=E||A,I=C||N,Z=[];for(const G of j){if(!G.selected)continue;const q=T.get(G.id);q&&(q.selected=!1),Z.push(va(G.id,!1))}const te=[];for(const G of I)G.selected&&te.push(va(G.id,!1));D(Z),L(te)},setMinZoom:E=>{const{panZoom:C,maxZoom:N}=b();C==null||C.setScaleExtent([E,N]),x({minZoom:E})},setMaxZoom:E=>{const{panZoom:C,minZoom:N}=b();C==null||C.setScaleExtent([N,E]),x({maxZoom:E})},setTranslateExtent:E=>{var C;(C=b().panZoom)==null||C.setTranslateExtent(E),x({translateExtent:E})},resetSelectedElements:()=>{const{edges:E,nodes:C,triggerNodeChanges:N,triggerEdgeChanges:A,elementsSelectable:T}=b();if(!T)return;const D=C.reduce((j,I)=>I.selected?[...j,va(I.id,!1)]:j,[]),L=E.reduce((j,I)=>I.selected?[...j,va(I.id,!1)]:j,[]);N(D),A(L)},setNodeExtent:E=>{const{nodes:C,nodeLookup:N,parentLookup:A,nodeOrigin:T,elevateNodesOnSelect:D,nodeExtent:L,zIndexMode:j}=b();E[0][0]===L[0][0]&&E[0][1]===L[0][1]&&E[1][0]===L[1][0]&&E[1][1]===L[1][1]||(Wp(C,N,A,{nodeOrigin:T,nodeExtent:E,elevateNodesOnSelect:D,checkEquality:!1,zIndexMode:j}),x({nodeExtent:E}))},panBy:E=>{const{transform:C,width:N,height:A,panZoom:T,translateExtent:D}=b();return bO({delta:E,panZoom:T,transform:C,translateExtent:D,width:N,height:A})},setCenter:async(E,C,N)=>{const{width:A,height:T,maxZoom:D,panZoom:L}=b();if(!L)return Promise.resolve(!1);const j=typeof(N==null?void 0:N.zoom)<"u"?N.zoom:D;return await L.setViewport({x:A/2-E*j,y:T/2-C*j,zoom:j},{duration:N==null?void 0:N.duration,ease:N==null?void 0:N.ease,interpolate:N==null?void 0:N.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{x({connection:{...mw}})},updateConnection:E=>{x({connection:E})},reset:()=>x({...hb()})}},Object.is);function w_({initialNodes:e,initialEdges:t,defaultNodes:r,defaultEdges:a,initialWidth:o,initialHeight:s,initialMinZoom:u,initialMaxZoom:f,initialFitViewOptions:h,fitView:p,nodeOrigin:y,nodeExtent:g,zIndexMode:v,children:x}){const[b]=O.useState(()=>Hk({nodes:e,edges:t,defaultNodes:r,defaultEdges:a,width:o,height:s,fitView:p,minZoom:u,maxZoom:f,fitViewOptions:h,nodeOrigin:y,nodeExtent:g,zIndexMode:v}));return S.jsx(i3,{value:b,children:S.jsx(C3,{children:x})})}function Bk({children:e,nodes:t,edges:r,defaultNodes:a,defaultEdges:o,width:s,height:u,fitView:f,fitViewOptions:h,minZoom:p,maxZoom:y,nodeOrigin:g,nodeExtent:v,zIndexMode:x}){return O.useContext(wf)?S.jsx(S.Fragment,{children:e}):S.jsx(w_,{initialNodes:t,initialEdges:r,defaultNodes:a,defaultEdges:o,initialWidth:s,initialHeight:u,fitView:f,initialFitViewOptions:h,initialMinZoom:p,initialMaxZoom:y,nodeOrigin:g,nodeExtent:v,zIndexMode:x,children:e})}const Uk={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function Yk({nodes:e,edges:t,defaultNodes:r,defaultEdges:a,className:o,nodeTypes:s,edgeTypes:u,onNodeClick:f,onEdgeClick:h,onInit:p,onMove:y,onMoveStart:g,onMoveEnd:v,onConnect:x,onConnectStart:b,onConnectEnd:w,onClickConnectStart:E,onClickConnectEnd:C,onNodeMouseEnter:N,onNodeMouseMove:A,onNodeMouseLeave:T,onNodeContextMenu:D,onNodeDoubleClick:L,onNodeDragStart:j,onNodeDrag:I,onNodeDragStop:Z,onNodesDelete:te,onEdgesDelete:G,onDelete:q,onSelectionChange:ie,onSelectionDragStart:z,onSelectionDrag:F,onSelectionDragStop:k,onSelectionContextMenu:B,onSelectionStart:H,onSelectionEnd:$,onBeforeDelete:K,connectionMode:R,connectionLineType:Y=zr.Bezier,connectionLineStyle:J,connectionLineComponent:ne,connectionLineContainerStyle:se,deleteKeyCode:fe="Backspace",selectionKeyCode:de="Shift",selectionOnDrag:ce=!1,selectionMode:he=vs.Full,panActivationKeyCode:Ae="Space",multiSelectionKeyCode:Ee=bs()?"Meta":"Control",zoomActivationKeyCode:_e=bs()?"Meta":"Control",snapToGrid:be,snapGrid:ke,onlyRenderVisibleElements:Fe=!1,selectNodesOnDrag:Le,nodesDraggable:yt,autoPanOnNodeFocus:dn,nodesConnectable:Ot,nodesFocusable:Hn,nodeOrigin:gi=Xw,edgesFocusable:Zr,edgesReconnectable:Xr,elementsSelectable:Dt=!0,defaultViewport:Da=g3,minZoom:yi=.5,maxZoom:Ji=2,translateExtent:Fr=ys,preventScrolling:Bf=!0,nodeExtent:ja,defaultMarkerColor:Uf="#b1b1b7",zoomOnScroll:Yf=!0,zoomOnPinch:Qr=!0,panOnScroll:qt=!1,panOnScrollSpeed:Kn=.5,panOnScrollMode:Gt=_a.Free,zoomOnDoubleClick:$f=!0,panOnDrag:Vf=!0,onPaneClick:qf,onPaneMouseEnter:za,onPaneMouseMove:La,onPaneMouseLeave:Ha,onPaneScroll:vi,onPaneContextMenu:Ba,paneClickDistance:Pr=1,nodeClickDistance:Gf=0,children:Us,onReconnect:al,onReconnectStart:Kr,onReconnectEnd:If,onEdgeContextMenu:Ys,onEdgeDoubleClick:$s,onEdgeMouseEnter:Vs,onEdgeMouseMove:ol,onEdgeMouseLeave:ll,reconnectRadius:qs=10,onNodesChange:Gs,onEdgesChange:Wn,noDragClassName:Nt="nodrag",noWheelClassName:Bt="nowheel",noPanClassName:xi="nopan",fitView:Ua,fitViewOptions:Is,connectOnClick:Zf,attributionPosition:Zs,proOptions:Wr,defaultEdgeOptions:sl,elevateNodesOnSelect:er=!0,elevateEdgesOnSelect:tr=!1,disableKeyboardA11y:nr=!1,autoPanOnConnect:ir,autoPanOnNodeDrag:vt,autoPanSpeed:Xs,connectionRadius:Fs,isValidConnection:bi,onError:rr,style:Xf,id:cl,nodeDragThreshold:Qs,connectionDragThreshold:Ff,viewport:Ya,onViewportChange:$a,width:Bn,height:Qt,colorMode:Ps="light",debug:Qf,onScroll:ar,ariaLabelConfig:Ks,zIndexMode:Jr="basic",...Pf},Pt){const ea=cl||"1",Ws=b3(Ps),ul=O.useCallback(wi=>{wi.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),ar==null||ar(wi)},[ar]);return S.jsx("div",{"data-testid":"rf__wrapper",...Pf,onScroll:ul,style:{...Xf,...Uk},ref:Pt,className:At(["react-flow",o,Ws]),id:cl,role:"application",children:S.jsxs(Bk,{nodes:e,edges:t,width:Bn,height:Qt,fitView:Ua,fitViewOptions:Is,minZoom:yi,maxZoom:Ji,nodeOrigin:gi,nodeExtent:ja,zIndexMode:Jr,children:[S.jsx(x3,{nodes:e,edges:t,defaultNodes:r,defaultEdges:a,onConnect:x,onConnectStart:b,onConnectEnd:w,onClickConnectStart:E,onClickConnectEnd:C,nodesDraggable:yt,autoPanOnNodeFocus:dn,nodesConnectable:Ot,nodesFocusable:Hn,edgesFocusable:Zr,edgesReconnectable:Xr,elementsSelectable:Dt,elevateNodesOnSelect:er,elevateEdgesOnSelect:tr,minZoom:yi,maxZoom:Ji,nodeExtent:ja,onNodesChange:Gs,onEdgesChange:Wn,snapToGrid:be,snapGrid:ke,connectionMode:R,translateExtent:Fr,connectOnClick:Zf,defaultEdgeOptions:sl,fitView:Ua,fitViewOptions:Is,onNodesDelete:te,onEdgesDelete:G,onDelete:q,onNodeDragStart:j,onNodeDrag:I,onNodeDragStop:Z,onSelectionDrag:F,onSelectionDragStart:z,onSelectionDragStop:k,onMove:y,onMoveStart:g,onMoveEnd:v,noPanClassName:xi,nodeOrigin:gi,rfId:ea,autoPanOnConnect:ir,autoPanOnNodeDrag:vt,autoPanSpeed:Xs,onError:rr,connectionRadius:Fs,isValidConnection:bi,selectNodesOnDrag:Le,nodeDragThreshold:Qs,connectionDragThreshold:Ff,onBeforeDelete:K,debug:Qf,ariaLabelConfig:Ks,zIndexMode:Jr}),S.jsx(Lk,{onInit:p,onNodeClick:f,onEdgeClick:h,onNodeMouseEnter:N,onNodeMouseMove:A,onNodeMouseLeave:T,onNodeContextMenu:D,onNodeDoubleClick:L,nodeTypes:s,edgeTypes:u,connectionLineType:Y,connectionLineStyle:J,connectionLineComponent:ne,connectionLineContainerStyle:se,selectionKeyCode:de,selectionOnDrag:ce,selectionMode:he,deleteKeyCode:fe,multiSelectionKeyCode:Ee,panActivationKeyCode:Ae,zoomActivationKeyCode:_e,onlyRenderVisibleElements:Fe,defaultViewport:Da,translateExtent:Fr,minZoom:yi,maxZoom:Ji,preventScrolling:Bf,zoomOnScroll:Yf,zoomOnPinch:Qr,zoomOnDoubleClick:$f,panOnScroll:qt,panOnScrollSpeed:Kn,panOnScrollMode:Gt,panOnDrag:Vf,onPaneClick:qf,onPaneMouseEnter:za,onPaneMouseMove:La,onPaneMouseLeave:Ha,onPaneScroll:vi,onPaneContextMenu:Ba,paneClickDistance:Pr,nodeClickDistance:Gf,onSelectionContextMenu:B,onSelectionStart:H,onSelectionEnd:$,onReconnect:al,onReconnectStart:Kr,onReconnectEnd:If,onEdgeContextMenu:Ys,onEdgeDoubleClick:$s,onEdgeMouseEnter:Vs,onEdgeMouseMove:ol,onEdgeMouseLeave:ll,reconnectRadius:qs,defaultMarkerColor:Uf,noDragClassName:Nt,noWheelClassName:Bt,noPanClassName:xi,rfId:ea,disableKeyboardA11y:nr,nodeExtent:ja,viewport:Ya,onViewportChange:$a}),S.jsx(m3,{onSelectionChange:ie}),Us,S.jsx(u3,{proOptions:Wr,position:Zs}),S.jsx(c3,{rfId:ea,disableKeyboardA11y:nr})]})})}var $k=Kw(Yk);function Vk(e){const[t,r]=O.useState(e),a=O.useCallback(o=>r(s=>Qw(o,s)),[]);return[t,r,a]}function qk(e){const[t,r]=O.useState(e),a=O.useCallback(o=>r(s=>Pw(o,s)),[]);return[t,r,a]}function Gk({dimensions:e,lineWidth:t,variant:r,className:a}){return S.jsx("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:At(["react-flow__background-pattern",r,a])})}function Ik({radius:e,className:t}){return S.jsx("circle",{cx:e,cy:e,r:e,className:At(["react-flow__background-pattern","dots",t])})}var Gi;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(Gi||(Gi={}));const Zk={[Gi.Dots]:1,[Gi.Lines]:1,[Gi.Cross]:6},Xk=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function __({id:e,variant:t=Gi.Dots,gap:r=20,size:a,lineWidth:o=1,offset:s=0,color:u,bgColor:f,style:h,className:p,patternClassName:y}){const g=O.useRef(null),{transform:v,patternId:x}=Ge(Xk,ut),b=a||Zk[t],w=t===Gi.Dots,E=t===Gi.Cross,C=Array.isArray(r)?r:[r,r],N=[C[0]*v[2]||1,C[1]*v[2]||1],A=b*v[2],T=Array.isArray(s)?s:[s,s],D=E?[A,A]:N,L=[T[0]*v[2]||1+D[0]/2,T[1]*v[2]||1+D[1]/2],j=`${x}${e||""}`;return S.jsxs("svg",{className:At(["react-flow__background",p]),style:{...h,...Ef,"--xy-background-color-props":f,"--xy-background-pattern-color-props":u},ref:g,"data-testid":"rf__background",children:[S.jsx("pattern",{id:j,x:v[0]%N[0],y:v[1]%N[1],width:N[0],height:N[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${L[0]},-${L[1]})`,children:w?S.jsx(Ik,{radius:A/2,className:y}):S.jsx(Gk,{dimensions:D,lineWidth:o,variant:t,className:y})}),S.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${j})`})]})}__.displayName="Background";const Fk=O.memo(__);function Qk(){return S.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:S.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function Pk(){return S.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:S.jsx("path",{d:"M0 0h32v4.2H0z"})})}function Kk(){return S.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:S.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function Wk(){return S.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:S.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function Jk(){return S.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:S.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function gu({children:e,className:t,...r}){return S.jsx("button",{type:"button",className:At(["react-flow__controls-button",t]),...r,children:e})}const eR=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function S_({style:e,showZoom:t=!0,showFitView:r=!0,showInteractive:a=!0,fitViewOptions:o,onZoomIn:s,onZoomOut:u,onFitView:f,onInteractiveChange:h,className:p,children:y,position:g="bottom-left",orientation:v="vertical","aria-label":x}){const b=ft(),{isInteractive:w,minZoomReached:E,maxZoomReached:C,ariaLabelConfig:N}=Ge(eR,ut),{zoomIn:A,zoomOut:T,fitView:D}=Sf(),L=()=>{A(),s==null||s()},j=()=>{T(),u==null||u()},I=()=>{D(o),f==null||f()},Z=()=>{b.setState({nodesDraggable:!w,nodesConnectable:!w,elementsSelectable:!w}),h==null||h(!w)},te=v==="horizontal"?"horizontal":"vertical";return S.jsxs(_f,{className:At(["react-flow__controls",te,p]),position:g,style:e,"data-testid":"rf__controls","aria-label":x??N["controls.ariaLabel"],children:[t&&S.jsxs(S.Fragment,{children:[S.jsx(gu,{onClick:L,className:"react-flow__controls-zoomin",title:N["controls.zoomIn.ariaLabel"],"aria-label":N["controls.zoomIn.ariaLabel"],disabled:C,children:S.jsx(Qk,{})}),S.jsx(gu,{onClick:j,className:"react-flow__controls-zoomout",title:N["controls.zoomOut.ariaLabel"],"aria-label":N["controls.zoomOut.ariaLabel"],disabled:E,children:S.jsx(Pk,{})})]}),r&&S.jsx(gu,{className:"react-flow__controls-fitview",onClick:I,title:N["controls.fitView.ariaLabel"],"aria-label":N["controls.fitView.ariaLabel"],children:S.jsx(Kk,{})}),a&&S.jsx(gu,{className:"react-flow__controls-interactive",onClick:Z,title:N["controls.interactive.ariaLabel"],"aria-label":N["controls.interactive.ariaLabel"],children:w?S.jsx(Jk,{}):S.jsx(Wk,{})}),y]})}S_.displayName="Controls";const tR=O.memo(S_);function nR({id:e,x:t,y:r,width:a,height:o,style:s,color:u,strokeColor:f,strokeWidth:h,className:p,borderRadius:y,shapeRendering:g,selected:v,onClick:x}){const{background:b,backgroundColor:w}=s||{},E=u||b||w;return S.jsx("rect",{className:At(["react-flow__minimap-node",{selected:v},p]),x:t,y:r,rx:y,ry:y,width:a,height:o,style:{fill:E,stroke:f,strokeWidth:h},shapeRendering:g,onClick:x?C=>x(C,e):void 0})}const iR=O.memo(nR),rR=e=>e.nodes.map(t=>t.id),bp=e=>e instanceof Function?e:()=>e;function aR({nodeStrokeColor:e,nodeColor:t,nodeClassName:r="",nodeBorderRadius:a=5,nodeStrokeWidth:o,nodeComponent:s=iR,onClick:u}){const f=Ge(rR,ut),h=bp(t),p=bp(e),y=bp(r),g=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return S.jsx(S.Fragment,{children:f.map(v=>S.jsx(lR,{id:v,nodeColorFunc:h,nodeStrokeColorFunc:p,nodeClassNameFunc:y,nodeBorderRadius:a,nodeStrokeWidth:o,NodeComponent:s,onClick:u,shapeRendering:g},v))})}function oR({id:e,nodeColorFunc:t,nodeStrokeColorFunc:r,nodeClassNameFunc:a,nodeBorderRadius:o,nodeStrokeWidth:s,shapeRendering:u,NodeComponent:f,onClick:h}){const{node:p,x:y,y:g,width:v,height:x}=Ge(b=>{const w=b.nodeLookup.get(e);if(!w)return{node:void 0,x:0,y:0,width:0,height:0};const E=w.internals.userNode,{x:C,y:N}=w.internals.positionAbsolute,{width:A,height:T}=Ki(E);return{node:E,x:C,y:N,width:A,height:T}},ut);return!p||p.hidden||!_w(p)?null:S.jsx(f,{x:y,y:g,width:v,height:x,style:p.style,selected:!!p.selected,className:a(p),color:t(p),borderRadius:o,strokeColor:r(p),strokeWidth:s,shapeRendering:u,onClick:h,id:p.id})}const lR=O.memo(oR);var sR=O.memo(aR);const cR=200,uR=150,fR=e=>!e.hidden,dR=e=>{const t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:t,boundingRect:e.nodeLookup.size>0?ww(js(e.nodeLookup,{filter:fR}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},hR="react-flow__minimap-desc";function E_({style:e,className:t,nodeStrokeColor:r,nodeColor:a,nodeClassName:o="",nodeBorderRadius:s=5,nodeStrokeWidth:u,nodeComponent:f,bgColor:h,maskColor:p,maskStrokeColor:y,maskStrokeWidth:g,position:v="bottom-right",onClick:x,onNodeClick:b,pannable:w=!1,zoomable:E=!1,ariaLabel:C,inversePan:N,zoomStep:A=1,offsetScale:T=5}){const D=ft(),L=O.useRef(null),{boundingRect:j,viewBB:I,rfId:Z,panZoom:te,translateExtent:G,flowWidth:q,flowHeight:ie,ariaLabelConfig:z}=Ge(dR,ut),F=(e==null?void 0:e.width)??cR,k=(e==null?void 0:e.height)??uR,B=j.width/F,H=j.height/k,$=Math.max(B,H),K=$*F,R=$*k,Y=T*$,J=j.x-(K-j.width)/2-Y,ne=j.y-(R-j.height)/2-Y,se=K+Y*2,fe=R+Y*2,de=`${hR}-${Z}`,ce=O.useRef(0),he=O.useRef();ce.current=$,O.useEffect(()=>{if(L.current&&te)return he.current=MO({domNode:L.current,panZoom:te,getTransform:()=>D.getState().transform,getViewScale:()=>ce.current}),()=>{var be;(be=he.current)==null||be.destroy()}},[te]),O.useEffect(()=>{var be;(be=he.current)==null||be.update({translateExtent:G,width:q,height:ie,inversePan:N,pannable:w,zoomStep:A,zoomable:E})},[w,E,N,A,G,q,ie]);const Ae=x?be=>{var Le;const[ke,Fe]=((Le=he.current)==null?void 0:Le.pointer(be))||[0,0];x(be,{x:ke,y:Fe})}:void 0,Ee=b?O.useCallback((be,ke)=>{const Fe=D.getState().nodeLookup.get(ke).internals.userNode;b(be,Fe)},[]):void 0,_e=C??z["minimap.ariaLabel"];return S.jsx(_f,{position:v,style:{...e,"--xy-minimap-background-color-props":typeof h=="string"?h:void 0,"--xy-minimap-mask-background-color-props":typeof p=="string"?p:void 0,"--xy-minimap-mask-stroke-color-props":typeof y=="string"?y:void 0,"--xy-minimap-mask-stroke-width-props":typeof g=="number"?g*$:void 0,"--xy-minimap-node-background-color-props":typeof a=="string"?a:void 0,"--xy-minimap-node-stroke-color-props":typeof r=="string"?r:void 0,"--xy-minimap-node-stroke-width-props":typeof u=="number"?u:void 0},className:At(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:S.jsxs("svg",{width:F,height:k,viewBox:`${J} ${ne} ${se} ${fe}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":de,ref:L,onClick:Ae,children:[_e&&S.jsx("title",{id:de,children:_e}),S.jsx(sR,{onClick:Ee,nodeColor:a,nodeStrokeColor:r,nodeBorderRadius:s,nodeClassName:o,nodeStrokeWidth:u,nodeComponent:f}),S.jsx("path",{className:"react-flow__minimap-mask",d:`M${J-Y},${ne-Y}h${se+Y*2}v${fe+Y*2}h${-se-Y*2}z
|
|
71
|
+
M${I.x},${I.y}h${I.width}v${I.height}h${-I.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}E_.displayName="MiniMap";const pR=O.memo(E_),mR=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,gR={[Io.Line]:"right",[Io.Handle]:"bottom-right"};function yR({nodeId:e,position:t,variant:r=Io.Handle,className:a,style:o=void 0,children:s,color:u,minWidth:f=10,minHeight:h=10,maxWidth:p=Number.MAX_VALUE,maxHeight:y=Number.MAX_VALUE,keepAspectRatio:g=!1,resizeDirection:v,autoScale:x=!0,shouldResize:b,onResizeStart:w,onResize:E,onResizeEnd:C}){const N=t_(),A=typeof e=="string"?e:N,T=ft(),D=O.useRef(null),L=r===Io.Handle,j=Ge(O.useCallback(mR(L&&x),[L,x]),ut),I=O.useRef(null),Z=t??gR[r];O.useEffect(()=>{if(!(!D.current||!A))return I.current||(I.current=qO({domNode:D.current,nodeId:A,getStoreItems:()=>{const{nodeLookup:G,transform:q,snapGrid:ie,snapToGrid:z,nodeOrigin:F,domNode:k}=T.getState();return{nodeLookup:G,transform:q,snapGrid:ie,snapToGrid:z,nodeOrigin:F,paneDomNode:k}},onChange:(G,q)=>{const{triggerNodeChanges:ie,nodeLookup:z,parentLookup:F,nodeOrigin:k}=T.getState(),B=[],H={x:G.x,y:G.y},$=z.get(A);if($&&$.expandParent&&$.parentId){const K=$.origin??k,R=G.width??$.measured.width??0,Y=G.height??$.measured.height??0,J={id:$.id,parentId:$.parentId,rect:{width:R,height:Y,...Sw({x:G.x??$.position.x,y:G.y??$.position.y},{width:R,height:Y},$.parentId,z,K)}},ne=$m([J],z,F,k);B.push(...ne),H.x=G.x?Math.max(K[0]*R,G.x):void 0,H.y=G.y?Math.max(K[1]*Y,G.y):void 0}if(H.x!==void 0&&H.y!==void 0){const K={id:A,type:"position",position:{...H}};B.push(K)}if(G.width!==void 0&&G.height!==void 0){const R={id:A,type:"dimensions",resizing:!0,setAttributes:v?v==="horizontal"?"width":"height":!0,dimensions:{width:G.width,height:G.height}};B.push(R)}for(const K of q){const R={...K,type:"position"};B.push(R)}ie(B)},onEnd:({width:G,height:q})=>{const ie={id:A,type:"dimensions",resizing:!1,dimensions:{width:G,height:q}};T.getState().triggerNodeChanges([ie])}})),I.current.update({controlPosition:Z,boundaries:{minWidth:f,minHeight:h,maxWidth:p,maxHeight:y},keepAspectRatio:g,resizeDirection:v,onResizeStart:w,onResize:E,onResizeEnd:C,shouldResize:b}),()=>{var G;(G=I.current)==null||G.destroy()}},[Z,f,h,p,y,g,w,E,C,b]);const te=Z.split("-");return S.jsx("div",{className:At(["react-flow__resize-control","nodrag",...te,r,a]),ref:D,style:{...o,scale:j,...u&&{[L?"backgroundColor":"borderColor"]:u}},children:s})}O.memo(yR);const vR={always:"#64748B",frontend:"#3B82F6",backend:"#22C55E",socket:"#F97316",visual:"#EC4899",python:"#F59E0B",go:"#06B6D4",rust:"#EF4444",java:"#FB923C",ruby:"#F43F5E",database:"#10B981",prisma:"#A855F7",testing:"#84CC16",infra:"#78716C",ci:"#EAB308",docs:"#0EA5E9",custom:"#6366F1"},xR={always:"bg-slate-500/20 text-slate-300",frontend:"bg-blue-500/20 text-blue-300",backend:"bg-green-500/20 text-green-300",socket:"bg-orange-500/20 text-orange-300",visual:"bg-pink-500/20 text-pink-300",python:"bg-amber-500/20 text-amber-300",go:"bg-cyan-500/20 text-cyan-300",rust:"bg-red-500/20 text-red-300",java:"bg-orange-400/20 text-orange-300",ruby:"bg-rose-500/20 text-rose-300",database:"bg-emerald-500/20 text-emerald-300",prisma:"bg-purple-500/20 text-purple-300",testing:"bg-lime-500/20 text-lime-300",infra:"bg-stone-500/20 text-stone-300",ci:"bg-yellow-500/20 text-yellow-300",docs:"bg-sky-500/20 text-sky-300",custom:"bg-indigo-500/20 text-indigo-300"},bR=["frontend","backend","socket","visual","python","go","rust","java","ruby","database","prisma","testing","infra","ci","docs"];function C_(e){return e?bR.includes(e)?e:"custom":"always"}function wR(e){return vR[C_(e)]}function _R(e){return xR[C_(e)]}function SR(e){return e?{frontend:"Frontend",backend:"Backend",socket:"WebSocket",visual:"Visual",python:"Python",go:"Go",rust:"Rust",java:"Java / Kotlin",ruby:"Ruby",database:"Database",prisma:"Prisma",testing:"Testing",infra:"Infrastructure",ci:"CI / CD",docs:"Documentation"}[e]??e:"Always"}function A_(e){var t,r,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=A_(e[t]))&&(a&&(a+=" "),a+=r)}else for(r in e)e[r]&&(a&&(a+=" "),a+=r);return a}function ER(){for(var e,t,r=0,a="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=A_(e))&&(a&&(a+=" "),a+=t);return a}const Gm="-",CR=e=>{const t=NR(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:u=>{const f=u.split(Gm);return f[0]===""&&f.length!==1&&f.shift(),N_(f,t)||AR(u)},getConflictingClassGroupIds:(u,f)=>{const h=r[u]||[];return f&&a[u]?[...h,...a[u]]:h}}},N_=(e,t)=>{var u;if(e.length===0)return t.classGroupId;const r=e[0],a=t.nextPart.get(r),o=a?N_(e.slice(1),a):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(Gm);return(u=t.validators.find(({validator:f})=>f(s)))==null?void 0:u.classGroupId},pb=/^\[(.+)\]$/,AR=e=>{if(pb.test(e)){const t=pb.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},NR=e=>{const{theme:t,prefix:r}=e,a={nextPart:new Map,validators:[]};return MR(Object.entries(e.classGroups),r).forEach(([s,u])=>{nm(u,a,s,t)}),a},nm=(e,t,r,a)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:mb(t,o);s.classGroupId=r;return}if(typeof o=="function"){if(TR(o)){nm(o(a),t,r,a);return}t.validators.push({validator:o,classGroupId:r});return}Object.entries(o).forEach(([s,u])=>{nm(u,mb(t,s),r,a)})})},mb=(e,t)=>{let r=e;return t.split(Gm).forEach(a=>{r.nextPart.has(a)||r.nextPart.set(a,{nextPart:new Map,validators:[]}),r=r.nextPart.get(a)}),r},TR=e=>e.isThemeGetter,MR=(e,t)=>t?e.map(([r,a])=>{const o=a.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([u,f])=>[t+u,f])):s);return[r,o]}):e,OR=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,a=new Map;const o=(s,u)=>{r.set(s,u),t++,t>e&&(t=0,a=r,r=new Map)};return{get(s){let u=r.get(s);if(u!==void 0)return u;if((u=a.get(s))!==void 0)return o(s,u),u},set(s,u){r.has(s)?r.set(s,u):o(s,u)}}},T_="!",kR=e=>{const{separator:t,experimentalParseClassName:r}=e,a=t.length===1,o=t[0],s=t.length,u=f=>{const h=[];let p=0,y=0,g;for(let E=0;E<f.length;E++){let C=f[E];if(p===0){if(C===o&&(a||f.slice(E,E+s)===t)){h.push(f.slice(y,E)),y=E+s;continue}if(C==="/"){g=E;continue}}C==="["?p++:C==="]"&&p--}const v=h.length===0?f:f.substring(y),x=v.startsWith(T_),b=x?v.substring(1):v,w=g&&g>y?g-y:void 0;return{modifiers:h,hasImportantModifier:x,baseClassName:b,maybePostfixModifierPosition:w}};return r?f=>r({className:f,parseClassName:u}):u},RR=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(a=>{a[0]==="["?(t.push(...r.sort(),a),r=[]):r.push(a)}),t.push(...r.sort()),t},DR=e=>({cache:OR(e.cacheSize),parseClassName:kR(e),...CR(e)}),jR=/\s+/,zR=(e,t)=>{const{parseClassName:r,getClassGroupId:a,getConflictingClassGroupIds:o}=t,s=[],u=e.trim().split(jR);let f="";for(let h=u.length-1;h>=0;h-=1){const p=u[h],{modifiers:y,hasImportantModifier:g,baseClassName:v,maybePostfixModifierPosition:x}=r(p);let b=!!x,w=a(b?v.substring(0,x):v);if(!w){if(!b){f=p+(f.length>0?" "+f:f);continue}if(w=a(v),!w){f=p+(f.length>0?" "+f:f);continue}b=!1}const E=RR(y).join(":"),C=g?E+T_:E,N=C+w;if(s.includes(N))continue;s.push(N);const A=o(w,b);for(let T=0;T<A.length;++T){const D=A[T];s.push(C+D)}f=p+(f.length>0?" "+f:f)}return f};function LR(){let e=0,t,r,a="";for(;e<arguments.length;)(t=arguments[e++])&&(r=M_(t))&&(a&&(a+=" "),a+=r);return a}const M_=e=>{if(typeof e=="string")return e;let t,r="";for(let a=0;a<e.length;a++)e[a]&&(t=M_(e[a]))&&(r&&(r+=" "),r+=t);return r};function HR(e,...t){let r,a,o,s=u;function u(h){const p=t.reduce((y,g)=>g(y),e());return r=DR(p),a=r.cache.get,o=r.cache.set,s=f,f(h)}function f(h){const p=a(h);if(p)return p;const y=zR(h,r);return o(h,y),y}return function(){return s(LR.apply(null,arguments))}}const lt=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},O_=/^\[(?:([a-z-]+):)?(.+)\]$/i,BR=/^\d+\/\d+$/,UR=new Set(["px","full","screen"]),YR=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,$R=/\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$/,VR=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,qR=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,GR=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Yi=e=>zo(e)||UR.has(e)||BR.test(e),kr=e=>tl(e,"length",WR),zo=e=>!!e&&!Number.isNaN(Number(e)),wp=e=>tl(e,"number",zo),ns=e=>!!e&&Number.isInteger(Number(e)),IR=e=>e.endsWith("%")&&zo(e.slice(0,-1)),je=e=>O_.test(e),Rr=e=>YR.test(e),ZR=new Set(["length","size","percentage"]),XR=e=>tl(e,ZR,k_),FR=e=>tl(e,"position",k_),QR=new Set(["image","url"]),PR=e=>tl(e,QR,e4),KR=e=>tl(e,"",JR),is=()=>!0,tl=(e,t,r)=>{const a=O_.exec(e);return a?a[1]?typeof t=="string"?a[1]===t:t.has(a[1]):r(a[2]):!1},WR=e=>$R.test(e)&&!VR.test(e),k_=()=>!1,JR=e=>qR.test(e),e4=e=>GR.test(e),t4=()=>{const e=lt("colors"),t=lt("spacing"),r=lt("blur"),a=lt("brightness"),o=lt("borderColor"),s=lt("borderRadius"),u=lt("borderSpacing"),f=lt("borderWidth"),h=lt("contrast"),p=lt("grayscale"),y=lt("hueRotate"),g=lt("invert"),v=lt("gap"),x=lt("gradientColorStops"),b=lt("gradientColorStopPositions"),w=lt("inset"),E=lt("margin"),C=lt("opacity"),N=lt("padding"),A=lt("saturate"),T=lt("scale"),D=lt("sepia"),L=lt("skew"),j=lt("space"),I=lt("translate"),Z=()=>["auto","contain","none"],te=()=>["auto","hidden","clip","visible","scroll"],G=()=>["auto",je,t],q=()=>[je,t],ie=()=>["",Yi,kr],z=()=>["auto",zo,je],F=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],k=()=>["solid","dashed","dotted","double","none"],B=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],H=()=>["start","end","center","between","around","evenly","stretch"],$=()=>["","0",je],K=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>[zo,je];return{cacheSize:500,separator:":",theme:{colors:[is],spacing:[Yi,kr],blur:["none","",Rr,je],brightness:R(),borderColor:[e],borderRadius:["none","","full",Rr,je],borderSpacing:q(),borderWidth:ie(),contrast:R(),grayscale:$(),hueRotate:R(),invert:$(),gap:q(),gradientColorStops:[e],gradientColorStopPositions:[IR,kr],inset:G(),margin:G(),opacity:R(),padding:q(),saturate:R(),scale:R(),sepia:$(),skew:R(),space:q(),translate:q()},classGroups:{aspect:[{aspect:["auto","square","video",je]}],container:["container"],columns:[{columns:[Rr]}],"break-after":[{"break-after":K()}],"break-before":[{"break-before":K()}],"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:[...F(),je]}],overflow:[{overflow:te()}],"overflow-x":[{"overflow-x":te()}],"overflow-y":[{"overflow-y":te()}],overscroll:[{overscroll:Z()}],"overscroll-x":[{"overscroll-x":Z()}],"overscroll-y":[{"overscroll-y":Z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[w]}],"inset-x":[{"inset-x":[w]}],"inset-y":[{"inset-y":[w]}],start:[{start:[w]}],end:[{end:[w]}],top:[{top:[w]}],right:[{right:[w]}],bottom:[{bottom:[w]}],left:[{left:[w]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ns,je]}],basis:[{basis:G()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",je]}],grow:[{grow:$()}],shrink:[{shrink:$()}],order:[{order:["first","last","none",ns,je]}],"grid-cols":[{"grid-cols":[is]}],"col-start-end":[{col:["auto",{span:["full",ns,je]},je]}],"col-start":[{"col-start":z()}],"col-end":[{"col-end":z()}],"grid-rows":[{"grid-rows":[is]}],"row-start-end":[{row:["auto",{span:[ns,je]},je]}],"row-start":[{"row-start":z()}],"row-end":[{"row-end":z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",je]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",je]}],gap:[{gap:[v]}],"gap-x":[{"gap-x":[v]}],"gap-y":[{"gap-y":[v]}],"justify-content":[{justify:["normal",...H()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...H(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...H(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[N]}],px:[{px:[N]}],py:[{py:[N]}],ps:[{ps:[N]}],pe:[{pe:[N]}],pt:[{pt:[N]}],pr:[{pr:[N]}],pb:[{pb:[N]}],pl:[{pl:[N]}],m:[{m:[E]}],mx:[{mx:[E]}],my:[{my:[E]}],ms:[{ms:[E]}],me:[{me:[E]}],mt:[{mt:[E]}],mr:[{mr:[E]}],mb:[{mb:[E]}],ml:[{ml:[E]}],"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",je,t]}],"min-w":[{"min-w":[je,t,"min","max","fit"]}],"max-w":[{"max-w":[je,t,"none","full","min","max","fit","prose",{screen:[Rr]},Rr]}],h:[{h:[je,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[je,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[je,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[je,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Rr,kr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",wp]}],"font-family":[{font:[is]}],"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",je]}],"line-clamp":[{"line-clamp":["none",zo,wp]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Yi,je]}],"list-image":[{"list-image":["none",je]}],"list-style-type":[{list:["none","disc","decimal",je]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[C]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[C]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...k(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Yi,kr]}],"underline-offset":[{"underline-offset":["auto",Yi,je]}],"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:q()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",je]}],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",je]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[C]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...F(),FR]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",XR]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},PR]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[b]}],"gradient-via-pos":[{via:[b]}],"gradient-to-pos":[{to:[b]}],"gradient-from":[{from:[x]}],"gradient-via":[{via:[x]}],"gradient-to":[{to:[x]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[f]}],"border-w-x":[{"border-x":[f]}],"border-w-y":[{"border-y":[f]}],"border-w-s":[{"border-s":[f]}],"border-w-e":[{"border-e":[f]}],"border-w-t":[{"border-t":[f]}],"border-w-r":[{"border-r":[f]}],"border-w-b":[{"border-b":[f]}],"border-w-l":[{"border-l":[f]}],"border-opacity":[{"border-opacity":[C]}],"border-style":[{border:[...k(),"hidden"]}],"divide-x":[{"divide-x":[f]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[f]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[C]}],"divide-style":[{divide:k()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...k()]}],"outline-offset":[{"outline-offset":[Yi,je]}],"outline-w":[{outline:[Yi,kr]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ie()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[C]}],"ring-offset-w":[{"ring-offset":[Yi,kr]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Rr,KR]}],"shadow-color":[{shadow:[is]}],opacity:[{opacity:[C]}],"mix-blend":[{"mix-blend":[...B(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":B()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[a]}],contrast:[{contrast:[h]}],"drop-shadow":[{"drop-shadow":["","none",Rr,je]}],grayscale:[{grayscale:[p]}],"hue-rotate":[{"hue-rotate":[y]}],invert:[{invert:[g]}],saturate:[{saturate:[A]}],sepia:[{sepia:[D]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[a]}],"backdrop-contrast":[{"backdrop-contrast":[h]}],"backdrop-grayscale":[{"backdrop-grayscale":[p]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[y]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[C]}],"backdrop-saturate":[{"backdrop-saturate":[A]}],"backdrop-sepia":[{"backdrop-sepia":[D]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[u]}],"border-spacing-x":[{"border-spacing-x":[u]}],"border-spacing-y":[{"border-spacing-y":[u]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",je]}],duration:[{duration:R()}],ease:[{ease:["linear","in","out","in-out",je]}],delay:[{delay:R()}],animate:[{animate:["none","spin","ping","pulse","bounce",je]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[ns,je]}],"translate-x":[{"translate-x":[I]}],"translate-y":[{"translate-y":[I]}],"skew-x":[{"skew-x":[L]}],"skew-y":[{"skew-y":[L]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",je]}],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",je]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":q()}],"scroll-mx":[{"scroll-mx":q()}],"scroll-my":[{"scroll-my":q()}],"scroll-ms":[{"scroll-ms":q()}],"scroll-me":[{"scroll-me":q()}],"scroll-mt":[{"scroll-mt":q()}],"scroll-mr":[{"scroll-mr":q()}],"scroll-mb":[{"scroll-mb":q()}],"scroll-ml":[{"scroll-ml":q()}],"scroll-p":[{"scroll-p":q()}],"scroll-px":[{"scroll-px":q()}],"scroll-py":[{"scroll-py":q()}],"scroll-ps":[{"scroll-ps":q()}],"scroll-pe":[{"scroll-pe":q()}],"scroll-pt":[{"scroll-pt":q()}],"scroll-pr":[{"scroll-pr":q()}],"scroll-pb":[{"scroll-pb":q()}],"scroll-pl":[{"scroll-pl":q()}],"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",je]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Yi,kr,wp]}],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"]}}},n4=HR(t4);function Zo(...e){return n4(ER(e))}const i4=["frontend","backend","socket","visual","python","go","rust","java","ruby","database","prisma","testing","infra","ci","docs"],r4={before_done:"task complete",before_commit:"before commit",on_complete:"on complete"};function a4(e){return r4[e??"before_done"]??e??"task complete"}function o4({data:e,selected:t}){const r=e.when,a=wR(r),o=_R(r),s=SR(r);return S.jsxs("div",{className:Zo("min-w-[220px] rounded-lg border border-node-border bg-node p-4","border-l-4 shadow-lg",t&&"ring-2 ring-accent"),style:{borderLeftColor:a},children:[S.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[S.jsx("div",{className:"h-2.5 w-2.5 rounded-full",style:{backgroundColor:a}}),S.jsxs("span",{className:"text-xs font-semibold uppercase tracking-wider text-stone",children:["hook · ",a4(e.on)]})]}),S.jsx("span",{className:Zo("inline-block rounded-full px-2.5 py-0.5 text-sm font-medium",o),children:s}),r&&!i4.includes(r)&&S.jsx("p",{className:"mt-2 truncate font-mono text-xs text-stone",children:r}),S.jsx(zn,{type:"source",position:ye.Right,className:"!border-2 !border-canvas !bg-accent"})]})}function l4({data:e,selected:t}){return S.jsxs("div",{className:Zo("min-w-[260px] max-w-[320px] rounded-lg border border-node-border bg-node p-4 shadow-lg",t&&"ring-2 ring-accent"),children:[S.jsx(zn,{type:"target",position:ye.Left,className:"!border-2 !border-canvas !bg-accent"}),S.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[S.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-stone",children:"Check"}),S.jsx("span",{className:"rounded-full bg-green-500/20 px-2 py-0.5 text-xs font-medium text-green-400",children:"automated"})]}),S.jsx("p",{className:"mb-2 font-medium text-bone",children:e.label||"Untitled check"}),e.cmd&&S.jsx("code",{className:"block w-full break-all rounded bg-canvas px-2 py-1 font-mono text-xs text-bone",children:e.cmd}),e.conditionId&&S.jsxs("p",{className:"mt-2 text-xs text-stone/70",children:[S.jsx("span",{className:"text-yellow-500/80",children:"if"})," ",S.jsx("span",{className:"font-mono",children:e.conditionId})]})]})}function s4({data:e,selected:t}){return S.jsxs("div",{className:Zo("min-w-[260px] max-w-[320px] rounded-lg border border-node-border bg-node p-4 shadow-lg",t&&"ring-2 ring-accent"),children:[S.jsx(zn,{type:"target",position:ye.Left,className:"!border-2 !border-canvas !bg-accent-amber"}),S.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[S.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-stone",children:"Prompt"}),S.jsx("span",{className:"rounded-full bg-amber-500/20 px-2 py-0.5 text-xs font-medium text-amber-400",children:"agent prompt"})]}),S.jsx("p",{className:"mb-2 font-medium text-bone",children:e.label||"Untitled check"}),e.prompt&&S.jsx("p",{className:"line-clamp-2 text-xs text-stone",children:e.prompt}),e.conditionId&&S.jsxs("p",{className:"mt-2 text-xs text-stone/70",children:[S.jsx("span",{className:"text-yellow-500/80",children:"if"})," ",S.jsx("span",{className:"font-mono",children:e.conditionId})]})]})}function c4({data:e,selected:t}){return S.jsxs("div",{className:Zo("min-w-[180px] max-w-[240px] rounded-lg border border-node-border bg-node p-3 shadow-lg",t&&"ring-2 ring-accent"),children:[S.jsx(zn,{type:"target",position:ye.Left,className:"!border-2 !border-canvas !bg-sky-400"}),S.jsxs("div",{className:"mb-1.5 flex items-center justify-between",children:[S.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-stone",children:"Filter"}),S.jsx("span",{className:"rounded-full bg-sky-500/20 px-2 py-0.5 text-xs font-medium text-sky-400",children:"when"})]}),S.jsx("code",{className:"block w-full break-all rounded bg-canvas px-2 py-1 font-mono text-xs text-sky-300",children:e.when||".*"}),S.jsx(zn,{type:"source",position:ye.Right,className:"!border-2 !border-canvas !bg-sky-400"})]})}function u4({data:e,selected:t}){const r=e.condition;return S.jsxs("div",{className:Zo("min-w-[220px] rounded-lg border border-node-border bg-node p-4 shadow-lg","border-l-4 border-l-yellow-500",t&&"ring-2 ring-accent"),children:[S.jsx(zn,{type:"target",position:ye.Left,className:"!border-2 !border-canvas !bg-yellow-500"}),S.jsx("div",{className:"mb-2 flex items-center gap-2",children:S.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-stone",children:"Condition"})}),S.jsx("p",{className:"mb-3 font-medium text-bone",children:e.label||"If / Else"}),r&&S.jsxs("div",{className:"rounded bg-canvas px-2 py-1.5 text-xs text-bone",children:[S.jsx("span",{className:"text-yellow-400",children:r.operator}),r.path&&S.jsx("span",{className:"ml-1 font-mono text-stone",children:r.path})]}),S.jsx(zn,{type:"source",position:ye.Right,id:"true",style:{top:"35%"},className:"!border-2 !border-canvas !bg-green-500"}),S.jsx(zn,{type:"source",position:ye.Right,id:"false",style:{top:"65%"},className:"!border-2 !border-canvas !bg-red-500"}),S.jsxs("div",{className:"mt-3 flex justify-between text-xs text-stone/70",children:[S.jsx("span",{}),S.jsxs("div",{className:"flex flex-col items-end gap-3",children:[S.jsx("span",{className:"text-green-500",children:"true →"}),S.jsx("span",{className:"text-red-500",children:"false →"})]})]})]})}const gb=e=>{let t;const r=new Set,a=(p,y)=>{const g=typeof p=="function"?p(t):p;if(!Object.is(g,t)){const v=t;t=y??(typeof g!="object"||g===null)?g:Object.assign({},t,g),r.forEach(x=>x(t,v))}},o=()=>t,f={setState:a,getState:o,getInitialState:()=>h,subscribe:p=>(r.add(p),()=>r.delete(p))},h=t=e(a,o,f);return f},f4=(e=>e?gb(e):gb),d4=e=>e;function h4(e,t=d4){const r=Ve.useSyncExternalStore(e.subscribe,Ve.useCallback(()=>t(e.getState()),[e,t]),Ve.useCallback(()=>t(e.getInitialState()),[e,t]));return Ve.useDebugValue(r),r}const yb=e=>{const t=f4(e),r=a=>h4(t,a);return Object.assign(r,t),r},p4=(e=>e?yb(e):yb),R_=(e,t,r)=>{const a=e instanceof RegExp?vb(e,r):e,o=t instanceof RegExp?vb(t,r):t,s=a!==null&&o!=null&&m4(a,o,r);return s&&{start:s[0],end:s[1],pre:r.slice(0,s[0]),body:r.slice(s[0]+a.length,s[1]),post:r.slice(s[1]+o.length)}},vb=(e,t)=>{const r=t.match(e);return r?r[0]:null},m4=(e,t,r)=>{let a,o,s,u,f,h=r.indexOf(e),p=r.indexOf(t,h+1),y=h;if(h>=0&&p>0){if(e===t)return[h,p];for(a=[],s=r.length;y>=0&&!f;){if(y===h)a.push(y),h=r.indexOf(e,y+1);else if(a.length===1){const g=a.pop();g!==void 0&&(f=[g,p])}else o=a.pop(),o!==void 0&&o<s&&(s=o,u=p),p=r.indexOf(t,y+1);y=h<p&&h>=0?h:p}a.length&&u!==void 0&&(f=[s,u])}return f},D_="\0SLASH"+Math.random()+"\0",j_="\0OPEN"+Math.random()+"\0",Im="\0CLOSE"+Math.random()+"\0",z_="\0COMMA"+Math.random()+"\0",L_="\0PERIOD"+Math.random()+"\0",g4=new RegExp(D_,"g"),y4=new RegExp(j_,"g"),v4=new RegExp(Im,"g"),x4=new RegExp(z_,"g"),b4=new RegExp(L_,"g"),w4=/\\\\/g,_4=/\\{/g,S4=/\\}/g,E4=/\\,/g,C4=/\\\./g,A4=1e5;function _p(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}function N4(e){return e.replace(w4,D_).replace(_4,j_).replace(S4,Im).replace(E4,z_).replace(C4,L_)}function T4(e){return e.replace(g4,"\\").replace(y4,"{").replace(v4,"}").replace(x4,",").replace(b4,".")}function H_(e){if(!e)return[""];const t=[],r=R_("{","}",e);if(!r)return e.split(",");const{pre:a,body:o,post:s}=r,u=a.split(",");u[u.length-1]+="{"+o+"}";const f=H_(s);return s.length&&(u[u.length-1]+=f.shift(),u.push.apply(u,f)),t.push.apply(t,u),t}function M4(e,t={}){if(!e)return[];const{max:r=A4}=t;return e.slice(0,2)==="{}"&&(e="\\{\\}"+e.slice(2)),ls(N4(e),r,!0).map(T4)}function O4(e){return"{"+e+"}"}function k4(e){return/^-?0\d/.test(e)}function R4(e,t){return e<=t}function D4(e,t){return e>=t}function ls(e,t,r){const a=[],o=R_("{","}",e);if(!o)return[e];const s=o.pre,u=o.post.length?ls(o.post,t,!1):[""];if(/\$$/.test(o.pre))for(let f=0;f<u.length&&f<t;f++){const h=s+"{"+o.body+"}"+u[f];a.push(h)}else{const f=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(o.body),h=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(o.body),p=f||h,y=o.body.indexOf(",")>=0;if(!p&&!y)return o.post.match(/,(?!,).*\}/)?(e=o.pre+"{"+o.body+Im+o.post,ls(e,t,!0)):[e];let g;if(p)g=o.body.split(/\.\./);else if(g=H_(o.body),g.length===1&&g[0]!==void 0&&(g=ls(g[0],t,!1).map(O4),g.length===1))return u.map(x=>o.pre+g[0]+x);let v;if(p&&g[0]!==void 0&&g[1]!==void 0){const x=_p(g[0]),b=_p(g[1]),w=Math.max(g[0].length,g[1].length);let E=g.length===3&&g[2]!==void 0?Math.max(Math.abs(_p(g[2])),1):1,C=R4;b<x&&(E*=-1,C=D4);const A=g.some(k4);v=[];for(let T=x;C(T,b)&&v.length<t;T+=E){let D;if(h)D=String.fromCharCode(T),D==="\\"&&(D="");else if(D=String(T),A){const L=w-D.length;if(L>0){const j=new Array(L+1).join("0");T<0?D="-"+j+D.slice(1):D=j+D}}v.push(D)}}else{v=[];for(let x=0;x<g.length;x++)v.push.apply(v,ls(g[x],t,!1))}for(let x=0;x<v.length;x++)for(let b=0;b<u.length&&a.length<t;b++){const w=s+v[x]+u[b];(!r||p||w)&&a.push(w)}}return a}const j4=1024*64,Fu=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>j4)throw new TypeError("pattern is too long")},z4={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},rs=e=>e.replace(/[[\]\\-]/g,"\\$&"),L4=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),xb=e=>e.join(""),H4=(e,t)=>{const r=t;if(e.charAt(r)!=="[")throw new Error("not in a brace expression");const a=[],o=[];let s=r+1,u=!1,f=!1,h=!1,p=!1,y=r,g="";e:for(;s<e.length;){const w=e.charAt(s);if((w==="!"||w==="^")&&s===r+1){p=!0,s++;continue}if(w==="]"&&u&&!h){y=s+1;break}if(u=!0,w==="\\"&&!h){h=!0,s++;continue}if(w==="["&&!h){for(const[E,[C,N,A]]of Object.entries(z4))if(e.startsWith(E,s)){if(g)return["$.",!1,e.length-r,!0];s+=E.length,A?o.push(C):a.push(C),f=f||N;continue e}}if(h=!1,g){w>g?a.push(rs(g)+"-"+rs(w)):w===g&&a.push(rs(w)),g="",s++;continue}if(e.startsWith("-]",s+1)){a.push(rs(w+"-")),s+=2;continue}if(e.startsWith("-",s+1)){g=w,s+=2;continue}a.push(rs(w)),s++}if(y<s)return["",!1,0,!1];if(!a.length&&!o.length)return["$.",!1,e.length-r,!0];if(o.length===0&&a.length===1&&/^\\?.$/.test(a[0])&&!p){const w=a[0].length===2?a[0].slice(-1):a[0];return[L4(w),!1,y-r,!1]}const v="["+(p?"^":"")+xb(a)+"]",x="["+(p?"":"^")+xb(o)+"]";return[a.length&&o.length?"("+v+"|"+x+")":a.length?v:x,f,y-r,!0]},ss=(e,{windowsPathsNoEscape:t=!1,magicalBraces:r=!0}={})=>r?t?e.replace(/\[([^/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^/\\])\]/g,"$1$2").replace(/\\([^/])/g,"$1"):t?e.replace(/\[([^/\\{}])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^/\\{}])\]/g,"$1$2").replace(/\\([^/{}])/g,"$1");var rn;const B4=new Set(["!","?","+","*","@"]),im=e=>B4.has(e),bb=e=>im(e.type),U4=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),Y4=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),$4=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),wb=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),V4="(?!(?:^|/)\\.\\.?(?:$|/))",yu="(?!\\.)",q4=new Set(["[","."]),G4=new Set(["..","."]),I4=new Set("().*{}+?[]^$\\!"),Z4=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Zm="[^/]",_b=Zm+"*?",Sb=Zm+"+?";let X4=0;var St,Rt,$i,Te,ct,Lr,ba,Hr,ii,ri,Bo,Ke,B_,Yr,Mu,U_,rm,Ou,Y_,am,$_,V_,q_,ku,om,G_;class Af{constructor(t,r,a={}){Zt(this,Ke);gt(this,"type");Zt(this,St);Zt(this,Rt);Zt(this,$i,!1);Zt(this,Te,[]);Zt(this,ct);Zt(this,Lr);Zt(this,ba);Zt(this,Hr,!1);Zt(this,ii);Zt(this,ri);Zt(this,Bo,!1);gt(this,"id",++X4);this.type=t,t&&it(this,Rt,!0),it(this,ct,r),it(this,St,le(this,ct)?le(le(this,ct),St):this),it(this,ii,le(this,St)===this?a:le(le(this,St),ii)),it(this,ba,le(this,St)===this?[]:le(le(this,St),ba)),t==="!"&&!le(le(this,St),Hr)&&le(this,ba).push(this),it(this,Lr,le(this,ct)?le(le(this,ct),Te).length:0)}get depth(){var t;return(((t=le(this,ct))==null?void 0:t.depth)??-1)+1}[Symbol.for("nodejs.util.inspect.custom")](){var t;return{"@@type":"AST",id:this.id,type:this.type,root:le(this,St).id,parent:(t=le(this,ct))==null?void 0:t.id,depth:this.depth,partsLength:le(this,Te).length,parts:le(this,Te)}}get hasMagic(){if(le(this,Rt)!==void 0)return le(this,Rt);for(const t of le(this,Te))if(typeof t!="string"&&(t.type||t.hasMagic))return it(this,Rt,!0);return le(this,Rt)}toString(){return le(this,ri)!==void 0?le(this,ri):this.type?it(this,ri,this.type+"("+le(this,Te).map(t=>String(t)).join("|")+")"):it(this,ri,le(this,Te).map(t=>String(t)).join(""))}push(...t){for(const r of t)if(r!==""){if(typeof r!="string"&&!(r instanceof rn&&le(r,ct)===this))throw new Error("invalid part: "+r);le(this,Te).push(r)}}toJSON(){var r;const t=this.type===null?le(this,Te).slice().map(a=>typeof a=="string"?a:a.toJSON()):[this.type,...le(this,Te).map(a=>a.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===le(this,St)||le(le(this,St),Hr)&&((r=le(this,ct))==null?void 0:r.type)==="!")&&t.push({}),t}isStart(){var r;if(le(this,St)===this)return!0;if(!((r=le(this,ct))!=null&&r.isStart()))return!1;if(le(this,Lr)===0)return!0;const t=le(this,ct);for(let a=0;a<le(this,Lr);a++){const o=le(t,Te)[a];if(!(o instanceof rn&&o.type==="!"))return!1}return!0}isEnd(){var r,a,o;if(le(this,St)===this||((r=le(this,ct))==null?void 0:r.type)==="!")return!0;if(!((a=le(this,ct))!=null&&a.isEnd()))return!1;if(!this.type)return(o=le(this,ct))==null?void 0:o.isEnd();const t=le(this,ct)?le(le(this,ct),Te).length:0;return le(this,Lr)===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){const r=new rn(this.type,t);for(const a of le(this,Te))r.copyIn(a);return r}static fromGlob(t,r={}){var o;const a=new rn(null,void 0,r);return Pe(o=rn,Yr,Mu).call(o,t,a,0,r,0),a}toMMPattern(){if(this!==le(this,St))return le(this,St).toMMPattern();const t=this.toString(),[r,a,o,s]=this.toRegExpSource();if(!(o||le(this,Rt)||le(this,ii).nocase&&!le(this,ii).nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return a;const f=(le(this,ii).nocase?"i":"")+(s?"u":"");return Object.assign(new RegExp(`^${r}$`,f),{_src:r,_glob:t})}get options(){return le(this,ii)}toRegExpSource(t){var h;const r=t??!!le(this,ii).dot;if(le(this,St)===this&&(Pe(this,Ke,ku).call(this),Pe(this,Ke,B_).call(this)),!bb(this)){const p=this.isStart()&&this.isEnd()&&!le(this,Te).some(b=>typeof b!="string"),y=le(this,Te).map(b=>{var A;const[w,E,C,N]=typeof b=="string"?Pe(A=rn,Yr,G_).call(A,b,le(this,Rt),p):b.toRegExpSource(t);return it(this,Rt,le(this,Rt)||C),it(this,$i,le(this,$i)||N),w}).join("");let g="";if(this.isStart()&&typeof le(this,Te)[0]=="string"&&!(le(this,Te).length===1&&G4.has(le(this,Te)[0]))){const w=q4,E=r&&w.has(y.charAt(0))||y.startsWith("\\.")&&w.has(y.charAt(2))||y.startsWith("\\.\\.")&&w.has(y.charAt(4)),C=!r&&!t&&w.has(y.charAt(0));g=E?V4:C?yu:""}let v="";return this.isEnd()&&le(le(this,St),Hr)&&((h=le(this,ct))==null?void 0:h.type)==="!"&&(v="(?:$|\\/)"),[g+y+v,ss(y),it(this,Rt,!!le(this,Rt)),le(this,$i)]}const a=this.type==="*"||this.type==="+",o=this.type==="!"?"(?:(?!(?:":"(?:";let s=Pe(this,Ke,om).call(this,r);if(this.isStart()&&this.isEnd()&&!s&&this.type!=="!"){const p=this.toString(),y=this;return it(y,Te,[p]),y.type=null,it(y,Rt,void 0),[p,ss(this.toString()),!1,!1]}let u=!a||t||r||!yu?"":Pe(this,Ke,om).call(this,!0);u===s&&(u=""),u&&(s=`(?:${s})(?:${u})*?`);let f="";if(this.type==="!"&&le(this,Bo))f=(this.isStart()&&!r?yu:"")+Sb;else{const p=this.type==="!"?"))"+(this.isStart()&&!r&&!t?yu:"")+_b+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&u?")":this.type==="*"&&u?")?":`)${this.type}`;f=o+s+p}return[f,ss(s),it(this,Rt,!!le(this,Rt)),le(this,$i)]}}St=new WeakMap,Rt=new WeakMap,$i=new WeakMap,Te=new WeakMap,ct=new WeakMap,Lr=new WeakMap,ba=new WeakMap,Hr=new WeakMap,ii=new WeakMap,ri=new WeakMap,Bo=new WeakMap,Ke=new WeakSet,B_=function(){if(this!==le(this,St))throw new Error("should only call on root");if(le(this,Hr))return this;this.toString(),it(this,Hr,!0);let t;for(;t=le(this,ba).pop();){if(t.type!=="!")continue;let r=t,a=le(r,ct);for(;a;){for(let o=le(r,Lr)+1;!a.type&&o<le(a,Te).length;o++)for(const s of le(t,Te)){if(typeof s=="string")throw new Error("string part in extglob AST??");s.copyIn(le(a,Te)[o])}r=a,a=le(r,ct)}}return this},Yr=new WeakSet,Mu=function(t,r,a,o,s){var w,E,C,N;const u=o.maxExtglobRecursion??2;let f=!1,h=!1,p=-1,y=!1;if(r.type===null){let A=a,T="";for(;A<t.length;){const D=t.charAt(A++);if(f||D==="\\"){f=!f,T+=D;continue}if(h){A===p+1?(D==="^"||D==="!")&&(y=!0):D==="]"&&!(A===p+2&&y)&&(h=!1),T+=D;continue}else if(D==="["){h=!0,p=A,y=!1,T+=D;continue}if(!o.noext&&im(D)&&t.charAt(A)==="("&&s<=u){r.push(T),T="";const j=new rn(D,r);A=Pe(w=rn,Yr,Mu).call(w,t,j,A,o,s+1),r.push(j);continue}T+=D}return r.push(T),A}let g=a+1,v=new rn(null,r);const x=[];let b="";for(;g<t.length;){const A=t.charAt(g++);if(f||A==="\\"){f=!f,b+=A;continue}if(h){g===p+1?(A==="^"||A==="!")&&(y=!0):A==="]"&&!(g===p+2&&y)&&(h=!1),b+=A;continue}else if(A==="["){h=!0,p=g,y=!1,b+=A;continue}if(!o.noext&&im(A)&&t.charAt(g)==="("&&(s<=u||r&&Pe(E=r,Ke,Ou).call(E,A))){const D=r&&Pe(C=r,Ke,Ou).call(C,A)?0:1;v.push(b),b="";const L=new rn(A,v);v.push(L),g=Pe(N=rn,Yr,Mu).call(N,t,L,g,o,s+D);continue}if(A==="|"){v.push(b),b="",x.push(v),v=new rn(null,r);continue}if(A===")")return b===""&&le(r,Te).length===0&&it(r,Bo,!0),v.push(b),b="",r.push(...x,v),g;b+=A}return r.type=null,it(r,Rt,void 0),it(r,Te,[t.substring(a-1)]),g},U_=function(t){return Pe(this,Ke,rm).call(this,t,Y4)},rm=function(t,r=U4){if(!t||typeof t!="object"||t.type!==null||le(t,Te).length!==1||this.type===null)return!1;const a=le(t,Te)[0];return!a||typeof a!="object"||a.type===null?!1:Pe(this,Ke,Ou).call(this,a.type,r)},Ou=function(t,r=$4){var a;return!!((a=r.get(this.type))!=null&&a.includes(t))},Y_=function(t,r){const a=le(t,Te)[0],o=new rn(null,a,this.options);le(o,Te).push(""),a.push(o),Pe(this,Ke,am).call(this,t,r)},am=function(t,r){const a=le(t,Te)[0];le(this,Te).splice(r,1,...le(a,Te));for(const o of le(a,Te))typeof o=="object"&&it(o,ct,this);it(this,ri,void 0)},$_=function(t){const r=wb.get(this.type);return!!(r!=null&&r.has(t))},V_=function(t){if(!t||typeof t!="object"||t.type!==null||le(t,Te).length!==1||this.type===null||le(this,Te).length!==1)return!1;const r=le(t,Te)[0];return!r||typeof r!="object"||r.type===null?!1:Pe(this,Ke,$_).call(this,r.type)},q_=function(t){const r=wb.get(this.type),a=le(t,Te)[0],o=r==null?void 0:r.get(a.type);if(!o)return!1;it(this,Te,le(a,Te));for(const s of le(this,Te))typeof s=="object"&&it(s,ct,this);this.type=o,it(this,ri,void 0),it(this,Bo,!1)},ku=function(){var t,r;if(bb(this)){let a=0,o=!1;do{o=!0;for(let s=0;s<le(this,Te).length;s++){const u=le(this,Te)[s];typeof u=="object"&&(Pe(r=u,Ke,ku).call(r),Pe(this,Ke,rm).call(this,u)?(o=!1,Pe(this,Ke,am).call(this,u,s)):Pe(this,Ke,U_).call(this,u)?(o=!1,Pe(this,Ke,Y_).call(this,u,s)):Pe(this,Ke,V_).call(this,u)&&(o=!1,Pe(this,Ke,q_).call(this,u)))}}while(!o&&++a<10)}else for(const a of le(this,Te))typeof a=="object"&&Pe(t=a,Ke,ku).call(t);it(this,ri,void 0)},om=function(t){return le(this,Te).map(r=>{if(typeof r=="string")throw new Error("string type in extglob ast??");const[a,o,s,u]=r.toRegExpSource(t);return it(this,$i,le(this,$i)||u),a}).filter(r=>!(this.isStart()&&this.isEnd())||!!r).join("|")},G_=function(t,r,a=!1){let o=!1,s="",u=!1,f=!1;for(let h=0;h<t.length;h++){const p=t.charAt(h);if(o){o=!1,s+=(I4.has(p)?"\\":"")+p;continue}if(p==="*"){if(f)continue;f=!0,s+=a&&/^[*]+$/.test(t)?Sb:_b,r=!0;continue}else f=!1;if(p==="\\"){h===t.length-1?s+="\\\\":o=!0;continue}if(p==="["){const[y,g,v,x]=H4(t,h);if(v){s+=y,u=u||g,h+=v-1,r=r||x;continue}}if(p==="?"){s+=Zm,r=!0;continue}s+=Z4(p)}return[s,ss(t),!!r,u]},Zt(Af,Yr);rn=Af;const F4=(e,{windowsPathsNoEscape:t=!1,magicalBraces:r=!1}={})=>r?t?e.replace(/[?*()[\]{}]/g,"[$&]"):e.replace(/[?*()[\]\\{}]/g,"\\$&"):t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&");var Sp={};const Xt=(e,t,r={})=>(Fu(t),!r.nocomment&&t.charAt(0)==="#"?!1:new Nf(t,r).match(e)),Q4=/^\*+([^+@!?*[(]*)$/,P4=e=>t=>!t.startsWith(".")&&t.endsWith(e),K4=e=>t=>t.endsWith(e),W4=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),J4=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),e5=/^\*+\.\*+$/,t5=e=>!e.startsWith(".")&&e.includes("."),n5=e=>e!=="."&&e!==".."&&e.includes("."),i5=/^\.\*+$/,r5=e=>e!=="."&&e!==".."&&e.startsWith("."),a5=/^\*+$/,o5=e=>e.length!==0&&!e.startsWith("."),l5=e=>e.length!==0&&e!=="."&&e!=="..",s5=/^\?+([^+@!?*[(]*)?$/,c5=([e,t=""])=>{const r=I_([e]);return t?(t=t.toLowerCase(),a=>r(a)&&a.toLowerCase().endsWith(t)):r},u5=([e,t=""])=>{const r=Z_([e]);return t?(t=t.toLowerCase(),a=>r(a)&&a.toLowerCase().endsWith(t)):r},f5=([e,t=""])=>{const r=Z_([e]);return t?a=>r(a)&&a.endsWith(t):r},d5=([e,t=""])=>{const r=I_([e]);return t?a=>r(a)&&a.endsWith(t):r},I_=([e])=>{const t=e.length;return r=>r.length===t&&!r.startsWith(".")},Z_=([e])=>{const t=e.length;return r=>r.length===t&&r!=="."&&r!==".."},X_=typeof process=="object"&&process?typeof Sp=="object"&&Sp&&Sp.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",Eb={win32:{sep:"\\"},posix:{sep:"/"}},h5=X_==="win32"?Eb.win32.sep:Eb.posix.sep;Xt.sep=h5;const Yt=Symbol("globstar **");Xt.GLOBSTAR=Yt;const p5="[^/]",m5=p5+"*?",g5="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",y5="(?:(?!(?:\\/|^)\\.).)*?",v5=(e,t={})=>r=>Xt(r,e,t);Xt.filter=v5;const Dn=(e,t={})=>Object.assign({},e,t),x5=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return Xt;const t=Xt;return Object.assign((a,o,s={})=>t(a,o,Dn(e,s)),{Minimatch:class extends t.Minimatch{constructor(o,s={}){super(o,Dn(e,s))}static defaults(o){return t.defaults(Dn(e,o)).Minimatch}},AST:class extends t.AST{constructor(o,s,u={}){super(o,s,Dn(e,u))}static fromGlob(o,s={}){return t.AST.fromGlob(o,Dn(e,s))}},unescape:(a,o={})=>t.unescape(a,Dn(e,o)),escape:(a,o={})=>t.escape(a,Dn(e,o)),filter:(a,o={})=>t.filter(a,Dn(e,o)),defaults:a=>t.defaults(Dn(e,a)),makeRe:(a,o={})=>t.makeRe(a,Dn(e,o)),braceExpand:(a,o={})=>t.braceExpand(a,Dn(e,o)),match:(a,o,s={})=>t.match(a,o,Dn(e,s)),sep:t.sep,GLOBSTAR:Yt})};Xt.defaults=x5;const F_=(e,t={})=>(Fu(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:M4(e,{max:t.braceExpandMax}));Xt.braceExpand=F_;const b5=(e,t={})=>new Nf(e,t).makeRe();Xt.makeRe=b5;const w5=(e,t,r={})=>{const a=new Nf(t,r);return e=e.filter(o=>a.match(o)),a.options.nonull&&!e.length&&e.push(t),e};Xt.match=w5;const Cb=/[?*]|[+@!]\(.*?\)|\[|\]/,_5=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");var _n,Q_,lm,Ao;class Nf{constructor(t,r={}){Zt(this,_n);gt(this,"options");gt(this,"set");gt(this,"pattern");gt(this,"windowsPathsNoEscape");gt(this,"nonegate");gt(this,"negate");gt(this,"comment");gt(this,"empty");gt(this,"preserveMultipleSlashes");gt(this,"partial");gt(this,"globSet");gt(this,"globParts");gt(this,"nocase");gt(this,"isWindows");gt(this,"platform");gt(this,"windowsNoMagicRoot");gt(this,"maxGlobstarRecursion");gt(this,"regexp");Fu(t),r=r||{},this.options=r,this.maxGlobstarRecursion=r.maxGlobstarRecursion??200,this.pattern=t,this.platform=r.platform||X_,this.isWindows=this.platform==="win32";const a="allowWindowsEscape";this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r[a]===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!r.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!r.nonegate,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=r.windowsNoMagicRoot!==void 0?r.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const t of this.set)for(const r of t)if(typeof r!="string")return!0;return!1}debug(...t){}make(){const t=this.pattern,r=this.options;if(!r.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],r.debug&&(this.debug=(...s)=>console.error(...s)),this.debug(this.pattern,this.globSet);const a=this.globSet.map(s=>this.slashSplit(s));this.globParts=this.preprocess(a),this.debug(this.pattern,this.globParts);let o=this.globParts.map((s,u,f)=>{if(this.isWindows&&this.windowsNoMagicRoot){const h=s[0]===""&&s[1]===""&&(s[2]==="?"||!Cb.test(s[2]))&&!Cb.test(s[3]),p=/^[a-z]:/i.test(s[0]);if(h)return[...s.slice(0,4),...s.slice(4).map(y=>this.parse(y))];if(p)return[s[0],...s.slice(1).map(y=>this.parse(y))]}return s.map(h=>this.parse(h))});if(this.debug(this.pattern,o),this.set=o.filter(s=>s.indexOf(!1)===-1),this.isWindows)for(let s=0;s<this.set.length;s++){const u=this.set[s];u[0]===""&&u[1]===""&&this.globParts[s][2]==="?"&&typeof u[3]=="string"&&/^[a-z]:$/i.test(u[3])&&(u[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(const a of t)for(let o=0;o<a.length;o++)a[o]==="**"&&(a[o]="*");const{optimizationLevel:r=1}=this.options;return r>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):r>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(r=>{let a=-1;for(;(a=r.indexOf("**",a+1))!==-1;){let o=a;for(;r[o+1]==="**";)o++;o!==a&&r.splice(a,o-a)}return r})}levelOneOptimize(t){return t.map(r=>(r=r.reduce((a,o)=>{const s=a[a.length-1];return o==="**"&&s==="**"?a:o===".."&&s&&s!==".."&&s!=="."&&s!=="**"?(a.pop(),a):(a.push(o),a)},[]),r.length===0?[""]:r))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let r=!1;do{if(r=!1,!this.preserveMultipleSlashes){for(let o=1;o<t.length-1;o++){const s=t[o];o===1&&s===""&&t[0]===""||(s==="."||s==="")&&(r=!0,t.splice(o,1),o--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(r=!0,t.pop())}let a=0;for(;(a=t.indexOf("..",a+1))!==-1;){const o=t[a-1];o&&o!=="."&&o!==".."&&o!=="**"&&!(this.isWindows&&/^[a-z]:$/i.test(o))&&(r=!0,t.splice(a-1,2),a-=2)}}while(r);return t.length===0?[""]:t}firstPhasePreProcess(t){let r=!1;do{r=!1;for(let a of t){let o=-1;for(;(o=a.indexOf("**",o+1))!==-1;){let u=o;for(;a[u+1]==="**";)u++;u>o&&a.splice(o+1,u-o);let f=a[o+1];const h=a[o+2],p=a[o+3];if(f!==".."||!h||h==="."||h===".."||!p||p==="."||p==="..")continue;r=!0,a.splice(o,1);const y=a.slice(0);y[o]="**",t.push(y),o--}if(!this.preserveMultipleSlashes){for(let u=1;u<a.length-1;u++){const f=a[u];u===1&&f===""&&a[0]===""||(f==="."||f==="")&&(r=!0,a.splice(u,1),u--)}a[0]==="."&&a.length===2&&(a[1]==="."||a[1]==="")&&(r=!0,a.pop())}let s=0;for(;(s=a.indexOf("..",s+1))!==-1;){const u=a[s-1];if(u&&u!=="."&&u!==".."&&u!=="**"){r=!0;const h=s===1&&a[s+1]==="**"?["."]:[];a.splice(s-1,2,...h),a.length===0&&a.push(""),s-=2}}}}while(r);return t}secondPhasePreProcess(t){for(let r=0;r<t.length-1;r++)for(let a=r+1;a<t.length;a++){const o=this.partsMatch(t[r],t[a],!this.preserveMultipleSlashes);if(o){t[r]=[],t[a]=o;break}}return t.filter(r=>r.length)}partsMatch(t,r,a=!1){let o=0,s=0,u=[],f="";for(;o<t.length&&s<r.length;)if(t[o]===r[s])u.push(f==="b"?r[s]:t[o]),o++,s++;else if(a&&t[o]==="**"&&r[s]===t[o+1])u.push(t[o]),o++;else if(a&&r[s]==="**"&&t[o]===r[s+1])u.push(r[s]),s++;else if(t[o]==="*"&&r[s]&&(this.options.dot||!r[s].startsWith("."))&&r[s]!=="**"){if(f==="b")return!1;f="a",u.push(t[o]),o++,s++}else if(r[s]==="*"&&t[o]&&(this.options.dot||!t[o].startsWith("."))&&t[o]!=="**"){if(f==="a")return!1;f="b",u.push(r[s]),o++,s++}else return!1;return t.length===r.length&&u}parseNegate(){if(this.nonegate)return;const t=this.pattern;let r=!1,a=0;for(let o=0;o<t.length&&t.charAt(o)==="!";o++)r=!r,a++;a&&(this.pattern=t.slice(a)),this.negate=r}matchOne(t,r,a=!1){let o=0,s=0;if(this.isWindows){const f=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),h=!f&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),p=typeof r[0]=="string"&&/^[a-z]:$/i.test(r[0]),y=!p&&r[0]===""&&r[1]===""&&r[2]==="?"&&typeof r[3]=="string"&&/^[a-z]:$/i.test(r[3]),g=h?3:f?0:void 0,v=y?3:p?0:void 0;if(typeof g=="number"&&typeof v=="number"){const[x,b]=[t[g],r[v]];x.toLowerCase()===b.toLowerCase()&&(r[v]=x,s=v,o=g)}}const{optimizationLevel:u=1}=this.options;return u>=2&&(t=this.levelTwoFileOptimize(t)),r.includes(Yt)?Pe(this,_n,Q_).call(this,t,r,a,o,s):Pe(this,_n,Ao).call(this,t,r,a,o,s)}braceExpand(){return F_(this.pattern,this.options)}parse(t){Fu(t);const r=this.options;if(t==="**")return Yt;if(t==="")return"";let a,o=null;(a=t.match(a5))?o=r.dot?l5:o5:(a=t.match(Q4))?o=(r.nocase?r.dot?J4:W4:r.dot?K4:P4)(a[1]):(a=t.match(s5))?o=(r.nocase?r.dot?u5:c5:r.dot?f5:d5)(a):(a=t.match(e5))?o=r.dot?n5:t5:(a=t.match(i5))&&(o=r5);const s=Af.fromGlob(t,this.options).toMMPattern();return o&&typeof s=="object"&&Reflect.defineProperty(s,"test",{value:o}),s}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;const t=this.set;if(!t.length)return this.regexp=!1,this.regexp;const r=this.options,a=r.noglobstar?m5:r.dot?g5:y5,o=new Set(r.nocase?["i"]:[]);let s=t.map(h=>{const p=h.map(g=>{if(g instanceof RegExp)for(const v of g.flags.split(""))o.add(v);return typeof g=="string"?_5(g):g===Yt?Yt:g._src});p.forEach((g,v)=>{const x=p[v+1],b=p[v-1];g!==Yt||b===Yt||(b===void 0?x!==void 0&&x!==Yt?p[v+1]="(?:\\/|"+a+"\\/)?"+x:p[v]=a:x===void 0?p[v-1]=b+"(?:\\/|\\/"+a+")?":x!==Yt&&(p[v-1]=b+"(?:\\/|\\/"+a+"\\/)"+x,p[v+1]=Yt))});const y=p.filter(g=>g!==Yt);if(this.partial&&y.length>=1){const g=[];for(let v=1;v<=y.length;v++)g.push(y.slice(0,v).join("/"));return"(?:"+g.join("|")+")"}return y.join("/")}).join("|");const[u,f]=t.length>1?["(?:",")"]:["",""];s="^"+u+s+f+"$",this.partial&&(s="^(?:\\/|"+u+s.slice(1,-1)+f+")$"),this.negate&&(s="^(?!"+s+").+$");try{this.regexp=new RegExp(s,[...o].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,r=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&r)return!0;const a=this.options;this.isWindows&&(t=t.split("\\").join("/"));const o=this.slashSplit(t);this.debug(this.pattern,"split",o);const s=this.set;this.debug(this.pattern,"set",s);let u=o[o.length-1];if(!u)for(let f=o.length-2;!u&&f>=0;f--)u=o[f];for(const f of s){let h=o;if(a.matchBase&&f.length===1&&(h=[u]),this.matchOne(h,f,r))return a.flipNegate?!0:!this.negate}return a.flipNegate?!1:this.negate}static defaults(t){return Xt.defaults(t).Minimatch}}_n=new WeakSet,Q_=function(t,r,a,o,s){const u=r.indexOf(Yt,s),f=r.lastIndexOf(Yt),[h,p,y]=a?[r.slice(s,u),r.slice(u+1),[]]:[r.slice(s,u),r.slice(u+1,f),r.slice(f+1)];if(h.length){const N=t.slice(o,o+h.length);if(!Pe(this,_n,Ao).call(this,N,h,a,0,0))return!1;o+=h.length,s+=h.length}let g=0;if(y.length){if(y.length+o>t.length)return!1;let N=t.length-y.length;if(Pe(this,_n,Ao).call(this,t,y,a,N,0))g=y.length;else{if(t[t.length-1]!==""||o+y.length===t.length||(N--,!Pe(this,_n,Ao).call(this,t,y,a,N,0)))return!1;g=y.length+1}}if(!p.length){let N=!!g;for(let A=o;A<t.length-g;A++){const T=String(t[A]);if(N=!0,T==="."||T===".."||!this.options.dot&&T.startsWith("."))return!1}return a||N}const v=[[[],0]];let x=v[0],b=0;const w=[0];for(const N of p)N===Yt?(w.push(b),x=[[],0],v.push(x)):(x[0].push(N),b++);let E=v.length-1;const C=t.length-g;for(const N of v)N[1]=C-(w[E--]+N[0].length);return!!Pe(this,_n,lm).call(this,t,v,o,0,a,0,!!g)},lm=function(t,r,a,o,s,u,f){const h=r[o];if(!h){for(let g=a;g<t.length;g++){f=!0;const v=t[g];if(v==="."||v===".."||!this.options.dot&&v.startsWith("."))return!1}return f}const[p,y]=h;for(;a<=y;){if(Pe(this,_n,Ao).call(this,t.slice(0,a+p.length),p,s,a,0)&&u<this.maxGlobstarRecursion){const x=Pe(this,_n,lm).call(this,t,r,a+p.length,o+1,s,u+1,f);if(x!==!1)return x}const v=t[a];if(v==="."||v===".."||!this.options.dot&&v.startsWith("."))return!1;a++}return s||null},Ao=function(t,r,a,o,s){let u,f,h,p;for(u=o,f=s,p=t.length,h=r.length;u<p&&f<h;u++,f++){this.debug("matchOne loop");let y=r[f],g=t[u];if(this.debug(r,y,g),y===!1||y===Yt)return!1;let v;if(typeof y=="string"?(v=g===y,this.debug("string match",y,g,v)):(v=y.test(g),this.debug("pattern match",y,g,v)),!v)return!1}if(u===p&&f===h)return!0;if(u===p)return a;if(f===h)return u===p-1&&t[u]==="";throw new Error("wtf?")};Xt.AST=Af;Xt.Minimatch=Nf;Xt.escape=F4;Xt.unescape=ss;/*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT */function P_(e){return typeof e>"u"||e===null}function S5(e){return typeof e=="object"&&e!==null}function E5(e){return Array.isArray(e)?e:P_(e)?[]:[e]}function C5(e,t){var r,a,o,s;if(t)for(s=Object.keys(t),r=0,a=s.length;r<a;r+=1)o=s[r],e[o]=t[o];return e}function A5(e,t){var r="",a;for(a=0;a<t;a+=1)r+=e;return r}function N5(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var T5=P_,M5=S5,O5=E5,k5=A5,R5=N5,D5=C5,Mt={isNothing:T5,isObject:M5,toArray:O5,repeat:k5,isNegativeZero:R5,extend:D5};function K_(e,t){var r="",a=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
|
|
72
|
+
|
|
73
|
+
`+e.mark.snippet),a+" "+r):a}function _s(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=K_(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}_s.prototype=Object.create(Error.prototype);_s.prototype.constructor=_s;_s.prototype.toString=function(t){return this.name+": "+K_(this,t)};var ln=_s;function Ep(e,t,r,a,o){var s="",u="",f=Math.floor(o/2)-1;return a-t>f&&(s=" ... ",t=a-f+s.length),r-a>f&&(u=" ...",r=a+f-u.length),{str:s+e.slice(t,r).replace(/\t/g,"→")+u,pos:a-t+s.length}}function Cp(e,t){return Mt.repeat(" ",t-e.length)+e}function j5(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,a=[0],o=[],s,u=-1;s=r.exec(e.buffer);)o.push(s.index),a.push(s.index+s[0].length),e.position<=s.index&&u<0&&(u=a.length-2);u<0&&(u=a.length-1);var f="",h,p,y=Math.min(e.line+t.linesAfter,o.length).toString().length,g=t.maxLength-(t.indent+y+3);for(h=1;h<=t.linesBefore&&!(u-h<0);h++)p=Ep(e.buffer,a[u-h],o[u-h],e.position-(a[u]-a[u-h]),g),f=Mt.repeat(" ",t.indent)+Cp((e.line-h+1).toString(),y)+" | "+p.str+`
|
|
74
|
+
`+f;for(p=Ep(e.buffer,a[u],o[u],e.position,g),f+=Mt.repeat(" ",t.indent)+Cp((e.line+1).toString(),y)+" | "+p.str+`
|
|
75
|
+
`,f+=Mt.repeat("-",t.indent+y+3+p.pos)+`^
|
|
76
|
+
`,h=1;h<=t.linesAfter&&!(u+h>=o.length);h++)p=Ep(e.buffer,a[u+h],o[u+h],e.position-(a[u]-a[u+h]),g),f+=Mt.repeat(" ",t.indent)+Cp((e.line+h+1).toString(),y)+" | "+p.str+`
|
|
77
|
+
`;return f.replace(/\n$/,"")}var z5=j5,L5=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],H5=["scalar","sequence","mapping"];function B5(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(a){t[String(a)]=r})}),t}function U5(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(L5.indexOf(r)===-1)throw new ln('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=B5(t.styleAliases||null),H5.indexOf(this.kind)===-1)throw new ln('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var $t=U5;function Ab(e,t){var r=[];return e[t].forEach(function(a){var o=r.length;r.forEach(function(s,u){s.tag===a.tag&&s.kind===a.kind&&s.multi===a.multi&&(o=u)}),r[o]=a}),r}function Y5(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function a(o){o.multi?(e.multi[o.kind].push(o),e.multi.fallback.push(o)):e[o.kind][o.tag]=e.fallback[o.tag]=o}for(t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(a);return e}function sm(e){return this.extend(e)}sm.prototype.extend=function(t){var r=[],a=[];if(t instanceof $t)a.push(t);else if(Array.isArray(t))a=a.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(a=a.concat(t.explicit));else throw new ln("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(s){if(!(s instanceof $t))throw new ln("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(s.loadKind&&s.loadKind!=="scalar")throw new ln("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(s.multi)throw new ln("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),a.forEach(function(s){if(!(s instanceof $t))throw new ln("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var o=Object.create(sm.prototype);return o.implicit=(this.implicit||[]).concat(r),o.explicit=(this.explicit||[]).concat(a),o.compiledImplicit=Ab(o,"implicit"),o.compiledExplicit=Ab(o,"explicit"),o.compiledTypeMap=Y5(o.compiledImplicit,o.compiledExplicit),o};var $5=sm,V5=new $t("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),q5=new $t("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),G5=new $t("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),I5=new $5({explicit:[V5,q5,G5]});function Z5(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function X5(){return null}function F5(e){return e===null}var Q5=new $t("tag:yaml.org,2002:null",{kind:"scalar",resolve:Z5,construct:X5,predicate:F5,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function P5(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}function K5(e){return e==="true"||e==="True"||e==="TRUE"}function W5(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var J5=new $t("tag:yaml.org,2002:bool",{kind:"scalar",resolve:P5,construct:K5,predicate:W5,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});function eD(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function tD(e){return 48<=e&&e<=55}function nD(e){return 48<=e&&e<=57}function iD(e){if(e===null)return!1;var t=e.length,r=0,a=!1,o;if(!t)return!1;if(o=e[r],(o==="-"||o==="+")&&(o=e[++r]),o==="0"){if(r+1===t)return!0;if(o=e[++r],o==="b"){for(r++;r<t;r++)if(o=e[r],o!=="_"){if(o!=="0"&&o!=="1")return!1;a=!0}return a&&o!=="_"}if(o==="x"){for(r++;r<t;r++)if(o=e[r],o!=="_"){if(!eD(e.charCodeAt(r)))return!1;a=!0}return a&&o!=="_"}if(o==="o"){for(r++;r<t;r++)if(o=e[r],o!=="_"){if(!tD(e.charCodeAt(r)))return!1;a=!0}return a&&o!=="_"}}if(o==="_")return!1;for(;r<t;r++)if(o=e[r],o!=="_"){if(!nD(e.charCodeAt(r)))return!1;a=!0}return!(!a||o==="_")}function rD(e){var t=e,r=1,a;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),a=t[0],(a==="-"||a==="+")&&(a==="-"&&(r=-1),t=t.slice(1),a=t[0]),t==="0")return 0;if(a==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}function aD(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Mt.isNegativeZero(e)}var oD=new $t("tag:yaml.org,2002:int",{kind:"scalar",resolve:iD,construct:rD,predicate:aD,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),lD=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function sD(e){return!(e===null||!lD.test(e)||e[e.length-1]==="_")}function cD(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}var uD=/^[-+]?[0-9]+e/;function fD(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Mt.isNegativeZero(e))return"-0.0";return r=e.toString(10),uD.test(r)?r.replace("e",".e"):r}function dD(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Mt.isNegativeZero(e))}var hD=new $t("tag:yaml.org,2002:float",{kind:"scalar",resolve:sD,construct:cD,predicate:dD,represent:fD,defaultStyle:"lowercase"}),pD=I5.extend({implicit:[Q5,J5,oD,hD]}),mD=pD,W_=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),J_=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function gD(e){return e===null?!1:W_.exec(e)!==null||J_.exec(e)!==null}function yD(e){var t,r,a,o,s,u,f,h=0,p=null,y,g,v;if(t=W_.exec(e),t===null&&(t=J_.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],a=+t[2]-1,o=+t[3],!t[4])return new Date(Date.UTC(r,a,o));if(s=+t[4],u=+t[5],f=+t[6],t[7]){for(h=t[7].slice(0,3);h.length<3;)h+="0";h=+h}return t[9]&&(y=+t[10],g=+(t[11]||0),p=(y*60+g)*6e4,t[9]==="-"&&(p=-p)),v=new Date(Date.UTC(r,a,o,s,u,f,h)),p&&v.setTime(v.getTime()-p),v}function vD(e){return e.toISOString()}var xD=new $t("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:gD,construct:yD,instanceOf:Date,represent:vD});function bD(e){return e==="<<"||e===null}var wD=new $t("tag:yaml.org,2002:merge",{kind:"scalar",resolve:bD}),Xm=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
78
|
+
\r`;function _D(e){if(e===null)return!1;var t,r,a=0,o=e.length,s=Xm;for(r=0;r<o;r++)if(t=s.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;a+=6}return a%8===0}function SD(e){var t,r,a=e.replace(/[\r\n=]/g,""),o=a.length,s=Xm,u=0,f=[];for(t=0;t<o;t++)t%4===0&&t&&(f.push(u>>16&255),f.push(u>>8&255),f.push(u&255)),u=u<<6|s.indexOf(a.charAt(t));return r=o%4*6,r===0?(f.push(u>>16&255),f.push(u>>8&255),f.push(u&255)):r===18?(f.push(u>>10&255),f.push(u>>2&255)):r===12&&f.push(u>>4&255),new Uint8Array(f)}function ED(e){var t="",r=0,a,o,s=e.length,u=Xm;for(a=0;a<s;a++)a%3===0&&a&&(t+=u[r>>18&63],t+=u[r>>12&63],t+=u[r>>6&63],t+=u[r&63]),r=(r<<8)+e[a];return o=s%3,o===0?(t+=u[r>>18&63],t+=u[r>>12&63],t+=u[r>>6&63],t+=u[r&63]):o===2?(t+=u[r>>10&63],t+=u[r>>4&63],t+=u[r<<2&63],t+=u[64]):o===1&&(t+=u[r>>2&63],t+=u[r<<4&63],t+=u[64],t+=u[64]),t}function CD(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var AD=new $t("tag:yaml.org,2002:binary",{kind:"scalar",resolve:_D,construct:SD,predicate:CD,represent:ED}),ND=Object.prototype.hasOwnProperty,TD=Object.prototype.toString;function MD(e){if(e===null)return!0;var t=[],r,a,o,s,u,f=e;for(r=0,a=f.length;r<a;r+=1){if(o=f[r],u=!1,TD.call(o)!=="[object Object]")return!1;for(s in o)if(ND.call(o,s))if(!u)u=!0;else return!1;if(!u)return!1;if(t.indexOf(s)===-1)t.push(s);else return!1}return!0}function OD(e){return e!==null?e:[]}var kD=new $t("tag:yaml.org,2002:omap",{kind:"sequence",resolve:MD,construct:OD}),RD=Object.prototype.toString;function DD(e){if(e===null)return!0;var t,r,a,o,s,u=e;for(s=new Array(u.length),t=0,r=u.length;t<r;t+=1){if(a=u[t],RD.call(a)!=="[object Object]"||(o=Object.keys(a),o.length!==1))return!1;s[t]=[o[0],a[o[0]]]}return!0}function jD(e){if(e===null)return[];var t,r,a,o,s,u=e;for(s=new Array(u.length),t=0,r=u.length;t<r;t+=1)a=u[t],o=Object.keys(a),s[t]=[o[0],a[o[0]]];return s}var zD=new $t("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:DD,construct:jD}),LD=Object.prototype.hasOwnProperty;function HD(e){if(e===null)return!0;var t,r=e;for(t in r)if(LD.call(r,t)&&r[t]!==null)return!1;return!0}function BD(e){return e!==null?e:{}}var UD=new $t("tag:yaml.org,2002:set",{kind:"mapping",resolve:HD,construct:BD}),eS=mD.extend({implicit:[xD,wD],explicit:[AD,kD,zD,UD]}),$r=Object.prototype.hasOwnProperty,Qu=1,tS=2,nS=3,Pu=4,Ap=1,YD=2,Nb=3,$D=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,VD=/[\x85\u2028\u2029]/,qD=/[,\[\]\{\}]/,iS=/^(?:!|!!|![a-z\-]+!)$/i,rS=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Tb(e){return Object.prototype.toString.call(e)}function ci(e){return e===10||e===13}function Sa(e){return e===9||e===32}function cn(e){return e===9||e===32||e===10||e===13}function ko(e){return e===44||e===91||e===93||e===123||e===125}function GD(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function ID(e){return e===120?2:e===117?4:e===85?8:0}function ZD(e){return 48<=e&&e<=57?e-48:-1}function Mb(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
|
|
79
|
+
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"
":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}function XD(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function aS(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}var oS=new Array(256),lS=new Array(256);for(var _o=0;_o<256;_o++)oS[_o]=Mb(_o)?1:0,lS[_o]=Mb(_o);function FD(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||eS,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function sS(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=z5(r),new ln(t,r)}function we(e,t){throw sS(e,t)}function Ku(e,t){e.onWarning&&e.onWarning.call(null,sS(e,t))}var Ob={YAML:function(t,r,a){var o,s,u;t.version!==null&&we(t,"duplication of %YAML directive"),a.length!==1&&we(t,"YAML directive accepts exactly one argument"),o=/^([0-9]+)\.([0-9]+)$/.exec(a[0]),o===null&&we(t,"ill-formed argument of the YAML directive"),s=parseInt(o[1],10),u=parseInt(o[2],10),s!==1&&we(t,"unacceptable YAML version of the document"),t.version=a[0],t.checkLineBreaks=u<2,u!==1&&u!==2&&Ku(t,"unsupported YAML version of the document")},TAG:function(t,r,a){var o,s;a.length!==2&&we(t,"TAG directive accepts exactly two arguments"),o=a[0],s=a[1],iS.test(o)||we(t,"ill-formed tag handle (first argument) of the TAG directive"),$r.call(t.tagMap,o)&&we(t,'there is a previously declared suffix for "'+o+'" tag handle'),rS.test(s)||we(t,"ill-formed tag prefix (second argument) of the TAG directive");try{s=decodeURIComponent(s)}catch{we(t,"tag prefix is malformed: "+s)}t.tagMap[o]=s}};function Br(e,t,r,a){var o,s,u,f;if(t<r){if(f=e.input.slice(t,r),a)for(o=0,s=f.length;o<s;o+=1)u=f.charCodeAt(o),u===9||32<=u&&u<=1114111||we(e,"expected valid JSON character");else $D.test(f)&&we(e,"the stream contains non-printable characters");e.result+=f}}function kb(e,t,r,a){var o,s,u,f;for(Mt.isObject(r)||we(e,"cannot merge mappings; the provided source object is unacceptable"),o=Object.keys(r),u=0,f=o.length;u<f;u+=1)s=o[u],$r.call(t,s)||(aS(t,s,r[s]),a[s]=!0)}function Ro(e,t,r,a,o,s,u,f,h){var p,y;if(Array.isArray(o))for(o=Array.prototype.slice.call(o),p=0,y=o.length;p<y;p+=1)Array.isArray(o[p])&&we(e,"nested arrays are not supported inside keys"),typeof o=="object"&&Tb(o[p])==="[object Object]"&&(o[p]="[object Object]");if(typeof o=="object"&&Tb(o)==="[object Object]"&&(o="[object Object]"),o=String(o),t===null&&(t={}),a==="tag:yaml.org,2002:merge")if(Array.isArray(s))for(p=0,y=s.length;p<y;p+=1)kb(e,t,s[p],r);else kb(e,t,s,r);else!e.json&&!$r.call(r,o)&&$r.call(t,o)&&(e.line=u||e.line,e.lineStart=f||e.lineStart,e.position=h||e.position,we(e,"duplicated mapping key")),aS(t,o,s),delete r[o];return t}function Fm(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):we(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function Ct(e,t,r){for(var a=0,o=e.input.charCodeAt(e.position);o!==0;){for(;Sa(o);)o===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),o=e.input.charCodeAt(++e.position);if(t&&o===35)do o=e.input.charCodeAt(++e.position);while(o!==10&&o!==13&&o!==0);if(ci(o))for(Fm(e),o=e.input.charCodeAt(e.position),a++,e.lineIndent=0;o===32;)e.lineIndent++,o=e.input.charCodeAt(++e.position);else break}return r!==-1&&a!==0&&e.lineIndent<r&&Ku(e,"deficient indentation"),a}function Tf(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||cn(r)))}function Qm(e,t){t===1?e.result+=" ":t>1&&(e.result+=Mt.repeat(`
|
|
80
|
+
`,t-1))}function QD(e,t,r){var a,o,s,u,f,h,p,y,g=e.kind,v=e.result,x;if(x=e.input.charCodeAt(e.position),cn(x)||ko(x)||x===35||x===38||x===42||x===33||x===124||x===62||x===39||x===34||x===37||x===64||x===96||(x===63||x===45)&&(o=e.input.charCodeAt(e.position+1),cn(o)||r&&ko(o)))return!1;for(e.kind="scalar",e.result="",s=u=e.position,f=!1;x!==0;){if(x===58){if(o=e.input.charCodeAt(e.position+1),cn(o)||r&&ko(o))break}else if(x===35){if(a=e.input.charCodeAt(e.position-1),cn(a))break}else{if(e.position===e.lineStart&&Tf(e)||r&&ko(x))break;if(ci(x))if(h=e.line,p=e.lineStart,y=e.lineIndent,Ct(e,!1,-1),e.lineIndent>=t){f=!0,x=e.input.charCodeAt(e.position);continue}else{e.position=u,e.line=h,e.lineStart=p,e.lineIndent=y;break}}f&&(Br(e,s,u,!1),Qm(e,e.line-h),s=u=e.position,f=!1),Sa(x)||(u=e.position+1),x=e.input.charCodeAt(++e.position)}return Br(e,s,u,!1),e.result?!0:(e.kind=g,e.result=v,!1)}function PD(e,t){var r,a,o;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,a=o=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(Br(e,a,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)a=e.position,e.position++,o=e.position;else return!0;else ci(r)?(Br(e,a,o,!0),Qm(e,Ct(e,!1,t)),a=o=e.position):e.position===e.lineStart&&Tf(e)?we(e,"unexpected end of the document within a single quoted scalar"):(e.position++,o=e.position);we(e,"unexpected end of the stream within a single quoted scalar")}function KD(e,t){var r,a,o,s,u,f;if(f=e.input.charCodeAt(e.position),f!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=a=e.position;(f=e.input.charCodeAt(e.position))!==0;){if(f===34)return Br(e,r,e.position,!0),e.position++,!0;if(f===92){if(Br(e,r,e.position,!0),f=e.input.charCodeAt(++e.position),ci(f))Ct(e,!1,t);else if(f<256&&oS[f])e.result+=lS[f],e.position++;else if((u=ID(f))>0){for(o=u,s=0;o>0;o--)f=e.input.charCodeAt(++e.position),(u=GD(f))>=0?s=(s<<4)+u:we(e,"expected hexadecimal character");e.result+=XD(s),e.position++}else we(e,"unknown escape sequence");r=a=e.position}else ci(f)?(Br(e,r,a,!0),Qm(e,Ct(e,!1,t)),r=a=e.position):e.position===e.lineStart&&Tf(e)?we(e,"unexpected end of the document within a double quoted scalar"):(e.position++,a=e.position)}we(e,"unexpected end of the stream within a double quoted scalar")}function WD(e,t){var r=!0,a,o,s,u=e.tag,f,h=e.anchor,p,y,g,v,x,b=Object.create(null),w,E,C,N;if(N=e.input.charCodeAt(e.position),N===91)y=93,x=!1,f=[];else if(N===123)y=125,x=!0,f={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=f),N=e.input.charCodeAt(++e.position);N!==0;){if(Ct(e,!0,t),N=e.input.charCodeAt(e.position),N===y)return e.position++,e.tag=u,e.anchor=h,e.kind=x?"mapping":"sequence",e.result=f,!0;r?N===44&&we(e,"expected the node content, but found ','"):we(e,"missed comma between flow collection entries"),E=w=C=null,g=v=!1,N===63&&(p=e.input.charCodeAt(e.position+1),cn(p)&&(g=v=!0,e.position++,Ct(e,!0,t))),a=e.line,o=e.lineStart,s=e.position,Xo(e,t,Qu,!1,!0),E=e.tag,w=e.result,Ct(e,!0,t),N=e.input.charCodeAt(e.position),(v||e.line===a)&&N===58&&(g=!0,N=e.input.charCodeAt(++e.position),Ct(e,!0,t),Xo(e,t,Qu,!1,!0),C=e.result),x?Ro(e,f,b,E,w,C,a,o,s):g?f.push(Ro(e,null,b,E,w,C,a,o,s)):f.push(w),Ct(e,!0,t),N=e.input.charCodeAt(e.position),N===44?(r=!0,N=e.input.charCodeAt(++e.position)):r=!1}we(e,"unexpected end of the stream within a flow collection")}function JD(e,t){var r,a,o=Ap,s=!1,u=!1,f=t,h=0,p=!1,y,g;if(g=e.input.charCodeAt(e.position),g===124)a=!1;else if(g===62)a=!0;else return!1;for(e.kind="scalar",e.result="";g!==0;)if(g=e.input.charCodeAt(++e.position),g===43||g===45)Ap===o?o=g===43?Nb:YD:we(e,"repeat of a chomping mode identifier");else if((y=ZD(g))>=0)y===0?we(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):u?we(e,"repeat of an indentation width identifier"):(f=t+y-1,u=!0);else break;if(Sa(g)){do g=e.input.charCodeAt(++e.position);while(Sa(g));if(g===35)do g=e.input.charCodeAt(++e.position);while(!ci(g)&&g!==0)}for(;g!==0;){for(Fm(e),e.lineIndent=0,g=e.input.charCodeAt(e.position);(!u||e.lineIndent<f)&&g===32;)e.lineIndent++,g=e.input.charCodeAt(++e.position);if(!u&&e.lineIndent>f&&(f=e.lineIndent),ci(g)){h++;continue}if(e.lineIndent<f){o===Nb?e.result+=Mt.repeat(`
|
|
81
|
+
`,s?1+h:h):o===Ap&&s&&(e.result+=`
|
|
82
|
+
`);break}for(a?Sa(g)?(p=!0,e.result+=Mt.repeat(`
|
|
83
|
+
`,s?1+h:h)):p?(p=!1,e.result+=Mt.repeat(`
|
|
84
|
+
`,h+1)):h===0?s&&(e.result+=" "):e.result+=Mt.repeat(`
|
|
85
|
+
`,h):e.result+=Mt.repeat(`
|
|
86
|
+
`,s?1+h:h),s=!0,u=!0,h=0,r=e.position;!ci(g)&&g!==0;)g=e.input.charCodeAt(++e.position);Br(e,r,e.position,!1)}return!0}function Rb(e,t){var r,a=e.tag,o=e.anchor,s=[],u,f=!1,h;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),h=e.input.charCodeAt(e.position);h!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,we(e,"tab characters must not be used in indentation")),!(h!==45||(u=e.input.charCodeAt(e.position+1),!cn(u))));){if(f=!0,e.position++,Ct(e,!0,-1)&&e.lineIndent<=t){s.push(null),h=e.input.charCodeAt(e.position);continue}if(r=e.line,Xo(e,t,nS,!1,!0),s.push(e.result),Ct(e,!0,-1),h=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&h!==0)we(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return f?(e.tag=a,e.anchor=o,e.kind="sequence",e.result=s,!0):!1}function ej(e,t,r){var a,o,s,u,f,h,p=e.tag,y=e.anchor,g={},v=Object.create(null),x=null,b=null,w=null,E=!1,C=!1,N;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=g),N=e.input.charCodeAt(e.position);N!==0;){if(!E&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,we(e,"tab characters must not be used in indentation")),a=e.input.charCodeAt(e.position+1),s=e.line,(N===63||N===58)&&cn(a))N===63?(E&&(Ro(e,g,v,x,b,null,u,f,h),x=b=w=null),C=!0,E=!0,o=!0):E?(E=!1,o=!0):we(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,N=a;else{if(u=e.line,f=e.lineStart,h=e.position,!Xo(e,r,tS,!1,!0))break;if(e.line===s){for(N=e.input.charCodeAt(e.position);Sa(N);)N=e.input.charCodeAt(++e.position);if(N===58)N=e.input.charCodeAt(++e.position),cn(N)||we(e,"a whitespace character is expected after the key-value separator within a block mapping"),E&&(Ro(e,g,v,x,b,null,u,f,h),x=b=w=null),C=!0,E=!1,o=!1,x=e.tag,b=e.result;else if(C)we(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=p,e.anchor=y,!0}else if(C)we(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=p,e.anchor=y,!0}if((e.line===s||e.lineIndent>t)&&(E&&(u=e.line,f=e.lineStart,h=e.position),Xo(e,t,Pu,!0,o)&&(E?b=e.result:w=e.result),E||(Ro(e,g,v,x,b,w,u,f,h),x=b=w=null),Ct(e,!0,-1),N=e.input.charCodeAt(e.position)),(e.line===s||e.lineIndent>t)&&N!==0)we(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return E&&Ro(e,g,v,x,b,null,u,f,h),C&&(e.tag=p,e.anchor=y,e.kind="mapping",e.result=g),C}function tj(e){var t,r=!1,a=!1,o,s,u;if(u=e.input.charCodeAt(e.position),u!==33)return!1;if(e.tag!==null&&we(e,"duplication of a tag property"),u=e.input.charCodeAt(++e.position),u===60?(r=!0,u=e.input.charCodeAt(++e.position)):u===33?(a=!0,o="!!",u=e.input.charCodeAt(++e.position)):o="!",t=e.position,r){do u=e.input.charCodeAt(++e.position);while(u!==0&&u!==62);e.position<e.length?(s=e.input.slice(t,e.position),u=e.input.charCodeAt(++e.position)):we(e,"unexpected end of the stream within a verbatim tag")}else{for(;u!==0&&!cn(u);)u===33&&(a?we(e,"tag suffix cannot contain exclamation marks"):(o=e.input.slice(t-1,e.position+1),iS.test(o)||we(e,"named tag handle cannot contain such characters"),a=!0,t=e.position+1)),u=e.input.charCodeAt(++e.position);s=e.input.slice(t,e.position),qD.test(s)&&we(e,"tag suffix cannot contain flow indicator characters")}s&&!rS.test(s)&&we(e,"tag name cannot contain such characters: "+s);try{s=decodeURIComponent(s)}catch{we(e,"tag name is malformed: "+s)}return r?e.tag=s:$r.call(e.tagMap,o)?e.tag=e.tagMap[o]+s:o==="!"?e.tag="!"+s:o==="!!"?e.tag="tag:yaml.org,2002:"+s:we(e,'undeclared tag handle "'+o+'"'),!0}function nj(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&we(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!cn(r)&&!ko(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&we(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function ij(e){var t,r,a;if(a=e.input.charCodeAt(e.position),a!==42)return!1;for(a=e.input.charCodeAt(++e.position),t=e.position;a!==0&&!cn(a)&&!ko(a);)a=e.input.charCodeAt(++e.position);return e.position===t&&we(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),$r.call(e.anchorMap,r)||we(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],Ct(e,!0,-1),!0}function Xo(e,t,r,a,o){var s,u,f,h=1,p=!1,y=!1,g,v,x,b,w,E;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,s=u=f=Pu===r||nS===r,a&&Ct(e,!0,-1)&&(p=!0,e.lineIndent>t?h=1:e.lineIndent===t?h=0:e.lineIndent<t&&(h=-1)),h===1)for(;tj(e)||nj(e);)Ct(e,!0,-1)?(p=!0,f=s,e.lineIndent>t?h=1:e.lineIndent===t?h=0:e.lineIndent<t&&(h=-1)):f=!1;if(f&&(f=p||o),(h===1||Pu===r)&&(Qu===r||tS===r?w=t:w=t+1,E=e.position-e.lineStart,h===1?f&&(Rb(e,E)||ej(e,E,w))||WD(e,w)?y=!0:(u&&JD(e,w)||PD(e,w)||KD(e,w)?y=!0:ij(e)?(y=!0,(e.tag!==null||e.anchor!==null)&&we(e,"alias node should not have any properties")):QD(e,w,Qu===r)&&(y=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):h===0&&(y=f&&Rb(e,E))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&we(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),g=0,v=e.implicitTypes.length;g<v;g+=1)if(b=e.implicitTypes[g],b.resolve(e.result)){e.result=b.construct(e.result),e.tag=b.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if($r.call(e.typeMap[e.kind||"fallback"],e.tag))b=e.typeMap[e.kind||"fallback"][e.tag];else for(b=null,x=e.typeMap.multi[e.kind||"fallback"],g=0,v=x.length;g<v;g+=1)if(e.tag.slice(0,x[g].tag.length)===x[g].tag){b=x[g];break}b||we(e,"unknown tag !<"+e.tag+">"),e.result!==null&&b.kind!==e.kind&&we(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+b.kind+'", not "'+e.kind+'"'),b.resolve(e.result,e.tag)?(e.result=b.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):we(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||y}function rj(e){var t=e.position,r,a,o,s=!1,u;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(u=e.input.charCodeAt(e.position))!==0&&(Ct(e,!0,-1),u=e.input.charCodeAt(e.position),!(e.lineIndent>0||u!==37));){for(s=!0,u=e.input.charCodeAt(++e.position),r=e.position;u!==0&&!cn(u);)u=e.input.charCodeAt(++e.position);for(a=e.input.slice(r,e.position),o=[],a.length<1&&we(e,"directive name must not be less than one character in length");u!==0;){for(;Sa(u);)u=e.input.charCodeAt(++e.position);if(u===35){do u=e.input.charCodeAt(++e.position);while(u!==0&&!ci(u));break}if(ci(u))break;for(r=e.position;u!==0&&!cn(u);)u=e.input.charCodeAt(++e.position);o.push(e.input.slice(r,e.position))}u!==0&&Fm(e),$r.call(Ob,a)?Ob[a](e,a,o):Ku(e,'unknown document directive "'+a+'"')}if(Ct(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,Ct(e,!0,-1)):s&&we(e,"directives end mark is expected"),Xo(e,e.lineIndent-1,Pu,!1,!0),Ct(e,!0,-1),e.checkLineBreaks&&VD.test(e.input.slice(t,e.position))&&Ku(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Tf(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,Ct(e,!0,-1));return}if(e.position<e.length-1)we(e,"end of the stream or a document separator is expected");else return}function aj(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
|
|
87
|
+
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new FD(e,t),a=e.indexOf("\0");for(a!==-1&&(r.position=a,we(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)rj(r);return r.documents}function oj(e,t){var r=aj(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new ln("expected a single document in the stream, but found more")}}var lj=oj,sj={load:lj},cS=Object.prototype.toString,uS=Object.prototype.hasOwnProperty,Pm=65279,cj=9,Ss=10,uj=13,fj=32,dj=33,hj=34,cm=35,pj=37,mj=38,gj=39,yj=42,fS=44,vj=45,Wu=58,xj=61,bj=62,wj=63,_j=64,dS=91,hS=93,Sj=96,pS=123,Ej=124,mS=125,Vt={};Vt[0]="\\0";Vt[7]="\\a";Vt[8]="\\b";Vt[9]="\\t";Vt[10]="\\n";Vt[11]="\\v";Vt[12]="\\f";Vt[13]="\\r";Vt[27]="\\e";Vt[34]='\\"';Vt[92]="\\\\";Vt[133]="\\N";Vt[160]="\\_";Vt[8232]="\\L";Vt[8233]="\\P";var Cj=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Aj=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Nj(e,t){var r,a,o,s,u,f,h;if(t===null)return{};for(r={},a=Object.keys(t),o=0,s=a.length;o<s;o+=1)u=a[o],f=String(t[u]),u.slice(0,2)==="!!"&&(u="tag:yaml.org,2002:"+u.slice(2)),h=e.compiledTypeMap.fallback[u],h&&uS.call(h.styleAliases,f)&&(f=h.styleAliases[f]),r[u]=f;return r}function Tj(e){var t,r,a;if(t=e.toString(16).toUpperCase(),e<=255)r="x",a=2;else if(e<=65535)r="u",a=4;else if(e<=4294967295)r="U",a=8;else throw new ln("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Mt.repeat("0",a-t.length)+t}var Mj=1,Es=2;function Oj(e){this.schema=e.schema||eS,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Mt.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=Nj(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?Es:Mj,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function Db(e,t){for(var r=Mt.repeat(" ",t),a=0,o=-1,s="",u,f=e.length;a<f;)o=e.indexOf(`
|
|
88
|
+
`,a),o===-1?(u=e.slice(a),a=f):(u=e.slice(a,o+1),a=o+1),u.length&&u!==`
|
|
89
|
+
`&&(s+=r),s+=u;return s}function um(e,t){return`
|
|
90
|
+
`+Mt.repeat(" ",e.indent*t)}function kj(e,t){var r,a,o;for(r=0,a=e.implicitTypes.length;r<a;r+=1)if(o=e.implicitTypes[r],o.resolve(t))return!0;return!1}function Ju(e){return e===fj||e===cj}function Cs(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==Pm||65536<=e&&e<=1114111}function jb(e){return Cs(e)&&e!==Pm&&e!==uj&&e!==Ss}function zb(e,t,r){var a=jb(e),o=a&&!Ju(e);return(r?a:a&&e!==fS&&e!==dS&&e!==hS&&e!==pS&&e!==mS)&&e!==cm&&!(t===Wu&&!o)||jb(t)&&!Ju(t)&&e===cm||t===Wu&&o}function Rj(e){return Cs(e)&&e!==Pm&&!Ju(e)&&e!==vj&&e!==wj&&e!==Wu&&e!==fS&&e!==dS&&e!==hS&&e!==pS&&e!==mS&&e!==cm&&e!==mj&&e!==yj&&e!==dj&&e!==Ej&&e!==xj&&e!==bj&&e!==gj&&e!==hj&&e!==pj&&e!==_j&&e!==Sj}function Dj(e){return!Ju(e)&&e!==Wu}function cs(e,t){var r=e.charCodeAt(t),a;return r>=55296&&r<=56319&&t+1<e.length&&(a=e.charCodeAt(t+1),a>=56320&&a<=57343)?(r-55296)*1024+a-56320+65536:r}function gS(e){var t=/^\n* /;return t.test(e)}var yS=1,fm=2,vS=3,xS=4,No=5;function jj(e,t,r,a,o,s,u,f){var h,p=0,y=null,g=!1,v=!1,x=a!==-1,b=-1,w=Rj(cs(e,0))&&Dj(cs(e,e.length-1));if(t||u)for(h=0;h<e.length;p>=65536?h+=2:h++){if(p=cs(e,h),!Cs(p))return No;w=w&&zb(p,y,f),y=p}else{for(h=0;h<e.length;p>=65536?h+=2:h++){if(p=cs(e,h),p===Ss)g=!0,x&&(v=v||h-b-1>a&&e[b+1]!==" ",b=h);else if(!Cs(p))return No;w=w&&zb(p,y,f),y=p}v=v||x&&h-b-1>a&&e[b+1]!==" "}return!g&&!v?w&&!u&&!o(e)?yS:s===Es?No:fm:r>9&&gS(e)?No:u?s===Es?No:fm:v?xS:vS}function zj(e,t,r,a,o){e.dump=(function(){if(t.length===0)return e.quotingType===Es?'""':"''";if(!e.noCompatMode&&(Cj.indexOf(t)!==-1||Aj.test(t)))return e.quotingType===Es?'"'+t+'"':"'"+t+"'";var s=e.indent*Math.max(1,r),u=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-s),f=a||e.flowLevel>-1&&r>=e.flowLevel;function h(p){return kj(e,p)}switch(jj(t,f,e.indent,u,h,e.quotingType,e.forceQuotes&&!a,o)){case yS:return t;case fm:return"'"+t.replace(/'/g,"''")+"'";case vS:return"|"+Lb(t,e.indent)+Hb(Db(t,s));case xS:return">"+Lb(t,e.indent)+Hb(Db(Lj(t,u),s));case No:return'"'+Hj(t)+'"';default:throw new ln("impossible error: invalid scalar style")}})()}function Lb(e,t){var r=gS(e)?String(t):"",a=e[e.length-1]===`
|
|
91
|
+
`,o=a&&(e[e.length-2]===`
|
|
92
|
+
`||e===`
|
|
93
|
+
`),s=o?"+":a?"":"-";return r+s+`
|
|
94
|
+
`}function Hb(e){return e[e.length-1]===`
|
|
95
|
+
`?e.slice(0,-1):e}function Lj(e,t){for(var r=/(\n+)([^\n]*)/g,a=(function(){var p=e.indexOf(`
|
|
96
|
+
`);return p=p!==-1?p:e.length,r.lastIndex=p,Bb(e.slice(0,p),t)})(),o=e[0]===`
|
|
97
|
+
`||e[0]===" ",s,u;u=r.exec(e);){var f=u[1],h=u[2];s=h[0]===" ",a+=f+(!o&&!s&&h!==""?`
|
|
98
|
+
`:"")+Bb(h,t),o=s}return a}function Bb(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,a,o=0,s,u=0,f=0,h="";a=r.exec(e);)f=a.index,f-o>t&&(s=u>o?u:f,h+=`
|
|
99
|
+
`+e.slice(o,s),o=s+1),u=f;return h+=`
|
|
100
|
+
`,e.length-o>t&&u>o?h+=e.slice(o,u)+`
|
|
101
|
+
`+e.slice(u+1):h+=e.slice(o),h.slice(1)}function Hj(e){for(var t="",r=0,a,o=0;o<e.length;r>=65536?o+=2:o++)r=cs(e,o),a=Vt[r],!a&&Cs(r)?(t+=e[o],r>=65536&&(t+=e[o+1])):t+=a||Tj(r);return t}function Bj(e,t,r){var a="",o=e.tag,s,u,f;for(s=0,u=r.length;s<u;s+=1)f=r[s],e.replacer&&(f=e.replacer.call(r,String(s),f)),(Zi(e,t,f,!1,!1)||typeof f>"u"&&Zi(e,t,null,!1,!1))&&(a!==""&&(a+=","+(e.condenseFlow?"":" ")),a+=e.dump);e.tag=o,e.dump="["+a+"]"}function Ub(e,t,r,a){var o="",s=e.tag,u,f,h;for(u=0,f=r.length;u<f;u+=1)h=r[u],e.replacer&&(h=e.replacer.call(r,String(u),h)),(Zi(e,t+1,h,!0,!0,!1,!0)||typeof h>"u"&&Zi(e,t+1,null,!0,!0,!1,!0))&&((!a||o!=="")&&(o+=um(e,t)),e.dump&&Ss===e.dump.charCodeAt(0)?o+="-":o+="- ",o+=e.dump);e.tag=s,e.dump=o||"[]"}function Uj(e,t,r){var a="",o=e.tag,s=Object.keys(r),u,f,h,p,y;for(u=0,f=s.length;u<f;u+=1)y="",a!==""&&(y+=", "),e.condenseFlow&&(y+='"'),h=s[u],p=r[h],e.replacer&&(p=e.replacer.call(r,h,p)),Zi(e,t,h,!1,!1)&&(e.dump.length>1024&&(y+="? "),y+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Zi(e,t,p,!1,!1)&&(y+=e.dump,a+=y));e.tag=o,e.dump="{"+a+"}"}function Yj(e,t,r,a){var o="",s=e.tag,u=Object.keys(r),f,h,p,y,g,v;if(e.sortKeys===!0)u.sort();else if(typeof e.sortKeys=="function")u.sort(e.sortKeys);else if(e.sortKeys)throw new ln("sortKeys must be a boolean or a function");for(f=0,h=u.length;f<h;f+=1)v="",(!a||o!=="")&&(v+=um(e,t)),p=u[f],y=r[p],e.replacer&&(y=e.replacer.call(r,p,y)),Zi(e,t+1,p,!0,!0,!0)&&(g=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,g&&(e.dump&&Ss===e.dump.charCodeAt(0)?v+="?":v+="? "),v+=e.dump,g&&(v+=um(e,t)),Zi(e,t+1,y,!0,g)&&(e.dump&&Ss===e.dump.charCodeAt(0)?v+=":":v+=": ",v+=e.dump,o+=v));e.tag=s,e.dump=o||"{}"}function Yb(e,t,r){var a,o,s,u,f,h;for(o=r?e.explicitTypes:e.implicitTypes,s=0,u=o.length;s<u;s+=1)if(f=o[s],(f.instanceOf||f.predicate)&&(!f.instanceOf||typeof t=="object"&&t instanceof f.instanceOf)&&(!f.predicate||f.predicate(t))){if(r?f.multi&&f.representName?e.tag=f.representName(t):e.tag=f.tag:e.tag="?",f.represent){if(h=e.styleMap[f.tag]||f.defaultStyle,cS.call(f.represent)==="[object Function]")a=f.represent(t,h);else if(uS.call(f.represent,h))a=f.represent[h](t,h);else throw new ln("!<"+f.tag+'> tag resolver accepts not "'+h+'" style');e.dump=a}return!0}return!1}function Zi(e,t,r,a,o,s,u){e.tag=null,e.dump=r,Yb(e,r,!1)||Yb(e,r,!0);var f=cS.call(e.dump),h=a,p;a&&(a=e.flowLevel<0||e.flowLevel>t);var y=f==="[object Object]"||f==="[object Array]",g,v;if(y&&(g=e.duplicates.indexOf(r),v=g!==-1),(e.tag!==null&&e.tag!=="?"||v||e.indent!==2&&t>0)&&(o=!1),v&&e.usedDuplicates[g])e.dump="*ref_"+g;else{if(y&&v&&!e.usedDuplicates[g]&&(e.usedDuplicates[g]=!0),f==="[object Object]")a&&Object.keys(e.dump).length!==0?(Yj(e,t,e.dump,o),v&&(e.dump="&ref_"+g+e.dump)):(Uj(e,t,e.dump),v&&(e.dump="&ref_"+g+" "+e.dump));else if(f==="[object Array]")a&&e.dump.length!==0?(e.noArrayIndent&&!u&&t>0?Ub(e,t-1,e.dump,o):Ub(e,t,e.dump,o),v&&(e.dump="&ref_"+g+e.dump)):(Bj(e,t,e.dump),v&&(e.dump="&ref_"+g+" "+e.dump));else if(f==="[object String]")e.tag!=="?"&&zj(e,e.dump,t,s,h);else{if(f==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new ln("unacceptable kind of an object to dump "+f)}e.tag!==null&&e.tag!=="?"&&(p=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?p="!"+p:p.slice(0,18)==="tag:yaml.org,2002:"?p="!!"+p.slice(18):p="!<"+p+">",e.dump=p+" "+e.dump)}return!0}function $j(e,t){var r=[],a=[],o,s;for(dm(e,r,a),o=0,s=a.length;o<s;o+=1)t.duplicates.push(r[a[o]]);t.usedDuplicates=new Array(s)}function dm(e,t,r){var a,o,s;if(e!==null&&typeof e=="object")if(o=t.indexOf(e),o!==-1)r.indexOf(o)===-1&&r.push(o);else if(t.push(e),Array.isArray(e))for(o=0,s=e.length;o<s;o+=1)dm(e[o],t,r);else for(a=Object.keys(e),o=0,s=a.length;o<s;o+=1)dm(e[a[o]],t,r)}function Vj(e,t){t=t||{};var r=new Oj(t);r.noRefs||$j(e,r);var a=e;return r.replacer&&(a=r.replacer.call({"":a},"",a)),Zi(r,0,a,!0,!0)?r.dump+`
|
|
102
|
+
`:""}var qj=Vj,Gj={dump:qj},Ij=sj.load,Zj=Gj.dump,Xe;(function(e){e.assertEqual=o=>{};function t(o){}e.assertIs=t;function r(o){throw new Error}e.assertNever=r,e.arrayToEnum=o=>{const s={};for(const u of o)s[u]=u;return s},e.getValidEnumValues=o=>{const s=e.objectKeys(o).filter(f=>typeof o[o[f]]!="number"),u={};for(const f of s)u[f]=o[f];return e.objectValues(u)},e.objectValues=o=>e.objectKeys(o).map(function(s){return o[s]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const s=[];for(const u in o)Object.prototype.hasOwnProperty.call(o,u)&&s.push(u);return s},e.find=(o,s)=>{for(const u of o)if(s(u))return u},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function a(o,s=" | "){return o.map(u=>typeof u=="string"?`'${u}'`:u).join(s)}e.joinValues=a,e.jsonStringifyReplacer=(o,s)=>typeof s=="bigint"?s.toString():s})(Xe||(Xe={}));var $b;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})($b||($b={}));const ge=Xe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),jr=e=>{switch(typeof e){case"undefined":return ge.undefined;case"string":return ge.string;case"number":return Number.isNaN(e)?ge.nan:ge.number;case"boolean":return ge.boolean;case"function":return ge.function;case"bigint":return ge.bigint;case"symbol":return ge.symbol;case"object":return Array.isArray(e)?ge.array:e===null?ge.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ge.promise:typeof Map<"u"&&e instanceof Map?ge.map:typeof Set<"u"&&e instanceof Set?ge.set:typeof Date<"u"&&e instanceof Date?ge.date:ge.object;default:return ge.unknown}},ue=Xe.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class Xi extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=a=>{this.issues=[...this.issues,a]},this.addIssues=(a=[])=>{this.issues=[...this.issues,...a]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}format(t){const r=t||function(s){return s.message},a={_errors:[]},o=s=>{for(const u of s.issues)if(u.code==="invalid_union")u.unionErrors.map(o);else if(u.code==="invalid_return_type")o(u.returnTypeError);else if(u.code==="invalid_arguments")o(u.argumentsError);else if(u.path.length===0)a._errors.push(r(u));else{let f=a,h=0;for(;h<u.path.length;){const p=u.path[h];h===u.path.length-1?(f[p]=f[p]||{_errors:[]},f[p]._errors.push(r(u))):f[p]=f[p]||{_errors:[]},f=f[p],h++}}};return o(this),a}static assert(t){if(!(t instanceof Xi))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Xe.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){const r={},a=[];for(const o of this.issues)if(o.path.length>0){const s=o.path[0];r[s]=r[s]||[],r[s].push(t(o))}else a.push(t(o));return{formErrors:a,fieldErrors:r}}get formErrors(){return this.flatten()}}Xi.create=e=>new Xi(e);const hm=(e,t)=>{let r;switch(e.code){case ue.invalid_type:e.received===ge.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case ue.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,Xe.jsonStringifyReplacer)}`;break;case ue.unrecognized_keys:r=`Unrecognized key(s) in object: ${Xe.joinValues(e.keys,", ")}`;break;case ue.invalid_union:r="Invalid input";break;case ue.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Xe.joinValues(e.options)}`;break;case ue.invalid_enum_value:r=`Invalid enum value. Expected ${Xe.joinValues(e.options)}, received '${e.received}'`;break;case ue.invalid_arguments:r="Invalid function arguments";break;case ue.invalid_return_type:r="Invalid function return type";break;case ue.invalid_date:r="Invalid date";break;case ue.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:Xe.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case ue.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case ue.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case ue.custom:r="Invalid input";break;case ue.invalid_intersection_types:r="Intersection results could not be merged";break;case ue.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case ue.not_finite:r="Number must be finite";break;default:r=t.defaultError,Xe.assertNever(e)}return{message:r}};let Xj=hm;function Fj(){return Xj}const Qj=e=>{const{data:t,path:r,errorMaps:a,issueData:o}=e,s=[...r,...o.path||[]],u={...o,path:s};if(o.message!==void 0)return{...o,path:s,message:o.message};let f="";const h=a.filter(p=>!!p).slice().reverse();for(const p of h)f=p(u,{data:t,defaultError:f}).message;return{...o,path:s,message:f}};function pe(e,t){const r=Fj(),a=Qj({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===hm?void 0:hm].filter(o=>!!o)});e.common.issues.push(a)}class Ft{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){const a=[];for(const o of r){if(o.status==="aborted")return Me;o.status==="dirty"&&t.dirty(),a.push(o.value)}return{status:t.value,value:a}}static async mergeObjectAsync(t,r){const a=[];for(const o of r){const s=await o.key,u=await o.value;a.push({key:s,value:u})}return Ft.mergeObjectSync(t,a)}static mergeObjectSync(t,r){const a={};for(const o of r){const{key:s,value:u}=o;if(s.status==="aborted"||u.status==="aborted")return Me;s.status==="dirty"&&t.dirty(),u.status==="dirty"&&t.dirty(),s.value!=="__proto__"&&(typeof u.value<"u"||o.alwaysSet)&&(a[s.value]=u.value)}return{status:t.value,value:a}}}const Me=Object.freeze({status:"aborted"}),us=e=>({status:"dirty",value:e}),Ln=e=>({status:"valid",value:e}),Vb=e=>e.status==="aborted",qb=e=>e.status==="dirty",Fo=e=>e.status==="valid",ef=e=>typeof Promise<"u"&&e instanceof Promise;var xe;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(xe||(xe={}));class hi{constructor(t,r,a,o){this._cachedPath=[],this.parent=t,this.data=r,this._path=a,this._key=o}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Gb=(e,t)=>{if(Fo(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new Xi(e.common.issues);return this._error=r,this._error}}};function ze(e){if(!e)return{};const{errorMap:t,invalid_type_error:r,required_error:a,description:o}=e;if(t&&(r||a))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(u,f)=>{const{message:h}=e;return u.code==="invalid_enum_value"?{message:h??f.defaultError}:typeof f.data>"u"?{message:h??a??f.defaultError}:u.code!=="invalid_type"?{message:f.defaultError}:{message:h??r??f.defaultError}},description:o}}class qe{get description(){return this._def.description}_getType(t){return jr(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:jr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Ft,ctx:{common:t.parent.common,data:t.data,parsedType:jr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const r=this._parse(t);if(ef(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){const r=this._parse(t);return Promise.resolve(r)}parse(t,r){const a=this.safeParse(t,r);if(a.success)return a.data;throw a.error}safeParse(t,r){const a={common:{issues:[],async:(r==null?void 0:r.async)??!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:jr(t)},o=this._parseSync({data:t,path:a.path,parent:a});return Gb(a,o)}"~validate"(t){var a,o;const r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:jr(t)};if(!this["~standard"].async)try{const s=this._parseSync({data:t,path:[],parent:r});return Fo(s)?{value:s.value}:{issues:r.common.issues}}catch(s){(o=(a=s==null?void 0:s.message)==null?void 0:a.toLowerCase())!=null&&o.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:r}).then(s=>Fo(s)?{value:s.value}:{issues:r.common.issues})}async parseAsync(t,r){const a=await this.safeParseAsync(t,r);if(a.success)return a.data;throw a.error}async safeParseAsync(t,r){const a={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:jr(t)},o=this._parse({data:t,path:a.path,parent:a}),s=await(ef(o)?o:Promise.resolve(o));return Gb(a,s)}refine(t,r){const a=o=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(o):r;return this._refinement((o,s)=>{const u=t(o),f=()=>s.addIssue({code:ue.custom,...a(o)});return typeof Promise<"u"&&u instanceof Promise?u.then(h=>h?!0:(f(),!1)):u?!0:(f(),!1)})}refinement(t,r){return this._refinement((a,o)=>t(a)?!0:(o.addIssue(typeof r=="function"?r(a,o):r),!1))}_refinement(t){return new Oa({schema:this,typeName:Ne.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return Ur.create(this,this._def)}nullable(){return Ko.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ui.create(this)}promise(){return of.create(this,this._def)}or(t){return nf.create([this,t],this._def)}and(t){return rf.create(this,t,this._def)}transform(t){return new Oa({...ze(this._def),schema:this,typeName:Ne.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const r=typeof t=="function"?t:()=>t;return new mm({...ze(this._def),innerType:this,defaultValue:r,typeName:Ne.ZodDefault})}brand(){return new vz({typeName:Ne.ZodBranded,type:this,...ze(this._def)})}catch(t){const r=typeof t=="function"?t:()=>t;return new gm({...ze(this._def),innerType:this,catchValue:r,typeName:Ne.ZodCatch})}describe(t){const r=this.constructor;return new r({...this._def,description:t})}pipe(t){return Km.create(this,t)}readonly(){return ym.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Pj=/^c[^\s-]{8,}$/i,Kj=/^[0-9a-z]+$/,Wj=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Jj=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,ez=/^[a-z0-9_-]{21}$/i,tz=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,nz=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,iz=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,rz="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Np;const az=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,oz=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,lz=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,sz=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,cz=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,uz=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,bS="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",fz=new RegExp(`^${bS}$`);function wS(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function dz(e){return new RegExp(`^${wS(e)}$`)}function hz(e){let t=`${bS}T${wS(e)}`;const r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function pz(e,t){return!!((t==="v4"||!t)&&az.test(e)||(t==="v6"||!t)&&lz.test(e))}function mz(e,t){if(!tz.test(e))return!1;try{const[r]=e.split(".");if(!r)return!1;const a=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),o=JSON.parse(atob(a));return!(typeof o!="object"||o===null||"typ"in o&&(o==null?void 0:o.typ)!=="JWT"||!o.alg||t&&o.alg!==t)}catch{return!1}}function gz(e,t){return!!((t==="v4"||!t)&&oz.test(e)||(t==="v6"||!t)&&sz.test(e))}class qi extends qe{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ge.string){const s=this._getOrReturnCtx(t);return pe(s,{code:ue.invalid_type,expected:ge.string,received:s.parsedType}),Me}const a=new Ft;let o;for(const s of this._def.checks)if(s.kind==="min")t.data.length<s.value&&(o=this._getOrReturnCtx(t,o),pe(o,{code:ue.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),a.dirty());else if(s.kind==="max")t.data.length>s.value&&(o=this._getOrReturnCtx(t,o),pe(o,{code:ue.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),a.dirty());else if(s.kind==="length"){const u=t.data.length>s.value,f=t.data.length<s.value;(u||f)&&(o=this._getOrReturnCtx(t,o),u?pe(o,{code:ue.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):f&&pe(o,{code:ue.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),a.dirty())}else if(s.kind==="email")iz.test(t.data)||(o=this._getOrReturnCtx(t,o),pe(o,{validation:"email",code:ue.invalid_string,message:s.message}),a.dirty());else if(s.kind==="emoji")Np||(Np=new RegExp(rz,"u")),Np.test(t.data)||(o=this._getOrReturnCtx(t,o),pe(o,{validation:"emoji",code:ue.invalid_string,message:s.message}),a.dirty());else if(s.kind==="uuid")Jj.test(t.data)||(o=this._getOrReturnCtx(t,o),pe(o,{validation:"uuid",code:ue.invalid_string,message:s.message}),a.dirty());else if(s.kind==="nanoid")ez.test(t.data)||(o=this._getOrReturnCtx(t,o),pe(o,{validation:"nanoid",code:ue.invalid_string,message:s.message}),a.dirty());else if(s.kind==="cuid")Pj.test(t.data)||(o=this._getOrReturnCtx(t,o),pe(o,{validation:"cuid",code:ue.invalid_string,message:s.message}),a.dirty());else if(s.kind==="cuid2")Kj.test(t.data)||(o=this._getOrReturnCtx(t,o),pe(o,{validation:"cuid2",code:ue.invalid_string,message:s.message}),a.dirty());else if(s.kind==="ulid")Wj.test(t.data)||(o=this._getOrReturnCtx(t,o),pe(o,{validation:"ulid",code:ue.invalid_string,message:s.message}),a.dirty());else if(s.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),pe(o,{validation:"url",code:ue.invalid_string,message:s.message}),a.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),pe(o,{validation:"regex",code:ue.invalid_string,message:s.message}),a.dirty())):s.kind==="trim"?t.data=t.data.trim():s.kind==="includes"?t.data.includes(s.value,s.position)||(o=this._getOrReturnCtx(t,o),pe(o,{code:ue.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),a.dirty()):s.kind==="toLowerCase"?t.data=t.data.toLowerCase():s.kind==="toUpperCase"?t.data=t.data.toUpperCase():s.kind==="startsWith"?t.data.startsWith(s.value)||(o=this._getOrReturnCtx(t,o),pe(o,{code:ue.invalid_string,validation:{startsWith:s.value},message:s.message}),a.dirty()):s.kind==="endsWith"?t.data.endsWith(s.value)||(o=this._getOrReturnCtx(t,o),pe(o,{code:ue.invalid_string,validation:{endsWith:s.value},message:s.message}),a.dirty()):s.kind==="datetime"?hz(s).test(t.data)||(o=this._getOrReturnCtx(t,o),pe(o,{code:ue.invalid_string,validation:"datetime",message:s.message}),a.dirty()):s.kind==="date"?fz.test(t.data)||(o=this._getOrReturnCtx(t,o),pe(o,{code:ue.invalid_string,validation:"date",message:s.message}),a.dirty()):s.kind==="time"?dz(s).test(t.data)||(o=this._getOrReturnCtx(t,o),pe(o,{code:ue.invalid_string,validation:"time",message:s.message}),a.dirty()):s.kind==="duration"?nz.test(t.data)||(o=this._getOrReturnCtx(t,o),pe(o,{validation:"duration",code:ue.invalid_string,message:s.message}),a.dirty()):s.kind==="ip"?pz(t.data,s.version)||(o=this._getOrReturnCtx(t,o),pe(o,{validation:"ip",code:ue.invalid_string,message:s.message}),a.dirty()):s.kind==="jwt"?mz(t.data,s.alg)||(o=this._getOrReturnCtx(t,o),pe(o,{validation:"jwt",code:ue.invalid_string,message:s.message}),a.dirty()):s.kind==="cidr"?gz(t.data,s.version)||(o=this._getOrReturnCtx(t,o),pe(o,{validation:"cidr",code:ue.invalid_string,message:s.message}),a.dirty()):s.kind==="base64"?cz.test(t.data)||(o=this._getOrReturnCtx(t,o),pe(o,{validation:"base64",code:ue.invalid_string,message:s.message}),a.dirty()):s.kind==="base64url"?uz.test(t.data)||(o=this._getOrReturnCtx(t,o),pe(o,{validation:"base64url",code:ue.invalid_string,message:s.message}),a.dirty()):Xe.assertNever(s);return{status:a.value,value:t.data}}_regex(t,r,a){return this.refinement(o=>t.test(o),{validation:r,code:ue.invalid_string,...xe.errToObj(a)})}_addCheck(t){return new qi({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...xe.errToObj(t)})}url(t){return this._addCheck({kind:"url",...xe.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...xe.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...xe.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...xe.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...xe.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...xe.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...xe.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...xe.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...xe.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...xe.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...xe.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...xe.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(t==null?void 0:t.offset)??!1,local:(t==null?void 0:t.local)??!1,...xe.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...xe.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...xe.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...xe.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r==null?void 0:r.position,...xe.errToObj(r==null?void 0:r.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...xe.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...xe.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...xe.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...xe.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...xe.errToObj(r)})}nonempty(t){return this.min(1,xe.errToObj(t))}trim(){return new qi({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new qi({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new qi({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}}qi.create=e=>new qi({checks:[],typeName:Ne.ZodString,coerce:(e==null?void 0:e.coerce)??!1,...ze(e)});function yz(e,t){const r=(e.toString().split(".")[1]||"").length,a=(t.toString().split(".")[1]||"").length,o=r>a?r:a,s=Number.parseInt(e.toFixed(o).replace(".","")),u=Number.parseInt(t.toFixed(o).replace(".",""));return s%u/10**o}class Qo extends qe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==ge.number){const s=this._getOrReturnCtx(t);return pe(s,{code:ue.invalid_type,expected:ge.number,received:s.parsedType}),Me}let a;const o=new Ft;for(const s of this._def.checks)s.kind==="int"?Xe.isInteger(t.data)||(a=this._getOrReturnCtx(t,a),pe(a,{code:ue.invalid_type,expected:"integer",received:"float",message:s.message}),o.dirty()):s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(a=this._getOrReturnCtx(t,a),pe(a,{code:ue.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(a=this._getOrReturnCtx(t,a),pe(a,{code:ue.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="multipleOf"?yz(t.data,s.value)!==0&&(a=this._getOrReturnCtx(t,a),pe(a,{code:ue.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):s.kind==="finite"?Number.isFinite(t.data)||(a=this._getOrReturnCtx(t,a),pe(a,{code:ue.not_finite,message:s.message}),o.dirty()):Xe.assertNever(s);return{status:o.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,xe.toString(r))}gt(t,r){return this.setLimit("min",t,!1,xe.toString(r))}lte(t,r){return this.setLimit("max",t,!0,xe.toString(r))}lt(t,r){return this.setLimit("max",t,!1,xe.toString(r))}setLimit(t,r,a,o){return new Qo({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:a,message:xe.toString(o)}]})}_addCheck(t){return new Qo({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:xe.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:xe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:xe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:xe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:xe.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:xe.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:xe.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:xe.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:xe.toString(t)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Xe.isInteger(t.value))}get isFinite(){let t=null,r=null;for(const a of this._def.checks){if(a.kind==="finite"||a.kind==="int"||a.kind==="multipleOf")return!0;a.kind==="min"?(r===null||a.value>r)&&(r=a.value):a.kind==="max"&&(t===null||a.value<t)&&(t=a.value)}return Number.isFinite(r)&&Number.isFinite(t)}}Qo.create=e=>new Qo({checks:[],typeName:Ne.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...ze(e)});class As extends qe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==ge.bigint)return this._getInvalidInput(t);let a;const o=new Ft;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(a=this._getOrReturnCtx(t,a),pe(a,{code:ue.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(a=this._getOrReturnCtx(t,a),pe(a,{code:ue.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="multipleOf"?t.data%s.value!==BigInt(0)&&(a=this._getOrReturnCtx(t,a),pe(a,{code:ue.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):Xe.assertNever(s);return{status:o.value,value:t.data}}_getInvalidInput(t){const r=this._getOrReturnCtx(t);return pe(r,{code:ue.invalid_type,expected:ge.bigint,received:r.parsedType}),Me}gte(t,r){return this.setLimit("min",t,!0,xe.toString(r))}gt(t,r){return this.setLimit("min",t,!1,xe.toString(r))}lte(t,r){return this.setLimit("max",t,!0,xe.toString(r))}lt(t,r){return this.setLimit("max",t,!1,xe.toString(r))}setLimit(t,r,a,o){return new As({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:a,message:xe.toString(o)}]})}_addCheck(t){return new As({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:xe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:xe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:xe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:xe.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:xe.toString(r)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}}As.create=e=>new As({checks:[],typeName:Ne.ZodBigInt,coerce:(e==null?void 0:e.coerce)??!1,...ze(e)});class Ib extends qe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ge.boolean){const a=this._getOrReturnCtx(t);return pe(a,{code:ue.invalid_type,expected:ge.boolean,received:a.parsedType}),Me}return Ln(t.data)}}Ib.create=e=>new Ib({typeName:Ne.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...ze(e)});class tf extends qe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ge.date){const s=this._getOrReturnCtx(t);return pe(s,{code:ue.invalid_type,expected:ge.date,received:s.parsedType}),Me}if(Number.isNaN(t.data.getTime())){const s=this._getOrReturnCtx(t);return pe(s,{code:ue.invalid_date}),Me}const a=new Ft;let o;for(const s of this._def.checks)s.kind==="min"?t.data.getTime()<s.value&&(o=this._getOrReturnCtx(t,o),pe(o,{code:ue.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),a.dirty()):s.kind==="max"?t.data.getTime()>s.value&&(o=this._getOrReturnCtx(t,o),pe(o,{code:ue.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),a.dirty()):Xe.assertNever(s);return{status:a.value,value:new Date(t.data.getTime())}}_addCheck(t){return new tf({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:xe.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:xe.toString(r)})}get minDate(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}}tf.create=e=>new tf({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Ne.ZodDate,...ze(e)});class Zb extends qe{_parse(t){if(this._getType(t)!==ge.symbol){const a=this._getOrReturnCtx(t);return pe(a,{code:ue.invalid_type,expected:ge.symbol,received:a.parsedType}),Me}return Ln(t.data)}}Zb.create=e=>new Zb({typeName:Ne.ZodSymbol,...ze(e)});class Xb extends qe{_parse(t){if(this._getType(t)!==ge.undefined){const a=this._getOrReturnCtx(t);return pe(a,{code:ue.invalid_type,expected:ge.undefined,received:a.parsedType}),Me}return Ln(t.data)}}Xb.create=e=>new Xb({typeName:Ne.ZodUndefined,...ze(e)});class Fb extends qe{_parse(t){if(this._getType(t)!==ge.null){const a=this._getOrReturnCtx(t);return pe(a,{code:ue.invalid_type,expected:ge.null,received:a.parsedType}),Me}return Ln(t.data)}}Fb.create=e=>new Fb({typeName:Ne.ZodNull,...ze(e)});class Qb extends qe{constructor(){super(...arguments),this._any=!0}_parse(t){return Ln(t.data)}}Qb.create=e=>new Qb({typeName:Ne.ZodAny,...ze(e)});class Pb extends qe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Ln(t.data)}}Pb.create=e=>new Pb({typeName:Ne.ZodUnknown,...ze(e)});class Vr extends qe{_parse(t){const r=this._getOrReturnCtx(t);return pe(r,{code:ue.invalid_type,expected:ge.never,received:r.parsedType}),Me}}Vr.create=e=>new Vr({typeName:Ne.ZodNever,...ze(e)});class Kb extends qe{_parse(t){if(this._getType(t)!==ge.undefined){const a=this._getOrReturnCtx(t);return pe(a,{code:ue.invalid_type,expected:ge.void,received:a.parsedType}),Me}return Ln(t.data)}}Kb.create=e=>new Kb({typeName:Ne.ZodVoid,...ze(e)});class ui extends qe{_parse(t){const{ctx:r,status:a}=this._processInputParams(t),o=this._def;if(r.parsedType!==ge.array)return pe(r,{code:ue.invalid_type,expected:ge.array,received:r.parsedType}),Me;if(o.exactLength!==null){const u=r.data.length>o.exactLength.value,f=r.data.length<o.exactLength.value;(u||f)&&(pe(r,{code:u?ue.too_big:ue.too_small,minimum:f?o.exactLength.value:void 0,maximum:u?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),a.dirty())}if(o.minLength!==null&&r.data.length<o.minLength.value&&(pe(r,{code:ue.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),a.dirty()),o.maxLength!==null&&r.data.length>o.maxLength.value&&(pe(r,{code:ue.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),a.dirty()),r.common.async)return Promise.all([...r.data].map((u,f)=>o.type._parseAsync(new hi(r,u,r.path,f)))).then(u=>Ft.mergeArray(a,u));const s=[...r.data].map((u,f)=>o.type._parseSync(new hi(r,u,r.path,f)));return Ft.mergeArray(a,s)}get element(){return this._def.type}min(t,r){return new ui({...this._def,minLength:{value:t,message:xe.toString(r)}})}max(t,r){return new ui({...this._def,maxLength:{value:t,message:xe.toString(r)}})}length(t,r){return new ui({...this._def,exactLength:{value:t,message:xe.toString(r)}})}nonempty(t){return this.min(1,t)}}ui.create=(e,t)=>new ui({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ne.ZodArray,...ze(t)});function To(e){if(e instanceof Et){const t={};for(const r in e.shape){const a=e.shape[r];t[r]=Ur.create(To(a))}return new Et({...e._def,shape:()=>t})}else return e instanceof ui?new ui({...e._def,type:To(e.element)}):e instanceof Ur?Ur.create(To(e.unwrap())):e instanceof Ko?Ko.create(To(e.unwrap())):e instanceof Ma?Ma.create(e.items.map(t=>To(t))):e}class Et extends qe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),r=Xe.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==ge.object){const p=this._getOrReturnCtx(t);return pe(p,{code:ue.invalid_type,expected:ge.object,received:p.parsedType}),Me}const{status:a,ctx:o}=this._processInputParams(t),{shape:s,keys:u}=this._getCached(),f=[];if(!(this._def.catchall instanceof Vr&&this._def.unknownKeys==="strip"))for(const p in o.data)u.includes(p)||f.push(p);const h=[];for(const p of u){const y=s[p],g=o.data[p];h.push({key:{status:"valid",value:p},value:y._parse(new hi(o,g,o.path,p)),alwaysSet:p in o.data})}if(this._def.catchall instanceof Vr){const p=this._def.unknownKeys;if(p==="passthrough")for(const y of f)h.push({key:{status:"valid",value:y},value:{status:"valid",value:o.data[y]}});else if(p==="strict")f.length>0&&(pe(o,{code:ue.unrecognized_keys,keys:f}),a.dirty());else if(p!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const p=this._def.catchall;for(const y of f){const g=o.data[y];h.push({key:{status:"valid",value:y},value:p._parse(new hi(o,g,o.path,y)),alwaysSet:y in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const p=[];for(const y of h){const g=await y.key,v=await y.value;p.push({key:g,value:v,alwaysSet:y.alwaysSet})}return p}).then(p=>Ft.mergeObjectSync(a,p)):Ft.mergeObjectSync(a,h)}get shape(){return this._def.shape()}strict(t){return xe.errToObj,new Et({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,a)=>{var s,u;const o=((u=(s=this._def).errorMap)==null?void 0:u.call(s,r,a).message)??a.defaultError;return r.code==="unrecognized_keys"?{message:xe.errToObj(t).message??o}:{message:o}}}:{}})}strip(){return new Et({...this._def,unknownKeys:"strip"})}passthrough(){return new Et({...this._def,unknownKeys:"passthrough"})}extend(t){return new Et({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Et({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ne.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new Et({...this._def,catchall:t})}pick(t){const r={};for(const a of Xe.objectKeys(t))t[a]&&this.shape[a]&&(r[a]=this.shape[a]);return new Et({...this._def,shape:()=>r})}omit(t){const r={};for(const a of Xe.objectKeys(this.shape))t[a]||(r[a]=this.shape[a]);return new Et({...this._def,shape:()=>r})}deepPartial(){return To(this)}partial(t){const r={};for(const a of Xe.objectKeys(this.shape)){const o=this.shape[a];t&&!t[a]?r[a]=o:r[a]=o.optional()}return new Et({...this._def,shape:()=>r})}required(t){const r={};for(const a of Xe.objectKeys(this.shape))if(t&&!t[a])r[a]=this.shape[a];else{let s=this.shape[a];for(;s instanceof Ur;)s=s._def.innerType;r[a]=s}return new Et({...this._def,shape:()=>r})}keyof(){return _S(Xe.objectKeys(this.shape))}}Et.create=(e,t)=>new Et({shape:()=>e,unknownKeys:"strip",catchall:Vr.create(),typeName:Ne.ZodObject,...ze(t)});Et.strictCreate=(e,t)=>new Et({shape:()=>e,unknownKeys:"strict",catchall:Vr.create(),typeName:Ne.ZodObject,...ze(t)});Et.lazycreate=(e,t)=>new Et({shape:e,unknownKeys:"strip",catchall:Vr.create(),typeName:Ne.ZodObject,...ze(t)});class nf extends qe{_parse(t){const{ctx:r}=this._processInputParams(t),a=this._def.options;function o(s){for(const f of s)if(f.result.status==="valid")return f.result;for(const f of s)if(f.result.status==="dirty")return r.common.issues.push(...f.ctx.common.issues),f.result;const u=s.map(f=>new Xi(f.ctx.common.issues));return pe(r,{code:ue.invalid_union,unionErrors:u}),Me}if(r.common.async)return Promise.all(a.map(async s=>{const u={...r,common:{...r.common,issues:[]},parent:null};return{result:await s._parseAsync({data:r.data,path:r.path,parent:u}),ctx:u}})).then(o);{let s;const u=[];for(const h of a){const p={...r,common:{...r.common,issues:[]},parent:null},y=h._parseSync({data:r.data,path:r.path,parent:p});if(y.status==="valid")return y;y.status==="dirty"&&!s&&(s={result:y,ctx:p}),p.common.issues.length&&u.push(p.common.issues)}if(s)return r.common.issues.push(...s.ctx.common.issues),s.result;const f=u.map(h=>new Xi(h));return pe(r,{code:ue.invalid_union,unionErrors:f}),Me}}get options(){return this._def.options}}nf.create=(e,t)=>new nf({options:e,typeName:Ne.ZodUnion,...ze(t)});function pm(e,t){const r=jr(e),a=jr(t);if(e===t)return{valid:!0,data:e};if(r===ge.object&&a===ge.object){const o=Xe.objectKeys(t),s=Xe.objectKeys(e).filter(f=>o.indexOf(f)!==-1),u={...e,...t};for(const f of s){const h=pm(e[f],t[f]);if(!h.valid)return{valid:!1};u[f]=h.data}return{valid:!0,data:u}}else if(r===ge.array&&a===ge.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let s=0;s<e.length;s++){const u=e[s],f=t[s],h=pm(u,f);if(!h.valid)return{valid:!1};o.push(h.data)}return{valid:!0,data:o}}else return r===ge.date&&a===ge.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class rf extends qe{_parse(t){const{status:r,ctx:a}=this._processInputParams(t),o=(s,u)=>{if(Vb(s)||Vb(u))return Me;const f=pm(s.value,u.value);return f.valid?((qb(s)||qb(u))&&r.dirty(),{status:r.value,value:f.data}):(pe(a,{code:ue.invalid_intersection_types}),Me)};return a.common.async?Promise.all([this._def.left._parseAsync({data:a.data,path:a.path,parent:a}),this._def.right._parseAsync({data:a.data,path:a.path,parent:a})]).then(([s,u])=>o(s,u)):o(this._def.left._parseSync({data:a.data,path:a.path,parent:a}),this._def.right._parseSync({data:a.data,path:a.path,parent:a}))}}rf.create=(e,t,r)=>new rf({left:e,right:t,typeName:Ne.ZodIntersection,...ze(r)});class Ma extends qe{_parse(t){const{status:r,ctx:a}=this._processInputParams(t);if(a.parsedType!==ge.array)return pe(a,{code:ue.invalid_type,expected:ge.array,received:a.parsedType}),Me;if(a.data.length<this._def.items.length)return pe(a,{code:ue.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Me;!this._def.rest&&a.data.length>this._def.items.length&&(pe(a,{code:ue.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const s=[...a.data].map((u,f)=>{const h=this._def.items[f]||this._def.rest;return h?h._parse(new hi(a,u,a.path,f)):null}).filter(u=>!!u);return a.common.async?Promise.all(s).then(u=>Ft.mergeArray(r,u)):Ft.mergeArray(r,s)}get items(){return this._def.items}rest(t){return new Ma({...this._def,rest:t})}}Ma.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ma({items:e,typeName:Ne.ZodTuple,rest:null,...ze(t)})};class af extends qe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:a}=this._processInputParams(t);if(a.parsedType!==ge.object)return pe(a,{code:ue.invalid_type,expected:ge.object,received:a.parsedType}),Me;const o=[],s=this._def.keyType,u=this._def.valueType;for(const f in a.data)o.push({key:s._parse(new hi(a,f,a.path,f)),value:u._parse(new hi(a,a.data[f],a.path,f)),alwaysSet:f in a.data});return a.common.async?Ft.mergeObjectAsync(r,o):Ft.mergeObjectSync(r,o)}get element(){return this._def.valueType}static create(t,r,a){return r instanceof qe?new af({keyType:t,valueType:r,typeName:Ne.ZodRecord,...ze(a)}):new af({keyType:qi.create(),valueType:t,typeName:Ne.ZodRecord,...ze(r)})}}class Wb extends qe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:a}=this._processInputParams(t);if(a.parsedType!==ge.map)return pe(a,{code:ue.invalid_type,expected:ge.map,received:a.parsedType}),Me;const o=this._def.keyType,s=this._def.valueType,u=[...a.data.entries()].map(([f,h],p)=>({key:o._parse(new hi(a,f,a.path,[p,"key"])),value:s._parse(new hi(a,h,a.path,[p,"value"]))}));if(a.common.async){const f=new Map;return Promise.resolve().then(async()=>{for(const h of u){const p=await h.key,y=await h.value;if(p.status==="aborted"||y.status==="aborted")return Me;(p.status==="dirty"||y.status==="dirty")&&r.dirty(),f.set(p.value,y.value)}return{status:r.value,value:f}})}else{const f=new Map;for(const h of u){const p=h.key,y=h.value;if(p.status==="aborted"||y.status==="aborted")return Me;(p.status==="dirty"||y.status==="dirty")&&r.dirty(),f.set(p.value,y.value)}return{status:r.value,value:f}}}}Wb.create=(e,t,r)=>new Wb({valueType:t,keyType:e,typeName:Ne.ZodMap,...ze(r)});class Ns extends qe{_parse(t){const{status:r,ctx:a}=this._processInputParams(t);if(a.parsedType!==ge.set)return pe(a,{code:ue.invalid_type,expected:ge.set,received:a.parsedType}),Me;const o=this._def;o.minSize!==null&&a.data.size<o.minSize.value&&(pe(a,{code:ue.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),r.dirty()),o.maxSize!==null&&a.data.size>o.maxSize.value&&(pe(a,{code:ue.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),r.dirty());const s=this._def.valueType;function u(h){const p=new Set;for(const y of h){if(y.status==="aborted")return Me;y.status==="dirty"&&r.dirty(),p.add(y.value)}return{status:r.value,value:p}}const f=[...a.data.values()].map((h,p)=>s._parse(new hi(a,h,a.path,p)));return a.common.async?Promise.all(f).then(h=>u(h)):u(f)}min(t,r){return new Ns({...this._def,minSize:{value:t,message:xe.toString(r)}})}max(t,r){return new Ns({...this._def,maxSize:{value:t,message:xe.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}}Ns.create=(e,t)=>new Ns({valueType:e,minSize:null,maxSize:null,typeName:Ne.ZodSet,...ze(t)});class Jb extends qe{get schema(){return this._def.getter()}_parse(t){const{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}Jb.create=(e,t)=>new Jb({getter:e,typeName:Ne.ZodLazy,...ze(t)});class e1 extends qe{_parse(t){if(t.data!==this._def.value){const r=this._getOrReturnCtx(t);return pe(r,{received:r.data,code:ue.invalid_literal,expected:this._def.value}),Me}return{status:"valid",value:t.data}}get value(){return this._def.value}}e1.create=(e,t)=>new e1({value:e,typeName:Ne.ZodLiteral,...ze(t)});function _S(e,t){return new Po({values:e,typeName:Ne.ZodEnum,...ze(t)})}class Po extends qe{_parse(t){if(typeof t.data!="string"){const r=this._getOrReturnCtx(t),a=this._def.values;return pe(r,{expected:Xe.joinValues(a),received:r.parsedType,code:ue.invalid_type}),Me}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const r=this._getOrReturnCtx(t),a=this._def.values;return pe(r,{received:r.data,code:ue.invalid_enum_value,options:a}),Me}return Ln(t.data)}get options(){return this._def.values}get enum(){const t={};for(const r of this._def.values)t[r]=r;return t}get Values(){const t={};for(const r of this._def.values)t[r]=r;return t}get Enum(){const t={};for(const r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return Po.create(t,{...this._def,...r})}exclude(t,r=this._def){return Po.create(this.options.filter(a=>!t.includes(a)),{...this._def,...r})}}Po.create=_S;class t1 extends qe{_parse(t){const r=Xe.getValidEnumValues(this._def.values),a=this._getOrReturnCtx(t);if(a.parsedType!==ge.string&&a.parsedType!==ge.number){const o=Xe.objectValues(r);return pe(a,{expected:Xe.joinValues(o),received:a.parsedType,code:ue.invalid_type}),Me}if(this._cache||(this._cache=new Set(Xe.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const o=Xe.objectValues(r);return pe(a,{received:a.data,code:ue.invalid_enum_value,options:o}),Me}return Ln(t.data)}get enum(){return this._def.values}}t1.create=(e,t)=>new t1({values:e,typeName:Ne.ZodNativeEnum,...ze(t)});class of extends qe{unwrap(){return this._def.type}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==ge.promise&&r.common.async===!1)return pe(r,{code:ue.invalid_type,expected:ge.promise,received:r.parsedType}),Me;const a=r.parsedType===ge.promise?r.data:Promise.resolve(r.data);return Ln(a.then(o=>this._def.type.parseAsync(o,{path:r.path,errorMap:r.common.contextualErrorMap})))}}of.create=(e,t)=>new of({type:e,typeName:Ne.ZodPromise,...ze(t)});class Oa extends qe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ne.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:r,ctx:a}=this._processInputParams(t),o=this._def.effect||null,s={addIssue:u=>{pe(a,u),u.fatal?r.abort():r.dirty()},get path(){return a.path}};if(s.addIssue=s.addIssue.bind(s),o.type==="preprocess"){const u=o.transform(a.data,s);if(a.common.async)return Promise.resolve(u).then(async f=>{if(r.value==="aborted")return Me;const h=await this._def.schema._parseAsync({data:f,path:a.path,parent:a});return h.status==="aborted"?Me:h.status==="dirty"||r.value==="dirty"?us(h.value):h});{if(r.value==="aborted")return Me;const f=this._def.schema._parseSync({data:u,path:a.path,parent:a});return f.status==="aborted"?Me:f.status==="dirty"||r.value==="dirty"?us(f.value):f}}if(o.type==="refinement"){const u=f=>{const h=o.refinement(f,s);if(a.common.async)return Promise.resolve(h);if(h instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return f};if(a.common.async===!1){const f=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});return f.status==="aborted"?Me:(f.status==="dirty"&&r.dirty(),u(f.value),{status:r.value,value:f.value})}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(f=>f.status==="aborted"?Me:(f.status==="dirty"&&r.dirty(),u(f.value).then(()=>({status:r.value,value:f.value}))))}if(o.type==="transform")if(a.common.async===!1){const u=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});if(!Fo(u))return Me;const f=o.transform(u.value,s);if(f instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:f}}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(u=>Fo(u)?Promise.resolve(o.transform(u.value,s)).then(f=>({status:r.value,value:f})):Me);Xe.assertNever(o)}}Oa.create=(e,t,r)=>new Oa({schema:e,typeName:Ne.ZodEffects,effect:t,...ze(r)});Oa.createWithPreprocess=(e,t,r)=>new Oa({schema:t,effect:{type:"preprocess",transform:e},typeName:Ne.ZodEffects,...ze(r)});class Ur extends qe{_parse(t){return this._getType(t)===ge.undefined?Ln(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ur.create=(e,t)=>new Ur({innerType:e,typeName:Ne.ZodOptional,...ze(t)});class Ko extends qe{_parse(t){return this._getType(t)===ge.null?Ln(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ko.create=(e,t)=>new Ko({innerType:e,typeName:Ne.ZodNullable,...ze(t)});class mm extends qe{_parse(t){const{ctx:r}=this._processInputParams(t);let a=r.data;return r.parsedType===ge.undefined&&(a=this._def.defaultValue()),this._def.innerType._parse({data:a,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}mm.create=(e,t)=>new mm({innerType:e,typeName:Ne.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...ze(t)});class gm extends qe{_parse(t){const{ctx:r}=this._processInputParams(t),a={...r,common:{...r.common,issues:[]}},o=this._def.innerType._parse({data:a.data,path:a.path,parent:{...a}});return ef(o)?o.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Xi(a.common.issues)},input:a.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Xi(a.common.issues)},input:a.data})}}removeCatch(){return this._def.innerType}}gm.create=(e,t)=>new gm({innerType:e,typeName:Ne.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...ze(t)});class n1 extends qe{_parse(t){if(this._getType(t)!==ge.nan){const a=this._getOrReturnCtx(t);return pe(a,{code:ue.invalid_type,expected:ge.nan,received:a.parsedType}),Me}return{status:"valid",value:t.data}}}n1.create=e=>new n1({typeName:Ne.ZodNaN,...ze(e)});class vz extends qe{_parse(t){const{ctx:r}=this._processInputParams(t),a=r.data;return this._def.type._parse({data:a,path:r.path,parent:r})}unwrap(){return this._def.type}}class Km extends qe{_parse(t){const{status:r,ctx:a}=this._processInputParams(t);if(a.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:a.data,path:a.path,parent:a});return s.status==="aborted"?Me:s.status==="dirty"?(r.dirty(),us(s.value)):this._def.out._parseAsync({data:s.value,path:a.path,parent:a})})();{const o=this._def.in._parseSync({data:a.data,path:a.path,parent:a});return o.status==="aborted"?Me:o.status==="dirty"?(r.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:a.path,parent:a})}}static create(t,r){return new Km({in:t,out:r,typeName:Ne.ZodPipeline})}}class ym extends qe{_parse(t){const r=this._def.innerType._parse(t),a=o=>(Fo(o)&&(o.value=Object.freeze(o.value)),o);return ef(r)?r.then(o=>a(o)):a(r)}unwrap(){return this._def.innerType}}ym.create=(e,t)=>new ym({innerType:e,typeName:Ne.ZodReadonly,...ze(t)});var Ne;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Ne||(Ne={}));const an=qi.create,xz=Qo.create;Vr.create;const Tp=ui.create,Mf=Et.create;nf.create;rf.create;Ma.create;const SS=af.create,ES=Po.create;of.create;Ur.create;Ko.create;const CS=Oa.createWithPreprocess;var bz=ES(["before_done"]),wz=ES(["file_exists","file_contains","env_var_set","shell_returns_0"]),_z=Mf({id:an().min(1),operator:wz,path:an().optional(),contains:an().optional(),envVar:an().optional(),cmd:an().optional()});function AS(e){if(e==null||typeof e!="object")return e;const r={...e};if("trigger"in r&&!("on"in r)&&!("when"in r)){const{trigger:a}=r;delete r.trigger;const o=a;o.type!=="always"&&(r.when=o.type==="custom"?o.pattern:o.type)}return"manual"in r&&!("prompt"in r)&&(r.prompt=r.manual,delete r.manual),r}function Sz(e){if(e==null||typeof e!="object")return e;const r={...e},a=s=>Array.isArray(r[s])?r[s]:[],o=[...a("checks"),...a("task"),...a("prompt"),...a("deterministic"),...a("manual")].map(AS);return("checks"in r||"task"in r||"prompt"in r||"deterministic"in r||"manual"in r)&&(r.checks=o,delete r.task,delete r.prompt,delete r.deterministic,delete r.manual),r}var Ez=CS(AS,Mf({id:an().min(1),label:an().min(1),on:bz.optional(),when:an().optional(),cmd:an().optional(),prompt:an().optional(),conditionId:an().optional()}).refine(e=>e.cmd!==void 0||e.prompt!==void 0,{message:"A check must have either cmd (task) or prompt (agent instruction)"})),Cz=Mf({guides:SS(an()).default({})}),Az=new Set(["frontend","backend","socket","visual","python","go","rust","java","ruby","database","prisma","testing","infra","ci","docs","structural"]),Nz=CS(Sz,Mf({version:xz().int().positive().default(1),context:Cz.default({guides:{}}),conditions:Tp(_z).default([]),checks:Tp(Ez).default([]),patterns:SS(an()).optional(),session_context_files:Tp(an()).optional()}).superRefine((e,t)=>{if(e.patterns)for(const[r,a]of Object.entries(e.patterns)){Az.has(r)&&t.addIssue({code:ue.custom,message:`'${r}' is a built-in scope name and cannot be redefined in patterns`,path:["patterns",r]});try{new RegExp(a)}catch{t.addIssue({code:ue.custom,message:`Invalid regex in patterns.${r}: '${a}'`,path:["patterns",r]})}}}));function NS(e){const t=Ij(e),r=Nz.safeParse(t);if(!r.success){const a=r.error.errors.map(o=>`${o.path.join(".")}: ${o.message}`).join(`
|
|
103
|
+
`);throw new Error(`Invalid checks.yaml:
|
|
104
|
+
${a}`)}return r.data}function vm(e){return Zj(e,{indent:2,lineWidth:120,quotingType:'"',forceQuotes:!1,noRefs:!0})}const Tz={before_done:"task complete",before_commit:"before commit",on_complete:"on complete"};function TS(e){return Tz[e]??e}let Mz=0;function Mp(e){return`${e}-${++Mz}`}function i1(e){const t=[],r=[],a=e.checks,o=new Map;for(const u of a){const f=u.on??"before_done";o.has(f)||o.set(f,[]),o.get(f).push(u)}let s=50;for(const[u,f]of o){const h=Mp("trigger");t.push({id:h,type:"trigger",position:{x:50,y:s},data:{kind:"trigger",label:TS(u),on:u}});const p=new Map;for(const g of f){const v=g.when??"";p.has(v)||p.set(v,[]),p.get(v).push(g)}let y=s;for(const[g,v]of p){let x=h;if(g!==""){const w=Mp("filter");t.push({id:w,type:"filter",position:{x:230,y},data:{kind:"filter",label:g,when:g}}),r.push({id:`e-${h}-${w}`,source:h,target:w,animated:!1}),x=w}let b=y;for(const w of v){const E=!!w.cmd,C=Mp(E?"task":"prompt");t.push({id:C,type:E?"task":"prompt",position:{x:g!==""?450:350,y:b},data:{kind:E?"task":"prompt",label:w.label,...w.on!==void 0?{on:w.on}:{},...w.cmd!==void 0?{cmd:w.cmd}:{},...w.prompt!==void 0?{prompt:w.prompt}:{},...w.conditionId!==void 0?{conditionId:w.conditionId}:{}}}),r.push({id:`e-${x}-${C}`,source:x,target:C,animated:!0}),b+=160}y=Math.max(y+v.length*160,y+200)}s=Math.max(y+60,s+f.length*130+100)}return{nodes:t,edges:r}}function Oz(e,t,r){const a=new Map(e.map(p=>[p.id,p])),o=new Map;for(const p of t)o.set(p.target,p.source);function s(p){const y=o.get(p);if(!y)return{};const g=a.get(y);if(!g)return{};if(g.data.kind==="filter"){const v=o.get(y),x=v?a.get(v):void 0;return{...(x==null?void 0:x.data.on)!==void 0?{on:x.data.on}:{},...g.data.when!==void 0?{when:g.data.when}:{}}}return g.data.kind==="trigger"?{...g.data.on!==void 0?{on:g.data.on}:{}}:{}}const u=e.filter(p=>p.data.kind==="condition"&&p.data.condition).map(p=>p.data.condition),h=e.filter(p=>p.data.kind==="task"||p.data.kind==="prompt").map((p,y)=>{const g=s(p.id);return{id:`check-${y+1}`,label:p.data.label,...g.on!==void 0?{on:g.on}:{},...g.when!==void 0?{when:g.when}:{},...p.data.cmd!==void 0?{cmd:p.data.cmd}:{},...p.data.prompt!==void 0?{prompt:p.data.prompt}:{},...p.data.conditionId!==void 0?{conditionId:p.data.conditionId}:{}}});return{version:1,context:{guides:{}},conditions:u,checks:h,...r&&Object.keys(r).length>0?{patterns:r}:{}}}function kz(e,t){const r=new Map(e.map(s=>[s.id,s])),a=new Map;for(const s of t)a.set(s.target,s.source);function o(s){const u=a.get(s);if(!u)return{};const f=r.get(u);if(!f)return{};if(f.data.kind==="filter"){const h=a.get(u),p=h?r.get(h):void 0;return{...(p==null?void 0:p.data.on)!==void 0?{on:p.data.on}:{},...f.data.when!==void 0?{when:f.data.when}:{}}}return f.data.kind==="trigger"?{...f.data.on!==void 0?{on:f.data.on}:{}}:{}}return e.filter(s=>s.data.kind==="task"||s.data.kind==="prompt").map((s,u)=>{const f=o(s.id);return{nodeId:s.id,check:{id:`check-${u+1}`,label:s.data.label,...f.on!==void 0?{on:f.on}:{},...f.when!==void 0?{when:f.when}:{},...s.data.cmd!==void 0?{cmd:s.data.cmd}:{},...s.data.prompt!==void 0?{prompt:s.data.prompt}:{},...s.data.conditionId!==void 0?{conditionId:s.data.conditionId}:{}}}})}const Fi=p4((e,t)=>({nodes:[],edges:[],selectedNodeId:null,yaml:"",setNodes:r=>e({nodes:r}),setEdges:r=>e({edges:r}),addNode:r=>e(a=>({nodes:[...a.nodes,r]})),updateNode:(r,a)=>e(o=>({nodes:o.nodes.map(s=>s.id===r?{...s,data:{...s.data,...a}}:s)})),deleteNode:r=>e(a=>({nodes:a.nodes.filter(o=>o.id!==r),edges:a.edges.filter(o=>o.source!==r&&o.target!==r),selectedNodeId:a.selectedNodeId===r?null:a.selectedNodeId})),selectNode:r=>e({selectedNodeId:r}),updateCheckNode:(r,a)=>{const{nodes:o,edges:s}=t();let u=o.map(f=>{if(f.id!==r)return f;const h=a.type??f.type,p=a.type!==void 0&&a.type!==f.type,y={...f.data};return a.label!==void 0&&(y.label=a.label),a.conditionId!==void 0&&(a.conditionId?y.conditionId=a.conditionId:delete y.conditionId),p?(y.kind=h,h==="task"?(y.cmd=a.cmd??"",delete y.prompt):(y.prompt=a.prompt??"",delete y.cmd)):(a.cmd!==void 0&&(y.cmd=a.cmd),a.prompt!==void 0&&(y.prompt=a.prompt)),{...f,type:h,data:y}});if(a.when!==void 0&&a.hookEvent){const f=a.when||void 0;let h=s.filter(y=>y.target!==r);const p=u.find(y=>y.data.kind==="trigger"&&(y.data.on??"before_done")===a.hookEvent);if(p){let y=p.id;if(f){const g=new Set(h.filter(x=>x.source===p.id).map(x=>x.target)),v=u.find(x=>g.has(x.id)&&x.data.kind==="filter"&&x.data.when===f);if(v)y=v.id;else{const x=`filter-${Date.now()}`,b=u.filter(w=>w.data.kind==="filter").length;u=[...u,{id:x,type:"filter",position:{x:230,y:p.position.y+b*80},data:{kind:"filter",label:f,when:f}}],h=[...h,{id:`e-${p.id}-${x}`,source:p.id,target:x,animated:!1}],y=x}}h=[...h,{id:`e-${y}-${r}`,source:y,target:r,animated:!0}],e({nodes:u,edges:h});return}}e({nodes:u})},addCheckToGroup:(r,a,o,s)=>{const{nodes:u,edges:f}=t();let h=[...u],p=[...f],y=h.find(b=>b.data.kind==="trigger"&&(b.data.on??"before_done")===r);if(!y){const b=h.reduce((E,C)=>Math.max(E,C.position.y),0);y={id:`trigger-${Date.now()}`,type:"trigger",position:{x:50,y:b+120},data:{kind:"trigger",label:TS(r),on:r}},h=[...h,y]}let g=y.id;if(a){const b=new Set(p.filter(E=>E.source===y.id).map(E=>E.target)),w=h.find(E=>b.has(E.id)&&E.data.kind==="filter"&&E.data.when===a);if(w)g=w.id;else{const E=`filter-${Date.now()+1}`,C=h.filter(N=>N.data.kind==="filter").length;h=[...h,{id:E,type:"filter",position:{x:230,y:y.position.y+C*80},data:{kind:"filter",label:a,when:a}}],p=[...p,{id:`e-${y.id}-${E}`,source:y.id,target:E,animated:!1}],g=E}}const v=`${o}-${Date.now()+2}`,x=h.filter(b=>b.data.kind==="task"||b.data.kind==="prompt").length;h=[...h,{id:v,type:o,position:{x:a?450:350,y:y.position.y+x*30},data:{kind:o,label:s.label,...o==="task"?{cmd:s.cmd??""}:{prompt:s.prompt??""},...s.conditionId?{conditionId:s.conditionId}:{}}}],p=[...p,{id:`e-${g}-${v}`,source:g,target:v,animated:!0}],e({nodes:h,edges:p})},exportYaml:()=>{const{nodes:r,edges:a,storedPatterns:o}=t(),s=Oz(r,a,o),u=vm(s);return e({yaml:u}),u},loadFromYaml:r=>{try{const a=NS(r),{nodes:o,edges:s}=i1(a);e({nodes:o,edges:s,yaml:r,...a.patterns?{storedPatterns:a.patterns}:{}})}catch(a){console.error("Failed to load YAML:",a)}},loadTemplate:r=>{const{nodes:a,edges:o}=i1(r);e({nodes:a,edges:o,yaml:vm(r),...r.patterns?{storedPatterns:r.patterns}:{}})}})),Rz={trigger:o4,filter:c4,task:l4,prompt:s4,condition:u4};function Dz(){const{nodes:e,edges:t,selectNode:r}=Fi(),[a,o,s]=Vk(e),[u,f,h]=qk(t),{fitView:p}=Sf();Ve.useEffect(()=>{o(e)},[e,o]),Ve.useEffect(()=>{f(t)},[t,f]);const y=Ve.useRef(0);Ve.useEffect(()=>{e.length>0&&y.current===0&&setTimeout(()=>p({padding:.15,duration:400}),50),y.current=e.length},[e.length,p]);const g=O.useCallback(b=>{f(w=>Ow({...b,animated:!0},w))},[f]),v=O.useCallback((b,w)=>{r(w.id)},[r]),x=O.useCallback(()=>{r(null)},[r]);return S.jsx("div",{className:"h-full w-full",children:S.jsxs($k,{nodes:a,edges:u,onNodesChange:s,onEdgesChange:h,onConnect:g,onNodeClick:v,onPaneClick:x,nodeTypes:Rz,fitView:!0,className:"bg-canvas",children:[S.jsx(Fk,{variant:Gi.Dots,gap:20,size:1.5,color:"#1F252E"}),S.jsx(tR,{}),S.jsx(pR,{nodeColor:b=>{switch(b.type){case"trigger":return"#E04E2A";case"filter":return"#0EA5E9";case"task":return"#22C55E";case"prompt":return"#F59E0B";case"condition":return"#EAB308";default:return"#334155"}},maskColor:"rgba(11, 15, 20, 0.7)"})]})})}/**
|
|
105
|
+
* @license lucide-react v0.468.0 - ISC
|
|
106
|
+
*
|
|
107
|
+
* This source code is licensed under the ISC license.
|
|
108
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
109
|
+
*/const jz=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),MS=(...e)=>e.filter((t,r,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===r).join(" ").trim();/**
|
|
110
|
+
* @license lucide-react v0.468.0 - ISC
|
|
111
|
+
*
|
|
112
|
+
* This source code is licensed under the ISC license.
|
|
113
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
114
|
+
*/var zz={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"};/**
|
|
115
|
+
* @license lucide-react v0.468.0 - ISC
|
|
116
|
+
*
|
|
117
|
+
* This source code is licensed under the ISC license.
|
|
118
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
119
|
+
*/const Lz=O.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:a,className:o="",children:s,iconNode:u,...f},h)=>O.createElement("svg",{ref:h,...zz,width:t,height:t,stroke:e,strokeWidth:a?Number(r)*24/Number(t):r,className:MS("lucide",o),...f},[...u.map(([p,y])=>O.createElement(p,y)),...Array.isArray(s)?s:[s]]));/**
|
|
120
|
+
* @license lucide-react v0.468.0 - ISC
|
|
121
|
+
*
|
|
122
|
+
* This source code is licensed under the ISC license.
|
|
123
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
124
|
+
*/const un=(e,t)=>{const r=O.forwardRef(({className:a,...o},s)=>O.createElement(Lz,{ref:s,iconNode:t,className:MS(`lucide-${jz(e)}`,a),...o}));return r.displayName=`${e}`,r};/**
|
|
125
|
+
* @license lucide-react v0.468.0 - ISC
|
|
126
|
+
*
|
|
127
|
+
* This source code is licensed under the ISC license.
|
|
128
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
129
|
+
*/const Hz=un("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
130
|
+
* @license lucide-react v0.468.0 - ISC
|
|
131
|
+
*
|
|
132
|
+
* This source code is licensed under the ISC license.
|
|
133
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
134
|
+
*/const Bz=un("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"}]]);/**
|
|
135
|
+
* @license lucide-react v0.468.0 - ISC
|
|
136
|
+
*
|
|
137
|
+
* This source code is licensed under the ISC license.
|
|
138
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
139
|
+
*/const Uz=un("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"}]]);/**
|
|
140
|
+
* @license lucide-react v0.468.0 - ISC
|
|
141
|
+
*
|
|
142
|
+
* This source code is licensed under the ISC license.
|
|
143
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
144
|
+
*/const Yz=un("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/**
|
|
145
|
+
* @license lucide-react v0.468.0 - ISC
|
|
146
|
+
*
|
|
147
|
+
* This source code is licensed under the ISC license.
|
|
148
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
149
|
+
*/const $z=un("LayoutList",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}],["path",{d:"M14 4h7",key:"3xa0d5"}],["path",{d:"M14 9h7",key:"1icrd9"}],["path",{d:"M14 15h7",key:"1mj8o2"}],["path",{d:"M14 20h7",key:"11slyb"}]]);/**
|
|
150
|
+
* @license lucide-react v0.468.0 - ISC
|
|
151
|
+
*
|
|
152
|
+
* This source code is licensed under the ISC license.
|
|
153
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
154
|
+
*/const OS=un("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"}]]);/**
|
|
155
|
+
* @license lucide-react v0.468.0 - ISC
|
|
156
|
+
*
|
|
157
|
+
* This source code is licensed under the ISC license.
|
|
158
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
159
|
+
*/const Vz=un("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/**
|
|
160
|
+
* @license lucide-react v0.468.0 - ISC
|
|
161
|
+
*
|
|
162
|
+
* This source code is licensed under the ISC license.
|
|
163
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
164
|
+
*/const Ru=un("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
165
|
+
* @license lucide-react v0.468.0 - ISC
|
|
166
|
+
*
|
|
167
|
+
* This source code is licensed under the ISC license.
|
|
168
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
169
|
+
*/const qz=un("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"}]]);/**
|
|
170
|
+
* @license lucide-react v0.468.0 - ISC
|
|
171
|
+
*
|
|
172
|
+
* This source code is licensed under the ISC license.
|
|
173
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
174
|
+
*/const kS=un("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
|
|
175
|
+
* @license lucide-react v0.468.0 - ISC
|
|
176
|
+
*
|
|
177
|
+
* This source code is licensed under the ISC license.
|
|
178
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
179
|
+
*/const RS=un("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"}]]);/**
|
|
180
|
+
* @license lucide-react v0.468.0 - ISC
|
|
181
|
+
*
|
|
182
|
+
* This source code is licensed under the ISC license.
|
|
183
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
184
|
+
*/const Gz=un("Workflow",[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]]);/**
|
|
185
|
+
* @license lucide-react v0.468.0 - ISC
|
|
186
|
+
*
|
|
187
|
+
* This source code is licensed under the ISC license.
|
|
188
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
189
|
+
*/const DS=un("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
|
|
190
|
+
* @license lucide-react v0.468.0 - ISC
|
|
191
|
+
*
|
|
192
|
+
* This source code is licensed under the ISC license.
|
|
193
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
194
|
+
*/const r1=un("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);function on(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function a1(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function jS(...e){return t=>{let r=!1;const a=e.map(o=>{const s=a1(o,t);return!r&&typeof s=="function"&&(r=!0),s});if(r)return()=>{for(let o=0;o<a.length;o++){const s=a[o];typeof s=="function"?s():a1(e[o],null)}}}}function Qn(...e){return O.useCallback(jS(...e),e)}function Iz(e,t){const r=O.createContext(t),a=s=>{const{children:u,...f}=s,h=O.useMemo(()=>f,Object.values(f));return S.jsx(r.Provider,{value:h,children:u})};a.displayName=e+"Provider";function o(s){const u=O.useContext(r);if(u)return u;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[a,o]}function Wm(e,t=[]){let r=[];function a(s,u){const f=O.createContext(u),h=r.length;r=[...r,u];const p=g=>{var C;const{scope:v,children:x,...b}=g,w=((C=v==null?void 0:v[e])==null?void 0:C[h])||f,E=O.useMemo(()=>b,Object.values(b));return S.jsx(w.Provider,{value:E,children:x})};p.displayName=s+"Provider";function y(g,v){var w;const x=((w=v==null?void 0:v[e])==null?void 0:w[h])||f,b=O.useContext(x);if(b)return b;if(u!==void 0)return u;throw new Error(`\`${g}\` must be used within \`${s}\``)}return[p,y]}const o=()=>{const s=r.map(u=>O.createContext(u));return function(f){const h=(f==null?void 0:f[e])||s;return O.useMemo(()=>({[`__scope${e}`]:{...f,[e]:h}}),[f,h])}};return o.scopeName=e,[a,Zz(o,...t)]}function Zz(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const a=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const u=a.reduce((f,{useScope:h,scopeName:p})=>{const g=h(s)[`__scope${p}`];return{...f,...g}},{});return O.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])}};return r.scopeName=t.scopeName,r}function zS(e){const t=Xz(e),r=O.forwardRef((a,o)=>{const{children:s,...u}=a,f=O.Children.toArray(s),h=f.find(Qz);if(h){const p=h.props.children,y=f.map(g=>g===h?O.Children.count(p)>1?O.Children.only(null):O.isValidElement(p)?p.props.children:null:g);return S.jsx(t,{...u,ref:o,children:O.isValidElement(p)?O.cloneElement(p,void 0,y):null})}return S.jsx(t,{...u,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}function Xz(e){const t=O.forwardRef((r,a)=>{const{children:o,...s}=r;if(O.isValidElement(o)){const u=Kz(o),f=Pz(s,o.props);return o.type!==O.Fragment&&(f.ref=a?jS(a,u):u),O.cloneElement(o,f)}return O.Children.count(o)>1?O.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var LS=Symbol("radix.slottable");function Fz(e){const t=({children:r})=>S.jsx(S.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=LS,t}function Qz(e){return O.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===LS}function Pz(e,t){const r={...t};for(const a in t){const o=e[a],s=t[a];/^on[A-Z]/.test(a)?o&&s?r[a]=(...f)=>{const h=s(...f);return o(...f),h}:o&&(r[a]=o):a==="style"?r[a]={...o,...s}:a==="className"&&(r[a]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function Kz(e){var a,o;let t=(a=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Wz=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],fn=Wz.reduce((e,t)=>{const r=zS(`Primitive.${t}`),a=O.forwardRef((o,s)=>{const{asChild:u,...f}=o,h=u?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),S.jsx(h,{...f,ref:s})});return a.displayName=`Primitive.${t}`,{...e,[t]:a}},{});function Jz(e,t){e&&Vm.flushSync(()=>e.dispatchEvent(t))}function Wo(e){const t=O.useRef(e);return O.useEffect(()=>{t.current=e}),O.useMemo(()=>(...r)=>{var a;return(a=t.current)==null?void 0:a.call(t,...r)},[])}function e6(e,t=globalThis==null?void 0:globalThis.document){const r=Wo(e);O.useEffect(()=>{const a=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",a,{capture:!0}),()=>t.removeEventListener("keydown",a,{capture:!0})},[r,t])}var t6="DismissableLayer",xm="dismissableLayer.update",n6="dismissableLayer.pointerDownOutside",i6="dismissableLayer.focusOutside",o1,HS=O.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Jm=O.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:u,onDismiss:f,...h}=e,p=O.useContext(HS),[y,g]=O.useState(null),v=(y==null?void 0:y.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,x]=O.useState({}),b=Qn(t,j=>g(j)),w=Array.from(p.layers),[E]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),C=w.indexOf(E),N=y?w.indexOf(y):-1,A=p.layersWithOutsidePointerEventsDisabled.size>0,T=N>=C,D=o6(j=>{const I=j.target,Z=[...p.branches].some(te=>te.contains(I));!T||Z||(o==null||o(j),u==null||u(j),j.defaultPrevented||f==null||f())},v),L=l6(j=>{const I=j.target;[...p.branches].some(te=>te.contains(I))||(s==null||s(j),u==null||u(j),j.defaultPrevented||f==null||f())},v);return e6(j=>{N===p.layers.size-1&&(a==null||a(j),!j.defaultPrevented&&f&&(j.preventDefault(),f()))},v),O.useEffect(()=>{if(y)return r&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(o1=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(y)),p.layers.add(y),l1(),()=>{r&&p.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=o1)}},[y,v,r,p]),O.useEffect(()=>()=>{y&&(p.layers.delete(y),p.layersWithOutsidePointerEventsDisabled.delete(y),l1())},[y,p]),O.useEffect(()=>{const j=()=>x({});return document.addEventListener(xm,j),()=>document.removeEventListener(xm,j)},[]),S.jsx(fn.div,{...h,ref:b,style:{pointerEvents:A?T?"auto":"none":void 0,...e.style},onFocusCapture:on(e.onFocusCapture,L.onFocusCapture),onBlurCapture:on(e.onBlurCapture,L.onBlurCapture),onPointerDownCapture:on(e.onPointerDownCapture,D.onPointerDownCapture)})});Jm.displayName=t6;var r6="DismissableLayerBranch",a6=O.forwardRef((e,t)=>{const r=O.useContext(HS),a=O.useRef(null),o=Qn(t,a);return O.useEffect(()=>{const s=a.current;if(s)return r.branches.add(s),()=>{r.branches.delete(s)}},[r.branches]),S.jsx(fn.div,{...e,ref:o})});a6.displayName=r6;function o6(e,t=globalThis==null?void 0:globalThis.document){const r=Wo(e),a=O.useRef(!1),o=O.useRef(()=>{});return O.useEffect(()=>{const s=f=>{if(f.target&&!a.current){let h=function(){BS(n6,r,p,{discrete:!0})};const p={originalEvent:f};f.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=h,t.addEventListener("click",o.current,{once:!0})):h()}else t.removeEventListener("click",o.current);a.current=!1},u=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(u),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>a.current=!0}}function l6(e,t=globalThis==null?void 0:globalThis.document){const r=Wo(e),a=O.useRef(!1);return O.useEffect(()=>{const o=s=>{s.target&&!a.current&&BS(i6,r,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>a.current=!0,onBlurCapture:()=>a.current=!1}}function l1(){const e=new CustomEvent(xm);document.dispatchEvent(e)}function BS(e,t,r,{discrete:a}){const o=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),a?Jz(o,s):o.dispatchEvent(s)}var qr=globalThis!=null&&globalThis.document?O.useLayoutEffect:()=>{},s6=z1[" useId ".trim().toString()]||(()=>{}),c6=0;function Du(e){const[t,r]=O.useState(s6());return qr(()=>{r(a=>a??String(c6++))},[e]),t?`radix-${t}`:""}const u6=["top","right","bottom","left"],Gr=Math.min,bn=Math.max,lf=Math.round,vu=Math.floor,fi=e=>({x:e,y:e}),f6={left:"right",right:"left",bottom:"top",top:"bottom"};function bm(e,t,r){return bn(e,Gr(t,r))}function Qi(e,t){return typeof e=="function"?e(t):e}function Pi(e){return e.split("-")[0]}function nl(e){return e.split("-")[1]}function eg(e){return e==="x"?"y":"x"}function tg(e){return e==="y"?"height":"width"}function li(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function ng(e){return eg(li(e))}function d6(e,t,r){r===void 0&&(r=!1);const a=nl(e),o=ng(e),s=tg(o);let u=o==="x"?a===(r?"end":"start")?"right":"left":a==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(u=sf(u)),[u,sf(u)]}function h6(e){const t=sf(e);return[wm(e),t,wm(t)]}function wm(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const s1=["left","right"],c1=["right","left"],p6=["top","bottom"],m6=["bottom","top"];function g6(e,t,r){switch(e){case"top":case"bottom":return r?t?c1:s1:t?s1:c1;case"left":case"right":return t?p6:m6;default:return[]}}function y6(e,t,r,a){const o=nl(e);let s=g6(Pi(e),r==="start",a);return o&&(s=s.map(u=>u+"-"+o),t&&(s=s.concat(s.map(wm)))),s}function sf(e){const t=Pi(e);return f6[t]+e.slice(t.length)}function v6(e){return{top:0,right:0,bottom:0,left:0,...e}}function US(e){return typeof e!="number"?v6(e):{top:e,right:e,bottom:e,left:e}}function cf(e){const{x:t,y:r,width:a,height:o}=e;return{width:a,height:o,top:r,left:t,right:t+a,bottom:r+o,x:t,y:r}}function u1(e,t,r){let{reference:a,floating:o}=e;const s=li(t),u=ng(t),f=tg(u),h=Pi(t),p=s==="y",y=a.x+a.width/2-o.width/2,g=a.y+a.height/2-o.height/2,v=a[f]/2-o[f]/2;let x;switch(h){case"top":x={x:y,y:a.y-o.height};break;case"bottom":x={x:y,y:a.y+a.height};break;case"right":x={x:a.x+a.width,y:g};break;case"left":x={x:a.x-o.width,y:g};break;default:x={x:a.x,y:a.y}}switch(nl(t)){case"start":x[u]-=v*(r&&p?-1:1);break;case"end":x[u]+=v*(r&&p?-1:1);break}return x}async function x6(e,t){var r;t===void 0&&(t={});const{x:a,y:o,platform:s,rects:u,elements:f,strategy:h}=e,{boundary:p="clippingAncestors",rootBoundary:y="viewport",elementContext:g="floating",altBoundary:v=!1,padding:x=0}=Qi(t,e),b=US(x),E=f[v?g==="floating"?"reference":"floating":g],C=cf(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(E)))==null||r?E:E.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(f.floating)),boundary:p,rootBoundary:y,strategy:h})),N=g==="floating"?{x:a,y:o,width:u.floating.width,height:u.floating.height}:u.reference,A=await(s.getOffsetParent==null?void 0:s.getOffsetParent(f.floating)),T=await(s.isElement==null?void 0:s.isElement(A))?await(s.getScale==null?void 0:s.getScale(A))||{x:1,y:1}:{x:1,y:1},D=cf(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:N,offsetParent:A,strategy:h}):N);return{top:(C.top-D.top+b.top)/T.y,bottom:(D.bottom-C.bottom+b.bottom)/T.y,left:(C.left-D.left+b.left)/T.x,right:(D.right-C.right+b.right)/T.x}}const b6=50,w6=async(e,t,r)=>{const{placement:a="bottom",strategy:o="absolute",middleware:s=[],platform:u}=r,f=u.detectOverflow?u:{...u,detectOverflow:x6},h=await(u.isRTL==null?void 0:u.isRTL(t));let p=await u.getElementRects({reference:e,floating:t,strategy:o}),{x:y,y:g}=u1(p,a,h),v=a,x=0;const b={};for(let w=0;w<s.length;w++){const E=s[w];if(!E)continue;const{name:C,fn:N}=E,{x:A,y:T,data:D,reset:L}=await N({x:y,y:g,initialPlacement:a,placement:v,strategy:o,middlewareData:b,rects:p,platform:f,elements:{reference:e,floating:t}});y=A??y,g=T??g,b[C]={...b[C],...D},L&&x<b6&&(x++,typeof L=="object"&&(L.placement&&(v=L.placement),L.rects&&(p=L.rects===!0?await u.getElementRects({reference:e,floating:t,strategy:o}):L.rects),{x:y,y:g}=u1(p,v,h)),w=-1)}return{x:y,y:g,placement:v,strategy:o,middlewareData:b}},_6=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:a,placement:o,rects:s,platform:u,elements:f,middlewareData:h}=t,{element:p,padding:y=0}=Qi(e,t)||{};if(p==null)return{};const g=US(y),v={x:r,y:a},x=ng(o),b=tg(x),w=await u.getDimensions(p),E=x==="y",C=E?"top":"left",N=E?"bottom":"right",A=E?"clientHeight":"clientWidth",T=s.reference[b]+s.reference[x]-v[x]-s.floating[b],D=v[x]-s.reference[x],L=await(u.getOffsetParent==null?void 0:u.getOffsetParent(p));let j=L?L[A]:0;(!j||!await(u.isElement==null?void 0:u.isElement(L)))&&(j=f.floating[A]||s.floating[b]);const I=T/2-D/2,Z=j/2-w[b]/2-1,te=Gr(g[C],Z),G=Gr(g[N],Z),q=te,ie=j-w[b]-G,z=j/2-w[b]/2+I,F=bm(q,z,ie),k=!h.arrow&&nl(o)!=null&&z!==F&&s.reference[b]/2-(z<q?te:G)-w[b]/2<0,B=k?z<q?z-q:z-ie:0;return{[x]:v[x]+B,data:{[x]:F,centerOffset:z-F-B,...k&&{alignmentOffset:B}},reset:k}}}),S6=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,a;const{placement:o,middlewareData:s,rects:u,initialPlacement:f,platform:h,elements:p}=t,{mainAxis:y=!0,crossAxis:g=!0,fallbackPlacements:v,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:w=!0,...E}=Qi(e,t);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const C=Pi(o),N=li(f),A=Pi(f)===f,T=await(h.isRTL==null?void 0:h.isRTL(p.floating)),D=v||(A||!w?[sf(f)]:h6(f)),L=b!=="none";!v&&L&&D.push(...y6(f,w,b,T));const j=[f,...D],I=await h.detectOverflow(t,E),Z=[];let te=((a=s.flip)==null?void 0:a.overflows)||[];if(y&&Z.push(I[C]),g){const z=d6(o,u,T);Z.push(I[z[0]],I[z[1]])}if(te=[...te,{placement:o,overflows:Z}],!Z.every(z=>z<=0)){var G,q;const z=(((G=s.flip)==null?void 0:G.index)||0)+1,F=j[z];if(F&&(!(g==="alignment"?N!==li(F):!1)||te.every(H=>li(H.placement)===N?H.overflows[0]>0:!0)))return{data:{index:z,overflows:te},reset:{placement:F}};let k=(q=te.filter(B=>B.overflows[0]<=0).sort((B,H)=>B.overflows[1]-H.overflows[1])[0])==null?void 0:q.placement;if(!k)switch(x){case"bestFit":{var ie;const B=(ie=te.filter(H=>{if(L){const $=li(H.placement);return $===N||$==="y"}return!0}).map(H=>[H.placement,H.overflows.filter($=>$>0).reduce(($,K)=>$+K,0)]).sort((H,$)=>H[1]-$[1])[0])==null?void 0:ie[0];B&&(k=B);break}case"initialPlacement":k=f;break}if(o!==k)return{reset:{placement:k}}}return{}}}};function f1(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function d1(e){return u6.some(t=>e[t]>=0)}const E6=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:a}=t,{strategy:o="referenceHidden",...s}=Qi(e,t);switch(o){case"referenceHidden":{const u=await a.detectOverflow(t,{...s,elementContext:"reference"}),f=f1(u,r.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:d1(f)}}}case"escaped":{const u=await a.detectOverflow(t,{...s,altBoundary:!0}),f=f1(u,r.floating);return{data:{escapedOffsets:f,escaped:d1(f)}}}default:return{}}}}},YS=new Set(["left","top"]);async function C6(e,t){const{placement:r,platform:a,elements:o}=e,s=await(a.isRTL==null?void 0:a.isRTL(o.floating)),u=Pi(r),f=nl(r),h=li(r)==="y",p=YS.has(u)?-1:1,y=s&&h?-1:1,g=Qi(t,e);let{mainAxis:v,crossAxis:x,alignmentAxis:b}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return f&&typeof b=="number"&&(x=f==="end"?b*-1:b),h?{x:x*y,y:v*p}:{x:v*p,y:x*y}}const A6=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,a;const{x:o,y:s,placement:u,middlewareData:f}=t,h=await C6(t,e);return u===((r=f.offset)==null?void 0:r.placement)&&(a=f.arrow)!=null&&a.alignmentOffset?{}:{x:o+h.x,y:s+h.y,data:{...h,placement:u}}}}},N6=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:a,placement:o,platform:s}=t,{mainAxis:u=!0,crossAxis:f=!1,limiter:h={fn:C=>{let{x:N,y:A}=C;return{x:N,y:A}}},...p}=Qi(e,t),y={x:r,y:a},g=await s.detectOverflow(t,p),v=li(Pi(o)),x=eg(v);let b=y[x],w=y[v];if(u){const C=x==="y"?"top":"left",N=x==="y"?"bottom":"right",A=b+g[C],T=b-g[N];b=bm(A,b,T)}if(f){const C=v==="y"?"top":"left",N=v==="y"?"bottom":"right",A=w+g[C],T=w-g[N];w=bm(A,w,T)}const E=h.fn({...t,[x]:b,[v]:w});return{...E,data:{x:E.x-r,y:E.y-a,enabled:{[x]:u,[v]:f}}}}}},T6=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:a,placement:o,rects:s,middlewareData:u}=t,{offset:f=0,mainAxis:h=!0,crossAxis:p=!0}=Qi(e,t),y={x:r,y:a},g=li(o),v=eg(g);let x=y[v],b=y[g];const w=Qi(f,t),E=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(h){const A=v==="y"?"height":"width",T=s.reference[v]-s.floating[A]+E.mainAxis,D=s.reference[v]+s.reference[A]-E.mainAxis;x<T?x=T:x>D&&(x=D)}if(p){var C,N;const A=v==="y"?"width":"height",T=YS.has(Pi(o)),D=s.reference[g]-s.floating[A]+(T&&((C=u.offset)==null?void 0:C[g])||0)+(T?0:E.crossAxis),L=s.reference[g]+s.reference[A]+(T?0:((N=u.offset)==null?void 0:N[g])||0)-(T?E.crossAxis:0);b<D?b=D:b>L&&(b=L)}return{[v]:x,[g]:b}}}},M6=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,a;const{placement:o,rects:s,platform:u,elements:f}=t,{apply:h=()=>{},...p}=Qi(e,t),y=await u.detectOverflow(t,p),g=Pi(o),v=nl(o),x=li(o)==="y",{width:b,height:w}=s.floating;let E,C;g==="top"||g==="bottom"?(E=g,C=v===(await(u.isRTL==null?void 0:u.isRTL(f.floating))?"start":"end")?"left":"right"):(C=g,E=v==="end"?"top":"bottom");const N=w-y.top-y.bottom,A=b-y.left-y.right,T=Gr(w-y[E],N),D=Gr(b-y[C],A),L=!t.middlewareData.shift;let j=T,I=D;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(I=A),(a=t.middlewareData.shift)!=null&&a.enabled.y&&(j=N),L&&!v){const te=bn(y.left,0),G=bn(y.right,0),q=bn(y.top,0),ie=bn(y.bottom,0);x?I=b-2*(te!==0||G!==0?te+G:bn(y.left,y.right)):j=w-2*(q!==0||ie!==0?q+ie:bn(y.top,y.bottom))}await h({...t,availableWidth:I,availableHeight:j});const Z=await u.getDimensions(f.floating);return b!==Z.width||w!==Z.height?{reset:{rects:!0}}:{}}}};function Of(){return typeof window<"u"}function il(e){return $S(e)?(e.nodeName||"").toLowerCase():"#document"}function Sn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function mi(e){var t;return(t=($S(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function $S(e){return Of()?e instanceof Node||e instanceof Sn(e).Node:!1}function Zn(e){return Of()?e instanceof Element||e instanceof Sn(e).Element:!1}function Wi(e){return Of()?e instanceof HTMLElement||e instanceof Sn(e).HTMLElement:!1}function h1(e){return!Of()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Sn(e).ShadowRoot}function Hs(e){const{overflow:t,overflowX:r,overflowY:a,display:o}=Xn(e);return/auto|scroll|overlay|hidden|clip/.test(t+a+r)&&o!=="inline"&&o!=="contents"}function O6(e){return/^(table|td|th)$/.test(il(e))}function kf(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const k6=/transform|translate|scale|rotate|perspective|filter/,R6=/paint|layout|strict|content/,ya=e=>!!e&&e!=="none";let Op;function ig(e){const t=Zn(e)?Xn(e):e;return ya(t.transform)||ya(t.translate)||ya(t.scale)||ya(t.rotate)||ya(t.perspective)||!rg()&&(ya(t.backdropFilter)||ya(t.filter))||k6.test(t.willChange||"")||R6.test(t.contain||"")}function D6(e){let t=Ir(e);for(;Wi(t)&&!Jo(t);){if(ig(t))return t;if(kf(t))return null;t=Ir(t)}return null}function rg(){return Op==null&&(Op=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Op}function Jo(e){return/^(html|body|#document)$/.test(il(e))}function Xn(e){return Sn(e).getComputedStyle(e)}function Rf(e){return Zn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ir(e){if(il(e)==="html")return e;const t=e.assignedSlot||e.parentNode||h1(e)&&e.host||mi(e);return h1(t)?t.host:t}function VS(e){const t=Ir(e);return Jo(t)?e.ownerDocument?e.ownerDocument.body:e.body:Wi(t)&&Hs(t)?t:VS(t)}function Ts(e,t,r){var a;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=VS(e),s=o===((a=e.ownerDocument)==null?void 0:a.body),u=Sn(o);if(s){const f=_m(u);return t.concat(u,u.visualViewport||[],Hs(o)?o:[],f&&r?Ts(f):[])}else return t.concat(o,Ts(o,[],r))}function _m(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function qS(e){const t=Xn(e);let r=parseFloat(t.width)||0,a=parseFloat(t.height)||0;const o=Wi(e),s=o?e.offsetWidth:r,u=o?e.offsetHeight:a,f=lf(r)!==s||lf(a)!==u;return f&&(r=s,a=u),{width:r,height:a,$:f}}function ag(e){return Zn(e)?e:e.contextElement}function Lo(e){const t=ag(e);if(!Wi(t))return fi(1);const r=t.getBoundingClientRect(),{width:a,height:o,$:s}=qS(t);let u=(s?lf(r.width):r.width)/a,f=(s?lf(r.height):r.height)/o;return(!u||!Number.isFinite(u))&&(u=1),(!f||!Number.isFinite(f))&&(f=1),{x:u,y:f}}const j6=fi(0);function GS(e){const t=Sn(e);return!rg()||!t.visualViewport?j6:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function z6(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Sn(e)?!1:t}function ka(e,t,r,a){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),s=ag(e);let u=fi(1);t&&(a?Zn(a)&&(u=Lo(a)):u=Lo(e));const f=z6(s,r,a)?GS(s):fi(0);let h=(o.left+f.x)/u.x,p=(o.top+f.y)/u.y,y=o.width/u.x,g=o.height/u.y;if(s){const v=Sn(s),x=a&&Zn(a)?Sn(a):a;let b=v,w=_m(b);for(;w&&a&&x!==b;){const E=Lo(w),C=w.getBoundingClientRect(),N=Xn(w),A=C.left+(w.clientLeft+parseFloat(N.paddingLeft))*E.x,T=C.top+(w.clientTop+parseFloat(N.paddingTop))*E.y;h*=E.x,p*=E.y,y*=E.x,g*=E.y,h+=A,p+=T,b=Sn(w),w=_m(b)}}return cf({width:y,height:g,x:h,y:p})}function Df(e,t){const r=Rf(e).scrollLeft;return t?t.left+r:ka(mi(e)).left+r}function IS(e,t){const r=e.getBoundingClientRect(),a=r.left+t.scrollLeft-Df(e,r),o=r.top+t.scrollTop;return{x:a,y:o}}function L6(e){let{elements:t,rect:r,offsetParent:a,strategy:o}=e;const s=o==="fixed",u=mi(a),f=t?kf(t.floating):!1;if(a===u||f&&s)return r;let h={scrollLeft:0,scrollTop:0},p=fi(1);const y=fi(0),g=Wi(a);if((g||!g&&!s)&&((il(a)!=="body"||Hs(u))&&(h=Rf(a)),g)){const x=ka(a);p=Lo(a),y.x=x.x+a.clientLeft,y.y=x.y+a.clientTop}const v=u&&!g&&!s?IS(u,h):fi(0);return{width:r.width*p.x,height:r.height*p.y,x:r.x*p.x-h.scrollLeft*p.x+y.x+v.x,y:r.y*p.y-h.scrollTop*p.y+y.y+v.y}}function H6(e){return Array.from(e.getClientRects())}function B6(e){const t=mi(e),r=Rf(e),a=e.ownerDocument.body,o=bn(t.scrollWidth,t.clientWidth,a.scrollWidth,a.clientWidth),s=bn(t.scrollHeight,t.clientHeight,a.scrollHeight,a.clientHeight);let u=-r.scrollLeft+Df(e);const f=-r.scrollTop;return Xn(a).direction==="rtl"&&(u+=bn(t.clientWidth,a.clientWidth)-o),{width:o,height:s,x:u,y:f}}const p1=25;function U6(e,t){const r=Sn(e),a=mi(e),o=r.visualViewport;let s=a.clientWidth,u=a.clientHeight,f=0,h=0;if(o){s=o.width,u=o.height;const y=rg();(!y||y&&t==="fixed")&&(f=o.offsetLeft,h=o.offsetTop)}const p=Df(a);if(p<=0){const y=a.ownerDocument,g=y.body,v=getComputedStyle(g),x=y.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,b=Math.abs(a.clientWidth-g.clientWidth-x);b<=p1&&(s-=b)}else p<=p1&&(s+=p);return{width:s,height:u,x:f,y:h}}function Y6(e,t){const r=ka(e,!0,t==="fixed"),a=r.top+e.clientTop,o=r.left+e.clientLeft,s=Wi(e)?Lo(e):fi(1),u=e.clientWidth*s.x,f=e.clientHeight*s.y,h=o*s.x,p=a*s.y;return{width:u,height:f,x:h,y:p}}function m1(e,t,r){let a;if(t==="viewport")a=U6(e,r);else if(t==="document")a=B6(mi(e));else if(Zn(t))a=Y6(t,r);else{const o=GS(e);a={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return cf(a)}function ZS(e,t){const r=Ir(e);return r===t||!Zn(r)||Jo(r)?!1:Xn(r).position==="fixed"||ZS(r,t)}function $6(e,t){const r=t.get(e);if(r)return r;let a=Ts(e,[],!1).filter(f=>Zn(f)&&il(f)!=="body"),o=null;const s=Xn(e).position==="fixed";let u=s?Ir(e):e;for(;Zn(u)&&!Jo(u);){const f=Xn(u),h=ig(u);!h&&f.position==="fixed"&&(o=null),(s?!h&&!o:!h&&f.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||Hs(u)&&!h&&ZS(e,u))?a=a.filter(y=>y!==u):o=f,u=Ir(u)}return t.set(e,a),a}function V6(e){let{element:t,boundary:r,rootBoundary:a,strategy:o}=e;const u=[...r==="clippingAncestors"?kf(t)?[]:$6(t,this._c):[].concat(r),a],f=m1(t,u[0],o);let h=f.top,p=f.right,y=f.bottom,g=f.left;for(let v=1;v<u.length;v++){const x=m1(t,u[v],o);h=bn(x.top,h),p=Gr(x.right,p),y=Gr(x.bottom,y),g=bn(x.left,g)}return{width:p-g,height:y-h,x:g,y:h}}function q6(e){const{width:t,height:r}=qS(e);return{width:t,height:r}}function G6(e,t,r){const a=Wi(t),o=mi(t),s=r==="fixed",u=ka(e,!0,s,t);let f={scrollLeft:0,scrollTop:0};const h=fi(0);function p(){h.x=Df(o)}if(a||!a&&!s)if((il(t)!=="body"||Hs(o))&&(f=Rf(t)),a){const x=ka(t,!0,s,t);h.x=x.x+t.clientLeft,h.y=x.y+t.clientTop}else o&&p();s&&!a&&o&&p();const y=o&&!a&&!s?IS(o,f):fi(0),g=u.left+f.scrollLeft-h.x-y.x,v=u.top+f.scrollTop-h.y-y.y;return{x:g,y:v,width:u.width,height:u.height}}function kp(e){return Xn(e).position==="static"}function g1(e,t){if(!Wi(e)||Xn(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return mi(e)===r&&(r=r.ownerDocument.body),r}function XS(e,t){const r=Sn(e);if(kf(e))return r;if(!Wi(e)){let o=Ir(e);for(;o&&!Jo(o);){if(Zn(o)&&!kp(o))return o;o=Ir(o)}return r}let a=g1(e,t);for(;a&&O6(a)&&kp(a);)a=g1(a,t);return a&&Jo(a)&&kp(a)&&!ig(a)?r:a||D6(e)||r}const I6=async function(e){const t=this.getOffsetParent||XS,r=this.getDimensions,a=await r(e.floating);return{reference:G6(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:a.width,height:a.height}}};function Z6(e){return Xn(e).direction==="rtl"}const X6={convertOffsetParentRelativeRectToViewportRelativeRect:L6,getDocumentElement:mi,getClippingRect:V6,getOffsetParent:XS,getElementRects:I6,getClientRects:H6,getDimensions:q6,getScale:Lo,isElement:Zn,isRTL:Z6};function FS(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function F6(e,t){let r=null,a;const o=mi(e);function s(){var f;clearTimeout(a),(f=r)==null||f.disconnect(),r=null}function u(f,h){f===void 0&&(f=!1),h===void 0&&(h=1),s();const p=e.getBoundingClientRect(),{left:y,top:g,width:v,height:x}=p;if(f||t(),!v||!x)return;const b=vu(g),w=vu(o.clientWidth-(y+v)),E=vu(o.clientHeight-(g+x)),C=vu(y),A={rootMargin:-b+"px "+-w+"px "+-E+"px "+-C+"px",threshold:bn(0,Gr(1,h))||1};let T=!0;function D(L){const j=L[0].intersectionRatio;if(j!==h){if(!T)return u();j?u(!1,j):a=setTimeout(()=>{u(!1,1e-7)},1e3)}j===1&&!FS(p,e.getBoundingClientRect())&&u(),T=!1}try{r=new IntersectionObserver(D,{...A,root:o.ownerDocument})}catch{r=new IntersectionObserver(D,A)}r.observe(e)}return u(!0),s}function Q6(e,t,r,a){a===void 0&&(a={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:h=!1}=a,p=ag(e),y=o||s?[...p?Ts(p):[],...t?Ts(t):[]]:[];y.forEach(C=>{o&&C.addEventListener("scroll",r,{passive:!0}),s&&C.addEventListener("resize",r)});const g=p&&f?F6(p,r):null;let v=-1,x=null;u&&(x=new ResizeObserver(C=>{let[N]=C;N&&N.target===p&&x&&t&&(x.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var A;(A=x)==null||A.observe(t)})),r()}),p&&!h&&x.observe(p),t&&x.observe(t));let b,w=h?ka(e):null;h&&E();function E(){const C=ka(e);w&&!FS(w,C)&&r(),w=C,b=requestAnimationFrame(E)}return r(),()=>{var C;y.forEach(N=>{o&&N.removeEventListener("scroll",r),s&&N.removeEventListener("resize",r)}),g==null||g(),(C=x)==null||C.disconnect(),x=null,h&&cancelAnimationFrame(b)}}const P6=A6,K6=N6,W6=S6,J6=M6,eL=E6,y1=_6,tL=T6,nL=(e,t,r)=>{const a=new Map,o={platform:X6,...r},s={...o.platform,_c:a};return w6(e,t,{...o,platform:s})};var iL=typeof document<"u",rL=function(){},ju=iL?O.useLayoutEffect:rL;function uf(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,a,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(a=r;a--!==0;)if(!uf(e[a],t[a]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(a=r;a--!==0;)if(!{}.hasOwnProperty.call(t,o[a]))return!1;for(a=r;a--!==0;){const s=o[a];if(!(s==="_owner"&&e.$$typeof)&&!uf(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function QS(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function v1(e,t){const r=QS(e);return Math.round(t*r)/r}function Rp(e){const t=O.useRef(e);return ju(()=>{t.current=e}),t}function aL(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:a=[],platform:o,elements:{reference:s,floating:u}={},transform:f=!0,whileElementsMounted:h,open:p}=e,[y,g]=O.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[v,x]=O.useState(a);uf(v,a)||x(a);const[b,w]=O.useState(null),[E,C]=O.useState(null),N=O.useCallback(H=>{H!==L.current&&(L.current=H,w(H))},[]),A=O.useCallback(H=>{H!==j.current&&(j.current=H,C(H))},[]),T=s||b,D=u||E,L=O.useRef(null),j=O.useRef(null),I=O.useRef(y),Z=h!=null,te=Rp(h),G=Rp(o),q=Rp(p),ie=O.useCallback(()=>{if(!L.current||!j.current)return;const H={placement:t,strategy:r,middleware:v};G.current&&(H.platform=G.current),nL(L.current,j.current,H).then($=>{const K={...$,isPositioned:q.current!==!1};z.current&&!uf(I.current,K)&&(I.current=K,Vm.flushSync(()=>{g(K)}))})},[v,t,r,G,q]);ju(()=>{p===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,g(H=>({...H,isPositioned:!1})))},[p]);const z=O.useRef(!1);ju(()=>(z.current=!0,()=>{z.current=!1}),[]),ju(()=>{if(T&&(L.current=T),D&&(j.current=D),T&&D){if(te.current)return te.current(T,D,ie);ie()}},[T,D,ie,te,Z]);const F=O.useMemo(()=>({reference:L,floating:j,setReference:N,setFloating:A}),[N,A]),k=O.useMemo(()=>({reference:T,floating:D}),[T,D]),B=O.useMemo(()=>{const H={position:r,left:0,top:0};if(!k.floating)return H;const $=v1(k.floating,y.x),K=v1(k.floating,y.y);return f?{...H,transform:"translate("+$+"px, "+K+"px)",...QS(k.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:$,top:K}},[r,f,k.floating,y.x,y.y]);return O.useMemo(()=>({...y,update:ie,refs:F,elements:k,floatingStyles:B}),[y,ie,F,k,B])}const oL=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:a,padding:o}=typeof e=="function"?e(r):e;return a&&t(a)?a.current!=null?y1({element:a.current,padding:o}).fn(r):{}:a?y1({element:a,padding:o}).fn(r):{}}}},lL=(e,t)=>{const r=P6(e);return{name:r.name,fn:r.fn,options:[e,t]}},sL=(e,t)=>{const r=K6(e);return{name:r.name,fn:r.fn,options:[e,t]}},cL=(e,t)=>({fn:tL(e).fn,options:[e,t]}),uL=(e,t)=>{const r=W6(e);return{name:r.name,fn:r.fn,options:[e,t]}},fL=(e,t)=>{const r=J6(e);return{name:r.name,fn:r.fn,options:[e,t]}},dL=(e,t)=>{const r=eL(e);return{name:r.name,fn:r.fn,options:[e,t]}},hL=(e,t)=>{const r=oL(e);return{name:r.name,fn:r.fn,options:[e,t]}};var pL="Arrow",PS=O.forwardRef((e,t)=>{const{children:r,width:a=10,height:o=5,...s}=e;return S.jsx(fn.svg,{...s,ref:t,width:a,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:S.jsx("polygon",{points:"0,0 30,0 15,10"})})});PS.displayName=pL;var mL=PS;function gL(e){const[t,r]=O.useState(void 0);return qr(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const a=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let u,f;if("borderBoxSize"in s){const h=s.borderBoxSize,p=Array.isArray(h)?h[0]:h;u=p.inlineSize,f=p.blockSize}else u=e.offsetWidth,f=e.offsetHeight;r({width:u,height:f})});return a.observe(e,{box:"border-box"}),()=>a.unobserve(e)}else r(void 0)},[e]),t}var og="Popper",[KS,WS]=Wm(og),[yL,JS]=KS(og),eE=e=>{const{__scopePopper:t,children:r}=e,[a,o]=O.useState(null);return S.jsx(yL,{scope:t,anchor:a,onAnchorChange:o,children:r})};eE.displayName=og;var tE="PopperAnchor",nE=O.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:a,...o}=e,s=JS(tE,r),u=O.useRef(null),f=Qn(t,u),h=O.useRef(null);return O.useEffect(()=>{const p=h.current;h.current=(a==null?void 0:a.current)||u.current,p!==h.current&&s.onAnchorChange(h.current)}),a?null:S.jsx(fn.div,{...o,ref:f})});nE.displayName=tE;var lg="PopperContent",[vL,xL]=KS(lg),iE=O.forwardRef((e,t)=>{var de,ce,he,Ae,Ee,_e;const{__scopePopper:r,side:a="bottom",sideOffset:o=0,align:s="center",alignOffset:u=0,arrowPadding:f=0,avoidCollisions:h=!0,collisionBoundary:p=[],collisionPadding:y=0,sticky:g="partial",hideWhenDetached:v=!1,updatePositionStrategy:x="optimized",onPlaced:b,...w}=e,E=JS(lg,r),[C,N]=O.useState(null),A=Qn(t,be=>N(be)),[T,D]=O.useState(null),L=gL(T),j=(L==null?void 0:L.width)??0,I=(L==null?void 0:L.height)??0,Z=a+(s!=="center"?"-"+s:""),te=typeof y=="number"?y:{top:0,right:0,bottom:0,left:0,...y},G=Array.isArray(p)?p:[p],q=G.length>0,ie={padding:te,boundary:G.filter(wL),altBoundary:q},{refs:z,floatingStyles:F,placement:k,isPositioned:B,middlewareData:H}=aL({strategy:"fixed",placement:Z,whileElementsMounted:(...be)=>Q6(...be,{animationFrame:x==="always"}),elements:{reference:E.anchor},middleware:[lL({mainAxis:o+I,alignmentAxis:u}),h&&sL({mainAxis:!0,crossAxis:!1,limiter:g==="partial"?cL():void 0,...ie}),h&&uL({...ie}),fL({...ie,apply:({elements:be,rects:ke,availableWidth:Fe,availableHeight:Le})=>{const{width:yt,height:dn}=ke.reference,Ot=be.floating.style;Ot.setProperty("--radix-popper-available-width",`${Fe}px`),Ot.setProperty("--radix-popper-available-height",`${Le}px`),Ot.setProperty("--radix-popper-anchor-width",`${yt}px`),Ot.setProperty("--radix-popper-anchor-height",`${dn}px`)}}),T&&hL({element:T,padding:f}),_L({arrowWidth:j,arrowHeight:I}),v&&dL({strategy:"referenceHidden",...ie})]}),[$,K]=oE(k),R=Wo(b);qr(()=>{B&&(R==null||R())},[B,R]);const Y=(de=H.arrow)==null?void 0:de.x,J=(ce=H.arrow)==null?void 0:ce.y,ne=((he=H.arrow)==null?void 0:he.centerOffset)!==0,[se,fe]=O.useState();return qr(()=>{C&&fe(window.getComputedStyle(C).zIndex)},[C]),S.jsx("div",{ref:z.setFloating,"data-radix-popper-content-wrapper":"",style:{...F,transform:B?F.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:se,"--radix-popper-transform-origin":[(Ae=H.transformOrigin)==null?void 0:Ae.x,(Ee=H.transformOrigin)==null?void 0:Ee.y].join(" "),...((_e=H.hide)==null?void 0:_e.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:S.jsx(vL,{scope:r,placedSide:$,onArrowChange:D,arrowX:Y,arrowY:J,shouldHideArrow:ne,children:S.jsx(fn.div,{"data-side":$,"data-align":K,...w,ref:A,style:{...w.style,animation:B?void 0:"none"}})})})});iE.displayName=lg;var rE="PopperArrow",bL={top:"bottom",right:"left",bottom:"top",left:"right"},aE=O.forwardRef(function(t,r){const{__scopePopper:a,...o}=t,s=xL(rE,a),u=bL[s.placedSide];return S.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[u]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:S.jsx(mL,{...o,ref:r,style:{...o.style,display:"block"}})})});aE.displayName=rE;function wL(e){return e!==null}var _L=e=>({name:"transformOrigin",options:e,fn(t){var E,C,N;const{placement:r,rects:a,middlewareData:o}=t,u=((E=o.arrow)==null?void 0:E.centerOffset)!==0,f=u?0:e.arrowWidth,h=u?0:e.arrowHeight,[p,y]=oE(r),g={start:"0%",center:"50%",end:"100%"}[y],v=(((C=o.arrow)==null?void 0:C.x)??0)+f/2,x=(((N=o.arrow)==null?void 0:N.y)??0)+h/2;let b="",w="";return p==="bottom"?(b=u?g:`${v}px`,w=`${-h}px`):p==="top"?(b=u?g:`${v}px`,w=`${a.floating.height+h}px`):p==="right"?(b=`${-h}px`,w=u?g:`${x}px`):p==="left"&&(b=`${a.floating.width+h}px`,w=u?g:`${x}px`),{data:{x:b,y:w}}}});function oE(e){const[t,r="center"]=e.split("-");return[t,r]}var SL=eE,EL=nE,CL=iE,AL=aE,NL="Portal",sg=O.forwardRef((e,t)=>{var f;const{container:r,...a}=e,[o,s]=O.useState(!1);qr(()=>s(!0),[]);const u=r||o&&((f=globalThis==null?void 0:globalThis.document)==null?void 0:f.body);return u?n3.createPortal(S.jsx(fn.div,{...a,ref:t}),u):null});sg.displayName=NL;function TL(e,t){return O.useReducer((r,a)=>t[r][a]??r,e)}var rl=e=>{const{present:t,children:r}=e,a=ML(t),o=typeof r=="function"?r({present:a.isPresent}):O.Children.only(r),s=Qn(a.ref,OL(o));return typeof r=="function"||a.isPresent?O.cloneElement(o,{ref:s}):null};rl.displayName="Presence";function ML(e){const[t,r]=O.useState(),a=O.useRef(null),o=O.useRef(e),s=O.useRef("none"),u=e?"mounted":"unmounted",[f,h]=TL(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return O.useEffect(()=>{const p=xu(a.current);s.current=f==="mounted"?p:"none"},[f]),qr(()=>{const p=a.current,y=o.current;if(y!==e){const v=s.current,x=xu(p);e?h("MOUNT"):x==="none"||(p==null?void 0:p.display)==="none"?h("UNMOUNT"):h(y&&v!==x?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,h]),qr(()=>{if(t){let p;const y=t.ownerDocument.defaultView??window,g=x=>{const w=xu(a.current).includes(CSS.escape(x.animationName));if(x.target===t&&w&&(h("ANIMATION_END"),!o.current)){const E=t.style.animationFillMode;t.style.animationFillMode="forwards",p=y.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=E)})}},v=x=>{x.target===t&&(s.current=xu(a.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",g),t.addEventListener("animationend",g),()=>{y.clearTimeout(p),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",g),t.removeEventListener("animationend",g)}}else h("ANIMATION_END")},[t,h]),{isPresent:["mounted","unmountSuspended"].includes(f),ref:O.useCallback(p=>{a.current=p?getComputedStyle(p):null,r(p)},[])}}function xu(e){return(e==null?void 0:e.animationName)||"none"}function OL(e){var a,o;let t=(a=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var kL=z1[" useInsertionEffect ".trim().toString()]||qr;function lE({prop:e,defaultProp:t,onChange:r=()=>{},caller:a}){const[o,s,u]=RL({defaultProp:t,onChange:r}),f=e!==void 0,h=f?e:o;{const y=O.useRef(e!==void 0);O.useEffect(()=>{const g=y.current;g!==f&&console.warn(`${a} is changing from ${g?"controlled":"uncontrolled"} to ${f?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),y.current=f},[f,a])}const p=O.useCallback(y=>{var g;if(f){const v=DL(y)?y(e):y;v!==e&&((g=u.current)==null||g.call(u,v))}else s(y)},[f,e,s,u]);return[h,p]}function RL({defaultProp:e,onChange:t}){const[r,a]=O.useState(e),o=O.useRef(r),s=O.useRef(t);return kL(()=>{s.current=t},[t]),O.useEffect(()=>{var u;o.current!==r&&((u=s.current)==null||u.call(s,r),o.current=r)},[r,o]),[r,a,s]}function DL(e){return typeof e=="function"}var jL=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),zL="VisuallyHidden",sE=O.forwardRef((e,t)=>S.jsx(fn.span,{...e,ref:t,style:{...jL,...e.style}}));sE.displayName=zL;var LL=sE,[jf]=Wm("Tooltip",[WS]),zf=WS(),cE="TooltipProvider",HL=700,Sm="tooltip.open",[BL,cg]=jf(cE),uE=e=>{const{__scopeTooltip:t,delayDuration:r=HL,skipDelayDuration:a=300,disableHoverableContent:o=!1,children:s}=e,u=O.useRef(!0),f=O.useRef(!1),h=O.useRef(0);return O.useEffect(()=>{const p=h.current;return()=>window.clearTimeout(p)},[]),S.jsx(BL,{scope:t,isOpenDelayedRef:u,delayDuration:r,onOpen:O.useCallback(()=>{window.clearTimeout(h.current),u.current=!1},[]),onClose:O.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>u.current=!0,a)},[a]),isPointerInTransitRef:f,onPointerInTransitChange:O.useCallback(p=>{f.current=p},[]),disableHoverableContent:o,children:s})};uE.displayName=cE;var Ms="Tooltip",[UL,Bs]=jf(Ms),fE=e=>{const{__scopeTooltip:t,children:r,open:a,defaultOpen:o,onOpenChange:s,disableHoverableContent:u,delayDuration:f}=e,h=cg(Ms,e.__scopeTooltip),p=zf(t),[y,g]=O.useState(null),v=Du(),x=O.useRef(0),b=u??h.disableHoverableContent,w=f??h.delayDuration,E=O.useRef(!1),[C,N]=lE({prop:a,defaultProp:o??!1,onChange:j=>{j?(h.onOpen(),document.dispatchEvent(new CustomEvent(Sm))):h.onClose(),s==null||s(j)},caller:Ms}),A=O.useMemo(()=>C?E.current?"delayed-open":"instant-open":"closed",[C]),T=O.useCallback(()=>{window.clearTimeout(x.current),x.current=0,E.current=!1,N(!0)},[N]),D=O.useCallback(()=>{window.clearTimeout(x.current),x.current=0,N(!1)},[N]),L=O.useCallback(()=>{window.clearTimeout(x.current),x.current=window.setTimeout(()=>{E.current=!0,N(!0),x.current=0},w)},[w,N]);return O.useEffect(()=>()=>{x.current&&(window.clearTimeout(x.current),x.current=0)},[]),S.jsx(SL,{...p,children:S.jsx(UL,{scope:t,contentId:v,open:C,stateAttribute:A,trigger:y,onTriggerChange:g,onTriggerEnter:O.useCallback(()=>{h.isOpenDelayedRef.current?L():T()},[h.isOpenDelayedRef,L,T]),onTriggerLeave:O.useCallback(()=>{b?D():(window.clearTimeout(x.current),x.current=0)},[D,b]),onOpen:T,onClose:D,disableHoverableContent:b,children:r})})};fE.displayName=Ms;var Em="TooltipTrigger",dE=O.forwardRef((e,t)=>{const{__scopeTooltip:r,...a}=e,o=Bs(Em,r),s=cg(Em,r),u=zf(r),f=O.useRef(null),h=Qn(t,f,o.onTriggerChange),p=O.useRef(!1),y=O.useRef(!1),g=O.useCallback(()=>p.current=!1,[]);return O.useEffect(()=>()=>document.removeEventListener("pointerup",g),[g]),S.jsx(EL,{asChild:!0,...u,children:S.jsx(fn.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...a,ref:h,onPointerMove:on(e.onPointerMove,v=>{v.pointerType!=="touch"&&!y.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),y.current=!0)}),onPointerLeave:on(e.onPointerLeave,()=>{o.onTriggerLeave(),y.current=!1}),onPointerDown:on(e.onPointerDown,()=>{o.open&&o.onClose(),p.current=!0,document.addEventListener("pointerup",g,{once:!0})}),onFocus:on(e.onFocus,()=>{p.current||o.onOpen()}),onBlur:on(e.onBlur,o.onClose),onClick:on(e.onClick,o.onClose)})})});dE.displayName=Em;var ug="TooltipPortal",[YL,$L]=jf(ug,{forceMount:void 0}),hE=e=>{const{__scopeTooltip:t,forceMount:r,children:a,container:o}=e,s=Bs(ug,t);return S.jsx(YL,{scope:t,forceMount:r,children:S.jsx(rl,{present:r||s.open,children:S.jsx(sg,{asChild:!0,container:o,children:a})})})};hE.displayName=ug;var el="TooltipContent",pE=O.forwardRef((e,t)=>{const r=$L(el,e.__scopeTooltip),{forceMount:a=r.forceMount,side:o="top",...s}=e,u=Bs(el,e.__scopeTooltip);return S.jsx(rl,{present:a||u.open,children:u.disableHoverableContent?S.jsx(mE,{side:o,...s,ref:t}):S.jsx(VL,{side:o,...s,ref:t})})}),VL=O.forwardRef((e,t)=>{const r=Bs(el,e.__scopeTooltip),a=cg(el,e.__scopeTooltip),o=O.useRef(null),s=Qn(t,o),[u,f]=O.useState(null),{trigger:h,onClose:p}=r,y=o.current,{onPointerInTransitChange:g}=a,v=O.useCallback(()=>{f(null),g(!1)},[g]),x=O.useCallback((b,w)=>{const E=b.currentTarget,C={x:b.clientX,y:b.clientY},N=ZL(C,E.getBoundingClientRect()),A=XL(C,N),T=FL(w.getBoundingClientRect()),D=PL([...A,...T]);f(D),g(!0)},[g]);return O.useEffect(()=>()=>v(),[v]),O.useEffect(()=>{if(h&&y){const b=E=>x(E,y),w=E=>x(E,h);return h.addEventListener("pointerleave",b),y.addEventListener("pointerleave",w),()=>{h.removeEventListener("pointerleave",b),y.removeEventListener("pointerleave",w)}}},[h,y,x,v]),O.useEffect(()=>{if(u){const b=w=>{const E=w.target,C={x:w.clientX,y:w.clientY},N=(h==null?void 0:h.contains(E))||(y==null?void 0:y.contains(E)),A=!QL(C,u);N?v():A&&(v(),p())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[h,y,u,p,v]),S.jsx(mE,{...e,ref:s})}),[qL,GL]=jf(Ms,{isInside:!1}),IL=Fz("TooltipContent"),mE=O.forwardRef((e,t)=>{const{__scopeTooltip:r,children:a,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:u,...f}=e,h=Bs(el,r),p=zf(r),{onClose:y}=h;return O.useEffect(()=>(document.addEventListener(Sm,y),()=>document.removeEventListener(Sm,y)),[y]),O.useEffect(()=>{if(h.trigger){const g=v=>{const x=v.target;x!=null&&x.contains(h.trigger)&&y()};return window.addEventListener("scroll",g,{capture:!0}),()=>window.removeEventListener("scroll",g,{capture:!0})}},[h.trigger,y]),S.jsx(Jm,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:u,onFocusOutside:g=>g.preventDefault(),onDismiss:y,children:S.jsxs(CL,{"data-state":h.stateAttribute,...p,...f,ref:t,style:{...f.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[S.jsx(IL,{children:a}),S.jsx(qL,{scope:r,isInside:!0,children:S.jsx(LL,{id:h.contentId,role:"tooltip",children:o||a})})]})})});pE.displayName=el;var gE="TooltipArrow",yE=O.forwardRef((e,t)=>{const{__scopeTooltip:r,...a}=e,o=zf(r);return GL(gE,r).isInside?null:S.jsx(AL,{...o,...a,ref:t})});yE.displayName=gE;function ZL(e,t){const r=Math.abs(t.top-e.y),a=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(r,a,o,s)){case s:return"left";case o:return"right";case r:return"top";case a:return"bottom";default:throw new Error("unreachable")}}function XL(e,t,r=5){const a=[];switch(t){case"top":a.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":a.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":a.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":a.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return a}function FL(e){const{top:t,right:r,bottom:a,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:a},{x:o,y:a}]}function QL(e,t){const{x:r,y:a}=e;let o=!1;for(let s=0,u=t.length-1;s<t.length;u=s++){const f=t[s],h=t[u],p=f.x,y=f.y,g=h.x,v=h.y;y>a!=v>a&&r<(g-p)*(a-y)/(v-y)+p&&(o=!o)}return o}function PL(e){const t=e.slice();return t.sort((r,a)=>r.x<a.x?-1:r.x>a.x?1:r.y<a.y?-1:r.y>a.y?1:0),KL(t)}function KL(e){if(e.length<=1)return e.slice();const t=[];for(let a=0;a<e.length;a++){const o=e[a];for(;t.length>=2;){const s=t[t.length-1],u=t[t.length-2];if((s.x-u.x)*(o.y-u.y)>=(s.y-u.y)*(o.x-u.x))t.pop();else break}t.push(o)}t.pop();const r=[];for(let a=e.length-1;a>=0;a--){const o=e[a];for(;r.length>=2;){const s=r[r.length-1],u=r[r.length-2];if((s.x-u.x)*(o.y-u.y)>=(s.y-u.y)*(o.x-u.x))r.pop();else break}r.push(o)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var WL=uE,x1=fE,b1=dE,w1=hE,_1=pE,S1=yE;const JL=[{label:"TypeScript",value:"typescript"},{label:"Python",value:"python"},{label:"Go",value:"go"},{label:"Next.js",value:"nextjs"},{label:"Full-stack",value:"fullstack"}],e8={typescript:`version: 1
|
|
195
|
+
context:
|
|
196
|
+
guides: {}
|
|
197
|
+
conditions: []
|
|
198
|
+
checks:
|
|
199
|
+
- id: lint
|
|
200
|
+
label: "ESLint — no warnings"
|
|
201
|
+
cmd: "pnpm lint --max-warnings 0"
|
|
202
|
+
- id: typecheck
|
|
203
|
+
label: "TypeScript type check"
|
|
204
|
+
cmd: "pnpm typecheck"
|
|
205
|
+
- id: unit-tests
|
|
206
|
+
label: "Vitest unit tests"
|
|
207
|
+
cmd: "pnpm test --run"
|
|
208
|
+
- id: jsdoc
|
|
209
|
+
label: "JSDoc on changed public functions"
|
|
210
|
+
prompt: "Ensure all changed public functions and exports have JSDoc comments with description, @param, and @returns where applicable."
|
|
211
|
+
- id: test-coverage
|
|
212
|
+
label: "Meaningful test coverage for new logic"
|
|
213
|
+
prompt: "Confirm that any new non-trivial logic introduced in this change has corresponding unit tests in the __tests__ directory."
|
|
214
|
+
- id: holdpoint-evolve
|
|
215
|
+
label: "Evolve checks when project structure changes"
|
|
216
|
+
when: structural
|
|
217
|
+
cmd: "npx holdpoint evolve"`,python:`version: 1
|
|
218
|
+
context:
|
|
219
|
+
guides: {}
|
|
220
|
+
conditions: []
|
|
221
|
+
checks:
|
|
222
|
+
- id: ruff
|
|
223
|
+
label: "Ruff linter"
|
|
224
|
+
when: python
|
|
225
|
+
cmd: "ruff check ."
|
|
226
|
+
- id: mypy
|
|
227
|
+
label: "Mypy type check"
|
|
228
|
+
when: python
|
|
229
|
+
cmd: "mypy . --ignore-missing-imports"
|
|
230
|
+
- id: pytest
|
|
231
|
+
label: "pytest"
|
|
232
|
+
when: python
|
|
233
|
+
cmd: "pytest --tb=short -q"
|
|
234
|
+
- id: docstrings
|
|
235
|
+
label: "Docstrings on changed functions"
|
|
236
|
+
when: python
|
|
237
|
+
prompt: "Ensure all changed public functions and classes have PEP-257 compliant docstrings (one-line summary + extended description where needed)."
|
|
238
|
+
- id: type-hints
|
|
239
|
+
label: "Type hints on new functions"
|
|
240
|
+
when: python
|
|
241
|
+
prompt: "Confirm that all new functions have complete type annotations on all parameters and return values."
|
|
242
|
+
- id: holdpoint-evolve
|
|
243
|
+
label: "Evolve checks when project structure changes"
|
|
244
|
+
when: structural
|
|
245
|
+
cmd: "npx holdpoint evolve"`,go:`version: 1
|
|
246
|
+
context:
|
|
247
|
+
guides: {}
|
|
248
|
+
conditions: []
|
|
249
|
+
checks:
|
|
250
|
+
- id: go-build
|
|
251
|
+
label: "go build — no compilation errors"
|
|
252
|
+
when: go
|
|
253
|
+
cmd: "go build ./..."
|
|
254
|
+
- id: go-vet
|
|
255
|
+
label: "go vet — no suspicious constructs"
|
|
256
|
+
when: go
|
|
257
|
+
cmd: "go vet ./..."
|
|
258
|
+
- id: go-test
|
|
259
|
+
label: "go test — all unit tests pass"
|
|
260
|
+
when: go
|
|
261
|
+
cmd: "go test ./..."
|
|
262
|
+
- id: godoc
|
|
263
|
+
label: "GoDoc on exported symbols"
|
|
264
|
+
when: go
|
|
265
|
+
prompt: "Ensure all exported functions, types, methods, and packages have GoDoc comments."
|
|
266
|
+
- id: test-coverage
|
|
267
|
+
label: "Meaningful test coverage for new logic"
|
|
268
|
+
when: testing
|
|
269
|
+
prompt: "Confirm any new non-trivial logic has corresponding unit tests in *_test.go files."
|
|
270
|
+
- id: holdpoint-evolve
|
|
271
|
+
label: "Evolve checks when project structure changes"
|
|
272
|
+
when: structural
|
|
273
|
+
cmd: "npx holdpoint evolve"`,nextjs:`version: 1
|
|
274
|
+
context:
|
|
275
|
+
guides: {}
|
|
276
|
+
conditions:
|
|
277
|
+
- id: has-openapi
|
|
278
|
+
operator: file_exists
|
|
279
|
+
path: openapi.yaml
|
|
280
|
+
checks:
|
|
281
|
+
- id: lint
|
|
282
|
+
label: "ESLint — no warnings"
|
|
283
|
+
cmd: "pnpm lint --max-warnings 0"
|
|
284
|
+
- id: typecheck
|
|
285
|
+
label: "TypeScript type check"
|
|
286
|
+
cmd: "pnpm typecheck"
|
|
287
|
+
- id: unit-tests
|
|
288
|
+
label: "Vitest unit tests"
|
|
289
|
+
cmd: "pnpm test --run"
|
|
290
|
+
- id: build
|
|
291
|
+
label: "Next.js production build"
|
|
292
|
+
cmd: "pnpm build"
|
|
293
|
+
- id: jsdoc
|
|
294
|
+
label: "JSDoc on changed public functions"
|
|
295
|
+
prompt: "Ensure all changed public functions and exports have JSDoc comments."
|
|
296
|
+
- id: visual-regression
|
|
297
|
+
label: "Visual regression check"
|
|
298
|
+
when: frontend
|
|
299
|
+
prompt: "For any UI changes, confirm the layout is correct at 1280px desktop, 768px tablet, and 375px mobile breakpoints."
|
|
300
|
+
- id: i18n
|
|
301
|
+
label: "i18n — no hardcoded strings"
|
|
302
|
+
when: frontend
|
|
303
|
+
prompt: "Ensure all user-visible text is wrapped in the t() translation function and has corresponding entries in all locale files."
|
|
304
|
+
- id: openapi-updated
|
|
305
|
+
label: "OpenAPI spec updated for API changes"
|
|
306
|
+
when: backend
|
|
307
|
+
conditionId: has-openapi
|
|
308
|
+
prompt: "If any API routes were added or changed, confirm the openapi.yaml spec has been updated to match."
|
|
309
|
+
- id: holdpoint-evolve
|
|
310
|
+
label: "Evolve checks when project structure changes"
|
|
311
|
+
when: structural
|
|
312
|
+
cmd: "npx holdpoint evolve"`,fullstack:`version: 1
|
|
313
|
+
context:
|
|
314
|
+
guides: {}
|
|
315
|
+
conditions:
|
|
316
|
+
- id: has-openapi
|
|
317
|
+
operator: file_exists
|
|
318
|
+
path: openapi.yaml
|
|
319
|
+
- id: has-playwright
|
|
320
|
+
operator: file_exists
|
|
321
|
+
path: playwright.config.ts
|
|
322
|
+
checks:
|
|
323
|
+
- id: lint
|
|
324
|
+
label: "ESLint — no warnings"
|
|
325
|
+
cmd: "pnpm lint --max-warnings 0"
|
|
326
|
+
- id: typecheck
|
|
327
|
+
label: "TypeScript type check"
|
|
328
|
+
cmd: "pnpm typecheck"
|
|
329
|
+
- id: unit-tests
|
|
330
|
+
label: "Vitest unit tests"
|
|
331
|
+
cmd: "pnpm test --run"
|
|
332
|
+
- id: backend-tests
|
|
333
|
+
label: "Backend integration tests"
|
|
334
|
+
when: backend
|
|
335
|
+
cmd: "pnpm test:integration --run"
|
|
336
|
+
- id: build
|
|
337
|
+
label: "Production build"
|
|
338
|
+
cmd: "pnpm build"
|
|
339
|
+
- id: jsdoc
|
|
340
|
+
label: "JSDoc on changed public functions"
|
|
341
|
+
prompt: "All changed public functions and exports must have JSDoc."
|
|
342
|
+
- id: openapi-updated
|
|
343
|
+
label: "OpenAPI spec updated for API changes"
|
|
344
|
+
when: backend
|
|
345
|
+
conditionId: has-openapi
|
|
346
|
+
prompt: "If any API routes were added or changed, update openapi.yaml to match."
|
|
347
|
+
- id: visual-regression
|
|
348
|
+
label: "Visual regression check"
|
|
349
|
+
when: frontend
|
|
350
|
+
conditionId: has-playwright
|
|
351
|
+
prompt: "Run playwright tests for any UI changes: pnpm playwright test. Review screenshots for regressions."
|
|
352
|
+
- id: i18n
|
|
353
|
+
label: "i18n — no hardcoded user-facing strings"
|
|
354
|
+
when: frontend
|
|
355
|
+
prompt: "Confirm all user-visible strings are wrapped in t() and locale files updated."
|
|
356
|
+
- id: db-migrations
|
|
357
|
+
label: "Database migration for schema changes"
|
|
358
|
+
when: database
|
|
359
|
+
prompt: "If schema or migration files changed, ensure the appropriate migration was generated with your ORM tool and committed."
|
|
360
|
+
- id: holdpoint-evolve
|
|
361
|
+
label: "Evolve checks when project structure changes"
|
|
362
|
+
when: structural
|
|
363
|
+
cmd: "npx holdpoint evolve"`,unknown:`version: 1
|
|
364
|
+
context:
|
|
365
|
+
guides: {}
|
|
366
|
+
conditions: []
|
|
367
|
+
checks:
|
|
368
|
+
- id: lint
|
|
369
|
+
label: "Lint codebase"
|
|
370
|
+
cmd: "pnpm lint --max-warnings 0"
|
|
371
|
+
- id: typecheck
|
|
372
|
+
label: "TypeScript type check"
|
|
373
|
+
cmd: "pnpm typecheck"
|
|
374
|
+
- id: jsdoc
|
|
375
|
+
label: "JSDoc on changed public functions"
|
|
376
|
+
prompt: "Ensure all changed public functions, classes, and module exports have accurate JSDoc comments (description + @param + @returns where applicable)."
|
|
377
|
+
- id: changelog-update
|
|
378
|
+
label: "Add a CHANGELOG.md entry for this session"
|
|
379
|
+
prompt: "Before committing, add an entry to CHANGELOG.md under ## [Unreleased]. Use Keep a Changelog format."
|
|
380
|
+
- id: readme-sync
|
|
381
|
+
label: "Update README.md if user-facing changes were made"
|
|
382
|
+
prompt: "If you added, changed, or removed user-facing functionality, update README.md to reflect those changes."
|
|
383
|
+
- id: no-todos
|
|
384
|
+
label: "No TODO/FIXME left in changed code"
|
|
385
|
+
prompt: "Scan the files you changed for any TODO, FIXME, HACK, or XXX comments. Either resolve them or convert to tracked issues."
|
|
386
|
+
- id: holdpoint-evolve
|
|
387
|
+
label: "Evolve checks when project structure changes"
|
|
388
|
+
when: structural
|
|
389
|
+
cmd: "npx holdpoint evolve"
|
|
390
|
+
- id: git-commit
|
|
391
|
+
label: "Commit all changes before finishing"
|
|
392
|
+
cmd: "git rev-parse --is-inside-work-tree 2>/dev/null || exit 0; [ -z \\"$(git status --porcelain)\\" ] && exit 0; git status --short; exit 1"`};function t8({viewMode:e,onViewChange:t}){const{exportYaml:r,loadTemplate:a}=Fi(),[o,s]=Ve.useState(!1),u=()=>{const p=r(),y=new Blob([p],{type:"text/yaml"}),g=URL.createObjectURL(y),v=document.createElement("a");v.href=g,v.download="checks.yaml",v.click(),URL.revokeObjectURL(g)},f=async()=>{const p=r();await navigator.clipboard.writeText(p),s(!0),setTimeout(()=>s(!1),1500)},h=p=>{const y=NS(e8[p]);a(y)};return S.jsxs("header",{className:"flex h-14 shrink-0 items-center justify-between border-b border-node-border bg-node px-4",children:[S.jsxs("div",{className:"flex items-center gap-2.5 text-bone",children:[S.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 100 100",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[S.jsxs("g",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3.5",children:[S.jsx("path",{d:"M 4 10 C 24 10 36 30 44 46"}),S.jsx("path",{d:"M 4 32 C 24 32 36 42 44 48"}),S.jsx("path",{d:"M 4 68 C 24 68 36 58 44 52"}),S.jsx("path",{d:"M 4 90 C 24 90 36 70 44 54"})]}),S.jsx("rect",{x:"42",y:"36",width:"14",height:"28",rx:"3",fill:"currentColor"}),S.jsx("path",{d:"M 56 50 L 96 50",stroke:"currentColor",strokeWidth:"7",strokeLinecap:"round"})]}),S.jsx("span",{className:"font-semibold tracking-tight text-bone",style:{fontFamily:"'JetBrains Mono', 'IBM Plex Mono', ui-monospace, monospace"},children:"holdpoint"}),S.jsx("span",{className:"ml-1 rounded-full bg-accent/20 px-2 py-0.5 text-xs text-accent",children:"Builder"})]}),S.jsx(WL,{delayDuration:300,children:S.jsxs("div",{className:"flex overflow-hidden rounded-md border border-node-border",children:[S.jsxs(x1,{children:[S.jsx(b1,{asChild:!0,children:S.jsx("button",{onClick:()=>t("graph"),"aria-label":"Graph view",className:`flex items-center px-2.5 py-1.5 text-sm transition-colors ${e==="graph"?"bg-accent text-white":"text-stone hover:bg-node-border hover:text-bone"}`,children:S.jsx(Gz,{className:"h-4 w-4"})})}),S.jsx(w1,{children:S.jsxs(_1,{side:"bottom",className:"rounded bg-node-border px-2 py-1 text-xs text-bone shadow-md",children:["Graph view",S.jsx(S1,{className:"fill-node-border"})]})})]}),S.jsx("div",{className:"w-px bg-node-border"}),S.jsxs(x1,{children:[S.jsx(b1,{asChild:!0,children:S.jsx("button",{onClick:()=>t("list"),"aria-label":"List view",className:`flex items-center px-2.5 py-1.5 text-sm transition-colors ${e==="list"?"bg-accent text-white":"text-stone hover:bg-node-border hover:text-bone"}`,children:S.jsx($z,{className:"h-4 w-4"})})}),S.jsx(w1,{children:S.jsxs(_1,{side:"bottom",className:"rounded bg-node-border px-2 py-1 text-xs text-bone shadow-md",children:["List view",S.jsx(S1,{className:"fill-node-border"})]})})]})]})}),S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsxs("button",{onClick:u,className:"flex items-center gap-1.5 rounded-md bg-accent px-3 py-1.5 text-sm font-medium text-white transition-colors hover:opacity-90",children:[S.jsx(Uz,{className:"h-3.5 w-3.5"}),"Export YAML"]}),S.jsxs("button",{onClick:()=>void f(),className:"flex items-center gap-1.5 rounded-md border border-node-border px-3 py-1.5 text-sm font-medium text-stone transition-colors hover:border-accent hover:text-bone",children:[S.jsx(Bz,{className:"h-3.5 w-3.5"}),o?"Copied!":"Copy YAML"]})]}),S.jsxs("div",{className:"relative",children:[S.jsxs("select",{onChange:p=>h(p.target.value),defaultValue:"",className:"appearance-none rounded-md border border-node-border bg-node py-1.5 pl-3 pr-8 text-sm text-stone focus:border-accent focus:outline-none",children:[S.jsx("option",{value:"",disabled:!0,children:"Load template…"}),JL.map(p=>S.jsx("option",{value:p.value,children:p.label},p.value))]}),S.jsx(Hz,{className:"pointer-events-none absolute right-2 top-2 h-4 w-4 text-stone"})]})]})}const n8=[{value:"",label:"Always (no filter)"},{value:"frontend",label:"Frontend files"},{value:"backend",label:"Backend / API files"},{value:"socket",label:"WebSocket files"},{value:"visual",label:"Visual / Storybook"},{value:"python",label:"Python files"},{value:"go",label:"Go files"},{value:"rust",label:"Rust files"},{value:"java",label:"Java / Kotlin files"},{value:"ruby",label:"Ruby files"},{value:"database",label:"Database / migrations"},{value:"prisma",label:"Prisma schema"},{value:"testing",label:"Test files"},{value:"infra",label:"Infrastructure (Docker, Terraform, K8s)"},{value:"ci",label:"CI / CD pipelines"},{value:"docs",label:"Documentation"},{value:"__custom__",label:"Custom regex…"}],Dp=["frontend","backend","socket","visual","python","go","rust","java","ruby","database","prisma","testing","infra","ci","docs"];function i8(){var p;const{nodes:e,selectedNodeId:t,selectNode:r,updateNode:a,deleteNode:o}=Fi(),s=e.find(y=>y.id===t);if(!s)return null;const u=s.data,f={version:1,context:{guides:{}},conditions:[],checks:u.kind==="task"||u.kind==="prompt"?[{id:"preview",label:u.label,...u.cmd!==void 0?{cmd:u.cmd}:{},...u.prompt!==void 0?{prompt:u.prompt}:{}}]:[]};let h="";try{h=vm(f)}catch{}return S.jsxs("aside",{className:"flex w-80 shrink-0 flex-col border-l border-node-border bg-node",children:[S.jsxs("div",{className:"flex items-center justify-between border-b border-node-border px-4 py-3",children:[S.jsxs("span",{className:"text-sm font-semibold capitalize text-bone",children:[((p=u.kind)==null?void 0:p.replace("-"," "))??"Node"," properties"]}),S.jsxs("div",{className:"flex items-center gap-1",children:[S.jsx("button",{onClick:()=>o(s.id),className:"rounded p-1 text-stone hover:bg-red-500/20 hover:text-red-400",title:"Delete node",children:S.jsx(RS,{className:"h-4 w-4"})}),S.jsx("button",{onClick:()=>r(null),className:"rounded p-1 text-stone hover:bg-node-border hover:text-white",children:S.jsx(DS,{className:"h-4 w-4"})})]})]}),S.jsxs("div",{className:"flex-1 overflow-y-auto p-4 space-y-4",children:[S.jsxs("div",{children:[S.jsx("label",{className:"mb-1 block text-xs font-medium text-stone",children:"Label"}),S.jsx("input",{type:"text",value:u.label,onChange:y=>a(s.id,{label:y.target.value}),className:"w-full rounded-md border border-node-border bg-canvas px-3 py-1.5 text-sm text-bone focus:border-accent focus:outline-none",placeholder:"Check label…"})]}),(u.kind==="filter"||u.kind==="trigger")&&S.jsxs("div",{children:[S.jsx("label",{className:"mb-1 block text-xs font-medium text-stone",children:"File filter"}),S.jsx("select",{value:u.when?Dp.includes(u.when)?u.when:"__custom__":"",onChange:y=>{const g=y.target.value;g===""?a(s.id,{when:void 0}):g==="__custom__"?a(s.id,{when:u.when&&!Dp.includes(u.when)?u.when:""}):a(s.id,{when:g})},className:"w-full rounded-md border border-node-border bg-canvas px-3 py-1.5 text-sm text-bone focus:border-accent focus:outline-none",children:n8.map(y=>S.jsx("option",{value:y.value,children:y.label},y.value))}),u.when&&!Dp.includes(u.when)&&S.jsx("input",{type:"text",value:u.when,onChange:y=>a(s.id,{when:y.target.value}),className:"mt-2 w-full rounded-md border border-node-border bg-canvas px-3 py-1.5 font-mono text-sm text-bone focus:border-accent focus:outline-none",placeholder:"e.g. \\.test\\.ts$"})]}),u.kind==="task"&&S.jsxs("div",{children:[S.jsx("label",{className:"mb-1 block text-xs font-medium text-stone",children:"Command"}),S.jsx("input",{type:"text",value:u.cmd??"",onChange:y=>a(s.id,{cmd:y.target.value}),className:"w-full rounded-md border border-node-border bg-canvas px-3 py-1.5 font-mono text-sm text-bone focus:border-accent focus:outline-none",placeholder:"pnpm test --run"}),S.jsxs("div",{className:"mt-1 flex items-center gap-1.5",children:[S.jsx("div",{className:"h-2 w-2 rounded-full bg-green-500"}),S.jsx("span",{className:"text-xs text-stone/70",children:"Automated — blocks task completion on failure"})]})]}),u.kind==="prompt"&&S.jsxs("div",{children:[S.jsx("label",{className:"mb-1 block text-xs font-medium text-stone",children:"Prompt"}),S.jsx("textarea",{value:u.prompt??"",onChange:y=>a(s.id,{prompt:y.target.value}),rows:4,className:"w-full rounded-md border border-node-border bg-canvas px-3 py-1.5 font-mono text-sm text-bone focus:border-accent focus:outline-none",placeholder:"Describe what the agent must act on…"}),S.jsxs("div",{className:"mt-1 flex items-center gap-1.5",children:[S.jsx("div",{className:"h-2 w-2 rounded-full bg-amber-500"}),S.jsx("span",{className:"text-xs text-stone/70",children:"Agent reads and acts on this before marking task done"})]})]})]}),(u.kind==="task"||u.kind==="prompt")&&h&&S.jsxs("div",{className:"border-t border-node-border",children:[S.jsx("div",{className:"px-4 py-2 text-xs font-medium text-stone/70",children:"YAML preview"}),S.jsx("pre",{className:"max-h-48 overflow-y-auto px-4 pb-4 font-mono text-xs text-stone",children:h})]})]})}var jp="focusScope.autoFocusOnMount",zp="focusScope.autoFocusOnUnmount",E1={bubbles:!1,cancelable:!0},r8="FocusScope",vE=O.forwardRef((e,t)=>{const{loop:r=!1,trapped:a=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...u}=e,[f,h]=O.useState(null),p=Wo(o),y=Wo(s),g=O.useRef(null),v=Qn(t,w=>h(w)),x=O.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;O.useEffect(()=>{if(a){let w=function(A){if(x.paused||!f)return;const T=A.target;f.contains(T)?g.current=T:Dr(g.current,{select:!0})},E=function(A){if(x.paused||!f)return;const T=A.relatedTarget;T!==null&&(f.contains(T)||Dr(g.current,{select:!0}))},C=function(A){if(document.activeElement===document.body)for(const D of A)D.removedNodes.length>0&&Dr(f)};document.addEventListener("focusin",w),document.addEventListener("focusout",E);const N=new MutationObserver(C);return f&&N.observe(f,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",E),N.disconnect()}}},[a,f,x.paused]),O.useEffect(()=>{if(f){A1.add(x);const w=document.activeElement;if(!f.contains(w)){const C=new CustomEvent(jp,E1);f.addEventListener(jp,p),f.dispatchEvent(C),C.defaultPrevented||(a8(u8(xE(f)),{select:!0}),document.activeElement===w&&Dr(f))}return()=>{f.removeEventListener(jp,p),setTimeout(()=>{const C=new CustomEvent(zp,E1);f.addEventListener(zp,y),f.dispatchEvent(C),C.defaultPrevented||Dr(w??document.body,{select:!0}),f.removeEventListener(zp,y),A1.remove(x)},0)}}},[f,p,y,x]);const b=O.useCallback(w=>{if(!r&&!a||x.paused)return;const E=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,C=document.activeElement;if(E&&C){const N=w.currentTarget,[A,T]=o8(N);A&&T?!w.shiftKey&&C===T?(w.preventDefault(),r&&Dr(A,{select:!0})):w.shiftKey&&C===A&&(w.preventDefault(),r&&Dr(T,{select:!0})):C===N&&w.preventDefault()}},[r,a,x.paused]);return S.jsx(fn.div,{tabIndex:-1,...u,ref:v,onKeyDown:b})});vE.displayName=r8;function a8(e,{select:t=!1}={}){const r=document.activeElement;for(const a of e)if(Dr(a,{select:t}),document.activeElement!==r)return}function o8(e){const t=xE(e),r=C1(t,e),a=C1(t.reverse(),e);return[r,a]}function xE(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:a=>{const o=a.tagName==="INPUT"&&a.type==="hidden";return a.disabled||a.hidden||o?NodeFilter.FILTER_SKIP:a.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function C1(e,t){for(const r of e)if(!l8(r,{upTo:t}))return r}function l8(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function s8(e){return e instanceof HTMLInputElement&&"select"in e}function Dr(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&s8(e)&&t&&e.select()}}var A1=c8();function c8(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=N1(e,t),e.unshift(t)},remove(t){var r;e=N1(e,t),(r=e[0])==null||r.resume()}}}function N1(e,t){const r=[...e],a=r.indexOf(t);return a!==-1&&r.splice(a,1),r}function u8(e){return e.filter(t=>t.tagName!=="A")}var Lp=0;function f8(){O.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??T1()),document.body.insertAdjacentElement("beforeend",e[1]??T1()),Lp++,()=>{Lp===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Lp--}},[])}function T1(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var oi=function(){return oi=Object.assign||function(t){for(var r,a=1,o=arguments.length;a<o;a++){r=arguments[a];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},oi.apply(this,arguments)};function bE(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(r[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(r[a[o]]=e[a[o]]);return r}function d8(e,t,r){if(r||arguments.length===2)for(var a=0,o=t.length,s;a<o;a++)(s||!(a in t))&&(s||(s=Array.prototype.slice.call(t,0,a)),s[a]=t[a]);return e.concat(s||Array.prototype.slice.call(t))}var zu="right-scroll-bar-position",Lu="width-before-scroll-bar",h8="with-scroll-bars-hidden",p8="--removed-body-scroll-bar-size";function Hp(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function m8(e,t){var r=O.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(a){var o=r.value;o!==a&&(r.value=a,r.callback(a,o))}}}})[0];return r.callback=t,r.facade}var g8=typeof window<"u"?O.useLayoutEffect:O.useEffect,M1=new WeakMap;function y8(e,t){var r=m8(null,function(a){return e.forEach(function(o){return Hp(o,a)})});return g8(function(){var a=M1.get(r);if(a){var o=new Set(a),s=new Set(e),u=r.current;o.forEach(function(f){s.has(f)||Hp(f,null)}),s.forEach(function(f){o.has(f)||Hp(f,u)})}M1.set(r,e)},[e]),r}function v8(e){return e}function x8(e,t){t===void 0&&(t=v8);var r=[],a=!1,o={read:function(){if(a)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(s){var u=t(s,a);return r.push(u),function(){r=r.filter(function(f){return f!==u})}},assignSyncMedium:function(s){for(a=!0;r.length;){var u=r;r=[],u.forEach(s)}r={push:function(f){return s(f)},filter:function(){return r}}},assignMedium:function(s){a=!0;var u=[];if(r.length){var f=r;r=[],f.forEach(s),u=r}var h=function(){var y=u;u=[],y.forEach(s)},p=function(){return Promise.resolve().then(h)};p(),r={push:function(y){u.push(y),p()},filter:function(y){return u=u.filter(y),r}}}};return o}function b8(e){e===void 0&&(e={});var t=x8(null);return t.options=oi({async:!0,ssr:!1},e),t}var wE=function(e){var t=e.sideCar,r=bE(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var a=t.read();if(!a)throw new Error("Sidecar medium not found");return O.createElement(a,oi({},r))};wE.isSideCarExport=!0;function w8(e,t){return e.useMedium(t),wE}var _E=b8(),Bp=function(){},Lf=O.forwardRef(function(e,t){var r=O.useRef(null),a=O.useState({onScrollCapture:Bp,onWheelCapture:Bp,onTouchMoveCapture:Bp}),o=a[0],s=a[1],u=e.forwardProps,f=e.children,h=e.className,p=e.removeScrollBar,y=e.enabled,g=e.shards,v=e.sideCar,x=e.noRelative,b=e.noIsolation,w=e.inert,E=e.allowPinchZoom,C=e.as,N=C===void 0?"div":C,A=e.gapMode,T=bE(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),D=v,L=y8([r,t]),j=oi(oi({},T),o);return O.createElement(O.Fragment,null,y&&O.createElement(D,{sideCar:_E,removeScrollBar:p,shards:g,noRelative:x,noIsolation:b,inert:w,setCallbacks:s,allowPinchZoom:!!E,lockRef:r,gapMode:A}),u?O.cloneElement(O.Children.only(f),oi(oi({},j),{ref:L})):O.createElement(N,oi({},j,{className:h,ref:L}),f))});Lf.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Lf.classNames={fullWidth:Lu,zeroRight:zu};var _8=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function S8(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=_8();return t&&e.setAttribute("nonce",t),e}function E8(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function C8(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var A8=function(){var e=0,t=null;return{add:function(r){e==0&&(t=S8())&&(E8(t,r),C8(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},N8=function(){var e=A8();return function(t,r){O.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},SE=function(){var e=N8(),t=function(r){var a=r.styles,o=r.dynamic;return e(a,o),null};return t},T8={left:0,top:0,right:0,gap:0},Up=function(e){return parseInt(e||"",10)||0},M8=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],a=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Up(r),Up(a),Up(o)]},O8=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return T8;var t=M8(e),r=document.documentElement.clientWidth,a=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,a-r+t[2]-t[0])}},k8=SE(),Ho="data-scroll-locked",R8=function(e,t,r,a){var o=e.left,s=e.top,u=e.right,f=e.gap;return r===void 0&&(r="margin"),`
|
|
393
|
+
.`.concat(h8,` {
|
|
394
|
+
overflow: hidden `).concat(a,`;
|
|
395
|
+
padding-right: `).concat(f,"px ").concat(a,`;
|
|
396
|
+
}
|
|
397
|
+
body[`).concat(Ho,`] {
|
|
398
|
+
overflow: hidden `).concat(a,`;
|
|
399
|
+
overscroll-behavior: contain;
|
|
400
|
+
`).concat([t&&"position: relative ".concat(a,";"),r==="margin"&&`
|
|
401
|
+
padding-left: `.concat(o,`px;
|
|
402
|
+
padding-top: `).concat(s,`px;
|
|
403
|
+
padding-right: `).concat(u,`px;
|
|
404
|
+
margin-left:0;
|
|
405
|
+
margin-top:0;
|
|
406
|
+
margin-right: `).concat(f,"px ").concat(a,`;
|
|
407
|
+
`),r==="padding"&&"padding-right: ".concat(f,"px ").concat(a,";")].filter(Boolean).join(""),`
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
.`).concat(zu,` {
|
|
411
|
+
right: `).concat(f,"px ").concat(a,`;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
.`).concat(Lu,` {
|
|
415
|
+
margin-right: `).concat(f,"px ").concat(a,`;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
.`).concat(zu," .").concat(zu,` {
|
|
419
|
+
right: 0 `).concat(a,`;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
.`).concat(Lu," .").concat(Lu,` {
|
|
423
|
+
margin-right: 0 `).concat(a,`;
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
body[`).concat(Ho,`] {
|
|
427
|
+
`).concat(p8,": ").concat(f,`px;
|
|
428
|
+
}
|
|
429
|
+
`)},O1=function(){var e=parseInt(document.body.getAttribute(Ho)||"0",10);return isFinite(e)?e:0},D8=function(){O.useEffect(function(){return document.body.setAttribute(Ho,(O1()+1).toString()),function(){var e=O1()-1;e<=0?document.body.removeAttribute(Ho):document.body.setAttribute(Ho,e.toString())}},[])},j8=function(e){var t=e.noRelative,r=e.noImportant,a=e.gapMode,o=a===void 0?"margin":a;D8();var s=O.useMemo(function(){return O8(o)},[o]);return O.createElement(k8,{styles:R8(s,!t,o,r?"":"!important")})},Cm=!1;if(typeof window<"u")try{var bu=Object.defineProperty({},"passive",{get:function(){return Cm=!0,!0}});window.addEventListener("test",bu,bu),window.removeEventListener("test",bu,bu)}catch{Cm=!1}var So=Cm?{passive:!1}:!1,z8=function(e){return e.tagName==="TEXTAREA"},EE=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!z8(e)&&r[t]==="visible")},L8=function(e){return EE(e,"overflowY")},H8=function(e){return EE(e,"overflowX")},k1=function(e,t){var r=t.ownerDocument,a=t;do{typeof ShadowRoot<"u"&&a instanceof ShadowRoot&&(a=a.host);var o=CE(e,a);if(o){var s=AE(e,a),u=s[1],f=s[2];if(u>f)return!0}a=a.parentNode}while(a&&a!==r.body);return!1},B8=function(e){var t=e.scrollTop,r=e.scrollHeight,a=e.clientHeight;return[t,r,a]},U8=function(e){var t=e.scrollLeft,r=e.scrollWidth,a=e.clientWidth;return[t,r,a]},CE=function(e,t){return e==="v"?L8(t):H8(t)},AE=function(e,t){return e==="v"?B8(t):U8(t)},Y8=function(e,t){return e==="h"&&t==="rtl"?-1:1},$8=function(e,t,r,a,o){var s=Y8(e,window.getComputedStyle(t).direction),u=s*a,f=r.target,h=t.contains(f),p=!1,y=u>0,g=0,v=0;do{if(!f)break;var x=AE(e,f),b=x[0],w=x[1],E=x[2],C=w-E-s*b;(b||C)&&CE(e,f)&&(g+=C,v+=b);var N=f.parentNode;f=N&&N.nodeType===Node.DOCUMENT_FRAGMENT_NODE?N.host:N}while(!h&&f!==document.body||h&&(t.contains(f)||t===f));return(y&&Math.abs(g)<1||!y&&Math.abs(v)<1)&&(p=!0),p},wu=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},R1=function(e){return[e.deltaX,e.deltaY]},D1=function(e){return e&&"current"in e?e.current:e},V8=function(e,t){return e[0]===t[0]&&e[1]===t[1]},q8=function(e){return`
|
|
430
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
431
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
432
|
+
`)},G8=0,Eo=[];function I8(e){var t=O.useRef([]),r=O.useRef([0,0]),a=O.useRef(),o=O.useState(G8++)[0],s=O.useState(SE)[0],u=O.useRef(e);O.useEffect(function(){u.current=e},[e]),O.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var w=d8([e.lockRef.current],(e.shards||[]).map(D1),!0).filter(Boolean);return w.forEach(function(E){return E.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),w.forEach(function(E){return E.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var f=O.useCallback(function(w,E){if("touches"in w&&w.touches.length===2||w.type==="wheel"&&w.ctrlKey)return!u.current.allowPinchZoom;var C=wu(w),N=r.current,A="deltaX"in w?w.deltaX:N[0]-C[0],T="deltaY"in w?w.deltaY:N[1]-C[1],D,L=w.target,j=Math.abs(A)>Math.abs(T)?"h":"v";if("touches"in w&&j==="h"&&L.type==="range")return!1;var I=window.getSelection(),Z=I&&I.anchorNode,te=Z?Z===L||Z.contains(L):!1;if(te)return!1;var G=k1(j,L);if(!G)return!0;if(G?D=j:(D=j==="v"?"h":"v",G=k1(j,L)),!G)return!1;if(!a.current&&"changedTouches"in w&&(A||T)&&(a.current=D),!D)return!0;var q=a.current||D;return $8(q,E,w,q==="h"?A:T)},[]),h=O.useCallback(function(w){var E=w;if(!(!Eo.length||Eo[Eo.length-1]!==s)){var C="deltaY"in E?R1(E):wu(E),N=t.current.filter(function(D){return D.name===E.type&&(D.target===E.target||E.target===D.shadowParent)&&V8(D.delta,C)})[0];if(N&&N.should){E.cancelable&&E.preventDefault();return}if(!N){var A=(u.current.shards||[]).map(D1).filter(Boolean).filter(function(D){return D.contains(E.target)}),T=A.length>0?f(E,A[0]):!u.current.noIsolation;T&&E.cancelable&&E.preventDefault()}}},[]),p=O.useCallback(function(w,E,C,N){var A={name:w,delta:E,target:C,should:N,shadowParent:Z8(C)};t.current.push(A),setTimeout(function(){t.current=t.current.filter(function(T){return T!==A})},1)},[]),y=O.useCallback(function(w){r.current=wu(w),a.current=void 0},[]),g=O.useCallback(function(w){p(w.type,R1(w),w.target,f(w,e.lockRef.current))},[]),v=O.useCallback(function(w){p(w.type,wu(w),w.target,f(w,e.lockRef.current))},[]);O.useEffect(function(){return Eo.push(s),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:v}),document.addEventListener("wheel",h,So),document.addEventListener("touchmove",h,So),document.addEventListener("touchstart",y,So),function(){Eo=Eo.filter(function(w){return w!==s}),document.removeEventListener("wheel",h,So),document.removeEventListener("touchmove",h,So),document.removeEventListener("touchstart",y,So)}},[]);var x=e.removeScrollBar,b=e.inert;return O.createElement(O.Fragment,null,b?O.createElement(s,{styles:q8(o)}):null,x?O.createElement(j8,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Z8(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const X8=w8(_E,I8);var NE=O.forwardRef(function(e,t){return O.createElement(Lf,oi({},e,{ref:t,sideCar:X8}))});NE.classNames=Lf.classNames;var F8=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Co=new WeakMap,_u=new WeakMap,Su={},Yp=0,TE=function(e){return e&&(e.host||TE(e.parentNode))},Q8=function(e,t){return t.map(function(r){if(e.contains(r))return r;var a=TE(r);return a&&e.contains(a)?a:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},P8=function(e,t,r,a){var o=Q8(t,Array.isArray(e)?e:[e]);Su[r]||(Su[r]=new WeakMap);var s=Su[r],u=[],f=new Set,h=new Set(o),p=function(g){!g||f.has(g)||(f.add(g),p(g.parentNode))};o.forEach(p);var y=function(g){!g||h.has(g)||Array.prototype.forEach.call(g.children,function(v){if(f.has(v))y(v);else try{var x=v.getAttribute(a),b=x!==null&&x!=="false",w=(Co.get(v)||0)+1,E=(s.get(v)||0)+1;Co.set(v,w),s.set(v,E),u.push(v),w===1&&b&&_u.set(v,!0),E===1&&v.setAttribute(r,"true"),b||v.setAttribute(a,"true")}catch(C){console.error("aria-hidden: cannot operate on ",v,C)}})};return y(t),f.clear(),Yp++,function(){u.forEach(function(g){var v=Co.get(g)-1,x=s.get(g)-1;Co.set(g,v),s.set(g,x),v||(_u.has(g)||g.removeAttribute(a),_u.delete(g)),x||g.removeAttribute(r)}),Yp--,Yp||(Co=new WeakMap,Co=new WeakMap,_u=new WeakMap,Su={})}},K8=function(e,t,r){r===void 0&&(r="data-aria-hidden");var a=Array.from(Array.isArray(e)?e:[e]),o=F8(e);return o?(a.push.apply(a,Array.from(o.querySelectorAll("[aria-live], script"))),P8(a,o,r,"aria-hidden")):function(){return null}},Hf="Dialog",[ME]=Wm(Hf),[W8,Pn]=ME(Hf),OE=e=>{const{__scopeDialog:t,children:r,open:a,defaultOpen:o,onOpenChange:s,modal:u=!0}=e,f=O.useRef(null),h=O.useRef(null),[p,y]=lE({prop:a,defaultProp:o??!1,onChange:s,caller:Hf});return S.jsx(W8,{scope:t,triggerRef:f,contentRef:h,contentId:Du(),titleId:Du(),descriptionId:Du(),open:p,onOpenChange:y,onOpenToggle:O.useCallback(()=>y(g=>!g),[y]),modal:u,children:r})};OE.displayName=Hf;var kE="DialogTrigger",J8=O.forwardRef((e,t)=>{const{__scopeDialog:r,...a}=e,o=Pn(kE,r),s=Qn(t,o.triggerRef);return S.jsx(fn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":hg(o.open),...a,ref:s,onClick:on(e.onClick,o.onOpenToggle)})});J8.displayName=kE;var fg="DialogPortal",[e9,RE]=ME(fg,{forceMount:void 0}),DE=e=>{const{__scopeDialog:t,forceMount:r,children:a,container:o}=e,s=Pn(fg,t);return S.jsx(e9,{scope:t,forceMount:r,children:O.Children.map(a,u=>S.jsx(rl,{present:r||s.open,children:S.jsx(sg,{asChild:!0,container:o,children:u})}))})};DE.displayName=fg;var ff="DialogOverlay",jE=O.forwardRef((e,t)=>{const r=RE(ff,e.__scopeDialog),{forceMount:a=r.forceMount,...o}=e,s=Pn(ff,e.__scopeDialog);return s.modal?S.jsx(rl,{present:a||s.open,children:S.jsx(n9,{...o,ref:t})}):null});jE.displayName=ff;var t9=zS("DialogOverlay.RemoveScroll"),n9=O.forwardRef((e,t)=>{const{__scopeDialog:r,...a}=e,o=Pn(ff,r);return S.jsx(NE,{as:t9,allowPinchZoom:!0,shards:[o.contentRef],children:S.jsx(fn.div,{"data-state":hg(o.open),...a,ref:t,style:{pointerEvents:"auto",...a.style}})})}),Ra="DialogContent",zE=O.forwardRef((e,t)=>{const r=RE(Ra,e.__scopeDialog),{forceMount:a=r.forceMount,...o}=e,s=Pn(Ra,e.__scopeDialog);return S.jsx(rl,{present:a||s.open,children:s.modal?S.jsx(i9,{...o,ref:t}):S.jsx(r9,{...o,ref:t})})});zE.displayName=Ra;var i9=O.forwardRef((e,t)=>{const r=Pn(Ra,e.__scopeDialog),a=O.useRef(null),o=Qn(t,r.contentRef,a);return O.useEffect(()=>{const s=a.current;if(s)return K8(s)},[]),S.jsx(LE,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:on(e.onCloseAutoFocus,s=>{var u;s.preventDefault(),(u=r.triggerRef.current)==null||u.focus()}),onPointerDownOutside:on(e.onPointerDownOutside,s=>{const u=s.detail.originalEvent,f=u.button===0&&u.ctrlKey===!0;(u.button===2||f)&&s.preventDefault()}),onFocusOutside:on(e.onFocusOutside,s=>s.preventDefault())})}),r9=O.forwardRef((e,t)=>{const r=Pn(Ra,e.__scopeDialog),a=O.useRef(!1),o=O.useRef(!1);return S.jsx(LE,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var u,f;(u=e.onCloseAutoFocus)==null||u.call(e,s),s.defaultPrevented||(a.current||(f=r.triggerRef.current)==null||f.focus(),s.preventDefault()),a.current=!1,o.current=!1},onInteractOutside:s=>{var h,p;(h=e.onInteractOutside)==null||h.call(e,s),s.defaultPrevented||(a.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const u=s.target;((p=r.triggerRef.current)==null?void 0:p.contains(u))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),LE=O.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:a,onOpenAutoFocus:o,onCloseAutoFocus:s,...u}=e,f=Pn(Ra,r),h=O.useRef(null),p=Qn(t,h);return f8(),S.jsxs(S.Fragment,{children:[S.jsx(vE,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:o,onUnmountAutoFocus:s,children:S.jsx(Jm,{role:"dialog",id:f.contentId,"aria-describedby":f.descriptionId,"aria-labelledby":f.titleId,"data-state":hg(f.open),...u,ref:p,onDismiss:()=>f.onOpenChange(!1)})}),S.jsxs(S.Fragment,{children:[S.jsx(a9,{titleId:f.titleId}),S.jsx(l9,{contentRef:h,descriptionId:f.descriptionId})]})]})}),dg="DialogTitle",HE=O.forwardRef((e,t)=>{const{__scopeDialog:r,...a}=e,o=Pn(dg,r);return S.jsx(fn.h2,{id:o.titleId,...a,ref:t})});HE.displayName=dg;var BE="DialogDescription",UE=O.forwardRef((e,t)=>{const{__scopeDialog:r,...a}=e,o=Pn(BE,r);return S.jsx(fn.p,{id:o.descriptionId,...a,ref:t})});UE.displayName=BE;var YE="DialogClose",$E=O.forwardRef((e,t)=>{const{__scopeDialog:r,...a}=e,o=Pn(YE,r);return S.jsx(fn.button,{type:"button",...a,ref:t,onClick:on(e.onClick,()=>o.onOpenChange(!1))})});$E.displayName=YE;function hg(e){return e?"open":"closed"}var VE="DialogTitleWarning",[T9,qE]=Iz(VE,{contentName:Ra,titleName:dg,docsSlug:"dialog"}),a9=({titleId:e})=>{const t=qE(VE),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
433
|
+
|
|
434
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
435
|
+
|
|
436
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return O.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},o9="DialogDescriptionWarning",l9=({contentRef:e,descriptionId:t})=>{const a=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${qE(o9).contentName}}.`;return O.useEffect(()=>{var s;const o=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(a))},[a,e,t]),null},s9=OE,c9=DE,u9=jE,f9=zE,d9=HE,h9=UE,pg=$E;const p9=[{value:"",label:"Always (no filter)"},{value:"frontend",label:"Frontend files"},{value:"backend",label:"Backend / API files"},{value:"socket",label:"WebSocket files"},{value:"visual",label:"Visual / Storybook"},{value:"python",label:"Python files"},{value:"go",label:"Go files"},{value:"rust",label:"Rust files"},{value:"java",label:"Java / Kotlin files"},{value:"ruby",label:"Ruby files"},{value:"database",label:"Database / migrations"},{value:"prisma",label:"Prisma schema"},{value:"testing",label:"Test files"},{value:"infra",label:"Infrastructure (Docker, Terraform, K8s)"},{value:"ci",label:"CI / CD pipelines"},{value:"docs",label:"Documentation"}],m9=["frontend","backend","socket","visual","python","go","rust","java","ruby","database","prisma","testing","infra","ci","docs"],g9={frontend:"border-blue-500/30 bg-blue-500/10 text-blue-400",backend:"border-green-500/30 bg-green-500/10 text-green-400",socket:"border-orange-500/30 bg-orange-500/10 text-orange-400",visual:"border-pink-500/30 bg-pink-500/10 text-pink-400",python:"border-amber-500/30 bg-amber-500/10 text-amber-400",go:"border-cyan-500/30 bg-cyan-500/10 text-cyan-400",rust:"border-red-500/30 bg-red-500/10 text-red-400",java:"border-orange-400/30 bg-orange-400/10 text-orange-300",ruby:"border-rose-500/30 bg-rose-500/10 text-rose-400",database:"border-emerald-500/30 bg-emerald-500/10 text-emerald-400",prisma:"border-purple-500/30 bg-purple-500/10 text-purple-400",testing:"border-lime-500/30 bg-lime-500/10 text-lime-400",infra:"border-stone-500/30 bg-stone-500/10 text-stone-400",ci:"border-yellow-500/30 bg-yellow-500/10 text-yellow-400",docs:"border-sky-500/30 bg-sky-500/10 text-sky-400"};function y9(e){return g9[e]??"border-sky-500/30 bg-sky-500/10 text-sky-400"}const v9={before_done:"Task Complete",before_commit:"Before Commit",on_complete:"On Complete"};function GE(e){return v9[e]??e}function jn({children:e}){return S.jsx("label",{className:"mb-1.5 block text-xs font-medium text-stone",children:e})}function Ea(e){return S.jsx("input",{...e,className:"w-full rounded-md border border-node-border bg-canvas px-3 py-2 text-sm text-bone placeholder-stone/40 focus:border-accent focus:outline-none"})}function IE(e){return S.jsx("textarea",{rows:4,...e,className:"w-full resize-none rounded-md border border-node-border bg-canvas px-3 py-2 font-mono text-sm text-bone placeholder-stone/40 focus:border-accent focus:outline-none"})}function x9(e){return S.jsx("select",{...e,className:"w-full rounded-md border border-node-border bg-canvas px-3 py-2 text-sm text-bone focus:border-accent focus:outline-none"})}function ZE({value:e,onChange:t}){return S.jsxs("div",{className:"flex overflow-hidden rounded-md border border-node-border",children:[S.jsxs("button",{type:"button",onClick:()=>t("task"),className:`flex flex-1 items-center justify-center gap-1.5 py-2 text-xs font-medium transition-colors ${e==="task"?"bg-green-500/20 text-green-400":"text-stone hover:text-bone"}`,children:[S.jsx(kS,{className:"h-3.5 w-3.5"}),"cmd"]}),S.jsx("div",{className:"w-px bg-node-border"}),S.jsxs("button",{type:"button",onClick:()=>t("prompt"),className:`flex flex-1 items-center justify-center gap-1.5 py-2 text-xs font-medium transition-colors ${e==="prompt"?"bg-amber-500/20 text-amber-400":"text-stone hover:text-bone"}`,children:[S.jsx(OS,{className:"h-3.5 w-3.5"}),"prompt"]})]})}function XE({value:e,onChange:t}){const r=e!==""&&!m9.includes(e),a=r?"__custom__":e;return S.jsxs("div",{className:"space-y-2",children:[S.jsxs(x9,{value:a,onChange:o=>{const s=o.target.value;t(s==="__custom__"?r?e:"":s)},children:[p9.map(o=>S.jsx("option",{value:o.value,children:o.label},o.value)),S.jsx("option",{value:"__custom__",children:"Custom regex…"})]}),r&&S.jsx(Ea,{value:e,onChange:o=>t(o.target.value),placeholder:"e.g. \\.test\\.ts$",className:"font-mono"})]})}function FE({open:e,onOpenChange:t,title:r,description:a,children:o}){return S.jsx(s9,{open:e,onOpenChange:t,children:S.jsxs(c9,{children:[S.jsx(u9,{className:"fixed inset-0 z-40 bg-black/60 backdrop-blur-sm"}),S.jsxs(f9,{className:"fixed left-1/2 top-1/2 z-50 w-full max-w-md -translate-x-1/2 -translate-y-1/2 rounded-xl border border-node-border bg-node p-6 shadow-2xl focus:outline-none",children:[S.jsxs("div",{className:"mb-4 flex items-start justify-between gap-4",children:[S.jsxs("div",{children:[S.jsx(d9,{className:"text-base font-semibold text-bone",children:r}),a&&S.jsx(h9,{className:"mt-0.5 text-xs text-stone/70",children:a})]}),S.jsx(pg,{className:"mt-0.5 shrink-0 rounded p-1 text-stone/70 hover:bg-node-border hover:text-bone",children:S.jsx(DS,{className:"h-4 w-4"})})]}),o]})]})})}function b9({open:e,onOpenChange:t,check:r,nodeId:a}){const{updateCheckNode:o,deleteNode:s}=Fi(),[u,f]=Ve.useState(r.label),[h,p]=Ve.useState(r.cmd!==void 0?"task":"prompt"),[y,g]=Ve.useState(r.cmd??""),[v,x]=Ve.useState(r.prompt??""),[b,w]=Ve.useState(r.when??""),[E,C]=Ve.useState(r.conditionId??""),[N,A]=Ve.useState(!1);Ve.useEffect(()=>{e&&(f(r.label),p(r.cmd!==void 0?"task":"prompt"),g(r.cmd??""),x(r.prompt??""),w(r.when??""),C(r.conditionId??""),A(!1))},[e,r]);const T=r.on??"before_done",D=b!==(r.when??""),L=r.cmd!==void 0?"task":"prompt",j=()=>{const Z={label:u,conditionId:E,...h==="task"?{cmd:y}:{prompt:v},...D?{when:b,hookEvent:T}:{}};h!==L&&(Z.type=h),o(a,Z),t(!1)},I=()=>{if(!N){A(!0),setTimeout(()=>A(!1),3e3);return}s(a),t(!1)};return S.jsx(FE,{open:e,onOpenChange:t,title:"Edit Check",description:"Changes apply to both the list and graph views.",children:S.jsxs("div",{className:"space-y-4",children:[S.jsxs("div",{children:[S.jsx(jn,{children:"Label"}),S.jsx(Ea,{value:u,onChange:Z=>f(Z.target.value),placeholder:"Check label…"})]}),S.jsxs("div",{children:[S.jsx(jn,{children:"Type"}),S.jsx(ZE,{value:h,onChange:p})]}),h==="task"?S.jsxs("div",{children:[S.jsx(jn,{children:"Command"}),S.jsx(Ea,{value:y,onChange:Z=>g(Z.target.value),placeholder:"pnpm test --run",className:"font-mono"}),S.jsx("p",{className:"mt-1 text-xs text-stone/50",children:"Runs automatically — blocks on failure"})]}):S.jsxs("div",{children:[S.jsx(jn,{children:"Prompt"}),S.jsx(IE,{value:v,onChange:Z=>x(Z.target.value),placeholder:"Describe what the agent must check before finishing…"})]}),S.jsxs("div",{children:[S.jsx(jn,{children:"File filter (when)"}),S.jsx(XE,{value:b,onChange:w})]}),S.jsxs("div",{children:[S.jsxs(jn,{children:["Condition ID ",S.jsx("span",{className:"text-stone/50",children:"(optional)"})]}),S.jsx(Ea,{value:E,onChange:Z=>C(Z.target.value),placeholder:"e.g. has-openapi"})]}),S.jsxs("div",{className:"flex items-center justify-between border-t border-node-border pt-4",children:[S.jsxs("button",{type:"button",onClick:I,className:`flex items-center gap-1.5 rounded-md px-3 py-1.5 text-sm font-medium transition-colors ${N?"bg-red-500 text-white":"border border-red-500/30 text-red-400 hover:bg-red-500/10"}`,children:[S.jsx(RS,{className:"h-3.5 w-3.5"}),N?"Confirm delete":"Delete"]}),S.jsxs("div",{className:"flex gap-2",children:[S.jsx(pg,{className:"rounded-md border border-node-border px-3 py-1.5 text-sm text-stone hover:border-accent hover:text-white",children:"Cancel"}),S.jsx("button",{type:"button",onClick:j,disabled:!u.trim(),className:"rounded-md bg-accent px-3 py-1.5 text-sm font-medium text-white hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-40",children:"Save"})]})]})]})})}function j1({open:e,onOpenChange:t,hookEvent:r,when:a}){const{addCheckToGroup:o}=Fi(),[s,u]=Ve.useState(""),[f,h]=Ve.useState("task"),[p,y]=Ve.useState(""),[g,v]=Ve.useState(""),[x,b]=Ve.useState(a??""),[w,E]=Ve.useState("");Ve.useEffect(()=>{e&&(u(""),h("task"),y(""),v(""),b(a??""),E(""))},[e,a]);const C=()=>{o(r,x||void 0,f,{label:s,...f==="task"?{cmd:p}:{prompt:g},...w?{conditionId:w}:{}}),t(!1)};return S.jsx(FE,{open:e,onOpenChange:t,title:"Add Check",description:`Adding to hook: ${GE(r)}${x?` · when: ${x}`:""}`,children:S.jsxs("div",{className:"space-y-4",children:[S.jsxs("div",{children:[S.jsx(jn,{children:"Label"}),S.jsx(Ea,{value:s,onChange:N=>u(N.target.value),placeholder:"Check label…",autoFocus:!0})]}),S.jsxs("div",{children:[S.jsx(jn,{children:"Type"}),S.jsx(ZE,{value:f,onChange:h})]}),f==="task"?S.jsxs("div",{children:[S.jsx(jn,{children:"Command"}),S.jsx(Ea,{value:p,onChange:N=>y(N.target.value),placeholder:"pnpm test --run",className:"font-mono"})]}):S.jsxs("div",{children:[S.jsx(jn,{children:"Prompt"}),S.jsx(IE,{value:g,onChange:N=>v(N.target.value),placeholder:"Describe what the agent must check before finishing…"})]}),S.jsxs("div",{children:[S.jsx(jn,{children:"File filter (when)"}),S.jsx(XE,{value:x,onChange:b})]}),S.jsxs("div",{children:[S.jsxs(jn,{children:["Condition ID ",S.jsx("span",{className:"text-stone/50",children:"(optional)"})]}),S.jsx(Ea,{value:w,onChange:N=>E(N.target.value),placeholder:"e.g. has-openapi"})]}),S.jsxs("div",{className:"flex justify-end gap-2 border-t border-node-border pt-4",children:[S.jsx(pg,{className:"rounded-md border border-node-border px-3 py-1.5 text-sm text-stone hover:border-accent hover:text-white",children:"Cancel"}),S.jsxs("button",{type:"button",onClick:C,disabled:!s.trim(),className:"flex items-center gap-1.5 rounded-md bg-accent px-3 py-1.5 text-sm font-medium text-white hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-40",children:[S.jsx(Ru,{className:"h-3.5 w-3.5"}),"Add Check"]})]})]})})}function w9({check:e,nodeId:t}){const[r,a]=Ve.useState(!1),o=!!e.cmd;return S.jsxs(S.Fragment,{children:[S.jsxs("div",{className:`group relative overflow-hidden rounded-lg border bg-node transition-colors ${o?"border-green-500/25 hover:border-green-500/45":"border-amber-500/25 hover:border-amber-500/45"}`,children:[S.jsx("div",{className:`absolute inset-y-0 left-0 w-1 ${o?"bg-green-500":"bg-amber-500"}`}),S.jsxs("div",{className:"p-3 pl-4",children:[S.jsxs("div",{className:"mb-2 flex items-start justify-between gap-2",children:[S.jsx("span",{className:"text-sm font-medium leading-snug text-bone",children:e.label}),S.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[S.jsx("span",{className:`rounded border px-1.5 py-0.5 font-mono text-xs ${o?"border-green-500/30 bg-green-500/10 text-green-400":"border-amber-500/30 bg-amber-500/10 text-amber-400"}`,children:o?"cmd":"prompt"}),S.jsx("button",{onClick:()=>a(!0),className:"rounded p-0.5 text-stone/50 opacity-0 transition-opacity hover:bg-node-border hover:text-bone group-hover:opacity-100",title:"Edit check",children:S.jsx(Vz,{className:"h-3.5 w-3.5"})})]})]}),o?S.jsxs("div",{className:"flex items-start gap-1.5",children:[S.jsx(kS,{className:"mt-0.5 h-3.5 w-3.5 shrink-0 text-green-500/50"}),S.jsx("code",{className:"break-all text-xs text-stone",children:e.cmd})]}):S.jsxs("div",{className:"flex items-start gap-1.5",children:[S.jsx(OS,{className:"mt-0.5 h-3.5 w-3.5 shrink-0 text-amber-500/50"}),S.jsx("p",{className:"line-clamp-3 text-xs text-stone",children:e.prompt})]}),S.jsxs("div",{className:"mt-2.5 flex flex-wrap items-center gap-1.5",children:[e.when&&S.jsx("span",{className:`rounded border px-1.5 py-0.5 text-xs ${y9(e.when)}`,children:e.when}),e.conditionId&&S.jsxs("span",{className:"rounded border border-yellow-500/30 bg-yellow-500/10 px-1.5 py-0.5 text-xs text-yellow-400",children:["if: ",e.conditionId]}),S.jsx("span",{className:"ml-auto font-mono text-xs text-stone/50",children:e.id})]})]})]}),S.jsx(b9,{open:r,onOpenChange:a,check:e,nodeId:t})]})}function _9(){const{nodes:e,edges:t}=Fi(),r=Ve.useMemo(()=>kz(e,t),[e,t]),a=Ve.useMemo(()=>{const f=new Map;for(const h of r){const p=h.check.on??"before_done";f.has(p)||f.set(p,[]),f.get(p).push(h)}return f},[r]),o=Ve.useMemo(()=>e.filter(f=>f.data.kind==="condition"&&f.data.condition),[e]),[s,u]=Ve.useState(null);return r.length===0?S.jsxs("div",{className:"flex h-full items-center justify-center",children:[S.jsxs("div",{className:"text-center",children:[S.jsx(r1,{className:"mx-auto mb-3 h-10 w-10 text-stone/30"}),S.jsx("p",{className:"text-sm text-stone/70",children:"No checks configured yet."}),S.jsx("p",{className:"mt-1 text-xs text-stone/50",children:"Switch to Graph view to add nodes."}),S.jsxs("button",{onClick:()=>u({hookEvent:"before_done",when:void 0}),className:"mt-4 flex items-center gap-1.5 rounded-md bg-accent px-3 py-1.5 text-sm font-medium text-white hover:opacity-90 mx-auto",children:[S.jsx(Ru,{className:"h-3.5 w-3.5"}),"Add first check"]})]}),s&&S.jsx(j1,{open:!!s,onOpenChange:f=>!f&&u(null),hookEvent:s.hookEvent,when:s.when})]}):S.jsxs("div",{className:"h-full overflow-y-auto bg-canvas p-6",children:[S.jsxs("div",{className:"mx-auto max-w-4xl space-y-8",children:[o.length>0&&S.jsxs("section",{children:[S.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[S.jsx(qz,{className:"h-4 w-4 text-yellow-400"}),S.jsx("h2",{className:"text-xs font-semibold uppercase tracking-widest text-yellow-400",children:"Conditions"})]}),S.jsx("div",{className:"flex flex-wrap gap-2",children:o.map(f=>{const h=f.data.condition;return S.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-md border border-yellow-500/30 bg-yellow-500/10 px-2.5 py-1 text-xs text-yellow-300",children:[S.jsx("span",{className:"font-mono font-semibold",children:h.id}),S.jsx("span",{className:"text-yellow-600",children:"·"}),S.jsx("span",{className:"text-yellow-400/80",children:h.operator}),h.path&&S.jsxs(S.Fragment,{children:[S.jsx("span",{className:"text-yellow-600",children:"·"}),S.jsx("span",{className:"font-mono text-yellow-400/60",children:h.path})]})]},h.id)})})]}),[...a.entries()].map(([f,h])=>{const p=new Map;for(const y of h){const g=y.check.when??"__all__";p.has(g)||p.set(g,[]),p.get(g).push(y)}return S.jsxs("section",{children:[S.jsxs("div",{className:"mb-4 flex items-center gap-3",children:[S.jsxs("div",{className:"flex h-8 items-center gap-2 rounded-full border border-accent/40 bg-accent/10 px-3",children:[S.jsx(r1,{className:"h-3.5 w-3.5 text-accent"}),S.jsx("span",{className:"text-sm font-semibold text-bone",children:GE(f)})]}),S.jsx("div",{className:"h-px flex-1 bg-accent/20"}),S.jsxs("span",{className:"text-xs text-stone/50",children:[h.length," check",h.length!==1?"s":""]}),S.jsxs("button",{onClick:()=>u({hookEvent:f,when:void 0}),className:"flex items-center gap-1 rounded-md border border-accent/30 bg-accent/10 px-2 py-1 text-xs text-accent hover:bg-accent/20",children:[S.jsx(Ru,{className:"h-3 w-3"}),"Add"]})]}),S.jsx("div",{className:"space-y-5",children:[...p.entries()].map(([y,g])=>{const v=y!=="__all__"?y:void 0;return S.jsxs("div",{children:[y!=="__all__"&&S.jsxs("div",{className:"mb-2.5 flex items-center gap-2",children:[S.jsx(Yz,{className:"h-3 w-3 text-sky-400"}),S.jsxs("span",{className:"text-xs font-medium text-sky-400",children:["when: ",y]}),S.jsx("div",{className:"h-px flex-1 bg-sky-500/15"}),S.jsxs("button",{onClick:()=>u({hookEvent:f,when:v}),className:"flex items-center gap-1 rounded-md border border-sky-500/30 bg-sky-500/10 px-2 py-1 text-xs text-sky-400 hover:bg-sky-500/20",children:[S.jsx(Ru,{className:"h-3 w-3"}),"Add"]})]}),S.jsx("div",{className:"grid gap-3 sm:grid-cols-2 xl:grid-cols-3",children:g.map(({check:x,nodeId:b})=>S.jsx(w9,{check:x,nodeId:b},b))})]},y)})})]},f)})]}),s&&S.jsx(j1,{open:!!s,onOpenChange:f=>!f&&u(null),hookEvent:s.hookEvent,when:s.when})]})}function S9(){const{addNode:e}=Fi(),t=()=>{e({id:`trigger-${Date.now()}`,type:"trigger",position:{x:80,y:100+Math.random()*200},data:{kind:"trigger",label:"Trigger"}})},r=()=>{e({id:`filter-${Date.now()}`,type:"filter",position:{x:230,y:100+Math.random()*200},data:{kind:"filter",label:".*",when:".*"}})},a=()=>{e({id:`task-${Date.now()}`,type:"task",position:{x:450,y:100+Math.random()*200},data:{kind:"task",label:"New task",cmd:""}})},o=()=>{e({id:`prompt-${Date.now()}`,type:"prompt",position:{x:450,y:100+Math.random()*200},data:{kind:"prompt",label:"New prompt",prompt:""}})},s=()=>{e({id:`condition-${Date.now()}`,type:"condition",position:{x:230,y:100+Math.random()*200},data:{kind:"condition",label:"Condition"}})};return S.jsxs("div",{className:"flex items-center gap-2 border-b border-node-border bg-node px-4 py-2",children:[S.jsx("span",{className:"text-xs font-medium text-stone/70",children:"Add node:"}),S.jsx("button",{onClick:t,className:"rounded border border-accent/30 bg-accent/10 px-2.5 py-1 text-xs text-accent hover:bg-accent/20",children:"+ Trigger"}),S.jsx("button",{onClick:r,className:"rounded border border-sky-500/30 bg-sky-500/10 px-2.5 py-1 text-xs text-sky-400 hover:bg-sky-500/20",children:"+ Filter"}),S.jsx("button",{onClick:a,className:"rounded border border-green-500/30 bg-green-500/10 px-2.5 py-1 text-xs text-green-400 hover:bg-green-500/20",children:"+ Task"}),S.jsx("button",{onClick:o,className:"rounded border border-amber-500/30 bg-amber-500/10 px-2.5 py-1 text-xs text-amber-400 hover:bg-amber-500/20",children:"+ Prompt"}),S.jsx("button",{onClick:s,className:"rounded border border-yellow-500/30 bg-yellow-500/10 px-2.5 py-1 text-xs text-yellow-400 hover:bg-yellow-500/20",children:"+ Condition"})]})}function E9(){const{loadFromYaml:e}=Fi(),[t,r]=Ve.useState("graph");return Ve.useEffect(()=>{fetch("/__holdpoint/initial-yaml").then(a=>a.ok?a.text():null).then(a=>{a&&Fi.getState().nodes.length===0&&e(a)}).catch(()=>{})},[]),Ve.useEffect(()=>{},[]),S.jsx(w_,{children:S.jsxs("div",{className:"flex h-screen flex-col bg-canvas",children:[S.jsx(t8,{viewMode:t,onViewChange:r}),t==="graph"&&S.jsx(S9,{}),S.jsx("div",{className:"flex flex-1 overflow-hidden",children:t==="graph"?S.jsxs(S.Fragment,{children:[S.jsx("div",{className:"flex-1",children:S.jsx(Dz,{})}),S.jsx(i8,{})]}):S.jsx(_9,{})})]})})}dA.createRoot(document.getElementById("root")).render(S.jsx(Ve.StrictMode,{children:S.jsx(E9,{})}));
|
|
437
|
+
//# sourceMappingURL=index-BxfWKnb5.js.map
|