agent-dealer 0.1.7 → 0.1.8

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.
@@ -0,0 +1,78 @@
1
+ (function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const f of o.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&r(f)}).observe(document,{childList:!0,subtree:!0});function i(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(s){if(s.ep)return;s.ep=!0;const o=i(s);fetch(s.href,o)}})();function jy(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Yc={exports:{}},dr={};/**
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 dg;function Ab(){if(dg)return dr;dg=1;var t=Symbol.for("react.transitional.element"),l=Symbol.for("react.fragment");function i(r,s,o){var f=null;if(o!==void 0&&(f=""+o),s.key!==void 0&&(f=""+s.key),"key"in s){o={};for(var h in s)h!=="key"&&(o[h]=s[h])}else o=s;return s=o.ref,{$$typeof:t,type:r,key:f,ref:s!==void 0?s:null,props:o}}return dr.Fragment=l,dr.jsx=i,dr.jsxs=i,dr}var hg;function jb(){return hg||(hg=1,Yc.exports=Ab()),Yc.exports}var g=jb(),Zc={exports:{}},Ne={};/**
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 mg;function Nb(){if(mg)return Ne;mg=1;var t=Symbol.for("react.transitional.element"),l=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),f=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),k=Symbol.iterator;function v(A){return A===null||typeof A!="object"?null:(A=k&&A[k]||A["@@iterator"],typeof A=="function"?A:null)}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},R=Object.assign,H={};function N(A,F,S){this.props=A,this.context=F,this.refs=H,this.updater=S||_}N.prototype.isReactComponent={},N.prototype.setState=function(A,F){if(typeof A!="object"&&typeof A!="function"&&A!=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,A,F,"setState")},N.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function Z(){}Z.prototype=N.prototype;function q(A,F,S){this.props=A,this.context=F,this.refs=H,this.updater=S||_}var te=q.prototype=new Z;te.constructor=q,R(te,N.prototype),te.isPureReactComponent=!0;var ee=Array.isArray;function O(){}var P={H:null,A:null,T:null,S:null},oe=Object.prototype.hasOwnProperty;function fe(A,F,S){var re=S.ref;return{$$typeof:t,type:A,key:F,ref:re!==void 0?re:null,props:S}}function M(A,F){return fe(A.type,F,A.props)}function Y(A){return typeof A=="object"&&A!==null&&A.$$typeof===t}function J(A){var F={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(S){return F[S]})}var ve=/\/+/g;function ue(A,F){return typeof A=="object"&&A!==null&&A.key!=null?J(""+A.key):F.toString(36)}function W(A){switch(A.status){case"fulfilled":return A.value;case"rejected":throw A.reason;default:switch(typeof A.status=="string"?A.then(O,O):(A.status="pending",A.then(function(F){A.status==="pending"&&(A.status="fulfilled",A.value=F)},function(F){A.status==="pending"&&(A.status="rejected",A.reason=F)})),A.status){case"fulfilled":return A.value;case"rejected":throw A.reason}}throw A}function T(A,F,S,re,de){var ne=typeof A;(ne==="undefined"||ne==="boolean")&&(A=null);var xe=!1;if(A===null)xe=!0;else switch(ne){case"bigint":case"string":case"number":xe=!0;break;case"object":switch(A.$$typeof){case t:case l:xe=!0;break;case b:return xe=A._init,T(xe(A._payload),F,S,re,de)}}if(xe)return de=de(A),xe=re===""?"."+ue(A,0):re,ee(de)?(S="",xe!=null&&(S=xe.replace(ve,"$&/")+"/"),T(de,F,S,"",function(wt){return wt})):de!=null&&(Y(de)&&(de=M(de,S+(de.key==null||A&&A.key===de.key?"":(""+de.key).replace(ve,"$&/")+"/")+xe)),F.push(de)),1;xe=0;var Qe=re===""?".":re+":";if(ee(A))for(var Ve=0;Ve<A.length;Ve++)re=A[Ve],ne=Qe+ue(re,Ve),xe+=T(re,F,S,ne,de);else if(Ve=v(A),typeof Ve=="function")for(A=Ve.call(A),Ve=0;!(re=A.next()).done;)re=re.value,ne=Qe+ue(re,Ve++),xe+=T(re,F,S,ne,de);else if(ne==="object"){if(typeof A.then=="function")return T(W(A),F,S,re,de);throw F=String(A),Error("Objects are not valid as a React child (found: "+(F==="[object Object]"?"object with keys {"+Object.keys(A).join(", ")+"}":F)+"). If you meant to render a collection of children, use an array instead.")}return xe}function X(A,F,S){if(A==null)return A;var re=[],de=0;return T(A,re,"","",function(ne){return F.call(S,ne,de++)}),re}function se(A){if(A._status===-1){var F=A._result;F=F(),F.then(function(S){(A._status===0||A._status===-1)&&(A._status=1,A._result=S)},function(S){(A._status===0||A._status===-1)&&(A._status=2,A._result=S)}),A._status===-1&&(A._status=0,A._result=F)}if(A._status===1)return A._result.default;throw A._result}var je=typeof reportError=="function"?reportError:function(A){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var F=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof A=="object"&&A!==null&&typeof A.message=="string"?String(A.message):String(A),error:A});if(!window.dispatchEvent(F))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",A);return}console.error(A)},E={map:X,forEach:function(A,F,S){X(A,function(){F.apply(this,arguments)},S)},count:function(A){var F=0;return X(A,function(){F++}),F},toArray:function(A){return X(A,function(F){return F})||[]},only:function(A){if(!Y(A))throw Error("React.Children.only expected to receive a single React element child.");return A}};return Ne.Activity=y,Ne.Children=E,Ne.Component=N,Ne.Fragment=i,Ne.Profiler=s,Ne.PureComponent=q,Ne.StrictMode=r,Ne.Suspense=p,Ne.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=P,Ne.__COMPILER_RUNTIME={__proto__:null,c:function(A){return P.H.useMemoCache(A)}},Ne.cache=function(A){return function(){return A.apply(null,arguments)}},Ne.cacheSignal=function(){return null},Ne.cloneElement=function(A,F,S){if(A==null)throw Error("The argument must be a React element, but you passed "+A+".");var re=R({},A.props),de=A.key;if(F!=null)for(ne in F.key!==void 0&&(de=""+F.key),F)!oe.call(F,ne)||ne==="key"||ne==="__self"||ne==="__source"||ne==="ref"&&F.ref===void 0||(re[ne]=F[ne]);var ne=arguments.length-2;if(ne===1)re.children=S;else if(1<ne){for(var xe=Array(ne),Qe=0;Qe<ne;Qe++)xe[Qe]=arguments[Qe+2];re.children=xe}return fe(A.type,de,re)},Ne.createContext=function(A){return A={$$typeof:f,_currentValue:A,_currentValue2:A,_threadCount:0,Provider:null,Consumer:null},A.Provider=A,A.Consumer={$$typeof:o,_context:A},A},Ne.createElement=function(A,F,S){var re,de={},ne=null;if(F!=null)for(re in F.key!==void 0&&(ne=""+F.key),F)oe.call(F,re)&&re!=="key"&&re!=="__self"&&re!=="__source"&&(de[re]=F[re]);var xe=arguments.length-2;if(xe===1)de.children=S;else if(1<xe){for(var Qe=Array(xe),Ve=0;Ve<xe;Ve++)Qe[Ve]=arguments[Ve+2];de.children=Qe}if(A&&A.defaultProps)for(re in xe=A.defaultProps,xe)de[re]===void 0&&(de[re]=xe[re]);return fe(A,ne,de)},Ne.createRef=function(){return{current:null}},Ne.forwardRef=function(A){return{$$typeof:h,render:A}},Ne.isValidElement=Y,Ne.lazy=function(A){return{$$typeof:b,_payload:{_status:-1,_result:A},_init:se}},Ne.memo=function(A,F){return{$$typeof:m,type:A,compare:F===void 0?null:F}},Ne.startTransition=function(A){var F=P.T,S={};P.T=S;try{var re=A(),de=P.S;de!==null&&de(S,re),typeof re=="object"&&re!==null&&typeof re.then=="function"&&re.then(O,je)}catch(ne){je(ne)}finally{F!==null&&S.types!==null&&(F.types=S.types),P.T=F}},Ne.unstable_useCacheRefresh=function(){return P.H.useCacheRefresh()},Ne.use=function(A){return P.H.use(A)},Ne.useActionState=function(A,F,S){return P.H.useActionState(A,F,S)},Ne.useCallback=function(A,F){return P.H.useCallback(A,F)},Ne.useContext=function(A){return P.H.useContext(A)},Ne.useDebugValue=function(){},Ne.useDeferredValue=function(A,F){return P.H.useDeferredValue(A,F)},Ne.useEffect=function(A,F){return P.H.useEffect(A,F)},Ne.useEffectEvent=function(A){return P.H.useEffectEvent(A)},Ne.useId=function(){return P.H.useId()},Ne.useImperativeHandle=function(A,F,S){return P.H.useImperativeHandle(A,F,S)},Ne.useInsertionEffect=function(A,F){return P.H.useInsertionEffect(A,F)},Ne.useLayoutEffect=function(A,F){return P.H.useLayoutEffect(A,F)},Ne.useMemo=function(A,F){return P.H.useMemo(A,F)},Ne.useOptimistic=function(A,F){return P.H.useOptimistic(A,F)},Ne.useReducer=function(A,F,S){return P.H.useReducer(A,F,S)},Ne.useRef=function(A){return P.H.useRef(A)},Ne.useState=function(A){return P.H.useState(A)},Ne.useSyncExternalStore=function(A,F,S){return P.H.useSyncExternalStore(A,F,S)},Ne.useTransition=function(){return P.H.useTransition()},Ne.version="19.2.7",Ne}var pg;function Hf(){return pg||(pg=1,Zc.exports=Nb()),Zc.exports}var I=Hf(),Fc={exports:{}},hr={},Qc={exports:{}},Gc={};/**
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 gg;function Tb(){return gg||(gg=1,(function(t){function l(T,X){var se=T.length;T.push(X);e:for(;0<se;){var je=se-1>>>1,E=T[je];if(0<s(E,X))T[je]=X,T[se]=E,se=je;else break e}}function i(T){return T.length===0?null:T[0]}function r(T){if(T.length===0)return null;var X=T[0],se=T.pop();if(se!==X){T[0]=se;e:for(var je=0,E=T.length,A=E>>>1;je<A;){var F=2*(je+1)-1,S=T[F],re=F+1,de=T[re];if(0>s(S,se))re<E&&0>s(de,S)?(T[je]=de,T[re]=se,je=re):(T[je]=S,T[F]=se,je=F);else if(re<E&&0>s(de,se))T[je]=de,T[re]=se,je=re;else break e}}return X}function s(T,X){var se=T.sortIndex-X.sortIndex;return se!==0?se:T.id-X.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;t.unstable_now=function(){return o.now()}}else{var f=Date,h=f.now();t.unstable_now=function(){return f.now()-h}}var p=[],m=[],b=1,y=null,k=3,v=!1,_=!1,R=!1,H=!1,N=typeof setTimeout=="function"?setTimeout:null,Z=typeof clearTimeout=="function"?clearTimeout:null,q=typeof setImmediate<"u"?setImmediate:null;function te(T){for(var X=i(m);X!==null;){if(X.callback===null)r(m);else if(X.startTime<=T)r(m),X.sortIndex=X.expirationTime,l(p,X);else break;X=i(m)}}function ee(T){if(R=!1,te(T),!_)if(i(p)!==null)_=!0,O||(O=!0,J());else{var X=i(m);X!==null&&W(ee,X.startTime-T)}}var O=!1,P=-1,oe=5,fe=-1;function M(){return H?!0:!(t.unstable_now()-fe<oe)}function Y(){if(H=!1,O){var T=t.unstable_now();fe=T;var X=!0;try{e:{_=!1,R&&(R=!1,Z(P),P=-1),v=!0;var se=k;try{t:{for(te(T),y=i(p);y!==null&&!(y.expirationTime>T&&M());){var je=y.callback;if(typeof je=="function"){y.callback=null,k=y.priorityLevel;var E=je(y.expirationTime<=T);if(T=t.unstable_now(),typeof E=="function"){y.callback=E,te(T),X=!0;break t}y===i(p)&&r(p),te(T)}else r(p);y=i(p)}if(y!==null)X=!0;else{var A=i(m);A!==null&&W(ee,A.startTime-T),X=!1}}break e}finally{y=null,k=se,v=!1}X=void 0}}finally{X?J():O=!1}}}var J;if(typeof q=="function")J=function(){q(Y)};else if(typeof MessageChannel<"u"){var ve=new MessageChannel,ue=ve.port2;ve.port1.onmessage=Y,J=function(){ue.postMessage(null)}}else J=function(){N(Y,0)};function W(T,X){P=N(function(){T(t.unstable_now())},X)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(T){T.callback=null},t.unstable_forceFrameRate=function(T){0>T||125<T?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):oe=0<T?Math.floor(1e3/T):5},t.unstable_getCurrentPriorityLevel=function(){return k},t.unstable_next=function(T){switch(k){case 1:case 2:case 3:var X=3;break;default:X=k}var se=k;k=X;try{return T()}finally{k=se}},t.unstable_requestPaint=function(){H=!0},t.unstable_runWithPriority=function(T,X){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var se=k;k=T;try{return X()}finally{k=se}},t.unstable_scheduleCallback=function(T,X,se){var je=t.unstable_now();switch(typeof se=="object"&&se!==null?(se=se.delay,se=typeof se=="number"&&0<se?je+se:je):se=je,T){case 1:var E=-1;break;case 2:E=250;break;case 5:E=1073741823;break;case 4:E=1e4;break;default:E=5e3}return E=se+E,T={id:b++,callback:X,priorityLevel:T,startTime:se,expirationTime:E,sortIndex:-1},se>je?(T.sortIndex=se,l(m,T),i(p)===null&&T===i(m)&&(R?(Z(P),P=-1):R=!0,W(ee,se-je))):(T.sortIndex=E,l(p,T),_||v||(_=!0,O||(O=!0,J()))),T},t.unstable_shouldYield=M,t.unstable_wrapCallback=function(T){var X=k;return function(){var se=k;k=X;try{return T.apply(this,arguments)}finally{k=se}}}})(Gc)),Gc}var yg;function Db(){return yg||(yg=1,Qc.exports=Tb()),Qc.exports}var Xc={exports:{}},Rt={};/**
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 xg;function zb(){if(xg)return Rt;xg=1;var t=Hf();function l(p){var m="https://react.dev/errors/"+p;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)m+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+p+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var r={d:{f:i,r:function(){throw Error(l(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},s=Symbol.for("react.portal");function o(p,m,b){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:y==null?null:""+y,children:p,containerInfo:m,implementation:b}}var f=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(p,m){if(p==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return Rt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Rt.createPortal=function(p,m){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(l(299));return o(p,m,null,b)},Rt.flushSync=function(p){var m=f.T,b=r.p;try{if(f.T=null,r.p=2,p)return p()}finally{f.T=m,r.p=b,r.d.f()}},Rt.preconnect=function(p,m){typeof p=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,r.d.C(p,m))},Rt.prefetchDNS=function(p){typeof p=="string"&&r.d.D(p)},Rt.preinit=function(p,m){if(typeof p=="string"&&m&&typeof m.as=="string"){var b=m.as,y=h(b,m.crossOrigin),k=typeof m.integrity=="string"?m.integrity:void 0,v=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;b==="style"?r.d.S(p,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:y,integrity:k,fetchPriority:v}):b==="script"&&r.d.X(p,{crossOrigin:y,integrity:k,fetchPriority:v,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},Rt.preinitModule=function(p,m){if(typeof p=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var b=h(m.as,m.crossOrigin);r.d.M(p,{crossOrigin:b,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&r.d.M(p)},Rt.preload=function(p,m){if(typeof p=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var b=m.as,y=h(b,m.crossOrigin);r.d.L(p,b,{crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},Rt.preloadModule=function(p,m){if(typeof p=="string")if(m){var b=h(m.as,m.crossOrigin);r.d.m(p,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:b,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else r.d.m(p)},Rt.requestFormReset=function(p){r.d.r(p)},Rt.unstable_batchedUpdates=function(p,m){return p(m)},Rt.useFormState=function(p,m,b){return f.H.useFormState(p,m,b)},Rt.useFormStatus=function(){return f.H.useHostTransitionStatus()},Rt.version="19.2.7",Rt}var bg;function Ob(){if(bg)return Xc.exports;bg=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(l){console.error(l)}}return t(),Xc.exports=zb(),Xc.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 vg;function Mb(){if(vg)return hr;vg=1;var t=Db(),l=Hf(),i=Ob();function r(e){var n="https://react.dev/errors/"+e;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)n+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var n=e,a=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(a=n.return),e=n.return;while(e)}return n.tag===3?a:null}function f(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function h(e){if(e.tag===31){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function p(e){if(o(e)!==e)throw Error(r(188))}function m(e){var n=e.alternate;if(!n){if(n=o(e),n===null)throw Error(r(188));return n!==e?null:e}for(var a=e,u=n;;){var c=a.return;if(c===null)break;var d=c.alternate;if(d===null){if(u=c.return,u!==null){a=u;continue}break}if(c.child===d.child){for(d=c.child;d;){if(d===a)return p(c),e;if(d===u)return p(c),n;d=d.sibling}throw Error(r(188))}if(a.return!==u.return)a=c,u=d;else{for(var x=!1,w=c.child;w;){if(w===a){x=!0,a=c,u=d;break}if(w===u){x=!0,u=c,a=d;break}w=w.sibling}if(!x){for(w=d.child;w;){if(w===a){x=!0,a=d,u=c;break}if(w===u){x=!0,u=d,a=c;break}w=w.sibling}if(!x)throw Error(r(189))}}if(a.alternate!==u)throw Error(r(190))}if(a.tag!==3)throw Error(r(188));return a.stateNode.current===a?e:n}function b(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e;for(e=e.child;e!==null;){if(n=b(e),n!==null)return n;e=e.sibling}return null}var y=Object.assign,k=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),_=Symbol.for("react.portal"),R=Symbol.for("react.fragment"),H=Symbol.for("react.strict_mode"),N=Symbol.for("react.profiler"),Z=Symbol.for("react.consumer"),q=Symbol.for("react.context"),te=Symbol.for("react.forward_ref"),ee=Symbol.for("react.suspense"),O=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),oe=Symbol.for("react.lazy"),fe=Symbol.for("react.activity"),M=Symbol.for("react.memo_cache_sentinel"),Y=Symbol.iterator;function J(e){return e===null||typeof e!="object"?null:(e=Y&&e[Y]||e["@@iterator"],typeof e=="function"?e:null)}var ve=Symbol.for("react.client.reference");function ue(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ve?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case R:return"Fragment";case N:return"Profiler";case H:return"StrictMode";case ee:return"Suspense";case O:return"SuspenseList";case fe:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case _:return"Portal";case q:return e.displayName||"Context";case Z:return(e._context.displayName||"Context")+".Consumer";case te:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case P:return n=e.displayName||null,n!==null?n:ue(e.type)||"Memo";case oe:n=e._payload,e=e._init;try{return ue(e(n))}catch{}}return null}var W=Array.isArray,T=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,se={pending:!1,data:null,method:null,action:null},je=[],E=-1;function A(e){return{current:e}}function F(e){0>E||(e.current=je[E],je[E]=null,E--)}function S(e,n){E++,je[E]=e.current,e.current=n}var re=A(null),de=A(null),ne=A(null),xe=A(null);function Qe(e,n){switch(S(ne,n),S(de,e),S(re,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?Rp(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=Rp(n),e=Lp(n,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}F(re),S(re,e)}function Ve(){F(re),F(de),F(ne)}function wt(e){e.memoizedState!==null&&S(xe,e);var n=re.current,a=Lp(n,e.type);n!==a&&(S(de,e),S(re,a))}function en(e){de.current===e&&(F(re),F(de)),xe.current===e&&(F(xe),sr._currentValue=se)}var dl,Hn;function St(e){if(dl===void 0)try{throw Error()}catch(a){var n=a.stack.trim().match(/\n( *(at )?)/);dl=n&&n[1]||"",Hn=-1<a.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+dl+e+Hn}var hl=!1;function Nn(e,n){if(!e||hl)return"";hl=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(n){var $=function(){throw Error()};if(Object.defineProperty($.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct($,[])}catch(V){var U=V}Reflect.construct(e,[],$)}else{try{$.call()}catch(V){U=V}e.call($.prototype)}}else{try{throw Error()}catch(V){U=V}($=e())&&typeof $.catch=="function"&&$.catch(function(){})}}catch(V){if(V&&U&&typeof V.stack=="string")return[V.stack,U.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var d=u.DetermineComponentFrameRoot(),x=d[0],w=d[1];if(x&&w){var C=x.split(`
44
+ `),B=w.split(`
45
+ `);for(c=u=0;u<C.length&&!C[u].includes("DetermineComponentFrameRoot");)u++;for(;c<B.length&&!B[c].includes("DetermineComponentFrameRoot");)c++;if(u===C.length||c===B.length)for(u=C.length-1,c=B.length-1;1<=u&&0<=c&&C[u]!==B[c];)c--;for(;1<=u&&0<=c;u--,c--)if(C[u]!==B[c]){if(u!==1||c!==1)do if(u--,c--,0>c||C[u]!==B[c]){var G=`
46
+ `+C[u].replace(" at new "," at ");return e.displayName&&G.includes("<anonymous>")&&(G=G.replace("<anonymous>",e.displayName)),G}while(1<=u&&0<=c);break}}}finally{hl=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?St(a):""}function Sa(e,n){switch(e.tag){case 26:case 27:case 5:return St(e.type);case 16:return St("Lazy");case 13:return e.child!==n&&n!==null?St("Suspense Fallback"):St("Suspense");case 19:return St("SuspenseList");case 0:case 15:return Nn(e.type,!1);case 11:return Nn(e.type.render,!1);case 1:return Nn(e.type,!0);case 31:return St("Activity");default:return""}}function Gl(e){try{var n="",a=null;do n+=Sa(e,a),a=e,e=e.return;while(e);return n}catch(u){return`
47
+ Error generating stack: `+u.message+`
48
+ `+u.stack}}var ml=Object.prototype.hasOwnProperty,pl=t.unstable_scheduleCallback,gl=t.unstable_cancelCallback,bi=t.unstable_shouldYield,vi=t.unstable_requestPaint,pt=t.unstable_now,Ye=t.unstable_getCurrentPriorityLevel,Q=t.unstable_ImmediatePriority,ie=t.unstable_UserBlockingPriority,be=t.unstable_NormalPriority,Ce=t.unstable_LowPriority,Xe=t.unstable_IdlePriority,tn=t.log,qn=t.unstable_setDisableYieldValue,Ut=null,_t=null;function Zt(e){if(typeof tn=="function"&&qn(e),_t&&typeof _t.setStrictMode=="function")try{_t.setStrictMode(Ut,e)}catch{}}var tt=Math.clz32?Math.clz32:h0,yl=Math.log,_n=Math.LN2;function h0(e){return e>>>=0,e===0?32:31-(yl(e)/_n|0)|0}var zr=256,Or=262144,Mr=4194304;function Xl(e){var n=e&42;if(n!==0)return n;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64: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 e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Rr(e,n,a){var u=e.pendingLanes;if(u===0)return 0;var c=0,d=e.suspendedLanes,x=e.pingedLanes;e=e.warmLanes;var w=u&134217727;return w!==0?(u=w&~d,u!==0?c=Xl(u):(x&=w,x!==0?c=Xl(x):a||(a=w&~e,a!==0&&(c=Xl(a))))):(w=u&~d,w!==0?c=Xl(w):x!==0?c=Xl(x):a||(a=u&~e,a!==0&&(c=Xl(a)))),c===0?0:n!==0&&n!==c&&(n&d)===0&&(d=c&-c,a=n&-n,d>=a||d===32&&(a&4194048)!==0)?n:c}function ki(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function m0(e,n){switch(e){case 1:case 2:case 4:case 8:case 64:return n+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 n+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 gd(){var e=Mr;return Mr<<=1,(Mr&62914560)===0&&(Mr=4194304),e}function Ts(e){for(var n=[],a=0;31>a;a++)n.push(e);return n}function wi(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function p0(e,n,a,u,c,d){var x=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var w=e.entanglements,C=e.expirationTimes,B=e.hiddenUpdates;for(a=x&~a;0<a;){var G=31-tt(a),$=1<<G;w[G]=0,C[G]=-1;var U=B[G];if(U!==null)for(B[G]=null,G=0;G<U.length;G++){var V=U[G];V!==null&&(V.lane&=-536870913)}a&=~$}u!==0&&yd(e,u,0),d!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=d&~(x&~n))}function yd(e,n,a){e.pendingLanes|=n,e.suspendedLanes&=~n;var u=31-tt(n);e.entangledLanes|=n,e.entanglements[u]=e.entanglements[u]|1073741824|a&261930}function xd(e,n){var a=e.entangledLanes|=n;for(e=e.entanglements;a;){var u=31-tt(a),c=1<<u;c&n|e[u]&n&&(e[u]|=n),a&=~c}}function bd(e,n){var a=n&-n;return a=(a&42)!==0?1:Ds(a),(a&(e.suspendedLanes|n))!==0?0:a}function Ds(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function zs(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function vd(){var e=X.p;return e!==0?e:(e=window.event,e===void 0?32:ig(e.type))}function kd(e,n){var a=X.p;try{return X.p=e,n()}finally{X.p=a}}var xl=Math.random().toString(36).slice(2),Tt="__reactFiber$"+xl,Ft="__reactProps$"+xl,_a="__reactContainer$"+xl,Os="__reactEvents$"+xl,g0="__reactListeners$"+xl,y0="__reactHandles$"+xl,wd="__reactResources$"+xl,Si="__reactMarker$"+xl;function Ms(e){delete e[Tt],delete e[Ft],delete e[Os],delete e[g0],delete e[y0]}function Ea(e){var n=e[Tt];if(n)return n;for(var a=e.parentNode;a;){if(n=a[_a]||a[Tt]){if(a=n.alternate,n.child!==null||a!==null&&a.child!==null)for(e=Yp(e);e!==null;){if(a=e[Tt])return a;e=Yp(e)}return n}e=a,a=e.parentNode}return null}function Ca(e){if(e=e[Tt]||e[_a]){var n=e.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return e}return null}function _i(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e.stateNode;throw Error(r(33))}function Aa(e){var n=e[wd];return n||(n=e[wd]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function Ct(e){e[Si]=!0}var Sd=new Set,_d={};function Jl(e,n){ja(e,n),ja(e+"Capture",n)}function ja(e,n){for(_d[e]=n,e=0;e<n.length;e++)Sd.add(n[e])}var x0=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]*$"),Ed={},Cd={};function b0(e){return ml.call(Cd,e)?!0:ml.call(Ed,e)?!1:x0.test(e)?Cd[e]=!0:(Ed[e]=!0,!1)}function Lr(e,n,a){if(b0(n))if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(n);return;case"boolean":var u=n.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){e.removeAttribute(n);return}}e.setAttribute(n,""+a)}}function Br(e,n,a){if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttribute(n,""+a)}}function Vn(e,n,a,u){if(u===null)e.removeAttribute(a);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(n,a,""+u)}}function dn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ad(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function v0(e,n,a){var u=Object.getOwnPropertyDescriptor(e.constructor.prototype,n);if(!e.hasOwnProperty(n)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var c=u.get,d=u.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return c.call(this)},set:function(x){a=""+x,d.call(this,x)}}),Object.defineProperty(e,n,{enumerable:u.enumerable}),{getValue:function(){return a},setValue:function(x){a=""+x},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function Rs(e){if(!e._valueTracker){var n=Ad(e)?"checked":"value";e._valueTracker=v0(e,n,""+e[n])}}function jd(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var a=n.getValue(),u="";return e&&(u=Ad(e)?e.checked?"true":"false":e.value),e=u,e!==a?(n.setValue(e),!0):!1}function Ur(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var k0=/[\n"\\]/g;function hn(e){return e.replace(k0,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function Ls(e,n,a,u,c,d,x,w){e.name="",x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.type=x:e.removeAttribute("type"),n!=null?x==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+dn(n)):e.value!==""+dn(n)&&(e.value=""+dn(n)):x!=="submit"&&x!=="reset"||e.removeAttribute("value"),n!=null?Bs(e,x,dn(n)):a!=null?Bs(e,x,dn(a)):u!=null&&e.removeAttribute("value"),c==null&&d!=null&&(e.defaultChecked=!!d),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?e.name=""+dn(w):e.removeAttribute("name")}function Nd(e,n,a,u,c,d,x,w){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.type=d),n!=null||a!=null){if(!(d!=="submit"&&d!=="reset"||n!=null)){Rs(e);return}a=a!=null?""+dn(a):"",n=n!=null?""+dn(n):a,w||n===e.value||(e.value=n),e.defaultValue=n}u=u??c,u=typeof u!="function"&&typeof u!="symbol"&&!!u,e.checked=w?e.checked:!!u,e.defaultChecked=!!u,x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(e.name=x),Rs(e)}function Bs(e,n,a){n==="number"&&Ur(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Na(e,n,a,u){if(e=e.options,n){n={};for(var c=0;c<a.length;c++)n["$"+a[c]]=!0;for(a=0;a<e.length;a++)c=n.hasOwnProperty("$"+e[a].value),e[a].selected!==c&&(e[a].selected=c),c&&u&&(e[a].defaultSelected=!0)}else{for(a=""+dn(a),n=null,c=0;c<e.length;c++){if(e[c].value===a){e[c].selected=!0,u&&(e[c].defaultSelected=!0);return}n!==null||e[c].disabled||(n=e[c])}n!==null&&(n.selected=!0)}}function Td(e,n,a){if(n!=null&&(n=""+dn(n),n!==e.value&&(e.value=n),a==null)){e.defaultValue!==n&&(e.defaultValue=n);return}e.defaultValue=a!=null?""+dn(a):""}function Dd(e,n,a,u){if(n==null){if(u!=null){if(a!=null)throw Error(r(92));if(W(u)){if(1<u.length)throw Error(r(93));u=u[0]}a=u}a==null&&(a=""),n=a}a=dn(n),e.defaultValue=a,u=e.textContent,u===a&&u!==""&&u!==null&&(e.value=u),Rs(e)}function Ta(e,n){if(n){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=n;return}}e.textContent=n}var w0=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 zd(e,n,a){var u=n.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?u?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="":u?e.setProperty(n,a):typeof a!="number"||a===0||w0.has(n)?n==="float"?e.cssFloat=a:e[n]=(""+a).trim():e[n]=a+"px"}function Od(e,n,a){if(n!=null&&typeof n!="object")throw Error(r(62));if(e=e.style,a!=null){for(var u in a)!a.hasOwnProperty(u)||n!=null&&n.hasOwnProperty(u)||(u.indexOf("--")===0?e.setProperty(u,""):u==="float"?e.cssFloat="":e[u]="");for(var c in n)u=n[c],n.hasOwnProperty(c)&&a[c]!==u&&zd(e,c,u)}else for(var d in n)n.hasOwnProperty(d)&&zd(e,d,n[d])}function Us(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var S0=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"]]),_0=/^[\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 Hr(e){return _0.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function In(){}var Hs=null;function qs(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Da=null,za=null;function Md(e){var n=Ca(e);if(n&&(e=n.stateNode)){var a=e[Ft]||null;e:switch(e=n.stateNode,n.type){case"input":if(Ls(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),n=a.name,a.type==="radio"&&n!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+hn(""+n)+'"][type="radio"]'),n=0;n<a.length;n++){var u=a[n];if(u!==e&&u.form===e.form){var c=u[Ft]||null;if(!c)throw Error(r(90));Ls(u,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name)}}for(n=0;n<a.length;n++)u=a[n],u.form===e.form&&jd(u)}break e;case"textarea":Td(e,a.value,a.defaultValue);break e;case"select":n=a.value,n!=null&&Na(e,!!a.multiple,n,!1)}}}var Vs=!1;function Rd(e,n,a){if(Vs)return e(n,a);Vs=!0;try{var u=e(n);return u}finally{if(Vs=!1,(Da!==null||za!==null)&&(Cu(),Da&&(n=Da,e=za,za=Da=null,Md(n),e)))for(n=0;n<e.length;n++)Md(e[n])}}function Ei(e,n){var a=e.stateNode;if(a===null)return null;var u=a[Ft]||null;if(u===null)return null;a=u[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(e=e.type,u=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!u;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(r(231,n,typeof a));return a}var Yn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Is=!1;if(Yn)try{var Ci={};Object.defineProperty(Ci,"passive",{get:function(){Is=!0}}),window.addEventListener("test",Ci,Ci),window.removeEventListener("test",Ci,Ci)}catch{Is=!1}var bl=null,Ys=null,qr=null;function Ld(){if(qr)return qr;var e,n=Ys,a=n.length,u,c="value"in bl?bl.value:bl.textContent,d=c.length;for(e=0;e<a&&n[e]===c[e];e++);var x=a-e;for(u=1;u<=x&&n[a-u]===c[d-u];u++);return qr=c.slice(e,1<u?1-u:void 0)}function Vr(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function Ir(){return!0}function Bd(){return!1}function Qt(e){function n(a,u,c,d,x){this._reactName=a,this._targetInst=c,this.type=u,this.nativeEvent=d,this.target=x,this.currentTarget=null;for(var w in e)e.hasOwnProperty(w)&&(a=e[w],this[w]=a?a(d):d[w]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?Ir:Bd,this.isPropagationStopped=Bd,this}return y(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Ir)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Ir)},persist:function(){},isPersistent:Ir}),n}var Kl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Yr=Qt(Kl),Ai=y({},Kl,{view:0,detail:0}),E0=Qt(Ai),Zs,Fs,ji,Zr=y({},Ai,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Gs,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ji&&(ji&&e.type==="mousemove"?(Zs=e.screenX-ji.screenX,Fs=e.screenY-ji.screenY):Fs=Zs=0,ji=e),Zs)},movementY:function(e){return"movementY"in e?e.movementY:Fs}}),Ud=Qt(Zr),C0=y({},Zr,{dataTransfer:0}),A0=Qt(C0),j0=y({},Ai,{relatedTarget:0}),Qs=Qt(j0),N0=y({},Kl,{animationName:0,elapsedTime:0,pseudoElement:0}),T0=Qt(N0),D0=y({},Kl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),z0=Qt(D0),O0=y({},Kl,{data:0}),Hd=Qt(O0),M0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},R0={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"},L0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function B0(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=L0[e])?!!n[e]:!1}function Gs(){return B0}var U0=y({},Ai,{key:function(e){if(e.key){var n=M0[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=Vr(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?R0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Gs,charCode:function(e){return e.type==="keypress"?Vr(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Vr(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),H0=Qt(U0),q0=y({},Zr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),qd=Qt(q0),V0=y({},Ai,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Gs}),I0=Qt(V0),Y0=y({},Kl,{propertyName:0,elapsedTime:0,pseudoElement:0}),Z0=Qt(Y0),F0=y({},Zr,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Q0=Qt(F0),G0=y({},Kl,{newState:0,oldState:0}),X0=Qt(G0),J0=[9,13,27,32],Xs=Yn&&"CompositionEvent"in window,Ni=null;Yn&&"documentMode"in document&&(Ni=document.documentMode);var K0=Yn&&"TextEvent"in window&&!Ni,Vd=Yn&&(!Xs||Ni&&8<Ni&&11>=Ni),Id=" ",Yd=!1;function Zd(e,n){switch(e){case"keyup":return J0.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Fd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Oa=!1;function $0(e,n){switch(e){case"compositionend":return Fd(n);case"keypress":return n.which!==32?null:(Yd=!0,Id);case"textInput":return e=n.data,e===Id&&Yd?null:e;default:return null}}function P0(e,n){if(Oa)return e==="compositionend"||!Xs&&Zd(e,n)?(e=Ld(),qr=Ys=bl=null,Oa=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return Vd&&n.locale!=="ko"?null:n.data;default:return null}}var W0={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 Qd(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!W0[e.type]:n==="textarea"}function Gd(e,n,a,u){Da?za?za.push(u):za=[u]:Da=u,n=Ou(n,"onChange"),0<n.length&&(a=new Yr("onChange","change",null,a,u),e.push({event:a,listeners:n}))}var Ti=null,Di=null;function e1(e){Np(e,0)}function Fr(e){var n=_i(e);if(jd(n))return e}function Xd(e,n){if(e==="change")return n}var Jd=!1;if(Yn){var Js;if(Yn){var Ks="oninput"in document;if(!Ks){var Kd=document.createElement("div");Kd.setAttribute("oninput","return;"),Ks=typeof Kd.oninput=="function"}Js=Ks}else Js=!1;Jd=Js&&(!document.documentMode||9<document.documentMode)}function $d(){Ti&&(Ti.detachEvent("onpropertychange",Pd),Di=Ti=null)}function Pd(e){if(e.propertyName==="value"&&Fr(Di)){var n=[];Gd(n,Di,e,qs(e)),Rd(e1,n)}}function t1(e,n,a){e==="focusin"?($d(),Ti=n,Di=a,Ti.attachEvent("onpropertychange",Pd)):e==="focusout"&&$d()}function n1(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Fr(Di)}function l1(e,n){if(e==="click")return Fr(n)}function a1(e,n){if(e==="input"||e==="change")return Fr(n)}function i1(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var nn=typeof Object.is=="function"?Object.is:i1;function zi(e,n){if(nn(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var a=Object.keys(e),u=Object.keys(n);if(a.length!==u.length)return!1;for(u=0;u<a.length;u++){var c=a[u];if(!ml.call(n,c)||!nn(e[c],n[c]))return!1}return!0}function Wd(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function eh(e,n){var a=Wd(e);e=0;for(var u;a;){if(a.nodeType===3){if(u=e+a.textContent.length,e<=n&&u>=n)return{node:a,offset:n-e};e=u}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Wd(a)}}function th(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?th(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function nh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=Ur(e.document);n instanceof e.HTMLIFrameElement;){try{var a=typeof n.contentWindow.location.href=="string"}catch{a=!1}if(a)e=n.contentWindow;else break;n=Ur(e.document)}return n}function $s(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}var r1=Yn&&"documentMode"in document&&11>=document.documentMode,Ma=null,Ps=null,Oi=null,Ws=!1;function lh(e,n,a){var u=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Ws||Ma==null||Ma!==Ur(u)||(u=Ma,"selectionStart"in u&&$s(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),Oi&&zi(Oi,u)||(Oi=u,u=Ou(Ps,"onSelect"),0<u.length&&(n=new Yr("onSelect","select",null,n,a),e.push({event:n,listeners:u}),n.target=Ma)))}function $l(e,n){var a={};return a[e.toLowerCase()]=n.toLowerCase(),a["Webkit"+e]="webkit"+n,a["Moz"+e]="moz"+n,a}var Ra={animationend:$l("Animation","AnimationEnd"),animationiteration:$l("Animation","AnimationIteration"),animationstart:$l("Animation","AnimationStart"),transitionrun:$l("Transition","TransitionRun"),transitionstart:$l("Transition","TransitionStart"),transitioncancel:$l("Transition","TransitionCancel"),transitionend:$l("Transition","TransitionEnd")},eo={},ah={};Yn&&(ah=document.createElement("div").style,"AnimationEvent"in window||(delete Ra.animationend.animation,delete Ra.animationiteration.animation,delete Ra.animationstart.animation),"TransitionEvent"in window||delete Ra.transitionend.transition);function Pl(e){if(eo[e])return eo[e];if(!Ra[e])return e;var n=Ra[e],a;for(a in n)if(n.hasOwnProperty(a)&&a in ah)return eo[e]=n[a];return e}var ih=Pl("animationend"),rh=Pl("animationiteration"),uh=Pl("animationstart"),u1=Pl("transitionrun"),s1=Pl("transitionstart"),o1=Pl("transitioncancel"),sh=Pl("transitionend"),oh=new Map,to="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(" ");to.push("scrollEnd");function En(e,n){oh.set(e,n),Jl(n,[e])}var Qr=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},mn=[],La=0,no=0;function Gr(){for(var e=La,n=no=La=0;n<e;){var a=mn[n];mn[n++]=null;var u=mn[n];mn[n++]=null;var c=mn[n];mn[n++]=null;var d=mn[n];if(mn[n++]=null,u!==null&&c!==null){var x=u.pending;x===null?c.next=c:(c.next=x.next,x.next=c),u.pending=c}d!==0&&ch(a,c,d)}}function Xr(e,n,a,u){mn[La++]=e,mn[La++]=n,mn[La++]=a,mn[La++]=u,no|=u,e.lanes|=u,e=e.alternate,e!==null&&(e.lanes|=u)}function lo(e,n,a,u){return Xr(e,n,a,u),Jr(e)}function Wl(e,n){return Xr(e,null,null,n),Jr(e)}function ch(e,n,a){e.lanes|=a;var u=e.alternate;u!==null&&(u.lanes|=a);for(var c=!1,d=e.return;d!==null;)d.childLanes|=a,u=d.alternate,u!==null&&(u.childLanes|=a),d.tag===22&&(e=d.stateNode,e===null||e._visibility&1||(c=!0)),e=d,d=d.return;return e.tag===3?(d=e.stateNode,c&&n!==null&&(c=31-tt(a),e=d.hiddenUpdates,u=e[c],u===null?e[c]=[n]:u.push(n),n.lane=a|536870912),d):null}function Jr(e){if(50<tr)throw tr=0,hc=null,Error(r(185));for(var n=e.return;n!==null;)e=n,n=e.return;return e.tag===3?e.stateNode:null}var Ba={};function c1(e,n,a,u){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ln(e,n,a,u){return new c1(e,n,a,u)}function ao(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Zn(e,n){var a=e.alternate;return a===null?(a=ln(e.tag,n,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=n,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,n=e.dependencies,a.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function fh(e,n){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=n,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,n=a.dependencies,e.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),e}function Kr(e,n,a,u,c,d){var x=0;if(u=e,typeof e=="function")ao(e)&&(x=1);else if(typeof e=="string")x=pb(e,a,re.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case fe:return e=ln(31,a,n,c),e.elementType=fe,e.lanes=d,e;case R:return ea(a.children,c,d,n);case H:x=8,c|=24;break;case N:return e=ln(12,a,n,c|2),e.elementType=N,e.lanes=d,e;case ee:return e=ln(13,a,n,c),e.elementType=ee,e.lanes=d,e;case O:return e=ln(19,a,n,c),e.elementType=O,e.lanes=d,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case q:x=10;break e;case Z:x=9;break e;case te:x=11;break e;case P:x=14;break e;case oe:x=16,u=null;break e}x=29,a=Error(r(130,e===null?"null":typeof e,"")),u=null}return n=ln(x,a,n,c),n.elementType=e,n.type=u,n.lanes=d,n}function ea(e,n,a,u){return e=ln(7,e,u,n),e.lanes=a,e}function io(e,n,a){return e=ln(6,e,null,n),e.lanes=a,e}function dh(e){var n=ln(18,null,null,0);return n.stateNode=e,n}function ro(e,n,a){return n=ln(4,e.children!==null?e.children:[],e.key,n),n.lanes=a,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}var hh=new WeakMap;function pn(e,n){if(typeof e=="object"&&e!==null){var a=hh.get(e);return a!==void 0?a:(n={value:e,source:n,stack:Gl(n)},hh.set(e,n),n)}return{value:e,source:n,stack:Gl(n)}}var Ua=[],Ha=0,$r=null,Mi=0,gn=[],yn=0,vl=null,Tn=1,Dn="";function Fn(e,n){Ua[Ha++]=Mi,Ua[Ha++]=$r,$r=e,Mi=n}function mh(e,n,a){gn[yn++]=Tn,gn[yn++]=Dn,gn[yn++]=vl,vl=e;var u=Tn;e=Dn;var c=32-tt(u)-1;u&=~(1<<c),a+=1;var d=32-tt(n)+c;if(30<d){var x=c-c%5;d=(u&(1<<x)-1).toString(32),u>>=x,c-=x,Tn=1<<32-tt(n)+c|a<<c|u,Dn=d+e}else Tn=1<<d|a<<c|u,Dn=e}function uo(e){e.return!==null&&(Fn(e,1),mh(e,1,0))}function so(e){for(;e===$r;)$r=Ua[--Ha],Ua[Ha]=null,Mi=Ua[--Ha],Ua[Ha]=null;for(;e===vl;)vl=gn[--yn],gn[yn]=null,Dn=gn[--yn],gn[yn]=null,Tn=gn[--yn],gn[yn]=null}function ph(e,n){gn[yn++]=Tn,gn[yn++]=Dn,gn[yn++]=vl,Tn=n.id,Dn=n.overflow,vl=e}var Dt=null,rt=null,He=!1,kl=null,xn=!1,oo=Error(r(519));function wl(e){var n=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ri(pn(n,e)),oo}function gh(e){var n=e.stateNode,a=e.type,u=e.memoizedProps;switch(n[Tt]=e,n[Ft]=u,a){case"dialog":Me("cancel",n),Me("close",n);break;case"iframe":case"object":case"embed":Me("load",n);break;case"video":case"audio":for(a=0;a<lr.length;a++)Me(lr[a],n);break;case"source":Me("error",n);break;case"img":case"image":case"link":Me("error",n),Me("load",n);break;case"details":Me("toggle",n);break;case"input":Me("invalid",n),Nd(n,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0);break;case"select":Me("invalid",n);break;case"textarea":Me("invalid",n),Dd(n,u.value,u.defaultValue,u.children)}a=u.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||n.textContent===""+a||u.suppressHydrationWarning===!0||Op(n.textContent,a)?(u.popover!=null&&(Me("beforetoggle",n),Me("toggle",n)),u.onScroll!=null&&Me("scroll",n),u.onScrollEnd!=null&&Me("scrollend",n),u.onClick!=null&&(n.onclick=In),n=!0):n=!1,n||wl(e,!0)}function yh(e){for(Dt=e.return;Dt;)switch(Dt.tag){case 5:case 31:case 13:xn=!1;return;case 27:case 3:xn=!0;return;default:Dt=Dt.return}}function qa(e){if(e!==Dt)return!1;if(!He)return yh(e),He=!0,!1;var n=e.tag,a;if((a=n!==3&&n!==27)&&((a=n===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||jc(e.type,e.memoizedProps)),a=!a),a&&rt&&wl(e),yh(e),n===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));rt=Ip(e)}else if(n===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));rt=Ip(e)}else n===27?(n=rt,Ll(e.type)?(e=Oc,Oc=null,rt=e):rt=n):rt=Dt?vn(e.stateNode.nextSibling):null;return!0}function ta(){rt=Dt=null,He=!1}function co(){var e=kl;return e!==null&&(Kt===null?Kt=e:Kt.push.apply(Kt,e),kl=null),e}function Ri(e){kl===null?kl=[e]:kl.push(e)}var fo=A(null),na=null,Qn=null;function Sl(e,n,a){S(fo,n._currentValue),n._currentValue=a}function Gn(e){e._currentValue=fo.current,F(fo)}function ho(e,n,a){for(;e!==null;){var u=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,u!==null&&(u.childLanes|=n)):u!==null&&(u.childLanes&n)!==n&&(u.childLanes|=n),e===a)break;e=e.return}}function mo(e,n,a,u){var c=e.child;for(c!==null&&(c.return=e);c!==null;){var d=c.dependencies;if(d!==null){var x=c.child;d=d.firstContext;e:for(;d!==null;){var w=d;d=c;for(var C=0;C<n.length;C++)if(w.context===n[C]){d.lanes|=a,w=d.alternate,w!==null&&(w.lanes|=a),ho(d.return,a,e),u||(x=null);break e}d=w.next}}else if(c.tag===18){if(x=c.return,x===null)throw Error(r(341));x.lanes|=a,d=x.alternate,d!==null&&(d.lanes|=a),ho(x,a,e),x=null}else x=c.child;if(x!==null)x.return=c;else for(x=c;x!==null;){if(x===e){x=null;break}if(c=x.sibling,c!==null){c.return=x.return,x=c;break}x=x.return}c=x}}function Va(e,n,a,u){e=null;for(var c=n,d=!1;c!==null;){if(!d){if((c.flags&524288)!==0)d=!0;else if((c.flags&262144)!==0)break}if(c.tag===10){var x=c.alternate;if(x===null)throw Error(r(387));if(x=x.memoizedProps,x!==null){var w=c.type;nn(c.pendingProps.value,x.value)||(e!==null?e.push(w):e=[w])}}else if(c===xe.current){if(x=c.alternate,x===null)throw Error(r(387));x.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(sr):e=[sr])}c=c.return}e!==null&&mo(n,e,a,u),n.flags|=262144}function Pr(e){for(e=e.firstContext;e!==null;){if(!nn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function la(e){na=e,Qn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function zt(e){return xh(na,e)}function Wr(e,n){return na===null&&la(e),xh(e,n)}function xh(e,n){var a=n._currentValue;if(n={context:n,memoizedValue:a,next:null},Qn===null){if(e===null)throw Error(r(308));Qn=n,e.dependencies={lanes:0,firstContext:n},e.flags|=524288}else Qn=Qn.next=n;return a}var f1=typeof AbortController<"u"?AbortController:function(){var e=[],n=this.signal={aborted:!1,addEventListener:function(a,u){e.push(u)}};this.abort=function(){n.aborted=!0,e.forEach(function(a){return a()})}},d1=t.unstable_scheduleCallback,h1=t.unstable_NormalPriority,gt={$$typeof:q,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function po(){return{controller:new f1,data:new Map,refCount:0}}function Li(e){e.refCount--,e.refCount===0&&d1(h1,function(){e.controller.abort()})}var Bi=null,go=0,Ia=0,Ya=null;function m1(e,n){if(Bi===null){var a=Bi=[];go=0,Ia=bc(),Ya={status:"pending",value:void 0,then:function(u){a.push(u)}}}return go++,n.then(bh,bh),n}function bh(){if(--go===0&&Bi!==null){Ya!==null&&(Ya.status="fulfilled");var e=Bi;Bi=null,Ia=0,Ya=null;for(var n=0;n<e.length;n++)(0,e[n])()}}function p1(e,n){var a=[],u={status:"pending",value:null,reason:null,then:function(c){a.push(c)}};return e.then(function(){u.status="fulfilled",u.value=n;for(var c=0;c<a.length;c++)(0,a[c])(n)},function(c){for(u.status="rejected",u.reason=c,c=0;c<a.length;c++)(0,a[c])(void 0)}),u}var vh=T.S;T.S=function(e,n){lp=pt(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&m1(e,n),vh!==null&&vh(e,n)};var aa=A(null);function yo(){var e=aa.current;return e!==null?e:nt.pooledCache}function eu(e,n){n===null?S(aa,aa.current):S(aa,n.pool)}function kh(){var e=yo();return e===null?null:{parent:gt._currentValue,pool:e}}var Za=Error(r(460)),xo=Error(r(474)),tu=Error(r(542)),nu={then:function(){}};function wh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Sh(e,n,a){switch(a=e[a],a===void 0?e.push(n):a!==n&&(n.then(In,In),n=a),n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,Eh(e),e;default:if(typeof n.status=="string")n.then(In,In);else{if(e=nt,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=n,e.status="pending",e.then(function(u){if(n.status==="pending"){var c=n;c.status="fulfilled",c.value=u}},function(u){if(n.status==="pending"){var c=n;c.status="rejected",c.reason=u}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,Eh(e),e}throw ra=n,Za}}function ia(e){try{var n=e._init;return n(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(ra=a,Za):a}}var ra=null;function _h(){if(ra===null)throw Error(r(459));var e=ra;return ra=null,e}function Eh(e){if(e===Za||e===tu)throw Error(r(483))}var Fa=null,Ui=0;function lu(e){var n=Ui;return Ui+=1,Fa===null&&(Fa=[]),Sh(Fa,e,n)}function Hi(e,n){n=n.props.ref,e.ref=n!==void 0?n:null}function au(e,n){throw n.$$typeof===k?Error(r(525)):(e=Object.prototype.toString.call(n),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e)))}function Ch(e){function n(D,j){if(e){var L=D.deletions;L===null?(D.deletions=[j],D.flags|=16):L.push(j)}}function a(D,j){if(!e)return null;for(;j!==null;)n(D,j),j=j.sibling;return null}function u(D){for(var j=new Map;D!==null;)D.key!==null?j.set(D.key,D):j.set(D.index,D),D=D.sibling;return j}function c(D,j){return D=Zn(D,j),D.index=0,D.sibling=null,D}function d(D,j,L){return D.index=L,e?(L=D.alternate,L!==null?(L=L.index,L<j?(D.flags|=67108866,j):L):(D.flags|=67108866,j)):(D.flags|=1048576,j)}function x(D){return e&&D.alternate===null&&(D.flags|=67108866),D}function w(D,j,L,K){return j===null||j.tag!==6?(j=io(L,D.mode,K),j.return=D,j):(j=c(j,L),j.return=D,j)}function C(D,j,L,K){var ke=L.type;return ke===R?G(D,j,L.props.children,K,L.key):j!==null&&(j.elementType===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===oe&&ia(ke)===j.type)?(j=c(j,L.props),Hi(j,L),j.return=D,j):(j=Kr(L.type,L.key,L.props,null,D.mode,K),Hi(j,L),j.return=D,j)}function B(D,j,L,K){return j===null||j.tag!==4||j.stateNode.containerInfo!==L.containerInfo||j.stateNode.implementation!==L.implementation?(j=ro(L,D.mode,K),j.return=D,j):(j=c(j,L.children||[]),j.return=D,j)}function G(D,j,L,K,ke){return j===null||j.tag!==7?(j=ea(L,D.mode,K,ke),j.return=D,j):(j=c(j,L),j.return=D,j)}function $(D,j,L){if(typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint")return j=io(""+j,D.mode,L),j.return=D,j;if(typeof j=="object"&&j!==null){switch(j.$$typeof){case v:return L=Kr(j.type,j.key,j.props,null,D.mode,L),Hi(L,j),L.return=D,L;case _:return j=ro(j,D.mode,L),j.return=D,j;case oe:return j=ia(j),$(D,j,L)}if(W(j)||J(j))return j=ea(j,D.mode,L,null),j.return=D,j;if(typeof j.then=="function")return $(D,lu(j),L);if(j.$$typeof===q)return $(D,Wr(D,j),L);au(D,j)}return null}function U(D,j,L,K){var ke=j!==null?j.key:null;if(typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint")return ke!==null?null:w(D,j,""+L,K);if(typeof L=="object"&&L!==null){switch(L.$$typeof){case v:return L.key===ke?C(D,j,L,K):null;case _:return L.key===ke?B(D,j,L,K):null;case oe:return L=ia(L),U(D,j,L,K)}if(W(L)||J(L))return ke!==null?null:G(D,j,L,K,null);if(typeof L.then=="function")return U(D,j,lu(L),K);if(L.$$typeof===q)return U(D,j,Wr(D,L),K);au(D,L)}return null}function V(D,j,L,K,ke){if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return D=D.get(L)||null,w(j,D,""+K,ke);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case v:return D=D.get(K.key===null?L:K.key)||null,C(j,D,K,ke);case _:return D=D.get(K.key===null?L:K.key)||null,B(j,D,K,ke);case oe:return K=ia(K),V(D,j,L,K,ke)}if(W(K)||J(K))return D=D.get(L)||null,G(j,D,K,ke,null);if(typeof K.then=="function")return V(D,j,L,lu(K),ke);if(K.$$typeof===q)return V(D,j,L,Wr(j,K),ke);au(j,K)}return null}function me(D,j,L,K){for(var ke=null,Ze=null,ge=j,De=j=0,Be=null;ge!==null&&De<L.length;De++){ge.index>De?(Be=ge,ge=null):Be=ge.sibling;var Fe=U(D,ge,L[De],K);if(Fe===null){ge===null&&(ge=Be);break}e&&ge&&Fe.alternate===null&&n(D,ge),j=d(Fe,j,De),Ze===null?ke=Fe:Ze.sibling=Fe,Ze=Fe,ge=Be}if(De===L.length)return a(D,ge),He&&Fn(D,De),ke;if(ge===null){for(;De<L.length;De++)ge=$(D,L[De],K),ge!==null&&(j=d(ge,j,De),Ze===null?ke=ge:Ze.sibling=ge,Ze=ge);return He&&Fn(D,De),ke}for(ge=u(ge);De<L.length;De++)Be=V(ge,D,De,L[De],K),Be!==null&&(e&&Be.alternate!==null&&ge.delete(Be.key===null?De:Be.key),j=d(Be,j,De),Ze===null?ke=Be:Ze.sibling=Be,Ze=Be);return e&&ge.forEach(function(Vl){return n(D,Vl)}),He&&Fn(D,De),ke}function Se(D,j,L,K){if(L==null)throw Error(r(151));for(var ke=null,Ze=null,ge=j,De=j=0,Be=null,Fe=L.next();ge!==null&&!Fe.done;De++,Fe=L.next()){ge.index>De?(Be=ge,ge=null):Be=ge.sibling;var Vl=U(D,ge,Fe.value,K);if(Vl===null){ge===null&&(ge=Be);break}e&&ge&&Vl.alternate===null&&n(D,ge),j=d(Vl,j,De),Ze===null?ke=Vl:Ze.sibling=Vl,Ze=Vl,ge=Be}if(Fe.done)return a(D,ge),He&&Fn(D,De),ke;if(ge===null){for(;!Fe.done;De++,Fe=L.next())Fe=$(D,Fe.value,K),Fe!==null&&(j=d(Fe,j,De),Ze===null?ke=Fe:Ze.sibling=Fe,Ze=Fe);return He&&Fn(D,De),ke}for(ge=u(ge);!Fe.done;De++,Fe=L.next())Fe=V(ge,D,De,Fe.value,K),Fe!==null&&(e&&Fe.alternate!==null&&ge.delete(Fe.key===null?De:Fe.key),j=d(Fe,j,De),Ze===null?ke=Fe:Ze.sibling=Fe,Ze=Fe);return e&&ge.forEach(function(Cb){return n(D,Cb)}),He&&Fn(D,De),ke}function et(D,j,L,K){if(typeof L=="object"&&L!==null&&L.type===R&&L.key===null&&(L=L.props.children),typeof L=="object"&&L!==null){switch(L.$$typeof){case v:e:{for(var ke=L.key;j!==null;){if(j.key===ke){if(ke=L.type,ke===R){if(j.tag===7){a(D,j.sibling),K=c(j,L.props.children),K.return=D,D=K;break e}}else if(j.elementType===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===oe&&ia(ke)===j.type){a(D,j.sibling),K=c(j,L.props),Hi(K,L),K.return=D,D=K;break e}a(D,j);break}else n(D,j);j=j.sibling}L.type===R?(K=ea(L.props.children,D.mode,K,L.key),K.return=D,D=K):(K=Kr(L.type,L.key,L.props,null,D.mode,K),Hi(K,L),K.return=D,D=K)}return x(D);case _:e:{for(ke=L.key;j!==null;){if(j.key===ke)if(j.tag===4&&j.stateNode.containerInfo===L.containerInfo&&j.stateNode.implementation===L.implementation){a(D,j.sibling),K=c(j,L.children||[]),K.return=D,D=K;break e}else{a(D,j);break}else n(D,j);j=j.sibling}K=ro(L,D.mode,K),K.return=D,D=K}return x(D);case oe:return L=ia(L),et(D,j,L,K)}if(W(L))return me(D,j,L,K);if(J(L)){if(ke=J(L),typeof ke!="function")throw Error(r(150));return L=ke.call(L),Se(D,j,L,K)}if(typeof L.then=="function")return et(D,j,lu(L),K);if(L.$$typeof===q)return et(D,j,Wr(D,L),K);au(D,L)}return typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint"?(L=""+L,j!==null&&j.tag===6?(a(D,j.sibling),K=c(j,L),K.return=D,D=K):(a(D,j),K=io(L,D.mode,K),K.return=D,D=K),x(D)):a(D,j)}return function(D,j,L,K){try{Ui=0;var ke=et(D,j,L,K);return Fa=null,ke}catch(ge){if(ge===Za||ge===tu)throw ge;var Ze=ln(29,ge,null,D.mode);return Ze.lanes=K,Ze.return=D,Ze}finally{}}}var ua=Ch(!0),Ah=Ch(!1),_l=!1;function bo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function vo(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function El(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Cl(e,n,a){var u=e.updateQueue;if(u===null)return null;if(u=u.shared,(Ge&2)!==0){var c=u.pending;return c===null?n.next=n:(n.next=c.next,c.next=n),u.pending=n,n=Jr(e),ch(e,null,a),n}return Xr(e,u,n,a),Jr(e)}function qi(e,n,a){if(n=n.updateQueue,n!==null&&(n=n.shared,(a&4194048)!==0)){var u=n.lanes;u&=e.pendingLanes,a|=u,n.lanes=a,xd(e,a)}}function ko(e,n){var a=e.updateQueue,u=e.alternate;if(u!==null&&(u=u.updateQueue,a===u)){var c=null,d=null;if(a=a.firstBaseUpdate,a!==null){do{var x={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};d===null?c=d=x:d=d.next=x,a=a.next}while(a!==null);d===null?c=d=n:d=d.next=n}else c=d=n;a={baseState:u.baseState,firstBaseUpdate:c,lastBaseUpdate:d,shared:u.shared,callbacks:u.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=n:e.next=n,a.lastBaseUpdate=n}var wo=!1;function Vi(){if(wo){var e=Ya;if(e!==null)throw e}}function Ii(e,n,a,u){wo=!1;var c=e.updateQueue;_l=!1;var d=c.firstBaseUpdate,x=c.lastBaseUpdate,w=c.shared.pending;if(w!==null){c.shared.pending=null;var C=w,B=C.next;C.next=null,x===null?d=B:x.next=B,x=C;var G=e.alternate;G!==null&&(G=G.updateQueue,w=G.lastBaseUpdate,w!==x&&(w===null?G.firstBaseUpdate=B:w.next=B,G.lastBaseUpdate=C))}if(d!==null){var $=c.baseState;x=0,G=B=C=null,w=d;do{var U=w.lane&-536870913,V=U!==w.lane;if(V?(Le&U)===U:(u&U)===U){U!==0&&U===Ia&&(wo=!0),G!==null&&(G=G.next={lane:0,tag:w.tag,payload:w.payload,callback:null,next:null});e:{var me=e,Se=w;U=n;var et=a;switch(Se.tag){case 1:if(me=Se.payload,typeof me=="function"){$=me.call(et,$,U);break e}$=me;break e;case 3:me.flags=me.flags&-65537|128;case 0:if(me=Se.payload,U=typeof me=="function"?me.call(et,$,U):me,U==null)break e;$=y({},$,U);break e;case 2:_l=!0}}U=w.callback,U!==null&&(e.flags|=64,V&&(e.flags|=8192),V=c.callbacks,V===null?c.callbacks=[U]:V.push(U))}else V={lane:U,tag:w.tag,payload:w.payload,callback:w.callback,next:null},G===null?(B=G=V,C=$):G=G.next=V,x|=U;if(w=w.next,w===null){if(w=c.shared.pending,w===null)break;V=w,w=V.next,V.next=null,c.lastBaseUpdate=V,c.shared.pending=null}}while(!0);G===null&&(C=$),c.baseState=C,c.firstBaseUpdate=B,c.lastBaseUpdate=G,d===null&&(c.shared.lanes=0),Dl|=x,e.lanes=x,e.memoizedState=$}}function jh(e,n){if(typeof e!="function")throw Error(r(191,e));e.call(n)}function Nh(e,n){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)jh(a[e],n)}var Qa=A(null),iu=A(0);function Th(e,n){e=nl,S(iu,e),S(Qa,n),nl=e|n.baseLanes}function So(){S(iu,nl),S(Qa,Qa.current)}function _o(){nl=iu.current,F(Qa),F(iu)}var an=A(null),bn=null;function Al(e){var n=e.alternate;S(ht,ht.current&1),S(an,e),bn===null&&(n===null||Qa.current!==null||n.memoizedState!==null)&&(bn=e)}function Eo(e){S(ht,ht.current),S(an,e),bn===null&&(bn=e)}function Dh(e){e.tag===22?(S(ht,ht.current),S(an,e),bn===null&&(bn=e)):jl()}function jl(){S(ht,ht.current),S(an,an.current)}function rn(e){F(an),bn===e&&(bn=null),F(ht)}var ht=A(0);function ru(e){for(var n=e;n!==null;){if(n.tag===13){var a=n.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Dc(a)||zc(a)))return n}else if(n.tag===19&&(n.memoizedProps.revealOrder==="forwards"||n.memoizedProps.revealOrder==="backwards"||n.memoizedProps.revealOrder==="unstable_legacy-backwards"||n.memoizedProps.revealOrder==="together")){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var Xn=0,Te=null,Pe=null,yt=null,uu=!1,Ga=!1,sa=!1,su=0,Yi=0,Xa=null,g1=0;function ft(){throw Error(r(321))}function Co(e,n){if(n===null)return!1;for(var a=0;a<n.length&&a<e.length;a++)if(!nn(e[a],n[a]))return!1;return!0}function Ao(e,n,a,u,c,d){return Xn=d,Te=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,T.H=e===null||e.memoizedState===null?mm:Io,sa=!1,d=a(u,c),sa=!1,Ga&&(d=Oh(n,a,u,c)),zh(e),d}function zh(e){T.H=Qi;var n=Pe!==null&&Pe.next!==null;if(Xn=0,yt=Pe=Te=null,uu=!1,Yi=0,Xa=null,n)throw Error(r(300));e===null||xt||(e=e.dependencies,e!==null&&Pr(e)&&(xt=!0))}function Oh(e,n,a,u){Te=e;var c=0;do{if(Ga&&(Xa=null),Yi=0,Ga=!1,25<=c)throw Error(r(301));if(c+=1,yt=Pe=null,e.updateQueue!=null){var d=e.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}T.H=pm,d=n(a,u)}while(Ga);return d}function y1(){var e=T.H,n=e.useState()[0];return n=typeof n.then=="function"?Zi(n):n,e=e.useState()[0],(Pe!==null?Pe.memoizedState:null)!==e&&(Te.flags|=1024),n}function jo(){var e=su!==0;return su=0,e}function No(e,n,a){n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~a}function To(e){if(uu){for(e=e.memoizedState;e!==null;){var n=e.queue;n!==null&&(n.pending=null),e=e.next}uu=!1}Xn=0,yt=Pe=Te=null,Ga=!1,Yi=su=0,Xa=null}function Ht(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return yt===null?Te.memoizedState=yt=e:yt=yt.next=e,yt}function mt(){if(Pe===null){var e=Te.alternate;e=e!==null?e.memoizedState:null}else e=Pe.next;var n=yt===null?Te.memoizedState:yt.next;if(n!==null)yt=n,Pe=e;else{if(e===null)throw Te.alternate===null?Error(r(467)):Error(r(310));Pe=e,e={memoizedState:Pe.memoizedState,baseState:Pe.baseState,baseQueue:Pe.baseQueue,queue:Pe.queue,next:null},yt===null?Te.memoizedState=yt=e:yt=yt.next=e}return yt}function ou(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Zi(e){var n=Yi;return Yi+=1,Xa===null&&(Xa=[]),e=Sh(Xa,e,n),n=Te,(yt===null?n.memoizedState:yt.next)===null&&(n=n.alternate,T.H=n===null||n.memoizedState===null?mm:Io),e}function cu(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Zi(e);if(e.$$typeof===q)return zt(e)}throw Error(r(438,String(e)))}function Do(e){var n=null,a=Te.updateQueue;if(a!==null&&(n=a.memoCache),n==null){var u=Te.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(n={data:u.data.map(function(c){return c.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),a===null&&(a=ou(),Te.updateQueue=a),a.memoCache=n,a=n.data[n.index],a===void 0)for(a=n.data[n.index]=Array(e),u=0;u<e;u++)a[u]=M;return n.index++,a}function Jn(e,n){return typeof n=="function"?n(e):n}function fu(e){var n=mt();return zo(n,Pe,e)}function zo(e,n,a){var u=e.queue;if(u===null)throw Error(r(311));u.lastRenderedReducer=a;var c=e.baseQueue,d=u.pending;if(d!==null){if(c!==null){var x=c.next;c.next=d.next,d.next=x}n.baseQueue=c=d,u.pending=null}if(d=e.baseState,c===null)e.memoizedState=d;else{n=c.next;var w=x=null,C=null,B=n,G=!1;do{var $=B.lane&-536870913;if($!==B.lane?(Le&$)===$:(Xn&$)===$){var U=B.revertLane;if(U===0)C!==null&&(C=C.next={lane:0,revertLane:0,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null}),$===Ia&&(G=!0);else if((Xn&U)===U){B=B.next,U===Ia&&(G=!0);continue}else $={lane:0,revertLane:B.revertLane,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},C===null?(w=C=$,x=d):C=C.next=$,Te.lanes|=U,Dl|=U;$=B.action,sa&&a(d,$),d=B.hasEagerState?B.eagerState:a(d,$)}else U={lane:$,revertLane:B.revertLane,gesture:B.gesture,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},C===null?(w=C=U,x=d):C=C.next=U,Te.lanes|=$,Dl|=$;B=B.next}while(B!==null&&B!==n);if(C===null?x=d:C.next=w,!nn(d,e.memoizedState)&&(xt=!0,G&&(a=Ya,a!==null)))throw a;e.memoizedState=d,e.baseState=x,e.baseQueue=C,u.lastRenderedState=d}return c===null&&(u.lanes=0),[e.memoizedState,u.dispatch]}function Oo(e){var n=mt(),a=n.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=e;var u=a.dispatch,c=a.pending,d=n.memoizedState;if(c!==null){a.pending=null;var x=c=c.next;do d=e(d,x.action),x=x.next;while(x!==c);nn(d,n.memoizedState)||(xt=!0),n.memoizedState=d,n.baseQueue===null&&(n.baseState=d),a.lastRenderedState=d}return[d,u]}function Mh(e,n,a){var u=Te,c=mt(),d=He;if(d){if(a===void 0)throw Error(r(407));a=a()}else a=n();var x=!nn((Pe||c).memoizedState,a);if(x&&(c.memoizedState=a,xt=!0),c=c.queue,Lo(Bh.bind(null,u,c,e),[e]),c.getSnapshot!==n||x||yt!==null&&yt.memoizedState.tag&1){if(u.flags|=2048,Ja(9,{destroy:void 0},Lh.bind(null,u,c,a,n),null),nt===null)throw Error(r(349));d||(Xn&127)!==0||Rh(u,n,a)}return a}function Rh(e,n,a){e.flags|=16384,e={getSnapshot:n,value:a},n=Te.updateQueue,n===null?(n=ou(),Te.updateQueue=n,n.stores=[e]):(a=n.stores,a===null?n.stores=[e]:a.push(e))}function Lh(e,n,a,u){n.value=a,n.getSnapshot=u,Uh(n)&&Hh(e)}function Bh(e,n,a){return a(function(){Uh(n)&&Hh(e)})}function Uh(e){var n=e.getSnapshot;e=e.value;try{var a=n();return!nn(e,a)}catch{return!0}}function Hh(e){var n=Wl(e,2);n!==null&&$t(n,e,2)}function Mo(e){var n=Ht();if(typeof e=="function"){var a=e;if(e=a(),sa){Zt(!0);try{a()}finally{Zt(!1)}}}return n.memoizedState=n.baseState=e,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jn,lastRenderedState:e},n}function qh(e,n,a,u){return e.baseState=a,zo(e,Pe,typeof u=="function"?u:Jn)}function x1(e,n,a,u,c){if(mu(e))throw Error(r(485));if(e=n.action,e!==null){var d={payload:c,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(x){d.listeners.push(x)}};T.T!==null?a(!0):d.isTransition=!1,u(d),a=n.pending,a===null?(d.next=n.pending=d,Vh(n,d)):(d.next=a.next,n.pending=a.next=d)}}function Vh(e,n){var a=n.action,u=n.payload,c=e.state;if(n.isTransition){var d=T.T,x={};T.T=x;try{var w=a(c,u),C=T.S;C!==null&&C(x,w),Ih(e,n,w)}catch(B){Ro(e,n,B)}finally{d!==null&&x.types!==null&&(d.types=x.types),T.T=d}}else try{d=a(c,u),Ih(e,n,d)}catch(B){Ro(e,n,B)}}function Ih(e,n,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(u){Yh(e,n,u)},function(u){return Ro(e,n,u)}):Yh(e,n,a)}function Yh(e,n,a){n.status="fulfilled",n.value=a,Zh(n),e.state=a,n=e.pending,n!==null&&(a=n.next,a===n?e.pending=null:(a=a.next,n.next=a,Vh(e,a)))}function Ro(e,n,a){var u=e.pending;if(e.pending=null,u!==null){u=u.next;do n.status="rejected",n.reason=a,Zh(n),n=n.next;while(n!==u)}e.action=null}function Zh(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function Fh(e,n){return n}function Qh(e,n){if(He){var a=nt.formState;if(a!==null){e:{var u=Te;if(He){if(rt){t:{for(var c=rt,d=xn;c.nodeType!==8;){if(!d){c=null;break t}if(c=vn(c.nextSibling),c===null){c=null;break t}}d=c.data,c=d==="F!"||d==="F"?c:null}if(c){rt=vn(c.nextSibling),u=c.data==="F!";break e}}wl(u)}u=!1}u&&(n=a[0])}}return a=Ht(),a.memoizedState=a.baseState=n,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fh,lastRenderedState:n},a.queue=u,a=fm.bind(null,Te,u),u.dispatch=a,u=Mo(!1),d=Vo.bind(null,Te,!1,u.queue),u=Ht(),c={state:n,dispatch:null,action:e,pending:null},u.queue=c,a=x1.bind(null,Te,c,d,a),c.dispatch=a,u.memoizedState=e,[n,a,!1]}function Gh(e){var n=mt();return Xh(n,Pe,e)}function Xh(e,n,a){if(n=zo(e,n,Fh)[0],e=fu(Jn)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var u=Zi(n)}catch(x){throw x===Za?tu:x}else u=n;n=mt();var c=n.queue,d=c.dispatch;return a!==n.memoizedState&&(Te.flags|=2048,Ja(9,{destroy:void 0},b1.bind(null,c,a),null)),[u,d,e]}function b1(e,n){e.action=n}function Jh(e){var n=mt(),a=Pe;if(a!==null)return Xh(n,a,e);mt(),n=n.memoizedState,a=mt();var u=a.queue.dispatch;return a.memoizedState=e,[n,u,!1]}function Ja(e,n,a,u){return e={tag:e,create:a,deps:u,inst:n,next:null},n=Te.updateQueue,n===null&&(n=ou(),Te.updateQueue=n),a=n.lastEffect,a===null?n.lastEffect=e.next=e:(u=a.next,a.next=e,e.next=u,n.lastEffect=e),e}function Kh(){return mt().memoizedState}function du(e,n,a,u){var c=Ht();Te.flags|=e,c.memoizedState=Ja(1|n,{destroy:void 0},a,u===void 0?null:u)}function hu(e,n,a,u){var c=mt();u=u===void 0?null:u;var d=c.memoizedState.inst;Pe!==null&&u!==null&&Co(u,Pe.memoizedState.deps)?c.memoizedState=Ja(n,d,a,u):(Te.flags|=e,c.memoizedState=Ja(1|n,d,a,u))}function $h(e,n){du(8390656,8,e,n)}function Lo(e,n){hu(2048,8,e,n)}function v1(e){Te.flags|=4;var n=Te.updateQueue;if(n===null)n=ou(),Te.updateQueue=n,n.events=[e];else{var a=n.events;a===null?n.events=[e]:a.push(e)}}function Ph(e){var n=mt().memoizedState;return v1({ref:n,nextImpl:e}),function(){if((Ge&2)!==0)throw Error(r(440));return n.impl.apply(void 0,arguments)}}function Wh(e,n){return hu(4,2,e,n)}function em(e,n){return hu(4,4,e,n)}function tm(e,n){if(typeof n=="function"){e=e();var a=n(e);return function(){typeof a=="function"?a():n(null)}}if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function nm(e,n,a){a=a!=null?a.concat([e]):null,hu(4,4,tm.bind(null,n,e),a)}function Bo(){}function lm(e,n){var a=mt();n=n===void 0?null:n;var u=a.memoizedState;return n!==null&&Co(n,u[1])?u[0]:(a.memoizedState=[e,n],e)}function am(e,n){var a=mt();n=n===void 0?null:n;var u=a.memoizedState;if(n!==null&&Co(n,u[1]))return u[0];if(u=e(),sa){Zt(!0);try{e()}finally{Zt(!1)}}return a.memoizedState=[u,n],u}function Uo(e,n,a){return a===void 0||(Xn&1073741824)!==0&&(Le&261930)===0?e.memoizedState=n:(e.memoizedState=a,e=ip(),Te.lanes|=e,Dl|=e,a)}function im(e,n,a,u){return nn(a,n)?a:Qa.current!==null?(e=Uo(e,a,u),nn(e,n)||(xt=!0),e):(Xn&42)===0||(Xn&1073741824)!==0&&(Le&261930)===0?(xt=!0,e.memoizedState=a):(e=ip(),Te.lanes|=e,Dl|=e,n)}function rm(e,n,a,u,c){var d=X.p;X.p=d!==0&&8>d?d:8;var x=T.T,w={};T.T=w,Vo(e,!1,n,a);try{var C=c(),B=T.S;if(B!==null&&B(w,C),C!==null&&typeof C=="object"&&typeof C.then=="function"){var G=p1(C,u);Fi(e,n,G,on(e))}else Fi(e,n,u,on(e))}catch($){Fi(e,n,{then:function(){},status:"rejected",reason:$},on())}finally{X.p=d,x!==null&&w.types!==null&&(x.types=w.types),T.T=x}}function k1(){}function Ho(e,n,a,u){if(e.tag!==5)throw Error(r(476));var c=um(e).queue;rm(e,c,n,se,a===null?k1:function(){return sm(e),a(u)})}function um(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:se,baseState:se,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jn,lastRenderedState:se},next:null};var a={};return n.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jn,lastRenderedState:a},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function sm(e){var n=um(e);n.next===null&&(n=e.alternate.memoizedState),Fi(e,n.next.queue,{},on())}function qo(){return zt(sr)}function om(){return mt().memoizedState}function cm(){return mt().memoizedState}function w1(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var a=on();e=El(a);var u=Cl(n,e,a);u!==null&&($t(u,n,a),qi(u,n,a)),n={cache:po()},e.payload=n;return}n=n.return}}function S1(e,n,a){var u=on();a={lane:u,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},mu(e)?dm(n,a):(a=lo(e,n,a,u),a!==null&&($t(a,e,u),hm(a,n,u)))}function fm(e,n,a){var u=on();Fi(e,n,a,u)}function Fi(e,n,a,u){var c={lane:u,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(mu(e))dm(n,c);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=n.lastRenderedReducer,d!==null))try{var x=n.lastRenderedState,w=d(x,a);if(c.hasEagerState=!0,c.eagerState=w,nn(w,x))return Xr(e,n,c,0),nt===null&&Gr(),!1}catch{}finally{}if(a=lo(e,n,c,u),a!==null)return $t(a,e,u),hm(a,n,u),!0}return!1}function Vo(e,n,a,u){if(u={lane:2,revertLane:bc(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},mu(e)){if(n)throw Error(r(479))}else n=lo(e,a,u,2),n!==null&&$t(n,e,2)}function mu(e){var n=e.alternate;return e===Te||n!==null&&n===Te}function dm(e,n){Ga=uu=!0;var a=e.pending;a===null?n.next=n:(n.next=a.next,a.next=n),e.pending=n}function hm(e,n,a){if((a&4194048)!==0){var u=n.lanes;u&=e.pendingLanes,a|=u,n.lanes=a,xd(e,a)}}var Qi={readContext:zt,use:cu,useCallback:ft,useContext:ft,useEffect:ft,useImperativeHandle:ft,useLayoutEffect:ft,useInsertionEffect:ft,useMemo:ft,useReducer:ft,useRef:ft,useState:ft,useDebugValue:ft,useDeferredValue:ft,useTransition:ft,useSyncExternalStore:ft,useId:ft,useHostTransitionStatus:ft,useFormState:ft,useActionState:ft,useOptimistic:ft,useMemoCache:ft,useCacheRefresh:ft};Qi.useEffectEvent=ft;var mm={readContext:zt,use:cu,useCallback:function(e,n){return Ht().memoizedState=[e,n===void 0?null:n],e},useContext:zt,useEffect:$h,useImperativeHandle:function(e,n,a){a=a!=null?a.concat([e]):null,du(4194308,4,tm.bind(null,n,e),a)},useLayoutEffect:function(e,n){return du(4194308,4,e,n)},useInsertionEffect:function(e,n){du(4,2,e,n)},useMemo:function(e,n){var a=Ht();n=n===void 0?null:n;var u=e();if(sa){Zt(!0);try{e()}finally{Zt(!1)}}return a.memoizedState=[u,n],u},useReducer:function(e,n,a){var u=Ht();if(a!==void 0){var c=a(n);if(sa){Zt(!0);try{a(n)}finally{Zt(!1)}}}else c=n;return u.memoizedState=u.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},u.queue=e,e=e.dispatch=S1.bind(null,Te,e),[u.memoizedState,e]},useRef:function(e){var n=Ht();return e={current:e},n.memoizedState=e},useState:function(e){e=Mo(e);var n=e.queue,a=fm.bind(null,Te,n);return n.dispatch=a,[e.memoizedState,a]},useDebugValue:Bo,useDeferredValue:function(e,n){var a=Ht();return Uo(a,e,n)},useTransition:function(){var e=Mo(!1);return e=rm.bind(null,Te,e.queue,!0,!1),Ht().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,a){var u=Te,c=Ht();if(He){if(a===void 0)throw Error(r(407));a=a()}else{if(a=n(),nt===null)throw Error(r(349));(Le&127)!==0||Rh(u,n,a)}c.memoizedState=a;var d={value:a,getSnapshot:n};return c.queue=d,$h(Bh.bind(null,u,d,e),[e]),u.flags|=2048,Ja(9,{destroy:void 0},Lh.bind(null,u,d,a,n),null),a},useId:function(){var e=Ht(),n=nt.identifierPrefix;if(He){var a=Dn,u=Tn;a=(u&~(1<<32-tt(u)-1)).toString(32)+a,n="_"+n+"R_"+a,a=su++,0<a&&(n+="H"+a.toString(32)),n+="_"}else a=g1++,n="_"+n+"r_"+a.toString(32)+"_";return e.memoizedState=n},useHostTransitionStatus:qo,useFormState:Qh,useActionState:Qh,useOptimistic:function(e){var n=Ht();n.memoizedState=n.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=a,n=Vo.bind(null,Te,!0,a),a.dispatch=n,[e,n]},useMemoCache:Do,useCacheRefresh:function(){return Ht().memoizedState=w1.bind(null,Te)},useEffectEvent:function(e){var n=Ht(),a={impl:e};return n.memoizedState=a,function(){if((Ge&2)!==0)throw Error(r(440));return a.impl.apply(void 0,arguments)}}},Io={readContext:zt,use:cu,useCallback:lm,useContext:zt,useEffect:Lo,useImperativeHandle:nm,useInsertionEffect:Wh,useLayoutEffect:em,useMemo:am,useReducer:fu,useRef:Kh,useState:function(){return fu(Jn)},useDebugValue:Bo,useDeferredValue:function(e,n){var a=mt();return im(a,Pe.memoizedState,e,n)},useTransition:function(){var e=fu(Jn)[0],n=mt().memoizedState;return[typeof e=="boolean"?e:Zi(e),n]},useSyncExternalStore:Mh,useId:om,useHostTransitionStatus:qo,useFormState:Gh,useActionState:Gh,useOptimistic:function(e,n){var a=mt();return qh(a,Pe,e,n)},useMemoCache:Do,useCacheRefresh:cm};Io.useEffectEvent=Ph;var pm={readContext:zt,use:cu,useCallback:lm,useContext:zt,useEffect:Lo,useImperativeHandle:nm,useInsertionEffect:Wh,useLayoutEffect:em,useMemo:am,useReducer:Oo,useRef:Kh,useState:function(){return Oo(Jn)},useDebugValue:Bo,useDeferredValue:function(e,n){var a=mt();return Pe===null?Uo(a,e,n):im(a,Pe.memoizedState,e,n)},useTransition:function(){var e=Oo(Jn)[0],n=mt().memoizedState;return[typeof e=="boolean"?e:Zi(e),n]},useSyncExternalStore:Mh,useId:om,useHostTransitionStatus:qo,useFormState:Jh,useActionState:Jh,useOptimistic:function(e,n){var a=mt();return Pe!==null?qh(a,Pe,e,n):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Do,useCacheRefresh:cm};pm.useEffectEvent=Ph;function Yo(e,n,a,u){n=e.memoizedState,a=a(u,n),a=a==null?n:y({},n,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Zo={enqueueSetState:function(e,n,a){e=e._reactInternals;var u=on(),c=El(u);c.payload=n,a!=null&&(c.callback=a),n=Cl(e,c,u),n!==null&&($t(n,e,u),qi(n,e,u))},enqueueReplaceState:function(e,n,a){e=e._reactInternals;var u=on(),c=El(u);c.tag=1,c.payload=n,a!=null&&(c.callback=a),n=Cl(e,c,u),n!==null&&($t(n,e,u),qi(n,e,u))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var a=on(),u=El(a);u.tag=2,n!=null&&(u.callback=n),n=Cl(e,u,a),n!==null&&($t(n,e,a),qi(n,e,a))}};function gm(e,n,a,u,c,d,x){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(u,d,x):n.prototype&&n.prototype.isPureReactComponent?!zi(a,u)||!zi(c,d):!0}function ym(e,n,a,u){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(a,u),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(a,u),n.state!==e&&Zo.enqueueReplaceState(n,n.state,null)}function oa(e,n){var a=n;if("ref"in n){a={};for(var u in n)u!=="ref"&&(a[u]=n[u])}if(e=e.defaultProps){a===n&&(a=y({},a));for(var c in e)a[c]===void 0&&(a[c]=e[c])}return a}function xm(e){Qr(e)}function bm(e){console.error(e)}function vm(e){Qr(e)}function pu(e,n){try{var a=e.onUncaughtError;a(n.value,{componentStack:n.stack})}catch(u){setTimeout(function(){throw u})}}function km(e,n,a){try{var u=e.onCaughtError;u(a.value,{componentStack:a.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(c){setTimeout(function(){throw c})}}function Fo(e,n,a){return a=El(a),a.tag=3,a.payload={element:null},a.callback=function(){pu(e,n)},a}function wm(e){return e=El(e),e.tag=3,e}function Sm(e,n,a,u){var c=a.type.getDerivedStateFromError;if(typeof c=="function"){var d=u.value;e.payload=function(){return c(d)},e.callback=function(){km(n,a,u)}}var x=a.stateNode;x!==null&&typeof x.componentDidCatch=="function"&&(e.callback=function(){km(n,a,u),typeof c!="function"&&(zl===null?zl=new Set([this]):zl.add(this));var w=u.stack;this.componentDidCatch(u.value,{componentStack:w!==null?w:""})})}function _1(e,n,a,u,c){if(a.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(n=a.alternate,n!==null&&Va(n,a,c,!0),a=an.current,a!==null){switch(a.tag){case 31:case 13:return bn===null?Au():a.alternate===null&&dt===0&&(dt=3),a.flags&=-257,a.flags|=65536,a.lanes=c,u===nu?a.flags|=16384:(n=a.updateQueue,n===null?a.updateQueue=new Set([u]):n.add(u),gc(e,u,c)),!1;case 22:return a.flags|=65536,u===nu?a.flags|=16384:(n=a.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([u])},a.updateQueue=n):(a=n.retryQueue,a===null?n.retryQueue=new Set([u]):a.add(u)),gc(e,u,c)),!1}throw Error(r(435,a.tag))}return gc(e,u,c),Au(),!1}if(He)return n=an.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=c,u!==oo&&(e=Error(r(422),{cause:u}),Ri(pn(e,a)))):(u!==oo&&(n=Error(r(423),{cause:u}),Ri(pn(n,a))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,u=pn(u,a),c=Fo(e.stateNode,u,c),ko(e,c),dt!==4&&(dt=2)),!1;var d=Error(r(520),{cause:u});if(d=pn(d,a),er===null?er=[d]:er.push(d),dt!==4&&(dt=2),n===null)return!0;u=pn(u,a),a=n;do{switch(a.tag){case 3:return a.flags|=65536,e=c&-c,a.lanes|=e,e=Fo(a.stateNode,u,e),ko(a,e),!1;case 1:if(n=a.type,d=a.stateNode,(a.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(zl===null||!zl.has(d))))return a.flags|=65536,c&=-c,a.lanes|=c,c=wm(c),Sm(c,e,a,u),ko(a,c),!1}a=a.return}while(a!==null);return!1}var Qo=Error(r(461)),xt=!1;function Ot(e,n,a,u){n.child=e===null?Ah(n,null,a,u):ua(n,e.child,a,u)}function _m(e,n,a,u,c){a=a.render;var d=n.ref;if("ref"in u){var x={};for(var w in u)w!=="ref"&&(x[w]=u[w])}else x=u;return la(n),u=Ao(e,n,a,x,d,c),w=jo(),e!==null&&!xt?(No(e,n,c),Kn(e,n,c)):(He&&w&&uo(n),n.flags|=1,Ot(e,n,u,c),n.child)}function Em(e,n,a,u,c){if(e===null){var d=a.type;return typeof d=="function"&&!ao(d)&&d.defaultProps===void 0&&a.compare===null?(n.tag=15,n.type=d,Cm(e,n,d,u,c)):(e=Kr(a.type,null,u,n,n.mode,c),e.ref=n.ref,e.return=n,n.child=e)}if(d=e.child,!ec(e,c)){var x=d.memoizedProps;if(a=a.compare,a=a!==null?a:zi,a(x,u)&&e.ref===n.ref)return Kn(e,n,c)}return n.flags|=1,e=Zn(d,u),e.ref=n.ref,e.return=n,n.child=e}function Cm(e,n,a,u,c){if(e!==null){var d=e.memoizedProps;if(zi(d,u)&&e.ref===n.ref)if(xt=!1,n.pendingProps=u=d,ec(e,c))(e.flags&131072)!==0&&(xt=!0);else return n.lanes=e.lanes,Kn(e,n,c)}return Go(e,n,a,u,c)}function Am(e,n,a,u){var c=u.children,d=e!==null?e.memoizedState:null;if(e===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.mode==="hidden"){if((n.flags&128)!==0){if(d=d!==null?d.baseLanes|a:a,e!==null){for(u=n.child=e.child,c=0;u!==null;)c=c|u.lanes|u.childLanes,u=u.sibling;u=c&~d}else u=0,n.child=null;return jm(e,n,d,a,u)}if((a&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},e!==null&&eu(n,d!==null?d.cachePool:null),d!==null?Th(n,d):So(),Dh(n);else return u=n.lanes=536870912,jm(e,n,d!==null?d.baseLanes|a:a,a,u)}else d!==null?(eu(n,d.cachePool),Th(n,d),jl(),n.memoizedState=null):(e!==null&&eu(n,null),So(),jl());return Ot(e,n,c,a),n.child}function Gi(e,n){return e!==null&&e.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function jm(e,n,a,u,c){var d=yo();return d=d===null?null:{parent:gt._currentValue,pool:d},n.memoizedState={baseLanes:a,cachePool:d},e!==null&&eu(n,null),So(),Dh(n),e!==null&&Va(e,n,u,!0),n.childLanes=c,null}function gu(e,n){return n=xu({mode:n.mode,children:n.children},e.mode),n.ref=e.ref,e.child=n,n.return=e,n}function Nm(e,n,a){return ua(n,e.child,null,a),e=gu(n,n.pendingProps),e.flags|=2,rn(n),n.memoizedState=null,e}function E1(e,n,a){var u=n.pendingProps,c=(n.flags&128)!==0;if(n.flags&=-129,e===null){if(He){if(u.mode==="hidden")return e=gu(n,u),n.lanes=536870912,Gi(null,e);if(Eo(n),(e=rt)?(e=Vp(e,xn),e=e!==null&&e.data==="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:vl!==null?{id:Tn,overflow:Dn}:null,retryLane:536870912,hydrationErrors:null},a=dh(e),a.return=n,n.child=a,Dt=n,rt=null)):e=null,e===null)throw wl(n);return n.lanes=536870912,null}return gu(n,u)}var d=e.memoizedState;if(d!==null){var x=d.dehydrated;if(Eo(n),c)if(n.flags&256)n.flags&=-257,n=Nm(e,n,a);else if(n.memoizedState!==null)n.child=e.child,n.flags|=128,n=null;else throw Error(r(558));else if(xt||Va(e,n,a,!1),c=(a&e.childLanes)!==0,xt||c){if(u=nt,u!==null&&(x=bd(u,a),x!==0&&x!==d.retryLane))throw d.retryLane=x,Wl(e,x),$t(u,e,x),Qo;Au(),n=Nm(e,n,a)}else e=d.treeContext,rt=vn(x.nextSibling),Dt=n,He=!0,kl=null,xn=!1,e!==null&&ph(n,e),n=gu(n,u),n.flags|=4096;return n}return e=Zn(e.child,{mode:u.mode,children:u.children}),e.ref=n.ref,n.child=e,e.return=n,e}function yu(e,n){var a=n.ref;if(a===null)e!==null&&e.ref!==null&&(n.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(r(284));(e===null||e.ref!==a)&&(n.flags|=4194816)}}function Go(e,n,a,u,c){return la(n),a=Ao(e,n,a,u,void 0,c),u=jo(),e!==null&&!xt?(No(e,n,c),Kn(e,n,c)):(He&&u&&uo(n),n.flags|=1,Ot(e,n,a,c),n.child)}function Tm(e,n,a,u,c,d){return la(n),n.updateQueue=null,a=Oh(n,u,a,c),zh(e),u=jo(),e!==null&&!xt?(No(e,n,d),Kn(e,n,d)):(He&&u&&uo(n),n.flags|=1,Ot(e,n,a,d),n.child)}function Dm(e,n,a,u,c){if(la(n),n.stateNode===null){var d=Ba,x=a.contextType;typeof x=="object"&&x!==null&&(d=zt(x)),d=new a(u,d),n.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=Zo,n.stateNode=d,d._reactInternals=n,d=n.stateNode,d.props=u,d.state=n.memoizedState,d.refs={},bo(n),x=a.contextType,d.context=typeof x=="object"&&x!==null?zt(x):Ba,d.state=n.memoizedState,x=a.getDerivedStateFromProps,typeof x=="function"&&(Yo(n,a,x,u),d.state=n.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(x=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),x!==d.state&&Zo.enqueueReplaceState(d,d.state,null),Ii(n,u,d,c),Vi(),d.state=n.memoizedState),typeof d.componentDidMount=="function"&&(n.flags|=4194308),u=!0}else if(e===null){d=n.stateNode;var w=n.memoizedProps,C=oa(a,w);d.props=C;var B=d.context,G=a.contextType;x=Ba,typeof G=="object"&&G!==null&&(x=zt(G));var $=a.getDerivedStateFromProps;G=typeof $=="function"||typeof d.getSnapshotBeforeUpdate=="function",w=n.pendingProps!==w,G||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(w||B!==x)&&ym(n,d,u,x),_l=!1;var U=n.memoizedState;d.state=U,Ii(n,u,d,c),Vi(),B=n.memoizedState,w||U!==B||_l?(typeof $=="function"&&(Yo(n,a,$,u),B=n.memoizedState),(C=_l||gm(n,a,C,u,U,B,x))?(G||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(n.flags|=4194308)):(typeof d.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=u,n.memoizedState=B),d.props=u,d.state=B,d.context=x,u=C):(typeof d.componentDidMount=="function"&&(n.flags|=4194308),u=!1)}else{d=n.stateNode,vo(e,n),x=n.memoizedProps,G=oa(a,x),d.props=G,$=n.pendingProps,U=d.context,B=a.contextType,C=Ba,typeof B=="object"&&B!==null&&(C=zt(B)),w=a.getDerivedStateFromProps,(B=typeof w=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(x!==$||U!==C)&&ym(n,d,u,C),_l=!1,U=n.memoizedState,d.state=U,Ii(n,u,d,c),Vi();var V=n.memoizedState;x!==$||U!==V||_l||e!==null&&e.dependencies!==null&&Pr(e.dependencies)?(typeof w=="function"&&(Yo(n,a,w,u),V=n.memoizedState),(G=_l||gm(n,a,G,u,U,V,C)||e!==null&&e.dependencies!==null&&Pr(e.dependencies))?(B||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(u,V,C),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(u,V,C)),typeof d.componentDidUpdate=="function"&&(n.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof d.componentDidUpdate!="function"||x===e.memoizedProps&&U===e.memoizedState||(n.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&U===e.memoizedState||(n.flags|=1024),n.memoizedProps=u,n.memoizedState=V),d.props=u,d.state=V,d.context=C,u=G):(typeof d.componentDidUpdate!="function"||x===e.memoizedProps&&U===e.memoizedState||(n.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&U===e.memoizedState||(n.flags|=1024),u=!1)}return d=u,yu(e,n),u=(n.flags&128)!==0,d||u?(d=n.stateNode,a=u&&typeof a.getDerivedStateFromError!="function"?null:d.render(),n.flags|=1,e!==null&&u?(n.child=ua(n,e.child,null,c),n.child=ua(n,null,a,c)):Ot(e,n,a,c),n.memoizedState=d.state,e=n.child):e=Kn(e,n,c),e}function zm(e,n,a,u){return ta(),n.flags|=256,Ot(e,n,a,u),n.child}var Xo={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Jo(e){return{baseLanes:e,cachePool:kh()}}function Ko(e,n,a){return e=e!==null?e.childLanes&~a:0,n&&(e|=sn),e}function Om(e,n,a){var u=n.pendingProps,c=!1,d=(n.flags&128)!==0,x;if((x=d)||(x=e!==null&&e.memoizedState===null?!1:(ht.current&2)!==0),x&&(c=!0,n.flags&=-129),x=(n.flags&32)!==0,n.flags&=-33,e===null){if(He){if(c?Al(n):jl(),(e=rt)?(e=Vp(e,xn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:vl!==null?{id:Tn,overflow:Dn}:null,retryLane:536870912,hydrationErrors:null},a=dh(e),a.return=n,n.child=a,Dt=n,rt=null)):e=null,e===null)throw wl(n);return zc(e)?n.lanes=32:n.lanes=536870912,null}var w=u.children;return u=u.fallback,c?(jl(),c=n.mode,w=xu({mode:"hidden",children:w},c),u=ea(u,c,a,null),w.return=n,u.return=n,w.sibling=u,n.child=w,u=n.child,u.memoizedState=Jo(a),u.childLanes=Ko(e,x,a),n.memoizedState=Xo,Gi(null,u)):(Al(n),$o(n,w))}var C=e.memoizedState;if(C!==null&&(w=C.dehydrated,w!==null)){if(d)n.flags&256?(Al(n),n.flags&=-257,n=Po(e,n,a)):n.memoizedState!==null?(jl(),n.child=e.child,n.flags|=128,n=null):(jl(),w=u.fallback,c=n.mode,u=xu({mode:"visible",children:u.children},c),w=ea(w,c,a,null),w.flags|=2,u.return=n,w.return=n,u.sibling=w,n.child=u,ua(n,e.child,null,a),u=n.child,u.memoizedState=Jo(a),u.childLanes=Ko(e,x,a),n.memoizedState=Xo,n=Gi(null,u));else if(Al(n),zc(w)){if(x=w.nextSibling&&w.nextSibling.dataset,x)var B=x.dgst;x=B,u=Error(r(419)),u.stack="",u.digest=x,Ri({value:u,source:null,stack:null}),n=Po(e,n,a)}else if(xt||Va(e,n,a,!1),x=(a&e.childLanes)!==0,xt||x){if(x=nt,x!==null&&(u=bd(x,a),u!==0&&u!==C.retryLane))throw C.retryLane=u,Wl(e,u),$t(x,e,u),Qo;Dc(w)||Au(),n=Po(e,n,a)}else Dc(w)?(n.flags|=192,n.child=e.child,n=null):(e=C.treeContext,rt=vn(w.nextSibling),Dt=n,He=!0,kl=null,xn=!1,e!==null&&ph(n,e),n=$o(n,u.children),n.flags|=4096);return n}return c?(jl(),w=u.fallback,c=n.mode,C=e.child,B=C.sibling,u=Zn(C,{mode:"hidden",children:u.children}),u.subtreeFlags=C.subtreeFlags&65011712,B!==null?w=Zn(B,w):(w=ea(w,c,a,null),w.flags|=2),w.return=n,u.return=n,u.sibling=w,n.child=u,Gi(null,u),u=n.child,w=e.child.memoizedState,w===null?w=Jo(a):(c=w.cachePool,c!==null?(C=gt._currentValue,c=c.parent!==C?{parent:C,pool:C}:c):c=kh(),w={baseLanes:w.baseLanes|a,cachePool:c}),u.memoizedState=w,u.childLanes=Ko(e,x,a),n.memoizedState=Xo,Gi(e.child,u)):(Al(n),a=e.child,e=a.sibling,a=Zn(a,{mode:"visible",children:u.children}),a.return=n,a.sibling=null,e!==null&&(x=n.deletions,x===null?(n.deletions=[e],n.flags|=16):x.push(e)),n.child=a,n.memoizedState=null,a)}function $o(e,n){return n=xu({mode:"visible",children:n},e.mode),n.return=e,e.child=n}function xu(e,n){return e=ln(22,e,null,n),e.lanes=0,e}function Po(e,n,a){return ua(n,e.child,null,a),e=$o(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function Mm(e,n,a){e.lanes|=n;var u=e.alternate;u!==null&&(u.lanes|=n),ho(e.return,n,a)}function Wo(e,n,a,u,c,d){var x=e.memoizedState;x===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:u,tail:a,tailMode:c,treeForkCount:d}:(x.isBackwards=n,x.rendering=null,x.renderingStartTime=0,x.last=u,x.tail=a,x.tailMode=c,x.treeForkCount=d)}function Rm(e,n,a){var u=n.pendingProps,c=u.revealOrder,d=u.tail;u=u.children;var x=ht.current,w=(x&2)!==0;if(w?(x=x&1|2,n.flags|=128):x&=1,S(ht,x),Ot(e,n,u,a),u=He?Mi:0,!w&&e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Mm(e,a,n);else if(e.tag===19)Mm(e,a,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(c){case"forwards":for(a=n.child,c=null;a!==null;)e=a.alternate,e!==null&&ru(e)===null&&(c=a),a=a.sibling;a=c,a===null?(c=n.child,n.child=null):(c=a.sibling,a.sibling=null),Wo(n,!1,c,a,d,u);break;case"backwards":case"unstable_legacy-backwards":for(a=null,c=n.child,n.child=null;c!==null;){if(e=c.alternate,e!==null&&ru(e)===null){n.child=c;break}e=c.sibling,c.sibling=a,a=c,c=e}Wo(n,!0,a,null,d,u);break;case"together":Wo(n,!1,null,null,void 0,u);break;default:n.memoizedState=null}return n.child}function Kn(e,n,a){if(e!==null&&(n.dependencies=e.dependencies),Dl|=n.lanes,(a&n.childLanes)===0)if(e!==null){if(Va(e,n,a,!1),(a&n.childLanes)===0)return null}else return null;if(e!==null&&n.child!==e.child)throw Error(r(153));if(n.child!==null){for(e=n.child,a=Zn(e,e.pendingProps),n.child=a,a.return=n;e.sibling!==null;)e=e.sibling,a=a.sibling=Zn(e,e.pendingProps),a.return=n;a.sibling=null}return n.child}function ec(e,n){return(e.lanes&n)!==0?!0:(e=e.dependencies,!!(e!==null&&Pr(e)))}function C1(e,n,a){switch(n.tag){case 3:Qe(n,n.stateNode.containerInfo),Sl(n,gt,e.memoizedState.cache),ta();break;case 27:case 5:wt(n);break;case 4:Qe(n,n.stateNode.containerInfo);break;case 10:Sl(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,Eo(n),null;break;case 13:var u=n.memoizedState;if(u!==null)return u.dehydrated!==null?(Al(n),n.flags|=128,null):(a&n.child.childLanes)!==0?Om(e,n,a):(Al(n),e=Kn(e,n,a),e!==null?e.sibling:null);Al(n);break;case 19:var c=(e.flags&128)!==0;if(u=(a&n.childLanes)!==0,u||(Va(e,n,a,!1),u=(a&n.childLanes)!==0),c){if(u)return Rm(e,n,a);n.flags|=128}if(c=n.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),S(ht,ht.current),u)break;return null;case 22:return n.lanes=0,Am(e,n,a,n.pendingProps);case 24:Sl(n,gt,e.memoizedState.cache)}return Kn(e,n,a)}function Lm(e,n,a){if(e!==null)if(e.memoizedProps!==n.pendingProps)xt=!0;else{if(!ec(e,a)&&(n.flags&128)===0)return xt=!1,C1(e,n,a);xt=(e.flags&131072)!==0}else xt=!1,He&&(n.flags&1048576)!==0&&mh(n,Mi,n.index);switch(n.lanes=0,n.tag){case 16:e:{var u=n.pendingProps;if(e=ia(n.elementType),n.type=e,typeof e=="function")ao(e)?(u=oa(e,u),n.tag=1,n=Dm(null,n,e,u,a)):(n.tag=0,n=Go(null,n,e,u,a));else{if(e!=null){var c=e.$$typeof;if(c===te){n.tag=11,n=_m(null,n,e,u,a);break e}else if(c===P){n.tag=14,n=Em(null,n,e,u,a);break e}}throw n=ue(e)||e,Error(r(306,n,""))}}return n;case 0:return Go(e,n,n.type,n.pendingProps,a);case 1:return u=n.type,c=oa(u,n.pendingProps),Dm(e,n,u,c,a);case 3:e:{if(Qe(n,n.stateNode.containerInfo),e===null)throw Error(r(387));u=n.pendingProps;var d=n.memoizedState;c=d.element,vo(e,n),Ii(n,u,null,a);var x=n.memoizedState;if(u=x.cache,Sl(n,gt,u),u!==d.cache&&mo(n,[gt],a,!0),Vi(),u=x.element,d.isDehydrated)if(d={element:u,isDehydrated:!1,cache:x.cache},n.updateQueue.baseState=d,n.memoizedState=d,n.flags&256){n=zm(e,n,u,a);break e}else if(u!==c){c=pn(Error(r(424)),n),Ri(c),n=zm(e,n,u,a);break e}else{switch(e=n.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(rt=vn(e.firstChild),Dt=n,He=!0,kl=null,xn=!0,a=Ah(n,null,u,a),n.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(ta(),u===c){n=Kn(e,n,a);break e}Ot(e,n,u,a)}n=n.child}return n;case 26:return yu(e,n),e===null?(a=Gp(n.type,null,n.pendingProps,null))?n.memoizedState=a:He||(a=n.type,e=n.pendingProps,u=Mu(ne.current).createElement(a),u[Tt]=n,u[Ft]=e,Mt(u,a,e),Ct(u),n.stateNode=u):n.memoizedState=Gp(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return wt(n),e===null&&He&&(u=n.stateNode=Zp(n.type,n.pendingProps,ne.current),Dt=n,xn=!0,c=rt,Ll(n.type)?(Oc=c,rt=vn(u.firstChild)):rt=c),Ot(e,n,n.pendingProps.children,a),yu(e,n),e===null&&(n.flags|=4194304),n.child;case 5:return e===null&&He&&((c=u=rt)&&(u=nb(u,n.type,n.pendingProps,xn),u!==null?(n.stateNode=u,Dt=n,rt=vn(u.firstChild),xn=!1,c=!0):c=!1),c||wl(n)),wt(n),c=n.type,d=n.pendingProps,x=e!==null?e.memoizedProps:null,u=d.children,jc(c,d)?u=null:x!==null&&jc(c,x)&&(n.flags|=32),n.memoizedState!==null&&(c=Ao(e,n,y1,null,null,a),sr._currentValue=c),yu(e,n),Ot(e,n,u,a),n.child;case 6:return e===null&&He&&((e=a=rt)&&(a=lb(a,n.pendingProps,xn),a!==null?(n.stateNode=a,Dt=n,rt=null,e=!0):e=!1),e||wl(n)),null;case 13:return Om(e,n,a);case 4:return Qe(n,n.stateNode.containerInfo),u=n.pendingProps,e===null?n.child=ua(n,null,u,a):Ot(e,n,u,a),n.child;case 11:return _m(e,n,n.type,n.pendingProps,a);case 7:return Ot(e,n,n.pendingProps,a),n.child;case 8:return Ot(e,n,n.pendingProps.children,a),n.child;case 12:return Ot(e,n,n.pendingProps.children,a),n.child;case 10:return u=n.pendingProps,Sl(n,n.type,u.value),Ot(e,n,u.children,a),n.child;case 9:return c=n.type._context,u=n.pendingProps.children,la(n),c=zt(c),u=u(c),n.flags|=1,Ot(e,n,u,a),n.child;case 14:return Em(e,n,n.type,n.pendingProps,a);case 15:return Cm(e,n,n.type,n.pendingProps,a);case 19:return Rm(e,n,a);case 31:return E1(e,n,a);case 22:return Am(e,n,a,n.pendingProps);case 24:return la(n),u=zt(gt),e===null?(c=yo(),c===null&&(c=nt,d=po(),c.pooledCache=d,d.refCount++,d!==null&&(c.pooledCacheLanes|=a),c=d),n.memoizedState={parent:u,cache:c},bo(n),Sl(n,gt,c)):((e.lanes&a)!==0&&(vo(e,n),Ii(n,null,null,a),Vi()),c=e.memoizedState,d=n.memoizedState,c.parent!==u?(c={parent:u,cache:u},n.memoizedState=c,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=c),Sl(n,gt,u)):(u=d.cache,Sl(n,gt,u),u!==c.cache&&mo(n,[gt],a,!0))),Ot(e,n,n.pendingProps.children,a),n.child;case 29:throw n.pendingProps}throw Error(r(156,n.tag))}function $n(e){e.flags|=4}function tc(e,n,a,u,c){if((n=(e.mode&32)!==0)&&(n=!1),n){if(e.flags|=16777216,(c&335544128)===c)if(e.stateNode.complete)e.flags|=8192;else if(op())e.flags|=8192;else throw ra=nu,xo}else e.flags&=-16777217}function Bm(e,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Pp(n))if(op())e.flags|=8192;else throw ra=nu,xo}function bu(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?gd():536870912,e.lanes|=n,Wa|=n)}function Xi(e,n){if(!He)switch(e.tailMode){case"hidden":n=e.tail;for(var a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var u=null;a!==null;)a.alternate!==null&&(u=a),a=a.sibling;u===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:u.sibling=null}}function ut(e){var n=e.alternate!==null&&e.alternate.child===e.child,a=0,u=0;if(n)for(var c=e.child;c!==null;)a|=c.lanes|c.childLanes,u|=c.subtreeFlags&65011712,u|=c.flags&65011712,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)a|=c.lanes|c.childLanes,u|=c.subtreeFlags,u|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=u,e.childLanes=a,n}function A1(e,n,a){var u=n.pendingProps;switch(so(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ut(n),null;case 1:return ut(n),null;case 3:return a=n.stateNode,u=null,e!==null&&(u=e.memoizedState.cache),n.memoizedState.cache!==u&&(n.flags|=2048),Gn(gt),Ve(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(qa(n)?$n(n):e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,co())),ut(n),null;case 26:var c=n.type,d=n.memoizedState;return e===null?($n(n),d!==null?(ut(n),Bm(n,d)):(ut(n),tc(n,c,null,u,a))):d?d!==e.memoizedState?($n(n),ut(n),Bm(n,d)):(ut(n),n.flags&=-16777217):(e=e.memoizedProps,e!==u&&$n(n),ut(n),tc(n,c,e,u,a)),null;case 27:if(en(n),a=ne.current,c=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==u&&$n(n);else{if(!u){if(n.stateNode===null)throw Error(r(166));return ut(n),null}e=re.current,qa(n)?gh(n):(e=Zp(c,u,a),n.stateNode=e,$n(n))}return ut(n),null;case 5:if(en(n),c=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==u&&$n(n);else{if(!u){if(n.stateNode===null)throw Error(r(166));return ut(n),null}if(d=re.current,qa(n))gh(n);else{var x=Mu(ne.current);switch(d){case 1:d=x.createElementNS("http://www.w3.org/2000/svg",c);break;case 2:d=x.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;default:switch(c){case"svg":d=x.createElementNS("http://www.w3.org/2000/svg",c);break;case"math":d=x.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;case"script":d=x.createElement("div"),d.innerHTML="<script><\/script>",d=d.removeChild(d.firstChild);break;case"select":d=typeof u.is=="string"?x.createElement("select",{is:u.is}):x.createElement("select"),u.multiple?d.multiple=!0:u.size&&(d.size=u.size);break;default:d=typeof u.is=="string"?x.createElement(c,{is:u.is}):x.createElement(c)}}d[Tt]=n,d[Ft]=u;e:for(x=n.child;x!==null;){if(x.tag===5||x.tag===6)d.appendChild(x.stateNode);else if(x.tag!==4&&x.tag!==27&&x.child!==null){x.child.return=x,x=x.child;continue}if(x===n)break e;for(;x.sibling===null;){if(x.return===null||x.return===n)break e;x=x.return}x.sibling.return=x.return,x=x.sibling}n.stateNode=d;e:switch(Mt(d,c,u),c){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&$n(n)}}return ut(n),tc(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,a),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==u&&$n(n);else{if(typeof u!="string"&&n.stateNode===null)throw Error(r(166));if(e=ne.current,qa(n)){if(e=n.stateNode,a=n.memoizedProps,u=null,c=Dt,c!==null)switch(c.tag){case 27:case 5:u=c.memoizedProps}e[Tt]=n,e=!!(e.nodeValue===a||u!==null&&u.suppressHydrationWarning===!0||Op(e.nodeValue,a)),e||wl(n,!0)}else e=Mu(e).createTextNode(u),e[Tt]=n,n.stateNode=e}return ut(n),null;case 31:if(a=n.memoizedState,e===null||e.memoizedState!==null){if(u=qa(n),a!==null){if(e===null){if(!u)throw Error(r(318));if(e=n.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[Tt]=n}else ta(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;ut(n),e=!1}else a=co(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return n.flags&256?(rn(n),n):(rn(n),null);if((n.flags&128)!==0)throw Error(r(558))}return ut(n),null;case 13:if(u=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=qa(n),u!==null&&u.dehydrated!==null){if(e===null){if(!c)throw Error(r(318));if(c=n.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(r(317));c[Tt]=n}else ta(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;ut(n),c=!1}else c=co(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return n.flags&256?(rn(n),n):(rn(n),null)}return rn(n),(n.flags&128)!==0?(n.lanes=a,n):(a=u!==null,e=e!==null&&e.memoizedState!==null,a&&(u=n.child,c=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(c=u.alternate.memoizedState.cachePool.pool),d=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(d=u.memoizedState.cachePool.pool),d!==c&&(u.flags|=2048)),a!==e&&a&&(n.child.flags|=8192),bu(n,n.updateQueue),ut(n),null);case 4:return Ve(),e===null&&Sc(n.stateNode.containerInfo),ut(n),null;case 10:return Gn(n.type),ut(n),null;case 19:if(F(ht),u=n.memoizedState,u===null)return ut(n),null;if(c=(n.flags&128)!==0,d=u.rendering,d===null)if(c)Xi(u,!1);else{if(dt!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(d=ru(e),d!==null){for(n.flags|=128,Xi(u,!1),e=d.updateQueue,n.updateQueue=e,bu(n,e),n.subtreeFlags=0,e=a,a=n.child;a!==null;)fh(a,e),a=a.sibling;return S(ht,ht.current&1|2),He&&Fn(n,u.treeForkCount),n.child}e=e.sibling}u.tail!==null&&pt()>_u&&(n.flags|=128,c=!0,Xi(u,!1),n.lanes=4194304)}else{if(!c)if(e=ru(d),e!==null){if(n.flags|=128,c=!0,e=e.updateQueue,n.updateQueue=e,bu(n,e),Xi(u,!0),u.tail===null&&u.tailMode==="hidden"&&!d.alternate&&!He)return ut(n),null}else 2*pt()-u.renderingStartTime>_u&&a!==536870912&&(n.flags|=128,c=!0,Xi(u,!1),n.lanes=4194304);u.isBackwards?(d.sibling=n.child,n.child=d):(e=u.last,e!==null?e.sibling=d:n.child=d,u.last=d)}return u.tail!==null?(e=u.tail,u.rendering=e,u.tail=e.sibling,u.renderingStartTime=pt(),e.sibling=null,a=ht.current,S(ht,c?a&1|2:a&1),He&&Fn(n,u.treeForkCount),e):(ut(n),null);case 22:case 23:return rn(n),_o(),u=n.memoizedState!==null,e!==null?e.memoizedState!==null!==u&&(n.flags|=8192):u&&(n.flags|=8192),u?(a&536870912)!==0&&(n.flags&128)===0&&(ut(n),n.subtreeFlags&6&&(n.flags|=8192)):ut(n),a=n.updateQueue,a!==null&&bu(n,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),u=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(u=n.memoizedState.cachePool.pool),u!==a&&(n.flags|=2048),e!==null&&F(aa),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),n.memoizedState.cache!==a&&(n.flags|=2048),Gn(gt),ut(n),null;case 25:return null;case 30:return null}throw Error(r(156,n.tag))}function j1(e,n){switch(so(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return Gn(gt),Ve(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return en(n),null;case 31:if(n.memoizedState!==null){if(rn(n),n.alternate===null)throw Error(r(340));ta()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 13:if(rn(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(r(340));ta()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return F(ht),null;case 4:return Ve(),null;case 10:return Gn(n.type),null;case 22:case 23:return rn(n),_o(),e!==null&&F(aa),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return Gn(gt),null;case 25:return null;default:return null}}function Um(e,n){switch(so(n),n.tag){case 3:Gn(gt),Ve();break;case 26:case 27:case 5:en(n);break;case 4:Ve();break;case 31:n.memoizedState!==null&&rn(n);break;case 13:rn(n);break;case 19:F(ht);break;case 10:Gn(n.type);break;case 22:case 23:rn(n),_o(),e!==null&&F(aa);break;case 24:Gn(gt)}}function Ji(e,n){try{var a=n.updateQueue,u=a!==null?a.lastEffect:null;if(u!==null){var c=u.next;a=c;do{if((a.tag&e)===e){u=void 0;var d=a.create,x=a.inst;u=d(),x.destroy=u}a=a.next}while(a!==c)}}catch(w){Ke(n,n.return,w)}}function Nl(e,n,a){try{var u=n.updateQueue,c=u!==null?u.lastEffect:null;if(c!==null){var d=c.next;u=d;do{if((u.tag&e)===e){var x=u.inst,w=x.destroy;if(w!==void 0){x.destroy=void 0,c=n;var C=a,B=w;try{B()}catch(G){Ke(c,C,G)}}}u=u.next}while(u!==d)}}catch(G){Ke(n,n.return,G)}}function Hm(e){var n=e.updateQueue;if(n!==null){var a=e.stateNode;try{Nh(n,a)}catch(u){Ke(e,e.return,u)}}}function qm(e,n,a){a.props=oa(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(u){Ke(e,n,u)}}function Ki(e,n){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var u=e.stateNode;break;case 30:u=e.stateNode;break;default:u=e.stateNode}typeof a=="function"?e.refCleanup=a(u):a.current=u}}catch(c){Ke(e,n,c)}}function zn(e,n){var a=e.ref,u=e.refCleanup;if(a!==null)if(typeof u=="function")try{u()}catch(c){Ke(e,n,c)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(c){Ke(e,n,c)}else a.current=null}function Vm(e){var n=e.type,a=e.memoizedProps,u=e.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":a.autoFocus&&u.focus();break e;case"img":a.src?u.src=a.src:a.srcSet&&(u.srcset=a.srcSet)}}catch(c){Ke(e,e.return,c)}}function nc(e,n,a){try{var u=e.stateNode;K1(u,e.type,a,n),u[Ft]=n}catch(c){Ke(e,e.return,c)}}function Im(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ll(e.type)||e.tag===4}function lc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Im(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Ll(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function ac(e,n,a){var u=e.tag;if(u===5||u===6)e=e.stateNode,n?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,n):(n=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,n.appendChild(e),a=a._reactRootContainer,a!=null||n.onclick!==null||(n.onclick=In));else if(u!==4&&(u===27&&Ll(e.type)&&(a=e.stateNode,n=null),e=e.child,e!==null))for(ac(e,n,a),e=e.sibling;e!==null;)ac(e,n,a),e=e.sibling}function vu(e,n,a){var u=e.tag;if(u===5||u===6)e=e.stateNode,n?a.insertBefore(e,n):a.appendChild(e);else if(u!==4&&(u===27&&Ll(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(vu(e,n,a),e=e.sibling;e!==null;)vu(e,n,a),e=e.sibling}function Ym(e){var n=e.stateNode,a=e.memoizedProps;try{for(var u=e.type,c=n.attributes;c.length;)n.removeAttributeNode(c[0]);Mt(n,u,a),n[Tt]=e,n[Ft]=a}catch(d){Ke(e,e.return,d)}}var Pn=!1,bt=!1,ic=!1,Zm=typeof WeakSet=="function"?WeakSet:Set,At=null;function N1(e,n){if(e=e.containerInfo,Cc=Vu,e=nh(e),$s(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var u=a.getSelection&&a.getSelection();if(u&&u.rangeCount!==0){a=u.anchorNode;var c=u.anchorOffset,d=u.focusNode;u=u.focusOffset;try{a.nodeType,d.nodeType}catch{a=null;break e}var x=0,w=-1,C=-1,B=0,G=0,$=e,U=null;t:for(;;){for(var V;$!==a||c!==0&&$.nodeType!==3||(w=x+c),$!==d||u!==0&&$.nodeType!==3||(C=x+u),$.nodeType===3&&(x+=$.nodeValue.length),(V=$.firstChild)!==null;)U=$,$=V;for(;;){if($===e)break t;if(U===a&&++B===c&&(w=x),U===d&&++G===u&&(C=x),(V=$.nextSibling)!==null)break;$=U,U=$.parentNode}$=V}a=w===-1||C===-1?null:{start:w,end:C}}else a=null}a=a||{start:0,end:0}}else a=null;for(Ac={focusedElem:e,selectionRange:a},Vu=!1,At=n;At!==null;)if(n=At,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,At=e;else for(;At!==null;){switch(n=At,d=n.alternate,e=n.flags,n.tag){case 0:if((e&4)!==0&&(e=n.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)c=e[a],c.ref.impl=c.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&d!==null){e=void 0,a=n,c=d.memoizedProps,d=d.memoizedState,u=a.stateNode;try{var me=oa(a.type,c);e=u.getSnapshotBeforeUpdate(me,d),u.__reactInternalSnapshotBeforeUpdate=e}catch(Se){Ke(a,a.return,Se)}}break;case 3:if((e&1024)!==0){if(e=n.stateNode.containerInfo,a=e.nodeType,a===9)Tc(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Tc(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(r(163))}if(e=n.sibling,e!==null){e.return=n.return,At=e;break}At=n.return}}function Fm(e,n,a){var u=a.flags;switch(a.tag){case 0:case 11:case 15:el(e,a),u&4&&Ji(5,a);break;case 1:if(el(e,a),u&4)if(e=a.stateNode,n===null)try{e.componentDidMount()}catch(x){Ke(a,a.return,x)}else{var c=oa(a.type,n.memoizedProps);n=n.memoizedState;try{e.componentDidUpdate(c,n,e.__reactInternalSnapshotBeforeUpdate)}catch(x){Ke(a,a.return,x)}}u&64&&Hm(a),u&512&&Ki(a,a.return);break;case 3:if(el(e,a),u&64&&(e=a.updateQueue,e!==null)){if(n=null,a.child!==null)switch(a.child.tag){case 27:case 5:n=a.child.stateNode;break;case 1:n=a.child.stateNode}try{Nh(e,n)}catch(x){Ke(a,a.return,x)}}break;case 27:n===null&&u&4&&Ym(a);case 26:case 5:el(e,a),n===null&&u&4&&Vm(a),u&512&&Ki(a,a.return);break;case 12:el(e,a);break;case 31:el(e,a),u&4&&Xm(e,a);break;case 13:el(e,a),u&4&&Jm(e,a),u&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=U1.bind(null,a),ab(e,a))));break;case 22:if(u=a.memoizedState!==null||Pn,!u){n=n!==null&&n.memoizedState!==null||bt,c=Pn;var d=bt;Pn=u,(bt=n)&&!d?tl(e,a,(a.subtreeFlags&8772)!==0):el(e,a),Pn=c,bt=d}break;case 30:break;default:el(e,a)}}function Qm(e){var n=e.alternate;n!==null&&(e.alternate=null,Qm(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&Ms(n)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var ct=null,Gt=!1;function Wn(e,n,a){for(a=a.child;a!==null;)Gm(e,n,a),a=a.sibling}function Gm(e,n,a){if(_t&&typeof _t.onCommitFiberUnmount=="function")try{_t.onCommitFiberUnmount(Ut,a)}catch{}switch(a.tag){case 26:bt||zn(a,n),Wn(e,n,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:bt||zn(a,n);var u=ct,c=Gt;Ll(a.type)&&(ct=a.stateNode,Gt=!1),Wn(e,n,a),ir(a.stateNode),ct=u,Gt=c;break;case 5:bt||zn(a,n);case 6:if(u=ct,c=Gt,ct=null,Wn(e,n,a),ct=u,Gt=c,ct!==null)if(Gt)try{(ct.nodeType===9?ct.body:ct.nodeName==="HTML"?ct.ownerDocument.body:ct).removeChild(a.stateNode)}catch(d){Ke(a,n,d)}else try{ct.removeChild(a.stateNode)}catch(d){Ke(a,n,d)}break;case 18:ct!==null&&(Gt?(e=ct,Hp(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),ui(e)):Hp(ct,a.stateNode));break;case 4:u=ct,c=Gt,ct=a.stateNode.containerInfo,Gt=!0,Wn(e,n,a),ct=u,Gt=c;break;case 0:case 11:case 14:case 15:Nl(2,a,n),bt||Nl(4,a,n),Wn(e,n,a);break;case 1:bt||(zn(a,n),u=a.stateNode,typeof u.componentWillUnmount=="function"&&qm(a,n,u)),Wn(e,n,a);break;case 21:Wn(e,n,a);break;case 22:bt=(u=bt)||a.memoizedState!==null,Wn(e,n,a),bt=u;break;default:Wn(e,n,a)}}function Xm(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ui(e)}catch(a){Ke(n,n.return,a)}}}function Jm(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ui(e)}catch(a){Ke(n,n.return,a)}}function T1(e){switch(e.tag){case 31:case 13:case 19:var n=e.stateNode;return n===null&&(n=e.stateNode=new Zm),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new Zm),n;default:throw Error(r(435,e.tag))}}function ku(e,n){var a=T1(e);n.forEach(function(u){if(!a.has(u)){a.add(u);var c=H1.bind(null,e,u);u.then(c,c)}})}function Xt(e,n){var a=n.deletions;if(a!==null)for(var u=0;u<a.length;u++){var c=a[u],d=e,x=n,w=x;e:for(;w!==null;){switch(w.tag){case 27:if(Ll(w.type)){ct=w.stateNode,Gt=!1;break e}break;case 5:ct=w.stateNode,Gt=!1;break e;case 3:case 4:ct=w.stateNode.containerInfo,Gt=!0;break e}w=w.return}if(ct===null)throw Error(r(160));Gm(d,x,c),ct=null,Gt=!1,d=c.alternate,d!==null&&(d.return=null),c.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)Km(n,e),n=n.sibling}var Cn=null;function Km(e,n){var a=e.alternate,u=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Xt(n,e),Jt(e),u&4&&(Nl(3,e,e.return),Ji(3,e),Nl(5,e,e.return));break;case 1:Xt(n,e),Jt(e),u&512&&(bt||a===null||zn(a,a.return)),u&64&&Pn&&(e=e.updateQueue,e!==null&&(u=e.callbacks,u!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?u:a.concat(u))));break;case 26:var c=Cn;if(Xt(n,e),Jt(e),u&512&&(bt||a===null||zn(a,a.return)),u&4){var d=a!==null?a.memoizedState:null;if(u=e.memoizedState,a===null)if(u===null)if(e.stateNode===null){e:{u=e.type,a=e.memoizedProps,c=c.ownerDocument||c;t:switch(u){case"title":d=c.getElementsByTagName("title")[0],(!d||d[Si]||d[Tt]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=c.createElement(u),c.head.insertBefore(d,c.querySelector("head > title"))),Mt(d,u,a),d[Tt]=e,Ct(d),u=d;break e;case"link":var x=Kp("link","href",c).get(u+(a.href||""));if(x){for(var w=0;w<x.length;w++)if(d=x[w],d.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&d.getAttribute("rel")===(a.rel==null?null:a.rel)&&d.getAttribute("title")===(a.title==null?null:a.title)&&d.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){x.splice(w,1);break t}}d=c.createElement(u),Mt(d,u,a),c.head.appendChild(d);break;case"meta":if(x=Kp("meta","content",c).get(u+(a.content||""))){for(w=0;w<x.length;w++)if(d=x[w],d.getAttribute("content")===(a.content==null?null:""+a.content)&&d.getAttribute("name")===(a.name==null?null:a.name)&&d.getAttribute("property")===(a.property==null?null:a.property)&&d.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&d.getAttribute("charset")===(a.charSet==null?null:a.charSet)){x.splice(w,1);break t}}d=c.createElement(u),Mt(d,u,a),c.head.appendChild(d);break;default:throw Error(r(468,u))}d[Tt]=e,Ct(d),u=d}e.stateNode=u}else $p(c,e.type,e.stateNode);else e.stateNode=Jp(c,u,e.memoizedProps);else d!==u?(d===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):d.count--,u===null?$p(c,e.type,e.stateNode):Jp(c,u,e.memoizedProps)):u===null&&e.stateNode!==null&&nc(e,e.memoizedProps,a.memoizedProps)}break;case 27:Xt(n,e),Jt(e),u&512&&(bt||a===null||zn(a,a.return)),a!==null&&u&4&&nc(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Xt(n,e),Jt(e),u&512&&(bt||a===null||zn(a,a.return)),e.flags&32){c=e.stateNode;try{Ta(c,"")}catch(me){Ke(e,e.return,me)}}u&4&&e.stateNode!=null&&(c=e.memoizedProps,nc(e,c,a!==null?a.memoizedProps:c)),u&1024&&(ic=!0);break;case 6:if(Xt(n,e),Jt(e),u&4){if(e.stateNode===null)throw Error(r(162));u=e.memoizedProps,a=e.stateNode;try{a.nodeValue=u}catch(me){Ke(e,e.return,me)}}break;case 3:if(Bu=null,c=Cn,Cn=Ru(n.containerInfo),Xt(n,e),Cn=c,Jt(e),u&4&&a!==null&&a.memoizedState.isDehydrated)try{ui(n.containerInfo)}catch(me){Ke(e,e.return,me)}ic&&(ic=!1,$m(e));break;case 4:u=Cn,Cn=Ru(e.stateNode.containerInfo),Xt(n,e),Jt(e),Cn=u;break;case 12:Xt(n,e),Jt(e);break;case 31:Xt(n,e),Jt(e),u&4&&(u=e.updateQueue,u!==null&&(e.updateQueue=null,ku(e,u)));break;case 13:Xt(n,e),Jt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Su=pt()),u&4&&(u=e.updateQueue,u!==null&&(e.updateQueue=null,ku(e,u)));break;case 22:c=e.memoizedState!==null;var C=a!==null&&a.memoizedState!==null,B=Pn,G=bt;if(Pn=B||c,bt=G||C,Xt(n,e),bt=G,Pn=B,Jt(e),u&8192)e:for(n=e.stateNode,n._visibility=c?n._visibility&-2:n._visibility|1,c&&(a===null||C||Pn||bt||ca(e)),a=null,n=e;;){if(n.tag===5||n.tag===26){if(a===null){C=a=n;try{if(d=C.stateNode,c)x=d.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none";else{w=C.stateNode;var $=C.memoizedProps.style,U=$!=null&&$.hasOwnProperty("display")?$.display:null;w.style.display=U==null||typeof U=="boolean"?"":(""+U).trim()}}catch(me){Ke(C,C.return,me)}}}else if(n.tag===6){if(a===null){C=n;try{C.stateNode.nodeValue=c?"":C.memoizedProps}catch(me){Ke(C,C.return,me)}}}else if(n.tag===18){if(a===null){C=n;try{var V=C.stateNode;c?qp(V,!0):qp(C.stateNode,!1)}catch(me){Ke(C,C.return,me)}}}else if((n.tag!==22&&n.tag!==23||n.memoizedState===null||n===e)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break e;for(;n.sibling===null;){if(n.return===null||n.return===e)break e;a===n&&(a=null),n=n.return}a===n&&(a=null),n.sibling.return=n.return,n=n.sibling}u&4&&(u=e.updateQueue,u!==null&&(a=u.retryQueue,a!==null&&(u.retryQueue=null,ku(e,a))));break;case 19:Xt(n,e),Jt(e),u&4&&(u=e.updateQueue,u!==null&&(e.updateQueue=null,ku(e,u)));break;case 30:break;case 21:break;default:Xt(n,e),Jt(e)}}function Jt(e){var n=e.flags;if(n&2){try{for(var a,u=e.return;u!==null;){if(Im(u)){a=u;break}u=u.return}if(a==null)throw Error(r(160));switch(a.tag){case 27:var c=a.stateNode,d=lc(e);vu(e,d,c);break;case 5:var x=a.stateNode;a.flags&32&&(Ta(x,""),a.flags&=-33);var w=lc(e);vu(e,w,x);break;case 3:case 4:var C=a.stateNode.containerInfo,B=lc(e);ac(e,B,C);break;default:throw Error(r(161))}}catch(G){Ke(e,e.return,G)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function $m(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;$m(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),e=e.sibling}}function el(e,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)Fm(e,n.alternate,n),n=n.sibling}function ca(e){for(e=e.child;e!==null;){var n=e;switch(n.tag){case 0:case 11:case 14:case 15:Nl(4,n,n.return),ca(n);break;case 1:zn(n,n.return);var a=n.stateNode;typeof a.componentWillUnmount=="function"&&qm(n,n.return,a),ca(n);break;case 27:ir(n.stateNode);case 26:case 5:zn(n,n.return),ca(n);break;case 22:n.memoizedState===null&&ca(n);break;case 30:ca(n);break;default:ca(n)}e=e.sibling}}function tl(e,n,a){for(a=a&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var u=n.alternate,c=e,d=n,x=d.flags;switch(d.tag){case 0:case 11:case 15:tl(c,d,a),Ji(4,d);break;case 1:if(tl(c,d,a),u=d,c=u.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(B){Ke(u,u.return,B)}if(u=d,c=u.updateQueue,c!==null){var w=u.stateNode;try{var C=c.shared.hiddenCallbacks;if(C!==null)for(c.shared.hiddenCallbacks=null,c=0;c<C.length;c++)jh(C[c],w)}catch(B){Ke(u,u.return,B)}}a&&x&64&&Hm(d),Ki(d,d.return);break;case 27:Ym(d);case 26:case 5:tl(c,d,a),a&&u===null&&x&4&&Vm(d),Ki(d,d.return);break;case 12:tl(c,d,a);break;case 31:tl(c,d,a),a&&x&4&&Xm(c,d);break;case 13:tl(c,d,a),a&&x&4&&Jm(c,d);break;case 22:d.memoizedState===null&&tl(c,d,a),Ki(d,d.return);break;case 30:break;default:tl(c,d,a)}n=n.sibling}}function rc(e,n){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(e=n.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&Li(a))}function uc(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&Li(e))}function An(e,n,a,u){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)Pm(e,n,a,u),n=n.sibling}function Pm(e,n,a,u){var c=n.flags;switch(n.tag){case 0:case 11:case 15:An(e,n,a,u),c&2048&&Ji(9,n);break;case 1:An(e,n,a,u);break;case 3:An(e,n,a,u),c&2048&&(e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&Li(e)));break;case 12:if(c&2048){An(e,n,a,u),e=n.stateNode;try{var d=n.memoizedProps,x=d.id,w=d.onPostCommit;typeof w=="function"&&w(x,n.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(C){Ke(n,n.return,C)}}else An(e,n,a,u);break;case 31:An(e,n,a,u);break;case 13:An(e,n,a,u);break;case 23:break;case 22:d=n.stateNode,x=n.alternate,n.memoizedState!==null?d._visibility&2?An(e,n,a,u):$i(e,n):d._visibility&2?An(e,n,a,u):(d._visibility|=2,Ka(e,n,a,u,(n.subtreeFlags&10256)!==0||!1)),c&2048&&rc(x,n);break;case 24:An(e,n,a,u),c&2048&&uc(n.alternate,n);break;default:An(e,n,a,u)}}function Ka(e,n,a,u,c){for(c=c&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var d=e,x=n,w=a,C=u,B=x.flags;switch(x.tag){case 0:case 11:case 15:Ka(d,x,w,C,c),Ji(8,x);break;case 23:break;case 22:var G=x.stateNode;x.memoizedState!==null?G._visibility&2?Ka(d,x,w,C,c):$i(d,x):(G._visibility|=2,Ka(d,x,w,C,c)),c&&B&2048&&rc(x.alternate,x);break;case 24:Ka(d,x,w,C,c),c&&B&2048&&uc(x.alternate,x);break;default:Ka(d,x,w,C,c)}n=n.sibling}}function $i(e,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var a=e,u=n,c=u.flags;switch(u.tag){case 22:$i(a,u),c&2048&&rc(u.alternate,u);break;case 24:$i(a,u),c&2048&&uc(u.alternate,u);break;default:$i(a,u)}n=n.sibling}}var Pi=8192;function $a(e,n,a){if(e.subtreeFlags&Pi)for(e=e.child;e!==null;)Wm(e,n,a),e=e.sibling}function Wm(e,n,a){switch(e.tag){case 26:$a(e,n,a),e.flags&Pi&&e.memoizedState!==null&&gb(a,Cn,e.memoizedState,e.memoizedProps);break;case 5:$a(e,n,a);break;case 3:case 4:var u=Cn;Cn=Ru(e.stateNode.containerInfo),$a(e,n,a),Cn=u;break;case 22:e.memoizedState===null&&(u=e.alternate,u!==null&&u.memoizedState!==null?(u=Pi,Pi=16777216,$a(e,n,a),Pi=u):$a(e,n,a));break;default:$a(e,n,a)}}function ep(e){var n=e.alternate;if(n!==null&&(e=n.child,e!==null)){n.child=null;do n=e.sibling,e.sibling=null,e=n;while(e!==null)}}function Wi(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var a=0;a<n.length;a++){var u=n[a];At=u,np(u,e)}ep(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)tp(e),e=e.sibling}function tp(e){switch(e.tag){case 0:case 11:case 15:Wi(e),e.flags&2048&&Nl(9,e,e.return);break;case 3:Wi(e);break;case 12:Wi(e);break;case 22:var n=e.stateNode;e.memoizedState!==null&&n._visibility&2&&(e.return===null||e.return.tag!==13)?(n._visibility&=-3,wu(e)):Wi(e);break;default:Wi(e)}}function wu(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var a=0;a<n.length;a++){var u=n[a];At=u,np(u,e)}ep(e)}for(e=e.child;e!==null;){switch(n=e,n.tag){case 0:case 11:case 15:Nl(8,n,n.return),wu(n);break;case 22:a=n.stateNode,a._visibility&2&&(a._visibility&=-3,wu(n));break;default:wu(n)}e=e.sibling}}function np(e,n){for(;At!==null;){var a=At;switch(a.tag){case 0:case 11:case 15:Nl(8,a,n);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var u=a.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:Li(a.memoizedState.cache)}if(u=a.child,u!==null)u.return=a,At=u;else e:for(a=e;At!==null;){u=At;var c=u.sibling,d=u.return;if(Qm(u),u===a){At=null;break e}if(c!==null){c.return=d,At=c;break e}At=d}}}var D1={getCacheForType:function(e){var n=zt(gt),a=n.data.get(e);return a===void 0&&(a=e(),n.data.set(e,a)),a},cacheSignal:function(){return zt(gt).controller.signal}},z1=typeof WeakMap=="function"?WeakMap:Map,Ge=0,nt=null,Oe=null,Le=0,Je=0,un=null,Tl=!1,Pa=!1,sc=!1,nl=0,dt=0,Dl=0,fa=0,oc=0,sn=0,Wa=0,er=null,Kt=null,cc=!1,Su=0,lp=0,_u=1/0,Eu=null,zl=null,Et=0,Ol=null,ei=null,ll=0,fc=0,dc=null,ap=null,tr=0,hc=null;function on(){return(Ge&2)!==0&&Le!==0?Le&-Le:T.T!==null?bc():vd()}function ip(){if(sn===0)if((Le&536870912)===0||He){var e=Or;Or<<=1,(Or&3932160)===0&&(Or=262144),sn=e}else sn=536870912;return e=an.current,e!==null&&(e.flags|=32),sn}function $t(e,n,a){(e===nt&&(Je===2||Je===9)||e.cancelPendingCommit!==null)&&(ti(e,0),Ml(e,Le,sn,!1)),wi(e,a),((Ge&2)===0||e!==nt)&&(e===nt&&((Ge&2)===0&&(fa|=a),dt===4&&Ml(e,Le,sn,!1)),On(e))}function rp(e,n,a){if((Ge&6)!==0)throw Error(r(327));var u=!a&&(n&127)===0&&(n&e.expiredLanes)===0||ki(e,n),c=u?R1(e,n):pc(e,n,!0),d=u;do{if(c===0){Pa&&!u&&Ml(e,n,0,!1);break}else{if(a=e.current.alternate,d&&!O1(a)){c=pc(e,n,!1),d=!1;continue}if(c===2){if(d=n,e.errorRecoveryDisabledLanes&d)var x=0;else x=e.pendingLanes&-536870913,x=x!==0?x:x&536870912?536870912:0;if(x!==0){n=x;e:{var w=e;c=er;var C=w.current.memoizedState.isDehydrated;if(C&&(ti(w,x).flags|=256),x=pc(w,x,!1),x!==2){if(sc&&!C){w.errorRecoveryDisabledLanes|=d,fa|=d,c=4;break e}d=Kt,Kt=c,d!==null&&(Kt===null?Kt=d:Kt.push.apply(Kt,d))}c=x}if(d=!1,c!==2)continue}}if(c===1){ti(e,0),Ml(e,n,0,!0);break}e:{switch(u=e,d=c,d){case 0:case 1:throw Error(r(345));case 4:if((n&4194048)!==n)break;case 6:Ml(u,n,sn,!Tl);break e;case 2:Kt=null;break;case 3:case 5:break;default:throw Error(r(329))}if((n&62914560)===n&&(c=Su+300-pt(),10<c)){if(Ml(u,n,sn,!Tl),Rr(u,0,!0)!==0)break e;ll=n,u.timeoutHandle=Bp(up.bind(null,u,a,Kt,Eu,cc,n,sn,fa,Wa,Tl,d,"Throttled",-0,0),c);break e}up(u,a,Kt,Eu,cc,n,sn,fa,Wa,Tl,d,null,-0,0)}}break}while(!0);On(e)}function up(e,n,a,u,c,d,x,w,C,B,G,$,U,V){if(e.timeoutHandle=-1,$=n.subtreeFlags,$&8192||($&16785408)===16785408){$={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:In},Wm(n,d,$);var me=(d&62914560)===d?Su-pt():(d&4194048)===d?lp-pt():0;if(me=yb($,me),me!==null){ll=d,e.cancelPendingCommit=me(pp.bind(null,e,n,d,a,u,c,x,w,C,G,$,null,U,V)),Ml(e,d,x,!B);return}}pp(e,n,d,a,u,c,x,w,C)}function O1(e){for(var n=e;;){var a=n.tag;if((a===0||a===11||a===15)&&n.flags&16384&&(a=n.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var u=0;u<a.length;u++){var c=a[u],d=c.getSnapshot;c=c.value;try{if(!nn(d(),c))return!1}catch{return!1}}if(a=n.child,n.subtreeFlags&16384&&a!==null)a.return=n,n=a;else{if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function Ml(e,n,a,u){n&=~oc,n&=~fa,e.suspendedLanes|=n,e.pingedLanes&=~n,u&&(e.warmLanes|=n),u=e.expirationTimes;for(var c=n;0<c;){var d=31-tt(c),x=1<<d;u[d]=-1,c&=~x}a!==0&&yd(e,a,n)}function Cu(){return(Ge&6)===0?(nr(0),!1):!0}function mc(){if(Oe!==null){if(Je===0)var e=Oe.return;else e=Oe,Qn=na=null,To(e),Fa=null,Ui=0,e=Oe;for(;e!==null;)Um(e.alternate,e),e=e.return;Oe=null}}function ti(e,n){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,W1(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),ll=0,mc(),nt=e,Oe=a=Zn(e.current,null),Le=n,Je=0,un=null,Tl=!1,Pa=ki(e,n),sc=!1,Wa=sn=oc=fa=Dl=dt=0,Kt=er=null,cc=!1,(n&8)!==0&&(n|=n&32);var u=e.entangledLanes;if(u!==0)for(e=e.entanglements,u&=n;0<u;){var c=31-tt(u),d=1<<c;n|=e[c],u&=~d}return nl=n,Gr(),a}function sp(e,n){Te=null,T.H=Qi,n===Za||n===tu?(n=_h(),Je=3):n===xo?(n=_h(),Je=4):Je=n===Qo?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,un=n,Oe===null&&(dt=1,pu(e,pn(n,e.current)))}function op(){var e=an.current;return e===null?!0:(Le&4194048)===Le?bn===null:(Le&62914560)===Le||(Le&536870912)!==0?e===bn:!1}function cp(){var e=T.H;return T.H=Qi,e===null?Qi:e}function fp(){var e=T.A;return T.A=D1,e}function Au(){dt=4,Tl||(Le&4194048)!==Le&&an.current!==null||(Pa=!0),(Dl&134217727)===0&&(fa&134217727)===0||nt===null||Ml(nt,Le,sn,!1)}function pc(e,n,a){var u=Ge;Ge|=2;var c=cp(),d=fp();(nt!==e||Le!==n)&&(Eu=null,ti(e,n)),n=!1;var x=dt;e:do try{if(Je!==0&&Oe!==null){var w=Oe,C=un;switch(Je){case 8:mc(),x=6;break e;case 3:case 2:case 9:case 6:an.current===null&&(n=!0);var B=Je;if(Je=0,un=null,ni(e,w,C,B),a&&Pa){x=0;break e}break;default:B=Je,Je=0,un=null,ni(e,w,C,B)}}M1(),x=dt;break}catch(G){sp(e,G)}while(!0);return n&&e.shellSuspendCounter++,Qn=na=null,Ge=u,T.H=c,T.A=d,Oe===null&&(nt=null,Le=0,Gr()),x}function M1(){for(;Oe!==null;)dp(Oe)}function R1(e,n){var a=Ge;Ge|=2;var u=cp(),c=fp();nt!==e||Le!==n?(Eu=null,_u=pt()+500,ti(e,n)):Pa=ki(e,n);e:do try{if(Je!==0&&Oe!==null){n=Oe;var d=un;t:switch(Je){case 1:Je=0,un=null,ni(e,n,d,1);break;case 2:case 9:if(wh(d)){Je=0,un=null,hp(n);break}n=function(){Je!==2&&Je!==9||nt!==e||(Je=7),On(e)},d.then(n,n);break e;case 3:Je=7;break e;case 4:Je=5;break e;case 7:wh(d)?(Je=0,un=null,hp(n)):(Je=0,un=null,ni(e,n,d,7));break;case 5:var x=null;switch(Oe.tag){case 26:x=Oe.memoizedState;case 5:case 27:var w=Oe;if(x?Pp(x):w.stateNode.complete){Je=0,un=null;var C=w.sibling;if(C!==null)Oe=C;else{var B=w.return;B!==null?(Oe=B,ju(B)):Oe=null}break t}}Je=0,un=null,ni(e,n,d,5);break;case 6:Je=0,un=null,ni(e,n,d,6);break;case 8:mc(),dt=6;break e;default:throw Error(r(462))}}L1();break}catch(G){sp(e,G)}while(!0);return Qn=na=null,T.H=u,T.A=c,Ge=a,Oe!==null?0:(nt=null,Le=0,Gr(),dt)}function L1(){for(;Oe!==null&&!bi();)dp(Oe)}function dp(e){var n=Lm(e.alternate,e,nl);e.memoizedProps=e.pendingProps,n===null?ju(e):Oe=n}function hp(e){var n=e,a=n.alternate;switch(n.tag){case 15:case 0:n=Tm(a,n,n.pendingProps,n.type,void 0,Le);break;case 11:n=Tm(a,n,n.pendingProps,n.type.render,n.ref,Le);break;case 5:To(n);default:Um(a,n),n=Oe=fh(n,nl),n=Lm(a,n,nl)}e.memoizedProps=e.pendingProps,n===null?ju(e):Oe=n}function ni(e,n,a,u){Qn=na=null,To(n),Fa=null,Ui=0;var c=n.return;try{if(_1(e,c,n,a,Le)){dt=1,pu(e,pn(a,e.current)),Oe=null;return}}catch(d){if(c!==null)throw Oe=c,d;dt=1,pu(e,pn(a,e.current)),Oe=null;return}n.flags&32768?(He||u===1?e=!0:Pa||(Le&536870912)!==0?e=!1:(Tl=e=!0,(u===2||u===9||u===3||u===6)&&(u=an.current,u!==null&&u.tag===13&&(u.flags|=16384))),mp(n,e)):ju(n)}function ju(e){var n=e;do{if((n.flags&32768)!==0){mp(n,Tl);return}e=n.return;var a=A1(n.alternate,n,nl);if(a!==null){Oe=a;return}if(n=n.sibling,n!==null){Oe=n;return}Oe=n=e}while(n!==null);dt===0&&(dt=5)}function mp(e,n){do{var a=j1(e.alternate,e);if(a!==null){a.flags&=32767,Oe=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!n&&(e=e.sibling,e!==null)){Oe=e;return}Oe=e=a}while(e!==null);dt=6,Oe=null}function pp(e,n,a,u,c,d,x,w,C){e.cancelPendingCommit=null;do Nu();while(Et!==0);if((Ge&6)!==0)throw Error(r(327));if(n!==null){if(n===e.current)throw Error(r(177));if(d=n.lanes|n.childLanes,d|=no,p0(e,a,d,x,w,C),e===nt&&(Oe=nt=null,Le=0),ei=n,Ol=e,ll=a,fc=d,dc=c,ap=u,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,q1(be,function(){return vp(),null})):(e.callbackNode=null,e.callbackPriority=0),u=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||u){u=T.T,T.T=null,c=X.p,X.p=2,x=Ge,Ge|=4;try{N1(e,n,a)}finally{Ge=x,X.p=c,T.T=u}}Et=1,gp(),yp(),xp()}}function gp(){if(Et===1){Et=0;var e=Ol,n=ei,a=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||a){a=T.T,T.T=null;var u=X.p;X.p=2;var c=Ge;Ge|=4;try{Km(n,e);var d=Ac,x=nh(e.containerInfo),w=d.focusedElem,C=d.selectionRange;if(x!==w&&w&&w.ownerDocument&&th(w.ownerDocument.documentElement,w)){if(C!==null&&$s(w)){var B=C.start,G=C.end;if(G===void 0&&(G=B),"selectionStart"in w)w.selectionStart=B,w.selectionEnd=Math.min(G,w.value.length);else{var $=w.ownerDocument||document,U=$&&$.defaultView||window;if(U.getSelection){var V=U.getSelection(),me=w.textContent.length,Se=Math.min(C.start,me),et=C.end===void 0?Se:Math.min(C.end,me);!V.extend&&Se>et&&(x=et,et=Se,Se=x);var D=eh(w,Se),j=eh(w,et);if(D&&j&&(V.rangeCount!==1||V.anchorNode!==D.node||V.anchorOffset!==D.offset||V.focusNode!==j.node||V.focusOffset!==j.offset)){var L=$.createRange();L.setStart(D.node,D.offset),V.removeAllRanges(),Se>et?(V.addRange(L),V.extend(j.node,j.offset)):(L.setEnd(j.node,j.offset),V.addRange(L))}}}}for($=[],V=w;V=V.parentNode;)V.nodeType===1&&$.push({element:V,left:V.scrollLeft,top:V.scrollTop});for(typeof w.focus=="function"&&w.focus(),w=0;w<$.length;w++){var K=$[w];K.element.scrollLeft=K.left,K.element.scrollTop=K.top}}Vu=!!Cc,Ac=Cc=null}finally{Ge=c,X.p=u,T.T=a}}e.current=n,Et=2}}function yp(){if(Et===2){Et=0;var e=Ol,n=ei,a=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||a){a=T.T,T.T=null;var u=X.p;X.p=2;var c=Ge;Ge|=4;try{Fm(e,n.alternate,n)}finally{Ge=c,X.p=u,T.T=a}}Et=3}}function xp(){if(Et===4||Et===3){Et=0,vi();var e=Ol,n=ei,a=ll,u=ap;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?Et=5:(Et=0,ei=Ol=null,bp(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(zl=null),zs(a),n=n.stateNode,_t&&typeof _t.onCommitFiberRoot=="function")try{_t.onCommitFiberRoot(Ut,n,void 0,(n.current.flags&128)===128)}catch{}if(u!==null){n=T.T,c=X.p,X.p=2,T.T=null;try{for(var d=e.onRecoverableError,x=0;x<u.length;x++){var w=u[x];d(w.value,{componentStack:w.stack})}}finally{T.T=n,X.p=c}}(ll&3)!==0&&Nu(),On(e),c=e.pendingLanes,(a&261930)!==0&&(c&42)!==0?e===hc?tr++:(tr=0,hc=e):tr=0,nr(0)}}function bp(e,n){(e.pooledCacheLanes&=n)===0&&(n=e.pooledCache,n!=null&&(e.pooledCache=null,Li(n)))}function Nu(){return gp(),yp(),xp(),vp()}function vp(){if(Et!==5)return!1;var e=Ol,n=fc;fc=0;var a=zs(ll),u=T.T,c=X.p;try{X.p=32>a?32:a,T.T=null,a=dc,dc=null;var d=Ol,x=ll;if(Et=0,ei=Ol=null,ll=0,(Ge&6)!==0)throw Error(r(331));var w=Ge;if(Ge|=4,tp(d.current),Pm(d,d.current,x,a),Ge=w,nr(0,!1),_t&&typeof _t.onPostCommitFiberRoot=="function")try{_t.onPostCommitFiberRoot(Ut,d)}catch{}return!0}finally{X.p=c,T.T=u,bp(e,n)}}function kp(e,n,a){n=pn(a,n),n=Fo(e.stateNode,n,2),e=Cl(e,n,2),e!==null&&(wi(e,2),On(e))}function Ke(e,n,a){if(e.tag===3)kp(e,e,a);else for(;n!==null;){if(n.tag===3){kp(n,e,a);break}else if(n.tag===1){var u=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(zl===null||!zl.has(u))){e=pn(a,e),a=wm(2),u=Cl(n,a,2),u!==null&&(Sm(a,u,n,e),wi(u,2),On(u));break}}n=n.return}}function gc(e,n,a){var u=e.pingCache;if(u===null){u=e.pingCache=new z1;var c=new Set;u.set(n,c)}else c=u.get(n),c===void 0&&(c=new Set,u.set(n,c));c.has(a)||(sc=!0,c.add(a),e=B1.bind(null,e,n,a),n.then(e,e))}function B1(e,n,a){var u=e.pingCache;u!==null&&u.delete(n),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,nt===e&&(Le&a)===a&&(dt===4||dt===3&&(Le&62914560)===Le&&300>pt()-Su?(Ge&2)===0&&ti(e,0):oc|=a,Wa===Le&&(Wa=0)),On(e)}function wp(e,n){n===0&&(n=gd()),e=Wl(e,n),e!==null&&(wi(e,n),On(e))}function U1(e){var n=e.memoizedState,a=0;n!==null&&(a=n.retryLane),wp(e,a)}function H1(e,n){var a=0;switch(e.tag){case 31:case 13:var u=e.stateNode,c=e.memoizedState;c!==null&&(a=c.retryLane);break;case 19:u=e.stateNode;break;case 22:u=e.stateNode._retryCache;break;default:throw Error(r(314))}u!==null&&u.delete(n),wp(e,a)}function q1(e,n){return pl(e,n)}var Tu=null,li=null,yc=!1,Du=!1,xc=!1,Rl=0;function On(e){e!==li&&e.next===null&&(li===null?Tu=li=e:li=li.next=e),Du=!0,yc||(yc=!0,I1())}function nr(e,n){if(!xc&&Du){xc=!0;do for(var a=!1,u=Tu;u!==null;){if(e!==0){var c=u.pendingLanes;if(c===0)var d=0;else{var x=u.suspendedLanes,w=u.pingedLanes;d=(1<<31-tt(42|e)+1)-1,d&=c&~(x&~w),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(a=!0,Cp(u,d))}else d=Le,d=Rr(u,u===nt?d:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(d&3)===0||ki(u,d)||(a=!0,Cp(u,d));u=u.next}while(a);xc=!1}}function V1(){Sp()}function Sp(){Du=yc=!1;var e=0;Rl!==0&&P1()&&(e=Rl);for(var n=pt(),a=null,u=Tu;u!==null;){var c=u.next,d=_p(u,n);d===0?(u.next=null,a===null?Tu=c:a.next=c,c===null&&(li=a)):(a=u,(e!==0||(d&3)!==0)&&(Du=!0)),u=c}Et!==0&&Et!==5||nr(e),Rl!==0&&(Rl=0)}function _p(e,n){for(var a=e.suspendedLanes,u=e.pingedLanes,c=e.expirationTimes,d=e.pendingLanes&-62914561;0<d;){var x=31-tt(d),w=1<<x,C=c[x];C===-1?((w&a)===0||(w&u)!==0)&&(c[x]=m0(w,n)):C<=n&&(e.expiredLanes|=w),d&=~w}if(n=nt,a=Le,a=Rr(e,e===n?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),u=e.callbackNode,a===0||e===n&&(Je===2||Je===9)||e.cancelPendingCommit!==null)return u!==null&&u!==null&&gl(u),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||ki(e,a)){if(n=a&-a,n===e.callbackPriority)return n;switch(u!==null&&gl(u),zs(a)){case 2:case 8:a=ie;break;case 32:a=be;break;case 268435456:a=Xe;break;default:a=be}return u=Ep.bind(null,e),a=pl(a,u),e.callbackPriority=n,e.callbackNode=a,n}return u!==null&&u!==null&&gl(u),e.callbackPriority=2,e.callbackNode=null,2}function Ep(e,n){if(Et!==0&&Et!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Nu()&&e.callbackNode!==a)return null;var u=Le;return u=Rr(e,e===nt?u:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),u===0?null:(rp(e,u,n),_p(e,pt()),e.callbackNode!=null&&e.callbackNode===a?Ep.bind(null,e):null)}function Cp(e,n){if(Nu())return null;rp(e,n,!0)}function I1(){eb(function(){(Ge&6)!==0?pl(Q,V1):Sp()})}function bc(){if(Rl===0){var e=Ia;e===0&&(e=zr,zr<<=1,(zr&261888)===0&&(zr=256)),Rl=e}return Rl}function Ap(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Hr(""+e)}function jp(e,n){var a=n.ownerDocument.createElement("input");return a.name=n.name,a.value=n.value,e.id&&a.setAttribute("form",e.id),n.parentNode.insertBefore(a,n),e=new FormData(e),a.parentNode.removeChild(a),e}function Y1(e,n,a,u,c){if(n==="submit"&&a&&a.stateNode===c){var d=Ap((c[Ft]||null).action),x=u.submitter;x&&(n=(n=x[Ft]||null)?Ap(n.formAction):x.getAttribute("formAction"),n!==null&&(d=n,x=null));var w=new Yr("action","action",null,u,c);e.push({event:w,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(Rl!==0){var C=x?jp(c,x):new FormData(c);Ho(a,{pending:!0,data:C,method:c.method,action:d},null,C)}}else typeof d=="function"&&(w.preventDefault(),C=x?jp(c,x):new FormData(c),Ho(a,{pending:!0,data:C,method:c.method,action:d},d,C))},currentTarget:c}]})}}for(var vc=0;vc<to.length;vc++){var kc=to[vc],Z1=kc.toLowerCase(),F1=kc[0].toUpperCase()+kc.slice(1);En(Z1,"on"+F1)}En(ih,"onAnimationEnd"),En(rh,"onAnimationIteration"),En(uh,"onAnimationStart"),En("dblclick","onDoubleClick"),En("focusin","onFocus"),En("focusout","onBlur"),En(u1,"onTransitionRun"),En(s1,"onTransitionStart"),En(o1,"onTransitionCancel"),En(sh,"onTransitionEnd"),ja("onMouseEnter",["mouseout","mouseover"]),ja("onMouseLeave",["mouseout","mouseover"]),ja("onPointerEnter",["pointerout","pointerover"]),ja("onPointerLeave",["pointerout","pointerover"]),Jl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Jl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Jl("onBeforeInput",["compositionend","keypress","textInput","paste"]),Jl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Jl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Jl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var lr="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(" "),Q1=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(lr));function Np(e,n){n=(n&4)!==0;for(var a=0;a<e.length;a++){var u=e[a],c=u.event;u=u.listeners;e:{var d=void 0;if(n)for(var x=u.length-1;0<=x;x--){var w=u[x],C=w.instance,B=w.currentTarget;if(w=w.listener,C!==d&&c.isPropagationStopped())break e;d=w,c.currentTarget=B;try{d(c)}catch(G){Qr(G)}c.currentTarget=null,d=C}else for(x=0;x<u.length;x++){if(w=u[x],C=w.instance,B=w.currentTarget,w=w.listener,C!==d&&c.isPropagationStopped())break e;d=w,c.currentTarget=B;try{d(c)}catch(G){Qr(G)}c.currentTarget=null,d=C}}}}function Me(e,n){var a=n[Os];a===void 0&&(a=n[Os]=new Set);var u=e+"__bubble";a.has(u)||(Tp(n,e,2,!1),a.add(u))}function wc(e,n,a){var u=0;n&&(u|=4),Tp(a,e,u,n)}var zu="_reactListening"+Math.random().toString(36).slice(2);function Sc(e){if(!e[zu]){e[zu]=!0,Sd.forEach(function(a){a!=="selectionchange"&&(Q1.has(a)||wc(a,!1,e),wc(a,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[zu]||(n[zu]=!0,wc("selectionchange",!1,n))}}function Tp(e,n,a,u){switch(ig(n)){case 2:var c=vb;break;case 8:c=kb;break;default:c=Uc}a=c.bind(null,n,a,e),c=void 0,!Is||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(c=!0),u?c!==void 0?e.addEventListener(n,a,{capture:!0,passive:c}):e.addEventListener(n,a,!0):c!==void 0?e.addEventListener(n,a,{passive:c}):e.addEventListener(n,a,!1)}function _c(e,n,a,u,c){var d=u;if((n&1)===0&&(n&2)===0&&u!==null)e:for(;;){if(u===null)return;var x=u.tag;if(x===3||x===4){var w=u.stateNode.containerInfo;if(w===c)break;if(x===4)for(x=u.return;x!==null;){var C=x.tag;if((C===3||C===4)&&x.stateNode.containerInfo===c)return;x=x.return}for(;w!==null;){if(x=Ea(w),x===null)return;if(C=x.tag,C===5||C===6||C===26||C===27){u=d=x;continue e}w=w.parentNode}}u=u.return}Rd(function(){var B=d,G=qs(a),$=[];e:{var U=oh.get(e);if(U!==void 0){var V=Yr,me=e;switch(e){case"keypress":if(Vr(a)===0)break e;case"keydown":case"keyup":V=H0;break;case"focusin":me="focus",V=Qs;break;case"focusout":me="blur",V=Qs;break;case"beforeblur":case"afterblur":V=Qs;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":V=Ud;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":V=A0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":V=I0;break;case ih:case rh:case uh:V=T0;break;case sh:V=Z0;break;case"scroll":case"scrollend":V=E0;break;case"wheel":V=Q0;break;case"copy":case"cut":case"paste":V=z0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":V=qd;break;case"toggle":case"beforetoggle":V=X0}var Se=(n&4)!==0,et=!Se&&(e==="scroll"||e==="scrollend"),D=Se?U!==null?U+"Capture":null:U;Se=[];for(var j=B,L;j!==null;){var K=j;if(L=K.stateNode,K=K.tag,K!==5&&K!==26&&K!==27||L===null||D===null||(K=Ei(j,D),K!=null&&Se.push(ar(j,K,L))),et)break;j=j.return}0<Se.length&&(U=new V(U,me,null,a,G),$.push({event:U,listeners:Se}))}}if((n&7)===0){e:{if(U=e==="mouseover"||e==="pointerover",V=e==="mouseout"||e==="pointerout",U&&a!==Hs&&(me=a.relatedTarget||a.fromElement)&&(Ea(me)||me[_a]))break e;if((V||U)&&(U=G.window===G?G:(U=G.ownerDocument)?U.defaultView||U.parentWindow:window,V?(me=a.relatedTarget||a.toElement,V=B,me=me?Ea(me):null,me!==null&&(et=o(me),Se=me.tag,me!==et||Se!==5&&Se!==27&&Se!==6)&&(me=null)):(V=null,me=B),V!==me)){if(Se=Ud,K="onMouseLeave",D="onMouseEnter",j="mouse",(e==="pointerout"||e==="pointerover")&&(Se=qd,K="onPointerLeave",D="onPointerEnter",j="pointer"),et=V==null?U:_i(V),L=me==null?U:_i(me),U=new Se(K,j+"leave",V,a,G),U.target=et,U.relatedTarget=L,K=null,Ea(G)===B&&(Se=new Se(D,j+"enter",me,a,G),Se.target=L,Se.relatedTarget=et,K=Se),et=K,V&&me)t:{for(Se=G1,D=V,j=me,L=0,K=D;K;K=Se(K))L++;K=0;for(var ke=j;ke;ke=Se(ke))K++;for(;0<L-K;)D=Se(D),L--;for(;0<K-L;)j=Se(j),K--;for(;L--;){if(D===j||j!==null&&D===j.alternate){Se=D;break t}D=Se(D),j=Se(j)}Se=null}else Se=null;V!==null&&Dp($,U,V,Se,!1),me!==null&&et!==null&&Dp($,et,me,Se,!0)}}e:{if(U=B?_i(B):window,V=U.nodeName&&U.nodeName.toLowerCase(),V==="select"||V==="input"&&U.type==="file")var Ze=Xd;else if(Qd(U))if(Jd)Ze=a1;else{Ze=n1;var ge=t1}else V=U.nodeName,!V||V.toLowerCase()!=="input"||U.type!=="checkbox"&&U.type!=="radio"?B&&Us(B.elementType)&&(Ze=Xd):Ze=l1;if(Ze&&(Ze=Ze(e,B))){Gd($,Ze,a,G);break e}ge&&ge(e,U,B),e==="focusout"&&B&&U.type==="number"&&B.memoizedProps.value!=null&&Bs(U,"number",U.value)}switch(ge=B?_i(B):window,e){case"focusin":(Qd(ge)||ge.contentEditable==="true")&&(Ma=ge,Ps=B,Oi=null);break;case"focusout":Oi=Ps=Ma=null;break;case"mousedown":Ws=!0;break;case"contextmenu":case"mouseup":case"dragend":Ws=!1,lh($,a,G);break;case"selectionchange":if(r1)break;case"keydown":case"keyup":lh($,a,G)}var De;if(Xs)e:{switch(e){case"compositionstart":var Be="onCompositionStart";break e;case"compositionend":Be="onCompositionEnd";break e;case"compositionupdate":Be="onCompositionUpdate";break e}Be=void 0}else Oa?Zd(e,a)&&(Be="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Be="onCompositionStart");Be&&(Vd&&a.locale!=="ko"&&(Oa||Be!=="onCompositionStart"?Be==="onCompositionEnd"&&Oa&&(De=Ld()):(bl=G,Ys="value"in bl?bl.value:bl.textContent,Oa=!0)),ge=Ou(B,Be),0<ge.length&&(Be=new Hd(Be,e,null,a,G),$.push({event:Be,listeners:ge}),De?Be.data=De:(De=Fd(a),De!==null&&(Be.data=De)))),(De=K0?$0(e,a):P0(e,a))&&(Be=Ou(B,"onBeforeInput"),0<Be.length&&(ge=new Hd("onBeforeInput","beforeinput",null,a,G),$.push({event:ge,listeners:Be}),ge.data=De)),Y1($,e,B,a,G)}Np($,n)})}function ar(e,n,a){return{instance:e,listener:n,currentTarget:a}}function Ou(e,n){for(var a=n+"Capture",u=[];e!==null;){var c=e,d=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||d===null||(c=Ei(e,a),c!=null&&u.unshift(ar(e,c,d)),c=Ei(e,n),c!=null&&u.push(ar(e,c,d))),e.tag===3)return u;e=e.return}return[]}function G1(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Dp(e,n,a,u,c){for(var d=n._reactName,x=[];a!==null&&a!==u;){var w=a,C=w.alternate,B=w.stateNode;if(w=w.tag,C!==null&&C===u)break;w!==5&&w!==26&&w!==27||B===null||(C=B,c?(B=Ei(a,d),B!=null&&x.unshift(ar(a,B,C))):c||(B=Ei(a,d),B!=null&&x.push(ar(a,B,C)))),a=a.return}x.length!==0&&e.push({event:n,listeners:x})}var X1=/\r\n?/g,J1=/\u0000|\uFFFD/g;function zp(e){return(typeof e=="string"?e:""+e).replace(X1,`
49
+ `).replace(J1,"")}function Op(e,n){return n=zp(n),zp(e)===n}function We(e,n,a,u,c,d){switch(a){case"children":typeof u=="string"?n==="body"||n==="textarea"&&u===""||Ta(e,u):(typeof u=="number"||typeof u=="bigint")&&n!=="body"&&Ta(e,""+u);break;case"className":Br(e,"class",u);break;case"tabIndex":Br(e,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":Br(e,a,u);break;case"style":Od(e,u,d);break;case"data":if(n!=="object"){Br(e,"data",u);break}case"src":case"href":if(u===""&&(n!=="a"||a!=="href")){e.removeAttribute(a);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){e.removeAttribute(a);break}u=Hr(""+u),e.setAttribute(a,u);break;case"action":case"formAction":if(typeof u=="function"){e.setAttribute(a,"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 d=="function"&&(a==="formAction"?(n!=="input"&&We(e,n,"name",c.name,c,null),We(e,n,"formEncType",c.formEncType,c,null),We(e,n,"formMethod",c.formMethod,c,null),We(e,n,"formTarget",c.formTarget,c,null)):(We(e,n,"encType",c.encType,c,null),We(e,n,"method",c.method,c,null),We(e,n,"target",c.target,c,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){e.removeAttribute(a);break}u=Hr(""+u),e.setAttribute(a,u);break;case"onClick":u!=null&&(e.onclick=In);break;case"onScroll":u!=null&&Me("scroll",e);break;case"onScrollEnd":u!=null&&Me("scrollend",e);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(r(61));if(a=u.__html,a!=null){if(c.children!=null)throw Error(r(60));e.innerHTML=a}}break;case"multiple":e.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":e.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){e.removeAttribute("xlink:href");break}a=Hr(""+u),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?e.setAttribute(a,""+u):e.removeAttribute(a);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":u&&typeof u!="function"&&typeof u!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":u===!0?e.setAttribute(a,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?e.setAttribute(a,u):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?e.setAttribute(a,u):e.removeAttribute(a);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?e.removeAttribute(a):e.setAttribute(a,u);break;case"popover":Me("beforetoggle",e),Me("toggle",e),Lr(e,"popover",u);break;case"xlinkActuate":Vn(e,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":Vn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":Vn(e,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":Vn(e,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":Vn(e,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":Vn(e,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":Vn(e,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":Vn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":Vn(e,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":Lr(e,"is",u);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=S0.get(a)||a,Lr(e,a,u))}}function Ec(e,n,a,u,c,d){switch(a){case"style":Od(e,u,d);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(r(61));if(a=u.__html,a!=null){if(c.children!=null)throw Error(r(60));e.innerHTML=a}}break;case"children":typeof u=="string"?Ta(e,u):(typeof u=="number"||typeof u=="bigint")&&Ta(e,""+u);break;case"onScroll":u!=null&&Me("scroll",e);break;case"onScrollEnd":u!=null&&Me("scrollend",e);break;case"onClick":u!=null&&(e.onclick=In);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!_d.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(c=a.endsWith("Capture"),n=a.slice(2,c?a.length-7:void 0),d=e[Ft]||null,d=d!=null?d[a]:null,typeof d=="function"&&e.removeEventListener(n,d,c),typeof u=="function")){typeof d!="function"&&d!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(n,u,c);break e}a in e?e[a]=u:u===!0?e.setAttribute(a,""):Lr(e,a,u)}}}function Mt(e,n,a){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Me("error",e),Me("load",e);var u=!1,c=!1,d;for(d in a)if(a.hasOwnProperty(d)){var x=a[d];if(x!=null)switch(d){case"src":u=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:We(e,n,d,x,a,null)}}c&&We(e,n,"srcSet",a.srcSet,a,null),u&&We(e,n,"src",a.src,a,null);return;case"input":Me("invalid",e);var w=d=x=c=null,C=null,B=null;for(u in a)if(a.hasOwnProperty(u)){var G=a[u];if(G!=null)switch(u){case"name":c=G;break;case"type":x=G;break;case"checked":C=G;break;case"defaultChecked":B=G;break;case"value":d=G;break;case"defaultValue":w=G;break;case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(r(137,n));break;default:We(e,n,u,G,a,null)}}Nd(e,d,w,C,B,x,c,!1);return;case"select":Me("invalid",e),u=x=d=null;for(c in a)if(a.hasOwnProperty(c)&&(w=a[c],w!=null))switch(c){case"value":d=w;break;case"defaultValue":x=w;break;case"multiple":u=w;default:We(e,n,c,w,a,null)}n=d,a=x,e.multiple=!!u,n!=null?Na(e,!!u,n,!1):a!=null&&Na(e,!!u,a,!0);return;case"textarea":Me("invalid",e),d=c=u=null;for(x in a)if(a.hasOwnProperty(x)&&(w=a[x],w!=null))switch(x){case"value":u=w;break;case"defaultValue":c=w;break;case"children":d=w;break;case"dangerouslySetInnerHTML":if(w!=null)throw Error(r(91));break;default:We(e,n,x,w,a,null)}Dd(e,u,c,d);return;case"option":for(C in a)if(a.hasOwnProperty(C)&&(u=a[C],u!=null))switch(C){case"selected":e.selected=u&&typeof u!="function"&&typeof u!="symbol";break;default:We(e,n,C,u,a,null)}return;case"dialog":Me("beforetoggle",e),Me("toggle",e),Me("cancel",e),Me("close",e);break;case"iframe":case"object":Me("load",e);break;case"video":case"audio":for(u=0;u<lr.length;u++)Me(lr[u],e);break;case"image":Me("error",e),Me("load",e);break;case"details":Me("toggle",e);break;case"embed":case"source":case"link":Me("error",e),Me("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(B in a)if(a.hasOwnProperty(B)&&(u=a[B],u!=null))switch(B){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:We(e,n,B,u,a,null)}return;default:if(Us(n)){for(G in a)a.hasOwnProperty(G)&&(u=a[G],u!==void 0&&Ec(e,n,G,u,a,void 0));return}}for(w in a)a.hasOwnProperty(w)&&(u=a[w],u!=null&&We(e,n,w,u,a,null))}function K1(e,n,a,u){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var c=null,d=null,x=null,w=null,C=null,B=null,G=null;for(V in a){var $=a[V];if(a.hasOwnProperty(V)&&$!=null)switch(V){case"checked":break;case"value":break;case"defaultValue":C=$;default:u.hasOwnProperty(V)||We(e,n,V,null,u,$)}}for(var U in u){var V=u[U];if($=a[U],u.hasOwnProperty(U)&&(V!=null||$!=null))switch(U){case"type":d=V;break;case"name":c=V;break;case"checked":B=V;break;case"defaultChecked":G=V;break;case"value":x=V;break;case"defaultValue":w=V;break;case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(r(137,n));break;default:V!==$&&We(e,n,U,V,u,$)}}Ls(e,x,w,C,B,G,d,c);return;case"select":V=x=w=U=null;for(d in a)if(C=a[d],a.hasOwnProperty(d)&&C!=null)switch(d){case"value":break;case"multiple":V=C;default:u.hasOwnProperty(d)||We(e,n,d,null,u,C)}for(c in u)if(d=u[c],C=a[c],u.hasOwnProperty(c)&&(d!=null||C!=null))switch(c){case"value":U=d;break;case"defaultValue":w=d;break;case"multiple":x=d;default:d!==C&&We(e,n,c,d,u,C)}n=w,a=x,u=V,U!=null?Na(e,!!a,U,!1):!!u!=!!a&&(n!=null?Na(e,!!a,n,!0):Na(e,!!a,a?[]:"",!1));return;case"textarea":V=U=null;for(w in a)if(c=a[w],a.hasOwnProperty(w)&&c!=null&&!u.hasOwnProperty(w))switch(w){case"value":break;case"children":break;default:We(e,n,w,null,u,c)}for(x in u)if(c=u[x],d=a[x],u.hasOwnProperty(x)&&(c!=null||d!=null))switch(x){case"value":U=c;break;case"defaultValue":V=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(r(91));break;default:c!==d&&We(e,n,x,c,u,d)}Td(e,U,V);return;case"option":for(var me in a)if(U=a[me],a.hasOwnProperty(me)&&U!=null&&!u.hasOwnProperty(me))switch(me){case"selected":e.selected=!1;break;default:We(e,n,me,null,u,U)}for(C in u)if(U=u[C],V=a[C],u.hasOwnProperty(C)&&U!==V&&(U!=null||V!=null))switch(C){case"selected":e.selected=U&&typeof U!="function"&&typeof U!="symbol";break;default:We(e,n,C,U,u,V)}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 Se in a)U=a[Se],a.hasOwnProperty(Se)&&U!=null&&!u.hasOwnProperty(Se)&&We(e,n,Se,null,u,U);for(B in u)if(U=u[B],V=a[B],u.hasOwnProperty(B)&&U!==V&&(U!=null||V!=null))switch(B){case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(r(137,n));break;default:We(e,n,B,U,u,V)}return;default:if(Us(n)){for(var et in a)U=a[et],a.hasOwnProperty(et)&&U!==void 0&&!u.hasOwnProperty(et)&&Ec(e,n,et,void 0,u,U);for(G in u)U=u[G],V=a[G],!u.hasOwnProperty(G)||U===V||U===void 0&&V===void 0||Ec(e,n,G,U,u,V);return}}for(var D in a)U=a[D],a.hasOwnProperty(D)&&U!=null&&!u.hasOwnProperty(D)&&We(e,n,D,null,u,U);for($ in u)U=u[$],V=a[$],!u.hasOwnProperty($)||U===V||U==null&&V==null||We(e,n,$,U,u,V)}function Mp(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function $1(){if(typeof performance.getEntriesByType=="function"){for(var e=0,n=0,a=performance.getEntriesByType("resource"),u=0;u<a.length;u++){var c=a[u],d=c.transferSize,x=c.initiatorType,w=c.duration;if(d&&w&&Mp(x)){for(x=0,w=c.responseEnd,u+=1;u<a.length;u++){var C=a[u],B=C.startTime;if(B>w)break;var G=C.transferSize,$=C.initiatorType;G&&Mp($)&&(C=C.responseEnd,x+=G*(C<w?1:(w-B)/(C-B)))}if(--u,n+=8*(d+x)/(c.duration/1e3),e++,10<e)break}}if(0<e)return n/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Cc=null,Ac=null;function Mu(e){return e.nodeType===9?e:e.ownerDocument}function Rp(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Lp(e,n){if(e===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&n==="foreignObject"?0:e}function jc(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var Nc=null;function P1(){var e=window.event;return e&&e.type==="popstate"?e===Nc?!1:(Nc=e,!0):(Nc=null,!1)}var Bp=typeof setTimeout=="function"?setTimeout:void 0,W1=typeof clearTimeout=="function"?clearTimeout:void 0,Up=typeof Promise=="function"?Promise:void 0,eb=typeof queueMicrotask=="function"?queueMicrotask:typeof Up<"u"?function(e){return Up.resolve(null).then(e).catch(tb)}:Bp;function tb(e){setTimeout(function(){throw e})}function Ll(e){return e==="head"}function Hp(e,n){var a=n,u=0;do{var c=a.nextSibling;if(e.removeChild(a),c&&c.nodeType===8)if(a=c.data,a==="/$"||a==="/&"){if(u===0){e.removeChild(c),ui(n);return}u--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")u++;else if(a==="html")ir(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,ir(a);for(var d=a.firstChild;d;){var x=d.nextSibling,w=d.nodeName;d[Si]||w==="SCRIPT"||w==="STYLE"||w==="LINK"&&d.rel.toLowerCase()==="stylesheet"||a.removeChild(d),d=x}}else a==="body"&&ir(e.ownerDocument.body);a=c}while(a);ui(n)}function qp(e,n){var a=e;e=0;do{var u=a.nextSibling;if(a.nodeType===1?n?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(n?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),u&&u.nodeType===8)if(a=u.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=u}while(a)}function Tc(e){var n=e.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var a=n;switch(n=n.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Tc(a),Ms(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function nb(e,n,a,u){for(;e.nodeType===1;){var c=a;if(e.nodeName.toLowerCase()!==n.toLowerCase()){if(!u&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(u){if(!e[Si])switch(n){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(d=e.getAttribute("rel"),d==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(d!==c.rel||e.getAttribute("href")!==(c.href==null||c.href===""?null:c.href)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin)||e.getAttribute("title")!==(c.title==null?null:c.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(d=e.getAttribute("src"),(d!==(c.src==null?null:c.src)||e.getAttribute("type")!==(c.type==null?null:c.type)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&d&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(n==="input"&&e.type==="hidden"){var d=c.name==null?null:""+c.name;if(c.type==="hidden"&&e.getAttribute("name")===d)return e}else return e;if(e=vn(e.nextSibling),e===null)break}return null}function lb(e,n,a){if(n==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=vn(e.nextSibling),e===null))return null;return e}function Vp(e,n){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=vn(e.nextSibling),e===null))return null;return e}function Dc(e){return e.data==="$?"||e.data==="$~"}function zc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function ab(e,n){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=n;else if(e.data!=="$?"||a.readyState!=="loading")n();else{var u=function(){n(),a.removeEventListener("DOMContentLoaded",u)};a.addEventListener("DOMContentLoaded",u),e._reactRetry=u}}function vn(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"||n==="F!"||n==="F")break;if(n==="/$"||n==="/&")return null}}return e}var Oc=null;function Ip(e){e=e.nextSibling;for(var n=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(n===0)return vn(e.nextSibling);n--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||n++}e=e.nextSibling}return null}function Yp(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(n===0)return e;n--}else a!=="/$"&&a!=="/&"||n++}e=e.previousSibling}return null}function Zp(e,n,a){switch(n=Mu(a),e){case"html":if(e=n.documentElement,!e)throw Error(r(452));return e;case"head":if(e=n.head,!e)throw Error(r(453));return e;case"body":if(e=n.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function ir(e){for(var n=e.attributes;n.length;)e.removeAttributeNode(n[0]);Ms(e)}var kn=new Map,Fp=new Set;function Ru(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var al=X.d;X.d={f:ib,r:rb,D:ub,C:sb,L:ob,m:cb,X:db,S:fb,M:hb};function ib(){var e=al.f(),n=Cu();return e||n}function rb(e){var n=Ca(e);n!==null&&n.tag===5&&n.type==="form"?sm(n):al.r(e)}var ai=typeof document>"u"?null:document;function Qp(e,n,a){var u=ai;if(u&&typeof n=="string"&&n){var c=hn(n);c='link[rel="'+e+'"][href="'+c+'"]',typeof a=="string"&&(c+='[crossorigin="'+a+'"]'),Fp.has(c)||(Fp.add(c),e={rel:e,crossOrigin:a,href:n},u.querySelector(c)===null&&(n=u.createElement("link"),Mt(n,"link",e),Ct(n),u.head.appendChild(n)))}}function ub(e){al.D(e),Qp("dns-prefetch",e,null)}function sb(e,n){al.C(e,n),Qp("preconnect",e,n)}function ob(e,n,a){al.L(e,n,a);var u=ai;if(u&&e&&n){var c='link[rel="preload"][as="'+hn(n)+'"]';n==="image"&&a&&a.imageSrcSet?(c+='[imagesrcset="'+hn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(c+='[imagesizes="'+hn(a.imageSizes)+'"]')):c+='[href="'+hn(e)+'"]';var d=c;switch(n){case"style":d=ii(e);break;case"script":d=ri(e)}kn.has(d)||(e=y({rel:"preload",href:n==="image"&&a&&a.imageSrcSet?void 0:e,as:n},a),kn.set(d,e),u.querySelector(c)!==null||n==="style"&&u.querySelector(rr(d))||n==="script"&&u.querySelector(ur(d))||(n=u.createElement("link"),Mt(n,"link",e),Ct(n),u.head.appendChild(n)))}}function cb(e,n){al.m(e,n);var a=ai;if(a&&e){var u=n&&typeof n.as=="string"?n.as:"script",c='link[rel="modulepreload"][as="'+hn(u)+'"][href="'+hn(e)+'"]',d=c;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=ri(e)}if(!kn.has(d)&&(e=y({rel:"modulepreload",href:e},n),kn.set(d,e),a.querySelector(c)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(ur(d)))return}u=a.createElement("link"),Mt(u,"link",e),Ct(u),a.head.appendChild(u)}}}function fb(e,n,a){al.S(e,n,a);var u=ai;if(u&&e){var c=Aa(u).hoistableStyles,d=ii(e);n=n||"default";var x=c.get(d);if(!x){var w={loading:0,preload:null};if(x=u.querySelector(rr(d)))w.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":n},a),(a=kn.get(d))&&Mc(e,a);var C=x=u.createElement("link");Ct(C),Mt(C,"link",e),C._p=new Promise(function(B,G){C.onload=B,C.onerror=G}),C.addEventListener("load",function(){w.loading|=1}),C.addEventListener("error",function(){w.loading|=2}),w.loading|=4,Lu(x,n,u)}x={type:"stylesheet",instance:x,count:1,state:w},c.set(d,x)}}}function db(e,n){al.X(e,n);var a=ai;if(a&&e){var u=Aa(a).hoistableScripts,c=ri(e),d=u.get(c);d||(d=a.querySelector(ur(c)),d||(e=y({src:e,async:!0},n),(n=kn.get(c))&&Rc(e,n),d=a.createElement("script"),Ct(d),Mt(d,"link",e),a.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},u.set(c,d))}}function hb(e,n){al.M(e,n);var a=ai;if(a&&e){var u=Aa(a).hoistableScripts,c=ri(e),d=u.get(c);d||(d=a.querySelector(ur(c)),d||(e=y({src:e,async:!0,type:"module"},n),(n=kn.get(c))&&Rc(e,n),d=a.createElement("script"),Ct(d),Mt(d,"link",e),a.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},u.set(c,d))}}function Gp(e,n,a,u){var c=(c=ne.current)?Ru(c):null;if(!c)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(n=ii(a.href),a=Aa(c).hoistableStyles,u=a.get(n),u||(u={type:"style",instance:null,count:0,state:null},a.set(n,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=ii(a.href);var d=Aa(c).hoistableStyles,x=d.get(e);if(x||(c=c.ownerDocument||c,x={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(e,x),(d=c.querySelector(rr(e)))&&!d._p&&(x.instance=d,x.state.loading=5),kn.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},kn.set(e,a),d||mb(c,e,a,x.state))),n&&u===null)throw Error(r(528,""));return x}if(n&&u!==null)throw Error(r(529,""));return null;case"script":return n=a.async,a=a.src,typeof a=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=ri(a),a=Aa(c).hoistableScripts,u=a.get(n),u||(u={type:"script",instance:null,count:0,state:null},a.set(n,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function ii(e){return'href="'+hn(e)+'"'}function rr(e){return'link[rel="stylesheet"]['+e+"]"}function Xp(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function mb(e,n,a,u){e.querySelector('link[rel="preload"][as="style"]['+n+"]")?u.loading=1:(n=e.createElement("link"),u.preload=n,n.addEventListener("load",function(){return u.loading|=1}),n.addEventListener("error",function(){return u.loading|=2}),Mt(n,"link",a),Ct(n),e.head.appendChild(n))}function ri(e){return'[src="'+hn(e)+'"]'}function ur(e){return"script[async]"+e}function Jp(e,n,a){if(n.count++,n.instance===null)switch(n.type){case"style":var u=e.querySelector('style[data-href~="'+hn(a.href)+'"]');if(u)return n.instance=u,Ct(u),u;var c=y({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return u=(e.ownerDocument||e).createElement("style"),Ct(u),Mt(u,"style",c),Lu(u,a.precedence,e),n.instance=u;case"stylesheet":c=ii(a.href);var d=e.querySelector(rr(c));if(d)return n.state.loading|=4,n.instance=d,Ct(d),d;u=Xp(a),(c=kn.get(c))&&Mc(u,c),d=(e.ownerDocument||e).createElement("link"),Ct(d);var x=d;return x._p=new Promise(function(w,C){x.onload=w,x.onerror=C}),Mt(d,"link",u),n.state.loading|=4,Lu(d,a.precedence,e),n.instance=d;case"script":return d=ri(a.src),(c=e.querySelector(ur(d)))?(n.instance=c,Ct(c),c):(u=a,(c=kn.get(d))&&(u=y({},a),Rc(u,c)),e=e.ownerDocument||e,c=e.createElement("script"),Ct(c),Mt(c,"link",u),e.head.appendChild(c),n.instance=c);case"void":return null;default:throw Error(r(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(u=n.instance,n.state.loading|=4,Lu(u,a.precedence,e));return n.instance}function Lu(e,n,a){for(var u=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=u.length?u[u.length-1]:null,d=c,x=0;x<u.length;x++){var w=u[x];if(w.dataset.precedence===n)d=w;else if(d!==c)break}d?d.parentNode.insertBefore(e,d.nextSibling):(n=a.nodeType===9?a.head:a,n.insertBefore(e,n.firstChild))}function Mc(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.title==null&&(e.title=n.title)}function Rc(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.integrity==null&&(e.integrity=n.integrity)}var Bu=null;function Kp(e,n,a){if(Bu===null){var u=new Map,c=Bu=new Map;c.set(a,u)}else c=Bu,u=c.get(a),u||(u=new Map,c.set(a,u));if(u.has(e))return u;for(u.set(e,null),a=a.getElementsByTagName(e),c=0;c<a.length;c++){var d=a[c];if(!(d[Si]||d[Tt]||e==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var x=d.getAttribute(n)||"";x=e+x;var w=u.get(x);w?w.push(d):u.set(x,[d])}}return u}function $p(e,n,a){e=e.ownerDocument||e,e.head.insertBefore(a,n==="title"?e.querySelector("head > title"):null)}function pb(e,n,a){if(a===1||n.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;switch(n.rel){case"stylesheet":return e=n.disabled,typeof n.precedence=="string"&&e==null;default:return!0}case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function Pp(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function gb(e,n,a,u){if(a.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var c=ii(u.href),d=n.querySelector(rr(c));if(d){n=d._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(e.count++,e=Uu.bind(e),n.then(e,e)),a.state.loading|=4,a.instance=d,Ct(d);return}d=n.ownerDocument||n,u=Xp(u),(c=kn.get(c))&&Mc(u,c),d=d.createElement("link"),Ct(d);var x=d;x._p=new Promise(function(w,C){x.onload=w,x.onerror=C}),Mt(d,"link",u),a.instance=d}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,n),(n=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Uu.bind(e),n.addEventListener("load",a),n.addEventListener("error",a))}}var Lc=0;function yb(e,n){return e.stylesheets&&e.count===0&&qu(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var u=setTimeout(function(){if(e.stylesheets&&qu(e,e.stylesheets),e.unsuspend){var d=e.unsuspend;e.unsuspend=null,d()}},6e4+n);0<e.imgBytes&&Lc===0&&(Lc=62500*$1());var c=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&qu(e,e.stylesheets),e.unsuspend)){var d=e.unsuspend;e.unsuspend=null,d()}},(e.imgBytes>Lc?50:800)+n);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(u),clearTimeout(c)}}:null}function Uu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)qu(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Hu=null;function qu(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Hu=new Map,n.forEach(xb,e),Hu=null,Uu.call(e))}function xb(e,n){if(!(n.state.loading&4)){var a=Hu.get(e);if(a)var u=a.get(null);else{a=new Map,Hu.set(e,a);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<c.length;d++){var x=c[d];(x.nodeName==="LINK"||x.getAttribute("media")!=="not all")&&(a.set(x.dataset.precedence,x),u=x)}u&&a.set(null,u)}c=n.instance,x=c.getAttribute("data-precedence"),d=a.get(x)||u,d===u&&a.set(null,c),a.set(x,c),this.count++,u=Uu.bind(this),c.addEventListener("load",u),c.addEventListener("error",u),d?d.parentNode.insertBefore(c,d.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(c,e.firstChild)),n.state.loading|=4}}var sr={$$typeof:q,Provider:null,Consumer:null,_currentValue:se,_currentValue2:se,_threadCount:0};function bb(e,n,a,u,c,d,x,w,C){this.tag=1,this.containerInfo=e,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=Ts(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ts(0),this.hiddenUpdates=Ts(null),this.identifierPrefix=u,this.onUncaughtError=c,this.onCaughtError=d,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=C,this.incompleteTransitions=new Map}function Wp(e,n,a,u,c,d,x,w,C,B,G,$){return e=new bb(e,n,a,x,C,B,G,$,w),n=1,d===!0&&(n|=24),d=ln(3,null,null,n),e.current=d,d.stateNode=e,n=po(),n.refCount++,e.pooledCache=n,n.refCount++,d.memoizedState={element:u,isDehydrated:a,cache:n},bo(d),e}function eg(e){return e?(e=Ba,e):Ba}function tg(e,n,a,u,c,d){c=eg(c),u.context===null?u.context=c:u.pendingContext=c,u=El(n),u.payload={element:a},d=d===void 0?null:d,d!==null&&(u.callback=d),a=Cl(e,u,n),a!==null&&($t(a,e,n),qi(a,e,n))}function ng(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<n?a:n}}function Bc(e,n){ng(e,n),(e=e.alternate)&&ng(e,n)}function lg(e){if(e.tag===13||e.tag===31){var n=Wl(e,67108864);n!==null&&$t(n,e,67108864),Bc(e,67108864)}}function ag(e){if(e.tag===13||e.tag===31){var n=on();n=Ds(n);var a=Wl(e,n);a!==null&&$t(a,e,n),Bc(e,n)}}var Vu=!0;function vb(e,n,a,u){var c=T.T;T.T=null;var d=X.p;try{X.p=2,Uc(e,n,a,u)}finally{X.p=d,T.T=c}}function kb(e,n,a,u){var c=T.T;T.T=null;var d=X.p;try{X.p=8,Uc(e,n,a,u)}finally{X.p=d,T.T=c}}function Uc(e,n,a,u){if(Vu){var c=Hc(u);if(c===null)_c(e,n,u,Iu,a),rg(e,u);else if(Sb(c,e,n,a,u))u.stopPropagation();else if(rg(e,u),n&4&&-1<wb.indexOf(e)){for(;c!==null;){var d=Ca(c);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var x=Xl(d.pendingLanes);if(x!==0){var w=d;for(w.pendingLanes|=2,w.entangledLanes|=2;x;){var C=1<<31-tt(x);w.entanglements[1]|=C,x&=~C}On(d),(Ge&6)===0&&(_u=pt()+500,nr(0))}}break;case 31:case 13:w=Wl(d,2),w!==null&&$t(w,d,2),Cu(),Bc(d,2)}if(d=Hc(u),d===null&&_c(e,n,u,Iu,a),d===c)break;c=d}c!==null&&u.stopPropagation()}else _c(e,n,u,null,a)}}function Hc(e){return e=qs(e),qc(e)}var Iu=null;function qc(e){if(Iu=null,e=Ea(e),e!==null){var n=o(e);if(n===null)e=null;else{var a=n.tag;if(a===13){if(e=f(n),e!==null)return e;e=null}else if(a===31){if(e=h(n),e!==null)return e;e=null}else if(a===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null)}}return Iu=e,null}function ig(e){switch(e){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(Ye()){case Q:return 2;case ie:return 8;case be:case Ce:return 32;case Xe:return 268435456;default:return 32}default:return 32}}var Vc=!1,Bl=null,Ul=null,Hl=null,or=new Map,cr=new Map,ql=[],wb="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 rg(e,n){switch(e){case"focusin":case"focusout":Bl=null;break;case"dragenter":case"dragleave":Ul=null;break;case"mouseover":case"mouseout":Hl=null;break;case"pointerover":case"pointerout":or.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":cr.delete(n.pointerId)}}function fr(e,n,a,u,c,d){return e===null||e.nativeEvent!==d?(e={blockedOn:n,domEventName:a,eventSystemFlags:u,nativeEvent:d,targetContainers:[c]},n!==null&&(n=Ca(n),n!==null&&lg(n)),e):(e.eventSystemFlags|=u,n=e.targetContainers,c!==null&&n.indexOf(c)===-1&&n.push(c),e)}function Sb(e,n,a,u,c){switch(n){case"focusin":return Bl=fr(Bl,e,n,a,u,c),!0;case"dragenter":return Ul=fr(Ul,e,n,a,u,c),!0;case"mouseover":return Hl=fr(Hl,e,n,a,u,c),!0;case"pointerover":var d=c.pointerId;return or.set(d,fr(or.get(d)||null,e,n,a,u,c)),!0;case"gotpointercapture":return d=c.pointerId,cr.set(d,fr(cr.get(d)||null,e,n,a,u,c)),!0}return!1}function ug(e){var n=Ea(e.target);if(n!==null){var a=o(n);if(a!==null){if(n=a.tag,n===13){if(n=f(a),n!==null){e.blockedOn=n,kd(e.priority,function(){ag(a)});return}}else if(n===31){if(n=h(a),n!==null){e.blockedOn=n,kd(e.priority,function(){ag(a)});return}}else if(n===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Yu(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var a=Hc(e.nativeEvent);if(a===null){a=e.nativeEvent;var u=new a.constructor(a.type,a);Hs=u,a.target.dispatchEvent(u),Hs=null}else return n=Ca(a),n!==null&&lg(n),e.blockedOn=a,!1;n.shift()}return!0}function sg(e,n,a){Yu(e)&&a.delete(n)}function _b(){Vc=!1,Bl!==null&&Yu(Bl)&&(Bl=null),Ul!==null&&Yu(Ul)&&(Ul=null),Hl!==null&&Yu(Hl)&&(Hl=null),or.forEach(sg),cr.forEach(sg)}function Zu(e,n){e.blockedOn===n&&(e.blockedOn=null,Vc||(Vc=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,_b)))}var Fu=null;function og(e){Fu!==e&&(Fu=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Fu===e&&(Fu=null);for(var n=0;n<e.length;n+=3){var a=e[n],u=e[n+1],c=e[n+2];if(typeof u!="function"){if(qc(u||a)===null)continue;break}var d=Ca(a);d!==null&&(e.splice(n,3),n-=3,Ho(d,{pending:!0,data:c,method:a.method,action:u},u,c))}}))}function ui(e){function n(C){return Zu(C,e)}Bl!==null&&Zu(Bl,e),Ul!==null&&Zu(Ul,e),Hl!==null&&Zu(Hl,e),or.forEach(n),cr.forEach(n);for(var a=0;a<ql.length;a++){var u=ql[a];u.blockedOn===e&&(u.blockedOn=null)}for(;0<ql.length&&(a=ql[0],a.blockedOn===null);)ug(a),a.blockedOn===null&&ql.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(u=0;u<a.length;u+=3){var c=a[u],d=a[u+1],x=c[Ft]||null;if(typeof d=="function")x||og(a);else if(x){var w=null;if(d&&d.hasAttribute("formAction")){if(c=d,x=d[Ft]||null)w=x.formAction;else if(qc(c)!==null)continue}else w=x.action;typeof w=="function"?a[u+1]=w:(a.splice(u,3),u-=3),og(a)}}}function cg(){function e(d){d.canIntercept&&d.info==="react-transition"&&d.intercept({handler:function(){return new Promise(function(x){return c=x})},focusReset:"manual",scroll:"manual"})}function n(){c!==null&&(c(),c=null),u||setTimeout(a,20)}function a(){if(!u&&!navigation.transition){var d=navigation.currentEntry;d&&d.url!=null&&navigation.navigate(d.url,{state:d.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var u=!1,c=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(a,100),function(){u=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),c!==null&&(c(),c=null)}}}function Ic(e){this._internalRoot=e}Qu.prototype.render=Ic.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(r(409));var a=n.current,u=on();tg(a,u,e,n,null,null)},Qu.prototype.unmount=Ic.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;tg(e.current,2,null,e,null,null),Cu(),n[_a]=null}};function Qu(e){this._internalRoot=e}Qu.prototype.unstable_scheduleHydration=function(e){if(e){var n=vd();e={blockedOn:null,target:e,priority:n};for(var a=0;a<ql.length&&n!==0&&n<ql[a].priority;a++);ql.splice(a,0,e),a===0&&ug(e)}};var fg=l.version;if(fg!=="19.2.7")throw Error(r(527,fg,"19.2.7"));X.findDOMNode=function(e){var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=m(n),e=e!==null?b(e):null,e=e===null?null:e.stateNode,e};var Eb={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:T,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Gu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Gu.isDisabled&&Gu.supportsFiber)try{Ut=Gu.inject(Eb),_t=Gu}catch{}}return hr.createRoot=function(e,n){if(!s(e))throw Error(r(299));var a=!1,u="",c=xm,d=bm,x=vm;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(u=n.identifierPrefix),n.onUncaughtError!==void 0&&(c=n.onUncaughtError),n.onCaughtError!==void 0&&(d=n.onCaughtError),n.onRecoverableError!==void 0&&(x=n.onRecoverableError)),n=Wp(e,1,!1,null,null,a,u,null,c,d,x,cg),e[_a]=n.current,Sc(e),new Ic(n)},hr.hydrateRoot=function(e,n,a){if(!s(e))throw Error(r(299));var u=!1,c="",d=xm,x=bm,w=vm,C=null;return a!=null&&(a.unstable_strictMode===!0&&(u=!0),a.identifierPrefix!==void 0&&(c=a.identifierPrefix),a.onUncaughtError!==void 0&&(d=a.onUncaughtError),a.onCaughtError!==void 0&&(x=a.onCaughtError),a.onRecoverableError!==void 0&&(w=a.onRecoverableError),a.formState!==void 0&&(C=a.formState)),n=Wp(e,1,!0,n,a??null,u,c,C,d,x,w,cg),n.context=eg(null),a=n.current,u=on(),u=Ds(u),c=El(u),c.callback=null,Cl(a,c,u),a=u,n.current.lanes=a,wi(n,a),On(n),e[_a]=n.current,Sc(e),new Qu(n)},hr.version="19.2.7",hr}var kg;function Rb(){if(kg)return Fc.exports;kg=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(l){console.error(l)}}return t(),Fc.exports=Mb(),Fc.exports}var Lb=Rb();const Ny=new Map,Jc=new Map;function yf(t){return Ny.get(t)??null}function Bb(t,l){l.models.length!==0&&Ny.set(t,l)}function Ub(t,l){const i=yf(t);if(i)return Promise.resolve(i);const r=Jc.get(t);if(r)return r;const s=l().then(o=>(Bb(t,o),o)).finally(()=>Jc.delete(t));return Jc.set(t,s),s}const ot="";async function Ty(t){const l=await t.text();try{const i=JSON.parse(l),r=i.error??i.message;if(typeof r=="string"&&r.trim())return r.replace(/^Error:\s*/i,"")}catch{}return l}async function wg(){const t=await fetch(`${ot}/api/snapshot`);if(!t.ok)throw new Error("Failed to fetch snapshot");return t.json()}async function di(t){const l=await fetch(`${ot}/api/runs/${t}`);if(!l.ok)throw new Error("Not found");return l.json()}async function Hb(){const t=await fetch(`${ot}/api/intake/linear`);if(!t.ok)throw new Error(await t.text());return(await t.json()).candidates??[]}async function es(){const t=await fetch(`${ot}/api/intake/linear/status`);if(!t.ok)throw new Error(await t.text());return t.json()}async function qf(){const t=await fetch(`${ot}/api/intake/linear/config`);if(!t.ok)throw new Error(await t.text());return t.json()}async function qb(t){const l=await fetch(`${ot}/api/intake/linear/config`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!l.ok)throw new Error(await l.text());return l.json()}async function Vb(t,l){const i=await fetch(`${ot}/api/intake/linear/${t}/promote`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)});if(!i.ok)throw new Error(await i.text());return i.json()}async function Ib(t){const l=await fetch(`${ot}/api/agents`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!l.ok)throw new Error(await l.text());return l.json()}async function Yb(t,l){const i=await fetch(`${ot}/api/agents/${t}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)});if(!i.ok)throw new Error(await i.text());return i.json()}async function Zb(t){const l=await fetch(`${ot}/api/agents/${t}`,{method:"DELETE"});if(!l.ok)throw new Error(await l.text())}async function Vf(t){const l=await fetch(`${ot}/api/runs/${t}/cancel`,{method:"POST"});if(!l.ok)throw new Error(await l.text());return l.json()}async function Fb(t){const l=await fetch(`${ot}/api/runs`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!l.ok)throw new Error(await l.text());return l.json()}async function Kc(t,l,i,r){const s=await fetch(`${ot}/api/runs/${t}/plan`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({planMarkdown:l,approve:i,...(r==null?void 0:r.planModel)!==void 0?{planModel:r.planModel}:{},...(r==null?void 0:r.executeModel)!==void 0?{executeModel:r.executeModel}:{},...(r==null?void 0:r.planBudget)!==void 0?{planBudget:r.planBudget}:{},...(r==null?void 0:r.executeBudget)!==void 0?{executeBudget:r.executeBudget}:{}})});if(!s.ok)throw new Error(await s.text());return s.json()}async function Qb(t,l,i,r){const s=await fetch(`${ot}/api/runs/${t}/draft-plan`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...l!==void 0?{planModel:l}:{},...i!==void 0?{planBudget:i}:{},...(r==null?void 0:r.feedback)!==void 0?{feedback:r.feedback}:{},...(r==null?void 0:r.editedMarkdown)!==void 0?{editedMarkdown:r.editedMarkdown}:{}})});if(!s.ok)throw new Error(await s.text());return s.json()}async function Gb(t,l,i){const r=await fetch(`${ot}/api/runs/${t}/kick`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...l!=null&&l.trim()?{executeModel:l.trim()}:{},...i!==void 0?{executeBudget:i}:{}})});if(!r.ok)throw new Error(await r.text());return r.json()}async function Xb(t,l,i){const r=await fetch(`${ot}/api/runs/${t}/plan/answers`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({answers:l,...(i==null?void 0:i.executeModel)!==void 0?{executeModel:i.executeModel}:{},...(i==null?void 0:i.executeBudget)!==void 0?{executeBudget:i.executeBudget}:{}})});if(!r.ok)throw new Error(await r.text());return r.json()}async function Jb(t){const l=await fetch(`${ot}/api/runs/${t}/approve`,{method:"POST"});if(!l.ok)throw new Error(await Ty(l));return l.json()}async function Dy(t,l){const i=await fetch(`${ot}/api/runs/${t}/qa`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({question:l})});if(!i.ok)throw new Error(await Ty(i));return i.json()}async function Kb(t,l,i,r){const s=await fetch(`${ot}/api/runs/${t}/retry`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({feedback:l,...i!==void 0?{executeModel:i}:{},...r!==void 0?{executeBudget:r}:{}})});if(!s.ok)throw new Error(await s.text());return s.json()}async function $b(t,l){return Ub(t,async()=>{const r=await fetch(`${ot}/api/runtimes/${t}/models`);if(!r.ok)throw new Error(await r.text());return r.json()})}async function Pb(){const t=await fetch(`${ot}/api/agent-deck/status`);if(!t.ok)throw new Error(await t.text());return t.json()}async function Wb(){return(await(await fetch(`${ot}/api/agent-deck/decks`)).json()).data??[]}async function ev(t){return(await(await fetch(`${ot}/api/agent-deck/decks/${t}/playbooks`)).json()).data??[]}function tv(t){const l=new EventSource(`${ot}/api/events`);return l.onmessage=i=>{try{t(JSON.parse(i.data))}catch{}},l.onerror=()=>{l.close()},()=>l.close()}async function nv(t,l="transcript"){const i=await fetch(`${ot}/api/runs/${t}/log-tail?kind=${l}`);if(!i.ok)throw new Error(await i.text());return(await i.json()).content}function ol(t){if(!t.contentJson)return null;try{return JSON.parse(t.contentJson)}catch{return null}}function ts(t){if(!t.contentJson)return t.blobPath??"";try{const l=JSON.parse(t.contentJson);return l.markdown??l.resultText??l.excerpt??t.contentJson}catch{return t.contentJson}}function qt(t,l){return[...t].reverse().find(i=>i.kind===l)}function lv(t){var i;const l=qt(t,"task_snapshot");if(!(l!=null&&l.contentJson))return null;try{const s=(i=JSON.parse(l.contentJson).url)==null?void 0:i.trim();return s!=null&&s.startsWith("http")?s:null}catch{return null}}function zy(t,l,i){const r=t.filter(o=>o.kind===l);for(let o=r.length-1;o>=0;o--){const f=ol(r[o]);if(f&&f.phase===i)return f}const s=r[r.length-1];return s?ol(s):null}function ns(t,l=Date.now()){const i=l-new Date(t).getTime();if(i<0)return"just now";const r=Math.floor(i/1e3);if(r<60)return"just now";const s=Math.floor(r/60);if(s<60)return`${s}m ago`;const o=Math.floor(s/60);if(o<24)return`${o}h ago`;const f=Math.floor(o/24);return f<7?`${f}d ago`:new Date(t).toLocaleDateString(void 0,{month:"short",day:"numeric"})}function Oy(t){if(t<1e3)return`${Math.round(t)}ms`;const l=Math.round(t/1e3),i=Math.floor(l/60),r=l%60;if(i>=60){const s=Math.floor(i/60),o=i%60;return o>0?`${s}h ${o}m`:`${s}h`}return i>0?r>0?`${i}m ${r}s`:`${i}m`:`${r}s`}function ga(t){return t==="claude_code"?"Claude":t==="cursor_local"?"Cursor":"No agent"}function vs(t){return t==="claude_code"?"bg-[#D4A574]/20 text-[#E8C9A8] border-[#D4A574]/40":t==="cursor_local"?"bg-[#7EB8FF]/15 text-[#A8D4FF] border-[#7EB8FF]/35":"bg-white/5 text-white/50 border-white/15"}function If(t){return{code:"Code",communication:"Slack",email:"Email",research:"Research",content:"Content",other:"Other"}[t]??t}function ls(t){return t.source==="linear"&&t.externalLabel?t.externalLabel:t.source==="linear"&&t.externalId?t.externalId:t.source==="linear"?"Linear":"Manual"}function My(t,l){switch(t){case"plan_pending":return{label:"Planning",hint:"Agent is writing the plan",tone:"bg-cyber-violet/15 text-cyber-violet-light border-cyber-violet/35",accent:"border-l-cyber-violet"};case"plan_approved":return{label:"Queued",hint:"Approved — waiting for slot",tone:"bg-sky-500/15 text-sky-200 border-sky-400/30",accent:"border-l-sky-400"};case"queued":return{label:"Queued",tone:"bg-sky-500/15 text-sky-200 border-sky-400/30",accent:"border-l-sky-400"};case"running":return{label:"Running",hint:"Agent executing",tone:"bg-[#92E4DD]/15 text-[#92E4DD] border-[#92E4DD]/35",accent:"border-l-[#92E4DD]"};case"review":return{label:"Needs Review",hint:"Your sign-off required",tone:"bg-[#C4B643]/20 text-[#E8DC7A] border-[#C4B643]/40",accent:"border-l-[#C4B643]"};case"done":return{label:"Done",tone:"bg-emerald-500/10 text-emerald-300/90 border-emerald-400/25",accent:"border-l-emerald-400/60"};case"failed":return{label:"Failed",hint:"Retry from result review",tone:"bg-red-500/15 text-red-300 border-red-400/30",accent:"border-l-red-400"};case"cancelled":return{label:"Removed",hint:"Dismissed from Operations",tone:"bg-white/5 text-white/40 border-white/10",accent:"border-l-white/20"};default:return{label:t,tone:"bg-white/5 text-white/60 border-white/15",accent:"border-l-white/20"}}}function Yf(t){return t.deckName?t.deckName:t.deckId?`deck ${t.deckId.slice(0,8)}…`:null}function st({children:t,className:l="",title:i}){return g.jsx("span",{title:i,className:`inline-flex items-center gap-1 rounded px-2 py-0.5 text-xs font-medium uppercase tracking-wide border ${l}`,children:t})}function Ry({index:t,total:l,onPrev:i,onNext:r,label:s="In Queue"}){return l<=1?null:g.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[g.jsx("span",{className:"text-xs uppercase tracking-wide text-white/45 hidden sm:inline",children:s}),g.jsx("button",{type:"button",onClick:i,disabled:t<=0,className:"btn-ghost px-2.5 py-1.5 disabled:opacity-30",title:"Previous","aria-label":"Previous in queue",children:"←"}),g.jsxs("span",{className:"text-sm tabular-nums text-white/60 min-w-[3.5rem] text-center",children:[t+1," / ",l]}),g.jsx("button",{type:"button",onClick:r,disabled:t>=l-1,className:"btn-ghost px-2.5 py-1.5 disabled:opacity-30",title:"Next","aria-label":"Next in queue",children:"→"})]})}var Ie;(function(t){t.assertEqual=s=>{};function l(s){}t.assertIs=l;function i(s){throw new Error}t.assertNever=i,t.arrayToEnum=s=>{const o={};for(const f of s)o[f]=f;return o},t.getValidEnumValues=s=>{const o=t.objectKeys(s).filter(h=>typeof s[s[h]]!="number"),f={};for(const h of o)f[h]=s[h];return t.objectValues(f)},t.objectValues=s=>t.objectKeys(s).map(function(o){return s[o]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const o=[];for(const f in s)Object.prototype.hasOwnProperty.call(s,f)&&o.push(f);return o},t.find=(s,o)=>{for(const f of s)if(o(f))return f},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function r(s,o=" | "){return s.map(f=>typeof f=="string"?`'${f}'`:f).join(o)}t.joinValues=r,t.jsonStringifyReplacer=(s,o)=>typeof o=="bigint"?o.toString():o})(Ie||(Ie={}));var Sg;(function(t){t.mergeShapes=(l,i)=>({...l,...i})})(Sg||(Sg={}));const he=Ie.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Yl=t=>{switch(typeof t){case"undefined":return he.undefined;case"string":return he.string;case"number":return Number.isNaN(t)?he.nan:he.number;case"boolean":return he.boolean;case"function":return he.function;case"bigint":return he.bigint;case"symbol":return he.symbol;case"object":return Array.isArray(t)?he.array:t===null?he.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?he.promise:typeof Map<"u"&&t instanceof Map?he.map:typeof Set<"u"&&t instanceof Set?he.set:typeof Date<"u"&&t instanceof Date?he.date:he.object;default:return he.unknown}},ae=Ie.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 cl extends Error{get errors(){return this.issues}constructor(l){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const i=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,i):this.__proto__=i,this.name="ZodError",this.issues=l}format(l){const i=l||function(o){return o.message},r={_errors:[]},s=o=>{for(const f of o.issues)if(f.code==="invalid_union")f.unionErrors.map(s);else if(f.code==="invalid_return_type")s(f.returnTypeError);else if(f.code==="invalid_arguments")s(f.argumentsError);else if(f.path.length===0)r._errors.push(i(f));else{let h=r,p=0;for(;p<f.path.length;){const m=f.path[p];p===f.path.length-1?(h[m]=h[m]||{_errors:[]},h[m]._errors.push(i(f))):h[m]=h[m]||{_errors:[]},h=h[m],p++}}};return s(this),r}static assert(l){if(!(l instanceof cl))throw new Error(`Not a ZodError: ${l}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ie.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(l=i=>i.message){const i={},r=[];for(const s of this.issues)if(s.path.length>0){const o=s.path[0];i[o]=i[o]||[],i[o].push(l(s))}else r.push(l(s));return{formErrors:r,fieldErrors:i}}get formErrors(){return this.flatten()}}cl.create=t=>new cl(t);const xf=(t,l)=>{let i;switch(t.code){case ae.invalid_type:t.received===he.undefined?i="Required":i=`Expected ${t.expected}, received ${t.received}`;break;case ae.invalid_literal:i=`Invalid literal value, expected ${JSON.stringify(t.expected,Ie.jsonStringifyReplacer)}`;break;case ae.unrecognized_keys:i=`Unrecognized key(s) in object: ${Ie.joinValues(t.keys,", ")}`;break;case ae.invalid_union:i="Invalid input";break;case ae.invalid_union_discriminator:i=`Invalid discriminator value. Expected ${Ie.joinValues(t.options)}`;break;case ae.invalid_enum_value:i=`Invalid enum value. Expected ${Ie.joinValues(t.options)}, received '${t.received}'`;break;case ae.invalid_arguments:i="Invalid function arguments";break;case ae.invalid_return_type:i="Invalid function return type";break;case ae.invalid_date:i="Invalid date";break;case ae.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(i=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(i=`${i} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?i=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?i=`Invalid input: must end with "${t.validation.endsWith}"`:Ie.assertNever(t.validation):t.validation!=="regex"?i=`Invalid ${t.validation}`:i="Invalid";break;case ae.too_small:t.type==="array"?i=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?i=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?i=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?i=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?i=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:i="Invalid input";break;case ae.too_big:t.type==="array"?i=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?i=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?i=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?i=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?i=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:i="Invalid input";break;case ae.custom:i="Invalid input";break;case ae.invalid_intersection_types:i="Intersection results could not be merged";break;case ae.not_multiple_of:i=`Number must be a multiple of ${t.multipleOf}`;break;case ae.not_finite:i="Number must be finite";break;default:i=l.defaultError,Ie.assertNever(t)}return{message:i}};let av=xf;function iv(){return av}const rv=t=>{const{data:l,path:i,errorMaps:r,issueData:s}=t,o=[...i,...s.path||[]],f={...s,path:o};if(s.message!==void 0)return{...s,path:o,message:s.message};let h="";const p=r.filter(m=>!!m).slice().reverse();for(const m of p)h=m(f,{data:l,defaultError:h}).message;return{...s,path:o,message:h}};function ce(t,l){const i=iv(),r=rv({issueData:l,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,i,i===xf?void 0:xf].filter(s=>!!s)});t.common.issues.push(r)}class Yt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(l,i){const r=[];for(const s of i){if(s.status==="aborted")return _e;s.status==="dirty"&&l.dirty(),r.push(s.value)}return{status:l.value,value:r}}static async mergeObjectAsync(l,i){const r=[];for(const s of i){const o=await s.key,f=await s.value;r.push({key:o,value:f})}return Yt.mergeObjectSync(l,r)}static mergeObjectSync(l,i){const r={};for(const s of i){const{key:o,value:f}=s;if(o.status==="aborted"||f.status==="aborted")return _e;o.status==="dirty"&&l.dirty(),f.status==="dirty"&&l.dirty(),o.value!=="__proto__"&&(typeof f.value<"u"||s.alwaysSet)&&(r[o.value]=f.value)}return{status:l.value,value:r}}}const _e=Object.freeze({status:"aborted"}),xr=t=>({status:"dirty",value:t}),Sn=t=>({status:"valid",value:t}),_g=t=>t.status==="aborted",Eg=t=>t.status==="dirty",hi=t=>t.status==="valid",as=t=>typeof Promise<"u"&&t instanceof Promise;var ye;(function(t){t.errToObj=l=>typeof l=="string"?{message:l}:l||{},t.toString=l=>typeof l=="string"?l:l==null?void 0:l.message})(ye||(ye={}));class Ln{constructor(l,i,r,s){this._cachedPath=[],this.parent=l,this.data=i,this._path=r,this._key=s}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 Cg=(t,l)=>{if(hi(l))return{success:!0,data:l.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const i=new cl(t.common.issues);return this._error=i,this._error}}};function ze(t){if(!t)return{};const{errorMap:l,invalid_type_error:i,required_error:r,description:s}=t;if(l&&(i||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return l?{errorMap:l,description:s}:{errorMap:(f,h)=>{const{message:p}=t;return f.code==="invalid_enum_value"?{message:p??h.defaultError}:typeof h.data>"u"?{message:p??r??h.defaultError}:f.code!=="invalid_type"?{message:h.defaultError}:{message:p??i??h.defaultError}},description:s}}class Ue{get description(){return this._def.description}_getType(l){return Yl(l.data)}_getOrReturnCtx(l,i){return i||{common:l.parent.common,data:l.data,parsedType:Yl(l.data),schemaErrorMap:this._def.errorMap,path:l.path,parent:l.parent}}_processInputParams(l){return{status:new Yt,ctx:{common:l.parent.common,data:l.data,parsedType:Yl(l.data),schemaErrorMap:this._def.errorMap,path:l.path,parent:l.parent}}}_parseSync(l){const i=this._parse(l);if(as(i))throw new Error("Synchronous parse encountered promise.");return i}_parseAsync(l){const i=this._parse(l);return Promise.resolve(i)}parse(l,i){const r=this.safeParse(l,i);if(r.success)return r.data;throw r.error}safeParse(l,i){const r={common:{issues:[],async:(i==null?void 0:i.async)??!1,contextualErrorMap:i==null?void 0:i.errorMap},path:(i==null?void 0:i.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:l,parsedType:Yl(l)},s=this._parseSync({data:l,path:r.path,parent:r});return Cg(r,s)}"~validate"(l){var r,s;const i={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:l,parsedType:Yl(l)};if(!this["~standard"].async)try{const o=this._parseSync({data:l,path:[],parent:i});return hi(o)?{value:o.value}:{issues:i.common.issues}}catch(o){(s=(r=o==null?void 0:o.message)==null?void 0:r.toLowerCase())!=null&&s.includes("encountered")&&(this["~standard"].async=!0),i.common={issues:[],async:!0}}return this._parseAsync({data:l,path:[],parent:i}).then(o=>hi(o)?{value:o.value}:{issues:i.common.issues})}async parseAsync(l,i){const r=await this.safeParseAsync(l,i);if(r.success)return r.data;throw r.error}async safeParseAsync(l,i){const r={common:{issues:[],contextualErrorMap:i==null?void 0:i.errorMap,async:!0},path:(i==null?void 0:i.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:l,parsedType:Yl(l)},s=this._parse({data:l,path:r.path,parent:r}),o=await(as(s)?s:Promise.resolve(s));return Cg(r,o)}refine(l,i){const r=s=>typeof i=="string"||typeof i>"u"?{message:i}:typeof i=="function"?i(s):i;return this._refinement((s,o)=>{const f=l(s),h=()=>o.addIssue({code:ae.custom,...r(s)});return typeof Promise<"u"&&f instanceof Promise?f.then(p=>p?!0:(h(),!1)):f?!0:(h(),!1)})}refinement(l,i){return this._refinement((r,s)=>l(r)?!0:(s.addIssue(typeof i=="function"?i(r,s):i),!1))}_refinement(l){return new ba({schema:this,typeName:Ee.ZodEffects,effect:{type:"refinement",refinement:l}})}superRefine(l){return this._refinement(l)}constructor(l){this.spa=this.safeParseAsync,this._def=l,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:i=>this["~validate"](i)}}optional(){return sl.create(this,this._def)}nullable(){return va.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Rn.create(this)}promise(){return cs.create(this,this._def)}or(l){return rs.create([this,l],this._def)}and(l){return us.create(this,l,this._def)}transform(l){return new ba({...ze(this._def),schema:this,typeName:Ee.ZodEffects,effect:{type:"transform",transform:l}})}default(l){const i=typeof l=="function"?l:()=>l;return new fs({...ze(this._def),innerType:this,defaultValue:i,typeName:Ee.ZodDefault})}brand(){return new Hy({typeName:Ee.ZodBranded,type:this,...ze(this._def)})}catch(l){const i=typeof l=="function"?l:()=>l;return new ds({...ze(this._def),innerType:this,catchValue:i,typeName:Ee.ZodCatch})}describe(l){const i=this.constructor;return new i({...this._def,description:l})}pipe(l){return Ff.create(this,l)}readonly(){return hs.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const uv=/^c[^\s-]{8,}$/i,sv=/^[0-9a-z]+$/,ov=/^[0-9A-HJKMNP-TV-Z]{26}$/i,cv=/^[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,fv=/^[a-z0-9_-]{21}$/i,dv=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,hv=/^[-+]?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)?)??$/,mv=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,pv="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let $c;const gv=/^(?:(?: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])$/,yv=/^(?:(?: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])$/,xv=/^(([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]))$/,bv=/^(([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])$/,vv=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,kv=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Ly="((\\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])))",wv=new RegExp(`^${Ly}$`);function By(t){let l="[0-5]\\d";t.precision?l=`${l}\\.\\d{${t.precision}}`:t.precision==null&&(l=`${l}(\\.\\d+)?`);const i=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${l})${i}`}function Sv(t){return new RegExp(`^${By(t)}$`)}function _v(t){let l=`${Ly}T${By(t)}`;const i=[];return i.push(t.local?"Z?":"Z"),t.offset&&i.push("([+-]\\d{2}:?\\d{2})"),l=`${l}(${i.join("|")})`,new RegExp(`^${l}$`)}function Ev(t,l){return!!((l==="v4"||!l)&&gv.test(t)||(l==="v6"||!l)&&xv.test(t))}function Cv(t,l){if(!dv.test(t))return!1;try{const[i]=t.split(".");if(!i)return!1;const r=i.replace(/-/g,"+").replace(/_/g,"/").padEnd(i.length+(4-i.length%4)%4,"="),s=JSON.parse(atob(r));return!(typeof s!="object"||s===null||"typ"in s&&(s==null?void 0:s.typ)!=="JWT"||!s.alg||l&&s.alg!==l)}catch{return!1}}function Av(t,l){return!!((l==="v4"||!l)&&yv.test(t)||(l==="v6"||!l)&&bv.test(t))}class ul extends Ue{_parse(l){if(this._def.coerce&&(l.data=String(l.data)),this._getType(l)!==he.string){const o=this._getOrReturnCtx(l);return ce(o,{code:ae.invalid_type,expected:he.string,received:o.parsedType}),_e}const r=new Yt;let s;for(const o of this._def.checks)if(o.kind==="min")l.data.length<o.value&&(s=this._getOrReturnCtx(l,s),ce(s,{code:ae.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="max")l.data.length>o.value&&(s=this._getOrReturnCtx(l,s),ce(s,{code:ae.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){const f=l.data.length>o.value,h=l.data.length<o.value;(f||h)&&(s=this._getOrReturnCtx(l,s),f?ce(s,{code:ae.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):h&&ce(s,{code:ae.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),r.dirty())}else if(o.kind==="email")mv.test(l.data)||(s=this._getOrReturnCtx(l,s),ce(s,{validation:"email",code:ae.invalid_string,message:o.message}),r.dirty());else if(o.kind==="emoji")$c||($c=new RegExp(pv,"u")),$c.test(l.data)||(s=this._getOrReturnCtx(l,s),ce(s,{validation:"emoji",code:ae.invalid_string,message:o.message}),r.dirty());else if(o.kind==="uuid")cv.test(l.data)||(s=this._getOrReturnCtx(l,s),ce(s,{validation:"uuid",code:ae.invalid_string,message:o.message}),r.dirty());else if(o.kind==="nanoid")fv.test(l.data)||(s=this._getOrReturnCtx(l,s),ce(s,{validation:"nanoid",code:ae.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid")uv.test(l.data)||(s=this._getOrReturnCtx(l,s),ce(s,{validation:"cuid",code:ae.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid2")sv.test(l.data)||(s=this._getOrReturnCtx(l,s),ce(s,{validation:"cuid2",code:ae.invalid_string,message:o.message}),r.dirty());else if(o.kind==="ulid")ov.test(l.data)||(s=this._getOrReturnCtx(l,s),ce(s,{validation:"ulid",code:ae.invalid_string,message:o.message}),r.dirty());else if(o.kind==="url")try{new URL(l.data)}catch{s=this._getOrReturnCtx(l,s),ce(s,{validation:"url",code:ae.invalid_string,message:o.message}),r.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(l.data)||(s=this._getOrReturnCtx(l,s),ce(s,{validation:"regex",code:ae.invalid_string,message:o.message}),r.dirty())):o.kind==="trim"?l.data=l.data.trim():o.kind==="includes"?l.data.includes(o.value,o.position)||(s=this._getOrReturnCtx(l,s),ce(s,{code:ae.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),r.dirty()):o.kind==="toLowerCase"?l.data=l.data.toLowerCase():o.kind==="toUpperCase"?l.data=l.data.toUpperCase():o.kind==="startsWith"?l.data.startsWith(o.value)||(s=this._getOrReturnCtx(l,s),ce(s,{code:ae.invalid_string,validation:{startsWith:o.value},message:o.message}),r.dirty()):o.kind==="endsWith"?l.data.endsWith(o.value)||(s=this._getOrReturnCtx(l,s),ce(s,{code:ae.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty()):o.kind==="datetime"?_v(o).test(l.data)||(s=this._getOrReturnCtx(l,s),ce(s,{code:ae.invalid_string,validation:"datetime",message:o.message}),r.dirty()):o.kind==="date"?wv.test(l.data)||(s=this._getOrReturnCtx(l,s),ce(s,{code:ae.invalid_string,validation:"date",message:o.message}),r.dirty()):o.kind==="time"?Sv(o).test(l.data)||(s=this._getOrReturnCtx(l,s),ce(s,{code:ae.invalid_string,validation:"time",message:o.message}),r.dirty()):o.kind==="duration"?hv.test(l.data)||(s=this._getOrReturnCtx(l,s),ce(s,{validation:"duration",code:ae.invalid_string,message:o.message}),r.dirty()):o.kind==="ip"?Ev(l.data,o.version)||(s=this._getOrReturnCtx(l,s),ce(s,{validation:"ip",code:ae.invalid_string,message:o.message}),r.dirty()):o.kind==="jwt"?Cv(l.data,o.alg)||(s=this._getOrReturnCtx(l,s),ce(s,{validation:"jwt",code:ae.invalid_string,message:o.message}),r.dirty()):o.kind==="cidr"?Av(l.data,o.version)||(s=this._getOrReturnCtx(l,s),ce(s,{validation:"cidr",code:ae.invalid_string,message:o.message}),r.dirty()):o.kind==="base64"?vv.test(l.data)||(s=this._getOrReturnCtx(l,s),ce(s,{validation:"base64",code:ae.invalid_string,message:o.message}),r.dirty()):o.kind==="base64url"?kv.test(l.data)||(s=this._getOrReturnCtx(l,s),ce(s,{validation:"base64url",code:ae.invalid_string,message:o.message}),r.dirty()):Ie.assertNever(o);return{status:r.value,value:l.data}}_regex(l,i,r){return this.refinement(s=>l.test(s),{validation:i,code:ae.invalid_string,...ye.errToObj(r)})}_addCheck(l){return new ul({...this._def,checks:[...this._def.checks,l]})}email(l){return this._addCheck({kind:"email",...ye.errToObj(l)})}url(l){return this._addCheck({kind:"url",...ye.errToObj(l)})}emoji(l){return this._addCheck({kind:"emoji",...ye.errToObj(l)})}uuid(l){return this._addCheck({kind:"uuid",...ye.errToObj(l)})}nanoid(l){return this._addCheck({kind:"nanoid",...ye.errToObj(l)})}cuid(l){return this._addCheck({kind:"cuid",...ye.errToObj(l)})}cuid2(l){return this._addCheck({kind:"cuid2",...ye.errToObj(l)})}ulid(l){return this._addCheck({kind:"ulid",...ye.errToObj(l)})}base64(l){return this._addCheck({kind:"base64",...ye.errToObj(l)})}base64url(l){return this._addCheck({kind:"base64url",...ye.errToObj(l)})}jwt(l){return this._addCheck({kind:"jwt",...ye.errToObj(l)})}ip(l){return this._addCheck({kind:"ip",...ye.errToObj(l)})}cidr(l){return this._addCheck({kind:"cidr",...ye.errToObj(l)})}datetime(l){return typeof l=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:l}):this._addCheck({kind:"datetime",precision:typeof(l==null?void 0:l.precision)>"u"?null:l==null?void 0:l.precision,offset:(l==null?void 0:l.offset)??!1,local:(l==null?void 0:l.local)??!1,...ye.errToObj(l==null?void 0:l.message)})}date(l){return this._addCheck({kind:"date",message:l})}time(l){return typeof l=="string"?this._addCheck({kind:"time",precision:null,message:l}):this._addCheck({kind:"time",precision:typeof(l==null?void 0:l.precision)>"u"?null:l==null?void 0:l.precision,...ye.errToObj(l==null?void 0:l.message)})}duration(l){return this._addCheck({kind:"duration",...ye.errToObj(l)})}regex(l,i){return this._addCheck({kind:"regex",regex:l,...ye.errToObj(i)})}includes(l,i){return this._addCheck({kind:"includes",value:l,position:i==null?void 0:i.position,...ye.errToObj(i==null?void 0:i.message)})}startsWith(l,i){return this._addCheck({kind:"startsWith",value:l,...ye.errToObj(i)})}endsWith(l,i){return this._addCheck({kind:"endsWith",value:l,...ye.errToObj(i)})}min(l,i){return this._addCheck({kind:"min",value:l,...ye.errToObj(i)})}max(l,i){return this._addCheck({kind:"max",value:l,...ye.errToObj(i)})}length(l,i){return this._addCheck({kind:"length",value:l,...ye.errToObj(i)})}nonempty(l){return this.min(1,ye.errToObj(l))}trim(){return new ul({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ul({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ul({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(l=>l.kind==="datetime")}get isDate(){return!!this._def.checks.find(l=>l.kind==="date")}get isTime(){return!!this._def.checks.find(l=>l.kind==="time")}get isDuration(){return!!this._def.checks.find(l=>l.kind==="duration")}get isEmail(){return!!this._def.checks.find(l=>l.kind==="email")}get isURL(){return!!this._def.checks.find(l=>l.kind==="url")}get isEmoji(){return!!this._def.checks.find(l=>l.kind==="emoji")}get isUUID(){return!!this._def.checks.find(l=>l.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(l=>l.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(l=>l.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(l=>l.kind==="cuid2")}get isULID(){return!!this._def.checks.find(l=>l.kind==="ulid")}get isIP(){return!!this._def.checks.find(l=>l.kind==="ip")}get isCIDR(){return!!this._def.checks.find(l=>l.kind==="cidr")}get isBase64(){return!!this._def.checks.find(l=>l.kind==="base64")}get isBase64url(){return!!this._def.checks.find(l=>l.kind==="base64url")}get minLength(){let l=null;for(const i of this._def.checks)i.kind==="min"&&(l===null||i.value>l)&&(l=i.value);return l}get maxLength(){let l=null;for(const i of this._def.checks)i.kind==="max"&&(l===null||i.value<l)&&(l=i.value);return l}}ul.create=t=>new ul({checks:[],typeName:Ee.ZodString,coerce:(t==null?void 0:t.coerce)??!1,...ze(t)});function jv(t,l){const i=(t.toString().split(".")[1]||"").length,r=(l.toString().split(".")[1]||"").length,s=i>r?i:r,o=Number.parseInt(t.toFixed(s).replace(".","")),f=Number.parseInt(l.toFixed(s).replace(".",""));return o%f/10**s}class mi extends Ue{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(l){if(this._def.coerce&&(l.data=Number(l.data)),this._getType(l)!==he.number){const o=this._getOrReturnCtx(l);return ce(o,{code:ae.invalid_type,expected:he.number,received:o.parsedType}),_e}let r;const s=new Yt;for(const o of this._def.checks)o.kind==="int"?Ie.isInteger(l.data)||(r=this._getOrReturnCtx(l,r),ce(r,{code:ae.invalid_type,expected:"integer",received:"float",message:o.message}),s.dirty()):o.kind==="min"?(o.inclusive?l.data<o.value:l.data<=o.value)&&(r=this._getOrReturnCtx(l,r),ce(r,{code:ae.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?l.data>o.value:l.data>=o.value)&&(r=this._getOrReturnCtx(l,r),ce(r,{code:ae.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="multipleOf"?jv(l.data,o.value)!==0&&(r=this._getOrReturnCtx(l,r),ce(r,{code:ae.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):o.kind==="finite"?Number.isFinite(l.data)||(r=this._getOrReturnCtx(l,r),ce(r,{code:ae.not_finite,message:o.message}),s.dirty()):Ie.assertNever(o);return{status:s.value,value:l.data}}gte(l,i){return this.setLimit("min",l,!0,ye.toString(i))}gt(l,i){return this.setLimit("min",l,!1,ye.toString(i))}lte(l,i){return this.setLimit("max",l,!0,ye.toString(i))}lt(l,i){return this.setLimit("max",l,!1,ye.toString(i))}setLimit(l,i,r,s){return new mi({...this._def,checks:[...this._def.checks,{kind:l,value:i,inclusive:r,message:ye.toString(s)}]})}_addCheck(l){return new mi({...this._def,checks:[...this._def.checks,l]})}int(l){return this._addCheck({kind:"int",message:ye.toString(l)})}positive(l){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ye.toString(l)})}negative(l){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ye.toString(l)})}nonpositive(l){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ye.toString(l)})}nonnegative(l){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ye.toString(l)})}multipleOf(l,i){return this._addCheck({kind:"multipleOf",value:l,message:ye.toString(i)})}finite(l){return this._addCheck({kind:"finite",message:ye.toString(l)})}safe(l){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ye.toString(l)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ye.toString(l)})}get minValue(){let l=null;for(const i of this._def.checks)i.kind==="min"&&(l===null||i.value>l)&&(l=i.value);return l}get maxValue(){let l=null;for(const i of this._def.checks)i.kind==="max"&&(l===null||i.value<l)&&(l=i.value);return l}get isInt(){return!!this._def.checks.find(l=>l.kind==="int"||l.kind==="multipleOf"&&Ie.isInteger(l.value))}get isFinite(){let l=null,i=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(i===null||r.value>i)&&(i=r.value):r.kind==="max"&&(l===null||r.value<l)&&(l=r.value)}return Number.isFinite(i)&&Number.isFinite(l)}}mi.create=t=>new mi({checks:[],typeName:Ee.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...ze(t)});class Sr extends Ue{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(l){if(this._def.coerce)try{l.data=BigInt(l.data)}catch{return this._getInvalidInput(l)}if(this._getType(l)!==he.bigint)return this._getInvalidInput(l);let r;const s=new Yt;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?l.data<o.value:l.data<=o.value)&&(r=this._getOrReturnCtx(l,r),ce(r,{code:ae.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?l.data>o.value:l.data>=o.value)&&(r=this._getOrReturnCtx(l,r),ce(r,{code:ae.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="multipleOf"?l.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(l,r),ce(r,{code:ae.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):Ie.assertNever(o);return{status:s.value,value:l.data}}_getInvalidInput(l){const i=this._getOrReturnCtx(l);return ce(i,{code:ae.invalid_type,expected:he.bigint,received:i.parsedType}),_e}gte(l,i){return this.setLimit("min",l,!0,ye.toString(i))}gt(l,i){return this.setLimit("min",l,!1,ye.toString(i))}lte(l,i){return this.setLimit("max",l,!0,ye.toString(i))}lt(l,i){return this.setLimit("max",l,!1,ye.toString(i))}setLimit(l,i,r,s){return new Sr({...this._def,checks:[...this._def.checks,{kind:l,value:i,inclusive:r,message:ye.toString(s)}]})}_addCheck(l){return new Sr({...this._def,checks:[...this._def.checks,l]})}positive(l){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ye.toString(l)})}negative(l){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ye.toString(l)})}nonpositive(l){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ye.toString(l)})}nonnegative(l){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ye.toString(l)})}multipleOf(l,i){return this._addCheck({kind:"multipleOf",value:l,message:ye.toString(i)})}get minValue(){let l=null;for(const i of this._def.checks)i.kind==="min"&&(l===null||i.value>l)&&(l=i.value);return l}get maxValue(){let l=null;for(const i of this._def.checks)i.kind==="max"&&(l===null||i.value<l)&&(l=i.value);return l}}Sr.create=t=>new Sr({checks:[],typeName:Ee.ZodBigInt,coerce:(t==null?void 0:t.coerce)??!1,...ze(t)});class bf extends Ue{_parse(l){if(this._def.coerce&&(l.data=!!l.data),this._getType(l)!==he.boolean){const r=this._getOrReturnCtx(l);return ce(r,{code:ae.invalid_type,expected:he.boolean,received:r.parsedType}),_e}return Sn(l.data)}}bf.create=t=>new bf({typeName:Ee.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...ze(t)});class is extends Ue{_parse(l){if(this._def.coerce&&(l.data=new Date(l.data)),this._getType(l)!==he.date){const o=this._getOrReturnCtx(l);return ce(o,{code:ae.invalid_type,expected:he.date,received:o.parsedType}),_e}if(Number.isNaN(l.data.getTime())){const o=this._getOrReturnCtx(l);return ce(o,{code:ae.invalid_date}),_e}const r=new Yt;let s;for(const o of this._def.checks)o.kind==="min"?l.data.getTime()<o.value&&(s=this._getOrReturnCtx(l,s),ce(s,{code:ae.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),r.dirty()):o.kind==="max"?l.data.getTime()>o.value&&(s=this._getOrReturnCtx(l,s),ce(s,{code:ae.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):Ie.assertNever(o);return{status:r.value,value:new Date(l.data.getTime())}}_addCheck(l){return new is({...this._def,checks:[...this._def.checks,l]})}min(l,i){return this._addCheck({kind:"min",value:l.getTime(),message:ye.toString(i)})}max(l,i){return this._addCheck({kind:"max",value:l.getTime(),message:ye.toString(i)})}get minDate(){let l=null;for(const i of this._def.checks)i.kind==="min"&&(l===null||i.value>l)&&(l=i.value);return l!=null?new Date(l):null}get maxDate(){let l=null;for(const i of this._def.checks)i.kind==="max"&&(l===null||i.value<l)&&(l=i.value);return l!=null?new Date(l):null}}is.create=t=>new is({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:Ee.ZodDate,...ze(t)});class Ag extends Ue{_parse(l){if(this._getType(l)!==he.symbol){const r=this._getOrReturnCtx(l);return ce(r,{code:ae.invalid_type,expected:he.symbol,received:r.parsedType}),_e}return Sn(l.data)}}Ag.create=t=>new Ag({typeName:Ee.ZodSymbol,...ze(t)});class vf extends Ue{_parse(l){if(this._getType(l)!==he.undefined){const r=this._getOrReturnCtx(l);return ce(r,{code:ae.invalid_type,expected:he.undefined,received:r.parsedType}),_e}return Sn(l.data)}}vf.create=t=>new vf({typeName:Ee.ZodUndefined,...ze(t)});class kf extends Ue{_parse(l){if(this._getType(l)!==he.null){const r=this._getOrReturnCtx(l);return ce(r,{code:ae.invalid_type,expected:he.null,received:r.parsedType}),_e}return Sn(l.data)}}kf.create=t=>new kf({typeName:Ee.ZodNull,...ze(t)});class jg extends Ue{constructor(){super(...arguments),this._any=!0}_parse(l){return Sn(l.data)}}jg.create=t=>new jg({typeName:Ee.ZodAny,...ze(t)});class wf extends Ue{constructor(){super(...arguments),this._unknown=!0}_parse(l){return Sn(l.data)}}wf.create=t=>new wf({typeName:Ee.ZodUnknown,...ze(t)});class Fl extends Ue{_parse(l){const i=this._getOrReturnCtx(l);return ce(i,{code:ae.invalid_type,expected:he.never,received:i.parsedType}),_e}}Fl.create=t=>new Fl({typeName:Ee.ZodNever,...ze(t)});class Ng extends Ue{_parse(l){if(this._getType(l)!==he.undefined){const r=this._getOrReturnCtx(l);return ce(r,{code:ae.invalid_type,expected:he.void,received:r.parsedType}),_e}return Sn(l.data)}}Ng.create=t=>new Ng({typeName:Ee.ZodVoid,...ze(t)});class Rn extends Ue{_parse(l){const{ctx:i,status:r}=this._processInputParams(l),s=this._def;if(i.parsedType!==he.array)return ce(i,{code:ae.invalid_type,expected:he.array,received:i.parsedType}),_e;if(s.exactLength!==null){const f=i.data.length>s.exactLength.value,h=i.data.length<s.exactLength.value;(f||h)&&(ce(i,{code:f?ae.too_big:ae.too_small,minimum:h?s.exactLength.value:void 0,maximum:f?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),r.dirty())}if(s.minLength!==null&&i.data.length<s.minLength.value&&(ce(i,{code:ae.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),r.dirty()),s.maxLength!==null&&i.data.length>s.maxLength.value&&(ce(i,{code:ae.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),r.dirty()),i.common.async)return Promise.all([...i.data].map((f,h)=>s.type._parseAsync(new Ln(i,f,i.path,h)))).then(f=>Yt.mergeArray(r,f));const o=[...i.data].map((f,h)=>s.type._parseSync(new Ln(i,f,i.path,h)));return Yt.mergeArray(r,o)}get element(){return this._def.type}min(l,i){return new Rn({...this._def,minLength:{value:l,message:ye.toString(i)}})}max(l,i){return new Rn({...this._def,maxLength:{value:l,message:ye.toString(i)}})}length(l,i){return new Rn({...this._def,exactLength:{value:l,message:ye.toString(i)}})}nonempty(l){return this.min(1,l)}}Rn.create=(t,l)=>new Rn({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Ee.ZodArray,...ze(l)});function oi(t){if(t instanceof kt){const l={};for(const i in t.shape){const r=t.shape[i];l[i]=sl.create(oi(r))}return new kt({...t._def,shape:()=>l})}else return t instanceof Rn?new Rn({...t._def,type:oi(t.element)}):t instanceof sl?sl.create(oi(t.unwrap())):t instanceof va?va.create(oi(t.unwrap())):t instanceof ya?ya.create(t.items.map(l=>oi(l))):t}class kt extends Ue{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const l=this._def.shape(),i=Ie.objectKeys(l);return this._cached={shape:l,keys:i},this._cached}_parse(l){if(this._getType(l)!==he.object){const m=this._getOrReturnCtx(l);return ce(m,{code:ae.invalid_type,expected:he.object,received:m.parsedType}),_e}const{status:r,ctx:s}=this._processInputParams(l),{shape:o,keys:f}=this._getCached(),h=[];if(!(this._def.catchall instanceof Fl&&this._def.unknownKeys==="strip"))for(const m in s.data)f.includes(m)||h.push(m);const p=[];for(const m of f){const b=o[m],y=s.data[m];p.push({key:{status:"valid",value:m},value:b._parse(new Ln(s,y,s.path,m)),alwaysSet:m in s.data})}if(this._def.catchall instanceof Fl){const m=this._def.unknownKeys;if(m==="passthrough")for(const b of h)p.push({key:{status:"valid",value:b},value:{status:"valid",value:s.data[b]}});else if(m==="strict")h.length>0&&(ce(s,{code:ae.unrecognized_keys,keys:h}),r.dirty());else if(m!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const m=this._def.catchall;for(const b of h){const y=s.data[b];p.push({key:{status:"valid",value:b},value:m._parse(new Ln(s,y,s.path,b)),alwaysSet:b in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const m=[];for(const b of p){const y=await b.key,k=await b.value;m.push({key:y,value:k,alwaysSet:b.alwaysSet})}return m}).then(m=>Yt.mergeObjectSync(r,m)):Yt.mergeObjectSync(r,p)}get shape(){return this._def.shape()}strict(l){return ye.errToObj,new kt({...this._def,unknownKeys:"strict",...l!==void 0?{errorMap:(i,r)=>{var o,f;const s=((f=(o=this._def).errorMap)==null?void 0:f.call(o,i,r).message)??r.defaultError;return i.code==="unrecognized_keys"?{message:ye.errToObj(l).message??s}:{message:s}}}:{}})}strip(){return new kt({...this._def,unknownKeys:"strip"})}passthrough(){return new kt({...this._def,unknownKeys:"passthrough"})}extend(l){return new kt({...this._def,shape:()=>({...this._def.shape(),...l})})}merge(l){return new kt({unknownKeys:l._def.unknownKeys,catchall:l._def.catchall,shape:()=>({...this._def.shape(),...l._def.shape()}),typeName:Ee.ZodObject})}setKey(l,i){return this.augment({[l]:i})}catchall(l){return new kt({...this._def,catchall:l})}pick(l){const i={};for(const r of Ie.objectKeys(l))l[r]&&this.shape[r]&&(i[r]=this.shape[r]);return new kt({...this._def,shape:()=>i})}omit(l){const i={};for(const r of Ie.objectKeys(this.shape))l[r]||(i[r]=this.shape[r]);return new kt({...this._def,shape:()=>i})}deepPartial(){return oi(this)}partial(l){const i={};for(const r of Ie.objectKeys(this.shape)){const s=this.shape[r];l&&!l[r]?i[r]=s:i[r]=s.optional()}return new kt({...this._def,shape:()=>i})}required(l){const i={};for(const r of Ie.objectKeys(this.shape))if(l&&!l[r])i[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof sl;)o=o._def.innerType;i[r]=o}return new kt({...this._def,shape:()=>i})}keyof(){return Uy(Ie.objectKeys(this.shape))}}kt.create=(t,l)=>new kt({shape:()=>t,unknownKeys:"strip",catchall:Fl.create(),typeName:Ee.ZodObject,...ze(l)});kt.strictCreate=(t,l)=>new kt({shape:()=>t,unknownKeys:"strict",catchall:Fl.create(),typeName:Ee.ZodObject,...ze(l)});kt.lazycreate=(t,l)=>new kt({shape:t,unknownKeys:"strip",catchall:Fl.create(),typeName:Ee.ZodObject,...ze(l)});class rs extends Ue{_parse(l){const{ctx:i}=this._processInputParams(l),r=this._def.options;function s(o){for(const h of o)if(h.result.status==="valid")return h.result;for(const h of o)if(h.result.status==="dirty")return i.common.issues.push(...h.ctx.common.issues),h.result;const f=o.map(h=>new cl(h.ctx.common.issues));return ce(i,{code:ae.invalid_union,unionErrors:f}),_e}if(i.common.async)return Promise.all(r.map(async o=>{const f={...i,common:{...i.common,issues:[]},parent:null};return{result:await o._parseAsync({data:i.data,path:i.path,parent:f}),ctx:f}})).then(s);{let o;const f=[];for(const p of r){const m={...i,common:{...i.common,issues:[]},parent:null},b=p._parseSync({data:i.data,path:i.path,parent:m});if(b.status==="valid")return b;b.status==="dirty"&&!o&&(o={result:b,ctx:m}),m.common.issues.length&&f.push(m.common.issues)}if(o)return i.common.issues.push(...o.ctx.common.issues),o.result;const h=f.map(p=>new cl(p));return ce(i,{code:ae.invalid_union,unionErrors:h}),_e}}get options(){return this._def.options}}rs.create=(t,l)=>new rs({options:t,typeName:Ee.ZodUnion,...ze(l)});const rl=t=>t instanceof _f?rl(t.schema):t instanceof ba?rl(t.innerType()):t instanceof os?[t.value]:t instanceof xa?t.options:t instanceof Ef?Ie.objectValues(t.enum):t instanceof fs?rl(t._def.innerType):t instanceof vf?[void 0]:t instanceof kf?[null]:t instanceof sl?[void 0,...rl(t.unwrap())]:t instanceof va?[null,...rl(t.unwrap())]:t instanceof Hy||t instanceof hs?rl(t.unwrap()):t instanceof ds?rl(t._def.innerType):[];class Zf extends Ue{_parse(l){const{ctx:i}=this._processInputParams(l);if(i.parsedType!==he.object)return ce(i,{code:ae.invalid_type,expected:he.object,received:i.parsedType}),_e;const r=this.discriminator,s=i.data[r],o=this.optionsMap.get(s);return o?i.common.async?o._parseAsync({data:i.data,path:i.path,parent:i}):o._parseSync({data:i.data,path:i.path,parent:i}):(ce(i,{code:ae.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),_e)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(l,i,r){const s=new Map;for(const o of i){const f=rl(o.shape[l]);if(!f.length)throw new Error(`A discriminator value for key \`${l}\` could not be extracted from all schema options`);for(const h of f){if(s.has(h))throw new Error(`Discriminator property ${String(l)} has duplicate value ${String(h)}`);s.set(h,o)}}return new Zf({typeName:Ee.ZodDiscriminatedUnion,discriminator:l,options:i,optionsMap:s,...ze(r)})}}function Sf(t,l){const i=Yl(t),r=Yl(l);if(t===l)return{valid:!0,data:t};if(i===he.object&&r===he.object){const s=Ie.objectKeys(l),o=Ie.objectKeys(t).filter(h=>s.indexOf(h)!==-1),f={...t,...l};for(const h of o){const p=Sf(t[h],l[h]);if(!p.valid)return{valid:!1};f[h]=p.data}return{valid:!0,data:f}}else if(i===he.array&&r===he.array){if(t.length!==l.length)return{valid:!1};const s=[];for(let o=0;o<t.length;o++){const f=t[o],h=l[o],p=Sf(f,h);if(!p.valid)return{valid:!1};s.push(p.data)}return{valid:!0,data:s}}else return i===he.date&&r===he.date&&+t==+l?{valid:!0,data:t}:{valid:!1}}class us extends Ue{_parse(l){const{status:i,ctx:r}=this._processInputParams(l),s=(o,f)=>{if(_g(o)||_g(f))return _e;const h=Sf(o.value,f.value);return h.valid?((Eg(o)||Eg(f))&&i.dirty(),{status:i.value,value:h.data}):(ce(r,{code:ae.invalid_intersection_types}),_e)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,f])=>s(o,f)):s(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}us.create=(t,l,i)=>new us({left:t,right:l,typeName:Ee.ZodIntersection,...ze(i)});class ya extends Ue{_parse(l){const{status:i,ctx:r}=this._processInputParams(l);if(r.parsedType!==he.array)return ce(r,{code:ae.invalid_type,expected:he.array,received:r.parsedType}),_e;if(r.data.length<this._def.items.length)return ce(r,{code:ae.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),_e;!this._def.rest&&r.data.length>this._def.items.length&&(ce(r,{code:ae.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),i.dirty());const o=[...r.data].map((f,h)=>{const p=this._def.items[h]||this._def.rest;return p?p._parse(new Ln(r,f,r.path,h)):null}).filter(f=>!!f);return r.common.async?Promise.all(o).then(f=>Yt.mergeArray(i,f)):Yt.mergeArray(i,o)}get items(){return this._def.items}rest(l){return new ya({...this._def,rest:l})}}ya.create=(t,l)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ya({items:t,typeName:Ee.ZodTuple,rest:null,...ze(l)})};class ss extends Ue{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(l){const{status:i,ctx:r}=this._processInputParams(l);if(r.parsedType!==he.object)return ce(r,{code:ae.invalid_type,expected:he.object,received:r.parsedType}),_e;const s=[],o=this._def.keyType,f=this._def.valueType;for(const h in r.data)s.push({key:o._parse(new Ln(r,h,r.path,h)),value:f._parse(new Ln(r,r.data[h],r.path,h)),alwaysSet:h in r.data});return r.common.async?Yt.mergeObjectAsync(i,s):Yt.mergeObjectSync(i,s)}get element(){return this._def.valueType}static create(l,i,r){return i instanceof Ue?new ss({keyType:l,valueType:i,typeName:Ee.ZodRecord,...ze(r)}):new ss({keyType:ul.create(),valueType:l,typeName:Ee.ZodRecord,...ze(i)})}}class Tg extends Ue{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(l){const{status:i,ctx:r}=this._processInputParams(l);if(r.parsedType!==he.map)return ce(r,{code:ae.invalid_type,expected:he.map,received:r.parsedType}),_e;const s=this._def.keyType,o=this._def.valueType,f=[...r.data.entries()].map(([h,p],m)=>({key:s._parse(new Ln(r,h,r.path,[m,"key"])),value:o._parse(new Ln(r,p,r.path,[m,"value"]))}));if(r.common.async){const h=new Map;return Promise.resolve().then(async()=>{for(const p of f){const m=await p.key,b=await p.value;if(m.status==="aborted"||b.status==="aborted")return _e;(m.status==="dirty"||b.status==="dirty")&&i.dirty(),h.set(m.value,b.value)}return{status:i.value,value:h}})}else{const h=new Map;for(const p of f){const m=p.key,b=p.value;if(m.status==="aborted"||b.status==="aborted")return _e;(m.status==="dirty"||b.status==="dirty")&&i.dirty(),h.set(m.value,b.value)}return{status:i.value,value:h}}}}Tg.create=(t,l,i)=>new Tg({valueType:l,keyType:t,typeName:Ee.ZodMap,...ze(i)});class _r extends Ue{_parse(l){const{status:i,ctx:r}=this._processInputParams(l);if(r.parsedType!==he.set)return ce(r,{code:ae.invalid_type,expected:he.set,received:r.parsedType}),_e;const s=this._def;s.minSize!==null&&r.data.size<s.minSize.value&&(ce(r,{code:ae.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),i.dirty()),s.maxSize!==null&&r.data.size>s.maxSize.value&&(ce(r,{code:ae.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),i.dirty());const o=this._def.valueType;function f(p){const m=new Set;for(const b of p){if(b.status==="aborted")return _e;b.status==="dirty"&&i.dirty(),m.add(b.value)}return{status:i.value,value:m}}const h=[...r.data.values()].map((p,m)=>o._parse(new Ln(r,p,r.path,m)));return r.common.async?Promise.all(h).then(p=>f(p)):f(h)}min(l,i){return new _r({...this._def,minSize:{value:l,message:ye.toString(i)}})}max(l,i){return new _r({...this._def,maxSize:{value:l,message:ye.toString(i)}})}size(l,i){return this.min(l,i).max(l,i)}nonempty(l){return this.min(1,l)}}_r.create=(t,l)=>new _r({valueType:t,minSize:null,maxSize:null,typeName:Ee.ZodSet,...ze(l)});class _f extends Ue{get schema(){return this._def.getter()}_parse(l){const{ctx:i}=this._processInputParams(l);return this._def.getter()._parse({data:i.data,path:i.path,parent:i})}}_f.create=(t,l)=>new _f({getter:t,typeName:Ee.ZodLazy,...ze(l)});class os extends Ue{_parse(l){if(l.data!==this._def.value){const i=this._getOrReturnCtx(l);return ce(i,{received:i.data,code:ae.invalid_literal,expected:this._def.value}),_e}return{status:"valid",value:l.data}}get value(){return this._def.value}}os.create=(t,l)=>new os({value:t,typeName:Ee.ZodLiteral,...ze(l)});function Uy(t,l){return new xa({values:t,typeName:Ee.ZodEnum,...ze(l)})}class xa extends Ue{_parse(l){if(typeof l.data!="string"){const i=this._getOrReturnCtx(l),r=this._def.values;return ce(i,{expected:Ie.joinValues(r),received:i.parsedType,code:ae.invalid_type}),_e}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(l.data)){const i=this._getOrReturnCtx(l),r=this._def.values;return ce(i,{received:i.data,code:ae.invalid_enum_value,options:r}),_e}return Sn(l.data)}get options(){return this._def.values}get enum(){const l={};for(const i of this._def.values)l[i]=i;return l}get Values(){const l={};for(const i of this._def.values)l[i]=i;return l}get Enum(){const l={};for(const i of this._def.values)l[i]=i;return l}extract(l,i=this._def){return xa.create(l,{...this._def,...i})}exclude(l,i=this._def){return xa.create(this.options.filter(r=>!l.includes(r)),{...this._def,...i})}}xa.create=Uy;class Ef extends Ue{_parse(l){const i=Ie.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(l);if(r.parsedType!==he.string&&r.parsedType!==he.number){const s=Ie.objectValues(i);return ce(r,{expected:Ie.joinValues(s),received:r.parsedType,code:ae.invalid_type}),_e}if(this._cache||(this._cache=new Set(Ie.getValidEnumValues(this._def.values))),!this._cache.has(l.data)){const s=Ie.objectValues(i);return ce(r,{received:r.data,code:ae.invalid_enum_value,options:s}),_e}return Sn(l.data)}get enum(){return this._def.values}}Ef.create=(t,l)=>new Ef({values:t,typeName:Ee.ZodNativeEnum,...ze(l)});class cs extends Ue{unwrap(){return this._def.type}_parse(l){const{ctx:i}=this._processInputParams(l);if(i.parsedType!==he.promise&&i.common.async===!1)return ce(i,{code:ae.invalid_type,expected:he.promise,received:i.parsedType}),_e;const r=i.parsedType===he.promise?i.data:Promise.resolve(i.data);return Sn(r.then(s=>this._def.type.parseAsync(s,{path:i.path,errorMap:i.common.contextualErrorMap})))}}cs.create=(t,l)=>new cs({type:t,typeName:Ee.ZodPromise,...ze(l)});class ba extends Ue{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ee.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(l){const{status:i,ctx:r}=this._processInputParams(l),s=this._def.effect||null,o={addIssue:f=>{ce(r,f),f.fatal?i.abort():i.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),s.type==="preprocess"){const f=s.transform(r.data,o);if(r.common.async)return Promise.resolve(f).then(async h=>{if(i.value==="aborted")return _e;const p=await this._def.schema._parseAsync({data:h,path:r.path,parent:r});return p.status==="aborted"?_e:p.status==="dirty"||i.value==="dirty"?xr(p.value):p});{if(i.value==="aborted")return _e;const h=this._def.schema._parseSync({data:f,path:r.path,parent:r});return h.status==="aborted"?_e:h.status==="dirty"||i.value==="dirty"?xr(h.value):h}}if(s.type==="refinement"){const f=h=>{const p=s.refinement(h,o);if(r.common.async)return Promise.resolve(p);if(p instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return h};if(r.common.async===!1){const h=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return h.status==="aborted"?_e:(h.status==="dirty"&&i.dirty(),f(h.value),{status:i.value,value:h.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(h=>h.status==="aborted"?_e:(h.status==="dirty"&&i.dirty(),f(h.value).then(()=>({status:i.value,value:h.value}))))}if(s.type==="transform")if(r.common.async===!1){const f=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!hi(f))return _e;const h=s.transform(f.value,o);if(h instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:i.value,value:h}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(f=>hi(f)?Promise.resolve(s.transform(f.value,o)).then(h=>({status:i.value,value:h})):_e);Ie.assertNever(s)}}ba.create=(t,l,i)=>new ba({schema:t,typeName:Ee.ZodEffects,effect:l,...ze(i)});ba.createWithPreprocess=(t,l,i)=>new ba({schema:l,effect:{type:"preprocess",transform:t},typeName:Ee.ZodEffects,...ze(i)});class sl extends Ue{_parse(l){return this._getType(l)===he.undefined?Sn(void 0):this._def.innerType._parse(l)}unwrap(){return this._def.innerType}}sl.create=(t,l)=>new sl({innerType:t,typeName:Ee.ZodOptional,...ze(l)});class va extends Ue{_parse(l){return this._getType(l)===he.null?Sn(null):this._def.innerType._parse(l)}unwrap(){return this._def.innerType}}va.create=(t,l)=>new va({innerType:t,typeName:Ee.ZodNullable,...ze(l)});class fs extends Ue{_parse(l){const{ctx:i}=this._processInputParams(l);let r=i.data;return i.parsedType===he.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:i.path,parent:i})}removeDefault(){return this._def.innerType}}fs.create=(t,l)=>new fs({innerType:t,typeName:Ee.ZodDefault,defaultValue:typeof l.default=="function"?l.default:()=>l.default,...ze(l)});class ds extends Ue{_parse(l){const{ctx:i}=this._processInputParams(l),r={...i,common:{...i.common,issues:[]}},s=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return as(s)?s.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new cl(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new cl(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}ds.create=(t,l)=>new ds({innerType:t,typeName:Ee.ZodCatch,catchValue:typeof l.catch=="function"?l.catch:()=>l.catch,...ze(l)});class Dg extends Ue{_parse(l){if(this._getType(l)!==he.nan){const r=this._getOrReturnCtx(l);return ce(r,{code:ae.invalid_type,expected:he.nan,received:r.parsedType}),_e}return{status:"valid",value:l.data}}}Dg.create=t=>new Dg({typeName:Ee.ZodNaN,...ze(t)});class Hy extends Ue{_parse(l){const{ctx:i}=this._processInputParams(l),r=i.data;return this._def.type._parse({data:r,path:i.path,parent:i})}unwrap(){return this._def.type}}class Ff extends Ue{_parse(l){const{status:i,ctx:r}=this._processInputParams(l);if(r.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?_e:o.status==="dirty"?(i.dirty(),xr(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{const s=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?_e:s.status==="dirty"?(i.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:r.path,parent:r})}}static create(l,i){return new Ff({in:l,out:i,typeName:Ee.ZodPipeline})}}class hs extends Ue{_parse(l){const i=this._def.innerType._parse(l),r=s=>(hi(s)&&(s.value=Object.freeze(s.value)),s);return as(i)?i.then(s=>r(s)):r(i)}unwrap(){return this._def.innerType}}hs.create=(t,l)=>new hs({innerType:t,typeName:Ee.ZodReadonly,...ze(l)});var Ee;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(Ee||(Ee={}));const z=ul.create,$e=mi.create,jt=bf.create,qy=wf.create;Fl.create;const at=Rn.create,pe=kt.create;rs.create;const Nv=Zf.create;us.create;ya.create;const ms=ss.create,ci=os.create,Nt=xa.create;cs.create;sl.create;va.create;const Bn=Nt(["claude_code","cursor_local"]),It=pe({maxTurns:$e().positive().nullable().optional(),maxBudgetUsd:$e().positive().nullable().optional()}),Qf=pe({plan:It.optional(),execute:It.optional(),reflect:It.optional()});function Tv(t){if(!(t!=null&&t.trim()))return null;try{const l=It.parse(JSON.parse(t));return l.maxTurns==null&&l.maxBudgetUsd==null?null:l}catch{return null}}function Dv(t){if(!(t!=null&&t.trim()))return{};try{const l=JSON.parse(t);return l&&typeof l=="object"&&!("plan"in l)&&!("execute"in l)&&!("reflect"in l)&&("maxTurns"in l||"maxBudgetUsd"in l)?{execute:It.parse({maxTurns:l.maxTurns??null,maxBudgetUsd:l.maxBudgetUsd??null})}:Qf.parse(l)}catch{return{}}}const zv="00000000-0000-4000-a000-000000000001",ps="auto",Ov=pe({code:Nt(["cli_missing","runtime_auth","deck_offline","workspace_missing","mcp_not_registered"]),message:z()}),Mv=pe({id:z().uuid(),name:z(),runtime:Bn,workspaceRoot:z().nullable(),deckId:z().uuid().nullable(),deckName:z().nullable(),playbookId:z().nullable(),defaultPlanModel:z().nullable(),defaultExecuteModel:z().nullable(),defaultPlanBudgetJson:z().nullable(),defaultExecuteBudgetJson:z().nullable(),isBuiltin:jt(),createdAt:z(),updatedAt:z()}),Vy=Mv.extend({healthy:jt(),issues:at(Ov)});pe({name:z().min(1),runtime:Bn,workspaceRoot:z().min(1),deckId:z().uuid().optional(),playbookId:z().optional(),defaultPlanModel:z().nullable().optional(),defaultExecuteModel:z().nullable().optional(),defaultPlanBudget:It.nullable().optional(),defaultExecuteBudget:It.nullable().optional()});pe({name:z().min(1).optional(),runtime:Bn.optional(),workspaceRoot:z().nullable().optional(),deckId:z().uuid().nullable().optional(),playbookId:z().nullable().optional(),defaultPlanModel:z().nullable().optional(),defaultExecuteModel:z().nullable().optional(),defaultPlanBudget:It.nullable().optional(),defaultExecuteBudget:It.nullable().optional()});pe({agents:at(Vy),issueCount:$e()});function Rv(t){if(!(t!=null&&t.trim()))return{detected:!1};const l=t.match(/\*\*Blocker:\*\*\s*([^\n]+)/i);if(l)return{detected:!0,summary:l[1].trim()};const i=t.match(/^Blocker:\s*([^\n]+)/im);return i?{detected:!0,summary:i[1].trim()}:[/can't complete the deliverable/i,/cannot complete the deliverable/i,/needs explicit approval/i,/permission grant i can't obtain/i,/no prompt available in this session/i,/were both blocked/i,/without that permission being pre-approved/i,/can't obtain \(no prompt available/i].some(s=>s.test(t))?{detected:!0,summary:(t.trim().split(/\n/)[0]??"Execution blocked").slice(0,220)}:{detected:!1}}function Iy(t){var i,r,s;if((i=t.blocker)!=null&&i.summary)return{detected:!0,summary:t.blocker.summary};const l=Rv(t.resultText);return l.detected?l:t.isError||t.exitCode!==0?{detected:!0,summary:((s=(r=t.resultText)==null?void 0:r.trim().split(/\n/)[0])==null?void 0:s.slice(0,220))||(t.exitCode!==0?`Process exited with code ${t.exitCode}`:"Agent reported an error")}:{detected:!1}}const Lv=pe({label:z().min(1).max(60),description:z().max(200).optional()}),Yy=pe({id:z().regex(/^q\d+$/),question:z().min(1).max(300),options:at(Lv).min(2).max(4)}),Zy=Nt(["trivial","needs_review"]);pe({verdict:Zy,rationale:z().min(1).max(300),questions:at(Yy).max(3).default([])}).refine(t=>t.verdict!=="trivial"||t.questions.length===0,{message:"trivial verdict cannot carry questions"});pe({verdict:Zy,rationale:z(),questions:at(Yy),sessionId:z().optional(),parseFallback:jt(),consumed:jt().default(!1)});const Fy=pe({questionId:z(),selectedLabel:z().max(60).optional(),freeText:z().min(1).max(2e3).optional()}).refine(t=>t.selectedLabel?!t.freeText:!!t.freeText,{message:"Provide exactly one of selectedLabel or freeText"});pe({answers:at(Fy).min(1),executeModel:z().nullable().optional(),executeBudget:It.nullable().optional()});pe({answers:at(Fy),outcome:Nt(["approved","redraft","delegated"]),answeredAt:z()});const Bv=Nt(["slack_message","email"]),Uv=pe({target:z().min(1).max(120),body:z().min(1).max(4e3)}),Hv=pe({serviceName:z().min(1).max(120),toolName:z().min(1).max(120),arguments:ms(qy())}),qv=pe({actionType:Bv,summary:Uv,toolCall:Hv}),Vv=Nt(["pending","sent","rejected"]);pe({draft:qv,status:Vv,sentAt:z().optional(),rejectedAt:z().optional(),bodyMismatch:jt().optional()});pe({draftArtifactId:z().uuid(),sentAt:z(),toolResult:ms(qy()),permalink:z().url().optional()});const Iv=Nt(["pending","answered","failed"]);pe({exchangeId:z().min(1),question:z().min(1).max(2e3),answer:z().optional(),status:Iv,sessionResumed:jt(),askedAt:z(),answeredAt:z().optional(),error:z().optional()});pe({question:z().trim().min(1).max(2e3)});function Yv(t){const l=new Map;for(const i of t)l.set(i.exchangeId,i);return[...l.values()].sort((i,r)=>i.askedAt.localeCompare(r.askedAt))}const Zv=pe({failure_summary:z().min(1),user_feedback_excerpt:z().min(1),corrected_output_hint:z().optional()}),Fv=Nv("op",[pe({op:ci("add_item"),section:z().min(1),text:z().min(1)}),pe({op:ci("amend_item"),section:z().min(1),anchor:z().min(1),text:z().min(1)}),pe({op:ci("remove_item"),section:z().min(1),anchor:z().min(1)}),pe({op:ci("set_triggers"),triggers:at(z())}),pe({op:ci("rewrite_body"),text:z()})]);pe({rationale:z().min(1),ops:at(Fv).min(1),evidence:Zv.optional()});const Qv=Nt(["queued","plan_pending","plan_approved","running","review","done","failed","cancelled"]),Qy=Nt(["code","communication","email","research","content","other"]),Gv=Nt(["task_snapshot","draft_plan","approved_plan","plan_triage","plan_answers","acceptance_criteria","transcript","stream_trace","usage","agent_session","execution_result","diff","pr","email_draft","slack_draft","document","research_brief","deliverable","feedback","playbook_patch","reflect_status","linear_sync","send_receipt","result_qa"]),ks=Nt(["plan","execute","reflect","qa"]),Gy=Nt(["retry","approve"]);pe({patchId:z(),playbookId:z().optional(),playbookTitle:z().optional(),rationale:z().optional(),status:ci("proposed"),trigger:Gy,dashboardUrl:z().optional()});pe({status:Nt(["pending","completed","failed","skipped"]),trigger:Gy,error:z().optional()});const Xv=pe({type:Nt(["system","human","context","thinking","assistant","tool","rate_limit","result"]),text:z(),toolName:z().optional()});pe({phase:ks,runtime:Bn,entries:at(Xv)});const Jv=pe({phase:ks,runtime:Bn,totalCostUsd:$e().optional(),inputTokens:$e().optional(),outputTokens:$e().optional(),cacheReadTokens:$e().optional(),cacheWriteTokens:$e().optional(),durationMs:$e().optional(),model:z().optional(),numTurns:$e().optional(),maxTurns:$e().optional(),maxBudgetUsd:$e().optional()}),Kv=pe({label:z(),usage:Jv,maxTurns:$e().optional(),maxBudgetUsd:$e().optional()});pe({lines:at(Kv),total:pe({totalCostUsd:$e(),inputTokens:$e(),outputTokens:$e(),durationMs:$e(),numTurns:$e()})});pe({phase:ks,runtime:Bn,sessionId:z()});pe({phase:ks,exitCode:$e(),resultText:z().optional(),isError:jt().optional(),blocker:pe({summary:z().optional()}).optional()});pe({path:z(),title:z(),markdown:z()});pe({markdown:z(),sessionId:z().optional()});const $v=Nt(["manual","linear"]);pe({id:z(),title:z(),description:z().optional(),url:z().optional()});const il=pe({id:z().uuid(),source:$v,externalId:z().nullable(),externalLabel:z().nullable(),taskCategory:Qy,title:z(),description:z().nullable(),repo:z().nullable(),artifactWorkspace:z().nullable(),agentId:z().uuid().nullable(),agentName:z().nullable(),deckId:z().nullable(),deckName:z().nullable(),playbookId:z().nullable(),runtime:Bn.nullable(),planModel:z().nullable(),executeModel:z().nullable(),status:Qv,lineageId:z().uuid().nullable(),acceptanceCriteria:z().nullable(),approvalGatesJson:z().nullable(),budgetJson:z().nullable(),createdAt:z(),updatedAt:z()});pe({id:z().uuid(),runId:z().uuid(),kind:Gv,contentJson:z().nullable(),blobPath:z().nullable(),author:Nt(["human","agent","system"]),createdAt:z()});pe({id:z().uuid(),runId:z().uuid(),type:z(),payloadJson:z().nullable(),ts:z()});pe({title:z().min(1),description:z().optional(),taskCategory:Qy.default("other"),repo:z().optional(),artifactWorkspace:z().optional(),acceptanceCriteria:z().optional(),status:Nt(["queued","plan_pending","plan_approved"]).default("plan_pending"),agentId:z().uuid(),planModel:z().nullable().optional(),executeModel:z().nullable().optional(),budget:Qf.optional()});pe({runtime:Bn,deckId:z().uuid().optional(),playbookId:z().optional(),planModel:z().nullable().optional(),executeModel:z().nullable().optional(),budget:Qf.optional()});pe({planMarkdown:z(),approve:jt().default(!1),planModel:z().nullable().optional(),executeModel:z().nullable().optional(),planBudget:It.nullable().optional(),executeBudget:It.nullable().optional()});pe({runtime:Bn.optional(),deckId:z().uuid().optional(),playbookId:z().optional(),executeModel:z().nullable().optional(),executeBudget:It.nullable().optional()});pe({feedback:z().min(1),planModel:z().nullable().optional(),executeModel:z().nullable().optional(),executeBudget:It.nullable().optional()});pe({id:z(),identifier:z(),title:z(),description:z().optional(),url:z(),state:z().optional(),labels:at(z()).optional(),teamId:z().optional()});const Pv=pe({label:z().min(1),agentId:z().uuid()}),Cf=pe({stateFilter:at(z()),teamId:z().nullable(),assigneeMe:jt(),defaultAgentId:z().uuid().nullable(),syncEnabled:jt(),routingRules:at(Pv)});Cf.extend({persisted:Cf,envOverrides:pe({stateFilter:jt(),teamId:jt()})});Cf.partial();pe({connected:jt(),viewer:pe({id:z(),name:z(),email:z().optional()}).optional(),error:z().optional()});pe({agentId:z().uuid(),reason:z()});pe({host:z(),port:$e().int().min(1).max(65535),envOverride:jt()});pe({host:z().min(1).optional(),port:$e().int().min(1).max(65535).optional()});pe({connected:jt(),apiUrl:z(),mcpUrl:z(),deckCount:$e().optional(),envOverride:jt(),error:z().optional()});pe({agentId:z().uuid().optional(),autoAgent:jt().optional(),planModel:z().nullable().optional()}).refine(t=>t.agentId!==void 0||t.autoAgent===!0,{message:"Provide agentId or autoAgent: true"});pe({planModel:z().nullable().optional(),planBudget:It.nullable().optional(),feedback:z().optional(),editedMarkdown:z().optional()});const Wv=pe({id:z(),label:z()});pe({runtime:Bn,models:at(Wv),source:Nt(["live","fallback"])});pe({planReviewCount:$e(),resultReviewCount:$e(),maxConcurrent:$e(),planningActiveRuns:at(il),planningQueuedRuns:at(il),runningRuns:at(il),waitingExecution:at(il),resultReviewRuns:at(il),recentDone:at(il),awaitingPlanReview:at(il),awaitingAnswerRuns:at(il),openQuestionCounts:ms(z(),$e()),pendingSendCounts:ms(z(),$e()),sentRunIds:at(z()).optional(),autoApprovedRunIds:at(z()),runs:at(il),agentDeckOnline:jt(),agents:at(Vy),agentIssueCount:$e()});function e2(t){return t||ps}function Gf({runtime:t,label:l,value:i,onChange:r,defaultModelId:s,disabled:o,compact:f}){const h=yf(t),[p,m]=I.useState((h==null?void 0:h.models)??[]),[b,y]=I.useState((h==null?void 0:h.source)??"fallback"),[k,v]=I.useState(!h);I.useEffect(()=>{const H=yf(t);if(H){m(H.models),y(H.source),v(!1);return}v(!0),$b(t).then(N=>{m(N.models),y(N.source)}).catch(()=>m([])).finally(()=>v(!1))},[t]);const _=I.useMemo(()=>{var H,N;if(t==="cursor_local"){const Z=e2(s);return((H=p.find(q=>q.id===Z))==null?void 0:H.label)??"Auto (subscription pool)"}return s?((N=p.find(Z=>Z.id===s))==null?void 0:N.label)??s:"runtime default"},[t,s,p]),R=t==="cursor_local"?k?"Loading models…":`Agent default (${_})`:k?"Loading models…":`Default (${_})`;return g.jsxs("label",{className:"block space-y-1",children:[g.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:l}),g.jsxs("select",{className:"field text-sm",disabled:o||k,value:i,onChange:H=>r(H.target.value),children:[g.jsx("option",{value:"",children:R}),p.map(H=>g.jsx("option",{value:H.id,children:H.label},H.id))]}),t==="cursor_local"&&!k&&!f&&g.jsx("p",{className:"text-xs text-white/40",children:"Auto and Composer use your Cursor subscription pool. Other models draw API credits."}),b==="fallback"&&p.length>0&&!k&&t==="cursor_local"&&!f&&g.jsx("p",{className:"text-xs text-white/40",children:"Run cursor-agent login to load the full model list."})]})}function ma({phase:t,runtime:l,model:i,onModelChange:r,budget:s,onBudgetChange:o,defaultModelId:f,disabled:h,showHint:p=!0}){const m=b=>o({...s,...b});return g.jsxs("section",{className:"space-y-2",children:[g.jsx("div",{className:"text-xs uppercase tracking-wide text-[#92E4DD]",children:t}),g.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-2",children:[g.jsx(Gf,{runtime:l,label:"Model",value:i,onChange:r,defaultModelId:f,disabled:h,compact:!0}),g.jsxs("label",{className:"block space-y-1",children:[g.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:"Turns"}),g.jsx("input",{className:"field text-sm w-full",type:"number",min:1,step:1,placeholder:"Default",disabled:h,value:s.maxTurns,onChange:b=>m({maxTurns:b.target.value})})]}),g.jsxs("label",{className:"block space-y-1",children:[g.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:"Max USD"}),g.jsx("input",{className:"field text-sm w-full",type:"number",min:.01,step:.01,placeholder:"Default",disabled:h,value:s.maxBudgetUsd,onChange:b=>m({maxBudgetUsd:b.target.value})})]})]}),p&&g.jsx("p",{className:"text-xs text-white/40",children:"Blank turns or USD = runtime default (no cap)."})]})}function zg({value:t,onChange:l,agentDeckOnline:i,disabled:r}){const[s,o]=I.useState([]),[f,h]=I.useState([]);I.useEffect(()=>{Wb().then(o).catch(()=>o([]))},[]),I.useEffect(()=>{if(!t.deckId){h([]);return}ev(t.deckId).then(h).catch(()=>h([]))},[t.deckId]);const p=m=>l({...t,...m});return g.jsxs("div",{className:"space-y-2",children:[g.jsx("div",{className:"text-base uppercase tracking-wide text-[#92E4DD]",children:"Agent"}),g.jsx("label",{className:"text-xs text-[#A8C4C0] uppercase",children:"Runtime (required)"}),g.jsxs("select",{className:"field",disabled:r,value:t.runtime,onChange:m=>{const b=m.target.value;p({runtime:b,...b==="cursor_local"?{defaultPlanModel:ps,defaultExecuteModel:ps}:{defaultPlanModel:"",defaultExecuteModel:""}})},children:[g.jsx("option",{value:"claude_code",children:"Claude Code (claude -p)"}),g.jsx("option",{value:"cursor_local",children:"Cursor local (cursor-agent -p)"})]}),g.jsx(ma,{phase:"Plan",runtime:t.runtime,model:t.defaultPlanModel,onModelChange:m=>p({defaultPlanModel:m}),budget:t.defaultPlanBudget,onBudgetChange:m=>p({defaultPlanBudget:m}),disabled:r,showHint:!1}),g.jsx(ma,{phase:"Execution",runtime:t.runtime,model:t.defaultExecuteModel,onModelChange:m=>p({defaultExecuteModel:m}),budget:t.defaultExecuteBudget,onBudgetChange:m=>p({defaultExecuteBudget:m}),disabled:r}),g.jsx("label",{className:"text-xs text-[#A8C4C0] uppercase",children:"Agent Deck (optional)"}),g.jsxs("select",{className:"field",disabled:r||!i,value:t.deckId,onChange:m=>p({deckId:m.target.value,playbookId:""}),children:[g.jsx("option",{value:"",children:i?"No deck — degraded mode":"Agent Deck offline"}),s.map(m=>g.jsxs("option",{value:m.id,children:["◆ ",m.name]},m.id))]}),t.deckId&&f.length>0&&g.jsxs(g.Fragment,{children:[g.jsx("label",{className:"text-xs text-[#A8C4C0] uppercase",children:"Playbook (optional)"}),g.jsxs("select",{className:"field",disabled:r,value:t.playbookId,onChange:m=>p({playbookId:m.target.value}),children:[g.jsx("option",{value:"",children:"No playbook — agent uses task + plan only"}),f.map(m=>g.jsx("option",{value:m.id,children:m.title},m.id))]})]}),!t.deckId&&t.runtime&&g.jsx("p",{className:"text-xs text-white/45",children:"Degraded mode: no deck MCP. Audit trail still captured."})]})}function ws(t){if(t.agentName){const i=[t.agentName];return(t.deckName||t.deckId)&&i.push(`◆ ${t.deckName??t.deckId}`),t.planModel&&i.push(`plan:${t.planModel}`),t.executeModel&&i.push(`exec:${t.executeModel}`),i.join(" · ")}const l=[t.runtime??"no runtime"];return(t.deckName||t.deckId)&&l.push(`◆ ${t.deckName??t.deckId}`),t.playbookId&&l.push(`pb:${t.playbookId.slice(0,8)}…`),t.planModel&&l.push(`plan:${t.planModel}`),t.executeModel&&l.push(`exec:${t.executeModel}`),l.join(" · ")}function Ss({trace:t,label:l,showHeading:i=!0}){var r;return(r=t==null?void 0:t.entries)!=null&&r.length?g.jsxs("section",{className:"space-y-2",children:[i&&g.jsx("div",{className:"heading-section",children:l??"Reasoning trace"}),g.jsx("div",{className:"space-y-1 max-h-72 overflow-y-auto border border-white/10 rounded p-2 bg-black/20",children:t.entries.map((s,o)=>g.jsxs("div",{className:"text-sm font-mono",children:[g.jsx("span",{className:s.type==="human"?"text-[#C4B643]":s.type==="context"?"text-white/50":"text-[#92E4DD]",children:s.type}),s.toolName&&g.jsxs("span",{className:"text-white/40",children:[" · ",s.toolName]}),g.jsx("div",{className:"text-white/70 whitespace-pre-wrap mt-0.5",children:s.text})]},o))})]}):null}function Xy(t,l){return l!=null&&t>=l}function t2({used:t,max:l}){const i=Xy(t,l),r=l!=null?`${t} / ${l} turn${l===1?"":"s"}`:`${t} turn${t===1?"":"s"}`;return g.jsx("span",{className:i?"text-red-400 font-bold":void 0,children:r})}function n2({used:t,max:l}){const i=Xy(t,l),r=l!=null?`$${t.toFixed(4)} / $${l.toFixed(2)}`:`$${t.toFixed(4)}`;return g.jsx("span",{className:i?"text-red-400 font-bold":void 0,children:r})}function l2({line:t}){const{usage:l,maxTurns:i,maxBudgetUsd:r}=t,s=[];return l.model&&s.push(`model ${l.model}`),l.numTurns!=null&&s.push(g.jsx(t2,{used:l.numTurns,max:i},"turns")),l.totalCostUsd!=null&&s.push(g.jsx(n2,{used:l.totalCostUsd,max:r},"usd")),l.inputTokens!=null&&s.push(`${l.inputTokens} in`),l.outputTokens!=null&&s.push(`${l.outputTokens} out`),l.durationMs!=null&&s.push(Oy(l.durationMs)),g.jsx(g.Fragment,{children:s.map((o,f)=>g.jsxs("span",{children:[f>0&&" · ",o]},f))})}function _s({summary:t}){if(!(t!=null&&t.lines.length))return null;const l=t.lines.length>1;return g.jsxs("section",{className:"space-y-1.5",children:[g.jsx("div",{className:"heading-section",children:"Usage"}),t.lines.map((i,r)=>g.jsxs("p",{className:"text-sm text-white/50 font-mono",children:[g.jsxs("span",{className:"text-white/65",children:[i.label,":"]})," ",g.jsx(l2,{line:i})]},r)),l&&g.jsxs("p",{className:"text-sm text-[#92E4DD]/85 font-mono pt-1 border-t border-white/10",children:[g.jsx("span",{className:"text-white/65",children:"total:"})," ",[t.total.numTurns>0&&`${t.total.numTurns} turn${t.total.numTurns===1?"":"s"}`,t.total.totalCostUsd>0&&`$${t.total.totalCostUsd.toFixed(4)}`,t.total.inputTokens>0&&`${t.total.inputTokens} in`,t.total.outputTokens>0&&`${t.total.outputTokens} out`,t.total.durationMs>0&&Oy(t.total.durationMs)].filter(Boolean).join(" · ")]})]})}function a2(t,l){const i={};return(t[t.length-1]===""?[...t,""]:t).join((i.padRight?" ":"")+","+(i.padLeft===!1?"":" ")).trim()}const i2=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,r2=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,u2={};function Og(t,l){return(u2.jsx?r2:i2).test(t)}const s2=/[ \t\n\f\r]/g;function o2(t){return typeof t=="object"?t.type==="text"?Mg(t.value):!1:Mg(t)}function Mg(t){return t.replace(s2,"")===""}class jr{constructor(l,i,r){this.normal=i,this.property=l,r&&(this.space=r)}}jr.prototype.normal={};jr.prototype.property={};jr.prototype.space=void 0;function Jy(t,l){const i={},r={};for(const s of t)Object.assign(i,s.property),Object.assign(r,s.normal);return new jr(i,r,l)}function Af(t){return t.toLowerCase()}class Wt{constructor(l,i){this.attribute=i,this.property=l}}Wt.prototype.attribute="";Wt.prototype.booleanish=!1;Wt.prototype.boolean=!1;Wt.prototype.commaOrSpaceSeparated=!1;Wt.prototype.commaSeparated=!1;Wt.prototype.defined=!1;Wt.prototype.mustUseProperty=!1;Wt.prototype.number=!1;Wt.prototype.overloadedBoolean=!1;Wt.prototype.property="";Wt.prototype.spaceSeparated=!1;Wt.prototype.space=void 0;let c2=0;const Ae=wa(),vt=wa(),jf=wa(),le=wa(),lt=wa(),pa=wa(),cn=wa();function wa(){return 2**++c2}const Nf=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ae,booleanish:vt,commaOrSpaceSeparated:cn,commaSeparated:pa,number:le,overloadedBoolean:jf,spaceSeparated:lt},Symbol.toStringTag,{value:"Module"})),Pc=Object.keys(Nf);class Xf extends Wt{constructor(l,i,r,s){let o=-1;if(super(l,i),Rg(this,"space",s),typeof r=="number")for(;++o<Pc.length;){const f=Pc[o];Rg(this,Pc[o],(r&Nf[f])===Nf[f])}}}Xf.prototype.defined=!0;function Rg(t,l,i){i&&(t[l]=i)}function yi(t){const l={},i={};for(const[r,s]of Object.entries(t.properties)){const o=new Xf(r,t.transform(t.attributes||{},r),s,t.space);t.mustUseProperty&&t.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),l[r]=o,i[Af(r)]=r,i[Af(o.attribute)]=r}return new jr(l,i,t.space)}const Ky=yi({properties:{ariaActiveDescendant:null,ariaAtomic:vt,ariaAutoComplete:null,ariaBusy:vt,ariaChecked:vt,ariaColCount:le,ariaColIndex:le,ariaColSpan:le,ariaControls:lt,ariaCurrent:null,ariaDescribedBy:lt,ariaDetails:null,ariaDisabled:vt,ariaDropEffect:lt,ariaErrorMessage:null,ariaExpanded:vt,ariaFlowTo:lt,ariaGrabbed:vt,ariaHasPopup:null,ariaHidden:vt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:lt,ariaLevel:le,ariaLive:null,ariaModal:vt,ariaMultiLine:vt,ariaMultiSelectable:vt,ariaOrientation:null,ariaOwns:lt,ariaPlaceholder:null,ariaPosInSet:le,ariaPressed:vt,ariaReadOnly:vt,ariaRelevant:null,ariaRequired:vt,ariaRoleDescription:lt,ariaRowCount:le,ariaRowIndex:le,ariaRowSpan:le,ariaSelected:vt,ariaSetSize:le,ariaSort:null,ariaValueMax:le,ariaValueMin:le,ariaValueNow:le,ariaValueText:null,role:null},transform(t,l){return l==="role"?l:"aria-"+l.slice(4).toLowerCase()}});function $y(t,l){return l in t?t[l]:l}function Py(t,l){return $y(t,l.toLowerCase())}const f2=yi({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:pa,acceptCharset:lt,accessKey:lt,action:null,allow:null,allowFullScreen:Ae,allowPaymentRequest:Ae,allowUserMedia:Ae,alpha:Ae,alt:null,as:null,async:Ae,autoCapitalize:null,autoComplete:lt,autoFocus:Ae,autoPlay:Ae,blocking:lt,capture:null,charSet:null,checked:Ae,cite:null,className:lt,closedBy:null,colorSpace:null,cols:le,colSpan:le,command:null,commandFor:null,content:null,contentEditable:vt,controls:Ae,controlsList:lt,coords:le|pa,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ae,defer:Ae,dir:null,dirName:null,disabled:Ae,download:jf,draggable:vt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ae,formTarget:null,headers:lt,height:le,hidden:jf,high:le,href:null,hrefLang:null,htmlFor:lt,httpEquiv:lt,id:null,imageSizes:null,imageSrcSet:null,inert:Ae,inputMode:null,integrity:null,is:null,isMap:Ae,itemId:null,itemProp:lt,itemRef:lt,itemScope:Ae,itemType:lt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ae,low:le,manifest:null,max:null,maxLength:le,media:null,method:null,min:null,minLength:le,multiple:Ae,muted:Ae,name:null,nonce:null,noModule:Ae,noValidate:Ae,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ae,optimum:le,pattern:null,ping:lt,placeholder:null,playsInline:Ae,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ae,referrerPolicy:null,rel:lt,required:Ae,reversed:Ae,rows:le,rowSpan:le,sandbox:lt,scope:null,scoped:Ae,seamless:Ae,selected:Ae,shadowRootClonable:Ae,shadowRootCustomElementRegistry:Ae,shadowRootDelegatesFocus:Ae,shadowRootMode:null,shadowRootSerializable:Ae,shape:null,size:le,sizes:null,slot:null,span:le,spellCheck:vt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:le,step:null,style:null,tabIndex:le,target:null,title:null,translate:null,type:null,typeMustMatch:Ae,useMap:null,value:vt,width:le,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:lt,axis:null,background:null,bgColor:null,border:le,borderColor:null,bottomMargin:le,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ae,declare:Ae,event:null,face:null,frame:null,frameBorder:null,hSpace:le,leftMargin:le,link:null,longDesc:null,lowSrc:null,marginHeight:le,marginWidth:le,noResize:Ae,noHref:Ae,noShade:Ae,noWrap:Ae,object:null,profile:null,prompt:null,rev:null,rightMargin:le,rules:null,scheme:null,scrolling:vt,standby:null,summary:null,text:null,topMargin:le,valueType:null,version:null,vAlign:null,vLink:null,vSpace:le,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Ae,disablePictureInPicture:Ae,disableRemotePlayback:Ae,exportParts:pa,part:lt,prefix:null,property:null,results:le,security:null,unselectable:null},space:"html",transform:Py}),d2=yi({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",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",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",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",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",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",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:cn,accentHeight:le,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:le,amplitude:le,arabicForm:null,ascent:le,attributeName:null,attributeType:null,azimuth:le,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:le,by:null,calcMode:null,capHeight:le,className:lt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:le,diffuseConstant:le,direction:null,display:null,dur:null,divisor:le,dominantBaseline:null,download:Ae,dx:null,dy:null,edgeMode:null,editable:null,elevation:le,enableBackground:null,end:null,event:null,exponent:le,externalResourcesRequired:null,fill:null,fillOpacity:le,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:pa,g2:pa,glyphName:pa,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:le,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:le,horizOriginX:le,horizOriginY:le,id:null,ideographic:le,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:le,k:le,k1:le,k2:le,k3:le,k4:le,kernelMatrix:cn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:le,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:le,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:le,overlineThickness:le,paintOrder:null,panose1:null,path:null,pathLength:le,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:lt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:le,pointsAtY:le,pointsAtZ:le,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:cn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:cn,rev:cn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:cn,requiredFeatures:cn,requiredFonts:cn,requiredFormats:cn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:le,specularExponent:le,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:le,strikethroughThickness:le,string:null,stroke:null,strokeDashArray:cn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:le,strokeOpacity:le,strokeWidth:null,style:null,surfaceScale:le,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:cn,tabIndex:le,tableValues:null,target:null,targetX:le,targetY:le,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:cn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:le,underlineThickness:le,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:le,values:null,vAlphabetic:le,vMathematical:le,vectorEffect:null,vHanging:le,vIdeographic:le,version:null,vertAdvY:le,vertOriginX:le,vertOriginY:le,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:le,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:$y}),Wy=yi({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,l){return"xlink:"+l.slice(5).toLowerCase()}}),ex=yi({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Py}),tx=yi({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,l){return"xml:"+l.slice(3).toLowerCase()}}),h2={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},m2=/[A-Z]/g,Lg=/-[a-z]/g,p2=/^data[-\w.:]+$/i;function g2(t,l){const i=Af(l);let r=l,s=Wt;if(i in t.normal)return t.property[t.normal[i]];if(i.length>4&&i.slice(0,4)==="data"&&p2.test(l)){if(l.charAt(4)==="-"){const o=l.slice(5).replace(Lg,x2);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=l.slice(4);if(!Lg.test(o)){let f=o.replace(m2,y2);f.charAt(0)!=="-"&&(f="-"+f),l="data"+f}}s=Xf}return new s(r,l)}function y2(t){return"-"+t.toLowerCase()}function x2(t){return t.charAt(1).toUpperCase()}const b2=Jy([Ky,f2,Wy,ex,tx],"html"),Jf=Jy([Ky,d2,Wy,ex,tx],"svg");function v2(t){return t.join(" ").trim()}var si={},Wc,Bg;function k2(){if(Bg)return Wc;Bg=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,l=/\n/g,i=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,f=/^[;\s]*/,h=/^\s+|\s+$/g,p=`
50
+ `,m="/",b="*",y="",k="comment",v="declaration";function _(H,N){if(typeof H!="string")throw new TypeError("First argument must be a string");if(!H)return[];N=N||{};var Z=1,q=1;function te(ue){var W=ue.match(l);W&&(Z+=W.length);var T=ue.lastIndexOf(p);q=~T?ue.length-T:q+ue.length}function ee(){var ue={line:Z,column:q};return function(W){return W.position=new O(ue),fe(),W}}function O(ue){this.start=ue,this.end={line:Z,column:q},this.source=N.source}O.prototype.content=H;function P(ue){var W=new Error(N.source+":"+Z+":"+q+": "+ue);if(W.reason=ue,W.filename=N.source,W.line=Z,W.column=q,W.source=H,!N.silent)throw W}function oe(ue){var W=ue.exec(H);if(W){var T=W[0];return te(T),H=H.slice(T.length),W}}function fe(){oe(i)}function M(ue){var W;for(ue=ue||[];W=Y();)W!==!1&&ue.push(W);return ue}function Y(){var ue=ee();if(!(m!=H.charAt(0)||b!=H.charAt(1))){for(var W=2;y!=H.charAt(W)&&(b!=H.charAt(W)||m!=H.charAt(W+1));)++W;if(W+=2,y===H.charAt(W-1))return P("End of comment missing");var T=H.slice(2,W-2);return q+=2,te(T),H=H.slice(W),q+=2,ue({type:k,comment:T})}}function J(){var ue=ee(),W=oe(r);if(W){if(Y(),!oe(s))return P("property missing ':'");var T=oe(o),X=ue({type:v,property:R(W[0].replace(t,y)),value:T?R(T[0].replace(t,y)):y});return oe(f),X}}function ve(){var ue=[];M(ue);for(var W;W=J();)W!==!1&&(ue.push(W),M(ue));return ue}return fe(),ve()}function R(H){return H?H.replace(h,y):y}return Wc=_,Wc}var Ug;function w2(){if(Ug)return si;Ug=1;var t=si&&si.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(si,"__esModule",{value:!0}),si.default=i;const l=t(k2());function i(r,s){let o=null;if(!r||typeof r!="string")return o;const f=(0,l.default)(r),h=typeof s=="function";return f.forEach(p=>{if(p.type!=="declaration")return;const{property:m,value:b}=p;h?s(m,b,p):b&&(o=o||{},o[m]=b)}),o}return si}var mr={},Hg;function S2(){if(Hg)return mr;Hg=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,l=/-([a-z])/g,i=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,o=function(m){return!m||i.test(m)||t.test(m)},f=function(m,b){return b.toUpperCase()},h=function(m,b){return"".concat(b,"-")},p=function(m,b){return b===void 0&&(b={}),o(m)?m:(m=m.toLowerCase(),b.reactCompat?m=m.replace(s,h):m=m.replace(r,h),m.replace(l,f))};return mr.camelCase=p,mr}var pr,qg;function _2(){if(qg)return pr;qg=1;var t=pr&&pr.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},l=t(w2()),i=S2();function r(s,o){var f={};return!s||typeof s!="string"||(0,l.default)(s,function(h,p){h&&p&&(f[(0,i.camelCase)(h,o)]=p)}),f}return r.default=r,pr=r,pr}var E2=_2();const C2=jy(E2),nx=lx("end"),Kf=lx("start");function lx(t){return l;function l(i){const r=i&&i.position&&i.position[t]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function A2(t){const l=Kf(t),i=nx(t);if(l&&i)return{start:l,end:i}}function vr(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?Vg(t.position):"start"in t||"end"in t?Vg(t):"line"in t||"column"in t?Tf(t):""}function Tf(t){return Ig(t&&t.line)+":"+Ig(t&&t.column)}function Vg(t){return Tf(t&&t.start)+"-"+Tf(t&&t.end)}function Ig(t){return t&&typeof t=="number"?t:1}class Bt extends Error{constructor(l,i,r){super(),typeof i=="string"&&(r=i,i=void 0);let s="",o={},f=!1;if(i&&("line"in i&&"column"in i?o={place:i}:"start"in i&&"end"in i?o={place:i}:"type"in i?o={ancestors:[i],place:i.position}:o={...i}),typeof l=="string"?s=l:!o.cause&&l&&(f=!0,s=l.message,o.cause=l),!o.ruleId&&!o.source&&typeof r=="string"){const p=r.indexOf(":");p===-1?o.ruleId=r:(o.source=r.slice(0,p),o.ruleId=r.slice(p+1))}if(!o.place&&o.ancestors&&o.ancestors){const p=o.ancestors[o.ancestors.length-1];p&&(o.place=p.position)}const h=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=h?h.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=h?h.line:void 0,this.name=vr(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=f&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Bt.prototype.file="";Bt.prototype.name="";Bt.prototype.reason="";Bt.prototype.message="";Bt.prototype.stack="";Bt.prototype.column=void 0;Bt.prototype.line=void 0;Bt.prototype.ancestors=void 0;Bt.prototype.cause=void 0;Bt.prototype.fatal=void 0;Bt.prototype.place=void 0;Bt.prototype.ruleId=void 0;Bt.prototype.source=void 0;const $f={}.hasOwnProperty,j2=new Map,N2=/[A-Z]/g,T2=new Set(["table","tbody","thead","tfoot","tr"]),D2=new Set(["td","th"]),ax="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function z2(t,l){if(!l||l.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const i=l.filePath||void 0;let r;if(l.development){if(typeof l.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=q2(i,l.jsxDEV)}else{if(typeof l.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof l.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=H2(i,l.jsx,l.jsxs)}const s={Fragment:l.Fragment,ancestors:[],components:l.components||{},create:r,elementAttributeNameCase:l.elementAttributeNameCase||"react",evaluater:l.createEvaluater?l.createEvaluater():void 0,filePath:i,ignoreInvalidStyle:l.ignoreInvalidStyle||!1,passKeys:l.passKeys!==!1,passNode:l.passNode||!1,schema:l.space==="svg"?Jf:b2,stylePropertyNameCase:l.stylePropertyNameCase||"dom",tableCellAlignToStyle:l.tableCellAlignToStyle!==!1},o=ix(s,t,void 0);return o&&typeof o!="string"?o:s.create(t,s.Fragment,{children:o||void 0},void 0)}function ix(t,l,i){if(l.type==="element")return O2(t,l,i);if(l.type==="mdxFlowExpression"||l.type==="mdxTextExpression")return M2(t,l);if(l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement")return L2(t,l,i);if(l.type==="mdxjsEsm")return R2(t,l);if(l.type==="root")return B2(t,l,i);if(l.type==="text")return U2(t,l)}function O2(t,l,i){const r=t.schema;let s=r;l.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=Jf,t.schema=s),t.ancestors.push(l);const o=ux(t,l.tagName,!1),f=V2(t,l);let h=Wf(t,l);return T2.has(l.tagName)&&(h=h.filter(function(p){return typeof p=="string"?!o2(p):!0})),rx(t,f,o,l),Pf(f,h),t.ancestors.pop(),t.schema=r,t.create(l,o,f,i)}function M2(t,l){if(l.data&&l.data.estree&&t.evaluater){const r=l.data.estree.body[0];return r.type,t.evaluater.evaluateExpression(r.expression)}Er(t,l.position)}function R2(t,l){if(l.data&&l.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(l.data.estree);Er(t,l.position)}function L2(t,l,i){const r=t.schema;let s=r;l.name==="svg"&&r.space==="html"&&(s=Jf,t.schema=s),t.ancestors.push(l);const o=l.name===null?t.Fragment:ux(t,l.name,!0),f=I2(t,l),h=Wf(t,l);return rx(t,f,o,l),Pf(f,h),t.ancestors.pop(),t.schema=r,t.create(l,o,f,i)}function B2(t,l,i){const r={};return Pf(r,Wf(t,l)),t.create(l,t.Fragment,r,i)}function U2(t,l){return l.value}function rx(t,l,i,r){typeof i!="string"&&i!==t.Fragment&&t.passNode&&(l.node=r)}function Pf(t,l){if(l.length>0){const i=l.length>1?l:l[0];i&&(t.children=i)}}function H2(t,l,i){return r;function r(s,o,f,h){const m=Array.isArray(f.children)?i:l;return h?m(o,f,h):m(o,f)}}function q2(t,l){return i;function i(r,s,o,f){const h=Array.isArray(o.children),p=Kf(r);return l(s,o,f,h,{columnNumber:p?p.column-1:void 0,fileName:t,lineNumber:p?p.line:void 0},void 0)}}function V2(t,l){const i={};let r,s;for(s in l.properties)if(s!=="children"&&$f.call(l.properties,s)){const o=Y2(t,s,l.properties[s]);if(o){const[f,h]=o;t.tableCellAlignToStyle&&f==="align"&&typeof h=="string"&&D2.has(l.tagName)?r=h:i[f]=h}}if(r){const o=i.style||(i.style={});o[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return i}function I2(t,l){const i={};for(const r of l.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&t.evaluater){const o=r.data.estree.body[0];o.type;const f=o.expression;f.type;const h=f.properties[0];h.type,Object.assign(i,t.evaluater.evaluateExpression(h.argument))}else Er(t,l.position);else{const s=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&t.evaluater){const h=r.value.data.estree.body[0];h.type,o=t.evaluater.evaluateExpression(h.expression)}else Er(t,l.position);else o=r.value===null?!0:r.value;i[s]=o}return i}function Wf(t,l){const i=[];let r=-1;const s=t.passKeys?new Map:j2;for(;++r<l.children.length;){const o=l.children[r];let f;if(t.passKeys){const p=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(p){const m=s.get(p)||0;f=p+"-"+m,s.set(p,m+1)}}const h=ix(t,o,f);h!==void 0&&i.push(h)}return i}function Y2(t,l,i){const r=g2(t.schema,l);if(!(i==null||typeof i=="number"&&Number.isNaN(i))){if(Array.isArray(i)&&(i=r.commaSeparated?a2(i):v2(i)),r.property==="style"){let s=typeof i=="object"?i:Z2(t,String(i));return t.stylePropertyNameCase==="css"&&(s=F2(s)),["style",s]}return[t.elementAttributeNameCase==="react"&&r.space?h2[r.property]||r.property:r.attribute,i]}}function Z2(t,l){try{return C2(l,{reactCompat:!0})}catch(i){if(t.ignoreInvalidStyle)return{};const r=i,s=new Bt("Cannot parse `style` attribute",{ancestors:t.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=t.filePath||void 0,s.url=ax+"#cannot-parse-style-attribute",s}}function ux(t,l,i){let r;if(!i)r={type:"Literal",value:l};else if(l.includes(".")){const s=l.split(".");let o=-1,f;for(;++o<s.length;){const h=Og(s[o])?{type:"Identifier",name:s[o]}:{type:"Literal",value:s[o]};f=f?{type:"MemberExpression",object:f,property:h,computed:!!(o&&h.type==="Literal"),optional:!1}:h}r=f}else r=Og(l)&&!/^[a-z]/.test(l)?{type:"Identifier",name:l}:{type:"Literal",value:l};if(r.type==="Literal"){const s=r.value;return $f.call(t.components,s)?t.components[s]:s}if(t.evaluater)return t.evaluater.evaluateExpression(r);Er(t)}function Er(t,l){const i=new Bt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:t.ancestors,place:l,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw i.file=t.filePath||void 0,i.url=ax+"#cannot-handle-mdx-estrees-without-createevaluater",i}function F2(t){const l={};let i;for(i in t)$f.call(t,i)&&(l[Q2(i)]=t[i]);return l}function Q2(t){let l=t.replace(N2,G2);return l.slice(0,3)==="ms-"&&(l="-"+l),l}function G2(t){return"-"+t.toLowerCase()}const ef={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},X2={};function ed(t,l){const i=X2,r=typeof i.includeImageAlt=="boolean"?i.includeImageAlt:!0,s=typeof i.includeHtml=="boolean"?i.includeHtml:!0;return sx(t,r,s)}function sx(t,l,i){if(J2(t)){if("value"in t)return t.type==="html"&&!i?"":t.value;if(l&&"alt"in t&&t.alt)return t.alt;if("children"in t)return Yg(t.children,l,i)}return Array.isArray(t)?Yg(t,l,i):""}function Yg(t,l,i){const r=[];let s=-1;for(;++s<t.length;)r[s]=sx(t[s],l,i);return r.join("")}function J2(t){return!!(t&&typeof t=="object")}const Zg=document.createElement("i");function td(t){const l="&"+t+";";Zg.innerHTML=l;const i=Zg.textContent;return i.charCodeAt(i.length-1)===59&&t!=="semi"||i===l?!1:i}function fn(t,l,i,r){const s=t.length;let o=0,f;if(l<0?l=-l>s?0:s+l:l=l>s?s:l,i=i>0?i:0,r.length<1e4)f=Array.from(r),f.unshift(l,i),t.splice(...f);else for(i&&t.splice(l,i);o<r.length;)f=r.slice(o,o+1e4),f.unshift(l,0),t.splice(...f),o+=1e4,l+=1e4}function wn(t,l){return t.length>0?(fn(t,t.length,0,l),t):l}const Fg={}.hasOwnProperty;function ox(t){const l={};let i=-1;for(;++i<t.length;)K2(l,t[i]);return l}function K2(t,l){let i;for(i in l){const s=(Fg.call(t,i)?t[i]:void 0)||(t[i]={}),o=l[i];let f;if(o)for(f in o){Fg.call(s,f)||(s[f]=[]);const h=o[f];$2(s[f],Array.isArray(h)?h:h?[h]:[])}}}function $2(t,l){let i=-1;const r=[];for(;++i<l.length;)(l[i].add==="after"?t:r).push(l[i]);fn(t,0,0,r)}function cx(t,l){const i=Number.parseInt(t,l);return i<9||i===11||i>13&&i<32||i>126&&i<160||i>55295&&i<57344||i>64975&&i<65008||(i&65535)===65535||(i&65535)===65534||i>1114111?"�":String.fromCodePoint(i)}function jn(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Vt=Ql(/[A-Za-z]/),Lt=Ql(/[\dA-Za-z]/),P2=Ql(/[#-'*+\--9=?A-Z^-~]/);function gs(t){return t!==null&&(t<32||t===127)}const Df=Ql(/\d/),W2=Ql(/[\dA-Fa-f]/),ek=Ql(/[!-/:-@[-`{-~]/);function we(t){return t!==null&&t<-2}function it(t){return t!==null&&(t<0||t===32)}function Re(t){return t===-2||t===-1||t===32}const Es=Ql(new RegExp("\\p{P}|\\p{S}","u")),ka=Ql(/\s/);function Ql(t){return l;function l(i){return i!==null&&i>-1&&t.test(String.fromCharCode(i))}}function xi(t){const l=[];let i=-1,r=0,s=0;for(;++i<t.length;){const o=t.charCodeAt(i);let f="";if(o===37&&Lt(t.charCodeAt(i+1))&&Lt(t.charCodeAt(i+2)))s=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(f=String.fromCharCode(o));else if(o>55295&&o<57344){const h=t.charCodeAt(i+1);o<56320&&h>56319&&h<57344?(f=String.fromCharCode(o,h),s=1):f="�"}else f=String.fromCharCode(o);f&&(l.push(t.slice(r,i),encodeURIComponent(f)),r=i+s+1,f=""),s&&(i+=s,s=0)}return l.join("")+t.slice(r)}function qe(t,l,i,r){const s=r?r-1:Number.POSITIVE_INFINITY;let o=0;return f;function f(p){return Re(p)?(t.enter(i),h(p)):l(p)}function h(p){return Re(p)&&o++<s?(t.consume(p),h):(t.exit(i),l(p))}}const tk={tokenize:nk};function nk(t){const l=t.attempt(this.parser.constructs.contentInitial,r,s);let i;return l;function r(h){if(h===null){t.consume(h);return}return t.enter("lineEnding"),t.consume(h),t.exit("lineEnding"),qe(t,l,"linePrefix")}function s(h){return t.enter("paragraph"),o(h)}function o(h){const p=t.enter("chunkText",{contentType:"text",previous:i});return i&&(i.next=p),i=p,f(h)}function f(h){if(h===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(h);return}return we(h)?(t.consume(h),t.exit("chunkText"),o):(t.consume(h),f)}}const lk={tokenize:ak},Qg={tokenize:ik};function ak(t){const l=this,i=[];let r=0,s,o,f;return h;function h(q){if(r<i.length){const te=i[r];return l.containerState=te[1],t.attempt(te[0].continuation,p,m)(q)}return m(q)}function p(q){if(r++,l.containerState._closeFlow){l.containerState._closeFlow=void 0,s&&Z();const te=l.events.length;let ee=te,O;for(;ee--;)if(l.events[ee][0]==="exit"&&l.events[ee][1].type==="chunkFlow"){O=l.events[ee][1].end;break}N(r);let P=te;for(;P<l.events.length;)l.events[P][1].end={...O},P++;return fn(l.events,ee+1,0,l.events.slice(te)),l.events.length=P,m(q)}return h(q)}function m(q){if(r===i.length){if(!s)return k(q);if(s.currentConstruct&&s.currentConstruct.concrete)return _(q);l.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return l.containerState={},t.check(Qg,b,y)(q)}function b(q){return s&&Z(),N(r),k(q)}function y(q){return l.parser.lazy[l.now().line]=r!==i.length,f=l.now().offset,_(q)}function k(q){return l.containerState={},t.attempt(Qg,v,_)(q)}function v(q){return r++,i.push([l.currentConstruct,l.containerState]),k(q)}function _(q){if(q===null){s&&Z(),N(0),t.consume(q);return}return s=s||l.parser.flow(l.now()),t.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:o}),R(q)}function R(q){if(q===null){H(t.exit("chunkFlow"),!0),N(0),t.consume(q);return}return we(q)?(t.consume(q),H(t.exit("chunkFlow")),r=0,l.interrupt=void 0,h):(t.consume(q),R)}function H(q,te){const ee=l.sliceStream(q);if(te&&ee.push(null),q.previous=o,o&&(o.next=q),o=q,s.defineSkip(q.start),s.write(ee),l.parser.lazy[q.start.line]){let O=s.events.length;for(;O--;)if(s.events[O][1].start.offset<f&&(!s.events[O][1].end||s.events[O][1].end.offset>f))return;const P=l.events.length;let oe=P,fe,M;for(;oe--;)if(l.events[oe][0]==="exit"&&l.events[oe][1].type==="chunkFlow"){if(fe){M=l.events[oe][1].end;break}fe=!0}for(N(r),O=P;O<l.events.length;)l.events[O][1].end={...M},O++;fn(l.events,oe+1,0,l.events.slice(P)),l.events.length=O}}function N(q){let te=i.length;for(;te-- >q;){const ee=i[te];l.containerState=ee[1],ee[0].exit.call(l,t)}i.length=q}function Z(){s.write([null]),o=void 0,s=void 0,l.containerState._closeFlow=void 0}}function ik(t,l,i){return qe(t,t.attempt(this.parser.constructs.document,l,i),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function pi(t){if(t===null||it(t)||ka(t))return 1;if(Es(t))return 2}function Cs(t,l,i){const r=[];let s=-1;for(;++s<t.length;){const o=t[s].resolveAll;o&&!r.includes(o)&&(l=o(l,i),r.push(o))}return l}const zf={name:"attention",resolveAll:rk,tokenize:uk};function rk(t,l){let i=-1,r,s,o,f,h,p,m,b;for(;++i<t.length;)if(t[i][0]==="enter"&&t[i][1].type==="attentionSequence"&&t[i][1]._close){for(r=i;r--;)if(t[r][0]==="exit"&&t[r][1].type==="attentionSequence"&&t[r][1]._open&&l.sliceSerialize(t[r][1]).charCodeAt(0)===l.sliceSerialize(t[i][1]).charCodeAt(0)){if((t[r][1]._close||t[i][1]._open)&&(t[i][1].end.offset-t[i][1].start.offset)%3&&!((t[r][1].end.offset-t[r][1].start.offset+t[i][1].end.offset-t[i][1].start.offset)%3))continue;p=t[r][1].end.offset-t[r][1].start.offset>1&&t[i][1].end.offset-t[i][1].start.offset>1?2:1;const y={...t[r][1].end},k={...t[i][1].start};Gg(y,-p),Gg(k,p),f={type:p>1?"strongSequence":"emphasisSequence",start:y,end:{...t[r][1].end}},h={type:p>1?"strongSequence":"emphasisSequence",start:{...t[i][1].start},end:k},o={type:p>1?"strongText":"emphasisText",start:{...t[r][1].end},end:{...t[i][1].start}},s={type:p>1?"strong":"emphasis",start:{...f.start},end:{...h.end}},t[r][1].end={...f.start},t[i][1].start={...h.end},m=[],t[r][1].end.offset-t[r][1].start.offset&&(m=wn(m,[["enter",t[r][1],l],["exit",t[r][1],l]])),m=wn(m,[["enter",s,l],["enter",f,l],["exit",f,l],["enter",o,l]]),m=wn(m,Cs(l.parser.constructs.insideSpan.null,t.slice(r+1,i),l)),m=wn(m,[["exit",o,l],["enter",h,l],["exit",h,l],["exit",s,l]]),t[i][1].end.offset-t[i][1].start.offset?(b=2,m=wn(m,[["enter",t[i][1],l],["exit",t[i][1],l]])):b=0,fn(t,r-1,i-r+3,m),i=r+m.length-b-2;break}}for(i=-1;++i<t.length;)t[i][1].type==="attentionSequence"&&(t[i][1].type="data");return t}function uk(t,l){const i=this.parser.constructs.attentionMarkers.null,r=this.previous,s=pi(r);let o;return f;function f(p){return o=p,t.enter("attentionSequence"),h(p)}function h(p){if(p===o)return t.consume(p),h;const m=t.exit("attentionSequence"),b=pi(p),y=!b||b===2&&s||i.includes(p),k=!s||s===2&&b||i.includes(r);return m._open=!!(o===42?y:y&&(s||!k)),m._close=!!(o===42?k:k&&(b||!y)),l(p)}}function Gg(t,l){t.column+=l,t.offset+=l,t._bufferIndex+=l}const sk={name:"autolink",tokenize:ok};function ok(t,l,i){let r=0;return s;function s(v){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(v),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),o}function o(v){return Vt(v)?(t.consume(v),f):v===64?i(v):m(v)}function f(v){return v===43||v===45||v===46||Lt(v)?(r=1,h(v)):m(v)}function h(v){return v===58?(t.consume(v),r=0,p):(v===43||v===45||v===46||Lt(v))&&r++<32?(t.consume(v),h):(r=0,m(v))}function p(v){return v===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(v),t.exit("autolinkMarker"),t.exit("autolink"),l):v===null||v===32||v===60||gs(v)?i(v):(t.consume(v),p)}function m(v){return v===64?(t.consume(v),b):P2(v)?(t.consume(v),m):i(v)}function b(v){return Lt(v)?y(v):i(v)}function y(v){return v===46?(t.consume(v),r=0,b):v===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(v),t.exit("autolinkMarker"),t.exit("autolink"),l):k(v)}function k(v){if((v===45||Lt(v))&&r++<63){const _=v===45?k:y;return t.consume(v),_}return i(v)}}const Nr={partial:!0,tokenize:ck};function ck(t,l,i){return r;function r(o){return Re(o)?qe(t,s,"linePrefix")(o):s(o)}function s(o){return o===null||we(o)?l(o):i(o)}}const fx={continuation:{tokenize:dk},exit:hk,name:"blockQuote",tokenize:fk};function fk(t,l,i){const r=this;return s;function s(f){if(f===62){const h=r.containerState;return h.open||(t.enter("blockQuote",{_container:!0}),h.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(f),t.exit("blockQuoteMarker"),o}return i(f)}function o(f){return Re(f)?(t.enter("blockQuotePrefixWhitespace"),t.consume(f),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),l):(t.exit("blockQuotePrefix"),l(f))}}function dk(t,l,i){const r=this;return s;function s(f){return Re(f)?qe(t,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f):o(f)}function o(f){return t.attempt(fx,l,i)(f)}}function hk(t){t.exit("blockQuote")}const dx={name:"characterEscape",tokenize:mk};function mk(t,l,i){return r;function r(o){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(o),t.exit("escapeMarker"),s}function s(o){return ek(o)?(t.enter("characterEscapeValue"),t.consume(o),t.exit("characterEscapeValue"),t.exit("characterEscape"),l):i(o)}}const hx={name:"characterReference",tokenize:pk};function pk(t,l,i){const r=this;let s=0,o,f;return h;function h(y){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(y),t.exit("characterReferenceMarker"),p}function p(y){return y===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(y),t.exit("characterReferenceMarkerNumeric"),m):(t.enter("characterReferenceValue"),o=31,f=Lt,b(y))}function m(y){return y===88||y===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(y),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),o=6,f=W2,b):(t.enter("characterReferenceValue"),o=7,f=Df,b(y))}function b(y){if(y===59&&s){const k=t.exit("characterReferenceValue");return f===Lt&&!td(r.sliceSerialize(k))?i(y):(t.enter("characterReferenceMarker"),t.consume(y),t.exit("characterReferenceMarker"),t.exit("characterReference"),l)}return f(y)&&s++<o?(t.consume(y),b):i(y)}}const Xg={partial:!0,tokenize:yk},Jg={concrete:!0,name:"codeFenced",tokenize:gk};function gk(t,l,i){const r=this,s={partial:!0,tokenize:ee};let o=0,f=0,h;return p;function p(O){return m(O)}function m(O){const P=r.events[r.events.length-1];return o=P&&P[1].type==="linePrefix"?P[2].sliceSerialize(P[1],!0).length:0,h=O,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),b(O)}function b(O){return O===h?(f++,t.consume(O),b):f<3?i(O):(t.exit("codeFencedFenceSequence"),Re(O)?qe(t,y,"whitespace")(O):y(O))}function y(O){return O===null||we(O)?(t.exit("codeFencedFence"),r.interrupt?l(O):t.check(Xg,R,te)(O)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),k(O))}function k(O){return O===null||we(O)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),y(O)):Re(O)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),qe(t,v,"whitespace")(O)):O===96&&O===h?i(O):(t.consume(O),k)}function v(O){return O===null||we(O)?y(O):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),_(O))}function _(O){return O===null||we(O)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),y(O)):O===96&&O===h?i(O):(t.consume(O),_)}function R(O){return t.attempt(s,te,H)(O)}function H(O){return t.enter("lineEnding"),t.consume(O),t.exit("lineEnding"),N}function N(O){return o>0&&Re(O)?qe(t,Z,"linePrefix",o+1)(O):Z(O)}function Z(O){return O===null||we(O)?t.check(Xg,R,te)(O):(t.enter("codeFlowValue"),q(O))}function q(O){return O===null||we(O)?(t.exit("codeFlowValue"),Z(O)):(t.consume(O),q)}function te(O){return t.exit("codeFenced"),l(O)}function ee(O,P,oe){let fe=0;return M;function M(W){return O.enter("lineEnding"),O.consume(W),O.exit("lineEnding"),Y}function Y(W){return O.enter("codeFencedFence"),Re(W)?qe(O,J,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(W):J(W)}function J(W){return W===h?(O.enter("codeFencedFenceSequence"),ve(W)):oe(W)}function ve(W){return W===h?(fe++,O.consume(W),ve):fe>=f?(O.exit("codeFencedFenceSequence"),Re(W)?qe(O,ue,"whitespace")(W):ue(W)):oe(W)}function ue(W){return W===null||we(W)?(O.exit("codeFencedFence"),P(W)):oe(W)}}}function yk(t,l,i){const r=this;return s;function s(f){return f===null?i(f):(t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),o)}function o(f){return r.parser.lazy[r.now().line]?i(f):l(f)}}const tf={name:"codeIndented",tokenize:bk},xk={partial:!0,tokenize:vk};function bk(t,l,i){const r=this;return s;function s(m){return t.enter("codeIndented"),qe(t,o,"linePrefix",5)(m)}function o(m){const b=r.events[r.events.length-1];return b&&b[1].type==="linePrefix"&&b[2].sliceSerialize(b[1],!0).length>=4?f(m):i(m)}function f(m){return m===null?p(m):we(m)?t.attempt(xk,f,p)(m):(t.enter("codeFlowValue"),h(m))}function h(m){return m===null||we(m)?(t.exit("codeFlowValue"),f(m)):(t.consume(m),h)}function p(m){return t.exit("codeIndented"),l(m)}}function vk(t,l,i){const r=this;return s;function s(f){return r.parser.lazy[r.now().line]?i(f):we(f)?(t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),s):qe(t,o,"linePrefix",5)(f)}function o(f){const h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?l(f):we(f)?s(f):i(f)}}const kk={name:"codeText",previous:Sk,resolve:wk,tokenize:_k};function wk(t){let l=t.length-4,i=3,r,s;if((t[i][1].type==="lineEnding"||t[i][1].type==="space")&&(t[l][1].type==="lineEnding"||t[l][1].type==="space")){for(r=i;++r<l;)if(t[r][1].type==="codeTextData"){t[i][1].type="codeTextPadding",t[l][1].type="codeTextPadding",i+=2,l-=2;break}}for(r=i-1,l++;++r<=l;)s===void 0?r!==l&&t[r][1].type!=="lineEnding"&&(s=r):(r===l||t[r][1].type==="lineEnding")&&(t[s][1].type="codeTextData",r!==s+2&&(t[s][1].end=t[r-1][1].end,t.splice(s+2,r-s-2),l-=r-s-2,r=s+2),s=void 0);return t}function Sk(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function _k(t,l,i){let r=0,s,o;return f;function f(y){return t.enter("codeText"),t.enter("codeTextSequence"),h(y)}function h(y){return y===96?(t.consume(y),r++,h):(t.exit("codeTextSequence"),p(y))}function p(y){return y===null?i(y):y===32?(t.enter("space"),t.consume(y),t.exit("space"),p):y===96?(o=t.enter("codeTextSequence"),s=0,b(y)):we(y)?(t.enter("lineEnding"),t.consume(y),t.exit("lineEnding"),p):(t.enter("codeTextData"),m(y))}function m(y){return y===null||y===32||y===96||we(y)?(t.exit("codeTextData"),p(y)):(t.consume(y),m)}function b(y){return y===96?(t.consume(y),s++,b):s===r?(t.exit("codeTextSequence"),t.exit("codeText"),l(y)):(o.type="codeTextData",m(y))}}class Ek{constructor(l){this.left=l?[...l]:[],this.right=[]}get(l){if(l<0||l>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+l+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return l<this.left.length?this.left[l]:this.right[this.right.length-l+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(l,i){const r=i??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(l,r):l>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-l+this.left.length).reverse():this.left.slice(l).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(l,i,r){const s=i||0;this.setCursor(Math.trunc(l));const o=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return r&&gr(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(l){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(l)}pushMany(l){this.setCursor(Number.POSITIVE_INFINITY),gr(this.left,l)}unshift(l){this.setCursor(0),this.right.push(l)}unshiftMany(l){this.setCursor(0),gr(this.right,l.reverse())}setCursor(l){if(!(l===this.left.length||l>this.left.length&&this.right.length===0||l<0&&this.left.length===0))if(l<this.left.length){const i=this.left.splice(l,Number.POSITIVE_INFINITY);gr(this.right,i.reverse())}else{const i=this.right.splice(this.left.length+this.right.length-l,Number.POSITIVE_INFINITY);gr(this.left,i.reverse())}}}function gr(t,l){let i=0;if(l.length<1e4)t.push(...l);else for(;i<l.length;)t.push(...l.slice(i,i+1e4)),i+=1e4}function mx(t){const l={};let i=-1,r,s,o,f,h,p,m;const b=new Ek(t);for(;++i<b.length;){for(;i in l;)i=l[i];if(r=b.get(i),i&&r[1].type==="chunkFlow"&&b.get(i-1)[1].type==="listItemPrefix"&&(p=r[1]._tokenizer.events,o=0,o<p.length&&p[o][1].type==="lineEndingBlank"&&(o+=2),o<p.length&&p[o][1].type==="content"))for(;++o<p.length&&p[o][1].type!=="content";)p[o][1].type==="chunkText"&&(p[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(l,Ck(b,i)),i=l[i],m=!0);else if(r[1]._container){for(o=i,s=void 0;o--;)if(f=b.get(o),f[1].type==="lineEnding"||f[1].type==="lineEndingBlank")f[0]==="enter"&&(s&&(b.get(s)[1].type="lineEndingBlank"),f[1].type="lineEnding",s=o);else if(!(f[1].type==="linePrefix"||f[1].type==="listItemIndent"))break;s&&(r[1].end={...b.get(s)[1].start},h=b.slice(s,i),h.unshift(r),b.splice(s,i-s+1,h))}}return fn(t,0,Number.POSITIVE_INFINITY,b.slice(0)),!m}function Ck(t,l){const i=t.get(l)[1],r=t.get(l)[2];let s=l-1;const o=[];let f=i._tokenizer;f||(f=r.parser[i.contentType](i.start),i._contentTypeTextTrailing&&(f._contentTypeTextTrailing=!0));const h=f.events,p=[],m={};let b,y,k=-1,v=i,_=0,R=0;const H=[R];for(;v;){for(;t.get(++s)[1]!==v;);o.push(s),v._tokenizer||(b=r.sliceStream(v),v.next||b.push(null),y&&f.defineSkip(v.start),v._isInFirstContentOfListItem&&(f._gfmTasklistFirstContentOfListItem=!0),f.write(b),v._isInFirstContentOfListItem&&(f._gfmTasklistFirstContentOfListItem=void 0)),y=v,v=v.next}for(v=i;++k<h.length;)h[k][0]==="exit"&&h[k-1][0]==="enter"&&h[k][1].type===h[k-1][1].type&&h[k][1].start.line!==h[k][1].end.line&&(R=k+1,H.push(R),v._tokenizer=void 0,v.previous=void 0,v=v.next);for(f.events=[],v?(v._tokenizer=void 0,v.previous=void 0):H.pop(),k=H.length;k--;){const N=h.slice(H[k],H[k+1]),Z=o.pop();p.push([Z,Z+N.length-1]),t.splice(Z,2,N)}for(p.reverse(),k=-1;++k<p.length;)m[_+p[k][0]]=_+p[k][1],_+=p[k][1]-p[k][0]-1;return m}const Ak={resolve:Nk,tokenize:Tk},jk={partial:!0,tokenize:Dk};function Nk(t){return mx(t),t}function Tk(t,l){let i;return r;function r(h){return t.enter("content"),i=t.enter("chunkContent",{contentType:"content"}),s(h)}function s(h){return h===null?o(h):we(h)?t.check(jk,f,o)(h):(t.consume(h),s)}function o(h){return t.exit("chunkContent"),t.exit("content"),l(h)}function f(h){return t.consume(h),t.exit("chunkContent"),i.next=t.enter("chunkContent",{contentType:"content",previous:i}),i=i.next,s}}function Dk(t,l,i){const r=this;return s;function s(f){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),qe(t,o,"linePrefix")}function o(f){if(f===null||we(f))return i(f);const h=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?l(f):t.interrupt(r.parser.constructs.flow,i,l)(f)}}function px(t,l,i,r,s,o,f,h,p){const m=p||Number.POSITIVE_INFINITY;let b=0;return y;function y(N){return N===60?(t.enter(r),t.enter(s),t.enter(o),t.consume(N),t.exit(o),k):N===null||N===32||N===41||gs(N)?i(N):(t.enter(r),t.enter(f),t.enter(h),t.enter("chunkString",{contentType:"string"}),R(N))}function k(N){return N===62?(t.enter(o),t.consume(N),t.exit(o),t.exit(s),t.exit(r),l):(t.enter(h),t.enter("chunkString",{contentType:"string"}),v(N))}function v(N){return N===62?(t.exit("chunkString"),t.exit(h),k(N)):N===null||N===60||we(N)?i(N):(t.consume(N),N===92?_:v)}function _(N){return N===60||N===62||N===92?(t.consume(N),v):v(N)}function R(N){return!b&&(N===null||N===41||it(N))?(t.exit("chunkString"),t.exit(h),t.exit(f),t.exit(r),l(N)):b<m&&N===40?(t.consume(N),b++,R):N===41?(t.consume(N),b--,R):N===null||N===32||N===40||gs(N)?i(N):(t.consume(N),N===92?H:R)}function H(N){return N===40||N===41||N===92?(t.consume(N),R):R(N)}}function gx(t,l,i,r,s,o){const f=this;let h=0,p;return m;function m(v){return t.enter(r),t.enter(s),t.consume(v),t.exit(s),t.enter(o),b}function b(v){return h>999||v===null||v===91||v===93&&!p||v===94&&!h&&"_hiddenFootnoteSupport"in f.parser.constructs?i(v):v===93?(t.exit(o),t.enter(s),t.consume(v),t.exit(s),t.exit(r),l):we(v)?(t.enter("lineEnding"),t.consume(v),t.exit("lineEnding"),b):(t.enter("chunkString",{contentType:"string"}),y(v))}function y(v){return v===null||v===91||v===93||we(v)||h++>999?(t.exit("chunkString"),b(v)):(t.consume(v),p||(p=!Re(v)),v===92?k:y)}function k(v){return v===91||v===92||v===93?(t.consume(v),h++,y):y(v)}}function yx(t,l,i,r,s,o){let f;return h;function h(k){return k===34||k===39||k===40?(t.enter(r),t.enter(s),t.consume(k),t.exit(s),f=k===40?41:k,p):i(k)}function p(k){return k===f?(t.enter(s),t.consume(k),t.exit(s),t.exit(r),l):(t.enter(o),m(k))}function m(k){return k===f?(t.exit(o),p(f)):k===null?i(k):we(k)?(t.enter("lineEnding"),t.consume(k),t.exit("lineEnding"),qe(t,m,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),b(k))}function b(k){return k===f||k===null||we(k)?(t.exit("chunkString"),m(k)):(t.consume(k),k===92?y:b)}function y(k){return k===f||k===92?(t.consume(k),b):b(k)}}function kr(t,l){let i;return r;function r(s){return we(s)?(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),i=!0,r):Re(s)?qe(t,r,i?"linePrefix":"lineSuffix")(s):l(s)}}const zk={name:"definition",tokenize:Mk},Ok={partial:!0,tokenize:Rk};function Mk(t,l,i){const r=this;let s;return o;function o(v){return t.enter("definition"),f(v)}function f(v){return gx.call(r,t,h,i,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function h(v){return s=jn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),v===58?(t.enter("definitionMarker"),t.consume(v),t.exit("definitionMarker"),p):i(v)}function p(v){return it(v)?kr(t,m)(v):m(v)}function m(v){return px(t,b,i,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function b(v){return t.attempt(Ok,y,y)(v)}function y(v){return Re(v)?qe(t,k,"whitespace")(v):k(v)}function k(v){return v===null||we(v)?(t.exit("definition"),r.parser.defined.push(s),l(v)):i(v)}}function Rk(t,l,i){return r;function r(h){return it(h)?kr(t,s)(h):i(h)}function s(h){return yx(t,o,i,"definitionTitle","definitionTitleMarker","definitionTitleString")(h)}function o(h){return Re(h)?qe(t,f,"whitespace")(h):f(h)}function f(h){return h===null||we(h)?l(h):i(h)}}const Lk={name:"hardBreakEscape",tokenize:Bk};function Bk(t,l,i){return r;function r(o){return t.enter("hardBreakEscape"),t.consume(o),s}function s(o){return we(o)?(t.exit("hardBreakEscape"),l(o)):i(o)}}const Uk={name:"headingAtx",resolve:Hk,tokenize:qk};function Hk(t,l){let i=t.length-2,r=3,s,o;return t[r][1].type==="whitespace"&&(r+=2),i-2>r&&t[i][1].type==="whitespace"&&(i-=2),t[i][1].type==="atxHeadingSequence"&&(r===i-1||i-4>r&&t[i-2][1].type==="whitespace")&&(i-=r+1===i?2:4),i>r&&(s={type:"atxHeadingText",start:t[r][1].start,end:t[i][1].end},o={type:"chunkText",start:t[r][1].start,end:t[i][1].end,contentType:"text"},fn(t,r,i-r+1,[["enter",s,l],["enter",o,l],["exit",o,l],["exit",s,l]])),t}function qk(t,l,i){let r=0;return s;function s(b){return t.enter("atxHeading"),o(b)}function o(b){return t.enter("atxHeadingSequence"),f(b)}function f(b){return b===35&&r++<6?(t.consume(b),f):b===null||it(b)?(t.exit("atxHeadingSequence"),h(b)):i(b)}function h(b){return b===35?(t.enter("atxHeadingSequence"),p(b)):b===null||we(b)?(t.exit("atxHeading"),l(b)):Re(b)?qe(t,h,"whitespace")(b):(t.enter("atxHeadingText"),m(b))}function p(b){return b===35?(t.consume(b),p):(t.exit("atxHeadingSequence"),h(b))}function m(b){return b===null||b===35||it(b)?(t.exit("atxHeadingText"),h(b)):(t.consume(b),m)}}const Vk=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Kg=["pre","script","style","textarea"],Ik={concrete:!0,name:"htmlFlow",resolveTo:Fk,tokenize:Qk},Yk={partial:!0,tokenize:Xk},Zk={partial:!0,tokenize:Gk};function Fk(t){let l=t.length;for(;l--&&!(t[l][0]==="enter"&&t[l][1].type==="htmlFlow"););return l>1&&t[l-2][1].type==="linePrefix"&&(t[l][1].start=t[l-2][1].start,t[l+1][1].start=t[l-2][1].start,t.splice(l-2,2)),t}function Qk(t,l,i){const r=this;let s,o,f,h,p;return m;function m(S){return b(S)}function b(S){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(S),y}function y(S){return S===33?(t.consume(S),k):S===47?(t.consume(S),o=!0,R):S===63?(t.consume(S),s=3,r.interrupt?l:E):Vt(S)?(t.consume(S),f=String.fromCharCode(S),H):i(S)}function k(S){return S===45?(t.consume(S),s=2,v):S===91?(t.consume(S),s=5,h=0,_):Vt(S)?(t.consume(S),s=4,r.interrupt?l:E):i(S)}function v(S){return S===45?(t.consume(S),r.interrupt?l:E):i(S)}function _(S){const re="CDATA[";return S===re.charCodeAt(h++)?(t.consume(S),h===re.length?r.interrupt?l:J:_):i(S)}function R(S){return Vt(S)?(t.consume(S),f=String.fromCharCode(S),H):i(S)}function H(S){if(S===null||S===47||S===62||it(S)){const re=S===47,de=f.toLowerCase();return!re&&!o&&Kg.includes(de)?(s=1,r.interrupt?l(S):J(S)):Vk.includes(f.toLowerCase())?(s=6,re?(t.consume(S),N):r.interrupt?l(S):J(S)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?i(S):o?Z(S):q(S))}return S===45||Lt(S)?(t.consume(S),f+=String.fromCharCode(S),H):i(S)}function N(S){return S===62?(t.consume(S),r.interrupt?l:J):i(S)}function Z(S){return Re(S)?(t.consume(S),Z):M(S)}function q(S){return S===47?(t.consume(S),M):S===58||S===95||Vt(S)?(t.consume(S),te):Re(S)?(t.consume(S),q):M(S)}function te(S){return S===45||S===46||S===58||S===95||Lt(S)?(t.consume(S),te):ee(S)}function ee(S){return S===61?(t.consume(S),O):Re(S)?(t.consume(S),ee):q(S)}function O(S){return S===null||S===60||S===61||S===62||S===96?i(S):S===34||S===39?(t.consume(S),p=S,P):Re(S)?(t.consume(S),O):oe(S)}function P(S){return S===p?(t.consume(S),p=null,fe):S===null||we(S)?i(S):(t.consume(S),P)}function oe(S){return S===null||S===34||S===39||S===47||S===60||S===61||S===62||S===96||it(S)?ee(S):(t.consume(S),oe)}function fe(S){return S===47||S===62||Re(S)?q(S):i(S)}function M(S){return S===62?(t.consume(S),Y):i(S)}function Y(S){return S===null||we(S)?J(S):Re(S)?(t.consume(S),Y):i(S)}function J(S){return S===45&&s===2?(t.consume(S),T):S===60&&s===1?(t.consume(S),X):S===62&&s===4?(t.consume(S),A):S===63&&s===3?(t.consume(S),E):S===93&&s===5?(t.consume(S),je):we(S)&&(s===6||s===7)?(t.exit("htmlFlowData"),t.check(Yk,F,ve)(S)):S===null||we(S)?(t.exit("htmlFlowData"),ve(S)):(t.consume(S),J)}function ve(S){return t.check(Zk,ue,F)(S)}function ue(S){return t.enter("lineEnding"),t.consume(S),t.exit("lineEnding"),W}function W(S){return S===null||we(S)?ve(S):(t.enter("htmlFlowData"),J(S))}function T(S){return S===45?(t.consume(S),E):J(S)}function X(S){return S===47?(t.consume(S),f="",se):J(S)}function se(S){if(S===62){const re=f.toLowerCase();return Kg.includes(re)?(t.consume(S),A):J(S)}return Vt(S)&&f.length<8?(t.consume(S),f+=String.fromCharCode(S),se):J(S)}function je(S){return S===93?(t.consume(S),E):J(S)}function E(S){return S===62?(t.consume(S),A):S===45&&s===2?(t.consume(S),E):J(S)}function A(S){return S===null||we(S)?(t.exit("htmlFlowData"),F(S)):(t.consume(S),A)}function F(S){return t.exit("htmlFlow"),l(S)}}function Gk(t,l,i){const r=this;return s;function s(f){return we(f)?(t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),o):i(f)}function o(f){return r.parser.lazy[r.now().line]?i(f):l(f)}}function Xk(t,l,i){return r;function r(s){return t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),t.attempt(Nr,l,i)}}const Jk={name:"htmlText",tokenize:Kk};function Kk(t,l,i){const r=this;let s,o,f;return h;function h(E){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(E),p}function p(E){return E===33?(t.consume(E),m):E===47?(t.consume(E),ee):E===63?(t.consume(E),q):Vt(E)?(t.consume(E),oe):i(E)}function m(E){return E===45?(t.consume(E),b):E===91?(t.consume(E),o=0,_):Vt(E)?(t.consume(E),Z):i(E)}function b(E){return E===45?(t.consume(E),v):i(E)}function y(E){return E===null?i(E):E===45?(t.consume(E),k):we(E)?(f=y,X(E)):(t.consume(E),y)}function k(E){return E===45?(t.consume(E),v):y(E)}function v(E){return E===62?T(E):E===45?k(E):y(E)}function _(E){const A="CDATA[";return E===A.charCodeAt(o++)?(t.consume(E),o===A.length?R:_):i(E)}function R(E){return E===null?i(E):E===93?(t.consume(E),H):we(E)?(f=R,X(E)):(t.consume(E),R)}function H(E){return E===93?(t.consume(E),N):R(E)}function N(E){return E===62?T(E):E===93?(t.consume(E),N):R(E)}function Z(E){return E===null||E===62?T(E):we(E)?(f=Z,X(E)):(t.consume(E),Z)}function q(E){return E===null?i(E):E===63?(t.consume(E),te):we(E)?(f=q,X(E)):(t.consume(E),q)}function te(E){return E===62?T(E):q(E)}function ee(E){return Vt(E)?(t.consume(E),O):i(E)}function O(E){return E===45||Lt(E)?(t.consume(E),O):P(E)}function P(E){return we(E)?(f=P,X(E)):Re(E)?(t.consume(E),P):T(E)}function oe(E){return E===45||Lt(E)?(t.consume(E),oe):E===47||E===62||it(E)?fe(E):i(E)}function fe(E){return E===47?(t.consume(E),T):E===58||E===95||Vt(E)?(t.consume(E),M):we(E)?(f=fe,X(E)):Re(E)?(t.consume(E),fe):T(E)}function M(E){return E===45||E===46||E===58||E===95||Lt(E)?(t.consume(E),M):Y(E)}function Y(E){return E===61?(t.consume(E),J):we(E)?(f=Y,X(E)):Re(E)?(t.consume(E),Y):fe(E)}function J(E){return E===null||E===60||E===61||E===62||E===96?i(E):E===34||E===39?(t.consume(E),s=E,ve):we(E)?(f=J,X(E)):Re(E)?(t.consume(E),J):(t.consume(E),ue)}function ve(E){return E===s?(t.consume(E),s=void 0,W):E===null?i(E):we(E)?(f=ve,X(E)):(t.consume(E),ve)}function ue(E){return E===null||E===34||E===39||E===60||E===61||E===96?i(E):E===47||E===62||it(E)?fe(E):(t.consume(E),ue)}function W(E){return E===47||E===62||it(E)?fe(E):i(E)}function T(E){return E===62?(t.consume(E),t.exit("htmlTextData"),t.exit("htmlText"),l):i(E)}function X(E){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(E),t.exit("lineEnding"),se}function se(E){return Re(E)?qe(t,je,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E):je(E)}function je(E){return t.enter("htmlTextData"),f(E)}}const nd={name:"labelEnd",resolveAll:ew,resolveTo:tw,tokenize:nw},$k={tokenize:lw},Pk={tokenize:aw},Wk={tokenize:iw};function ew(t){let l=-1;const i=[];for(;++l<t.length;){const r=t[l][1];if(i.push(t[l]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const s=r.type==="labelImage"?4:2;r.type="data",l+=s}}return t.length!==i.length&&fn(t,0,t.length,i),t}function tw(t,l){let i=t.length,r=0,s,o,f,h;for(;i--;)if(s=t[i][1],o){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;t[i][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(f){if(t[i][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(o=i,s.type!=="labelLink")){r=2;break}}else s.type==="labelEnd"&&(f=i);const p={type:t[o][1].type==="labelLink"?"link":"image",start:{...t[o][1].start},end:{...t[t.length-1][1].end}},m={type:"label",start:{...t[o][1].start},end:{...t[f][1].end}},b={type:"labelText",start:{...t[o+r+2][1].end},end:{...t[f-2][1].start}};return h=[["enter",p,l],["enter",m,l]],h=wn(h,t.slice(o+1,o+r+3)),h=wn(h,[["enter",b,l]]),h=wn(h,Cs(l.parser.constructs.insideSpan.null,t.slice(o+r+4,f-3),l)),h=wn(h,[["exit",b,l],t[f-2],t[f-1],["exit",m,l]]),h=wn(h,t.slice(f+1)),h=wn(h,[["exit",p,l]]),fn(t,o,t.length,h),t}function nw(t,l,i){const r=this;let s=r.events.length,o,f;for(;s--;)if((r.events[s][1].type==="labelImage"||r.events[s][1].type==="labelLink")&&!r.events[s][1]._balanced){o=r.events[s][1];break}return h;function h(k){return o?o._inactive?y(k):(f=r.parser.defined.includes(jn(r.sliceSerialize({start:o.end,end:r.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(k),t.exit("labelMarker"),t.exit("labelEnd"),p):i(k)}function p(k){return k===40?t.attempt($k,b,f?b:y)(k):k===91?t.attempt(Pk,b,f?m:y)(k):f?b(k):y(k)}function m(k){return t.attempt(Wk,b,y)(k)}function b(k){return l(k)}function y(k){return o._balanced=!0,i(k)}}function lw(t,l,i){return r;function r(y){return t.enter("resource"),t.enter("resourceMarker"),t.consume(y),t.exit("resourceMarker"),s}function s(y){return it(y)?kr(t,o)(y):o(y)}function o(y){return y===41?b(y):px(t,f,h,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(y)}function f(y){return it(y)?kr(t,p)(y):b(y)}function h(y){return i(y)}function p(y){return y===34||y===39||y===40?yx(t,m,i,"resourceTitle","resourceTitleMarker","resourceTitleString")(y):b(y)}function m(y){return it(y)?kr(t,b)(y):b(y)}function b(y){return y===41?(t.enter("resourceMarker"),t.consume(y),t.exit("resourceMarker"),t.exit("resource"),l):i(y)}}function aw(t,l,i){const r=this;return s;function s(h){return gx.call(r,t,o,f,"reference","referenceMarker","referenceString")(h)}function o(h){return r.parser.defined.includes(jn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?l(h):i(h)}function f(h){return i(h)}}function iw(t,l,i){return r;function r(o){return t.enter("reference"),t.enter("referenceMarker"),t.consume(o),t.exit("referenceMarker"),s}function s(o){return o===93?(t.enter("referenceMarker"),t.consume(o),t.exit("referenceMarker"),t.exit("reference"),l):i(o)}}const rw={name:"labelStartImage",resolveAll:nd.resolveAll,tokenize:uw};function uw(t,l,i){const r=this;return s;function s(h){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(h),t.exit("labelImageMarker"),o}function o(h){return h===91?(t.enter("labelMarker"),t.consume(h),t.exit("labelMarker"),t.exit("labelImage"),f):i(h)}function f(h){return h===94&&"_hiddenFootnoteSupport"in r.parser.constructs?i(h):l(h)}}const sw={name:"labelStartLink",resolveAll:nd.resolveAll,tokenize:ow};function ow(t,l,i){const r=this;return s;function s(f){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(f),t.exit("labelMarker"),t.exit("labelLink"),o}function o(f){return f===94&&"_hiddenFootnoteSupport"in r.parser.constructs?i(f):l(f)}}const nf={name:"lineEnding",tokenize:cw};function cw(t,l){return i;function i(r){return t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),qe(t,l,"linePrefix")}}const Wu={name:"thematicBreak",tokenize:fw};function fw(t,l,i){let r=0,s;return o;function o(m){return t.enter("thematicBreak"),f(m)}function f(m){return s=m,h(m)}function h(m){return m===s?(t.enter("thematicBreakSequence"),p(m)):r>=3&&(m===null||we(m))?(t.exit("thematicBreak"),l(m)):i(m)}function p(m){return m===s?(t.consume(m),r++,p):(t.exit("thematicBreakSequence"),Re(m)?qe(t,h,"whitespace")(m):h(m))}}const Pt={continuation:{tokenize:pw},exit:yw,name:"list",tokenize:mw},dw={partial:!0,tokenize:xw},hw={partial:!0,tokenize:gw};function mw(t,l,i){const r=this,s=r.events[r.events.length-1];let o=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,f=0;return h;function h(v){const _=r.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(_==="listUnordered"?!r.containerState.marker||v===r.containerState.marker:Df(v)){if(r.containerState.type||(r.containerState.type=_,t.enter(_,{_container:!0})),_==="listUnordered")return t.enter("listItemPrefix"),v===42||v===45?t.check(Wu,i,m)(v):m(v);if(!r.interrupt||v===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),p(v)}return i(v)}function p(v){return Df(v)&&++f<10?(t.consume(v),p):(!r.interrupt||f<2)&&(r.containerState.marker?v===r.containerState.marker:v===41||v===46)?(t.exit("listItemValue"),m(v)):i(v)}function m(v){return t.enter("listItemMarker"),t.consume(v),t.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||v,t.check(Nr,r.interrupt?i:b,t.attempt(dw,k,y))}function b(v){return r.containerState.initialBlankLine=!0,o++,k(v)}function y(v){return Re(v)?(t.enter("listItemPrefixWhitespace"),t.consume(v),t.exit("listItemPrefixWhitespace"),k):i(v)}function k(v){return r.containerState.size=o+r.sliceSerialize(t.exit("listItemPrefix"),!0).length,l(v)}}function pw(t,l,i){const r=this;return r.containerState._closeFlow=void 0,t.check(Nr,s,o);function s(h){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,qe(t,l,"listItemIndent",r.containerState.size+1)(h)}function o(h){return r.containerState.furtherBlankLines||!Re(h)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,f(h)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,t.attempt(hw,l,f)(h))}function f(h){return r.containerState._closeFlow=!0,r.interrupt=void 0,qe(t,t.attempt(Pt,l,i),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(h)}}function gw(t,l,i){const r=this;return qe(t,s,"listItemIndent",r.containerState.size+1);function s(o){const f=r.events[r.events.length-1];return f&&f[1].type==="listItemIndent"&&f[2].sliceSerialize(f[1],!0).length===r.containerState.size?l(o):i(o)}}function yw(t){t.exit(this.containerState.type)}function xw(t,l,i){const r=this;return qe(t,s,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(o){const f=r.events[r.events.length-1];return!Re(o)&&f&&f[1].type==="listItemPrefixWhitespace"?l(o):i(o)}}const $g={name:"setextUnderline",resolveTo:bw,tokenize:vw};function bw(t,l){let i=t.length,r,s,o;for(;i--;)if(t[i][0]==="enter"){if(t[i][1].type==="content"){r=i;break}t[i][1].type==="paragraph"&&(s=i)}else t[i][1].type==="content"&&t.splice(i,1),!o&&t[i][1].type==="definition"&&(o=i);const f={type:"setextHeading",start:{...t[r][1].start},end:{...t[t.length-1][1].end}};return t[s][1].type="setextHeadingText",o?(t.splice(s,0,["enter",f,l]),t.splice(o+1,0,["exit",t[r][1],l]),t[r][1].end={...t[o][1].end}):t[r][1]=f,t.push(["exit",f,l]),t}function vw(t,l,i){const r=this;let s;return o;function o(m){let b=r.events.length,y;for(;b--;)if(r.events[b][1].type!=="lineEnding"&&r.events[b][1].type!=="linePrefix"&&r.events[b][1].type!=="content"){y=r.events[b][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||y)?(t.enter("setextHeadingLine"),s=m,f(m)):i(m)}function f(m){return t.enter("setextHeadingLineSequence"),h(m)}function h(m){return m===s?(t.consume(m),h):(t.exit("setextHeadingLineSequence"),Re(m)?qe(t,p,"lineSuffix")(m):p(m))}function p(m){return m===null||we(m)?(t.exit("setextHeadingLine"),l(m)):i(m)}}const kw={tokenize:ww};function ww(t){const l=this,i=t.attempt(Nr,r,t.attempt(this.parser.constructs.flowInitial,s,qe(t,t.attempt(this.parser.constructs.flow,s,t.attempt(Ak,s)),"linePrefix")));return i;function r(o){if(o===null){t.consume(o);return}return t.enter("lineEndingBlank"),t.consume(o),t.exit("lineEndingBlank"),l.currentConstruct=void 0,i}function s(o){if(o===null){t.consume(o);return}return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),l.currentConstruct=void 0,i}}const Sw={resolveAll:bx()},_w=xx("string"),Ew=xx("text");function xx(t){return{resolveAll:bx(t==="text"?Cw:void 0),tokenize:l};function l(i){const r=this,s=this.parser.constructs[t],o=i.attempt(s,f,h);return f;function f(b){return m(b)?o(b):h(b)}function h(b){if(b===null){i.consume(b);return}return i.enter("data"),i.consume(b),p}function p(b){return m(b)?(i.exit("data"),o(b)):(i.consume(b),p)}function m(b){if(b===null)return!0;const y=s[b];let k=-1;if(y)for(;++k<y.length;){const v=y[k];if(!v.previous||v.previous.call(r,r.previous))return!0}return!1}}}function bx(t){return l;function l(i,r){let s=-1,o;for(;++s<=i.length;)o===void 0?i[s]&&i[s][1].type==="data"&&(o=s,s++):(!i[s]||i[s][1].type!=="data")&&(s!==o+2&&(i[o][1].end=i[s-1][1].end,i.splice(o+2,s-o-2),s=o+2),o=void 0);return t?t(i,r):i}}function Cw(t,l){let i=0;for(;++i<=t.length;)if((i===t.length||t[i][1].type==="lineEnding")&&t[i-1][1].type==="data"){const r=t[i-1][1],s=l.sliceStream(r);let o=s.length,f=-1,h=0,p;for(;o--;){const m=s[o];if(typeof m=="string"){for(f=m.length;m.charCodeAt(f-1)===32;)h++,f--;if(f)break;f=-1}else if(m===-2)p=!0,h++;else if(m!==-1){o++;break}}if(l._contentTypeTextTrailing&&i===t.length&&(h=0),h){const m={type:i===t.length||p||h<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?f:r.start._bufferIndex+f,_index:r.start._index+o,line:r.end.line,column:r.end.column-h,offset:r.end.offset-h},end:{...r.end}};r.end={...m.start},r.start.offset===r.end.offset?Object.assign(r,m):(t.splice(i,0,["enter",m,l],["exit",m,l]),i+=2)}i++}return t}const Aw={42:Pt,43:Pt,45:Pt,48:Pt,49:Pt,50:Pt,51:Pt,52:Pt,53:Pt,54:Pt,55:Pt,56:Pt,57:Pt,62:fx},jw={91:zk},Nw={[-2]:tf,[-1]:tf,32:tf},Tw={35:Uk,42:Wu,45:[$g,Wu],60:Ik,61:$g,95:Wu,96:Jg,126:Jg},Dw={38:hx,92:dx},zw={[-5]:nf,[-4]:nf,[-3]:nf,33:rw,38:hx,42:zf,60:[sk,Jk],91:sw,92:[Lk,dx],93:nd,95:zf,96:kk},Ow={null:[zf,Sw]},Mw={null:[42,95]},Rw={null:[]},Lw=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Mw,contentInitial:jw,disable:Rw,document:Aw,flow:Tw,flowInitial:Nw,insideSpan:Ow,string:Dw,text:zw},Symbol.toStringTag,{value:"Module"}));function Bw(t,l,i){let r={_bufferIndex:-1,_index:0,line:i&&i.line||1,column:i&&i.column||1,offset:i&&i.offset||0};const s={},o=[];let f=[],h=[];const p={attempt:P(ee),check:P(O),consume:Z,enter:q,exit:te,interrupt:P(O,{interrupt:!0})},m={code:null,containerState:{},defineSkip:R,events:[],now:_,parser:t,previous:null,sliceSerialize:k,sliceStream:v,write:y};let b=l.tokenize.call(m,p);return l.resolveAll&&o.push(l),m;function y(Y){return f=wn(f,Y),H(),f[f.length-1]!==null?[]:(oe(l,0),m.events=Cs(o,m.events,m),m.events)}function k(Y,J){return Hw(v(Y),J)}function v(Y){return Uw(f,Y)}function _(){const{_bufferIndex:Y,_index:J,line:ve,column:ue,offset:W}=r;return{_bufferIndex:Y,_index:J,line:ve,column:ue,offset:W}}function R(Y){s[Y.line]=Y.column,M()}function H(){let Y;for(;r._index<f.length;){const J=f[r._index];if(typeof J=="string")for(Y=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===Y&&r._bufferIndex<J.length;)N(J.charCodeAt(r._bufferIndex));else N(J)}}function N(Y){b=b(Y)}function Z(Y){we(Y)?(r.line++,r.column=1,r.offset+=Y===-3?2:1,M()):Y!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===f[r._index].length&&(r._bufferIndex=-1,r._index++)),m.previous=Y}function q(Y,J){const ve=J||{};return ve.type=Y,ve.start=_(),m.events.push(["enter",ve,m]),h.push(ve),ve}function te(Y){const J=h.pop();return J.end=_(),m.events.push(["exit",J,m]),J}function ee(Y,J){oe(Y,J.from)}function O(Y,J){J.restore()}function P(Y,J){return ve;function ve(ue,W,T){let X,se,je,E;return Array.isArray(ue)?F(ue):"tokenize"in ue?F([ue]):A(ue);function A(ne){return xe;function xe(Qe){const Ve=Qe!==null&&ne[Qe],wt=Qe!==null&&ne.null,en=[...Array.isArray(Ve)?Ve:Ve?[Ve]:[],...Array.isArray(wt)?wt:wt?[wt]:[]];return F(en)(Qe)}}function F(ne){return X=ne,se=0,ne.length===0?T:S(ne[se])}function S(ne){return xe;function xe(Qe){return E=fe(),je=ne,ne.partial||(m.currentConstruct=ne),ne.name&&m.parser.constructs.disable.null.includes(ne.name)?de():ne.tokenize.call(J?Object.assign(Object.create(m),J):m,p,re,de)(Qe)}}function re(ne){return Y(je,E),W}function de(ne){return E.restore(),++se<X.length?S(X[se]):T}}}function oe(Y,J){Y.resolveAll&&!o.includes(Y)&&o.push(Y),Y.resolve&&fn(m.events,J,m.events.length-J,Y.resolve(m.events.slice(J),m)),Y.resolveTo&&(m.events=Y.resolveTo(m.events,m))}function fe(){const Y=_(),J=m.previous,ve=m.currentConstruct,ue=m.events.length,W=Array.from(h);return{from:ue,restore:T};function T(){r=Y,m.previous=J,m.currentConstruct=ve,m.events.length=ue,h=W,M()}}function M(){r.line in s&&r.column<2&&(r.column=s[r.line],r.offset+=s[r.line]-1)}}function Uw(t,l){const i=l.start._index,r=l.start._bufferIndex,s=l.end._index,o=l.end._bufferIndex;let f;if(i===s)f=[t[i].slice(r,o)];else{if(f=t.slice(i,s),r>-1){const h=f[0];typeof h=="string"?f[0]=h.slice(r):f.shift()}o>0&&f.push(t[s].slice(0,o))}return f}function Hw(t,l){let i=-1;const r=[];let s;for(;++i<t.length;){const o=t[i];let f;if(typeof o=="string")f=o;else switch(o){case-5:{f="\r";break}case-4:{f=`
51
+ `;break}case-3:{f=`\r
52
+ `;break}case-2:{f=l?" ":" ";break}case-1:{if(!l&&s)continue;f=" ";break}default:f=String.fromCharCode(o)}s=o===-2,r.push(f)}return r.join("")}function qw(t){const r={constructs:ox([Lw,...(t||{}).extensions||[]]),content:s(tk),defined:[],document:s(lk),flow:s(kw),lazy:{},string:s(_w),text:s(Ew)};return r;function s(o){return f;function f(h){return Bw(r,o,h)}}}function Vw(t){for(;!mx(t););return t}const Pg=/[\0\t\n\r]/g;function Iw(){let t=1,l="",i=!0,r;return s;function s(o,f,h){const p=[];let m,b,y,k,v;for(o=l+(typeof o=="string"?o.toString():new TextDecoder(f||void 0).decode(o)),y=0,l="",i&&(o.charCodeAt(0)===65279&&y++,i=void 0);y<o.length;){if(Pg.lastIndex=y,m=Pg.exec(o),k=m&&m.index!==void 0?m.index:o.length,v=o.charCodeAt(k),!m){l=o.slice(y);break}if(v===10&&y===k&&r)p.push(-3),r=void 0;else switch(r&&(p.push(-5),r=void 0),y<k&&(p.push(o.slice(y,k)),t+=k-y),v){case 0:{p.push(65533),t++;break}case 9:{for(b=Math.ceil(t/4)*4,p.push(-2);t++<b;)p.push(-1);break}case 10:{p.push(-4),t=1;break}default:r=!0,t=1}y=k+1}return h&&(r&&p.push(-5),l&&p.push(l),p.push(null)),p}}const Yw=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Zw(t){return t.replace(Yw,Fw)}function Fw(t,l,i){if(l)return l;if(i.charCodeAt(0)===35){const s=i.charCodeAt(1),o=s===120||s===88;return cx(i.slice(o?2:1),o?16:10)}return td(i)||t}const vx={}.hasOwnProperty;function Qw(t,l,i){return l&&typeof l=="object"&&(i=l,l=void 0),Gw(i)(Vw(qw(i).document().write(Iw()(t,l,!0))))}function Gw(t){const l={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(ml),autolinkProtocol:fe,autolinkEmail:fe,atxHeading:o(hl),blockQuote:o(wt),characterEscape:fe,characterReference:fe,codeFenced:o(en),codeFencedFenceInfo:f,codeFencedFenceMeta:f,codeIndented:o(en,f),codeText:o(dl,f),codeTextData:fe,data:fe,codeFlowValue:fe,definition:o(Hn),definitionDestinationString:f,definitionLabelString:f,definitionTitleString:f,emphasis:o(St),hardBreakEscape:o(Nn),hardBreakTrailing:o(Nn),htmlFlow:o(Sa,f),htmlFlowData:fe,htmlText:o(Sa,f),htmlTextData:fe,image:o(Gl),label:f,link:o(ml),listItem:o(gl),listItemValue:k,listOrdered:o(pl,y),listUnordered:o(pl),paragraph:o(bi),reference:S,referenceString:f,resourceDestinationString:f,resourceTitleString:f,setextHeading:o(hl),strong:o(vi),thematicBreak:o(Ye)},exit:{atxHeading:p(),atxHeadingSequence:ee,autolink:p(),autolinkEmail:Ve,autolinkProtocol:Qe,blockQuote:p(),characterEscapeValue:M,characterReferenceMarkerHexadecimal:de,characterReferenceMarkerNumeric:de,characterReferenceValue:ne,characterReference:xe,codeFenced:p(H),codeFencedFence:R,codeFencedFenceInfo:v,codeFencedFenceMeta:_,codeFlowValue:M,codeIndented:p(N),codeText:p(W),codeTextData:M,data:M,definition:p(),definitionDestinationString:te,definitionLabelString:Z,definitionTitleString:q,emphasis:p(),hardBreakEscape:p(J),hardBreakTrailing:p(J),htmlFlow:p(ve),htmlFlowData:M,htmlText:p(ue),htmlTextData:M,image:p(X),label:je,labelText:se,lineEnding:Y,link:p(T),listItem:p(),listOrdered:p(),listUnordered:p(),paragraph:p(),referenceString:re,resourceDestinationString:E,resourceTitleString:A,resource:F,setextHeading:p(oe),setextHeadingLineSequence:P,setextHeadingText:O,strong:p(),thematicBreak:p()}};kx(l,(t||{}).mdastExtensions||[]);const i={};return r;function r(Q){let ie={type:"root",children:[]};const be={stack:[ie],tokenStack:[],config:l,enter:h,exit:m,buffer:f,resume:b,data:i},Ce=[];let Xe=-1;for(;++Xe<Q.length;)if(Q[Xe][1].type==="listOrdered"||Q[Xe][1].type==="listUnordered")if(Q[Xe][0]==="enter")Ce.push(Xe);else{const tn=Ce.pop();Xe=s(Q,tn,Xe)}for(Xe=-1;++Xe<Q.length;){const tn=l[Q[Xe][0]];vx.call(tn,Q[Xe][1].type)&&tn[Q[Xe][1].type].call(Object.assign({sliceSerialize:Q[Xe][2].sliceSerialize},be),Q[Xe][1])}if(be.tokenStack.length>0){const tn=be.tokenStack[be.tokenStack.length-1];(tn[1]||Wg).call(be,void 0,tn[0])}for(ie.position={start:Il(Q.length>0?Q[0][1].start:{line:1,column:1,offset:0}),end:Il(Q.length>0?Q[Q.length-2][1].end:{line:1,column:1,offset:0})},Xe=-1;++Xe<l.transforms.length;)ie=l.transforms[Xe](ie)||ie;return ie}function s(Q,ie,be){let Ce=ie-1,Xe=-1,tn=!1,qn,Ut,_t,Zt;for(;++Ce<=be;){const tt=Q[Ce];switch(tt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{tt[0]==="enter"?Xe++:Xe--,Zt=void 0;break}case"lineEndingBlank":{tt[0]==="enter"&&(qn&&!Zt&&!Xe&&!_t&&(_t=Ce),Zt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Zt=void 0}if(!Xe&&tt[0]==="enter"&&tt[1].type==="listItemPrefix"||Xe===-1&&tt[0]==="exit"&&(tt[1].type==="listUnordered"||tt[1].type==="listOrdered")){if(qn){let yl=Ce;for(Ut=void 0;yl--;){const _n=Q[yl];if(_n[1].type==="lineEnding"||_n[1].type==="lineEndingBlank"){if(_n[0]==="exit")continue;Ut&&(Q[Ut][1].type="lineEndingBlank",tn=!0),_n[1].type="lineEnding",Ut=yl}else if(!(_n[1].type==="linePrefix"||_n[1].type==="blockQuotePrefix"||_n[1].type==="blockQuotePrefixWhitespace"||_n[1].type==="blockQuoteMarker"||_n[1].type==="listItemIndent"))break}_t&&(!Ut||_t<Ut)&&(qn._spread=!0),qn.end=Object.assign({},Ut?Q[Ut][1].start:tt[1].end),Q.splice(Ut||Ce,0,["exit",qn,tt[2]]),Ce++,be++}if(tt[1].type==="listItemPrefix"){const yl={type:"listItem",_spread:!1,start:Object.assign({},tt[1].start),end:void 0};qn=yl,Q.splice(Ce,0,["enter",yl,tt[2]]),Ce++,be++,_t=void 0,Zt=!0}}}return Q[ie][1]._spread=tn,be}function o(Q,ie){return be;function be(Ce){h.call(this,Q(Ce),Ce),ie&&ie.call(this,Ce)}}function f(){this.stack.push({type:"fragment",children:[]})}function h(Q,ie,be){this.stack[this.stack.length-1].children.push(Q),this.stack.push(Q),this.tokenStack.push([ie,be||void 0]),Q.position={start:Il(ie.start),end:void 0}}function p(Q){return ie;function ie(be){Q&&Q.call(this,be),m.call(this,be)}}function m(Q,ie){const be=this.stack.pop(),Ce=this.tokenStack.pop();if(Ce)Ce[0].type!==Q.type&&(ie?ie.call(this,Q,Ce[0]):(Ce[1]||Wg).call(this,Q,Ce[0]));else throw new Error("Cannot close `"+Q.type+"` ("+vr({start:Q.start,end:Q.end})+"): it’s not open");be.position.end=Il(Q.end)}function b(){return ed(this.stack.pop())}function y(){this.data.expectingFirstListItemValue=!0}function k(Q){if(this.data.expectingFirstListItemValue){const ie=this.stack[this.stack.length-2];ie.start=Number.parseInt(this.sliceSerialize(Q),10),this.data.expectingFirstListItemValue=void 0}}function v(){const Q=this.resume(),ie=this.stack[this.stack.length-1];ie.lang=Q}function _(){const Q=this.resume(),ie=this.stack[this.stack.length-1];ie.meta=Q}function R(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function H(){const Q=this.resume(),ie=this.stack[this.stack.length-1];ie.value=Q.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function N(){const Q=this.resume(),ie=this.stack[this.stack.length-1];ie.value=Q.replace(/(\r?\n|\r)$/g,"")}function Z(Q){const ie=this.resume(),be=this.stack[this.stack.length-1];be.label=ie,be.identifier=jn(this.sliceSerialize(Q)).toLowerCase()}function q(){const Q=this.resume(),ie=this.stack[this.stack.length-1];ie.title=Q}function te(){const Q=this.resume(),ie=this.stack[this.stack.length-1];ie.url=Q}function ee(Q){const ie=this.stack[this.stack.length-1];if(!ie.depth){const be=this.sliceSerialize(Q).length;ie.depth=be}}function O(){this.data.setextHeadingSlurpLineEnding=!0}function P(Q){const ie=this.stack[this.stack.length-1];ie.depth=this.sliceSerialize(Q).codePointAt(0)===61?1:2}function oe(){this.data.setextHeadingSlurpLineEnding=void 0}function fe(Q){const be=this.stack[this.stack.length-1].children;let Ce=be[be.length-1];(!Ce||Ce.type!=="text")&&(Ce=pt(),Ce.position={start:Il(Q.start),end:void 0},be.push(Ce)),this.stack.push(Ce)}function M(Q){const ie=this.stack.pop();ie.value+=this.sliceSerialize(Q),ie.position.end=Il(Q.end)}function Y(Q){const ie=this.stack[this.stack.length-1];if(this.data.atHardBreak){const be=ie.children[ie.children.length-1];be.position.end=Il(Q.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&l.canContainEols.includes(ie.type)&&(fe.call(this,Q),M.call(this,Q))}function J(){this.data.atHardBreak=!0}function ve(){const Q=this.resume(),ie=this.stack[this.stack.length-1];ie.value=Q}function ue(){const Q=this.resume(),ie=this.stack[this.stack.length-1];ie.value=Q}function W(){const Q=this.resume(),ie=this.stack[this.stack.length-1];ie.value=Q}function T(){const Q=this.stack[this.stack.length-1];if(this.data.inReference){const ie=this.data.referenceType||"shortcut";Q.type+="Reference",Q.referenceType=ie,delete Q.url,delete Q.title}else delete Q.identifier,delete Q.label;this.data.referenceType=void 0}function X(){const Q=this.stack[this.stack.length-1];if(this.data.inReference){const ie=this.data.referenceType||"shortcut";Q.type+="Reference",Q.referenceType=ie,delete Q.url,delete Q.title}else delete Q.identifier,delete Q.label;this.data.referenceType=void 0}function se(Q){const ie=this.sliceSerialize(Q),be=this.stack[this.stack.length-2];be.label=Zw(ie),be.identifier=jn(ie).toLowerCase()}function je(){const Q=this.stack[this.stack.length-1],ie=this.resume(),be=this.stack[this.stack.length-1];if(this.data.inReference=!0,be.type==="link"){const Ce=Q.children;be.children=Ce}else be.alt=ie}function E(){const Q=this.resume(),ie=this.stack[this.stack.length-1];ie.url=Q}function A(){const Q=this.resume(),ie=this.stack[this.stack.length-1];ie.title=Q}function F(){this.data.inReference=void 0}function S(){this.data.referenceType="collapsed"}function re(Q){const ie=this.resume(),be=this.stack[this.stack.length-1];be.label=ie,be.identifier=jn(this.sliceSerialize(Q)).toLowerCase(),this.data.referenceType="full"}function de(Q){this.data.characterReferenceType=Q.type}function ne(Q){const ie=this.sliceSerialize(Q),be=this.data.characterReferenceType;let Ce;be?(Ce=cx(ie,be==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ce=td(ie);const Xe=this.stack[this.stack.length-1];Xe.value+=Ce}function xe(Q){const ie=this.stack.pop();ie.position.end=Il(Q.end)}function Qe(Q){M.call(this,Q);const ie=this.stack[this.stack.length-1];ie.url=this.sliceSerialize(Q)}function Ve(Q){M.call(this,Q);const ie=this.stack[this.stack.length-1];ie.url="mailto:"+this.sliceSerialize(Q)}function wt(){return{type:"blockquote",children:[]}}function en(){return{type:"code",lang:null,meta:null,value:""}}function dl(){return{type:"inlineCode",value:""}}function Hn(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function St(){return{type:"emphasis",children:[]}}function hl(){return{type:"heading",depth:0,children:[]}}function Nn(){return{type:"break"}}function Sa(){return{type:"html",value:""}}function Gl(){return{type:"image",title:null,url:"",alt:null}}function ml(){return{type:"link",title:null,url:"",children:[]}}function pl(Q){return{type:"list",ordered:Q.type==="listOrdered",start:null,spread:Q._spread,children:[]}}function gl(Q){return{type:"listItem",spread:Q._spread,checked:null,children:[]}}function bi(){return{type:"paragraph",children:[]}}function vi(){return{type:"strong",children:[]}}function pt(){return{type:"text",value:""}}function Ye(){return{type:"thematicBreak"}}}function Il(t){return{line:t.line,column:t.column,offset:t.offset}}function kx(t,l){let i=-1;for(;++i<l.length;){const r=l[i];Array.isArray(r)?kx(t,r):Xw(t,r)}}function Xw(t,l){let i;for(i in l)if(vx.call(l,i))switch(i){case"canContainEols":{const r=l[i];r&&t[i].push(...r);break}case"transforms":{const r=l[i];r&&t[i].push(...r);break}case"enter":case"exit":{const r=l[i];r&&Object.assign(t[i],r);break}}}function Wg(t,l){throw t?new Error("Cannot close `"+t.type+"` ("+vr({start:t.start,end:t.end})+"): a different token (`"+l.type+"`, "+vr({start:l.start,end:l.end})+") is open"):new Error("Cannot close document, a token (`"+l.type+"`, "+vr({start:l.start,end:l.end})+") is still open")}function Jw(t){const l=this;l.parser=i;function i(r){return Qw(r,{...l.data("settings"),...t,extensions:l.data("micromarkExtensions")||[],mdastExtensions:l.data("fromMarkdownExtensions")||[]})}}function Kw(t,l){const i={type:"element",tagName:"blockquote",properties:{},children:t.wrap(t.all(l),!0)};return t.patch(l,i),t.applyData(l,i)}function $w(t,l){const i={type:"element",tagName:"br",properties:{},children:[]};return t.patch(l,i),[t.applyData(l,i),{type:"text",value:`
53
+ `}]}function Pw(t,l){const i=l.value?l.value+`
54
+ `:"",r={},s=l.lang?l.lang.split(/\s+/):[];s.length>0&&(r.className=["language-"+s[0]]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:i}]};return l.meta&&(o.data={meta:l.meta}),t.patch(l,o),o=t.applyData(l,o),o={type:"element",tagName:"pre",properties:{},children:[o]},t.patch(l,o),o}function Ww(t,l){const i={type:"element",tagName:"del",properties:{},children:t.all(l)};return t.patch(l,i),t.applyData(l,i)}function eS(t,l){const i={type:"element",tagName:"em",properties:{},children:t.all(l)};return t.patch(l,i),t.applyData(l,i)}function tS(t,l){const i=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",r=String(l.identifier).toUpperCase(),s=xi(r.toLowerCase()),o=t.footnoteOrder.indexOf(r);let f,h=t.footnoteCounts.get(r);h===void 0?(h=0,t.footnoteOrder.push(r),f=t.footnoteOrder.length):f=o+1,h+=1,t.footnoteCounts.set(r,h);const p={type:"element",tagName:"a",properties:{href:"#"+i+"fn-"+s,id:i+"fnref-"+s+(h>1?"-"+h:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(f)}]};t.patch(l,p);const m={type:"element",tagName:"sup",properties:{},children:[p]};return t.patch(l,m),t.applyData(l,m)}function nS(t,l){const i={type:"element",tagName:"h"+l.depth,properties:{},children:t.all(l)};return t.patch(l,i),t.applyData(l,i)}function lS(t,l){if(t.options.allowDangerousHtml){const i={type:"raw",value:l.value};return t.patch(l,i),t.applyData(l,i)}}function wx(t,l){const i=l.referenceType;let r="]";if(i==="collapsed"?r+="[]":i==="full"&&(r+="["+(l.label||l.identifier)+"]"),l.type==="imageReference")return[{type:"text",value:"!["+l.alt+r}];const s=t.all(l),o=s[0];o&&o.type==="text"?o.value="["+o.value:s.unshift({type:"text",value:"["});const f=s[s.length-1];return f&&f.type==="text"?f.value+=r:s.push({type:"text",value:r}),s}function aS(t,l){const i=String(l.identifier).toUpperCase(),r=t.definitionById.get(i);if(!r)return wx(t,l);const s={src:xi(r.url||""),alt:l.alt};r.title!==null&&r.title!==void 0&&(s.title=r.title);const o={type:"element",tagName:"img",properties:s,children:[]};return t.patch(l,o),t.applyData(l,o)}function iS(t,l){const i={src:xi(l.url)};l.alt!==null&&l.alt!==void 0&&(i.alt=l.alt),l.title!==null&&l.title!==void 0&&(i.title=l.title);const r={type:"element",tagName:"img",properties:i,children:[]};return t.patch(l,r),t.applyData(l,r)}function rS(t,l){const i={type:"text",value:l.value.replace(/\r?\n|\r/g," ")};t.patch(l,i);const r={type:"element",tagName:"code",properties:{},children:[i]};return t.patch(l,r),t.applyData(l,r)}function uS(t,l){const i=String(l.identifier).toUpperCase(),r=t.definitionById.get(i);if(!r)return wx(t,l);const s={href:xi(r.url||"")};r.title!==null&&r.title!==void 0&&(s.title=r.title);const o={type:"element",tagName:"a",properties:s,children:t.all(l)};return t.patch(l,o),t.applyData(l,o)}function sS(t,l){const i={href:xi(l.url)};l.title!==null&&l.title!==void 0&&(i.title=l.title);const r={type:"element",tagName:"a",properties:i,children:t.all(l)};return t.patch(l,r),t.applyData(l,r)}function oS(t,l,i){const r=t.all(l),s=i?cS(i):Sx(l),o={},f=[];if(typeof l.checked=="boolean"){const b=r[0];let y;b&&b.type==="element"&&b.tagName==="p"?y=b:(y={type:"element",tagName:"p",properties:{},children:[]},r.unshift(y)),y.children.length>0&&y.children.unshift({type:"text",value:" "}),y.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:l.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let h=-1;for(;++h<r.length;){const b=r[h];(s||h!==0||b.type!=="element"||b.tagName!=="p")&&f.push({type:"text",value:`
55
+ `}),b.type==="element"&&b.tagName==="p"&&!s?f.push(...b.children):f.push(b)}const p=r[r.length-1];p&&(s||p.type!=="element"||p.tagName!=="p")&&f.push({type:"text",value:`
56
+ `});const m={type:"element",tagName:"li",properties:o,children:f};return t.patch(l,m),t.applyData(l,m)}function cS(t){let l=!1;if(t.type==="list"){l=t.spread||!1;const i=t.children;let r=-1;for(;!l&&++r<i.length;)l=Sx(i[r])}return l}function Sx(t){const l=t.spread;return l??t.children.length>1}function fS(t,l){const i={},r=t.all(l);let s=-1;for(typeof l.start=="number"&&l.start!==1&&(i.start=l.start);++s<r.length;){const f=r[s];if(f.type==="element"&&f.tagName==="li"&&f.properties&&Array.isArray(f.properties.className)&&f.properties.className.includes("task-list-item")){i.className=["contains-task-list"];break}}const o={type:"element",tagName:l.ordered?"ol":"ul",properties:i,children:t.wrap(r,!0)};return t.patch(l,o),t.applyData(l,o)}function dS(t,l){const i={type:"element",tagName:"p",properties:{},children:t.all(l)};return t.patch(l,i),t.applyData(l,i)}function hS(t,l){const i={type:"root",children:t.wrap(t.all(l))};return t.patch(l,i),t.applyData(l,i)}function mS(t,l){const i={type:"element",tagName:"strong",properties:{},children:t.all(l)};return t.patch(l,i),t.applyData(l,i)}function pS(t,l){const i=t.all(l),r=i.shift(),s=[];if(r){const f={type:"element",tagName:"thead",properties:{},children:t.wrap([r],!0)};t.patch(l.children[0],f),s.push(f)}if(i.length>0){const f={type:"element",tagName:"tbody",properties:{},children:t.wrap(i,!0)},h=Kf(l.children[1]),p=nx(l.children[l.children.length-1]);h&&p&&(f.position={start:h,end:p}),s.push(f)}const o={type:"element",tagName:"table",properties:{},children:t.wrap(s,!0)};return t.patch(l,o),t.applyData(l,o)}function gS(t,l,i){const r=i?i.children:void 0,o=(r?r.indexOf(l):1)===0?"th":"td",f=i&&i.type==="table"?i.align:void 0,h=f?f.length:l.children.length;let p=-1;const m=[];for(;++p<h;){const y=l.children[p],k={},v=f?f[p]:void 0;v&&(k.align=v);let _={type:"element",tagName:o,properties:k,children:[]};y&&(_.children=t.all(y),t.patch(y,_),_=t.applyData(y,_)),m.push(_)}const b={type:"element",tagName:"tr",properties:{},children:t.wrap(m,!0)};return t.patch(l,b),t.applyData(l,b)}function yS(t,l){const i={type:"element",tagName:"td",properties:{},children:t.all(l)};return t.patch(l,i),t.applyData(l,i)}const ey=9,ty=32;function xS(t){const l=String(t),i=/\r?\n|\r/g;let r=i.exec(l),s=0;const o=[];for(;r;)o.push(ny(l.slice(s,r.index),s>0,!0),r[0]),s=r.index+r[0].length,r=i.exec(l);return o.push(ny(l.slice(s),s>0,!1)),o.join("")}function ny(t,l,i){let r=0,s=t.length;if(l){let o=t.codePointAt(r);for(;o===ey||o===ty;)r++,o=t.codePointAt(r)}if(i){let o=t.codePointAt(s-1);for(;o===ey||o===ty;)s--,o=t.codePointAt(s-1)}return s>r?t.slice(r,s):""}function bS(t,l){const i={type:"text",value:xS(String(l.value))};return t.patch(l,i),t.applyData(l,i)}function vS(t,l){const i={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(l,i),t.applyData(l,i)}const kS={blockquote:Kw,break:$w,code:Pw,delete:Ww,emphasis:eS,footnoteReference:tS,heading:nS,html:lS,imageReference:aS,image:iS,inlineCode:rS,linkReference:uS,link:sS,listItem:oS,list:fS,paragraph:dS,root:hS,strong:mS,table:pS,tableCell:yS,tableRow:gS,text:bS,thematicBreak:vS,toml:Xu,yaml:Xu,definition:Xu,footnoteDefinition:Xu};function Xu(){}const _x=-1,As=0,wr=1,ys=2,ld=3,ad=4,id=5,rd=6,Ex=7,Cx=8,wS=typeof self=="object"?self:globalThis,ly=(t,l)=>{switch(t){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+t)}return new wS[t](l)},SS=(t,l)=>{const i=(s,o)=>(t.set(o,s),s),r=s=>{if(t.has(s))return t.get(s);const[o,f]=l[s];switch(o){case As:case _x:return i(f,s);case wr:{const h=i([],s);for(const p of f)h.push(r(p));return h}case ys:{const h=i({},s);for(const[p,m]of f)h[r(p)]=r(m);return h}case ld:return i(new Date(f),s);case ad:{const{source:h,flags:p}=f;return i(new RegExp(h,p),s)}case id:{const h=i(new Map,s);for(const[p,m]of f)h.set(r(p),r(m));return h}case rd:{const h=i(new Set,s);for(const p of f)h.add(r(p));return h}case Ex:{const{name:h,message:p}=f;return i(ly(h,p),s)}case Cx:return i(BigInt(f),s);case"BigInt":return i(Object(BigInt(f)),s);case"ArrayBuffer":return i(new Uint8Array(f).buffer,f);case"DataView":{const{buffer:h}=new Uint8Array(f);return i(new DataView(h),f)}}return i(ly(o,f),s)};return r},ay=t=>SS(new Map,t)(0),ha="",{toString:_S}={},{keys:ES}=Object,yr=t=>{const l=typeof t;if(l!=="object"||!t)return[As,l];const i=_S.call(t).slice(8,-1);switch(i){case"Array":return[wr,ha];case"Object":return[ys,ha];case"Date":return[ld,ha];case"RegExp":return[ad,ha];case"Map":return[id,ha];case"Set":return[rd,ha];case"DataView":return[wr,i]}return i.includes("Array")?[wr,i]:i.includes("Error")?[Ex,i]:[ys,i]},Ju=([t,l])=>t===As&&(l==="function"||l==="symbol"),CS=(t,l,i,r)=>{const s=(f,h)=>{const p=r.push(f)-1;return i.set(h,p),p},o=f=>{if(i.has(f))return i.get(f);let[h,p]=yr(f);switch(h){case As:{let b=f;switch(p){case"bigint":h=Cx,b=f.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+p);b=null;break;case"undefined":return s([_x],f)}return s([h,b],f)}case wr:{if(p){let k=f;return p==="DataView"?k=new Uint8Array(f.buffer):p==="ArrayBuffer"&&(k=new Uint8Array(f)),s([p,[...k]],f)}const b=[],y=s([h,b],f);for(const k of f)b.push(o(k));return y}case ys:{if(p)switch(p){case"BigInt":return s([p,f.toString()],f);case"Boolean":case"Number":case"String":return s([p,f.valueOf()],f)}if(l&&"toJSON"in f)return o(f.toJSON());const b=[],y=s([h,b],f);for(const k of ES(f))(t||!Ju(yr(f[k])))&&b.push([o(k),o(f[k])]);return y}case ld:return s([h,isNaN(f.getTime())?ha:f.toISOString()],f);case ad:{const{source:b,flags:y}=f;return s([h,{source:b,flags:y}],f)}case id:{const b=[],y=s([h,b],f);for(const[k,v]of f)(t||!(Ju(yr(k))||Ju(yr(v))))&&b.push([o(k),o(v)]);return y}case rd:{const b=[],y=s([h,b],f);for(const k of f)(t||!Ju(yr(k)))&&b.push(o(k));return y}}const{message:m}=f;return s([h,{name:p,message:m}],f)};return o},iy=(t,{json:l,lossy:i}={})=>{const r=[];return CS(!(l||i),!!l,new Map,r)(t),r},xs=typeof structuredClone=="function"?(t,l)=>l&&("json"in l||"lossy"in l)?ay(iy(t,l)):structuredClone(t):(t,l)=>ay(iy(t,l));function AS(t,l){const i=[{type:"text",value:"↩"}];return l>1&&i.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(l)}]}),i}function jS(t,l){return"Back to reference "+(t+1)+(l>1?"-"+l:"")}function NS(t){const l=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",i=t.options.footnoteBackContent||AS,r=t.options.footnoteBackLabel||jS,s=t.options.footnoteLabel||"Footnotes",o=t.options.footnoteLabelTagName||"h2",f=t.options.footnoteLabelProperties||{className:["sr-only"]},h=[];let p=-1;for(;++p<t.footnoteOrder.length;){const m=t.footnoteById.get(t.footnoteOrder[p]);if(!m)continue;const b=t.all(m),y=String(m.identifier).toUpperCase(),k=xi(y.toLowerCase());let v=0;const _=[],R=t.footnoteCounts.get(y);for(;R!==void 0&&++v<=R;){_.length>0&&_.push({type:"text",value:" "});let Z=typeof i=="string"?i:i(p,v);typeof Z=="string"&&(Z={type:"text",value:Z}),_.push({type:"element",tagName:"a",properties:{href:"#"+l+"fnref-"+k+(v>1?"-"+v:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(p,v),className:["data-footnote-backref"]},children:Array.isArray(Z)?Z:[Z]})}const H=b[b.length-1];if(H&&H.type==="element"&&H.tagName==="p"){const Z=H.children[H.children.length-1];Z&&Z.type==="text"?Z.value+=" ":H.children.push({type:"text",value:" "}),H.children.push(..._)}else b.push(..._);const N={type:"element",tagName:"li",properties:{id:l+"fn-"+k},children:t.wrap(b,!0)};t.patch(m,N),h.push(N)}if(h.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...xs(f),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
57
+ `},{type:"element",tagName:"ol",properties:{},children:t.wrap(h,!0)},{type:"text",value:`
58
+ `}]}}const js=(function(t){if(t==null)return OS;if(typeof t=="function")return Ns(t);if(typeof t=="object")return Array.isArray(t)?TS(t):DS(t);if(typeof t=="string")return zS(t);throw new Error("Expected function, string, or object as test")});function TS(t){const l=[];let i=-1;for(;++i<t.length;)l[i]=js(t[i]);return Ns(r);function r(...s){let o=-1;for(;++o<l.length;)if(l[o].apply(this,s))return!0;return!1}}function DS(t){const l=t;return Ns(i);function i(r){const s=r;let o;for(o in t)if(s[o]!==l[o])return!1;return!0}}function zS(t){return Ns(l);function l(i){return i&&i.type===t}}function Ns(t){return l;function l(i,r,s){return!!(MS(i)&&t.call(this,i,typeof r=="number"?r:void 0,s||void 0))}}function OS(){return!0}function MS(t){return t!==null&&typeof t=="object"&&"type"in t}const Ax=[],RS=!0,Of=!1,LS="skip";function jx(t,l,i,r){let s;typeof l=="function"&&typeof i!="function"?(r=i,i=l):s=l;const o=js(s),f=r?-1:1;h(t,void 0,[])();function h(p,m,b){const y=p&&typeof p=="object"?p:{};if(typeof y.type=="string"){const v=typeof y.tagName=="string"?y.tagName:typeof y.name=="string"?y.name:void 0;Object.defineProperty(k,"name",{value:"node ("+(p.type+(v?"<"+v+">":""))+")"})}return k;function k(){let v=Ax,_,R,H;if((!l||o(p,m,b[b.length-1]||void 0))&&(v=BS(i(p,b)),v[0]===Of))return v;if("children"in p&&p.children){const N=p;if(N.children&&v[0]!==LS)for(R=(r?N.children.length:-1)+f,H=b.concat(N);R>-1&&R<N.children.length;){const Z=N.children[R];if(_=h(Z,R,H)(),_[0]===Of)return _;R=typeof _[1]=="number"?_[1]:R+f}}return v}}}function BS(t){return Array.isArray(t)?t:typeof t=="number"?[RS,t]:t==null?Ax:[t]}function ud(t,l,i,r){let s,o,f;typeof l=="function"&&typeof i!="function"?(o=void 0,f=l,s=i):(o=l,f=i,s=r),jx(t,o,h,s);function h(p,m){const b=m[m.length-1],y=b?b.children.indexOf(p):void 0;return f(p,y,b)}}const Mf={}.hasOwnProperty,US={};function HS(t,l){const i=l||US,r=new Map,s=new Map,o=new Map,f={...kS,...i.handlers},h={all:m,applyData:VS,definitionById:r,footnoteById:s,footnoteCounts:o,footnoteOrder:[],handlers:f,one:p,options:i,patch:qS,wrap:YS};return ud(t,function(b){if(b.type==="definition"||b.type==="footnoteDefinition"){const y=b.type==="definition"?r:s,k=String(b.identifier).toUpperCase();y.has(k)||y.set(k,b)}}),h;function p(b,y){const k=b.type,v=h.handlers[k];if(Mf.call(h.handlers,k)&&v)return v(h,b,y);if(h.options.passThrough&&h.options.passThrough.includes(k)){if("children"in b){const{children:R,...H}=b,N=xs(H);return N.children=h.all(b),N}return xs(b)}return(h.options.unknownHandler||IS)(h,b,y)}function m(b){const y=[];if("children"in b){const k=b.children;let v=-1;for(;++v<k.length;){const _=h.one(k[v],b);if(_){if(v&&k[v-1].type==="break"&&(!Array.isArray(_)&&_.type==="text"&&(_.value=ry(_.value)),!Array.isArray(_)&&_.type==="element")){const R=_.children[0];R&&R.type==="text"&&(R.value=ry(R.value))}Array.isArray(_)?y.push(..._):y.push(_)}}}return y}}function qS(t,l){t.position&&(l.position=A2(t))}function VS(t,l){let i=l;if(t&&t.data){const r=t.data.hName,s=t.data.hChildren,o=t.data.hProperties;if(typeof r=="string")if(i.type==="element")i.tagName=r;else{const f="children"in i?i.children:[i];i={type:"element",tagName:r,properties:{},children:f}}i.type==="element"&&o&&Object.assign(i.properties,xs(o)),"children"in i&&i.children&&s!==null&&s!==void 0&&(i.children=s)}return i}function IS(t,l){const i=l.data||{},r="value"in l&&!(Mf.call(i,"hProperties")||Mf.call(i,"hChildren"))?{type:"text",value:l.value}:{type:"element",tagName:"div",properties:{},children:t.all(l)};return t.patch(l,r),t.applyData(l,r)}function YS(t,l){const i=[];let r=-1;for(l&&i.push({type:"text",value:`
59
+ `});++r<t.length;)r&&i.push({type:"text",value:`
60
+ `}),i.push(t[r]);return l&&t.length>0&&i.push({type:"text",value:`
61
+ `}),i}function ry(t){let l=0,i=t.charCodeAt(l);for(;i===9||i===32;)l++,i=t.charCodeAt(l);return t.slice(l)}function uy(t,l){const i=HS(t,l),r=i.one(t,void 0),s=NS(i),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return s&&o.children.push({type:"text",value:`
62
+ `},s),o}function ZS(t,l){return t&&"run"in t?async function(i,r){const s=uy(i,{file:r,...l});await t.run(s,r)}:function(i,r){return uy(i,{file:r,...t||l})}}function sy(t){if(t)throw t}var lf,oy;function FS(){if(oy)return lf;oy=1;var t=Object.prototype.hasOwnProperty,l=Object.prototype.toString,i=Object.defineProperty,r=Object.getOwnPropertyDescriptor,s=function(m){return typeof Array.isArray=="function"?Array.isArray(m):l.call(m)==="[object Array]"},o=function(m){if(!m||l.call(m)!=="[object Object]")return!1;var b=t.call(m,"constructor"),y=m.constructor&&m.constructor.prototype&&t.call(m.constructor.prototype,"isPrototypeOf");if(m.constructor&&!b&&!y)return!1;var k;for(k in m);return typeof k>"u"||t.call(m,k)},f=function(m,b){i&&b.name==="__proto__"?i(m,b.name,{enumerable:!0,configurable:!0,value:b.newValue,writable:!0}):m[b.name]=b.newValue},h=function(m,b){if(b==="__proto__")if(t.call(m,b)){if(r)return r(m,b).value}else return;return m[b]};return lf=function p(){var m,b,y,k,v,_,R=arguments[0],H=1,N=arguments.length,Z=!1;for(typeof R=="boolean"&&(Z=R,R=arguments[1]||{},H=2),(R==null||typeof R!="object"&&typeof R!="function")&&(R={});H<N;++H)if(m=arguments[H],m!=null)for(b in m)y=h(R,b),k=h(m,b),R!==k&&(Z&&k&&(o(k)||(v=s(k)))?(v?(v=!1,_=y&&s(y)?y:[]):_=y&&o(y)?y:{},f(R,{name:b,newValue:p(Z,_,k)})):typeof k<"u"&&f(R,{name:b,newValue:k}));return R},lf}var QS=FS();const af=jy(QS);function Rf(t){if(typeof t!="object"||t===null)return!1;const l=Object.getPrototypeOf(t);return(l===null||l===Object.prototype||Object.getPrototypeOf(l)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function GS(){const t=[],l={run:i,use:r};return l;function i(...s){let o=-1;const f=s.pop();if(typeof f!="function")throw new TypeError("Expected function as last argument, not "+f);h(null,...s);function h(p,...m){const b=t[++o];let y=-1;if(p){f(p);return}for(;++y<s.length;)(m[y]===null||m[y]===void 0)&&(m[y]=s[y]);s=m,b?XS(b,h)(...m):f(null,...m)}}function r(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return t.push(s),l}}function XS(t,l){let i;return r;function r(...f){const h=t.length>f.length;let p;h&&f.push(s);try{p=t.apply(this,f)}catch(m){const b=m;if(h&&i)throw b;return s(b)}h||(p&&p.then&&typeof p.then=="function"?p.then(o,s):p instanceof Error?s(p):o(p))}function s(f,...h){i||(i=!0,l(f,...h))}function o(f){s(null,f)}}const Mn={basename:JS,dirname:KS,extname:$S,join:PS,sep:"/"};function JS(t,l){if(l!==void 0&&typeof l!="string")throw new TypeError('"ext" argument must be a string');Tr(t);let i=0,r=-1,s=t.length,o;if(l===void 0||l.length===0||l.length>t.length){for(;s--;)if(t.codePointAt(s)===47){if(o){i=s+1;break}}else r<0&&(o=!0,r=s+1);return r<0?"":t.slice(i,r)}if(l===t)return"";let f=-1,h=l.length-1;for(;s--;)if(t.codePointAt(s)===47){if(o){i=s+1;break}}else f<0&&(o=!0,f=s+1),h>-1&&(t.codePointAt(s)===l.codePointAt(h--)?h<0&&(r=s):(h=-1,r=f));return i===r?r=f:r<0&&(r=t.length),t.slice(i,r)}function KS(t){if(Tr(t),t.length===0)return".";let l=-1,i=t.length,r;for(;--i;)if(t.codePointAt(i)===47){if(r){l=i;break}}else r||(r=!0);return l<0?t.codePointAt(0)===47?"/":".":l===1&&t.codePointAt(0)===47?"//":t.slice(0,l)}function $S(t){Tr(t);let l=t.length,i=-1,r=0,s=-1,o=0,f;for(;l--;){const h=t.codePointAt(l);if(h===47){if(f){r=l+1;break}continue}i<0&&(f=!0,i=l+1),h===46?s<0?s=l:o!==1&&(o=1):s>-1&&(o=-1)}return s<0||i<0||o===0||o===1&&s===i-1&&s===r+1?"":t.slice(s,i)}function PS(...t){let l=-1,i;for(;++l<t.length;)Tr(t[l]),t[l]&&(i=i===void 0?t[l]:i+"/"+t[l]);return i===void 0?".":WS(i)}function WS(t){Tr(t);const l=t.codePointAt(0)===47;let i=e4(t,!l);return i.length===0&&!l&&(i="."),i.length>0&&t.codePointAt(t.length-1)===47&&(i+="/"),l?"/"+i:i}function e4(t,l){let i="",r=0,s=-1,o=0,f=-1,h,p;for(;++f<=t.length;){if(f<t.length)h=t.codePointAt(f);else{if(h===47)break;h=47}if(h===47){if(!(s===f-1||o===1))if(s!==f-1&&o===2){if(i.length<2||r!==2||i.codePointAt(i.length-1)!==46||i.codePointAt(i.length-2)!==46){if(i.length>2){if(p=i.lastIndexOf("/"),p!==i.length-1){p<0?(i="",r=0):(i=i.slice(0,p),r=i.length-1-i.lastIndexOf("/")),s=f,o=0;continue}}else if(i.length>0){i="",r=0,s=f,o=0;continue}}l&&(i=i.length>0?i+"/..":"..",r=2)}else i.length>0?i+="/"+t.slice(s+1,f):i=t.slice(s+1,f),r=f-s-1;s=f,o=0}else h===46&&o>-1?o++:o=-1}return i}function Tr(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const t4={cwd:n4};function n4(){return"/"}function Lf(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function l4(t){if(typeof t=="string")t=new URL(t);else if(!Lf(t)){const l=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw l.code="ERR_INVALID_ARG_TYPE",l}if(t.protocol!=="file:"){const l=new TypeError("The URL must be of scheme file");throw l.code="ERR_INVALID_URL_SCHEME",l}return a4(t)}function a4(t){if(t.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const l=t.pathname;let i=-1;for(;++i<l.length;)if(l.codePointAt(i)===37&&l.codePointAt(i+1)===50){const r=l.codePointAt(i+2);if(r===70||r===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(l)}const rf=["history","path","basename","stem","extname","dirname"];class Nx{constructor(l){let i;l?Lf(l)?i={path:l}:typeof l=="string"||i4(l)?i={value:l}:i=l:i={},this.cwd="cwd"in i?"":t4.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<rf.length;){const o=rf[r];o in i&&i[o]!==void 0&&i[o]!==null&&(this[o]=o==="history"?[...i[o]]:i[o])}let s;for(s in i)rf.includes(s)||(this[s]=i[s])}get basename(){return typeof this.path=="string"?Mn.basename(this.path):void 0}set basename(l){sf(l,"basename"),uf(l,"basename"),this.path=Mn.join(this.dirname||"",l)}get dirname(){return typeof this.path=="string"?Mn.dirname(this.path):void 0}set dirname(l){cy(this.basename,"dirname"),this.path=Mn.join(l||"",this.basename)}get extname(){return typeof this.path=="string"?Mn.extname(this.path):void 0}set extname(l){if(uf(l,"extname"),cy(this.dirname,"extname"),l){if(l.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(l.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Mn.join(this.dirname,this.stem+(l||""))}get path(){return this.history[this.history.length-1]}set path(l){Lf(l)&&(l=l4(l)),sf(l,"path"),this.path!==l&&this.history.push(l)}get stem(){return typeof this.path=="string"?Mn.basename(this.path,this.extname):void 0}set stem(l){sf(l,"stem"),uf(l,"stem"),this.path=Mn.join(this.dirname||"",l+(this.extname||""))}fail(l,i,r){const s=this.message(l,i,r);throw s.fatal=!0,s}info(l,i,r){const s=this.message(l,i,r);return s.fatal=void 0,s}message(l,i,r){const s=new Bt(l,i,r);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(l){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(l||void 0).decode(this.value)}}function uf(t,l){if(t&&t.includes(Mn.sep))throw new Error("`"+l+"` cannot be a path: did not expect `"+Mn.sep+"`")}function sf(t,l){if(!t)throw new Error("`"+l+"` cannot be empty")}function cy(t,l){if(!t)throw new Error("Setting `"+l+"` requires `path` to be set too")}function i4(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const r4=(function(t){const r=this.constructor.prototype,s=r[t],o=function(){return s.apply(o,arguments)};return Object.setPrototypeOf(o,r),o}),u4={}.hasOwnProperty;class sd extends r4{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=GS()}copy(){const l=new sd;let i=-1;for(;++i<this.attachers.length;){const r=this.attachers[i];l.use(...r)}return l.data(af(!0,{},this.namespace)),l}data(l,i){return typeof l=="string"?arguments.length===2?(ff("data",this.frozen),this.namespace[l]=i,this):u4.call(this.namespace,l)&&this.namespace[l]||void 0:l?(ff("data",this.frozen),this.namespace=l,this):this.namespace}freeze(){if(this.frozen)return this;const l=this;for(;++this.freezeIndex<this.attachers.length;){const[i,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const s=i.call(l,...r);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(l){this.freeze();const i=Ku(l),r=this.parser||this.Parser;return of("parse",r),r(String(i),i)}process(l,i){const r=this;return this.freeze(),of("process",this.parser||this.Parser),cf("process",this.compiler||this.Compiler),i?s(void 0,i):new Promise(s);function s(o,f){const h=Ku(l),p=r.parse(h);r.run(p,h,function(b,y,k){if(b||!y||!k)return m(b);const v=y,_=r.stringify(v,k);c4(_)?k.value=_:k.result=_,m(b,k)});function m(b,y){b||!y?f(b):o?o(y):i(void 0,y)}}}processSync(l){let i=!1,r;return this.freeze(),of("processSync",this.parser||this.Parser),cf("processSync",this.compiler||this.Compiler),this.process(l,s),dy("processSync","process",i),r;function s(o,f){i=!0,sy(o),r=f}}run(l,i,r){fy(l),this.freeze();const s=this.transformers;return!r&&typeof i=="function"&&(r=i,i=void 0),r?o(void 0,r):new Promise(o);function o(f,h){const p=Ku(i);s.run(l,p,m);function m(b,y,k){const v=y||l;b?h(b):f?f(v):r(void 0,v,k)}}}runSync(l,i){let r=!1,s;return this.run(l,i,o),dy("runSync","run",r),s;function o(f,h){sy(f),s=h,r=!0}}stringify(l,i){this.freeze();const r=Ku(i),s=this.compiler||this.Compiler;return cf("stringify",s),fy(l),s(l,r)}use(l,...i){const r=this.attachers,s=this.namespace;if(ff("use",this.frozen),l!=null)if(typeof l=="function")p(l,i);else if(typeof l=="object")Array.isArray(l)?h(l):f(l);else throw new TypeError("Expected usable value, not `"+l+"`");return this;function o(m){if(typeof m=="function")p(m,[]);else if(typeof m=="object")if(Array.isArray(m)){const[b,...y]=m;p(b,y)}else f(m);else throw new TypeError("Expected usable value, not `"+m+"`")}function f(m){if(!("plugins"in m)&&!("settings"in m))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");h(m.plugins),m.settings&&(s.settings=af(!0,s.settings,m.settings))}function h(m){let b=-1;if(m!=null)if(Array.isArray(m))for(;++b<m.length;){const y=m[b];o(y)}else throw new TypeError("Expected a list of plugins, not `"+m+"`")}function p(m,b){let y=-1,k=-1;for(;++y<r.length;)if(r[y][0]===m){k=y;break}if(k===-1)r.push([m,...b]);else if(b.length>0){let[v,..._]=b;const R=r[k][1];Rf(R)&&Rf(v)&&(v=af(!0,R,v)),r[k]=[m,v,..._]}}}}const s4=new sd().freeze();function of(t,l){if(typeof l!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function cf(t,l){if(typeof l!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function ff(t,l){if(l)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function fy(t){if(!Rf(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function dy(t,l,i){if(!i)throw new Error("`"+t+"` finished async. Use `"+l+"` instead")}function Ku(t){return o4(t)?t:new Nx(t)}function o4(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function c4(t){return typeof t=="string"||f4(t)}function f4(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const d4="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",hy=[],my={allowDangerousHtml:!0},h4=/^(https?|ircs?|mailto|xmpp)$/i,m4=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function p4(t){const l=g4(t),i=y4(t);return x4(l.runSync(l.parse(i),i),t)}function g4(t){const l=t.rehypePlugins||hy,i=t.remarkPlugins||hy,r=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...my}:my;return s4().use(Jw).use(i).use(ZS,r).use(l)}function y4(t){const l=t.children||"",i=new Nx;return typeof l=="string"&&(i.value=l),i}function x4(t,l){const i=l.allowedElements,r=l.allowElement,s=l.components,o=l.disallowedElements,f=l.skipHtml,h=l.unwrapDisallowed,p=l.urlTransform||b4;for(const b of m4)Object.hasOwn(l,b.from)&&(""+b.from+(b.to?"use `"+b.to+"` instead":"remove it")+d4+b.id,void 0);return ud(t,m),z2(t,{Fragment:g.Fragment,components:s,ignoreInvalidStyle:!0,jsx:g.jsx,jsxs:g.jsxs,passKeys:!0,passNode:!0});function m(b,y,k){if(b.type==="raw"&&k&&typeof y=="number")return f?k.children.splice(y,1):k.children[y]={type:"text",value:b.value},y;if(b.type==="element"){let v;for(v in ef)if(Object.hasOwn(ef,v)&&Object.hasOwn(b.properties,v)){const _=b.properties[v],R=ef[v];(R===null||R.includes(b.tagName))&&(b.properties[v]=p(String(_||""),v,b))}}if(b.type==="element"){let v=i?!i.includes(b.tagName):o?o.includes(b.tagName):!1;if(!v&&r&&typeof y=="number"&&(v=!r(b,y,k)),v&&k&&typeof y=="number")return h&&b.children?k.children.splice(y,1,...b.children):k.children.splice(y,1),y}}}function b4(t){const l=t.indexOf(":"),i=t.indexOf("?"),r=t.indexOf("#"),s=t.indexOf("/");return l===-1||s!==-1&&l>s||i!==-1&&l>i||r!==-1&&l>r||h4.test(t.slice(0,l))?t:""}function py(t,l){const i=String(t);if(typeof l!="string")throw new TypeError("Expected character");let r=0,s=i.indexOf(l);for(;s!==-1;)r++,s=i.indexOf(l,s+l.length);return r}function v4(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function k4(t,l,i){const s=js((i||{}).ignore||[]),o=w4(l);let f=-1;for(;++f<o.length;)jx(t,"text",h);function h(m,b){let y=-1,k;for(;++y<b.length;){const v=b[y],_=k?k.children:void 0;if(s(v,_?_.indexOf(v):void 0,k))return;k=v}if(k)return p(m,b)}function p(m,b){const y=b[b.length-1],k=o[f][0],v=o[f][1];let _=0;const H=y.children.indexOf(m);let N=!1,Z=[];k.lastIndex=0;let q=k.exec(m.value);for(;q;){const te=q.index,ee={index:q.index,input:q.input,stack:[...b,m]};let O=v(...q,ee);if(typeof O=="string"&&(O=O.length>0?{type:"text",value:O}:void 0),O===!1?k.lastIndex=te+1:(_!==te&&Z.push({type:"text",value:m.value.slice(_,te)}),Array.isArray(O)?Z.push(...O):O&&Z.push(O),_=te+q[0].length,N=!0),!k.global)break;q=k.exec(m.value)}return N?(_<m.value.length&&Z.push({type:"text",value:m.value.slice(_)}),y.children.splice(H,1,...Z)):Z=[m],H+Z.length}}function w4(t){const l=[];if(!Array.isArray(t))throw new TypeError("Expected find and replace tuple or list of tuples");const i=!t[0]||Array.isArray(t[0])?t:[t];let r=-1;for(;++r<i.length;){const s=i[r];l.push([S4(s[0]),_4(s[1])])}return l}function S4(t){return typeof t=="string"?new RegExp(v4(t),"g"):t}function _4(t){return typeof t=="function"?t:function(){return t}}const df="phrasing",hf=["autolink","link","image","label"];function E4(){return{transforms:[z4],enter:{literalAutolink:A4,literalAutolinkEmail:mf,literalAutolinkHttp:mf,literalAutolinkWww:mf},exit:{literalAutolink:D4,literalAutolinkEmail:T4,literalAutolinkHttp:j4,literalAutolinkWww:N4}}}function C4(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:df,notInConstruct:hf},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:df,notInConstruct:hf},{character:":",before:"[ps]",after:"\\/",inConstruct:df,notInConstruct:hf}]}}function A4(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function mf(t){this.config.enter.autolinkProtocol.call(this,t)}function j4(t){this.config.exit.autolinkProtocol.call(this,t)}function N4(t){this.config.exit.data.call(this,t);const l=this.stack[this.stack.length-1];l.type,l.url="http://"+this.sliceSerialize(t)}function T4(t){this.config.exit.autolinkEmail.call(this,t)}function D4(t){this.exit(t)}function z4(t){k4(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,O4],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),M4]],{ignore:["link","linkReference"]})}function O4(t,l,i,r,s){let o="";if(!Tx(s)||(/^w/i.test(l)&&(i=l+i,l="",o="http://"),!R4(i)))return!1;const f=L4(i+r);if(!f[0])return!1;const h={type:"link",title:null,url:o+l+f[0],children:[{type:"text",value:l+f[0]}]};return f[1]?[h,{type:"text",value:f[1]}]:h}function M4(t,l,i,r){return!Tx(r,!0)||/[-\d_]$/.test(i)?!1:{type:"link",title:null,url:"mailto:"+l+"@"+i,children:[{type:"text",value:l+"@"+i}]}}function R4(t){const l=t.split(".");return!(l.length<2||l[l.length-1]&&(/_/.test(l[l.length-1])||!/[a-zA-Z\d]/.test(l[l.length-1]))||l[l.length-2]&&(/_/.test(l[l.length-2])||!/[a-zA-Z\d]/.test(l[l.length-2])))}function L4(t){const l=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!l)return[t,void 0];t=t.slice(0,l.index);let i=l[0],r=i.indexOf(")");const s=py(t,"(");let o=py(t,")");for(;r!==-1&&s>o;)t+=i.slice(0,r+1),i=i.slice(r+1),r=i.indexOf(")"),o++;return[t,i]}function Tx(t,l){const i=t.input.charCodeAt(t.index-1);return(t.index===0||ka(i)||Es(i))&&(!l||i!==47)}Dx.peek=F4;function B4(){this.buffer()}function U4(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function H4(){this.buffer()}function q4(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function V4(t){const l=this.resume(),i=this.stack[this.stack.length-1];i.type,i.identifier=jn(this.sliceSerialize(t)).toLowerCase(),i.label=l}function I4(t){this.exit(t)}function Y4(t){const l=this.resume(),i=this.stack[this.stack.length-1];i.type,i.identifier=jn(this.sliceSerialize(t)).toLowerCase(),i.label=l}function Z4(t){this.exit(t)}function F4(){return"["}function Dx(t,l,i,r){const s=i.createTracker(r);let o=s.move("[^");const f=i.enter("footnoteReference"),h=i.enter("reference");return o+=s.move(i.safe(i.associationId(t),{after:"]",before:o})),h(),f(),o+=s.move("]"),o}function Q4(){return{enter:{gfmFootnoteCallString:B4,gfmFootnoteCall:U4,gfmFootnoteDefinitionLabelString:H4,gfmFootnoteDefinition:q4},exit:{gfmFootnoteCallString:V4,gfmFootnoteCall:I4,gfmFootnoteDefinitionLabelString:Y4,gfmFootnoteDefinition:Z4}}}function G4(t){let l=!1;return t&&t.firstLineBlank&&(l=!0),{handlers:{footnoteDefinition:i,footnoteReference:Dx},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function i(r,s,o,f){const h=o.createTracker(f);let p=h.move("[^");const m=o.enter("footnoteDefinition"),b=o.enter("label");return p+=h.move(o.safe(o.associationId(r),{before:p,after:"]"})),b(),p+=h.move("]:"),r.children&&r.children.length>0&&(h.shift(4),p+=h.move((l?`
63
+ `:" ")+o.indentLines(o.containerFlow(r,h.current()),l?zx:X4))),m(),p}}function X4(t,l,i){return l===0?t:zx(t,l,i)}function zx(t,l,i){return(i?"":" ")+t}const J4=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Ox.peek=e_;function K4(){return{canContainEols:["delete"],enter:{strikethrough:P4},exit:{strikethrough:W4}}}function $4(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:J4}],handlers:{delete:Ox}}}function P4(t){this.enter({type:"delete",children:[]},t)}function W4(t){this.exit(t)}function Ox(t,l,i,r){const s=i.createTracker(r),o=i.enter("strikethrough");let f=s.move("~~");return f+=i.containerPhrasing(t,{...s.current(),before:f,after:"~"}),f+=s.move("~~"),o(),f}function e_(){return"~"}function t_(t){return t.length}function n_(t,l){const i=l||{},r=(i.align||[]).concat(),s=i.stringLength||t_,o=[],f=[],h=[],p=[];let m=0,b=-1;for(;++b<t.length;){const R=[],H=[];let N=-1;for(t[b].length>m&&(m=t[b].length);++N<t[b].length;){const Z=l_(t[b][N]);if(i.alignDelimiters!==!1){const q=s(Z);H[N]=q,(p[N]===void 0||q>p[N])&&(p[N]=q)}R.push(Z)}f[b]=R,h[b]=H}let y=-1;if(typeof r=="object"&&"length"in r)for(;++y<m;)o[y]=gy(r[y]);else{const R=gy(r);for(;++y<m;)o[y]=R}y=-1;const k=[],v=[];for(;++y<m;){const R=o[y];let H="",N="";R===99?(H=":",N=":"):R===108?H=":":R===114&&(N=":");let Z=i.alignDelimiters===!1?1:Math.max(1,p[y]-H.length-N.length);const q=H+"-".repeat(Z)+N;i.alignDelimiters!==!1&&(Z=H.length+Z+N.length,Z>p[y]&&(p[y]=Z),v[y]=Z),k[y]=q}f.splice(1,0,k),h.splice(1,0,v),b=-1;const _=[];for(;++b<f.length;){const R=f[b],H=h[b];y=-1;const N=[];for(;++y<m;){const Z=R[y]||"";let q="",te="";if(i.alignDelimiters!==!1){const ee=p[y]-(H[y]||0),O=o[y];O===114?q=" ".repeat(ee):O===99?ee%2?(q=" ".repeat(ee/2+.5),te=" ".repeat(ee/2-.5)):(q=" ".repeat(ee/2),te=q):te=" ".repeat(ee)}i.delimiterStart!==!1&&!y&&N.push("|"),i.padding!==!1&&!(i.alignDelimiters===!1&&Z==="")&&(i.delimiterStart!==!1||y)&&N.push(" "),i.alignDelimiters!==!1&&N.push(q),N.push(Z),i.alignDelimiters!==!1&&N.push(te),i.padding!==!1&&N.push(" "),(i.delimiterEnd!==!1||y!==m-1)&&N.push("|")}_.push(i.delimiterEnd===!1?N.join("").replace(/ +$/,""):N.join(""))}return _.join(`
64
+ `)}function l_(t){return t==null?"":String(t)}function gy(t){const l=typeof t=="string"?t.codePointAt(0):0;return l===67||l===99?99:l===76||l===108?108:l===82||l===114?114:0}function a_(t,l,i,r){const s=i.enter("blockquote"),o=i.createTracker(r);o.move("> "),o.shift(2);const f=i.indentLines(i.containerFlow(t,o.current()),i_);return s(),f}function i_(t,l,i){return">"+(i?"":" ")+t}function r_(t,l){return yy(t,l.inConstruct,!0)&&!yy(t,l.notInConstruct,!1)}function yy(t,l,i){if(typeof l=="string"&&(l=[l]),!l||l.length===0)return i;let r=-1;for(;++r<l.length;)if(t.includes(l[r]))return!0;return!1}function xy(t,l,i,r){let s=-1;for(;++s<i.unsafe.length;)if(i.unsafe[s].character===`
65
+ `&&r_(i.stack,i.unsafe[s]))return/[ \t]/.test(r.before)?"":" ";return`\\
66
+ `}function u_(t,l){const i=String(t);let r=i.indexOf(l),s=r,o=0,f=0;if(typeof l!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===s?++o>f&&(f=o):o=1,s=r+l.length,r=i.indexOf(l,s);return f}function s_(t,l){return!!(l.options.fences===!1&&t.value&&!t.lang&&/[^ \r\n]/.test(t.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(t.value))}function o_(t){const l=t.options.fence||"`";if(l!=="`"&&l!=="~")throw new Error("Cannot serialize code with `"+l+"` for `options.fence`, expected `` ` `` or `~`");return l}function c_(t,l,i,r){const s=o_(i),o=t.value||"",f=s==="`"?"GraveAccent":"Tilde";if(s_(t,i)){const y=i.enter("codeIndented"),k=i.indentLines(o,f_);return y(),k}const h=i.createTracker(r),p=s.repeat(Math.max(u_(o,s)+1,3)),m=i.enter("codeFenced");let b=h.move(p);if(t.lang){const y=i.enter(`codeFencedLang${f}`);b+=h.move(i.safe(t.lang,{before:b,after:" ",encode:["`"],...h.current()})),y()}if(t.lang&&t.meta){const y=i.enter(`codeFencedMeta${f}`);b+=h.move(" "),b+=h.move(i.safe(t.meta,{before:b,after:`
67
+ `,encode:["`"],...h.current()})),y()}return b+=h.move(`
68
+ `),o&&(b+=h.move(o+`
69
+ `)),b+=h.move(p),m(),b}function f_(t,l,i){return(i?"":" ")+t}function od(t){const l=t.options.quote||'"';if(l!=='"'&&l!=="'")throw new Error("Cannot serialize title with `"+l+"` for `options.quote`, expected `\"`, or `'`");return l}function d_(t,l,i,r){const s=od(i),o=s==='"'?"Quote":"Apostrophe",f=i.enter("definition");let h=i.enter("label");const p=i.createTracker(r);let m=p.move("[");return m+=p.move(i.safe(i.associationId(t),{before:m,after:"]",...p.current()})),m+=p.move("]: "),h(),!t.url||/[\0- \u007F]/.test(t.url)?(h=i.enter("destinationLiteral"),m+=p.move("<"),m+=p.move(i.safe(t.url,{before:m,after:">",...p.current()})),m+=p.move(">")):(h=i.enter("destinationRaw"),m+=p.move(i.safe(t.url,{before:m,after:t.title?" ":`
70
+ `,...p.current()}))),h(),t.title&&(h=i.enter(`title${o}`),m+=p.move(" "+s),m+=p.move(i.safe(t.title,{before:m,after:s,...p.current()})),m+=p.move(s),h()),f(),m}function h_(t){const l=t.options.emphasis||"*";if(l!=="*"&&l!=="_")throw new Error("Cannot serialize emphasis with `"+l+"` for `options.emphasis`, expected `*`, or `_`");return l}function Cr(t){return"&#x"+t.toString(16).toUpperCase()+";"}function bs(t,l,i){const r=pi(t),s=pi(l);return r===void 0?s===void 0?i==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Mx.peek=m_;function Mx(t,l,i,r){const s=h_(i),o=i.enter("emphasis"),f=i.createTracker(r),h=f.move(s);let p=f.move(i.containerPhrasing(t,{after:s,before:h,...f.current()}));const m=p.charCodeAt(0),b=bs(r.before.charCodeAt(r.before.length-1),m,s);b.inside&&(p=Cr(m)+p.slice(1));const y=p.charCodeAt(p.length-1),k=bs(r.after.charCodeAt(0),y,s);k.inside&&(p=p.slice(0,-1)+Cr(y));const v=f.move(s);return o(),i.attentionEncodeSurroundingInfo={after:k.outside,before:b.outside},h+p+v}function m_(t,l,i){return i.options.emphasis||"*"}function p_(t,l){let i=!1;return ud(t,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return i=!0,Of}),!!((!t.depth||t.depth<3)&&ed(t)&&(l.options.setext||i))}function g_(t,l,i,r){const s=Math.max(Math.min(6,t.depth||1),1),o=i.createTracker(r);if(p_(t,i)){const b=i.enter("headingSetext"),y=i.enter("phrasing"),k=i.containerPhrasing(t,{...o.current(),before:`
71
+ `,after:`
72
+ `});return y(),b(),k+`
73
+ `+(s===1?"=":"-").repeat(k.length-(Math.max(k.lastIndexOf("\r"),k.lastIndexOf(`
74
+ `))+1))}const f="#".repeat(s),h=i.enter("headingAtx"),p=i.enter("phrasing");o.move(f+" ");let m=i.containerPhrasing(t,{before:"# ",after:`
75
+ `,...o.current()});return/^[\t ]/.test(m)&&(m=Cr(m.charCodeAt(0))+m.slice(1)),m=m?f+" "+m:f,i.options.closeAtx&&(m+=" "+f),p(),h(),m}Rx.peek=y_;function Rx(t){return t.value||""}function y_(){return"<"}Lx.peek=x_;function Lx(t,l,i,r){const s=od(i),o=s==='"'?"Quote":"Apostrophe",f=i.enter("image");let h=i.enter("label");const p=i.createTracker(r);let m=p.move("![");return m+=p.move(i.safe(t.alt,{before:m,after:"]",...p.current()})),m+=p.move("]("),h(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(h=i.enter("destinationLiteral"),m+=p.move("<"),m+=p.move(i.safe(t.url,{before:m,after:">",...p.current()})),m+=p.move(">")):(h=i.enter("destinationRaw"),m+=p.move(i.safe(t.url,{before:m,after:t.title?" ":")",...p.current()}))),h(),t.title&&(h=i.enter(`title${o}`),m+=p.move(" "+s),m+=p.move(i.safe(t.title,{before:m,after:s,...p.current()})),m+=p.move(s),h()),m+=p.move(")"),f(),m}function x_(){return"!"}Bx.peek=b_;function Bx(t,l,i,r){const s=t.referenceType,o=i.enter("imageReference");let f=i.enter("label");const h=i.createTracker(r);let p=h.move("![");const m=i.safe(t.alt,{before:p,after:"]",...h.current()});p+=h.move(m+"]["),f();const b=i.stack;i.stack=[],f=i.enter("reference");const y=i.safe(i.associationId(t),{before:p,after:"]",...h.current()});return f(),i.stack=b,o(),s==="full"||!m||m!==y?p+=h.move(y+"]"):s==="shortcut"?p=p.slice(0,-1):p+=h.move("]"),p}function b_(){return"!"}Ux.peek=v_;function Ux(t,l,i){let r=t.value||"",s="`",o=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(r);)s+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<i.unsafe.length;){const f=i.unsafe[o],h=i.compilePattern(f);let p;if(f.atBreak)for(;p=h.exec(r);){let m=p.index;r.charCodeAt(m)===10&&r.charCodeAt(m-1)===13&&m--,r=r.slice(0,m)+" "+r.slice(p.index+1)}}return s+r+s}function v_(){return"`"}function Hx(t,l){const i=ed(t);return!!(!l.options.resourceLink&&t.url&&!t.title&&t.children&&t.children.length===1&&t.children[0].type==="text"&&(i===t.url||"mailto:"+i===t.url)&&/^[a-z][a-z+.-]+:/i.test(t.url)&&!/[\0- <>\u007F]/.test(t.url))}qx.peek=k_;function qx(t,l,i,r){const s=od(i),o=s==='"'?"Quote":"Apostrophe",f=i.createTracker(r);let h,p;if(Hx(t,i)){const b=i.stack;i.stack=[],h=i.enter("autolink");let y=f.move("<");return y+=f.move(i.containerPhrasing(t,{before:y,after:">",...f.current()})),y+=f.move(">"),h(),i.stack=b,y}h=i.enter("link"),p=i.enter("label");let m=f.move("[");return m+=f.move(i.containerPhrasing(t,{before:m,after:"](",...f.current()})),m+=f.move("]("),p(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(p=i.enter("destinationLiteral"),m+=f.move("<"),m+=f.move(i.safe(t.url,{before:m,after:">",...f.current()})),m+=f.move(">")):(p=i.enter("destinationRaw"),m+=f.move(i.safe(t.url,{before:m,after:t.title?" ":")",...f.current()}))),p(),t.title&&(p=i.enter(`title${o}`),m+=f.move(" "+s),m+=f.move(i.safe(t.title,{before:m,after:s,...f.current()})),m+=f.move(s),p()),m+=f.move(")"),h(),m}function k_(t,l,i){return Hx(t,i)?"<":"["}Vx.peek=w_;function Vx(t,l,i,r){const s=t.referenceType,o=i.enter("linkReference");let f=i.enter("label");const h=i.createTracker(r);let p=h.move("[");const m=i.containerPhrasing(t,{before:p,after:"]",...h.current()});p+=h.move(m+"]["),f();const b=i.stack;i.stack=[],f=i.enter("reference");const y=i.safe(i.associationId(t),{before:p,after:"]",...h.current()});return f(),i.stack=b,o(),s==="full"||!m||m!==y?p+=h.move(y+"]"):s==="shortcut"?p=p.slice(0,-1):p+=h.move("]"),p}function w_(){return"["}function cd(t){const l=t.options.bullet||"*";if(l!=="*"&&l!=="+"&&l!=="-")throw new Error("Cannot serialize items with `"+l+"` for `options.bullet`, expected `*`, `+`, or `-`");return l}function S_(t){const l=cd(t),i=t.options.bulletOther;if(!i)return l==="*"?"-":"*";if(i!=="*"&&i!=="+"&&i!=="-")throw new Error("Cannot serialize items with `"+i+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(i===l)throw new Error("Expected `bullet` (`"+l+"`) and `bulletOther` (`"+i+"`) to be different");return i}function __(t){const l=t.options.bulletOrdered||".";if(l!=="."&&l!==")")throw new Error("Cannot serialize items with `"+l+"` for `options.bulletOrdered`, expected `.` or `)`");return l}function Ix(t){const l=t.options.rule||"*";if(l!=="*"&&l!=="-"&&l!=="_")throw new Error("Cannot serialize rules with `"+l+"` for `options.rule`, expected `*`, `-`, or `_`");return l}function E_(t,l,i,r){const s=i.enter("list"),o=i.bulletCurrent;let f=t.ordered?__(i):cd(i);const h=t.ordered?f==="."?")":".":S_(i);let p=l&&i.bulletLastUsed?f===i.bulletLastUsed:!1;if(!t.ordered){const b=t.children?t.children[0]:void 0;if((f==="*"||f==="-")&&b&&(!b.children||!b.children[0])&&i.stack[i.stack.length-1]==="list"&&i.stack[i.stack.length-2]==="listItem"&&i.stack[i.stack.length-3]==="list"&&i.stack[i.stack.length-4]==="listItem"&&i.indexStack[i.indexStack.length-1]===0&&i.indexStack[i.indexStack.length-2]===0&&i.indexStack[i.indexStack.length-3]===0&&(p=!0),Ix(i)===f&&b){let y=-1;for(;++y<t.children.length;){const k=t.children[y];if(k&&k.type==="listItem"&&k.children&&k.children[0]&&k.children[0].type==="thematicBreak"){p=!0;break}}}}p&&(f=h),i.bulletCurrent=f;const m=i.containerFlow(t,r);return i.bulletLastUsed=f,i.bulletCurrent=o,s(),m}function C_(t){const l=t.options.listItemIndent||"one";if(l!=="tab"&&l!=="one"&&l!=="mixed")throw new Error("Cannot serialize items with `"+l+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return l}function A_(t,l,i,r){const s=C_(i);let o=i.bulletCurrent||cd(i);l&&l.type==="list"&&l.ordered&&(o=(typeof l.start=="number"&&l.start>-1?l.start:1)+(i.options.incrementListMarker===!1?0:l.children.indexOf(t))+o);let f=o.length+1;(s==="tab"||s==="mixed"&&(l&&l.type==="list"&&l.spread||t.spread))&&(f=Math.ceil(f/4)*4);const h=i.createTracker(r);h.move(o+" ".repeat(f-o.length)),h.shift(f);const p=i.enter("listItem"),m=i.indentLines(i.containerFlow(t,h.current()),b);return p(),m;function b(y,k,v){return k?(v?"":" ".repeat(f))+y:(v?o:o+" ".repeat(f-o.length))+y}}function j_(t,l,i,r){const s=i.enter("paragraph"),o=i.enter("phrasing"),f=i.containerPhrasing(t,r);return o(),s(),f}const N_=js(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function T_(t,l,i,r){return(t.children.some(function(f){return N_(f)})?i.containerPhrasing:i.containerFlow).call(i,t,r)}function D_(t){const l=t.options.strong||"*";if(l!=="*"&&l!=="_")throw new Error("Cannot serialize strong with `"+l+"` for `options.strong`, expected `*`, or `_`");return l}Yx.peek=z_;function Yx(t,l,i,r){const s=D_(i),o=i.enter("strong"),f=i.createTracker(r),h=f.move(s+s);let p=f.move(i.containerPhrasing(t,{after:s,before:h,...f.current()}));const m=p.charCodeAt(0),b=bs(r.before.charCodeAt(r.before.length-1),m,s);b.inside&&(p=Cr(m)+p.slice(1));const y=p.charCodeAt(p.length-1),k=bs(r.after.charCodeAt(0),y,s);k.inside&&(p=p.slice(0,-1)+Cr(y));const v=f.move(s+s);return o(),i.attentionEncodeSurroundingInfo={after:k.outside,before:b.outside},h+p+v}function z_(t,l,i){return i.options.strong||"*"}function O_(t,l,i,r){return i.safe(t.value,r)}function M_(t){const l=t.options.ruleRepetition||3;if(l<3)throw new Error("Cannot serialize rules with repetition `"+l+"` for `options.ruleRepetition`, expected `3` or more");return l}function R_(t,l,i){const r=(Ix(i)+(i.options.ruleSpaces?" ":"")).repeat(M_(i));return i.options.ruleSpaces?r.slice(0,-1):r}const Zx={blockquote:a_,break:xy,code:c_,definition:d_,emphasis:Mx,hardBreak:xy,heading:g_,html:Rx,image:Lx,imageReference:Bx,inlineCode:Ux,link:qx,linkReference:Vx,list:E_,listItem:A_,paragraph:j_,root:T_,strong:Yx,text:O_,thematicBreak:R_};function L_(){return{enter:{table:B_,tableData:by,tableHeader:by,tableRow:H_},exit:{codeText:q_,table:U_,tableData:pf,tableHeader:pf,tableRow:pf}}}function B_(t){const l=t._align;this.enter({type:"table",align:l.map(function(i){return i==="none"?null:i}),children:[]},t),this.data.inTable=!0}function U_(t){this.exit(t),this.data.inTable=void 0}function H_(t){this.enter({type:"tableRow",children:[]},t)}function pf(t){this.exit(t)}function by(t){this.enter({type:"tableCell",children:[]},t)}function q_(t){let l=this.resume();this.data.inTable&&(l=l.replace(/\\([\\|])/g,V_));const i=this.stack[this.stack.length-1];i.type,i.value=l,this.exit(t)}function V_(t,l){return l==="|"?l:t}function I_(t){const l=t||{},i=l.tableCellPadding,r=l.tablePipeAlign,s=l.stringLength,o=i?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
76
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:k,table:f,tableCell:p,tableRow:h}};function f(v,_,R,H){return m(b(v,R,H),v.align)}function h(v,_,R,H){const N=y(v,R,H),Z=m([N]);return Z.slice(0,Z.indexOf(`
77
+ `))}function p(v,_,R,H){const N=R.enter("tableCell"),Z=R.enter("phrasing"),q=R.containerPhrasing(v,{...H,before:o,after:o});return Z(),N(),q}function m(v,_){return n_(v,{align:_,alignDelimiters:r,padding:i,stringLength:s})}function b(v,_,R){const H=v.children;let N=-1;const Z=[],q=_.enter("table");for(;++N<H.length;)Z[N]=y(H[N],_,R);return q(),Z}function y(v,_,R){const H=v.children;let N=-1;const Z=[],q=_.enter("tableRow");for(;++N<H.length;)Z[N]=p(H[N],v,_,R);return q(),Z}function k(v,_,R){let H=Zx.inlineCode(v,_,R);return R.stack.includes("tableCell")&&(H=H.replace(/\|/g,"\\$&")),H}}function Y_(){return{exit:{taskListCheckValueChecked:vy,taskListCheckValueUnchecked:vy,paragraph:F_}}}function Z_(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Q_}}}function vy(t){const l=this.stack[this.stack.length-2];l.type,l.checked=t.type==="taskListCheckValueChecked"}function F_(t){const l=this.stack[this.stack.length-2];if(l&&l.type==="listItem"&&typeof l.checked=="boolean"){const i=this.stack[this.stack.length-1];i.type;const r=i.children[0];if(r&&r.type==="text"){const s=l.children;let o=-1,f;for(;++o<s.length;){const h=s[o];if(h.type==="paragraph"){f=h;break}}f===i&&(r.value=r.value.slice(1),r.value.length===0?i.children.shift():i.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,i.position.start=Object.assign({},r.position.start)))}}this.exit(t)}function Q_(t,l,i,r){const s=t.children[0],o=typeof t.checked=="boolean"&&s&&s.type==="paragraph",f="["+(t.checked?"x":" ")+"] ",h=i.createTracker(r);o&&h.move(f);let p=Zx.listItem(t,l,i,{...r,...h.current()});return o&&(p=p.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,m)),p;function m(b){return b+f}}function G_(){return[E4(),Q4(),K4(),L_(),Y_()]}function X_(t){return{extensions:[C4(),G4(t),$4(),I_(t),Z_()]}}const J_={tokenize:tE,partial:!0},Fx={tokenize:nE,partial:!0},Qx={tokenize:lE,partial:!0},Gx={tokenize:aE,partial:!0},K_={tokenize:iE,partial:!0},Xx={name:"wwwAutolink",tokenize:W_,previous:Kx},Jx={name:"protocolAutolink",tokenize:eE,previous:$x},fl={name:"emailAutolink",tokenize:P_,previous:Px},Un={};function $_(){return{text:Un}}let da=48;for(;da<123;)Un[da]=fl,da++,da===58?da=65:da===91&&(da=97);Un[43]=fl;Un[45]=fl;Un[46]=fl;Un[95]=fl;Un[72]=[fl,Jx];Un[104]=[fl,Jx];Un[87]=[fl,Xx];Un[119]=[fl,Xx];function P_(t,l,i){const r=this;let s,o;return f;function f(y){return!Bf(y)||!Px.call(r,r.previous)||fd(r.events)?i(y):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),h(y))}function h(y){return Bf(y)?(t.consume(y),h):y===64?(t.consume(y),p):i(y)}function p(y){return y===46?t.check(K_,b,m)(y):y===45||y===95||Lt(y)?(o=!0,t.consume(y),p):b(y)}function m(y){return t.consume(y),s=!0,p}function b(y){return o&&s&&Vt(r.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),l(y)):i(y)}}function W_(t,l,i){const r=this;return s;function s(f){return f!==87&&f!==119||!Kx.call(r,r.previous)||fd(r.events)?i(f):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(J_,t.attempt(Fx,t.attempt(Qx,o),i),i)(f))}function o(f){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),l(f)}}function eE(t,l,i){const r=this;let s="",o=!1;return f;function f(y){return(y===72||y===104)&&$x.call(r,r.previous)&&!fd(r.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),s+=String.fromCodePoint(y),t.consume(y),h):i(y)}function h(y){if(Vt(y)&&s.length<5)return s+=String.fromCodePoint(y),t.consume(y),h;if(y===58){const k=s.toLowerCase();if(k==="http"||k==="https")return t.consume(y),p}return i(y)}function p(y){return y===47?(t.consume(y),o?m:(o=!0,p)):i(y)}function m(y){return y===null||gs(y)||it(y)||ka(y)||Es(y)?i(y):t.attempt(Fx,t.attempt(Qx,b),i)(y)}function b(y){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),l(y)}}function tE(t,l,i){let r=0;return s;function s(f){return(f===87||f===119)&&r<3?(r++,t.consume(f),s):f===46&&r===3?(t.consume(f),o):i(f)}function o(f){return f===null?i(f):l(f)}}function nE(t,l,i){let r,s,o;return f;function f(m){return m===46||m===95?t.check(Gx,p,h)(m):m===null||it(m)||ka(m)||m!==45&&Es(m)?p(m):(o=!0,t.consume(m),f)}function h(m){return m===95?r=!0:(s=r,r=void 0),t.consume(m),f}function p(m){return s||r||!o?i(m):l(m)}}function lE(t,l){let i=0,r=0;return s;function s(f){return f===40?(i++,t.consume(f),s):f===41&&r<i?o(f):f===33||f===34||f===38||f===39||f===41||f===42||f===44||f===46||f===58||f===59||f===60||f===63||f===93||f===95||f===126?t.check(Gx,l,o)(f):f===null||it(f)||ka(f)?l(f):(t.consume(f),s)}function o(f){return f===41&&r++,t.consume(f),s}}function aE(t,l,i){return r;function r(h){return h===33||h===34||h===39||h===41||h===42||h===44||h===46||h===58||h===59||h===63||h===95||h===126?(t.consume(h),r):h===38?(t.consume(h),o):h===93?(t.consume(h),s):h===60||h===null||it(h)||ka(h)?l(h):i(h)}function s(h){return h===null||h===40||h===91||it(h)||ka(h)?l(h):r(h)}function o(h){return Vt(h)?f(h):i(h)}function f(h){return h===59?(t.consume(h),r):Vt(h)?(t.consume(h),f):i(h)}}function iE(t,l,i){return r;function r(o){return t.consume(o),s}function s(o){return Lt(o)?i(o):l(o)}}function Kx(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||it(t)}function $x(t){return!Vt(t)}function Px(t){return!(t===47||Bf(t))}function Bf(t){return t===43||t===45||t===46||t===95||Lt(t)}function fd(t){let l=t.length,i=!1;for(;l--;){const r=t[l][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){i=!0;break}if(r._gfmAutolinkLiteralWalkedInto){i=!1;break}}return t.length>0&&!i&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),i}const rE={tokenize:mE,partial:!0};function uE(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:fE,continuation:{tokenize:dE},exit:hE}},text:{91:{name:"gfmFootnoteCall",tokenize:cE},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:sE,resolveTo:oE}}}}function sE(t,l,i){const r=this;let s=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let f;for(;s--;){const p=r.events[s][1];if(p.type==="labelImage"){f=p;break}if(p.type==="gfmFootnoteCall"||p.type==="labelLink"||p.type==="label"||p.type==="image"||p.type==="link")break}return h;function h(p){if(!f||!f._balanced)return i(p);const m=jn(r.sliceSerialize({start:f.end,end:r.now()}));return m.codePointAt(0)!==94||!o.includes(m.slice(1))?i(p):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(p),t.exit("gfmFootnoteCallLabelMarker"),l(p))}}function oE(t,l){let i=t.length;for(;i--;)if(t[i][1].type==="labelImage"&&t[i][0]==="enter"){t[i][1];break}t[i+1][1].type="data",t[i+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},t[i+3][1].start),end:Object.assign({},t[t.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},t[i+3][1].end),end:Object.assign({},t[i+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},t[t.length-1][1].start)},f={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},h=[t[i+1],t[i+2],["enter",r,l],t[i+3],t[i+4],["enter",s,l],["exit",s,l],["enter",o,l],["enter",f,l],["exit",f,l],["exit",o,l],t[t.length-2],t[t.length-1],["exit",r,l]];return t.splice(i,t.length-i+1,...h),t}function cE(t,l,i){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,f;return h;function h(y){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(y),t.exit("gfmFootnoteCallLabelMarker"),p}function p(y){return y!==94?i(y):(t.enter("gfmFootnoteCallMarker"),t.consume(y),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",m)}function m(y){if(o>999||y===93&&!f||y===null||y===91||it(y))return i(y);if(y===93){t.exit("chunkString");const k=t.exit("gfmFootnoteCallString");return s.includes(jn(r.sliceSerialize(k)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(y),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),l):i(y)}return it(y)||(f=!0),o++,t.consume(y),y===92?b:m}function b(y){return y===91||y===92||y===93?(t.consume(y),o++,m):m(y)}}function fE(t,l,i){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,f=0,h;return p;function p(_){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(_),t.exit("gfmFootnoteDefinitionLabelMarker"),m}function m(_){return _===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(_),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",b):i(_)}function b(_){if(f>999||_===93&&!h||_===null||_===91||it(_))return i(_);if(_===93){t.exit("chunkString");const R=t.exit("gfmFootnoteDefinitionLabelString");return o=jn(r.sliceSerialize(R)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(_),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),k}return it(_)||(h=!0),f++,t.consume(_),_===92?y:b}function y(_){return _===91||_===92||_===93?(t.consume(_),f++,b):b(_)}function k(_){return _===58?(t.enter("definitionMarker"),t.consume(_),t.exit("definitionMarker"),s.includes(o)||s.push(o),qe(t,v,"gfmFootnoteDefinitionWhitespace")):i(_)}function v(_){return l(_)}}function dE(t,l,i){return t.check(Nr,l,t.attempt(rE,l,i))}function hE(t){t.exit("gfmFootnoteDefinition")}function mE(t,l,i){const r=this;return qe(t,s,"gfmFootnoteDefinitionIndent",5);function s(o){const f=r.events[r.events.length-1];return f&&f[1].type==="gfmFootnoteDefinitionIndent"&&f[2].sliceSerialize(f[1],!0).length===4?l(o):i(o)}}function pE(t){let i=(t||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:s};return i==null&&(i=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function s(f,h){let p=-1;for(;++p<f.length;)if(f[p][0]==="enter"&&f[p][1].type==="strikethroughSequenceTemporary"&&f[p][1]._close){let m=p;for(;m--;)if(f[m][0]==="exit"&&f[m][1].type==="strikethroughSequenceTemporary"&&f[m][1]._open&&f[p][1].end.offset-f[p][1].start.offset===f[m][1].end.offset-f[m][1].start.offset){f[p][1].type="strikethroughSequence",f[m][1].type="strikethroughSequence";const b={type:"strikethrough",start:Object.assign({},f[m][1].start),end:Object.assign({},f[p][1].end)},y={type:"strikethroughText",start:Object.assign({},f[m][1].end),end:Object.assign({},f[p][1].start)},k=[["enter",b,h],["enter",f[m][1],h],["exit",f[m][1],h],["enter",y,h]],v=h.parser.constructs.insideSpan.null;v&&fn(k,k.length,0,Cs(v,f.slice(m+1,p),h)),fn(k,k.length,0,[["exit",y,h],["enter",f[p][1],h],["exit",f[p][1],h],["exit",b,h]]),fn(f,m-1,p-m+3,k),p=m+k.length-2;break}}for(p=-1;++p<f.length;)f[p][1].type==="strikethroughSequenceTemporary"&&(f[p][1].type="data");return f}function o(f,h,p){const m=this.previous,b=this.events;let y=0;return k;function k(_){return m===126&&b[b.length-1][1].type!=="characterEscape"?p(_):(f.enter("strikethroughSequenceTemporary"),v(_))}function v(_){const R=pi(m);if(_===126)return y>1?p(_):(f.consume(_),y++,v);if(y<2&&!i)return p(_);const H=f.exit("strikethroughSequenceTemporary"),N=pi(_);return H._open=!N||N===2&&!!R,H._close=!R||R===2&&!!N,h(_)}}}class gE{constructor(){this.map=[]}add(l,i,r){yE(this,l,i,r)}consume(l){if(this.map.sort(function(o,f){return o[0]-f[0]}),this.map.length===0)return;let i=this.map.length;const r=[];for(;i>0;)i-=1,r.push(l.slice(this.map[i][0]+this.map[i][1]),this.map[i][2]),l.length=this.map[i][0];r.push(l.slice()),l.length=0;let s=r.pop();for(;s;){for(const o of s)l.push(o);s=r.pop()}this.map.length=0}}function yE(t,l,i,r){let s=0;if(!(i===0&&r.length===0)){for(;s<t.map.length;){if(t.map[s][0]===l){t.map[s][1]+=i,t.map[s][2].push(...r);return}s+=1}t.map.push([l,i,r])}}function xE(t,l){let i=!1;const r=[];for(;l<t.length;){const s=t[l];if(i){if(s[0]==="enter")s[1].type==="tableContent"&&r.push(t[l+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(t[l-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(i=!0);l+=1}return r}function bE(){return{flow:{null:{name:"table",tokenize:vE,resolveAll:kE}}}}function vE(t,l,i){const r=this;let s=0,o=0,f;return h;function h(M){let Y=r.events.length-1;for(;Y>-1;){const ue=r.events[Y][1].type;if(ue==="lineEnding"||ue==="linePrefix")Y--;else break}const J=Y>-1?r.events[Y][1].type:null,ve=J==="tableHead"||J==="tableRow"?O:p;return ve===O&&r.parser.lazy[r.now().line]?i(M):ve(M)}function p(M){return t.enter("tableHead"),t.enter("tableRow"),m(M)}function m(M){return M===124||(f=!0,o+=1),b(M)}function b(M){return M===null?i(M):we(M)?o>1?(o=0,r.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(M),t.exit("lineEnding"),v):i(M):Re(M)?qe(t,b,"whitespace")(M):(o+=1,f&&(f=!1,s+=1),M===124?(t.enter("tableCellDivider"),t.consume(M),t.exit("tableCellDivider"),f=!0,b):(t.enter("data"),y(M)))}function y(M){return M===null||M===124||it(M)?(t.exit("data"),b(M)):(t.consume(M),M===92?k:y)}function k(M){return M===92||M===124?(t.consume(M),y):y(M)}function v(M){return r.interrupt=!1,r.parser.lazy[r.now().line]?i(M):(t.enter("tableDelimiterRow"),f=!1,Re(M)?qe(t,_,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):_(M))}function _(M){return M===45||M===58?H(M):M===124?(f=!0,t.enter("tableCellDivider"),t.consume(M),t.exit("tableCellDivider"),R):ee(M)}function R(M){return Re(M)?qe(t,H,"whitespace")(M):H(M)}function H(M){return M===58?(o+=1,f=!0,t.enter("tableDelimiterMarker"),t.consume(M),t.exit("tableDelimiterMarker"),N):M===45?(o+=1,N(M)):M===null||we(M)?te(M):ee(M)}function N(M){return M===45?(t.enter("tableDelimiterFiller"),Z(M)):ee(M)}function Z(M){return M===45?(t.consume(M),Z):M===58?(f=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(M),t.exit("tableDelimiterMarker"),q):(t.exit("tableDelimiterFiller"),q(M))}function q(M){return Re(M)?qe(t,te,"whitespace")(M):te(M)}function te(M){return M===124?_(M):M===null||we(M)?!f||s!==o?ee(M):(t.exit("tableDelimiterRow"),t.exit("tableHead"),l(M)):ee(M)}function ee(M){return i(M)}function O(M){return t.enter("tableRow"),P(M)}function P(M){return M===124?(t.enter("tableCellDivider"),t.consume(M),t.exit("tableCellDivider"),P):M===null||we(M)?(t.exit("tableRow"),l(M)):Re(M)?qe(t,P,"whitespace")(M):(t.enter("data"),oe(M))}function oe(M){return M===null||M===124||it(M)?(t.exit("data"),P(M)):(t.consume(M),M===92?fe:oe)}function fe(M){return M===92||M===124?(t.consume(M),oe):oe(M)}}function kE(t,l){let i=-1,r=!0,s=0,o=[0,0,0,0],f=[0,0,0,0],h=!1,p=0,m,b,y;const k=new gE;for(;++i<t.length;){const v=t[i],_=v[1];v[0]==="enter"?_.type==="tableHead"?(h=!1,p!==0&&(ky(k,l,p,m,b),b=void 0,p=0),m={type:"table",start:Object.assign({},_.start),end:Object.assign({},_.end)},k.add(i,0,[["enter",m,l]])):_.type==="tableRow"||_.type==="tableDelimiterRow"?(r=!0,y=void 0,o=[0,0,0,0],f=[0,i+1,0,0],h&&(h=!1,b={type:"tableBody",start:Object.assign({},_.start),end:Object.assign({},_.end)},k.add(i,0,[["enter",b,l]])),s=_.type==="tableDelimiterRow"?2:b?3:1):s&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")?(r=!1,f[2]===0&&(o[1]!==0&&(f[0]=f[1],y=$u(k,l,o,s,void 0,y),o=[0,0,0,0]),f[2]=i)):_.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(f[0]=f[1],y=$u(k,l,o,s,void 0,y)),o=f,f=[o[1],i,0,0])):_.type==="tableHead"?(h=!0,p=i):_.type==="tableRow"||_.type==="tableDelimiterRow"?(p=i,o[1]!==0?(f[0]=f[1],y=$u(k,l,o,s,i,y)):f[1]!==0&&(y=$u(k,l,f,s,i,y)),s=0):s&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")&&(f[3]=i)}for(p!==0&&ky(k,l,p,m,b),k.consume(l.events),i=-1;++i<l.events.length;){const v=l.events[i];v[0]==="enter"&&v[1].type==="table"&&(v[1]._align=xE(l.events,i))}return t}function $u(t,l,i,r,s,o){const f=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",h="tableContent";i[0]!==0&&(o.end=Object.assign({},fi(l.events,i[0])),t.add(i[0],0,[["exit",o,l]]));const p=fi(l.events,i[1]);if(o={type:f,start:Object.assign({},p),end:Object.assign({},p)},t.add(i[1],0,[["enter",o,l]]),i[2]!==0){const m=fi(l.events,i[2]),b=fi(l.events,i[3]),y={type:h,start:Object.assign({},m),end:Object.assign({},b)};if(t.add(i[2],0,[["enter",y,l]]),r!==2){const k=l.events[i[2]],v=l.events[i[3]];if(k[1].end=Object.assign({},v[1].end),k[1].type="chunkText",k[1].contentType="text",i[3]>i[2]+1){const _=i[2]+1,R=i[3]-i[2]-1;t.add(_,R,[])}}t.add(i[3]+1,0,[["exit",y,l]])}return s!==void 0&&(o.end=Object.assign({},fi(l.events,s)),t.add(s,0,[["exit",o,l]]),o=void 0),o}function ky(t,l,i,r,s){const o=[],f=fi(l.events,i);s&&(s.end=Object.assign({},f),o.push(["exit",s,l])),r.end=Object.assign({},f),o.push(["exit",r,l]),t.add(i+1,0,o)}function fi(t,l){const i=t[l],r=i[0]==="enter"?"start":"end";return i[1][r]}const wE={name:"tasklistCheck",tokenize:_E};function SE(){return{text:{91:wE}}}function _E(t,l,i){const r=this;return s;function s(p){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?i(p):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(p),t.exit("taskListCheckMarker"),o)}function o(p){return it(p)?(t.enter("taskListCheckValueUnchecked"),t.consume(p),t.exit("taskListCheckValueUnchecked"),f):p===88||p===120?(t.enter("taskListCheckValueChecked"),t.consume(p),t.exit("taskListCheckValueChecked"),f):i(p)}function f(p){return p===93?(t.enter("taskListCheckMarker"),t.consume(p),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),h):i(p)}function h(p){return we(p)?l(p):Re(p)?t.check({tokenize:EE},l,i)(p):i(p)}}function EE(t,l,i){return qe(t,r,"whitespace");function r(s){return s===null?i(s):l(s)}}function CE(t){return ox([$_(),uE(),pE(t),bE(),SE()])}const AE={};function jE(t){const l=this,i=t||AE,r=l.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),f=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(CE(i)),o.push(G_()),f.push(X_(i))}function Dr({source:t,className:l=""}){return t.trim()?g.jsx("div",{className:`markdown-body ${l}`.trim(),children:g.jsx(p4,{remarkPlugins:[jE],children:t})}):g.jsx("p",{className:"text-sm text-white/40 italic",children:"Empty"})}function Wx({execResult:t}){if(!t.resultText)return null;const l=Iy(t),i=l.detected;return g.jsxs("section",{className:"space-y-2",children:[i&&g.jsxs("div",{className:"rounded-lg border border-red-400/35 bg-red-500/10 px-3 py-2.5",children:[g.jsx("p",{className:"text-sm font-semibold text-red-300",children:"Blocker — agent could not finish"}),l.summary&&g.jsx("p",{className:"text-sm text-red-200/85 mt-1 leading-snug",children:l.summary}),g.jsx("p",{className:"text-xs text-red-200/60 mt-2",children:"Grant the missing permission or adjust settings, then retry with instructions below."})]}),g.jsx("div",{className:`heading-section ${i?"text-red-300":""}`,children:i?"Blocker details":"Result"}),g.jsx("div",{className:`markdown-body-panel markdown-body-panel--compact ${i?"border-red-400/30 bg-red-950/20":""}`,children:g.jsx(Dr,{source:t.resultText})})]})}function NE(t){return t?Iy(t).detected:!1}function TE(t){const l=qt(t,"playbook_patch");if(!l)return null;try{return ol(l)}catch{return null}}function DE(t){const l=qt(t,"reflect_status");if(!l)return null;try{return ol(l)}catch{return null}}function e0({run:t,artifacts:l}){if(!t.playbookId)return null;const i=TE(l),r=DE(l);if((t.runtime??"claude_code")==="cursor_local")return g.jsxs("section",{className:"space-y-2",children:[g.jsx("div",{className:"heading-section",children:"Playbook learning"}),g.jsx("p",{className:"text-sm text-white/45",children:"Playbook learning requires Claude Code runtime (Cursor has no Agent Deck MCP)."})]});if((r==null?void 0:r.status)==="pending"&&!i)return g.jsxs("section",{className:"space-y-2",children:[g.jsx("div",{className:"heading-section",children:"Playbook learning"}),g.jsx("p",{className:"text-sm text-white/45",children:"Analyzing for playbook improvements…"})]});if(!i)return(r==null?void 0:r.status)==="failed"?g.jsxs("section",{className:"space-y-2",children:[g.jsx("div",{className:"heading-section",children:"Playbook learning"}),g.jsx("p",{className:"text-sm text-white/45",children:r.error??"Reflect step failed"})]}):(r==null?void 0:r.status)==="completed"&&r.error?g.jsxs("section",{className:"space-y-2",children:[g.jsx("div",{className:"heading-section",children:"Playbook learning"}),g.jsx("p",{className:"text-sm text-white/45",children:r.error})]}):null;const o=i.dashboardUrl;return g.jsxs("section",{className:"space-y-3",children:[g.jsx("div",{className:"heading-section",children:"Playbook learning"}),i.playbookTitle&&g.jsxs("p",{className:"text-sm text-white/45",children:[i.playbookTitle," ",i.playbookId&&g.jsxs("span",{className:"text-white/30",children:["(",i.playbookId,")"]})]}),i.rationale&&g.jsx("p",{className:"text-sm text-white/55",children:i.rationale}),g.jsxs("p",{className:"text-sm text-[#92E4DD]/80",children:["Proposal ",g.jsx("span",{className:"font-mono text-white/50",children:i.patchId})," queued in Agent Deck — accept or reject in the deck review queue."]}),o&&g.jsx("a",{href:o,target:"_blank",rel:"noreferrer",className:"inline-block btn-gold px-4 py-2 text-sm no-underline",children:"Review in Agent Deck"})]})}function t0({exchanges:t,busy:l,onAsk:i}){const[r,s]=I.useState(""),o=t.some(h=>h.status==="pending"),f=!l&&!o&&r.trim().length>0;return g.jsxs("section",{className:"space-y-2",children:[g.jsx("div",{className:"heading-section",children:"Ask the agent"}),t.map(h=>g.jsxs("div",{className:"space-y-1 rounded-xl border border-white/10 bg-white/[0.03] p-3",children:[g.jsx("p",{className:"text-sm text-white/85",children:h.question}),h.status==="pending"&&g.jsx("p",{className:"text-sm text-[#92E4DD] animate-pulse",children:"Agent is answering…"}),h.status==="failed"&&g.jsxs("p",{className:"text-sm text-red-400/90",children:["Could not answer",h.error?` — ${h.error}`:"",". Ask again."]}),h.status==="answered"&&h.answer&&g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"markdown-body-panel markdown-body-panel--flow",children:g.jsx(Dr,{source:h.answer})}),!h.sessionResumed&&g.jsx("p",{className:"text-xs text-white/30",children:"Answered from artifacts — the original session had expired."})]})]},h.exchangeId)),g.jsx("textarea",{className:"field-mono min-h-[72px] resize-y leading-relaxed",placeholder:"Why did you choose this approach? Did you check X?",value:r,disabled:l||o,onChange:h=>s(h.target.value)}),g.jsx("button",{type:"button",disabled:!f,onClick:async()=>{const h=r.trim();s(""),await i(h)},className:"btn-ghost text-xs px-2 py-1 disabled:opacity-40",children:o?"Answering…":"Ask"})]})}function n0(t){const l=[];for(const i of t)if(!(i.kind!=="result_qa"||!i.contentJson))try{l.push(JSON.parse(i.contentJson))}catch{}return Yv(l)}function zE({run:t}){const[l,i]=I.useState([]),[r,s]=I.useState(null),[o,f]=I.useState(null),[h,p]=I.useState(!1),m=I.useCallback(async()=>{const te=await di(t.id);i(te.artifacts),s(te.usageSummary??null),f(te.traceSummary??null)},[t.id]),b=async te=>{p(!0);try{await te(),await m()}catch(ee){alert(String(ee))}finally{p(!1)}},y=zy(l,"execution_result","execute"),k=qt(l,"document"),v=k?ol(k):null,_=l.find(te=>te.kind==="approved_plan"),R=OE(l),H=qt(l,"send_receipt"),N=H?ol(H):null,Z=n0(l),q=Z.some(te=>te.status==="pending");return I.useEffect(()=>{m().catch(console.error)},[m]),I.useEffect(()=>{if(!q)return;const te=setInterval(()=>{m().catch(console.error)},3e3);return()=>clearInterval(te)},[q,m]),g.jsxs("div",{className:"space-y-4",children:[g.jsxs("section",{className:"space-y-1",children:[g.jsx("div",{className:"heading-section",children:"Completed Run (Read-Only)"}),g.jsx("p",{className:"text-body",children:ws(t)})]}),_&&g.jsxs("section",{className:"space-y-2",children:[g.jsx("div",{className:"heading-section",children:"Approved Plan"}),g.jsx("div",{className:"markdown-body-panel markdown-body-panel--flow",children:g.jsx(Dr,{source:ts(_)})})]}),v&&g.jsxs("section",{className:"space-y-2",children:[g.jsx("div",{className:"heading-section",children:"Document"}),g.jsx("textarea",{className:"field-mono min-h-[160px] resize-y",value:v.markdown,readOnly:!0})]}),g.jsx(t0,{exchanges:Z,busy:h,onAsk:te=>b(()=>Dy(t.id,te))}),y&&g.jsx(Wx,{execResult:y}),R&&g.jsxs("section",{className:"space-y-2",children:[g.jsxs("div",{className:"heading-section",children:["Outbound draft (",R.status,")"]}),g.jsxs("p",{className:"text-sm text-white/45",children:["To: ",R.draft.summary.target]}),g.jsx("textarea",{className:"field-mono min-h-[80px] resize-y",value:R.draft.summary.body,readOnly:!0})]}),N&&g.jsxs("section",{className:"space-y-2",children:[g.jsx("div",{className:"heading-section",children:"Send receipt"}),g.jsxs("p",{className:"text-sm text-white/45",children:["Sent ",new Date(N.sentAt).toLocaleString(),N.permalink&&g.jsxs(g.Fragment,{children:[" · ",g.jsx("a",{href:N.permalink,className:"text-[#92E4DD] hover:underline",target:"_blank",rel:"noreferrer",children:"Open message"})]})]})]}),g.jsx(e0,{run:t,artifacts:l}),r&&g.jsx(_s,{summary:r}),o&&g.jsx(Ss,{trace:o})]})}function OE(t){for(const l of["slack_draft","email_draft"]){const i=qt(t,l);if(i!=null&&i.contentJson)try{return JSON.parse(i.contentJson)}catch{}}return null}function gi(){return{maxTurns:"",maxBudgetUsd:""}}function l0(t){return{maxTurns:(t==null?void 0:t.maxTurns)!=null?String(t.maxTurns):"",maxBudgetUsd:(t==null?void 0:t.maxBudgetUsd)!=null?String(t.maxBudgetUsd):""}}function br(t){const l=t.maxTurns.trim()?Number(t.maxTurns):null,i=t.maxBudgetUsd.trim()?Number(t.maxBudgetUsd):null;return l==null&&i==null||l!=null&&(!Number.isFinite(l)||l<=0)||i!=null&&(!Number.isFinite(i)||i<=0)?null:{maxTurns:l,maxBudgetUsd:i}}function ME(t,l){const i=Ar(t,l);return!!(i.maxTurns||i.maxBudgetUsd)}function Zl(t,l,i){if(!(!t.maxTurns.trim()&&!t.maxBudgetUsd.trim()&&!ME(l,i)))return br(t)}function Ar(t,l){const i=Dv(t);return l0(i[l])}function wy(t){return l0(Tv(t))}function RE({run:t,agents:l,onRefresh:i}){const[r,s]=I.useState([]),[o,f]=I.useState(null),[h,p]=I.useState(null),[m,b]=I.useState(""),[y,k]=I.useState(""),[v,_]=I.useState(gi()),[R,H]=I.useState(!1),N=l.find(P=>P.id===t.agentId),Z=t.runtime??(N==null?void 0:N.runtime)??"claude_code",q=I.useCallback(async()=>{const P=await di(t.id);s(P.artifacts),f(P.usageSummary??null),p(P.traceSummary??null)},[t.id]),te=t.status==="running",ee=t.status==="plan_approved";I.useEffect(()=>{q().catch(console.error)},[q]),I.useEffect(()=>{k(t.executeModel??""),_(Ar(t.budgetJson,"execute"))},[t.id,t.executeModel,t.budgetJson]),I.useEffect(()=>{if(!te&&!ee)return;const P=setInterval(()=>q().catch(console.error),3e3);return()=>clearInterval(P)},[te,ee,q]),I.useEffect(()=>{te&&nv(t.id,"stream_trace").then(b).catch(()=>b(""))},[te,t.id,r.length]);const O=async P=>{H(!0);try{await P(),await q(),i()}catch(oe){alert(String(oe))}finally{H(!1)}};return g.jsxs("div",{className:"space-y-4",children:[g.jsxs("section",{className:"space-y-1",children:[g.jsx("div",{className:"heading-section",children:"Agent"}),g.jsx("p",{className:"text-body",children:ws(t)}),ee&&g.jsx("p",{className:"text-sm text-[#92E4DD]",children:"Approved — waiting for execution slot…"}),te&&g.jsx("p",{className:"text-sm text-[#92E4DD] animate-pulse",children:"Executing…"})]}),(()=>{const P=qt(r,"approved_plan"),oe=(P==null?void 0:P.author)==="system"?ol(P):null;return oe?g.jsxs("section",{className:"space-y-1",children:[g.jsx("div",{className:"heading-section text-emerald-200",children:"Auto-approved"}),g.jsx("p",{className:"text-sm text-white/60",children:oe.rationale??"Self-triage marked this plan trivial."})]}):null})(),ee&&g.jsxs(g.Fragment,{children:[g.jsx(ma,{phase:"Execution",runtime:Z,model:y,onModelChange:k,budget:v,onBudgetChange:_,defaultModelId:N==null?void 0:N.defaultExecuteModel,disabled:R}),g.jsx("button",{type:"button",disabled:R,onClick:()=>O(()=>Gb(t.id,y||null,Zl(v,t.budgetJson,"execute"))),className:"btn-ghost px-3 py-2 w-full",children:"Run now (skip queue wait)"})]}),h&&g.jsx(Ss,{trace:h}),o&&g.jsx(_s,{summary:o}),m&&g.jsxs("section",{className:"space-y-2",children:[g.jsx("div",{className:"heading-section",children:"Log Tail"}),g.jsx("textarea",{className:"field-mono min-h-[140px] resize-y text-sm",value:m,readOnly:!0})]}),(te||ee)&&g.jsx("button",{type:"button",disabled:R,onClick:()=>O(()=>Vf(t.id)),className:"btn-ghost-danger w-full py-2",children:"Cancel run"})]})}function LE({questions:t,drafts:l,onDraftsChange:i,busy:r}){const s=(o,f)=>{i({...l,[o]:f})};return g.jsxs("div",{className:"space-y-3 rounded-xl border border-amber-400/40 bg-amber-400/5 p-3",children:[g.jsx("div",{className:"heading-section text-amber-200",children:"Agent needs your answer"}),t.map(o=>{const f=l[o.id]??{};return g.jsxs("div",{className:"space-y-1.5",children:[g.jsx("p",{className:"text-sm text-white/85",children:o.question}),g.jsx("div",{className:"flex flex-wrap gap-1.5",children:o.options.map(h=>g.jsx("button",{type:"button",disabled:r,title:h.description,onClick:()=>s(o.id,{selectedLabel:h.label}),className:`btn-ghost text-xs px-2 py-1 ${f.selectedLabel===h.label?"ring-1 ring-amber-300 text-amber-200":""}`,children:h.label},h.label))}),g.jsx("input",{className:"field-mono w-full text-xs",placeholder:"Other… (free-form answer triggers a replan)",value:f.freeText??"",disabled:r,onChange:h=>s(o.id,h.target.value?{freeText:h.target.value}:{})})]},o.id)})]})}function BE(t,l){return t.map(i=>({questionId:i.id,...l[i.id]}))}function UE(t,l){return t.every(i=>{var s;const r=l[i.id];return!!(r!=null&&r.selectedLabel||(s=r==null?void 0:r.freeText)!=null&&s.trim())})}function HE(t,l){return t.some(i=>{var r,s;return(s=(r=l[i.id])==null?void 0:r.freeText)==null?void 0:s.trim()})}function dd({title:t,open:l,onToggle:i,children:r,bordered:s=!0}){return g.jsxs("section",{className:`space-y-2 ${s?"border-t border-white/10 pt-3":""}`,children:[g.jsxs("button",{type:"button",onClick:i,className:"flex w-full items-center justify-between gap-2 text-left",children:[g.jsx("span",{className:"heading-section",children:t}),g.jsx("span",{className:"text-xs text-white/40",children:l?"Hide":"Show"})]}),l&&r]})}function a0({busy:t,onRemoved:l}){const i=()=>{confirm("Remove this task from Operations? It won't be marked done and can't be brought back here.")&&l()};return g.jsxs("div",{className:"pt-2 border-t border-white/10",children:[g.jsx("button",{type:"button",disabled:t,onClick:i,className:"btn-ghost-danger w-full py-2 disabled:cursor-not-allowed disabled:opacity-60",children:"Remove from Operations"}),g.jsx("p",{className:"text-xs text-white/35 text-center mt-1.5",children:"Dismisses the task — not archived to Done."})]})}function qE(t){const l=t.split(`
78
+ `).map(i=>i.trim()).find(i=>i.length>0&&!i.startsWith("#")&&!i.startsWith("```"));return(l==null?void 0:l.replace(/^[-*]\s+/,"").slice(0,160))??"Plan draft ready"}function VE({run:t,agents:l,onRefresh:i,onApproved:r,onApprovedAndNext:s}){const[o,f]=I.useState([]),[h,p]=I.useState(null),[m,b]=I.useState(null),[y,k]=I.useState(""),[v,_]=I.useState(""),[R,H]=I.useState(""),[N,Z]=I.useState(gi()),[q,te]=I.useState(gi()),[ee,O]=I.useState({}),[P,oe]=I.useState(!1),[fe,M]=I.useState(!1),[Y,J]=I.useState(""),[ve,ue]=I.useState(!1),[W,T]=I.useState(""),[X,se]=I.useState(""),[je,E]=I.useState(!1),[A,F]=I.useState(!1),[S,re]=I.useState(!1),de=l.find(Ye=>Ye.id===t.agentId),ne=t.runtime??(de==null?void 0:de.runtime)??"claude_code",xe=I.useCallback(async()=>{const Ye=await di(t.id);f(Ye.artifacts),p(Ye.usageSummary??null),b(Ye.traceSummary??null);const Q=qt(Ye.artifacts,"approved_plan"),ie=qt(Ye.artifacts,"draft_plan"),be=Q??ie;if(be){const Ce=ts(be);k(Ce),se(Ce)}},[t.id]),Qe=o.some(Ye=>Ye.kind==="draft_plan"),wt=t.status==="plan_pending"&&!Qe||S,en=qt(o,"plan_triage"),dl=qt(o,"plan_answers"),Hn=en?ol(en):null,St=t.status==="plan_pending"&&Hn&&!Hn.consumed&&Hn.questions.length>0&&(!dl||dl.createdAt<=en.createdAt)?Hn.questions:[],hl=UE(St,ee),Nn=HE(St,ee);I.useEffect(()=>{xe().catch(console.error)},[xe]),I.useEffect(()=>{_(t.planModel??""),H(t.executeModel??""),Z(Ar(t.budgetJson,"plan")),te(Ar(t.budgetJson,"execute")),O({}),oe(!1),M(!1),J(""),ue(!1),T(""),E(!1),re(!1)},[t.id,t.planModel,t.executeModel,t.budgetJson]),I.useEffect(()=>{if(!wt)return;const Ye=setInterval(()=>{xe().catch(console.error),i()},3e3);return()=>clearInterval(Ye)},[wt,xe,i]);const Sa=async Ye=>{const Q=Date.now()+12e4;for(;Date.now()<Q;){const ie=await di(t.id);f(ie.artifacts);const be=qt(ie.artifacts,"draft_plan");if(be&&be.createdAt!==Ye){const Ce=ts(be);k(Ce),se(Ce),oe(!0);break}await new Promise(Ce=>setTimeout(Ce,2e3))}i()},Gl=async Ye=>{var ie;const Q=(ie=qt(o,"draft_plan"))==null?void 0:ie.createdAt;re(!0),F(!0);try{await Qb(t.id,v||null,Zl(N,t.budgetJson,"plan"),Ye),await Sa(Q)}catch(be){alert(String(be))}finally{re(!1),F(!1),M(!1),ue(!1),J("")}},ml=()=>{ue(!1),M(Ye=>!Ye)},pl=()=>{if(M(!1),ve){gl();return}T(y),ue(!0)},gl=()=>{W!==X&&!confirm("Discard your edits? Unsaved changes will be lost.")||(T(X),ue(!1))},bi=async()=>{if(W.trim()){F(!0);try{await Kc(t.id,W,!1),k(W),se(W)}catch(Ye){alert(String(Ye)),F(!1);return}await Gl({editedMarkdown:W})}},vi=async()=>{W.trim()&&await pt(async()=>{await Kc(t.id,W,!0,{planModel:v||null,executeModel:R||null,planBudget:Zl(N,t.budgetJson,"plan"),executeBudget:Zl(q,t.budgetJson,"execute")}),ue(!1),r==null||r(),s==null||s()})},pt=async Ye=>{F(!0);try{await Ye(),await xe(),i()}catch(Q){alert(String(Q))}finally{F(!1)}};return g.jsxs("div",{className:"space-y-4",children:[g.jsxs("section",{className:"space-y-2",children:[g.jsx("div",{className:"heading-section",children:"Plan"}),g.jsx("p",{className:"text-sm text-white/45",children:ws(t)}),wt?g.jsxs(g.Fragment,{children:[g.jsx("p",{className:"text-sm text-[#92E4DD] animate-pulse",children:S?"Agent is replanning…":"Agent is writing the plan…"}),g.jsx("div",{className:"field-mono min-h-[min(200px,30vh)] flex items-center justify-center text-sm text-white/40 rounded border border-white/10",children:"Plan will appear here when the agent finishes…"})]}):y.trim()?g.jsxs(g.Fragment,{children:[!P&&g.jsxs("button",{type:"button",onClick:()=>oe(!0),className:"w-full text-left rounded-xl border border-white/10 bg-white/[0.03] px-4 py-3 hover:border-white/20 transition-colors",children:[g.jsx("p",{className:"text-sm text-white/75 line-clamp-2",children:qE(y)}),g.jsx("p",{className:"text-xs text-[#92E4DD] mt-2",children:"Show full plan →"})]}),P&&g.jsxs("div",{className:"space-y-2",children:[g.jsx("div",{className:"markdown-body-panel markdown-body-panel--flow",children:g.jsx(Dr,{source:y})}),g.jsx("button",{type:"button",onClick:()=>oe(!1),className:"btn-ghost text-xs px-2 py-1",children:"Show summary"})]})]}):g.jsx("p",{className:"text-sm text-white/40",children:"No plan yet."}),Qe&&!wt&&g.jsxs("div",{className:"space-y-3 pt-1 border-t border-white/10",children:[g.jsxs("div",{className:"flex flex-wrap gap-2",children:[g.jsx("button",{type:"button",disabled:A,onClick:ml,className:`btn-ghost text-xs px-3 py-1.5 disabled:opacity-40 ${fe?"border-[#92E4DD]/40 text-[#92E4DD]":""}`,children:"Replan with feedback"}),g.jsx("button",{type:"button",disabled:A,onClick:pl,className:`btn-ghost text-xs px-3 py-1.5 disabled:opacity-40 ${ve?"border-[#92E4DD]/40 text-[#92E4DD]":""}`,children:"Edit & replan / execute"})]}),fe&&g.jsxs("div",{className:"space-y-3 rounded-xl border border-white/10 bg-white/[0.02] p-3",children:[g.jsx("label",{htmlFor:`replan-feedback-${t.id}`,className:"text-xs text-white/45 uppercase tracking-wide",children:"What should change?"}),g.jsx("textarea",{id:`replan-feedback-${t.id}`,className:"field-mono min-h-[min(120px,18vh)] resize-y leading-relaxed w-full",value:Y,onChange:Ye=>J(Ye.target.value),placeholder:"Comments for the agent — e.g. use a simpler approach, add tests, skip step 2…",disabled:A}),g.jsx(ma,{phase:"Plan",runtime:ne,model:v,onModelChange:_,budget:N,onBudgetChange:Z,defaultModelId:de==null?void 0:de.defaultPlanModel,disabled:A}),g.jsx("button",{type:"button",disabled:A||!Y.trim(),onClick:()=>Gl({feedback:Y.trim()}),className:"btn-gold px-4 py-2 text-sm disabled:opacity-40 w-full sm:w-auto",children:"Replan"})]}),ve&&g.jsxs("div",{className:"space-y-3 rounded-xl border border-white/10 bg-white/[0.02] p-3",children:[g.jsx("label",{htmlFor:`plan-edit-${t.id}`,className:"text-xs text-white/45 uppercase tracking-wide",children:"Edit plan markdown"}),g.jsx("textarea",{id:`plan-edit-${t.id}`,className:"field-mono min-h-[min(280px,35vh)] resize-y leading-relaxed w-full",value:W,onChange:Ye=>T(Ye.target.value),placeholder:"Edit plan markdown",disabled:A}),g.jsx(ma,{phase:"Execution",runtime:ne,model:R,onModelChange:H,budget:q,onBudgetChange:te,defaultModelId:de==null?void 0:de.defaultExecuteModel,disabled:A}),g.jsxs("div",{className:"flex flex-wrap gap-2",children:[g.jsx("button",{type:"button",disabled:A||!W.trim(),onClick:()=>void bi(),className:"btn-ghost text-xs px-3 py-1.5 disabled:opacity-40",children:"Replan"}),g.jsx("button",{type:"button",disabled:A||!W.trim(),onClick:()=>void vi(),className:"btn-gold px-4 py-2 text-sm disabled:opacity-40",children:"Execute"}),g.jsx("button",{type:"button",disabled:A,onClick:gl,className:"btn-ghost text-xs px-3 py-1.5",children:"Cancel"})]})]})]})]}),St.length>0&&!wt&&g.jsxs("section",{className:"space-y-2",children:[g.jsx("div",{className:"heading-section text-amber-200",children:"Resolve blocker"}),g.jsx("p",{className:"text-sm text-white/45",children:"Answer before execution can start."}),g.jsx(LE,{questions:St,drafts:ee,onDraftsChange:O,busy:A})]}),Qe&&!wt&&g.jsxs("section",{className:"space-y-3",children:[g.jsx("div",{className:"heading-section",children:"Your Decision"}),!Nn&&g.jsx(ma,{phase:"Execution",runtime:ne,model:R,onModelChange:H,budget:q,onBudgetChange:te,defaultModelId:de==null?void 0:de.defaultExecuteModel,disabled:A}),St.length>0&&g.jsx("button",{type:"button",disabled:A||!hl,className:"btn-gold px-5 py-2 disabled:opacity-40 w-full sm:w-auto",onClick:()=>pt(async()=>{(await Xb(t.id,BE(St,ee),Nn?void 0:{executeModel:R||null,executeBudget:Zl(q,t.budgetJson,"execute")})).outcome==="approved"?(r==null||r(),s==null||s()):re(!0)}),children:Nn?"Submit & replan":"Submit & start execution"}),St.length>0&&g.jsxs("div",{className:"flex items-center gap-3 text-xs text-white/30 uppercase tracking-wide",children:[g.jsx("span",{className:"h-px flex-1 bg-white/10"}),"or skip the questions",g.jsx("span",{className:"h-px flex-1 bg-white/10"})]}),g.jsx("button",{type:"button",disabled:A||!y.trim(),onClick:()=>pt(async()=>{await Kc(t.id,y,!0,{planModel:v||null,executeModel:R||null,planBudget:Zl(N,t.budgetJson,"plan"),executeBudget:Zl(q,t.budgetJson,"execute")}),r==null||r(),s==null||s()}),className:"btn-gold px-5 py-2 disabled:opacity-40 w-full sm:w-auto",children:St.length>0?"Proceed — agent decides →":"Approve & next →"}),St.length>0&&g.jsx("p",{className:"text-xs text-white/40",children:"The unanswered questions are passed to the agent, which decides them itself."})]}),h&&g.jsx("section",{className:"border-t border-white/10 pt-3",children:g.jsx(_s,{summary:h})}),m&&g.jsx(dd,{title:"Trace",open:je,onToggle:()=>E(Ye=>!Ye),children:g.jsx(Ss,{trace:m,showHeading:!1})}),g.jsx(a0,{busy:A,onRemoved:()=>pt(async()=>{await Vf(t.id),s==null||s()})})]})}function IE({content:t,deliverError:l,onRetrySend:i,retrySendBusy:r}){const{draft:s,bodyMismatch:o}=t,f=JSON.stringify(s.toolCall,null,2),[h,p]=I.useState(!!o);return g.jsxs("section",{className:"space-y-3 rounded-lg border border-[#C4B643]/30 bg-[#C4B643]/5 p-3",children:[g.jsx("div",{className:"heading-section text-[#E8DC7A]",children:"Outbound message (will send on approve)"}),o&&g.jsx("p",{className:"text-sm text-amber-300/90",children:"Summary body does not match toolCall arguments — review the exact payload below."}),g.jsxs("div",{className:"space-y-1",children:[g.jsx("p",{className:"text-xs text-white/40 uppercase tracking-wide",children:"To"}),g.jsx("p",{className:"text-base text-[#E8F6F4] font-medium",children:s.summary.target})]}),g.jsxs("div",{className:"space-y-1",children:[g.jsx("p",{className:"text-xs text-white/40 uppercase tracking-wide",children:"Message"}),g.jsx("textarea",{className:"field-mono min-h-[100px] resize-y w-full",value:s.summary.body,readOnly:!0})]}),g.jsx(dd,{title:"Exact tool call (server sends verbatim)",open:h,onToggle:()=>p(m=>!m),bordered:!1,children:g.jsx("pre",{className:"field-mono text-xs overflow-x-auto whitespace-pre-wrap p-2",children:f})}),l&&g.jsxs("div",{className:"space-y-2 rounded border border-red-500/30 bg-red-500/5 p-2",children:[g.jsxs("p",{className:"text-sm text-red-400/90",children:["Send failed: ",l]}),g.jsx("p",{className:"text-xs text-white/45",children:"Use Retry send after fixing the issue (e.g. deck down, wrong Slack user). To change the message or recipient, use Retry with new instructions below."}),i&&g.jsx("button",{type:"button",disabled:r,onClick:i,className:"btn-gold w-full py-2 disabled:opacity-40",children:"Retry send →"})]})]})}function YE({run:t,agents:l,onRefresh:i,onRetry:r,onDoneAndNext:s}){var de;const[o,f]=I.useState([]),[h,p]=I.useState(null),[m,b]=I.useState(null),[y,k]=I.useState(""),[v,_]=I.useState(""),[R,H]=I.useState(gi()),[N,Z]=I.useState(!1),[q,te]=I.useState(!1),[ee,O]=I.useState(!1),[P,oe]=I.useState(null),fe=l.find(ne=>ne.id===t.agentId),M=t.runtime??(fe==null?void 0:fe.runtime)??"claude_code",Y=I.useCallback(async()=>{var Qe;const ne=await di(t.id);f(ne.artifacts),p(ne.usageSummary??null),b(ne.traceSummary??null);const xe=(Qe=ne.events)==null?void 0:Qe.filter(Ve=>Ve.type==="deliver_failed").at(-1);if(xe!=null&&xe.payloadJson)try{const Ve=JSON.parse(xe.payloadJson);oe(Ve.error??null)}catch{oe(null)}},[t.id]),J=zy(o,"execution_result","execute"),ve=qt(o,"document"),ue=ve?ol(ve):null,W=o.find(ne=>ne.kind==="approved_plan"),T=ZE(o),X=NE(J),se=!!y.trim(),je=n0(o),E=je.some(ne=>ne.status==="pending");I.useEffect(()=>{Y().catch(console.error)},[Y]);const F=o.some(ne=>{if(ne.kind!=="reflect_status"||!ne.contentJson)return!1;try{return JSON.parse(ne.contentJson).status==="pending"}catch{return!1}})||E;I.useEffect(()=>{if(!F)return;const ne=setInterval(()=>{Y().catch(console.error)},3e3);return()=>clearInterval(ne)},[F,Y]),I.useEffect(()=>{te(!1),k(""),O(!1),oe(null),_(t.executeModel??""),H(Ar(t.budgetJson,"execute"))},[t.id,t.executeModel,t.budgetJson]),I.useEffect(()=>{var xe;if(q||!X)return;const ne=(xe=J==null?void 0:J.blocker)==null?void 0:xe.summary;ne&&(k(`Please resolve: ${ne}`),te(!0))},[q,X,(de=J==null?void 0:J.blocker)==null?void 0:de.summary]);const S=async ne=>{Z(!0);try{await ne(),await Y(),i()}catch(xe){alert(String(xe))}finally{Z(!1)}},re=async()=>{Z(!0),oe(null);try{await Jb(t.id),await Y(),i(),s==null||s()}catch(ne){const xe=ne instanceof Error?ne.message:String(ne);T?oe(xe):alert(xe)}finally{Z(!1)}};return g.jsxs("div",{className:"space-y-4",children:[g.jsxs("section",{className:"space-y-1",children:[g.jsx("div",{className:"heading-section",children:"Agent"}),g.jsx("p",{className:"text-body",children:ws(t)}),X&&g.jsx("p",{className:"text-sm text-red-400/90",children:"Blocked — resolve the issue below, then retry"}),t.status==="failed"&&!X&&g.jsx("p",{className:"text-sm text-red-400/90",children:"Execution failed — retry with new instructions"})]}),ue&&!X&&g.jsxs("section",{className:"space-y-2",children:[g.jsx("div",{className:"heading-section",children:"Deliverable"}),g.jsx("p",{className:"text-sm text-white/45",children:ue.path}),g.jsx("textarea",{className:"field-mono min-h-[160px] resize-y",value:ue.markdown,readOnly:!0})]}),J&&g.jsx(Wx,{execResult:J}),g.jsx(t0,{exchanges:je,busy:N,onAsk:ne=>S(()=>Dy(t.id,ne))}),g.jsxs("section",{className:"space-y-4 border-t border-white/10 pt-3",children:[g.jsx("div",{className:"heading-section",children:"Your Decision"}),T&&t.status==="review"&&!X&&g.jsx(IE,{content:T,deliverError:P,onRetrySend:re,retrySendBusy:N}),t.status==="review"&&!X&&g.jsxs("div",{className:"space-y-2",children:[g.jsx("p",{className:"text-sm text-white/45",children:T?P?"Fix the send issue above, or redraft below if the message needs to change.":"Review the message above, then approve to send.":"Looks good? Accept and move on."}),g.jsx("button",{type:"button",disabled:N||!T&&!!y.trim(),title:!T&&y.trim()?"Clear retry instructions below to mark done":void 0,onClick:()=>void re(),className:"btn-gold w-full py-2 disabled:opacity-40",children:T?"Approve & send →":"Mark done & next →"}),!T&&y.trim()&&g.jsx("p",{className:"text-xs text-white/40",children:"Clear the retry field below to accept this result."})]}),t.status==="review"&&!X&&g.jsxs("div",{className:"flex items-center gap-3 text-xs text-white/30 uppercase tracking-wide",children:[g.jsx("span",{className:"h-px flex-1 bg-white/10"}),"or send back",g.jsx("span",{className:"h-px flex-1 bg-white/10"})]}),g.jsxs("div",{className:"space-y-2",children:[(X||t.status==="failed")&&g.jsx("p",{className:"text-sm text-white/45",children:"Add instructions and retry — re-runs execution with the same approved plan."}),g.jsx("label",{htmlFor:`retry-${t.id}`,className:"text-xs text-white/40 uppercase tracking-wide",children:"Retry instructions"}),je.some(ne=>ne.status==="answered")&&g.jsx("p",{className:"text-xs text-white/40",children:"This discussion is included automatically if you retry."}),g.jsx("textarea",{id:`retry-${t.id}`,className:"field-mono min-h-[min(140px,22vh)] resize-y leading-relaxed",placeholder:X?"What to change after fixing the blocker":T?"What should change in the draft? (e.g. correct Slack user ID)":"What should the agent do differently?",value:y,onChange:ne=>k(ne.target.value)}),g.jsx(ma,{phase:"Execution",runtime:M,model:v,onModelChange:_,budget:R,onBudgetChange:H,defaultModelId:fe==null?void 0:fe.defaultExecuteModel,disabled:N}),g.jsx("button",{type:"button",disabled:N||!se,onClick:()=>S(async()=>{const ne=Zl(R,t.budgetJson,"execute"),xe=await Kb(t.id,y,v||null,ne);k(""),oe(null),r==null||r(xe)}),className:`w-full py-2 ${se?"btn-retry-ready":"btn-retry"}`,children:"Retry with new instructions"})]})]}),W&&g.jsxs("section",{className:"space-y-2",children:[g.jsx("div",{className:"heading-section",children:"Approved Plan"}),g.jsx("div",{className:"markdown-body-panel markdown-body-panel--flow",children:g.jsx(Dr,{source:ts(W)})})]}),g.jsx(e0,{run:t,artifacts:o}),h&&g.jsx("section",{className:"border-t border-white/10 pt-3",children:g.jsx(_s,{summary:h})}),m&&g.jsx(dd,{title:"Trace",open:ee,onToggle:()=>O(ne=>!ne),children:g.jsx(Ss,{trace:m,showHeading:!1})}),g.jsx(a0,{busy:N,onRemoved:()=>S(async()=>{await Vf(t.id),s==null||s()})})]})}function ZE(t){for(const l of["slack_draft","email_draft"]){const i=qt(t,l);if(i!=null&&i.contentJson)try{const r=JSON.parse(i.contentJson);if(r.status==="pending")return r}catch{}}return null}function hd({onClose:t,header:l,children:i,onKeyDown:r}){return I.useEffect(()=>{const s=o=>{if(o.key==="Escape"){o.preventDefault(),t();return}r==null||r(o)};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[t,r]),g.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-3 sm:p-6",children:[g.jsx("button",{type:"button",className:"absolute inset-0 bg-black/65 backdrop-blur-[2px]",onClick:t,"aria-label":"Close"}),g.jsxs("div",{role:"dialog","aria-modal":"true",className:"relative w-[min(1200px,96vw)] h-[min(92vh,960px)] panel-surface flex flex-col text-[#E8F6F4] rounded-2xl overflow-hidden",children:[g.jsx("div",{className:"p-4 border-b border-white/10 space-y-3 shrink-0",children:l}),g.jsx("div",{className:"flex-1 overflow-y-auto p-5",children:i})]})]})}function FE({run:t,agents:l,onClose:i,onRefresh:r,onApproved:s,onApprovedAndNext:o,onDoneAndNext:f,onRetry:h,queueNav:p}){const[m,b]=I.useState(null),y=My(t.status),k=Yf(t);I.useEffect(()=>{if(t.source!=="linear"){b(null);return}di(t.id).then(_=>b(lv(_.artifacts))).catch(()=>b(null))},[t.id,t.source]);const v=I.useCallback(_=>{p&&(_.key==="ArrowLeft"&&p.index>0&&(_.preventDefault(),p.onPrev()),_.key==="ArrowRight"&&p.index<p.runs.length-1&&(_.preventDefault(),p.onNext()))},[p]);return g.jsxs(hd,{onClose:i,onKeyDown:v,header:g.jsxs("div",{className:"flex justify-between items-start gap-3",children:[g.jsxs("div",{className:"min-w-0 flex-1 space-y-2",children:[g.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[t.source==="linear"&&m?g.jsx("a",{href:m,target:"_blank",rel:"noreferrer",className:"inline-flex",title:"Open in Linear",children:g.jsxs(st,{className:"bg-[#5E6AD2]/15 text-[#AEB4FF] border-[#5E6AD2]/35 hover:bg-[#5E6AD2]/25 transition-colors",children:[ls(t)," ↗"]})}):g.jsx(st,{className:"bg-[#5E6AD2]/15 text-[#AEB4FF] border-[#5E6AD2]/35",children:ls(t)}),g.jsx(st,{className:"bg-white/5 text-white/45 border-white/10 normal-case",children:If(t.taskCategory)}),g.jsx(st,{className:vs(t.runtime),children:ga(t.runtime)}),k&&g.jsxs(st,{className:"bg-[#92E4DD]/10 text-[#92E4DD] border-[#92E4DD]/25 normal-case truncate max-w-[160px]",title:k,children:["◆ ",k]})]}),g.jsx("h2",{className:"font-semibold text-2xl leading-snug pr-2",children:t.title}),g.jsxs("p",{className:"text-sm text-white/45 flex flex-wrap gap-x-2 gap-y-0.5 items-center",children:[g.jsx(st,{className:y.tone,children:y.label}),g.jsxs("span",{title:new Date(t.updatedAt).toLocaleString(),children:["Updated ",ns(t.updatedAt)]})]})]}),g.jsxs("div",{className:"flex items-start gap-2 shrink-0",children:[p&&g.jsx(Ry,{index:p.index,total:p.runs.length,onPrev:p.onPrev,onNext:p.onNext}),g.jsx("button",{type:"button",onClick:i,className:"text-white/60 hover:text-white px-1","aria-label":"Close",children:"✕"})]})]}),children:[(t.status==="plan_pending"||t.status==="queued")&&g.jsx(VE,{run:t,agents:l,onRefresh:r,onApproved:s,onApprovedAndNext:o}),(t.status==="plan_approved"||t.status==="running")&&g.jsx(RE,{run:t,agents:l,onRefresh:r}),(t.status==="review"||t.status==="failed")&&g.jsx(YE,{run:t,agents:l,onRefresh:r,onRetry:h,onDoneAndNext:f}),t.status==="done"&&g.jsx(zE,{run:t}),t.status==="cancelled"&&g.jsx("p",{className:"text-sm text-white/50",children:"This task was removed from Operations."})]})}function Sy(t,l){const i=t.find(s=>s.runtime===l);if(!i)return{ok:!1,detail:"no agent"};const r=i.issues.find(s=>s.code==="cli_missing"||s.code==="runtime_auth");return r?{ok:!1,detail:r.message}:{ok:!0,detail:"CLI ready"}}function gf({ok:t}){return g.jsx("span",{className:`inline-block w-1.5 h-1.5 rounded-full shrink-0 ${t?"bg-emerald-400":"bg-amber-400"}`,"aria-hidden":!0})}function QE({agents:t,agentDeckOnline:l}){const[i,r]=I.useState(null);I.useEffect(()=>{Pb().then(h=>r(h.mcpUrl)).catch(()=>r(null))},[l]);const s=Sy(t,"claude_code"),o=Sy(t,"cursor_local"),f=t.flatMap(h=>h.issues).find(h=>h.code==="mcp_not_registered");return g.jsxs("div",{className:"flex flex-wrap items-center justify-end gap-x-4 gap-y-1.5 text-xs text-white/45",children:[g.jsx("span",{className:"uppercase tracking-wider text-white/30",children:"Connections"}),g.jsxs("span",{className:"inline-flex items-center gap-1.5",title:s.detail,children:[g.jsx(gf,{ok:s.ok}),g.jsx("span",{className:s.ok?"text-white/55":"text-amber-200/90",children:"Claude"})]}),g.jsxs("span",{className:"inline-flex items-center gap-1.5",title:o.detail,children:[g.jsx(gf,{ok:o.ok}),g.jsx("span",{className:o.ok?"text-white/55":"text-amber-200/90",children:"Cursor"})]}),g.jsxs("span",{className:"inline-flex items-center gap-1.5",title:(f==null?void 0:f.message)??(i?`MCP ${i}`:"Agent Deck optional"),children:[g.jsx(gf,{ok:l&&!f}),g.jsxs("span",{className:l&&!f?"text-[#92E4DD]/80":f?"text-amber-200/90":"text-white/35",children:["Agent Deck MCP",l?f?" (setup needed)":"":" (optional)"]})]})]})}const i0="data:image/svg+xml,%3csvg%20viewBox='0%200%20248%20248'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20aria-hidden='true'%3e%3cpath%20d='M52.4285%20162.873L98.7844%20136.879L99.5485%20134.602L98.7844%20133.334H96.4921L88.7237%20132.862L62.2346%20132.153L39.3113%20131.207L17.0249%20130.026L11.4214%20128.844L6.2%20121.873L6.7094%20118.447L11.4214%20115.257L18.171%20115.847L33.0711%20116.911L55.485%20118.447L71.6586%20119.392L95.728%20121.873H99.5485L100.058%20120.337L98.7844%20119.392L97.7656%20118.447L74.5877%20102.732L49.4995%2086.1905L36.3823%2076.62L29.3779%2071.7757L25.8121%2067.2858L24.2839%2057.3608L30.6515%2050.2716L39.3113%2050.8623L41.4763%2051.4531L50.2636%2058.1879L68.9842%2072.7209L93.4357%2090.6804L97.0015%2093.6343L98.4374%2092.6652L98.6571%2091.9801L97.0015%2089.2625L83.757%2065.2772L69.621%2040.8192L63.2534%2030.6579L61.5978%2024.632C60.9565%2022.1032%2060.579%2020.0111%2060.579%2017.4246L67.8381%207.49965L71.9133%206.19995L81.7193%207.49965L85.7946%2011.0443L91.9074%2024.9865L101.714%2046.8451L116.996%2076.62L121.453%2085.4816L123.873%2093.6343L124.764%2096.1155H126.292V94.6976L127.566%2077.9197L129.858%2057.3608L132.15%2030.8942L132.915%2023.4505L136.608%2014.4708L143.994%209.62643L149.725%2012.344L154.437%2019.0788L153.8%2023.4505L150.998%2041.6463L145.522%2070.1215L141.957%2089.2625H143.994L146.414%2086.7813L156.093%2074.0206L172.266%2053.698L179.398%2045.6635L187.803%2036.802L193.152%2032.5484H203.34L210.726%2043.6549L207.415%2055.1159L196.972%2068.3492L188.312%2079.5739L175.896%2096.2095L168.191%20109.585L168.882%20110.689L170.738%20110.53L198.755%20104.504L213.91%20101.787L231.994%2098.7149L240.144%20102.496L241.036%20106.395L237.852%20114.311L218.495%20119.037L195.826%20123.645L162.07%20131.592L161.696%20131.893L162.137%20132.547L177.36%20133.925L183.855%20134.279H199.774L229.447%20136.524L237.215%20141.605L241.8%20147.867L241.036%20152.711L229.065%20158.737L213.019%20154.956L175.45%20145.977L162.587%20142.787H160.805V143.85L171.502%20154.366L191.242%20172.089L215.82%20195.011L217.094%20200.682L213.91%20205.172L210.599%20204.699L188.949%20188.394L180.544%20181.069L161.696%20165.118H160.422V166.772L164.752%20173.152L187.803%20207.771L188.949%20218.405L187.294%20221.832L181.308%20223.959L174.813%20222.777L161.187%20203.754L147.305%20182.486L136.098%20163.345L134.745%20164.2L128.075%20235.42L125.019%20239.082L117.887%20241.8L111.902%20237.31L108.718%20229.984L111.902%20215.452L115.722%20196.547L118.779%20181.541L121.58%20162.873L123.291%20156.636L123.14%20156.219L121.773%20156.449L107.699%20175.752L86.304%20204.699L69.3663%20222.777L65.291%20224.431L58.2867%20220.768L58.9235%20214.27L62.8713%20208.48L86.304%20178.705L100.44%20160.155L109.551%20149.507L109.462%20147.967L108.959%20147.924L46.6977%20188.512L35.6182%20189.93L30.7788%20185.44L31.4156%20178.115L33.7079%20175.752L52.4285%20162.873Z'%20fill='%23D97757'/%3e%3c/svg%3e",r0="data:image/svg+xml,%3csvg%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20aria-hidden='true'%3e%3cpath%20fill='%23EDEDED'%20d='M11.503.131%201.891%205.678a.84.84%200%200%200-.42.726v11.188c0%20.3.162.575.42.724l9.609%205.55a1%201%200%200%200%20.998%200l9.61-5.55a.84.84%200%200%200%20.42-.724V6.404a.84.84%200%200%200-.42-.726L12.497.131a1.01%201.01%200%200%200-.996%200M2.657%206.338h18.55c.263%200%20.43.287.297.515L12.23%2022.918c-.062.107-.229.064-.229-.06V12.335a.59.59%200%200%200-.295-.51l-9.11-5.257c-.109-.063-.064-.23.061-.23'/%3e%3c/svg%3e";function u0({src:t,className:l}){return g.jsx("span",{className:`inline-flex items-center justify-center rounded-lg bg-white/[0.04] ${l??"h-8 w-8"}`,children:g.jsx("img",{src:t,alt:"",className:"h-[70%] w-[70%] object-contain",draggable:!1})})}function GE({className:t="h-8 w-8"}){return g.jsx(u0,{src:i0,className:t})}function XE({className:t="h-8 w-8"}){return g.jsx(u0,{src:r0,className:t})}function JE({className:t="h-8 w-8"}){return g.jsxs("svg",{viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,"aria-hidden":!0,children:[g.jsx("rect",{width:"32",height:"32",rx:"8",fill:"white",fillOpacity:"0.06"}),g.jsx("circle",{cx:"16",cy:"13",r:"4.5",stroke:"#92E4DD",strokeWidth:"1.75"}),g.jsx("path",{d:"M8.5 24.5c1.2-3.5 3.8-5.5 7.5-5.5s6.3 2 7.5 5.5",stroke:"#92E4DD",strokeWidth:"1.75",strokeLinecap:"round"})]})}function s0({runtime:t,className:l="h-3.5 w-3.5 shrink-0"}){return t==="claude_code"?g.jsx("img",{src:i0,alt:"",className:`object-contain ${l}`,draggable:!1}):t==="cursor_local"?g.jsx("img",{src:r0,alt:"",className:`object-contain ${l}`,draggable:!1}):null}function o0({runtime:t,className:l="h-8 w-8 shrink-0"}){return t==="claude_code"?g.jsx(GE,{className:l}):t==="cursor_local"?g.jsx(XE,{className:l}):g.jsx(JE,{className:l})}const Pu=()=>({runtime:"claude_code",deckId:"",playbookId:"",defaultPlanModel:"",defaultExecuteModel:"",defaultPlanBudget:gi(),defaultExecuteBudget:gi()});function KE({agents:t,agentDeckOnline:l,onRefresh:i}){const[r,s]=I.useState(!1),[o,f]=I.useState(""),[h,p]=I.useState(""),[m,b]=I.useState(Pu()),[y,k]=I.useState(!1),[v,_]=I.useState(null),[R,H]=I.useState(""),[N,Z]=I.useState(""),[q,te]=I.useState(Pu()),ee=async Y=>{if(Y.preventDefault(),!(!o.trim()||!h.trim())){k(!0);try{const J={name:o.trim(),runtime:m.runtime,workspaceRoot:h.trim(),deckId:m.deckId||void 0,playbookId:m.playbookId||void 0,defaultPlanModel:m.defaultPlanModel||null,defaultExecuteModel:m.defaultExecuteModel||null,defaultPlanBudget:br(m.defaultPlanBudget),defaultExecuteBudget:br(m.defaultExecuteBudget)};await Ib(J),f(""),p(""),b(Pu()),s(!1),i()}catch(J){alert(String(J))}finally{k(!1)}}},O=Y=>{_(Y.id),H(Y.name),Z(Y.workspaceRoot??""),te({runtime:Y.runtime,deckId:Y.deckId??"",playbookId:Y.playbookId??"",defaultPlanModel:Y.defaultPlanModel??"",defaultExecuteModel:Y.defaultExecuteModel??"",defaultPlanBudget:wy(Y.defaultPlanBudgetJson),defaultExecuteBudget:wy(Y.defaultExecuteBudgetJson)})},P=()=>{_(null),te(Pu())},oe=async Y=>{k(!0);try{const J={name:R.trim(),workspaceRoot:N.trim()||null,runtime:q.runtime,deckId:q.deckId||null,playbookId:q.playbookId||null,defaultPlanModel:q.defaultPlanModel||null,defaultExecuteModel:q.defaultExecuteModel||null,defaultPlanBudget:br(q.defaultPlanBudget),defaultExecuteBudget:br(q.defaultExecuteBudget)};await Yb(Y.id,J),P(),i()}catch(J){alert(String(J))}finally{k(!1)}},fe=async Y=>{if(confirm(`Delete agent "${Y.name}"?`)){k(!0);try{await Zb(Y.id),i()}catch(J){alert(String(J))}finally{k(!1)}}},M=t.filter(Y=>!Y.healthy).length;return g.jsxs("div",{className:"flex-1 overflow-y-auto px-6 py-4 max-w-6xl mx-auto w-full",children:[g.jsxs("div",{className:"mb-6 flex flex-col sm:flex-row sm:items-start sm:justify-between gap-4",children:[g.jsxs("div",{className:"min-w-0",children:[g.jsx("h1",{className:"heading-page",children:"Agents"}),g.jsx("p",{className:"text-sm text-white/50 mt-1",children:"Saved execution profiles — pick one at Inbox instead of configuring each task"}),g.jsxs("p",{className:"text-sm text-white/45 mt-2",children:[t.length," agent",t.length===1?"":"s",M>0&&g.jsxs("span",{className:"text-red-400 ml-2",children:["· ",M," need",M===1?"s":""," attention"]})]})]}),g.jsx(QE,{agents:t,agentDeckOnline:l})]}),g.jsx("div",{className:"space-y-3 mb-6",children:t.map(Y=>g.jsxs("div",{className:"panel flex flex-col sm:flex-row sm:items-start gap-3 justify-between",children:[g.jsxs("div",{className:"flex gap-3 min-w-0 flex-1",children:[g.jsx(o0,{runtime:Y.runtime}),g.jsxs("div",{className:"space-y-2 min-w-0 flex-1",children:[g.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[g.jsx("span",{className:"text-lg font-semibold text-[#E8F6F4]",children:Y.name}),!Y.healthy&&g.jsx(st,{className:"bg-red-500/15 text-red-300 border-red-400/30 normal-case",children:"Needs fix"})]}),g.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[g.jsx(st,{className:"bg-white/5 text-white/55 border-white/15 normal-case",children:ga(Y.runtime)}),Y.deckName?g.jsxs(st,{className:"bg-[#92E4DD]/10 text-[#92E4DD] border-[#92E4DD]/25 normal-case",children:["◆ ",Y.deckName]}):g.jsx(st,{className:"bg-white/5 text-white/40 border-white/10 normal-case",children:"No deck"}),Y.defaultPlanModel&&g.jsxs(st,{className:"bg-white/5 text-white/50 border-white/10 normal-case truncate max-w-[10rem]",title:Y.defaultPlanModel,children:["plan: ",Y.defaultPlanModel]}),Y.defaultExecuteModel&&g.jsxs(st,{className:"bg-white/5 text-white/50 border-white/10 normal-case truncate max-w-[10rem]",title:Y.defaultExecuteModel,children:["exec: ",Y.defaultExecuteModel]})]}),v===Y.id?g.jsxs("div",{className:"space-y-3 pt-2 border-t border-white/10",children:[g.jsxs("label",{className:"block space-y-1",children:[g.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:"Name"}),g.jsx("input",{className:"field text-sm",value:R,onChange:J=>H(J.target.value)})]}),g.jsxs("label",{className:"block space-y-1",children:[g.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:"Workspace"}),g.jsx("input",{className:"field text-sm font-mono",placeholder:"/Users/me/projects/my-app",value:N,onChange:J=>Z(J.target.value)})]}),g.jsx(zg,{value:q,onChange:te,agentDeckOnline:l}),g.jsxs("div",{className:"flex gap-2 pt-1",children:[g.jsx("button",{type:"button",disabled:y||!R.trim()||!N.trim(),onClick:()=>oe(Y),className:"btn-gold text-sm px-3 py-1.5",children:"Save"}),g.jsx("button",{type:"button",onClick:P,className:"btn-ghost text-sm px-3 py-1.5",children:"Cancel"})]})]}):g.jsx("p",{className:"text-sm text-white/50 font-mono truncate",title:Y.workspaceRoot??void 0,children:Y.workspaceRoot?Y.workspaceRoot:"No workspace configured"}),Y.issues.length>0&&g.jsx("ul",{className:"text-sm text-red-300/90 space-y-1",children:Y.issues.map((J,ve)=>g.jsxs("li",{children:["· ",J.message]},ve))})]})]}),g.jsxs("div",{className:"flex gap-2 shrink-0",children:[v!==Y.id&&g.jsx("button",{type:"button",disabled:y,onClick:()=>O(Y),className:"btn-ghost text-sm px-3 py-1.5",children:"Edit"}),g.jsx("button",{type:"button",disabled:y,onClick:()=>fe(Y),className:"btn-ghost text-sm px-3 py-1.5",children:"Delete"})]})]},Y.id))}),r?g.jsxs("form",{onSubmit:ee,className:"panel space-y-3",children:[g.jsx("h2",{className:"heading-panel",children:"New Agent"}),g.jsxs("label",{className:"block space-y-1",children:[g.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:"Name"}),g.jsx("input",{className:"field",placeholder:"e.g. Claude · Work",value:o,onChange:Y=>f(Y.target.value)})]}),g.jsxs("label",{className:"block space-y-1",children:[g.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:"Workspace"}),g.jsx("input",{className:"field font-mono text-sm",placeholder:"/Users/me/projects/my-app",value:h,onChange:Y=>p(Y.target.value)})]}),g.jsx(zg,{value:m,onChange:b,agentDeckOnline:l}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx("button",{type:"submit",disabled:y||!o.trim()||!h.trim(),className:"btn-gold px-4 py-2",children:y?"Saving…":"Create agent"}),g.jsx("button",{type:"button",onClick:()=>s(!1),className:"btn-ghost px-4 py-2",children:"Cancel"})]})]}):g.jsx("button",{type:"button",onClick:()=>s(!0),className:"btn-gold px-4 py-2",children:"Add agent"})]})}function $E({run:t,selected:l,onSelect:i,sent:r}){const s=Yf(t),o=t.updatedAt;return g.jsx("button",{type:"button",onClick:i,className:`task-card w-full text-left rounded-xl border-l-[3px] border-l-emerald-400/60 transition-colors ${l?"glass-plate-selected":""}`,children:g.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-[7rem_minmax(0,1fr)_8rem_6rem_7rem_5rem] gap-x-4 gap-y-1.5 items-center px-4 py-3",children:[g.jsxs("div",{className:"flex items-center gap-1.5 md:contents",children:[g.jsx(st,{className:t.source==="linear"?"bg-[#5E6AD2]/15 text-[#AEB4FF] border-[#5E6AD2]/35 shrink-0 w-fit":"bg-white/5 text-white/55 border-white/15 shrink-0 w-fit",children:ls(t)}),g.jsx("time",{className:"text-xs text-white/40 tabular-nums md:hidden ml-auto shrink-0",title:new Date(o).toLocaleString(),children:ns(o)})]}),g.jsxs("div",{className:"min-w-0 md:col-start-2",children:[g.jsxs("p",{className:"font-semibold text-[#E8F6F4] leading-snug truncate flex items-center gap-2",title:t.title,children:[g.jsx("span",{className:"truncate",children:t.title}),r&&g.jsx(st,{className:"bg-[#C4B643]/15 text-[#E8DC7A] border-[#C4B643]/35 shrink-0 normal-case text-[10px]",children:"sent"})]}),t.description&&g.jsx("p",{className:"text-xs text-white/40 truncate mt-0.5",title:t.description,children:t.description})]}),g.jsx("div",{className:"hidden md:flex items-center min-w-0",children:g.jsxs(st,{className:`${vs(t.runtime)} normal-case truncate max-w-full`,title:t.agentName??ga(t.runtime),children:[t.runtime&&g.jsx(s0,{runtime:t.runtime,className:"h-3 w-3"}),g.jsx("span",{className:"truncate",children:t.agentName??ga(t.runtime)})]})}),g.jsx("span",{className:"hidden md:block text-xs text-white/45 uppercase tracking-wide",children:If(t.taskCategory)}),g.jsx("span",{className:"hidden md:block text-xs text-[#92E4DD]/80 truncate",title:s??void 0,children:s?`◆ ${s}`:"—"}),g.jsx("time",{className:"hidden md:block text-xs text-white/40 tabular-nums text-right",title:new Date(o).toLocaleString(),children:ns(o)})]})})}function PE({runs:t,selectedRunId:l,onSelectRun:i,sentRunIds:r=[]}){const[s,o]=I.useState(""),f=I.useMemo(()=>t.filter(p=>p.status==="done").sort((p,m)=>m.updatedAt.localeCompare(p.updatedAt)),[t]),h=I.useMemo(()=>{const p=s.trim().toLowerCase();return p?f.filter(m=>{var b,y,k,v;return m.title.toLowerCase().includes(p)||((b=m.externalLabel)==null?void 0:b.toLowerCase().includes(p))||((y=m.externalId)==null?void 0:y.toLowerCase().includes(p))||m.source.toLowerCase().includes(p)||m.taskCategory.toLowerCase().includes(p)||((k=m.deckName)==null?void 0:k.toLowerCase().includes(p))||((v=m.agentName)==null?void 0:v.toLowerCase().includes(p))}):f},[f,s]);return g.jsxs("div",{className:"flex-1 flex flex-col min-h-0",children:[g.jsx("div",{className:"px-6 pt-4 pb-3 border-b border-white/[0.06] shrink-0",children:g.jsxs("div",{className:"max-w-6xl mx-auto w-full",children:[g.jsx("h1",{className:"heading-page",children:"Done"}),g.jsx("p",{className:"text-sm text-white/50 mt-1",children:"Completed runs — read-only audit trail"}),g.jsx("input",{className:"field mt-3 max-w-xl",placeholder:"Search title, issue id, category, deck…",value:s,onChange:p=>o(p.target.value)}),g.jsxs("p",{className:"text-sm text-white/45 mt-2",children:[h.length," of ",f.length," completed"]})]})}),g.jsx("div",{className:"flex-1 overflow-y-auto px-6 py-4 min-h-0",children:g.jsxs("div",{className:"max-w-6xl mx-auto w-full space-y-1.5",children:[h.length>0&&g.jsxs("div",{className:"hidden md:grid grid-cols-[7rem_minmax(0,1fr)_8rem_6rem_7rem_5rem] gap-x-4 px-4 pb-1 text-[10px] uppercase tracking-wider text-white/30","aria-hidden":!0,children:[g.jsx("span",{children:"Source"}),g.jsx("span",{children:"Title"}),g.jsx("span",{children:"Agent"}),g.jsx("span",{children:"Type"}),g.jsx("span",{children:"Deck"}),g.jsx("span",{className:"text-right",children:"Done"})]}),h.length===0?g.jsx("p",{className:"text-sm text-white/45 py-8 text-center",children:f.length===0?"No completed runs yet":"No matches for your search"}):h.map(p=>g.jsx($E,{run:p,selected:l===p.id,onSelect:()=>i(p),sent:r.includes(p.id)},p.id))]})})]})}function WE({candidate:t,selected:l,onSelect:i}){return g.jsx("button",{type:"button",onClick:i,className:`task-card w-full text-left rounded-xl border transition-colors ${l?"glass-plate-selected":""}`,children:g.jsxs("div",{className:"p-3 space-y-1.5",children:[g.jsxs("div",{className:"flex items-center justify-between gap-2",children:[g.jsx(st,{className:"bg-[#5E6AD2]/15 text-[#AEB4FF] border-[#5E6AD2]/35",children:t.identifier}),t.state&&g.jsx("span",{className:"text-xs text-white/45 uppercase tracking-wide",children:t.state})]}),g.jsx("h3",{className:"text-lg font-semibold text-[#E8F6F4] leading-snug line-clamp-2",children:t.title}),t.description&&g.jsx("p",{className:"text-sm text-white/45 line-clamp-2 leading-relaxed",children:t.description})]})})}function _y({title:t,subtitle:l,onClose:i,children:r}){return g.jsx(hd,{onClose:i,header:g.jsxs("div",{className:"flex justify-between items-start gap-3",children:[g.jsxs("div",{className:"min-w-0 flex-1 space-y-1",children:[g.jsx("h2",{className:"font-semibold text-2xl leading-snug",children:t}),l&&g.jsx("p",{className:"text-sm text-white/55 leading-snug",children:l})]}),g.jsx("button",{type:"button",onClick:i,className:"text-white/60 hover:text-white px-1 shrink-0","aria-label":"Close",children:"✕"})]}),children:g.jsx("div",{className:"space-y-4",children:r})})}function c0({className:t="w-3.5 h-3.5"}){return g.jsx("svg",{viewBox:"0 0 16 16",fill:"currentColor",className:t,"aria-hidden":!0,children:g.jsx("path",{fillRule:"evenodd",d:"M8.982 1.566a1.13 1.13 0 0 0-1.964 0L.165 13.233c-.457.778.091 1.767.982 1.767h13.706c.891 0 1.439-.99.982-1.767L8.982 1.566zM8 5.697a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 5.697zm0 7.75a1 1 0 1 0 0-2 1 1 0 0 0 0 2z"})})}function f0({agents:t,selectedId:l,onSelect:i,onManage:r,requireHealthy:s}){return t.length===0?g.jsx("p",{className:"text-sm text-white/45",children:"No agents configured."}):g.jsxs("div",{className:"space-y-2",children:[g.jsxs("div",{className:"flex items-center justify-between gap-2",children:[g.jsx("div",{className:"heading-section normal-case",children:"Agent"}),r&&g.jsx("button",{type:"button",onClick:r,className:"text-sm text-[#92E4DD] hover:underline",children:"Manage"})]}),g.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2",children:t.map(o=>{var p;const f=o.id===l,h=s&&!o.healthy;return g.jsx("button",{type:"button",disabled:h,onClick:()=>i(o.id),className:`text-left rounded-xl border p-3 transition-colors glass-plate glass-plate-hover ${h?"opacity-50 cursor-not-allowed":f?"glass-plate-selected":""}`,children:g.jsxs("div",{className:"flex items-start gap-2.5",children:[g.jsx(o0,{runtime:o.runtime,className:"h-7 w-7 shrink-0 mt-0.5"}),g.jsxs("div",{className:"min-w-0 flex-1",children:[g.jsxs("div",{className:"flex items-start justify-between gap-2",children:[g.jsx("span",{className:"font-semibold text-[#E8F6F4]",children:o.name}),!o.healthy&&g.jsx("span",{title:o.issues.map(m=>m.message).join("; "),children:g.jsx(c0,{className:"w-3.5 h-3.5 text-red-400 shrink-0"})})]}),g.jsxs("div",{className:"flex flex-wrap gap-1.5 mt-2",children:[g.jsx(st,{className:vs(o.runtime),children:ga(o.runtime)}),o.deckName&&g.jsxs(st,{className:"bg-[#92E4DD]/10 text-[#92E4DD] border-[#92E4DD]/25 normal-case",children:["◆ ",o.deckName]})]}),!o.healthy&&g.jsx("p",{className:"text-xs text-red-300/90 mt-2 leading-snug",children:(p=o.issues[0])==null?void 0:p.message})]})]})},o.id)})})]})}function eC({issue:t,agents:l,onPromoted:i,onManageAgents:r}){const[s,o]=I.useState(""),[f,h]=I.useState(""),[p,m]=I.useState(!1);I.useEffect(()=>{qf().then(k=>{k.defaultAgentId&&o(k.defaultAgentId)}).catch(()=>{})},[]),I.useEffect(()=>{l.length>0&&s&&!l.some(k=>k.id===s)&&o(l[0].id),l.length>0&&!s&&o(l[0].id)},[l,s]),I.useEffect(()=>{h("")},[t.id,s]);const b=l.find(k=>k.id===s),y=async()=>{if(s){m(!0);try{await Vb(t.id,{agentId:s,planModel:f||null}),i()}catch(k){alert(String(k))}finally{m(!1)}}};return g.jsxs(g.Fragment,{children:[t.description&&g.jsx("div",{className:"rounded-xl p-4 glass-plate font-mono text-sm text-white/70 leading-relaxed whitespace-pre-wrap",children:t.description}),t.url&&g.jsx("a",{href:t.url,target:"_blank",rel:"noreferrer",className:"text-sm text-[#AEB4FF] hover:underline inline-block",children:"Open in Linear ↗"}),g.jsx(f0,{agents:l,selectedId:s,onSelect:o,onManage:r,requireHealthy:!0}),b&&g.jsx(Gf,{runtime:b.runtime,label:"Planning model",value:f,onChange:h,defaultModelId:b.defaultPlanModel,disabled:p}),g.jsx("button",{type:"button",disabled:p||!s||!((b==null?void 0:b.healthy)??!1),onClick:y,className:"btn-gold w-full py-2",children:p?"Starting…":"Kick plan & next →"})]})}function tC({issue:t,agents:l,onClose:i,onPromoted:r,onManageAgents:s,queueNav:o}){const f=I.useCallback(h=>{o&&(h.key==="ArrowLeft"&&o.index>0&&(h.preventDefault(),o.onPrev()),h.key==="ArrowRight"&&o.index<o.total-1&&(h.preventDefault(),o.onNext()))},[o]);return g.jsx(hd,{onClose:i,onKeyDown:f,header:g.jsxs("div",{className:"flex justify-between items-start gap-3",children:[g.jsxs("div",{className:"min-w-0 flex-1 space-y-1",children:[g.jsx("h2",{className:"font-semibold text-2xl leading-snug",children:t.identifier}),g.jsx("p",{className:"text-sm text-white/55 leading-snug",children:t.title})]}),g.jsxs("div",{className:"flex items-start gap-2 shrink-0",children:[o&&g.jsx(Ry,{index:o.index,total:o.total,onPrev:o.onPrev,onNext:o.onNext,label:"In Inbox"}),g.jsx("button",{type:"button",onClick:i,className:"text-white/60 hover:text-white px-1","aria-label":"Close",children:"✕"})]})]}),children:g.jsx(eC,{issue:t,agents:l,onPromoted:r,onManageAgents:s})})}function nC({agents:t,onSaved:l}){const[i,r]=I.useState(!1),[s,o]=I.useState(null),[f,h]=I.useState(null),[p,m]=I.useState(null),[b,y]=I.useState(null),[k,v]=I.useState("Todo"),[_,R]=I.useState(""),[H,N]=I.useState(!0),[Z,q]=I.useState(""),[te,ee]=I.useState(!0),[O,P]=I.useState(!1),[oe,fe]=I.useState(null),M=s==null?void 0:s.envOverrides,Y=!!(M!=null&&M.stateFilter||M!=null&&M.teamId),J=async()=>{var T;try{const[X,se]=await Promise.all([es(),qf()]);h(X.connected),m(((T=X.viewer)==null?void 0:T.name)??null),y(X.error??null),o(se),v(se.persisted.stateFilter.join(", ")),R(se.persisted.teamId??""),N(se.persisted.assigneeMe),q(se.persisted.defaultAgentId??""),ee(se.persisted.syncEnabled)}catch(X){y(String(X))}};I.useEffect(()=>{i&&J()},[i]);const ve=async()=>{var T;P(!0),fe(null);try{const X=await es();h(X.connected),m(((T=X.viewer)==null?void 0:T.name)??null),y(X.error??null),fe(X.connected?"Connected":"Not connected")}catch(X){y(String(X))}finally{P(!1)}},ue=async()=>{P(!0),fe(null);try{const T=k.split(",").map(se=>se.trim()).filter(Boolean),X=await qb({stateFilter:T.length>0?T:["Todo"],teamId:_.trim()||null,assigneeMe:H,defaultAgentId:Z||null,syncEnabled:te});o(X),fe(Y?"Saved locally — env still overrides filters (see note below)":"Saved"),l==null||l()}catch(T){fe(String(T))}finally{P(!1)}},W=f===null?g.jsx("span",{className:"text-xs text-white/45",children:"Checking…"}):f?g.jsxs("span",{className:"text-xs text-emerald-300/90 bg-emerald-500/10 px-2 py-0.5 rounded-full border border-emerald-400/25",children:["Connected",p?` · ${p}`:""]}):g.jsx("span",{className:"text-xs text-amber-200/90 bg-amber-500/10 px-2 py-0.5 rounded-full border border-amber-400/25",children:"Missing API key"});return g.jsxs("div",{className:"rounded-xl glass-plate overflow-hidden",children:[g.jsxs("button",{type:"button",onClick:()=>r(T=>!T),className:"w-full flex items-center justify-between px-3 py-2 text-sm text-white/70 hover:text-white/90",children:[g.jsx("span",{children:"Linear settings"}),g.jsxs("span",{className:"flex items-center gap-2",children:[W,g.jsx("span",{className:"text-white/35",children:i?"▾":"▸"})]})]}),i&&g.jsxs("div",{className:"border-t border-white/10 px-3 py-3 space-y-3 text-sm",children:[b&&f===!1&&g.jsx("p",{className:"text-red-400/90 text-xs",children:b}),s&&g.jsxs("p",{className:"text-xs text-white/50 rounded-lg bg-black/20 border border-white/10 px-2 py-1.5",children:[g.jsx("span",{className:"text-white/70",children:"Inbox uses:"})," ",s.stateFilter.join(", "),s.assigneeMe?" · assigned to me":"",s.teamId?` · team ${s.teamId.slice(0,8)}…`:""]}),Y&&g.jsxs("p",{className:"text-xs text-amber-200/90 rounded-lg bg-amber-500/10 border border-amber-400/20 px-2 py-1.5",children:[g.jsx("code",{className:"text-amber-100/90",children:"LINEAR_STATE_FILTER"})," or"," ",g.jsx("code",{className:"text-amber-100/90",children:"LINEAR_TEAM_ID"})," in env override saved filters. Remove from ",g.jsx("code",{className:"text-white/55",children:"~/.agent-dealer-dev/.env"})," to use the values below."]}),g.jsxs("p",{className:"text-xs text-white/45",children:["API key stays in ",g.jsx("code",{className:"text-white/60",children:"LINEAR_API_KEY"})," env — not stored here."]}),g.jsxs("label",{className:"block space-y-1",children:[g.jsx("span",{className:"text-xs uppercase tracking-wide text-white/45",children:"State filter (saved)"}),g.jsx("input",{type:"text",value:k,onChange:T=>v(T.target.value),placeholder:"Todo, Backlog",className:"w-full rounded-lg bg-black/20 border border-white/10 px-2 py-1.5 text-[#E8F6F4]"})]}),g.jsxs("label",{className:"block space-y-1",children:[g.jsx("span",{className:"text-xs uppercase tracking-wide text-white/45",children:"Team ID (optional, saved)"}),g.jsx("input",{type:"text",value:_,onChange:T=>R(T.target.value),placeholder:"UUID",className:"w-full rounded-lg bg-black/20 border border-white/10 px-2 py-1.5 text-[#E8F6F4] font-mono text-xs"})]}),g.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[g.jsx("input",{type:"checkbox",checked:H,onChange:T=>N(T.target.checked),className:"rounded"}),g.jsx("span",{children:"Assigned to me"})]}),g.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[g.jsx("input",{type:"checkbox",checked:te,onChange:T=>ee(T.target.checked),className:"rounded"}),g.jsx("span",{children:"Sync status + comments to Linear"})]}),g.jsxs("label",{className:"block space-y-1",children:[g.jsx("span",{className:"text-xs uppercase tracking-wide text-white/45",children:"Default agent"}),g.jsxs("select",{value:Z,onChange:T=>q(T.target.value),className:"w-full rounded-lg bg-black/20 border border-white/10 px-2 py-1.5 text-[#E8F6F4]",children:[g.jsx("option",{value:"",children:"None"}),t.map(T=>g.jsxs("option",{value:T.id,children:[T.name,T.healthy?"":" (needs setup)"]},T.id))]})]}),g.jsxs("div",{className:"flex gap-2 pt-1",children:[g.jsx("button",{type:"button",onClick:ue,disabled:O,className:"btn-gold px-3 py-1.5 flex-1",children:O?"Saving…":"Save"}),g.jsx("button",{type:"button",onClick:ve,disabled:O,className:"btn-ghost px-3 py-1.5",children:"Test"})]}),oe&&g.jsx("p",{className:"text-xs text-white/50",children:oe})]})]})}function lC({agents:t,loading:l,candidateCount:i,onRefresh:r,onConfigSaved:s}){var h;const[o,f]=I.useState(null);return I.useEffect(()=>{es().then(f).catch(()=>f({connected:!1,error:"Failed to check"}))},[]),g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"rounded-xl p-3 glass-plate space-y-2",children:[g.jsxs("div",{className:"flex items-center justify-between gap-2",children:[g.jsx("span",{className:"text-sm text-white/70",children:"Connection"}),o!=null&&o.connected?g.jsxs("span",{className:"text-xs text-emerald-300/90",children:["Connected · ",(h=o.viewer)==null?void 0:h.name]}):g.jsx("span",{className:"text-xs text-amber-200/90",children:(o==null?void 0:o.error)??"Not connected"})]}),g.jsx("p",{className:"text-sm text-white/45",children:l?"Fetching from Linear…":i===0?"No matching issues — adjust filters below or create issues in Linear.":`${i} issue${i===1?"":"s"} in inbox`}),g.jsx("button",{type:"button",onClick:r,disabled:l,className:"btn-gold w-full py-2",children:l?"Importing…":"Import from Linear"})]}),g.jsx(nC,{agents:t,onSaved:()=>{s(),r()}}),g.jsxs("p",{className:"text-xs text-white/40",children:["Set ",g.jsx("code",{className:"text-white/55",children:"LINEAR_API_KEY"})," in env. Filters are saved locally — not the API key."]})]})}function aC({agents:t,onCreated:l,onManageAgents:i,embedded:r}){const[s,o]=I.useState(""),[f,h]=I.useState(""),[p,m]=I.useState("other"),[b,y]=I.useState(""),[k,v]=I.useState(zv),[_,R]=I.useState(""),[H,N]=I.useState(!1);I.useEffect(()=>{t.length>0&&!t.some(ee=>ee.id===k)&&v(t[0].id)},[t,k]),I.useEffect(()=>{const ee=t.find(O=>O.id===k);if(!ee){R("");return}R(ee.defaultPlanModel??(ee.runtime==="cursor_local"?ps:""))},[k,t]);const Z=t.find(ee=>ee.id===k),q=!!k&&!!s.trim()&&(!!b.trim()||((Z==null?void 0:Z.healthy)??!1)),te=async ee=>{if(ee.preventDefault(),!(!s.trim()||!k)){N(!0);try{await Fb({title:s.trim(),description:f.trim()||void 0,taskCategory:p,repo:b.trim()||void 0,agentId:k,planModel:_||null}),o(""),h(""),l()}catch(O){alert(String(O))}finally{N(!1)}}};return g.jsxs("form",{onSubmit:te,className:r?"space-y-3":"panel space-y-3",children:[!r&&g.jsx("h2",{className:"heading-panel",children:"Manual Task"}),g.jsx(f0,{agents:t,selectedId:k,onSelect:v,onManage:i}),Z&&g.jsx(Gf,{runtime:Z.runtime,label:"Planning model",value:_,onChange:R,defaultModelId:Z.defaultPlanModel,disabled:H}),g.jsx("input",{className:"field",placeholder:"Title",value:s,onChange:ee=>o(ee.target.value)}),g.jsx("textarea",{className:"field-mono h-16 resize-y",placeholder:"Description",value:f,onChange:ee=>h(ee.target.value)}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx("select",{className:"field flex-1",value:p,onChange:ee=>m(ee.target.value),children:["code","communication","email","research","content","other"].map(ee=>g.jsx("option",{value:ee,children:ee},ee))}),g.jsx("input",{className:"field flex-1",placeholder:"Repo override (optional)",value:b,onChange:ee=>y(ee.target.value)})]}),g.jsx("p",{className:"text-xs text-white/40 -mt-1",children:"Uses agent workspace by default. Override here for a one-off path."}),g.jsx("button",{type:"submit",disabled:H||!q,className:"btn-gold w-full py-2",children:H?"Starting…":"Kick plan"})]})}const iC=["plan_pending","queued"],rC=["review","failed"];function Ey(t,l,i){return iC.includes(t.status)?l.awaitingPlanReview:rC.includes(t.status)?l.resultReviewRuns:t.status==="done"&&i==="done"?l.runs.filter(r=>r.status==="done").sort((r,s)=>s.updatedAt.localeCompare(r.updatedAt)):[]}function md(t,l){return t.findIndex(i=>i.id===l)}function Uf(t,l){const i=md(t,l);if(i<0)return t[0]??null;const r=t.filter(s=>s.id!==l);return r.length===0?null:r[Math.min(i,r.length-1)]??null}function uC({agents:t,onRefresh:l,onGoOperations:i,onManageAgents:r}){const[s,o]=I.useState([]),[f,h]=I.useState(!1),[p,m]=I.useState(null),[b,y]=I.useState(null),[k,v]=I.useState(null),[_,R]=I.useState(null),[H,N]=I.useState(!1),Z=I.useCallback(()=>(h(!0),m(null),Promise.all([Hb(),qf(),es()]).then(([J,ve,ue])=>(o(J),R(ve),N(ue.connected),J)).catch(J=>(m(String(J)),o([]),[])).finally(()=>h(!1))),[]);I.useEffect(()=>{Z()},[Z]);const q=s.find(J=>J.id===b)??null,te=b?md(s,b):-1,ee=I.useCallback(J=>{const ve=s[J];ve&&(y(ve.id),v("issue"))},[s]),O=I.useCallback(async J=>{const ve=Uf(s,J);l();const ue=await Z();if(!ve){v(null),y(null);return}const W=ue.find(X=>X.id===ve.id);if(W){y(W.id),v("issue");return}const T=Uf(ue,J);T?(y(T.id),v("issue")):(v(null),y(null))},[s,l,Z]),P=()=>{l(),v(null),y(null),Z(),i()},oe=()=>{v("import"),Z()},fe=()=>{y(null),v("manual")},M=J=>{y(J),v("issue")},Y=()=>{v(null),y(null)};return g.jsxs("div",{className:"flex-1 flex flex-col min-h-0",children:[g.jsx("div",{className:"px-6 pt-4 pb-3 border-b border-white/[0.06] shrink-0",children:g.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-4 max-w-6xl mx-auto w-full",children:[g.jsxs("div",{children:[g.jsx("h1",{className:"heading-page",children:"Inbox"}),g.jsx("p",{className:"text-sm text-white/50 mt-1",children:"Tasks waiting to kick — import from Linear or add manually"})]}),g.jsxs("div",{className:"flex gap-2 shrink-0",children:[g.jsx("button",{type:"button",onClick:oe,className:"btn-ghost px-4 py-2 text-sm",children:"Linear Import"}),g.jsx("button",{type:"button",onClick:fe,className:"btn-gold px-4 py-2 text-sm",children:"+ Manual Task"})]})]})}),g.jsxs("div",{className:"flex-1 flex flex-col min-h-0 max-w-6xl mx-auto w-full px-6 py-4",children:[p&&g.jsx("p",{className:"text-sm text-red-400/90 mb-3",children:p}),g.jsxs("div",{className:"flex items-center justify-between gap-2 mb-3",children:[g.jsx("p",{className:"text-sm text-white/45",children:f?"Loading…":`${s.length} task${s.length===1?"":"s"}`}),g.jsx("button",{type:"button",onClick:()=>Z(),disabled:f,className:"btn-ghost px-2 py-1 text-xs",children:"Refresh"})]}),g.jsx("div",{className:"flex-1 overflow-y-auto space-y-2 min-h-0",children:s.length===0&&!f?g.jsxs("div",{className:"py-12 text-center space-y-3",children:[g.jsx("p",{className:"text-sm text-white/45",children:"No tasks in inbox"}),H&&_&&g.jsxs("p",{className:"text-xs text-white/40 max-w-md mx-auto",children:["Filtering Linear: ",_.stateFilter.join(", "),_.assigneeMe?" · assigned to you":"",_.envOverrides.stateFilter||_.envOverrides.teamId?" · some filters from env":""]}),g.jsxs("div",{className:"flex justify-center gap-2",children:[g.jsx("button",{type:"button",onClick:oe,className:"btn-ghost px-3 py-1.5 text-sm",children:"Linear settings"}),g.jsx("button",{type:"button",onClick:fe,className:"btn-gold px-3 py-1.5 text-sm",children:"+ Manual Task"})]})]}):s.map(J=>g.jsx(WE,{candidate:J,selected:b===J.id&&k==="issue",onSelect:()=>M(J.id)},J.id))})]}),k==="import"&&g.jsx(_y,{title:"Linear Import",subtitle:"Fetch issues assigned to you",onClose:Y,children:g.jsx(lC,{agents:t,loading:f,candidateCount:s.length,onRefresh:Z,onConfigSaved:Z})}),k==="manual"&&g.jsx(_y,{title:"Manual Task",subtitle:"Add work that isn't in Linear yet",onClose:Y,children:g.jsx(aC,{agents:t,onCreated:P,onManageAgents:r,embedded:!0})}),k==="issue"&&q&&g.jsx(tC,{issue:q,agents:t,onClose:Y,onPromoted:()=>O(q.id),onManageAgents:r,queueNav:s.length>1?{index:te,total:s.length,onPrev:()=>ee(te-1),onNext:()=>ee(te+1)}:void 0})]})}const sC=3;function oC(t){const l=Number.isFinite(t)?t:0;return String(Math.min(999,Math.max(0,l))).padStart(sC,"0")}function cC({value:t,label:l}){const i=oC(t).split("");return g.jsx("div",{className:"nixie-housing","aria-hidden":!l,"aria-label":l,children:i.map((r,s)=>g.jsxs("span",{className:"nixie-tube",children:[g.jsx("span",{className:"nixie-tube-ghost",children:"8"}),g.jsx("span",{className:"nixie-tube-digit",children:r})]},`${s}-${r}`))})}function Cy({title:t,total:l,open:i,onToggle:r,accent:s,titleAccent:o,openRing:f="ring-[#92E4DD]/25"}){return g.jsx("section",{className:`flex flex-col self-start glass-column rounded-xl overflow-hidden border-t-2 ${s} ${i?`ring-1 ${f}`:""}`,children:g.jsxs("header",{className:"px-2 pt-2 pb-2 border-b border-white/[0.06] shrink-0 w-full",children:[g.jsx("h2",{className:`text-xs font-semibold leading-tight text-center ${o}`,children:t}),g.jsx("button",{type:"button",onClick:r,className:"nixie-stack-toggle w-full rounded mt-1.5 focus-visible:outline focus-visible:outline-2 focus-visible:outline-[#92E4DD]/45","aria-expanded":i,"aria-label":`${l} in ${t.toLowerCase()}. Click to ${i?"close":"show"} tickets.`,children:g.jsx("div",{className:"nixie-display-wrap",children:g.jsx(cC,{value:l})})})]})})}function pd({run:t,selected:l,onSelect:i,statusOverride:r,timeField:s="updated",compact:o=!1,queueBadge:f,queueActiveLabel:h="Running",queueQueuedLabel:p="In queue",hideStatusBadge:m=!1,extraBadge:b}){const y=r??t.status,k=My(y),v=s==="created"?t.createdAt:t.updatedAt,_=Yf(t),R=f==="active"||f==="running"?"bg-[#92E4DD]/15 text-[#92E4DD] border-[#92E4DD]/35":f==="queued"||f==="waiting"?"bg-sky-500/15 text-sky-200 border-sky-400/30":null,H=f==="active"||f==="running";return g.jsx("button",{type:"button",onClick:i,className:`task-card w-full text-left rounded-xl border-l-[3px] transition-colors ${k.accent} ${l?"glass-plate-selected":""}`,children:g.jsxs("div",{className:`${o?"p-2.5":"p-3"} space-y-2`,children:[g.jsxs("div",{className:"flex items-center justify-between gap-2 min-w-0",children:[g.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[g.jsx(st,{className:t.source==="linear"?"bg-[#5E6AD2]/15 text-[#AEB4FF] border-[#5E6AD2]/35 shrink-0":"bg-white/5 text-white/55 border-white/15 shrink-0",children:ls(t)}),g.jsx(st,{className:"bg-white/5 text-white/45 border-white/10 shrink-0 normal-case",children:If(t.taskCategory)})]}),g.jsx("time",{className:"text-xs text-white/40 tabular-nums shrink-0",title:new Date(v).toLocaleString(),children:ns(v)})]}),g.jsx("h3",{className:`font-semibold text-[#E8F6F4] leading-snug ${o?"text-base line-clamp-2":"text-lg line-clamp-2"}`,children:t.title}),!o&&t.description&&g.jsx("p",{className:"text-sm text-white/45 line-clamp-2 leading-relaxed",children:t.description}),g.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 pt-0.5",children:[g.jsxs(st,{className:`${vs(t.runtime)} normal-case`,title:t.runtime?ga(t.runtime):void 0,children:[t.runtime&&g.jsx(s0,{runtime:t.runtime}),t.agentName??ga(t.runtime)]}),_&&g.jsxs(st,{className:"bg-[#92E4DD]/10 text-[#92E4DD] border-[#92E4DD]/25 normal-case max-w-[140px] truncate",title:_,children:["◆ ",_]}),b&&g.jsx(st,{className:`${b.className} normal-case`,children:b.label}),f?g.jsxs(st,{className:`${R} ml-auto`,children:[H&&g.jsx("span",{className:"inline-block w-1.5 h-1.5 rounded-full bg-[#92E4DD] animate-pulse mr-0.5"}),H?h:p]}):m?null:g.jsx(st,{className:`${k.tone} ml-auto`,title:k.hint,children:k.label})]})]})})}function Ay({title:t,items:l,activeBadgeLabel:i,selectedId:r,onSelect:s,onClose:o,accent:f,titleAccent:h,empty:p,autoApprovedRunIds:m=[]}){return g.jsxs("section",{className:`absolute inset-0 z-10 flex flex-col min-h-0 rounded-xl overflow-hidden border border-white/10 border-t-2 ${f} bg-[#0F0F0C] shadow-2xl`,children:[g.jsxs("header",{className:"px-4 pt-3 pb-2.5 border-b border-white/[0.06] shrink-0 flex items-center justify-between gap-3",children:[g.jsx("h2",{className:`heading-column ${h}`,children:t}),g.jsx("button",{type:"button",onClick:o,className:"text-xs text-white/45 hover:text-white/70 px-2 py-1 rounded border border-white/10 hover:border-white/20 transition-colors shrink-0",children:"Close"})]}),g.jsx("div",{className:"flex-1 min-h-0 p-2 space-y-2 overflow-y-auto",children:l.length===0?g.jsx("p",{className:"text-sm text-white/45 py-4 text-center",children:p}):l.map(({run:b,queueBadge:y})=>g.jsx(pd,{run:b,selected:r===b.id,onSelect:()=>s(b),queueBadge:y,queueActiveLabel:i,queueQueuedLabel:"In queue",hideStatusBadge:!0,extraBadge:m.includes(b.id)?{label:"Auto-approved",className:"bg-emerald-400/15 text-emerald-200 border-emerald-400/35"}:void 0},b.id))})]})}function d0({title:t,count:l,children:i,empty:r,isEmpty:s,accent:o,titleAccent:f}){return g.jsxs("section",{className:`flex flex-col min-w-0 h-full glass-column rounded-xl overflow-hidden ${o?`border-t-2 ${o}`:"border-t border-white/[0.06]"}`,children:[g.jsx("header",{className:"px-4 pt-3 pb-2.5 border-b border-white/[0.06] shrink-0",children:g.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[g.jsx("h2",{className:`heading-column ${f??""}`,children:t}),l!==void 0&&g.jsx("span",{className:"text-base tabular-nums text-white/45",children:l})]})}),g.jsx("div",{className:"flex-1 min-h-0 p-2 space-y-2 overflow-y-auto",children:s?r:i})]})}function fC({runs:t,openQuestionCounts:l,selectedId:i,onSelect:r}){const s=t.filter(o=>l[o.id]).length;return g.jsx(d0,{title:s>0?`Review Plan · ${s} need answers`:"Review Plan",count:t.length,accent:"border-t-cyber-violet",titleAccent:"text-cyber-violet-light",isEmpty:t.length===0,empty:g.jsx("p",{className:"text-sm text-white/45 py-4 text-center",children:"No plans ready yet"}),children:t.map(o=>{const f=l[o.id];return g.jsx(pd,{run:o,selected:i===o.id,onSelect:()=>r(o),hideStatusBadge:!0,extraBadge:f?{label:f===1?"1 question":`${f} questions`,className:"bg-amber-400/15 text-amber-200 border-amber-400/35"}:void 0},o.id)})})}function dC({snapshot:t,selectedRunId:l,onSelectRun:i}){const[r,s]=I.useState(null),o=(t==null?void 0:t.awaitingPlanReview)??[],f=(t==null?void 0:t.planningActiveRuns)??[],h=(t==null?void 0:t.planningQueuedRuns)??[],p=(t==null?void 0:t.runningRuns)??[],m=(t==null?void 0:t.waitingExecution)??[],b=(t==null?void 0:t.resultReviewRuns)??[],y=[...f.map(_=>({run:_,queueBadge:"active"})),...h.map(_=>({run:_,queueBadge:"queued"}))],k=[...p.map(_=>({run:_,queueBadge:"active"})),...m.map(_=>({run:_,queueBadge:"queued"}))],v=_=>{s(R=>R===_?null:_)};return g.jsx("div",{className:"flex-1 min-h-0 px-6 py-4 w-full",children:g.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4 h-full w-full min-h-0",children:[g.jsxs("div",{className:"grid grid-cols-[8rem_minmax(0,1fr)] gap-3 h-full min-h-0 items-start",children:[g.jsx(Cy,{title:"In Planning",total:y.length,open:r==="planning",onToggle:()=>v("planning"),accent:"border-t-cyber-violet/60",titleAccent:"text-cyber-violet-light/80",openRing:"ring-cyber-violet/25"}),g.jsxs("div",{className:"relative min-h-0 h-full w-full self-stretch",children:[g.jsx(fC,{runs:o,openQuestionCounts:(t==null?void 0:t.openQuestionCounts)??{},selectedId:l,onSelect:i}),r==="planning"&&g.jsx(Ay,{title:"In Planning",items:y,activeBadgeLabel:"Planning",selectedId:l,onSelect:i,onClose:()=>s(null),accent:"border-t-cyber-violet",titleAccent:"text-cyber-violet-light",empty:"Nothing planning — promote from Inbox"})]})]}),g.jsxs("div",{className:"grid grid-cols-[8rem_minmax(0,1fr)] gap-3 h-full min-h-0 items-start",children:[g.jsx(Cy,{title:"In Progress",total:k.length,open:r==="progress",onToggle:()=>v("progress"),accent:"border-t-[#C4B643]",titleAccent:"text-[#E8DC7A]",openRing:"ring-[#C4B643]/25"}),g.jsxs("div",{className:"relative min-h-0 h-full w-full self-stretch",children:[g.jsx(d0,{title:"Review Result",count:b.length,accent:"border-t-[#C4B643]",titleAccent:"text-[#E8DC7A]",isEmpty:b.length===0,empty:g.jsx("p",{className:"text-sm text-white/45 py-4 text-center",children:"Nothing awaiting sign-off"}),children:b.map(_=>{const R=((t==null?void 0:t.pendingSendCounts)??{})[_.id];return g.jsx(pd,{run:_,selected:l===_.id,onSelect:()=>i(_),hideStatusBadge:_.status==="review",extraBadge:R?{label:"will send on approve",className:"bg-[#C4B643]/15 text-[#E8DC7A] border-[#C4B643]/35"}:void 0},_.id)})}),r==="progress"&&g.jsx(Ay,{title:"In Progress",items:k,activeBadgeLabel:"Running",autoApprovedRunIds:(t==null?void 0:t.autoApprovedRunIds)??[],selectedId:l,onSelect:i,onClose:()=>s(null),accent:"border-t-[#C4B643]",titleAccent:"text-[#E8DC7A]",empty:"Queue empty — approve a plan to start"})]})]})]})})}function hC(){return g.jsxs("div",{className:"fixed inset-0 pointer-events-none z-0 overflow-hidden","aria-hidden":!0,children:[g.jsx("div",{className:"absolute top-16 left-12",children:g.jsx("div",{className:"ambient-orb ambient-orb-a w-[26rem] h-[26rem] rounded-full bg-cyan-500/10 blur-3xl"})}),g.jsx("div",{className:"absolute bottom-20 right-12",children:g.jsx("div",{className:"ambient-orb ambient-orb-b w-[26rem] h-[26rem] rounded-full bg-pink-500/10 blur-3xl"})}),g.jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2",children:g.jsx("div",{className:"ambient-orb ambient-orb-c w-[22rem] h-[22rem] rounded-full bg-blue-500/[0.07] blur-3xl"})})]})}function mC({className:t="w-5 h-5"}){return g.jsxs("svg",{viewBox:"0 0 20 20",fill:"currentColor",className:t,"aria-hidden":!0,children:[g.jsx("circle",{cx:"6.75",cy:"6.25",r:"3.25"}),g.jsx("circle",{cx:"13.5",cy:"6.75",r:"2.85",opacity:"0.85"}),g.jsx("path",{d:"M1.75 16v-1.1c0-2.35 1.928-4.25 4.3-4.25 1.16 0 2.21.456 3 1.2.79-.744 1.84-1.2 3-1.2 2.372 0 4.3 1.9 4.3 4.25V16H1.75z"})]})}const pC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAYAAAA8AXHiAAAN5UlEQVR4AeydXagdVxmGF7loIKSpN/WHttqKktpAvWkVoRctp4gRtf4QbxRrREEb0wtRGkRovLCmKC1Y641CFGpBCtpIsVfHRvAm5KpIrMGfCCJUa8GmTWl6k+5nznlPvzOZ2Xtmz5o1a/Z8Ie/+vjU/a6351nPe/Xv22bFr185LLq9BbAZ2BP/nFeihAg5WD0X1LkNwsJyCXirgYPVSVu/UwXIGeqmAg9VLWTPsNPGUHKzEBZ/KcA7WVFY68XU6WIkLPpXhHKyprHTi63SwEhc89nDv37cndpdR+nOwopQxfScA9dDRfQGRM4O1ew+Fd3/wVtLB5WANtgTLDQxEwITI6eXoDz8dHvjrmbB2+J6ZDrFpcDlYgy9BswkAETAhcnvWnlfOBsS2G2aOlYNrOVisRsYCImBC5HVTveb5327tWjs8vGs5WFvLkVcCRMCEyO3szu/ea5tFjmMhGjm4loPFSmQkIAImRG6nBlDPvedbAZHbfeQ5uZaDxYpkICACJkRupwREwIR+c3w9fPu9+8LRb/7aHlLkOBaiMbRrOViswoACImBC5HYqVUCt/+jR4pBnz5wPqGiYm1xcy8F6c1GSZkAETIjcDj4PKHvcL574l20WuRyLxpCu5WCxAgkFRMCEyO3QTYHSOTgWUlvx2gyeITpYWo2eIxABEyK3w7UFyp5b5Vr27nAo13Kw7Cr1kAMRMCFyO0QXoNQPjoXUVhzatRwsrUTkCETAhMht9zGAsv3l6FoOll2hCDkQARMit13GBkp941hIbcUhXcvB0ip0jEAETIjcdtcXUHaM3Fwra7Bs4XLNgQiYELmdZwqgNB6OhdRWHMq1HCytQMsIRMCEyO3pKYGy4+bkWg6WXZkGORABEyK3pwwFlOaAYyG1FYdwLQdL1V8QgQiYELk93AJ16dyt4R2PXxNueXm/PSRZnotrOVgLlhyIgAmR28MtULw5/NID58LuP11ZHHLj9bcFVDQS3uBYqDxkatdysMorsNkGImBC5Jubi1AGik8b8ObwiWeOFft1c9cdR5QmjTm4loNVWnIgAiZEbnfXAaVj/vLPPwakNo6F1E4VcSxUHi+la7UDqzzTFWsDE2oLlC2Du9ZGNRysjTrU3sqliOdOnQ7c5dUePNuBY6FZWvzHsVDRSHiDY6HykKlcy8EylT91+l2mtZHy+SZEq+knBdy1gn+jH8DgKPcdfCp85AOPh4uv3symbbIfQ2nyGzA4FlIn9I/UThVxLFQeL4VrTdqxWGyAQhQfGF564XOk24RjITa6a1GFxZokWGWgHjz+sYC4C3vtws0r5Vp1CPTtWpMCqw4onIoFIKJVcC2e2fIMF3FtVjwRQdpW4cLatXScBFiLgLLVS+lad3/2urD+xIcCENg5dMnpC5gQue2Lx49/3/Odyt9LbPLY0fa1KF9psNoApULhWKhP1xJQXzhwbTHs3QeuK2KXGyACJkRu++IB/DeOngl/OPnxcOncLXbXVh7btVYSrGWA2qrwLDk7ewW9j8daV139y/Dhj34vCKjZUMV/QEBFo+UN5wETIrenCyigIseNr/jPznDFf3faw7bymK61UmB1BUoVfnLzPb9YrvX8ha+Fd960P1x19WMa4rLY1rWACJgQue0QiIAJkWsfToyu3HyjXNsVY7rWSoAVCygVmHji5LHQ1bXKd3n0WyfgQHX7tZ1jgAmRazsRiIAJkbOtrFSuNWqw+gBKC9HVtVj08l0effNsjO9gINK2muda9AdMiNyeB0TAhMjtvnKOY6G+XWuUYPUJlF2ILq718u69oQoe+mf7v9/+CdJtAhhkN9IGJkRu9wERMCFyu29ensK1RgVWKqC0KMu4Ft+m95XHfh6+PFMVPLyCj4ALaSxFuRYQARMi134iEAETImdbG+FYqE/XGgVYqYGyi9TGtQQUD4Lpg0VH5FZ677EKPCACJkRuz6MvYELkdl/bvG/XyhqsIYHSQrVxLQHFx2t+9vkvhp/OVPVpThwL4VhIYyn2CZTGwLFQX66VJVg5AKUFIDZ1LY4VUP84dZpm8R1WVe4i1+KxWHFgxQ3n4U6IvOKQTpv6dK2swMoNKK1aU9fS8eVY51rv+9sPggArnwNIfQGlsXAs1IdrZQFWrkBpAYi4FndbiLaVhaPq1WsgQfYccu4OiUOqL9caFKwxAKVFx7V4O+SFHQc2NplbAEFs4nEWzwzJrZ7983nbrM0Bl9e5fvz0rtpjYu7AsVBs1xoErDEBZRcR1+JNXBbfbievcy0eiPMMr+rFUs6T6BOgfvfi7eGhr34/6DGa9vcZ+3CtpGCNFSgtahvX+tSX7iz+zg1QAZf6KMcyUDyTTAkV88GxUEzXSgLW2IGi+NIi19rzytnAg/Kv779w2eesgAjRF9E61BBAMQ8ptmv1CtYqAaUFWORaQAVcOp4oiACJF0WJussbGijmh3AsFMu1egFrFYGi+NI819IxRAsUOdt4dshjqFyAYk5STNeKCtaqA6UFmOdaHANEuBIiZ5t9NT71YyjGbyIcC8VwrShg5QFUk9LFO6bKtYAImBC5Riu/Gq/tOcZYrtUJrCkCJRisawERMCFyHTPGiGOhrq61FFhTBsrCgms99/vXKn/rxR5X9Wq83Z9bHsO1WoHlQG1HANd6+MHPBB4/ofVHfrL9gM1W3avxm7uzCzgW6uJajcByoOavPc/wEN9EA2BVR0/NteaC5UBVITJ/2/ojj1YeMDXXqgTLgapko9FGXkpw1yp9jVFkoBotxCoeNCXXqlu/wrEsUOQ82+HbV3gAV3eib6+vwKRc695DlYUowGIPQBHR3utvI7g6VGAqrrV2+J7KKhVg4UxIRwAZUttj+wpM3bUKsCgbL4oRpaG+o1zjr0KcsmttgYVjIS0ojoXU9ti+AlN2rS2wKJu7FlWIq0m41qxk5cda28DCsdDsuOI/joWKht8sVYGputY2sKicuxZViKsputZlYOFYSKXFsZDaHttXYIqudRlYlM1diyrE1dRcqxIsHAuptDgWUttj+wpMzbUqwaJs7lpUIa6m5Fq1YOFYSKXFsZDaHttXIJ1rtZ9b2zMwHr5yoOobmPl0Ry1YDMTJRMlfjVcllo+r4lqvv+1iePHO/4XX33pxqxgApV8cmQsWjoV0Jo6F1PbYvgJjdy2+8ETfXCioLFBcH1WZCxYHuGtRhbgao2tZoPg0LBWpAortaCFYOBbiYIRjIXLXchXgp5pFqTp77XD155uqjk2xrS1QmtNCsDjQXYsqxFXurrUsUKpSI7BwLKSTcCyktsf2FcjVtboCpUo0AouD3bWowtKqPDEn14oFlC60MVg4FtKJOBZS22P7CuTgWrGBUhUag8UJ7lpUIa6Gcq2+gFJ1WoGFYyGdjGMhtT22r0Bq1+obKFWgFVic5K5FFeIqhWulAkqVaQ0WjoXUAY6F1PbYvgJ9ulZqoHT1rcHiRHctqhBXsV1rKKBUlaXAwrGQOsGxkNpjiLnNMZZrDQ2U6roUWJzsrkUV4qqLa+UClCqyNFg4FlJHOBZS22P7CizjWrkBpateGiw6cNeiCnHV1LVyBUrV6AQWjoXUGY6F1PbYvgKLXCt3oHTFncCiE3ctqhBX81yLvzXd5PNQcWfUvrfOYOFYSEPjWEhtj+0rMM+16I3PcukjwBzLttzUGSwuKIpr0ZFrqwJVrjUGoHQBUcDCsZA6xbGQ2h7bVYDaHbjp/qDfgBkTULrSKGDRmbsWVegmgLrv4FMB0RNf7537XR7zrFI0sHAspEEoElLbY30FqBMwIY7i+1/R0796OOlfWmXsWIoGFhNy16IKzVUHlP0Bbd5bXkdGBYuCIF0ihUNqe9yoADXBnRBbcCdka8f2MSsqWBTCXYsqVGsKQOnK54ClQ9pFfuqQzqKYSO0pRq4fd0JcP+6EbJ3YvkqKDhbFcdeiCiFMEaiNKy/9yRNt7Br5SUTqhwIjtVc9cq24E+JacSdka8L2VVYvjkXBpuhaDhQrv6HewOKnE20Ms3G3QOHVXqXIdeFOiOvCnZC9frZPSb2BRRFX3bUcKFa5Wr2CxU8s0tAsBFJ7rJFrwJ0Q14A7IXutbB+L+phnr2Ax4VVyLQeKFW2m3sHipxhpOiwOUnsMkfniToj54k7IXhfbXW9WoHewGGqsruVAsXrLKQlY/GQjTZEFQ2rnFpkb7oSYG+6E7DWw3VVfgSRgMfwYXOuTdxwJx7/7/63PQwETcqBYwXZKBhaLgzQ9XAGpPWQUUHfdfiQwR2BC5EPOa8xjJwOLIpVd68Ybhv3b09kCRbFGrqRg4QBINcMhlKeMDlT/1U4KFpdTdi0Wme0pxFg8hgJoAOfuDpGnGH9KYyQHi0VEKjKLrLyv6ED1Vdn6fpODxVRSuZYDRbWH0SBg4VhIlxzbtSxQJ04eCwfvf0vwuzxVO00cBCwurQ/XqgLqyWeOMZwrcQUGAwvHQrreLq7VP1CapcemFRgMLCbY1bUcKKqYpwYFC8dCKk1T13KgVLF846BgUZY2ruVAUbFxaHCwcCykclW5lgOl6ownDg4WpapzLQeK6oxTWYCFYyGVENfSWy96HcpfNlB1xhGzAItSlV1rAVCc4sq4AtmAhWMhBypjWlpMLRuwmDNvu/hdHpUYv7ICa/zl9CtQBRwsVcJj1Ao4WFHL6Z2pAg6WKuExagWigRV1Vt7Z6CvgYI1+CfO8AAcrz3UZ/awcrNEvYZ4X4GDluS6jn5WDNfolzPMCHKw81yXjWTWb2hsAAAD//0DhVxwAAAAGSURBVAMA8NLI/5AoLlwAAAAASUVORK5CYII=";function gC({className:t="",size:l=36}){return g.jsx("img",{src:pC,alt:"",width:l,height:l,className:`shrink-0 object-contain ${t}`,"aria-hidden":!0,draggable:!1})}function yC(){var q,te,ee;const[t,l]=I.useState("ops"),[i,r]=I.useState(null),[s,o]=I.useState(null),f=I.useCallback(()=>{wg().then(r).catch(console.error)},[]);I.useEffect(()=>{f();const O=tv(r),P=setInterval(f,5e3);return()=>{O(),clearInterval(P)}},[f]),I.useEffect(()=>{if(!s||!i)return;const O=i.runs.find(P=>P.id===s.id);O&&o(O)},[i,s==null?void 0:s.id]);const h=((q=i==null?void 0:i.resultReviewRuns)==null?void 0:q.length)??0,p=((te=i==null?void 0:i.awaitingPlanReview)==null?void 0:te.length)??0,m=(i==null?void 0:i.runs.filter(O=>O.status==="done").length)??0,b=((ee=i==null?void 0:i.agents)==null?void 0:ee.length)??0,y=(i==null?void 0:i.agentIssueCount)??0,k=p+h,v=I.useMemo(()=>!s||!i?[]:Ey(s,i,t),[s,i,t]),_=s?md(v,s.id):-1,R=I.useCallback(O=>{const P=v[O];P&&o(P)},[v]),H=I.useCallback(async O=>{if(!i)return;const P=Ey(i.runs.find(M=>M.id===O)??s,i,t),oe=Uf(P,O),fe=await wg();if(r(fe),!oe){o(null);return}o(fe.runs.find(M=>M.id===oe.id)??null)},[i,s,t]),N=O=>`px-3 py-2 text-base rounded ${t===O?"bg-[#92E4DD]/20 text-[#92E4DD]":"text-white/60 hover:text-white"}`,Z=()=>l("agents");return g.jsxs(g.Fragment,{children:[g.jsx(hC,{}),g.jsxs("div",{className:"relative z-10 min-h-screen flex flex-col",children:[g.jsxs("header",{className:"px-6 py-4 border-b border-white/10 flex flex-wrap gap-4 items-center justify-between glass-header shrink-0",children:[g.jsxs("div",{className:"flex items-center gap-6",children:[g.jsxs("button",{type:"button",onClick:()=>{l("ops"),o(null)},className:"flex items-center gap-3 text-left rounded cursor-pointer hover:opacity-90 transition-opacity focus-visible:outline focus-visible:outline-2 focus-visible:outline-[#92E4DD]/45","aria-label":"AgentDealer — go to Operations",children:[g.jsx(gC,{size:40}),g.jsxs("div",{children:[g.jsx("h1",{className:"text-xl font-bold sm:text-2xl",style:{background:"linear-gradient(to right, #C4B643, #D4C760)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",backgroundClip:"text"},children:"AgentDealer"}),g.jsx("p",{className:"text-sm text-[#92E4DD]",children:"Kick tasks, approve plans, review results"})]})]}),g.jsxs("nav",{className:"flex gap-1",children:[g.jsxs("button",{type:"button",onClick:()=>l("ops"),className:N("ops"),children:["Operations",k>0&&g.jsxs("span",{className:"ml-1.5 inline-flex items-center gap-1 align-middle",children:[p>0&&g.jsx("span",{className:"text-xs leading-none bg-cyber-violet/20 text-cyber-violet-light px-1.5 py-0.5 rounded tabular-nums border border-cyber-violet/35",title:`${p} plan${p===1?"":"s"} ready to review`,children:p}),h>0&&g.jsx("span",{className:"text-xs leading-none bg-[#C4B643]/30 text-[#E8DC7A] px-1.5 py-0.5 rounded tabular-nums",title:`${h} result${h===1?"":"s"} to review`,children:h})]})]}),g.jsx("button",{type:"button",onClick:()=>l("intake"),className:N("intake"),children:"Inbox"}),g.jsxs("button",{type:"button",onClick:()=>l("done"),className:N("done"),children:["Done",m>0&&g.jsx("span",{className:"ml-1 text-xs bg-white/10 px-1.5 py-0.5 rounded",children:m})]})]})]}),g.jsxs("button",{type:"button",onClick:Z,className:`${N("agents")} inline-flex items-center gap-1.5 transition-colors`,"aria-label":"Agents",title:"Agents",children:[g.jsx(mC,{className:"w-6 h-6 shrink-0"}),b>0&&g.jsx("span",{className:"text-xs leading-none bg-white/10 text-white/55 px-1.5 py-0.5 rounded tabular-nums border border-white/10",title:`${b} configured agent${b===1?"":"s"}`,children:b}),y>0&&g.jsxs("span",{className:"inline-flex items-center gap-0.5 text-xs leading-none bg-red-500/20 text-red-300 px-1.5 py-0.5 rounded tabular-nums border border-red-400/30",title:`${y} need${y===1?"s":""} attention`,children:[g.jsx(c0,{className:"w-3 h-3 shrink-0"}),y]})]})]}),g.jsxs("main",{className:"flex-1 flex overflow-hidden",children:[t==="ops"&&g.jsx(dC,{snapshot:i,selectedRunId:(s==null?void 0:s.id)??null,onSelectRun:o}),t==="intake"&&g.jsx(uC,{agents:(i==null?void 0:i.agents)??[],onRefresh:f,onGoOperations:()=>l("ops"),onManageAgents:Z}),t==="agents"&&g.jsx(KE,{agents:(i==null?void 0:i.agents)??[],agentDeckOnline:(i==null?void 0:i.agentDeckOnline)??!1,onRefresh:f}),t==="done"&&g.jsx(PE,{runs:(i==null?void 0:i.runs)??[],selectedRunId:(s==null?void 0:s.id)??null,onSelectRun:o,sentRunIds:(i==null?void 0:i.sentRunIds)??[]})]}),s&&g.jsx(FE,{run:s,agents:(i==null?void 0:i.agents)??[],onClose:()=>o(null),onRefresh:f,onApproved:f,onApprovedAndNext:()=>H(s.id),onDoneAndNext:()=>H(s.id),queueNav:v.length>1?{runs:v,index:_,onPrev:()=>R(_-1),onNext:()=>R(_+1)}:void 0,onRetry:O=>{o(O),l("ops"),f()}})]})]})}function xC(){return typeof document>"u"?Promise.resolve():document.fonts.load('13px "Monaco"').then(()=>{}).catch(()=>{})}xC();Lb.createRoot(document.getElementById("root")).render(g.jsx(I.StrictMode,{children:g.jsx(yC,{})}));