agent-dealer 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/server/dist/queue/answers.test.js +117 -0
- package/bundle/server/dist/queue/dispatcher.js +164 -2
- package/bundle/server/dist/queue/plan-gate.test.js +55 -0
- package/bundle/server/dist/repository/runs.js +17 -1
- package/bundle/server/dist/routes/index.js +34 -8
- package/bundle/server/dist/runners/claude.js +9 -8
- package/bundle/server/dist/runners/persist.js +17 -4
- package/bundle/server/dist/runners/prompts.js +52 -1
- package/bundle/server/dist/runners/prompts.test.js +63 -0
- package/bundle/server/dist/runners/reflect.js +1 -1
- package/bundle/server/dist/runners/stream-json.js +28 -0
- package/bundle/server/dist/runners/stream-json.test.js +57 -0
- package/bundle/server/dist/usage-summary.js +9 -4
- package/bundle/server/package.json +1 -1
- package/bundle/server/static-ui/assets/index-CH7u5bXC.js +78 -0
- package/bundle/server/static-ui/assets/index-CKuYOeDN.css +1 -0
- package/bundle/server/static-ui/index.html +2 -2
- package/bundle/shared/dist/budget.d.ts +1 -1
- package/bundle/shared/dist/budget.js +3 -3
- package/bundle/shared/dist/index.d.ts +306 -91
- package/bundle/shared/dist/index.js +15 -0
- package/bundle/shared/dist/plan-triage.d.ts +317 -0
- package/bundle/shared/dist/plan-triage.js +65 -0
- package/bundle/shared/dist/plan-triage.test.d.ts +1 -0
- package/bundle/shared/dist/plan-triage.test.js +66 -0
- package/bundle/shared/package.json +1 -1
- package/package.json +1 -1
- package/bundle/server/static-ui/assets/index-ChdPKYDd.css +0 -1
- package/bundle/server/static-ui/assets/index-hIzZ8TM8.js +0 -77
|
@@ -1,77 +0,0 @@
|
|
|
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 c of s)if(c.type==="childList")for(const f of c.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&r(f)}).observe(document,{childList:!0,subtree:!0});function a(s){const c={};return s.integrity&&(c.integrity=s.integrity),s.referrerPolicy&&(c.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?c.credentials="include":s.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function r(s){if(s.ep)return;s.ep=!0;const c=a(s);fetch(s.href,c)}})();function ky(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Ro={exports:{}},nr={};/**
|
|
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 Wp;function ob(){if(Wp)return nr;Wp=1;var n=Symbol.for("react.transitional.element"),l=Symbol.for("react.fragment");function a(r,s,c){var f=null;if(c!==void 0&&(f=""+c),s.key!==void 0&&(f=""+s.key),"key"in s){c={};for(var h in s)h!=="key"&&(c[h]=s[h])}else c=s;return s=c.ref,{$$typeof:n,type:r,key:f,ref:s!==void 0?s:null,props:c}}return nr.Fragment=l,nr.jsx=a,nr.jsxs=a,nr}var eg;function fb(){return eg||(eg=1,Ro.exports=ob()),Ro.exports}var g=fb(),Lo={exports:{}},_e={};/**
|
|
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 tg;function db(){if(tg)return _e;tg=1;var n=Symbol.for("react.transitional.element"),l=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),c=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 E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},O=Object.assign,q={};function j(A,I,w){this.props=A,this.context=I,this.refs=q,this.updater=w||E}j.prototype.isReactComponent={},j.prototype.setState=function(A,I){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,I,"setState")},j.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function Z(){}Z.prototype=j.prototype;function H(A,I,w){this.props=A,this.context=I,this.refs=q,this.updater=w||E}var le=H.prototype=new Z;le.constructor=H,O(le,j.prototype),le.isPureReactComponent=!0;var ee=Array.isArray;function D(){}var P={H:null,A:null,T:null,S:null},ce=Object.prototype.hasOwnProperty;function fe(A,I,w){var ae=w.ref;return{$$typeof:n,type:A,key:I,ref:ae!==void 0?ae:null,props:w}}function M(A,I){return fe(A.type,I,A.props)}function U(A){return typeof A=="object"&&A!==null&&A.$$typeof===n}function J(A){var I={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(w){return I[w]})}var pe=/\/+/g;function re(A,I){return typeof A=="object"&&A!==null&&A.key!=null?J(""+A.key):I.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(D,D):(A.status="pending",A.then(function(I){A.status==="pending"&&(A.status="fulfilled",A.value=I)},function(I){A.status==="pending"&&(A.status="rejected",A.reason=I)})),A.status){case"fulfilled":return A.value;case"rejected":throw A.reason}}throw A}function T(A,I,w,ae,ke){var ye=typeof A;(ye==="undefined"||ye==="boolean")&&(A=null);var Re=!1;if(A===null)Re=!0;else switch(ye){case"bigint":case"string":case"number":Re=!0;break;case"object":switch(A.$$typeof){case n:case l:Re=!0;break;case b:return Re=A._init,T(Re(A._payload),I,w,ae,ke)}}if(Re)return ke=ke(A),Re=ae===""?"."+re(A,0):ae,ee(ke)?(w="",Re!=null&&(w=Re.replace(pe,"$&/")+"/"),T(ke,I,w,"",function(un){return un})):ke!=null&&(U(ke)&&(ke=M(ke,w+(ke.key==null||A&&A.key===ke.key?"":(""+ke.key).replace(pe,"$&/")+"/")+Re)),I.push(ke)),1;Re=0;var at=ae===""?".":ae+":";if(ee(A))for(var Xe=0;Xe<A.length;Xe++)ae=A[Xe],ye=at+re(ae,Xe),Re+=T(ae,I,w,ye,ke);else if(Xe=v(A),typeof Xe=="function")for(A=Xe.call(A),Xe=0;!(ae=A.next()).done;)ae=ae.value,ye=at+re(ae,Xe++),Re+=T(ae,I,w,ye,ke);else if(ye==="object"){if(typeof A.then=="function")return T(W(A),I,w,ae,ke);throw I=String(A),Error("Objects are not valid as a React child (found: "+(I==="[object Object]"?"object with keys {"+Object.keys(A).join(", ")+"}":I)+"). If you meant to render a collection of children, use an array instead.")}return Re}function $(A,I,w){if(A==null)return A;var ae=[],ke=0;return T(A,ae,"","",function(ye){return I.call(w,ye,ke++)}),ae}function ue(A){if(A._status===-1){var I=A._result;I=I(),I.then(function(w){(A._status===0||A._status===-1)&&(A._status=1,A._result=w)},function(w){(A._status===0||A._status===-1)&&(A._status=2,A._result=w)}),A._status===-1&&(A._status=0,A._result=I)}if(A._status===1)return A._result.default;throw A._result}var de=typeof reportError=="function"?reportError:function(A){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var I=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(I))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",A);return}console.error(A)},_={map:$,forEach:function(A,I,w){$(A,function(){I.apply(this,arguments)},w)},count:function(A){var I=0;return $(A,function(){I++}),I},toArray:function(A){return $(A,function(I){return I})||[]},only:function(A){if(!U(A))throw Error("React.Children.only expected to receive a single React element child.");return A}};return _e.Activity=y,_e.Children=_,_e.Component=j,_e.Fragment=a,_e.Profiler=s,_e.PureComponent=H,_e.StrictMode=r,_e.Suspense=p,_e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=P,_e.__COMPILER_RUNTIME={__proto__:null,c:function(A){return P.H.useMemoCache(A)}},_e.cache=function(A){return function(){return A.apply(null,arguments)}},_e.cacheSignal=function(){return null},_e.cloneElement=function(A,I,w){if(A==null)throw Error("The argument must be a React element, but you passed "+A+".");var ae=O({},A.props),ke=A.key;if(I!=null)for(ye in I.key!==void 0&&(ke=""+I.key),I)!ce.call(I,ye)||ye==="key"||ye==="__self"||ye==="__source"||ye==="ref"&&I.ref===void 0||(ae[ye]=I[ye]);var ye=arguments.length-2;if(ye===1)ae.children=w;else if(1<ye){for(var Re=Array(ye),at=0;at<ye;at++)Re[at]=arguments[at+2];ae.children=Re}return fe(A.type,ke,ae)},_e.createContext=function(A){return A={$$typeof:f,_currentValue:A,_currentValue2:A,_threadCount:0,Provider:null,Consumer:null},A.Provider=A,A.Consumer={$$typeof:c,_context:A},A},_e.createElement=function(A,I,w){var ae,ke={},ye=null;if(I!=null)for(ae in I.key!==void 0&&(ye=""+I.key),I)ce.call(I,ae)&&ae!=="key"&&ae!=="__self"&&ae!=="__source"&&(ke[ae]=I[ae]);var Re=arguments.length-2;if(Re===1)ke.children=w;else if(1<Re){for(var at=Array(Re),Xe=0;Xe<Re;Xe++)at[Xe]=arguments[Xe+2];ke.children=at}if(A&&A.defaultProps)for(ae in Re=A.defaultProps,Re)ke[ae]===void 0&&(ke[ae]=Re[ae]);return fe(A,ye,ke)},_e.createRef=function(){return{current:null}},_e.forwardRef=function(A){return{$$typeof:h,render:A}},_e.isValidElement=U,_e.lazy=function(A){return{$$typeof:b,_payload:{_status:-1,_result:A},_init:ue}},_e.memo=function(A,I){return{$$typeof:m,type:A,compare:I===void 0?null:I}},_e.startTransition=function(A){var I=P.T,w={};P.T=w;try{var ae=A(),ke=P.S;ke!==null&&ke(w,ae),typeof ae=="object"&&ae!==null&&typeof ae.then=="function"&&ae.then(D,de)}catch(ye){de(ye)}finally{I!==null&&w.types!==null&&(I.types=w.types),P.T=I}},_e.unstable_useCacheRefresh=function(){return P.H.useCacheRefresh()},_e.use=function(A){return P.H.use(A)},_e.useActionState=function(A,I,w){return P.H.useActionState(A,I,w)},_e.useCallback=function(A,I){return P.H.useCallback(A,I)},_e.useContext=function(A){return P.H.useContext(A)},_e.useDebugValue=function(){},_e.useDeferredValue=function(A,I){return P.H.useDeferredValue(A,I)},_e.useEffect=function(A,I){return P.H.useEffect(A,I)},_e.useEffectEvent=function(A){return P.H.useEffectEvent(A)},_e.useId=function(){return P.H.useId()},_e.useImperativeHandle=function(A,I,w){return P.H.useImperativeHandle(A,I,w)},_e.useInsertionEffect=function(A,I){return P.H.useInsertionEffect(A,I)},_e.useLayoutEffect=function(A,I){return P.H.useLayoutEffect(A,I)},_e.useMemo=function(A,I){return P.H.useMemo(A,I)},_e.useOptimistic=function(A,I){return P.H.useOptimistic(A,I)},_e.useReducer=function(A,I,w){return P.H.useReducer(A,I,w)},_e.useRef=function(A){return P.H.useRef(A)},_e.useState=function(A){return P.H.useState(A)},_e.useSyncExternalStore=function(A,I,w){return P.H.useSyncExternalStore(A,I,w)},_e.useTransition=function(){return P.H.useTransition()},_e.version="19.2.7",_e}var ng;function Tf(){return ng||(ng=1,Lo.exports=db()),Lo.exports}var Q=Tf(),Bo={exports:{}},lr={},Uo={exports:{}},Ho={};/**
|
|
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 lg;function hb(){return lg||(lg=1,(function(n){function l(T,$){var ue=T.length;T.push($);e:for(;0<ue;){var de=ue-1>>>1,_=T[de];if(0<s(_,$))T[de]=$,T[ue]=_,ue=de;else break e}}function a(T){return T.length===0?null:T[0]}function r(T){if(T.length===0)return null;var $=T[0],ue=T.pop();if(ue!==$){T[0]=ue;e:for(var de=0,_=T.length,A=_>>>1;de<A;){var I=2*(de+1)-1,w=T[I],ae=I+1,ke=T[ae];if(0>s(w,ue))ae<_&&0>s(ke,w)?(T[de]=ke,T[ae]=ue,de=ae):(T[de]=w,T[I]=ue,de=I);else if(ae<_&&0>s(ke,ue))T[de]=ke,T[ae]=ue,de=ae;else break e}}return $}function s(T,$){var ue=T.sortIndex-$.sortIndex;return ue!==0?ue:T.id-$.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;n.unstable_now=function(){return c.now()}}else{var f=Date,h=f.now();n.unstable_now=function(){return f.now()-h}}var p=[],m=[],b=1,y=null,k=3,v=!1,E=!1,O=!1,q=!1,j=typeof setTimeout=="function"?setTimeout:null,Z=typeof clearTimeout=="function"?clearTimeout:null,H=typeof setImmediate<"u"?setImmediate:null;function le(T){for(var $=a(m);$!==null;){if($.callback===null)r(m);else if($.startTime<=T)r(m),$.sortIndex=$.expirationTime,l(p,$);else break;$=a(m)}}function ee(T){if(O=!1,le(T),!E)if(a(p)!==null)E=!0,D||(D=!0,J());else{var $=a(m);$!==null&&W(ee,$.startTime-T)}}var D=!1,P=-1,ce=5,fe=-1;function M(){return q?!0:!(n.unstable_now()-fe<ce)}function U(){if(q=!1,D){var T=n.unstable_now();fe=T;var $=!0;try{e:{E=!1,O&&(O=!1,Z(P),P=-1),v=!0;var ue=k;try{t:{for(le(T),y=a(p);y!==null&&!(y.expirationTime>T&&M());){var de=y.callback;if(typeof de=="function"){y.callback=null,k=y.priorityLevel;var _=de(y.expirationTime<=T);if(T=n.unstable_now(),typeof _=="function"){y.callback=_,le(T),$=!0;break t}y===a(p)&&r(p),le(T)}else r(p);y=a(p)}if(y!==null)$=!0;else{var A=a(m);A!==null&&W(ee,A.startTime-T),$=!1}}break e}finally{y=null,k=ue,v=!1}$=void 0}}finally{$?J():D=!1}}}var J;if(typeof H=="function")J=function(){H(U)};else if(typeof MessageChannel<"u"){var pe=new MessageChannel,re=pe.port2;pe.port1.onmessage=U,J=function(){re.postMessage(null)}}else J=function(){j(U,0)};function W(T,$){P=j(function(){T(n.unstable_now())},$)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(T){T.callback=null},n.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"):ce=0<T?Math.floor(1e3/T):5},n.unstable_getCurrentPriorityLevel=function(){return k},n.unstable_next=function(T){switch(k){case 1:case 2:case 3:var $=3;break;default:$=k}var ue=k;k=$;try{return T()}finally{k=ue}},n.unstable_requestPaint=function(){q=!0},n.unstable_runWithPriority=function(T,$){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var ue=k;k=T;try{return $()}finally{k=ue}},n.unstable_scheduleCallback=function(T,$,ue){var de=n.unstable_now();switch(typeof ue=="object"&&ue!==null?(ue=ue.delay,ue=typeof ue=="number"&&0<ue?de+ue:de):ue=de,T){case 1:var _=-1;break;case 2:_=250;break;case 5:_=1073741823;break;case 4:_=1e4;break;default:_=5e3}return _=ue+_,T={id:b++,callback:$,priorityLevel:T,startTime:ue,expirationTime:_,sortIndex:-1},ue>de?(T.sortIndex=ue,l(m,T),a(p)===null&&T===a(m)&&(O?(Z(P),P=-1):O=!0,W(ee,ue-de))):(T.sortIndex=_,l(p,T),E||v||(E=!0,D||(D=!0,J()))),T},n.unstable_shouldYield=M,n.unstable_wrapCallback=function(T){var $=k;return function(){var ue=k;k=$;try{return T.apply(this,arguments)}finally{k=ue}}}})(Ho)),Ho}var ig;function mb(){return ig||(ig=1,Uo.exports=hb()),Uo.exports}var qo={exports:{}},Tt={};/**
|
|
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 ag;function pb(){if(ag)return Tt;ag=1;var n=Tf();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 a(){}var r={d:{f:a,r:function(){throw Error(l(522))},D:a,C:a,L:a,m:a,X:a,S:a,M:a},p:0,findDOMNode:null},s=Symbol.for("react.portal");function c(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=n.__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 Tt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Tt.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 c(p,m,null,b)},Tt.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()}},Tt.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))},Tt.prefetchDNS=function(p){typeof p=="string"&&r.d.D(p)},Tt.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})}},Tt.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)},Tt.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})}},Tt.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)},Tt.requestFormReset=function(p){r.d.r(p)},Tt.unstable_batchedUpdates=function(p,m){return p(m)},Tt.useFormState=function(p,m,b){return f.H.useFormState(p,m,b)},Tt.useFormStatus=function(){return f.H.useHostTransitionStatus()},Tt.version="19.2.7",Tt}var rg;function gb(){if(rg)return qo.exports;rg=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(l){console.error(l)}}return n(),qo.exports=pb(),qo.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 ug;function yb(){if(ug)return lr;ug=1;var n=mb(),l=Tf(),a=gb();function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)t+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function c(e){var t=e,i=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(i=t.return),e=t.return;while(e)}return t.tag===3?i:null}function f(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function h(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function p(e){if(c(e)!==e)throw Error(r(188))}function m(e){var t=e.alternate;if(!t){if(t=c(e),t===null)throw Error(r(188));return t!==e?null:e}for(var i=e,u=t;;){var o=i.return;if(o===null)break;var d=o.alternate;if(d===null){if(u=o.return,u!==null){i=u;continue}break}if(o.child===d.child){for(d=o.child;d;){if(d===i)return p(o),e;if(d===u)return p(o),t;d=d.sibling}throw Error(r(188))}if(i.return!==u.return)i=o,u=d;else{for(var x=!1,S=o.child;S;){if(S===i){x=!0,i=o,u=d;break}if(S===u){x=!0,u=o,i=d;break}S=S.sibling}if(!x){for(S=d.child;S;){if(S===i){x=!0,i=d,u=o;break}if(S===u){x=!0,u=d,i=o;break}S=S.sibling}if(!x)throw Error(r(189))}}if(i.alternate!==u)throw Error(r(190))}if(i.tag!==3)throw Error(r(188));return i.stateNode.current===i?e:t}function b(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=b(e),t!==null)return t;e=e.sibling}return null}var y=Object.assign,k=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),q=Symbol.for("react.strict_mode"),j=Symbol.for("react.profiler"),Z=Symbol.for("react.consumer"),H=Symbol.for("react.context"),le=Symbol.for("react.forward_ref"),ee=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),ce=Symbol.for("react.lazy"),fe=Symbol.for("react.activity"),M=Symbol.for("react.memo_cache_sentinel"),U=Symbol.iterator;function J(e){return e===null||typeof e!="object"?null:(e=U&&e[U]||e["@@iterator"],typeof e=="function"?e:null)}var pe=Symbol.for("react.client.reference");function re(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===pe?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case O:return"Fragment";case j:return"Profiler";case q:return"StrictMode";case ee:return"Suspense";case D:return"SuspenseList";case fe:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case E:return"Portal";case H:return e.displayName||"Context";case Z:return(e._context.displayName||"Context")+".Consumer";case le:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case P:return t=e.displayName||null,t!==null?t:re(e.type)||"Memo";case ce:t=e._payload,e=e._init;try{return re(e(t))}catch{}}return null}var W=Array.isArray,T=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ue={pending:!1,data:null,method:null,action:null},de=[],_=-1;function A(e){return{current:e}}function I(e){0>_||(e.current=de[_],de[_]=null,_--)}function w(e,t){_++,de[_]=e.current,e.current=t}var ae=A(null),ke=A(null),ye=A(null),Re=A(null);function at(e,t){switch(w(ye,t),w(ke,e),w(ae,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Sp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Sp(t),e=wp(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}I(ae),w(ae,e)}function Xe(){I(ae),I(ke),I(ye)}function un(e){e.memoizedState!==null&&w(Re,e);var t=ae.current,i=wp(t,e.type);t!==i&&(w(ke,e),w(ae,i))}function Mn(e){ke.current===e&&(I(ae),I(ke)),Re.current===e&&(I(Re),Pa._currentValue=ue)}var ca,Sr;function On(e){if(ca===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);ca=t&&t[1]||"",Sr=-1<i.stack.indexOf(`
|
|
42
|
-
at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
-
`+ca+e+Sr}var si=!1;function ci(e,t){if(!e||si)return"";si=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(t){var K=function(){throw Error()};if(Object.defineProperty(K.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(K,[])}catch(V){var B=V}Reflect.construct(e,[],K)}else{try{K.call()}catch(V){B=V}e.call(K.prototype)}}else{try{throw Error()}catch(V){B=V}(K=e())&&typeof K.catch=="function"&&K.catch(function(){})}}catch(V){if(V&&B&&typeof V.stack=="string")return[V.stack,B.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var d=u.DetermineComponentFrameRoot(),x=d[0],S=d[1];if(x&&S){var C=x.split(`
|
|
44
|
-
`),L=S.split(`
|
|
45
|
-
`);for(o=u=0;u<C.length&&!C[u].includes("DetermineComponentFrameRoot");)u++;for(;o<L.length&&!L[o].includes("DetermineComponentFrameRoot");)o++;if(u===C.length||o===L.length)for(u=C.length-1,o=L.length-1;1<=u&&0<=o&&C[u]!==L[o];)o--;for(;1<=u&&0<=o;u--,o--)if(C[u]!==L[o]){if(u!==1||o!==1)do if(u--,o--,0>o||C[u]!==L[o]){var F=`
|
|
46
|
-
`+C[u].replace(" at new "," at ");return e.displayName&&F.includes("<anonymous>")&&(F=F.replace("<anonymous>",e.displayName)),F}while(1<=u&&0<=o);break}}}finally{si=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?On(i):""}function wr(e,t){switch(e.tag){case 26:case 27:case 5:return On(e.type);case 16:return On("Lazy");case 13:return e.child!==t&&t!==null?On("Suspense Fallback"):On("Suspense");case 19:return On("SuspenseList");case 0:case 15:return ci(e.type,!1);case 11:return ci(e.type.render,!1);case 1:return ci(e.type,!0);case 31:return On("Activity");default:return""}}function _r(e){try{var t="",i=null;do t+=wr(e,i),i=e,e=e.return;while(e);return t}catch(u){return`
|
|
47
|
-
Error generating stack: `+u.message+`
|
|
48
|
-
`+u.stack}}var oi=Object.prototype.hasOwnProperty,fi=n.unstable_scheduleCallback,oa=n.unstable_cancelCallback,bs=n.unstable_shouldYield,vs=n.unstable_requestPaint,Dt=n.unstable_now,ks=n.unstable_getCurrentPriorityLevel,G=n.unstable_ImmediatePriority,ie=n.unstable_UserBlockingPriority,Se=n.unstable_NormalPriority,ze=n.unstable_LowPriority,Fe=n.unstable_IdlePriority,Xt=n.log,Rn=n.unstable_setDisableYieldValue,Mt=null,bt=null;function Lt(e){if(typeof Xt=="function"&&Rn(e),bt&&typeof bt.setStrictMode=="function")try{bt.setStrictMode(Mt,e)}catch{}}var Pe=Math.clz32?Math.clz32:Jx,ll=Math.log,vn=Math.LN2;function Jx(e){return e>>>=0,e===0?32:31-(ll(e)/vn|0)|0}var Er=256,Cr=262144,Ar=4194304;function Bl(e){var t=e&42;if(t!==0)return t;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 Nr(e,t,i){var u=e.pendingLanes;if(u===0)return 0;var o=0,d=e.suspendedLanes,x=e.pingedLanes;e=e.warmLanes;var S=u&134217727;return S!==0?(u=S&~d,u!==0?o=Bl(u):(x&=S,x!==0?o=Bl(x):i||(i=S&~e,i!==0&&(o=Bl(i))))):(S=u&~d,S!==0?o=Bl(S):x!==0?o=Bl(x):i||(i=u&~e,i!==0&&(o=Bl(i)))),o===0?0:t!==0&&t!==o&&(t&d)===0&&(d=o&-o,i=t&-t,d>=i||d===32&&(i&4194048)!==0)?t:o}function fa(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function $x(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+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 t+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 ld(){var e=Ar;return Ar<<=1,(Ar&62914560)===0&&(Ar=4194304),e}function Ss(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function da(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Px(e,t,i,u,o,d){var x=e.pendingLanes;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=i,e.entangledLanes&=i,e.errorRecoveryDisabledLanes&=i,e.shellSuspendCounter=0;var S=e.entanglements,C=e.expirationTimes,L=e.hiddenUpdates;for(i=x&~i;0<i;){var F=31-Pe(i),K=1<<F;S[F]=0,C[F]=-1;var B=L[F];if(B!==null)for(L[F]=null,F=0;F<B.length;F++){var V=B[F];V!==null&&(V.lane&=-536870913)}i&=~K}u!==0&&id(e,u,0),d!==0&&o===0&&e.tag!==0&&(e.suspendedLanes|=d&~(x&~t))}function id(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var u=31-Pe(t);e.entangledLanes|=t,e.entanglements[u]=e.entanglements[u]|1073741824|i&261930}function ad(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var u=31-Pe(i),o=1<<u;o&t|e[u]&t&&(e[u]|=t),i&=~o}}function rd(e,t){var i=t&-t;return i=(i&42)!==0?1:ws(i),(i&(e.suspendedLanes|t))!==0?0:i}function ws(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 _s(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function ud(){var e=$.p;return e!==0?e:(e=window.event,e===void 0?32:Qp(e.type))}function sd(e,t){var i=$.p;try{return $.p=e,t()}finally{$.p=i}}var il=Math.random().toString(36).slice(2),wt="__reactFiber$"+il,Bt="__reactProps$"+il,di="__reactContainer$"+il,Es="__reactEvents$"+il,Wx="__reactListeners$"+il,e0="__reactHandles$"+il,cd="__reactResources$"+il,ha="__reactMarker$"+il;function Cs(e){delete e[wt],delete e[Bt],delete e[Es],delete e[Wx],delete e[e0]}function hi(e){var t=e[wt];if(t)return t;for(var i=e.parentNode;i;){if(t=i[di]||i[wt]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=jp(e);e!==null;){if(i=e[wt])return i;e=jp(e)}return t}e=i,i=e.parentNode}return null}function mi(e){if(e=e[wt]||e[di]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ma(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function pi(e){var t=e[cd];return t||(t=e[cd]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function kt(e){e[ha]=!0}var od=new Set,fd={};function Ul(e,t){gi(e,t),gi(e+"Capture",t)}function gi(e,t){for(fd[e]=t,e=0;e<t.length;e++)od.add(t[e])}var t0=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]*$"),dd={},hd={};function n0(e){return oi.call(hd,e)?!0:oi.call(dd,e)?!1:t0.test(e)?hd[e]=!0:(dd[e]=!0,!1)}function Tr(e,t,i){if(n0(t))if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var u=t.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+i)}}function jr(e,t,i){if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+i)}}function Ln(e,t,i,u){if(u===null)e.removeAttribute(i);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttributeNS(t,i,""+u)}}function sn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function md(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function l0(e,t,i){var u=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var o=u.get,d=u.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(x){i=""+x,d.call(this,x)}}),Object.defineProperty(e,t,{enumerable:u.enumerable}),{getValue:function(){return i},setValue:function(x){i=""+x},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function As(e){if(!e._valueTracker){var t=md(e)?"checked":"value";e._valueTracker=l0(e,t,""+e[t])}}function pd(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),u="";return e&&(u=md(e)?e.checked?"true":"false":e.value),e=u,e!==i?(t.setValue(e),!0):!1}function zr(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 i0=/[\n"\\]/g;function cn(e){return e.replace(i0,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Ns(e,t,i,u,o,d,x,S){e.name="",x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.type=x:e.removeAttribute("type"),t!=null?x==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+sn(t)):e.value!==""+sn(t)&&(e.value=""+sn(t)):x!=="submit"&&x!=="reset"||e.removeAttribute("value"),t!=null?Ts(e,x,sn(t)):i!=null?Ts(e,x,sn(i)):u!=null&&e.removeAttribute("value"),o==null&&d!=null&&(e.defaultChecked=!!d),o!=null&&(e.checked=o&&typeof o!="function"&&typeof o!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?e.name=""+sn(S):e.removeAttribute("name")}function gd(e,t,i,u,o,d,x,S){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.type=d),t!=null||i!=null){if(!(d!=="submit"&&d!=="reset"||t!=null)){As(e);return}i=i!=null?""+sn(i):"",t=t!=null?""+sn(t):i,S||t===e.value||(e.value=t),e.defaultValue=t}u=u??o,u=typeof u!="function"&&typeof u!="symbol"&&!!u,e.checked=S?e.checked:!!u,e.defaultChecked=!!u,x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(e.name=x),As(e)}function Ts(e,t,i){t==="number"&&zr(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function yi(e,t,i,u){if(e=e.options,t){t={};for(var o=0;o<i.length;o++)t["$"+i[o]]=!0;for(i=0;i<e.length;i++)o=t.hasOwnProperty("$"+e[i].value),e[i].selected!==o&&(e[i].selected=o),o&&u&&(e[i].defaultSelected=!0)}else{for(i=""+sn(i),t=null,o=0;o<e.length;o++){if(e[o].value===i){e[o].selected=!0,u&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function yd(e,t,i){if(t!=null&&(t=""+sn(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+sn(i):""}function xd(e,t,i,u){if(t==null){if(u!=null){if(i!=null)throw Error(r(92));if(W(u)){if(1<u.length)throw Error(r(93));u=u[0]}i=u}i==null&&(i=""),t=i}i=sn(t),e.defaultValue=i,u=e.textContent,u===i&&u!==""&&u!==null&&(e.value=u),As(e)}function xi(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var a0=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 bd(e,t,i){var u=t.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?u?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":u?e.setProperty(t,i):typeof i!="number"||i===0||a0.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function vd(e,t,i){if(t!=null&&typeof t!="object")throw Error(r(62));if(e=e.style,i!=null){for(var u in i)!i.hasOwnProperty(u)||t!=null&&t.hasOwnProperty(u)||(u.indexOf("--")===0?e.setProperty(u,""):u==="float"?e.cssFloat="":e[u]="");for(var o in t)u=t[o],t.hasOwnProperty(o)&&i[o]!==u&&bd(e,o,u)}else for(var d in t)t.hasOwnProperty(d)&&bd(e,d,t[d])}function js(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 r0=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"]]),u0=/^[\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 Dr(e){return u0.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Bn(){}var zs=null;function Ds(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var bi=null,vi=null;function kd(e){var t=mi(e);if(t&&(e=t.stateNode)){var i=e[Bt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Ns(e,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),t=i.name,i.type==="radio"&&t!=null){for(i=e;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+cn(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var u=i[t];if(u!==e&&u.form===e.form){var o=u[Bt]||null;if(!o)throw Error(r(90));Ns(u,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name)}}for(t=0;t<i.length;t++)u=i[t],u.form===e.form&&pd(u)}break e;case"textarea":yd(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&yi(e,!!i.multiple,t,!1)}}}var Ms=!1;function Sd(e,t,i){if(Ms)return e(t,i);Ms=!0;try{var u=e(t);return u}finally{if(Ms=!1,(bi!==null||vi!==null)&&(bu(),bi&&(t=bi,e=vi,vi=bi=null,kd(t),e)))for(t=0;t<e.length;t++)kd(e[t])}}function pa(e,t){var i=e.stateNode;if(i===null)return null;var u=i[Bt]||null;if(u===null)return null;i=u[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(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(i&&typeof i!="function")throw Error(r(231,t,typeof i));return i}var Un=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Os=!1;if(Un)try{var ga={};Object.defineProperty(ga,"passive",{get:function(){Os=!0}}),window.addEventListener("test",ga,ga),window.removeEventListener("test",ga,ga)}catch{Os=!1}var al=null,Rs=null,Mr=null;function wd(){if(Mr)return Mr;var e,t=Rs,i=t.length,u,o="value"in al?al.value:al.textContent,d=o.length;for(e=0;e<i&&t[e]===o[e];e++);var x=i-e;for(u=1;u<=x&&t[i-u]===o[d-u];u++);return Mr=o.slice(e,1<u?1-u:void 0)}function Or(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Rr(){return!0}function _d(){return!1}function Ut(e){function t(i,u,o,d,x){this._reactName=i,this._targetInst=o,this.type=u,this.nativeEvent=d,this.target=x,this.currentTarget=null;for(var S in e)e.hasOwnProperty(S)&&(i=e[S],this[S]=i?i(d):d[S]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?Rr:_d,this.isPropagationStopped=_d,this}return y(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=Rr)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=Rr)},persist:function(){},isPersistent:Rr}),t}var Hl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Lr=Ut(Hl),ya=y({},Hl,{view:0,detail:0}),s0=Ut(ya),Ls,Bs,xa,Br=y({},ya,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Hs,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!==xa&&(xa&&e.type==="mousemove"?(Ls=e.screenX-xa.screenX,Bs=e.screenY-xa.screenY):Bs=Ls=0,xa=e),Ls)},movementY:function(e){return"movementY"in e?e.movementY:Bs}}),Ed=Ut(Br),c0=y({},Br,{dataTransfer:0}),o0=Ut(c0),f0=y({},ya,{relatedTarget:0}),Us=Ut(f0),d0=y({},Hl,{animationName:0,elapsedTime:0,pseudoElement:0}),h0=Ut(d0),m0=y({},Hl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),p0=Ut(m0),g0=y({},Hl,{data:0}),Cd=Ut(g0),y0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},x0={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"},b0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function v0(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=b0[e])?!!t[e]:!1}function Hs(){return v0}var k0=y({},ya,{key:function(e){if(e.key){var t=y0[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Or(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?x0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Hs,charCode:function(e){return e.type==="keypress"?Or(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Or(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),S0=Ut(k0),w0=y({},Br,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ad=Ut(w0),_0=y({},ya,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Hs}),E0=Ut(_0),C0=y({},Hl,{propertyName:0,elapsedTime:0,pseudoElement:0}),A0=Ut(C0),N0=y({},Br,{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}),T0=Ut(N0),j0=y({},Hl,{newState:0,oldState:0}),z0=Ut(j0),D0=[9,13,27,32],qs=Un&&"CompositionEvent"in window,ba=null;Un&&"documentMode"in document&&(ba=document.documentMode);var M0=Un&&"TextEvent"in window&&!ba,Nd=Un&&(!qs||ba&&8<ba&&11>=ba),Td=" ",jd=!1;function zd(e,t){switch(e){case"keyup":return D0.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Dd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ki=!1;function O0(e,t){switch(e){case"compositionend":return Dd(t);case"keypress":return t.which!==32?null:(jd=!0,Td);case"textInput":return e=t.data,e===Td&&jd?null:e;default:return null}}function R0(e,t){if(ki)return e==="compositionend"||!qs&&zd(e,t)?(e=wd(),Mr=Rs=al=null,ki=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Nd&&t.locale!=="ko"?null:t.data;default:return null}}var L0={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 Md(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!L0[e.type]:t==="textarea"}function Od(e,t,i,u){bi?vi?vi.push(u):vi=[u]:bi=u,t=Cu(t,"onChange"),0<t.length&&(i=new Lr("onChange","change",null,i,u),e.push({event:i,listeners:t}))}var va=null,ka=null;function B0(e){gp(e,0)}function Ur(e){var t=ma(e);if(pd(t))return e}function Rd(e,t){if(e==="change")return t}var Ld=!1;if(Un){var Vs;if(Un){var Ys="oninput"in document;if(!Ys){var Bd=document.createElement("div");Bd.setAttribute("oninput","return;"),Ys=typeof Bd.oninput=="function"}Vs=Ys}else Vs=!1;Ld=Vs&&(!document.documentMode||9<document.documentMode)}function Ud(){va&&(va.detachEvent("onpropertychange",Hd),ka=va=null)}function Hd(e){if(e.propertyName==="value"&&Ur(ka)){var t=[];Od(t,ka,e,Ds(e)),Sd(B0,t)}}function U0(e,t,i){e==="focusin"?(Ud(),va=t,ka=i,va.attachEvent("onpropertychange",Hd)):e==="focusout"&&Ud()}function H0(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ur(ka)}function q0(e,t){if(e==="click")return Ur(t)}function V0(e,t){if(e==="input"||e==="change")return Ur(t)}function Y0(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Kt=typeof Object.is=="function"?Object.is:Y0;function Sa(e,t){if(Kt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var i=Object.keys(e),u=Object.keys(t);if(i.length!==u.length)return!1;for(u=0;u<i.length;u++){var o=i[u];if(!oi.call(t,o)||!Kt(e[o],t[o]))return!1}return!0}function qd(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Vd(e,t){var i=qd(e);e=0;for(var u;i;){if(i.nodeType===3){if(u=e+i.textContent.length,e<=t&&u>=t)return{node:i,offset:t-e};e=u}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=qd(i)}}function Yd(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Yd(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Zd(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=zr(e.document);t instanceof e.HTMLIFrameElement;){try{var i=typeof t.contentWindow.location.href=="string"}catch{i=!1}if(i)e=t.contentWindow;else break;t=zr(e.document)}return t}function Zs(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var Z0=Un&&"documentMode"in document&&11>=document.documentMode,Si=null,Is=null,wa=null,Fs=!1;function Id(e,t,i){var u=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Fs||Si==null||Si!==zr(u)||(u=Si,"selectionStart"in u&&Zs(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}),wa&&Sa(wa,u)||(wa=u,u=Cu(Is,"onSelect"),0<u.length&&(t=new Lr("onSelect","select",null,t,i),e.push({event:t,listeners:u}),t.target=Si)))}function ql(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var wi={animationend:ql("Animation","AnimationEnd"),animationiteration:ql("Animation","AnimationIteration"),animationstart:ql("Animation","AnimationStart"),transitionrun:ql("Transition","TransitionRun"),transitionstart:ql("Transition","TransitionStart"),transitioncancel:ql("Transition","TransitionCancel"),transitionend:ql("Transition","TransitionEnd")},Qs={},Fd={};Un&&(Fd=document.createElement("div").style,"AnimationEvent"in window||(delete wi.animationend.animation,delete wi.animationiteration.animation,delete wi.animationstart.animation),"TransitionEvent"in window||delete wi.transitionend.transition);function Vl(e){if(Qs[e])return Qs[e];if(!wi[e])return e;var t=wi[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in Fd)return Qs[e]=t[i];return e}var Qd=Vl("animationend"),Gd=Vl("animationiteration"),Xd=Vl("animationstart"),I0=Vl("transitionrun"),F0=Vl("transitionstart"),Q0=Vl("transitioncancel"),Kd=Vl("transitionend"),Jd=new Map,Gs="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(" ");Gs.push("scrollEnd");function kn(e,t){Jd.set(e,t),Ul(t,[e])}var Hr=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=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(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},on=[],_i=0,Xs=0;function qr(){for(var e=_i,t=Xs=_i=0;t<e;){var i=on[t];on[t++]=null;var u=on[t];on[t++]=null;var o=on[t];on[t++]=null;var d=on[t];if(on[t++]=null,u!==null&&o!==null){var x=u.pending;x===null?o.next=o:(o.next=x.next,x.next=o),u.pending=o}d!==0&&$d(i,o,d)}}function Vr(e,t,i,u){on[_i++]=e,on[_i++]=t,on[_i++]=i,on[_i++]=u,Xs|=u,e.lanes|=u,e=e.alternate,e!==null&&(e.lanes|=u)}function Ks(e,t,i,u){return Vr(e,t,i,u),Yr(e)}function Yl(e,t){return Vr(e,null,null,t),Yr(e)}function $d(e,t,i){e.lanes|=i;var u=e.alternate;u!==null&&(u.lanes|=i);for(var o=!1,d=e.return;d!==null;)d.childLanes|=i,u=d.alternate,u!==null&&(u.childLanes|=i),d.tag===22&&(e=d.stateNode,e===null||e._visibility&1||(o=!0)),e=d,d=d.return;return e.tag===3?(d=e.stateNode,o&&t!==null&&(o=31-Pe(i),e=d.hiddenUpdates,u=e[o],u===null?e[o]=[t]:u.push(t),t.lane=i|536870912),d):null}function Yr(e){if(50<Fa)throw Fa=0,io=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ei={};function G0(e,t,i,u){this.tag=e,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,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 Jt(e,t,i,u){return new G0(e,t,i,u)}function Js(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Hn(e,t){var i=e.alternate;return i===null?(i=Jt(e.tag,t,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=t,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=e.flags&65011712,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,t=e.dependencies,i.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i.refCleanup=e.refCleanup,i}function Pd(e,t){e.flags&=65011714;var i=e.alternate;return i===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=i.childLanes,e.lanes=i.lanes,e.child=i.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=i.memoizedProps,e.memoizedState=i.memoizedState,e.updateQueue=i.updateQueue,e.type=i.type,t=i.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Zr(e,t,i,u,o,d){var x=0;if(u=e,typeof e=="function")Js(e)&&(x=1);else if(typeof e=="string")x=P1(e,i,ae.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case fe:return e=Jt(31,i,t,o),e.elementType=fe,e.lanes=d,e;case O:return Zl(i.children,o,d,t);case q:x=8,o|=24;break;case j:return e=Jt(12,i,t,o|2),e.elementType=j,e.lanes=d,e;case ee:return e=Jt(13,i,t,o),e.elementType=ee,e.lanes=d,e;case D:return e=Jt(19,i,t,o),e.elementType=D,e.lanes=d,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case H:x=10;break e;case Z:x=9;break e;case le:x=11;break e;case P:x=14;break e;case ce:x=16,u=null;break e}x=29,i=Error(r(130,e===null?"null":typeof e,"")),u=null}return t=Jt(x,i,t,o),t.elementType=e,t.type=u,t.lanes=d,t}function Zl(e,t,i,u){return e=Jt(7,e,u,t),e.lanes=i,e}function $s(e,t,i){return e=Jt(6,e,null,t),e.lanes=i,e}function Wd(e){var t=Jt(18,null,null,0);return t.stateNode=e,t}function Ps(e,t,i){return t=Jt(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var eh=new WeakMap;function fn(e,t){if(typeof e=="object"&&e!==null){var i=eh.get(e);return i!==void 0?i:(t={value:e,source:t,stack:_r(t)},eh.set(e,t),t)}return{value:e,source:t,stack:_r(t)}}var Ci=[],Ai=0,Ir=null,_a=0,dn=[],hn=0,rl=null,En=1,Cn="";function qn(e,t){Ci[Ai++]=_a,Ci[Ai++]=Ir,Ir=e,_a=t}function th(e,t,i){dn[hn++]=En,dn[hn++]=Cn,dn[hn++]=rl,rl=e;var u=En;e=Cn;var o=32-Pe(u)-1;u&=~(1<<o),i+=1;var d=32-Pe(t)+o;if(30<d){var x=o-o%5;d=(u&(1<<x)-1).toString(32),u>>=x,o-=x,En=1<<32-Pe(t)+o|i<<o|u,Cn=d+e}else En=1<<d|i<<o|u,Cn=e}function Ws(e){e.return!==null&&(qn(e,1),th(e,1,0))}function ec(e){for(;e===Ir;)Ir=Ci[--Ai],Ci[Ai]=null,_a=Ci[--Ai],Ci[Ai]=null;for(;e===rl;)rl=dn[--hn],dn[hn]=null,Cn=dn[--hn],dn[hn]=null,En=dn[--hn],dn[hn]=null}function nh(e,t){dn[hn++]=En,dn[hn++]=Cn,dn[hn++]=rl,En=t.id,Cn=t.overflow,rl=e}var _t=null,nt=null,Ue=!1,ul=null,mn=!1,tc=Error(r(519));function sl(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ea(fn(t,e)),tc}function lh(e){var t=e.stateNode,i=e.type,u=e.memoizedProps;switch(t[wt]=e,t[Bt]=u,i){case"dialog":Me("cancel",t),Me("close",t);break;case"iframe":case"object":case"embed":Me("load",t);break;case"video":case"audio":for(i=0;i<Ga.length;i++)Me(Ga[i],t);break;case"source":Me("error",t);break;case"img":case"image":case"link":Me("error",t),Me("load",t);break;case"details":Me("toggle",t);break;case"input":Me("invalid",t),gd(t,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0);break;case"select":Me("invalid",t);break;case"textarea":Me("invalid",t),xd(t,u.value,u.defaultValue,u.children)}i=u.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||t.textContent===""+i||u.suppressHydrationWarning===!0||vp(t.textContent,i)?(u.popover!=null&&(Me("beforetoggle",t),Me("toggle",t)),u.onScroll!=null&&Me("scroll",t),u.onScrollEnd!=null&&Me("scrollend",t),u.onClick!=null&&(t.onclick=Bn),t=!0):t=!1,t||sl(e,!0)}function ih(e){for(_t=e.return;_t;)switch(_t.tag){case 5:case 31:case 13:mn=!1;return;case 27:case 3:mn=!0;return;default:_t=_t.return}}function Ni(e){if(e!==_t)return!1;if(!Ue)return ih(e),Ue=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||vo(e.type,e.memoizedProps)),i=!i),i&&nt&&sl(e),ih(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));nt=Tp(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));nt=Tp(e)}else t===27?(t=nt,Sl(e.type)?(e=Eo,Eo=null,nt=e):nt=t):nt=_t?gn(e.stateNode.nextSibling):null;return!0}function Il(){nt=_t=null,Ue=!1}function nc(){var e=ul;return e!==null&&(Yt===null?Yt=e:Yt.push.apply(Yt,e),ul=null),e}function Ea(e){ul===null?ul=[e]:ul.push(e)}var lc=A(null),Fl=null,Vn=null;function cl(e,t,i){w(lc,t._currentValue),t._currentValue=i}function Yn(e){e._currentValue=lc.current,I(lc)}function ic(e,t,i){for(;e!==null;){var u=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,u!==null&&(u.childLanes|=t)):u!==null&&(u.childLanes&t)!==t&&(u.childLanes|=t),e===i)break;e=e.return}}function ac(e,t,i,u){var o=e.child;for(o!==null&&(o.return=e);o!==null;){var d=o.dependencies;if(d!==null){var x=o.child;d=d.firstContext;e:for(;d!==null;){var S=d;d=o;for(var C=0;C<t.length;C++)if(S.context===t[C]){d.lanes|=i,S=d.alternate,S!==null&&(S.lanes|=i),ic(d.return,i,e),u||(x=null);break e}d=S.next}}else if(o.tag===18){if(x=o.return,x===null)throw Error(r(341));x.lanes|=i,d=x.alternate,d!==null&&(d.lanes|=i),ic(x,i,e),x=null}else x=o.child;if(x!==null)x.return=o;else for(x=o;x!==null;){if(x===e){x=null;break}if(o=x.sibling,o!==null){o.return=x.return,x=o;break}x=x.return}o=x}}function Ti(e,t,i,u){e=null;for(var o=t,d=!1;o!==null;){if(!d){if((o.flags&524288)!==0)d=!0;else if((o.flags&262144)!==0)break}if(o.tag===10){var x=o.alternate;if(x===null)throw Error(r(387));if(x=x.memoizedProps,x!==null){var S=o.type;Kt(o.pendingProps.value,x.value)||(e!==null?e.push(S):e=[S])}}else if(o===Re.current){if(x=o.alternate,x===null)throw Error(r(387));x.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(e!==null?e.push(Pa):e=[Pa])}o=o.return}e!==null&&ac(t,e,i,u),t.flags|=262144}function Fr(e){for(e=e.firstContext;e!==null;){if(!Kt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ql(e){Fl=e,Vn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Et(e){return ah(Fl,e)}function Qr(e,t){return Fl===null&&Ql(e),ah(e,t)}function ah(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},Vn===null){if(e===null)throw Error(r(308));Vn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Vn=Vn.next=t;return i}var X0=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(i,u){e.push(u)}};this.abort=function(){t.aborted=!0,e.forEach(function(i){return i()})}},K0=n.unstable_scheduleCallback,J0=n.unstable_NormalPriority,ht={$$typeof:H,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function rc(){return{controller:new X0,data:new Map,refCount:0}}function Ca(e){e.refCount--,e.refCount===0&&K0(J0,function(){e.controller.abort()})}var Aa=null,uc=0,ji=0,zi=null;function $0(e,t){if(Aa===null){var i=Aa=[];uc=0,ji=oo(),zi={status:"pending",value:void 0,then:function(u){i.push(u)}}}return uc++,t.then(rh,rh),t}function rh(){if(--uc===0&&Aa!==null){zi!==null&&(zi.status="fulfilled");var e=Aa;Aa=null,ji=0,zi=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function P0(e,t){var i=[],u={status:"pending",value:null,reason:null,then:function(o){i.push(o)}};return e.then(function(){u.status="fulfilled",u.value=t;for(var o=0;o<i.length;o++)(0,i[o])(t)},function(o){for(u.status="rejected",u.reason=o,o=0;o<i.length;o++)(0,i[o])(void 0)}),u}var uh=T.S;T.S=function(e,t){Im=Dt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&$0(e,t),uh!==null&&uh(e,t)};var Gl=A(null);function sc(){var e=Gl.current;return e!==null?e:We.pooledCache}function Gr(e,t){t===null?w(Gl,Gl.current):w(Gl,t.pool)}function sh(){var e=sc();return e===null?null:{parent:ht._currentValue,pool:e}}var Di=Error(r(460)),cc=Error(r(474)),Xr=Error(r(542)),Kr={then:function(){}};function ch(e){return e=e.status,e==="fulfilled"||e==="rejected"}function oh(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(Bn,Bn),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,dh(e),e;default:if(typeof t.status=="string")t.then(Bn,Bn);else{if(e=We,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=t,e.status="pending",e.then(function(u){if(t.status==="pending"){var o=t;o.status="fulfilled",o.value=u}},function(u){if(t.status==="pending"){var o=t;o.status="rejected",o.reason=u}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,dh(e),e}throw Kl=t,Di}}function Xl(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(Kl=i,Di):i}}var Kl=null;function fh(){if(Kl===null)throw Error(r(459));var e=Kl;return Kl=null,e}function dh(e){if(e===Di||e===Xr)throw Error(r(483))}var Mi=null,Na=0;function Jr(e){var t=Na;return Na+=1,Mi===null&&(Mi=[]),oh(Mi,e,t)}function Ta(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function $r(e,t){throw t.$$typeof===k?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function hh(e){function t(z,N){if(e){var R=z.deletions;R===null?(z.deletions=[N],z.flags|=16):R.push(N)}}function i(z,N){if(!e)return null;for(;N!==null;)t(z,N),N=N.sibling;return null}function u(z){for(var N=new Map;z!==null;)z.key!==null?N.set(z.key,z):N.set(z.index,z),z=z.sibling;return N}function o(z,N){return z=Hn(z,N),z.index=0,z.sibling=null,z}function d(z,N,R){return z.index=R,e?(R=z.alternate,R!==null?(R=R.index,R<N?(z.flags|=67108866,N):R):(z.flags|=67108866,N)):(z.flags|=1048576,N)}function x(z){return e&&z.alternate===null&&(z.flags|=67108866),z}function S(z,N,R,X){return N===null||N.tag!==6?(N=$s(R,z.mode,X),N.return=z,N):(N=o(N,R),N.return=z,N)}function C(z,N,R,X){var xe=R.type;return xe===O?F(z,N,R.props.children,X,R.key):N!==null&&(N.elementType===xe||typeof xe=="object"&&xe!==null&&xe.$$typeof===ce&&Xl(xe)===N.type)?(N=o(N,R.props),Ta(N,R),N.return=z,N):(N=Zr(R.type,R.key,R.props,null,z.mode,X),Ta(N,R),N.return=z,N)}function L(z,N,R,X){return N===null||N.tag!==4||N.stateNode.containerInfo!==R.containerInfo||N.stateNode.implementation!==R.implementation?(N=Ps(R,z.mode,X),N.return=z,N):(N=o(N,R.children||[]),N.return=z,N)}function F(z,N,R,X,xe){return N===null||N.tag!==7?(N=Zl(R,z.mode,X,xe),N.return=z,N):(N=o(N,R),N.return=z,N)}function K(z,N,R){if(typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint")return N=$s(""+N,z.mode,R),N.return=z,N;if(typeof N=="object"&&N!==null){switch(N.$$typeof){case v:return R=Zr(N.type,N.key,N.props,null,z.mode,R),Ta(R,N),R.return=z,R;case E:return N=Ps(N,z.mode,R),N.return=z,N;case ce:return N=Xl(N),K(z,N,R)}if(W(N)||J(N))return N=Zl(N,z.mode,R,null),N.return=z,N;if(typeof N.then=="function")return K(z,Jr(N),R);if(N.$$typeof===H)return K(z,Qr(z,N),R);$r(z,N)}return null}function B(z,N,R,X){var xe=N!==null?N.key:null;if(typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint")return xe!==null?null:S(z,N,""+R,X);if(typeof R=="object"&&R!==null){switch(R.$$typeof){case v:return R.key===xe?C(z,N,R,X):null;case E:return R.key===xe?L(z,N,R,X):null;case ce:return R=Xl(R),B(z,N,R,X)}if(W(R)||J(R))return xe!==null?null:F(z,N,R,X,null);if(typeof R.then=="function")return B(z,N,Jr(R),X);if(R.$$typeof===H)return B(z,N,Qr(z,R),X);$r(z,R)}return null}function V(z,N,R,X,xe){if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return z=z.get(R)||null,S(N,z,""+X,xe);if(typeof X=="object"&&X!==null){switch(X.$$typeof){case v:return z=z.get(X.key===null?R:X.key)||null,C(N,z,X,xe);case E:return z=z.get(X.key===null?R:X.key)||null,L(N,z,X,xe);case ce:return X=Xl(X),V(z,N,R,X,xe)}if(W(X)||J(X))return z=z.get(R)||null,F(N,z,X,xe,null);if(typeof X.then=="function")return V(z,N,R,Jr(X),xe);if(X.$$typeof===H)return V(z,N,R,Qr(N,X),xe);$r(N,X)}return null}function oe(z,N,R,X){for(var xe=null,Ve=null,me=N,Te=N=0,Be=null;me!==null&&Te<R.length;Te++){me.index>Te?(Be=me,me=null):Be=me.sibling;var Ye=B(z,me,R[Te],X);if(Ye===null){me===null&&(me=Be);break}e&&me&&Ye.alternate===null&&t(z,me),N=d(Ye,N,Te),Ve===null?xe=Ye:Ve.sibling=Ye,Ve=Ye,me=Be}if(Te===R.length)return i(z,me),Ue&&qn(z,Te),xe;if(me===null){for(;Te<R.length;Te++)me=K(z,R[Te],X),me!==null&&(N=d(me,N,Te),Ve===null?xe=me:Ve.sibling=me,Ve=me);return Ue&&qn(z,Te),xe}for(me=u(me);Te<R.length;Te++)Be=V(me,z,Te,R[Te],X),Be!==null&&(e&&Be.alternate!==null&&me.delete(Be.key===null?Te:Be.key),N=d(Be,N,Te),Ve===null?xe=Be:Ve.sibling=Be,Ve=Be);return e&&me.forEach(function(Al){return t(z,Al)}),Ue&&qn(z,Te),xe}function ve(z,N,R,X){if(R==null)throw Error(r(151));for(var xe=null,Ve=null,me=N,Te=N=0,Be=null,Ye=R.next();me!==null&&!Ye.done;Te++,Ye=R.next()){me.index>Te?(Be=me,me=null):Be=me.sibling;var Al=B(z,me,Ye.value,X);if(Al===null){me===null&&(me=Be);break}e&&me&&Al.alternate===null&&t(z,me),N=d(Al,N,Te),Ve===null?xe=Al:Ve.sibling=Al,Ve=Al,me=Be}if(Ye.done)return i(z,me),Ue&&qn(z,Te),xe;if(me===null){for(;!Ye.done;Te++,Ye=R.next())Ye=K(z,Ye.value,X),Ye!==null&&(N=d(Ye,N,Te),Ve===null?xe=Ye:Ve.sibling=Ye,Ve=Ye);return Ue&&qn(z,Te),xe}for(me=u(me);!Ye.done;Te++,Ye=R.next())Ye=V(me,z,Te,Ye.value,X),Ye!==null&&(e&&Ye.alternate!==null&&me.delete(Ye.key===null?Te:Ye.key),N=d(Ye,N,Te),Ve===null?xe=Ye:Ve.sibling=Ye,Ve=Ye);return e&&me.forEach(function(cb){return t(z,cb)}),Ue&&qn(z,Te),xe}function $e(z,N,R,X){if(typeof R=="object"&&R!==null&&R.type===O&&R.key===null&&(R=R.props.children),typeof R=="object"&&R!==null){switch(R.$$typeof){case v:e:{for(var xe=R.key;N!==null;){if(N.key===xe){if(xe=R.type,xe===O){if(N.tag===7){i(z,N.sibling),X=o(N,R.props.children),X.return=z,z=X;break e}}else if(N.elementType===xe||typeof xe=="object"&&xe!==null&&xe.$$typeof===ce&&Xl(xe)===N.type){i(z,N.sibling),X=o(N,R.props),Ta(X,R),X.return=z,z=X;break e}i(z,N);break}else t(z,N);N=N.sibling}R.type===O?(X=Zl(R.props.children,z.mode,X,R.key),X.return=z,z=X):(X=Zr(R.type,R.key,R.props,null,z.mode,X),Ta(X,R),X.return=z,z=X)}return x(z);case E:e:{for(xe=R.key;N!==null;){if(N.key===xe)if(N.tag===4&&N.stateNode.containerInfo===R.containerInfo&&N.stateNode.implementation===R.implementation){i(z,N.sibling),X=o(N,R.children||[]),X.return=z,z=X;break e}else{i(z,N);break}else t(z,N);N=N.sibling}X=Ps(R,z.mode,X),X.return=z,z=X}return x(z);case ce:return R=Xl(R),$e(z,N,R,X)}if(W(R))return oe(z,N,R,X);if(J(R)){if(xe=J(R),typeof xe!="function")throw Error(r(150));return R=xe.call(R),ve(z,N,R,X)}if(typeof R.then=="function")return $e(z,N,Jr(R),X);if(R.$$typeof===H)return $e(z,N,Qr(z,R),X);$r(z,R)}return typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint"?(R=""+R,N!==null&&N.tag===6?(i(z,N.sibling),X=o(N,R),X.return=z,z=X):(i(z,N),X=$s(R,z.mode,X),X.return=z,z=X),x(z)):i(z,N)}return function(z,N,R,X){try{Na=0;var xe=$e(z,N,R,X);return Mi=null,xe}catch(me){if(me===Di||me===Xr)throw me;var Ve=Jt(29,me,null,z.mode);return Ve.lanes=X,Ve.return=z,Ve}finally{}}}var Jl=hh(!0),mh=hh(!1),ol=!1;function oc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function fc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function fl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function dl(e,t,i){var u=e.updateQueue;if(u===null)return null;if(u=u.shared,(Ie&2)!==0){var o=u.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),u.pending=t,t=Yr(e),$d(e,null,i),t}return Vr(e,u,t,i),Yr(e)}function ja(e,t,i){if(t=t.updateQueue,t!==null&&(t=t.shared,(i&4194048)!==0)){var u=t.lanes;u&=e.pendingLanes,i|=u,t.lanes=i,ad(e,i)}}function dc(e,t){var i=e.updateQueue,u=e.alternate;if(u!==null&&(u=u.updateQueue,i===u)){var o=null,d=null;if(i=i.firstBaseUpdate,i!==null){do{var x={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};d===null?o=d=x:d=d.next=x,i=i.next}while(i!==null);d===null?o=d=t:d=d.next=t}else o=d=t;i={baseState:u.baseState,firstBaseUpdate:o,lastBaseUpdate:d,shared:u.shared,callbacks:u.callbacks},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=t:e.next=t,i.lastBaseUpdate=t}var hc=!1;function za(){if(hc){var e=zi;if(e!==null)throw e}}function Da(e,t,i,u){hc=!1;var o=e.updateQueue;ol=!1;var d=o.firstBaseUpdate,x=o.lastBaseUpdate,S=o.shared.pending;if(S!==null){o.shared.pending=null;var C=S,L=C.next;C.next=null,x===null?d=L:x.next=L,x=C;var F=e.alternate;F!==null&&(F=F.updateQueue,S=F.lastBaseUpdate,S!==x&&(S===null?F.firstBaseUpdate=L:S.next=L,F.lastBaseUpdate=C))}if(d!==null){var K=o.baseState;x=0,F=L=C=null,S=d;do{var B=S.lane&-536870913,V=B!==S.lane;if(V?(Le&B)===B:(u&B)===B){B!==0&&B===ji&&(hc=!0),F!==null&&(F=F.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var oe=e,ve=S;B=t;var $e=i;switch(ve.tag){case 1:if(oe=ve.payload,typeof oe=="function"){K=oe.call($e,K,B);break e}K=oe;break e;case 3:oe.flags=oe.flags&-65537|128;case 0:if(oe=ve.payload,B=typeof oe=="function"?oe.call($e,K,B):oe,B==null)break e;K=y({},K,B);break e;case 2:ol=!0}}B=S.callback,B!==null&&(e.flags|=64,V&&(e.flags|=8192),V=o.callbacks,V===null?o.callbacks=[B]:V.push(B))}else V={lane:B,tag:S.tag,payload:S.payload,callback:S.callback,next:null},F===null?(L=F=V,C=K):F=F.next=V,x|=B;if(S=S.next,S===null){if(S=o.shared.pending,S===null)break;V=S,S=V.next,V.next=null,o.lastBaseUpdate=V,o.shared.pending=null}}while(!0);F===null&&(C=K),o.baseState=C,o.firstBaseUpdate=L,o.lastBaseUpdate=F,d===null&&(o.shared.lanes=0),yl|=x,e.lanes=x,e.memoizedState=K}}function ph(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function gh(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)ph(i[e],t)}var Oi=A(null),Pr=A(0);function yh(e,t){e=$n,w(Pr,e),w(Oi,t),$n=e|t.baseLanes}function mc(){w(Pr,$n),w(Oi,Oi.current)}function pc(){$n=Pr.current,I(Oi),I(Pr)}var $t=A(null),pn=null;function hl(e){var t=e.alternate;w(ft,ft.current&1),w($t,e),pn===null&&(t===null||Oi.current!==null||t.memoizedState!==null)&&(pn=e)}function gc(e){w(ft,ft.current),w($t,e),pn===null&&(pn=e)}function xh(e){e.tag===22?(w(ft,ft.current),w($t,e),pn===null&&(pn=e)):ml()}function ml(){w(ft,ft.current),w($t,$t.current)}function Pt(e){I($t),pn===e&&(pn=null),I(ft)}var ft=A(0);function Wr(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||wo(i)||_o(i)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Zn=0,Ne=null,Ke=null,mt=null,eu=!1,Ri=!1,$l=!1,tu=0,Ma=0,Li=null,W0=0;function st(){throw Error(r(321))}function yc(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!Kt(e[i],t[i]))return!1;return!0}function xc(e,t,i,u,o,d){return Zn=d,Ne=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,T.H=e===null||e.memoizedState===null?tm:Mc,$l=!1,d=i(u,o),$l=!1,Ri&&(d=vh(t,i,u,o)),bh(e),d}function bh(e){T.H=La;var t=Ke!==null&&Ke.next!==null;if(Zn=0,mt=Ke=Ne=null,eu=!1,Ma=0,Li=null,t)throw Error(r(300));e===null||pt||(e=e.dependencies,e!==null&&Fr(e)&&(pt=!0))}function vh(e,t,i,u){Ne=e;var o=0;do{if(Ri&&(Li=null),Ma=0,Ri=!1,25<=o)throw Error(r(301));if(o+=1,mt=Ke=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=nm,d=t(i,u)}while(Ri);return d}function e1(){var e=T.H,t=e.useState()[0];return t=typeof t.then=="function"?Oa(t):t,e=e.useState()[0],(Ke!==null?Ke.memoizedState:null)!==e&&(Ne.flags|=1024),t}function bc(){var e=tu!==0;return tu=0,e}function vc(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function kc(e){if(eu){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}eu=!1}Zn=0,mt=Ke=Ne=null,Ri=!1,Ma=tu=0,Li=null}function Ot(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return mt===null?Ne.memoizedState=mt=e:mt=mt.next=e,mt}function dt(){if(Ke===null){var e=Ne.alternate;e=e!==null?e.memoizedState:null}else e=Ke.next;var t=mt===null?Ne.memoizedState:mt.next;if(t!==null)mt=t,Ke=e;else{if(e===null)throw Ne.alternate===null?Error(r(467)):Error(r(310));Ke=e,e={memoizedState:Ke.memoizedState,baseState:Ke.baseState,baseQueue:Ke.baseQueue,queue:Ke.queue,next:null},mt===null?Ne.memoizedState=mt=e:mt=mt.next=e}return mt}function nu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Oa(e){var t=Ma;return Ma+=1,Li===null&&(Li=[]),e=oh(Li,e,t),t=Ne,(mt===null?t.memoizedState:mt.next)===null&&(t=t.alternate,T.H=t===null||t.memoizedState===null?tm:Mc),e}function lu(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Oa(e);if(e.$$typeof===H)return Et(e)}throw Error(r(438,String(e)))}function Sc(e){var t=null,i=Ne.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var u=Ne.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(t={data:u.data.map(function(o){return o.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),i===null&&(i=nu(),Ne.updateQueue=i),i.memoCache=t,i=t.data[t.index],i===void 0)for(i=t.data[t.index]=Array(e),u=0;u<e;u++)i[u]=M;return t.index++,i}function In(e,t){return typeof t=="function"?t(e):t}function iu(e){var t=dt();return wc(t,Ke,e)}function wc(e,t,i){var u=e.queue;if(u===null)throw Error(r(311));u.lastRenderedReducer=i;var o=e.baseQueue,d=u.pending;if(d!==null){if(o!==null){var x=o.next;o.next=d.next,d.next=x}t.baseQueue=o=d,u.pending=null}if(d=e.baseState,o===null)e.memoizedState=d;else{t=o.next;var S=x=null,C=null,L=t,F=!1;do{var K=L.lane&-536870913;if(K!==L.lane?(Le&K)===K:(Zn&K)===K){var B=L.revertLane;if(B===0)C!==null&&(C=C.next={lane:0,revertLane:0,gesture:null,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null}),K===ji&&(F=!0);else if((Zn&B)===B){L=L.next,B===ji&&(F=!0);continue}else K={lane:0,revertLane:L.revertLane,gesture:null,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null},C===null?(S=C=K,x=d):C=C.next=K,Ne.lanes|=B,yl|=B;K=L.action,$l&&i(d,K),d=L.hasEagerState?L.eagerState:i(d,K)}else B={lane:K,revertLane:L.revertLane,gesture:L.gesture,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null},C===null?(S=C=B,x=d):C=C.next=B,Ne.lanes|=K,yl|=K;L=L.next}while(L!==null&&L!==t);if(C===null?x=d:C.next=S,!Kt(d,e.memoizedState)&&(pt=!0,F&&(i=zi,i!==null)))throw i;e.memoizedState=d,e.baseState=x,e.baseQueue=C,u.lastRenderedState=d}return o===null&&(u.lanes=0),[e.memoizedState,u.dispatch]}function _c(e){var t=dt(),i=t.queue;if(i===null)throw Error(r(311));i.lastRenderedReducer=e;var u=i.dispatch,o=i.pending,d=t.memoizedState;if(o!==null){i.pending=null;var x=o=o.next;do d=e(d,x.action),x=x.next;while(x!==o);Kt(d,t.memoizedState)||(pt=!0),t.memoizedState=d,t.baseQueue===null&&(t.baseState=d),i.lastRenderedState=d}return[d,u]}function kh(e,t,i){var u=Ne,o=dt(),d=Ue;if(d){if(i===void 0)throw Error(r(407));i=i()}else i=t();var x=!Kt((Ke||o).memoizedState,i);if(x&&(o.memoizedState=i,pt=!0),o=o.queue,Ac(_h.bind(null,u,o,e),[e]),o.getSnapshot!==t||x||mt!==null&&mt.memoizedState.tag&1){if(u.flags|=2048,Bi(9,{destroy:void 0},wh.bind(null,u,o,i,t),null),We===null)throw Error(r(349));d||(Zn&127)!==0||Sh(u,t,i)}return i}function Sh(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=Ne.updateQueue,t===null?(t=nu(),Ne.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function wh(e,t,i,u){t.value=i,t.getSnapshot=u,Eh(t)&&Ch(e)}function _h(e,t,i){return i(function(){Eh(t)&&Ch(e)})}function Eh(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!Kt(e,i)}catch{return!0}}function Ch(e){var t=Yl(e,2);t!==null&&Zt(t,e,2)}function Ec(e){var t=Ot();if(typeof e=="function"){var i=e;if(e=i(),$l){Lt(!0);try{i()}finally{Lt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:In,lastRenderedState:e},t}function Ah(e,t,i,u){return e.baseState=i,wc(e,Ke,typeof u=="function"?u:In)}function t1(e,t,i,u,o){if(uu(e))throw Error(r(485));if(e=t.action,e!==null){var d={payload:o,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(x){d.listeners.push(x)}};T.T!==null?i(!0):d.isTransition=!1,u(d),i=t.pending,i===null?(d.next=t.pending=d,Nh(t,d)):(d.next=i.next,t.pending=i.next=d)}}function Nh(e,t){var i=t.action,u=t.payload,o=e.state;if(t.isTransition){var d=T.T,x={};T.T=x;try{var S=i(o,u),C=T.S;C!==null&&C(x,S),Th(e,t,S)}catch(L){Cc(e,t,L)}finally{d!==null&&x.types!==null&&(d.types=x.types),T.T=d}}else try{d=i(o,u),Th(e,t,d)}catch(L){Cc(e,t,L)}}function Th(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(u){jh(e,t,u)},function(u){return Cc(e,t,u)}):jh(e,t,i)}function jh(e,t,i){t.status="fulfilled",t.value=i,zh(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,Nh(e,i)))}function Cc(e,t,i){var u=e.pending;if(e.pending=null,u!==null){u=u.next;do t.status="rejected",t.reason=i,zh(t),t=t.next;while(t!==u)}e.action=null}function zh(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Dh(e,t){return t}function Mh(e,t){if(Ue){var i=We.formState;if(i!==null){e:{var u=Ne;if(Ue){if(nt){t:{for(var o=nt,d=mn;o.nodeType!==8;){if(!d){o=null;break t}if(o=gn(o.nextSibling),o===null){o=null;break t}}d=o.data,o=d==="F!"||d==="F"?o:null}if(o){nt=gn(o.nextSibling),u=o.data==="F!";break e}}sl(u)}u=!1}u&&(t=i[0])}}return i=Ot(),i.memoizedState=i.baseState=t,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Dh,lastRenderedState:t},i.queue=u,i=Ph.bind(null,Ne,u),u.dispatch=i,u=Ec(!1),d=Dc.bind(null,Ne,!1,u.queue),u=Ot(),o={state:t,dispatch:null,action:e,pending:null},u.queue=o,i=t1.bind(null,Ne,o,d,i),o.dispatch=i,u.memoizedState=e,[t,i,!1]}function Oh(e){var t=dt();return Rh(t,Ke,e)}function Rh(e,t,i){if(t=wc(e,t,Dh)[0],e=iu(In)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var u=Oa(t)}catch(x){throw x===Di?Xr:x}else u=t;t=dt();var o=t.queue,d=o.dispatch;return i!==t.memoizedState&&(Ne.flags|=2048,Bi(9,{destroy:void 0},n1.bind(null,o,i),null)),[u,d,e]}function n1(e,t){e.action=t}function Lh(e){var t=dt(),i=Ke;if(i!==null)return Rh(t,i,e);dt(),t=t.memoizedState,i=dt();var u=i.queue.dispatch;return i.memoizedState=e,[t,u,!1]}function Bi(e,t,i,u){return e={tag:e,create:i,deps:u,inst:t,next:null},t=Ne.updateQueue,t===null&&(t=nu(),Ne.updateQueue=t),i=t.lastEffect,i===null?t.lastEffect=e.next=e:(u=i.next,i.next=e,e.next=u,t.lastEffect=e),e}function Bh(){return dt().memoizedState}function au(e,t,i,u){var o=Ot();Ne.flags|=e,o.memoizedState=Bi(1|t,{destroy:void 0},i,u===void 0?null:u)}function ru(e,t,i,u){var o=dt();u=u===void 0?null:u;var d=o.memoizedState.inst;Ke!==null&&u!==null&&yc(u,Ke.memoizedState.deps)?o.memoizedState=Bi(t,d,i,u):(Ne.flags|=e,o.memoizedState=Bi(1|t,d,i,u))}function Uh(e,t){au(8390656,8,e,t)}function Ac(e,t){ru(2048,8,e,t)}function l1(e){Ne.flags|=4;var t=Ne.updateQueue;if(t===null)t=nu(),Ne.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function Hh(e){var t=dt().memoizedState;return l1({ref:t,nextImpl:e}),function(){if((Ie&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function qh(e,t){return ru(4,2,e,t)}function Vh(e,t){return ru(4,4,e,t)}function Yh(e,t){if(typeof t=="function"){e=e();var i=t(e);return function(){typeof i=="function"?i():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Zh(e,t,i){i=i!=null?i.concat([e]):null,ru(4,4,Yh.bind(null,t,e),i)}function Nc(){}function Ih(e,t){var i=dt();t=t===void 0?null:t;var u=i.memoizedState;return t!==null&&yc(t,u[1])?u[0]:(i.memoizedState=[e,t],e)}function Fh(e,t){var i=dt();t=t===void 0?null:t;var u=i.memoizedState;if(t!==null&&yc(t,u[1]))return u[0];if(u=e(),$l){Lt(!0);try{e()}finally{Lt(!1)}}return i.memoizedState=[u,t],u}function Tc(e,t,i){return i===void 0||(Zn&1073741824)!==0&&(Le&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=Qm(),Ne.lanes|=e,yl|=e,i)}function Qh(e,t,i,u){return Kt(i,t)?i:Oi.current!==null?(e=Tc(e,i,u),Kt(e,t)||(pt=!0),e):(Zn&42)===0||(Zn&1073741824)!==0&&(Le&261930)===0?(pt=!0,e.memoizedState=i):(e=Qm(),Ne.lanes|=e,yl|=e,t)}function Gh(e,t,i,u,o){var d=$.p;$.p=d!==0&&8>d?d:8;var x=T.T,S={};T.T=S,Dc(e,!1,t,i);try{var C=o(),L=T.S;if(L!==null&&L(S,C),C!==null&&typeof C=="object"&&typeof C.then=="function"){var F=P0(C,u);Ra(e,t,F,tn(e))}else Ra(e,t,u,tn(e))}catch(K){Ra(e,t,{then:function(){},status:"rejected",reason:K},tn())}finally{$.p=d,x!==null&&S.types!==null&&(x.types=S.types),T.T=x}}function i1(){}function jc(e,t,i,u){if(e.tag!==5)throw Error(r(476));var o=Xh(e).queue;Gh(e,o,t,ue,i===null?i1:function(){return Kh(e),i(u)})}function Xh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ue,baseState:ue,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:In,lastRenderedState:ue},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:In,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Kh(e){var t=Xh(e);t.next===null&&(t=e.alternate.memoizedState),Ra(e,t.next.queue,{},tn())}function zc(){return Et(Pa)}function Jh(){return dt().memoizedState}function $h(){return dt().memoizedState}function a1(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=tn();e=fl(i);var u=dl(t,e,i);u!==null&&(Zt(u,t,i),ja(u,t,i)),t={cache:rc()},e.payload=t;return}t=t.return}}function r1(e,t,i){var u=tn();i={lane:u,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},uu(e)?Wh(t,i):(i=Ks(e,t,i,u),i!==null&&(Zt(i,e,u),em(i,t,u)))}function Ph(e,t,i){var u=tn();Ra(e,t,i,u)}function Ra(e,t,i,u){var o={lane:u,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(uu(e))Wh(t,o);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=t.lastRenderedReducer,d!==null))try{var x=t.lastRenderedState,S=d(x,i);if(o.hasEagerState=!0,o.eagerState=S,Kt(S,x))return Vr(e,t,o,0),We===null&&qr(),!1}catch{}finally{}if(i=Ks(e,t,o,u),i!==null)return Zt(i,e,u),em(i,t,u),!0}return!1}function Dc(e,t,i,u){if(u={lane:2,revertLane:oo(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},uu(e)){if(t)throw Error(r(479))}else t=Ks(e,i,u,2),t!==null&&Zt(t,e,2)}function uu(e){var t=e.alternate;return e===Ne||t!==null&&t===Ne}function Wh(e,t){Ri=eu=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function em(e,t,i){if((i&4194048)!==0){var u=t.lanes;u&=e.pendingLanes,i|=u,t.lanes=i,ad(e,i)}}var La={readContext:Et,use:lu,useCallback:st,useContext:st,useEffect:st,useImperativeHandle:st,useLayoutEffect:st,useInsertionEffect:st,useMemo:st,useReducer:st,useRef:st,useState:st,useDebugValue:st,useDeferredValue:st,useTransition:st,useSyncExternalStore:st,useId:st,useHostTransitionStatus:st,useFormState:st,useActionState:st,useOptimistic:st,useMemoCache:st,useCacheRefresh:st};La.useEffectEvent=st;var tm={readContext:Et,use:lu,useCallback:function(e,t){return Ot().memoizedState=[e,t===void 0?null:t],e},useContext:Et,useEffect:Uh,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,au(4194308,4,Yh.bind(null,t,e),i)},useLayoutEffect:function(e,t){return au(4194308,4,e,t)},useInsertionEffect:function(e,t){au(4,2,e,t)},useMemo:function(e,t){var i=Ot();t=t===void 0?null:t;var u=e();if($l){Lt(!0);try{e()}finally{Lt(!1)}}return i.memoizedState=[u,t],u},useReducer:function(e,t,i){var u=Ot();if(i!==void 0){var o=i(t);if($l){Lt(!0);try{i(t)}finally{Lt(!1)}}}else o=t;return u.memoizedState=u.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},u.queue=e,e=e.dispatch=r1.bind(null,Ne,e),[u.memoizedState,e]},useRef:function(e){var t=Ot();return e={current:e},t.memoizedState=e},useState:function(e){e=Ec(e);var t=e.queue,i=Ph.bind(null,Ne,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:Nc,useDeferredValue:function(e,t){var i=Ot();return Tc(i,e,t)},useTransition:function(){var e=Ec(!1);return e=Gh.bind(null,Ne,e.queue,!0,!1),Ot().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var u=Ne,o=Ot();if(Ue){if(i===void 0)throw Error(r(407));i=i()}else{if(i=t(),We===null)throw Error(r(349));(Le&127)!==0||Sh(u,t,i)}o.memoizedState=i;var d={value:i,getSnapshot:t};return o.queue=d,Uh(_h.bind(null,u,d,e),[e]),u.flags|=2048,Bi(9,{destroy:void 0},wh.bind(null,u,d,i,t),null),i},useId:function(){var e=Ot(),t=We.identifierPrefix;if(Ue){var i=Cn,u=En;i=(u&~(1<<32-Pe(u)-1)).toString(32)+i,t="_"+t+"R_"+i,i=tu++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=W0++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:zc,useFormState:Mh,useActionState:Mh,useOptimistic:function(e){var t=Ot();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=Dc.bind(null,Ne,!0,i),i.dispatch=t,[e,t]},useMemoCache:Sc,useCacheRefresh:function(){return Ot().memoizedState=a1.bind(null,Ne)},useEffectEvent:function(e){var t=Ot(),i={impl:e};return t.memoizedState=i,function(){if((Ie&2)!==0)throw Error(r(440));return i.impl.apply(void 0,arguments)}}},Mc={readContext:Et,use:lu,useCallback:Ih,useContext:Et,useEffect:Ac,useImperativeHandle:Zh,useInsertionEffect:qh,useLayoutEffect:Vh,useMemo:Fh,useReducer:iu,useRef:Bh,useState:function(){return iu(In)},useDebugValue:Nc,useDeferredValue:function(e,t){var i=dt();return Qh(i,Ke.memoizedState,e,t)},useTransition:function(){var e=iu(In)[0],t=dt().memoizedState;return[typeof e=="boolean"?e:Oa(e),t]},useSyncExternalStore:kh,useId:Jh,useHostTransitionStatus:zc,useFormState:Oh,useActionState:Oh,useOptimistic:function(e,t){var i=dt();return Ah(i,Ke,e,t)},useMemoCache:Sc,useCacheRefresh:$h};Mc.useEffectEvent=Hh;var nm={readContext:Et,use:lu,useCallback:Ih,useContext:Et,useEffect:Ac,useImperativeHandle:Zh,useInsertionEffect:qh,useLayoutEffect:Vh,useMemo:Fh,useReducer:_c,useRef:Bh,useState:function(){return _c(In)},useDebugValue:Nc,useDeferredValue:function(e,t){var i=dt();return Ke===null?Tc(i,e,t):Qh(i,Ke.memoizedState,e,t)},useTransition:function(){var e=_c(In)[0],t=dt().memoizedState;return[typeof e=="boolean"?e:Oa(e),t]},useSyncExternalStore:kh,useId:Jh,useHostTransitionStatus:zc,useFormState:Lh,useActionState:Lh,useOptimistic:function(e,t){var i=dt();return Ke!==null?Ah(i,Ke,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:Sc,useCacheRefresh:$h};nm.useEffectEvent=Hh;function Oc(e,t,i,u){t=e.memoizedState,i=i(u,t),i=i==null?t:y({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var Rc={enqueueSetState:function(e,t,i){e=e._reactInternals;var u=tn(),o=fl(u);o.payload=t,i!=null&&(o.callback=i),t=dl(e,o,u),t!==null&&(Zt(t,e,u),ja(t,e,u))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var u=tn(),o=fl(u);o.tag=1,o.payload=t,i!=null&&(o.callback=i),t=dl(e,o,u),t!==null&&(Zt(t,e,u),ja(t,e,u))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=tn(),u=fl(i);u.tag=2,t!=null&&(u.callback=t),t=dl(e,u,i),t!==null&&(Zt(t,e,i),ja(t,e,i))}};function lm(e,t,i,u,o,d,x){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(u,d,x):t.prototype&&t.prototype.isPureReactComponent?!Sa(i,u)||!Sa(o,d):!0}function im(e,t,i,u){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(i,u),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(i,u),t.state!==e&&Rc.enqueueReplaceState(t,t.state,null)}function Pl(e,t){var i=t;if("ref"in t){i={};for(var u in t)u!=="ref"&&(i[u]=t[u])}if(e=e.defaultProps){i===t&&(i=y({},i));for(var o in e)i[o]===void 0&&(i[o]=e[o])}return i}function am(e){Hr(e)}function rm(e){console.error(e)}function um(e){Hr(e)}function su(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(u){setTimeout(function(){throw u})}}function sm(e,t,i){try{var u=e.onCaughtError;u(i.value,{componentStack:i.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(o){setTimeout(function(){throw o})}}function Lc(e,t,i){return i=fl(i),i.tag=3,i.payload={element:null},i.callback=function(){su(e,t)},i}function cm(e){return e=fl(e),e.tag=3,e}function om(e,t,i,u){var o=i.type.getDerivedStateFromError;if(typeof o=="function"){var d=u.value;e.payload=function(){return o(d)},e.callback=function(){sm(t,i,u)}}var x=i.stateNode;x!==null&&typeof x.componentDidCatch=="function"&&(e.callback=function(){sm(t,i,u),typeof o!="function"&&(xl===null?xl=new Set([this]):xl.add(this));var S=u.stack;this.componentDidCatch(u.value,{componentStack:S!==null?S:""})})}function u1(e,t,i,u,o){if(i.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(t=i.alternate,t!==null&&Ti(t,i,o,!0),i=$t.current,i!==null){switch(i.tag){case 31:case 13:return pn===null?vu():i.alternate===null&&ct===0&&(ct=3),i.flags&=-257,i.flags|=65536,i.lanes=o,u===Kr?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([u]):t.add(u),uo(e,u,o)),!1;case 22:return i.flags|=65536,u===Kr?i.flags|=16384:(t=i.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([u])},i.updateQueue=t):(i=t.retryQueue,i===null?t.retryQueue=new Set([u]):i.add(u)),uo(e,u,o)),!1}throw Error(r(435,i.tag))}return uo(e,u,o),vu(),!1}if(Ue)return t=$t.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=o,u!==tc&&(e=Error(r(422),{cause:u}),Ea(fn(e,i)))):(u!==tc&&(t=Error(r(423),{cause:u}),Ea(fn(t,i))),e=e.current.alternate,e.flags|=65536,o&=-o,e.lanes|=o,u=fn(u,i),o=Lc(e.stateNode,u,o),dc(e,o),ct!==4&&(ct=2)),!1;var d=Error(r(520),{cause:u});if(d=fn(d,i),Ia===null?Ia=[d]:Ia.push(d),ct!==4&&(ct=2),t===null)return!0;u=fn(u,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=o&-o,i.lanes|=e,e=Lc(i.stateNode,u,e),dc(i,e),!1;case 1:if(t=i.type,d=i.stateNode,(i.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(xl===null||!xl.has(d))))return i.flags|=65536,o&=-o,i.lanes|=o,o=cm(o),om(o,e,i,u),dc(i,o),!1}i=i.return}while(i!==null);return!1}var Bc=Error(r(461)),pt=!1;function Ct(e,t,i,u){t.child=e===null?mh(t,null,i,u):Jl(t,e.child,i,u)}function fm(e,t,i,u,o){i=i.render;var d=t.ref;if("ref"in u){var x={};for(var S in u)S!=="ref"&&(x[S]=u[S])}else x=u;return Ql(t),u=xc(e,t,i,x,d,o),S=bc(),e!==null&&!pt?(vc(e,t,o),Fn(e,t,o)):(Ue&&S&&Ws(t),t.flags|=1,Ct(e,t,u,o),t.child)}function dm(e,t,i,u,o){if(e===null){var d=i.type;return typeof d=="function"&&!Js(d)&&d.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=d,hm(e,t,d,u,o)):(e=Zr(i.type,null,u,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(d=e.child,!Fc(e,o)){var x=d.memoizedProps;if(i=i.compare,i=i!==null?i:Sa,i(x,u)&&e.ref===t.ref)return Fn(e,t,o)}return t.flags|=1,e=Hn(d,u),e.ref=t.ref,e.return=t,t.child=e}function hm(e,t,i,u,o){if(e!==null){var d=e.memoizedProps;if(Sa(d,u)&&e.ref===t.ref)if(pt=!1,t.pendingProps=u=d,Fc(e,o))(e.flags&131072)!==0&&(pt=!0);else return t.lanes=e.lanes,Fn(e,t,o)}return Uc(e,t,i,u,o)}function mm(e,t,i,u){var o=u.children,d=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.mode==="hidden"){if((t.flags&128)!==0){if(d=d!==null?d.baseLanes|i:i,e!==null){for(u=t.child=e.child,o=0;u!==null;)o=o|u.lanes|u.childLanes,u=u.sibling;u=o&~d}else u=0,t.child=null;return pm(e,t,d,i,u)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Gr(t,d!==null?d.cachePool:null),d!==null?yh(t,d):mc(),xh(t);else return u=t.lanes=536870912,pm(e,t,d!==null?d.baseLanes|i:i,i,u)}else d!==null?(Gr(t,d.cachePool),yh(t,d),ml(),t.memoizedState=null):(e!==null&&Gr(t,null),mc(),ml());return Ct(e,t,o,i),t.child}function Ba(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function pm(e,t,i,u,o){var d=sc();return d=d===null?null:{parent:ht._currentValue,pool:d},t.memoizedState={baseLanes:i,cachePool:d},e!==null&&Gr(t,null),mc(),xh(t),e!==null&&Ti(e,t,u,!0),t.childLanes=o,null}function cu(e,t){return t=fu({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function gm(e,t,i){return Jl(t,e.child,null,i),e=cu(t,t.pendingProps),e.flags|=2,Pt(t),t.memoizedState=null,e}function s1(e,t,i){var u=t.pendingProps,o=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ue){if(u.mode==="hidden")return e=cu(t,u),t.lanes=536870912,Ba(null,e);if(gc(t),(e=nt)?(e=Np(e,mn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:rl!==null?{id:En,overflow:Cn}:null,retryLane:536870912,hydrationErrors:null},i=Wd(e),i.return=t,t.child=i,_t=t,nt=null)):e=null,e===null)throw sl(t);return t.lanes=536870912,null}return cu(t,u)}var d=e.memoizedState;if(d!==null){var x=d.dehydrated;if(gc(t),o)if(t.flags&256)t.flags&=-257,t=gm(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if(pt||Ti(e,t,i,!1),o=(i&e.childLanes)!==0,pt||o){if(u=We,u!==null&&(x=rd(u,i),x!==0&&x!==d.retryLane))throw d.retryLane=x,Yl(e,x),Zt(u,e,x),Bc;vu(),t=gm(e,t,i)}else e=d.treeContext,nt=gn(x.nextSibling),_t=t,Ue=!0,ul=null,mn=!1,e!==null&&nh(t,e),t=cu(t,u),t.flags|=4096;return t}return e=Hn(e.child,{mode:u.mode,children:u.children}),e.ref=t.ref,t.child=e,e.return=t,e}function ou(e,t){var i=t.ref;if(i===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(r(284));(e===null||e.ref!==i)&&(t.flags|=4194816)}}function Uc(e,t,i,u,o){return Ql(t),i=xc(e,t,i,u,void 0,o),u=bc(),e!==null&&!pt?(vc(e,t,o),Fn(e,t,o)):(Ue&&u&&Ws(t),t.flags|=1,Ct(e,t,i,o),t.child)}function ym(e,t,i,u,o,d){return Ql(t),t.updateQueue=null,i=vh(t,u,i,o),bh(e),u=bc(),e!==null&&!pt?(vc(e,t,d),Fn(e,t,d)):(Ue&&u&&Ws(t),t.flags|=1,Ct(e,t,i,d),t.child)}function xm(e,t,i,u,o){if(Ql(t),t.stateNode===null){var d=Ei,x=i.contextType;typeof x=="object"&&x!==null&&(d=Et(x)),d=new i(u,d),t.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=Rc,t.stateNode=d,d._reactInternals=t,d=t.stateNode,d.props=u,d.state=t.memoizedState,d.refs={},oc(t),x=i.contextType,d.context=typeof x=="object"&&x!==null?Et(x):Ei,d.state=t.memoizedState,x=i.getDerivedStateFromProps,typeof x=="function"&&(Oc(t,i,x,u),d.state=t.memoizedState),typeof i.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&&Rc.enqueueReplaceState(d,d.state,null),Da(t,u,d,o),za(),d.state=t.memoizedState),typeof d.componentDidMount=="function"&&(t.flags|=4194308),u=!0}else if(e===null){d=t.stateNode;var S=t.memoizedProps,C=Pl(i,S);d.props=C;var L=d.context,F=i.contextType;x=Ei,typeof F=="object"&&F!==null&&(x=Et(F));var K=i.getDerivedStateFromProps;F=typeof K=="function"||typeof d.getSnapshotBeforeUpdate=="function",S=t.pendingProps!==S,F||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(S||L!==x)&&im(t,d,u,x),ol=!1;var B=t.memoizedState;d.state=B,Da(t,u,d,o),za(),L=t.memoizedState,S||B!==L||ol?(typeof K=="function"&&(Oc(t,i,K,u),L=t.memoizedState),(C=ol||lm(t,i,C,u,B,L,x))?(F||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"&&(t.flags|=4194308)):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=u,t.memoizedState=L),d.props=u,d.state=L,d.context=x,u=C):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),u=!1)}else{d=t.stateNode,fc(e,t),x=t.memoizedProps,F=Pl(i,x),d.props=F,K=t.pendingProps,B=d.context,L=i.contextType,C=Ei,typeof L=="object"&&L!==null&&(C=Et(L)),S=i.getDerivedStateFromProps,(L=typeof S=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(x!==K||B!==C)&&im(t,d,u,C),ol=!1,B=t.memoizedState,d.state=B,Da(t,u,d,o),za();var V=t.memoizedState;x!==K||B!==V||ol||e!==null&&e.dependencies!==null&&Fr(e.dependencies)?(typeof S=="function"&&(Oc(t,i,S,u),V=t.memoizedState),(F=ol||lm(t,i,F,u,B,V,C)||e!==null&&e.dependencies!==null&&Fr(e.dependencies))?(L||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"&&(t.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof d.componentDidUpdate!="function"||x===e.memoizedProps&&B===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&B===e.memoizedState||(t.flags|=1024),t.memoizedProps=u,t.memoizedState=V),d.props=u,d.state=V,d.context=C,u=F):(typeof d.componentDidUpdate!="function"||x===e.memoizedProps&&B===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&B===e.memoizedState||(t.flags|=1024),u=!1)}return d=u,ou(e,t),u=(t.flags&128)!==0,d||u?(d=t.stateNode,i=u&&typeof i.getDerivedStateFromError!="function"?null:d.render(),t.flags|=1,e!==null&&u?(t.child=Jl(t,e.child,null,o),t.child=Jl(t,null,i,o)):Ct(e,t,i,o),t.memoizedState=d.state,e=t.child):e=Fn(e,t,o),e}function bm(e,t,i,u){return Il(),t.flags|=256,Ct(e,t,i,u),t.child}var Hc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function qc(e){return{baseLanes:e,cachePool:sh()}}function Vc(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=en),e}function vm(e,t,i){var u=t.pendingProps,o=!1,d=(t.flags&128)!==0,x;if((x=d)||(x=e!==null&&e.memoizedState===null?!1:(ft.current&2)!==0),x&&(o=!0,t.flags&=-129),x=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ue){if(o?hl(t):ml(),(e=nt)?(e=Np(e,mn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:rl!==null?{id:En,overflow:Cn}:null,retryLane:536870912,hydrationErrors:null},i=Wd(e),i.return=t,t.child=i,_t=t,nt=null)):e=null,e===null)throw sl(t);return _o(e)?t.lanes=32:t.lanes=536870912,null}var S=u.children;return u=u.fallback,o?(ml(),o=t.mode,S=fu({mode:"hidden",children:S},o),u=Zl(u,o,i,null),S.return=t,u.return=t,S.sibling=u,t.child=S,u=t.child,u.memoizedState=qc(i),u.childLanes=Vc(e,x,i),t.memoizedState=Hc,Ba(null,u)):(hl(t),Yc(t,S))}var C=e.memoizedState;if(C!==null&&(S=C.dehydrated,S!==null)){if(d)t.flags&256?(hl(t),t.flags&=-257,t=Zc(e,t,i)):t.memoizedState!==null?(ml(),t.child=e.child,t.flags|=128,t=null):(ml(),S=u.fallback,o=t.mode,u=fu({mode:"visible",children:u.children},o),S=Zl(S,o,i,null),S.flags|=2,u.return=t,S.return=t,u.sibling=S,t.child=u,Jl(t,e.child,null,i),u=t.child,u.memoizedState=qc(i),u.childLanes=Vc(e,x,i),t.memoizedState=Hc,t=Ba(null,u));else if(hl(t),_o(S)){if(x=S.nextSibling&&S.nextSibling.dataset,x)var L=x.dgst;x=L,u=Error(r(419)),u.stack="",u.digest=x,Ea({value:u,source:null,stack:null}),t=Zc(e,t,i)}else if(pt||Ti(e,t,i,!1),x=(i&e.childLanes)!==0,pt||x){if(x=We,x!==null&&(u=rd(x,i),u!==0&&u!==C.retryLane))throw C.retryLane=u,Yl(e,u),Zt(x,e,u),Bc;wo(S)||vu(),t=Zc(e,t,i)}else wo(S)?(t.flags|=192,t.child=e.child,t=null):(e=C.treeContext,nt=gn(S.nextSibling),_t=t,Ue=!0,ul=null,mn=!1,e!==null&&nh(t,e),t=Yc(t,u.children),t.flags|=4096);return t}return o?(ml(),S=u.fallback,o=t.mode,C=e.child,L=C.sibling,u=Hn(C,{mode:"hidden",children:u.children}),u.subtreeFlags=C.subtreeFlags&65011712,L!==null?S=Hn(L,S):(S=Zl(S,o,i,null),S.flags|=2),S.return=t,u.return=t,u.sibling=S,t.child=u,Ba(null,u),u=t.child,S=e.child.memoizedState,S===null?S=qc(i):(o=S.cachePool,o!==null?(C=ht._currentValue,o=o.parent!==C?{parent:C,pool:C}:o):o=sh(),S={baseLanes:S.baseLanes|i,cachePool:o}),u.memoizedState=S,u.childLanes=Vc(e,x,i),t.memoizedState=Hc,Ba(e.child,u)):(hl(t),i=e.child,e=i.sibling,i=Hn(i,{mode:"visible",children:u.children}),i.return=t,i.sibling=null,e!==null&&(x=t.deletions,x===null?(t.deletions=[e],t.flags|=16):x.push(e)),t.child=i,t.memoizedState=null,i)}function Yc(e,t){return t=fu({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function fu(e,t){return e=Jt(22,e,null,t),e.lanes=0,e}function Zc(e,t,i){return Jl(t,e.child,null,i),e=Yc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function km(e,t,i){e.lanes|=t;var u=e.alternate;u!==null&&(u.lanes|=t),ic(e.return,t,i)}function Ic(e,t,i,u,o,d){var x=e.memoizedState;x===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:u,tail:i,tailMode:o,treeForkCount:d}:(x.isBackwards=t,x.rendering=null,x.renderingStartTime=0,x.last=u,x.tail=i,x.tailMode=o,x.treeForkCount=d)}function Sm(e,t,i){var u=t.pendingProps,o=u.revealOrder,d=u.tail;u=u.children;var x=ft.current,S=(x&2)!==0;if(S?(x=x&1|2,t.flags|=128):x&=1,w(ft,x),Ct(e,t,u,i),u=Ue?_a:0,!S&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&km(e,i,t);else if(e.tag===19)km(e,i,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(o){case"forwards":for(i=t.child,o=null;i!==null;)e=i.alternate,e!==null&&Wr(e)===null&&(o=i),i=i.sibling;i=o,i===null?(o=t.child,t.child=null):(o=i.sibling,i.sibling=null),Ic(t,!1,o,i,d,u);break;case"backwards":case"unstable_legacy-backwards":for(i=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Wr(e)===null){t.child=o;break}e=o.sibling,o.sibling=i,i=o,o=e}Ic(t,!0,i,null,d,u);break;case"together":Ic(t,!1,null,null,void 0,u);break;default:t.memoizedState=null}return t.child}function Fn(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),yl|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(Ti(e,t,i,!1),(i&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,i=Hn(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=Hn(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function Fc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Fr(e)))}function c1(e,t,i){switch(t.tag){case 3:at(t,t.stateNode.containerInfo),cl(t,ht,e.memoizedState.cache),Il();break;case 27:case 5:un(t);break;case 4:at(t,t.stateNode.containerInfo);break;case 10:cl(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,gc(t),null;break;case 13:var u=t.memoizedState;if(u!==null)return u.dehydrated!==null?(hl(t),t.flags|=128,null):(i&t.child.childLanes)!==0?vm(e,t,i):(hl(t),e=Fn(e,t,i),e!==null?e.sibling:null);hl(t);break;case 19:var o=(e.flags&128)!==0;if(u=(i&t.childLanes)!==0,u||(Ti(e,t,i,!1),u=(i&t.childLanes)!==0),o){if(u)return Sm(e,t,i);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),w(ft,ft.current),u)break;return null;case 22:return t.lanes=0,mm(e,t,i,t.pendingProps);case 24:cl(t,ht,e.memoizedState.cache)}return Fn(e,t,i)}function wm(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)pt=!0;else{if(!Fc(e,i)&&(t.flags&128)===0)return pt=!1,c1(e,t,i);pt=(e.flags&131072)!==0}else pt=!1,Ue&&(t.flags&1048576)!==0&&th(t,_a,t.index);switch(t.lanes=0,t.tag){case 16:e:{var u=t.pendingProps;if(e=Xl(t.elementType),t.type=e,typeof e=="function")Js(e)?(u=Pl(e,u),t.tag=1,t=xm(null,t,e,u,i)):(t.tag=0,t=Uc(null,t,e,u,i));else{if(e!=null){var o=e.$$typeof;if(o===le){t.tag=11,t=fm(null,t,e,u,i);break e}else if(o===P){t.tag=14,t=dm(null,t,e,u,i);break e}}throw t=re(e)||e,Error(r(306,t,""))}}return t;case 0:return Uc(e,t,t.type,t.pendingProps,i);case 1:return u=t.type,o=Pl(u,t.pendingProps),xm(e,t,u,o,i);case 3:e:{if(at(t,t.stateNode.containerInfo),e===null)throw Error(r(387));u=t.pendingProps;var d=t.memoizedState;o=d.element,fc(e,t),Da(t,u,null,i);var x=t.memoizedState;if(u=x.cache,cl(t,ht,u),u!==d.cache&&ac(t,[ht],i,!0),za(),u=x.element,d.isDehydrated)if(d={element:u,isDehydrated:!1,cache:x.cache},t.updateQueue.baseState=d,t.memoizedState=d,t.flags&256){t=bm(e,t,u,i);break e}else if(u!==o){o=fn(Error(r(424)),t),Ea(o),t=bm(e,t,u,i);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(nt=gn(e.firstChild),_t=t,Ue=!0,ul=null,mn=!0,i=mh(t,null,u,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(Il(),u===o){t=Fn(e,t,i);break e}Ct(e,t,u,i)}t=t.child}return t;case 26:return ou(e,t),e===null?(i=Op(t.type,null,t.pendingProps,null))?t.memoizedState=i:Ue||(i=t.type,e=t.pendingProps,u=Au(ye.current).createElement(i),u[wt]=t,u[Bt]=e,At(u,i,e),kt(u),t.stateNode=u):t.memoizedState=Op(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return un(t),e===null&&Ue&&(u=t.stateNode=zp(t.type,t.pendingProps,ye.current),_t=t,mn=!0,o=nt,Sl(t.type)?(Eo=o,nt=gn(u.firstChild)):nt=o),Ct(e,t,t.pendingProps.children,i),ou(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ue&&((o=u=nt)&&(u=H1(u,t.type,t.pendingProps,mn),u!==null?(t.stateNode=u,_t=t,nt=gn(u.firstChild),mn=!1,o=!0):o=!1),o||sl(t)),un(t),o=t.type,d=t.pendingProps,x=e!==null?e.memoizedProps:null,u=d.children,vo(o,d)?u=null:x!==null&&vo(o,x)&&(t.flags|=32),t.memoizedState!==null&&(o=xc(e,t,e1,null,null,i),Pa._currentValue=o),ou(e,t),Ct(e,t,u,i),t.child;case 6:return e===null&&Ue&&((e=i=nt)&&(i=q1(i,t.pendingProps,mn),i!==null?(t.stateNode=i,_t=t,nt=null,e=!0):e=!1),e||sl(t)),null;case 13:return vm(e,t,i);case 4:return at(t,t.stateNode.containerInfo),u=t.pendingProps,e===null?t.child=Jl(t,null,u,i):Ct(e,t,u,i),t.child;case 11:return fm(e,t,t.type,t.pendingProps,i);case 7:return Ct(e,t,t.pendingProps,i),t.child;case 8:return Ct(e,t,t.pendingProps.children,i),t.child;case 12:return Ct(e,t,t.pendingProps.children,i),t.child;case 10:return u=t.pendingProps,cl(t,t.type,u.value),Ct(e,t,u.children,i),t.child;case 9:return o=t.type._context,u=t.pendingProps.children,Ql(t),o=Et(o),u=u(o),t.flags|=1,Ct(e,t,u,i),t.child;case 14:return dm(e,t,t.type,t.pendingProps,i);case 15:return hm(e,t,t.type,t.pendingProps,i);case 19:return Sm(e,t,i);case 31:return s1(e,t,i);case 22:return mm(e,t,i,t.pendingProps);case 24:return Ql(t),u=Et(ht),e===null?(o=sc(),o===null&&(o=We,d=rc(),o.pooledCache=d,d.refCount++,d!==null&&(o.pooledCacheLanes|=i),o=d),t.memoizedState={parent:u,cache:o},oc(t),cl(t,ht,o)):((e.lanes&i)!==0&&(fc(e,t),Da(t,null,null,i),za()),o=e.memoizedState,d=t.memoizedState,o.parent!==u?(o={parent:u,cache:u},t.memoizedState=o,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=o),cl(t,ht,u)):(u=d.cache,cl(t,ht,u),u!==o.cache&&ac(t,[ht],i,!0))),Ct(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function Qn(e){e.flags|=4}function Qc(e,t,i,u,o){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(o&335544128)===o)if(e.stateNode.complete)e.flags|=8192;else if(Jm())e.flags|=8192;else throw Kl=Kr,cc}else e.flags&=-16777217}function _m(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Hp(t))if(Jm())e.flags|=8192;else throw Kl=Kr,cc}function du(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?ld():536870912,e.lanes|=t,Vi|=t)}function Ua(e,t){if(!Ue)switch(e.tailMode){case"hidden":t=e.tail;for(var i=null;t!==null;)t.alternate!==null&&(i=t),t=t.sibling;i===null?e.tail=null:i.sibling=null;break;case"collapsed":i=e.tail;for(var u=null;i!==null;)i.alternate!==null&&(u=i),i=i.sibling;u===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:u.sibling=null}}function lt(e){var t=e.alternate!==null&&e.alternate.child===e.child,i=0,u=0;if(t)for(var o=e.child;o!==null;)i|=o.lanes|o.childLanes,u|=o.subtreeFlags&65011712,u|=o.flags&65011712,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)i|=o.lanes|o.childLanes,u|=o.subtreeFlags,u|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=u,e.childLanes=i,t}function o1(e,t,i){var u=t.pendingProps;switch(ec(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return lt(t),null;case 1:return lt(t),null;case 3:return i=t.stateNode,u=null,e!==null&&(u=e.memoizedState.cache),t.memoizedState.cache!==u&&(t.flags|=2048),Yn(ht),Xe(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Ni(t)?Qn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,nc())),lt(t),null;case 26:var o=t.type,d=t.memoizedState;return e===null?(Qn(t),d!==null?(lt(t),_m(t,d)):(lt(t),Qc(t,o,null,u,i))):d?d!==e.memoizedState?(Qn(t),lt(t),_m(t,d)):(lt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==u&&Qn(t),lt(t),Qc(t,o,e,u,i)),null;case 27:if(Mn(t),i=ye.current,o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==u&&Qn(t);else{if(!u){if(t.stateNode===null)throw Error(r(166));return lt(t),null}e=ae.current,Ni(t)?lh(t):(e=zp(o,u,i),t.stateNode=e,Qn(t))}return lt(t),null;case 5:if(Mn(t),o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==u&&Qn(t);else{if(!u){if(t.stateNode===null)throw Error(r(166));return lt(t),null}if(d=ae.current,Ni(t))lh(t);else{var x=Au(ye.current);switch(d){case 1:d=x.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:d=x.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":d=x.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":d=x.createElementNS("http://www.w3.org/1998/Math/MathML",o);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(o,{is:u.is}):x.createElement(o)}}d[wt]=t,d[Bt]=u;e:for(x=t.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===t)break e;for(;x.sibling===null;){if(x.return===null||x.return===t)break e;x=x.return}x.sibling.return=x.return,x=x.sibling}t.stateNode=d;e:switch(At(d,o,u),o){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&Qn(t)}}return lt(t),Qc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==u&&Qn(t);else{if(typeof u!="string"&&t.stateNode===null)throw Error(r(166));if(e=ye.current,Ni(t)){if(e=t.stateNode,i=t.memoizedProps,u=null,o=_t,o!==null)switch(o.tag){case 27:case 5:u=o.memoizedProps}e[wt]=t,e=!!(e.nodeValue===i||u!==null&&u.suppressHydrationWarning===!0||vp(e.nodeValue,i)),e||sl(t,!0)}else e=Au(e).createTextNode(u),e[wt]=t,t.stateNode=e}return lt(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(u=Ni(t),i!==null){if(e===null){if(!u)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[wt]=t}else Il(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;lt(t),e=!1}else i=nc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(Pt(t),t):(Pt(t),null);if((t.flags&128)!==0)throw Error(r(558))}return lt(t),null;case 13:if(u=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(o=Ni(t),u!==null&&u.dehydrated!==null){if(e===null){if(!o)throw Error(r(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));o[wt]=t}else Il(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;lt(t),o=!1}else o=nc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o)return t.flags&256?(Pt(t),t):(Pt(t),null)}return Pt(t),(t.flags&128)!==0?(t.lanes=i,t):(i=u!==null,e=e!==null&&e.memoizedState!==null,i&&(u=t.child,o=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(o=u.alternate.memoizedState.cachePool.pool),d=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(d=u.memoizedState.cachePool.pool),d!==o&&(u.flags|=2048)),i!==e&&i&&(t.child.flags|=8192),du(t,t.updateQueue),lt(t),null);case 4:return Xe(),e===null&&po(t.stateNode.containerInfo),lt(t),null;case 10:return Yn(t.type),lt(t),null;case 19:if(I(ft),u=t.memoizedState,u===null)return lt(t),null;if(o=(t.flags&128)!==0,d=u.rendering,d===null)if(o)Ua(u,!1);else{if(ct!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(d=Wr(e),d!==null){for(t.flags|=128,Ua(u,!1),e=d.updateQueue,t.updateQueue=e,du(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)Pd(i,e),i=i.sibling;return w(ft,ft.current&1|2),Ue&&qn(t,u.treeForkCount),t.child}e=e.sibling}u.tail!==null&&Dt()>yu&&(t.flags|=128,o=!0,Ua(u,!1),t.lanes=4194304)}else{if(!o)if(e=Wr(d),e!==null){if(t.flags|=128,o=!0,e=e.updateQueue,t.updateQueue=e,du(t,e),Ua(u,!0),u.tail===null&&u.tailMode==="hidden"&&!d.alternate&&!Ue)return lt(t),null}else 2*Dt()-u.renderingStartTime>yu&&i!==536870912&&(t.flags|=128,o=!0,Ua(u,!1),t.lanes=4194304);u.isBackwards?(d.sibling=t.child,t.child=d):(e=u.last,e!==null?e.sibling=d:t.child=d,u.last=d)}return u.tail!==null?(e=u.tail,u.rendering=e,u.tail=e.sibling,u.renderingStartTime=Dt(),e.sibling=null,i=ft.current,w(ft,o?i&1|2:i&1),Ue&&qn(t,u.treeForkCount),e):(lt(t),null);case 22:case 23:return Pt(t),pc(),u=t.memoizedState!==null,e!==null?e.memoizedState!==null!==u&&(t.flags|=8192):u&&(t.flags|=8192),u?(i&536870912)!==0&&(t.flags&128)===0&&(lt(t),t.subtreeFlags&6&&(t.flags|=8192)):lt(t),i=t.updateQueue,i!==null&&du(t,i.retryQueue),i=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),u=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(u=t.memoizedState.cachePool.pool),u!==i&&(t.flags|=2048),e!==null&&I(Gl),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),Yn(ht),lt(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function f1(e,t){switch(ec(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Yn(ht),Xe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Mn(t),null;case 31:if(t.memoizedState!==null){if(Pt(t),t.alternate===null)throw Error(r(340));Il()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Pt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));Il()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return I(ft),null;case 4:return Xe(),null;case 10:return Yn(t.type),null;case 22:case 23:return Pt(t),pc(),e!==null&&I(Gl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Yn(ht),null;case 25:return null;default:return null}}function Em(e,t){switch(ec(t),t.tag){case 3:Yn(ht),Xe();break;case 26:case 27:case 5:Mn(t);break;case 4:Xe();break;case 31:t.memoizedState!==null&&Pt(t);break;case 13:Pt(t);break;case 19:I(ft);break;case 10:Yn(t.type);break;case 22:case 23:Pt(t),pc(),e!==null&&I(Gl);break;case 24:Yn(ht)}}function Ha(e,t){try{var i=t.updateQueue,u=i!==null?i.lastEffect:null;if(u!==null){var o=u.next;i=o;do{if((i.tag&e)===e){u=void 0;var d=i.create,x=i.inst;u=d(),x.destroy=u}i=i.next}while(i!==o)}}catch(S){Ge(t,t.return,S)}}function pl(e,t,i){try{var u=t.updateQueue,o=u!==null?u.lastEffect:null;if(o!==null){var d=o.next;u=d;do{if((u.tag&e)===e){var x=u.inst,S=x.destroy;if(S!==void 0){x.destroy=void 0,o=t;var C=i,L=S;try{L()}catch(F){Ge(o,C,F)}}}u=u.next}while(u!==d)}}catch(F){Ge(t,t.return,F)}}function Cm(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{gh(t,i)}catch(u){Ge(e,e.return,u)}}}function Am(e,t,i){i.props=Pl(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(u){Ge(e,t,u)}}function qa(e,t){try{var i=e.ref;if(i!==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 i=="function"?e.refCleanup=i(u):i.current=u}}catch(o){Ge(e,t,o)}}function An(e,t){var i=e.ref,u=e.refCleanup;if(i!==null)if(typeof u=="function")try{u()}catch(o){Ge(e,t,o)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(o){Ge(e,t,o)}else i.current=null}function Nm(e){var t=e.type,i=e.memoizedProps,u=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":i.autoFocus&&u.focus();break e;case"img":i.src?u.src=i.src:i.srcSet&&(u.srcset=i.srcSet)}}catch(o){Ge(e,e.return,o)}}function Gc(e,t,i){try{var u=e.stateNode;M1(u,e.type,i,t),u[Bt]=t}catch(o){Ge(e,e.return,o)}}function Tm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Sl(e.type)||e.tag===4}function Xc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Tm(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&&Sl(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 Kc(e,t,i){var u=e.tag;if(u===5||u===6)e=e.stateNode,t?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(e,t):(t=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,t.appendChild(e),i=i._reactRootContainer,i!=null||t.onclick!==null||(t.onclick=Bn));else if(u!==4&&(u===27&&Sl(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(Kc(e,t,i),e=e.sibling;e!==null;)Kc(e,t,i),e=e.sibling}function hu(e,t,i){var u=e.tag;if(u===5||u===6)e=e.stateNode,t?i.insertBefore(e,t):i.appendChild(e);else if(u!==4&&(u===27&&Sl(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(hu(e,t,i),e=e.sibling;e!==null;)hu(e,t,i),e=e.sibling}function jm(e){var t=e.stateNode,i=e.memoizedProps;try{for(var u=e.type,o=t.attributes;o.length;)t.removeAttributeNode(o[0]);At(t,u,i),t[wt]=e,t[Bt]=i}catch(d){Ge(e,e.return,d)}}var Gn=!1,gt=!1,Jc=!1,zm=typeof WeakSet=="function"?WeakSet:Set,St=null;function d1(e,t){if(e=e.containerInfo,xo=Ou,e=Zd(e),Zs(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var u=i.getSelection&&i.getSelection();if(u&&u.rangeCount!==0){i=u.anchorNode;var o=u.anchorOffset,d=u.focusNode;u=u.focusOffset;try{i.nodeType,d.nodeType}catch{i=null;break e}var x=0,S=-1,C=-1,L=0,F=0,K=e,B=null;t:for(;;){for(var V;K!==i||o!==0&&K.nodeType!==3||(S=x+o),K!==d||u!==0&&K.nodeType!==3||(C=x+u),K.nodeType===3&&(x+=K.nodeValue.length),(V=K.firstChild)!==null;)B=K,K=V;for(;;){if(K===e)break t;if(B===i&&++L===o&&(S=x),B===d&&++F===u&&(C=x),(V=K.nextSibling)!==null)break;K=B,B=K.parentNode}K=V}i=S===-1||C===-1?null:{start:S,end:C}}else i=null}i=i||{start:0,end:0}}else i=null;for(bo={focusedElem:e,selectionRange:i},Ou=!1,St=t;St!==null;)if(t=St,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,St=e;else for(;St!==null;){switch(t=St,d=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(i=0;i<e.length;i++)o=e[i],o.ref.impl=o.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&d!==null){e=void 0,i=t,o=d.memoizedProps,d=d.memoizedState,u=i.stateNode;try{var oe=Pl(i.type,o);e=u.getSnapshotBeforeUpdate(oe,d),u.__reactInternalSnapshotBeforeUpdate=e}catch(ve){Ge(i,i.return,ve)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,i=e.nodeType,i===9)So(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":So(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=t.sibling,e!==null){e.return=t.return,St=e;break}St=t.return}}function Dm(e,t,i){var u=i.flags;switch(i.tag){case 0:case 11:case 15:Kn(e,i),u&4&&Ha(5,i);break;case 1:if(Kn(e,i),u&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(x){Ge(i,i.return,x)}else{var o=Pl(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(o,t,e.__reactInternalSnapshotBeforeUpdate)}catch(x){Ge(i,i.return,x)}}u&64&&Cm(i),u&512&&qa(i,i.return);break;case 3:if(Kn(e,i),u&64&&(e=i.updateQueue,e!==null)){if(t=null,i.child!==null)switch(i.child.tag){case 27:case 5:t=i.child.stateNode;break;case 1:t=i.child.stateNode}try{gh(e,t)}catch(x){Ge(i,i.return,x)}}break;case 27:t===null&&u&4&&jm(i);case 26:case 5:Kn(e,i),t===null&&u&4&&Nm(i),u&512&&qa(i,i.return);break;case 12:Kn(e,i);break;case 31:Kn(e,i),u&4&&Rm(e,i);break;case 13:Kn(e,i),u&4&&Lm(e,i),u&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=k1.bind(null,i),V1(e,i))));break;case 22:if(u=i.memoizedState!==null||Gn,!u){t=t!==null&&t.memoizedState!==null||gt,o=Gn;var d=gt;Gn=u,(gt=t)&&!d?Jn(e,i,(i.subtreeFlags&8772)!==0):Kn(e,i),Gn=o,gt=d}break;case 30:break;default:Kn(e,i)}}function Mm(e){var t=e.alternate;t!==null&&(e.alternate=null,Mm(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Cs(t)),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 rt=null,Ht=!1;function Xn(e,t,i){for(i=i.child;i!==null;)Om(e,t,i),i=i.sibling}function Om(e,t,i){if(bt&&typeof bt.onCommitFiberUnmount=="function")try{bt.onCommitFiberUnmount(Mt,i)}catch{}switch(i.tag){case 26:gt||An(i,t),Xn(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:gt||An(i,t);var u=rt,o=Ht;Sl(i.type)&&(rt=i.stateNode,Ht=!1),Xn(e,t,i),Ka(i.stateNode),rt=u,Ht=o;break;case 5:gt||An(i,t);case 6:if(u=rt,o=Ht,rt=null,Xn(e,t,i),rt=u,Ht=o,rt!==null)if(Ht)try{(rt.nodeType===9?rt.body:rt.nodeName==="HTML"?rt.ownerDocument.body:rt).removeChild(i.stateNode)}catch(d){Ge(i,t,d)}else try{rt.removeChild(i.stateNode)}catch(d){Ge(i,t,d)}break;case 18:rt!==null&&(Ht?(e=rt,Cp(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),Ki(e)):Cp(rt,i.stateNode));break;case 4:u=rt,o=Ht,rt=i.stateNode.containerInfo,Ht=!0,Xn(e,t,i),rt=u,Ht=o;break;case 0:case 11:case 14:case 15:pl(2,i,t),gt||pl(4,i,t),Xn(e,t,i);break;case 1:gt||(An(i,t),u=i.stateNode,typeof u.componentWillUnmount=="function"&&Am(i,t,u)),Xn(e,t,i);break;case 21:Xn(e,t,i);break;case 22:gt=(u=gt)||i.memoizedState!==null,Xn(e,t,i),gt=u;break;default:Xn(e,t,i)}}function Rm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Ki(e)}catch(i){Ge(t,t.return,i)}}}function Lm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ki(e)}catch(i){Ge(t,t.return,i)}}function h1(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new zm),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new zm),t;default:throw Error(r(435,e.tag))}}function mu(e,t){var i=h1(e);t.forEach(function(u){if(!i.has(u)){i.add(u);var o=S1.bind(null,e,u);u.then(o,o)}})}function qt(e,t){var i=t.deletions;if(i!==null)for(var u=0;u<i.length;u++){var o=i[u],d=e,x=t,S=x;e:for(;S!==null;){switch(S.tag){case 27:if(Sl(S.type)){rt=S.stateNode,Ht=!1;break e}break;case 5:rt=S.stateNode,Ht=!1;break e;case 3:case 4:rt=S.stateNode.containerInfo,Ht=!0;break e}S=S.return}if(rt===null)throw Error(r(160));Om(d,x,o),rt=null,Ht=!1,d=o.alternate,d!==null&&(d.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Bm(t,e),t=t.sibling}var Sn=null;function Bm(e,t){var i=e.alternate,u=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:qt(t,e),Vt(e),u&4&&(pl(3,e,e.return),Ha(3,e),pl(5,e,e.return));break;case 1:qt(t,e),Vt(e),u&512&&(gt||i===null||An(i,i.return)),u&64&&Gn&&(e=e.updateQueue,e!==null&&(u=e.callbacks,u!==null&&(i=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=i===null?u:i.concat(u))));break;case 26:var o=Sn;if(qt(t,e),Vt(e),u&512&&(gt||i===null||An(i,i.return)),u&4){var d=i!==null?i.memoizedState:null;if(u=e.memoizedState,i===null)if(u===null)if(e.stateNode===null){e:{u=e.type,i=e.memoizedProps,o=o.ownerDocument||o;t:switch(u){case"title":d=o.getElementsByTagName("title")[0],(!d||d[ha]||d[wt]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=o.createElement(u),o.head.insertBefore(d,o.querySelector("head > title"))),At(d,u,i),d[wt]=e,kt(d),u=d;break e;case"link":var x=Bp("link","href",o).get(u+(i.href||""));if(x){for(var S=0;S<x.length;S++)if(d=x[S],d.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&d.getAttribute("rel")===(i.rel==null?null:i.rel)&&d.getAttribute("title")===(i.title==null?null:i.title)&&d.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){x.splice(S,1);break t}}d=o.createElement(u),At(d,u,i),o.head.appendChild(d);break;case"meta":if(x=Bp("meta","content",o).get(u+(i.content||""))){for(S=0;S<x.length;S++)if(d=x[S],d.getAttribute("content")===(i.content==null?null:""+i.content)&&d.getAttribute("name")===(i.name==null?null:i.name)&&d.getAttribute("property")===(i.property==null?null:i.property)&&d.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&d.getAttribute("charset")===(i.charSet==null?null:i.charSet)){x.splice(S,1);break t}}d=o.createElement(u),At(d,u,i),o.head.appendChild(d);break;default:throw Error(r(468,u))}d[wt]=e,kt(d),u=d}e.stateNode=u}else Up(o,e.type,e.stateNode);else e.stateNode=Lp(o,u,e.memoizedProps);else d!==u?(d===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):d.count--,u===null?Up(o,e.type,e.stateNode):Lp(o,u,e.memoizedProps)):u===null&&e.stateNode!==null&&Gc(e,e.memoizedProps,i.memoizedProps)}break;case 27:qt(t,e),Vt(e),u&512&&(gt||i===null||An(i,i.return)),i!==null&&u&4&&Gc(e,e.memoizedProps,i.memoizedProps);break;case 5:if(qt(t,e),Vt(e),u&512&&(gt||i===null||An(i,i.return)),e.flags&32){o=e.stateNode;try{xi(o,"")}catch(oe){Ge(e,e.return,oe)}}u&4&&e.stateNode!=null&&(o=e.memoizedProps,Gc(e,o,i!==null?i.memoizedProps:o)),u&1024&&(Jc=!0);break;case 6:if(qt(t,e),Vt(e),u&4){if(e.stateNode===null)throw Error(r(162));u=e.memoizedProps,i=e.stateNode;try{i.nodeValue=u}catch(oe){Ge(e,e.return,oe)}}break;case 3:if(ju=null,o=Sn,Sn=Nu(t.containerInfo),qt(t,e),Sn=o,Vt(e),u&4&&i!==null&&i.memoizedState.isDehydrated)try{Ki(t.containerInfo)}catch(oe){Ge(e,e.return,oe)}Jc&&(Jc=!1,Um(e));break;case 4:u=Sn,Sn=Nu(e.stateNode.containerInfo),qt(t,e),Vt(e),Sn=u;break;case 12:qt(t,e),Vt(e);break;case 31:qt(t,e),Vt(e),u&4&&(u=e.updateQueue,u!==null&&(e.updateQueue=null,mu(e,u)));break;case 13:qt(t,e),Vt(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(gu=Dt()),u&4&&(u=e.updateQueue,u!==null&&(e.updateQueue=null,mu(e,u)));break;case 22:o=e.memoizedState!==null;var C=i!==null&&i.memoizedState!==null,L=Gn,F=gt;if(Gn=L||o,gt=F||C,qt(t,e),gt=F,Gn=L,Vt(e),u&8192)e:for(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,o&&(i===null||C||Gn||gt||Wl(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){C=i=t;try{if(d=C.stateNode,o)x=d.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none";else{S=C.stateNode;var K=C.memoizedProps.style,B=K!=null&&K.hasOwnProperty("display")?K.display:null;S.style.display=B==null||typeof B=="boolean"?"":(""+B).trim()}}catch(oe){Ge(C,C.return,oe)}}}else if(t.tag===6){if(i===null){C=t;try{C.stateNode.nodeValue=o?"":C.memoizedProps}catch(oe){Ge(C,C.return,oe)}}}else if(t.tag===18){if(i===null){C=t;try{var V=C.stateNode;o?Ap(V,!0):Ap(C.stateNode,!1)}catch(oe){Ge(C,C.return,oe)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;i===t&&(i=null),t=t.return}i===t&&(i=null),t.sibling.return=t.return,t=t.sibling}u&4&&(u=e.updateQueue,u!==null&&(i=u.retryQueue,i!==null&&(u.retryQueue=null,mu(e,i))));break;case 19:qt(t,e),Vt(e),u&4&&(u=e.updateQueue,u!==null&&(e.updateQueue=null,mu(e,u)));break;case 30:break;case 21:break;default:qt(t,e),Vt(e)}}function Vt(e){var t=e.flags;if(t&2){try{for(var i,u=e.return;u!==null;){if(Tm(u)){i=u;break}u=u.return}if(i==null)throw Error(r(160));switch(i.tag){case 27:var o=i.stateNode,d=Xc(e);hu(e,d,o);break;case 5:var x=i.stateNode;i.flags&32&&(xi(x,""),i.flags&=-33);var S=Xc(e);hu(e,S,x);break;case 3:case 4:var C=i.stateNode.containerInfo,L=Xc(e);Kc(e,L,C);break;default:throw Error(r(161))}}catch(F){Ge(e,e.return,F)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Um(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Um(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Kn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Dm(e,t.alternate,t),t=t.sibling}function Wl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:pl(4,t,t.return),Wl(t);break;case 1:An(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&Am(t,t.return,i),Wl(t);break;case 27:Ka(t.stateNode);case 26:case 5:An(t,t.return),Wl(t);break;case 22:t.memoizedState===null&&Wl(t);break;case 30:Wl(t);break;default:Wl(t)}e=e.sibling}}function Jn(e,t,i){for(i=i&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var u=t.alternate,o=e,d=t,x=d.flags;switch(d.tag){case 0:case 11:case 15:Jn(o,d,i),Ha(4,d);break;case 1:if(Jn(o,d,i),u=d,o=u.stateNode,typeof o.componentDidMount=="function")try{o.componentDidMount()}catch(L){Ge(u,u.return,L)}if(u=d,o=u.updateQueue,o!==null){var S=u.stateNode;try{var C=o.shared.hiddenCallbacks;if(C!==null)for(o.shared.hiddenCallbacks=null,o=0;o<C.length;o++)ph(C[o],S)}catch(L){Ge(u,u.return,L)}}i&&x&64&&Cm(d),qa(d,d.return);break;case 27:jm(d);case 26:case 5:Jn(o,d,i),i&&u===null&&x&4&&Nm(d),qa(d,d.return);break;case 12:Jn(o,d,i);break;case 31:Jn(o,d,i),i&&x&4&&Rm(o,d);break;case 13:Jn(o,d,i),i&&x&4&&Lm(o,d);break;case 22:d.memoizedState===null&&Jn(o,d,i),qa(d,d.return);break;case 30:break;default:Jn(o,d,i)}t=t.sibling}}function $c(e,t){var i=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==i&&(e!=null&&e.refCount++,i!=null&&Ca(i))}function Pc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ca(e))}function wn(e,t,i,u){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Hm(e,t,i,u),t=t.sibling}function Hm(e,t,i,u){var o=t.flags;switch(t.tag){case 0:case 11:case 15:wn(e,t,i,u),o&2048&&Ha(9,t);break;case 1:wn(e,t,i,u);break;case 3:wn(e,t,i,u),o&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ca(e)));break;case 12:if(o&2048){wn(e,t,i,u),e=t.stateNode;try{var d=t.memoizedProps,x=d.id,S=d.onPostCommit;typeof S=="function"&&S(x,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(C){Ge(t,t.return,C)}}else wn(e,t,i,u);break;case 31:wn(e,t,i,u);break;case 13:wn(e,t,i,u);break;case 23:break;case 22:d=t.stateNode,x=t.alternate,t.memoizedState!==null?d._visibility&2?wn(e,t,i,u):Va(e,t):d._visibility&2?wn(e,t,i,u):(d._visibility|=2,Ui(e,t,i,u,(t.subtreeFlags&10256)!==0||!1)),o&2048&&$c(x,t);break;case 24:wn(e,t,i,u),o&2048&&Pc(t.alternate,t);break;default:wn(e,t,i,u)}}function Ui(e,t,i,u,o){for(o=o&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var d=e,x=t,S=i,C=u,L=x.flags;switch(x.tag){case 0:case 11:case 15:Ui(d,x,S,C,o),Ha(8,x);break;case 23:break;case 22:var F=x.stateNode;x.memoizedState!==null?F._visibility&2?Ui(d,x,S,C,o):Va(d,x):(F._visibility|=2,Ui(d,x,S,C,o)),o&&L&2048&&$c(x.alternate,x);break;case 24:Ui(d,x,S,C,o),o&&L&2048&&Pc(x.alternate,x);break;default:Ui(d,x,S,C,o)}t=t.sibling}}function Va(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var i=e,u=t,o=u.flags;switch(u.tag){case 22:Va(i,u),o&2048&&$c(u.alternate,u);break;case 24:Va(i,u),o&2048&&Pc(u.alternate,u);break;default:Va(i,u)}t=t.sibling}}var Ya=8192;function Hi(e,t,i){if(e.subtreeFlags&Ya)for(e=e.child;e!==null;)qm(e,t,i),e=e.sibling}function qm(e,t,i){switch(e.tag){case 26:Hi(e,t,i),e.flags&Ya&&e.memoizedState!==null&&W1(i,Sn,e.memoizedState,e.memoizedProps);break;case 5:Hi(e,t,i);break;case 3:case 4:var u=Sn;Sn=Nu(e.stateNode.containerInfo),Hi(e,t,i),Sn=u;break;case 22:e.memoizedState===null&&(u=e.alternate,u!==null&&u.memoizedState!==null?(u=Ya,Ya=16777216,Hi(e,t,i),Ya=u):Hi(e,t,i));break;default:Hi(e,t,i)}}function Vm(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Za(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var u=t[i];St=u,Zm(u,e)}Vm(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Ym(e),e=e.sibling}function Ym(e){switch(e.tag){case 0:case 11:case 15:Za(e),e.flags&2048&&pl(9,e,e.return);break;case 3:Za(e);break;case 12:Za(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,pu(e)):Za(e);break;default:Za(e)}}function pu(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var u=t[i];St=u,Zm(u,e)}Vm(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:pl(8,t,t.return),pu(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,pu(t));break;default:pu(t)}e=e.sibling}}function Zm(e,t){for(;St!==null;){var i=St;switch(i.tag){case 0:case 11:case 15:pl(8,i,t);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var u=i.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:Ca(i.memoizedState.cache)}if(u=i.child,u!==null)u.return=i,St=u;else e:for(i=e;St!==null;){u=St;var o=u.sibling,d=u.return;if(Mm(u),u===i){St=null;break e}if(o!==null){o.return=d,St=o;break e}St=d}}}var m1={getCacheForType:function(e){var t=Et(ht),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return Et(ht).controller.signal}},p1=typeof WeakMap=="function"?WeakMap:Map,Ie=0,We=null,De=null,Le=0,Qe=0,Wt=null,gl=!1,qi=!1,Wc=!1,$n=0,ct=0,yl=0,ei=0,eo=0,en=0,Vi=0,Ia=null,Yt=null,to=!1,gu=0,Im=0,yu=1/0,xu=null,xl=null,vt=0,bl=null,Yi=null,Pn=0,no=0,lo=null,Fm=null,Fa=0,io=null;function tn(){return(Ie&2)!==0&&Le!==0?Le&-Le:T.T!==null?oo():ud()}function Qm(){if(en===0)if((Le&536870912)===0||Ue){var e=Cr;Cr<<=1,(Cr&3932160)===0&&(Cr=262144),en=e}else en=536870912;return e=$t.current,e!==null&&(e.flags|=32),en}function Zt(e,t,i){(e===We&&(Qe===2||Qe===9)||e.cancelPendingCommit!==null)&&(Zi(e,0),vl(e,Le,en,!1)),da(e,i),((Ie&2)===0||e!==We)&&(e===We&&((Ie&2)===0&&(ei|=i),ct===4&&vl(e,Le,en,!1)),Nn(e))}function Gm(e,t,i){if((Ie&6)!==0)throw Error(r(327));var u=!i&&(t&127)===0&&(t&e.expiredLanes)===0||fa(e,t),o=u?x1(e,t):ro(e,t,!0),d=u;do{if(o===0){qi&&!u&&vl(e,t,0,!1);break}else{if(i=e.current.alternate,d&&!g1(i)){o=ro(e,t,!1),d=!1;continue}if(o===2){if(d=t,e.errorRecoveryDisabledLanes&d)var x=0;else x=e.pendingLanes&-536870913,x=x!==0?x:x&536870912?536870912:0;if(x!==0){t=x;e:{var S=e;o=Ia;var C=S.current.memoizedState.isDehydrated;if(C&&(Zi(S,x).flags|=256),x=ro(S,x,!1),x!==2){if(Wc&&!C){S.errorRecoveryDisabledLanes|=d,ei|=d,o=4;break e}d=Yt,Yt=o,d!==null&&(Yt===null?Yt=d:Yt.push.apply(Yt,d))}o=x}if(d=!1,o!==2)continue}}if(o===1){Zi(e,0),vl(e,t,0,!0);break}e:{switch(u=e,d=o,d){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t)break;case 6:vl(u,t,en,!gl);break e;case 2:Yt=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(o=gu+300-Dt(),10<o)){if(vl(u,t,en,!gl),Nr(u,0,!0)!==0)break e;Pn=t,u.timeoutHandle=_p(Xm.bind(null,u,i,Yt,xu,to,t,en,ei,Vi,gl,d,"Throttled",-0,0),o);break e}Xm(u,i,Yt,xu,to,t,en,ei,Vi,gl,d,null,-0,0)}}break}while(!0);Nn(e)}function Xm(e,t,i,u,o,d,x,S,C,L,F,K,B,V){if(e.timeoutHandle=-1,K=t.subtreeFlags,K&8192||(K&16785408)===16785408){K={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Bn},qm(t,d,K);var oe=(d&62914560)===d?gu-Dt():(d&4194048)===d?Im-Dt():0;if(oe=eb(K,oe),oe!==null){Pn=d,e.cancelPendingCommit=oe(np.bind(null,e,t,d,i,u,o,x,S,C,F,K,null,B,V)),vl(e,d,x,!L);return}}np(e,t,d,i,u,o,x,S,C)}function g1(e){for(var t=e;;){var i=t.tag;if((i===0||i===11||i===15)&&t.flags&16384&&(i=t.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var u=0;u<i.length;u++){var o=i[u],d=o.getSnapshot;o=o.value;try{if(!Kt(d(),o))return!1}catch{return!1}}if(i=t.child,t.subtreeFlags&16384&&i!==null)i.return=t,t=i;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function vl(e,t,i,u){t&=~eo,t&=~ei,e.suspendedLanes|=t,e.pingedLanes&=~t,u&&(e.warmLanes|=t),u=e.expirationTimes;for(var o=t;0<o;){var d=31-Pe(o),x=1<<d;u[d]=-1,o&=~x}i!==0&&id(e,i,t)}function bu(){return(Ie&6)===0?(Qa(0),!1):!0}function ao(){if(De!==null){if(Qe===0)var e=De.return;else e=De,Vn=Fl=null,kc(e),Mi=null,Na=0,e=De;for(;e!==null;)Em(e.alternate,e),e=e.return;De=null}}function Zi(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,L1(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),Pn=0,ao(),We=e,De=i=Hn(e.current,null),Le=t,Qe=0,Wt=null,gl=!1,qi=fa(e,t),Wc=!1,Vi=en=eo=ei=yl=ct=0,Yt=Ia=null,to=!1,(t&8)!==0&&(t|=t&32);var u=e.entangledLanes;if(u!==0)for(e=e.entanglements,u&=t;0<u;){var o=31-Pe(u),d=1<<o;t|=e[o],u&=~d}return $n=t,qr(),i}function Km(e,t){Ne=null,T.H=La,t===Di||t===Xr?(t=fh(),Qe=3):t===cc?(t=fh(),Qe=4):Qe=t===Bc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Wt=t,De===null&&(ct=1,su(e,fn(t,e.current)))}function Jm(){var e=$t.current;return e===null?!0:(Le&4194048)===Le?pn===null:(Le&62914560)===Le||(Le&536870912)!==0?e===pn:!1}function $m(){var e=T.H;return T.H=La,e===null?La:e}function Pm(){var e=T.A;return T.A=m1,e}function vu(){ct=4,gl||(Le&4194048)!==Le&&$t.current!==null||(qi=!0),(yl&134217727)===0&&(ei&134217727)===0||We===null||vl(We,Le,en,!1)}function ro(e,t,i){var u=Ie;Ie|=2;var o=$m(),d=Pm();(We!==e||Le!==t)&&(xu=null,Zi(e,t)),t=!1;var x=ct;e:do try{if(Qe!==0&&De!==null){var S=De,C=Wt;switch(Qe){case 8:ao(),x=6;break e;case 3:case 2:case 9:case 6:$t.current===null&&(t=!0);var L=Qe;if(Qe=0,Wt=null,Ii(e,S,C,L),i&&qi){x=0;break e}break;default:L=Qe,Qe=0,Wt=null,Ii(e,S,C,L)}}y1(),x=ct;break}catch(F){Km(e,F)}while(!0);return t&&e.shellSuspendCounter++,Vn=Fl=null,Ie=u,T.H=o,T.A=d,De===null&&(We=null,Le=0,qr()),x}function y1(){for(;De!==null;)Wm(De)}function x1(e,t){var i=Ie;Ie|=2;var u=$m(),o=Pm();We!==e||Le!==t?(xu=null,yu=Dt()+500,Zi(e,t)):qi=fa(e,t);e:do try{if(Qe!==0&&De!==null){t=De;var d=Wt;t:switch(Qe){case 1:Qe=0,Wt=null,Ii(e,t,d,1);break;case 2:case 9:if(ch(d)){Qe=0,Wt=null,ep(t);break}t=function(){Qe!==2&&Qe!==9||We!==e||(Qe=7),Nn(e)},d.then(t,t);break e;case 3:Qe=7;break e;case 4:Qe=5;break e;case 7:ch(d)?(Qe=0,Wt=null,ep(t)):(Qe=0,Wt=null,Ii(e,t,d,7));break;case 5:var x=null;switch(De.tag){case 26:x=De.memoizedState;case 5:case 27:var S=De;if(x?Hp(x):S.stateNode.complete){Qe=0,Wt=null;var C=S.sibling;if(C!==null)De=C;else{var L=S.return;L!==null?(De=L,ku(L)):De=null}break t}}Qe=0,Wt=null,Ii(e,t,d,5);break;case 6:Qe=0,Wt=null,Ii(e,t,d,6);break;case 8:ao(),ct=6;break e;default:throw Error(r(462))}}b1();break}catch(F){Km(e,F)}while(!0);return Vn=Fl=null,T.H=u,T.A=o,Ie=i,De!==null?0:(We=null,Le=0,qr(),ct)}function b1(){for(;De!==null&&!bs();)Wm(De)}function Wm(e){var t=wm(e.alternate,e,$n);e.memoizedProps=e.pendingProps,t===null?ku(e):De=t}function ep(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=ym(i,t,t.pendingProps,t.type,void 0,Le);break;case 11:t=ym(i,t,t.pendingProps,t.type.render,t.ref,Le);break;case 5:kc(t);default:Em(i,t),t=De=Pd(t,$n),t=wm(i,t,$n)}e.memoizedProps=e.pendingProps,t===null?ku(e):De=t}function Ii(e,t,i,u){Vn=Fl=null,kc(t),Mi=null,Na=0;var o=t.return;try{if(u1(e,o,t,i,Le)){ct=1,su(e,fn(i,e.current)),De=null;return}}catch(d){if(o!==null)throw De=o,d;ct=1,su(e,fn(i,e.current)),De=null;return}t.flags&32768?(Ue||u===1?e=!0:qi||(Le&536870912)!==0?e=!1:(gl=e=!0,(u===2||u===9||u===3||u===6)&&(u=$t.current,u!==null&&u.tag===13&&(u.flags|=16384))),tp(t,e)):ku(t)}function ku(e){var t=e;do{if((t.flags&32768)!==0){tp(t,gl);return}e=t.return;var i=o1(t.alternate,t,$n);if(i!==null){De=i;return}if(t=t.sibling,t!==null){De=t;return}De=t=e}while(t!==null);ct===0&&(ct=5)}function tp(e,t){do{var i=f1(e.alternate,e);if(i!==null){i.flags&=32767,De=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){De=e;return}De=e=i}while(e!==null);ct=6,De=null}function np(e,t,i,u,o,d,x,S,C){e.cancelPendingCommit=null;do Su();while(vt!==0);if((Ie&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(d=t.lanes|t.childLanes,d|=Xs,Px(e,i,d,x,S,C),e===We&&(De=We=null,Le=0),Yi=t,bl=e,Pn=i,no=d,lo=o,Fm=u,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,w1(Se,function(){return up(),null})):(e.callbackNode=null,e.callbackPriority=0),u=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||u){u=T.T,T.T=null,o=$.p,$.p=2,x=Ie,Ie|=4;try{d1(e,t,i)}finally{Ie=x,$.p=o,T.T=u}}vt=1,lp(),ip(),ap()}}function lp(){if(vt===1){vt=0;var e=bl,t=Yi,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=T.T,T.T=null;var u=$.p;$.p=2;var o=Ie;Ie|=4;try{Bm(t,e);var d=bo,x=Zd(e.containerInfo),S=d.focusedElem,C=d.selectionRange;if(x!==S&&S&&S.ownerDocument&&Yd(S.ownerDocument.documentElement,S)){if(C!==null&&Zs(S)){var L=C.start,F=C.end;if(F===void 0&&(F=L),"selectionStart"in S)S.selectionStart=L,S.selectionEnd=Math.min(F,S.value.length);else{var K=S.ownerDocument||document,B=K&&K.defaultView||window;if(B.getSelection){var V=B.getSelection(),oe=S.textContent.length,ve=Math.min(C.start,oe),$e=C.end===void 0?ve:Math.min(C.end,oe);!V.extend&&ve>$e&&(x=$e,$e=ve,ve=x);var z=Vd(S,ve),N=Vd(S,$e);if(z&&N&&(V.rangeCount!==1||V.anchorNode!==z.node||V.anchorOffset!==z.offset||V.focusNode!==N.node||V.focusOffset!==N.offset)){var R=K.createRange();R.setStart(z.node,z.offset),V.removeAllRanges(),ve>$e?(V.addRange(R),V.extend(N.node,N.offset)):(R.setEnd(N.node,N.offset),V.addRange(R))}}}}for(K=[],V=S;V=V.parentNode;)V.nodeType===1&&K.push({element:V,left:V.scrollLeft,top:V.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<K.length;S++){var X=K[S];X.element.scrollLeft=X.left,X.element.scrollTop=X.top}}Ou=!!xo,bo=xo=null}finally{Ie=o,$.p=u,T.T=i}}e.current=t,vt=2}}function ip(){if(vt===2){vt=0;var e=bl,t=Yi,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=T.T,T.T=null;var u=$.p;$.p=2;var o=Ie;Ie|=4;try{Dm(e,t.alternate,t)}finally{Ie=o,$.p=u,T.T=i}}vt=3}}function ap(){if(vt===4||vt===3){vt=0,vs();var e=bl,t=Yi,i=Pn,u=Fm;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?vt=5:(vt=0,Yi=bl=null,rp(e,e.pendingLanes));var o=e.pendingLanes;if(o===0&&(xl=null),_s(i),t=t.stateNode,bt&&typeof bt.onCommitFiberRoot=="function")try{bt.onCommitFiberRoot(Mt,t,void 0,(t.current.flags&128)===128)}catch{}if(u!==null){t=T.T,o=$.p,$.p=2,T.T=null;try{for(var d=e.onRecoverableError,x=0;x<u.length;x++){var S=u[x];d(S.value,{componentStack:S.stack})}}finally{T.T=t,$.p=o}}(Pn&3)!==0&&Su(),Nn(e),o=e.pendingLanes,(i&261930)!==0&&(o&42)!==0?e===io?Fa++:(Fa=0,io=e):Fa=0,Qa(0)}}function rp(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ca(t)))}function Su(){return lp(),ip(),ap(),up()}function up(){if(vt!==5)return!1;var e=bl,t=no;no=0;var i=_s(Pn),u=T.T,o=$.p;try{$.p=32>i?32:i,T.T=null,i=lo,lo=null;var d=bl,x=Pn;if(vt=0,Yi=bl=null,Pn=0,(Ie&6)!==0)throw Error(r(331));var S=Ie;if(Ie|=4,Ym(d.current),Hm(d,d.current,x,i),Ie=S,Qa(0,!1),bt&&typeof bt.onPostCommitFiberRoot=="function")try{bt.onPostCommitFiberRoot(Mt,d)}catch{}return!0}finally{$.p=o,T.T=u,rp(e,t)}}function sp(e,t,i){t=fn(i,t),t=Lc(e.stateNode,t,2),e=dl(e,t,2),e!==null&&(da(e,2),Nn(e))}function Ge(e,t,i){if(e.tag===3)sp(e,e,i);else for(;t!==null;){if(t.tag===3){sp(t,e,i);break}else if(t.tag===1){var u=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(xl===null||!xl.has(u))){e=fn(i,e),i=cm(2),u=dl(t,i,2),u!==null&&(om(i,u,t,e),da(u,2),Nn(u));break}}t=t.return}}function uo(e,t,i){var u=e.pingCache;if(u===null){u=e.pingCache=new p1;var o=new Set;u.set(t,o)}else o=u.get(t),o===void 0&&(o=new Set,u.set(t,o));o.has(i)||(Wc=!0,o.add(i),e=v1.bind(null,e,t,i),t.then(e,e))}function v1(e,t,i){var u=e.pingCache;u!==null&&u.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,We===e&&(Le&i)===i&&(ct===4||ct===3&&(Le&62914560)===Le&&300>Dt()-gu?(Ie&2)===0&&Zi(e,0):eo|=i,Vi===Le&&(Vi=0)),Nn(e)}function cp(e,t){t===0&&(t=ld()),e=Yl(e,t),e!==null&&(da(e,t),Nn(e))}function k1(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),cp(e,i)}function S1(e,t){var i=0;switch(e.tag){case 31:case 13:var u=e.stateNode,o=e.memoizedState;o!==null&&(i=o.retryLane);break;case 19:u=e.stateNode;break;case 22:u=e.stateNode._retryCache;break;default:throw Error(r(314))}u!==null&&u.delete(t),cp(e,i)}function w1(e,t){return fi(e,t)}var wu=null,Fi=null,so=!1,_u=!1,co=!1,kl=0;function Nn(e){e!==Fi&&e.next===null&&(Fi===null?wu=Fi=e:Fi=Fi.next=e),_u=!0,so||(so=!0,E1())}function Qa(e,t){if(!co&&_u){co=!0;do for(var i=!1,u=wu;u!==null;){if(e!==0){var o=u.pendingLanes;if(o===0)var d=0;else{var x=u.suspendedLanes,S=u.pingedLanes;d=(1<<31-Pe(42|e)+1)-1,d&=o&~(x&~S),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(i=!0,hp(u,d))}else d=Le,d=Nr(u,u===We?d:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(d&3)===0||fa(u,d)||(i=!0,hp(u,d));u=u.next}while(i);co=!1}}function _1(){op()}function op(){_u=so=!1;var e=0;kl!==0&&R1()&&(e=kl);for(var t=Dt(),i=null,u=wu;u!==null;){var o=u.next,d=fp(u,t);d===0?(u.next=null,i===null?wu=o:i.next=o,o===null&&(Fi=i)):(i=u,(e!==0||(d&3)!==0)&&(_u=!0)),u=o}vt!==0&&vt!==5||Qa(e),kl!==0&&(kl=0)}function fp(e,t){for(var i=e.suspendedLanes,u=e.pingedLanes,o=e.expirationTimes,d=e.pendingLanes&-62914561;0<d;){var x=31-Pe(d),S=1<<x,C=o[x];C===-1?((S&i)===0||(S&u)!==0)&&(o[x]=$x(S,t)):C<=t&&(e.expiredLanes|=S),d&=~S}if(t=We,i=Le,i=Nr(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),u=e.callbackNode,i===0||e===t&&(Qe===2||Qe===9)||e.cancelPendingCommit!==null)return u!==null&&u!==null&&oa(u),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||fa(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(u!==null&&oa(u),_s(i)){case 2:case 8:i=ie;break;case 32:i=Se;break;case 268435456:i=Fe;break;default:i=Se}return u=dp.bind(null,e),i=fi(i,u),e.callbackPriority=t,e.callbackNode=i,t}return u!==null&&u!==null&&oa(u),e.callbackPriority=2,e.callbackNode=null,2}function dp(e,t){if(vt!==0&&vt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(Su()&&e.callbackNode!==i)return null;var u=Le;return u=Nr(e,e===We?u:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),u===0?null:(Gm(e,u,t),fp(e,Dt()),e.callbackNode!=null&&e.callbackNode===i?dp.bind(null,e):null)}function hp(e,t){if(Su())return null;Gm(e,t,!0)}function E1(){B1(function(){(Ie&6)!==0?fi(G,_1):op()})}function oo(){if(kl===0){var e=ji;e===0&&(e=Er,Er<<=1,(Er&261888)===0&&(Er=256)),kl=e}return kl}function mp(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Dr(""+e)}function pp(e,t){var i=t.ownerDocument.createElement("input");return i.name=t.name,i.value=t.value,e.id&&i.setAttribute("form",e.id),t.parentNode.insertBefore(i,t),e=new FormData(e),i.parentNode.removeChild(i),e}function C1(e,t,i,u,o){if(t==="submit"&&i&&i.stateNode===o){var d=mp((o[Bt]||null).action),x=u.submitter;x&&(t=(t=x[Bt]||null)?mp(t.formAction):x.getAttribute("formAction"),t!==null&&(d=t,x=null));var S=new Lr("action","action",null,u,o);e.push({event:S,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(kl!==0){var C=x?pp(o,x):new FormData(o);jc(i,{pending:!0,data:C,method:o.method,action:d},null,C)}}else typeof d=="function"&&(S.preventDefault(),C=x?pp(o,x):new FormData(o),jc(i,{pending:!0,data:C,method:o.method,action:d},d,C))},currentTarget:o}]})}}for(var fo=0;fo<Gs.length;fo++){var ho=Gs[fo],A1=ho.toLowerCase(),N1=ho[0].toUpperCase()+ho.slice(1);kn(A1,"on"+N1)}kn(Qd,"onAnimationEnd"),kn(Gd,"onAnimationIteration"),kn(Xd,"onAnimationStart"),kn("dblclick","onDoubleClick"),kn("focusin","onFocus"),kn("focusout","onBlur"),kn(I0,"onTransitionRun"),kn(F0,"onTransitionStart"),kn(Q0,"onTransitionCancel"),kn(Kd,"onTransitionEnd"),gi("onMouseEnter",["mouseout","mouseover"]),gi("onMouseLeave",["mouseout","mouseover"]),gi("onPointerEnter",["pointerout","pointerover"]),gi("onPointerLeave",["pointerout","pointerover"]),Ul("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ul("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ul("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ul("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ul("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ul("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ga="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(" "),T1=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ga));function gp(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var u=e[i],o=u.event;u=u.listeners;e:{var d=void 0;if(t)for(var x=u.length-1;0<=x;x--){var S=u[x],C=S.instance,L=S.currentTarget;if(S=S.listener,C!==d&&o.isPropagationStopped())break e;d=S,o.currentTarget=L;try{d(o)}catch(F){Hr(F)}o.currentTarget=null,d=C}else for(x=0;x<u.length;x++){if(S=u[x],C=S.instance,L=S.currentTarget,S=S.listener,C!==d&&o.isPropagationStopped())break e;d=S,o.currentTarget=L;try{d(o)}catch(F){Hr(F)}o.currentTarget=null,d=C}}}}function Me(e,t){var i=t[Es];i===void 0&&(i=t[Es]=new Set);var u=e+"__bubble";i.has(u)||(yp(t,e,2,!1),i.add(u))}function mo(e,t,i){var u=0;t&&(u|=4),yp(i,e,u,t)}var Eu="_reactListening"+Math.random().toString(36).slice(2);function po(e){if(!e[Eu]){e[Eu]=!0,od.forEach(function(i){i!=="selectionchange"&&(T1.has(i)||mo(i,!1,e),mo(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Eu]||(t[Eu]=!0,mo("selectionchange",!1,t))}}function yp(e,t,i,u){switch(Qp(t)){case 2:var o=lb;break;case 8:o=ib;break;default:o=jo}i=o.bind(null,t,i,e),o=void 0,!Os||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),u?o!==void 0?e.addEventListener(t,i,{capture:!0,passive:o}):e.addEventListener(t,i,!0):o!==void 0?e.addEventListener(t,i,{passive:o}):e.addEventListener(t,i,!1)}function go(e,t,i,u,o){var d=u;if((t&1)===0&&(t&2)===0&&u!==null)e:for(;;){if(u===null)return;var x=u.tag;if(x===3||x===4){var S=u.stateNode.containerInfo;if(S===o)break;if(x===4)for(x=u.return;x!==null;){var C=x.tag;if((C===3||C===4)&&x.stateNode.containerInfo===o)return;x=x.return}for(;S!==null;){if(x=hi(S),x===null)return;if(C=x.tag,C===5||C===6||C===26||C===27){u=d=x;continue e}S=S.parentNode}}u=u.return}Sd(function(){var L=d,F=Ds(i),K=[];e:{var B=Jd.get(e);if(B!==void 0){var V=Lr,oe=e;switch(e){case"keypress":if(Or(i)===0)break e;case"keydown":case"keyup":V=S0;break;case"focusin":oe="focus",V=Us;break;case"focusout":oe="blur",V=Us;break;case"beforeblur":case"afterblur":V=Us;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":V=Ed;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":V=o0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":V=E0;break;case Qd:case Gd:case Xd:V=h0;break;case Kd:V=A0;break;case"scroll":case"scrollend":V=s0;break;case"wheel":V=T0;break;case"copy":case"cut":case"paste":V=p0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":V=Ad;break;case"toggle":case"beforetoggle":V=z0}var ve=(t&4)!==0,$e=!ve&&(e==="scroll"||e==="scrollend"),z=ve?B!==null?B+"Capture":null:B;ve=[];for(var N=L,R;N!==null;){var X=N;if(R=X.stateNode,X=X.tag,X!==5&&X!==26&&X!==27||R===null||z===null||(X=pa(N,z),X!=null&&ve.push(Xa(N,X,R))),$e)break;N=N.return}0<ve.length&&(B=new V(B,oe,null,i,F),K.push({event:B,listeners:ve}))}}if((t&7)===0){e:{if(B=e==="mouseover"||e==="pointerover",V=e==="mouseout"||e==="pointerout",B&&i!==zs&&(oe=i.relatedTarget||i.fromElement)&&(hi(oe)||oe[di]))break e;if((V||B)&&(B=F.window===F?F:(B=F.ownerDocument)?B.defaultView||B.parentWindow:window,V?(oe=i.relatedTarget||i.toElement,V=L,oe=oe?hi(oe):null,oe!==null&&($e=c(oe),ve=oe.tag,oe!==$e||ve!==5&&ve!==27&&ve!==6)&&(oe=null)):(V=null,oe=L),V!==oe)){if(ve=Ed,X="onMouseLeave",z="onMouseEnter",N="mouse",(e==="pointerout"||e==="pointerover")&&(ve=Ad,X="onPointerLeave",z="onPointerEnter",N="pointer"),$e=V==null?B:ma(V),R=oe==null?B:ma(oe),B=new ve(X,N+"leave",V,i,F),B.target=$e,B.relatedTarget=R,X=null,hi(F)===L&&(ve=new ve(z,N+"enter",oe,i,F),ve.target=R,ve.relatedTarget=$e,X=ve),$e=X,V&&oe)t:{for(ve=j1,z=V,N=oe,R=0,X=z;X;X=ve(X))R++;X=0;for(var xe=N;xe;xe=ve(xe))X++;for(;0<R-X;)z=ve(z),R--;for(;0<X-R;)N=ve(N),X--;for(;R--;){if(z===N||N!==null&&z===N.alternate){ve=z;break t}z=ve(z),N=ve(N)}ve=null}else ve=null;V!==null&&xp(K,B,V,ve,!1),oe!==null&&$e!==null&&xp(K,$e,oe,ve,!0)}}e:{if(B=L?ma(L):window,V=B.nodeName&&B.nodeName.toLowerCase(),V==="select"||V==="input"&&B.type==="file")var Ve=Rd;else if(Md(B))if(Ld)Ve=V0;else{Ve=H0;var me=U0}else V=B.nodeName,!V||V.toLowerCase()!=="input"||B.type!=="checkbox"&&B.type!=="radio"?L&&js(L.elementType)&&(Ve=Rd):Ve=q0;if(Ve&&(Ve=Ve(e,L))){Od(K,Ve,i,F);break e}me&&me(e,B,L),e==="focusout"&&L&&B.type==="number"&&L.memoizedProps.value!=null&&Ts(B,"number",B.value)}switch(me=L?ma(L):window,e){case"focusin":(Md(me)||me.contentEditable==="true")&&(Si=me,Is=L,wa=null);break;case"focusout":wa=Is=Si=null;break;case"mousedown":Fs=!0;break;case"contextmenu":case"mouseup":case"dragend":Fs=!1,Id(K,i,F);break;case"selectionchange":if(Z0)break;case"keydown":case"keyup":Id(K,i,F)}var Te;if(qs)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 ki?zd(e,i)&&(Be="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(Be="onCompositionStart");Be&&(Nd&&i.locale!=="ko"&&(ki||Be!=="onCompositionStart"?Be==="onCompositionEnd"&&ki&&(Te=wd()):(al=F,Rs="value"in al?al.value:al.textContent,ki=!0)),me=Cu(L,Be),0<me.length&&(Be=new Cd(Be,e,null,i,F),K.push({event:Be,listeners:me}),Te?Be.data=Te:(Te=Dd(i),Te!==null&&(Be.data=Te)))),(Te=M0?O0(e,i):R0(e,i))&&(Be=Cu(L,"onBeforeInput"),0<Be.length&&(me=new Cd("onBeforeInput","beforeinput",null,i,F),K.push({event:me,listeners:Be}),me.data=Te)),C1(K,e,L,i,F)}gp(K,t)})}function Xa(e,t,i){return{instance:e,listener:t,currentTarget:i}}function Cu(e,t){for(var i=t+"Capture",u=[];e!==null;){var o=e,d=o.stateNode;if(o=o.tag,o!==5&&o!==26&&o!==27||d===null||(o=pa(e,i),o!=null&&u.unshift(Xa(e,o,d)),o=pa(e,t),o!=null&&u.push(Xa(e,o,d))),e.tag===3)return u;e=e.return}return[]}function j1(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function xp(e,t,i,u,o){for(var d=t._reactName,x=[];i!==null&&i!==u;){var S=i,C=S.alternate,L=S.stateNode;if(S=S.tag,C!==null&&C===u)break;S!==5&&S!==26&&S!==27||L===null||(C=L,o?(L=pa(i,d),L!=null&&x.unshift(Xa(i,L,C))):o||(L=pa(i,d),L!=null&&x.push(Xa(i,L,C)))),i=i.return}x.length!==0&&e.push({event:t,listeners:x})}var z1=/\r\n?/g,D1=/\u0000|\uFFFD/g;function bp(e){return(typeof e=="string"?e:""+e).replace(z1,`
|
|
49
|
-
`).replace(D1,"")}function vp(e,t){return t=bp(t),bp(e)===t}function Je(e,t,i,u,o,d){switch(i){case"children":typeof u=="string"?t==="body"||t==="textarea"&&u===""||xi(e,u):(typeof u=="number"||typeof u=="bigint")&&t!=="body"&&xi(e,""+u);break;case"className":jr(e,"class",u);break;case"tabIndex":jr(e,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":jr(e,i,u);break;case"style":vd(e,u,d);break;case"data":if(t!=="object"){jr(e,"data",u);break}case"src":case"href":if(u===""&&(t!=="a"||i!=="href")){e.removeAttribute(i);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){e.removeAttribute(i);break}u=Dr(""+u),e.setAttribute(i,u);break;case"action":case"formAction":if(typeof u=="function"){e.setAttribute(i,"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"&&(i==="formAction"?(t!=="input"&&Je(e,t,"name",o.name,o,null),Je(e,t,"formEncType",o.formEncType,o,null),Je(e,t,"formMethod",o.formMethod,o,null),Je(e,t,"formTarget",o.formTarget,o,null)):(Je(e,t,"encType",o.encType,o,null),Je(e,t,"method",o.method,o,null),Je(e,t,"target",o.target,o,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){e.removeAttribute(i);break}u=Dr(""+u),e.setAttribute(i,u);break;case"onClick":u!=null&&(e.onclick=Bn);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(i=u.__html,i!=null){if(o.children!=null)throw Error(r(60));e.innerHTML=i}}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}i=Dr(""+u),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);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(i,""+u):e.removeAttribute(i);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(i,""):e.removeAttribute(i);break;case"capture":case"download":u===!0?e.setAttribute(i,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?e.setAttribute(i,u):e.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?e.setAttribute(i,u):e.removeAttribute(i);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?e.removeAttribute(i):e.setAttribute(i,u);break;case"popover":Me("beforetoggle",e),Me("toggle",e),Tr(e,"popover",u);break;case"xlinkActuate":Ln(e,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":Ln(e,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":Ln(e,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":Ln(e,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":Ln(e,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":Ln(e,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":Ln(e,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":Ln(e,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":Ln(e,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":Tr(e,"is",u);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=r0.get(i)||i,Tr(e,i,u))}}function yo(e,t,i,u,o,d){switch(i){case"style":vd(e,u,d);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(r(61));if(i=u.__html,i!=null){if(o.children!=null)throw Error(r(60));e.innerHTML=i}}break;case"children":typeof u=="string"?xi(e,u):(typeof u=="number"||typeof u=="bigint")&&xi(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=Bn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!fd.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(o=i.endsWith("Capture"),t=i.slice(2,o?i.length-7:void 0),d=e[Bt]||null,d=d!=null?d[i]:null,typeof d=="function"&&e.removeEventListener(t,d,o),typeof u=="function")){typeof d!="function"&&d!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(t,u,o);break e}i in e?e[i]=u:u===!0?e.setAttribute(i,""):Tr(e,i,u)}}}function At(e,t,i){switch(t){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,o=!1,d;for(d in i)if(i.hasOwnProperty(d)){var x=i[d];if(x!=null)switch(d){case"src":u=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Je(e,t,d,x,i,null)}}o&&Je(e,t,"srcSet",i.srcSet,i,null),u&&Je(e,t,"src",i.src,i,null);return;case"input":Me("invalid",e);var S=d=x=o=null,C=null,L=null;for(u in i)if(i.hasOwnProperty(u)){var F=i[u];if(F!=null)switch(u){case"name":o=F;break;case"type":x=F;break;case"checked":C=F;break;case"defaultChecked":L=F;break;case"value":d=F;break;case"defaultValue":S=F;break;case"children":case"dangerouslySetInnerHTML":if(F!=null)throw Error(r(137,t));break;default:Je(e,t,u,F,i,null)}}gd(e,d,S,C,L,x,o,!1);return;case"select":Me("invalid",e),u=x=d=null;for(o in i)if(i.hasOwnProperty(o)&&(S=i[o],S!=null))switch(o){case"value":d=S;break;case"defaultValue":x=S;break;case"multiple":u=S;default:Je(e,t,o,S,i,null)}t=d,i=x,e.multiple=!!u,t!=null?yi(e,!!u,t,!1):i!=null&&yi(e,!!u,i,!0);return;case"textarea":Me("invalid",e),d=o=u=null;for(x in i)if(i.hasOwnProperty(x)&&(S=i[x],S!=null))switch(x){case"value":u=S;break;case"defaultValue":o=S;break;case"children":d=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(r(91));break;default:Je(e,t,x,S,i,null)}xd(e,u,o,d);return;case"option":for(C in i)if(i.hasOwnProperty(C)&&(u=i[C],u!=null))switch(C){case"selected":e.selected=u&&typeof u!="function"&&typeof u!="symbol";break;default:Je(e,t,C,u,i,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<Ga.length;u++)Me(Ga[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(L in i)if(i.hasOwnProperty(L)&&(u=i[L],u!=null))switch(L){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Je(e,t,L,u,i,null)}return;default:if(js(t)){for(F in i)i.hasOwnProperty(F)&&(u=i[F],u!==void 0&&yo(e,t,F,u,i,void 0));return}}for(S in i)i.hasOwnProperty(S)&&(u=i[S],u!=null&&Je(e,t,S,u,i,null))}function M1(e,t,i,u){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var o=null,d=null,x=null,S=null,C=null,L=null,F=null;for(V in i){var K=i[V];if(i.hasOwnProperty(V)&&K!=null)switch(V){case"checked":break;case"value":break;case"defaultValue":C=K;default:u.hasOwnProperty(V)||Je(e,t,V,null,u,K)}}for(var B in u){var V=u[B];if(K=i[B],u.hasOwnProperty(B)&&(V!=null||K!=null))switch(B){case"type":d=V;break;case"name":o=V;break;case"checked":L=V;break;case"defaultChecked":F=V;break;case"value":x=V;break;case"defaultValue":S=V;break;case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(r(137,t));break;default:V!==K&&Je(e,t,B,V,u,K)}}Ns(e,x,S,C,L,F,d,o);return;case"select":V=x=S=B=null;for(d in i)if(C=i[d],i.hasOwnProperty(d)&&C!=null)switch(d){case"value":break;case"multiple":V=C;default:u.hasOwnProperty(d)||Je(e,t,d,null,u,C)}for(o in u)if(d=u[o],C=i[o],u.hasOwnProperty(o)&&(d!=null||C!=null))switch(o){case"value":B=d;break;case"defaultValue":S=d;break;case"multiple":x=d;default:d!==C&&Je(e,t,o,d,u,C)}t=S,i=x,u=V,B!=null?yi(e,!!i,B,!1):!!u!=!!i&&(t!=null?yi(e,!!i,t,!0):yi(e,!!i,i?[]:"",!1));return;case"textarea":V=B=null;for(S in i)if(o=i[S],i.hasOwnProperty(S)&&o!=null&&!u.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:Je(e,t,S,null,u,o)}for(x in u)if(o=u[x],d=i[x],u.hasOwnProperty(x)&&(o!=null||d!=null))switch(x){case"value":B=o;break;case"defaultValue":V=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(r(91));break;default:o!==d&&Je(e,t,x,o,u,d)}yd(e,B,V);return;case"option":for(var oe in i)if(B=i[oe],i.hasOwnProperty(oe)&&B!=null&&!u.hasOwnProperty(oe))switch(oe){case"selected":e.selected=!1;break;default:Je(e,t,oe,null,u,B)}for(C in u)if(B=u[C],V=i[C],u.hasOwnProperty(C)&&B!==V&&(B!=null||V!=null))switch(C){case"selected":e.selected=B&&typeof B!="function"&&typeof B!="symbol";break;default:Je(e,t,C,B,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 ve in i)B=i[ve],i.hasOwnProperty(ve)&&B!=null&&!u.hasOwnProperty(ve)&&Je(e,t,ve,null,u,B);for(L in u)if(B=u[L],V=i[L],u.hasOwnProperty(L)&&B!==V&&(B!=null||V!=null))switch(L){case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(r(137,t));break;default:Je(e,t,L,B,u,V)}return;default:if(js(t)){for(var $e in i)B=i[$e],i.hasOwnProperty($e)&&B!==void 0&&!u.hasOwnProperty($e)&&yo(e,t,$e,void 0,u,B);for(F in u)B=u[F],V=i[F],!u.hasOwnProperty(F)||B===V||B===void 0&&V===void 0||yo(e,t,F,B,u,V);return}}for(var z in i)B=i[z],i.hasOwnProperty(z)&&B!=null&&!u.hasOwnProperty(z)&&Je(e,t,z,null,u,B);for(K in u)B=u[K],V=i[K],!u.hasOwnProperty(K)||B===V||B==null&&V==null||Je(e,t,K,B,u,V)}function kp(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function O1(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,i=performance.getEntriesByType("resource"),u=0;u<i.length;u++){var o=i[u],d=o.transferSize,x=o.initiatorType,S=o.duration;if(d&&S&&kp(x)){for(x=0,S=o.responseEnd,u+=1;u<i.length;u++){var C=i[u],L=C.startTime;if(L>S)break;var F=C.transferSize,K=C.initiatorType;F&&kp(K)&&(C=C.responseEnd,x+=F*(C<S?1:(S-L)/(C-L)))}if(--u,t+=8*(d+x)/(o.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var xo=null,bo=null;function Au(e){return e.nodeType===9?e:e.ownerDocument}function Sp(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 wp(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function vo(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var ko=null;function R1(){var e=window.event;return e&&e.type==="popstate"?e===ko?!1:(ko=e,!0):(ko=null,!1)}var _p=typeof setTimeout=="function"?setTimeout:void 0,L1=typeof clearTimeout=="function"?clearTimeout:void 0,Ep=typeof Promise=="function"?Promise:void 0,B1=typeof queueMicrotask=="function"?queueMicrotask:typeof Ep<"u"?function(e){return Ep.resolve(null).then(e).catch(U1)}:_p;function U1(e){setTimeout(function(){throw e})}function Sl(e){return e==="head"}function Cp(e,t){var i=t,u=0;do{var o=i.nextSibling;if(e.removeChild(i),o&&o.nodeType===8)if(i=o.data,i==="/$"||i==="/&"){if(u===0){e.removeChild(o),Ki(t);return}u--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")u++;else if(i==="html")Ka(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,Ka(i);for(var d=i.firstChild;d;){var x=d.nextSibling,S=d.nodeName;d[ha]||S==="SCRIPT"||S==="STYLE"||S==="LINK"&&d.rel.toLowerCase()==="stylesheet"||i.removeChild(d),d=x}}else i==="body"&&Ka(e.ownerDocument.body);i=o}while(i);Ki(t)}function Ap(e,t){var i=e;e=0;do{var u=i.nextSibling;if(i.nodeType===1?t?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(t?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),u&&u.nodeType===8)if(i=u.data,i==="/$"){if(e===0)break;e--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||e++;i=u}while(i)}function So(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var i=t;switch(t=t.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":So(i),Cs(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function H1(e,t,i,u){for(;e.nodeType===1;){var o=i;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!u&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(u){if(!e[ha])switch(t){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!==o.rel||e.getAttribute("href")!==(o.href==null||o.href===""?null:o.href)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin)||e.getAttribute("title")!==(o.title==null?null:o.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(d=e.getAttribute("src"),(d!==(o.src==null?null:o.src)||e.getAttribute("type")!==(o.type==null?null:o.type)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin))&&d&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var d=o.name==null?null:""+o.name;if(o.type==="hidden"&&e.getAttribute("name")===d)return e}else return e;if(e=gn(e.nextSibling),e===null)break}return null}function q1(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=gn(e.nextSibling),e===null))return null;return e}function Np(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=gn(e.nextSibling),e===null))return null;return e}function wo(e){return e.data==="$?"||e.data==="$~"}function _o(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function V1(e,t){var i=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||i.readyState!=="loading")t();else{var u=function(){t(),i.removeEventListener("DOMContentLoaded",u)};i.addEventListener("DOMContentLoaded",u),e._reactRetry=u}}function gn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Eo=null;function Tp(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return gn(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function jp(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(t===0)return e;t--}else i!=="/$"&&i!=="/&"||t++}e=e.previousSibling}return null}function zp(e,t,i){switch(t=Au(i),e){case"html":if(e=t.documentElement,!e)throw Error(r(452));return e;case"head":if(e=t.head,!e)throw Error(r(453));return e;case"body":if(e=t.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function Ka(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Cs(e)}var yn=new Map,Dp=new Set;function Nu(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Wn=$.d;$.d={f:Y1,r:Z1,D:I1,C:F1,L:Q1,m:G1,X:K1,S:X1,M:J1};function Y1(){var e=Wn.f(),t=bu();return e||t}function Z1(e){var t=mi(e);t!==null&&t.tag===5&&t.type==="form"?Kh(t):Wn.r(e)}var Qi=typeof document>"u"?null:document;function Mp(e,t,i){var u=Qi;if(u&&typeof t=="string"&&t){var o=cn(t);o='link[rel="'+e+'"][href="'+o+'"]',typeof i=="string"&&(o+='[crossorigin="'+i+'"]'),Dp.has(o)||(Dp.add(o),e={rel:e,crossOrigin:i,href:t},u.querySelector(o)===null&&(t=u.createElement("link"),At(t,"link",e),kt(t),u.head.appendChild(t)))}}function I1(e){Wn.D(e),Mp("dns-prefetch",e,null)}function F1(e,t){Wn.C(e,t),Mp("preconnect",e,t)}function Q1(e,t,i){Wn.L(e,t,i);var u=Qi;if(u&&e&&t){var o='link[rel="preload"][as="'+cn(t)+'"]';t==="image"&&i&&i.imageSrcSet?(o+='[imagesrcset="'+cn(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(o+='[imagesizes="'+cn(i.imageSizes)+'"]')):o+='[href="'+cn(e)+'"]';var d=o;switch(t){case"style":d=Gi(e);break;case"script":d=Xi(e)}yn.has(d)||(e=y({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),yn.set(d,e),u.querySelector(o)!==null||t==="style"&&u.querySelector(Ja(d))||t==="script"&&u.querySelector($a(d))||(t=u.createElement("link"),At(t,"link",e),kt(t),u.head.appendChild(t)))}}function G1(e,t){Wn.m(e,t);var i=Qi;if(i&&e){var u=t&&typeof t.as=="string"?t.as:"script",o='link[rel="modulepreload"][as="'+cn(u)+'"][href="'+cn(e)+'"]',d=o;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=Xi(e)}if(!yn.has(d)&&(e=y({rel:"modulepreload",href:e},t),yn.set(d,e),i.querySelector(o)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector($a(d)))return}u=i.createElement("link"),At(u,"link",e),kt(u),i.head.appendChild(u)}}}function X1(e,t,i){Wn.S(e,t,i);var u=Qi;if(u&&e){var o=pi(u).hoistableStyles,d=Gi(e);t=t||"default";var x=o.get(d);if(!x){var S={loading:0,preload:null};if(x=u.querySelector(Ja(d)))S.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":t},i),(i=yn.get(d))&&Co(e,i);var C=x=u.createElement("link");kt(C),At(C,"link",e),C._p=new Promise(function(L,F){C.onload=L,C.onerror=F}),C.addEventListener("load",function(){S.loading|=1}),C.addEventListener("error",function(){S.loading|=2}),S.loading|=4,Tu(x,t,u)}x={type:"stylesheet",instance:x,count:1,state:S},o.set(d,x)}}}function K1(e,t){Wn.X(e,t);var i=Qi;if(i&&e){var u=pi(i).hoistableScripts,o=Xi(e),d=u.get(o);d||(d=i.querySelector($a(o)),d||(e=y({src:e,async:!0},t),(t=yn.get(o))&&Ao(e,t),d=i.createElement("script"),kt(d),At(d,"link",e),i.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},u.set(o,d))}}function J1(e,t){Wn.M(e,t);var i=Qi;if(i&&e){var u=pi(i).hoistableScripts,o=Xi(e),d=u.get(o);d||(d=i.querySelector($a(o)),d||(e=y({src:e,async:!0,type:"module"},t),(t=yn.get(o))&&Ao(e,t),d=i.createElement("script"),kt(d),At(d,"link",e),i.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},u.set(o,d))}}function Op(e,t,i,u){var o=(o=ye.current)?Nu(o):null;if(!o)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(t=Gi(i.href),i=pi(o).hoistableStyles,u=i.get(t),u||(u={type:"style",instance:null,count:0,state:null},i.set(t,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){e=Gi(i.href);var d=pi(o).hoistableStyles,x=d.get(e);if(x||(o=o.ownerDocument||o,x={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(e,x),(d=o.querySelector(Ja(e)))&&!d._p&&(x.instance=d,x.state.loading=5),yn.has(e)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},yn.set(e,i),d||$1(o,e,i,x.state))),t&&u===null)throw Error(r(528,""));return x}if(t&&u!==null)throw Error(r(529,""));return null;case"script":return t=i.async,i=i.src,typeof i=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Xi(i),i=pi(o).hoistableScripts,u=i.get(t),u||(u={type:"script",instance:null,count:0,state:null},i.set(t,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function Gi(e){return'href="'+cn(e)+'"'}function Ja(e){return'link[rel="stylesheet"]['+e+"]"}function Rp(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function $1(e,t,i,u){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?u.loading=1:(t=e.createElement("link"),u.preload=t,t.addEventListener("load",function(){return u.loading|=1}),t.addEventListener("error",function(){return u.loading|=2}),At(t,"link",i),kt(t),e.head.appendChild(t))}function Xi(e){return'[src="'+cn(e)+'"]'}function $a(e){return"script[async]"+e}function Lp(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var u=e.querySelector('style[data-href~="'+cn(i.href)+'"]');if(u)return t.instance=u,kt(u),u;var o=y({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return u=(e.ownerDocument||e).createElement("style"),kt(u),At(u,"style",o),Tu(u,i.precedence,e),t.instance=u;case"stylesheet":o=Gi(i.href);var d=e.querySelector(Ja(o));if(d)return t.state.loading|=4,t.instance=d,kt(d),d;u=Rp(i),(o=yn.get(o))&&Co(u,o),d=(e.ownerDocument||e).createElement("link"),kt(d);var x=d;return x._p=new Promise(function(S,C){x.onload=S,x.onerror=C}),At(d,"link",u),t.state.loading|=4,Tu(d,i.precedence,e),t.instance=d;case"script":return d=Xi(i.src),(o=e.querySelector($a(d)))?(t.instance=o,kt(o),o):(u=i,(o=yn.get(d))&&(u=y({},i),Ao(u,o)),e=e.ownerDocument||e,o=e.createElement("script"),kt(o),At(o,"link",u),e.head.appendChild(o),t.instance=o);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(u=t.instance,t.state.loading|=4,Tu(u,i.precedence,e));return t.instance}function Tu(e,t,i){for(var u=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=u.length?u[u.length-1]:null,d=o,x=0;x<u.length;x++){var S=u[x];if(S.dataset.precedence===t)d=S;else if(d!==o)break}d?d.parentNode.insertBefore(e,d.nextSibling):(t=i.nodeType===9?i.head:i,t.insertBefore(e,t.firstChild))}function Co(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Ao(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var ju=null;function Bp(e,t,i){if(ju===null){var u=new Map,o=ju=new Map;o.set(i,u)}else o=ju,u=o.get(i),u||(u=new Map,o.set(i,u));if(u.has(e))return u;for(u.set(e,null),i=i.getElementsByTagName(e),o=0;o<i.length;o++){var d=i[o];if(!(d[ha]||d[wt]||e==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var x=d.getAttribute(t)||"";x=e+x;var S=u.get(x);S?S.push(d):u.set(x,[d])}}return u}function Up(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function P1(e,t,i){if(i===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Hp(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function W1(e,t,i,u){if(i.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var o=Gi(u.href),d=t.querySelector(Ja(o));if(d){t=d._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=zu.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=d,kt(d);return}d=t.ownerDocument||t,u=Rp(u),(o=yn.get(o))&&Co(u,o),d=d.createElement("link"),kt(d);var x=d;x._p=new Promise(function(S,C){x.onload=S,x.onerror=C}),At(d,"link",u),i.instance=d}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,t),(t=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=zu.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var No=0;function eb(e,t){return e.stylesheets&&e.count===0&&Mu(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var u=setTimeout(function(){if(e.stylesheets&&Mu(e,e.stylesheets),e.unsuspend){var d=e.unsuspend;e.unsuspend=null,d()}},6e4+t);0<e.imgBytes&&No===0&&(No=62500*O1());var o=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Mu(e,e.stylesheets),e.unsuspend)){var d=e.unsuspend;e.unsuspend=null,d()}},(e.imgBytes>No?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(u),clearTimeout(o)}}:null}function zu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Mu(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Du=null;function Mu(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Du=new Map,t.forEach(tb,e),Du=null,zu.call(e))}function tb(e,t){if(!(t.state.loading&4)){var i=Du.get(e);if(i)var u=i.get(null);else{i=new Map,Du.set(e,i);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<o.length;d++){var x=o[d];(x.nodeName==="LINK"||x.getAttribute("media")!=="not all")&&(i.set(x.dataset.precedence,x),u=x)}u&&i.set(null,u)}o=t.instance,x=o.getAttribute("data-precedence"),d=i.get(x)||u,d===u&&i.set(null,o),i.set(x,o),this.count++,u=zu.bind(this),o.addEventListener("load",u),o.addEventListener("error",u),d?d.parentNode.insertBefore(o,d.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(o,e.firstChild)),t.state.loading|=4}}var Pa={$$typeof:H,Provider:null,Consumer:null,_currentValue:ue,_currentValue2:ue,_threadCount:0};function nb(e,t,i,u,o,d,x,S,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=Ss(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ss(0),this.hiddenUpdates=Ss(null),this.identifierPrefix=u,this.onUncaughtError=o,this.onCaughtError=d,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=C,this.incompleteTransitions=new Map}function qp(e,t,i,u,o,d,x,S,C,L,F,K){return e=new nb(e,t,i,x,C,L,F,K,S),t=1,d===!0&&(t|=24),d=Jt(3,null,null,t),e.current=d,d.stateNode=e,t=rc(),t.refCount++,e.pooledCache=t,t.refCount++,d.memoizedState={element:u,isDehydrated:i,cache:t},oc(d),e}function Vp(e){return e?(e=Ei,e):Ei}function Yp(e,t,i,u,o,d){o=Vp(o),u.context===null?u.context=o:u.pendingContext=o,u=fl(t),u.payload={element:i},d=d===void 0?null:d,d!==null&&(u.callback=d),i=dl(e,u,t),i!==null&&(Zt(i,e,t),ja(i,e,t))}function Zp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function To(e,t){Zp(e,t),(e=e.alternate)&&Zp(e,t)}function Ip(e){if(e.tag===13||e.tag===31){var t=Yl(e,67108864);t!==null&&Zt(t,e,67108864),To(e,67108864)}}function Fp(e){if(e.tag===13||e.tag===31){var t=tn();t=ws(t);var i=Yl(e,t);i!==null&&Zt(i,e,t),To(e,t)}}var Ou=!0;function lb(e,t,i,u){var o=T.T;T.T=null;var d=$.p;try{$.p=2,jo(e,t,i,u)}finally{$.p=d,T.T=o}}function ib(e,t,i,u){var o=T.T;T.T=null;var d=$.p;try{$.p=8,jo(e,t,i,u)}finally{$.p=d,T.T=o}}function jo(e,t,i,u){if(Ou){var o=zo(u);if(o===null)go(e,t,u,Ru,i),Gp(e,u);else if(rb(o,e,t,i,u))u.stopPropagation();else if(Gp(e,u),t&4&&-1<ab.indexOf(e)){for(;o!==null;){var d=mi(o);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var x=Bl(d.pendingLanes);if(x!==0){var S=d;for(S.pendingLanes|=2,S.entangledLanes|=2;x;){var C=1<<31-Pe(x);S.entanglements[1]|=C,x&=~C}Nn(d),(Ie&6)===0&&(yu=Dt()+500,Qa(0))}}break;case 31:case 13:S=Yl(d,2),S!==null&&Zt(S,d,2),bu(),To(d,2)}if(d=zo(u),d===null&&go(e,t,u,Ru,i),d===o)break;o=d}o!==null&&u.stopPropagation()}else go(e,t,u,null,i)}}function zo(e){return e=Ds(e),Do(e)}var Ru=null;function Do(e){if(Ru=null,e=hi(e),e!==null){var t=c(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=f(t),e!==null)return e;e=null}else if(i===31){if(e=h(t),e!==null)return e;e=null}else if(i===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Ru=e,null}function Qp(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(ks()){case G:return 2;case ie:return 8;case Se:case ze:return 32;case Fe:return 268435456;default:return 32}default:return 32}}var Mo=!1,wl=null,_l=null,El=null,Wa=new Map,er=new Map,Cl=[],ab="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 Gp(e,t){switch(e){case"focusin":case"focusout":wl=null;break;case"dragenter":case"dragleave":_l=null;break;case"mouseover":case"mouseout":El=null;break;case"pointerover":case"pointerout":Wa.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":er.delete(t.pointerId)}}function tr(e,t,i,u,o,d){return e===null||e.nativeEvent!==d?(e={blockedOn:t,domEventName:i,eventSystemFlags:u,nativeEvent:d,targetContainers:[o]},t!==null&&(t=mi(t),t!==null&&Ip(t)),e):(e.eventSystemFlags|=u,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function rb(e,t,i,u,o){switch(t){case"focusin":return wl=tr(wl,e,t,i,u,o),!0;case"dragenter":return _l=tr(_l,e,t,i,u,o),!0;case"mouseover":return El=tr(El,e,t,i,u,o),!0;case"pointerover":var d=o.pointerId;return Wa.set(d,tr(Wa.get(d)||null,e,t,i,u,o)),!0;case"gotpointercapture":return d=o.pointerId,er.set(d,tr(er.get(d)||null,e,t,i,u,o)),!0}return!1}function Xp(e){var t=hi(e.target);if(t!==null){var i=c(t);if(i!==null){if(t=i.tag,t===13){if(t=f(i),t!==null){e.blockedOn=t,sd(e.priority,function(){Fp(i)});return}}else if(t===31){if(t=h(i),t!==null){e.blockedOn=t,sd(e.priority,function(){Fp(i)});return}}else if(t===3&&i.stateNode.current.memoizedState.isDehydrated){e.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Lu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=zo(e.nativeEvent);if(i===null){i=e.nativeEvent;var u=new i.constructor(i.type,i);zs=u,i.target.dispatchEvent(u),zs=null}else return t=mi(i),t!==null&&Ip(t),e.blockedOn=i,!1;t.shift()}return!0}function Kp(e,t,i){Lu(e)&&i.delete(t)}function ub(){Mo=!1,wl!==null&&Lu(wl)&&(wl=null),_l!==null&&Lu(_l)&&(_l=null),El!==null&&Lu(El)&&(El=null),Wa.forEach(Kp),er.forEach(Kp)}function Bu(e,t){e.blockedOn===t&&(e.blockedOn=null,Mo||(Mo=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,ub)))}var Uu=null;function Jp(e){Uu!==e&&(Uu=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Uu===e&&(Uu=null);for(var t=0;t<e.length;t+=3){var i=e[t],u=e[t+1],o=e[t+2];if(typeof u!="function"){if(Do(u||i)===null)continue;break}var d=mi(i);d!==null&&(e.splice(t,3),t-=3,jc(d,{pending:!0,data:o,method:i.method,action:u},u,o))}}))}function Ki(e){function t(C){return Bu(C,e)}wl!==null&&Bu(wl,e),_l!==null&&Bu(_l,e),El!==null&&Bu(El,e),Wa.forEach(t),er.forEach(t);for(var i=0;i<Cl.length;i++){var u=Cl[i];u.blockedOn===e&&(u.blockedOn=null)}for(;0<Cl.length&&(i=Cl[0],i.blockedOn===null);)Xp(i),i.blockedOn===null&&Cl.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(u=0;u<i.length;u+=3){var o=i[u],d=i[u+1],x=o[Bt]||null;if(typeof d=="function")x||Jp(i);else if(x){var S=null;if(d&&d.hasAttribute("formAction")){if(o=d,x=d[Bt]||null)S=x.formAction;else if(Do(o)!==null)continue}else S=x.action;typeof S=="function"?i[u+1]=S:(i.splice(u,3),u-=3),Jp(i)}}}function $p(){function e(d){d.canIntercept&&d.info==="react-transition"&&d.intercept({handler:function(){return new Promise(function(x){return o=x})},focusReset:"manual",scroll:"manual"})}function t(){o!==null&&(o(),o=null),u||setTimeout(i,20)}function i(){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,o=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(i,100),function(){u=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),o!==null&&(o(),o=null)}}}function Oo(e){this._internalRoot=e}Hu.prototype.render=Oo.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var i=t.current,u=tn();Yp(i,u,e,t,null,null)},Hu.prototype.unmount=Oo.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Yp(e.current,2,null,e,null,null),bu(),t[di]=null}};function Hu(e){this._internalRoot=e}Hu.prototype.unstable_scheduleHydration=function(e){if(e){var t=ud();e={blockedOn:null,target:e,priority:t};for(var i=0;i<Cl.length&&t!==0&&t<Cl[i].priority;i++);Cl.splice(i,0,e),i===0&&Xp(e)}};var Pp=l.version;if(Pp!=="19.2.7")throw Error(r(527,Pp,"19.2.7"));$.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=m(t),e=e!==null?b(e):null,e=e===null?null:e.stateNode,e};var sb={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:T,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var qu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!qu.isDisabled&&qu.supportsFiber)try{Mt=qu.inject(sb),bt=qu}catch{}}return lr.createRoot=function(e,t){if(!s(e))throw Error(r(299));var i=!1,u="",o=am,d=rm,x=um;return t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(u=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(d=t.onCaughtError),t.onRecoverableError!==void 0&&(x=t.onRecoverableError)),t=qp(e,1,!1,null,null,i,u,null,o,d,x,$p),e[di]=t.current,po(e),new Oo(t)},lr.hydrateRoot=function(e,t,i){if(!s(e))throw Error(r(299));var u=!1,o="",d=am,x=rm,S=um,C=null;return i!=null&&(i.unstable_strictMode===!0&&(u=!0),i.identifierPrefix!==void 0&&(o=i.identifierPrefix),i.onUncaughtError!==void 0&&(d=i.onUncaughtError),i.onCaughtError!==void 0&&(x=i.onCaughtError),i.onRecoverableError!==void 0&&(S=i.onRecoverableError),i.formState!==void 0&&(C=i.formState)),t=qp(e,1,!0,t,i??null,u,o,C,d,x,S,$p),t.context=Vp(null),i=t.current,u=tn(),u=ws(u),o=fl(u),o.callback=null,dl(i,o,u),i=u,t.current.lanes=i,da(t,i),Nn(t),e[di]=t.current,po(e),new Hu(t)},lr.version="19.2.7",lr}var sg;function xb(){if(sg)return Bo.exports;sg=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(l){console.error(l)}}return n(),Bo.exports=yb(),Bo.exports}var bb=xb();const Sy=new Map,Vo=new Map;function sf(n){return Sy.get(n)??null}function vb(n,l){l.models.length!==0&&Sy.set(n,l)}function kb(n,l){const a=sf(n);if(a)return Promise.resolve(a);const r=Vo.get(n);if(r)return r;const s=l().then(c=>(vb(n,c),c)).finally(()=>Vo.delete(n));return Vo.set(n,s),s}const it="";async function cg(){const n=await fetch(`${it}/api/snapshot`);if(!n.ok)throw new Error("Failed to fetch snapshot");return n.json()}async function Wi(n){const l=await fetch(`${it}/api/runs/${n}`);if(!l.ok)throw new Error("Not found");return l.json()}async function Sb(){const n=await fetch(`${it}/api/intake/linear`);if(!n.ok)throw new Error(await n.text());return(await n.json()).candidates??[]}async function Gu(){const n=await fetch(`${it}/api/intake/linear/status`);if(!n.ok)throw new Error(await n.text());return n.json()}async function jf(){const n=await fetch(`${it}/api/intake/linear/config`);if(!n.ok)throw new Error(await n.text());return n.json()}async function wb(n){const l=await fetch(`${it}/api/intake/linear/config`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!l.ok)throw new Error(await l.text());return l.json()}async function _b(n,l){const a=await fetch(`${it}/api/intake/linear/${n}/promote`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)});if(!a.ok)throw new Error(await a.text());return a.json()}async function Eb(n){const l=await fetch(`${it}/api/agents`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!l.ok)throw new Error(await l.text());return l.json()}async function Cb(n,l){const a=await fetch(`${it}/api/agents/${n}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)});if(!a.ok)throw new Error(await a.text());return a.json()}async function Ab(n){const l=await fetch(`${it}/api/agents/${n}`,{method:"DELETE"});if(!l.ok)throw new Error(await l.text())}async function zf(n){const l=await fetch(`${it}/api/runs/${n}/cancel`,{method:"POST"});if(!l.ok)throw new Error(await l.text());return l.json()}async function Nb(n){const l=await fetch(`${it}/api/runs`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!l.ok)throw new Error(await l.text());return l.json()}async function og(n,l,a,r){const s=await fetch(`${it}/api/runs/${n}/plan`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({planMarkdown:l,approve:a,...(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 Tb(n,l,a){const r=await fetch(`${it}/api/runs/${n}/draft-plan`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...l!==void 0?{planModel:l}:{},...a!==void 0?{planBudget:a}:{}})});if(!r.ok)throw new Error(await r.text());return r.json()}async function jb(n,l,a){const r=await fetch(`${it}/api/runs/${n}/kick`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...l!=null&&l.trim()?{executeModel:l.trim()}:{},...a!==void 0?{executeBudget:a}:{}})});if(!r.ok)throw new Error(await r.text());return r.json()}async function zb(n){const l=await fetch(`${it}/api/runs/${n}/approve`,{method:"POST"});if(!l.ok)throw new Error(await l.text());return l.json()}async function Db(n,l,a){const r=await fetch(`${it}/api/runs/${n}/retry`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({feedback:l,...a!==void 0?{executeModel:a}:{}})});if(!r.ok)throw new Error(await r.text());return r.json()}async function Mb(n){const l=await fetch(`${it}/api/runs/${n}/playbook-patch/apply`,{method:"POST"});if(!l.ok)throw new Error(await l.text());return l.json()}async function Ob(n){const l=await fetch(`${it}/api/runs/${n}/playbook-patch/dismiss`,{method:"POST"});if(!l.ok)throw new Error(await l.text());return l.json()}async function Rb(n,l){return kb(n,async()=>{const r=await fetch(`${it}/api/runtimes/${n}/models`);if(!r.ok)throw new Error(await r.text());return r.json()})}async function Lb(){const n=await fetch(`${it}/api/agent-deck/status`);if(!n.ok)throw new Error(await n.text());return n.json()}async function Bb(){return(await(await fetch(`${it}/api/agent-deck/decks`)).json()).data??[]}async function Ub(n){return(await(await fetch(`${it}/api/agent-deck/decks/${n}/playbooks`)).json()).data??[]}function Hb(n){const l=new EventSource(`${it}/api/events`);return l.onmessage=a=>{try{n(JSON.parse(a.data))}catch{}},l.onerror=()=>{l.close()},()=>l.close()}async function qb(n,l="transcript"){const a=await fetch(`${it}/api/runs/${n}/log-tail?kind=${l}`);if(!a.ok)throw new Error(await a.text());return(await a.json()).content}function ea(n){if(!n.contentJson)return null;try{return JSON.parse(n.contentJson)}catch{return null}}function Xu(n){if(!n.contentJson)return n.blobPath??"";try{const l=JSON.parse(n.contentJson);return l.markdown??l.resultText??l.excerpt??n.contentJson}catch{return n.contentJson}}function el(n,l){return[...n].reverse().find(a=>a.kind===l)}function Vb(n){var a;const l=el(n,"task_snapshot");if(!(l!=null&&l.contentJson))return null;try{const s=(a=JSON.parse(l.contentJson).url)==null?void 0:a.trim();return s!=null&&s.startsWith("http")?s:null}catch{return null}}function wy(n,l,a){const r=n.filter(c=>c.kind===l);for(let c=r.length-1;c>=0;c--){const f=ea(r[c]);if(f&&f.phase===a)return f}const s=r[r.length-1];return s?ea(s):null}function Ku(n,l=Date.now()){const a=l-new Date(n).getTime();if(a<0)return"just now";const r=Math.floor(a/1e3);if(r<60)return"just now";const s=Math.floor(r/60);if(s<60)return`${s}m ago`;const c=Math.floor(s/60);if(c<24)return`${c}h ago`;const f=Math.floor(c/24);return f<7?`${f}d ago`:new Date(n).toLocaleDateString(void 0,{month:"short",day:"numeric"})}function _y(n){if(n<1e3)return`${Math.round(n)}ms`;const l=Math.round(n/1e3),a=Math.floor(l/60),r=l%60;if(a>=60){const s=Math.floor(a/60),c=a%60;return c>0?`${s}h ${c}m`:`${s}h`}return a>0?r>0?`${a}m ${r}s`:`${a}m`:`${r}s`}function ii(n){return n==="claude_code"?"Claude":n==="cursor_local"?"Cursor":"No agent"}function us(n){return n==="claude_code"?"bg-[#D4A574]/20 text-[#E8C9A8] border-[#D4A574]/40":n==="cursor_local"?"bg-[#7EB8FF]/15 text-[#A8D4FF] border-[#7EB8FF]/35":"bg-white/5 text-white/50 border-white/15"}function Df(n){return{code:"Code",communication:"Slack",email:"Email",research:"Research",content:"Content",other:"Other"}[n]??n}function Ju(n){return n.source==="linear"&&n.externalLabel?n.externalLabel:n.source==="linear"&&n.externalId?n.externalId:n.source==="linear"?"Linear":"Manual"}function Ey(n,l){switch(n){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:n,tone:"bg-white/5 text-white/60 border-white/15",accent:"border-l-white/20"}}}function Mf(n){return n.deckName?n.deckName:n.deckId?`deck ${n.deckId.slice(0,8)}…`:null}function ut({children:n,className:l="",title:a}){return g.jsx("span",{title:a,className:`inline-flex items-center gap-1 rounded px-2 py-0.5 text-xs font-medium uppercase tracking-wide border ${l}`,children:n})}function Cy({index:n,total:l,onPrev:a,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:a,disabled:n<=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:[n+1," / ",l]}),g.jsx("button",{type:"button",onClick:r,disabled:n>=l-1,className:"btn-ghost px-2.5 py-1.5 disabled:opacity-30",title:"Next","aria-label":"Next in queue",children:"→"})]})}var Ze;(function(n){n.assertEqual=s=>{};function l(s){}n.assertIs=l;function a(s){throw new Error}n.assertNever=a,n.arrayToEnum=s=>{const c={};for(const f of s)c[f]=f;return c},n.getValidEnumValues=s=>{const c=n.objectKeys(s).filter(h=>typeof s[s[h]]!="number"),f={};for(const h of c)f[h]=s[h];return n.objectValues(f)},n.objectValues=s=>n.objectKeys(s).map(function(c){return s[c]}),n.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const c=[];for(const f in s)Object.prototype.hasOwnProperty.call(s,f)&&c.push(f);return c},n.find=(s,c)=>{for(const f of s)if(c(f))return f},n.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function r(s,c=" | "){return s.map(f=>typeof f=="string"?`'${f}'`:f).join(c)}n.joinValues=r,n.jsonStringifyReplacer=(s,c)=>typeof c=="bigint"?c.toString():c})(Ze||(Ze={}));var fg;(function(n){n.mergeShapes=(l,a)=>({...l,...a})})(fg||(fg={}));const he=Ze.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),jl=n=>{switch(typeof n){case"undefined":return he.undefined;case"string":return he.string;case"number":return Number.isNaN(n)?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(n)?he.array:n===null?he.null:n.then&&typeof n.then=="function"&&n.catch&&typeof n.catch=="function"?he.promise:typeof Map<"u"&&n instanceof Map?he.map:typeof Set<"u"&&n instanceof Set?he.set:typeof Date<"u"&&n instanceof Date?he.date:he.object;default:return he.unknown}},ne=Ze.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 tl 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 a=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,a):this.__proto__=a,this.name="ZodError",this.issues=l}format(l){const a=l||function(c){return c.message},r={_errors:[]},s=c=>{for(const f of c.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(a(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(a(f))):h[m]=h[m]||{_errors:[]},h=h[m],p++}}};return s(this),r}static assert(l){if(!(l instanceof tl))throw new Error(`Not a ZodError: ${l}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ze.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(l=a=>a.message){const a={},r=[];for(const s of this.issues)if(s.path.length>0){const c=s.path[0];a[c]=a[c]||[],a[c].push(l(s))}else r.push(l(s));return{formErrors:r,fieldErrors:a}}get formErrors(){return this.flatten()}}tl.create=n=>new tl(n);const cf=(n,l)=>{let a;switch(n.code){case ne.invalid_type:n.received===he.undefined?a="Required":a=`Expected ${n.expected}, received ${n.received}`;break;case ne.invalid_literal:a=`Invalid literal value, expected ${JSON.stringify(n.expected,Ze.jsonStringifyReplacer)}`;break;case ne.unrecognized_keys:a=`Unrecognized key(s) in object: ${Ze.joinValues(n.keys,", ")}`;break;case ne.invalid_union:a="Invalid input";break;case ne.invalid_union_discriminator:a=`Invalid discriminator value. Expected ${Ze.joinValues(n.options)}`;break;case ne.invalid_enum_value:a=`Invalid enum value. Expected ${Ze.joinValues(n.options)}, received '${n.received}'`;break;case ne.invalid_arguments:a="Invalid function arguments";break;case ne.invalid_return_type:a="Invalid function return type";break;case ne.invalid_date:a="Invalid date";break;case ne.invalid_string:typeof n.validation=="object"?"includes"in n.validation?(a=`Invalid input: must include "${n.validation.includes}"`,typeof n.validation.position=="number"&&(a=`${a} at one or more positions greater than or equal to ${n.validation.position}`)):"startsWith"in n.validation?a=`Invalid input: must start with "${n.validation.startsWith}"`:"endsWith"in n.validation?a=`Invalid input: must end with "${n.validation.endsWith}"`:Ze.assertNever(n.validation):n.validation!=="regex"?a=`Invalid ${n.validation}`:a="Invalid";break;case ne.too_small:n.type==="array"?a=`Array must contain ${n.exact?"exactly":n.inclusive?"at least":"more than"} ${n.minimum} element(s)`:n.type==="string"?a=`String must contain ${n.exact?"exactly":n.inclusive?"at least":"over"} ${n.minimum} character(s)`:n.type==="number"?a=`Number must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${n.minimum}`:n.type==="bigint"?a=`Number must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${n.minimum}`:n.type==="date"?a=`Date must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(n.minimum))}`:a="Invalid input";break;case ne.too_big:n.type==="array"?a=`Array must contain ${n.exact?"exactly":n.inclusive?"at most":"less than"} ${n.maximum} element(s)`:n.type==="string"?a=`String must contain ${n.exact?"exactly":n.inclusive?"at most":"under"} ${n.maximum} character(s)`:n.type==="number"?a=`Number must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:n.type==="bigint"?a=`BigInt must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:n.type==="date"?a=`Date must be ${n.exact?"exactly":n.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(n.maximum))}`:a="Invalid input";break;case ne.custom:a="Invalid input";break;case ne.invalid_intersection_types:a="Intersection results could not be merged";break;case ne.not_multiple_of:a=`Number must be a multiple of ${n.multipleOf}`;break;case ne.not_finite:a="Number must be finite";break;default:a=l.defaultError,Ze.assertNever(n)}return{message:a}};let Yb=cf;function Zb(){return Yb}const Ib=n=>{const{data:l,path:a,errorMaps:r,issueData:s}=n,c=[...a,...s.path||[]],f={...s,path:c};if(s.message!==void 0)return{...s,path:c,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:c,message:h}};function se(n,l){const a=Zb(),r=Ib({issueData:l,data:n.data,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,a,a===cf?void 0:cf].filter(s=>!!s)});n.common.issues.push(r)}class rn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(l,a){const r=[];for(const s of a){if(s.status==="aborted")return Ee;s.status==="dirty"&&l.dirty(),r.push(s.value)}return{status:l.value,value:r}}static async mergeObjectAsync(l,a){const r=[];for(const s of a){const c=await s.key,f=await s.value;r.push({key:c,value:f})}return rn.mergeObjectSync(l,r)}static mergeObjectSync(l,a){const r={};for(const s of a){const{key:c,value:f}=s;if(c.status==="aborted"||f.status==="aborted")return Ee;c.status==="dirty"&&l.dirty(),f.status==="dirty"&&l.dirty(),c.value!=="__proto__"&&(typeof f.value<"u"||s.alwaysSet)&&(r[c.value]=f.value)}return{status:l.value,value:r}}}const Ee=Object.freeze({status:"aborted"}),sr=n=>({status:"dirty",value:n}),bn=n=>({status:"valid",value:n}),dg=n=>n.status==="aborted",hg=n=>n.status==="dirty",ta=n=>n.status==="valid",$u=n=>typeof Promise<"u"&&n instanceof Promise;var ge;(function(n){n.errToObj=l=>typeof l=="string"?{message:l}:l||{},n.toString=l=>typeof l=="string"?l:l==null?void 0:l.message})(ge||(ge={}));class Ol{constructor(l,a,r,s){this._cachedPath=[],this.parent=l,this.data=a,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 mg=(n,l)=>{if(ta(l))return{success:!0,data:l.value};if(!n.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const a=new tl(n.common.issues);return this._error=a,this._error}}};function je(n){if(!n)return{};const{errorMap:l,invalid_type_error:a,required_error:r,description:s}=n;if(l&&(a||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}=n;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??a??h.defaultError}},description:s}}class qe{get description(){return this._def.description}_getType(l){return jl(l.data)}_getOrReturnCtx(l,a){return a||{common:l.parent.common,data:l.data,parsedType:jl(l.data),schemaErrorMap:this._def.errorMap,path:l.path,parent:l.parent}}_processInputParams(l){return{status:new rn,ctx:{common:l.parent.common,data:l.data,parsedType:jl(l.data),schemaErrorMap:this._def.errorMap,path:l.path,parent:l.parent}}}_parseSync(l){const a=this._parse(l);if($u(a))throw new Error("Synchronous parse encountered promise.");return a}_parseAsync(l){const a=this._parse(l);return Promise.resolve(a)}parse(l,a){const r=this.safeParse(l,a);if(r.success)return r.data;throw r.error}safeParse(l,a){const r={common:{issues:[],async:(a==null?void 0:a.async)??!1,contextualErrorMap:a==null?void 0:a.errorMap},path:(a==null?void 0:a.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:l,parsedType:jl(l)},s=this._parseSync({data:l,path:r.path,parent:r});return mg(r,s)}"~validate"(l){var r,s;const a={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:l,parsedType:jl(l)};if(!this["~standard"].async)try{const c=this._parseSync({data:l,path:[],parent:a});return ta(c)?{value:c.value}:{issues:a.common.issues}}catch(c){(s=(r=c==null?void 0:c.message)==null?void 0:r.toLowerCase())!=null&&s.includes("encountered")&&(this["~standard"].async=!0),a.common={issues:[],async:!0}}return this._parseAsync({data:l,path:[],parent:a}).then(c=>ta(c)?{value:c.value}:{issues:a.common.issues})}async parseAsync(l,a){const r=await this.safeParseAsync(l,a);if(r.success)return r.data;throw r.error}async safeParseAsync(l,a){const r={common:{issues:[],contextualErrorMap:a==null?void 0:a.errorMap,async:!0},path:(a==null?void 0:a.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:l,parsedType:jl(l)},s=this._parse({data:l,path:r.path,parent:r}),c=await($u(s)?s:Promise.resolve(s));return mg(r,c)}refine(l,a){const r=s=>typeof a=="string"||typeof a>"u"?{message:a}:typeof a=="function"?a(s):a;return this._refinement((s,c)=>{const f=l(s),h=()=>c.addIssue({code:ne.custom,...r(s)});return typeof Promise<"u"&&f instanceof Promise?f.then(p=>p?!0:(h(),!1)):f?!0:(h(),!1)})}refinement(l,a){return this._refinement((r,s)=>l(r)?!0:(s.addIssue(typeof a=="function"?a(r,s):a),!1))}_refinement(l){return new ia({schema:this,typeName:Ce.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:a=>this["~validate"](a)}}optional(){return Ml.create(this,this._def)}nullable(){return aa.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return jn.create(this)}promise(){return ts.create(this,this._def)}or(l){return Wu.create([this,l],this._def)}and(l){return es.create(this,l,this._def)}transform(l){return new ia({...je(this._def),schema:this,typeName:Ce.ZodEffects,effect:{type:"transform",transform:l}})}default(l){const a=typeof l=="function"?l:()=>l;return new df({...je(this._def),innerType:this,defaultValue:a,typeName:Ce.ZodDefault})}brand(){return new hv({typeName:Ce.ZodBranded,type:this,...je(this._def)})}catch(l){const a=typeof l=="function"?l:()=>l;return new hf({...je(this._def),innerType:this,catchValue:a,typeName:Ce.ZodCatch})}describe(l){const a=this.constructor;return new a({...this._def,description:l})}pipe(l){return Of.create(this,l)}readonly(){return mf.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Fb=/^c[^\s-]{8,}$/i,Qb=/^[0-9a-z]+$/,Gb=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Xb=/^[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,Kb=/^[a-z0-9_-]{21}$/i,Jb=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,$b=/^[-+]?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)?)??$/,Pb=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Wb="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Yo;const ev=/^(?:(?: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])$/,tv=/^(?:(?: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])$/,nv=/^(([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]))$/,lv=/^(([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])$/,iv=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,av=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Ay="((\\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])))",rv=new RegExp(`^${Ay}$`);function Ny(n){let l="[0-5]\\d";n.precision?l=`${l}\\.\\d{${n.precision}}`:n.precision==null&&(l=`${l}(\\.\\d+)?`);const a=n.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${l})${a}`}function uv(n){return new RegExp(`^${Ny(n)}$`)}function sv(n){let l=`${Ay}T${Ny(n)}`;const a=[];return a.push(n.local?"Z?":"Z"),n.offset&&a.push("([+-]\\d{2}:?\\d{2})"),l=`${l}(${a.join("|")})`,new RegExp(`^${l}$`)}function cv(n,l){return!!((l==="v4"||!l)&&ev.test(n)||(l==="v6"||!l)&&nv.test(n))}function ov(n,l){if(!Jb.test(n))return!1;try{const[a]=n.split(".");if(!a)return!1;const r=a.replace(/-/g,"+").replace(/_/g,"/").padEnd(a.length+(4-a.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 fv(n,l){return!!((l==="v4"||!l)&&tv.test(n)||(l==="v6"||!l)&&lv.test(n))}class zl extends qe{_parse(l){if(this._def.coerce&&(l.data=String(l.data)),this._getType(l)!==he.string){const c=this._getOrReturnCtx(l);return se(c,{code:ne.invalid_type,expected:he.string,received:c.parsedType}),Ee}const r=new rn;let s;for(const c of this._def.checks)if(c.kind==="min")l.data.length<c.value&&(s=this._getOrReturnCtx(l,s),se(s,{code:ne.too_small,minimum:c.value,type:"string",inclusive:!0,exact:!1,message:c.message}),r.dirty());else if(c.kind==="max")l.data.length>c.value&&(s=this._getOrReturnCtx(l,s),se(s,{code:ne.too_big,maximum:c.value,type:"string",inclusive:!0,exact:!1,message:c.message}),r.dirty());else if(c.kind==="length"){const f=l.data.length>c.value,h=l.data.length<c.value;(f||h)&&(s=this._getOrReturnCtx(l,s),f?se(s,{code:ne.too_big,maximum:c.value,type:"string",inclusive:!0,exact:!0,message:c.message}):h&&se(s,{code:ne.too_small,minimum:c.value,type:"string",inclusive:!0,exact:!0,message:c.message}),r.dirty())}else if(c.kind==="email")Pb.test(l.data)||(s=this._getOrReturnCtx(l,s),se(s,{validation:"email",code:ne.invalid_string,message:c.message}),r.dirty());else if(c.kind==="emoji")Yo||(Yo=new RegExp(Wb,"u")),Yo.test(l.data)||(s=this._getOrReturnCtx(l,s),se(s,{validation:"emoji",code:ne.invalid_string,message:c.message}),r.dirty());else if(c.kind==="uuid")Xb.test(l.data)||(s=this._getOrReturnCtx(l,s),se(s,{validation:"uuid",code:ne.invalid_string,message:c.message}),r.dirty());else if(c.kind==="nanoid")Kb.test(l.data)||(s=this._getOrReturnCtx(l,s),se(s,{validation:"nanoid",code:ne.invalid_string,message:c.message}),r.dirty());else if(c.kind==="cuid")Fb.test(l.data)||(s=this._getOrReturnCtx(l,s),se(s,{validation:"cuid",code:ne.invalid_string,message:c.message}),r.dirty());else if(c.kind==="cuid2")Qb.test(l.data)||(s=this._getOrReturnCtx(l,s),se(s,{validation:"cuid2",code:ne.invalid_string,message:c.message}),r.dirty());else if(c.kind==="ulid")Gb.test(l.data)||(s=this._getOrReturnCtx(l,s),se(s,{validation:"ulid",code:ne.invalid_string,message:c.message}),r.dirty());else if(c.kind==="url")try{new URL(l.data)}catch{s=this._getOrReturnCtx(l,s),se(s,{validation:"url",code:ne.invalid_string,message:c.message}),r.dirty()}else c.kind==="regex"?(c.regex.lastIndex=0,c.regex.test(l.data)||(s=this._getOrReturnCtx(l,s),se(s,{validation:"regex",code:ne.invalid_string,message:c.message}),r.dirty())):c.kind==="trim"?l.data=l.data.trim():c.kind==="includes"?l.data.includes(c.value,c.position)||(s=this._getOrReturnCtx(l,s),se(s,{code:ne.invalid_string,validation:{includes:c.value,position:c.position},message:c.message}),r.dirty()):c.kind==="toLowerCase"?l.data=l.data.toLowerCase():c.kind==="toUpperCase"?l.data=l.data.toUpperCase():c.kind==="startsWith"?l.data.startsWith(c.value)||(s=this._getOrReturnCtx(l,s),se(s,{code:ne.invalid_string,validation:{startsWith:c.value},message:c.message}),r.dirty()):c.kind==="endsWith"?l.data.endsWith(c.value)||(s=this._getOrReturnCtx(l,s),se(s,{code:ne.invalid_string,validation:{endsWith:c.value},message:c.message}),r.dirty()):c.kind==="datetime"?sv(c).test(l.data)||(s=this._getOrReturnCtx(l,s),se(s,{code:ne.invalid_string,validation:"datetime",message:c.message}),r.dirty()):c.kind==="date"?rv.test(l.data)||(s=this._getOrReturnCtx(l,s),se(s,{code:ne.invalid_string,validation:"date",message:c.message}),r.dirty()):c.kind==="time"?uv(c).test(l.data)||(s=this._getOrReturnCtx(l,s),se(s,{code:ne.invalid_string,validation:"time",message:c.message}),r.dirty()):c.kind==="duration"?$b.test(l.data)||(s=this._getOrReturnCtx(l,s),se(s,{validation:"duration",code:ne.invalid_string,message:c.message}),r.dirty()):c.kind==="ip"?cv(l.data,c.version)||(s=this._getOrReturnCtx(l,s),se(s,{validation:"ip",code:ne.invalid_string,message:c.message}),r.dirty()):c.kind==="jwt"?ov(l.data,c.alg)||(s=this._getOrReturnCtx(l,s),se(s,{validation:"jwt",code:ne.invalid_string,message:c.message}),r.dirty()):c.kind==="cidr"?fv(l.data,c.version)||(s=this._getOrReturnCtx(l,s),se(s,{validation:"cidr",code:ne.invalid_string,message:c.message}),r.dirty()):c.kind==="base64"?iv.test(l.data)||(s=this._getOrReturnCtx(l,s),se(s,{validation:"base64",code:ne.invalid_string,message:c.message}),r.dirty()):c.kind==="base64url"?av.test(l.data)||(s=this._getOrReturnCtx(l,s),se(s,{validation:"base64url",code:ne.invalid_string,message:c.message}),r.dirty()):Ze.assertNever(c);return{status:r.value,value:l.data}}_regex(l,a,r){return this.refinement(s=>l.test(s),{validation:a,code:ne.invalid_string,...ge.errToObj(r)})}_addCheck(l){return new zl({...this._def,checks:[...this._def.checks,l]})}email(l){return this._addCheck({kind:"email",...ge.errToObj(l)})}url(l){return this._addCheck({kind:"url",...ge.errToObj(l)})}emoji(l){return this._addCheck({kind:"emoji",...ge.errToObj(l)})}uuid(l){return this._addCheck({kind:"uuid",...ge.errToObj(l)})}nanoid(l){return this._addCheck({kind:"nanoid",...ge.errToObj(l)})}cuid(l){return this._addCheck({kind:"cuid",...ge.errToObj(l)})}cuid2(l){return this._addCheck({kind:"cuid2",...ge.errToObj(l)})}ulid(l){return this._addCheck({kind:"ulid",...ge.errToObj(l)})}base64(l){return this._addCheck({kind:"base64",...ge.errToObj(l)})}base64url(l){return this._addCheck({kind:"base64url",...ge.errToObj(l)})}jwt(l){return this._addCheck({kind:"jwt",...ge.errToObj(l)})}ip(l){return this._addCheck({kind:"ip",...ge.errToObj(l)})}cidr(l){return this._addCheck({kind:"cidr",...ge.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,...ge.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,...ge.errToObj(l==null?void 0:l.message)})}duration(l){return this._addCheck({kind:"duration",...ge.errToObj(l)})}regex(l,a){return this._addCheck({kind:"regex",regex:l,...ge.errToObj(a)})}includes(l,a){return this._addCheck({kind:"includes",value:l,position:a==null?void 0:a.position,...ge.errToObj(a==null?void 0:a.message)})}startsWith(l,a){return this._addCheck({kind:"startsWith",value:l,...ge.errToObj(a)})}endsWith(l,a){return this._addCheck({kind:"endsWith",value:l,...ge.errToObj(a)})}min(l,a){return this._addCheck({kind:"min",value:l,...ge.errToObj(a)})}max(l,a){return this._addCheck({kind:"max",value:l,...ge.errToObj(a)})}length(l,a){return this._addCheck({kind:"length",value:l,...ge.errToObj(a)})}nonempty(l){return this.min(1,ge.errToObj(l))}trim(){return new zl({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new zl({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new zl({...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 a of this._def.checks)a.kind==="min"&&(l===null||a.value>l)&&(l=a.value);return l}get maxLength(){let l=null;for(const a of this._def.checks)a.kind==="max"&&(l===null||a.value<l)&&(l=a.value);return l}}zl.create=n=>new zl({checks:[],typeName:Ce.ZodString,coerce:(n==null?void 0:n.coerce)??!1,...je(n)});function dv(n,l){const a=(n.toString().split(".")[1]||"").length,r=(l.toString().split(".")[1]||"").length,s=a>r?a:r,c=Number.parseInt(n.toFixed(s).replace(".","")),f=Number.parseInt(l.toFixed(s).replace(".",""));return c%f/10**s}class na extends qe{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 c=this._getOrReturnCtx(l);return se(c,{code:ne.invalid_type,expected:he.number,received:c.parsedType}),Ee}let r;const s=new rn;for(const c of this._def.checks)c.kind==="int"?Ze.isInteger(l.data)||(r=this._getOrReturnCtx(l,r),se(r,{code:ne.invalid_type,expected:"integer",received:"float",message:c.message}),s.dirty()):c.kind==="min"?(c.inclusive?l.data<c.value:l.data<=c.value)&&(r=this._getOrReturnCtx(l,r),se(r,{code:ne.too_small,minimum:c.value,type:"number",inclusive:c.inclusive,exact:!1,message:c.message}),s.dirty()):c.kind==="max"?(c.inclusive?l.data>c.value:l.data>=c.value)&&(r=this._getOrReturnCtx(l,r),se(r,{code:ne.too_big,maximum:c.value,type:"number",inclusive:c.inclusive,exact:!1,message:c.message}),s.dirty()):c.kind==="multipleOf"?dv(l.data,c.value)!==0&&(r=this._getOrReturnCtx(l,r),se(r,{code:ne.not_multiple_of,multipleOf:c.value,message:c.message}),s.dirty()):c.kind==="finite"?Number.isFinite(l.data)||(r=this._getOrReturnCtx(l,r),se(r,{code:ne.not_finite,message:c.message}),s.dirty()):Ze.assertNever(c);return{status:s.value,value:l.data}}gte(l,a){return this.setLimit("min",l,!0,ge.toString(a))}gt(l,a){return this.setLimit("min",l,!1,ge.toString(a))}lte(l,a){return this.setLimit("max",l,!0,ge.toString(a))}lt(l,a){return this.setLimit("max",l,!1,ge.toString(a))}setLimit(l,a,r,s){return new na({...this._def,checks:[...this._def.checks,{kind:l,value:a,inclusive:r,message:ge.toString(s)}]})}_addCheck(l){return new na({...this._def,checks:[...this._def.checks,l]})}int(l){return this._addCheck({kind:"int",message:ge.toString(l)})}positive(l){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ge.toString(l)})}negative(l){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ge.toString(l)})}nonpositive(l){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ge.toString(l)})}nonnegative(l){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ge.toString(l)})}multipleOf(l,a){return this._addCheck({kind:"multipleOf",value:l,message:ge.toString(a)})}finite(l){return this._addCheck({kind:"finite",message:ge.toString(l)})}safe(l){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ge.toString(l)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ge.toString(l)})}get minValue(){let l=null;for(const a of this._def.checks)a.kind==="min"&&(l===null||a.value>l)&&(l=a.value);return l}get maxValue(){let l=null;for(const a of this._def.checks)a.kind==="max"&&(l===null||a.value<l)&&(l=a.value);return l}get isInt(){return!!this._def.checks.find(l=>l.kind==="int"||l.kind==="multipleOf"&&Ze.isInteger(l.value))}get isFinite(){let l=null,a=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(a===null||r.value>a)&&(a=r.value):r.kind==="max"&&(l===null||r.value<l)&&(l=r.value)}return Number.isFinite(a)&&Number.isFinite(l)}}na.create=n=>new na({checks:[],typeName:Ce.ZodNumber,coerce:(n==null?void 0:n.coerce)||!1,...je(n)});class dr extends qe{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 rn;for(const c of this._def.checks)c.kind==="min"?(c.inclusive?l.data<c.value:l.data<=c.value)&&(r=this._getOrReturnCtx(l,r),se(r,{code:ne.too_small,type:"bigint",minimum:c.value,inclusive:c.inclusive,message:c.message}),s.dirty()):c.kind==="max"?(c.inclusive?l.data>c.value:l.data>=c.value)&&(r=this._getOrReturnCtx(l,r),se(r,{code:ne.too_big,type:"bigint",maximum:c.value,inclusive:c.inclusive,message:c.message}),s.dirty()):c.kind==="multipleOf"?l.data%c.value!==BigInt(0)&&(r=this._getOrReturnCtx(l,r),se(r,{code:ne.not_multiple_of,multipleOf:c.value,message:c.message}),s.dirty()):Ze.assertNever(c);return{status:s.value,value:l.data}}_getInvalidInput(l){const a=this._getOrReturnCtx(l);return se(a,{code:ne.invalid_type,expected:he.bigint,received:a.parsedType}),Ee}gte(l,a){return this.setLimit("min",l,!0,ge.toString(a))}gt(l,a){return this.setLimit("min",l,!1,ge.toString(a))}lte(l,a){return this.setLimit("max",l,!0,ge.toString(a))}lt(l,a){return this.setLimit("max",l,!1,ge.toString(a))}setLimit(l,a,r,s){return new dr({...this._def,checks:[...this._def.checks,{kind:l,value:a,inclusive:r,message:ge.toString(s)}]})}_addCheck(l){return new dr({...this._def,checks:[...this._def.checks,l]})}positive(l){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ge.toString(l)})}negative(l){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ge.toString(l)})}nonpositive(l){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ge.toString(l)})}nonnegative(l){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ge.toString(l)})}multipleOf(l,a){return this._addCheck({kind:"multipleOf",value:l,message:ge.toString(a)})}get minValue(){let l=null;for(const a of this._def.checks)a.kind==="min"&&(l===null||a.value>l)&&(l=a.value);return l}get maxValue(){let l=null;for(const a of this._def.checks)a.kind==="max"&&(l===null||a.value<l)&&(l=a.value);return l}}dr.create=n=>new dr({checks:[],typeName:Ce.ZodBigInt,coerce:(n==null?void 0:n.coerce)??!1,...je(n)});class of extends qe{_parse(l){if(this._def.coerce&&(l.data=!!l.data),this._getType(l)!==he.boolean){const r=this._getOrReturnCtx(l);return se(r,{code:ne.invalid_type,expected:he.boolean,received:r.parsedType}),Ee}return bn(l.data)}}of.create=n=>new of({typeName:Ce.ZodBoolean,coerce:(n==null?void 0:n.coerce)||!1,...je(n)});class Pu extends qe{_parse(l){if(this._def.coerce&&(l.data=new Date(l.data)),this._getType(l)!==he.date){const c=this._getOrReturnCtx(l);return se(c,{code:ne.invalid_type,expected:he.date,received:c.parsedType}),Ee}if(Number.isNaN(l.data.getTime())){const c=this._getOrReturnCtx(l);return se(c,{code:ne.invalid_date}),Ee}const r=new rn;let s;for(const c of this._def.checks)c.kind==="min"?l.data.getTime()<c.value&&(s=this._getOrReturnCtx(l,s),se(s,{code:ne.too_small,message:c.message,inclusive:!0,exact:!1,minimum:c.value,type:"date"}),r.dirty()):c.kind==="max"?l.data.getTime()>c.value&&(s=this._getOrReturnCtx(l,s),se(s,{code:ne.too_big,message:c.message,inclusive:!0,exact:!1,maximum:c.value,type:"date"}),r.dirty()):Ze.assertNever(c);return{status:r.value,value:new Date(l.data.getTime())}}_addCheck(l){return new Pu({...this._def,checks:[...this._def.checks,l]})}min(l,a){return this._addCheck({kind:"min",value:l.getTime(),message:ge.toString(a)})}max(l,a){return this._addCheck({kind:"max",value:l.getTime(),message:ge.toString(a)})}get minDate(){let l=null;for(const a of this._def.checks)a.kind==="min"&&(l===null||a.value>l)&&(l=a.value);return l!=null?new Date(l):null}get maxDate(){let l=null;for(const a of this._def.checks)a.kind==="max"&&(l===null||a.value<l)&&(l=a.value);return l!=null?new Date(l):null}}Pu.create=n=>new Pu({checks:[],coerce:(n==null?void 0:n.coerce)||!1,typeName:Ce.ZodDate,...je(n)});class pg extends qe{_parse(l){if(this._getType(l)!==he.symbol){const r=this._getOrReturnCtx(l);return se(r,{code:ne.invalid_type,expected:he.symbol,received:r.parsedType}),Ee}return bn(l.data)}}pg.create=n=>new pg({typeName:Ce.ZodSymbol,...je(n)});class gg extends qe{_parse(l){if(this._getType(l)!==he.undefined){const r=this._getOrReturnCtx(l);return se(r,{code:ne.invalid_type,expected:he.undefined,received:r.parsedType}),Ee}return bn(l.data)}}gg.create=n=>new gg({typeName:Ce.ZodUndefined,...je(n)});class yg extends qe{_parse(l){if(this._getType(l)!==he.null){const r=this._getOrReturnCtx(l);return se(r,{code:ne.invalid_type,expected:he.null,received:r.parsedType}),Ee}return bn(l.data)}}yg.create=n=>new yg({typeName:Ce.ZodNull,...je(n)});class xg extends qe{constructor(){super(...arguments),this._any=!0}_parse(l){return bn(l.data)}}xg.create=n=>new xg({typeName:Ce.ZodAny,...je(n)});class bg extends qe{constructor(){super(...arguments),this._unknown=!0}_parse(l){return bn(l.data)}}bg.create=n=>new bg({typeName:Ce.ZodUnknown,...je(n)});class Rl extends qe{_parse(l){const a=this._getOrReturnCtx(l);return se(a,{code:ne.invalid_type,expected:he.never,received:a.parsedType}),Ee}}Rl.create=n=>new Rl({typeName:Ce.ZodNever,...je(n)});class vg extends qe{_parse(l){if(this._getType(l)!==he.undefined){const r=this._getOrReturnCtx(l);return se(r,{code:ne.invalid_type,expected:he.void,received:r.parsedType}),Ee}return bn(l.data)}}vg.create=n=>new vg({typeName:Ce.ZodVoid,...je(n)});class jn extends qe{_parse(l){const{ctx:a,status:r}=this._processInputParams(l),s=this._def;if(a.parsedType!==he.array)return se(a,{code:ne.invalid_type,expected:he.array,received:a.parsedType}),Ee;if(s.exactLength!==null){const f=a.data.length>s.exactLength.value,h=a.data.length<s.exactLength.value;(f||h)&&(se(a,{code:f?ne.too_big:ne.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&&a.data.length<s.minLength.value&&(se(a,{code:ne.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),r.dirty()),s.maxLength!==null&&a.data.length>s.maxLength.value&&(se(a,{code:ne.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),r.dirty()),a.common.async)return Promise.all([...a.data].map((f,h)=>s.type._parseAsync(new Ol(a,f,a.path,h)))).then(f=>rn.mergeArray(r,f));const c=[...a.data].map((f,h)=>s.type._parseSync(new Ol(a,f,a.path,h)));return rn.mergeArray(r,c)}get element(){return this._def.type}min(l,a){return new jn({...this._def,minLength:{value:l,message:ge.toString(a)}})}max(l,a){return new jn({...this._def,maxLength:{value:l,message:ge.toString(a)}})}length(l,a){return new jn({...this._def,exactLength:{value:l,message:ge.toString(a)}})}nonempty(l){return this.min(1,l)}}jn.create=(n,l)=>new jn({type:n,minLength:null,maxLength:null,exactLength:null,typeName:Ce.ZodArray,...je(l)});function $i(n){if(n instanceof xt){const l={};for(const a in n.shape){const r=n.shape[a];l[a]=Ml.create($i(r))}return new xt({...n._def,shape:()=>l})}else return n instanceof jn?new jn({...n._def,type:$i(n.element)}):n instanceof Ml?Ml.create($i(n.unwrap())):n instanceof aa?aa.create($i(n.unwrap())):n instanceof ai?ai.create(n.items.map(l=>$i(l))):n}class xt extends qe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const l=this._def.shape(),a=Ze.objectKeys(l);return this._cached={shape:l,keys:a},this._cached}_parse(l){if(this._getType(l)!==he.object){const m=this._getOrReturnCtx(l);return se(m,{code:ne.invalid_type,expected:he.object,received:m.parsedType}),Ee}const{status:r,ctx:s}=this._processInputParams(l),{shape:c,keys:f}=this._getCached(),h=[];if(!(this._def.catchall instanceof Rl&&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=c[m],y=s.data[m];p.push({key:{status:"valid",value:m},value:b._parse(new Ol(s,y,s.path,m)),alwaysSet:m in s.data})}if(this._def.catchall instanceof Rl){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&&(se(s,{code:ne.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 Ol(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=>rn.mergeObjectSync(r,m)):rn.mergeObjectSync(r,p)}get shape(){return this._def.shape()}strict(l){return ge.errToObj,new xt({...this._def,unknownKeys:"strict",...l!==void 0?{errorMap:(a,r)=>{var c,f;const s=((f=(c=this._def).errorMap)==null?void 0:f.call(c,a,r).message)??r.defaultError;return a.code==="unrecognized_keys"?{message:ge.errToObj(l).message??s}:{message:s}}}:{}})}strip(){return new xt({...this._def,unknownKeys:"strip"})}passthrough(){return new xt({...this._def,unknownKeys:"passthrough"})}extend(l){return new xt({...this._def,shape:()=>({...this._def.shape(),...l})})}merge(l){return new xt({unknownKeys:l._def.unknownKeys,catchall:l._def.catchall,shape:()=>({...this._def.shape(),...l._def.shape()}),typeName:Ce.ZodObject})}setKey(l,a){return this.augment({[l]:a})}catchall(l){return new xt({...this._def,catchall:l})}pick(l){const a={};for(const r of Ze.objectKeys(l))l[r]&&this.shape[r]&&(a[r]=this.shape[r]);return new xt({...this._def,shape:()=>a})}omit(l){const a={};for(const r of Ze.objectKeys(this.shape))l[r]||(a[r]=this.shape[r]);return new xt({...this._def,shape:()=>a})}deepPartial(){return $i(this)}partial(l){const a={};for(const r of Ze.objectKeys(this.shape)){const s=this.shape[r];l&&!l[r]?a[r]=s:a[r]=s.optional()}return new xt({...this._def,shape:()=>a})}required(l){const a={};for(const r of Ze.objectKeys(this.shape))if(l&&!l[r])a[r]=this.shape[r];else{let c=this.shape[r];for(;c instanceof Ml;)c=c._def.innerType;a[r]=c}return new xt({...this._def,shape:()=>a})}keyof(){return Ty(Ze.objectKeys(this.shape))}}xt.create=(n,l)=>new xt({shape:()=>n,unknownKeys:"strip",catchall:Rl.create(),typeName:Ce.ZodObject,...je(l)});xt.strictCreate=(n,l)=>new xt({shape:()=>n,unknownKeys:"strict",catchall:Rl.create(),typeName:Ce.ZodObject,...je(l)});xt.lazycreate=(n,l)=>new xt({shape:n,unknownKeys:"strip",catchall:Rl.create(),typeName:Ce.ZodObject,...je(l)});class Wu extends qe{_parse(l){const{ctx:a}=this._processInputParams(l),r=this._def.options;function s(c){for(const h of c)if(h.result.status==="valid")return h.result;for(const h of c)if(h.result.status==="dirty")return a.common.issues.push(...h.ctx.common.issues),h.result;const f=c.map(h=>new tl(h.ctx.common.issues));return se(a,{code:ne.invalid_union,unionErrors:f}),Ee}if(a.common.async)return Promise.all(r.map(async c=>{const f={...a,common:{...a.common,issues:[]},parent:null};return{result:await c._parseAsync({data:a.data,path:a.path,parent:f}),ctx:f}})).then(s);{let c;const f=[];for(const p of r){const m={...a,common:{...a.common,issues:[]},parent:null},b=p._parseSync({data:a.data,path:a.path,parent:m});if(b.status==="valid")return b;b.status==="dirty"&&!c&&(c={result:b,ctx:m}),m.common.issues.length&&f.push(m.common.issues)}if(c)return a.common.issues.push(...c.ctx.common.issues),c.result;const h=f.map(p=>new tl(p));return se(a,{code:ne.invalid_union,unionErrors:h}),Ee}}get options(){return this._def.options}}Wu.create=(n,l)=>new Wu({options:n,typeName:Ce.ZodUnion,...je(l)});function ff(n,l){const a=jl(n),r=jl(l);if(n===l)return{valid:!0,data:n};if(a===he.object&&r===he.object){const s=Ze.objectKeys(l),c=Ze.objectKeys(n).filter(h=>s.indexOf(h)!==-1),f={...n,...l};for(const h of c){const p=ff(n[h],l[h]);if(!p.valid)return{valid:!1};f[h]=p.data}return{valid:!0,data:f}}else if(a===he.array&&r===he.array){if(n.length!==l.length)return{valid:!1};const s=[];for(let c=0;c<n.length;c++){const f=n[c],h=l[c],p=ff(f,h);if(!p.valid)return{valid:!1};s.push(p.data)}return{valid:!0,data:s}}else return a===he.date&&r===he.date&&+n==+l?{valid:!0,data:n}:{valid:!1}}class es extends qe{_parse(l){const{status:a,ctx:r}=this._processInputParams(l),s=(c,f)=>{if(dg(c)||dg(f))return Ee;const h=ff(c.value,f.value);return h.valid?((hg(c)||hg(f))&&a.dirty(),{status:a.value,value:h.data}):(se(r,{code:ne.invalid_intersection_types}),Ee)};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(([c,f])=>s(c,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}))}}es.create=(n,l,a)=>new es({left:n,right:l,typeName:Ce.ZodIntersection,...je(a)});class ai extends qe{_parse(l){const{status:a,ctx:r}=this._processInputParams(l);if(r.parsedType!==he.array)return se(r,{code:ne.invalid_type,expected:he.array,received:r.parsedType}),Ee;if(r.data.length<this._def.items.length)return se(r,{code:ne.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ee;!this._def.rest&&r.data.length>this._def.items.length&&(se(r,{code:ne.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),a.dirty());const c=[...r.data].map((f,h)=>{const p=this._def.items[h]||this._def.rest;return p?p._parse(new Ol(r,f,r.path,h)):null}).filter(f=>!!f);return r.common.async?Promise.all(c).then(f=>rn.mergeArray(a,f)):rn.mergeArray(a,c)}get items(){return this._def.items}rest(l){return new ai({...this._def,rest:l})}}ai.create=(n,l)=>{if(!Array.isArray(n))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ai({items:n,typeName:Ce.ZodTuple,rest:null,...je(l)})};class kg extends qe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(l){const{status:a,ctx:r}=this._processInputParams(l);if(r.parsedType!==he.map)return se(r,{code:ne.invalid_type,expected:he.map,received:r.parsedType}),Ee;const s=this._def.keyType,c=this._def.valueType,f=[...r.data.entries()].map(([h,p],m)=>({key:s._parse(new Ol(r,h,r.path,[m,"key"])),value:c._parse(new Ol(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 Ee;(m.status==="dirty"||b.status==="dirty")&&a.dirty(),h.set(m.value,b.value)}return{status:a.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 Ee;(m.status==="dirty"||b.status==="dirty")&&a.dirty(),h.set(m.value,b.value)}return{status:a.value,value:h}}}}kg.create=(n,l,a)=>new kg({valueType:l,keyType:n,typeName:Ce.ZodMap,...je(a)});class hr extends qe{_parse(l){const{status:a,ctx:r}=this._processInputParams(l);if(r.parsedType!==he.set)return se(r,{code:ne.invalid_type,expected:he.set,received:r.parsedType}),Ee;const s=this._def;s.minSize!==null&&r.data.size<s.minSize.value&&(se(r,{code:ne.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),a.dirty()),s.maxSize!==null&&r.data.size>s.maxSize.value&&(se(r,{code:ne.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),a.dirty());const c=this._def.valueType;function f(p){const m=new Set;for(const b of p){if(b.status==="aborted")return Ee;b.status==="dirty"&&a.dirty(),m.add(b.value)}return{status:a.value,value:m}}const h=[...r.data.values()].map((p,m)=>c._parse(new Ol(r,p,r.path,m)));return r.common.async?Promise.all(h).then(p=>f(p)):f(h)}min(l,a){return new hr({...this._def,minSize:{value:l,message:ge.toString(a)}})}max(l,a){return new hr({...this._def,maxSize:{value:l,message:ge.toString(a)}})}size(l,a){return this.min(l,a).max(l,a)}nonempty(l){return this.min(1,l)}}hr.create=(n,l)=>new hr({valueType:n,minSize:null,maxSize:null,typeName:Ce.ZodSet,...je(l)});class Sg extends qe{get schema(){return this._def.getter()}_parse(l){const{ctx:a}=this._processInputParams(l);return this._def.getter()._parse({data:a.data,path:a.path,parent:a})}}Sg.create=(n,l)=>new Sg({getter:n,typeName:Ce.ZodLazy,...je(l)});class wg extends qe{_parse(l){if(l.data!==this._def.value){const a=this._getOrReturnCtx(l);return se(a,{received:a.data,code:ne.invalid_literal,expected:this._def.value}),Ee}return{status:"valid",value:l.data}}get value(){return this._def.value}}wg.create=(n,l)=>new wg({value:n,typeName:Ce.ZodLiteral,...je(l)});function Ty(n,l){return new la({values:n,typeName:Ce.ZodEnum,...je(l)})}class la extends qe{_parse(l){if(typeof l.data!="string"){const a=this._getOrReturnCtx(l),r=this._def.values;return se(a,{expected:Ze.joinValues(r),received:a.parsedType,code:ne.invalid_type}),Ee}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(l.data)){const a=this._getOrReturnCtx(l),r=this._def.values;return se(a,{received:a.data,code:ne.invalid_enum_value,options:r}),Ee}return bn(l.data)}get options(){return this._def.values}get enum(){const l={};for(const a of this._def.values)l[a]=a;return l}get Values(){const l={};for(const a of this._def.values)l[a]=a;return l}get Enum(){const l={};for(const a of this._def.values)l[a]=a;return l}extract(l,a=this._def){return la.create(l,{...this._def,...a})}exclude(l,a=this._def){return la.create(this.options.filter(r=>!l.includes(r)),{...this._def,...a})}}la.create=Ty;class _g extends qe{_parse(l){const a=Ze.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(l);if(r.parsedType!==he.string&&r.parsedType!==he.number){const s=Ze.objectValues(a);return se(r,{expected:Ze.joinValues(s),received:r.parsedType,code:ne.invalid_type}),Ee}if(this._cache||(this._cache=new Set(Ze.getValidEnumValues(this._def.values))),!this._cache.has(l.data)){const s=Ze.objectValues(a);return se(r,{received:r.data,code:ne.invalid_enum_value,options:s}),Ee}return bn(l.data)}get enum(){return this._def.values}}_g.create=(n,l)=>new _g({values:n,typeName:Ce.ZodNativeEnum,...je(l)});class ts extends qe{unwrap(){return this._def.type}_parse(l){const{ctx:a}=this._processInputParams(l);if(a.parsedType!==he.promise&&a.common.async===!1)return se(a,{code:ne.invalid_type,expected:he.promise,received:a.parsedType}),Ee;const r=a.parsedType===he.promise?a.data:Promise.resolve(a.data);return bn(r.then(s=>this._def.type.parseAsync(s,{path:a.path,errorMap:a.common.contextualErrorMap})))}}ts.create=(n,l)=>new ts({type:n,typeName:Ce.ZodPromise,...je(l)});class ia extends qe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ce.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(l){const{status:a,ctx:r}=this._processInputParams(l),s=this._def.effect||null,c={addIssue:f=>{se(r,f),f.fatal?a.abort():a.dirty()},get path(){return r.path}};if(c.addIssue=c.addIssue.bind(c),s.type==="preprocess"){const f=s.transform(r.data,c);if(r.common.async)return Promise.resolve(f).then(async h=>{if(a.value==="aborted")return Ee;const p=await this._def.schema._parseAsync({data:h,path:r.path,parent:r});return p.status==="aborted"?Ee:p.status==="dirty"||a.value==="dirty"?sr(p.value):p});{if(a.value==="aborted")return Ee;const h=this._def.schema._parseSync({data:f,path:r.path,parent:r});return h.status==="aborted"?Ee:h.status==="dirty"||a.value==="dirty"?sr(h.value):h}}if(s.type==="refinement"){const f=h=>{const p=s.refinement(h,c);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"?Ee:(h.status==="dirty"&&a.dirty(),f(h.value),{status:a.value,value:h.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(h=>h.status==="aborted"?Ee:(h.status==="dirty"&&a.dirty(),f(h.value).then(()=>({status:a.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(!ta(f))return Ee;const h=s.transform(f.value,c);if(h instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:a.value,value:h}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(f=>ta(f)?Promise.resolve(s.transform(f.value,c)).then(h=>({status:a.value,value:h})):Ee);Ze.assertNever(s)}}ia.create=(n,l,a)=>new ia({schema:n,typeName:Ce.ZodEffects,effect:l,...je(a)});ia.createWithPreprocess=(n,l,a)=>new ia({schema:l,effect:{type:"preprocess",transform:n},typeName:Ce.ZodEffects,...je(a)});class Ml extends qe{_parse(l){return this._getType(l)===he.undefined?bn(void 0):this._def.innerType._parse(l)}unwrap(){return this._def.innerType}}Ml.create=(n,l)=>new Ml({innerType:n,typeName:Ce.ZodOptional,...je(l)});class aa extends qe{_parse(l){return this._getType(l)===he.null?bn(null):this._def.innerType._parse(l)}unwrap(){return this._def.innerType}}aa.create=(n,l)=>new aa({innerType:n,typeName:Ce.ZodNullable,...je(l)});class df extends qe{_parse(l){const{ctx:a}=this._processInputParams(l);let r=a.data;return a.parsedType===he.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:a.path,parent:a})}removeDefault(){return this._def.innerType}}df.create=(n,l)=>new df({innerType:n,typeName:Ce.ZodDefault,defaultValue:typeof l.default=="function"?l.default:()=>l.default,...je(l)});class hf extends qe{_parse(l){const{ctx:a}=this._processInputParams(l),r={...a,common:{...a.common,issues:[]}},s=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return $u(s)?s.then(c=>({status:"valid",value:c.status==="valid"?c.value:this._def.catchValue({get error(){return new tl(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new tl(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}hf.create=(n,l)=>new hf({innerType:n,typeName:Ce.ZodCatch,catchValue:typeof l.catch=="function"?l.catch:()=>l.catch,...je(l)});class Eg extends qe{_parse(l){if(this._getType(l)!==he.nan){const r=this._getOrReturnCtx(l);return se(r,{code:ne.invalid_type,expected:he.nan,received:r.parsedType}),Ee}return{status:"valid",value:l.data}}}Eg.create=n=>new Eg({typeName:Ce.ZodNaN,...je(n)});class hv extends qe{_parse(l){const{ctx:a}=this._processInputParams(l),r=a.data;return this._def.type._parse({data:r,path:a.path,parent:a})}unwrap(){return this._def.type}}class Of extends qe{_parse(l){const{status:a,ctx:r}=this._processInputParams(l);if(r.common.async)return(async()=>{const c=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return c.status==="aborted"?Ee:c.status==="dirty"?(a.dirty(),sr(c.value)):this._def.out._parseAsync({data:c.value,path:r.path,parent:r})})();{const s=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Ee:s.status==="dirty"?(a.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:r.path,parent:r})}}static create(l,a){return new Of({in:l,out:a,typeName:Ce.ZodPipeline})}}class mf extends qe{_parse(l){const a=this._def.innerType._parse(l),r=s=>(ta(s)&&(s.value=Object.freeze(s.value)),s);return $u(a)?a.then(s=>r(s)):r(a)}unwrap(){return this._def.innerType}}mf.create=(n,l)=>new mf({innerType:n,typeName:Ce.ZodReadonly,...je(l)});var Ce;(function(n){n.ZodString="ZodString",n.ZodNumber="ZodNumber",n.ZodNaN="ZodNaN",n.ZodBigInt="ZodBigInt",n.ZodBoolean="ZodBoolean",n.ZodDate="ZodDate",n.ZodSymbol="ZodSymbol",n.ZodUndefined="ZodUndefined",n.ZodNull="ZodNull",n.ZodAny="ZodAny",n.ZodUnknown="ZodUnknown",n.ZodNever="ZodNever",n.ZodVoid="ZodVoid",n.ZodArray="ZodArray",n.ZodObject="ZodObject",n.ZodUnion="ZodUnion",n.ZodDiscriminatedUnion="ZodDiscriminatedUnion",n.ZodIntersection="ZodIntersection",n.ZodTuple="ZodTuple",n.ZodRecord="ZodRecord",n.ZodMap="ZodMap",n.ZodSet="ZodSet",n.ZodFunction="ZodFunction",n.ZodLazy="ZodLazy",n.ZodLiteral="ZodLiteral",n.ZodEnum="ZodEnum",n.ZodEffects="ZodEffects",n.ZodNativeEnum="ZodNativeEnum",n.ZodOptional="ZodOptional",n.ZodNullable="ZodNullable",n.ZodDefault="ZodDefault",n.ZodCatch="ZodCatch",n.ZodPromise="ZodPromise",n.ZodBranded="ZodBranded",n.ZodPipeline="ZodPipeline",n.ZodReadonly="ZodReadonly"})(Ce||(Ce={}));const Y=zl.create,ot=na.create,Ft=of.create;Rl.create;const Nt=jn.create,Ae=xt.create;Wu.create;es.create;ai.create;const Qt=la.create;ts.create;Ml.create;aa.create;const zn=Qt(["claude_code","cursor_local"]),ln=Ae({maxTurns:ot().positive().nullable().optional(),maxBudgetUsd:ot().positive().nullable().optional()}),Rf=Ae({plan:ln.optional(),execute:ln.optional(),reflect:ln.optional()});function mv(n){if(!(n!=null&&n.trim()))return null;try{const l=ln.parse(JSON.parse(n));return l.maxTurns==null&&l.maxBudgetUsd==null?null:l}catch{return null}}function pv(n){if(!(n!=null&&n.trim()))return{};try{const l=JSON.parse(n);return l&&typeof l=="object"&&!("plan"in l)&&!("execute"in l)&&!("reflect"in l)&&("maxTurns"in l||"maxBudgetUsd"in l)?{execute:ln.parse({maxTurns:l.maxTurns??null,maxBudgetUsd:l.maxBudgetUsd??null})}:Rf.parse(l)}catch{return{}}}const gv="00000000-0000-4000-a000-000000000001",ns="auto",yv=Ae({code:Qt(["cli_missing","runtime_auth","deck_offline","workspace_missing","mcp_not_registered"]),message:Y()}),xv=Ae({id:Y().uuid(),name:Y(),runtime:zn,workspaceRoot:Y().nullable(),deckId:Y().uuid().nullable(),deckName:Y().nullable(),playbookId:Y().nullable(),defaultPlanModel:Y().nullable(),defaultExecuteModel:Y().nullable(),defaultPlanBudgetJson:Y().nullable(),defaultExecuteBudgetJson:Y().nullable(),isBuiltin:Ft(),createdAt:Y(),updatedAt:Y()}),jy=xv.extend({healthy:Ft(),issues:Nt(yv)});Ae({name:Y().min(1),runtime:zn,workspaceRoot:Y().min(1),deckId:Y().uuid().optional(),playbookId:Y().optional(),defaultPlanModel:Y().nullable().optional(),defaultExecuteModel:Y().nullable().optional(),defaultPlanBudget:ln.nullable().optional(),defaultExecuteBudget:ln.nullable().optional()});Ae({name:Y().min(1).optional(),runtime:zn.optional(),workspaceRoot:Y().nullable().optional(),deckId:Y().uuid().nullable().optional(),playbookId:Y().nullable().optional(),defaultPlanModel:Y().nullable().optional(),defaultExecuteModel:Y().nullable().optional(),defaultPlanBudget:ln.nullable().optional(),defaultExecuteBudget:ln.nullable().optional()});Ae({agents:Nt(jy),issueCount:ot()});function bv(n){if(!(n!=null&&n.trim()))return{detected:!1};const l=n.match(/\*\*Blocker:\*\*\s*([^\n]+)/i);if(l)return{detected:!0,summary:l[1].trim()};const a=n.match(/^Blocker:\s*([^\n]+)/im);return a?{detected:!0,summary:a[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(n))?{detected:!0,summary:(n.trim().split(/\n/)[0]??"Execution blocked").slice(0,220)}:{detected:!1}}function zy(n){var a,r,s;if((a=n.blocker)!=null&&a.summary)return{detected:!0,summary:n.blocker.summary};const l=bv(n.resultText);return l.detected?l:n.isError||n.exitCode!==0?{detected:!0,summary:((s=(r=n.resultText)==null?void 0:r.trim().split(/\n/)[0])==null?void 0:s.slice(0,220))||(n.exitCode!==0?`Process exited with code ${n.exitCode}`:"Agent reported an error")}:{detected:!1}}const vv=Qt(["queued","plan_pending","plan_approved","running","review","done","failed","cancelled"]),Dy=Qt(["code","communication","email","research","content","other"]),kv=Qt(["task_snapshot","draft_plan","approved_plan","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"]),ss=Qt(["plan","execute","reflect"]),Sv=Qt(["proposed","applied","dismissed"]),My=Qt(["retry","approve"]);Ae({playbookId:Y(),playbookTitle:Y().optional(),previousBody:Y(),proposedBody:Y(),rationale:Y(),status:Sv,trigger:My,appliedAt:Y().optional()});Ae({status:Qt(["pending","completed","failed","skipped"]),trigger:My,error:Y().optional()});const wv=Ae({type:Qt(["system","human","context","thinking","assistant","tool","rate_limit","result"]),text:Y(),toolName:Y().optional()});Ae({phase:ss,runtime:zn,entries:Nt(wv)});const _v=Ae({phase:ss,runtime:zn,totalCostUsd:ot().optional(),inputTokens:ot().optional(),outputTokens:ot().optional(),cacheReadTokens:ot().optional(),cacheWriteTokens:ot().optional(),durationMs:ot().optional(),model:Y().optional(),numTurns:ot().optional()}),Ev=Ae({label:Y(),usage:_v});Ae({lines:Nt(Ev),total:Ae({totalCostUsd:ot(),inputTokens:ot(),outputTokens:ot(),durationMs:ot()})});Ae({phase:ss,runtime:zn,sessionId:Y()});Ae({phase:ss,exitCode:ot(),resultText:Y().optional(),isError:Ft().optional(),blocker:Ae({summary:Y().optional()}).optional()});Ae({path:Y(),title:Y(),markdown:Y()});Ae({markdown:Y(),sessionId:Y().optional()});const Cv=Qt(["manual","linear"]);Ae({id:Y(),title:Y(),description:Y().optional(),url:Y().optional()});const Nl=Ae({id:Y().uuid(),source:Cv,externalId:Y().nullable(),externalLabel:Y().nullable(),taskCategory:Dy,title:Y(),description:Y().nullable(),repo:Y().nullable(),artifactWorkspace:Y().nullable(),agentId:Y().uuid().nullable(),agentName:Y().nullable(),deckId:Y().nullable(),deckName:Y().nullable(),playbookId:Y().nullable(),runtime:zn.nullable(),planModel:Y().nullable(),executeModel:Y().nullable(),status:vv,lineageId:Y().uuid().nullable(),acceptanceCriteria:Y().nullable(),approvalGatesJson:Y().nullable(),budgetJson:Y().nullable(),createdAt:Y(),updatedAt:Y()});Ae({id:Y().uuid(),runId:Y().uuid(),kind:kv,contentJson:Y().nullable(),blobPath:Y().nullable(),author:Qt(["human","agent","system"]),createdAt:Y()});Ae({id:Y().uuid(),runId:Y().uuid(),type:Y(),payloadJson:Y().nullable(),ts:Y()});Ae({title:Y().min(1),description:Y().optional(),taskCategory:Dy.default("other"),repo:Y().optional(),artifactWorkspace:Y().optional(),acceptanceCriteria:Y().optional(),status:Qt(["queued","plan_pending","plan_approved"]).default("plan_pending"),agentId:Y().uuid(),planModel:Y().nullable().optional(),executeModel:Y().nullable().optional(),budget:Rf.optional()});Ae({runtime:zn,deckId:Y().uuid().optional(),playbookId:Y().optional(),planModel:Y().nullable().optional(),executeModel:Y().nullable().optional(),budget:Rf.optional()});Ae({planMarkdown:Y(),approve:Ft().default(!1),planModel:Y().nullable().optional(),executeModel:Y().nullable().optional(),planBudget:ln.nullable().optional(),executeBudget:ln.nullable().optional()});Ae({runtime:zn.optional(),deckId:Y().uuid().optional(),playbookId:Y().optional(),executeModel:Y().nullable().optional(),executeBudget:ln.nullable().optional()});Ae({feedback:Y().min(1),planModel:Y().nullable().optional(),executeModel:Y().nullable().optional()});Ae({id:Y(),identifier:Y(),title:Y(),description:Y().optional(),url:Y(),state:Y().optional(),labels:Nt(Y()).optional(),teamId:Y().optional()});const Av=Ae({label:Y().min(1),agentId:Y().uuid()}),pf=Ae({stateFilter:Nt(Y()),teamId:Y().nullable(),assigneeMe:Ft(),defaultAgentId:Y().uuid().nullable(),syncEnabled:Ft(),routingRules:Nt(Av)});pf.extend({persisted:pf,envOverrides:Ae({stateFilter:Ft(),teamId:Ft()})});pf.partial();Ae({connected:Ft(),viewer:Ae({id:Y(),name:Y(),email:Y().optional()}).optional(),error:Y().optional()});Ae({agentId:Y().uuid(),reason:Y()});Ae({host:Y(),port:ot().int().min(1).max(65535),envOverride:Ft()});Ae({host:Y().min(1).optional(),port:ot().int().min(1).max(65535).optional()});Ae({connected:Ft(),apiUrl:Y(),mcpUrl:Y(),deckCount:ot().optional(),envOverride:Ft(),error:Y().optional()});Ae({agentId:Y().uuid().optional(),autoAgent:Ft().optional(),planModel:Y().nullable().optional()}).refine(n=>n.agentId!==void 0||n.autoAgent===!0,{message:"Provide agentId or autoAgent: true"});Ae({planModel:Y().nullable().optional(),planBudget:ln.nullable().optional()});const Nv=Ae({id:Y(),label:Y()});Ae({runtime:zn,models:Nt(Nv),source:Qt(["live","fallback"])});Ae({planReviewCount:ot(),resultReviewCount:ot(),maxConcurrent:ot(),planningActiveRuns:Nt(Nl),planningQueuedRuns:Nt(Nl),runningRuns:Nt(Nl),waitingExecution:Nt(Nl),resultReviewRuns:Nt(Nl),recentDone:Nt(Nl),awaitingPlanReview:Nt(Nl),runs:Nt(Nl),agentDeckOnline:Ft(),agents:Nt(jy),agentIssueCount:ot()});function Tv(n){return n||ns}function cs({runtime:n,label:l,value:a,onChange:r,defaultModelId:s,disabled:c,compact:f}){const h=sf(n),[p,m]=Q.useState((h==null?void 0:h.models)??[]),[b,y]=Q.useState((h==null?void 0:h.source)??"fallback"),[k,v]=Q.useState(!h);Q.useEffect(()=>{const q=sf(n);if(q){m(q.models),y(q.source),v(!1);return}v(!0),Rb(n).then(j=>{m(j.models),y(j.source)}).catch(()=>m([])).finally(()=>v(!1))},[n]);const E=Q.useMemo(()=>{var q,j;if(n==="cursor_local"){const Z=Tv(s);return((q=p.find(H=>H.id===Z))==null?void 0:q.label)??"Auto (subscription pool)"}return s?((j=p.find(Z=>Z.id===s))==null?void 0:j.label)??s:"runtime default"},[n,s,p]),O=n==="cursor_local"?k?"Loading models…":`Agent default (${E})`:k?"Loading models…":`Default (${E})`;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:c||k,value:a,onChange:q=>r(q.target.value),children:[g.jsx("option",{value:"",children:O}),p.map(q=>g.jsx("option",{value:q.id,children:q.label},q.id))]}),n==="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&&n==="cursor_local"&&!f&&g.jsx("p",{className:"text-xs text-white/40",children:"Run cursor agent login to load the full model list."})]})}function mr({phase:n,runtime:l,model:a,onModelChange:r,budget:s,onBudgetChange:c,defaultModelId:f,disabled:h,showHint:p=!0}){const m=b=>c({...s,...b});return g.jsxs("section",{className:"space-y-2",children:[g.jsx("div",{className:"text-xs uppercase tracking-wide text-[#92E4DD]",children:n}),g.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-2",children:[g.jsx(cs,{runtime:l,label:"Model",value:a,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 Cg({value:n,onChange:l,agentDeckOnline:a,disabled:r}){const[s,c]=Q.useState([]),[f,h]=Q.useState([]);Q.useEffect(()=>{Bb().then(c).catch(()=>c([]))},[]),Q.useEffect(()=>{if(!n.deckId){h([]);return}Ub(n.deckId).then(h).catch(()=>h([]))},[n.deckId]);const p=m=>l({...n,...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:n.runtime,onChange:m=>{const b=m.target.value;p({runtime:b,...b==="cursor_local"?{defaultPlanModel:ns,defaultExecuteModel:ns}:{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(mr,{phase:"Plan",runtime:n.runtime,model:n.defaultPlanModel,onModelChange:m=>p({defaultPlanModel:m}),budget:n.defaultPlanBudget,onBudgetChange:m=>p({defaultPlanBudget:m}),disabled:r,showHint:!1}),g.jsx(mr,{phase:"Execution",runtime:n.runtime,model:n.defaultExecuteModel,onModelChange:m=>p({defaultExecuteModel:m}),budget:n.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||!a,value:n.deckId,onChange:m=>p({deckId:m.target.value,playbookId:""}),children:[g.jsx("option",{value:"",children:a?"No deck — degraded mode":"Agent Deck offline"}),s.map(m=>g.jsxs("option",{value:m.id,children:["◆ ",m.name]},m.id))]}),n.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:n.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))]})]}),!n.deckId&&n.runtime&&g.jsx("p",{className:"text-xs text-white/45",children:"Degraded mode: no deck MCP. Audit trail still captured."})]})}function os(n){if(n.agentName){const a=[n.agentName];return(n.deckName||n.deckId)&&a.push(`◆ ${n.deckName??n.deckId}`),n.planModel&&a.push(`plan:${n.planModel}`),n.executeModel&&a.push(`exec:${n.executeModel}`),a.join(" · ")}const l=[n.runtime??"no runtime"];return(n.deckName||n.deckId)&&l.push(`◆ ${n.deckName??n.deckId}`),n.playbookId&&l.push(`pb:${n.playbookId.slice(0,8)}…`),n.planModel&&l.push(`plan:${n.planModel}`),n.executeModel&&l.push(`exec:${n.executeModel}`),l.join(" · ")}function fs({trace:n,label:l}){var a;return(a=n==null?void 0:n.entries)!=null&&a.length?g.jsxs("section",{className:"space-y-2",children:[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:n.entries.map((r,s)=>g.jsxs("div",{className:"text-sm font-mono",children:[g.jsx("span",{className:r.type==="human"?"text-[#C4B643]":r.type==="context"?"text-white/50":"text-[#92E4DD]",children:r.type}),r.toolName&&g.jsxs("span",{className:"text-white/40",children:[" · ",r.toolName]}),g.jsx("div",{className:"text-white/70 whitespace-pre-wrap mt-0.5",children:r.text})]},s))})]}):null}function jv(n){return[n.model&&`model ${n.model}`,n.totalCostUsd!=null&&`$${n.totalCostUsd.toFixed(4)}`,n.inputTokens!=null&&`${n.inputTokens} in`,n.outputTokens!=null&&`${n.outputTokens} out`,n.durationMs!=null&&_y(n.durationMs)].filter(Boolean).join(" · ")}function ds({summary:n}){if(!(n!=null&&n.lines.length))return null;const l=n.lines.length>1;return g.jsxs("section",{className:"space-y-1.5",children:[g.jsx("div",{className:"heading-section",children:"Usage"}),n.lines.map((a,r)=>g.jsxs("p",{className:"text-sm text-white/50 font-mono",children:[g.jsxs("span",{className:"text-white/65",children:[a.label,":"]})," ",jv(a.usage)]},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:"})," ",[n.total.totalCostUsd>0&&`$${n.total.totalCostUsd.toFixed(4)}`,n.total.inputTokens>0&&`${n.total.inputTokens} in`,n.total.outputTokens>0&&`${n.total.outputTokens} out`,n.total.durationMs>0&&_y(n.total.durationMs)].filter(Boolean).join(" · ")]})]})}function zv(n,l){const a={};return(n[n.length-1]===""?[...n,""]:n).join((a.padRight?" ":"")+","+(a.padLeft===!1?"":" ")).trim()}const Dv=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Mv=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ov={};function Ag(n,l){return(Ov.jsx?Mv:Dv).test(n)}const Rv=/[ \t\n\f\r]/g;function Lv(n){return typeof n=="object"?n.type==="text"?Ng(n.value):!1:Ng(n)}function Ng(n){return n.replace(Rv,"")===""}class br{constructor(l,a,r){this.normal=a,this.property=l,r&&(this.space=r)}}br.prototype.normal={};br.prototype.property={};br.prototype.space=void 0;function Oy(n,l){const a={},r={};for(const s of n)Object.assign(a,s.property),Object.assign(r,s.normal);return new br(a,r,l)}function gf(n){return n.toLowerCase()}class Gt{constructor(l,a){this.attribute=a,this.property=l}}Gt.prototype.attribute="";Gt.prototype.booleanish=!1;Gt.prototype.boolean=!1;Gt.prototype.commaOrSpaceSeparated=!1;Gt.prototype.commaSeparated=!1;Gt.prototype.defined=!1;Gt.prototype.mustUseProperty=!1;Gt.prototype.number=!1;Gt.prototype.overloadedBoolean=!1;Gt.prototype.property="";Gt.prototype.spaceSeparated=!1;Gt.prototype.space=void 0;let Bv=0;const we=ui(),yt=ui(),yf=ui(),te=ui(),et=ui(),li=ui(),nn=ui();function ui(){return 2**++Bv}const xf=Object.freeze(Object.defineProperty({__proto__:null,boolean:we,booleanish:yt,commaOrSpaceSeparated:nn,commaSeparated:li,number:te,overloadedBoolean:yf,spaceSeparated:et},Symbol.toStringTag,{value:"Module"})),Zo=Object.keys(xf);class Lf extends Gt{constructor(l,a,r,s){let c=-1;if(super(l,a),Tg(this,"space",s),typeof r=="number")for(;++c<Zo.length;){const f=Zo[c];Tg(this,Zo[c],(r&xf[f])===xf[f])}}}Lf.prototype.defined=!0;function Tg(n,l,a){a&&(n[l]=a)}function ua(n){const l={},a={};for(const[r,s]of Object.entries(n.properties)){const c=new Lf(r,n.transform(n.attributes||{},r),s,n.space);n.mustUseProperty&&n.mustUseProperty.includes(r)&&(c.mustUseProperty=!0),l[r]=c,a[gf(r)]=r,a[gf(c.attribute)]=r}return new br(l,a,n.space)}const Ry=ua({properties:{ariaActiveDescendant:null,ariaAtomic:yt,ariaAutoComplete:null,ariaBusy:yt,ariaChecked:yt,ariaColCount:te,ariaColIndex:te,ariaColSpan:te,ariaControls:et,ariaCurrent:null,ariaDescribedBy:et,ariaDetails:null,ariaDisabled:yt,ariaDropEffect:et,ariaErrorMessage:null,ariaExpanded:yt,ariaFlowTo:et,ariaGrabbed:yt,ariaHasPopup:null,ariaHidden:yt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:et,ariaLevel:te,ariaLive:null,ariaModal:yt,ariaMultiLine:yt,ariaMultiSelectable:yt,ariaOrientation:null,ariaOwns:et,ariaPlaceholder:null,ariaPosInSet:te,ariaPressed:yt,ariaReadOnly:yt,ariaRelevant:null,ariaRequired:yt,ariaRoleDescription:et,ariaRowCount:te,ariaRowIndex:te,ariaRowSpan:te,ariaSelected:yt,ariaSetSize:te,ariaSort:null,ariaValueMax:te,ariaValueMin:te,ariaValueNow:te,ariaValueText:null,role:null},transform(n,l){return l==="role"?l:"aria-"+l.slice(4).toLowerCase()}});function Ly(n,l){return l in n?n[l]:l}function By(n,l){return Ly(n,l.toLowerCase())}const Uv=ua({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:li,acceptCharset:et,accessKey:et,action:null,allow:null,allowFullScreen:we,allowPaymentRequest:we,allowUserMedia:we,alpha:we,alt:null,as:null,async:we,autoCapitalize:null,autoComplete:et,autoFocus:we,autoPlay:we,blocking:et,capture:null,charSet:null,checked:we,cite:null,className:et,closedBy:null,colorSpace:null,cols:te,colSpan:te,command:null,commandFor:null,content:null,contentEditable:yt,controls:we,controlsList:et,coords:te|li,crossOrigin:null,data:null,dateTime:null,decoding:null,default:we,defer:we,dir:null,dirName:null,disabled:we,download:yf,draggable:yt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:we,formTarget:null,headers:et,height:te,hidden:yf,high:te,href:null,hrefLang:null,htmlFor:et,httpEquiv:et,id:null,imageSizes:null,imageSrcSet:null,inert:we,inputMode:null,integrity:null,is:null,isMap:we,itemId:null,itemProp:et,itemRef:et,itemScope:we,itemType:et,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:we,low:te,manifest:null,max:null,maxLength:te,media:null,method:null,min:null,minLength:te,multiple:we,muted:we,name:null,nonce:null,noModule:we,noValidate:we,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:we,optimum:te,pattern:null,ping:et,placeholder:null,playsInline:we,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:we,referrerPolicy:null,rel:et,required:we,reversed:we,rows:te,rowSpan:te,sandbox:et,scope:null,scoped:we,seamless:we,selected:we,shadowRootClonable:we,shadowRootCustomElementRegistry:we,shadowRootDelegatesFocus:we,shadowRootMode:null,shadowRootSerializable:we,shape:null,size:te,sizes:null,slot:null,span:te,spellCheck:yt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:te,step:null,style:null,tabIndex:te,target:null,title:null,translate:null,type:null,typeMustMatch:we,useMap:null,value:yt,width:te,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:et,axis:null,background:null,bgColor:null,border:te,borderColor:null,bottomMargin:te,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:we,declare:we,event:null,face:null,frame:null,frameBorder:null,hSpace:te,leftMargin:te,link:null,longDesc:null,lowSrc:null,marginHeight:te,marginWidth:te,noResize:we,noHref:we,noShade:we,noWrap:we,object:null,profile:null,prompt:null,rev:null,rightMargin:te,rules:null,scheme:null,scrolling:yt,standby:null,summary:null,text:null,topMargin:te,valueType:null,version:null,vAlign:null,vLink:null,vSpace:te,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:we,disablePictureInPicture:we,disableRemotePlayback:we,exportParts:li,part:et,prefix:null,property:null,results:te,security:null,unselectable:null},space:"html",transform:By}),Hv=ua({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:nn,accentHeight:te,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:te,amplitude:te,arabicForm:null,ascent:te,attributeName:null,attributeType:null,azimuth:te,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:te,by:null,calcMode:null,capHeight:te,className:et,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:te,diffuseConstant:te,direction:null,display:null,dur:null,divisor:te,dominantBaseline:null,download:we,dx:null,dy:null,edgeMode:null,editable:null,elevation:te,enableBackground:null,end:null,event:null,exponent:te,externalResourcesRequired:null,fill:null,fillOpacity:te,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:li,g2:li,glyphName:li,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:te,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:te,horizOriginX:te,horizOriginY:te,id:null,ideographic:te,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:te,k:te,k1:te,k2:te,k3:te,k4:te,kernelMatrix:nn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:te,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:te,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:te,overlineThickness:te,paintOrder:null,panose1:null,path:null,pathLength:te,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:et,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:te,pointsAtY:te,pointsAtZ:te,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:nn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:nn,rev:nn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:nn,requiredFeatures:nn,requiredFonts:nn,requiredFormats:nn,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:te,specularExponent:te,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:te,strikethroughThickness:te,string:null,stroke:null,strokeDashArray:nn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:te,strokeOpacity:te,strokeWidth:null,style:null,surfaceScale:te,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:nn,tabIndex:te,tableValues:null,target:null,targetX:te,targetY:te,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:nn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:te,underlineThickness:te,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:te,values:null,vAlphabetic:te,vMathematical:te,vectorEffect:null,vHanging:te,vIdeographic:te,version:null,vertAdvY:te,vertOriginX:te,vertOriginY:te,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:te,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Ly}),Uy=ua({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(n,l){return"xlink:"+l.slice(5).toLowerCase()}}),Hy=ua({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:By}),qy=ua({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(n,l){return"xml:"+l.slice(3).toLowerCase()}}),qv={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"},Vv=/[A-Z]/g,jg=/-[a-z]/g,Yv=/^data[-\w.:]+$/i;function Zv(n,l){const a=gf(l);let r=l,s=Gt;if(a in n.normal)return n.property[n.normal[a]];if(a.length>4&&a.slice(0,4)==="data"&&Yv.test(l)){if(l.charAt(4)==="-"){const c=l.slice(5).replace(jg,Fv);r="data"+c.charAt(0).toUpperCase()+c.slice(1)}else{const c=l.slice(4);if(!jg.test(c)){let f=c.replace(Vv,Iv);f.charAt(0)!=="-"&&(f="-"+f),l="data"+f}}s=Lf}return new s(r,l)}function Iv(n){return"-"+n.toLowerCase()}function Fv(n){return n.charAt(1).toUpperCase()}const Qv=Oy([Ry,Uv,Uy,Hy,qy],"html"),Bf=Oy([Ry,Hv,Uy,Hy,qy],"svg");function Gv(n){return n.join(" ").trim()}var Ji={},Io,zg;function Xv(){if(zg)return Io;zg=1;var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,l=/\n/g,a=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,c=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,f=/^[;\s]*/,h=/^\s+|\s+$/g,p=`
|
|
50
|
-
`,m="/",b="*",y="",k="comment",v="declaration";function E(q,j){if(typeof q!="string")throw new TypeError("First argument must be a string");if(!q)return[];j=j||{};var Z=1,H=1;function le(re){var W=re.match(l);W&&(Z+=W.length);var T=re.lastIndexOf(p);H=~T?re.length-T:H+re.length}function ee(){var re={line:Z,column:H};return function(W){return W.position=new D(re),fe(),W}}function D(re){this.start=re,this.end={line:Z,column:H},this.source=j.source}D.prototype.content=q;function P(re){var W=new Error(j.source+":"+Z+":"+H+": "+re);if(W.reason=re,W.filename=j.source,W.line=Z,W.column=H,W.source=q,!j.silent)throw W}function ce(re){var W=re.exec(q);if(W){var T=W[0];return le(T),q=q.slice(T.length),W}}function fe(){ce(a)}function M(re){var W;for(re=re||[];W=U();)W!==!1&&re.push(W);return re}function U(){var re=ee();if(!(m!=q.charAt(0)||b!=q.charAt(1))){for(var W=2;y!=q.charAt(W)&&(b!=q.charAt(W)||m!=q.charAt(W+1));)++W;if(W+=2,y===q.charAt(W-1))return P("End of comment missing");var T=q.slice(2,W-2);return H+=2,le(T),q=q.slice(W),H+=2,re({type:k,comment:T})}}function J(){var re=ee(),W=ce(r);if(W){if(U(),!ce(s))return P("property missing ':'");var T=ce(c),$=re({type:v,property:O(W[0].replace(n,y)),value:T?O(T[0].replace(n,y)):y});return ce(f),$}}function pe(){var re=[];M(re);for(var W;W=J();)W!==!1&&(re.push(W),M(re));return re}return fe(),pe()}function O(q){return q?q.replace(h,y):y}return Io=E,Io}var Dg;function Kv(){if(Dg)return Ji;Dg=1;var n=Ji&&Ji.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ji,"__esModule",{value:!0}),Ji.default=a;const l=n(Xv());function a(r,s){let c=null;if(!r||typeof r!="string")return c;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&&(c=c||{},c[m]=b)}),c}return Ji}var ir={},Mg;function Jv(){if(Mg)return ir;Mg=1,Object.defineProperty(ir,"__esModule",{value:!0}),ir.camelCase=void 0;var n=/^--[a-zA-Z0-9_-]+$/,l=/-([a-z])/g,a=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,c=function(m){return!m||a.test(m)||n.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={}),c(m)?m:(m=m.toLowerCase(),b.reactCompat?m=m.replace(s,h):m=m.replace(r,h),m.replace(l,f))};return ir.camelCase=p,ir}var ar,Og;function $v(){if(Og)return ar;Og=1;var n=ar&&ar.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},l=n(Kv()),a=Jv();function r(s,c){var f={};return!s||typeof s!="string"||(0,l.default)(s,function(h,p){h&&p&&(f[(0,a.camelCase)(h,c)]=p)}),f}return r.default=r,ar=r,ar}var Pv=$v();const Wv=ky(Pv),Vy=Yy("end"),Uf=Yy("start");function Yy(n){return l;function l(a){const r=a&&a.position&&a.position[n]||{};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 e2(n){const l=Uf(n),a=Vy(n);if(l&&a)return{start:l,end:a}}function cr(n){return!n||typeof n!="object"?"":"position"in n||"type"in n?Rg(n.position):"start"in n||"end"in n?Rg(n):"line"in n||"column"in n?bf(n):""}function bf(n){return Lg(n&&n.line)+":"+Lg(n&&n.column)}function Rg(n){return bf(n&&n.start)+"-"+bf(n&&n.end)}function Lg(n){return n&&typeof n=="number"?n:1}class zt extends Error{constructor(l,a,r){super(),typeof a=="string"&&(r=a,a=void 0);let s="",c={},f=!1;if(a&&("line"in a&&"column"in a?c={place:a}:"start"in a&&"end"in a?c={place:a}:"type"in a?c={ancestors:[a],place:a.position}:c={...a}),typeof l=="string"?s=l:!c.cause&&l&&(f=!0,s=l.message,c.cause=l),!c.ruleId&&!c.source&&typeof r=="string"){const p=r.indexOf(":");p===-1?c.ruleId=r:(c.source=r.slice(0,p),c.ruleId=r.slice(p+1))}if(!c.place&&c.ancestors&&c.ancestors){const p=c.ancestors[c.ancestors.length-1];p&&(c.place=p.position)}const h=c.place&&"start"in c.place?c.place.start:c.place;this.ancestors=c.ancestors||void 0,this.cause=c.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=cr(c.place)||"1:1",this.place=c.place||void 0,this.reason=this.message,this.ruleId=c.ruleId||void 0,this.source=c.source||void 0,this.stack=f&&c.cause&&typeof c.cause.stack=="string"?c.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}zt.prototype.file="";zt.prototype.name="";zt.prototype.reason="";zt.prototype.message="";zt.prototype.stack="";zt.prototype.column=void 0;zt.prototype.line=void 0;zt.prototype.ancestors=void 0;zt.prototype.cause=void 0;zt.prototype.fatal=void 0;zt.prototype.place=void 0;zt.prototype.ruleId=void 0;zt.prototype.source=void 0;const Hf={}.hasOwnProperty,t2=new Map,n2=/[A-Z]/g,l2=new Set(["table","tbody","thead","tfoot","tr"]),i2=new Set(["td","th"]),Zy="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function a2(n,l){if(!l||l.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const a=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=h2(a,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=d2(a,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:a,ignoreInvalidStyle:l.ignoreInvalidStyle||!1,passKeys:l.passKeys!==!1,passNode:l.passNode||!1,schema:l.space==="svg"?Bf:Qv,stylePropertyNameCase:l.stylePropertyNameCase||"dom",tableCellAlignToStyle:l.tableCellAlignToStyle!==!1},c=Iy(s,n,void 0);return c&&typeof c!="string"?c:s.create(n,s.Fragment,{children:c||void 0},void 0)}function Iy(n,l,a){if(l.type==="element")return r2(n,l,a);if(l.type==="mdxFlowExpression"||l.type==="mdxTextExpression")return u2(n,l);if(l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement")return c2(n,l,a);if(l.type==="mdxjsEsm")return s2(n,l);if(l.type==="root")return o2(n,l,a);if(l.type==="text")return f2(n,l)}function r2(n,l,a){const r=n.schema;let s=r;l.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=Bf,n.schema=s),n.ancestors.push(l);const c=Qy(n,l.tagName,!1),f=m2(n,l);let h=Vf(n,l);return l2.has(l.tagName)&&(h=h.filter(function(p){return typeof p=="string"?!Lv(p):!0})),Fy(n,f,c,l),qf(f,h),n.ancestors.pop(),n.schema=r,n.create(l,c,f,a)}function u2(n,l){if(l.data&&l.data.estree&&n.evaluater){const r=l.data.estree.body[0];return r.type,n.evaluater.evaluateExpression(r.expression)}pr(n,l.position)}function s2(n,l){if(l.data&&l.data.estree&&n.evaluater)return n.evaluater.evaluateProgram(l.data.estree);pr(n,l.position)}function c2(n,l,a){const r=n.schema;let s=r;l.name==="svg"&&r.space==="html"&&(s=Bf,n.schema=s),n.ancestors.push(l);const c=l.name===null?n.Fragment:Qy(n,l.name,!0),f=p2(n,l),h=Vf(n,l);return Fy(n,f,c,l),qf(f,h),n.ancestors.pop(),n.schema=r,n.create(l,c,f,a)}function o2(n,l,a){const r={};return qf(r,Vf(n,l)),n.create(l,n.Fragment,r,a)}function f2(n,l){return l.value}function Fy(n,l,a,r){typeof a!="string"&&a!==n.Fragment&&n.passNode&&(l.node=r)}function qf(n,l){if(l.length>0){const a=l.length>1?l:l[0];a&&(n.children=a)}}function d2(n,l,a){return r;function r(s,c,f,h){const m=Array.isArray(f.children)?a:l;return h?m(c,f,h):m(c,f)}}function h2(n,l){return a;function a(r,s,c,f){const h=Array.isArray(c.children),p=Uf(r);return l(s,c,f,h,{columnNumber:p?p.column-1:void 0,fileName:n,lineNumber:p?p.line:void 0},void 0)}}function m2(n,l){const a={};let r,s;for(s in l.properties)if(s!=="children"&&Hf.call(l.properties,s)){const c=g2(n,s,l.properties[s]);if(c){const[f,h]=c;n.tableCellAlignToStyle&&f==="align"&&typeof h=="string"&&i2.has(l.tagName)?r=h:a[f]=h}}if(r){const c=a.style||(a.style={});c[n.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return a}function p2(n,l){const a={};for(const r of l.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&n.evaluater){const c=r.data.estree.body[0];c.type;const f=c.expression;f.type;const h=f.properties[0];h.type,Object.assign(a,n.evaluater.evaluateExpression(h.argument))}else pr(n,l.position);else{const s=r.name;let c;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&n.evaluater){const h=r.value.data.estree.body[0];h.type,c=n.evaluater.evaluateExpression(h.expression)}else pr(n,l.position);else c=r.value===null?!0:r.value;a[s]=c}return a}function Vf(n,l){const a=[];let r=-1;const s=n.passKeys?new Map:t2;for(;++r<l.children.length;){const c=l.children[r];let f;if(n.passKeys){const p=c.type==="element"?c.tagName:c.type==="mdxJsxFlowElement"||c.type==="mdxJsxTextElement"?c.name:void 0;if(p){const m=s.get(p)||0;f=p+"-"+m,s.set(p,m+1)}}const h=Iy(n,c,f);h!==void 0&&a.push(h)}return a}function g2(n,l,a){const r=Zv(n.schema,l);if(!(a==null||typeof a=="number"&&Number.isNaN(a))){if(Array.isArray(a)&&(a=r.commaSeparated?zv(a):Gv(a)),r.property==="style"){let s=typeof a=="object"?a:y2(n,String(a));return n.stylePropertyNameCase==="css"&&(s=x2(s)),["style",s]}return[n.elementAttributeNameCase==="react"&&r.space?qv[r.property]||r.property:r.attribute,a]}}function y2(n,l){try{return Wv(l,{reactCompat:!0})}catch(a){if(n.ignoreInvalidStyle)return{};const r=a,s=new zt("Cannot parse `style` attribute",{ancestors:n.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=n.filePath||void 0,s.url=Zy+"#cannot-parse-style-attribute",s}}function Qy(n,l,a){let r;if(!a)r={type:"Literal",value:l};else if(l.includes(".")){const s=l.split(".");let c=-1,f;for(;++c<s.length;){const h=Ag(s[c])?{type:"Identifier",name:s[c]}:{type:"Literal",value:s[c]};f=f?{type:"MemberExpression",object:f,property:h,computed:!!(c&&h.type==="Literal"),optional:!1}:h}r=f}else r=Ag(l)&&!/^[a-z]/.test(l)?{type:"Identifier",name:l}:{type:"Literal",value:l};if(r.type==="Literal"){const s=r.value;return Hf.call(n.components,s)?n.components[s]:s}if(n.evaluater)return n.evaluater.evaluateExpression(r);pr(n)}function pr(n,l){const a=new zt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:n.ancestors,place:l,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw a.file=n.filePath||void 0,a.url=Zy+"#cannot-handle-mdx-estrees-without-createevaluater",a}function x2(n){const l={};let a;for(a in n)Hf.call(n,a)&&(l[b2(a)]=n[a]);return l}function b2(n){let l=n.replace(n2,v2);return l.slice(0,3)==="ms-"&&(l="-"+l),l}function v2(n){return"-"+n.toLowerCase()}const Fo={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"]},k2={};function Yf(n,l){const a=k2,r=typeof a.includeImageAlt=="boolean"?a.includeImageAlt:!0,s=typeof a.includeHtml=="boolean"?a.includeHtml:!0;return Gy(n,r,s)}function Gy(n,l,a){if(S2(n)){if("value"in n)return n.type==="html"&&!a?"":n.value;if(l&&"alt"in n&&n.alt)return n.alt;if("children"in n)return Bg(n.children,l,a)}return Array.isArray(n)?Bg(n,l,a):""}function Bg(n,l,a){const r=[];let s=-1;for(;++s<n.length;)r[s]=Gy(n[s],l,a);return r.join("")}function S2(n){return!!(n&&typeof n=="object")}const Ug=document.createElement("i");function Zf(n){const l="&"+n+";";Ug.innerHTML=l;const a=Ug.textContent;return a.charCodeAt(a.length-1)===59&&n!=="semi"||a===l?!1:a}function an(n,l,a,r){const s=n.length;let c=0,f;if(l<0?l=-l>s?0:s+l:l=l>s?s:l,a=a>0?a:0,r.length<1e4)f=Array.from(r),f.unshift(l,a),n.splice(...f);else for(a&&n.splice(l,a);c<r.length;)f=r.slice(c,c+1e4),f.unshift(l,0),n.splice(...f),c+=1e4,l+=1e4}function xn(n,l){return n.length>0?(an(n,n.length,0,l),n):l}const Hg={}.hasOwnProperty;function Xy(n){const l={};let a=-1;for(;++a<n.length;)w2(l,n[a]);return l}function w2(n,l){let a;for(a in l){const s=(Hg.call(n,a)?n[a]:void 0)||(n[a]={}),c=l[a];let f;if(c)for(f in c){Hg.call(s,f)||(s[f]=[]);const h=c[f];_2(s[f],Array.isArray(h)?h:h?[h]:[])}}}function _2(n,l){let a=-1;const r=[];for(;++a<l.length;)(l[a].add==="after"?n:r).push(l[a]);an(n,0,0,r)}function Ky(n,l){const a=Number.parseInt(n,l);return a<9||a===11||a>13&&a<32||a>126&&a<160||a>55295&&a<57344||a>64975&&a<65008||(a&65535)===65535||(a&65535)===65534||a>1114111?"�":String.fromCodePoint(a)}function _n(n){return n.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Rt=Ll(/[A-Za-z]/),jt=Ll(/[\dA-Za-z]/),E2=Ll(/[#-'*+\--9=?A-Z^-~]/);function ls(n){return n!==null&&(n<32||n===127)}const vf=Ll(/\d/),C2=Ll(/[\dA-Fa-f]/),A2=Ll(/[!-/:-@[-`{-~]/);function be(n){return n!==null&&n<-2}function tt(n){return n!==null&&(n<0||n===32)}function Oe(n){return n===-2||n===-1||n===32}const hs=Ll(new RegExp("\\p{P}|\\p{S}","u")),ri=Ll(/\s/);function Ll(n){return l;function l(a){return a!==null&&a>-1&&n.test(String.fromCharCode(a))}}function sa(n){const l=[];let a=-1,r=0,s=0;for(;++a<n.length;){const c=n.charCodeAt(a);let f="";if(c===37&&jt(n.charCodeAt(a+1))&&jt(n.charCodeAt(a+2)))s=2;else if(c<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(c))||(f=String.fromCharCode(c));else if(c>55295&&c<57344){const h=n.charCodeAt(a+1);c<56320&&h>56319&&h<57344?(f=String.fromCharCode(c,h),s=1):f="�"}else f=String.fromCharCode(c);f&&(l.push(n.slice(r,a),encodeURIComponent(f)),r=a+s+1,f=""),s&&(a+=s,s=0)}return l.join("")+n.slice(r)}function He(n,l,a,r){const s=r?r-1:Number.POSITIVE_INFINITY;let c=0;return f;function f(p){return Oe(p)?(n.enter(a),h(p)):l(p)}function h(p){return Oe(p)&&c++<s?(n.consume(p),h):(n.exit(a),l(p))}}const N2={tokenize:T2};function T2(n){const l=n.attempt(this.parser.constructs.contentInitial,r,s);let a;return l;function r(h){if(h===null){n.consume(h);return}return n.enter("lineEnding"),n.consume(h),n.exit("lineEnding"),He(n,l,"linePrefix")}function s(h){return n.enter("paragraph"),c(h)}function c(h){const p=n.enter("chunkText",{contentType:"text",previous:a});return a&&(a.next=p),a=p,f(h)}function f(h){if(h===null){n.exit("chunkText"),n.exit("paragraph"),n.consume(h);return}return be(h)?(n.consume(h),n.exit("chunkText"),c):(n.consume(h),f)}}const j2={tokenize:z2},qg={tokenize:D2};function z2(n){const l=this,a=[];let r=0,s,c,f;return h;function h(H){if(r<a.length){const le=a[r];return l.containerState=le[1],n.attempt(le[0].continuation,p,m)(H)}return m(H)}function p(H){if(r++,l.containerState._closeFlow){l.containerState._closeFlow=void 0,s&&Z();const le=l.events.length;let ee=le,D;for(;ee--;)if(l.events[ee][0]==="exit"&&l.events[ee][1].type==="chunkFlow"){D=l.events[ee][1].end;break}j(r);let P=le;for(;P<l.events.length;)l.events[P][1].end={...D},P++;return an(l.events,ee+1,0,l.events.slice(le)),l.events.length=P,m(H)}return h(H)}function m(H){if(r===a.length){if(!s)return k(H);if(s.currentConstruct&&s.currentConstruct.concrete)return E(H);l.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return l.containerState={},n.check(qg,b,y)(H)}function b(H){return s&&Z(),j(r),k(H)}function y(H){return l.parser.lazy[l.now().line]=r!==a.length,f=l.now().offset,E(H)}function k(H){return l.containerState={},n.attempt(qg,v,E)(H)}function v(H){return r++,a.push([l.currentConstruct,l.containerState]),k(H)}function E(H){if(H===null){s&&Z(),j(0),n.consume(H);return}return s=s||l.parser.flow(l.now()),n.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:c}),O(H)}function O(H){if(H===null){q(n.exit("chunkFlow"),!0),j(0),n.consume(H);return}return be(H)?(n.consume(H),q(n.exit("chunkFlow")),r=0,l.interrupt=void 0,h):(n.consume(H),O)}function q(H,le){const ee=l.sliceStream(H);if(le&&ee.push(null),H.previous=c,c&&(c.next=H),c=H,s.defineSkip(H.start),s.write(ee),l.parser.lazy[H.start.line]){let D=s.events.length;for(;D--;)if(s.events[D][1].start.offset<f&&(!s.events[D][1].end||s.events[D][1].end.offset>f))return;const P=l.events.length;let ce=P,fe,M;for(;ce--;)if(l.events[ce][0]==="exit"&&l.events[ce][1].type==="chunkFlow"){if(fe){M=l.events[ce][1].end;break}fe=!0}for(j(r),D=P;D<l.events.length;)l.events[D][1].end={...M},D++;an(l.events,ce+1,0,l.events.slice(P)),l.events.length=D}}function j(H){let le=a.length;for(;le-- >H;){const ee=a[le];l.containerState=ee[1],ee[0].exit.call(l,n)}a.length=H}function Z(){s.write([null]),c=void 0,s=void 0,l.containerState._closeFlow=void 0}}function D2(n,l,a){return He(n,n.attempt(this.parser.constructs.document,l,a),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ra(n){if(n===null||tt(n)||ri(n))return 1;if(hs(n))return 2}function ms(n,l,a){const r=[];let s=-1;for(;++s<n.length;){const c=n[s].resolveAll;c&&!r.includes(c)&&(l=c(l,a),r.push(c))}return l}const kf={name:"attention",resolveAll:M2,tokenize:O2};function M2(n,l){let a=-1,r,s,c,f,h,p,m,b;for(;++a<n.length;)if(n[a][0]==="enter"&&n[a][1].type==="attentionSequence"&&n[a][1]._close){for(r=a;r--;)if(n[r][0]==="exit"&&n[r][1].type==="attentionSequence"&&n[r][1]._open&&l.sliceSerialize(n[r][1]).charCodeAt(0)===l.sliceSerialize(n[a][1]).charCodeAt(0)){if((n[r][1]._close||n[a][1]._open)&&(n[a][1].end.offset-n[a][1].start.offset)%3&&!((n[r][1].end.offset-n[r][1].start.offset+n[a][1].end.offset-n[a][1].start.offset)%3))continue;p=n[r][1].end.offset-n[r][1].start.offset>1&&n[a][1].end.offset-n[a][1].start.offset>1?2:1;const y={...n[r][1].end},k={...n[a][1].start};Vg(y,-p),Vg(k,p),f={type:p>1?"strongSequence":"emphasisSequence",start:y,end:{...n[r][1].end}},h={type:p>1?"strongSequence":"emphasisSequence",start:{...n[a][1].start},end:k},c={type:p>1?"strongText":"emphasisText",start:{...n[r][1].end},end:{...n[a][1].start}},s={type:p>1?"strong":"emphasis",start:{...f.start},end:{...h.end}},n[r][1].end={...f.start},n[a][1].start={...h.end},m=[],n[r][1].end.offset-n[r][1].start.offset&&(m=xn(m,[["enter",n[r][1],l],["exit",n[r][1],l]])),m=xn(m,[["enter",s,l],["enter",f,l],["exit",f,l],["enter",c,l]]),m=xn(m,ms(l.parser.constructs.insideSpan.null,n.slice(r+1,a),l)),m=xn(m,[["exit",c,l],["enter",h,l],["exit",h,l],["exit",s,l]]),n[a][1].end.offset-n[a][1].start.offset?(b=2,m=xn(m,[["enter",n[a][1],l],["exit",n[a][1],l]])):b=0,an(n,r-1,a-r+3,m),a=r+m.length-b-2;break}}for(a=-1;++a<n.length;)n[a][1].type==="attentionSequence"&&(n[a][1].type="data");return n}function O2(n,l){const a=this.parser.constructs.attentionMarkers.null,r=this.previous,s=ra(r);let c;return f;function f(p){return c=p,n.enter("attentionSequence"),h(p)}function h(p){if(p===c)return n.consume(p),h;const m=n.exit("attentionSequence"),b=ra(p),y=!b||b===2&&s||a.includes(p),k=!s||s===2&&b||a.includes(r);return m._open=!!(c===42?y:y&&(s||!k)),m._close=!!(c===42?k:k&&(b||!y)),l(p)}}function Vg(n,l){n.column+=l,n.offset+=l,n._bufferIndex+=l}const R2={name:"autolink",tokenize:L2};function L2(n,l,a){let r=0;return s;function s(v){return n.enter("autolink"),n.enter("autolinkMarker"),n.consume(v),n.exit("autolinkMarker"),n.enter("autolinkProtocol"),c}function c(v){return Rt(v)?(n.consume(v),f):v===64?a(v):m(v)}function f(v){return v===43||v===45||v===46||jt(v)?(r=1,h(v)):m(v)}function h(v){return v===58?(n.consume(v),r=0,p):(v===43||v===45||v===46||jt(v))&&r++<32?(n.consume(v),h):(r=0,m(v))}function p(v){return v===62?(n.exit("autolinkProtocol"),n.enter("autolinkMarker"),n.consume(v),n.exit("autolinkMarker"),n.exit("autolink"),l):v===null||v===32||v===60||ls(v)?a(v):(n.consume(v),p)}function m(v){return v===64?(n.consume(v),b):E2(v)?(n.consume(v),m):a(v)}function b(v){return jt(v)?y(v):a(v)}function y(v){return v===46?(n.consume(v),r=0,b):v===62?(n.exit("autolinkProtocol").type="autolinkEmail",n.enter("autolinkMarker"),n.consume(v),n.exit("autolinkMarker"),n.exit("autolink"),l):k(v)}function k(v){if((v===45||jt(v))&&r++<63){const E=v===45?k:y;return n.consume(v),E}return a(v)}}const vr={partial:!0,tokenize:B2};function B2(n,l,a){return r;function r(c){return Oe(c)?He(n,s,"linePrefix")(c):s(c)}function s(c){return c===null||be(c)?l(c):a(c)}}const Jy={continuation:{tokenize:H2},exit:q2,name:"blockQuote",tokenize:U2};function U2(n,l,a){const r=this;return s;function s(f){if(f===62){const h=r.containerState;return h.open||(n.enter("blockQuote",{_container:!0}),h.open=!0),n.enter("blockQuotePrefix"),n.enter("blockQuoteMarker"),n.consume(f),n.exit("blockQuoteMarker"),c}return a(f)}function c(f){return Oe(f)?(n.enter("blockQuotePrefixWhitespace"),n.consume(f),n.exit("blockQuotePrefixWhitespace"),n.exit("blockQuotePrefix"),l):(n.exit("blockQuotePrefix"),l(f))}}function H2(n,l,a){const r=this;return s;function s(f){return Oe(f)?He(n,c,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f):c(f)}function c(f){return n.attempt(Jy,l,a)(f)}}function q2(n){n.exit("blockQuote")}const $y={name:"characterEscape",tokenize:V2};function V2(n,l,a){return r;function r(c){return n.enter("characterEscape"),n.enter("escapeMarker"),n.consume(c),n.exit("escapeMarker"),s}function s(c){return A2(c)?(n.enter("characterEscapeValue"),n.consume(c),n.exit("characterEscapeValue"),n.exit("characterEscape"),l):a(c)}}const Py={name:"characterReference",tokenize:Y2};function Y2(n,l,a){const r=this;let s=0,c,f;return h;function h(y){return n.enter("characterReference"),n.enter("characterReferenceMarker"),n.consume(y),n.exit("characterReferenceMarker"),p}function p(y){return y===35?(n.enter("characterReferenceMarkerNumeric"),n.consume(y),n.exit("characterReferenceMarkerNumeric"),m):(n.enter("characterReferenceValue"),c=31,f=jt,b(y))}function m(y){return y===88||y===120?(n.enter("characterReferenceMarkerHexadecimal"),n.consume(y),n.exit("characterReferenceMarkerHexadecimal"),n.enter("characterReferenceValue"),c=6,f=C2,b):(n.enter("characterReferenceValue"),c=7,f=vf,b(y))}function b(y){if(y===59&&s){const k=n.exit("characterReferenceValue");return f===jt&&!Zf(r.sliceSerialize(k))?a(y):(n.enter("characterReferenceMarker"),n.consume(y),n.exit("characterReferenceMarker"),n.exit("characterReference"),l)}return f(y)&&s++<c?(n.consume(y),b):a(y)}}const Yg={partial:!0,tokenize:I2},Zg={concrete:!0,name:"codeFenced",tokenize:Z2};function Z2(n,l,a){const r=this,s={partial:!0,tokenize:ee};let c=0,f=0,h;return p;function p(D){return m(D)}function m(D){const P=r.events[r.events.length-1];return c=P&&P[1].type==="linePrefix"?P[2].sliceSerialize(P[1],!0).length:0,h=D,n.enter("codeFenced"),n.enter("codeFencedFence"),n.enter("codeFencedFenceSequence"),b(D)}function b(D){return D===h?(f++,n.consume(D),b):f<3?a(D):(n.exit("codeFencedFenceSequence"),Oe(D)?He(n,y,"whitespace")(D):y(D))}function y(D){return D===null||be(D)?(n.exit("codeFencedFence"),r.interrupt?l(D):n.check(Yg,O,le)(D)):(n.enter("codeFencedFenceInfo"),n.enter("chunkString",{contentType:"string"}),k(D))}function k(D){return D===null||be(D)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),y(D)):Oe(D)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),He(n,v,"whitespace")(D)):D===96&&D===h?a(D):(n.consume(D),k)}function v(D){return D===null||be(D)?y(D):(n.enter("codeFencedFenceMeta"),n.enter("chunkString",{contentType:"string"}),E(D))}function E(D){return D===null||be(D)?(n.exit("chunkString"),n.exit("codeFencedFenceMeta"),y(D)):D===96&&D===h?a(D):(n.consume(D),E)}function O(D){return n.attempt(s,le,q)(D)}function q(D){return n.enter("lineEnding"),n.consume(D),n.exit("lineEnding"),j}function j(D){return c>0&&Oe(D)?He(n,Z,"linePrefix",c+1)(D):Z(D)}function Z(D){return D===null||be(D)?n.check(Yg,O,le)(D):(n.enter("codeFlowValue"),H(D))}function H(D){return D===null||be(D)?(n.exit("codeFlowValue"),Z(D)):(n.consume(D),H)}function le(D){return n.exit("codeFenced"),l(D)}function ee(D,P,ce){let fe=0;return M;function M(W){return D.enter("lineEnding"),D.consume(W),D.exit("lineEnding"),U}function U(W){return D.enter("codeFencedFence"),Oe(W)?He(D,J,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(W):J(W)}function J(W){return W===h?(D.enter("codeFencedFenceSequence"),pe(W)):ce(W)}function pe(W){return W===h?(fe++,D.consume(W),pe):fe>=f?(D.exit("codeFencedFenceSequence"),Oe(W)?He(D,re,"whitespace")(W):re(W)):ce(W)}function re(W){return W===null||be(W)?(D.exit("codeFencedFence"),P(W)):ce(W)}}}function I2(n,l,a){const r=this;return s;function s(f){return f===null?a(f):(n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),c)}function c(f){return r.parser.lazy[r.now().line]?a(f):l(f)}}const Qo={name:"codeIndented",tokenize:Q2},F2={partial:!0,tokenize:G2};function Q2(n,l,a){const r=this;return s;function s(m){return n.enter("codeIndented"),He(n,c,"linePrefix",5)(m)}function c(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):a(m)}function f(m){return m===null?p(m):be(m)?n.attempt(F2,f,p)(m):(n.enter("codeFlowValue"),h(m))}function h(m){return m===null||be(m)?(n.exit("codeFlowValue"),f(m)):(n.consume(m),h)}function p(m){return n.exit("codeIndented"),l(m)}}function G2(n,l,a){const r=this;return s;function s(f){return r.parser.lazy[r.now().line]?a(f):be(f)?(n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),s):He(n,c,"linePrefix",5)(f)}function c(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):be(f)?s(f):a(f)}}const X2={name:"codeText",previous:J2,resolve:K2,tokenize:$2};function K2(n){let l=n.length-4,a=3,r,s;if((n[a][1].type==="lineEnding"||n[a][1].type==="space")&&(n[l][1].type==="lineEnding"||n[l][1].type==="space")){for(r=a;++r<l;)if(n[r][1].type==="codeTextData"){n[a][1].type="codeTextPadding",n[l][1].type="codeTextPadding",a+=2,l-=2;break}}for(r=a-1,l++;++r<=l;)s===void 0?r!==l&&n[r][1].type!=="lineEnding"&&(s=r):(r===l||n[r][1].type==="lineEnding")&&(n[s][1].type="codeTextData",r!==s+2&&(n[s][1].end=n[r-1][1].end,n.splice(s+2,r-s-2),l-=r-s-2,r=s+2),s=void 0);return n}function J2(n){return n!==96||this.events[this.events.length-1][1].type==="characterEscape"}function $2(n,l,a){let r=0,s,c;return f;function f(y){return n.enter("codeText"),n.enter("codeTextSequence"),h(y)}function h(y){return y===96?(n.consume(y),r++,h):(n.exit("codeTextSequence"),p(y))}function p(y){return y===null?a(y):y===32?(n.enter("space"),n.consume(y),n.exit("space"),p):y===96?(c=n.enter("codeTextSequence"),s=0,b(y)):be(y)?(n.enter("lineEnding"),n.consume(y),n.exit("lineEnding"),p):(n.enter("codeTextData"),m(y))}function m(y){return y===null||y===32||y===96||be(y)?(n.exit("codeTextData"),p(y)):(n.consume(y),m)}function b(y){return y===96?(n.consume(y),s++,b):s===r?(n.exit("codeTextSequence"),n.exit("codeText"),l(y)):(c.type="codeTextData",m(y))}}class P2{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,a){const r=a??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,a,r){const s=a||0;this.setCursor(Math.trunc(l));const c=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return r&&rr(this.left,r),c.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),rr(this.left,l)}unshift(l){this.setCursor(0),this.right.push(l)}unshiftMany(l){this.setCursor(0),rr(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 a=this.left.splice(l,Number.POSITIVE_INFINITY);rr(this.right,a.reverse())}else{const a=this.right.splice(this.left.length+this.right.length-l,Number.POSITIVE_INFINITY);rr(this.left,a.reverse())}}}function rr(n,l){let a=0;if(l.length<1e4)n.push(...l);else for(;a<l.length;)n.push(...l.slice(a,a+1e4)),a+=1e4}function Wy(n){const l={};let a=-1,r,s,c,f,h,p,m;const b=new P2(n);for(;++a<b.length;){for(;a in l;)a=l[a];if(r=b.get(a),a&&r[1].type==="chunkFlow"&&b.get(a-1)[1].type==="listItemPrefix"&&(p=r[1]._tokenizer.events,c=0,c<p.length&&p[c][1].type==="lineEndingBlank"&&(c+=2),c<p.length&&p[c][1].type==="content"))for(;++c<p.length&&p[c][1].type!=="content";)p[c][1].type==="chunkText"&&(p[c][1]._isInFirstContentOfListItem=!0,c++);if(r[0]==="enter")r[1].contentType&&(Object.assign(l,W2(b,a)),a=l[a],m=!0);else if(r[1]._container){for(c=a,s=void 0;c--;)if(f=b.get(c),f[1].type==="lineEnding"||f[1].type==="lineEndingBlank")f[0]==="enter"&&(s&&(b.get(s)[1].type="lineEndingBlank"),f[1].type="lineEnding",s=c);else if(!(f[1].type==="linePrefix"||f[1].type==="listItemIndent"))break;s&&(r[1].end={...b.get(s)[1].start},h=b.slice(s,a),h.unshift(r),b.splice(s,a-s+1,h))}}return an(n,0,Number.POSITIVE_INFINITY,b.slice(0)),!m}function W2(n,l){const a=n.get(l)[1],r=n.get(l)[2];let s=l-1;const c=[];let f=a._tokenizer;f||(f=r.parser[a.contentType](a.start),a._contentTypeTextTrailing&&(f._contentTypeTextTrailing=!0));const h=f.events,p=[],m={};let b,y,k=-1,v=a,E=0,O=0;const q=[O];for(;v;){for(;n.get(++s)[1]!==v;);c.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=a;++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&&(O=k+1,q.push(O),v._tokenizer=void 0,v.previous=void 0,v=v.next);for(f.events=[],v?(v._tokenizer=void 0,v.previous=void 0):q.pop(),k=q.length;k--;){const j=h.slice(q[k],q[k+1]),Z=c.pop();p.push([Z,Z+j.length-1]),n.splice(Z,2,j)}for(p.reverse(),k=-1;++k<p.length;)m[E+p[k][0]]=E+p[k][1],E+=p[k][1]-p[k][0]-1;return m}const ek={resolve:nk,tokenize:lk},tk={partial:!0,tokenize:ik};function nk(n){return Wy(n),n}function lk(n,l){let a;return r;function r(h){return n.enter("content"),a=n.enter("chunkContent",{contentType:"content"}),s(h)}function s(h){return h===null?c(h):be(h)?n.check(tk,f,c)(h):(n.consume(h),s)}function c(h){return n.exit("chunkContent"),n.exit("content"),l(h)}function f(h){return n.consume(h),n.exit("chunkContent"),a.next=n.enter("chunkContent",{contentType:"content",previous:a}),a=a.next,s}}function ik(n,l,a){const r=this;return s;function s(f){return n.exit("chunkContent"),n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),He(n,c,"linePrefix")}function c(f){if(f===null||be(f))return a(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):n.interrupt(r.parser.constructs.flow,a,l)(f)}}function ex(n,l,a,r,s,c,f,h,p){const m=p||Number.POSITIVE_INFINITY;let b=0;return y;function y(j){return j===60?(n.enter(r),n.enter(s),n.enter(c),n.consume(j),n.exit(c),k):j===null||j===32||j===41||ls(j)?a(j):(n.enter(r),n.enter(f),n.enter(h),n.enter("chunkString",{contentType:"string"}),O(j))}function k(j){return j===62?(n.enter(c),n.consume(j),n.exit(c),n.exit(s),n.exit(r),l):(n.enter(h),n.enter("chunkString",{contentType:"string"}),v(j))}function v(j){return j===62?(n.exit("chunkString"),n.exit(h),k(j)):j===null||j===60||be(j)?a(j):(n.consume(j),j===92?E:v)}function E(j){return j===60||j===62||j===92?(n.consume(j),v):v(j)}function O(j){return!b&&(j===null||j===41||tt(j))?(n.exit("chunkString"),n.exit(h),n.exit(f),n.exit(r),l(j)):b<m&&j===40?(n.consume(j),b++,O):j===41?(n.consume(j),b--,O):j===null||j===32||j===40||ls(j)?a(j):(n.consume(j),j===92?q:O)}function q(j){return j===40||j===41||j===92?(n.consume(j),O):O(j)}}function tx(n,l,a,r,s,c){const f=this;let h=0,p;return m;function m(v){return n.enter(r),n.enter(s),n.consume(v),n.exit(s),n.enter(c),b}function b(v){return h>999||v===null||v===91||v===93&&!p||v===94&&!h&&"_hiddenFootnoteSupport"in f.parser.constructs?a(v):v===93?(n.exit(c),n.enter(s),n.consume(v),n.exit(s),n.exit(r),l):be(v)?(n.enter("lineEnding"),n.consume(v),n.exit("lineEnding"),b):(n.enter("chunkString",{contentType:"string"}),y(v))}function y(v){return v===null||v===91||v===93||be(v)||h++>999?(n.exit("chunkString"),b(v)):(n.consume(v),p||(p=!Oe(v)),v===92?k:y)}function k(v){return v===91||v===92||v===93?(n.consume(v),h++,y):y(v)}}function nx(n,l,a,r,s,c){let f;return h;function h(k){return k===34||k===39||k===40?(n.enter(r),n.enter(s),n.consume(k),n.exit(s),f=k===40?41:k,p):a(k)}function p(k){return k===f?(n.enter(s),n.consume(k),n.exit(s),n.exit(r),l):(n.enter(c),m(k))}function m(k){return k===f?(n.exit(c),p(f)):k===null?a(k):be(k)?(n.enter("lineEnding"),n.consume(k),n.exit("lineEnding"),He(n,m,"linePrefix")):(n.enter("chunkString",{contentType:"string"}),b(k))}function b(k){return k===f||k===null||be(k)?(n.exit("chunkString"),m(k)):(n.consume(k),k===92?y:b)}function y(k){return k===f||k===92?(n.consume(k),b):b(k)}}function or(n,l){let a;return r;function r(s){return be(s)?(n.enter("lineEnding"),n.consume(s),n.exit("lineEnding"),a=!0,r):Oe(s)?He(n,r,a?"linePrefix":"lineSuffix")(s):l(s)}}const ak={name:"definition",tokenize:uk},rk={partial:!0,tokenize:sk};function uk(n,l,a){const r=this;let s;return c;function c(v){return n.enter("definition"),f(v)}function f(v){return tx.call(r,n,h,a,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function h(v){return s=_n(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),v===58?(n.enter("definitionMarker"),n.consume(v),n.exit("definitionMarker"),p):a(v)}function p(v){return tt(v)?or(n,m)(v):m(v)}function m(v){return ex(n,b,a,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function b(v){return n.attempt(rk,y,y)(v)}function y(v){return Oe(v)?He(n,k,"whitespace")(v):k(v)}function k(v){return v===null||be(v)?(n.exit("definition"),r.parser.defined.push(s),l(v)):a(v)}}function sk(n,l,a){return r;function r(h){return tt(h)?or(n,s)(h):a(h)}function s(h){return nx(n,c,a,"definitionTitle","definitionTitleMarker","definitionTitleString")(h)}function c(h){return Oe(h)?He(n,f,"whitespace")(h):f(h)}function f(h){return h===null||be(h)?l(h):a(h)}}const ck={name:"hardBreakEscape",tokenize:ok};function ok(n,l,a){return r;function r(c){return n.enter("hardBreakEscape"),n.consume(c),s}function s(c){return be(c)?(n.exit("hardBreakEscape"),l(c)):a(c)}}const fk={name:"headingAtx",resolve:dk,tokenize:hk};function dk(n,l){let a=n.length-2,r=3,s,c;return n[r][1].type==="whitespace"&&(r+=2),a-2>r&&n[a][1].type==="whitespace"&&(a-=2),n[a][1].type==="atxHeadingSequence"&&(r===a-1||a-4>r&&n[a-2][1].type==="whitespace")&&(a-=r+1===a?2:4),a>r&&(s={type:"atxHeadingText",start:n[r][1].start,end:n[a][1].end},c={type:"chunkText",start:n[r][1].start,end:n[a][1].end,contentType:"text"},an(n,r,a-r+1,[["enter",s,l],["enter",c,l],["exit",c,l],["exit",s,l]])),n}function hk(n,l,a){let r=0;return s;function s(b){return n.enter("atxHeading"),c(b)}function c(b){return n.enter("atxHeadingSequence"),f(b)}function f(b){return b===35&&r++<6?(n.consume(b),f):b===null||tt(b)?(n.exit("atxHeadingSequence"),h(b)):a(b)}function h(b){return b===35?(n.enter("atxHeadingSequence"),p(b)):b===null||be(b)?(n.exit("atxHeading"),l(b)):Oe(b)?He(n,h,"whitespace")(b):(n.enter("atxHeadingText"),m(b))}function p(b){return b===35?(n.consume(b),p):(n.exit("atxHeadingSequence"),h(b))}function m(b){return b===null||b===35||tt(b)?(n.exit("atxHeadingText"),h(b)):(n.consume(b),m)}}const mk=["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"],Ig=["pre","script","style","textarea"],pk={concrete:!0,name:"htmlFlow",resolveTo:xk,tokenize:bk},gk={partial:!0,tokenize:kk},yk={partial:!0,tokenize:vk};function xk(n){let l=n.length;for(;l--&&!(n[l][0]==="enter"&&n[l][1].type==="htmlFlow"););return l>1&&n[l-2][1].type==="linePrefix"&&(n[l][1].start=n[l-2][1].start,n[l+1][1].start=n[l-2][1].start,n.splice(l-2,2)),n}function bk(n,l,a){const r=this;let s,c,f,h,p;return m;function m(w){return b(w)}function b(w){return n.enter("htmlFlow"),n.enter("htmlFlowData"),n.consume(w),y}function y(w){return w===33?(n.consume(w),k):w===47?(n.consume(w),c=!0,O):w===63?(n.consume(w),s=3,r.interrupt?l:_):Rt(w)?(n.consume(w),f=String.fromCharCode(w),q):a(w)}function k(w){return w===45?(n.consume(w),s=2,v):w===91?(n.consume(w),s=5,h=0,E):Rt(w)?(n.consume(w),s=4,r.interrupt?l:_):a(w)}function v(w){return w===45?(n.consume(w),r.interrupt?l:_):a(w)}function E(w){const ae="CDATA[";return w===ae.charCodeAt(h++)?(n.consume(w),h===ae.length?r.interrupt?l:J:E):a(w)}function O(w){return Rt(w)?(n.consume(w),f=String.fromCharCode(w),q):a(w)}function q(w){if(w===null||w===47||w===62||tt(w)){const ae=w===47,ke=f.toLowerCase();return!ae&&!c&&Ig.includes(ke)?(s=1,r.interrupt?l(w):J(w)):mk.includes(f.toLowerCase())?(s=6,ae?(n.consume(w),j):r.interrupt?l(w):J(w)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?a(w):c?Z(w):H(w))}return w===45||jt(w)?(n.consume(w),f+=String.fromCharCode(w),q):a(w)}function j(w){return w===62?(n.consume(w),r.interrupt?l:J):a(w)}function Z(w){return Oe(w)?(n.consume(w),Z):M(w)}function H(w){return w===47?(n.consume(w),M):w===58||w===95||Rt(w)?(n.consume(w),le):Oe(w)?(n.consume(w),H):M(w)}function le(w){return w===45||w===46||w===58||w===95||jt(w)?(n.consume(w),le):ee(w)}function ee(w){return w===61?(n.consume(w),D):Oe(w)?(n.consume(w),ee):H(w)}function D(w){return w===null||w===60||w===61||w===62||w===96?a(w):w===34||w===39?(n.consume(w),p=w,P):Oe(w)?(n.consume(w),D):ce(w)}function P(w){return w===p?(n.consume(w),p=null,fe):w===null||be(w)?a(w):(n.consume(w),P)}function ce(w){return w===null||w===34||w===39||w===47||w===60||w===61||w===62||w===96||tt(w)?ee(w):(n.consume(w),ce)}function fe(w){return w===47||w===62||Oe(w)?H(w):a(w)}function M(w){return w===62?(n.consume(w),U):a(w)}function U(w){return w===null||be(w)?J(w):Oe(w)?(n.consume(w),U):a(w)}function J(w){return w===45&&s===2?(n.consume(w),T):w===60&&s===1?(n.consume(w),$):w===62&&s===4?(n.consume(w),A):w===63&&s===3?(n.consume(w),_):w===93&&s===5?(n.consume(w),de):be(w)&&(s===6||s===7)?(n.exit("htmlFlowData"),n.check(gk,I,pe)(w)):w===null||be(w)?(n.exit("htmlFlowData"),pe(w)):(n.consume(w),J)}function pe(w){return n.check(yk,re,I)(w)}function re(w){return n.enter("lineEnding"),n.consume(w),n.exit("lineEnding"),W}function W(w){return w===null||be(w)?pe(w):(n.enter("htmlFlowData"),J(w))}function T(w){return w===45?(n.consume(w),_):J(w)}function $(w){return w===47?(n.consume(w),f="",ue):J(w)}function ue(w){if(w===62){const ae=f.toLowerCase();return Ig.includes(ae)?(n.consume(w),A):J(w)}return Rt(w)&&f.length<8?(n.consume(w),f+=String.fromCharCode(w),ue):J(w)}function de(w){return w===93?(n.consume(w),_):J(w)}function _(w){return w===62?(n.consume(w),A):w===45&&s===2?(n.consume(w),_):J(w)}function A(w){return w===null||be(w)?(n.exit("htmlFlowData"),I(w)):(n.consume(w),A)}function I(w){return n.exit("htmlFlow"),l(w)}}function vk(n,l,a){const r=this;return s;function s(f){return be(f)?(n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),c):a(f)}function c(f){return r.parser.lazy[r.now().line]?a(f):l(f)}}function kk(n,l,a){return r;function r(s){return n.enter("lineEnding"),n.consume(s),n.exit("lineEnding"),n.attempt(vr,l,a)}}const Sk={name:"htmlText",tokenize:wk};function wk(n,l,a){const r=this;let s,c,f;return h;function h(_){return n.enter("htmlText"),n.enter("htmlTextData"),n.consume(_),p}function p(_){return _===33?(n.consume(_),m):_===47?(n.consume(_),ee):_===63?(n.consume(_),H):Rt(_)?(n.consume(_),ce):a(_)}function m(_){return _===45?(n.consume(_),b):_===91?(n.consume(_),c=0,E):Rt(_)?(n.consume(_),Z):a(_)}function b(_){return _===45?(n.consume(_),v):a(_)}function y(_){return _===null?a(_):_===45?(n.consume(_),k):be(_)?(f=y,$(_)):(n.consume(_),y)}function k(_){return _===45?(n.consume(_),v):y(_)}function v(_){return _===62?T(_):_===45?k(_):y(_)}function E(_){const A="CDATA[";return _===A.charCodeAt(c++)?(n.consume(_),c===A.length?O:E):a(_)}function O(_){return _===null?a(_):_===93?(n.consume(_),q):be(_)?(f=O,$(_)):(n.consume(_),O)}function q(_){return _===93?(n.consume(_),j):O(_)}function j(_){return _===62?T(_):_===93?(n.consume(_),j):O(_)}function Z(_){return _===null||_===62?T(_):be(_)?(f=Z,$(_)):(n.consume(_),Z)}function H(_){return _===null?a(_):_===63?(n.consume(_),le):be(_)?(f=H,$(_)):(n.consume(_),H)}function le(_){return _===62?T(_):H(_)}function ee(_){return Rt(_)?(n.consume(_),D):a(_)}function D(_){return _===45||jt(_)?(n.consume(_),D):P(_)}function P(_){return be(_)?(f=P,$(_)):Oe(_)?(n.consume(_),P):T(_)}function ce(_){return _===45||jt(_)?(n.consume(_),ce):_===47||_===62||tt(_)?fe(_):a(_)}function fe(_){return _===47?(n.consume(_),T):_===58||_===95||Rt(_)?(n.consume(_),M):be(_)?(f=fe,$(_)):Oe(_)?(n.consume(_),fe):T(_)}function M(_){return _===45||_===46||_===58||_===95||jt(_)?(n.consume(_),M):U(_)}function U(_){return _===61?(n.consume(_),J):be(_)?(f=U,$(_)):Oe(_)?(n.consume(_),U):fe(_)}function J(_){return _===null||_===60||_===61||_===62||_===96?a(_):_===34||_===39?(n.consume(_),s=_,pe):be(_)?(f=J,$(_)):Oe(_)?(n.consume(_),J):(n.consume(_),re)}function pe(_){return _===s?(n.consume(_),s=void 0,W):_===null?a(_):be(_)?(f=pe,$(_)):(n.consume(_),pe)}function re(_){return _===null||_===34||_===39||_===60||_===61||_===96?a(_):_===47||_===62||tt(_)?fe(_):(n.consume(_),re)}function W(_){return _===47||_===62||tt(_)?fe(_):a(_)}function T(_){return _===62?(n.consume(_),n.exit("htmlTextData"),n.exit("htmlText"),l):a(_)}function $(_){return n.exit("htmlTextData"),n.enter("lineEnding"),n.consume(_),n.exit("lineEnding"),ue}function ue(_){return Oe(_)?He(n,de,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(_):de(_)}function de(_){return n.enter("htmlTextData"),f(_)}}const If={name:"labelEnd",resolveAll:Ak,resolveTo:Nk,tokenize:Tk},_k={tokenize:jk},Ek={tokenize:zk},Ck={tokenize:Dk};function Ak(n){let l=-1;const a=[];for(;++l<n.length;){const r=n[l][1];if(a.push(n[l]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const s=r.type==="labelImage"?4:2;r.type="data",l+=s}}return n.length!==a.length&&an(n,0,n.length,a),n}function Nk(n,l){let a=n.length,r=0,s,c,f,h;for(;a--;)if(s=n[a][1],c){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;n[a][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(f){if(n[a][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(c=a,s.type!=="labelLink")){r=2;break}}else s.type==="labelEnd"&&(f=a);const p={type:n[c][1].type==="labelLink"?"link":"image",start:{...n[c][1].start},end:{...n[n.length-1][1].end}},m={type:"label",start:{...n[c][1].start},end:{...n[f][1].end}},b={type:"labelText",start:{...n[c+r+2][1].end},end:{...n[f-2][1].start}};return h=[["enter",p,l],["enter",m,l]],h=xn(h,n.slice(c+1,c+r+3)),h=xn(h,[["enter",b,l]]),h=xn(h,ms(l.parser.constructs.insideSpan.null,n.slice(c+r+4,f-3),l)),h=xn(h,[["exit",b,l],n[f-2],n[f-1],["exit",m,l]]),h=xn(h,n.slice(f+1)),h=xn(h,[["exit",p,l]]),an(n,c,n.length,h),n}function Tk(n,l,a){const r=this;let s=r.events.length,c,f;for(;s--;)if((r.events[s][1].type==="labelImage"||r.events[s][1].type==="labelLink")&&!r.events[s][1]._balanced){c=r.events[s][1];break}return h;function h(k){return c?c._inactive?y(k):(f=r.parser.defined.includes(_n(r.sliceSerialize({start:c.end,end:r.now()}))),n.enter("labelEnd"),n.enter("labelMarker"),n.consume(k),n.exit("labelMarker"),n.exit("labelEnd"),p):a(k)}function p(k){return k===40?n.attempt(_k,b,f?b:y)(k):k===91?n.attempt(Ek,b,f?m:y)(k):f?b(k):y(k)}function m(k){return n.attempt(Ck,b,y)(k)}function b(k){return l(k)}function y(k){return c._balanced=!0,a(k)}}function jk(n,l,a){return r;function r(y){return n.enter("resource"),n.enter("resourceMarker"),n.consume(y),n.exit("resourceMarker"),s}function s(y){return tt(y)?or(n,c)(y):c(y)}function c(y){return y===41?b(y):ex(n,f,h,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(y)}function f(y){return tt(y)?or(n,p)(y):b(y)}function h(y){return a(y)}function p(y){return y===34||y===39||y===40?nx(n,m,a,"resourceTitle","resourceTitleMarker","resourceTitleString")(y):b(y)}function m(y){return tt(y)?or(n,b)(y):b(y)}function b(y){return y===41?(n.enter("resourceMarker"),n.consume(y),n.exit("resourceMarker"),n.exit("resource"),l):a(y)}}function zk(n,l,a){const r=this;return s;function s(h){return tx.call(r,n,c,f,"reference","referenceMarker","referenceString")(h)}function c(h){return r.parser.defined.includes(_n(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?l(h):a(h)}function f(h){return a(h)}}function Dk(n,l,a){return r;function r(c){return n.enter("reference"),n.enter("referenceMarker"),n.consume(c),n.exit("referenceMarker"),s}function s(c){return c===93?(n.enter("referenceMarker"),n.consume(c),n.exit("referenceMarker"),n.exit("reference"),l):a(c)}}const Mk={name:"labelStartImage",resolveAll:If.resolveAll,tokenize:Ok};function Ok(n,l,a){const r=this;return s;function s(h){return n.enter("labelImage"),n.enter("labelImageMarker"),n.consume(h),n.exit("labelImageMarker"),c}function c(h){return h===91?(n.enter("labelMarker"),n.consume(h),n.exit("labelMarker"),n.exit("labelImage"),f):a(h)}function f(h){return h===94&&"_hiddenFootnoteSupport"in r.parser.constructs?a(h):l(h)}}const Rk={name:"labelStartLink",resolveAll:If.resolveAll,tokenize:Lk};function Lk(n,l,a){const r=this;return s;function s(f){return n.enter("labelLink"),n.enter("labelMarker"),n.consume(f),n.exit("labelMarker"),n.exit("labelLink"),c}function c(f){return f===94&&"_hiddenFootnoteSupport"in r.parser.constructs?a(f):l(f)}}const Go={name:"lineEnding",tokenize:Bk};function Bk(n,l){return a;function a(r){return n.enter("lineEnding"),n.consume(r),n.exit("lineEnding"),He(n,l,"linePrefix")}}const Qu={name:"thematicBreak",tokenize:Uk};function Uk(n,l,a){let r=0,s;return c;function c(m){return n.enter("thematicBreak"),f(m)}function f(m){return s=m,h(m)}function h(m){return m===s?(n.enter("thematicBreakSequence"),p(m)):r>=3&&(m===null||be(m))?(n.exit("thematicBreak"),l(m)):a(m)}function p(m){return m===s?(n.consume(m),r++,p):(n.exit("thematicBreakSequence"),Oe(m)?He(n,h,"whitespace")(m):h(m))}}const It={continuation:{tokenize:Yk},exit:Ik,name:"list",tokenize:Vk},Hk={partial:!0,tokenize:Fk},qk={partial:!0,tokenize:Zk};function Vk(n,l,a){const r=this,s=r.events[r.events.length-1];let c=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,f=0;return h;function h(v){const E=r.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(E==="listUnordered"?!r.containerState.marker||v===r.containerState.marker:vf(v)){if(r.containerState.type||(r.containerState.type=E,n.enter(E,{_container:!0})),E==="listUnordered")return n.enter("listItemPrefix"),v===42||v===45?n.check(Qu,a,m)(v):m(v);if(!r.interrupt||v===49)return n.enter("listItemPrefix"),n.enter("listItemValue"),p(v)}return a(v)}function p(v){return vf(v)&&++f<10?(n.consume(v),p):(!r.interrupt||f<2)&&(r.containerState.marker?v===r.containerState.marker:v===41||v===46)?(n.exit("listItemValue"),m(v)):a(v)}function m(v){return n.enter("listItemMarker"),n.consume(v),n.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||v,n.check(vr,r.interrupt?a:b,n.attempt(Hk,k,y))}function b(v){return r.containerState.initialBlankLine=!0,c++,k(v)}function y(v){return Oe(v)?(n.enter("listItemPrefixWhitespace"),n.consume(v),n.exit("listItemPrefixWhitespace"),k):a(v)}function k(v){return r.containerState.size=c+r.sliceSerialize(n.exit("listItemPrefix"),!0).length,l(v)}}function Yk(n,l,a){const r=this;return r.containerState._closeFlow=void 0,n.check(vr,s,c);function s(h){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,He(n,l,"listItemIndent",r.containerState.size+1)(h)}function c(h){return r.containerState.furtherBlankLines||!Oe(h)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,f(h)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,n.attempt(qk,l,f)(h))}function f(h){return r.containerState._closeFlow=!0,r.interrupt=void 0,He(n,n.attempt(It,l,a),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(h)}}function Zk(n,l,a){const r=this;return He(n,s,"listItemIndent",r.containerState.size+1);function s(c){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(c):a(c)}}function Ik(n){n.exit(this.containerState.type)}function Fk(n,l,a){const r=this;return He(n,s,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(c){const f=r.events[r.events.length-1];return!Oe(c)&&f&&f[1].type==="listItemPrefixWhitespace"?l(c):a(c)}}const Fg={name:"setextUnderline",resolveTo:Qk,tokenize:Gk};function Qk(n,l){let a=n.length,r,s,c;for(;a--;)if(n[a][0]==="enter"){if(n[a][1].type==="content"){r=a;break}n[a][1].type==="paragraph"&&(s=a)}else n[a][1].type==="content"&&n.splice(a,1),!c&&n[a][1].type==="definition"&&(c=a);const f={type:"setextHeading",start:{...n[r][1].start},end:{...n[n.length-1][1].end}};return n[s][1].type="setextHeadingText",c?(n.splice(s,0,["enter",f,l]),n.splice(c+1,0,["exit",n[r][1],l]),n[r][1].end={...n[c][1].end}):n[r][1]=f,n.push(["exit",f,l]),n}function Gk(n,l,a){const r=this;let s;return c;function c(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)?(n.enter("setextHeadingLine"),s=m,f(m)):a(m)}function f(m){return n.enter("setextHeadingLineSequence"),h(m)}function h(m){return m===s?(n.consume(m),h):(n.exit("setextHeadingLineSequence"),Oe(m)?He(n,p,"lineSuffix")(m):p(m))}function p(m){return m===null||be(m)?(n.exit("setextHeadingLine"),l(m)):a(m)}}const Xk={tokenize:Kk};function Kk(n){const l=this,a=n.attempt(vr,r,n.attempt(this.parser.constructs.flowInitial,s,He(n,n.attempt(this.parser.constructs.flow,s,n.attempt(ek,s)),"linePrefix")));return a;function r(c){if(c===null){n.consume(c);return}return n.enter("lineEndingBlank"),n.consume(c),n.exit("lineEndingBlank"),l.currentConstruct=void 0,a}function s(c){if(c===null){n.consume(c);return}return n.enter("lineEnding"),n.consume(c),n.exit("lineEnding"),l.currentConstruct=void 0,a}}const Jk={resolveAll:ix()},$k=lx("string"),Pk=lx("text");function lx(n){return{resolveAll:ix(n==="text"?Wk:void 0),tokenize:l};function l(a){const r=this,s=this.parser.constructs[n],c=a.attempt(s,f,h);return f;function f(b){return m(b)?c(b):h(b)}function h(b){if(b===null){a.consume(b);return}return a.enter("data"),a.consume(b),p}function p(b){return m(b)?(a.exit("data"),c(b)):(a.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 ix(n){return l;function l(a,r){let s=-1,c;for(;++s<=a.length;)c===void 0?a[s]&&a[s][1].type==="data"&&(c=s,s++):(!a[s]||a[s][1].type!=="data")&&(s!==c+2&&(a[c][1].end=a[s-1][1].end,a.splice(c+2,s-c-2),s=c+2),c=void 0);return n?n(a,r):a}}function Wk(n,l){let a=0;for(;++a<=n.length;)if((a===n.length||n[a][1].type==="lineEnding")&&n[a-1][1].type==="data"){const r=n[a-1][1],s=l.sliceStream(r);let c=s.length,f=-1,h=0,p;for(;c--;){const m=s[c];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){c++;break}}if(l._contentTypeTextTrailing&&a===n.length&&(h=0),h){const m={type:a===n.length||p||h<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:c?f:r.start._bufferIndex+f,_index:r.start._index+c,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):(n.splice(a,0,["enter",m,l],["exit",m,l]),a+=2)}a++}return n}const eS={42:It,43:It,45:It,48:It,49:It,50:It,51:It,52:It,53:It,54:It,55:It,56:It,57:It,62:Jy},tS={91:ak},nS={[-2]:Qo,[-1]:Qo,32:Qo},lS={35:fk,42:Qu,45:[Fg,Qu],60:pk,61:Fg,95:Qu,96:Zg,126:Zg},iS={38:Py,92:$y},aS={[-5]:Go,[-4]:Go,[-3]:Go,33:Mk,38:Py,42:kf,60:[R2,Sk],91:Rk,92:[ck,$y],93:If,95:kf,96:X2},rS={null:[kf,Jk]},uS={null:[42,95]},sS={null:[]},cS=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:uS,contentInitial:tS,disable:sS,document:eS,flow:lS,flowInitial:nS,insideSpan:rS,string:iS,text:aS},Symbol.toStringTag,{value:"Module"}));function oS(n,l,a){let r={_bufferIndex:-1,_index:0,line:a&&a.line||1,column:a&&a.column||1,offset:a&&a.offset||0};const s={},c=[];let f=[],h=[];const p={attempt:P(ee),check:P(D),consume:Z,enter:H,exit:le,interrupt:P(D,{interrupt:!0})},m={code:null,containerState:{},defineSkip:O,events:[],now:E,parser:n,previous:null,sliceSerialize:k,sliceStream:v,write:y};let b=l.tokenize.call(m,p);return l.resolveAll&&c.push(l),m;function y(U){return f=xn(f,U),q(),f[f.length-1]!==null?[]:(ce(l,0),m.events=ms(c,m.events,m),m.events)}function k(U,J){return dS(v(U),J)}function v(U){return fS(f,U)}function E(){const{_bufferIndex:U,_index:J,line:pe,column:re,offset:W}=r;return{_bufferIndex:U,_index:J,line:pe,column:re,offset:W}}function O(U){s[U.line]=U.column,M()}function q(){let U;for(;r._index<f.length;){const J=f[r._index];if(typeof J=="string")for(U=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===U&&r._bufferIndex<J.length;)j(J.charCodeAt(r._bufferIndex));else j(J)}}function j(U){b=b(U)}function Z(U){be(U)?(r.line++,r.column=1,r.offset+=U===-3?2:1,M()):U!==-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=U}function H(U,J){const pe=J||{};return pe.type=U,pe.start=E(),m.events.push(["enter",pe,m]),h.push(pe),pe}function le(U){const J=h.pop();return J.end=E(),m.events.push(["exit",J,m]),J}function ee(U,J){ce(U,J.from)}function D(U,J){J.restore()}function P(U,J){return pe;function pe(re,W,T){let $,ue,de,_;return Array.isArray(re)?I(re):"tokenize"in re?I([re]):A(re);function A(ye){return Re;function Re(at){const Xe=at!==null&&ye[at],un=at!==null&&ye.null,Mn=[...Array.isArray(Xe)?Xe:Xe?[Xe]:[],...Array.isArray(un)?un:un?[un]:[]];return I(Mn)(at)}}function I(ye){return $=ye,ue=0,ye.length===0?T:w(ye[ue])}function w(ye){return Re;function Re(at){return _=fe(),de=ye,ye.partial||(m.currentConstruct=ye),ye.name&&m.parser.constructs.disable.null.includes(ye.name)?ke():ye.tokenize.call(J?Object.assign(Object.create(m),J):m,p,ae,ke)(at)}}function ae(ye){return U(de,_),W}function ke(ye){return _.restore(),++ue<$.length?w($[ue]):T}}}function ce(U,J){U.resolveAll&&!c.includes(U)&&c.push(U),U.resolve&&an(m.events,J,m.events.length-J,U.resolve(m.events.slice(J),m)),U.resolveTo&&(m.events=U.resolveTo(m.events,m))}function fe(){const U=E(),J=m.previous,pe=m.currentConstruct,re=m.events.length,W=Array.from(h);return{from:re,restore:T};function T(){r=U,m.previous=J,m.currentConstruct=pe,m.events.length=re,h=W,M()}}function M(){r.line in s&&r.column<2&&(r.column=s[r.line],r.offset+=s[r.line]-1)}}function fS(n,l){const a=l.start._index,r=l.start._bufferIndex,s=l.end._index,c=l.end._bufferIndex;let f;if(a===s)f=[n[a].slice(r,c)];else{if(f=n.slice(a,s),r>-1){const h=f[0];typeof h=="string"?f[0]=h.slice(r):f.shift()}c>0&&f.push(n[s].slice(0,c))}return f}function dS(n,l){let a=-1;const r=[];let s;for(;++a<n.length;){const c=n[a];let f;if(typeof c=="string")f=c;else switch(c){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(c)}s=c===-2,r.push(f)}return r.join("")}function hS(n){const r={constructs:Xy([cS,...(n||{}).extensions||[]]),content:s(N2),defined:[],document:s(j2),flow:s(Xk),lazy:{},string:s($k),text:s(Pk)};return r;function s(c){return f;function f(h){return oS(r,c,h)}}}function mS(n){for(;!Wy(n););return n}const Qg=/[\0\t\n\r]/g;function pS(){let n=1,l="",a=!0,r;return s;function s(c,f,h){const p=[];let m,b,y,k,v;for(c=l+(typeof c=="string"?c.toString():new TextDecoder(f||void 0).decode(c)),y=0,l="",a&&(c.charCodeAt(0)===65279&&y++,a=void 0);y<c.length;){if(Qg.lastIndex=y,m=Qg.exec(c),k=m&&m.index!==void 0?m.index:c.length,v=c.charCodeAt(k),!m){l=c.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(c.slice(y,k)),n+=k-y),v){case 0:{p.push(65533),n++;break}case 9:{for(b=Math.ceil(n/4)*4,p.push(-2);n++<b;)p.push(-1);break}case 10:{p.push(-4),n=1;break}default:r=!0,n=1}y=k+1}return h&&(r&&p.push(-5),l&&p.push(l),p.push(null)),p}}const gS=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function yS(n){return n.replace(gS,xS)}function xS(n,l,a){if(l)return l;if(a.charCodeAt(0)===35){const s=a.charCodeAt(1),c=s===120||s===88;return Ky(a.slice(c?2:1),c?16:10)}return Zf(a)||n}const ax={}.hasOwnProperty;function bS(n,l,a){return l&&typeof l=="object"&&(a=l,l=void 0),vS(a)(mS(hS(a).document().write(pS()(n,l,!0))))}function vS(n){const l={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:c(oi),autolinkProtocol:fe,autolinkEmail:fe,atxHeading:c(si),blockQuote:c(un),characterEscape:fe,characterReference:fe,codeFenced:c(Mn),codeFencedFenceInfo:f,codeFencedFenceMeta:f,codeIndented:c(Mn,f),codeText:c(ca,f),codeTextData:fe,data:fe,codeFlowValue:fe,definition:c(Sr),definitionDestinationString:f,definitionLabelString:f,definitionTitleString:f,emphasis:c(On),hardBreakEscape:c(ci),hardBreakTrailing:c(ci),htmlFlow:c(wr,f),htmlFlowData:fe,htmlText:c(wr,f),htmlTextData:fe,image:c(_r),label:f,link:c(oi),listItem:c(oa),listItemValue:k,listOrdered:c(fi,y),listUnordered:c(fi),paragraph:c(bs),reference:w,referenceString:f,resourceDestinationString:f,resourceTitleString:f,setextHeading:c(si),strong:c(vs),thematicBreak:c(ks)},exit:{atxHeading:p(),atxHeadingSequence:ee,autolink:p(),autolinkEmail:Xe,autolinkProtocol:at,blockQuote:p(),characterEscapeValue:M,characterReferenceMarkerHexadecimal:ke,characterReferenceMarkerNumeric:ke,characterReferenceValue:ye,characterReference:Re,codeFenced:p(q),codeFencedFence:O,codeFencedFenceInfo:v,codeFencedFenceMeta:E,codeFlowValue:M,codeIndented:p(j),codeText:p(W),codeTextData:M,data:M,definition:p(),definitionDestinationString:le,definitionLabelString:Z,definitionTitleString:H,emphasis:p(),hardBreakEscape:p(J),hardBreakTrailing:p(J),htmlFlow:p(pe),htmlFlowData:M,htmlText:p(re),htmlTextData:M,image:p($),label:de,labelText:ue,lineEnding:U,link:p(T),listItem:p(),listOrdered:p(),listUnordered:p(),paragraph:p(),referenceString:ae,resourceDestinationString:_,resourceTitleString:A,resource:I,setextHeading:p(ce),setextHeadingLineSequence:P,setextHeadingText:D,strong:p(),thematicBreak:p()}};rx(l,(n||{}).mdastExtensions||[]);const a={};return r;function r(G){let ie={type:"root",children:[]};const Se={stack:[ie],tokenStack:[],config:l,enter:h,exit:m,buffer:f,resume:b,data:a},ze=[];let Fe=-1;for(;++Fe<G.length;)if(G[Fe][1].type==="listOrdered"||G[Fe][1].type==="listUnordered")if(G[Fe][0]==="enter")ze.push(Fe);else{const Xt=ze.pop();Fe=s(G,Xt,Fe)}for(Fe=-1;++Fe<G.length;){const Xt=l[G[Fe][0]];ax.call(Xt,G[Fe][1].type)&&Xt[G[Fe][1].type].call(Object.assign({sliceSerialize:G[Fe][2].sliceSerialize},Se),G[Fe][1])}if(Se.tokenStack.length>0){const Xt=Se.tokenStack[Se.tokenStack.length-1];(Xt[1]||Gg).call(Se,void 0,Xt[0])}for(ie.position={start:Tl(G.length>0?G[0][1].start:{line:1,column:1,offset:0}),end:Tl(G.length>0?G[G.length-2][1].end:{line:1,column:1,offset:0})},Fe=-1;++Fe<l.transforms.length;)ie=l.transforms[Fe](ie)||ie;return ie}function s(G,ie,Se){let ze=ie-1,Fe=-1,Xt=!1,Rn,Mt,bt,Lt;for(;++ze<=Se;){const Pe=G[ze];switch(Pe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Pe[0]==="enter"?Fe++:Fe--,Lt=void 0;break}case"lineEndingBlank":{Pe[0]==="enter"&&(Rn&&!Lt&&!Fe&&!bt&&(bt=ze),Lt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Lt=void 0}if(!Fe&&Pe[0]==="enter"&&Pe[1].type==="listItemPrefix"||Fe===-1&&Pe[0]==="exit"&&(Pe[1].type==="listUnordered"||Pe[1].type==="listOrdered")){if(Rn){let ll=ze;for(Mt=void 0;ll--;){const vn=G[ll];if(vn[1].type==="lineEnding"||vn[1].type==="lineEndingBlank"){if(vn[0]==="exit")continue;Mt&&(G[Mt][1].type="lineEndingBlank",Xt=!0),vn[1].type="lineEnding",Mt=ll}else if(!(vn[1].type==="linePrefix"||vn[1].type==="blockQuotePrefix"||vn[1].type==="blockQuotePrefixWhitespace"||vn[1].type==="blockQuoteMarker"||vn[1].type==="listItemIndent"))break}bt&&(!Mt||bt<Mt)&&(Rn._spread=!0),Rn.end=Object.assign({},Mt?G[Mt][1].start:Pe[1].end),G.splice(Mt||ze,0,["exit",Rn,Pe[2]]),ze++,Se++}if(Pe[1].type==="listItemPrefix"){const ll={type:"listItem",_spread:!1,start:Object.assign({},Pe[1].start),end:void 0};Rn=ll,G.splice(ze,0,["enter",ll,Pe[2]]),ze++,Se++,bt=void 0,Lt=!0}}}return G[ie][1]._spread=Xt,Se}function c(G,ie){return Se;function Se(ze){h.call(this,G(ze),ze),ie&&ie.call(this,ze)}}function f(){this.stack.push({type:"fragment",children:[]})}function h(G,ie,Se){this.stack[this.stack.length-1].children.push(G),this.stack.push(G),this.tokenStack.push([ie,Se||void 0]),G.position={start:Tl(ie.start),end:void 0}}function p(G){return ie;function ie(Se){G&&G.call(this,Se),m.call(this,Se)}}function m(G,ie){const Se=this.stack.pop(),ze=this.tokenStack.pop();if(ze)ze[0].type!==G.type&&(ie?ie.call(this,G,ze[0]):(ze[1]||Gg).call(this,G,ze[0]));else throw new Error("Cannot close `"+G.type+"` ("+cr({start:G.start,end:G.end})+"): it’s not open");Se.position.end=Tl(G.end)}function b(){return Yf(this.stack.pop())}function y(){this.data.expectingFirstListItemValue=!0}function k(G){if(this.data.expectingFirstListItemValue){const ie=this.stack[this.stack.length-2];ie.start=Number.parseInt(this.sliceSerialize(G),10),this.data.expectingFirstListItemValue=void 0}}function v(){const G=this.resume(),ie=this.stack[this.stack.length-1];ie.lang=G}function E(){const G=this.resume(),ie=this.stack[this.stack.length-1];ie.meta=G}function O(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function q(){const G=this.resume(),ie=this.stack[this.stack.length-1];ie.value=G.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function j(){const G=this.resume(),ie=this.stack[this.stack.length-1];ie.value=G.replace(/(\r?\n|\r)$/g,"")}function Z(G){const ie=this.resume(),Se=this.stack[this.stack.length-1];Se.label=ie,Se.identifier=_n(this.sliceSerialize(G)).toLowerCase()}function H(){const G=this.resume(),ie=this.stack[this.stack.length-1];ie.title=G}function le(){const G=this.resume(),ie=this.stack[this.stack.length-1];ie.url=G}function ee(G){const ie=this.stack[this.stack.length-1];if(!ie.depth){const Se=this.sliceSerialize(G).length;ie.depth=Se}}function D(){this.data.setextHeadingSlurpLineEnding=!0}function P(G){const ie=this.stack[this.stack.length-1];ie.depth=this.sliceSerialize(G).codePointAt(0)===61?1:2}function ce(){this.data.setextHeadingSlurpLineEnding=void 0}function fe(G){const Se=this.stack[this.stack.length-1].children;let ze=Se[Se.length-1];(!ze||ze.type!=="text")&&(ze=Dt(),ze.position={start:Tl(G.start),end:void 0},Se.push(ze)),this.stack.push(ze)}function M(G){const ie=this.stack.pop();ie.value+=this.sliceSerialize(G),ie.position.end=Tl(G.end)}function U(G){const ie=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Se=ie.children[ie.children.length-1];Se.position.end=Tl(G.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&l.canContainEols.includes(ie.type)&&(fe.call(this,G),M.call(this,G))}function J(){this.data.atHardBreak=!0}function pe(){const G=this.resume(),ie=this.stack[this.stack.length-1];ie.value=G}function re(){const G=this.resume(),ie=this.stack[this.stack.length-1];ie.value=G}function W(){const G=this.resume(),ie=this.stack[this.stack.length-1];ie.value=G}function T(){const G=this.stack[this.stack.length-1];if(this.data.inReference){const ie=this.data.referenceType||"shortcut";G.type+="Reference",G.referenceType=ie,delete G.url,delete G.title}else delete G.identifier,delete G.label;this.data.referenceType=void 0}function $(){const G=this.stack[this.stack.length-1];if(this.data.inReference){const ie=this.data.referenceType||"shortcut";G.type+="Reference",G.referenceType=ie,delete G.url,delete G.title}else delete G.identifier,delete G.label;this.data.referenceType=void 0}function ue(G){const ie=this.sliceSerialize(G),Se=this.stack[this.stack.length-2];Se.label=yS(ie),Se.identifier=_n(ie).toLowerCase()}function de(){const G=this.stack[this.stack.length-1],ie=this.resume(),Se=this.stack[this.stack.length-1];if(this.data.inReference=!0,Se.type==="link"){const ze=G.children;Se.children=ze}else Se.alt=ie}function _(){const G=this.resume(),ie=this.stack[this.stack.length-1];ie.url=G}function A(){const G=this.resume(),ie=this.stack[this.stack.length-1];ie.title=G}function I(){this.data.inReference=void 0}function w(){this.data.referenceType="collapsed"}function ae(G){const ie=this.resume(),Se=this.stack[this.stack.length-1];Se.label=ie,Se.identifier=_n(this.sliceSerialize(G)).toLowerCase(),this.data.referenceType="full"}function ke(G){this.data.characterReferenceType=G.type}function ye(G){const ie=this.sliceSerialize(G),Se=this.data.characterReferenceType;let ze;Se?(ze=Ky(ie,Se==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ze=Zf(ie);const Fe=this.stack[this.stack.length-1];Fe.value+=ze}function Re(G){const ie=this.stack.pop();ie.position.end=Tl(G.end)}function at(G){M.call(this,G);const ie=this.stack[this.stack.length-1];ie.url=this.sliceSerialize(G)}function Xe(G){M.call(this,G);const ie=this.stack[this.stack.length-1];ie.url="mailto:"+this.sliceSerialize(G)}function un(){return{type:"blockquote",children:[]}}function Mn(){return{type:"code",lang:null,meta:null,value:""}}function ca(){return{type:"inlineCode",value:""}}function Sr(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function On(){return{type:"emphasis",children:[]}}function si(){return{type:"heading",depth:0,children:[]}}function ci(){return{type:"break"}}function wr(){return{type:"html",value:""}}function _r(){return{type:"image",title:null,url:"",alt:null}}function oi(){return{type:"link",title:null,url:"",children:[]}}function fi(G){return{type:"list",ordered:G.type==="listOrdered",start:null,spread:G._spread,children:[]}}function oa(G){return{type:"listItem",spread:G._spread,checked:null,children:[]}}function bs(){return{type:"paragraph",children:[]}}function vs(){return{type:"strong",children:[]}}function Dt(){return{type:"text",value:""}}function ks(){return{type:"thematicBreak"}}}function Tl(n){return{line:n.line,column:n.column,offset:n.offset}}function rx(n,l){let a=-1;for(;++a<l.length;){const r=l[a];Array.isArray(r)?rx(n,r):kS(n,r)}}function kS(n,l){let a;for(a in l)if(ax.call(l,a))switch(a){case"canContainEols":{const r=l[a];r&&n[a].push(...r);break}case"transforms":{const r=l[a];r&&n[a].push(...r);break}case"enter":case"exit":{const r=l[a];r&&Object.assign(n[a],r);break}}}function Gg(n,l){throw n?new Error("Cannot close `"+n.type+"` ("+cr({start:n.start,end:n.end})+"): a different token (`"+l.type+"`, "+cr({start:l.start,end:l.end})+") is open"):new Error("Cannot close document, a token (`"+l.type+"`, "+cr({start:l.start,end:l.end})+") is still open")}function SS(n){const l=this;l.parser=a;function a(r){return bS(r,{...l.data("settings"),...n,extensions:l.data("micromarkExtensions")||[],mdastExtensions:l.data("fromMarkdownExtensions")||[]})}}function wS(n,l){const a={type:"element",tagName:"blockquote",properties:{},children:n.wrap(n.all(l),!0)};return n.patch(l,a),n.applyData(l,a)}function _S(n,l){const a={type:"element",tagName:"br",properties:{},children:[]};return n.patch(l,a),[n.applyData(l,a),{type:"text",value:`
|
|
53
|
-
`}]}function ES(n,l){const a=l.value?l.value+`
|
|
54
|
-
`:"",r={},s=l.lang?l.lang.split(/\s+/):[];s.length>0&&(r.className=["language-"+s[0]]);let c={type:"element",tagName:"code",properties:r,children:[{type:"text",value:a}]};return l.meta&&(c.data={meta:l.meta}),n.patch(l,c),c=n.applyData(l,c),c={type:"element",tagName:"pre",properties:{},children:[c]},n.patch(l,c),c}function CS(n,l){const a={type:"element",tagName:"del",properties:{},children:n.all(l)};return n.patch(l,a),n.applyData(l,a)}function AS(n,l){const a={type:"element",tagName:"em",properties:{},children:n.all(l)};return n.patch(l,a),n.applyData(l,a)}function NS(n,l){const a=typeof n.options.clobberPrefix=="string"?n.options.clobberPrefix:"user-content-",r=String(l.identifier).toUpperCase(),s=sa(r.toLowerCase()),c=n.footnoteOrder.indexOf(r);let f,h=n.footnoteCounts.get(r);h===void 0?(h=0,n.footnoteOrder.push(r),f=n.footnoteOrder.length):f=c+1,h+=1,n.footnoteCounts.set(r,h);const p={type:"element",tagName:"a",properties:{href:"#"+a+"fn-"+s,id:a+"fnref-"+s+(h>1?"-"+h:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(f)}]};n.patch(l,p);const m={type:"element",tagName:"sup",properties:{},children:[p]};return n.patch(l,m),n.applyData(l,m)}function TS(n,l){const a={type:"element",tagName:"h"+l.depth,properties:{},children:n.all(l)};return n.patch(l,a),n.applyData(l,a)}function jS(n,l){if(n.options.allowDangerousHtml){const a={type:"raw",value:l.value};return n.patch(l,a),n.applyData(l,a)}}function ux(n,l){const a=l.referenceType;let r="]";if(a==="collapsed"?r+="[]":a==="full"&&(r+="["+(l.label||l.identifier)+"]"),l.type==="imageReference")return[{type:"text",value:"!["+l.alt+r}];const s=n.all(l),c=s[0];c&&c.type==="text"?c.value="["+c.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 zS(n,l){const a=String(l.identifier).toUpperCase(),r=n.definitionById.get(a);if(!r)return ux(n,l);const s={src:sa(r.url||""),alt:l.alt};r.title!==null&&r.title!==void 0&&(s.title=r.title);const c={type:"element",tagName:"img",properties:s,children:[]};return n.patch(l,c),n.applyData(l,c)}function DS(n,l){const a={src:sa(l.url)};l.alt!==null&&l.alt!==void 0&&(a.alt=l.alt),l.title!==null&&l.title!==void 0&&(a.title=l.title);const r={type:"element",tagName:"img",properties:a,children:[]};return n.patch(l,r),n.applyData(l,r)}function MS(n,l){const a={type:"text",value:l.value.replace(/\r?\n|\r/g," ")};n.patch(l,a);const r={type:"element",tagName:"code",properties:{},children:[a]};return n.patch(l,r),n.applyData(l,r)}function OS(n,l){const a=String(l.identifier).toUpperCase(),r=n.definitionById.get(a);if(!r)return ux(n,l);const s={href:sa(r.url||"")};r.title!==null&&r.title!==void 0&&(s.title=r.title);const c={type:"element",tagName:"a",properties:s,children:n.all(l)};return n.patch(l,c),n.applyData(l,c)}function RS(n,l){const a={href:sa(l.url)};l.title!==null&&l.title!==void 0&&(a.title=l.title);const r={type:"element",tagName:"a",properties:a,children:n.all(l)};return n.patch(l,r),n.applyData(l,r)}function LS(n,l,a){const r=n.all(l),s=a?BS(a):sx(l),c={},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:[]}),c.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:c,children:f};return n.patch(l,m),n.applyData(l,m)}function BS(n){let l=!1;if(n.type==="list"){l=n.spread||!1;const a=n.children;let r=-1;for(;!l&&++r<a.length;)l=sx(a[r])}return l}function sx(n){const l=n.spread;return l??n.children.length>1}function US(n,l){const a={},r=n.all(l);let s=-1;for(typeof l.start=="number"&&l.start!==1&&(a.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")){a.className=["contains-task-list"];break}}const c={type:"element",tagName:l.ordered?"ol":"ul",properties:a,children:n.wrap(r,!0)};return n.patch(l,c),n.applyData(l,c)}function HS(n,l){const a={type:"element",tagName:"p",properties:{},children:n.all(l)};return n.patch(l,a),n.applyData(l,a)}function qS(n,l){const a={type:"root",children:n.wrap(n.all(l))};return n.patch(l,a),n.applyData(l,a)}function VS(n,l){const a={type:"element",tagName:"strong",properties:{},children:n.all(l)};return n.patch(l,a),n.applyData(l,a)}function YS(n,l){const a=n.all(l),r=a.shift(),s=[];if(r){const f={type:"element",tagName:"thead",properties:{},children:n.wrap([r],!0)};n.patch(l.children[0],f),s.push(f)}if(a.length>0){const f={type:"element",tagName:"tbody",properties:{},children:n.wrap(a,!0)},h=Uf(l.children[1]),p=Vy(l.children[l.children.length-1]);h&&p&&(f.position={start:h,end:p}),s.push(f)}const c={type:"element",tagName:"table",properties:{},children:n.wrap(s,!0)};return n.patch(l,c),n.applyData(l,c)}function ZS(n,l,a){const r=a?a.children:void 0,c=(r?r.indexOf(l):1)===0?"th":"td",f=a&&a.type==="table"?a.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 E={type:"element",tagName:c,properties:k,children:[]};y&&(E.children=n.all(y),n.patch(y,E),E=n.applyData(y,E)),m.push(E)}const b={type:"element",tagName:"tr",properties:{},children:n.wrap(m,!0)};return n.patch(l,b),n.applyData(l,b)}function IS(n,l){const a={type:"element",tagName:"td",properties:{},children:n.all(l)};return n.patch(l,a),n.applyData(l,a)}const Xg=9,Kg=32;function FS(n){const l=String(n),a=/\r?\n|\r/g;let r=a.exec(l),s=0;const c=[];for(;r;)c.push(Jg(l.slice(s,r.index),s>0,!0),r[0]),s=r.index+r[0].length,r=a.exec(l);return c.push(Jg(l.slice(s),s>0,!1)),c.join("")}function Jg(n,l,a){let r=0,s=n.length;if(l){let c=n.codePointAt(r);for(;c===Xg||c===Kg;)r++,c=n.codePointAt(r)}if(a){let c=n.codePointAt(s-1);for(;c===Xg||c===Kg;)s--,c=n.codePointAt(s-1)}return s>r?n.slice(r,s):""}function QS(n,l){const a={type:"text",value:FS(String(l.value))};return n.patch(l,a),n.applyData(l,a)}function GS(n,l){const a={type:"element",tagName:"hr",properties:{},children:[]};return n.patch(l,a),n.applyData(l,a)}const XS={blockquote:wS,break:_S,code:ES,delete:CS,emphasis:AS,footnoteReference:NS,heading:TS,html:jS,imageReference:zS,image:DS,inlineCode:MS,linkReference:OS,link:RS,listItem:LS,list:US,paragraph:HS,root:qS,strong:VS,table:YS,tableCell:IS,tableRow:ZS,text:QS,thematicBreak:GS,toml:Vu,yaml:Vu,definition:Vu,footnoteDefinition:Vu};function Vu(){}const cx=-1,ps=0,fr=1,is=2,Ff=3,Qf=4,Gf=5,Xf=6,ox=7,fx=8,KS=typeof self=="object"?self:globalThis,$g=(n,l)=>{switch(n){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+n)}return new KS[n](l)},JS=(n,l)=>{const a=(s,c)=>(n.set(c,s),s),r=s=>{if(n.has(s))return n.get(s);const[c,f]=l[s];switch(c){case ps:case cx:return a(f,s);case fr:{const h=a([],s);for(const p of f)h.push(r(p));return h}case is:{const h=a({},s);for(const[p,m]of f)h[r(p)]=r(m);return h}case Ff:return a(new Date(f),s);case Qf:{const{source:h,flags:p}=f;return a(new RegExp(h,p),s)}case Gf:{const h=a(new Map,s);for(const[p,m]of f)h.set(r(p),r(m));return h}case Xf:{const h=a(new Set,s);for(const p of f)h.add(r(p));return h}case ox:{const{name:h,message:p}=f;return a($g(h,p),s)}case fx:return a(BigInt(f),s);case"BigInt":return a(Object(BigInt(f)),s);case"ArrayBuffer":return a(new Uint8Array(f).buffer,f);case"DataView":{const{buffer:h}=new Uint8Array(f);return a(new DataView(h),f)}}return a($g(c,f),s)};return r},Pg=n=>JS(new Map,n)(0),ni="",{toString:$S}={},{keys:PS}=Object,ur=n=>{const l=typeof n;if(l!=="object"||!n)return[ps,l];const a=$S.call(n).slice(8,-1);switch(a){case"Array":return[fr,ni];case"Object":return[is,ni];case"Date":return[Ff,ni];case"RegExp":return[Qf,ni];case"Map":return[Gf,ni];case"Set":return[Xf,ni];case"DataView":return[fr,a]}return a.includes("Array")?[fr,a]:a.includes("Error")?[ox,a]:[is,a]},Yu=([n,l])=>n===ps&&(l==="function"||l==="symbol"),WS=(n,l,a,r)=>{const s=(f,h)=>{const p=r.push(f)-1;return a.set(h,p),p},c=f=>{if(a.has(f))return a.get(f);let[h,p]=ur(f);switch(h){case ps:{let b=f;switch(p){case"bigint":h=fx,b=f.toString();break;case"function":case"symbol":if(n)throw new TypeError("unable to serialize "+p);b=null;break;case"undefined":return s([cx],f)}return s([h,b],f)}case fr:{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(c(k));return y}case is:{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 c(f.toJSON());const b=[],y=s([h,b],f);for(const k of PS(f))(n||!Yu(ur(f[k])))&&b.push([c(k),c(f[k])]);return y}case Ff:return s([h,isNaN(f.getTime())?ni:f.toISOString()],f);case Qf:{const{source:b,flags:y}=f;return s([h,{source:b,flags:y}],f)}case Gf:{const b=[],y=s([h,b],f);for(const[k,v]of f)(n||!(Yu(ur(k))||Yu(ur(v))))&&b.push([c(k),c(v)]);return y}case Xf:{const b=[],y=s([h,b],f);for(const k of f)(n||!Yu(ur(k)))&&b.push(c(k));return y}}const{message:m}=f;return s([h,{name:p,message:m}],f)};return c},Wg=(n,{json:l,lossy:a}={})=>{const r=[];return WS(!(l||a),!!l,new Map,r)(n),r},as=typeof structuredClone=="function"?(n,l)=>l&&("json"in l||"lossy"in l)?Pg(Wg(n,l)):structuredClone(n):(n,l)=>Pg(Wg(n,l));function ew(n,l){const a=[{type:"text",value:"↩"}];return l>1&&a.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(l)}]}),a}function tw(n,l){return"Back to reference "+(n+1)+(l>1?"-"+l:"")}function nw(n){const l=typeof n.options.clobberPrefix=="string"?n.options.clobberPrefix:"user-content-",a=n.options.footnoteBackContent||ew,r=n.options.footnoteBackLabel||tw,s=n.options.footnoteLabel||"Footnotes",c=n.options.footnoteLabelTagName||"h2",f=n.options.footnoteLabelProperties||{className:["sr-only"]},h=[];let p=-1;for(;++p<n.footnoteOrder.length;){const m=n.footnoteById.get(n.footnoteOrder[p]);if(!m)continue;const b=n.all(m),y=String(m.identifier).toUpperCase(),k=sa(y.toLowerCase());let v=0;const E=[],O=n.footnoteCounts.get(y);for(;O!==void 0&&++v<=O;){E.length>0&&E.push({type:"text",value:" "});let Z=typeof a=="string"?a:a(p,v);typeof Z=="string"&&(Z={type:"text",value:Z}),E.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 q=b[b.length-1];if(q&&q.type==="element"&&q.tagName==="p"){const Z=q.children[q.children.length-1];Z&&Z.type==="text"?Z.value+=" ":q.children.push({type:"text",value:" "}),q.children.push(...E)}else b.push(...E);const j={type:"element",tagName:"li",properties:{id:l+"fn-"+k},children:n.wrap(b,!0)};n.patch(m,j),h.push(j)}if(h.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:c,properties:{...as(f),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
|
|
57
|
-
`},{type:"element",tagName:"ol",properties:{},children:n.wrap(h,!0)},{type:"text",value:`
|
|
58
|
-
`}]}}const gs=(function(n){if(n==null)return rw;if(typeof n=="function")return ys(n);if(typeof n=="object")return Array.isArray(n)?lw(n):iw(n);if(typeof n=="string")return aw(n);throw new Error("Expected function, string, or object as test")});function lw(n){const l=[];let a=-1;for(;++a<n.length;)l[a]=gs(n[a]);return ys(r);function r(...s){let c=-1;for(;++c<l.length;)if(l[c].apply(this,s))return!0;return!1}}function iw(n){const l=n;return ys(a);function a(r){const s=r;let c;for(c in n)if(s[c]!==l[c])return!1;return!0}}function aw(n){return ys(l);function l(a){return a&&a.type===n}}function ys(n){return l;function l(a,r,s){return!!(uw(a)&&n.call(this,a,typeof r=="number"?r:void 0,s||void 0))}}function rw(){return!0}function uw(n){return n!==null&&typeof n=="object"&&"type"in n}const dx=[],sw=!0,Sf=!1,cw="skip";function hx(n,l,a,r){let s;typeof l=="function"&&typeof a!="function"?(r=a,a=l):s=l;const c=gs(s),f=r?-1:1;h(n,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=dx,E,O,q;if((!l||c(p,m,b[b.length-1]||void 0))&&(v=ow(a(p,b)),v[0]===Sf))return v;if("children"in p&&p.children){const j=p;if(j.children&&v[0]!==cw)for(O=(r?j.children.length:-1)+f,q=b.concat(j);O>-1&&O<j.children.length;){const Z=j.children[O];if(E=h(Z,O,q)(),E[0]===Sf)return E;O=typeof E[1]=="number"?E[1]:O+f}}return v}}}function ow(n){return Array.isArray(n)?n:typeof n=="number"?[sw,n]:n==null?dx:[n]}function Kf(n,l,a,r){let s,c,f;typeof l=="function"&&typeof a!="function"?(c=void 0,f=l,s=a):(c=l,f=a,s=r),hx(n,c,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 wf={}.hasOwnProperty,fw={};function dw(n,l){const a=l||fw,r=new Map,s=new Map,c=new Map,f={...XS,...a.handlers},h={all:m,applyData:mw,definitionById:r,footnoteById:s,footnoteCounts:c,footnoteOrder:[],handlers:f,one:p,options:a,patch:hw,wrap:gw};return Kf(n,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(wf.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:O,...q}=b,j=as(q);return j.children=h.all(b),j}return as(b)}return(h.options.unknownHandler||pw)(h,b,y)}function m(b){const y=[];if("children"in b){const k=b.children;let v=-1;for(;++v<k.length;){const E=h.one(k[v],b);if(E){if(v&&k[v-1].type==="break"&&(!Array.isArray(E)&&E.type==="text"&&(E.value=ey(E.value)),!Array.isArray(E)&&E.type==="element")){const O=E.children[0];O&&O.type==="text"&&(O.value=ey(O.value))}Array.isArray(E)?y.push(...E):y.push(E)}}}return y}}function hw(n,l){n.position&&(l.position=e2(n))}function mw(n,l){let a=l;if(n&&n.data){const r=n.data.hName,s=n.data.hChildren,c=n.data.hProperties;if(typeof r=="string")if(a.type==="element")a.tagName=r;else{const f="children"in a?a.children:[a];a={type:"element",tagName:r,properties:{},children:f}}a.type==="element"&&c&&Object.assign(a.properties,as(c)),"children"in a&&a.children&&s!==null&&s!==void 0&&(a.children=s)}return a}function pw(n,l){const a=l.data||{},r="value"in l&&!(wf.call(a,"hProperties")||wf.call(a,"hChildren"))?{type:"text",value:l.value}:{type:"element",tagName:"div",properties:{},children:n.all(l)};return n.patch(l,r),n.applyData(l,r)}function gw(n,l){const a=[];let r=-1;for(l&&a.push({type:"text",value:`
|
|
59
|
-
`});++r<n.length;)r&&a.push({type:"text",value:`
|
|
60
|
-
`}),a.push(n[r]);return l&&n.length>0&&a.push({type:"text",value:`
|
|
61
|
-
`}),a}function ey(n){let l=0,a=n.charCodeAt(l);for(;a===9||a===32;)l++,a=n.charCodeAt(l);return n.slice(l)}function ty(n,l){const a=dw(n,l),r=a.one(n,void 0),s=nw(a),c=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return s&&c.children.push({type:"text",value:`
|
|
62
|
-
`},s),c}function yw(n,l){return n&&"run"in n?async function(a,r){const s=ty(a,{file:r,...l});await n.run(s,r)}:function(a,r){return ty(a,{file:r,...n||l})}}function ny(n){if(n)throw n}var Xo,ly;function xw(){if(ly)return Xo;ly=1;var n=Object.prototype.hasOwnProperty,l=Object.prototype.toString,a=Object.defineProperty,r=Object.getOwnPropertyDescriptor,s=function(m){return typeof Array.isArray=="function"?Array.isArray(m):l.call(m)==="[object Array]"},c=function(m){if(!m||l.call(m)!=="[object Object]")return!1;var b=n.call(m,"constructor"),y=m.constructor&&m.constructor.prototype&&n.call(m.constructor.prototype,"isPrototypeOf");if(m.constructor&&!b&&!y)return!1;var k;for(k in m);return typeof k>"u"||n.call(m,k)},f=function(m,b){a&&b.name==="__proto__"?a(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(n.call(m,b)){if(r)return r(m,b).value}else return;return m[b]};return Xo=function p(){var m,b,y,k,v,E,O=arguments[0],q=1,j=arguments.length,Z=!1;for(typeof O=="boolean"&&(Z=O,O=arguments[1]||{},q=2),(O==null||typeof O!="object"&&typeof O!="function")&&(O={});q<j;++q)if(m=arguments[q],m!=null)for(b in m)y=h(O,b),k=h(m,b),O!==k&&(Z&&k&&(c(k)||(v=s(k)))?(v?(v=!1,E=y&&s(y)?y:[]):E=y&&c(y)?y:{},f(O,{name:b,newValue:p(Z,E,k)})):typeof k<"u"&&f(O,{name:b,newValue:k}));return O},Xo}var bw=xw();const Ko=ky(bw);function _f(n){if(typeof n!="object"||n===null)return!1;const l=Object.getPrototypeOf(n);return(l===null||l===Object.prototype||Object.getPrototypeOf(l)===null)&&!(Symbol.toStringTag in n)&&!(Symbol.iterator in n)}function vw(){const n=[],l={run:a,use:r};return l;function a(...s){let c=-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=n[++c];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?kw(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 n.push(s),l}}function kw(n,l){let a;return r;function r(...f){const h=n.length>f.length;let p;h&&f.push(s);try{p=n.apply(this,f)}catch(m){const b=m;if(h&&a)throw b;return s(b)}h||(p&&p.then&&typeof p.then=="function"?p.then(c,s):p instanceof Error?s(p):c(p))}function s(f,...h){a||(a=!0,l(f,...h))}function c(f){s(null,f)}}const Tn={basename:Sw,dirname:ww,extname:_w,join:Ew,sep:"/"};function Sw(n,l){if(l!==void 0&&typeof l!="string")throw new TypeError('"ext" argument must be a string');kr(n);let a=0,r=-1,s=n.length,c;if(l===void 0||l.length===0||l.length>n.length){for(;s--;)if(n.codePointAt(s)===47){if(c){a=s+1;break}}else r<0&&(c=!0,r=s+1);return r<0?"":n.slice(a,r)}if(l===n)return"";let f=-1,h=l.length-1;for(;s--;)if(n.codePointAt(s)===47){if(c){a=s+1;break}}else f<0&&(c=!0,f=s+1),h>-1&&(n.codePointAt(s)===l.codePointAt(h--)?h<0&&(r=s):(h=-1,r=f));return a===r?r=f:r<0&&(r=n.length),n.slice(a,r)}function ww(n){if(kr(n),n.length===0)return".";let l=-1,a=n.length,r;for(;--a;)if(n.codePointAt(a)===47){if(r){l=a;break}}else r||(r=!0);return l<0?n.codePointAt(0)===47?"/":".":l===1&&n.codePointAt(0)===47?"//":n.slice(0,l)}function _w(n){kr(n);let l=n.length,a=-1,r=0,s=-1,c=0,f;for(;l--;){const h=n.codePointAt(l);if(h===47){if(f){r=l+1;break}continue}a<0&&(f=!0,a=l+1),h===46?s<0?s=l:c!==1&&(c=1):s>-1&&(c=-1)}return s<0||a<0||c===0||c===1&&s===a-1&&s===r+1?"":n.slice(s,a)}function Ew(...n){let l=-1,a;for(;++l<n.length;)kr(n[l]),n[l]&&(a=a===void 0?n[l]:a+"/"+n[l]);return a===void 0?".":Cw(a)}function Cw(n){kr(n);const l=n.codePointAt(0)===47;let a=Aw(n,!l);return a.length===0&&!l&&(a="."),a.length>0&&n.codePointAt(n.length-1)===47&&(a+="/"),l?"/"+a:a}function Aw(n,l){let a="",r=0,s=-1,c=0,f=-1,h,p;for(;++f<=n.length;){if(f<n.length)h=n.codePointAt(f);else{if(h===47)break;h=47}if(h===47){if(!(s===f-1||c===1))if(s!==f-1&&c===2){if(a.length<2||r!==2||a.codePointAt(a.length-1)!==46||a.codePointAt(a.length-2)!==46){if(a.length>2){if(p=a.lastIndexOf("/"),p!==a.length-1){p<0?(a="",r=0):(a=a.slice(0,p),r=a.length-1-a.lastIndexOf("/")),s=f,c=0;continue}}else if(a.length>0){a="",r=0,s=f,c=0;continue}}l&&(a=a.length>0?a+"/..":"..",r=2)}else a.length>0?a+="/"+n.slice(s+1,f):a=n.slice(s+1,f),r=f-s-1;s=f,c=0}else h===46&&c>-1?c++:c=-1}return a}function kr(n){if(typeof n!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(n))}const Nw={cwd:Tw};function Tw(){return"/"}function Ef(n){return!!(n!==null&&typeof n=="object"&&"href"in n&&n.href&&"protocol"in n&&n.protocol&&n.auth===void 0)}function jw(n){if(typeof n=="string")n=new URL(n);else if(!Ef(n)){const l=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+n+"`");throw l.code="ERR_INVALID_ARG_TYPE",l}if(n.protocol!=="file:"){const l=new TypeError("The URL must be of scheme file");throw l.code="ERR_INVALID_URL_SCHEME",l}return zw(n)}function zw(n){if(n.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=n.pathname;let a=-1;for(;++a<l.length;)if(l.codePointAt(a)===37&&l.codePointAt(a+1)===50){const r=l.codePointAt(a+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 Jo=["history","path","basename","stem","extname","dirname"];class mx{constructor(l){let a;l?Ef(l)?a={path:l}:typeof l=="string"||Dw(l)?a={value:l}:a=l:a={},this.cwd="cwd"in a?"":Nw.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Jo.length;){const c=Jo[r];c in a&&a[c]!==void 0&&a[c]!==null&&(this[c]=c==="history"?[...a[c]]:a[c])}let s;for(s in a)Jo.includes(s)||(this[s]=a[s])}get basename(){return typeof this.path=="string"?Tn.basename(this.path):void 0}set basename(l){Po(l,"basename"),$o(l,"basename"),this.path=Tn.join(this.dirname||"",l)}get dirname(){return typeof this.path=="string"?Tn.dirname(this.path):void 0}set dirname(l){iy(this.basename,"dirname"),this.path=Tn.join(l||"",this.basename)}get extname(){return typeof this.path=="string"?Tn.extname(this.path):void 0}set extname(l){if($o(l,"extname"),iy(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=Tn.join(this.dirname,this.stem+(l||""))}get path(){return this.history[this.history.length-1]}set path(l){Ef(l)&&(l=jw(l)),Po(l,"path"),this.path!==l&&this.history.push(l)}get stem(){return typeof this.path=="string"?Tn.basename(this.path,this.extname):void 0}set stem(l){Po(l,"stem"),$o(l,"stem"),this.path=Tn.join(this.dirname||"",l+(this.extname||""))}fail(l,a,r){const s=this.message(l,a,r);throw s.fatal=!0,s}info(l,a,r){const s=this.message(l,a,r);return s.fatal=void 0,s}message(l,a,r){const s=new zt(l,a,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 $o(n,l){if(n&&n.includes(Tn.sep))throw new Error("`"+l+"` cannot be a path: did not expect `"+Tn.sep+"`")}function Po(n,l){if(!n)throw new Error("`"+l+"` cannot be empty")}function iy(n,l){if(!n)throw new Error("Setting `"+l+"` requires `path` to be set too")}function Dw(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const Mw=(function(n){const r=this.constructor.prototype,s=r[n],c=function(){return s.apply(c,arguments)};return Object.setPrototypeOf(c,r),c}),Ow={}.hasOwnProperty;class Jf extends Mw{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=vw()}copy(){const l=new Jf;let a=-1;for(;++a<this.attachers.length;){const r=this.attachers[a];l.use(...r)}return l.data(Ko(!0,{},this.namespace)),l}data(l,a){return typeof l=="string"?arguments.length===2?(tf("data",this.frozen),this.namespace[l]=a,this):Ow.call(this.namespace,l)&&this.namespace[l]||void 0:l?(tf("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[a,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const s=a.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 a=Zu(l),r=this.parser||this.Parser;return Wo("parse",r),r(String(a),a)}process(l,a){const r=this;return this.freeze(),Wo("process",this.parser||this.Parser),ef("process",this.compiler||this.Compiler),a?s(void 0,a):new Promise(s);function s(c,f){const h=Zu(l),p=r.parse(h);r.run(p,h,function(b,y,k){if(b||!y||!k)return m(b);const v=y,E=r.stringify(v,k);Bw(E)?k.value=E:k.result=E,m(b,k)});function m(b,y){b||!y?f(b):c?c(y):a(void 0,y)}}}processSync(l){let a=!1,r;return this.freeze(),Wo("processSync",this.parser||this.Parser),ef("processSync",this.compiler||this.Compiler),this.process(l,s),ry("processSync","process",a),r;function s(c,f){a=!0,ny(c),r=f}}run(l,a,r){ay(l),this.freeze();const s=this.transformers;return!r&&typeof a=="function"&&(r=a,a=void 0),r?c(void 0,r):new Promise(c);function c(f,h){const p=Zu(a);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,a){let r=!1,s;return this.run(l,a,c),ry("runSync","run",r),s;function c(f,h){ny(f),s=h,r=!0}}stringify(l,a){this.freeze();const r=Zu(a),s=this.compiler||this.Compiler;return ef("stringify",s),ay(l),s(l,r)}use(l,...a){const r=this.attachers,s=this.namespace;if(tf("use",this.frozen),l!=null)if(typeof l=="function")p(l,a);else if(typeof l=="object")Array.isArray(l)?h(l):f(l);else throw new TypeError("Expected usable value, not `"+l+"`");return this;function c(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=Ko(!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];c(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,...E]=b;const O=r[k][1];_f(O)&&_f(v)&&(v=Ko(!0,O,v)),r[k]=[m,v,...E]}}}}const Rw=new Jf().freeze();function Wo(n,l){if(typeof l!="function")throw new TypeError("Cannot `"+n+"` without `parser`")}function ef(n,l){if(typeof l!="function")throw new TypeError("Cannot `"+n+"` without `compiler`")}function tf(n,l){if(l)throw new Error("Cannot call `"+n+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function ay(n){if(!_f(n)||typeof n.type!="string")throw new TypeError("Expected node, got `"+n+"`")}function ry(n,l,a){if(!a)throw new Error("`"+n+"` finished async. Use `"+l+"` instead")}function Zu(n){return Lw(n)?n:new mx(n)}function Lw(n){return!!(n&&typeof n=="object"&&"message"in n&&"messages"in n)}function Bw(n){return typeof n=="string"||Uw(n)}function Uw(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const Hw="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",uy=[],sy={allowDangerousHtml:!0},qw=/^(https?|ircs?|mailto|xmpp)$/i,Vw=[{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 Yw(n){const l=Zw(n),a=Iw(n);return Fw(l.runSync(l.parse(a),a),n)}function Zw(n){const l=n.rehypePlugins||uy,a=n.remarkPlugins||uy,r=n.remarkRehypeOptions?{...n.remarkRehypeOptions,...sy}:sy;return Rw().use(SS).use(a).use(yw,r).use(l)}function Iw(n){const l=n.children||"",a=new mx;return typeof l=="string"&&(a.value=l),a}function Fw(n,l){const a=l.allowedElements,r=l.allowElement,s=l.components,c=l.disallowedElements,f=l.skipHtml,h=l.unwrapDisallowed,p=l.urlTransform||Qw;for(const b of Vw)Object.hasOwn(l,b.from)&&(""+b.from+(b.to?"use `"+b.to+"` instead":"remove it")+Hw+b.id,void 0);return Kf(n,m),a2(n,{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 Fo)if(Object.hasOwn(Fo,v)&&Object.hasOwn(b.properties,v)){const E=b.properties[v],O=Fo[v];(O===null||O.includes(b.tagName))&&(b.properties[v]=p(String(E||""),v,b))}}if(b.type==="element"){let v=a?!a.includes(b.tagName):c?c.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 Qw(n){const l=n.indexOf(":"),a=n.indexOf("?"),r=n.indexOf("#"),s=n.indexOf("/");return l===-1||s!==-1&&l>s||a!==-1&&l>a||r!==-1&&l>r||qw.test(n.slice(0,l))?n:""}function cy(n,l){const a=String(n);if(typeof l!="string")throw new TypeError("Expected character");let r=0,s=a.indexOf(l);for(;s!==-1;)r++,s=a.indexOf(l,s+l.length);return r}function Gw(n){if(typeof n!="string")throw new TypeError("Expected a string");return n.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Xw(n,l,a){const s=gs((a||{}).ignore||[]),c=Kw(l);let f=-1;for(;++f<c.length;)hx(n,"text",h);function h(m,b){let y=-1,k;for(;++y<b.length;){const v=b[y],E=k?k.children:void 0;if(s(v,E?E.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=c[f][0],v=c[f][1];let E=0;const q=y.children.indexOf(m);let j=!1,Z=[];k.lastIndex=0;let H=k.exec(m.value);for(;H;){const le=H.index,ee={index:H.index,input:H.input,stack:[...b,m]};let D=v(...H,ee);if(typeof D=="string"&&(D=D.length>0?{type:"text",value:D}:void 0),D===!1?k.lastIndex=le+1:(E!==le&&Z.push({type:"text",value:m.value.slice(E,le)}),Array.isArray(D)?Z.push(...D):D&&Z.push(D),E=le+H[0].length,j=!0),!k.global)break;H=k.exec(m.value)}return j?(E<m.value.length&&Z.push({type:"text",value:m.value.slice(E)}),y.children.splice(q,1,...Z)):Z=[m],q+Z.length}}function Kw(n){const l=[];if(!Array.isArray(n))throw new TypeError("Expected find and replace tuple or list of tuples");const a=!n[0]||Array.isArray(n[0])?n:[n];let r=-1;for(;++r<a.length;){const s=a[r];l.push([Jw(s[0]),$w(s[1])])}return l}function Jw(n){return typeof n=="string"?new RegExp(Gw(n),"g"):n}function $w(n){return typeof n=="function"?n:function(){return n}}const nf="phrasing",lf=["autolink","link","image","label"];function Pw(){return{transforms:[a4],enter:{literalAutolink:e4,literalAutolinkEmail:af,literalAutolinkHttp:af,literalAutolinkWww:af},exit:{literalAutolink:i4,literalAutolinkEmail:l4,literalAutolinkHttp:t4,literalAutolinkWww:n4}}}function Ww(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:nf,notInConstruct:lf},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:nf,notInConstruct:lf},{character:":",before:"[ps]",after:"\\/",inConstruct:nf,notInConstruct:lf}]}}function e4(n){this.enter({type:"link",title:null,url:"",children:[]},n)}function af(n){this.config.enter.autolinkProtocol.call(this,n)}function t4(n){this.config.exit.autolinkProtocol.call(this,n)}function n4(n){this.config.exit.data.call(this,n);const l=this.stack[this.stack.length-1];l.type,l.url="http://"+this.sliceSerialize(n)}function l4(n){this.config.exit.autolinkEmail.call(this,n)}function i4(n){this.exit(n)}function a4(n){Xw(n,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,r4],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),u4]],{ignore:["link","linkReference"]})}function r4(n,l,a,r,s){let c="";if(!px(s)||(/^w/i.test(l)&&(a=l+a,l="",c="http://"),!s4(a)))return!1;const f=c4(a+r);if(!f[0])return!1;const h={type:"link",title:null,url:c+l+f[0],children:[{type:"text",value:l+f[0]}]};return f[1]?[h,{type:"text",value:f[1]}]:h}function u4(n,l,a,r){return!px(r,!0)||/[-\d_]$/.test(a)?!1:{type:"link",title:null,url:"mailto:"+l+"@"+a,children:[{type:"text",value:l+"@"+a}]}}function s4(n){const l=n.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 c4(n){const l=/[!"&'),.:;<>?\]}]+$/.exec(n);if(!l)return[n,void 0];n=n.slice(0,l.index);let a=l[0],r=a.indexOf(")");const s=cy(n,"(");let c=cy(n,")");for(;r!==-1&&s>c;)n+=a.slice(0,r+1),a=a.slice(r+1),r=a.indexOf(")"),c++;return[n,a]}function px(n,l){const a=n.input.charCodeAt(n.index-1);return(n.index===0||ri(a)||hs(a))&&(!l||a!==47)}gx.peek=x4;function o4(){this.buffer()}function f4(n){this.enter({type:"footnoteReference",identifier:"",label:""},n)}function d4(){this.buffer()}function h4(n){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},n)}function m4(n){const l=this.resume(),a=this.stack[this.stack.length-1];a.type,a.identifier=_n(this.sliceSerialize(n)).toLowerCase(),a.label=l}function p4(n){this.exit(n)}function g4(n){const l=this.resume(),a=this.stack[this.stack.length-1];a.type,a.identifier=_n(this.sliceSerialize(n)).toLowerCase(),a.label=l}function y4(n){this.exit(n)}function x4(){return"["}function gx(n,l,a,r){const s=a.createTracker(r);let c=s.move("[^");const f=a.enter("footnoteReference"),h=a.enter("reference");return c+=s.move(a.safe(a.associationId(n),{after:"]",before:c})),h(),f(),c+=s.move("]"),c}function b4(){return{enter:{gfmFootnoteCallString:o4,gfmFootnoteCall:f4,gfmFootnoteDefinitionLabelString:d4,gfmFootnoteDefinition:h4},exit:{gfmFootnoteCallString:m4,gfmFootnoteCall:p4,gfmFootnoteDefinitionLabelString:g4,gfmFootnoteDefinition:y4}}}function v4(n){let l=!1;return n&&n.firstLineBlank&&(l=!0),{handlers:{footnoteDefinition:a,footnoteReference:gx},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function a(r,s,c,f){const h=c.createTracker(f);let p=h.move("[^");const m=c.enter("footnoteDefinition"),b=c.enter("label");return p+=h.move(c.safe(c.associationId(r),{before:p,after:"]"})),b(),p+=h.move("]:"),r.children&&r.children.length>0&&(h.shift(4),p+=h.move((l?`
|
|
63
|
-
`:" ")+c.indentLines(c.containerFlow(r,h.current()),l?yx:k4))),m(),p}}function k4(n,l,a){return l===0?n:yx(n,l,a)}function yx(n,l,a){return(a?"":" ")+n}const S4=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];xx.peek=A4;function w4(){return{canContainEols:["delete"],enter:{strikethrough:E4},exit:{strikethrough:C4}}}function _4(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:S4}],handlers:{delete:xx}}}function E4(n){this.enter({type:"delete",children:[]},n)}function C4(n){this.exit(n)}function xx(n,l,a,r){const s=a.createTracker(r),c=a.enter("strikethrough");let f=s.move("~~");return f+=a.containerPhrasing(n,{...s.current(),before:f,after:"~"}),f+=s.move("~~"),c(),f}function A4(){return"~"}function N4(n){return n.length}function T4(n,l){const a=l||{},r=(a.align||[]).concat(),s=a.stringLength||N4,c=[],f=[],h=[],p=[];let m=0,b=-1;for(;++b<n.length;){const O=[],q=[];let j=-1;for(n[b].length>m&&(m=n[b].length);++j<n[b].length;){const Z=j4(n[b][j]);if(a.alignDelimiters!==!1){const H=s(Z);q[j]=H,(p[j]===void 0||H>p[j])&&(p[j]=H)}O.push(Z)}f[b]=O,h[b]=q}let y=-1;if(typeof r=="object"&&"length"in r)for(;++y<m;)c[y]=oy(r[y]);else{const O=oy(r);for(;++y<m;)c[y]=O}y=-1;const k=[],v=[];for(;++y<m;){const O=c[y];let q="",j="";O===99?(q=":",j=":"):O===108?q=":":O===114&&(j=":");let Z=a.alignDelimiters===!1?1:Math.max(1,p[y]-q.length-j.length);const H=q+"-".repeat(Z)+j;a.alignDelimiters!==!1&&(Z=q.length+Z+j.length,Z>p[y]&&(p[y]=Z),v[y]=Z),k[y]=H}f.splice(1,0,k),h.splice(1,0,v),b=-1;const E=[];for(;++b<f.length;){const O=f[b],q=h[b];y=-1;const j=[];for(;++y<m;){const Z=O[y]||"";let H="",le="";if(a.alignDelimiters!==!1){const ee=p[y]-(q[y]||0),D=c[y];D===114?H=" ".repeat(ee):D===99?ee%2?(H=" ".repeat(ee/2+.5),le=" ".repeat(ee/2-.5)):(H=" ".repeat(ee/2),le=H):le=" ".repeat(ee)}a.delimiterStart!==!1&&!y&&j.push("|"),a.padding!==!1&&!(a.alignDelimiters===!1&&Z==="")&&(a.delimiterStart!==!1||y)&&j.push(" "),a.alignDelimiters!==!1&&j.push(H),j.push(Z),a.alignDelimiters!==!1&&j.push(le),a.padding!==!1&&j.push(" "),(a.delimiterEnd!==!1||y!==m-1)&&j.push("|")}E.push(a.delimiterEnd===!1?j.join("").replace(/ +$/,""):j.join(""))}return E.join(`
|
|
64
|
-
`)}function j4(n){return n==null?"":String(n)}function oy(n){const l=typeof n=="string"?n.codePointAt(0):0;return l===67||l===99?99:l===76||l===108?108:l===82||l===114?114:0}function z4(n,l,a,r){const s=a.enter("blockquote"),c=a.createTracker(r);c.move("> "),c.shift(2);const f=a.indentLines(a.containerFlow(n,c.current()),D4);return s(),f}function D4(n,l,a){return">"+(a?"":" ")+n}function M4(n,l){return fy(n,l.inConstruct,!0)&&!fy(n,l.notInConstruct,!1)}function fy(n,l,a){if(typeof l=="string"&&(l=[l]),!l||l.length===0)return a;let r=-1;for(;++r<l.length;)if(n.includes(l[r]))return!0;return!1}function dy(n,l,a,r){let s=-1;for(;++s<a.unsafe.length;)if(a.unsafe[s].character===`
|
|
65
|
-
`&&M4(a.stack,a.unsafe[s]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
66
|
-
`}function O4(n,l){const a=String(n);let r=a.indexOf(l),s=r,c=0,f=0;if(typeof l!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===s?++c>f&&(f=c):c=1,s=r+l.length,r=a.indexOf(l,s);return f}function R4(n,l){return!!(l.options.fences===!1&&n.value&&!n.lang&&/[^ \r\n]/.test(n.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(n.value))}function L4(n){const l=n.options.fence||"`";if(l!=="`"&&l!=="~")throw new Error("Cannot serialize code with `"+l+"` for `options.fence`, expected `` ` `` or `~`");return l}function B4(n,l,a,r){const s=L4(a),c=n.value||"",f=s==="`"?"GraveAccent":"Tilde";if(R4(n,a)){const y=a.enter("codeIndented"),k=a.indentLines(c,U4);return y(),k}const h=a.createTracker(r),p=s.repeat(Math.max(O4(c,s)+1,3)),m=a.enter("codeFenced");let b=h.move(p);if(n.lang){const y=a.enter(`codeFencedLang${f}`);b+=h.move(a.safe(n.lang,{before:b,after:" ",encode:["`"],...h.current()})),y()}if(n.lang&&n.meta){const y=a.enter(`codeFencedMeta${f}`);b+=h.move(" "),b+=h.move(a.safe(n.meta,{before:b,after:`
|
|
67
|
-
`,encode:["`"],...h.current()})),y()}return b+=h.move(`
|
|
68
|
-
`),c&&(b+=h.move(c+`
|
|
69
|
-
`)),b+=h.move(p),m(),b}function U4(n,l,a){return(a?"":" ")+n}function $f(n){const l=n.options.quote||'"';if(l!=='"'&&l!=="'")throw new Error("Cannot serialize title with `"+l+"` for `options.quote`, expected `\"`, or `'`");return l}function H4(n,l,a,r){const s=$f(a),c=s==='"'?"Quote":"Apostrophe",f=a.enter("definition");let h=a.enter("label");const p=a.createTracker(r);let m=p.move("[");return m+=p.move(a.safe(a.associationId(n),{before:m,after:"]",...p.current()})),m+=p.move("]: "),h(),!n.url||/[\0- \u007F]/.test(n.url)?(h=a.enter("destinationLiteral"),m+=p.move("<"),m+=p.move(a.safe(n.url,{before:m,after:">",...p.current()})),m+=p.move(">")):(h=a.enter("destinationRaw"),m+=p.move(a.safe(n.url,{before:m,after:n.title?" ":`
|
|
70
|
-
`,...p.current()}))),h(),n.title&&(h=a.enter(`title${c}`),m+=p.move(" "+s),m+=p.move(a.safe(n.title,{before:m,after:s,...p.current()})),m+=p.move(s),h()),f(),m}function q4(n){const l=n.options.emphasis||"*";if(l!=="*"&&l!=="_")throw new Error("Cannot serialize emphasis with `"+l+"` for `options.emphasis`, expected `*`, or `_`");return l}function gr(n){return"&#x"+n.toString(16).toUpperCase()+";"}function rs(n,l,a){const r=ra(n),s=ra(l);return r===void 0?s===void 0?a==="_"?{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}}bx.peek=V4;function bx(n,l,a,r){const s=q4(a),c=a.enter("emphasis"),f=a.createTracker(r),h=f.move(s);let p=f.move(a.containerPhrasing(n,{after:s,before:h,...f.current()}));const m=p.charCodeAt(0),b=rs(r.before.charCodeAt(r.before.length-1),m,s);b.inside&&(p=gr(m)+p.slice(1));const y=p.charCodeAt(p.length-1),k=rs(r.after.charCodeAt(0),y,s);k.inside&&(p=p.slice(0,-1)+gr(y));const v=f.move(s);return c(),a.attentionEncodeSurroundingInfo={after:k.outside,before:b.outside},h+p+v}function V4(n,l,a){return a.options.emphasis||"*"}function Y4(n,l){let a=!1;return Kf(n,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return a=!0,Sf}),!!((!n.depth||n.depth<3)&&Yf(n)&&(l.options.setext||a))}function Z4(n,l,a,r){const s=Math.max(Math.min(6,n.depth||1),1),c=a.createTracker(r);if(Y4(n,a)){const b=a.enter("headingSetext"),y=a.enter("phrasing"),k=a.containerPhrasing(n,{...c.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=a.enter("headingAtx"),p=a.enter("phrasing");c.move(f+" ");let m=a.containerPhrasing(n,{before:"# ",after:`
|
|
75
|
-
`,...c.current()});return/^[\t ]/.test(m)&&(m=gr(m.charCodeAt(0))+m.slice(1)),m=m?f+" "+m:f,a.options.closeAtx&&(m+=" "+f),p(),h(),m}vx.peek=I4;function vx(n){return n.value||""}function I4(){return"<"}kx.peek=F4;function kx(n,l,a,r){const s=$f(a),c=s==='"'?"Quote":"Apostrophe",f=a.enter("image");let h=a.enter("label");const p=a.createTracker(r);let m=p.move("![");return m+=p.move(a.safe(n.alt,{before:m,after:"]",...p.current()})),m+=p.move("]("),h(),!n.url&&n.title||/[\0- \u007F]/.test(n.url)?(h=a.enter("destinationLiteral"),m+=p.move("<"),m+=p.move(a.safe(n.url,{before:m,after:">",...p.current()})),m+=p.move(">")):(h=a.enter("destinationRaw"),m+=p.move(a.safe(n.url,{before:m,after:n.title?" ":")",...p.current()}))),h(),n.title&&(h=a.enter(`title${c}`),m+=p.move(" "+s),m+=p.move(a.safe(n.title,{before:m,after:s,...p.current()})),m+=p.move(s),h()),m+=p.move(")"),f(),m}function F4(){return"!"}Sx.peek=Q4;function Sx(n,l,a,r){const s=n.referenceType,c=a.enter("imageReference");let f=a.enter("label");const h=a.createTracker(r);let p=h.move("![");const m=a.safe(n.alt,{before:p,after:"]",...h.current()});p+=h.move(m+"]["),f();const b=a.stack;a.stack=[],f=a.enter("reference");const y=a.safe(a.associationId(n),{before:p,after:"]",...h.current()});return f(),a.stack=b,c(),s==="full"||!m||m!==y?p+=h.move(y+"]"):s==="shortcut"?p=p.slice(0,-1):p+=h.move("]"),p}function Q4(){return"!"}wx.peek=G4;function wx(n,l,a){let r=n.value||"",s="`",c=-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+" ");++c<a.unsafe.length;){const f=a.unsafe[c],h=a.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 G4(){return"`"}function _x(n,l){const a=Yf(n);return!!(!l.options.resourceLink&&n.url&&!n.title&&n.children&&n.children.length===1&&n.children[0].type==="text"&&(a===n.url||"mailto:"+a===n.url)&&/^[a-z][a-z+.-]+:/i.test(n.url)&&!/[\0- <>\u007F]/.test(n.url))}Ex.peek=X4;function Ex(n,l,a,r){const s=$f(a),c=s==='"'?"Quote":"Apostrophe",f=a.createTracker(r);let h,p;if(_x(n,a)){const b=a.stack;a.stack=[],h=a.enter("autolink");let y=f.move("<");return y+=f.move(a.containerPhrasing(n,{before:y,after:">",...f.current()})),y+=f.move(">"),h(),a.stack=b,y}h=a.enter("link"),p=a.enter("label");let m=f.move("[");return m+=f.move(a.containerPhrasing(n,{before:m,after:"](",...f.current()})),m+=f.move("]("),p(),!n.url&&n.title||/[\0- \u007F]/.test(n.url)?(p=a.enter("destinationLiteral"),m+=f.move("<"),m+=f.move(a.safe(n.url,{before:m,after:">",...f.current()})),m+=f.move(">")):(p=a.enter("destinationRaw"),m+=f.move(a.safe(n.url,{before:m,after:n.title?" ":")",...f.current()}))),p(),n.title&&(p=a.enter(`title${c}`),m+=f.move(" "+s),m+=f.move(a.safe(n.title,{before:m,after:s,...f.current()})),m+=f.move(s),p()),m+=f.move(")"),h(),m}function X4(n,l,a){return _x(n,a)?"<":"["}Cx.peek=K4;function Cx(n,l,a,r){const s=n.referenceType,c=a.enter("linkReference");let f=a.enter("label");const h=a.createTracker(r);let p=h.move("[");const m=a.containerPhrasing(n,{before:p,after:"]",...h.current()});p+=h.move(m+"]["),f();const b=a.stack;a.stack=[],f=a.enter("reference");const y=a.safe(a.associationId(n),{before:p,after:"]",...h.current()});return f(),a.stack=b,c(),s==="full"||!m||m!==y?p+=h.move(y+"]"):s==="shortcut"?p=p.slice(0,-1):p+=h.move("]"),p}function K4(){return"["}function Pf(n){const l=n.options.bullet||"*";if(l!=="*"&&l!=="+"&&l!=="-")throw new Error("Cannot serialize items with `"+l+"` for `options.bullet`, expected `*`, `+`, or `-`");return l}function J4(n){const l=Pf(n),a=n.options.bulletOther;if(!a)return l==="*"?"-":"*";if(a!=="*"&&a!=="+"&&a!=="-")throw new Error("Cannot serialize items with `"+a+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(a===l)throw new Error("Expected `bullet` (`"+l+"`) and `bulletOther` (`"+a+"`) to be different");return a}function $4(n){const l=n.options.bulletOrdered||".";if(l!=="."&&l!==")")throw new Error("Cannot serialize items with `"+l+"` for `options.bulletOrdered`, expected `.` or `)`");return l}function Ax(n){const l=n.options.rule||"*";if(l!=="*"&&l!=="-"&&l!=="_")throw new Error("Cannot serialize rules with `"+l+"` for `options.rule`, expected `*`, `-`, or `_`");return l}function P4(n,l,a,r){const s=a.enter("list"),c=a.bulletCurrent;let f=n.ordered?$4(a):Pf(a);const h=n.ordered?f==="."?")":".":J4(a);let p=l&&a.bulletLastUsed?f===a.bulletLastUsed:!1;if(!n.ordered){const b=n.children?n.children[0]:void 0;if((f==="*"||f==="-")&&b&&(!b.children||!b.children[0])&&a.stack[a.stack.length-1]==="list"&&a.stack[a.stack.length-2]==="listItem"&&a.stack[a.stack.length-3]==="list"&&a.stack[a.stack.length-4]==="listItem"&&a.indexStack[a.indexStack.length-1]===0&&a.indexStack[a.indexStack.length-2]===0&&a.indexStack[a.indexStack.length-3]===0&&(p=!0),Ax(a)===f&&b){let y=-1;for(;++y<n.children.length;){const k=n.children[y];if(k&&k.type==="listItem"&&k.children&&k.children[0]&&k.children[0].type==="thematicBreak"){p=!0;break}}}}p&&(f=h),a.bulletCurrent=f;const m=a.containerFlow(n,r);return a.bulletLastUsed=f,a.bulletCurrent=c,s(),m}function W4(n){const l=n.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 e_(n,l,a,r){const s=W4(a);let c=a.bulletCurrent||Pf(a);l&&l.type==="list"&&l.ordered&&(c=(typeof l.start=="number"&&l.start>-1?l.start:1)+(a.options.incrementListMarker===!1?0:l.children.indexOf(n))+c);let f=c.length+1;(s==="tab"||s==="mixed"&&(l&&l.type==="list"&&l.spread||n.spread))&&(f=Math.ceil(f/4)*4);const h=a.createTracker(r);h.move(c+" ".repeat(f-c.length)),h.shift(f);const p=a.enter("listItem"),m=a.indentLines(a.containerFlow(n,h.current()),b);return p(),m;function b(y,k,v){return k?(v?"":" ".repeat(f))+y:(v?c:c+" ".repeat(f-c.length))+y}}function t_(n,l,a,r){const s=a.enter("paragraph"),c=a.enter("phrasing"),f=a.containerPhrasing(n,r);return c(),s(),f}const n_=gs(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function l_(n,l,a,r){return(n.children.some(function(f){return n_(f)})?a.containerPhrasing:a.containerFlow).call(a,n,r)}function i_(n){const l=n.options.strong||"*";if(l!=="*"&&l!=="_")throw new Error("Cannot serialize strong with `"+l+"` for `options.strong`, expected `*`, or `_`");return l}Nx.peek=a_;function Nx(n,l,a,r){const s=i_(a),c=a.enter("strong"),f=a.createTracker(r),h=f.move(s+s);let p=f.move(a.containerPhrasing(n,{after:s,before:h,...f.current()}));const m=p.charCodeAt(0),b=rs(r.before.charCodeAt(r.before.length-1),m,s);b.inside&&(p=gr(m)+p.slice(1));const y=p.charCodeAt(p.length-1),k=rs(r.after.charCodeAt(0),y,s);k.inside&&(p=p.slice(0,-1)+gr(y));const v=f.move(s+s);return c(),a.attentionEncodeSurroundingInfo={after:k.outside,before:b.outside},h+p+v}function a_(n,l,a){return a.options.strong||"*"}function r_(n,l,a,r){return a.safe(n.value,r)}function u_(n){const l=n.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 s_(n,l,a){const r=(Ax(a)+(a.options.ruleSpaces?" ":"")).repeat(u_(a));return a.options.ruleSpaces?r.slice(0,-1):r}const Tx={blockquote:z4,break:dy,code:B4,definition:H4,emphasis:bx,hardBreak:dy,heading:Z4,html:vx,image:kx,imageReference:Sx,inlineCode:wx,link:Ex,linkReference:Cx,list:P4,listItem:e_,paragraph:t_,root:l_,strong:Nx,text:r_,thematicBreak:s_};function c_(){return{enter:{table:o_,tableData:hy,tableHeader:hy,tableRow:d_},exit:{codeText:h_,table:f_,tableData:rf,tableHeader:rf,tableRow:rf}}}function o_(n){const l=n._align;this.enter({type:"table",align:l.map(function(a){return a==="none"?null:a}),children:[]},n),this.data.inTable=!0}function f_(n){this.exit(n),this.data.inTable=void 0}function d_(n){this.enter({type:"tableRow",children:[]},n)}function rf(n){this.exit(n)}function hy(n){this.enter({type:"tableCell",children:[]},n)}function h_(n){let l=this.resume();this.data.inTable&&(l=l.replace(/\\([\\|])/g,m_));const a=this.stack[this.stack.length-1];a.type,a.value=l,this.exit(n)}function m_(n,l){return l==="|"?l:n}function p_(n){const l=n||{},a=l.tableCellPadding,r=l.tablePipeAlign,s=l.stringLength,c=a?" ":"|";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,E,O,q){return m(b(v,O,q),v.align)}function h(v,E,O,q){const j=y(v,O,q),Z=m([j]);return Z.slice(0,Z.indexOf(`
|
|
77
|
-
`))}function p(v,E,O,q){const j=O.enter("tableCell"),Z=O.enter("phrasing"),H=O.containerPhrasing(v,{...q,before:c,after:c});return Z(),j(),H}function m(v,E){return T4(v,{align:E,alignDelimiters:r,padding:a,stringLength:s})}function b(v,E,O){const q=v.children;let j=-1;const Z=[],H=E.enter("table");for(;++j<q.length;)Z[j]=y(q[j],E,O);return H(),Z}function y(v,E,O){const q=v.children;let j=-1;const Z=[],H=E.enter("tableRow");for(;++j<q.length;)Z[j]=p(q[j],v,E,O);return H(),Z}function k(v,E,O){let q=Tx.inlineCode(v,E,O);return O.stack.includes("tableCell")&&(q=q.replace(/\|/g,"\\$&")),q}}function g_(){return{exit:{taskListCheckValueChecked:my,taskListCheckValueUnchecked:my,paragraph:x_}}}function y_(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:b_}}}function my(n){const l=this.stack[this.stack.length-2];l.type,l.checked=n.type==="taskListCheckValueChecked"}function x_(n){const l=this.stack[this.stack.length-2];if(l&&l.type==="listItem"&&typeof l.checked=="boolean"){const a=this.stack[this.stack.length-1];a.type;const r=a.children[0];if(r&&r.type==="text"){const s=l.children;let c=-1,f;for(;++c<s.length;){const h=s[c];if(h.type==="paragraph"){f=h;break}}f===a&&(r.value=r.value.slice(1),r.value.length===0?a.children.shift():a.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,a.position.start=Object.assign({},r.position.start)))}}this.exit(n)}function b_(n,l,a,r){const s=n.children[0],c=typeof n.checked=="boolean"&&s&&s.type==="paragraph",f="["+(n.checked?"x":" ")+"] ",h=a.createTracker(r);c&&h.move(f);let p=Tx.listItem(n,l,a,{...r,...h.current()});return c&&(p=p.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,m)),p;function m(b){return b+f}}function v_(){return[Pw(),b4(),w4(),c_(),g_()]}function k_(n){return{extensions:[Ww(),v4(n),_4(),p_(n),y_()]}}const S_={tokenize:N_,partial:!0},jx={tokenize:T_,partial:!0},zx={tokenize:j_,partial:!0},Dx={tokenize:z_,partial:!0},w_={tokenize:D_,partial:!0},Mx={name:"wwwAutolink",tokenize:C_,previous:Rx},Ox={name:"protocolAutolink",tokenize:A_,previous:Lx},nl={name:"emailAutolink",tokenize:E_,previous:Bx},Dn={};function __(){return{text:Dn}}let ti=48;for(;ti<123;)Dn[ti]=nl,ti++,ti===58?ti=65:ti===91&&(ti=97);Dn[43]=nl;Dn[45]=nl;Dn[46]=nl;Dn[95]=nl;Dn[72]=[nl,Ox];Dn[104]=[nl,Ox];Dn[87]=[nl,Mx];Dn[119]=[nl,Mx];function E_(n,l,a){const r=this;let s,c;return f;function f(y){return!Cf(y)||!Bx.call(r,r.previous)||Wf(r.events)?a(y):(n.enter("literalAutolink"),n.enter("literalAutolinkEmail"),h(y))}function h(y){return Cf(y)?(n.consume(y),h):y===64?(n.consume(y),p):a(y)}function p(y){return y===46?n.check(w_,b,m)(y):y===45||y===95||jt(y)?(c=!0,n.consume(y),p):b(y)}function m(y){return n.consume(y),s=!0,p}function b(y){return c&&s&&Rt(r.previous)?(n.exit("literalAutolinkEmail"),n.exit("literalAutolink"),l(y)):a(y)}}function C_(n,l,a){const r=this;return s;function s(f){return f!==87&&f!==119||!Rx.call(r,r.previous)||Wf(r.events)?a(f):(n.enter("literalAutolink"),n.enter("literalAutolinkWww"),n.check(S_,n.attempt(jx,n.attempt(zx,c),a),a)(f))}function c(f){return n.exit("literalAutolinkWww"),n.exit("literalAutolink"),l(f)}}function A_(n,l,a){const r=this;let s="",c=!1;return f;function f(y){return(y===72||y===104)&&Lx.call(r,r.previous)&&!Wf(r.events)?(n.enter("literalAutolink"),n.enter("literalAutolinkHttp"),s+=String.fromCodePoint(y),n.consume(y),h):a(y)}function h(y){if(Rt(y)&&s.length<5)return s+=String.fromCodePoint(y),n.consume(y),h;if(y===58){const k=s.toLowerCase();if(k==="http"||k==="https")return n.consume(y),p}return a(y)}function p(y){return y===47?(n.consume(y),c?m:(c=!0,p)):a(y)}function m(y){return y===null||ls(y)||tt(y)||ri(y)||hs(y)?a(y):n.attempt(jx,n.attempt(zx,b),a)(y)}function b(y){return n.exit("literalAutolinkHttp"),n.exit("literalAutolink"),l(y)}}function N_(n,l,a){let r=0;return s;function s(f){return(f===87||f===119)&&r<3?(r++,n.consume(f),s):f===46&&r===3?(n.consume(f),c):a(f)}function c(f){return f===null?a(f):l(f)}}function T_(n,l,a){let r,s,c;return f;function f(m){return m===46||m===95?n.check(Dx,p,h)(m):m===null||tt(m)||ri(m)||m!==45&&hs(m)?p(m):(c=!0,n.consume(m),f)}function h(m){return m===95?r=!0:(s=r,r=void 0),n.consume(m),f}function p(m){return s||r||!c?a(m):l(m)}}function j_(n,l){let a=0,r=0;return s;function s(f){return f===40?(a++,n.consume(f),s):f===41&&r<a?c(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?n.check(Dx,l,c)(f):f===null||tt(f)||ri(f)?l(f):(n.consume(f),s)}function c(f){return f===41&&r++,n.consume(f),s}}function z_(n,l,a){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?(n.consume(h),r):h===38?(n.consume(h),c):h===93?(n.consume(h),s):h===60||h===null||tt(h)||ri(h)?l(h):a(h)}function s(h){return h===null||h===40||h===91||tt(h)||ri(h)?l(h):r(h)}function c(h){return Rt(h)?f(h):a(h)}function f(h){return h===59?(n.consume(h),r):Rt(h)?(n.consume(h),f):a(h)}}function D_(n,l,a){return r;function r(c){return n.consume(c),s}function s(c){return jt(c)?a(c):l(c)}}function Rx(n){return n===null||n===40||n===42||n===95||n===91||n===93||n===126||tt(n)}function Lx(n){return!Rt(n)}function Bx(n){return!(n===47||Cf(n))}function Cf(n){return n===43||n===45||n===46||n===95||jt(n)}function Wf(n){let l=n.length,a=!1;for(;l--;){const r=n[l][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){a=!0;break}if(r._gfmAutolinkLiteralWalkedInto){a=!1;break}}return n.length>0&&!a&&(n[n.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),a}const M_={tokenize:V_,partial:!0};function O_(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:U_,continuation:{tokenize:H_},exit:q_}},text:{91:{name:"gfmFootnoteCall",tokenize:B_},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:R_,resolveTo:L_}}}}function R_(n,l,a){const r=this;let s=r.events.length;const c=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 a(p);const m=_n(r.sliceSerialize({start:f.end,end:r.now()}));return m.codePointAt(0)!==94||!c.includes(m.slice(1))?a(p):(n.enter("gfmFootnoteCallLabelMarker"),n.consume(p),n.exit("gfmFootnoteCallLabelMarker"),l(p))}}function L_(n,l){let a=n.length;for(;a--;)if(n[a][1].type==="labelImage"&&n[a][0]==="enter"){n[a][1];break}n[a+1][1].type="data",n[a+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},n[a+3][1].start),end:Object.assign({},n[n.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},n[a+3][1].end),end:Object.assign({},n[a+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const c={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},n[n.length-1][1].start)},f={type:"chunkString",contentType:"string",start:Object.assign({},c.start),end:Object.assign({},c.end)},h=[n[a+1],n[a+2],["enter",r,l],n[a+3],n[a+4],["enter",s,l],["exit",s,l],["enter",c,l],["enter",f,l],["exit",f,l],["exit",c,l],n[n.length-2],n[n.length-1],["exit",r,l]];return n.splice(a,n.length-a+1,...h),n}function B_(n,l,a){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let c=0,f;return h;function h(y){return n.enter("gfmFootnoteCall"),n.enter("gfmFootnoteCallLabelMarker"),n.consume(y),n.exit("gfmFootnoteCallLabelMarker"),p}function p(y){return y!==94?a(y):(n.enter("gfmFootnoteCallMarker"),n.consume(y),n.exit("gfmFootnoteCallMarker"),n.enter("gfmFootnoteCallString"),n.enter("chunkString").contentType="string",m)}function m(y){if(c>999||y===93&&!f||y===null||y===91||tt(y))return a(y);if(y===93){n.exit("chunkString");const k=n.exit("gfmFootnoteCallString");return s.includes(_n(r.sliceSerialize(k)))?(n.enter("gfmFootnoteCallLabelMarker"),n.consume(y),n.exit("gfmFootnoteCallLabelMarker"),n.exit("gfmFootnoteCall"),l):a(y)}return tt(y)||(f=!0),c++,n.consume(y),y===92?b:m}function b(y){return y===91||y===92||y===93?(n.consume(y),c++,m):m(y)}}function U_(n,l,a){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let c,f=0,h;return p;function p(E){return n.enter("gfmFootnoteDefinition")._container=!0,n.enter("gfmFootnoteDefinitionLabel"),n.enter("gfmFootnoteDefinitionLabelMarker"),n.consume(E),n.exit("gfmFootnoteDefinitionLabelMarker"),m}function m(E){return E===94?(n.enter("gfmFootnoteDefinitionMarker"),n.consume(E),n.exit("gfmFootnoteDefinitionMarker"),n.enter("gfmFootnoteDefinitionLabelString"),n.enter("chunkString").contentType="string",b):a(E)}function b(E){if(f>999||E===93&&!h||E===null||E===91||tt(E))return a(E);if(E===93){n.exit("chunkString");const O=n.exit("gfmFootnoteDefinitionLabelString");return c=_n(r.sliceSerialize(O)),n.enter("gfmFootnoteDefinitionLabelMarker"),n.consume(E),n.exit("gfmFootnoteDefinitionLabelMarker"),n.exit("gfmFootnoteDefinitionLabel"),k}return tt(E)||(h=!0),f++,n.consume(E),E===92?y:b}function y(E){return E===91||E===92||E===93?(n.consume(E),f++,b):b(E)}function k(E){return E===58?(n.enter("definitionMarker"),n.consume(E),n.exit("definitionMarker"),s.includes(c)||s.push(c),He(n,v,"gfmFootnoteDefinitionWhitespace")):a(E)}function v(E){return l(E)}}function H_(n,l,a){return n.check(vr,l,n.attempt(M_,l,a))}function q_(n){n.exit("gfmFootnoteDefinition")}function V_(n,l,a){const r=this;return He(n,s,"gfmFootnoteDefinitionIndent",5);function s(c){const f=r.events[r.events.length-1];return f&&f[1].type==="gfmFootnoteDefinitionIndent"&&f[2].sliceSerialize(f[1],!0).length===4?l(c):a(c)}}function Y_(n){let a=(n||{}).singleTilde;const r={name:"strikethrough",tokenize:c,resolveAll:s};return a==null&&(a=!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&&an(k,k.length,0,ms(v,f.slice(m+1,p),h)),an(k,k.length,0,[["exit",y,h],["enter",f[p][1],h],["exit",f[p][1],h],["exit",b,h]]),an(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 c(f,h,p){const m=this.previous,b=this.events;let y=0;return k;function k(E){return m===126&&b[b.length-1][1].type!=="characterEscape"?p(E):(f.enter("strikethroughSequenceTemporary"),v(E))}function v(E){const O=ra(m);if(E===126)return y>1?p(E):(f.consume(E),y++,v);if(y<2&&!a)return p(E);const q=f.exit("strikethroughSequenceTemporary"),j=ra(E);return q._open=!j||j===2&&!!O,q._close=!O||O===2&&!!j,h(E)}}}class Z_{constructor(){this.map=[]}add(l,a,r){I_(this,l,a,r)}consume(l){if(this.map.sort(function(c,f){return c[0]-f[0]}),this.map.length===0)return;let a=this.map.length;const r=[];for(;a>0;)a-=1,r.push(l.slice(this.map[a][0]+this.map[a][1]),this.map[a][2]),l.length=this.map[a][0];r.push(l.slice()),l.length=0;let s=r.pop();for(;s;){for(const c of s)l.push(c);s=r.pop()}this.map.length=0}}function I_(n,l,a,r){let s=0;if(!(a===0&&r.length===0)){for(;s<n.map.length;){if(n.map[s][0]===l){n.map[s][1]+=a,n.map[s][2].push(...r);return}s+=1}n.map.push([l,a,r])}}function F_(n,l){let a=!1;const r=[];for(;l<n.length;){const s=n[l];if(a){if(s[0]==="enter")s[1].type==="tableContent"&&r.push(n[l+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(n[l-1][1].type==="tableDelimiterMarker"){const c=r.length-1;r[c]=r[c]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(a=!0);l+=1}return r}function Q_(){return{flow:{null:{name:"table",tokenize:G_,resolveAll:X_}}}}function G_(n,l,a){const r=this;let s=0,c=0,f;return h;function h(M){let U=r.events.length-1;for(;U>-1;){const re=r.events[U][1].type;if(re==="lineEnding"||re==="linePrefix")U--;else break}const J=U>-1?r.events[U][1].type:null,pe=J==="tableHead"||J==="tableRow"?D:p;return pe===D&&r.parser.lazy[r.now().line]?a(M):pe(M)}function p(M){return n.enter("tableHead"),n.enter("tableRow"),m(M)}function m(M){return M===124||(f=!0,c+=1),b(M)}function b(M){return M===null?a(M):be(M)?c>1?(c=0,r.interrupt=!0,n.exit("tableRow"),n.enter("lineEnding"),n.consume(M),n.exit("lineEnding"),v):a(M):Oe(M)?He(n,b,"whitespace")(M):(c+=1,f&&(f=!1,s+=1),M===124?(n.enter("tableCellDivider"),n.consume(M),n.exit("tableCellDivider"),f=!0,b):(n.enter("data"),y(M)))}function y(M){return M===null||M===124||tt(M)?(n.exit("data"),b(M)):(n.consume(M),M===92?k:y)}function k(M){return M===92||M===124?(n.consume(M),y):y(M)}function v(M){return r.interrupt=!1,r.parser.lazy[r.now().line]?a(M):(n.enter("tableDelimiterRow"),f=!1,Oe(M)?He(n,E,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):E(M))}function E(M){return M===45||M===58?q(M):M===124?(f=!0,n.enter("tableCellDivider"),n.consume(M),n.exit("tableCellDivider"),O):ee(M)}function O(M){return Oe(M)?He(n,q,"whitespace")(M):q(M)}function q(M){return M===58?(c+=1,f=!0,n.enter("tableDelimiterMarker"),n.consume(M),n.exit("tableDelimiterMarker"),j):M===45?(c+=1,j(M)):M===null||be(M)?le(M):ee(M)}function j(M){return M===45?(n.enter("tableDelimiterFiller"),Z(M)):ee(M)}function Z(M){return M===45?(n.consume(M),Z):M===58?(f=!0,n.exit("tableDelimiterFiller"),n.enter("tableDelimiterMarker"),n.consume(M),n.exit("tableDelimiterMarker"),H):(n.exit("tableDelimiterFiller"),H(M))}function H(M){return Oe(M)?He(n,le,"whitespace")(M):le(M)}function le(M){return M===124?E(M):M===null||be(M)?!f||s!==c?ee(M):(n.exit("tableDelimiterRow"),n.exit("tableHead"),l(M)):ee(M)}function ee(M){return a(M)}function D(M){return n.enter("tableRow"),P(M)}function P(M){return M===124?(n.enter("tableCellDivider"),n.consume(M),n.exit("tableCellDivider"),P):M===null||be(M)?(n.exit("tableRow"),l(M)):Oe(M)?He(n,P,"whitespace")(M):(n.enter("data"),ce(M))}function ce(M){return M===null||M===124||tt(M)?(n.exit("data"),P(M)):(n.consume(M),M===92?fe:ce)}function fe(M){return M===92||M===124?(n.consume(M),ce):ce(M)}}function X_(n,l){let a=-1,r=!0,s=0,c=[0,0,0,0],f=[0,0,0,0],h=!1,p=0,m,b,y;const k=new Z_;for(;++a<n.length;){const v=n[a],E=v[1];v[0]==="enter"?E.type==="tableHead"?(h=!1,p!==0&&(py(k,l,p,m,b),b=void 0,p=0),m={type:"table",start:Object.assign({},E.start),end:Object.assign({},E.end)},k.add(a,0,[["enter",m,l]])):E.type==="tableRow"||E.type==="tableDelimiterRow"?(r=!0,y=void 0,c=[0,0,0,0],f=[0,a+1,0,0],h&&(h=!1,b={type:"tableBody",start:Object.assign({},E.start),end:Object.assign({},E.end)},k.add(a,0,[["enter",b,l]])),s=E.type==="tableDelimiterRow"?2:b?3:1):s&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")?(r=!1,f[2]===0&&(c[1]!==0&&(f[0]=f[1],y=Iu(k,l,c,s,void 0,y),c=[0,0,0,0]),f[2]=a)):E.type==="tableCellDivider"&&(r?r=!1:(c[1]!==0&&(f[0]=f[1],y=Iu(k,l,c,s,void 0,y)),c=f,f=[c[1],a,0,0])):E.type==="tableHead"?(h=!0,p=a):E.type==="tableRow"||E.type==="tableDelimiterRow"?(p=a,c[1]!==0?(f[0]=f[1],y=Iu(k,l,c,s,a,y)):f[1]!==0&&(y=Iu(k,l,f,s,a,y)),s=0):s&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")&&(f[3]=a)}for(p!==0&&py(k,l,p,m,b),k.consume(l.events),a=-1;++a<l.events.length;){const v=l.events[a];v[0]==="enter"&&v[1].type==="table"&&(v[1]._align=F_(l.events,a))}return n}function Iu(n,l,a,r,s,c){const f=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",h="tableContent";a[0]!==0&&(c.end=Object.assign({},Pi(l.events,a[0])),n.add(a[0],0,[["exit",c,l]]));const p=Pi(l.events,a[1]);if(c={type:f,start:Object.assign({},p),end:Object.assign({},p)},n.add(a[1],0,[["enter",c,l]]),a[2]!==0){const m=Pi(l.events,a[2]),b=Pi(l.events,a[3]),y={type:h,start:Object.assign({},m),end:Object.assign({},b)};if(n.add(a[2],0,[["enter",y,l]]),r!==2){const k=l.events[a[2]],v=l.events[a[3]];if(k[1].end=Object.assign({},v[1].end),k[1].type="chunkText",k[1].contentType="text",a[3]>a[2]+1){const E=a[2]+1,O=a[3]-a[2]-1;n.add(E,O,[])}}n.add(a[3]+1,0,[["exit",y,l]])}return s!==void 0&&(c.end=Object.assign({},Pi(l.events,s)),n.add(s,0,[["exit",c,l]]),c=void 0),c}function py(n,l,a,r,s){const c=[],f=Pi(l.events,a);s&&(s.end=Object.assign({},f),c.push(["exit",s,l])),r.end=Object.assign({},f),c.push(["exit",r,l]),n.add(a+1,0,c)}function Pi(n,l){const a=n[l],r=a[0]==="enter"?"start":"end";return a[1][r]}const K_={name:"tasklistCheck",tokenize:$_};function J_(){return{text:{91:K_}}}function $_(n,l,a){const r=this;return s;function s(p){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?a(p):(n.enter("taskListCheck"),n.enter("taskListCheckMarker"),n.consume(p),n.exit("taskListCheckMarker"),c)}function c(p){return tt(p)?(n.enter("taskListCheckValueUnchecked"),n.consume(p),n.exit("taskListCheckValueUnchecked"),f):p===88||p===120?(n.enter("taskListCheckValueChecked"),n.consume(p),n.exit("taskListCheckValueChecked"),f):a(p)}function f(p){return p===93?(n.enter("taskListCheckMarker"),n.consume(p),n.exit("taskListCheckMarker"),n.exit("taskListCheck"),h):a(p)}function h(p){return be(p)?l(p):Oe(p)?n.check({tokenize:P_},l,a)(p):a(p)}}function P_(n,l,a){return He(n,r,"whitespace");function r(s){return s===null?a(s):l(s)}}function W_(n){return Xy([__(),O_(),Y_(n),Q_(),J_()])}const eE={};function tE(n){const l=this,a=n||eE,r=l.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),c=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),f=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(W_(a)),c.push(v_()),f.push(k_(a))}function xs({source:n,className:l=""}){return n.trim()?g.jsx("div",{className:`markdown-body ${l}`.trim(),children:g.jsx(Yw,{remarkPlugins:[tE],children:n})}):g.jsx("p",{className:"text-sm text-white/40 italic",children:"Empty"})}function Ux({execResult:n}){if(!n.resultText)return null;const l=zy(n),a=l.detected;return g.jsxs("section",{className:"space-y-2",children:[a&&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 ${a?"text-red-300":""}`,children:a?"Blocker details":"Result"}),g.jsx("div",{className:`markdown-body-panel markdown-body-panel--compact ${a?"border-red-400/30 bg-red-950/20":""}`,children:g.jsx(xs,{source:n.resultText})})]})}function nE(n){return n?zy(n).detected:!1}function lE(n){const l=el(n,"playbook_patch");if(!l)return null;try{return ea(l)}catch{return null}}function iE(n){const l=el(n,"reflect_status");if(!l)return null;try{return ea(l)}catch{return null}}function Hx({run:n,artifacts:l,busy:a,act:r}){if(!n.playbookId)return null;const s=lE(l),c=iE(l);if((n.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((c==null?void 0:c.status)==="pending"&&!s)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(!s)return(c==null?void 0:c.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:c.error??"Reflect step failed"})]}):(c==null?void 0:c.status)==="completed"&&c.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:c.error})]}):null;const h=s.status==="proposed",p=s.status==="applied",m=s.status==="dismissed";return g.jsxs("section",{className:"space-y-3",children:[g.jsx("div",{className:"heading-section",children:"Playbook learning"}),s.playbookTitle&&g.jsxs("p",{className:"text-sm text-white/45",children:[s.playbookTitle," ",g.jsxs("span",{className:"text-white/30",children:["(",s.playbookId,")"]})]}),g.jsx("p",{className:"text-sm text-white/55",children:s.rationale}),g.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[g.jsxs("div",{className:"space-y-1",children:[g.jsx("div",{className:"text-xs text-white/40 uppercase tracking-wide",children:"Current"}),g.jsx("textarea",{className:"field-mono min-h-[120px] resize-y text-sm",value:s.previousBody,readOnly:!0})]}),g.jsxs("div",{className:"space-y-1",children:[g.jsx("div",{className:"text-xs text-white/40 uppercase tracking-wide",children:"Proposed"}),g.jsx("textarea",{className:"field-mono min-h-[120px] resize-y text-sm",value:s.proposedBody,readOnly:!0})]})]}),h&&g.jsxs("div",{className:"flex gap-2 flex-wrap",children:[g.jsx("button",{type:"button",disabled:a,onClick:()=>r(()=>Mb(n.id)),className:"btn-gold px-4 py-2 disabled:opacity-40",children:"Apply to playbook"}),g.jsx("button",{type:"button",disabled:a,onClick:()=>r(()=>Ob(n.id)),className:"btn-ghost px-4 py-2 disabled:opacity-40",children:"Dismiss"})]}),p&&g.jsxs("p",{className:"text-sm text-[#92E4DD]/80",children:["Applied to playbook",s.appliedAt?` · ${new Date(s.appliedAt).toLocaleString()}`:""]}),m&&g.jsx("p",{className:"text-sm text-white/40",children:"Dismissed — playbook unchanged"})]})}function aE({run:n}){const[l,a]=Q.useState([]),[r,s]=Q.useState(null),[c,f]=Q.useState(null),[h,p]=Q.useState(!1),m=Q.useCallback(async()=>{const O=await Wi(n.id);a(O.artifacts),s(O.usageSummary??null),f(O.traceSummary??null)},[n.id]),b=async O=>{p(!0);try{await O(),await m()}catch(q){alert(String(q))}finally{p(!1)}},y=wy(l,"execution_result","execute"),k=el(l,"document"),v=k?ea(k):null,E=l.find(O=>O.kind==="approved_plan");return Q.useEffect(()=>{m().catch(console.error)},[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:os(n)})]}),E&&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--short",children:g.jsx(xs,{source:Xu(E)})})]}),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})]}),y&&g.jsx(Ux,{execResult:y}),g.jsx(Hx,{run:n,artifacts:l,busy:h,act:b}),r&&g.jsx(ds,{summary:r}),c&&g.jsx(fs,{trace:c})]})}function yr(){return{maxTurns:"",maxBudgetUsd:""}}function qx(n){return{maxTurns:(n==null?void 0:n.maxTurns)!=null?String(n.maxTurns):"",maxBudgetUsd:(n==null?void 0:n.maxBudgetUsd)!=null?String(n.maxBudgetUsd):""}}function Dl(n){const l=n.maxTurns.trim()?Number(n.maxTurns):null,a=n.maxBudgetUsd.trim()?Number(n.maxBudgetUsd):null;return l==null&&a==null||l!=null&&(!Number.isFinite(l)||l<=0)||a!=null&&(!Number.isFinite(a)||a<=0)?null:{maxTurns:l,maxBudgetUsd:a}}function Af(n,l){const a=pv(n);return qx(a[l])}function xr(n){return qx(mv(n))}function rE({run:n,agents:l,onRefresh:a}){const[r,s]=Q.useState([]),[c,f]=Q.useState(null),[h,p]=Q.useState(null),[m,b]=Q.useState(""),[y,k]=Q.useState(""),[v,E]=Q.useState(yr()),[O,q]=Q.useState(!1),j=l.find(P=>P.id===n.agentId),Z=n.runtime??(j==null?void 0:j.runtime)??"claude_code",H=Q.useCallback(async()=>{const P=await Wi(n.id);s(P.artifacts),f(P.usageSummary??null),p(P.traceSummary??null)},[n.id]),le=n.status==="running",ee=n.status==="plan_approved";Q.useEffect(()=>{H().catch(console.error)},[H]),Q.useEffect(()=>{k(n.executeModel??"");const P=Af(n.budgetJson,"execute");E(P.maxTurns||P.maxBudgetUsd?P:xr(j==null?void 0:j.defaultExecuteBudgetJson))},[n.id,n.executeModel,n.budgetJson,j==null?void 0:j.defaultExecuteBudgetJson]),Q.useEffect(()=>{if(!le&&!ee)return;const P=setInterval(()=>H().catch(console.error),3e3);return()=>clearInterval(P)},[le,ee,H]),Q.useEffect(()=>{le&&qb(n.id,"stream_trace").then(b).catch(()=>b(""))},[le,n.id,r.length]);const D=async P=>{q(!0);try{await P(),await H(),a()}catch(ce){alert(String(ce))}finally{q(!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:os(n)}),ee&&g.jsx("p",{className:"text-sm text-[#92E4DD]",children:"Approved — waiting for execution slot…"}),le&&g.jsx("p",{className:"text-sm text-[#92E4DD] animate-pulse",children:"Executing…"})]}),ee&&g.jsxs(g.Fragment,{children:[g.jsx(mr,{phase:"Execution",runtime:Z,model:y,onModelChange:k,budget:v,onBudgetChange:E,defaultModelId:j==null?void 0:j.defaultExecuteModel,disabled:O}),g.jsx("button",{type:"button",disabled:O,onClick:()=>D(()=>jb(n.id,y||null,Dl(v))),className:"btn-ghost px-3 py-2 w-full",children:"Run now (skip queue wait)"})]}),h&&g.jsx(fs,{trace:h}),c&&g.jsx(ds,{summary:c}),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})]}),(le||ee)&&g.jsx("button",{type:"button",disabled:O,onClick:()=>D(()=>zf(n.id)),className:"btn-ghost-danger w-full py-2",children:"Cancel run"})]})}function Vx({busy:n,onRemoved:l}){const a=()=>{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:n,onClick:a,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 uE({run:n,agents:l,onRefresh:a,onApproved:r,onApprovedAndNext:s}){const[c,f]=Q.useState([]),[h,p]=Q.useState(null),[m,b]=Q.useState(null),[y,k]=Q.useState(""),[v,E]=Q.useState(""),[O,q]=Q.useState(""),[j,Z]=Q.useState(yr()),[H,le]=Q.useState(yr()),[ee,D]=Q.useState(!1),[P,ce]=Q.useState(!1),[fe,M]=Q.useState(!1),U=l.find(de=>de.id===n.agentId),J=n.runtime??(U==null?void 0:U.runtime)??"claude_code",pe=Q.useCallback(async()=>{const de=await Wi(n.id);f(de.artifacts),p(de.usageSummary??null),b(de.traceSummary??null);const _=el(de.artifacts,"approved_plan"),A=el(de.artifacts,"draft_plan"),I=_??A;I&&k(Xu(I))},[n.id]),re=c.some(de=>de.kind==="draft_plan"),T=n.status==="plan_pending"&&!re||P;Q.useEffect(()=>{pe().catch(console.error)},[pe]),Q.useEffect(()=>{E(n.planModel??""),q(n.executeModel??"");const de=Af(n.budgetJson,"plan"),_=Af(n.budgetJson,"execute");Z(de.maxTurns||de.maxBudgetUsd?de:xr(U==null?void 0:U.defaultPlanBudgetJson)),le(_.maxTurns||_.maxBudgetUsd?_:xr(U==null?void 0:U.defaultExecuteBudgetJson)),ce(!1),M(!1)},[n.id,n.planModel,n.executeModel,n.budgetJson,U==null?void 0:U.defaultPlanBudgetJson,U==null?void 0:U.defaultExecuteBudgetJson]),Q.useEffect(()=>{if(!T)return;const de=setInterval(()=>{pe().catch(console.error),a()},3e3);return()=>clearInterval(de)},[T,pe,a]);const $=async()=>{var _;const de=(_=el(c,"draft_plan"))==null?void 0:_.createdAt;ce(!0),D(!0);try{await Tb(n.id,v||null,Dl(j));const A=Date.now()+12e4;for(;Date.now()<A;){const I=await Wi(n.id);f(I.artifacts);const w=el(I.artifacts,"draft_plan");if(w&&w.createdAt!==de){k(Xu(w));break}await new Promise(ae=>setTimeout(ae,2e3))}a()}catch(A){alert(String(A))}finally{ce(!1),D(!1)}},ue=async de=>{D(!0);try{await de(),await pe(),a()}catch(_){alert(String(_))}finally{D(!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:os(n)})]}),g.jsxs("section",{className:"space-y-2",children:[g.jsx("div",{className:"heading-section",children:"Plan"}),T&&g.jsx("p",{className:"text-sm text-[#92E4DD] animate-pulse",children:P?"Agent is replanning…":"Agent is writing the plan…"}),g.jsx(mr,{phase:"Plan",runtime:J,model:v,onModelChange:E,budget:j,onBudgetChange:Z,defaultModelId:U==null?void 0:U.defaultPlanModel,disabled:ee||T}),T?g.jsx("div",{className:"field-mono min-h-[min(420px,45vh)] flex items-center justify-center text-sm text-white/40",children:"Plan will appear here when the agent finishes…"}):fe||!y.trim()?g.jsx("textarea",{className:"field-mono min-h-[min(420px,45vh)] resize-y leading-relaxed",value:y,onChange:de=>k(de.target.value),placeholder:"Edit if needed, then approve"}):g.jsx("div",{className:"markdown-body-panel",children:g.jsx(xs,{source:y})}),re&&!T&&g.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2 -mt-1",children:[g.jsxs("div",{className:"flex flex-wrap gap-2",children:[g.jsx("button",{type:"button",disabled:ee,onClick:()=>M(de=>!de),className:"btn-ghost text-xs px-2 py-1 disabled:opacity-40",children:fe?"Show preview":"Edit markdown"}),fe&&g.jsx("button",{type:"button",disabled:ee||!y.trim(),onClick:()=>ue(()=>og(n.id,y,!1)),className:"btn-ghost text-xs px-2 py-1 disabled:opacity-40",children:"Save edits"})]}),g.jsx("button",{type:"button",disabled:ee,onClick:()=>$(),className:"btn-ghost text-xs px-2 py-1 disabled:opacity-40",children:"Ask agent to replan"})]}),re&&!T&&g.jsxs("section",{className:"space-y-2 pt-3 border-t border-white/10",children:[g.jsx("div",{className:"heading-section",children:"Your Decision"}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(mr,{phase:"Execution",runtime:J,model:O,onModelChange:q,budget:H,onBudgetChange:le,defaultModelId:U==null?void 0:U.defaultExecuteModel,disabled:ee}),g.jsx("button",{type:"button",disabled:ee||!y.trim(),onClick:()=>ue(async()=>{await og(n.id,y,!0,{planModel:v||null,executeModel:O||null,planBudget:Dl(j),executeBudget:Dl(H)}),r==null||r(),s==null||s()}),className:"btn-gold px-5 py-2 disabled:opacity-40 w-full sm:w-auto",children:"Approve & next →"})]})]})]}),m&&g.jsx(fs,{trace:m}),h&&g.jsx(ds,{summary:h}),g.jsx(Vx,{busy:ee,onRemoved:()=>ue(async()=>{await zf(n.id),s==null||s()})})]})}function sE({run:n,agents:l,onRefresh:a,onRetry:r,onDoneAndNext:s}){var re;const[c,f]=Q.useState([]),[h,p]=Q.useState(null),[m,b]=Q.useState(null),[y,k]=Q.useState(""),[v,E]=Q.useState(""),[O,q]=Q.useState(!1),[j,Z]=Q.useState(!1),H=l.find(W=>W.id===n.agentId),le=n.runtime??(H==null?void 0:H.runtime)??"claude_code",ee=Q.useCallback(async()=>{const W=await Wi(n.id);f(W.artifacts),p(W.usageSummary??null),b(W.traceSummary??null)},[n.id]),D=wy(c,"execution_result","execute"),P=el(c,"document"),ce=P?ea(P):null,fe=c.find(W=>W.kind==="approved_plan"),M=nE(D),U=!!y.trim();Q.useEffect(()=>{ee().catch(console.error)},[ee]);const J=c.some(W=>{if(W.kind!=="reflect_status"||!W.contentJson)return!1;try{return JSON.parse(W.contentJson).status==="pending"}catch{return!1}});Q.useEffect(()=>{if(!J)return;const W=setInterval(()=>{ee().catch(console.error)},3e3);return()=>clearInterval(W)},[J,ee]),Q.useEffect(()=>{Z(!1),k(""),E("")},[n.id]),Q.useEffect(()=>{var T;if(j||!M)return;const W=(T=D==null?void 0:D.blocker)==null?void 0:T.summary;W&&(k(`Please resolve: ${W}`),Z(!0))},[j,M,(re=D==null?void 0:D.blocker)==null?void 0:re.summary]);const pe=async W=>{q(!0);try{await W(),await ee(),a()}catch(T){alert(String(T))}finally{q(!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:os(n)}),M&&g.jsx("p",{className:"text-sm text-red-400/90",children:"Blocked — resolve the issue below, then retry"}),n.status==="failed"&&!M&&g.jsx("p",{className:"text-sm text-red-400/90",children:"Execution failed — retry with new instructions"})]}),ce&&!M&&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:ce.path}),g.jsx("textarea",{className:"field-mono min-h-[160px] resize-y",value:ce.markdown,readOnly:!0})]}),D&&g.jsx(Ux,{execResult:D}),fe&&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--short",children:g.jsx(xs,{source:Xu(fe)})})]}),m&&g.jsx(fs,{trace:m}),h&&g.jsx(ds,{summary:h}),g.jsx(Hx,{run:n,artifacts:c,busy:O,act:pe}),g.jsxs("section",{className:"space-y-4",children:[g.jsx("div",{className:"heading-section",children:"Your Decision"}),n.status==="review"&&!M&&g.jsxs("div",{className:"space-y-2",children:[g.jsx("p",{className:"text-sm text-white/45",children:"Looks good? Accept and move on."}),g.jsx("button",{type:"button",disabled:O||!!y.trim(),title:y.trim()?"Clear retry instructions below to mark done":void 0,onClick:()=>pe(async()=>{await zb(n.id),s==null||s()}),className:"btn-gold w-full py-2 disabled:opacity-40",children:"Mark done & next →"}),y.trim()&&g.jsx("p",{className:"text-xs text-white/40",children:"Clear the retry field below to accept this result."})]}),n.status==="review"&&!M&&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:[(M||n.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-${n.id}`,className:"text-xs text-white/40 uppercase tracking-wide",children:"Retry instructions"}),g.jsx("textarea",{id:`retry-${n.id}`,className:"field-mono min-h-[min(140px,22vh)] resize-y leading-relaxed",placeholder:M?"What to change after fixing the blocker":"What should the agent do differently?",value:y,onChange:W=>k(W.target.value)}),g.jsx(cs,{runtime:le,label:"Execution model (retry)",value:v,onChange:E,defaultModelId:H==null?void 0:H.defaultExecuteModel,disabled:O}),g.jsx("button",{type:"button",disabled:O||!U,onClick:()=>pe(async()=>{const W=await Db(n.id,y,v||null);k(""),r==null||r(W)}),className:`w-full py-2 ${U?"btn-retry-ready":"btn-retry"}`,children:"Retry with new instructions"})]}),g.jsx(Vx,{busy:O,onRemoved:()=>pe(async()=>{await zf(n.id),s==null||s()})})]})]})}function ed({onClose:n,header:l,children:a,onKeyDown:r}){return Q.useEffect(()=>{const s=c=>{if(c.key==="Escape"){c.preventDefault(),n();return}r==null||r(c)};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[n,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:n,"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:a})]})]})}function cE({run:n,agents:l,onClose:a,onRefresh:r,onApproved:s,onApprovedAndNext:c,onDoneAndNext:f,onRetry:h,queueNav:p}){const[m,b]=Q.useState(null),y=Ey(n.status),k=Mf(n);Q.useEffect(()=>{if(n.source!=="linear"){b(null);return}Wi(n.id).then(E=>b(Vb(E.artifacts))).catch(()=>b(null))},[n.id,n.source]);const v=Q.useCallback(E=>{p&&(E.key==="ArrowLeft"&&p.index>0&&(E.preventDefault(),p.onPrev()),E.key==="ArrowRight"&&p.index<p.runs.length-1&&(E.preventDefault(),p.onNext()))},[p]);return g.jsxs(ed,{onClose:a,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:[n.source==="linear"&&m?g.jsx("a",{href:m,target:"_blank",rel:"noreferrer",className:"inline-flex",title:"Open in Linear",children:g.jsxs(ut,{className:"bg-[#5E6AD2]/15 text-[#AEB4FF] border-[#5E6AD2]/35 hover:bg-[#5E6AD2]/25 transition-colors",children:[Ju(n)," ↗"]})}):g.jsx(ut,{className:"bg-[#5E6AD2]/15 text-[#AEB4FF] border-[#5E6AD2]/35",children:Ju(n)}),g.jsx(ut,{className:"bg-white/5 text-white/45 border-white/10 normal-case",children:Df(n.taskCategory)}),g.jsx(ut,{className:us(n.runtime),children:ii(n.runtime)}),k&&g.jsxs(ut,{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:n.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(ut,{className:y.tone,children:y.label}),g.jsxs("span",{title:new Date(n.updatedAt).toLocaleString(),children:["Updated ",Ku(n.updatedAt)]})]})]}),g.jsxs("div",{className:"flex items-start gap-2 shrink-0",children:[p&&g.jsx(Cy,{index:p.index,total:p.runs.length,onPrev:p.onPrev,onNext:p.onNext}),g.jsx("button",{type:"button",onClick:a,className:"text-white/60 hover:text-white px-1","aria-label":"Close",children:"✕"})]})]}),children:[(n.status==="plan_pending"||n.status==="queued")&&g.jsx(uE,{run:n,agents:l,onRefresh:r,onApproved:s,onApprovedAndNext:c}),(n.status==="plan_approved"||n.status==="running")&&g.jsx(rE,{run:n,agents:l,onRefresh:r}),(n.status==="review"||n.status==="failed")&&g.jsx(sE,{run:n,agents:l,onRefresh:r,onRetry:h,onDoneAndNext:f}),n.status==="done"&&g.jsx(aE,{run:n}),n.status==="cancelled"&&g.jsx("p",{className:"text-sm text-white/50",children:"This task was removed from Operations."})]})}function gy(n,l){const a=n.find(s=>s.runtime===l);if(!a)return{ok:!1,detail:"no agent"};const r=a.issues.find(s=>s.code==="cli_missing"||s.code==="runtime_auth");return r?{ok:!1,detail:r.message}:{ok:!0,detail:"CLI ready"}}function uf({ok:n}){return g.jsx("span",{className:`inline-block w-1.5 h-1.5 rounded-full shrink-0 ${n?"bg-emerald-400":"bg-amber-400"}`,"aria-hidden":!0})}function oE({agents:n,agentDeckOnline:l}){const[a,r]=Q.useState(null);Q.useEffect(()=>{Lb().then(h=>r(h.mcpUrl)).catch(()=>r(null))},[l]);const s=gy(n,"claude_code"),c=gy(n,"cursor_local"),f=n.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(uf,{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:c.detail,children:[g.jsx(uf,{ok:c.ok}),g.jsx("span",{className:c.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)??(a?`MCP ${a}`:"Agent Deck optional"),children:[g.jsx(uf,{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 Yx="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",Zx="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 Ix({src:n,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:n,alt:"",className:"h-[70%] w-[70%] object-contain",draggable:!1})})}function fE({className:n="h-8 w-8"}){return g.jsx(Ix,{src:Yx,className:n})}function dE({className:n="h-8 w-8"}){return g.jsx(Ix,{src:Zx,className:n})}function hE({className:n="h-8 w-8"}){return g.jsxs("svg",{viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:n,"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 Fx({runtime:n,className:l="h-3.5 w-3.5 shrink-0"}){return n==="claude_code"?g.jsx("img",{src:Yx,alt:"",className:`object-contain ${l}`,draggable:!1}):n==="cursor_local"?g.jsx("img",{src:Zx,alt:"",className:`object-contain ${l}`,draggable:!1}):null}function Qx({runtime:n,className:l="h-8 w-8 shrink-0"}){return n==="claude_code"?g.jsx(fE,{className:l}):n==="cursor_local"?g.jsx(dE,{className:l}):g.jsx(hE,{className:l})}const Fu=()=>({runtime:"claude_code",deckId:"",playbookId:"",defaultPlanModel:"",defaultExecuteModel:"",defaultPlanBudget:yr(),defaultExecuteBudget:yr()});function mE({agents:n,agentDeckOnline:l,onRefresh:a}){const[r,s]=Q.useState(!1),[c,f]=Q.useState(""),[h,p]=Q.useState(""),[m,b]=Q.useState(Fu()),[y,k]=Q.useState(!1),[v,E]=Q.useState(null),[O,q]=Q.useState(""),[j,Z]=Q.useState(""),[H,le]=Q.useState(Fu()),ee=async U=>{if(U.preventDefault(),!(!c.trim()||!h.trim())){k(!0);try{const J={name:c.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:Dl(m.defaultPlanBudget),defaultExecuteBudget:Dl(m.defaultExecuteBudget)};await Eb(J),f(""),p(""),b(Fu()),s(!1),a()}catch(J){alert(String(J))}finally{k(!1)}}},D=U=>{E(U.id),q(U.name),Z(U.workspaceRoot??""),le({runtime:U.runtime,deckId:U.deckId??"",playbookId:U.playbookId??"",defaultPlanModel:U.defaultPlanModel??"",defaultExecuteModel:U.defaultExecuteModel??"",defaultPlanBudget:xr(U.defaultPlanBudgetJson),defaultExecuteBudget:xr(U.defaultExecuteBudgetJson)})},P=()=>{E(null),le(Fu())},ce=async U=>{k(!0);try{const J={name:O.trim(),workspaceRoot:j.trim()||null,runtime:H.runtime,deckId:H.deckId||null,playbookId:H.playbookId||null,defaultPlanModel:H.defaultPlanModel||null,defaultExecuteModel:H.defaultExecuteModel||null,defaultPlanBudget:Dl(H.defaultPlanBudget),defaultExecuteBudget:Dl(H.defaultExecuteBudget)};await Cb(U.id,J),P(),a()}catch(J){alert(String(J))}finally{k(!1)}},fe=async U=>{if(confirm(`Delete agent "${U.name}"?`)){k(!0);try{await Ab(U.id),a()}catch(J){alert(String(J))}finally{k(!1)}}},M=n.filter(U=>!U.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:[n.length," agent",n.length===1?"":"s",M>0&&g.jsxs("span",{className:"text-red-400 ml-2",children:["· ",M," need",M===1?"s":""," attention"]})]})]}),g.jsx(oE,{agents:n,agentDeckOnline:l})]}),g.jsx("div",{className:"space-y-3 mb-6",children:n.map(U=>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(Qx,{runtime:U.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:U.name}),!U.healthy&&g.jsx(ut,{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(ut,{className:"bg-white/5 text-white/55 border-white/15 normal-case",children:ii(U.runtime)}),U.deckName?g.jsxs(ut,{className:"bg-[#92E4DD]/10 text-[#92E4DD] border-[#92E4DD]/25 normal-case",children:["◆ ",U.deckName]}):g.jsx(ut,{className:"bg-white/5 text-white/40 border-white/10 normal-case",children:"No deck"}),U.defaultPlanModel&&g.jsxs(ut,{className:"bg-white/5 text-white/50 border-white/10 normal-case truncate max-w-[10rem]",title:U.defaultPlanModel,children:["plan: ",U.defaultPlanModel]}),U.defaultExecuteModel&&g.jsxs(ut,{className:"bg-white/5 text-white/50 border-white/10 normal-case truncate max-w-[10rem]",title:U.defaultExecuteModel,children:["exec: ",U.defaultExecuteModel]})]}),v===U.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:O,onChange:J=>q(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:j,onChange:J=>Z(J.target.value)})]}),g.jsx(Cg,{value:H,onChange:le,agentDeckOnline:l}),g.jsxs("div",{className:"flex gap-2 pt-1",children:[g.jsx("button",{type:"button",disabled:y||!O.trim()||!j.trim(),onClick:()=>ce(U),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:U.workspaceRoot??void 0,children:U.workspaceRoot?U.workspaceRoot:"No workspace configured"}),U.issues.length>0&&g.jsx("ul",{className:"text-sm text-red-300/90 space-y-1",children:U.issues.map((J,pe)=>g.jsxs("li",{children:["· ",J.message]},pe))})]})]}),g.jsxs("div",{className:"flex gap-2 shrink-0",children:[v!==U.id&&g.jsx("button",{type:"button",disabled:y,onClick:()=>D(U),className:"btn-ghost text-sm px-3 py-1.5",children:"Edit"}),g.jsx("button",{type:"button",disabled:y,onClick:()=>fe(U),className:"btn-ghost text-sm px-3 py-1.5",children:"Delete"})]})]},U.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:c,onChange:U=>f(U.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:U=>p(U.target.value)})]}),g.jsx(Cg,{value:m,onChange:b,agentDeckOnline:l}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx("button",{type:"submit",disabled:y||!c.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 pE({run:n,selected:l,onSelect:a}){const r=Mf(n),s=n.updatedAt;return g.jsx("button",{type:"button",onClick:a,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(ut,{className:n.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:Ju(n)}),g.jsx("time",{className:"text-xs text-white/40 tabular-nums md:hidden ml-auto shrink-0",title:new Date(s).toLocaleString(),children:Ku(s)})]}),g.jsxs("div",{className:"min-w-0 md:col-start-2",children:[g.jsx("p",{className:"font-semibold text-[#E8F6F4] leading-snug truncate",title:n.title,children:n.title}),n.description&&g.jsx("p",{className:"text-xs text-white/40 truncate mt-0.5",title:n.description,children:n.description})]}),g.jsx("div",{className:"hidden md:flex items-center min-w-0",children:g.jsxs(ut,{className:`${us(n.runtime)} normal-case truncate max-w-full`,title:n.agentName??ii(n.runtime),children:[n.runtime&&g.jsx(Fx,{runtime:n.runtime,className:"h-3 w-3"}),g.jsx("span",{className:"truncate",children:n.agentName??ii(n.runtime)})]})}),g.jsx("span",{className:"hidden md:block text-xs text-white/45 uppercase tracking-wide",children:Df(n.taskCategory)}),g.jsx("span",{className:"hidden md:block text-xs text-[#92E4DD]/80 truncate",title:r??void 0,children:r?`◆ ${r}`:"—"}),g.jsx("time",{className:"hidden md:block text-xs text-white/40 tabular-nums text-right",title:new Date(s).toLocaleString(),children:Ku(s)})]})})}function gE({runs:n,selectedRunId:l,onSelectRun:a}){const[r,s]=Q.useState(""),c=Q.useMemo(()=>n.filter(h=>h.status==="done").sort((h,p)=>p.updatedAt.localeCompare(h.updatedAt)),[n]),f=Q.useMemo(()=>{const h=r.trim().toLowerCase();return h?c.filter(p=>{var m,b,y,k;return p.title.toLowerCase().includes(h)||((m=p.externalLabel)==null?void 0:m.toLowerCase().includes(h))||((b=p.externalId)==null?void 0:b.toLowerCase().includes(h))||p.source.toLowerCase().includes(h)||p.taskCategory.toLowerCase().includes(h)||((y=p.deckName)==null?void 0:y.toLowerCase().includes(h))||((k=p.agentName)==null?void 0:k.toLowerCase().includes(h))}):c},[c,r]);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:r,onChange:h=>s(h.target.value)}),g.jsxs("p",{className:"text-sm text-white/45 mt-2",children:[f.length," of ",c.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:[f.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"})]}),f.length===0?g.jsx("p",{className:"text-sm text-white/45 py-8 text-center",children:c.length===0?"No completed runs yet":"No matches for your search"}):f.map(h=>g.jsx(pE,{run:h,selected:l===h.id,onSelect:()=>a(h)},h.id))]})})]})}function yE({candidate:n,selected:l,onSelect:a}){return g.jsx("button",{type:"button",onClick:a,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(ut,{className:"bg-[#5E6AD2]/15 text-[#AEB4FF] border-[#5E6AD2]/35",children:n.identifier}),n.state&&g.jsx("span",{className:"text-xs text-white/45 uppercase tracking-wide",children:n.state})]}),g.jsx("h3",{className:"text-lg font-semibold text-[#E8F6F4] leading-snug line-clamp-2",children:n.title}),n.description&&g.jsx("p",{className:"text-sm text-white/45 line-clamp-2 leading-relaxed",children:n.description})]})})}function yy({title:n,subtitle:l,onClose:a,children:r}){return g.jsx(ed,{onClose:a,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:n}),l&&g.jsx("p",{className:"text-sm text-white/55 leading-snug",children:l})]}),g.jsx("button",{type:"button",onClick:a,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 Gx({className:n="w-3.5 h-3.5"}){return g.jsx("svg",{viewBox:"0 0 16 16",fill:"currentColor",className:n,"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 Xx({agents:n,selectedId:l,onSelect:a,onManage:r,requireHealthy:s}){return n.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:n.map(c=>{var p;const f=c.id===l,h=s&&!c.healthy;return g.jsx("button",{type:"button",disabled:h,onClick:()=>a(c.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(Qx,{runtime:c.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:c.name}),!c.healthy&&g.jsx("span",{title:c.issues.map(m=>m.message).join("; "),children:g.jsx(Gx,{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(ut,{className:us(c.runtime),children:ii(c.runtime)}),c.deckName&&g.jsxs(ut,{className:"bg-[#92E4DD]/10 text-[#92E4DD] border-[#92E4DD]/25 normal-case",children:["◆ ",c.deckName]})]}),!c.healthy&&g.jsx("p",{className:"text-xs text-red-300/90 mt-2 leading-snug",children:(p=c.issues[0])==null?void 0:p.message})]})]})},c.id)})})]})}function xE({issue:n,agents:l,onPromoted:a,onManageAgents:r}){const[s,c]=Q.useState(""),[f,h]=Q.useState(""),[p,m]=Q.useState(!1);Q.useEffect(()=>{jf().then(k=>{k.defaultAgentId&&c(k.defaultAgentId)}).catch(()=>{})},[]),Q.useEffect(()=>{l.length>0&&s&&!l.some(k=>k.id===s)&&c(l[0].id),l.length>0&&!s&&c(l[0].id)},[l,s]),Q.useEffect(()=>{h("")},[n.id,s]);const b=l.find(k=>k.id===s),y=async()=>{if(s){m(!0);try{await _b(n.id,{agentId:s,planModel:f||null}),a()}catch(k){alert(String(k))}finally{m(!1)}}};return g.jsxs(g.Fragment,{children:[n.description&&g.jsx("div",{className:"rounded-xl p-4 glass-plate font-mono text-sm text-white/70 leading-relaxed whitespace-pre-wrap",children:n.description}),n.url&&g.jsx("a",{href:n.url,target:"_blank",rel:"noreferrer",className:"text-sm text-[#AEB4FF] hover:underline inline-block",children:"Open in Linear ↗"}),g.jsx(Xx,{agents:l,selectedId:s,onSelect:c,onManage:r,requireHealthy:!0}),b&&g.jsx(cs,{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 bE({issue:n,agents:l,onClose:a,onPromoted:r,onManageAgents:s,queueNav:c}){const f=Q.useCallback(h=>{c&&(h.key==="ArrowLeft"&&c.index>0&&(h.preventDefault(),c.onPrev()),h.key==="ArrowRight"&&c.index<c.total-1&&(h.preventDefault(),c.onNext()))},[c]);return g.jsx(ed,{onClose:a,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:n.identifier}),g.jsx("p",{className:"text-sm text-white/55 leading-snug",children:n.title})]}),g.jsxs("div",{className:"flex items-start gap-2 shrink-0",children:[c&&g.jsx(Cy,{index:c.index,total:c.total,onPrev:c.onPrev,onNext:c.onNext,label:"In Inbox"}),g.jsx("button",{type:"button",onClick:a,className:"text-white/60 hover:text-white px-1","aria-label":"Close",children:"✕"})]})]}),children:g.jsx(xE,{issue:n,agents:l,onPromoted:r,onManageAgents:s})})}function vE({agents:n,onSaved:l}){const[a,r]=Q.useState(!1),[s,c]=Q.useState(null),[f,h]=Q.useState(null),[p,m]=Q.useState(null),[b,y]=Q.useState(null),[k,v]=Q.useState("Todo"),[E,O]=Q.useState(""),[q,j]=Q.useState(!0),[Z,H]=Q.useState(""),[le,ee]=Q.useState(!0),[D,P]=Q.useState(!1),[ce,fe]=Q.useState(null),M=s==null?void 0:s.envOverrides,U=!!(M!=null&&M.stateFilter||M!=null&&M.teamId),J=async()=>{var T;try{const[$,ue]=await Promise.all([Gu(),jf()]);h($.connected),m(((T=$.viewer)==null?void 0:T.name)??null),y($.error??null),c(ue),v(ue.persisted.stateFilter.join(", ")),O(ue.persisted.teamId??""),j(ue.persisted.assigneeMe),H(ue.persisted.defaultAgentId??""),ee(ue.persisted.syncEnabled)}catch($){y(String($))}};Q.useEffect(()=>{a&&J()},[a]);const pe=async()=>{var T;P(!0),fe(null);try{const $=await Gu();h($.connected),m(((T=$.viewer)==null?void 0:T.name)??null),y($.error??null),fe($.connected?"Connected":"Not connected")}catch($){y(String($))}finally{P(!1)}},re=async()=>{P(!0),fe(null);try{const T=k.split(",").map(ue=>ue.trim()).filter(Boolean),$=await wb({stateFilter:T.length>0?T:["Todo"],teamId:E.trim()||null,assigneeMe:q,defaultAgentId:Z||null,syncEnabled:le});c($),fe(U?"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:a?"▾":"▸"})]})]}),a&&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)}…`:""]}),U&&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:E,onChange:T=>O(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:q,onChange:T=>j(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:le,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=>H(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"}),n.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:re,disabled:D,className:"btn-gold px-3 py-1.5 flex-1",children:D?"Saving…":"Save"}),g.jsx("button",{type:"button",onClick:pe,disabled:D,className:"btn-ghost px-3 py-1.5",children:"Test"})]}),ce&&g.jsx("p",{className:"text-xs text-white/50",children:ce})]})]})}function kE({agents:n,loading:l,candidateCount:a,onRefresh:r,onConfigSaved:s}){var h;const[c,f]=Q.useState(null);return Q.useEffect(()=>{Gu().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"}),c!=null&&c.connected?g.jsxs("span",{className:"text-xs text-emerald-300/90",children:["Connected · ",(h=c.viewer)==null?void 0:h.name]}):g.jsx("span",{className:"text-xs text-amber-200/90",children:(c==null?void 0:c.error)??"Not connected"})]}),g.jsx("p",{className:"text-sm text-white/45",children:l?"Fetching from Linear…":a===0?"No matching issues — adjust filters below or create issues in Linear.":`${a} issue${a===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(vE,{agents:n,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 SE({agents:n,onCreated:l,onManageAgents:a,embedded:r}){const[s,c]=Q.useState(""),[f,h]=Q.useState(""),[p,m]=Q.useState("other"),[b,y]=Q.useState(""),[k,v]=Q.useState(gv),[E,O]=Q.useState(""),[q,j]=Q.useState(!1);Q.useEffect(()=>{n.length>0&&!n.some(ee=>ee.id===k)&&v(n[0].id)},[n,k]),Q.useEffect(()=>{const ee=n.find(D=>D.id===k);if(!ee){O("");return}O(ee.defaultPlanModel??(ee.runtime==="cursor_local"?ns:""))},[k,n]);const Z=n.find(ee=>ee.id===k),H=!!k&&!!s.trim()&&(!!b.trim()||((Z==null?void 0:Z.healthy)??!1)),le=async ee=>{if(ee.preventDefault(),!(!s.trim()||!k)){j(!0);try{await Nb({title:s.trim(),description:f.trim()||void 0,taskCategory:p,repo:b.trim()||void 0,agentId:k,planModel:E||null}),c(""),h(""),l()}catch(D){alert(String(D))}finally{j(!1)}}};return g.jsxs("form",{onSubmit:le,className:r?"space-y-3":"panel space-y-3",children:[!r&&g.jsx("h2",{className:"heading-panel",children:"Manual Task"}),g.jsx(Xx,{agents:n,selectedId:k,onSelect:v,onManage:a}),Z&&g.jsx(cs,{runtime:Z.runtime,label:"Planning model",value:E,onChange:O,defaultModelId:Z.defaultPlanModel,disabled:q}),g.jsx("input",{className:"field",placeholder:"Title",value:s,onChange:ee=>c(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:q||!H,className:"btn-gold w-full py-2",children:q?"Starting…":"Kick plan"})]})}const wE=["plan_pending","queued"],_E=["review","failed"];function xy(n,l,a){return wE.includes(n.status)?l.awaitingPlanReview:_E.includes(n.status)?l.resultReviewRuns:n.status==="done"&&a==="done"?l.runs.filter(r=>r.status==="done").sort((r,s)=>s.updatedAt.localeCompare(r.updatedAt)):[]}function td(n,l){return n.findIndex(a=>a.id===l)}function Nf(n,l){const a=td(n,l);if(a<0)return n[0]??null;const r=n.filter(s=>s.id!==l);return r.length===0?null:r[Math.min(a,r.length-1)]??null}function EE({agents:n,onRefresh:l,onGoOperations:a,onManageAgents:r}){const[s,c]=Q.useState([]),[f,h]=Q.useState(!1),[p,m]=Q.useState(null),[b,y]=Q.useState(null),[k,v]=Q.useState(null),[E,O]=Q.useState(null),[q,j]=Q.useState(!1),Z=Q.useCallback(()=>(h(!0),m(null),Promise.all([Sb(),jf(),Gu()]).then(([J,pe,re])=>(c(J),O(pe),j(re.connected),J)).catch(J=>(m(String(J)),c([]),[])).finally(()=>h(!1))),[]);Q.useEffect(()=>{Z()},[Z]);const H=s.find(J=>J.id===b)??null,le=b?td(s,b):-1,ee=Q.useCallback(J=>{const pe=s[J];pe&&(y(pe.id),v("issue"))},[s]),D=Q.useCallback(async J=>{const pe=Nf(s,J);l();const re=await Z();if(!pe){v(null),y(null);return}const W=re.find($=>$.id===pe.id);if(W){y(W.id),v("issue");return}const T=Nf(re,J);T?(y(T.id),v("issue")):(v(null),y(null))},[s,l,Z]),P=()=>{l(),v(null),y(null),Z(),a()},ce=()=>{v("import"),Z()},fe=()=>{y(null),v("manual")},M=J=>{y(J),v("issue")},U=()=>{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:ce,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"}),q&&E&&g.jsxs("p",{className:"text-xs text-white/40 max-w-md mx-auto",children:["Filtering Linear: ",E.stateFilter.join(", "),E.assigneeMe?" · assigned to you":"",E.envOverrides.stateFilter||E.envOverrides.teamId?" · some filters from env":""]}),g.jsxs("div",{className:"flex justify-center gap-2",children:[g.jsx("button",{type:"button",onClick:ce,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(yE,{candidate:J,selected:b===J.id&&k==="issue",onSelect:()=>M(J.id)},J.id))})]}),k==="import"&&g.jsx(yy,{title:"Linear Import",subtitle:"Fetch issues assigned to you",onClose:U,children:g.jsx(kE,{agents:n,loading:f,candidateCount:s.length,onRefresh:Z,onConfigSaved:Z})}),k==="manual"&&g.jsx(yy,{title:"Manual Task",subtitle:"Add work that isn't in Linear yet",onClose:U,children:g.jsx(SE,{agents:n,onCreated:P,onManageAgents:r,embedded:!0})}),k==="issue"&&H&&g.jsx(bE,{issue:H,agents:n,onClose:U,onPromoted:()=>D(H.id),onManageAgents:r,queueNav:s.length>1?{index:le,total:s.length,onPrev:()=>ee(le-1),onNext:()=>ee(le+1)}:void 0})]})}const CE=3;function AE(n){const l=Number.isFinite(n)?n:0;return String(Math.min(999,Math.max(0,l))).padStart(CE,"0")}function NE({value:n,label:l}){const a=AE(n).split("");return g.jsx("div",{className:"nixie-housing","aria-hidden":!l,"aria-label":l,children:a.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 by({title:n,total:l,open:a,onToggle:r,accent:s,titleAccent:c,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} ${a?`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 ${c}`,children:n}),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":a,"aria-label":`${l} in ${n.toLowerCase()}. Click to ${a?"close":"show"} tickets.`,children:g.jsx("div",{className:"nixie-display-wrap",children:g.jsx(NE,{value:l})})})]})})}function nd({run:n,selected:l,onSelect:a,statusOverride:r,timeField:s="updated",compact:c=!1,queueBadge:f,queueActiveLabel:h="Running",queueQueuedLabel:p="In queue",hideStatusBadge:m=!1}){const b=r??n.status,y=Ey(b),k=s==="created"?n.createdAt:n.updatedAt,v=Mf(n),E=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,O=f==="active"||f==="running";return g.jsx("button",{type:"button",onClick:a,className:`task-card w-full text-left rounded-xl border-l-[3px] transition-colors ${y.accent} ${l?"glass-plate-selected":""}`,children:g.jsxs("div",{className:`${c?"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(ut,{className:n.source==="linear"?"bg-[#5E6AD2]/15 text-[#AEB4FF] border-[#5E6AD2]/35 shrink-0":"bg-white/5 text-white/55 border-white/15 shrink-0",children:Ju(n)}),g.jsx(ut,{className:"bg-white/5 text-white/45 border-white/10 shrink-0 normal-case",children:Df(n.taskCategory)})]}),g.jsx("time",{className:"text-xs text-white/40 tabular-nums shrink-0",title:new Date(k).toLocaleString(),children:Ku(k)})]}),g.jsx("h3",{className:`font-semibold text-[#E8F6F4] leading-snug ${c?"text-base line-clamp-2":"text-lg line-clamp-2"}`,children:n.title}),!c&&n.description&&g.jsx("p",{className:"text-sm text-white/45 line-clamp-2 leading-relaxed",children:n.description}),g.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 pt-0.5",children:[g.jsxs(ut,{className:`${us(n.runtime)} normal-case`,title:n.runtime?ii(n.runtime):void 0,children:[n.runtime&&g.jsx(Fx,{runtime:n.runtime}),n.agentName??ii(n.runtime)]}),v&&g.jsxs(ut,{className:"bg-[#92E4DD]/10 text-[#92E4DD] border-[#92E4DD]/25 normal-case max-w-[140px] truncate",title:v,children:["◆ ",v]}),f?g.jsxs(ut,{className:`${E} ml-auto`,children:[O&&g.jsx("span",{className:"inline-block w-1.5 h-1.5 rounded-full bg-[#92E4DD] animate-pulse mr-0.5"}),O?h:p]}):m?null:g.jsx(ut,{className:`${y.tone} ml-auto`,title:y.hint,children:y.label})]})]})})}function vy({title:n,items:l,activeBadgeLabel:a,selectedId:r,onSelect:s,onClose:c,accent:f,titleAccent:h,empty:p}){return g.jsxs("section",{className:`absolute inset-0 z-10 flex flex-col min-h-0 glass-column rounded-xl overflow-hidden border-t-2 ${f} bg-[#0A0A07]/95`,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:n}),g.jsx("button",{type:"button",onClick:c,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:m,queueBadge:b})=>g.jsx(nd,{run:m,selected:r===m.id,onSelect:()=>s(m),queueBadge:b,queueActiveLabel:a,queueQueuedLabel:"In queue",hideStatusBadge:!0},m.id))})]})}function Kx({title:n,count:l,children:a,empty:r,isEmpty:s,accent:c,titleAccent:f}){return g.jsxs("section",{className:`flex flex-col min-w-0 h-full glass-column rounded-xl overflow-hidden ${c?`border-t-2 ${c}`:"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:n}),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:a})]})}function TE({runs:n,selectedId:l,onSelect:a}){return g.jsx(Kx,{title:"Review Plan",count:n.length,accent:"border-t-cyber-violet",titleAccent:"text-cyber-violet-light",isEmpty:n.length===0,empty:g.jsx("p",{className:"text-sm text-white/45 py-4 text-center",children:"No plans ready yet"}),children:n.map(r=>g.jsx(nd,{run:r,selected:l===r.id,onSelect:()=>a(r),hideStatusBadge:!0},r.id))})}function jE({snapshot:n,selectedRunId:l,onSelectRun:a}){const[r,s]=Q.useState(null),c=(n==null?void 0:n.awaitingPlanReview)??[],f=(n==null?void 0:n.planningActiveRuns)??[],h=(n==null?void 0:n.planningQueuedRuns)??[],p=(n==null?void 0:n.runningRuns)??[],m=(n==null?void 0:n.waitingExecution)??[],b=(n==null?void 0:n.resultReviewRuns)??[],y=[...f.map(E=>({run:E,queueBadge:"active"})),...h.map(E=>({run:E,queueBadge:"queued"}))],k=[...p.map(E=>({run:E,queueBadge:"active"})),...m.map(E=>({run:E,queueBadge:"queued"}))],v=E=>{s(O=>O===E?null:E)};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(by,{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(TE,{runs:c,selectedId:l,onSelect:a}),r==="planning"&&g.jsx(vy,{title:"In Planning",items:y,activeBadgeLabel:"Planning",selectedId:l,onSelect:a,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(by,{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(Kx,{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(E=>g.jsx(nd,{run:E,selected:l===E.id,onSelect:()=>a(E),hideStatusBadge:E.status==="review"},E.id))}),r==="progress"&&g.jsx(vy,{title:"In Progress",items:k,activeBadgeLabel:"Running",selectedId:l,onSelect:a,onClose:()=>s(null),accent:"border-t-[#C4B643]",titleAccent:"text-[#E8DC7A]",empty:"Queue empty — approve a plan to start"})]})]})]})})}function zE(){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 DE({className:n="w-5 h-5"}){return g.jsxs("svg",{viewBox:"0 0 20 20",fill:"currentColor",className:n,"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 ME="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 OE({className:n="",size:l=36}){return g.jsx("img",{src:ME,alt:"",width:l,height:l,className:`shrink-0 object-contain ${n}`,"aria-hidden":!0,draggable:!1})}function RE(){var H,le,ee;const[n,l]=Q.useState("ops"),[a,r]=Q.useState(null),[s,c]=Q.useState(null),f=Q.useCallback(()=>{cg().then(r).catch(console.error)},[]);Q.useEffect(()=>{f();const D=Hb(r),P=setInterval(f,5e3);return()=>{D(),clearInterval(P)}},[f]),Q.useEffect(()=>{if(!s||!a)return;const D=a.runs.find(P=>P.id===s.id);D&&c(D)},[a,s==null?void 0:s.id]);const h=((H=a==null?void 0:a.resultReviewRuns)==null?void 0:H.length)??0,p=((le=a==null?void 0:a.awaitingPlanReview)==null?void 0:le.length)??0,m=(a==null?void 0:a.runs.filter(D=>D.status==="done").length)??0,b=((ee=a==null?void 0:a.agents)==null?void 0:ee.length)??0,y=(a==null?void 0:a.agentIssueCount)??0,k=p+h,v=Q.useMemo(()=>!s||!a?[]:xy(s,a,n),[s,a,n]),E=s?td(v,s.id):-1,O=Q.useCallback(D=>{const P=v[D];P&&c(P)},[v]),q=Q.useCallback(async D=>{if(!a)return;const P=xy(a.runs.find(M=>M.id===D)??s,a,n),ce=Nf(P,D),fe=await cg();if(r(fe),!ce){c(null);return}c(fe.runs.find(M=>M.id===ce.id)??null)},[a,s,n]),j=D=>`px-3 py-2 text-base rounded ${n===D?"bg-[#92E4DD]/20 text-[#92E4DD]":"text-white/60 hover:text-white"}`,Z=()=>l("agents");return g.jsxs(g.Fragment,{children:[g.jsx(zE,{}),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"),c(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(OE,{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:j("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:j("intake"),children:"Inbox"}),g.jsxs("button",{type:"button",onClick:()=>l("done"),className:j("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:`${j("agents")} inline-flex items-center gap-1.5 transition-colors`,"aria-label":"Agents",title:"Agents",children:[g.jsx(DE,{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(Gx,{className:"w-3 h-3 shrink-0"}),y]})]})]}),g.jsxs("main",{className:"flex-1 flex overflow-hidden",children:[n==="ops"&&g.jsx(jE,{snapshot:a,selectedRunId:(s==null?void 0:s.id)??null,onSelectRun:c}),n==="intake"&&g.jsx(EE,{agents:(a==null?void 0:a.agents)??[],onRefresh:f,onGoOperations:()=>l("ops"),onManageAgents:Z}),n==="agents"&&g.jsx(mE,{agents:(a==null?void 0:a.agents)??[],agentDeckOnline:(a==null?void 0:a.agentDeckOnline)??!1,onRefresh:f}),n==="done"&&g.jsx(gE,{runs:(a==null?void 0:a.runs)??[],selectedRunId:(s==null?void 0:s.id)??null,onSelectRun:c})]}),s&&g.jsx(cE,{run:s,agents:(a==null?void 0:a.agents)??[],onClose:()=>c(null),onRefresh:f,onApproved:f,onApprovedAndNext:()=>q(s.id),onDoneAndNext:()=>q(s.id),queueNav:v.length>1?{runs:v,index:E,onPrev:()=>O(E-1),onNext:()=>O(E+1)}:void 0,onRetry:D=>{c(D),l("ops"),f()}})]})]})}function LE(){return typeof document>"u"?Promise.resolve():document.fonts.load('13px "Monaco"').then(()=>{}).catch(()=>{})}LE();bb.createRoot(document.getElementById("root")).render(g.jsx(Q.StrictMode,{children:g.jsx(RE,{})}));
|