fourth-spark 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/cli.js +8 -0
- package/docker-compose.yml +20 -0
- package/drizzle/0000_cute_hemingway.sql +61 -0
- package/drizzle/0001_add-repos-table.sql +12 -0
- package/drizzle/0002_tearful_gorilla_man.sql +91 -0
- package/drizzle/0003_damp_frightful_four.sql +51 -0
- package/drizzle/0004_brown_the_call.sql +50 -0
- package/drizzle/meta/0000_snapshot.json +460 -0
- package/drizzle/meta/0001_snapshot.json +538 -0
- package/drizzle/meta/0002_snapshot.json +1234 -0
- package/drizzle/meta/0003_snapshot.json +1645 -0
- package/drizzle/meta/0004_snapshot.json +2037 -0
- package/drizzle/meta/_journal.json +41 -0
- package/package.json +25 -0
- package/postinstall.js +87 -0
- package/public/assets/index-CWux2VSD.js +446 -0
- package/public/assets/index-Db25v8QM.css +1 -0
- package/public/index.html +13 -0
|
@@ -0,0 +1,446 @@
|
|
|
1
|
+
var f2=Object.defineProperty;var m2=(e,t,a)=>t in e?f2(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a;var rn=(e,t,a)=>m2(e,typeof t!="symbol"?t+"":t,a);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))s(l);new MutationObserver(l=>{for(const o of l)if(o.type==="childList")for(const d of o.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&s(d)}).observe(document,{childList:!0,subtree:!0});function a(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerPolicy&&(o.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?o.credentials="include":l.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(l){if(l.ep)return;l.ep=!0;const o=a(l);fetch(l.href,o)}})();function Cc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Xf={exports:{}},zl={};/**
|
|
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 Cb;function h2(){if(Cb)return zl;Cb=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function a(s,l,o){var d=null;if(o!==void 0&&(d=""+o),l.key!==void 0&&(d=""+l.key),"key"in l){o={};for(var f in l)f!=="key"&&(o[f]=l[f])}else o=l;return l=o.ref,{$$typeof:e,type:s,key:d,ref:l!==void 0?l:null,props:o}}return zl.Fragment=t,zl.jsx=a,zl.jsxs=a,zl}var wb;function p2(){return wb||(wb=1,Xf.exports=h2()),Xf.exports}var c=p2(),Zf={exports:{}},Ve={};/**
|
|
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 kb;function g2(){if(kb)return Ve;kb=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),d=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),x=Symbol.for("react.activity"),y=Symbol.iterator;function T(R){return R===null||typeof R!="object"?null:(R=y&&R[y]||R["@@iterator"],typeof R=="function"?R:null)}var N={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,C={};function v(R,X,O){this.props=R,this.context=X,this.refs=C,this.updater=O||N}v.prototype.isReactComponent={},v.prototype.setState=function(R,X){if(typeof R!="object"&&typeof R!="function"&&R!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,R,X,"setState")},v.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function M(){}M.prototype=v.prototype;function k(R,X,O){this.props=R,this.context=X,this.refs=C,this.updater=O||N}var D=k.prototype=new M;D.constructor=k,S(D,v.prototype),D.isPureReactComponent=!0;var $=Array.isArray;function L(){}var Y={H:null,A:null,T:null,S:null},re=Object.prototype.hasOwnProperty;function fe(R,X,O){var ge=O.ref;return{$$typeof:e,type:R,key:X,ref:ge!==void 0?ge:null,props:O}}function U(R,X){return fe(R.type,X,R.props)}function H(R){return typeof R=="object"&&R!==null&&R.$$typeof===e}function ae(R){var X={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(O){return X[O]})}var se=/\/+/g;function Z(R,X){return typeof R=="object"&&R!==null&&R.key!=null?ae(""+R.key):X.toString(36)}function J(R){switch(R.status){case"fulfilled":return R.value;case"rejected":throw R.reason;default:switch(typeof R.status=="string"?R.then(L,L):(R.status="pending",R.then(function(X){R.status==="pending"&&(R.status="fulfilled",R.value=X)},function(X){R.status==="pending"&&(R.status="rejected",R.reason=X)})),R.status){case"fulfilled":return R.value;case"rejected":throw R.reason}}throw R}function V(R,X,O,ge,ve){var Ae=typeof R;(Ae==="undefined"||Ae==="boolean")&&(R=null);var $e=!1;if(R===null)$e=!0;else switch(Ae){case"bigint":case"string":case"number":$e=!0;break;case"object":switch(R.$$typeof){case e:case t:$e=!0;break;case b:return $e=R._init,V($e(R._payload),X,O,ge,ve)}}if($e)return ve=ve(R),$e=ge===""?"."+Z(R,0):ge,$(ve)?(O="",$e!=null&&(O=$e.replace(se,"$&/")+"/"),V(ve,X,O,"",function(Ft){return Ft})):ve!=null&&(H(ve)&&(ve=U(ve,O+(ve.key==null||R&&R.key===ve.key?"":(""+ve.key).replace(se,"$&/")+"/")+$e)),X.push(ve)),1;$e=0;var dt=ge===""?".":ge+":";if($(R))for(var ut=0;ut<R.length;ut++)ge=R[ut],Ae=dt+Z(ge,ut),$e+=V(ge,X,O,Ae,ve);else if(ut=T(R),typeof ut=="function")for(R=ut.call(R),ut=0;!(ge=R.next()).done;)ge=ge.value,Ae=dt+Z(ge,ut++),$e+=V(ge,X,O,Ae,ve);else if(Ae==="object"){if(typeof R.then=="function")return V(J(R),X,O,ge,ve);throw X=String(R),Error("Objects are not valid as a React child (found: "+(X==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":X)+"). If you meant to render a collection of children, use an array instead.")}return $e}function G(R,X,O){if(R==null)return R;var ge=[],ve=0;return V(R,ge,"","",function(Ae){return X.call(O,Ae,ve++)}),ge}function pe(R){if(R._status===-1){var X=R._result;X=X(),X.then(function(O){(R._status===0||R._status===-1)&&(R._status=1,R._result=O)},function(O){(R._status===0||R._status===-1)&&(R._status=2,R._result=O)}),R._status===-1&&(R._status=0,R._result=X)}if(R._status===1)return R._result.default;throw R._result}var ke=typeof reportError=="function"?reportError:function(R){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var X=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof R=="object"&&R!==null&&typeof R.message=="string"?String(R.message):String(R),error:R});if(!window.dispatchEvent(X))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",R);return}console.error(R)},B={map:G,forEach:function(R,X,O){G(R,function(){X.apply(this,arguments)},O)},count:function(R){var X=0;return G(R,function(){X++}),X},toArray:function(R){return G(R,function(X){return X})||[]},only:function(R){if(!H(R))throw Error("React.Children.only expected to receive a single React element child.");return R}};return Ve.Activity=x,Ve.Children=B,Ve.Component=v,Ve.Fragment=a,Ve.Profiler=l,Ve.PureComponent=k,Ve.StrictMode=s,Ve.Suspense=h,Ve.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Y,Ve.__COMPILER_RUNTIME={__proto__:null,c:function(R){return Y.H.useMemoCache(R)}},Ve.cache=function(R){return function(){return R.apply(null,arguments)}},Ve.cacheSignal=function(){return null},Ve.cloneElement=function(R,X,O){if(R==null)throw Error("The argument must be a React element, but you passed "+R+".");var ge=S({},R.props),ve=R.key;if(X!=null)for(Ae in X.key!==void 0&&(ve=""+X.key),X)!re.call(X,Ae)||Ae==="key"||Ae==="__self"||Ae==="__source"||Ae==="ref"&&X.ref===void 0||(ge[Ae]=X[Ae]);var Ae=arguments.length-2;if(Ae===1)ge.children=O;else if(1<Ae){for(var $e=Array(Ae),dt=0;dt<Ae;dt++)$e[dt]=arguments[dt+2];ge.children=$e}return fe(R.type,ve,ge)},Ve.createContext=function(R){return R={$$typeof:d,_currentValue:R,_currentValue2:R,_threadCount:0,Provider:null,Consumer:null},R.Provider=R,R.Consumer={$$typeof:o,_context:R},R},Ve.createElement=function(R,X,O){var ge,ve={},Ae=null;if(X!=null)for(ge in X.key!==void 0&&(Ae=""+X.key),X)re.call(X,ge)&&ge!=="key"&&ge!=="__self"&&ge!=="__source"&&(ve[ge]=X[ge]);var $e=arguments.length-2;if($e===1)ve.children=O;else if(1<$e){for(var dt=Array($e),ut=0;ut<$e;ut++)dt[ut]=arguments[ut+2];ve.children=dt}if(R&&R.defaultProps)for(ge in $e=R.defaultProps,$e)ve[ge]===void 0&&(ve[ge]=$e[ge]);return fe(R,Ae,ve)},Ve.createRef=function(){return{current:null}},Ve.forwardRef=function(R){return{$$typeof:f,render:R}},Ve.isValidElement=H,Ve.lazy=function(R){return{$$typeof:b,_payload:{_status:-1,_result:R},_init:pe}},Ve.memo=function(R,X){return{$$typeof:m,type:R,compare:X===void 0?null:X}},Ve.startTransition=function(R){var X=Y.T,O={};Y.T=O;try{var ge=R(),ve=Y.S;ve!==null&&ve(O,ge),typeof ge=="object"&&ge!==null&&typeof ge.then=="function"&&ge.then(L,ke)}catch(Ae){ke(Ae)}finally{X!==null&&O.types!==null&&(X.types=O.types),Y.T=X}},Ve.unstable_useCacheRefresh=function(){return Y.H.useCacheRefresh()},Ve.use=function(R){return Y.H.use(R)},Ve.useActionState=function(R,X,O){return Y.H.useActionState(R,X,O)},Ve.useCallback=function(R,X){return Y.H.useCallback(R,X)},Ve.useContext=function(R){return Y.H.useContext(R)},Ve.useDebugValue=function(){},Ve.useDeferredValue=function(R,X){return Y.H.useDeferredValue(R,X)},Ve.useEffect=function(R,X){return Y.H.useEffect(R,X)},Ve.useEffectEvent=function(R){return Y.H.useEffectEvent(R)},Ve.useId=function(){return Y.H.useId()},Ve.useImperativeHandle=function(R,X,O){return Y.H.useImperativeHandle(R,X,O)},Ve.useInsertionEffect=function(R,X){return Y.H.useInsertionEffect(R,X)},Ve.useLayoutEffect=function(R,X){return Y.H.useLayoutEffect(R,X)},Ve.useMemo=function(R,X){return Y.H.useMemo(R,X)},Ve.useOptimistic=function(R,X){return Y.H.useOptimistic(R,X)},Ve.useReducer=function(R,X,O){return Y.H.useReducer(R,X,O)},Ve.useRef=function(R){return Y.H.useRef(R)},Ve.useState=function(R){return Y.H.useState(R)},Ve.useSyncExternalStore=function(R,X,O){return Y.H.useSyncExternalStore(R,X,O)},Ve.useTransition=function(){return Y.H.useTransition()},Ve.version="19.2.8",Ve}var Rb;function lh(){return Rb||(Rb=1,Zf.exports=g2()),Zf.exports}var A=lh();const $u=Cc(A);var Wf={exports:{}},ql={},Jf={exports:{}},em={};/**
|
|
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 Ob;function b2(){return Ob||(Ob=1,(function(e){function t(V,G){var pe=V.length;V.push(G);e:for(;0<pe;){var ke=pe-1>>>1,B=V[ke];if(0<l(B,G))V[ke]=G,V[pe]=B,pe=ke;else break e}}function a(V){return V.length===0?null:V[0]}function s(V){if(V.length===0)return null;var G=V[0],pe=V.pop();if(pe!==G){V[0]=pe;e:for(var ke=0,B=V.length,R=B>>>1;ke<R;){var X=2*(ke+1)-1,O=V[X],ge=X+1,ve=V[ge];if(0>l(O,pe))ge<B&&0>l(ve,O)?(V[ke]=ve,V[ge]=pe,ke=ge):(V[ke]=O,V[X]=pe,ke=X);else if(ge<B&&0>l(ve,pe))V[ke]=ve,V[ge]=pe,ke=ge;else break e}}return G}function l(V,G){var pe=V.sortIndex-G.sortIndex;return pe!==0?pe:V.id-G.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var d=Date,f=d.now();e.unstable_now=function(){return d.now()-f}}var h=[],m=[],b=1,x=null,y=3,T=!1,N=!1,S=!1,C=!1,v=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;function D(V){for(var G=a(m);G!==null;){if(G.callback===null)s(m);else if(G.startTime<=V)s(m),G.sortIndex=G.expirationTime,t(h,G);else break;G=a(m)}}function $(V){if(S=!1,D(V),!N)if(a(h)!==null)N=!0,L||(L=!0,ae());else{var G=a(m);G!==null&&J($,G.startTime-V)}}var L=!1,Y=-1,re=5,fe=-1;function U(){return C?!0:!(e.unstable_now()-fe<re)}function H(){if(C=!1,L){var V=e.unstable_now();fe=V;var G=!0;try{e:{N=!1,S&&(S=!1,M(Y),Y=-1),T=!0;var pe=y;try{t:{for(D(V),x=a(h);x!==null&&!(x.expirationTime>V&&U());){var ke=x.callback;if(typeof ke=="function"){x.callback=null,y=x.priorityLevel;var B=ke(x.expirationTime<=V);if(V=e.unstable_now(),typeof B=="function"){x.callback=B,D(V),G=!0;break t}x===a(h)&&s(h),D(V)}else s(h);x=a(h)}if(x!==null)G=!0;else{var R=a(m);R!==null&&J($,R.startTime-V),G=!1}}break e}finally{x=null,y=pe,T=!1}G=void 0}}finally{G?ae():L=!1}}}var ae;if(typeof k=="function")ae=function(){k(H)};else if(typeof MessageChannel<"u"){var se=new MessageChannel,Z=se.port2;se.port1.onmessage=H,ae=function(){Z.postMessage(null)}}else ae=function(){v(H,0)};function J(V,G){Y=v(function(){V(e.unstable_now())},G)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(V){V.callback=null},e.unstable_forceFrameRate=function(V){0>V||125<V?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):re=0<V?Math.floor(1e3/V):5},e.unstable_getCurrentPriorityLevel=function(){return y},e.unstable_next=function(V){switch(y){case 1:case 2:case 3:var G=3;break;default:G=y}var pe=y;y=G;try{return V()}finally{y=pe}},e.unstable_requestPaint=function(){C=!0},e.unstable_runWithPriority=function(V,G){switch(V){case 1:case 2:case 3:case 4:case 5:break;default:V=3}var pe=y;y=V;try{return G()}finally{y=pe}},e.unstable_scheduleCallback=function(V,G,pe){var ke=e.unstable_now();switch(typeof pe=="object"&&pe!==null?(pe=pe.delay,pe=typeof pe=="number"&&0<pe?ke+pe:ke):pe=ke,V){case 1:var B=-1;break;case 2:B=250;break;case 5:B=1073741823;break;case 4:B=1e4;break;default:B=5e3}return B=pe+B,V={id:b++,callback:G,priorityLevel:V,startTime:pe,expirationTime:B,sortIndex:-1},pe>ke?(V.sortIndex=pe,t(m,V),a(h)===null&&V===a(m)&&(S?(M(Y),Y=-1):S=!0,J($,pe-ke))):(V.sortIndex=B,t(h,V),N||T||(N=!0,L||(L=!0,ae()))),V},e.unstable_shouldYield=U,e.unstable_wrapCallback=function(V){var G=y;return function(){var pe=y;y=G;try{return V.apply(this,arguments)}finally{y=pe}}}})(em)),em}var Ib;function x2(){return Ib||(Ib=1,Jf.exports=b2()),Jf.exports}var tm={exports:{}},Nn={};/**
|
|
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 Mb;function E2(){if(Mb)return Nn;Mb=1;var e=lh();function t(h){var m="https://react.dev/errors/"+h;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 #"+h+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(){}var s={d:{f:a,r:function(){throw Error(t(522))},D:a,C:a,L:a,m:a,X:a,S:a,M:a},p:0,findDOMNode:null},l=Symbol.for("react.portal");function o(h,m,b){var x=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:l,key:x==null?null:""+x,children:h,containerInfo:m,implementation:b}}var d=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(h,m){if(h==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return Nn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,Nn.createPortal=function(h,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(t(299));return o(h,m,null,b)},Nn.flushSync=function(h){var m=d.T,b=s.p;try{if(d.T=null,s.p=2,h)return h()}finally{d.T=m,s.p=b,s.d.f()}},Nn.preconnect=function(h,m){typeof h=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,s.d.C(h,m))},Nn.prefetchDNS=function(h){typeof h=="string"&&s.d.D(h)},Nn.preinit=function(h,m){if(typeof h=="string"&&m&&typeof m.as=="string"){var b=m.as,x=f(b,m.crossOrigin),y=typeof m.integrity=="string"?m.integrity:void 0,T=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;b==="style"?s.d.S(h,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:x,integrity:y,fetchPriority:T}):b==="script"&&s.d.X(h,{crossOrigin:x,integrity:y,fetchPriority:T,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},Nn.preinitModule=function(h,m){if(typeof h=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var b=f(m.as,m.crossOrigin);s.d.M(h,{crossOrigin:b,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&s.d.M(h)},Nn.preload=function(h,m){if(typeof h=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var b=m.as,x=f(b,m.crossOrigin);s.d.L(h,b,{crossOrigin:x,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})}},Nn.preloadModule=function(h,m){if(typeof h=="string")if(m){var b=f(m.as,m.crossOrigin);s.d.m(h,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:b,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else s.d.m(h)},Nn.requestFormReset=function(h){s.d.r(h)},Nn.unstable_batchedUpdates=function(h,m){return h(m)},Nn.useFormState=function(h,m,b){return d.H.useFormState(h,m,b)},Nn.useFormStatus=function(){return d.H.useHostTransitionStatus()},Nn.version="19.2.8",Nn}var Db;function y2(){if(Db)return tm.exports;Db=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),tm.exports=E2(),tm.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 Lb;function T2(){if(Lb)return ql;Lb=1;var e=x2(),t=lh(),a=y2();function s(n){var r="https://react.dev/errors/"+n;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)r+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+n+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function o(n){var r=n,i=n;if(n.alternate)for(;r.return;)r=r.return;else{n=r;do r=n,(r.flags&4098)!==0&&(i=r.return),n=r.return;while(n)}return r.tag===3?i:null}function d(n){if(n.tag===13){var r=n.memoizedState;if(r===null&&(n=n.alternate,n!==null&&(r=n.memoizedState)),r!==null)return r.dehydrated}return null}function f(n){if(n.tag===31){var r=n.memoizedState;if(r===null&&(n=n.alternate,n!==null&&(r=n.memoizedState)),r!==null)return r.dehydrated}return null}function h(n){if(o(n)!==n)throw Error(s(188))}function m(n){var r=n.alternate;if(!r){if(r=o(n),r===null)throw Error(s(188));return r!==n?null:n}for(var i=n,u=r;;){var p=i.return;if(p===null)break;var g=p.alternate;if(g===null){if(u=p.return,u!==null){i=u;continue}break}if(p.child===g.child){for(g=p.child;g;){if(g===i)return h(p),n;if(g===u)return h(p),r;g=g.sibling}throw Error(s(188))}if(i.return!==u.return)i=p,u=g;else{for(var _=!1,w=p.child;w;){if(w===i){_=!0,i=p,u=g;break}if(w===u){_=!0,u=p,i=g;break}w=w.sibling}if(!_){for(w=g.child;w;){if(w===i){_=!0,i=g,u=p;break}if(w===u){_=!0,u=g,i=p;break}w=w.sibling}if(!_)throw Error(s(189))}}if(i.alternate!==u)throw Error(s(190))}if(i.tag!==3)throw Error(s(188));return i.stateNode.current===i?n:r}function b(n){var r=n.tag;if(r===5||r===26||r===27||r===6)return n;for(n=n.child;n!==null;){if(r=b(n),r!==null)return r;n=n.sibling}return null}var x=Object.assign,y=Symbol.for("react.element"),T=Symbol.for("react.transitional.element"),N=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),M=Symbol.for("react.consumer"),k=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),$=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),Y=Symbol.for("react.memo"),re=Symbol.for("react.lazy"),fe=Symbol.for("react.activity"),U=Symbol.for("react.memo_cache_sentinel"),H=Symbol.iterator;function ae(n){return n===null||typeof n!="object"?null:(n=H&&n[H]||n["@@iterator"],typeof n=="function"?n:null)}var se=Symbol.for("react.client.reference");function Z(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===se?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case S:return"Fragment";case v:return"Profiler";case C:return"StrictMode";case $:return"Suspense";case L:return"SuspenseList";case fe:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case N:return"Portal";case k:return n.displayName||"Context";case M:return(n._context.displayName||"Context")+".Consumer";case D:var r=n.render;return n=n.displayName,n||(n=r.displayName||r.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case Y:return r=n.displayName||null,r!==null?r:Z(n.type)||"Memo";case re:r=n._payload,n=n._init;try{return Z(n(r))}catch{}}return null}var J=Array.isArray,V=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,pe={pending:!1,data:null,method:null,action:null},ke=[],B=-1;function R(n){return{current:n}}function X(n){0>B||(n.current=ke[B],ke[B]=null,B--)}function O(n,r){B++,ke[B]=n.current,n.current=r}var ge=R(null),ve=R(null),Ae=R(null),$e=R(null);function dt(n,r){switch(O(Ae,r),O(ve,n),O(ge,null),r.nodeType){case 9:case 11:n=(n=r.documentElement)&&(n=n.namespaceURI)?Xg(n):0;break;default:if(n=r.tagName,r=r.namespaceURI)r=Xg(r),n=Zg(r,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}X(ge),O(ge,n)}function ut(){X(ge),X(ve),X(Ae)}function Ft(n){n.memoizedState!==null&&O($e,n);var r=ge.current,i=Zg(r,n.type);r!==i&&(O(ve,n),O(ge,i))}function yn(n){ve.current===n&&(X(ge),X(ve)),$e.current===n&&(X($e),Pl._currentValue=pe)}var ua,Sa;function un(n){if(ua===void 0)try{throw Error()}catch(i){var r=i.stack.trim().match(/\n( *(at )?)/);ua=r&&r[1]||"",Sa=-1<i.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+ua+n+Sa}var Vn=!1;function Je(n,r){if(!n||Vn)return"";Vn=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(r){var he=function(){throw Error()};if(Object.defineProperty(he.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(he,[])}catch(ie){var ne=ie}Reflect.construct(n,[],he)}else{try{he.call()}catch(ie){ne=ie}n.call(he.prototype)}}else{try{throw Error()}catch(ie){ne=ie}(he=n())&&typeof he.catch=="function"&&he.catch(function(){})}}catch(ie){if(ie&&ne&&typeof ie.stack=="string")return[ie.stack,ne.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var g=u.DetermineComponentFrameRoot(),_=g[0],w=g[1];if(_&&w){var z=_.split(`
|
|
44
|
+
`),te=w.split(`
|
|
45
|
+
`);for(p=u=0;u<z.length&&!z[u].includes("DetermineComponentFrameRoot");)u++;for(;p<te.length&&!te[p].includes("DetermineComponentFrameRoot");)p++;if(u===z.length||p===te.length)for(u=z.length-1,p=te.length-1;1<=u&&0<=p&&z[u]!==te[p];)p--;for(;1<=u&&0<=p;u--,p--)if(z[u]!==te[p]){if(u!==1||p!==1)do if(u--,p--,0>p||z[u]!==te[p]){var ue=`
|
|
46
|
+
`+z[u].replace(" at new "," at ");return n.displayName&&ue.includes("<anonymous>")&&(ue=ue.replace("<anonymous>",n.displayName)),ue}while(1<=u&&0<=p);break}}}finally{Vn=!1,Error.prepareStackTrace=i}return(i=n?n.displayName||n.name:"")?un(i):""}function Dn(n,r){switch(n.tag){case 26:case 27:case 5:return un(n.type);case 16:return un("Lazy");case 13:return n.child!==r&&r!==null?un("Suspense Fallback"):un("Suspense");case 19:return un("SuspenseList");case 0:case 15:return Je(n.type,!1);case 11:return Je(n.type.render,!1);case 1:return Je(n.type,!0);case 31:return un("Activity");default:return""}}function Cn(n){try{var r="",i=null;do r+=Dn(n,i),i=n,n=n.return;while(n);return r}catch(u){return`
|
|
47
|
+
Error generating stack: `+u.message+`
|
|
48
|
+
`+u.stack}}var ca=Object.prototype.hasOwnProperty,va=e.unstable_scheduleCallback,Za=e.unstable_cancelCallback,ja=e.unstable_shouldYield,Ar=e.unstable_requestPaint,_t=e.unstable_now,Wa=e.unstable_getCurrentPriorityLevel,oe=e.unstable_ImmediatePriority,Te=e.unstable_UserBlockingPriority,Be=e.unstable_NormalPriority,P=e.unstable_LowPriority,Se=e.unstable_IdlePriority,ft=e.log,ln=e.unstable_setDisableYieldValue,Zt=null,Ot=null;function cn(n){if(typeof ft=="function"&&ln(n),Ot&&typeof Ot.setStrictMode=="function")try{Ot.setStrictMode(Zt,n)}catch{}}var gt=Math.clz32?Math.clz32:ko,Ba=Math.log,wn=Math.LN2;function ko(n){return n>>>=0,n===0?32:31-(Ba(n)/wn|0)|0}var ds=256,Gs=262144,fs=4194304;function Ln(n){var r=n&42;if(r!==0)return r;switch(n&-n){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function q(n,r,i){var u=n.pendingLanes;if(u===0)return 0;var p=0,g=n.suspendedLanes,_=n.pingedLanes;n=n.warmLanes;var w=u&134217727;return w!==0?(u=w&~g,u!==0?p=Ln(u):(_&=w,_!==0?p=Ln(_):i||(i=w&~n,i!==0&&(p=Ln(i))))):(w=u&~g,w!==0?p=Ln(w):_!==0?p=Ln(_):i||(i=u&~n,i!==0&&(p=Ln(i)))),p===0?0:r!==0&&r!==p&&(r&g)===0&&(g=p&-p,i=r&-r,g>=i||g===32&&(i&4194048)!==0)?r:p}function ce(n,r){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&r)===0}function Ne(n,r){switch(n){case 1:case 2:case 4:case 8:case 64:return r+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 r+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 Ge(){var n=fs;return fs<<=1,(fs&62914560)===0&&(fs=4194304),n}function Mt(n){for(var r=[],i=0;31>i;i++)r.push(n);return r}function Ct(n,r){n.pendingLanes|=r,r!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function Ie(n,r,i,u,p,g){var _=n.pendingLanes;n.pendingLanes=i,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=i,n.entangledLanes&=i,n.errorRecoveryDisabledLanes&=i,n.shellSuspendCounter=0;var w=n.entanglements,z=n.expirationTimes,te=n.hiddenUpdates;for(i=_&~i;0<i;){var ue=31-gt(i),he=1<<ue;w[ue]=0,z[ue]=-1;var ne=te[ue];if(ne!==null)for(te[ue]=null,ue=0;ue<ne.length;ue++){var ie=ne[ue];ie!==null&&(ie.lane&=-536870913)}i&=~he}u!==0&&we(n,u,0),g!==0&&p===0&&n.tag!==0&&(n.suspendedLanes|=g&~(_&~r))}function we(n,r,i){n.pendingLanes|=r,n.suspendedLanes&=~r;var u=31-gt(r);n.entangledLanes|=r,n.entanglements[u]=n.entanglements[u]|1073741824|i&261930}function Ye(n,r){var i=n.entangledLanes|=r;for(n=n.entanglements;i;){var u=31-gt(i),p=1<<u;p&r|n[u]&r&&(n[u]|=r),i&=~p}}function $t(n,r){var i=r&-r;return i=(i&42)!==0?1:jt(i),(i&(n.suspendedLanes|r))!==0?0:i}function jt(n){switch(n){case 2:n=1;break;case 8:n=4;break;case 32:n=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:n=128;break;case 268435456:n=134217728;break;default:n=0}return n}function Ja(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function Ks(){var n=G.p;return n!==0?n:(n=window.event,n===void 0?32:yb(n.type))}function Vs(n,r){var i=G.p;try{return G.p=n,r()}finally{G.p=i}}var Pa=Math.random().toString(36).slice(2),Gt="__reactFiber$"+Pa,Tn="__reactProps$"+Pa,Cr="__reactContainer$"+Pa,Qi="__reactEvents$"+Pa,Ro="__reactListeners$"+Pa,Qs="__reactHandles$"+Pa,Oo="__reactResources$"+Pa,ms="__reactMarker$"+Pa;function Xi(n){delete n[Gt],delete n[Tn],delete n[Qi],delete n[Ro],delete n[Qs]}function kn(n){var r=n[Gt];if(r)return r;for(var i=n.parentNode;i;){if(r=i[Cr]||i[Gt]){if(i=r.alternate,r.child!==null||i!==null&&i.child!==null)for(n=rb(n);n!==null;){if(i=n[Gt])return i;n=rb(n)}return r}n=i,i=n.parentNode}return null}function er(n){if(n=n[Gt]||n[Cr]){var r=n.tag;if(r===5||r===6||r===13||r===31||r===26||r===27||r===3)return n}return null}function wr(n){var r=n.tag;if(r===5||r===26||r===27||r===6)return n.stateNode;throw Error(s(33))}function kr(n){var r=n[Oo];return r||(r=n[Oo]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function Wt(n){n[ms]=!0}var Io=new Set,hs={};function tr(n,r){Ee(n,r),Ee(n+"Capture",r)}function Ee(n,r){for(hs[n]=r,n=0;n<r.length;n++)Io.add(r[n])}var Le=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]*$"),et={},bt={};function Kt(n){return ca.call(bt,n)?!0:ca.call(et,n)?!1:Le.test(n)?bt[n]=!0:(et[n]=!0,!1)}function _n(n,r,i){if(Kt(r))if(i===null)n.removeAttribute(r);else{switch(typeof i){case"undefined":case"function":case"symbol":n.removeAttribute(r);return;case"boolean":var u=r.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){n.removeAttribute(r);return}}n.setAttribute(r,""+i)}}function Qn(n,r,i){if(i===null)n.removeAttribute(r);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(r);return}n.setAttribute(r,""+i)}}function jn(n,r,i,u){if(u===null)n.removeAttribute(i);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(i);return}n.setAttributeNS(r,i,""+u)}}function It(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function Xn(n){var r=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function Mo(n,r,i){var u=Object.getOwnPropertyDescriptor(n.constructor.prototype,r);if(!n.hasOwnProperty(r)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var p=u.get,g=u.set;return Object.defineProperty(n,r,{configurable:!0,get:function(){return p.call(this)},set:function(_){i=""+_,g.call(this,_)}}),Object.defineProperty(n,r,{enumerable:u.enumerable}),{getValue:function(){return i},setValue:function(_){i=""+_},stopTracking:function(){n._valueTracker=null,delete n[r]}}}}function Xs(n){if(!n._valueTracker){var r=Xn(n)?"checked":"value";n._valueTracker=Mo(n,r,""+n[r])}}function Zi(n){if(!n)return!1;var r=n._valueTracker;if(!r)return!0;var i=r.getValue(),u="";return n&&(u=Xn(n)?n.checked?"true":"false":n.value),n=u,n!==i?(r.setValue(n),!0):!1}function Zs(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}var Vc=/[\n"\\]/g;function Bn(n){return n.replace(Vc,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function Wi(n,r,i,u,p,g,_,w){n.name="",_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?n.type=_:n.removeAttribute("type"),r!=null?_==="number"?(r===0&&n.value===""||n.value!=r)&&(n.value=""+It(r)):n.value!==""+It(r)&&(n.value=""+It(r)):_!=="submit"&&_!=="reset"||n.removeAttribute("value"),r!=null?Ws(n,_,It(r)):i!=null?Ws(n,_,It(i)):u!=null&&n.removeAttribute("value"),p==null&&g!=null&&(n.defaultChecked=!!g),p!=null&&(n.checked=p&&typeof p!="function"&&typeof p!="symbol"),w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?n.name=""+It(w):n.removeAttribute("name")}function ps(n,r,i,u,p,g,_,w){if(g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(n.type=g),r!=null||i!=null){if(!(g!=="submit"&&g!=="reset"||r!=null)){Xs(n);return}i=i!=null?""+It(i):"",r=r!=null?""+It(r):i,w||r===n.value||(n.value=r),n.defaultValue=r}u=u??p,u=typeof u!="function"&&typeof u!="symbol"&&!!u,n.checked=w?n.checked:!!u,n.defaultChecked=!!u,_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"&&(n.name=_),Xs(n)}function Ws(n,r,i){r==="number"&&Zs(n.ownerDocument)===n||n.defaultValue===""+i||(n.defaultValue=""+i)}function pn(n,r,i,u){if(n=n.options,r){r={};for(var p=0;p<i.length;p++)r["$"+i[p]]=!0;for(i=0;i<n.length;i++)p=r.hasOwnProperty("$"+n[i].value),n[i].selected!==p&&(n[i].selected=p),p&&u&&(n[i].defaultSelected=!0)}else{for(i=""+It(i),r=null,p=0;p<n.length;p++){if(n[p].value===i){n[p].selected=!0,u&&(n[p].defaultSelected=!0);return}r!==null||n[p].disabled||(r=n[p])}r!==null&&(r.selected=!0)}}function Do(n,r,i){if(r!=null&&(r=""+It(r),r!==n.value&&(n.value=r),i==null)){n.defaultValue!==r&&(n.defaultValue=r);return}n.defaultValue=i!=null?""+It(i):""}function Js(n,r,i,u){if(r==null){if(u!=null){if(i!=null)throw Error(s(92));if(J(u)){if(1<u.length)throw Error(s(93));u=u[0]}i=u}i==null&&(i=""),r=i}i=It(r),n.defaultValue=i,u=n.textContent,u===i&&u!==""&&u!==null&&(n.value=u),Xs(n)}function ze(n,r){if(r){var i=n.firstChild;if(i&&i===n.lastChild&&i.nodeType===3){i.nodeValue=r;return}}n.textContent=r}var Lo=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 Jt(n,r,i){var u=r.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?u?n.setProperty(r,""):r==="float"?n.cssFloat="":n[r]="":u?n.setProperty(r,i):typeof i!="number"||i===0||Lo.has(r)?r==="float"?n.cssFloat=i:n[r]=(""+i).trim():n[r]=i+"px"}function xt(n,r,i){if(r!=null&&typeof r!="object")throw Error(s(62));if(n=n.style,i!=null){for(var u in i)!i.hasOwnProperty(u)||r!=null&&r.hasOwnProperty(u)||(u.indexOf("--")===0?n.setProperty(u,""):u==="float"?n.cssFloat="":n[u]="");for(var p in r)u=r[p],r.hasOwnProperty(p)&&i[p]!==u&&Jt(n,p,u)}else for(var g in r)r.hasOwnProperty(g)&&Jt(n,g,r[g])}function Rr(n){if(n.indexOf("-")===-1)return!1;switch(n){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var nr=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"]]),Ji=/^[\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 Or(n){return Ji.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function _e(){}var Me=null;function Qe(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var st=null,Ht=null;function da(n){var r=er(n);if(r&&(n=r.stateNode)){var i=n[Tn]||null;e:switch(n=r.stateNode,r.type){case"input":if(Wi(n,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),r=i.name,i.type==="radio"&&r!=null){for(i=n;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+Bn(""+r)+'"][type="radio"]'),r=0;r<i.length;r++){var u=i[r];if(u!==n&&u.form===n.form){var p=u[Tn]||null;if(!p)throw Error(s(90));Wi(u,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(r=0;r<i.length;r++)u=i[r],u.form===n.form&&Zi(u)}break e;case"textarea":Do(n,i.value,i.defaultValue);break e;case"select":r=i.value,r!=null&&pn(n,!!i.multiple,r,!1)}}}var el=!1;function jo(n,r,i){if(el)return n(r,i);el=!0;try{var u=n(r);return u}finally{if(el=!1,(st!==null||Ht!==null)&&(Nu(),st&&(r=st,n=Ht,Ht=st=null,da(r),n)))for(r=0;r<n.length;r++)da(n[r])}}function tl(n,r){var i=n.stateNode;if(i===null)return null;var u=i[Tn]||null;if(u===null)return null;i=u[r];e:switch(r){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)||(n=n.type,u=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!u;break e;default:n=!1}if(n)return null;if(i&&typeof i!="function")throw Error(s(231,r,typeof i));return i}var ar=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Qc=!1;if(ar)try{var nl={};Object.defineProperty(nl,"passive",{get:function(){Qc=!0}}),window.addEventListener("test",nl,nl),window.removeEventListener("test",nl,nl)}catch{Qc=!1}var Ir=null,Xc=null,Bo=null;function Zh(){if(Bo)return Bo;var n,r=Xc,i=r.length,u,p="value"in Ir?Ir.value:Ir.textContent,g=p.length;for(n=0;n<i&&r[n]===p[n];n++);var _=i-n;for(u=1;u<=_&&r[i-u]===p[g-u];u++);return Bo=p.slice(n,1<u?1-u:void 0)}function Po(n){var r=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&r===13&&(n=13)):n=r,n===10&&(n=13),32<=n||n===13?n:0}function Uo(){return!0}function Wh(){return!1}function Pn(n){function r(i,u,p,g,_){this._reactName=i,this._targetInst=p,this.type=u,this.nativeEvent=g,this.target=_,this.currentTarget=null;for(var w in n)n.hasOwnProperty(w)&&(i=n[w],this[w]=i?i(g):g[w]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?Uo:Wh,this.isPropagationStopped=Wh,this}return x(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=Uo)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=Uo)},persist:function(){},isPersistent:Uo}),r}var gs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ho=Pn(gs),al=x({},gs,{view:0,detail:0}),c_=Pn(al),Zc,Wc,rl,Fo=x({},al,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ed,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==rl&&(rl&&n.type==="mousemove"?(Zc=n.screenX-rl.screenX,Wc=n.screenY-rl.screenY):Wc=Zc=0,rl=n),Zc)},movementY:function(n){return"movementY"in n?n.movementY:Wc}}),Jh=Pn(Fo),d_=x({},Fo,{dataTransfer:0}),f_=Pn(d_),m_=x({},al,{relatedTarget:0}),Jc=Pn(m_),h_=x({},gs,{animationName:0,elapsedTime:0,pseudoElement:0}),p_=Pn(h_),g_=x({},gs,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),b_=Pn(g_),x_=x({},gs,{data:0}),e0=Pn(x_),E_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},y_={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"},T_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function __(n){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(n):(n=T_[n])?!!r[n]:!1}function ed(){return __}var N_=x({},al,{key:function(n){if(n.key){var r=E_[n.key]||n.key;if(r!=="Unidentified")return r}return n.type==="keypress"?(n=Po(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?y_[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ed,charCode:function(n){return n.type==="keypress"?Po(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?Po(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),S_=Pn(N_),v_=x({},Fo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),t0=Pn(v_),A_=x({},al,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ed}),C_=Pn(A_),w_=x({},gs,{propertyName:0,elapsedTime:0,pseudoElement:0}),k_=Pn(w_),R_=x({},Fo,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),O_=Pn(R_),I_=x({},gs,{newState:0,oldState:0}),M_=Pn(I_),D_=[9,13,27,32],td=ar&&"CompositionEvent"in window,sl=null;ar&&"documentMode"in document&&(sl=document.documentMode);var L_=ar&&"TextEvent"in window&&!sl,n0=ar&&(!td||sl&&8<sl&&11>=sl),a0=" ",r0=!1;function s0(n,r){switch(n){case"keyup":return D_.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function i0(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var ei=!1;function j_(n,r){switch(n){case"compositionend":return i0(r);case"keypress":return r.which!==32?null:(r0=!0,a0);case"textInput":return n=r.data,n===a0&&r0?null:n;default:return null}}function B_(n,r){if(ei)return n==="compositionend"||!td&&s0(n,r)?(n=Zh(),Bo=Xc=Ir=null,ei=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return n0&&r.locale!=="ko"?null:r.data;default:return null}}var P_={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 l0(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r==="input"?!!P_[n.type]:r==="textarea"}function o0(n,r,i,u){st?Ht?Ht.push(u):Ht=[u]:st=u,r=Ru(r,"onChange"),0<r.length&&(i=new Ho("onChange","change",null,i,u),n.push({event:i,listeners:r}))}var il=null,ll=null;function U_(n){Yg(n,0)}function zo(n){var r=wr(n);if(Zi(r))return n}function u0(n,r){if(n==="change")return r}var c0=!1;if(ar){var nd;if(ar){var ad="oninput"in document;if(!ad){var d0=document.createElement("div");d0.setAttribute("oninput","return;"),ad=typeof d0.oninput=="function"}nd=ad}else nd=!1;c0=nd&&(!document.documentMode||9<document.documentMode)}function f0(){il&&(il.detachEvent("onpropertychange",m0),ll=il=null)}function m0(n){if(n.propertyName==="value"&&zo(ll)){var r=[];o0(r,ll,n,Qe(n)),jo(U_,r)}}function H_(n,r,i){n==="focusin"?(f0(),il=r,ll=i,il.attachEvent("onpropertychange",m0)):n==="focusout"&&f0()}function F_(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return zo(ll)}function z_(n,r){if(n==="click")return zo(r)}function q_(n,r){if(n==="input"||n==="change")return zo(r)}function Y_(n,r){return n===r&&(n!==0||1/n===1/r)||n!==n&&r!==r}var Zn=typeof Object.is=="function"?Object.is:Y_;function ol(n,r){if(Zn(n,r))return!0;if(typeof n!="object"||n===null||typeof r!="object"||r===null)return!1;var i=Object.keys(n),u=Object.keys(r);if(i.length!==u.length)return!1;for(u=0;u<i.length;u++){var p=i[u];if(!ca.call(r,p)||!Zn(n[p],r[p]))return!1}return!0}function h0(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function p0(n,r){var i=h0(n);n=0;for(var u;i;){if(i.nodeType===3){if(u=n+i.textContent.length,n<=r&&u>=r)return{node:i,offset:r-n};n=u}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=h0(i)}}function g0(n,r){return n&&r?n===r?!0:n&&n.nodeType===3?!1:r&&r.nodeType===3?g0(n,r.parentNode):"contains"in n?n.contains(r):n.compareDocumentPosition?!!(n.compareDocumentPosition(r)&16):!1:!1}function b0(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var r=Zs(n.document);r instanceof n.HTMLIFrameElement;){try{var i=typeof r.contentWindow.location.href=="string"}catch{i=!1}if(i)n=r.contentWindow;else break;r=Zs(n.document)}return r}function rd(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r&&(r==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||r==="textarea"||n.contentEditable==="true")}var $_=ar&&"documentMode"in document&&11>=document.documentMode,ti=null,sd=null,ul=null,id=!1;function x0(n,r,i){var u=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;id||ti==null||ti!==Zs(u)||(u=ti,"selectionStart"in u&&rd(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}),ul&&ol(ul,u)||(ul=u,u=Ru(sd,"onSelect"),0<u.length&&(r=new Ho("onSelect","select",null,r,i),n.push({event:r,listeners:u}),r.target=ti)))}function bs(n,r){var i={};return i[n.toLowerCase()]=r.toLowerCase(),i["Webkit"+n]="webkit"+r,i["Moz"+n]="moz"+r,i}var ni={animationend:bs("Animation","AnimationEnd"),animationiteration:bs("Animation","AnimationIteration"),animationstart:bs("Animation","AnimationStart"),transitionrun:bs("Transition","TransitionRun"),transitionstart:bs("Transition","TransitionStart"),transitioncancel:bs("Transition","TransitionCancel"),transitionend:bs("Transition","TransitionEnd")},ld={},E0={};ar&&(E0=document.createElement("div").style,"AnimationEvent"in window||(delete ni.animationend.animation,delete ni.animationiteration.animation,delete ni.animationstart.animation),"TransitionEvent"in window||delete ni.transitionend.transition);function xs(n){if(ld[n])return ld[n];if(!ni[n])return n;var r=ni[n],i;for(i in r)if(r.hasOwnProperty(i)&&i in E0)return ld[n]=r[i];return n}var y0=xs("animationend"),T0=xs("animationiteration"),_0=xs("animationstart"),G_=xs("transitionrun"),K_=xs("transitionstart"),V_=xs("transitioncancel"),N0=xs("transitionend"),S0=new Map,od="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(" ");od.push("scrollEnd");function Aa(n,r){S0.set(n,r),tr(r,[n])}var qo=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof n=="object"&&n!==null&&typeof n.message=="string"?String(n.message):String(n),error:n});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)},fa=[],ai=0,ud=0;function Yo(){for(var n=ai,r=ud=ai=0;r<n;){var i=fa[r];fa[r++]=null;var u=fa[r];fa[r++]=null;var p=fa[r];fa[r++]=null;var g=fa[r];if(fa[r++]=null,u!==null&&p!==null){var _=u.pending;_===null?p.next=p:(p.next=_.next,_.next=p),u.pending=p}g!==0&&v0(i,p,g)}}function $o(n,r,i,u){fa[ai++]=n,fa[ai++]=r,fa[ai++]=i,fa[ai++]=u,ud|=u,n.lanes|=u,n=n.alternate,n!==null&&(n.lanes|=u)}function cd(n,r,i,u){return $o(n,r,i,u),Go(n)}function Es(n,r){return $o(n,null,null,r),Go(n)}function v0(n,r,i){n.lanes|=i;var u=n.alternate;u!==null&&(u.lanes|=i);for(var p=!1,g=n.return;g!==null;)g.childLanes|=i,u=g.alternate,u!==null&&(u.childLanes|=i),g.tag===22&&(n=g.stateNode,n===null||n._visibility&1||(p=!0)),n=g,g=g.return;return n.tag===3?(g=n.stateNode,p&&r!==null&&(p=31-gt(i),n=g.hiddenUpdates,u=n[p],u===null?n[p]=[r]:u.push(r),r.lane=i|536870912),g):null}function Go(n){if(50<Ol)throw Ol=0,yf=null,Error(s(185));for(var r=n.return;r!==null;)n=r,r=n.return;return n.tag===3?n.stateNode:null}var ri={};function Q_(n,r,i,u){this.tag=n,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=r,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 Wn(n,r,i,u){return new Q_(n,r,i,u)}function dd(n){return n=n.prototype,!(!n||!n.isReactComponent)}function rr(n,r){var i=n.alternate;return i===null?(i=Wn(n.tag,r,n.key,n.mode),i.elementType=n.elementType,i.type=n.type,i.stateNode=n.stateNode,i.alternate=n,n.alternate=i):(i.pendingProps=r,i.type=n.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=n.flags&65011712,i.childLanes=n.childLanes,i.lanes=n.lanes,i.child=n.child,i.memoizedProps=n.memoizedProps,i.memoizedState=n.memoizedState,i.updateQueue=n.updateQueue,r=n.dependencies,i.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},i.sibling=n.sibling,i.index=n.index,i.ref=n.ref,i.refCleanup=n.refCleanup,i}function A0(n,r){n.flags&=65011714;var i=n.alternate;return i===null?(n.childLanes=0,n.lanes=r,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=i.childLanes,n.lanes=i.lanes,n.child=i.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=i.memoizedProps,n.memoizedState=i.memoizedState,n.updateQueue=i.updateQueue,n.type=i.type,r=i.dependencies,n.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),n}function Ko(n,r,i,u,p,g){var _=0;if(u=n,typeof n=="function")dd(n)&&(_=1);else if(typeof n=="string")_=e2(n,i,ge.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case fe:return n=Wn(31,i,r,p),n.elementType=fe,n.lanes=g,n;case S:return ys(i.children,p,g,r);case C:_=8,p|=24;break;case v:return n=Wn(12,i,r,p|2),n.elementType=v,n.lanes=g,n;case $:return n=Wn(13,i,r,p),n.elementType=$,n.lanes=g,n;case L:return n=Wn(19,i,r,p),n.elementType=L,n.lanes=g,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case k:_=10;break e;case M:_=9;break e;case D:_=11;break e;case Y:_=14;break e;case re:_=16,u=null;break e}_=29,i=Error(s(130,n===null?"null":typeof n,"")),u=null}return r=Wn(_,i,r,p),r.elementType=n,r.type=u,r.lanes=g,r}function ys(n,r,i,u){return n=Wn(7,n,u,r),n.lanes=i,n}function fd(n,r,i){return n=Wn(6,n,null,r),n.lanes=i,n}function C0(n){var r=Wn(18,null,null,0);return r.stateNode=n,r}function md(n,r,i){return r=Wn(4,n.children!==null?n.children:[],n.key,r),r.lanes=i,r.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},r}var w0=new WeakMap;function ma(n,r){if(typeof n=="object"&&n!==null){var i=w0.get(n);return i!==void 0?i:(r={value:n,source:r,stack:Cn(r)},w0.set(n,r),r)}return{value:n,source:r,stack:Cn(r)}}var si=[],ii=0,Vo=null,cl=0,ha=[],pa=0,Mr=null,Ua=1,Ha="";function sr(n,r){si[ii++]=cl,si[ii++]=Vo,Vo=n,cl=r}function k0(n,r,i){ha[pa++]=Ua,ha[pa++]=Ha,ha[pa++]=Mr,Mr=n;var u=Ua;n=Ha;var p=32-gt(u)-1;u&=~(1<<p),i+=1;var g=32-gt(r)+p;if(30<g){var _=p-p%5;g=(u&(1<<_)-1).toString(32),u>>=_,p-=_,Ua=1<<32-gt(r)+p|i<<p|u,Ha=g+n}else Ua=1<<g|i<<p|u,Ha=n}function hd(n){n.return!==null&&(sr(n,1),k0(n,1,0))}function pd(n){for(;n===Vo;)Vo=si[--ii],si[ii]=null,cl=si[--ii],si[ii]=null;for(;n===Mr;)Mr=ha[--pa],ha[pa]=null,Ha=ha[--pa],ha[pa]=null,Ua=ha[--pa],ha[pa]=null}function R0(n,r){ha[pa++]=Ua,ha[pa++]=Ha,ha[pa++]=Mr,Ua=r.id,Ha=r.overflow,Mr=n}var gn=null,Dt=null,ot=!1,Dr=null,ga=!1,gd=Error(s(519));function Lr(n){var r=Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw dl(ma(r,n)),gd}function O0(n){var r=n.stateNode,i=n.type,u=n.memoizedProps;switch(r[Gt]=n,r[Tn]=u,i){case"dialog":at("cancel",r),at("close",r);break;case"iframe":case"object":case"embed":at("load",r);break;case"video":case"audio":for(i=0;i<Ml.length;i++)at(Ml[i],r);break;case"source":at("error",r);break;case"img":case"image":case"link":at("error",r),at("load",r);break;case"details":at("toggle",r);break;case"input":at("invalid",r),ps(r,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0);break;case"select":at("invalid",r);break;case"textarea":at("invalid",r),Js(r,u.value,u.defaultValue,u.children)}i=u.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||r.textContent===""+i||u.suppressHydrationWarning===!0||Vg(r.textContent,i)?(u.popover!=null&&(at("beforetoggle",r),at("toggle",r)),u.onScroll!=null&&at("scroll",r),u.onScrollEnd!=null&&at("scrollend",r),u.onClick!=null&&(r.onclick=_e),r=!0):r=!1,r||Lr(n,!0)}function I0(n){for(gn=n.return;gn;)switch(gn.tag){case 5:case 31:case 13:ga=!1;return;case 27:case 3:ga=!0;return;default:gn=gn.return}}function li(n){if(n!==gn)return!1;if(!ot)return I0(n),ot=!0,!1;var r=n.tag,i;if((i=r!==3&&r!==27)&&((i=r===5)&&(i=n.type,i=!(i!=="form"&&i!=="button")||Lf(n.type,n.memoizedProps)),i=!i),i&&Dt&&Lr(n),I0(n),r===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(s(317));Dt=ab(n)}else if(r===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(s(317));Dt=ab(n)}else r===27?(r=Dt,Qr(n.type)?(n=Hf,Hf=null,Dt=n):Dt=r):Dt=gn?xa(n.stateNode.nextSibling):null;return!0}function Ts(){Dt=gn=null,ot=!1}function bd(){var n=Dr;return n!==null&&(zn===null?zn=n:zn.push.apply(zn,n),Dr=null),n}function dl(n){Dr===null?Dr=[n]:Dr.push(n)}var xd=R(null),_s=null,ir=null;function jr(n,r,i){O(xd,r._currentValue),r._currentValue=i}function lr(n){n._currentValue=xd.current,X(xd)}function Ed(n,r,i){for(;n!==null;){var u=n.alternate;if((n.childLanes&r)!==r?(n.childLanes|=r,u!==null&&(u.childLanes|=r)):u!==null&&(u.childLanes&r)!==r&&(u.childLanes|=r),n===i)break;n=n.return}}function yd(n,r,i,u){var p=n.child;for(p!==null&&(p.return=n);p!==null;){var g=p.dependencies;if(g!==null){var _=p.child;g=g.firstContext;e:for(;g!==null;){var w=g;g=p;for(var z=0;z<r.length;z++)if(w.context===r[z]){g.lanes|=i,w=g.alternate,w!==null&&(w.lanes|=i),Ed(g.return,i,n),u||(_=null);break e}g=w.next}}else if(p.tag===18){if(_=p.return,_===null)throw Error(s(341));_.lanes|=i,g=_.alternate,g!==null&&(g.lanes|=i),Ed(_,i,n),_=null}else _=p.child;if(_!==null)_.return=p;else for(_=p;_!==null;){if(_===n){_=null;break}if(p=_.sibling,p!==null){p.return=_.return,_=p;break}_=_.return}p=_}}function oi(n,r,i,u){n=null;for(var p=r,g=!1;p!==null;){if(!g){if((p.flags&524288)!==0)g=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var _=p.alternate;if(_===null)throw Error(s(387));if(_=_.memoizedProps,_!==null){var w=p.type;Zn(p.pendingProps.value,_.value)||(n!==null?n.push(w):n=[w])}}else if(p===$e.current){if(_=p.alternate,_===null)throw Error(s(387));_.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(n!==null?n.push(Pl):n=[Pl])}p=p.return}n!==null&&yd(r,n,i,u),r.flags|=262144}function Qo(n){for(n=n.firstContext;n!==null;){if(!Zn(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function Ns(n){_s=n,ir=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function bn(n){return M0(_s,n)}function Xo(n,r){return _s===null&&Ns(n),M0(n,r)}function M0(n,r){var i=r._currentValue;if(r={context:r,memoizedValue:i,next:null},ir===null){if(n===null)throw Error(s(308));ir=r,n.dependencies={lanes:0,firstContext:r},n.flags|=524288}else ir=ir.next=r;return i}var X_=typeof AbortController<"u"?AbortController:function(){var n=[],r=this.signal={aborted:!1,addEventListener:function(i,u){n.push(u)}};this.abort=function(){r.aborted=!0,n.forEach(function(i){return i()})}},Z_=e.unstable_scheduleCallback,W_=e.unstable_NormalPriority,en={$$typeof:k,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Td(){return{controller:new X_,data:new Map,refCount:0}}function fl(n){n.refCount--,n.refCount===0&&Z_(W_,function(){n.controller.abort()})}var ml=null,_d=0,ui=0,ci=null;function J_(n,r){if(ml===null){var i=ml=[];_d=0,ui=Af(),ci={status:"pending",value:void 0,then:function(u){i.push(u)}}}return _d++,r.then(D0,D0),r}function D0(){if(--_d===0&&ml!==null){ci!==null&&(ci.status="fulfilled");var n=ml;ml=null,ui=0,ci=null;for(var r=0;r<n.length;r++)(0,n[r])()}}function eN(n,r){var i=[],u={status:"pending",value:null,reason:null,then:function(p){i.push(p)}};return n.then(function(){u.status="fulfilled",u.value=r;for(var p=0;p<i.length;p++)(0,i[p])(r)},function(p){for(u.status="rejected",u.reason=p,p=0;p<i.length;p++)(0,i[p])(void 0)}),u}var L0=V.S;V.S=function(n,r){xg=_t(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&J_(n,r),L0!==null&&L0(n,r)};var Ss=R(null);function Nd(){var n=Ss.current;return n!==null?n:wt.pooledCache}function Zo(n,r){r===null?O(Ss,Ss.current):O(Ss,r.pool)}function j0(){var n=Nd();return n===null?null:{parent:en._currentValue,pool:n}}var di=Error(s(460)),Sd=Error(s(474)),Wo=Error(s(542)),Jo={then:function(){}};function B0(n){return n=n.status,n==="fulfilled"||n==="rejected"}function P0(n,r,i){switch(i=n[i],i===void 0?n.push(r):i!==r&&(r.then(_e,_e),r=i),r.status){case"fulfilled":return r.value;case"rejected":throw n=r.reason,H0(n),n;default:if(typeof r.status=="string")r.then(_e,_e);else{if(n=wt,n!==null&&100<n.shellSuspendCounter)throw Error(s(482));n=r,n.status="pending",n.then(function(u){if(r.status==="pending"){var p=r;p.status="fulfilled",p.value=u}},function(u){if(r.status==="pending"){var p=r;p.status="rejected",p.reason=u}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw n=r.reason,H0(n),n}throw As=r,di}}function vs(n){try{var r=n._init;return r(n._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(As=i,di):i}}var As=null;function U0(){if(As===null)throw Error(s(459));var n=As;return As=null,n}function H0(n){if(n===di||n===Wo)throw Error(s(483))}var fi=null,hl=0;function eu(n){var r=hl;return hl+=1,fi===null&&(fi=[]),P0(fi,n,r)}function pl(n,r){r=r.props.ref,n.ref=r!==void 0?r:null}function tu(n,r){throw r.$$typeof===y?Error(s(525)):(n=Object.prototype.toString.call(r),Error(s(31,n==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":n)))}function F0(n){function r(Q,K){if(n){var ee=Q.deletions;ee===null?(Q.deletions=[K],Q.flags|=16):ee.push(K)}}function i(Q,K){if(!n)return null;for(;K!==null;)r(Q,K),K=K.sibling;return null}function u(Q){for(var K=new Map;Q!==null;)Q.key!==null?K.set(Q.key,Q):K.set(Q.index,Q),Q=Q.sibling;return K}function p(Q,K){return Q=rr(Q,K),Q.index=0,Q.sibling=null,Q}function g(Q,K,ee){return Q.index=ee,n?(ee=Q.alternate,ee!==null?(ee=ee.index,ee<K?(Q.flags|=67108866,K):ee):(Q.flags|=67108866,K)):(Q.flags|=1048576,K)}function _(Q){return n&&Q.alternate===null&&(Q.flags|=67108866),Q}function w(Q,K,ee,de){return K===null||K.tag!==6?(K=fd(ee,Q.mode,de),K.return=Q,K):(K=p(K,ee),K.return=Q,K)}function z(Q,K,ee,de){var je=ee.type;return je===S?ue(Q,K,ee.props.children,de,ee.key):K!==null&&(K.elementType===je||typeof je=="object"&&je!==null&&je.$$typeof===re&&vs(je)===K.type)?(K=p(K,ee.props),pl(K,ee),K.return=Q,K):(K=Ko(ee.type,ee.key,ee.props,null,Q.mode,de),pl(K,ee),K.return=Q,K)}function te(Q,K,ee,de){return K===null||K.tag!==4||K.stateNode.containerInfo!==ee.containerInfo||K.stateNode.implementation!==ee.implementation?(K=md(ee,Q.mode,de),K.return=Q,K):(K=p(K,ee.children||[]),K.return=Q,K)}function ue(Q,K,ee,de,je){return K===null||K.tag!==7?(K=ys(ee,Q.mode,de,je),K.return=Q,K):(K=p(K,ee),K.return=Q,K)}function he(Q,K,ee){if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return K=fd(""+K,Q.mode,ee),K.return=Q,K;if(typeof K=="object"&&K!==null){switch(K.$$typeof){case T:return ee=Ko(K.type,K.key,K.props,null,Q.mode,ee),pl(ee,K),ee.return=Q,ee;case N:return K=md(K,Q.mode,ee),K.return=Q,K;case re:return K=vs(K),he(Q,K,ee)}if(J(K)||ae(K))return K=ys(K,Q.mode,ee,null),K.return=Q,K;if(typeof K.then=="function")return he(Q,eu(K),ee);if(K.$$typeof===k)return he(Q,Xo(Q,K),ee);tu(Q,K)}return null}function ne(Q,K,ee,de){var je=K!==null?K.key:null;if(typeof ee=="string"&&ee!==""||typeof ee=="number"||typeof ee=="bigint")return je!==null?null:w(Q,K,""+ee,de);if(typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case T:return ee.key===je?z(Q,K,ee,de):null;case N:return ee.key===je?te(Q,K,ee,de):null;case re:return ee=vs(ee),ne(Q,K,ee,de)}if(J(ee)||ae(ee))return je!==null?null:ue(Q,K,ee,de,null);if(typeof ee.then=="function")return ne(Q,K,eu(ee),de);if(ee.$$typeof===k)return ne(Q,K,Xo(Q,ee),de);tu(Q,ee)}return null}function ie(Q,K,ee,de,je){if(typeof de=="string"&&de!==""||typeof de=="number"||typeof de=="bigint")return Q=Q.get(ee)||null,w(K,Q,""+de,je);if(typeof de=="object"&&de!==null){switch(de.$$typeof){case T:return Q=Q.get(de.key===null?ee:de.key)||null,z(K,Q,de,je);case N:return Q=Q.get(de.key===null?ee:de.key)||null,te(K,Q,de,je);case re:return de=vs(de),ie(Q,K,ee,de,je)}if(J(de)||ae(de))return Q=Q.get(ee)||null,ue(K,Q,de,je,null);if(typeof de.then=="function")return ie(Q,K,ee,eu(de),je);if(de.$$typeof===k)return ie(Q,K,ee,Xo(K,de),je);tu(K,de)}return null}function Re(Q,K,ee,de){for(var je=null,mt=null,De=K,Ze=K=0,lt=null;De!==null&&Ze<ee.length;Ze++){De.index>Ze?(lt=De,De=null):lt=De.sibling;var ht=ne(Q,De,ee[Ze],de);if(ht===null){De===null&&(De=lt);break}n&&De&&ht.alternate===null&&r(Q,De),K=g(ht,K,Ze),mt===null?je=ht:mt.sibling=ht,mt=ht,De=lt}if(Ze===ee.length)return i(Q,De),ot&&sr(Q,Ze),je;if(De===null){for(;Ze<ee.length;Ze++)De=he(Q,ee[Ze],de),De!==null&&(K=g(De,K,Ze),mt===null?je=De:mt.sibling=De,mt=De);return ot&&sr(Q,Ze),je}for(De=u(De);Ze<ee.length;Ze++)lt=ie(De,Q,Ze,ee[Ze],de),lt!==null&&(n&<.alternate!==null&&De.delete(lt.key===null?Ze:lt.key),K=g(lt,K,Ze),mt===null?je=lt:mt.sibling=lt,mt=lt);return n&&De.forEach(function(es){return r(Q,es)}),ot&&sr(Q,Ze),je}function Fe(Q,K,ee,de){if(ee==null)throw Error(s(151));for(var je=null,mt=null,De=K,Ze=K=0,lt=null,ht=ee.next();De!==null&&!ht.done;Ze++,ht=ee.next()){De.index>Ze?(lt=De,De=null):lt=De.sibling;var es=ne(Q,De,ht.value,de);if(es===null){De===null&&(De=lt);break}n&&De&&es.alternate===null&&r(Q,De),K=g(es,K,Ze),mt===null?je=es:mt.sibling=es,mt=es,De=lt}if(ht.done)return i(Q,De),ot&&sr(Q,Ze),je;if(De===null){for(;!ht.done;Ze++,ht=ee.next())ht=he(Q,ht.value,de),ht!==null&&(K=g(ht,K,Ze),mt===null?je=ht:mt.sibling=ht,mt=ht);return ot&&sr(Q,Ze),je}for(De=u(De);!ht.done;Ze++,ht=ee.next())ht=ie(De,Q,Ze,ht.value,de),ht!==null&&(n&&ht.alternate!==null&&De.delete(ht.key===null?Ze:ht.key),K=g(ht,K,Ze),mt===null?je=ht:mt.sibling=ht,mt=ht);return n&&De.forEach(function(d2){return r(Q,d2)}),ot&&sr(Q,Ze),je}function vt(Q,K,ee,de){if(typeof ee=="object"&&ee!==null&&ee.type===S&&ee.key===null&&(ee=ee.props.children),typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case T:e:{for(var je=ee.key;K!==null;){if(K.key===je){if(je=ee.type,je===S){if(K.tag===7){i(Q,K.sibling),de=p(K,ee.props.children),de.return=Q,Q=de;break e}}else if(K.elementType===je||typeof je=="object"&&je!==null&&je.$$typeof===re&&vs(je)===K.type){i(Q,K.sibling),de=p(K,ee.props),pl(de,ee),de.return=Q,Q=de;break e}i(Q,K);break}else r(Q,K);K=K.sibling}ee.type===S?(de=ys(ee.props.children,Q.mode,de,ee.key),de.return=Q,Q=de):(de=Ko(ee.type,ee.key,ee.props,null,Q.mode,de),pl(de,ee),de.return=Q,Q=de)}return _(Q);case N:e:{for(je=ee.key;K!==null;){if(K.key===je)if(K.tag===4&&K.stateNode.containerInfo===ee.containerInfo&&K.stateNode.implementation===ee.implementation){i(Q,K.sibling),de=p(K,ee.children||[]),de.return=Q,Q=de;break e}else{i(Q,K);break}else r(Q,K);K=K.sibling}de=md(ee,Q.mode,de),de.return=Q,Q=de}return _(Q);case re:return ee=vs(ee),vt(Q,K,ee,de)}if(J(ee))return Re(Q,K,ee,de);if(ae(ee)){if(je=ae(ee),typeof je!="function")throw Error(s(150));return ee=je.call(ee),Fe(Q,K,ee,de)}if(typeof ee.then=="function")return vt(Q,K,eu(ee),de);if(ee.$$typeof===k)return vt(Q,K,Xo(Q,ee),de);tu(Q,ee)}return typeof ee=="string"&&ee!==""||typeof ee=="number"||typeof ee=="bigint"?(ee=""+ee,K!==null&&K.tag===6?(i(Q,K.sibling),de=p(K,ee),de.return=Q,Q=de):(i(Q,K),de=fd(ee,Q.mode,de),de.return=Q,Q=de),_(Q)):i(Q,K)}return function(Q,K,ee,de){try{hl=0;var je=vt(Q,K,ee,de);return fi=null,je}catch(De){if(De===di||De===Wo)throw De;var mt=Wn(29,De,null,Q.mode);return mt.lanes=de,mt.return=Q,mt}finally{}}}var Cs=F0(!0),z0=F0(!1),Br=!1;function vd(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ad(n,r){n=n.updateQueue,r.updateQueue===n&&(r.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function Pr(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function Ur(n,r,i){var u=n.updateQueue;if(u===null)return null;if(u=u.shared,(pt&2)!==0){var p=u.pending;return p===null?r.next=r:(r.next=p.next,p.next=r),u.pending=r,r=Go(n),v0(n,null,i),r}return $o(n,u,r,i),Go(n)}function gl(n,r,i){if(r=r.updateQueue,r!==null&&(r=r.shared,(i&4194048)!==0)){var u=r.lanes;u&=n.pendingLanes,i|=u,r.lanes=i,Ye(n,i)}}function Cd(n,r){var i=n.updateQueue,u=n.alternate;if(u!==null&&(u=u.updateQueue,i===u)){var p=null,g=null;if(i=i.firstBaseUpdate,i!==null){do{var _={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};g===null?p=g=_:g=g.next=_,i=i.next}while(i!==null);g===null?p=g=r:g=g.next=r}else p=g=r;i={baseState:u.baseState,firstBaseUpdate:p,lastBaseUpdate:g,shared:u.shared,callbacks:u.callbacks},n.updateQueue=i;return}n=i.lastBaseUpdate,n===null?i.firstBaseUpdate=r:n.next=r,i.lastBaseUpdate=r}var wd=!1;function bl(){if(wd){var n=ci;if(n!==null)throw n}}function xl(n,r,i,u){wd=!1;var p=n.updateQueue;Br=!1;var g=p.firstBaseUpdate,_=p.lastBaseUpdate,w=p.shared.pending;if(w!==null){p.shared.pending=null;var z=w,te=z.next;z.next=null,_===null?g=te:_.next=te,_=z;var ue=n.alternate;ue!==null&&(ue=ue.updateQueue,w=ue.lastBaseUpdate,w!==_&&(w===null?ue.firstBaseUpdate=te:w.next=te,ue.lastBaseUpdate=z))}if(g!==null){var he=p.baseState;_=0,ue=te=z=null,w=g;do{var ne=w.lane&-536870913,ie=ne!==w.lane;if(ie?(it&ne)===ne:(u&ne)===ne){ne!==0&&ne===ui&&(wd=!0),ue!==null&&(ue=ue.next={lane:0,tag:w.tag,payload:w.payload,callback:null,next:null});e:{var Re=n,Fe=w;ne=r;var vt=i;switch(Fe.tag){case 1:if(Re=Fe.payload,typeof Re=="function"){he=Re.call(vt,he,ne);break e}he=Re;break e;case 3:Re.flags=Re.flags&-65537|128;case 0:if(Re=Fe.payload,ne=typeof Re=="function"?Re.call(vt,he,ne):Re,ne==null)break e;he=x({},he,ne);break e;case 2:Br=!0}}ne=w.callback,ne!==null&&(n.flags|=64,ie&&(n.flags|=8192),ie=p.callbacks,ie===null?p.callbacks=[ne]:ie.push(ne))}else ie={lane:ne,tag:w.tag,payload:w.payload,callback:w.callback,next:null},ue===null?(te=ue=ie,z=he):ue=ue.next=ie,_|=ne;if(w=w.next,w===null){if(w=p.shared.pending,w===null)break;ie=w,w=ie.next,ie.next=null,p.lastBaseUpdate=ie,p.shared.pending=null}}while(!0);ue===null&&(z=he),p.baseState=z,p.firstBaseUpdate=te,p.lastBaseUpdate=ue,g===null&&(p.shared.lanes=0),Yr|=_,n.lanes=_,n.memoizedState=he}}function q0(n,r){if(typeof n!="function")throw Error(s(191,n));n.call(r)}function Y0(n,r){var i=n.callbacks;if(i!==null)for(n.callbacks=null,n=0;n<i.length;n++)q0(i[n],r)}var mi=R(null),nu=R(0);function $0(n,r){n=gr,O(nu,n),O(mi,r),gr=n|r.baseLanes}function kd(){O(nu,gr),O(mi,mi.current)}function Rd(){gr=nu.current,X(mi),X(nu)}var Jn=R(null),ba=null;function Hr(n){var r=n.alternate;O(Vt,Vt.current&1),O(Jn,n),ba===null&&(r===null||mi.current!==null||r.memoizedState!==null)&&(ba=n)}function Od(n){O(Vt,Vt.current),O(Jn,n),ba===null&&(ba=n)}function G0(n){n.tag===22?(O(Vt,Vt.current),O(Jn,n),ba===null&&(ba=n)):Fr()}function Fr(){O(Vt,Vt.current),O(Jn,Jn.current)}function ea(n){X(Jn),ba===n&&(ba=null),X(Vt)}var Vt=R(0);function au(n){for(var r=n;r!==null;){if(r.tag===13){var i=r.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||Pf(i)||Uf(i)))return r}else if(r.tag===19&&(r.memoizedProps.revealOrder==="forwards"||r.memoizedProps.revealOrder==="backwards"||r.memoizedProps.revealOrder==="unstable_legacy-backwards"||r.memoizedProps.revealOrder==="together")){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===n)break;for(;r.sibling===null;){if(r.return===null||r.return===n)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var or=0,Xe=null,Nt=null,tn=null,ru=!1,hi=!1,ws=!1,su=0,El=0,pi=null,tN=0;function zt(){throw Error(s(321))}function Id(n,r){if(r===null)return!1;for(var i=0;i<r.length&&i<n.length;i++)if(!Zn(n[i],r[i]))return!1;return!0}function Md(n,r,i,u,p,g){return or=g,Xe=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,V.H=n===null||n.memoizedState===null?kp:Vd,ws=!1,g=i(u,p),ws=!1,hi&&(g=V0(r,i,u,p)),K0(n),g}function K0(n){V.H=_l;var r=Nt!==null&&Nt.next!==null;if(or=0,tn=Nt=Xe=null,ru=!1,El=0,pi=null,r)throw Error(s(300));n===null||nn||(n=n.dependencies,n!==null&&Qo(n)&&(nn=!0))}function V0(n,r,i,u){Xe=n;var p=0;do{if(hi&&(pi=null),El=0,hi=!1,25<=p)throw Error(s(301));if(p+=1,tn=Nt=null,n.updateQueue!=null){var g=n.updateQueue;g.lastEffect=null,g.events=null,g.stores=null,g.memoCache!=null&&(g.memoCache.index=0)}V.H=Rp,g=r(i,u)}while(hi);return g}function nN(){var n=V.H,r=n.useState()[0];return r=typeof r.then=="function"?yl(r):r,n=n.useState()[0],(Nt!==null?Nt.memoizedState:null)!==n&&(Xe.flags|=1024),r}function Dd(){var n=su!==0;return su=0,n}function Ld(n,r,i){r.updateQueue=n.updateQueue,r.flags&=-2053,n.lanes&=~i}function jd(n){if(ru){for(n=n.memoizedState;n!==null;){var r=n.queue;r!==null&&(r.pending=null),n=n.next}ru=!1}or=0,tn=Nt=Xe=null,hi=!1,El=su=0,pi=null}function Rn(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return tn===null?Xe.memoizedState=tn=n:tn=tn.next=n,tn}function Qt(){if(Nt===null){var n=Xe.alternate;n=n!==null?n.memoizedState:null}else n=Nt.next;var r=tn===null?Xe.memoizedState:tn.next;if(r!==null)tn=r,Nt=n;else{if(n===null)throw Xe.alternate===null?Error(s(467)):Error(s(310));Nt=n,n={memoizedState:Nt.memoizedState,baseState:Nt.baseState,baseQueue:Nt.baseQueue,queue:Nt.queue,next:null},tn===null?Xe.memoizedState=tn=n:tn=tn.next=n}return tn}function iu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function yl(n){var r=El;return El+=1,pi===null&&(pi=[]),n=P0(pi,n,r),r=Xe,(tn===null?r.memoizedState:tn.next)===null&&(r=r.alternate,V.H=r===null||r.memoizedState===null?kp:Vd),n}function lu(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return yl(n);if(n.$$typeof===k)return bn(n)}throw Error(s(438,String(n)))}function Bd(n){var r=null,i=Xe.updateQueue;if(i!==null&&(r=i.memoCache),r==null){var u=Xe.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(r={data:u.data.map(function(p){return p.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),i===null&&(i=iu(),Xe.updateQueue=i),i.memoCache=r,i=r.data[r.index],i===void 0)for(i=r.data[r.index]=Array(n),u=0;u<n;u++)i[u]=U;return r.index++,i}function ur(n,r){return typeof r=="function"?r(n):r}function ou(n){var r=Qt();return Pd(r,Nt,n)}function Pd(n,r,i){var u=n.queue;if(u===null)throw Error(s(311));u.lastRenderedReducer=i;var p=n.baseQueue,g=u.pending;if(g!==null){if(p!==null){var _=p.next;p.next=g.next,g.next=_}r.baseQueue=p=g,u.pending=null}if(g=n.baseState,p===null)n.memoizedState=g;else{r=p.next;var w=_=null,z=null,te=r,ue=!1;do{var he=te.lane&-536870913;if(he!==te.lane?(it&he)===he:(or&he)===he){var ne=te.revertLane;if(ne===0)z!==null&&(z=z.next={lane:0,revertLane:0,gesture:null,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null}),he===ui&&(ue=!0);else if((or&ne)===ne){te=te.next,ne===ui&&(ue=!0);continue}else he={lane:0,revertLane:te.revertLane,gesture:null,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null},z===null?(w=z=he,_=g):z=z.next=he,Xe.lanes|=ne,Yr|=ne;he=te.action,ws&&i(g,he),g=te.hasEagerState?te.eagerState:i(g,he)}else ne={lane:he,revertLane:te.revertLane,gesture:te.gesture,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null},z===null?(w=z=ne,_=g):z=z.next=ne,Xe.lanes|=he,Yr|=he;te=te.next}while(te!==null&&te!==r);if(z===null?_=g:z.next=w,!Zn(g,n.memoizedState)&&(nn=!0,ue&&(i=ci,i!==null)))throw i;n.memoizedState=g,n.baseState=_,n.baseQueue=z,u.lastRenderedState=g}return p===null&&(u.lanes=0),[n.memoizedState,u.dispatch]}function Ud(n){var r=Qt(),i=r.queue;if(i===null)throw Error(s(311));i.lastRenderedReducer=n;var u=i.dispatch,p=i.pending,g=r.memoizedState;if(p!==null){i.pending=null;var _=p=p.next;do g=n(g,_.action),_=_.next;while(_!==p);Zn(g,r.memoizedState)||(nn=!0),r.memoizedState=g,r.baseQueue===null&&(r.baseState=g),i.lastRenderedState=g}return[g,u]}function Q0(n,r,i){var u=Xe,p=Qt(),g=ot;if(g){if(i===void 0)throw Error(s(407));i=i()}else i=r();var _=!Zn((Nt||p).memoizedState,i);if(_&&(p.memoizedState=i,nn=!0),p=p.queue,zd(W0.bind(null,u,p,n),[n]),p.getSnapshot!==r||_||tn!==null&&tn.memoizedState.tag&1){if(u.flags|=2048,gi(9,{destroy:void 0},Z0.bind(null,u,p,i,r),null),wt===null)throw Error(s(349));g||(or&127)!==0||X0(u,r,i)}return i}function X0(n,r,i){n.flags|=16384,n={getSnapshot:r,value:i},r=Xe.updateQueue,r===null?(r=iu(),Xe.updateQueue=r,r.stores=[n]):(i=r.stores,i===null?r.stores=[n]:i.push(n))}function Z0(n,r,i,u){r.value=i,r.getSnapshot=u,J0(r)&&ep(n)}function W0(n,r,i){return i(function(){J0(r)&&ep(n)})}function J0(n){var r=n.getSnapshot;n=n.value;try{var i=r();return!Zn(n,i)}catch{return!0}}function ep(n){var r=Es(n,2);r!==null&&qn(r,n,2)}function Hd(n){var r=Rn();if(typeof n=="function"){var i=n;if(n=i(),ws){cn(!0);try{i()}finally{cn(!1)}}}return r.memoizedState=r.baseState=n,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ur,lastRenderedState:n},r}function tp(n,r,i,u){return n.baseState=i,Pd(n,Nt,typeof u=="function"?u:ur)}function aN(n,r,i,u,p){if(du(n))throw Error(s(485));if(n=r.action,n!==null){var g={payload:p,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(_){g.listeners.push(_)}};V.T!==null?i(!0):g.isTransition=!1,u(g),i=r.pending,i===null?(g.next=r.pending=g,np(r,g)):(g.next=i.next,r.pending=i.next=g)}}function np(n,r){var i=r.action,u=r.payload,p=n.state;if(r.isTransition){var g=V.T,_={};V.T=_;try{var w=i(p,u),z=V.S;z!==null&&z(_,w),ap(n,r,w)}catch(te){Fd(n,r,te)}finally{g!==null&&_.types!==null&&(g.types=_.types),V.T=g}}else try{g=i(p,u),ap(n,r,g)}catch(te){Fd(n,r,te)}}function ap(n,r,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(u){rp(n,r,u)},function(u){return Fd(n,r,u)}):rp(n,r,i)}function rp(n,r,i){r.status="fulfilled",r.value=i,sp(r),n.state=i,r=n.pending,r!==null&&(i=r.next,i===r?n.pending=null:(i=i.next,r.next=i,np(n,i)))}function Fd(n,r,i){var u=n.pending;if(n.pending=null,u!==null){u=u.next;do r.status="rejected",r.reason=i,sp(r),r=r.next;while(r!==u)}n.action=null}function sp(n){n=n.listeners;for(var r=0;r<n.length;r++)(0,n[r])()}function ip(n,r){return r}function lp(n,r){if(ot){var i=wt.formState;if(i!==null){e:{var u=Xe;if(ot){if(Dt){t:{for(var p=Dt,g=ga;p.nodeType!==8;){if(!g){p=null;break t}if(p=xa(p.nextSibling),p===null){p=null;break t}}g=p.data,p=g==="F!"||g==="F"?p:null}if(p){Dt=xa(p.nextSibling),u=p.data==="F!";break e}}Lr(u)}u=!1}u&&(r=i[0])}}return i=Rn(),i.memoizedState=i.baseState=r,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ip,lastRenderedState:r},i.queue=u,i=Ap.bind(null,Xe,u),u.dispatch=i,u=Hd(!1),g=Kd.bind(null,Xe,!1,u.queue),u=Rn(),p={state:r,dispatch:null,action:n,pending:null},u.queue=p,i=aN.bind(null,Xe,p,g,i),p.dispatch=i,u.memoizedState=n,[r,i,!1]}function op(n){var r=Qt();return up(r,Nt,n)}function up(n,r,i){if(r=Pd(n,r,ip)[0],n=ou(ur)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var u=yl(r)}catch(_){throw _===di?Wo:_}else u=r;r=Qt();var p=r.queue,g=p.dispatch;return i!==r.memoizedState&&(Xe.flags|=2048,gi(9,{destroy:void 0},rN.bind(null,p,i),null)),[u,g,n]}function rN(n,r){n.action=r}function cp(n){var r=Qt(),i=Nt;if(i!==null)return up(r,i,n);Qt(),r=r.memoizedState,i=Qt();var u=i.queue.dispatch;return i.memoizedState=n,[r,u,!1]}function gi(n,r,i,u){return n={tag:n,create:i,deps:u,inst:r,next:null},r=Xe.updateQueue,r===null&&(r=iu(),Xe.updateQueue=r),i=r.lastEffect,i===null?r.lastEffect=n.next=n:(u=i.next,i.next=n,n.next=u,r.lastEffect=n),n}function dp(){return Qt().memoizedState}function uu(n,r,i,u){var p=Rn();Xe.flags|=n,p.memoizedState=gi(1|r,{destroy:void 0},i,u===void 0?null:u)}function cu(n,r,i,u){var p=Qt();u=u===void 0?null:u;var g=p.memoizedState.inst;Nt!==null&&u!==null&&Id(u,Nt.memoizedState.deps)?p.memoizedState=gi(r,g,i,u):(Xe.flags|=n,p.memoizedState=gi(1|r,g,i,u))}function fp(n,r){uu(8390656,8,n,r)}function zd(n,r){cu(2048,8,n,r)}function sN(n){Xe.flags|=4;var r=Xe.updateQueue;if(r===null)r=iu(),Xe.updateQueue=r,r.events=[n];else{var i=r.events;i===null?r.events=[n]:i.push(n)}}function mp(n){var r=Qt().memoizedState;return sN({ref:r,nextImpl:n}),function(){if((pt&2)!==0)throw Error(s(440));return r.impl.apply(void 0,arguments)}}function hp(n,r){return cu(4,2,n,r)}function pp(n,r){return cu(4,4,n,r)}function gp(n,r){if(typeof r=="function"){n=n();var i=r(n);return function(){typeof i=="function"?i():r(null)}}if(r!=null)return n=n(),r.current=n,function(){r.current=null}}function bp(n,r,i){i=i!=null?i.concat([n]):null,cu(4,4,gp.bind(null,r,n),i)}function qd(){}function xp(n,r){var i=Qt();r=r===void 0?null:r;var u=i.memoizedState;return r!==null&&Id(r,u[1])?u[0]:(i.memoizedState=[n,r],n)}function Ep(n,r){var i=Qt();r=r===void 0?null:r;var u=i.memoizedState;if(r!==null&&Id(r,u[1]))return u[0];if(u=n(),ws){cn(!0);try{n()}finally{cn(!1)}}return i.memoizedState=[u,r],u}function Yd(n,r,i){return i===void 0||(or&1073741824)!==0&&(it&261930)===0?n.memoizedState=r:(n.memoizedState=i,n=yg(),Xe.lanes|=n,Yr|=n,i)}function yp(n,r,i,u){return Zn(i,r)?i:mi.current!==null?(n=Yd(n,i,u),Zn(n,r)||(nn=!0),n):(or&42)===0||(or&1073741824)!==0&&(it&261930)===0?(nn=!0,n.memoizedState=i):(n=yg(),Xe.lanes|=n,Yr|=n,r)}function Tp(n,r,i,u,p){var g=G.p;G.p=g!==0&&8>g?g:8;var _=V.T,w={};V.T=w,Kd(n,!1,r,i);try{var z=p(),te=V.S;if(te!==null&&te(w,z),z!==null&&typeof z=="object"&&typeof z.then=="function"){var ue=eN(z,u);Tl(n,r,ue,aa(n))}else Tl(n,r,u,aa(n))}catch(he){Tl(n,r,{then:function(){},status:"rejected",reason:he},aa())}finally{G.p=g,_!==null&&w.types!==null&&(_.types=w.types),V.T=_}}function iN(){}function $d(n,r,i,u){if(n.tag!==5)throw Error(s(476));var p=_p(n).queue;Tp(n,p,r,pe,i===null?iN:function(){return Np(n),i(u)})}function _p(n){var r=n.memoizedState;if(r!==null)return r;r={memoizedState:pe,baseState:pe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ur,lastRenderedState:pe},next:null};var i={};return r.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ur,lastRenderedState:i},next:null},n.memoizedState=r,n=n.alternate,n!==null&&(n.memoizedState=r),r}function Np(n){var r=_p(n);r.next===null&&(r=n.alternate.memoizedState),Tl(n,r.next.queue,{},aa())}function Gd(){return bn(Pl)}function Sp(){return Qt().memoizedState}function vp(){return Qt().memoizedState}function lN(n){for(var r=n.return;r!==null;){switch(r.tag){case 24:case 3:var i=aa();n=Pr(i);var u=Ur(r,n,i);u!==null&&(qn(u,r,i),gl(u,r,i)),r={cache:Td()},n.payload=r;return}r=r.return}}function oN(n,r,i){var u=aa();i={lane:u,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},du(n)?Cp(r,i):(i=cd(n,r,i,u),i!==null&&(qn(i,n,u),wp(i,r,u)))}function Ap(n,r,i){var u=aa();Tl(n,r,i,u)}function Tl(n,r,i,u){var p={lane:u,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(du(n))Cp(r,p);else{var g=n.alternate;if(n.lanes===0&&(g===null||g.lanes===0)&&(g=r.lastRenderedReducer,g!==null))try{var _=r.lastRenderedState,w=g(_,i);if(p.hasEagerState=!0,p.eagerState=w,Zn(w,_))return $o(n,r,p,0),wt===null&&Yo(),!1}catch{}finally{}if(i=cd(n,r,p,u),i!==null)return qn(i,n,u),wp(i,r,u),!0}return!1}function Kd(n,r,i,u){if(u={lane:2,revertLane:Af(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},du(n)){if(r)throw Error(s(479))}else r=cd(n,i,u,2),r!==null&&qn(r,n,2)}function du(n){var r=n.alternate;return n===Xe||r!==null&&r===Xe}function Cp(n,r){hi=ru=!0;var i=n.pending;i===null?r.next=r:(r.next=i.next,i.next=r),n.pending=r}function wp(n,r,i){if((i&4194048)!==0){var u=r.lanes;u&=n.pendingLanes,i|=u,r.lanes=i,Ye(n,i)}}var _l={readContext:bn,use:lu,useCallback:zt,useContext:zt,useEffect:zt,useImperativeHandle:zt,useLayoutEffect:zt,useInsertionEffect:zt,useMemo:zt,useReducer:zt,useRef:zt,useState:zt,useDebugValue:zt,useDeferredValue:zt,useTransition:zt,useSyncExternalStore:zt,useId:zt,useHostTransitionStatus:zt,useFormState:zt,useActionState:zt,useOptimistic:zt,useMemoCache:zt,useCacheRefresh:zt};_l.useEffectEvent=zt;var kp={readContext:bn,use:lu,useCallback:function(n,r){return Rn().memoizedState=[n,r===void 0?null:r],n},useContext:bn,useEffect:fp,useImperativeHandle:function(n,r,i){i=i!=null?i.concat([n]):null,uu(4194308,4,gp.bind(null,r,n),i)},useLayoutEffect:function(n,r){return uu(4194308,4,n,r)},useInsertionEffect:function(n,r){uu(4,2,n,r)},useMemo:function(n,r){var i=Rn();r=r===void 0?null:r;var u=n();if(ws){cn(!0);try{n()}finally{cn(!1)}}return i.memoizedState=[u,r],u},useReducer:function(n,r,i){var u=Rn();if(i!==void 0){var p=i(r);if(ws){cn(!0);try{i(r)}finally{cn(!1)}}}else p=r;return u.memoizedState=u.baseState=p,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:p},u.queue=n,n=n.dispatch=oN.bind(null,Xe,n),[u.memoizedState,n]},useRef:function(n){var r=Rn();return n={current:n},r.memoizedState=n},useState:function(n){n=Hd(n);var r=n.queue,i=Ap.bind(null,Xe,r);return r.dispatch=i,[n.memoizedState,i]},useDebugValue:qd,useDeferredValue:function(n,r){var i=Rn();return Yd(i,n,r)},useTransition:function(){var n=Hd(!1);return n=Tp.bind(null,Xe,n.queue,!0,!1),Rn().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,r,i){var u=Xe,p=Rn();if(ot){if(i===void 0)throw Error(s(407));i=i()}else{if(i=r(),wt===null)throw Error(s(349));(it&127)!==0||X0(u,r,i)}p.memoizedState=i;var g={value:i,getSnapshot:r};return p.queue=g,fp(W0.bind(null,u,g,n),[n]),u.flags|=2048,gi(9,{destroy:void 0},Z0.bind(null,u,g,i,r),null),i},useId:function(){var n=Rn(),r=wt.identifierPrefix;if(ot){var i=Ha,u=Ua;i=(u&~(1<<32-gt(u)-1)).toString(32)+i,r="_"+r+"R_"+i,i=su++,0<i&&(r+="H"+i.toString(32)),r+="_"}else i=tN++,r="_"+r+"r_"+i.toString(32)+"_";return n.memoizedState=r},useHostTransitionStatus:Gd,useFormState:lp,useActionState:lp,useOptimistic:function(n){var r=Rn();r.memoizedState=r.baseState=n;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=i,r=Kd.bind(null,Xe,!0,i),i.dispatch=r,[n,r]},useMemoCache:Bd,useCacheRefresh:function(){return Rn().memoizedState=lN.bind(null,Xe)},useEffectEvent:function(n){var r=Rn(),i={impl:n};return r.memoizedState=i,function(){if((pt&2)!==0)throw Error(s(440));return i.impl.apply(void 0,arguments)}}},Vd={readContext:bn,use:lu,useCallback:xp,useContext:bn,useEffect:zd,useImperativeHandle:bp,useInsertionEffect:hp,useLayoutEffect:pp,useMemo:Ep,useReducer:ou,useRef:dp,useState:function(){return ou(ur)},useDebugValue:qd,useDeferredValue:function(n,r){var i=Qt();return yp(i,Nt.memoizedState,n,r)},useTransition:function(){var n=ou(ur)[0],r=Qt().memoizedState;return[typeof n=="boolean"?n:yl(n),r]},useSyncExternalStore:Q0,useId:Sp,useHostTransitionStatus:Gd,useFormState:op,useActionState:op,useOptimistic:function(n,r){var i=Qt();return tp(i,Nt,n,r)},useMemoCache:Bd,useCacheRefresh:vp};Vd.useEffectEvent=mp;var Rp={readContext:bn,use:lu,useCallback:xp,useContext:bn,useEffect:zd,useImperativeHandle:bp,useInsertionEffect:hp,useLayoutEffect:pp,useMemo:Ep,useReducer:Ud,useRef:dp,useState:function(){return Ud(ur)},useDebugValue:qd,useDeferredValue:function(n,r){var i=Qt();return Nt===null?Yd(i,n,r):yp(i,Nt.memoizedState,n,r)},useTransition:function(){var n=Ud(ur)[0],r=Qt().memoizedState;return[typeof n=="boolean"?n:yl(n),r]},useSyncExternalStore:Q0,useId:Sp,useHostTransitionStatus:Gd,useFormState:cp,useActionState:cp,useOptimistic:function(n,r){var i=Qt();return Nt!==null?tp(i,Nt,n,r):(i.baseState=n,[n,i.queue.dispatch])},useMemoCache:Bd,useCacheRefresh:vp};Rp.useEffectEvent=mp;function Qd(n,r,i,u){r=n.memoizedState,i=i(u,r),i=i==null?r:x({},r,i),n.memoizedState=i,n.lanes===0&&(n.updateQueue.baseState=i)}var Xd={enqueueSetState:function(n,r,i){n=n._reactInternals;var u=aa(),p=Pr(u);p.payload=r,i!=null&&(p.callback=i),r=Ur(n,p,u),r!==null&&(qn(r,n,u),gl(r,n,u))},enqueueReplaceState:function(n,r,i){n=n._reactInternals;var u=aa(),p=Pr(u);p.tag=1,p.payload=r,i!=null&&(p.callback=i),r=Ur(n,p,u),r!==null&&(qn(r,n,u),gl(r,n,u))},enqueueForceUpdate:function(n,r){n=n._reactInternals;var i=aa(),u=Pr(i);u.tag=2,r!=null&&(u.callback=r),r=Ur(n,u,i),r!==null&&(qn(r,n,i),gl(r,n,i))}};function Op(n,r,i,u,p,g,_){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(u,g,_):r.prototype&&r.prototype.isPureReactComponent?!ol(i,u)||!ol(p,g):!0}function Ip(n,r,i,u){n=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(i,u),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(i,u),r.state!==n&&Xd.enqueueReplaceState(r,r.state,null)}function ks(n,r){var i=r;if("ref"in r){i={};for(var u in r)u!=="ref"&&(i[u]=r[u])}if(n=n.defaultProps){i===r&&(i=x({},i));for(var p in n)i[p]===void 0&&(i[p]=n[p])}return i}function Mp(n){qo(n)}function Dp(n){console.error(n)}function Lp(n){qo(n)}function fu(n,r){try{var i=n.onUncaughtError;i(r.value,{componentStack:r.stack})}catch(u){setTimeout(function(){throw u})}}function jp(n,r,i){try{var u=n.onCaughtError;u(i.value,{componentStack:i.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function Zd(n,r,i){return i=Pr(i),i.tag=3,i.payload={element:null},i.callback=function(){fu(n,r)},i}function Bp(n){return n=Pr(n),n.tag=3,n}function Pp(n,r,i,u){var p=i.type.getDerivedStateFromError;if(typeof p=="function"){var g=u.value;n.payload=function(){return p(g)},n.callback=function(){jp(r,i,u)}}var _=i.stateNode;_!==null&&typeof _.componentDidCatch=="function"&&(n.callback=function(){jp(r,i,u),typeof p!="function"&&($r===null?$r=new Set([this]):$r.add(this));var w=u.stack;this.componentDidCatch(u.value,{componentStack:w!==null?w:""})})}function uN(n,r,i,u,p){if(i.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(r=i.alternate,r!==null&&oi(r,i,p,!0),i=Jn.current,i!==null){switch(i.tag){case 31:case 13:return ba===null?Su():i.alternate===null&&qt===0&&(qt=3),i.flags&=-257,i.flags|=65536,i.lanes=p,u===Jo?i.flags|=16384:(r=i.updateQueue,r===null?i.updateQueue=new Set([u]):r.add(u),Nf(n,u,p)),!1;case 22:return i.flags|=65536,u===Jo?i.flags|=16384:(r=i.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([u])},i.updateQueue=r):(i=r.retryQueue,i===null?r.retryQueue=new Set([u]):i.add(u)),Nf(n,u,p)),!1}throw Error(s(435,i.tag))}return Nf(n,u,p),Su(),!1}if(ot)return r=Jn.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=p,u!==gd&&(n=Error(s(422),{cause:u}),dl(ma(n,i)))):(u!==gd&&(r=Error(s(423),{cause:u}),dl(ma(r,i))),n=n.current.alternate,n.flags|=65536,p&=-p,n.lanes|=p,u=ma(u,i),p=Zd(n.stateNode,u,p),Cd(n,p),qt!==4&&(qt=2)),!1;var g=Error(s(520),{cause:u});if(g=ma(g,i),Rl===null?Rl=[g]:Rl.push(g),qt!==4&&(qt=2),r===null)return!0;u=ma(u,i),i=r;do{switch(i.tag){case 3:return i.flags|=65536,n=p&-p,i.lanes|=n,n=Zd(i.stateNode,u,n),Cd(i,n),!1;case 1:if(r=i.type,g=i.stateNode,(i.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&($r===null||!$r.has(g))))return i.flags|=65536,p&=-p,i.lanes|=p,p=Bp(p),Pp(p,n,i,u),Cd(i,p),!1}i=i.return}while(i!==null);return!1}var Wd=Error(s(461)),nn=!1;function xn(n,r,i,u){r.child=n===null?z0(r,null,i,u):Cs(r,n.child,i,u)}function Up(n,r,i,u,p){i=i.render;var g=r.ref;if("ref"in u){var _={};for(var w in u)w!=="ref"&&(_[w]=u[w])}else _=u;return Ns(r),u=Md(n,r,i,_,g,p),w=Dd(),n!==null&&!nn?(Ld(n,r,p),cr(n,r,p)):(ot&&w&&hd(r),r.flags|=1,xn(n,r,u,p),r.child)}function Hp(n,r,i,u,p){if(n===null){var g=i.type;return typeof g=="function"&&!dd(g)&&g.defaultProps===void 0&&i.compare===null?(r.tag=15,r.type=g,Fp(n,r,g,u,p)):(n=Ko(i.type,null,u,r,r.mode,p),n.ref=r.ref,n.return=r,r.child=n)}if(g=n.child,!lf(n,p)){var _=g.memoizedProps;if(i=i.compare,i=i!==null?i:ol,i(_,u)&&n.ref===r.ref)return cr(n,r,p)}return r.flags|=1,n=rr(g,u),n.ref=r.ref,n.return=r,r.child=n}function Fp(n,r,i,u,p){if(n!==null){var g=n.memoizedProps;if(ol(g,u)&&n.ref===r.ref)if(nn=!1,r.pendingProps=u=g,lf(n,p))(n.flags&131072)!==0&&(nn=!0);else return r.lanes=n.lanes,cr(n,r,p)}return Jd(n,r,i,u,p)}function zp(n,r,i,u){var p=u.children,g=n!==null?n.memoizedState:null;if(n===null&&r.stateNode===null&&(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.mode==="hidden"){if((r.flags&128)!==0){if(g=g!==null?g.baseLanes|i:i,n!==null){for(u=r.child=n.child,p=0;u!==null;)p=p|u.lanes|u.childLanes,u=u.sibling;u=p&~g}else u=0,r.child=null;return qp(n,r,g,i,u)}if((i&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},n!==null&&Zo(r,g!==null?g.cachePool:null),g!==null?$0(r,g):kd(),G0(r);else return u=r.lanes=536870912,qp(n,r,g!==null?g.baseLanes|i:i,i,u)}else g!==null?(Zo(r,g.cachePool),$0(r,g),Fr(),r.memoizedState=null):(n!==null&&Zo(r,null),kd(),Fr());return xn(n,r,p,i),r.child}function Nl(n,r){return n!==null&&n.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function qp(n,r,i,u,p){var g=Nd();return g=g===null?null:{parent:en._currentValue,pool:g},r.memoizedState={baseLanes:i,cachePool:g},n!==null&&Zo(r,null),kd(),G0(r),n!==null&&oi(n,r,u,!0),r.childLanes=p,null}function mu(n,r){return r=pu({mode:r.mode,children:r.children},n.mode),r.ref=n.ref,n.child=r,r.return=n,r}function Yp(n,r,i){return Cs(r,n.child,null,i),n=mu(r,r.pendingProps),n.flags|=2,ea(r),r.memoizedState=null,n}function cN(n,r,i){var u=r.pendingProps,p=(r.flags&128)!==0;if(r.flags&=-129,n===null){if(ot){if(u.mode==="hidden")return n=mu(r,u),r.lanes=536870912,Nl(null,n);if(Od(r),(n=Dt)?(n=nb(n,ga),n=n!==null&&n.data==="&"?n:null,n!==null&&(r.memoizedState={dehydrated:n,treeContext:Mr!==null?{id:Ua,overflow:Ha}:null,retryLane:536870912,hydrationErrors:null},i=C0(n),i.return=r,r.child=i,gn=r,Dt=null)):n=null,n===null)throw Lr(r);return r.lanes=536870912,null}return mu(r,u)}var g=n.memoizedState;if(g!==null){var _=g.dehydrated;if(Od(r),p)if(r.flags&256)r.flags&=-257,r=Yp(n,r,i);else if(r.memoizedState!==null)r.child=n.child,r.flags|=128,r=null;else throw Error(s(558));else if(nn||oi(n,r,i,!1),p=(i&n.childLanes)!==0,nn||p){if(u=wt,u!==null&&(_=$t(u,i),_!==0&&_!==g.retryLane))throw g.retryLane=_,Es(n,_),qn(u,n,_),Wd;Su(),r=Yp(n,r,i)}else n=g.treeContext,Dt=xa(_.nextSibling),gn=r,ot=!0,Dr=null,ga=!1,n!==null&&R0(r,n),r=mu(r,u),r.flags|=4096;return r}return n=rr(n.child,{mode:u.mode,children:u.children}),n.ref=r.ref,r.child=n,n.return=r,n}function hu(n,r){var i=r.ref;if(i===null)n!==null&&n.ref!==null&&(r.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(s(284));(n===null||n.ref!==i)&&(r.flags|=4194816)}}function Jd(n,r,i,u,p){return Ns(r),i=Md(n,r,i,u,void 0,p),u=Dd(),n!==null&&!nn?(Ld(n,r,p),cr(n,r,p)):(ot&&u&&hd(r),r.flags|=1,xn(n,r,i,p),r.child)}function $p(n,r,i,u,p,g){return Ns(r),r.updateQueue=null,i=V0(r,u,i,p),K0(n),u=Dd(),n!==null&&!nn?(Ld(n,r,g),cr(n,r,g)):(ot&&u&&hd(r),r.flags|=1,xn(n,r,i,g),r.child)}function Gp(n,r,i,u,p){if(Ns(r),r.stateNode===null){var g=ri,_=i.contextType;typeof _=="object"&&_!==null&&(g=bn(_)),g=new i(u,g),r.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,g.updater=Xd,r.stateNode=g,g._reactInternals=r,g=r.stateNode,g.props=u,g.state=r.memoizedState,g.refs={},vd(r),_=i.contextType,g.context=typeof _=="object"&&_!==null?bn(_):ri,g.state=r.memoizedState,_=i.getDerivedStateFromProps,typeof _=="function"&&(Qd(r,i,_,u),g.state=r.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(_=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),_!==g.state&&Xd.enqueueReplaceState(g,g.state,null),xl(r,u,g,p),bl(),g.state=r.memoizedState),typeof g.componentDidMount=="function"&&(r.flags|=4194308),u=!0}else if(n===null){g=r.stateNode;var w=r.memoizedProps,z=ks(i,w);g.props=z;var te=g.context,ue=i.contextType;_=ri,typeof ue=="object"&&ue!==null&&(_=bn(ue));var he=i.getDerivedStateFromProps;ue=typeof he=="function"||typeof g.getSnapshotBeforeUpdate=="function",w=r.pendingProps!==w,ue||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(w||te!==_)&&Ip(r,g,u,_),Br=!1;var ne=r.memoizedState;g.state=ne,xl(r,u,g,p),bl(),te=r.memoizedState,w||ne!==te||Br?(typeof he=="function"&&(Qd(r,i,he,u),te=r.memoizedState),(z=Br||Op(r,i,z,u,ne,te,_))?(ue||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount()),typeof g.componentDidMount=="function"&&(r.flags|=4194308)):(typeof g.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=u,r.memoizedState=te),g.props=u,g.state=te,g.context=_,u=z):(typeof g.componentDidMount=="function"&&(r.flags|=4194308),u=!1)}else{g=r.stateNode,Ad(n,r),_=r.memoizedProps,ue=ks(i,_),g.props=ue,he=r.pendingProps,ne=g.context,te=i.contextType,z=ri,typeof te=="object"&&te!==null&&(z=bn(te)),w=i.getDerivedStateFromProps,(te=typeof w=="function"||typeof g.getSnapshotBeforeUpdate=="function")||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(_!==he||ne!==z)&&Ip(r,g,u,z),Br=!1,ne=r.memoizedState,g.state=ne,xl(r,u,g,p),bl();var ie=r.memoizedState;_!==he||ne!==ie||Br||n!==null&&n.dependencies!==null&&Qo(n.dependencies)?(typeof w=="function"&&(Qd(r,i,w,u),ie=r.memoizedState),(ue=Br||Op(r,i,ue,u,ne,ie,z)||n!==null&&n.dependencies!==null&&Qo(n.dependencies))?(te||typeof g.UNSAFE_componentWillUpdate!="function"&&typeof g.componentWillUpdate!="function"||(typeof g.componentWillUpdate=="function"&&g.componentWillUpdate(u,ie,z),typeof g.UNSAFE_componentWillUpdate=="function"&&g.UNSAFE_componentWillUpdate(u,ie,z)),typeof g.componentDidUpdate=="function"&&(r.flags|=4),typeof g.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof g.componentDidUpdate!="function"||_===n.memoizedProps&&ne===n.memoizedState||(r.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||_===n.memoizedProps&&ne===n.memoizedState||(r.flags|=1024),r.memoizedProps=u,r.memoizedState=ie),g.props=u,g.state=ie,g.context=z,u=ue):(typeof g.componentDidUpdate!="function"||_===n.memoizedProps&&ne===n.memoizedState||(r.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||_===n.memoizedProps&&ne===n.memoizedState||(r.flags|=1024),u=!1)}return g=u,hu(n,r),u=(r.flags&128)!==0,g||u?(g=r.stateNode,i=u&&typeof i.getDerivedStateFromError!="function"?null:g.render(),r.flags|=1,n!==null&&u?(r.child=Cs(r,n.child,null,p),r.child=Cs(r,null,i,p)):xn(n,r,i,p),r.memoizedState=g.state,n=r.child):n=cr(n,r,p),n}function Kp(n,r,i,u){return Ts(),r.flags|=256,xn(n,r,i,u),r.child}var ef={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function tf(n){return{baseLanes:n,cachePool:j0()}}function nf(n,r,i){return n=n!==null?n.childLanes&~i:0,r&&(n|=na),n}function Vp(n,r,i){var u=r.pendingProps,p=!1,g=(r.flags&128)!==0,_;if((_=g)||(_=n!==null&&n.memoizedState===null?!1:(Vt.current&2)!==0),_&&(p=!0,r.flags&=-129),_=(r.flags&32)!==0,r.flags&=-33,n===null){if(ot){if(p?Hr(r):Fr(),(n=Dt)?(n=nb(n,ga),n=n!==null&&n.data!=="&"?n:null,n!==null&&(r.memoizedState={dehydrated:n,treeContext:Mr!==null?{id:Ua,overflow:Ha}:null,retryLane:536870912,hydrationErrors:null},i=C0(n),i.return=r,r.child=i,gn=r,Dt=null)):n=null,n===null)throw Lr(r);return Uf(n)?r.lanes=32:r.lanes=536870912,null}var w=u.children;return u=u.fallback,p?(Fr(),p=r.mode,w=pu({mode:"hidden",children:w},p),u=ys(u,p,i,null),w.return=r,u.return=r,w.sibling=u,r.child=w,u=r.child,u.memoizedState=tf(i),u.childLanes=nf(n,_,i),r.memoizedState=ef,Nl(null,u)):(Hr(r),af(r,w))}var z=n.memoizedState;if(z!==null&&(w=z.dehydrated,w!==null)){if(g)r.flags&256?(Hr(r),r.flags&=-257,r=rf(n,r,i)):r.memoizedState!==null?(Fr(),r.child=n.child,r.flags|=128,r=null):(Fr(),w=u.fallback,p=r.mode,u=pu({mode:"visible",children:u.children},p),w=ys(w,p,i,null),w.flags|=2,u.return=r,w.return=r,u.sibling=w,r.child=u,Cs(r,n.child,null,i),u=r.child,u.memoizedState=tf(i),u.childLanes=nf(n,_,i),r.memoizedState=ef,r=Nl(null,u));else if(Hr(r),Uf(w)){if(_=w.nextSibling&&w.nextSibling.dataset,_)var te=_.dgst;_=te,u=Error(s(419)),u.stack="",u.digest=_,dl({value:u,source:null,stack:null}),r=rf(n,r,i)}else if(nn||oi(n,r,i,!1),_=(i&n.childLanes)!==0,nn||_){if(_=wt,_!==null&&(u=$t(_,i),u!==0&&u!==z.retryLane))throw z.retryLane=u,Es(n,u),qn(_,n,u),Wd;Pf(w)||Su(),r=rf(n,r,i)}else Pf(w)?(r.flags|=192,r.child=n.child,r=null):(n=z.treeContext,Dt=xa(w.nextSibling),gn=r,ot=!0,Dr=null,ga=!1,n!==null&&R0(r,n),r=af(r,u.children),r.flags|=4096);return r}return p?(Fr(),w=u.fallback,p=r.mode,z=n.child,te=z.sibling,u=rr(z,{mode:"hidden",children:u.children}),u.subtreeFlags=z.subtreeFlags&65011712,te!==null?w=rr(te,w):(w=ys(w,p,i,null),w.flags|=2),w.return=r,u.return=r,u.sibling=w,r.child=u,Nl(null,u),u=r.child,w=n.child.memoizedState,w===null?w=tf(i):(p=w.cachePool,p!==null?(z=en._currentValue,p=p.parent!==z?{parent:z,pool:z}:p):p=j0(),w={baseLanes:w.baseLanes|i,cachePool:p}),u.memoizedState=w,u.childLanes=nf(n,_,i),r.memoizedState=ef,Nl(n.child,u)):(Hr(r),i=n.child,n=i.sibling,i=rr(i,{mode:"visible",children:u.children}),i.return=r,i.sibling=null,n!==null&&(_=r.deletions,_===null?(r.deletions=[n],r.flags|=16):_.push(n)),r.child=i,r.memoizedState=null,i)}function af(n,r){return r=pu({mode:"visible",children:r},n.mode),r.return=n,n.child=r}function pu(n,r){return n=Wn(22,n,null,r),n.lanes=0,n}function rf(n,r,i){return Cs(r,n.child,null,i),n=af(r,r.pendingProps.children),n.flags|=2,r.memoizedState=null,n}function Qp(n,r,i){n.lanes|=r;var u=n.alternate;u!==null&&(u.lanes|=r),Ed(n.return,r,i)}function sf(n,r,i,u,p,g){var _=n.memoizedState;_===null?n.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:u,tail:i,tailMode:p,treeForkCount:g}:(_.isBackwards=r,_.rendering=null,_.renderingStartTime=0,_.last=u,_.tail=i,_.tailMode=p,_.treeForkCount=g)}function Xp(n,r,i){var u=r.pendingProps,p=u.revealOrder,g=u.tail;u=u.children;var _=Vt.current,w=(_&2)!==0;if(w?(_=_&1|2,r.flags|=128):_&=1,O(Vt,_),xn(n,r,u,i),u=ot?cl:0,!w&&n!==null&&(n.flags&128)!==0)e:for(n=r.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&Qp(n,i,r);else if(n.tag===19)Qp(n,i,r);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===r)break e;for(;n.sibling===null;){if(n.return===null||n.return===r)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(p){case"forwards":for(i=r.child,p=null;i!==null;)n=i.alternate,n!==null&&au(n)===null&&(p=i),i=i.sibling;i=p,i===null?(p=r.child,r.child=null):(p=i.sibling,i.sibling=null),sf(r,!1,p,i,g,u);break;case"backwards":case"unstable_legacy-backwards":for(i=null,p=r.child,r.child=null;p!==null;){if(n=p.alternate,n!==null&&au(n)===null){r.child=p;break}n=p.sibling,p.sibling=i,i=p,p=n}sf(r,!0,i,null,g,u);break;case"together":sf(r,!1,null,null,void 0,u);break;default:r.memoizedState=null}return r.child}function cr(n,r,i){if(n!==null&&(r.dependencies=n.dependencies),Yr|=r.lanes,(i&r.childLanes)===0)if(n!==null){if(oi(n,r,i,!1),(i&r.childLanes)===0)return null}else return null;if(n!==null&&r.child!==n.child)throw Error(s(153));if(r.child!==null){for(n=r.child,i=rr(n,n.pendingProps),r.child=i,i.return=r;n.sibling!==null;)n=n.sibling,i=i.sibling=rr(n,n.pendingProps),i.return=r;i.sibling=null}return r.child}function lf(n,r){return(n.lanes&r)!==0?!0:(n=n.dependencies,!!(n!==null&&Qo(n)))}function dN(n,r,i){switch(r.tag){case 3:dt(r,r.stateNode.containerInfo),jr(r,en,n.memoizedState.cache),Ts();break;case 27:case 5:Ft(r);break;case 4:dt(r,r.stateNode.containerInfo);break;case 10:jr(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,Od(r),null;break;case 13:var u=r.memoizedState;if(u!==null)return u.dehydrated!==null?(Hr(r),r.flags|=128,null):(i&r.child.childLanes)!==0?Vp(n,r,i):(Hr(r),n=cr(n,r,i),n!==null?n.sibling:null);Hr(r);break;case 19:var p=(n.flags&128)!==0;if(u=(i&r.childLanes)!==0,u||(oi(n,r,i,!1),u=(i&r.childLanes)!==0),p){if(u)return Xp(n,r,i);r.flags|=128}if(p=r.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),O(Vt,Vt.current),u)break;return null;case 22:return r.lanes=0,zp(n,r,i,r.pendingProps);case 24:jr(r,en,n.memoizedState.cache)}return cr(n,r,i)}function Zp(n,r,i){if(n!==null)if(n.memoizedProps!==r.pendingProps)nn=!0;else{if(!lf(n,i)&&(r.flags&128)===0)return nn=!1,dN(n,r,i);nn=(n.flags&131072)!==0}else nn=!1,ot&&(r.flags&1048576)!==0&&k0(r,cl,r.index);switch(r.lanes=0,r.tag){case 16:e:{var u=r.pendingProps;if(n=vs(r.elementType),r.type=n,typeof n=="function")dd(n)?(u=ks(n,u),r.tag=1,r=Gp(null,r,n,u,i)):(r.tag=0,r=Jd(null,r,n,u,i));else{if(n!=null){var p=n.$$typeof;if(p===D){r.tag=11,r=Up(null,r,n,u,i);break e}else if(p===Y){r.tag=14,r=Hp(null,r,n,u,i);break e}}throw r=Z(n)||n,Error(s(306,r,""))}}return r;case 0:return Jd(n,r,r.type,r.pendingProps,i);case 1:return u=r.type,p=ks(u,r.pendingProps),Gp(n,r,u,p,i);case 3:e:{if(dt(r,r.stateNode.containerInfo),n===null)throw Error(s(387));u=r.pendingProps;var g=r.memoizedState;p=g.element,Ad(n,r),xl(r,u,null,i);var _=r.memoizedState;if(u=_.cache,jr(r,en,u),u!==g.cache&&yd(r,[en],i,!0),bl(),u=_.element,g.isDehydrated)if(g={element:u,isDehydrated:!1,cache:_.cache},r.updateQueue.baseState=g,r.memoizedState=g,r.flags&256){r=Kp(n,r,u,i);break e}else if(u!==p){p=ma(Error(s(424)),r),dl(p),r=Kp(n,r,u,i);break e}else{switch(n=r.stateNode.containerInfo,n.nodeType){case 9:n=n.body;break;default:n=n.nodeName==="HTML"?n.ownerDocument.body:n}for(Dt=xa(n.firstChild),gn=r,ot=!0,Dr=null,ga=!0,i=z0(r,null,u,i),r.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(Ts(),u===p){r=cr(n,r,i);break e}xn(n,r,u,i)}r=r.child}return r;case 26:return hu(n,r),n===null?(i=ob(r.type,null,r.pendingProps,null))?r.memoizedState=i:ot||(i=r.type,n=r.pendingProps,u=Ou(Ae.current).createElement(i),u[Gt]=r,u[Tn]=n,En(u,i,n),Wt(u),r.stateNode=u):r.memoizedState=ob(r.type,n.memoizedProps,r.pendingProps,n.memoizedState),null;case 27:return Ft(r),n===null&&ot&&(u=r.stateNode=sb(r.type,r.pendingProps,Ae.current),gn=r,ga=!0,p=Dt,Qr(r.type)?(Hf=p,Dt=xa(u.firstChild)):Dt=p),xn(n,r,r.pendingProps.children,i),hu(n,r),n===null&&(r.flags|=4194304),r.child;case 5:return n===null&&ot&&((p=u=Dt)&&(u=FN(u,r.type,r.pendingProps,ga),u!==null?(r.stateNode=u,gn=r,Dt=xa(u.firstChild),ga=!1,p=!0):p=!1),p||Lr(r)),Ft(r),p=r.type,g=r.pendingProps,_=n!==null?n.memoizedProps:null,u=g.children,Lf(p,g)?u=null:_!==null&&Lf(p,_)&&(r.flags|=32),r.memoizedState!==null&&(p=Md(n,r,nN,null,null,i),Pl._currentValue=p),hu(n,r),xn(n,r,u,i),r.child;case 6:return n===null&&ot&&((n=i=Dt)&&(i=zN(i,r.pendingProps,ga),i!==null?(r.stateNode=i,gn=r,Dt=null,n=!0):n=!1),n||Lr(r)),null;case 13:return Vp(n,r,i);case 4:return dt(r,r.stateNode.containerInfo),u=r.pendingProps,n===null?r.child=Cs(r,null,u,i):xn(n,r,u,i),r.child;case 11:return Up(n,r,r.type,r.pendingProps,i);case 7:return xn(n,r,r.pendingProps,i),r.child;case 8:return xn(n,r,r.pendingProps.children,i),r.child;case 12:return xn(n,r,r.pendingProps.children,i),r.child;case 10:return u=r.pendingProps,jr(r,r.type,u.value),xn(n,r,u.children,i),r.child;case 9:return p=r.type._context,u=r.pendingProps.children,Ns(r),p=bn(p),u=u(p),r.flags|=1,xn(n,r,u,i),r.child;case 14:return Hp(n,r,r.type,r.pendingProps,i);case 15:return Fp(n,r,r.type,r.pendingProps,i);case 19:return Xp(n,r,i);case 31:return cN(n,r,i);case 22:return zp(n,r,i,r.pendingProps);case 24:return Ns(r),u=bn(en),n===null?(p=Nd(),p===null&&(p=wt,g=Td(),p.pooledCache=g,g.refCount++,g!==null&&(p.pooledCacheLanes|=i),p=g),r.memoizedState={parent:u,cache:p},vd(r),jr(r,en,p)):((n.lanes&i)!==0&&(Ad(n,r),xl(r,null,null,i),bl()),p=n.memoizedState,g=r.memoizedState,p.parent!==u?(p={parent:u,cache:u},r.memoizedState=p,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=p),jr(r,en,u)):(u=g.cache,jr(r,en,u),u!==p.cache&&yd(r,[en],i,!0))),xn(n,r,r.pendingProps.children,i),r.child;case 29:throw r.pendingProps}throw Error(s(156,r.tag))}function dr(n){n.flags|=4}function of(n,r,i,u,p){if((r=(n.mode&32)!==0)&&(r=!1),r){if(n.flags|=16777216,(p&335544128)===p)if(n.stateNode.complete)n.flags|=8192;else if(Sg())n.flags|=8192;else throw As=Jo,Sd}else n.flags&=-16777217}function Wp(n,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!mb(r))if(Sg())n.flags|=8192;else throw As=Jo,Sd}function gu(n,r){r!==null&&(n.flags|=4),n.flags&16384&&(r=n.tag!==22?Ge():536870912,n.lanes|=r,yi|=r)}function Sl(n,r){if(!ot)switch(n.tailMode){case"hidden":r=n.tail;for(var i=null;r!==null;)r.alternate!==null&&(i=r),r=r.sibling;i===null?n.tail=null:i.sibling=null;break;case"collapsed":i=n.tail;for(var u=null;i!==null;)i.alternate!==null&&(u=i),i=i.sibling;u===null?r||n.tail===null?n.tail=null:n.tail.sibling=null:u.sibling=null}}function Lt(n){var r=n.alternate!==null&&n.alternate.child===n.child,i=0,u=0;if(r)for(var p=n.child;p!==null;)i|=p.lanes|p.childLanes,u|=p.subtreeFlags&65011712,u|=p.flags&65011712,p.return=n,p=p.sibling;else for(p=n.child;p!==null;)i|=p.lanes|p.childLanes,u|=p.subtreeFlags,u|=p.flags,p.return=n,p=p.sibling;return n.subtreeFlags|=u,n.childLanes=i,r}function fN(n,r,i){var u=r.pendingProps;switch(pd(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Lt(r),null;case 1:return Lt(r),null;case 3:return i=r.stateNode,u=null,n!==null&&(u=n.memoizedState.cache),r.memoizedState.cache!==u&&(r.flags|=2048),lr(en),ut(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(n===null||n.child===null)&&(li(r)?dr(r):n===null||n.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,bd())),Lt(r),null;case 26:var p=r.type,g=r.memoizedState;return n===null?(dr(r),g!==null?(Lt(r),Wp(r,g)):(Lt(r),of(r,p,null,u,i))):g?g!==n.memoizedState?(dr(r),Lt(r),Wp(r,g)):(Lt(r),r.flags&=-16777217):(n=n.memoizedProps,n!==u&&dr(r),Lt(r),of(r,p,n,u,i)),null;case 27:if(yn(r),i=Ae.current,p=r.type,n!==null&&r.stateNode!=null)n.memoizedProps!==u&&dr(r);else{if(!u){if(r.stateNode===null)throw Error(s(166));return Lt(r),null}n=ge.current,li(r)?O0(r):(n=sb(p,u,i),r.stateNode=n,dr(r))}return Lt(r),null;case 5:if(yn(r),p=r.type,n!==null&&r.stateNode!=null)n.memoizedProps!==u&&dr(r);else{if(!u){if(r.stateNode===null)throw Error(s(166));return Lt(r),null}if(g=ge.current,li(r))O0(r);else{var _=Ou(Ae.current);switch(g){case 1:g=_.createElementNS("http://www.w3.org/2000/svg",p);break;case 2:g=_.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;default:switch(p){case"svg":g=_.createElementNS("http://www.w3.org/2000/svg",p);break;case"math":g=_.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;case"script":g=_.createElement("div"),g.innerHTML="<script><\/script>",g=g.removeChild(g.firstChild);break;case"select":g=typeof u.is=="string"?_.createElement("select",{is:u.is}):_.createElement("select"),u.multiple?g.multiple=!0:u.size&&(g.size=u.size);break;default:g=typeof u.is=="string"?_.createElement(p,{is:u.is}):_.createElement(p)}}g[Gt]=r,g[Tn]=u;e:for(_=r.child;_!==null;){if(_.tag===5||_.tag===6)g.appendChild(_.stateNode);else if(_.tag!==4&&_.tag!==27&&_.child!==null){_.child.return=_,_=_.child;continue}if(_===r)break e;for(;_.sibling===null;){if(_.return===null||_.return===r)break e;_=_.return}_.sibling.return=_.return,_=_.sibling}r.stateNode=g;e:switch(En(g,p,u),p){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&dr(r)}}return Lt(r),of(r,r.type,n===null?null:n.memoizedProps,r.pendingProps,i),null;case 6:if(n&&r.stateNode!=null)n.memoizedProps!==u&&dr(r);else{if(typeof u!="string"&&r.stateNode===null)throw Error(s(166));if(n=Ae.current,li(r)){if(n=r.stateNode,i=r.memoizedProps,u=null,p=gn,p!==null)switch(p.tag){case 27:case 5:u=p.memoizedProps}n[Gt]=r,n=!!(n.nodeValue===i||u!==null&&u.suppressHydrationWarning===!0||Vg(n.nodeValue,i)),n||Lr(r,!0)}else n=Ou(n).createTextNode(u),n[Gt]=r,r.stateNode=n}return Lt(r),null;case 31:if(i=r.memoizedState,n===null||n.memoizedState!==null){if(u=li(r),i!==null){if(n===null){if(!u)throw Error(s(318));if(n=r.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(s(557));n[Gt]=r}else Ts(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Lt(r),n=!1}else i=bd(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=i),n=!0;if(!n)return r.flags&256?(ea(r),r):(ea(r),null);if((r.flags&128)!==0)throw Error(s(558))}return Lt(r),null;case 13:if(u=r.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(p=li(r),u!==null&&u.dehydrated!==null){if(n===null){if(!p)throw Error(s(318));if(p=r.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(s(317));p[Gt]=r}else Ts(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Lt(r),p=!1}else p=bd(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=p),p=!0;if(!p)return r.flags&256?(ea(r),r):(ea(r),null)}return ea(r),(r.flags&128)!==0?(r.lanes=i,r):(i=u!==null,n=n!==null&&n.memoizedState!==null,i&&(u=r.child,p=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(p=u.alternate.memoizedState.cachePool.pool),g=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(g=u.memoizedState.cachePool.pool),g!==p&&(u.flags|=2048)),i!==n&&i&&(r.child.flags|=8192),gu(r,r.updateQueue),Lt(r),null);case 4:return ut(),n===null&&Rf(r.stateNode.containerInfo),Lt(r),null;case 10:return lr(r.type),Lt(r),null;case 19:if(X(Vt),u=r.memoizedState,u===null)return Lt(r),null;if(p=(r.flags&128)!==0,g=u.rendering,g===null)if(p)Sl(u,!1);else{if(qt!==0||n!==null&&(n.flags&128)!==0)for(n=r.child;n!==null;){if(g=au(n),g!==null){for(r.flags|=128,Sl(u,!1),n=g.updateQueue,r.updateQueue=n,gu(r,n),r.subtreeFlags=0,n=i,i=r.child;i!==null;)A0(i,n),i=i.sibling;return O(Vt,Vt.current&1|2),ot&&sr(r,u.treeForkCount),r.child}n=n.sibling}u.tail!==null&&_t()>Tu&&(r.flags|=128,p=!0,Sl(u,!1),r.lanes=4194304)}else{if(!p)if(n=au(g),n!==null){if(r.flags|=128,p=!0,n=n.updateQueue,r.updateQueue=n,gu(r,n),Sl(u,!0),u.tail===null&&u.tailMode==="hidden"&&!g.alternate&&!ot)return Lt(r),null}else 2*_t()-u.renderingStartTime>Tu&&i!==536870912&&(r.flags|=128,p=!0,Sl(u,!1),r.lanes=4194304);u.isBackwards?(g.sibling=r.child,r.child=g):(n=u.last,n!==null?n.sibling=g:r.child=g,u.last=g)}return u.tail!==null?(n=u.tail,u.rendering=n,u.tail=n.sibling,u.renderingStartTime=_t(),n.sibling=null,i=Vt.current,O(Vt,p?i&1|2:i&1),ot&&sr(r,u.treeForkCount),n):(Lt(r),null);case 22:case 23:return ea(r),Rd(),u=r.memoizedState!==null,n!==null?n.memoizedState!==null!==u&&(r.flags|=8192):u&&(r.flags|=8192),u?(i&536870912)!==0&&(r.flags&128)===0&&(Lt(r),r.subtreeFlags&6&&(r.flags|=8192)):Lt(r),i=r.updateQueue,i!==null&&gu(r,i.retryQueue),i=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(i=n.memoizedState.cachePool.pool),u=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(u=r.memoizedState.cachePool.pool),u!==i&&(r.flags|=2048),n!==null&&X(Ss),null;case 24:return i=null,n!==null&&(i=n.memoizedState.cache),r.memoizedState.cache!==i&&(r.flags|=2048),lr(en),Lt(r),null;case 25:return null;case 30:return null}throw Error(s(156,r.tag))}function mN(n,r){switch(pd(r),r.tag){case 1:return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 3:return lr(en),ut(),n=r.flags,(n&65536)!==0&&(n&128)===0?(r.flags=n&-65537|128,r):null;case 26:case 27:case 5:return yn(r),null;case 31:if(r.memoizedState!==null){if(ea(r),r.alternate===null)throw Error(s(340));Ts()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 13:if(ea(r),n=r.memoizedState,n!==null&&n.dehydrated!==null){if(r.alternate===null)throw Error(s(340));Ts()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 19:return X(Vt),null;case 4:return ut(),null;case 10:return lr(r.type),null;case 22:case 23:return ea(r),Rd(),n!==null&&X(Ss),n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 24:return lr(en),null;case 25:return null;default:return null}}function Jp(n,r){switch(pd(r),r.tag){case 3:lr(en),ut();break;case 26:case 27:case 5:yn(r);break;case 4:ut();break;case 31:r.memoizedState!==null&&ea(r);break;case 13:ea(r);break;case 19:X(Vt);break;case 10:lr(r.type);break;case 22:case 23:ea(r),Rd(),n!==null&&X(Ss);break;case 24:lr(en)}}function vl(n,r){try{var i=r.updateQueue,u=i!==null?i.lastEffect:null;if(u!==null){var p=u.next;i=p;do{if((i.tag&n)===n){u=void 0;var g=i.create,_=i.inst;u=g(),_.destroy=u}i=i.next}while(i!==p)}}catch(w){yt(r,r.return,w)}}function zr(n,r,i){try{var u=r.updateQueue,p=u!==null?u.lastEffect:null;if(p!==null){var g=p.next;u=g;do{if((u.tag&n)===n){var _=u.inst,w=_.destroy;if(w!==void 0){_.destroy=void 0,p=r;var z=i,te=w;try{te()}catch(ue){yt(p,z,ue)}}}u=u.next}while(u!==g)}}catch(ue){yt(r,r.return,ue)}}function eg(n){var r=n.updateQueue;if(r!==null){var i=n.stateNode;try{Y0(r,i)}catch(u){yt(n,n.return,u)}}}function tg(n,r,i){i.props=ks(n.type,n.memoizedProps),i.state=n.memoizedState;try{i.componentWillUnmount()}catch(u){yt(n,r,u)}}function Al(n,r){try{var i=n.ref;if(i!==null){switch(n.tag){case 26:case 27:case 5:var u=n.stateNode;break;case 30:u=n.stateNode;break;default:u=n.stateNode}typeof i=="function"?n.refCleanup=i(u):i.current=u}}catch(p){yt(n,r,p)}}function Fa(n,r){var i=n.ref,u=n.refCleanup;if(i!==null)if(typeof u=="function")try{u()}catch(p){yt(n,r,p)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(p){yt(n,r,p)}else i.current=null}function ng(n){var r=n.type,i=n.memoizedProps,u=n.stateNode;try{e:switch(r){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(p){yt(n,n.return,p)}}function uf(n,r,i){try{var u=n.stateNode;LN(u,n.type,i,r),u[Tn]=r}catch(p){yt(n,n.return,p)}}function ag(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&Qr(n.type)||n.tag===4}function cf(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||ag(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.tag===27&&Qr(n.type)||n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function df(n,r,i){var u=n.tag;if(u===5||u===6)n=n.stateNode,r?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(n,r):(r=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,r.appendChild(n),i=i._reactRootContainer,i!=null||r.onclick!==null||(r.onclick=_e));else if(u!==4&&(u===27&&Qr(n.type)&&(i=n.stateNode,r=null),n=n.child,n!==null))for(df(n,r,i),n=n.sibling;n!==null;)df(n,r,i),n=n.sibling}function bu(n,r,i){var u=n.tag;if(u===5||u===6)n=n.stateNode,r?i.insertBefore(n,r):i.appendChild(n);else if(u!==4&&(u===27&&Qr(n.type)&&(i=n.stateNode),n=n.child,n!==null))for(bu(n,r,i),n=n.sibling;n!==null;)bu(n,r,i),n=n.sibling}function rg(n){var r=n.stateNode,i=n.memoizedProps;try{for(var u=n.type,p=r.attributes;p.length;)r.removeAttributeNode(p[0]);En(r,u,i),r[Gt]=n,r[Tn]=i}catch(g){yt(n,n.return,g)}}var fr=!1,an=!1,ff=!1,sg=typeof WeakSet=="function"?WeakSet:Set,dn=null;function hN(n,r){if(n=n.containerInfo,Mf=Pu,n=b0(n),rd(n)){if("selectionStart"in n)var i={start:n.selectionStart,end:n.selectionEnd};else e:{i=(i=n.ownerDocument)&&i.defaultView||window;var u=i.getSelection&&i.getSelection();if(u&&u.rangeCount!==0){i=u.anchorNode;var p=u.anchorOffset,g=u.focusNode;u=u.focusOffset;try{i.nodeType,g.nodeType}catch{i=null;break e}var _=0,w=-1,z=-1,te=0,ue=0,he=n,ne=null;t:for(;;){for(var ie;he!==i||p!==0&&he.nodeType!==3||(w=_+p),he!==g||u!==0&&he.nodeType!==3||(z=_+u),he.nodeType===3&&(_+=he.nodeValue.length),(ie=he.firstChild)!==null;)ne=he,he=ie;for(;;){if(he===n)break t;if(ne===i&&++te===p&&(w=_),ne===g&&++ue===u&&(z=_),(ie=he.nextSibling)!==null)break;he=ne,ne=he.parentNode}he=ie}i=w===-1||z===-1?null:{start:w,end:z}}else i=null}i=i||{start:0,end:0}}else i=null;for(Df={focusedElem:n,selectionRange:i},Pu=!1,dn=r;dn!==null;)if(r=dn,n=r.child,(r.subtreeFlags&1028)!==0&&n!==null)n.return=r,dn=n;else for(;dn!==null;){switch(r=dn,g=r.alternate,n=r.flags,r.tag){case 0:if((n&4)!==0&&(n=r.updateQueue,n=n!==null?n.events:null,n!==null))for(i=0;i<n.length;i++)p=n[i],p.ref.impl=p.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&g!==null){n=void 0,i=r,p=g.memoizedProps,g=g.memoizedState,u=i.stateNode;try{var Re=ks(i.type,p);n=u.getSnapshotBeforeUpdate(Re,g),u.__reactInternalSnapshotBeforeUpdate=n}catch(Fe){yt(i,i.return,Fe)}}break;case 3:if((n&1024)!==0){if(n=r.stateNode.containerInfo,i=n.nodeType,i===9)Bf(n);else if(i===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":Bf(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((n&1024)!==0)throw Error(s(163))}if(n=r.sibling,n!==null){n.return=r.return,dn=n;break}dn=r.return}}function ig(n,r,i){var u=i.flags;switch(i.tag){case 0:case 11:case 15:hr(n,i),u&4&&vl(5,i);break;case 1:if(hr(n,i),u&4)if(n=i.stateNode,r===null)try{n.componentDidMount()}catch(_){yt(i,i.return,_)}else{var p=ks(i.type,r.memoizedProps);r=r.memoizedState;try{n.componentDidUpdate(p,r,n.__reactInternalSnapshotBeforeUpdate)}catch(_){yt(i,i.return,_)}}u&64&&eg(i),u&512&&Al(i,i.return);break;case 3:if(hr(n,i),u&64&&(n=i.updateQueue,n!==null)){if(r=null,i.child!==null)switch(i.child.tag){case 27:case 5:r=i.child.stateNode;break;case 1:r=i.child.stateNode}try{Y0(n,r)}catch(_){yt(i,i.return,_)}}break;case 27:r===null&&u&4&&rg(i);case 26:case 5:hr(n,i),r===null&&u&4&&ng(i),u&512&&Al(i,i.return);break;case 12:hr(n,i);break;case 31:hr(n,i),u&4&&ug(n,i);break;case 13:hr(n,i),u&4&&cg(n,i),u&64&&(n=i.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(i=NN.bind(null,i),qN(n,i))));break;case 22:if(u=i.memoizedState!==null||fr,!u){r=r!==null&&r.memoizedState!==null||an,p=fr;var g=an;fr=u,(an=r)&&!g?pr(n,i,(i.subtreeFlags&8772)!==0):hr(n,i),fr=p,an=g}break;case 30:break;default:hr(n,i)}}function lg(n){var r=n.alternate;r!==null&&(n.alternate=null,lg(r)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(r=n.stateNode,r!==null&&Xi(r)),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}var Bt=null,Un=!1;function mr(n,r,i){for(i=i.child;i!==null;)og(n,r,i),i=i.sibling}function og(n,r,i){if(Ot&&typeof Ot.onCommitFiberUnmount=="function")try{Ot.onCommitFiberUnmount(Zt,i)}catch{}switch(i.tag){case 26:an||Fa(i,r),mr(n,r,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:an||Fa(i,r);var u=Bt,p=Un;Qr(i.type)&&(Bt=i.stateNode,Un=!1),mr(n,r,i),Ll(i.stateNode),Bt=u,Un=p;break;case 5:an||Fa(i,r);case 6:if(u=Bt,p=Un,Bt=null,mr(n,r,i),Bt=u,Un=p,Bt!==null)if(Un)try{(Bt.nodeType===9?Bt.body:Bt.nodeName==="HTML"?Bt.ownerDocument.body:Bt).removeChild(i.stateNode)}catch(g){yt(i,r,g)}else try{Bt.removeChild(i.stateNode)}catch(g){yt(i,r,g)}break;case 18:Bt!==null&&(Un?(n=Bt,eb(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,i.stateNode),wi(n)):eb(Bt,i.stateNode));break;case 4:u=Bt,p=Un,Bt=i.stateNode.containerInfo,Un=!0,mr(n,r,i),Bt=u,Un=p;break;case 0:case 11:case 14:case 15:zr(2,i,r),an||zr(4,i,r),mr(n,r,i);break;case 1:an||(Fa(i,r),u=i.stateNode,typeof u.componentWillUnmount=="function"&&tg(i,r,u)),mr(n,r,i);break;case 21:mr(n,r,i);break;case 22:an=(u=an)||i.memoizedState!==null,mr(n,r,i),an=u;break;default:mr(n,r,i)}}function ug(n,r){if(r.memoizedState===null&&(n=r.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{wi(n)}catch(i){yt(r,r.return,i)}}}function cg(n,r){if(r.memoizedState===null&&(n=r.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{wi(n)}catch(i){yt(r,r.return,i)}}function pN(n){switch(n.tag){case 31:case 13:case 19:var r=n.stateNode;return r===null&&(r=n.stateNode=new sg),r;case 22:return n=n.stateNode,r=n._retryCache,r===null&&(r=n._retryCache=new sg),r;default:throw Error(s(435,n.tag))}}function xu(n,r){var i=pN(n);r.forEach(function(u){if(!i.has(u)){i.add(u);var p=SN.bind(null,n,u);u.then(p,p)}})}function Hn(n,r){var i=r.deletions;if(i!==null)for(var u=0;u<i.length;u++){var p=i[u],g=n,_=r,w=_;e:for(;w!==null;){switch(w.tag){case 27:if(Qr(w.type)){Bt=w.stateNode,Un=!1;break e}break;case 5:Bt=w.stateNode,Un=!1;break e;case 3:case 4:Bt=w.stateNode.containerInfo,Un=!0;break e}w=w.return}if(Bt===null)throw Error(s(160));og(g,_,p),Bt=null,Un=!1,g=p.alternate,g!==null&&(g.return=null),p.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)dg(r,n),r=r.sibling}var Ca=null;function dg(n,r){var i=n.alternate,u=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:Hn(r,n),Fn(n),u&4&&(zr(3,n,n.return),vl(3,n),zr(5,n,n.return));break;case 1:Hn(r,n),Fn(n),u&512&&(an||i===null||Fa(i,i.return)),u&64&&fr&&(n=n.updateQueue,n!==null&&(u=n.callbacks,u!==null&&(i=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=i===null?u:i.concat(u))));break;case 26:var p=Ca;if(Hn(r,n),Fn(n),u&512&&(an||i===null||Fa(i,i.return)),u&4){var g=i!==null?i.memoizedState:null;if(u=n.memoizedState,i===null)if(u===null)if(n.stateNode===null){e:{u=n.type,i=n.memoizedProps,p=p.ownerDocument||p;t:switch(u){case"title":g=p.getElementsByTagName("title")[0],(!g||g[ms]||g[Gt]||g.namespaceURI==="http://www.w3.org/2000/svg"||g.hasAttribute("itemprop"))&&(g=p.createElement(u),p.head.insertBefore(g,p.querySelector("head > title"))),En(g,u,i),g[Gt]=n,Wt(g),u=g;break e;case"link":var _=db("link","href",p).get(u+(i.href||""));if(_){for(var w=0;w<_.length;w++)if(g=_[w],g.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&g.getAttribute("rel")===(i.rel==null?null:i.rel)&&g.getAttribute("title")===(i.title==null?null:i.title)&&g.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){_.splice(w,1);break t}}g=p.createElement(u),En(g,u,i),p.head.appendChild(g);break;case"meta":if(_=db("meta","content",p).get(u+(i.content||""))){for(w=0;w<_.length;w++)if(g=_[w],g.getAttribute("content")===(i.content==null?null:""+i.content)&&g.getAttribute("name")===(i.name==null?null:i.name)&&g.getAttribute("property")===(i.property==null?null:i.property)&&g.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&g.getAttribute("charset")===(i.charSet==null?null:i.charSet)){_.splice(w,1);break t}}g=p.createElement(u),En(g,u,i),p.head.appendChild(g);break;default:throw Error(s(468,u))}g[Gt]=n,Wt(g),u=g}n.stateNode=u}else fb(p,n.type,n.stateNode);else n.stateNode=cb(p,u,n.memoizedProps);else g!==u?(g===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):g.count--,u===null?fb(p,n.type,n.stateNode):cb(p,u,n.memoizedProps)):u===null&&n.stateNode!==null&&uf(n,n.memoizedProps,i.memoizedProps)}break;case 27:Hn(r,n),Fn(n),u&512&&(an||i===null||Fa(i,i.return)),i!==null&&u&4&&uf(n,n.memoizedProps,i.memoizedProps);break;case 5:if(Hn(r,n),Fn(n),u&512&&(an||i===null||Fa(i,i.return)),n.flags&32){p=n.stateNode;try{ze(p,"")}catch(Re){yt(n,n.return,Re)}}u&4&&n.stateNode!=null&&(p=n.memoizedProps,uf(n,p,i!==null?i.memoizedProps:p)),u&1024&&(ff=!0);break;case 6:if(Hn(r,n),Fn(n),u&4){if(n.stateNode===null)throw Error(s(162));u=n.memoizedProps,i=n.stateNode;try{i.nodeValue=u}catch(Re){yt(n,n.return,Re)}}break;case 3:if(Du=null,p=Ca,Ca=Iu(r.containerInfo),Hn(r,n),Ca=p,Fn(n),u&4&&i!==null&&i.memoizedState.isDehydrated)try{wi(r.containerInfo)}catch(Re){yt(n,n.return,Re)}ff&&(ff=!1,fg(n));break;case 4:u=Ca,Ca=Iu(n.stateNode.containerInfo),Hn(r,n),Fn(n),Ca=u;break;case 12:Hn(r,n),Fn(n);break;case 31:Hn(r,n),Fn(n),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,xu(n,u)));break;case 13:Hn(r,n),Fn(n),n.child.flags&8192&&n.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(yu=_t()),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,xu(n,u)));break;case 22:p=n.memoizedState!==null;var z=i!==null&&i.memoizedState!==null,te=fr,ue=an;if(fr=te||p,an=ue||z,Hn(r,n),an=ue,fr=te,Fn(n),u&8192)e:for(r=n.stateNode,r._visibility=p?r._visibility&-2:r._visibility|1,p&&(i===null||z||fr||an||Rs(n)),i=null,r=n;;){if(r.tag===5||r.tag===26){if(i===null){z=i=r;try{if(g=z.stateNode,p)_=g.style,typeof _.setProperty=="function"?_.setProperty("display","none","important"):_.display="none";else{w=z.stateNode;var he=z.memoizedProps.style,ne=he!=null&&he.hasOwnProperty("display")?he.display:null;w.style.display=ne==null||typeof ne=="boolean"?"":(""+ne).trim()}}catch(Re){yt(z,z.return,Re)}}}else if(r.tag===6){if(i===null){z=r;try{z.stateNode.nodeValue=p?"":z.memoizedProps}catch(Re){yt(z,z.return,Re)}}}else if(r.tag===18){if(i===null){z=r;try{var ie=z.stateNode;p?tb(ie,!0):tb(z.stateNode,!1)}catch(Re){yt(z,z.return,Re)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===n)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===n)break e;for(;r.sibling===null;){if(r.return===null||r.return===n)break e;i===r&&(i=null),r=r.return}i===r&&(i=null),r.sibling.return=r.return,r=r.sibling}u&4&&(u=n.updateQueue,u!==null&&(i=u.retryQueue,i!==null&&(u.retryQueue=null,xu(n,i))));break;case 19:Hn(r,n),Fn(n),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,xu(n,u)));break;case 30:break;case 21:break;default:Hn(r,n),Fn(n)}}function Fn(n){var r=n.flags;if(r&2){try{for(var i,u=n.return;u!==null;){if(ag(u)){i=u;break}u=u.return}if(i==null)throw Error(s(160));switch(i.tag){case 27:var p=i.stateNode,g=cf(n);bu(n,g,p);break;case 5:var _=i.stateNode;i.flags&32&&(ze(_,""),i.flags&=-33);var w=cf(n);bu(n,w,_);break;case 3:case 4:var z=i.stateNode.containerInfo,te=cf(n);df(n,te,z);break;default:throw Error(s(161))}}catch(ue){yt(n,n.return,ue)}n.flags&=-3}r&4096&&(n.flags&=-4097)}function fg(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var r=n;fg(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),n=n.sibling}}function hr(n,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)ig(n,r.alternate,r),r=r.sibling}function Rs(n){for(n=n.child;n!==null;){var r=n;switch(r.tag){case 0:case 11:case 14:case 15:zr(4,r,r.return),Rs(r);break;case 1:Fa(r,r.return);var i=r.stateNode;typeof i.componentWillUnmount=="function"&&tg(r,r.return,i),Rs(r);break;case 27:Ll(r.stateNode);case 26:case 5:Fa(r,r.return),Rs(r);break;case 22:r.memoizedState===null&&Rs(r);break;case 30:Rs(r);break;default:Rs(r)}n=n.sibling}}function pr(n,r,i){for(i=i&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var u=r.alternate,p=n,g=r,_=g.flags;switch(g.tag){case 0:case 11:case 15:pr(p,g,i),vl(4,g);break;case 1:if(pr(p,g,i),u=g,p=u.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(te){yt(u,u.return,te)}if(u=g,p=u.updateQueue,p!==null){var w=u.stateNode;try{var z=p.shared.hiddenCallbacks;if(z!==null)for(p.shared.hiddenCallbacks=null,p=0;p<z.length;p++)q0(z[p],w)}catch(te){yt(u,u.return,te)}}i&&_&64&&eg(g),Al(g,g.return);break;case 27:rg(g);case 26:case 5:pr(p,g,i),i&&u===null&&_&4&&ng(g),Al(g,g.return);break;case 12:pr(p,g,i);break;case 31:pr(p,g,i),i&&_&4&&ug(p,g);break;case 13:pr(p,g,i),i&&_&4&&cg(p,g);break;case 22:g.memoizedState===null&&pr(p,g,i),Al(g,g.return);break;case 30:break;default:pr(p,g,i)}r=r.sibling}}function mf(n,r){var i=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(i=n.memoizedState.cachePool.pool),n=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(n=r.memoizedState.cachePool.pool),n!==i&&(n!=null&&n.refCount++,i!=null&&fl(i))}function hf(n,r){n=null,r.alternate!==null&&(n=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==n&&(r.refCount++,n!=null&&fl(n))}function wa(n,r,i,u){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)mg(n,r,i,u),r=r.sibling}function mg(n,r,i,u){var p=r.flags;switch(r.tag){case 0:case 11:case 15:wa(n,r,i,u),p&2048&&vl(9,r);break;case 1:wa(n,r,i,u);break;case 3:wa(n,r,i,u),p&2048&&(n=null,r.alternate!==null&&(n=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==n&&(r.refCount++,n!=null&&fl(n)));break;case 12:if(p&2048){wa(n,r,i,u),n=r.stateNode;try{var g=r.memoizedProps,_=g.id,w=g.onPostCommit;typeof w=="function"&&w(_,r.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(z){yt(r,r.return,z)}}else wa(n,r,i,u);break;case 31:wa(n,r,i,u);break;case 13:wa(n,r,i,u);break;case 23:break;case 22:g=r.stateNode,_=r.alternate,r.memoizedState!==null?g._visibility&2?wa(n,r,i,u):Cl(n,r):g._visibility&2?wa(n,r,i,u):(g._visibility|=2,bi(n,r,i,u,(r.subtreeFlags&10256)!==0||!1)),p&2048&&mf(_,r);break;case 24:wa(n,r,i,u),p&2048&&hf(r.alternate,r);break;default:wa(n,r,i,u)}}function bi(n,r,i,u,p){for(p=p&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var g=n,_=r,w=i,z=u,te=_.flags;switch(_.tag){case 0:case 11:case 15:bi(g,_,w,z,p),vl(8,_);break;case 23:break;case 22:var ue=_.stateNode;_.memoizedState!==null?ue._visibility&2?bi(g,_,w,z,p):Cl(g,_):(ue._visibility|=2,bi(g,_,w,z,p)),p&&te&2048&&mf(_.alternate,_);break;case 24:bi(g,_,w,z,p),p&&te&2048&&hf(_.alternate,_);break;default:bi(g,_,w,z,p)}r=r.sibling}}function Cl(n,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var i=n,u=r,p=u.flags;switch(u.tag){case 22:Cl(i,u),p&2048&&mf(u.alternate,u);break;case 24:Cl(i,u),p&2048&&hf(u.alternate,u);break;default:Cl(i,u)}r=r.sibling}}var wl=8192;function xi(n,r,i){if(n.subtreeFlags&wl)for(n=n.child;n!==null;)hg(n,r,i),n=n.sibling}function hg(n,r,i){switch(n.tag){case 26:xi(n,r,i),n.flags&wl&&n.memoizedState!==null&&t2(i,Ca,n.memoizedState,n.memoizedProps);break;case 5:xi(n,r,i);break;case 3:case 4:var u=Ca;Ca=Iu(n.stateNode.containerInfo),xi(n,r,i),Ca=u;break;case 22:n.memoizedState===null&&(u=n.alternate,u!==null&&u.memoizedState!==null?(u=wl,wl=16777216,xi(n,r,i),wl=u):xi(n,r,i));break;default:xi(n,r,i)}}function pg(n){var r=n.alternate;if(r!==null&&(n=r.child,n!==null)){r.child=null;do r=n.sibling,n.sibling=null,n=r;while(n!==null)}}function kl(n){var r=n.deletions;if((n.flags&16)!==0){if(r!==null)for(var i=0;i<r.length;i++){var u=r[i];dn=u,bg(u,n)}pg(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)gg(n),n=n.sibling}function gg(n){switch(n.tag){case 0:case 11:case 15:kl(n),n.flags&2048&&zr(9,n,n.return);break;case 3:kl(n);break;case 12:kl(n);break;case 22:var r=n.stateNode;n.memoizedState!==null&&r._visibility&2&&(n.return===null||n.return.tag!==13)?(r._visibility&=-3,Eu(n)):kl(n);break;default:kl(n)}}function Eu(n){var r=n.deletions;if((n.flags&16)!==0){if(r!==null)for(var i=0;i<r.length;i++){var u=r[i];dn=u,bg(u,n)}pg(n)}for(n=n.child;n!==null;){switch(r=n,r.tag){case 0:case 11:case 15:zr(8,r,r.return),Eu(r);break;case 22:i=r.stateNode,i._visibility&2&&(i._visibility&=-3,Eu(r));break;default:Eu(r)}n=n.sibling}}function bg(n,r){for(;dn!==null;){var i=dn;switch(i.tag){case 0:case 11:case 15:zr(8,i,r);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:fl(i.memoizedState.cache)}if(u=i.child,u!==null)u.return=i,dn=u;else e:for(i=n;dn!==null;){u=dn;var p=u.sibling,g=u.return;if(lg(u),u===i){dn=null;break e}if(p!==null){p.return=g,dn=p;break e}dn=g}}}var gN={getCacheForType:function(n){var r=bn(en),i=r.data.get(n);return i===void 0&&(i=n(),r.data.set(n,i)),i},cacheSignal:function(){return bn(en).controller.signal}},bN=typeof WeakMap=="function"?WeakMap:Map,pt=0,wt=null,nt=null,it=0,Et=0,ta=null,qr=!1,Ei=!1,pf=!1,gr=0,qt=0,Yr=0,Os=0,gf=0,na=0,yi=0,Rl=null,zn=null,bf=!1,yu=0,xg=0,Tu=1/0,_u=null,$r=null,on=0,Gr=null,Ti=null,br=0,xf=0,Ef=null,Eg=null,Ol=0,yf=null;function aa(){return(pt&2)!==0&&it!==0?it&-it:V.T!==null?Af():Ks()}function yg(){if(na===0)if((it&536870912)===0||ot){var n=Gs;Gs<<=1,(Gs&3932160)===0&&(Gs=262144),na=n}else na=536870912;return n=Jn.current,n!==null&&(n.flags|=32),na}function qn(n,r,i){(n===wt&&(Et===2||Et===9)||n.cancelPendingCommit!==null)&&(_i(n,0),Kr(n,it,na,!1)),Ct(n,i),((pt&2)===0||n!==wt)&&(n===wt&&((pt&2)===0&&(Os|=i),qt===4&&Kr(n,it,na,!1)),za(n))}function Tg(n,r,i){if((pt&6)!==0)throw Error(s(327));var u=!i&&(r&127)===0&&(r&n.expiredLanes)===0||ce(n,r),p=u?yN(n,r):_f(n,r,!0),g=u;do{if(p===0){Ei&&!u&&Kr(n,r,0,!1);break}else{if(i=n.current.alternate,g&&!xN(i)){p=_f(n,r,!1),g=!1;continue}if(p===2){if(g=r,n.errorRecoveryDisabledLanes&g)var _=0;else _=n.pendingLanes&-536870913,_=_!==0?_:_&536870912?536870912:0;if(_!==0){r=_;e:{var w=n;p=Rl;var z=w.current.memoizedState.isDehydrated;if(z&&(_i(w,_).flags|=256),_=_f(w,_,!1),_!==2){if(pf&&!z){w.errorRecoveryDisabledLanes|=g,Os|=g,p=4;break e}g=zn,zn=p,g!==null&&(zn===null?zn=g:zn.push.apply(zn,g))}p=_}if(g=!1,p!==2)continue}}if(p===1){_i(n,0),Kr(n,r,0,!0);break}e:{switch(u=n,g=p,g){case 0:case 1:throw Error(s(345));case 4:if((r&4194048)!==r)break;case 6:Kr(u,r,na,!qr);break e;case 2:zn=null;break;case 3:case 5:break;default:throw Error(s(329))}if((r&62914560)===r&&(p=yu+300-_t(),10<p)){if(Kr(u,r,na,!qr),q(u,0,!0)!==0)break e;br=r,u.timeoutHandle=Wg(_g.bind(null,u,i,zn,_u,bf,r,na,Os,yi,qr,g,"Throttled",-0,0),p);break e}_g(u,i,zn,_u,bf,r,na,Os,yi,qr,g,null,-0,0)}}break}while(!0);za(n)}function _g(n,r,i,u,p,g,_,w,z,te,ue,he,ne,ie){if(n.timeoutHandle=-1,he=r.subtreeFlags,he&8192||(he&16785408)===16785408){he={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:_e},hg(r,g,he);var Re=(g&62914560)===g?yu-_t():(g&4194048)===g?xg-_t():0;if(Re=n2(he,Re),Re!==null){br=g,n.cancelPendingCommit=Re(Rg.bind(null,n,r,g,i,u,p,_,w,z,ue,he,null,ne,ie)),Kr(n,g,_,!te);return}}Rg(n,r,g,i,u,p,_,w,z)}function xN(n){for(var r=n;;){var i=r.tag;if((i===0||i===11||i===15)&&r.flags&16384&&(i=r.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var u=0;u<i.length;u++){var p=i[u],g=p.getSnapshot;p=p.value;try{if(!Zn(g(),p))return!1}catch{return!1}}if(i=r.child,r.subtreeFlags&16384&&i!==null)i.return=r,r=i;else{if(r===n)break;for(;r.sibling===null;){if(r.return===null||r.return===n)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function Kr(n,r,i,u){r&=~gf,r&=~Os,n.suspendedLanes|=r,n.pingedLanes&=~r,u&&(n.warmLanes|=r),u=n.expirationTimes;for(var p=r;0<p;){var g=31-gt(p),_=1<<g;u[g]=-1,p&=~_}i!==0&&we(n,i,r)}function Nu(){return(pt&6)===0?(Il(0),!1):!0}function Tf(){if(nt!==null){if(Et===0)var n=nt.return;else n=nt,ir=_s=null,jd(n),fi=null,hl=0,n=nt;for(;n!==null;)Jp(n.alternate,n),n=n.return;nt=null}}function _i(n,r){var i=n.timeoutHandle;i!==-1&&(n.timeoutHandle=-1,PN(i)),i=n.cancelPendingCommit,i!==null&&(n.cancelPendingCommit=null,i()),br=0,Tf(),wt=n,nt=i=rr(n.current,null),it=r,Et=0,ta=null,qr=!1,Ei=ce(n,r),pf=!1,yi=na=gf=Os=Yr=qt=0,zn=Rl=null,bf=!1,(r&8)!==0&&(r|=r&32);var u=n.entangledLanes;if(u!==0)for(n=n.entanglements,u&=r;0<u;){var p=31-gt(u),g=1<<p;r|=n[p],u&=~g}return gr=r,Yo(),i}function Ng(n,r){Xe=null,V.H=_l,r===di||r===Wo?(r=U0(),Et=3):r===Sd?(r=U0(),Et=4):Et=r===Wd?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,ta=r,nt===null&&(qt=1,fu(n,ma(r,n.current)))}function Sg(){var n=Jn.current;return n===null?!0:(it&4194048)===it?ba===null:(it&62914560)===it||(it&536870912)!==0?n===ba:!1}function vg(){var n=V.H;return V.H=_l,n===null?_l:n}function Ag(){var n=V.A;return V.A=gN,n}function Su(){qt=4,qr||(it&4194048)!==it&&Jn.current!==null||(Ei=!0),(Yr&134217727)===0&&(Os&134217727)===0||wt===null||Kr(wt,it,na,!1)}function _f(n,r,i){var u=pt;pt|=2;var p=vg(),g=Ag();(wt!==n||it!==r)&&(_u=null,_i(n,r)),r=!1;var _=qt;e:do try{if(Et!==0&&nt!==null){var w=nt,z=ta;switch(Et){case 8:Tf(),_=6;break e;case 3:case 2:case 9:case 6:Jn.current===null&&(r=!0);var te=Et;if(Et=0,ta=null,Ni(n,w,z,te),i&&Ei){_=0;break e}break;default:te=Et,Et=0,ta=null,Ni(n,w,z,te)}}EN(),_=qt;break}catch(ue){Ng(n,ue)}while(!0);return r&&n.shellSuspendCounter++,ir=_s=null,pt=u,V.H=p,V.A=g,nt===null&&(wt=null,it=0,Yo()),_}function EN(){for(;nt!==null;)Cg(nt)}function yN(n,r){var i=pt;pt|=2;var u=vg(),p=Ag();wt!==n||it!==r?(_u=null,Tu=_t()+500,_i(n,r)):Ei=ce(n,r);e:do try{if(Et!==0&&nt!==null){r=nt;var g=ta;t:switch(Et){case 1:Et=0,ta=null,Ni(n,r,g,1);break;case 2:case 9:if(B0(g)){Et=0,ta=null,wg(r);break}r=function(){Et!==2&&Et!==9||wt!==n||(Et=7),za(n)},g.then(r,r);break e;case 3:Et=7;break e;case 4:Et=5;break e;case 7:B0(g)?(Et=0,ta=null,wg(r)):(Et=0,ta=null,Ni(n,r,g,7));break;case 5:var _=null;switch(nt.tag){case 26:_=nt.memoizedState;case 5:case 27:var w=nt;if(_?mb(_):w.stateNode.complete){Et=0,ta=null;var z=w.sibling;if(z!==null)nt=z;else{var te=w.return;te!==null?(nt=te,vu(te)):nt=null}break t}}Et=0,ta=null,Ni(n,r,g,5);break;case 6:Et=0,ta=null,Ni(n,r,g,6);break;case 8:Tf(),qt=6;break e;default:throw Error(s(462))}}TN();break}catch(ue){Ng(n,ue)}while(!0);return ir=_s=null,V.H=u,V.A=p,pt=i,nt!==null?0:(wt=null,it=0,Yo(),qt)}function TN(){for(;nt!==null&&!ja();)Cg(nt)}function Cg(n){var r=Zp(n.alternate,n,gr);n.memoizedProps=n.pendingProps,r===null?vu(n):nt=r}function wg(n){var r=n,i=r.alternate;switch(r.tag){case 15:case 0:r=$p(i,r,r.pendingProps,r.type,void 0,it);break;case 11:r=$p(i,r,r.pendingProps,r.type.render,r.ref,it);break;case 5:jd(r);default:Jp(i,r),r=nt=A0(r,gr),r=Zp(i,r,gr)}n.memoizedProps=n.pendingProps,r===null?vu(n):nt=r}function Ni(n,r,i,u){ir=_s=null,jd(r),fi=null,hl=0;var p=r.return;try{if(uN(n,p,r,i,it)){qt=1,fu(n,ma(i,n.current)),nt=null;return}}catch(g){if(p!==null)throw nt=p,g;qt=1,fu(n,ma(i,n.current)),nt=null;return}r.flags&32768?(ot||u===1?n=!0:Ei||(it&536870912)!==0?n=!1:(qr=n=!0,(u===2||u===9||u===3||u===6)&&(u=Jn.current,u!==null&&u.tag===13&&(u.flags|=16384))),kg(r,n)):vu(r)}function vu(n){var r=n;do{if((r.flags&32768)!==0){kg(r,qr);return}n=r.return;var i=fN(r.alternate,r,gr);if(i!==null){nt=i;return}if(r=r.sibling,r!==null){nt=r;return}nt=r=n}while(r!==null);qt===0&&(qt=5)}function kg(n,r){do{var i=mN(n.alternate,n);if(i!==null){i.flags&=32767,nt=i;return}if(i=n.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!r&&(n=n.sibling,n!==null)){nt=n;return}nt=n=i}while(n!==null);qt=6,nt=null}function Rg(n,r,i,u,p,g,_,w,z){n.cancelPendingCommit=null;do Au();while(on!==0);if((pt&6)!==0)throw Error(s(327));if(r!==null){if(r===n.current)throw Error(s(177));if(g=r.lanes|r.childLanes,g|=ud,Ie(n,i,g,_,w,z),n===wt&&(nt=wt=null,it=0),Ti=r,Gr=n,br=i,xf=g,Ef=p,Eg=u,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,vN(Be,function(){return Lg(),null})):(n.callbackNode=null,n.callbackPriority=0),u=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||u){u=V.T,V.T=null,p=G.p,G.p=2,_=pt,pt|=4;try{hN(n,r,i)}finally{pt=_,G.p=p,V.T=u}}on=1,Og(),Ig(),Mg()}}function Og(){if(on===1){on=0;var n=Gr,r=Ti,i=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||i){i=V.T,V.T=null;var u=G.p;G.p=2;var p=pt;pt|=4;try{dg(r,n);var g=Df,_=b0(n.containerInfo),w=g.focusedElem,z=g.selectionRange;if(_!==w&&w&&w.ownerDocument&&g0(w.ownerDocument.documentElement,w)){if(z!==null&&rd(w)){var te=z.start,ue=z.end;if(ue===void 0&&(ue=te),"selectionStart"in w)w.selectionStart=te,w.selectionEnd=Math.min(ue,w.value.length);else{var he=w.ownerDocument||document,ne=he&&he.defaultView||window;if(ne.getSelection){var ie=ne.getSelection(),Re=w.textContent.length,Fe=Math.min(z.start,Re),vt=z.end===void 0?Fe:Math.min(z.end,Re);!ie.extend&&Fe>vt&&(_=vt,vt=Fe,Fe=_);var Q=p0(w,Fe),K=p0(w,vt);if(Q&&K&&(ie.rangeCount!==1||ie.anchorNode!==Q.node||ie.anchorOffset!==Q.offset||ie.focusNode!==K.node||ie.focusOffset!==K.offset)){var ee=he.createRange();ee.setStart(Q.node,Q.offset),ie.removeAllRanges(),Fe>vt?(ie.addRange(ee),ie.extend(K.node,K.offset)):(ee.setEnd(K.node,K.offset),ie.addRange(ee))}}}}for(he=[],ie=w;ie=ie.parentNode;)ie.nodeType===1&&he.push({element:ie,left:ie.scrollLeft,top:ie.scrollTop});for(typeof w.focus=="function"&&w.focus(),w=0;w<he.length;w++){var de=he[w];de.element.scrollLeft=de.left,de.element.scrollTop=de.top}}Pu=!!Mf,Df=Mf=null}finally{pt=p,G.p=u,V.T=i}}n.current=r,on=2}}function Ig(){if(on===2){on=0;var n=Gr,r=Ti,i=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||i){i=V.T,V.T=null;var u=G.p;G.p=2;var p=pt;pt|=4;try{ig(n,r.alternate,r)}finally{pt=p,G.p=u,V.T=i}}on=3}}function Mg(){if(on===4||on===3){on=0,Ar();var n=Gr,r=Ti,i=br,u=Eg;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?on=5:(on=0,Ti=Gr=null,Dg(n,n.pendingLanes));var p=n.pendingLanes;if(p===0&&($r=null),Ja(i),r=r.stateNode,Ot&&typeof Ot.onCommitFiberRoot=="function")try{Ot.onCommitFiberRoot(Zt,r,void 0,(r.current.flags&128)===128)}catch{}if(u!==null){r=V.T,p=G.p,G.p=2,V.T=null;try{for(var g=n.onRecoverableError,_=0;_<u.length;_++){var w=u[_];g(w.value,{componentStack:w.stack})}}finally{V.T=r,G.p=p}}(br&3)!==0&&Au(),za(n),p=n.pendingLanes,(i&261930)!==0&&(p&42)!==0?n===yf?Ol++:(Ol=0,yf=n):Ol=0,Il(0)}}function Dg(n,r){(n.pooledCacheLanes&=r)===0&&(r=n.pooledCache,r!=null&&(n.pooledCache=null,fl(r)))}function Au(){return Og(),Ig(),Mg(),Lg()}function Lg(){if(on!==5)return!1;var n=Gr,r=xf;xf=0;var i=Ja(br),u=V.T,p=G.p;try{G.p=32>i?32:i,V.T=null,i=Ef,Ef=null;var g=Gr,_=br;if(on=0,Ti=Gr=null,br=0,(pt&6)!==0)throw Error(s(331));var w=pt;if(pt|=4,gg(g.current),mg(g,g.current,_,i),pt=w,Il(0,!1),Ot&&typeof Ot.onPostCommitFiberRoot=="function")try{Ot.onPostCommitFiberRoot(Zt,g)}catch{}return!0}finally{G.p=p,V.T=u,Dg(n,r)}}function jg(n,r,i){r=ma(i,r),r=Zd(n.stateNode,r,2),n=Ur(n,r,2),n!==null&&(Ct(n,2),za(n))}function yt(n,r,i){if(n.tag===3)jg(n,n,i);else for(;r!==null;){if(r.tag===3){jg(r,n,i);break}else if(r.tag===1){var u=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&($r===null||!$r.has(u))){n=ma(i,n),i=Bp(2),u=Ur(r,i,2),u!==null&&(Pp(i,u,r,n),Ct(u,2),za(u));break}}r=r.return}}function Nf(n,r,i){var u=n.pingCache;if(u===null){u=n.pingCache=new bN;var p=new Set;u.set(r,p)}else p=u.get(r),p===void 0&&(p=new Set,u.set(r,p));p.has(i)||(pf=!0,p.add(i),n=_N.bind(null,n,r,i),r.then(n,n))}function _N(n,r,i){var u=n.pingCache;u!==null&&u.delete(r),n.pingedLanes|=n.suspendedLanes&i,n.warmLanes&=~i,wt===n&&(it&i)===i&&(qt===4||qt===3&&(it&62914560)===it&&300>_t()-yu?(pt&2)===0&&_i(n,0):gf|=i,yi===it&&(yi=0)),za(n)}function Bg(n,r){r===0&&(r=Ge()),n=Es(n,r),n!==null&&(Ct(n,r),za(n))}function NN(n){var r=n.memoizedState,i=0;r!==null&&(i=r.retryLane),Bg(n,i)}function SN(n,r){var i=0;switch(n.tag){case 31:case 13:var u=n.stateNode,p=n.memoizedState;p!==null&&(i=p.retryLane);break;case 19:u=n.stateNode;break;case 22:u=n.stateNode._retryCache;break;default:throw Error(s(314))}u!==null&&u.delete(r),Bg(n,i)}function vN(n,r){return va(n,r)}var Cu=null,Si=null,Sf=!1,wu=!1,vf=!1,Vr=0;function za(n){n!==Si&&n.next===null&&(Si===null?Cu=Si=n:Si=Si.next=n),wu=!0,Sf||(Sf=!0,CN())}function Il(n,r){if(!vf&&wu){vf=!0;do for(var i=!1,u=Cu;u!==null;){if(n!==0){var p=u.pendingLanes;if(p===0)var g=0;else{var _=u.suspendedLanes,w=u.pingedLanes;g=(1<<31-gt(42|n)+1)-1,g&=p&~(_&~w),g=g&201326741?g&201326741|1:g?g|2:0}g!==0&&(i=!0,Fg(u,g))}else g=it,g=q(u,u===wt?g:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(g&3)===0||ce(u,g)||(i=!0,Fg(u,g));u=u.next}while(i);vf=!1}}function AN(){Pg()}function Pg(){wu=Sf=!1;var n=0;Vr!==0&&BN()&&(n=Vr);for(var r=_t(),i=null,u=Cu;u!==null;){var p=u.next,g=Ug(u,r);g===0?(u.next=null,i===null?Cu=p:i.next=p,p===null&&(Si=i)):(i=u,(n!==0||(g&3)!==0)&&(wu=!0)),u=p}on!==0&&on!==5||Il(n),Vr!==0&&(Vr=0)}function Ug(n,r){for(var i=n.suspendedLanes,u=n.pingedLanes,p=n.expirationTimes,g=n.pendingLanes&-62914561;0<g;){var _=31-gt(g),w=1<<_,z=p[_];z===-1?((w&i)===0||(w&u)!==0)&&(p[_]=Ne(w,r)):z<=r&&(n.expiredLanes|=w),g&=~w}if(r=wt,i=it,i=q(n,n===r?i:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),u=n.callbackNode,i===0||n===r&&(Et===2||Et===9)||n.cancelPendingCommit!==null)return u!==null&&u!==null&&Za(u),n.callbackNode=null,n.callbackPriority=0;if((i&3)===0||ce(n,i)){if(r=i&-i,r===n.callbackPriority)return r;switch(u!==null&&Za(u),Ja(i)){case 2:case 8:i=Te;break;case 32:i=Be;break;case 268435456:i=Se;break;default:i=Be}return u=Hg.bind(null,n),i=va(i,u),n.callbackPriority=r,n.callbackNode=i,r}return u!==null&&u!==null&&Za(u),n.callbackPriority=2,n.callbackNode=null,2}function Hg(n,r){if(on!==0&&on!==5)return n.callbackNode=null,n.callbackPriority=0,null;var i=n.callbackNode;if(Au()&&n.callbackNode!==i)return null;var u=it;return u=q(n,n===wt?u:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),u===0?null:(Tg(n,u,r),Ug(n,_t()),n.callbackNode!=null&&n.callbackNode===i?Hg.bind(null,n):null)}function Fg(n,r){if(Au())return null;Tg(n,r,!0)}function CN(){UN(function(){(pt&6)!==0?va(oe,AN):Pg()})}function Af(){if(Vr===0){var n=ui;n===0&&(n=ds,ds<<=1,(ds&261888)===0&&(ds=256)),Vr=n}return Vr}function zg(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:Or(""+n)}function qg(n,r){var i=r.ownerDocument.createElement("input");return i.name=r.name,i.value=r.value,n.id&&i.setAttribute("form",n.id),r.parentNode.insertBefore(i,r),n=new FormData(n),i.parentNode.removeChild(i),n}function wN(n,r,i,u,p){if(r==="submit"&&i&&i.stateNode===p){var g=zg((p[Tn]||null).action),_=u.submitter;_&&(r=(r=_[Tn]||null)?zg(r.formAction):_.getAttribute("formAction"),r!==null&&(g=r,_=null));var w=new Ho("action","action",null,u,p);n.push({event:w,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(Vr!==0){var z=_?qg(p,_):new FormData(p);$d(i,{pending:!0,data:z,method:p.method,action:g},null,z)}}else typeof g=="function"&&(w.preventDefault(),z=_?qg(p,_):new FormData(p),$d(i,{pending:!0,data:z,method:p.method,action:g},g,z))},currentTarget:p}]})}}for(var Cf=0;Cf<od.length;Cf++){var wf=od[Cf],kN=wf.toLowerCase(),RN=wf[0].toUpperCase()+wf.slice(1);Aa(kN,"on"+RN)}Aa(y0,"onAnimationEnd"),Aa(T0,"onAnimationIteration"),Aa(_0,"onAnimationStart"),Aa("dblclick","onDoubleClick"),Aa("focusin","onFocus"),Aa("focusout","onBlur"),Aa(G_,"onTransitionRun"),Aa(K_,"onTransitionStart"),Aa(V_,"onTransitionCancel"),Aa(N0,"onTransitionEnd"),Ee("onMouseEnter",["mouseout","mouseover"]),Ee("onMouseLeave",["mouseout","mouseover"]),Ee("onPointerEnter",["pointerout","pointerover"]),Ee("onPointerLeave",["pointerout","pointerover"]),tr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),tr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),tr("onBeforeInput",["compositionend","keypress","textInput","paste"]),tr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),tr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),tr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ml="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(" "),ON=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ml));function Yg(n,r){r=(r&4)!==0;for(var i=0;i<n.length;i++){var u=n[i],p=u.event;u=u.listeners;e:{var g=void 0;if(r)for(var _=u.length-1;0<=_;_--){var w=u[_],z=w.instance,te=w.currentTarget;if(w=w.listener,z!==g&&p.isPropagationStopped())break e;g=w,p.currentTarget=te;try{g(p)}catch(ue){qo(ue)}p.currentTarget=null,g=z}else for(_=0;_<u.length;_++){if(w=u[_],z=w.instance,te=w.currentTarget,w=w.listener,z!==g&&p.isPropagationStopped())break e;g=w,p.currentTarget=te;try{g(p)}catch(ue){qo(ue)}p.currentTarget=null,g=z}}}}function at(n,r){var i=r[Qi];i===void 0&&(i=r[Qi]=new Set);var u=n+"__bubble";i.has(u)||($g(r,n,2,!1),i.add(u))}function kf(n,r,i){var u=0;r&&(u|=4),$g(i,n,u,r)}var ku="_reactListening"+Math.random().toString(36).slice(2);function Rf(n){if(!n[ku]){n[ku]=!0,Io.forEach(function(i){i!=="selectionchange"&&(ON.has(i)||kf(i,!1,n),kf(i,!0,n))});var r=n.nodeType===9?n:n.ownerDocument;r===null||r[ku]||(r[ku]=!0,kf("selectionchange",!1,r))}}function $g(n,r,i,u){switch(yb(r)){case 2:var p=s2;break;case 8:p=i2;break;default:p=$f}i=p.bind(null,r,i,n),p=void 0,!Qc||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(p=!0),u?p!==void 0?n.addEventListener(r,i,{capture:!0,passive:p}):n.addEventListener(r,i,!0):p!==void 0?n.addEventListener(r,i,{passive:p}):n.addEventListener(r,i,!1)}function Of(n,r,i,u,p){var g=u;if((r&1)===0&&(r&2)===0&&u!==null)e:for(;;){if(u===null)return;var _=u.tag;if(_===3||_===4){var w=u.stateNode.containerInfo;if(w===p)break;if(_===4)for(_=u.return;_!==null;){var z=_.tag;if((z===3||z===4)&&_.stateNode.containerInfo===p)return;_=_.return}for(;w!==null;){if(_=kn(w),_===null)return;if(z=_.tag,z===5||z===6||z===26||z===27){u=g=_;continue e}w=w.parentNode}}u=u.return}jo(function(){var te=g,ue=Qe(i),he=[];e:{var ne=S0.get(n);if(ne!==void 0){var ie=Ho,Re=n;switch(n){case"keypress":if(Po(i)===0)break e;case"keydown":case"keyup":ie=S_;break;case"focusin":Re="focus",ie=Jc;break;case"focusout":Re="blur",ie=Jc;break;case"beforeblur":case"afterblur":ie=Jc;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":ie=Jh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ie=f_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ie=C_;break;case y0:case T0:case _0:ie=p_;break;case N0:ie=k_;break;case"scroll":case"scrollend":ie=c_;break;case"wheel":ie=O_;break;case"copy":case"cut":case"paste":ie=b_;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ie=t0;break;case"toggle":case"beforetoggle":ie=M_}var Fe=(r&4)!==0,vt=!Fe&&(n==="scroll"||n==="scrollend"),Q=Fe?ne!==null?ne+"Capture":null:ne;Fe=[];for(var K=te,ee;K!==null;){var de=K;if(ee=de.stateNode,de=de.tag,de!==5&&de!==26&&de!==27||ee===null||Q===null||(de=tl(K,Q),de!=null&&Fe.push(Dl(K,de,ee))),vt)break;K=K.return}0<Fe.length&&(ne=new ie(ne,Re,null,i,ue),he.push({event:ne,listeners:Fe}))}}if((r&7)===0){e:{if(ne=n==="mouseover"||n==="pointerover",ie=n==="mouseout"||n==="pointerout",ne&&i!==Me&&(Re=i.relatedTarget||i.fromElement)&&(kn(Re)||Re[Cr]))break e;if((ie||ne)&&(ne=ue.window===ue?ue:(ne=ue.ownerDocument)?ne.defaultView||ne.parentWindow:window,ie?(Re=i.relatedTarget||i.toElement,ie=te,Re=Re?kn(Re):null,Re!==null&&(vt=o(Re),Fe=Re.tag,Re!==vt||Fe!==5&&Fe!==27&&Fe!==6)&&(Re=null)):(ie=null,Re=te),ie!==Re)){if(Fe=Jh,de="onMouseLeave",Q="onMouseEnter",K="mouse",(n==="pointerout"||n==="pointerover")&&(Fe=t0,de="onPointerLeave",Q="onPointerEnter",K="pointer"),vt=ie==null?ne:wr(ie),ee=Re==null?ne:wr(Re),ne=new Fe(de,K+"leave",ie,i,ue),ne.target=vt,ne.relatedTarget=ee,de=null,kn(ue)===te&&(Fe=new Fe(Q,K+"enter",Re,i,ue),Fe.target=ee,Fe.relatedTarget=vt,de=Fe),vt=de,ie&&Re)t:{for(Fe=IN,Q=ie,K=Re,ee=0,de=Q;de;de=Fe(de))ee++;de=0;for(var je=K;je;je=Fe(je))de++;for(;0<ee-de;)Q=Fe(Q),ee--;for(;0<de-ee;)K=Fe(K),de--;for(;ee--;){if(Q===K||K!==null&&Q===K.alternate){Fe=Q;break t}Q=Fe(Q),K=Fe(K)}Fe=null}else Fe=null;ie!==null&&Gg(he,ne,ie,Fe,!1),Re!==null&&vt!==null&&Gg(he,vt,Re,Fe,!0)}}e:{if(ne=te?wr(te):window,ie=ne.nodeName&&ne.nodeName.toLowerCase(),ie==="select"||ie==="input"&&ne.type==="file")var mt=u0;else if(l0(ne))if(c0)mt=q_;else{mt=F_;var De=H_}else ie=ne.nodeName,!ie||ie.toLowerCase()!=="input"||ne.type!=="checkbox"&&ne.type!=="radio"?te&&Rr(te.elementType)&&(mt=u0):mt=z_;if(mt&&(mt=mt(n,te))){o0(he,mt,i,ue);break e}De&&De(n,ne,te),n==="focusout"&&te&&ne.type==="number"&&te.memoizedProps.value!=null&&Ws(ne,"number",ne.value)}switch(De=te?wr(te):window,n){case"focusin":(l0(De)||De.contentEditable==="true")&&(ti=De,sd=te,ul=null);break;case"focusout":ul=sd=ti=null;break;case"mousedown":id=!0;break;case"contextmenu":case"mouseup":case"dragend":id=!1,x0(he,i,ue);break;case"selectionchange":if($_)break;case"keydown":case"keyup":x0(he,i,ue)}var Ze;if(td)e:{switch(n){case"compositionstart":var lt="onCompositionStart";break e;case"compositionend":lt="onCompositionEnd";break e;case"compositionupdate":lt="onCompositionUpdate";break e}lt=void 0}else ei?s0(n,i)&&(lt="onCompositionEnd"):n==="keydown"&&i.keyCode===229&&(lt="onCompositionStart");lt&&(n0&&i.locale!=="ko"&&(ei||lt!=="onCompositionStart"?lt==="onCompositionEnd"&&ei&&(Ze=Zh()):(Ir=ue,Xc="value"in Ir?Ir.value:Ir.textContent,ei=!0)),De=Ru(te,lt),0<De.length&&(lt=new e0(lt,n,null,i,ue),he.push({event:lt,listeners:De}),Ze?lt.data=Ze:(Ze=i0(i),Ze!==null&&(lt.data=Ze)))),(Ze=L_?j_(n,i):B_(n,i))&&(lt=Ru(te,"onBeforeInput"),0<lt.length&&(De=new e0("onBeforeInput","beforeinput",null,i,ue),he.push({event:De,listeners:lt}),De.data=Ze)),wN(he,n,te,i,ue)}Yg(he,r)})}function Dl(n,r,i){return{instance:n,listener:r,currentTarget:i}}function Ru(n,r){for(var i=r+"Capture",u=[];n!==null;){var p=n,g=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||g===null||(p=tl(n,i),p!=null&&u.unshift(Dl(n,p,g)),p=tl(n,r),p!=null&&u.push(Dl(n,p,g))),n.tag===3)return u;n=n.return}return[]}function IN(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function Gg(n,r,i,u,p){for(var g=r._reactName,_=[];i!==null&&i!==u;){var w=i,z=w.alternate,te=w.stateNode;if(w=w.tag,z!==null&&z===u)break;w!==5&&w!==26&&w!==27||te===null||(z=te,p?(te=tl(i,g),te!=null&&_.unshift(Dl(i,te,z))):p||(te=tl(i,g),te!=null&&_.push(Dl(i,te,z)))),i=i.return}_.length!==0&&n.push({event:r,listeners:_})}var MN=/\r\n?/g,DN=/\u0000|\uFFFD/g;function Kg(n){return(typeof n=="string"?n:""+n).replace(MN,`
|
|
49
|
+
`).replace(DN,"")}function Vg(n,r){return r=Kg(r),Kg(n)===r}function St(n,r,i,u,p,g){switch(i){case"children":typeof u=="string"?r==="body"||r==="textarea"&&u===""||ze(n,u):(typeof u=="number"||typeof u=="bigint")&&r!=="body"&&ze(n,""+u);break;case"className":Qn(n,"class",u);break;case"tabIndex":Qn(n,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":Qn(n,i,u);break;case"style":xt(n,u,g);break;case"data":if(r!=="object"){Qn(n,"data",u);break}case"src":case"href":if(u===""&&(r!=="a"||i!=="href")){n.removeAttribute(i);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){n.removeAttribute(i);break}u=Or(""+u),n.setAttribute(i,u);break;case"action":case"formAction":if(typeof u=="function"){n.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 g=="function"&&(i==="formAction"?(r!=="input"&&St(n,r,"name",p.name,p,null),St(n,r,"formEncType",p.formEncType,p,null),St(n,r,"formMethod",p.formMethod,p,null),St(n,r,"formTarget",p.formTarget,p,null)):(St(n,r,"encType",p.encType,p,null),St(n,r,"method",p.method,p,null),St(n,r,"target",p.target,p,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){n.removeAttribute(i);break}u=Or(""+u),n.setAttribute(i,u);break;case"onClick":u!=null&&(n.onclick=_e);break;case"onScroll":u!=null&&at("scroll",n);break;case"onScrollEnd":u!=null&&at("scrollend",n);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(s(61));if(i=u.__html,i!=null){if(p.children!=null)throw Error(s(60));n.innerHTML=i}}break;case"multiple":n.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":n.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"){n.removeAttribute("xlink:href");break}i=Or(""+u),n.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"?n.setAttribute(i,""+u):n.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"?n.setAttribute(i,""):n.removeAttribute(i);break;case"capture":case"download":u===!0?n.setAttribute(i,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?n.setAttribute(i,u):n.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?n.setAttribute(i,u):n.removeAttribute(i);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?n.removeAttribute(i):n.setAttribute(i,u);break;case"popover":at("beforetoggle",n),at("toggle",n),_n(n,"popover",u);break;case"xlinkActuate":jn(n,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":jn(n,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":jn(n,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":jn(n,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":jn(n,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":jn(n,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":jn(n,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":jn(n,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":jn(n,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":_n(n,"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=nr.get(i)||i,_n(n,i,u))}}function If(n,r,i,u,p,g){switch(i){case"style":xt(n,u,g);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(s(61));if(i=u.__html,i!=null){if(p.children!=null)throw Error(s(60));n.innerHTML=i}}break;case"children":typeof u=="string"?ze(n,u):(typeof u=="number"||typeof u=="bigint")&&ze(n,""+u);break;case"onScroll":u!=null&&at("scroll",n);break;case"onScrollEnd":u!=null&&at("scrollend",n);break;case"onClick":u!=null&&(n.onclick=_e);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!hs.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(p=i.endsWith("Capture"),r=i.slice(2,p?i.length-7:void 0),g=n[Tn]||null,g=g!=null?g[i]:null,typeof g=="function"&&n.removeEventListener(r,g,p),typeof u=="function")){typeof g!="function"&&g!==null&&(i in n?n[i]=null:n.hasAttribute(i)&&n.removeAttribute(i)),n.addEventListener(r,u,p);break e}i in n?n[i]=u:u===!0?n.setAttribute(i,""):_n(n,i,u)}}}function En(n,r,i){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":at("error",n),at("load",n);var u=!1,p=!1,g;for(g in i)if(i.hasOwnProperty(g)){var _=i[g];if(_!=null)switch(g){case"src":u=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,r));default:St(n,r,g,_,i,null)}}p&&St(n,r,"srcSet",i.srcSet,i,null),u&&St(n,r,"src",i.src,i,null);return;case"input":at("invalid",n);var w=g=_=p=null,z=null,te=null;for(u in i)if(i.hasOwnProperty(u)){var ue=i[u];if(ue!=null)switch(u){case"name":p=ue;break;case"type":_=ue;break;case"checked":z=ue;break;case"defaultChecked":te=ue;break;case"value":g=ue;break;case"defaultValue":w=ue;break;case"children":case"dangerouslySetInnerHTML":if(ue!=null)throw Error(s(137,r));break;default:St(n,r,u,ue,i,null)}}ps(n,g,w,z,te,_,p,!1);return;case"select":at("invalid",n),u=_=g=null;for(p in i)if(i.hasOwnProperty(p)&&(w=i[p],w!=null))switch(p){case"value":g=w;break;case"defaultValue":_=w;break;case"multiple":u=w;default:St(n,r,p,w,i,null)}r=g,i=_,n.multiple=!!u,r!=null?pn(n,!!u,r,!1):i!=null&&pn(n,!!u,i,!0);return;case"textarea":at("invalid",n),g=p=u=null;for(_ in i)if(i.hasOwnProperty(_)&&(w=i[_],w!=null))switch(_){case"value":u=w;break;case"defaultValue":p=w;break;case"children":g=w;break;case"dangerouslySetInnerHTML":if(w!=null)throw Error(s(91));break;default:St(n,r,_,w,i,null)}Js(n,u,p,g);return;case"option":for(z in i)if(i.hasOwnProperty(z)&&(u=i[z],u!=null))switch(z){case"selected":n.selected=u&&typeof u!="function"&&typeof u!="symbol";break;default:St(n,r,z,u,i,null)}return;case"dialog":at("beforetoggle",n),at("toggle",n),at("cancel",n),at("close",n);break;case"iframe":case"object":at("load",n);break;case"video":case"audio":for(u=0;u<Ml.length;u++)at(Ml[u],n);break;case"image":at("error",n),at("load",n);break;case"details":at("toggle",n);break;case"embed":case"source":case"link":at("error",n),at("load",n);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(te in i)if(i.hasOwnProperty(te)&&(u=i[te],u!=null))switch(te){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,r));default:St(n,r,te,u,i,null)}return;default:if(Rr(r)){for(ue in i)i.hasOwnProperty(ue)&&(u=i[ue],u!==void 0&&If(n,r,ue,u,i,void 0));return}}for(w in i)i.hasOwnProperty(w)&&(u=i[w],u!=null&&St(n,r,w,u,i,null))}function LN(n,r,i,u){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,g=null,_=null,w=null,z=null,te=null,ue=null;for(ie in i){var he=i[ie];if(i.hasOwnProperty(ie)&&he!=null)switch(ie){case"checked":break;case"value":break;case"defaultValue":z=he;default:u.hasOwnProperty(ie)||St(n,r,ie,null,u,he)}}for(var ne in u){var ie=u[ne];if(he=i[ne],u.hasOwnProperty(ne)&&(ie!=null||he!=null))switch(ne){case"type":g=ie;break;case"name":p=ie;break;case"checked":te=ie;break;case"defaultChecked":ue=ie;break;case"value":_=ie;break;case"defaultValue":w=ie;break;case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(s(137,r));break;default:ie!==he&&St(n,r,ne,ie,u,he)}}Wi(n,_,w,z,te,ue,g,p);return;case"select":ie=_=w=ne=null;for(g in i)if(z=i[g],i.hasOwnProperty(g)&&z!=null)switch(g){case"value":break;case"multiple":ie=z;default:u.hasOwnProperty(g)||St(n,r,g,null,u,z)}for(p in u)if(g=u[p],z=i[p],u.hasOwnProperty(p)&&(g!=null||z!=null))switch(p){case"value":ne=g;break;case"defaultValue":w=g;break;case"multiple":_=g;default:g!==z&&St(n,r,p,g,u,z)}r=w,i=_,u=ie,ne!=null?pn(n,!!i,ne,!1):!!u!=!!i&&(r!=null?pn(n,!!i,r,!0):pn(n,!!i,i?[]:"",!1));return;case"textarea":ie=ne=null;for(w in i)if(p=i[w],i.hasOwnProperty(w)&&p!=null&&!u.hasOwnProperty(w))switch(w){case"value":break;case"children":break;default:St(n,r,w,null,u,p)}for(_ in u)if(p=u[_],g=i[_],u.hasOwnProperty(_)&&(p!=null||g!=null))switch(_){case"value":ne=p;break;case"defaultValue":ie=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(s(91));break;default:p!==g&&St(n,r,_,p,u,g)}Do(n,ne,ie);return;case"option":for(var Re in i)if(ne=i[Re],i.hasOwnProperty(Re)&&ne!=null&&!u.hasOwnProperty(Re))switch(Re){case"selected":n.selected=!1;break;default:St(n,r,Re,null,u,ne)}for(z in u)if(ne=u[z],ie=i[z],u.hasOwnProperty(z)&&ne!==ie&&(ne!=null||ie!=null))switch(z){case"selected":n.selected=ne&&typeof ne!="function"&&typeof ne!="symbol";break;default:St(n,r,z,ne,u,ie)}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 Fe in i)ne=i[Fe],i.hasOwnProperty(Fe)&&ne!=null&&!u.hasOwnProperty(Fe)&&St(n,r,Fe,null,u,ne);for(te in u)if(ne=u[te],ie=i[te],u.hasOwnProperty(te)&&ne!==ie&&(ne!=null||ie!=null))switch(te){case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(s(137,r));break;default:St(n,r,te,ne,u,ie)}return;default:if(Rr(r)){for(var vt in i)ne=i[vt],i.hasOwnProperty(vt)&&ne!==void 0&&!u.hasOwnProperty(vt)&&If(n,r,vt,void 0,u,ne);for(ue in u)ne=u[ue],ie=i[ue],!u.hasOwnProperty(ue)||ne===ie||ne===void 0&&ie===void 0||If(n,r,ue,ne,u,ie);return}}for(var Q in i)ne=i[Q],i.hasOwnProperty(Q)&&ne!=null&&!u.hasOwnProperty(Q)&&St(n,r,Q,null,u,ne);for(he in u)ne=u[he],ie=i[he],!u.hasOwnProperty(he)||ne===ie||ne==null&&ie==null||St(n,r,he,ne,u,ie)}function Qg(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function jN(){if(typeof performance.getEntriesByType=="function"){for(var n=0,r=0,i=performance.getEntriesByType("resource"),u=0;u<i.length;u++){var p=i[u],g=p.transferSize,_=p.initiatorType,w=p.duration;if(g&&w&&Qg(_)){for(_=0,w=p.responseEnd,u+=1;u<i.length;u++){var z=i[u],te=z.startTime;if(te>w)break;var ue=z.transferSize,he=z.initiatorType;ue&&Qg(he)&&(z=z.responseEnd,_+=ue*(z<w?1:(w-te)/(z-te)))}if(--u,r+=8*(g+_)/(p.duration/1e3),n++,10<n)break}}if(0<n)return r/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?n:5}var Mf=null,Df=null;function Ou(n){return n.nodeType===9?n:n.ownerDocument}function Xg(n){switch(n){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Zg(n,r){if(n===0)switch(r){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&r==="foreignObject"?0:n}function Lf(n,r){return n==="textarea"||n==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.children=="bigint"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var jf=null;function BN(){var n=window.event;return n&&n.type==="popstate"?n===jf?!1:(jf=n,!0):(jf=null,!1)}var Wg=typeof setTimeout=="function"?setTimeout:void 0,PN=typeof clearTimeout=="function"?clearTimeout:void 0,Jg=typeof Promise=="function"?Promise:void 0,UN=typeof queueMicrotask=="function"?queueMicrotask:typeof Jg<"u"?function(n){return Jg.resolve(null).then(n).catch(HN)}:Wg;function HN(n){setTimeout(function(){throw n})}function Qr(n){return n==="head"}function eb(n,r){var i=r,u=0;do{var p=i.nextSibling;if(n.removeChild(i),p&&p.nodeType===8)if(i=p.data,i==="/$"||i==="/&"){if(u===0){n.removeChild(p),wi(r);return}u--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")u++;else if(i==="html")Ll(n.ownerDocument.documentElement);else if(i==="head"){i=n.ownerDocument.head,Ll(i);for(var g=i.firstChild;g;){var _=g.nextSibling,w=g.nodeName;g[ms]||w==="SCRIPT"||w==="STYLE"||w==="LINK"&&g.rel.toLowerCase()==="stylesheet"||i.removeChild(g),g=_}}else i==="body"&&Ll(n.ownerDocument.body);i=p}while(i);wi(r)}function tb(n,r){var i=n;n=0;do{var u=i.nextSibling;if(i.nodeType===1?r?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(r?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),u&&u.nodeType===8)if(i=u.data,i==="/$"){if(n===0)break;n--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||n++;i=u}while(i)}function Bf(n){var r=n.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var i=r;switch(r=r.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":Bf(i),Xi(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}n.removeChild(i)}}function FN(n,r,i,u){for(;n.nodeType===1;){var p=i;if(n.nodeName.toLowerCase()!==r.toLowerCase()){if(!u&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(u){if(!n[ms])switch(r){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(g=n.getAttribute("rel"),g==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(g!==p.rel||n.getAttribute("href")!==(p.href==null||p.href===""?null:p.href)||n.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin)||n.getAttribute("title")!==(p.title==null?null:p.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(g=n.getAttribute("src"),(g!==(p.src==null?null:p.src)||n.getAttribute("type")!==(p.type==null?null:p.type)||n.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&g&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(r==="input"&&n.type==="hidden"){var g=p.name==null?null:""+p.name;if(p.type==="hidden"&&n.getAttribute("name")===g)return n}else return n;if(n=xa(n.nextSibling),n===null)break}return null}function zN(n,r,i){if(r==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!i||(n=xa(n.nextSibling),n===null))return null;return n}function nb(n,r){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!r||(n=xa(n.nextSibling),n===null))return null;return n}function Pf(n){return n.data==="$?"||n.data==="$~"}function Uf(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function qN(n,r){var i=n.ownerDocument;if(n.data==="$~")n._reactRetry=r;else if(n.data!=="$?"||i.readyState!=="loading")r();else{var u=function(){r(),i.removeEventListener("DOMContentLoaded",u)};i.addEventListener("DOMContentLoaded",u),n._reactRetry=u}}function xa(n){for(;n!=null;n=n.nextSibling){var r=n.nodeType;if(r===1||r===3)break;if(r===8){if(r=n.data,r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"||r==="F!"||r==="F")break;if(r==="/$"||r==="/&")return null}}return n}var Hf=null;function ab(n){n=n.nextSibling;for(var r=0;n;){if(n.nodeType===8){var i=n.data;if(i==="/$"||i==="/&"){if(r===0)return xa(n.nextSibling);r--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||r++}n=n.nextSibling}return null}function rb(n){n=n.previousSibling;for(var r=0;n;){if(n.nodeType===8){var i=n.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(r===0)return n;r--}else i!=="/$"&&i!=="/&"||r++}n=n.previousSibling}return null}function sb(n,r,i){switch(r=Ou(i),n){case"html":if(n=r.documentElement,!n)throw Error(s(452));return n;case"head":if(n=r.head,!n)throw Error(s(453));return n;case"body":if(n=r.body,!n)throw Error(s(454));return n;default:throw Error(s(451))}}function Ll(n){for(var r=n.attributes;r.length;)n.removeAttributeNode(r[0]);Xi(n)}var Ea=new Map,ib=new Set;function Iu(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var xr=G.d;G.d={f:YN,r:$N,D:GN,C:KN,L:VN,m:QN,X:ZN,S:XN,M:WN};function YN(){var n=xr.f(),r=Nu();return n||r}function $N(n){var r=er(n);r!==null&&r.tag===5&&r.type==="form"?Np(r):xr.r(n)}var vi=typeof document>"u"?null:document;function lb(n,r,i){var u=vi;if(u&&typeof r=="string"&&r){var p=Bn(r);p='link[rel="'+n+'"][href="'+p+'"]',typeof i=="string"&&(p+='[crossorigin="'+i+'"]'),ib.has(p)||(ib.add(p),n={rel:n,crossOrigin:i,href:r},u.querySelector(p)===null&&(r=u.createElement("link"),En(r,"link",n),Wt(r),u.head.appendChild(r)))}}function GN(n){xr.D(n),lb("dns-prefetch",n,null)}function KN(n,r){xr.C(n,r),lb("preconnect",n,r)}function VN(n,r,i){xr.L(n,r,i);var u=vi;if(u&&n&&r){var p='link[rel="preload"][as="'+Bn(r)+'"]';r==="image"&&i&&i.imageSrcSet?(p+='[imagesrcset="'+Bn(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(p+='[imagesizes="'+Bn(i.imageSizes)+'"]')):p+='[href="'+Bn(n)+'"]';var g=p;switch(r){case"style":g=Ai(n);break;case"script":g=Ci(n)}Ea.has(g)||(n=x({rel:"preload",href:r==="image"&&i&&i.imageSrcSet?void 0:n,as:r},i),Ea.set(g,n),u.querySelector(p)!==null||r==="style"&&u.querySelector(jl(g))||r==="script"&&u.querySelector(Bl(g))||(r=u.createElement("link"),En(r,"link",n),Wt(r),u.head.appendChild(r)))}}function QN(n,r){xr.m(n,r);var i=vi;if(i&&n){var u=r&&typeof r.as=="string"?r.as:"script",p='link[rel="modulepreload"][as="'+Bn(u)+'"][href="'+Bn(n)+'"]',g=p;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":g=Ci(n)}if(!Ea.has(g)&&(n=x({rel:"modulepreload",href:n},r),Ea.set(g,n),i.querySelector(p)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(Bl(g)))return}u=i.createElement("link"),En(u,"link",n),Wt(u),i.head.appendChild(u)}}}function XN(n,r,i){xr.S(n,r,i);var u=vi;if(u&&n){var p=kr(u).hoistableStyles,g=Ai(n);r=r||"default";var _=p.get(g);if(!_){var w={loading:0,preload:null};if(_=u.querySelector(jl(g)))w.loading=5;else{n=x({rel:"stylesheet",href:n,"data-precedence":r},i),(i=Ea.get(g))&&Ff(n,i);var z=_=u.createElement("link");Wt(z),En(z,"link",n),z._p=new Promise(function(te,ue){z.onload=te,z.onerror=ue}),z.addEventListener("load",function(){w.loading|=1}),z.addEventListener("error",function(){w.loading|=2}),w.loading|=4,Mu(_,r,u)}_={type:"stylesheet",instance:_,count:1,state:w},p.set(g,_)}}}function ZN(n,r){xr.X(n,r);var i=vi;if(i&&n){var u=kr(i).hoistableScripts,p=Ci(n),g=u.get(p);g||(g=i.querySelector(Bl(p)),g||(n=x({src:n,async:!0},r),(r=Ea.get(p))&&zf(n,r),g=i.createElement("script"),Wt(g),En(g,"link",n),i.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},u.set(p,g))}}function WN(n,r){xr.M(n,r);var i=vi;if(i&&n){var u=kr(i).hoistableScripts,p=Ci(n),g=u.get(p);g||(g=i.querySelector(Bl(p)),g||(n=x({src:n,async:!0,type:"module"},r),(r=Ea.get(p))&&zf(n,r),g=i.createElement("script"),Wt(g),En(g,"link",n),i.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},u.set(p,g))}}function ob(n,r,i,u){var p=(p=Ae.current)?Iu(p):null;if(!p)throw Error(s(446));switch(n){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(r=Ai(i.href),i=kr(p).hoistableStyles,u=i.get(r),u||(u={type:"style",instance:null,count:0,state:null},i.set(r,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){n=Ai(i.href);var g=kr(p).hoistableStyles,_=g.get(n);if(_||(p=p.ownerDocument||p,_={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},g.set(n,_),(g=p.querySelector(jl(n)))&&!g._p&&(_.instance=g,_.state.loading=5),Ea.has(n)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},Ea.set(n,i),g||JN(p,n,i,_.state))),r&&u===null)throw Error(s(528,""));return _}if(r&&u!==null)throw Error(s(529,""));return null;case"script":return r=i.async,i=i.src,typeof i=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(r=Ci(i),i=kr(p).hoistableScripts,u=i.get(r),u||(u={type:"script",instance:null,count:0,state:null},i.set(r,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,n))}}function Ai(n){return'href="'+Bn(n)+'"'}function jl(n){return'link[rel="stylesheet"]['+n+"]"}function ub(n){return x({},n,{"data-precedence":n.precedence,precedence:null})}function JN(n,r,i,u){n.querySelector('link[rel="preload"][as="style"]['+r+"]")?u.loading=1:(r=n.createElement("link"),u.preload=r,r.addEventListener("load",function(){return u.loading|=1}),r.addEventListener("error",function(){return u.loading|=2}),En(r,"link",i),Wt(r),n.head.appendChild(r))}function Ci(n){return'[src="'+Bn(n)+'"]'}function Bl(n){return"script[async]"+n}function cb(n,r,i){if(r.count++,r.instance===null)switch(r.type){case"style":var u=n.querySelector('style[data-href~="'+Bn(i.href)+'"]');if(u)return r.instance=u,Wt(u),u;var p=x({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return u=(n.ownerDocument||n).createElement("style"),Wt(u),En(u,"style",p),Mu(u,i.precedence,n),r.instance=u;case"stylesheet":p=Ai(i.href);var g=n.querySelector(jl(p));if(g)return r.state.loading|=4,r.instance=g,Wt(g),g;u=ub(i),(p=Ea.get(p))&&Ff(u,p),g=(n.ownerDocument||n).createElement("link"),Wt(g);var _=g;return _._p=new Promise(function(w,z){_.onload=w,_.onerror=z}),En(g,"link",u),r.state.loading|=4,Mu(g,i.precedence,n),r.instance=g;case"script":return g=Ci(i.src),(p=n.querySelector(Bl(g)))?(r.instance=p,Wt(p),p):(u=i,(p=Ea.get(g))&&(u=x({},i),zf(u,p)),n=n.ownerDocument||n,p=n.createElement("script"),Wt(p),En(p,"link",u),n.head.appendChild(p),r.instance=p);case"void":return null;default:throw Error(s(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(u=r.instance,r.state.loading|=4,Mu(u,i.precedence,n));return r.instance}function Mu(n,r,i){for(var u=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=u.length?u[u.length-1]:null,g=p,_=0;_<u.length;_++){var w=u[_];if(w.dataset.precedence===r)g=w;else if(g!==p)break}g?g.parentNode.insertBefore(n,g.nextSibling):(r=i.nodeType===9?i.head:i,r.insertBefore(n,r.firstChild))}function Ff(n,r){n.crossOrigin==null&&(n.crossOrigin=r.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=r.referrerPolicy),n.title==null&&(n.title=r.title)}function zf(n,r){n.crossOrigin==null&&(n.crossOrigin=r.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=r.referrerPolicy),n.integrity==null&&(n.integrity=r.integrity)}var Du=null;function db(n,r,i){if(Du===null){var u=new Map,p=Du=new Map;p.set(i,u)}else p=Du,u=p.get(i),u||(u=new Map,p.set(i,u));if(u.has(n))return u;for(u.set(n,null),i=i.getElementsByTagName(n),p=0;p<i.length;p++){var g=i[p];if(!(g[ms]||g[Gt]||n==="link"&&g.getAttribute("rel")==="stylesheet")&&g.namespaceURI!=="http://www.w3.org/2000/svg"){var _=g.getAttribute(r)||"";_=n+_;var w=u.get(_);w?w.push(g):u.set(_,[g])}}return u}function fb(n,r,i){n=n.ownerDocument||n,n.head.insertBefore(i,r==="title"?n.querySelector("head > title"):null)}function e2(n,r,i){if(i===1||r.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof r.precedence!="string"||typeof r.href!="string"||r.href==="")break;return!0;case"link":if(typeof r.rel!="string"||typeof r.href!="string"||r.href===""||r.onLoad||r.onError)break;switch(r.rel){case"stylesheet":return n=r.disabled,typeof r.precedence=="string"&&n==null;default:return!0}case"script":if(r.async&&typeof r.async!="function"&&typeof r.async!="symbol"&&!r.onLoad&&!r.onError&&r.src&&typeof r.src=="string")return!0}return!1}function mb(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function t2(n,r,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 p=Ai(u.href),g=r.querySelector(jl(p));if(g){r=g._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(n.count++,n=Lu.bind(n),r.then(n,n)),i.state.loading|=4,i.instance=g,Wt(g);return}g=r.ownerDocument||r,u=ub(u),(p=Ea.get(p))&&Ff(u,p),g=g.createElement("link"),Wt(g);var _=g;_._p=new Promise(function(w,z){_.onload=w,_.onerror=z}),En(g,"link",u),i.instance=g}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(i,r),(r=i.state.preload)&&(i.state.loading&3)===0&&(n.count++,i=Lu.bind(n),r.addEventListener("load",i),r.addEventListener("error",i))}}var qf=0;function n2(n,r){return n.stylesheets&&n.count===0&&Bu(n,n.stylesheets),0<n.count||0<n.imgCount?function(i){var u=setTimeout(function(){if(n.stylesheets&&Bu(n,n.stylesheets),n.unsuspend){var g=n.unsuspend;n.unsuspend=null,g()}},6e4+r);0<n.imgBytes&&qf===0&&(qf=62500*jN());var p=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&Bu(n,n.stylesheets),n.unsuspend)){var g=n.unsuspend;n.unsuspend=null,g()}},(n.imgBytes>qf?50:800)+r);return n.unsuspend=i,function(){n.unsuspend=null,clearTimeout(u),clearTimeout(p)}}:null}function Lu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Bu(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var ju=null;function Bu(n,r){n.stylesheets=null,n.unsuspend!==null&&(n.count++,ju=new Map,r.forEach(a2,n),ju=null,Lu.call(n))}function a2(n,r){if(!(r.state.loading&4)){var i=ju.get(n);if(i)var u=i.get(null);else{i=new Map,ju.set(n,i);for(var p=n.querySelectorAll("link[data-precedence],style[data-precedence]"),g=0;g<p.length;g++){var _=p[g];(_.nodeName==="LINK"||_.getAttribute("media")!=="not all")&&(i.set(_.dataset.precedence,_),u=_)}u&&i.set(null,u)}p=r.instance,_=p.getAttribute("data-precedence"),g=i.get(_)||u,g===u&&i.set(null,p),i.set(_,p),this.count++,u=Lu.bind(this),p.addEventListener("load",u),p.addEventListener("error",u),g?g.parentNode.insertBefore(p,g.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(p,n.firstChild)),r.state.loading|=4}}var Pl={$$typeof:k,Provider:null,Consumer:null,_currentValue:pe,_currentValue2:pe,_threadCount:0};function r2(n,r,i,u,p,g,_,w,z){this.tag=1,this.containerInfo=n,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Mt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Mt(0),this.hiddenUpdates=Mt(null),this.identifierPrefix=u,this.onUncaughtError=p,this.onCaughtError=g,this.onRecoverableError=_,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=z,this.incompleteTransitions=new Map}function hb(n,r,i,u,p,g,_,w,z,te,ue,he){return n=new r2(n,r,i,_,z,te,ue,he,w),r=1,g===!0&&(r|=24),g=Wn(3,null,null,r),n.current=g,g.stateNode=n,r=Td(),r.refCount++,n.pooledCache=r,r.refCount++,g.memoizedState={element:u,isDehydrated:i,cache:r},vd(g),n}function pb(n){return n?(n=ri,n):ri}function gb(n,r,i,u,p,g){p=pb(p),u.context===null?u.context=p:u.pendingContext=p,u=Pr(r),u.payload={element:i},g=g===void 0?null:g,g!==null&&(u.callback=g),i=Ur(n,u,r),i!==null&&(qn(i,n,r),gl(i,n,r))}function bb(n,r){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var i=n.retryLane;n.retryLane=i!==0&&i<r?i:r}}function Yf(n,r){bb(n,r),(n=n.alternate)&&bb(n,r)}function xb(n){if(n.tag===13||n.tag===31){var r=Es(n,67108864);r!==null&&qn(r,n,67108864),Yf(n,67108864)}}function Eb(n){if(n.tag===13||n.tag===31){var r=aa();r=jt(r);var i=Es(n,r);i!==null&&qn(i,n,r),Yf(n,r)}}var Pu=!0;function s2(n,r,i,u){var p=V.T;V.T=null;var g=G.p;try{G.p=2,$f(n,r,i,u)}finally{G.p=g,V.T=p}}function i2(n,r,i,u){var p=V.T;V.T=null;var g=G.p;try{G.p=8,$f(n,r,i,u)}finally{G.p=g,V.T=p}}function $f(n,r,i,u){if(Pu){var p=Gf(u);if(p===null)Of(n,r,u,Uu,i),Tb(n,u);else if(o2(p,n,r,i,u))u.stopPropagation();else if(Tb(n,u),r&4&&-1<l2.indexOf(n)){for(;p!==null;){var g=er(p);if(g!==null)switch(g.tag){case 3:if(g=g.stateNode,g.current.memoizedState.isDehydrated){var _=Ln(g.pendingLanes);if(_!==0){var w=g;for(w.pendingLanes|=2,w.entangledLanes|=2;_;){var z=1<<31-gt(_);w.entanglements[1]|=z,_&=~z}za(g),(pt&6)===0&&(Tu=_t()+500,Il(0))}}break;case 31:case 13:w=Es(g,2),w!==null&&qn(w,g,2),Nu(),Yf(g,2)}if(g=Gf(u),g===null&&Of(n,r,u,Uu,i),g===p)break;p=g}p!==null&&u.stopPropagation()}else Of(n,r,u,null,i)}}function Gf(n){return n=Qe(n),Kf(n)}var Uu=null;function Kf(n){if(Uu=null,n=kn(n),n!==null){var r=o(n);if(r===null)n=null;else{var i=r.tag;if(i===13){if(n=d(r),n!==null)return n;n=null}else if(i===31){if(n=f(r),n!==null)return n;n=null}else if(i===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;n=null}else r!==n&&(n=null)}}return Uu=n,null}function yb(n){switch(n){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Wa()){case oe:return 2;case Te:return 8;case Be:case P:return 32;case Se:return 268435456;default:return 32}default:return 32}}var Vf=!1,Xr=null,Zr=null,Wr=null,Ul=new Map,Hl=new Map,Jr=[],l2="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 Tb(n,r){switch(n){case"focusin":case"focusout":Xr=null;break;case"dragenter":case"dragleave":Zr=null;break;case"mouseover":case"mouseout":Wr=null;break;case"pointerover":case"pointerout":Ul.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":Hl.delete(r.pointerId)}}function Fl(n,r,i,u,p,g){return n===null||n.nativeEvent!==g?(n={blockedOn:r,domEventName:i,eventSystemFlags:u,nativeEvent:g,targetContainers:[p]},r!==null&&(r=er(r),r!==null&&xb(r)),n):(n.eventSystemFlags|=u,r=n.targetContainers,p!==null&&r.indexOf(p)===-1&&r.push(p),n)}function o2(n,r,i,u,p){switch(r){case"focusin":return Xr=Fl(Xr,n,r,i,u,p),!0;case"dragenter":return Zr=Fl(Zr,n,r,i,u,p),!0;case"mouseover":return Wr=Fl(Wr,n,r,i,u,p),!0;case"pointerover":var g=p.pointerId;return Ul.set(g,Fl(Ul.get(g)||null,n,r,i,u,p)),!0;case"gotpointercapture":return g=p.pointerId,Hl.set(g,Fl(Hl.get(g)||null,n,r,i,u,p)),!0}return!1}function _b(n){var r=kn(n.target);if(r!==null){var i=o(r);if(i!==null){if(r=i.tag,r===13){if(r=d(i),r!==null){n.blockedOn=r,Vs(n.priority,function(){Eb(i)});return}}else if(r===31){if(r=f(i),r!==null){n.blockedOn=r,Vs(n.priority,function(){Eb(i)});return}}else if(r===3&&i.stateNode.current.memoizedState.isDehydrated){n.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}n.blockedOn=null}function Hu(n){if(n.blockedOn!==null)return!1;for(var r=n.targetContainers;0<r.length;){var i=Gf(n.nativeEvent);if(i===null){i=n.nativeEvent;var u=new i.constructor(i.type,i);Me=u,i.target.dispatchEvent(u),Me=null}else return r=er(i),r!==null&&xb(r),n.blockedOn=i,!1;r.shift()}return!0}function Nb(n,r,i){Hu(n)&&i.delete(r)}function u2(){Vf=!1,Xr!==null&&Hu(Xr)&&(Xr=null),Zr!==null&&Hu(Zr)&&(Zr=null),Wr!==null&&Hu(Wr)&&(Wr=null),Ul.forEach(Nb),Hl.forEach(Nb)}function Fu(n,r){n.blockedOn===r&&(n.blockedOn=null,Vf||(Vf=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,u2)))}var zu=null;function Sb(n){zu!==n&&(zu=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){zu===n&&(zu=null);for(var r=0;r<n.length;r+=3){var i=n[r],u=n[r+1],p=n[r+2];if(typeof u!="function"){if(Kf(u||i)===null)continue;break}var g=er(i);g!==null&&(n.splice(r,3),r-=3,$d(g,{pending:!0,data:p,method:i.method,action:u},u,p))}}))}function wi(n){function r(z){return Fu(z,n)}Xr!==null&&Fu(Xr,n),Zr!==null&&Fu(Zr,n),Wr!==null&&Fu(Wr,n),Ul.forEach(r),Hl.forEach(r);for(var i=0;i<Jr.length;i++){var u=Jr[i];u.blockedOn===n&&(u.blockedOn=null)}for(;0<Jr.length&&(i=Jr[0],i.blockedOn===null);)_b(i),i.blockedOn===null&&Jr.shift();if(i=(n.ownerDocument||n).$$reactFormReplay,i!=null)for(u=0;u<i.length;u+=3){var p=i[u],g=i[u+1],_=p[Tn]||null;if(typeof g=="function")_||Sb(i);else if(_){var w=null;if(g&&g.hasAttribute("formAction")){if(p=g,_=g[Tn]||null)w=_.formAction;else if(Kf(p)!==null)continue}else w=_.action;typeof w=="function"?i[u+1]=w:(i.splice(u,3),u-=3),Sb(i)}}}function vb(){function n(g){g.canIntercept&&g.info==="react-transition"&&g.intercept({handler:function(){return new Promise(function(_){return p=_})},focusReset:"manual",scroll:"manual"})}function r(){p!==null&&(p(),p=null),u||setTimeout(i,20)}function i(){if(!u&&!navigation.transition){var g=navigation.currentEntry;g&&g.url!=null&&navigation.navigate(g.url,{state:g.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var u=!1,p=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",r),navigation.addEventListener("navigateerror",r),setTimeout(i,100),function(){u=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",r),navigation.removeEventListener("navigateerror",r),p!==null&&(p(),p=null)}}}function Qf(n){this._internalRoot=n}qu.prototype.render=Qf.prototype.render=function(n){var r=this._internalRoot;if(r===null)throw Error(s(409));var i=r.current,u=aa();gb(i,u,n,r,null,null)},qu.prototype.unmount=Qf.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var r=n.containerInfo;gb(n.current,2,null,n,null,null),Nu(),r[Cr]=null}};function qu(n){this._internalRoot=n}qu.prototype.unstable_scheduleHydration=function(n){if(n){var r=Ks();n={blockedOn:null,target:n,priority:r};for(var i=0;i<Jr.length&&r!==0&&r<Jr[i].priority;i++);Jr.splice(i,0,n),i===0&&_b(n)}};var Ab=t.version;if(Ab!=="19.2.8")throw Error(s(527,Ab,"19.2.8"));G.findDOMNode=function(n){var r=n._reactInternals;if(r===void 0)throw typeof n.render=="function"?Error(s(188)):(n=Object.keys(n).join(","),Error(s(268,n)));return n=m(r),n=n!==null?b(n):null,n=n===null?null:n.stateNode,n};var c2={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:V,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Yu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Yu.isDisabled&&Yu.supportsFiber)try{Zt=Yu.inject(c2),Ot=Yu}catch{}}return ql.createRoot=function(n,r){if(!l(n))throw Error(s(299));var i=!1,u="",p=Mp,g=Dp,_=Lp;return r!=null&&(r.unstable_strictMode===!0&&(i=!0),r.identifierPrefix!==void 0&&(u=r.identifierPrefix),r.onUncaughtError!==void 0&&(p=r.onUncaughtError),r.onCaughtError!==void 0&&(g=r.onCaughtError),r.onRecoverableError!==void 0&&(_=r.onRecoverableError)),r=hb(n,1,!1,null,null,i,u,null,p,g,_,vb),n[Cr]=r.current,Rf(n),new Qf(r)},ql.hydrateRoot=function(n,r,i){if(!l(n))throw Error(s(299));var u=!1,p="",g=Mp,_=Dp,w=Lp,z=null;return i!=null&&(i.unstable_strictMode===!0&&(u=!0),i.identifierPrefix!==void 0&&(p=i.identifierPrefix),i.onUncaughtError!==void 0&&(g=i.onUncaughtError),i.onCaughtError!==void 0&&(_=i.onCaughtError),i.onRecoverableError!==void 0&&(w=i.onRecoverableError),i.formState!==void 0&&(z=i.formState)),r=hb(n,1,!0,r,i??null,u,p,z,g,_,w,vb),r.context=pb(null),i=r.current,u=aa(),u=jt(u),p=Pr(u),p.callback=null,Ur(i,p,u),i=u,r.current.lanes=i,Ct(r,i),za(r),n[Cr]=r.current,Rf(n),new qu(r)},ql.version="19.2.8",ql}var jb;function _2(){if(jb)return Wf.exports;jb=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Wf.exports=T2(),Wf.exports}var N2=_2();/**
|
|
50
|
+
* react-router v7.18.1
|
|
51
|
+
*
|
|
52
|
+
* Copyright (c) Remix Software Inc.
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the MIT license found in the
|
|
55
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
56
|
+
*
|
|
57
|
+
* @license MIT
|
|
58
|
+
*/var oh=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,eE=/^[\\/]{2}/;function S2(e,t){return t+e.replace(/\\/g,"/")}var Bb="popstate";function Pb(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function v2(e={}){function t(s,l){var m;let o=(m=l.state)==null?void 0:m.masked,{pathname:d,search:f,hash:h}=o||s.location;return Dm("",{pathname:d,search:f,hash:h},l.state&&l.state.usr||null,l.state&&l.state.key||"default",o?{pathname:s.location.pathname,search:s.location.search,hash:s.location.hash}:void 0)}function a(s,l){return typeof l=="string"?l:uo(l)}return C2(t,a,null,e)}function Ut(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function _a(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function A2(){return Math.random().toString(36).substring(2,10)}function Ub(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function Dm(e,t,a=null,s,l){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Fi(t):t,state:a,key:t&&t.key||s||A2(),mask:l}}function uo({pathname:e="/",search:t="",hash:a=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),a&&a!=="#"&&(e+=a.charAt(0)==="#"?a:"#"+a),e}function Fi(e){let t={};if(e){let a=e.indexOf("#");a>=0&&(t.hash=e.substring(a),e=e.substring(0,a));let s=e.indexOf("?");s>=0&&(t.search=e.substring(s),e=e.substring(0,s)),e&&(t.pathname=e)}return t}function C2(e,t,a,s={}){let{window:l=document.defaultView,v5Compat:o=!1}=s,d=l.history,f="POP",h=null,m=b();m==null&&(m=0,d.replaceState({...d.state,idx:m},""));function b(){return(d.state||{idx:null}).idx}function x(){f="POP";let C=b(),v=C==null?null:C-m;m=C,h&&h({action:f,location:S.location,delta:v})}function y(C,v){f="PUSH";let M=Pb(C)?C:Dm(S.location,C,v);m=b()+1;let k=Ub(M,m),D=S.createHref(M.mask||M);try{d.pushState(k,"",D)}catch($){if($ instanceof DOMException&&$.name==="DataCloneError")throw $;l.location.assign(D)}o&&h&&h({action:f,location:S.location,delta:1})}function T(C,v){f="REPLACE";let M=Pb(C)?C:Dm(S.location,C,v);m=b();let k=Ub(M,m),D=S.createHref(M.mask||M);d.replaceState(k,"",D),o&&h&&h({action:f,location:S.location,delta:0})}function N(C){return w2(l,C)}let S={get action(){return f},get location(){return e(l,d)},listen(C){if(h)throw new Error("A history only accepts one active listener");return l.addEventListener(Bb,x),h=C,()=>{l.removeEventListener(Bb,x),h=null}},createHref(C){return t(l,C)},createURL:N,encodeLocation(C){let v=N(C);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:y,replace:T,go(C){return d.go(C)}};return S}function w2(e,t,a=!1){let s="http://localhost";e&&(s=e.location.origin!=="null"?e.location.origin:e.location.href),Ut(s,"No window.location.(origin|href) available to create URL");let l=typeof t=="string"?t:uo(t);return l=l.replace(/ $/,"%20"),!a&&eE.test(l)&&(l=s+l),new URL(l,s)}function tE(e,t,a="/"){return k2(e,t,a,!1)}function k2(e,t,a,s,l){let o=typeof t=="string"?Fi(t):t,d=Nr(o.pathname||"/",a);if(d==null)return null;let f=R2(e),h=null,m=F2(d);for(let b=0;h==null&&b<f.length;++b)h=H2(f[b],m,s);return h}function R2(e){let t=nE(e);return O2(t),t}function nE(e,t=[],a=[],s="",l=!1){let o=(d,f,h=l,m)=>{let b={relativePath:m===void 0?d.path||"":m,caseSensitive:d.caseSensitive===!0,childrenIndex:f,route:d};if(b.relativePath.startsWith("/")){if(!b.relativePath.startsWith(s)&&h)return;Ut(b.relativePath.startsWith(s),`Absolute route path "${b.relativePath}" nested under path "${s}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),b.relativePath=b.relativePath.slice(s.length)}let x=Ra([s,b.relativePath]),y=a.concat(b);d.children&&d.children.length>0&&(Ut(d.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${x}".`),nE(d.children,t,y,x,h)),!(d.path==null&&!d.index)&&t.push({path:x,score:P2(x,d.index),routesMeta:y.map((T,N)=>{let[S,C]=sE(T.relativePath,T.caseSensitive,N===y.length-1);return{...T,matcher:S,compiledParams:C}})})};return e.forEach((d,f)=>{var h;if(d.path===""||!((h=d.path)!=null&&h.includes("?")))o(d,f);else for(let m of aE(d.path))o(d,f,!0,m)}),t}function aE(e){let t=e.split("/");if(t.length===0)return[];let[a,...s]=t,l=a.endsWith("?"),o=a.replace(/\?$/,"");if(s.length===0)return l?[o,""]:[o];let d=aE(s.join("/")),f=[];return f.push(...d.map(h=>h===""?o:[o,h].join("/"))),l&&f.push(...d),f.map(h=>e.startsWith("/")&&h===""?"/":h)}function O2(e){e.sort((t,a)=>t.score!==a.score?a.score-t.score:U2(t.routesMeta.map(s=>s.childrenIndex),a.routesMeta.map(s=>s.childrenIndex)))}var I2=/^:[\w-]+$/,M2=3,D2=2,L2=1,j2=10,B2=-2,Hb=e=>e==="*";function P2(e,t){let a=e.split("/"),s=a.length;return a.some(Hb)&&(s+=B2),t&&(s+=D2),a.filter(l=>!Hb(l)).reduce((l,o)=>l+(I2.test(o)?M2:o===""?L2:j2),s)}function U2(e,t){return e.length===t.length&&e.slice(0,-1).every((s,l)=>s===t[l])?e[e.length-1]-t[t.length-1]:0}function H2(e,t,a=!1){let{routesMeta:s}=e,l={},o="/",d=[];for(let f=0;f<s.length;++f){let h=s[f],m=f===s.length-1,b=o==="/"?t:t.slice(o.length)||"/",x={path:h.relativePath,caseSensitive:h.caseSensitive,end:m},y=h.matcher&&h.compiledParams?rE(x,b,h.matcher,h.compiledParams):uc(x,b),T=h.route;if(!y&&m&&a&&!s[s.length-1].route.index&&(y=uc({path:h.relativePath,caseSensitive:h.caseSensitive,end:!1},b)),!y)return null;Object.assign(l,y.params),d.push({params:l,pathname:Ra([o,y.pathname]),pathnameBase:Y2(Ra([o,y.pathnameBase])),route:T}),y.pathnameBase!=="/"&&(o=Ra([o,y.pathnameBase]))}return d}function uc(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[a,s]=sE(e.path,e.caseSensitive,e.end);return rE(e,t,a,s)}function rE(e,t,a,s){let l=t.match(a);if(!l)return null;let o=l[0],d=o.replace(/(.)\/+$/,"$1"),f=l.slice(1);return{params:s.reduce((m,{paramName:b,isOptional:x},y)=>{if(b==="*"){let N=f[y]||"";d=o.slice(0,o.length-N.length).replace(/(.)\/+$/,"$1")}const T=f[y];return x&&!T?m[b]=void 0:m[b]=(T||"").replace(/%2F/g,"/"),m},{}),pathname:o,pathnameBase:d,pattern:e}}function sE(e,t=!1,a=!0){_a(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let s=[],l="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,f,h,m,b)=>{if(s.push({paramName:f,isOptional:h!=null}),h){let x=b.charAt(m+d.length);return x&&x!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(s.push({paramName:"*"}),l+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?l+="\\/*$":e!==""&&e!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,t?void 0:"i"),s]}function F2(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return _a(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Nr(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let a=t.endsWith("/")?t.length-1:t.length,s=e.charAt(a);return s&&s!=="/"?null:e.slice(a)||"/"}function z2(e,t="/"){let{pathname:a,search:s="",hash:l=""}=typeof e=="string"?Fi(e):e,o;return a?(a=iE(a),a.startsWith("/")?o=Fb(a.substring(1),"/"):o=Fb(a,t)):o=t,{pathname:o,search:$2(s),hash:G2(l)}}function Fb(e,t){let a=cc(t).split("/");return e.split("/").forEach(l=>{l===".."?a.length>1&&a.pop():l!=="."&&a.push(l)}),a.length>1?a.join("/"):"/"}function nm(e,t,a,s){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(s)}]. Please separate it out to the \`to.${a}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function q2(e){return e.filter((t,a)=>a===0||t.route.path&&t.route.path.length>0)}function uh(e){let t=q2(e);return t.map((a,s)=>s===t.length-1?a.pathname:a.pathnameBase)}function wc(e,t,a,s=!1){let l;typeof e=="string"?l=Fi(e):(l={...e},Ut(!l.pathname||!l.pathname.includes("?"),nm("?","pathname","search",l)),Ut(!l.pathname||!l.pathname.includes("#"),nm("#","pathname","hash",l)),Ut(!l.search||!l.search.includes("#"),nm("#","search","hash",l)));let o=e===""||l.pathname==="",d=o?"/":l.pathname,f;if(d==null)f=a;else{let x=t.length-1;if(!s&&d.startsWith("..")){let y=d.split("/");for(;y[0]==="..";)y.shift(),x-=1;l.pathname=y.join("/")}f=x>=0?t[x]:"/"}let h=z2(l,f),m=d&&d!=="/"&&d.endsWith("/"),b=(o||d===".")&&a.endsWith("/");return!h.pathname.endsWith("/")&&(m||b)&&(h.pathname+="/"),h}var iE=e=>e.replace(/[\\/]{2,}/g,"/"),Ra=e=>iE(e.join("/")),cc=e=>e.replace(/\/+$/,""),Y2=e=>cc(e).replace(/^\/*/,"/"),$2=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,G2=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,K2=class{constructor(e,t,a,s=!1){this.status=e,this.statusText=t||"",this.internal=s,a instanceof Error?(this.data=a.toString(),this.error=a):this.data=a}};function V2(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function Q2(e){let t=e.map(a=>a.route.path).filter(Boolean);return Ra(t)||"/"}var lE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function oE(e,t){let a=e;if(typeof a!="string"||!oh.test(a))return{absoluteURL:void 0,isExternal:!1,to:a};let s=a,l=!1;if(lE)try{let o=new URL(window.location.href),d=eE.test(a)?new URL(S2(a,o.protocol)):new URL(a),f=Nr(d.pathname,t);d.origin===o.origin&&f!=null?a=f+d.search+d.hash:l=!0}catch{_a(!1,`<Link to="${a}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:s,isExternal:l,to:a}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var uE=["POST","PUT","PATCH","DELETE"];new Set(uE);var X2=["GET",...uE];new Set(X2);var Z2=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function W2(e){try{return Z2.includes(new URL(e).protocol)}catch{return!1}}var zi=A.createContext(null);zi.displayName="DataRouter";var kc=A.createContext(null);kc.displayName="DataRouterState";var cE=A.createContext(!1);function J2(){return A.useContext(cE)}var dE=A.createContext({isTransitioning:!1});dE.displayName="ViewTransition";var eS=A.createContext(new Map);eS.displayName="Fetchers";var tS=A.createContext(null);tS.displayName="Await";var la=A.createContext(null);la.displayName="Navigation";var Eo=A.createContext(null);Eo.displayName="Location";var Ma=A.createContext({outlet:null,matches:[],isDataRoute:!1});Ma.displayName="Route";var ch=A.createContext(null);ch.displayName="RouteError";var fE="REACT_ROUTER_ERROR",nS="REDIRECT",aS="ROUTE_ERROR_RESPONSE";function rS(e){if(e.startsWith(`${fE}:${nS}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function sS(e){if(e.startsWith(`${fE}:${aS}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new K2(t.status,t.statusText,t.data)}catch{}}function iS(e,{relative:t}={}){Ut(qi(),"useHref() may be used only in the context of a <Router> component.");let{basename:a,navigator:s}=A.useContext(la),{hash:l,pathname:o,search:d}=yo(e,{relative:t}),f=o;return a!=="/"&&(f=o==="/"?a:Ra([a,o])),s.createHref({pathname:f,search:d,hash:l})}function qi(){return A.useContext(Eo)!=null}function oa(){return Ut(qi(),"useLocation() may be used only in the context of a <Router> component."),A.useContext(Eo).location}var mE="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function hE(e){A.useContext(la).static||A.useLayoutEffect(e)}function Na(){let{isDataRoute:e}=A.useContext(Ma);return e?TS():lS()}function lS(){Ut(qi(),"useNavigate() may be used only in the context of a <Router> component.");let e=A.useContext(zi),{basename:t,navigator:a}=A.useContext(la),{matches:s}=A.useContext(Ma),{pathname:l}=oa(),o=JSON.stringify(uh(s)),d=A.useRef(!1);return hE(()=>{d.current=!0}),A.useCallback((h,m={})=>{if(_a(d.current,mE),!d.current)return;if(typeof h=="number"){a.go(h);return}let b=wc(h,JSON.parse(o),l,m.relative==="path");e==null&&t!=="/"&&(b.pathname=b.pathname==="/"?t:Ra([t,b.pathname])),(m.replace?a.replace:a.push)(b,m.state,m)},[t,a,o,l,e])}var oS=A.createContext(null);function uS(e){let t=A.useContext(Ma).outlet;return A.useMemo(()=>t&&A.createElement(oS.Provider,{value:e},t),[t,e])}function yo(e,{relative:t}={}){let{matches:a}=A.useContext(Ma),{pathname:s}=oa(),l=JSON.stringify(uh(a));return A.useMemo(()=>wc(e,JSON.parse(l),s,t==="path"),[e,l,s,t])}function cS(e,t){return pE(e,t)}function pE(e,t,a){var C;Ut(qi(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=A.useContext(la),{matches:l}=A.useContext(Ma),o=l[l.length-1],d=o?o.params:{},f=o?o.pathname:"/",h=o?o.pathnameBase:"/",m=o&&o.route;{let v=m&&m.path||"";bE(f,!m||v.endsWith("*")||v.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${f}" (under <Route path="${v}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
59
|
+
|
|
60
|
+
Please change the parent <Route path="${v}"> to <Route path="${v==="/"?"*":`${v}/*`}">.`)}let b=oa(),x;if(t){let v=typeof t=="string"?Fi(t):t;Ut(h==="/"||((C=v.pathname)==null?void 0:C.startsWith(h)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${h}" but pathname "${v.pathname}" was given in the \`location\` prop.`),x=v}else x=b;let y=x.pathname||"/",T=y;if(h!=="/"){let v=h.replace(/^\//,"").split("/");T="/"+y.replace(/^\//,"").split("/").slice(v.length).join("/")}let N=a&&a.state.matches.length?a.state.matches.map(v=>Object.assign(v,{route:a.manifest[v.route.id]||v.route})):tE(e,{pathname:T});_a(m||N!=null,`No routes matched location "${x.pathname}${x.search}${x.hash}" `),_a(N==null||N[N.length-1].route.element!==void 0||N[N.length-1].route.Component!==void 0||N[N.length-1].route.lazy!==void 0,`Matched leaf route at location "${x.pathname}${x.search}${x.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let S=pS(N&&N.map(v=>Object.assign({},v,{params:Object.assign({},d,v.params),pathname:Ra([h,s.encodeLocation?s.encodeLocation(v.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?h:Ra([h,s.encodeLocation?s.encodeLocation(v.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:v.pathnameBase])})),l,a);return t&&S?A.createElement(Eo.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...x},navigationType:"POP"}},S):S}function dS(){let e=yS(),t=V2(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),a=e instanceof Error?e.stack:null,s="rgba(200,200,200, 0.5)",l={padding:"0.5rem",backgroundColor:s},o={padding:"2px 4px",backgroundColor:s},d=null;return console.error("Error handled by React Router default ErrorBoundary:",e),d=A.createElement(A.Fragment,null,A.createElement("p",null,"💿 Hey developer 👋"),A.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",A.createElement("code",{style:o},"ErrorBoundary")," or"," ",A.createElement("code",{style:o},"errorElement")," prop on your route.")),A.createElement(A.Fragment,null,A.createElement("h2",null,"Unexpected Application Error!"),A.createElement("h3",{style:{fontStyle:"italic"}},t),a?A.createElement("pre",{style:l},a):null,d)}var fS=A.createElement(dS,null),gE=class extends A.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const a=sS(e.digest);a&&(e=a)}let t=e!==void 0?A.createElement(Ma.Provider,{value:this.props.routeContext},A.createElement(ch.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?A.createElement(mS,{error:e},t):t}};gE.contextType=cE;var am=new WeakMap;function mS({children:e,error:t}){let{basename:a}=A.useContext(la);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let s=rS(t.digest);if(s){let l=am.get(t);if(l)throw l;let o=oE(s.location,a),d=o.absoluteURL||o.to;if(W2(d))throw new Error("Invalid redirect location");if(lE&&!am.get(t))if(o.isExternal||s.reloadDocument)window.location.href=d;else{const f=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:s.replace}));throw am.set(t,f),f}return A.createElement("meta",{httpEquiv:"refresh",content:`0;url=${d}`})}}return e}function hS({routeContext:e,match:t,children:a}){let s=A.useContext(zi);return s&&s.static&&s.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=t.route.id),A.createElement(Ma.Provider,{value:e},a)}function pS(e,t=[],a){let s=a==null?void 0:a.state;if(e==null){if(!s)return null;if(s.errors)e=s.matches;else if(t.length===0&&!s.initialized&&s.matches.length>0)e=s.matches;else return null}let l=e,o=s==null?void 0:s.errors;if(o!=null){let b=l.findIndex(x=>x.route.id&&(o==null?void 0:o[x.route.id])!==void 0);Ut(b>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),l=l.slice(0,Math.min(l.length,b+1))}let d=!1,f=-1;if(a&&s){d=s.renderFallback;for(let b=0;b<l.length;b++){let x=l[b];if((x.route.HydrateFallback||x.route.hydrateFallbackElement)&&(f=b),x.route.id){let{loaderData:y,errors:T}=s,N=x.route.loader&&!y.hasOwnProperty(x.route.id)&&(!T||T[x.route.id]===void 0);if(x.route.lazy||N){a.isStatic&&(d=!0),f>=0?l=l.slice(0,f+1):l=[l[0]];break}}}}let h=a==null?void 0:a.onError,m=s&&h?(b,x)=>{var y,T;h(b,{location:s.location,params:((T=(y=s.matches)==null?void 0:y[0])==null?void 0:T.params)??{},pattern:Q2(s.matches),errorInfo:x})}:void 0;return l.reduceRight((b,x,y)=>{let T,N=!1,S=null,C=null;s&&(T=o&&x.route.id?o[x.route.id]:void 0,S=x.route.errorElement||fS,d&&(f<0&&y===0?(bE("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),N=!0,C=null):f===y&&(N=!0,C=x.route.hydrateFallbackElement||null)));let v=t.concat(l.slice(0,y+1)),M=()=>{let k;return T?k=S:N?k=C:x.route.Component?k=A.createElement(x.route.Component,null):x.route.element?k=x.route.element:k=b,A.createElement(hS,{match:x,routeContext:{outlet:b,matches:v,isDataRoute:s!=null},children:k})};return s&&(x.route.ErrorBoundary||x.route.errorElement||y===0)?A.createElement(gE,{location:s.location,revalidation:s.revalidation,component:S,error:T,children:M(),routeContext:{outlet:null,matches:v,isDataRoute:!0},onError:m}):M()},null)}function dh(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function gS(e){let t=A.useContext(zi);return Ut(t,dh(e)),t}function bS(e){let t=A.useContext(kc);return Ut(t,dh(e)),t}function xS(e){let t=A.useContext(Ma);return Ut(t,dh(e)),t}function fh(e){let t=xS(e),a=t.matches[t.matches.length-1];return Ut(a.route.id,`${e} can only be used on routes that contain a unique "id"`),a.route.id}function ES(){return fh("useRouteId")}function yS(){var s;let e=A.useContext(ch),t=bS("useRouteError"),a=fh("useRouteError");return e!==void 0?e:(s=t.errors)==null?void 0:s[a]}function TS(){let{router:e}=gS("useNavigate"),t=fh("useNavigate"),a=A.useRef(!1);return hE(()=>{a.current=!0}),A.useCallback(async(l,o={})=>{_a(a.current,mE),a.current&&(typeof l=="number"?await e.navigate(l):await e.navigate(l,{fromRouteId:t,...o}))},[e,t])}var zb={};function bE(e,t,a){!t&&!zb[e]&&(zb[e]=!0,_a(!1,a))}A.memo(_S);function _S({routes:e,manifest:t,future:a,state:s,isStatic:l,onError:o}){return pE(e,void 0,{manifest:t,state:s,isStatic:l,onError:o})}function Lm({to:e,replace:t,state:a,relative:s}){Ut(qi(),"<Navigate> may be used only in the context of a <Router> component.");let{static:l}=A.useContext(la);_a(!l,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:o}=A.useContext(Ma),{pathname:d}=oa(),f=Na(),h=wc(e,uh(o),d,s==="path"),m=JSON.stringify(h);return A.useEffect(()=>{f(JSON.parse(m),{replace:t,state:a,relative:s})},[f,m,s,t,a]),null}function NS(e){return uS(e.context)}function yr(e){Ut(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function SS({basename:e="/",children:t=null,location:a,navigationType:s="POP",navigator:l,static:o=!1,useTransitions:d}){Ut(!qi(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let f=e.replace(/^\/*/,"/"),h=A.useMemo(()=>({basename:f,navigator:l,static:o,useTransitions:d,future:{}}),[f,l,o,d]);typeof a=="string"&&(a=Fi(a));let{pathname:m="/",search:b="",hash:x="",state:y=null,key:T="default",mask:N}=a,S=A.useMemo(()=>{let C=Nr(m,f);return C==null?null:{location:{pathname:C,search:b,hash:x,state:y,key:T,mask:N},navigationType:s}},[f,m,b,x,y,T,s,N]);return _a(S!=null,`<Router basename="${f}"> is not able to match the URL "${m}${b}${x}" because it does not start with the basename, so the <Router> won't render anything.`),S==null?null:A.createElement(la.Provider,{value:h},A.createElement(Eo.Provider,{children:t,value:S}))}function vS({children:e,location:t}){return cS(jm(e),t)}function jm(e,t=[]){let a=[];return A.Children.forEach(e,(s,l)=>{if(!A.isValidElement(s))return;let o=[...t,l];if(s.type===A.Fragment){a.push.apply(a,jm(s.props.children,o));return}Ut(s.type===yr,`[${typeof s.type=="string"?s.type:s.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Ut(!s.props.index||!s.props.children,"An index route cannot have child routes.");let d={id:s.props.id||o.join("-"),caseSensitive:s.props.caseSensitive,element:s.props.element,Component:s.props.Component,index:s.props.index,path:s.props.path,middleware:s.props.middleware,loader:s.props.loader,action:s.props.action,hydrateFallbackElement:s.props.hydrateFallbackElement,HydrateFallback:s.props.HydrateFallback,errorElement:s.props.errorElement,ErrorBoundary:s.props.ErrorBoundary,hasErrorBoundary:s.props.hasErrorBoundary===!0||s.props.ErrorBoundary!=null||s.props.errorElement!=null,shouldRevalidate:s.props.shouldRevalidate,handle:s.props.handle,lazy:s.props.lazy};s.props.children&&(d.children=jm(s.props.children,o)),a.push(d)}),a}var ac="get",rc="application/x-www-form-urlencoded";function Rc(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function AS(e){return Rc(e)&&e.tagName.toLowerCase()==="button"}function CS(e){return Rc(e)&&e.tagName.toLowerCase()==="form"}function wS(e){return Rc(e)&&e.tagName.toLowerCase()==="input"}function kS(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function RS(e,t){return e.button===0&&(!t||t==="_self")&&!kS(e)}function Bm(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,a)=>{let s=e[a];return t.concat(Array.isArray(s)?s.map(l=>[a,l]):[[a,s]])},[]))}function OS(e,t){let a=Bm(e);return t&&t.forEach((s,l)=>{a.has(l)||t.getAll(l).forEach(o=>{a.append(l,o)})}),a}var Gu=null;function IS(){if(Gu===null)try{new FormData(document.createElement("form"),0),Gu=!1}catch{Gu=!0}return Gu}var MS=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function rm(e){return e!=null&&!MS.has(e)?(_a(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${rc}"`),null):e}function DS(e,t){let a,s,l,o,d;if(CS(e)){let f=e.getAttribute("action");s=f?Nr(f,t):null,a=e.getAttribute("method")||ac,l=rm(e.getAttribute("enctype"))||rc,o=new FormData(e)}else if(AS(e)||wS(e)&&(e.type==="submit"||e.type==="image")){let f=e.form;if(f==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let h=e.getAttribute("formaction")||f.getAttribute("action");if(s=h?Nr(h,t):null,a=e.getAttribute("formmethod")||f.getAttribute("method")||ac,l=rm(e.getAttribute("formenctype"))||rm(f.getAttribute("enctype"))||rc,o=new FormData(f,e),!IS()){let{name:m,type:b,value:x}=e;if(b==="image"){let y=m?`${m}.`:"";o.append(`${y}x`,"0"),o.append(`${y}y`,"0")}else m&&o.append(m,x)}}else{if(Rc(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');a=ac,s=null,l=rc,d=e}return o&&l==="text/plain"&&(d=o,o=void 0),{action:s,method:a.toLowerCase(),encType:l,formData:o,body:d}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function mh(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function xE(e,t,a,s){let l=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return a?l.pathname.endsWith("/")?l.pathname=`${l.pathname}_.${s}`:l.pathname=`${l.pathname}.${s}`:l.pathname==="/"?l.pathname=`_root.${s}`:t&&Nr(l.pathname,t)==="/"?l.pathname=`${cc(t)}/_root.${s}`:l.pathname=`${cc(l.pathname)}.${s}`,l}async function LS(e,t){if(e.id in t)return t[e.id];try{let a=await import(e.module);return t[e.id]=a,a}catch(a){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(a),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function jS(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function BS(e,t,a){let s=await Promise.all(e.map(async l=>{let o=t.routes[l.route.id];if(o){let d=await LS(o,a);return d.links?d.links():[]}return[]}));return FS(s.flat(1).filter(jS).filter(l=>l.rel==="stylesheet"||l.rel==="preload").map(l=>l.rel==="stylesheet"?{...l,rel:"prefetch",as:"style"}:{...l,rel:"prefetch"}))}function qb(e,t,a,s,l,o){let d=(h,m)=>a[m]?h.route.id!==a[m].route.id:!0,f=(h,m)=>{var b;return a[m].pathname!==h.pathname||((b=a[m].route.path)==null?void 0:b.endsWith("*"))&&a[m].params["*"]!==h.params["*"]};return o==="assets"?t.filter((h,m)=>d(h,m)||f(h,m)):o==="data"?t.filter((h,m)=>{var x;let b=s.routes[h.route.id];if(!b||!b.hasLoader)return!1;if(d(h,m)||f(h,m))return!0;if(h.route.shouldRevalidate){let y=h.route.shouldRevalidate({currentUrl:new URL(l.pathname+l.search+l.hash,window.origin),currentParams:((x=a[0])==null?void 0:x.params)||{},nextUrl:new URL(e,window.origin),nextParams:h.params,defaultShouldRevalidate:!0});if(typeof y=="boolean")return y}return!0}):[]}function PS(e,t,{includeHydrateFallback:a}={}){return US(e.map(s=>{let l=t.routes[s.route.id];if(!l)return[];let o=[l.module];return l.clientActionModule&&(o=o.concat(l.clientActionModule)),l.clientLoaderModule&&(o=o.concat(l.clientLoaderModule)),a&&l.hydrateFallbackModule&&(o=o.concat(l.hydrateFallbackModule)),l.imports&&(o=o.concat(l.imports)),o}).flat(1))}function US(e){return[...new Set(e)]}function HS(e){let t={},a=Object.keys(e).sort();for(let s of a)t[s]=e[s];return t}function FS(e,t){let a=new Set;return new Set(t),e.reduce((s,l)=>{let o=JSON.stringify(HS(l));return a.has(o)||(a.add(o),s.push({key:o,link:l})),s},[])}function hh(){let e=A.useContext(zi);return mh(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function zS(){let e=A.useContext(kc);return mh(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var ph=A.createContext(void 0);ph.displayName="FrameworkContext";function Oc(){let e=A.useContext(ph);return mh(e,"You must render this element inside a <HydratedRouter> element"),e}function qS(e,t){let a=A.useContext(ph),[s,l]=A.useState(!1),[o,d]=A.useState(!1),{onFocus:f,onBlur:h,onMouseEnter:m,onMouseLeave:b,onTouchStart:x}=t,y=A.useRef(null);A.useEffect(()=>{if(e==="render"&&d(!0),e==="viewport"){let S=v=>{v.forEach(M=>{d(M.isIntersecting)})},C=new IntersectionObserver(S,{threshold:.5});return y.current&&C.observe(y.current),()=>{C.disconnect()}}},[e]),A.useEffect(()=>{if(s){let S=setTimeout(()=>{d(!0)},100);return()=>{clearTimeout(S)}}},[s]);let T=()=>{l(!0)},N=()=>{l(!1),d(!1)};return a?e!=="intent"?[o,y,{}]:[o,y,{onFocus:Yl(f,T),onBlur:Yl(h,N),onMouseEnter:Yl(m,T),onMouseLeave:Yl(b,N),onTouchStart:Yl(x,T)}]:[!1,y,{}]}function Yl(e,t){return a=>{e&&e(a),a.defaultPrevented||t(a)}}function YS({page:e,...t}){let a=J2(),{nonce:s}=Oc(),{router:l}=hh(),o=A.useMemo(()=>tE(l.routes,e,l.basename),[l.routes,e,l.basename]);return o?(t.nonce==null&&s&&(t={...t,nonce:s}),a?A.createElement(GS,{page:e,matches:o,...t}):A.createElement(KS,{page:e,matches:o,...t})):null}function $S(e){let{manifest:t,routeModules:a}=Oc(),[s,l]=A.useState([]);return A.useEffect(()=>{let o=!1;return BS(e,t,a).then(d=>{o||l(d)}),()=>{o=!0}},[e,t,a]),s}function GS({page:e,matches:t,...a}){let s=oa(),{future:l}=Oc(),{basename:o}=hh(),d=A.useMemo(()=>{if(e===s.pathname+s.search+s.hash)return[];let f=xE(e,o,l.v8_trailingSlashAwareDataRequests,"rsc"),h=!1,m=[];for(let b of t)typeof b.route.shouldRevalidate=="function"?h=!0:m.push(b.route.id);return h&&m.length>0&&f.searchParams.set("_routes",m.join(",")),[f.pathname+f.search]},[o,l.v8_trailingSlashAwareDataRequests,e,s,t]);return A.createElement(A.Fragment,null,d.map(f=>A.createElement("link",{key:f,rel:"prefetch",as:"fetch",href:f,...a})))}function KS({page:e,matches:t,...a}){let s=oa(),{future:l,manifest:o,routeModules:d}=Oc(),{basename:f}=hh(),{loaderData:h,matches:m}=zS(),b=A.useMemo(()=>qb(e,t,m,o,s,"data"),[e,t,m,o,s]),x=A.useMemo(()=>qb(e,t,m,o,s,"assets"),[e,t,m,o,s]),y=A.useMemo(()=>{if(e===s.pathname+s.search+s.hash)return[];let S=new Set,C=!1;if(t.forEach(M=>{var D;let k=o.routes[M.route.id];!k||!k.hasLoader||(!b.some($=>$.route.id===M.route.id)&&M.route.id in h&&((D=d[M.route.id])!=null&&D.shouldRevalidate)||k.hasClientLoader?C=!0:S.add(M.route.id))}),S.size===0)return[];let v=xE(e,f,l.v8_trailingSlashAwareDataRequests,"data");return C&&S.size>0&&v.searchParams.set("_routes",t.filter(M=>S.has(M.route.id)).map(M=>M.route.id).join(",")),[v.pathname+v.search]},[f,l.v8_trailingSlashAwareDataRequests,h,s,o,b,t,e,d]),T=A.useMemo(()=>PS(x,o),[x,o]),N=$S(x);return A.createElement(A.Fragment,null,y.map(S=>A.createElement("link",{key:S,rel:"prefetch",as:"fetch",href:S,...a})),T.map(S=>A.createElement("link",{key:S,rel:"modulepreload",href:S,...a})),N.map(({key:S,link:C})=>A.createElement("link",{key:S,nonce:a.nonce,...C,crossOrigin:C.crossOrigin??a.crossOrigin})))}function VS(...e){return t=>{e.forEach(a=>{typeof a=="function"?a(t):a!=null&&(a.current=t)})}}var QS=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{QS&&(window.__reactRouterVersion="7.18.1")}catch{}function XS({basename:e,children:t,useTransitions:a,window:s}){let l=A.useRef();l.current==null&&(l.current=v2({window:s,v5Compat:!0}));let o=l.current,[d,f]=A.useState({action:o.action,location:o.location}),h=A.useCallback(m=>{a===!1?f(m):A.startTransition(()=>f(m))},[a]);return A.useLayoutEffect(()=>o.listen(h),[o,h]),A.createElement(SS,{basename:e,children:t,location:d.location,navigationType:d.action,navigator:o,useTransitions:a})}var EE=A.forwardRef(function({onClick:t,discover:a="render",prefetch:s="none",relative:l,reloadDocument:o,replace:d,mask:f,state:h,target:m,to:b,preventScrollReset:x,viewTransition:y,defaultShouldRevalidate:T,...N},S){let{basename:C,navigator:v,useTransitions:M}=A.useContext(la),k=typeof b=="string"&&oh.test(b),D=oE(b,C);b=D.to;let $=iS(b,{relative:l}),L=oa(),Y=null;if(f){let J=wc(f,[],L.mask?L.mask.pathname:"/",!0);C!=="/"&&(J.pathname=J.pathname==="/"?C:Ra([C,J.pathname])),Y=v.createHref(J)}let[re,fe,U]=qS(s,N),H=JS(b,{replace:d,mask:f,state:h,target:m,preventScrollReset:x,relative:l,viewTransition:y,defaultShouldRevalidate:T,useTransitions:M});function ae(J){t&&t(J),J.defaultPrevented||H(J)}let se=!(D.isExternal||o),Z=A.createElement("a",{...N,...U,href:(se?Y:void 0)||D.absoluteURL||$,onClick:se?ae:t,ref:VS(S,fe),target:m,"data-discover":!k&&a==="render"?"true":void 0});return re&&!k?A.createElement(A.Fragment,null,Z,A.createElement(YS,{page:$})):Z});EE.displayName="Link";var gh=A.forwardRef(function({"aria-current":t="page",caseSensitive:a=!1,className:s="",end:l=!1,style:o,to:d,viewTransition:f,children:h,...m},b){let x=yo(d,{relative:m.relative}),y=oa(),T=A.useContext(kc),{navigator:N,basename:S}=A.useContext(la),C=T!=null&&rv(x)&&f===!0,v=N.encodeLocation?N.encodeLocation(x).pathname:x.pathname,M=y.pathname,k=T&&T.navigation&&T.navigation.location?T.navigation.location.pathname:null;a||(M=M.toLowerCase(),k=k?k.toLowerCase():null,v=v.toLowerCase()),k&&S&&(k=Nr(k,S)||k);const D=v!=="/"&&v.endsWith("/")?v.length-1:v.length;let $=M===v||!l&&M.startsWith(v)&&M.charAt(D)==="/",L=k!=null&&(k===v||!l&&k.startsWith(v)&&k.charAt(v.length)==="/"),Y={isActive:$,isPending:L,isTransitioning:C},re=$?t:void 0,fe;typeof s=="function"?fe=s(Y):fe=[s,$?"active":null,L?"pending":null,C?"transitioning":null].filter(Boolean).join(" ");let U=typeof o=="function"?o(Y):o;return A.createElement(EE,{...m,"aria-current":re,className:fe,ref:b,style:U,to:d,viewTransition:f},typeof h=="function"?h(Y):h)});gh.displayName="NavLink";var ZS=A.forwardRef(({discover:e="render",fetcherKey:t,navigate:a,reloadDocument:s,replace:l,state:o,method:d=ac,action:f,onSubmit:h,relative:m,preventScrollReset:b,viewTransition:x,defaultShouldRevalidate:y,...T},N)=>{let{useTransitions:S}=A.useContext(la),C=nv(),v=av(f,{relative:m}),M=d.toLowerCase()==="get"?"get":"post",k=typeof f=="string"&&oh.test(f),D=$=>{if(h&&h($),$.defaultPrevented)return;$.preventDefault();let L=$.nativeEvent.submitter,Y=(L==null?void 0:L.getAttribute("formmethod"))||d,re=()=>C(L||$.currentTarget,{fetcherKey:t,method:Y,navigate:a,replace:l,state:o,relative:m,preventScrollReset:b,viewTransition:x,defaultShouldRevalidate:y});S&&a!==!1?A.startTransition(()=>re()):re()};return A.createElement("form",{ref:N,method:M,action:v,onSubmit:s?h:D,...T,"data-discover":!k&&e==="render"?"true":void 0})});ZS.displayName="Form";function WS(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function yE(e){let t=A.useContext(zi);return Ut(t,WS(e)),t}function JS(e,{target:t,replace:a,mask:s,state:l,preventScrollReset:o,relative:d,viewTransition:f,defaultShouldRevalidate:h,useTransitions:m}={}){let b=Na(),x=oa(),y=yo(e,{relative:d});return A.useCallback(T=>{if(RS(T,t)){T.preventDefault();let N=a!==void 0?a:uo(x)===uo(y),S=()=>b(e,{replace:N,mask:s,state:l,preventScrollReset:o,relative:d,viewTransition:f,defaultShouldRevalidate:h});m?A.startTransition(()=>S()):S()}},[x,b,y,a,s,l,t,e,o,d,f,h,m])}function TE(e){_a(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=A.useRef(Bm(e)),a=A.useRef(!1),s=oa(),l=A.useMemo(()=>OS(s.search,a.current?null:t.current),[s.search]),o=Na(),d=A.useCallback((f,h)=>{const m=Bm(typeof f=="function"?f(new URLSearchParams(l)):f);a.current=!0,o("?"+m,h)},[o,l]);return[l,d]}var ev=0,tv=()=>`__${String(++ev)}__`;function nv(){let{router:e}=yE("useSubmit"),{basename:t}=A.useContext(la),a=ES(),s=e.fetch,l=e.navigate;return A.useCallback(async(o,d={})=>{let{action:f,method:h,encType:m,formData:b,body:x}=DS(o,t);if(d.navigate===!1){let y=d.fetcherKey||tv();await s(y,a,d.action||f,{defaultShouldRevalidate:d.defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:b,body:x,formMethod:d.method||h,formEncType:d.encType||m,flushSync:d.flushSync})}else await l(d.action||f,{defaultShouldRevalidate:d.defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:b,body:x,formMethod:d.method||h,formEncType:d.encType||m,replace:d.replace,state:d.state,fromRouteId:a,flushSync:d.flushSync,viewTransition:d.viewTransition})},[s,l,t,a])}function av(e,{relative:t}={}){let{basename:a}=A.useContext(la),s=A.useContext(Ma);Ut(s,"useFormAction must be used inside a RouteContext");let[l]=s.matches.slice(-1),o={...yo(e||".",{relative:t})},d=oa();if(e==null){o.search=d.search;let f=new URLSearchParams(o.search),h=f.getAll("index");if(h.some(b=>b==="")){f.delete("index"),h.filter(x=>x).forEach(x=>f.append("index",x));let b=f.toString();o.search=b?`?${b}`:""}}return(!e||e===".")&&l.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),a!=="/"&&(o.pathname=o.pathname==="/"?a:Ra([a,o.pathname])),uo(o)}function rv(e,{relative:t}={}){let a=A.useContext(dE);Ut(a!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:s}=yE("useViewTransitionState"),l=yo(e,{relative:t});if(!a.isTransitioning)return!1;let o=Nr(a.currentLocation.pathname,s)||a.currentLocation.pathname,d=Nr(a.nextLocation.pathname,s)||a.nextLocation.pathname;return uc(l.pathname,d)!=null||uc(l.pathname,o)!=null}/**
|
|
61
|
+
* @license lucide-react v0.513.0 - ISC
|
|
62
|
+
*
|
|
63
|
+
* This source code is licensed under the ISC license.
|
|
64
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
65
|
+
*/const sv=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),iv=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,a,s)=>s?s.toUpperCase():a.toLowerCase()),Yb=e=>{const t=iv(e);return t.charAt(0).toUpperCase()+t.slice(1)},_E=(...e)=>e.filter((t,a,s)=>!!t&&t.trim()!==""&&s.indexOf(t)===a).join(" ").trim(),lv=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
|
|
66
|
+
* @license lucide-react v0.513.0 - ISC
|
|
67
|
+
*
|
|
68
|
+
* This source code is licensed under the ISC license.
|
|
69
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
70
|
+
*/var ov={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
71
|
+
* @license lucide-react v0.513.0 - ISC
|
|
72
|
+
*
|
|
73
|
+
* This source code is licensed under the ISC license.
|
|
74
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
75
|
+
*/const uv=A.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:a=2,absoluteStrokeWidth:s,className:l="",children:o,iconNode:d,...f},h)=>A.createElement("svg",{ref:h,...ov,width:t,height:t,stroke:e,strokeWidth:s?Number(a)*24/Number(t):a,className:_E("lucide",l),...!o&&!lv(f)&&{"aria-hidden":"true"},...f},[...d.map(([m,b])=>A.createElement(m,b)),...Array.isArray(o)?o:[o]]));/**
|
|
76
|
+
* @license lucide-react v0.513.0 - ISC
|
|
77
|
+
*
|
|
78
|
+
* This source code is licensed under the ISC license.
|
|
79
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
80
|
+
*/const Oe=(e,t)=>{const a=A.forwardRef(({className:s,...l},o)=>A.createElement(uv,{ref:o,iconNode:t,className:_E(`lucide-${sv(Yb(e))}`,`lucide-${e}`,s),...l}));return a.displayName=Yb(e),a};/**
|
|
81
|
+
* @license lucide-react v0.513.0 - ISC
|
|
82
|
+
*
|
|
83
|
+
* This source code is licensed under the ISC license.
|
|
84
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
85
|
+
*/const cv=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],dv=Oe("activity",cv);/**
|
|
86
|
+
* @license lucide-react v0.513.0 - ISC
|
|
87
|
+
*
|
|
88
|
+
* This source code is licensed under the ISC license.
|
|
89
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
90
|
+
*/const fv=[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]],mv=Oe("arrow-down-to-line",fv);/**
|
|
91
|
+
* @license lucide-react v0.513.0 - ISC
|
|
92
|
+
*
|
|
93
|
+
* This source code is licensed under the ISC license.
|
|
94
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
95
|
+
*/const hv=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],pv=Oe("arrow-left",hv);/**
|
|
96
|
+
* @license lucide-react v0.513.0 - ISC
|
|
97
|
+
*
|
|
98
|
+
* This source code is licensed under the ISC license.
|
|
99
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
100
|
+
*/const gv=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],bv=Oe("arrow-right",gv);/**
|
|
101
|
+
* @license lucide-react v0.513.0 - ISC
|
|
102
|
+
*
|
|
103
|
+
* This source code is licensed under the ISC license.
|
|
104
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
105
|
+
*/const xv=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],NE=Oe("arrow-up",xv);/**
|
|
106
|
+
* @license lucide-react v0.513.0 - ISC
|
|
107
|
+
*
|
|
108
|
+
* This source code is licensed under the ISC license.
|
|
109
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
110
|
+
*/const Ev=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]],yv=Oe("ban",Ev);/**
|
|
111
|
+
* @license lucide-react v0.513.0 - ISC
|
|
112
|
+
*
|
|
113
|
+
* This source code is licensed under the ISC license.
|
|
114
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
115
|
+
*/const Tv=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],_v=Oe("bot",Tv);/**
|
|
116
|
+
* @license lucide-react v0.513.0 - ISC
|
|
117
|
+
*
|
|
118
|
+
* This source code is licensed under the ISC license.
|
|
119
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
120
|
+
*/const Nv=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],Sv=Oe("box",Nv);/**
|
|
121
|
+
* @license lucide-react v0.513.0 - ISC
|
|
122
|
+
*
|
|
123
|
+
* This source code is licensed under the ISC license.
|
|
124
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
125
|
+
*/const vv=[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]],Av=Oe("brain",vv);/**
|
|
126
|
+
* @license lucide-react v0.513.0 - ISC
|
|
127
|
+
*
|
|
128
|
+
* This source code is licensed under the ISC license.
|
|
129
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
130
|
+
*/const Cv=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Ia=Oe("check",Cv);/**
|
|
131
|
+
* @license lucide-react v0.513.0 - ISC
|
|
132
|
+
*
|
|
133
|
+
* This source code is licensed under the ISC license.
|
|
134
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
135
|
+
*/const wv=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],ss=Oe("chevron-down",wv);/**
|
|
136
|
+
* @license lucide-react v0.513.0 - ISC
|
|
137
|
+
*
|
|
138
|
+
* This source code is licensed under the ISC license.
|
|
139
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
140
|
+
*/const kv=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],SE=Oe("chevron-left",kv);/**
|
|
141
|
+
* @license lucide-react v0.513.0 - ISC
|
|
142
|
+
*
|
|
143
|
+
* This source code is licensed under the ISC license.
|
|
144
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
145
|
+
*/const Rv=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],bh=Oe("chevron-right",Rv);/**
|
|
146
|
+
* @license lucide-react v0.513.0 - ISC
|
|
147
|
+
*
|
|
148
|
+
* This source code is licensed under the ISC license.
|
|
149
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
150
|
+
*/const Ov=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]],co=Oe("circle-dot",Ov);/**
|
|
151
|
+
* @license lucide-react v0.513.0 - ISC
|
|
152
|
+
*
|
|
153
|
+
* This source code is licensed under the ISC license.
|
|
154
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
155
|
+
*/const Iv=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],vE=Oe("circle-x",Iv);/**
|
|
156
|
+
* @license lucide-react v0.513.0 - ISC
|
|
157
|
+
*
|
|
158
|
+
* This source code is licensed under the ISC license.
|
|
159
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
160
|
+
*/const Mv=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Dv=Oe("circle",Mv);/**
|
|
161
|
+
* @license lucide-react v0.513.0 - ISC
|
|
162
|
+
*
|
|
163
|
+
* This source code is licensed under the ISC license.
|
|
164
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
165
|
+
*/const Lv=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}]],jv=Oe("clipboard",Lv);/**
|
|
166
|
+
* @license lucide-react v0.513.0 - ISC
|
|
167
|
+
*
|
|
168
|
+
* This source code is licensed under the ISC license.
|
|
169
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
170
|
+
*/const Bv=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]],Pv=Oe("clock",Bv);/**
|
|
171
|
+
* @license lucide-react v0.513.0 - ISC
|
|
172
|
+
*
|
|
173
|
+
* This source code is licensed under the ISC license.
|
|
174
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
175
|
+
*/const Uv=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],dc=Oe("copy",Uv);/**
|
|
176
|
+
* @license lucide-react v0.513.0 - ISC
|
|
177
|
+
*
|
|
178
|
+
* This source code is licensed under the ISC license.
|
|
179
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
180
|
+
*/const Hv=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],sc=Oe("cpu",Hv);/**
|
|
181
|
+
* @license lucide-react v0.513.0 - ISC
|
|
182
|
+
*
|
|
183
|
+
* This source code is licensed under the ISC license.
|
|
184
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
185
|
+
*/const Fv=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],zv=Oe("download",Fv);/**
|
|
186
|
+
* @license lucide-react v0.513.0 - ISC
|
|
187
|
+
*
|
|
188
|
+
* This source code is licensed under the ISC license.
|
|
189
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
190
|
+
*/const qv=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],fc=Oe("external-link",qv);/**
|
|
191
|
+
* @license lucide-react v0.513.0 - ISC
|
|
192
|
+
*
|
|
193
|
+
* This source code is licensed under the ISC license.
|
|
194
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
195
|
+
*/const Yv=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],$v=Oe("eye-off",Yv);/**
|
|
196
|
+
* @license lucide-react v0.513.0 - ISC
|
|
197
|
+
*
|
|
198
|
+
* This source code is licensed under the ISC license.
|
|
199
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
200
|
+
*/const Gv=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Kv=Oe("eye",Gv);/**
|
|
201
|
+
* @license lucide-react v0.513.0 - ISC
|
|
202
|
+
*
|
|
203
|
+
* This source code is licensed under the ISC license.
|
|
204
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
205
|
+
*/const Vv=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],AE=Oe("file-text",Vv);/**
|
|
206
|
+
* @license lucide-react v0.513.0 - ISC
|
|
207
|
+
*
|
|
208
|
+
* This source code is licensed under the ISC license.
|
|
209
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
210
|
+
*/const Qv=[["path",{d:"M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z",key:"i9b6wo"}],["line",{x1:"4",x2:"4",y1:"22",y2:"15",key:"1cm3nv"}]],xh=Oe("flag",Qv);/**
|
|
211
|
+
* @license lucide-react v0.513.0 - ISC
|
|
212
|
+
*
|
|
213
|
+
* This source code is licensed under the ISC license.
|
|
214
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
215
|
+
*/const Xv=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],Zv=Oe("gauge",Xv);/**
|
|
216
|
+
* @license lucide-react v0.513.0 - ISC
|
|
217
|
+
*
|
|
218
|
+
* This source code is licensed under the ISC license.
|
|
219
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
220
|
+
*/const Wv=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],Ic=Oe("git-branch",Wv);/**
|
|
221
|
+
* @license lucide-react v0.513.0 - ISC
|
|
222
|
+
*
|
|
223
|
+
* This source code is licensed under the ISC license.
|
|
224
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
225
|
+
*/const Jv=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]],mc=Oe("git-merge",Jv);/**
|
|
226
|
+
* @license lucide-react v0.513.0 - ISC
|
|
227
|
+
*
|
|
228
|
+
* This source code is licensed under the ISC license.
|
|
229
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
230
|
+
*/const eA=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["line",{x1:"6",x2:"6",y1:"9",y2:"21",key:"rroup"}]],fo=Oe("git-pull-request",eA);/**
|
|
231
|
+
* @license lucide-react v0.513.0 - ISC
|
|
232
|
+
*
|
|
233
|
+
* This source code is licensed under the ISC license.
|
|
234
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
235
|
+
*/const tA=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],Mc=Oe("link-2",tA);/**
|
|
236
|
+
* @license lucide-react v0.513.0 - ISC
|
|
237
|
+
*
|
|
238
|
+
* This source code is licensed under the ISC license.
|
|
239
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
240
|
+
*/const nA=[["rect",{x:"3",y:"5",width:"6",height:"6",rx:"1",key:"1defrl"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]],aA=Oe("list-todo",nA);/**
|
|
241
|
+
* @license lucide-react v0.513.0 - ISC
|
|
242
|
+
*
|
|
243
|
+
* This source code is licensed under the ISC license.
|
|
244
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
245
|
+
*/const rA=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],_r=Oe("loader-circle",rA);/**
|
|
246
|
+
* @license lucide-react v0.513.0 - ISC
|
|
247
|
+
*
|
|
248
|
+
* This source code is licensed under the ISC license.
|
|
249
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
250
|
+
*/const sA=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],iA=Oe("maximize-2",sA);/**
|
|
251
|
+
* @license lucide-react v0.513.0 - ISC
|
|
252
|
+
*
|
|
253
|
+
* This source code is licensed under the ISC license.
|
|
254
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
255
|
+
*/const lA=[["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 18h16",key:"19g7jn"}],["path",{d:"M4 6h16",key:"1o0s65"}]],Dc=Oe("menu",lA);/**
|
|
256
|
+
* @license lucide-react v0.513.0 - ISC
|
|
257
|
+
*
|
|
258
|
+
* This source code is licensed under the ISC license.
|
|
259
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
260
|
+
*/const oA=[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],uA=Oe("message-circle-question",oA);/**
|
|
261
|
+
* @license lucide-react v0.513.0 - ISC
|
|
262
|
+
*
|
|
263
|
+
* This source code is licensed under the ISC license.
|
|
264
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
265
|
+
*/const cA=[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]],dA=Oe("message-circle",cA);/**
|
|
266
|
+
* @license lucide-react v0.513.0 - ISC
|
|
267
|
+
*
|
|
268
|
+
* This source code is licensed under the ISC license.
|
|
269
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
270
|
+
*/const fA=[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]],mA=Oe("message-square",fA);/**
|
|
271
|
+
* @license lucide-react v0.513.0 - ISC
|
|
272
|
+
*
|
|
273
|
+
* This source code is licensed under the ISC license.
|
|
274
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
275
|
+
*/const hA=[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]],pA=Oe("minimize-2",hA);/**
|
|
276
|
+
* @license lucide-react v0.513.0 - ISC
|
|
277
|
+
*
|
|
278
|
+
* This source code is licensed under the ISC license.
|
|
279
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
280
|
+
*/const gA=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],bA=Oe("monitor",gA);/**
|
|
281
|
+
* @license lucide-react v0.513.0 - ISC
|
|
282
|
+
*
|
|
283
|
+
* This source code is licensed under the ISC license.
|
|
284
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
285
|
+
*/const xA=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]],EA=Oe("moon",xA);/**
|
|
286
|
+
* @license lucide-react v0.513.0 - ISC
|
|
287
|
+
*
|
|
288
|
+
* This source code is licensed under the ISC license.
|
|
289
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
290
|
+
*/const yA=[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]],TA=Oe("network",yA);/**
|
|
291
|
+
* @license lucide-react v0.513.0 - ISC
|
|
292
|
+
*
|
|
293
|
+
* This source code is licensed under the ISC license.
|
|
294
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
295
|
+
*/const _A=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]],CE=Oe("panel-right",_A);/**
|
|
296
|
+
* @license lucide-react v0.513.0 - ISC
|
|
297
|
+
*
|
|
298
|
+
* This source code is licensed under the ISC license.
|
|
299
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
300
|
+
*/const NA=[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]],wE=Oe("pen-line",NA);/**
|
|
301
|
+
* @license lucide-react v0.513.0 - ISC
|
|
302
|
+
*
|
|
303
|
+
* This source code is licensed under the ISC license.
|
|
304
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
305
|
+
*/const SA=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],$b=Oe("pencil",SA);/**
|
|
306
|
+
* @license lucide-react v0.513.0 - ISC
|
|
307
|
+
*
|
|
308
|
+
* This source code is licensed under the ISC license.
|
|
309
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
310
|
+
*/const vA=[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]],Lc=Oe("play",vA);/**
|
|
311
|
+
* @license lucide-react v0.513.0 - ISC
|
|
312
|
+
*
|
|
313
|
+
* This source code is licensed under the ISC license.
|
|
314
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
315
|
+
*/const AA=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Sr=Oe("plus",AA);/**
|
|
316
|
+
* @license lucide-react v0.513.0 - ISC
|
|
317
|
+
*
|
|
318
|
+
* This source code is licensed under the ISC license.
|
|
319
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
320
|
+
*/const CA=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Ps=Oe("refresh-cw",CA);/**
|
|
321
|
+
* @license lucide-react v0.513.0 - ISC
|
|
322
|
+
*
|
|
323
|
+
* This source code is licensed under the ISC license.
|
|
324
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
325
|
+
*/const wA=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],Eh=Oe("save",wA);/**
|
|
326
|
+
* @license lucide-react v0.513.0 - ISC
|
|
327
|
+
*
|
|
328
|
+
* This source code is licensed under the ISC license.
|
|
329
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
330
|
+
*/const kA=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Va=Oe("search",kA);/**
|
|
331
|
+
* @license lucide-react v0.513.0 - ISC
|
|
332
|
+
*
|
|
333
|
+
* This source code is licensed under the ISC license.
|
|
334
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
335
|
+
*/const RA=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],Pm=Oe("send",RA);/**
|
|
336
|
+
* @license lucide-react v0.513.0 - ISC
|
|
337
|
+
*
|
|
338
|
+
* This source code is licensed under the ISC license.
|
|
339
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
340
|
+
*/const OA=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],IA=Oe("settings",OA);/**
|
|
341
|
+
* @license lucide-react v0.513.0 - ISC
|
|
342
|
+
*
|
|
343
|
+
* This source code is licensed under the ISC license.
|
|
344
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
345
|
+
*/const MA=[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]],sm=Oe("sparkles",MA);/**
|
|
346
|
+
* @license lucide-react v0.513.0 - ISC
|
|
347
|
+
*
|
|
348
|
+
* This source code is licensed under the ISC license.
|
|
349
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
350
|
+
*/const DA=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],kE=Oe("square",DA);/**
|
|
351
|
+
* @license lucide-react v0.513.0 - ISC
|
|
352
|
+
*
|
|
353
|
+
* This source code is licensed under the ISC license.
|
|
354
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
355
|
+
*/const LA=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],jA=Oe("sun",LA);/**
|
|
356
|
+
* @license lucide-react v0.513.0 - ISC
|
|
357
|
+
*
|
|
358
|
+
* This source code is licensed under the ISC license.
|
|
359
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
360
|
+
*/const BA=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]],Li=Oe("trash-2",BA);/**
|
|
361
|
+
* @license lucide-react v0.513.0 - ISC
|
|
362
|
+
*
|
|
363
|
+
* This source code is licensed under the ISC license.
|
|
364
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
365
|
+
*/const PA=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],ia=Oe("triangle-alert",PA);/**
|
|
366
|
+
* @license lucide-react v0.513.0 - ISC
|
|
367
|
+
*
|
|
368
|
+
* This source code is licensed under the ISC license.
|
|
369
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
370
|
+
*/const UA=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],RE=Oe("upload",UA);/**
|
|
371
|
+
* @license lucide-react v0.513.0 - ISC
|
|
372
|
+
*
|
|
373
|
+
* This source code is licensed under the ISC license.
|
|
374
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
375
|
+
*/const HA=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],FA=Oe("user",HA);/**
|
|
376
|
+
* @license lucide-react v0.513.0 - ISC
|
|
377
|
+
*
|
|
378
|
+
* This source code is licensed under the ISC license.
|
|
379
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
380
|
+
*/const zA=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],qA=Oe("users",zA);/**
|
|
381
|
+
* @license lucide-react v0.513.0 - ISC
|
|
382
|
+
*
|
|
383
|
+
* This source code is licensed under the ISC license.
|
|
384
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
385
|
+
*/const YA=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]],OE=Oe("wifi",YA);/**
|
|
386
|
+
* @license lucide-react v0.513.0 - ISC
|
|
387
|
+
*
|
|
388
|
+
* This source code is licensed under the ISC license.
|
|
389
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
390
|
+
*/const $A=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]],GA=Oe("wrench",$A);/**
|
|
391
|
+
* @license lucide-react v0.513.0 - ISC
|
|
392
|
+
*
|
|
393
|
+
* This source code is licensed under the ISC license.
|
|
394
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
395
|
+
*/const KA=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Tt=Oe("x",KA);/**
|
|
396
|
+
* @license lucide-react v0.513.0 - ISC
|
|
397
|
+
*
|
|
398
|
+
* This source code is licensed under the ISC license.
|
|
399
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
400
|
+
*/const VA=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],IE=Oe("zap",VA);function ME(e){var t,a,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var l=e.length;for(t=0;t<l;t++)e[t]&&(a=ME(e[t]))&&(s&&(s+=" "),s+=a)}else for(a in e)e[a]&&(s&&(s+=" "),s+=a);return s}function me(){for(var e,t,a=0,s="",l=arguments.length;a<l;a++)(e=arguments[a])&&(t=ME(e))&&(s&&(s+=" "),s+=t);return s}const Gb=e=>{let t;const a=new Set,s=(m,b)=>{const x=typeof m=="function"?m(t):m;if(!Object.is(x,t)){const y=t;t=b??(typeof x!="object"||x===null)?x:Object.assign({},t,x),a.forEach(T=>T(t,y))}},l=()=>t,f={setState:s,getState:l,getInitialState:()=>h,subscribe:m=>(a.add(m),()=>a.delete(m))},h=t=e(s,l,f);return f},QA=(e=>e?Gb(e):Gb),XA=e=>e;function ZA(e,t=XA){const a=$u.useSyncExternalStore(e.subscribe,$u.useCallback(()=>t(e.getState()),[e,t]),$u.useCallback(()=>t(e.getInitialState()),[e,t]));return $u.useDebugValue(a),a}const Kb=e=>{const t=QA(e),a=s=>ZA(t,s);return Object.assign(a,t),a},Fs=(e=>e?Kb(e):Kb),im="fs-theme";function DE(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Vb(e){return e==="system"?DE():e}function Qb(e){e==="system"?document.documentElement.removeAttribute("data-theme"):document.documentElement.setAttribute("data-theme",e)}const Um=Fs((e,t)=>({preference:localStorage.getItem(im)??"system",resolved:Vb(localStorage.getItem(im)??"system"),setPreference(a){const s=Vb(a);localStorage.setItem(im,a),Qb(a),e({preference:a,resolved:s})},cycle(){const a=["system","light","dark"],s=a[(a.indexOf(t().preference)+1)%a.length];t().setPreference(s)},init(){Qb(t().preference);const a=window.matchMedia("(prefers-color-scheme: dark)"),s=()=>{const{preference:l}=t();if(l==="system"){const o=DE();e({resolved:o})}};return a.addEventListener("change",s),()=>a.removeEventListener("change",s)}})),hc="fourth-spark-server-url";function LE(){if(typeof window>"u")return!1;const t=window.Capacitor;return typeof(t==null?void 0:t.isNativePlatform)=="function"&&t.isNativePlatform()}function jE(){return localStorage.getItem(hc)??""}function WA(e){const t=e.replace(/\/+$/,"");t?localStorage.setItem(hc,t):localStorage.removeItem(hc)}function Hm(){return localStorage.getItem(hc)??""}class Us extends Error{constructor(a,s){super(a);rn(this,"status");this.name="ApiError",this.status=s}}async function Ce(e,t){let a;try{a=await fetch(jE()+e,{...t,headers:{Accept:"application/json",...t!=null&&t.body?{"Content-Type":"application/json"}:{},...t==null?void 0:t.headers}})}catch(l){throw new Us(l instanceof Error?l.message:"Network request failed",0)}if(!a.ok){const l=await a.text().catch(()=>"");throw new Us(l.trim()||`${a.status} ${a.statusText}`,a.status)}if(a.status===204)return;const s=await a.text();if(s)return JSON.parse(s)}function Mn(e,...t){if(Array.isArray(e))return e;if(e&&typeof e=="object"){const a=e;for(const s of[...t,"data","items"])if(Array.isArray(a[s]))return a[s]}return[]}async function JA(){return Mn(await Ce("/api/repos"),"repos")}async function e3(e,t,a){return Ce("/api/repos",{method:"POST",body:JSON.stringify({name:e,gitUrl:t,localPath:a})})}async function t3(e){return Ce("/api/repos/resolve",{method:"POST",body:JSON.stringify({localPath:e})})}async function n3(e){await Ce(`/api/repos/${encodeURIComponent(e)}`,{method:"DELETE"})}async function a3(e){await Ce(`/api/repos/${encodeURIComponent(e)}/start`,{method:"POST"})}async function r3(e){await Ce(`/api/repos/${encodeURIComponent(e)}/stop`,{method:"POST"})}async function s3(e){return Ce(`/api/repos/${encodeURIComponent(e)}/branches`)}async function i3(e,t){return Ce(`/api/repos/${encodeURIComponent(e)}/checkout`,{method:"POST",body:JSON.stringify({branch:t})})}async function l3(e){return Ce(`/api/repos/${encodeURIComponent(e)}/pull`,{method:"POST"})}function We(e){return`/api/repos/${encodeURIComponent(e)}`}async function o3(e){return Mn(await Ce(`${We(e)}/sessions`),"sessions")}async function u3(e,t,a,s,l,o,d){return Ce(`${We(e)}/sessions`,{method:"POST",body:JSON.stringify({message:t,agent:a,model:s,variant:l,issueId:o,customAgentId:d})})}async function c3(e,t){return Ce(`${We(e)}/sessions/${encodeURIComponent(t)}`)}async function d3(e,t){await Ce(`${We(e)}/sessions/${encodeURIComponent(t)}`,{method:"DELETE"})}async function f3(e,t,a,s,l){await Ce(`${We(e)}/sessions/${encodeURIComponent(t)}/prompt`,{method:"POST",body:JSON.stringify({content:a,agent:s,model:l})})}async function m3(e,t){await Ce(`${We(e)}/sessions/${encodeURIComponent(t)}/abort`,{method:"POST"})}function h3(e){const t=e,a=t.info;if(a&&typeof a.id=="string"){const s=Array.isArray(t.parts)?t.parts:void 0;return{...a,...s?{parts:s}:{}}}return t}async function p3(e,t){return Mn(await Ce(`${We(e)}/sessions/${encodeURIComponent(t)}/messages`),"messages").map(h3)}async function g3(e,t){return Mn(await Ce(`${We(e)}/sessions/${encodeURIComponent(t)}/todos`),"todos")}async function BE(e,t){return Ce(`${We(e)}/sessions/${encodeURIComponent(t)}/status`)}async function Xb(e,t){return Ce(`${We(e)}/sessions/${encodeURIComponent(t)}/links`)}async function Zb(e){return Ce(`${We(e)}/sessions/all-links`)}async function b3(e,t,a,s){await Ce(`${We(e)}/sessions/${encodeURIComponent(t)}/links`,{method:"POST",body:JSON.stringify({type:a,targetId:s})})}async function x3(e,t,a,s){await Ce(`${We(e)}/sessions/${encodeURIComponent(t)}/links`,{method:"DELETE",body:JSON.stringify({type:a,targetId:s})})}async function PE(){return Mn(await Ce("/api/custom-agents"))}async function UE(e){return Ce("/api/custom-agents",{method:"POST",body:JSON.stringify(e)})}async function HE(e,t){return Ce(`/api/custom-agents/${encodeURIComponent(e)}`,{method:"PUT",body:JSON.stringify(t)})}async function FE(e){await Ce(`/api/custom-agents/${encodeURIComponent(e)}`,{method:"DELETE"})}async function Wb(e){return Ce(`/api/custom-agents/${encodeURIComponent(e)}/export`)}async function E3(e){return Ce("/api/custom-agents/import",{method:"POST",body:JSON.stringify(e)})}async function y3(e){return Mn(await Ce(`${We(e)}/custom-agents`))}async function T3(e,t){return Ce(`${We(e)}/custom-agents`,{method:"POST",body:JSON.stringify(t)})}async function yh(e){return Mn(await Ce(`${We(e)}/models`))}async function _3(){return Mn(await Ce("/api/prompt-fragments"))}async function N3(e){return Ce("/api/prompt-fragments",{method:"POST",body:JSON.stringify(e)})}async function S3(e,t){return Ce(`/api/prompt-fragments/${encodeURIComponent(e)}`,{method:"PUT",body:JSON.stringify(t)})}async function v3(e){await Ce(`/api/prompt-fragments/${encodeURIComponent(e)}`,{method:"DELETE"})}async function Jb(e){return Mn(await Ce(`${We(e)}/tags`))}async function ex(e,t){return Mn(await Ce(`${We(e)}/milestones`))}async function tx(e,t="open"){return Mn(await Ce(`${We(e)}/issues?state=${encodeURIComponent(t)}`),"issues")}async function A3(e,t="all"){return Ce(`${We(e)}/issues/sync`,{method:"POST",body:JSON.stringify({state:t})})}async function C3(e,t,a){return Ce(`${We(e)}/issues`,{method:"POST",body:JSON.stringify({title:t,body:a})})}async function w3(e,t,a){await Ce(`${We(e)}/issues/${t}/children`,{method:"POST",body:JSON.stringify({childNumber:a})})}async function zE(e,t,a){return Ce(`${We(e)}/issues/${t}`,{method:"PATCH",body:JSON.stringify(a)})}async function nx(e,t){return Mn(await Ce(`${We(e)}/issues/${t}/pulls`))}async function k3(e,t,a,s=!1){await Ce(`${We(e)}/issues/${t}/pulls/${a}/merge`,{method:"POST",body:JSON.stringify({closeIssue:s})})}async function ax(e,t="open"){return Mn(await Ce(`${We(e)}/pulls?state=${encodeURIComponent(t)}`))}async function R3(e,t="all"){return Ce(`${We(e)}/pulls/sync`,{method:"POST",body:JSON.stringify({state:t})})}async function O3(e,t){await Ce(`${We(e)}/pulls/${t}/merge`,{method:"POST"})}async function qE(e,t){return Mn(await Ce(`${We(e)}/pulls/${t}/issues`))}async function I3(e,t,a){await Ce(`${We(e)}/pulls/${t}/issues`,{method:"POST",body:JSON.stringify({issueNumber:a})})}async function M3(e,t,a){await Ce(`${We(e)}/pulls/${t}/issues/${a}`,{method:"DELETE"})}async function D3(e,t){return Ce(`${We(e)}/pulls/${t}/comments`)}async function L3(e,t){return Ce(`${We(e)}/issues/${t}/comments`)}async function rx(e,t,a){return Ce(`${We(e)}/issues/${t}/comments`,{method:"POST",body:JSON.stringify({body:a})})}async function j3(e,t,a){return Ce(`${We(e)}/issues/${t}/polish`,{method:"POST",body:JSON.stringify({draft:a})})}async function sx(e,t){return Ce(`${We(e)}/issues/${t}/draft`)}async function B3(e,t,a){await Ce(`${We(e)}/sessions/${encodeURIComponent(t)}`,{method:"PATCH",body:JSON.stringify({title:a})})}async function P3(){return Ce("/api/agents-md")}async function U3(e){await Ce("/api/agents-md",{method:"PUT",body:JSON.stringify({content:e})})}async function H3(e){return Ce(`/api/repos/${encodeURIComponent(e)}/agents-md`)}async function F3(e,t){await Ce(`/api/repos/${encodeURIComponent(e)}/agents-md`,{method:"PUT",body:JSON.stringify({content:t})})}function z3(e){return`${jE()}${We(e)}/events`}async function q3(e){return Ce(`${We(e)}/sessions/status`)}async function Th(){return Ce("/api/settings")}async function Y3(e,t){await Ce(`/api/settings/${encodeURIComponent(e)}`,{method:"PUT",body:JSON.stringify({value:t})})}async function $3(){return Mn(await Ce("/api/git-hosts"),"gitHosts")}async function G3(e,t,a,s="gitea"){return Ce("/api/git-hosts",{method:"POST",body:JSON.stringify({host:e,name:t,token:a,platform:s})})}async function K3(e){await Ce(`/api/git-hosts/${encodeURIComponent(e)}`,{method:"DELETE"})}async function V3(){return Ce("/api/usage")}async function Q3(e){return Ce("/api/usage/switch",{method:"POST",body:JSON.stringify({accountId:e})})}async function X3(e,t="ios"){await Ce("/api/push/register",{method:"POST",body:JSON.stringify({token:e,platform:t})})}const ts="fs-active-repo",qe=Fs((e,t)=>({repos:[],activeRepoId:localStorage.getItem(ts),loading:!1,loadError:null,loadRepos:async()=>{e({loading:!0,loadError:null});try{const a=await JA(),s=t().activeRepoId,l=s&&a.some(d=>d.id===s);e({repos:a,loading:!1,activeRepoId:l?s:a.length>0?a[0].id:null});const o=t().activeRepoId;o?localStorage.setItem(ts,o):localStorage.removeItem(ts)}catch(a){e({loading:!1,loadError:a instanceof Error?a.message:"Failed to load repos"})}},setActiveRepo:a=>{e({activeRepoId:a}),a?localStorage.setItem(ts,a):localStorage.removeItem(ts)},addRepo:async(a,s,l)=>{try{const o=await e3(a,s,l);return e(d=>({repos:[...d.repos,o],activeRepoId:o.id})),localStorage.setItem(ts,o.id),o}catch(o){return e({loadError:o instanceof Error?o.message:"Failed to add repo"}),null}},removeRepo:async a=>{try{await n3(a)}catch{}e(s=>{const l=s.repos.filter(d=>d.id!==a),o=s.activeRepoId===a?l.length>0?l[0].id:null:s.activeRepoId;return o?localStorage.setItem(ts,o):localStorage.removeItem(ts),{repos:l,activeRepoId:o}})},updateRepoBranch:(a,s)=>{e(l=>({repos:l.repos.map(o=>o.id===a?{...o,branch:s}:o)}))}})),Da=e=>{var t;return((t=e.repos.find(a=>a.id===e.activeRepoId))==null?void 0:t.name)??null},YE=[{segment:"repos",icon:Sv,label:"仓库管理",global:!0},{segment:"run",icon:Lc,label:"运行面板",global:!1},{segment:"issues",icon:co,label:"Issues",global:!1},{segment:"pulls",icon:fo,label:"PRs",global:!1},{segment:"settings",icon:IA,label:"设置",global:!0}];function $E(e,t,a){return t?`/${e}`:a?`/${encodeURIComponent(a)}/${e}`:`/${e}`}function Z3({repoId:e,currentBranch:t}){const a=qe(v=>v.updateRepoBranch),[s,l]=A.useState(!1),[o,d]=A.useState(null),[f,h]=A.useState(!1),[m,b]=A.useState(null),[x,y]=A.useState(null),T=A.useRef(null),N=A.useCallback(()=>{l(!1),y(null)},[]);A.useEffect(()=>{if(!s)return;const v=M=>{T.current&&!T.current.contains(M.target)&&N()};return document.addEventListener("mousedown",v),()=>document.removeEventListener("mousedown",v)},[s,N]);const S=async()=>{if(s){N();return}l(!0),h(!0),y(null);try{d(await s3(e))}catch{y("加载分支失败")}finally{h(!1)}},C=async v=>{if(!(v===t||m)){b(v),y(null);try{const M=await i3(e,v);a(e,M.branch),N()}catch(M){y(M instanceof Error?M.message:"切换失败")}finally{b(null)}}};return t?c.jsxs("div",{ref:T,className:"relative",children:[c.jsxs("button",{type:"button",onClick:S,className:"flex items-center gap-1 rounded-md bg-elevated px-2 py-1 text-xs text-fg-3 transition-colors hover:bg-blue-500/10 hover:text-blue-600",children:[c.jsx(Ic,{className:"h-3 w-3"}),t,c.jsx(ss,{className:me("h-3 w-3 transition-transform",s&&"rotate-180")})]}),s&&c.jsxs("div",{className:"absolute right-0 top-full z-50 mt-1 w-56 overflow-hidden rounded-lg border border-line bg-surface shadow-lg",children:[f?c.jsx("div",{className:"flex items-center justify-center py-4",children:c.jsx(_r,{className:"h-4 w-4 animate-spin text-fg-4"})}):o?c.jsxs("div",{className:"max-h-64 overflow-y-auto py-1",children:[o.local.map(v=>c.jsxs("button",{type:"button",disabled:m!==null,onClick:()=>C(v),className:me("flex w-full items-center gap-2 px-3 py-1.5 text-left text-xs transition-colors",v===t?"font-medium text-blue-600":"text-fg-2 hover:bg-elevated"),children:[v===t?c.jsx(Ia,{className:"h-3 w-3 shrink-0"}):m===v?c.jsx(_r,{className:"h-3 w-3 shrink-0 animate-spin"}):c.jsx("span",{className:"h-3 w-3 shrink-0"}),c.jsx("span",{className:"truncate",children:v})]},v)),o.remote.length>0&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"mx-3 my-1 border-t border-line"}),c.jsx("div",{className:"px-3 py-1 text-[10px] font-medium uppercase tracking-wider text-fg-4",children:"Remote"}),o.remote.map(v=>c.jsxs("button",{type:"button",disabled:m!==null,onClick:()=>C(v),className:"flex w-full items-center gap-2 px-3 py-1.5 text-left text-xs text-fg-2 transition-colors hover:bg-elevated",children:[m===v?c.jsx(_r,{className:"h-3 w-3 shrink-0 animate-spin"}):c.jsx("span",{className:"h-3 w-3 shrink-0"}),c.jsx("span",{className:"truncate",children:v})]},`remote-${v}`))]})]}):null,x&&c.jsx("div",{className:"border-t border-line px-3 py-2 text-xs text-red-500",children:x})]})]}):null}function W3(){const e=Na(),t=oa(),a=qe(b=>b.repos),s=qe(b=>b.activeRepoId),l=qe(b=>b.setActiveRepo),o=Um(b=>b.preference),d=Um(b=>b.cycle),f=o==="light"?jA:o==="dark"?EA:bA,h=a.find(b=>b.id===s),m=b=>{var T;if(!b)return;l(b);const x=a.find(N=>N.id===b);if(!x)return;const y=((T=t.pathname.match(/\/(run|issues|pulls)/))==null?void 0:T[1])??"run";e(`/${encodeURIComponent(x.name)}/${y}`)};return c.jsx("header",{className:"shrink-0 border-b border-line bg-surface pt-[var(--safe-top)]",children:c.jsxs("div",{className:"flex h-12 items-center justify-between px-4",children:[c.jsxs("div",{className:"flex items-center gap-2.5",children:[c.jsx(IE,{className:"h-5 w-5 text-blue-500"}),c.jsx("span",{className:"text-sm font-bold tracking-tight text-fg",children:"Fourth Spark"}),c.jsxs("span",{className:"rounded bg-elevated px-1.5 py-0.5 text-[10px] font-medium tabular-nums text-fg-4",children:["v","0.5.0"]})]}),c.jsxs("div",{className:"flex items-center gap-3",children:[a.length>0&&c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("select",{value:s??"",onChange:b=>m(b.target.value),className:"rounded-md border border-line bg-base px-2.5 py-1 text-xs text-fg-2 focus:border-blue-500 focus:outline-none",children:a.map(b=>c.jsx("option",{value:b.id,children:b.name},b.id))}),h&&s&&c.jsx(Z3,{repoId:s,currentBranch:h.branch})]}),c.jsx("a",{href:"https://github.com/kinminghao/fourth-spark",target:"_blank",rel:"noopener noreferrer","aria-label":"GitHub",className:"flex h-8 w-8 items-center justify-center rounded-md text-fg-4 transition-colors hover:bg-elevated hover:text-fg-2",children:c.jsx("svg",{className:"h-4 w-4",viewBox:"0 0 24 24",fill:"currentColor",children:c.jsx("path",{d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"})})}),c.jsx("button",{type:"button",onClick:d,"aria-label":`主题: ${o}`,className:"flex h-8 w-8 items-center justify-center rounded-md text-fg-4 transition-colors hover:bg-elevated hover:text-fg-2",children:c.jsx(f,{className:"h-4 w-4"})})]})]})})}function J3(){const e=qe(Da);return c.jsx("nav",{className:"hidden w-48 shrink-0 flex-col border-r border-line bg-surface py-2 md:flex",children:YE.map(t=>c.jsxs(gh,{to:$E(t.segment,t.global,e),className:({isActive:a})=>me("mx-2 flex items-center gap-2.5 rounded-md px-3 py-2 text-sm transition-colors",a?"bg-blue-500/10 font-medium text-blue-600":"text-fg-3 hover:bg-elevated hover:text-fg"),children:[c.jsx(t.icon,{className:"h-4 w-4 shrink-0"}),t.label]},t.segment))})}function eC(){const e=qe(Da);return c.jsx("nav",{className:"fixed bottom-0 left-0 right-0 z-30 border-t border-line bg-surface pb-[var(--safe-bottom)] md:hidden",children:c.jsx("div",{className:"flex h-14 items-center justify-around",children:YE.map(t=>c.jsx(gh,{to:$E(t.segment,t.global,e),"aria-label":t.label,className:({isActive:a})=>me("flex h-10 w-10 items-center justify-center rounded-md transition-colors",a?"bg-blue-500/10 text-blue-600":"text-fg-3 hover:bg-elevated hover:text-fg"),children:c.jsx(t.icon,{className:"h-5 w-5 shrink-0"})},t.segment))})})}function tC(){return c.jsxs("div",{className:"flex h-full flex-col overflow-hidden bg-base text-fg",children:[c.jsx(W3,{}),c.jsxs("div",{className:"flex min-h-0 flex-1",children:[c.jsx(J3,{}),c.jsx("main",{className:"flex min-w-0 flex-1 flex-col overflow-hidden pb-[calc(3.5rem_+_var(--safe-bottom))] md:pb-0",children:c.jsx(NS,{})})]}),c.jsx(eC,{})]})}function nC({onClose:e}){const[t,a]=A.useState(""),[s,l]=A.useState(""),[o,d]=A.useState(""),[f,h]=A.useState(!1),[m,b]=A.useState(""),x=qe(C=>C.addRepo),y=s.trim()!==""&&o.trim()!==""&&t.trim()!==""&&!f,T=async C=>{const v=C.trim();if(v){h(!0),b("");try{const M=await t3(v);M.name&&!s.trim()&&l(M.name),M.gitUrl&&!o.trim()&&d(M.gitUrl)}catch(M){const k=M instanceof Error?M.message:"无法解析路径";try{const D=JSON.parse(k);b(D.error??k)}catch{b(k)}}h(!1)}},N=A.useRef(T);N.current=T,A.useEffect(()=>{const C=t.trim();if(!C)return;const v=setTimeout(()=>{N.current(C)},500);return()=>clearTimeout(v)},[t]);const S=async()=>{if(!y)return;b(""),await x(s.trim(),o.trim(),t.trim())&&e()};return c.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm",onClick:e,children:c.jsxs("div",{className:"w-full max-w-md rounded-xl border border-line bg-surface p-6 shadow-2xl",onClick:C=>C.stopPropagation(),children:[c.jsxs("div",{className:"mb-5 flex items-center justify-between",children:[c.jsx("h2",{className:"text-base font-semibold text-fg",children:"添加仓库"}),c.jsx("button",{type:"button",onClick:e,className:"rounded-md p-1 text-fg-4 hover:bg-elevated hover:text-fg-2",children:c.jsx(Tt,{className:"h-4 w-4"})})]}),c.jsxs("div",{className:"flex flex-col gap-4",children:[c.jsxs("div",{className:"flex flex-col gap-1.5",children:[c.jsx("label",{htmlFor:"m-path",className:"text-xs font-medium text-fg-3",children:"本地路径"}),c.jsx("input",{id:"m-path",value:t,onChange:C=>a(C.target.value),onBlur:C=>void T(C.target.value),placeholder:"/Users/you/code/repo",autoFocus:!0,className:"w-full rounded-lg border border-line bg-base px-3 py-2 font-mono text-sm text-fg placeholder:text-fg-5 focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-500/20"}),c.jsx("span",{className:"text-[11px] text-fg-5",children:f?"正在读取 Git 信息…":"输入路径后自动读取仓库信息"})]}),c.jsxs("div",{className:"flex flex-col gap-1.5",children:[c.jsx("label",{htmlFor:"m-name",className:"text-xs font-medium text-fg-3",children:"名称"}),c.jsx("input",{id:"m-name",value:s,onChange:C=>l(C.target.value),placeholder:"my-project",className:"w-full rounded-lg border border-line bg-base px-3 py-2 text-sm text-fg placeholder:text-fg-5 focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-500/20"})]}),c.jsxs("div",{className:"flex flex-col gap-1.5",children:[c.jsx("label",{htmlFor:"m-git",className:"text-xs font-medium text-fg-3",children:"Git 远程地址"}),c.jsx("input",{id:"m-git",value:o,onChange:C=>d(C.target.value),placeholder:"https://github.com/org/repo.git",className:"w-full rounded-lg border border-line bg-base px-3 py-2 font-mono text-xs text-fg placeholder:text-fg-5 focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-500/20"})]}),m&&c.jsx("p",{className:"rounded-md bg-red-500/10 px-3 py-2 text-xs text-red-500",children:m}),c.jsxs("div",{className:"mt-1 flex items-center justify-end gap-2",children:[c.jsx("button",{type:"button",onClick:e,className:"rounded-lg border border-line px-4 py-2 text-sm text-fg-3 transition-colors hover:bg-elevated hover:text-fg",children:"取消"}),c.jsx("button",{type:"button",onClick:S,disabled:!y,className:"rounded-lg bg-blue-600 px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-blue-500 disabled:cursor-not-allowed disabled:bg-fg-6 disabled:text-fg-4",children:"添加仓库"})]})]})]})})}function aC({repoId:e,repoName:t,onClose:a}){const[s,l]=A.useState(""),[o,d]=A.useState(""),[f,h]=A.useState(!0),[m,b]=A.useState(!1),[x,y]=A.useState(null);A.useEffect(()=>{H3(e).then(S=>{l(S.content),d(S.content),h(!1)}).catch(S=>{y(S instanceof Error?S.message:String(S)),h(!1)})},[e]);const T=async()=>{b(!0),y(null);try{await F3(e,s),d(s)}catch(S){y(S instanceof Error?S.message:String(S))}b(!1)},N=s!==o;return c.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm",onClick:a,children:c.jsxs("div",{className:"flex w-full max-w-2xl flex-col rounded-xl border border-line bg-surface p-6 shadow-2xl",onClick:S=>S.stopPropagation(),children:[c.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsxs("h2",{className:"text-base font-semibold text-fg",children:[t," — AGENTS.md"]}),c.jsx("p",{className:"mt-0.5 text-xs text-fg-4",children:"仅对此仓库生效,修改后 opencode 热加载即时生效。"})]}),c.jsx("button",{type:"button",onClick:a,className:"shrink-0 rounded-md p-1 text-fg-4 hover:bg-elevated hover:text-fg-2",children:c.jsx(Tt,{className:"h-4 w-4"})})]}),x&&c.jsxs("div",{className:"mb-3 flex items-start gap-2 rounded-lg bg-red-500/10 px-3 py-2 text-xs text-red-400",children:[c.jsx(ia,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),c.jsx("span",{className:"min-w-0 break-words",children:x})]}),f?c.jsxs("div",{className:"flex flex-col items-center gap-2.5 py-16 text-fg-5",children:[c.jsx(_r,{className:"h-5 w-5 fs-spin"}),c.jsx("p",{className:"text-xs",children:"加载中…"})]}):c.jsx("textarea",{value:s,onChange:S=>l(S.target.value),spellCheck:!1,className:"h-96 w-full resize-y rounded-lg border border-line bg-base px-4 py-3 font-mono text-sm leading-relaxed text-fg placeholder:text-fg-6 focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-500/20",placeholder:`# AGENTS.md
|
|
401
|
+
|
|
402
|
+
在此编写该仓库的 Agent 指令…`}),c.jsxs("div",{className:"mt-4 flex items-center justify-end gap-2",children:[c.jsx("button",{type:"button",onClick:a,className:"rounded-lg border border-line px-4 py-2 text-sm text-fg-3 transition-colors hover:bg-elevated hover:text-fg",children:"关闭"}),c.jsxs("button",{type:"button",onClick:()=>void T(),disabled:m||!N,className:"flex items-center gap-1.5 rounded-lg bg-blue-600 px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-blue-500 disabled:opacity-40",children:[c.jsx(Eh,{className:"h-3.5 w-3.5"}),m?"保存中…":"保存"]})]})]})})}function rC(){const e=qe(k=>k.repos),t=qe(k=>k.activeRepoId),a=qe(k=>k.setActiveRepo),s=qe(k=>k.removeRepo),l=qe(k=>k.loadRepos),[o,d]=A.useState(!1),[f,h]=A.useState(null),[m,b]=A.useState(null),[x,y]=A.useState(null),[T,N]=A.useState(null),[S,C]=A.useState(null),v=async(k,D)=>{b(k);try{D?await r3(k):await a3(k),await l()}catch{}b(null)},M=async k=>{y(k),N(null);try{await l3(k),await l()}catch(D){let $="拉取失败";if(D instanceof Us)try{$=JSON.parse(D.message).error??D.message}catch{$=D.message}N($)}y(null)};return c.jsxs("div",{className:"flex-1 overflow-y-auto p-6",children:[c.jsxs("div",{className:"mx-auto max-w-4xl",children:[c.jsxs("div",{className:"mb-6 flex items-center justify-between gap-3",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsx("h1",{className:"text-lg font-semibold text-fg",children:"仓库管理"}),c.jsx("p",{className:"mt-0.5 text-sm text-fg-4",children:"管理代码仓库,每个仓库对应一个独立的 Agent 运行环境"})]}),c.jsxs("button",{type:"button",onClick:()=>d(!0),className:"flex shrink-0 items-center gap-1.5 rounded-lg bg-blue-600 px-3 py-2 text-sm font-medium text-white transition-colors hover:bg-blue-500 md:px-4",children:[c.jsx(Sr,{className:"h-4 w-4"}),c.jsx("span",{className:"hidden md:inline",children:"添加仓库"})]})]}),T&&c.jsxs("div",{className:"mb-4 flex items-center justify-between gap-3 rounded-lg border border-red-500/30 bg-red-500/5 px-4 py-2.5 text-sm text-red-600",children:[c.jsx("span",{children:T}),c.jsx("button",{type:"button",onClick:()=>N(null),className:"shrink-0 rounded p-0.5 transition-colors hover:bg-red-500/10",children:c.jsx(Tt,{className:"h-3.5 w-3.5"})})]}),e.length===0?c.jsxs("div",{className:"flex flex-col items-center gap-3 rounded-xl border border-dashed border-line-hard py-16 text-center",children:[c.jsx("div",{className:"rounded-full bg-elevated p-3",children:c.jsx(Sr,{className:"h-6 w-6 text-fg-4"})}),c.jsx("p",{className:"text-sm font-medium text-fg-3",children:"暂无代码仓库"}),c.jsx("p",{className:"text-xs text-fg-5",children:"添加一个本地仓库开始使用"}),c.jsx("button",{type:"button",onClick:()=>d(!0),className:"mt-2 rounded-lg border border-line px-4 py-2 text-sm text-fg-3 transition-colors hover:bg-elevated hover:text-fg",children:"添加仓库"})]}):c.jsx(c.Fragment,{children:c.jsx("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2",children:e.map(k=>{const D=k.id===t;return c.jsxs("div",{className:me("rounded-xl border p-4 transition-colors",D?"border-blue-500/40 bg-blue-500/5":"border-line"),children:[c.jsxs("div",{className:"flex items-center justify-between gap-2",children:[c.jsxs("button",{type:"button",onClick:()=>a(k.id),className:"flex min-w-0 items-center gap-2 text-left",children:[D?c.jsx(co,{className:"h-4 w-4 shrink-0 text-blue-500"}):c.jsx(Dv,{className:"h-4 w-4 shrink-0 text-fg-5"}),c.jsx("span",{className:me("truncate font-medium",D?"text-fg":"text-fg-2"),children:k.name})]}),c.jsxs("span",{className:me("inline-flex shrink-0 items-center gap-1.5 rounded-full px-2 py-0.5 text-xs font-medium",k.running?"bg-emerald-500/10 text-emerald-600":"bg-fg-6/30 text-fg-4"),children:[c.jsx("span",{className:me("h-1.5 w-1.5 rounded-full",k.running?"bg-emerald-500":"bg-fg-5")}),k.running?"运行中":"已停止"]})]}),c.jsxs("dl",{className:"mt-3 space-y-1 font-mono text-xs text-fg-4",children:[c.jsxs("div",{className:"flex gap-2",children:[c.jsx("dt",{className:"shrink-0 text-fg-5",children:"Git"}),c.jsx("dd",{className:"min-w-0 truncate",children:k.gitUrl})]}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx("dt",{className:"shrink-0 text-fg-5",children:"路径"}),c.jsxs("dd",{className:"flex min-w-0 items-center gap-1.5",children:[c.jsx("span",{className:"truncate",children:k.localPath}),c.jsx("button",{type:"button",onClick:()=>void navigator.clipboard.writeText(k.localPath),title:"复制路径",className:"shrink-0 rounded p-0.5 text-fg-5 transition-colors hover:text-fg-3",children:c.jsx(dc,{className:"h-3 w-3"})})]})]}),k.running&&k.port&&c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("dt",{className:"shrink-0 text-fg-5",children:"直连"}),c.jsxs("dd",{className:"flex min-w-0 items-center gap-1.5",children:[c.jsxs("a",{href:`http://127.0.0.1:${k.port}`,target:"_blank",rel:"noopener noreferrer",className:"truncate text-blue-500 hover:underline",children:["127.0.0.1:",k.port]}),c.jsx("button",{type:"button",onClick:()=>void navigator.clipboard.writeText(`http://127.0.0.1:${k.port}`),title:"复制链接",className:"shrink-0 rounded p-0.5 text-fg-5 transition-colors hover:text-fg-3",children:c.jsx(dc,{className:"h-3 w-3"})})]})]})]}),c.jsxs("div",{className:"mt-3 flex items-center gap-2",children:[c.jsxs("button",{type:"button",onClick:()=>C({id:k.id,name:k.name}),className:"flex h-8 shrink-0 items-center justify-center gap-1.5 rounded-md border border-line px-2.5 text-xs font-medium text-fg-4 transition-colors hover:bg-elevated hover:text-fg-2",children:[c.jsx(AE,{className:"h-3 w-3"}),"配置"]}),c.jsx("button",{type:"button",onClick:()=>void M(k.id),disabled:x===k.id,className:"flex h-8 shrink-0 items-center justify-center gap-1.5 rounded-md border border-blue-500/30 px-2.5 text-xs font-medium text-blue-600 transition-colors hover:bg-blue-500/10 disabled:opacity-50",children:x===k.id?c.jsx("span",{className:"inline-block h-3.5 w-3.5 animate-spin rounded-full border-2 border-current border-t-transparent"}):c.jsxs(c.Fragment,{children:[c.jsx(mv,{className:"h-3 w-3"}),"拉取"]})}),c.jsx("button",{type:"button",onClick:()=>void v(k.id,k.running),disabled:m===k.id,className:me("flex h-8 flex-1 items-center justify-center gap-1.5 rounded-md border text-xs font-medium transition-colors disabled:opacity-50",k.running?"border-amber-500/30 text-amber-600 hover:bg-amber-500/10":"border-emerald-500/30 text-emerald-600 hover:bg-emerald-500/10"),children:m===k.id?c.jsx("span",{className:"inline-block h-3.5 w-3.5 animate-spin rounded-full border-2 border-current border-t-transparent"}):k.running?c.jsxs(c.Fragment,{children:[c.jsx(kE,{className:"h-3 w-3 fill-current"}),"停止"]}):c.jsxs(c.Fragment,{children:[c.jsx(Lc,{className:"h-3 w-3 fill-current"}),"启动"]})}),f===k.id?c.jsxs(c.Fragment,{children:[c.jsx("button",{type:"button",onClick:()=>{s(k.id),h(null)},className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md border border-red-500/30 text-red-500 transition-colors hover:bg-red-500/10",children:c.jsx(Ia,{className:"h-3.5 w-3.5"})}),c.jsx("button",{type:"button",onClick:()=>h(null),className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md border border-line text-fg-4 transition-colors hover:bg-elevated",children:c.jsx(Tt,{className:"h-3.5 w-3.5"})})]}):c.jsx("button",{type:"button",onClick:()=>h(k.id),className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md border border-line text-fg-5 transition-colors hover:bg-red-500/10 hover:text-red-500",children:c.jsx(Li,{className:"h-3.5 w-3.5"})})]})]},k.id)})})}),c.jsxs("p",{className:"mt-3 text-xs text-fg-5",children:[e.length," 个仓库"]})]}),o&&c.jsx(nC,{onClose:()=>d(!1)}),S&&c.jsx(aC,{repoId:S.id,repoName:S.name,onClose:()=>C(null)})]})}const sC=new Set(["tool","tool-use","tool_use","tool-call","tool_call","tool-result","tool_result"]),iC=new Set(["thinking","reasoning","reason"]),lC=new Set(["text","output_text","message"]);function _h(e){var a;const t=((a=e.type)==null?void 0:a.toLowerCase())??"";return sC.has(t)||e.toolName!=null||e.tool!=null?"tool":iC.has(t)?"thinking":lC.has(t)||e.content!=null||e.text!=null?"text":"other"}function pc(e){return e.content??e.text??""}function GE(e){return e.toolName??e.tool??"tool"}function jc(e){var t;return e.input??((t=e.state)==null?void 0:t.input)}function Nh(e){var t;return e.output??((t=e.state)==null?void 0:t.output)}function Sh(e){var a,s,l;const t=(s=(a=e.state)==null?void 0:a.status)==null?void 0:s.toLowerCase();return t==="completed"||t==="done"||t==="success"?"completed":t==="error"||t==="failed"||((l=e.state)==null?void 0:l.error)!=null?"error":t==="pending"||t==="queued"?"pending":t==="running"||t==="in_progress"?"running":Nh(e)!=null?"completed":"running"}function ix(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e,null,2)}catch{return String(e)}}function ji(e){const t=e==null?void 0:e.toLowerCase();return t==="in_progress"||t==="in-progress"||t==="active"?"in_progress":t==="completed"||t==="done"||t==="complete"?"completed":t==="cancelled"||t==="canceled"?"cancelled":"pending"}function oC(e){return e.filter(t=>ji(t.status)==="completed").length}function mo(e){const t=GE(e).toLowerCase();return t==="question"||t==="mcp_question"}function uC(e){const t=jc(e);if(!t||typeof t!="object")return null;const a=t;return Array.isArray(a.questions)?a.questions:null}function gc(e){if(!mo(e))return!1;const t=Sh(e);return t==="pending"||t==="running"}const cC=/\bses_[a-zA-Z0-9]+/;function dC(e){var l;const t=jc(e);if(t&&typeof t=="object"){const o=t;if(typeof o.task_id=="string"&&o.task_id.startsWith("ses_"))return o.task_id}const a=(l=e.state)==null?void 0:l.metadata;if(a){const o=a.session_id??a.sessionId;if(typeof o=="string"&&o.startsWith("ses_"))return o}const s=Nh(e);if(typeof s=="string"){const o=cC.exec(s);if(o)return o[0]}if(s&&typeof s=="object"){const o=s,d=o.session_id??o.sessionId??o.task_id;if(typeof d=="string"&&d.startsWith("ses_"))return d}return null}let fC=0;const Yt=Fs(e=>({toasts:[],addToast:(t,a="info",s,l)=>{const o=(l==null?void 0:l.id)??`toast-${++fC}-${Date.now()}`;e(d=>d.toasts.some(f=>f.id===o)?d:{toasts:[...d.toasts,{id:o,message:t,variant:a,sessionId:s,persistent:l==null?void 0:l.persistent}]}),l!=null&&l.persistent||setTimeout(()=>{e(d=>({toasts:d.toasts.filter(f=>f.id!==o)}))},4e3)},removeToast:t=>{e(a=>({toasts:a.toasts.filter(s=>s.id!==t)}))}}));function KE(e){return`question-${e}`}function lm(e,t){const a=t.find(l=>l.id===e),s=(a==null?void 0:a.title)||e.slice(-8);Yt.getState().addToast(`${s} — 等待回复`,"warning",e,{id:KE(e),persistent:!0})}function mC(e){var t;for(const a of e)if((t=a.parts)!=null&&t.some(s=>mo(s)&&gc(s)))return!0;return!1}const ho=[],bc=[];function lx(e){return e.id??e.callID}function ka(){return qe.getState().activeRepoId}const Ue=Fs((e,t)=>({sessions:[],activeSessionId:null,messages:{},todos:{},sessionStatuses:{},errorReasons:{},sessionLinks:{},allSessionLinks:{},loadingSessions:!1,loadError:null,sendError:null,loadSessions:async()=>{const a=ka();if(!a){e({sessions:[],loadingSessions:!1});return}e({loadingSessions:!0,loadError:null});try{const[s,l]=await Promise.all([o3(a),Zb(a).catch(()=>null)]),o={sessions:s,loadingSessions:!1};l&&(o.allSessionLinks=l),e(o)}catch(s){e({loadingSessions:!1,loadError:s instanceof Error?s.message:"Failed to load sessions"})}},createSession:async(a,s,l,o,d,f)=>{const h=ka();if(!h)return null;e({sendError:null});try{const m=await u3(h,a,s,l,o,d,f);return e(b=>({sessions:[m,...b.sessions.filter(x=>x.id!==m.id)],activeSessionId:m.id,messages:{...b.messages,[m.id]:[]}})),t().setSessionStatus(m.id,"busy"),m}catch(m){return e({sendError:m instanceof Error?m.message:"Failed to create session"}),null}},setActiveSession:async a=>{ka()&&(e({activeSessionId:a,sendError:null}),await t().refreshSessionData(a))},refreshSessionData:async a=>{const s=ka();if(!s)return;const[l,o,d,f,h]=await Promise.allSettled([p3(s,a),g3(s,a),BE(s,a),c3(s,a),Xb(s,a)]);e(m=>{const b={};if(l.status==="fulfilled"&&(b.messages={...m.messages,[a]:l.value}),o.status==="fulfilled"&&(b.todos={...m.todos,[a]:o.value}),d.status==="fulfilled"&&(b.sessionStatuses={...m.sessionStatuses,[a]:d.value.type}),f.status==="fulfilled"){const x=f.value;b.sessions=m.sessions.map(y=>y.id===a?{...y,...x}:y)}return h.status==="fulfilled"&&(b.sessionLinks={...m.sessionLinks,[a]:h.value}),b}),l.status==="fulfilled"&&mC(l.value)&&lm(a,t().sessions)},refreshSessionLinks:async a=>{const s=ka();if(s)try{const[l,o]=await Promise.all([Xb(s,a),Zb(s).catch(()=>null)]);e(d=>{const f={sessionLinks:{...d.sessionLinks,[a]:l}};return o&&(f.allSessionLinks=o),f})}catch{}},addLink:async(a,s,l)=>{const o=ka();if(!o)return!1;try{return await b3(o,a,s,l),await t().refreshSessionLinks(a),!0}catch{return!1}},removeLink:async(a,s,l)=>{const o=ka();if(!o)return!1;try{return await x3(o,a,s,l),await t().refreshSessionLinks(a),!0}catch{return!1}},deleteSession:async a=>{const s=ka();if(s)try{await d3(s,a)}catch{}e(l=>{const{[a]:o,...d}=l.messages,{[a]:f,...h}=l.todos,{[a]:m,...b}=l.sessionStatuses,{[a]:x,...y}=l.errorReasons,{[a]:T,...N}=l.sessionLinks,{[a]:S,...C}=l.allSessionLinks;return{sessions:l.sessions.filter(v=>v.id!==a),messages:d,todos:h,sessionStatuses:b,errorReasons:y,sessionLinks:N,allSessionLinks:C,activeSessionId:l.activeSessionId===a?null:l.activeSessionId}})},sendMessage:async(a,s)=>{const l=ka(),o=t().activeSessionId;if(!l||!o)return;const d=t().sessions.find(f=>f.id===o);e({sendError:null}),t().setSessionStatus(o,"busy");try{await f3(l,o,a,d==null?void 0:d.agent,s)}catch(f){e({sendError:f instanceof Error?f.message:"Failed to send message"}),t().setSessionStatus(o,"idle")}},abortSession:async()=>{const a=ka(),s=t().activeSessionId;if(!(!a||!s)){try{await m3(a,s)}catch{}t().setSessionStatus(s,"idle")}},clearSessions:()=>{e({sessions:[],activeSessionId:null,messages:{},todos:{},sessionStatuses:{},errorReasons:{},sessionLinks:{},allSessionLinks:{},loadError:null,sendError:null})},updateMessage:(a,s)=>{var l;e(o=>{const d=o.messages[a]??[],f=d.findIndex(m=>m.id===s.id);let h;if(f>=0){const m={...d[f],...s};(!s.parts||s.parts.length===0)&&d[f].parts&&(m.parts=d[f].parts),h=[...d],h[f]=m}else h=[...d,s];return{messages:{...o.messages,[a]:h}}}),(l=s.parts)!=null&&l.some(o=>mo(o)&&gc(o))&&lm(a,t().sessions)},updateMessagePart:(a,s,l)=>{e(o=>{const d=o.messages[a]??[],f=d.findIndex(N=>N.id===s),h=f>=0?d[f]:{id:s,role:"assistant"},m=h.parts?[...h.parts]:[],b=lx(l),x=b!=null?m.findIndex(N=>lx(N)===b):-1;x>=0?m[x]={...m[x],...l}:m.push(l);const y={...h,parts:m},T=f>=0?[...d]:[...d,y];return f>=0&&(T[f]=y),{messages:{...o.messages,[a]:T}}}),mo(l)&&gc(l)&&lm(a,t().sessions)},appendMessagePartDelta:(a,s,l,o)=>{e(d=>{const f=d.messages[a]??[],h=f.findIndex(N=>N.id===s),m=h>=0?f[h]:{id:s,role:"assistant"},b=m.parts?[...m.parts]:[],x=b.findIndex(N=>N.id===l);if(x>=0){const N=b[x],S=pc(N)+o;b[x]=N.content!=null?{...N,content:S}:{...N,text:S}}else b.push({id:l,type:"text",text:o});const y={...m,parts:b},T=h>=0?[...f]:[...f,y];return h>=0&&(T[h]=y),{messages:{...d.messages,[a]:T}}})},updateTodos:(a,s)=>{e(l=>({todos:{...l.todos,[a]:s}}))},updateSessionInfo:a=>{e(s=>s.sessions.some(o=>o.id===a.id)?{sessions:s.sessions.map(o=>o.id===a.id?{...o,...a}:o)}:{sessions:[a,...s.sessions]})},setSessionStatus:(a,s,l)=>{const o=t().sessionStatuses[a];if(o!==s){const d=t().sessions.find(h=>h.id===a),f=(d==null?void 0:d.title)||a.slice(-8);if(s==="idle"&&o!==void 0&&o!=="idle")Yt.getState().removeToast(KE(a)),Yt.getState().addToast(`${f} — 完成`,"success",a);else if(s==="busy"&&(o===void 0||o==="idle"))Yt.getState().addToast(`${f} — 开始运行`,"info",a);else if(s==="retry")Yt.getState().addToast(`${f} — 进入重试`,"warning",a);else if(s==="error"){const h=l?`${f} — 错误: ${l}`:`${f} — 发生错误`;Yt.getState().addToast(h,"error",a)}}e(d=>{const f=l?{...d.errorReasons,[a]:l}:s!=="error"?(()=>{const{[a]:h,...m}=d.errorReasons;return m})():d.errorReasons;return{sessionStatuses:{...d.sessionStatuses,[a]:s},errorReasons:f}})},bulkSetStatuses:a=>{e({sessionStatuses:{...t().sessionStatuses,...a}})},renameSession:async(a,s)=>{const l=ka();if(l){e(o=>({sessions:o.sessions.map(d=>d.id===a?{...d,title:s}:d)}));try{await B3(l,a,s)}catch{await t().loadSessions()}}}})),Pe=Fs((e,t)=>({issues:[],tags:[],tagFilterMode:new Map,milestones:[],selectedMilestoneId:null,loaded:!1,syncing:!1,selectedIssueId:null,previewIssueId:null,matchingParentId:null,matchingCandidateId:null,pendingDraft:null,clearIssues:()=>e({issues:[],tags:[],tagFilterMode:new Map,milestones:[],selectedMilestoneId:null,loaded:!1,selectedIssueId:null,previewIssueId:null,matchingParentId:null,matchingCandidateId:null,pendingDraft:null}),setSelectedIssue:a=>e({selectedIssueId:a}),setPreviewIssue:a=>e({previewIssueId:a}),setPendingDraft:a=>e({pendingDraft:a}),enterMatchMode:a=>e({matchingParentId:a,matchingCandidateId:null,previewIssueId:null}),exitMatchMode:()=>{const a=t().matchingParentId;e({matchingParentId:null,matchingCandidateId:null,previewIssueId:a})},setMatchCandidate:a=>e({matchingCandidateId:a}),linkChild:async(a,s)=>{var o;const l=qe.getState().activeRepoId;if(!l)return!1;try{await w3(l,a,s);const d=(o=t().issues.find(f=>f.number===a))==null?void 0:o.id;return d&&e(f=>({issues:f.issues.map(h=>h.number===s?{...h,parentId:d}:h),matchingCandidateId:null})),!0}catch{return!1}},updateIssueState:async(a,s)=>{const l=qe.getState().activeRepoId;if(!l)return!1;try{const o=await zE(l,a,{state:s});return e(d=>({issues:d.issues.map(f=>f.number===a?{...f,state:o.state}:f)})),!0}catch{return!1}},loadIssues:async()=>{const a=qe.getState().activeRepoId;if(!a){e({issues:[],loaded:!0});return}try{const s=await tx(a,"all");e({issues:s,loaded:!0})}catch{e({loaded:!0})}},syncIssues:async()=>{const a=qe.getState().activeRepoId;if(a){e({syncing:!0});try{await A3(a);const[s,l,o]=await Promise.all([tx(a,"all"),Jb(a),ex(a)]);e({issues:s,tags:l,milestones:o,syncing:!1})}catch(s){e({syncing:!1});let l="同步 Issue 失败";if(s instanceof Us)try{const o=JSON.parse(s.message);o.error&&(l=o.error)}catch{s.message&&(l=s.message)}Yt.getState().addToast(l,"error")}}},createIssue:async(a,s)=>{const l=qe.getState().activeRepoId;if(!l)return null;try{const o=await C3(l,a,s);return e(d=>({issues:[o,...d.issues]})),o}catch{return null}},loadTags:async()=>{const a=qe.getState().activeRepoId;if(!a){e({tags:[]});return}try{const s=await Jb(a);e({tags:s})}catch{}},cycleTagFilter:a=>{e(s=>{const l=new Map(s.tagFilterMode),o=l.get(a);return o?o==="include"?l.set(a,"exclude"):l.delete(a):l.set(a,"include"),{tagFilterMode:l}})},clearTagFilter:()=>e({tagFilterMode:new Map}),loadMilestones:async()=>{const a=qe.getState().activeRepoId;if(!a){e({milestones:[]});return}try{const s=await ex(a);e({milestones:s})}catch{}},setMilestoneFilter:a=>e({selectedMilestoneId:a})}));function ox(e){const t=[],a=String(e||"");let s=a.indexOf(","),l=0,o=!1;for(;!o;){s===-1&&(s=a.length,o=!0);const d=a.slice(l,s).trim();(d||!o)&&t.push(d),l=s+1,s=a.indexOf(",",l)}return t}function VE(e,t){const a={};return(e[e.length-1]===""?[...e,""]:e).join((a.padRight?" ":"")+","+(a.padLeft===!1?"":" ")).trim()}const hC=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,pC=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,gC={};function ux(e,t){return(gC.jsx?pC:hC).test(e)}const bC=/[ \t\n\f\r]/g;function xC(e){return typeof e=="object"?e.type==="text"?cx(e.value):!1:cx(e)}function cx(e){return e.replace(bC,"")===""}class To{constructor(t,a,s){this.normal=a,this.property=t,s&&(this.space=s)}}To.prototype.normal={};To.prototype.property={};To.prototype.space=void 0;function QE(e,t){const a={},s={};for(const l of e)Object.assign(a,l.property),Object.assign(s,l.normal);return new To(a,s,t)}function po(e){return e.toLowerCase()}class Kn{constructor(t,a){this.attribute=a,this.property=t}}Kn.prototype.attribute="";Kn.prototype.booleanish=!1;Kn.prototype.boolean=!1;Kn.prototype.commaOrSpaceSeparated=!1;Kn.prototype.commaSeparated=!1;Kn.prototype.defined=!1;Kn.prototype.mustUseProperty=!1;Kn.prototype.number=!1;Kn.prototype.overloadedBoolean=!1;Kn.prototype.property="";Kn.prototype.spaceSeparated=!1;Kn.prototype.space=void 0;let EC=0;const Ke=zs(),sn=zs(),Fm=zs(),ye=zs(),kt=zs(),js=zs(),ra=zs();function zs(){return 2**++EC}const zm=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ke,booleanish:sn,commaOrSpaceSeparated:ra,commaSeparated:js,number:ye,overloadedBoolean:Fm,spaceSeparated:kt},Symbol.toStringTag,{value:"Module"})),om=Object.keys(zm);class vh extends Kn{constructor(t,a,s,l){let o=-1;if(super(t,a),dx(this,"space",l),typeof s=="number")for(;++o<om.length;){const d=om[o];dx(this,om[o],(s&zm[d])===zm[d])}}}vh.prototype.defined=!0;function dx(e,t,a){a&&(e[t]=a)}function Yi(e){const t={},a={};for(const[s,l]of Object.entries(e.properties)){const o=new vh(s,e.transform(e.attributes||{},s),l,e.space);e.mustUseProperty&&e.mustUseProperty.includes(s)&&(o.mustUseProperty=!0),t[s]=o,a[po(s)]=s,a[po(o.attribute)]=s}return new To(t,a,e.space)}const XE=Yi({properties:{ariaActiveDescendant:null,ariaAtomic:sn,ariaAutoComplete:null,ariaBusy:sn,ariaChecked:sn,ariaColCount:ye,ariaColIndex:ye,ariaColSpan:ye,ariaControls:kt,ariaCurrent:null,ariaDescribedBy:kt,ariaDetails:null,ariaDisabled:sn,ariaDropEffect:kt,ariaErrorMessage:null,ariaExpanded:sn,ariaFlowTo:kt,ariaGrabbed:sn,ariaHasPopup:null,ariaHidden:sn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:kt,ariaLevel:ye,ariaLive:null,ariaModal:sn,ariaMultiLine:sn,ariaMultiSelectable:sn,ariaOrientation:null,ariaOwns:kt,ariaPlaceholder:null,ariaPosInSet:ye,ariaPressed:sn,ariaReadOnly:sn,ariaRelevant:null,ariaRequired:sn,ariaRoleDescription:kt,ariaRowCount:ye,ariaRowIndex:ye,ariaRowSpan:ye,ariaSelected:sn,ariaSetSize:ye,ariaSort:null,ariaValueMax:ye,ariaValueMin:ye,ariaValueNow:ye,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function ZE(e,t){return t in e?e[t]:t}function WE(e,t){return ZE(e,t.toLowerCase())}const yC=Yi({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:js,acceptCharset:kt,accessKey:kt,action:null,allow:null,allowFullScreen:Ke,allowPaymentRequest:Ke,allowUserMedia:Ke,alpha:Ke,alt:null,as:null,async:Ke,autoCapitalize:null,autoComplete:kt,autoFocus:Ke,autoPlay:Ke,blocking:kt,capture:null,charSet:null,checked:Ke,cite:null,className:kt,closedBy:null,colorSpace:null,cols:ye,colSpan:ye,command:null,commandFor:null,content:null,contentEditable:sn,controls:Ke,controlsList:kt,coords:ye|js,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ke,defer:Ke,dir:null,dirName:null,disabled:Ke,download:Fm,draggable:sn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ke,formTarget:null,headers:kt,height:ye,hidden:Fm,high:ye,href:null,hrefLang:null,htmlFor:kt,httpEquiv:kt,id:null,imageSizes:null,imageSrcSet:null,inert:Ke,inputMode:null,integrity:null,is:null,isMap:Ke,itemId:null,itemProp:kt,itemRef:kt,itemScope:Ke,itemType:kt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ke,low:ye,manifest:null,max:null,maxLength:ye,media:null,method:null,min:null,minLength:ye,multiple:Ke,muted:Ke,name:null,nonce:null,noModule:Ke,noValidate:Ke,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:Ke,optimum:ye,pattern:null,ping:kt,placeholder:null,playsInline:Ke,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ke,referrerPolicy:null,rel:kt,required:Ke,reversed:Ke,rows:ye,rowSpan:ye,sandbox:kt,scope:null,scoped:Ke,seamless:Ke,selected:Ke,shadowRootClonable:Ke,shadowRootCustomElementRegistry:Ke,shadowRootDelegatesFocus:Ke,shadowRootMode:null,shadowRootSerializable:Ke,shape:null,size:ye,sizes:null,slot:null,span:ye,spellCheck:sn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ye,step:null,style:null,tabIndex:ye,target:null,title:null,translate:null,type:null,typeMustMatch:Ke,useMap:null,value:sn,width:ye,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:kt,axis:null,background:null,bgColor:null,border:ye,borderColor:null,bottomMargin:ye,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ke,declare:Ke,event:null,face:null,frame:null,frameBorder:null,hSpace:ye,leftMargin:ye,link:null,longDesc:null,lowSrc:null,marginHeight:ye,marginWidth:ye,noResize:Ke,noHref:Ke,noShade:Ke,noWrap:Ke,object:null,profile:null,prompt:null,rev:null,rightMargin:ye,rules:null,scheme:null,scrolling:sn,standby:null,summary:null,text:null,topMargin:ye,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ye,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Ke,disablePictureInPicture:Ke,disableRemotePlayback:Ke,exportParts:js,part:kt,prefix:null,property:null,results:ye,security:null,unselectable:null},space:"html",transform:WE}),TC=Yi({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:ra,accentHeight:ye,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ye,amplitude:ye,arabicForm:null,ascent:ye,attributeName:null,attributeType:null,azimuth:ye,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ye,by:null,calcMode:null,capHeight:ye,className:kt,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:ye,diffuseConstant:ye,direction:null,display:null,dur:null,divisor:ye,dominantBaseline:null,download:Ke,dx:null,dy:null,edgeMode:null,editable:null,elevation:ye,enableBackground:null,end:null,event:null,exponent:ye,externalResourcesRequired:null,fill:null,fillOpacity:ye,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:js,g2:js,glyphName:js,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ye,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ye,horizOriginX:ye,horizOriginY:ye,id:null,ideographic:ye,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ye,k:ye,k1:ye,k2:ye,k3:ye,k4:ye,kernelMatrix:ra,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ye,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:ye,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:ye,overlineThickness:ye,paintOrder:null,panose1:null,path:null,pathLength:ye,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:kt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ye,pointsAtY:ye,pointsAtZ:ye,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ra,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ra,rev:ra,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ra,requiredFeatures:ra,requiredFonts:ra,requiredFormats:ra,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:ye,specularExponent:ye,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ye,strikethroughThickness:ye,string:null,stroke:null,strokeDashArray:ra,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ye,strokeOpacity:ye,strokeWidth:null,style:null,surfaceScale:ye,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ra,tabIndex:ye,tableValues:null,target:null,targetX:ye,targetY:ye,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ra,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ye,underlineThickness:ye,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ye,values:null,vAlphabetic:ye,vMathematical:ye,vectorEffect:null,vHanging:ye,vIdeographic:ye,version:null,vertAdvY:ye,vertOriginX:ye,vertOriginY:ye,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ye,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:ZE}),JE=Yi({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),ey=Yi({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:WE}),ty=Yi({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),_C={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"},NC=/[A-Z]/g,fx=/-[a-z]/g,SC=/^data[-\w.:]+$/i;function Bc(e,t){const a=po(t);let s=t,l=Kn;if(a in e.normal)return e.property[e.normal[a]];if(a.length>4&&a.slice(0,4)==="data"&&SC.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(fx,AC);s="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!fx.test(o)){let d=o.replace(NC,vC);d.charAt(0)!=="-"&&(d="-"+d),t="data"+d}}l=vh}return new l(s,t)}function vC(e){return"-"+e.toLowerCase()}function AC(e){return e.charAt(1).toUpperCase()}const _o=QE([XE,yC,JE,ey,ty],"html"),us=QE([XE,TC,JE,ey,ty],"svg");function mx(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function ny(e){return e.join(" ").trim()}var ki={},um,hx;function CC(){if(hx)return um;hx=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,a=/^\s*/,s=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,l=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,d=/^[;\s]*/,f=/^\s+|\s+$/g,h=`
|
|
403
|
+
`,m="/",b="*",x="",y="comment",T="declaration";function N(C,v){if(typeof C!="string")throw new TypeError("First argument must be a string");if(!C)return[];v=v||{};var M=1,k=1;function D(Z){var J=Z.match(t);J&&(M+=J.length);var V=Z.lastIndexOf(h);k=~V?Z.length-V:k+Z.length}function $(){var Z={line:M,column:k};return function(J){return J.position=new L(Z),fe(),J}}function L(Z){this.start=Z,this.end={line:M,column:k},this.source=v.source}L.prototype.content=C;function Y(Z){var J=new Error(v.source+":"+M+":"+k+": "+Z);if(J.reason=Z,J.filename=v.source,J.line=M,J.column=k,J.source=C,!v.silent)throw J}function re(Z){var J=Z.exec(C);if(J){var V=J[0];return D(V),C=C.slice(V.length),J}}function fe(){re(a)}function U(Z){var J;for(Z=Z||[];J=H();)J!==!1&&Z.push(J);return Z}function H(){var Z=$();if(!(m!=C.charAt(0)||b!=C.charAt(1))){for(var J=2;x!=C.charAt(J)&&(b!=C.charAt(J)||m!=C.charAt(J+1));)++J;if(J+=2,x===C.charAt(J-1))return Y("End of comment missing");var V=C.slice(2,J-2);return k+=2,D(V),C=C.slice(J),k+=2,Z({type:y,comment:V})}}function ae(){var Z=$(),J=re(s);if(J){if(H(),!re(l))return Y("property missing ':'");var V=re(o),G=Z({type:T,property:S(J[0].replace(e,x)),value:V?S(V[0].replace(e,x)):x});return re(d),G}}function se(){var Z=[];U(Z);for(var J;J=ae();)J!==!1&&(Z.push(J),U(Z));return Z}return fe(),se()}function S(C){return C?C.replace(f,x):x}return um=N,um}var px;function wC(){if(px)return ki;px=1;var e=ki&&ki.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(ki,"__esModule",{value:!0}),ki.default=a;const t=e(CC());function a(s,l){let o=null;if(!s||typeof s!="string")return o;const d=(0,t.default)(s),f=typeof l=="function";return d.forEach(h=>{if(h.type!=="declaration")return;const{property:m,value:b}=h;f?l(m,b,h):b&&(o=o||{},o[m]=b)}),o}return ki}var $l={},gx;function kC(){if(gx)return $l;gx=1,Object.defineProperty($l,"__esModule",{value:!0}),$l.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,a=/^[^-]+$/,s=/^-(webkit|moz|ms|o|khtml)-/,l=/^-(ms)-/,o=function(m){return!m||a.test(m)||e.test(m)},d=function(m,b){return b.toUpperCase()},f=function(m,b){return"".concat(b,"-")},h=function(m,b){return b===void 0&&(b={}),o(m)?m:(m=m.toLowerCase(),b.reactCompat?m=m.replace(l,f):m=m.replace(s,f),m.replace(t,d))};return $l.camelCase=h,$l}var Gl,bx;function RC(){if(bx)return Gl;bx=1;var e=Gl&&Gl.__importDefault||function(l){return l&&l.__esModule?l:{default:l}},t=e(wC()),a=kC();function s(l,o){var d={};return!l||typeof l!="string"||(0,t.default)(l,function(f,h){f&&h&&(d[(0,a.camelCase)(f,o)]=h)}),d}return s.default=s,Gl=s,Gl}var OC=RC();const IC=Cc(OC),Pc=ay("end"),Qa=ay("start");function ay(e){return t;function t(a){const s=a&&a.position&&a.position[e]||{};if(typeof s.line=="number"&&s.line>0&&typeof s.column=="number"&&s.column>0)return{line:s.line,column:s.column,offset:typeof s.offset=="number"&&s.offset>-1?s.offset:void 0}}}function MC(e){const t=Qa(e),a=Pc(e);if(t&&a)return{start:t,end:a}}function eo(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?xx(e.position):"start"in e||"end"in e?xx(e):"line"in e||"column"in e?qm(e):""}function qm(e){return Ex(e&&e.line)+":"+Ex(e&&e.column)}function xx(e){return qm(e&&e.start)+"-"+qm(e&&e.end)}function Ex(e){return e&&typeof e=="number"?e:1}class vn extends Error{constructor(t,a,s){super(),typeof a=="string"&&(s=a,a=void 0);let l="",o={},d=!1;if(a&&("line"in a&&"column"in a?o={place:a}:"start"in a&&"end"in a?o={place:a}:"type"in a?o={ancestors:[a],place:a.position}:o={...a}),typeof t=="string"?l=t:!o.cause&&t&&(d=!0,l=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof s=="string"){const h=s.indexOf(":");h===-1?o.ruleId=s:(o.source=s.slice(0,h),o.ruleId=s.slice(h+1))}if(!o.place&&o.ancestors&&o.ancestors){const h=o.ancestors[o.ancestors.length-1];h&&(o.place=h.position)}const f=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=f?f.column:void 0,this.fatal=void 0,this.file="",this.message=l,this.line=f?f.line:void 0,this.name=eo(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=d&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}vn.prototype.file="";vn.prototype.name="";vn.prototype.reason="";vn.prototype.message="";vn.prototype.stack="";vn.prototype.column=void 0;vn.prototype.line=void 0;vn.prototype.ancestors=void 0;vn.prototype.cause=void 0;vn.prototype.fatal=void 0;vn.prototype.place=void 0;vn.prototype.ruleId=void 0;vn.prototype.source=void 0;const Ah={}.hasOwnProperty,DC=new Map,LC=/[A-Z]/g,jC=new Set(["table","tbody","thead","tfoot","tr"]),BC=new Set(["td","th"]),ry="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function PC(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const a=t.filePath||void 0;let s;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");s=GC(a,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");s=$C(a,t.jsx,t.jsxs)}const l={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:s,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:a,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?us:_o,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=sy(l,e,void 0);return o&&typeof o!="string"?o:l.create(e,l.Fragment,{children:o||void 0},void 0)}function sy(e,t,a){if(t.type==="element")return UC(e,t,a);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return HC(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return zC(e,t,a);if(t.type==="mdxjsEsm")return FC(e,t);if(t.type==="root")return qC(e,t,a);if(t.type==="text")return YC(e,t)}function UC(e,t,a){const s=e.schema;let l=s;t.tagName.toLowerCase()==="svg"&&s.space==="html"&&(l=us,e.schema=l),e.ancestors.push(t);const o=ly(e,t.tagName,!1),d=KC(e,t);let f=wh(e,t);return jC.has(t.tagName)&&(f=f.filter(function(h){return typeof h=="string"?!xC(h):!0})),iy(e,d,o,t),Ch(d,f),e.ancestors.pop(),e.schema=s,e.create(t,o,d,a)}function HC(e,t){if(t.data&&t.data.estree&&e.evaluater){const s=t.data.estree.body[0];return s.type,e.evaluater.evaluateExpression(s.expression)}go(e,t.position)}function FC(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);go(e,t.position)}function zC(e,t,a){const s=e.schema;let l=s;t.name==="svg"&&s.space==="html"&&(l=us,e.schema=l),e.ancestors.push(t);const o=t.name===null?e.Fragment:ly(e,t.name,!0),d=VC(e,t),f=wh(e,t);return iy(e,d,o,t),Ch(d,f),e.ancestors.pop(),e.schema=s,e.create(t,o,d,a)}function qC(e,t,a){const s={};return Ch(s,wh(e,t)),e.create(t,e.Fragment,s,a)}function YC(e,t){return t.value}function iy(e,t,a,s){typeof a!="string"&&a!==e.Fragment&&e.passNode&&(t.node=s)}function Ch(e,t){if(t.length>0){const a=t.length>1?t:t[0];a&&(e.children=a)}}function $C(e,t,a){return s;function s(l,o,d,f){const m=Array.isArray(d.children)?a:t;return f?m(o,d,f):m(o,d)}}function GC(e,t){return a;function a(s,l,o,d){const f=Array.isArray(o.children),h=Qa(s);return t(l,o,d,f,{columnNumber:h?h.column-1:void 0,fileName:e,lineNumber:h?h.line:void 0},void 0)}}function KC(e,t){const a={};let s,l;for(l in t.properties)if(l!=="children"&&Ah.call(t.properties,l)){const o=QC(e,l,t.properties[l]);if(o){const[d,f]=o;e.tableCellAlignToStyle&&d==="align"&&typeof f=="string"&&BC.has(t.tagName)?s=f:a[d]=f}}if(s){const o=a.style||(a.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=s}return a}function VC(e,t){const a={};for(const s of t.attributes)if(s.type==="mdxJsxExpressionAttribute")if(s.data&&s.data.estree&&e.evaluater){const o=s.data.estree.body[0];o.type;const d=o.expression;d.type;const f=d.properties[0];f.type,Object.assign(a,e.evaluater.evaluateExpression(f.argument))}else go(e,t.position);else{const l=s.name;let o;if(s.value&&typeof s.value=="object")if(s.value.data&&s.value.data.estree&&e.evaluater){const f=s.value.data.estree.body[0];f.type,o=e.evaluater.evaluateExpression(f.expression)}else go(e,t.position);else o=s.value===null?!0:s.value;a[l]=o}return a}function wh(e,t){const a=[];let s=-1;const l=e.passKeys?new Map:DC;for(;++s<t.children.length;){const o=t.children[s];let d;if(e.passKeys){const h=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(h){const m=l.get(h)||0;d=h+"-"+m,l.set(h,m+1)}}const f=sy(e,o,d);f!==void 0&&a.push(f)}return a}function QC(e,t,a){const s=Bc(e.schema,t);if(!(a==null||typeof a=="number"&&Number.isNaN(a))){if(Array.isArray(a)&&(a=s.commaSeparated?VE(a):ny(a)),s.property==="style"){let l=typeof a=="object"?a:XC(e,String(a));return e.stylePropertyNameCase==="css"&&(l=ZC(l)),["style",l]}return[e.elementAttributeNameCase==="react"&&s.space?_C[s.property]||s.property:s.attribute,a]}}function XC(e,t){try{return IC(t,{reactCompat:!0})}catch(a){if(e.ignoreInvalidStyle)return{};const s=a,l=new vn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:s,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw l.file=e.filePath||void 0,l.url=ry+"#cannot-parse-style-attribute",l}}function ly(e,t,a){let s;if(!a)s={type:"Literal",value:t};else if(t.includes(".")){const l=t.split(".");let o=-1,d;for(;++o<l.length;){const f=ux(l[o])?{type:"Identifier",name:l[o]}:{type:"Literal",value:l[o]};d=d?{type:"MemberExpression",object:d,property:f,computed:!!(o&&f.type==="Literal"),optional:!1}:f}s=d}else s=ux(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(s.type==="Literal"){const l=s.value;return Ah.call(e.components,l)?e.components[l]:l}if(e.evaluater)return e.evaluater.evaluateExpression(s);go(e)}function go(e,t){const a=new vn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=ry+"#cannot-handle-mdx-estrees-without-createevaluater",a}function ZC(e){const t={};let a;for(a in e)Ah.call(e,a)&&(t[WC(a)]=e[a]);return t}function WC(e){let t=e.replace(LC,JC);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function JC(e){return"-"+e.toLowerCase()}const cm={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"]},ew={};function kh(e,t){const a=ew,s=typeof a.includeImageAlt=="boolean"?a.includeImageAlt:!0,l=typeof a.includeHtml=="boolean"?a.includeHtml:!0;return oy(e,s,l)}function oy(e,t,a){if(tw(e)){if("value"in e)return e.type==="html"&&!a?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return yx(e.children,t,a)}return Array.isArray(e)?yx(e,t,a):""}function yx(e,t,a){const s=[];let l=-1;for(;++l<e.length;)s[l]=oy(e[l],t,a);return s.join("")}function tw(e){return!!(e&&typeof e=="object")}const Tx=document.createElement("i");function Rh(e){const t="&"+e+";";Tx.innerHTML=t;const a=Tx.textContent;return a.charCodeAt(a.length-1)===59&&e!=="semi"||a===t?!1:a}function sa(e,t,a,s){const l=e.length;let o=0,d;if(t<0?t=-t>l?0:l+t:t=t>l?l:t,a=a>0?a:0,s.length<1e4)d=Array.from(s),d.unshift(t,a),e.splice(...d);else for(a&&e.splice(t,a);o<s.length;)d=s.slice(o,o+1e4),d.unshift(t,0),e.splice(...d),o+=1e4,t+=1e4}function ya(e,t){return e.length>0?(sa(e,e.length,0,t),e):t}const _x={}.hasOwnProperty;function uy(e){const t={};let a=-1;for(;++a<e.length;)nw(t,e[a]);return t}function nw(e,t){let a;for(a in t){const l=(_x.call(e,a)?e[a]:void 0)||(e[a]={}),o=t[a];let d;if(o)for(d in o){_x.call(l,d)||(l[d]=[]);const f=o[d];aw(l[d],Array.isArray(f)?f:f?[f]:[])}}}function aw(e,t){let a=-1;const s=[];for(;++a<t.length;)(t[a].add==="after"?e:s).push(t[a]);sa(e,0,0,s)}function cy(e,t){const a=Number.parseInt(e,t);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 Oa(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const In=cs(/[A-Za-z]/),Sn=cs(/[\dA-Za-z]/),rw=cs(/[#-'*+\--9=?A-Z^-~]/);function xc(e){return e!==null&&(e<32||e===127)}const Ym=cs(/\d/),sw=cs(/[\dA-Fa-f]/),iw=cs(/[!-/:-@[-`{-~]/);function He(e){return e!==null&&e<-2}function Rt(e){return e!==null&&(e<0||e===32)}function rt(e){return e===-2||e===-1||e===32}const Uc=cs(new RegExp("\\p{P}|\\p{S}","u")),Hs=cs(/\s/);function cs(e){return t;function t(a){return a!==null&&a>-1&&e.test(String.fromCharCode(a))}}function $i(e){const t=[];let a=-1,s=0,l=0;for(;++a<e.length;){const o=e.charCodeAt(a);let d="";if(o===37&&Sn(e.charCodeAt(a+1))&&Sn(e.charCodeAt(a+2)))l=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(d=String.fromCharCode(o));else if(o>55295&&o<57344){const f=e.charCodeAt(a+1);o<56320&&f>56319&&f<57344?(d=String.fromCharCode(o,f),l=1):d="�"}else d=String.fromCharCode(o);d&&(t.push(e.slice(s,a),encodeURIComponent(d)),s=a+l+1,d=""),l&&(a+=l,l=0)}return t.join("")+e.slice(s)}function ct(e,t,a,s){const l=s?s-1:Number.POSITIVE_INFINITY;let o=0;return d;function d(h){return rt(h)?(e.enter(a),f(h)):t(h)}function f(h){return rt(h)&&o++<l?(e.consume(h),f):(e.exit(a),t(h))}}const lw={tokenize:ow};function ow(e){const t=e.attempt(this.parser.constructs.contentInitial,s,l);let a;return t;function s(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),ct(e,t,"linePrefix")}function l(f){return e.enter("paragraph"),o(f)}function o(f){const h=e.enter("chunkText",{contentType:"text",previous:a});return a&&(a.next=h),a=h,d(f)}function d(f){if(f===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(f);return}return He(f)?(e.consume(f),e.exit("chunkText"),o):(e.consume(f),d)}}const uw={tokenize:cw},Nx={tokenize:dw};function cw(e){const t=this,a=[];let s=0,l,o,d;return f;function f(k){if(s<a.length){const D=a[s];return t.containerState=D[1],e.attempt(D[0].continuation,h,m)(k)}return m(k)}function h(k){if(s++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,l&&M();const D=t.events.length;let $=D,L;for(;$--;)if(t.events[$][0]==="exit"&&t.events[$][1].type==="chunkFlow"){L=t.events[$][1].end;break}v(s);let Y=D;for(;Y<t.events.length;)t.events[Y][1].end={...L},Y++;return sa(t.events,$+1,0,t.events.slice(D)),t.events.length=Y,m(k)}return f(k)}function m(k){if(s===a.length){if(!l)return y(k);if(l.currentConstruct&&l.currentConstruct.concrete)return N(k);t.interrupt=!!(l.currentConstruct&&!l._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Nx,b,x)(k)}function b(k){return l&&M(),v(s),y(k)}function x(k){return t.parser.lazy[t.now().line]=s!==a.length,d=t.now().offset,N(k)}function y(k){return t.containerState={},e.attempt(Nx,T,N)(k)}function T(k){return s++,a.push([t.currentConstruct,t.containerState]),y(k)}function N(k){if(k===null){l&&M(),v(0),e.consume(k);return}return l=l||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:l,contentType:"flow",previous:o}),S(k)}function S(k){if(k===null){C(e.exit("chunkFlow"),!0),v(0),e.consume(k);return}return He(k)?(e.consume(k),C(e.exit("chunkFlow")),s=0,t.interrupt=void 0,f):(e.consume(k),S)}function C(k,D){const $=t.sliceStream(k);if(D&&$.push(null),k.previous=o,o&&(o.next=k),o=k,l.defineSkip(k.start),l.write($),t.parser.lazy[k.start.line]){let L=l.events.length;for(;L--;)if(l.events[L][1].start.offset<d&&(!l.events[L][1].end||l.events[L][1].end.offset>d))return;const Y=t.events.length;let re=Y,fe,U;for(;re--;)if(t.events[re][0]==="exit"&&t.events[re][1].type==="chunkFlow"){if(fe){U=t.events[re][1].end;break}fe=!0}for(v(s),L=Y;L<t.events.length;)t.events[L][1].end={...U},L++;sa(t.events,re+1,0,t.events.slice(Y)),t.events.length=L}}function v(k){let D=a.length;for(;D-- >k;){const $=a[D];t.containerState=$[1],$[0].exit.call(t,e)}a.length=k}function M(){l.write([null]),o=void 0,l=void 0,t.containerState._closeFlow=void 0}}function dw(e,t,a){return ct(e,e.attempt(this.parser.constructs.document,t,a),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Bi(e){if(e===null||Rt(e)||Hs(e))return 1;if(Uc(e))return 2}function Hc(e,t,a){const s=[];let l=-1;for(;++l<e.length;){const o=e[l].resolveAll;o&&!s.includes(o)&&(t=o(t,a),s.push(o))}return t}const $m={name:"attention",resolveAll:fw,tokenize:mw};function fw(e,t){let a=-1,s,l,o,d,f,h,m,b;for(;++a<e.length;)if(e[a][0]==="enter"&&e[a][1].type==="attentionSequence"&&e[a][1]._close){for(s=a;s--;)if(e[s][0]==="exit"&&e[s][1].type==="attentionSequence"&&e[s][1]._open&&t.sliceSerialize(e[s][1]).charCodeAt(0)===t.sliceSerialize(e[a][1]).charCodeAt(0)){if((e[s][1]._close||e[a][1]._open)&&(e[a][1].end.offset-e[a][1].start.offset)%3&&!((e[s][1].end.offset-e[s][1].start.offset+e[a][1].end.offset-e[a][1].start.offset)%3))continue;h=e[s][1].end.offset-e[s][1].start.offset>1&&e[a][1].end.offset-e[a][1].start.offset>1?2:1;const x={...e[s][1].end},y={...e[a][1].start};Sx(x,-h),Sx(y,h),d={type:h>1?"strongSequence":"emphasisSequence",start:x,end:{...e[s][1].end}},f={type:h>1?"strongSequence":"emphasisSequence",start:{...e[a][1].start},end:y},o={type:h>1?"strongText":"emphasisText",start:{...e[s][1].end},end:{...e[a][1].start}},l={type:h>1?"strong":"emphasis",start:{...d.start},end:{...f.end}},e[s][1].end={...d.start},e[a][1].start={...f.end},m=[],e[s][1].end.offset-e[s][1].start.offset&&(m=ya(m,[["enter",e[s][1],t],["exit",e[s][1],t]])),m=ya(m,[["enter",l,t],["enter",d,t],["exit",d,t],["enter",o,t]]),m=ya(m,Hc(t.parser.constructs.insideSpan.null,e.slice(s+1,a),t)),m=ya(m,[["exit",o,t],["enter",f,t],["exit",f,t],["exit",l,t]]),e[a][1].end.offset-e[a][1].start.offset?(b=2,m=ya(m,[["enter",e[a][1],t],["exit",e[a][1],t]])):b=0,sa(e,s-1,a-s+3,m),a=s+m.length-b-2;break}}for(a=-1;++a<e.length;)e[a][1].type==="attentionSequence"&&(e[a][1].type="data");return e}function mw(e,t){const a=this.parser.constructs.attentionMarkers.null,s=this.previous,l=Bi(s);let o;return d;function d(h){return o=h,e.enter("attentionSequence"),f(h)}function f(h){if(h===o)return e.consume(h),f;const m=e.exit("attentionSequence"),b=Bi(h),x=!b||b===2&&l||a.includes(h),y=!l||l===2&&b||a.includes(s);return m._open=!!(o===42?x:x&&(l||!y)),m._close=!!(o===42?y:y&&(b||!x)),t(h)}}function Sx(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const hw={name:"autolink",tokenize:pw};function pw(e,t,a){let s=0;return l;function l(T){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(T),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(T){return In(T)?(e.consume(T),d):T===64?a(T):m(T)}function d(T){return T===43||T===45||T===46||Sn(T)?(s=1,f(T)):m(T)}function f(T){return T===58?(e.consume(T),s=0,h):(T===43||T===45||T===46||Sn(T))&&s++<32?(e.consume(T),f):(s=0,m(T))}function h(T){return T===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(T),e.exit("autolinkMarker"),e.exit("autolink"),t):T===null||T===32||T===60||xc(T)?a(T):(e.consume(T),h)}function m(T){return T===64?(e.consume(T),b):rw(T)?(e.consume(T),m):a(T)}function b(T){return Sn(T)?x(T):a(T)}function x(T){return T===46?(e.consume(T),s=0,b):T===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(T),e.exit("autolinkMarker"),e.exit("autolink"),t):y(T)}function y(T){if((T===45||Sn(T))&&s++<63){const N=T===45?y:x;return e.consume(T),N}return a(T)}}const No={partial:!0,tokenize:gw};function gw(e,t,a){return s;function s(o){return rt(o)?ct(e,l,"linePrefix")(o):l(o)}function l(o){return o===null||He(o)?t(o):a(o)}}const dy={continuation:{tokenize:xw},exit:Ew,name:"blockQuote",tokenize:bw};function bw(e,t,a){const s=this;return l;function l(d){if(d===62){const f=s.containerState;return f.open||(e.enter("blockQuote",{_container:!0}),f.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(d),e.exit("blockQuoteMarker"),o}return a(d)}function o(d){return rt(d)?(e.enter("blockQuotePrefixWhitespace"),e.consume(d),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(d))}}function xw(e,t,a){const s=this;return l;function l(d){return rt(d)?ct(e,o,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d):o(d)}function o(d){return e.attempt(dy,t,a)(d)}}function Ew(e){e.exit("blockQuote")}const fy={name:"characterEscape",tokenize:yw};function yw(e,t,a){return s;function s(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),l}function l(o){return iw(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):a(o)}}const my={name:"characterReference",tokenize:Tw};function Tw(e,t,a){const s=this;let l=0,o,d;return f;function f(x){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(x),e.exit("characterReferenceMarker"),h}function h(x){return x===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(x),e.exit("characterReferenceMarkerNumeric"),m):(e.enter("characterReferenceValue"),o=31,d=Sn,b(x))}function m(x){return x===88||x===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(x),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,d=sw,b):(e.enter("characterReferenceValue"),o=7,d=Ym,b(x))}function b(x){if(x===59&&l){const y=e.exit("characterReferenceValue");return d===Sn&&!Rh(s.sliceSerialize(y))?a(x):(e.enter("characterReferenceMarker"),e.consume(x),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return d(x)&&l++<o?(e.consume(x),b):a(x)}}const vx={partial:!0,tokenize:Nw},Ax={concrete:!0,name:"codeFenced",tokenize:_w};function _w(e,t,a){const s=this,l={partial:!0,tokenize:$};let o=0,d=0,f;return h;function h(L){return m(L)}function m(L){const Y=s.events[s.events.length-1];return o=Y&&Y[1].type==="linePrefix"?Y[2].sliceSerialize(Y[1],!0).length:0,f=L,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),b(L)}function b(L){return L===f?(d++,e.consume(L),b):d<3?a(L):(e.exit("codeFencedFenceSequence"),rt(L)?ct(e,x,"whitespace")(L):x(L))}function x(L){return L===null||He(L)?(e.exit("codeFencedFence"),s.interrupt?t(L):e.check(vx,S,D)(L)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),y(L))}function y(L){return L===null||He(L)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),x(L)):rt(L)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ct(e,T,"whitespace")(L)):L===96&&L===f?a(L):(e.consume(L),y)}function T(L){return L===null||He(L)?x(L):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),N(L))}function N(L){return L===null||He(L)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),x(L)):L===96&&L===f?a(L):(e.consume(L),N)}function S(L){return e.attempt(l,D,C)(L)}function C(L){return e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),v}function v(L){return o>0&&rt(L)?ct(e,M,"linePrefix",o+1)(L):M(L)}function M(L){return L===null||He(L)?e.check(vx,S,D)(L):(e.enter("codeFlowValue"),k(L))}function k(L){return L===null||He(L)?(e.exit("codeFlowValue"),M(L)):(e.consume(L),k)}function D(L){return e.exit("codeFenced"),t(L)}function $(L,Y,re){let fe=0;return U;function U(J){return L.enter("lineEnding"),L.consume(J),L.exit("lineEnding"),H}function H(J){return L.enter("codeFencedFence"),rt(J)?ct(L,ae,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(J):ae(J)}function ae(J){return J===f?(L.enter("codeFencedFenceSequence"),se(J)):re(J)}function se(J){return J===f?(fe++,L.consume(J),se):fe>=d?(L.exit("codeFencedFenceSequence"),rt(J)?ct(L,Z,"whitespace")(J):Z(J)):re(J)}function Z(J){return J===null||He(J)?(L.exit("codeFencedFence"),Y(J)):re(J)}}}function Nw(e,t,a){const s=this;return l;function l(d){return d===null?a(d):(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),o)}function o(d){return s.parser.lazy[s.now().line]?a(d):t(d)}}const dm={name:"codeIndented",tokenize:vw},Sw={partial:!0,tokenize:Aw};function vw(e,t,a){const s=this;return l;function l(m){return e.enter("codeIndented"),ct(e,o,"linePrefix",5)(m)}function o(m){const b=s.events[s.events.length-1];return b&&b[1].type==="linePrefix"&&b[2].sliceSerialize(b[1],!0).length>=4?d(m):a(m)}function d(m){return m===null?h(m):He(m)?e.attempt(Sw,d,h)(m):(e.enter("codeFlowValue"),f(m))}function f(m){return m===null||He(m)?(e.exit("codeFlowValue"),d(m)):(e.consume(m),f)}function h(m){return e.exit("codeIndented"),t(m)}}function Aw(e,t,a){const s=this;return l;function l(d){return s.parser.lazy[s.now().line]?a(d):He(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),l):ct(e,o,"linePrefix",5)(d)}function o(d){const f=s.events[s.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(d):He(d)?l(d):a(d)}}const Cw={name:"codeText",previous:kw,resolve:ww,tokenize:Rw};function ww(e){let t=e.length-4,a=3,s,l;if((e[a][1].type==="lineEnding"||e[a][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(s=a;++s<t;)if(e[s][1].type==="codeTextData"){e[a][1].type="codeTextPadding",e[t][1].type="codeTextPadding",a+=2,t-=2;break}}for(s=a-1,t++;++s<=t;)l===void 0?s!==t&&e[s][1].type!=="lineEnding"&&(l=s):(s===t||e[s][1].type==="lineEnding")&&(e[l][1].type="codeTextData",s!==l+2&&(e[l][1].end=e[s-1][1].end,e.splice(l+2,s-l-2),t-=s-l-2,s=l+2),l=void 0);return e}function kw(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Rw(e,t,a){let s=0,l,o;return d;function d(x){return e.enter("codeText"),e.enter("codeTextSequence"),f(x)}function f(x){return x===96?(e.consume(x),s++,f):(e.exit("codeTextSequence"),h(x))}function h(x){return x===null?a(x):x===32?(e.enter("space"),e.consume(x),e.exit("space"),h):x===96?(o=e.enter("codeTextSequence"),l=0,b(x)):He(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),h):(e.enter("codeTextData"),m(x))}function m(x){return x===null||x===32||x===96||He(x)?(e.exit("codeTextData"),h(x)):(e.consume(x),m)}function b(x){return x===96?(e.consume(x),l++,b):l===s?(e.exit("codeTextSequence"),e.exit("codeText"),t(x)):(o.type="codeTextData",m(x))}}class Ow{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,a){const s=a??Number.POSITIVE_INFINITY;return s<this.left.length?this.left.slice(t,s):t>this.left.length?this.right.slice(this.right.length-s+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-s+this.left.length).reverse())}splice(t,a,s){const l=a||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-l,Number.POSITIVE_INFINITY);return s&&Kl(this.left,s),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Kl(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Kl(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const a=this.left.splice(t,Number.POSITIVE_INFINITY);Kl(this.right,a.reverse())}else{const a=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Kl(this.left,a.reverse())}}}function Kl(e,t){let a=0;if(t.length<1e4)e.push(...t);else for(;a<t.length;)e.push(...t.slice(a,a+1e4)),a+=1e4}function hy(e){const t={};let a=-1,s,l,o,d,f,h,m;const b=new Ow(e);for(;++a<b.length;){for(;a in t;)a=t[a];if(s=b.get(a),a&&s[1].type==="chunkFlow"&&b.get(a-1)[1].type==="listItemPrefix"&&(h=s[1]._tokenizer.events,o=0,o<h.length&&h[o][1].type==="lineEndingBlank"&&(o+=2),o<h.length&&h[o][1].type==="content"))for(;++o<h.length&&h[o][1].type!=="content";)h[o][1].type==="chunkText"&&(h[o][1]._isInFirstContentOfListItem=!0,o++);if(s[0]==="enter")s[1].contentType&&(Object.assign(t,Iw(b,a)),a=t[a],m=!0);else if(s[1]._container){for(o=a,l=void 0;o--;)if(d=b.get(o),d[1].type==="lineEnding"||d[1].type==="lineEndingBlank")d[0]==="enter"&&(l&&(b.get(l)[1].type="lineEndingBlank"),d[1].type="lineEnding",l=o);else if(!(d[1].type==="linePrefix"||d[1].type==="listItemIndent"))break;l&&(s[1].end={...b.get(l)[1].start},f=b.slice(l,a),f.unshift(s),b.splice(l,a-l+1,f))}}return sa(e,0,Number.POSITIVE_INFINITY,b.slice(0)),!m}function Iw(e,t){const a=e.get(t)[1],s=e.get(t)[2];let l=t-1;const o=[];let d=a._tokenizer;d||(d=s.parser[a.contentType](a.start),a._contentTypeTextTrailing&&(d._contentTypeTextTrailing=!0));const f=d.events,h=[],m={};let b,x,y=-1,T=a,N=0,S=0;const C=[S];for(;T;){for(;e.get(++l)[1]!==T;);o.push(l),T._tokenizer||(b=s.sliceStream(T),T.next||b.push(null),x&&d.defineSkip(T.start),T._isInFirstContentOfListItem&&(d._gfmTasklistFirstContentOfListItem=!0),d.write(b),T._isInFirstContentOfListItem&&(d._gfmTasklistFirstContentOfListItem=void 0)),x=T,T=T.next}for(T=a;++y<f.length;)f[y][0]==="exit"&&f[y-1][0]==="enter"&&f[y][1].type===f[y-1][1].type&&f[y][1].start.line!==f[y][1].end.line&&(S=y+1,C.push(S),T._tokenizer=void 0,T.previous=void 0,T=T.next);for(d.events=[],T?(T._tokenizer=void 0,T.previous=void 0):C.pop(),y=C.length;y--;){const v=f.slice(C[y],C[y+1]),M=o.pop();h.push([M,M+v.length-1]),e.splice(M,2,v)}for(h.reverse(),y=-1;++y<h.length;)m[N+h[y][0]]=N+h[y][1],N+=h[y][1]-h[y][0]-1;return m}const Mw={resolve:Lw,tokenize:jw},Dw={partial:!0,tokenize:Bw};function Lw(e){return hy(e),e}function jw(e,t){let a;return s;function s(f){return e.enter("content"),a=e.enter("chunkContent",{contentType:"content"}),l(f)}function l(f){return f===null?o(f):He(f)?e.check(Dw,d,o)(f):(e.consume(f),l)}function o(f){return e.exit("chunkContent"),e.exit("content"),t(f)}function d(f){return e.consume(f),e.exit("chunkContent"),a.next=e.enter("chunkContent",{contentType:"content",previous:a}),a=a.next,l}}function Bw(e,t,a){const s=this;return l;function l(d){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),ct(e,o,"linePrefix")}function o(d){if(d===null||He(d))return a(d);const f=s.events[s.events.length-1];return!s.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(d):e.interrupt(s.parser.constructs.flow,a,t)(d)}}function py(e,t,a,s,l,o,d,f,h){const m=h||Number.POSITIVE_INFINITY;let b=0;return x;function x(v){return v===60?(e.enter(s),e.enter(l),e.enter(o),e.consume(v),e.exit(o),y):v===null||v===32||v===41||xc(v)?a(v):(e.enter(s),e.enter(d),e.enter(f),e.enter("chunkString",{contentType:"string"}),S(v))}function y(v){return v===62?(e.enter(o),e.consume(v),e.exit(o),e.exit(l),e.exit(s),t):(e.enter(f),e.enter("chunkString",{contentType:"string"}),T(v))}function T(v){return v===62?(e.exit("chunkString"),e.exit(f),y(v)):v===null||v===60||He(v)?a(v):(e.consume(v),v===92?N:T)}function N(v){return v===60||v===62||v===92?(e.consume(v),T):T(v)}function S(v){return!b&&(v===null||v===41||Rt(v))?(e.exit("chunkString"),e.exit(f),e.exit(d),e.exit(s),t(v)):b<m&&v===40?(e.consume(v),b++,S):v===41?(e.consume(v),b--,S):v===null||v===32||v===40||xc(v)?a(v):(e.consume(v),v===92?C:S)}function C(v){return v===40||v===41||v===92?(e.consume(v),S):S(v)}}function gy(e,t,a,s,l,o){const d=this;let f=0,h;return m;function m(T){return e.enter(s),e.enter(l),e.consume(T),e.exit(l),e.enter(o),b}function b(T){return f>999||T===null||T===91||T===93&&!h||T===94&&!f&&"_hiddenFootnoteSupport"in d.parser.constructs?a(T):T===93?(e.exit(o),e.enter(l),e.consume(T),e.exit(l),e.exit(s),t):He(T)?(e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),b):(e.enter("chunkString",{contentType:"string"}),x(T))}function x(T){return T===null||T===91||T===93||He(T)||f++>999?(e.exit("chunkString"),b(T)):(e.consume(T),h||(h=!rt(T)),T===92?y:x)}function y(T){return T===91||T===92||T===93?(e.consume(T),f++,x):x(T)}}function by(e,t,a,s,l,o){let d;return f;function f(y){return y===34||y===39||y===40?(e.enter(s),e.enter(l),e.consume(y),e.exit(l),d=y===40?41:y,h):a(y)}function h(y){return y===d?(e.enter(l),e.consume(y),e.exit(l),e.exit(s),t):(e.enter(o),m(y))}function m(y){return y===d?(e.exit(o),h(d)):y===null?a(y):He(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),ct(e,m,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),b(y))}function b(y){return y===d||y===null||He(y)?(e.exit("chunkString"),m(y)):(e.consume(y),y===92?x:b)}function x(y){return y===d||y===92?(e.consume(y),b):b(y)}}function to(e,t){let a;return s;function s(l){return He(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a=!0,s):rt(l)?ct(e,s,a?"linePrefix":"lineSuffix")(l):t(l)}}const Pw={name:"definition",tokenize:Hw},Uw={partial:!0,tokenize:Fw};function Hw(e,t,a){const s=this;let l;return o;function o(T){return e.enter("definition"),d(T)}function d(T){return gy.call(s,e,f,a,"definitionLabel","definitionLabelMarker","definitionLabelString")(T)}function f(T){return l=Oa(s.sliceSerialize(s.events[s.events.length-1][1]).slice(1,-1)),T===58?(e.enter("definitionMarker"),e.consume(T),e.exit("definitionMarker"),h):a(T)}function h(T){return Rt(T)?to(e,m)(T):m(T)}function m(T){return py(e,b,a,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(T)}function b(T){return e.attempt(Uw,x,x)(T)}function x(T){return rt(T)?ct(e,y,"whitespace")(T):y(T)}function y(T){return T===null||He(T)?(e.exit("definition"),s.parser.defined.push(l),t(T)):a(T)}}function Fw(e,t,a){return s;function s(f){return Rt(f)?to(e,l)(f):a(f)}function l(f){return by(e,o,a,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function o(f){return rt(f)?ct(e,d,"whitespace")(f):d(f)}function d(f){return f===null||He(f)?t(f):a(f)}}const zw={name:"hardBreakEscape",tokenize:qw};function qw(e,t,a){return s;function s(o){return e.enter("hardBreakEscape"),e.consume(o),l}function l(o){return He(o)?(e.exit("hardBreakEscape"),t(o)):a(o)}}const Yw={name:"headingAtx",resolve:$w,tokenize:Gw};function $w(e,t){let a=e.length-2,s=3,l,o;return e[s][1].type==="whitespace"&&(s+=2),a-2>s&&e[a][1].type==="whitespace"&&(a-=2),e[a][1].type==="atxHeadingSequence"&&(s===a-1||a-4>s&&e[a-2][1].type==="whitespace")&&(a-=s+1===a?2:4),a>s&&(l={type:"atxHeadingText",start:e[s][1].start,end:e[a][1].end},o={type:"chunkText",start:e[s][1].start,end:e[a][1].end,contentType:"text"},sa(e,s,a-s+1,[["enter",l,t],["enter",o,t],["exit",o,t],["exit",l,t]])),e}function Gw(e,t,a){let s=0;return l;function l(b){return e.enter("atxHeading"),o(b)}function o(b){return e.enter("atxHeadingSequence"),d(b)}function d(b){return b===35&&s++<6?(e.consume(b),d):b===null||Rt(b)?(e.exit("atxHeadingSequence"),f(b)):a(b)}function f(b){return b===35?(e.enter("atxHeadingSequence"),h(b)):b===null||He(b)?(e.exit("atxHeading"),t(b)):rt(b)?ct(e,f,"whitespace")(b):(e.enter("atxHeadingText"),m(b))}function h(b){return b===35?(e.consume(b),h):(e.exit("atxHeadingSequence"),f(b))}function m(b){return b===null||b===35||Rt(b)?(e.exit("atxHeadingText"),f(b)):(e.consume(b),m)}}const Kw=["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"],Cx=["pre","script","style","textarea"],Vw={concrete:!0,name:"htmlFlow",resolveTo:Zw,tokenize:Ww},Qw={partial:!0,tokenize:ek},Xw={partial:!0,tokenize:Jw};function Zw(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Ww(e,t,a){const s=this;let l,o,d,f,h;return m;function m(O){return b(O)}function b(O){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(O),x}function x(O){return O===33?(e.consume(O),y):O===47?(e.consume(O),o=!0,S):O===63?(e.consume(O),l=3,s.interrupt?t:B):In(O)?(e.consume(O),d=String.fromCharCode(O),C):a(O)}function y(O){return O===45?(e.consume(O),l=2,T):O===91?(e.consume(O),l=5,f=0,N):In(O)?(e.consume(O),l=4,s.interrupt?t:B):a(O)}function T(O){return O===45?(e.consume(O),s.interrupt?t:B):a(O)}function N(O){const ge="CDATA[";return O===ge.charCodeAt(f++)?(e.consume(O),f===ge.length?s.interrupt?t:ae:N):a(O)}function S(O){return In(O)?(e.consume(O),d=String.fromCharCode(O),C):a(O)}function C(O){if(O===null||O===47||O===62||Rt(O)){const ge=O===47,ve=d.toLowerCase();return!ge&&!o&&Cx.includes(ve)?(l=1,s.interrupt?t(O):ae(O)):Kw.includes(d.toLowerCase())?(l=6,ge?(e.consume(O),v):s.interrupt?t(O):ae(O)):(l=7,s.interrupt&&!s.parser.lazy[s.now().line]?a(O):o?M(O):k(O))}return O===45||Sn(O)?(e.consume(O),d+=String.fromCharCode(O),C):a(O)}function v(O){return O===62?(e.consume(O),s.interrupt?t:ae):a(O)}function M(O){return rt(O)?(e.consume(O),M):U(O)}function k(O){return O===47?(e.consume(O),U):O===58||O===95||In(O)?(e.consume(O),D):rt(O)?(e.consume(O),k):U(O)}function D(O){return O===45||O===46||O===58||O===95||Sn(O)?(e.consume(O),D):$(O)}function $(O){return O===61?(e.consume(O),L):rt(O)?(e.consume(O),$):k(O)}function L(O){return O===null||O===60||O===61||O===62||O===96?a(O):O===34||O===39?(e.consume(O),h=O,Y):rt(O)?(e.consume(O),L):re(O)}function Y(O){return O===h?(e.consume(O),h=null,fe):O===null||He(O)?a(O):(e.consume(O),Y)}function re(O){return O===null||O===34||O===39||O===47||O===60||O===61||O===62||O===96||Rt(O)?$(O):(e.consume(O),re)}function fe(O){return O===47||O===62||rt(O)?k(O):a(O)}function U(O){return O===62?(e.consume(O),H):a(O)}function H(O){return O===null||He(O)?ae(O):rt(O)?(e.consume(O),H):a(O)}function ae(O){return O===45&&l===2?(e.consume(O),V):O===60&&l===1?(e.consume(O),G):O===62&&l===4?(e.consume(O),R):O===63&&l===3?(e.consume(O),B):O===93&&l===5?(e.consume(O),ke):He(O)&&(l===6||l===7)?(e.exit("htmlFlowData"),e.check(Qw,X,se)(O)):O===null||He(O)?(e.exit("htmlFlowData"),se(O)):(e.consume(O),ae)}function se(O){return e.check(Xw,Z,X)(O)}function Z(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),J}function J(O){return O===null||He(O)?se(O):(e.enter("htmlFlowData"),ae(O))}function V(O){return O===45?(e.consume(O),B):ae(O)}function G(O){return O===47?(e.consume(O),d="",pe):ae(O)}function pe(O){if(O===62){const ge=d.toLowerCase();return Cx.includes(ge)?(e.consume(O),R):ae(O)}return In(O)&&d.length<8?(e.consume(O),d+=String.fromCharCode(O),pe):ae(O)}function ke(O){return O===93?(e.consume(O),B):ae(O)}function B(O){return O===62?(e.consume(O),R):O===45&&l===2?(e.consume(O),B):ae(O)}function R(O){return O===null||He(O)?(e.exit("htmlFlowData"),X(O)):(e.consume(O),R)}function X(O){return e.exit("htmlFlow"),t(O)}}function Jw(e,t,a){const s=this;return l;function l(d){return He(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),o):a(d)}function o(d){return s.parser.lazy[s.now().line]?a(d):t(d)}}function ek(e,t,a){return s;function s(l){return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),e.attempt(No,t,a)}}const tk={name:"htmlText",tokenize:nk};function nk(e,t,a){const s=this;let l,o,d;return f;function f(B){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(B),h}function h(B){return B===33?(e.consume(B),m):B===47?(e.consume(B),$):B===63?(e.consume(B),k):In(B)?(e.consume(B),re):a(B)}function m(B){return B===45?(e.consume(B),b):B===91?(e.consume(B),o=0,N):In(B)?(e.consume(B),M):a(B)}function b(B){return B===45?(e.consume(B),T):a(B)}function x(B){return B===null?a(B):B===45?(e.consume(B),y):He(B)?(d=x,G(B)):(e.consume(B),x)}function y(B){return B===45?(e.consume(B),T):x(B)}function T(B){return B===62?V(B):B===45?y(B):x(B)}function N(B){const R="CDATA[";return B===R.charCodeAt(o++)?(e.consume(B),o===R.length?S:N):a(B)}function S(B){return B===null?a(B):B===93?(e.consume(B),C):He(B)?(d=S,G(B)):(e.consume(B),S)}function C(B){return B===93?(e.consume(B),v):S(B)}function v(B){return B===62?V(B):B===93?(e.consume(B),v):S(B)}function M(B){return B===null||B===62?V(B):He(B)?(d=M,G(B)):(e.consume(B),M)}function k(B){return B===null?a(B):B===63?(e.consume(B),D):He(B)?(d=k,G(B)):(e.consume(B),k)}function D(B){return B===62?V(B):k(B)}function $(B){return In(B)?(e.consume(B),L):a(B)}function L(B){return B===45||Sn(B)?(e.consume(B),L):Y(B)}function Y(B){return He(B)?(d=Y,G(B)):rt(B)?(e.consume(B),Y):V(B)}function re(B){return B===45||Sn(B)?(e.consume(B),re):B===47||B===62||Rt(B)?fe(B):a(B)}function fe(B){return B===47?(e.consume(B),V):B===58||B===95||In(B)?(e.consume(B),U):He(B)?(d=fe,G(B)):rt(B)?(e.consume(B),fe):V(B)}function U(B){return B===45||B===46||B===58||B===95||Sn(B)?(e.consume(B),U):H(B)}function H(B){return B===61?(e.consume(B),ae):He(B)?(d=H,G(B)):rt(B)?(e.consume(B),H):fe(B)}function ae(B){return B===null||B===60||B===61||B===62||B===96?a(B):B===34||B===39?(e.consume(B),l=B,se):He(B)?(d=ae,G(B)):rt(B)?(e.consume(B),ae):(e.consume(B),Z)}function se(B){return B===l?(e.consume(B),l=void 0,J):B===null?a(B):He(B)?(d=se,G(B)):(e.consume(B),se)}function Z(B){return B===null||B===34||B===39||B===60||B===61||B===96?a(B):B===47||B===62||Rt(B)?fe(B):(e.consume(B),Z)}function J(B){return B===47||B===62||Rt(B)?fe(B):a(B)}function V(B){return B===62?(e.consume(B),e.exit("htmlTextData"),e.exit("htmlText"),t):a(B)}function G(B){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(B),e.exit("lineEnding"),pe}function pe(B){return rt(B)?ct(e,ke,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(B):ke(B)}function ke(B){return e.enter("htmlTextData"),d(B)}}const Oh={name:"labelEnd",resolveAll:ik,resolveTo:lk,tokenize:ok},ak={tokenize:uk},rk={tokenize:ck},sk={tokenize:dk};function ik(e){let t=-1;const a=[];for(;++t<e.length;){const s=e[t][1];if(a.push(e[t]),s.type==="labelImage"||s.type==="labelLink"||s.type==="labelEnd"){const l=s.type==="labelImage"?4:2;s.type="data",t+=l}}return e.length!==a.length&&sa(e,0,e.length,a),e}function lk(e,t){let a=e.length,s=0,l,o,d,f;for(;a--;)if(l=e[a][1],o){if(l.type==="link"||l.type==="labelLink"&&l._inactive)break;e[a][0]==="enter"&&l.type==="labelLink"&&(l._inactive=!0)}else if(d){if(e[a][0]==="enter"&&(l.type==="labelImage"||l.type==="labelLink")&&!l._balanced&&(o=a,l.type!=="labelLink")){s=2;break}}else l.type==="labelEnd"&&(d=a);const h={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},m={type:"label",start:{...e[o][1].start},end:{...e[d][1].end}},b={type:"labelText",start:{...e[o+s+2][1].end},end:{...e[d-2][1].start}};return f=[["enter",h,t],["enter",m,t]],f=ya(f,e.slice(o+1,o+s+3)),f=ya(f,[["enter",b,t]]),f=ya(f,Hc(t.parser.constructs.insideSpan.null,e.slice(o+s+4,d-3),t)),f=ya(f,[["exit",b,t],e[d-2],e[d-1],["exit",m,t]]),f=ya(f,e.slice(d+1)),f=ya(f,[["exit",h,t]]),sa(e,o,e.length,f),e}function ok(e,t,a){const s=this;let l=s.events.length,o,d;for(;l--;)if((s.events[l][1].type==="labelImage"||s.events[l][1].type==="labelLink")&&!s.events[l][1]._balanced){o=s.events[l][1];break}return f;function f(y){return o?o._inactive?x(y):(d=s.parser.defined.includes(Oa(s.sliceSerialize({start:o.end,end:s.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(y),e.exit("labelMarker"),e.exit("labelEnd"),h):a(y)}function h(y){return y===40?e.attempt(ak,b,d?b:x)(y):y===91?e.attempt(rk,b,d?m:x)(y):d?b(y):x(y)}function m(y){return e.attempt(sk,b,x)(y)}function b(y){return t(y)}function x(y){return o._balanced=!0,a(y)}}function uk(e,t,a){return s;function s(x){return e.enter("resource"),e.enter("resourceMarker"),e.consume(x),e.exit("resourceMarker"),l}function l(x){return Rt(x)?to(e,o)(x):o(x)}function o(x){return x===41?b(x):py(e,d,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(x)}function d(x){return Rt(x)?to(e,h)(x):b(x)}function f(x){return a(x)}function h(x){return x===34||x===39||x===40?by(e,m,a,"resourceTitle","resourceTitleMarker","resourceTitleString")(x):b(x)}function m(x){return Rt(x)?to(e,b)(x):b(x)}function b(x){return x===41?(e.enter("resourceMarker"),e.consume(x),e.exit("resourceMarker"),e.exit("resource"),t):a(x)}}function ck(e,t,a){const s=this;return l;function l(f){return gy.call(s,e,o,d,"reference","referenceMarker","referenceString")(f)}function o(f){return s.parser.defined.includes(Oa(s.sliceSerialize(s.events[s.events.length-1][1]).slice(1,-1)))?t(f):a(f)}function d(f){return a(f)}}function dk(e,t,a){return s;function s(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),l}function l(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):a(o)}}const fk={name:"labelStartImage",resolveAll:Oh.resolveAll,tokenize:mk};function mk(e,t,a){const s=this;return l;function l(f){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(f),e.exit("labelImageMarker"),o}function o(f){return f===91?(e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelImage"),d):a(f)}function d(f){return f===94&&"_hiddenFootnoteSupport"in s.parser.constructs?a(f):t(f)}}const hk={name:"labelStartLink",resolveAll:Oh.resolveAll,tokenize:pk};function pk(e,t,a){const s=this;return l;function l(d){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelLink"),o}function o(d){return d===94&&"_hiddenFootnoteSupport"in s.parser.constructs?a(d):t(d)}}const fm={name:"lineEnding",tokenize:gk};function gk(e,t){return a;function a(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),ct(e,t,"linePrefix")}}const ic={name:"thematicBreak",tokenize:bk};function bk(e,t,a){let s=0,l;return o;function o(m){return e.enter("thematicBreak"),d(m)}function d(m){return l=m,f(m)}function f(m){return m===l?(e.enter("thematicBreakSequence"),h(m)):s>=3&&(m===null||He(m))?(e.exit("thematicBreak"),t(m)):a(m)}function h(m){return m===l?(e.consume(m),s++,h):(e.exit("thematicBreakSequence"),rt(m)?ct(e,f,"whitespace")(m):f(m))}}const $n={continuation:{tokenize:Tk},exit:Nk,name:"list",tokenize:yk},xk={partial:!0,tokenize:Sk},Ek={partial:!0,tokenize:_k};function yk(e,t,a){const s=this,l=s.events[s.events.length-1];let o=l&&l[1].type==="linePrefix"?l[2].sliceSerialize(l[1],!0).length:0,d=0;return f;function f(T){const N=s.containerState.type||(T===42||T===43||T===45?"listUnordered":"listOrdered");if(N==="listUnordered"?!s.containerState.marker||T===s.containerState.marker:Ym(T)){if(s.containerState.type||(s.containerState.type=N,e.enter(N,{_container:!0})),N==="listUnordered")return e.enter("listItemPrefix"),T===42||T===45?e.check(ic,a,m)(T):m(T);if(!s.interrupt||T===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),h(T)}return a(T)}function h(T){return Ym(T)&&++d<10?(e.consume(T),h):(!s.interrupt||d<2)&&(s.containerState.marker?T===s.containerState.marker:T===41||T===46)?(e.exit("listItemValue"),m(T)):a(T)}function m(T){return e.enter("listItemMarker"),e.consume(T),e.exit("listItemMarker"),s.containerState.marker=s.containerState.marker||T,e.check(No,s.interrupt?a:b,e.attempt(xk,y,x))}function b(T){return s.containerState.initialBlankLine=!0,o++,y(T)}function x(T){return rt(T)?(e.enter("listItemPrefixWhitespace"),e.consume(T),e.exit("listItemPrefixWhitespace"),y):a(T)}function y(T){return s.containerState.size=o+s.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(T)}}function Tk(e,t,a){const s=this;return s.containerState._closeFlow=void 0,e.check(No,l,o);function l(f){return s.containerState.furtherBlankLines=s.containerState.furtherBlankLines||s.containerState.initialBlankLine,ct(e,t,"listItemIndent",s.containerState.size+1)(f)}function o(f){return s.containerState.furtherBlankLines||!rt(f)?(s.containerState.furtherBlankLines=void 0,s.containerState.initialBlankLine=void 0,d(f)):(s.containerState.furtherBlankLines=void 0,s.containerState.initialBlankLine=void 0,e.attempt(Ek,t,d)(f))}function d(f){return s.containerState._closeFlow=!0,s.interrupt=void 0,ct(e,e.attempt($n,t,a),"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function _k(e,t,a){const s=this;return ct(e,l,"listItemIndent",s.containerState.size+1);function l(o){const d=s.events[s.events.length-1];return d&&d[1].type==="listItemIndent"&&d[2].sliceSerialize(d[1],!0).length===s.containerState.size?t(o):a(o)}}function Nk(e){e.exit(this.containerState.type)}function Sk(e,t,a){const s=this;return ct(e,l,"listItemPrefixWhitespace",s.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function l(o){const d=s.events[s.events.length-1];return!rt(o)&&d&&d[1].type==="listItemPrefixWhitespace"?t(o):a(o)}}const wx={name:"setextUnderline",resolveTo:vk,tokenize:Ak};function vk(e,t){let a=e.length,s,l,o;for(;a--;)if(e[a][0]==="enter"){if(e[a][1].type==="content"){s=a;break}e[a][1].type==="paragraph"&&(l=a)}else e[a][1].type==="content"&&e.splice(a,1),!o&&e[a][1].type==="definition"&&(o=a);const d={type:"setextHeading",start:{...e[s][1].start},end:{...e[e.length-1][1].end}};return e[l][1].type="setextHeadingText",o?(e.splice(l,0,["enter",d,t]),e.splice(o+1,0,["exit",e[s][1],t]),e[s][1].end={...e[o][1].end}):e[s][1]=d,e.push(["exit",d,t]),e}function Ak(e,t,a){const s=this;let l;return o;function o(m){let b=s.events.length,x;for(;b--;)if(s.events[b][1].type!=="lineEnding"&&s.events[b][1].type!=="linePrefix"&&s.events[b][1].type!=="content"){x=s.events[b][1].type==="paragraph";break}return!s.parser.lazy[s.now().line]&&(s.interrupt||x)?(e.enter("setextHeadingLine"),l=m,d(m)):a(m)}function d(m){return e.enter("setextHeadingLineSequence"),f(m)}function f(m){return m===l?(e.consume(m),f):(e.exit("setextHeadingLineSequence"),rt(m)?ct(e,h,"lineSuffix")(m):h(m))}function h(m){return m===null||He(m)?(e.exit("setextHeadingLine"),t(m)):a(m)}}const Ck={tokenize:wk};function wk(e){const t=this,a=e.attempt(No,s,e.attempt(this.parser.constructs.flowInitial,l,ct(e,e.attempt(this.parser.constructs.flow,l,e.attempt(Mw,l)),"linePrefix")));return a;function s(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,a}function l(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,a}}const kk={resolveAll:Ey()},Rk=xy("string"),Ok=xy("text");function xy(e){return{resolveAll:Ey(e==="text"?Ik:void 0),tokenize:t};function t(a){const s=this,l=this.parser.constructs[e],o=a.attempt(l,d,f);return d;function d(b){return m(b)?o(b):f(b)}function f(b){if(b===null){a.consume(b);return}return a.enter("data"),a.consume(b),h}function h(b){return m(b)?(a.exit("data"),o(b)):(a.consume(b),h)}function m(b){if(b===null)return!0;const x=l[b];let y=-1;if(x)for(;++y<x.length;){const T=x[y];if(!T.previous||T.previous.call(s,s.previous))return!0}return!1}}}function Ey(e){return t;function t(a,s){let l=-1,o;for(;++l<=a.length;)o===void 0?a[l]&&a[l][1].type==="data"&&(o=l,l++):(!a[l]||a[l][1].type!=="data")&&(l!==o+2&&(a[o][1].end=a[l-1][1].end,a.splice(o+2,l-o-2),l=o+2),o=void 0);return e?e(a,s):a}}function Ik(e,t){let a=0;for(;++a<=e.length;)if((a===e.length||e[a][1].type==="lineEnding")&&e[a-1][1].type==="data"){const s=e[a-1][1],l=t.sliceStream(s);let o=l.length,d=-1,f=0,h;for(;o--;){const m=l[o];if(typeof m=="string"){for(d=m.length;m.charCodeAt(d-1)===32;)f++,d--;if(d)break;d=-1}else if(m===-2)h=!0,f++;else if(m!==-1){o++;break}}if(t._contentTypeTextTrailing&&a===e.length&&(f=0),f){const m={type:a===e.length||h||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?d:s.start._bufferIndex+d,_index:s.start._index+o,line:s.end.line,column:s.end.column-f,offset:s.end.offset-f},end:{...s.end}};s.end={...m.start},s.start.offset===s.end.offset?Object.assign(s,m):(e.splice(a,0,["enter",m,t],["exit",m,t]),a+=2)}a++}return e}const Mk={42:$n,43:$n,45:$n,48:$n,49:$n,50:$n,51:$n,52:$n,53:$n,54:$n,55:$n,56:$n,57:$n,62:dy},Dk={91:Pw},Lk={[-2]:dm,[-1]:dm,32:dm},jk={35:Yw,42:ic,45:[wx,ic],60:Vw,61:wx,95:ic,96:Ax,126:Ax},Bk={38:my,92:fy},Pk={[-5]:fm,[-4]:fm,[-3]:fm,33:fk,38:my,42:$m,60:[hw,tk],91:hk,92:[zw,fy],93:Oh,95:$m,96:Cw},Uk={null:[$m,kk]},Hk={null:[42,95]},Fk={null:[]},zk=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Hk,contentInitial:Dk,disable:Fk,document:Mk,flow:jk,flowInitial:Lk,insideSpan:Uk,string:Bk,text:Pk},Symbol.toStringTag,{value:"Module"}));function qk(e,t,a){let s={_bufferIndex:-1,_index:0,line:a&&a.line||1,column:a&&a.column||1,offset:a&&a.offset||0};const l={},o=[];let d=[],f=[];const h={attempt:Y($),check:Y(L),consume:M,enter:k,exit:D,interrupt:Y(L,{interrupt:!0})},m={code:null,containerState:{},defineSkip:S,events:[],now:N,parser:e,previous:null,sliceSerialize:y,sliceStream:T,write:x};let b=t.tokenize.call(m,h);return t.resolveAll&&o.push(t),m;function x(H){return d=ya(d,H),C(),d[d.length-1]!==null?[]:(re(t,0),m.events=Hc(o,m.events,m),m.events)}function y(H,ae){return $k(T(H),ae)}function T(H){return Yk(d,H)}function N(){const{_bufferIndex:H,_index:ae,line:se,column:Z,offset:J}=s;return{_bufferIndex:H,_index:ae,line:se,column:Z,offset:J}}function S(H){l[H.line]=H.column,U()}function C(){let H;for(;s._index<d.length;){const ae=d[s._index];if(typeof ae=="string")for(H=s._index,s._bufferIndex<0&&(s._bufferIndex=0);s._index===H&&s._bufferIndex<ae.length;)v(ae.charCodeAt(s._bufferIndex));else v(ae)}}function v(H){b=b(H)}function M(H){He(H)?(s.line++,s.column=1,s.offset+=H===-3?2:1,U()):H!==-1&&(s.column++,s.offset++),s._bufferIndex<0?s._index++:(s._bufferIndex++,s._bufferIndex===d[s._index].length&&(s._bufferIndex=-1,s._index++)),m.previous=H}function k(H,ae){const se=ae||{};return se.type=H,se.start=N(),m.events.push(["enter",se,m]),f.push(se),se}function D(H){const ae=f.pop();return ae.end=N(),m.events.push(["exit",ae,m]),ae}function $(H,ae){re(H,ae.from)}function L(H,ae){ae.restore()}function Y(H,ae){return se;function se(Z,J,V){let G,pe,ke,B;return Array.isArray(Z)?X(Z):"tokenize"in Z?X([Z]):R(Z);function R(Ae){return $e;function $e(dt){const ut=dt!==null&&Ae[dt],Ft=dt!==null&&Ae.null,yn=[...Array.isArray(ut)?ut:ut?[ut]:[],...Array.isArray(Ft)?Ft:Ft?[Ft]:[]];return X(yn)(dt)}}function X(Ae){return G=Ae,pe=0,Ae.length===0?V:O(Ae[pe])}function O(Ae){return $e;function $e(dt){return B=fe(),ke=Ae,Ae.partial||(m.currentConstruct=Ae),Ae.name&&m.parser.constructs.disable.null.includes(Ae.name)?ve():Ae.tokenize.call(ae?Object.assign(Object.create(m),ae):m,h,ge,ve)(dt)}}function ge(Ae){return H(ke,B),J}function ve(Ae){return B.restore(),++pe<G.length?O(G[pe]):V}}}function re(H,ae){H.resolveAll&&!o.includes(H)&&o.push(H),H.resolve&&sa(m.events,ae,m.events.length-ae,H.resolve(m.events.slice(ae),m)),H.resolveTo&&(m.events=H.resolveTo(m.events,m))}function fe(){const H=N(),ae=m.previous,se=m.currentConstruct,Z=m.events.length,J=Array.from(f);return{from:Z,restore:V};function V(){s=H,m.previous=ae,m.currentConstruct=se,m.events.length=Z,f=J,U()}}function U(){s.line in l&&s.column<2&&(s.column=l[s.line],s.offset+=l[s.line]-1)}}function Yk(e,t){const a=t.start._index,s=t.start._bufferIndex,l=t.end._index,o=t.end._bufferIndex;let d;if(a===l)d=[e[a].slice(s,o)];else{if(d=e.slice(a,l),s>-1){const f=d[0];typeof f=="string"?d[0]=f.slice(s):d.shift()}o>0&&d.push(e[l].slice(0,o))}return d}function $k(e,t){let a=-1;const s=[];let l;for(;++a<e.length;){const o=e[a];let d;if(typeof o=="string")d=o;else switch(o){case-5:{d="\r";break}case-4:{d=`
|
|
404
|
+
`;break}case-3:{d=`\r
|
|
405
|
+
`;break}case-2:{d=t?" ":" ";break}case-1:{if(!t&&l)continue;d=" ";break}default:d=String.fromCharCode(o)}l=o===-2,s.push(d)}return s.join("")}function Gk(e){const s={constructs:uy([zk,...(e||{}).extensions||[]]),content:l(lw),defined:[],document:l(uw),flow:l(Ck),lazy:{},string:l(Rk),text:l(Ok)};return s;function l(o){return d;function d(f){return qk(s,o,f)}}}function Kk(e){for(;!hy(e););return e}const kx=/[\0\t\n\r]/g;function Vk(){let e=1,t="",a=!0,s;return l;function l(o,d,f){const h=[];let m,b,x,y,T;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(d||void 0).decode(o)),x=0,t="",a&&(o.charCodeAt(0)===65279&&x++,a=void 0);x<o.length;){if(kx.lastIndex=x,m=kx.exec(o),y=m&&m.index!==void 0?m.index:o.length,T=o.charCodeAt(y),!m){t=o.slice(x);break}if(T===10&&x===y&&s)h.push(-3),s=void 0;else switch(s&&(h.push(-5),s=void 0),x<y&&(h.push(o.slice(x,y)),e+=y-x),T){case 0:{h.push(65533),e++;break}case 9:{for(b=Math.ceil(e/4)*4,h.push(-2);e++<b;)h.push(-1);break}case 10:{h.push(-4),e=1;break}default:s=!0,e=1}x=y+1}return f&&(s&&h.push(-5),t&&h.push(t),h.push(null)),h}}const Qk=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Xk(e){return e.replace(Qk,Zk)}function Zk(e,t,a){if(t)return t;if(a.charCodeAt(0)===35){const l=a.charCodeAt(1),o=l===120||l===88;return cy(a.slice(o?2:1),o?16:10)}return Rh(a)||e}const yy={}.hasOwnProperty;function Wk(e,t,a){return t&&typeof t=="object"&&(a=t,t=void 0),Jk(a)(Kk(Gk(a).document().write(Vk()(e,t,!0))))}function Jk(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(ca),autolinkProtocol:fe,autolinkEmail:fe,atxHeading:o(Vn),blockQuote:o(Ft),characterEscape:fe,characterReference:fe,codeFenced:o(yn),codeFencedFenceInfo:d,codeFencedFenceMeta:d,codeIndented:o(yn,d),codeText:o(ua,d),codeTextData:fe,data:fe,codeFlowValue:fe,definition:o(Sa),definitionDestinationString:d,definitionLabelString:d,definitionTitleString:d,emphasis:o(un),hardBreakEscape:o(Je),hardBreakTrailing:o(Je),htmlFlow:o(Dn,d),htmlFlowData:fe,htmlText:o(Dn,d),htmlTextData:fe,image:o(Cn),label:d,link:o(ca),listItem:o(Za),listItemValue:y,listOrdered:o(va,x),listUnordered:o(va),paragraph:o(ja),reference:O,referenceString:d,resourceDestinationString:d,resourceTitleString:d,setextHeading:o(Vn),strong:o(Ar),thematicBreak:o(Wa)},exit:{atxHeading:h(),atxHeadingSequence:$,autolink:h(),autolinkEmail:ut,autolinkProtocol:dt,blockQuote:h(),characterEscapeValue:U,characterReferenceMarkerHexadecimal:ve,characterReferenceMarkerNumeric:ve,characterReferenceValue:Ae,characterReference:$e,codeFenced:h(C),codeFencedFence:S,codeFencedFenceInfo:T,codeFencedFenceMeta:N,codeFlowValue:U,codeIndented:h(v),codeText:h(J),codeTextData:U,data:U,definition:h(),definitionDestinationString:D,definitionLabelString:M,definitionTitleString:k,emphasis:h(),hardBreakEscape:h(ae),hardBreakTrailing:h(ae),htmlFlow:h(se),htmlFlowData:U,htmlText:h(Z),htmlTextData:U,image:h(G),label:ke,labelText:pe,lineEnding:H,link:h(V),listItem:h(),listOrdered:h(),listUnordered:h(),paragraph:h(),referenceString:ge,resourceDestinationString:B,resourceTitleString:R,resource:X,setextHeading:h(re),setextHeadingLineSequence:Y,setextHeadingText:L,strong:h(),thematicBreak:h()}};Ty(t,(e||{}).mdastExtensions||[]);const a={};return s;function s(oe){let Te={type:"root",children:[]};const Be={stack:[Te],tokenStack:[],config:t,enter:f,exit:m,buffer:d,resume:b,data:a},P=[];let Se=-1;for(;++Se<oe.length;)if(oe[Se][1].type==="listOrdered"||oe[Se][1].type==="listUnordered")if(oe[Se][0]==="enter")P.push(Se);else{const ft=P.pop();Se=l(oe,ft,Se)}for(Se=-1;++Se<oe.length;){const ft=t[oe[Se][0]];yy.call(ft,oe[Se][1].type)&&ft[oe[Se][1].type].call(Object.assign({sliceSerialize:oe[Se][2].sliceSerialize},Be),oe[Se][1])}if(Be.tokenStack.length>0){const ft=Be.tokenStack[Be.tokenStack.length-1];(ft[1]||Rx).call(Be,void 0,ft[0])}for(Te.position={start:ns(oe.length>0?oe[0][1].start:{line:1,column:1,offset:0}),end:ns(oe.length>0?oe[oe.length-2][1].end:{line:1,column:1,offset:0})},Se=-1;++Se<t.transforms.length;)Te=t.transforms[Se](Te)||Te;return Te}function l(oe,Te,Be){let P=Te-1,Se=-1,ft=!1,ln,Zt,Ot,cn;for(;++P<=Be;){const gt=oe[P];switch(gt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{gt[0]==="enter"?Se++:Se--,cn=void 0;break}case"lineEndingBlank":{gt[0]==="enter"&&(ln&&!cn&&!Se&&!Ot&&(Ot=P),cn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:cn=void 0}if(!Se&>[0]==="enter"&>[1].type==="listItemPrefix"||Se===-1&>[0]==="exit"&&(gt[1].type==="listUnordered"||gt[1].type==="listOrdered")){if(ln){let Ba=P;for(Zt=void 0;Ba--;){const wn=oe[Ba];if(wn[1].type==="lineEnding"||wn[1].type==="lineEndingBlank"){if(wn[0]==="exit")continue;Zt&&(oe[Zt][1].type="lineEndingBlank",ft=!0),wn[1].type="lineEnding",Zt=Ba}else if(!(wn[1].type==="linePrefix"||wn[1].type==="blockQuotePrefix"||wn[1].type==="blockQuotePrefixWhitespace"||wn[1].type==="blockQuoteMarker"||wn[1].type==="listItemIndent"))break}Ot&&(!Zt||Ot<Zt)&&(ln._spread=!0),ln.end=Object.assign({},Zt?oe[Zt][1].start:gt[1].end),oe.splice(Zt||P,0,["exit",ln,gt[2]]),P++,Be++}if(gt[1].type==="listItemPrefix"){const Ba={type:"listItem",_spread:!1,start:Object.assign({},gt[1].start),end:void 0};ln=Ba,oe.splice(P,0,["enter",Ba,gt[2]]),P++,Be++,Ot=void 0,cn=!0}}}return oe[Te][1]._spread=ft,Be}function o(oe,Te){return Be;function Be(P){f.call(this,oe(P),P),Te&&Te.call(this,P)}}function d(){this.stack.push({type:"fragment",children:[]})}function f(oe,Te,Be){this.stack[this.stack.length-1].children.push(oe),this.stack.push(oe),this.tokenStack.push([Te,Be||void 0]),oe.position={start:ns(Te.start),end:void 0}}function h(oe){return Te;function Te(Be){oe&&oe.call(this,Be),m.call(this,Be)}}function m(oe,Te){const Be=this.stack.pop(),P=this.tokenStack.pop();if(P)P[0].type!==oe.type&&(Te?Te.call(this,oe,P[0]):(P[1]||Rx).call(this,oe,P[0]));else throw new Error("Cannot close `"+oe.type+"` ("+eo({start:oe.start,end:oe.end})+"): it’s not open");Be.position.end=ns(oe.end)}function b(){return kh(this.stack.pop())}function x(){this.data.expectingFirstListItemValue=!0}function y(oe){if(this.data.expectingFirstListItemValue){const Te=this.stack[this.stack.length-2];Te.start=Number.parseInt(this.sliceSerialize(oe),10),this.data.expectingFirstListItemValue=void 0}}function T(){const oe=this.resume(),Te=this.stack[this.stack.length-1];Te.lang=oe}function N(){const oe=this.resume(),Te=this.stack[this.stack.length-1];Te.meta=oe}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function C(){const oe=this.resume(),Te=this.stack[this.stack.length-1];Te.value=oe.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function v(){const oe=this.resume(),Te=this.stack[this.stack.length-1];Te.value=oe.replace(/(\r?\n|\r)$/g,"")}function M(oe){const Te=this.resume(),Be=this.stack[this.stack.length-1];Be.label=Te,Be.identifier=Oa(this.sliceSerialize(oe)).toLowerCase()}function k(){const oe=this.resume(),Te=this.stack[this.stack.length-1];Te.title=oe}function D(){const oe=this.resume(),Te=this.stack[this.stack.length-1];Te.url=oe}function $(oe){const Te=this.stack[this.stack.length-1];if(!Te.depth){const Be=this.sliceSerialize(oe).length;Te.depth=Be}}function L(){this.data.setextHeadingSlurpLineEnding=!0}function Y(oe){const Te=this.stack[this.stack.length-1];Te.depth=this.sliceSerialize(oe).codePointAt(0)===61?1:2}function re(){this.data.setextHeadingSlurpLineEnding=void 0}function fe(oe){const Be=this.stack[this.stack.length-1].children;let P=Be[Be.length-1];(!P||P.type!=="text")&&(P=_t(),P.position={start:ns(oe.start),end:void 0},Be.push(P)),this.stack.push(P)}function U(oe){const Te=this.stack.pop();Te.value+=this.sliceSerialize(oe),Te.position.end=ns(oe.end)}function H(oe){const Te=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Be=Te.children[Te.children.length-1];Be.position.end=ns(oe.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Te.type)&&(fe.call(this,oe),U.call(this,oe))}function ae(){this.data.atHardBreak=!0}function se(){const oe=this.resume(),Te=this.stack[this.stack.length-1];Te.value=oe}function Z(){const oe=this.resume(),Te=this.stack[this.stack.length-1];Te.value=oe}function J(){const oe=this.resume(),Te=this.stack[this.stack.length-1];Te.value=oe}function V(){const oe=this.stack[this.stack.length-1];if(this.data.inReference){const Te=this.data.referenceType||"shortcut";oe.type+="Reference",oe.referenceType=Te,delete oe.url,delete oe.title}else delete oe.identifier,delete oe.label;this.data.referenceType=void 0}function G(){const oe=this.stack[this.stack.length-1];if(this.data.inReference){const Te=this.data.referenceType||"shortcut";oe.type+="Reference",oe.referenceType=Te,delete oe.url,delete oe.title}else delete oe.identifier,delete oe.label;this.data.referenceType=void 0}function pe(oe){const Te=this.sliceSerialize(oe),Be=this.stack[this.stack.length-2];Be.label=Xk(Te),Be.identifier=Oa(Te).toLowerCase()}function ke(){const oe=this.stack[this.stack.length-1],Te=this.resume(),Be=this.stack[this.stack.length-1];if(this.data.inReference=!0,Be.type==="link"){const P=oe.children;Be.children=P}else Be.alt=Te}function B(){const oe=this.resume(),Te=this.stack[this.stack.length-1];Te.url=oe}function R(){const oe=this.resume(),Te=this.stack[this.stack.length-1];Te.title=oe}function X(){this.data.inReference=void 0}function O(){this.data.referenceType="collapsed"}function ge(oe){const Te=this.resume(),Be=this.stack[this.stack.length-1];Be.label=Te,Be.identifier=Oa(this.sliceSerialize(oe)).toLowerCase(),this.data.referenceType="full"}function ve(oe){this.data.characterReferenceType=oe.type}function Ae(oe){const Te=this.sliceSerialize(oe),Be=this.data.characterReferenceType;let P;Be?(P=cy(Te,Be==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):P=Rh(Te);const Se=this.stack[this.stack.length-1];Se.value+=P}function $e(oe){const Te=this.stack.pop();Te.position.end=ns(oe.end)}function dt(oe){U.call(this,oe);const Te=this.stack[this.stack.length-1];Te.url=this.sliceSerialize(oe)}function ut(oe){U.call(this,oe);const Te=this.stack[this.stack.length-1];Te.url="mailto:"+this.sliceSerialize(oe)}function Ft(){return{type:"blockquote",children:[]}}function yn(){return{type:"code",lang:null,meta:null,value:""}}function ua(){return{type:"inlineCode",value:""}}function Sa(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function un(){return{type:"emphasis",children:[]}}function Vn(){return{type:"heading",depth:0,children:[]}}function Je(){return{type:"break"}}function Dn(){return{type:"html",value:""}}function Cn(){return{type:"image",title:null,url:"",alt:null}}function ca(){return{type:"link",title:null,url:"",children:[]}}function va(oe){return{type:"list",ordered:oe.type==="listOrdered",start:null,spread:oe._spread,children:[]}}function Za(oe){return{type:"listItem",spread:oe._spread,checked:null,children:[]}}function ja(){return{type:"paragraph",children:[]}}function Ar(){return{type:"strong",children:[]}}function _t(){return{type:"text",value:""}}function Wa(){return{type:"thematicBreak"}}}function ns(e){return{line:e.line,column:e.column,offset:e.offset}}function Ty(e,t){let a=-1;for(;++a<t.length;){const s=t[a];Array.isArray(s)?Ty(e,s):e5(e,s)}}function e5(e,t){let a;for(a in t)if(yy.call(t,a))switch(a){case"canContainEols":{const s=t[a];s&&e[a].push(...s);break}case"transforms":{const s=t[a];s&&e[a].push(...s);break}case"enter":case"exit":{const s=t[a];s&&Object.assign(e[a],s);break}}}function Rx(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+eo({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+eo({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+eo({start:t.start,end:t.end})+") is still open")}function t5(e){const t=this;t.parser=a;function a(s){return Wk(s,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function n5(e,t){const a={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,a),e.applyData(t,a)}function a5(e,t){const a={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,a),[e.applyData(t,a),{type:"text",value:`
|
|
406
|
+
`}]}function r5(e,t){const a=t.value?t.value+`
|
|
407
|
+
`:"",s={},l=t.lang?t.lang.split(/\s+/):[];l.length>0&&(s.className=["language-"+l[0]]);let o={type:"element",tagName:"code",properties:s,children:[{type:"text",value:a}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function s5(e,t){const a={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function i5(e,t){const a={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function l5(e,t){const a=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",s=String(t.identifier).toUpperCase(),l=$i(s.toLowerCase()),o=e.footnoteOrder.indexOf(s);let d,f=e.footnoteCounts.get(s);f===void 0?(f=0,e.footnoteOrder.push(s),d=e.footnoteOrder.length):d=o+1,f+=1,e.footnoteCounts.set(s,f);const h={type:"element",tagName:"a",properties:{href:"#"+a+"fn-"+l,id:a+"fnref-"+l+(f>1?"-"+f:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(d)}]};e.patch(t,h);const m={type:"element",tagName:"sup",properties:{},children:[h]};return e.patch(t,m),e.applyData(t,m)}function o5(e,t){const a={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function u5(e,t){if(e.options.allowDangerousHtml){const a={type:"raw",value:t.value};return e.patch(t,a),e.applyData(t,a)}}function _y(e,t){const a=t.referenceType;let s="]";if(a==="collapsed"?s+="[]":a==="full"&&(s+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+s}];const l=e.all(t),o=l[0];o&&o.type==="text"?o.value="["+o.value:l.unshift({type:"text",value:"["});const d=l[l.length-1];return d&&d.type==="text"?d.value+=s:l.push({type:"text",value:s}),l}function c5(e,t){const a=String(t.identifier).toUpperCase(),s=e.definitionById.get(a);if(!s)return _y(e,t);const l={src:$i(s.url||""),alt:t.alt};s.title!==null&&s.title!==void 0&&(l.title=s.title);const o={type:"element",tagName:"img",properties:l,children:[]};return e.patch(t,o),e.applyData(t,o)}function d5(e,t){const a={src:$i(t.url)};t.alt!==null&&t.alt!==void 0&&(a.alt=t.alt),t.title!==null&&t.title!==void 0&&(a.title=t.title);const s={type:"element",tagName:"img",properties:a,children:[]};return e.patch(t,s),e.applyData(t,s)}function f5(e,t){const a={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,a);const s={type:"element",tagName:"code",properties:{},children:[a]};return e.patch(t,s),e.applyData(t,s)}function m5(e,t){const a=String(t.identifier).toUpperCase(),s=e.definitionById.get(a);if(!s)return _y(e,t);const l={href:$i(s.url||"")};s.title!==null&&s.title!==void 0&&(l.title=s.title);const o={type:"element",tagName:"a",properties:l,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function h5(e,t){const a={href:$i(t.url)};t.title!==null&&t.title!==void 0&&(a.title=t.title);const s={type:"element",tagName:"a",properties:a,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function p5(e,t,a){const s=e.all(t),l=a?g5(a):Ny(t),o={},d=[];if(typeof t.checked=="boolean"){const b=s[0];let x;b&&b.type==="element"&&b.tagName==="p"?x=b:(x={type:"element",tagName:"p",properties:{},children:[]},s.unshift(x)),x.children.length>0&&x.children.unshift({type:"text",value:" "}),x.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let f=-1;for(;++f<s.length;){const b=s[f];(l||f!==0||b.type!=="element"||b.tagName!=="p")&&d.push({type:"text",value:`
|
|
408
|
+
`}),b.type==="element"&&b.tagName==="p"&&!l?d.push(...b.children):d.push(b)}const h=s[s.length-1];h&&(l||h.type!=="element"||h.tagName!=="p")&&d.push({type:"text",value:`
|
|
409
|
+
`});const m={type:"element",tagName:"li",properties:o,children:d};return e.patch(t,m),e.applyData(t,m)}function g5(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const a=e.children;let s=-1;for(;!t&&++s<a.length;)t=Ny(a[s])}return t}function Ny(e){const t=e.spread;return t??e.children.length>1}function b5(e,t){const a={},s=e.all(t);let l=-1;for(typeof t.start=="number"&&t.start!==1&&(a.start=t.start);++l<s.length;){const d=s[l];if(d.type==="element"&&d.tagName==="li"&&d.properties&&Array.isArray(d.properties.className)&&d.properties.className.includes("task-list-item")){a.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:a,children:e.wrap(s,!0)};return e.patch(t,o),e.applyData(t,o)}function x5(e,t){const a={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function E5(e,t){const a={type:"root",children:e.wrap(e.all(t))};return e.patch(t,a),e.applyData(t,a)}function y5(e,t){const a={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function T5(e,t){const a=e.all(t),s=a.shift(),l=[];if(s){const d={type:"element",tagName:"thead",properties:{},children:e.wrap([s],!0)};e.patch(t.children[0],d),l.push(d)}if(a.length>0){const d={type:"element",tagName:"tbody",properties:{},children:e.wrap(a,!0)},f=Qa(t.children[1]),h=Pc(t.children[t.children.length-1]);f&&h&&(d.position={start:f,end:h}),l.push(d)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(l,!0)};return e.patch(t,o),e.applyData(t,o)}function _5(e,t,a){const s=a?a.children:void 0,o=(s?s.indexOf(t):1)===0?"th":"td",d=a&&a.type==="table"?a.align:void 0,f=d?d.length:t.children.length;let h=-1;const m=[];for(;++h<f;){const x=t.children[h],y={},T=d?d[h]:void 0;T&&(y.align=T);let N={type:"element",tagName:o,properties:y,children:[]};x&&(N.children=e.all(x),e.patch(x,N),N=e.applyData(x,N)),m.push(N)}const b={type:"element",tagName:"tr",properties:{},children:e.wrap(m,!0)};return e.patch(t,b),e.applyData(t,b)}function N5(e,t){const a={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}const Ox=9,Ix=32;function S5(e){const t=String(e),a=/\r?\n|\r/g;let s=a.exec(t),l=0;const o=[];for(;s;)o.push(Mx(t.slice(l,s.index),l>0,!0),s[0]),l=s.index+s[0].length,s=a.exec(t);return o.push(Mx(t.slice(l),l>0,!1)),o.join("")}function Mx(e,t,a){let s=0,l=e.length;if(t){let o=e.codePointAt(s);for(;o===Ox||o===Ix;)s++,o=e.codePointAt(s)}if(a){let o=e.codePointAt(l-1);for(;o===Ox||o===Ix;)l--,o=e.codePointAt(l-1)}return l>s?e.slice(s,l):""}function v5(e,t){const a={type:"text",value:S5(String(t.value))};return e.patch(t,a),e.applyData(t,a)}function A5(e,t){const a={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,a),e.applyData(t,a)}const C5={blockquote:n5,break:a5,code:r5,delete:s5,emphasis:i5,footnoteReference:l5,heading:o5,html:u5,imageReference:c5,image:d5,inlineCode:f5,linkReference:m5,link:h5,listItem:p5,list:b5,paragraph:x5,root:E5,strong:y5,table:T5,tableCell:N5,tableRow:_5,text:v5,thematicBreak:A5,toml:Ku,yaml:Ku,definition:Ku,footnoteDefinition:Ku};function Ku(){}const Sy=-1,Fc=0,no=1,Ec=2,Ih=3,Mh=4,Dh=5,Lh=6,vy=7,Ay=8,Cy=typeof self=="object"?self:globalThis,Dx=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new Cy[e](t)},w5=(e,t)=>{const a=(l,o)=>(e.set(o,l),l),s=l=>{if(e.has(l))return e.get(l);const[o,d]=t[l];switch(o){case Fc:case Sy:return a(d,l);case no:{const f=a([],l);for(const h of d)f.push(s(h));return f}case Ec:{const f=a({},l);for(const[h,m]of d)f[s(h)]=s(m);return f}case Ih:return a(new Date(d),l);case Mh:{const{source:f,flags:h}=d;return a(new RegExp(f,h),l)}case Dh:{const f=a(new Map,l);for(const[h,m]of d)f.set(s(h),s(m));return f}case Lh:{const f=a(new Set,l);for(const h of d)f.add(s(h));return f}case vy:{const{name:f,message:h}=d;return a(typeof Cy[f]=="function"?Dx(f,h):new Error(h),l)}case Ay:return a(BigInt(d),l);case"BigInt":return a(Object(BigInt(d)),l);case"ArrayBuffer":return a(new Uint8Array(d).buffer,d);case"DataView":{const{buffer:f}=new Uint8Array(d);return a(new DataView(f),d)}}return a(Dx(o,d),l)};return s},Lx=e=>w5(new Map,e)(0),Ds="",{toString:k5}={},{keys:R5}=Object,Vl=e=>{const t=typeof e;if(t!=="object"||!e)return[Fc,t];const a=k5.call(e).slice(8,-1);switch(a){case"Array":return[no,Ds];case"Object":return[Ec,Ds];case"Date":return[Ih,Ds];case"RegExp":return[Mh,Ds];case"Map":return[Dh,Ds];case"Set":return[Lh,Ds];case"DataView":return[no,a]}return a.includes("Array")?[no,a]:e instanceof Error?[vy,e.name||"Error"]:[Ec,a]},Vu=([e,t])=>e===Fc&&(t==="function"||t==="symbol"),O5=(e,t,a,s)=>{const l=(d,f)=>{const h=s.push(d)-1;return a.set(f,h),h},o=d=>{if(a.has(d))return a.get(d);let[f,h]=Vl(d);switch(f){case Fc:{let b=d;switch(h){case"bigint":f=Ay,b=d.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+h);b=null;break;case"undefined":return l([Sy],d)}return l([f,b],d)}case no:{if(h){let y=d;return h==="DataView"?y=new Uint8Array(d.buffer):h==="ArrayBuffer"&&(y=new Uint8Array(d)),l([h,[...y]],d)}const b=[],x=l([f,b],d);for(const y of d)b.push(o(y));return x}case Ec:{if(h)switch(h){case"BigInt":return l([h,d.toString()],d);case"Boolean":case"Number":case"String":return l([h,d.valueOf()],d)}if(t&&"toJSON"in d)return o(d.toJSON());const b=[],x=l([f,b],d);for(const y of R5(d))(e||!Vu(Vl(d[y])))&&b.push([o(y),o(d[y])]);return x}case Ih:return l([f,isNaN(d.getTime())?Ds:d.toISOString()],d);case Mh:{const{source:b,flags:x}=d;return l([f,{source:b,flags:x}],d)}case Dh:{const b=[],x=l([f,b],d);for(const[y,T]of d)(e||!(Vu(Vl(y))||Vu(Vl(T))))&&b.push([o(y),o(T)]);return x}case Lh:{const b=[],x=l([f,b],d);for(const y of d)(e||!Vu(Vl(y)))&&b.push(o(y));return x}}const{message:m}=d;return l([f,{name:h,message:m}],d)};return o},jx=(e,{json:t,lossy:a}={})=>{const s=[];return O5(!(t||a),!!t,new Map,s)(e),s},Pi=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Lx(jx(e,t)):structuredClone(e):(e,t)=>Lx(jx(e,t));function I5(e,t){const a=[{type:"text",value:"↩"}];return t>1&&a.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),a}function M5(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function D5(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",a=e.options.footnoteBackContent||I5,s=e.options.footnoteBackLabel||M5,l=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",d=e.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let h=-1;for(;++h<e.footnoteOrder.length;){const m=e.footnoteById.get(e.footnoteOrder[h]);if(!m)continue;const b=e.all(m),x=String(m.identifier).toUpperCase(),y=$i(x.toLowerCase());let T=0;const N=[],S=e.footnoteCounts.get(x);for(;S!==void 0&&++T<=S;){N.length>0&&N.push({type:"text",value:" "});let M=typeof a=="string"?a:a(h,T);typeof M=="string"&&(M={type:"text",value:M}),N.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+y+(T>1?"-"+T:""),dataFootnoteBackref:"",ariaLabel:typeof s=="string"?s:s(h,T),className:["data-footnote-backref"]},children:Array.isArray(M)?M:[M]})}const C=b[b.length-1];if(C&&C.type==="element"&&C.tagName==="p"){const M=C.children[C.children.length-1];M&&M.type==="text"?M.value+=" ":C.children.push({type:"text",value:" "}),C.children.push(...N)}else b.push(...N);const v={type:"element",tagName:"li",properties:{id:t+"fn-"+y},children:e.wrap(b,!0)};e.patch(m,v),f.push(v)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Pi(d),id:"footnote-label"},children:[{type:"text",value:l}]},{type:"text",value:`
|
|
410
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:`
|
|
411
|
+
`}]}}const So=(function(e){if(e==null)return P5;if(typeof e=="function")return zc(e);if(typeof e=="object")return Array.isArray(e)?L5(e):j5(e);if(typeof e=="string")return B5(e);throw new Error("Expected function, string, or object as test")});function L5(e){const t=[];let a=-1;for(;++a<e.length;)t[a]=So(e[a]);return zc(s);function s(...l){let o=-1;for(;++o<t.length;)if(t[o].apply(this,l))return!0;return!1}}function j5(e){const t=e;return zc(a);function a(s){const l=s;let o;for(o in e)if(l[o]!==t[o])return!1;return!0}}function B5(e){return zc(t);function t(a){return a&&a.type===e}}function zc(e){return t;function t(a,s,l){return!!(U5(a)&&e.call(this,a,typeof s=="number"?s:void 0,l||void 0))}}function P5(){return!0}function U5(e){return e!==null&&typeof e=="object"&&"type"in e}const wy=[],H5=!0,Gm=!1,F5="skip";function ky(e,t,a,s){let l;typeof t=="function"&&typeof a!="function"?(s=a,a=t):l=t;const o=So(l),d=s?-1:1;f(e,void 0,[])();function f(h,m,b){const x=h&&typeof h=="object"?h:{};if(typeof x.type=="string"){const T=typeof x.tagName=="string"?x.tagName:typeof x.name=="string"?x.name:void 0;Object.defineProperty(y,"name",{value:"node ("+(h.type+(T?"<"+T+">":""))+")"})}return y;function y(){let T=wy,N,S,C;if((!t||o(h,m,b[b.length-1]||void 0))&&(T=z5(a(h,b)),T[0]===Gm))return T;if("children"in h&&h.children){const v=h;if(v.children&&T[0]!==F5)for(S=(s?v.children.length:-1)+d,C=b.concat(v);S>-1&&S<v.children.length;){const M=v.children[S];if(N=f(M,S,C)(),N[0]===Gm)return N;S=typeof N[1]=="number"?N[1]:S+d}}return T}}}function z5(e){return Array.isArray(e)?e:typeof e=="number"?[H5,e]:e==null?wy:[e]}function vo(e,t,a,s){let l,o,d;typeof t=="function"&&typeof a!="function"?(o=void 0,d=t,l=a):(o=t,d=a,l=s),ky(e,o,f,l);function f(h,m){const b=m[m.length-1],x=b?b.children.indexOf(h):void 0;return d(h,x,b)}}const Km={}.hasOwnProperty,q5={};function Y5(e,t){const a=t||q5,s=new Map,l=new Map,o=new Map,d={...C5,...a.handlers},f={all:m,applyData:G5,definitionById:s,footnoteById:l,footnoteCounts:o,footnoteOrder:[],handlers:d,one:h,options:a,patch:$5,wrap:V5};return vo(e,function(b){if(b.type==="definition"||b.type==="footnoteDefinition"){const x=b.type==="definition"?s:l,y=String(b.identifier).toUpperCase();x.has(y)||x.set(y,b)}}),f;function h(b,x){const y=b.type,T=f.handlers[y];if(Km.call(f.handlers,y)&&T)return T(f,b,x);if(f.options.passThrough&&f.options.passThrough.includes(y)){if("children"in b){const{children:S,...C}=b,v=Pi(C);return v.children=f.all(b),v}return Pi(b)}return(f.options.unknownHandler||K5)(f,b,x)}function m(b){const x=[];if("children"in b){const y=b.children;let T=-1;for(;++T<y.length;){const N=f.one(y[T],b);if(N){if(T&&y[T-1].type==="break"&&(!Array.isArray(N)&&N.type==="text"&&(N.value=Bx(N.value)),!Array.isArray(N)&&N.type==="element")){const S=N.children[0];S&&S.type==="text"&&(S.value=Bx(S.value))}Array.isArray(N)?x.push(...N):x.push(N)}}}return x}}function $5(e,t){e.position&&(t.position=MC(e))}function G5(e,t){let a=t;if(e&&e.data){const s=e.data.hName,l=e.data.hChildren,o=e.data.hProperties;if(typeof s=="string")if(a.type==="element")a.tagName=s;else{const d="children"in a?a.children:[a];a={type:"element",tagName:s,properties:{},children:d}}a.type==="element"&&o&&Object.assign(a.properties,Pi(o)),"children"in a&&a.children&&l!==null&&l!==void 0&&(a.children=l)}return a}function K5(e,t){const a=t.data||{},s="value"in t&&!(Km.call(a,"hProperties")||Km.call(a,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function V5(e,t){const a=[];let s=-1;for(t&&a.push({type:"text",value:`
|
|
412
|
+
`});++s<e.length;)s&&a.push({type:"text",value:`
|
|
413
|
+
`}),a.push(e[s]);return t&&e.length>0&&a.push({type:"text",value:`
|
|
414
|
+
`}),a}function Bx(e){let t=0,a=e.charCodeAt(t);for(;a===9||a===32;)t++,a=e.charCodeAt(t);return e.slice(t)}function Px(e,t){const a=Y5(e,t),s=a.one(e,void 0),l=D5(a),o=Array.isArray(s)?{type:"root",children:s}:s||{type:"root",children:[]};return l&&o.children.push({type:"text",value:`
|
|
415
|
+
`},l),o}function Q5(e,t){return e&&"run"in e?async function(a,s){const l=Px(a,{file:s,...t});await e.run(l,s)}:function(a,s){return Px(a,{file:s,...e||t})}}function Ux(e){if(e)throw e}var mm,Hx;function X5(){if(Hx)return mm;Hx=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,l=function(m){return typeof Array.isArray=="function"?Array.isArray(m):t.call(m)==="[object Array]"},o=function(m){if(!m||t.call(m)!=="[object Object]")return!1;var b=e.call(m,"constructor"),x=m.constructor&&m.constructor.prototype&&e.call(m.constructor.prototype,"isPrototypeOf");if(m.constructor&&!b&&!x)return!1;var y;for(y in m);return typeof y>"u"||e.call(m,y)},d=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},f=function(m,b){if(b==="__proto__")if(e.call(m,b)){if(s)return s(m,b).value}else return;return m[b]};return mm=function h(){var m,b,x,y,T,N,S=arguments[0],C=1,v=arguments.length,M=!1;for(typeof S=="boolean"&&(M=S,S=arguments[1]||{},C=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});C<v;++C)if(m=arguments[C],m!=null)for(b in m)x=f(S,b),y=f(m,b),S!==y&&(M&&y&&(o(y)||(T=l(y)))?(T?(T=!1,N=x&&l(x)?x:[]):N=x&&o(x)?x:{},d(S,{name:b,newValue:h(M,N,y)})):typeof y<"u"&&d(S,{name:b,newValue:y}));return S},mm}var Z5=X5();const hm=Cc(Z5);function Vm(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function W5(){const e=[],t={run:a,use:s};return t;function a(...l){let o=-1;const d=l.pop();if(typeof d!="function")throw new TypeError("Expected function as last argument, not "+d);f(null,...l);function f(h,...m){const b=e[++o];let x=-1;if(h){d(h);return}for(;++x<l.length;)(m[x]===null||m[x]===void 0)&&(m[x]=l[x]);l=m,b?J5(b,f)(...m):d(null,...m)}}function s(l){if(typeof l!="function")throw new TypeError("Expected `middelware` to be a function, not "+l);return e.push(l),t}}function J5(e,t){let a;return s;function s(...d){const f=e.length>d.length;let h;f&&d.push(l);try{h=e.apply(this,d)}catch(m){const b=m;if(f&&a)throw b;return l(b)}f||(h&&h.then&&typeof h.then=="function"?h.then(o,l):h instanceof Error?l(h):o(h))}function l(d,...f){a||(a=!0,t(d,...f))}function o(d){l(null,d)}}const $a={basename:eR,dirname:tR,extname:nR,join:aR,sep:"/"};function eR(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Ao(e);let a=0,s=-1,l=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;l--;)if(e.codePointAt(l)===47){if(o){a=l+1;break}}else s<0&&(o=!0,s=l+1);return s<0?"":e.slice(a,s)}if(t===e)return"";let d=-1,f=t.length-1;for(;l--;)if(e.codePointAt(l)===47){if(o){a=l+1;break}}else d<0&&(o=!0,d=l+1),f>-1&&(e.codePointAt(l)===t.codePointAt(f--)?f<0&&(s=l):(f=-1,s=d));return a===s?s=d:s<0&&(s=e.length),e.slice(a,s)}function tR(e){if(Ao(e),e.length===0)return".";let t=-1,a=e.length,s;for(;--a;)if(e.codePointAt(a)===47){if(s){t=a;break}}else s||(s=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function nR(e){Ao(e);let t=e.length,a=-1,s=0,l=-1,o=0,d;for(;t--;){const f=e.codePointAt(t);if(f===47){if(d){s=t+1;break}continue}a<0&&(d=!0,a=t+1),f===46?l<0?l=t:o!==1&&(o=1):l>-1&&(o=-1)}return l<0||a<0||o===0||o===1&&l===a-1&&l===s+1?"":e.slice(l,a)}function aR(...e){let t=-1,a;for(;++t<e.length;)Ao(e[t]),e[t]&&(a=a===void 0?e[t]:a+"/"+e[t]);return a===void 0?".":rR(a)}function rR(e){Ao(e);const t=e.codePointAt(0)===47;let a=sR(e,!t);return a.length===0&&!t&&(a="."),a.length>0&&e.codePointAt(e.length-1)===47&&(a+="/"),t?"/"+a:a}function sR(e,t){let a="",s=0,l=-1,o=0,d=-1,f,h;for(;++d<=e.length;){if(d<e.length)f=e.codePointAt(d);else{if(f===47)break;f=47}if(f===47){if(!(l===d-1||o===1))if(l!==d-1&&o===2){if(a.length<2||s!==2||a.codePointAt(a.length-1)!==46||a.codePointAt(a.length-2)!==46){if(a.length>2){if(h=a.lastIndexOf("/"),h!==a.length-1){h<0?(a="",s=0):(a=a.slice(0,h),s=a.length-1-a.lastIndexOf("/")),l=d,o=0;continue}}else if(a.length>0){a="",s=0,l=d,o=0;continue}}t&&(a=a.length>0?a+"/..":"..",s=2)}else a.length>0?a+="/"+e.slice(l+1,d):a=e.slice(l+1,d),s=d-l-1;l=d,o=0}else f===46&&o>-1?o++:o=-1}return a}function Ao(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const iR={cwd:lR};function lR(){return"/"}function Qm(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function oR(e){if(typeof e=="string")e=new URL(e);else if(!Qm(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return uR(e)}function uR(e){if(e.hostname!==""){const s=new TypeError('File URL host must be "localhost" or empty on darwin');throw s.code="ERR_INVALID_FILE_URL_HOST",s}const t=e.pathname;let a=-1;for(;++a<t.length;)if(t.codePointAt(a)===37&&t.codePointAt(a+1)===50){const s=t.codePointAt(a+2);if(s===70||s===102){const l=new TypeError("File URL path must not include encoded / characters");throw l.code="ERR_INVALID_FILE_URL_PATH",l}}return decodeURIComponent(t)}const pm=["history","path","basename","stem","extname","dirname"];class Ry{constructor(t){let a;t?Qm(t)?a={path:t}:typeof t=="string"||cR(t)?a={value:t}:a=t:a={},this.cwd="cwd"in a?"":iR.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let s=-1;for(;++s<pm.length;){const o=pm[s];o in a&&a[o]!==void 0&&a[o]!==null&&(this[o]=o==="history"?[...a[o]]:a[o])}let l;for(l in a)pm.includes(l)||(this[l]=a[l])}get basename(){return typeof this.path=="string"?$a.basename(this.path):void 0}set basename(t){bm(t,"basename"),gm(t,"basename"),this.path=$a.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?$a.dirname(this.path):void 0}set dirname(t){Fx(this.basename,"dirname"),this.path=$a.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?$a.extname(this.path):void 0}set extname(t){if(gm(t,"extname"),Fx(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=$a.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Qm(t)&&(t=oR(t)),bm(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?$a.basename(this.path,this.extname):void 0}set stem(t){bm(t,"stem"),gm(t,"stem"),this.path=$a.join(this.dirname||"",t+(this.extname||""))}fail(t,a,s){const l=this.message(t,a,s);throw l.fatal=!0,l}info(t,a,s){const l=this.message(t,a,s);return l.fatal=void 0,l}message(t,a,s){const l=new vn(t,a,s);return this.path&&(l.name=this.path+":"+l.name,l.file=this.path),l.fatal=!1,this.messages.push(l),l}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function gm(e,t){if(e&&e.includes($a.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+$a.sep+"`")}function bm(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Fx(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function cR(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const dR=(function(e){const s=this.constructor.prototype,l=s[e],o=function(){return l.apply(o,arguments)};return Object.setPrototypeOf(o,s),o}),fR={}.hasOwnProperty;class jh extends dR{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=W5()}copy(){const t=new jh;let a=-1;for(;++a<this.attachers.length;){const s=this.attachers[a];t.use(...s)}return t.data(hm(!0,{},this.namespace)),t}data(t,a){return typeof t=="string"?arguments.length===2?(ym("data",this.frozen),this.namespace[t]=a,this):fR.call(this.namespace,t)&&this.namespace[t]||void 0:t?(ym("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[a,...s]=this.attachers[this.freezeIndex];if(s[0]===!1)continue;s[0]===!0&&(s[0]=void 0);const l=a.call(t,...s);typeof l=="function"&&this.transformers.use(l)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const a=Qu(t),s=this.parser||this.Parser;return xm("parse",s),s(String(a),a)}process(t,a){const s=this;return this.freeze(),xm("process",this.parser||this.Parser),Em("process",this.compiler||this.Compiler),a?l(void 0,a):new Promise(l);function l(o,d){const f=Qu(t),h=s.parse(f);s.run(h,f,function(b,x,y){if(b||!x||!y)return m(b);const T=x,N=s.stringify(T,y);pR(N)?y.value=N:y.result=N,m(b,y)});function m(b,x){b||!x?d(b):o?o(x):a(void 0,x)}}}processSync(t){let a=!1,s;return this.freeze(),xm("processSync",this.parser||this.Parser),Em("processSync",this.compiler||this.Compiler),this.process(t,l),qx("processSync","process",a),s;function l(o,d){a=!0,Ux(o),s=d}}run(t,a,s){zx(t),this.freeze();const l=this.transformers;return!s&&typeof a=="function"&&(s=a,a=void 0),s?o(void 0,s):new Promise(o);function o(d,f){const h=Qu(a);l.run(t,h,m);function m(b,x,y){const T=x||t;b?f(b):d?d(T):s(void 0,T,y)}}}runSync(t,a){let s=!1,l;return this.run(t,a,o),qx("runSync","run",s),l;function o(d,f){Ux(d),l=f,s=!0}}stringify(t,a){this.freeze();const s=Qu(a),l=this.compiler||this.Compiler;return Em("stringify",l),zx(t),l(t,s)}use(t,...a){const s=this.attachers,l=this.namespace;if(ym("use",this.frozen),t!=null)if(typeof t=="function")h(t,a);else if(typeof t=="object")Array.isArray(t)?f(t):d(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(m){if(typeof m=="function")h(m,[]);else if(typeof m=="object")if(Array.isArray(m)){const[b,...x]=m;h(b,x)}else d(m);else throw new TypeError("Expected usable value, not `"+m+"`")}function d(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");f(m.plugins),m.settings&&(l.settings=hm(!0,l.settings,m.settings))}function f(m){let b=-1;if(m!=null)if(Array.isArray(m))for(;++b<m.length;){const x=m[b];o(x)}else throw new TypeError("Expected a list of plugins, not `"+m+"`")}function h(m,b){let x=-1,y=-1;for(;++x<s.length;)if(s[x][0]===m){y=x;break}if(y===-1)s.push([m,...b]);else if(b.length>0){let[T,...N]=b;const S=s[y][1];Vm(S)&&Vm(T)&&(T=hm(!0,S,T)),s[y]=[m,T,...N]}}}}const mR=new jh().freeze();function xm(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Em(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function ym(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function zx(e){if(!Vm(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function qx(e,t,a){if(!a)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Qu(e){return hR(e)?e:new Ry(e)}function hR(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function pR(e){return typeof e=="string"||gR(e)}function gR(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const bR="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Yx=[],$x={allowDangerousHtml:!0},xR=/^(https?|ircs?|mailto|xmpp)$/i,ER=[{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 ls(e){const t=yR(e),a=TR(e);return _R(t.runSync(t.parse(a),a),e)}function yR(e){const t=e.rehypePlugins||Yx,a=e.remarkPlugins||Yx,s=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...$x}:$x;return mR().use(t5).use(a).use(Q5,s).use(t)}function TR(e){const t=e.children||"",a=new Ry;return typeof t=="string"&&(a.value=t),a}function _R(e,t){const a=t.allowedElements,s=t.allowElement,l=t.components,o=t.disallowedElements,d=t.skipHtml,f=t.unwrapDisallowed,h=t.urlTransform||NR;for(const b of ER)Object.hasOwn(t,b.from)&&(""+b.from+(b.to?"use `"+b.to+"` instead":"remove it")+bR+b.id,void 0);return vo(e,m),PC(e,{Fragment:c.Fragment,components:l,ignoreInvalidStyle:!0,jsx:c.jsx,jsxs:c.jsxs,passKeys:!0,passNode:!0});function m(b,x,y){if(b.type==="raw"&&y&&typeof x=="number")return d?y.children.splice(x,1):y.children[x]={type:"text",value:b.value},x;if(b.type==="element"){let T;for(T in cm)if(Object.hasOwn(cm,T)&&Object.hasOwn(b.properties,T)){const N=b.properties[T],S=cm[T];(S===null||S.includes(b.tagName))&&(b.properties[T]=h(String(N||""),T,b))}}if(b.type==="element"){let T=a?!a.includes(b.tagName):o?o.includes(b.tagName):!1;if(!T&&s&&typeof x=="number"&&(T=!s(b,x,y)),T&&y&&typeof x=="number")return f&&b.children?y.children.splice(x,1,...b.children):y.children.splice(x,1),x}}}function NR(e){const t=e.indexOf(":"),a=e.indexOf("?"),s=e.indexOf("#"),l=e.indexOf("/");return t===-1||l!==-1&&t>l||a!==-1&&t>a||s!==-1&&t>s||xR.test(e.slice(0,t))?e:""}function Gx(e,t){const a=String(e);if(typeof t!="string")throw new TypeError("Expected character");let s=0,l=a.indexOf(t);for(;l!==-1;)s++,l=a.indexOf(t,l+t.length);return s}function SR(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function vR(e,t,a){const l=So((a||{}).ignore||[]),o=AR(t);let d=-1;for(;++d<o.length;)ky(e,"text",f);function f(m,b){let x=-1,y;for(;++x<b.length;){const T=b[x],N=y?y.children:void 0;if(l(T,N?N.indexOf(T):void 0,y))return;y=T}if(y)return h(m,b)}function h(m,b){const x=b[b.length-1],y=o[d][0],T=o[d][1];let N=0;const C=x.children.indexOf(m);let v=!1,M=[];y.lastIndex=0;let k=y.exec(m.value);for(;k;){const D=k.index,$={index:k.index,input:k.input,stack:[...b,m]};let L=T(...k,$);if(typeof L=="string"&&(L=L.length>0?{type:"text",value:L}:void 0),L===!1?y.lastIndex=D+1:(N!==D&&M.push({type:"text",value:m.value.slice(N,D)}),Array.isArray(L)?M.push(...L):L&&M.push(L),N=D+k[0].length,v=!0),!y.global)break;k=y.exec(m.value)}return v?(N<m.value.length&&M.push({type:"text",value:m.value.slice(N)}),x.children.splice(C,1,...M)):M=[m],C+M.length}}function AR(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const a=!e[0]||Array.isArray(e[0])?e:[e];let s=-1;for(;++s<a.length;){const l=a[s];t.push([CR(l[0]),wR(l[1])])}return t}function CR(e){return typeof e=="string"?new RegExp(SR(e),"g"):e}function wR(e){return typeof e=="function"?e:function(){return e}}const Tm="phrasing",_m=["autolink","link","image","label"];function kR(){return{transforms:[jR],enter:{literalAutolink:OR,literalAutolinkEmail:Nm,literalAutolinkHttp:Nm,literalAutolinkWww:Nm},exit:{literalAutolink:LR,literalAutolinkEmail:DR,literalAutolinkHttp:IR,literalAutolinkWww:MR}}}function RR(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Tm,notInConstruct:_m},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Tm,notInConstruct:_m},{character:":",before:"[ps]",after:"\\/",inConstruct:Tm,notInConstruct:_m}]}}function OR(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Nm(e){this.config.enter.autolinkProtocol.call(this,e)}function IR(e){this.config.exit.autolinkProtocol.call(this,e)}function MR(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function DR(e){this.config.exit.autolinkEmail.call(this,e)}function LR(e){this.exit(e)}function jR(e){vR(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,BR],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),PR]],{ignore:["link","linkReference"]})}function BR(e,t,a,s,l){let o="";if(!Oy(l)||(/^w/i.test(t)&&(a=t+a,t="",o="http://"),!UR(a)))return!1;const d=HR(a+s);if(!d[0])return!1;const f={type:"link",title:null,url:o+t+d[0],children:[{type:"text",value:t+d[0]}]};return d[1]?[f,{type:"text",value:d[1]}]:f}function PR(e,t,a,s){return!Oy(s,!0)||/[-\d_]$/.test(a)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+a,children:[{type:"text",value:t+"@"+a}]}}function UR(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function HR(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let a=t[0],s=a.indexOf(")");const l=Gx(e,"(");let o=Gx(e,")");for(;s!==-1&&l>o;)e+=a.slice(0,s+1),a=a.slice(s+1),s=a.indexOf(")"),o++;return[e,a]}function Oy(e,t){const a=e.input.charCodeAt(e.index-1);return(e.index===0||Hs(a)||Uc(a))&&(!t||a!==47)}Iy.peek=QR;function FR(){this.buffer()}function zR(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function qR(){this.buffer()}function YR(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function $R(e){const t=this.resume(),a=this.stack[this.stack.length-1];a.type,a.identifier=Oa(this.sliceSerialize(e)).toLowerCase(),a.label=t}function GR(e){this.exit(e)}function KR(e){const t=this.resume(),a=this.stack[this.stack.length-1];a.type,a.identifier=Oa(this.sliceSerialize(e)).toLowerCase(),a.label=t}function VR(e){this.exit(e)}function QR(){return"["}function Iy(e,t,a,s){const l=a.createTracker(s);let o=l.move("[^");const d=a.enter("footnoteReference"),f=a.enter("reference");return o+=l.move(a.safe(a.associationId(e),{after:"]",before:o})),f(),d(),o+=l.move("]"),o}function XR(){return{enter:{gfmFootnoteCallString:FR,gfmFootnoteCall:zR,gfmFootnoteDefinitionLabelString:qR,gfmFootnoteDefinition:YR},exit:{gfmFootnoteCallString:$R,gfmFootnoteCall:GR,gfmFootnoteDefinitionLabelString:KR,gfmFootnoteDefinition:VR}}}function ZR(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:a,footnoteReference:Iy},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function a(s,l,o,d){const f=o.createTracker(d);let h=f.move("[^");const m=o.enter("footnoteDefinition"),b=o.enter("label");return h+=f.move(o.safe(o.associationId(s),{before:h,after:"]"})),b(),h+=f.move("]:"),s.children&&s.children.length>0&&(f.shift(4),h+=f.move((t?`
|
|
416
|
+
`:" ")+o.indentLines(o.containerFlow(s,f.current()),t?My:WR))),m(),h}}function WR(e,t,a){return t===0?e:My(e,t,a)}function My(e,t,a){return(a?"":" ")+e}const JR=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Dy.peek=rO;function eO(){return{canContainEols:["delete"],enter:{strikethrough:nO},exit:{strikethrough:aO}}}function tO(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:JR}],handlers:{delete:Dy}}}function nO(e){this.enter({type:"delete",children:[]},e)}function aO(e){this.exit(e)}function Dy(e,t,a,s){const l=a.createTracker(s),o=a.enter("strikethrough");let d=l.move("~~");return d+=a.containerPhrasing(e,{...l.current(),before:d,after:"~"}),d+=l.move("~~"),o(),d}function rO(){return"~"}function sO(e){return e.length}function iO(e,t){const a=t||{},s=(a.align||[]).concat(),l=a.stringLength||sO,o=[],d=[],f=[],h=[];let m=0,b=-1;for(;++b<e.length;){const S=[],C=[];let v=-1;for(e[b].length>m&&(m=e[b].length);++v<e[b].length;){const M=lO(e[b][v]);if(a.alignDelimiters!==!1){const k=l(M);C[v]=k,(h[v]===void 0||k>h[v])&&(h[v]=k)}S.push(M)}d[b]=S,f[b]=C}let x=-1;if(typeof s=="object"&&"length"in s)for(;++x<m;)o[x]=Kx(s[x]);else{const S=Kx(s);for(;++x<m;)o[x]=S}x=-1;const y=[],T=[];for(;++x<m;){const S=o[x];let C="",v="";S===99?(C=":",v=":"):S===108?C=":":S===114&&(v=":");let M=a.alignDelimiters===!1?1:Math.max(1,h[x]-C.length-v.length);const k=C+"-".repeat(M)+v;a.alignDelimiters!==!1&&(M=C.length+M+v.length,M>h[x]&&(h[x]=M),T[x]=M),y[x]=k}d.splice(1,0,y),f.splice(1,0,T),b=-1;const N=[];for(;++b<d.length;){const S=d[b],C=f[b];x=-1;const v=[];for(;++x<m;){const M=S[x]||"";let k="",D="";if(a.alignDelimiters!==!1){const $=h[x]-(C[x]||0),L=o[x];L===114?k=" ".repeat($):L===99?$%2?(k=" ".repeat($/2+.5),D=" ".repeat($/2-.5)):(k=" ".repeat($/2),D=k):D=" ".repeat($)}a.delimiterStart!==!1&&!x&&v.push("|"),a.padding!==!1&&!(a.alignDelimiters===!1&&M==="")&&(a.delimiterStart!==!1||x)&&v.push(" "),a.alignDelimiters!==!1&&v.push(k),v.push(M),a.alignDelimiters!==!1&&v.push(D),a.padding!==!1&&v.push(" "),(a.delimiterEnd!==!1||x!==m-1)&&v.push("|")}N.push(a.delimiterEnd===!1?v.join("").replace(/ +$/,""):v.join(""))}return N.join(`
|
|
417
|
+
`)}function lO(e){return e==null?"":String(e)}function Kx(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}const Vx={}.hasOwnProperty;function Ly(e,t){const a=t||{};function s(l,...o){let d=s.invalid;const f=s.handlers;if(l&&Vx.call(l,e)){const h=String(l[e]);d=Vx.call(f,h)?f[h]:s.unknown}if(d)return d.call(this,l,...o)}return s.handlers=a.handlers||{},s.invalid=a.invalid,s.unknown=a.unknown,s}function oO(e,t,a,s){const l=a.enter("blockquote"),o=a.createTracker(s);o.move("> "),o.shift(2);const d=a.indentLines(a.containerFlow(e,o.current()),uO);return l(),d}function uO(e,t,a){return">"+(a?"":" ")+e}function cO(e,t){return Qx(e,t.inConstruct,!0)&&!Qx(e,t.notInConstruct,!1)}function Qx(e,t,a){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return a;let s=-1;for(;++s<t.length;)if(e.includes(t[s]))return!0;return!1}function Xx(e,t,a,s){let l=-1;for(;++l<a.unsafe.length;)if(a.unsafe[l].character===`
|
|
418
|
+
`&&cO(a.stack,a.unsafe[l]))return/[ \t]/.test(s.before)?"":" ";return`\\
|
|
419
|
+
`}function dO(e,t){const a=String(e);let s=a.indexOf(t),l=s,o=0,d=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;s!==-1;)s===l?++o>d&&(d=o):o=1,l=s+t.length,s=a.indexOf(t,l);return d}function fO(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function mO(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function hO(e,t,a,s){const l=mO(a),o=e.value||"",d=l==="`"?"GraveAccent":"Tilde";if(fO(e,a)){const x=a.enter("codeIndented"),y=a.indentLines(o,pO);return x(),y}const f=a.createTracker(s),h=l.repeat(Math.max(dO(o,l)+1,3)),m=a.enter("codeFenced");let b=f.move(h);if(e.lang){const x=a.enter(`codeFencedLang${d}`);b+=f.move(a.safe(e.lang,{before:b,after:" ",encode:["`"],...f.current()})),x()}if(e.lang&&e.meta){const x=a.enter(`codeFencedMeta${d}`);b+=f.move(" "),b+=f.move(a.safe(e.meta,{before:b,after:`
|
|
420
|
+
`,encode:["`"],...f.current()})),x()}return b+=f.move(`
|
|
421
|
+
`),o&&(b+=f.move(o+`
|
|
422
|
+
`)),b+=f.move(h),m(),b}function pO(e,t,a){return(a?"":" ")+e}function Bh(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function gO(e,t,a,s){const l=Bh(a),o=l==='"'?"Quote":"Apostrophe",d=a.enter("definition");let f=a.enter("label");const h=a.createTracker(s);let m=h.move("[");return m+=h.move(a.safe(a.associationId(e),{before:m,after:"]",...h.current()})),m+=h.move("]: "),f(),!e.url||/[\0- \u007F]/.test(e.url)?(f=a.enter("destinationLiteral"),m+=h.move("<"),m+=h.move(a.safe(e.url,{before:m,after:">",...h.current()})),m+=h.move(">")):(f=a.enter("destinationRaw"),m+=h.move(a.safe(e.url,{before:m,after:e.title?" ":`
|
|
423
|
+
`,...h.current()}))),f(),e.title&&(f=a.enter(`title${o}`),m+=h.move(" "+l),m+=h.move(a.safe(e.title,{before:m,after:l,...h.current()})),m+=h.move(l),f()),d(),m}function bO(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function bo(e){return"&#x"+e.toString(16).toUpperCase()+";"}function yc(e,t,a){const s=Bi(e),l=Bi(t);return s===void 0?l===void 0?a==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:l===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:s===1?l===void 0?{inside:!1,outside:!1}:l===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:l===void 0?{inside:!1,outside:!1}:l===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}jy.peek=xO;function jy(e,t,a,s){const l=bO(a),o=a.enter("emphasis"),d=a.createTracker(s),f=d.move(l);let h=d.move(a.containerPhrasing(e,{after:l,before:f,...d.current()}));const m=h.charCodeAt(0),b=yc(s.before.charCodeAt(s.before.length-1),m,l);b.inside&&(h=bo(m)+h.slice(1));const x=h.charCodeAt(h.length-1),y=yc(s.after.charCodeAt(0),x,l);y.inside&&(h=h.slice(0,-1)+bo(x));const T=d.move(l);return o(),a.attentionEncodeSurroundingInfo={after:y.outside,before:b.outside},f+h+T}function xO(e,t,a){return a.options.emphasis||"*"}function EO(e,t){let a=!1;return vo(e,function(s){if("value"in s&&/\r?\n|\r/.test(s.value)||s.type==="break")return a=!0,Gm}),!!((!e.depth||e.depth<3)&&kh(e)&&(t.options.setext||a))}function yO(e,t,a,s){const l=Math.max(Math.min(6,e.depth||1),1),o=a.createTracker(s);if(EO(e,a)){const b=a.enter("headingSetext"),x=a.enter("phrasing"),y=a.containerPhrasing(e,{...o.current(),before:`
|
|
424
|
+
`,after:`
|
|
425
|
+
`});return x(),b(),y+`
|
|
426
|
+
`+(l===1?"=":"-").repeat(y.length-(Math.max(y.lastIndexOf("\r"),y.lastIndexOf(`
|
|
427
|
+
`))+1))}const d="#".repeat(l),f=a.enter("headingAtx"),h=a.enter("phrasing");o.move(d+" ");let m=a.containerPhrasing(e,{before:"# ",after:`
|
|
428
|
+
`,...o.current()});return/^[\t ]/.test(m)&&(m=bo(m.charCodeAt(0))+m.slice(1)),m=m?d+" "+m:d,a.options.closeAtx&&(m+=" "+d),h(),f(),m}By.peek=TO;function By(e){return e.value||""}function TO(){return"<"}Py.peek=_O;function Py(e,t,a,s){const l=Bh(a),o=l==='"'?"Quote":"Apostrophe",d=a.enter("image");let f=a.enter("label");const h=a.createTracker(s);let m=h.move("![");return m+=h.move(a.safe(e.alt,{before:m,after:"]",...h.current()})),m+=h.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=a.enter("destinationLiteral"),m+=h.move("<"),m+=h.move(a.safe(e.url,{before:m,after:">",...h.current()})),m+=h.move(">")):(f=a.enter("destinationRaw"),m+=h.move(a.safe(e.url,{before:m,after:e.title?" ":")",...h.current()}))),f(),e.title&&(f=a.enter(`title${o}`),m+=h.move(" "+l),m+=h.move(a.safe(e.title,{before:m,after:l,...h.current()})),m+=h.move(l),f()),m+=h.move(")"),d(),m}function _O(){return"!"}Uy.peek=NO;function Uy(e,t,a,s){const l=e.referenceType,o=a.enter("imageReference");let d=a.enter("label");const f=a.createTracker(s);let h=f.move("![");const m=a.safe(e.alt,{before:h,after:"]",...f.current()});h+=f.move(m+"]["),d();const b=a.stack;a.stack=[],d=a.enter("reference");const x=a.safe(a.associationId(e),{before:h,after:"]",...f.current()});return d(),a.stack=b,o(),l==="full"||!m||m!==x?h+=f.move(x+"]"):l==="shortcut"?h=h.slice(0,-1):h+=f.move("]"),h}function NO(){return"!"}Hy.peek=SO;function Hy(e,t,a){let s=e.value||"",l="`",o=-1;for(;new RegExp("(^|[^`])"+l+"([^`]|$)").test(s);)l+="`";for(/[^ \r\n]/.test(s)&&(/^[ \r\n]/.test(s)&&/[ \r\n]$/.test(s)||/^`|`$/.test(s))&&(s=" "+s+" ");++o<a.unsafe.length;){const d=a.unsafe[o],f=a.compilePattern(d);let h;if(d.atBreak)for(;h=f.exec(s);){let m=h.index;s.charCodeAt(m)===10&&s.charCodeAt(m-1)===13&&m--,s=s.slice(0,m)+" "+s.slice(h.index+1)}}return l+s+l}function SO(){return"`"}function Fy(e,t){const a=kh(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(a===e.url||"mailto:"+a===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}zy.peek=vO;function zy(e,t,a,s){const l=Bh(a),o=l==='"'?"Quote":"Apostrophe",d=a.createTracker(s);let f,h;if(Fy(e,a)){const b=a.stack;a.stack=[],f=a.enter("autolink");let x=d.move("<");return x+=d.move(a.containerPhrasing(e,{before:x,after:">",...d.current()})),x+=d.move(">"),f(),a.stack=b,x}f=a.enter("link"),h=a.enter("label");let m=d.move("[");return m+=d.move(a.containerPhrasing(e,{before:m,after:"](",...d.current()})),m+=d.move("]("),h(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(h=a.enter("destinationLiteral"),m+=d.move("<"),m+=d.move(a.safe(e.url,{before:m,after:">",...d.current()})),m+=d.move(">")):(h=a.enter("destinationRaw"),m+=d.move(a.safe(e.url,{before:m,after:e.title?" ":")",...d.current()}))),h(),e.title&&(h=a.enter(`title${o}`),m+=d.move(" "+l),m+=d.move(a.safe(e.title,{before:m,after:l,...d.current()})),m+=d.move(l),h()),m+=d.move(")"),f(),m}function vO(e,t,a){return Fy(e,a)?"<":"["}qy.peek=AO;function qy(e,t,a,s){const l=e.referenceType,o=a.enter("linkReference");let d=a.enter("label");const f=a.createTracker(s);let h=f.move("[");const m=a.containerPhrasing(e,{before:h,after:"]",...f.current()});h+=f.move(m+"]["),d();const b=a.stack;a.stack=[],d=a.enter("reference");const x=a.safe(a.associationId(e),{before:h,after:"]",...f.current()});return d(),a.stack=b,o(),l==="full"||!m||m!==x?h+=f.move(x+"]"):l==="shortcut"?h=h.slice(0,-1):h+=f.move("]"),h}function AO(){return"["}function Ph(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function CO(e){const t=Ph(e),a=e.options.bulletOther;if(!a)return t==="*"?"-":"*";if(a!=="*"&&a!=="+"&&a!=="-")throw new Error("Cannot serialize items with `"+a+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(a===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+a+"`) to be different");return a}function wO(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Yy(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function kO(e,t,a,s){const l=a.enter("list"),o=a.bulletCurrent;let d=e.ordered?wO(a):Ph(a);const f=e.ordered?d==="."?")":".":CO(a);let h=t&&a.bulletLastUsed?d===a.bulletLastUsed:!1;if(!e.ordered){const b=e.children?e.children[0]:void 0;if((d==="*"||d==="-")&&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&&(h=!0),Yy(a)===d&&b){let x=-1;for(;++x<e.children.length;){const y=e.children[x];if(y&&y.type==="listItem"&&y.children&&y.children[0]&&y.children[0].type==="thematicBreak"){h=!0;break}}}}h&&(d=f),a.bulletCurrent=d;const m=a.containerFlow(e,s);return a.bulletLastUsed=d,a.bulletCurrent=o,l(),m}function RO(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function OO(e,t,a,s){const l=RO(a);let o=a.bulletCurrent||Ph(a);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(a.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let d=o.length+1;(l==="tab"||l==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(d=Math.ceil(d/4)*4);const f=a.createTracker(s);f.move(o+" ".repeat(d-o.length)),f.shift(d);const h=a.enter("listItem"),m=a.indentLines(a.containerFlow(e,f.current()),b);return h(),m;function b(x,y,T){return y?(T?"":" ".repeat(d))+x:(T?o:o+" ".repeat(d-o.length))+x}}function IO(e,t,a,s){const l=a.enter("paragraph"),o=a.enter("phrasing"),d=a.containerPhrasing(e,s);return o(),l(),d}const MO=So(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function DO(e,t,a,s){return(e.children.some(function(d){return MO(d)})?a.containerPhrasing:a.containerFlow).call(a,e,s)}function LO(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}$y.peek=jO;function $y(e,t,a,s){const l=LO(a),o=a.enter("strong"),d=a.createTracker(s),f=d.move(l+l);let h=d.move(a.containerPhrasing(e,{after:l,before:f,...d.current()}));const m=h.charCodeAt(0),b=yc(s.before.charCodeAt(s.before.length-1),m,l);b.inside&&(h=bo(m)+h.slice(1));const x=h.charCodeAt(h.length-1),y=yc(s.after.charCodeAt(0),x,l);y.inside&&(h=h.slice(0,-1)+bo(x));const T=d.move(l+l);return o(),a.attentionEncodeSurroundingInfo={after:y.outside,before:b.outside},f+h+T}function jO(e,t,a){return a.options.strong||"*"}function BO(e,t,a,s){return a.safe(e.value,s)}function PO(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function UO(e,t,a){const s=(Yy(a)+(a.options.ruleSpaces?" ":"")).repeat(PO(a));return a.options.ruleSpaces?s.slice(0,-1):s}const Gy={blockquote:oO,break:Xx,code:hO,definition:gO,emphasis:jy,hardBreak:Xx,heading:yO,html:By,image:Py,imageReference:Uy,inlineCode:Hy,link:zy,linkReference:qy,list:kO,listItem:OO,paragraph:IO,root:DO,strong:$y,text:BO,thematicBreak:UO};function HO(){return{enter:{table:FO,tableData:Zx,tableHeader:Zx,tableRow:qO},exit:{codeText:YO,table:zO,tableData:Sm,tableHeader:Sm,tableRow:Sm}}}function FO(e){const t=e._align;this.enter({type:"table",align:t.map(function(a){return a==="none"?null:a}),children:[]},e),this.data.inTable=!0}function zO(e){this.exit(e),this.data.inTable=void 0}function qO(e){this.enter({type:"tableRow",children:[]},e)}function Sm(e){this.exit(e)}function Zx(e){this.enter({type:"tableCell",children:[]},e)}function YO(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,$O));const a=this.stack[this.stack.length-1];a.type,a.value=t,this.exit(e)}function $O(e,t){return t==="|"?t:e}function GO(e){const t=e||{},a=t.tableCellPadding,s=t.tablePipeAlign,l=t.stringLength,o=a?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
429
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:y,table:d,tableCell:h,tableRow:f}};function d(T,N,S,C){return m(b(T,S,C),T.align)}function f(T,N,S,C){const v=x(T,S,C),M=m([v]);return M.slice(0,M.indexOf(`
|
|
430
|
+
`))}function h(T,N,S,C){const v=S.enter("tableCell"),M=S.enter("phrasing"),k=S.containerPhrasing(T,{...C,before:o,after:o});return M(),v(),k}function m(T,N){return iO(T,{align:N,alignDelimiters:s,padding:a,stringLength:l})}function b(T,N,S){const C=T.children;let v=-1;const M=[],k=N.enter("table");for(;++v<C.length;)M[v]=x(C[v],N,S);return k(),M}function x(T,N,S){const C=T.children;let v=-1;const M=[],k=N.enter("tableRow");for(;++v<C.length;)M[v]=h(C[v],T,N,S);return k(),M}function y(T,N,S){let C=Gy.inlineCode(T,N,S);return S.stack.includes("tableCell")&&(C=C.replace(/\|/g,"\\$&")),C}}function KO(){return{exit:{taskListCheckValueChecked:Wx,taskListCheckValueUnchecked:Wx,paragraph:QO}}}function VO(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:XO}}}function Wx(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function QO(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const a=this.stack[this.stack.length-1];a.type;const s=a.children[0];if(s&&s.type==="text"){const l=t.children;let o=-1,d;for(;++o<l.length;){const f=l[o];if(f.type==="paragraph"){d=f;break}}d===a&&(s.value=s.value.slice(1),s.value.length===0?a.children.shift():a.position&&s.position&&typeof s.position.start.offset=="number"&&(s.position.start.column++,s.position.start.offset++,a.position.start=Object.assign({},s.position.start)))}}this.exit(e)}function XO(e,t,a,s){const l=e.children[0],o=typeof e.checked=="boolean"&&l&&l.type==="paragraph",d="["+(e.checked?"x":" ")+"] ",f=a.createTracker(s);o&&f.move(d);let h=Gy.listItem(e,t,a,{...s,...f.current()});return o&&(h=h.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,m)),h;function m(b){return b+d}}function ZO(){return[kR(),XR(),eO(),HO(),KO()]}function WO(e){return{extensions:[RR(),ZR(e),tO(),GO(e),VO()]}}const JO={tokenize:s4,partial:!0},Ky={tokenize:i4,partial:!0},Vy={tokenize:l4,partial:!0},Qy={tokenize:o4,partial:!0},e4={tokenize:u4,partial:!0},Xy={name:"wwwAutolink",tokenize:a4,previous:Wy},Zy={name:"protocolAutolink",tokenize:r4,previous:Jy},vr={name:"emailAutolink",tokenize:n4,previous:eT},Xa={};function t4(){return{text:Xa}}let Is=48;for(;Is<123;)Xa[Is]=vr,Is++,Is===58?Is=65:Is===91&&(Is=97);Xa[43]=vr;Xa[45]=vr;Xa[46]=vr;Xa[95]=vr;Xa[72]=[vr,Zy];Xa[104]=[vr,Zy];Xa[87]=[vr,Xy];Xa[119]=[vr,Xy];function n4(e,t,a){const s=this;let l,o;return d;function d(x){return!Xm(x)||!eT.call(s,s.previous)||Uh(s.events)?a(x):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),f(x))}function f(x){return Xm(x)?(e.consume(x),f):x===64?(e.consume(x),h):a(x)}function h(x){return x===46?e.check(e4,b,m)(x):x===45||x===95||Sn(x)?(o=!0,e.consume(x),h):b(x)}function m(x){return e.consume(x),l=!0,h}function b(x){return o&&l&&In(s.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(x)):a(x)}}function a4(e,t,a){const s=this;return l;function l(d){return d!==87&&d!==119||!Wy.call(s,s.previous)||Uh(s.events)?a(d):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(JO,e.attempt(Ky,e.attempt(Vy,o),a),a)(d))}function o(d){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(d)}}function r4(e,t,a){const s=this;let l="",o=!1;return d;function d(x){return(x===72||x===104)&&Jy.call(s,s.previous)&&!Uh(s.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),l+=String.fromCodePoint(x),e.consume(x),f):a(x)}function f(x){if(In(x)&&l.length<5)return l+=String.fromCodePoint(x),e.consume(x),f;if(x===58){const y=l.toLowerCase();if(y==="http"||y==="https")return e.consume(x),h}return a(x)}function h(x){return x===47?(e.consume(x),o?m:(o=!0,h)):a(x)}function m(x){return x===null||xc(x)||Rt(x)||Hs(x)||Uc(x)?a(x):e.attempt(Ky,e.attempt(Vy,b),a)(x)}function b(x){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(x)}}function s4(e,t,a){let s=0;return l;function l(d){return(d===87||d===119)&&s<3?(s++,e.consume(d),l):d===46&&s===3?(e.consume(d),o):a(d)}function o(d){return d===null?a(d):t(d)}}function i4(e,t,a){let s,l,o;return d;function d(m){return m===46||m===95?e.check(Qy,h,f)(m):m===null||Rt(m)||Hs(m)||m!==45&&Uc(m)?h(m):(o=!0,e.consume(m),d)}function f(m){return m===95?s=!0:(l=s,s=void 0),e.consume(m),d}function h(m){return l||s||!o?a(m):t(m)}}function l4(e,t){let a=0,s=0;return l;function l(d){return d===40?(a++,e.consume(d),l):d===41&&s<a?o(d):d===33||d===34||d===38||d===39||d===41||d===42||d===44||d===46||d===58||d===59||d===60||d===63||d===93||d===95||d===126?e.check(Qy,t,o)(d):d===null||Rt(d)||Hs(d)?t(d):(e.consume(d),l)}function o(d){return d===41&&s++,e.consume(d),l}}function o4(e,t,a){return s;function s(f){return f===33||f===34||f===39||f===41||f===42||f===44||f===46||f===58||f===59||f===63||f===95||f===126?(e.consume(f),s):f===38?(e.consume(f),o):f===93?(e.consume(f),l):f===60||f===null||Rt(f)||Hs(f)?t(f):a(f)}function l(f){return f===null||f===40||f===91||Rt(f)||Hs(f)?t(f):s(f)}function o(f){return In(f)?d(f):a(f)}function d(f){return f===59?(e.consume(f),s):In(f)?(e.consume(f),d):a(f)}}function u4(e,t,a){return s;function s(o){return e.consume(o),l}function l(o){return Sn(o)?a(o):t(o)}}function Wy(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Rt(e)}function Jy(e){return!In(e)}function eT(e){return!(e===47||Xm(e))}function Xm(e){return e===43||e===45||e===46||e===95||Sn(e)}function Uh(e){let t=e.length,a=!1;for(;t--;){const s=e[t][1];if((s.type==="labelLink"||s.type==="labelImage")&&!s._balanced){a=!0;break}if(s._gfmAutolinkLiteralWalkedInto){a=!1;break}}return e.length>0&&!a&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),a}const c4={tokenize:x4,partial:!0};function d4(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:p4,continuation:{tokenize:g4},exit:b4}},text:{91:{name:"gfmFootnoteCall",tokenize:h4},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:f4,resolveTo:m4}}}}function f4(e,t,a){const s=this;let l=s.events.length;const o=s.parser.gfmFootnotes||(s.parser.gfmFootnotes=[]);let d;for(;l--;){const h=s.events[l][1];if(h.type==="labelImage"){d=h;break}if(h.type==="gfmFootnoteCall"||h.type==="labelLink"||h.type==="label"||h.type==="image"||h.type==="link")break}return f;function f(h){if(!d||!d._balanced)return a(h);const m=Oa(s.sliceSerialize({start:d.end,end:s.now()}));return m.codePointAt(0)!==94||!o.includes(m.slice(1))?a(h):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),t(h))}}function m4(e,t){let a=e.length;for(;a--;)if(e[a][1].type==="labelImage"&&e[a][0]==="enter"){e[a][1];break}e[a+1][1].type="data",e[a+3][1].type="gfmFootnoteCallLabelMarker";const s={type:"gfmFootnoteCall",start:Object.assign({},e[a+3][1].start),end:Object.assign({},e[e.length-1][1].end)},l={type:"gfmFootnoteCallMarker",start:Object.assign({},e[a+3][1].end),end:Object.assign({},e[a+3][1].end)};l.end.column++,l.end.offset++,l.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},l.end),end:Object.assign({},e[e.length-1][1].start)},d={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},f=[e[a+1],e[a+2],["enter",s,t],e[a+3],e[a+4],["enter",l,t],["exit",l,t],["enter",o,t],["enter",d,t],["exit",d,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",s,t]];return e.splice(a,e.length-a+1,...f),e}function h4(e,t,a){const s=this,l=s.parser.gfmFootnotes||(s.parser.gfmFootnotes=[]);let o=0,d;return f;function f(x){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(x),e.exit("gfmFootnoteCallLabelMarker"),h}function h(x){return x!==94?a(x):(e.enter("gfmFootnoteCallMarker"),e.consume(x),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",m)}function m(x){if(o>999||x===93&&!d||x===null||x===91||Rt(x))return a(x);if(x===93){e.exit("chunkString");const y=e.exit("gfmFootnoteCallString");return l.includes(Oa(s.sliceSerialize(y)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(x),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):a(x)}return Rt(x)||(d=!0),o++,e.consume(x),x===92?b:m}function b(x){return x===91||x===92||x===93?(e.consume(x),o++,m):m(x)}}function p4(e,t,a){const s=this,l=s.parser.gfmFootnotes||(s.parser.gfmFootnotes=[]);let o,d=0,f;return h;function h(N){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(N),e.exit("gfmFootnoteDefinitionLabelMarker"),m}function m(N){return N===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(N),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",b):a(N)}function b(N){if(d>999||N===93&&!f||N===null||N===91||Rt(N))return a(N);if(N===93){e.exit("chunkString");const S=e.exit("gfmFootnoteDefinitionLabelString");return o=Oa(s.sliceSerialize(S)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(N),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),y}return Rt(N)||(f=!0),d++,e.consume(N),N===92?x:b}function x(N){return N===91||N===92||N===93?(e.consume(N),d++,b):b(N)}function y(N){return N===58?(e.enter("definitionMarker"),e.consume(N),e.exit("definitionMarker"),l.includes(o)||l.push(o),ct(e,T,"gfmFootnoteDefinitionWhitespace")):a(N)}function T(N){return t(N)}}function g4(e,t,a){return e.check(No,t,e.attempt(c4,t,a))}function b4(e){e.exit("gfmFootnoteDefinition")}function x4(e,t,a){const s=this;return ct(e,l,"gfmFootnoteDefinitionIndent",5);function l(o){const d=s.events[s.events.length-1];return d&&d[1].type==="gfmFootnoteDefinitionIndent"&&d[2].sliceSerialize(d[1],!0).length===4?t(o):a(o)}}function E4(e){let a=(e||{}).singleTilde;const s={name:"strikethrough",tokenize:o,resolveAll:l};return a==null&&(a=!0),{text:{126:s},insideSpan:{null:[s]},attentionMarkers:{null:[126]}};function l(d,f){let h=-1;for(;++h<d.length;)if(d[h][0]==="enter"&&d[h][1].type==="strikethroughSequenceTemporary"&&d[h][1]._close){let m=h;for(;m--;)if(d[m][0]==="exit"&&d[m][1].type==="strikethroughSequenceTemporary"&&d[m][1]._open&&d[h][1].end.offset-d[h][1].start.offset===d[m][1].end.offset-d[m][1].start.offset){d[h][1].type="strikethroughSequence",d[m][1].type="strikethroughSequence";const b={type:"strikethrough",start:Object.assign({},d[m][1].start),end:Object.assign({},d[h][1].end)},x={type:"strikethroughText",start:Object.assign({},d[m][1].end),end:Object.assign({},d[h][1].start)},y=[["enter",b,f],["enter",d[m][1],f],["exit",d[m][1],f],["enter",x,f]],T=f.parser.constructs.insideSpan.null;T&&sa(y,y.length,0,Hc(T,d.slice(m+1,h),f)),sa(y,y.length,0,[["exit",x,f],["enter",d[h][1],f],["exit",d[h][1],f],["exit",b,f]]),sa(d,m-1,h-m+3,y),h=m+y.length-2;break}}for(h=-1;++h<d.length;)d[h][1].type==="strikethroughSequenceTemporary"&&(d[h][1].type="data");return d}function o(d,f,h){const m=this.previous,b=this.events;let x=0;return y;function y(N){return m===126&&b[b.length-1][1].type!=="characterEscape"?h(N):(d.enter("strikethroughSequenceTemporary"),T(N))}function T(N){const S=Bi(m);if(N===126)return x>1?h(N):(d.consume(N),x++,T);if(x<2&&!a)return h(N);const C=d.exit("strikethroughSequenceTemporary"),v=Bi(N);return C._open=!v||v===2&&!!S,C._close=!S||S===2&&!!v,f(N)}}}class y4{constructor(){this.map=[]}add(t,a,s){T4(this,t,a,s)}consume(t){if(this.map.sort(function(o,d){return o[0]-d[0]}),this.map.length===0)return;let a=this.map.length;const s=[];for(;a>0;)a-=1,s.push(t.slice(this.map[a][0]+this.map[a][1]),this.map[a][2]),t.length=this.map[a][0];s.push(t.slice()),t.length=0;let l=s.pop();for(;l;){for(const o of l)t.push(o);l=s.pop()}this.map.length=0}}function T4(e,t,a,s){let l=0;if(!(a===0&&s.length===0)){for(;l<e.map.length;){if(e.map[l][0]===t){e.map[l][1]+=a,e.map[l][2].push(...s);return}l+=1}e.map.push([t,a,s])}}function _4(e,t){let a=!1;const s=[];for(;t<e.length;){const l=e[t];if(a){if(l[0]==="enter")l[1].type==="tableContent"&&s.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(l[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=s.length-1;s[o]=s[o]==="left"?"center":"right"}}else if(l[1].type==="tableDelimiterRow")break}else l[0]==="enter"&&l[1].type==="tableDelimiterRow"&&(a=!0);t+=1}return s}function N4(){return{flow:{null:{name:"table",tokenize:S4,resolveAll:v4}}}}function S4(e,t,a){const s=this;let l=0,o=0,d;return f;function f(U){let H=s.events.length-1;for(;H>-1;){const Z=s.events[H][1].type;if(Z==="lineEnding"||Z==="linePrefix")H--;else break}const ae=H>-1?s.events[H][1].type:null,se=ae==="tableHead"||ae==="tableRow"?L:h;return se===L&&s.parser.lazy[s.now().line]?a(U):se(U)}function h(U){return e.enter("tableHead"),e.enter("tableRow"),m(U)}function m(U){return U===124||(d=!0,o+=1),b(U)}function b(U){return U===null?a(U):He(U)?o>1?(o=0,s.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(U),e.exit("lineEnding"),T):a(U):rt(U)?ct(e,b,"whitespace")(U):(o+=1,d&&(d=!1,l+=1),U===124?(e.enter("tableCellDivider"),e.consume(U),e.exit("tableCellDivider"),d=!0,b):(e.enter("data"),x(U)))}function x(U){return U===null||U===124||Rt(U)?(e.exit("data"),b(U)):(e.consume(U),U===92?y:x)}function y(U){return U===92||U===124?(e.consume(U),x):x(U)}function T(U){return s.interrupt=!1,s.parser.lazy[s.now().line]?a(U):(e.enter("tableDelimiterRow"),d=!1,rt(U)?ct(e,N,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(U):N(U))}function N(U){return U===45||U===58?C(U):U===124?(d=!0,e.enter("tableCellDivider"),e.consume(U),e.exit("tableCellDivider"),S):$(U)}function S(U){return rt(U)?ct(e,C,"whitespace")(U):C(U)}function C(U){return U===58?(o+=1,d=!0,e.enter("tableDelimiterMarker"),e.consume(U),e.exit("tableDelimiterMarker"),v):U===45?(o+=1,v(U)):U===null||He(U)?D(U):$(U)}function v(U){return U===45?(e.enter("tableDelimiterFiller"),M(U)):$(U)}function M(U){return U===45?(e.consume(U),M):U===58?(d=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(U),e.exit("tableDelimiterMarker"),k):(e.exit("tableDelimiterFiller"),k(U))}function k(U){return rt(U)?ct(e,D,"whitespace")(U):D(U)}function D(U){return U===124?N(U):U===null||He(U)?!d||l!==o?$(U):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(U)):$(U)}function $(U){return a(U)}function L(U){return e.enter("tableRow"),Y(U)}function Y(U){return U===124?(e.enter("tableCellDivider"),e.consume(U),e.exit("tableCellDivider"),Y):U===null||He(U)?(e.exit("tableRow"),t(U)):rt(U)?ct(e,Y,"whitespace")(U):(e.enter("data"),re(U))}function re(U){return U===null||U===124||Rt(U)?(e.exit("data"),Y(U)):(e.consume(U),U===92?fe:re)}function fe(U){return U===92||U===124?(e.consume(U),re):re(U)}}function v4(e,t){let a=-1,s=!0,l=0,o=[0,0,0,0],d=[0,0,0,0],f=!1,h=0,m,b,x;const y=new y4;for(;++a<e.length;){const T=e[a],N=T[1];T[0]==="enter"?N.type==="tableHead"?(f=!1,h!==0&&(Jx(y,t,h,m,b),b=void 0,h=0),m={type:"table",start:Object.assign({},N.start),end:Object.assign({},N.end)},y.add(a,0,[["enter",m,t]])):N.type==="tableRow"||N.type==="tableDelimiterRow"?(s=!0,x=void 0,o=[0,0,0,0],d=[0,a+1,0,0],f&&(f=!1,b={type:"tableBody",start:Object.assign({},N.start),end:Object.assign({},N.end)},y.add(a,0,[["enter",b,t]])),l=N.type==="tableDelimiterRow"?2:b?3:1):l&&(N.type==="data"||N.type==="tableDelimiterMarker"||N.type==="tableDelimiterFiller")?(s=!1,d[2]===0&&(o[1]!==0&&(d[0]=d[1],x=Xu(y,t,o,l,void 0,x),o=[0,0,0,0]),d[2]=a)):N.type==="tableCellDivider"&&(s?s=!1:(o[1]!==0&&(d[0]=d[1],x=Xu(y,t,o,l,void 0,x)),o=d,d=[o[1],a,0,0])):N.type==="tableHead"?(f=!0,h=a):N.type==="tableRow"||N.type==="tableDelimiterRow"?(h=a,o[1]!==0?(d[0]=d[1],x=Xu(y,t,o,l,a,x)):d[1]!==0&&(x=Xu(y,t,d,l,a,x)),l=0):l&&(N.type==="data"||N.type==="tableDelimiterMarker"||N.type==="tableDelimiterFiller")&&(d[3]=a)}for(h!==0&&Jx(y,t,h,m,b),y.consume(t.events),a=-1;++a<t.events.length;){const T=t.events[a];T[0]==="enter"&&T[1].type==="table"&&(T[1]._align=_4(t.events,a))}return e}function Xu(e,t,a,s,l,o){const d=s===1?"tableHeader":s===2?"tableDelimiter":"tableData",f="tableContent";a[0]!==0&&(o.end=Object.assign({},Ri(t.events,a[0])),e.add(a[0],0,[["exit",o,t]]));const h=Ri(t.events,a[1]);if(o={type:d,start:Object.assign({},h),end:Object.assign({},h)},e.add(a[1],0,[["enter",o,t]]),a[2]!==0){const m=Ri(t.events,a[2]),b=Ri(t.events,a[3]),x={type:f,start:Object.assign({},m),end:Object.assign({},b)};if(e.add(a[2],0,[["enter",x,t]]),s!==2){const y=t.events[a[2]],T=t.events[a[3]];if(y[1].end=Object.assign({},T[1].end),y[1].type="chunkText",y[1].contentType="text",a[3]>a[2]+1){const N=a[2]+1,S=a[3]-a[2]-1;e.add(N,S,[])}}e.add(a[3]+1,0,[["exit",x,t]])}return l!==void 0&&(o.end=Object.assign({},Ri(t.events,l)),e.add(l,0,[["exit",o,t]]),o=void 0),o}function Jx(e,t,a,s,l){const o=[],d=Ri(t.events,a);l&&(l.end=Object.assign({},d),o.push(["exit",l,t])),s.end=Object.assign({},d),o.push(["exit",s,t]),e.add(a+1,0,o)}function Ri(e,t){const a=e[t],s=a[0]==="enter"?"start":"end";return a[1][s]}const A4={name:"tasklistCheck",tokenize:w4};function C4(){return{text:{91:A4}}}function w4(e,t,a){const s=this;return l;function l(h){return s.previous!==null||!s._gfmTasklistFirstContentOfListItem?a(h):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(h),e.exit("taskListCheckMarker"),o)}function o(h){return Rt(h)?(e.enter("taskListCheckValueUnchecked"),e.consume(h),e.exit("taskListCheckValueUnchecked"),d):h===88||h===120?(e.enter("taskListCheckValueChecked"),e.consume(h),e.exit("taskListCheckValueChecked"),d):a(h)}function d(h){return h===93?(e.enter("taskListCheckMarker"),e.consume(h),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),f):a(h)}function f(h){return He(h)?t(h):rt(h)?e.check({tokenize:k4},t,a)(h):a(h)}}function k4(e,t,a){return ct(e,s,"whitespace");function s(l){return l===null?a(l):t(l)}}function R4(e){return uy([t4(),d4(),E4(e),N4(),C4()])}const O4={};function os(e){const t=this,a=e||O4,s=t.data(),l=s.micromarkExtensions||(s.micromarkExtensions=[]),o=s.fromMarkdownExtensions||(s.fromMarkdownExtensions=[]),d=s.toMarkdownExtensions||(s.toMarkdownExtensions=[]);l.push(R4(a)),o.push(ZO()),d.push(WO(a))}function Hh(e){const[t,a]=A.useState("fit"),s=t==="wide";return c.jsxs("div",{className:`md-table-wrap ${s?"md-table-wide":"md-table-fit"}`,children:[c.jsxs("button",{type:"button",className:"md-table-toggle",title:s?"适应屏幕":"超宽展开",onClick:()=>a(s?"fit":"wide"),children:[s?c.jsx(pA,{className:"h-3 w-3"}):c.jsx(iA,{className:"h-3 w-3"}),c.jsx("span",{children:s?"适应屏幕":"超宽展开"})]}),c.jsx("div",{className:"md-table-scroll",children:c.jsx("table",{...e})})]})}const Mi=Fs(e=>({agents:[],loaded:!1,loadAgents:async()=>{const t=qe.getState().activeRepoId;try{const a=t?await y3(t):await PE();e({agents:a,loaded:!0})}catch{e({loaded:!0})}},createAgent:async(t,a)=>{const s=a?await T3(a,t):await UE(t);return e(l=>({agents:[...l.agents,s]})),s},updateAgent:async(t,a)=>{const s=await HE(t,a);e(l=>({agents:l.agents.map(o=>o.id===t?s:o)}))},deleteAgent:async t=>{await FE(t),e(a=>({agents:a.agents.filter(s=>s.id!==t)}))}}));function I4(e){if(typeof e!="string")return e;const t=e.trim();if(t)try{return JSON.parse(t)}catch{return t}}function hn(e){return e&&typeof e=="object"?e:null}function qs(e){const t=hn(e);return t&&"properties"in t?t.properties:e}function M4(e){const t=hn(e);return typeof(t==null?void 0:t.type)=="string"?t.type:void 0}function D4(e){const t=hn(qs(e));if(!t)return null;const a=hn(t.info);if(a&&typeof a.id=="string"){const l=Array.isArray(t.parts)?t.parts:void 0;return{...a,...l?{parts:l}:{}}}if(typeof t.id=="string"&&typeof t.role=="string")return t;const s=hn(t.message);return s&&typeof s.id=="string"?s:null}function L4(e){const t=hn(qs(e));if(!t)return{};const a=hn(t.part)??t;return typeof a.type!="string"?{}:{messageId:typeof a.messageID=="string"&&a.messageID||typeof a.messageId=="string"&&a.messageId||typeof t.messageID=="string"&&t.messageID||typeof t.messageId=="string"&&t.messageId||void 0,part:a}}function j4(e){const t=hn(qs(e));if(!t||t.field!=="text")return null;const a=typeof t.messageID=="string"?t.messageID:null,s=typeof t.partID=="string"?t.partID:null,l=typeof t.delta=="string"?t.delta:null;return!a||!s||l===null?null:{messageId:a,partId:s,delta:l}}function B4(e){const t=qs(e);if(Array.isArray(t))return t;const a=hn(t);return a&&Array.isArray(a.todos)?a.todos:[]}function qa(e){return typeof e=="number"?e:0}function P4(e){const t=hn(qs(e));if(!t||typeof t.id!="string")return null;const a={id:t.id};typeof t.title=="string"&&(a.title=t.title),typeof t.agent=="string"&&(a.agent=t.agent),typeof t.cost=="number"&&(a.cost=t.cost);const s=typeof t.parentID=="string"?t.parentID:typeof t.parent_id=="string"?t.parent_id:void 0;s&&(a.parentID=s);const l=hn(t.tokens),o=typeof t.tokens_input=="number"||typeof t.tokens_output=="number";if(l||o){const f=l?hn(l.cache):null;a.tokens={input:qa(l==null?void 0:l.input)||qa(t.tokens_input),output:qa(l==null?void 0:l.output)||qa(t.tokens_output),reasoning:qa(l==null?void 0:l.reasoning)||qa(t.tokens_reasoning),cache:{read:qa(f==null?void 0:f.read)||qa(t.tokens_cache_read),write:qa(f==null?void 0:f.write)||qa(t.tokens_cache_write)}}}const d=hn(t.model);return d&&(a.model={providerID:typeof d.providerID=="string"?d.providerID:void 0,modelID:typeof d.modelID=="string"?d.modelID:void 0,variant:typeof d.variant=="string"?d.variant:void 0}),a}function U4(e){const t=hn(qs(e));if(!t)return null;if(typeof t.message=="string")return t.message;const a=hn(t.error);if(a){const s=hn(a.data);if(typeof(s==null?void 0:s.message)=="string")return`${a.name??"Error"}: ${s.message}`;if(typeof a.message=="string")return`${a.name??"Error"}: ${a.message}`;if(typeof a.name=="string")return String(a.name)}return typeof t.reason=="string"?t.reason:null}function H4(e){const t=qs(e);if(typeof t=="string")return t;const a=hn(t);if(typeof(a==null?void 0:a.status)=="string")return a.status;const s=hn(a==null?void 0:a.status);return typeof(s==null?void 0:s.type)=="string"?s.type:typeof(a==null?void 0:a.type)=="string"?a.type:null}function F4(e,t,a,s){switch(e==="message"||e===""?M4(t)??e:e){case"message.updated":{const o=D4(t);o&&s.updateMessage(a,o);break}case"session.updated":{const o=P4(t);o&&s.updateSessionInfo(o);break}case"message.part.updated":{const{messageId:o,part:d}=L4(t);d&&o&&s.updateMessagePart(a,o,d);break}case"message.part.delta":{const o=j4(t);o&&s.appendMessagePartDelta(a,o.messageId,o.partId,o.delta);break}case"todo.updated":{s.updateTodos(a,B4(t));break}case"session.status":{const o=H4(t);o&&s.setSessionStatus(a,o);break}case"session.idle":{s.setSessionStatus(a,"idle");break}case"session.error":{const o=U4(t);s.setSessionStatus(a,"error",o??void 0);break}}}const z4=600*1e3;class q4{constructor(t,a){rn(this,"sessionId");rn(this,"idleTimer",null);rn(this,"active",!1);rn(this,"alive",!0);rn(this,"callbacks");this.sessionId=t,this.callbacks=a,this.resetIdleTimer()}dispatch(t,a){if(!this.alive)return;this.resetIdleTimer();const s=Ue.getState();F4(t,a,this.sessionId,s)}activate(){this.active=!0,this.clearIdleTimer()}deactivate(){this.active=!1,this.resetIdleTimer()}refreshOnIdle(){Ue.getState().refreshSessionData(this.sessionId)}stop(){this.alive=!1,this.clearIdleTimer()}resetIdleTimer(){this.clearIdleTimer(),!this.active&&(this.idleTimer=setTimeout(()=>{this.callbacks.onWorkerIdle(this.sessionId)},z4))}clearIdleTimer(){this.idleTimer&&(clearTimeout(this.idleTimer),this.idleTimer=null)}}const Y4=1e3,$4=3e4;class G4{constructor(t,a){rn(this,"source",null);rn(this,"reconnectTimer",null);rn(this,"attempts",0);rn(this,"disposed",!1);rn(this,"repoId");rn(this,"onEvent");this.repoId=t,this.onEvent=a}start(){this.connect()}stop(){var t;this.disposed=!0,this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),(t=this.source)==null||t.close(),this.source=null}connect(){if(this.disposed)return;const t=z3(this.repoId),a=new EventSource(t);this.source=a,a.onopen=()=>{this.attempts=0},a.onmessage=l=>{this.handleRaw("message",l)};const s=["message.updated","message.part.updated","message.part.delta","message.removed","todo.updated","session.status","session.idle","session.error","session.updated"];for(const l of s)a.addEventListener(l,o=>{this.handleRaw(l,o)});a.onerror=()=>{if(!(this.disposed||!this.source)&&this.source.readyState===EventSource.CLOSED){this.source.close(),this.source=null;const l=Math.min(Y4*2**this.attempts,$4);this.attempts++,this.reconnectTimer=setTimeout(()=>this.connect(),l)}}}handleRaw(t,a){if(!(a instanceof MessageEvent))return;const s=I4(a.data);if(s===void 0)return;const l=this.extractSessionId(s);if(!l)return;let o=t;if(t==="message"||t===""){const d=s&&typeof s=="object"?s:null;typeof(d==null?void 0:d.type)=="string"&&(o=d.type)}this.onEvent(l,o,s)}extractSessionId(t){if(!t||typeof t!="object")return null;const a=t;if(a.properties&&typeof a.properties=="object"){const s=a.properties;if(typeof s.sessionID=="string")return s.sessionID}return typeof a.sessionID=="string"?a.sessionID:typeof a.sessionId=="string"?a.sessionId:null}}const K4=6e4;class V4{constructor(t){rn(this,"timer",null);rn(this,"paused",!1);rn(this,"callbacks");this.callbacks=t}start(){this.tick(),this.timer=setInterval(()=>{this.paused||this.tick()},K4)}stop(){this.timer&&(clearInterval(this.timer),this.timer=null)}pause(){this.paused=!0}resume(){this.paused=!1,this.tick()}tick(){const t=qe.getState().activeRepoId;t&&(Ue.getState().loadSessions(),q3(t).then(a=>{const s={};for(const[l,o]of Object.entries(a))s[l]=o.type??"idle";Ue.getState().bulkSetStatuses(s);for(const[l,o]of Object.entries(s))(o==="busy"||o==="retry")&&this.callbacks.ensureWorker(l)}).catch(()=>{}))}}class Q4{constructor(){rn(this,"workers",new Map);rn(this,"dispatcher",null);rn(this,"supervisor",null);rn(this,"visibilityHandler",null)}start(t){this.stop();const a={onWorkerIdle:s=>this.removeWorker(s)};this.dispatcher=new G4(t,(s,l,o)=>{const d=this.ensureWorker(s,a);if(l==="session.idle"||l==="session.status"){const f=Ue.getState().sessionStatuses[s];d.dispatch(l,o);const h=Ue.getState().sessionStatuses[s];f&&f!=="idle"&&h==="idle"&&d.refreshOnIdle()}else d.dispatch(l,o)}),this.dispatcher.start(),this.supervisor=new V4({ensureWorker:s=>this.ensureWorker(s,a)}),this.supervisor.start(),this.visibilityHandler=()=>{var s,l;document.hidden?(s=this.supervisor)==null||s.pause():(l=this.supervisor)==null||l.resume()},document.addEventListener("visibilitychange",this.visibilityHandler)}stop(){var t,a;(t=this.dispatcher)==null||t.stop(),this.dispatcher=null,(a=this.supervisor)==null||a.stop(),this.supervisor=null;for(const s of this.workers.values())s.stop();this.workers.clear(),this.visibilityHandler&&(document.removeEventListener("visibilitychange",this.visibilityHandler),this.visibilityHandler=null)}activateSession(t){for(const l of this.workers.values())l.sessionId!==t&&l.deactivate();if(!t)return;const a={onWorkerIdle:l=>this.removeWorker(l)};this.ensureWorker(t,a).activate(),Ue.getState().refreshSessionData(t)}deactivateSession(t){var a;(a=this.workers.get(t))==null||a.deactivate()}ensureWorker(t,a){let s=this.workers.get(t);return s||(s=new q4(t,a),this.workers.set(t,s)),s}removeWorker(t){const a=Ue.getState().activeSessionId;if(t===a)return;const s=this.workers.get(t);s&&(s.stop(),this.workers.delete(t))}}const Tc=new Q4,e1=(function(e,t,a){const s=So(a);if(!e||!e.type||!e.children)throw new Error("Expected parent node");if(typeof t=="number"){if(t<0||t===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(t=e.children.indexOf(t),t<0)throw new Error("Expected child node or index");for(;++t<e.children.length;)if(s(e.children[t],t,e))return e.children[t]}),Ys=(function(e){if(e==null)return W4;if(typeof e=="string")return Z4(e);if(typeof e=="object")return X4(e);if(typeof e=="function")return Fh(e);throw new Error("Expected function, string, or array as `test`")});function X4(e){const t=[];let a=-1;for(;++a<e.length;)t[a]=Ys(e[a]);return Fh(s);function s(...l){let o=-1;for(;++o<t.length;)if(t[o].apply(this,l))return!0;return!1}}function Z4(e){return Fh(t);function t(a){return a.tagName===e}}function Fh(e){return t;function t(a,s,l){return!!(J4(a)&&e.call(this,a,typeof s=="number"?s:void 0,l||void 0))}}function W4(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function J4(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const t1=/\n/g,n1=/[\t ]+/g,Zm=Ys("br"),a1=Ys(lI),eI=Ys("p"),r1=Ys("tr"),tI=Ys(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",iI,oI]),tT=Ys(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","li","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function nI(e,t){const a=t||{},s="children"in e?e.children:[],l=tT(e),o=rT(e,{whitespace:a.whitespace||"normal"}),d=[];(e.type==="text"||e.type==="comment")&&d.push(...aT(e,{breakBefore:!0,breakAfter:!0}));let f=-1;for(;++f<s.length;)d.push(...nT(s[f],e,{whitespace:o,breakBefore:f?void 0:l,breakAfter:f<s.length-1?Zm(s[f+1]):l}));const h=[];let m;for(f=-1;++f<d.length;){const b=d[f];typeof b=="number"?m!==void 0&&b>m&&(m=b):b&&(m!==void 0&&m>-1&&h.push(`
|
|
431
|
+
`.repeat(m)||" "),m=-1,h.push(b))}return h.join("")}function nT(e,t,a){return e.type==="element"?aI(e,t,a):e.type==="text"?a.whitespace==="normal"?aT(e,a):rI(e):[]}function aI(e,t,a){const s=rT(e,a),l=e.children||[];let o=-1,d=[];if(tI(e))return d;let f,h;for(Zm(e)||r1(e)&&e1(t,e,r1)?h=`
|
|
432
|
+
`:eI(e)?(f=2,h=2):tT(e)&&(f=1,h=1);++o<l.length;)d=d.concat(nT(l[o],e,{whitespace:s,breakBefore:o?void 0:f,breakAfter:o<l.length-1?Zm(l[o+1]):h}));return a1(e)&&e1(t,e,a1)&&d.push(" "),f&&d.unshift(f),h&&d.push(h),d}function aT(e,t){const a=String(e.value),s=[],l=[];let o=0;for(;o<=a.length;){t1.lastIndex=o;const h=t1.exec(a),m=h&&"index"in h?h.index:a.length;s.push(sI(a.slice(o,m).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),o===0?t.breakBefore:!0,m===a.length?t.breakAfter:!0)),o=m+1}let d=-1,f;for(;++d<s.length;)s[d].charCodeAt(s[d].length-1)===8203||d<s.length-1&&s[d+1].charCodeAt(0)===8203?(l.push(s[d]),f=void 0):s[d]?(typeof f=="number"&&l.push(f),l.push(s[d]),f=0):(d===0||d===s.length-1)&&l.push(0);return l}function rI(e){return[String(e.value)]}function sI(e,t,a){const s=[];let l=0,o;for(;l<e.length;){n1.lastIndex=l;const d=n1.exec(e);o=d?d.index:e.length,!l&&!o&&d&&!t&&s.push(""),l!==o&&s.push(e.slice(l,o)),l=d?o+d[0].length:o}return l!==o&&!a&&s.push(""),s.join(" ")}function rT(e,t){if(e.type==="element"){const a=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return a.wrap?"pre-wrap":"pre";case"td":case"th":return a.noWrap?"nowrap":t.whitespace;case"textarea":return"pre-wrap"}}return t.whitespace}function iI(e){return!!(e.properties||{}).hidden}function lI(e){return e.tagName==="td"||e.tagName==="th"}function oI(e){return e.tagName==="dialog"&&!(e.properties||{}).open}function uI(e){const t=e.regex,a=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),s="decltype\\(auto\\)",l="[a-zA-Z_]\\w*::",d="(?!struct)("+s+"|"+t.optional(l)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",f={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},m={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},b={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},x={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(m,{className:"string"}),{className:"string",begin:/<.*?>/},a,e.C_BLOCK_COMMENT_MODE]},y={className:"title",begin:t.optional(l)+e.IDENT_RE,relevance:0},T=t.optional(l)+e.IDENT_RE+"\\s*\\(",N=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],S=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],C=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],v=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],D={type:S,keyword:N,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:C},$={className:"function.dispatch",relevance:0,keywords:{_hint:v},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},L=[$,x,f,a,e.C_BLOCK_COMMENT_MODE,b,m],Y={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:D,contains:L.concat([{begin:/\(/,end:/\)/,keywords:D,contains:L.concat(["self"]),relevance:0}]),relevance:0},re={className:"function",begin:"("+d+"[\\*&\\s]+)+"+T,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:D,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:s,keywords:D,relevance:0},{begin:T,returnBegin:!0,contains:[y],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[m,b]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:D,relevance:0,contains:[a,e.C_BLOCK_COMMENT_MODE,m,b,f,{begin:/\(/,end:/\)/,keywords:D,relevance:0,contains:["self",a,e.C_BLOCK_COMMENT_MODE,m,b,f]}]},f,a,e.C_BLOCK_COMMENT_MODE,x]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:D,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(Y,re,$,L,[x,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:D,contains:["self",f]},{begin:e.IDENT_RE+"::",keywords:D},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function cI(e){const t={type:["boolean","byte","word","String"],built_in:["KeyboardController","MouseController","SoftwareSerial","EthernetServer","EthernetClient","LiquidCrystal","RobotControl","GSMVoiceCall","EthernetUDP","EsploraTFT","HttpClient","RobotMotor","WiFiClient","GSMScanner","FileSystem","Scheduler","GSMServer","YunClient","YunServer","IPAddress","GSMClient","GSMModem","Keyboard","Ethernet","Console","GSMBand","Esplora","Stepper","Process","WiFiUDP","GSM_SMS","Mailbox","USBHost","Firmata","PImage","Client","Server","GSMPIN","FileIO","Bridge","Serial","EEPROM","Stream","Mouse","Audio","Servo","File","Task","GPRS","WiFi","Wire","TFT","GSM","SPI","SD"],_hints:["setup","loop","runShellCommandAsynchronously","analogWriteResolution","retrieveCallingNumber","printFirmwareVersion","analogReadResolution","sendDigitalPortPair","noListenOnLocalhost","readJoystickButton","setFirmwareVersion","readJoystickSwitch","scrollDisplayRight","getVoiceCallStatus","scrollDisplayLeft","writeMicroseconds","delayMicroseconds","beginTransmission","getSignalStrength","runAsynchronously","getAsynchronously","listenOnLocalhost","getCurrentCarrier","readAccelerometer","messageAvailable","sendDigitalPorts","lineFollowConfig","countryNameWrite","runShellCommand","readStringUntil","rewindDirectory","readTemperature","setClockDivider","readLightSensor","endTransmission","analogReference","detachInterrupt","countryNameRead","attachInterrupt","encryptionType","readBytesUntil","robotNameWrite","readMicrophone","robotNameRead","cityNameWrite","userNameWrite","readJoystickY","readJoystickX","mouseReleased","openNextFile","scanNetworks","noInterrupts","digitalWrite","beginSpeaker","mousePressed","isActionDone","mouseDragged","displayLogos","noAutoscroll","addParameter","remoteNumber","getModifiers","keyboardRead","userNameRead","waitContinue","processInput","parseCommand","printVersion","readNetworks","writeMessage","blinkVersion","cityNameRead","readMessage","setDataMode","parsePacket","isListening","setBitOrder","beginPacket","isDirectory","motorsWrite","drawCompass","digitalRead","clearScreen","serialEvent","rightToLeft","setTextSize","leftToRight","requestFrom","keyReleased","compassRead","analogWrite","interrupts","WiFiServer","disconnect","playMelody","parseFloat","autoscroll","getPINUsed","setPINUsed","setTimeout","sendAnalog","readSlider","analogRead","beginWrite","createChar","motorsStop","keyPressed","tempoWrite","readButton","subnetMask","debugPrint","macAddress","writeGreen","randomSeed","attachGPRS","readString","sendString","remotePort","releaseAll","mouseMoved","background","getXChange","getYChange","answerCall","getResult","voiceCall","endPacket","constrain","getSocket","writeJSON","getButton","available","connected","findUntil","readBytes","exitValue","readGreen","writeBlue","startLoop","IPAddress","isPressed","sendSysex","pauseMode","gatewayIP","setCursor","getOemKey","tuneWrite","noDisplay","loadImage","switchPIN","onRequest","onReceive","changePIN","playFile","noBuffer","parseInt","overflow","checkPIN","knobRead","beginTFT","bitClear","updateIR","bitWrite","position","writeRGB","highByte","writeRed","setSpeed","readBlue","noStroke","remoteIP","transfer","shutdown","hangCall","beginSMS","endWrite","attached","maintain","noCursor","checkReg","checkPUK","shiftOut","isValid","shiftIn","pulseIn","connect","println","localIP","pinMode","getIMEI","display","noBlink","process","getBand","running","beginSD","drawBMP","lowByte","setBand","release","bitRead","prepare","pointTo","readRed","setMode","noFill","remove","listen","stroke","detach","attach","noTone","exists","buffer","height","bitSet","circle","config","cursor","random","IRread","setDNS","endSMS","getKey","micros","millis","begin","print","write","ready","flush","width","isPIN","blink","clear","press","mkdir","rmdir","close","point","yield","image","BSSID","click","delay","read","text","move","peek","beep","rect","line","open","seek","fill","size","turn","stop","home","find","step","tone","sqrt","RSSI","SSID","end","bit","tan","cos","sin","pow","map","abs","max","min","get","run","put"],literal:["DIGITAL_MESSAGE","FIRMATA_STRING","ANALOG_MESSAGE","REPORT_DIGITAL","REPORT_ANALOG","INPUT_PULLUP","SET_PIN_MODE","INTERNAL2V56","SYSTEM_RESET","LED_BUILTIN","INTERNAL1V1","SYSEX_START","INTERNAL","EXTERNAL","DEFAULT","OUTPUT","INPUT","HIGH","LOW"]},a=uI(e),s=a.keywords;return s.type=[...s.type,...t.type],s.literal=[...s.literal,...t.literal],s.built_in=[...s.built_in,...t.built_in],s._hints=t._hints,a.name="Arduino",a.aliases=["ino"],a.supersetOf="cpp",a}function dI(e){const t=e.regex,a={},s={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[a]}]};Object.assign(a,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},s]});const l={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},o=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),d={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},f={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,a,l]};l.contains.push(f);const h={match:/\\"/},m={className:"string",begin:/'/,end:/'/},b={match:/\\'/},x={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,a]},y=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],T=e.SHEBANG({binary:`(${y.join("|")})`,relevance:10}),N={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},S=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],C=["true","false"],v={match:/(\/[a-z._-]+)+/},M=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],k=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],D=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],$=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:S,literal:C,built_in:[...M,...k,"set","shopt",...D,...$]},contains:[T,e.SHEBANG(),N,x,o,d,v,f,h,m,b,a]}}function fI(e){const t=e.regex,a=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),s="decltype\\(auto\\)",l="[a-zA-Z_]\\w*::",d="("+s+"|"+t.optional(l)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",f={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},m={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},b={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},x={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(m,{className:"string"}),{className:"string",begin:/<.*?>/},a,e.C_BLOCK_COMMENT_MODE]},y={className:"title",begin:t.optional(l)+e.IDENT_RE,relevance:0},T=t.optional(l)+e.IDENT_RE+"\\s*\\(",C={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},v=[x,f,a,e.C_BLOCK_COMMENT_MODE,b,m],M={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:C,contains:v.concat([{begin:/\(/,end:/\)/,keywords:C,contains:v.concat(["self"]),relevance:0}]),relevance:0},k={begin:"("+d+"[\\*&\\s]+)+"+T,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:C,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:s,keywords:C,relevance:0},{begin:T,returnBegin:!0,contains:[e.inherit(y,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:C,relevance:0,contains:[a,e.C_BLOCK_COMMENT_MODE,m,b,f,{begin:/\(/,end:/\)/,keywords:C,relevance:0,contains:["self",a,e.C_BLOCK_COMMENT_MODE,m,b,f]}]},f,a,e.C_BLOCK_COMMENT_MODE,x]};return{name:"C",aliases:["h"],keywords:C,disableAutodetect:!0,illegal:"</",contains:[].concat(M,k,v,[x,{begin:e.IDENT_RE+"::",keywords:C},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:x,strings:m,keywords:C}}}function mI(e){const t=e.regex,a=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),s="decltype\\(auto\\)",l="[a-zA-Z_]\\w*::",d="(?!struct)("+s+"|"+t.optional(l)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",f={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},m={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},b={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},x={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(m,{className:"string"}),{className:"string",begin:/<.*?>/},a,e.C_BLOCK_COMMENT_MODE]},y={className:"title",begin:t.optional(l)+e.IDENT_RE,relevance:0},T=t.optional(l)+e.IDENT_RE+"\\s*\\(",N=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],S=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],C=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],v=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],D={type:S,keyword:N,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:C},$={className:"function.dispatch",relevance:0,keywords:{_hint:v},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},L=[$,x,f,a,e.C_BLOCK_COMMENT_MODE,b,m],Y={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:D,contains:L.concat([{begin:/\(/,end:/\)/,keywords:D,contains:L.concat(["self"]),relevance:0}]),relevance:0},re={className:"function",begin:"("+d+"[\\*&\\s]+)+"+T,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:D,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:s,keywords:D,relevance:0},{begin:T,returnBegin:!0,contains:[y],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[m,b]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:D,relevance:0,contains:[a,e.C_BLOCK_COMMENT_MODE,m,b,f,{begin:/\(/,end:/\)/,keywords:D,relevance:0,contains:["self",a,e.C_BLOCK_COMMENT_MODE,m,b,f]}]},f,a,e.C_BLOCK_COMMENT_MODE,x]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:D,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(Y,re,$,L,[x,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:D,contains:["self",f]},{begin:e.IDENT_RE+"::",keywords:D},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function hI(e){const t=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],a=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],s=["default","false","null","true"],l=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],o=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],d={keyword:l.concat(o),built_in:t,literal:s},f=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),h={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},m={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},b={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},x=e.inherit(b,{illegal:/\n/}),y={className:"subst",begin:/\{/,end:/\}/,keywords:d},T=e.inherit(y,{illegal:/\n/}),N={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,T]},S={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},y]},C=e.inherit(S,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},T]});y.contains=[S,N,b,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,h,e.C_BLOCK_COMMENT_MODE],T.contains=[C,N,x,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,h,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const v={variants:[m,S,N,b,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},M={begin:"<",end:">",contains:[{beginKeywords:"in out"},f]},k=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",D={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:d,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"<!--|-->"},{begin:"</?",end:">"}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},v,h,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},f,M,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[f,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[f,M,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+k+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:d,contains:[{beginKeywords:a.join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,M],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:d,relevance:0,contains:[v,h,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},D]}}const pI=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),gI=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],bI=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],xI=[...gI,...bI],EI=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),yI=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),TI=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),_I=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function NI(e){const t=e.regex,a=pI(e),s={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},l="and or not only",o=/@-?\w[\w]*(-\w+)*/,d="[a-zA-Z-][a-zA-Z0-9_-]*",f=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[a.BLOCK_COMMENT,s,a.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+d,relevance:0},a.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+yI.join("|")+")"},{begin:":(:)?("+TI.join("|")+")"}]},a.CSS_VARIABLE,{className:"attribute",begin:"\\b("+_I.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[a.BLOCK_COMMENT,a.HEXCOLOR,a.IMPORTANT,a.CSS_NUMBER_MODE,...f,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...f,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},a.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:o},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:l,attribute:EI.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...f,a.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+xI.join("|")+")\\b"}]}}function SI(e){const t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}function vI(e){const o={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:o,illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:o,illegal:/["']/}]}]}}function AI(e){const t=e.regex,a=/[_A-Za-z][_0-9A-Za-z]*/;return{name:"GraphQL",aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"],literal:["true","false","null"]},contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation",begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{scope:"symbol",begin:t.concat(a,t.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}function CI(e){const t=e.regex,a={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:e.NUMBER_RE}]},s=e.COMMENT();s.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const l={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},o={className:"literal",begin:/\bon|off|true|false|yes|no\b/},d={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},f={begin:/\[/,end:/\]/,contains:[s,o,l,d,a,"self"],relevance:0},h=/[A-Za-z0-9_-]+/,m=/"(\\"|[^"])*"/,b=/'[^']*'/,x=t.either(h,m,b),y=t.concat(x,"(\\s*\\.\\s*",x,")*",t.lookahead(/\s*=\s*[^#\s]/));return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[s,{className:"section",begin:/\[+/,end:/\]+/},{begin:y,className:"attr",starts:{end:/$/,contains:[s,f,o,l,d,a]}}]}}var Oi="[0-9](_*[0-9])*",Zu=`\\.(${Oi})`,Wu="[0-9a-fA-F](_*[0-9a-fA-F])*",s1={className:"number",variants:[{begin:`(\\b(${Oi})((${Zu})|\\.)?|(${Zu}))[eE][+-]?(${Oi})[fFdD]?\\b`},{begin:`\\b(${Oi})((${Zu})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${Zu})[fFdD]?\\b`},{begin:`\\b(${Oi})[fFdD]\\b`},{begin:`\\b0[xX]((${Wu})\\.?|(${Wu})?\\.(${Wu}))[pP][+-]?(${Oi})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${Wu})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function sT(e,t,a){return a===-1?"":e.replace(t,s=>sT(e,t,a-1))}function wI(e){const t=e.regex,a="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",s=a+sT("(?:<"+a+"~~~(?:\\s*,\\s*"+a+"~~~)*>)?",/~~~/g,2),h={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},m={className:"meta",begin:"@"+a,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},b={className:"params",begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:h,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,a],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,a),/\s+/,a,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,a],className:{1:"keyword",3:"title.class"},contains:[b,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+s+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:h,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:[m,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,s1,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},s1,m]}}const i1="[A-Za-z$_][0-9A-Za-z$_]*",kI=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],RI=["true","false","null","undefined","NaN","Infinity"],iT=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],lT=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],oT=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],OI=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],II=[].concat(oT,iT,lT);function MI(e){const t=e.regex,a=(pe,{after:ke})=>{const B="</"+pe[0].slice(1);return pe.input.indexOf(B,ke)!==-1},s=i1,l={begin:"<>",end:"</>"},o=/<[A-Za-z0-9\\._:-]+\s*\/>/,d={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(pe,ke)=>{const B=pe[0].length+pe.index,R=pe.input[B];if(R==="<"||R===","){ke.ignoreMatch();return}R===">"&&(a(pe,{after:B})||ke.ignoreMatch());let X;const O=pe.input.substring(B);if(X=O.match(/^\s*=/)){ke.ignoreMatch();return}if((X=O.match(/^\s+extends\s+/))&&X.index===0){ke.ignoreMatch();return}}},f={$pattern:i1,keyword:kI,literal:RI,built_in:II,"variable.language":OI},h="[0-9](_?[0-9])*",m=`\\.(${h})`,b="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",x={className:"number",variants:[{begin:`(\\b(${b})((${m})|\\.)?|(${m}))[eE][+-]?(${h})\\b`},{begin:`\\b(${b})\\b((${m})\\b|\\.)?|(${m})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},y={className:"subst",begin:"\\$\\{",end:"\\}",keywords:f,contains:[]},T={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,y],subLanguage:"xml"}},N={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,y],subLanguage:"css"}},S={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,y],subLanguage:"graphql"}},C={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,y]},M={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:s+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},k=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,T,N,S,C,{match:/\$\d+/},x];y.contains=k.concat({begin:/\{/,end:/\}/,keywords:f,contains:["self"].concat(k)});const D=[].concat(M,y.contains),$=D.concat([{begin:/(\s*)\(/,end:/\)/,keywords:f,contains:["self"].concat(D)}]),L={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:$},Y={variants:[{match:[/class/,/\s+/,s,/\s+/,/extends/,/\s+/,t.concat(s,"(",t.concat(/\./,s),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,s],scope:{1:"keyword",3:"title.class"}}]},re={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...iT,...lT]}},fe={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},U={variants:[{match:[/function/,/\s+/,s,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[L],illegal:/%/},H={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function ae(pe){return t.concat("(?!",pe.join("|"),")")}const se={match:t.concat(/\b/,ae([...oT,"super","import"].map(pe=>`${pe}\\s*\\(`)),s,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},Z={begin:t.concat(/\./,t.lookahead(t.concat(s,/(?![0-9A-Za-z$_(])/))),end:s,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},J={match:[/get|set/,/\s+/,s,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},L]},V="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",G={match:[/const|var|let/,/\s+/,s,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(V)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[L]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:f,exports:{PARAMS_CONTAINS:$,CLASS_REFERENCE:re},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),fe,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,T,N,S,C,M,{match:/\$\d+/},x,re,{scope:"attr",match:s+t.lookahead(":"),relevance:0},G,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[M,e.REGEXP_MODE,{className:"function",begin:V,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:$}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:l.begin,end:l.end},{match:o},{begin:d.begin,"on:begin":d.isTrulyOpeningTag,end:d.end}],subLanguage:"xml",contains:[{begin:d.begin,end:d.end,skip:!0,contains:["self"]}]}]},U,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[L,e.inherit(e.TITLE_MODE,{begin:s,className:"title.function"})]},{match:/\.\.\./,relevance:0},Z,{match:"\\$"+s,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[L]},se,H,Y,J,{match:/\$[(.]/}]}}function DI(e){const t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},a={match:/[{}[\],:]/,className:"punctuation",relevance:0},s=["true","false","null"],l={scope:"literal",beginKeywords:s.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:s},contains:[t,a,e.QUOTE_STRING_MODE,l,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}var Ii="[0-9](_*[0-9])*",Ju=`\\.(${Ii})`,ec="[0-9a-fA-F](_*[0-9a-fA-F])*",LI={className:"number",variants:[{begin:`(\\b(${Ii})((${Ju})|\\.)?|(${Ju}))[eE][+-]?(${Ii})[fFdD]?\\b`},{begin:`\\b(${Ii})((${Ju})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${Ju})[fFdD]?\\b`},{begin:`\\b(${Ii})[fFdD]\\b`},{begin:`\\b0[xX]((${ec})\\.?|(${ec})?\\.(${ec}))[pP][+-]?(${Ii})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${ec})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function jI(e){const t={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},a={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},s={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},l={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},o={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},d={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[o,l]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,o,l]}]};l.contains.push(d);const f={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},h={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(d,{className:"string"}),"self"]}]},m=LI,b=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),x={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},y=x;return y.variants[1].contains=[x],x.variants[1].contains=[y],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,b,a,s,f,h,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[x,e.C_LINE_COMMENT_MODE,b],relevance:0},e.C_LINE_COMMENT_MODE,b,f,h,d,e.C_NUMBER_MODE]},b]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},f,h]},d,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
|
|
433
|
+
`},m]}}const BI=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),PI=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],UI=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],HI=[...PI,...UI],FI=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),uT=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),cT=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),zI=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),qI=uT.concat(cT).sort().reverse();function YI(e){const t=BI(e),a=qI,s="and or not only",l="[\\w-]+",o="("+l+"|@\\{"+l+"\\})",d=[],f=[],h=function(k){return{className:"string",begin:"~?"+k+".*?"+k}},m=function(k,D,$){return{className:k,begin:D,relevance:$}},b={$pattern:/[a-z-]+/,keyword:s,attribute:FI.join(" ")},x={begin:"\\(",end:"\\)",contains:f,keywords:b,relevance:0};f.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,h("'"),h('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,x,m("variable","@@?"+l,10),m("variable","@\\{"+l+"\\}"),m("built_in","~?`[^`]*?`"),{className:"attribute",begin:l+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);const y=f.concat({begin:/\{/,end:/\}/,contains:d}),T={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(f)},N={begin:o+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+zI.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:f}}]},S={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:b,returnEnd:!0,contains:f,relevance:0}},C={className:"variable",variants:[{begin:"@"+l+"\\s*:",relevance:15},{begin:"@"+l}],starts:{end:"[;}]",returnEnd:!0,contains:y}},v={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:o,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,T,m("keyword","all\\b"),m("variable","@\\{"+l+"\\}"),{begin:"\\b("+HI.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,m("selector-tag",o,0),m("selector-id","#"+o),m("selector-class","\\."+o,0),m("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+uT.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+cT.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:y},{begin:"!important"},t.FUNCTION_DISPATCH]},M={begin:l+`:(:)?(${a.join("|")})`,returnBegin:!0,contains:[v]};return d.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,S,C,M,N,v,T,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:d}}function $I(e){const t="\\[=*\\[",a="\\]=*\\]",s={begin:t,end:a,contains:["self"]},l=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,a,{contains:[s],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:l.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:l}].concat(l)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:a,contains:[s],relevance:5}])}}function GI(e){const t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},a={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,t]},s={className:"variable",begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:"subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value"},contains:[t,a]},l={begin:"^"+e.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},o={className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},d={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[t]};return{name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/,keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath"},contains:[e.HASH_COMMENT_MODE,t,a,s,l,o,d]}}function KI(e){const t=e.regex,a={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},s={begin:"^[-\\*]{3,}",end:"$"},l={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},o={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},d={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},f=/[A-Za-z][A-Za-z0-9+.-]*/,h={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,f,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},m={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},b={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},x=e.inherit(m,{contains:[]}),y=e.inherit(b,{contains:[]});m.contains.push(y),b.contains.push(x);let T=[a,h];return[m,b,x,y].forEach(v=>{v.contains=v.contains.concat(T)}),T=T.concat(m,b),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:T},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:T}]}]},a,o,m,b,{className:"quote",begin:"^>\\s+",contains:T,end:"$"},l,s,h,d,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function VI(e){const t={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},a=/[a-zA-Z@][a-zA-Z0-9_]*/,f={"variable.language":["this","super"],$pattern:a,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},h={$pattern:a,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:f,illegal:"</",contains:[t,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+h.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:h,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function QI(e){const t=e.regex,a=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],s=/[dualxmsipngr]{0,12}/,l={$pattern:/[\w.]+/,keyword:a.join(" ")},o={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:l},d={begin:/->\{/,end:/\}/},f={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},h={scope:"variable",variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[f]},m={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},b=[e.BACKSLASH_ESCAPE,o,h],x=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],y=(S,C,v="\\1")=>{const M=v==="\\1"?v:t.concat(v,C);return t.concat(t.concat("(?:",S,")"),C,/(?:\\.|[^\\\/])*?/,M,/(?:\\.|[^\\\/])*?/,v,s)},T=(S,C,v)=>t.concat(t.concat("(?:",S,")"),C,/(?:\\.|[^\\\/])*?/,v,s),N=[h,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),d,{className:"string",contains:b,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},m,{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:y("s|tr|y",t.either(...x,{capture:!0}))},{begin:y("s|tr|y","\\(","\\)")},{begin:y("s|tr|y","\\[","\\]")},{begin:y("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:T("(?:m|qr)?",/\//,/\//)},{begin:T("m|qr",t.either(...x,{capture:!0}),/\1/)},{begin:T("m|qr",/\(/,/\)/)},{begin:T("m|qr",/\[/,/\]/)},{begin:T("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,f]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,f,m]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return o.contains=N,d.contains=N,{name:"Perl",aliases:["pl","pm"],keywords:l,contains:N}}function XI(e){const t=e.regex,a=/(?![A-Za-z0-9])(?![$])/,s=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,a),l=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,a),o=t.concat(/[A-Z]+/,a),d={scope:"variable",match:"\\$+"+s},f={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},h={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},m=e.inherit(e.APOS_STRING_MODE,{illegal:null}),b=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(h)}),x={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(h),"on:begin":(Z,J)=>{J.data._beginMatch=Z[1]||Z[2]},"on:end":(Z,J)=>{J.data._beginMatch!==Z[1]&&J.ignoreMatch()}},y=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),T=`[
|
|
434
|
+
]`,N={scope:"string",variants:[b,m,x,y]},S={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},C=["false","null","true"],v=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],M=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],D={keyword:v,literal:(Z=>{const J=[];return Z.forEach(V=>{J.push(V),V.toLowerCase()===V?J.push(V.toUpperCase()):J.push(V.toLowerCase())}),J})(C),built_in:M},$=Z=>Z.map(J=>J.replace(/\|\d+$/,"")),L={variants:[{match:[/new/,t.concat(T,"+"),t.concat("(?!",$(M).join("\\b|"),"\\b)"),l],scope:{1:"keyword",4:"title.class"}}]},Y=t.concat(s,"\\b(?!\\()"),re={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),Y],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[l,t.concat(/::/,t.lookahead(/(?!class\b)/)),Y],scope:{1:"title.class",3:"variable.constant"}},{match:[l,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[l,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},fe={scope:"attr",match:t.concat(s,t.lookahead(":"),t.lookahead(/(?!::)/))},U={relevance:0,begin:/\(/,end:/\)/,keywords:D,contains:[fe,d,re,e.C_BLOCK_COMMENT_MODE,N,S,L]},H={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",$(v).join("\\b|"),"|",$(M).join("\\b|"),"\\b)"),s,t.concat(T,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[U]};U.contains.push(H);const ae=[fe,re,e.C_BLOCK_COMMENT_MODE,N,S,L],se={begin:t.concat(/#\[\s*\\?/,t.either(l,o)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:C,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:C,keyword:["new","array"]},contains:["self",...ae]},...ae,{scope:"meta",variants:[{match:l},{match:o}]}]};return{case_insensitive:!1,keywords:D,contains:[se,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},f,{scope:"variable.language",match:/\$this\b/},d,H,re,{match:[/const/,/\s/,s],scope:{1:"keyword",3:"variable.constant"}},L,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:D,contains:["self",se,d,re,e.C_BLOCK_COMMENT_MODE,N,S]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},N,S]}}function ZI(e){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}function WI(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function JI(e){const t=e.regex,a=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),s=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],f={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:s,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},h={className:"meta",begin:/^(>>>|\.\.\.) /},m={className:"subst",begin:/\{/,end:/\}/,keywords:f,illegal:/#/},b={begin:/\{\{/,relevance:0},x={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,h],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,h],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,h,b,m]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,h,b,m]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,b,m]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,b,m]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},y="[0-9](_?[0-9])*",T=`(\\b(${y}))?\\.(${y})|\\b(${y})\\.`,N=`\\b|${s.join("|")}`,S={className:"number",relevance:0,variants:[{begin:`(\\b(${y})|(${T}))[eE][+-]?(${y})[jJ]?(?=${N})`},{begin:`(${T})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${N})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${N})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${N})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${N})`},{begin:`\\b(${y})[jJ](?=${N})`}]},C={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:f,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},v={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:["self",h,S,x,e.HASH_COMMENT_MODE]}]};return m.contains=[x,S,h],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:f,illegal:/(<\/|\?)|=>/,contains:[h,S,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},x,C,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,a],scope:{1:"keyword",3:"title.function"},contains:[v]},{variants:[{match:[/\bclass/,/\s+/,a,/\s*/,/\(\s*/,a,/\s*\)/]},{match:[/\bclass/,/\s+/,a]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[S,v,x]}]}}function e6(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function t6(e){const t=e.regex,a=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,s=t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),l=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,o=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:a,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:a},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[l,s]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,s]},{scope:{1:"punctuation",2:"number"},match:[o,s]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,s]}]},{scope:{3:"operator"},match:[a,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:l},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:o},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function n6(e){const t=e.regex,a="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",s=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),l=t.concat(s,/(::\w+)*/),d={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},f={className:"doctag",begin:"@[A-Za-z]+"},h={begin:"#<",end:">"},m=[e.COMMENT("#","$",{contains:[f]}),e.COMMENT("^=begin","^=end",{contains:[f],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],b={className:"subst",begin:/#\{/,end:/\}/,keywords:d},x={className:"string",contains:[e.BACKSLASH_ESCAPE,b],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,b]})]}]},y="[1-9](_?[0-9])*|0",T="[0-9](_?[0-9])*",N={className:"number",relevance:0,variants:[{begin:`\\b(${y})(\\.(${T}))?([eE][+-]?(${T})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},S={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:d}]},L=[x,{variants:[{match:[/class\s+/,l,/\s+<\s+/,l]},{match:[/\b(class|module)\s+/,l]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:d},{match:[/(include|extend)\s+/,l],scope:{2:"title.class"},keywords:d},{relevance:0,match:[l,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:s,scope:"title.class"},{match:[/def/,/\s+/,a],scope:{1:"keyword",3:"title.function"},contains:[S]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[x,{begin:a}],relevance:0},N,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:d},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,b],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(h,m),relevance:0}].concat(h,m);b.contains=L,S.contains=L;const U=[{begin:/^\s*=>/,starts:{end:"$",contains:L}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:d,contains:L}}];return m.unshift(h),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:d,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(U).concat(m).concat(L)}}function a6(e){const t=e.regex,a=/(r#)?/,s=t.concat(a,e.UNDERSCORE_IDENT_RE),l=t.concat(a,e.IDENT_RE),o={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,l,t.lookahead(/\s*\(/))},d="([ui](8|16|32|64|128|size)|f(32|64))?",f=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],h=["true","false","Some","None","Ok","Err"],m=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],b=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:b,keyword:f,literal:h,built_in:m},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:"number",variants:[{begin:"\\b0b([01_]+)"+d},{begin:"\\b0o([0-7_]+)"+d},{begin:"\\b0x([A-Fa-f0-9_]+)"+d},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+d}],relevance:0},{begin:[/fn/,/\s+/,s],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,s],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,s,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,s],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,s],className:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:m,type:b}},{className:"punctuation",begin:"->"},o]}}const r6=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),s6=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],i6=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],l6=[...s6,...i6],o6=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),u6=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),c6=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),d6=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function f6(e){const t=r6(e),a=c6,s=u6,l="@[a-z-]+",o="and or not only",f={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+l6.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+s.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+a.join("|")+")"},f,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+d6.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[t.BLOCK_COMMENT,f,t.HEXCOLOR,t.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:l,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:o,attribute:o6.join(" ")},contains:[{begin:l,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},f,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}}function m6(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function h6(e){const t=e.regex,a=e.COMMENT("--","$"),s={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},l={begin:/"/,end:/"/,contains:[{match:/""/}]},o=["true","false","unknown"],d=["double precision","large object","with timezone","without timezone"],f=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],h=["add","asc","collation","desc","final","first","last","view"],m=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],b=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],x=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],y=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],T=b,N=[...m,...h].filter($=>!b.includes($)),S={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},C={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},v={match:t.concat(/\b/,t.either(...T),/\s*\(/),relevance:0,keywords:{built_in:T}};function M($){return t.concat(/\b/,t.either(...$.map(L=>L.replace(/\s+/,"\\s+"))),/\b/)}const k={scope:"keyword",match:M(y),relevance:0};function D($,{exceptions:L,when:Y}={}){const re=Y;return L=L||[],$.map(fe=>fe.match(/\|\d+$/)||L.includes(fe)?fe:re(fe)?`${fe}|0`:fe)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:D(N,{when:$=>$.length<3}),literal:o,type:f,built_in:x},contains:[{scope:"type",match:M(d)},k,v,S,s,l,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,a,C]}}function dT(e){return e?typeof e=="string"?e:e.source:null}function Ql(e){return At("(?=",e,")")}function At(...e){return e.map(a=>dT(a)).join("")}function p6(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function On(...e){return"("+(p6(e).capture?"":"?:")+e.map(s=>dT(s)).join("|")+")"}const zh=e=>At(/\b/,e,/\w$/.test(e)?/\b/:/\B/),g6=["Protocol","Type"].map(zh),l1=["init","self"].map(zh),b6=["Any","Self"],vm=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],o1=["false","nil","true"],x6=["assignment","associativity","higherThan","left","lowerThan","none","right"],E6=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],u1=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],fT=On(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),mT=On(fT,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),Am=At(fT,mT,"*"),hT=On(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),_c=On(hT,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),Ya=At(hT,_c,"*"),tc=At(/[A-Z]/,_c,"*"),y6=["attached","autoclosure",At(/convention\(/,On("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",At(/objc\(/,Ya,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],T6=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function _6(e){const t={match:/\s+/,relevance:0},a=e.COMMENT("/\\*","\\*/",{contains:["self"]}),s=[e.C_LINE_COMMENT_MODE,a],l={match:[/\./,On(...g6,...l1)],className:{2:"keyword"}},o={match:At(/\./,On(...vm)),relevance:0},d=vm.filter(Je=>typeof Je=="string").concat(["_|0"]),f=vm.filter(Je=>typeof Je!="string").concat(b6).map(zh),h={variants:[{className:"keyword",match:On(...f,...l1)}]},m={$pattern:On(/\b\w+/,/#\w+/),keyword:d.concat(E6),literal:o1},b=[l,o,h],x={match:At(/\./,On(...u1)),relevance:0},y={className:"built_in",match:At(/\b/,On(...u1),/(?=\()/)},T=[x,y],N={match:/->/,relevance:0},S={className:"operator",relevance:0,variants:[{match:Am},{match:`\\.(\\.|${mT})+`}]},C=[N,S],v="([0-9]_*)+",M="([0-9a-fA-F]_*)+",k={className:"number",relevance:0,variants:[{match:`\\b(${v})(\\.(${v}))?([eE][+-]?(${v}))?\\b`},{match:`\\b0x(${M})(\\.(${M}))?([pP][+-]?(${v}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},D=(Je="")=>({className:"subst",variants:[{match:At(/\\/,Je,/[0\\tnr"']/)},{match:At(/\\/,Je,/u\{[0-9a-fA-F]{1,8}\}/)}]}),$=(Je="")=>({className:"subst",match:At(/\\/,Je,/[\t ]*(?:[\r\n]|\r\n)/)}),L=(Je="")=>({className:"subst",label:"interpol",begin:At(/\\/,Je,/\(/),end:/\)/}),Y=(Je="")=>({begin:At(Je,/"""/),end:At(/"""/,Je),contains:[D(Je),$(Je),L(Je)]}),re=(Je="")=>({begin:At(Je,/"/),end:At(/"/,Je),contains:[D(Je),L(Je)]}),fe={className:"string",variants:[Y(),Y("#"),Y("##"),Y("###"),re(),re("#"),re("##"),re("###")]},U=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],H={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:U},ae=Je=>{const Dn=At(Je,/\//),Cn=At(/\//,Je);return{begin:Dn,end:Cn,contains:[...U,{scope:"comment",begin:`#(?!.*${Cn})`,end:/$/}]}},se={scope:"regexp",variants:[ae("###"),ae("##"),ae("#"),H]},Z={match:At(/`/,Ya,/`/)},J={className:"variable",match:/\$\d+/},V={className:"variable",match:`\\$${_c}+`},G=[Z,J,V],pe={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:T6,contains:[...C,k,fe]}]}},ke={scope:"keyword",match:At(/@/,On(...y6),Ql(On(/\(/,/\s+/)))},B={scope:"meta",match:At(/@/,Ya)},R=[pe,ke,B],X={match:Ql(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:At(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,_c,"+")},{className:"type",match:tc,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:At(/\s+&\s+/,Ql(tc)),relevance:0}]},O={begin:/</,end:/>/,keywords:m,contains:[...s,...b,...R,N,X]};X.contains.push(O);const ge={match:At(Ya,/\s*:/),keywords:"_|0",relevance:0},ve={begin:/\(/,end:/\)/,relevance:0,keywords:m,contains:["self",ge,...s,se,...b,...T,...C,k,fe,...G,...R,X]},Ae={begin:/</,end:/>/,keywords:"repeat each",contains:[...s,X]},$e={begin:On(Ql(At(Ya,/\s*:/)),Ql(At(Ya,/\s+/,Ya,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:Ya}]},dt={begin:/\(/,end:/\)/,keywords:m,contains:[$e,...s,...b,...C,k,fe,...R,X,ve],endsParent:!0,illegal:/["']/},ut={match:[/(func|macro)/,/\s+/,On(Z.match,Ya,Am)],className:{1:"keyword",3:"title.function"},contains:[Ae,dt,t],illegal:[/\[/,/%/]},Ft={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[Ae,dt,t],illegal:/\[|%/},yn={match:[/operator/,/\s+/,Am],className:{1:"keyword",3:"title"}},ua={begin:[/precedencegroup/,/\s+/,tc],className:{1:"keyword",3:"title"},contains:[X],keywords:[...x6,...o1],end:/}/},Sa={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},un={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},Vn={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,Ya,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:m,contains:[Ae,...b,{begin:/:/,end:/\{/,keywords:m,contains:[{scope:"title.class.inherited",match:tc},...b],relevance:0}]};for(const Je of fe.variants){const Dn=Je.contains.find(ca=>ca.label==="interpol");Dn.keywords=m;const Cn=[...b,...T,...C,k,fe,...G];Dn.contains=[...Cn,{begin:/\(/,end:/\)/,contains:["self",...Cn]}]}return{name:"Swift",keywords:m,contains:[...s,ut,Ft,Sa,un,Vn,yn,ua,{beginKeywords:"import",end:/$/,contains:[...s],relevance:0},se,...b,...T,...C,k,fe,...G,...R,X,ve]}}const Nc="[A-Za-z$_][0-9A-Za-z$_]*",pT=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],gT=["true","false","null","undefined","NaN","Infinity"],bT=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],xT=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],ET=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],yT=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],TT=[].concat(ET,bT,xT);function N6(e){const t=e.regex,a=(pe,{after:ke})=>{const B="</"+pe[0].slice(1);return pe.input.indexOf(B,ke)!==-1},s=Nc,l={begin:"<>",end:"</>"},o=/<[A-Za-z0-9\\._:-]+\s*\/>/,d={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(pe,ke)=>{const B=pe[0].length+pe.index,R=pe.input[B];if(R==="<"||R===","){ke.ignoreMatch();return}R===">"&&(a(pe,{after:B})||ke.ignoreMatch());let X;const O=pe.input.substring(B);if(X=O.match(/^\s*=/)){ke.ignoreMatch();return}if((X=O.match(/^\s+extends\s+/))&&X.index===0){ke.ignoreMatch();return}}},f={$pattern:Nc,keyword:pT,literal:gT,built_in:TT,"variable.language":yT},h="[0-9](_?[0-9])*",m=`\\.(${h})`,b="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",x={className:"number",variants:[{begin:`(\\b(${b})((${m})|\\.)?|(${m}))[eE][+-]?(${h})\\b`},{begin:`\\b(${b})\\b((${m})\\b|\\.)?|(${m})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},y={className:"subst",begin:"\\$\\{",end:"\\}",keywords:f,contains:[]},T={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,y],subLanguage:"xml"}},N={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,y],subLanguage:"css"}},S={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,y],subLanguage:"graphql"}},C={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,y]},M={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:s+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},k=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,T,N,S,C,{match:/\$\d+/},x];y.contains=k.concat({begin:/\{/,end:/\}/,keywords:f,contains:["self"].concat(k)});const D=[].concat(M,y.contains),$=D.concat([{begin:/(\s*)\(/,end:/\)/,keywords:f,contains:["self"].concat(D)}]),L={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:$},Y={variants:[{match:[/class/,/\s+/,s,/\s+/,/extends/,/\s+/,t.concat(s,"(",t.concat(/\./,s),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,s],scope:{1:"keyword",3:"title.class"}}]},re={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...bT,...xT]}},fe={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},U={variants:[{match:[/function/,/\s+/,s,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[L],illegal:/%/},H={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function ae(pe){return t.concat("(?!",pe.join("|"),")")}const se={match:t.concat(/\b/,ae([...ET,"super","import"].map(pe=>`${pe}\\s*\\(`)),s,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},Z={begin:t.concat(/\./,t.lookahead(t.concat(s,/(?![0-9A-Za-z$_(])/))),end:s,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},J={match:[/get|set/,/\s+/,s,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},L]},V="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",G={match:[/const|var|let/,/\s+/,s,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(V)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[L]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:f,exports:{PARAMS_CONTAINS:$,CLASS_REFERENCE:re},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),fe,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,T,N,S,C,M,{match:/\$\d+/},x,re,{scope:"attr",match:s+t.lookahead(":"),relevance:0},G,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[M,e.REGEXP_MODE,{className:"function",begin:V,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:$}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:l.begin,end:l.end},{match:o},{begin:d.begin,"on:begin":d.isTrulyOpeningTag,end:d.end}],subLanguage:"xml",contains:[{begin:d.begin,end:d.end,skip:!0,contains:["self"]}]}]},U,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[L,e.inherit(e.TITLE_MODE,{begin:s,className:"title.function"})]},{match:/\.\.\./,relevance:0},Z,{match:"\\$"+s,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[L]},se,H,Y,J,{match:/\$[(.]/}]}}function S6(e){const t=e.regex,a=N6(e),s=Nc,l=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],o={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},d={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:l},contains:[a.exports.CLASS_REFERENCE]},f={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},h=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],m={$pattern:Nc,keyword:pT.concat(h),literal:gT,built_in:TT.concat(l),"variable.language":yT},b={className:"meta",begin:"@"+s},x=(S,C,v)=>{const M=S.contains.findIndex(k=>k.label===C);if(M===-1)throw new Error("can not find mode to replace");S.contains.splice(M,1,v)};Object.assign(a.keywords,m),a.exports.PARAMS_CONTAINS.push(b);const y=a.contains.find(S=>S.scope==="attr"),T=Object.assign({},y,{match:t.concat(s,t.lookahead(/\s*\?:/))});a.exports.PARAMS_CONTAINS.push([a.exports.CLASS_REFERENCE,y,T]),a.contains=a.contains.concat([b,o,d,T]),x(a,"shebang",e.SHEBANG()),x(a,"use_strict",f);const N=a.contains.find(S=>S.label==="func.def");return N.relevance=0,Object.assign(a,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),a}function v6(e){const t=e.regex,a={className:"string",begin:/"(""|[^/n])"C\b/},s={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},l=/\d{1,2}\/\d{1,2}\/\d{4}/,o=/\d{4}-\d{1,2}-\d{1,2}/,d=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,f=/\d{1,2}(:\d{1,2}){1,2}/,h={className:"literal",variants:[{begin:t.concat(/# */,t.either(o,l),/ *#/)},{begin:t.concat(/# */,f,/ *#/)},{begin:t.concat(/# */,d,/ *#/)},{begin:t.concat(/# */,t.either(o,l),/ +/,t.either(d,f),/ *#/)}]},m={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},b={className:"label",begin:/^\w+:/},x=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),y=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[a,s,h,m,b,x,y,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[y]}]}}function A6(e){e.regex;const t=e.COMMENT(/\(;/,/;\)/);t.contains.push("self");const a=e.COMMENT(/;;/,/$/),s=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],l={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},o={className:"variable",begin:/\$[\w_]+/},d={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},f={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},h={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},m={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:s},contains:[a,t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},o,d,l,e.QUOTE_STRING_MODE,h,m,f]}}function C6(e){const t=e.regex,a=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),s=/[\p{L}0-9._:-]+/u,l={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},o={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},d=e.inherit(o,{begin:/\(/,end:/\)/}),f=e.inherit(e.APOS_STRING_MODE,{className:"string"}),h=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),m={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:s,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[l]},{begin:/'/,end:/'/,contains:[l]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[o,h,f,d,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[o,d,h,f]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},l,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[h]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[m],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[m],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(a,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:a,relevance:0,starts:m}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(a,/>/))),contains:[{className:"name",begin:a,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function w6(e){const t="true false yes no null",a="[\\w#;/?:@&=+$,.~*'()[\\]]+",s={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},l={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},o={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},d={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,l]},f=e.inherit(d,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),y={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},T={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},N={begin:/\{/,end:/\}/,contains:[T],illegal:"\\n",relevance:0},S={begin:"\\[",end:"\\]",contains:[T],illegal:"\\n",relevance:0},C=[s,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+a},{className:"type",begin:"!<"+a+">"},{className:"type",begin:"!"+a},{className:"type",begin:"!!"+a},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},y,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},N,S,o,d],v=[...C];return v.pop(),v.push(f),T.contains=v,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:C}}const k6={arduino:cI,bash:dI,c:fI,cpp:mI,csharp:hI,css:NI,diff:SI,go:vI,graphql:AI,ini:CI,java:wI,javascript:MI,json:DI,kotlin:jI,less:YI,lua:$I,makefile:GI,markdown:KI,objectivec:VI,perl:QI,php:XI,"php-template":ZI,plaintext:WI,python:JI,"python-repl":e6,r:t6,ruby:n6,rust:a6,scss:f6,shell:m6,sql:h6,swift:_6,typescript:S6,vbnet:v6,wasm:A6,xml:C6,yaml:w6};var Cm,c1;function R6(){if(c1)return Cm;c1=1;function e(q){return q instanceof Map?q.clear=q.delete=q.set=function(){throw new Error("map is read-only")}:q instanceof Set&&(q.add=q.clear=q.delete=function(){throw new Error("set is read-only")}),Object.freeze(q),Object.getOwnPropertyNames(q).forEach(ce=>{const Ne=q[ce],Ge=typeof Ne;(Ge==="object"||Ge==="function")&&!Object.isFrozen(Ne)&&e(Ne)}),q}class t{constructor(ce){ce.data===void 0&&(ce.data={}),this.data=ce.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function a(q){return q.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function s(q,...ce){const Ne=Object.create(null);for(const Ge in q)Ne[Ge]=q[Ge];return ce.forEach(function(Ge){for(const Mt in Ge)Ne[Mt]=Ge[Mt]}),Ne}const l="</span>",o=q=>!!q.scope,d=(q,{prefix:ce})=>{if(q.startsWith("language:"))return q.replace("language:","language-");if(q.includes(".")){const Ne=q.split(".");return[`${ce}${Ne.shift()}`,...Ne.map((Ge,Mt)=>`${Ge}${"_".repeat(Mt+1)}`)].join(" ")}return`${ce}${q}`};class f{constructor(ce,Ne){this.buffer="",this.classPrefix=Ne.classPrefix,ce.walk(this)}addText(ce){this.buffer+=a(ce)}openNode(ce){if(!o(ce))return;const Ne=d(ce.scope,{prefix:this.classPrefix});this.span(Ne)}closeNode(ce){o(ce)&&(this.buffer+=l)}value(){return this.buffer}span(ce){this.buffer+=`<span class="${ce}">`}}const h=(q={})=>{const ce={children:[]};return Object.assign(ce,q),ce};class m{constructor(){this.rootNode=h(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(ce){this.top.children.push(ce)}openNode(ce){const Ne=h({scope:ce});this.add(Ne),this.stack.push(Ne)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(ce){return this.constructor._walk(ce,this.rootNode)}static _walk(ce,Ne){return typeof Ne=="string"?ce.addText(Ne):Ne.children&&(ce.openNode(Ne),Ne.children.forEach(Ge=>this._walk(ce,Ge)),ce.closeNode(Ne)),ce}static _collapse(ce){typeof ce!="string"&&ce.children&&(ce.children.every(Ne=>typeof Ne=="string")?ce.children=[ce.children.join("")]:ce.children.forEach(Ne=>{m._collapse(Ne)}))}}class b extends m{constructor(ce){super(),this.options=ce}addText(ce){ce!==""&&this.add(ce)}startScope(ce){this.openNode(ce)}endScope(){this.closeNode()}__addSublanguage(ce,Ne){const Ge=ce.root;Ne&&(Ge.scope=`language:${Ne}`),this.add(Ge)}toHTML(){return new f(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function x(q){return q?typeof q=="string"?q:q.source:null}function y(q){return S("(?=",q,")")}function T(q){return S("(?:",q,")*")}function N(q){return S("(?:",q,")?")}function S(...q){return q.map(Ne=>x(Ne)).join("")}function C(q){const ce=q[q.length-1];return typeof ce=="object"&&ce.constructor===Object?(q.splice(q.length-1,1),ce):{}}function v(...q){return"("+(C(q).capture?"":"?:")+q.map(Ge=>x(Ge)).join("|")+")"}function M(q){return new RegExp(q.toString()+"|").exec("").length-1}function k(q,ce){const Ne=q&&q.exec(ce);return Ne&&Ne.index===0}const D=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function $(q,{joinWith:ce}){let Ne=0;return q.map(Ge=>{Ne+=1;const Mt=Ne;let Ct=x(Ge),Ie="";for(;Ct.length>0;){const we=D.exec(Ct);if(!we){Ie+=Ct;break}Ie+=Ct.substring(0,we.index),Ct=Ct.substring(we.index+we[0].length),we[0][0]==="\\"&&we[1]?Ie+="\\"+String(Number(we[1])+Mt):(Ie+=we[0],we[0]==="("&&Ne++)}return Ie}).map(Ge=>`(${Ge})`).join(ce)}const L=/\b\B/,Y="[a-zA-Z]\\w*",re="[a-zA-Z_]\\w*",fe="\\b\\d+(\\.\\d+)?",U="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",H="\\b(0b[01]+)",ae="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",se=(q={})=>{const ce=/^#![ ]*\//;return q.binary&&(q.begin=S(ce,/.*\b/,q.binary,/\b.*/)),s({scope:"meta",begin:ce,end:/$/,relevance:0,"on:begin":(Ne,Ge)=>{Ne.index!==0&&Ge.ignoreMatch()}},q)},Z={begin:"\\\\[\\s\\S]",relevance:0},J={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[Z]},V={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[Z]},G={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},pe=function(q,ce,Ne={}){const Ge=s({scope:"comment",begin:q,end:ce,contains:[]},Ne);Ge.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const Mt=v("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return Ge.contains.push({begin:S(/[ ]+/,"(",Mt,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),Ge},ke=pe("//","$"),B=pe("/\\*","\\*/"),R=pe("#","$"),X={scope:"number",begin:fe,relevance:0},O={scope:"number",begin:U,relevance:0},ge={scope:"number",begin:H,relevance:0},ve={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[Z,{begin:/\[/,end:/\]/,relevance:0,contains:[Z]}]},Ae={scope:"title",begin:Y,relevance:0},$e={scope:"title",begin:re,relevance:0},dt={begin:"\\.\\s*"+re,relevance:0};var Ft=Object.freeze({__proto__:null,APOS_STRING_MODE:J,BACKSLASH_ESCAPE:Z,BINARY_NUMBER_MODE:ge,BINARY_NUMBER_RE:H,COMMENT:pe,C_BLOCK_COMMENT_MODE:B,C_LINE_COMMENT_MODE:ke,C_NUMBER_MODE:O,C_NUMBER_RE:U,END_SAME_AS_BEGIN:function(q){return Object.assign(q,{"on:begin":(ce,Ne)=>{Ne.data._beginMatch=ce[1]},"on:end":(ce,Ne)=>{Ne.data._beginMatch!==ce[1]&&Ne.ignoreMatch()}})},HASH_COMMENT_MODE:R,IDENT_RE:Y,MATCH_NOTHING_RE:L,METHOD_GUARD:dt,NUMBER_MODE:X,NUMBER_RE:fe,PHRASAL_WORDS_MODE:G,QUOTE_STRING_MODE:V,REGEXP_MODE:ve,RE_STARTERS_RE:ae,SHEBANG:se,TITLE_MODE:Ae,UNDERSCORE_IDENT_RE:re,UNDERSCORE_TITLE_MODE:$e});function yn(q,ce){q.input[q.index-1]==="."&&ce.ignoreMatch()}function ua(q,ce){q.className!==void 0&&(q.scope=q.className,delete q.className)}function Sa(q,ce){ce&&q.beginKeywords&&(q.begin="\\b("+q.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",q.__beforeBegin=yn,q.keywords=q.keywords||q.beginKeywords,delete q.beginKeywords,q.relevance===void 0&&(q.relevance=0))}function un(q,ce){Array.isArray(q.illegal)&&(q.illegal=v(...q.illegal))}function Vn(q,ce){if(q.match){if(q.begin||q.end)throw new Error("begin & end are not supported with match");q.begin=q.match,delete q.match}}function Je(q,ce){q.relevance===void 0&&(q.relevance=1)}const Dn=(q,ce)=>{if(!q.beforeMatch)return;if(q.starts)throw new Error("beforeMatch cannot be used with starts");const Ne=Object.assign({},q);Object.keys(q).forEach(Ge=>{delete q[Ge]}),q.keywords=Ne.keywords,q.begin=S(Ne.beforeMatch,y(Ne.begin)),q.starts={relevance:0,contains:[Object.assign(Ne,{endsParent:!0})]},q.relevance=0,delete Ne.beforeMatch},Cn=["of","and","for","in","not","or","if","then","parent","list","value"],ca="keyword";function va(q,ce,Ne=ca){const Ge=Object.create(null);return typeof q=="string"?Mt(Ne,q.split(" ")):Array.isArray(q)?Mt(Ne,q):Object.keys(q).forEach(function(Ct){Object.assign(Ge,va(q[Ct],ce,Ct))}),Ge;function Mt(Ct,Ie){ce&&(Ie=Ie.map(we=>we.toLowerCase())),Ie.forEach(function(we){const Ye=we.split("|");Ge[Ye[0]]=[Ct,Za(Ye[0],Ye[1])]})}}function Za(q,ce){return ce?Number(ce):ja(q)?0:1}function ja(q){return Cn.includes(q.toLowerCase())}const Ar={},_t=q=>{console.error(q)},Wa=(q,...ce)=>{console.log(`WARN: ${q}`,...ce)},oe=(q,ce)=>{Ar[`${q}/${ce}`]||(console.log(`Deprecated as of ${q}. ${ce}`),Ar[`${q}/${ce}`]=!0)},Te=new Error;function Be(q,ce,{key:Ne}){let Ge=0;const Mt=q[Ne],Ct={},Ie={};for(let we=1;we<=ce.length;we++)Ie[we+Ge]=Mt[we],Ct[we+Ge]=!0,Ge+=M(ce[we-1]);q[Ne]=Ie,q[Ne]._emit=Ct,q[Ne]._multi=!0}function P(q){if(Array.isArray(q.begin)){if(q.skip||q.excludeBegin||q.returnBegin)throw _t("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Te;if(typeof q.beginScope!="object"||q.beginScope===null)throw _t("beginScope must be object"),Te;Be(q,q.begin,{key:"beginScope"}),q.begin=$(q.begin,{joinWith:""})}}function Se(q){if(Array.isArray(q.end)){if(q.skip||q.excludeEnd||q.returnEnd)throw _t("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Te;if(typeof q.endScope!="object"||q.endScope===null)throw _t("endScope must be object"),Te;Be(q,q.end,{key:"endScope"}),q.end=$(q.end,{joinWith:""})}}function ft(q){q.scope&&typeof q.scope=="object"&&q.scope!==null&&(q.beginScope=q.scope,delete q.scope)}function ln(q){ft(q),typeof q.beginScope=="string"&&(q.beginScope={_wrap:q.beginScope}),typeof q.endScope=="string"&&(q.endScope={_wrap:q.endScope}),P(q),Se(q)}function Zt(q){function ce(Ie,we){return new RegExp(x(Ie),"m"+(q.case_insensitive?"i":"")+(q.unicodeRegex?"u":"")+(we?"g":""))}class Ne{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(we,Ye){Ye.position=this.position++,this.matchIndexes[this.matchAt]=Ye,this.regexes.push([Ye,we]),this.matchAt+=M(we)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const we=this.regexes.map(Ye=>Ye[1]);this.matcherRe=ce($(we,{joinWith:"|"}),!0),this.lastIndex=0}exec(we){this.matcherRe.lastIndex=this.lastIndex;const Ye=this.matcherRe.exec(we);if(!Ye)return null;const $t=Ye.findIndex((Ja,Ks)=>Ks>0&&Ja!==void 0),jt=this.matchIndexes[$t];return Ye.splice(0,$t),Object.assign(Ye,jt)}}class Ge{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(we){if(this.multiRegexes[we])return this.multiRegexes[we];const Ye=new Ne;return this.rules.slice(we).forEach(([$t,jt])=>Ye.addRule($t,jt)),Ye.compile(),this.multiRegexes[we]=Ye,Ye}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(we,Ye){this.rules.push([we,Ye]),Ye.type==="begin"&&this.count++}exec(we){const Ye=this.getMatcher(this.regexIndex);Ye.lastIndex=this.lastIndex;let $t=Ye.exec(we);if(this.resumingScanAtSamePosition()&&!($t&&$t.index===this.lastIndex)){const jt=this.getMatcher(0);jt.lastIndex=this.lastIndex+1,$t=jt.exec(we)}return $t&&(this.regexIndex+=$t.position+1,this.regexIndex===this.count&&this.considerAll()),$t}}function Mt(Ie){const we=new Ge;return Ie.contains.forEach(Ye=>we.addRule(Ye.begin,{rule:Ye,type:"begin"})),Ie.terminatorEnd&&we.addRule(Ie.terminatorEnd,{type:"end"}),Ie.illegal&&we.addRule(Ie.illegal,{type:"illegal"}),we}function Ct(Ie,we){const Ye=Ie;if(Ie.isCompiled)return Ye;[ua,Vn,ln,Dn].forEach(jt=>jt(Ie,we)),q.compilerExtensions.forEach(jt=>jt(Ie,we)),Ie.__beforeBegin=null,[Sa,un,Je].forEach(jt=>jt(Ie,we)),Ie.isCompiled=!0;let $t=null;return typeof Ie.keywords=="object"&&Ie.keywords.$pattern&&(Ie.keywords=Object.assign({},Ie.keywords),$t=Ie.keywords.$pattern,delete Ie.keywords.$pattern),$t=$t||/\w+/,Ie.keywords&&(Ie.keywords=va(Ie.keywords,q.case_insensitive)),Ye.keywordPatternRe=ce($t,!0),we&&(Ie.begin||(Ie.begin=/\B|\b/),Ye.beginRe=ce(Ye.begin),!Ie.end&&!Ie.endsWithParent&&(Ie.end=/\B|\b/),Ie.end&&(Ye.endRe=ce(Ye.end)),Ye.terminatorEnd=x(Ye.end)||"",Ie.endsWithParent&&we.terminatorEnd&&(Ye.terminatorEnd+=(Ie.end?"|":"")+we.terminatorEnd)),Ie.illegal&&(Ye.illegalRe=ce(Ie.illegal)),Ie.contains||(Ie.contains=[]),Ie.contains=[].concat(...Ie.contains.map(function(jt){return cn(jt==="self"?Ie:jt)})),Ie.contains.forEach(function(jt){Ct(jt,Ye)}),Ie.starts&&Ct(Ie.starts,we),Ye.matcher=Mt(Ye),Ye}if(q.compilerExtensions||(q.compilerExtensions=[]),q.contains&&q.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return q.classNameAliases=s(q.classNameAliases||{}),Ct(q)}function Ot(q){return q?q.endsWithParent||Ot(q.starts):!1}function cn(q){return q.variants&&!q.cachedVariants&&(q.cachedVariants=q.variants.map(function(ce){return s(q,{variants:null},ce)})),q.cachedVariants?q.cachedVariants:Ot(q)?s(q,{starts:q.starts?s(q.starts):null}):Object.isFrozen(q)?s(q):q}var gt="11.11.1";class Ba extends Error{constructor(ce,Ne){super(ce),this.name="HTMLInjectionError",this.html=Ne}}const wn=a,ko=s,ds=Symbol("nomatch"),Gs=7,fs=function(q){const ce=Object.create(null),Ne=Object.create(null),Ge=[];let Mt=!0;const Ct="Could not find the language '{}', did you forget to load/include a language module?",Ie={disableAutodetect:!0,name:"Plain text",contains:[]};let we={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:b};function Ye(Ee){return we.noHighlightRe.test(Ee)}function $t(Ee){let Le=Ee.className+" ";Le+=Ee.parentNode?Ee.parentNode.className:"";const et=we.languageDetectRe.exec(Le);if(et){const bt=kn(et[1]);return bt||(Wa(Ct.replace("{}",et[1])),Wa("Falling back to no-highlight mode for this block.",Ee)),bt?et[1]:"no-highlight"}return Le.split(/\s+/).find(bt=>Ye(bt)||kn(bt))}function jt(Ee,Le,et){let bt="",Kt="";typeof Le=="object"?(bt=Ee,et=Le.ignoreIllegals,Kt=Le.language):(oe("10.7.0","highlight(lang, code, ...args) has been deprecated."),oe("10.7.0",`Please use highlight(code, options) instead.
|
|
435
|
+
https://github.com/highlightjs/highlight.js/issues/2277`),Kt=Ee,bt=Le),et===void 0&&(et=!0);const _n={code:bt,language:Kt};hs("before:highlight",_n);const Qn=_n.result?_n.result:Ja(_n.language,_n.code,et);return Qn.code=_n.code,hs("after:highlight",Qn),Qn}function Ja(Ee,Le,et,bt){const Kt=Object.create(null);function _n(_e,Me){return _e.keywords[Me]}function Qn(){if(!ze.keywords){Jt.addText(xt);return}let _e=0;ze.keywordPatternRe.lastIndex=0;let Me=ze.keywordPatternRe.exec(xt),Qe="";for(;Me;){Qe+=xt.substring(_e,Me.index);const st=pn.case_insensitive?Me[0].toLowerCase():Me[0],Ht=_n(ze,st);if(Ht){const[da,el]=Ht;if(Jt.addText(Qe),Qe="",Kt[st]=(Kt[st]||0)+1,Kt[st]<=Gs&&(Rr+=el),da.startsWith("_"))Qe+=Me[0];else{const jo=pn.classNameAliases[da]||da;Xn(Me[0],jo)}}else Qe+=Me[0];_e=ze.keywordPatternRe.lastIndex,Me=ze.keywordPatternRe.exec(xt)}Qe+=xt.substring(_e),Jt.addText(Qe)}function jn(){if(xt==="")return;let _e=null;if(typeof ze.subLanguage=="string"){if(!ce[ze.subLanguage]){Jt.addText(xt);return}_e=Ja(ze.subLanguage,xt,!0,Lo[ze.subLanguage]),Lo[ze.subLanguage]=_e._top}else _e=Vs(xt,ze.subLanguage.length?ze.subLanguage:null);ze.relevance>0&&(Rr+=_e.relevance),Jt.__addSublanguage(_e._emitter,_e.language)}function It(){ze.subLanguage!=null?jn():Qn(),xt=""}function Xn(_e,Me){_e!==""&&(Jt.startScope(Me),Jt.addText(_e),Jt.endScope())}function Mo(_e,Me){let Qe=1;const st=Me.length-1;for(;Qe<=st;){if(!_e._emit[Qe]){Qe++;continue}const Ht=pn.classNameAliases[_e[Qe]]||_e[Qe],da=Me[Qe];Ht?Xn(da,Ht):(xt=da,Qn(),xt=""),Qe++}}function Xs(_e,Me){return _e.scope&&typeof _e.scope=="string"&&Jt.openNode(pn.classNameAliases[_e.scope]||_e.scope),_e.beginScope&&(_e.beginScope._wrap?(Xn(xt,pn.classNameAliases[_e.beginScope._wrap]||_e.beginScope._wrap),xt=""):_e.beginScope._multi&&(Mo(_e.beginScope,Me),xt="")),ze=Object.create(_e,{parent:{value:ze}}),ze}function Zi(_e,Me,Qe){let st=k(_e.endRe,Qe);if(st){if(_e["on:end"]){const Ht=new t(_e);_e["on:end"](Me,Ht),Ht.isMatchIgnored&&(st=!1)}if(st){for(;_e.endsParent&&_e.parent;)_e=_e.parent;return _e}}if(_e.endsWithParent)return Zi(_e.parent,Me,Qe)}function Zs(_e){return ze.matcher.regexIndex===0?(xt+=_e[0],1):(Or=!0,0)}function Vc(_e){const Me=_e[0],Qe=_e.rule,st=new t(Qe),Ht=[Qe.__beforeBegin,Qe["on:begin"]];for(const da of Ht)if(da&&(da(_e,st),st.isMatchIgnored))return Zs(Me);return Qe.skip?xt+=Me:(Qe.excludeBegin&&(xt+=Me),It(),!Qe.returnBegin&&!Qe.excludeBegin&&(xt=Me)),Xs(Qe,_e),Qe.returnBegin?0:Me.length}function Bn(_e){const Me=_e[0],Qe=Le.substring(_e.index),st=Zi(ze,_e,Qe);if(!st)return ds;const Ht=ze;ze.endScope&&ze.endScope._wrap?(It(),Xn(Me,ze.endScope._wrap)):ze.endScope&&ze.endScope._multi?(It(),Mo(ze.endScope,_e)):Ht.skip?xt+=Me:(Ht.returnEnd||Ht.excludeEnd||(xt+=Me),It(),Ht.excludeEnd&&(xt=Me));do ze.scope&&Jt.closeNode(),!ze.skip&&!ze.subLanguage&&(Rr+=ze.relevance),ze=ze.parent;while(ze!==st.parent);return st.starts&&Xs(st.starts,_e),Ht.returnEnd?0:Me.length}function Wi(){const _e=[];for(let Me=ze;Me!==pn;Me=Me.parent)Me.scope&&_e.unshift(Me.scope);_e.forEach(Me=>Jt.openNode(Me))}let ps={};function Ws(_e,Me){const Qe=Me&&Me[0];if(xt+=_e,Qe==null)return It(),0;if(ps.type==="begin"&&Me.type==="end"&&ps.index===Me.index&&Qe===""){if(xt+=Le.slice(Me.index,Me.index+1),!Mt){const st=new Error(`0 width match regex (${Ee})`);throw st.languageName=Ee,st.badRule=ps.rule,st}return 1}if(ps=Me,Me.type==="begin")return Vc(Me);if(Me.type==="illegal"&&!et){const st=new Error('Illegal lexeme "'+Qe+'" for mode "'+(ze.scope||"<unnamed>")+'"');throw st.mode=ze,st}else if(Me.type==="end"){const st=Bn(Me);if(st!==ds)return st}if(Me.type==="illegal"&&Qe==="")return xt+=`
|
|
436
|
+
`,1;if(Ji>1e5&&Ji>Me.index*3)throw new Error("potential infinite loop, way more iterations than matches");return xt+=Qe,Qe.length}const pn=kn(Ee);if(!pn)throw _t(Ct.replace("{}",Ee)),new Error('Unknown language: "'+Ee+'"');const Do=Zt(pn);let Js="",ze=bt||Do;const Lo={},Jt=new we.__emitter(we);Wi();let xt="",Rr=0,nr=0,Ji=0,Or=!1;try{if(pn.__emitTokens)pn.__emitTokens(Le,Jt);else{for(ze.matcher.considerAll();;){Ji++,Or?Or=!1:ze.matcher.considerAll(),ze.matcher.lastIndex=nr;const _e=ze.matcher.exec(Le);if(!_e)break;const Me=Le.substring(nr,_e.index),Qe=Ws(Me,_e);nr=_e.index+Qe}Ws(Le.substring(nr))}return Jt.finalize(),Js=Jt.toHTML(),{language:Ee,value:Js,relevance:Rr,illegal:!1,_emitter:Jt,_top:ze}}catch(_e){if(_e.message&&_e.message.includes("Illegal"))return{language:Ee,value:wn(Le),illegal:!0,relevance:0,_illegalBy:{message:_e.message,index:nr,context:Le.slice(nr-100,nr+100),mode:_e.mode,resultSoFar:Js},_emitter:Jt};if(Mt)return{language:Ee,value:wn(Le),illegal:!1,relevance:0,errorRaised:_e,_emitter:Jt,_top:ze};throw _e}}function Ks(Ee){const Le={value:wn(Ee),illegal:!1,relevance:0,_top:Ie,_emitter:new we.__emitter(we)};return Le._emitter.addText(Ee),Le}function Vs(Ee,Le){Le=Le||we.languages||Object.keys(ce);const et=Ks(Ee),bt=Le.filter(kn).filter(wr).map(It=>Ja(It,Ee,!1));bt.unshift(et);const Kt=bt.sort((It,Xn)=>{if(It.relevance!==Xn.relevance)return Xn.relevance-It.relevance;if(It.language&&Xn.language){if(kn(It.language).supersetOf===Xn.language)return 1;if(kn(Xn.language).supersetOf===It.language)return-1}return 0}),[_n,Qn]=Kt,jn=_n;return jn.secondBest=Qn,jn}function Pa(Ee,Le,et){const bt=Le&&Ne[Le]||et;Ee.classList.add("hljs"),Ee.classList.add(`language-${bt}`)}function Gt(Ee){let Le=null;const et=$t(Ee);if(Ye(et))return;if(hs("before:highlightElement",{el:Ee,language:et}),Ee.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",Ee);return}if(Ee.children.length>0&&(we.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(Ee)),we.throwUnescapedHTML))throw new Ba("One of your code blocks includes unescaped HTML.",Ee.innerHTML);Le=Ee;const bt=Le.textContent,Kt=et?jt(bt,{language:et,ignoreIllegals:!0}):Vs(bt);Ee.innerHTML=Kt.value,Ee.dataset.highlighted="yes",Pa(Ee,et,Kt.language),Ee.result={language:Kt.language,re:Kt.relevance,relevance:Kt.relevance},Kt.secondBest&&(Ee.secondBest={language:Kt.secondBest.language,relevance:Kt.secondBest.relevance}),hs("after:highlightElement",{el:Ee,result:Kt,text:bt})}function Tn(Ee){we=ko(we,Ee)}const Cr=()=>{Qs(),oe("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function Qi(){Qs(),oe("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let Ro=!1;function Qs(){function Ee(){Qs()}if(document.readyState==="loading"){Ro||window.addEventListener("DOMContentLoaded",Ee,!1),Ro=!0;return}document.querySelectorAll(we.cssSelector).forEach(Gt)}function Oo(Ee,Le){let et=null;try{et=Le(q)}catch(bt){if(_t("Language definition for '{}' could not be registered.".replace("{}",Ee)),Mt)_t(bt);else throw bt;et=Ie}et.name||(et.name=Ee),ce[Ee]=et,et.rawDefinition=Le.bind(null,q),et.aliases&&er(et.aliases,{languageName:Ee})}function ms(Ee){delete ce[Ee];for(const Le of Object.keys(Ne))Ne[Le]===Ee&&delete Ne[Le]}function Xi(){return Object.keys(ce)}function kn(Ee){return Ee=(Ee||"").toLowerCase(),ce[Ee]||ce[Ne[Ee]]}function er(Ee,{languageName:Le}){typeof Ee=="string"&&(Ee=[Ee]),Ee.forEach(et=>{Ne[et.toLowerCase()]=Le})}function wr(Ee){const Le=kn(Ee);return Le&&!Le.disableAutodetect}function kr(Ee){Ee["before:highlightBlock"]&&!Ee["before:highlightElement"]&&(Ee["before:highlightElement"]=Le=>{Ee["before:highlightBlock"](Object.assign({block:Le.el},Le))}),Ee["after:highlightBlock"]&&!Ee["after:highlightElement"]&&(Ee["after:highlightElement"]=Le=>{Ee["after:highlightBlock"](Object.assign({block:Le.el},Le))})}function Wt(Ee){kr(Ee),Ge.push(Ee)}function Io(Ee){const Le=Ge.indexOf(Ee);Le!==-1&&Ge.splice(Le,1)}function hs(Ee,Le){const et=Ee;Ge.forEach(function(bt){bt[et]&&bt[et](Le)})}function tr(Ee){return oe("10.7.0","highlightBlock will be removed entirely in v12.0"),oe("10.7.0","Please use highlightElement now."),Gt(Ee)}Object.assign(q,{highlight:jt,highlightAuto:Vs,highlightAll:Qs,highlightElement:Gt,highlightBlock:tr,configure:Tn,initHighlighting:Cr,initHighlightingOnLoad:Qi,registerLanguage:Oo,unregisterLanguage:ms,listLanguages:Xi,getLanguage:kn,registerAliases:er,autoDetection:wr,inherit:ko,addPlugin:Wt,removePlugin:Io}),q.debugMode=function(){Mt=!1},q.safeMode=function(){Mt=!0},q.versionString=gt,q.regex={concat:S,lookahead:y,either:v,optional:N,anyNumberOfTimes:T};for(const Ee in Ft)typeof Ft[Ee]=="object"&&e(Ft[Ee]);return Object.assign(q,Ft),q},Ln=fs({});return Ln.newInstance=()=>fs({}),Cm=Ln,Ln.HighlightJS=Ln,Ln.default=Ln,Cm}var O6=R6();const I6=Cc(O6),d1={},M6="hljs-";function D6(e){const t=I6.newInstance();return e&&o(e),{highlight:a,highlightAuto:s,listLanguages:l,register:o,registerAlias:d,registered:f};function a(h,m,b){const x=b||d1,y=typeof x.prefix=="string"?x.prefix:M6;if(!t.getLanguage(h))throw new Error("Unknown language: `"+h+"` is not registered");t.configure({__emitter:L6,classPrefix:y});const T=t.highlight(m,{ignoreIllegals:!0,language:h});if(T.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:T.errorRaised});const N=T._emitter.root,S=N.data;return S.language=T.language,S.relevance=T.relevance,N}function s(h,m){const x=(m||d1).subset||l();let y=-1,T=0,N;for(;++y<x.length;){const S=x[y];if(!t.getLanguage(S))continue;const C=a(S,h,m);C.data&&C.data.relevance!==void 0&&C.data.relevance>T&&(T=C.data.relevance,N=C)}return N||{type:"root",children:[],data:{language:void 0,relevance:T}}}function l(){return t.listLanguages()}function o(h,m){if(typeof h=="string")t.registerLanguage(h,m);else{let b;for(b in h)Object.hasOwn(h,b)&&t.registerLanguage(b,h[b])}}function d(h,m){if(typeof h=="string")t.registerAliases(typeof m=="string"?m:[...m],{languageName:h});else{let b;for(b in h)if(Object.hasOwn(h,b)){const x=h[b];t.registerAliases(typeof x=="string"?x:[...x],{languageName:b})}}}function f(h){return!!t.getLanguage(h)}}class L6{constructor(t){this.options=t,this.root={type:"root",children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(t){if(t==="")return;const a=this.stack[this.stack.length-1],s=a.children[a.children.length-1];s&&s.type==="text"?s.value+=t:a.children.push({type:"text",value:t})}startScope(t){this.openNode(String(t))}endScope(){this.closeNode()}__addSublanguage(t,a){const s=this.stack[this.stack.length-1],l=t.root.children;a?s.children.push({type:"element",tagName:"span",properties:{className:[a]},children:l}):s.children.push(...l)}openNode(t){const a=this,s=t.split(".").map(function(d,f){return f?d+"_".repeat(f):a.options.classPrefix+d}),l=this.stack[this.stack.length-1],o={type:"element",tagName:"span",properties:{className:s},children:[]};l.children.push(o),this.stack.push(o)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}}const j6={};function B6(e){const t=e||j6,a=t.aliases,s=t.detect||!1,l=t.languages||k6,o=t.plainText,d=t.prefix,f=t.subset;let h="hljs";const m=D6(l);if(a&&m.registerAlias(a),d){const b=d.indexOf("-");h=b===-1?d:d.slice(0,b)}return function(b,x){vo(b,"element",function(y,T,N){if(y.tagName!=="code"||!N||N.type!=="element"||N.tagName!=="pre")return;const S=P6(y);if(S===!1||!S&&!s||S&&o&&o.includes(S))return;Array.isArray(y.properties.className)||(y.properties.className=[]),y.properties.className.includes(h)||y.properties.className.unshift(h);const C=nI(y,{whitespace:"pre"});let v;try{v=S?m.highlight(S,C,{prefix:d}):m.highlightAuto(C,{prefix:d,subset:f})}catch(M){const k=M;if(S&&/Unknown language/.test(k.message)){x.message("Cannot highlight as `"+S+"`, it’s not registered",{ancestors:[N,y],cause:k,place:y.position,ruleId:"missing-language",source:"rehype-highlight"});return}throw k}!S&&v.data&&v.data.language&&y.properties.className.push("language-"+v.data.language),v.children.length>0&&(y.children=v.children)})}}function P6(e){const t=e.properties.className;let a=-1;if(!Array.isArray(t))return;let s;for(;++a<t.length;){const l=String(t[a]);if(l==="no-highlight"||l==="nohighlight")return!1;!s&&l.slice(0,5)==="lang-"&&(s=l.slice(5)),!s&&l.slice(0,9)==="language-"&&(s=l.slice(9))}return s}function U6({q:e,pending:t,selected:a,onSelect:s}){return c.jsxs("div",{className:"space-y-2",children:[e.header&&c.jsx("div",{className:"text-xs font-semibold text-fg-3",children:e.header}),c.jsx("p",{className:"text-sm text-fg-2",children:e.question}),e.options.length>0&&c.jsx("div",{className:"flex flex-wrap gap-2",children:e.options.map(l=>{const o=(a==null?void 0:a.includes(l.label))??!1;return c.jsxs("button",{type:"button",disabled:!t,onClick:()=>s(l.label),className:me("rounded-md border px-3 py-1.5 text-left text-xs transition-colors",o?"border-emerald-500/60 bg-emerald-500/20 text-emerald-300 ring-1 ring-emerald-500/30":t?"border-blue-500/40 bg-blue-500/10 text-blue-300 hover:bg-blue-500/20":"border-line bg-surface/50 text-fg-5 cursor-default"),children:[o&&c.jsx(Ia,{className:"mr-1 inline h-3 w-3"}),c.jsx("span",{className:"font-medium",children:l.label}),l.description&&c.jsx("span",{className:"ml-1.5 text-fg-5",children:l.description})]},l.label)})})]})}function H6({part:e}){const t=uC(e),a=Sh(e),s=a==="pending"||a==="running",l=Ue(k=>k.activeSessionId),o=Ue(k=>k.sendMessage),d=Ue(k=>k.abortSession),[f,h]=A.useState(null),[m,b]=A.useState({});if(!t||t.length===0)return null;const x=t.length===1,y=()=>{l&&Yt.getState().removeToast(`question-${l}`)},T=(k,D)=>{if(!f){if(x){h("answered"),y(),o(D);return}b($=>{const L=t[k],Y=$[k]??[];if(L.multiple){const re=Y.includes(D);return{...$,[k]:re?Y.filter(fe=>fe!==D):[...Y,D]}}return{...$,[k]:[D]}})}},N=t.filter((k,D)=>{var $;return((($=m[D])==null?void 0:$.length)??0)>0}).length,S=!x&&N===t.length,C=()=>{if(f||!S)return;h("answered"),y();const k=t.map((D,$)=>{const L=m[$]??[];return L.length===1?L[0]:L});o(JSON.stringify(k))},v=()=>{f||(h("dismissed"),y(),d())},M=s&&!f;return c.jsxs("div",{className:me("my-1 overflow-hidden rounded-md border bg-term/70",M?"border-blue-500/40":"border-line"),children:[c.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5 font-mono text-xs",children:[c.jsx(uA,{className:me("h-3.5 w-3.5 shrink-0",M?"text-blue-400":"text-fg-4")}),c.jsx("span",{className:me("font-medium",M?"text-blue-300":"text-fg-3"),children:f==="answered"?"已回复":f==="dismissed"?"已取消":M?"等待回复":"Question"}),!x&&M&&c.jsxs("span",{className:"text-fg-5",children:["(",N,"/",t.length,")"]}),M&&c.jsxs("button",{type:"button",onClick:v,className:"ml-auto flex items-center gap-1 rounded px-1.5 py-0.5 text-fg-5 transition-colors hover:bg-red-500/10 hover:text-red-400",children:[c.jsx(Tt,{className:"h-3 w-3"}),c.jsx("span",{children:"取消"})]})]}),c.jsxs("div",{className:"border-t border-line px-4 py-3 space-y-3",children:[t.map((k,D)=>c.jsx(U6,{q:k,pending:M,selected:m[D],onSelect:$=>T(D,$)},D)),!x&&M&&c.jsx("div",{className:"flex justify-end pt-1",children:c.jsxs("button",{type:"button",disabled:!S,onClick:C,className:me("flex items-center gap-1.5 rounded-md px-4 py-1.5 text-xs font-medium transition-colors",S?"bg-emerald-600 text-white hover:bg-emerald-500":"bg-surface/50 text-fg-5 cursor-not-allowed"),children:[c.jsx(Pm,{className:"h-3 w-3"}),c.jsx("span",{children:"提交回答"})]})})]})]})}const wm=2e3,F6={read:"Read",write:"Write",edit:"Edit",patch:"Patch",grep:"Grep",glob:"Glob",bash:"Bash",shell:"Bash",list:"List",ls:"List",webfetch:"Fetch",fetch:"Fetch",task:"Task",agent:"Task",todowrite:"Todo",write_todos:"Todo",question:"Question",mcp_question:"Question"},z6={running:{glyph:"◌",label:"running",color:"text-amber-400",accent:"border-amber-500/40",spin:!0},completed:{glyph:"✓",label:"done",color:"text-emerald-400",accent:"border-emerald-500/40",spin:!1},error:{glyph:"✗",label:"error",color:"text-red-400",accent:"border-red-500/40",spin:!1},pending:{glyph:"○",label:"queued",color:"text-fg-4",accent:"border-fg-6",spin:!1}};function qh(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:null}function Ga(e,t){if(!e)return null;for(const a of t){const s=e[a];if(typeof s=="string"&&s.trim())return s.trim()}return null}function q6(e,t){const a=e.toLowerCase(),s=F6[a]??e.charAt(0).toUpperCase()+e.slice(1),l=qh(t);switch(a){case"read":case"write":case"edit":case"patch":return{label:s,arg:Ga(l,["filePath","path","file"])};case"grep":{const o=Ga(l,["pattern","query"]);return{label:s,arg:o?`"${o}"`:null}}case"glob":return{label:s,arg:Ga(l,["pattern","query"])};case"bash":case"shell":{const o=Ga(l,["command","cmd","script"]);return{label:s,arg:o?o.split(`
|
|
437
|
+
`)[0]:null}}case"webfetch":case"fetch":return{label:s,arg:Ga(l,["url"])};case"task":case"agent":return{label:s,arg:Ga(l,["description","prompt","title"])};default:return{label:s,arg:Ga(l,["filePath","path","pattern","query","command","url","description"])}}}function Y6({oldStr:e,newStr:t}){const a=e.split(`
|
|
438
|
+
`),s=t.split(`
|
|
439
|
+
`);return c.jsxs("div",{className:"grid grid-cols-1 gap-px overflow-x-auto rounded text-xs md:grid-cols-2",children:[c.jsx("pre",{className:"min-w-0 whitespace-pre-wrap break-words p-1.5 fs-diff-del",children:a.map((l,o)=>c.jsxs("div",{children:[c.jsx("span",{className:"select-none text-red-400/70",children:"− "}),c.jsx("span",{className:"text-red-400",children:l})]},o))}),c.jsx("pre",{className:"min-w-0 whitespace-pre-wrap break-words p-1.5 fs-diff-add",children:s.map((l,o)=>c.jsxs("div",{children:[c.jsx("span",{className:"select-none text-emerald-400/70",children:"+ "}),c.jsx("span",{className:"text-emerald-400",children:l})]},o))})]})}const f1={completed:{glyph:"✓",color:"text-emerald-400"},in_progress:{glyph:"◌",color:"text-amber-400"},cancelled:{glyph:"✗",color:"text-fg-5"},pending:{glyph:"○",color:"text-fg-4"}};function _T({todos:e}){return c.jsx("ul",{className:"space-y-0.5 text-xs",children:e.map((t,a)=>{var f;const s=((f=t.status)==null?void 0:f.toLowerCase())??"pending",l=s==="in-progress"||s==="active"?"in_progress":s==="done"||s==="complete"?"completed":s==="canceled"?"cancelled":s,o=f1[l]??f1.pending,d=l==="completed"||l==="cancelled";return c.jsxs("li",{className:"flex items-start gap-1.5",children:[c.jsx("span",{className:me("shrink-0 leading-5",o.color,l==="in_progress"&&"fs-spin"),children:o.glyph}),c.jsx("span",{className:me("leading-5",d?"text-fg-5 line-through":"text-fg-2"),children:t.content}),t.priority&&c.jsx("span",{className:"ml-auto shrink-0 text-fg-5",children:t.priority})]},a)})})}const $6={"visual-engineering":"bg-purple-500/15 text-purple-400",quick:"bg-emerald-500/15 text-emerald-400",deep:"bg-blue-500/15 text-blue-400",ultrabrain:"bg-amber-500/15 text-amber-400",artistry:"bg-pink-500/15 text-pink-400",writing:"bg-cyan-500/15 text-cyan-400","unspecified-low":"bg-elevated text-fg-4","unspecified-high":"bg-elevated text-fg-3"},G6={explore:"bg-teal-500/15 text-teal-400",librarian:"bg-indigo-500/15 text-indigo-400",oracle:"bg-amber-500/15 text-amber-400",metis:"bg-rose-500/15 text-rose-400",momus:"bg-orange-500/15 text-orange-400"};function K6({record:e}){const[t,a]=A.useState(!1),s=typeof e.category=="string"?e.category:null,l=typeof e.subagent_type=="string"?e.subagent_type:null,o=Ga(e,["description","title"]),d=typeof e.prompt=="string"?e.prompt:null,f=Array.isArray(e.load_skills)?e.load_skills.filter(y=>typeof y=="string"):[],h=typeof e.run_in_background=="boolean"?e.run_in_background:!1,m=typeof e.task_id=="string"?e.task_id:null,b=s??l,x=(s&&$6[s])??(l&&G6[l])??"bg-elevated text-fg-3";return c.jsxs("div",{className:"space-y-2",children:[c.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[b&&c.jsx("span",{className:me("rounded px-1.5 py-0.5 text-[10px] font-medium",x),children:b}),f.map(y=>c.jsx("span",{className:"rounded bg-elevated px-1.5 py-0.5 text-[10px] text-fg-4",children:y},y)),h&&c.jsx("span",{className:"rounded bg-elevated px-1.5 py-0.5 text-[10px] text-fg-5",children:"bg"}),m&&c.jsxs("span",{className:"rounded bg-elevated px-1.5 py-0.5 font-mono text-[10px] text-fg-5",title:m,children:["↩ ",m.slice(0,16),"…"]})]}),o&&c.jsx("p",{className:"text-xs text-fg-2",children:o}),d&&c.jsxs("div",{children:[c.jsxs("button",{type:"button",onClick:()=>a(y=>!y),className:"flex items-center gap-1 text-[10px] text-fg-4 transition-colors hover:text-fg-2",children:[c.jsx(bh,{className:me("h-3 w-3 transition-transform",t&&"rotate-90")}),"Prompt",c.jsxs("span",{className:"text-fg-5",children:["(",d.length," chars)"]})]}),t&&c.jsx("pre",{className:"mt-1 max-h-60 overflow-y-auto whitespace-pre-wrap break-words rounded bg-elevated/50 p-2 text-[11px] leading-relaxed text-fg-3",children:d})]})]})}function V6(e){const t=dC(e),a=Ue(h=>h.activeSessionId),s=Ue(h=>h.sessions);if(t)return t;if(!a)return null;const l=jc(e),o=qh(l),d=Ga(o,["description","title"]),f=s.filter(h=>h.parentID===a);if(f.length===0)return null;if(f.length===1)return f[0].id;if(d){const h=f.find(m=>m.title===d);if(h)return h.id}return null}function Q6({part:e}){const t=V6(e),a=Ue(s=>s.setActiveSession);return t?c.jsxs("button",{type:"button",onClick:s=>{s.stopPropagation(),a(t)},className:"mt-2 flex items-center gap-1.5 rounded-md border border-line px-2.5 py-1 font-mono text-xs text-blue-400 transition-colors hover:border-blue-500/50 hover:bg-blue-500/10",children:[c.jsxs("span",{className:"truncate text-fg-5",children:[t.slice(0,20),"…"]}),c.jsx(bv,{className:"h-3 w-3 shrink-0"}),c.jsx("span",{className:"shrink-0",children:"查看子会话"})]}):null}function X6(e,t){const a=qh(t);if(!a)return null;const s=e.toLowerCase();if(s==="edit"||s==="patch"){const l=typeof a.oldString=="string"?a.oldString:"",o=typeof a.newString=="string"?a.newString:"";if(l||o)return c.jsx(Y6,{oldStr:l,newStr:o})}if(s==="todowrite"||s==="write_todos"){const l=Array.isArray(a.todos)?a.todos:null;if(l&&l.length>0)return c.jsx(_T,{todos:l})}if(s==="bash"||s==="shell"){const l=Ga(a,["command","cmd","script"]);if(l)return c.jsxs("pre",{className:"overflow-x-auto whitespace-pre-wrap break-words text-fg-2",children:[c.jsx("span",{className:"select-none text-emerald-400/70",children:"❯ "}),l]})}if(s==="task"||s==="agent")return c.jsx(K6,{record:a});if(s==="read")return null;if(s==="write"){const l=typeof a.content=="string"?a.content:null;if(l){const o=l.length>500?`${l.slice(0,500)}…`:l;return c.jsx("pre",{className:"overflow-x-auto whitespace-pre-wrap break-words text-fg-2",children:o})}}return null}function Z6(e,t){const a=e.toLowerCase();if(a==="todowrite"||a==="write_todos"){const s=Array.isArray(t)?t:null;if(s&&s.length>0)return c.jsx(_T,{todos:s})}return null}function W6({part:e}){const t=Sh(e),a=t==="running"||t==="pending",[s,l]=A.useState(a),[o,d]=A.useState(!1),f=A.useRef(a);A.useEffect(()=>{f.current!==a&&(l(a),f.current=a)},[a]);const h=GE(e),m=h.toLowerCase(),b=m==="task"||m==="agent",x=jc(e),{label:y,arg:T}=q6(h,x),N=X6(h,x),S=N?null:ix(x),C=Nh(e),v=Z6(h,C),M=v?"":ix(C),k=z6[t],D=M.length>wm,$=o||!D?M:`${M.slice(0,wm)}…`;return c.jsxs("div",{className:"my-1 overflow-hidden rounded-md border border-line bg-term/70",children:[c.jsxs("button",{type:"button",onClick:()=>l(L=>!L),className:"flex w-full items-center gap-2 px-3 py-1.5 text-left font-mono text-xs transition-colors duration-150 hover:bg-surface/70",children:[c.jsx("span",{className:me("shrink-0 leading-none",k.color),children:s?"▾":"▸"}),c.jsx("span",{className:"shrink-0 font-medium text-fg",children:y}),T&&c.jsx("span",{className:"truncate text-fg-3",children:T}),c.jsxs("span",{className:me("ml-auto flex shrink-0 items-center gap-1.5 leading-none",k.color),children:[c.jsx("span",{className:me(k.spin&&"fs-spin"),children:k.glyph}),c.jsx("span",{children:k.label})]})]}),s&&c.jsx("div",{className:"border-t border-line px-3 py-2",children:c.jsxs("div",{className:me("ml-1 border-l-2 pl-3 font-mono text-xs",k.accent),children:[N&&c.jsx("section",{className:"mb-2",children:N}),S&&c.jsxs("section",{className:"mb-2",children:[c.jsx("div",{className:"mb-1 text-[10px] uppercase tracking-wider text-fg-5",children:"input"}),c.jsx("pre",{className:"overflow-x-auto whitespace-pre-wrap break-words text-fg-2",children:S})]}),b&&c.jsx(Q6,{part:e}),v&&c.jsx("section",{children:v}),M&&c.jsxs("section",{children:[c.jsx("div",{className:"mb-1 text-[10px] uppercase tracking-wider text-fg-5",children:"output"}),c.jsx("pre",{className:"overflow-x-auto whitespace-pre-wrap break-words text-fg-2",children:$}),D&&c.jsx("button",{type:"button",onClick:()=>d(L=>!L),className:"mt-1 text-blue-400 transition-colors hover:text-blue-300",children:o?"show less":`show ${M.length-wm} more chars`})]}),!N&&!S&&!v&&!M&&c.jsx("div",{className:"text-fg-5",children:"no parameters"})]})})]})}function J6({text:e}){const[t,a]=A.useState(!1);return c.jsxs("div",{className:"my-1",children:[c.jsxs("button",{type:"button",onClick:()=>a(s=>!s),className:"flex items-center gap-1.5 font-mono text-xs text-fg-5 transition-colors hover:text-fg-3",children:[t?c.jsx(ss,{className:"h-3 w-3 shrink-0"}):c.jsx(bh,{className:"h-3 w-3 shrink-0"}),c.jsx(Av,{className:"h-3 w-3 shrink-0"}),c.jsx("span",{children:"thinking"})]}),t&&c.jsx("div",{className:"ml-1.5 mt-1 whitespace-pre-wrap border-l border-line pl-3 text-xs italic leading-relaxed text-fg-4",children:e})]})}function eM({part:e}){switch(_h(e)){case"text":{const a=pc(e);return a.trim()?c.jsx("div",{className:"markdown-body leading-relaxed",children:c.jsx(ls,{remarkPlugins:[os],rehypePlugins:[B6],components:{table:Hh},children:a})}):null}case"thinking":{const a=pc(e);return a.trim()?c.jsx(J6,{text:a}):null}case"tool":return mo(e)?c.jsx(H6,{part:e}):c.jsx(W6,{part:e});default:return null}}function tM({message:e}){var h,m,b,x,y;const t=e.role==="user",a=e.parts??[],s=a.filter(T=>_h(T)!=="other");if(t){const T=a.map(pc).join("").trim();return c.jsxs("div",{className:"fs-fade-in flex gap-2 font-mono text-sm",children:[c.jsx("span",{className:"shrink-0 select-none text-emerald-400",children:"❯"}),c.jsx("span",{className:"min-w-0 whitespace-pre-wrap break-words text-fg-2",children:T||"…"})]})}const l=((h=e.info)==null?void 0:h.agent)??e.agent,o=((m=e.info)==null?void 0:m.modelID)??e.modelID,d=(b=e.info)==null?void 0:b.error,f=(x=e.info)==null?void 0:x.finish;return c.jsxs("div",{className:"fs-fade-in font-mono",children:[(l||o)&&c.jsxs("div",{className:"mb-1 flex items-center gap-2 text-xs",children:[l&&c.jsx("span",{className:"text-fg-3",children:l}),l&&o&&c.jsx("span",{className:"text-fg-6",children:"·"}),o&&c.jsx("span",{className:"text-fg-5",children:o})]}),d&&c.jsxs("div",{className:"my-1 flex items-start gap-2 rounded-md border border-red-500/20 bg-red-500/10 px-3 py-2 text-xs text-red-400",children:[c.jsx(ia,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),c.jsxs("div",{className:"min-w-0",children:[c.jsx("span",{className:"font-semibold",children:d.name??"Error"}),((y=d.data)==null?void 0:y.message)&&c.jsx("p",{className:"mt-0.5 text-red-400/80",children:d.data.message}),f&&f!=="end"&&c.jsxs("p",{className:"mt-0.5 text-red-400/60",children:["finish: ",f]})]})]}),c.jsx("div",{className:"space-y-2 text-sm text-fg",children:s.length>0?s.map((T,N)=>c.jsx(eM,{part:T},T.id??T.callID??N)):!d&&c.jsx("span",{className:"text-fg-5",children:"…"})})]})}const nM={completed:{glyph:"■",color:"text-emerald-400"},in_progress:{glyph:"■",color:"text-amber-400"},cancelled:{glyph:"■",color:"text-fg-6"},pending:{glyph:"□",color:"text-fg-5"}};function aM(e){const t=e.find(s=>ji(s.status)==="in_progress");if(t)return t.content;const a=e.find(s=>ji(s.status)==="pending");return a?a.content:"all steps complete"}function rM({todos:e,onClick:t}){if(e.length===0)return null;const a=e.length,s=oC(e);return c.jsx("div",{className:"rounded-md border border-line bg-term/60 px-3 py-2",children:c.jsxs("button",{type:"button",onClick:t,className:"flex w-full items-center gap-2 text-left font-mono text-xs",children:[c.jsxs("span",{className:"shrink-0 tabular-nums text-fg-4",children:["[",s,"/",a,"]"]}),c.jsx("span",{className:"shrink-0 tracking-tight",children:e.map(l=>{const o=nM[ji(l.status)];return c.jsx("span",{className:o.color,children:o.glyph},l.id)})}),c.jsx("span",{className:"min-w-0 flex-1 truncate text-fg-2",children:aM(e)}),c.jsx("span",{className:"shrink-0 text-[10px] text-fg-5",children:"详情 →"})]})})}const sM=200;function iM(){return Ue(e=>{const t=e.activeSessionId;if(!t)return!1;const a=e.messages[t]??ho;for(let s=a.length-1;s>=0;s--){const l=a[s].parts;if(l){for(const o of l)if(_h(o)==="tool"&&gc(o))return!0}}return!1})}function lM(){const[e,t]=A.useState(""),[a,s]=A.useState(""),[l,o]=A.useState([]),d=A.useRef(null),f=Ue(M=>M.activeSessionId),h=qe(M=>M.activeRepoId),m=Ue(M=>{const k=M.activeSessionId;return k?M.sessionStatuses[k]:void 0}),b=Ue(M=>M.sendMessage),x=iM();A.useEffect(()=>{if(!h){o([]);return}let M=!1;return(async()=>{try{const[k,D]=await Promise.all([Th(),yh(h)]);if(M)return;const $=k.pinned_models,L=$?JSON.parse($):[];o(L.length>0?D.filter(Y=>L.includes(Y.id)):[])}catch{M||o([])}})(),()=>{M=!0}},[h]);const y=m==="busy"&&!x,T=!f||y;A.useLayoutEffect(()=>{const M=d.current;M&&(M.style.height="auto",M.style.height=`${Math.min(M.scrollHeight,sM)}px`)},[e]),A.useEffect(()=>{t("")},[f]);const N=()=>{const M=e.trim();!M||T||(b(M,a||void 0),t(""))},S=M=>{M.nativeEvent.isComposing||M.keyCode===229||M.key==="Enter"&&!M.shiftKey&&(M.preventDefault(),N())},C=f?y?"agent is running…":x?"输入回复,或点击上方选项…":"enter a command…":"select or start a run",v=f?y?"text-amber-400 fs-blink":x?"text-blue-400":"text-emerald-400":"text-fg-6";return c.jsxs("div",{className:"border-t border-line bg-term px-4 py-4",children:[c.jsxs("div",{className:me("mx-auto flex max-w-4xl items-start gap-2 rounded-lg border px-3 py-2 transition-colors duration-150",T?"border-line":"border-fg-5 focus-within:border-fg-4"),children:[c.jsx("span",{className:me("select-none pt-px font-mono text-sm leading-6",v),children:"❯"}),c.jsx("textarea",{ref:d,rows:2,value:e,disabled:T,onChange:M=>t(M.target.value),onKeyDown:S,placeholder:C,className:"flex-1 resize-none bg-transparent font-mono text-sm leading-6 text-fg placeholder:text-fg-6 focus:outline-none disabled:cursor-not-allowed"}),c.jsx("button",{type:"button",onClick:N,disabled:T||e.trim().length===0,"aria-label":"Send message",className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-md bg-emerald-600 text-white transition-colors duration-150 hover:bg-emerald-500 disabled:cursor-not-allowed disabled:bg-fg-6/30 disabled:text-fg-5",children:c.jsx(NE,{className:"h-4 w-4",strokeWidth:2.5})})]}),c.jsxs("div",{className:"mx-auto mt-1.5 flex max-w-4xl items-center gap-3 pl-5",children:[c.jsx("span",{className:"font-mono text-[10px] text-fg-6",children:"⏎ to run · shift+⏎ for newline"}),l.length>0&&c.jsxs("select",{value:a,onChange:M=>s(M.target.value),className:"ml-auto max-w-[200px] truncate rounded border border-line bg-surface px-2 py-0.5 font-mono text-[11px] text-fg-4 focus:border-fg-5 focus:outline-none",children:[c.jsx("option",{value:"",children:"默认模型"}),l.map(M=>c.jsx("option",{value:M.id,children:M.name||M.id},M.id))]})]})]})}const m1={idle:{glyph:"●",label:"ready",color:"text-emerald-400",spin:!1},busy:{glyph:"◌",label:"running",color:"text-amber-400",spin:!0},retry:{glyph:"◌",label:"retrying",color:"text-amber-400",spin:!0},error:{glyph:"✗",label:"error",color:"text-red-400",spin:!1}};function oM({status:e,reason:t}){const a=m1[e??"idle"]??m1.idle;return c.jsxs("span",{className:me("flex items-center gap-1.5 rounded border border-line px-2 py-0.5 font-mono text-xs",a.color),title:e==="error"&&t?t:void 0,children:[c.jsx("span",{className:me("leading-none",a.spin&&"fs-spin"),children:a.glyph}),c.jsx("span",{children:a.label})]})}const uM={"claude-opus-4":1e6,"claude-sonnet-4":1e6,"claude-sonnet-5":1e6,"claude-opus-5":1e6,"claude-3-7-sonnet":2e5,"claude-3-5-sonnet":2e5,"claude-3-5-haiku":2e5,"claude-3-opus":2e5,"claude-3-sonnet":2e5,"claude-3-haiku":2e5},h1=1e6;function cM(e){if(!e)return h1;for(const[t,a]of Object.entries(uM))if(e.startsWith(t))return a;return h1}function p1(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}function dM(e){return e>=1?`$${e.toFixed(2)}`:e>=.01?`$${e.toFixed(3)}`:e>0?`$${e.toFixed(4)}`:"$0"}function fM(e){for(let t=e.length-1;t>=0;t--){const a=e[t];if(a.role==="assistant"&&a.tokens){const s=a.tokens;if(s.cache&&(s.cache.read>0||s.cache.write>0)||s.input>0||s.output>0)return s}}return null}function mM({session:e,messages:t}){var h,m,b;const a=fM(t),s=(e==null?void 0:e.cost)??0;if(!a&&!s)return null;const l=a?a.input+(((h=a.cache)==null?void 0:h.read)??0)+(((m=a.cache)==null?void 0:m.write)??0):0,o=cM((b=e==null?void 0:e.model)==null?void 0:b.modelID),d=l>0?Math.min(Math.round(l/o*100),999):0,f=d>=80?"text-red-400":d>=50?"text-amber-400":"text-fg-5";return c.jsxs("div",{className:"flex items-center gap-2 font-mono text-[11px] text-fg-5",children:[l>0&&c.jsxs(c.Fragment,{children:[c.jsx("span",{title:"当前上下文 = cache_read + cache_write + input (最近一次请求)",children:p1(l)}),c.jsx("span",{className:"text-fg-6",children:"·"}),c.jsxs("span",{className:f,title:`上下文占比 (${p1(o)} 窗口)`,children:[d,"%"]}),c.jsx("span",{className:"text-fg-6",children:"·"})]}),c.jsx("span",{title:"会话累计费用",children:dM(s)})]})}const hM=144,pM=64;function NT({onToggleSidebar:e}){const[t,a]=A.useState(""),[s,l]=A.useState(""),[o,d]=A.useState(""),[f,h]=A.useState(""),[m,b]=A.useState(!1),x=A.useRef(null),y=A.useRef(null),T=Ue(H=>H.createSession),N=Ue(H=>H.sendError),S=qe(H=>H.activeRepoId),C=Mi(H=>H.agents),v=Pe(H=>H.issues),M=Pe(H=>H.selectedIssueId),k=Pe(H=>H.pendingDraft);A.useEffect(()=>{M&&(d(M),Pe.getState().setSelectedIssue(null))},[M]),A.useEffect(()=>{k&&(a(k),Pe.getState().setPendingDraft(null))},[k]),A.useLayoutEffect(()=>{const H=x.current;H&&(H.style.height="auto",H.style.height=`${Math.min(H.scrollHeight,hM)}px`)},[t]),A.useEffect(()=>{const H=ae=>{y.current&&!y.current.contains(ae.target)&&b(!1)};return document.addEventListener("mousedown",H),()=>document.removeEventListener("mousedown",H)},[]);const D=v.filter(H=>H.state==="open"),$=v.find(H=>H.id===o),L=f.trim().toLowerCase(),Y=L?D.filter(H=>`#${H.number} ${H.title}`.toLowerCase().includes(L)):D,re=!!s||!!o,fe=()=>{const H=t.trim();!S||!H&&!re||(a(""),T(H,void 0,void 0,void 0,o||void 0,s||void 0))},U=H=>{H.nativeEvent.isComposing||H.keyCode===229||H.key==="Enter"&&!H.shiftKey&&(H.preventDefault(),fe())};return c.jsxs("div",{className:"relative flex flex-1 flex-col items-center justify-center bg-term",children:[c.jsx("button",{type:"button",onClick:e,"aria-label":"Open sidebar",className:"absolute left-3 top-3 rounded-lg p-2 text-fg-3 hover:bg-elevated md:hidden",children:c.jsx(Dc,{className:"h-5 w-5"})}),c.jsxs("div",{className:"w-full max-w-2xl px-6",children:[c.jsx("div",{className:"mb-8 text-center",children:c.jsxs("div",{className:"font-mono text-2xl text-fg-6",children:[c.jsx("span",{className:"text-emerald-500/60",children:"❯"}),c.jsx("span",{className:"fs-blink text-fg-4",children:" ▋"})]})}),c.jsxs("div",{className:"rounded-xl border border-line bg-base/80 shadow-sm transition-colors focus-within:border-fg-5",children:[c.jsxs("div",{className:"flex items-start gap-2 px-4 py-3",children:[c.jsx("span",{className:"select-none pt-px font-mono text-sm leading-6 text-emerald-400",children:"❯"}),c.jsx("textarea",{ref:x,rows:1,value:t,autoFocus:!0,disabled:!S,onChange:H=>a(H.target.value),onKeyDown:U,placeholder:S?"让 Agent 做什么?":"请先选择一个仓库",className:"flex-1 resize-none bg-transparent font-mono text-sm leading-6 text-fg placeholder:text-fg-6 focus:outline-none disabled:cursor-not-allowed"}),c.jsx("button",{type:"button",onClick:fe,disabled:!S||!t.trim()&&!re,"aria-label":"Start run",className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-md bg-emerald-600 text-white transition-colors duration-150 hover:bg-emerald-500 disabled:cursor-not-allowed disabled:bg-fg-6/30 disabled:text-fg-5",children:c.jsx(NE,{className:"h-4 w-4",strokeWidth:2.5})})]}),c.jsxs("div",{className:"flex flex-col gap-2 border-t border-line/60 px-4 py-2 sm:flex-row sm:items-center sm:gap-3",children:[c.jsxs("label",{className:"flex items-center gap-1.5 font-mono text-[11px] text-fg-4",children:[c.jsx("span",{className:"shrink-0",children:"Agent"}),c.jsxs("select",{value:s,onChange:H=>l(H.target.value),className:"rounded border border-line bg-surface px-2 py-1 font-mono text-xs text-fg focus:border-fg-5 focus:outline-none",children:[c.jsx("option",{value:"",children:"默认"}),C.map(H=>c.jsx("option",{value:H.id,children:H.name},H.id))]})]}),v.length>0&&c.jsxs("div",{ref:y,className:"relative flex min-w-0 flex-1 items-center gap-1.5 font-mono text-[11px] text-fg-4",children:[c.jsx("span",{className:"shrink-0",children:"Issue"}),c.jsxs("button",{type:"button",onClick:()=>{b(H=>!H),h("")},className:"flex min-w-0 flex-1 items-center gap-1 truncate rounded border border-line bg-surface px-2 py-1 font-mono text-xs text-fg transition-colors hover:border-fg-5 focus:border-fg-5 focus:outline-none",children:[c.jsx("span",{className:"min-w-0 flex-1 truncate text-left",children:$?`#${$.number} ${$.title}`:"无"}),c.jsx(ss,{className:"h-3 w-3 shrink-0 text-fg-5"})]}),o&&c.jsx("button",{type:"button",onClick:()=>{d(""),h("")},className:"shrink-0 text-fg-5 hover:text-fg-3",children:c.jsx(Tt,{className:"h-3 w-3"})}),m&&c.jsxs("div",{className:"absolute left-0 top-full z-50 mt-1 w-full min-w-[280px] rounded-md border border-line bg-surface shadow-lg",children:[c.jsxs("div",{className:"flex items-center gap-1.5 border-b border-line px-2 py-1.5",children:[c.jsx(Va,{className:"h-3 w-3 shrink-0 text-fg-5"}),c.jsx("input",{type:"text",value:f,onChange:H=>h(H.target.value),onKeyDown:H=>{H.key==="Escape"&&b(!1)},placeholder:"搜索 issue...",autoFocus:!0,className:"min-w-0 flex-1 bg-transparent font-mono text-xs text-fg placeholder:text-fg-6 focus:outline-none"})]}),c.jsxs("ul",{className:"max-h-48 overflow-y-auto py-1",children:[!L&&c.jsx("li",{children:c.jsx("button",{type:"button",onClick:()=>{d(""),b(!1)},className:me("w-full px-2.5 py-1.5 text-left font-mono text-xs transition-colors hover:bg-elevated/60",o?"text-fg-4":"text-blue-400"),children:"无"})}),Y.map(H=>c.jsx("li",{children:c.jsxs("button",{type:"button",onClick:()=>{d(H.id),h(""),b(!1)},className:me("flex w-full items-center gap-1.5 px-2.5 py-1.5 text-left transition-colors hover:bg-elevated/60",H.id===o?"bg-blue-500/10":""),children:[c.jsxs("span",{className:me("shrink-0 rounded px-1 py-0.5 font-mono text-[10px] font-medium",H.state==="open"?"bg-emerald-500/15 text-emerald-400":"bg-purple-500/15 text-purple-400"),children:["#",H.number]}),c.jsx("span",{className:"min-w-0 truncate font-mono text-xs text-fg-3",children:H.title})]})},H.id)),Y.length===0&&c.jsx("li",{className:"px-2.5 py-3 text-center font-mono text-[10px] text-fg-5",children:"无匹配结果"})]})]})]})]})]}),c.jsx("div",{className:"mt-2 text-center font-mono text-[10px] text-fg-6",children:"⌘⏎ / ctrl+⏎ 开始运行"}),N&&c.jsx("div",{className:"mt-3 rounded-lg border border-red-500/20 bg-red-500/10 px-4 py-2 font-mono text-xs text-red-400",children:N})]})]})}function g1({body:e}){return e?c.jsx("div",{className:"markdown-body leading-relaxed",children:c.jsx(ls,{remarkPlugins:[os],components:{table:Hh},children:e})}):c.jsx("p",{className:"py-10 text-center font-mono text-xs text-fg-5",children:"没有描述内容"})}function b1({issue:e}){var t;return c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsxs("span",{className:me("shrink-0 rounded px-1.5 py-0.5 font-mono text-[10px] font-semibold",e.state==="open"?"bg-emerald-500/15 text-emerald-400":"bg-purple-500/15 text-purple-400"),children:["#",e.number," ",e.state]}),(t=e.labels)==null?void 0:t.map(a=>c.jsx("span",{className:"rounded px-1.5 py-0.5 text-[10px] font-medium",style:{backgroundColor:`#${a.color}20`,color:`#${a.color}`},children:a.name},a.id))]}),c.jsx("h2",{className:"mt-0.5 truncate text-sm font-medium text-fg",children:e.title})]})}function gM({onToggleSidebar:e}){const t=Pe(b=>b.matchingParentId),a=Pe(b=>b.matchingCandidateId),s=Pe(b=>b.issues.find(x=>x.id===t)),l=Pe(b=>b.issues.find(x=>x.id===a)),o=Pe(b=>b.exitMatchMode),d=Pe(b=>b.linkChild),[f,h]=A.useState(!1);if(!s)return null;const m=async()=>{l&&(h(!0),await d(s.number,l.number),h(!1))};return c.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden bg-term",children:[c.jsxs("header",{className:"flex items-center gap-3 border-b border-line bg-base px-4 py-2.5",children:[c.jsx("button",{type:"button",onClick:e,"aria-label":"Open sidebar",className:"-ml-1 rounded-lg p-1.5 text-fg-3 hover:bg-elevated md:hidden",children:c.jsx(Dc,{className:"h-5 w-5"})}),c.jsx("span",{className:"text-xs font-medium text-fg-4",children:"匹配子任务"}),c.jsxs("span",{className:"font-mono text-xs text-fg-3",children:["父: #",s.number]}),c.jsx("div",{className:"flex-1"}),c.jsxs("button",{type:"button",onClick:o,className:"flex h-8 items-center gap-1.5 rounded-md border border-line px-2.5 text-xs text-fg-3 transition-colors hover:border-fg-5 hover:text-fg",children:[c.jsx(Tt,{className:"h-3.5 w-3.5"}),"退出匹配"]})]}),c.jsxs("div",{className:"flex min-h-0 flex-1 flex-col md:flex-row",children:[c.jsxs("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden border-b border-line md:border-b-0 md:border-r",children:[c.jsx("div",{className:"border-b border-line/60 px-4 py-2.5",children:c.jsx(b1,{issue:s})}),c.jsx("div",{className:"flex-1 overflow-y-auto px-6 py-6",children:c.jsx(g1,{body:s.body})})]}),c.jsx("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden",children:l?c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"border-b border-line/60 px-4 py-2.5",children:c.jsx(b1,{issue:l})}),c.jsx("div",{className:"flex-1 overflow-y-auto px-6 py-6",children:c.jsx(g1,{body:l.body})})]}):c.jsx("div",{className:"flex flex-1 items-center justify-center",children:c.jsx("p",{className:"font-mono text-xs text-fg-5",children:"← 从左侧列表选择候选 Issue"})})})]}),l&&c.jsx("div",{className:"flex items-center justify-center gap-3 border-t border-line bg-base px-4 py-3",children:c.jsxs("button",{type:"button",onClick:()=>void m(),disabled:f,className:"flex items-center gap-1.5 rounded-md bg-blue-600 px-4 py-2 text-xs font-medium text-white transition-colors hover:bg-blue-500 disabled:opacity-50",children:[c.jsx(Ia,{className:"h-3.5 w-3.5"}),f?"关联中…":`确认: 将 #${l.number} 设为 #${s.number} 的子任务`]})})]})}function bM({onToggleSidebar:e}){var l;const t=Pe(o=>o.previewIssueId),a=Pe(o=>o.issues.find(d=>d.id===t));if(!a)return c.jsx(NT,{onToggleSidebar:e});const s=()=>{Pe.getState().setSelectedIssue(a.id),Pe.getState().setPreviewIssue(null)};return c.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden bg-term",children:[c.jsxs("header",{className:"flex items-center gap-3 border-b border-line bg-base px-4 py-2.5",children:[c.jsx("button",{type:"button",onClick:e,"aria-label":"Open sidebar",className:"-ml-1 rounded-lg p-1.5 text-fg-3 hover:bg-elevated md:hidden",children:c.jsx(Dc,{className:"h-5 w-5"})}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsxs("span",{className:me("shrink-0 rounded px-1.5 py-0.5 font-mono text-[10px] font-semibold",a.state==="open"?"bg-emerald-500/15 text-emerald-400":"bg-purple-500/15 text-purple-400"),children:["#",a.number," ",a.state]}),(l=a.labels)==null?void 0:l.map(o=>c.jsx("span",{className:"rounded px-1.5 py-0.5 text-[10px] font-medium",style:{backgroundColor:`#${o.color}20`,color:`#${o.color}`},children:o.name},o.id))]}),c.jsx("h2",{className:"mt-0.5 truncate text-sm font-medium text-fg",children:a.title})]}),c.jsxs("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[a.htmlUrl&&c.jsxs("a",{href:a.htmlUrl,target:"_blank",rel:"noopener noreferrer",className:"flex h-8 items-center gap-1.5 rounded-md border border-line px-2.5 font-mono text-xs text-fg-3 transition-colors hover:border-fg-5 hover:text-fg",children:[c.jsx(fc,{className:"h-3.5 w-3.5"}),"源站"]}),c.jsxs("button",{type:"button",onClick:()=>Pe.getState().enterMatchMode(a.id),className:"flex h-8 items-center gap-1.5 rounded-md border border-line px-2.5 text-xs text-fg-3 transition-colors hover:border-blue-500/50 hover:text-blue-400",children:[c.jsx(Ic,{className:"h-3.5 w-3.5"}),"匹配子任务"]}),c.jsxs("button",{type:"button",onClick:s,className:"flex h-8 items-center gap-1.5 rounded-md bg-blue-600 px-3 text-xs font-medium text-white transition-colors hover:bg-blue-500",children:[c.jsx(Lc,{className:"h-3.5 w-3.5 fill-current"}),"开始处理"]})]})]}),c.jsx("div",{className:"flex-1 overflow-y-auto",children:c.jsx("div",{className:"mx-auto max-w-4xl px-6 py-6",children:a.body?c.jsx("div",{className:"markdown-body leading-relaxed",children:c.jsx(ls,{remarkPlugins:[os],components:{table:Hh},children:a.body})}):c.jsx("p",{className:"py-10 text-center font-mono text-xs text-fg-5",children:"该 Issue 没有描述内容"})})})]})}function xM({onToggleSidebar:e,onToggleRightPanel:t,rightPanelOpen:a}){var k;const s=Na(),l=qe(Da),o=Ue(D=>D.activeSessionId),d=Pe(D=>D.previewIssueId),f=Ue(D=>D.sessions.find($=>$.id===D.activeSessionId)??null),h=Ue(D=>{const $=D.activeSessionId;return $?D.messages[$]??ho:ho}),m=Ue(D=>{const $=D.activeSessionId;return $?D.todos[$]??bc:bc}),b=Ue(D=>{const $=D.activeSessionId;return $?D.sessionStatuses[$]:void 0}),x=Ue(D=>{const $=D.activeSessionId;return $?D.errorReasons[$]:void 0}),y=Ue(D=>D.sendError),T=Ue(D=>D.abortSession),N=Pe(D=>f!=null&&f.issueId?D.issues.find($=>$.id===f.issueId):void 0);A.useEffect(()=>{if(o)return Tc.activateSession(o),()=>Tc.deactivateSession(o)},[o]);const S=A.useRef(null),C=A.useRef(!0);A.useEffect(()=>{const D=S.current;D&&C.current&&(D.scrollTop=D.scrollHeight)},[h,m]),A.useEffect(()=>{C.current=!0},[o]),A.useEffect(()=>{if(b!=="busy")return;const D=$=>{if($.key!=="Escape"||$.defaultPrevented)return;const L=$.target;L instanceof HTMLInputElement||L instanceof HTMLTextAreaElement||L!=null&&L.isContentEditable||T()};return window.addEventListener("keydown",D),()=>window.removeEventListener("keydown",D)},[b,T]);const v=Pe(D=>D.matchingParentId);if(!o)return v?c.jsx(gM,{onToggleSidebar:e}):d?c.jsx(bM,{onToggleSidebar:e}):c.jsx(NT,{onToggleSidebar:e});const M=b==="busy";return c.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden bg-term",children:[c.jsxs("header",{className:"flex items-center gap-3 border-b border-line bg-base px-4 py-2.5",children:[c.jsx("button",{type:"button",onClick:e,"aria-label":"Open sidebar",className:"-ml-1 rounded-lg p-1.5 text-fg-3 hover:bg-elevated md:hidden",children:c.jsx(Dc,{className:"h-5 w-5"})}),c.jsxs("div",{className:"min-w-0 flex-1",children:[(f==null?void 0:f.parentID)&&c.jsxs("button",{type:"button",onClick:()=>void Ue.getState().setActiveSession(f.parentID),className:"mb-0.5 flex items-center gap-1 text-[11px] text-fg-4 transition-colors hover:text-blue-400",children:[c.jsx(pv,{className:"h-3 w-3"}),"返回父会话"]}),c.jsx("h2",{className:"truncate text-sm font-medium text-fg",children:((k=f==null?void 0:f.title)==null?void 0:k.trim())||"untitled run"}),(f==null?void 0:f.agent)&&c.jsx("p",{className:"truncate font-mono text-xs text-fg-4",children:f.agent}),c.jsx(mM,{session:f,messages:h})]}),N&&c.jsxs("button",{type:"button",onClick:()=>s(`/${encodeURIComponent(l)}/issues?issueId=${N.id}`),className:"flex items-center gap-1 rounded-md border border-line px-2 py-1 font-mono text-xs text-fg-3 transition-colors hover:border-fg-5 hover:text-fg",children:[c.jsxs("span",{className:me("rounded px-1 py-0.5 text-[10px] font-semibold",N.state==="open"?"bg-emerald-500/15 text-emerald-400":"bg-purple-500/15 text-purple-400"),children:["#",N.number]}),c.jsx("span",{className:"hidden max-w-[120px] truncate sm:inline",children:N.title})]}),c.jsx(oM,{status:b,reason:x}),t&&c.jsx("button",{type:"button",onClick:t,"aria-label":a?"关闭侧边栏":"打开侧边栏",className:me("hidden items-center justify-center rounded-md border border-line p-1.5 transition-colors md:flex",a?"bg-blue-500/10 text-blue-500 hover:bg-blue-500/20":"text-fg-4 hover:bg-elevated hover:text-fg-2"),children:c.jsx(CE,{className:"h-4 w-4"})}),M&&c.jsxs("button",{type:"button",onClick:()=>void T(),className:"flex items-center gap-1.5 rounded-md border border-line px-2.5 py-1 font-mono text-xs text-fg-2 transition-colors hover:border-red-500/50 hover:text-red-400",children:[c.jsx(kE,{className:"h-3 w-3 fill-current"}),"stop"]})]}),c.jsx("div",{ref:S,onScroll:()=>{const D=S.current;D&&(C.current=D.scrollHeight-D.clientHeight-D.scrollTop<=pM)},className:"flex-1 overflow-y-auto",children:c.jsxs("div",{className:"mx-auto flex max-w-4xl flex-col gap-3 px-4 py-4",children:[h.length===0?c.jsxs("p",{className:"py-10 text-center font-mono text-xs text-fg-6",children:[c.jsx("span",{className:"text-emerald-500/60",children:"❯"})," waiting for input",c.jsx("span",{className:"fs-blink",children:" ▋"})]}):h.map((D,$)=>c.jsxs(A.Fragment,{children:[$>0&&D.role==="user"&&c.jsx("div",{className:"border-t border-line/70"}),c.jsx("div",{"data-message-id":D.id,children:c.jsx(tM,{message:D})})]},D.id)),m.length>0&&c.jsx(rM,{todos:[...m],onClick:t})]})}),b==="error"&&x&&c.jsxs("div",{className:"flex items-center gap-2 border-t border-red-500/20 bg-red-500/10 px-4 py-2 font-mono text-xs text-red-400",children:[c.jsx(ia,{className:"h-3.5 w-3.5 shrink-0"}),c.jsx("span",{className:"truncate",children:x})]}),y&&c.jsxs("div",{className:"flex items-center gap-2 border-t border-red-500/20 bg-red-500/10 px-4 py-2 font-mono text-xs text-red-400",children:[c.jsx(ia,{className:"h-3.5 w-3.5 shrink-0"}),c.jsx("span",{className:"truncate",children:y})]}),c.jsx(lM,{})]})}const Gn=Fs((e,t)=>({pulls:[],loaded:!1,syncing:!1,selectedPrId:null,matchingPrId:null,matchingCandidateIssueId:null,clearPulls:()=>e({pulls:[],loaded:!1,selectedPrId:null,matchingPrId:null,matchingCandidateIssueId:null}),setSelectedPr:a=>e({selectedPrId:a}),enterMatchMode:a=>e({matchingPrId:a,matchingCandidateIssueId:null}),exitMatchMode:()=>{const a=t().matchingPrId;e({matchingPrId:null,matchingCandidateIssueId:null,selectedPrId:a})},setMatchCandidate:a=>e({matchingCandidateIssueId:a}),linkIssue:async(a,s)=>{const l=qe.getState().activeRepoId;if(!l)return!1;try{return await I3(l,a,s),!0}catch{return!1}},unlinkIssue:async(a,s)=>{const l=qe.getState().activeRepoId;if(!l)return!1;try{return await M3(l,a,s),!0}catch{return!1}},loadPulls:async()=>{const a=qe.getState().activeRepoId;if(!a){e({pulls:[],loaded:!0});return}try{const s=await ax(a,"all");e({pulls:s,loaded:!0})}catch{e({loaded:!0})}},syncPulls:async()=>{const a=qe.getState().activeRepoId;if(a){e({syncing:!0});try{await R3(a);const s=await ax(a,"all");e({pulls:s,syncing:!1})}catch(s){e({syncing:!1});let l="同步 PR 失败";if(s instanceof Us)try{const o=JSON.parse(s.message);o.error&&(l=o.error)}catch{s.message&&(l=s.message)}Yt.getState().addToast(l,"error")}}}})),EM={completed:{glyph:"✓",color:"text-emerald-400",spin:!1},in_progress:{glyph:"◌",color:"text-amber-400",spin:!0},cancelled:{glyph:"✗",color:"text-fg-5",spin:!1},pending:{glyph:"○",color:"text-fg-4",spin:!1}};function yM(e){var l;const t=(l=e.time)==null?void 0:l.created;if(!t)return"";const a=t<1e12?t*1e3:t;return new Date(a).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})}function TM(e){if(!e.parts)return"";for(const t of e.parts){const a=t.content??t.text;if(a)return a}return""}function _M({todos:e}){if(e.length===0)return c.jsx("div",{className:"flex flex-1 items-center justify-center",children:c.jsx("p",{className:"font-mono text-xs text-fg-5",children:"暂无待办项"})});const t=e.filter(a=>{const s=ji(a.status);return s==="completed"||s==="cancelled"}).length;return c.jsxs("div",{className:"flex-1 overflow-y-auto px-3 py-3",children:[c.jsxs("div",{className:"mb-2 font-mono text-[10px] tabular-nums text-fg-5",children:["进度 ",t,"/",e.length]}),c.jsx("ul",{className:"space-y-1.5",children:e.map(a=>{const s=ji(a.status),l=EM[s],o=s==="completed"||s==="cancelled";return c.jsxs("li",{className:"flex items-start gap-2 font-mono text-xs",children:[c.jsx("span",{className:me("shrink-0 leading-5",l.color,l.spin&&"fs-spin"),children:l.glyph}),c.jsx("span",{className:me("leading-5",o?"text-fg-5 line-through":"text-fg-2"),children:a.content})]},a.id)})})]})}function NM({messages:e,onScrollToMessage:t}){const a=e.filter(s=>s.role==="user");return a.length===0?c.jsx("div",{className:"flex flex-1 items-center justify-center",children:c.jsx("p",{className:"font-mono text-xs text-fg-5",children:"暂无输入记录"})}):c.jsx("div",{className:"flex-1 overflow-y-auto px-3 py-2",children:c.jsx("ul",{className:"space-y-1",children:a.map((s,l)=>{const o=TM(s),d=yM(s);return c.jsx("li",{children:c.jsxs("button",{type:"button",onClick:()=>t==null?void 0:t(s.id),className:"group w-full rounded-md px-2 py-1.5 text-left transition-colors hover:bg-elevated/60",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"shrink-0 font-mono text-[10px] text-emerald-400/60",children:"❯"}),c.jsxs("span",{className:"shrink-0 font-mono text-[10px] tabular-nums text-fg-5",children:["#",l+1]}),d&&c.jsx("span",{className:"ml-auto shrink-0 font-mono text-[10px] text-fg-6",children:d})]}),o&&c.jsx("p",{className:"mt-0.5 line-clamp-2 pl-5 text-xs leading-relaxed text-fg-3 group-hover:text-fg-2",children:o})]})},s.id)})})})}function SM({linked:e,number:t,title:a,state:s,mergedAt:l,isPr:o,onToggle:d}){const f=o?s==="open"?"bg-emerald-500/15 text-emerald-400":l?"bg-purple-500/15 text-purple-400":"bg-red-500/15 text-red-400":s==="open"?"bg-emerald-500/15 text-emerald-400":"bg-purple-500/15 text-purple-400";return c.jsx("li",{children:c.jsx("button",{type:"button",onClick:d,className:me("flex w-full items-start gap-2 rounded-md px-2 py-2 text-left transition-colors",e?"border-l-2 border-emerald-500 bg-emerald-500/5":"border-l-2 border-transparent hover:bg-elevated/50"),children:c.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-1.5",children:[c.jsxs("span",{className:me("shrink-0 rounded px-1 py-0.5 font-mono text-[10px] font-semibold",f),children:["#",t]}),c.jsx("span",{className:"min-w-0 truncate text-xs text-fg-2",children:a}),e&&c.jsx(Mc,{className:"ml-auto h-3 w-3 shrink-0 text-emerald-400"})]})})})}function vM({links:e,sessionId:t}){var L,Y,re,fe;const a=Na(),s=qe(Da),[l,o]=A.useState(null),[d,f]=A.useState(""),h=A.useRef(null),m=Pe(U=>U.issues),b=Gn(U=>U.pulls),x=Ue(U=>U.addLink),y=Ue(U=>U.removeLink),T=new Set(((L=e==null?void 0:e.issues)==null?void 0:L.map(U=>U.id))??[]),N=new Set(((Y=e==null?void 0:e.pullRequests)==null?void 0:Y.map(U=>U.id))??[]);A.useEffect(()=>{var U;l&&((U=h.current)==null||U.focus())},[l]);const S=()=>{o(null),f("")},C=async(U,H,ae)=>{t&&(ae?await y(t,U,H):await x(t,U,H))},v=d.trim().toLowerCase(),M=v?m.filter(U=>`#${U.number} ${U.title}`.toLowerCase().includes(v)):m,k=v?b.filter(U=>`#${U.number} ${U.title} ${U.headBranch}`.toLowerCase().includes(v)):b,D=((re=e==null?void 0:e.issues)==null?void 0:re.length)??0,$=((fe=e==null?void 0:e.pullRequests)==null?void 0:fe.length)??0;if(l){const U=l==="issue",H=U?M:k,ae=U?T:N;return c.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[c.jsxs("div",{className:"flex items-center justify-between border-b border-line px-3 py-2",children:[c.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-blue-400",children:U?"关联 Issue":"关联 PR"}),c.jsxs("button",{type:"button",onClick:S,className:"flex h-6 items-center gap-1 rounded-md px-2 text-xs text-fg-4 transition-colors hover:bg-elevated hover:text-fg-2",children:[c.jsx(Tt,{className:"h-3.5 w-3.5"}),"完成"]})]}),c.jsx("div",{className:"border-b border-line px-3 py-2",children:c.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-line bg-base px-2 py-1",children:[c.jsx(Va,{className:"h-3.5 w-3.5 shrink-0 text-fg-5"}),c.jsx("input",{ref:h,type:"text",value:d,onChange:se=>f(se.target.value),placeholder:U?"搜索 issue...":"搜索 PR...",className:"min-w-0 flex-1 bg-transparent font-mono text-xs text-fg placeholder:text-fg-6 focus:outline-none"}),d&&c.jsx("button",{type:"button",onClick:()=>f(""),className:"shrink-0 text-fg-5 hover:text-fg-3",children:c.jsx(Tt,{className:"h-3 w-3"})})]})}),c.jsx("div",{className:"flex-1 overflow-y-auto px-2 py-2",children:H.length===0?c.jsx("p",{className:"px-2 py-8 text-center font-mono text-xs text-fg-5",children:(U?m:b).length===0?U?"暂无 Issue,请先同步":"暂无 PR,请先同步":"无匹配结果"}):c.jsx("ul",{className:"space-y-0.5",children:H.map(se=>c.jsx(SM,{linked:ae.has(se.id),number:se.number,title:se.title,state:se.state,mergedAt:U?void 0:se.mergedAt,isPr:!U,onToggle:()=>C(l,se.id,ae.has(se.id))},se.id))})})]})}return c.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[c.jsxs("div",{className:"flex items-center gap-1.5 border-b border-line px-3 py-2",children:[c.jsx("span",{className:"flex-1 font-mono text-[10px] text-fg-5",children:D+$>0?`${D+$} 项关联`:"暂无关联"}),c.jsxs("button",{type:"button",onClick:()=>o("issue"),className:"flex h-6 items-center gap-1 rounded-md border border-line px-1.5 text-fg-4 transition-colors hover:border-emerald-500/50 hover:text-emerald-400",children:[c.jsx(Sr,{className:"h-3 w-3"}),c.jsx("span",{className:"text-[10px] font-medium",children:"Issue"})]}),c.jsxs("button",{type:"button",onClick:()=>o("pr"),className:"flex h-6 items-center gap-1 rounded-md border border-line px-1.5 text-fg-4 transition-colors hover:border-blue-500/50 hover:text-blue-400",children:[c.jsx(Sr,{className:"h-3 w-3"}),c.jsx("span",{className:"text-[10px] font-medium",children:"PR"})]})]}),c.jsxs("div",{className:"flex-1 overflow-y-auto px-3 py-3",children:[D>0&&c.jsxs("div",{className:"mb-3",children:[c.jsxs("div",{className:"mb-1.5 font-mono text-[10px] font-medium uppercase tracking-wider text-fg-5",children:["Issues (",D,")"]}),c.jsx("ul",{className:"space-y-1",children:e.issues.map(U=>c.jsxs("li",{className:"group flex items-start gap-1",children:[c.jsxs("button",{type:"button",onClick:()=>a(`/${encodeURIComponent(s)}/issues?issueId=${encodeURIComponent(U.id)}`),className:"flex min-w-0 flex-1 items-start gap-2 rounded-md px-2 py-1.5 text-left transition-colors hover:bg-elevated/60",children:[c.jsxs("span",{className:me("mt-0.5 shrink-0 rounded px-1 py-0.5 font-mono text-[10px] font-semibold",U.state==="open"?"bg-emerald-500/15 text-emerald-400":"bg-purple-500/15 text-purple-400"),children:["#",U.number]}),c.jsx("span",{className:"line-clamp-2 text-xs leading-5 text-fg-3 group-hover:text-fg-2",children:U.title})]}),c.jsx("button",{type:"button",onClick:()=>void C("issue",U.id,!0),className:"mt-1.5 hidden shrink-0 rounded p-0.5 text-fg-5 transition-colors hover:bg-red-500/15 hover:text-red-400 group-hover:block",children:c.jsx(Tt,{className:"h-3 w-3"})})]},U.id))})]}),$>0&&c.jsxs("div",{children:[c.jsxs("div",{className:"mb-1.5 font-mono text-[10px] font-medium uppercase tracking-wider text-fg-5",children:["Pull Requests (",$,")"]}),c.jsx("ul",{className:"space-y-1",children:e.pullRequests.map(U=>c.jsxs("li",{className:"group flex items-start gap-1",children:[c.jsxs("button",{type:"button",onClick:()=>a(`/${encodeURIComponent(s)}/pulls?prId=${encodeURIComponent(U.id)}`),className:"flex min-w-0 flex-1 items-start gap-2 rounded-md px-2 py-1.5 text-left transition-colors hover:bg-elevated/60",children:[c.jsxs("span",{className:me("mt-0.5 shrink-0 rounded px-1 py-0.5 font-mono text-[10px] font-semibold",U.state==="open"?"bg-emerald-500/15 text-emerald-400":U.mergedAt?"bg-purple-500/15 text-purple-400":"bg-red-500/15 text-red-400"),children:["#",U.number]}),c.jsx("span",{className:"line-clamp-2 text-xs leading-5 text-fg-3 group-hover:text-fg-2",children:U.title})]}),c.jsx("button",{type:"button",onClick:()=>void C("pr",U.id,!0),className:"mt-1.5 hidden shrink-0 rounded p-0.5 text-fg-5 transition-colors hover:bg-red-500/15 hover:text-red-400 group-hover:block",children:c.jsx(Tt,{className:"h-3 w-3"})})]},U.id))})]}),D===0&&$===0&&c.jsx("div",{className:"flex flex-1 items-center justify-center py-10",children:c.jsx("p",{className:"font-mono text-xs text-fg-5",children:"点击上方按钮添加关联"})})]})]})}function x1({todos:e,messages:t,sessionLinks:a,sessionId:s,onScrollToMessage:l}){var m,b;const[o,d]=A.useState("todo"),f=t.filter(x=>x.role==="user").length,h=(((m=a==null?void 0:a.issues)==null?void 0:m.length)??0)+(((b=a==null?void 0:a.pullRequests)==null?void 0:b.length)??0);return c.jsxs("div",{className:"flex h-full w-72 shrink-0 flex-col border-l border-line bg-surface",children:[c.jsxs("div",{className:"flex items-center border-b border-line",children:[c.jsxs("button",{type:"button",onClick:()=>d("todo"),className:me("flex flex-1 items-center justify-center gap-1.5 border-b-2 px-3 py-2.5 text-xs font-medium transition-colors",o==="todo"?"border-blue-500 text-blue-500":"border-transparent text-fg-4 hover:text-fg-2"),children:[c.jsx(aA,{className:"h-3.5 w-3.5"}),"待办",e.length>0&&c.jsx("span",{className:"rounded-full bg-elevated px-1.5 py-0.5 font-mono text-[10px] text-fg-5",children:e.length})]}),c.jsxs("button",{type:"button",onClick:()=>d("prompts"),className:me("flex flex-1 items-center justify-center gap-1.5 border-b-2 px-3 py-2.5 text-xs font-medium transition-colors",o==="prompts"?"border-blue-500 text-blue-500":"border-transparent text-fg-4 hover:text-fg-2"),children:[c.jsx(mA,{className:"h-3.5 w-3.5"}),"输入",f>0&&c.jsx("span",{className:"rounded-full bg-elevated px-1.5 py-0.5 font-mono text-[10px] text-fg-5",children:f})]}),c.jsxs("button",{type:"button",onClick:()=>d("links"),className:me("flex flex-1 items-center justify-center gap-1.5 border-b-2 px-3 py-2.5 text-xs font-medium transition-colors",o==="links"?"border-blue-500 text-blue-500":"border-transparent text-fg-4 hover:text-fg-2"),children:[c.jsx(Mc,{className:"h-3.5 w-3.5"}),"关联",h>0&&c.jsx("span",{className:"rounded-full bg-elevated px-1.5 py-0.5 font-mono text-[10px] text-fg-5",children:h})]})]}),o==="todo"?c.jsx(_M,{todos:e}):o==="prompts"?c.jsx(NM,{messages:t,onScrollToMessage:l}):c.jsx(vM,{links:a,sessionId:s})]})}const E1=8;function ST({onSwipeLeft:e,onSwipeRight:t,threshold:a=40,disabled:s=!1}={}){const l=A.useRef({x0:0,y0:0,dir:null,on:!1}),o=A.useRef(0),d=A.useCallback(m=>{if(s)return;const b=m.touches[0];l.current={x0:b.clientX,y0:b.clientY,dir:null,on:!0},o.current=0},[s]),f=A.useCallback(m=>{const b=l.current;if(!b.on)return;const x=m.touches[0].clientX-b.x0,y=m.touches[0].clientY-b.y0;if(!b.dir){(Math.abs(x)>E1||Math.abs(y)>E1)&&(b.dir=Math.abs(x)>Math.abs(y)?"h":"v");return}if(b.dir==="v"){b.on=!1;return}o.current=x},[]),h=A.useCallback(()=>{const m=l.current;if(!m.on||m.dir!=="h"){m.on=!1;return}m.on=!1;const b=o.current;b>a?t==null||t():b<-a&&(e==null||e())},[a,e,t]);return{onTouchStart:d,onTouchMove:f,onTouchEnd:h}}function Wm({side:e,open:t,onClose:a,children:s,width:l="w-80"}){const o=e==="left";return c.jsxs("div",{className:"md:hidden",children:[t&&c.jsx("div",{className:"fixed inset-0 z-40 bg-black/50",onClick:a,"aria-hidden":"true"}),c.jsx("div",{className:me("fixed top-0 bottom-0 z-50 flex flex-col bg-surface pt-[var(--safe-top)] pb-[var(--safe-bottom)] shadow-xl transition-transform duration-200 ease-out",l,o?"left-0 border-r border-line":"right-0 border-l border-line",t?"translate-x-0":o?"-translate-x-full":"translate-x-full"),children:s})]})}function Jm(e){var t,a;if(typeof((t=e.time)==null?void 0:t.updated)=="number")return e.time.updated;if(typeof((a=e.time)==null?void 0:a.created)=="number")return e.time.created;if(e.createdAt){const s=Date.parse(e.createdAt);return Number.isNaN(s)?0:s}return 0}function AM(e){const t=Jm(e);if(!t)return"";const a=t<1e12?t*1e3:t,s=new Date(a);return s.toDateString()===new Date().toDateString()?s.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"}):s.toLocaleDateString(void 0,{month:"short",day:"numeric"})}function y1(e){navigator.clipboard?navigator.clipboard.writeText(e).catch(()=>T1(e)):T1(e)}function T1(e){const t=document.createElement("textarea");t.value=e,t.style.cssText="position:fixed;opacity:0",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}function CM(e){switch(e){case"idle":return"bg-emerald-500";case"busy":case"retry":return"bg-amber-500 animate-pulse";case"error":return"bg-red-500";default:return"bg-fg-5"}}function wM({session:e,isActive:t,isConfirming:a,onSelect:s,onDelete:l,onConfirm:o,onCancelConfirm:d,onRename:f,status:h,issue:m,linkedItems:b}){var ae,se;const x=AM(e),[y,T]=A.useState(!1),[N,S]=A.useState(""),C=A.useRef(null),v=()=>{var Z;S(((Z=e.title)==null?void 0:Z.trim())||""),T(!0),requestAnimationFrame(()=>{var J;return(J=C.current)==null?void 0:J.focus()})},M=()=>{var J;T(!1);const Z=N.trim();Z&&Z!==(((J=e.title)==null?void 0:J.trim())||"")&&f(Z)},[k,D]=A.useState(0),[$,L]=A.useState(!1),Y=A.useRef({x0:0,y0:0,base:0,dir:null,on:!1}),re=Z=>{const J=Z.touches[0];Y.current={x0:J.clientX,y0:J.clientY,base:k,dir:null,on:!0},L(!1)},fe=Z=>{const J=Y.current;if(!J.on)return;const V=Z.touches[0].clientX-J.x0,G=Z.touches[0].clientY-J.y0;if(!J.dir){(Math.abs(V)>5||Math.abs(G)>5)&&(J.dir=Math.abs(V)>Math.abs(G)?"h":"v");return}J.dir!=="v"&&D(Math.max(-144,Math.min(0,J.base+V)))},U=()=>{Y.current.on=!1,L(!0),D(Z=>Z<-144/2?-144:0)},H=()=>{L(!0),D(0)};return c.jsxs("li",{className:"relative overflow-hidden rounded-md",children:[c.jsx("div",{className:"absolute right-0 top-0 bottom-0 flex md:hidden",style:k<0?{zIndex:10}:void 0,children:a?c.jsxs(c.Fragment,{children:[c.jsx("button",{type:"button",onClick:()=>{l(),H()},className:"flex w-12 items-center justify-center bg-red-500 text-white active:bg-red-600",children:c.jsx(Ia,{className:"h-4 w-4"})}),c.jsx("button",{type:"button",onClick:()=>{d(),H()},className:"flex w-12 items-center justify-center bg-neutral-500 text-white active:bg-neutral-600",children:c.jsx(Tt,{className:"h-4 w-4"})})]}):c.jsxs(c.Fragment,{children:[c.jsx("button",{type:"button",onClick:()=>{v(),H()},className:"flex w-12 items-center justify-center bg-amber-500 text-white active:bg-amber-600",children:c.jsx($b,{className:"h-4 w-4"})}),c.jsx("button",{type:"button",onClick:()=>{var Z;y1(JSON.stringify({id:e.id,name:((Z=e.title)==null?void 0:Z.trim())||""},null,2)),H()},className:"flex w-12 items-center justify-center bg-blue-500 text-white active:bg-blue-600",children:c.jsx(dc,{className:"h-4 w-4"})}),c.jsx("button",{type:"button",onClick:()=>o(),className:"flex w-12 items-center justify-center bg-red-500 text-white active:bg-red-600",children:c.jsx(Li,{className:"h-4 w-4"})})]})}),c.jsxs("div",{className:me("group relative rounded-md border-l-2",t?"border-blue-500 bg-elevated":"border-transparent bg-surface hover:bg-elevated/50",$&&"transition-transform duration-200 ease-out"),style:{...k!==0?{transform:`translateX(${k}px)`}:{},...k===-144?{pointerEvents:"none"}:{}},onTouchStart:re,onTouchMove:fe,onTouchEnd:U,children:[c.jsxs("button",{type:"button",onClick:()=>{y||(s(),H())},className:"block w-full px-2.5 py-2 text-left",style:k===-144?{pointerEvents:"auto"}:void 0,children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:me("h-1.5 w-1.5 shrink-0 rounded-full",CM(h))}),c.jsx("span",{className:"min-w-0 truncate font-mono text-xs text-fg-3",children:((ae=e.agent)==null?void 0:ae.trim())||"默认"}),x&&c.jsx("span",{className:"ml-auto shrink-0 font-mono text-[10px] tabular-nums text-fg-5",children:x})]}),y?c.jsx("input",{ref:C,type:"text",value:N,onChange:Z=>S(Z.target.value),onBlur:M,onKeyDown:Z=>{Z.key==="Enter"&&M(),Z.key==="Escape"&&T(!1)},onClick:Z=>Z.stopPropagation(),className:"mt-0.5 w-full rounded border border-blue-500 bg-base pl-3.5 text-sm text-fg-2 outline-none"}):c.jsxs("div",{className:"mt-0.5 pl-3.5",onDoubleClick:Z=>{Z.stopPropagation(),v()},children:[(m||b)&&c.jsxs("div",{className:"mb-0.5 flex flex-wrap gap-1",children:[m&&c.jsxs("span",{className:me("shrink-0 rounded px-1 py-0.5 font-mono text-[10px] font-medium leading-none",m.state==="open"?"bg-emerald-500/15 text-emerald-400":"bg-purple-500/15 text-purple-400"),children:["#",m.number]}),b==null?void 0:b.map(Z=>c.jsx("span",{className:me("shrink-0 rounded px-1 py-0.5 font-mono text-[10px] font-medium leading-none",Z.type==="pr"?Z.state==="open"?"bg-blue-500/15 text-blue-400":Z.mergedAt?"bg-purple-500/15 text-purple-400":"bg-red-500/15 text-red-400":Z.state==="open"?"bg-emerald-500/15 text-emerald-400":"bg-purple-500/15 text-purple-400"),children:Z.type==="pr"?`PR#${Z.number}`:`#${Z.number}`},`${Z.type}-${Z.number}`))]}),c.jsx("span",{className:"block truncate text-sm text-fg-2",children:((se=e.title)==null?void 0:se.trim())||"未命名运行"})]})]}),a?c.jsxs("span",{className:"absolute right-1.5 top-1.5 hidden items-center gap-1 rounded bg-surface/90 px-0.5 md:flex",children:[c.jsx("button",{type:"button",onClick:l,className:"rounded p-1 text-red-400 hover:bg-red-500/10",children:c.jsx(Ia,{className:"h-3.5 w-3.5"})}),c.jsx("button",{type:"button",onClick:d,className:"rounded p-1 text-fg-3 hover:bg-elevated",children:c.jsx(Tt,{className:"h-3.5 w-3.5"})})]}):c.jsxs("span",{className:"absolute right-1.5 top-1.5 hidden items-center gap-0.5 opacity-0 transition-opacity group-hover:opacity-100 md:flex",children:[c.jsx("button",{type:"button",onClick:v,title:"重命名",className:"rounded p-1 text-fg-5 hover:text-fg-2",children:c.jsx($b,{className:"h-3.5 w-3.5"})}),c.jsx("button",{type:"button",onClick:()=>{var Z;y1(JSON.stringify({id:e.id,name:((Z=e.title)==null?void 0:Z.trim())||""},null,2))},title:"复制 Session JSON",className:"rounded p-1 text-fg-5 hover:text-fg-2",children:c.jsx(dc,{className:"h-3.5 w-3.5"})}),c.jsx("button",{type:"button",onClick:o,className:"rounded p-1 text-fg-5 hover:text-red-400",children:c.jsx(Li,{className:"h-3.5 w-3.5"})})]})]})]})}function km({issue:e,indent:t,selected:a,badge:s,onClick:l}){return c.jsx("li",{children:c.jsxs("button",{type:"button",onClick:l,className:me("group flex w-full items-center gap-2 rounded-md py-1.5 text-left transition-colors",t?"pl-6 pr-2.5":"px-2.5",a?"bg-blue-500/10":"hover:bg-elevated/50"),children:[c.jsxs("span",{className:me("shrink-0 rounded px-1.5 py-0.5 font-mono text-[10px] font-medium",e.state==="open"?"bg-emerald-500/15 text-emerald-400":"bg-purple-500/15 text-purple-400"),children:["#",e.number]}),c.jsx("span",{className:"min-w-0 flex-1 truncate text-xs text-fg-3",children:e.title}),s!=null&&s>0&&c.jsx("span",{className:"shrink-0 rounded-full bg-elevated px-1.5 py-0.5 font-mono text-[10px] text-fg-5",children:s})]})})}function _1({onClose:e}){const[t,a]=A.useState(null),[s,l]=A.useState(""),[o,d]=A.useState(""),[f,h]=A.useState(new Set),m=Ue(R=>R.sessions),b=Ue(R=>R.activeSessionId),x=Ue(R=>R.sessionStatuses),y=Ue(R=>R.setActiveSession),T=Ue(R=>R.deleteSession),N=Ue(R=>R.renameSession),S=qe(R=>R.activeRepoId),C=Pe(R=>R.issues),v=Pe(R=>R.syncing),M=Pe(R=>R.syncIssues),k=Pe(R=>R.matchingParentId),D=Pe(R=>R.matchingCandidateId),$=Ue(R=>R.allSessionLinks),L=[...m].filter(R=>!R.parentID).sort((R,X)=>Jm(X)-Jm(R)),Y=new Map(C.map(R=>[R.id,R])),re=new Map;for(const R of L)R.issueId&&re.set(R.issueId,(re.get(R.issueId)??0)+1);const fe=C.filter(R=>R.state==="open"),U=new Map,H=fe.filter(R=>{if(R.parentId){const X=U.get(R.parentId)??[];return X.push(R),U.set(R.parentId,X),!1}return!0}),ae=H.filter(R=>U.has(R.id)),se=H.filter(R=>!U.has(R.id)),Z=o.trim().toLowerCase(),J=R=>`#${R.number} ${R.title}`.toLowerCase().includes(Z),V=Z?ae.filter(R=>J(R)?!0:(U.get(R.id)??[]).some(J)):ae,G=Z?se.filter(J):se,pe=R=>{h(X=>{const O=new Set(X);return O.has(R)?O.delete(R):O.add(R),O})},ke=R=>c.jsx("ul",{className:"space-y-0.5",children:R.map(X=>{const O=X.issueId?Y.get(X.issueId):void 0,ge=$[X.id],ve=[];if(ge){for(const Ae of ge.issues)ve.push({number:Ae.number,state:Ae.state,type:"issue"});for(const Ae of ge.pullRequests)ve.push({number:Ae.number,state:Ae.state,type:"pr",mergedAt:Ae.mergedAt})}return c.jsx(wM,{session:X,isActive:X.id===b,isConfirming:t===X.id,status:x[X.id],issue:O?{number:O.number,title:O.title,state:O.state}:void 0,linkedItems:ve.length>0?ve:void 0,onSelect:()=>{y(X.id),e==null||e()},onDelete:()=>{T(X.id),a(null)},onConfirm:()=>a(X.id),onCancelConfirm:()=>a(null),onRename:Ae=>void N(X.id,Ae)},X.id)})}),B=R=>{k?Pe.getState().setMatchCandidate(R):(Pe.getState().setPreviewIssue(R),Ue.setState({activeSessionId:null})),e==null||e()};if(k){const R=Y.get(k),X=s.toLowerCase(),O=C.filter(ge=>ge.state==="open"&&ge.id!==k&&(!X||`#${ge.number} ${ge.title}`.toLowerCase().includes(X)));return c.jsxs("div",{className:"flex h-full w-80 shrink-0 flex-col border-r border-line bg-surface",children:[c.jsxs("div",{className:"border-b border-line px-3 py-3",children:[c.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-fg-3",children:"选择子任务"}),R&&c.jsxs("p",{className:"mt-0.5 truncate font-mono text-[10px] text-fg-5",children:["父: #",R.number," ",R.title]})]}),c.jsx("div",{className:"border-b border-line px-3 py-2",children:c.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-line bg-base px-2 py-1",children:[c.jsx(Va,{className:"h-3.5 w-3.5 text-fg-5"}),c.jsx("input",{type:"text",value:s,onChange:ge=>l(ge.target.value),placeholder:"搜索 issue...",className:"min-w-0 flex-1 bg-transparent font-mono text-xs text-fg placeholder:text-fg-6 focus:outline-none"})]})}),c.jsxs("div",{className:"flex-1 overflow-y-auto px-2 py-2",children:[c.jsx("ul",{className:"space-y-0.5",children:O.map(ge=>c.jsx(km,{issue:ge,selected:ge.id===D,onClick:()=>B(ge.id)},ge.id))}),O.length===0&&c.jsx("p",{className:"px-2 py-4 text-center font-mono text-xs text-fg-5",children:"无匹配结果"})]})]})}return c.jsxs("div",{className:"flex h-full w-80 shrink-0 flex-col border-r border-line bg-surface",children:[c.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[c.jsxs("div",{className:"flex items-center justify-between border-b border-line px-3 py-3",children:[c.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-fg-3",children:"运行记录"}),S&&c.jsx("button",{type:"button",onClick:()=>{Ue.setState({activeSessionId:null}),e==null||e()},title:"新建运行",className:"flex h-7 w-7 items-center justify-center rounded-md bg-blue-600 text-white transition-colors hover:bg-blue-500",children:c.jsx(Sr,{className:"h-4 w-4"})})]}),c.jsx("div",{className:"flex-1 overflow-y-auto px-2 py-2",children:S?L.length===0?c.jsx("p",{className:"px-2 py-6 text-center font-mono text-xs text-fg-5",children:"暂无运行记录"}):c.jsx("div",{children:ke(L)}):c.jsx("p",{className:"px-2 py-6 text-center font-mono text-xs text-fg-5",children:"请先选择一个仓库"})})]}),c.jsxs("div",{className:"flex min-h-0 flex-1 flex-col border-t border-line",children:[c.jsxs("div",{className:"flex items-center justify-between border-b border-line px-3 py-3",children:[c.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-fg-3",children:"Issues"}),S&&c.jsx("button",{type:"button",onClick:()=>void M(),disabled:v,title:"同步 Issues",className:"flex h-7 w-7 items-center justify-center rounded-md text-fg-4 transition-colors hover:bg-elevated hover:text-fg-2 disabled:opacity-40",children:c.jsx(Ps,{className:me("h-3.5 w-3.5",v&&"animate-spin")})})]}),c.jsx("div",{className:"border-b border-line px-3 py-2",children:c.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-line bg-base px-2 py-1",children:[c.jsx(Va,{className:"h-3.5 w-3.5 shrink-0 text-fg-5"}),c.jsx("input",{type:"text",value:o,onChange:R=>d(R.target.value),placeholder:"搜索 issue...",className:"min-w-0 flex-1 bg-transparent font-mono text-xs text-fg placeholder:text-fg-6 focus:outline-none"}),o&&c.jsx("button",{type:"button",onClick:()=>d(""),className:"shrink-0 text-fg-5 hover:text-fg-3",children:c.jsx(Tt,{className:"h-3 w-3"})})]})}),c.jsx("div",{className:"flex-1 overflow-y-auto px-2 py-2",children:S?C.length===0?c.jsx("p",{className:"px-2 py-4 text-center font-mono text-xs text-fg-5",children:"点击 ↻ 同步 Issues"}):V.length===0&&G.length===0?c.jsx("p",{className:"px-2 py-4 text-center font-mono text-xs text-fg-5",children:"无匹配 Issue"}):c.jsxs("ul",{className:"space-y-0.5",children:[V.map(R=>{const X=U.get(R.id)??[],O=Z?X.filter(J):X,ge=f.has(R.id)||!!Z;return c.jsxs("li",{children:[c.jsxs("div",{className:"flex items-center",children:[c.jsx("button",{type:"button",onClick:()=>pe(R.id),className:"flex h-6 w-5 shrink-0 items-center justify-center text-fg-5",children:c.jsx(bh,{className:me("h-3 w-3 transition-transform",ge&&"rotate-90")})}),c.jsxs("button",{type:"button",onClick:()=>B(R.id),className:"flex min-w-0 flex-1 items-center gap-2 rounded-md py-1.5 pr-2.5 text-left transition-colors hover:bg-elevated/50",children:[c.jsxs("span",{className:me("shrink-0 rounded px-1.5 py-0.5 font-mono text-[10px] font-semibold",R.state==="open"?"bg-emerald-500/15 text-emerald-400":"bg-purple-500/15 text-purple-400"),children:["#",R.number]}),c.jsx("span",{className:"min-w-0 flex-1 truncate text-xs font-medium text-fg-2",children:R.title}),c.jsx("span",{className:"shrink-0 rounded-full bg-elevated px-1.5 py-0.5 font-mono text-[10px] text-fg-5",children:X.length})]})]}),ge&&O.length>0&&c.jsx("ul",{className:"space-y-0.5",children:O.map(ve=>c.jsx(km,{issue:ve,indent:!0,onClick:()=>B(ve.id)},ve.id))})]},R.id)}),G.map(R=>c.jsx(km,{issue:R,badge:re.get(R.id),onClick:()=>B(R.id)},R.id))]}):c.jsx("p",{className:"px-2 py-4 text-center font-mono text-xs text-fg-5",children:"请先选择一个仓库"})})]})]})}function kM(){const[e,t]=A.useState(()=>typeof window<"u"&&window.matchMedia("(min-width: 1280px)").matches);return A.useEffect(()=>{const a=window.matchMedia("(min-width: 1280px)"),s=l=>t(l.matches);return a.addEventListener("change",s),()=>a.removeEventListener("change",s)},[]),e}function N1(e){const t=document.querySelector(`[data-message-id="${e}"]`);t&&(t.scrollIntoView({behavior:"smooth",block:"center"}),t.classList.add("fs-highlight"),setTimeout(()=>t.classList.remove("fs-highlight"),2e3))}function RM(){const[e,t]=A.useState(!1),[a,s]=A.useState(!1),[l,o]=A.useState(!1),d=kM(),f=Ue(N=>N.activeSessionId),h=Ue(N=>{const S=N.activeSessionId;return S?N.todos[S]??bc:bc}),m=Ue(N=>{const S=N.activeSessionId;return S?N.messages[S]??ho:ho}),b=Ue(N=>{const S=N.activeSessionId;return S?N.sessionLinks[S]:void 0});A.useEffect(()=>{d&&f?o(!0):d||o(!1)},[d,f]);const x=l&&!!f,y=()=>{window.matchMedia("(max-width: 767px)").matches?s(N=>!N):o(N=>!N)},T=ST({onSwipeRight:()=>t(!0),onSwipeLeft:()=>s(!0),disabled:e||a});return c.jsxs("div",{className:"flex min-h-0 flex-1",...T,children:[c.jsx("div",{className:"hidden shrink-0 md:flex",children:c.jsx(_1,{})}),c.jsx(Wm,{side:"left",open:e,onClose:()=>t(!1),children:c.jsx(_1,{onClose:()=>t(!1)})}),c.jsx(Wm,{side:"right",open:a,onClose:()=>s(!1),children:c.jsx(x1,{todos:h,messages:m,sessionLinks:b,sessionId:f,onScrollToMessage:N=>{s(!1),setTimeout(()=>N1(N),300)}})}),c.jsx("div",{className:"flex min-w-0 flex-1 flex-col",children:c.jsx(xM,{onToggleSidebar:()=>t(N=>!N),onToggleRightPanel:y,rightPanelOpen:x})}),x&&c.jsx("div",{className:"hidden shrink-0 md:flex",children:c.jsx(x1,{todos:h,messages:m,sessionLinks:b,sessionId:f,onScrollToMessage:N1})})]})}const S1=/[#.]/g;function OM(e,t){const a=e||"",s={};let l=0,o,d;for(;l<a.length;){S1.lastIndex=l;const f=S1.exec(a),h=a.slice(l,f?f.index:a.length);h&&(o?o==="#"?s.id=h:Array.isArray(s.className)?s.className.push(h):s.className=[h]:d=h,l+=h.length),f&&(o=f[0],l++)}return{type:"element",tagName:d||t||"div",properties:s,children:[]}}function vT(e,t,a){const s=a?LM(a):void 0;function l(o,d,...f){let h;if(o==null){h={type:"root",children:[]};const m=d;f.unshift(m)}else{h=OM(o,t);const m=h.tagName.toLowerCase(),b=s?s.get(m):void 0;if(h.tagName=b||m,IM(d))f.unshift(d);else for(const[x,y]of Object.entries(d))MM(e,h.properties,x,y)}for(const m of f)eh(h.children,m);return h.type==="element"&&h.tagName==="template"&&(h.content={type:"root",children:h.children},h.children=[]),h}return l}function IM(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,a=Object.keys(e);for(const s of a){const l=t[s];if(l&&typeof l=="object"){if(!Array.isArray(l))return!0;const o=l;for(const d of o)if(typeof d!="number"&&typeof d!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function MM(e,t,a,s){const l=Bc(e,a);let o;if(s!=null){if(typeof s=="number"){if(Number.isNaN(s))return;o=s}else typeof s=="boolean"?o=s:typeof s=="string"?l.spaceSeparated?o=mx(s):l.commaSeparated?o=ox(s):l.commaOrSpaceSeparated?o=mx(ox(s).join(" ")):o=v1(l,l.property,s):Array.isArray(s)?o=[...s]:o=l.property==="style"?DM(s):String(s);if(Array.isArray(o)){const d=[];for(const f of o)d.push(v1(l,l.property,f));o=d}l.property==="className"&&Array.isArray(t.className)&&(o=t.className.concat(o)),t[l.property]=o}}function eh(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const a of t)eh(e,a);else if(typeof t=="object"&&"type"in t)t.type==="root"?eh(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function v1(e,t,a){if(typeof a=="string"){if(e.number&&a&&!Number.isNaN(Number(a)))return Number(a);if((e.boolean||e.overloadedBoolean)&&(a===""||po(a)===po(t)))return!0}return a}function DM(e){const t=[];for(const[a,s]of Object.entries(e))t.push([a,s].join(": "));return t.join("; ")}function LM(e){const t=new Map;for(const a of e)t.set(a.toLowerCase(),a);return t}const jM=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],BM=vT(_o,"div"),PM=vT(us,"g",jM);function UM(e){const t=String(e),a=[];return{toOffset:l,toPoint:s};function s(o){if(typeof o=="number"&&o>-1&&o<=t.length){let d=0;for(;;){let f=a[d];if(f===void 0){const h=A1(t,a[d-1]);f=h===-1?t.length+1:h+1,a[d]=f}if(f>o)return{line:d+1,column:o-(d>0?a[d-1]:0)+1,offset:o};d++}}}function l(o){if(o&&typeof o.line=="number"&&typeof o.column=="number"&&!Number.isNaN(o.line)&&!Number.isNaN(o.column)){for(;a.length<o.line;){const f=a[a.length-1],h=A1(t,f),m=h===-1?t.length+1:h+1;if(f===m)break;a.push(m)}const d=(o.line>1?a[o.line-2]:0)+o.column-1;if(d<a[o.line-1])return d}}}function A1(e,t){const a=e.indexOf("\r",t),s=e.indexOf(`
|
|
440
|
+
`,t);return s===-1?a:a===-1||a+1===s?s:a<s?a:s}const Ls={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},AT={}.hasOwnProperty,HM=Object.prototype;function FM(e,t){const a=t||{};return Yh({file:a.file||void 0,location:!1,schema:a.space==="svg"?us:_o,verbose:a.verbose||!1},e)}function Yh(e,t){let a;switch(t.nodeName){case"#comment":{const s=t;return a={type:"comment",value:s.data},lc(e,s,a),a}case"#document":case"#document-fragment":{const s=t,l="mode"in s?s.mode==="quirks"||s.mode==="limited-quirks":!1;if(a={type:"root",children:CT(e,t.childNodes),data:{quirksMode:l}},e.file&&e.location){const o=String(e.file),d=UM(o),f=d.toPoint(0),h=d.toPoint(o.length);a.position={start:f,end:h}}return a}case"#documentType":{const s=t;return a={type:"doctype"},lc(e,s,a),a}case"#text":{const s=t;return a={type:"text",value:s.value},lc(e,s,a),a}default:return a=zM(e,t),a}}function CT(e,t){let a=-1;const s=[];for(;++a<t.length;){const l=Yh(e,t[a]);s.push(l)}return s}function zM(e,t){const a=e.schema;e.schema=t.namespaceURI===Ls.svg?us:_o;let s=-1;const l={};for(;++s<t.attrs.length;){const f=t.attrs[s],h=(f.prefix?f.prefix+":":"")+f.name;AT.call(HM,h)||(l[h]=f.value)}const d=(e.schema.space==="svg"?PM:BM)(t.tagName,l,CT(e,t.childNodes));if(lc(e,t,d),d.tagName==="template"){const f=t,h=f.sourceCodeLocation,m=h&&h.startTag&&Di(h.startTag),b=h&&h.endTag&&Di(h.endTag),x=Yh(e,f.content);m&&b&&e.file&&(x.position={start:m.end,end:b.start}),d.content=x}return e.schema=a,d}function lc(e,t,a){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const s=qM(e,a,t.sourceCodeLocation);s&&(e.location=!0,a.position=s)}}function qM(e,t,a){const s=Di(a);if(t.type==="element"){const l=t.children[t.children.length-1];if(s&&!a.endTag&&l&&l.position&&l.position.end&&(s.end=Object.assign({},l.position.end)),e.verbose){const o={};let d;if(a.attrs)for(d in a.attrs)AT.call(a.attrs,d)&&(o[Bc(e.schema,d).property]=Di(a.attrs[d]));a.startTag;const f=Di(a.startTag),h=a.endTag?Di(a.endTag):void 0,m={opening:f};h&&(m.closing=h),m.properties=o,t.data={position:m}}}return s}function Di(e){const t=C1({line:e.startLine,column:e.startCol,offset:e.startOffset}),a=C1({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||a?{start:t,end:a}:void 0}function C1(e){return e.line&&e.column?e:void 0}const YM={},$M={}.hasOwnProperty,wT=Ly("type",{handlers:{root:KM,element:WM,text:XM,comment:ZM,doctype:QM}});function GM(e,t){const s=(t||YM).space;return wT(e,s==="svg"?us:_o)}function KM(e,t){const a={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return a.childNodes=$h(e.children,a,t),Gi(e,a),a}function VM(e,t){const a={nodeName:"#document-fragment",childNodes:[]};return a.childNodes=$h(e.children,a,t),Gi(e,a),a}function QM(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Gi(e,t),t}function XM(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Gi(e,t),t}function ZM(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Gi(e,t),t}function WM(e,t){const a=t;let s=a;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&a.space==="html"&&(s=us);const l=[];let o;if(e.properties){for(o in e.properties)if(o!=="children"&&$M.call(e.properties,o)){const h=JM(s,o,e.properties[o]);h&&l.push(h)}}const d=s.space,f={nodeName:e.tagName,tagName:e.tagName,attrs:l,namespaceURI:Ls[d],childNodes:[],parentNode:null};return f.childNodes=$h(e.children,f,s),Gi(e,f),e.tagName==="template"&&e.content&&(f.content=VM(e.content,s)),f}function JM(e,t,a){const s=Bc(e,t);if(a===!1||a===null||a===void 0||typeof a=="number"&&Number.isNaN(a)||!a&&s.boolean)return;Array.isArray(a)&&(a=s.commaSeparated?VE(a):ny(a));const l={name:s.attribute,value:a===!0?"":String(a)};if(s.space&&s.space!=="html"&&s.space!=="svg"){const o=l.name.indexOf(":");o<0?l.prefix="":(l.name=l.name.slice(o+1),l.prefix=s.attribute.slice(0,o)),l.namespace=Ls[s.space]}return l}function $h(e,t,a){let s=-1;const l=[];if(e)for(;++s<e.length;){const o=wT(e[s],a);o.parentNode=t,l.push(o)}return l}function Gi(e,t){const a=e.position;a&&a.start&&a.end&&(a.start.offset,a.end.offset,t.sourceCodeLocation={startLine:a.start.line,startCol:a.start.column,startOffset:a.start.offset,endLine:a.end.line,endCol:a.end.column,endOffset:a.end.offset})}const eD=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],tD=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),Pt="�";var I;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(I||(I={}));const Yn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function kT(e){return e>=55296&&e<=57343}function nD(e){return e>=56320&&e<=57343}function aD(e,t){return(e-55296)*1024+9216+t}function RT(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function OT(e){return e>=64976&&e<=65007||tD.has(e)}var le;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(le||(le={}));const rD=65536;class sD{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=rD,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,a){const{line:s,col:l,offset:o}=this,d=l+a,f=o+a;return{code:t,startLine:s,endLine:s,startCol:d,endCol:d,startOffset:f,endOffset:f}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const a=this.html.charCodeAt(this.pos+1);if(nD(a))return this.pos++,this._addGap(),aD(t,a)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,I.EOF;return this._err(le.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,a){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=a}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,a){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(a)return this.html.startsWith(t,this.pos);for(let s=0;s<t.length;s++)if((this.html.charCodeAt(this.pos+s)|32)!==t.charCodeAt(s))return!1;return!0}peek(t){const a=this.pos+t;if(a>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,I.EOF;const s=this.html.charCodeAt(a);return s===I.CARRIAGE_RETURN?I.LINE_FEED:s}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,I.EOF;let t=this.html.charCodeAt(this.pos);return t===I.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,I.LINE_FEED):t===I.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,kT(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===I.LINE_FEED||t===I.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){RT(t)?this._err(le.controlCharacterInInputStream):OT(t)&&this._err(le.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var tt;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(tt||(tt={}));function IT(e,t){for(let a=e.attrs.length-1;a>=0;a--)if(e.attrs[a].name===t)return e.attrs[a].value;return null}const iD=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),lD=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function oD(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=lD.get(e))!==null&&t!==void 0?t:e}var mn;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(mn||(mn={}));const uD=32;var is;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(is||(is={}));function th(e){return e>=mn.ZERO&&e<=mn.NINE}function cD(e){return e>=mn.UPPER_A&&e<=mn.UPPER_F||e>=mn.LOWER_A&&e<=mn.LOWER_F}function dD(e){return e>=mn.UPPER_A&&e<=mn.UPPER_Z||e>=mn.LOWER_A&&e<=mn.LOWER_Z||th(e)}function fD(e){return e===mn.EQUALS||dD(e)}var fn;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(fn||(fn={}));var Tr;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Tr||(Tr={}));class mD{constructor(t,a,s){this.decodeTree=t,this.emitCodePoint=a,this.errors=s,this.state=fn.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Tr.Strict}startEntity(t){this.decodeMode=t,this.state=fn.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,a){switch(this.state){case fn.EntityStart:return t.charCodeAt(a)===mn.NUM?(this.state=fn.NumericStart,this.consumed+=1,this.stateNumericStart(t,a+1)):(this.state=fn.NamedEntity,this.stateNamedEntity(t,a));case fn.NumericStart:return this.stateNumericStart(t,a);case fn.NumericDecimal:return this.stateNumericDecimal(t,a);case fn.NumericHex:return this.stateNumericHex(t,a);case fn.NamedEntity:return this.stateNamedEntity(t,a)}}stateNumericStart(t,a){return a>=t.length?-1:(t.charCodeAt(a)|uD)===mn.LOWER_X?(this.state=fn.NumericHex,this.consumed+=1,this.stateNumericHex(t,a+1)):(this.state=fn.NumericDecimal,this.stateNumericDecimal(t,a))}addToNumericResult(t,a,s,l){if(a!==s){const o=s-a;this.result=this.result*Math.pow(l,o)+Number.parseInt(t.substr(a,o),l),this.consumed+=o}}stateNumericHex(t,a){const s=a;for(;a<t.length;){const l=t.charCodeAt(a);if(th(l)||cD(l))a+=1;else return this.addToNumericResult(t,s,a,16),this.emitNumericEntity(l,3)}return this.addToNumericResult(t,s,a,16),-1}stateNumericDecimal(t,a){const s=a;for(;a<t.length;){const l=t.charCodeAt(a);if(th(l))a+=1;else return this.addToNumericResult(t,s,a,10),this.emitNumericEntity(l,2)}return this.addToNumericResult(t,s,a,10),-1}emitNumericEntity(t,a){var s;if(this.consumed<=a)return(s=this.errors)===null||s===void 0||s.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===mn.SEMI)this.consumed+=1;else if(this.decodeMode===Tr.Strict)return 0;return this.emitCodePoint(oD(this.result),this.consumed),this.errors&&(t!==mn.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,a){const{decodeTree:s}=this;let l=s[this.treeIndex],o=(l&is.VALUE_LENGTH)>>14;for(;a<t.length;a++,this.excess++){const d=t.charCodeAt(a);if(this.treeIndex=hD(s,l,this.treeIndex+Math.max(1,o),d),this.treeIndex<0)return this.result===0||this.decodeMode===Tr.Attribute&&(o===0||fD(d))?0:this.emitNotTerminatedNamedEntity();if(l=s[this.treeIndex],o=(l&is.VALUE_LENGTH)>>14,o!==0){if(d===mn.SEMI)return this.emitNamedEntityData(this.treeIndex,o,this.consumed+this.excess);this.decodeMode!==Tr.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:a,decodeTree:s}=this,l=(s[a]&is.VALUE_LENGTH)>>14;return this.emitNamedEntityData(a,l,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,a,s){const{decodeTree:l}=this;return this.emitCodePoint(a===1?l[t]&~is.VALUE_LENGTH:l[t+1],s),a===3&&this.emitCodePoint(l[t+2],s),s}end(){var t;switch(this.state){case fn.NamedEntity:return this.result!==0&&(this.decodeMode!==Tr.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case fn.NumericDecimal:return this.emitNumericEntity(0,2);case fn.NumericHex:return this.emitNumericEntity(0,3);case fn.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case fn.EntityStart:return 0}}}function hD(e,t,a,s){const l=(t&is.BRANCH_LENGTH)>>7,o=t&is.JUMP_TABLE;if(l===0)return o!==0&&s===o?a:-1;if(o){const h=s-o;return h<0||h>=l?-1:e[a+h]-1}let d=a,f=d+l-1;for(;d<=f;){const h=d+f>>>1,m=e[h];if(m<s)d=h+1;else if(m>s)f=h-1;else return e[h+l]}return-1}var be;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(be||(be={}));var Bs;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(Bs||(Bs={}));var Ta;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Ta||(Ta={}));var W;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(W||(W={}));var E;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(E||(E={}));const pD=new Map([[W.A,E.A],[W.ADDRESS,E.ADDRESS],[W.ANNOTATION_XML,E.ANNOTATION_XML],[W.APPLET,E.APPLET],[W.AREA,E.AREA],[W.ARTICLE,E.ARTICLE],[W.ASIDE,E.ASIDE],[W.B,E.B],[W.BASE,E.BASE],[W.BASEFONT,E.BASEFONT],[W.BGSOUND,E.BGSOUND],[W.BIG,E.BIG],[W.BLOCKQUOTE,E.BLOCKQUOTE],[W.BODY,E.BODY],[W.BR,E.BR],[W.BUTTON,E.BUTTON],[W.CAPTION,E.CAPTION],[W.CENTER,E.CENTER],[W.CODE,E.CODE],[W.COL,E.COL],[W.COLGROUP,E.COLGROUP],[W.DD,E.DD],[W.DESC,E.DESC],[W.DETAILS,E.DETAILS],[W.DIALOG,E.DIALOG],[W.DIR,E.DIR],[W.DIV,E.DIV],[W.DL,E.DL],[W.DT,E.DT],[W.EM,E.EM],[W.EMBED,E.EMBED],[W.FIELDSET,E.FIELDSET],[W.FIGCAPTION,E.FIGCAPTION],[W.FIGURE,E.FIGURE],[W.FONT,E.FONT],[W.FOOTER,E.FOOTER],[W.FOREIGN_OBJECT,E.FOREIGN_OBJECT],[W.FORM,E.FORM],[W.FRAME,E.FRAME],[W.FRAMESET,E.FRAMESET],[W.H1,E.H1],[W.H2,E.H2],[W.H3,E.H3],[W.H4,E.H4],[W.H5,E.H5],[W.H6,E.H6],[W.HEAD,E.HEAD],[W.HEADER,E.HEADER],[W.HGROUP,E.HGROUP],[W.HR,E.HR],[W.HTML,E.HTML],[W.I,E.I],[W.IMG,E.IMG],[W.IMAGE,E.IMAGE],[W.INPUT,E.INPUT],[W.IFRAME,E.IFRAME],[W.KEYGEN,E.KEYGEN],[W.LABEL,E.LABEL],[W.LI,E.LI],[W.LINK,E.LINK],[W.LISTING,E.LISTING],[W.MAIN,E.MAIN],[W.MALIGNMARK,E.MALIGNMARK],[W.MARQUEE,E.MARQUEE],[W.MATH,E.MATH],[W.MENU,E.MENU],[W.META,E.META],[W.MGLYPH,E.MGLYPH],[W.MI,E.MI],[W.MO,E.MO],[W.MN,E.MN],[W.MS,E.MS],[W.MTEXT,E.MTEXT],[W.NAV,E.NAV],[W.NOBR,E.NOBR],[W.NOFRAMES,E.NOFRAMES],[W.NOEMBED,E.NOEMBED],[W.NOSCRIPT,E.NOSCRIPT],[W.OBJECT,E.OBJECT],[W.OL,E.OL],[W.OPTGROUP,E.OPTGROUP],[W.OPTION,E.OPTION],[W.P,E.P],[W.PARAM,E.PARAM],[W.PLAINTEXT,E.PLAINTEXT],[W.PRE,E.PRE],[W.RB,E.RB],[W.RP,E.RP],[W.RT,E.RT],[W.RTC,E.RTC],[W.RUBY,E.RUBY],[W.S,E.S],[W.SCRIPT,E.SCRIPT],[W.SEARCH,E.SEARCH],[W.SECTION,E.SECTION],[W.SELECT,E.SELECT],[W.SOURCE,E.SOURCE],[W.SMALL,E.SMALL],[W.SPAN,E.SPAN],[W.STRIKE,E.STRIKE],[W.STRONG,E.STRONG],[W.STYLE,E.STYLE],[W.SUB,E.SUB],[W.SUMMARY,E.SUMMARY],[W.SUP,E.SUP],[W.TABLE,E.TABLE],[W.TBODY,E.TBODY],[W.TEMPLATE,E.TEMPLATE],[W.TEXTAREA,E.TEXTAREA],[W.TFOOT,E.TFOOT],[W.TD,E.TD],[W.TH,E.TH],[W.THEAD,E.THEAD],[W.TITLE,E.TITLE],[W.TR,E.TR],[W.TRACK,E.TRACK],[W.TT,E.TT],[W.U,E.U],[W.UL,E.UL],[W.SVG,E.SVG],[W.VAR,E.VAR],[W.WBR,E.WBR],[W.XMP,E.XMP]]);function Ki(e){var t;return(t=pD.get(e))!==null&&t!==void 0?t:E.UNKNOWN}const xe=E,gD={[be.HTML]:new Set([xe.ADDRESS,xe.APPLET,xe.AREA,xe.ARTICLE,xe.ASIDE,xe.BASE,xe.BASEFONT,xe.BGSOUND,xe.BLOCKQUOTE,xe.BODY,xe.BR,xe.BUTTON,xe.CAPTION,xe.CENTER,xe.COL,xe.COLGROUP,xe.DD,xe.DETAILS,xe.DIR,xe.DIV,xe.DL,xe.DT,xe.EMBED,xe.FIELDSET,xe.FIGCAPTION,xe.FIGURE,xe.FOOTER,xe.FORM,xe.FRAME,xe.FRAMESET,xe.H1,xe.H2,xe.H3,xe.H4,xe.H5,xe.H6,xe.HEAD,xe.HEADER,xe.HGROUP,xe.HR,xe.HTML,xe.IFRAME,xe.IMG,xe.INPUT,xe.LI,xe.LINK,xe.LISTING,xe.MAIN,xe.MARQUEE,xe.MENU,xe.META,xe.NAV,xe.NOEMBED,xe.NOFRAMES,xe.NOSCRIPT,xe.OBJECT,xe.OL,xe.P,xe.PARAM,xe.PLAINTEXT,xe.PRE,xe.SCRIPT,xe.SECTION,xe.SELECT,xe.SOURCE,xe.STYLE,xe.SUMMARY,xe.TABLE,xe.TBODY,xe.TD,xe.TEMPLATE,xe.TEXTAREA,xe.TFOOT,xe.TH,xe.THEAD,xe.TITLE,xe.TR,xe.TRACK,xe.UL,xe.WBR,xe.XMP]),[be.MATHML]:new Set([xe.MI,xe.MO,xe.MN,xe.MS,xe.MTEXT,xe.ANNOTATION_XML]),[be.SVG]:new Set([xe.TITLE,xe.FOREIGN_OBJECT,xe.DESC]),[be.XLINK]:new Set,[be.XML]:new Set,[be.XMLNS]:new Set},nh=new Set([xe.H1,xe.H2,xe.H3,xe.H4,xe.H5,xe.H6]);W.STYLE,W.SCRIPT,W.XMP,W.IFRAME,W.NOEMBED,W.NOFRAMES,W.PLAINTEXT;var j;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(j||(j={}));const Xt={DATA:j.DATA,RCDATA:j.RCDATA,RAWTEXT:j.RAWTEXT,SCRIPT_DATA:j.SCRIPT_DATA,PLAINTEXT:j.PLAINTEXT,CDATA_SECTION:j.CDATA_SECTION};function bD(e){return e>=I.DIGIT_0&&e<=I.DIGIT_9}function Jl(e){return e>=I.LATIN_CAPITAL_A&&e<=I.LATIN_CAPITAL_Z}function xD(e){return e>=I.LATIN_SMALL_A&&e<=I.LATIN_SMALL_Z}function as(e){return xD(e)||Jl(e)}function w1(e){return as(e)||bD(e)}function nc(e){return e+32}function MT(e){return e===I.SPACE||e===I.LINE_FEED||e===I.TABULATION||e===I.FORM_FEED}function k1(e){return MT(e)||e===I.SOLIDUS||e===I.GREATER_THAN_SIGN}function ED(e){return e===I.NULL?le.nullCharacterReference:e>1114111?le.characterReferenceOutsideUnicodeRange:kT(e)?le.surrogateCharacterReference:OT(e)?le.noncharacterCharacterReference:RT(e)||e===I.CARRIAGE_RETURN?le.controlCharacterReference:null}class yD{constructor(t,a){this.options=t,this.handler=a,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=j.DATA,this.returnState=j.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new sD(a),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new mD(iD,(s,l)=>{this.preprocessor.pos=this.entityStartPos+l-1,this._flushCodePointConsumedAsCharacterReference(s)},a.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(le.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:s=>{this._err(le.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+s)},validateNumericCharacterReference:s=>{const l=ED(s);l&&this._err(l,1)}}:void 0)}_err(t,a=0){var s,l;(l=(s=this.handler).onParseError)===null||l===void 0||l.call(s,this.preprocessor.getError(t,a))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t==null||t())}write(t,a,s){this.active=!0,this.preprocessor.write(t,a),this._runParsingLoop(),this.paused||s==null||s()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let a=0;a<t;a++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,a){return this.preprocessor.startsWith(t,a)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:tt.START_TAG,tagName:"",tagID:E.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:tt.END_TAG,tagName:"",tagID:E.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:tt.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:tt.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,a){this.currentCharacterToken={type:t,chars:a,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,a;const s=this.currentToken;if(IT(s,this.currentAttr.name)===null){if(s.attrs.push(this.currentAttr),s.location&&this.currentLocation){const l=(t=(a=s.location).attrs)!==null&&t!==void 0?t:a.attrs=Object.create(null);l[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(le.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=Ki(t.tagName),t.type===tt.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(le.endTagWithAttributes),t.selfClosing&&this._err(le.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case tt.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case tt.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case tt.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:tt.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,a){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=a;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,a)}_emitCodePoint(t){const a=MT(t)?tt.WHITESPACE_CHARACTER:t===I.NULL?tt.NULL_CHARACTER:tt.CHARACTER;this._appendCharToCurrentCharacterToken(a,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(tt.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=j.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Tr.Attribute:Tr.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===j.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===j.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===j.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case j.DATA:{this._stateData(t);break}case j.RCDATA:{this._stateRcdata(t);break}case j.RAWTEXT:{this._stateRawtext(t);break}case j.SCRIPT_DATA:{this._stateScriptData(t);break}case j.PLAINTEXT:{this._statePlaintext(t);break}case j.TAG_OPEN:{this._stateTagOpen(t);break}case j.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case j.TAG_NAME:{this._stateTagName(t);break}case j.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case j.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case j.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case j.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case j.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case j.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case j.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case j.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case j.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case j.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case j.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case j.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case j.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case j.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case j.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case j.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case j.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case j.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case j.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case j.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case j.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case j.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case j.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case j.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case j.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case j.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case j.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case j.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case j.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case j.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case j.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case j.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case j.BOGUS_COMMENT:{this._stateBogusComment(t);break}case j.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case j.COMMENT_START:{this._stateCommentStart(t);break}case j.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case j.COMMENT:{this._stateComment(t);break}case j.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case j.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case j.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case j.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case j.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case j.COMMENT_END:{this._stateCommentEnd(t);break}case j.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case j.DOCTYPE:{this._stateDoctype(t);break}case j.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case j.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case j.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case j.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case j.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case j.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case j.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case j.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case j.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case j.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case j.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case j.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case j.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case j.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case j.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case j.CDATA_SECTION:{this._stateCdataSection(t);break}case j.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case j.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case j.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case j.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case I.LESS_THAN_SIGN:{this.state=j.TAG_OPEN;break}case I.AMPERSAND:{this._startCharacterReference();break}case I.NULL:{this._err(le.unexpectedNullCharacter),this._emitCodePoint(t);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case I.AMPERSAND:{this._startCharacterReference();break}case I.LESS_THAN_SIGN:{this.state=j.RCDATA_LESS_THAN_SIGN;break}case I.NULL:{this._err(le.unexpectedNullCharacter),this._emitChars(Pt);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case I.LESS_THAN_SIGN:{this.state=j.RAWTEXT_LESS_THAN_SIGN;break}case I.NULL:{this._err(le.unexpectedNullCharacter),this._emitChars(Pt);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case I.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_LESS_THAN_SIGN;break}case I.NULL:{this._err(le.unexpectedNullCharacter),this._emitChars(Pt);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case I.NULL:{this._err(le.unexpectedNullCharacter),this._emitChars(Pt);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(as(t))this._createStartTagToken(),this.state=j.TAG_NAME,this._stateTagName(t);else switch(t){case I.EXCLAMATION_MARK:{this.state=j.MARKUP_DECLARATION_OPEN;break}case I.SOLIDUS:{this.state=j.END_TAG_OPEN;break}case I.QUESTION_MARK:{this._err(le.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=j.BOGUS_COMMENT,this._stateBogusComment(t);break}case I.EOF:{this._err(le.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(le.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=j.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(as(t))this._createEndTagToken(),this.state=j.TAG_NAME,this._stateTagName(t);else switch(t){case I.GREATER_THAN_SIGN:{this._err(le.missingEndTagName),this.state=j.DATA;break}case I.EOF:{this._err(le.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(le.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=j.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const a=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=j.BEFORE_ATTRIBUTE_NAME;break}case I.SOLIDUS:{this.state=j.SELF_CLOSING_START_TAG;break}case I.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentTagToken();break}case I.NULL:{this._err(le.unexpectedNullCharacter),a.tagName+=Pt;break}case I.EOF:{this._err(le.eofInTag),this._emitEOFToken();break}default:a.tagName+=String.fromCodePoint(Jl(t)?nc(t):t)}}_stateRcdataLessThanSign(t){t===I.SOLIDUS?this.state=j.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=j.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){as(t)?(this.state=j.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=j.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const a=this.currentToken;switch(a.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=j.BEFORE_ATTRIBUTE_NAME,!1;case I.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=j.SELF_CLOSING_START_TAG,!1;case I.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=j.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=j.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===I.SOLIDUS?this.state=j.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=j.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){as(t)?(this.state=j.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=j.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=j.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case I.SOLIDUS:{this.state=j.SCRIPT_DATA_END_TAG_OPEN;break}case I.EXCLAMATION_MARK:{this.state=j.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=j.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){as(t)?(this.state=j.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=j.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=j.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===I.HYPHEN_MINUS?(this.state=j.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=j.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===I.HYPHEN_MINUS?(this.state=j.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=j.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case I.HYPHEN_MINUS:{this.state=j.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case I.NULL:{this._err(le.unexpectedNullCharacter),this._emitChars(Pt);break}case I.EOF:{this._err(le.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case I.HYPHEN_MINUS:{this.state=j.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case I.NULL:{this._err(le.unexpectedNullCharacter),this.state=j.SCRIPT_DATA_ESCAPED,this._emitChars(Pt);break}case I.EOF:{this._err(le.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=j.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case I.HYPHEN_MINUS:{this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case I.GREATER_THAN_SIGN:{this.state=j.SCRIPT_DATA,this._emitChars(">");break}case I.NULL:{this._err(le.unexpectedNullCharacter),this.state=j.SCRIPT_DATA_ESCAPED,this._emitChars(Pt);break}case I.EOF:{this._err(le.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=j.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===I.SOLIDUS?this.state=j.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:as(t)?(this._emitChars("<"),this.state=j.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=j.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){as(t)?(this.state=j.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=j.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=j.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Yn.SCRIPT,!1)&&k1(this.preprocessor.peek(Yn.SCRIPT.length))){this._emitCodePoint(t);for(let a=0;a<Yn.SCRIPT.length;a++)this._emitCodePoint(this._consume());this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=j.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case I.HYPHEN_MINUS:{this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case I.NULL:{this._err(le.unexpectedNullCharacter),this._emitChars(Pt);break}case I.EOF:{this._err(le.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case I.HYPHEN_MINUS:{this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case I.NULL:{this._err(le.unexpectedNullCharacter),this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Pt);break}case I.EOF:{this._err(le.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case I.HYPHEN_MINUS:{this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case I.GREATER_THAN_SIGN:{this.state=j.SCRIPT_DATA,this._emitChars(">");break}case I.NULL:{this._err(le.unexpectedNullCharacter),this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Pt);break}case I.EOF:{this._err(le.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===I.SOLIDUS?(this.state=j.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Yn.SCRIPT,!1)&&k1(this.preprocessor.peek(Yn.SCRIPT.length))){this._emitCodePoint(t);for(let a=0;a<Yn.SCRIPT.length;a++)this._emitCodePoint(this._consume());this.state=j.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.SOLIDUS:case I.GREATER_THAN_SIGN:case I.EOF:{this.state=j.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case I.EQUALS_SIGN:{this._err(le.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=j.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=j.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:case I.SOLIDUS:case I.GREATER_THAN_SIGN:case I.EOF:{this._leaveAttrName(),this.state=j.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case I.EQUALS_SIGN:{this._leaveAttrName(),this.state=j.BEFORE_ATTRIBUTE_VALUE;break}case I.QUOTATION_MARK:case I.APOSTROPHE:case I.LESS_THAN_SIGN:{this._err(le.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case I.NULL:{this._err(le.unexpectedNullCharacter),this.currentAttr.name+=Pt;break}default:this.currentAttr.name+=String.fromCodePoint(Jl(t)?nc(t):t)}}_stateAfterAttributeName(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.SOLIDUS:{this.state=j.SELF_CLOSING_START_TAG;break}case I.EQUALS_SIGN:{this.state=j.BEFORE_ATTRIBUTE_VALUE;break}case I.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentTagToken();break}case I.EOF:{this._err(le.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=j.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.QUOTATION_MARK:{this.state=j.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case I.APOSTROPHE:{this.state=j.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(le.missingAttributeValue),this.state=j.DATA,this.emitCurrentTagToken();break}default:this.state=j.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case I.QUOTATION_MARK:{this.state=j.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case I.AMPERSAND:{this._startCharacterReference();break}case I.NULL:{this._err(le.unexpectedNullCharacter),this.currentAttr.value+=Pt;break}case I.EOF:{this._err(le.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case I.APOSTROPHE:{this.state=j.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case I.AMPERSAND:{this._startCharacterReference();break}case I.NULL:{this._err(le.unexpectedNullCharacter),this.currentAttr.value+=Pt;break}case I.EOF:{this._err(le.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this._leaveAttrValue(),this.state=j.BEFORE_ATTRIBUTE_NAME;break}case I.AMPERSAND:{this._startCharacterReference();break}case I.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=j.DATA,this.emitCurrentTagToken();break}case I.NULL:{this._err(le.unexpectedNullCharacter),this.currentAttr.value+=Pt;break}case I.QUOTATION_MARK:case I.APOSTROPHE:case I.LESS_THAN_SIGN:case I.EQUALS_SIGN:case I.GRAVE_ACCENT:{this._err(le.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case I.EOF:{this._err(le.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this._leaveAttrValue(),this.state=j.BEFORE_ATTRIBUTE_NAME;break}case I.SOLIDUS:{this._leaveAttrValue(),this.state=j.SELF_CLOSING_START_TAG;break}case I.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=j.DATA,this.emitCurrentTagToken();break}case I.EOF:{this._err(le.eofInTag),this._emitEOFToken();break}default:this._err(le.missingWhitespaceBetweenAttributes),this.state=j.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case I.GREATER_THAN_SIGN:{const a=this.currentToken;a.selfClosing=!0,this.state=j.DATA,this.emitCurrentTagToken();break}case I.EOF:{this._err(le.eofInTag),this._emitEOFToken();break}default:this._err(le.unexpectedSolidusInTag),this.state=j.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const a=this.currentToken;switch(t){case I.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentComment(a);break}case I.EOF:{this.emitCurrentComment(a),this._emitEOFToken();break}case I.NULL:{this._err(le.unexpectedNullCharacter),a.data+=Pt;break}default:a.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Yn.DASH_DASH,!0)?(this._createCommentToken(Yn.DASH_DASH.length+1),this.state=j.COMMENT_START):this._consumeSequenceIfMatch(Yn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Yn.DOCTYPE.length+1),this.state=j.DOCTYPE):this._consumeSequenceIfMatch(Yn.CDATA_START,!0)?this.inForeignNode?this.state=j.CDATA_SECTION:(this._err(le.cdataInHtmlContent),this._createCommentToken(Yn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=j.BOGUS_COMMENT):this._ensureHibernation()||(this._err(le.incorrectlyOpenedComment),this._createCommentToken(2),this.state=j.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case I.HYPHEN_MINUS:{this.state=j.COMMENT_START_DASH;break}case I.GREATER_THAN_SIGN:{this._err(le.abruptClosingOfEmptyComment),this.state=j.DATA;const a=this.currentToken;this.emitCurrentComment(a);break}default:this.state=j.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const a=this.currentToken;switch(t){case I.HYPHEN_MINUS:{this.state=j.COMMENT_END;break}case I.GREATER_THAN_SIGN:{this._err(le.abruptClosingOfEmptyComment),this.state=j.DATA,this.emitCurrentComment(a);break}case I.EOF:{this._err(le.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+="-",this.state=j.COMMENT,this._stateComment(t)}}_stateComment(t){const a=this.currentToken;switch(t){case I.HYPHEN_MINUS:{this.state=j.COMMENT_END_DASH;break}case I.LESS_THAN_SIGN:{a.data+="<",this.state=j.COMMENT_LESS_THAN_SIGN;break}case I.NULL:{this._err(le.unexpectedNullCharacter),a.data+=Pt;break}case I.EOF:{this._err(le.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const a=this.currentToken;switch(t){case I.EXCLAMATION_MARK:{a.data+="!",this.state=j.COMMENT_LESS_THAN_SIGN_BANG;break}case I.LESS_THAN_SIGN:{a.data+="<";break}default:this.state=j.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===I.HYPHEN_MINUS?this.state=j.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=j.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===I.HYPHEN_MINUS?this.state=j.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=j.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==I.GREATER_THAN_SIGN&&t!==I.EOF&&this._err(le.nestedComment),this.state=j.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const a=this.currentToken;switch(t){case I.HYPHEN_MINUS:{this.state=j.COMMENT_END;break}case I.EOF:{this._err(le.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+="-",this.state=j.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const a=this.currentToken;switch(t){case I.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentComment(a);break}case I.EXCLAMATION_MARK:{this.state=j.COMMENT_END_BANG;break}case I.HYPHEN_MINUS:{a.data+="-";break}case I.EOF:{this._err(le.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+="--",this.state=j.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const a=this.currentToken;switch(t){case I.HYPHEN_MINUS:{a.data+="--!",this.state=j.COMMENT_END_DASH;break}case I.GREATER_THAN_SIGN:{this._err(le.incorrectlyClosedComment),this.state=j.DATA,this.emitCurrentComment(a);break}case I.EOF:{this._err(le.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+="--!",this.state=j.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=j.BEFORE_DOCTYPE_NAME;break}case I.GREATER_THAN_SIGN:{this.state=j.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case I.EOF:{this._err(le.eofInDoctype),this._createDoctypeToken(null);const a=this.currentToken;a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(le.missingWhitespaceBeforeDoctypeName),this.state=j.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Jl(t))this._createDoctypeToken(String.fromCharCode(nc(t))),this.state=j.DOCTYPE_NAME;else switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.NULL:{this._err(le.unexpectedNullCharacter),this._createDoctypeToken(Pt),this.state=j.DOCTYPE_NAME;break}case I.GREATER_THAN_SIGN:{this._err(le.missingDoctypeName),this._createDoctypeToken(null);const a=this.currentToken;a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=j.DATA;break}case I.EOF:{this._err(le.eofInDoctype),this._createDoctypeToken(null);const a=this.currentToken;a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=j.DOCTYPE_NAME}}_stateDoctypeName(t){const a=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=j.AFTER_DOCTYPE_NAME;break}case I.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentDoctype(a);break}case I.NULL:{this._err(le.unexpectedNullCharacter),a.name+=Pt;break}case I.EOF:{this._err(le.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:a.name+=String.fromCodePoint(Jl(t)?nc(t):t)}}_stateAfterDoctypeName(t){const a=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentDoctype(a);break}case I.EOF:{this._err(le.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Yn.PUBLIC,!1)?this.state=j.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Yn.SYSTEM,!1)?this.state=j.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(le.invalidCharacterSequenceAfterDoctypeName),a.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const a=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=j.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case I.QUOTATION_MARK:{this._err(le.missingWhitespaceAfterDoctypePublicKeyword),a.publicId="",this.state=j.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{this._err(le.missingWhitespaceAfterDoctypePublicKeyword),a.publicId="",this.state=j.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(le.missingDoctypePublicIdentifier),a.forceQuirks=!0,this.state=j.DATA,this.emitCurrentDoctype(a);break}case I.EOF:{this._err(le.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(le.missingQuoteBeforeDoctypePublicIdentifier),a.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const a=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.QUOTATION_MARK:{a.publicId="",this.state=j.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{a.publicId="",this.state=j.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(le.missingDoctypePublicIdentifier),a.forceQuirks=!0,this.state=j.DATA,this.emitCurrentDoctype(a);break}case I.EOF:{this._err(le.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(le.missingQuoteBeforeDoctypePublicIdentifier),a.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const a=this.currentToken;switch(t){case I.QUOTATION_MARK:{this.state=j.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case I.NULL:{this._err(le.unexpectedNullCharacter),a.publicId+=Pt;break}case I.GREATER_THAN_SIGN:{this._err(le.abruptDoctypePublicIdentifier),a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=j.DATA;break}case I.EOF:{this._err(le.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:a.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const a=this.currentToken;switch(t){case I.APOSTROPHE:{this.state=j.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case I.NULL:{this._err(le.unexpectedNullCharacter),a.publicId+=Pt;break}case I.GREATER_THAN_SIGN:{this._err(le.abruptDoctypePublicIdentifier),a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=j.DATA;break}case I.EOF:{this._err(le.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:a.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const a=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=j.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case I.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentDoctype(a);break}case I.QUOTATION_MARK:{this._err(le.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),a.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{this._err(le.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),a.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case I.EOF:{this._err(le.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(le.missingQuoteBeforeDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const a=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.GREATER_THAN_SIGN:{this.emitCurrentDoctype(a),this.state=j.DATA;break}case I.QUOTATION_MARK:{a.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{a.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case I.EOF:{this._err(le.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(le.missingQuoteBeforeDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const a=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=j.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case I.QUOTATION_MARK:{this._err(le.missingWhitespaceAfterDoctypeSystemKeyword),a.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{this._err(le.missingWhitespaceAfterDoctypeSystemKeyword),a.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(le.missingDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=j.DATA,this.emitCurrentDoctype(a);break}case I.EOF:{this._err(le.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(le.missingQuoteBeforeDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const a=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.QUOTATION_MARK:{a.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{a.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(le.missingDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=j.DATA,this.emitCurrentDoctype(a);break}case I.EOF:{this._err(le.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(le.missingQuoteBeforeDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const a=this.currentToken;switch(t){case I.QUOTATION_MARK:{this.state=j.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case I.NULL:{this._err(le.unexpectedNullCharacter),a.systemId+=Pt;break}case I.GREATER_THAN_SIGN:{this._err(le.abruptDoctypeSystemIdentifier),a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=j.DATA;break}case I.EOF:{this._err(le.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:a.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const a=this.currentToken;switch(t){case I.APOSTROPHE:{this.state=j.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case I.NULL:{this._err(le.unexpectedNullCharacter),a.systemId+=Pt;break}case I.GREATER_THAN_SIGN:{this._err(le.abruptDoctypeSystemIdentifier),a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=j.DATA;break}case I.EOF:{this._err(le.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:a.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const a=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.GREATER_THAN_SIGN:{this.emitCurrentDoctype(a),this.state=j.DATA;break}case I.EOF:{this._err(le.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(le.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const a=this.currentToken;switch(t){case I.GREATER_THAN_SIGN:{this.emitCurrentDoctype(a),this.state=j.DATA;break}case I.NULL:{this._err(le.unexpectedNullCharacter);break}case I.EOF:{this.emitCurrentDoctype(a),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case I.RIGHT_SQUARE_BRACKET:{this.state=j.CDATA_SECTION_BRACKET;break}case I.EOF:{this._err(le.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===I.RIGHT_SQUARE_BRACKET?this.state=j.CDATA_SECTION_END:(this._emitChars("]"),this.state=j.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case I.GREATER_THAN_SIGN:{this.state=j.DATA;break}case I.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=j.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(I.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&w1(this.preprocessor.peek(1))?j.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){w1(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===I.SEMICOLON&&this._err(le.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const DT=new Set([E.DD,E.DT,E.LI,E.OPTGROUP,E.OPTION,E.P,E.RB,E.RP,E.RT,E.RTC]),R1=new Set([...DT,E.CAPTION,E.COLGROUP,E.TBODY,E.TD,E.TFOOT,E.TH,E.THEAD,E.TR]),Sc=new Set([E.APPLET,E.CAPTION,E.HTML,E.MARQUEE,E.OBJECT,E.TABLE,E.TD,E.TEMPLATE,E.TH]),TD=new Set([...Sc,E.OL,E.UL]),_D=new Set([...Sc,E.BUTTON]),O1=new Set([E.ANNOTATION_XML,E.MI,E.MN,E.MO,E.MS,E.MTEXT]),I1=new Set([E.DESC,E.FOREIGN_OBJECT,E.TITLE]),ND=new Set([E.TR,E.TEMPLATE,E.HTML]),SD=new Set([E.TBODY,E.TFOOT,E.THEAD,E.TEMPLATE,E.HTML]),vD=new Set([E.TABLE,E.TEMPLATE,E.HTML]),AD=new Set([E.TD,E.TH]);class CD{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,a,s){this.treeAdapter=a,this.handler=s,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=E.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===E.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===be.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,a){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=a,this.currentTagId=a,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,a,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,a){const s=this._indexOf(t);this.items[s]=a,s===this.stackTop&&(this.current=a)}insertAfter(t,a,s){const l=this._indexOf(t)+1;this.items.splice(l,0,a),this.tagIDs.splice(l,0,s),this.stackTop++,l===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,l===this.stackTop)}popUntilTagNamePopped(t){let a=this.stackTop+1;do a=this.tagIDs.lastIndexOf(t,a-1);while(a>0&&this.treeAdapter.getNamespaceURI(this.items[a])!==be.HTML);this.shortenToLength(Math.max(a,0))}shortenToLength(t){for(;this.stackTop>=t;){const a=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(a,this.stackTop<t)}}popUntilElementPopped(t){const a=this._indexOf(t);this.shortenToLength(Math.max(a,0))}popUntilPopped(t,a){const s=this._indexOfTagNames(t,a);this.shortenToLength(Math.max(s,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(nh,be.HTML)}popUntilTableCellPopped(){this.popUntilPopped(AD,be.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,a){for(let s=this.stackTop;s>=0;s--)if(t.has(this.tagIDs[s])&&this.treeAdapter.getNamespaceURI(this.items[s])===a)return s;return-1}clearBackTo(t,a){const s=this._indexOfTagNames(t,a);this.shortenToLength(s+1)}clearBackToTableContext(){this.clearBackTo(vD,be.HTML)}clearBackToTableBodyContext(){this.clearBackTo(SD,be.HTML)}clearBackToTableRowContext(){this.clearBackTo(ND,be.HTML)}remove(t){const a=this._indexOf(t);a>=0&&(a===this.stackTop?this.pop():(this.items.splice(a,1),this.tagIDs.splice(a,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===E.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const a=this._indexOf(t)-1;return a>=0?this.items[a]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===E.HTML}hasInDynamicScope(t,a){for(let s=this.stackTop;s>=0;s--){const l=this.tagIDs[s];switch(this.treeAdapter.getNamespaceURI(this.items[s])){case be.HTML:{if(l===t)return!0;if(a.has(l))return!1;break}case be.SVG:{if(I1.has(l))return!1;break}case be.MATHML:{if(O1.has(l))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Sc)}hasInListItemScope(t){return this.hasInDynamicScope(t,TD)}hasInButtonScope(t){return this.hasInDynamicScope(t,_D)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const a=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case be.HTML:{if(nh.has(a))return!0;if(Sc.has(a))return!1;break}case be.SVG:{if(I1.has(a))return!1;break}case be.MATHML:{if(O1.has(a))return!1;break}}}return!0}hasInTableScope(t){for(let a=this.stackTop;a>=0;a--)if(this.treeAdapter.getNamespaceURI(this.items[a])===be.HTML)switch(this.tagIDs[a]){case t:return!0;case E.TABLE:case E.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===be.HTML)switch(this.tagIDs[t]){case E.TBODY:case E.THEAD:case E.TFOOT:return!0;case E.TABLE:case E.HTML:return!1}return!0}hasInSelectScope(t){for(let a=this.stackTop;a>=0;a--)if(this.treeAdapter.getNamespaceURI(this.items[a])===be.HTML)switch(this.tagIDs[a]){case t:return!0;case E.OPTION:case E.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&DT.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&R1.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&R1.has(this.currentTagId);)this.pop()}}const Rm=3;var Ka;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Ka||(Ka={}));const M1={type:Ka.Marker};class wD{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,a){const s=[],l=a.length,o=this.treeAdapter.getTagName(t),d=this.treeAdapter.getNamespaceURI(t);for(let f=0;f<this.entries.length;f++){const h=this.entries[f];if(h.type===Ka.Marker)break;const{element:m}=h;if(this.treeAdapter.getTagName(m)===o&&this.treeAdapter.getNamespaceURI(m)===d){const b=this.treeAdapter.getAttrList(m);b.length===l&&s.push({idx:f,attrs:b})}}return s}_ensureNoahArkCondition(t){if(this.entries.length<Rm)return;const a=this.treeAdapter.getAttrList(t),s=this._getNoahArkConditionCandidates(t,a);if(s.length<Rm)return;const l=new Map(a.map(d=>[d.name,d.value]));let o=0;for(let d=0;d<s.length;d++){const f=s[d];f.attrs.every(h=>l.get(h.name)===h.value)&&(o+=1,o>=Rm&&this.entries.splice(f.idx,1))}}insertMarker(){this.entries.unshift(M1)}pushElement(t,a){this._ensureNoahArkCondition(t),this.entries.unshift({type:Ka.Element,element:t,token:a})}insertElementAfterBookmark(t,a){const s=this.entries.indexOf(this.bookmark);this.entries.splice(s,0,{type:Ka.Element,element:t,token:a})}removeEntry(t){const a=this.entries.indexOf(t);a!==-1&&this.entries.splice(a,1)}clearToLastMarker(){const t=this.entries.indexOf(M1);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const a=this.entries.find(s=>s.type===Ka.Marker||this.treeAdapter.getTagName(s.element)===t);return a&&a.type===Ka.Element?a:null}getElementEntry(t){return this.entries.find(a=>a.type===Ka.Element&&a.element===t)}}const rs={createDocument(){return{nodeName:"#document",mode:Ta.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,a){return{nodeName:e,tagName:e,attrs:a,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,a){const s=e.childNodes.indexOf(a);e.childNodes.splice(s,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,a,s){const l=e.childNodes.find(o=>o.nodeName==="#documentType");if(l)l.name=t,l.publicId=a,l.systemId=s;else{const o={nodeName:"#documentType",name:t,publicId:a,systemId:s,parentNode:null};rs.appendChild(e,o)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const a=e.childNodes[e.childNodes.length-1];if(rs.isTextNode(a)){a.value+=t;return}}rs.appendChild(e,rs.createTextNode(t))},insertTextBefore(e,t,a){const s=e.childNodes[e.childNodes.indexOf(a)-1];s&&rs.isTextNode(s)?s.value+=t:rs.insertBefore(e,rs.createTextNode(t),a)},adoptAttributes(e,t){const a=new Set(e.attrs.map(s=>s.name));for(let s=0;s<t.length;s++)a.has(t[s].name)||e.attrs.push(t[s])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},LT="html",kD="about:legacy-compat",RD="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",jT=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],OD=[...jT,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],ID=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),BT=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],MD=[...BT,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function D1(e,t){return t.some(a=>e.startsWith(a))}function DD(e){return e.name===LT&&e.publicId===null&&(e.systemId===null||e.systemId===kD)}function LD(e){if(e.name!==LT)return Ta.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===RD)return Ta.QUIRKS;let{publicId:a}=e;if(a!==null){if(a=a.toLowerCase(),ID.has(a))return Ta.QUIRKS;let s=t===null?OD:jT;if(D1(a,s))return Ta.QUIRKS;if(s=t===null?BT:MD,D1(a,s))return Ta.LIMITED_QUIRKS}return Ta.NO_QUIRKS}const L1={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},jD="definitionurl",BD="definitionURL",PD=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),UD=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:be.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:be.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:be.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:be.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:be.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:be.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:be.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:be.XML}],["xml:space",{prefix:"xml",name:"space",namespace:be.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:be.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:be.XMLNS}]]),HD=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),FD=new Set([E.B,E.BIG,E.BLOCKQUOTE,E.BODY,E.BR,E.CENTER,E.CODE,E.DD,E.DIV,E.DL,E.DT,E.EM,E.EMBED,E.H1,E.H2,E.H3,E.H4,E.H5,E.H6,E.HEAD,E.HR,E.I,E.IMG,E.LI,E.LISTING,E.MENU,E.META,E.NOBR,E.OL,E.P,E.PRE,E.RUBY,E.S,E.SMALL,E.SPAN,E.STRONG,E.STRIKE,E.SUB,E.SUP,E.TABLE,E.TT,E.U,E.UL,E.VAR]);function zD(e){const t=e.tagID;return t===E.FONT&&e.attrs.some(({name:s})=>s===Bs.COLOR||s===Bs.SIZE||s===Bs.FACE)||FD.has(t)}function PT(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===jD){e.attrs[t].name=BD;break}}function UT(e){for(let t=0;t<e.attrs.length;t++){const a=PD.get(e.attrs[t].name);a!=null&&(e.attrs[t].name=a)}}function Gh(e){for(let t=0;t<e.attrs.length;t++){const a=UD.get(e.attrs[t].name);a&&(e.attrs[t].prefix=a.prefix,e.attrs[t].name=a.name,e.attrs[t].namespace=a.namespace)}}function qD(e){const t=HD.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Ki(e.tagName))}function YD(e,t){return t===be.MATHML&&(e===E.MI||e===E.MO||e===E.MN||e===E.MS||e===E.MTEXT)}function $D(e,t,a){if(t===be.MATHML&&e===E.ANNOTATION_XML){for(let s=0;s<a.length;s++)if(a[s].name===Bs.ENCODING){const l=a[s].value.toLowerCase();return l===L1.TEXT_HTML||l===L1.APPLICATION_XML}}return t===be.SVG&&(e===E.FOREIGN_OBJECT||e===E.DESC||e===E.TITLE)}function GD(e,t,a,s){return(!s||s===be.HTML)&&$D(e,t,a)||(!s||s===be.MATHML)&&YD(e,t)}const KD="hidden",VD=8,QD=3;var F;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(F||(F={}));const XD={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},HT=new Set([E.TABLE,E.TBODY,E.TFOOT,E.THEAD,E.TR]),j1={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:rs,onParseError:null};class B1{constructor(t,a,s=null,l=null){this.fragmentContext=s,this.scriptHandler=l,this.currentToken=null,this.stopped=!1,this.insertionMode=F.INITIAL,this.originalInsertionMode=F.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...j1,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=a??this.treeAdapter.createDocument(),this.tokenizer=new yD(this.options,this),this.activeFormattingElements=new wD(this.treeAdapter),this.fragmentContextID=s?Ki(this.treeAdapter.getTagName(s)):E.UNKNOWN,this._setContextModes(s??this.document,this.fragmentContextID),this.openElements=new CD(this.document,this.treeAdapter,this)}static parse(t,a){const s=new this(a);return s.tokenizer.write(t,!0),s.document}static getFragmentParser(t,a){const s={...j1,...a};t??(t=s.treeAdapter.createElement(W.TEMPLATE,be.HTML,[]));const l=s.treeAdapter.createElement("documentmock",be.HTML,[]),o=new this(s,l,t);return o.fragmentContextID===E.TEMPLATE&&o.tmplInsertionModeStack.unshift(F.IN_TEMPLATE),o._initTokenizerForFragmentParsing(),o._insertFakeRootElement(),o._resetInsertionMode(),o._findFormInFragmentContext(),o}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),a=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,a),a}_err(t,a,s){var l;if(!this.onParseError)return;const o=(l=t.location)!==null&&l!==void 0?l:XD,d={code:a,startLine:o.startLine,startCol:o.startCol,startOffset:o.startOffset,endLine:s?o.startLine:o.endLine,endCol:s?o.startCol:o.endCol,endOffset:s?o.startOffset:o.endOffset};this.onParseError(d)}onItemPush(t,a,s){var l,o;(o=(l=this.treeAdapter).onItemPush)===null||o===void 0||o.call(l,t),s&&this.openElements.stackTop>0&&this._setContextModes(t,a)}onItemPop(t,a){var s,l;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(l=(s=this.treeAdapter).onItemPop)===null||l===void 0||l.call(s,t,this.openElements.current),a){let o,d;this.openElements.stackTop===0&&this.fragmentContext?(o=this.fragmentContext,d=this.fragmentContextID):{current:o,currentTagId:d}=this.openElements,this._setContextModes(o,d)}}_setContextModes(t,a){const s=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===be.HTML;this.currentNotInHTML=!s,this.tokenizer.inForeignNode=!s&&t!==void 0&&a!==void 0&&!this._isIntegrationPoint(a,t)}_switchToTextParsing(t,a){this._insertElement(t,be.HTML),this.tokenizer.state=a,this.originalInsertionMode=this.insertionMode,this.insertionMode=F.TEXT}switchToPlaintextParsing(){this.insertionMode=F.TEXT,this.originalInsertionMode=F.IN_BODY,this.tokenizer.state=Xt.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===W.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==be.HTML))switch(this.fragmentContextID){case E.TITLE:case E.TEXTAREA:{this.tokenizer.state=Xt.RCDATA;break}case E.STYLE:case E.XMP:case E.IFRAME:case E.NOEMBED:case E.NOFRAMES:case E.NOSCRIPT:{this.tokenizer.state=Xt.RAWTEXT;break}case E.SCRIPT:{this.tokenizer.state=Xt.SCRIPT_DATA;break}case E.PLAINTEXT:{this.tokenizer.state=Xt.PLAINTEXT;break}}}_setDocumentType(t){const a=t.name||"",s=t.publicId||"",l=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,a,s,l),t.location){const d=this.treeAdapter.getChildNodes(this.document).find(f=>this.treeAdapter.isDocumentTypeNode(f));d&&this.treeAdapter.setNodeSourceCodeLocation(d,t.location)}}_attachElementToTree(t,a){if(this.options.sourceCodeLocationInfo){const s=a&&{...a,startTag:a};this.treeAdapter.setNodeSourceCodeLocation(t,s)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const s=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(s??this.document,t)}}_appendElement(t,a){const s=this.treeAdapter.createElement(t.tagName,a,t.attrs);this._attachElementToTree(s,t.location)}_insertElement(t,a){const s=this.treeAdapter.createElement(t.tagName,a,t.attrs);this._attachElementToTree(s,t.location),this.openElements.push(s,t.tagID)}_insertFakeElement(t,a){const s=this.treeAdapter.createElement(t,be.HTML,[]);this._attachElementToTree(s,null),this.openElements.push(s,a)}_insertTemplate(t){const a=this.treeAdapter.createElement(t.tagName,be.HTML,t.attrs),s=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(a,s),this._attachElementToTree(a,t.location),this.openElements.push(a,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(s,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(W.HTML,be.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,E.HTML)}_appendCommentNode(t,a){const s=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(a,s),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}_insertCharacters(t){let a,s;if(this._shouldFosterParentOnInsertion()?({parent:a,beforeElement:s}=this._findFosterParentingLocation(),s?this.treeAdapter.insertTextBefore(a,t.chars,s):this.treeAdapter.insertText(a,t.chars)):(a=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(a,t.chars)),!t.location)return;const l=this.treeAdapter.getChildNodes(a),o=s?l.lastIndexOf(s):l.length,d=l[o-1];if(this.treeAdapter.getNodeSourceCodeLocation(d)){const{endLine:h,endCol:m,endOffset:b}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(d,{endLine:h,endCol:m,endOffset:b})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(d,t.location)}_adoptNodes(t,a){for(let s=this.treeAdapter.getFirstChild(t);s;s=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(s),this.treeAdapter.appendChild(a,s)}_setEndLocation(t,a){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&a.location){const s=a.location,l=this.treeAdapter.getTagName(t),o=a.type===tt.END_TAG&&l===a.tagName?{endTag:{...s},endLine:s.endLine,endCol:s.endCol,endOffset:s.endOffset}:{endLine:s.startLine,endCol:s.startCol,endOffset:s.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,o)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let a,s;return this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,s=this.fragmentContextID):{current:a,currentTagId:s}=this.openElements,t.tagID===E.SVG&&this.treeAdapter.getTagName(a)===W.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(a)===be.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===E.MGLYPH||t.tagID===E.MALIGNMARK)&&s!==void 0&&!this._isIntegrationPoint(s,a,be.HTML)}_processToken(t){switch(t.type){case tt.CHARACTER:{this.onCharacter(t);break}case tt.NULL_CHARACTER:{this.onNullCharacter(t);break}case tt.COMMENT:{this.onComment(t);break}case tt.DOCTYPE:{this.onDoctype(t);break}case tt.START_TAG:{this._processStartTag(t);break}case tt.END_TAG:{this.onEndTag(t);break}case tt.EOF:{this.onEof(t);break}case tt.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,a,s){const l=this.treeAdapter.getNamespaceURI(a),o=this.treeAdapter.getAttrList(a);return GD(t,l,o,s)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const a=this.activeFormattingElements.entries.findIndex(l=>l.type===Ka.Marker||this.openElements.contains(l.element)),s=a===-1?t-1:a-1;for(let l=s;l>=0;l--){const o=this.activeFormattingElements.entries[l];this._insertElement(o.token,this.treeAdapter.getNamespaceURI(o.element)),o.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=F.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(E.P),this.openElements.popUntilTagNamePopped(E.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case E.TR:{this.insertionMode=F.IN_ROW;return}case E.TBODY:case E.THEAD:case E.TFOOT:{this.insertionMode=F.IN_TABLE_BODY;return}case E.CAPTION:{this.insertionMode=F.IN_CAPTION;return}case E.COLGROUP:{this.insertionMode=F.IN_COLUMN_GROUP;return}case E.TABLE:{this.insertionMode=F.IN_TABLE;return}case E.BODY:{this.insertionMode=F.IN_BODY;return}case E.FRAMESET:{this.insertionMode=F.IN_FRAMESET;return}case E.SELECT:{this._resetInsertionModeForSelect(t);return}case E.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case E.HTML:{this.insertionMode=this.headElement?F.AFTER_HEAD:F.BEFORE_HEAD;return}case E.TD:case E.TH:{if(t>0){this.insertionMode=F.IN_CELL;return}break}case E.HEAD:{if(t>0){this.insertionMode=F.IN_HEAD;return}break}}this.insertionMode=F.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let a=t-1;a>0;a--){const s=this.openElements.tagIDs[a];if(s===E.TEMPLATE)break;if(s===E.TABLE){this.insertionMode=F.IN_SELECT_IN_TABLE;return}}this.insertionMode=F.IN_SELECT}_isElementCausesFosterParenting(t){return HT.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const a=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case E.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(a)===be.HTML)return{parent:this.treeAdapter.getTemplateContent(a),beforeElement:null};break}case E.TABLE:{const s=this.treeAdapter.getParentNode(a);return s?{parent:s,beforeElement:a}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const a=this._findFosterParentingLocation();a.beforeElement?this.treeAdapter.insertBefore(a.parent,t,a.beforeElement):this.treeAdapter.appendChild(a.parent,t)}_isSpecialElement(t,a){const s=this.treeAdapter.getNamespaceURI(t);return gD[s].has(a)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){A8(this,t);return}switch(this.insertionMode){case F.INITIAL:{Xl(this,t);break}case F.BEFORE_HTML:{ao(this,t);break}case F.BEFORE_HEAD:{ro(this,t);break}case F.IN_HEAD:{so(this,t);break}case F.IN_HEAD_NO_SCRIPT:{io(this,t);break}case F.AFTER_HEAD:{lo(this,t);break}case F.IN_BODY:case F.IN_CAPTION:case F.IN_CELL:case F.IN_TEMPLATE:{zT(this,t);break}case F.TEXT:case F.IN_SELECT:case F.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case F.IN_TABLE:case F.IN_TABLE_BODY:case F.IN_ROW:{Om(this,t);break}case F.IN_TABLE_TEXT:{VT(this,t);break}case F.IN_COLUMN_GROUP:{vc(this,t);break}case F.AFTER_BODY:{Ac(this,t);break}case F.AFTER_AFTER_BODY:{oc(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){v8(this,t);return}switch(this.insertionMode){case F.INITIAL:{Xl(this,t);break}case F.BEFORE_HTML:{ao(this,t);break}case F.BEFORE_HEAD:{ro(this,t);break}case F.IN_HEAD:{so(this,t);break}case F.IN_HEAD_NO_SCRIPT:{io(this,t);break}case F.AFTER_HEAD:{lo(this,t);break}case F.TEXT:{this._insertCharacters(t);break}case F.IN_TABLE:case F.IN_TABLE_BODY:case F.IN_ROW:{Om(this,t);break}case F.IN_COLUMN_GROUP:{vc(this,t);break}case F.AFTER_BODY:{Ac(this,t);break}case F.AFTER_AFTER_BODY:{oc(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){ah(this,t);return}switch(this.insertionMode){case F.INITIAL:case F.BEFORE_HTML:case F.BEFORE_HEAD:case F.IN_HEAD:case F.IN_HEAD_NO_SCRIPT:case F.AFTER_HEAD:case F.IN_BODY:case F.IN_TABLE:case F.IN_CAPTION:case F.IN_COLUMN_GROUP:case F.IN_TABLE_BODY:case F.IN_ROW:case F.IN_CELL:case F.IN_SELECT:case F.IN_SELECT_IN_TABLE:case F.IN_TEMPLATE:case F.IN_FRAMESET:case F.AFTER_FRAMESET:{ah(this,t);break}case F.IN_TABLE_TEXT:{Zl(this,t);break}case F.AFTER_BODY:{aL(this,t);break}case F.AFTER_AFTER_BODY:case F.AFTER_AFTER_FRAMESET:{rL(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case F.INITIAL:{sL(this,t);break}case F.BEFORE_HEAD:case F.IN_HEAD:case F.IN_HEAD_NO_SCRIPT:case F.AFTER_HEAD:{this._err(t,le.misplacedDoctype);break}case F.IN_TABLE_TEXT:{Zl(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,le.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?C8(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case F.INITIAL:{Xl(this,t);break}case F.BEFORE_HTML:{iL(this,t);break}case F.BEFORE_HEAD:{oL(this,t);break}case F.IN_HEAD:{La(this,t);break}case F.IN_HEAD_NO_SCRIPT:{dL(this,t);break}case F.AFTER_HEAD:{mL(this,t);break}case F.IN_BODY:{An(this,t);break}case F.IN_TABLE:{Ui(this,t);break}case F.IN_TABLE_TEXT:{Zl(this,t);break}case F.IN_CAPTION:{u8(this,t);break}case F.IN_COLUMN_GROUP:{Qh(this,t);break}case F.IN_TABLE_BODY:{$c(this,t);break}case F.IN_ROW:{Gc(this,t);break}case F.IN_CELL:{f8(this,t);break}case F.IN_SELECT:{ZT(this,t);break}case F.IN_SELECT_IN_TABLE:{h8(this,t);break}case F.IN_TEMPLATE:{g8(this,t);break}case F.AFTER_BODY:{x8(this,t);break}case F.IN_FRAMESET:{E8(this,t);break}case F.AFTER_FRAMESET:{T8(this,t);break}case F.AFTER_AFTER_BODY:{N8(this,t);break}case F.AFTER_AFTER_FRAMESET:{S8(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?w8(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case F.INITIAL:{Xl(this,t);break}case F.BEFORE_HTML:{lL(this,t);break}case F.BEFORE_HEAD:{uL(this,t);break}case F.IN_HEAD:{cL(this,t);break}case F.IN_HEAD_NO_SCRIPT:{fL(this,t);break}case F.AFTER_HEAD:{hL(this,t);break}case F.IN_BODY:{Yc(this,t);break}case F.TEXT:{JL(this,t);break}case F.IN_TABLE:{xo(this,t);break}case F.IN_TABLE_TEXT:{Zl(this,t);break}case F.IN_CAPTION:{c8(this,t);break}case F.IN_COLUMN_GROUP:{d8(this,t);break}case F.IN_TABLE_BODY:{rh(this,t);break}case F.IN_ROW:{XT(this,t);break}case F.IN_CELL:{m8(this,t);break}case F.IN_SELECT:{WT(this,t);break}case F.IN_SELECT_IN_TABLE:{p8(this,t);break}case F.IN_TEMPLATE:{b8(this,t);break}case F.AFTER_BODY:{e_(this,t);break}case F.IN_FRAMESET:{y8(this,t);break}case F.AFTER_FRAMESET:{_8(this,t);break}case F.AFTER_AFTER_BODY:{oc(this,t);break}}}onEof(t){switch(this.insertionMode){case F.INITIAL:{Xl(this,t);break}case F.BEFORE_HTML:{ao(this,t);break}case F.BEFORE_HEAD:{ro(this,t);break}case F.IN_HEAD:{so(this,t);break}case F.IN_HEAD_NO_SCRIPT:{io(this,t);break}case F.AFTER_HEAD:{lo(this,t);break}case F.IN_BODY:case F.IN_TABLE:case F.IN_CAPTION:case F.IN_COLUMN_GROUP:case F.IN_TABLE_BODY:case F.IN_ROW:case F.IN_CELL:case F.IN_SELECT:case F.IN_SELECT_IN_TABLE:{GT(this,t);break}case F.TEXT:{e8(this,t);break}case F.IN_TABLE_TEXT:{Zl(this,t);break}case F.IN_TEMPLATE:{JT(this,t);break}case F.AFTER_BODY:case F.IN_FRAMESET:case F.AFTER_FRAMESET:case F.AFTER_AFTER_BODY:case F.AFTER_AFTER_FRAMESET:{Vh(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===I.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case F.IN_HEAD:case F.IN_HEAD_NO_SCRIPT:case F.AFTER_HEAD:case F.TEXT:case F.IN_COLUMN_GROUP:case F.IN_SELECT:case F.IN_SELECT_IN_TABLE:case F.IN_FRAMESET:case F.AFTER_FRAMESET:{this._insertCharacters(t);break}case F.IN_BODY:case F.IN_CAPTION:case F.IN_CELL:case F.IN_TEMPLATE:case F.AFTER_BODY:case F.AFTER_AFTER_BODY:case F.AFTER_AFTER_FRAMESET:{FT(this,t);break}case F.IN_TABLE:case F.IN_TABLE_BODY:case F.IN_ROW:{Om(this,t);break}case F.IN_TABLE_TEXT:{KT(this,t);break}}}}function ZD(e,t){let a=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return a?e.openElements.contains(a.element)?e.openElements.hasInScope(t.tagID)||(a=null):(e.activeFormattingElements.removeEntry(a),a=null):$T(e,t),a}function WD(e,t){let a=null,s=e.openElements.stackTop;for(;s>=0;s--){const l=e.openElements.items[s];if(l===t.element)break;e._isSpecialElement(l,e.openElements.tagIDs[s])&&(a=l)}return a||(e.openElements.shortenToLength(Math.max(s,0)),e.activeFormattingElements.removeEntry(t)),a}function JD(e,t,a){let s=t,l=e.openElements.getCommonAncestor(t);for(let o=0,d=l;d!==a;o++,d=l){l=e.openElements.getCommonAncestor(d);const f=e.activeFormattingElements.getElementEntry(d),h=f&&o>=QD;!f||h?(h&&e.activeFormattingElements.removeEntry(f),e.openElements.remove(d)):(d=eL(e,f),s===t&&(e.activeFormattingElements.bookmark=f),e.treeAdapter.detachNode(s),e.treeAdapter.appendChild(d,s),s=d)}return s}function eL(e,t){const a=e.treeAdapter.getNamespaceURI(t.element),s=e.treeAdapter.createElement(t.token.tagName,a,t.token.attrs);return e.openElements.replace(t.element,s),t.element=s,s}function tL(e,t,a){const s=e.treeAdapter.getTagName(t),l=Ki(s);if(e._isElementCausesFosterParenting(l))e._fosterParentElement(a);else{const o=e.treeAdapter.getNamespaceURI(t);l===E.TEMPLATE&&o===be.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,a)}}function nL(e,t,a){const s=e.treeAdapter.getNamespaceURI(a.element),{token:l}=a,o=e.treeAdapter.createElement(l.tagName,s,l.attrs);e._adoptNodes(t,o),e.treeAdapter.appendChild(t,o),e.activeFormattingElements.insertElementAfterBookmark(o,l),e.activeFormattingElements.removeEntry(a),e.openElements.remove(a.element),e.openElements.insertAfter(t,o,l.tagID)}function Kh(e,t){for(let a=0;a<VD;a++){const s=ZD(e,t);if(!s)break;const l=WD(e,s);if(!l)break;e.activeFormattingElements.bookmark=s;const o=JD(e,l,s.element),d=e.openElements.getCommonAncestor(s.element);e.treeAdapter.detachNode(o),d&&tL(e,d,o),nL(e,l,s)}}function ah(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function aL(e,t){e._appendCommentNode(t,e.openElements.items[0])}function rL(e,t){e._appendCommentNode(t,e.document)}function Vh(e,t){if(e.stopped=!0,t.location){const a=e.fragmentContext?0:2;for(let s=e.openElements.stackTop;s>=a;s--)e._setEndLocation(e.openElements.items[s],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const s=e.openElements.items[0],l=e.treeAdapter.getNodeSourceCodeLocation(s);if(l&&!l.endTag&&(e._setEndLocation(s,t),e.openElements.stackTop>=1)){const o=e.openElements.items[1],d=e.treeAdapter.getNodeSourceCodeLocation(o);d&&!d.endTag&&e._setEndLocation(o,t)}}}}function sL(e,t){e._setDocumentType(t);const a=t.forceQuirks?Ta.QUIRKS:LD(t);DD(t)||e._err(t,le.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,a),e.insertionMode=F.BEFORE_HTML}function Xl(e,t){e._err(t,le.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Ta.QUIRKS),e.insertionMode=F.BEFORE_HTML,e._processToken(t)}function iL(e,t){t.tagID===E.HTML?(e._insertElement(t,be.HTML),e.insertionMode=F.BEFORE_HEAD):ao(e,t)}function lL(e,t){const a=t.tagID;(a===E.HTML||a===E.HEAD||a===E.BODY||a===E.BR)&&ao(e,t)}function ao(e,t){e._insertFakeRootElement(),e.insertionMode=F.BEFORE_HEAD,e._processToken(t)}function oL(e,t){switch(t.tagID){case E.HTML:{An(e,t);break}case E.HEAD:{e._insertElement(t,be.HTML),e.headElement=e.openElements.current,e.insertionMode=F.IN_HEAD;break}default:ro(e,t)}}function uL(e,t){const a=t.tagID;a===E.HEAD||a===E.BODY||a===E.HTML||a===E.BR?ro(e,t):e._err(t,le.endTagWithoutMatchingOpenElement)}function ro(e,t){e._insertFakeElement(W.HEAD,E.HEAD),e.headElement=e.openElements.current,e.insertionMode=F.IN_HEAD,e._processToken(t)}function La(e,t){switch(t.tagID){case E.HTML:{An(e,t);break}case E.BASE:case E.BASEFONT:case E.BGSOUND:case E.LINK:case E.META:{e._appendElement(t,be.HTML),t.ackSelfClosing=!0;break}case E.TITLE:{e._switchToTextParsing(t,Xt.RCDATA);break}case E.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Xt.RAWTEXT):(e._insertElement(t,be.HTML),e.insertionMode=F.IN_HEAD_NO_SCRIPT);break}case E.NOFRAMES:case E.STYLE:{e._switchToTextParsing(t,Xt.RAWTEXT);break}case E.SCRIPT:{e._switchToTextParsing(t,Xt.SCRIPT_DATA);break}case E.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=F.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(F.IN_TEMPLATE);break}case E.HEAD:{e._err(t,le.misplacedStartTagForHeadElement);break}default:so(e,t)}}function cL(e,t){switch(t.tagID){case E.HEAD:{e.openElements.pop(),e.insertionMode=F.AFTER_HEAD;break}case E.BODY:case E.BR:case E.HTML:{so(e,t);break}case E.TEMPLATE:{$s(e,t);break}default:e._err(t,le.endTagWithoutMatchingOpenElement)}}function $s(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==E.TEMPLATE&&e._err(t,le.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(E.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,le.endTagWithoutMatchingOpenElement)}function so(e,t){e.openElements.pop(),e.insertionMode=F.AFTER_HEAD,e._processToken(t)}function dL(e,t){switch(t.tagID){case E.HTML:{An(e,t);break}case E.BASEFONT:case E.BGSOUND:case E.HEAD:case E.LINK:case E.META:case E.NOFRAMES:case E.STYLE:{La(e,t);break}case E.NOSCRIPT:{e._err(t,le.nestedNoscriptInHead);break}default:io(e,t)}}function fL(e,t){switch(t.tagID){case E.NOSCRIPT:{e.openElements.pop(),e.insertionMode=F.IN_HEAD;break}case E.BR:{io(e,t);break}default:e._err(t,le.endTagWithoutMatchingOpenElement)}}function io(e,t){const a=t.type===tt.EOF?le.openElementsLeftAfterEof:le.disallowedContentInNoscriptInHead;e._err(t,a),e.openElements.pop(),e.insertionMode=F.IN_HEAD,e._processToken(t)}function mL(e,t){switch(t.tagID){case E.HTML:{An(e,t);break}case E.BODY:{e._insertElement(t,be.HTML),e.framesetOk=!1,e.insertionMode=F.IN_BODY;break}case E.FRAMESET:{e._insertElement(t,be.HTML),e.insertionMode=F.IN_FRAMESET;break}case E.BASE:case E.BASEFONT:case E.BGSOUND:case E.LINK:case E.META:case E.NOFRAMES:case E.SCRIPT:case E.STYLE:case E.TEMPLATE:case E.TITLE:{e._err(t,le.abandonedHeadElementChild),e.openElements.push(e.headElement,E.HEAD),La(e,t),e.openElements.remove(e.headElement);break}case E.HEAD:{e._err(t,le.misplacedStartTagForHeadElement);break}default:lo(e,t)}}function hL(e,t){switch(t.tagID){case E.BODY:case E.HTML:case E.BR:{lo(e,t);break}case E.TEMPLATE:{$s(e,t);break}default:e._err(t,le.endTagWithoutMatchingOpenElement)}}function lo(e,t){e._insertFakeElement(W.BODY,E.BODY),e.insertionMode=F.IN_BODY,qc(e,t)}function qc(e,t){switch(t.type){case tt.CHARACTER:{zT(e,t);break}case tt.WHITESPACE_CHARACTER:{FT(e,t);break}case tt.COMMENT:{ah(e,t);break}case tt.START_TAG:{An(e,t);break}case tt.END_TAG:{Yc(e,t);break}case tt.EOF:{GT(e,t);break}}}function FT(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function zT(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function pL(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function gL(e,t){const a=e.openElements.tryPeekProperlyNestedBodyElement();a&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(a,t.attrs))}function bL(e,t){const a=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&a&&(e.treeAdapter.detachNode(a),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,be.HTML),e.insertionMode=F.IN_FRAMESET)}function xL(e,t){e.openElements.hasInButtonScope(E.P)&&e._closePElement(),e._insertElement(t,be.HTML)}function EL(e,t){e.openElements.hasInButtonScope(E.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&nh.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,be.HTML)}function yL(e,t){e.openElements.hasInButtonScope(E.P)&&e._closePElement(),e._insertElement(t,be.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function TL(e,t){const a=e.openElements.tmplCount>0;(!e.formElement||a)&&(e.openElements.hasInButtonScope(E.P)&&e._closePElement(),e._insertElement(t,be.HTML),a||(e.formElement=e.openElements.current))}function _L(e,t){e.framesetOk=!1;const a=t.tagID;for(let s=e.openElements.stackTop;s>=0;s--){const l=e.openElements.tagIDs[s];if(a===E.LI&&l===E.LI||(a===E.DD||a===E.DT)&&(l===E.DD||l===E.DT)){e.openElements.generateImpliedEndTagsWithExclusion(l),e.openElements.popUntilTagNamePopped(l);break}if(l!==E.ADDRESS&&l!==E.DIV&&l!==E.P&&e._isSpecialElement(e.openElements.items[s],l))break}e.openElements.hasInButtonScope(E.P)&&e._closePElement(),e._insertElement(t,be.HTML)}function NL(e,t){e.openElements.hasInButtonScope(E.P)&&e._closePElement(),e._insertElement(t,be.HTML),e.tokenizer.state=Xt.PLAINTEXT}function SL(e,t){e.openElements.hasInScope(E.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(E.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,be.HTML),e.framesetOk=!1}function vL(e,t){const a=e.activeFormattingElements.getElementEntryInScopeWithTagName(W.A);a&&(Kh(e,t),e.openElements.remove(a.element),e.activeFormattingElements.removeEntry(a)),e._reconstructActiveFormattingElements(),e._insertElement(t,be.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function AL(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,be.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function CL(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(E.NOBR)&&(Kh(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,be.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function wL(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,be.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function kL(e,t){e.treeAdapter.getDocumentMode(e.document)!==Ta.QUIRKS&&e.openElements.hasInButtonScope(E.P)&&e._closePElement(),e._insertElement(t,be.HTML),e.framesetOk=!1,e.insertionMode=F.IN_TABLE}function qT(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,be.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function YT(e){const t=IT(e,Bs.TYPE);return t!=null&&t.toLowerCase()===KD}function RL(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,be.HTML),YT(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function OL(e,t){e._appendElement(t,be.HTML),t.ackSelfClosing=!0}function IL(e,t){e.openElements.hasInButtonScope(E.P)&&e._closePElement(),e._appendElement(t,be.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function ML(e,t){t.tagName=W.IMG,t.tagID=E.IMG,qT(e,t)}function DL(e,t){e._insertElement(t,be.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Xt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=F.TEXT}function LL(e,t){e.openElements.hasInButtonScope(E.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Xt.RAWTEXT)}function jL(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Xt.RAWTEXT)}function P1(e,t){e._switchToTextParsing(t,Xt.RAWTEXT)}function BL(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,be.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===F.IN_TABLE||e.insertionMode===F.IN_CAPTION||e.insertionMode===F.IN_TABLE_BODY||e.insertionMode===F.IN_ROW||e.insertionMode===F.IN_CELL?F.IN_SELECT_IN_TABLE:F.IN_SELECT}function PL(e,t){e.openElements.currentTagId===E.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,be.HTML)}function UL(e,t){e.openElements.hasInScope(E.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,be.HTML)}function HL(e,t){e.openElements.hasInScope(E.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(E.RTC),e._insertElement(t,be.HTML)}function FL(e,t){e._reconstructActiveFormattingElements(),PT(t),Gh(t),t.selfClosing?e._appendElement(t,be.MATHML):e._insertElement(t,be.MATHML),t.ackSelfClosing=!0}function zL(e,t){e._reconstructActiveFormattingElements(),UT(t),Gh(t),t.selfClosing?e._appendElement(t,be.SVG):e._insertElement(t,be.SVG),t.ackSelfClosing=!0}function U1(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,be.HTML)}function An(e,t){switch(t.tagID){case E.I:case E.S:case E.B:case E.U:case E.EM:case E.TT:case E.BIG:case E.CODE:case E.FONT:case E.SMALL:case E.STRIKE:case E.STRONG:{AL(e,t);break}case E.A:{vL(e,t);break}case E.H1:case E.H2:case E.H3:case E.H4:case E.H5:case E.H6:{EL(e,t);break}case E.P:case E.DL:case E.OL:case E.UL:case E.DIV:case E.DIR:case E.NAV:case E.MAIN:case E.MENU:case E.ASIDE:case E.CENTER:case E.FIGURE:case E.FOOTER:case E.HEADER:case E.HGROUP:case E.DIALOG:case E.DETAILS:case E.ADDRESS:case E.ARTICLE:case E.SEARCH:case E.SECTION:case E.SUMMARY:case E.FIELDSET:case E.BLOCKQUOTE:case E.FIGCAPTION:{xL(e,t);break}case E.LI:case E.DD:case E.DT:{_L(e,t);break}case E.BR:case E.IMG:case E.WBR:case E.AREA:case E.EMBED:case E.KEYGEN:{qT(e,t);break}case E.HR:{IL(e,t);break}case E.RB:case E.RTC:{UL(e,t);break}case E.RT:case E.RP:{HL(e,t);break}case E.PRE:case E.LISTING:{yL(e,t);break}case E.XMP:{LL(e,t);break}case E.SVG:{zL(e,t);break}case E.HTML:{pL(e,t);break}case E.BASE:case E.LINK:case E.META:case E.STYLE:case E.TITLE:case E.SCRIPT:case E.BGSOUND:case E.BASEFONT:case E.TEMPLATE:{La(e,t);break}case E.BODY:{gL(e,t);break}case E.FORM:{TL(e,t);break}case E.NOBR:{CL(e,t);break}case E.MATH:{FL(e,t);break}case E.TABLE:{kL(e,t);break}case E.INPUT:{RL(e,t);break}case E.PARAM:case E.TRACK:case E.SOURCE:{OL(e,t);break}case E.IMAGE:{ML(e,t);break}case E.BUTTON:{SL(e,t);break}case E.APPLET:case E.OBJECT:case E.MARQUEE:{wL(e,t);break}case E.IFRAME:{jL(e,t);break}case E.SELECT:{BL(e,t);break}case E.OPTION:case E.OPTGROUP:{PL(e,t);break}case E.NOEMBED:case E.NOFRAMES:{P1(e,t);break}case E.FRAMESET:{bL(e,t);break}case E.TEXTAREA:{DL(e,t);break}case E.NOSCRIPT:{e.options.scriptingEnabled?P1(e,t):U1(e,t);break}case E.PLAINTEXT:{NL(e,t);break}case E.COL:case E.TH:case E.TD:case E.TR:case E.HEAD:case E.FRAME:case E.TBODY:case E.TFOOT:case E.THEAD:case E.CAPTION:case E.COLGROUP:break;default:U1(e,t)}}function qL(e,t){if(e.openElements.hasInScope(E.BODY)&&(e.insertionMode=F.AFTER_BODY,e.options.sourceCodeLocationInfo)){const a=e.openElements.tryPeekProperlyNestedBodyElement();a&&e._setEndLocation(a,t)}}function YL(e,t){e.openElements.hasInScope(E.BODY)&&(e.insertionMode=F.AFTER_BODY,e_(e,t))}function $L(e,t){const a=t.tagID;e.openElements.hasInScope(a)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(a))}function GL(e){const t=e.openElements.tmplCount>0,{formElement:a}=e;t||(e.formElement=null),(a||t)&&e.openElements.hasInScope(E.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(E.FORM):a&&e.openElements.remove(a))}function KL(e){e.openElements.hasInButtonScope(E.P)||e._insertFakeElement(W.P,E.P),e._closePElement()}function VL(e){e.openElements.hasInListItemScope(E.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(E.LI),e.openElements.popUntilTagNamePopped(E.LI))}function QL(e,t){const a=t.tagID;e.openElements.hasInScope(a)&&(e.openElements.generateImpliedEndTagsWithExclusion(a),e.openElements.popUntilTagNamePopped(a))}function XL(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function ZL(e,t){const a=t.tagID;e.openElements.hasInScope(a)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(a),e.activeFormattingElements.clearToLastMarker())}function WL(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(W.BR,E.BR),e.openElements.pop(),e.framesetOk=!1}function $T(e,t){const a=t.tagName,s=t.tagID;for(let l=e.openElements.stackTop;l>0;l--){const o=e.openElements.items[l],d=e.openElements.tagIDs[l];if(s===d&&(s!==E.UNKNOWN||e.treeAdapter.getTagName(o)===a)){e.openElements.generateImpliedEndTagsWithExclusion(s),e.openElements.stackTop>=l&&e.openElements.shortenToLength(l);break}if(e._isSpecialElement(o,d))break}}function Yc(e,t){switch(t.tagID){case E.A:case E.B:case E.I:case E.S:case E.U:case E.EM:case E.TT:case E.BIG:case E.CODE:case E.FONT:case E.NOBR:case E.SMALL:case E.STRIKE:case E.STRONG:{Kh(e,t);break}case E.P:{KL(e);break}case E.DL:case E.UL:case E.OL:case E.DIR:case E.DIV:case E.NAV:case E.PRE:case E.MAIN:case E.MENU:case E.ASIDE:case E.BUTTON:case E.CENTER:case E.FIGURE:case E.FOOTER:case E.HEADER:case E.HGROUP:case E.DIALOG:case E.ADDRESS:case E.ARTICLE:case E.DETAILS:case E.SEARCH:case E.SECTION:case E.SUMMARY:case E.LISTING:case E.FIELDSET:case E.BLOCKQUOTE:case E.FIGCAPTION:{$L(e,t);break}case E.LI:{VL(e);break}case E.DD:case E.DT:{QL(e,t);break}case E.H1:case E.H2:case E.H3:case E.H4:case E.H5:case E.H6:{XL(e);break}case E.BR:{WL(e);break}case E.BODY:{qL(e,t);break}case E.HTML:{YL(e,t);break}case E.FORM:{GL(e);break}case E.APPLET:case E.OBJECT:case E.MARQUEE:{ZL(e,t);break}case E.TEMPLATE:{$s(e,t);break}default:$T(e,t)}}function GT(e,t){e.tmplInsertionModeStack.length>0?JT(e,t):Vh(e,t)}function JL(e,t){var a;t.tagID===E.SCRIPT&&((a=e.scriptHandler)===null||a===void 0||a.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function e8(e,t){e._err(t,le.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Om(e,t){if(e.openElements.currentTagId!==void 0&&HT.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=F.IN_TABLE_TEXT,t.type){case tt.CHARACTER:{VT(e,t);break}case tt.WHITESPACE_CHARACTER:{KT(e,t);break}}else Co(e,t)}function t8(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,be.HTML),e.insertionMode=F.IN_CAPTION}function n8(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,be.HTML),e.insertionMode=F.IN_COLUMN_GROUP}function a8(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(W.COLGROUP,E.COLGROUP),e.insertionMode=F.IN_COLUMN_GROUP,Qh(e,t)}function r8(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,be.HTML),e.insertionMode=F.IN_TABLE_BODY}function s8(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(W.TBODY,E.TBODY),e.insertionMode=F.IN_TABLE_BODY,$c(e,t)}function i8(e,t){e.openElements.hasInTableScope(E.TABLE)&&(e.openElements.popUntilTagNamePopped(E.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function l8(e,t){YT(t)?e._appendElement(t,be.HTML):Co(e,t),t.ackSelfClosing=!0}function o8(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,be.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Ui(e,t){switch(t.tagID){case E.TD:case E.TH:case E.TR:{s8(e,t);break}case E.STYLE:case E.SCRIPT:case E.TEMPLATE:{La(e,t);break}case E.COL:{a8(e,t);break}case E.FORM:{o8(e,t);break}case E.TABLE:{i8(e,t);break}case E.TBODY:case E.TFOOT:case E.THEAD:{r8(e,t);break}case E.INPUT:{l8(e,t);break}case E.CAPTION:{t8(e,t);break}case E.COLGROUP:{n8(e,t);break}default:Co(e,t)}}function xo(e,t){switch(t.tagID){case E.TABLE:{e.openElements.hasInTableScope(E.TABLE)&&(e.openElements.popUntilTagNamePopped(E.TABLE),e._resetInsertionMode());break}case E.TEMPLATE:{$s(e,t);break}case E.BODY:case E.CAPTION:case E.COL:case E.COLGROUP:case E.HTML:case E.TBODY:case E.TD:case E.TFOOT:case E.TH:case E.THEAD:case E.TR:break;default:Co(e,t)}}function Co(e,t){const a=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,qc(e,t),e.fosterParentingEnabled=a}function KT(e,t){e.pendingCharacterTokens.push(t)}function VT(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Zl(e,t){let a=0;if(e.hasNonWhitespacePendingCharacterToken)for(;a<e.pendingCharacterTokens.length;a++)Co(e,e.pendingCharacterTokens[a]);else for(;a<e.pendingCharacterTokens.length;a++)e._insertCharacters(e.pendingCharacterTokens[a]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const QT=new Set([E.CAPTION,E.COL,E.COLGROUP,E.TBODY,E.TD,E.TFOOT,E.TH,E.THEAD,E.TR]);function u8(e,t){const a=t.tagID;QT.has(a)?e.openElements.hasInTableScope(E.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(E.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=F.IN_TABLE,Ui(e,t)):An(e,t)}function c8(e,t){const a=t.tagID;switch(a){case E.CAPTION:case E.TABLE:{e.openElements.hasInTableScope(E.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(E.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=F.IN_TABLE,a===E.TABLE&&xo(e,t));break}case E.BODY:case E.COL:case E.COLGROUP:case E.HTML:case E.TBODY:case E.TD:case E.TFOOT:case E.TH:case E.THEAD:case E.TR:break;default:Yc(e,t)}}function Qh(e,t){switch(t.tagID){case E.HTML:{An(e,t);break}case E.COL:{e._appendElement(t,be.HTML),t.ackSelfClosing=!0;break}case E.TEMPLATE:{La(e,t);break}default:vc(e,t)}}function d8(e,t){switch(t.tagID){case E.COLGROUP:{e.openElements.currentTagId===E.COLGROUP&&(e.openElements.pop(),e.insertionMode=F.IN_TABLE);break}case E.TEMPLATE:{$s(e,t);break}case E.COL:break;default:vc(e,t)}}function vc(e,t){e.openElements.currentTagId===E.COLGROUP&&(e.openElements.pop(),e.insertionMode=F.IN_TABLE,e._processToken(t))}function $c(e,t){switch(t.tagID){case E.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,be.HTML),e.insertionMode=F.IN_ROW;break}case E.TH:case E.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(W.TR,E.TR),e.insertionMode=F.IN_ROW,Gc(e,t);break}case E.CAPTION:case E.COL:case E.COLGROUP:case E.TBODY:case E.TFOOT:case E.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=F.IN_TABLE,Ui(e,t));break}default:Ui(e,t)}}function rh(e,t){const a=t.tagID;switch(t.tagID){case E.TBODY:case E.TFOOT:case E.THEAD:{e.openElements.hasInTableScope(a)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=F.IN_TABLE);break}case E.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=F.IN_TABLE,xo(e,t));break}case E.BODY:case E.CAPTION:case E.COL:case E.COLGROUP:case E.HTML:case E.TD:case E.TH:case E.TR:break;default:xo(e,t)}}function Gc(e,t){switch(t.tagID){case E.TH:case E.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,be.HTML),e.insertionMode=F.IN_CELL,e.activeFormattingElements.insertMarker();break}case E.CAPTION:case E.COL:case E.COLGROUP:case E.TBODY:case E.TFOOT:case E.THEAD:case E.TR:{e.openElements.hasInTableScope(E.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=F.IN_TABLE_BODY,$c(e,t));break}default:Ui(e,t)}}function XT(e,t){switch(t.tagID){case E.TR:{e.openElements.hasInTableScope(E.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=F.IN_TABLE_BODY);break}case E.TABLE:{e.openElements.hasInTableScope(E.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=F.IN_TABLE_BODY,rh(e,t));break}case E.TBODY:case E.TFOOT:case E.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(E.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=F.IN_TABLE_BODY,rh(e,t));break}case E.BODY:case E.CAPTION:case E.COL:case E.COLGROUP:case E.HTML:case E.TD:case E.TH:break;default:xo(e,t)}}function f8(e,t){const a=t.tagID;QT.has(a)?(e.openElements.hasInTableScope(E.TD)||e.openElements.hasInTableScope(E.TH))&&(e._closeTableCell(),Gc(e,t)):An(e,t)}function m8(e,t){const a=t.tagID;switch(a){case E.TD:case E.TH:{e.openElements.hasInTableScope(a)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(a),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=F.IN_ROW);break}case E.TABLE:case E.TBODY:case E.TFOOT:case E.THEAD:case E.TR:{e.openElements.hasInTableScope(a)&&(e._closeTableCell(),XT(e,t));break}case E.BODY:case E.CAPTION:case E.COL:case E.COLGROUP:case E.HTML:break;default:Yc(e,t)}}function ZT(e,t){switch(t.tagID){case E.HTML:{An(e,t);break}case E.OPTION:{e.openElements.currentTagId===E.OPTION&&e.openElements.pop(),e._insertElement(t,be.HTML);break}case E.OPTGROUP:{e.openElements.currentTagId===E.OPTION&&e.openElements.pop(),e.openElements.currentTagId===E.OPTGROUP&&e.openElements.pop(),e._insertElement(t,be.HTML);break}case E.HR:{e.openElements.currentTagId===E.OPTION&&e.openElements.pop(),e.openElements.currentTagId===E.OPTGROUP&&e.openElements.pop(),e._appendElement(t,be.HTML),t.ackSelfClosing=!0;break}case E.INPUT:case E.KEYGEN:case E.TEXTAREA:case E.SELECT:{e.openElements.hasInSelectScope(E.SELECT)&&(e.openElements.popUntilTagNamePopped(E.SELECT),e._resetInsertionMode(),t.tagID!==E.SELECT&&e._processStartTag(t));break}case E.SCRIPT:case E.TEMPLATE:{La(e,t);break}}}function WT(e,t){switch(t.tagID){case E.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===E.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===E.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===E.OPTGROUP&&e.openElements.pop();break}case E.OPTION:{e.openElements.currentTagId===E.OPTION&&e.openElements.pop();break}case E.SELECT:{e.openElements.hasInSelectScope(E.SELECT)&&(e.openElements.popUntilTagNamePopped(E.SELECT),e._resetInsertionMode());break}case E.TEMPLATE:{$s(e,t);break}}}function h8(e,t){const a=t.tagID;a===E.CAPTION||a===E.TABLE||a===E.TBODY||a===E.TFOOT||a===E.THEAD||a===E.TR||a===E.TD||a===E.TH?(e.openElements.popUntilTagNamePopped(E.SELECT),e._resetInsertionMode(),e._processStartTag(t)):ZT(e,t)}function p8(e,t){const a=t.tagID;a===E.CAPTION||a===E.TABLE||a===E.TBODY||a===E.TFOOT||a===E.THEAD||a===E.TR||a===E.TD||a===E.TH?e.openElements.hasInTableScope(a)&&(e.openElements.popUntilTagNamePopped(E.SELECT),e._resetInsertionMode(),e.onEndTag(t)):WT(e,t)}function g8(e,t){switch(t.tagID){case E.BASE:case E.BASEFONT:case E.BGSOUND:case E.LINK:case E.META:case E.NOFRAMES:case E.SCRIPT:case E.STYLE:case E.TEMPLATE:case E.TITLE:{La(e,t);break}case E.CAPTION:case E.COLGROUP:case E.TBODY:case E.TFOOT:case E.THEAD:{e.tmplInsertionModeStack[0]=F.IN_TABLE,e.insertionMode=F.IN_TABLE,Ui(e,t);break}case E.COL:{e.tmplInsertionModeStack[0]=F.IN_COLUMN_GROUP,e.insertionMode=F.IN_COLUMN_GROUP,Qh(e,t);break}case E.TR:{e.tmplInsertionModeStack[0]=F.IN_TABLE_BODY,e.insertionMode=F.IN_TABLE_BODY,$c(e,t);break}case E.TD:case E.TH:{e.tmplInsertionModeStack[0]=F.IN_ROW,e.insertionMode=F.IN_ROW,Gc(e,t);break}default:e.tmplInsertionModeStack[0]=F.IN_BODY,e.insertionMode=F.IN_BODY,An(e,t)}}function b8(e,t){t.tagID===E.TEMPLATE&&$s(e,t)}function JT(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(E.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Vh(e,t)}function x8(e,t){t.tagID===E.HTML?An(e,t):Ac(e,t)}function e_(e,t){var a;if(t.tagID===E.HTML){if(e.fragmentContext||(e.insertionMode=F.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===E.HTML){e._setEndLocation(e.openElements.items[0],t);const s=e.openElements.items[1];s&&!(!((a=e.treeAdapter.getNodeSourceCodeLocation(s))===null||a===void 0)&&a.endTag)&&e._setEndLocation(s,t)}}else Ac(e,t)}function Ac(e,t){e.insertionMode=F.IN_BODY,qc(e,t)}function E8(e,t){switch(t.tagID){case E.HTML:{An(e,t);break}case E.FRAMESET:{e._insertElement(t,be.HTML);break}case E.FRAME:{e._appendElement(t,be.HTML),t.ackSelfClosing=!0;break}case E.NOFRAMES:{La(e,t);break}}}function y8(e,t){t.tagID===E.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==E.FRAMESET&&(e.insertionMode=F.AFTER_FRAMESET))}function T8(e,t){switch(t.tagID){case E.HTML:{An(e,t);break}case E.NOFRAMES:{La(e,t);break}}}function _8(e,t){t.tagID===E.HTML&&(e.insertionMode=F.AFTER_AFTER_FRAMESET)}function N8(e,t){t.tagID===E.HTML?An(e,t):oc(e,t)}function oc(e,t){e.insertionMode=F.IN_BODY,qc(e,t)}function S8(e,t){switch(t.tagID){case E.HTML:{An(e,t);break}case E.NOFRAMES:{La(e,t);break}}}function v8(e,t){t.chars=Pt,e._insertCharacters(t)}function A8(e,t){e._insertCharacters(t),e.framesetOk=!1}function t_(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==be.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function C8(e,t){if(zD(t))t_(e),e._startTagOutsideForeignContent(t);else{const a=e._getAdjustedCurrentElement(),s=e.treeAdapter.getNamespaceURI(a);s===be.MATHML?PT(t):s===be.SVG&&(qD(t),UT(t)),Gh(t),t.selfClosing?e._appendElement(t,s):e._insertElement(t,s),t.ackSelfClosing=!0}}function w8(e,t){if(t.tagID===E.P||t.tagID===E.BR){t_(e),e._endTagOutsideForeignContent(t);return}for(let a=e.openElements.stackTop;a>0;a--){const s=e.openElements.items[a];if(e.treeAdapter.getNamespaceURI(s)===be.HTML){e._endTagOutsideForeignContent(t);break}const l=e.treeAdapter.getTagName(s);if(l.toLowerCase()===t.tagName){t.tagName=l,e.openElements.shortenToLength(a);break}}}W.AREA,W.BASE,W.BASEFONT,W.BGSOUND,W.BR,W.COL,W.EMBED,W.FRAME,W.HR,W.IMG,W.INPUT,W.KEYGEN,W.LINK,W.META,W.PARAM,W.SOURCE,W.TRACK,W.WBR;const k8=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,R8=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),H1={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function n_(e,t){const a=H8(e),s=Ly("type",{handlers:{root:O8,element:I8,text:M8,comment:r_,doctype:D8,raw:j8},unknown:B8}),l={parser:a?new B1(H1):B1.getFragmentParser(void 0,H1),handle(f){s(f,l)},stitches:!1,options:t||{}};s(e,l),Vi(l,Qa());const o=a?l.parser.document:l.parser.getFragment(),d=FM(o,{file:l.options.file});return l.stitches&&vo(d,"comment",function(f,h,m){const b=f;if(b.value.stitch&&m&&h!==void 0){const x=m.children;return x[h]=b.value.stitch,h}}),d.type==="root"&&d.children.length===1&&d.children[0].type===e.type?d.children[0]:d}function a_(e,t){let a=-1;if(e)for(;++a<e.length;)t.handle(e[a])}function O8(e,t){a_(e.children,t)}function I8(e,t){P8(e,t),a_(e.children,t),U8(e,t)}function M8(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const a={type:tt.CHARACTER,chars:e.value,location:wo(e)};Vi(t,Qa(e)),t.parser.currentToken=a,t.parser._processToken(t.parser.currentToken)}function D8(e,t){const a={type:tt.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:wo(e)};Vi(t,Qa(e)),t.parser.currentToken=a,t.parser._processToken(t.parser.currentToken)}function L8(e,t){t.stitches=!0;const a=F8(e);if("children"in e&&"children"in a){const s=n_({type:"root",children:e.children},t.options);a.children=s.children}r_({type:"comment",value:{stitch:a}},t)}function r_(e,t){const a=e.value,s={type:tt.COMMENT,data:a,location:wo(e)};Vi(t,Qa(e)),t.parser.currentToken=s,t.parser._processToken(t.parser.currentToken)}function j8(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,s_(t,Qa(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(k8,"<$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const a=t.parser.tokenizer._consume();t.parser.tokenizer._callState(a)}}function B8(e,t){const a=e;if(t.options.passThrough&&t.options.passThrough.includes(a.type))L8(a,t);else{let s="";throw R8.has(a.type)&&(s=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+a.type+"` node"+s)}}function Vi(e,t){s_(e,t);const a=e.parser.tokenizer.currentCharacterToken;a&&a.location&&(a.location.endLine=e.parser.tokenizer.preprocessor.line,a.location.endCol=e.parser.tokenizer.preprocessor.col+1,a.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=a,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=Xt.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function s_(e,t){if(t&&t.offset!==void 0){const a={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=a}}function P8(e,t){const a=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Xt.PLAINTEXT)return;Vi(t,Qa(e));const s=t.parser.openElements.current;let l="namespaceURI"in s?s.namespaceURI:Ls.html;l===Ls.html&&a==="svg"&&(l=Ls.svg);const o=GM({...e,children:[]},{space:l===Ls.svg?"svg":"html"}),d={type:tt.START_TAG,tagName:a,tagID:Ki(a),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in o?o.attrs:[],location:wo(e)};t.parser.currentToken=d,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=a}function U8(e,t){const a=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&eD.includes(a)||t.parser.tokenizer.state===Xt.PLAINTEXT)return;Vi(t,Pc(e));const s={type:tt.END_TAG,tagName:a,tagID:Ki(a),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:wo(e)};t.parser.currentToken=s,t.parser._processToken(t.parser.currentToken),a===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Xt.RCDATA||t.parser.tokenizer.state===Xt.RAWTEXT||t.parser.tokenizer.state===Xt.SCRIPT_DATA)&&(t.parser.tokenizer.state=Xt.DATA)}function H8(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function wo(e){const t=Qa(e)||{line:void 0,column:void 0,offset:void 0},a=Pc(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:a.line,endCol:a.column,endOffset:a.offset}}function F8(e){return"children"in e?Pi({...e,children:[]}):Pi(e)}function oo(e){return function(t,a){return n_(t,{...e,file:a})}}const F1=[{key:"open",label:"开放"},{key:"closed",label:"已关闭"},{key:"all",label:"全部"}];function z8(e){const t=e<1e12?e*1e3:e,a=Date.now()-t;return a<6e4?"刚刚":a<36e5?`${Math.floor(a/6e4)}分钟前`:a<864e5?`${Math.floor(a/36e5)}小时前`:a<2592e6?`${Math.floor(a/864e5)}天前`:new Date(t).toLocaleDateString("zh-CN",{month:"short",day:"numeric"})}function z1({onDone:e}){const[t,a]=A.useState(""),[s,l]=A.useState(""),[o,d]=A.useState(!1),f=Pe(b=>b.createIssue),h=async()=>{!t.trim()||o||(d(!0),await f(t.trim(),s.trim()||void 0),d(!1),e())},m=b=>{(b.metaKey||b.ctrlKey)&&b.key==="Enter"&&(b.preventDefault(),h())};return c.jsxs("div",{className:"border-b border-line px-3 py-3",children:[c.jsx("input",{type:"text",value:t,onChange:b=>a(b.target.value),onKeyDown:m,placeholder:"Issue 标题",autoFocus:!0,className:"w-full rounded-md border border-line bg-base px-2.5 py-1.5 text-xs text-fg placeholder:text-fg-6 focus:border-fg-5 focus:outline-none"}),c.jsx("textarea",{value:s,onChange:b=>l(b.target.value),onKeyDown:m,placeholder:"描述(可选) ⌘⏎ 创建",rows:3,className:"mt-2 w-full resize-none rounded-md border border-line bg-base px-2.5 py-1.5 text-xs text-fg placeholder:text-fg-6 focus:border-fg-5 focus:outline-none"}),c.jsxs("div",{className:"mt-2 flex items-center justify-end gap-2",children:[c.jsx("button",{type:"button",onClick:e,className:"rounded-md px-2.5 py-1 text-xs text-fg-4 transition-colors hover:text-fg-2",children:"取消"}),c.jsx("button",{type:"button",onClick:()=>void h(),disabled:!t.trim()||o,className:"rounded-md bg-blue-600 px-3 py-1 text-xs font-medium text-white transition-colors hover:bg-blue-500 disabled:opacity-40",children:"创建"})]})]})}function q8({repoId:e,issueNumber:t,onPublished:a}){const s=Na(),l=qe(Da),[o,d]=A.useState(""),[f,h]=A.useState("idle"),[m,b]=A.useState(""),[x,y]=A.useState(null),[T,N]=A.useState(!1),S=A.useRef(null),C=A.useCallback(()=>{S.current&&(clearInterval(S.current),S.current=null)},[]);A.useEffect(()=>()=>C(),[C]),A.useEffect(()=>{let L=!1;return sx(e,t).then(Y=>{!L&&Y.body&&(b(Y.body),h("preview"))}).catch(()=>{}),()=>{L=!0}},[e,t]);const v=async()=>{if(!(!o.trim()||T)){N(!0);try{const L=await rx(e,t,o.trim());a(L),d(""),Yt.getState().addToast("评论已发布","success")}catch(L){Yt.getState().addToast(L instanceof Error?L.message:"发布失败","error")}finally{N(!1)}}},M=async()=>{if(!(!o.trim()||f==="polishing")){h("polishing");try{const{sessionId:L}=await j3(e,t,o.trim());y(L),S.current=setInterval(async()=>{try{if((await BE(e,L)).type==="idle"){C();const re=await sx(e,t);b(re.body),h("preview")}}catch{C(),h("idle"),Yt.getState().addToast("润色状态检查失败","error")}},2e3)}catch(L){h("idle"),Yt.getState().addToast(L instanceof Error?L.message:"润色启动失败","error")}}},k=async()=>{if(!(!m.trim()||T)){N(!0);try{const L=await rx(e,t,m.trim());a(L),d(""),b(""),y(null),h("idle"),Yt.getState().addToast("评论已发布","success")}catch(L){Yt.getState().addToast(L instanceof Error?L.message:"发布失败","error")}finally{N(!1)}}},D=()=>{C(),b(""),y(null),h("idle")},$=()=>{!x||!l||(Ue.setState({activeSessionId:x}),s(`/${encodeURIComponent(l)}/run`))};return f==="preview"?c.jsxs("div",{className:"mt-8 border-t border-line pt-6",children:[c.jsxs("h3",{className:"mb-3 flex items-center gap-1.5 text-xs font-semibold uppercase tracking-wider text-fg-4",children:[c.jsx(sm,{className:"h-3.5 w-3.5 text-amber-400"}),"AI 润色结果"]}),c.jsx("div",{className:"rounded-lg border border-amber-500/30 bg-amber-500/5 px-4 py-3",children:c.jsx("textarea",{value:m,onChange:L=>b(L.target.value),rows:6,className:"w-full resize-none bg-transparent text-sm text-fg placeholder:text-fg-6 focus:outline-none"})}),c.jsxs("div",{className:"mt-3 flex items-center gap-2",children:[c.jsxs("button",{type:"button",disabled:T,onClick:()=>void k(),className:"flex items-center gap-1.5 rounded-md bg-blue-600 px-3 py-1.5 text-xs font-medium text-white transition-colors hover:bg-blue-500 disabled:opacity-40",children:[c.jsx(Pm,{className:"h-3.5 w-3.5"}),"发布评论"]}),c.jsxs("button",{type:"button",onClick:()=>void M(),className:"flex items-center gap-1.5 rounded-md border border-line px-2.5 py-1.5 text-xs text-fg-3 transition-colors hover:border-fg-5 hover:text-fg",children:[c.jsx(sm,{className:"h-3.5 w-3.5"}),"重新润色"]}),c.jsx("button",{type:"button",onClick:$,className:"flex items-center gap-1.5 rounded-md border border-line px-2.5 py-1.5 text-xs text-fg-3 transition-colors hover:border-blue-500/50 hover:text-blue-400",children:"转入深度对话"}),c.jsx("button",{type:"button",onClick:D,className:"ml-auto rounded-md px-2.5 py-1.5 text-xs text-fg-5 transition-colors hover:text-fg-3",children:"放弃"})]})]}):c.jsxs("div",{className:"mt-8 border-t border-line pt-6",children:[c.jsx("h3",{className:"mb-3 text-xs font-semibold uppercase tracking-wider text-fg-4",children:"添加评论"}),c.jsx("textarea",{value:o,onChange:L=>d(L.target.value),placeholder:"写下你的评论...",rows:4,disabled:f==="polishing",className:"w-full resize-none rounded-lg border border-line bg-base px-3 py-2.5 text-sm text-fg placeholder:text-fg-6 focus:border-fg-5 focus:outline-none disabled:opacity-50"}),c.jsxs("div",{className:"mt-2.5 flex items-center gap-2",children:[c.jsxs("button",{type:"button",disabled:!o.trim()||T||f==="polishing",onClick:()=>void v(),className:"flex items-center gap-1.5 rounded-md bg-blue-600 px-3 py-1.5 text-xs font-medium text-white transition-colors hover:bg-blue-500 disabled:opacity-40",children:[c.jsx(Pm,{className:"h-3.5 w-3.5"}),T?"发送中...":"直接发送"]}),c.jsxs("button",{type:"button",disabled:!o.trim()||f==="polishing",onClick:()=>void M(),className:"flex items-center gap-1.5 rounded-md border border-amber-500/30 bg-amber-500/10 px-3 py-1.5 text-xs font-medium text-amber-400 transition-colors hover:bg-amber-500/20 disabled:opacity-40",children:[c.jsx(sm,{className:"h-3.5 w-3.5"}),f==="polishing"?"润色中...":"AI 润色"]})]})]})}function q1({issue:e,sessionCount:t,isActive:a,isEpic:s,milestone:l,onSelect:o}){return c.jsx("li",{children:c.jsxs("button",{type:"button",onClick:o,className:me("group flex w-full items-center gap-2.5 rounded-md px-2.5 py-2 text-left transition-colors",a?"border-l-2 border-blue-500 bg-elevated/80":"border-l-2 border-transparent hover:bg-elevated/50"),children:[c.jsx("span",{className:me("flex h-10 w-10 shrink-0 items-center justify-center rounded-full font-mono text-sm font-bold",e.state==="open"?"bg-gradient-to-br from-emerald-500/20 to-emerald-500/5 text-emerald-400 ring-1 ring-emerald-500/25":"bg-gradient-to-br from-purple-500/20 to-purple-500/5 text-purple-400 ring-1 ring-purple-500/25"),children:e.number}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsxs("div",{className:"flex items-center gap-1.5",children:[s&&c.jsx("span",{className:"shrink-0 rounded px-1 py-0.5 text-[9px] font-bold tracking-wide bg-amber-400/12 text-amber-400",children:"EPIC"}),c.jsx("span",{className:"min-w-0 text-xs font-medium text-fg-2 group-hover:text-fg",children:e.title})]}),e.labels&&e.labels.length>0&&c.jsx("div",{className:"mt-1 flex flex-wrap gap-1",children:e.labels.map(d=>c.jsx("span",{className:"rounded px-1 py-0.5 text-[10px] font-medium",style:{backgroundColor:`#${d.color}20`,color:`#${d.color}`},children:d.name},d.id))}),l&&c.jsxs("span",{className:"mt-1 flex items-center gap-1 text-[10px] text-indigo-400/70",children:[c.jsx(xh,{className:"h-2.5 w-2.5"}),l.title]})]}),t>0&&c.jsx("span",{className:"shrink-0 rounded-full bg-elevated px-1.5 py-0.5 font-mono text-[10px] text-fg-5",children:t})]})})}function Y8({issue:e,sessionCount:t,isEpic:a,milestone:s,onSelect:l}){return c.jsx("li",{children:c.jsxs("button",{type:"button",onClick:l,className:"group flex w-full items-center gap-3 border-b border-line px-4 py-3 text-left transition-colors hover:bg-elevated/50",children:[c.jsx("span",{className:me("flex h-10 w-10 shrink-0 items-center justify-center rounded-full font-mono text-sm font-bold",e.state==="open"?"bg-gradient-to-br from-emerald-500/20 to-emerald-500/5 text-emerald-400 ring-1 ring-emerald-500/25":"bg-gradient-to-br from-purple-500/20 to-purple-500/5 text-purple-400 ring-1 ring-purple-500/25"),children:e.number}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[a&&c.jsx("span",{className:"shrink-0 rounded px-1.5 py-0.5 text-[9px] font-bold tracking-wide bg-amber-400/12 text-amber-400",children:"EPIC"}),c.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium text-fg-2 group-hover:text-fg",children:e.title}),s&&c.jsxs("span",{className:"hidden shrink-0 items-center gap-1 rounded px-1.5 py-0.5 text-[10px] font-medium bg-indigo-500/15 text-indigo-400 sm:flex",children:[c.jsx(xh,{className:"h-2.5 w-2.5"}),s.title]}),t>0&&c.jsxs("span",{className:"shrink-0 rounded-full bg-elevated px-2 py-0.5 font-mono text-[10px] text-fg-5",children:[t," 次运行"]}),e.assignees&&e.assignees.length>0&&c.jsxs("div",{className:"hidden shrink-0 items-center -space-x-1.5 sm:flex",children:[e.assignees.slice(0,3).map(o=>c.jsx("img",{src:o.avatar_url,alt:o.login,title:o.login,className:"h-5 w-5 rounded-full ring-2 ring-surface"},o.login)),e.assignees.length>3&&c.jsxs("span",{className:"flex h-5 w-5 items-center justify-center rounded-full bg-elevated text-[9px] font-medium text-fg-4 ring-2 ring-surface",children:["+",e.assignees.length-3]})]})]}),c.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-1",children:[e.authorLogin&&c.jsxs("span",{className:"shrink-0 text-[11px] text-fg-5",title:e.authorLogin,children:[e.authorAvatar&&c.jsx("img",{src:e.authorAvatar,alt:"",className:"mr-1 inline-block h-3.5 w-3.5 rounded-full align-text-bottom"}),e.authorLogin]}),e.authorLogin&&c.jsx("span",{className:"text-fg-6",children:"·"}),c.jsx("span",{className:"shrink-0 text-[11px] text-fg-6",children:z8(e.createdAt)}),(e.commentCount??0)>0&&c.jsxs("span",{className:"flex shrink-0 items-center gap-0.5 text-[11px] text-fg-6",children:[c.jsx("span",{className:"text-fg-6",children:"·"}),c.jsx(dA,{className:"h-3 w-3"}),e.commentCount]}),(e.labels&&e.labels.length>0||(e.commentCount??0)>0||e.authorLogin)&&e.labels&&e.labels.length>0&&c.jsx("span",{className:"text-fg-6",children:"·"}),e.labels&&e.labels.length>0?e.labels.map(o=>c.jsx("span",{className:"rounded px-1.5 py-0.5 text-[11px] font-medium",style:{backgroundColor:`#${o.color}20`,color:`#${o.color}`},children:o.name},o.id)):e.authorLogin?null:c.jsx("span",{className:"text-[11px] text-fg-6",children:" "})]})]})]})})}function $8({issue:e,milestone:t,onBack:a,onClose:s,onToggleSidebar:l}){var ae;const o=Na(),d=qe(se=>se.activeRepoId),f=qe(Da),[h,m]=A.useState([]),[b,x]=A.useState(!1),[y,T]=A.useState([]),[N,S]=A.useState(0),[C,v]=A.useState(!1),[M,k]=A.useState(!1),[D,$]=A.useState("issue"),L=Pe(se=>se.updateIssueState);A.useEffect(()=>{d&&(x(!0),L3(d,e.number).then(m).catch(()=>m([])).finally(()=>x(!1)))},[d,e.number]),A.useEffect(()=>{d&&nx(d,e.number).then(T).catch(()=>T([]))},[d,e.number]),A.useEffect(()=>{$("issue"),S(0)},[e.id]);const Y=y[N]??y[0],re=async se=>{if(!(C||!d||!Y)){v(!0);try{await k3(d,e.number,Y.number,se),se&&await L(e.number,"closed");const Z=await nx(d,e.number);T(Z),N>=Z.length&&S(Math.max(0,Z.length-1)),Yt.getState().addToast(`PR #${Y.number} 合入成功`,"success")}catch(Z){let J="合入失败";if(Z instanceof Us)try{J=JSON.parse(Z.message).error??J}catch{J=Z.message}Yt.getState().addToast(J,"error")}finally{v(!1)}}},fe=()=>{if(!Y)return;const se=`请解决 PR #${Y.number} 的合并冲突: ${Y.title}`;Pe.getState().setSelectedIssue(e.id),Pe.getState().setPendingDraft(se),Pe.getState().setPreviewIssue(null),Ue.setState({activeSessionId:null}),o(`/${encodeURIComponent(f)}/run`)},U=()=>{Pe.getState().setSelectedIssue(e.id),Pe.getState().setPreviewIssue(null),Ue.setState({activeSessionId:null}),o(`/${encodeURIComponent(f)}/run`)},H=se=>{const Z=new Date(se);return Z.toLocaleDateString("zh-CN",{month:"short",day:"numeric"})+" "+Z.toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit"})};return c.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[c.jsxs("header",{className:"flex flex-col gap-2 border-b border-line px-4 py-3 md:flex-row md:items-center md:gap-3 md:px-6",children:[c.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-3",children:[c.jsx("button",{type:"button",onClick:a,"aria-label":"返回列表",className:"-ml-1 shrink-0 rounded-md p-1.5 text-fg-3 transition-colors hover:bg-elevated hover:text-fg md:hidden",children:c.jsx(SE,{className:"h-5 w-5"})}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsxs("span",{className:me("shrink-0 rounded px-1.5 py-0.5 font-mono text-[10px] font-semibold",e.state==="open"?"bg-emerald-500/15 text-emerald-400":"bg-purple-500/15 text-purple-400"),children:["#",e.number," ",e.state]}),(ae=e.labels)==null?void 0:ae.map(se=>c.jsx("span",{className:"rounded px-1.5 py-0.5 text-[10px] font-medium",style:{backgroundColor:`#${se.color}20`,color:`#${se.color}`},children:se.name},se.id)),t&&c.jsxs("span",{className:"flex items-center gap-1 rounded px-1.5 py-0.5 text-[10px] font-medium bg-indigo-500/15 text-indigo-400",children:[c.jsx(xh,{className:"h-2.5 w-2.5"}),t.title]})]}),c.jsx("h2",{className:"mt-1 text-base font-semibold text-fg",children:e.title}),(e.authorLogin||e.assignees&&e.assignees.length>0)&&c.jsxs("div",{className:"mt-1.5 flex items-center gap-3 text-xs text-fg-4",children:[e.authorLogin&&c.jsxs("span",{className:"flex items-center gap-1.5",children:[e.authorAvatar&&c.jsx("img",{src:e.authorAvatar,alt:"",className:"h-4 w-4 rounded-full"}),e.authorLogin]}),e.assignees&&e.assignees.length>0&&c.jsxs("span",{className:"flex items-center gap-1",children:[c.jsx("span",{className:"text-fg-5",children:"→"}),c.jsx("span",{className:"flex items-center -space-x-1",children:e.assignees.map(se=>c.jsx("img",{src:se.avatar_url,alt:se.login,title:se.login,className:"h-4 w-4 rounded-full ring-1 ring-surface"},se.login))}),c.jsx("span",{className:"text-fg-4",children:e.assignees.map(se=>se.login).join(", ")})]})]})]})]}),c.jsxs("div",{className:"flex shrink-0 flex-wrap items-center gap-2",children:[e.htmlUrl&&c.jsxs("a",{href:e.htmlUrl,target:"_blank",rel:"noopener noreferrer",className:"flex h-8 items-center gap-1.5 rounded-md border border-line px-2.5 font-mono text-xs text-fg-3 transition-colors hover:border-fg-5 hover:text-fg",children:[c.jsx(fc,{className:"h-3.5 w-3.5"}),"源站"]}),c.jsxs("button",{type:"button",onClick:()=>{Pe.getState().enterMatchMode(e.id),Ue.setState({activeSessionId:null}),o(`/${encodeURIComponent(f)}/run`)},className:"flex h-8 items-center gap-1.5 rounded-md border border-line px-2.5 text-xs text-fg-3 transition-colors hover:border-blue-500/50 hover:text-blue-400",children:[c.jsx(Ic,{className:"h-3.5 w-3.5"}),"匹配子任务"]}),c.jsx("button",{type:"button",disabled:M,onClick:async()=>{k(!0),await L(e.number,e.state==="open"?"closed":"open"),k(!1)},className:me("flex h-8 items-center gap-1.5 rounded-md border px-2.5 text-xs font-medium transition-colors disabled:opacity-40",e.state==="open"?"border-red-500/30 text-red-400 hover:border-red-500/60 hover:bg-red-500/10":"border-emerald-500/30 text-emerald-400 hover:border-emerald-500/60 hover:bg-emerald-500/10"),children:e.state==="open"?c.jsxs(c.Fragment,{children:[c.jsx(vE,{className:"h-3.5 w-3.5"}),"关闭"]}):c.jsxs(c.Fragment,{children:[c.jsx(co,{className:"h-3.5 w-3.5"}),"重新打开"]})}),c.jsxs("button",{type:"button",onClick:U,className:"flex h-8 items-center gap-1.5 rounded-md bg-blue-600 px-3 text-xs font-medium text-white transition-colors hover:bg-blue-500",children:[c.jsx(Lc,{className:"h-3.5 w-3.5 fill-current"}),"开始处理"]}),l&&c.jsx("button",{type:"button",onClick:l,title:"面板",className:"flex h-8 w-8 items-center justify-center rounded-md border border-line text-fg-4 transition-colors hover:border-fg-5 hover:text-fg-2",children:c.jsx(CE,{className:"h-4 w-4"})}),s&&c.jsx("button",{type:"button",onClick:s,title:"关闭详情",className:"hidden h-8 w-8 items-center justify-center rounded-md border border-line text-fg-4 transition-colors hover:border-fg-5 hover:text-fg-2 md:flex",children:c.jsx(Tt,{className:"h-4 w-4"})})]})]}),y.length>0&&c.jsxs("div",{className:"flex shrink-0 items-center border-b border-line bg-surface",children:[c.jsxs("button",{type:"button",onClick:()=>$("issue"),className:me("flex items-center gap-1.5 border-b-2 px-4 py-2.5 text-xs font-medium transition-colors",D==="issue"?"border-blue-500 text-fg":"border-transparent text-fg-4 hover:text-fg-2"),children:[c.jsx(co,{className:"h-3.5 w-3.5"}),"Issue"]}),c.jsxs("button",{type:"button",onClick:()=>$("pr"),className:me("flex items-center gap-1.5 border-b-2 px-4 py-2.5 text-xs font-medium transition-colors",D==="pr"?"border-blue-500 text-fg":"border-transparent text-fg-4 hover:text-fg-2"),children:[c.jsx(fo,{className:"h-3.5 w-3.5"}),"PR",c.jsx("span",{className:me("rounded-full px-1.5 py-0.5 font-mono text-[10px]",D==="pr"?"bg-blue-500/10 text-blue-500":"bg-elevated text-fg-5"),children:y.length}),y.some(se=>se.mergeable===!1)&&c.jsxs("span",{className:"rounded px-1.5 py-0.5 text-[10px] font-semibold bg-red-500/15 text-red-400",children:[c.jsx(ia,{className:"inline h-3 w-3 -mt-px"})," Conflict"]})]})]}),D==="issue"||y.length===0?c.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:c.jsxs("div",{className:"mx-auto max-w-3xl px-4 py-6 md:px-6",children:[e.body?c.jsx("div",{className:"markdown-body leading-relaxed",children:c.jsx(ls,{remarkPlugins:[os],rehypePlugins:[oo],children:e.body})}):c.jsx("p",{className:"py-10 text-center font-mono text-xs text-fg-5",children:"该 Issue 没有描述内容"}),b?c.jsx("p",{className:"mt-8 text-center font-mono text-xs text-fg-6",children:"加载评论…"}):h.length>0&&c.jsxs("div",{className:"mt-8 border-t border-line pt-6",children:[c.jsxs("h3",{className:"mb-4 text-xs font-semibold uppercase tracking-wider text-fg-4",children:["评论 (",h.length,")"]}),c.jsx("div",{className:"space-y-4",children:h.map(se=>c.jsxs("div",{className:"rounded-lg border border-line bg-elevated/40 px-4 py-3",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("img",{src:se.user.avatar_url,alt:se.user.login,className:"h-5 w-5 rounded-full"}),c.jsx("span",{className:"text-xs font-semibold text-fg-2",children:se.user.login}),c.jsx("span",{className:"text-[10px] text-fg-6",children:H(se.created_at)})]}),c.jsx("div",{className:"markdown-body mt-2 text-sm leading-relaxed text-fg-3",children:c.jsx(ls,{remarkPlugins:[os],rehypePlugins:[oo],children:se.body})})]},se.id))})]}),d&&c.jsx(q8,{repoId:d,issueNumber:e.number,onPublished:se=>m(Z=>[...Z,se])},e.id)]})}):c.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[c.jsxs("div",{className:"flex shrink-0 flex-wrap items-center gap-2 border-b border-line bg-surface px-4 py-0",children:[y.length>1&&y.map((se,Z)=>c.jsxs("button",{type:"button",onClick:()=>S(Z),className:me("flex items-center gap-1.5 border-b-2 px-2.5 py-2.5 text-xs font-medium transition-colors",Z===N?"border-blue-500 text-fg":"border-transparent text-fg-4 hover:text-fg-2"),children:[c.jsxs("span",{className:"font-mono text-[10px]",children:["#",se.number]}),c.jsx("span",{className:"max-w-[140px] truncate",children:se.title})]},se.number)),c.jsxs("div",{className:me("flex items-center gap-2",y.length>1&&"ml-auto"),children:[(Y==null?void 0:Y.html_url)&&c.jsxs("a",{href:Y.html_url,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 rounded-md border border-line px-2 py-1.5 font-mono text-[11px] text-fg-3 transition-colors hover:border-fg-5 hover:text-fg",children:[c.jsx(fc,{className:"h-3 w-3"}),c.jsx("span",{className:"hidden sm:inline",children:"查看"})]}),(Y==null?void 0:Y.mergeable)===!1&&c.jsxs("button",{type:"button",onClick:fe,className:"flex items-center gap-1.5 rounded-md border border-amber-500/30 px-2.5 py-1.5 text-xs font-medium text-amber-400 transition-colors hover:border-amber-500/60 hover:bg-amber-500/10",children:[c.jsx(GA,{className:"h-3.5 w-3.5"}),c.jsx("span",{className:"hidden sm:inline",children:"解冲突"})]}),c.jsxs("button",{type:"button",disabled:C||(Y==null?void 0:Y.mergeable)===!1,onClick:()=>void re(!1),className:"flex items-center gap-1.5 rounded-md border border-emerald-500/30 px-2.5 py-1.5 text-xs font-medium text-emerald-400 transition-colors hover:border-emerald-500/60 hover:bg-emerald-500/10 disabled:opacity-40",children:[c.jsx(mc,{className:"h-3.5 w-3.5"}),c.jsx("span",{className:"hidden sm:inline",children:"合入"})]}),c.jsxs("button",{type:"button",disabled:C||(Y==null?void 0:Y.mergeable)===!1,onClick:()=>void re(!0),className:"flex items-center gap-1.5 rounded-md border border-blue-500/30 px-2.5 py-1.5 text-xs font-medium text-blue-400 transition-colors hover:border-blue-500/60 hover:bg-blue-500/10 disabled:opacity-40",children:[c.jsx(mc,{className:"h-3.5 w-3.5"}),c.jsx("span",{className:"hidden sm:inline",children:"合入并关闭"})]})]})]}),Y&&c.jsx("div",{className:"flex-1 overflow-y-auto",children:c.jsxs("div",{className:"mx-auto max-w-3xl px-4 py-6 md:px-6",children:[c.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[c.jsxs("span",{className:me("shrink-0 rounded px-1.5 py-0.5 font-mono text-[10px] font-semibold",Y.state==="open"?"bg-emerald-500/15 text-emerald-400":"bg-purple-500/15 text-purple-400"),children:["#",Y.number," ",Y.state]}),Y.mergeable===!1&&c.jsx("span",{className:"shrink-0 rounded px-1.5 py-0.5 text-[10px] font-semibold bg-red-500/15 text-red-400",children:"Conflict"}),c.jsx("span",{className:"text-sm font-semibold text-fg",children:Y.title})]}),Y.body?c.jsx("div",{className:"markdown-body leading-relaxed",children:c.jsx(ls,{remarkPlugins:[os],rehypePlugins:[oo],children:Y.body})}):c.jsx("p",{className:"py-6 text-center font-mono text-xs text-fg-5",children:"该 PR 没有描述内容"})]})})]})]})}function i_({issue:e,childrenMap:t,currentId:a,onSelect:s,depth:l}){const o=t.get(e.id)??[],d=e.id===a;return c.jsxs("div",{children:[c.jsxs("button",{type:"button",onClick:()=>s(e.id),className:me("group flex w-full items-center gap-1.5 rounded-md px-2 py-1.5 text-left text-xs transition-colors",d?"bg-blue-500/10 text-blue-400":"text-fg-4 hover:bg-elevated/60 hover:text-fg-2"),style:{paddingLeft:`${l*18+8}px`},children:[c.jsx("span",{className:me("h-1.5 w-1.5 shrink-0 rounded-full",e.state==="open"?"bg-emerald-400":"bg-purple-400")}),c.jsxs("span",{className:"shrink-0 font-mono text-[10px] text-fg-6",children:["#",e.number]}),c.jsx("span",{className:"min-w-0 truncate",children:e.title})]}),o.length>0&&c.jsxs("div",{className:"relative",children:[c.jsx("div",{className:"absolute top-0 bottom-3 w-px bg-line",style:{left:`${l*18+16}px`}}),o.map(f=>c.jsx(i_,{issue:f,childrenMap:t,currentId:a,onSelect:s,depth:l+1},f.id))]})]})}function G8(e,t){let a=0,s=0;const l=[...t.get(e)??[]];for(let o=0;o<l.length;o++){const d=l[o];a++,d.state==="closed"&&s++;const f=t.get(d.id);f&&l.push(...f)}return{total:a,closed:s}}function K8(e){var o;const t=typeof((o=e.time)==null?void 0:o.created)=="number"?e.time.created:e.createdAt?Date.parse(e.createdAt):0;if(!t||Number.isNaN(t))return"";const a=t<1e12?t*1e3:t,s=new Date(a);return s.toDateString()===new Date().toDateString()?s.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"}):s.toLocaleDateString(void 0,{month:"short",day:"numeric"})}function Y1({session:e,onSelect:t}){var s,l;const a=K8(e);return c.jsx("li",{children:c.jsxs("button",{type:"button",onClick:t,className:"block w-full rounded-md border-l-2 border-transparent px-2.5 py-2 text-left transition-colors hover:bg-elevated/50",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"min-w-0 truncate font-mono text-xs text-fg-3",children:((s=e.agent)==null?void 0:s.trim())||"默认"}),a&&c.jsx("span",{className:"ml-auto shrink-0 font-mono text-[10px] tabular-nums text-fg-5",children:a})]}),c.jsx("div",{className:"mt-0.5 truncate text-sm text-fg-2",children:((l=e.title)==null?void 0:l.trim())||"未命名运行"})]})})}function l_({sessions:e,onSelect:t}){const a=Pe(d=>d.issues),s=new Map(a.map(d=>[d.id,d])),l=new Map,o=[];for(const d of e)if(d.issueId&&s.has(d.issueId)){const f=l.get(d.issueId)??[];f.push(d),l.set(d.issueId,f)}else o.push(d);return c.jsxs("div",{className:"flex min-h-0 flex-1 flex-col border-t border-line",children:[c.jsxs("div",{className:"flex items-center gap-1.5 border-b border-line px-3 py-3",children:[c.jsx(dv,{className:"h-3.5 w-3.5 text-fg-5"}),c.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-fg-4",children:"运行记录"}),c.jsx("span",{className:"ml-auto rounded-full bg-elevated px-1.5 py-0.5 font-mono text-[10px] text-fg-5",children:e.length})]}),c.jsx("div",{className:"flex-1 overflow-y-auto px-2 py-2",children:e.length===0?c.jsx("p",{className:"px-2 py-4 text-center font-mono text-[10px] text-fg-6",children:"暂无运行记录"}):c.jsxs("div",{className:"space-y-3",children:[[...l.entries()].map(([d,f])=>{const h=s.get(d);return c.jsxs("div",{children:[c.jsxs("div",{className:"mb-1 flex items-center gap-1.5 px-1",children:[c.jsxs("span",{className:me("shrink-0 rounded px-1.5 py-0.5 font-mono text-[10px] font-medium",h.state==="open"?"bg-emerald-500/15 text-emerald-400":"bg-purple-500/15 text-purple-400"),children:["#",h.number]}),c.jsx("span",{className:"min-w-0 truncate text-xs font-medium text-fg-3",children:h.title})]}),c.jsx("ul",{className:"space-y-0.5",children:f.map(m=>c.jsx(Y1,{session:m,onSelect:()=>t(m.id)},m.id))})]},d)}),o.length>0&&c.jsxs("div",{children:[l.size>0&&c.jsx("div",{className:"mb-1 px-1",children:c.jsx("span",{className:"text-xs font-medium text-fg-5",children:"未关联 Issue"})}),c.jsx("ul",{className:"space-y-0.5",children:o.map(d=>c.jsx(Y1,{session:d,onSelect:()=>t(d.id)},d.id))})]})]})})]})}function V8({rootIssue:e,childrenMap:t,currentId:a,onSelect:s,sessions:l,onSessionSelect:o}){const{total:d,closed:f}=G8(e.id,t),h=d===0?0:Math.round(f/d*100);return c.jsxs("div",{className:"flex w-full flex-col",children:[c.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[c.jsxs("div",{className:"flex items-center gap-1.5 border-b border-line px-3 py-3",children:[c.jsx(TA,{className:"h-3.5 w-3.5 text-fg-5"}),c.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-fg-4",children:"子任务树"})]}),d>0&&c.jsxs("div",{className:"border-b border-line px-3 py-2",children:[c.jsx("div",{className:"h-1 overflow-hidden rounded-full bg-elevated",children:c.jsx("div",{className:"h-full rounded-full bg-gradient-to-r from-emerald-400 to-blue-500 transition-all",style:{width:`${h}%`}})}),c.jsxs("p",{className:"mt-1 font-mono text-[10px] text-fg-6",children:[f," / ",d," completed"]})]}),c.jsx("div",{className:"flex-1 overflow-y-auto py-2",children:c.jsx(i_,{issue:e,childrenMap:t,currentId:a,onSelect:s,depth:0})})]}),c.jsx(l_,{sessions:l,onSelect:o})]})}function Q8({sessions:e,onSessionSelect:t}){return c.jsx("div",{className:"flex w-full flex-col",children:c.jsx(l_,{sessions:e,onSelect:t})})}function X8(){const[e,t]=A.useState("open"),[a,s]=A.useState("stray"),[l,o]=A.useState(!1),[d,f]=A.useState(""),[h,m]=A.useState(null),[b,x]=A.useState(null),[y,T]=A.useState(!1),[N,S]=A.useState(!1),[C,v]=A.useState(null),[M,k]=A.useState(null),[D,$]=A.useState(null),[L,Y]=TE(),re=Pe(P=>P.issues),fe=Pe(P=>P.syncing),U=Pe(P=>P.syncIssues),H=Pe(P=>P.tags),ae=Pe(P=>P.tagFilterMode),se=Pe(P=>P.cycleTagFilter),Z=Pe(P=>P.clearTagFilter),J=Pe(P=>P.loadTags),V=Pe(P=>P.milestones),G=Pe(P=>P.selectedMilestoneId),pe=Pe(P=>P.setMilestoneFilter),ke=Pe(P=>P.loadMilestones),B=qe(P=>P.activeRepoId),R=Ue(P=>P.sessions);A.useEffect(()=>{const P=L.get("issueId");P&&re.some(Se=>Se.id===P)&&(m(P),Y({},{replace:!0}))},[L,Y,re]),A.useEffect(()=>{B&&(J(),ke())},[B,J,ke]);const X=new Map;for(const P of R)P.issueId&&!P.parentID&&X.set(P.issueId,(X.get(P.issueId)??0)+1);const O=new Set(re.filter(P=>P.parentId).map(P=>P.parentId)),ge=new Map;for(const P of re)if(P.parentId){const Se=ge.get(P.parentId);Se?Se.push(P):ge.set(P.parentId,[P])}function ve(P){return P.parentId?"task":O.has(P.id)?"epic":"stray"}const Ae=new Map(V.map(P=>[P.id,P])),$e=e==="all"?re:re.filter(P=>P.state===e),dt=a==="all"?$e:$e.filter(P=>ve(P)===a),ut=ae.size===0?dt:dt.filter(P=>{var ft;const Se=new Set((P.labels??[]).map(ln=>ln.name));for(const[ln,Zt]of ae){const Ot=(ft=H.find(cn=>cn.id===ln))==null?void 0:ft.name;if(Ot&&(Zt==="include"&&!Se.has(Ot)||Zt==="exclude"&&Se.has(Ot)))return!1}return!0}),Ft=d.trim().toLowerCase(),yn=Ft?ut.filter(P=>`#${P.number} ${P.title}`.toLowerCase().includes(Ft)):ut,ua=G?yn.filter(P=>P.milestoneId===G):yn,Sa=M?ua.filter(P=>P.authorLogin===M):ua,un=D?Sa.filter(P=>(P.assignees??[]).some(Se=>Se.login===D)):Sa,Vn=(()=>{const P=new Map;for(const Se of re)Se.authorLogin&&!P.has(Se.authorLogin)&&P.set(Se.authorLogin,{login:Se.authorLogin,avatar:Se.authorAvatar});return[...P.values()]})(),Je=(()=>{const P=new Map;for(const Se of re)for(const ft of Se.assignees??[])P.has(ft.login)||P.set(ft.login,{login:ft.login,avatar:ft.avatar_url});return[...P.values()]})(),Dn=re.filter(P=>P.state==="open").length,Cn=re.filter(P=>P.state==="closed").length,ca=$e.filter(P=>ve(P)==="epic").length,va=$e.filter(P=>ve(P)==="task").length,Za=$e.filter(P=>ve(P)==="stray").length,ja=re.find(P=>P.id===h)??null,Ar=Na(),_t=new Set;if(h&&(_t.add(h),b)){_t.add(b);const P=[...ge.get(b)??[]];for(let Se=0;Se<P.length;Se++){_t.add(P[Se].id);const ft=ge.get(P[Se].id);ft&&P.push(...ft)}}const Wa=R.filter(P=>P.issueId&&_t.has(P.issueId)&&!P.parentID),oe=qe(Da),Te=P=>{Ue.setState({activeSessionId:P}),Ar(`/${encodeURIComponent(oe)}/run`)},Be=ST({onSwipeRight:()=>S(!0),onSwipeLeft:()=>T(!0),disabled:!h||N||y});return c.jsxs("div",{className:"flex min-h-0 flex-1",...Be,children:[c.jsxs("div",{className:me("shrink-0 flex-col bg-surface",h?"hidden md:flex md:w-80 border-r border-line":"flex w-full"),children:[h?c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"flex items-center justify-between border-b border-line px-3 py-3",children:[c.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-fg-3",children:"Issues"}),B&&c.jsx("div",{className:"flex items-center gap-1",children:c.jsx("button",{type:"button",onClick:()=>void U(),disabled:fe,title:"同步",className:"flex h-7 w-7 items-center justify-center rounded-md text-fg-4 transition-colors hover:bg-elevated hover:text-fg-2 disabled:opacity-40",children:c.jsx(Ps,{className:me("h-3.5 w-3.5",fe&&"animate-spin")})})})]}),l&&c.jsx(z1,{onDone:()=>o(!1)}),c.jsx("div",{className:"flex border-b border-line",children:F1.map(({key:P,label:Se})=>{const ft=P==="open"?Dn:P==="closed"?Cn:re.length;return c.jsxs("button",{type:"button",onClick:()=>t(P),className:me("flex flex-1 items-center justify-center gap-1.5 py-2 text-xs font-medium transition-colors",e===P?"border-b-2 border-blue-500 text-blue-500":"text-fg-4 hover:text-fg-2"),children:[Se,c.jsx("span",{className:me("rounded-full px-1.5 py-0.5 font-mono text-[10px]",e===P?"bg-blue-500/10 text-blue-500":"bg-elevated text-fg-5"),children:ft})]},P)})}),c.jsx("div",{className:"border-b border-line px-3 py-2",children:c.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-line bg-base px-2 py-1",children:[c.jsx(Va,{className:"h-3.5 w-3.5 shrink-0 text-fg-5"}),c.jsx("input",{type:"text",value:d,onChange:P=>f(P.target.value),placeholder:"搜索 issue...",className:"min-w-0 flex-1 bg-transparent font-mono text-xs text-fg placeholder:text-fg-6 focus:outline-none"}),d&&c.jsx("button",{type:"button",onClick:()=>f(""),className:"shrink-0 text-fg-5 hover:text-fg-3",children:c.jsx(Tt,{className:"h-3 w-3"})})]})})]}):c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"flex items-center gap-2 border-b border-line px-4 py-2.5",children:[c.jsx("span",{className:"shrink-0 text-sm font-semibold text-fg",children:"Issues"}),c.jsx("div",{className:"flex shrink-0 items-center rounded-lg bg-elevated/60 p-0.5",children:F1.map(({key:P,label:Se})=>{const ft=P==="open"?Dn:P==="closed"?Cn:re.length;return c.jsxs("button",{type:"button",onClick:()=>t(P),className:me("flex items-center gap-1.5 rounded-md px-2.5 py-1 text-xs font-medium transition-colors",e===P?"bg-surface text-fg shadow-sm":"text-fg-4 hover:text-fg-2"),children:[Se,c.jsx("span",{className:me("rounded-full px-1.5 py-0.5 font-mono text-[10px]",e===P?"bg-blue-500/10 text-blue-500":"text-fg-5"),children:ft})]},P)})}),c.jsx("div",{className:"mx-1 h-4 w-px shrink-0 bg-line"}),c.jsxs("button",{type:"button",onClick:()=>v(C==="type"?null:"type"),className:me("flex shrink-0 items-center gap-1 rounded-md px-2 py-1 text-xs font-medium transition-colors",C==="type"?"bg-elevated text-fg":a!=="all"?"text-fg-2":"text-fg-4 hover:bg-elevated/60 hover:text-fg-2"),children:["类型",a!=="all"&&c.jsx("span",{className:"rounded bg-blue-500/10 px-1.5 py-0.5 text-[10px] text-blue-400",children:a==="epic"?"Epic":a==="task"?"任务":"游离"}),c.jsx(ss,{className:me("h-3 w-3 transition-transform",C==="type"&&"rotate-180")})]}),c.jsxs("button",{type:"button",onClick:()=>v(C==="tag"?null:"tag"),className:me("flex shrink-0 items-center gap-1 rounded-md px-2 py-1 text-xs font-medium transition-colors",C==="tag"?"bg-elevated text-fg":ae.size>0?"text-fg-2":"text-fg-4 hover:bg-elevated/60 hover:text-fg-2"),children:["标签",ae.size>0&&c.jsx("span",{className:"rounded-full bg-blue-500/10 px-1.5 py-0.5 text-[10px] text-blue-400",children:ae.size}),c.jsx(ss,{className:me("h-3 w-3 transition-transform",C==="tag"&&"rotate-180")})]}),c.jsxs("button",{type:"button",onClick:()=>v(C==="milestone"?null:"milestone"),className:me("flex shrink-0 items-center gap-1 rounded-md px-2 py-1 text-xs font-medium transition-colors",C==="milestone"?"bg-elevated text-fg":G?"text-fg-2":"text-fg-4 hover:bg-elevated/60 hover:text-fg-2"),children:["Milestone",G&&(()=>{const P=V.find(Se=>Se.id===G);return P?c.jsx("span",{className:"rounded bg-blue-500/10 px-1.5 py-0.5 text-[10px] text-blue-400",children:P.title}):null})(),c.jsx(ss,{className:me("h-3 w-3 transition-transform",C==="milestone"&&"rotate-180")})]}),c.jsxs("button",{type:"button",onClick:()=>v(C==="author"?null:"author"),className:me("flex shrink-0 items-center gap-1 rounded-md px-2 py-1 text-xs font-medium transition-colors",C==="author"?"bg-elevated text-fg":M?"text-fg-2":"text-fg-4 hover:bg-elevated/60 hover:text-fg-2"),children:["Author",M&&c.jsx("span",{className:"rounded bg-blue-500/10 px-1.5 py-0.5 text-[10px] text-blue-400",children:M}),c.jsx(ss,{className:me("h-3 w-3 transition-transform",C==="author"&&"rotate-180")})]}),c.jsxs("button",{type:"button",onClick:()=>v(C==="assignee"?null:"assignee"),className:me("flex shrink-0 items-center gap-1 rounded-md px-2 py-1 text-xs font-medium transition-colors",C==="assignee"?"bg-elevated text-fg":D?"text-fg-2":"text-fg-4 hover:bg-elevated/60 hover:text-fg-2"),children:["Assignee",D&&c.jsx("span",{className:"rounded bg-blue-500/10 px-1.5 py-0.5 text-[10px] text-blue-400",children:D}),c.jsx(ss,{className:me("h-3 w-3 transition-transform",C==="assignee"&&"rotate-180")})]}),c.jsx("div",{className:"min-w-0 flex-1 px-1",children:c.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-line bg-base px-2.5 py-1.5",children:[c.jsx(Va,{className:"h-3.5 w-3.5 shrink-0 text-fg-5"}),c.jsx("input",{type:"text",value:d,onChange:P=>f(P.target.value),placeholder:"搜索 issue...",className:"min-w-0 flex-1 bg-transparent text-xs text-fg placeholder:text-fg-6 focus:outline-none"}),d&&c.jsx("button",{type:"button",onClick:()=>f(""),className:"shrink-0 text-fg-5 hover:text-fg-3",children:c.jsx(Tt,{className:"h-3 w-3"})})]})}),B&&c.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[c.jsx("button",{type:"button",onClick:()=>void U(),disabled:fe,title:"同步 Issues",className:"flex h-8 w-8 items-center justify-center rounded-md text-fg-4 transition-colors hover:bg-elevated hover:text-fg-2 disabled:opacity-40",children:c.jsx(Ps,{className:me("h-3.5 w-3.5",fe&&"animate-spin")})}),c.jsx("button",{type:"button",onClick:()=>o(P=>!P),title:"新建 Issue",className:me("flex h-8 w-8 items-center justify-center rounded-md transition-colors",l?"bg-blue-600 text-white":"text-fg-4 hover:bg-elevated hover:text-fg-2"),children:c.jsx(Sr,{className:"h-3.5 w-3.5"})})]})]}),C==="type"&&c.jsx("div",{className:"flex items-center gap-2 overflow-x-auto border-b border-line px-4 py-2",style:{scrollbarWidth:"none"},children:["epic","stray","task","all"].map(P=>{const Se=P==="epic"?"Epic":P==="stray"?"游离":P==="task"?"任务":"全部",ft=P==="epic"?ca:P==="stray"?Za:P==="task"?va:$e.length,ln=a===P;return c.jsxs("button",{type:"button",onClick:()=>s(ln&&P!=="all"?"all":P),className:me("flex shrink-0 items-center gap-1.5 rounded-md px-2.5 py-1.5 text-xs font-semibold transition-colors",ln?P==="epic"?"bg-amber-400/15 text-amber-400":P==="stray"?"bg-sky-400/15 text-sky-400":P==="task"?"bg-violet-400/15 text-violet-400":"bg-fg-6/20 text-fg-3":"bg-elevated/60 text-fg-5 hover:bg-elevated hover:text-fg-3"),children:[Se,c.jsx("span",{className:me("rounded-full px-1.5 py-0.5 font-mono text-[10px] font-medium",ln?"opacity-70":"text-fg-6"),children:ft})]},P)})}),C==="tag"&&c.jsx("div",{className:"flex items-center gap-2 overflow-x-auto border-b border-line px-4 py-2",style:{scrollbarWidth:"none"},children:H.length===0?c.jsx("span",{className:"text-xs text-fg-5",children:"暂无标签"}):c.jsxs(c.Fragment,{children:[H.map(P=>{const Se=ae.get(P.id);return c.jsxs("button",{type:"button",onClick:()=>se(P.id),className:me("shrink-0 rounded-md px-2.5 py-1 text-xs font-medium transition-colors",Se==="include"?"ring-1 ring-current shadow-sm":Se==="exclude"?"opacity-90 line-through decoration-2":"opacity-50 hover:opacity-80"),style:Se==="exclude"?{backgroundColor:`#${P.color}10`,color:`#${P.color}`,boxShadow:`inset 0 0 0 1px color-mix(in srgb, #${P.color} 30%, transparent)`}:{backgroundColor:`#${P.color}18`,color:`#${P.color}`,boxShadow:Se==="include"?`inset 0 0 0 1px color-mix(in srgb, #${P.color} 50%, transparent)`:void 0},children:[Se==="exclude"&&c.jsx("span",{className:"mr-1 text-[10px]",children:"✕"}),P.name]},P.id)}),ae.size>0&&c.jsx("button",{type:"button",onClick:Z,className:"shrink-0 rounded-md px-2 py-1 text-[10px] text-fg-5 transition-colors hover:bg-elevated hover:text-fg-3",children:"清除"})]})}),C==="milestone"&&c.jsx("div",{className:"flex items-center gap-2 overflow-x-auto border-b border-line px-4 py-2",style:{scrollbarWidth:"none"},children:V.length===0?c.jsx("span",{className:"text-xs text-fg-5",children:"暂无里程碑"}):c.jsxs(c.Fragment,{children:[V.map(P=>{const Se=G===P.id;return c.jsxs("button",{type:"button",onClick:()=>pe(Se?null:P.id),className:me("shrink-0 rounded-md px-2.5 py-1 text-xs font-medium transition-colors",Se?"bg-indigo-500/15 text-indigo-400 ring-1 ring-indigo-400/50 shadow-sm":"bg-elevated/60 text-fg-5 hover:bg-elevated hover:text-fg-3"),children:[P.title,P.state==="closed"&&c.jsx("span",{className:"ml-1 text-[10px] opacity-60",children:"✓"})]},P.id)}),G&&c.jsx("button",{type:"button",onClick:()=>pe(null),className:"shrink-0 rounded-md px-2 py-1 text-[10px] text-fg-5 transition-colors hover:bg-elevated hover:text-fg-3",children:"清除"})]})}),C==="author"&&c.jsx("div",{className:"flex items-center gap-2 overflow-x-auto border-b border-line px-4 py-2",style:{scrollbarWidth:"none"},children:Vn.length===0?c.jsx("span",{className:"text-xs text-fg-5",children:"同步后可见作者"}):c.jsxs(c.Fragment,{children:[Vn.map(P=>c.jsxs("button",{type:"button",onClick:()=>k(M===P.login?null:P.login),className:me("flex shrink-0 items-center gap-1.5 rounded-md px-2.5 py-1 text-xs font-medium transition-colors",M===P.login?"bg-blue-500/15 text-blue-400 ring-1 ring-blue-500/30 shadow-sm":"bg-elevated/60 text-fg-5 hover:bg-elevated hover:text-fg-3"),children:[P.avatar&&c.jsx("img",{src:P.avatar,alt:"",className:"h-4 w-4 rounded-full"}),P.login]},P.login)),M&&c.jsx("button",{type:"button",onClick:()=>k(null),className:"shrink-0 rounded-md px-2 py-1 text-[10px] text-fg-5 transition-colors hover:bg-elevated hover:text-fg-3",children:"清除"})]})}),C==="assignee"&&c.jsx("div",{className:"flex items-center gap-2 overflow-x-auto border-b border-line px-4 py-2",style:{scrollbarWidth:"none"},children:Je.length===0?c.jsx("span",{className:"text-xs text-fg-5",children:"同步后可见指派人"}):c.jsxs(c.Fragment,{children:[Je.map(P=>c.jsxs("button",{type:"button",onClick:()=>$(D===P.login?null:P.login),className:me("flex shrink-0 items-center gap-1.5 rounded-md px-2.5 py-1 text-xs font-medium transition-colors",D===P.login?"bg-blue-500/15 text-blue-400 ring-1 ring-blue-500/30 shadow-sm":"bg-elevated/60 text-fg-5 hover:bg-elevated hover:text-fg-3"),children:[P.avatar&&c.jsx("img",{src:P.avatar,alt:"",className:"h-4 w-4 rounded-full"}),P.login]},P.login)),D&&c.jsx("button",{type:"button",onClick:()=>$(null),className:"shrink-0 rounded-md px-2 py-1 text-[10px] text-fg-5 transition-colors hover:bg-elevated hover:text-fg-3",children:"清除"})]})}),l&&c.jsx(z1,{onDone:()=>o(!1)})]}),c.jsx("div",{className:me("flex-1 overflow-y-auto",h?"px-2 py-2":"px-3 py-3"),children:B?un.length===0?c.jsx("p",{className:"px-2 py-8 text-center font-mono text-xs text-fg-5",children:re.length===0?"点击 ↻ 同步 Issues":"无匹配 Issue"}):c.jsx("ul",{className:me(h?"space-y-0.5":"space-y-1"),children:un.map(P=>h?c.jsx(q1,{issue:P,sessionCount:X.get(P.id)??0,isActive:h===P.id,isEpic:ve(P)==="epic",milestone:P.milestoneId?Ae.get(P.milestoneId):void 0,onSelect:()=>{m(P.id),x(ve(P)==="epic"?P.id:null)}},P.id):c.jsx(Y8,{issue:P,sessionCount:X.get(P.id)??0,isEpic:ve(P)==="epic",milestone:P.milestoneId?Ae.get(P.milestoneId):void 0,onSelect:()=>{m(P.id),x(ve(P)==="epic"?P.id:null)}},P.id))}):c.jsx("p",{className:"px-2 py-8 text-center font-mono text-xs text-fg-5",children:"请先选择一个仓库"})})]}),h&&c.jsx(Wm,{side:"left",open:N,onClose:()=>S(!1),children:c.jsxs("div",{className:"flex h-full flex-col",children:[c.jsx("div",{className:"border-b border-line px-3 py-3",children:c.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-fg-3",children:"Issues"})}),c.jsx("div",{className:"flex-1 overflow-y-auto px-2 py-2",children:un.length===0?c.jsx("p",{className:"px-2 py-8 text-center font-mono text-xs text-fg-5",children:"无匹配 Issue"}):c.jsx("ul",{className:"space-y-0.5",children:un.map(P=>c.jsx(q1,{issue:P,sessionCount:X.get(P.id)??0,isActive:h===P.id,isEpic:ve(P)==="epic",milestone:P.milestoneId?Ae.get(P.milestoneId):void 0,onSelect:()=>{m(P.id),x(ve(P)==="epic"?P.id:null),S(!1)}},P.id))})})]})}),h&&c.jsx("div",{className:"relative flex min-w-0 flex-1 flex-col bg-term",children:ja?c.jsxs(c.Fragment,{children:[c.jsx($8,{issue:ja,milestone:ja.milestoneId?Ae.get(ja.milestoneId):void 0,onBack:()=>{m(null),x(null),T(!1)},onClose:()=>{m(null),x(null),T(!1)},onToggleSidebar:()=>T(P=>!P)}),y&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"absolute inset-0 z-10 bg-black/30",onClick:()=>T(!1)}),c.jsxs("div",{className:"absolute right-0 top-0 bottom-0 z-20 flex w-[280px] flex-col border-l border-line bg-surface shadow-xl",children:[c.jsxs("div",{className:"flex shrink-0 items-center justify-between border-b border-line px-3 py-2.5",children:[c.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-fg-4",children:b?"子任务树 & 运行记录":"运行记录"}),c.jsx("button",{type:"button",onClick:()=>T(!1),className:"flex h-6 w-6 items-center justify-center rounded-md text-fg-4 transition-colors hover:bg-elevated hover:text-fg-2",children:c.jsx(Tt,{className:"h-4 w-4"})})]}),c.jsx("div",{className:"min-h-0 flex-1 overflow-hidden",children:b?(()=>{const P=re.find(Se=>Se.id===b);return P?c.jsx(V8,{rootIssue:P,childrenMap:ge,currentId:h,onSelect:Se=>{m(Se),T(!1)},sessions:Wa,onSessionSelect:Te}):null})():c.jsx(Q8,{sessions:Wa,onSessionSelect:Te})})]})]})]}):c.jsx("div",{className:"flex flex-1 items-center justify-center",children:c.jsx("p",{className:"font-mono text-xs text-fg-5",children:"Issue 未找到"})})})]})}const $1=[{key:"open",label:"开放"},{key:"merged",label:"已合并"},{key:"closed",label:"已关闭"},{key:"all",label:"全部"}];function o_(e){const t=e<1e12?e*1e3:e,a=Date.now()-t;return a<6e4?"刚刚":a<36e5?`${Math.floor(a/6e4)}分钟前`:a<864e5?`${Math.floor(a/36e5)}小时前`:a<2592e6?`${Math.floor(a/864e5)}天前`:new Date(t).toLocaleDateString("zh-CN",{month:"short",day:"numeric"})}function Z8(e){return e==="merged"?"bg-purple-500/15 text-purple-400":e==="closed"?"bg-red-500/15 text-red-400":"bg-emerald-500/15 text-emerald-400"}function W8({pr:e,isActive:t,onSelect:a}){return c.jsx("li",{children:c.jsxs("button",{type:"button",onClick:a,className:me("group flex w-full items-center gap-2.5 rounded-md px-2.5 py-2 text-left transition-colors",t?"border-l-2 border-blue-500 bg-elevated/80":"border-l-2 border-transparent hover:bg-elevated/50"),children:[c.jsx("span",{className:me("flex h-10 w-10 shrink-0 items-center justify-center rounded-full font-mono text-sm font-bold ring-1",e.state==="merged"?"bg-gradient-to-br from-purple-500/20 to-purple-500/5 text-purple-400 ring-purple-500/25":e.state==="closed"?"bg-gradient-to-br from-red-500/20 to-red-500/5 text-red-400 ring-red-500/25":"bg-gradient-to-br from-emerald-500/20 to-emerald-500/5 text-emerald-400 ring-emerald-500/25"),children:e.number}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsxs("div",{className:"flex items-center gap-1.5",children:[e.draft===1&&c.jsx("span",{className:"shrink-0 rounded px-1 py-0.5 text-[9px] font-bold bg-fg-6/15 text-fg-4",children:"DRAFT"}),c.jsx("span",{className:"min-w-0 text-xs font-medium text-fg-2 group-hover:text-fg",children:e.title})]}),c.jsxs("div",{className:"mt-0.5 truncate font-mono text-[10px] text-fg-6",children:[e.headBranch," → ",e.baseBranch]}),e.labels&&e.labels.length>0&&c.jsx("div",{className:"mt-1 flex flex-wrap gap-1",children:e.labels.map(s=>c.jsx("span",{className:"rounded px-1 py-0.5 text-[10px] font-medium",style:{backgroundColor:`#${s.color}20`,color:`#${s.color}`},children:s.name},s.id))})]})]})})}function J8({pr:e,onSelect:t}){return c.jsx("li",{children:c.jsxs("button",{type:"button",onClick:t,className:"group flex w-full items-center gap-3 border-b border-line px-4 py-3 text-left transition-colors hover:bg-elevated/50",children:[c.jsx("span",{className:me("flex h-10 w-10 shrink-0 items-center justify-center rounded-full font-mono text-sm font-bold ring-1",e.state==="merged"?"bg-gradient-to-br from-purple-500/20 to-purple-500/5 text-purple-400 ring-purple-500/25":e.state==="closed"?"bg-gradient-to-br from-red-500/20 to-red-500/5 text-red-400 ring-red-500/25":"bg-gradient-to-br from-emerald-500/20 to-emerald-500/5 text-emerald-400 ring-emerald-500/25"),children:e.number}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[e.draft===1&&c.jsx("span",{className:"shrink-0 rounded px-1.5 py-0.5 text-[9px] font-bold tracking-wide bg-fg-6/15 text-fg-4",children:"DRAFT"}),c.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium text-fg-2 group-hover:text-fg",children:e.title}),e.mergeable==="false"&&e.state==="open"&&c.jsxs("span",{className:"shrink-0 rounded px-1.5 py-0.5 text-[10px] font-semibold bg-red-500/15 text-red-400",children:[c.jsx(ia,{className:"inline h-3 w-3 -mt-px"})," Conflict"]}),e.assignees&&e.assignees.length>0&&c.jsx("div",{className:"hidden shrink-0 items-center -space-x-1.5 sm:flex",children:e.assignees.slice(0,3).map(a=>c.jsx("img",{src:a.avatar_url,alt:a.login,title:a.login,className:"h-5 w-5 rounded-full ring-2 ring-surface"},a.login))})]}),c.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-1",children:[c.jsxs("span",{className:"shrink-0 font-mono text-[11px] text-fg-5",children:[e.headBranch," → ",e.baseBranch]}),c.jsx("span",{className:"text-fg-6",children:"·"}),e.authorLogin&&c.jsxs(c.Fragment,{children:[c.jsxs("span",{className:"shrink-0 text-[11px] text-fg-5",title:e.authorLogin,children:[e.authorAvatar&&c.jsx("img",{src:e.authorAvatar,alt:"",className:"mr-1 inline-block h-3.5 w-3.5 rounded-full align-text-bottom"}),e.authorLogin]}),c.jsx("span",{className:"text-fg-6",children:"·"})]}),c.jsx("span",{className:"shrink-0 text-[11px] text-fg-6",children:o_(e.createdAt)}),e.labels&&e.labels.length>0&&c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"text-fg-6",children:"·"}),e.labels.map(a=>c.jsx("span",{className:"rounded px-1.5 py-0.5 text-[11px] font-medium",style:{backgroundColor:`#${a.color}20`,color:`#${a.color}`},children:a.name},a.id))]})]})]})]})})}function e9({issue:e,linked:t,onToggle:a}){return c.jsx("li",{children:c.jsx("button",{type:"button",onClick:a,className:me("group flex w-full items-start gap-2 rounded-md px-3 py-2.5 text-left transition-colors",t?"border-l-2 border-emerald-500 bg-emerald-500/5":"border-l-2 border-transparent hover:bg-elevated/50"),children:c.jsx("div",{className:"min-w-0 flex-1",children:c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsxs("span",{className:me("shrink-0 rounded px-1.5 py-0.5 font-mono text-xs font-medium",e.state==="open"?"bg-emerald-500/15 text-emerald-400":"bg-purple-500/15 text-purple-400"),children:["#",e.number]}),c.jsx("span",{className:"min-w-0 truncate text-sm font-medium text-fg-2",children:e.title}),t&&c.jsx(Mc,{className:"ml-auto h-3.5 w-3.5 shrink-0 text-emerald-400"})]})})})})}function t9({pr:e,onBack:t,onClose:a,onEnterMatch:s}){var k;const l=qe(D=>D.activeRepoId),o=qe(Da),[d,f]=A.useState(!1),[h,m]=A.useState([]),[b,x]=A.useState(!1),[y,T]=A.useState([]),N=Na(),S=Gn(D=>D.unlinkIssue);A.useEffect(()=>{l&&(x(!0),D3(l,e.number).then(m).catch(()=>m([])).finally(()=>x(!1)))},[l,e.number]),A.useEffect(()=>{l&&qE(l,e.number).then(T).catch(()=>T([]))},[l,e.number]);const C=async D=>{if(!(d||!l)){f(!0);try{if(await O3(l,e.number),D&&y.length>0){const $=y.filter(L=>L.state==="open");await Promise.all($.map(L=>zE(l,L.number,{state:"closed"}))),T(L=>L.map(Y=>Y.state==="open"?{...Y,state:"closed"}:Y)),Pe.getState().loadIssues(),Yt.getState().addToast(`PR #${e.number} 合入成功,已关闭 ${$.length} 个 Issue`,"success")}else Yt.getState().addToast(`PR #${e.number} 合入成功`,"success");Gn.getState().loadPulls()}catch($){let L="合入失败";if($ instanceof Us)try{L=JSON.parse($.message).error??L}catch{L=$.message}Yt.getState().addToast(L,"error")}finally{f(!1)}}},v=async D=>{await S(e.number,D)&&T(L=>L.filter(Y=>Y.number!==D))},M=D=>{const $=new Date(D);return $.toLocaleDateString("zh-CN",{month:"short",day:"numeric"})+" "+$.toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit"})};return c.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[c.jsxs("header",{className:"flex flex-col gap-2 border-b border-line px-4 py-3 md:flex-row md:items-center md:gap-3 md:px-6",children:[c.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-3",children:[c.jsx("button",{type:"button",onClick:t,"aria-label":"返回列表",className:"-ml-1 shrink-0 rounded-md p-1.5 text-fg-3 transition-colors hover:bg-elevated hover:text-fg md:hidden",children:c.jsx(SE,{className:"h-5 w-5"})}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsxs("span",{className:me("shrink-0 rounded px-1.5 py-0.5 font-mono text-[10px] font-semibold",Z8(e.state)),children:["#",e.number," ",e.state]}),e.draft===1&&c.jsx("span",{className:"shrink-0 rounded px-1.5 py-0.5 text-[10px] font-bold bg-fg-6/15 text-fg-4",children:"DRAFT"}),e.mergeable==="false"&&e.state==="open"&&c.jsx("span",{className:"shrink-0 rounded px-1.5 py-0.5 text-[10px] font-semibold bg-red-500/15 text-red-400",children:"Conflict"}),(k=e.labels)==null?void 0:k.map(D=>c.jsx("span",{className:"rounded px-1.5 py-0.5 text-[10px] font-medium",style:{backgroundColor:`#${D.color}20`,color:`#${D.color}`},children:D.name},D.id))]}),c.jsx("h2",{className:"mt-1 text-base font-semibold text-fg",children:e.title}),c.jsxs("div",{className:"mt-1.5 flex items-center gap-3 text-xs text-fg-4",children:[c.jsxs("span",{className:"flex items-center gap-1 font-mono text-[11px] text-fg-5",children:[c.jsx(fo,{className:"h-3.5 w-3.5"}),e.headBranch," → ",e.baseBranch]}),e.authorLogin&&c.jsxs("span",{className:"flex items-center gap-1.5",children:[e.authorAvatar&&c.jsx("img",{src:e.authorAvatar,alt:"",className:"h-4 w-4 rounded-full"}),e.authorLogin]}),e.mergedAt&&c.jsxs("span",{className:"text-purple-400",children:["合并于 ",o_(e.mergedAt)]})]})]})]}),c.jsxs("div",{className:"flex shrink-0 flex-wrap items-center gap-2",children:[e.htmlUrl&&c.jsxs("a",{href:e.htmlUrl,target:"_blank",rel:"noopener noreferrer",className:"flex h-8 items-center gap-1.5 rounded-md border border-line px-2.5 font-mono text-xs text-fg-3 transition-colors hover:border-fg-5 hover:text-fg",children:[c.jsx(fc,{className:"h-3.5 w-3.5"}),"源站"]}),c.jsxs("button",{type:"button",onClick:s,className:"flex h-8 items-center gap-1.5 rounded-md border border-line px-2.5 text-xs text-fg-3 transition-colors hover:border-blue-500/50 hover:text-blue-400",children:[c.jsx(Mc,{className:"h-3.5 w-3.5"}),"关联 Issue"]}),e.state==="open"&&c.jsxs(c.Fragment,{children:[c.jsxs("button",{type:"button",disabled:d||e.mergeable==="false",onClick:()=>void C(!1),className:"flex h-8 items-center gap-1.5 rounded-md border border-emerald-500/30 px-2.5 text-xs font-medium text-emerald-400 transition-colors hover:border-emerald-500/60 hover:bg-emerald-500/10 disabled:opacity-40",children:[c.jsx(mc,{className:"h-3.5 w-3.5"}),"合入"]}),y.some(D=>D.state==="open")&&c.jsxs("button",{type:"button",disabled:d||e.mergeable==="false",onClick:()=>void C(!0),className:"flex h-8 items-center gap-1.5 rounded-md bg-blue-600 px-3 text-xs font-medium text-white transition-colors hover:bg-blue-500 disabled:opacity-40",children:[c.jsx(mc,{className:"h-3.5 w-3.5"}),"合入并关闭 Issues"]})]}),a&&c.jsx("button",{type:"button",onClick:a,title:"关闭详情",className:"hidden h-8 w-8 items-center justify-center rounded-md border border-line text-fg-4 transition-colors hover:border-fg-5 hover:text-fg-2 md:flex",children:c.jsx(Tt,{className:"h-4 w-4"})})]})]}),c.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:c.jsxs("div",{className:"mx-auto max-w-3xl px-4 py-6 md:px-6",children:[y.length>0&&c.jsxs("div",{className:"mb-6 rounded-lg border border-line bg-elevated/30 px-4 py-3",children:[c.jsxs("h3",{className:"mb-2 flex items-center gap-1.5 text-xs font-semibold uppercase tracking-wider text-fg-4",children:[c.jsx(co,{className:"h-3.5 w-3.5"}),"关联 Issues (",y.length,")"]}),c.jsx("div",{className:"space-y-1.5",children:y.map(D=>c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsxs("button",{type:"button",onClick:()=>N(`/${encodeURIComponent(o)}/issues?issueId=${encodeURIComponent(D.id)}`),className:"flex min-w-0 flex-1 items-center gap-2 rounded-md px-1 py-0.5 transition-colors hover:bg-elevated/60",children:[c.jsxs("span",{className:me("shrink-0 rounded px-1.5 py-0.5 font-mono text-[10px] font-medium",D.state==="open"?"bg-emerald-500/15 text-emerald-400":"bg-purple-500/15 text-purple-400"),children:["#",D.number]}),c.jsx("span",{className:"min-w-0 flex-1 truncate text-left text-sm text-fg-2",children:D.title})]}),c.jsx("button",{type:"button",onClick:()=>void v(D.number),title:"取消关联",className:"shrink-0 rounded p-0.5 text-fg-5 transition-colors hover:bg-red-500/10 hover:text-red-400",children:c.jsx(vE,{className:"h-3.5 w-3.5"})})]},D.id))})]}),e.body?c.jsx("div",{className:"markdown-body leading-relaxed",children:c.jsx(ls,{remarkPlugins:[os],rehypePlugins:[oo],children:e.body})}):c.jsx("p",{className:"py-10 text-center font-mono text-xs text-fg-5",children:"该 PR 没有描述内容"}),b?c.jsx("p",{className:"mt-8 text-center font-mono text-xs text-fg-6",children:"加载评论…"}):h.length>0&&c.jsxs("div",{className:"mt-8 border-t border-line pt-6",children:[c.jsxs("h3",{className:"mb-4 text-xs font-semibold uppercase tracking-wider text-fg-4",children:["评论 (",h.length,")"]}),c.jsx("div",{className:"space-y-4",children:h.map(D=>c.jsxs("div",{className:"rounded-lg border border-line bg-elevated/40 px-4 py-3",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("img",{src:D.user.avatar_url,alt:D.user.login,className:"h-5 w-5 rounded-full"}),c.jsx("span",{className:"text-xs font-semibold text-fg-2",children:D.user.login}),c.jsx("span",{className:"text-[10px] text-fg-6",children:M(D.created_at)})]}),c.jsx("div",{className:"markdown-body mt-2 text-sm leading-relaxed text-fg-3",children:c.jsx(ls,{remarkPlugins:[os],rehypePlugins:[oo],children:D.body})})]},D.id))})]})]})})]})}function n9(){const[e,t]=A.useState("open"),[a,s]=A.useState(""),[l,o]=A.useState(null),[d,f]=A.useState(""),[h,m]=TE(),b=Gn(G=>G.pulls),x=Gn(G=>G.syncing),y=Gn(G=>G.syncPulls),T=Gn(G=>G.matchingPrId),N=Gn(G=>G.enterMatchMode),S=Gn(G=>G.exitMatchMode),C=Gn(G=>G.linkIssue),v=qe(G=>G.activeRepoId),M=Pe(G=>G.issues);A.useEffect(()=>{const G=h.get("prId");G&&b.some(pe=>pe.id===G)&&(o(G),m({},{replace:!0}))},[h,m,b]);const k=T?b.find(G=>G.id===T)??null:null,[D,$]=A.useState(new Set);A.useEffect(()=>{if(!v||!k){$(new Set);return}qE(v,k.number).then(G=>$(new Set(G.map(pe=>pe.id)))).catch(()=>$(new Set))},[v,k]);const L=async G=>{if(!k)return;D.has(G.id)?await Gn.getState().unlinkIssue(k.number,G.number)&&$(B=>{const R=new Set(B);return R.delete(G.id),R}):await C(k.number,G.number)&&$(B=>new Set(B).add(G.id))},Y=b.filter(G=>G.state==="open").length,re=b.filter(G=>G.state==="merged").length,fe=b.filter(G=>G.state==="closed").length,U=e==="all"?b:b.filter(G=>G.state===e),H=a.trim().toLowerCase(),ae=H?U.filter(G=>`#${G.number} ${G.title} ${G.headBranch} ${G.baseBranch}`.toLowerCase().includes(H)):U,se=d.trim().toLowerCase(),Z=se?M.filter(G=>`#${G.number} ${G.title}`.toLowerCase().includes(se)):M,J=b.find(G=>G.id===l)??null,V=k??J;return c.jsxs("div",{className:"flex min-h-0 flex-1",children:[c.jsxs("div",{className:me("shrink-0 flex-col bg-surface",V?"hidden md:flex md:w-80 border-r border-line":"flex w-full"),children:[T?c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"flex items-center justify-between border-b border-line px-3 py-3",children:[c.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-blue-400",children:"选择 Issue 关联"}),c.jsxs("button",{type:"button",onClick:S,className:"flex h-7 items-center gap-1 rounded-md px-2 text-xs text-fg-4 transition-colors hover:bg-elevated hover:text-fg-2",children:[c.jsx(Tt,{className:"h-3.5 w-3.5"}),"完成"]})]}),c.jsx("div",{className:"border-b border-line px-3 py-2",children:c.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-line bg-base px-2 py-1",children:[c.jsx(Va,{className:"h-3.5 w-3.5 shrink-0 text-fg-5"}),c.jsx("input",{type:"text",value:d,onChange:G=>f(G.target.value),placeholder:"搜索 issue...",className:"min-w-0 flex-1 bg-transparent font-mono text-xs text-fg placeholder:text-fg-6 focus:outline-none"}),d&&c.jsx("button",{type:"button",onClick:()=>f(""),className:"shrink-0 text-fg-5 hover:text-fg-3",children:c.jsx(Tt,{className:"h-3 w-3"})})]})}),c.jsx("div",{className:"flex-1 overflow-y-auto px-2 py-2",children:Z.length===0?c.jsx("p",{className:"px-2 py-8 text-center font-mono text-xs text-fg-5",children:M.length===0?"暂无 Issue,请先同步":"无匹配 Issue"}):c.jsx("ul",{className:"space-y-0.5",children:Z.map(G=>c.jsx(e9,{issue:G,linked:D.has(G.id),onToggle:()=>void L(G)},G.id))})})]}):V?c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"flex items-center justify-between border-b border-line px-3 py-3",children:[c.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-fg-3",children:"Pull Requests"}),v&&c.jsx("button",{type:"button",onClick:()=>void y(),disabled:x,title:"同步",className:"flex h-7 w-7 items-center justify-center rounded-md text-fg-4 transition-colors hover:bg-elevated hover:text-fg-2 disabled:opacity-40",children:c.jsx(Ps,{className:me("h-3.5 w-3.5",x&&"animate-spin")})})]}),c.jsx("div",{className:"flex border-b border-line",children:$1.map(({key:G,label:pe})=>{const ke=G==="open"?Y:G==="merged"?re:G==="closed"?fe:b.length;return c.jsxs("button",{type:"button",onClick:()=>t(G),className:me("flex flex-1 items-center justify-center gap-1.5 py-2 text-xs font-medium transition-colors",e===G?"border-b-2 border-blue-500 text-blue-500":"text-fg-4 hover:text-fg-2"),children:[pe,c.jsx("span",{className:me("rounded-full px-1.5 py-0.5 font-mono text-[10px]",e===G?"bg-blue-500/10 text-blue-500":"bg-elevated text-fg-5"),children:ke})]},G)})}),c.jsx("div",{className:"border-b border-line px-3 py-2",children:c.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-line bg-base px-2 py-1",children:[c.jsx(Va,{className:"h-3.5 w-3.5 shrink-0 text-fg-5"}),c.jsx("input",{type:"text",value:a,onChange:G=>s(G.target.value),placeholder:"搜索 PR...",className:"min-w-0 flex-1 bg-transparent font-mono text-xs text-fg placeholder:text-fg-6 focus:outline-none"}),a&&c.jsx("button",{type:"button",onClick:()=>s(""),className:"shrink-0 text-fg-5 hover:text-fg-3",children:c.jsx(Tt,{className:"h-3 w-3"})})]})})]}):c.jsx(c.Fragment,{children:c.jsxs("div",{className:"flex items-center gap-2 border-b border-line px-4 py-2.5",children:[c.jsx("span",{className:"shrink-0 text-sm font-semibold text-fg",children:"Pull Requests"}),c.jsx("div",{className:"flex shrink-0 items-center rounded-lg bg-elevated/60 p-0.5",children:$1.map(({key:G,label:pe})=>{const ke=G==="open"?Y:G==="merged"?re:G==="closed"?fe:b.length;return c.jsxs("button",{type:"button",onClick:()=>t(G),className:me("flex items-center gap-1.5 rounded-md px-2.5 py-1 text-xs font-medium transition-colors",e===G?"bg-surface text-fg shadow-sm":"text-fg-4 hover:text-fg-2"),children:[pe,c.jsx("span",{className:me("rounded-full px-1.5 py-0.5 font-mono text-[10px]",e===G?"bg-blue-500/10 text-blue-500":"text-fg-5"),children:ke})]},G)})}),c.jsx("div",{className:"min-w-0 flex-1 px-1",children:c.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-line bg-base px-2.5 py-1.5",children:[c.jsx(Va,{className:"h-3.5 w-3.5 shrink-0 text-fg-5"}),c.jsx("input",{type:"text",value:a,onChange:G=>s(G.target.value),placeholder:"搜索 PR...",className:"min-w-0 flex-1 bg-transparent text-xs text-fg placeholder:text-fg-6 focus:outline-none"}),a&&c.jsx("button",{type:"button",onClick:()=>s(""),className:"shrink-0 text-fg-5 hover:text-fg-3",children:c.jsx(Tt,{className:"h-3 w-3"})})]})}),c.jsx("button",{type:"button",onClick:()=>void y(),disabled:x||!v,title:"同步 PR",className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md border border-line text-fg-4 transition-colors hover:border-fg-5 hover:text-fg-2 disabled:opacity-40",children:c.jsx(Ps,{className:me("h-4 w-4",x&&"animate-spin")})})]})}),!T&&c.jsx("div",{className:me("flex-1 overflow-y-auto",V?"px-2 py-2":"px-3 py-3"),children:v?ae.length===0?c.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 py-16 text-fg-5",children:[c.jsx(fo,{className:"h-8 w-8"}),c.jsx("p",{className:"font-mono text-xs",children:b.length===0?"点击 ↻ 同步 PR":"没有匹配的 PR"})]}):c.jsx("ul",{className:me(V?"space-y-0.5":"space-y-1"),children:ae.map(G=>V?c.jsx(W8,{pr:G,isActive:G.id===(l??T),onSelect:()=>o(G.id)},G.id):c.jsx(J8,{pr:G,onSelect:()=>o(G.id)},G.id))}):c.jsx("p",{className:"px-2 py-8 text-center font-mono text-xs text-fg-5",children:"请先选择一个仓库"})})]}),V?c.jsx(t9,{pr:V,onBack:()=>{o(null),T&&S()},onClose:()=>{o(null),T&&S()},onEnterMatch:()=>N(V.id)},`${V.id}-${T??"view"}`):c.jsx("div",{className:"hidden flex-1 items-center justify-center md:flex",children:c.jsxs("div",{className:"text-center text-fg-5",children:[c.jsx(fo,{className:"mx-auto h-12 w-12 opacity-20"}),c.jsx("p",{className:"mt-3 font-mono text-xs",children:"选择一个 PR 查看详情"})]})})]})}let Er=null;function a9(e){const t=Date.now()-e,a=Math.floor(t/6e4);return a<1?"刚刚":a<60?`${a} 分钟前`:`${Math.floor(a/60)} 小时前`}const G1=[{id:"usage",label:"订阅额度",icon:IE},{id:"git",label:"Git 源站",icon:Ic},{id:"models",label:"模型",icon:sc},{id:"custom-agents",label:"Custom Agents",icon:_v},{id:"agents",label:"AGENTS.md",icon:AE}],r9={id:"server",label:"服务器",icon:OE};function s9(e){if(!e)return null;const t=new Date(e).getTime()-Date.now();if(t<=0)return"已重置";const a=Math.floor(t/36e5),s=Math.floor(t%36e5/6e4);return a>0?`${a}h ${s}m 后重置`:`${s}m 后重置`}function i9(e){return e>=90?"bg-red-500":e>=70?"bg-amber-500":"bg-blue-500"}function Im({label:e,window:t}){if(!t)return null;const a=Math.round(t.utilization),s=s9(t.resets_at),l=a>=90,o=a>=70;return c.jsxs("div",{className:"space-y-1.5",children:[c.jsxs("div",{className:"flex items-center justify-between gap-3",children:[c.jsx("span",{className:"min-w-0 truncate text-xs font-medium text-fg-3",children:e}),c.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[s&&c.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-elevated px-1.5 py-0.5 text-[10px] font-medium text-fg-4 tabular-nums",children:[c.jsx(Pv,{className:"h-2.5 w-2.5"}),s]}),c.jsxs("span",{className:me("text-sm font-bold leading-none tabular-nums",l?"text-red-400":o?"text-amber-400":"text-fg"),children:[a,"%"]})]})]}),c.jsx("div",{className:"h-2.5 overflow-hidden rounded-full bg-elevated ring-1 ring-inset ring-line/60",children:c.jsx("div",{className:me("h-full rounded-full transition-all duration-500 ease-out",i9(a),l?"shadow-sm shadow-red-500/50":o?"shadow-sm shadow-amber-500/40":null),style:{width:`${Math.min(a,100)}%`}})})]})}function l9({account:e,onSwitch:t,switching:a}){var l;const s=e.active;return c.jsxs("div",{className:me("relative overflow-hidden rounded-xl border bg-base p-4 shadow-sm transition-colors",s?"border-blue-500/30 ring-1 ring-inset ring-blue-500/20":"border-line"),children:[s&&c.jsx("span",{"aria-hidden":!0,className:"absolute inset-y-0 left-0 w-1 bg-blue-500"}),c.jsxs("div",{className:"flex items-center gap-2.5",children:[c.jsx("div",{className:me("flex h-7 w-7 shrink-0 items-center justify-center rounded-lg",s?"bg-blue-500/15 text-blue-500":"bg-elevated text-fg-4"),children:c.jsx(FA,{className:"h-3.5 w-3.5"})}),c.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-semibold text-fg",children:e.label}),s&&c.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1.5 rounded-full bg-blue-500/15 px-2 py-0.5 text-[10px] font-semibold text-blue-500",children:[c.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-blue-500 shadow-sm shadow-blue-500/60"}),"当前"]}),!s&&t&&c.jsxs("button",{type:"button",onClick:()=>t(e.id),disabled:a,className:"inline-flex shrink-0 items-center gap-1 rounded-full border border-line px-2 py-0.5 text-[10px] font-medium text-fg-4 transition-colors hover:border-blue-500/50 hover:text-blue-500 disabled:opacity-40",children:[a&&c.jsx(_r,{className:"h-2.5 w-2.5 fs-spin"}),"切换"]}),e.excluded&&c.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1 rounded-full bg-elevated px-2 py-0.5 text-[10px] font-medium text-fg-5",children:[c.jsx(yv,{className:"h-2.5 w-2.5"}),"不自动切"]}),e.needsReauth&&c.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1 rounded-full bg-red-500/15 px-2 py-0.5 text-[10px] font-medium text-red-400",children:[c.jsx(ia,{className:"h-2.5 w-2.5"}),"需重新登录"]})]}),e.error&&!e.usage?c.jsxs("div",{className:"mt-3 flex items-start gap-2 rounded-lg bg-red-500/10 px-3 py-2 text-xs text-red-400",children:[c.jsx(ia,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),c.jsx("span",{className:"min-w-0 break-words",children:e.error})]}):e.usage?c.jsxs("div",{className:"mt-4 space-y-3",children:[c.jsx(Im,{label:"5 小时窗口",window:e.usage.five_hour}),c.jsx(Im,{label:"7 天窗口",window:e.usage.seven_day}),(l=e.usage.scoped)==null?void 0:l.map(o=>c.jsx(Im,{label:o.label,window:o},o.label))]}):null]})}function o9(){const[e,t]=A.useState((Er==null?void 0:Er.data)??null),[a,s]=A.useState(!Er),[l,o]=A.useState(null),[d,f]=A.useState(null),[h,m]=A.useState((Er==null?void 0:Er.fetchedAt)??null),[,b]=A.useState(0),x=A.useCallback(S=>{const C=Date.now();Er={data:S,fetchedAt:C},t(S),m(C)},[]),y=A.useCallback(()=>{s(!0),o(null),V3().then(S=>{x(S),s(!1)}).catch(S=>{o(S instanceof Error?S.message:String(S)),s(!1)})},[x]);A.useEffect(()=>{Er||y()},[y]),A.useEffect(()=>{const S=setInterval(()=>b(C=>C+1),3e4);return()=>clearInterval(S)},[]);const T=A.useRef(!1),N=A.useCallback(S=>{T.current||(T.current=!0,f(S),Q3(S).then(C=>{x(C),f(null)}).catch(C=>{o(C instanceof Error?C.message:String(C)),f(null)}).finally(()=>{T.current=!1}))},[x]);return c.jsxs("section",{className:"rounded-xl border border-line bg-surface p-5",children:[c.jsxs("div",{className:"flex items-center justify-between gap-3",children:[c.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[c.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-blue-500/10 text-blue-500",children:c.jsx(Zv,{className:"h-4 w-4"})}),c.jsxs("div",{className:"min-w-0",children:[c.jsx("h2",{className:"text-sm font-semibold text-fg",children:"Claude 订阅额度"}),c.jsx("p",{className:"mt-0.5 text-xs text-fg-4",children:"各账号的 Pro/Max 订阅窗口用量。"})]})]}),c.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[h&&c.jsx("span",{className:"text-[10px] tabular-nums text-fg-5",children:a9(h)}),c.jsx("button",{type:"button",onClick:y,disabled:a,className:"rounded-md p-1.5 text-fg-4 transition-colors hover:bg-elevated hover:text-fg-2 disabled:opacity-40",children:c.jsx(Ps,{className:me("h-4 w-4",a&&"fs-spin")})})]})]}),c.jsx("div",{className:"mt-4 space-y-2.5",children:a&&!e?c.jsxs("div",{className:"flex flex-col items-center gap-2.5 py-10 text-fg-5",children:[c.jsx(_r,{className:"h-5 w-5 fs-spin"}),c.jsx("p",{className:"text-xs",children:"加载中…"})]}):l&&!e?c.jsxs("div",{className:"flex flex-col items-center gap-2.5 py-10 text-red-400",children:[c.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-red-500/10",children:c.jsx(ia,{className:"h-5 w-5"})}),c.jsx("p",{className:"max-w-xs text-center text-xs leading-relaxed",children:l})]}):e&&e.accounts.length===0?c.jsxs("div",{className:"flex flex-col items-center gap-2.5 py-10 text-fg-5",children:[c.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-elevated text-fg-4",children:c.jsx(qA,{className:"h-5 w-5"})}),c.jsx("p",{className:"max-w-xs text-center text-xs leading-relaxed",children:"未找到账号。请在 OpenCode TUI 中通过 claude-accounts-usage 插件登录。"})]}):e?e.accounts.map(S=>c.jsx(l9,{account:S,onSwitch:N,switching:d===S.id},S.id)):null})]})}function u9({host:e,onDelete:t}){const[a,s]=A.useState(!1);return c.jsxs("div",{className:"group flex items-center gap-3 rounded-lg border border-line bg-base px-4 py-3",children:[c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"text-sm font-medium text-fg",children:e.name}),c.jsx("span",{className:"rounded bg-elevated px-1.5 py-0.5 font-mono text-[10px] text-fg-4",children:e.platform})]}),c.jsxs("div",{className:"mt-0.5 flex items-center gap-2 font-mono text-xs text-fg-4",children:[c.jsx("span",{children:e.host}),c.jsx("span",{className:"text-fg-6",children:"·"}),c.jsx("span",{className:"text-fg-5",children:e.token})]})]}),a?c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsx("button",{type:"button",onClick:t,className:"rounded p-1.5 text-red-400 hover:bg-red-500/10",children:c.jsx(Ia,{className:"h-4 w-4"})}),c.jsx("button",{type:"button",onClick:()=>s(!1),className:"rounded p-1.5 text-fg-4 hover:bg-elevated",children:c.jsx(Tt,{className:"h-4 w-4"})})]}):c.jsx("button",{type:"button",onClick:()=>s(!0),className:"rounded p-1.5 text-fg-5 opacity-0 transition-opacity hover:text-red-400 group-hover:opacity-100",children:c.jsx(Li,{className:"h-4 w-4"})})]})}function c9({onAdded:e}){const[t,a]=A.useState(!1),[s,l]=A.useState(""),[o,d]=A.useState(""),[f,h]=A.useState(""),[m,b]=A.useState("gitea"),[x,y]=A.useState(!1),[T,N]=A.useState(!1),S=()=>{l(""),d(""),h(""),b("gitea"),a(!1)},C=async()=>{if(!(!s.trim()||!o.trim()||!f.trim())){y(!0);try{await G3(s.trim(),o.trim(),f.trim(),m),S(),e()}finally{y(!1)}}};return t?c.jsxs("div",{className:"space-y-3 rounded-lg border border-line bg-base p-4",children:[c.jsxs("div",{className:"flex gap-3",children:[c.jsxs("label",{className:"flex-1",children:[c.jsx("span",{className:"text-xs font-medium text-fg-3",children:"名称"}),c.jsx("input",{type:"text",value:o,onChange:v=>d(v.target.value),placeholder:"公司 Gitea",className:"mt-1 w-full rounded-md border border-line bg-surface px-3 py-1.5 text-sm text-fg placeholder:text-fg-6 focus:border-blue-500 focus:outline-none"})]}),c.jsxs("label",{className:"w-28",children:[c.jsx("span",{className:"text-xs font-medium text-fg-3",children:"平台"}),c.jsxs("select",{value:m,onChange:v=>b(v.target.value),className:"mt-1 w-full rounded-md border border-line bg-surface px-3 py-1.5 text-sm text-fg focus:border-blue-500 focus:outline-none",children:[c.jsx("option",{value:"gitea",children:"Gitea"}),c.jsx("option",{value:"github",children:"GitHub"}),c.jsx("option",{value:"gitlab",children:"GitLab"})]})]})]}),c.jsxs("label",{className:"block",children:[c.jsx("span",{className:"text-xs font-medium text-fg-3",children:"Host"}),c.jsx("input",{type:"text",value:s,onChange:v=>l(v.target.value),placeholder:"git.btsai.work",className:"mt-1 w-full rounded-md border border-line bg-surface px-3 py-1.5 font-mono text-sm text-fg placeholder:text-fg-6 focus:border-blue-500 focus:outline-none"})]}),c.jsxs("label",{className:"block",children:[c.jsx("span",{className:"text-xs font-medium text-fg-3",children:"Token"}),c.jsxs("div",{className:"relative mt-1",children:[c.jsx("input",{type:T?"text":"password",value:f,onChange:v=>h(v.target.value),placeholder:"Personal Access Token",className:"w-full rounded-md border border-line bg-surface px-3 py-1.5 pr-9 font-mono text-sm text-fg placeholder:text-fg-6 focus:border-blue-500 focus:outline-none"}),c.jsx("button",{type:"button",onClick:()=>N(!T),className:"absolute right-2.5 top-1/2 -translate-y-1/2 text-fg-5 hover:text-fg-3",children:T?c.jsx($v,{className:"h-3.5 w-3.5"}):c.jsx(Kv,{className:"h-3.5 w-3.5"})})]})]}),c.jsxs("div",{className:"flex justify-end gap-2 pt-1",children:[c.jsx("button",{type:"button",onClick:S,className:"rounded-md px-3 py-1.5 text-xs text-fg-4 hover:bg-elevated",children:"取消"}),c.jsx("button",{type:"button",onClick:()=>void C(),disabled:x||!s.trim()||!o.trim()||!f.trim(),className:"rounded-md bg-blue-600 px-4 py-1.5 text-xs font-medium text-white transition-colors hover:bg-blue-500 disabled:opacity-40",children:x?"保存中…":"保存"})]})]}):c.jsxs("button",{type:"button",onClick:()=>a(!0),className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-line py-2.5 text-xs text-fg-4 transition-colors hover:border-fg-5 hover:text-fg-3",children:[c.jsx(Sr,{className:"h-3.5 w-3.5"})," 添加 Git 源站"]})}function d9(){const[e,t]=A.useState(""),[a,s]=A.useState(""),[l,o]=A.useState(!0),[d,f]=A.useState(!1),[h,m]=A.useState(null);A.useEffect(()=>{P3().then(y=>{t(y.content),s(y.content),o(!1)}).catch(y=>{m(y instanceof Error?y.message:String(y)),o(!1)})},[]);const b=async()=>{f(!0),m(null);try{await U3(e),s(e)}catch(y){m(y instanceof Error?y.message:String(y))}f(!1)},x=e!==a;return c.jsxs("section",{className:"rounded-xl border border-line bg-surface p-5",children:[c.jsxs("div",{className:"flex items-center justify-between gap-3",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsx("h2",{className:"text-sm font-semibold text-fg",children:"全局 AGENTS.md"}),c.jsx("p",{className:"mt-1 text-xs text-fg-4",children:"此内容会注入到所有仓库的 Agent 系统指令中。修改后 opencode 热加载,即时生效。"})]}),c.jsxs("button",{type:"button",onClick:()=>void b(),disabled:d||!x,className:"flex shrink-0 items-center gap-1.5 rounded-md bg-blue-600 px-3 py-1.5 text-xs font-medium text-white transition-colors hover:bg-blue-500 disabled:opacity-40",children:[c.jsx(Eh,{className:"h-3.5 w-3.5"}),d?"保存中…":"保存"]})]}),h&&c.jsxs("div",{className:"mt-3 flex items-start gap-2 rounded-lg bg-red-500/10 px-3 py-2 text-xs text-red-400",children:[c.jsx(ia,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),c.jsx("span",{className:"min-w-0 break-words",children:h})]}),c.jsx("div",{className:"mt-4",children:l?c.jsxs("div",{className:"flex flex-col items-center gap-2.5 py-10 text-fg-5",children:[c.jsx(_r,{className:"h-5 w-5 fs-spin"}),c.jsx("p",{className:"text-xs",children:"加载中…"})]}):c.jsx("textarea",{value:e,onChange:y=>t(y.target.value),spellCheck:!1,className:"h-96 w-full resize-y rounded-lg border border-line bg-base px-4 py-3 font-mono text-sm leading-relaxed text-fg placeholder:text-fg-6 focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-500/20",placeholder:`# AGENTS.md
|
|
441
|
+
|
|
442
|
+
在此编写全局 Agent 指令…`})}),c.jsx("p",{className:"mt-3 text-[11px] text-fg-5",children:"文件路径:~/.config/opencode/AGENTS.md"})]})}function f9(){const[e,t]=A.useState([]),[a,s]=A.useState(!0),l=()=>{$3().then(d=>{t(d),s(!1)}).catch(()=>s(!1))};A.useEffect(l,[]);const o=async d=>{await K3(d),t(f=>f.filter(h=>h.id!==d))};return c.jsxs("section",{className:"rounded-xl border border-line bg-surface p-5",children:[c.jsx("h2",{className:"text-sm font-semibold text-fg",children:"Git 源站管理"}),c.jsx("p",{className:"mt-1 text-xs text-fg-4",children:"为不同的 Git 托管平台配置访问凭证,用于同步 Issues。系统会根据仓库的 git URL 自动匹配对应的源站。"}),c.jsx("div",{className:"mt-4 space-y-2",children:a?c.jsx("p",{className:"py-4 text-center font-mono text-xs text-fg-5",children:"加载中…"}):c.jsxs(c.Fragment,{children:[e.map(d=>c.jsx(u9,{host:d,onDelete:()=>void o(d.id)},d.id)),c.jsx(c9,{onAdded:l})]})}),c.jsx("p",{className:"mt-4 text-[11px] text-fg-5",children:"Token 存储在数据库中。也可通过环境变量 GITEA_TOKEN 设置全局 fallback。"})]})}const sh="pinned_models";function m9(e){const t=new Map;for(const a of e){const s=a.providerName||a.providerID,l=t.get(s);l?l.push(a):t.set(s,[a])}return Array.from(t,([a,s])=>({provider:a,models:s}))}function h9(e){return e?e>=1e6?`${(e/1e6).toFixed(e%1e6===0?0:1)}M`:e>=1e3?`${Math.round(e/1e3)}K`:String(e):""}function p9(e){if(!e)return"";const t=[];return e.input!=null&&t.push(`$${e.input}/Mi`),e.output!=null&&t.push(`$${e.output}/Mo`),t.join(" ")}function g9(){const e=qe(k=>k.activeRepoId),[t,a]=A.useState([]),[s,l]=A.useState(new Set),[o,d]=A.useState(!0),[f,h]=A.useState(null),[m,b]=A.useState(null),[x,y]=A.useState("");A.useEffect(()=>{let k=!1;async function D(){d(!0),h(null);try{const[$,L]=await Promise.all([Th(),e?yh(e):Promise.resolve([])]);if(k)return;const Y=$[sh],re=Y?JSON.parse(Y):[];l(new Set(re)),a(L),b(null),y("")}catch($){k||h($ instanceof Error?$.message:String($))}k||d(!1)}return D(),()=>{k=!0}},[e]);const T=async k=>{const D=new Set(s);D.has(k)?D.delete(k):D.add(k),l(D);try{await Y3(sh,JSON.stringify([...D]))}catch{l(s)}},N=A.useMemo(()=>m9(t),[t]),S=t.filter(k=>s.has(k.id)).length,C=m?N.find(k=>k.provider===m):N[0],v=x.trim().toLowerCase(),M=C?v?C.models.filter(k=>(k.name||k.id).toLowerCase().includes(v)||k.id.toLowerCase().includes(v)):C.models:[];return c.jsxs("section",{className:"rounded-xl border border-line bg-surface p-5",children:[c.jsx("div",{className:"flex items-center justify-between gap-3",children:c.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[c.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-blue-500/10 text-blue-500",children:c.jsx(sc,{className:"h-4 w-4"})}),c.jsxs("div",{className:"min-w-0",children:[c.jsx("h2",{className:"text-sm font-semibold text-fg",children:"常用模型"}),c.jsxs("p",{className:"mt-0.5 text-xs text-fg-4",children:["勾选常用模型,在新建对话时快速选择。",S>0&&c.jsxs("span",{className:"ml-1 text-blue-400",children:["已选 ",S," 个"]})]})]})]})}),c.jsx("div",{className:"mt-4",children:e?o?c.jsxs("div",{className:"flex flex-col items-center gap-2.5 py-10 text-fg-5",children:[c.jsx(_r,{className:"h-5 w-5 fs-spin"}),c.jsx("p",{className:"text-xs",children:"加载模型列表…"})]}):f?c.jsxs("div",{className:"flex flex-col items-center gap-2.5 py-10 text-red-400",children:[c.jsx(ia,{className:"h-5 w-5"}),c.jsx("p",{className:"max-w-xs text-center text-xs leading-relaxed",children:f})]}):t.length===0?c.jsxs("div",{className:"flex flex-col items-center gap-2.5 py-10 text-fg-5",children:[c.jsx(sc,{className:"h-5 w-5"}),c.jsx("p",{className:"text-xs",children:"当前仓库没有可用模型。"})]}):c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"flex gap-1 overflow-x-auto rounded-lg border border-line bg-base p-1",children:N.map(k=>{var L;const D=k.provider===(m??((L=N[0])==null?void 0:L.provider)),$=k.models.filter(Y=>s.has(Y.id)).length;return c.jsxs("button",{type:"button",onClick:()=>{b(k.provider),y("")},className:me("flex shrink-0 items-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-colors",D?"bg-surface text-fg shadow-sm":"text-fg-4 hover:text-fg-3"),children:[k.provider,$>0&&c.jsx("span",{className:"rounded-full bg-blue-500/15 px-1.5 py-0.5 text-[10px] font-semibold tabular-nums text-blue-500",children:$})]},k.provider)})}),c.jsxs("div",{className:"mt-3 flex items-center gap-2 rounded-md border border-line bg-base px-3 py-1.5",children:[c.jsx(Va,{className:"h-3.5 w-3.5 shrink-0 text-fg-5"}),c.jsx("input",{type:"text",value:x,onChange:k=>y(k.target.value),placeholder:"搜索模型…",className:"min-w-0 flex-1 bg-transparent text-xs text-fg placeholder:text-fg-6 focus:outline-none"}),x&&c.jsx("button",{type:"button",onClick:()=>y(""),className:"text-fg-5 hover:text-fg-3",children:c.jsx(Tt,{className:"h-3 w-3"})})]}),c.jsx("div",{className:"mt-3 rounded-lg border border-line bg-base",children:M.length===0?c.jsx("div",{className:"px-3 py-6 text-center text-xs text-fg-5",children:"无匹配模型"}):c.jsx("div",{className:"divide-y divide-line/40",children:M.map(k=>{const D=s.has(k.id),$=h9(k.contextLimit),L=p9(k.cost);return c.jsxs("label",{className:me("flex cursor-pointer items-center gap-3 px-3 py-2 transition-colors hover:bg-elevated/60",D&&"bg-blue-500/5"),children:[c.jsx("input",{type:"checkbox",checked:D,onChange:()=>void T(k.id),className:"h-3.5 w-3.5 shrink-0 cursor-pointer rounded border-line accent-blue-500"}),c.jsx("span",{className:"min-w-0 flex-1 truncate font-mono text-xs text-fg",children:k.name||k.id}),c.jsxs("span",{className:"flex shrink-0 items-center gap-2",children:[$&&c.jsx("span",{className:"rounded bg-surface px-1.5 py-0.5 text-[10px] text-fg-5",children:$}),L&&c.jsx("span",{className:"text-[10px] text-fg-6",children:L})]})]},k.id)})})})]}):c.jsxs("div",{className:"flex flex-col items-center gap-2.5 py-10 text-fg-5",children:[c.jsx(sc,{className:"h-5 w-5"}),c.jsx("p",{className:"text-xs",children:"请先在左侧选择一个仓库以加载可用模型。"})]})})]})}const b9=["Sisyphus - ultraworker","Prometheus - Plan Builder","Atlas - Plan Executor"];function x9({agent:e,onEdit:t,onDelete:a}){const[s,l]=A.useState(!1),[o,d]=A.useState(!1),f=async()=>{const m=await Wb(e.id),b=new Blob([JSON.stringify(m,null,2)],{type:"application/json"}),x=URL.createObjectURL(b),y=document.createElement("a");y.href=x,y.download=`${e.name.replace(/[^a-zA-Z0-9\u4e00-\u9fff_-]/g,"_")}.json`,y.click(),URL.revokeObjectURL(x)},h=async()=>{const m=await Wb(e.id);await navigator.clipboard.writeText(JSON.stringify(m,null,2)),d(!0),setTimeout(()=>d(!1),2e3)};return c.jsxs("div",{className:"group flex items-center gap-3 rounded-lg border border-line bg-base px-4 py-3",children:[c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"text-sm font-medium text-fg",children:e.name}),c.jsx("span",{className:"rounded bg-elevated px-1.5 py-0.5 font-mono text-[10px] text-fg-4",children:e.baseAgent}),e.model&&c.jsx("span",{className:"rounded bg-elevated px-1.5 py-0.5 font-mono text-[10px] text-fg-5",children:e.model}),e.repoId&&c.jsx("span",{className:"rounded bg-blue-500/10 px-1.5 py-0.5 text-[10px] font-medium text-blue-400",children:"repo"})]}),e.systemPrompt&&c.jsx("p",{className:"mt-0.5 truncate font-mono text-xs text-fg-5",children:e.systemPrompt})]}),c.jsx("div",{className:"flex items-center gap-1",children:s?c.jsxs(c.Fragment,{children:[c.jsx("button",{type:"button",onClick:a,className:"rounded p-1.5 text-red-400 hover:bg-red-500/10",children:c.jsx(Ia,{className:"h-4 w-4"})}),c.jsx("button",{type:"button",onClick:()=>l(!1),className:"rounded p-1.5 text-fg-4 hover:bg-elevated",children:c.jsx(Tt,{className:"h-4 w-4"})})]}):c.jsxs(c.Fragment,{children:[c.jsx("button",{type:"button",onClick:()=>void f(),title:"导出 JSON 文件",className:"rounded p-1.5 text-fg-5 opacity-0 transition-opacity hover:text-fg-3 group-hover:opacity-100",children:c.jsx(zv,{className:"h-4 w-4"})}),c.jsx("button",{type:"button",onClick:()=>void h(),title:"复制 JSON 到剪贴板",className:"rounded p-1.5 text-fg-5 opacity-0 transition-opacity hover:text-fg-3 group-hover:opacity-100",children:o?c.jsx(Ia,{className:"h-4 w-4 text-green-500"}):c.jsx(jv,{className:"h-4 w-4"})}),c.jsx("button",{type:"button",onClick:t,className:"rounded p-1.5 text-fg-5 opacity-0 transition-opacity hover:text-fg-3 group-hover:opacity-100",children:c.jsx(wE,{className:"h-4 w-4"})}),c.jsx("button",{type:"button",onClick:()=>l(!0),className:"rounded p-1.5 text-fg-5 opacity-0 transition-opacity hover:text-red-400 group-hover:opacity-100",children:c.jsx(Li,{className:"h-4 w-4"})})]})})]})}const Ms="__system_prompt__";function K1({initial:e,availableFragments:t,onSave:a,onCancel:s}){const l=qe(H=>H.activeRepoId),[o,d]=A.useState((e==null?void 0:e.name)??""),[f,h]=A.useState((e==null?void 0:e.baseAgent)??"Sisyphus - ultraworker"),[m,b]=A.useState((e==null?void 0:e.model)??""),[x,y]=A.useState((e==null?void 0:e.systemPrompt)??""),[T,N]=A.useState(!1),[S,C]=A.useState(!1),[v,M]=A.useState([]);A.useEffect(()=>{if(!l){M([]);return}let H=!1;return(async()=>{try{const[ae,se]=await Promise.all([Th(),yh(l)]);if(H)return;const Z=ae[sh],J=Z?JSON.parse(Z):[];M(J.length>0?se.filter(V=>J.includes(V.id)):[])}catch{H||M([])}})(),()=>{H=!0}},[l]);const[k,D]=A.useState(()=>{const H=(e==null?void 0:e.fragments.map(J=>J.id))??[],ae=(e==null?void 0:e.systemPromptPosition)??-1,se=ae>=0&&ae<=H.length?ae:H.length,Z=[...H];return Z.splice(se,0,Ms),Z}),$=H=>{D(ae=>{if(ae.includes(H))return ae.filter(J=>J!==H);const se=ae.indexOf(Ms),Z=[...ae];return Z.splice(se>=0?se:Z.length,0,H),Z})},L=(H,ae)=>{const se=H+ae;se<0||se>=k.length||D(Z=>{const J=[...Z];return[J[H],J[se]]=[J[se],J[H]],J})},Y=k.filter(H=>H!==Ms),re=(()=>{const H=k.indexOf(Ms);return H<0?-1:k.slice(0,H).filter(ae=>ae!==Ms).length})(),fe=k.map(H=>{var ae;return H===Ms?x:(ae=t.find(se=>se.id===H))==null?void 0:ae.content}).filter(Boolean).join(`
|
|
443
|
+
|
|
444
|
+
---
|
|
445
|
+
|
|
446
|
+
`),U=async()=>{if(!(!o.trim()||!f)){C(!0);try{await a({name:o.trim(),baseAgent:f,model:m.trim()||void 0,systemPrompt:x,systemPromptPosition:re,fragmentIds:Y})}finally{C(!1)}}};return c.jsxs("div",{className:"space-y-3 rounded-lg border border-line bg-base p-4",children:[c.jsxs("div",{className:"flex gap-3",children:[c.jsxs("label",{className:"flex-1",children:[c.jsx("span",{className:"text-xs font-medium text-fg-3",children:"名称"}),c.jsx("input",{type:"text",value:o,onChange:H=>d(H.target.value),placeholder:"代码审查员",className:"mt-1 w-full rounded-md border border-line bg-surface px-3 py-1.5 text-sm text-fg placeholder:text-fg-6 focus:border-blue-500 focus:outline-none"})]}),c.jsxs("label",{className:"w-36",children:[c.jsx("span",{className:"text-xs font-medium text-fg-3",children:"Base Agent"}),c.jsx("select",{value:f,onChange:H=>h(H.target.value),className:"mt-1 w-full rounded-md border border-line bg-surface px-3 py-1.5 text-sm text-fg focus:border-blue-500 focus:outline-none",children:b9.map(H=>c.jsx("option",{value:H,children:H},H))})]})]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-xs font-medium text-fg-3",children:"模型(可选)"}),c.jsxs("select",{value:m,onChange:H=>b(H.target.value),className:"mt-1 w-full rounded-md border border-line bg-surface px-3 py-1.5 font-mono text-sm text-fg focus:border-blue-500 focus:outline-none",children:[c.jsx("option",{value:"",children:"默认模型"}),v.map(H=>c.jsx("option",{value:H.id,children:H.name||H.id},H.id))]}),v.length===0&&c.jsx("p",{className:"mt-1 text-[11px] text-fg-5",children:"在「模型」Tab 中勾选常用模型后可选择。"})]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-xs font-medium text-fg-3",children:"提示词组合"}),c.jsx("p",{className:"mt-0.5 text-[11px] text-fg-5",children:"拖拽排序片段与补充指令的拼接顺序。"}),c.jsxs("div",{className:"mt-1.5 space-y-1",children:[k.map((H,ae)=>{if(H===Ms)return c.jsxs("div",{className:"flex items-center gap-2 rounded border border-amber-500/30 bg-amber-500/5 px-2 py-1",children:[c.jsxs("div",{className:"flex flex-col",children:[c.jsx("button",{type:"button",onClick:()=>L(ae,-1),disabled:ae===0,className:"text-[10px] leading-none text-fg-5 hover:text-fg-2 disabled:opacity-30",children:"▲"}),c.jsx("button",{type:"button",onClick:()=>L(ae,1),disabled:ae===k.length-1,className:"text-[10px] leading-none text-fg-5 hover:text-fg-2 disabled:opacity-30",children:"▼"})]}),c.jsx("span",{className:"flex-1 truncate text-xs font-medium text-amber-400",children:"✎ 补充指令"})]},H);const se=t.find(Z=>Z.id===H);return se?c.jsxs("div",{className:"flex items-center gap-2 rounded border border-blue-500/30 bg-blue-500/5 px-2 py-1",children:[c.jsxs("div",{className:"flex flex-col",children:[c.jsx("button",{type:"button",onClick:()=>L(ae,-1),disabled:ae===0,className:"text-[10px] leading-none text-fg-5 hover:text-fg-2 disabled:opacity-30",children:"▲"}),c.jsx("button",{type:"button",onClick:()=>L(ae,1),disabled:ae===k.length-1,className:"text-[10px] leading-none text-fg-5 hover:text-fg-2 disabled:opacity-30",children:"▼"})]}),c.jsx("span",{className:"flex-1 truncate text-xs text-fg",children:se.name}),c.jsx("button",{type:"button",onClick:()=>$(H),className:"text-fg-5 hover:text-red-400",children:c.jsx(Tt,{className:"h-3 w-3"})})]},H):null}),t.filter(H=>!Y.includes(H.id)).length>0&&c.jsxs("select",{value:"",onChange:H=>{H.target.value&&$(H.target.value)},className:"w-full rounded border border-dashed border-line bg-surface px-2 py-1 text-xs text-fg-4 focus:border-blue-500 focus:outline-none",children:[c.jsx("option",{value:"",children:"+ 添加片段…"}),t.filter(H=>!Y.includes(H.id)).map(H=>c.jsx("option",{value:H.id,children:H.name},H.id))]})]})]}),c.jsxs("label",{className:"block",children:[c.jsx("span",{className:"text-xs font-medium text-fg-3",children:"补充指令内容"}),c.jsx("textarea",{value:x,onChange:H=>y(H.target.value),rows:3,placeholder:"agent 级别的补充指令…",className:"mt-1 w-full resize-y rounded-md border border-line bg-surface px-3 py-2 font-mono text-sm leading-relaxed text-fg placeholder:text-fg-6 focus:border-blue-500 focus:outline-none"})]}),(Y.length>0||x)&&c.jsxs("div",{children:[c.jsxs("button",{type:"button",onClick:()=>N(!T),className:"flex items-center gap-1 text-xs font-medium text-fg-4 hover:text-fg-3",children:[c.jsx("span",{children:T?"▾":"▸"})," 预览最终提示词"]}),T&&c.jsx("pre",{className:"mt-1 max-h-48 overflow-auto rounded border border-line bg-elevated px-3 py-2 font-mono text-xs leading-relaxed text-fg-4",children:fe||"(空)"})]}),c.jsxs("div",{className:"flex justify-end gap-2 pt-1",children:[c.jsx("button",{type:"button",onClick:s,className:"rounded-md px-3 py-1.5 text-xs text-fg-4 hover:bg-elevated",children:"取消"}),c.jsx("button",{type:"button",onClick:()=>void U(),disabled:S||!o.trim(),className:"rounded-md bg-blue-600 px-4 py-1.5 text-xs font-medium text-white transition-colors hover:bg-blue-500 disabled:opacity-40",children:S?"保存中…":e?"更新":"创建"})]})]})}function E9({fragment:e,onEdit:t,onDelete:a}){const[s,l]=A.useState(!1);return c.jsxs("div",{className:"group flex items-center gap-3 rounded-lg border border-line bg-base px-3 py-2",children:[c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsx("span",{className:"text-xs font-medium text-fg",children:e.name}),e.content&&c.jsx("p",{className:"mt-0.5 truncate font-mono text-[11px] text-fg-5",children:e.content})]}),c.jsx("div",{className:"flex items-center gap-1",children:s?c.jsxs(c.Fragment,{children:[c.jsx("button",{type:"button",onClick:a,className:"rounded p-1 text-red-400 hover:bg-red-500/10",children:c.jsx(Ia,{className:"h-3.5 w-3.5"})}),c.jsx("button",{type:"button",onClick:()=>l(!1),className:"rounded p-1 text-fg-4 hover:bg-elevated",children:c.jsx(Tt,{className:"h-3.5 w-3.5"})})]}):c.jsxs(c.Fragment,{children:[c.jsx("button",{type:"button",onClick:t,className:"rounded p-1 text-fg-5 opacity-0 transition-opacity hover:text-fg-3 group-hover:opacity-100",children:c.jsx(wE,{className:"h-3.5 w-3.5"})}),c.jsx("button",{type:"button",onClick:()=>l(!0),className:"rounded p-1 text-fg-5 opacity-0 transition-opacity hover:text-red-400 group-hover:opacity-100",children:c.jsx(Li,{className:"h-3.5 w-3.5"})})]})})]})}function V1({initial:e,onSave:t,onCancel:a}){const[s,l]=A.useState((e==null?void 0:e.name)??""),[o,d]=A.useState((e==null?void 0:e.content)??""),[f,h]=A.useState(!1),m=async()=>{if(s.trim()){h(!0);try{await t({name:s.trim(),content:o})}finally{h(!1)}}};return c.jsxs("div",{className:"space-y-2 rounded-lg border border-line bg-base p-3",children:[c.jsx("input",{type:"text",value:s,onChange:b=>l(b.target.value),placeholder:"片段名称",className:"w-full rounded-md border border-line bg-surface px-3 py-1.5 text-sm text-fg placeholder:text-fg-6 focus:border-blue-500 focus:outline-none"}),c.jsx("textarea",{value:o,onChange:b=>d(b.target.value),rows:3,placeholder:"提示词内容…",className:"w-full resize-y rounded-md border border-line bg-surface px-3 py-2 font-mono text-sm leading-relaxed text-fg placeholder:text-fg-6 focus:border-blue-500 focus:outline-none"}),c.jsxs("div",{className:"flex justify-end gap-2",children:[c.jsx("button",{type:"button",onClick:a,className:"rounded-md px-3 py-1 text-xs text-fg-4 hover:bg-elevated",children:"取消"}),c.jsx("button",{type:"button",onClick:()=>void m(),disabled:f||!s.trim(),className:"rounded-md bg-blue-600 px-3 py-1 text-xs font-medium text-white hover:bg-blue-500 disabled:opacity-40",children:f?"保存中…":e?"更新":"创建"})]})]})}function y9({onImported:e,onCancel:t}){const[a,s]=A.useState(""),[l,o]=A.useState(!1),[d,f]=A.useState(null),h=A.useRef(null),m=async x=>{f(null);let y;try{y=JSON.parse(x)}catch{f("JSON 格式无效");return}if(y.type!=="fourth-spark-custom-agent"||!y.agent){f("不是有效的 Custom Agent 导出文件");return}o(!0);try{await E3(y),e()}catch(T){f(T instanceof Error?T.message:String(T))}finally{o(!1)}},b=x=>{var N;const y=(N=x.target.files)==null?void 0:N[0];if(!y)return;const T=new FileReader;T.onload=()=>{const S=T.result;s(S),m(S)},T.readAsText(y)};return c.jsxs("div",{className:"space-y-3 rounded-lg border border-line bg-base p-4",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("span",{className:"text-xs font-medium text-fg-3",children:"导入 Custom Agent"}),c.jsx("button",{type:"button",onClick:t,className:"rounded p-1 text-fg-5 hover:text-fg-3",children:c.jsx(Tt,{className:"h-3.5 w-3.5"})})]}),c.jsx("input",{ref:h,type:"file",accept:".json",onChange:b,className:"hidden"}),c.jsxs("button",{type:"button",onClick:()=>{var x;return(x=h.current)==null?void 0:x.click()},className:"flex w-full items-center justify-center gap-1.5 rounded-md border border-dashed border-line py-2.5 text-xs text-fg-4 transition-colors hover:border-fg-5 hover:text-fg-3",children:[c.jsx(RE,{className:"h-3.5 w-3.5"})," 上传 JSON 文件"]}),c.jsx("div",{className:"relative",children:c.jsx("textarea",{value:a,onChange:x=>s(x.target.value),rows:4,placeholder:"或粘贴 JSON 内容…",className:"w-full resize-y rounded-md border border-line bg-surface px-3 py-2 font-mono text-xs leading-relaxed text-fg placeholder:text-fg-6 focus:border-blue-500 focus:outline-none"})}),d&&c.jsxs("div",{className:"flex items-start gap-2 rounded-lg bg-red-500/10 px-3 py-2 text-xs text-red-400",children:[c.jsx(ia,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),c.jsx("span",{children:d})]}),c.jsxs("div",{className:"flex justify-end gap-2",children:[c.jsx("button",{type:"button",onClick:t,className:"rounded-md px-3 py-1.5 text-xs text-fg-4 hover:bg-elevated",children:"取消"}),c.jsx("button",{type:"button",onClick:()=>void m(a),disabled:l||!a.trim(),className:"rounded-md bg-blue-600 px-4 py-1.5 text-xs font-medium text-white transition-colors hover:bg-blue-500 disabled:opacity-40",children:l?"导入中…":"导入"})]})]})}function T9(){const[e,t]=A.useState([]),[a,s]=A.useState([]),[l,o]=A.useState(!0),[d,f]=A.useState(!1),[h,m]=A.useState(null),[b,x]=A.useState(!1),[y,T]=A.useState(null),[N,S]=A.useState(!1),C=()=>{Promise.all([PE(),_3()]).then(([Y,re])=>{t(Y),s(re),o(!1)}).catch(()=>o(!1))};A.useEffect(C,[]);const v=async Y=>{await UE(Y),f(!1),C(),Mi.getState().loadAgents()},M=async Y=>{h&&(await HE(h.id,Y),m(null),C(),Mi.getState().loadAgents())},k=async Y=>{await FE(Y),t(re=>re.filter(fe=>fe.id!==Y)),Mi.getState().loadAgents()},D=async Y=>{await N3(Y),x(!1),C()},$=async Y=>{y&&(await S3(y.id,Y),T(null),C())},L=async Y=>{await v3(Y),s(re=>re.filter(fe=>fe.id!==Y))};return l?c.jsx("section",{className:"rounded-xl border border-line bg-surface p-5",children:c.jsx("p",{className:"py-4 text-center font-mono text-xs text-fg-5",children:"加载中…"})}):c.jsxs("div",{className:"space-y-4",children:[c.jsxs("section",{className:"rounded-xl border border-line bg-surface p-5",children:[c.jsx("h2",{className:"text-sm font-semibold text-fg",children:"提示词片段"}),c.jsx("p",{className:"mt-1 text-xs text-fg-4",children:"可复用的提示词模块,可在多个 Custom Agent 间共享。"}),c.jsxs("div",{className:"mt-3 space-y-1.5",children:[a.map(Y=>(y==null?void 0:y.id)===Y.id?c.jsx(V1,{initial:Y,onSave:$,onCancel:()=>T(null)},Y.id):c.jsx(E9,{fragment:Y,onEdit:()=>T(Y),onDelete:()=>void L(Y.id)},Y.id)),b?c.jsx(V1,{onSave:D,onCancel:()=>x(!1)}):c.jsxs("button",{type:"button",onClick:()=>x(!0),className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-line py-2 text-xs text-fg-4 transition-colors hover:border-fg-5 hover:text-fg-3",children:[c.jsx(Sr,{className:"h-3.5 w-3.5"})," 添加片段"]})]})]}),c.jsxs("section",{className:"rounded-xl border border-line bg-surface p-5",children:[c.jsx("h2",{className:"text-sm font-semibold text-fg",children:"Custom Agents"}),c.jsx("p",{className:"mt-1 text-xs text-fg-4",children:"组合 base agent + 模型 + 提示词片段 + 补充指令。创建 Session 时选择即可。"}),c.jsxs("div",{className:"mt-3 space-y-2",children:[e.map(Y=>(h==null?void 0:h.id)===Y.id?c.jsx(K1,{initial:Y,availableFragments:a,onSave:M,onCancel:()=>m(null)},Y.id):c.jsx(x9,{agent:Y,onEdit:()=>m(Y),onDelete:()=>void k(Y.id)},Y.id)),d?c.jsx(K1,{availableFragments:a,onSave:v,onCancel:()=>f(!1)}):N?c.jsx(y9,{onImported:()=>{S(!1),C(),Mi.getState().loadAgents()},onCancel:()=>S(!1)}):c.jsxs("div",{className:"flex gap-2",children:[c.jsxs("button",{type:"button",onClick:()=>f(!0),className:"flex flex-1 items-center justify-center gap-1.5 rounded-lg border border-dashed border-line py-2.5 text-xs text-fg-4 transition-colors hover:border-fg-5 hover:text-fg-3",children:[c.jsx(Sr,{className:"h-3.5 w-3.5"})," 添加 Custom Agent"]}),c.jsxs("button",{type:"button",onClick:()=>S(!0),className:"flex flex-1 items-center justify-center gap-1.5 rounded-lg border border-dashed border-line py-2.5 text-xs text-fg-4 transition-colors hover:border-fg-5 hover:text-fg-3",children:[c.jsx(RE,{className:"h-3.5 w-3.5"})," 导入 Agent"]})]})]}),c.jsx("p",{className:"mt-4 text-[11px] text-fg-5",children:"全局 Agent 对所有仓库可见。支持导出 JSON 分享给其他实例。"})]})]})}function _9(){const[e,t]=A.useState(Hm),[a,s]=A.useState(!1),[l,o]=A.useState(null),[d,f]=A.useState(Hm),h=e!==d,m=async()=>{const x=e.replace(/\/+$/,"");if(x){s(!0),o(null);try{const y=await fetch(`${x}/api/health`,{signal:AbortSignal.timeout(5e3)});o(y.ok?"ok":"fail")}catch{o("fail")}s(!1)}},b=()=>{const x=e.replace(/\/+$/,"");WA(x),f(x),t(x)};return c.jsxs("section",{className:"rounded-xl border border-line bg-surface p-5",children:[c.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[c.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-blue-500/10 text-blue-500",children:c.jsx(OE,{className:"h-4 w-4"})}),c.jsxs("div",{className:"min-w-0",children:[c.jsx("h2",{className:"text-sm font-semibold text-fg",children:"服务器连接"}),c.jsx("p",{className:"mt-0.5 text-xs text-fg-4",children:"配置远程 Fourth Spark Server 地址。"})]})]}),c.jsxs("div",{className:"mt-4 space-y-3",children:[c.jsxs("label",{className:"block",children:[c.jsx("span",{className:"text-xs font-medium text-fg-3",children:"服务器地址"}),c.jsx("input",{type:"url",value:e,onChange:x=>{t(x.target.value),o(null)},placeholder:"http://192.168.1.100:3000",className:"mt-1 w-full rounded-md border border-line bg-base px-3 py-2 font-mono text-sm text-fg placeholder:text-fg-6 focus:border-blue-500 focus:outline-none"})]}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsxs("button",{type:"button",onClick:()=>void m(),disabled:a||!e.trim(),className:"flex items-center gap-1.5 rounded-md border border-line px-3 py-1.5 text-xs font-medium text-fg-3 transition-colors hover:bg-elevated disabled:opacity-40",children:[a?c.jsx(_r,{className:"h-3.5 w-3.5 fs-spin"}):c.jsx(Ps,{className:"h-3.5 w-3.5"}),"测试连接"]}),c.jsxs("button",{type:"button",onClick:b,disabled:!h,className:"flex items-center gap-1.5 rounded-md bg-blue-600 px-3 py-1.5 text-xs font-medium text-white transition-colors hover:bg-blue-500 disabled:opacity-40",children:[c.jsx(Eh,{className:"h-3.5 w-3.5"}),"保存"]}),l==="ok"&&c.jsxs("span",{className:"inline-flex items-center gap-1 text-xs font-medium text-green-500",children:[c.jsx(Ia,{className:"h-3.5 w-3.5"})," 连接成功"]}),l==="fail"&&c.jsxs("span",{className:"inline-flex items-center gap-1 text-xs font-medium text-red-400",children:[c.jsx(ia,{className:"h-3.5 w-3.5"})," 连接失败"]})]})]}),c.jsx("p",{className:"mt-4 text-[11px] text-fg-5",children:"保存后需重新打开 App 生效。确保手机与开发机在同一局域网。"})]})}function N9(){const[e,t]=A.useState("usage"),a=A.useMemo(()=>LE()||Hm()?[...G1,r9]:G1,[]);return c.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:c.jsxs("div",{className:"mx-auto max-w-2xl",children:[c.jsx("h1",{className:"text-lg font-semibold text-fg",children:"设置"}),c.jsx("p",{className:"mt-0.5 text-sm text-fg-4",children:"全局配置"}),c.jsx("div",{className:"mt-6 flex gap-1 rounded-lg border border-line bg-surface p-1",children:a.map(s=>c.jsxs("button",{type:"button",onClick:()=>t(s.id),className:me("flex flex-1 items-center justify-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-colors",e===s.id?"bg-base text-fg shadow-sm":"text-fg-4 hover:text-fg-3"),children:[c.jsx(s.icon,{className:"h-3.5 w-3.5"}),s.label]},s.id))}),c.jsxs("div",{className:"mt-4",children:[e==="usage"&&c.jsx(o9,{}),e==="git"&&c.jsx(f9,{}),e==="models"&&c.jsx(g9,{}),e==="custom-agents"&&c.jsx(T9,{}),e==="agents"&&c.jsx(d9,{}),e==="server"&&c.jsx(_9,{})]})]})})}const S9=300,v9=4e3,A9={info:{icon:"ℹ",badge:"bg-fg/10 text-fg-2",bar:"bg-fg-4"},success:{icon:"✓",badge:"bg-emerald-500/10 text-emerald-500",bar:"bg-emerald-500"},warning:{icon:"⚠",badge:"bg-amber-500/10 text-amber-500",bar:"bg-amber-500"},error:{icon:"✕",badge:"bg-red-500/10 text-red-500",bar:"bg-red-500"}};function C9(){const e=Yt(m=>m.toasts),t=Yt(m=>m.removeToast),a=Ue(m=>m.setActiveSession),s=qe(Da),l=Na(),o=m=>{t(m.id),m.sessionId&&(a(m.sessionId),l(`/${encodeURIComponent(s)}/run`))},[d,f]=A.useState([]),h=A.useRef(new Map);return A.useEffect(()=>{const m=new Set(e.map(b=>b.id));f(b=>{let x=b.map(y=>m.has(y.id)||y.exiting?y:{...y,exiting:!0});for(const y of e)x.some(T=>T.id===y.id)||(x=[...x,{...y}]);return x})},[e]),A.useEffect(()=>{const m=h.current;for(const b of d)b.exiting&&!m.has(b.id)&&m.set(b.id,setTimeout(()=>{m.delete(b.id),f(x=>x.filter(y=>y.id!==b.id))},S9))},[d]),A.useEffect(()=>{const m=h.current;return()=>m.forEach(clearTimeout)},[]),d.length===0?null:c.jsx("div",{className:"pointer-events-none fixed top-4 right-4 z-50 flex w-[calc(100%-2rem)] max-w-sm flex-col","aria-live":"polite","aria-atomic":"false",children:d.map(m=>{const b=A9[m.variant];return c.jsx("div",{className:"grid w-full transition-[grid-template-rows] duration-300 ease-out",style:{gridTemplateRows:m.exiting?"0fr":"1fr"},children:c.jsx("div",{className:"min-h-0 overflow-hidden",children:c.jsxs("div",{role:"status",onClick:()=>o(m),style:{animation:`${m.exiting?"toast-out":"toast-in"} 0.3s ease-out forwards`},className:"pointer-events-auto relative mb-2 flex cursor-pointer items-start gap-3 overflow-hidden rounded-xl border border-line bg-surface/80 px-3.5 py-3 shadow-lg shadow-black/5 backdrop-blur-md transition-colors hover:border-line-hard hover:bg-surface/90",children:[c.jsx("span",{"aria-hidden":!0,className:`mt-px flex h-5 w-5 shrink-0 items-center justify-center rounded-full text-xs font-semibold ${b.badge}`,children:b.icon}),c.jsx("p",{className:"min-w-0 flex-1 text-sm leading-snug break-words text-fg",children:m.message}),m.persistent&&!m.exiting&&c.jsx("button",{type:"button","aria-label":"关闭",onClick:x=>{x.stopPropagation(),t(m.id)},className:"mt-px flex h-5 w-5 shrink-0 items-center justify-center rounded-full text-fg-4 transition-colors hover:bg-fg/10 hover:text-fg",children:"✕"}),!m.exiting&&!m.persistent&&c.jsx("span",{"aria-hidden":!0,className:`absolute bottom-0 left-0 h-0.5 w-full origin-left ${b.bar}`,style:{animation:`toast-progress ${v9}ms linear forwards`}})]})})},m.id)})})}/*! Capacitor: https://capacitorjs.com/ - MIT License */var Hi;(function(e){e.Unimplemented="UNIMPLEMENTED",e.Unavailable="UNAVAILABLE"})(Hi||(Hi={}));class Mm extends Error{constructor(t,a,s){super(t),this.message=t,this.code=a,this.data=s}}const w9=e=>{var t,a;return e!=null&&e.androidBridge?"android":!((a=(t=e==null?void 0:e.webkit)===null||t===void 0?void 0:t.messageHandlers)===null||a===void 0)&&a.bridge?"ios":"web"},k9=e=>{const t=e.CapacitorCustomPlatform||null,a=e.Capacitor||{},s=a.Plugins=a.Plugins||{},l=()=>t!==null?t.name:w9(e),o=()=>l()!=="web",d=x=>{const y=m.get(x);return!!(y!=null&&y.platforms.has(l())||f(x))},f=x=>{var y;return(y=a.PluginHeaders)===null||y===void 0?void 0:y.find(T=>T.name===x)},h=x=>e.console.error(x),m=new Map,b=(x,y={})=>{const T=m.get(x);if(T)return console.warn(`Capacitor plugin "${x}" already registered. Cannot register plugins twice.`),T.proxy;const N=l(),S=f(x);let C;const v=async()=>(!C&&N in y?C=typeof y[N]=="function"?C=await y[N]():C=y[N]:t!==null&&!C&&"web"in y&&(C=typeof y.web=="function"?C=await y.web():C=y.web),C),M=(re,fe)=>{var U,H;if(S){const ae=S==null?void 0:S.methods.find(se=>fe===se.name);if(ae)return ae.rtype==="promise"?se=>a.nativePromise(x,fe.toString(),se):(se,Z)=>a.nativeCallback(x,fe.toString(),se,Z);if(re)return(U=re[fe])===null||U===void 0?void 0:U.bind(re)}else{if(re)return(H=re[fe])===null||H===void 0?void 0:H.bind(re);throw new Mm(`"${x}" plugin is not implemented on ${N}`,Hi.Unimplemented)}},k=re=>{let fe;const U=(...H)=>{const ae=v().then(se=>{const Z=M(se,re);if(Z){const J=Z(...H);return fe=J==null?void 0:J.remove,J}else throw new Mm(`"${x}.${re}()" is not implemented on ${N}`,Hi.Unimplemented)});return re==="addListener"&&(ae.remove=async()=>fe()),ae};return U.toString=()=>`${re.toString()}() { [capacitor code] }`,Object.defineProperty(U,"name",{value:re,writable:!1,configurable:!1}),U},D=k("addListener"),$=k("removeListener"),L=(re,fe)=>{const U=D({eventName:re},fe),H=async()=>{const se=await U;$({eventName:re,callbackId:se},fe)},ae=new Promise(se=>U.then(()=>se({remove:H})));return ae.remove=async()=>{console.warn("Using addListener() without 'await' is deprecated."),await H()},ae},Y=new Proxy({},{get(re,fe){switch(fe){case"$$typeof":return;case"toJSON":return()=>({});case"addListener":return S?L:D;case"removeListener":return $;default:return k(fe)}}});return s[x]=Y,m.set(x,{name:x,proxy:Y,platforms:new Set([...Object.keys(y),...S?[N]:[]])}),Y};return a.convertFileSrc||(a.convertFileSrc=x=>x),a.getPlatform=l,a.handleError=h,a.isNativePlatform=o,a.isPluginAvailable=d,a.registerPlugin=b,a.Exception=Mm,a.DEBUG=!!a.DEBUG,a.isLoggingEnabled=!!a.isLoggingEnabled,a},R9=e=>e.Capacitor=k9(e),ih=R9(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),Kc=ih.registerPlugin;class Xh{constructor(){this.listeners={},this.retainedEventArguments={},this.windowListeners={}}addListener(t,a){let s=!1;this.listeners[t]||(this.listeners[t]=[],s=!0),this.listeners[t].push(a);const o=this.windowListeners[t];o&&!o.registered&&this.addWindowListener(o),s&&this.sendRetainedArgumentsForEvent(t);const d=async()=>this.removeListener(t,a);return Promise.resolve({remove:d})}async removeAllListeners(){this.listeners={};for(const t in this.windowListeners)this.removeWindowListener(this.windowListeners[t]);this.windowListeners={}}notifyListeners(t,a,s){const l=this.listeners[t];if(!l){if(s){let o=this.retainedEventArguments[t];o||(o=[]),o.push(a),this.retainedEventArguments[t]=o}return}l.forEach(o=>o(a))}hasListeners(t){var a;return!!(!((a=this.listeners[t])===null||a===void 0)&&a.length)}registerWindowListener(t,a){this.windowListeners[a]={registered:!1,windowEventName:t,pluginEventName:a,handler:s=>{this.notifyListeners(a,s)}}}unimplemented(t="not implemented"){return new ih.Exception(t,Hi.Unimplemented)}unavailable(t="not available"){return new ih.Exception(t,Hi.Unavailable)}async removeListener(t,a){const s=this.listeners[t];if(!s)return;const l=s.indexOf(a);this.listeners[t].splice(l,1),this.listeners[t].length||this.removeWindowListener(this.windowListeners[t])}addWindowListener(t){window.addEventListener(t.windowEventName,t.handler),t.registered=!0}removeWindowListener(t){t&&(window.removeEventListener(t.windowEventName,t.handler),t.registered=!1)}sendRetainedArgumentsForEvent(t){const a=this.retainedEventArguments[t];a&&(delete this.retainedEventArguments[t],a.forEach(s=>{this.notifyListeners(t,s)}))}}const Q1=e=>encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),X1=e=>e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent);class O9 extends Xh{async getCookies(){const t=document.cookie,a={};return t.split(";").forEach(s=>{if(s.length<=0)return;let[l,o]=s.replace(/=/,"CAP_COOKIE").split("CAP_COOKIE");l=X1(l).trim(),o=X1(o).trim(),a[l]=o}),a}async setCookie(t){try{const a=Q1(t.key),s=Q1(t.value),l=t.expires?`; expires=${t.expires.replace("expires=","")}`:"",o=(t.path||"/").replace("path=",""),d=t.url!=null&&t.url.length>0?`domain=${t.url}`:"";document.cookie=`${a}=${s||""}${l}; path=${o}; ${d};`}catch(a){return Promise.reject(a)}}async deleteCookie(t){try{document.cookie=`${t.key}=; Max-Age=0`}catch(a){return Promise.reject(a)}}async clearCookies(){try{const t=document.cookie.split(";")||[];for(const a of t)document.cookie=a.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}catch(t){return Promise.reject(t)}}async clearAllCookies(){try{await this.clearCookies()}catch(t){return Promise.reject(t)}}}Kc("CapacitorCookies",{web:()=>new O9});const I9=async e=>new Promise((t,a)=>{const s=new FileReader;s.onload=()=>{const l=s.result;t(l.indexOf(",")>=0?l.split(",")[1]:l)},s.onerror=l=>a(l),s.readAsDataURL(e)}),M9=(e={})=>{const t=Object.keys(e);return Object.keys(e).map(l=>l.toLocaleLowerCase()).reduce((l,o,d)=>(l[o]=e[t[d]],l),{})},D9=(e,t=!0)=>e?Object.entries(e).reduce((s,l)=>{const[o,d]=l;let f,h;return Array.isArray(d)?(h="",d.forEach(m=>{f=t?encodeURIComponent(m):m,h+=`${o}=${f}&`}),h.slice(0,-1)):(f=t?encodeURIComponent(d):d,h=`${o}=${f}`),`${s}&${h}`},"").substr(1):null,L9=(e,t={})=>{const a=Object.assign({method:e.method||"GET",headers:e.headers},t),l=M9(e.headers)["content-type"]||"";if(typeof e.data=="string")a.body=e.data;else if(l.includes("application/x-www-form-urlencoded")){const o=new URLSearchParams;for(const[d,f]of Object.entries(e.data||{}))o.set(d,f);a.body=o.toString()}else if(l.includes("multipart/form-data")||e.data instanceof FormData){const o=new FormData;if(e.data instanceof FormData)e.data.forEach((f,h)=>{o.append(h,f)});else for(const f of Object.keys(e.data))o.append(f,e.data[f]);a.body=o;const d=new Headers(a.headers);d.delete("content-type"),a.headers=d}else(l.includes("application/json")||typeof e.data=="object")&&(a.body=JSON.stringify(e.data));return a};class j9 extends Xh{async request(t){const a=L9(t,t.webFetchExtra),s=D9(t.params,t.shouldEncodeUrlParams),l=s?`${t.url}?${s}`:t.url,o=await fetch(l,a),d=o.headers.get("content-type")||"";let{responseType:f="text"}=o.ok?t:{};d.includes("application/json")&&(f="json");let h,m;switch(f){case"arraybuffer":case"blob":m=await o.blob(),h=await I9(m);break;case"json":h=await o.json();break;case"document":case"text":default:h=await o.text()}const b={};return o.headers.forEach((x,y)=>{b[y]=x}),{data:h,headers:b,status:o.status,url:o.url}}async get(t){return this.request(Object.assign(Object.assign({},t),{method:"GET"}))}async post(t){return this.request(Object.assign(Object.assign({},t),{method:"POST"}))}async put(t){return this.request(Object.assign(Object.assign({},t),{method:"PUT"}))}async patch(t){return this.request(Object.assign(Object.assign({},t),{method:"PATCH"}))}async delete(t){return this.request(Object.assign(Object.assign({},t),{method:"DELETE"}))}}Kc("CapacitorHttp",{web:()=>new j9});var Z1;(function(e){e.Dark="DARK",e.Light="LIGHT",e.Default="DEFAULT"})(Z1||(Z1={}));var W1;(function(e){e.StatusBar="StatusBar",e.NavigationBar="NavigationBar"})(W1||(W1={}));class B9 extends Xh{async setStyle(){this.unavailable("not available for web")}async setAnimation(){this.unavailable("not available for web")}async show(){this.unavailable("not available for web")}async hide(){this.unavailable("not available for web")}}Kc("SystemBars",{web:()=>new B9});const Wl=Kc("PushNotifications",{});let J1=!1;async function P9(e){!LE()||J1||(J1=!0,(await Wl.requestPermissions()).receive!=="granted")||(Wl.addListener("registration",async a=>{try{await X3(a.value,"ios")}catch{}}),Wl.addListener("registrationError",()=>{}),Wl.addListener("pushNotificationActionPerformed",a=>{const s=a.notification.data,l=s==null?void 0:s.sessionId;if(l){const o=Da(qe.getState());o&&e(`/${encodeURIComponent(o)}/run?session=${l}`)}}),await Wl.register())}function U9(e){const t=e.match(/^\/([^/]+)\/(run|issues|pulls)/);return t?decodeURIComponent(t[1]):null}function H9(){const e=qe(s=>s.repos),a=qe(Da)??(e.length>0?e[0].name:null);return a?c.jsx(Lm,{to:`/${encodeURIComponent(a)}/run`,replace:!0}):c.jsx(Lm,{to:"/repos",replace:!0})}function F9(){const e=Na(),t=oa(),a=qe(f=>f.activeRepoId),s=qe(f=>f.repos),l=qe(f=>f.setActiveRepo),o=Ue(f=>f.loadSessions),d=Ue(f=>f.clearSessions);return A.useEffect(()=>(qe.getState().loadRepos(),P9(e),Um.getState().init()),[e]),A.useEffect(()=>{if(s.length===0)return;const f=U9(t.pathname);if(!f)return;const h=s.find(m=>m.name===f);h&&h.id!==qe.getState().activeRepoId&&l(h.id)},[t.pathname,s,l]),A.useEffect(()=>(a?(d(),Pe.getState().clearIssues(),Gn.getState().clearPulls(),o(),Mi.getState().loadAgents(),Pe.getState().loadIssues(),Gn.getState().loadPulls(),Tc.start(a)):(d(),Pe.getState().clearIssues(),Gn.getState().clearPulls()),()=>Tc.stop()),[a,o,d]),c.jsxs(c.Fragment,{children:[c.jsx(vS,{children:c.jsxs(yr,{element:c.jsx(tC,{}),children:[c.jsx(yr,{path:"/repos",element:c.jsx(rC,{})}),c.jsx(yr,{path:"/settings",element:c.jsx(N9,{})}),c.jsx(yr,{path:"/:repoId/run",element:c.jsx(RM,{})}),c.jsx(yr,{path:"/:repoId/issues",element:c.jsx(X8,{})}),c.jsx(yr,{path:"/:repoId/pulls",element:c.jsx(n9,{})}),c.jsx(yr,{path:"/:repoId",element:c.jsx(Lm,{to:"run",replace:!0})}),c.jsx(yr,{path:"*",element:c.jsx(H9,{})})]})}),c.jsx(C9,{})]})}function z9(){return c.jsx(XS,{children:c.jsx(F9,{})})}const u_=document.getElementById("root");if(!u_)throw new Error("Root element #root not found in index.html");N2.createRoot(u_).render(c.jsx(A.StrictMode,{children:c.jsx(z9,{})}));
|