@caoruhua/open-claude-remote 1.0.9 → 1.3.7

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.
Files changed (99) hide show
  1. package/README.md +48 -27
  2. package/dist/backend/src/api/file-routes.d.ts +0 -24
  3. package/dist/backend/src/api/file-routes.d.ts.map +1 -1
  4. package/dist/backend/src/api/file-routes.js +464 -68
  5. package/dist/backend/src/api/file-routes.js.map +1 -1
  6. package/dist/backend/src/api/instance-routes.d.ts +4 -0
  7. package/dist/backend/src/api/instance-routes.d.ts.map +1 -1
  8. package/dist/backend/src/api/instance-routes.js +27 -2
  9. package/dist/backend/src/api/instance-routes.js.map +1 -1
  10. package/dist/backend/src/cli-utils.d.ts +2 -0
  11. package/dist/backend/src/cli-utils.d.ts.map +1 -1
  12. package/dist/backend/src/cli-utils.js +11 -1
  13. package/dist/backend/src/cli-utils.js.map +1 -1
  14. package/dist/backend/src/cli.d.ts +6 -0
  15. package/dist/backend/src/cli.d.ts.map +1 -1
  16. package/dist/backend/src/cli.js +73 -10
  17. package/dist/backend/src/cli.js.map +1 -1
  18. package/dist/backend/src/config.d.ts +11 -0
  19. package/dist/backend/src/config.d.ts.map +1 -1
  20. package/dist/backend/src/config.js +36 -1
  21. package/dist/backend/src/config.js.map +1 -1
  22. package/dist/backend/src/daemon/daemon-client.d.ts +1 -0
  23. package/dist/backend/src/daemon/daemon-client.d.ts.map +1 -1
  24. package/dist/backend/src/daemon/daemon-client.js +1 -0
  25. package/dist/backend/src/daemon/daemon-client.js.map +1 -1
  26. package/dist/backend/src/daemon/daemon-entry.js +19 -6
  27. package/dist/backend/src/daemon/daemon-entry.js.map +1 -1
  28. package/dist/backend/src/daemon/daemon-launcher.d.ts.map +1 -1
  29. package/dist/backend/src/daemon/daemon-launcher.js +4 -1
  30. package/dist/backend/src/daemon/daemon-launcher.js.map +1 -1
  31. package/dist/backend/src/daemon/restart-state.d.ts +1 -0
  32. package/dist/backend/src/daemon/restart-state.d.ts.map +1 -1
  33. package/dist/backend/src/daemon/restart-state.js.map +1 -1
  34. package/dist/backend/src/deps/detector.js +1 -1
  35. package/dist/backend/src/deps/index.d.ts +1 -1
  36. package/dist/backend/src/deps/index.js +22 -22
  37. package/dist/backend/src/deps/installer.js +6 -6
  38. package/dist/backend/src/deps/installer.js.map +1 -1
  39. package/dist/backend/src/deps/types.d.ts +1 -1
  40. package/dist/backend/src/deps/types.d.ts.map +1 -1
  41. package/dist/backend/src/deps/types.js +9 -11
  42. package/dist/backend/src/deps/types.js.map +1 -1
  43. package/dist/backend/src/index.d.ts.map +1 -1
  44. package/dist/backend/src/index.js +29 -6
  45. package/dist/backend/src/index.js.map +1 -1
  46. package/dist/backend/src/instance/instance-manager.d.ts +4 -0
  47. package/dist/backend/src/instance/instance-manager.d.ts.map +1 -1
  48. package/dist/backend/src/instance/instance-manager.js +30 -7
  49. package/dist/backend/src/instance/instance-manager.js.map +1 -1
  50. package/dist/backend/src/instance/instance-session.d.ts +6 -1
  51. package/dist/backend/src/instance/instance-session.d.ts.map +1 -1
  52. package/dist/backend/src/instance/instance-session.js +9 -3
  53. package/dist/backend/src/instance/instance-session.js.map +1 -1
  54. package/dist/backend/src/instance/types.d.ts +1 -0
  55. package/dist/backend/src/instance/types.d.ts.map +1 -1
  56. package/dist/backend/src/pty/fix-pty-permissions.d.ts +1 -1
  57. package/dist/backend/src/pty/fix-pty-permissions.js +1 -1
  58. package/dist/backend/src/pty/output-buffer.d.ts +6 -0
  59. package/dist/backend/src/pty/output-buffer.d.ts.map +1 -1
  60. package/dist/backend/src/pty/output-buffer.js +10 -0
  61. package/dist/backend/src/pty/output-buffer.js.map +1 -1
  62. package/dist/backend/src/registry/stop-instances.js +1 -1
  63. package/dist/backend/src/services/pptx-converter.d.ts +66 -0
  64. package/dist/backend/src/services/pptx-converter.d.ts.map +1 -0
  65. package/dist/backend/src/services/pptx-converter.js +282 -0
  66. package/dist/backend/src/services/pptx-converter.js.map +1 -0
  67. package/dist/backend/src/update.d.ts +2 -2
  68. package/dist/backend/src/update.d.ts.map +1 -1
  69. package/dist/backend/src/update.js +9 -9
  70. package/dist/backend/src/update.js.map +1 -1
  71. package/dist/backend/src/utils/banner.d.ts +2 -0
  72. package/dist/backend/src/utils/banner.d.ts.map +1 -1
  73. package/dist/backend/src/utils/banner.js +2 -1
  74. package/dist/backend/src/utils/banner.js.map +1 -1
  75. package/dist/backend/src/utils/network.d.ts +22 -0
  76. package/dist/backend/src/utils/network.d.ts.map +1 -1
  77. package/dist/backend/src/utils/network.js +54 -0
  78. package/dist/backend/src/utils/network.js.map +1 -1
  79. package/dist/shared/file-types.d.ts +176 -0
  80. package/dist/shared/file-types.d.ts.map +1 -0
  81. package/dist/shared/file-types.js +108 -0
  82. package/dist/shared/file-types.js.map +1 -0
  83. package/dist/shared/index.d.ts +1 -0
  84. package/dist/shared/index.d.ts.map +1 -1
  85. package/dist/shared/index.js +1 -0
  86. package/dist/shared/index.js.map +1 -1
  87. package/dist/shared/instance.d.ts +2 -0
  88. package/dist/shared/instance.d.ts.map +1 -1
  89. package/dist/shared/instance.js.map +1 -1
  90. package/frontend-dist/assets/{index-UXAwH56Q.css → index-BY0fnkbW.css} +1 -1
  91. package/frontend-dist/assets/index-qwSai8-t.js +211 -0
  92. package/frontend-dist/index.html +2 -2
  93. package/package.json +8 -4
  94. package/scripts/build.sh +3 -9
  95. package/scripts/dev.sh +1 -4
  96. package/scripts/git-hooks/pre-commit +0 -4
  97. package/scripts/publish-npm.sh +61 -0
  98. package/scripts/stop.sh +1 -1
  99. package/frontend-dist/assets/index-CVRtrLyp.js +0 -199
@@ -1,199 +0,0 @@
1
- (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))s(u);new MutationObserver(u=>{for(const p of u)if(p.type==="childList")for(const d of p.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&s(d)}).observe(document,{childList:!0,subtree:!0});function i(u){const p={};return u.integrity&&(p.integrity=u.integrity),u.referrerPolicy&&(p.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?p.credentials="include":u.crossOrigin==="anonymous"?p.credentials="omit":p.credentials="same-origin",p}function s(u){if(u.ep)return;u.ep=!0;const p=i(u);fetch(u.href,p)}})();function Tc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var jd={exports:{}},Oo={};/**
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 S_;function g2(){if(S_)return Oo;S_=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function i(s,u,p){var d=null;if(p!==void 0&&(d=""+p),u.key!==void 0&&(d=""+u.key),"key"in u){p={};for(var o in u)o!=="key"&&(p[o]=u[o])}else p=u;return u=p.ref,{$$typeof:e,type:s,key:d,ref:u!==void 0?u:null,props:p}}return Oo.Fragment=t,Oo.jsx=i,Oo.jsxs=i,Oo}var y_;function m2(){return y_||(y_=1,jd.exports=g2()),jd.exports}var X=m2(),$d={exports:{}},rt={};/**
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 C_;function _2(){if(C_)return rt;C_=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),p=Symbol.for("react.consumer"),d=Symbol.for("react.context"),o=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),c=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),h=Symbol.for("react.activity"),b=Symbol.iterator;function y(U){return U===null||typeof U!="object"?null:(U=b&&U[b]||U["@@iterator"],typeof U=="function"?U:null)}var T={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,m={};function _(U,$,j){this.props=U,this.context=$,this.refs=m,this.updater=j||T}_.prototype.isReactComponent={},_.prototype.setState=function(U,$){if(typeof U!="object"&&typeof U!="function"&&U!=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,U,$,"setState")},_.prototype.forceUpdate=function(U){this.updater.enqueueForceUpdate(this,U,"forceUpdate")};function v(){}v.prototype=_.prototype;function S(U,$,j){this.props=U,this.context=$,this.refs=m,this.updater=j||T}var x=S.prototype=new v;x.constructor=S,E(x,_.prototype),x.isPureReactComponent=!0;var k=Array.isArray;function A(){}var O={H:null,A:null,T:null,S:null},D=Object.prototype.hasOwnProperty;function N(U,$,j){var re=j.ref;return{$$typeof:e,type:U,key:$,ref:re!==void 0?re:null,props:j}}function L(U,$){return N(U.type,$,U.props)}function F(U){return typeof U=="object"&&U!==null&&U.$$typeof===e}function I(U){var $={"=":"=0",":":"=2"};return"$"+U.replace(/[=:]/g,function(j){return $[j]})}var z=/\/+/g;function W(U,$){return typeof U=="object"&&U!==null&&U.key!=null?I(""+U.key):$.toString(36)}function q(U){switch(U.status){case"fulfilled":return U.value;case"rejected":throw U.reason;default:switch(typeof U.status=="string"?U.then(A,A):(U.status="pending",U.then(function($){U.status==="pending"&&(U.status="fulfilled",U.value=$)},function($){U.status==="pending"&&(U.status="rejected",U.reason=$)})),U.status){case"fulfilled":return U.value;case"rejected":throw U.reason}}throw U}function Y(U,$,j,re,_e){var ue=typeof U;(ue==="undefined"||ue==="boolean")&&(U=null);var ee=!1;if(U===null)ee=!0;else switch(ue){case"bigint":case"string":case"number":ee=!0;break;case"object":switch(U.$$typeof){case e:case t:ee=!0;break;case g:return ee=U._init,Y(ee(U._payload),$,j,re,_e)}}if(ee)return _e=_e(U),ee=re===""?"."+W(U,0):re,k(_e)?(j="",ee!=null&&(j=ee.replace(z,"$&/")+"/"),Y(_e,$,j,"",function(ae){return ae})):_e!=null&&(F(_e)&&(_e=L(_e,j+(_e.key==null||U&&U.key===_e.key?"":(""+_e.key).replace(z,"$&/")+"/")+ee)),$.push(_e)),1;ee=0;var G=re===""?".":re+":";if(k(U))for(var le=0;le<U.length;le++)re=U[le],ue=G+W(re,le),ee+=Y(re,$,j,ue,_e);else if(le=y(U),typeof le=="function")for(U=le.call(U),le=0;!(re=U.next()).done;)re=re.value,ue=G+W(re,le++),ee+=Y(re,$,j,ue,_e);else if(ue==="object"){if(typeof U.then=="function")return Y(q(U),$,j,re,_e);throw $=String(U),Error("Objects are not valid as a React child (found: "+($==="[object Object]"?"object with keys {"+Object.keys(U).join(", ")+"}":$)+"). If you meant to render a collection of children, use an array instead.")}return ee}function K(U,$,j){if(U==null)return U;var re=[],_e=0;return Y(U,re,"","",function(ue){return $.call(j,ue,_e++)}),re}function Q(U){if(U._status===-1){var $=U._result;$=$(),$.then(function(j){(U._status===0||U._status===-1)&&(U._status=1,U._result=j)},function(j){(U._status===0||U._status===-1)&&(U._status=2,U._result=j)}),U._status===-1&&(U._status=0,U._result=$)}if(U._status===1)return U._result.default;throw U._result}var H=typeof reportError=="function"?reportError:function(U){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var $=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof U=="object"&&U!==null&&typeof U.message=="string"?String(U.message):String(U),error:U});if(!window.dispatchEvent($))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",U);return}console.error(U)},M={map:K,forEach:function(U,$,j){K(U,function(){$.apply(this,arguments)},j)},count:function(U){var $=0;return K(U,function(){$++}),$},toArray:function(U){return K(U,function($){return $})||[]},only:function(U){if(!F(U))throw Error("React.Children.only expected to receive a single React element child.");return U}};return rt.Activity=h,rt.Children=M,rt.Component=_,rt.Fragment=i,rt.Profiler=u,rt.PureComponent=S,rt.StrictMode=s,rt.Suspense=l,rt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=O,rt.__COMPILER_RUNTIME={__proto__:null,c:function(U){return O.H.useMemoCache(U)}},rt.cache=function(U){return function(){return U.apply(null,arguments)}},rt.cacheSignal=function(){return null},rt.cloneElement=function(U,$,j){if(U==null)throw Error("The argument must be a React element, but you passed "+U+".");var re=E({},U.props),_e=U.key;if($!=null)for(ue in $.key!==void 0&&(_e=""+$.key),$)!D.call($,ue)||ue==="key"||ue==="__self"||ue==="__source"||ue==="ref"&&$.ref===void 0||(re[ue]=$[ue]);var ue=arguments.length-2;if(ue===1)re.children=j;else if(1<ue){for(var ee=Array(ue),G=0;G<ue;G++)ee[G]=arguments[G+2];re.children=ee}return N(U.type,_e,re)},rt.createContext=function(U){return U={$$typeof:d,_currentValue:U,_currentValue2:U,_threadCount:0,Provider:null,Consumer:null},U.Provider=U,U.Consumer={$$typeof:p,_context:U},U},rt.createElement=function(U,$,j){var re,_e={},ue=null;if($!=null)for(re in $.key!==void 0&&(ue=""+$.key),$)D.call($,re)&&re!=="key"&&re!=="__self"&&re!=="__source"&&(_e[re]=$[re]);var ee=arguments.length-2;if(ee===1)_e.children=j;else if(1<ee){for(var G=Array(ee),le=0;le<ee;le++)G[le]=arguments[le+2];_e.children=G}if(U&&U.defaultProps)for(re in ee=U.defaultProps,ee)_e[re]===void 0&&(_e[re]=ee[re]);return N(U,ue,_e)},rt.createRef=function(){return{current:null}},rt.forwardRef=function(U){return{$$typeof:o,render:U}},rt.isValidElement=F,rt.lazy=function(U){return{$$typeof:g,_payload:{_status:-1,_result:U},_init:Q}},rt.memo=function(U,$){return{$$typeof:c,type:U,compare:$===void 0?null:$}},rt.startTransition=function(U){var $=O.T,j={};O.T=j;try{var re=U(),_e=O.S;_e!==null&&_e(j,re),typeof re=="object"&&re!==null&&typeof re.then=="function"&&re.then(A,H)}catch(ue){H(ue)}finally{$!==null&&j.types!==null&&($.types=j.types),O.T=$}},rt.unstable_useCacheRefresh=function(){return O.H.useCacheRefresh()},rt.use=function(U){return O.H.use(U)},rt.useActionState=function(U,$,j){return O.H.useActionState(U,$,j)},rt.useCallback=function(U,$){return O.H.useCallback(U,$)},rt.useContext=function(U){return O.H.useContext(U)},rt.useDebugValue=function(){},rt.useDeferredValue=function(U,$){return O.H.useDeferredValue(U,$)},rt.useEffect=function(U,$){return O.H.useEffect(U,$)},rt.useEffectEvent=function(U){return O.H.useEffectEvent(U)},rt.useId=function(){return O.H.useId()},rt.useImperativeHandle=function(U,$,j){return O.H.useImperativeHandle(U,$,j)},rt.useInsertionEffect=function(U,$){return O.H.useInsertionEffect(U,$)},rt.useLayoutEffect=function(U,$){return O.H.useLayoutEffect(U,$)},rt.useMemo=function(U,$){return O.H.useMemo(U,$)},rt.useOptimistic=function(U,$){return O.H.useOptimistic(U,$)},rt.useReducer=function(U,$,j){return O.H.useReducer(U,$,j)},rt.useRef=function(U){return O.H.useRef(U)},rt.useState=function(U){return O.H.useState(U)},rt.useSyncExternalStore=function(U,$,j){return O.H.useSyncExternalStore(U,$,j)},rt.useTransition=function(){return O.H.useTransition()},rt.version="19.2.4",rt}var T_;function r0(){return T_||(T_=1,$d.exports=_2()),$d.exports}var B=r0();const yn=Tc(B);var Wd={exports:{}},No={},qd={exports:{}},Yd={};/**
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 A_;function b2(){return A_||(A_=1,(function(e){function t(Y,K){var Q=Y.length;Y.push(K);e:for(;0<Q;){var H=Q-1>>>1,M=Y[H];if(0<u(M,K))Y[H]=K,Y[Q]=M,Q=H;else break e}}function i(Y){return Y.length===0?null:Y[0]}function s(Y){if(Y.length===0)return null;var K=Y[0],Q=Y.pop();if(Q!==K){Y[0]=Q;e:for(var H=0,M=Y.length,U=M>>>1;H<U;){var $=2*(H+1)-1,j=Y[$],re=$+1,_e=Y[re];if(0>u(j,Q))re<M&&0>u(_e,j)?(Y[H]=_e,Y[re]=Q,H=re):(Y[H]=j,Y[$]=Q,H=$);else if(re<M&&0>u(_e,Q))Y[H]=_e,Y[re]=Q,H=re;else break e}}return K}function u(Y,K){var Q=Y.sortIndex-K.sortIndex;return Q!==0?Q:Y.id-K.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var p=performance;e.unstable_now=function(){return p.now()}}else{var d=Date,o=d.now();e.unstable_now=function(){return d.now()-o}}var l=[],c=[],g=1,h=null,b=3,y=!1,T=!1,E=!1,m=!1,_=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null;function x(Y){for(var K=i(c);K!==null;){if(K.callback===null)s(c);else if(K.startTime<=Y)s(c),K.sortIndex=K.expirationTime,t(l,K);else break;K=i(c)}}function k(Y){if(E=!1,x(Y),!T)if(i(l)!==null)T=!0,A||(A=!0,I());else{var K=i(c);K!==null&&q(k,K.startTime-Y)}}var A=!1,O=-1,D=5,N=-1;function L(){return m?!0:!(e.unstable_now()-N<D)}function F(){if(m=!1,A){var Y=e.unstable_now();N=Y;var K=!0;try{e:{T=!1,E&&(E=!1,v(O),O=-1),y=!0;var Q=b;try{t:{for(x(Y),h=i(l);h!==null&&!(h.expirationTime>Y&&L());){var H=h.callback;if(typeof H=="function"){h.callback=null,b=h.priorityLevel;var M=H(h.expirationTime<=Y);if(Y=e.unstable_now(),typeof M=="function"){h.callback=M,x(Y),K=!0;break t}h===i(l)&&s(l),x(Y)}else s(l);h=i(l)}if(h!==null)K=!0;else{var U=i(c);U!==null&&q(k,U.startTime-Y),K=!1}}break e}finally{h=null,b=Q,y=!1}K=void 0}}finally{K?I():A=!1}}}var I;if(typeof S=="function")I=function(){S(F)};else if(typeof MessageChannel<"u"){var z=new MessageChannel,W=z.port2;z.port1.onmessage=F,I=function(){W.postMessage(null)}}else I=function(){_(F,0)};function q(Y,K){O=_(function(){Y(e.unstable_now())},K)}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(Y){Y.callback=null},e.unstable_forceFrameRate=function(Y){0>Y||125<Y?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<Y?Math.floor(1e3/Y):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_next=function(Y){switch(b){case 1:case 2:case 3:var K=3;break;default:K=b}var Q=b;b=K;try{return Y()}finally{b=Q}},e.unstable_requestPaint=function(){m=!0},e.unstable_runWithPriority=function(Y,K){switch(Y){case 1:case 2:case 3:case 4:case 5:break;default:Y=3}var Q=b;b=Y;try{return K()}finally{b=Q}},e.unstable_scheduleCallback=function(Y,K,Q){var H=e.unstable_now();switch(typeof Q=="object"&&Q!==null?(Q=Q.delay,Q=typeof Q=="number"&&0<Q?H+Q:H):Q=H,Y){case 1:var M=-1;break;case 2:M=250;break;case 5:M=1073741823;break;case 4:M=1e4;break;default:M=5e3}return M=Q+M,Y={id:g++,callback:K,priorityLevel:Y,startTime:Q,expirationTime:M,sortIndex:-1},Q>H?(Y.sortIndex=Q,t(c,Y),i(l)===null&&Y===i(c)&&(E?(v(O),O=-1):E=!0,q(k,Q-H))):(Y.sortIndex=M,t(l,Y),T||y||(T=!0,A||(A=!0,I()))),Y},e.unstable_shouldYield=L,e.unstable_wrapCallback=function(Y){var K=b;return function(){var Q=b;b=K;try{return Y.apply(this,arguments)}finally{b=Q}}}})(Yd)),Yd}var x_;function E2(){return x_||(x_=1,qd.exports=b2()),qd.exports}var Gd={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 w_;function v2(){if(w_)return Nn;w_=1;var e=r0();function t(l){var c="https://react.dev/errors/"+l;if(1<arguments.length){c+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)c+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+l+"; visit "+c+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var s={d:{f:i,r:function(){throw Error(t(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},u=Symbol.for("react.portal");function p(l,c,g){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,key:h==null?null:""+h,children:l,containerInfo:c,implementation:g}}var d=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function o(l,c){if(l==="font")return"";if(typeof c=="string")return c==="use-credentials"?c:""}return Nn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,Nn.createPortal=function(l,c){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!c||c.nodeType!==1&&c.nodeType!==9&&c.nodeType!==11)throw Error(t(299));return p(l,c,null,g)},Nn.flushSync=function(l){var c=d.T,g=s.p;try{if(d.T=null,s.p=2,l)return l()}finally{d.T=c,s.p=g,s.d.f()}},Nn.preconnect=function(l,c){typeof l=="string"&&(c?(c=c.crossOrigin,c=typeof c=="string"?c==="use-credentials"?c:"":void 0):c=null,s.d.C(l,c))},Nn.prefetchDNS=function(l){typeof l=="string"&&s.d.D(l)},Nn.preinit=function(l,c){if(typeof l=="string"&&c&&typeof c.as=="string"){var g=c.as,h=o(g,c.crossOrigin),b=typeof c.integrity=="string"?c.integrity:void 0,y=typeof c.fetchPriority=="string"?c.fetchPriority:void 0;g==="style"?s.d.S(l,typeof c.precedence=="string"?c.precedence:void 0,{crossOrigin:h,integrity:b,fetchPriority:y}):g==="script"&&s.d.X(l,{crossOrigin:h,integrity:b,fetchPriority:y,nonce:typeof c.nonce=="string"?c.nonce:void 0})}},Nn.preinitModule=function(l,c){if(typeof l=="string")if(typeof c=="object"&&c!==null){if(c.as==null||c.as==="script"){var g=o(c.as,c.crossOrigin);s.d.M(l,{crossOrigin:g,integrity:typeof c.integrity=="string"?c.integrity:void 0,nonce:typeof c.nonce=="string"?c.nonce:void 0})}}else c==null&&s.d.M(l)},Nn.preload=function(l,c){if(typeof l=="string"&&typeof c=="object"&&c!==null&&typeof c.as=="string"){var g=c.as,h=o(g,c.crossOrigin);s.d.L(l,g,{crossOrigin:h,integrity:typeof c.integrity=="string"?c.integrity:void 0,nonce:typeof c.nonce=="string"?c.nonce:void 0,type:typeof c.type=="string"?c.type:void 0,fetchPriority:typeof c.fetchPriority=="string"?c.fetchPriority:void 0,referrerPolicy:typeof c.referrerPolicy=="string"?c.referrerPolicy:void 0,imageSrcSet:typeof c.imageSrcSet=="string"?c.imageSrcSet:void 0,imageSizes:typeof c.imageSizes=="string"?c.imageSizes:void 0,media:typeof c.media=="string"?c.media:void 0})}},Nn.preloadModule=function(l,c){if(typeof l=="string")if(c){var g=o(c.as,c.crossOrigin);s.d.m(l,{as:typeof c.as=="string"&&c.as!=="script"?c.as:void 0,crossOrigin:g,integrity:typeof c.integrity=="string"?c.integrity:void 0})}else s.d.m(l)},Nn.requestFormReset=function(l){s.d.r(l)},Nn.unstable_batchedUpdates=function(l,c){return l(c)},Nn.useFormState=function(l,c,g){return d.H.useFormState(l,c,g)},Nn.useFormStatus=function(){return d.H.useHostTransitionStatus()},Nn.version="19.2.4",Nn}var D_;function $b(){if(D_)return Gd.exports;D_=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(),Gd.exports=v2(),Gd.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 R_;function S2(){if(R_)return No;R_=1;var e=E2(),t=r0(),i=$b();function s(n){var r="https://react.dev/errors/"+n;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)r+="&args[]="+encodeURIComponent(arguments[a])}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 u(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function p(n){var r=n,a=n;if(n.alternate)for(;r.return;)r=r.return;else{n=r;do r=n,(r.flags&4098)!==0&&(a=r.return),n=r.return;while(n)}return r.tag===3?a: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 o(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 l(n){if(p(n)!==n)throw Error(s(188))}function c(n){var r=n.alternate;if(!r){if(r=p(n),r===null)throw Error(s(188));return r!==n?null:n}for(var a=n,f=r;;){var C=a.return;if(C===null)break;var w=C.alternate;if(w===null){if(f=C.return,f!==null){a=f;continue}break}if(C.child===w.child){for(w=C.child;w;){if(w===a)return l(C),n;if(w===f)return l(C),r;w=w.sibling}throw Error(s(188))}if(a.return!==f.return)a=C,f=w;else{for(var P=!1,V=C.child;V;){if(V===a){P=!0,a=C,f=w;break}if(V===f){P=!0,f=C,a=w;break}V=V.sibling}if(!P){for(V=w.child;V;){if(V===a){P=!0,a=w,f=C;break}if(V===f){P=!0,f=w,a=C;break}V=V.sibling}if(!P)throw Error(s(189))}}if(a.alternate!==f)throw Error(s(190))}if(a.tag!==3)throw Error(s(188));return a.stateNode.current===a?n:r}function g(n){var r=n.tag;if(r===5||r===26||r===27||r===6)return n;for(n=n.child;n!==null;){if(r=g(n),r!==null)return r;n=n.sibling}return null}var h=Object.assign,b=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),T=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),m=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),v=Symbol.for("react.consumer"),S=Symbol.for("react.context"),x=Symbol.for("react.forward_ref"),k=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),O=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),N=Symbol.for("react.activity"),L=Symbol.for("react.memo_cache_sentinel"),F=Symbol.iterator;function I(n){return n===null||typeof n!="object"?null:(n=F&&n[F]||n["@@iterator"],typeof n=="function"?n:null)}var z=Symbol.for("react.client.reference");function W(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===z?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case E:return"Fragment";case _:return"Profiler";case m:return"StrictMode";case k:return"Suspense";case A:return"SuspenseList";case N:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case T:return"Portal";case S:return n.displayName||"Context";case v:return(n._context.displayName||"Context")+".Consumer";case x:var r=n.render;return n=n.displayName,n||(n=r.displayName||r.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case O:return r=n.displayName||null,r!==null?r:W(n.type)||"Memo";case D:r=n._payload,n=n._init;try{return W(n(r))}catch{}}return null}var q=Array.isArray,Y=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q={pending:!1,data:null,method:null,action:null},H=[],M=-1;function U(n){return{current:n}}function $(n){0>M||(n.current=H[M],H[M]=null,M--)}function j(n,r){M++,H[M]=n.current,n.current=r}var re=U(null),_e=U(null),ue=U(null),ee=U(null);function G(n,r){switch(j(ue,r),j(_e,n),j(re,null),r.nodeType){case 9:case 11:n=(n=r.documentElement)&&(n=n.namespaceURI)?Wm(n):0;break;default:if(n=r.tagName,r=r.namespaceURI)r=Wm(r),n=qm(r,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}$(re),j(re,n)}function le(){$(re),$(_e),$(ue)}function ae(n){n.memoizedState!==null&&j(ee,n);var r=re.current,a=qm(r,n.type);r!==a&&(j(_e,n),j(re,a))}function xe(n){_e.current===n&&($(re),$(_e)),ee.current===n&&($(ee),Do._currentValue=Q)}var ye,Pe;function Ne(n){if(ye===void 0)try{throw Error()}catch(a){var r=a.stack.trim().match(/\n( *(at )?)/);ye=r&&r[1]||"",Pe=-1<a.stack.indexOf(`
42
- at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
43
- `+ye+n+Pe}var nt=!1;function Ue(n,r){if(!n||nt)return"";nt=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var f={DetermineComponentFrameRoot:function(){try{if(r){var Se=function(){throw Error()};if(Object.defineProperty(Se.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Se,[])}catch(ge){var pe=ge}Reflect.construct(n,[],Se)}else{try{Se.call()}catch(ge){pe=ge}n.call(Se.prototype)}}else{try{throw Error()}catch(ge){pe=ge}(Se=n())&&typeof Se.catch=="function"&&Se.catch(function(){})}}catch(ge){if(ge&&pe&&typeof ge.stack=="string")return[ge.stack,pe.stack]}return[null,null]}};f.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var C=Object.getOwnPropertyDescriptor(f.DetermineComponentFrameRoot,"name");C&&C.configurable&&Object.defineProperty(f.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var w=f.DetermineComponentFrameRoot(),P=w[0],V=w[1];if(P&&V){var ie=P.split(`
44
- `),de=V.split(`
45
- `);for(C=f=0;f<ie.length&&!ie[f].includes("DetermineComponentFrameRoot");)f++;for(;C<de.length&&!de[C].includes("DetermineComponentFrameRoot");)C++;if(f===ie.length||C===de.length)for(f=ie.length-1,C=de.length-1;1<=f&&0<=C&&ie[f]!==de[C];)C--;for(;1<=f&&0<=C;f--,C--)if(ie[f]!==de[C]){if(f!==1||C!==1)do if(f--,C--,0>C||ie[f]!==de[C]){var Ee=`
46
- `+ie[f].replace(" at new "," at ");return n.displayName&&Ee.includes("<anonymous>")&&(Ee=Ee.replace("<anonymous>",n.displayName)),Ee}while(1<=f&&0<=C);break}}}finally{nt=!1,Error.prepareStackTrace=a}return(a=n?n.displayName||n.name:"")?Ne(a):""}function Be(n,r){switch(n.tag){case 26:case 27:case 5:return Ne(n.type);case 16:return Ne("Lazy");case 13:return n.child!==r&&r!==null?Ne("Suspense Fallback"):Ne("Suspense");case 19:return Ne("SuspenseList");case 0:case 15:return Ue(n.type,!1);case 11:return Ue(n.type.render,!1);case 1:return Ue(n.type,!0);case 31:return Ne("Activity");default:return""}}function $t(n){try{var r="",a=null;do r+=Be(n,a),a=n,n=n.return;while(n);return r}catch(f){return`
47
- Error generating stack: `+f.message+`
48
- `+f.stack}}var nn=Object.prototype.hasOwnProperty,Qe=e.unstable_scheduleCallback,tt=e.unstable_cancelCallback,it=e.unstable_shouldYield,Me=e.unstable_requestPaint,$e=e.unstable_now,xt=e.unstable_getCurrentPriorityLevel,fe=e.unstable_ImmediatePriority,Ce=e.unstable_UserBlockingPriority,Ie=e.unstable_NormalPriority,qe=e.unstable_LowPriority,Ye=e.unstable_IdlePriority,Ze=e.log,Ve=e.unstable_setDisableYieldValue,Yt=null,Lt=null;function Gt(n){if(typeof Ze=="function"&&Ve(n),Lt&&typeof Lt.setStrictMode=="function")try{Lt.setStrictMode(Yt,n)}catch{}}var Et=Math.clz32?Math.clz32:yr,Tn=Math.log,un=Math.LN2;function yr(n){return n>>>=0,n===0?32:31-(Tn(n)/un|0)|0}var si=256,Oi=262144,Ht=4194304;function Rt(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 ne(n,r,a){var f=n.pendingLanes;if(f===0)return 0;var C=0,w=n.suspendedLanes,P=n.pingedLanes;n=n.warmLanes;var V=f&134217727;return V!==0?(f=V&~w,f!==0?C=Rt(f):(P&=V,P!==0?C=Rt(P):a||(a=V&~n,a!==0&&(C=Rt(a))))):(V=f&~w,V!==0?C=Rt(V):P!==0?C=Rt(P):a||(a=f&~n,a!==0&&(C=Rt(a)))),C===0?0:r!==0&&r!==C&&(r&w)===0&&(w=C&-C,a=r&-r,w>=a||w===32&&(a&4194048)!==0)?r:C}function be(n,r){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&r)===0}function De(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 He(){var n=Ht;return Ht<<=1,(Ht&62914560)===0&&(Ht=4194304),n}function pt(n){for(var r=[],a=0;31>a;a++)r.push(n);return r}function yt(n,r){n.pendingLanes|=r,r!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function Le(n,r,a,f,C,w){var P=n.pendingLanes;n.pendingLanes=a,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=a,n.entangledLanes&=a,n.errorRecoveryDisabledLanes&=a,n.shellSuspendCounter=0;var V=n.entanglements,ie=n.expirationTimes,de=n.hiddenUpdates;for(a=P&~a;0<a;){var Ee=31-Et(a),Se=1<<Ee;V[Ee]=0,ie[Ee]=-1;var pe=de[Ee];if(pe!==null)for(de[Ee]=null,Ee=0;Ee<pe.length;Ee++){var ge=pe[Ee];ge!==null&&(ge.lane&=-536870913)}a&=~Se}f!==0&&Oe(n,f,0),w!==0&&C===0&&n.tag!==0&&(n.suspendedLanes|=w&~(P&~r))}function Oe(n,r,a){n.pendingLanes|=r,n.suspendedLanes&=~r;var f=31-Et(r);n.entangledLanes|=r,n.entanglements[f]=n.entanglements[f]|1073741824|a&261930}function We(n,r){var a=n.entangledLanes|=r;for(n=n.entanglements;a;){var f=31-Et(a),C=1<<f;C&r|n[f]&r&&(n[f]|=r),a&=~C}}function wt(n,r){var a=r&-r;return a=(a&42)!==0?1:kt(a),(a&(n.suspendedLanes|r))!==0?0:a}function kt(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 Fn(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function Pn(){var n=K.p;return n!==0?n:(n=window.event,n===void 0?32:p_(n.type))}function _i(n,r){var a=K.p;try{return K.p=n,r()}finally{K.p=a}}var Yn=Math.random().toString(36).slice(2),rn="__reactFiber$"+Yn,Ln="__reactProps$"+Yn,Cr="__reactContainer$"+Yn,Pa="__reactEvents$"+Yn,wl="__reactListeners$"+Yn,Ns="__reactHandles$"+Yn,Dl="__reactResources$"+Yn,rs="__reactMarker$"+Yn;function Ua(n){delete n[rn],delete n[Ln],delete n[Pa],delete n[wl],delete n[Ns]}function Un(n){var r=n[rn];if(r)return r;for(var a=n.parentNode;a;){if(r=a[Cr]||a[rn]){if(a=r.alternate,r.child!==null||a!==null&&a.child!==null)for(n=Zm(n);n!==null;){if(a=n[rn])return a;n=Zm(n)}return r}n=a,a=n.parentNode}return null}function Zi(n){if(n=n[rn]||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 Tr(n){var r=n.tag;if(r===5||r===26||r===27||r===6)return n.stateNode;throw Error(s(33))}function Ar(n){var r=n[Dl];return r||(r=n[Dl]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function cn(n){n[rs]=!0}var Rl=new Set,ss={};function Ji(n,r){we(n,r),we(n+"Capture",r)}function we(n,r){for(ss[n]=r,n=0;n<r.length;n++)Rl.add(r[n])}var Ge=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]*$"),ut={},Ot={};function sn(n){return nn.call(Ot,n)?!0:nn.call(ut,n)?!1:Ge.test(n)?Ot[n]=!0:(ut[n]=!0,!1)}function On(n,r,a){if(sn(r))if(a===null)n.removeAttribute(r);else{switch(typeof a){case"undefined":case"function":case"symbol":n.removeAttribute(r);return;case"boolean":var f=r.toLowerCase().slice(0,5);if(f!=="data-"&&f!=="aria-"){n.removeAttribute(r);return}}n.setAttribute(r,""+a)}}function ai(n,r,a){if(a===null)n.removeAttribute(r);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(r);return}n.setAttribute(r,""+a)}}function Gn(n,r,a,f){if(f===null)n.removeAttribute(a);else{switch(typeof f){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(a);return}n.setAttributeNS(r,a,""+f)}}function Wt(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function oi(n){var r=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function kl(n,r,a){var f=Object.getOwnPropertyDescriptor(n.constructor.prototype,r);if(!n.hasOwnProperty(r)&&typeof f<"u"&&typeof f.get=="function"&&typeof f.set=="function"){var C=f.get,w=f.set;return Object.defineProperty(n,r,{configurable:!0,get:function(){return C.call(this)},set:function(P){a=""+P,w.call(this,P)}}),Object.defineProperty(n,r,{enumerable:f.enumerable}),{getValue:function(){return a},setValue:function(P){a=""+P},stopTracking:function(){n._valueTracker=null,delete n[r]}}}}function Ms(n){if(!n._valueTracker){var r=oi(n)?"checked":"value";n._valueTracker=kl(n,r,""+n[r])}}function Ha(n){if(!n)return!1;var r=n._valueTracker;if(!r)return!0;var a=r.getValue(),f="";return n&&(f=oi(n)?n.checked?"true":"false":n.value),n=f,n!==a?(r.setValue(n),!0):!1}function Is(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 zc=/[\n"\\]/g;function Kn(n){return n.replace(zc,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function za(n,r,a,f,C,w,P,V){n.name="",P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"?n.type=P:n.removeAttribute("type"),r!=null?P==="number"?(r===0&&n.value===""||n.value!=r)&&(n.value=""+Wt(r)):n.value!==""+Wt(r)&&(n.value=""+Wt(r)):P!=="submit"&&P!=="reset"||n.removeAttribute("value"),r!=null?Bs(n,P,Wt(r)):a!=null?Bs(n,P,Wt(a)):f!=null&&n.removeAttribute("value"),C==null&&w!=null&&(n.defaultChecked=!!w),C!=null&&(n.checked=C&&typeof C!="function"&&typeof C!="symbol"),V!=null&&typeof V!="function"&&typeof V!="symbol"&&typeof V!="boolean"?n.name=""+Wt(V):n.removeAttribute("name")}function as(n,r,a,f,C,w,P,V){if(w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"&&(n.type=w),r!=null||a!=null){if(!(w!=="submit"&&w!=="reset"||r!=null)){Ms(n);return}a=a!=null?""+Wt(a):"",r=r!=null?""+Wt(r):a,V||r===n.value||(n.value=r),n.defaultValue=r}f=f??C,f=typeof f!="function"&&typeof f!="symbol"&&!!f,n.checked=V?n.checked:!!f,n.defaultChecked=!!f,P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"&&(n.name=P),Ms(n)}function Bs(n,r,a){r==="number"&&Is(n.ownerDocument)===n||n.defaultValue===""+a||(n.defaultValue=""+a)}function An(n,r,a,f){if(n=n.options,r){r={};for(var C=0;C<a.length;C++)r["$"+a[C]]=!0;for(a=0;a<n.length;a++)C=r.hasOwnProperty("$"+n[a].value),n[a].selected!==C&&(n[a].selected=C),C&&f&&(n[a].defaultSelected=!0)}else{for(a=""+Wt(a),r=null,C=0;C<n.length;C++){if(n[C].value===a){n[C].selected=!0,f&&(n[C].defaultSelected=!0);return}r!==null||n[C].disabled||(r=n[C])}r!==null&&(r.selected=!0)}}function Ll(n,r,a){if(r!=null&&(r=""+Wt(r),r!==n.value&&(n.value=r),a==null)){n.defaultValue!==r&&(n.defaultValue=r);return}n.defaultValue=a!=null?""+Wt(a):""}function Fs(n,r,a,f){if(r==null){if(f!=null){if(a!=null)throw Error(s(92));if(q(f)){if(1<f.length)throw Error(s(93));f=f[0]}a=f}a==null&&(a=""),r=a}a=Wt(r),n.defaultValue=a,f=n.textContent,f===a&&f!==""&&f!==null&&(n.value=f),Ms(n)}function et(n,r){if(r){var a=n.firstChild;if(a&&a===n.lastChild&&a.nodeType===3){a.nodeValue=r;return}}n.textContent=r}var Ol=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 hn(n,r,a){var f=r.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?f?n.setProperty(r,""):r==="float"?n.cssFloat="":n[r]="":f?n.setProperty(r,a):typeof a!="number"||a===0||Ol.has(r)?r==="float"?n.cssFloat=a:n[r]=(""+a).trim():n[r]=a+"px"}function Nt(n,r,a){if(r!=null&&typeof r!="object")throw Error(s(62));if(n=n.style,a!=null){for(var f in a)!a.hasOwnProperty(f)||r!=null&&r.hasOwnProperty(f)||(f.indexOf("--")===0?n.setProperty(f,""):f==="float"?n.cssFloat="":n[f]="");for(var C in r)f=r[C],r.hasOwnProperty(C)&&a[C]!==f&&hn(n,C,f)}else for(var w in r)r.hasOwnProperty(w)&&hn(n,w,r[w])}function xr(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 er=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"]]),ja=/^[\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 wr(n){return ja.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function ke(){}var ze=null;function st(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var gt=null,Zt=null;function bi(n){var r=Zi(n);if(r&&(n=r.stateNode)){var a=n[Ln]||null;e:switch(n=r.stateNode,r.type){case"input":if(za(n,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),r=a.name,a.type==="radio"&&r!=null){for(a=n;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Kn(""+r)+'"][type="radio"]'),r=0;r<a.length;r++){var f=a[r];if(f!==n&&f.form===n.form){var C=f[Ln]||null;if(!C)throw Error(s(90));za(f,C.value,C.defaultValue,C.defaultValue,C.checked,C.defaultChecked,C.type,C.name)}}for(r=0;r<a.length;r++)f=a[r],f.form===n.form&&Ha(f)}break e;case"textarea":Ll(n,a.value,a.defaultValue);break e;case"select":r=a.value,r!=null&&An(n,!!a.multiple,r,!1)}}}var $a=!1;function Nl(n,r,a){if($a)return n(r,a);$a=!0;try{var f=n(r);return f}finally{if($a=!1,(gt!==null||Zt!==null)&&(vu(),gt&&(r=gt,n=Zt,Zt=gt=null,bi(r),n)))for(r=0;r<n.length;r++)bi(n[r])}}function Wa(n,r){var a=n.stateNode;if(a===null)return null;var f=a[Ln]||null;if(f===null)return null;a=f[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":(f=!f.disabled)||(n=n.type,f=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!f;break e;default:n=!1}if(n)return null;if(a&&typeof a!="function")throw Error(s(231,r,typeof a));return a}var tr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),jc=!1;if(tr)try{var qa={};Object.defineProperty(qa,"passive",{get:function(){jc=!0}}),window.addEventListener("test",qa,qa),window.removeEventListener("test",qa,qa)}catch{jc=!1}var Dr=null,$c=null,Ml=null;function q0(){if(Ml)return Ml;var n,r=$c,a=r.length,f,C="value"in Dr?Dr.value:Dr.textContent,w=C.length;for(n=0;n<a&&r[n]===C[n];n++);var P=a-n;for(f=1;f<=P&&r[a-f]===C[w-f];f++);return Ml=C.slice(n,1<f?1-f:void 0)}function Il(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 Bl(){return!0}function Y0(){return!1}function Vn(n){function r(a,f,C,w,P){this._reactName=a,this._targetInst=C,this.type=f,this.nativeEvent=w,this.target=P,this.currentTarget=null;for(var V in n)n.hasOwnProperty(V)&&(a=n[V],this[V]=a?a(w):w[V]);return this.isDefaultPrevented=(w.defaultPrevented!=null?w.defaultPrevented:w.returnValue===!1)?Bl:Y0,this.isPropagationStopped=Y0,this}return h(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Bl)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Bl)},persist:function(){},isPersistent:Bl}),r}var os={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Fl=Vn(os),Ya=h({},os,{view:0,detail:0}),fy=Vn(Ya),Wc,qc,Ga,Pl=h({},Ya,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Gc,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!==Ga&&(Ga&&n.type==="mousemove"?(Wc=n.screenX-Ga.screenX,qc=n.screenY-Ga.screenY):qc=Wc=0,Ga=n),Wc)},movementY:function(n){return"movementY"in n?n.movementY:qc}}),G0=Vn(Pl),py=h({},Pl,{dataTransfer:0}),gy=Vn(py),my=h({},Ya,{relatedTarget:0}),Yc=Vn(my),_y=h({},os,{animationName:0,elapsedTime:0,pseudoElement:0}),by=Vn(_y),Ey=h({},os,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),vy=Vn(Ey),Sy=h({},os,{data:0}),K0=Vn(Sy),yy={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Cy={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"},Ty={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ay(n){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(n):(n=Ty[n])?!!r[n]:!1}function Gc(){return Ay}var xy=h({},Ya,{key:function(n){if(n.key){var r=yy[n.key]||n.key;if(r!=="Unidentified")return r}return n.type==="keypress"?(n=Il(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?Cy[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Gc,charCode:function(n){return n.type==="keypress"?Il(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?Il(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),wy=Vn(xy),Dy=h({},Pl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),V0=Vn(Dy),Ry=h({},Ya,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Gc}),ky=Vn(Ry),Ly=h({},os,{propertyName:0,elapsedTime:0,pseudoElement:0}),Oy=Vn(Ly),Ny=h({},Pl,{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}),My=Vn(Ny),Iy=h({},os,{newState:0,oldState:0}),By=Vn(Iy),Fy=[9,13,27,32],Kc=tr&&"CompositionEvent"in window,Ka=null;tr&&"documentMode"in document&&(Ka=document.documentMode);var Py=tr&&"TextEvent"in window&&!Ka,X0=tr&&(!Kc||Ka&&8<Ka&&11>=Ka),Q0=" ",Z0=!1;function J0(n,r){switch(n){case"keyup":return Fy.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ep(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var Ps=!1;function Uy(n,r){switch(n){case"compositionend":return ep(r);case"keypress":return r.which!==32?null:(Z0=!0,Q0);case"textInput":return n=r.data,n===Q0&&Z0?null:n;default:return null}}function Hy(n,r){if(Ps)return n==="compositionend"||!Kc&&J0(n,r)?(n=q0(),Ml=$c=Dr=null,Ps=!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 X0&&r.locale!=="ko"?null:r.data;default:return null}}var zy={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 tp(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r==="input"?!!zy[n.type]:r==="textarea"}function np(n,r,a,f){gt?Zt?Zt.push(f):Zt=[f]:gt=f,r=wu(r,"onChange"),0<r.length&&(a=new Fl("onChange","change",null,a,f),n.push({event:a,listeners:r}))}var Va=null,Xa=null;function jy(n){Pm(n,0)}function Ul(n){var r=Tr(n);if(Ha(r))return n}function ip(n,r){if(n==="change")return r}var rp=!1;if(tr){var Vc;if(tr){var Xc="oninput"in document;if(!Xc){var sp=document.createElement("div");sp.setAttribute("oninput","return;"),Xc=typeof sp.oninput=="function"}Vc=Xc}else Vc=!1;rp=Vc&&(!document.documentMode||9<document.documentMode)}function ap(){Va&&(Va.detachEvent("onpropertychange",op),Xa=Va=null)}function op(n){if(n.propertyName==="value"&&Ul(Xa)){var r=[];np(r,Xa,n,st(n)),Nl(jy,r)}}function $y(n,r,a){n==="focusin"?(ap(),Va=r,Xa=a,Va.attachEvent("onpropertychange",op)):n==="focusout"&&ap()}function Wy(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return Ul(Xa)}function qy(n,r){if(n==="click")return Ul(r)}function Yy(n,r){if(n==="input"||n==="change")return Ul(r)}function Gy(n,r){return n===r&&(n!==0||1/n===1/r)||n!==n&&r!==r}var li=typeof Object.is=="function"?Object.is:Gy;function Qa(n,r){if(li(n,r))return!0;if(typeof n!="object"||n===null||typeof r!="object"||r===null)return!1;var a=Object.keys(n),f=Object.keys(r);if(a.length!==f.length)return!1;for(f=0;f<a.length;f++){var C=a[f];if(!nn.call(r,C)||!li(n[C],r[C]))return!1}return!0}function lp(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function up(n,r){var a=lp(n);n=0;for(var f;a;){if(a.nodeType===3){if(f=n+a.textContent.length,n<=r&&f>=r)return{node:a,offset:r-n};n=f}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=lp(a)}}function cp(n,r){return n&&r?n===r?!0:n&&n.nodeType===3?!1:r&&r.nodeType===3?cp(n,r.parentNode):"contains"in n?n.contains(r):n.compareDocumentPosition?!!(n.compareDocumentPosition(r)&16):!1:!1}function hp(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var r=Is(n.document);r instanceof n.HTMLIFrameElement;){try{var a=typeof r.contentWindow.location.href=="string"}catch{a=!1}if(a)n=r.contentWindow;else break;r=Is(n.document)}return r}function Qc(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 Ky=tr&&"documentMode"in document&&11>=document.documentMode,Us=null,Zc=null,Za=null,Jc=!1;function dp(n,r,a){var f=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Jc||Us==null||Us!==Is(f)||(f=Us,"selectionStart"in f&&Qc(f)?f={start:f.selectionStart,end:f.selectionEnd}:(f=(f.ownerDocument&&f.ownerDocument.defaultView||window).getSelection(),f={anchorNode:f.anchorNode,anchorOffset:f.anchorOffset,focusNode:f.focusNode,focusOffset:f.focusOffset}),Za&&Qa(Za,f)||(Za=f,f=wu(Zc,"onSelect"),0<f.length&&(r=new Fl("onSelect","select",null,r,a),n.push({event:r,listeners:f}),r.target=Us)))}function ls(n,r){var a={};return a[n.toLowerCase()]=r.toLowerCase(),a["Webkit"+n]="webkit"+r,a["Moz"+n]="moz"+r,a}var Hs={animationend:ls("Animation","AnimationEnd"),animationiteration:ls("Animation","AnimationIteration"),animationstart:ls("Animation","AnimationStart"),transitionrun:ls("Transition","TransitionRun"),transitionstart:ls("Transition","TransitionStart"),transitioncancel:ls("Transition","TransitionCancel"),transitionend:ls("Transition","TransitionEnd")},eh={},fp={};tr&&(fp=document.createElement("div").style,"AnimationEvent"in window||(delete Hs.animationend.animation,delete Hs.animationiteration.animation,delete Hs.animationstart.animation),"TransitionEvent"in window||delete Hs.transitionend.transition);function us(n){if(eh[n])return eh[n];if(!Hs[n])return n;var r=Hs[n],a;for(a in r)if(r.hasOwnProperty(a)&&a in fp)return eh[n]=r[a];return n}var pp=us("animationend"),gp=us("animationiteration"),mp=us("animationstart"),Vy=us("transitionrun"),Xy=us("transitionstart"),Qy=us("transitioncancel"),_p=us("transitionend"),bp=new Map,th="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(" ");th.push("scrollEnd");function Ni(n,r){bp.set(n,r),Ji(r,[n])}var Hl=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)},Ei=[],zs=0,nh=0;function zl(){for(var n=zs,r=nh=zs=0;r<n;){var a=Ei[r];Ei[r++]=null;var f=Ei[r];Ei[r++]=null;var C=Ei[r];Ei[r++]=null;var w=Ei[r];if(Ei[r++]=null,f!==null&&C!==null){var P=f.pending;P===null?C.next=C:(C.next=P.next,P.next=C),f.pending=C}w!==0&&Ep(a,C,w)}}function jl(n,r,a,f){Ei[zs++]=n,Ei[zs++]=r,Ei[zs++]=a,Ei[zs++]=f,nh|=f,n.lanes|=f,n=n.alternate,n!==null&&(n.lanes|=f)}function ih(n,r,a,f){return jl(n,r,a,f),$l(n)}function cs(n,r){return jl(n,null,null,r),$l(n)}function Ep(n,r,a){n.lanes|=a;var f=n.alternate;f!==null&&(f.lanes|=a);for(var C=!1,w=n.return;w!==null;)w.childLanes|=a,f=w.alternate,f!==null&&(f.childLanes|=a),w.tag===22&&(n=w.stateNode,n===null||n._visibility&1||(C=!0)),n=w,w=w.return;return n.tag===3?(w=n.stateNode,C&&r!==null&&(C=31-Et(a),n=w.hiddenUpdates,f=n[C],f===null?n[C]=[r]:f.push(r),r.lane=a|536870912),w):null}function $l(n){if(50<So)throw So=0,dd=null,Error(s(185));for(var r=n.return;r!==null;)n=r,r=n.return;return n.tag===3?n.stateNode:null}var js={};function Zy(n,r,a,f){this.tag=n,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=f,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ui(n,r,a,f){return new Zy(n,r,a,f)}function rh(n){return n=n.prototype,!(!n||!n.isReactComponent)}function nr(n,r){var a=n.alternate;return a===null?(a=ui(n.tag,r,n.key,n.mode),a.elementType=n.elementType,a.type=n.type,a.stateNode=n.stateNode,a.alternate=n,n.alternate=a):(a.pendingProps=r,a.type=n.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=n.flags&65011712,a.childLanes=n.childLanes,a.lanes=n.lanes,a.child=n.child,a.memoizedProps=n.memoizedProps,a.memoizedState=n.memoizedState,a.updateQueue=n.updateQueue,r=n.dependencies,a.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},a.sibling=n.sibling,a.index=n.index,a.ref=n.ref,a.refCleanup=n.refCleanup,a}function vp(n,r){n.flags&=65011714;var a=n.alternate;return a===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=a.childLanes,n.lanes=a.lanes,n.child=a.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=a.memoizedProps,n.memoizedState=a.memoizedState,n.updateQueue=a.updateQueue,n.type=a.type,r=a.dependencies,n.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),n}function Wl(n,r,a,f,C,w){var P=0;if(f=n,typeof n=="function")rh(n)&&(P=1);else if(typeof n=="string")P=i2(n,a,re.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case N:return n=ui(31,a,r,C),n.elementType=N,n.lanes=w,n;case E:return hs(a.children,C,w,r);case m:P=8,C|=24;break;case _:return n=ui(12,a,r,C|2),n.elementType=_,n.lanes=w,n;case k:return n=ui(13,a,r,C),n.elementType=k,n.lanes=w,n;case A:return n=ui(19,a,r,C),n.elementType=A,n.lanes=w,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case S:P=10;break e;case v:P=9;break e;case x:P=11;break e;case O:P=14;break e;case D:P=16,f=null;break e}P=29,a=Error(s(130,n===null?"null":typeof n,"")),f=null}return r=ui(P,a,r,C),r.elementType=n,r.type=f,r.lanes=w,r}function hs(n,r,a,f){return n=ui(7,n,f,r),n.lanes=a,n}function sh(n,r,a){return n=ui(6,n,null,r),n.lanes=a,n}function Sp(n){var r=ui(18,null,null,0);return r.stateNode=n,r}function ah(n,r,a){return r=ui(4,n.children!==null?n.children:[],n.key,r),r.lanes=a,r.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},r}var yp=new WeakMap;function vi(n,r){if(typeof n=="object"&&n!==null){var a=yp.get(n);return a!==void 0?a:(r={value:n,source:r,stack:$t(r)},yp.set(n,r),r)}return{value:n,source:r,stack:$t(r)}}var $s=[],Ws=0,ql=null,Ja=0,Si=[],yi=0,Rr=null,Hi=1,zi="";function ir(n,r){$s[Ws++]=Ja,$s[Ws++]=ql,ql=n,Ja=r}function Cp(n,r,a){Si[yi++]=Hi,Si[yi++]=zi,Si[yi++]=Rr,Rr=n;var f=Hi;n=zi;var C=32-Et(f)-1;f&=~(1<<C),a+=1;var w=32-Et(r)+C;if(30<w){var P=C-C%5;w=(f&(1<<P)-1).toString(32),f>>=P,C-=P,Hi=1<<32-Et(r)+C|a<<C|f,zi=w+n}else Hi=1<<w|a<<C|f,zi=n}function oh(n){n.return!==null&&(ir(n,1),Cp(n,1,0))}function lh(n){for(;n===ql;)ql=$s[--Ws],$s[Ws]=null,Ja=$s[--Ws],$s[Ws]=null;for(;n===Rr;)Rr=Si[--yi],Si[yi]=null,zi=Si[--yi],Si[yi]=null,Hi=Si[--yi],Si[yi]=null}function Tp(n,r){Si[yi++]=Hi,Si[yi++]=zi,Si[yi++]=Rr,Hi=r.id,zi=r.overflow,Rr=n}var xn=null,Kt=null,vt=!1,kr=null,Ci=!1,uh=Error(s(519));function Lr(n){var r=Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw eo(vi(r,n)),uh}function Ap(n){var r=n.stateNode,a=n.type,f=n.memoizedProps;switch(r[rn]=n,r[Ln]=f,a){case"dialog":dt("cancel",r),dt("close",r);break;case"iframe":case"object":case"embed":dt("load",r);break;case"video":case"audio":for(a=0;a<Co.length;a++)dt(Co[a],r);break;case"source":dt("error",r);break;case"img":case"image":case"link":dt("error",r),dt("load",r);break;case"details":dt("toggle",r);break;case"input":dt("invalid",r),as(r,f.value,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name,!0);break;case"select":dt("invalid",r);break;case"textarea":dt("invalid",r),Fs(r,f.value,f.defaultValue,f.children)}a=f.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||r.textContent===""+a||f.suppressHydrationWarning===!0||jm(r.textContent,a)?(f.popover!=null&&(dt("beforetoggle",r),dt("toggle",r)),f.onScroll!=null&&dt("scroll",r),f.onScrollEnd!=null&&dt("scrollend",r),f.onClick!=null&&(r.onclick=ke),r=!0):r=!1,r||Lr(n,!0)}function xp(n){for(xn=n.return;xn;)switch(xn.tag){case 5:case 31:case 13:Ci=!1;return;case 27:case 3:Ci=!0;return;default:xn=xn.return}}function qs(n){if(n!==xn)return!1;if(!vt)return xp(n),vt=!0,!1;var r=n.tag,a;if((a=r!==3&&r!==27)&&((a=r===5)&&(a=n.type,a=!(a!=="form"&&a!=="button")||wd(n.type,n.memoizedProps)),a=!a),a&&Kt&&Lr(n),xp(n),r===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(s(317));Kt=Qm(n)}else if(r===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(s(317));Kt=Qm(n)}else r===27?(r=Kt,qr(n.type)?(n=Od,Od=null,Kt=n):Kt=r):Kt=xn?Ai(n.stateNode.nextSibling):null;return!0}function ds(){Kt=xn=null,vt=!1}function ch(){var n=kr;return n!==null&&(Jn===null?Jn=n:Jn.push.apply(Jn,n),kr=null),n}function eo(n){kr===null?kr=[n]:kr.push(n)}var hh=U(null),fs=null,rr=null;function Or(n,r,a){j(hh,r._currentValue),r._currentValue=a}function sr(n){n._currentValue=hh.current,$(hh)}function dh(n,r,a){for(;n!==null;){var f=n.alternate;if((n.childLanes&r)!==r?(n.childLanes|=r,f!==null&&(f.childLanes|=r)):f!==null&&(f.childLanes&r)!==r&&(f.childLanes|=r),n===a)break;n=n.return}}function fh(n,r,a,f){var C=n.child;for(C!==null&&(C.return=n);C!==null;){var w=C.dependencies;if(w!==null){var P=C.child;w=w.firstContext;e:for(;w!==null;){var V=w;w=C;for(var ie=0;ie<r.length;ie++)if(V.context===r[ie]){w.lanes|=a,V=w.alternate,V!==null&&(V.lanes|=a),dh(w.return,a,n),f||(P=null);break e}w=V.next}}else if(C.tag===18){if(P=C.return,P===null)throw Error(s(341));P.lanes|=a,w=P.alternate,w!==null&&(w.lanes|=a),dh(P,a,n),P=null}else P=C.child;if(P!==null)P.return=C;else for(P=C;P!==null;){if(P===n){P=null;break}if(C=P.sibling,C!==null){C.return=P.return,P=C;break}P=P.return}C=P}}function Ys(n,r,a,f){n=null;for(var C=r,w=!1;C!==null;){if(!w){if((C.flags&524288)!==0)w=!0;else if((C.flags&262144)!==0)break}if(C.tag===10){var P=C.alternate;if(P===null)throw Error(s(387));if(P=P.memoizedProps,P!==null){var V=C.type;li(C.pendingProps.value,P.value)||(n!==null?n.push(V):n=[V])}}else if(C===ee.current){if(P=C.alternate,P===null)throw Error(s(387));P.memoizedState.memoizedState!==C.memoizedState.memoizedState&&(n!==null?n.push(Do):n=[Do])}C=C.return}n!==null&&fh(r,n,a,f),r.flags|=262144}function Yl(n){for(n=n.firstContext;n!==null;){if(!li(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function ps(n){fs=n,rr=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function wn(n){return wp(fs,n)}function Gl(n,r){return fs===null&&ps(n),wp(n,r)}function wp(n,r){var a=r._currentValue;if(r={context:r,memoizedValue:a,next:null},rr===null){if(n===null)throw Error(s(308));rr=r,n.dependencies={lanes:0,firstContext:r},n.flags|=524288}else rr=rr.next=r;return a}var Jy=typeof AbortController<"u"?AbortController:function(){var n=[],r=this.signal={aborted:!1,addEventListener:function(a,f){n.push(f)}};this.abort=function(){r.aborted=!0,n.forEach(function(a){return a()})}},eC=e.unstable_scheduleCallback,tC=e.unstable_NormalPriority,dn={$$typeof:S,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ph(){return{controller:new Jy,data:new Map,refCount:0}}function to(n){n.refCount--,n.refCount===0&&eC(tC,function(){n.controller.abort()})}var no=null,gh=0,Gs=0,Ks=null;function nC(n,r){if(no===null){var a=no=[];gh=0,Gs=bd(),Ks={status:"pending",value:void 0,then:function(f){a.push(f)}}}return gh++,r.then(Dp,Dp),r}function Dp(){if(--gh===0&&no!==null){Ks!==null&&(Ks.status="fulfilled");var n=no;no=null,Gs=0,Ks=null;for(var r=0;r<n.length;r++)(0,n[r])()}}function iC(n,r){var a=[],f={status:"pending",value:null,reason:null,then:function(C){a.push(C)}};return n.then(function(){f.status="fulfilled",f.value=r;for(var C=0;C<a.length;C++)(0,a[C])(r)},function(C){for(f.status="rejected",f.reason=C,C=0;C<a.length;C++)(0,a[C])(void 0)}),f}var Rp=Y.S;Y.S=function(n,r){dm=$e(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&nC(n,r),Rp!==null&&Rp(n,r)};var gs=U(null);function mh(){var n=gs.current;return n!==null?n:zt.pooledCache}function Kl(n,r){r===null?j(gs,gs.current):j(gs,r.pool)}function kp(){var n=mh();return n===null?null:{parent:dn._currentValue,pool:n}}var Vs=Error(s(460)),_h=Error(s(474)),Vl=Error(s(542)),Xl={then:function(){}};function Lp(n){return n=n.status,n==="fulfilled"||n==="rejected"}function Op(n,r,a){switch(a=n[a],a===void 0?n.push(r):a!==r&&(r.then(ke,ke),r=a),r.status){case"fulfilled":return r.value;case"rejected":throw n=r.reason,Mp(n),n;default:if(typeof r.status=="string")r.then(ke,ke);else{if(n=zt,n!==null&&100<n.shellSuspendCounter)throw Error(s(482));n=r,n.status="pending",n.then(function(f){if(r.status==="pending"){var C=r;C.status="fulfilled",C.value=f}},function(f){if(r.status==="pending"){var C=r;C.status="rejected",C.reason=f}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw n=r.reason,Mp(n),n}throw _s=r,Vs}}function ms(n){try{var r=n._init;return r(n._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(_s=a,Vs):a}}var _s=null;function Np(){if(_s===null)throw Error(s(459));var n=_s;return _s=null,n}function Mp(n){if(n===Vs||n===Vl)throw Error(s(483))}var Xs=null,io=0;function Ql(n){var r=io;return io+=1,Xs===null&&(Xs=[]),Op(Xs,n,r)}function ro(n,r){r=r.props.ref,n.ref=r!==void 0?r:null}function Zl(n,r){throw r.$$typeof===b?Error(s(525)):(n=Object.prototype.toString.call(r),Error(s(31,n==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":n)))}function Ip(n){function r(oe,se){if(n){var he=oe.deletions;he===null?(oe.deletions=[se],oe.flags|=16):he.push(se)}}function a(oe,se){if(!n)return null;for(;se!==null;)r(oe,se),se=se.sibling;return null}function f(oe){for(var se=new Map;oe!==null;)oe.key!==null?se.set(oe.key,oe):se.set(oe.index,oe),oe=oe.sibling;return se}function C(oe,se){return oe=nr(oe,se),oe.index=0,oe.sibling=null,oe}function w(oe,se,he){return oe.index=he,n?(he=oe.alternate,he!==null?(he=he.index,he<se?(oe.flags|=67108866,se):he):(oe.flags|=67108866,se)):(oe.flags|=1048576,se)}function P(oe){return n&&oe.alternate===null&&(oe.flags|=67108866),oe}function V(oe,se,he,ve){return se===null||se.tag!==6?(se=sh(he,oe.mode,ve),se.return=oe,se):(se=C(se,he),se.return=oe,se)}function ie(oe,se,he,ve){var Ke=he.type;return Ke===E?Ee(oe,se,he.props.children,ve,he.key):se!==null&&(se.elementType===Ke||typeof Ke=="object"&&Ke!==null&&Ke.$$typeof===D&&ms(Ke)===se.type)?(se=C(se,he.props),ro(se,he),se.return=oe,se):(se=Wl(he.type,he.key,he.props,null,oe.mode,ve),ro(se,he),se.return=oe,se)}function de(oe,se,he,ve){return se===null||se.tag!==4||se.stateNode.containerInfo!==he.containerInfo||se.stateNode.implementation!==he.implementation?(se=ah(he,oe.mode,ve),se.return=oe,se):(se=C(se,he.children||[]),se.return=oe,se)}function Ee(oe,se,he,ve,Ke){return se===null||se.tag!==7?(se=hs(he,oe.mode,ve,Ke),se.return=oe,se):(se=C(se,he),se.return=oe,se)}function Se(oe,se,he){if(typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint")return se=sh(""+se,oe.mode,he),se.return=oe,se;if(typeof se=="object"&&se!==null){switch(se.$$typeof){case y:return he=Wl(se.type,se.key,se.props,null,oe.mode,he),ro(he,se),he.return=oe,he;case T:return se=ah(se,oe.mode,he),se.return=oe,se;case D:return se=ms(se),Se(oe,se,he)}if(q(se)||I(se))return se=hs(se,oe.mode,he,null),se.return=oe,se;if(typeof se.then=="function")return Se(oe,Ql(se),he);if(se.$$typeof===S)return Se(oe,Gl(oe,se),he);Zl(oe,se)}return null}function pe(oe,se,he,ve){var Ke=se!==null?se.key:null;if(typeof he=="string"&&he!==""||typeof he=="number"||typeof he=="bigint")return Ke!==null?null:V(oe,se,""+he,ve);if(typeof he=="object"&&he!==null){switch(he.$$typeof){case y:return he.key===Ke?ie(oe,se,he,ve):null;case T:return he.key===Ke?de(oe,se,he,ve):null;case D:return he=ms(he),pe(oe,se,he,ve)}if(q(he)||I(he))return Ke!==null?null:Ee(oe,se,he,ve,null);if(typeof he.then=="function")return pe(oe,se,Ql(he),ve);if(he.$$typeof===S)return pe(oe,se,Gl(oe,he),ve);Zl(oe,he)}return null}function ge(oe,se,he,ve,Ke){if(typeof ve=="string"&&ve!==""||typeof ve=="number"||typeof ve=="bigint")return oe=oe.get(he)||null,V(se,oe,""+ve,Ke);if(typeof ve=="object"&&ve!==null){switch(ve.$$typeof){case y:return oe=oe.get(ve.key===null?he:ve.key)||null,ie(se,oe,ve,Ke);case T:return oe=oe.get(ve.key===null?he:ve.key)||null,de(se,oe,ve,Ke);case D:return ve=ms(ve),ge(oe,se,he,ve,Ke)}if(q(ve)||I(ve))return oe=oe.get(he)||null,Ee(se,oe,ve,Ke,null);if(typeof ve.then=="function")return ge(oe,se,he,Ql(ve),Ke);if(ve.$$typeof===S)return ge(oe,se,he,Gl(se,ve),Ke);Zl(se,ve)}return null}function Fe(oe,se,he,ve){for(var Ke=null,Tt=null,je=se,ot=se=0,_t=null;je!==null&&ot<he.length;ot++){je.index>ot?(_t=je,je=null):_t=je.sibling;var At=pe(oe,je,he[ot],ve);if(At===null){je===null&&(je=_t);break}n&&je&&At.alternate===null&&r(oe,je),se=w(At,se,ot),Tt===null?Ke=At:Tt.sibling=At,Tt=At,je=_t}if(ot===he.length)return a(oe,je),vt&&ir(oe,ot),Ke;if(je===null){for(;ot<he.length;ot++)je=Se(oe,he[ot],ve),je!==null&&(se=w(je,se,ot),Tt===null?Ke=je:Tt.sibling=je,Tt=je);return vt&&ir(oe,ot),Ke}for(je=f(je);ot<he.length;ot++)_t=ge(je,oe,ot,he[ot],ve),_t!==null&&(n&&_t.alternate!==null&&je.delete(_t.key===null?ot:_t.key),se=w(_t,se,ot),Tt===null?Ke=_t:Tt.sibling=_t,Tt=_t);return n&&je.forEach(function(Xr){return r(oe,Xr)}),vt&&ir(oe,ot),Ke}function Je(oe,se,he,ve){if(he==null)throw Error(s(151));for(var Ke=null,Tt=null,je=se,ot=se=0,_t=null,At=he.next();je!==null&&!At.done;ot++,At=he.next()){je.index>ot?(_t=je,je=null):_t=je.sibling;var Xr=pe(oe,je,At.value,ve);if(Xr===null){je===null&&(je=_t);break}n&&je&&Xr.alternate===null&&r(oe,je),se=w(Xr,se,ot),Tt===null?Ke=Xr:Tt.sibling=Xr,Tt=Xr,je=_t}if(At.done)return a(oe,je),vt&&ir(oe,ot),Ke;if(je===null){for(;!At.done;ot++,At=he.next())At=Se(oe,At.value,ve),At!==null&&(se=w(At,se,ot),Tt===null?Ke=At:Tt.sibling=At,Tt=At);return vt&&ir(oe,ot),Ke}for(je=f(je);!At.done;ot++,At=he.next())At=ge(je,oe,ot,At.value,ve),At!==null&&(n&&At.alternate!==null&&je.delete(At.key===null?ot:At.key),se=w(At,se,ot),Tt===null?Ke=At:Tt.sibling=At,Tt=At);return n&&je.forEach(function(p2){return r(oe,p2)}),vt&&ir(oe,ot),Ke}function Pt(oe,se,he,ve){if(typeof he=="object"&&he!==null&&he.type===E&&he.key===null&&(he=he.props.children),typeof he=="object"&&he!==null){switch(he.$$typeof){case y:e:{for(var Ke=he.key;se!==null;){if(se.key===Ke){if(Ke=he.type,Ke===E){if(se.tag===7){a(oe,se.sibling),ve=C(se,he.props.children),ve.return=oe,oe=ve;break e}}else if(se.elementType===Ke||typeof Ke=="object"&&Ke!==null&&Ke.$$typeof===D&&ms(Ke)===se.type){a(oe,se.sibling),ve=C(se,he.props),ro(ve,he),ve.return=oe,oe=ve;break e}a(oe,se);break}else r(oe,se);se=se.sibling}he.type===E?(ve=hs(he.props.children,oe.mode,ve,he.key),ve.return=oe,oe=ve):(ve=Wl(he.type,he.key,he.props,null,oe.mode,ve),ro(ve,he),ve.return=oe,oe=ve)}return P(oe);case T:e:{for(Ke=he.key;se!==null;){if(se.key===Ke)if(se.tag===4&&se.stateNode.containerInfo===he.containerInfo&&se.stateNode.implementation===he.implementation){a(oe,se.sibling),ve=C(se,he.children||[]),ve.return=oe,oe=ve;break e}else{a(oe,se);break}else r(oe,se);se=se.sibling}ve=ah(he,oe.mode,ve),ve.return=oe,oe=ve}return P(oe);case D:return he=ms(he),Pt(oe,se,he,ve)}if(q(he))return Fe(oe,se,he,ve);if(I(he)){if(Ke=I(he),typeof Ke!="function")throw Error(s(150));return he=Ke.call(he),Je(oe,se,he,ve)}if(typeof he.then=="function")return Pt(oe,se,Ql(he),ve);if(he.$$typeof===S)return Pt(oe,se,Gl(oe,he),ve);Zl(oe,he)}return typeof he=="string"&&he!==""||typeof he=="number"||typeof he=="bigint"?(he=""+he,se!==null&&se.tag===6?(a(oe,se.sibling),ve=C(se,he),ve.return=oe,oe=ve):(a(oe,se),ve=sh(he,oe.mode,ve),ve.return=oe,oe=ve),P(oe)):a(oe,se)}return function(oe,se,he,ve){try{io=0;var Ke=Pt(oe,se,he,ve);return Xs=null,Ke}catch(je){if(je===Vs||je===Vl)throw je;var Tt=ui(29,je,null,oe.mode);return Tt.lanes=ve,Tt.return=oe,Tt}finally{}}}var bs=Ip(!0),Bp=Ip(!1),Nr=!1;function bh(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Eh(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 Mr(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function Ir(n,r,a){var f=n.updateQueue;if(f===null)return null;if(f=f.shared,(Dt&2)!==0){var C=f.pending;return C===null?r.next=r:(r.next=C.next,C.next=r),f.pending=r,r=$l(n),Ep(n,null,a),r}return jl(n,f,r,a),$l(n)}function so(n,r,a){if(r=r.updateQueue,r!==null&&(r=r.shared,(a&4194048)!==0)){var f=r.lanes;f&=n.pendingLanes,a|=f,r.lanes=a,We(n,a)}}function vh(n,r){var a=n.updateQueue,f=n.alternate;if(f!==null&&(f=f.updateQueue,a===f)){var C=null,w=null;if(a=a.firstBaseUpdate,a!==null){do{var P={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};w===null?C=w=P:w=w.next=P,a=a.next}while(a!==null);w===null?C=w=r:w=w.next=r}else C=w=r;a={baseState:f.baseState,firstBaseUpdate:C,lastBaseUpdate:w,shared:f.shared,callbacks:f.callbacks},n.updateQueue=a;return}n=a.lastBaseUpdate,n===null?a.firstBaseUpdate=r:n.next=r,a.lastBaseUpdate=r}var Sh=!1;function ao(){if(Sh){var n=Ks;if(n!==null)throw n}}function oo(n,r,a,f){Sh=!1;var C=n.updateQueue;Nr=!1;var w=C.firstBaseUpdate,P=C.lastBaseUpdate,V=C.shared.pending;if(V!==null){C.shared.pending=null;var ie=V,de=ie.next;ie.next=null,P===null?w=de:P.next=de,P=ie;var Ee=n.alternate;Ee!==null&&(Ee=Ee.updateQueue,V=Ee.lastBaseUpdate,V!==P&&(V===null?Ee.firstBaseUpdate=de:V.next=de,Ee.lastBaseUpdate=ie))}if(w!==null){var Se=C.baseState;P=0,Ee=de=ie=null,V=w;do{var pe=V.lane&-536870913,ge=pe!==V.lane;if(ge?(mt&pe)===pe:(f&pe)===pe){pe!==0&&pe===Gs&&(Sh=!0),Ee!==null&&(Ee=Ee.next={lane:0,tag:V.tag,payload:V.payload,callback:null,next:null});e:{var Fe=n,Je=V;pe=r;var Pt=a;switch(Je.tag){case 1:if(Fe=Je.payload,typeof Fe=="function"){Se=Fe.call(Pt,Se,pe);break e}Se=Fe;break e;case 3:Fe.flags=Fe.flags&-65537|128;case 0:if(Fe=Je.payload,pe=typeof Fe=="function"?Fe.call(Pt,Se,pe):Fe,pe==null)break e;Se=h({},Se,pe);break e;case 2:Nr=!0}}pe=V.callback,pe!==null&&(n.flags|=64,ge&&(n.flags|=8192),ge=C.callbacks,ge===null?C.callbacks=[pe]:ge.push(pe))}else ge={lane:pe,tag:V.tag,payload:V.payload,callback:V.callback,next:null},Ee===null?(de=Ee=ge,ie=Se):Ee=Ee.next=ge,P|=pe;if(V=V.next,V===null){if(V=C.shared.pending,V===null)break;ge=V,V=ge.next,ge.next=null,C.lastBaseUpdate=ge,C.shared.pending=null}}while(!0);Ee===null&&(ie=Se),C.baseState=ie,C.firstBaseUpdate=de,C.lastBaseUpdate=Ee,w===null&&(C.shared.lanes=0),Hr|=P,n.lanes=P,n.memoizedState=Se}}function Fp(n,r){if(typeof n!="function")throw Error(s(191,n));n.call(r)}function Pp(n,r){var a=n.callbacks;if(a!==null)for(n.callbacks=null,n=0;n<a.length;n++)Fp(a[n],r)}var Qs=U(null),Jl=U(0);function Up(n,r){n=pr,j(Jl,n),j(Qs,r),pr=n|r.baseLanes}function yh(){j(Jl,pr),j(Qs,Qs.current)}function Ch(){pr=Jl.current,$(Qs),$(Jl)}var ci=U(null),Ti=null;function Br(n){var r=n.alternate;j(an,an.current&1),j(ci,n),Ti===null&&(r===null||Qs.current!==null||r.memoizedState!==null)&&(Ti=n)}function Th(n){j(an,an.current),j(ci,n),Ti===null&&(Ti=n)}function Hp(n){n.tag===22?(j(an,an.current),j(ci,n),Ti===null&&(Ti=n)):Fr()}function Fr(){j(an,an.current),j(ci,ci.current)}function hi(n){$(ci),Ti===n&&(Ti=null),$(an)}var an=U(0);function eu(n){for(var r=n;r!==null;){if(r.tag===13){var a=r.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||kd(a)||Ld(a)))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 ar=0,at=null,Bt=null,fn=null,tu=!1,Zs=!1,Es=!1,nu=0,lo=0,Js=null,rC=0;function en(){throw Error(s(321))}function Ah(n,r){if(r===null)return!1;for(var a=0;a<r.length&&a<n.length;a++)if(!li(n[a],r[a]))return!1;return!0}function xh(n,r,a,f,C,w){return ar=w,at=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,Y.H=n===null||n.memoizedState===null?Cg:zh,Es=!1,w=a(f,C),Es=!1,Zs&&(w=jp(r,a,f,C)),zp(n),w}function zp(n){Y.H=ho;var r=Bt!==null&&Bt.next!==null;if(ar=0,fn=Bt=at=null,tu=!1,lo=0,Js=null,r)throw Error(s(300));n===null||pn||(n=n.dependencies,n!==null&&Yl(n)&&(pn=!0))}function jp(n,r,a,f){at=n;var C=0;do{if(Zs&&(Js=null),lo=0,Zs=!1,25<=C)throw Error(s(301));if(C+=1,fn=Bt=null,n.updateQueue!=null){var w=n.updateQueue;w.lastEffect=null,w.events=null,w.stores=null,w.memoCache!=null&&(w.memoCache.index=0)}Y.H=Tg,w=r(a,f)}while(Zs);return w}function sC(){var n=Y.H,r=n.useState()[0];return r=typeof r.then=="function"?uo(r):r,n=n.useState()[0],(Bt!==null?Bt.memoizedState:null)!==n&&(at.flags|=1024),r}function wh(){var n=nu!==0;return nu=0,n}function Dh(n,r,a){r.updateQueue=n.updateQueue,r.flags&=-2053,n.lanes&=~a}function Rh(n){if(tu){for(n=n.memoizedState;n!==null;){var r=n.queue;r!==null&&(r.pending=null),n=n.next}tu=!1}ar=0,fn=Bt=at=null,Zs=!1,lo=nu=0,Js=null}function Hn(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return fn===null?at.memoizedState=fn=n:fn=fn.next=n,fn}function on(){if(Bt===null){var n=at.alternate;n=n!==null?n.memoizedState:null}else n=Bt.next;var r=fn===null?at.memoizedState:fn.next;if(r!==null)fn=r,Bt=n;else{if(n===null)throw at.alternate===null?Error(s(467)):Error(s(310));Bt=n,n={memoizedState:Bt.memoizedState,baseState:Bt.baseState,baseQueue:Bt.baseQueue,queue:Bt.queue,next:null},fn===null?at.memoizedState=fn=n:fn=fn.next=n}return fn}function iu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function uo(n){var r=lo;return lo+=1,Js===null&&(Js=[]),n=Op(Js,n,r),r=at,(fn===null?r.memoizedState:fn.next)===null&&(r=r.alternate,Y.H=r===null||r.memoizedState===null?Cg:zh),n}function ru(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return uo(n);if(n.$$typeof===S)return wn(n)}throw Error(s(438,String(n)))}function kh(n){var r=null,a=at.updateQueue;if(a!==null&&(r=a.memoCache),r==null){var f=at.alternate;f!==null&&(f=f.updateQueue,f!==null&&(f=f.memoCache,f!=null&&(r={data:f.data.map(function(C){return C.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),a===null&&(a=iu(),at.updateQueue=a),a.memoCache=r,a=r.data[r.index],a===void 0)for(a=r.data[r.index]=Array(n),f=0;f<n;f++)a[f]=L;return r.index++,a}function or(n,r){return typeof r=="function"?r(n):r}function su(n){var r=on();return Lh(r,Bt,n)}function Lh(n,r,a){var f=n.queue;if(f===null)throw Error(s(311));f.lastRenderedReducer=a;var C=n.baseQueue,w=f.pending;if(w!==null){if(C!==null){var P=C.next;C.next=w.next,w.next=P}r.baseQueue=C=w,f.pending=null}if(w=n.baseState,C===null)n.memoizedState=w;else{r=C.next;var V=P=null,ie=null,de=r,Ee=!1;do{var Se=de.lane&-536870913;if(Se!==de.lane?(mt&Se)===Se:(ar&Se)===Se){var pe=de.revertLane;if(pe===0)ie!==null&&(ie=ie.next={lane:0,revertLane:0,gesture:null,action:de.action,hasEagerState:de.hasEagerState,eagerState:de.eagerState,next:null}),Se===Gs&&(Ee=!0);else if((ar&pe)===pe){de=de.next,pe===Gs&&(Ee=!0);continue}else Se={lane:0,revertLane:de.revertLane,gesture:null,action:de.action,hasEagerState:de.hasEagerState,eagerState:de.eagerState,next:null},ie===null?(V=ie=Se,P=w):ie=ie.next=Se,at.lanes|=pe,Hr|=pe;Se=de.action,Es&&a(w,Se),w=de.hasEagerState?de.eagerState:a(w,Se)}else pe={lane:Se,revertLane:de.revertLane,gesture:de.gesture,action:de.action,hasEagerState:de.hasEagerState,eagerState:de.eagerState,next:null},ie===null?(V=ie=pe,P=w):ie=ie.next=pe,at.lanes|=Se,Hr|=Se;de=de.next}while(de!==null&&de!==r);if(ie===null?P=w:ie.next=V,!li(w,n.memoizedState)&&(pn=!0,Ee&&(a=Ks,a!==null)))throw a;n.memoizedState=w,n.baseState=P,n.baseQueue=ie,f.lastRenderedState=w}return C===null&&(f.lanes=0),[n.memoizedState,f.dispatch]}function Oh(n){var r=on(),a=r.queue;if(a===null)throw Error(s(311));a.lastRenderedReducer=n;var f=a.dispatch,C=a.pending,w=r.memoizedState;if(C!==null){a.pending=null;var P=C=C.next;do w=n(w,P.action),P=P.next;while(P!==C);li(w,r.memoizedState)||(pn=!0),r.memoizedState=w,r.baseQueue===null&&(r.baseState=w),a.lastRenderedState=w}return[w,f]}function $p(n,r,a){var f=at,C=on(),w=vt;if(w){if(a===void 0)throw Error(s(407));a=a()}else a=r();var P=!li((Bt||C).memoizedState,a);if(P&&(C.memoizedState=a,pn=!0),C=C.queue,Ih(Yp.bind(null,f,C,n),[n]),C.getSnapshot!==r||P||fn!==null&&fn.memoizedState.tag&1){if(f.flags|=2048,ea(9,{destroy:void 0},qp.bind(null,f,C,a,r),null),zt===null)throw Error(s(349));w||(ar&127)!==0||Wp(f,r,a)}return a}function Wp(n,r,a){n.flags|=16384,n={getSnapshot:r,value:a},r=at.updateQueue,r===null?(r=iu(),at.updateQueue=r,r.stores=[n]):(a=r.stores,a===null?r.stores=[n]:a.push(n))}function qp(n,r,a,f){r.value=a,r.getSnapshot=f,Gp(r)&&Kp(n)}function Yp(n,r,a){return a(function(){Gp(r)&&Kp(n)})}function Gp(n){var r=n.getSnapshot;n=n.value;try{var a=r();return!li(n,a)}catch{return!0}}function Kp(n){var r=cs(n,2);r!==null&&ei(r,n,2)}function Nh(n){var r=Hn();if(typeof n=="function"){var a=n;if(n=a(),Es){Gt(!0);try{a()}finally{Gt(!1)}}}return r.memoizedState=r.baseState=n,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:or,lastRenderedState:n},r}function Vp(n,r,a,f){return n.baseState=a,Lh(n,Bt,typeof f=="function"?f:or)}function aC(n,r,a,f,C){if(lu(n))throw Error(s(485));if(n=r.action,n!==null){var w={payload:C,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(P){w.listeners.push(P)}};Y.T!==null?a(!0):w.isTransition=!1,f(w),a=r.pending,a===null?(w.next=r.pending=w,Xp(r,w)):(w.next=a.next,r.pending=a.next=w)}}function Xp(n,r){var a=r.action,f=r.payload,C=n.state;if(r.isTransition){var w=Y.T,P={};Y.T=P;try{var V=a(C,f),ie=Y.S;ie!==null&&ie(P,V),Qp(n,r,V)}catch(de){Mh(n,r,de)}finally{w!==null&&P.types!==null&&(w.types=P.types),Y.T=w}}else try{w=a(C,f),Qp(n,r,w)}catch(de){Mh(n,r,de)}}function Qp(n,r,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(f){Zp(n,r,f)},function(f){return Mh(n,r,f)}):Zp(n,r,a)}function Zp(n,r,a){r.status="fulfilled",r.value=a,Jp(r),n.state=a,r=n.pending,r!==null&&(a=r.next,a===r?n.pending=null:(a=a.next,r.next=a,Xp(n,a)))}function Mh(n,r,a){var f=n.pending;if(n.pending=null,f!==null){f=f.next;do r.status="rejected",r.reason=a,Jp(r),r=r.next;while(r!==f)}n.action=null}function Jp(n){n=n.listeners;for(var r=0;r<n.length;r++)(0,n[r])()}function eg(n,r){return r}function tg(n,r){if(vt){var a=zt.formState;if(a!==null){e:{var f=at;if(vt){if(Kt){t:{for(var C=Kt,w=Ci;C.nodeType!==8;){if(!w){C=null;break t}if(C=Ai(C.nextSibling),C===null){C=null;break t}}w=C.data,C=w==="F!"||w==="F"?C:null}if(C){Kt=Ai(C.nextSibling),f=C.data==="F!";break e}}Lr(f)}f=!1}f&&(r=a[0])}}return a=Hn(),a.memoizedState=a.baseState=r,f={pending:null,lanes:0,dispatch:null,lastRenderedReducer:eg,lastRenderedState:r},a.queue=f,a=vg.bind(null,at,f),f.dispatch=a,f=Nh(!1),w=Hh.bind(null,at,!1,f.queue),f=Hn(),C={state:r,dispatch:null,action:n,pending:null},f.queue=C,a=aC.bind(null,at,C,w,a),C.dispatch=a,f.memoizedState=n,[r,a,!1]}function ng(n){var r=on();return ig(r,Bt,n)}function ig(n,r,a){if(r=Lh(n,r,eg)[0],n=su(or)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var f=uo(r)}catch(P){throw P===Vs?Vl:P}else f=r;r=on();var C=r.queue,w=C.dispatch;return a!==r.memoizedState&&(at.flags|=2048,ea(9,{destroy:void 0},oC.bind(null,C,a),null)),[f,w,n]}function oC(n,r){n.action=r}function rg(n){var r=on(),a=Bt;if(a!==null)return ig(r,a,n);on(),r=r.memoizedState,a=on();var f=a.queue.dispatch;return a.memoizedState=n,[r,f,!1]}function ea(n,r,a,f){return n={tag:n,create:a,deps:f,inst:r,next:null},r=at.updateQueue,r===null&&(r=iu(),at.updateQueue=r),a=r.lastEffect,a===null?r.lastEffect=n.next=n:(f=a.next,a.next=n,n.next=f,r.lastEffect=n),n}function sg(){return on().memoizedState}function au(n,r,a,f){var C=Hn();at.flags|=n,C.memoizedState=ea(1|r,{destroy:void 0},a,f===void 0?null:f)}function ou(n,r,a,f){var C=on();f=f===void 0?null:f;var w=C.memoizedState.inst;Bt!==null&&f!==null&&Ah(f,Bt.memoizedState.deps)?C.memoizedState=ea(r,w,a,f):(at.flags|=n,C.memoizedState=ea(1|r,w,a,f))}function ag(n,r){au(8390656,8,n,r)}function Ih(n,r){ou(2048,8,n,r)}function lC(n){at.flags|=4;var r=at.updateQueue;if(r===null)r=iu(),at.updateQueue=r,r.events=[n];else{var a=r.events;a===null?r.events=[n]:a.push(n)}}function og(n){var r=on().memoizedState;return lC({ref:r,nextImpl:n}),function(){if((Dt&2)!==0)throw Error(s(440));return r.impl.apply(void 0,arguments)}}function lg(n,r){return ou(4,2,n,r)}function ug(n,r){return ou(4,4,n,r)}function cg(n,r){if(typeof r=="function"){n=n();var a=r(n);return function(){typeof a=="function"?a():r(null)}}if(r!=null)return n=n(),r.current=n,function(){r.current=null}}function hg(n,r,a){a=a!=null?a.concat([n]):null,ou(4,4,cg.bind(null,r,n),a)}function Bh(){}function dg(n,r){var a=on();r=r===void 0?null:r;var f=a.memoizedState;return r!==null&&Ah(r,f[1])?f[0]:(a.memoizedState=[n,r],n)}function fg(n,r){var a=on();r=r===void 0?null:r;var f=a.memoizedState;if(r!==null&&Ah(r,f[1]))return f[0];if(f=n(),Es){Gt(!0);try{n()}finally{Gt(!1)}}return a.memoizedState=[f,r],f}function Fh(n,r,a){return a===void 0||(ar&1073741824)!==0&&(mt&261930)===0?n.memoizedState=r:(n.memoizedState=a,n=pm(),at.lanes|=n,Hr|=n,a)}function pg(n,r,a,f){return li(a,r)?a:Qs.current!==null?(n=Fh(n,a,f),li(n,r)||(pn=!0),n):(ar&42)===0||(ar&1073741824)!==0&&(mt&261930)===0?(pn=!0,n.memoizedState=a):(n=pm(),at.lanes|=n,Hr|=n,r)}function gg(n,r,a,f,C){var w=K.p;K.p=w!==0&&8>w?w:8;var P=Y.T,V={};Y.T=V,Hh(n,!1,r,a);try{var ie=C(),de=Y.S;if(de!==null&&de(V,ie),ie!==null&&typeof ie=="object"&&typeof ie.then=="function"){var Ee=iC(ie,f);co(n,r,Ee,pi(n))}else co(n,r,f,pi(n))}catch(Se){co(n,r,{then:function(){},status:"rejected",reason:Se},pi())}finally{K.p=w,P!==null&&V.types!==null&&(P.types=V.types),Y.T=P}}function uC(){}function Ph(n,r,a,f){if(n.tag!==5)throw Error(s(476));var C=mg(n).queue;gg(n,C,r,Q,a===null?uC:function(){return _g(n),a(f)})}function mg(n){var r=n.memoizedState;if(r!==null)return r;r={memoizedState:Q,baseState:Q,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:or,lastRenderedState:Q},next:null};var a={};return r.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:or,lastRenderedState:a},next:null},n.memoizedState=r,n=n.alternate,n!==null&&(n.memoizedState=r),r}function _g(n){var r=mg(n);r.next===null&&(r=n.alternate.memoizedState),co(n,r.next.queue,{},pi())}function Uh(){return wn(Do)}function bg(){return on().memoizedState}function Eg(){return on().memoizedState}function cC(n){for(var r=n.return;r!==null;){switch(r.tag){case 24:case 3:var a=pi();n=Mr(a);var f=Ir(r,n,a);f!==null&&(ei(f,r,a),so(f,r,a)),r={cache:ph()},n.payload=r;return}r=r.return}}function hC(n,r,a){var f=pi();a={lane:f,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},lu(n)?Sg(r,a):(a=ih(n,r,a,f),a!==null&&(ei(a,n,f),yg(a,r,f)))}function vg(n,r,a){var f=pi();co(n,r,a,f)}function co(n,r,a,f){var C={lane:f,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(lu(n))Sg(r,C);else{var w=n.alternate;if(n.lanes===0&&(w===null||w.lanes===0)&&(w=r.lastRenderedReducer,w!==null))try{var P=r.lastRenderedState,V=w(P,a);if(C.hasEagerState=!0,C.eagerState=V,li(V,P))return jl(n,r,C,0),zt===null&&zl(),!1}catch{}finally{}if(a=ih(n,r,C,f),a!==null)return ei(a,n,f),yg(a,r,f),!0}return!1}function Hh(n,r,a,f){if(f={lane:2,revertLane:bd(),gesture:null,action:f,hasEagerState:!1,eagerState:null,next:null},lu(n)){if(r)throw Error(s(479))}else r=ih(n,a,f,2),r!==null&&ei(r,n,2)}function lu(n){var r=n.alternate;return n===at||r!==null&&r===at}function Sg(n,r){Zs=tu=!0;var a=n.pending;a===null?r.next=r:(r.next=a.next,a.next=r),n.pending=r}function yg(n,r,a){if((a&4194048)!==0){var f=r.lanes;f&=n.pendingLanes,a|=f,r.lanes=a,We(n,a)}}var ho={readContext:wn,use:ru,useCallback:en,useContext:en,useEffect:en,useImperativeHandle:en,useLayoutEffect:en,useInsertionEffect:en,useMemo:en,useReducer:en,useRef:en,useState:en,useDebugValue:en,useDeferredValue:en,useTransition:en,useSyncExternalStore:en,useId:en,useHostTransitionStatus:en,useFormState:en,useActionState:en,useOptimistic:en,useMemoCache:en,useCacheRefresh:en};ho.useEffectEvent=en;var Cg={readContext:wn,use:ru,useCallback:function(n,r){return Hn().memoizedState=[n,r===void 0?null:r],n},useContext:wn,useEffect:ag,useImperativeHandle:function(n,r,a){a=a!=null?a.concat([n]):null,au(4194308,4,cg.bind(null,r,n),a)},useLayoutEffect:function(n,r){return au(4194308,4,n,r)},useInsertionEffect:function(n,r){au(4,2,n,r)},useMemo:function(n,r){var a=Hn();r=r===void 0?null:r;var f=n();if(Es){Gt(!0);try{n()}finally{Gt(!1)}}return a.memoizedState=[f,r],f},useReducer:function(n,r,a){var f=Hn();if(a!==void 0){var C=a(r);if(Es){Gt(!0);try{a(r)}finally{Gt(!1)}}}else C=r;return f.memoizedState=f.baseState=C,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:C},f.queue=n,n=n.dispatch=hC.bind(null,at,n),[f.memoizedState,n]},useRef:function(n){var r=Hn();return n={current:n},r.memoizedState=n},useState:function(n){n=Nh(n);var r=n.queue,a=vg.bind(null,at,r);return r.dispatch=a,[n.memoizedState,a]},useDebugValue:Bh,useDeferredValue:function(n,r){var a=Hn();return Fh(a,n,r)},useTransition:function(){var n=Nh(!1);return n=gg.bind(null,at,n.queue,!0,!1),Hn().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,r,a){var f=at,C=Hn();if(vt){if(a===void 0)throw Error(s(407));a=a()}else{if(a=r(),zt===null)throw Error(s(349));(mt&127)!==0||Wp(f,r,a)}C.memoizedState=a;var w={value:a,getSnapshot:r};return C.queue=w,ag(Yp.bind(null,f,w,n),[n]),f.flags|=2048,ea(9,{destroy:void 0},qp.bind(null,f,w,a,r),null),a},useId:function(){var n=Hn(),r=zt.identifierPrefix;if(vt){var a=zi,f=Hi;a=(f&~(1<<32-Et(f)-1)).toString(32)+a,r="_"+r+"R_"+a,a=nu++,0<a&&(r+="H"+a.toString(32)),r+="_"}else a=rC++,r="_"+r+"r_"+a.toString(32)+"_";return n.memoizedState=r},useHostTransitionStatus:Uh,useFormState:tg,useActionState:tg,useOptimistic:function(n){var r=Hn();r.memoizedState=r.baseState=n;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=a,r=Hh.bind(null,at,!0,a),a.dispatch=r,[n,r]},useMemoCache:kh,useCacheRefresh:function(){return Hn().memoizedState=cC.bind(null,at)},useEffectEvent:function(n){var r=Hn(),a={impl:n};return r.memoizedState=a,function(){if((Dt&2)!==0)throw Error(s(440));return a.impl.apply(void 0,arguments)}}},zh={readContext:wn,use:ru,useCallback:dg,useContext:wn,useEffect:Ih,useImperativeHandle:hg,useInsertionEffect:lg,useLayoutEffect:ug,useMemo:fg,useReducer:su,useRef:sg,useState:function(){return su(or)},useDebugValue:Bh,useDeferredValue:function(n,r){var a=on();return pg(a,Bt.memoizedState,n,r)},useTransition:function(){var n=su(or)[0],r=on().memoizedState;return[typeof n=="boolean"?n:uo(n),r]},useSyncExternalStore:$p,useId:bg,useHostTransitionStatus:Uh,useFormState:ng,useActionState:ng,useOptimistic:function(n,r){var a=on();return Vp(a,Bt,n,r)},useMemoCache:kh,useCacheRefresh:Eg};zh.useEffectEvent=og;var Tg={readContext:wn,use:ru,useCallback:dg,useContext:wn,useEffect:Ih,useImperativeHandle:hg,useInsertionEffect:lg,useLayoutEffect:ug,useMemo:fg,useReducer:Oh,useRef:sg,useState:function(){return Oh(or)},useDebugValue:Bh,useDeferredValue:function(n,r){var a=on();return Bt===null?Fh(a,n,r):pg(a,Bt.memoizedState,n,r)},useTransition:function(){var n=Oh(or)[0],r=on().memoizedState;return[typeof n=="boolean"?n:uo(n),r]},useSyncExternalStore:$p,useId:bg,useHostTransitionStatus:Uh,useFormState:rg,useActionState:rg,useOptimistic:function(n,r){var a=on();return Bt!==null?Vp(a,Bt,n,r):(a.baseState=n,[n,a.queue.dispatch])},useMemoCache:kh,useCacheRefresh:Eg};Tg.useEffectEvent=og;function jh(n,r,a,f){r=n.memoizedState,a=a(f,r),a=a==null?r:h({},r,a),n.memoizedState=a,n.lanes===0&&(n.updateQueue.baseState=a)}var $h={enqueueSetState:function(n,r,a){n=n._reactInternals;var f=pi(),C=Mr(f);C.payload=r,a!=null&&(C.callback=a),r=Ir(n,C,f),r!==null&&(ei(r,n,f),so(r,n,f))},enqueueReplaceState:function(n,r,a){n=n._reactInternals;var f=pi(),C=Mr(f);C.tag=1,C.payload=r,a!=null&&(C.callback=a),r=Ir(n,C,f),r!==null&&(ei(r,n,f),so(r,n,f))},enqueueForceUpdate:function(n,r){n=n._reactInternals;var a=pi(),f=Mr(a);f.tag=2,r!=null&&(f.callback=r),r=Ir(n,f,a),r!==null&&(ei(r,n,a),so(r,n,a))}};function Ag(n,r,a,f,C,w,P){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(f,w,P):r.prototype&&r.prototype.isPureReactComponent?!Qa(a,f)||!Qa(C,w):!0}function xg(n,r,a,f){n=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(a,f),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(a,f),r.state!==n&&$h.enqueueReplaceState(r,r.state,null)}function vs(n,r){var a=r;if("ref"in r){a={};for(var f in r)f!=="ref"&&(a[f]=r[f])}if(n=n.defaultProps){a===r&&(a=h({},a));for(var C in n)a[C]===void 0&&(a[C]=n[C])}return a}function wg(n){Hl(n)}function Dg(n){console.error(n)}function Rg(n){Hl(n)}function uu(n,r){try{var a=n.onUncaughtError;a(r.value,{componentStack:r.stack})}catch(f){setTimeout(function(){throw f})}}function kg(n,r,a){try{var f=n.onCaughtError;f(a.value,{componentStack:a.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(C){setTimeout(function(){throw C})}}function Wh(n,r,a){return a=Mr(a),a.tag=3,a.payload={element:null},a.callback=function(){uu(n,r)},a}function Lg(n){return n=Mr(n),n.tag=3,n}function Og(n,r,a,f){var C=a.type.getDerivedStateFromError;if(typeof C=="function"){var w=f.value;n.payload=function(){return C(w)},n.callback=function(){kg(r,a,f)}}var P=a.stateNode;P!==null&&typeof P.componentDidCatch=="function"&&(n.callback=function(){kg(r,a,f),typeof C!="function"&&(zr===null?zr=new Set([this]):zr.add(this));var V=f.stack;this.componentDidCatch(f.value,{componentStack:V!==null?V:""})})}function dC(n,r,a,f,C){if(a.flags|=32768,f!==null&&typeof f=="object"&&typeof f.then=="function"){if(r=a.alternate,r!==null&&Ys(r,a,C,!0),a=ci.current,a!==null){switch(a.tag){case 31:case 13:return Ti===null?Su():a.alternate===null&&tn===0&&(tn=3),a.flags&=-257,a.flags|=65536,a.lanes=C,f===Xl?a.flags|=16384:(r=a.updateQueue,r===null?a.updateQueue=new Set([f]):r.add(f),gd(n,f,C)),!1;case 22:return a.flags|=65536,f===Xl?a.flags|=16384:(r=a.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([f])},a.updateQueue=r):(a=r.retryQueue,a===null?r.retryQueue=new Set([f]):a.add(f)),gd(n,f,C)),!1}throw Error(s(435,a.tag))}return gd(n,f,C),Su(),!1}if(vt)return r=ci.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=C,f!==uh&&(n=Error(s(422),{cause:f}),eo(vi(n,a)))):(f!==uh&&(r=Error(s(423),{cause:f}),eo(vi(r,a))),n=n.current.alternate,n.flags|=65536,C&=-C,n.lanes|=C,f=vi(f,a),C=Wh(n.stateNode,f,C),vh(n,C),tn!==4&&(tn=2)),!1;var w=Error(s(520),{cause:f});if(w=vi(w,a),vo===null?vo=[w]:vo.push(w),tn!==4&&(tn=2),r===null)return!0;f=vi(f,a),a=r;do{switch(a.tag){case 3:return a.flags|=65536,n=C&-C,a.lanes|=n,n=Wh(a.stateNode,f,n),vh(a,n),!1;case 1:if(r=a.type,w=a.stateNode,(a.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(zr===null||!zr.has(w))))return a.flags|=65536,C&=-C,a.lanes|=C,C=Lg(C),Og(C,n,a,f),vh(a,C),!1}a=a.return}while(a!==null);return!1}var qh=Error(s(461)),pn=!1;function Dn(n,r,a,f){r.child=n===null?Bp(r,null,a,f):bs(r,n.child,a,f)}function Ng(n,r,a,f,C){a=a.render;var w=r.ref;if("ref"in f){var P={};for(var V in f)V!=="ref"&&(P[V]=f[V])}else P=f;return ps(r),f=xh(n,r,a,P,w,C),V=wh(),n!==null&&!pn?(Dh(n,r,C),lr(n,r,C)):(vt&&V&&oh(r),r.flags|=1,Dn(n,r,f,C),r.child)}function Mg(n,r,a,f,C){if(n===null){var w=a.type;return typeof w=="function"&&!rh(w)&&w.defaultProps===void 0&&a.compare===null?(r.tag=15,r.type=w,Ig(n,r,w,f,C)):(n=Wl(a.type,null,f,r,r.mode,C),n.ref=r.ref,n.return=r,r.child=n)}if(w=n.child,!Jh(n,C)){var P=w.memoizedProps;if(a=a.compare,a=a!==null?a:Qa,a(P,f)&&n.ref===r.ref)return lr(n,r,C)}return r.flags|=1,n=nr(w,f),n.ref=r.ref,n.return=r,r.child=n}function Ig(n,r,a,f,C){if(n!==null){var w=n.memoizedProps;if(Qa(w,f)&&n.ref===r.ref)if(pn=!1,r.pendingProps=f=w,Jh(n,C))(n.flags&131072)!==0&&(pn=!0);else return r.lanes=n.lanes,lr(n,r,C)}return Yh(n,r,a,f,C)}function Bg(n,r,a,f){var C=f.children,w=n!==null?n.memoizedState:null;if(n===null&&r.stateNode===null&&(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),f.mode==="hidden"){if((r.flags&128)!==0){if(w=w!==null?w.baseLanes|a:a,n!==null){for(f=r.child=n.child,C=0;f!==null;)C=C|f.lanes|f.childLanes,f=f.sibling;f=C&~w}else f=0,r.child=null;return Fg(n,r,w,a,f)}if((a&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},n!==null&&Kl(r,w!==null?w.cachePool:null),w!==null?Up(r,w):yh(),Hp(r);else return f=r.lanes=536870912,Fg(n,r,w!==null?w.baseLanes|a:a,a,f)}else w!==null?(Kl(r,w.cachePool),Up(r,w),Fr(),r.memoizedState=null):(n!==null&&Kl(r,null),yh(),Fr());return Dn(n,r,C,a),r.child}function fo(n,r){return n!==null&&n.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function Fg(n,r,a,f,C){var w=mh();return w=w===null?null:{parent:dn._currentValue,pool:w},r.memoizedState={baseLanes:a,cachePool:w},n!==null&&Kl(r,null),yh(),Hp(r),n!==null&&Ys(n,r,f,!0),r.childLanes=C,null}function cu(n,r){return r=du({mode:r.mode,children:r.children},n.mode),r.ref=n.ref,n.child=r,r.return=n,r}function Pg(n,r,a){return bs(r,n.child,null,a),n=cu(r,r.pendingProps),n.flags|=2,hi(r),r.memoizedState=null,n}function fC(n,r,a){var f=r.pendingProps,C=(r.flags&128)!==0;if(r.flags&=-129,n===null){if(vt){if(f.mode==="hidden")return n=cu(r,f),r.lanes=536870912,fo(null,n);if(Th(r),(n=Kt)?(n=Xm(n,Ci),n=n!==null&&n.data==="&"?n:null,n!==null&&(r.memoizedState={dehydrated:n,treeContext:Rr!==null?{id:Hi,overflow:zi}:null,retryLane:536870912,hydrationErrors:null},a=Sp(n),a.return=r,r.child=a,xn=r,Kt=null)):n=null,n===null)throw Lr(r);return r.lanes=536870912,null}return cu(r,f)}var w=n.memoizedState;if(w!==null){var P=w.dehydrated;if(Th(r),C)if(r.flags&256)r.flags&=-257,r=Pg(n,r,a);else if(r.memoizedState!==null)r.child=n.child,r.flags|=128,r=null;else throw Error(s(558));else if(pn||Ys(n,r,a,!1),C=(a&n.childLanes)!==0,pn||C){if(f=zt,f!==null&&(P=wt(f,a),P!==0&&P!==w.retryLane))throw w.retryLane=P,cs(n,P),ei(f,n,P),qh;Su(),r=Pg(n,r,a)}else n=w.treeContext,Kt=Ai(P.nextSibling),xn=r,vt=!0,kr=null,Ci=!1,n!==null&&Tp(r,n),r=cu(r,f),r.flags|=4096;return r}return n=nr(n.child,{mode:f.mode,children:f.children}),n.ref=r.ref,r.child=n,n.return=r,n}function hu(n,r){var a=r.ref;if(a===null)n!==null&&n.ref!==null&&(r.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(s(284));(n===null||n.ref!==a)&&(r.flags|=4194816)}}function Yh(n,r,a,f,C){return ps(r),a=xh(n,r,a,f,void 0,C),f=wh(),n!==null&&!pn?(Dh(n,r,C),lr(n,r,C)):(vt&&f&&oh(r),r.flags|=1,Dn(n,r,a,C),r.child)}function Ug(n,r,a,f,C,w){return ps(r),r.updateQueue=null,a=jp(r,f,a,C),zp(n),f=wh(),n!==null&&!pn?(Dh(n,r,w),lr(n,r,w)):(vt&&f&&oh(r),r.flags|=1,Dn(n,r,a,w),r.child)}function Hg(n,r,a,f,C){if(ps(r),r.stateNode===null){var w=js,P=a.contextType;typeof P=="object"&&P!==null&&(w=wn(P)),w=new a(f,w),r.memoizedState=w.state!==null&&w.state!==void 0?w.state:null,w.updater=$h,r.stateNode=w,w._reactInternals=r,w=r.stateNode,w.props=f,w.state=r.memoizedState,w.refs={},bh(r),P=a.contextType,w.context=typeof P=="object"&&P!==null?wn(P):js,w.state=r.memoizedState,P=a.getDerivedStateFromProps,typeof P=="function"&&(jh(r,a,P,f),w.state=r.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof w.getSnapshotBeforeUpdate=="function"||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(P=w.state,typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount(),P!==w.state&&$h.enqueueReplaceState(w,w.state,null),oo(r,f,w,C),ao(),w.state=r.memoizedState),typeof w.componentDidMount=="function"&&(r.flags|=4194308),f=!0}else if(n===null){w=r.stateNode;var V=r.memoizedProps,ie=vs(a,V);w.props=ie;var de=w.context,Ee=a.contextType;P=js,typeof Ee=="object"&&Ee!==null&&(P=wn(Ee));var Se=a.getDerivedStateFromProps;Ee=typeof Se=="function"||typeof w.getSnapshotBeforeUpdate=="function",V=r.pendingProps!==V,Ee||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(V||de!==P)&&xg(r,w,f,P),Nr=!1;var pe=r.memoizedState;w.state=pe,oo(r,f,w,C),ao(),de=r.memoizedState,V||pe!==de||Nr?(typeof Se=="function"&&(jh(r,a,Se,f),de=r.memoizedState),(ie=Nr||Ag(r,a,ie,f,pe,de,P))?(Ee||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount()),typeof w.componentDidMount=="function"&&(r.flags|=4194308)):(typeof w.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=f,r.memoizedState=de),w.props=f,w.state=de,w.context=P,f=ie):(typeof w.componentDidMount=="function"&&(r.flags|=4194308),f=!1)}else{w=r.stateNode,Eh(n,r),P=r.memoizedProps,Ee=vs(a,P),w.props=Ee,Se=r.pendingProps,pe=w.context,de=a.contextType,ie=js,typeof de=="object"&&de!==null&&(ie=wn(de)),V=a.getDerivedStateFromProps,(de=typeof V=="function"||typeof w.getSnapshotBeforeUpdate=="function")||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(P!==Se||pe!==ie)&&xg(r,w,f,ie),Nr=!1,pe=r.memoizedState,w.state=pe,oo(r,f,w,C),ao();var ge=r.memoizedState;P!==Se||pe!==ge||Nr||n!==null&&n.dependencies!==null&&Yl(n.dependencies)?(typeof V=="function"&&(jh(r,a,V,f),ge=r.memoizedState),(Ee=Nr||Ag(r,a,Ee,f,pe,ge,ie)||n!==null&&n.dependencies!==null&&Yl(n.dependencies))?(de||typeof w.UNSAFE_componentWillUpdate!="function"&&typeof w.componentWillUpdate!="function"||(typeof w.componentWillUpdate=="function"&&w.componentWillUpdate(f,ge,ie),typeof w.UNSAFE_componentWillUpdate=="function"&&w.UNSAFE_componentWillUpdate(f,ge,ie)),typeof w.componentDidUpdate=="function"&&(r.flags|=4),typeof w.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof w.componentDidUpdate!="function"||P===n.memoizedProps&&pe===n.memoizedState||(r.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||P===n.memoizedProps&&pe===n.memoizedState||(r.flags|=1024),r.memoizedProps=f,r.memoizedState=ge),w.props=f,w.state=ge,w.context=ie,f=Ee):(typeof w.componentDidUpdate!="function"||P===n.memoizedProps&&pe===n.memoizedState||(r.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||P===n.memoizedProps&&pe===n.memoizedState||(r.flags|=1024),f=!1)}return w=f,hu(n,r),f=(r.flags&128)!==0,w||f?(w=r.stateNode,a=f&&typeof a.getDerivedStateFromError!="function"?null:w.render(),r.flags|=1,n!==null&&f?(r.child=bs(r,n.child,null,C),r.child=bs(r,null,a,C)):Dn(n,r,a,C),r.memoizedState=w.state,n=r.child):n=lr(n,r,C),n}function zg(n,r,a,f){return ds(),r.flags|=256,Dn(n,r,a,f),r.child}var Gh={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Kh(n){return{baseLanes:n,cachePool:kp()}}function Vh(n,r,a){return n=n!==null?n.childLanes&~a:0,r&&(n|=fi),n}function jg(n,r,a){var f=r.pendingProps,C=!1,w=(r.flags&128)!==0,P;if((P=w)||(P=n!==null&&n.memoizedState===null?!1:(an.current&2)!==0),P&&(C=!0,r.flags&=-129),P=(r.flags&32)!==0,r.flags&=-33,n===null){if(vt){if(C?Br(r):Fr(),(n=Kt)?(n=Xm(n,Ci),n=n!==null&&n.data!=="&"?n:null,n!==null&&(r.memoizedState={dehydrated:n,treeContext:Rr!==null?{id:Hi,overflow:zi}:null,retryLane:536870912,hydrationErrors:null},a=Sp(n),a.return=r,r.child=a,xn=r,Kt=null)):n=null,n===null)throw Lr(r);return Ld(n)?r.lanes=32:r.lanes=536870912,null}var V=f.children;return f=f.fallback,C?(Fr(),C=r.mode,V=du({mode:"hidden",children:V},C),f=hs(f,C,a,null),V.return=r,f.return=r,V.sibling=f,r.child=V,f=r.child,f.memoizedState=Kh(a),f.childLanes=Vh(n,P,a),r.memoizedState=Gh,fo(null,f)):(Br(r),Xh(r,V))}var ie=n.memoizedState;if(ie!==null&&(V=ie.dehydrated,V!==null)){if(w)r.flags&256?(Br(r),r.flags&=-257,r=Qh(n,r,a)):r.memoizedState!==null?(Fr(),r.child=n.child,r.flags|=128,r=null):(Fr(),V=f.fallback,C=r.mode,f=du({mode:"visible",children:f.children},C),V=hs(V,C,a,null),V.flags|=2,f.return=r,V.return=r,f.sibling=V,r.child=f,bs(r,n.child,null,a),f=r.child,f.memoizedState=Kh(a),f.childLanes=Vh(n,P,a),r.memoizedState=Gh,r=fo(null,f));else if(Br(r),Ld(V)){if(P=V.nextSibling&&V.nextSibling.dataset,P)var de=P.dgst;P=de,f=Error(s(419)),f.stack="",f.digest=P,eo({value:f,source:null,stack:null}),r=Qh(n,r,a)}else if(pn||Ys(n,r,a,!1),P=(a&n.childLanes)!==0,pn||P){if(P=zt,P!==null&&(f=wt(P,a),f!==0&&f!==ie.retryLane))throw ie.retryLane=f,cs(n,f),ei(P,n,f),qh;kd(V)||Su(),r=Qh(n,r,a)}else kd(V)?(r.flags|=192,r.child=n.child,r=null):(n=ie.treeContext,Kt=Ai(V.nextSibling),xn=r,vt=!0,kr=null,Ci=!1,n!==null&&Tp(r,n),r=Xh(r,f.children),r.flags|=4096);return r}return C?(Fr(),V=f.fallback,C=r.mode,ie=n.child,de=ie.sibling,f=nr(ie,{mode:"hidden",children:f.children}),f.subtreeFlags=ie.subtreeFlags&65011712,de!==null?V=nr(de,V):(V=hs(V,C,a,null),V.flags|=2),V.return=r,f.return=r,f.sibling=V,r.child=f,fo(null,f),f=r.child,V=n.child.memoizedState,V===null?V=Kh(a):(C=V.cachePool,C!==null?(ie=dn._currentValue,C=C.parent!==ie?{parent:ie,pool:ie}:C):C=kp(),V={baseLanes:V.baseLanes|a,cachePool:C}),f.memoizedState=V,f.childLanes=Vh(n,P,a),r.memoizedState=Gh,fo(n.child,f)):(Br(r),a=n.child,n=a.sibling,a=nr(a,{mode:"visible",children:f.children}),a.return=r,a.sibling=null,n!==null&&(P=r.deletions,P===null?(r.deletions=[n],r.flags|=16):P.push(n)),r.child=a,r.memoizedState=null,a)}function Xh(n,r){return r=du({mode:"visible",children:r},n.mode),r.return=n,n.child=r}function du(n,r){return n=ui(22,n,null,r),n.lanes=0,n}function Qh(n,r,a){return bs(r,n.child,null,a),n=Xh(r,r.pendingProps.children),n.flags|=2,r.memoizedState=null,n}function $g(n,r,a){n.lanes|=r;var f=n.alternate;f!==null&&(f.lanes|=r),dh(n.return,r,a)}function Zh(n,r,a,f,C,w){var P=n.memoizedState;P===null?n.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:f,tail:a,tailMode:C,treeForkCount:w}:(P.isBackwards=r,P.rendering=null,P.renderingStartTime=0,P.last=f,P.tail=a,P.tailMode=C,P.treeForkCount=w)}function Wg(n,r,a){var f=r.pendingProps,C=f.revealOrder,w=f.tail;f=f.children;var P=an.current,V=(P&2)!==0;if(V?(P=P&1|2,r.flags|=128):P&=1,j(an,P),Dn(n,r,f,a),f=vt?Ja:0,!V&&n!==null&&(n.flags&128)!==0)e:for(n=r.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&$g(n,a,r);else if(n.tag===19)$g(n,a,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(C){case"forwards":for(a=r.child,C=null;a!==null;)n=a.alternate,n!==null&&eu(n)===null&&(C=a),a=a.sibling;a=C,a===null?(C=r.child,r.child=null):(C=a.sibling,a.sibling=null),Zh(r,!1,C,a,w,f);break;case"backwards":case"unstable_legacy-backwards":for(a=null,C=r.child,r.child=null;C!==null;){if(n=C.alternate,n!==null&&eu(n)===null){r.child=C;break}n=C.sibling,C.sibling=a,a=C,C=n}Zh(r,!0,a,null,w,f);break;case"together":Zh(r,!1,null,null,void 0,f);break;default:r.memoizedState=null}return r.child}function lr(n,r,a){if(n!==null&&(r.dependencies=n.dependencies),Hr|=r.lanes,(a&r.childLanes)===0)if(n!==null){if(Ys(n,r,a,!1),(a&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,a=nr(n,n.pendingProps),r.child=a,a.return=r;n.sibling!==null;)n=n.sibling,a=a.sibling=nr(n,n.pendingProps),a.return=r;a.sibling=null}return r.child}function Jh(n,r){return(n.lanes&r)!==0?!0:(n=n.dependencies,!!(n!==null&&Yl(n)))}function pC(n,r,a){switch(r.tag){case 3:G(r,r.stateNode.containerInfo),Or(r,dn,n.memoizedState.cache),ds();break;case 27:case 5:ae(r);break;case 4:G(r,r.stateNode.containerInfo);break;case 10:Or(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,Th(r),null;break;case 13:var f=r.memoizedState;if(f!==null)return f.dehydrated!==null?(Br(r),r.flags|=128,null):(a&r.child.childLanes)!==0?jg(n,r,a):(Br(r),n=lr(n,r,a),n!==null?n.sibling:null);Br(r);break;case 19:var C=(n.flags&128)!==0;if(f=(a&r.childLanes)!==0,f||(Ys(n,r,a,!1),f=(a&r.childLanes)!==0),C){if(f)return Wg(n,r,a);r.flags|=128}if(C=r.memoizedState,C!==null&&(C.rendering=null,C.tail=null,C.lastEffect=null),j(an,an.current),f)break;return null;case 22:return r.lanes=0,Bg(n,r,a,r.pendingProps);case 24:Or(r,dn,n.memoizedState.cache)}return lr(n,r,a)}function qg(n,r,a){if(n!==null)if(n.memoizedProps!==r.pendingProps)pn=!0;else{if(!Jh(n,a)&&(r.flags&128)===0)return pn=!1,pC(n,r,a);pn=(n.flags&131072)!==0}else pn=!1,vt&&(r.flags&1048576)!==0&&Cp(r,Ja,r.index);switch(r.lanes=0,r.tag){case 16:e:{var f=r.pendingProps;if(n=ms(r.elementType),r.type=n,typeof n=="function")rh(n)?(f=vs(n,f),r.tag=1,r=Hg(null,r,n,f,a)):(r.tag=0,r=Yh(null,r,n,f,a));else{if(n!=null){var C=n.$$typeof;if(C===x){r.tag=11,r=Ng(null,r,n,f,a);break e}else if(C===O){r.tag=14,r=Mg(null,r,n,f,a);break e}}throw r=W(n)||n,Error(s(306,r,""))}}return r;case 0:return Yh(n,r,r.type,r.pendingProps,a);case 1:return f=r.type,C=vs(f,r.pendingProps),Hg(n,r,f,C,a);case 3:e:{if(G(r,r.stateNode.containerInfo),n===null)throw Error(s(387));f=r.pendingProps;var w=r.memoizedState;C=w.element,Eh(n,r),oo(r,f,null,a);var P=r.memoizedState;if(f=P.cache,Or(r,dn,f),f!==w.cache&&fh(r,[dn],a,!0),ao(),f=P.element,w.isDehydrated)if(w={element:f,isDehydrated:!1,cache:P.cache},r.updateQueue.baseState=w,r.memoizedState=w,r.flags&256){r=zg(n,r,f,a);break e}else if(f!==C){C=vi(Error(s(424)),r),eo(C),r=zg(n,r,f,a);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(Kt=Ai(n.firstChild),xn=r,vt=!0,kr=null,Ci=!0,a=Bp(r,null,f,a),r.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(ds(),f===C){r=lr(n,r,a);break e}Dn(n,r,f,a)}r=r.child}return r;case 26:return hu(n,r),n===null?(a=n_(r.type,null,r.pendingProps,null))?r.memoizedState=a:vt||(a=r.type,n=r.pendingProps,f=Du(ue.current).createElement(a),f[rn]=r,f[Ln]=n,Rn(f,a,n),cn(f),r.stateNode=f):r.memoizedState=n_(r.type,n.memoizedProps,r.pendingProps,n.memoizedState),null;case 27:return ae(r),n===null&&vt&&(f=r.stateNode=Jm(r.type,r.pendingProps,ue.current),xn=r,Ci=!0,C=Kt,qr(r.type)?(Od=C,Kt=Ai(f.firstChild)):Kt=C),Dn(n,r,r.pendingProps.children,a),hu(n,r),n===null&&(r.flags|=4194304),r.child;case 5:return n===null&&vt&&((C=f=Kt)&&(f=WC(f,r.type,r.pendingProps,Ci),f!==null?(r.stateNode=f,xn=r,Kt=Ai(f.firstChild),Ci=!1,C=!0):C=!1),C||Lr(r)),ae(r),C=r.type,w=r.pendingProps,P=n!==null?n.memoizedProps:null,f=w.children,wd(C,w)?f=null:P!==null&&wd(C,P)&&(r.flags|=32),r.memoizedState!==null&&(C=xh(n,r,sC,null,null,a),Do._currentValue=C),hu(n,r),Dn(n,r,f,a),r.child;case 6:return n===null&&vt&&((n=a=Kt)&&(a=qC(a,r.pendingProps,Ci),a!==null?(r.stateNode=a,xn=r,Kt=null,n=!0):n=!1),n||Lr(r)),null;case 13:return jg(n,r,a);case 4:return G(r,r.stateNode.containerInfo),f=r.pendingProps,n===null?r.child=bs(r,null,f,a):Dn(n,r,f,a),r.child;case 11:return Ng(n,r,r.type,r.pendingProps,a);case 7:return Dn(n,r,r.pendingProps,a),r.child;case 8:return Dn(n,r,r.pendingProps.children,a),r.child;case 12:return Dn(n,r,r.pendingProps.children,a),r.child;case 10:return f=r.pendingProps,Or(r,r.type,f.value),Dn(n,r,f.children,a),r.child;case 9:return C=r.type._context,f=r.pendingProps.children,ps(r),C=wn(C),f=f(C),r.flags|=1,Dn(n,r,f,a),r.child;case 14:return Mg(n,r,r.type,r.pendingProps,a);case 15:return Ig(n,r,r.type,r.pendingProps,a);case 19:return Wg(n,r,a);case 31:return fC(n,r,a);case 22:return Bg(n,r,a,r.pendingProps);case 24:return ps(r),f=wn(dn),n===null?(C=mh(),C===null&&(C=zt,w=ph(),C.pooledCache=w,w.refCount++,w!==null&&(C.pooledCacheLanes|=a),C=w),r.memoizedState={parent:f,cache:C},bh(r),Or(r,dn,C)):((n.lanes&a)!==0&&(Eh(n,r),oo(r,null,null,a),ao()),C=n.memoizedState,w=r.memoizedState,C.parent!==f?(C={parent:f,cache:f},r.memoizedState=C,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=C),Or(r,dn,f)):(f=w.cache,Or(r,dn,f),f!==C.cache&&fh(r,[dn],a,!0))),Dn(n,r,r.pendingProps.children,a),r.child;case 29:throw r.pendingProps}throw Error(s(156,r.tag))}function ur(n){n.flags|=4}function ed(n,r,a,f,C){if((r=(n.mode&32)!==0)&&(r=!1),r){if(n.flags|=16777216,(C&335544128)===C)if(n.stateNode.complete)n.flags|=8192;else if(bm())n.flags|=8192;else throw _s=Xl,_h}else n.flags&=-16777217}function Yg(n,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!o_(r))if(bm())n.flags|=8192;else throw _s=Xl,_h}function fu(n,r){r!==null&&(n.flags|=4),n.flags&16384&&(r=n.tag!==22?He():536870912,n.lanes|=r,ra|=r)}function po(n,r){if(!vt)switch(n.tailMode){case"hidden":r=n.tail;for(var a=null;r!==null;)r.alternate!==null&&(a=r),r=r.sibling;a===null?n.tail=null:a.sibling=null;break;case"collapsed":a=n.tail;for(var f=null;a!==null;)a.alternate!==null&&(f=a),a=a.sibling;f===null?r||n.tail===null?n.tail=null:n.tail.sibling=null:f.sibling=null}}function Vt(n){var r=n.alternate!==null&&n.alternate.child===n.child,a=0,f=0;if(r)for(var C=n.child;C!==null;)a|=C.lanes|C.childLanes,f|=C.subtreeFlags&65011712,f|=C.flags&65011712,C.return=n,C=C.sibling;else for(C=n.child;C!==null;)a|=C.lanes|C.childLanes,f|=C.subtreeFlags,f|=C.flags,C.return=n,C=C.sibling;return n.subtreeFlags|=f,n.childLanes=a,r}function gC(n,r,a){var f=r.pendingProps;switch(lh(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Vt(r),null;case 1:return Vt(r),null;case 3:return a=r.stateNode,f=null,n!==null&&(f=n.memoizedState.cache),r.memoizedState.cache!==f&&(r.flags|=2048),sr(dn),le(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(n===null||n.child===null)&&(qs(r)?ur(r):n===null||n.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,ch())),Vt(r),null;case 26:var C=r.type,w=r.memoizedState;return n===null?(ur(r),w!==null?(Vt(r),Yg(r,w)):(Vt(r),ed(r,C,null,f,a))):w?w!==n.memoizedState?(ur(r),Vt(r),Yg(r,w)):(Vt(r),r.flags&=-16777217):(n=n.memoizedProps,n!==f&&ur(r),Vt(r),ed(r,C,n,f,a)),null;case 27:if(xe(r),a=ue.current,C=r.type,n!==null&&r.stateNode!=null)n.memoizedProps!==f&&ur(r);else{if(!f){if(r.stateNode===null)throw Error(s(166));return Vt(r),null}n=re.current,qs(r)?Ap(r):(n=Jm(C,f,a),r.stateNode=n,ur(r))}return Vt(r),null;case 5:if(xe(r),C=r.type,n!==null&&r.stateNode!=null)n.memoizedProps!==f&&ur(r);else{if(!f){if(r.stateNode===null)throw Error(s(166));return Vt(r),null}if(w=re.current,qs(r))Ap(r);else{var P=Du(ue.current);switch(w){case 1:w=P.createElementNS("http://www.w3.org/2000/svg",C);break;case 2:w=P.createElementNS("http://www.w3.org/1998/Math/MathML",C);break;default:switch(C){case"svg":w=P.createElementNS("http://www.w3.org/2000/svg",C);break;case"math":w=P.createElementNS("http://www.w3.org/1998/Math/MathML",C);break;case"script":w=P.createElement("div"),w.innerHTML="<script><\/script>",w=w.removeChild(w.firstChild);break;case"select":w=typeof f.is=="string"?P.createElement("select",{is:f.is}):P.createElement("select"),f.multiple?w.multiple=!0:f.size&&(w.size=f.size);break;default:w=typeof f.is=="string"?P.createElement(C,{is:f.is}):P.createElement(C)}}w[rn]=r,w[Ln]=f;e:for(P=r.child;P!==null;){if(P.tag===5||P.tag===6)w.appendChild(P.stateNode);else if(P.tag!==4&&P.tag!==27&&P.child!==null){P.child.return=P,P=P.child;continue}if(P===r)break e;for(;P.sibling===null;){if(P.return===null||P.return===r)break e;P=P.return}P.sibling.return=P.return,P=P.sibling}r.stateNode=w;e:switch(Rn(w,C,f),C){case"button":case"input":case"select":case"textarea":f=!!f.autoFocus;break e;case"img":f=!0;break e;default:f=!1}f&&ur(r)}}return Vt(r),ed(r,r.type,n===null?null:n.memoizedProps,r.pendingProps,a),null;case 6:if(n&&r.stateNode!=null)n.memoizedProps!==f&&ur(r);else{if(typeof f!="string"&&r.stateNode===null)throw Error(s(166));if(n=ue.current,qs(r)){if(n=r.stateNode,a=r.memoizedProps,f=null,C=xn,C!==null)switch(C.tag){case 27:case 5:f=C.memoizedProps}n[rn]=r,n=!!(n.nodeValue===a||f!==null&&f.suppressHydrationWarning===!0||jm(n.nodeValue,a)),n||Lr(r,!0)}else n=Du(n).createTextNode(f),n[rn]=r,r.stateNode=n}return Vt(r),null;case 31:if(a=r.memoizedState,n===null||n.memoizedState!==null){if(f=qs(r),a!==null){if(n===null){if(!f)throw Error(s(318));if(n=r.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(s(557));n[rn]=r}else ds(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Vt(r),n=!1}else a=ch(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=a),n=!0;if(!n)return r.flags&256?(hi(r),r):(hi(r),null);if((r.flags&128)!==0)throw Error(s(558))}return Vt(r),null;case 13:if(f=r.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(C=qs(r),f!==null&&f.dehydrated!==null){if(n===null){if(!C)throw Error(s(318));if(C=r.memoizedState,C=C!==null?C.dehydrated:null,!C)throw Error(s(317));C[rn]=r}else ds(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Vt(r),C=!1}else C=ch(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=C),C=!0;if(!C)return r.flags&256?(hi(r),r):(hi(r),null)}return hi(r),(r.flags&128)!==0?(r.lanes=a,r):(a=f!==null,n=n!==null&&n.memoizedState!==null,a&&(f=r.child,C=null,f.alternate!==null&&f.alternate.memoizedState!==null&&f.alternate.memoizedState.cachePool!==null&&(C=f.alternate.memoizedState.cachePool.pool),w=null,f.memoizedState!==null&&f.memoizedState.cachePool!==null&&(w=f.memoizedState.cachePool.pool),w!==C&&(f.flags|=2048)),a!==n&&a&&(r.child.flags|=8192),fu(r,r.updateQueue),Vt(r),null);case 4:return le(),n===null&&yd(r.stateNode.containerInfo),Vt(r),null;case 10:return sr(r.type),Vt(r),null;case 19:if($(an),f=r.memoizedState,f===null)return Vt(r),null;if(C=(r.flags&128)!==0,w=f.rendering,w===null)if(C)po(f,!1);else{if(tn!==0||n!==null&&(n.flags&128)!==0)for(n=r.child;n!==null;){if(w=eu(n),w!==null){for(r.flags|=128,po(f,!1),n=w.updateQueue,r.updateQueue=n,fu(r,n),r.subtreeFlags=0,n=a,a=r.child;a!==null;)vp(a,n),a=a.sibling;return j(an,an.current&1|2),vt&&ir(r,f.treeForkCount),r.child}n=n.sibling}f.tail!==null&&$e()>bu&&(r.flags|=128,C=!0,po(f,!1),r.lanes=4194304)}else{if(!C)if(n=eu(w),n!==null){if(r.flags|=128,C=!0,n=n.updateQueue,r.updateQueue=n,fu(r,n),po(f,!0),f.tail===null&&f.tailMode==="hidden"&&!w.alternate&&!vt)return Vt(r),null}else 2*$e()-f.renderingStartTime>bu&&a!==536870912&&(r.flags|=128,C=!0,po(f,!1),r.lanes=4194304);f.isBackwards?(w.sibling=r.child,r.child=w):(n=f.last,n!==null?n.sibling=w:r.child=w,f.last=w)}return f.tail!==null?(n=f.tail,f.rendering=n,f.tail=n.sibling,f.renderingStartTime=$e(),n.sibling=null,a=an.current,j(an,C?a&1|2:a&1),vt&&ir(r,f.treeForkCount),n):(Vt(r),null);case 22:case 23:return hi(r),Ch(),f=r.memoizedState!==null,n!==null?n.memoizedState!==null!==f&&(r.flags|=8192):f&&(r.flags|=8192),f?(a&536870912)!==0&&(r.flags&128)===0&&(Vt(r),r.subtreeFlags&6&&(r.flags|=8192)):Vt(r),a=r.updateQueue,a!==null&&fu(r,a.retryQueue),a=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(a=n.memoizedState.cachePool.pool),f=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(f=r.memoizedState.cachePool.pool),f!==a&&(r.flags|=2048),n!==null&&$(gs),null;case 24:return a=null,n!==null&&(a=n.memoizedState.cache),r.memoizedState.cache!==a&&(r.flags|=2048),sr(dn),Vt(r),null;case 25:return null;case 30:return null}throw Error(s(156,r.tag))}function mC(n,r){switch(lh(r),r.tag){case 1:return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 3:return sr(dn),le(),n=r.flags,(n&65536)!==0&&(n&128)===0?(r.flags=n&-65537|128,r):null;case 26:case 27:case 5:return xe(r),null;case 31:if(r.memoizedState!==null){if(hi(r),r.alternate===null)throw Error(s(340));ds()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 13:if(hi(r),n=r.memoizedState,n!==null&&n.dehydrated!==null){if(r.alternate===null)throw Error(s(340));ds()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 19:return $(an),null;case 4:return le(),null;case 10:return sr(r.type),null;case 22:case 23:return hi(r),Ch(),n!==null&&$(gs),n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 24:return sr(dn),null;case 25:return null;default:return null}}function Gg(n,r){switch(lh(r),r.tag){case 3:sr(dn),le();break;case 26:case 27:case 5:xe(r);break;case 4:le();break;case 31:r.memoizedState!==null&&hi(r);break;case 13:hi(r);break;case 19:$(an);break;case 10:sr(r.type);break;case 22:case 23:hi(r),Ch(),n!==null&&$(gs);break;case 24:sr(dn)}}function go(n,r){try{var a=r.updateQueue,f=a!==null?a.lastEffect:null;if(f!==null){var C=f.next;a=C;do{if((a.tag&n)===n){f=void 0;var w=a.create,P=a.inst;f=w(),P.destroy=f}a=a.next}while(a!==C)}}catch(V){It(r,r.return,V)}}function Pr(n,r,a){try{var f=r.updateQueue,C=f!==null?f.lastEffect:null;if(C!==null){var w=C.next;f=w;do{if((f.tag&n)===n){var P=f.inst,V=P.destroy;if(V!==void 0){P.destroy=void 0,C=r;var ie=a,de=V;try{de()}catch(Ee){It(C,ie,Ee)}}}f=f.next}while(f!==w)}}catch(Ee){It(r,r.return,Ee)}}function Kg(n){var r=n.updateQueue;if(r!==null){var a=n.stateNode;try{Pp(r,a)}catch(f){It(n,n.return,f)}}}function Vg(n,r,a){a.props=vs(n.type,n.memoizedProps),a.state=n.memoizedState;try{a.componentWillUnmount()}catch(f){It(n,r,f)}}function mo(n,r){try{var a=n.ref;if(a!==null){switch(n.tag){case 26:case 27:case 5:var f=n.stateNode;break;case 30:f=n.stateNode;break;default:f=n.stateNode}typeof a=="function"?n.refCleanup=a(f):a.current=f}}catch(C){It(n,r,C)}}function ji(n,r){var a=n.ref,f=n.refCleanup;if(a!==null)if(typeof f=="function")try{f()}catch(C){It(n,r,C)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(C){It(n,r,C)}else a.current=null}function Xg(n){var r=n.type,a=n.memoizedProps,f=n.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":a.autoFocus&&f.focus();break e;case"img":a.src?f.src=a.src:a.srcSet&&(f.srcset=a.srcSet)}}catch(C){It(n,n.return,C)}}function td(n,r,a){try{var f=n.stateNode;PC(f,n.type,a,r),f[Ln]=r}catch(C){It(n,n.return,C)}}function Qg(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&qr(n.type)||n.tag===4}function nd(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||Qg(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 id(n,r,a){var f=n.tag;if(f===5||f===6)n=n.stateNode,r?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(n,r):(r=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,r.appendChild(n),a=a._reactRootContainer,a!=null||r.onclick!==null||(r.onclick=ke));else if(f!==4&&(f===27&&qr(n.type)&&(a=n.stateNode,r=null),n=n.child,n!==null))for(id(n,r,a),n=n.sibling;n!==null;)id(n,r,a),n=n.sibling}function pu(n,r,a){var f=n.tag;if(f===5||f===6)n=n.stateNode,r?a.insertBefore(n,r):a.appendChild(n);else if(f!==4&&(f===27&&qr(n.type)&&(a=n.stateNode),n=n.child,n!==null))for(pu(n,r,a),n=n.sibling;n!==null;)pu(n,r,a),n=n.sibling}function Zg(n){var r=n.stateNode,a=n.memoizedProps;try{for(var f=n.type,C=r.attributes;C.length;)r.removeAttributeNode(C[0]);Rn(r,f,a),r[rn]=n,r[Ln]=a}catch(w){It(n,n.return,w)}}var cr=!1,gn=!1,rd=!1,Jg=typeof WeakSet=="function"?WeakSet:Set,En=null;function _C(n,r){if(n=n.containerInfo,Ad=Iu,n=hp(n),Qc(n)){if("selectionStart"in n)var a={start:n.selectionStart,end:n.selectionEnd};else e:{a=(a=n.ownerDocument)&&a.defaultView||window;var f=a.getSelection&&a.getSelection();if(f&&f.rangeCount!==0){a=f.anchorNode;var C=f.anchorOffset,w=f.focusNode;f=f.focusOffset;try{a.nodeType,w.nodeType}catch{a=null;break e}var P=0,V=-1,ie=-1,de=0,Ee=0,Se=n,pe=null;t:for(;;){for(var ge;Se!==a||C!==0&&Se.nodeType!==3||(V=P+C),Se!==w||f!==0&&Se.nodeType!==3||(ie=P+f),Se.nodeType===3&&(P+=Se.nodeValue.length),(ge=Se.firstChild)!==null;)pe=Se,Se=ge;for(;;){if(Se===n)break t;if(pe===a&&++de===C&&(V=P),pe===w&&++Ee===f&&(ie=P),(ge=Se.nextSibling)!==null)break;Se=pe,pe=Se.parentNode}Se=ge}a=V===-1||ie===-1?null:{start:V,end:ie}}else a=null}a=a||{start:0,end:0}}else a=null;for(xd={focusedElem:n,selectionRange:a},Iu=!1,En=r;En!==null;)if(r=En,n=r.child,(r.subtreeFlags&1028)!==0&&n!==null)n.return=r,En=n;else for(;En!==null;){switch(r=En,w=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(a=0;a<n.length;a++)C=n[a],C.ref.impl=C.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&w!==null){n=void 0,a=r,C=w.memoizedProps,w=w.memoizedState,f=a.stateNode;try{var Fe=vs(a.type,C);n=f.getSnapshotBeforeUpdate(Fe,w),f.__reactInternalSnapshotBeforeUpdate=n}catch(Je){It(a,a.return,Je)}}break;case 3:if((n&1024)!==0){if(n=r.stateNode.containerInfo,a=n.nodeType,a===9)Rd(n);else if(a===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":Rd(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,En=n;break}En=r.return}}function em(n,r,a){var f=a.flags;switch(a.tag){case 0:case 11:case 15:dr(n,a),f&4&&go(5,a);break;case 1:if(dr(n,a),f&4)if(n=a.stateNode,r===null)try{n.componentDidMount()}catch(P){It(a,a.return,P)}else{var C=vs(a.type,r.memoizedProps);r=r.memoizedState;try{n.componentDidUpdate(C,r,n.__reactInternalSnapshotBeforeUpdate)}catch(P){It(a,a.return,P)}}f&64&&Kg(a),f&512&&mo(a,a.return);break;case 3:if(dr(n,a),f&64&&(n=a.updateQueue,n!==null)){if(r=null,a.child!==null)switch(a.child.tag){case 27:case 5:r=a.child.stateNode;break;case 1:r=a.child.stateNode}try{Pp(n,r)}catch(P){It(a,a.return,P)}}break;case 27:r===null&&f&4&&Zg(a);case 26:case 5:dr(n,a),r===null&&f&4&&Xg(a),f&512&&mo(a,a.return);break;case 12:dr(n,a);break;case 31:dr(n,a),f&4&&im(n,a);break;case 13:dr(n,a),f&4&&rm(n,a),f&64&&(n=a.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(a=xC.bind(null,a),YC(n,a))));break;case 22:if(f=a.memoizedState!==null||cr,!f){r=r!==null&&r.memoizedState!==null||gn,C=cr;var w=gn;cr=f,(gn=r)&&!w?fr(n,a,(a.subtreeFlags&8772)!==0):dr(n,a),cr=C,gn=w}break;case 30:break;default:dr(n,a)}}function tm(n){var r=n.alternate;r!==null&&(n.alternate=null,tm(r)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(r=n.stateNode,r!==null&&Ua(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 Xt=null,Xn=!1;function hr(n,r,a){for(a=a.child;a!==null;)nm(n,r,a),a=a.sibling}function nm(n,r,a){if(Lt&&typeof Lt.onCommitFiberUnmount=="function")try{Lt.onCommitFiberUnmount(Yt,a)}catch{}switch(a.tag){case 26:gn||ji(a,r),hr(n,r,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:gn||ji(a,r);var f=Xt,C=Xn;qr(a.type)&&(Xt=a.stateNode,Xn=!1),hr(n,r,a),Ao(a.stateNode),Xt=f,Xn=C;break;case 5:gn||ji(a,r);case 6:if(f=Xt,C=Xn,Xt=null,hr(n,r,a),Xt=f,Xn=C,Xt!==null)if(Xn)try{(Xt.nodeType===9?Xt.body:Xt.nodeName==="HTML"?Xt.ownerDocument.body:Xt).removeChild(a.stateNode)}catch(w){It(a,r,w)}else try{Xt.removeChild(a.stateNode)}catch(w){It(a,r,w)}break;case 18:Xt!==null&&(Xn?(n=Xt,Km(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,a.stateNode),da(n)):Km(Xt,a.stateNode));break;case 4:f=Xt,C=Xn,Xt=a.stateNode.containerInfo,Xn=!0,hr(n,r,a),Xt=f,Xn=C;break;case 0:case 11:case 14:case 15:Pr(2,a,r),gn||Pr(4,a,r),hr(n,r,a);break;case 1:gn||(ji(a,r),f=a.stateNode,typeof f.componentWillUnmount=="function"&&Vg(a,r,f)),hr(n,r,a);break;case 21:hr(n,r,a);break;case 22:gn=(f=gn)||a.memoizedState!==null,hr(n,r,a),gn=f;break;default:hr(n,r,a)}}function im(n,r){if(r.memoizedState===null&&(n=r.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{da(n)}catch(a){It(r,r.return,a)}}}function rm(n,r){if(r.memoizedState===null&&(n=r.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{da(n)}catch(a){It(r,r.return,a)}}function bC(n){switch(n.tag){case 31:case 13:case 19:var r=n.stateNode;return r===null&&(r=n.stateNode=new Jg),r;case 22:return n=n.stateNode,r=n._retryCache,r===null&&(r=n._retryCache=new Jg),r;default:throw Error(s(435,n.tag))}}function gu(n,r){var a=bC(n);r.forEach(function(f){if(!a.has(f)){a.add(f);var C=wC.bind(null,n,f);f.then(C,C)}})}function Qn(n,r){var a=r.deletions;if(a!==null)for(var f=0;f<a.length;f++){var C=a[f],w=n,P=r,V=P;e:for(;V!==null;){switch(V.tag){case 27:if(qr(V.type)){Xt=V.stateNode,Xn=!1;break e}break;case 5:Xt=V.stateNode,Xn=!1;break e;case 3:case 4:Xt=V.stateNode.containerInfo,Xn=!0;break e}V=V.return}if(Xt===null)throw Error(s(160));nm(w,P,C),Xt=null,Xn=!1,w=C.alternate,w!==null&&(w.return=null),C.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)sm(r,n),r=r.sibling}var Mi=null;function sm(n,r){var a=n.alternate,f=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:Qn(r,n),Zn(n),f&4&&(Pr(3,n,n.return),go(3,n),Pr(5,n,n.return));break;case 1:Qn(r,n),Zn(n),f&512&&(gn||a===null||ji(a,a.return)),f&64&&cr&&(n=n.updateQueue,n!==null&&(f=n.callbacks,f!==null&&(a=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=a===null?f:a.concat(f))));break;case 26:var C=Mi;if(Qn(r,n),Zn(n),f&512&&(gn||a===null||ji(a,a.return)),f&4){var w=a!==null?a.memoizedState:null;if(f=n.memoizedState,a===null)if(f===null)if(n.stateNode===null){e:{f=n.type,a=n.memoizedProps,C=C.ownerDocument||C;t:switch(f){case"title":w=C.getElementsByTagName("title")[0],(!w||w[rs]||w[rn]||w.namespaceURI==="http://www.w3.org/2000/svg"||w.hasAttribute("itemprop"))&&(w=C.createElement(f),C.head.insertBefore(w,C.querySelector("head > title"))),Rn(w,f,a),w[rn]=n,cn(w),f=w;break e;case"link":var P=s_("link","href",C).get(f+(a.href||""));if(P){for(var V=0;V<P.length;V++)if(w=P[V],w.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&w.getAttribute("rel")===(a.rel==null?null:a.rel)&&w.getAttribute("title")===(a.title==null?null:a.title)&&w.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){P.splice(V,1);break t}}w=C.createElement(f),Rn(w,f,a),C.head.appendChild(w);break;case"meta":if(P=s_("meta","content",C).get(f+(a.content||""))){for(V=0;V<P.length;V++)if(w=P[V],w.getAttribute("content")===(a.content==null?null:""+a.content)&&w.getAttribute("name")===(a.name==null?null:a.name)&&w.getAttribute("property")===(a.property==null?null:a.property)&&w.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&w.getAttribute("charset")===(a.charSet==null?null:a.charSet)){P.splice(V,1);break t}}w=C.createElement(f),Rn(w,f,a),C.head.appendChild(w);break;default:throw Error(s(468,f))}w[rn]=n,cn(w),f=w}n.stateNode=f}else a_(C,n.type,n.stateNode);else n.stateNode=r_(C,f,n.memoizedProps);else w!==f?(w===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):w.count--,f===null?a_(C,n.type,n.stateNode):r_(C,f,n.memoizedProps)):f===null&&n.stateNode!==null&&td(n,n.memoizedProps,a.memoizedProps)}break;case 27:Qn(r,n),Zn(n),f&512&&(gn||a===null||ji(a,a.return)),a!==null&&f&4&&td(n,n.memoizedProps,a.memoizedProps);break;case 5:if(Qn(r,n),Zn(n),f&512&&(gn||a===null||ji(a,a.return)),n.flags&32){C=n.stateNode;try{et(C,"")}catch(Fe){It(n,n.return,Fe)}}f&4&&n.stateNode!=null&&(C=n.memoizedProps,td(n,C,a!==null?a.memoizedProps:C)),f&1024&&(rd=!0);break;case 6:if(Qn(r,n),Zn(n),f&4){if(n.stateNode===null)throw Error(s(162));f=n.memoizedProps,a=n.stateNode;try{a.nodeValue=f}catch(Fe){It(n,n.return,Fe)}}break;case 3:if(Lu=null,C=Mi,Mi=Ru(r.containerInfo),Qn(r,n),Mi=C,Zn(n),f&4&&a!==null&&a.memoizedState.isDehydrated)try{da(r.containerInfo)}catch(Fe){It(n,n.return,Fe)}rd&&(rd=!1,am(n));break;case 4:f=Mi,Mi=Ru(n.stateNode.containerInfo),Qn(r,n),Zn(n),Mi=f;break;case 12:Qn(r,n),Zn(n);break;case 31:Qn(r,n),Zn(n),f&4&&(f=n.updateQueue,f!==null&&(n.updateQueue=null,gu(n,f)));break;case 13:Qn(r,n),Zn(n),n.child.flags&8192&&n.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(_u=$e()),f&4&&(f=n.updateQueue,f!==null&&(n.updateQueue=null,gu(n,f)));break;case 22:C=n.memoizedState!==null;var ie=a!==null&&a.memoizedState!==null,de=cr,Ee=gn;if(cr=de||C,gn=Ee||ie,Qn(r,n),gn=Ee,cr=de,Zn(n),f&8192)e:for(r=n.stateNode,r._visibility=C?r._visibility&-2:r._visibility|1,C&&(a===null||ie||cr||gn||Ss(n)),a=null,r=n;;){if(r.tag===5||r.tag===26){if(a===null){ie=a=r;try{if(w=ie.stateNode,C)P=w.style,typeof P.setProperty=="function"?P.setProperty("display","none","important"):P.display="none";else{V=ie.stateNode;var Se=ie.memoizedProps.style,pe=Se!=null&&Se.hasOwnProperty("display")?Se.display:null;V.style.display=pe==null||typeof pe=="boolean"?"":(""+pe).trim()}}catch(Fe){It(ie,ie.return,Fe)}}}else if(r.tag===6){if(a===null){ie=r;try{ie.stateNode.nodeValue=C?"":ie.memoizedProps}catch(Fe){It(ie,ie.return,Fe)}}}else if(r.tag===18){if(a===null){ie=r;try{var ge=ie.stateNode;C?Vm(ge,!0):Vm(ie.stateNode,!1)}catch(Fe){It(ie,ie.return,Fe)}}}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;a===r&&(a=null),r=r.return}a===r&&(a=null),r.sibling.return=r.return,r=r.sibling}f&4&&(f=n.updateQueue,f!==null&&(a=f.retryQueue,a!==null&&(f.retryQueue=null,gu(n,a))));break;case 19:Qn(r,n),Zn(n),f&4&&(f=n.updateQueue,f!==null&&(n.updateQueue=null,gu(n,f)));break;case 30:break;case 21:break;default:Qn(r,n),Zn(n)}}function Zn(n){var r=n.flags;if(r&2){try{for(var a,f=n.return;f!==null;){if(Qg(f)){a=f;break}f=f.return}if(a==null)throw Error(s(160));switch(a.tag){case 27:var C=a.stateNode,w=nd(n);pu(n,w,C);break;case 5:var P=a.stateNode;a.flags&32&&(et(P,""),a.flags&=-33);var V=nd(n);pu(n,V,P);break;case 3:case 4:var ie=a.stateNode.containerInfo,de=nd(n);id(n,de,ie);break;default:throw Error(s(161))}}catch(Ee){It(n,n.return,Ee)}n.flags&=-3}r&4096&&(n.flags&=-4097)}function am(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var r=n;am(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),n=n.sibling}}function dr(n,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)em(n,r.alternate,r),r=r.sibling}function Ss(n){for(n=n.child;n!==null;){var r=n;switch(r.tag){case 0:case 11:case 14:case 15:Pr(4,r,r.return),Ss(r);break;case 1:ji(r,r.return);var a=r.stateNode;typeof a.componentWillUnmount=="function"&&Vg(r,r.return,a),Ss(r);break;case 27:Ao(r.stateNode);case 26:case 5:ji(r,r.return),Ss(r);break;case 22:r.memoizedState===null&&Ss(r);break;case 30:Ss(r);break;default:Ss(r)}n=n.sibling}}function fr(n,r,a){for(a=a&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var f=r.alternate,C=n,w=r,P=w.flags;switch(w.tag){case 0:case 11:case 15:fr(C,w,a),go(4,w);break;case 1:if(fr(C,w,a),f=w,C=f.stateNode,typeof C.componentDidMount=="function")try{C.componentDidMount()}catch(de){It(f,f.return,de)}if(f=w,C=f.updateQueue,C!==null){var V=f.stateNode;try{var ie=C.shared.hiddenCallbacks;if(ie!==null)for(C.shared.hiddenCallbacks=null,C=0;C<ie.length;C++)Fp(ie[C],V)}catch(de){It(f,f.return,de)}}a&&P&64&&Kg(w),mo(w,w.return);break;case 27:Zg(w);case 26:case 5:fr(C,w,a),a&&f===null&&P&4&&Xg(w),mo(w,w.return);break;case 12:fr(C,w,a);break;case 31:fr(C,w,a),a&&P&4&&im(C,w);break;case 13:fr(C,w,a),a&&P&4&&rm(C,w);break;case 22:w.memoizedState===null&&fr(C,w,a),mo(w,w.return);break;case 30:break;default:fr(C,w,a)}r=r.sibling}}function sd(n,r){var a=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(a=n.memoizedState.cachePool.pool),n=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(n=r.memoizedState.cachePool.pool),n!==a&&(n!=null&&n.refCount++,a!=null&&to(a))}function ad(n,r){n=null,r.alternate!==null&&(n=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==n&&(r.refCount++,n!=null&&to(n))}function Ii(n,r,a,f){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)om(n,r,a,f),r=r.sibling}function om(n,r,a,f){var C=r.flags;switch(r.tag){case 0:case 11:case 15:Ii(n,r,a,f),C&2048&&go(9,r);break;case 1:Ii(n,r,a,f);break;case 3:Ii(n,r,a,f),C&2048&&(n=null,r.alternate!==null&&(n=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==n&&(r.refCount++,n!=null&&to(n)));break;case 12:if(C&2048){Ii(n,r,a,f),n=r.stateNode;try{var w=r.memoizedProps,P=w.id,V=w.onPostCommit;typeof V=="function"&&V(P,r.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(ie){It(r,r.return,ie)}}else Ii(n,r,a,f);break;case 31:Ii(n,r,a,f);break;case 13:Ii(n,r,a,f);break;case 23:break;case 22:w=r.stateNode,P=r.alternate,r.memoizedState!==null?w._visibility&2?Ii(n,r,a,f):_o(n,r):w._visibility&2?Ii(n,r,a,f):(w._visibility|=2,ta(n,r,a,f,(r.subtreeFlags&10256)!==0||!1)),C&2048&&sd(P,r);break;case 24:Ii(n,r,a,f),C&2048&&ad(r.alternate,r);break;default:Ii(n,r,a,f)}}function ta(n,r,a,f,C){for(C=C&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var w=n,P=r,V=a,ie=f,de=P.flags;switch(P.tag){case 0:case 11:case 15:ta(w,P,V,ie,C),go(8,P);break;case 23:break;case 22:var Ee=P.stateNode;P.memoizedState!==null?Ee._visibility&2?ta(w,P,V,ie,C):_o(w,P):(Ee._visibility|=2,ta(w,P,V,ie,C)),C&&de&2048&&sd(P.alternate,P);break;case 24:ta(w,P,V,ie,C),C&&de&2048&&ad(P.alternate,P);break;default:ta(w,P,V,ie,C)}r=r.sibling}}function _o(n,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var a=n,f=r,C=f.flags;switch(f.tag){case 22:_o(a,f),C&2048&&sd(f.alternate,f);break;case 24:_o(a,f),C&2048&&ad(f.alternate,f);break;default:_o(a,f)}r=r.sibling}}var bo=8192;function na(n,r,a){if(n.subtreeFlags&bo)for(n=n.child;n!==null;)lm(n,r,a),n=n.sibling}function lm(n,r,a){switch(n.tag){case 26:na(n,r,a),n.flags&bo&&n.memoizedState!==null&&r2(a,Mi,n.memoizedState,n.memoizedProps);break;case 5:na(n,r,a);break;case 3:case 4:var f=Mi;Mi=Ru(n.stateNode.containerInfo),na(n,r,a),Mi=f;break;case 22:n.memoizedState===null&&(f=n.alternate,f!==null&&f.memoizedState!==null?(f=bo,bo=16777216,na(n,r,a),bo=f):na(n,r,a));break;default:na(n,r,a)}}function um(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 Eo(n){var r=n.deletions;if((n.flags&16)!==0){if(r!==null)for(var a=0;a<r.length;a++){var f=r[a];En=f,hm(f,n)}um(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)cm(n),n=n.sibling}function cm(n){switch(n.tag){case 0:case 11:case 15:Eo(n),n.flags&2048&&Pr(9,n,n.return);break;case 3:Eo(n);break;case 12:Eo(n);break;case 22:var r=n.stateNode;n.memoizedState!==null&&r._visibility&2&&(n.return===null||n.return.tag!==13)?(r._visibility&=-3,mu(n)):Eo(n);break;default:Eo(n)}}function mu(n){var r=n.deletions;if((n.flags&16)!==0){if(r!==null)for(var a=0;a<r.length;a++){var f=r[a];En=f,hm(f,n)}um(n)}for(n=n.child;n!==null;){switch(r=n,r.tag){case 0:case 11:case 15:Pr(8,r,r.return),mu(r);break;case 22:a=r.stateNode,a._visibility&2&&(a._visibility&=-3,mu(r));break;default:mu(r)}n=n.sibling}}function hm(n,r){for(;En!==null;){var a=En;switch(a.tag){case 0:case 11:case 15:Pr(8,a,r);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var f=a.memoizedState.cachePool.pool;f!=null&&f.refCount++}break;case 24:to(a.memoizedState.cache)}if(f=a.child,f!==null)f.return=a,En=f;else e:for(a=n;En!==null;){f=En;var C=f.sibling,w=f.return;if(tm(f),f===a){En=null;break e}if(C!==null){C.return=w,En=C;break e}En=w}}}var EC={getCacheForType:function(n){var r=wn(dn),a=r.data.get(n);return a===void 0&&(a=n(),r.data.set(n,a)),a},cacheSignal:function(){return wn(dn).controller.signal}},vC=typeof WeakMap=="function"?WeakMap:Map,Dt=0,zt=null,ht=null,mt=0,Mt=0,di=null,Ur=!1,ia=!1,od=!1,pr=0,tn=0,Hr=0,ys=0,ld=0,fi=0,ra=0,vo=null,Jn=null,ud=!1,_u=0,dm=0,bu=1/0,Eu=null,zr=null,_n=0,jr=null,sa=null,gr=0,cd=0,hd=null,fm=null,So=0,dd=null;function pi(){return(Dt&2)!==0&&mt!==0?mt&-mt:Y.T!==null?bd():Pn()}function pm(){if(fi===0)if((mt&536870912)===0||vt){var n=Oi;Oi<<=1,(Oi&3932160)===0&&(Oi=262144),fi=n}else fi=536870912;return n=ci.current,n!==null&&(n.flags|=32),fi}function ei(n,r,a){(n===zt&&(Mt===2||Mt===9)||n.cancelPendingCommit!==null)&&(aa(n,0),$r(n,mt,fi,!1)),yt(n,a),((Dt&2)===0||n!==zt)&&(n===zt&&((Dt&2)===0&&(ys|=a),tn===4&&$r(n,mt,fi,!1)),$i(n))}function gm(n,r,a){if((Dt&6)!==0)throw Error(s(327));var f=!a&&(r&127)===0&&(r&n.expiredLanes)===0||be(n,r),C=f?CC(n,r):pd(n,r,!0),w=f;do{if(C===0){ia&&!f&&$r(n,r,0,!1);break}else{if(a=n.current.alternate,w&&!SC(a)){C=pd(n,r,!1),w=!1;continue}if(C===2){if(w=r,n.errorRecoveryDisabledLanes&w)var P=0;else P=n.pendingLanes&-536870913,P=P!==0?P:P&536870912?536870912:0;if(P!==0){r=P;e:{var V=n;C=vo;var ie=V.current.memoizedState.isDehydrated;if(ie&&(aa(V,P).flags|=256),P=pd(V,P,!1),P!==2){if(od&&!ie){V.errorRecoveryDisabledLanes|=w,ys|=w,C=4;break e}w=Jn,Jn=C,w!==null&&(Jn===null?Jn=w:Jn.push.apply(Jn,w))}C=P}if(w=!1,C!==2)continue}}if(C===1){aa(n,0),$r(n,r,0,!0);break}e:{switch(f=n,w=C,w){case 0:case 1:throw Error(s(345));case 4:if((r&4194048)!==r)break;case 6:$r(f,r,fi,!Ur);break e;case 2:Jn=null;break;case 3:case 5:break;default:throw Error(s(329))}if((r&62914560)===r&&(C=_u+300-$e(),10<C)){if($r(f,r,fi,!Ur),ne(f,0,!0)!==0)break e;gr=r,f.timeoutHandle=Ym(mm.bind(null,f,a,Jn,Eu,ud,r,fi,ys,ra,Ur,w,"Throttled",-0,0),C);break e}mm(f,a,Jn,Eu,ud,r,fi,ys,ra,Ur,w,null,-0,0)}}break}while(!0);$i(n)}function mm(n,r,a,f,C,w,P,V,ie,de,Ee,Se,pe,ge){if(n.timeoutHandle=-1,Se=r.subtreeFlags,Se&8192||(Se&16785408)===16785408){Se={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ke},lm(r,w,Se);var Fe=(w&62914560)===w?_u-$e():(w&4194048)===w?dm-$e():0;if(Fe=s2(Se,Fe),Fe!==null){gr=w,n.cancelPendingCommit=Fe(Tm.bind(null,n,r,w,a,f,C,P,V,ie,Ee,Se,null,pe,ge)),$r(n,w,P,!de);return}}Tm(n,r,w,a,f,C,P,V,ie)}function SC(n){for(var r=n;;){var a=r.tag;if((a===0||a===11||a===15)&&r.flags&16384&&(a=r.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var f=0;f<a.length;f++){var C=a[f],w=C.getSnapshot;C=C.value;try{if(!li(w(),C))return!1}catch{return!1}}if(a=r.child,r.subtreeFlags&16384&&a!==null)a.return=r,r=a;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 $r(n,r,a,f){r&=~ld,r&=~ys,n.suspendedLanes|=r,n.pingedLanes&=~r,f&&(n.warmLanes|=r),f=n.expirationTimes;for(var C=r;0<C;){var w=31-Et(C),P=1<<w;f[w]=-1,C&=~P}a!==0&&Oe(n,a,r)}function vu(){return(Dt&6)===0?(yo(0),!1):!0}function fd(){if(ht!==null){if(Mt===0)var n=ht.return;else n=ht,rr=fs=null,Rh(n),Xs=null,io=0,n=ht;for(;n!==null;)Gg(n.alternate,n),n=n.return;ht=null}}function aa(n,r){var a=n.timeoutHandle;a!==-1&&(n.timeoutHandle=-1,zC(a)),a=n.cancelPendingCommit,a!==null&&(n.cancelPendingCommit=null,a()),gr=0,fd(),zt=n,ht=a=nr(n.current,null),mt=r,Mt=0,di=null,Ur=!1,ia=be(n,r),od=!1,ra=fi=ld=ys=Hr=tn=0,Jn=vo=null,ud=!1,(r&8)!==0&&(r|=r&32);var f=n.entangledLanes;if(f!==0)for(n=n.entanglements,f&=r;0<f;){var C=31-Et(f),w=1<<C;r|=n[C],f&=~w}return pr=r,zl(),a}function _m(n,r){at=null,Y.H=ho,r===Vs||r===Vl?(r=Np(),Mt=3):r===_h?(r=Np(),Mt=4):Mt=r===qh?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,di=r,ht===null&&(tn=1,uu(n,vi(r,n.current)))}function bm(){var n=ci.current;return n===null?!0:(mt&4194048)===mt?Ti===null:(mt&62914560)===mt||(mt&536870912)!==0?n===Ti:!1}function Em(){var n=Y.H;return Y.H=ho,n===null?ho:n}function vm(){var n=Y.A;return Y.A=EC,n}function Su(){tn=4,Ur||(mt&4194048)!==mt&&ci.current!==null||(ia=!0),(Hr&134217727)===0&&(ys&134217727)===0||zt===null||$r(zt,mt,fi,!1)}function pd(n,r,a){var f=Dt;Dt|=2;var C=Em(),w=vm();(zt!==n||mt!==r)&&(Eu=null,aa(n,r)),r=!1;var P=tn;e:do try{if(Mt!==0&&ht!==null){var V=ht,ie=di;switch(Mt){case 8:fd(),P=6;break e;case 3:case 2:case 9:case 6:ci.current===null&&(r=!0);var de=Mt;if(Mt=0,di=null,oa(n,V,ie,de),a&&ia){P=0;break e}break;default:de=Mt,Mt=0,di=null,oa(n,V,ie,de)}}yC(),P=tn;break}catch(Ee){_m(n,Ee)}while(!0);return r&&n.shellSuspendCounter++,rr=fs=null,Dt=f,Y.H=C,Y.A=w,ht===null&&(zt=null,mt=0,zl()),P}function yC(){for(;ht!==null;)Sm(ht)}function CC(n,r){var a=Dt;Dt|=2;var f=Em(),C=vm();zt!==n||mt!==r?(Eu=null,bu=$e()+500,aa(n,r)):ia=be(n,r);e:do try{if(Mt!==0&&ht!==null){r=ht;var w=di;t:switch(Mt){case 1:Mt=0,di=null,oa(n,r,w,1);break;case 2:case 9:if(Lp(w)){Mt=0,di=null,ym(r);break}r=function(){Mt!==2&&Mt!==9||zt!==n||(Mt=7),$i(n)},w.then(r,r);break e;case 3:Mt=7;break e;case 4:Mt=5;break e;case 7:Lp(w)?(Mt=0,di=null,ym(r)):(Mt=0,di=null,oa(n,r,w,7));break;case 5:var P=null;switch(ht.tag){case 26:P=ht.memoizedState;case 5:case 27:var V=ht;if(P?o_(P):V.stateNode.complete){Mt=0,di=null;var ie=V.sibling;if(ie!==null)ht=ie;else{var de=V.return;de!==null?(ht=de,yu(de)):ht=null}break t}}Mt=0,di=null,oa(n,r,w,5);break;case 6:Mt=0,di=null,oa(n,r,w,6);break;case 8:fd(),tn=6;break e;default:throw Error(s(462))}}TC();break}catch(Ee){_m(n,Ee)}while(!0);return rr=fs=null,Y.H=f,Y.A=C,Dt=a,ht!==null?0:(zt=null,mt=0,zl(),tn)}function TC(){for(;ht!==null&&!it();)Sm(ht)}function Sm(n){var r=qg(n.alternate,n,pr);n.memoizedProps=n.pendingProps,r===null?yu(n):ht=r}function ym(n){var r=n,a=r.alternate;switch(r.tag){case 15:case 0:r=Ug(a,r,r.pendingProps,r.type,void 0,mt);break;case 11:r=Ug(a,r,r.pendingProps,r.type.render,r.ref,mt);break;case 5:Rh(r);default:Gg(a,r),r=ht=vp(r,pr),r=qg(a,r,pr)}n.memoizedProps=n.pendingProps,r===null?yu(n):ht=r}function oa(n,r,a,f){rr=fs=null,Rh(r),Xs=null,io=0;var C=r.return;try{if(dC(n,C,r,a,mt)){tn=1,uu(n,vi(a,n.current)),ht=null;return}}catch(w){if(C!==null)throw ht=C,w;tn=1,uu(n,vi(a,n.current)),ht=null;return}r.flags&32768?(vt||f===1?n=!0:ia||(mt&536870912)!==0?n=!1:(Ur=n=!0,(f===2||f===9||f===3||f===6)&&(f=ci.current,f!==null&&f.tag===13&&(f.flags|=16384))),Cm(r,n)):yu(r)}function yu(n){var r=n;do{if((r.flags&32768)!==0){Cm(r,Ur);return}n=r.return;var a=gC(r.alternate,r,pr);if(a!==null){ht=a;return}if(r=r.sibling,r!==null){ht=r;return}ht=r=n}while(r!==null);tn===0&&(tn=5)}function Cm(n,r){do{var a=mC(n.alternate,n);if(a!==null){a.flags&=32767,ht=a;return}if(a=n.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!r&&(n=n.sibling,n!==null)){ht=n;return}ht=n=a}while(n!==null);tn=6,ht=null}function Tm(n,r,a,f,C,w,P,V,ie){n.cancelPendingCommit=null;do Cu();while(_n!==0);if((Dt&6)!==0)throw Error(s(327));if(r!==null){if(r===n.current)throw Error(s(177));if(w=r.lanes|r.childLanes,w|=nh,Le(n,a,w,P,V,ie),n===zt&&(ht=zt=null,mt=0),sa=r,jr=n,gr=a,cd=w,hd=C,fm=f,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,DC(Ie,function(){return Rm(),null})):(n.callbackNode=null,n.callbackPriority=0),f=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||f){f=Y.T,Y.T=null,C=K.p,K.p=2,P=Dt,Dt|=4;try{_C(n,r,a)}finally{Dt=P,K.p=C,Y.T=f}}_n=1,Am(),xm(),wm()}}function Am(){if(_n===1){_n=0;var n=jr,r=sa,a=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||a){a=Y.T,Y.T=null;var f=K.p;K.p=2;var C=Dt;Dt|=4;try{sm(r,n);var w=xd,P=hp(n.containerInfo),V=w.focusedElem,ie=w.selectionRange;if(P!==V&&V&&V.ownerDocument&&cp(V.ownerDocument.documentElement,V)){if(ie!==null&&Qc(V)){var de=ie.start,Ee=ie.end;if(Ee===void 0&&(Ee=de),"selectionStart"in V)V.selectionStart=de,V.selectionEnd=Math.min(Ee,V.value.length);else{var Se=V.ownerDocument||document,pe=Se&&Se.defaultView||window;if(pe.getSelection){var ge=pe.getSelection(),Fe=V.textContent.length,Je=Math.min(ie.start,Fe),Pt=ie.end===void 0?Je:Math.min(ie.end,Fe);!ge.extend&&Je>Pt&&(P=Pt,Pt=Je,Je=P);var oe=up(V,Je),se=up(V,Pt);if(oe&&se&&(ge.rangeCount!==1||ge.anchorNode!==oe.node||ge.anchorOffset!==oe.offset||ge.focusNode!==se.node||ge.focusOffset!==se.offset)){var he=Se.createRange();he.setStart(oe.node,oe.offset),ge.removeAllRanges(),Je>Pt?(ge.addRange(he),ge.extend(se.node,se.offset)):(he.setEnd(se.node,se.offset),ge.addRange(he))}}}}for(Se=[],ge=V;ge=ge.parentNode;)ge.nodeType===1&&Se.push({element:ge,left:ge.scrollLeft,top:ge.scrollTop});for(typeof V.focus=="function"&&V.focus(),V=0;V<Se.length;V++){var ve=Se[V];ve.element.scrollLeft=ve.left,ve.element.scrollTop=ve.top}}Iu=!!Ad,xd=Ad=null}finally{Dt=C,K.p=f,Y.T=a}}n.current=r,_n=2}}function xm(){if(_n===2){_n=0;var n=jr,r=sa,a=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||a){a=Y.T,Y.T=null;var f=K.p;K.p=2;var C=Dt;Dt|=4;try{em(n,r.alternate,r)}finally{Dt=C,K.p=f,Y.T=a}}_n=3}}function wm(){if(_n===4||_n===3){_n=0,Me();var n=jr,r=sa,a=gr,f=fm;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?_n=5:(_n=0,sa=jr=null,Dm(n,n.pendingLanes));var C=n.pendingLanes;if(C===0&&(zr=null),Fn(a),r=r.stateNode,Lt&&typeof Lt.onCommitFiberRoot=="function")try{Lt.onCommitFiberRoot(Yt,r,void 0,(r.current.flags&128)===128)}catch{}if(f!==null){r=Y.T,C=K.p,K.p=2,Y.T=null;try{for(var w=n.onRecoverableError,P=0;P<f.length;P++){var V=f[P];w(V.value,{componentStack:V.stack})}}finally{Y.T=r,K.p=C}}(gr&3)!==0&&Cu(),$i(n),C=n.pendingLanes,(a&261930)!==0&&(C&42)!==0?n===dd?So++:(So=0,dd=n):So=0,yo(0)}}function Dm(n,r){(n.pooledCacheLanes&=r)===0&&(r=n.pooledCache,r!=null&&(n.pooledCache=null,to(r)))}function Cu(){return Am(),xm(),wm(),Rm()}function Rm(){if(_n!==5)return!1;var n=jr,r=cd;cd=0;var a=Fn(gr),f=Y.T,C=K.p;try{K.p=32>a?32:a,Y.T=null,a=hd,hd=null;var w=jr,P=gr;if(_n=0,sa=jr=null,gr=0,(Dt&6)!==0)throw Error(s(331));var V=Dt;if(Dt|=4,cm(w.current),om(w,w.current,P,a),Dt=V,yo(0,!1),Lt&&typeof Lt.onPostCommitFiberRoot=="function")try{Lt.onPostCommitFiberRoot(Yt,w)}catch{}return!0}finally{K.p=C,Y.T=f,Dm(n,r)}}function km(n,r,a){r=vi(a,r),r=Wh(n.stateNode,r,2),n=Ir(n,r,2),n!==null&&(yt(n,2),$i(n))}function It(n,r,a){if(n.tag===3)km(n,n,a);else for(;r!==null;){if(r.tag===3){km(r,n,a);break}else if(r.tag===1){var f=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof f.componentDidCatch=="function"&&(zr===null||!zr.has(f))){n=vi(a,n),a=Lg(2),f=Ir(r,a,2),f!==null&&(Og(a,f,r,n),yt(f,2),$i(f));break}}r=r.return}}function gd(n,r,a){var f=n.pingCache;if(f===null){f=n.pingCache=new vC;var C=new Set;f.set(r,C)}else C=f.get(r),C===void 0&&(C=new Set,f.set(r,C));C.has(a)||(od=!0,C.add(a),n=AC.bind(null,n,r,a),r.then(n,n))}function AC(n,r,a){var f=n.pingCache;f!==null&&f.delete(r),n.pingedLanes|=n.suspendedLanes&a,n.warmLanes&=~a,zt===n&&(mt&a)===a&&(tn===4||tn===3&&(mt&62914560)===mt&&300>$e()-_u?(Dt&2)===0&&aa(n,0):ld|=a,ra===mt&&(ra=0)),$i(n)}function Lm(n,r){r===0&&(r=He()),n=cs(n,r),n!==null&&(yt(n,r),$i(n))}function xC(n){var r=n.memoizedState,a=0;r!==null&&(a=r.retryLane),Lm(n,a)}function wC(n,r){var a=0;switch(n.tag){case 31:case 13:var f=n.stateNode,C=n.memoizedState;C!==null&&(a=C.retryLane);break;case 19:f=n.stateNode;break;case 22:f=n.stateNode._retryCache;break;default:throw Error(s(314))}f!==null&&f.delete(r),Lm(n,a)}function DC(n,r){return Qe(n,r)}var Tu=null,la=null,md=!1,Au=!1,_d=!1,Wr=0;function $i(n){n!==la&&n.next===null&&(la===null?Tu=la=n:la=la.next=n),Au=!0,md||(md=!0,kC())}function yo(n,r){if(!_d&&Au){_d=!0;do for(var a=!1,f=Tu;f!==null;){if(n!==0){var C=f.pendingLanes;if(C===0)var w=0;else{var P=f.suspendedLanes,V=f.pingedLanes;w=(1<<31-Et(42|n)+1)-1,w&=C&~(P&~V),w=w&201326741?w&201326741|1:w?w|2:0}w!==0&&(a=!0,Im(f,w))}else w=mt,w=ne(f,f===zt?w:0,f.cancelPendingCommit!==null||f.timeoutHandle!==-1),(w&3)===0||be(f,w)||(a=!0,Im(f,w));f=f.next}while(a);_d=!1}}function RC(){Om()}function Om(){Au=md=!1;var n=0;Wr!==0&&HC()&&(n=Wr);for(var r=$e(),a=null,f=Tu;f!==null;){var C=f.next,w=Nm(f,r);w===0?(f.next=null,a===null?Tu=C:a.next=C,C===null&&(la=a)):(a=f,(n!==0||(w&3)!==0)&&(Au=!0)),f=C}_n!==0&&_n!==5||yo(n),Wr!==0&&(Wr=0)}function Nm(n,r){for(var a=n.suspendedLanes,f=n.pingedLanes,C=n.expirationTimes,w=n.pendingLanes&-62914561;0<w;){var P=31-Et(w),V=1<<P,ie=C[P];ie===-1?((V&a)===0||(V&f)!==0)&&(C[P]=De(V,r)):ie<=r&&(n.expiredLanes|=V),w&=~V}if(r=zt,a=mt,a=ne(n,n===r?a:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),f=n.callbackNode,a===0||n===r&&(Mt===2||Mt===9)||n.cancelPendingCommit!==null)return f!==null&&f!==null&&tt(f),n.callbackNode=null,n.callbackPriority=0;if((a&3)===0||be(n,a)){if(r=a&-a,r===n.callbackPriority)return r;switch(f!==null&&tt(f),Fn(a)){case 2:case 8:a=Ce;break;case 32:a=Ie;break;case 268435456:a=Ye;break;default:a=Ie}return f=Mm.bind(null,n),a=Qe(a,f),n.callbackPriority=r,n.callbackNode=a,r}return f!==null&&f!==null&&tt(f),n.callbackPriority=2,n.callbackNode=null,2}function Mm(n,r){if(_n!==0&&_n!==5)return n.callbackNode=null,n.callbackPriority=0,null;var a=n.callbackNode;if(Cu()&&n.callbackNode!==a)return null;var f=mt;return f=ne(n,n===zt?f:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),f===0?null:(gm(n,f,r),Nm(n,$e()),n.callbackNode!=null&&n.callbackNode===a?Mm.bind(null,n):null)}function Im(n,r){if(Cu())return null;gm(n,r,!0)}function kC(){jC(function(){(Dt&6)!==0?Qe(fe,RC):Om()})}function bd(){if(Wr===0){var n=Gs;n===0&&(n=si,si<<=1,(si&261888)===0&&(si=256)),Wr=n}return Wr}function Bm(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:wr(""+n)}function Fm(n,r){var a=r.ownerDocument.createElement("input");return a.name=r.name,a.value=r.value,n.id&&a.setAttribute("form",n.id),r.parentNode.insertBefore(a,r),n=new FormData(n),a.parentNode.removeChild(a),n}function LC(n,r,a,f,C){if(r==="submit"&&a&&a.stateNode===C){var w=Bm((C[Ln]||null).action),P=f.submitter;P&&(r=(r=P[Ln]||null)?Bm(r.formAction):P.getAttribute("formAction"),r!==null&&(w=r,P=null));var V=new Fl("action","action",null,f,C);n.push({event:V,listeners:[{instance:null,listener:function(){if(f.defaultPrevented){if(Wr!==0){var ie=P?Fm(C,P):new FormData(C);Ph(a,{pending:!0,data:ie,method:C.method,action:w},null,ie)}}else typeof w=="function"&&(V.preventDefault(),ie=P?Fm(C,P):new FormData(C),Ph(a,{pending:!0,data:ie,method:C.method,action:w},w,ie))},currentTarget:C}]})}}for(var Ed=0;Ed<th.length;Ed++){var vd=th[Ed],OC=vd.toLowerCase(),NC=vd[0].toUpperCase()+vd.slice(1);Ni(OC,"on"+NC)}Ni(pp,"onAnimationEnd"),Ni(gp,"onAnimationIteration"),Ni(mp,"onAnimationStart"),Ni("dblclick","onDoubleClick"),Ni("focusin","onFocus"),Ni("focusout","onBlur"),Ni(Vy,"onTransitionRun"),Ni(Xy,"onTransitionStart"),Ni(Qy,"onTransitionCancel"),Ni(_p,"onTransitionEnd"),we("onMouseEnter",["mouseout","mouseover"]),we("onMouseLeave",["mouseout","mouseover"]),we("onPointerEnter",["pointerout","pointerover"]),we("onPointerLeave",["pointerout","pointerover"]),Ji("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ji("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ji("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ji("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ji("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ji("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Co="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(" "),MC=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Co));function Pm(n,r){r=(r&4)!==0;for(var a=0;a<n.length;a++){var f=n[a],C=f.event;f=f.listeners;e:{var w=void 0;if(r)for(var P=f.length-1;0<=P;P--){var V=f[P],ie=V.instance,de=V.currentTarget;if(V=V.listener,ie!==w&&C.isPropagationStopped())break e;w=V,C.currentTarget=de;try{w(C)}catch(Ee){Hl(Ee)}C.currentTarget=null,w=ie}else for(P=0;P<f.length;P++){if(V=f[P],ie=V.instance,de=V.currentTarget,V=V.listener,ie!==w&&C.isPropagationStopped())break e;w=V,C.currentTarget=de;try{w(C)}catch(Ee){Hl(Ee)}C.currentTarget=null,w=ie}}}}function dt(n,r){var a=r[Pa];a===void 0&&(a=r[Pa]=new Set);var f=n+"__bubble";a.has(f)||(Um(r,n,2,!1),a.add(f))}function Sd(n,r,a){var f=0;r&&(f|=4),Um(a,n,f,r)}var xu="_reactListening"+Math.random().toString(36).slice(2);function yd(n){if(!n[xu]){n[xu]=!0,Rl.forEach(function(a){a!=="selectionchange"&&(MC.has(a)||Sd(a,!1,n),Sd(a,!0,n))});var r=n.nodeType===9?n:n.ownerDocument;r===null||r[xu]||(r[xu]=!0,Sd("selectionchange",!1,r))}}function Um(n,r,a,f){switch(p_(r)){case 2:var C=l2;break;case 8:C=u2;break;default:C=Fd}a=C.bind(null,r,a,n),C=void 0,!jc||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(C=!0),f?C!==void 0?n.addEventListener(r,a,{capture:!0,passive:C}):n.addEventListener(r,a,!0):C!==void 0?n.addEventListener(r,a,{passive:C}):n.addEventListener(r,a,!1)}function Cd(n,r,a,f,C){var w=f;if((r&1)===0&&(r&2)===0&&f!==null)e:for(;;){if(f===null)return;var P=f.tag;if(P===3||P===4){var V=f.stateNode.containerInfo;if(V===C)break;if(P===4)for(P=f.return;P!==null;){var ie=P.tag;if((ie===3||ie===4)&&P.stateNode.containerInfo===C)return;P=P.return}for(;V!==null;){if(P=Un(V),P===null)return;if(ie=P.tag,ie===5||ie===6||ie===26||ie===27){f=w=P;continue e}V=V.parentNode}}f=f.return}Nl(function(){var de=w,Ee=st(a),Se=[];e:{var pe=bp.get(n);if(pe!==void 0){var ge=Fl,Fe=n;switch(n){case"keypress":if(Il(a)===0)break e;case"keydown":case"keyup":ge=wy;break;case"focusin":Fe="focus",ge=Yc;break;case"focusout":Fe="blur",ge=Yc;break;case"beforeblur":case"afterblur":ge=Yc;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ge=G0;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ge=gy;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ge=ky;break;case pp:case gp:case mp:ge=by;break;case _p:ge=Oy;break;case"scroll":case"scrollend":ge=fy;break;case"wheel":ge=My;break;case"copy":case"cut":case"paste":ge=vy;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ge=V0;break;case"toggle":case"beforetoggle":ge=By}var Je=(r&4)!==0,Pt=!Je&&(n==="scroll"||n==="scrollend"),oe=Je?pe!==null?pe+"Capture":null:pe;Je=[];for(var se=de,he;se!==null;){var ve=se;if(he=ve.stateNode,ve=ve.tag,ve!==5&&ve!==26&&ve!==27||he===null||oe===null||(ve=Wa(se,oe),ve!=null&&Je.push(To(se,ve,he))),Pt)break;se=se.return}0<Je.length&&(pe=new ge(pe,Fe,null,a,Ee),Se.push({event:pe,listeners:Je}))}}if((r&7)===0){e:{if(pe=n==="mouseover"||n==="pointerover",ge=n==="mouseout"||n==="pointerout",pe&&a!==ze&&(Fe=a.relatedTarget||a.fromElement)&&(Un(Fe)||Fe[Cr]))break e;if((ge||pe)&&(pe=Ee.window===Ee?Ee:(pe=Ee.ownerDocument)?pe.defaultView||pe.parentWindow:window,ge?(Fe=a.relatedTarget||a.toElement,ge=de,Fe=Fe?Un(Fe):null,Fe!==null&&(Pt=p(Fe),Je=Fe.tag,Fe!==Pt||Je!==5&&Je!==27&&Je!==6)&&(Fe=null)):(ge=null,Fe=de),ge!==Fe)){if(Je=G0,ve="onMouseLeave",oe="onMouseEnter",se="mouse",(n==="pointerout"||n==="pointerover")&&(Je=V0,ve="onPointerLeave",oe="onPointerEnter",se="pointer"),Pt=ge==null?pe:Tr(ge),he=Fe==null?pe:Tr(Fe),pe=new Je(ve,se+"leave",ge,a,Ee),pe.target=Pt,pe.relatedTarget=he,ve=null,Un(Ee)===de&&(Je=new Je(oe,se+"enter",Fe,a,Ee),Je.target=he,Je.relatedTarget=Pt,ve=Je),Pt=ve,ge&&Fe)t:{for(Je=IC,oe=ge,se=Fe,he=0,ve=oe;ve;ve=Je(ve))he++;ve=0;for(var Ke=se;Ke;Ke=Je(Ke))ve++;for(;0<he-ve;)oe=Je(oe),he--;for(;0<ve-he;)se=Je(se),ve--;for(;he--;){if(oe===se||se!==null&&oe===se.alternate){Je=oe;break t}oe=Je(oe),se=Je(se)}Je=null}else Je=null;ge!==null&&Hm(Se,pe,ge,Je,!1),Fe!==null&&Pt!==null&&Hm(Se,Pt,Fe,Je,!0)}}e:{if(pe=de?Tr(de):window,ge=pe.nodeName&&pe.nodeName.toLowerCase(),ge==="select"||ge==="input"&&pe.type==="file")var Tt=ip;else if(tp(pe))if(rp)Tt=Yy;else{Tt=Wy;var je=$y}else ge=pe.nodeName,!ge||ge.toLowerCase()!=="input"||pe.type!=="checkbox"&&pe.type!=="radio"?de&&xr(de.elementType)&&(Tt=ip):Tt=qy;if(Tt&&(Tt=Tt(n,de))){np(Se,Tt,a,Ee);break e}je&&je(n,pe,de),n==="focusout"&&de&&pe.type==="number"&&de.memoizedProps.value!=null&&Bs(pe,"number",pe.value)}switch(je=de?Tr(de):window,n){case"focusin":(tp(je)||je.contentEditable==="true")&&(Us=je,Zc=de,Za=null);break;case"focusout":Za=Zc=Us=null;break;case"mousedown":Jc=!0;break;case"contextmenu":case"mouseup":case"dragend":Jc=!1,dp(Se,a,Ee);break;case"selectionchange":if(Ky)break;case"keydown":case"keyup":dp(Se,a,Ee)}var ot;if(Kc)e:{switch(n){case"compositionstart":var _t="onCompositionStart";break e;case"compositionend":_t="onCompositionEnd";break e;case"compositionupdate":_t="onCompositionUpdate";break e}_t=void 0}else Ps?J0(n,a)&&(_t="onCompositionEnd"):n==="keydown"&&a.keyCode===229&&(_t="onCompositionStart");_t&&(X0&&a.locale!=="ko"&&(Ps||_t!=="onCompositionStart"?_t==="onCompositionEnd"&&Ps&&(ot=q0()):(Dr=Ee,$c="value"in Dr?Dr.value:Dr.textContent,Ps=!0)),je=wu(de,_t),0<je.length&&(_t=new K0(_t,n,null,a,Ee),Se.push({event:_t,listeners:je}),ot?_t.data=ot:(ot=ep(a),ot!==null&&(_t.data=ot)))),(ot=Py?Uy(n,a):Hy(n,a))&&(_t=wu(de,"onBeforeInput"),0<_t.length&&(je=new K0("onBeforeInput","beforeinput",null,a,Ee),Se.push({event:je,listeners:_t}),je.data=ot)),LC(Se,n,de,a,Ee)}Pm(Se,r)})}function To(n,r,a){return{instance:n,listener:r,currentTarget:a}}function wu(n,r){for(var a=r+"Capture",f=[];n!==null;){var C=n,w=C.stateNode;if(C=C.tag,C!==5&&C!==26&&C!==27||w===null||(C=Wa(n,a),C!=null&&f.unshift(To(n,C,w)),C=Wa(n,r),C!=null&&f.push(To(n,C,w))),n.tag===3)return f;n=n.return}return[]}function IC(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function Hm(n,r,a,f,C){for(var w=r._reactName,P=[];a!==null&&a!==f;){var V=a,ie=V.alternate,de=V.stateNode;if(V=V.tag,ie!==null&&ie===f)break;V!==5&&V!==26&&V!==27||de===null||(ie=de,C?(de=Wa(a,w),de!=null&&P.unshift(To(a,de,ie))):C||(de=Wa(a,w),de!=null&&P.push(To(a,de,ie)))),a=a.return}P.length!==0&&n.push({event:r,listeners:P})}var BC=/\r\n?/g,FC=/\u0000|\uFFFD/g;function zm(n){return(typeof n=="string"?n:""+n).replace(BC,`
49
- `).replace(FC,"")}function jm(n,r){return r=zm(r),zm(n)===r}function Ft(n,r,a,f,C,w){switch(a){case"children":typeof f=="string"?r==="body"||r==="textarea"&&f===""||et(n,f):(typeof f=="number"||typeof f=="bigint")&&r!=="body"&&et(n,""+f);break;case"className":ai(n,"class",f);break;case"tabIndex":ai(n,"tabindex",f);break;case"dir":case"role":case"viewBox":case"width":case"height":ai(n,a,f);break;case"style":Nt(n,f,w);break;case"data":if(r!=="object"){ai(n,"data",f);break}case"src":case"href":if(f===""&&(r!=="a"||a!=="href")){n.removeAttribute(a);break}if(f==null||typeof f=="function"||typeof f=="symbol"||typeof f=="boolean"){n.removeAttribute(a);break}f=wr(""+f),n.setAttribute(a,f);break;case"action":case"formAction":if(typeof f=="function"){n.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof w=="function"&&(a==="formAction"?(r!=="input"&&Ft(n,r,"name",C.name,C,null),Ft(n,r,"formEncType",C.formEncType,C,null),Ft(n,r,"formMethod",C.formMethod,C,null),Ft(n,r,"formTarget",C.formTarget,C,null)):(Ft(n,r,"encType",C.encType,C,null),Ft(n,r,"method",C.method,C,null),Ft(n,r,"target",C.target,C,null)));if(f==null||typeof f=="symbol"||typeof f=="boolean"){n.removeAttribute(a);break}f=wr(""+f),n.setAttribute(a,f);break;case"onClick":f!=null&&(n.onclick=ke);break;case"onScroll":f!=null&&dt("scroll",n);break;case"onScrollEnd":f!=null&&dt("scrollend",n);break;case"dangerouslySetInnerHTML":if(f!=null){if(typeof f!="object"||!("__html"in f))throw Error(s(61));if(a=f.__html,a!=null){if(C.children!=null)throw Error(s(60));n.innerHTML=a}}break;case"multiple":n.multiple=f&&typeof f!="function"&&typeof f!="symbol";break;case"muted":n.muted=f&&typeof f!="function"&&typeof f!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(f==null||typeof f=="function"||typeof f=="boolean"||typeof f=="symbol"){n.removeAttribute("xlink:href");break}a=wr(""+f),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":f!=null&&typeof f!="function"&&typeof f!="symbol"?n.setAttribute(a,""+f):n.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":f&&typeof f!="function"&&typeof f!="symbol"?n.setAttribute(a,""):n.removeAttribute(a);break;case"capture":case"download":f===!0?n.setAttribute(a,""):f!==!1&&f!=null&&typeof f!="function"&&typeof f!="symbol"?n.setAttribute(a,f):n.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":f!=null&&typeof f!="function"&&typeof f!="symbol"&&!isNaN(f)&&1<=f?n.setAttribute(a,f):n.removeAttribute(a);break;case"rowSpan":case"start":f==null||typeof f=="function"||typeof f=="symbol"||isNaN(f)?n.removeAttribute(a):n.setAttribute(a,f);break;case"popover":dt("beforetoggle",n),dt("toggle",n),On(n,"popover",f);break;case"xlinkActuate":Gn(n,"http://www.w3.org/1999/xlink","xlink:actuate",f);break;case"xlinkArcrole":Gn(n,"http://www.w3.org/1999/xlink","xlink:arcrole",f);break;case"xlinkRole":Gn(n,"http://www.w3.org/1999/xlink","xlink:role",f);break;case"xlinkShow":Gn(n,"http://www.w3.org/1999/xlink","xlink:show",f);break;case"xlinkTitle":Gn(n,"http://www.w3.org/1999/xlink","xlink:title",f);break;case"xlinkType":Gn(n,"http://www.w3.org/1999/xlink","xlink:type",f);break;case"xmlBase":Gn(n,"http://www.w3.org/XML/1998/namespace","xml:base",f);break;case"xmlLang":Gn(n,"http://www.w3.org/XML/1998/namespace","xml:lang",f);break;case"xmlSpace":Gn(n,"http://www.w3.org/XML/1998/namespace","xml:space",f);break;case"is":On(n,"is",f);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=er.get(a)||a,On(n,a,f))}}function Td(n,r,a,f,C,w){switch(a){case"style":Nt(n,f,w);break;case"dangerouslySetInnerHTML":if(f!=null){if(typeof f!="object"||!("__html"in f))throw Error(s(61));if(a=f.__html,a!=null){if(C.children!=null)throw Error(s(60));n.innerHTML=a}}break;case"children":typeof f=="string"?et(n,f):(typeof f=="number"||typeof f=="bigint")&&et(n,""+f);break;case"onScroll":f!=null&&dt("scroll",n);break;case"onScrollEnd":f!=null&&dt("scrollend",n);break;case"onClick":f!=null&&(n.onclick=ke);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!ss.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(C=a.endsWith("Capture"),r=a.slice(2,C?a.length-7:void 0),w=n[Ln]||null,w=w!=null?w[a]:null,typeof w=="function"&&n.removeEventListener(r,w,C),typeof f=="function")){typeof w!="function"&&w!==null&&(a in n?n[a]=null:n.hasAttribute(a)&&n.removeAttribute(a)),n.addEventListener(r,f,C);break e}a in n?n[a]=f:f===!0?n.setAttribute(a,""):On(n,a,f)}}}function Rn(n,r,a){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":dt("error",n),dt("load",n);var f=!1,C=!1,w;for(w in a)if(a.hasOwnProperty(w)){var P=a[w];if(P!=null)switch(w){case"src":f=!0;break;case"srcSet":C=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,r));default:Ft(n,r,w,P,a,null)}}C&&Ft(n,r,"srcSet",a.srcSet,a,null),f&&Ft(n,r,"src",a.src,a,null);return;case"input":dt("invalid",n);var V=w=P=C=null,ie=null,de=null;for(f in a)if(a.hasOwnProperty(f)){var Ee=a[f];if(Ee!=null)switch(f){case"name":C=Ee;break;case"type":P=Ee;break;case"checked":ie=Ee;break;case"defaultChecked":de=Ee;break;case"value":w=Ee;break;case"defaultValue":V=Ee;break;case"children":case"dangerouslySetInnerHTML":if(Ee!=null)throw Error(s(137,r));break;default:Ft(n,r,f,Ee,a,null)}}as(n,w,V,ie,de,P,C,!1);return;case"select":dt("invalid",n),f=P=w=null;for(C in a)if(a.hasOwnProperty(C)&&(V=a[C],V!=null))switch(C){case"value":w=V;break;case"defaultValue":P=V;break;case"multiple":f=V;default:Ft(n,r,C,V,a,null)}r=w,a=P,n.multiple=!!f,r!=null?An(n,!!f,r,!1):a!=null&&An(n,!!f,a,!0);return;case"textarea":dt("invalid",n),w=C=f=null;for(P in a)if(a.hasOwnProperty(P)&&(V=a[P],V!=null))switch(P){case"value":f=V;break;case"defaultValue":C=V;break;case"children":w=V;break;case"dangerouslySetInnerHTML":if(V!=null)throw Error(s(91));break;default:Ft(n,r,P,V,a,null)}Fs(n,f,C,w);return;case"option":for(ie in a)if(a.hasOwnProperty(ie)&&(f=a[ie],f!=null))switch(ie){case"selected":n.selected=f&&typeof f!="function"&&typeof f!="symbol";break;default:Ft(n,r,ie,f,a,null)}return;case"dialog":dt("beforetoggle",n),dt("toggle",n),dt("cancel",n),dt("close",n);break;case"iframe":case"object":dt("load",n);break;case"video":case"audio":for(f=0;f<Co.length;f++)dt(Co[f],n);break;case"image":dt("error",n),dt("load",n);break;case"details":dt("toggle",n);break;case"embed":case"source":case"link":dt("error",n),dt("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(de in a)if(a.hasOwnProperty(de)&&(f=a[de],f!=null))switch(de){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,r));default:Ft(n,r,de,f,a,null)}return;default:if(xr(r)){for(Ee in a)a.hasOwnProperty(Ee)&&(f=a[Ee],f!==void 0&&Td(n,r,Ee,f,a,void 0));return}}for(V in a)a.hasOwnProperty(V)&&(f=a[V],f!=null&&Ft(n,r,V,f,a,null))}function PC(n,r,a,f){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var C=null,w=null,P=null,V=null,ie=null,de=null,Ee=null;for(ge in a){var Se=a[ge];if(a.hasOwnProperty(ge)&&Se!=null)switch(ge){case"checked":break;case"value":break;case"defaultValue":ie=Se;default:f.hasOwnProperty(ge)||Ft(n,r,ge,null,f,Se)}}for(var pe in f){var ge=f[pe];if(Se=a[pe],f.hasOwnProperty(pe)&&(ge!=null||Se!=null))switch(pe){case"type":w=ge;break;case"name":C=ge;break;case"checked":de=ge;break;case"defaultChecked":Ee=ge;break;case"value":P=ge;break;case"defaultValue":V=ge;break;case"children":case"dangerouslySetInnerHTML":if(ge!=null)throw Error(s(137,r));break;default:ge!==Se&&Ft(n,r,pe,ge,f,Se)}}za(n,P,V,ie,de,Ee,w,C);return;case"select":ge=P=V=pe=null;for(w in a)if(ie=a[w],a.hasOwnProperty(w)&&ie!=null)switch(w){case"value":break;case"multiple":ge=ie;default:f.hasOwnProperty(w)||Ft(n,r,w,null,f,ie)}for(C in f)if(w=f[C],ie=a[C],f.hasOwnProperty(C)&&(w!=null||ie!=null))switch(C){case"value":pe=w;break;case"defaultValue":V=w;break;case"multiple":P=w;default:w!==ie&&Ft(n,r,C,w,f,ie)}r=V,a=P,f=ge,pe!=null?An(n,!!a,pe,!1):!!f!=!!a&&(r!=null?An(n,!!a,r,!0):An(n,!!a,a?[]:"",!1));return;case"textarea":ge=pe=null;for(V in a)if(C=a[V],a.hasOwnProperty(V)&&C!=null&&!f.hasOwnProperty(V))switch(V){case"value":break;case"children":break;default:Ft(n,r,V,null,f,C)}for(P in f)if(C=f[P],w=a[P],f.hasOwnProperty(P)&&(C!=null||w!=null))switch(P){case"value":pe=C;break;case"defaultValue":ge=C;break;case"children":break;case"dangerouslySetInnerHTML":if(C!=null)throw Error(s(91));break;default:C!==w&&Ft(n,r,P,C,f,w)}Ll(n,pe,ge);return;case"option":for(var Fe in a)if(pe=a[Fe],a.hasOwnProperty(Fe)&&pe!=null&&!f.hasOwnProperty(Fe))switch(Fe){case"selected":n.selected=!1;break;default:Ft(n,r,Fe,null,f,pe)}for(ie in f)if(pe=f[ie],ge=a[ie],f.hasOwnProperty(ie)&&pe!==ge&&(pe!=null||ge!=null))switch(ie){case"selected":n.selected=pe&&typeof pe!="function"&&typeof pe!="symbol";break;default:Ft(n,r,ie,pe,f,ge)}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 Je in a)pe=a[Je],a.hasOwnProperty(Je)&&pe!=null&&!f.hasOwnProperty(Je)&&Ft(n,r,Je,null,f,pe);for(de in f)if(pe=f[de],ge=a[de],f.hasOwnProperty(de)&&pe!==ge&&(pe!=null||ge!=null))switch(de){case"children":case"dangerouslySetInnerHTML":if(pe!=null)throw Error(s(137,r));break;default:Ft(n,r,de,pe,f,ge)}return;default:if(xr(r)){for(var Pt in a)pe=a[Pt],a.hasOwnProperty(Pt)&&pe!==void 0&&!f.hasOwnProperty(Pt)&&Td(n,r,Pt,void 0,f,pe);for(Ee in f)pe=f[Ee],ge=a[Ee],!f.hasOwnProperty(Ee)||pe===ge||pe===void 0&&ge===void 0||Td(n,r,Ee,pe,f,ge);return}}for(var oe in a)pe=a[oe],a.hasOwnProperty(oe)&&pe!=null&&!f.hasOwnProperty(oe)&&Ft(n,r,oe,null,f,pe);for(Se in f)pe=f[Se],ge=a[Se],!f.hasOwnProperty(Se)||pe===ge||pe==null&&ge==null||Ft(n,r,Se,pe,f,ge)}function $m(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function UC(){if(typeof performance.getEntriesByType=="function"){for(var n=0,r=0,a=performance.getEntriesByType("resource"),f=0;f<a.length;f++){var C=a[f],w=C.transferSize,P=C.initiatorType,V=C.duration;if(w&&V&&$m(P)){for(P=0,V=C.responseEnd,f+=1;f<a.length;f++){var ie=a[f],de=ie.startTime;if(de>V)break;var Ee=ie.transferSize,Se=ie.initiatorType;Ee&&$m(Se)&&(ie=ie.responseEnd,P+=Ee*(ie<V?1:(V-de)/(ie-de)))}if(--f,r+=8*(w+P)/(C.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 Ad=null,xd=null;function Du(n){return n.nodeType===9?n:n.ownerDocument}function Wm(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 qm(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 wd(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 Dd=null;function HC(){var n=window.event;return n&&n.type==="popstate"?n===Dd?!1:(Dd=n,!0):(Dd=null,!1)}var Ym=typeof setTimeout=="function"?setTimeout:void 0,zC=typeof clearTimeout=="function"?clearTimeout:void 0,Gm=typeof Promise=="function"?Promise:void 0,jC=typeof queueMicrotask=="function"?queueMicrotask:typeof Gm<"u"?function(n){return Gm.resolve(null).then(n).catch($C)}:Ym;function $C(n){setTimeout(function(){throw n})}function qr(n){return n==="head"}function Km(n,r){var a=r,f=0;do{var C=a.nextSibling;if(n.removeChild(a),C&&C.nodeType===8)if(a=C.data,a==="/$"||a==="/&"){if(f===0){n.removeChild(C),da(r);return}f--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")f++;else if(a==="html")Ao(n.ownerDocument.documentElement);else if(a==="head"){a=n.ownerDocument.head,Ao(a);for(var w=a.firstChild;w;){var P=w.nextSibling,V=w.nodeName;w[rs]||V==="SCRIPT"||V==="STYLE"||V==="LINK"&&w.rel.toLowerCase()==="stylesheet"||a.removeChild(w),w=P}}else a==="body"&&Ao(n.ownerDocument.body);a=C}while(a);da(r)}function Vm(n,r){var a=n;n=0;do{var f=a.nextSibling;if(a.nodeType===1?r?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(r?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),f&&f.nodeType===8)if(a=f.data,a==="/$"){if(n===0)break;n--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||n++;a=f}while(a)}function Rd(n){var r=n.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var a=r;switch(r=r.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Rd(a),Ua(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}n.removeChild(a)}}function WC(n,r,a,f){for(;n.nodeType===1;){var C=a;if(n.nodeName.toLowerCase()!==r.toLowerCase()){if(!f&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(f){if(!n[rs])switch(r){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(w=n.getAttribute("rel"),w==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(w!==C.rel||n.getAttribute("href")!==(C.href==null||C.href===""?null:C.href)||n.getAttribute("crossorigin")!==(C.crossOrigin==null?null:C.crossOrigin)||n.getAttribute("title")!==(C.title==null?null:C.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(w=n.getAttribute("src"),(w!==(C.src==null?null:C.src)||n.getAttribute("type")!==(C.type==null?null:C.type)||n.getAttribute("crossorigin")!==(C.crossOrigin==null?null:C.crossOrigin))&&w&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(r==="input"&&n.type==="hidden"){var w=C.name==null?null:""+C.name;if(C.type==="hidden"&&n.getAttribute("name")===w)return n}else return n;if(n=Ai(n.nextSibling),n===null)break}return null}function qC(n,r,a){if(r==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!a||(n=Ai(n.nextSibling),n===null))return null;return n}function Xm(n,r){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!r||(n=Ai(n.nextSibling),n===null))return null;return n}function kd(n){return n.data==="$?"||n.data==="$~"}function Ld(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function YC(n,r){var a=n.ownerDocument;if(n.data==="$~")n._reactRetry=r;else if(n.data!=="$?"||a.readyState!=="loading")r();else{var f=function(){r(),a.removeEventListener("DOMContentLoaded",f)};a.addEventListener("DOMContentLoaded",f),n._reactRetry=f}}function Ai(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 Od=null;function Qm(n){n=n.nextSibling;for(var r=0;n;){if(n.nodeType===8){var a=n.data;if(a==="/$"||a==="/&"){if(r===0)return Ai(n.nextSibling);r--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||r++}n=n.nextSibling}return null}function Zm(n){n=n.previousSibling;for(var r=0;n;){if(n.nodeType===8){var a=n.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(r===0)return n;r--}else a!=="/$"&&a!=="/&"||r++}n=n.previousSibling}return null}function Jm(n,r,a){switch(r=Du(a),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 Ao(n){for(var r=n.attributes;r.length;)n.removeAttributeNode(r[0]);Ua(n)}var xi=new Map,e_=new Set;function Ru(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var mr=K.d;K.d={f:GC,r:KC,D:VC,C:XC,L:QC,m:ZC,X:e2,S:JC,M:t2};function GC(){var n=mr.f(),r=vu();return n||r}function KC(n){var r=Zi(n);r!==null&&r.tag===5&&r.type==="form"?_g(r):mr.r(n)}var ua=typeof document>"u"?null:document;function t_(n,r,a){var f=ua;if(f&&typeof r=="string"&&r){var C=Kn(r);C='link[rel="'+n+'"][href="'+C+'"]',typeof a=="string"&&(C+='[crossorigin="'+a+'"]'),e_.has(C)||(e_.add(C),n={rel:n,crossOrigin:a,href:r},f.querySelector(C)===null&&(r=f.createElement("link"),Rn(r,"link",n),cn(r),f.head.appendChild(r)))}}function VC(n){mr.D(n),t_("dns-prefetch",n,null)}function XC(n,r){mr.C(n,r),t_("preconnect",n,r)}function QC(n,r,a){mr.L(n,r,a);var f=ua;if(f&&n&&r){var C='link[rel="preload"][as="'+Kn(r)+'"]';r==="image"&&a&&a.imageSrcSet?(C+='[imagesrcset="'+Kn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(C+='[imagesizes="'+Kn(a.imageSizes)+'"]')):C+='[href="'+Kn(n)+'"]';var w=C;switch(r){case"style":w=ca(n);break;case"script":w=ha(n)}xi.has(w)||(n=h({rel:"preload",href:r==="image"&&a&&a.imageSrcSet?void 0:n,as:r},a),xi.set(w,n),f.querySelector(C)!==null||r==="style"&&f.querySelector(xo(w))||r==="script"&&f.querySelector(wo(w))||(r=f.createElement("link"),Rn(r,"link",n),cn(r),f.head.appendChild(r)))}}function ZC(n,r){mr.m(n,r);var a=ua;if(a&&n){var f=r&&typeof r.as=="string"?r.as:"script",C='link[rel="modulepreload"][as="'+Kn(f)+'"][href="'+Kn(n)+'"]',w=C;switch(f){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":w=ha(n)}if(!xi.has(w)&&(n=h({rel:"modulepreload",href:n},r),xi.set(w,n),a.querySelector(C)===null)){switch(f){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(wo(w)))return}f=a.createElement("link"),Rn(f,"link",n),cn(f),a.head.appendChild(f)}}}function JC(n,r,a){mr.S(n,r,a);var f=ua;if(f&&n){var C=Ar(f).hoistableStyles,w=ca(n);r=r||"default";var P=C.get(w);if(!P){var V={loading:0,preload:null};if(P=f.querySelector(xo(w)))V.loading=5;else{n=h({rel:"stylesheet",href:n,"data-precedence":r},a),(a=xi.get(w))&&Nd(n,a);var ie=P=f.createElement("link");cn(ie),Rn(ie,"link",n),ie._p=new Promise(function(de,Ee){ie.onload=de,ie.onerror=Ee}),ie.addEventListener("load",function(){V.loading|=1}),ie.addEventListener("error",function(){V.loading|=2}),V.loading|=4,ku(P,r,f)}P={type:"stylesheet",instance:P,count:1,state:V},C.set(w,P)}}}function e2(n,r){mr.X(n,r);var a=ua;if(a&&n){var f=Ar(a).hoistableScripts,C=ha(n),w=f.get(C);w||(w=a.querySelector(wo(C)),w||(n=h({src:n,async:!0},r),(r=xi.get(C))&&Md(n,r),w=a.createElement("script"),cn(w),Rn(w,"link",n),a.head.appendChild(w)),w={type:"script",instance:w,count:1,state:null},f.set(C,w))}}function t2(n,r){mr.M(n,r);var a=ua;if(a&&n){var f=Ar(a).hoistableScripts,C=ha(n),w=f.get(C);w||(w=a.querySelector(wo(C)),w||(n=h({src:n,async:!0,type:"module"},r),(r=xi.get(C))&&Md(n,r),w=a.createElement("script"),cn(w),Rn(w,"link",n),a.head.appendChild(w)),w={type:"script",instance:w,count:1,state:null},f.set(C,w))}}function n_(n,r,a,f){var C=(C=ue.current)?Ru(C):null;if(!C)throw Error(s(446));switch(n){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(r=ca(a.href),a=Ar(C).hoistableStyles,f=a.get(r),f||(f={type:"style",instance:null,count:0,state:null},a.set(r,f)),f):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){n=ca(a.href);var w=Ar(C).hoistableStyles,P=w.get(n);if(P||(C=C.ownerDocument||C,P={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},w.set(n,P),(w=C.querySelector(xo(n)))&&!w._p&&(P.instance=w,P.state.loading=5),xi.has(n)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},xi.set(n,a),w||n2(C,n,a,P.state))),r&&f===null)throw Error(s(528,""));return P}if(r&&f!==null)throw Error(s(529,""));return null;case"script":return r=a.async,a=a.src,typeof a=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(r=ha(a),a=Ar(C).hoistableScripts,f=a.get(r),f||(f={type:"script",instance:null,count:0,state:null},a.set(r,f)),f):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,n))}}function ca(n){return'href="'+Kn(n)+'"'}function xo(n){return'link[rel="stylesheet"]['+n+"]"}function i_(n){return h({},n,{"data-precedence":n.precedence,precedence:null})}function n2(n,r,a,f){n.querySelector('link[rel="preload"][as="style"]['+r+"]")?f.loading=1:(r=n.createElement("link"),f.preload=r,r.addEventListener("load",function(){return f.loading|=1}),r.addEventListener("error",function(){return f.loading|=2}),Rn(r,"link",a),cn(r),n.head.appendChild(r))}function ha(n){return'[src="'+Kn(n)+'"]'}function wo(n){return"script[async]"+n}function r_(n,r,a){if(r.count++,r.instance===null)switch(r.type){case"style":var f=n.querySelector('style[data-href~="'+Kn(a.href)+'"]');if(f)return r.instance=f,cn(f),f;var C=h({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return f=(n.ownerDocument||n).createElement("style"),cn(f),Rn(f,"style",C),ku(f,a.precedence,n),r.instance=f;case"stylesheet":C=ca(a.href);var w=n.querySelector(xo(C));if(w)return r.state.loading|=4,r.instance=w,cn(w),w;f=i_(a),(C=xi.get(C))&&Nd(f,C),w=(n.ownerDocument||n).createElement("link"),cn(w);var P=w;return P._p=new Promise(function(V,ie){P.onload=V,P.onerror=ie}),Rn(w,"link",f),r.state.loading|=4,ku(w,a.precedence,n),r.instance=w;case"script":return w=ha(a.src),(C=n.querySelector(wo(w)))?(r.instance=C,cn(C),C):(f=a,(C=xi.get(w))&&(f=h({},a),Md(f,C)),n=n.ownerDocument||n,C=n.createElement("script"),cn(C),Rn(C,"link",f),n.head.appendChild(C),r.instance=C);case"void":return null;default:throw Error(s(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(f=r.instance,r.state.loading|=4,ku(f,a.precedence,n));return r.instance}function ku(n,r,a){for(var f=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),C=f.length?f[f.length-1]:null,w=C,P=0;P<f.length;P++){var V=f[P];if(V.dataset.precedence===r)w=V;else if(w!==C)break}w?w.parentNode.insertBefore(n,w.nextSibling):(r=a.nodeType===9?a.head:a,r.insertBefore(n,r.firstChild))}function Nd(n,r){n.crossOrigin==null&&(n.crossOrigin=r.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=r.referrerPolicy),n.title==null&&(n.title=r.title)}function Md(n,r){n.crossOrigin==null&&(n.crossOrigin=r.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=r.referrerPolicy),n.integrity==null&&(n.integrity=r.integrity)}var Lu=null;function s_(n,r,a){if(Lu===null){var f=new Map,C=Lu=new Map;C.set(a,f)}else C=Lu,f=C.get(a),f||(f=new Map,C.set(a,f));if(f.has(n))return f;for(f.set(n,null),a=a.getElementsByTagName(n),C=0;C<a.length;C++){var w=a[C];if(!(w[rs]||w[rn]||n==="link"&&w.getAttribute("rel")==="stylesheet")&&w.namespaceURI!=="http://www.w3.org/2000/svg"){var P=w.getAttribute(r)||"";P=n+P;var V=f.get(P);V?V.push(w):f.set(P,[w])}}return f}function a_(n,r,a){n=n.ownerDocument||n,n.head.insertBefore(a,r==="title"?n.querySelector("head > title"):null)}function i2(n,r,a){if(a===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 o_(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function r2(n,r,a,f){if(a.type==="stylesheet"&&(typeof f.media!="string"||matchMedia(f.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var C=ca(f.href),w=r.querySelector(xo(C));if(w){r=w._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(n.count++,n=Ou.bind(n),r.then(n,n)),a.state.loading|=4,a.instance=w,cn(w);return}w=r.ownerDocument||r,f=i_(f),(C=xi.get(C))&&Nd(f,C),w=w.createElement("link"),cn(w);var P=w;P._p=new Promise(function(V,ie){P.onload=V,P.onerror=ie}),Rn(w,"link",f),a.instance=w}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(a,r),(r=a.state.preload)&&(a.state.loading&3)===0&&(n.count++,a=Ou.bind(n),r.addEventListener("load",a),r.addEventListener("error",a))}}var Id=0;function s2(n,r){return n.stylesheets&&n.count===0&&Mu(n,n.stylesheets),0<n.count||0<n.imgCount?function(a){var f=setTimeout(function(){if(n.stylesheets&&Mu(n,n.stylesheets),n.unsuspend){var w=n.unsuspend;n.unsuspend=null,w()}},6e4+r);0<n.imgBytes&&Id===0&&(Id=62500*UC());var C=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&Mu(n,n.stylesheets),n.unsuspend)){var w=n.unsuspend;n.unsuspend=null,w()}},(n.imgBytes>Id?50:800)+r);return n.unsuspend=a,function(){n.unsuspend=null,clearTimeout(f),clearTimeout(C)}}:null}function Ou(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Mu(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var Nu=null;function Mu(n,r){n.stylesheets=null,n.unsuspend!==null&&(n.count++,Nu=new Map,r.forEach(a2,n),Nu=null,Ou.call(n))}function a2(n,r){if(!(r.state.loading&4)){var a=Nu.get(n);if(a)var f=a.get(null);else{a=new Map,Nu.set(n,a);for(var C=n.querySelectorAll("link[data-precedence],style[data-precedence]"),w=0;w<C.length;w++){var P=C[w];(P.nodeName==="LINK"||P.getAttribute("media")!=="not all")&&(a.set(P.dataset.precedence,P),f=P)}f&&a.set(null,f)}C=r.instance,P=C.getAttribute("data-precedence"),w=a.get(P)||f,w===f&&a.set(null,C),a.set(P,C),this.count++,f=Ou.bind(this),C.addEventListener("load",f),C.addEventListener("error",f),w?w.parentNode.insertBefore(C,w.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(C,n.firstChild)),r.state.loading|=4}}var Do={$$typeof:S,Provider:null,Consumer:null,_currentValue:Q,_currentValue2:Q,_threadCount:0};function o2(n,r,a,f,C,w,P,V,ie){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=pt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=pt(0),this.hiddenUpdates=pt(null),this.identifierPrefix=f,this.onUncaughtError=C,this.onCaughtError=w,this.onRecoverableError=P,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=ie,this.incompleteTransitions=new Map}function l_(n,r,a,f,C,w,P,V,ie,de,Ee,Se){return n=new o2(n,r,a,P,ie,de,Ee,Se,V),r=1,w===!0&&(r|=24),w=ui(3,null,null,r),n.current=w,w.stateNode=n,r=ph(),r.refCount++,n.pooledCache=r,r.refCount++,w.memoizedState={element:f,isDehydrated:a,cache:r},bh(w),n}function u_(n){return n?(n=js,n):js}function c_(n,r,a,f,C,w){C=u_(C),f.context===null?f.context=C:f.pendingContext=C,f=Mr(r),f.payload={element:a},w=w===void 0?null:w,w!==null&&(f.callback=w),a=Ir(n,f,r),a!==null&&(ei(a,n,r),so(a,n,r))}function h_(n,r){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var a=n.retryLane;n.retryLane=a!==0&&a<r?a:r}}function Bd(n,r){h_(n,r),(n=n.alternate)&&h_(n,r)}function d_(n){if(n.tag===13||n.tag===31){var r=cs(n,67108864);r!==null&&ei(r,n,67108864),Bd(n,67108864)}}function f_(n){if(n.tag===13||n.tag===31){var r=pi();r=kt(r);var a=cs(n,r);a!==null&&ei(a,n,r),Bd(n,r)}}var Iu=!0;function l2(n,r,a,f){var C=Y.T;Y.T=null;var w=K.p;try{K.p=2,Fd(n,r,a,f)}finally{K.p=w,Y.T=C}}function u2(n,r,a,f){var C=Y.T;Y.T=null;var w=K.p;try{K.p=8,Fd(n,r,a,f)}finally{K.p=w,Y.T=C}}function Fd(n,r,a,f){if(Iu){var C=Pd(f);if(C===null)Cd(n,r,f,Bu,a),g_(n,f);else if(h2(C,n,r,a,f))f.stopPropagation();else if(g_(n,f),r&4&&-1<c2.indexOf(n)){for(;C!==null;){var w=Zi(C);if(w!==null)switch(w.tag){case 3:if(w=w.stateNode,w.current.memoizedState.isDehydrated){var P=Rt(w.pendingLanes);if(P!==0){var V=w;for(V.pendingLanes|=2,V.entangledLanes|=2;P;){var ie=1<<31-Et(P);V.entanglements[1]|=ie,P&=~ie}$i(w),(Dt&6)===0&&(bu=$e()+500,yo(0))}}break;case 31:case 13:V=cs(w,2),V!==null&&ei(V,w,2),vu(),Bd(w,2)}if(w=Pd(f),w===null&&Cd(n,r,f,Bu,a),w===C)break;C=w}C!==null&&f.stopPropagation()}else Cd(n,r,f,null,a)}}function Pd(n){return n=st(n),Ud(n)}var Bu=null;function Ud(n){if(Bu=null,n=Un(n),n!==null){var r=p(n);if(r===null)n=null;else{var a=r.tag;if(a===13){if(n=d(r),n!==null)return n;n=null}else if(a===31){if(n=o(r),n!==null)return n;n=null}else if(a===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;n=null}else r!==n&&(n=null)}}return Bu=n,null}function p_(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(xt()){case fe:return 2;case Ce:return 8;case Ie:case qe:return 32;case Ye:return 268435456;default:return 32}default:return 32}}var Hd=!1,Yr=null,Gr=null,Kr=null,Ro=new Map,ko=new Map,Vr=[],c2="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 g_(n,r){switch(n){case"focusin":case"focusout":Yr=null;break;case"dragenter":case"dragleave":Gr=null;break;case"mouseover":case"mouseout":Kr=null;break;case"pointerover":case"pointerout":Ro.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":ko.delete(r.pointerId)}}function Lo(n,r,a,f,C,w){return n===null||n.nativeEvent!==w?(n={blockedOn:r,domEventName:a,eventSystemFlags:f,nativeEvent:w,targetContainers:[C]},r!==null&&(r=Zi(r),r!==null&&d_(r)),n):(n.eventSystemFlags|=f,r=n.targetContainers,C!==null&&r.indexOf(C)===-1&&r.push(C),n)}function h2(n,r,a,f,C){switch(r){case"focusin":return Yr=Lo(Yr,n,r,a,f,C),!0;case"dragenter":return Gr=Lo(Gr,n,r,a,f,C),!0;case"mouseover":return Kr=Lo(Kr,n,r,a,f,C),!0;case"pointerover":var w=C.pointerId;return Ro.set(w,Lo(Ro.get(w)||null,n,r,a,f,C)),!0;case"gotpointercapture":return w=C.pointerId,ko.set(w,Lo(ko.get(w)||null,n,r,a,f,C)),!0}return!1}function m_(n){var r=Un(n.target);if(r!==null){var a=p(r);if(a!==null){if(r=a.tag,r===13){if(r=d(a),r!==null){n.blockedOn=r,_i(n.priority,function(){f_(a)});return}}else if(r===31){if(r=o(a),r!==null){n.blockedOn=r,_i(n.priority,function(){f_(a)});return}}else if(r===3&&a.stateNode.current.memoizedState.isDehydrated){n.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}n.blockedOn=null}function Fu(n){if(n.blockedOn!==null)return!1;for(var r=n.targetContainers;0<r.length;){var a=Pd(n.nativeEvent);if(a===null){a=n.nativeEvent;var f=new a.constructor(a.type,a);ze=f,a.target.dispatchEvent(f),ze=null}else return r=Zi(a),r!==null&&d_(r),n.blockedOn=a,!1;r.shift()}return!0}function __(n,r,a){Fu(n)&&a.delete(r)}function d2(){Hd=!1,Yr!==null&&Fu(Yr)&&(Yr=null),Gr!==null&&Fu(Gr)&&(Gr=null),Kr!==null&&Fu(Kr)&&(Kr=null),Ro.forEach(__),ko.forEach(__)}function Pu(n,r){n.blockedOn===r&&(n.blockedOn=null,Hd||(Hd=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,d2)))}var Uu=null;function b_(n){Uu!==n&&(Uu=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Uu===n&&(Uu=null);for(var r=0;r<n.length;r+=3){var a=n[r],f=n[r+1],C=n[r+2];if(typeof f!="function"){if(Ud(f||a)===null)continue;break}var w=Zi(a);w!==null&&(n.splice(r,3),r-=3,Ph(w,{pending:!0,data:C,method:a.method,action:f},f,C))}}))}function da(n){function r(ie){return Pu(ie,n)}Yr!==null&&Pu(Yr,n),Gr!==null&&Pu(Gr,n),Kr!==null&&Pu(Kr,n),Ro.forEach(r),ko.forEach(r);for(var a=0;a<Vr.length;a++){var f=Vr[a];f.blockedOn===n&&(f.blockedOn=null)}for(;0<Vr.length&&(a=Vr[0],a.blockedOn===null);)m_(a),a.blockedOn===null&&Vr.shift();if(a=(n.ownerDocument||n).$$reactFormReplay,a!=null)for(f=0;f<a.length;f+=3){var C=a[f],w=a[f+1],P=C[Ln]||null;if(typeof w=="function")P||b_(a);else if(P){var V=null;if(w&&w.hasAttribute("formAction")){if(C=w,P=w[Ln]||null)V=P.formAction;else if(Ud(C)!==null)continue}else V=P.action;typeof V=="function"?a[f+1]=V:(a.splice(f,3),f-=3),b_(a)}}}function E_(){function n(w){w.canIntercept&&w.info==="react-transition"&&w.intercept({handler:function(){return new Promise(function(P){return C=P})},focusReset:"manual",scroll:"manual"})}function r(){C!==null&&(C(),C=null),f||setTimeout(a,20)}function a(){if(!f&&!navigation.transition){var w=navigation.currentEntry;w&&w.url!=null&&navigation.navigate(w.url,{state:w.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var f=!1,C=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",r),navigation.addEventListener("navigateerror",r),setTimeout(a,100),function(){f=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",r),navigation.removeEventListener("navigateerror",r),C!==null&&(C(),C=null)}}}function zd(n){this._internalRoot=n}Hu.prototype.render=zd.prototype.render=function(n){var r=this._internalRoot;if(r===null)throw Error(s(409));var a=r.current,f=pi();c_(a,f,n,r,null,null)},Hu.prototype.unmount=zd.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var r=n.containerInfo;c_(n.current,2,null,n,null,null),vu(),r[Cr]=null}};function Hu(n){this._internalRoot=n}Hu.prototype.unstable_scheduleHydration=function(n){if(n){var r=Pn();n={blockedOn:null,target:n,priority:r};for(var a=0;a<Vr.length&&r!==0&&r<Vr[a].priority;a++);Vr.splice(a,0,n),a===0&&m_(n)}};var v_=t.version;if(v_!=="19.2.4")throw Error(s(527,v_,"19.2.4"));K.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=c(r),n=n!==null?g(n):null,n=n===null?null:n.stateNode,n};var f2={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:Y,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var zu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zu.isDisabled&&zu.supportsFiber)try{Yt=zu.inject(f2),Lt=zu}catch{}}return No.createRoot=function(n,r){if(!u(n))throw Error(s(299));var a=!1,f="",C=wg,w=Dg,P=Rg;return r!=null&&(r.unstable_strictMode===!0&&(a=!0),r.identifierPrefix!==void 0&&(f=r.identifierPrefix),r.onUncaughtError!==void 0&&(C=r.onUncaughtError),r.onCaughtError!==void 0&&(w=r.onCaughtError),r.onRecoverableError!==void 0&&(P=r.onRecoverableError)),r=l_(n,1,!1,null,null,a,f,null,C,w,P,E_),n[Cr]=r.current,yd(n),new zd(r)},No.hydrateRoot=function(n,r,a){if(!u(n))throw Error(s(299));var f=!1,C="",w=wg,P=Dg,V=Rg,ie=null;return a!=null&&(a.unstable_strictMode===!0&&(f=!0),a.identifierPrefix!==void 0&&(C=a.identifierPrefix),a.onUncaughtError!==void 0&&(w=a.onUncaughtError),a.onCaughtError!==void 0&&(P=a.onCaughtError),a.onRecoverableError!==void 0&&(V=a.onRecoverableError),a.formState!==void 0&&(ie=a.formState)),r=l_(n,1,!0,r,a??null,f,C,ie,w,P,V,E_),r.context=u_(null),a=r.current,f=pi(),f=kt(f),C=Mr(f),C.callback=null,Ir(a,C,f),a=f,r.current.lanes=a,yt(r,a),$i(r),n[Cr]=r.current,yd(n),new Hu(r)},No.version="19.2.4",No}var k_;function y2(){if(k_)return Wd.exports;k_=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(),Wd.exports=S2(),Wd.exports}var C2=y2();/**
50
- * react-router v7.13.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 L_="popstate";function O_(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function T2(e={}){function t(s,u){var c;let p=(c=u.state)==null?void 0:c.masked,{pathname:d,search:o,hash:l}=p||s.location;return kf("",{pathname:d,search:o,hash:l},u.state&&u.state.usr||null,u.state&&u.state.key||"default",p?{pathname:s.location.pathname,search:s.location.search,hash:s.location.hash}:void 0)}function i(s,u){return typeof u=="string"?u:rl(u)}return x2(t,i,null,e)}function Jt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Fi(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 N_(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function kf(e,t,i=null,s,u){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Da(t):t,state:i,key:t&&t.key||s||A2(),unstable_mask:u}}function rl({pathname:e="/",search:t="",hash:i=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),i&&i!=="#"&&(e+=i.charAt(0)==="#"?i:"#"+i),e}function Da(e){let t={};if(e){let i=e.indexOf("#");i>=0&&(t.hash=e.substring(i),e=e.substring(0,i));let s=e.indexOf("?");s>=0&&(t.search=e.substring(s),e=e.substring(0,s)),e&&(t.pathname=e)}return t}function x2(e,t,i,s={}){let{window:u=document.defaultView,v5Compat:p=!1}=s,d=u.history,o="POP",l=null,c=g();c==null&&(c=0,d.replaceState({...d.state,idx:c},""));function g(){return(d.state||{idx:null}).idx}function h(){o="POP";let m=g(),_=m==null?null:m-c;c=m,l&&l({action:o,location:E.location,delta:_})}function b(m,_){o="PUSH";let v=O_(m)?m:kf(E.location,m,_);c=g()+1;let S=N_(v,c),x=E.createHref(v.unstable_mask||v);try{d.pushState(S,"",x)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;u.location.assign(x)}p&&l&&l({action:o,location:E.location,delta:1})}function y(m,_){o="REPLACE";let v=O_(m)?m:kf(E.location,m,_);c=g();let S=N_(v,c),x=E.createHref(v.unstable_mask||v);d.replaceState(S,"",x),p&&l&&l({action:o,location:E.location,delta:0})}function T(m){return w2(m)}let E={get action(){return o},get location(){return e(u,d)},listen(m){if(l)throw new Error("A history only accepts one active listener");return u.addEventListener(L_,h),l=m,()=>{u.removeEventListener(L_,h),l=null}},createHref(m){return t(u,m)},createURL:T,encodeLocation(m){let _=T(m);return{pathname:_.pathname,search:_.search,hash:_.hash}},push:b,replace:y,go(m){return d.go(m)}};return E}function w2(e,t=!1){let i="http://localhost";typeof window<"u"&&(i=window.location.origin!=="null"?window.location.origin:window.location.href),Jt(i,"No window.location.(origin|href) available to create URL");let s=typeof e=="string"?e:rl(e);return s=s.replace(/ $/,"%20"),!t&&s.startsWith("//")&&(s=i+s),new URL(s,i)}function Wb(e,t,i="/"){return D2(e,t,i,!1)}function D2(e,t,i,s){let u=typeof t=="string"?Da(t):t,p=br(u.pathname||"/",i);if(p==null)return null;let d=qb(e);R2(d);let o=null;for(let l=0;o==null&&l<d.length;++l){let c=H2(p);o=P2(d[l],c,s)}return o}function qb(e,t=[],i=[],s="",u=!1){let p=(d,o,l=u,c)=>{let g={relativePath:c===void 0?d.path||"":c,caseSensitive:d.caseSensitive===!0,childrenIndex:o,route:d};if(g.relativePath.startsWith("/")){if(!g.relativePath.startsWith(s)&&l)return;Jt(g.relativePath.startsWith(s),`Absolute route path "${g.relativePath}" nested under path "${s}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),g.relativePath=g.relativePath.slice(s.length)}let h=Gi([s,g.relativePath]),b=i.concat(g);d.children&&d.children.length>0&&(Jt(d.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${h}".`),qb(d.children,t,b,h,l)),!(d.path==null&&!d.index)&&t.push({path:h,score:B2(h,d.index),routesMeta:b})};return e.forEach((d,o)=>{var l;if(d.path===""||!((l=d.path)!=null&&l.includes("?")))p(d,o);else for(let c of Yb(d.path))p(d,o,!0,c)}),t}function Yb(e){let t=e.split("/");if(t.length===0)return[];let[i,...s]=t,u=i.endsWith("?"),p=i.replace(/\?$/,"");if(s.length===0)return u?[p,""]:[p];let d=Yb(s.join("/")),o=[];return o.push(...d.map(l=>l===""?p:[p,l].join("/"))),u&&o.push(...d),o.map(l=>e.startsWith("/")&&l===""?"/":l)}function R2(e){e.sort((t,i)=>t.score!==i.score?i.score-t.score:F2(t.routesMeta.map(s=>s.childrenIndex),i.routesMeta.map(s=>s.childrenIndex)))}var k2=/^:[\w-]+$/,L2=3,O2=2,N2=1,M2=10,I2=-2,M_=e=>e==="*";function B2(e,t){let i=e.split("/"),s=i.length;return i.some(M_)&&(s+=I2),t&&(s+=O2),i.filter(u=>!M_(u)).reduce((u,p)=>u+(k2.test(p)?L2:p===""?N2:M2),s)}function F2(e,t){return e.length===t.length&&e.slice(0,-1).every((s,u)=>s===t[u])?e[e.length-1]-t[t.length-1]:0}function P2(e,t,i=!1){let{routesMeta:s}=e,u={},p="/",d=[];for(let o=0;o<s.length;++o){let l=s[o],c=o===s.length-1,g=p==="/"?t:t.slice(p.length)||"/",h=hc({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},g),b=l.route;if(!h&&c&&i&&!s[s.length-1].route.index&&(h=hc({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},g)),!h)return null;Object.assign(u,h.params),d.push({params:u,pathname:Gi([p,h.pathname]),pathnameBase:W2(Gi([p,h.pathnameBase])),route:b}),h.pathnameBase!=="/"&&(p=Gi([p,h.pathnameBase]))}return d}function hc(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[i,s]=U2(e.path,e.caseSensitive,e.end),u=t.match(i);if(!u)return null;let p=u[0],d=p.replace(/(.)\/+$/,"$1"),o=u.slice(1);return{params:s.reduce((c,{paramName:g,isOptional:h},b)=>{if(g==="*"){let T=o[b]||"";d=p.slice(0,p.length-T.length).replace(/(.)\/+$/,"$1")}const y=o[b];return h&&!y?c[g]=void 0:c[g]=(y||"").replace(/%2F/g,"/"),c},{}),pathname:p,pathnameBase:d,pattern:e}}function U2(e,t=!1,i=!0){Fi(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=[],u="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,o,l,c,g)=>{if(s.push({paramName:o,isOptional:l!=null}),l){let h=g.charAt(c+d.length);return h&&h!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(s.push({paramName:"*"}),u+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?u+="\\/*$":e!==""&&e!=="/"&&(u+="(?:(?=\\/|$))"),[new RegExp(u,t?void 0:"i"),s]}function H2(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Fi(!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 br(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let i=t.endsWith("/")?t.length-1:t.length,s=e.charAt(i);return s&&s!=="/"?null:e.slice(i)||"/"}var z2=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function j2(e,t="/"){let{pathname:i,search:s="",hash:u=""}=typeof e=="string"?Da(e):e,p;return i?(i=i.replace(/\/\/+/g,"/"),i.startsWith("/")?p=I_(i.substring(1),"/"):p=I_(i,t)):p=t,{pathname:p,search:q2(s),hash:Y2(u)}}function I_(e,t){let i=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(u=>{u===".."?i.length>1&&i.pop():u!=="."&&i.push(u)}),i.length>1?i.join("/"):"/"}function Kd(e,t,i,s){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(s)}]. Please separate it out to the \`to.${i}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function $2(e){return e.filter((t,i)=>i===0||t.route.path&&t.route.path.length>0)}function Gb(e){let t=$2(e);return t.map((i,s)=>s===t.length-1?i.pathname:i.pathnameBase)}function s0(e,t,i,s=!1){let u;typeof e=="string"?u=Da(e):(u={...e},Jt(!u.pathname||!u.pathname.includes("?"),Kd("?","pathname","search",u)),Jt(!u.pathname||!u.pathname.includes("#"),Kd("#","pathname","hash",u)),Jt(!u.search||!u.search.includes("#"),Kd("#","search","hash",u)));let p=e===""||u.pathname==="",d=p?"/":u.pathname,o;if(d==null)o=i;else{let h=t.length-1;if(!s&&d.startsWith("..")){let b=d.split("/");for(;b[0]==="..";)b.shift(),h-=1;u.pathname=b.join("/")}o=h>=0?t[h]:"/"}let l=j2(u,o),c=d&&d!=="/"&&d.endsWith("/"),g=(p||d===".")&&i.endsWith("/");return!l.pathname.endsWith("/")&&(c||g)&&(l.pathname+="/"),l}var Gi=e=>e.join("/").replace(/\/\/+/g,"/"),W2=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),q2=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Y2=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,G2=class{constructor(e,t,i,s=!1){this.status=e,this.statusText=t||"",this.internal=s,i instanceof Error?(this.data=i.toString(),this.error=i):this.data=i}};function K2(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function V2(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Kb=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Vb(e,t){let i=e;if(typeof i!="string"||!z2.test(i))return{absoluteURL:void 0,isExternal:!1,to:i};let s=i,u=!1;if(Kb)try{let p=new URL(window.location.href),d=i.startsWith("//")?new URL(p.protocol+i):new URL(i),o=br(d.pathname,t);d.origin===p.origin&&o!=null?i=o+d.search+d.hash:u=!0}catch{Fi(!1,`<Link to="${i}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:s,isExternal:u,to:i}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Xb=["POST","PUT","PATCH","DELETE"];new Set(Xb);var X2=["GET",...Xb];new Set(X2);var Ra=B.createContext(null);Ra.displayName="DataRouter";var Ac=B.createContext(null);Ac.displayName="DataRouterState";var Q2=B.createContext(!1),Qb=B.createContext({isTransitioning:!1});Qb.displayName="ViewTransition";var Z2=B.createContext(new Map);Z2.displayName="Fetchers";var J2=B.createContext(null);J2.displayName="Await";var Li=B.createContext(null);Li.displayName="Navigation";var fl=B.createContext(null);fl.displayName="Location";var Er=B.createContext({outlet:null,matches:[],isDataRoute:!1});Er.displayName="Route";var a0=B.createContext(null);a0.displayName="RouteError";var Zb="REACT_ROUTER_ERROR",eT="REDIRECT",tT="ROUTE_ERROR_RESPONSE";function nT(e){if(e.startsWith(`${Zb}:${eT}:{`))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 iT(e){if(e.startsWith(`${Zb}:${tT}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new G2(t.status,t.statusText,t.data)}catch{}}function rT(e,{relative:t}={}){Jt(pl(),"useHref() may be used only in the context of a <Router> component.");let{basename:i,navigator:s}=B.useContext(Li),{hash:u,pathname:p,search:d}=gl(e,{relative:t}),o=p;return i!=="/"&&(o=p==="/"?i:Gi([i,p])),s.createHref({pathname:o,search:d,hash:u})}function pl(){return B.useContext(fl)!=null}function vr(){return Jt(pl(),"useLocation() may be used only in the context of a <Router> component."),B.useContext(fl).location}var Jb="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function eE(e){B.useContext(Li).static||B.useLayoutEffect(e)}function o0(){let{isDataRoute:e}=B.useContext(Er);return e?_T():sT()}function sT(){Jt(pl(),"useNavigate() may be used only in the context of a <Router> component.");let e=B.useContext(Ra),{basename:t,navigator:i}=B.useContext(Li),{matches:s}=B.useContext(Er),{pathname:u}=vr(),p=JSON.stringify(Gb(s)),d=B.useRef(!1);return eE(()=>{d.current=!0}),B.useCallback((l,c={})=>{if(Fi(d.current,Jb),!d.current)return;if(typeof l=="number"){i.go(l);return}let g=s0(l,JSON.parse(p),u,c.relative==="path");e==null&&t!=="/"&&(g.pathname=g.pathname==="/"?t:Gi([t,g.pathname])),(c.replace?i.replace:i.push)(g,c.state,c)},[t,i,p,u,e])}B.createContext(null);function gl(e,{relative:t}={}){let{matches:i}=B.useContext(Er),{pathname:s}=vr(),u=JSON.stringify(Gb(i));return B.useMemo(()=>s0(e,JSON.parse(u),s,t==="path"),[e,u,s,t])}function aT(e,t){return tE(e,t)}function tE(e,t,i){var m;Jt(pl(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=B.useContext(Li),{matches:u}=B.useContext(Er),p=u[u.length-1],d=p?p.params:{},o=p?p.pathname:"/",l=p?p.pathnameBase:"/",c=p&&p.route;{let _=c&&c.path||"";iE(o,!c||_.endsWith("*")||_.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${o}" (under <Route path="${_}">) 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="${_}"> to <Route path="${_==="/"?"*":`${_}/*`}">.`)}let g=vr(),h;if(t){let _=typeof t=="string"?Da(t):t;Jt(l==="/"||((m=_.pathname)==null?void 0:m.startsWith(l)),`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 "${l}" but pathname "${_.pathname}" was given in the \`location\` prop.`),h=_}else h=g;let b=h.pathname||"/",y=b;if(l!=="/"){let _=l.replace(/^\//,"").split("/");y="/"+b.replace(/^\//,"").split("/").slice(_.length).join("/")}let T=Wb(e,{pathname:y});Fi(c||T!=null,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),Fi(T==null||T[T.length-1].route.element!==void 0||T[T.length-1].route.Component!==void 0||T[T.length-1].route.lazy!==void 0,`Matched leaf route at location "${h.pathname}${h.search}${h.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 E=hT(T&&T.map(_=>Object.assign({},_,{params:Object.assign({},d,_.params),pathname:Gi([l,s.encodeLocation?s.encodeLocation(_.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?l:Gi([l,s.encodeLocation?s.encodeLocation(_.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:_.pathnameBase])})),u,i);return t&&E?B.createElement(fl.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...h},navigationType:"POP"}},E):E}function oT(){let e=mT(),t=K2(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),i=e instanceof Error?e.stack:null,s="rgba(200,200,200, 0.5)",u={padding:"0.5rem",backgroundColor:s},p={padding:"2px 4px",backgroundColor:s},d=null;return console.error("Error handled by React Router default ErrorBoundary:",e),d=B.createElement(B.Fragment,null,B.createElement("p",null,"💿 Hey developer 👋"),B.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",B.createElement("code",{style:p},"ErrorBoundary")," or"," ",B.createElement("code",{style:p},"errorElement")," prop on your route.")),B.createElement(B.Fragment,null,B.createElement("h2",null,"Unexpected Application Error!"),B.createElement("h3",{style:{fontStyle:"italic"}},t),i?B.createElement("pre",{style:u},i):null,d)}var lT=B.createElement(oT,null),nE=class extends B.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 i=iT(e.digest);i&&(e=i)}let t=e!==void 0?B.createElement(Er.Provider,{value:this.props.routeContext},B.createElement(a0.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?B.createElement(uT,{error:e},t):t}};nE.contextType=Q2;var Vd=new WeakMap;function uT({children:e,error:t}){let{basename:i}=B.useContext(Li);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let s=nT(t.digest);if(s){let u=Vd.get(t);if(u)throw u;let p=Vb(s.location,i);if(Kb&&!Vd.get(t))if(p.isExternal||s.reloadDocument)window.location.href=p.absoluteURL||p.to;else{const d=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(p.to,{replace:s.replace}));throw Vd.set(t,d),d}return B.createElement("meta",{httpEquiv:"refresh",content:`0;url=${p.absoluteURL||p.to}`})}}return e}function cT({routeContext:e,match:t,children:i}){let s=B.useContext(Ra);return s&&s.static&&s.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=t.route.id),B.createElement(Er.Provider,{value:e},i)}function hT(e,t=[],i){let s=i==null?void 0:i.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 u=e,p=s==null?void 0:s.errors;if(p!=null){let g=u.findIndex(h=>h.route.id&&(p==null?void 0:p[h.route.id])!==void 0);Jt(g>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(p).join(",")}`),u=u.slice(0,Math.min(u.length,g+1))}let d=!1,o=-1;if(i&&s){d=s.renderFallback;for(let g=0;g<u.length;g++){let h=u[g];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(o=g),h.route.id){let{loaderData:b,errors:y}=s,T=h.route.loader&&!b.hasOwnProperty(h.route.id)&&(!y||y[h.route.id]===void 0);if(h.route.lazy||T){i.isStatic&&(d=!0),o>=0?u=u.slice(0,o+1):u=[u[0]];break}}}}let l=i==null?void 0:i.onError,c=s&&l?(g,h)=>{var b,y;l(g,{location:s.location,params:((y=(b=s.matches)==null?void 0:b[0])==null?void 0:y.params)??{},unstable_pattern:V2(s.matches),errorInfo:h})}:void 0;return u.reduceRight((g,h,b)=>{let y,T=!1,E=null,m=null;s&&(y=p&&h.route.id?p[h.route.id]:void 0,E=h.route.errorElement||lT,d&&(o<0&&b===0?(iE("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),T=!0,m=null):o===b&&(T=!0,m=h.route.hydrateFallbackElement||null)));let _=t.concat(u.slice(0,b+1)),v=()=>{let S;return y?S=E:T?S=m:h.route.Component?S=B.createElement(h.route.Component,null):h.route.element?S=h.route.element:S=g,B.createElement(cT,{match:h,routeContext:{outlet:g,matches:_,isDataRoute:s!=null},children:S})};return s&&(h.route.ErrorBoundary||h.route.errorElement||b===0)?B.createElement(nE,{location:s.location,revalidation:s.revalidation,component:E,error:y,children:v(),routeContext:{outlet:null,matches:_,isDataRoute:!0},onError:c}):v()},null)}function l0(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function dT(e){let t=B.useContext(Ra);return Jt(t,l0(e)),t}function fT(e){let t=B.useContext(Ac);return Jt(t,l0(e)),t}function pT(e){let t=B.useContext(Er);return Jt(t,l0(e)),t}function u0(e){let t=pT(e),i=t.matches[t.matches.length-1];return Jt(i.route.id,`${e} can only be used on routes that contain a unique "id"`),i.route.id}function gT(){return u0("useRouteId")}function mT(){var s;let e=B.useContext(a0),t=fT("useRouteError"),i=u0("useRouteError");return e!==void 0?e:(s=t.errors)==null?void 0:s[i]}function _T(){let{router:e}=dT("useNavigate"),t=u0("useNavigate"),i=B.useRef(!1);return eE(()=>{i.current=!0}),B.useCallback(async(u,p={})=>{Fi(i.current,Jb),i.current&&(typeof u=="number"?await e.navigate(u):await e.navigate(u,{fromRouteId:t,...p}))},[e,t])}var B_={};function iE(e,t,i){!t&&!B_[e]&&(B_[e]=!0,Fi(!1,i))}B.memo(bT);function bT({routes:e,future:t,state:i,isStatic:s,onError:u}){return tE(e,void 0,{state:i,isStatic:s,onError:u})}function Lf(e){Jt(!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 ET({basename:e="/",children:t=null,location:i,navigationType:s="POP",navigator:u,static:p=!1,unstable_useTransitions:d}){Jt(!pl(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let o=e.replace(/^\/*/,"/"),l=B.useMemo(()=>({basename:o,navigator:u,static:p,unstable_useTransitions:d,future:{}}),[o,u,p,d]);typeof i=="string"&&(i=Da(i));let{pathname:c="/",search:g="",hash:h="",state:b=null,key:y="default",unstable_mask:T}=i,E=B.useMemo(()=>{let m=br(c,o);return m==null?null:{location:{pathname:m,search:g,hash:h,state:b,key:y,unstable_mask:T},navigationType:s}},[o,c,g,h,b,y,s,T]);return Fi(E!=null,`<Router basename="${o}"> is not able to match the URL "${c}${g}${h}" because it does not start with the basename, so the <Router> won't render anything.`),E==null?null:B.createElement(Li.Provider,{value:l},B.createElement(fl.Provider,{children:t,value:E}))}function vT({children:e,location:t}){return aT(Of(e),t)}function Of(e,t=[]){let i=[];return B.Children.forEach(e,(s,u)=>{if(!B.isValidElement(s))return;let p=[...t,u];if(s.type===B.Fragment){i.push.apply(i,Of(s.props.children,p));return}Jt(s.type===Lf,`[${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>`),Jt(!s.props.index||!s.props.children,"An index route cannot have child routes.");let d={id:s.props.id||p.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=Of(s.props.children,p)),i.push(d)}),i}var rc="get",sc="application/x-www-form-urlencoded";function xc(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function ST(e){return xc(e)&&e.tagName.toLowerCase()==="button"}function yT(e){return xc(e)&&e.tagName.toLowerCase()==="form"}function CT(e){return xc(e)&&e.tagName.toLowerCase()==="input"}function TT(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function AT(e,t){return e.button===0&&(!t||t==="_self")&&!TT(e)}function Nf(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,i)=>{let s=e[i];return t.concat(Array.isArray(s)?s.map(u=>[i,u]):[[i,s]])},[]))}function xT(e,t){let i=Nf(e);return t&&t.forEach((s,u)=>{i.has(u)||t.getAll(u).forEach(p=>{i.append(u,p)})}),i}var ju=null;function wT(){if(ju===null)try{new FormData(document.createElement("form"),0),ju=!1}catch{ju=!0}return ju}var DT=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Xd(e){return e!=null&&!DT.has(e)?(Fi(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${sc}"`),null):e}function RT(e,t){let i,s,u,p,d;if(yT(e)){let o=e.getAttribute("action");s=o?br(o,t):null,i=e.getAttribute("method")||rc,u=Xd(e.getAttribute("enctype"))||sc,p=new FormData(e)}else if(ST(e)||CT(e)&&(e.type==="submit"||e.type==="image")){let o=e.form;if(o==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||o.getAttribute("action");if(s=l?br(l,t):null,i=e.getAttribute("formmethod")||o.getAttribute("method")||rc,u=Xd(e.getAttribute("formenctype"))||Xd(o.getAttribute("enctype"))||sc,p=new FormData(o,e),!wT()){let{name:c,type:g,value:h}=e;if(g==="image"){let b=c?`${c}.`:"";p.append(`${b}x`,"0"),p.append(`${b}y`,"0")}else c&&p.append(c,h)}}else{if(xc(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');i=rc,s=null,u=sc,d=e}return p&&u==="text/plain"&&(d=p,p=void 0),{action:s,method:i.toLowerCase(),encType:u,formData:p,body:d}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function c0(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function kT(e,t,i,s){let u=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return i?u.pathname.endsWith("/")?u.pathname=`${u.pathname}_.${s}`:u.pathname=`${u.pathname}.${s}`:u.pathname==="/"?u.pathname=`_root.${s}`:t&&br(u.pathname,t)==="/"?u.pathname=`${t.replace(/\/$/,"")}/_root.${s}`:u.pathname=`${u.pathname.replace(/\/$/,"")}.${s}`,u}async function LT(e,t){if(e.id in t)return t[e.id];try{let i=await import(e.module);return t[e.id]=i,i}catch(i){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(i),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function OT(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 NT(e,t,i){let s=await Promise.all(e.map(async u=>{let p=t.routes[u.route.id];if(p){let d=await LT(p,i);return d.links?d.links():[]}return[]}));return FT(s.flat(1).filter(OT).filter(u=>u.rel==="stylesheet"||u.rel==="preload").map(u=>u.rel==="stylesheet"?{...u,rel:"prefetch",as:"style"}:{...u,rel:"prefetch"}))}function F_(e,t,i,s,u,p){let d=(l,c)=>i[c]?l.route.id!==i[c].route.id:!0,o=(l,c)=>{var g;return i[c].pathname!==l.pathname||((g=i[c].route.path)==null?void 0:g.endsWith("*"))&&i[c].params["*"]!==l.params["*"]};return p==="assets"?t.filter((l,c)=>d(l,c)||o(l,c)):p==="data"?t.filter((l,c)=>{var h;let g=s.routes[l.route.id];if(!g||!g.hasLoader)return!1;if(d(l,c)||o(l,c))return!0;if(l.route.shouldRevalidate){let b=l.route.shouldRevalidate({currentUrl:new URL(u.pathname+u.search+u.hash,window.origin),currentParams:((h=i[0])==null?void 0:h.params)||{},nextUrl:new URL(e,window.origin),nextParams:l.params,defaultShouldRevalidate:!0});if(typeof b=="boolean")return b}return!0}):[]}function MT(e,t,{includeHydrateFallback:i}={}){return IT(e.map(s=>{let u=t.routes[s.route.id];if(!u)return[];let p=[u.module];return u.clientActionModule&&(p=p.concat(u.clientActionModule)),u.clientLoaderModule&&(p=p.concat(u.clientLoaderModule)),i&&u.hydrateFallbackModule&&(p=p.concat(u.hydrateFallbackModule)),u.imports&&(p=p.concat(u.imports)),p}).flat(1))}function IT(e){return[...new Set(e)]}function BT(e){let t={},i=Object.keys(e).sort();for(let s of i)t[s]=e[s];return t}function FT(e,t){let i=new Set;return new Set(t),e.reduce((s,u)=>{let p=JSON.stringify(BT(u));return i.has(p)||(i.add(p),s.push({key:p,link:u})),s},[])}function rE(){let e=B.useContext(Ra);return c0(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function PT(){let e=B.useContext(Ac);return c0(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var h0=B.createContext(void 0);h0.displayName="FrameworkContext";function sE(){let e=B.useContext(h0);return c0(e,"You must render this element inside a <HydratedRouter> element"),e}function UT(e,t){let i=B.useContext(h0),[s,u]=B.useState(!1),[p,d]=B.useState(!1),{onFocus:o,onBlur:l,onMouseEnter:c,onMouseLeave:g,onTouchStart:h}=t,b=B.useRef(null);B.useEffect(()=>{if(e==="render"&&d(!0),e==="viewport"){let E=_=>{_.forEach(v=>{d(v.isIntersecting)})},m=new IntersectionObserver(E,{threshold:.5});return b.current&&m.observe(b.current),()=>{m.disconnect()}}},[e]),B.useEffect(()=>{if(s){let E=setTimeout(()=>{d(!0)},100);return()=>{clearTimeout(E)}}},[s]);let y=()=>{u(!0)},T=()=>{u(!1),d(!1)};return i?e!=="intent"?[p,b,{}]:[p,b,{onFocus:Mo(o,y),onBlur:Mo(l,T),onMouseEnter:Mo(c,y),onMouseLeave:Mo(g,T),onTouchStart:Mo(h,y)}]:[!1,b,{}]}function Mo(e,t){return i=>{e&&e(i),i.defaultPrevented||t(i)}}function HT({page:e,...t}){let{router:i}=rE(),s=B.useMemo(()=>Wb(i.routes,e,i.basename),[i.routes,e,i.basename]);return s?B.createElement(jT,{page:e,matches:s,...t}):null}function zT(e){let{manifest:t,routeModules:i}=sE(),[s,u]=B.useState([]);return B.useEffect(()=>{let p=!1;return NT(e,t,i).then(d=>{p||u(d)}),()=>{p=!0}},[e,t,i]),s}function jT({page:e,matches:t,...i}){let s=vr(),{future:u,manifest:p,routeModules:d}=sE(),{basename:o}=rE(),{loaderData:l,matches:c}=PT(),g=B.useMemo(()=>F_(e,t,c,p,s,"data"),[e,t,c,p,s]),h=B.useMemo(()=>F_(e,t,c,p,s,"assets"),[e,t,c,p,s]),b=B.useMemo(()=>{if(e===s.pathname+s.search+s.hash)return[];let E=new Set,m=!1;if(t.forEach(v=>{var x;let S=p.routes[v.route.id];!S||!S.hasLoader||(!g.some(k=>k.route.id===v.route.id)&&v.route.id in l&&((x=d[v.route.id])!=null&&x.shouldRevalidate)||S.hasClientLoader?m=!0:E.add(v.route.id))}),E.size===0)return[];let _=kT(e,o,u.unstable_trailingSlashAwareDataRequests,"data");return m&&E.size>0&&_.searchParams.set("_routes",t.filter(v=>E.has(v.route.id)).map(v=>v.route.id).join(",")),[_.pathname+_.search]},[o,u.unstable_trailingSlashAwareDataRequests,l,s,p,g,t,e,d]),y=B.useMemo(()=>MT(h,p),[h,p]),T=zT(h);return B.createElement(B.Fragment,null,b.map(E=>B.createElement("link",{key:E,rel:"prefetch",as:"fetch",href:E,...i})),y.map(E=>B.createElement("link",{key:E,rel:"modulepreload",href:E,...i})),T.map(({key:E,link:m})=>B.createElement("link",{key:E,nonce:i.nonce,...m,crossOrigin:m.crossOrigin??i.crossOrigin})))}function $T(...e){return t=>{e.forEach(i=>{typeof i=="function"?i(t):i!=null&&(i.current=t)})}}var WT=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{WT&&(window.__reactRouterVersion="7.13.1")}catch{}function qT({basename:e,children:t,unstable_useTransitions:i,window:s}){let u=B.useRef();u.current==null&&(u.current=T2({window:s,v5Compat:!0}));let p=u.current,[d,o]=B.useState({action:p.action,location:p.location}),l=B.useCallback(c=>{i===!1?o(c):B.startTransition(()=>o(c))},[i]);return B.useLayoutEffect(()=>p.listen(l),[p,l]),B.createElement(ET,{basename:e,children:t,location:d.location,navigationType:d.action,navigator:p,unstable_useTransitions:i})}var aE=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Yo=B.forwardRef(function({onClick:t,discover:i="render",prefetch:s="none",relative:u,reloadDocument:p,replace:d,unstable_mask:o,state:l,target:c,to:g,preventScrollReset:h,viewTransition:b,unstable_defaultShouldRevalidate:y,...T},E){let{basename:m,navigator:_,unstable_useTransitions:v}=B.useContext(Li),S=typeof g=="string"&&aE.test(g),x=Vb(g,m);g=x.to;let k=rT(g,{relative:u}),A=vr(),O=null;if(o){let q=s0(o,[],A.unstable_mask?A.unstable_mask.pathname:"/",!0);m!=="/"&&(q.pathname=q.pathname==="/"?m:Gi([m,q.pathname])),O=_.createHref(q)}let[D,N,L]=UT(s,T),F=VT(g,{replace:d,unstable_mask:o,state:l,target:c,preventScrollReset:h,relative:u,viewTransition:b,unstable_defaultShouldRevalidate:y,unstable_useTransitions:v});function I(q){t&&t(q),q.defaultPrevented||F(q)}let z=!(x.isExternal||p),W=B.createElement("a",{...T,...L,href:(z?O:void 0)||x.absoluteURL||k,onClick:z?I:t,ref:$T(E,N),target:c,"data-discover":!S&&i==="render"?"true":void 0});return D&&!S?B.createElement(B.Fragment,null,W,B.createElement(HT,{page:k})):W});Yo.displayName="Link";var YT=B.forwardRef(function({"aria-current":t="page",caseSensitive:i=!1,className:s="",end:u=!1,style:p,to:d,viewTransition:o,children:l,...c},g){let h=gl(d,{relative:c.relative}),b=vr(),y=B.useContext(Ac),{navigator:T,basename:E}=B.useContext(Li),m=y!=null&&tA(h)&&o===!0,_=T.encodeLocation?T.encodeLocation(h).pathname:h.pathname,v=b.pathname,S=y&&y.navigation&&y.navigation.location?y.navigation.location.pathname:null;i||(v=v.toLowerCase(),S=S?S.toLowerCase():null,_=_.toLowerCase()),S&&E&&(S=br(S,E)||S);const x=_!=="/"&&_.endsWith("/")?_.length-1:_.length;let k=v===_||!u&&v.startsWith(_)&&v.charAt(x)==="/",A=S!=null&&(S===_||!u&&S.startsWith(_)&&S.charAt(_.length)==="/"),O={isActive:k,isPending:A,isTransitioning:m},D=k?t:void 0,N;typeof s=="function"?N=s(O):N=[s,k?"active":null,A?"pending":null,m?"transitioning":null].filter(Boolean).join(" ");let L=typeof p=="function"?p(O):p;return B.createElement(Yo,{...c,"aria-current":D,className:N,ref:g,style:L,to:d,viewTransition:o},typeof l=="function"?l(O):l)});YT.displayName="NavLink";var GT=B.forwardRef(({discover:e="render",fetcherKey:t,navigate:i,reloadDocument:s,replace:u,state:p,method:d=rc,action:o,onSubmit:l,relative:c,preventScrollReset:g,viewTransition:h,unstable_defaultShouldRevalidate:b,...y},T)=>{let{unstable_useTransitions:E}=B.useContext(Li),m=JT(),_=eA(o,{relative:c}),v=d.toLowerCase()==="get"?"get":"post",S=typeof o=="string"&&aE.test(o),x=k=>{if(l&&l(k),k.defaultPrevented)return;k.preventDefault();let A=k.nativeEvent.submitter,O=(A==null?void 0:A.getAttribute("formmethod"))||d,D=()=>m(A||k.currentTarget,{fetcherKey:t,method:O,navigate:i,replace:u,state:p,relative:c,preventScrollReset:g,viewTransition:h,unstable_defaultShouldRevalidate:b});E&&i!==!1?B.startTransition(()=>D()):D()};return B.createElement("form",{ref:T,method:v,action:_,onSubmit:s?l:x,...y,"data-discover":!S&&e==="render"?"true":void 0})});GT.displayName="Form";function KT(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function oE(e){let t=B.useContext(Ra);return Jt(t,KT(e)),t}function VT(e,{target:t,replace:i,unstable_mask:s,state:u,preventScrollReset:p,relative:d,viewTransition:o,unstable_defaultShouldRevalidate:l,unstable_useTransitions:c}={}){let g=o0(),h=vr(),b=gl(e,{relative:d});return B.useCallback(y=>{if(AT(y,t)){y.preventDefault();let T=i!==void 0?i:rl(h)===rl(b),E=()=>g(e,{replace:T,unstable_mask:s,state:u,preventScrollReset:p,relative:d,viewTransition:o,unstable_defaultShouldRevalidate:l});c?B.startTransition(()=>E()):E()}},[h,g,b,i,s,u,t,e,p,d,o,l,c])}function XT(e){Fi(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=B.useRef(Nf(e)),i=B.useRef(!1),s=vr(),u=B.useMemo(()=>xT(s.search,i.current?null:t.current),[s.search]),p=o0(),d=B.useCallback((o,l)=>{const c=Nf(typeof o=="function"?o(new URLSearchParams(u)):o);i.current=!0,p("?"+c,l)},[p,u]);return[u,d]}var QT=0,ZT=()=>`__${String(++QT)}__`;function JT(){let{router:e}=oE("useSubmit"),{basename:t}=B.useContext(Li),i=gT(),s=e.fetch,u=e.navigate;return B.useCallback(async(p,d={})=>{let{action:o,method:l,encType:c,formData:g,body:h}=RT(p,t);if(d.navigate===!1){let b=d.fetcherKey||ZT();await s(b,i,d.action||o,{unstable_defaultShouldRevalidate:d.unstable_defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:g,body:h,formMethod:d.method||l,formEncType:d.encType||c,flushSync:d.flushSync})}else await u(d.action||o,{unstable_defaultShouldRevalidate:d.unstable_defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:g,body:h,formMethod:d.method||l,formEncType:d.encType||c,replace:d.replace,state:d.state,fromRouteId:i,flushSync:d.flushSync,viewTransition:d.viewTransition})},[s,u,t,i])}function eA(e,{relative:t}={}){let{basename:i}=B.useContext(Li),s=B.useContext(Er);Jt(s,"useFormAction must be used inside a RouteContext");let[u]=s.matches.slice(-1),p={...gl(e||".",{relative:t})},d=vr();if(e==null){p.search=d.search;let o=new URLSearchParams(p.search),l=o.getAll("index");if(l.some(g=>g==="")){o.delete("index"),l.filter(h=>h).forEach(h=>o.append("index",h));let g=o.toString();p.search=g?`?${g}`:""}}return(!e||e===".")&&u.route.index&&(p.search=p.search?p.search.replace(/^\?/,"?index&"):"?index"),i!=="/"&&(p.pathname=p.pathname==="/"?i:Gi([i,p.pathname])),rl(p)}function tA(e,{relative:t}={}){let i=B.useContext(Qb);Jt(i!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:s}=oE("useViewTransitionState"),u=gl(e,{relative:t});if(!i.isTransitioning)return!1;let p=br(i.currentLocation.pathname,s)||i.currentLocation.pathname,d=br(i.nextLocation.pathname,s)||i.nextLocation.pathname;return hc(u.pathname,d)!=null||hc(u.pathname,p)!=null}var $o=$b();const P_=e=>{let t;const i=new Set,s=(c,g)=>{const h=typeof c=="function"?c(t):c;if(!Object.is(h,t)){const b=t;t=g??(typeof h!="object"||h===null)?h:Object.assign({},t,h),i.forEach(y=>y(t,b))}},u=()=>t,o={setState:s,getState:u,getInitialState:()=>l,subscribe:c=>(i.add(c),()=>i.delete(c))},l=t=e(s,u,o);return o},nA=(e=>e?P_(e):P_),iA=e=>e;function rA(e,t=iA){const i=yn.useSyncExternalStore(e.subscribe,yn.useCallback(()=>t(e.getState()),[e,t]),yn.useCallback(()=>t(e.getInitialState()),[e,t]));return yn.useDebugValue(i),i}const U_=e=>{const t=nA(e),i=s=>rA(t,s);return Object.assign(i,t),i},d0=(e=>e?U_(e):U_),bt=d0(e=>({isAuthenticated:!1,isCheckingAuth:!0,setAuthenticated:t=>e({isAuthenticated:t,isCheckingAuth:!1}),setCheckingAuth:t=>e({isCheckingAuth:t}),serverAvailable:null,setServerAvailable:t=>e({serverAvailable:t}),connectionStatus:"disconnected",instanceConnectionStatus:{},setConnectionStatus:t=>e({connectionStatus:t}),setInstanceConnectionStatus:(t,i)=>e(s=>({instanceConnectionStatus:{...s.instanceConnectionStatus,[t]:i}})),removeInstanceConnectionStatus:t=>e(i=>{const{[t]:s,...u}=i.instanceConnectionStatus;return{instanceConnectionStatus:u}}),sessionStatus:"idle",setSessionStatus:t=>e({sessionStatus:t}),cachedToken:null,setCachedToken:t=>e({cachedToken:t}),ipChangeInfo:null,setIpChangeInfo:t=>e({ipChangeInfo:t}),toastMessage:null,toastPersistent:!1,showToast:(t,i)=>e({toastMessage:t,toastPersistent:(i==null?void 0:i.persistent)??!1}),hideToast:()=>e({toastMessage:null,toastPersistent:!1}),showFloatingDocButton:!0,setShowFloatingDocButton:t=>e({showFloatingDocButton:t}),isDocButtonHiddenByLongPress:!1,setDocButtonHiddenByLongPress:t=>e({isDocButtonHiddenByLongPress:t})})),ws="/api";async function Ki(e){const t=await fetch(`${ws}/auth`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({token:e})});if(t.status===429)throw new Error("Too many attempts. Try again later.");return t.ok}async function sA(){const e=await fetch(`${ws}/status`,{credentials:"include"});if(e.status===401)throw new Error("Unauthorized");return e.json()}async function lE(e){const t=e?`${ws}/config?instanceId=${encodeURIComponent(e)}`:`${ws}/config`,i=await fetch(t,{credentials:"include"});if(i.status===401)throw new Error("Unauthorized");if(!i.ok)throw new Error(`Config fetch failed: ${i.status}`);return i.json()}async function aA(e,t){const i=t?`${ws}/config?instanceId=${encodeURIComponent(t)}`:`${ws}/config`,s=await fetch(i,{method:"PUT",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(e)});if(s.status===401)throw new Error("Unauthorized");return s.ok}async function oA(e,t){const i=await fetch(`${ws}/config/notifications/${e}/enabled`,{method:"PATCH",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({enabled:t})});if(i.status===401)throw new Error("Unauthorized");if(!i.ok){const s=await i.json().catch(()=>({}));throw new Error(s.error||`Failed to update channel status: ${i.status}`)}return i.json()}const f0="claude_remote_token";function uE(e){sessionStorage.setItem(f0,e)}function Ds(){return sessionStorage.getItem(f0)}function cE(){sessionStorage.removeItem(f0)}function lA(){const[e,t]=B.useState(null),[i,s]=B.useState(!1),u=bt(l=>l.setAuthenticated),p=bt(l=>l.setCachedToken),d=B.useCallback(async l=>{t(null),s(!0);try{await Ki(l)?(u(!0),p(l),uE(l)):t("Invalid token")}catch(c){t(c instanceof Error?c.message:"Authentication failed")}finally{s(!1)}},[u,p]),o=B.useCallback(()=>{u(!1),p(null),cE()},[u,p]);return{login:d,logout:o,error:e,loading:i}}function uA(){const[e,t]=B.useState(""),[i,s]=B.useState(!1),{login:u,error:p,loading:d}=lA();B.useEffect(()=>{const c=sessionStorage.getItem("prefill_token");c&&(t(c),sessionStorage.removeItem("prefill_token"))},[]);const o=c=>{c.preventDefault(),e.trim()&&u(e.trim())},l=c=>{c.key==="Enter"&&e.trim()&&u(e.trim())};return X.jsx("div",{style:{height:"100%",display:"flex",alignItems:"center",justifyContent:"center",padding:24,background:"var(--bg-primary)"},children:X.jsxs("form",{onSubmit:o,autoComplete:"off",style:{width:"100%",maxWidth:400,display:"flex",flexDirection:"column",gap:16},children:[X.jsxs("div",{style:{textAlign:"center",marginBottom:8},children:[X.jsx("h1",{"data-testid":"auth--title",style:{fontSize:24,fontWeight:700,marginBottom:8},children:"Claude Code Remote"}),X.jsx("p",{"data-testid":"auth--subtitle",style:{fontSize:14,color:"var(--text-secondary)"},children:"Enter the token shown on your PC terminal"})]}),X.jsxs("div",{style:{position:"relative"},children:[X.jsx("input",{type:"text",value:e,onChange:c=>t(c.target.value),onKeyDown:l,placeholder:"Paste token here…","aria-label":"Authentication token","data-testid":"auth--input--token",autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:!1,inputMode:"text",style:{width:"100%",height:48,padding:"0 48px 0 16px",borderRadius:8,border:"1px solid var(--border-color)",background:"var(--bg-tertiary)",fontSize:16,lineHeight:"48px",boxSizing:"border-box",WebkitTextSecurity:i?"none":"disc"}}),X.jsx("button",{type:"button",onClick:()=>s(!i),"aria-label":i?"Hide token":"Show token",style:{position:"absolute",right:12,top:"50%",transform:"translateY(-50%)",background:"none",border:"none",padding:8,cursor:"pointer",color:"var(--text-secondary)",display:"flex",alignItems:"center",justifyContent:"center"},children:i?X.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[X.jsx("path",{d:"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"}),X.jsx("line",{x1:"1",y1:"1",x2:"23",y2:"23"})]}):X.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[X.jsx("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),X.jsx("circle",{cx:"12",cy:"12",r:"3"})]})})]}),p&&X.jsx("div",{"data-testid":"auth--error",style:{color:"var(--status-error)",fontSize:14,textAlign:"center"},children:p}),X.jsx("button",{type:"submit",disabled:d||!e.trim(),"data-testid":"auth--button--connect",style:{height:48,borderRadius:8,background:e.trim()?"var(--status-running)":"var(--bg-tertiary)",color:e.trim()?"#fff":"var(--text-muted)",fontWeight:600,fontSize:16,transition:"background 0.15s",opacity:d?.7:1},children:d?"Authenticating…":"Connect"})]})})}const qn=d0(e=>({instances:[],activeInstanceId:null,setInstances:t=>e({instances:t}),setActiveInstanceId:t=>e({activeInstanceId:t})})),cA=[{label:"Esc",data:"\x1B",enabled:!0},{label:"Enter",data:"\r",enabled:!0},{label:"Tab",data:" ",enabled:!0},{label:"↑",data:"\x1B[A",enabled:!0},{label:"↓",data:"\x1B[B",enabled:!0},{label:"←",data:"\x1B[D",enabled:!0},{label:"→",data:"\x1B[C",enabled:!0},{label:"S-Tab",data:"\x1B[Z",enabled:!0,desc:"Shift+Tab, 向前切换"},{label:"Ctrl+O",data:"",enabled:!0},{label:"Ctrl+E",data:"",enabled:!0}],hA=[{label:"/clear",command:"/clear",enabled:!0},{label:"/compact",command:"/compact",enabled:!0},{label:"/resume",command:"/resume",enabled:!0},{label:"/stats",command:"/stats",enabled:!0},{label:"/exit",command:"/exit",enabled:!0}],dA={dingtalk:{displayName:"DingTalk",icon:"dingtalk",description:"Send notifications to DingTalk group via robot webhook",helpUrl:"https://open.dingtalk.com/document/robots/custom-robot-access",implemented:!0},email:{displayName:"Email",icon:"email",description:"Send notifications via email",implemented:!1},slack:{displayName:"Slack",icon:"slack",description:"Send notifications to Slack channel via webhook",implemented:!1},wechat_work:{displayName:"WeChat",icon:"wechat-work",description:"Send notifications to WeChat via Server酱³",helpUrl:"https://sct.ftqq.com/sendkey",implemented:!0}},hE=/^https:\/\/oapi\.dingtalk\.com\/robot\/send\?access_token=/,dE=/^SCT[a-zA-Z0-9]{10,}$/,fE=cA.map(({enabled:e,desc:t,...i})=>i),pE=hA.map(({enabled:e,desc:t,...i})=>i);function H_(e){return e.filter(t=>t.enabled).map(({enabled:t,desc:i,...s})=>s)}let gE=0;const Mf=new Set;function fA(e){return Mf.add(e),()=>Mf.delete(e)}function pA(){return gE}function mE(){gE++,Mf.forEach(e=>e())}function gA(){const[e,t]=B.useState(null),[i,s]=B.useState(null),[u,p]=B.useState(!0),d=B.useSyncExternalStore(fA,pA),o=qn(b=>b.activeInstanceId),l=B.useCallback(async()=>{p(!0);try{const b=await lE(o??void 0);t(b.config),s(b.configPath)}catch{t(null)}finally{p(!1)}},[o]);B.useEffect(()=>{l()},[l,d]);const c=e!=null&&e.shortcuts?H_(e.shortcuts):fE,g=e!=null&&e.commands?H_(e.commands):pE,h=B.useCallback(()=>{mE()},[]);return{shortcuts:c,commands:g,configPath:i,isLoading:u,reload:h}}function mA(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return B.useMemo(()=>s=>{t.forEach(u=>u(s))},t)}const wc=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function ka(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function p0(e){return"nodeType"in e}function ii(e){var t,i;return e?ka(e)?e:p0(e)&&(t=(i=e.ownerDocument)==null?void 0:i.defaultView)!=null?t:window:window}function g0(e){const{Document:t}=ii(e);return e instanceof t}function ml(e){return ka(e)?!1:e instanceof ii(e).HTMLElement}function _E(e){return e instanceof ii(e).SVGElement}function La(e){return e?ka(e)?e.document:p0(e)?g0(e)?e:ml(e)||_E(e)?e.ownerDocument:document:document:document}const Vi=wc?B.useLayoutEffect:B.useEffect;function m0(e){const t=B.useRef(e);return Vi(()=>{t.current=e}),B.useCallback(function(){for(var i=arguments.length,s=new Array(i),u=0;u<i;u++)s[u]=arguments[u];return t.current==null?void 0:t.current(...s)},[])}function _A(){const e=B.useRef(null),t=B.useCallback((s,u)=>{e.current=setInterval(s,u)},[]),i=B.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,i]}function sl(e,t){t===void 0&&(t=[e]);const i=B.useRef(e);return Vi(()=>{i.current!==e&&(i.current=e)},t),i}function _l(e,t){const i=B.useRef();return B.useMemo(()=>{const s=e(i.current);return i.current=s,s},[...t])}function dc(e){const t=m0(e),i=B.useRef(null),s=B.useCallback(u=>{u!==i.current&&(t==null||t(u,i.current)),i.current=u},[]);return[i,s]}function If(e){const t=B.useRef();return B.useEffect(()=>{t.current=e},[e]),t.current}let Qd={};function bl(e,t){return B.useMemo(()=>{if(t)return t;const i=Qd[e]==null?0:Qd[e]+1;return Qd[e]=i,e+"-"+i},[e,t])}function bE(e){return function(t){for(var i=arguments.length,s=new Array(i>1?i-1:0),u=1;u<i;u++)s[u-1]=arguments[u];return s.reduce((p,d)=>{const o=Object.entries(d);for(const[l,c]of o){const g=p[l];g!=null&&(p[l]=g+e*c)}return p},{...t})}}const ya=bE(1),al=bE(-1);function bA(e){return"clientX"in e&&"clientY"in e}function _0(e){if(!e)return!1;const{KeyboardEvent:t}=ii(e.target);return t&&e instanceof t}function EA(e){if(!e)return!1;const{TouchEvent:t}=ii(e.target);return t&&e instanceof t}function Bf(e){if(EA(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:i}=e.touches[0];return{x:t,y:i}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:i}=e.changedTouches[0];return{x:t,y:i}}}return bA(e)?{x:e.clientX,y:e.clientY}:null}const ol=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:i}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(i?Math.round(i):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:i}=e;return"scaleX("+t+") scaleY("+i+")"}},Transform:{toString(e){if(e)return[ol.Translate.toString(e),ol.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:i,easing:s}=e;return t+" "+i+"ms "+s}}}),z_="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function vA(e){return e.matches(z_)?e:e.querySelector(z_)}const SA={display:"none"};function yA(e){let{id:t,value:i}=e;return yn.createElement("div",{id:t,style:SA},i)}function CA(e){let{id:t,announcement:i,ariaLiveType:s="assertive"}=e;const u={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return yn.createElement("div",{id:t,style:u,role:"status","aria-live":s,"aria-atomic":!0},i)}function TA(){const[e,t]=B.useState("");return{announce:B.useCallback(s=>{s!=null&&t(s)},[]),announcement:e}}const EE=B.createContext(null);function AA(e){const t=B.useContext(EE);B.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function xA(){const[e]=B.useState(()=>new Set),t=B.useCallback(s=>(e.add(s),()=>e.delete(s)),[e]);return[B.useCallback(s=>{let{type:u,event:p}=s;e.forEach(d=>{var o;return(o=d[u])==null?void 0:o.call(d,p)})},[e]),t]}const wA={draggable:`
61
- To pick up a draggable item, press the space bar.
62
- While dragging, use the arrow keys to move the item.
63
- Press space again to drop the item in its new position, or press escape to cancel.
64
- `},DA={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:i}=e;return i?"Draggable item "+t.id+" was moved over droppable area "+i.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:i}=e;return i?"Draggable item "+t.id+" was dropped over droppable area "+i.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function RA(e){let{announcements:t=DA,container:i,hiddenTextDescribedById:s,screenReaderInstructions:u=wA}=e;const{announce:p,announcement:d}=TA(),o=bl("DndLiveRegion"),[l,c]=B.useState(!1);if(B.useEffect(()=>{c(!0)},[]),AA(B.useMemo(()=>({onDragStart(h){let{active:b}=h;p(t.onDragStart({active:b}))},onDragMove(h){let{active:b,over:y}=h;t.onDragMove&&p(t.onDragMove({active:b,over:y}))},onDragOver(h){let{active:b,over:y}=h;p(t.onDragOver({active:b,over:y}))},onDragEnd(h){let{active:b,over:y}=h;p(t.onDragEnd({active:b,over:y}))},onDragCancel(h){let{active:b,over:y}=h;p(t.onDragCancel({active:b,over:y}))}}),[p,t])),!l)return null;const g=yn.createElement(yn.Fragment,null,yn.createElement(yA,{id:s,value:u.draggable}),yn.createElement(CA,{id:o,announcement:d}));return i?$o.createPortal(g,i):g}var bn;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(bn||(bn={}));function fc(){}function j_(e,t){return B.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function kA(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return B.useMemo(()=>[...t].filter(s=>s!=null),[...t])}const Pi=Object.freeze({x:0,y:0});function vE(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function SE(e,t){let{data:{value:i}}=e,{data:{value:s}}=t;return i-s}function LA(e,t){let{data:{value:i}}=e,{data:{value:s}}=t;return s-i}function $_(e){let{left:t,top:i,height:s,width:u}=e;return[{x:t,y:i},{x:t+u,y:i},{x:t,y:i+s},{x:t+u,y:i+s}]}function yE(e,t){if(!e||e.length===0)return null;const[i]=e;return i[t]}function W_(e,t,i){return t===void 0&&(t=e.left),i===void 0&&(i=e.top),{x:t+e.width*.5,y:i+e.height*.5}}const CE=e=>{let{collisionRect:t,droppableRects:i,droppableContainers:s}=e;const u=W_(t,t.left,t.top),p=[];for(const d of s){const{id:o}=d,l=i.get(o);if(l){const c=vE(W_(l),u);p.push({id:o,data:{droppableContainer:d,value:c}})}}return p.sort(SE)},OA=e=>{let{collisionRect:t,droppableRects:i,droppableContainers:s}=e;const u=$_(t),p=[];for(const d of s){const{id:o}=d,l=i.get(o);if(l){const c=$_(l),g=u.reduce((b,y,T)=>b+vE(c[T],y),0),h=Number((g/4).toFixed(4));p.push({id:o,data:{droppableContainer:d,value:h}})}}return p.sort(SE)};function NA(e,t){const i=Math.max(t.top,e.top),s=Math.max(t.left,e.left),u=Math.min(t.left+t.width,e.left+e.width),p=Math.min(t.top+t.height,e.top+e.height),d=u-s,o=p-i;if(s<u&&i<p){const l=t.width*t.height,c=e.width*e.height,g=d*o,h=g/(l+c-g);return Number(h.toFixed(4))}return 0}const MA=e=>{let{collisionRect:t,droppableRects:i,droppableContainers:s}=e;const u=[];for(const p of s){const{id:d}=p,o=i.get(d);if(o){const l=NA(o,t);l>0&&u.push({id:d,data:{droppableContainer:p,value:l}})}}return u.sort(LA)};function IA(e,t,i){return{...e,scaleX:t&&i?t.width/i.width:1,scaleY:t&&i?t.height/i.height:1}}function TE(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Pi}function BA(e){return function(i){for(var s=arguments.length,u=new Array(s>1?s-1:0),p=1;p<s;p++)u[p-1]=arguments[p];return u.reduce((d,o)=>({...d,top:d.top+e*o.y,bottom:d.bottom+e*o.y,left:d.left+e*o.x,right:d.right+e*o.x}),{...i})}}const FA=BA(1);function PA(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function UA(e,t,i){const s=PA(t);if(!s)return e;const{scaleX:u,scaleY:p,x:d,y:o}=s,l=e.left-d-(1-u)*parseFloat(i),c=e.top-o-(1-p)*parseFloat(i.slice(i.indexOf(" ")+1)),g=u?e.width/u:e.width,h=p?e.height/p:e.height;return{width:g,height:h,top:c,right:l+g,bottom:c+h,left:l}}const HA={ignoreTransform:!1};function Oa(e,t){t===void 0&&(t=HA);let i=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:c,transformOrigin:g}=ii(e).getComputedStyle(e);c&&(i=UA(i,c,g))}const{top:s,left:u,width:p,height:d,bottom:o,right:l}=i;return{top:s,left:u,width:p,height:d,bottom:o,right:l}}function q_(e){return Oa(e,{ignoreTransform:!0})}function zA(e){const t=e.innerWidth,i=e.innerHeight;return{top:0,left:0,right:t,bottom:i,width:t,height:i}}function jA(e,t){return t===void 0&&(t=ii(e).getComputedStyle(e)),t.position==="fixed"}function $A(e,t){t===void 0&&(t=ii(e).getComputedStyle(e));const i=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(u=>{const p=t[u];return typeof p=="string"?i.test(p):!1})}function Dc(e,t){const i=[];function s(u){if(t!=null&&i.length>=t||!u)return i;if(g0(u)&&u.scrollingElement!=null&&!i.includes(u.scrollingElement))return i.push(u.scrollingElement),i;if(!ml(u)||_E(u)||i.includes(u))return i;const p=ii(e).getComputedStyle(u);return u!==e&&$A(u,p)&&i.push(u),jA(u,p)?i:s(u.parentNode)}return e?s(e):i}function AE(e){const[t]=Dc(e,1);return t??null}function Zd(e){return!wc||!e?null:ka(e)?e:p0(e)?g0(e)||e===La(e).scrollingElement?window:ml(e)?e:null:null}function xE(e){return ka(e)?e.scrollX:e.scrollLeft}function wE(e){return ka(e)?e.scrollY:e.scrollTop}function Ff(e){return{x:xE(e),y:wE(e)}}var Sn;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Sn||(Sn={}));function DE(e){return!wc||!e?!1:e===document.scrollingElement}function RE(e){const t={x:0,y:0},i=DE(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},s={x:e.scrollWidth-i.width,y:e.scrollHeight-i.height},u=e.scrollTop<=t.y,p=e.scrollLeft<=t.x,d=e.scrollTop>=s.y,o=e.scrollLeft>=s.x;return{isTop:u,isLeft:p,isBottom:d,isRight:o,maxScroll:s,minScroll:t}}const WA={x:.2,y:.2};function qA(e,t,i,s,u){let{top:p,left:d,right:o,bottom:l}=i;s===void 0&&(s=10),u===void 0&&(u=WA);const{isTop:c,isBottom:g,isLeft:h,isRight:b}=RE(e),y={x:0,y:0},T={x:0,y:0},E={height:t.height*u.y,width:t.width*u.x};return!c&&p<=t.top+E.height?(y.y=Sn.Backward,T.y=s*Math.abs((t.top+E.height-p)/E.height)):!g&&l>=t.bottom-E.height&&(y.y=Sn.Forward,T.y=s*Math.abs((t.bottom-E.height-l)/E.height)),!b&&o>=t.right-E.width?(y.x=Sn.Forward,T.x=s*Math.abs((t.right-E.width-o)/E.width)):!h&&d<=t.left+E.width&&(y.x=Sn.Backward,T.x=s*Math.abs((t.left+E.width-d)/E.width)),{direction:y,speed:T}}function YA(e){if(e===document.scrollingElement){const{innerWidth:p,innerHeight:d}=window;return{top:0,left:0,right:p,bottom:d,width:p,height:d}}const{top:t,left:i,right:s,bottom:u}=e.getBoundingClientRect();return{top:t,left:i,right:s,bottom:u,width:e.clientWidth,height:e.clientHeight}}function kE(e){return e.reduce((t,i)=>ya(t,Ff(i)),Pi)}function GA(e){return e.reduce((t,i)=>t+xE(i),0)}function KA(e){return e.reduce((t,i)=>t+wE(i),0)}function VA(e,t){if(t===void 0&&(t=Oa),!e)return;const{top:i,left:s,bottom:u,right:p}=t(e);AE(e)&&(u<=0||p<=0||i>=window.innerHeight||s>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const XA=[["x",["left","right"],GA],["y",["top","bottom"],KA]];class b0{constructor(t,i){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const s=Dc(i),u=kE(s);this.rect={...t},this.width=t.width,this.height=t.height;for(const[p,d,o]of XA)for(const l of d)Object.defineProperty(this,l,{get:()=>{const c=o(s),g=u[p]-c;return this.rect[l]+g},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Go{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(i=>{var s;return(s=this.target)==null?void 0:s.removeEventListener(...i)})},this.target=t}add(t,i,s){var u;(u=this.target)==null||u.addEventListener(t,i,s),this.listeners.push([t,i,s])}}function QA(e){const{EventTarget:t}=ii(e);return e instanceof t?e:La(e)}function Jd(e,t){const i=Math.abs(e.x),s=Math.abs(e.y);return typeof t=="number"?Math.sqrt(i**2+s**2)>t:"x"in t&&"y"in t?i>t.x&&s>t.y:"x"in t?i>t.x:"y"in t?s>t.y:!1}var Di;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Di||(Di={}));function Y_(e){e.preventDefault()}function ZA(e){e.stopPropagation()}var St;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(St||(St={}));const LE={start:[St.Space,St.Enter],cancel:[St.Esc],end:[St.Space,St.Enter,St.Tab]},JA=(e,t)=>{let{currentCoordinates:i}=t;switch(e.code){case St.Right:return{...i,x:i.x+25};case St.Left:return{...i,x:i.x-25};case St.Down:return{...i,y:i.y+25};case St.Up:return{...i,y:i.y-25}}};class E0{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:i}}=t;this.props=t,this.listeners=new Go(La(i)),this.windowListeners=new Go(ii(i)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Di.Resize,this.handleCancel),this.windowListeners.add(Di.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Di.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:i}=this.props,s=t.node.current;s&&VA(s),i(Pi)}handleKeyDown(t){if(_0(t)){const{active:i,context:s,options:u}=this.props,{keyboardCodes:p=LE,coordinateGetter:d=JA,scrollBehavior:o="smooth"}=u,{code:l}=t;if(p.end.includes(l)){this.handleEnd(t);return}if(p.cancel.includes(l)){this.handleCancel(t);return}const{collisionRect:c}=s.current,g=c?{x:c.left,y:c.top}:Pi;this.referenceCoordinates||(this.referenceCoordinates=g);const h=d(t,{active:i,context:s.current,currentCoordinates:g});if(h){const b=al(h,g),y={x:0,y:0},{scrollableAncestors:T}=s.current;for(const E of T){const m=t.code,{isTop:_,isRight:v,isLeft:S,isBottom:x,maxScroll:k,minScroll:A}=RE(E),O=YA(E),D={x:Math.min(m===St.Right?O.right-O.width/2:O.right,Math.max(m===St.Right?O.left:O.left+O.width/2,h.x)),y:Math.min(m===St.Down?O.bottom-O.height/2:O.bottom,Math.max(m===St.Down?O.top:O.top+O.height/2,h.y))},N=m===St.Right&&!v||m===St.Left&&!S,L=m===St.Down&&!x||m===St.Up&&!_;if(N&&D.x!==h.x){const F=E.scrollLeft+b.x,I=m===St.Right&&F<=k.x||m===St.Left&&F>=A.x;if(I&&!b.y){E.scrollTo({left:F,behavior:o});return}I?y.x=E.scrollLeft-F:y.x=m===St.Right?E.scrollLeft-k.x:E.scrollLeft-A.x,y.x&&E.scrollBy({left:-y.x,behavior:o});break}else if(L&&D.y!==h.y){const F=E.scrollTop+b.y,I=m===St.Down&&F<=k.y||m===St.Up&&F>=A.y;if(I&&!b.x){E.scrollTo({top:F,behavior:o});return}I?y.y=E.scrollTop-F:y.y=m===St.Down?E.scrollTop-k.y:E.scrollTop-A.y,y.y&&E.scrollBy({top:-y.y,behavior:o});break}}this.handleMove(t,ya(al(h,this.referenceCoordinates),y))}}}handleMove(t,i){const{onMove:s}=this.props;t.preventDefault(),s(i)}handleEnd(t){const{onEnd:i}=this.props;t.preventDefault(),this.detach(),i()}handleCancel(t){const{onCancel:i}=this.props;t.preventDefault(),this.detach(),i()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}E0.activators=[{eventName:"onKeyDown",handler:(e,t,i)=>{let{keyboardCodes:s=LE,onActivation:u}=t,{active:p}=i;const{code:d}=e.nativeEvent;if(s.start.includes(d)){const o=p.activatorNode.current;return o&&e.target!==o?!1:(e.preventDefault(),u==null||u({event:e.nativeEvent}),!0)}return!1}}];function G_(e){return!!(e&&"distance"in e)}function K_(e){return!!(e&&"delay"in e)}class v0{constructor(t,i,s){var u;s===void 0&&(s=QA(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=i;const{event:p}=t,{target:d}=p;this.props=t,this.events=i,this.document=La(d),this.documentListeners=new Go(this.document),this.listeners=new Go(s),this.windowListeners=new Go(ii(d)),this.initialCoordinates=(u=Bf(p))!=null?u:Pi,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:i,bypassActivationConstraint:s}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(Di.Resize,this.handleCancel),this.windowListeners.add(Di.DragStart,Y_),this.windowListeners.add(Di.VisibilityChange,this.handleCancel),this.windowListeners.add(Di.ContextMenu,Y_),this.documentListeners.add(Di.Keydown,this.handleKeydown),i){if(s!=null&&s({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(K_(i)){this.timeoutId=setTimeout(this.handleStart,i.delay),this.handlePending(i);return}if(G_(i)){this.handlePending(i);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,i){const{active:s,onPending:u}=this.props;u(s,t,this.initialCoordinates,i)}handleStart(){const{initialCoordinates:t}=this,{onStart:i}=this.props;t&&(this.activated=!0,this.documentListeners.add(Di.Click,ZA,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Di.SelectionChange,this.removeTextSelection),i(t))}handleMove(t){var i;const{activated:s,initialCoordinates:u,props:p}=this,{onMove:d,options:{activationConstraint:o}}=p;if(!u)return;const l=(i=Bf(t))!=null?i:Pi,c=al(u,l);if(!s&&o){if(G_(o)){if(o.tolerance!=null&&Jd(c,o.tolerance))return this.handleCancel();if(Jd(c,o.distance))return this.handleStart()}if(K_(o)&&Jd(c,o.tolerance))return this.handleCancel();this.handlePending(o,c);return}t.cancelable&&t.preventDefault(),d(l)}handleEnd(){const{onAbort:t,onEnd:i}=this.props;this.detach(),this.activated||t(this.props.active),i()}handleCancel(){const{onAbort:t,onCancel:i}=this.props;this.detach(),this.activated||t(this.props.active),i()}handleKeydown(t){t.code===St.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const ex={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class S0 extends v0{constructor(t){const{event:i}=t,s=La(i.target);super(t,ex,s)}}S0.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:i}=e,{onActivation:s}=t;return!i.isPrimary||i.button!==0?!1:(s==null||s({event:i}),!0)}}];const tx={move:{name:"mousemove"},end:{name:"mouseup"}};var Pf;(function(e){e[e.RightClick=2]="RightClick"})(Pf||(Pf={}));class nx extends v0{constructor(t){super(t,tx,La(t.event.target))}}nx.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:i}=e,{onActivation:s}=t;return i.button===Pf.RightClick?!1:(s==null||s({event:i}),!0)}}];const ef={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class ix extends v0{constructor(t){super(t,ef)}static setup(){return window.addEventListener(ef.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(ef.move.name,t)};function t(){}}}ix.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:i}=e,{onActivation:s}=t;const{touches:u}=i;return u.length>1?!1:(s==null||s({event:i}),!0)}}];var Ko;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Ko||(Ko={}));var pc;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(pc||(pc={}));function rx(e){let{acceleration:t,activator:i=Ko.Pointer,canScroll:s,draggingRect:u,enabled:p,interval:d=5,order:o=pc.TreeOrder,pointerCoordinates:l,scrollableAncestors:c,scrollableAncestorRects:g,delta:h,threshold:b}=e;const y=ax({delta:h,disabled:!p}),[T,E]=_A(),m=B.useRef({x:0,y:0}),_=B.useRef({x:0,y:0}),v=B.useMemo(()=>{switch(i){case Ko.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case Ko.DraggableRect:return u}},[i,u,l]),S=B.useRef(null),x=B.useCallback(()=>{const A=S.current;if(!A)return;const O=m.current.x*_.current.x,D=m.current.y*_.current.y;A.scrollBy(O,D)},[]),k=B.useMemo(()=>o===pc.TreeOrder?[...c].reverse():c,[o,c]);B.useEffect(()=>{if(!p||!c.length||!v){E();return}for(const A of k){if((s==null?void 0:s(A))===!1)continue;const O=c.indexOf(A),D=g[O];if(!D)continue;const{direction:N,speed:L}=qA(A,D,v,t,b);for(const F of["x","y"])y[F][N[F]]||(L[F]=0,N[F]=0);if(L.x>0||L.y>0){E(),S.current=A,T(x,d),m.current=L,_.current=N;return}}m.current={x:0,y:0},_.current={x:0,y:0},E()},[t,x,s,E,p,d,JSON.stringify(v),JSON.stringify(y),T,c,k,g,JSON.stringify(b)])}const sx={x:{[Sn.Backward]:!1,[Sn.Forward]:!1},y:{[Sn.Backward]:!1,[Sn.Forward]:!1}};function ax(e){let{delta:t,disabled:i}=e;const s=If(t);return _l(u=>{if(i||!s||!u)return sx;const p={x:Math.sign(t.x-s.x),y:Math.sign(t.y-s.y)};return{x:{[Sn.Backward]:u.x[Sn.Backward]||p.x===-1,[Sn.Forward]:u.x[Sn.Forward]||p.x===1},y:{[Sn.Backward]:u.y[Sn.Backward]||p.y===-1,[Sn.Forward]:u.y[Sn.Forward]||p.y===1}}},[i,t,s])}function ox(e,t){const i=t!=null?e.get(t):void 0,s=i?i.node.current:null;return _l(u=>{var p;return t==null?null:(p=s??u)!=null?p:null},[s,t])}function lx(e,t){return B.useMemo(()=>e.reduce((i,s)=>{const{sensor:u}=s,p=u.activators.map(d=>({eventName:d.eventName,handler:t(d.handler,s)}));return[...i,...p]},[]),[e,t])}var ll;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(ll||(ll={}));var Uf;(function(e){e.Optimized="optimized"})(Uf||(Uf={}));const V_=new Map;function ux(e,t){let{dragging:i,dependencies:s,config:u}=t;const[p,d]=B.useState(null),{frequency:o,measure:l,strategy:c}=u,g=B.useRef(e),h=m(),b=sl(h),y=B.useCallback(function(_){_===void 0&&(_=[]),!b.current&&d(v=>v===null?_:v.concat(_.filter(S=>!v.includes(S))))},[b]),T=B.useRef(null),E=_l(_=>{if(h&&!i)return V_;if(!_||_===V_||g.current!==e||p!=null){const v=new Map;for(let S of e){if(!S)continue;if(p&&p.length>0&&!p.includes(S.id)&&S.rect.current){v.set(S.id,S.rect.current);continue}const x=S.node.current,k=x?new b0(l(x),x):null;S.rect.current=k,k&&v.set(S.id,k)}return v}return _},[e,p,i,h,l]);return B.useEffect(()=>{g.current=e},[e]),B.useEffect(()=>{h||y()},[i,h]),B.useEffect(()=>{p&&p.length>0&&d(null)},[JSON.stringify(p)]),B.useEffect(()=>{h||typeof o!="number"||T.current!==null||(T.current=setTimeout(()=>{y(),T.current=null},o))},[o,h,y,...s]),{droppableRects:E,measureDroppableContainers:y,measuringScheduled:p!=null};function m(){switch(c){case ll.Always:return!1;case ll.BeforeDragging:return i;default:return!i}}}function OE(e,t){return _l(i=>e?i||(typeof t=="function"?t(e):e):null,[t,e])}function cx(e,t){return OE(e,t)}function hx(e){let{callback:t,disabled:i}=e;const s=m0(t),u=B.useMemo(()=>{if(i||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:p}=window;return new p(s)},[s,i]);return B.useEffect(()=>()=>u==null?void 0:u.disconnect(),[u]),u}function Rc(e){let{callback:t,disabled:i}=e;const s=m0(t),u=B.useMemo(()=>{if(i||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:p}=window;return new p(s)},[i]);return B.useEffect(()=>()=>u==null?void 0:u.disconnect(),[u]),u}function dx(e){return new b0(Oa(e),e)}function X_(e,t,i){t===void 0&&(t=dx);const[s,u]=B.useState(null);function p(){u(l=>{if(!e)return null;if(e.isConnected===!1){var c;return(c=l??i)!=null?c:null}const g=t(e);return JSON.stringify(l)===JSON.stringify(g)?l:g})}const d=hx({callback(l){if(e)for(const c of l){const{type:g,target:h}=c;if(g==="childList"&&h instanceof HTMLElement&&h.contains(e)){p();break}}}}),o=Rc({callback:p});return Vi(()=>{p(),e?(o==null||o.observe(e),d==null||d.observe(document.body,{childList:!0,subtree:!0})):(o==null||o.disconnect(),d==null||d.disconnect())},[e]),s}function fx(e){const t=OE(e);return TE(e,t)}const Q_=[];function px(e){const t=B.useRef(e),i=_l(s=>e?s&&s!==Q_&&e&&t.current&&e.parentNode===t.current.parentNode?s:Dc(e):Q_,[e]);return B.useEffect(()=>{t.current=e},[e]),i}function gx(e){const[t,i]=B.useState(null),s=B.useRef(e),u=B.useCallback(p=>{const d=Zd(p.target);d&&i(o=>o?(o.set(d,Ff(d)),new Map(o)):null)},[]);return B.useEffect(()=>{const p=s.current;if(e!==p){d(p);const o=e.map(l=>{const c=Zd(l);return c?(c.addEventListener("scroll",u,{passive:!0}),[c,Ff(c)]):null}).filter(l=>l!=null);i(o.length?new Map(o):null),s.current=e}return()=>{d(e),d(p)};function d(o){o.forEach(l=>{const c=Zd(l);c==null||c.removeEventListener("scroll",u)})}},[u,e]),B.useMemo(()=>e.length?t?Array.from(t.values()).reduce((p,d)=>ya(p,d),Pi):kE(e):Pi,[e,t])}function Z_(e,t){t===void 0&&(t=[]);const i=B.useRef(null);return B.useEffect(()=>{i.current=null},t),B.useEffect(()=>{const s=e!==Pi;s&&!i.current&&(i.current=e),!s&&i.current&&(i.current=null)},[e]),i.current?al(e,i.current):Pi}function mx(e){B.useEffect(()=>{if(!wc)return;const t=e.map(i=>{let{sensor:s}=i;return s.setup==null?void 0:s.setup()});return()=>{for(const i of t)i==null||i()}},e.map(t=>{let{sensor:i}=t;return i}))}function _x(e,t){return B.useMemo(()=>e.reduce((i,s)=>{let{eventName:u,handler:p}=s;return i[u]=d=>{p(d,t)},i},{}),[e,t])}function NE(e){return B.useMemo(()=>e?zA(e):null,[e])}const J_=[];function bx(e,t){t===void 0&&(t=Oa);const[i]=e,s=NE(i?ii(i):null),[u,p]=B.useState(J_);function d(){p(()=>e.length?e.map(l=>DE(l)?s:new b0(t(l),l)):J_)}const o=Rc({callback:d});return Vi(()=>{o==null||o.disconnect(),d(),e.forEach(l=>o==null?void 0:o.observe(l))},[e]),u}function Ex(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return ml(t)?t:e}function vx(e){let{measure:t}=e;const[i,s]=B.useState(null),u=B.useCallback(c=>{for(const{target:g}of c)if(ml(g)){s(h=>{const b=t(g);return h?{...h,width:b.width,height:b.height}:b});break}},[t]),p=Rc({callback:u}),d=B.useCallback(c=>{const g=Ex(c);p==null||p.disconnect(),g&&(p==null||p.observe(g)),s(g?t(g):null)},[t,p]),[o,l]=dc(d);return B.useMemo(()=>({nodeRef:o,rect:i,setRef:l}),[i,o,l])}const Sx=[{sensor:S0,options:{}},{sensor:E0,options:{}}],yx={current:{}},ac={draggable:{measure:q_},droppable:{measure:q_,strategy:ll.WhileDragging,frequency:Uf.Optimized},dragOverlay:{measure:Oa}};class Vo extends Map{get(t){var i;return t!=null&&(i=super.get(t))!=null?i:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:i}=t;return!i})}getNodeFor(t){var i,s;return(i=(s=this.get(t))==null?void 0:s.node.current)!=null?i:void 0}}const Cx={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Vo,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:fc},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:ac,measureDroppableContainers:fc,windowRect:null,measuringScheduled:!1},Tx={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:fc,draggableNodes:new Map,over:null,measureDroppableContainers:fc},kc=B.createContext(Tx),ME=B.createContext(Cx);function Ax(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Vo}}}function xx(e,t){switch(t.type){case bn.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case bn.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case bn.DragEnd:case bn.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case bn.RegisterDroppable:{const{element:i}=t,{id:s}=i,u=new Vo(e.droppable.containers);return u.set(s,i),{...e,droppable:{...e.droppable,containers:u}}}case bn.SetDroppableDisabled:{const{id:i,key:s,disabled:u}=t,p=e.droppable.containers.get(i);if(!p||s!==p.key)return e;const d=new Vo(e.droppable.containers);return d.set(i,{...p,disabled:u}),{...e,droppable:{...e.droppable,containers:d}}}case bn.UnregisterDroppable:{const{id:i,key:s}=t,u=e.droppable.containers.get(i);if(!u||s!==u.key)return e;const p=new Vo(e.droppable.containers);return p.delete(i),{...e,droppable:{...e.droppable,containers:p}}}default:return e}}function wx(e){let{disabled:t}=e;const{active:i,activatorEvent:s,draggableNodes:u}=B.useContext(kc),p=If(s),d=If(i==null?void 0:i.id);return B.useEffect(()=>{if(!t&&!s&&p&&d!=null){if(!_0(p)||document.activeElement===p.target)return;const o=u.get(d);if(!o)return;const{activatorNode:l,node:c}=o;if(!l.current&&!c.current)return;requestAnimationFrame(()=>{for(const g of[l.current,c.current]){if(!g)continue;const h=vA(g);if(h){h.focus();break}}})}},[s,t,u,d,p]),null}function Dx(e,t){let{transform:i,...s}=t;return e!=null&&e.length?e.reduce((u,p)=>p({transform:u,...s}),i):i}function Rx(e){return B.useMemo(()=>({draggable:{...ac.draggable,...e==null?void 0:e.draggable},droppable:{...ac.droppable,...e==null?void 0:e.droppable},dragOverlay:{...ac.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function kx(e){let{activeNode:t,measure:i,initialRect:s,config:u=!0}=e;const p=B.useRef(!1),{x:d,y:o}=typeof u=="boolean"?{x:u,y:u}:u;Vi(()=>{if(!d&&!o||!t){p.current=!1;return}if(p.current||!s)return;const c=t==null?void 0:t.node.current;if(!c||c.isConnected===!1)return;const g=i(c),h=TE(g,s);if(d||(h.x=0),o||(h.y=0),p.current=!0,Math.abs(h.x)>0||Math.abs(h.y)>0){const b=AE(c);b&&b.scrollBy({top:h.y,left:h.x})}},[t,d,o,s,i])}const IE=B.createContext({...Pi,scaleX:1,scaleY:1});var es;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(es||(es={}));const BE=B.memo(function(t){var i,s,u,p;let{id:d,accessibility:o,autoScroll:l=!0,children:c,sensors:g=Sx,collisionDetection:h=MA,measuring:b,modifiers:y,...T}=t;const E=B.useReducer(xx,void 0,Ax),[m,_]=E,[v,S]=xA(),[x,k]=B.useState(es.Uninitialized),A=x===es.Initialized,{draggable:{active:O,nodes:D,translate:N},droppable:{containers:L}}=m,F=O!=null?D.get(O):null,I=B.useRef({initial:null,translated:null}),z=B.useMemo(()=>{var Ht;return O!=null?{id:O,data:(Ht=F==null?void 0:F.data)!=null?Ht:yx,rect:I}:null},[O,F]),W=B.useRef(null),[q,Y]=B.useState(null),[K,Q]=B.useState(null),H=sl(T,Object.values(T)),M=bl("DndDescribedBy",d),U=B.useMemo(()=>L.getEnabled(),[L]),$=Rx(b),{droppableRects:j,measureDroppableContainers:re,measuringScheduled:_e}=ux(U,{dragging:A,dependencies:[N.x,N.y],config:$.droppable}),ue=ox(D,O),ee=B.useMemo(()=>K?Bf(K):null,[K]),G=Oi(),le=cx(ue,$.draggable.measure);kx({activeNode:O!=null?D.get(O):null,config:G.layoutShiftCompensation,initialRect:le,measure:$.draggable.measure});const ae=X_(ue,$.draggable.measure,le),xe=X_(ue?ue.parentElement:null),ye=B.useRef({activatorEvent:null,active:null,activeNode:ue,collisionRect:null,collisions:null,droppableRects:j,draggableNodes:D,draggingNode:null,draggingNodeRect:null,droppableContainers:L,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Pe=L.getNodeFor((i=ye.current.over)==null?void 0:i.id),Ne=vx({measure:$.dragOverlay.measure}),nt=(s=Ne.nodeRef.current)!=null?s:ue,Ue=A?(u=Ne.rect)!=null?u:ae:null,Be=!!(Ne.nodeRef.current&&Ne.rect),$t=fx(Be?null:ae),nn=NE(nt?ii(nt):null),Qe=px(A?Pe??ue:null),tt=bx(Qe),it=Dx(y,{transform:{x:N.x-$t.x,y:N.y-$t.y,scaleX:1,scaleY:1},activatorEvent:K,active:z,activeNodeRect:ae,containerNodeRect:xe,draggingNodeRect:Ue,over:ye.current.over,overlayNodeRect:Ne.rect,scrollableAncestors:Qe,scrollableAncestorRects:tt,windowRect:nn}),Me=ee?ya(ee,N):null,$e=gx(Qe),xt=Z_($e),fe=Z_($e,[ae]),Ce=ya(it,xt),Ie=Ue?FA(Ue,it):null,qe=z&&Ie?h({active:z,collisionRect:Ie,droppableRects:j,droppableContainers:U,pointerCoordinates:Me}):null,Ye=yE(qe,"id"),[Ze,Ve]=B.useState(null),Yt=Be?it:ya(it,fe),Lt=IA(Yt,(p=Ze==null?void 0:Ze.rect)!=null?p:null,ae),Gt=B.useRef(null),Et=B.useCallback((Ht,Rt)=>{let{sensor:ne,options:be}=Rt;if(W.current==null)return;const De=D.get(W.current);if(!De)return;const He=Ht.nativeEvent,pt=new ne({active:W.current,activeNode:De,event:He,options:be,context:ye,onAbort(Le){if(!D.get(Le))return;const{onDragAbort:We}=H.current,wt={id:Le};We==null||We(wt),v({type:"onDragAbort",event:wt})},onPending(Le,Oe,We,wt){if(!D.get(Le))return;const{onDragPending:Fn}=H.current,Pn={id:Le,constraint:Oe,initialCoordinates:We,offset:wt};Fn==null||Fn(Pn),v({type:"onDragPending",event:Pn})},onStart(Le){const Oe=W.current;if(Oe==null)return;const We=D.get(Oe);if(!We)return;const{onDragStart:wt}=H.current,kt={activatorEvent:He,active:{id:Oe,data:We.data,rect:I}};$o.unstable_batchedUpdates(()=>{wt==null||wt(kt),k(es.Initializing),_({type:bn.DragStart,initialCoordinates:Le,active:Oe}),v({type:"onDragStart",event:kt}),Y(Gt.current),Q(He)})},onMove(Le){_({type:bn.DragMove,coordinates:Le})},onEnd:yt(bn.DragEnd),onCancel:yt(bn.DragCancel)});Gt.current=pt;function yt(Le){return async function(){const{active:We,collisions:wt,over:kt,scrollAdjustedTranslate:Fn}=ye.current;let Pn=null;if(We&&Fn){const{cancelDrop:_i}=H.current;Pn={activatorEvent:He,active:We,collisions:wt,delta:Fn,over:kt},Le===bn.DragEnd&&typeof _i=="function"&&await Promise.resolve(_i(Pn))&&(Le=bn.DragCancel)}W.current=null,$o.unstable_batchedUpdates(()=>{_({type:Le}),k(es.Uninitialized),Ve(null),Y(null),Q(null),Gt.current=null;const _i=Le===bn.DragEnd?"onDragEnd":"onDragCancel";if(Pn){const Yn=H.current[_i];Yn==null||Yn(Pn),v({type:_i,event:Pn})}})}}},[D]),Tn=B.useCallback((Ht,Rt)=>(ne,be)=>{const De=ne.nativeEvent,He=D.get(be);if(W.current!==null||!He||De.dndKit||De.defaultPrevented)return;const pt={active:He};Ht(ne,Rt.options,pt)===!0&&(De.dndKit={capturedBy:Rt.sensor},W.current=be,Et(ne,Rt))},[D,Et]),un=lx(g,Tn);mx(g),Vi(()=>{ae&&x===es.Initializing&&k(es.Initialized)},[ae,x]),B.useEffect(()=>{const{onDragMove:Ht}=H.current,{active:Rt,activatorEvent:ne,collisions:be,over:De}=ye.current;if(!Rt||!ne)return;const He={active:Rt,activatorEvent:ne,collisions:be,delta:{x:Ce.x,y:Ce.y},over:De};$o.unstable_batchedUpdates(()=>{Ht==null||Ht(He),v({type:"onDragMove",event:He})})},[Ce.x,Ce.y]),B.useEffect(()=>{const{active:Ht,activatorEvent:Rt,collisions:ne,droppableContainers:be,scrollAdjustedTranslate:De}=ye.current;if(!Ht||W.current==null||!Rt||!De)return;const{onDragOver:He}=H.current,pt=be.get(Ye),yt=pt&&pt.rect.current?{id:pt.id,rect:pt.rect.current,data:pt.data,disabled:pt.disabled}:null,Le={active:Ht,activatorEvent:Rt,collisions:ne,delta:{x:De.x,y:De.y},over:yt};$o.unstable_batchedUpdates(()=>{Ve(yt),He==null||He(Le),v({type:"onDragOver",event:Le})})},[Ye]),Vi(()=>{ye.current={activatorEvent:K,active:z,activeNode:ue,collisionRect:Ie,collisions:qe,droppableRects:j,draggableNodes:D,draggingNode:nt,draggingNodeRect:Ue,droppableContainers:L,over:Ze,scrollableAncestors:Qe,scrollAdjustedTranslate:Ce},I.current={initial:Ue,translated:Ie}},[z,ue,qe,Ie,D,nt,Ue,j,L,Ze,Qe,Ce]),rx({...G,delta:N,draggingRect:Ie,pointerCoordinates:Me,scrollableAncestors:Qe,scrollableAncestorRects:tt});const yr=B.useMemo(()=>({active:z,activeNode:ue,activeNodeRect:ae,activatorEvent:K,collisions:qe,containerNodeRect:xe,dragOverlay:Ne,draggableNodes:D,droppableContainers:L,droppableRects:j,over:Ze,measureDroppableContainers:re,scrollableAncestors:Qe,scrollableAncestorRects:tt,measuringConfiguration:$,measuringScheduled:_e,windowRect:nn}),[z,ue,ae,K,qe,xe,Ne,D,L,j,Ze,re,Qe,tt,$,_e,nn]),si=B.useMemo(()=>({activatorEvent:K,activators:un,active:z,activeNodeRect:ae,ariaDescribedById:{draggable:M},dispatch:_,draggableNodes:D,over:Ze,measureDroppableContainers:re}),[K,un,z,ae,_,M,D,Ze,re]);return yn.createElement(EE.Provider,{value:S},yn.createElement(kc.Provider,{value:si},yn.createElement(ME.Provider,{value:yr},yn.createElement(IE.Provider,{value:Lt},c)),yn.createElement(wx,{disabled:(o==null?void 0:o.restoreFocus)===!1})),yn.createElement(RA,{...o,hiddenTextDescribedById:M}));function Oi(){const Ht=(q==null?void 0:q.autoScrollEnabled)===!1,Rt=typeof l=="object"?l.enabled===!1:l===!1,ne=A&&!Ht&&!Rt;return typeof l=="object"?{...l,enabled:ne}:{enabled:ne}}}),Lx=B.createContext(null),e1="button",Ox="Draggable";function Nx(e){let{id:t,data:i,disabled:s=!1,attributes:u}=e;const p=bl(Ox),{activators:d,activatorEvent:o,active:l,activeNodeRect:c,ariaDescribedById:g,draggableNodes:h,over:b}=B.useContext(kc),{role:y=e1,roleDescription:T="draggable",tabIndex:E=0}=u??{},m=(l==null?void 0:l.id)===t,_=B.useContext(m?IE:Lx),[v,S]=dc(),[x,k]=dc(),A=_x(d,t),O=sl(i);Vi(()=>(h.set(t,{id:t,key:p,node:v,activatorNode:x,data:O}),()=>{const N=h.get(t);N&&N.key===p&&h.delete(t)}),[h,t]);const D=B.useMemo(()=>({role:y,tabIndex:E,"aria-disabled":s,"aria-pressed":m&&y===e1?!0:void 0,"aria-roledescription":T,"aria-describedby":g.draggable}),[s,y,E,m,T,g.draggable]);return{active:l,activatorEvent:o,activeNodeRect:c,attributes:D,isDragging:m,listeners:s?void 0:A,node:v,over:b,setNodeRef:S,setActivatorNodeRef:k,transform:_}}function Mx(){return B.useContext(ME)}const Ix="Droppable",Bx={timeout:25};function Fx(e){let{data:t,disabled:i=!1,id:s,resizeObserverConfig:u}=e;const p=bl(Ix),{active:d,dispatch:o,over:l,measureDroppableContainers:c}=B.useContext(kc),g=B.useRef({disabled:i}),h=B.useRef(!1),b=B.useRef(null),y=B.useRef(null),{disabled:T,updateMeasurementsFor:E,timeout:m}={...Bx,...u},_=sl(E??s),v=B.useCallback(()=>{if(!h.current){h.current=!0;return}y.current!=null&&clearTimeout(y.current),y.current=setTimeout(()=>{c(Array.isArray(_.current)?_.current:[_.current]),y.current=null},m)},[m]),S=Rc({callback:v,disabled:T||!d}),x=B.useCallback((D,N)=>{S&&(N&&(S.unobserve(N),h.current=!1),D&&S.observe(D))},[S]),[k,A]=dc(x),O=sl(t);return B.useEffect(()=>{!S||!k.current||(S.disconnect(),h.current=!1,S.observe(k.current))},[k,S]),B.useEffect(()=>(o({type:bn.RegisterDroppable,element:{id:s,key:p,disabled:i,node:k,rect:b,data:O}}),()=>o({type:bn.UnregisterDroppable,key:p,id:s})),[s]),B.useEffect(()=>{i!==g.current.disabled&&(o({type:bn.SetDroppableDisabled,id:s,key:p,disabled:i}),g.current.disabled=i)},[s,p,i,o]),{active:d,rect:b,isOver:(l==null?void 0:l.id)===s,node:k,over:l,setNodeRef:A}}function FE(e,t,i){const s=e.slice();return s.splice(i<0?s.length+i:i,0,s.splice(t,1)[0]),s}function Px(e,t){return e.reduce((i,s,u)=>{const p=t.get(s);return p&&(i[u]=p),i},Array(e.length))}function $u(e){return e!==null&&e>=0}function Ux(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}function Hx(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const PE=e=>{let{rects:t,activeIndex:i,overIndex:s,index:u}=e;const p=FE(t,s,i),d=t[u],o=p[u];return!o||!d?null:{x:o.left-d.left,y:o.top-d.top,scaleX:o.width/d.width,scaleY:o.height/d.height}},Wu={scaleX:1,scaleY:1},UE=e=>{var t;let{activeIndex:i,activeNodeRect:s,index:u,rects:p,overIndex:d}=e;const o=(t=p[i])!=null?t:s;if(!o)return null;if(u===i){const c=p[d];return c?{x:0,y:i<d?c.top+c.height-(o.top+o.height):c.top-o.top,...Wu}:null}const l=zx(p,u,i);return u>i&&u<=d?{x:0,y:-o.height-l,...Wu}:u<i&&u>=d?{x:0,y:o.height+l,...Wu}:{x:0,y:0,...Wu}};function zx(e,t,i){const s=e[t],u=e[t-1],p=e[t+1];return s?i<t?u?s.top-(u.top+u.height):p?p.top-(s.top+s.height):0:p?p.top-(s.top+s.height):u?s.top-(u.top+u.height):0:0}const HE="Sortable",zE=yn.createContext({activeIndex:-1,containerId:HE,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:PE,disabled:{draggable:!1,droppable:!1}});function jE(e){let{children:t,id:i,items:s,strategy:u=PE,disabled:p=!1}=e;const{active:d,dragOverlay:o,droppableRects:l,over:c,measureDroppableContainers:g}=Mx(),h=bl(HE,i),b=o.rect!==null,y=B.useMemo(()=>s.map(A=>typeof A=="object"&&"id"in A?A.id:A),[s]),T=d!=null,E=d?y.indexOf(d.id):-1,m=c?y.indexOf(c.id):-1,_=B.useRef(y),v=!Ux(y,_.current),S=m!==-1&&E===-1||v,x=Hx(p);Vi(()=>{v&&T&&g(y)},[v,y,T,g]),B.useEffect(()=>{_.current=y},[y]);const k=B.useMemo(()=>({activeIndex:E,containerId:h,disabled:x,disableTransforms:S,items:y,overIndex:m,useDragOverlay:b,sortedRects:Px(y,l),strategy:u}),[E,h,x.draggable,x.droppable,S,y,m,l,b,u]);return yn.createElement(zE.Provider,{value:k},t)}const jx=e=>{let{id:t,items:i,activeIndex:s,overIndex:u}=e;return FE(i,s,u).indexOf(t)},$x=e=>{let{containerId:t,isSorting:i,wasDragging:s,index:u,items:p,newIndex:d,previousItems:o,previousContainerId:l,transition:c}=e;return!c||!s||o!==p&&u===d?!1:i?!0:d!==u&&t===l},Wx={duration:200,easing:"ease"},$E="transform",qx=ol.Transition.toString({property:$E,duration:0,easing:"linear"}),Yx={roleDescription:"sortable"};function Gx(e){let{disabled:t,index:i,node:s,rect:u}=e;const[p,d]=B.useState(null),o=B.useRef(i);return Vi(()=>{if(!t&&i!==o.current&&s.current){const l=u.current;if(l){const c=Oa(s.current,{ignoreTransform:!0}),g={x:l.left-c.left,y:l.top-c.top,scaleX:l.width/c.width,scaleY:l.height/c.height};(g.x||g.y)&&d(g)}}i!==o.current&&(o.current=i)},[t,i,s,u]),B.useEffect(()=>{p&&d(null)},[p]),p}function Kx(e){let{animateLayoutChanges:t=$x,attributes:i,disabled:s,data:u,getNewIndex:p=jx,id:d,strategy:o,resizeObserverConfig:l,transition:c=Wx}=e;const{items:g,containerId:h,activeIndex:b,disabled:y,disableTransforms:T,sortedRects:E,overIndex:m,useDragOverlay:_,strategy:v}=B.useContext(zE),S=Vx(s,y),x=g.indexOf(d),k=B.useMemo(()=>({sortable:{containerId:h,index:x,items:g},...u}),[h,u,x,g]),A=B.useMemo(()=>g.slice(g.indexOf(d)),[g,d]),{rect:O,node:D,isOver:N,setNodeRef:L}=Fx({id:d,data:k,disabled:S.droppable,resizeObserverConfig:{updateMeasurementsFor:A,...l}}),{active:F,activatorEvent:I,activeNodeRect:z,attributes:W,setNodeRef:q,listeners:Y,isDragging:K,over:Q,setActivatorNodeRef:H,transform:M}=Nx({id:d,data:k,attributes:{...Yx,...i},disabled:S.draggable}),U=mA(L,q),$=!!F,j=$&&!T&&$u(b)&&$u(m),re=!_&&K,_e=re&&j?M:null,ee=j?_e??(o??v)({rects:E,activeNodeRect:z,activeIndex:b,overIndex:m,index:x}):null,G=$u(b)&&$u(m)?p({id:d,items:g,activeIndex:b,overIndex:m}):x,le=F==null?void 0:F.id,ae=B.useRef({activeId:le,items:g,newIndex:G,containerId:h}),xe=g!==ae.current.items,ye=t({active:F,containerId:h,isDragging:K,isSorting:$,id:d,index:x,items:g,newIndex:ae.current.newIndex,previousItems:ae.current.items,previousContainerId:ae.current.containerId,transition:c,wasDragging:ae.current.activeId!=null}),Pe=Gx({disabled:!ye,index:x,node:D,rect:O});return B.useEffect(()=>{$&&ae.current.newIndex!==G&&(ae.current.newIndex=G),h!==ae.current.containerId&&(ae.current.containerId=h),g!==ae.current.items&&(ae.current.items=g)},[$,G,h,g]),B.useEffect(()=>{if(le===ae.current.activeId)return;if(le&&!ae.current.activeId){ae.current.activeId=le;return}const nt=setTimeout(()=>{ae.current.activeId=le},50);return()=>clearTimeout(nt)},[le]),{active:F,activeIndex:b,attributes:W,data:k,rect:O,index:x,newIndex:G,items:g,isOver:N,isSorting:$,isDragging:K,listeners:Y,node:D,overIndex:m,over:Q,setNodeRef:U,setActivatorNodeRef:H,setDroppableNodeRef:L,setDraggableNodeRef:q,transform:Pe??ee,transition:Ne()};function Ne(){if(Pe||xe&&ae.current.newIndex===x)return qx;if(!(re&&!_0(I)||!c)&&($||ye))return ol.Transition.toString({...c,property:$E})}}function Vx(e,t){var i,s;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(i=e==null?void 0:e.draggable)!=null?i:t.draggable,droppable:(s=e==null?void 0:e.droppable)!=null?s:t.droppable}}function gc(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const Xx=[St.Down,St.Right,St.Up,St.Left],Qx=(e,t)=>{let{context:{active:i,collisionRect:s,droppableRects:u,droppableContainers:p,over:d,scrollableAncestors:o}}=t;if(Xx.includes(e.code)){if(e.preventDefault(),!i||!s)return;const l=[];p.getEnabled().forEach(h=>{if(!h||h!=null&&h.disabled)return;const b=u.get(h.id);if(b)switch(e.code){case St.Down:s.top<b.top&&l.push(h);break;case St.Up:s.top>b.top&&l.push(h);break;case St.Left:s.left>b.left&&l.push(h);break;case St.Right:s.left<b.left&&l.push(h);break}});const c=OA({collisionRect:s,droppableRects:u,droppableContainers:l});let g=yE(c,"id");if(g===(d==null?void 0:d.id)&&c.length>1&&(g=c[1].id),g!=null){const h=p.get(i.id),b=p.get(g),y=b?u.get(b.id):null,T=b==null?void 0:b.node.current;if(T&&y&&h&&b){const m=Dc(T).some((A,O)=>o[O]!==A),_=WE(h,b),v=Zx(h,b),S=m||!_?{x:0,y:0}:{x:v?s.width-y.width:0,y:v?s.height-y.height:0},x={x:y.left,y:y.top};return S.x&&S.y?x:al(x,S)}}}};function WE(e,t){return!gc(e)||!gc(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function Zx(e,t){return!gc(e)||!gc(t)||!WE(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}function qE(){var e;return((e=crypto.randomUUID)==null?void 0:e.call(crypto))??`id-${Date.now()}-${Math.random().toString(36).slice(2,9)}`}function YE({id:e,enabled:t,onToggle:i,onDelete:s,children:u,extraAction:p,onMoveToFirst:d,onMoveToLast:o}){const{attributes:l,listeners:c,setNodeRef:g,transform:h,transition:b,isDragging:y}=Kx({id:e}),T={transform:ol.Transform.toString(h),opacity:y?.5:1};return X.jsx("div",{ref:g,style:{...T,borderRadius:8,background:"var(--bg-tertiary)",overflow:"hidden"},children:X.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"12px 12px",minHeight:"var(--min-touch-target, 44px)",overflow:"hidden"},children:[X.jsx("div",{...l,...c,"aria-label":"Drag to reorder",style:{width:24,color:"var(--text-muted)",cursor:"grab",display:"flex",alignItems:"center",justifyContent:"center",fontSize:14,userSelect:"none",touchAction:"none"},children:"⋮⋮"}),X.jsx("button",{role:"switch","aria-checked":t,"aria-label":t?"Enabled, click to disable":"Disabled, click to enable",onClick:i,style:{width:32,height:20,borderRadius:10,border:"none",background:t?"var(--status-running)":"var(--bg-primary)",cursor:"pointer",position:"relative",flexShrink:0},children:X.jsx("span",{style:{position:"absolute",top:2,left:t?14:2,width:16,height:16,borderRadius:"50%",background:"#fff",transition:"left 0.15s ease"}})}),u,p,(d||o)&&X.jsxs("div",{style:{display:"flex",alignItems:"center",gap:4,flexShrink:0},children:[d&&X.jsx("button",{"aria-label":"Move to first",title:"Move to first",onClick:d,style:{width:32,height:32,borderRadius:6,border:"none",background:"transparent",color:"var(--text-secondary)",cursor:"pointer",fontSize:14,display:"flex",alignItems:"center",justifyContent:"center"},children:"⤒"}),o&&X.jsx("button",{"aria-label":"Move to last",title:"Move to last",onClick:o,style:{width:32,height:32,borderRadius:6,border:"none",background:"transparent",color:"var(--text-secondary)",cursor:"pointer",fontSize:14,display:"flex",alignItems:"center",justifyContent:"center"},children:"⤓"})]}),X.jsx("button",{"aria-label":"Delete",title:"Delete",onClick:s,style:{width:32,height:32,borderRadius:6,border:"none",background:"transparent",color:"var(--text-secondary)",cursor:"pointer",fontSize:18,flexShrink:0},children:"×"})]})})}function GE(){return kA(j_(S0,{activationConstraint:{distance:8}}),j_(E0,{coordinateGetter:Qx}))}function KE(){const[e,t]=B.useState(!1);return B.useEffect(()=>{const i=()=>{const s=navigator.userAgent,u=/iPhone|iPad|iPod|Android/i.test(s),p=window.innerWidth<768;t(u||p)};return i(),window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)},[]),e}function Jx(e){if(["Control","Alt","Shift","Meta"].includes(e.key))return null;let t="",i="";if(e.ctrlKey||e.altKey||e.metaKey){const s=e.key.toUpperCase(),u=e.ctrlKey?"Ctrl":e.altKey?"Alt":"Meta";if(e.key.length===1)if(t=`${u}+${s}`,e.ctrlKey)i=String.fromCharCode(e.key.toUpperCase().charCodeAt(0)-64);else return null;else return null}else if(e.key.startsWith("Arrow")){const u={ArrowUp:{label:"↑",code:"A"},ArrowDown:{label:"↓",code:"B"},ArrowRight:{label:"→",code:"C"},ArrowLeft:{label:"←",code:"D"}}[e.key];if(u)t=u.label,i=`\x1B[${u.code}`;else return null}else if(e.key==="Escape")t="Esc",i="\x1B";else if(e.key==="Enter")t="Enter",i="\r";else if(e.key==="Tab")t=e.shiftKey?"Shift+Tab":"Tab",i=e.shiftKey?"\x1B[Z":" ";else if(e.key==="Backspace")t="Backspace",i="";else if(e.key==="Delete")t="Delete",i="\x1B[3~";else if(e.key==="Home")t="Home",i="\x1B[H";else if(e.key==="End")t="End",i="\x1B[F";else if(e.key==="PageUp")t="PageUp",i="\x1B[5~";else if(e.key==="PageDown")t="PageDown",i="\x1B[6~";else if(e.key.match(/^F([1-9]|1[0-2])$/)){const s={F1:"\x1BOP",F2:"\x1BOQ",F3:"\x1BOR",F4:"\x1BOS",F5:"\x1B[15~",F6:"\x1B[17~",F7:"\x1B[18~",F8:"\x1B[19~",F9:"\x1B[20~",F10:"\x1B[21~",F11:"\x1B[23~",F12:"\x1B[24~"};t=e.key,i=s[e.key]??""}else if(e.key.length===1)t=e.key.toUpperCase(),i=e.key;else return null;return{label:t,data:i}}function ew({shortcuts:e,onChange:t}){const[i,s]=B.useState(null),[u,p]=B.useState(!1),d=GE(),o=KE(),l=(E,m)=>{E.preventDefault(),E.stopPropagation();const _=Jx(E);if(_){const v=e.map(S=>S._id===m?{...S,label:_.label,data:_.data}:S);t(v),s(null)}},c=E=>{const m=[...e];m[E]={...m[E],enabled:!m[E].enabled},t(m)},g=()=>{if(o){p(!0),setTimeout(()=>p(!1),3e3);return}const E=qE(),m=[...e,{label:"New",data:"",enabled:!0,_id:E}];t(m),s(E)},h=E=>{const m=e.filter((_,v)=>v!==E);t(m)},b=E=>{const{active:m,over:_}=E;if(_&&m.id!==_.id){const v=e.findIndex(A=>A._id===m.id),S=e.findIndex(A=>A._id===_.id),x=[...e],[k]=x.splice(v,1);x.splice(S,0,k),t(x)}},y=E=>{const m=e.findIndex(S=>S._id===E);if(m<=0)return;const _=[...e],[v]=_.splice(m,1);_.unshift(v),t(_)},T=E=>{const m=e.findIndex(S=>S._id===E);if(m===-1||m===e.length-1)return;const _=[...e],[v]=_.splice(m,1);_.push(v),t(_)};return X.jsxs("div",{"data-testid":"settings--shortcuts--container",style:{display:"flex",flexDirection:"column",gap:12},children:[X.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:8},children:[X.jsx("span",{style:{fontSize:14,fontWeight:600,color:"var(--text-primary)"},children:"Shortcuts"}),X.jsx("button",{onClick:g,disabled:o,"data-testid":"settings--shortcuts--button--add",style:{padding:"8px 16px",fontSize:13,borderRadius:6,border:"1px solid var(--border-color)",background:"var(--bg-tertiary)",color:"var(--text-primary)",cursor:o?"not-allowed":"pointer",opacity:o?.5:1},children:"+ Add"})]}),o&&X.jsxs("div",{"data-testid":"settings--shortcuts--mobile-warning",style:{padding:"10px 12px",backgroundColor:"var(--bg-warning, #fff8e6)",border:"1px solid var(--border-warning, #ffd666)",borderRadius:6,fontSize:13,color:"var(--text-warning, #ad6800)",display:"flex",alignItems:"center",gap:8},children:[X.jsx("span",{style:{fontSize:16},children:"⚠️"}),X.jsx("span",{children:"移动端无法新增快捷键,请在PC端浏览器中添加"})]}),e.length===0&&X.jsx("div",{"data-testid":"settings--shortcuts--empty",style:{padding:16,textAlign:"center",color:"var(--text-secondary)",fontSize:13},children:"No shortcuts yet. Click the button above to add one."}),X.jsx(BE,{sensors:d,collisionDetection:CE,onDragEnd:b,children:X.jsx(jE,{items:e.map(E=>E._id),strategy:UE,children:e.map(E=>X.jsx(YE,{id:E._id,enabled:E.enabled,onToggle:()=>{const m=e.findIndex(_=>_._id===E._id);m!==-1&&c(m)},onDelete:()=>{const m=e.findIndex(_=>_._id===E._id);m!==-1&&h(m)},onMoveToFirst:()=>y(E._id),onMoveToLast:()=>T(E._id),children:X.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,flex:1,minWidth:0},children:[X.jsx("input",{type:"text",value:E.label,readOnly:!0,autoComplete:"off",placeholder:"Press key to capture",onClick:()=>s(E._id),onKeyDown:m=>l(m,E._id),onBlur:()=>s(null),"aria-label":`Shortcut ${E.label}`,style:{flex:1,minWidth:0,height:36,padding:"0 12px",borderRadius:6,border:i===E._id?"2px solid var(--status-running)":"1px solid var(--border-color)",background:"var(--bg-primary)",color:"var(--text-primary)",fontSize:14,cursor:"pointer",textAlign:"center"}}),X.jsx("span",{title:E.data?E.data.replace(/\x1b/g,"ESC").replace(/\r/g,"CR").replace(/\t/g,"TAB"):"(not set)",style:{display:"inline-flex",alignItems:"center",justifyContent:"flex-end",fontSize:11,color:"var(--text-muted)",fontFamily:"monospace",flexShrink:0,width:35,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:E.data?E.data.replace(/\x1b/g,"ESC").replace(/\r/g,"CR").replace(/\t/g,"TAB"):"(not set)"})]})},E._id))})}),i!==null&&!o&&X.jsx("div",{style:{fontSize:12,color:"var(--text-secondary)",textAlign:"center",marginTop:4},children:"Press a key to capture…"}),u&&X.jsx("div",{style:{position:"fixed",bottom:80,left:"50%",transform:"translateX(-50%)",padding:"12px 20px",backgroundColor:"var(--bg-secondary, #333)",color:"var(--text-inverse, #fff)",borderRadius:8,fontSize:14,boxShadow:"0 4px 12px rgba(0,0,0,0.2)",zIndex:1e3,whiteSpace:"nowrap",animation:"fadeInOut 3s ease"},children:"请在PC端浏览器中新增快捷键"})]})}const tw={width:"100%",padding:"10px 12px",borderRadius:6,fontSize:14,resize:"none",overflowX:"auto",overflowY:"hidden",whiteSpace:"nowrap",lineHeight:"20px",boxSizing:"border-box"};function Ta(e){return{...tw,...e}}function nw({autoSend:e,onToggle:t}){const i=e??!0;return X.jsx("button",{onClick:t,"aria-label":"Auto-send toggle",title:"Auto-send toggle",style:{width:32,height:32,padding:0,borderRadius:6,border:"none",background:i?"var(--status-running)":"var(--bg-primary)",color:i?"#fff":"var(--text-secondary)",cursor:"pointer",fontSize:14,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:i?"↗":"✎"})}function iw({commands:e,onChange:t}){const[i,s]=B.useState(null),[u,p]=B.useState(""),d=GE(),o=_=>{const v=e.find(S=>S._id===_);v&&(s(_),p(v.command))},l=_=>{if(!_){s(null),p("");return}let v=u.trim();if(!v){y(_);return}v.startsWith("/")||(v="/"+v);const S=e.map(x=>x._id===_?{...x,label:v,command:v}:x);t(S),s(null),p("")},c=_=>{const v=e.map(S=>S._id===_?{...S,enabled:!S.enabled}:S);t(v)},g=bt(_=>_.showToast),h=_=>{const v=e.find(k=>k._id===_);if(!v)return;const S=!(v.autoSend??!0),x=e.map(k=>k._id===_?{...k,autoSend:S}:k);t(x),g(S?"Commands will auto-send on tap":"Commands will be inserted for editing")},b=()=>{const _=qE(),v=[...e,{label:"/new",command:"/new",enabled:!0,autoSend:!0,_id:_}];t(v),s(_),p("/new")},y=_=>{const v=e.filter(S=>S._id!==_);t(v)},T=_=>{const{active:v,over:S}=_;if(S&&v.id!==S.id){const x=e.findIndex(D=>D._id===v.id),k=e.findIndex(D=>D._id===S.id),A=[...e],[O]=A.splice(x,1);A.splice(k,0,O),t(A)}},E=_=>{const v=e.findIndex(k=>k._id===_);if(v<=0)return;const S=[...e],[x]=S.splice(v,1);S.unshift(x),t(S)},m=_=>{const v=e.findIndex(k=>k._id===_);if(v===-1||v===e.length-1)return;const S=[...e],[x]=S.splice(v,1);S.push(x),t(S)};return X.jsxs("div",{"data-testid":"settings--commands--container",style:{display:"flex",flexDirection:"column",gap:12},children:[X.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:8},children:[X.jsx("span",{style:{fontSize:14,fontWeight:600,color:"var(--text-primary)"},children:"Commands"}),X.jsx("button",{onClick:b,"data-testid":"settings--commands--button--add",style:{padding:"8px 16px",fontSize:13,borderRadius:6,border:"1px solid var(--border-color)",background:"var(--bg-tertiary)",color:"var(--text-primary)",cursor:"pointer"},children:"+ Add"})]}),e.length===0&&X.jsx("div",{"data-testid":"settings--commands--empty",style:{padding:16,textAlign:"center",color:"var(--text-secondary)",fontSize:13},children:"No commands yet. Click the button above to add one."}),X.jsx(BE,{sensors:d,collisionDetection:CE,onDragEnd:T,children:X.jsx(jE,{items:e.map(_=>_._id),strategy:UE,children:e.map(_=>X.jsx(YE,{id:_._id,enabled:_.enabled,onToggle:()=>c(_._id),onDelete:()=>y(_._id),onMoveToFirst:()=>E(_._id),onMoveToLast:()=>m(_._id),extraAction:X.jsx(nw,{autoSend:_.autoSend??!0,onToggle:()=>h(_._id)}),children:i===_._id?X.jsx("textarea",{value:u,onChange:v=>p(v.target.value),onKeyDown:v=>{v.key==="Enter"&&(v.preventDefault(),l(_._id)),v.key==="Escape"&&(p(""),l(null))},onBlur:()=>l(_._id),autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:!1,inputMode:"text",rows:1,placeholder:"Enter command…","aria-label":`Edit ${_.label}`,style:Ta({flex:"1 1 180px",minWidth:0,height:36,padding:"0 12px",border:"2px solid var(--status-running)",background:"var(--bg-primary)",color:"var(--text-primary)",lineHeight:"36px"})}):X.jsx("button",{type:"button",onClick:()=>o(_._id),"aria-label":`Edit command ${_.label}`,style:{flex:"1 1 180px",minWidth:0,height:36,padding:"0 12px",borderRadius:6,border:"1px solid var(--border-color)",background:"var(--bg-primary)",color:"var(--text-primary)",fontSize:14,display:"flex",alignItems:"center",cursor:"pointer",textAlign:"left",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:_.label})},_._id))})}),X.jsx("div",{"data-testid":"settings--commands--tip",style:{fontSize:12,color:"var(--text-muted)",marginTop:8},children:"Tip: Commands are auto-prefixed with / (e.g., help → /help)"})]})}function VE({checked:e,onChange:t,disabled:i=!1,"aria-label":s,"data-testid":u}){return X.jsx("button",{type:"button",role:"switch","aria-checked":e,"aria-label":s,disabled:i,"data-testid":u,onClick:()=>!i&&t(!e),style:{position:"relative",width:"44px",height:"24px",borderRadius:"12px",border:"none",padding:0,cursor:i?"not-allowed":"pointer",background:e?"var(--status-running)":"var(--bg-tertiary)",opacity:i?.5:1,transition:"background 150ms ease-out",touchAction:"manipulation",WebkitTapHighlightColor:"transparent"},children:X.jsx("span",{style:{position:"absolute",top:"2px",left:e?"22px":"2px",width:"20px",height:"20px",borderRadius:"50%",background:"#ffffff",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.3)",transition:"left 150ms ease-out"}})})}function qu({channelType:e,status:t,isExpanded:i,onToggle:s,onEnabledChange:u,children:p}){const d=dA[e],o=(d==null?void 0:d.implemented)??!1,l=(t==null?void 0:t.configured)??!1,c=(t==null?void 0:t.enabled)??!0,g={dingtalk:"📱",email:"📧",slack:"💬",wechat_work:"💼"},h=b=>{b.stopPropagation()};return X.jsxs("div",{"data-testid":`settings--channel--card--${e}`,style:{border:"1px solid var(--border-color)",borderRadius:8,background:"var(--bg-tertiary)",overflow:"hidden",opacity:o?1:.6},children:[X.jsxs("button",{"data-testid":`settings--channel--header--${e}`,onClick:o?s:void 0,style:{width:"100%",padding:"16px",border:"none",background:i?"var(--bg-secondary)":"transparent",display:"flex",alignItems:"center",justifyContent:"space-between",cursor:o?"pointer":"default",textAlign:"left"},children:[X.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12},children:[X.jsx("span",{style:{fontSize:24},children:g[e]??"🔔"}),X.jsxs("div",{children:[X.jsxs("div",{style:{fontSize:16,fontWeight:600,color:"var(--text-primary)",display:"flex",alignItems:"center",gap:8},children:[(d==null?void 0:d.displayName)??e,l&&X.jsx("span",{style:{width:8,height:8,borderRadius:"50%",background:c?"var(--status-running)":"var(--text-muted)"},title:c?"Enabled":"Disabled"})]}),X.jsx("div",{style:{fontSize:13,color:"var(--text-secondary)",marginTop:2},children:(d==null?void 0:d.description)??""})]})]}),X.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[l&&u&&X.jsx("div",{onClick:h,children:X.jsx(VE,{checked:c,onChange:u,"aria-label":`Toggle ${(d==null?void 0:d.displayName)??e}`})}),!o&&X.jsx("span",{"data-testid":`settings--channel--coming--${e}`,style:{fontSize:12,color:"var(--text-secondary)",background:"var(--bg-secondary)",padding:"4px 10px",borderRadius:12},children:"Coming"}),o&&X.jsx("svg",{style:{width:16,height:16,transform:i?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s",color:"var(--text-secondary)"},fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:X.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})]}),o&&i&&X.jsx("div",{style:{padding:"16px",borderTop:"1px solid var(--border-color)",background:"var(--bg-primary)"},children:p})]})}function rw({webhookUrl:e,onChange:t,configured:i}){const[s,u]=B.useState(!1),p=e===""||hE.test(e),d=s&&!p&&e!=="";return X.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:12},children:[X.jsxs("div",{children:[X.jsx("label",{style:{display:"block",fontSize:14,fontWeight:500,marginBottom:8,color:"var(--text-primary)"},children:"Webhook URL"}),X.jsx("textarea",{"data-testid":"settings--dingtalk--input--webhook",autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:!1,inputMode:"text",rows:1,placeholder:"https://oapi.dingtalk.com/robot/send?access_token=...",value:e,onChange:o=>{t(o.target.value)},onBlur:()=>u(!0),style:Ta({border:`1px solid ${d?"var(--status-error)":"var(--border-color)"}`,background:"var(--bg-secondary)",color:"var(--text-primary)"})}),d&&X.jsx("div",{"data-testid":"settings--dingtalk--error",style:{marginTop:6,fontSize:12,color:"var(--status-error)"},children:"Please enter a valid DingTalk Webhook URL starting with https://oapi.dingtalk.com/robot/send?access_token="})]}),i&&!e&&X.jsx("div",{"data-testid":"settings--dingtalk--configured",style:{padding:10,background:"rgba(46, 204, 113, 0.1)",borderRadius:6,fontSize:13,color:"var(--status-running)"},children:"✓ Configured. Enter a new URL to update."}),X.jsx("div",{style:{fontSize:12,color:"var(--text-secondary)"},children:X.jsx("a",{href:"https://open.dingtalk.com/document/robots/custom-robot-access",target:"_blank",rel:"noopener noreferrer",style:{color:"var(--status-running)"},children:"How to get DingTalk group bot Webhook?"})})]})}function sw({sendKey:e,onChange:t,configured:i}){const[s,u]=B.useState(!1),p=e===""||dE.test(e),d=s&&!p&&e!=="";return X.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:12},children:[X.jsxs("div",{children:[X.jsx("label",{style:{display:"block",fontSize:14,fontWeight:500,marginBottom:8,color:"var(--text-primary)"},children:"SendKey"}),X.jsx("textarea",{"data-testid":"settings--wechat--input--sendkey",autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:!1,inputMode:"text",rows:1,placeholder:"SCTxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",value:e,onChange:o=>{t(o.target.value)},onBlur:()=>u(!0),style:Ta({border:`1px solid ${d?"var(--status-error)":"var(--border-color)"}`,background:"var(--bg-secondary)",color:"var(--text-primary)"})}),d&&X.jsx("div",{"data-testid":"settings--wechat--error",style:{marginTop:6,fontSize:12,color:"var(--status-error)"},children:"Please enter a valid SendKey (starts with SCT, at least 13 characters)"})]}),i&&!e&&X.jsx("div",{"data-testid":"settings--wechat--configured",style:{padding:10,background:"rgba(46, 204, 113, 0.1)",borderRadius:6,fontSize:13,color:"var(--status-running)"},children:"✓ Configured. Enter a new SendKey to update."}),X.jsx("div",{style:{fontSize:12,color:"var(--text-secondary)"},children:X.jsx("a",{href:"https://sct.ftqq.com/sendkey",target:"_blank",rel:"noopener noreferrer",style:{color:"var(--status-running)"},children:"How to get SendKey?"})})]})}function aw({notificationStatus:e,dingtalkWebhookUrl:t,onDingtalkWebhookChange:i,wechatWorkSendKey:s,onWechatWorkSendKeyChange:u,onChannelEnabledChange:p}){var c,g,h,b;const[d,o]=B.useState("dingtalk"),l=y=>{o(T=>T===y?null:y)};return X.jsxs("div",{"data-testid":"settings--notifications--container",style:{display:"flex",flexDirection:"column",gap:12},children:[X.jsx("div",{"data-testid":"settings--notifications--description",style:{padding:12,background:"var(--bg-tertiary)",borderRadius:8,fontSize:13,color:"var(--text-secondary)"},children:"Configure notification channels to receive alerts when Claude needs your attention."}),X.jsx(qu,{channelType:"dingtalk",status:e==null?void 0:e.dingtalk,isExpanded:d==="dingtalk",onToggle:()=>l("dingtalk"),onEnabledChange:(c=e==null?void 0:e.dingtalk)!=null&&c.configured?y=>p==null?void 0:p("dingtalk",y):void 0,children:X.jsx(rw,{webhookUrl:t,onChange:i,configured:(g=e==null?void 0:e.dingtalk)==null?void 0:g.configured})}),X.jsx(qu,{channelType:"wechat_work",status:e==null?void 0:e.wechat_work,isExpanded:d==="wechat_work",onToggle:()=>l("wechat_work"),onEnabledChange:(h=e==null?void 0:e.wechat_work)!=null&&h.configured?y=>p==null?void 0:p("wechat_work",y):void 0,children:X.jsx(sw,{sendKey:s,onChange:u,configured:(b=e==null?void 0:e.wechat_work)==null?void 0:b.configured})}),X.jsx(qu,{channelType:"email",status:e==null?void 0:e.email,isExpanded:d==="email",onToggle:()=>l("email")}),X.jsx(qu,{channelType:"slack",status:e==null?void 0:e.slack,isExpanded:d==="slack",onToggle:()=>l("slack")})]})}function ow({showFloatingDocButton:e,onFloatingDocButtonChange:t,isHiddenByLongPress:i,onResetHiddenState:s}){const u=p=>{t(p),p&&i&&s()};return X.jsxs("div",{style:{padding:"8px 0"},children:[X.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 0",borderBottom:"1px solid var(--border-color)"},children:[X.jsxs("div",{style:{flex:1},children:[X.jsx("div",{style:{fontSize:14,fontWeight:500,color:"var(--text-primary)"},children:"Show Floating Doc Button"}),X.jsxs("div",{style:{fontSize:12,color:"var(--text-secondary)",marginTop:4},children:["Show the floating document button in the terminal area",i&&X.jsx("span",{style:{color:"var(--status-waiting)",marginLeft:4},children:"(hidden by long press)"})]})]}),X.jsx(VE,{checked:e,onChange:u,"data-testid":"settings--toggle--floating-doc-button"})]}),i&&e&&X.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 0",borderBottom:"1px solid var(--border-color)"},children:[X.jsxs("div",{style:{flex:1},children:[X.jsx("div",{style:{fontSize:14,fontWeight:500,color:"var(--text-primary)"},children:"Restore Hidden Button"}),X.jsx("div",{style:{fontSize:12,color:"var(--text-secondary)",marginTop:4},children:"The button was hidden by long press. Click to restore."})]}),X.jsx("button",{onClick:s,"data-testid":"settings--button--restore-doc-button",style:{padding:"6px 12px",borderRadius:6,border:"1px solid var(--status-running)",background:"transparent",color:"var(--status-running)",fontSize:13,cursor:"pointer"},children:"Restore"})]})]})}const lw=100,uw=300;var Hb;const Wo=typeof window<"u"&&((Hb=window.matchMedia)==null?void 0:Hb.call(window,"(prefers-reduced-motion: reduce)").matches),tf=Wo?0:300;function XE({isOpen:e,onClose:t,title:i,children:s,footer:u,"data-testid":p}){const[d,o]=B.useState(!1),[l,c]=B.useState(!1),[g,h]=B.useState(0),[b,y]=B.useState(!1),T=B.useRef(0),E=B.useRef(0);B.useEffect(()=>{if(e)o(!0),h(0),Wo?c(!0):requestAnimationFrame(()=>{requestAnimationFrame(()=>c(!0))});else if(d)if(c(!1),Wo)o(!1);else{const A=setTimeout(()=>o(!1),tf);return()=>clearTimeout(A)}},[e,d]);const m=B.useCallback(A=>{y(!0),T.current=A,E.current=Date.now(),h(0)},[]),_=B.useCallback(A=>{if(!b)return;const O=A-T.current;O>0&&h(O)},[b]),v=B.useCallback(()=>{if(!b)return;const A=g,O=Date.now()-E.current,D=O>0?A/(O/1e3):0;A>lw||A>50&&D>uw||A<5?t():h(0),y(!1)},[b,g,t]);if(!d)return null;const S=Wo||b?"none":`transform ${tf}ms ease-out`,x=Wo?"none":`background ${tf}ms ease-out`,k=b?`translateY(${g}px)`:l?"translateY(0)":"translateY(100%)";return X.jsx("div",{onClick:t,style:{position:"fixed",top:0,left:0,right:0,bottom:0,background:l?"rgba(0, 0, 0, 0.5)":"rgba(0, 0, 0, 0)",transition:x,display:"flex",alignItems:"flex-end",justifyContent:"center",zIndex:1e3},children:X.jsxs("div",{"data-testid":p,onClick:A=>A.stopPropagation(),style:{width:"100%",maxWidth:480,maxHeight:"calc(85vh - env(safe-area-inset-bottom, 0px))",borderRadius:"16px 16px 0 0",background:"var(--bg-secondary)",boxShadow:"0 -4px 24px rgba(0, 0, 0, 0.3)",display:"flex",flexDirection:"column",overflow:"hidden",transform:k,transition:S,paddingBottom:"var(--safe-bottom)"},children:[X.jsx("div",{style:{height:44,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",flexShrink:0},onTouchStart:A=>m(A.touches[0].clientY),onTouchMove:A=>_(A.touches[0].clientY),onTouchEnd:v,onMouseDown:A=>m(A.clientY),onMouseMove:A=>b&&_(A.clientY),onMouseUp:v,onMouseLeave:v,children:X.jsx("div",{style:{width:36,height:4,background:"var(--text-secondary)",opacity:.5,borderRadius:2}})}),X.jsx("div",{style:{padding:"0 20px 16px 20px",display:"flex",alignItems:"center",flexShrink:0},children:X.jsx("h2",{"data-testid":p?`${p}--title`:void 0,style:{fontSize:18,fontWeight:600,margin:0},children:i})}),X.jsx("div",{style:{flex:1,overflow:"auto",overscrollBehavior:"contain",padding:"0 16px"},children:s}),u&&X.jsx("div",{style:{padding:"12px 20px",borderTop:"1px solid var(--border-color)",flexShrink:0},children:u})]})})}function cw({isOpen:e,onClose:t,onConfigSaved:i}){const[s,u]=B.useState("shortcuts"),[p,d]=B.useState([]),[o,l]=B.useState([]),[c,g]=B.useState(""),[h,b]=B.useState(""),[y,T]=B.useState({}),[E,m]=B.useState(!1),[_,v]=B.useState(null),[S,x]=B.useState(!1),k=qn(K=>K.activeInstanceId),A=bt(K=>K.showToast),O=bt(K=>K.showFloatingDocButton),D=bt(K=>K.setShowFloatingDocButton),N=bt(K=>K.isDocButtonHiddenByLongPress),L=bt(K=>K.setDocButtonHiddenByLongPress),F=B.useRef(0);function I(){return String(++F.current)}function z(K){return{...K,_id:I()}}B.useEffect(()=>{e&&W()},[e]);const W=async()=>{try{const{config:K}=await lE(k??void 0);if(K){d(K.shortcuts.map(H=>z(H))),l(K.commands.map(H=>z(H)));const Q=K.notifications||{};T(Q),g("")}else d(fE.map(Q=>z({...Q,enabled:!0}))),l(pE.map(Q=>z({...Q,enabled:!0}))),T({}),g("")}catch(K){v("Failed to load configuration"),console.error(K)}},q=async(K,Q)=>{const H=y;T(U=>({...U,[K]:{...U[K],configured:!0,enabled:Q}}));const M=K==="dingtalk"?"DingTalk":"WeChat Work";try{await oA(K,Q),A(`${M} notifications ${Q?"enabled":"disabled"}`)}catch(U){T(H),console.error("Failed to update channel enabled status:",U),v(`Failed to update ${M.toLowerCase()}`),A(`Failed to update ${M.toLowerCase()}`),setTimeout(()=>v(null),2e3)}},Y=async()=>{var K,Q;m(!0),v(null),x(!1);try{const H={shortcuts:p.map(({_id:re,..._e})=>_e),commands:o.map(({_id:re,..._e})=>_e)},M={},U=c.trim();if(U){if(!hE.test(U)){v("Please enter a valid DingTalk Webhook URL (starting with https://oapi.dingtalk.com/robot/send?access_token=)"),m(!1);return}M.dingtalk={webhookUrl:U}}const $=h.trim();if($){if(!dE.test($)){v("Please enter a valid SendKey (starts with SCT, at least 13 characters)"),m(!1);return}M.wechat_work={sendKey:$}}if(Object.keys(M).length>0&&(H.notifications=M),await aA(H,k??void 0)){x(!0);const re={...y};U&&(re.dingtalk={...y==null?void 0:y.dingtalk,configured:!0,enabled:(K=y==null?void 0:y.dingtalk)==null?void 0:K.enabled},g("")),$&&(re.wechat_work={...y==null?void 0:y.wechat_work,configured:!0,enabled:(Q=y==null?void 0:y.wechat_work)==null?void 0:Q.enabled},b("")),T(re),i==null||i(),setTimeout(()=>x(!1),2e3)}else v("Failed to save")}catch(H){v("Failed to save"),console.error(H)}finally{m(!1)}};return X.jsxs(XE,{isOpen:e,onClose:t,title:"Settings","data-testid":"settings--modal",footer:X.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:12},children:[X.jsxs("div",{style:{fontSize:13},children:[_&&X.jsx("span",{"data-testid":"settings--message--error",style:{color:"var(--status-error)"},children:_}),S&&X.jsx("span",{"data-testid":"settings--message--success",style:{color:"var(--status-running)"},children:"Saved"})]}),X.jsxs("div",{style:{display:"flex",gap:8},children:[X.jsx("button",{onClick:t,"data-testid":"settings--button--close",style:{padding:"8px 20px",borderRadius:6,border:"1px solid var(--border-color)",background:"var(--bg-tertiary)",color:"var(--text-primary)",fontSize:14,cursor:"pointer"},children:"Cancel"}),X.jsx("button",{onClick:Y,disabled:E,"data-testid":"settings--button--save",style:{padding:"8px 20px",borderRadius:6,border:"none",background:E?"var(--bg-tertiary)":"var(--status-running)",color:"#fff",fontSize:14,fontWeight:600,cursor:E?"default":"pointer",opacity:E?.7:1},children:E?"Saving…":"Save"})]})]}),children:[X.jsx("div",{style:{display:"flex",borderBottom:"1px solid var(--border-color)",margin:"0 -16px",marginBottom:16},children:["shortcuts","commands","notifications","display"].map(K=>X.jsx("button",{onClick:()=>u(K),"data-testid":`settings--tab--${K}`,style:{flex:1,padding:"12px 16px",border:"none",background:"transparent",color:s===K?"var(--text-primary)":"var(--text-secondary)",borderBottom:s===K?"2px solid var(--status-running)":"2px solid transparent",cursor:"pointer",fontSize:14,fontWeight:s===K?600:400},children:K==="shortcuts"?"Shortcuts":K==="commands"?"Commands":K==="notifications"?"Notifications":"Display"},K))}),s==="shortcuts"?X.jsx(ew,{shortcuts:p,onChange:d}):s==="commands"?X.jsx(iw,{commands:o,onChange:l}):s==="notifications"?X.jsx(aw,{notificationStatus:y,dingtalkWebhookUrl:c,onDingtalkWebhookChange:g,wechatWorkSendKey:h,onWechatWorkSendKeyChange:b,onChannelEnabledChange:q}):X.jsx(ow,{showFloatingDocButton:O,onFloatingDocButtonChange:D,isHiddenByLongPress:N,onResetHiddenState:()=>L(!1)})]})}const hw={idle:{color:"var(--status-idle)",label:"Idle"},running:{color:"var(--status-running)",label:"Running"},waiting_input:{color:"var(--status-waiting)",label:"Waiting Input"}},dw={connecting:{color:"var(--status-waiting)",label:"Connecting..."},connected:{color:"var(--status-idle)",label:"Connected"},disconnected:{color:"var(--status-error)",label:"Disconnected"}};function fw(){const[e,t]=B.useState(!1),i=bt(h=>h.sessionStatus),s=bt(h=>h.serverAvailable),u=qn(h=>h.instances),p=qn(h=>h.activeInstanceId),d=bt(h=>p?h.instanceConnectionStatus[p]??"disconnected":h.connectionStatus),o=hw[i],l=dw[d],g=s===!1?{type:"error",testId:"status--indicator--server-unavailable",icon:"●",label:"Server Unavailable",bgColor:"var(--status-error)"}:s===!0&&u.length===0?{type:"warning",testId:"status--indicator--no-instances",icon:"▲",label:"No Instances",bgColor:"var(--status-waiting)"}:null;return X.jsxs(X.Fragment,{children:[X.jsxs("div",{"data-testid":"status-bar",style:{height:"var(--statusbar-height)",background:"var(--bg-secondary)",borderBottom:"1px solid var(--border-color)",display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0 16px",paddingTop:"var(--safe-top)",flexShrink:0},children:[X.jsx("div",{style:{display:"flex",alignItems:"center",gap:8,minWidth:0,overflow:"hidden",flex:"1 1 auto"},children:X.jsx("span",{style:{fontSize:13,fontWeight:600,color:"var(--text-primary)"},children:"Claude Remote"})}),X.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12},children:[g?X.jsxs("span",{"data-testid":g.testId,style:{display:"inline-flex",alignItems:"center",gap:"4px",padding:"2px 8px",borderRadius:"4px",background:g.bgColor,color:"#fff",fontSize:"12px",fontWeight:500,whiteSpace:"nowrap"},children:[X.jsx("span",{style:{fontSize:"10px"},children:g.icon}),X.jsx("span",{style:{maxWidth:"110px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:g.label})]}):X.jsxs(X.Fragment,{children:[X.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[X.jsx("span",{"data-testid":`status--indicator--${i}`,style:{width:8,height:8,borderRadius:"50%",background:o.color,display:"inline-block"}}),X.jsx("span",{"data-testid":"status--label--session",style:{fontSize:12,color:"var(--text-secondary)"},children:o.label})]}),X.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[X.jsx("span",{"data-testid":`status--indicator--${d}`,style:{width:8,height:8,borderRadius:"50%",background:l.color,display:"inline-block"}}),X.jsx("span",{"data-testid":"status--label--connection",style:{fontSize:12,color:"var(--text-secondary)"},children:l.label})]})]}),X.jsx("button",{onClick:()=>t(!0),"aria-label":"Settings","data-testid":"status--button--settings",style:{width:44,height:44,marginRight:-12,borderRadius:8,border:"none",background:"transparent",color:"var(--text-secondary)",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:22},children:"⚙"})]})]}),X.jsx(cw,{isOpen:e,onClose:()=>t(!1),onConfigSaved:mE})]})}function pw({containerRef:e,onFocusInput:t}){const i=()=>{t==null||t()};return X.jsx("div",{ref:e,onClick:i,"data-testid":"terminal--container",style:{flex:1,overflow:"hidden",background:"var(--bg-primary)"}})}const gw=B.forwardRef(function({onSend:t,disabled:i,isKeyboardOpen:s},u){const[p,d]=B.useState(""),o=B.useRef(null);B.useImperativeHandle(u,()=>({setText:g=>{d(g)},focus:()=>{var g;return(g=o.current)==null?void 0:g.focus()}}),[]);const l=B.useCallback(()=>{const g=p.trim();t(g),d("")},[p,t]),c=B.useCallback(g=>{g.key==="Enter"&&!g.shiftKey&&(g.preventDefault(),l())},[l]);return X.jsxs("div",{"data-testid":"console--input-bar",style:{height:"var(--inputbar-height)",background:"var(--bg-secondary)",borderTop:"1px solid var(--border-color)",display:"flex",alignItems:"center",padding:"8px 12px",paddingBottom:s?"8px":"calc(8px + var(--safe-bottom))",transition:"padding-bottom 0.25s ease-out",gap:8,flexShrink:0},children:[X.jsx("textarea",{ref:o,"data-testid":"console--input--command",value:p,onChange:g=>d(g.target.value),onKeyDown:c,disabled:i,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:!1,inputMode:"text",rows:1,placeholder:"Enter command or number to select…","aria-label":"Command input",style:Ta({flex:1,height:40,borderRadius:8,border:"1px solid var(--border-color)",background:"var(--bg-tertiary)",color:"var(--text-primary)",fontSize:16,fontFamily:"inherit"})}),X.jsx("button",{"data-testid":"console--input--send-btn",onClick:l,disabled:i||!p.trim(),"aria-label":"Send message",style:{width:44,height:44,borderRadius:8,border:"none",background:p.trim()?"var(--accent-primary, #0066cc)":"var(--bg-tertiary)",color:p.trim()?"#fff":"var(--text-tertiary)",display:"flex",alignItems:"center",justifyContent:"center",cursor:p.trim()&&!i?"pointer":"not-allowed",flexShrink:0,transition:"background 0.2s, color 0.2s",padding:0},children:X.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[X.jsx("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),X.jsx("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]})})]})}),QE={height:36,borderRadius:6,border:"none",background:"var(--bg-tertiary)",fontFamily:"var(--font-mono)",fontWeight:500,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center"},mw={...QE,minWidth:44,flexShrink:0,color:"var(--text-primary)",fontSize:13,padding:"0 12px"},_w={...QE,minWidth:60,flexShrink:0,color:"var(--text-secondary)",fontSize:12,whiteSpace:"nowrap",padding:"0 12px"};function Yu(){document.activeElement instanceof HTMLElement&&document.activeElement.blur()}function nf(e,t,i){e.preventDefault(),document.activeElement instanceof HTMLElement&&document.activeElement.blur(),t(i);const s=()=>{document.activeElement instanceof HTMLElement&&document.activeElement.blur()};requestAnimationFrame(s),setTimeout(s,0)}function bw({onShortcut:e,onCommandSelect:t,onCommandSend:i,visible:s=!0}){const{shortcuts:u,commands:p,isLoading:d}=gA();return!s||d?null:X.jsxs("div",{"data-testid":"console--command-picker",style:{background:"var(--bg-secondary)",borderTop:"1px solid var(--border-color)",flexShrink:0},children:[X.jsx("div",{"data-testid":"console--shortcut-bar","data-scrollable":!0,style:{height:"var(--keybar-height)",display:"flex",alignItems:"center",padding:"6px 12px",gap:6,overflowX:"auto",WebkitOverflowScrolling:"touch",scrollbarWidth:"none",msOverflowStyle:"none"},children:u.map(o=>X.jsx("button",{type:"button","data-testid":`console--button--shortcut-${o.label.toLowerCase().replace(/\s+/g,"-")}`,className:"cmd-picker-btn",onClick:l=>nf(l,e,o.data),onTouchStart:Yu,onMouseDown:l=>{l.preventDefault(),Yu()},style:mw,children:o.label},o.label))}),X.jsx("div",{"data-testid":"console--command-buttons","data-scrollable":!0,style:{height:"var(--keybar-height)",display:"flex",alignItems:"center",padding:"6px 12px",gap:6,overflowX:"auto",WebkitOverflowScrolling:"touch",scrollbarWidth:"none",msOverflowStyle:"none"},children:p.map(o=>{const l=o.autoSend??!0;return X.jsx("button",{type:"button","data-testid":`console--button--command-${o.label.toLowerCase().replace(/\s+/g,"-")}`,className:"cmd-picker-btn",onClick:c=>{l?nf(c,i,o.command):nf(c,t,o.command+" ")},onTouchStart:Yu,onMouseDown:c=>{c.preventDefault(),Yu()},style:_w,children:o.label},o.label)})}),X.jsx("style",{children:`
65
- [data-scrollable]::-webkit-scrollbar {
66
- display: none;
67
- }
68
- @media (prefers-reduced-motion: no-preference) {
69
- .cmd-picker-btn:hover {
70
- filter: brightness(1.2);
71
- }
72
- .cmd-picker-btn:active {
73
- transform: scale(0.95);
74
- filter: brightness(0.9);
75
- }
76
- }
77
- @media (prefers-reduced-motion: reduce) {
78
- .cmd-picker-btn:hover {
79
- filter: brightness(1.2);
80
- }
81
- .cmd-picker-btn:active {
82
- filter: brightness(0.9);
83
- }
84
- }
85
- `})]})}function Ew(){const e=bt(u=>u.ipChangeInfo),t=bt(u=>u.setIpChangeInfo);if(!e)return null;const i=()=>{t(null),window.location.href=e.newUrl},s=()=>{t(null)};return X.jsxs("div",{role:"alert","aria-live":"polite",style:{position:"fixed",top:"calc(var(--safe-top) + 8px)",left:"50%",transform:"translateX(-50%)",zIndex:100,maxWidth:"calc(100% - 32px)",background:"var(--status-waiting)",color:"#fff",borderRadius:"8px",padding:"12px 16px",fontSize:"14px",boxShadow:"0 4px 12px rgba(0,0,0,0.15)",display:"flex",flexDirection:"column",gap:"8px"},children:[X.jsx("div",{style:{fontWeight:500},children:"IP Address Changed"}),X.jsxs("div",{style:{fontSize:"13px",opacity:.9},children:[e.oldIp," → ",e.newIp]}),X.jsxs("div",{style:{display:"flex",gap:"8px",marginTop:"4px"},children:[X.jsx("button",{onClick:i,style:{flex:1,background:"rgba(255,255,255,0.2)",border:"none",color:"#fff",padding:"8px 12px",borderRadius:"4px",cursor:"pointer",fontSize:"13px"},children:"Confirm"}),X.jsx("button",{onClick:s,style:{background:"transparent",border:"1px solid rgba(255,255,255,0.3)",color:"#fff",padding:"8px 12px",borderRadius:"4px",cursor:"pointer",fontSize:"13px"},children:"Dismiss"})]})]})}async function ZE(){const e=await fetch("/api/instances",{credentials:"include"});if(e.status===401){const t=Ds();if(console.log("[fetchInstances] got 401, cachedToken =",t?"exists":"null"),t)try{console.log("[fetchInstances] attempting re-authentication...");const i=await Ki(t);if(console.log("[fetchInstances] re-auth result:",i),i){const s=await fetch("/api/instances",{credentials:"include"});if(s.ok)return console.log("[fetchInstances] retry succeeded"),s.json()}}catch(i){console.log("[fetchInstances] re-auth error:",i)}throw new Error("Unauthorized")}if(!e.ok)throw new Error(`Failed to fetch instances: ${e.status}`);return e.json()}function vw(e){return`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws/${e}`}async function JE(e,t){const i=await fetch(e,t);if(i.status===401){const s=Ds();if(s)try{if(await Ki(s))return fetch(e,t)}catch{}}return i}async function Sw(){const e=await JE("/api/instances/config",{credentials:"include"});if(e.status===401)throw new Error("Unauthorized");if(!e.ok)throw new Error(`Failed to get instance config: ${e.status}`);return e.json()}async function yw(e){const t=await JE("/api/instances/create",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(e)});if(t.status===401)throw new Error("Unauthorized");if(!t.ok){const i=await t.json().catch(()=>({error:"Unknown error"}));throw new Error(i.error||`Failed to create instance: ${t.status}`)}return t.json()}const Cw=100,Tw=300;var zb;const Io=typeof window<"u"&&((zb=window.matchMedia)==null?void 0:zb.call(window,"(prefers-reduced-motion: reduce)").matches),Gu=300,Hf=B.forwardRef(function({options:t,value:i,onChange:s,placeholder:u="Select…",disabled:p=!1,id:d,emptyMessage:o="No options available",triggerIcon:l,getDisplayLabel:c,onClose:g,hideTrigger:h=!1},b){const[y,T]=B.useState(!1),[E,m]=B.useState(!1),[_,v]=B.useState(-1),[S,x]=B.useState(0),[k,A]=B.useState(!1),O=B.useRef(null),D=B.useRef(0),N=B.useRef(0),L=B.useMemo(()=>t.find($=>$.value===i)??null,[t,i]),F=B.useMemo(()=>c?c(i):(L==null?void 0:L.label)||u,[c,i,L,u]),I=B.useCallback(()=>{p||(T(!0),v(-1))},[p]),z=B.useCallback(()=>{m(!1),x(0),Io?T(!1):setTimeout(()=>T(!1),Gu),setTimeout(()=>{g==null||g()},Io?0:Gu)},[g]);B.useImperativeHandle(b,()=>({open:I,close:z}),[I,z]);const W=B.useCallback($=>{A(!0),D.current=$,N.current=Date.now(),x(0)},[]),q=B.useCallback($=>{if(!k)return;const j=$-D.current;j>0&&x(j)},[k]),Y=B.useCallback(()=>{if(!k)return;const $=S,j=Date.now()-N.current,re=j>0?$/(j/1e3):0;$>Cw||$>50&&re>Tw||$<5?z():x(0),A(!1)},[k,S,z]),K=B.useCallback($=>{s($.value),z()},[s,z]);B.useEffect(()=>{if(y){const $=setTimeout(()=>{m(!0)},Io?0:10);return()=>clearTimeout($)}},[y]);const Q=B.useCallback($=>{const j=t.length;switch($.key){case"ArrowDown":$.preventDefault(),v(re=>re<j-1?re+1:0);break;case"ArrowUp":$.preventDefault(),v(re=>re>0?re-1:j-1);break;case"Enter":$.preventDefault(),_>=0&&_<j&&K(t[_]);break;case"Escape":$.preventDefault(),z();break}},[t,_,K,z]),H=Io||k?"none":`transform ${Gu}ms ease-out`,M=Io?"none":`background ${Gu}ms ease-out`,U=k?`translateY(${S}px)`:E?"translateY(0)":"translateY(100%)";return X.jsxs(X.Fragment,{children:[!h&&X.jsxs("button",{ref:O,type:"button",onClick:I,onTouchStart:()=>{document.activeElement instanceof HTMLElement&&document.activeElement.blur()},disabled:p,id:d,style:{...jn.trigger,...p?jn.triggerDisabled:{}},"aria-haspopup":"listbox","aria-expanded":y,children:[l,X.jsx("span",{style:jn.triggerText,children:F}),X.jsx("span",{style:jn.triggerArrow,children:"▼"})]}),y&&X.jsx("div",{onClick:z,style:{...jn.overlay,background:E?"rgba(0, 0, 0, 0.5)":"rgba(0, 0, 0, 0)",transition:M},children:X.jsxs("div",{"data-testid":"common--action-sheet",onClick:$=>$.stopPropagation(),style:{...jn.sheet,transform:U,transition:H},children:[X.jsx("div",{"data-testid":"common--drag-handle",style:jn.handle,onTouchStart:$=>W($.touches[0].clientY),onTouchMove:$=>q($.touches[0].clientY),onTouchEnd:Y,onMouseDown:$=>W($.clientY),onMouseMove:$=>k&&q($.clientY),onMouseUp:Y,onMouseLeave:Y}),X.jsx("div",{style:jn.listContainer,role:"listbox",tabIndex:0,onKeyDown:Q,children:t.length===0?X.jsx("div",{style:jn.emptyList,children:o}):t.map(($,j)=>X.jsxs("div",{role:"option","aria-selected":_===j,onClick:()=>K($),onMouseEnter:()=>v(j),style:{...jn.option,..._===j?jn.optionHighlighted:{},...i===$.value?jn.optionSelected:{}},children:[$.icon,X.jsxs("span",{style:jn.optionLabel,children:[$.label,$.description&&X.jsxs("span",{style:jn.optionDescriptionInline,children:[" (",$.description,")"]})]}),i===$.value&&X.jsx(Aw,{})]},j))})]})})]})});function Aw(){return X.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",style:jn.checkIcon,children:X.jsx("path",{d:"M3 8L6.5 11.5L13 5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}const jn={trigger:{width:"100%",padding:"10px 12px",borderRadius:8,border:"1px solid var(--border-color)",background:"var(--bg-tertiary)",color:"var(--text-primary)",fontSize:14,cursor:"pointer",display:"flex",alignItems:"center",gap:8,textAlign:"left",boxSizing:"border-box",transition:"border-color 0.15s ease"},triggerDisabled:{opacity:.6,cursor:"not-allowed"},triggerText:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontFamily:"var(--font-mono)"},triggerArrow:{fontSize:10,color:"var(--text-secondary)",marginLeft:"auto"},overlay:{position:"fixed",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"flex-end",justifyContent:"center",zIndex:1100},sheet:{width:"100%",maxWidth:480,maxHeight:"calc(80vh - env(safe-area-inset-bottom, 0px))",borderRadius:"16px 16px 0 0",background:"var(--bg-secondary)",boxShadow:"0 -4px 24px rgba(0, 0, 0, 0.3)",display:"flex",flexDirection:"column",overflow:"hidden",paddingBottom:"var(--safe-bottom)"},handle:{width:36,height:4,background:"var(--text-secondary)",opacity:.5,borderRadius:2,margin:"12px auto",flexShrink:0},listContainer:{flex:"1 1 auto",overflow:"auto",overscrollBehavior:"contain",WebkitOverflowScrolling:"touch",padding:"8px 0"},emptyList:{padding:"32px 16px",textAlign:"center",color:"var(--text-secondary)",fontSize:14},option:{display:"flex",alignItems:"center",gap:10,padding:"10px 16px",cursor:"pointer",transition:"background-color 0.1s ease"},optionHighlighted:{background:"rgba(88, 166, 255, 0.15)"},optionSelected:{background:"rgba(88, 166, 255, 0.08)"},optionLabel:{flex:1,minWidth:0,color:"var(--text-primary)",fontFamily:"var(--font-mono)",fontSize:14,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},optionDescriptionInline:{color:"var(--text-secondary)",fontSize:12},checkIcon:{marginLeft:"auto",flexShrink:0,color:"var(--status-running)"}};var jb;const xw=typeof window<"u"&&((jb=window.matchMedia)==null?void 0:jb.call(window,"(prefers-reduced-motion: reduce)").matches);function t1({options:e,value:t,onChange:i,disabled:s=!1,"aria-label":u}){const p=B.useRef(null),d=B.useRef([]),[o,l]=B.useState({}),c=e.findIndex(y=>y.value===t);B.useEffect(()=>{const y=p.current,T=d.current[c],E=()=>{if(T&&y){const m=y.getBoundingClientRect(),_=T.getBoundingClientRect(),v=_.left-m.left+y.scrollLeft-3,S=_.width;l({transform:`translateX(${v}px)`,width:`${S}px`})}};return E(),y==null||y.addEventListener("scroll",E),()=>{y==null||y.removeEventListener("scroll",E)}},[c,e]);const g=y=>{s||i(y)},h=(y,T)=>{var m;if(s)return;let E=T;switch(y.key){case"ArrowLeft":y.preventDefault(),E=T>0?T-1:e.length-1;break;case"ArrowRight":y.preventDefault(),E=T<e.length-1?T+1:0;break;case"Home":y.preventDefault(),E=0;break;case"End":y.preventDefault(),E=e.length-1;break;default:return}i(e[E].value),(m=d.current[E])==null||m.focus()},b={role:"radiogroup","aria-label":u};return X.jsxs("div",{ref:p,style:{...wi.container,...s?wi.containerDisabled:{}},...b,children:[X.jsx("div",{style:{...wi.indicator,...o,...xw?{}:wi.indicatorAnimated,...c===-1?wi.indicatorHidden:{}},"aria-hidden":"true"}),e.map((y,T)=>{const E=T===c;return X.jsxs("button",{ref:m=>{d.current[T]=m},type:"button",role:"radio",title:y.title,"aria-checked":E,disabled:s,onClick:()=>g(y.value),onKeyDown:m=>h(m,T),style:{...wi.option,...E?wi.optionSelected:{}},children:[y.icon&&X.jsx("span",{style:wi.icon,children:y.icon}),X.jsx("span",{style:wi.labelWrapper,children:X.jsx("span",{style:wi.label,children:y.label})}),y.description&&X.jsx("span",{style:wi.descriptionWrapper,children:X.jsx("span",{style:wi.description,children:y.description})})]},String(y.value))})]})}const wi={container:{display:"flex",width:"100%",maxWidth:"100%",overflowX:"auto",background:"var(--bg-tertiary)",borderRadius:10,padding:3,position:"relative",gap:2,scrollbarWidth:"none",msOverflowStyle:"none"},containerDisabled:{opacity:.6,cursor:"not-allowed"},indicator:{position:"absolute",top:3,bottom:3,background:"var(--status-running)",borderRadius:7,boxShadow:"0 1px 3px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.15)",zIndex:0},indicatorAnimated:{transition:"transform 0.2s ease, width 0.2s ease"},indicatorHidden:{opacity:0},option:{flex:1,flexShrink:1,minWidth:0,minHeight:44,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",position:"relative",zIndex:1,color:"var(--text-secondary)",background:"transparent",border:"none",borderRadius:7,padding:"6px 8px",cursor:"pointer",transition:"color 0.15s ease",fontFamily:"var(--font-sans)",fontSize:14,lineHeight:1.2,overflow:"visible"},optionSelected:{color:"#fff",fontWeight:500},icon:{display:"flex",alignItems:"center",justifyContent:"center",marginBottom:2,flexShrink:0},labelWrapper:{textAlign:"center",maxWidth:"100%",overflow:"hidden"},label:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",display:"block"},descriptionWrapper:{textAlign:"center",maxWidth:"100%",overflow:"hidden"},description:{fontSize:11,opacity:.8,marginTop:1,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",display:"block"}};function n1(e){const t=e.split("/").filter(Boolean);return t[t.length-1]||e}function ww(e){const t=e.split("/").filter(Boolean);return t.length<=1?e:".../"+t[t.length-2]}function i1(){return X.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",style:{flexShrink:0,color:"var(--text-secondary)"},children:[X.jsx("path",{d:"M2 4C2 3.44772 2.44772 3 3 3H6.17157C6.43678 3 6.69114 3.10536 6.87868 3.29289L7.58579 4H13C13.5523 4 14 4.44772 14 5V12C14 12.5523 13.5523 13 13 13H3C2.44772 13 2 12.5523 2 12V4Z",fill:"currentColor",opacity:"0.6"}),X.jsx("path",{d:"M2 5.5V12C2 12.5523 2.44772 13 3 13H13C13.5523 13 14 12.5523 14 12V5.5C14 5.22386 13.7761 5 13.5 5H2.5C2.22386 5 2 5.22386 2 5.5Z",fill:"currentColor"})]})}function r1(){return X.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",style:{flexShrink:0,color:"var(--text-secondary)"},children:[X.jsx("path",{d:"M8 10C9.10457 10 10 9.10457 10 8C10 6.89543 9.10457 6 8 6C6.89543 6 6 6.89543 6 8C6 9.10457 6.89543 10 8 10Z",stroke:"currentColor",strokeWidth:"1.5",fill:"none"}),X.jsx("path",{d:"M12.9247 8.99999C12.9692 8.66999 13 8.33749 13 7.99999C13 7.66249 12.9692 7.32999 12.9247 6.99999L14.3622 5.91249C14.4872 5.81249 14.5197 5.63749 14.4372 5.48749L13.0622 3.01249C12.9797 2.86249 12.8122 2.81249 12.6622 2.86249L10.9247 3.51249C10.4247 3.13749 9.87468 2.82499 9.28718 2.58749L9.01218 0.787487C8.98718 0.624987 8.84968 0.499987 8.68718 0.499987H5.93718C5.77468 0.499987 5.63718 0.624987 5.61218 0.787487L5.33718 2.58749C4.74968 2.82499 4.19968 3.14999 3.69968 3.51249L1.96218 2.86249C1.81218 2.81249 1.64468 2.86249 1.56218 3.01249L0.187178 5.49999C0.099678 5.64999 0.137178 5.82499 0.262178 5.92499L1.69968 6.99999C1.65518 7.32999 1.62468 7.66249 1.62468 7.99999C1.62468 8.33749 1.65518 8.66999 1.69968 8.99999L0.262178 10.0875C0.137178 10.1875 0.104678 10.3625 0.187178 10.5125L1.56218 12.9875C1.64468 13.1375 1.81218 13.1875 1.96218 13.1375L3.69968 12.4875C4.19968 12.8625 4.74968 13.175 5.33718 13.4125L5.61218 15.2125C5.63718 15.375 5.77468 15.5 5.93718 15.5H8.68718C8.84968 15.5 8.98718 15.375 9.01218 15.2125L9.28718 13.4125C9.87468 13.175 10.4247 12.85 10.9247 12.4875L12.6622 13.1375C12.8122 13.1875 12.9797 13.1375 13.0622 12.9875L14.4372 10.5C14.5197 10.35 14.4872 10.175 14.3622 10.075L12.9247 8.99999ZM8 10.5C6.62468 10.5 5.49968 9.37499 5.49968 7.99999C5.49968 6.62499 6.62468 5.49999 8 5.49999C9.37532 5.49999 10.5003 6.62499 10.5003 7.99999C10.5003 9.37499 9.37532 10.5 8 10.5Z",fill:"currentColor",opacity:"0.8"})]})}function Dw(){return X.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",style:{flexShrink:0,color:"var(--text-secondary)"},children:X.jsx("path",{d:"M3 8H13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",opacity:"0.5"})})}function Rw({isOpen:e,onClose:t,onSuccess:i,copySource:s}){const[u,p]=B.useState(null),[d,o]=B.useState(""),[l,c]=B.useState(""),[g,h]=B.useState(""),[b,y]=B.useState(""),[T,E]=B.useState(!1),[m,_]=B.useState(null),v=B.useRef(null),S=bt(W=>W.showToast),x=bt(W=>W.hideToast),k=B.useMemo(()=>u?u.workspaces.map(W=>({value:W,label:n1(W),description:ww(W),icon:X.jsx(i1,{})})):[],[u]),A=B.useMemo(()=>u?u.workspaces.map(W=>({value:W,label:n1(W)})):[],[u]),O=u?u.workspaces.length<=2:!1,D=B.useMemo(()=>{if(!u)return[];const W=[{value:"",label:"None",title:"No settings file"}];return u.settingsFiles.forEach(q=>{W.push({value:q.filename,label:q.displayName,title:`${q.directoryPath}/${q.filename}`})}),W},[u]),N=u?u.settingsFiles.length+1<=2:!1,L=B.useMemo(()=>{if(!u)return[];const W=[{value:"",label:"None",icon:X.jsx(Dw,{})}];return u.settingsFiles.forEach(q=>{W.push({value:q.filename,label:q.displayName,description:q.directory,icon:X.jsx(r1,{})})}),W},[u]);B.useEffect(()=>{if(e&&(F(!!s),o(""),c(""),h(""),y(""),_(null),v.current=null,s&&(o(s.cwd),c(`${s.name}-copy`),s.claudeArgs&&s.claudeArgs.length>0))){const W=[...s.claudeArgs],q=W.indexOf("--settings");q!==-1&&q+1<W.length&&(v.current=W[q+1],W.splice(q,2)),y(W.join(" "))}},[e,s]),B.useEffect(()=>{if(u&&v.current){const W=u.settingsFiles.find(q=>`${q.directoryPath}/${q.filename}`===v.current);W&&h(W.filename),v.current=null}},[u]),B.useEffect(()=>{u&&u.workspaces.length===1&&!d&&o(u.workspaces[0])},[u,d]);const F=async W=>{try{const q=await Sw();p(q),!W&&q.claudeArgs.length>0&&y(q.claudeArgs.join(" "))}catch(q){console.error("Failed to load instance config:",q),_("Failed to load configuration")}},I=async()=>{if(!d){_("Please select a working directory");return}E(!0),_(null),S(s?"Copying instance…":"Creating instance…",{persistent:!0});try{const W=[];if(g&&u){const Y=u.settingsFiles.find(K=>K.filename===g);Y&&W.push("--settings",`${Y.directoryPath}/${Y.filename}`)}b.trim()&&W.push(...b.trim().split(/\s+/).filter(Boolean));const q=await yw({cwd:d,name:l.trim()||void 0,claudeArgs:W.length>0?W:void 0});i({instanceId:q.instance.instanceId,name:q.instance.name}),t()}catch(W){console.error("Failed to create instance:",W),_(W instanceof Error?W.message:"Failed to create instance")}finally{x(),E(!1)}},z=u&&u.workspaces.length>0;return X.jsx(XE,{isOpen:e,onClose:t,title:s?"Copy Instance":"Create New Instance","data-testid":"instance--modal--create",footer:X.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:8},children:[X.jsx("button",{onClick:t,"data-testid":"instance--button--cancel",style:{padding:"8px 20px",borderRadius:6,border:"1px solid var(--border-color)",background:"var(--bg-tertiary)",color:"var(--text-primary)",fontSize:14,cursor:"pointer"},children:"Cancel"}),X.jsx("button",{onClick:I,disabled:T||!z,"data-testid":"instance--button--submit",style:{padding:"8px 20px",borderRadius:6,border:"none",background:T||!z?"var(--bg-tertiary)":"var(--status-running)",color:"#fff",fontSize:14,fontWeight:600,cursor:T||!z?"default":"pointer",opacity:T||!z?.7:1},children:T?s?"Copying…":"Creating…":s?"Copy":"Create"})]}),children:X.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:16,paddingBottom:16},children:[X.jsxs("div",{"data-testid":"instance--field--cwd",children:[X.jsxs("label",{htmlFor:"cwd-select",style:{display:"block",fontSize:13,fontWeight:500,marginBottom:6,color:"var(--text-secondary)"},children:["Working Directory ",X.jsx("span",{"data-testid":"instance--label--cwd-required",children:"*"})]}),O?X.jsx(t1,{options:A,value:d,onChange:o,disabled:!z,"aria-label":"Working directory"}):X.jsx(Hf,{id:"cwd-select",options:k,value:d||null,onChange:o,placeholder:"Select working directory…",emptyMessage:"No workspaces available",disabled:!z,triggerIcon:X.jsx(i1,{})}),!z&&X.jsx("p",{style:{fontSize:12,color:"var(--text-secondary)",marginTop:6,opacity:.8},children:"Please configure workspaces in the config file first, or start an instance via CLI."})]}),X.jsxs("div",{"data-testid":"instance--field--name",children:[X.jsx("label",{htmlFor:"instance-name",style:{display:"block",fontSize:13,fontWeight:500,marginBottom:6,color:"var(--text-secondary)"},children:"Instance Name (optional)"}),X.jsx("textarea",{id:"instance-name",value:l,onChange:W=>c(W.target.value),autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:!1,inputMode:"text",rows:1,placeholder:"Defaults to working directory name",style:Ta({borderRadius:8,border:"1px solid var(--border-color)",background:"var(--bg-tertiary)",color:"var(--text-primary)"})})]}),u&&u.settingsFiles.length>0&&X.jsxs("div",{"data-testid":"instance--field--settings",children:[X.jsx("label",{htmlFor:"settings-select",style:{display:"block",fontSize:13,fontWeight:500,marginBottom:6,color:"var(--text-secondary)"},children:"Settings File (optional)"}),N?X.jsx(t1,{options:D,value:g,onChange:h,"aria-label":"Settings file"}):X.jsx(Hf,{id:"settings-select",options:L,value:g||null,onChange:h,placeholder:"None",triggerIcon:X.jsx(r1,{})}),X.jsx("p",{style:{fontSize:11,color:"var(--text-secondary)",marginTop:4,opacity:.7},children:"Custom Claude settings from ~/.claude/ or ~/.claude-remote/settings/"})]}),X.jsxs("div",{"data-testid":"instance--field--claude-args",children:[X.jsx("label",{htmlFor:"claude-args",style:{display:"block",fontSize:13,fontWeight:500,marginBottom:6,color:"var(--text-secondary)"},children:"Claude Arguments (optional)"}),X.jsx("textarea",{id:"claude-args",value:b,onChange:W=>y(W.target.value),autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:!1,inputMode:"text",rows:1,placeholder:"e.g., chat --model claude-sonnet-4-6",style:Ta({borderRadius:8,border:"1px solid var(--border-color)",background:"var(--bg-tertiary)",color:"var(--text-primary)"})}),X.jsx("p",{style:{fontSize:11,color:"var(--text-secondary)",marginTop:4,opacity:.7},children:"Multiple arguments separated by spaces (quoted arguments with spaces not supported)"})]}),m&&X.jsx("div",{"data-testid":"instance--message--error",style:{padding:"10px 12px",borderRadius:8,background:"rgba(255, 59, 48, 0.1)",color:"var(--status-error)",fontSize:13},children:m})]})})}function s1(e,t,i=140,s=44){const u=window.innerWidth-i-8,p=window.innerHeight-s-8;return{x:Math.max(8,Math.min(e,u)),y:Math.max(8,Math.min(t,p))}}function kw({onSwitch:e,onCreateSuccess:t}){const i=qn(D=>D.instances),s=qn(D=>D.setInstances),u=qn(D=>D.activeInstanceId),[p,d]=B.useState(!1),[o,l]=B.useState(null),c=B.useRef(null),g=B.useRef(new Map),[h,b]=B.useState(null),[y,T]=B.useState({x:0,y:0}),E=B.useRef(null),m=B.useRef(!1);B.useEffect(()=>{if(!u)return;const D=g.current.get(u),N=c.current;D&&N&&D.scrollIntoView({behavior:"smooth",inline:"center",block:"nearest"})},[u]),B.useEffect(()=>{const D=()=>{b(null)};if(h)return document.addEventListener("click",D),()=>document.removeEventListener("click",D)},[h]);const _=(D,N)=>{m.current=!1;const{clientX:L,clientY:F}=N.touches[0];E.current=setTimeout(()=>{m.current=!0,T(s1(L,F)),b(D)},500)},v=()=>{E.current&&(clearTimeout(E.current),E.current=null)},S=B.useCallback(D=>{if(m.current){m.current=!1;return}e(D)},[e]),x=(D,N)=>{N.preventDefault(),T(s1(N.clientX,N.clientY)),b(D)},k=()=>{h&&(l(h),d(!0),b(null))},A=async D=>{try{const N=await ZE();s(N)}catch(N){console.error("[InstanceTabs] Failed to fetch instances:",N)}t&&t(D)},O=()=>{d(!1),l(null)};return X.jsxs(X.Fragment,{children:[X.jsxs("div",{"data-testid":"instance--tabs",style:{display:"flex",background:"var(--bg-secondary)",borderBottom:"1px solid var(--border-color)",flexShrink:0},children:[X.jsx("div",{ref:c,style:{display:"flex",overflowX:"auto",padding:"0 4px 0 16px",flex:1},children:i.map(D=>{const N=D.instanceId===u;return X.jsxs("button",{ref:L=>{L?g.current.set(D.instanceId,L):g.current.delete(D.instanceId)},"data-testid":N?"instance--tab--active":"instance--tab",onClick:()=>S(D.instanceId),onTouchStart:L=>_(D,L),onTouchEnd:v,onTouchMove:v,onContextMenu:L=>x(D,L),style:{padding:"8px 16px",background:"transparent",border:"none",borderBottom:N?"2px solid var(--accent-color, #007aff)":"2px solid transparent",color:N?"var(--text-primary)":"var(--text-secondary)",fontSize:13,fontWeight:N?600:400,cursor:"pointer",whiteSpace:"nowrap",flexShrink:0},children:[D.name,X.jsxs("span",{style:{marginLeft:6,fontSize:11,color:"var(--text-tertiary, var(--text-secondary))",opacity:.7},children:["#",D.instanceId.substring(0,6)]})]},D.instanceId)})}),X.jsx("button",{onClick:()=>d(!0),"aria-label":"Create new instance","data-testid":"instance--button--create",style:{width:44,height:44,padding:0,background:"transparent",border:"none",borderLeft:"1px solid var(--border-color)",color:"var(--text-secondary)",fontSize:22,fontWeight:600,cursor:"pointer",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center"},children:"+"})]}),h&&X.jsx("div",{"data-testid":"instance--context-menu",onClick:D=>D.stopPropagation(),style:{position:"fixed",left:y.x,top:y.y,zIndex:1100,background:"var(--bg-secondary)",borderRadius:8,boxShadow:"0 4px 16px rgba(0, 0, 0, 0.3)",overflow:"hidden",minWidth:140},children:X.jsx("button",{"data-testid":"instance--button--copy",onClick:k,style:{display:"block",width:"100%",padding:"12px 16px",background:"transparent",border:"none",color:"var(--text-primary)",fontSize:14,textAlign:"left",cursor:"pointer"},children:"Copy Instance"})}),X.jsx(Rw,{isOpen:p,onClose:O,onSuccess:A,copySource:o})]})}function Lw({visible:e,onClick:t}){const[i,s]=B.useState(!1);B.useEffect(()=>{e&&s(!0)},[e]);const u=()=>{e||s(!1)};return i?X.jsx("button",{className:`scroll-to-bottom-btn ${e?"visible":"hidden"}`,onClick:t,onAnimationEnd:u,"aria-label":"Jump to latest output","data-testid":"terminal--button--scroll-to-bottom",children:"↓"}):null}const fa=d0(e=>({files:[],cwd:"",isLoading:!1,error:null,lastUpdated:null,setFiles:t=>e({files:t.files,cwd:t.cwd,lastUpdated:new Date,error:null}),setLoading:t=>e({isLoading:t}),setError:t=>e({error:t}),clearFiles:()=>e({files:[],cwd:"",lastUpdated:null})}));async function Ow(e){const t=new URLSearchParams;e!=null&&e.cwd&&t.set("cwd",e.cwd),e!=null&&e.instanceId&&t.set("instanceId",e.instanceId);const i=t.toString()?`/api/file/list?${t.toString()}`:"/api/file/list",s=await fetch(i,{credentials:"include"});if(s.status===401){const u=Ds();if(u)try{if(await Ki(u)){const d=await fetch(i,{credentials:"include"});if(d.ok)return d.json()}}catch{}throw new Error("Unauthorized")}if(!s.ok)throw new Error(`Failed to fetch files: ${s.status}`);return s.json()}async function Nw(e,t){const i=new URLSearchParams;i.set("path",e),t!=null&&t.instanceId&&i.set("instanceId",t.instanceId);const s=`/api/file/read?${i.toString()}`,u=await fetch(s,{credentials:"include"});if(u.status===401){const p=Ds();if(p)try{if(await Ki(p)){const o=await fetch(s,{credentials:"include"});if(o.ok)return o.json()}}catch{}throw new Error("Unauthorized")}if(!u.ok)throw new Error(`Failed to read file: ${u.status}`);return u.json()}function Mw(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function Iw(e){const t=new Date(e),s=new Date().getTime()-t.getTime(),u=Math.floor(s/1e3),p=Math.floor(u/60),d=Math.floor(p/60),o=Math.floor(d/24);return u<60?"just now":p<60?`${p}m ago`:d<24?`${d}h ago`:o<7?`${o}d ago`:t.toLocaleDateString()}const Bw=5e3,Fw=B.forwardRef(function({onClose:t},i){const s=fa(_=>_.files)??[],u=fa(_=>_.isLoading),p=fa(_=>_.error),d=fa(_=>_.setFiles),o=fa(_=>_.setLoading),l=fa(_=>_.setError),c=KE(),g=B.useRef(null),h=o0(),b=qn(_=>_.activeInstanceId);B.useImperativeHandle(i,()=>({open:()=>{var _;(_=g.current)==null||_.open()}})),B.useEffect(()=>{var _;(_=g.current)==null||_.open()},[]);const y=B.useCallback(async()=>{try{o(!0);const _=await Ow({instanceId:b??void 0});d(_)}catch(_){const v=_ instanceof Error?_.message:"Failed to load files";l(v)}finally{o(!1)}},[d,o,l,b]),T=B.useCallback(_=>{const v=new URLSearchParams({path:_.absolutePath});b&&v.set("instanceId",b),h(`/viewer?${v.toString()}`)},[h,b]);B.useEffect(()=>{y();const _=setInterval(y,Bw);return()=>clearInterval(_)},[y]);const E=s.map(_=>({value:_,label:_.relativePath,description:`${Mw(_.size)} · ${Iw(_.modifiedAt)}`})),m=()=>c?"📄":u&&s.length===0?"📄 …":p&&s.length===0?"📄 !":`📄 ${s.length}`;return X.jsx(Hf,{ref:g,options:E,value:null,onChange:T,placeholder:"📄 0",disabled:u&&s.length===0,emptyMessage:p||"No Markdown files found",getDisplayLabel:m,onClose:t,hideTrigger:!0})}),Pw=500,pa=44,ev="floating-doc-button-position",a1=44,o1=44,l1=8;function Uw(){if(typeof document<"u"){const e=document.documentElement;return getComputedStyle(e).getPropertyValue("--safe-top").trim(),(CSS.supports("padding-top","env(safe-area-inset-top)")?20:0)+a1+o1+l1}return a1+o1+l1}const Hw={right:16,top:0};function zw(){try{const e=localStorage.getItem(ev);if(e){const t=JSON.parse(e);if(typeof t.right=="number"&&typeof t.top=="number")return t}}catch{}return{...Hw,top:Uw()}}function jw(e){try{localStorage.setItem(ev,JSON.stringify(e))}catch{}}function $w(){const[e,t]=B.useState(zw),[i,s]=B.useState(!1),[u,p]=B.useState(!1),[d,o]=B.useState(!1),l=bt(L=>L.showFloatingDocButton),c=bt(L=>L.isDocButtonHiddenByLongPress),g=bt(L=>L.setDocButtonHiddenByLongPress),h=B.useRef(null),b=B.useRef(null),y=B.useRef({x:0,y:0,right:0,top:0}),T=B.useRef(null),E=B.useRef(!1),m=B.useCallback(()=>{T.current&&(clearTimeout(T.current),T.current=null),T.current=setTimeout(()=>{E.current||(T.current=null,g(!0),setTimeout(()=>p(!1),0))},Pw)},[g]),_=B.useCallback(()=>{T.current&&(clearTimeout(T.current),T.current=null)},[]),v=B.useCallback((L,F)=>{p(!0),E.current=!1,y.current={x:L,y:F,right:e.right,top:e.top},m()},[e.right,e.top,m]),S=B.useCallback((L,F)=>{if(!u)return;const I=L-y.current.x,z=F-y.current.y;if(Math.sqrt(I*I+z*z)>10&&!E.current&&(E.current=!0,s(!0),_()),E.current){const q=Math.max(0,y.current.right-I),Y=Math.max(0,y.current.top+z),K=window.innerWidth-pa,Q=window.innerHeight-pa;t({right:Math.min(q,K),top:Math.min(Y,Q)})}},[u,_]),x=B.useCallback(()=>{o(!1)},[]),k=B.useCallback(()=>{p(!1),s(!1),_(),E.current?jw(e):o(!0),E.current=!1},[e,_]),A=B.useCallback(L=>{const F=L.touches[0];v(F.clientX,F.clientY)},[v]),O=B.useCallback(L=>{const F=L.touches[0];S(F.clientX,F.clientY)},[S]),D=B.useCallback(L=>{L.preventDefault(),k()},[k]),N=B.useCallback(L=>{L.preventDefault(),v(L.clientX,L.clientY)},[v]);return B.useEffect(()=>{if(!u)return;const L=I=>{S(I.clientX,I.clientY)},F=()=>{k()};return document.addEventListener("mousemove",L),document.addEventListener("mouseup",F),()=>{document.removeEventListener("mousemove",L),document.removeEventListener("mouseup",F)}},[u,S,k]),B.useEffect(()=>{const L=()=>{const F=window.innerWidth-pa,I=window.innerHeight-pa;t(z=>({right:Math.min(z.right,F),top:Math.min(z.top,I)}))};return window.addEventListener("resize",L),()=>window.removeEventListener("resize",L)},[]),B.useEffect(()=>()=>{_()},[_]),!l||c?null:X.jsxs(X.Fragment,{children:[X.jsx("div",{ref:b,"data-testid":"floating-doc-button",onTouchStart:A,onTouchMove:O,onTouchEnd:D,onMouseDown:N,style:{position:"fixed",right:e.right,top:e.top,width:pa,height:pa,borderRadius:"50%",background:"linear-gradient(135deg, #21262d 0%, #161b22 100%)",border:"1px solid var(--border-color)",display:"flex",alignItems:"center",justifyContent:"center",cursor:i?"grabbing":"grab",zIndex:100,boxShadow:u?"0 2px 8px rgba(0, 0, 0, 0.5)":"0 4px 12px rgba(0, 0, 0, 0.4)",transform:u?"scale(0.95)":"scale(1)",transition:i?"none":"transform 0.1s ease, box-shadow 0.1s ease",userSelect:"none",WebkitUserSelect:"none",touchAction:"none"},children:X.jsx("span",{style:{fontSize:20,lineHeight:1,filter:"drop-shadow(0 1px 2px rgba(0,0,0,0.5))",display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%"},children:"📑"})}),d&&X.jsx(Fw,{ref:h,onClose:x})]})}const u1="__default__",c1=[1e3,2e3,4e3,8e3,16e3,3e4],rf=new Map;function Ww(e,t,i=u1){const s=B.useRef(null),u=B.useRef(0),p=B.useRef(void 0),d=B.useRef(e),o=B.useRef(0),l=B.useRef(!1),c=bt(x=>x.setConnectionStatus),g=B.useRef(c),h=bt(x=>x.setInstanceConnectionStatus),b=B.useRef(h),y=bt(x=>x.showToast),T=B.useCallback(x=>{i===u1&&g.current(x),b.current(i,x)},[i]);B.useEffect(()=>{d.current=e},[e]),B.useEffect(()=>{g.current=c},[c]),B.useEffect(()=>{b.current=h},[h]);const E=B.useRef(void 0),m=B.useCallback(x=>{const k=c1[Math.min(u.current,c1.length-1)];u.current++,p.current=setTimeout(()=>{var A;l.current||x!==o.current||(A=E.current)==null||A.call(E)},k)},[]),_=B.useCallback(async()=>{if(!t){T("disconnected");return}if(s.current&&s.current.readyState===WebSocket.OPEN)return;const x=t;p.current&&(clearTimeout(p.current),p.current=void 0),l.current=!1;const k=++o.current;T("connecting");const A=new WebSocket(x);s.current=A,A.onopen=()=>{l.current||k!==o.current||s.current!==A||(T("connected"),u.current=0,rf.set(i,!1),A.send(JSON.stringify({type:"activate"})))},A.onmessage=O=>{if(!(l.current||k!==o.current||s.current!==A))try{const D=JSON.parse(O.data);d.current(D)}catch{}},A.onclose=async()=>{if(l.current||k!==o.current||s.current!==A)return;s.current=null,T("disconnected"),rf.get(i)||(y("Connection lost. Reconnecting…"),rf.set(i,!0));const O=Ds();if(O)try{await Ki(O)}catch{}m(k)},A.onerror=()=>{}},[m,T,t]);B.useEffect(()=>{E.current=_},[_]);const v=B.useCallback(x=>{var k;return((k=s.current)==null?void 0:k.readyState)===WebSocket.OPEN?(s.current.send(JSON.stringify(x)),!0):!1},[]),S=B.useCallback(()=>{l.current=!0,o.current++,p.current&&(clearTimeout(p.current),p.current=void 0);const x=s.current;s.current=null,x==null||x.close()},[]);return B.useEffect(()=>{const x=()=>{var A;(A=s.current)==null||A.close()},k=()=>{var A;if(document.visibilityState==="visible"){const O=s.current;(O==null?void 0:O.readyState)===WebSocket.OPEN?O.send(JSON.stringify({type:"activate"})):(!O||O.readyState===WebSocket.CLOSED)&&((A=E.current)==null||A.call(E))}};return window.addEventListener("offline",x),document.addEventListener("visibilitychange",k),()=>{l.current=!0,o.current++,window.removeEventListener("offline",x),document.removeEventListener("visibilitychange",k),p.current&&(clearTimeout(p.current),p.current=void 0);const A=s.current;s.current=null,A==null||A.close()}},[]),{connect:_,disconnect:S,send:v}}var sf={exports:{}},h1;function qw(){return h1||(h1=1,(function(e,t){(function(i,s){e.exports=s()})(globalThis,(()=>(()=>{var i={4567:function(d,o,l){var c=this&&this.__decorate||function(v,S,x,k){var A,O=arguments.length,D=O<3?S:k===null?k=Object.getOwnPropertyDescriptor(S,x):k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(v,S,x,k);else for(var N=v.length-1;N>=0;N--)(A=v[N])&&(D=(O<3?A(D):O>3?A(S,x,D):A(S,x))||D);return O>3&&D&&Object.defineProperty(S,x,D),D},g=this&&this.__param||function(v,S){return function(x,k){S(x,k,v)}};Object.defineProperty(o,"__esModule",{value:!0}),o.AccessibilityManager=void 0;const h=l(9042),b=l(9924),y=l(844),T=l(4725),E=l(2585),m=l(3656);let _=o.AccessibilityManager=class extends y.Disposable{constructor(v,S,x,k){super(),this._terminal=v,this._coreBrowserService=x,this._renderService=k,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let A=0;A<this._terminal.rows;A++)this._rowElements[A]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[A]);if(this._topBoundaryFocusListener=A=>this._handleBoundaryFocus(A,0),this._bottomBoundaryFocusListener=A=>this._handleBoundaryFocus(A,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new b.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize((A=>this._handleResize(A.rows)))),this.register(this._terminal.onRender((A=>this._refreshRows(A.start,A.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((A=>this._handleChar(A)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
86
- `)))),this.register(this._terminal.onA11yTab((A=>this._handleTab(A)))),this.register(this._terminal.onKey((A=>this._handleKey(A.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,m.addDisposableDomListener)(document,"selectionchange",(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,y.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(v){for(let S=0;S<v;S++)this._handleChar(" ")}_handleChar(v){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==v&&(this._charsToAnnounce+=v):this._charsToAnnounce+=v,v===`
87
- `&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=h.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(v){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(v)||this._charsToConsume.push(v)}_refreshRows(v,S){this._liveRegionDebouncer.refresh(v,S,this._terminal.rows)}_renderRows(v,S){const x=this._terminal.buffer,k=x.lines.length.toString();for(let A=v;A<=S;A++){const O=x.lines.get(x.ydisp+A),D=[],N=(O==null?void 0:O.translateToString(!0,void 0,void 0,D))||"",L=(x.ydisp+A+1).toString(),F=this._rowElements[A];F&&(N.length===0?(F.innerText=" ",this._rowColumns.set(F,[0,1])):(F.textContent=N,this._rowColumns.set(F,D)),F.setAttribute("aria-posinset",L),F.setAttribute("aria-setsize",k))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(v,S){const x=v.target,k=this._rowElements[S===0?1:this._rowElements.length-2];if(x.getAttribute("aria-posinset")===(S===0?"1":`${this._terminal.buffer.lines.length}`)||v.relatedTarget!==k)return;let A,O;if(S===0?(A=x,O=this._rowElements.pop(),this._rowContainer.removeChild(O)):(A=this._rowElements.shift(),O=x,this._rowContainer.removeChild(A)),A.removeEventListener("focus",this._topBoundaryFocusListener),O.removeEventListener("focus",this._bottomBoundaryFocusListener),S===0){const D=this._createAccessibilityTreeNode();this._rowElements.unshift(D),this._rowContainer.insertAdjacentElement("afterbegin",D)}else{const D=this._createAccessibilityTreeNode();this._rowElements.push(D),this._rowContainer.appendChild(D)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(S===0?-1:1),this._rowElements[S===0?1:this._rowElements.length-2].focus(),v.preventDefault(),v.stopImmediatePropagation()}_handleSelectionChange(){var N;if(this._rowElements.length===0)return;const v=document.getSelection();if(!v)return;if(v.isCollapsed)return void(this._rowContainer.contains(v.anchorNode)&&this._terminal.clearSelection());if(!v.anchorNode||!v.focusNode)return void console.error("anchorNode and/or focusNode are null");let S={node:v.anchorNode,offset:v.anchorOffset},x={node:v.focusNode,offset:v.focusOffset};if((S.node.compareDocumentPosition(x.node)&Node.DOCUMENT_POSITION_PRECEDING||S.node===x.node&&S.offset>x.offset)&&([S,x]=[x,S]),S.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(S={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(S.node))return;const k=this._rowElements.slice(-1)[0];if(x.node.compareDocumentPosition(k)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(x={node:k,offset:((N=k.textContent)==null?void 0:N.length)??0}),!this._rowContainer.contains(x.node))return;const A=({node:L,offset:F})=>{const I=L instanceof Text?L.parentNode:L;let z=parseInt(I==null?void 0:I.getAttribute("aria-posinset"),10)-1;if(isNaN(z))return console.warn("row is invalid. Race condition?"),null;const W=this._rowColumns.get(I);if(!W)return console.warn("columns is null. Race condition?"),null;let q=F<W.length?W[F]:W.slice(-1)[0]+1;return q>=this._terminal.cols&&(++z,q=0),{row:z,column:q}},O=A(S),D=A(x);if(O&&D){if(O.row>D.row||O.row===D.row&&O.column>=D.column)throw new Error("invalid range");this._terminal.select(O.column,O.row,(D.row-O.row)*this._terminal.cols-O.column+D.column)}}_handleResize(v){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let S=this._rowContainer.children.length;S<this._terminal.rows;S++)this._rowElements[S]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[S]);for(;this._rowElements.length>v;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const v=this._coreBrowserService.mainDocument.createElement("div");return v.setAttribute("role","listitem"),v.tabIndex=-1,this._refreshRowDimensions(v),v}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let v=0;v<this._terminal.rows;v++)this._refreshRowDimensions(this._rowElements[v])}}_refreshRowDimensions(v){v.style.height=`${this._renderService.dimensions.css.cell.height}px`}};o.AccessibilityManager=_=c([g(1,E.IInstantiationService),g(2,T.ICoreBrowserService),g(3,T.IRenderService)],_)},3614:(d,o)=>{function l(b){return b.replace(/\r?\n/g,"\r")}function c(b,y){return y?"\x1B[200~"+b+"\x1B[201~":b}function g(b,y,T,E){b=c(b=l(b),T.decPrivateModes.bracketedPasteMode&&E.rawOptions.ignoreBracketedPasteMode!==!0),T.triggerDataEvent(b,!0),y.value=""}function h(b,y,T){const E=T.getBoundingClientRect(),m=b.clientX-E.left-10,_=b.clientY-E.top-10;y.style.width="20px",y.style.height="20px",y.style.left=`${m}px`,y.style.top=`${_}px`,y.style.zIndex="1000",y.focus()}Object.defineProperty(o,"__esModule",{value:!0}),o.rightClickHandler=o.moveTextAreaUnderMouseCursor=o.paste=o.handlePasteEvent=o.copyHandler=o.bracketTextForPaste=o.prepareTextForTerminal=void 0,o.prepareTextForTerminal=l,o.bracketTextForPaste=c,o.copyHandler=function(b,y){b.clipboardData&&b.clipboardData.setData("text/plain",y.selectionText),b.preventDefault()},o.handlePasteEvent=function(b,y,T,E){b.stopPropagation(),b.clipboardData&&g(b.clipboardData.getData("text/plain"),y,T,E)},o.paste=g,o.moveTextAreaUnderMouseCursor=h,o.rightClickHandler=function(b,y,T,E,m){h(b,y,T),m&&E.rightClickSelect(b),y.value=E.selectionText,y.select()}},7239:(d,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ColorContrastCache=void 0;const c=l(1505);o.ColorContrastCache=class{constructor(){this._color=new c.TwoKeyMap,this._css=new c.TwoKeyMap}setCss(g,h,b){this._css.set(g,h,b)}getCss(g,h){return this._css.get(g,h)}setColor(g,h,b){this._color.set(g,h,b)}getColor(g,h){return this._color.get(g,h)}clear(){this._color.clear(),this._css.clear()}}},3656:(d,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.addDisposableDomListener=void 0,o.addDisposableDomListener=function(l,c,g,h){l.addEventListener(c,g,h);let b=!1;return{dispose:()=>{b||(b=!0,l.removeEventListener(c,g,h))}}}},3551:function(d,o,l){var c=this&&this.__decorate||function(_,v,S,x){var k,A=arguments.length,O=A<3?v:x===null?x=Object.getOwnPropertyDescriptor(v,S):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")O=Reflect.decorate(_,v,S,x);else for(var D=_.length-1;D>=0;D--)(k=_[D])&&(O=(A<3?k(O):A>3?k(v,S,O):k(v,S))||O);return A>3&&O&&Object.defineProperty(v,S,O),O},g=this&&this.__param||function(_,v){return function(S,x){v(S,x,_)}};Object.defineProperty(o,"__esModule",{value:!0}),o.Linkifier=void 0;const h=l(3656),b=l(8460),y=l(844),T=l(2585),E=l(4725);let m=o.Linkifier=class extends y.Disposable{get currentLink(){return this._currentLink}constructor(_,v,S,x,k){super(),this._element=_,this._mouseService=v,this._renderService=S,this._bufferService=x,this._linkProviderService=k,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new b.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new b.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,y.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,y.toDisposable)((()=>{var A;this._lastMouseEvent=void 0,(A=this._activeProviderReplies)==null||A.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,h.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,h.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,h.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,h.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(_){this._lastMouseEvent=_;const v=this._positionFromMouseEvent(_,this._element,this._mouseService);if(!v)return;this._isMouseOut=!1;const S=_.composedPath();for(let x=0;x<S.length;x++){const k=S[x];if(k.classList.contains("xterm"))break;if(k.classList.contains("xterm-hover"))return}this._lastBufferCell&&v.x===this._lastBufferCell.x&&v.y===this._lastBufferCell.y||(this._handleHover(v),this._lastBufferCell=v)}_handleHover(_){if(this._activeLine!==_.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(_,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,_)||(this._clearCurrentLink(),this._askForLink(_,!0))}_askForLink(_,v){var x,k;this._activeProviderReplies&&v||((x=this._activeProviderReplies)==null||x.forEach((A=>{A==null||A.forEach((O=>{O.link.dispose&&O.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=_.y);let S=!1;for(const[A,O]of this._linkProviderService.linkProviders.entries())v?(k=this._activeProviderReplies)!=null&&k.get(A)&&(S=this._checkLinkProviderResult(A,_,S)):O.provideLinks(_.y,(D=>{var L,F;if(this._isMouseOut)return;const N=D==null?void 0:D.map((I=>({link:I})));(L=this._activeProviderReplies)==null||L.set(A,N),S=this._checkLinkProviderResult(A,_,S),((F=this._activeProviderReplies)==null?void 0:F.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(_.y,this._activeProviderReplies)}))}_removeIntersectingLinks(_,v){const S=new Set;for(let x=0;x<v.size;x++){const k=v.get(x);if(k)for(let A=0;A<k.length;A++){const O=k[A],D=O.link.range.start.y<_?0:O.link.range.start.x,N=O.link.range.end.y>_?this._bufferService.cols:O.link.range.end.x;for(let L=D;L<=N;L++){if(S.has(L)){k.splice(A--,1);break}S.add(L)}}}}_checkLinkProviderResult(_,v,S){var A;if(!this._activeProviderReplies)return S;const x=this._activeProviderReplies.get(_);let k=!1;for(let O=0;O<_;O++)this._activeProviderReplies.has(O)&&!this._activeProviderReplies.get(O)||(k=!0);if(!k&&x){const O=x.find((D=>this._linkAtPosition(D.link,v)));O&&(S=!0,this._handleNewLink(O))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!S)for(let O=0;O<this._activeProviderReplies.size;O++){const D=(A=this._activeProviderReplies.get(O))==null?void 0:A.find((N=>this._linkAtPosition(N.link,v)));if(D){S=!0,this._handleNewLink(D);break}}return S}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(_){if(!this._currentLink)return;const v=this._positionFromMouseEvent(_,this._element,this._mouseService);v&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,v)&&this._currentLink.link.activate(_,this._currentLink.link.text)}_clearCurrentLink(_,v){this._currentLink&&this._lastMouseEvent&&(!_||!v||this._currentLink.link.range.start.y>=_&&this._currentLink.link.range.end.y<=v)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,y.disposeArray)(this._linkCacheDisposables))}_handleNewLink(_){if(!this._lastMouseEvent)return;const v=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);v&&this._linkAtPosition(_.link,v)&&(this._currentLink=_,this._currentLink.state={decorations:{underline:_.link.decorations===void 0||_.link.decorations.underline,pointerCursor:_.link.decorations===void 0||_.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,_.link,this._lastMouseEvent),_.link.decorations={},Object.defineProperties(_.link.decorations,{pointerCursor:{get:()=>{var S,x;return(x=(S=this._currentLink)==null?void 0:S.state)==null?void 0:x.decorations.pointerCursor},set:S=>{var x;(x=this._currentLink)!=null&&x.state&&this._currentLink.state.decorations.pointerCursor!==S&&(this._currentLink.state.decorations.pointerCursor=S,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",S))}},underline:{get:()=>{var S,x;return(x=(S=this._currentLink)==null?void 0:S.state)==null?void 0:x.decorations.underline},set:S=>{var x,k,A;(x=this._currentLink)!=null&&x.state&&((A=(k=this._currentLink)==null?void 0:k.state)==null?void 0:A.decorations.underline)!==S&&(this._currentLink.state.decorations.underline=S,this._currentLink.state.isHovered&&this._fireUnderlineEvent(_.link,S))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((S=>{if(!this._currentLink)return;const x=S.start===0?0:S.start+1+this._bufferService.buffer.ydisp,k=this._bufferService.buffer.ydisp+1+S.end;if(this._currentLink.link.range.start.y>=x&&this._currentLink.link.range.end.y<=k&&(this._clearCurrentLink(x,k),this._lastMouseEvent)){const A=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);A&&this._askForLink(A,!1)}}))))}_linkHover(_,v,S){var x;(x=this._currentLink)!=null&&x.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(v,!0),this._currentLink.state.decorations.pointerCursor&&_.classList.add("xterm-cursor-pointer")),v.hover&&v.hover(S,v.text)}_fireUnderlineEvent(_,v){const S=_.range,x=this._bufferService.buffer.ydisp,k=this._createLinkUnderlineEvent(S.start.x-1,S.start.y-x-1,S.end.x,S.end.y-x-1,void 0);(v?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(k)}_linkLeave(_,v,S){var x;(x=this._currentLink)!=null&&x.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(v,!1),this._currentLink.state.decorations.pointerCursor&&_.classList.remove("xterm-cursor-pointer")),v.leave&&v.leave(S,v.text)}_linkAtPosition(_,v){const S=_.range.start.y*this._bufferService.cols+_.range.start.x,x=_.range.end.y*this._bufferService.cols+_.range.end.x,k=v.y*this._bufferService.cols+v.x;return S<=k&&k<=x}_positionFromMouseEvent(_,v,S){const x=S.getCoords(_,v,this._bufferService.cols,this._bufferService.rows);if(x)return{x:x[0],y:x[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(_,v,S,x,k){return{x1:_,y1:v,x2:S,y2:x,cols:this._bufferService.cols,fg:k}}};o.Linkifier=m=c([g(1,E.IMouseService),g(2,E.IRenderService),g(3,T.IBufferService),g(4,E.ILinkProviderService)],m)},9042:(d,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.tooMuchOutput=o.promptLabel=void 0,o.promptLabel="Terminal input",o.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(d,o,l){var c=this&&this.__decorate||function(E,m,_,v){var S,x=arguments.length,k=x<3?m:v===null?v=Object.getOwnPropertyDescriptor(m,_):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(E,m,_,v);else for(var A=E.length-1;A>=0;A--)(S=E[A])&&(k=(x<3?S(k):x>3?S(m,_,k):S(m,_))||k);return x>3&&k&&Object.defineProperty(m,_,k),k},g=this&&this.__param||function(E,m){return function(_,v){m(_,v,E)}};Object.defineProperty(o,"__esModule",{value:!0}),o.OscLinkProvider=void 0;const h=l(511),b=l(2585);let y=o.OscLinkProvider=class{constructor(E,m,_){this._bufferService=E,this._optionsService=m,this._oscLinkService=_}provideLinks(E,m){var N;const _=this._bufferService.buffer.lines.get(E-1);if(!_)return void m(void 0);const v=[],S=this._optionsService.rawOptions.linkHandler,x=new h.CellData,k=_.getTrimmedLength();let A=-1,O=-1,D=!1;for(let L=0;L<k;L++)if(O!==-1||_.hasContent(L)){if(_.loadCell(L,x),x.hasExtendedAttrs()&&x.extended.urlId){if(O===-1){O=L,A=x.extended.urlId;continue}D=x.extended.urlId!==A}else O!==-1&&(D=!0);if(D||O!==-1&&L===k-1){const F=(N=this._oscLinkService.getLinkData(A))==null?void 0:N.uri;if(F){const I={start:{x:O+1,y:E},end:{x:L+(D||L!==k-1?0:1),y:E}};let z=!1;if(!(S!=null&&S.allowNonHttpProtocols))try{const W=new URL(F);["http:","https:"].includes(W.protocol)||(z=!0)}catch{z=!0}z||v.push({text:F,range:I,activate:(W,q)=>S?S.activate(W,q,I):T(0,q),hover:(W,q)=>{var Y;return(Y=S==null?void 0:S.hover)==null?void 0:Y.call(S,W,q,I)},leave:(W,q)=>{var Y;return(Y=S==null?void 0:S.leave)==null?void 0:Y.call(S,W,q,I)}})}D=!1,x.hasExtendedAttrs()&&x.extended.urlId?(O=L,A=x.extended.urlId):(O=-1,A=-1)}}m(v)}};function T(E,m){if(confirm(`Do you want to navigate to ${m}?
88
-
89
- WARNING: This link could potentially be dangerous`)){const _=window.open();if(_){try{_.opener=null}catch{}_.location.href=m}else console.warn("Opening link blocked as opener could not be cleared")}}o.OscLinkProvider=y=c([g(0,b.IBufferService),g(1,b.IOptionsService),g(2,b.IOscLinkService)],y)},6193:(d,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.RenderDebouncer=void 0,o.RenderDebouncer=class{constructor(l,c){this._renderCallback=l,this._coreBrowserService=c,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(l){return this._refreshCallbacks.push(l),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(l,c,g){this._rowCount=g,l=l!==void 0?l:0,c=c!==void 0?c:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,l):l,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,c):c,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return void this._runRefreshCallbacks();const l=Math.max(this._rowStart,0),c=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(l,c),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const l of this._refreshCallbacks)l(0);this._refreshCallbacks=[]}}},3236:(d,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Terminal=void 0;const c=l(3614),g=l(3656),h=l(3551),b=l(9042),y=l(3730),T=l(1680),E=l(3107),m=l(5744),_=l(2950),v=l(1296),S=l(428),x=l(4269),k=l(5114),A=l(8934),O=l(3230),D=l(9312),N=l(4725),L=l(6731),F=l(8055),I=l(8969),z=l(8460),W=l(844),q=l(6114),Y=l(8437),K=l(2584),Q=l(7399),H=l(5941),M=l(9074),U=l(2585),$=l(5435),j=l(4567),re=l(779);class _e extends I.CoreTerminal{get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}constructor(ee={}){super(ee),this.browser=q,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new W.MutableDisposable),this._onCursorMove=this.register(new z.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new z.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new z.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new z.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new z.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new z.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new z.EventEmitter),this._onBlur=this.register(new z.EventEmitter),this._onA11yCharEmitter=this.register(new z.EventEmitter),this._onA11yTabEmitter=this.register(new z.EventEmitter),this._onWillOpen=this.register(new z.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(M.DecorationService),this._instantiationService.setService(U.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(re.LinkProviderService),this._instantiationService.setService(N.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(y.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((G,le)=>this.refresh(G,le)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((G=>this._reportWindowsOptions(G)))),this.register(this._inputHandler.onColor((G=>this._handleColorEvent(G)))),this.register((0,z.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,z.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,z.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,z.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((G=>this._afterResize(G.cols,G.rows)))),this.register((0,W.toDisposable)((()=>{var G,le;this._customKeyEventHandler=void 0,(le=(G=this.element)==null?void 0:G.parentNode)==null||le.removeChild(this.element)})))}_handleColorEvent(ee){if(this._themeService)for(const G of ee){let le,ae="";switch(G.index){case 256:le="foreground",ae="10";break;case 257:le="background",ae="11";break;case 258:le="cursor",ae="12";break;default:le="ansi",ae="4;"+G.index}switch(G.type){case 0:const xe=F.color.toColorRGB(le==="ansi"?this._themeService.colors.ansi[G.index]:this._themeService.colors[le]);this.coreService.triggerDataEvent(`${K.C0.ESC}]${ae};${(0,H.toRgbString)(xe)}${K.C1_ESCAPED.ST}`);break;case 1:if(le==="ansi")this._themeService.modifyColors((ye=>ye.ansi[G.index]=F.channels.toColor(...G.color)));else{const ye=le;this._themeService.modifyColors((Pe=>Pe[ye]=F.channels.toColor(...G.color)))}break;case 2:this._themeService.restoreColor(G.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(ee){ee?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(j.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(ee){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(K.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var ee;return(ee=this.textarea)==null?void 0:ee.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(K.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;const ee=this.buffer.ybase+this.buffer.y,G=this.buffer.lines.get(ee);if(!G)return;const le=Math.min(this.buffer.x,this.cols-1),ae=this._renderService.dimensions.css.cell.height,xe=G.getWidth(le),ye=this._renderService.dimensions.css.cell.width*xe,Pe=this.buffer.y*this._renderService.dimensions.css.cell.height,Ne=le*this._renderService.dimensions.css.cell.width;this.textarea.style.left=Ne+"px",this.textarea.style.top=Pe+"px",this.textarea.style.width=ye+"px",this.textarea.style.height=ae+"px",this.textarea.style.lineHeight=ae+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,g.addDisposableDomListener)(this.element,"copy",(G=>{this.hasSelection()&&(0,c.copyHandler)(G,this._selectionService)})));const ee=G=>(0,c.handlePasteEvent)(G,this.textarea,this.coreService,this.optionsService);this.register((0,g.addDisposableDomListener)(this.textarea,"paste",ee)),this.register((0,g.addDisposableDomListener)(this.element,"paste",ee)),q.isFirefox?this.register((0,g.addDisposableDomListener)(this.element,"mousedown",(G=>{G.button===2&&(0,c.rightClickHandler)(G,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,g.addDisposableDomListener)(this.element,"contextmenu",(G=>{(0,c.rightClickHandler)(G,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),q.isLinux&&this.register((0,g.addDisposableDomListener)(this.element,"auxclick",(G=>{G.button===1&&(0,c.moveTextAreaUnderMouseCursor)(G,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,g.addDisposableDomListener)(this.textarea,"keyup",(ee=>this._keyUp(ee)),!0)),this.register((0,g.addDisposableDomListener)(this.textarea,"keydown",(ee=>this._keyDown(ee)),!0)),this.register((0,g.addDisposableDomListener)(this.textarea,"keypress",(ee=>this._keyPress(ee)),!0)),this.register((0,g.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,g.addDisposableDomListener)(this.textarea,"compositionupdate",(ee=>this._compositionHelper.compositionupdate(ee)))),this.register((0,g.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,g.addDisposableDomListener)(this.textarea,"input",(ee=>this._inputEvent(ee)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(ee){var le;if(!ee)throw new Error("Terminal requires a parent element.");if(ee.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((le=this.element)==null?void 0:le.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=ee.ownerDocument,this.options.documentOverride&&this.options.documentOverride instanceof Document&&(this._document=this.optionsService.rawOptions.documentOverride),this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),ee.appendChild(this.element);const G=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),G.appendChild(this._viewportElement),this._viewportScrollArea=this._document.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this.register((0,g.addDisposableDomListener)(this.screenElement,"mousemove",(ae=>this.updateCursorStyle(ae)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),G.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",b.promptLabel),q.isChromeOS||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._coreBrowserService=this.register(this._instantiationService.createInstance(k.CoreBrowserService,this.textarea,ee.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(N.ICoreBrowserService,this._coreBrowserService),this.register((0,g.addDisposableDomListener)(this.textarea,"focus",(ae=>this._handleTextAreaFocus(ae)))),this.register((0,g.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(S.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(N.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(L.ThemeService),this._instantiationService.setService(N.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(x.CharacterJoinerService),this._instantiationService.setService(N.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(O.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(N.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((ae=>this._onRender.fire(ae)))),this.onResize((ae=>this._renderService.resize(ae.cols,ae.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(_.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(A.MouseService),this._instantiationService.setService(N.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(h.Linkifier,this.screenElement)),this.element.appendChild(G);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(T.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((ae=>this.scrollLines(ae.amount,ae.suppressScrollEvent,1))),this.register(this._inputHandler.onRequestSyncScrollBar((()=>this.viewport.syncScrollArea()))),this.register(this.viewport),this.register(this.onCursorMove((()=>{this._renderService.handleCursorMove(),this._syncTextArea()}))),this.register(this.onResize((()=>this._renderService.handleResize(this.cols,this.rows)))),this.register(this.onBlur((()=>this._renderService.handleBlur()))),this.register(this.onFocus((()=>this._renderService.handleFocus()))),this.register(this._renderService.onDimensionsChange((()=>this.viewport.syncScrollArea()))),this._selectionService=this.register(this._instantiationService.createInstance(D.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(N.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((ae=>this.scrollLines(ae.amount,ae.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((ae=>this._renderService.handleSelectionChanged(ae.start,ae.end,ae.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((ae=>{this.textarea.value=ae,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((ae=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,g.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(E.BufferDecorationRenderer,this.screenElement)),this.register((0,g.addDisposableDomListener)(this.element,"mousedown",(ae=>this._selectionService.handleMouseDown(ae)))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(j.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(ae=>this._handleScreenReaderModeOptionChange(ae)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(m.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(ae=>{!this._overviewRulerRenderer&&ae&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(m.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(v.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const ee=this,G=this.element;function le(ye){const Pe=ee._mouseService.getMouseReportCoords(ye,ee.screenElement);if(!Pe)return!1;let Ne,nt;switch(ye.overrideType||ye.type){case"mousemove":nt=32,ye.buttons===void 0?(Ne=3,ye.button!==void 0&&(Ne=ye.button<3?ye.button:3)):Ne=1&ye.buttons?0:4&ye.buttons?1:2&ye.buttons?2:3;break;case"mouseup":nt=0,Ne=ye.button<3?ye.button:3;break;case"mousedown":nt=1,Ne=ye.button<3?ye.button:3;break;case"wheel":if(ee._customWheelEventHandler&&ee._customWheelEventHandler(ye)===!1||ee.viewport.getLinesScrolled(ye)===0)return!1;nt=ye.deltaY<0?0:1,Ne=4;break;default:return!1}return!(nt===void 0||Ne===void 0||Ne>4)&&ee.coreMouseService.triggerMouseEvent({col:Pe.col,row:Pe.row,x:Pe.x,y:Pe.y,button:Ne,action:nt,ctrl:ye.ctrlKey,alt:ye.altKey,shift:ye.shiftKey})}const ae={mouseup:null,wheel:null,mousedrag:null,mousemove:null},xe={mouseup:ye=>(le(ye),ye.buttons||(this._document.removeEventListener("mouseup",ae.mouseup),ae.mousedrag&&this._document.removeEventListener("mousemove",ae.mousedrag)),this.cancel(ye)),wheel:ye=>(le(ye),this.cancel(ye,!0)),mousedrag:ye=>{ye.buttons&&le(ye)},mousemove:ye=>{ye.buttons||le(ye)}};this.register(this.coreMouseService.onProtocolChange((ye=>{ye?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(ye)),this.element.classList.add("enable-mouse-events"),this._selectionService.disable()):(this._logService.debug("Unbinding from mouse events."),this.element.classList.remove("enable-mouse-events"),this._selectionService.enable()),8&ye?ae.mousemove||(G.addEventListener("mousemove",xe.mousemove),ae.mousemove=xe.mousemove):(G.removeEventListener("mousemove",ae.mousemove),ae.mousemove=null),16&ye?ae.wheel||(G.addEventListener("wheel",xe.wheel,{passive:!1}),ae.wheel=xe.wheel):(G.removeEventListener("wheel",ae.wheel),ae.wheel=null),2&ye?ae.mouseup||(ae.mouseup=xe.mouseup):(this._document.removeEventListener("mouseup",ae.mouseup),ae.mouseup=null),4&ye?ae.mousedrag||(ae.mousedrag=xe.mousedrag):(this._document.removeEventListener("mousemove",ae.mousedrag),ae.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,g.addDisposableDomListener)(G,"mousedown",(ye=>{if(ye.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(ye))return le(ye),ae.mouseup&&this._document.addEventListener("mouseup",ae.mouseup),ae.mousedrag&&this._document.addEventListener("mousemove",ae.mousedrag),this.cancel(ye)}))),this.register((0,g.addDisposableDomListener)(G,"wheel",(ye=>{if(!ae.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(ye)===!1)return!1;if(!this.buffer.hasScrollback){const Pe=this.viewport.getLinesScrolled(ye);if(Pe===0)return;const Ne=K.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(ye.deltaY<0?"A":"B");let nt="";for(let Ue=0;Ue<Math.abs(Pe);Ue++)nt+=Ne;return this.coreService.triggerDataEvent(nt,!0),this.cancel(ye,!0)}return this.viewport.handleWheel(ye)?this.cancel(ye):void 0}}),{passive:!1})),this.register((0,g.addDisposableDomListener)(G,"touchstart",(ye=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(ye),this.cancel(ye)}),{passive:!0})),this.register((0,g.addDisposableDomListener)(G,"touchmove",(ye=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(ye)?void 0:this.cancel(ye)}),{passive:!1}))}refresh(ee,G){var le;(le=this._renderService)==null||le.refreshRows(ee,G)}updateCursorStyle(ee){var G;(G=this._selectionService)!=null&&G.shouldColumnSelect(ee)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")}_showCursor(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))}scrollLines(ee,G,le=0){var ae;le===1?(super.scrollLines(ee,G,le),this.refresh(0,this.rows-1)):(ae=this.viewport)==null||ae.scrollLines(ee)}paste(ee){(0,c.paste)(ee,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(ee){this._customKeyEventHandler=ee}attachCustomWheelEventHandler(ee){this._customWheelEventHandler=ee}registerLinkProvider(ee){return this._linkProviderService.registerLinkProvider(ee)}registerCharacterJoiner(ee){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const G=this._characterJoinerService.register(ee);return this.refresh(0,this.rows-1),G}deregisterCharacterJoiner(ee){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(ee)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(ee){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+ee)}registerDecoration(ee){return this._decorationService.registerDecoration(ee)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(ee,G,le){this._selectionService.setSelection(ee,G,le)}getSelection(){return this._selectionService?this._selectionService.selectionText:""}getSelectionPosition(){if(this._selectionService&&this._selectionService.hasSelection)return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){var ee;(ee=this._selectionService)==null||ee.clearSelection()}selectAll(){var ee;(ee=this._selectionService)==null||ee.selectAll()}selectLines(ee,G){var le;(le=this._selectionService)==null||le.selectLines(ee,G)}_keyDown(ee){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(ee)===!1)return!1;const G=this.browser.isMac&&this.options.macOptionIsMeta&&ee.altKey;if(!G&&!this._compositionHelper.keydown(ee))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;G||ee.key!=="Dead"&&ee.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const le=(0,Q.evaluateKeyboardEvent)(ee,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(ee),le.type===3||le.type===2){const ae=this.rows-1;return this.scrollLines(le.type===2?-ae:ae),this.cancel(ee,!0)}return le.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,ee)||(le.cancel&&this.cancel(ee,!0),!le.key||!!(ee.key&&!ee.ctrlKey&&!ee.altKey&&!ee.metaKey&&ee.key.length===1&&ee.key.charCodeAt(0)>=65&&ee.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(le.key!==K.C0.ETX&&le.key!==K.C0.CR||(this.textarea.value=""),this._onKey.fire({key:le.key,domEvent:ee}),this._showCursor(),this.coreService.triggerDataEvent(le.key,!0),!this.optionsService.rawOptions.screenReaderMode||ee.altKey||ee.ctrlKey?this.cancel(ee,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(ee,G){const le=ee.isMac&&!this.options.macOptionIsMeta&&G.altKey&&!G.ctrlKey&&!G.metaKey||ee.isWindows&&G.altKey&&G.ctrlKey&&!G.metaKey||ee.isWindows&&G.getModifierState("AltGraph");return G.type==="keypress"?le:le&&(!G.keyCode||G.keyCode>47)}_keyUp(ee){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(ee)===!1||((function(G){return G.keyCode===16||G.keyCode===17||G.keyCode===18})(ee)||this.focus(),this.updateCursorStyle(ee),this._keyPressHandled=!1)}_keyPress(ee){let G;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(ee)===!1)return!1;if(this.cancel(ee),ee.charCode)G=ee.charCode;else if(ee.which===null||ee.which===void 0)G=ee.keyCode;else{if(ee.which===0||ee.charCode===0)return!1;G=ee.which}return!(!G||(ee.altKey||ee.ctrlKey||ee.metaKey)&&!this._isThirdLevelShift(this.browser,ee)||(G=String.fromCharCode(G),this._onKey.fire({key:G,domEvent:ee}),this._showCursor(),this.coreService.triggerDataEvent(G,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(ee){if(ee.data&&ee.inputType==="insertText"&&(!ee.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const G=ee.data;return this.coreService.triggerDataEvent(G,!0),this.cancel(ee),!0}return!1}resize(ee,G){ee!==this.cols||G!==this.rows?super.resize(ee,G):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(ee,G){var le,ae;(le=this._charSizeService)==null||le.measure(),(ae=this.viewport)==null||ae.syncScrollArea(!0)}clear(){var ee;if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let G=1;G<this.rows;G++)this.buffer.lines.push(this.buffer.getBlankLine(Y.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(ee=this.viewport)==null||ee.reset(),this.refresh(0,this.rows-1)}}reset(){var G,le;this.options.rows=this.rows,this.options.cols=this.cols;const ee=this._customKeyEventHandler;this._setup(),super.reset(),(G=this._selectionService)==null||G.reset(),this._decorationService.reset(),(le=this.viewport)==null||le.reset(),this._customKeyEventHandler=ee,this.refresh(0,this.rows-1)}clearTextureAtlas(){var ee;(ee=this._renderService)==null||ee.clearTextureAtlas()}_reportFocus(){var ee;(ee=this.element)!=null&&ee.classList.contains("focus")?this.coreService.triggerDataEvent(K.C0.ESC+"[I"):this.coreService.triggerDataEvent(K.C0.ESC+"[O")}_reportWindowsOptions(ee){if(this._renderService)switch(ee){case $.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const G=this._renderService.dimensions.css.canvas.width.toFixed(0),le=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${K.C0.ESC}[4;${le};${G}t`);break;case $.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const ae=this._renderService.dimensions.css.cell.width.toFixed(0),xe=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${K.C0.ESC}[6;${xe};${ae}t`)}}cancel(ee,G){if(this.options.cancelEvents||G)return ee.preventDefault(),ee.stopPropagation(),!1}}o.Terminal=_e},9924:(d,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.TimeBasedDebouncer=void 0,o.TimeBasedDebouncer=class{constructor(l,c=1e3){this._renderCallback=l,this._debounceThresholdMS=c,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(l,c,g){this._rowCount=g,l=l!==void 0?l:0,c=c!==void 0?c:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,l):l,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,c):c;const h=Date.now();if(h-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=h,this._innerRefresh();else if(!this._additionalRefreshRequested){const b=h-this._lastRefreshMs,y=this._debounceThresholdMS-b;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),y)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const l=Math.max(this._rowStart,0),c=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(l,c)}}},1680:function(d,o,l){var c=this&&this.__decorate||function(_,v,S,x){var k,A=arguments.length,O=A<3?v:x===null?x=Object.getOwnPropertyDescriptor(v,S):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")O=Reflect.decorate(_,v,S,x);else for(var D=_.length-1;D>=0;D--)(k=_[D])&&(O=(A<3?k(O):A>3?k(v,S,O):k(v,S))||O);return A>3&&O&&Object.defineProperty(v,S,O),O},g=this&&this.__param||function(_,v){return function(S,x){v(S,x,_)}};Object.defineProperty(o,"__esModule",{value:!0}),o.Viewport=void 0;const h=l(3656),b=l(4725),y=l(8460),T=l(844),E=l(2585);let m=o.Viewport=class extends T.Disposable{constructor(_,v,S,x,k,A,O,D){super(),this._viewportElement=_,this._scrollArea=v,this._bufferService=S,this._optionsService=x,this._charSizeService=k,this._renderService=A,this._coreBrowserService=O,this.scrollBarWidth=0,this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._wheelPartialScroll=0,this._refreshAnimationFrame=null,this._ignoreNextScrollEvent=!1,this._smoothScrollState={startTime:0,origin:-1,target:-1},this._onRequestScrollLines=this.register(new y.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,h.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((N=>this._activeBuffer=N.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((N=>this._renderDimensions=N))),this._handleThemeChange(D.colors),this.register(D.onChangeColors((N=>this._handleThemeChange(N)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(_){this._viewportElement.style.backgroundColor=_.background.css}reset(){this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._coreBrowserService.window.requestAnimationFrame((()=>this.syncScrollArea()))}_refresh(_){if(_)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderDimensions.device.cell.height/this._coreBrowserService.dpr,this._currentDeviceCellHeight=this._renderDimensions.device.cell.height,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;const v=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==v&&(this._lastRecordedBufferHeight=v,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const _=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==_&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=_),this._refreshAnimationFrame=null}syncScrollArea(_=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(_);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(_)}_handleScroll(_){if(this._lastScrollTop=this._viewportElement.scrollTop,!this._viewportElement.offsetParent)return;if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._onRequestScrollLines.fire({amount:0,suppressScrollEvent:!0});const v=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:v,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const _=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(_*(this._smoothScrollState.target-this._smoothScrollState.origin)),_<1?this._coreBrowserService.window.requestAnimationFrame((()=>this._smoothScroll())):this._clearSmoothScrollState()}_smoothScrollPercent(){return this._optionsService.rawOptions.smoothScrollDuration&&this._smoothScrollState.startTime?Math.max(Math.min((Date.now()-this._smoothScrollState.startTime)/this._optionsService.rawOptions.smoothScrollDuration,1),0):1}_clearSmoothScrollState(){this._smoothScrollState.startTime=0,this._smoothScrollState.origin=-1,this._smoothScrollState.target=-1}_bubbleScroll(_,v){const S=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(v<0&&this._viewportElement.scrollTop!==0||v>0&&S<this._lastRecordedBufferHeight)||(_.cancelable&&_.preventDefault(),!1)}handleWheel(_){const v=this._getPixelsScrolled(_);return v!==0&&(this._optionsService.rawOptions.smoothScrollDuration?(this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target===-1?this._smoothScrollState.target=this._viewportElement.scrollTop+v:this._smoothScrollState.target+=v,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=v,this._bubbleScroll(_,v))}scrollLines(_){if(_!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const v=_*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+v,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:_,suppressScrollEvent:!1})}_getPixelsScrolled(_){if(_.deltaY===0||_.shiftKey)return 0;let v=this._applyScrollModifier(_.deltaY,_);return _.deltaMode===WheelEvent.DOM_DELTA_LINE?v*=this._currentRowHeight:_.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(v*=this._currentRowHeight*this._bufferService.rows),v}getBufferElements(_,v){var D;let S,x="";const k=[],A=v??this._bufferService.buffer.lines.length,O=this._bufferService.buffer.lines;for(let N=_;N<A;N++){const L=O.get(N);if(!L)continue;const F=(D=O.get(N+1))==null?void 0:D.isWrapped;if(x+=L.translateToString(!F),!F||N===O.length-1){const I=document.createElement("div");I.textContent=x,k.push(I),x.length>0&&(S=I),x=""}}return{bufferElements:k,cursorElement:S}}getLinesScrolled(_){if(_.deltaY===0||_.shiftKey)return 0;let v=this._applyScrollModifier(_.deltaY,_);return _.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(v/=this._currentRowHeight+0,this._wheelPartialScroll+=v,v=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):_.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(v*=this._bufferService.rows),v}_applyScrollModifier(_,v){const S=this._optionsService.rawOptions.fastScrollModifier;return S==="alt"&&v.altKey||S==="ctrl"&&v.ctrlKey||S==="shift"&&v.shiftKey?_*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:_*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(_){this._lastTouchY=_.touches[0].pageY}handleTouchMove(_){const v=this._lastTouchY-_.touches[0].pageY;return this._lastTouchY=_.touches[0].pageY,v!==0&&(this._viewportElement.scrollTop+=v,this._bubbleScroll(_,v))}};o.Viewport=m=c([g(2,E.IBufferService),g(3,E.IOptionsService),g(4,b.ICharSizeService),g(5,b.IRenderService),g(6,b.ICoreBrowserService),g(7,b.IThemeService)],m)},3107:function(d,o,l){var c=this&&this.__decorate||function(E,m,_,v){var S,x=arguments.length,k=x<3?m:v===null?v=Object.getOwnPropertyDescriptor(m,_):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(E,m,_,v);else for(var A=E.length-1;A>=0;A--)(S=E[A])&&(k=(x<3?S(k):x>3?S(m,_,k):S(m,_))||k);return x>3&&k&&Object.defineProperty(m,_,k),k},g=this&&this.__param||function(E,m){return function(_,v){m(_,v,E)}};Object.defineProperty(o,"__esModule",{value:!0}),o.BufferDecorationRenderer=void 0;const h=l(4725),b=l(844),y=l(2585);let T=o.BufferDecorationRenderer=class extends b.Disposable{constructor(E,m,_,v,S){super(),this._screenElement=E,this._bufferService=m,this._coreBrowserService=_,this._decorationService=v,this._renderService=S,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this.register(this._renderService.onRenderedViewportChange((()=>this._doRefreshDecorations()))),this.register(this._renderService.onDimensionsChange((()=>{this._dimensionsChanged=!0,this._queueRefresh()}))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt}))),this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh()))),this.register(this._decorationService.onDecorationRemoved((x=>this._removeDecoration(x)))),this.register((0,b.toDisposable)((()=>{this._container.remove(),this._decorationElements.clear()})))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback((()=>{this._doRefreshDecorations(),this._animationFrame=void 0})))}_doRefreshDecorations(){for(const E of this._decorationService.decorations)this._renderDecoration(E);this._dimensionsChanged=!1}_renderDecoration(E){this._refreshStyle(E),this._dimensionsChanged&&this._refreshXPosition(E)}_createElement(E){var v;const m=this._coreBrowserService.mainDocument.createElement("div");m.classList.add("xterm-decoration"),m.classList.toggle("xterm-decoration-top-layer",((v=E==null?void 0:E.options)==null?void 0:v.layer)==="top"),m.style.width=`${Math.round((E.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,m.style.height=(E.options.height||1)*this._renderService.dimensions.css.cell.height+"px",m.style.top=(E.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",m.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const _=E.options.x??0;return _&&_>this._bufferService.cols&&(m.style.display="none"),this._refreshXPosition(E,m),m}_refreshStyle(E){const m=E.marker.line-this._bufferService.buffers.active.ydisp;if(m<0||m>=this._bufferService.rows)E.element&&(E.element.style.display="none",E.onRenderEmitter.fire(E.element));else{let _=this._decorationElements.get(E);_||(_=this._createElement(E),E.element=_,this._decorationElements.set(E,_),this._container.appendChild(_),E.onDispose((()=>{this._decorationElements.delete(E),_.remove()}))),_.style.top=m*this._renderService.dimensions.css.cell.height+"px",_.style.display=this._altBufferIsActive?"none":"block",E.onRenderEmitter.fire(_)}}_refreshXPosition(E,m=E.element){if(!m)return;const _=E.options.x??0;(E.options.anchor||"left")==="right"?m.style.right=_?_*this._renderService.dimensions.css.cell.width+"px":"":m.style.left=_?_*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(E){var m;(m=this._decorationElements.get(E))==null||m.remove(),this._decorationElements.delete(E),E.dispose()}};o.BufferDecorationRenderer=T=c([g(1,y.IBufferService),g(2,h.ICoreBrowserService),g(3,y.IDecorationService),g(4,h.IRenderService)],T)},5871:(d,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ColorZoneStore=void 0,o.ColorZoneStore=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(l){if(l.options.overviewRulerOptions){for(const c of this._zones)if(c.color===l.options.overviewRulerOptions.color&&c.position===l.options.overviewRulerOptions.position){if(this._lineIntersectsZone(c,l.marker.line))return;if(this._lineAdjacentToZone(c,l.marker.line,l.options.overviewRulerOptions.position))return void this._addLineToZone(c,l.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=l.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=l.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=l.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=l.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:l.options.overviewRulerOptions.color,position:l.options.overviewRulerOptions.position,startBufferLine:l.marker.line,endBufferLine:l.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(l){this._linePadding=l}_lineIntersectsZone(l,c){return c>=l.startBufferLine&&c<=l.endBufferLine}_lineAdjacentToZone(l,c,g){return c>=l.startBufferLine-this._linePadding[g||"full"]&&c<=l.endBufferLine+this._linePadding[g||"full"]}_addLineToZone(l,c){l.startBufferLine=Math.min(l.startBufferLine,c),l.endBufferLine=Math.max(l.endBufferLine,c)}}},5744:function(d,o,l){var c=this&&this.__decorate||function(S,x,k,A){var O,D=arguments.length,N=D<3?x:A===null?A=Object.getOwnPropertyDescriptor(x,k):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(S,x,k,A);else for(var L=S.length-1;L>=0;L--)(O=S[L])&&(N=(D<3?O(N):D>3?O(x,k,N):O(x,k))||N);return D>3&&N&&Object.defineProperty(x,k,N),N},g=this&&this.__param||function(S,x){return function(k,A){x(k,A,S)}};Object.defineProperty(o,"__esModule",{value:!0}),o.OverviewRulerRenderer=void 0;const h=l(5871),b=l(4725),y=l(844),T=l(2585),E={full:0,left:0,center:0,right:0},m={full:0,left:0,center:0,right:0},_={full:0,left:0,center:0,right:0};let v=o.OverviewRulerRenderer=class extends y.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(S,x,k,A,O,D,N){var F;super(),this._viewportElement=S,this._screenElement=x,this._bufferService=k,this._decorationService=A,this._renderService=O,this._optionsService=D,this._coreBrowserService=N,this._colorZoneStore=new h.ColorZoneStore,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),(F=this._viewportElement.parentElement)==null||F.insertBefore(this._canvas,this._viewportElement);const L=this._canvas.getContext("2d");if(!L)throw new Error("Ctx cannot be null");this._ctx=L,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,y.toDisposable)((()=>{var I;(I=this._canvas)==null||I.remove()})))}_registerDecorationListeners(){this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh(void 0,!0)))),this.register(this._decorationService.onDecorationRemoved((()=>this._queueRefresh(void 0,!0))))}_registerBufferChangeListeners(){this.register(this._renderService.onRenderedViewportChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"}))),this.register(this._bufferService.onScroll((()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())})))}_registerDimensionChangeListeners(){this.register(this._renderService.onRender((()=>{this._containerHeight&&this._containerHeight===this._screenElement.clientHeight||(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)}))),this.register(this._optionsService.onSpecificOptionChange("overviewRulerWidth",(()=>this._queueRefresh(!0)))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh(!0)))),this._queueRefresh(!0)}_refreshDrawConstants(){const S=Math.floor(this._canvas.width/3),x=Math.ceil(this._canvas.width/3);m.full=this._canvas.width,m.left=S,m.center=x,m.right=S,this._refreshDrawHeightConstants(),_.full=0,_.left=0,_.center=m.left,_.right=m.left+m.center}_refreshDrawHeightConstants(){E.full=Math.round(2*this._coreBrowserService.dpr);const S=this._canvas.height/this._bufferService.buffer.lines.length,x=Math.round(Math.max(Math.min(S,12),6)*this._coreBrowserService.dpr);E.left=x,E.center=x,E.right=x}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*E.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*E.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*E.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*E.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(const x of this._decorationService.decorations)this._colorZoneStore.addDecoration(x);this._ctx.lineWidth=1;const S=this._colorZoneStore.zones;for(const x of S)x.position!=="full"&&this._renderColorZone(x);for(const x of S)x.position==="full"&&this._renderColorZone(x);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(S){this._ctx.fillStyle=S.color,this._ctx.fillRect(_[S.position||"full"],Math.round((this._canvas.height-1)*(S.startBufferLine/this._bufferService.buffers.active.lines.length)-E[S.position||"full"]/2),m[S.position||"full"],Math.round((this._canvas.height-1)*((S.endBufferLine-S.startBufferLine)/this._bufferService.buffers.active.lines.length)+E[S.position||"full"]))}_queueRefresh(S,x){this._shouldUpdateDimensions=S||this._shouldUpdateDimensions,this._shouldUpdateAnchor=x||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};o.OverviewRulerRenderer=v=c([g(2,T.IBufferService),g(3,T.IDecorationService),g(4,b.IRenderService),g(5,T.IOptionsService),g(6,b.ICoreBrowserService)],v)},2950:function(d,o,l){var c=this&&this.__decorate||function(E,m,_,v){var S,x=arguments.length,k=x<3?m:v===null?v=Object.getOwnPropertyDescriptor(m,_):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(E,m,_,v);else for(var A=E.length-1;A>=0;A--)(S=E[A])&&(k=(x<3?S(k):x>3?S(m,_,k):S(m,_))||k);return x>3&&k&&Object.defineProperty(m,_,k),k},g=this&&this.__param||function(E,m){return function(_,v){m(_,v,E)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CompositionHelper=void 0;const h=l(4725),b=l(2585),y=l(2584);let T=o.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(E,m,_,v,S,x){this._textarea=E,this._compositionView=m,this._bufferService=_,this._optionsService=v,this._coreService=S,this._renderService=x,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(E){this._compositionView.textContent=E.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(E){if(this._isComposing||this._isSendingComposition){if(E.keyCode===229||E.keyCode===16||E.keyCode===17||E.keyCode===18)return!1;this._finalizeComposition(!1)}return E.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(E){if(this._compositionView.classList.remove("active"),this._isComposing=!1,E){const m={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let _;this._isSendingComposition=!1,m.start+=this._dataAlreadySent.length,_=this._isComposing?this._textarea.value.substring(m.start,m.end):this._textarea.value.substring(m.start),_.length>0&&this._coreService.triggerDataEvent(_,!0)}}),0)}else{this._isSendingComposition=!1;const m=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(m,!0)}}_handleAnyTextareaChanges(){const E=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const m=this._textarea.value,_=m.replace(E,"");this._dataAlreadySent=_,m.length>E.length?this._coreService.triggerDataEvent(_,!0):m.length<E.length?this._coreService.triggerDataEvent(`${y.C0.DEL}`,!0):m.length===E.length&&m!==E&&this._coreService.triggerDataEvent(m,!0)}}),0)}updateCompositionElements(E){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const m=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),_=this._renderService.dimensions.css.cell.height,v=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,S=m*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=S+"px",this._compositionView.style.top=v+"px",this._compositionView.style.height=_+"px",this._compositionView.style.lineHeight=_+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const x=this._compositionView.getBoundingClientRect();this._textarea.style.left=S+"px",this._textarea.style.top=v+"px",this._textarea.style.width=Math.max(x.width,1)+"px",this._textarea.style.height=Math.max(x.height,1)+"px",this._textarea.style.lineHeight=x.height+"px"}E||setTimeout((()=>this.updateCompositionElements(!0)),0)}}};o.CompositionHelper=T=c([g(2,b.IBufferService),g(3,b.IOptionsService),g(4,b.ICoreService),g(5,h.IRenderService)],T)},9806:(d,o)=>{function l(c,g,h){const b=h.getBoundingClientRect(),y=c.getComputedStyle(h),T=parseInt(y.getPropertyValue("padding-left")),E=parseInt(y.getPropertyValue("padding-top"));return[g.clientX-b.left-T,g.clientY-b.top-E]}Object.defineProperty(o,"__esModule",{value:!0}),o.getCoords=o.getCoordsRelativeToElement=void 0,o.getCoordsRelativeToElement=l,o.getCoords=function(c,g,h,b,y,T,E,m,_){if(!T)return;const v=l(c,g,h);return v?(v[0]=Math.ceil((v[0]+(_?E/2:0))/E),v[1]=Math.ceil(v[1]/m),v[0]=Math.min(Math.max(v[0],1),b+(_?1:0)),v[1]=Math.min(Math.max(v[1],1),y),v):void 0}},9504:(d,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.moveToCellSequence=void 0;const c=l(2584);function g(m,_,v,S){const x=m-h(m,v),k=_-h(_,v),A=Math.abs(x-k)-(function(O,D,N){let L=0;const F=O-h(O,N),I=D-h(D,N);for(let z=0;z<Math.abs(F-I);z++){const W=b(O,D)==="A"?-1:1,q=N.buffer.lines.get(F+W*z);q!=null&&q.isWrapped&&L++}return L})(m,_,v);return E(A,T(b(m,_),S))}function h(m,_){let v=0,S=_.buffer.lines.get(m),x=S==null?void 0:S.isWrapped;for(;x&&m>=0&&m<_.rows;)v++,S=_.buffer.lines.get(--m),x=S==null?void 0:S.isWrapped;return v}function b(m,_){return m>_?"A":"B"}function y(m,_,v,S,x,k){let A=m,O=_,D="";for(;A!==v||O!==S;)A+=x?1:-1,x&&A>k.cols-1?(D+=k.buffer.translateBufferLineToString(O,!1,m,A),A=0,m=0,O++):!x&&A<0&&(D+=k.buffer.translateBufferLineToString(O,!1,0,m+1),A=k.cols-1,m=A,O--);return D+k.buffer.translateBufferLineToString(O,!1,m,A)}function T(m,_){const v=_?"O":"[";return c.C0.ESC+v+m}function E(m,_){m=Math.floor(m);let v="";for(let S=0;S<m;S++)v+=_;return v}o.moveToCellSequence=function(m,_,v,S){const x=v.buffer.x,k=v.buffer.y;if(!v.buffer.hasScrollback)return(function(D,N,L,F,I,z){return g(N,F,I,z).length===0?"":E(y(D,N,D,N-h(N,I),!1,I).length,T("D",z))})(x,k,0,_,v,S)+g(k,_,v,S)+(function(D,N,L,F,I,z){let W;W=g(N,F,I,z).length>0?F-h(F,I):N;const q=F,Y=(function(K,Q,H,M,U,$){let j;return j=g(H,M,U,$).length>0?M-h(M,U):Q,K<H&&j<=M||K>=H&&j<M?"C":"D"})(D,N,L,F,I,z);return E(y(D,W,L,q,Y==="C",I).length,T(Y,z))})(x,k,m,_,v,S);let A;if(k===_)return A=x>m?"D":"C",E(Math.abs(x-m),T(A,S));A=k>_?"D":"C";const O=Math.abs(k-_);return E((function(D,N){return N.cols-D})(k>_?m:x,v)+(O-1)*v.cols+1+((k>_?x:m)-1),T(A,S))}},1296:function(d,o,l){var c=this&&this.__decorate||function(z,W,q,Y){var K,Q=arguments.length,H=Q<3?W:Y===null?Y=Object.getOwnPropertyDescriptor(W,q):Y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")H=Reflect.decorate(z,W,q,Y);else for(var M=z.length-1;M>=0;M--)(K=z[M])&&(H=(Q<3?K(H):Q>3?K(W,q,H):K(W,q))||H);return Q>3&&H&&Object.defineProperty(W,q,H),H},g=this&&this.__param||function(z,W){return function(q,Y){W(q,Y,z)}};Object.defineProperty(o,"__esModule",{value:!0}),o.DomRenderer=void 0;const h=l(3787),b=l(2550),y=l(2223),T=l(6171),E=l(6052),m=l(4725),_=l(8055),v=l(8460),S=l(844),x=l(2585),k="xterm-dom-renderer-owner-",A="xterm-rows",O="xterm-fg-",D="xterm-bg-",N="xterm-focus",L="xterm-selection";let F=1,I=o.DomRenderer=class extends S.Disposable{constructor(z,W,q,Y,K,Q,H,M,U,$,j,re,_e){super(),this._terminal=z,this._document=W,this._element=q,this._screenElement=Y,this._viewportElement=K,this._helperContainer=Q,this._linkifier2=H,this._charSizeService=U,this._optionsService=$,this._bufferService=j,this._coreBrowserService=re,this._themeService=_e,this._terminalClass=F++,this._rowElements=[],this._selectionRenderModel=(0,E.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new v.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(A),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement("div"),this._selectionContainer.classList.add(L),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,T.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((ue=>this._injectCss(ue)))),this._injectCss(this._themeService.colors),this._rowFactory=M.createInstance(h.DomRendererRowFactory,document),this._element.classList.add(k+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((ue=>this._handleLinkHover(ue)))),this.register(this._linkifier2.onHideLinkUnderline((ue=>this._handleLinkLeave(ue)))),this.register((0,S.toDisposable)((()=>{this._element.classList.remove(k+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new b.WidthCache(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){const z=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*z,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*z),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.left=0,this.dimensions.device.char.top=0,this.dimensions.device.canvas.width=this.dimensions.device.cell.width*this._bufferService.cols,this.dimensions.device.canvas.height=this.dimensions.device.cell.height*this._bufferService.rows,this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/z),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/z),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(const q of this._rowElements)q.style.width=`${this.dimensions.css.canvas.width}px`,q.style.height=`${this.dimensions.css.cell.height}px`,q.style.lineHeight=`${this.dimensions.css.cell.height}px`,q.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const W=`${this._terminalSelector} .${A} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=W,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss(z){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let W=`${this._terminalSelector} .${A} { color: ${z.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;W+=`${this._terminalSelector} .${A} .xterm-dim { color: ${_.color.multiplyOpacity(z.foreground,.5).css};}`,W+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;const q=`blink_underline_${this._terminalClass}`,Y=`blink_bar_${this._terminalClass}`,K=`blink_block_${this._terminalClass}`;W+=`@keyframes ${q} { 50% { border-bottom-style: hidden; }}`,W+=`@keyframes ${Y} { 50% { box-shadow: none; }}`,W+=`@keyframes ${K} { 0% { background-color: ${z.cursor.css}; color: ${z.cursorAccent.css}; } 50% { background-color: inherit; color: ${z.cursor.css}; }}`,W+=`${this._terminalSelector} .${A}.${N} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${q} 1s step-end infinite;}${this._terminalSelector} .${A}.${N} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${Y} 1s step-end infinite;}${this._terminalSelector} .${A}.${N} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${K} 1s step-end infinite;}${this._terminalSelector} .${A} .xterm-cursor.xterm-cursor-block { background-color: ${z.cursor.css}; color: ${z.cursorAccent.css};}${this._terminalSelector} .${A} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${z.cursor.css} !important; color: ${z.cursorAccent.css} !important;}${this._terminalSelector} .${A} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${z.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${A} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${z.cursor.css} inset;}${this._terminalSelector} .${A} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${z.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,W+=`${this._terminalSelector} .${L} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${L} div { position: absolute; background-color: ${z.selectionBackgroundOpaque.css};}${this._terminalSelector} .${L} div { position: absolute; background-color: ${z.selectionInactiveBackgroundOpaque.css};}`;for(const[Q,H]of z.ansi.entries())W+=`${this._terminalSelector} .${O}${Q} { color: ${H.css}; }${this._terminalSelector} .${O}${Q}.xterm-dim { color: ${_.color.multiplyOpacity(H,.5).css}; }${this._terminalSelector} .${D}${Q} { background-color: ${H.css}; }`;W+=`${this._terminalSelector} .${O}${y.INVERTED_DEFAULT_COLOR} { color: ${_.color.opaque(z.background).css}; }${this._terminalSelector} .${O}${y.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${_.color.multiplyOpacity(_.color.opaque(z.background),.5).css}; }${this._terminalSelector} .${D}${y.INVERTED_DEFAULT_COLOR} { background-color: ${z.foreground.css}; }`,this._themeStyleElement.textContent=W}_setDefaultSpacing(){const z=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${z}px`,this._rowFactory.defaultSpacing=z}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(z,W){for(let q=this._rowElements.length;q<=W;q++){const Y=this._document.createElement("div");this._rowContainer.appendChild(Y),this._rowElements.push(Y)}for(;this._rowElements.length>W;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(z,W){this._refreshRowElements(z,W),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(N),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(N),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(z,W,q){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(z,W,q),this.renderRows(0,this._bufferService.rows-1),!z||!W)return;this._selectionRenderModel.update(this._terminal,z,W,q);const Y=this._selectionRenderModel.viewportStartRow,K=this._selectionRenderModel.viewportEndRow,Q=this._selectionRenderModel.viewportCappedStartRow,H=this._selectionRenderModel.viewportCappedEndRow;if(Q>=this._bufferService.rows||H<0)return;const M=this._document.createDocumentFragment();if(q){const U=z[0]>W[0];M.appendChild(this._createSelectionElement(Q,U?W[0]:z[0],U?z[0]:W[0],H-Q+1))}else{const U=Y===Q?z[0]:0,$=Q===K?W[0]:this._bufferService.cols;M.appendChild(this._createSelectionElement(Q,U,$));const j=H-Q-1;if(M.appendChild(this._createSelectionElement(Q+1,0,this._bufferService.cols,j)),Q!==H){const re=K===H?W[0]:this._bufferService.cols;M.appendChild(this._createSelectionElement(H,0,re))}}this._selectionContainer.appendChild(M)}_createSelectionElement(z,W,q,Y=1){const K=this._document.createElement("div"),Q=W*this.dimensions.css.cell.width;let H=this.dimensions.css.cell.width*(q-W);return Q+H>this.dimensions.css.canvas.width&&(H=this.dimensions.css.canvas.width-Q),K.style.height=Y*this.dimensions.css.cell.height+"px",K.style.top=z*this.dimensions.css.cell.height+"px",K.style.left=`${Q}px`,K.style.width=`${H}px`,K}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(const z of this._rowElements)z.replaceChildren()}renderRows(z,W){const q=this._bufferService.buffer,Y=q.ybase+q.y,K=Math.min(q.x,this._bufferService.cols-1),Q=this._optionsService.rawOptions.cursorBlink,H=this._optionsService.rawOptions.cursorStyle,M=this._optionsService.rawOptions.cursorInactiveStyle;for(let U=z;U<=W;U++){const $=U+q.ydisp,j=this._rowElements[U],re=q.lines.get($);if(!j||!re)break;j.replaceChildren(...this._rowFactory.createRow(re,$,$===Y,H,M,K,Q,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${k}${this._terminalClass}`}_handleLinkHover(z){this._setCellUnderline(z.x1,z.x2,z.y1,z.y2,z.cols,!0)}_handleLinkLeave(z){this._setCellUnderline(z.x1,z.x2,z.y1,z.y2,z.cols,!1)}_setCellUnderline(z,W,q,Y,K,Q){q<0&&(z=0),Y<0&&(W=0);const H=this._bufferService.rows-1;q=Math.max(Math.min(q,H),0),Y=Math.max(Math.min(Y,H),0),K=Math.min(K,this._bufferService.cols);const M=this._bufferService.buffer,U=M.ybase+M.y,$=Math.min(M.x,K-1),j=this._optionsService.rawOptions.cursorBlink,re=this._optionsService.rawOptions.cursorStyle,_e=this._optionsService.rawOptions.cursorInactiveStyle;for(let ue=q;ue<=Y;++ue){const ee=ue+M.ydisp,G=this._rowElements[ue],le=M.lines.get(ee);if(!G||!le)break;G.replaceChildren(...this._rowFactory.createRow(le,ee,ee===U,re,_e,$,j,this.dimensions.css.cell.width,this._widthCache,Q?ue===q?z:0:-1,Q?(ue===Y?W:K)-1:-1))}}};o.DomRenderer=I=c([g(7,x.IInstantiationService),g(8,m.ICharSizeService),g(9,x.IOptionsService),g(10,x.IBufferService),g(11,m.ICoreBrowserService),g(12,m.IThemeService)],I)},3787:function(d,o,l){var c=this&&this.__decorate||function(A,O,D,N){var L,F=arguments.length,I=F<3?O:N===null?N=Object.getOwnPropertyDescriptor(O,D):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")I=Reflect.decorate(A,O,D,N);else for(var z=A.length-1;z>=0;z--)(L=A[z])&&(I=(F<3?L(I):F>3?L(O,D,I):L(O,D))||I);return F>3&&I&&Object.defineProperty(O,D,I),I},g=this&&this.__param||function(A,O){return function(D,N){O(D,N,A)}};Object.defineProperty(o,"__esModule",{value:!0}),o.DomRendererRowFactory=void 0;const h=l(2223),b=l(643),y=l(511),T=l(2585),E=l(8055),m=l(4725),_=l(4269),v=l(6171),S=l(3734);let x=o.DomRendererRowFactory=class{constructor(A,O,D,N,L,F,I){this._document=A,this._characterJoinerService=O,this._optionsService=D,this._coreBrowserService=N,this._coreService=L,this._decorationService=F,this._themeService=I,this._workCell=new y.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(A,O,D){this._selectionStart=A,this._selectionEnd=O,this._columnSelectMode=D}createRow(A,O,D,N,L,F,I,z,W,q,Y){const K=[],Q=this._characterJoinerService.getJoinedCharacters(O),H=this._themeService.colors;let M,U=A.getNoBgTrimmedLength();D&&U<F+1&&(U=F+1);let $=0,j="",re=0,_e=0,ue=0,ee=!1,G=0,le=!1,ae=0;const xe=[],ye=q!==-1&&Y!==-1;for(let Pe=0;Pe<U;Pe++){A.loadCell(Pe,this._workCell);let Ne=this._workCell.getWidth();if(Ne===0)continue;let nt=!1,Ue=Pe,Be=this._workCell;if(Q.length>0&&Pe===Q[0][0]){nt=!0;const Ve=Q.shift();Be=new _.JoinedCellData(this._workCell,A.translateToString(!0,Ve[0],Ve[1]),Ve[1]-Ve[0]),Ue=Ve[1]-1,Ne=Be.getWidth()}const $t=this._isCellInSelection(Pe,O),nn=D&&Pe===F,Qe=ye&&Pe>=q&&Pe<=Y;let tt=!1;this._decorationService.forEachDecorationAtCell(Pe,O,void 0,(Ve=>{tt=!0}));let it=Be.getChars()||b.WHITESPACE_CELL_CHAR;if(it===" "&&(Be.isUnderline()||Be.isOverline())&&(it=" "),ae=Ne*z-W.get(it,Be.isBold(),Be.isItalic()),M){if($&&($t&&le||!$t&&!le&&Be.bg===re)&&($t&&le&&H.selectionForeground||Be.fg===_e)&&Be.extended.ext===ue&&Qe===ee&&ae===G&&!nn&&!nt&&!tt){Be.isInvisible()?j+=b.WHITESPACE_CELL_CHAR:j+=it,$++;continue}$&&(M.textContent=j),M=this._document.createElement("span"),$=0,j=""}else M=this._document.createElement("span");if(re=Be.bg,_e=Be.fg,ue=Be.extended.ext,ee=Qe,G=ae,le=$t,nt&&F>=Pe&&F<=Ue&&(F=Pe),!this._coreService.isCursorHidden&&nn&&this._coreService.isCursorInitialized){if(xe.push("xterm-cursor"),this._coreBrowserService.isFocused)I&&xe.push("xterm-cursor-blink"),xe.push(N==="bar"?"xterm-cursor-bar":N==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(L)switch(L){case"outline":xe.push("xterm-cursor-outline");break;case"block":xe.push("xterm-cursor-block");break;case"bar":xe.push("xterm-cursor-bar");break;case"underline":xe.push("xterm-cursor-underline")}}if(Be.isBold()&&xe.push("xterm-bold"),Be.isItalic()&&xe.push("xterm-italic"),Be.isDim()&&xe.push("xterm-dim"),j=Be.isInvisible()?b.WHITESPACE_CELL_CHAR:Be.getChars()||b.WHITESPACE_CELL_CHAR,Be.isUnderline()&&(xe.push(`xterm-underline-${Be.extended.underlineStyle}`),j===" "&&(j=" "),!Be.isUnderlineColorDefault()))if(Be.isUnderlineColorRGB())M.style.textDecorationColor=`rgb(${S.AttributeData.toColorRGB(Be.getUnderlineColor()).join(",")})`;else{let Ve=Be.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&Be.isBold()&&Ve<8&&(Ve+=8),M.style.textDecorationColor=H.ansi[Ve].css}Be.isOverline()&&(xe.push("xterm-overline"),j===" "&&(j=" ")),Be.isStrikethrough()&&xe.push("xterm-strikethrough"),Qe&&(M.style.textDecoration="underline");let Me=Be.getFgColor(),$e=Be.getFgColorMode(),xt=Be.getBgColor(),fe=Be.getBgColorMode();const Ce=!!Be.isInverse();if(Ce){const Ve=Me;Me=xt,xt=Ve;const Yt=$e;$e=fe,fe=Yt}let Ie,qe,Ye,Ze=!1;switch(this._decorationService.forEachDecorationAtCell(Pe,O,void 0,(Ve=>{Ve.options.layer!=="top"&&Ze||(Ve.backgroundColorRGB&&(fe=50331648,xt=Ve.backgroundColorRGB.rgba>>8&16777215,Ie=Ve.backgroundColorRGB),Ve.foregroundColorRGB&&($e=50331648,Me=Ve.foregroundColorRGB.rgba>>8&16777215,qe=Ve.foregroundColorRGB),Ze=Ve.options.layer==="top")})),!Ze&&$t&&(Ie=this._coreBrowserService.isFocused?H.selectionBackgroundOpaque:H.selectionInactiveBackgroundOpaque,xt=Ie.rgba>>8&16777215,fe=50331648,Ze=!0,H.selectionForeground&&($e=50331648,Me=H.selectionForeground.rgba>>8&16777215,qe=H.selectionForeground)),Ze&&xe.push("xterm-decoration-top"),fe){case 16777216:case 33554432:Ye=H.ansi[xt],xe.push(`xterm-bg-${xt}`);break;case 50331648:Ye=E.channels.toColor(xt>>16,xt>>8&255,255&xt),this._addStyle(M,`background-color:#${k((xt>>>0).toString(16),"0",6)}`);break;default:Ce?(Ye=H.foreground,xe.push(`xterm-bg-${h.INVERTED_DEFAULT_COLOR}`)):Ye=H.background}switch(Ie||Be.isDim()&&(Ie=E.color.multiplyOpacity(Ye,.5)),$e){case 16777216:case 33554432:Be.isBold()&&Me<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(Me+=8),this._applyMinimumContrast(M,Ye,H.ansi[Me],Be,Ie,void 0)||xe.push(`xterm-fg-${Me}`);break;case 50331648:const Ve=E.channels.toColor(Me>>16&255,Me>>8&255,255&Me);this._applyMinimumContrast(M,Ye,Ve,Be,Ie,qe)||this._addStyle(M,`color:#${k(Me.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(M,Ye,H.foreground,Be,Ie,qe)||Ce&&xe.push(`xterm-fg-${h.INVERTED_DEFAULT_COLOR}`)}xe.length&&(M.className=xe.join(" "),xe.length=0),nn||nt||tt?M.textContent=j:$++,ae!==this.defaultSpacing&&(M.style.letterSpacing=`${ae}px`),K.push(M),Pe=Ue}return M&&$&&(M.textContent=j),K}_applyMinimumContrast(A,O,D,N,L,F){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,v.treatGlyphAsBackgroundColor)(N.getCode()))return!1;const I=this._getContrastCache(N);let z;if(L||F||(z=I.getColor(O.rgba,D.rgba)),z===void 0){const W=this._optionsService.rawOptions.minimumContrastRatio/(N.isDim()?2:1);z=E.color.ensureContrastRatio(L||O,F||D,W),I.setColor((L||O).rgba,(F||D).rgba,z??null)}return!!z&&(this._addStyle(A,`color:${z.css}`),!0)}_getContrastCache(A){return A.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(A,O){A.setAttribute("style",`${A.getAttribute("style")||""}${O};`)}_isCellInSelection(A,O){const D=this._selectionStart,N=this._selectionEnd;return!(!D||!N)&&(this._columnSelectMode?D[0]<=N[0]?A>=D[0]&&O>=D[1]&&A<N[0]&&O<=N[1]:A<D[0]&&O>=D[1]&&A>=N[0]&&O<=N[1]:O>D[1]&&O<N[1]||D[1]===N[1]&&O===D[1]&&A>=D[0]&&A<N[0]||D[1]<N[1]&&O===N[1]&&A<N[0]||D[1]<N[1]&&O===D[1]&&A>=D[0])}};function k(A,O,D){for(;A.length<D;)A=O+A;return A}o.DomRendererRowFactory=x=c([g(1,m.ICharacterJoinerService),g(2,T.IOptionsService),g(3,m.ICoreBrowserService),g(4,T.ICoreService),g(5,T.IDecorationService),g(6,m.IThemeService)],x)},2550:(d,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.WidthCache=void 0,o.WidthCache=class{constructor(l,c){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=l.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";const g=l.createElement("span");g.classList.add("xterm-char-measure-element");const h=l.createElement("span");h.classList.add("xterm-char-measure-element"),h.style.fontWeight="bold";const b=l.createElement("span");b.classList.add("xterm-char-measure-element"),b.style.fontStyle="italic";const y=l.createElement("span");y.classList.add("xterm-char-measure-element"),y.style.fontWeight="bold",y.style.fontStyle="italic",this._measureElements=[g,h,b,y],this._container.appendChild(g),this._container.appendChild(h),this._container.appendChild(b),this._container.appendChild(y),c.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(l,c,g,h){l===this._font&&c===this._fontSize&&g===this._weight&&h===this._weightBold||(this._font=l,this._fontSize=c,this._weight=g,this._weightBold=h,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${g}`,this._measureElements[1].style.fontWeight=`${h}`,this._measureElements[2].style.fontWeight=`${g}`,this._measureElements[3].style.fontWeight=`${h}`,this.clear())}get(l,c,g){let h=0;if(!c&&!g&&l.length===1&&(h=l.charCodeAt(0))<256){if(this._flat[h]!==-9999)return this._flat[h];const T=this._measure(l,0);return T>0&&(this._flat[h]=T),T}let b=l;c&&(b+="B"),g&&(b+="I");let y=this._holey.get(b);if(y===void 0){let T=0;c&&(T|=1),g&&(T|=2),y=this._measure(l,T),y>0&&this._holey.set(b,y)}return y}_measure(l,c){const g=this._measureElements[c];return g.textContent=l.repeat(32),g.offsetWidth/32}}},2223:(d,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.TEXT_BASELINE=o.DIM_OPACITY=o.INVERTED_DEFAULT_COLOR=void 0;const c=l(6114);o.INVERTED_DEFAULT_COLOR=257,o.DIM_OPACITY=.5,o.TEXT_BASELINE=c.isFirefox||c.isLegacyEdge?"bottom":"ideographic"},6171:(d,o)=>{function l(g){return 57508<=g&&g<=57558}function c(g){return g>=128512&&g<=128591||g>=127744&&g<=128511||g>=128640&&g<=128767||g>=9728&&g<=9983||g>=9984&&g<=10175||g>=65024&&g<=65039||g>=129280&&g<=129535||g>=127462&&g<=127487}Object.defineProperty(o,"__esModule",{value:!0}),o.computeNextVariantOffset=o.createRenderDimensions=o.treatGlyphAsBackgroundColor=o.allowRescaling=o.isEmoji=o.isRestrictedPowerlineGlyph=o.isPowerlineGlyph=o.throwIfFalsy=void 0,o.throwIfFalsy=function(g){if(!g)throw new Error("value must not be falsy");return g},o.isPowerlineGlyph=l,o.isRestrictedPowerlineGlyph=function(g){return 57520<=g&&g<=57527},o.isEmoji=c,o.allowRescaling=function(g,h,b,y){return h===1&&b>Math.ceil(1.5*y)&&g!==void 0&&g>255&&!c(g)&&!l(g)&&!(function(T){return 57344<=T&&T<=63743})(g)},o.treatGlyphAsBackgroundColor=function(g){return l(g)||(function(h){return 9472<=h&&h<=9631})(g)},o.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},o.computeNextVariantOffset=function(g,h,b=0){return(g-(2*Math.round(h)-b))%(2*Math.round(h))}},6052:(d,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.createSelectionRenderModel=void 0;class l{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(g,h,b,y=!1){if(this.selectionStart=h,this.selectionEnd=b,!h||!b||h[0]===b[0]&&h[1]===b[1])return void this.clear();const T=g.buffers.active.ydisp,E=h[1]-T,m=b[1]-T,_=Math.max(E,0),v=Math.min(m,g.rows-1);_>=g.rows||v<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=y,this.viewportStartRow=E,this.viewportEndRow=m,this.viewportCappedStartRow=_,this.viewportCappedEndRow=v,this.startCol=h[0],this.endCol=b[0])}isCellSelected(g,h,b){return!!this.hasSelection&&(b-=g.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?h>=this.startCol&&b>=this.viewportCappedStartRow&&h<this.endCol&&b<=this.viewportCappedEndRow:h<this.startCol&&b>=this.viewportCappedStartRow&&h>=this.endCol&&b<=this.viewportCappedEndRow:b>this.viewportStartRow&&b<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&b===this.viewportStartRow&&h>=this.startCol&&h<this.endCol||this.viewportStartRow<this.viewportEndRow&&b===this.viewportEndRow&&h<this.endCol||this.viewportStartRow<this.viewportEndRow&&b===this.viewportStartRow&&h>=this.startCol)}}o.createSelectionRenderModel=function(){return new l}},456:(d,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.SelectionModel=void 0,o.SelectionModel=class{constructor(l){this._bufferService=l,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){const l=this.selectionStart[0]+this.selectionStartLength;return l>this._bufferService.cols?l%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(l/this._bufferService.cols)-1]:[l%this._bufferService.cols,this.selectionStart[1]+Math.floor(l/this._bufferService.cols)]:[l,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const l=this.selectionStart[0]+this.selectionStartLength;return l>this._bufferService.cols?[l%this._bufferService.cols,this.selectionStart[1]+Math.floor(l/this._bufferService.cols)]:[Math.max(l,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const l=this.selectionStart,c=this.selectionEnd;return!(!l||!c)&&(l[1]>c[1]||l[1]===c[1]&&l[0]>c[0])}handleTrim(l){return this.selectionStart&&(this.selectionStart[1]-=l),this.selectionEnd&&(this.selectionEnd[1]-=l),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(d,o,l){var c=this&&this.__decorate||function(v,S,x,k){var A,O=arguments.length,D=O<3?S:k===null?k=Object.getOwnPropertyDescriptor(S,x):k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(v,S,x,k);else for(var N=v.length-1;N>=0;N--)(A=v[N])&&(D=(O<3?A(D):O>3?A(S,x,D):A(S,x))||D);return O>3&&D&&Object.defineProperty(S,x,D),D},g=this&&this.__param||function(v,S){return function(x,k){S(x,k,v)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CharSizeService=void 0;const h=l(2585),b=l(8460),y=l(844);let T=o.CharSizeService=class extends y.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(v,S,x){super(),this._optionsService=x,this.width=0,this.height=0,this._onCharSizeChange=this.register(new b.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new _(this._optionsService))}catch{this._measureStrategy=this.register(new m(v,S,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const v=this._measureStrategy.measure();v.width===this.width&&v.height===this.height||(this.width=v.width,this.height=v.height,this._onCharSizeChange.fire())}};o.CharSizeService=T=c([g(2,h.IOptionsService)],T);class E extends y.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(S,x){S!==void 0&&S>0&&x!==void 0&&x>0&&(this._result.width=S,this._result.height=x)}}class m extends E{constructor(S,x,k){super(),this._document=S,this._parentElement=x,this._optionsService=k,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}}class _ extends E{constructor(S){super(),this._optionsService=S,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const x=this._ctx.measureText("W");if(!("width"in x&&"fontBoundingBoxAscent"in x&&"fontBoundingBoxDescent"in x))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const S=this._ctx.measureText("W");return this._validateAndSet(S.width,S.fontBoundingBoxAscent+S.fontBoundingBoxDescent),this._result}}},4269:function(d,o,l){var c=this&&this.__decorate||function(_,v,S,x){var k,A=arguments.length,O=A<3?v:x===null?x=Object.getOwnPropertyDescriptor(v,S):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")O=Reflect.decorate(_,v,S,x);else for(var D=_.length-1;D>=0;D--)(k=_[D])&&(O=(A<3?k(O):A>3?k(v,S,O):k(v,S))||O);return A>3&&O&&Object.defineProperty(v,S,O),O},g=this&&this.__param||function(_,v){return function(S,x){v(S,x,_)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CharacterJoinerService=o.JoinedCellData=void 0;const h=l(3734),b=l(643),y=l(511),T=l(2585);class E extends h.AttributeData{constructor(v,S,x){super(),this.content=0,this.combinedData="",this.fg=v.fg,this.bg=v.bg,this.combinedData=S,this._width=x}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(v){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}o.JoinedCellData=E;let m=o.CharacterJoinerService=class tv{constructor(v){this._bufferService=v,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new y.CellData}register(v){const S={id:this._nextCharacterJoinerId++,handler:v};return this._characterJoiners.push(S),S.id}deregister(v){for(let S=0;S<this._characterJoiners.length;S++)if(this._characterJoiners[S].id===v)return this._characterJoiners.splice(S,1),!0;return!1}getJoinedCharacters(v){if(this._characterJoiners.length===0)return[];const S=this._bufferService.buffer.lines.get(v);if(!S||S.length===0)return[];const x=[],k=S.translateToString(!0);let A=0,O=0,D=0,N=S.getFg(0),L=S.getBg(0);for(let F=0;F<S.getTrimmedLength();F++)if(S.loadCell(F,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==N||this._workCell.bg!==L){if(F-A>1){const I=this._getJoinedRanges(k,D,O,S,A);for(let z=0;z<I.length;z++)x.push(I[z])}A=F,D=O,N=this._workCell.fg,L=this._workCell.bg}O+=this._workCell.getChars().length||b.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-A>1){const F=this._getJoinedRanges(k,D,O,S,A);for(let I=0;I<F.length;I++)x.push(F[I])}return x}_getJoinedRanges(v,S,x,k,A){const O=v.substring(S,x);let D=[];try{D=this._characterJoiners[0].handler(O)}catch(N){console.error(N)}for(let N=1;N<this._characterJoiners.length;N++)try{const L=this._characterJoiners[N].handler(O);for(let F=0;F<L.length;F++)tv._mergeRanges(D,L[F])}catch(L){console.error(L)}return this._stringRangesToCellRanges(D,k,A),D}_stringRangesToCellRanges(v,S,x){let k=0,A=!1,O=0,D=v[k];if(D){for(let N=x;N<this._bufferService.cols;N++){const L=S.getWidth(N),F=S.getString(N).length||b.WHITESPACE_CELL_CHAR.length;if(L!==0){if(!A&&D[0]<=O&&(D[0]=N,A=!0),D[1]<=O){if(D[1]=N,D=v[++k],!D)break;D[0]<=O?(D[0]=N,A=!0):A=!1}O+=F}}D&&(D[1]=this._bufferService.cols)}}static _mergeRanges(v,S){let x=!1;for(let k=0;k<v.length;k++){const A=v[k];if(x){if(S[1]<=A[0])return v[k-1][1]=S[1],v;if(S[1]<=A[1])return v[k-1][1]=Math.max(S[1],A[1]),v.splice(k,1),v;v.splice(k,1),k--}else{if(S[1]<=A[0])return v.splice(k,0,S),v;if(S[1]<=A[1])return A[0]=Math.min(S[0],A[0]),v;S[0]<A[1]&&(A[0]=Math.min(S[0],A[0]),x=!0)}}return x?v[v.length-1][1]=S[1]:v.push(S),v}};o.CharacterJoinerService=m=c([g(0,T.IBufferService)],m)},5114:(d,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CoreBrowserService=void 0;const c=l(844),g=l(8460),h=l(3656);class b extends c.Disposable{constructor(E,m,_){super(),this._textarea=E,this._window=m,this.mainDocument=_,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new y(this._window),this._onDprChange=this.register(new g.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new g.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((v=>this._screenDprMonitor.setWindow(v)))),this.register((0,g.forwardEvent)(this._screenDprMonitor.onDprChange,this._onDprChange)),this._textarea.addEventListener("focus",(()=>this._isFocused=!0)),this._textarea.addEventListener("blur",(()=>this._isFocused=!1))}get window(){return this._window}set window(E){this._window!==E&&(this._window=E,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask((()=>this._cachedIsFocused=void 0))),this._cachedIsFocused}}o.CoreBrowserService=b;class y extends c.Disposable{constructor(E){super(),this._parentWindow=E,this._windowResizeListener=this.register(new c.MutableDisposable),this._onDprChange=this.register(new g.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,c.toDisposable)((()=>this.clearListener())))}setWindow(E){this._parentWindow=E,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,h.addDisposableDomListener)(this._parentWindow,"resize",(()=>this._setDprAndFireIfDiffers()))}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var E;this._outerListener&&((E=this._resolutionMediaMatchList)==null||E.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){this._resolutionMediaMatchList&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._outerListener=void 0)}}},779:(d,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.LinkProviderService=void 0;const c=l(844);class g extends c.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,c.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(b){return this.linkProviders.push(b),{dispose:()=>{const y=this.linkProviders.indexOf(b);y!==-1&&this.linkProviders.splice(y,1)}}}}o.LinkProviderService=g},8934:function(d,o,l){var c=this&&this.__decorate||function(T,E,m,_){var v,S=arguments.length,x=S<3?E:_===null?_=Object.getOwnPropertyDescriptor(E,m):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(T,E,m,_);else for(var k=T.length-1;k>=0;k--)(v=T[k])&&(x=(S<3?v(x):S>3?v(E,m,x):v(E,m))||x);return S>3&&x&&Object.defineProperty(E,m,x),x},g=this&&this.__param||function(T,E){return function(m,_){E(m,_,T)}};Object.defineProperty(o,"__esModule",{value:!0}),o.MouseService=void 0;const h=l(4725),b=l(9806);let y=o.MouseService=class{constructor(T,E){this._renderService=T,this._charSizeService=E}getCoords(T,E,m,_,v){return(0,b.getCoords)(window,T,E,m,_,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,v)}getMouseReportCoords(T,E){const m=(0,b.getCoordsRelativeToElement)(window,T,E);if(this._charSizeService.hasValidSize)return m[0]=Math.min(Math.max(m[0],0),this._renderService.dimensions.css.canvas.width-1),m[1]=Math.min(Math.max(m[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(m[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(m[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(m[0]),y:Math.floor(m[1])}}};o.MouseService=y=c([g(0,h.IRenderService),g(1,h.ICharSizeService)],y)},3230:function(d,o,l){var c=this&&this.__decorate||function(v,S,x,k){var A,O=arguments.length,D=O<3?S:k===null?k=Object.getOwnPropertyDescriptor(S,x):k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(v,S,x,k);else for(var N=v.length-1;N>=0;N--)(A=v[N])&&(D=(O<3?A(D):O>3?A(S,x,D):A(S,x))||D);return O>3&&D&&Object.defineProperty(S,x,D),D},g=this&&this.__param||function(v,S){return function(x,k){S(x,k,v)}};Object.defineProperty(o,"__esModule",{value:!0}),o.RenderService=void 0;const h=l(6193),b=l(4725),y=l(8460),T=l(844),E=l(7226),m=l(2585);let _=o.RenderService=class extends T.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(v,S,x,k,A,O,D,N){super(),this._rowCount=v,this._charSizeService=k,this._renderer=this.register(new T.MutableDisposable),this._pausedResizeTask=new E.DebouncedIdleTask,this._observerDisposable=this.register(new T.MutableDisposable),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this.register(new y.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new y.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new y.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new y.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new h.RenderDebouncer(((L,F)=>this._renderRows(L,F)),D),this.register(this._renderDebouncer),this.register(D.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(O.onResize((()=>this._fullRefresh()))),this.register(O.buffers.onBufferActivate((()=>{var L;return(L=this._renderer.value)==null?void 0:L.clear()}))),this.register(x.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(A.onDecorationRegistered((()=>this._fullRefresh()))),this.register(A.onDecorationRemoved((()=>this._fullRefresh()))),this.register(x.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(O.cols,O.rows),this._fullRefresh()}))),this.register(x.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(O.buffer.y,O.buffer.y,!0)))),this.register(N.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(D.window,S),this.register(D.onWindowChange((L=>this._registerIntersectionObserver(L,S))))}_registerIntersectionObserver(v,S){if("IntersectionObserver"in v){const x=new v.IntersectionObserver((k=>this._handleIntersectionChange(k[k.length-1])),{threshold:0});x.observe(S),this._observerDisposable.value=(0,T.toDisposable)((()=>x.disconnect()))}}_handleIntersectionChange(v){this._isPaused=v.isIntersecting===void 0?v.intersectionRatio===0:!v.isIntersecting,this._isPaused||this._charSizeService.hasValidSize||this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this._pausedResizeTask.flush(),this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(v,S,x=!1){this._isPaused?this._needsFullRefresh=!0:(x||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(v,S,this._rowCount))}_renderRows(v,S){this._renderer.value&&(v=Math.min(v,this._rowCount-1),S=Math.min(S,this._rowCount-1),this._renderer.value.renderRows(v,S),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:v,end:S}),this._onRender.fire({start:v,end:S}),this._isNextRenderRedrawOnly=!0)}resize(v,S){this._rowCount=S,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(v){this._renderer.value=v,this._renderer.value&&(this._renderer.value.onRequestRedraw((S=>this.refreshRows(S.start,S.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(v){return this._renderDebouncer.addRefreshCallback(v)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var v,S;this._renderer.value&&((S=(v=this._renderer.value).clearTextureAtlas)==null||S.call(v),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(v,S){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var x;return(x=this._renderer.value)==null?void 0:x.handleResize(v,S)})):this._renderer.value.handleResize(v,S),this._fullRefresh())}handleCharSizeChanged(){var v;(v=this._renderer.value)==null||v.handleCharSizeChanged()}handleBlur(){var v;(v=this._renderer.value)==null||v.handleBlur()}handleFocus(){var v;(v=this._renderer.value)==null||v.handleFocus()}handleSelectionChanged(v,S,x){var k;this._selectionState.start=v,this._selectionState.end=S,this._selectionState.columnSelectMode=x,(k=this._renderer.value)==null||k.handleSelectionChanged(v,S,x)}handleCursorMove(){var v;(v=this._renderer.value)==null||v.handleCursorMove()}clear(){var v;(v=this._renderer.value)==null||v.clear()}};o.RenderService=_=c([g(2,m.IOptionsService),g(3,b.ICharSizeService),g(4,m.IDecorationService),g(5,m.IBufferService),g(6,b.ICoreBrowserService),g(7,b.IThemeService)],_)},9312:function(d,o,l){var c=this&&this.__decorate||function(D,N,L,F){var I,z=arguments.length,W=z<3?N:F===null?F=Object.getOwnPropertyDescriptor(N,L):F;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")W=Reflect.decorate(D,N,L,F);else for(var q=D.length-1;q>=0;q--)(I=D[q])&&(W=(z<3?I(W):z>3?I(N,L,W):I(N,L))||W);return z>3&&W&&Object.defineProperty(N,L,W),W},g=this&&this.__param||function(D,N){return function(L,F){N(L,F,D)}};Object.defineProperty(o,"__esModule",{value:!0}),o.SelectionService=void 0;const h=l(9806),b=l(9504),y=l(456),T=l(4725),E=l(8460),m=l(844),_=l(6114),v=l(4841),S=l(511),x=l(2585),k=" ",A=new RegExp(k,"g");let O=o.SelectionService=class extends m.Disposable{constructor(D,N,L,F,I,z,W,q,Y){super(),this._element=D,this._screenElement=N,this._linkifier=L,this._bufferService=F,this._coreService=I,this._mouseService=z,this._optionsService=W,this._renderService=q,this._coreBrowserService=Y,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new S.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new E.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new E.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new E.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new E.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=K=>this._handleMouseMove(K),this._mouseUpListener=K=>this._handleMouseUp(K),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((K=>this._handleTrim(K))),this.register(this._bufferService.buffers.onBufferActivate((K=>this._handleBufferActivate(K)))),this.enable(),this._model=new y.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,m.toDisposable)((()=>{this._removeMouseDownListeners()})))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){const D=this._model.finalSelectionStart,N=this._model.finalSelectionEnd;return!(!D||!N||D[0]===N[0]&&D[1]===N[1])}get selectionText(){const D=this._model.finalSelectionStart,N=this._model.finalSelectionEnd;if(!D||!N)return"";const L=this._bufferService.buffer,F=[];if(this._activeSelectionMode===3){if(D[0]===N[0])return"";const I=D[0]<N[0]?D[0]:N[0],z=D[0]<N[0]?N[0]:D[0];for(let W=D[1];W<=N[1];W++){const q=L.translateBufferLineToString(W,!0,I,z);F.push(q)}}else{const I=D[1]===N[1]?N[0]:void 0;F.push(L.translateBufferLineToString(D[1],!0,D[0],I));for(let z=D[1]+1;z<=N[1]-1;z++){const W=L.lines.get(z),q=L.translateBufferLineToString(z,!0);W!=null&&W.isWrapped?F[F.length-1]+=q:F.push(q)}if(D[1]!==N[1]){const z=L.lines.get(N[1]),W=L.translateBufferLineToString(N[1],!0,0,N[0]);z&&z.isWrapped?F[F.length-1]+=W:F.push(W)}}return F.map((I=>I.replace(A," "))).join(_.isWindows?`\r
90
- `:`
91
- `)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(D){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),_.isLinux&&D&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(D){const N=this._getMouseBufferCoords(D),L=this._model.finalSelectionStart,F=this._model.finalSelectionEnd;return!!(L&&F&&N)&&this._areCoordsInSelection(N,L,F)}isCellInSelection(D,N){const L=this._model.finalSelectionStart,F=this._model.finalSelectionEnd;return!(!L||!F)&&this._areCoordsInSelection([D,N],L,F)}_areCoordsInSelection(D,N,L){return D[1]>N[1]&&D[1]<L[1]||N[1]===L[1]&&D[1]===N[1]&&D[0]>=N[0]&&D[0]<L[0]||N[1]<L[1]&&D[1]===L[1]&&D[0]<L[0]||N[1]<L[1]&&D[1]===N[1]&&D[0]>=N[0]}_selectWordAtCursor(D,N){var I,z;const L=(z=(I=this._linkifier.currentLink)==null?void 0:I.link)==null?void 0:z.range;if(L)return this._model.selectionStart=[L.start.x-1,L.start.y-1],this._model.selectionStartLength=(0,v.getRangeLength)(L,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const F=this._getMouseBufferCoords(D);return!!F&&(this._selectWordAt(F,N),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(D,N){this._model.clearSelection(),D=Math.max(D,0),N=Math.min(N,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,D],this._model.selectionEnd=[this._bufferService.cols,N],this.refresh(),this._onSelectionChange.fire()}_handleTrim(D){this._model.handleTrim(D)&&this.refresh()}_getMouseBufferCoords(D){const N=this._mouseService.getCoords(D,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(N)return N[0]--,N[1]--,N[1]+=this._bufferService.buffer.ydisp,N}_getMouseEventScrollAmount(D){let N=(0,h.getCoordsRelativeToElement)(this._coreBrowserService.window,D,this._screenElement)[1];const L=this._renderService.dimensions.css.canvas.height;return N>=0&&N<=L?0:(N>L&&(N-=L),N=Math.min(Math.max(N,-50),50),N/=50,N/Math.abs(N)+Math.round(14*N))}shouldForceSelection(D){return _.isMac?D.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:D.shiftKey}handleMouseDown(D){if(this._mouseDownTimeStamp=D.timeStamp,(D.button!==2||!this.hasSelection)&&D.button===0){if(!this._enabled){if(!this.shouldForceSelection(D))return;D.stopPropagation()}D.preventDefault(),this._dragScrollAmount=0,this._enabled&&D.shiftKey?this._handleIncrementalClick(D):D.detail===1?this._handleSingleClick(D):D.detail===2?this._handleDoubleClick(D):D.detail===3&&this._handleTripleClick(D),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval((()=>this._dragScroll()),50)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(D){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(D))}_handleSingleClick(D){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(D)?3:0,this._model.selectionStart=this._getMouseBufferCoords(D),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const N=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);N&&N.length!==this._model.selectionStart[0]&&N.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(D){this._selectWordAtCursor(D,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(D){const N=this._getMouseBufferCoords(D);N&&(this._activeSelectionMode=2,this._selectLineAt(N[1]))}shouldColumnSelect(D){return D.altKey&&!(_.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(D){if(D.stopImmediatePropagation(),!this._model.selectionStart)return;const N=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(D),!this._model.selectionEnd)return void this.refresh(!0);this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(D),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const L=this._bufferService.buffer;if(this._model.selectionEnd[1]<L.lines.length){const F=L.lines.get(this._model.selectionEnd[1]);F&&F.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}N&&N[0]===this._model.selectionEnd[0]&&N[1]===this._model.selectionEnd[1]||this.refresh(!0)}_dragScroll(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});const D=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(D.ydisp+this._bufferService.rows,D.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=D.ydisp),this.refresh()}}_handleMouseUp(D){const N=D.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&N<500&&D.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const L=this._mouseService.getCoords(D,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(L&&L[0]!==void 0&&L[1]!==void 0){const F=(0,b.moveToCellSequence)(L[0]-1,L[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(F,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const D=this._model.finalSelectionStart,N=this._model.finalSelectionEnd,L=!(!D||!N||D[0]===N[0]&&D[1]===N[1]);L?D&&N&&(this._oldSelectionStart&&this._oldSelectionEnd&&D[0]===this._oldSelectionStart[0]&&D[1]===this._oldSelectionStart[1]&&N[0]===this._oldSelectionEnd[0]&&N[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(D,N,L)):this._oldHasSelection&&this._fireOnSelectionChange(D,N,L)}_fireOnSelectionChange(D,N,L){this._oldSelectionStart=D,this._oldSelectionEnd=N,this._oldHasSelection=L,this._onSelectionChange.fire()}_handleBufferActivate(D){this.clearSelection(),this._trimListener.dispose(),this._trimListener=D.activeBuffer.lines.onTrim((N=>this._handleTrim(N)))}_convertViewportColToCharacterIndex(D,N){let L=N;for(let F=0;N>=F;F++){const I=D.loadCell(F,this._workCell).getChars().length;this._workCell.getWidth()===0?L--:I>1&&N!==F&&(L+=I-1)}return L}setSelection(D,N,L){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[D,N],this._model.selectionStartLength=L,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(D){this._isClickInSelection(D)||(this._selectWordAtCursor(D,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(D,N,L=!0,F=!0){if(D[0]>=this._bufferService.cols)return;const I=this._bufferService.buffer,z=I.lines.get(D[1]);if(!z)return;const W=I.translateBufferLineToString(D[1],!1);let q=this._convertViewportColToCharacterIndex(z,D[0]),Y=q;const K=D[0]-q;let Q=0,H=0,M=0,U=0;if(W.charAt(q)===" "){for(;q>0&&W.charAt(q-1)===" ";)q--;for(;Y<W.length&&W.charAt(Y+1)===" ";)Y++}else{let re=D[0],_e=D[0];z.getWidth(re)===0&&(Q++,re--),z.getWidth(_e)===2&&(H++,_e++);const ue=z.getString(_e).length;for(ue>1&&(U+=ue-1,Y+=ue-1);re>0&&q>0&&!this._isCharWordSeparator(z.loadCell(re-1,this._workCell));){z.loadCell(re-1,this._workCell);const ee=this._workCell.getChars().length;this._workCell.getWidth()===0?(Q++,re--):ee>1&&(M+=ee-1,q-=ee-1),q--,re--}for(;_e<z.length&&Y+1<W.length&&!this._isCharWordSeparator(z.loadCell(_e+1,this._workCell));){z.loadCell(_e+1,this._workCell);const ee=this._workCell.getChars().length;this._workCell.getWidth()===2?(H++,_e++):ee>1&&(U+=ee-1,Y+=ee-1),Y++,_e++}}Y++;let $=q+K-Q+M,j=Math.min(this._bufferService.cols,Y-q+Q+H-M-U);if(N||W.slice(q,Y).trim()!==""){if(L&&$===0&&z.getCodePoint(0)!==32){const re=I.lines.get(D[1]-1);if(re&&z.isWrapped&&re.getCodePoint(this._bufferService.cols-1)!==32){const _e=this._getWordAt([this._bufferService.cols-1,D[1]-1],!1,!0,!1);if(_e){const ue=this._bufferService.cols-_e.start;$-=ue,j+=ue}}}if(F&&$+j===this._bufferService.cols&&z.getCodePoint(this._bufferService.cols-1)!==32){const re=I.lines.get(D[1]+1);if(re!=null&&re.isWrapped&&re.getCodePoint(0)!==32){const _e=this._getWordAt([0,D[1]+1],!1,!1,!0);_e&&(j+=_e.length)}}return{start:$,length:j}}}_selectWordAt(D,N){const L=this._getWordAt(D,N);if(L){for(;L.start<0;)L.start+=this._bufferService.cols,D[1]--;this._model.selectionStart=[L.start,D[1]],this._model.selectionStartLength=L.length}}_selectToWordAt(D){const N=this._getWordAt(D,!0);if(N){let L=D[1];for(;N.start<0;)N.start+=this._bufferService.cols,L--;if(!this._model.areSelectionValuesReversed())for(;N.start+N.length>this._bufferService.cols;)N.length-=this._bufferService.cols,L++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?N.start:N.start+N.length,L]}}_isCharWordSeparator(D){return D.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(D.getChars())>=0}_selectLineAt(D){const N=this._bufferService.buffer.getWrappedRangeForLine(D),L={start:{x:0,y:N.first},end:{x:this._bufferService.cols-1,y:N.last}};this._model.selectionStart=[0,N.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,v.getRangeLength)(L,this._bufferService.cols)}};o.SelectionService=O=c([g(3,x.IBufferService),g(4,x.ICoreService),g(5,T.IMouseService),g(6,x.IOptionsService),g(7,T.IRenderService),g(8,T.ICoreBrowserService)],O)},4725:(d,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ILinkProviderService=o.IThemeService=o.ICharacterJoinerService=o.ISelectionService=o.IRenderService=o.IMouseService=o.ICoreBrowserService=o.ICharSizeService=void 0;const c=l(8343);o.ICharSizeService=(0,c.createDecorator)("CharSizeService"),o.ICoreBrowserService=(0,c.createDecorator)("CoreBrowserService"),o.IMouseService=(0,c.createDecorator)("MouseService"),o.IRenderService=(0,c.createDecorator)("RenderService"),o.ISelectionService=(0,c.createDecorator)("SelectionService"),o.ICharacterJoinerService=(0,c.createDecorator)("CharacterJoinerService"),o.IThemeService=(0,c.createDecorator)("ThemeService"),o.ILinkProviderService=(0,c.createDecorator)("LinkProviderService")},6731:function(d,o,l){var c=this&&this.__decorate||function(O,D,N,L){var F,I=arguments.length,z=I<3?D:L===null?L=Object.getOwnPropertyDescriptor(D,N):L;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(O,D,N,L);else for(var W=O.length-1;W>=0;W--)(F=O[W])&&(z=(I<3?F(z):I>3?F(D,N,z):F(D,N))||z);return I>3&&z&&Object.defineProperty(D,N,z),z},g=this&&this.__param||function(O,D){return function(N,L){D(N,L,O)}};Object.defineProperty(o,"__esModule",{value:!0}),o.ThemeService=o.DEFAULT_ANSI_COLORS=void 0;const h=l(7239),b=l(8055),y=l(8460),T=l(844),E=l(2585),m=b.css.toColor("#ffffff"),_=b.css.toColor("#000000"),v=b.css.toColor("#ffffff"),S=b.css.toColor("#000000"),x={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};o.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const O=[b.css.toColor("#2e3436"),b.css.toColor("#cc0000"),b.css.toColor("#4e9a06"),b.css.toColor("#c4a000"),b.css.toColor("#3465a4"),b.css.toColor("#75507b"),b.css.toColor("#06989a"),b.css.toColor("#d3d7cf"),b.css.toColor("#555753"),b.css.toColor("#ef2929"),b.css.toColor("#8ae234"),b.css.toColor("#fce94f"),b.css.toColor("#729fcf"),b.css.toColor("#ad7fa8"),b.css.toColor("#34e2e2"),b.css.toColor("#eeeeec")],D=[0,95,135,175,215,255];for(let N=0;N<216;N++){const L=D[N/36%6|0],F=D[N/6%6|0],I=D[N%6];O.push({css:b.channels.toCss(L,F,I),rgba:b.channels.toRgba(L,F,I)})}for(let N=0;N<24;N++){const L=8+10*N;O.push({css:b.channels.toCss(L,L,L),rgba:b.channels.toRgba(L,L,L)})}return O})());let k=o.ThemeService=class extends T.Disposable{get colors(){return this._colors}constructor(O){super(),this._optionsService=O,this._contrastCache=new h.ColorContrastCache,this._halfContrastCache=new h.ColorContrastCache,this._onChangeColors=this.register(new y.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:m,background:_,cursor:v,cursorAccent:S,selectionForeground:void 0,selectionBackgroundTransparent:x,selectionBackgroundOpaque:b.color.blend(_,x),selectionInactiveBackgroundTransparent:x,selectionInactiveBackgroundOpaque:b.color.blend(_,x),ansi:o.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",(()=>this._contrastCache.clear()))),this.register(this._optionsService.onSpecificOptionChange("theme",(()=>this._setTheme(this._optionsService.rawOptions.theme))))}_setTheme(O={}){const D=this._colors;if(D.foreground=A(O.foreground,m),D.background=A(O.background,_),D.cursor=A(O.cursor,v),D.cursorAccent=A(O.cursorAccent,S),D.selectionBackgroundTransparent=A(O.selectionBackground,x),D.selectionBackgroundOpaque=b.color.blend(D.background,D.selectionBackgroundTransparent),D.selectionInactiveBackgroundTransparent=A(O.selectionInactiveBackground,D.selectionBackgroundTransparent),D.selectionInactiveBackgroundOpaque=b.color.blend(D.background,D.selectionInactiveBackgroundTransparent),D.selectionForeground=O.selectionForeground?A(O.selectionForeground,b.NULL_COLOR):void 0,D.selectionForeground===b.NULL_COLOR&&(D.selectionForeground=void 0),b.color.isOpaque(D.selectionBackgroundTransparent)&&(D.selectionBackgroundTransparent=b.color.opacity(D.selectionBackgroundTransparent,.3)),b.color.isOpaque(D.selectionInactiveBackgroundTransparent)&&(D.selectionInactiveBackgroundTransparent=b.color.opacity(D.selectionInactiveBackgroundTransparent,.3)),D.ansi=o.DEFAULT_ANSI_COLORS.slice(),D.ansi[0]=A(O.black,o.DEFAULT_ANSI_COLORS[0]),D.ansi[1]=A(O.red,o.DEFAULT_ANSI_COLORS[1]),D.ansi[2]=A(O.green,o.DEFAULT_ANSI_COLORS[2]),D.ansi[3]=A(O.yellow,o.DEFAULT_ANSI_COLORS[3]),D.ansi[4]=A(O.blue,o.DEFAULT_ANSI_COLORS[4]),D.ansi[5]=A(O.magenta,o.DEFAULT_ANSI_COLORS[5]),D.ansi[6]=A(O.cyan,o.DEFAULT_ANSI_COLORS[6]),D.ansi[7]=A(O.white,o.DEFAULT_ANSI_COLORS[7]),D.ansi[8]=A(O.brightBlack,o.DEFAULT_ANSI_COLORS[8]),D.ansi[9]=A(O.brightRed,o.DEFAULT_ANSI_COLORS[9]),D.ansi[10]=A(O.brightGreen,o.DEFAULT_ANSI_COLORS[10]),D.ansi[11]=A(O.brightYellow,o.DEFAULT_ANSI_COLORS[11]),D.ansi[12]=A(O.brightBlue,o.DEFAULT_ANSI_COLORS[12]),D.ansi[13]=A(O.brightMagenta,o.DEFAULT_ANSI_COLORS[13]),D.ansi[14]=A(O.brightCyan,o.DEFAULT_ANSI_COLORS[14]),D.ansi[15]=A(O.brightWhite,o.DEFAULT_ANSI_COLORS[15]),O.extendedAnsi){const N=Math.min(D.ansi.length-16,O.extendedAnsi.length);for(let L=0;L<N;L++)D.ansi[L+16]=A(O.extendedAnsi[L],o.DEFAULT_ANSI_COLORS[L+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(O){this._restoreColor(O),this._onChangeColors.fire(this.colors)}_restoreColor(O){if(O!==void 0)switch(O){case 256:this._colors.foreground=this._restoreColors.foreground;break;case 257:this._colors.background=this._restoreColors.background;break;case 258:this._colors.cursor=this._restoreColors.cursor;break;default:this._colors.ansi[O]=this._restoreColors.ansi[O]}else for(let D=0;D<this._restoreColors.ansi.length;++D)this._colors.ansi[D]=this._restoreColors.ansi[D]}modifyColors(O){O(this._colors),this._onChangeColors.fire(this.colors)}_updateRestoreColors(){this._restoreColors={foreground:this._colors.foreground,background:this._colors.background,cursor:this._colors.cursor,ansi:this._colors.ansi.slice()}}};function A(O,D){if(O!==void 0)try{return b.css.toColor(O)}catch{}return D}o.ThemeService=k=c([g(0,E.IOptionsService)],k)},6349:(d,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CircularList=void 0;const c=l(8460),g=l(844);class h extends g.Disposable{constructor(y){super(),this._maxLength=y,this.onDeleteEmitter=this.register(new c.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new c.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new c.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(y){if(this._maxLength===y)return;const T=new Array(y);for(let E=0;E<Math.min(y,this.length);E++)T[E]=this._array[this._getCyclicIndex(E)];this._array=T,this._maxLength=y,this._startIndex=0}get length(){return this._length}set length(y){if(y>this._length)for(let T=this._length;T<y;T++)this._array[T]=void 0;this._length=y}get(y){return this._array[this._getCyclicIndex(y)]}set(y,T){this._array[this._getCyclicIndex(y)]=T}push(y){this._array[this._getCyclicIndex(this._length)]=y,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++}recycle(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]}get isFull(){return this._length===this._maxLength}pop(){return this._array[this._getCyclicIndex(this._length---1)]}splice(y,T,...E){if(T){for(let m=y;m<this._length-T;m++)this._array[this._getCyclicIndex(m)]=this._array[this._getCyclicIndex(m+T)];this._length-=T,this.onDeleteEmitter.fire({index:y,amount:T})}for(let m=this._length-1;m>=y;m--)this._array[this._getCyclicIndex(m+E.length)]=this._array[this._getCyclicIndex(m)];for(let m=0;m<E.length;m++)this._array[this._getCyclicIndex(y+m)]=E[m];if(E.length&&this.onInsertEmitter.fire({index:y,amount:E.length}),this._length+E.length>this._maxLength){const m=this._length+E.length-this._maxLength;this._startIndex+=m,this._length=this._maxLength,this.onTrimEmitter.fire(m)}else this._length+=E.length}trimStart(y){y>this._length&&(y=this._length),this._startIndex+=y,this._length-=y,this.onTrimEmitter.fire(y)}shiftElements(y,T,E){if(!(T<=0)){if(y<0||y>=this._length)throw new Error("start argument out of range");if(y+E<0)throw new Error("Cannot shift elements in list beyond index 0");if(E>0){for(let _=T-1;_>=0;_--)this.set(y+_+E,this.get(y+_));const m=y+T+E-this._length;if(m>0)for(this._length+=m;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let m=0;m<T;m++)this.set(y+m+E,this.get(y+m))}}_getCyclicIndex(y){return(this._startIndex+y)%this._maxLength}}o.CircularList=h},1439:(d,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.clone=void 0,o.clone=function l(c,g=5){if(typeof c!="object")return c;const h=Array.isArray(c)?[]:{};for(const b in c)h[b]=g<=1?c[b]:c[b]&&l(c[b],g-1);return h}},8055:(d,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.contrastRatio=o.toPaddedHex=o.rgba=o.rgb=o.css=o.color=o.channels=o.NULL_COLOR=void 0;let l=0,c=0,g=0,h=0;var b,y,T,E,m;function _(S){const x=S.toString(16);return x.length<2?"0"+x:x}function v(S,x){return S<x?(x+.05)/(S+.05):(S+.05)/(x+.05)}o.NULL_COLOR={css:"#00000000",rgba:0},(function(S){S.toCss=function(x,k,A,O){return O!==void 0?`#${_(x)}${_(k)}${_(A)}${_(O)}`:`#${_(x)}${_(k)}${_(A)}`},S.toRgba=function(x,k,A,O=255){return(x<<24|k<<16|A<<8|O)>>>0},S.toColor=function(x,k,A,O){return{css:S.toCss(x,k,A,O),rgba:S.toRgba(x,k,A,O)}}})(b||(o.channels=b={})),(function(S){function x(k,A){return h=Math.round(255*A),[l,c,g]=m.toChannels(k.rgba),{css:b.toCss(l,c,g,h),rgba:b.toRgba(l,c,g,h)}}S.blend=function(k,A){if(h=(255&A.rgba)/255,h===1)return{css:A.css,rgba:A.rgba};const O=A.rgba>>24&255,D=A.rgba>>16&255,N=A.rgba>>8&255,L=k.rgba>>24&255,F=k.rgba>>16&255,I=k.rgba>>8&255;return l=L+Math.round((O-L)*h),c=F+Math.round((D-F)*h),g=I+Math.round((N-I)*h),{css:b.toCss(l,c,g),rgba:b.toRgba(l,c,g)}},S.isOpaque=function(k){return(255&k.rgba)==255},S.ensureContrastRatio=function(k,A,O){const D=m.ensureContrastRatio(k.rgba,A.rgba,O);if(D)return b.toColor(D>>24&255,D>>16&255,D>>8&255)},S.opaque=function(k){const A=(255|k.rgba)>>>0;return[l,c,g]=m.toChannels(A),{css:b.toCss(l,c,g),rgba:A}},S.opacity=x,S.multiplyOpacity=function(k,A){return h=255&k.rgba,x(k,h*A/255)},S.toColorRGB=function(k){return[k.rgba>>24&255,k.rgba>>16&255,k.rgba>>8&255]}})(y||(o.color=y={})),(function(S){let x,k;try{const A=document.createElement("canvas");A.width=1,A.height=1;const O=A.getContext("2d",{willReadFrequently:!0});O&&(x=O,x.globalCompositeOperation="copy",k=x.createLinearGradient(0,0,1,1))}catch{}S.toColor=function(A){if(A.match(/#[\da-f]{3,8}/i))switch(A.length){case 4:return l=parseInt(A.slice(1,2).repeat(2),16),c=parseInt(A.slice(2,3).repeat(2),16),g=parseInt(A.slice(3,4).repeat(2),16),b.toColor(l,c,g);case 5:return l=parseInt(A.slice(1,2).repeat(2),16),c=parseInt(A.slice(2,3).repeat(2),16),g=parseInt(A.slice(3,4).repeat(2),16),h=parseInt(A.slice(4,5).repeat(2),16),b.toColor(l,c,g,h);case 7:return{css:A,rgba:(parseInt(A.slice(1),16)<<8|255)>>>0};case 9:return{css:A,rgba:parseInt(A.slice(1),16)>>>0}}const O=A.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(O)return l=parseInt(O[1]),c=parseInt(O[2]),g=parseInt(O[3]),h=Math.round(255*(O[5]===void 0?1:parseFloat(O[5]))),b.toColor(l,c,g,h);if(!x||!k)throw new Error("css.toColor: Unsupported css format");if(x.fillStyle=k,x.fillStyle=A,typeof x.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(x.fillRect(0,0,1,1),[l,c,g,h]=x.getImageData(0,0,1,1).data,h!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:b.toRgba(l,c,g,h),css:A}}})(T||(o.css=T={})),(function(S){function x(k,A,O){const D=k/255,N=A/255,L=O/255;return .2126*(D<=.03928?D/12.92:Math.pow((D+.055)/1.055,2.4))+.7152*(N<=.03928?N/12.92:Math.pow((N+.055)/1.055,2.4))+.0722*(L<=.03928?L/12.92:Math.pow((L+.055)/1.055,2.4))}S.relativeLuminance=function(k){return x(k>>16&255,k>>8&255,255&k)},S.relativeLuminance2=x})(E||(o.rgb=E={})),(function(S){function x(A,O,D){const N=A>>24&255,L=A>>16&255,F=A>>8&255;let I=O>>24&255,z=O>>16&255,W=O>>8&255,q=v(E.relativeLuminance2(I,z,W),E.relativeLuminance2(N,L,F));for(;q<D&&(I>0||z>0||W>0);)I-=Math.max(0,Math.ceil(.1*I)),z-=Math.max(0,Math.ceil(.1*z)),W-=Math.max(0,Math.ceil(.1*W)),q=v(E.relativeLuminance2(I,z,W),E.relativeLuminance2(N,L,F));return(I<<24|z<<16|W<<8|255)>>>0}function k(A,O,D){const N=A>>24&255,L=A>>16&255,F=A>>8&255;let I=O>>24&255,z=O>>16&255,W=O>>8&255,q=v(E.relativeLuminance2(I,z,W),E.relativeLuminance2(N,L,F));for(;q<D&&(I<255||z<255||W<255);)I=Math.min(255,I+Math.ceil(.1*(255-I))),z=Math.min(255,z+Math.ceil(.1*(255-z))),W=Math.min(255,W+Math.ceil(.1*(255-W))),q=v(E.relativeLuminance2(I,z,W),E.relativeLuminance2(N,L,F));return(I<<24|z<<16|W<<8|255)>>>0}S.blend=function(A,O){if(h=(255&O)/255,h===1)return O;const D=O>>24&255,N=O>>16&255,L=O>>8&255,F=A>>24&255,I=A>>16&255,z=A>>8&255;return l=F+Math.round((D-F)*h),c=I+Math.round((N-I)*h),g=z+Math.round((L-z)*h),b.toRgba(l,c,g)},S.ensureContrastRatio=function(A,O,D){const N=E.relativeLuminance(A>>8),L=E.relativeLuminance(O>>8);if(v(N,L)<D){if(L<N){const z=x(A,O,D),W=v(N,E.relativeLuminance(z>>8));if(W<D){const q=k(A,O,D);return W>v(N,E.relativeLuminance(q>>8))?z:q}return z}const F=k(A,O,D),I=v(N,E.relativeLuminance(F>>8));if(I<D){const z=x(A,O,D);return I>v(N,E.relativeLuminance(z>>8))?F:z}return F}},S.reduceLuminance=x,S.increaseLuminance=k,S.toChannels=function(A){return[A>>24&255,A>>16&255,A>>8&255,255&A]}})(m||(o.rgba=m={})),o.toPaddedHex=_,o.contrastRatio=v},8969:(d,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CoreTerminal=void 0;const c=l(844),g=l(2585),h=l(4348),b=l(7866),y=l(744),T=l(7302),E=l(6975),m=l(8460),_=l(1753),v=l(1480),S=l(7994),x=l(9282),k=l(5435),A=l(5981),O=l(2660);let D=!1;class N extends c.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new m.EventEmitter),this._onScroll.event((F=>{var I;(I=this._onScrollApi)==null||I.fire(F.position)}))),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(F){for(const I in F)this.optionsService.options[I]=F[I]}constructor(F){super(),this._windowsWrappingHeuristics=this.register(new c.MutableDisposable),this._onBinary=this.register(new m.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new m.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new m.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new m.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new m.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new m.EventEmitter),this._instantiationService=new h.InstantiationService,this.optionsService=this.register(new T.OptionsService(F)),this._instantiationService.setService(g.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(y.BufferService)),this._instantiationService.setService(g.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(b.LogService)),this._instantiationService.setService(g.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(E.CoreService)),this._instantiationService.setService(g.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(_.CoreMouseService)),this._instantiationService.setService(g.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(v.UnicodeService)),this._instantiationService.setService(g.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(S.CharsetService),this._instantiationService.setService(g.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(O.OscLinkService),this._instantiationService.setService(g.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new k.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,m.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,m.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,m.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,m.forwardEvent)(this.coreService.onBinary,this._onBinary)),this.register(this.coreService.onRequestScrollToBottom((()=>this.scrollToBottom()))),this.register(this.coreService.onUserInput((()=>this._writeBuffer.handleUserInput()))),this.register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],(()=>this._handleWindowsPtyOptionChange()))),this.register(this._bufferService.onScroll((I=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this.register(this._inputHandler.onScroll((I=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this._writeBuffer=this.register(new A.WriteBuffer(((I,z)=>this._inputHandler.parse(I,z)))),this.register((0,m.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(F,I){this._writeBuffer.write(F,I)}writeSync(F,I){this._logService.logLevel<=g.LogLevelEnum.WARN&&!D&&(this._logService.warn("writeSync is unreliable and will be removed soon."),D=!0),this._writeBuffer.writeSync(F,I)}input(F,I=!0){this.coreService.triggerDataEvent(F,I)}resize(F,I){isNaN(F)||isNaN(I)||(F=Math.max(F,y.MINIMUM_COLS),I=Math.max(I,y.MINIMUM_ROWS),this._bufferService.resize(F,I))}scroll(F,I=!1){this._bufferService.scroll(F,I)}scrollLines(F,I,z){this._bufferService.scrollLines(F,I,z)}scrollPages(F){this.scrollLines(F*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(F){const I=F-this._bufferService.buffer.ydisp;I!==0&&this.scrollLines(I)}registerEscHandler(F,I){return this._inputHandler.registerEscHandler(F,I)}registerDcsHandler(F,I){return this._inputHandler.registerDcsHandler(F,I)}registerCsiHandler(F,I){return this._inputHandler.registerCsiHandler(F,I)}registerOscHandler(F,I){return this._inputHandler.registerOscHandler(F,I)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let F=!1;const I=this.optionsService.rawOptions.windowsPty;I&&I.buildNumber!==void 0&&I.buildNumber!==void 0?F=I.backend==="conpty"&&I.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(F=!0),F?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const F=[];F.push(this.onLineFeed(x.updateWindowsModeWrappedState.bind(null,this._bufferService))),F.push(this.registerCsiHandler({final:"H"},(()=>((0,x.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,c.toDisposable)((()=>{for(const I of F)I.dispose()}))}}}o.CoreTerminal=N},8460:(d,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.runAndSubscribe=o.forwardEvent=o.EventEmitter=void 0,o.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=l=>(this._listeners.push(l),{dispose:()=>{if(!this._disposed){for(let c=0;c<this._listeners.length;c++)if(this._listeners[c]===l)return void this._listeners.splice(c,1)}}})),this._event}fire(l,c){const g=[];for(let h=0;h<this._listeners.length;h++)g.push(this._listeners[h]);for(let h=0;h<g.length;h++)g[h].call(void 0,l,c)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},o.forwardEvent=function(l,c){return l((g=>c.fire(g)))},o.runAndSubscribe=function(l,c){return c(void 0),l((g=>c(g)))}},5435:function(d,o,l){var c=this&&this.__decorate||function(Q,H,M,U){var $,j=arguments.length,re=j<3?H:U===null?U=Object.getOwnPropertyDescriptor(H,M):U;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")re=Reflect.decorate(Q,H,M,U);else for(var _e=Q.length-1;_e>=0;_e--)($=Q[_e])&&(re=(j<3?$(re):j>3?$(H,M,re):$(H,M))||re);return j>3&&re&&Object.defineProperty(H,M,re),re},g=this&&this.__param||function(Q,H){return function(M,U){H(M,U,Q)}};Object.defineProperty(o,"__esModule",{value:!0}),o.InputHandler=o.WindowsOptionsReportType=void 0;const h=l(2584),b=l(7116),y=l(2015),T=l(844),E=l(482),m=l(8437),_=l(8460),v=l(643),S=l(511),x=l(3734),k=l(2585),A=l(1480),O=l(6242),D=l(6351),N=l(5941),L={"(":0,")":1,"*":2,"+":3,"-":1,".":2},F=131072;function I(Q,H){if(Q>24)return H.setWinLines||!1;switch(Q){case 1:return!!H.restoreWin;case 2:return!!H.minimizeWin;case 3:return!!H.setWinPosition;case 4:return!!H.setWinSizePixels;case 5:return!!H.raiseWin;case 6:return!!H.lowerWin;case 7:return!!H.refreshWin;case 8:return!!H.setWinSizeChars;case 9:return!!H.maximizeWin;case 10:return!!H.fullscreenWin;case 11:return!!H.getWinState;case 13:return!!H.getWinPosition;case 14:return!!H.getWinSizePixels;case 15:return!!H.getScreenSizePixels;case 16:return!!H.getCellSizePixels;case 18:return!!H.getWinSizeChars;case 19:return!!H.getScreenSizeChars;case 20:return!!H.getIconTitle;case 21:return!!H.getWinTitle;case 22:return!!H.pushTitle;case 23:return!!H.popTitle;case 24:return!!H.setWinLines}return!1}var z;(function(Q){Q[Q.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",Q[Q.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(z||(o.WindowsOptionsReportType=z={}));let W=0;class q extends T.Disposable{getAttrData(){return this._curAttrData}constructor(H,M,U,$,j,re,_e,ue,ee=new y.EscapeSequenceParser){super(),this._bufferService=H,this._charsetService=M,this._coreService=U,this._logService=$,this._optionsService=j,this._oscLinkService=re,this._coreMouseService=_e,this._unicodeService=ue,this._parser=ee,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new E.StringToUtf32,this._utf8Decoder=new E.Utf8ToUtf32,this._workCell=new S.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=m.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=m.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new _.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new _.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new _.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new _.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new _.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new _.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new _.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new _.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new _.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new _.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new _.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new _.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new _.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new Y(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((G=>this._activeBuffer=G.activeBuffer))),this._parser.setCsiHandlerFallback(((G,le)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(G),params:le.toArray()})})),this._parser.setEscHandlerFallback((G=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(G)})})),this._parser.setExecuteHandlerFallback((G=>{this._logService.debug("Unknown EXECUTE code: ",{code:G})})),this._parser.setOscHandlerFallback(((G,le,ae)=>{this._logService.debug("Unknown OSC code: ",{identifier:G,action:le,data:ae})})),this._parser.setDcsHandlerFallback(((G,le,ae)=>{le==="HOOK"&&(ae=ae.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(G),action:le,payload:ae})})),this._parser.setPrintHandler(((G,le,ae)=>this.print(G,le,ae))),this._parser.registerCsiHandler({final:"@"},(G=>this.insertChars(G))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(G=>this.scrollLeft(G))),this._parser.registerCsiHandler({final:"A"},(G=>this.cursorUp(G))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(G=>this.scrollRight(G))),this._parser.registerCsiHandler({final:"B"},(G=>this.cursorDown(G))),this._parser.registerCsiHandler({final:"C"},(G=>this.cursorForward(G))),this._parser.registerCsiHandler({final:"D"},(G=>this.cursorBackward(G))),this._parser.registerCsiHandler({final:"E"},(G=>this.cursorNextLine(G))),this._parser.registerCsiHandler({final:"F"},(G=>this.cursorPrecedingLine(G))),this._parser.registerCsiHandler({final:"G"},(G=>this.cursorCharAbsolute(G))),this._parser.registerCsiHandler({final:"H"},(G=>this.cursorPosition(G))),this._parser.registerCsiHandler({final:"I"},(G=>this.cursorForwardTab(G))),this._parser.registerCsiHandler({final:"J"},(G=>this.eraseInDisplay(G,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(G=>this.eraseInDisplay(G,!0))),this._parser.registerCsiHandler({final:"K"},(G=>this.eraseInLine(G,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(G=>this.eraseInLine(G,!0))),this._parser.registerCsiHandler({final:"L"},(G=>this.insertLines(G))),this._parser.registerCsiHandler({final:"M"},(G=>this.deleteLines(G))),this._parser.registerCsiHandler({final:"P"},(G=>this.deleteChars(G))),this._parser.registerCsiHandler({final:"S"},(G=>this.scrollUp(G))),this._parser.registerCsiHandler({final:"T"},(G=>this.scrollDown(G))),this._parser.registerCsiHandler({final:"X"},(G=>this.eraseChars(G))),this._parser.registerCsiHandler({final:"Z"},(G=>this.cursorBackwardTab(G))),this._parser.registerCsiHandler({final:"`"},(G=>this.charPosAbsolute(G))),this._parser.registerCsiHandler({final:"a"},(G=>this.hPositionRelative(G))),this._parser.registerCsiHandler({final:"b"},(G=>this.repeatPrecedingCharacter(G))),this._parser.registerCsiHandler({final:"c"},(G=>this.sendDeviceAttributesPrimary(G))),this._parser.registerCsiHandler({prefix:">",final:"c"},(G=>this.sendDeviceAttributesSecondary(G))),this._parser.registerCsiHandler({final:"d"},(G=>this.linePosAbsolute(G))),this._parser.registerCsiHandler({final:"e"},(G=>this.vPositionRelative(G))),this._parser.registerCsiHandler({final:"f"},(G=>this.hVPosition(G))),this._parser.registerCsiHandler({final:"g"},(G=>this.tabClear(G))),this._parser.registerCsiHandler({final:"h"},(G=>this.setMode(G))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(G=>this.setModePrivate(G))),this._parser.registerCsiHandler({final:"l"},(G=>this.resetMode(G))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(G=>this.resetModePrivate(G))),this._parser.registerCsiHandler({final:"m"},(G=>this.charAttributes(G))),this._parser.registerCsiHandler({final:"n"},(G=>this.deviceStatus(G))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(G=>this.deviceStatusPrivate(G))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(G=>this.softReset(G))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(G=>this.setCursorStyle(G))),this._parser.registerCsiHandler({final:"r"},(G=>this.setScrollRegion(G))),this._parser.registerCsiHandler({final:"s"},(G=>this.saveCursor(G))),this._parser.registerCsiHandler({final:"t"},(G=>this.windowOptions(G))),this._parser.registerCsiHandler({final:"u"},(G=>this.restoreCursor(G))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(G=>this.insertColumns(G))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(G=>this.deleteColumns(G))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(G=>this.selectProtected(G))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(G=>this.requestMode(G,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(G=>this.requestMode(G,!1))),this._parser.setExecuteHandler(h.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(h.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(h.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(h.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(h.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(h.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(h.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(h.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(h.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(h.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(h.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(h.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new O.OscHandler((G=>(this.setTitle(G),this.setIconName(G),!0)))),this._parser.registerOscHandler(1,new O.OscHandler((G=>this.setIconName(G)))),this._parser.registerOscHandler(2,new O.OscHandler((G=>this.setTitle(G)))),this._parser.registerOscHandler(4,new O.OscHandler((G=>this.setOrReportIndexedColor(G)))),this._parser.registerOscHandler(8,new O.OscHandler((G=>this.setHyperlink(G)))),this._parser.registerOscHandler(10,new O.OscHandler((G=>this.setOrReportFgColor(G)))),this._parser.registerOscHandler(11,new O.OscHandler((G=>this.setOrReportBgColor(G)))),this._parser.registerOscHandler(12,new O.OscHandler((G=>this.setOrReportCursorColor(G)))),this._parser.registerOscHandler(104,new O.OscHandler((G=>this.restoreIndexedColor(G)))),this._parser.registerOscHandler(110,new O.OscHandler((G=>this.restoreFgColor(G)))),this._parser.registerOscHandler(111,new O.OscHandler((G=>this.restoreBgColor(G)))),this._parser.registerOscHandler(112,new O.OscHandler((G=>this.restoreCursorColor(G)))),this._parser.registerEscHandler({final:"7"},(()=>this.saveCursor())),this._parser.registerEscHandler({final:"8"},(()=>this.restoreCursor())),this._parser.registerEscHandler({final:"D"},(()=>this.index())),this._parser.registerEscHandler({final:"E"},(()=>this.nextLine())),this._parser.registerEscHandler({final:"H"},(()=>this.tabSet())),this._parser.registerEscHandler({final:"M"},(()=>this.reverseIndex())),this._parser.registerEscHandler({final:"="},(()=>this.keypadApplicationMode())),this._parser.registerEscHandler({final:">"},(()=>this.keypadNumericMode())),this._parser.registerEscHandler({final:"c"},(()=>this.fullReset())),this._parser.registerEscHandler({final:"n"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"o"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"|"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"}"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"~"},(()=>this.setgLevel(1))),this._parser.registerEscHandler({intermediates:"%",final:"@"},(()=>this.selectDefaultCharset())),this._parser.registerEscHandler({intermediates:"%",final:"G"},(()=>this.selectDefaultCharset()));for(const G in b.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:G},(()=>this.selectCharset("("+G))),this._parser.registerEscHandler({intermediates:")",final:G},(()=>this.selectCharset(")"+G))),this._parser.registerEscHandler({intermediates:"*",final:G},(()=>this.selectCharset("*"+G))),this._parser.registerEscHandler({intermediates:"+",final:G},(()=>this.selectCharset("+"+G))),this._parser.registerEscHandler({intermediates:"-",final:G},(()=>this.selectCharset("-"+G))),this._parser.registerEscHandler({intermediates:".",final:G},(()=>this.selectCharset("."+G))),this._parser.registerEscHandler({intermediates:"/",final:G},(()=>this.selectCharset("/"+G)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((G=>(this._logService.error("Parsing error: ",G),G))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new D.DcsHandler(((G,le)=>this.requestStatusString(G,le))))}_preserveStack(H,M,U,$){this._parseStack.paused=!0,this._parseStack.cursorStartX=H,this._parseStack.cursorStartY=M,this._parseStack.decodedLength=U,this._parseStack.position=$}_logSlowResolvingAsync(H){this._logService.logLevel<=k.LogLevelEnum.WARN&&Promise.race([H,new Promise(((M,U)=>setTimeout((()=>U("#SLOW_TIMEOUT")),5e3)))]).catch((M=>{if(M!=="#SLOW_TIMEOUT")throw M;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(H,M){let U,$=this._activeBuffer.x,j=this._activeBuffer.y,re=0;const _e=this._parseStack.paused;if(_e){if(U=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,M))return this._logSlowResolvingAsync(U),U;$=this._parseStack.cursorStartX,j=this._parseStack.cursorStartY,this._parseStack.paused=!1,H.length>F&&(re=this._parseStack.position+F)}if(this._logService.logLevel<=k.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof H=="string"?` "${H}"`:` "${Array.prototype.map.call(H,(G=>String.fromCharCode(G))).join("")}"`),typeof H=="string"?H.split("").map((G=>G.charCodeAt(0))):H),this._parseBuffer.length<H.length&&this._parseBuffer.length<F&&(this._parseBuffer=new Uint32Array(Math.min(H.length,F))),_e||this._dirtyRowTracker.clearRange(),H.length>F)for(let G=re;G<H.length;G+=F){const le=G+F<H.length?G+F:H.length,ae=typeof H=="string"?this._stringDecoder.decode(H.substring(G,le),this._parseBuffer):this._utf8Decoder.decode(H.subarray(G,le),this._parseBuffer);if(U=this._parser.parse(this._parseBuffer,ae))return this._preserveStack($,j,ae,G),this._logSlowResolvingAsync(U),U}else if(!_e){const G=typeof H=="string"?this._stringDecoder.decode(H,this._parseBuffer):this._utf8Decoder.decode(H,this._parseBuffer);if(U=this._parser.parse(this._parseBuffer,G))return this._preserveStack($,j,G,0),this._logSlowResolvingAsync(U),U}this._activeBuffer.x===$&&this._activeBuffer.y===j||this._onCursorMove.fire();const ue=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),ee=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);ee<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(ee,this._bufferService.rows-1),Math.min(ue,this._bufferService.rows-1))}print(H,M,U){let $,j;const re=this._charsetService.charset,_e=this._optionsService.rawOptions.screenReaderMode,ue=this._bufferService.cols,ee=this._coreService.decPrivateModes.wraparound,G=this._coreService.modes.insertMode,le=this._curAttrData;let ae=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&U-M>0&&ae.getWidth(this._activeBuffer.x-1)===2&&ae.setCellFromCodepoint(this._activeBuffer.x-1,0,1,le);let xe=this._parser.precedingJoinState;for(let ye=M;ye<U;++ye){if($=H[ye],$<127&&re){const Ue=re[String.fromCharCode($)];Ue&&($=Ue.charCodeAt(0))}const Pe=this._unicodeService.charProperties($,xe);j=A.UnicodeService.extractWidth(Pe);const Ne=A.UnicodeService.extractShouldJoin(Pe),nt=Ne?A.UnicodeService.extractWidth(xe):0;if(xe=Pe,_e&&this._onA11yChar.fire((0,E.stringFromCodePoint)($)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+j-nt>ue){if(ee){const Ue=ae;let Be=this._activeBuffer.x-nt;for(this._activeBuffer.x=nt,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),ae=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),nt>0&&ae instanceof m.BufferLine&&ae.copyCellsFrom(Ue,Be,0,nt,!1);Be<ue;)Ue.setCellFromCodepoint(Be++,0,1,le)}else if(this._activeBuffer.x=ue-1,j===2)continue}if(Ne&&this._activeBuffer.x){const Ue=ae.getWidth(this._activeBuffer.x-1)?1:2;ae.addCodepointToCell(this._activeBuffer.x-Ue,$,j);for(let Be=j-nt;--Be>=0;)ae.setCellFromCodepoint(this._activeBuffer.x++,0,0,le)}else if(G&&(ae.insertCells(this._activeBuffer.x,j-nt,this._activeBuffer.getNullCell(le)),ae.getWidth(ue-1)===2&&ae.setCellFromCodepoint(ue-1,v.NULL_CELL_CODE,v.NULL_CELL_WIDTH,le)),ae.setCellFromCodepoint(this._activeBuffer.x++,$,j,le),j>0)for(;--j;)ae.setCellFromCodepoint(this._activeBuffer.x++,0,0,le)}this._parser.precedingJoinState=xe,this._activeBuffer.x<ue&&U-M>0&&ae.getWidth(this._activeBuffer.x)===0&&!ae.hasContent(this._activeBuffer.x)&&ae.setCellFromCodepoint(this._activeBuffer.x,0,1,le),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(H,M){return H.final!=="t"||H.prefix||H.intermediates?this._parser.registerCsiHandler(H,M):this._parser.registerCsiHandler(H,(U=>!I(U.params[0],this._optionsService.rawOptions.windowOptions)||M(U)))}registerDcsHandler(H,M){return this._parser.registerDcsHandler(H,new D.DcsHandler(M))}registerEscHandler(H,M){return this._parser.registerEscHandler(H,M)}registerOscHandler(H,M){return this._parser.registerOscHandler(H,new O.OscHandler(M))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){var H;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&((H=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&H.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);M.hasWidth(this._activeBuffer.x)&&!M.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const H=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-H),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(H=this._bufferService.cols-1){this._activeBuffer.x=Math.min(H,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(H,M){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=H,this._activeBuffer.y=this._activeBuffer.scrollTop+M):(this._activeBuffer.x=H,this._activeBuffer.y=M),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(H,M){this._restrictCursor(),this._setCursor(this._activeBuffer.x+H,this._activeBuffer.y+M)}cursorUp(H){const M=this._activeBuffer.y-this._activeBuffer.scrollTop;return M>=0?this._moveCursor(0,-Math.min(M,H.params[0]||1)):this._moveCursor(0,-(H.params[0]||1)),!0}cursorDown(H){const M=this._activeBuffer.scrollBottom-this._activeBuffer.y;return M>=0?this._moveCursor(0,Math.min(M,H.params[0]||1)):this._moveCursor(0,H.params[0]||1),!0}cursorForward(H){return this._moveCursor(H.params[0]||1,0),!0}cursorBackward(H){return this._moveCursor(-(H.params[0]||1),0),!0}cursorNextLine(H){return this.cursorDown(H),this._activeBuffer.x=0,!0}cursorPrecedingLine(H){return this.cursorUp(H),this._activeBuffer.x=0,!0}cursorCharAbsolute(H){return this._setCursor((H.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(H){return this._setCursor(H.length>=2?(H.params[1]||1)-1:0,(H.params[0]||1)-1),!0}charPosAbsolute(H){return this._setCursor((H.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(H){return this._moveCursor(H.params[0]||1,0),!0}linePosAbsolute(H){return this._setCursor(this._activeBuffer.x,(H.params[0]||1)-1),!0}vPositionRelative(H){return this._moveCursor(0,H.params[0]||1),!0}hVPosition(H){return this.cursorPosition(H),!0}tabClear(H){const M=H.params[0];return M===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:M===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(H){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let M=H.params[0]||1;for(;M--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(H){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let M=H.params[0]||1;for(;M--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(H){const M=H.params[0];return M===1&&(this._curAttrData.bg|=536870912),M!==2&&M!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(H,M,U,$=!1,j=!1){const re=this._activeBuffer.lines.get(this._activeBuffer.ybase+H);re.replaceCells(M,U,this._activeBuffer.getNullCell(this._eraseAttrData()),j),$&&(re.isWrapped=!1)}_resetBufferLine(H,M=!1){const U=this._activeBuffer.lines.get(this._activeBuffer.ybase+H);U&&(U.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),M),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+H),U.isWrapped=!1)}eraseInDisplay(H,M=!1){let U;switch(this._restrictCursor(this._bufferService.cols),H.params[0]){case 0:for(U=this._activeBuffer.y,this._dirtyRowTracker.markDirty(U),this._eraseInBufferLine(U++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,M);U<this._bufferService.rows;U++)this._resetBufferLine(U,M);this._dirtyRowTracker.markDirty(U);break;case 1:for(U=this._activeBuffer.y,this._dirtyRowTracker.markDirty(U),this._eraseInBufferLine(U,0,this._activeBuffer.x+1,!0,M),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(U+1).isWrapped=!1);U--;)this._resetBufferLine(U,M);this._dirtyRowTracker.markDirty(0);break;case 2:for(U=this._bufferService.rows,this._dirtyRowTracker.markDirty(U-1);U--;)this._resetBufferLine(U,M);this._dirtyRowTracker.markDirty(0);break;case 3:const $=this._activeBuffer.lines.length-this._bufferService.rows;$>0&&(this._activeBuffer.lines.trimStart($),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-$,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-$,0),this._onScroll.fire(0))}return!0}eraseInLine(H,M=!1){switch(this._restrictCursor(this._bufferService.cols),H.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,M);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,M);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,M)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(H){this._restrictCursor();let M=H.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const U=this._activeBuffer.ybase+this._activeBuffer.y,$=this._bufferService.rows-1-this._activeBuffer.scrollBottom,j=this._bufferService.rows-1+this._activeBuffer.ybase-$+1;for(;M--;)this._activeBuffer.lines.splice(j-1,1),this._activeBuffer.lines.splice(U,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(H){this._restrictCursor();let M=H.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const U=this._activeBuffer.ybase+this._activeBuffer.y;let $;for($=this._bufferService.rows-1-this._activeBuffer.scrollBottom,$=this._bufferService.rows-1+this._activeBuffer.ybase-$;M--;)this._activeBuffer.lines.splice(U,1),this._activeBuffer.lines.splice($,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(H){this._restrictCursor();const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return M&&(M.insertCells(this._activeBuffer.x,H.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(H){this._restrictCursor();const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return M&&(M.deleteCells(this._activeBuffer.x,H.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(H){let M=H.params[0]||1;for(;M--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollDown(H){let M=H.params[0]||1;for(;M--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,0,this._activeBuffer.getBlankLine(m.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(H){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const M=H.params[0]||1;for(let U=this._activeBuffer.scrollTop;U<=this._activeBuffer.scrollBottom;++U){const $=this._activeBuffer.lines.get(this._activeBuffer.ybase+U);$.deleteCells(0,M,this._activeBuffer.getNullCell(this._eraseAttrData())),$.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(H){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const M=H.params[0]||1;for(let U=this._activeBuffer.scrollTop;U<=this._activeBuffer.scrollBottom;++U){const $=this._activeBuffer.lines.get(this._activeBuffer.ybase+U);$.insertCells(0,M,this._activeBuffer.getNullCell(this._eraseAttrData())),$.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(H){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const M=H.params[0]||1;for(let U=this._activeBuffer.scrollTop;U<=this._activeBuffer.scrollBottom;++U){const $=this._activeBuffer.lines.get(this._activeBuffer.ybase+U);$.insertCells(this._activeBuffer.x,M,this._activeBuffer.getNullCell(this._eraseAttrData())),$.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(H){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const M=H.params[0]||1;for(let U=this._activeBuffer.scrollTop;U<=this._activeBuffer.scrollBottom;++U){const $=this._activeBuffer.lines.get(this._activeBuffer.ybase+U);$.deleteCells(this._activeBuffer.x,M,this._activeBuffer.getNullCell(this._eraseAttrData())),$.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(H){this._restrictCursor();const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return M&&(M.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(H.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(H){const M=this._parser.precedingJoinState;if(!M)return!0;const U=H.params[0]||1,$=A.UnicodeService.extractWidth(M),j=this._activeBuffer.x-$,re=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(j),_e=new Uint32Array(re.length*U);let ue=0;for(let G=0;G<re.length;){const le=re.codePointAt(G)||0;_e[ue++]=le,G+=le>65535?2:1}let ee=ue;for(let G=1;G<U;++G)_e.copyWithin(ee,0,ue),ee+=ue;return this.print(_e,0,ee),!0}sendDeviceAttributesPrimary(H){return H.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(h.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(h.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(H){return H.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(h.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(h.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(H.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(h.C0.ESC+"[>83;40003;0c")),!0}_is(H){return(this._optionsService.rawOptions.termName+"").indexOf(H)===0}setMode(H){for(let M=0;M<H.length;M++)switch(H.params[M]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(H){for(let M=0;M<H.length;M++)switch(H.params[M]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,b.DEFAULT_CHARSET),this._charsetService.setgCharset(1,b.DEFAULT_CHARSET),this._charsetService.setgCharset(2,b.DEFAULT_CHARSET),this._charsetService.setgCharset(3,b.DEFAULT_CHARSET);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}return!0}resetMode(H){for(let M=0;M<H.length;M++)switch(H.params[M]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(H){for(let M=0;M<H.length;M++)switch(H.params[M]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),H.params[M]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}return!0}requestMode(H,M){const U=this._coreService.decPrivateModes,{activeProtocol:$,activeEncoding:j}=this._coreMouseService,re=this._coreService,{buffers:_e,cols:ue}=this._bufferService,{active:ee,alt:G}=_e,le=this._optionsService.rawOptions,ae=Ne=>Ne?1:2,xe=H.params[0];return ye=xe,Pe=M?xe===2?4:xe===4?ae(re.modes.insertMode):xe===12?3:xe===20?ae(le.convertEol):0:xe===1?ae(U.applicationCursorKeys):xe===3?le.windowOptions.setWinLines?ue===80?2:ue===132?1:0:0:xe===6?ae(U.origin):xe===7?ae(U.wraparound):xe===8?3:xe===9?ae($==="X10"):xe===12?ae(le.cursorBlink):xe===25?ae(!re.isCursorHidden):xe===45?ae(U.reverseWraparound):xe===66?ae(U.applicationKeypad):xe===67?4:xe===1e3?ae($==="VT200"):xe===1002?ae($==="DRAG"):xe===1003?ae($==="ANY"):xe===1004?ae(U.sendFocus):xe===1005?4:xe===1006?ae(j==="SGR"):xe===1015?4:xe===1016?ae(j==="SGR_PIXELS"):xe===1048?1:xe===47||xe===1047||xe===1049?ae(ee===G):xe===2004?ae(U.bracketedPasteMode):0,re.triggerDataEvent(`${h.C0.ESC}[${M?"":"?"}${ye};${Pe}$y`),!0;var ye,Pe}_updateAttrColor(H,M,U,$,j){return M===2?(H|=50331648,H&=-16777216,H|=x.AttributeData.fromColorRGB([U,$,j])):M===5&&(H&=-50331904,H|=33554432|255&U),H}_extractColor(H,M,U){const $=[0,0,-1,0,0,0];let j=0,re=0;do{if($[re+j]=H.params[M+re],H.hasSubParams(M+re)){const _e=H.getSubParams(M+re);let ue=0;do $[1]===5&&(j=1),$[re+ue+1+j]=_e[ue];while(++ue<_e.length&&ue+re+1+j<$.length);break}if($[1]===5&&re+j>=2||$[1]===2&&re+j>=5)break;$[1]&&(j=1)}while(++re+M<H.length&&re+j<$.length);for(let _e=2;_e<$.length;++_e)$[_e]===-1&&($[_e]=0);switch($[0]){case 38:U.fg=this._updateAttrColor(U.fg,$[1],$[3],$[4],$[5]);break;case 48:U.bg=this._updateAttrColor(U.bg,$[1],$[3],$[4],$[5]);break;case 58:U.extended=U.extended.clone(),U.extended.underlineColor=this._updateAttrColor(U.extended.underlineColor,$[1],$[3],$[4],$[5])}return re}_processUnderline(H,M){M.extended=M.extended.clone(),(!~H||H>5)&&(H=1),M.extended.underlineStyle=H,M.fg|=268435456,H===0&&(M.fg&=-268435457),M.updateExtended()}_processSGR0(H){H.fg=m.DEFAULT_ATTR_DATA.fg,H.bg=m.DEFAULT_ATTR_DATA.bg,H.extended=H.extended.clone(),H.extended.underlineStyle=0,H.extended.underlineColor&=-67108864,H.updateExtended()}charAttributes(H){if(H.length===1&&H.params[0]===0)return this._processSGR0(this._curAttrData),!0;const M=H.length;let U;const $=this._curAttrData;for(let j=0;j<M;j++)U=H.params[j],U>=30&&U<=37?($.fg&=-50331904,$.fg|=16777216|U-30):U>=40&&U<=47?($.bg&=-50331904,$.bg|=16777216|U-40):U>=90&&U<=97?($.fg&=-50331904,$.fg|=16777224|U-90):U>=100&&U<=107?($.bg&=-50331904,$.bg|=16777224|U-100):U===0?this._processSGR0($):U===1?$.fg|=134217728:U===3?$.bg|=67108864:U===4?($.fg|=268435456,this._processUnderline(H.hasSubParams(j)?H.getSubParams(j)[0]:1,$)):U===5?$.fg|=536870912:U===7?$.fg|=67108864:U===8?$.fg|=1073741824:U===9?$.fg|=2147483648:U===2?$.bg|=134217728:U===21?this._processUnderline(2,$):U===22?($.fg&=-134217729,$.bg&=-134217729):U===23?$.bg&=-67108865:U===24?($.fg&=-268435457,this._processUnderline(0,$)):U===25?$.fg&=-536870913:U===27?$.fg&=-67108865:U===28?$.fg&=-1073741825:U===29?$.fg&=2147483647:U===39?($.fg&=-67108864,$.fg|=16777215&m.DEFAULT_ATTR_DATA.fg):U===49?($.bg&=-67108864,$.bg|=16777215&m.DEFAULT_ATTR_DATA.bg):U===38||U===48||U===58?j+=this._extractColor(H,j,$):U===53?$.bg|=1073741824:U===55?$.bg&=-1073741825:U===59?($.extended=$.extended.clone(),$.extended.underlineColor=-1,$.updateExtended()):U===100?($.fg&=-67108864,$.fg|=16777215&m.DEFAULT_ATTR_DATA.fg,$.bg&=-67108864,$.bg|=16777215&m.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",U);return!0}deviceStatus(H){switch(H.params[0]){case 5:this._coreService.triggerDataEvent(`${h.C0.ESC}[0n`);break;case 6:const M=this._activeBuffer.y+1,U=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${h.C0.ESC}[${M};${U}R`)}return!0}deviceStatusPrivate(H){if(H.params[0]===6){const M=this._activeBuffer.y+1,U=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${h.C0.ESC}[?${M};${U}R`)}return!0}softReset(H){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=m.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(H){const M=H.params[0]||1;switch(M){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}const U=M%2==1;return this._optionsService.options.cursorBlink=U,!0}setScrollRegion(H){const M=H.params[0]||1;let U;return(H.length<2||(U=H.params[1])>this._bufferService.rows||U===0)&&(U=this._bufferService.rows),U>M&&(this._activeBuffer.scrollTop=M-1,this._activeBuffer.scrollBottom=U-1,this._setCursor(0,0)),!0}windowOptions(H){if(!I(H.params[0],this._optionsService.rawOptions.windowOptions))return!0;const M=H.length>1?H.params[1]:0;switch(H.params[0]){case 14:M!==2&&this._onRequestWindowsOptionsReport.fire(z.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(z.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${h.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:M!==0&&M!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),M!==0&&M!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:M!==0&&M!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),M!==0&&M!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(H){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(H){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(H){return this._windowTitle=H,this._onTitleChange.fire(H),!0}setIconName(H){return this._iconName=H,!0}setOrReportIndexedColor(H){const M=[],U=H.split(";");for(;U.length>1;){const $=U.shift(),j=U.shift();if(/^\d+$/.exec($)){const re=parseInt($);if(K(re))if(j==="?")M.push({type:0,index:re});else{const _e=(0,N.parseColor)(j);_e&&M.push({type:1,index:re,color:_e})}}}return M.length&&this._onColor.fire(M),!0}setHyperlink(H){const M=H.split(";");return!(M.length<2)&&(M[1]?this._createHyperlink(M[0],M[1]):!M[0]&&this._finishHyperlink())}_createHyperlink(H,M){this._getCurrentLinkId()&&this._finishHyperlink();const U=H.split(":");let $;const j=U.findIndex((re=>re.startsWith("id=")));return j!==-1&&($=U[j].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:$,uri:M}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(H,M){const U=H.split(";");for(let $=0;$<U.length&&!(M>=this._specialColors.length);++$,++M)if(U[$]==="?")this._onColor.fire([{type:0,index:this._specialColors[M]}]);else{const j=(0,N.parseColor)(U[$]);j&&this._onColor.fire([{type:1,index:this._specialColors[M],color:j}])}return!0}setOrReportFgColor(H){return this._setOrReportSpecialColor(H,0)}setOrReportBgColor(H){return this._setOrReportSpecialColor(H,1)}setOrReportCursorColor(H){return this._setOrReportSpecialColor(H,2)}restoreIndexedColor(H){if(!H)return this._onColor.fire([{type:2}]),!0;const M=[],U=H.split(";");for(let $=0;$<U.length;++$)if(/^\d+$/.exec(U[$])){const j=parseInt(U[$]);K(j)&&M.push({type:2,index:j})}return M.length&&this._onColor.fire(M),!0}restoreFgColor(H){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(H){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(H){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,b.DEFAULT_CHARSET),!0}selectCharset(H){return H.length!==2?(this.selectDefaultCharset(),!0):(H[0]==="/"||this._charsetService.setgCharset(L[H[0]],b.CHARSETS[H[1]]||b.DEFAULT_CHARSET),!0)}index(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){const H=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,H,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=m.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=m.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(H){return this._charsetService.setgLevel(H),!0}screenAlignmentPattern(){const H=new S.CellData;H.content=4194373,H.fg=this._curAttrData.fg,H.bg=this._curAttrData.bg,this._setCursor(0,0);for(let M=0;M<this._bufferService.rows;++M){const U=this._activeBuffer.ybase+this._activeBuffer.y+M,$=this._activeBuffer.lines.get(U);$&&($.fill(H),$.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(H,M){const U=this._bufferService.buffer,$=this._optionsService.rawOptions;return(j=>(this._coreService.triggerDataEvent(`${h.C0.ESC}${j}${h.C0.ESC}\\`),!0))(H==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:H==='"p'?'P1$r61;1"p':H==="r"?`P1$r${U.scrollTop+1};${U.scrollBottom+1}r`:H==="m"?"P1$r0m":H===" q"?`P1$r${{block:2,underline:4,bar:6}[$.cursorStyle]-($.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(H,M){this._dirtyRowTracker.markRangeDirty(H,M)}}o.InputHandler=q;let Y=class{constructor(Q){this._bufferService=Q,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(Q){Q<this.start?this.start=Q:Q>this.end&&(this.end=Q)}markRangeDirty(Q,H){Q>H&&(W=Q,Q=H,H=W),Q<this.start&&(this.start=Q),H>this.end&&(this.end=H)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function K(Q){return 0<=Q&&Q<256}Y=c([g(0,k.IBufferService)],Y)},844:(d,o)=>{function l(c){for(const g of c)g.dispose();c.length=0}Object.defineProperty(o,"__esModule",{value:!0}),o.getDisposeArrayDisposable=o.disposeArray=o.toDisposable=o.MutableDisposable=o.Disposable=void 0,o.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const c of this._disposables)c.dispose();this._disposables.length=0}register(c){return this._disposables.push(c),c}unregister(c){const g=this._disposables.indexOf(c);g!==-1&&this._disposables.splice(g,1)}},o.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(c){var g;this._isDisposed||c===this._value||((g=this._value)==null||g.dispose(),this._value=c)}clear(){this.value=void 0}dispose(){var c;this._isDisposed=!0,(c=this._value)==null||c.dispose(),this._value=void 0}},o.toDisposable=function(c){return{dispose:c}},o.disposeArray=l,o.getDisposeArrayDisposable=function(c){return{dispose:()=>l(c)}}},1505:(d,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.FourKeyMap=o.TwoKeyMap=void 0;class l{constructor(){this._data={}}set(g,h,b){this._data[g]||(this._data[g]={}),this._data[g][h]=b}get(g,h){return this._data[g]?this._data[g][h]:void 0}clear(){this._data={}}}o.TwoKeyMap=l,o.FourKeyMap=class{constructor(){this._data=new l}set(c,g,h,b,y){this._data.get(c,g)||this._data.set(c,g,new l),this._data.get(c,g).set(h,b,y)}get(c,g,h,b){var y;return(y=this._data.get(c,g))==null?void 0:y.get(h,b)}clear(){this._data.clear()}}},6114:(d,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.isChromeOS=o.isLinux=o.isWindows=o.isIphone=o.isIpad=o.isMac=o.getSafariVersion=o.isSafari=o.isLegacyEdge=o.isFirefox=o.isNode=void 0,o.isNode=typeof process<"u"&&"title"in process;const l=o.isNode?"node":navigator.userAgent,c=o.isNode?"node":navigator.platform;o.isFirefox=l.includes("Firefox"),o.isLegacyEdge=l.includes("Edge"),o.isSafari=/^((?!chrome|android).)*safari/i.test(l),o.getSafariVersion=function(){if(!o.isSafari)return 0;const g=l.match(/Version\/(\d+)/);return g===null||g.length<2?0:parseInt(g[1])},o.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(c),o.isIpad=c==="iPad",o.isIphone=c==="iPhone",o.isWindows=["Windows","Win16","Win32","WinCE"].includes(c),o.isLinux=c.indexOf("Linux")>=0,o.isChromeOS=/\bCrOS\b/.test(l)},6106:(d,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.SortedList=void 0;let l=0;o.SortedList=class{constructor(c){this._getKey=c,this._array=[]}clear(){this._array.length=0}insert(c){this._array.length!==0?(l=this._search(this._getKey(c)),this._array.splice(l,0,c)):this._array.push(c)}delete(c){if(this._array.length===0)return!1;const g=this._getKey(c);if(g===void 0||(l=this._search(g),l===-1)||this._getKey(this._array[l])!==g)return!1;do if(this._array[l]===c)return this._array.splice(l,1),!0;while(++l<this._array.length&&this._getKey(this._array[l])===g);return!1}*getKeyIterator(c){if(this._array.length!==0&&(l=this._search(c),!(l<0||l>=this._array.length)&&this._getKey(this._array[l])===c))do yield this._array[l];while(++l<this._array.length&&this._getKey(this._array[l])===c)}forEachByKey(c,g){if(this._array.length!==0&&(l=this._search(c),!(l<0||l>=this._array.length)&&this._getKey(this._array[l])===c))do g(this._array[l]);while(++l<this._array.length&&this._getKey(this._array[l])===c)}values(){return[...this._array].values()}_search(c){let g=0,h=this._array.length-1;for(;h>=g;){let b=g+h>>1;const y=this._getKey(this._array[b]);if(y>c)h=b-1;else{if(!(y<c)){for(;b>0&&this._getKey(this._array[b-1])===c;)b--;return b}g=b+1}}return g}}},7226:(d,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DebouncedIdleTask=o.IdleTaskQueue=o.PriorityTaskQueue=void 0;const c=l(6114);class g{constructor(){this._tasks=[],this._i=0}enqueue(y){this._tasks.push(y),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(y){this._idleCallback=void 0;let T=0,E=0,m=y.timeRemaining(),_=0;for(;this._i<this._tasks.length;){if(T=Date.now(),this._tasks[this._i]()||this._i++,T=Math.max(1,Date.now()-T),E=Math.max(T,E),_=y.timeRemaining(),1.5*E>_)return m-T<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(m-T))}ms`),void this._start();m=_}this.clear()}}class h extends g{_requestCallback(y){return setTimeout((()=>y(this._createDeadline(16))))}_cancelCallback(y){clearTimeout(y)}_createDeadline(y){const T=Date.now()+y;return{timeRemaining:()=>Math.max(0,T-Date.now())}}}o.PriorityTaskQueue=h,o.IdleTaskQueue=!c.isNode&&"requestIdleCallback"in window?class extends g{_requestCallback(b){return requestIdleCallback(b)}_cancelCallback(b){cancelIdleCallback(b)}}:h,o.DebouncedIdleTask=class{constructor(){this._queue=new o.IdleTaskQueue}set(b){this._queue.clear(),this._queue.enqueue(b)}flush(){this._queue.flush()}}},9282:(d,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.updateWindowsModeWrappedState=void 0;const c=l(643);o.updateWindowsModeWrappedState=function(g){const h=g.buffer.lines.get(g.buffer.ybase+g.buffer.y-1),b=h==null?void 0:h.get(g.cols-1),y=g.buffer.lines.get(g.buffer.ybase+g.buffer.y);y&&b&&(y.isWrapped=b[c.CHAR_DATA_CODE_INDEX]!==c.NULL_CELL_CODE&&b[c.CHAR_DATA_CODE_INDEX]!==c.WHITESPACE_CELL_CODE)}},3734:(d,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ExtendedAttrs=o.AttributeData=void 0;class l{constructor(){this.fg=0,this.bg=0,this.extended=new c}static toColorRGB(h){return[h>>>16&255,h>>>8&255,255&h]}static fromColorRGB(h){return(255&h[0])<<16|(255&h[1])<<8|255&h[2]}clone(){const h=new l;return h.fg=this.fg,h.bg=this.bg,h.extended=this.extended.clone(),h}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}o.AttributeData=l;class c{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(h){this._ext=h}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(h){this._ext&=-469762049,this._ext|=h<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(h){this._ext&=-67108864,this._ext|=67108863&h}get urlId(){return this._urlId}set urlId(h){this._urlId=h}get underlineVariantOffset(){const h=(3758096384&this._ext)>>29;return h<0?4294967288^h:h}set underlineVariantOffset(h){this._ext&=536870911,this._ext|=h<<29&3758096384}constructor(h=0,b=0){this._ext=0,this._urlId=0,this._ext=h,this._urlId=b}clone(){return new c(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}o.ExtendedAttrs=c},9092:(d,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Buffer=o.MAX_BUFFER_SIZE=void 0;const c=l(6349),g=l(7226),h=l(3734),b=l(8437),y=l(4634),T=l(511),E=l(643),m=l(4863),_=l(7116);o.MAX_BUFFER_SIZE=4294967295,o.Buffer=class{constructor(v,S,x){this._hasScrollback=v,this._optionsService=S,this._bufferService=x,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=b.DEFAULT_ATTR_DATA.clone(),this.savedCharset=_.DEFAULT_CHARSET,this.markers=[],this._nullCell=T.CellData.fromCharData([0,E.NULL_CELL_CHAR,E.NULL_CELL_WIDTH,E.NULL_CELL_CODE]),this._whitespaceCell=T.CellData.fromCharData([0,E.WHITESPACE_CELL_CHAR,E.WHITESPACE_CELL_WIDTH,E.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new g.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new c.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(v){return v?(this._nullCell.fg=v.fg,this._nullCell.bg=v.bg,this._nullCell.extended=v.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new h.ExtendedAttrs),this._nullCell}getWhitespaceCell(v){return v?(this._whitespaceCell.fg=v.fg,this._whitespaceCell.bg=v.bg,this._whitespaceCell.extended=v.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new h.ExtendedAttrs),this._whitespaceCell}getBlankLine(v,S){return new b.BufferLine(this._bufferService.cols,this.getNullCell(v),S)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const v=this.ybase+this.y-this.ydisp;return v>=0&&v<this._rows}_getCorrectBufferLength(v){if(!this._hasScrollback)return v;const S=v+this._optionsService.rawOptions.scrollback;return S>o.MAX_BUFFER_SIZE?o.MAX_BUFFER_SIZE:S}fillViewportRows(v){if(this.lines.length===0){v===void 0&&(v=b.DEFAULT_ATTR_DATA);let S=this._rows;for(;S--;)this.lines.push(this.getBlankLine(v))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new c.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(v,S){const x=this.getNullCell(b.DEFAULT_ATTR_DATA);let k=0;const A=this._getCorrectBufferLength(S);if(A>this.lines.maxLength&&(this.lines.maxLength=A),this.lines.length>0){if(this._cols<v)for(let D=0;D<this.lines.length;D++)k+=+this.lines.get(D).resize(v,x);let O=0;if(this._rows<S)for(let D=this._rows;D<S;D++)this.lines.length<S+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new b.BufferLine(v,x)):this.ybase>0&&this.lines.length<=this.ybase+this.y+O+1?(this.ybase--,O++,this.ydisp>0&&this.ydisp--):this.lines.push(new b.BufferLine(v,x)));else for(let D=this._rows;D>S;D--)this.lines.length>S+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(A<this.lines.maxLength){const D=this.lines.length-A;D>0&&(this.lines.trimStart(D),this.ybase=Math.max(this.ybase-D,0),this.ydisp=Math.max(this.ydisp-D,0),this.savedY=Math.max(this.savedY-D,0)),this.lines.maxLength=A}this.x=Math.min(this.x,v-1),this.y=Math.min(this.y,S-1),O&&(this.y+=O),this.savedX=Math.min(this.savedX,v-1),this.scrollTop=0}if(this.scrollBottom=S-1,this._isReflowEnabled&&(this._reflow(v,S),this._cols>v))for(let O=0;O<this.lines.length;O++)k+=+this.lines.get(O).resize(v,x);this._cols=v,this._rows=S,this._memoryCleanupQueue.clear(),k>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let v=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,v=!1);let S=0;for(;this._memoryCleanupPosition<this.lines.length;)if(S+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),S>100)return!0;return v}get _isReflowEnabled(){const v=this._optionsService.rawOptions.windowsPty;return v&&v.buildNumber?this._hasScrollback&&v.backend==="conpty"&&v.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(v,S){this._cols!==v&&(v>this._cols?this._reflowLarger(v,S):this._reflowSmaller(v,S))}_reflowLarger(v,S){const x=(0,y.reflowLargerGetLinesToRemove)(this.lines,this._cols,v,this.ybase+this.y,this.getNullCell(b.DEFAULT_ATTR_DATA));if(x.length>0){const k=(0,y.reflowLargerCreateNewLayout)(this.lines,x);(0,y.reflowLargerApplyNewLayout)(this.lines,k.layout),this._reflowLargerAdjustViewport(v,S,k.countRemoved)}}_reflowLargerAdjustViewport(v,S,x){const k=this.getNullCell(b.DEFAULT_ATTR_DATA);let A=x;for(;A-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<S&&this.lines.push(new b.BufferLine(v,k))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-x,0)}_reflowSmaller(v,S){const x=this.getNullCell(b.DEFAULT_ATTR_DATA),k=[];let A=0;for(let O=this.lines.length-1;O>=0;O--){let D=this.lines.get(O);if(!D||!D.isWrapped&&D.getTrimmedLength()<=v)continue;const N=[D];for(;D.isWrapped&&O>0;)D=this.lines.get(--O),N.unshift(D);const L=this.ybase+this.y;if(L>=O&&L<O+N.length)continue;const F=N[N.length-1].getTrimmedLength(),I=(0,y.reflowSmallerGetNewLineLengths)(N,this._cols,v),z=I.length-N.length;let W;W=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+z):Math.max(0,this.lines.length-this.lines.maxLength+z);const q=[];for(let U=0;U<z;U++){const $=this.getBlankLine(b.DEFAULT_ATTR_DATA,!0);q.push($)}q.length>0&&(k.push({start:O+N.length+A,newLines:q}),A+=q.length),N.push(...q);let Y=I.length-1,K=I[Y];K===0&&(Y--,K=I[Y]);let Q=N.length-z-1,H=F;for(;Q>=0;){const U=Math.min(H,K);if(N[Y]===void 0)break;if(N[Y].copyCellsFrom(N[Q],H-U,K-U,U,!0),K-=U,K===0&&(Y--,K=I[Y]),H-=U,H===0){Q--;const $=Math.max(Q,0);H=(0,y.getWrappedLineTrimmedLength)(N,$,this._cols)}}for(let U=0;U<N.length;U++)I[U]<v&&N[U].setCell(I[U],x);let M=z-W;for(;M-- >0;)this.ybase===0?this.y<S-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+A)-S&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+z,this.ybase+S-1)}if(k.length>0){const O=[],D=[];for(let Y=0;Y<this.lines.length;Y++)D.push(this.lines.get(Y));const N=this.lines.length;let L=N-1,F=0,I=k[F];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+A);let z=0;for(let Y=Math.min(this.lines.maxLength-1,N+A-1);Y>=0;Y--)if(I&&I.start>L+z){for(let K=I.newLines.length-1;K>=0;K--)this.lines.set(Y--,I.newLines[K]);Y++,O.push({index:L+1,amount:I.newLines.length}),z+=I.newLines.length,I=k[++F]}else this.lines.set(Y,D[L--]);let W=0;for(let Y=O.length-1;Y>=0;Y--)O[Y].index+=W,this.lines.onInsertEmitter.fire(O[Y]),W+=O[Y].amount;const q=Math.max(0,N+A-this.lines.maxLength);q>0&&this.lines.onTrimEmitter.fire(q)}}translateBufferLineToString(v,S,x=0,k){const A=this.lines.get(v);return A?A.translateToString(S,x,k):""}getWrappedRangeForLine(v){let S=v,x=v;for(;S>0&&this.lines.get(S).isWrapped;)S--;for(;x+1<this.lines.length&&this.lines.get(x+1).isWrapped;)x++;return{first:S,last:x}}setupTabStops(v){for(v!=null?this.tabs[v]||(v=this.prevStop(v)):(this.tabs={},v=0);v<this._cols;v+=this._optionsService.rawOptions.tabStopWidth)this.tabs[v]=!0}prevStop(v){for(v==null&&(v=this.x);!this.tabs[--v]&&v>0;);return v>=this._cols?this._cols-1:v<0?0:v}nextStop(v){for(v==null&&(v=this.x);!this.tabs[++v]&&v<this._cols;);return v>=this._cols?this._cols-1:v<0?0:v}clearMarkers(v){this._isClearing=!0;for(let S=0;S<this.markers.length;S++)this.markers[S].line===v&&(this.markers[S].dispose(),this.markers.splice(S--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let v=0;v<this.markers.length;v++)this.markers[v].dispose(),this.markers.splice(v--,1);this._isClearing=!1}addMarker(v){const S=new m.Marker(v);return this.markers.push(S),S.register(this.lines.onTrim((x=>{S.line-=x,S.line<0&&S.dispose()}))),S.register(this.lines.onInsert((x=>{S.line>=x.index&&(S.line+=x.amount)}))),S.register(this.lines.onDelete((x=>{S.line>=x.index&&S.line<x.index+x.amount&&S.dispose(),S.line>x.index&&(S.line-=x.amount)}))),S.register(S.onDispose((()=>this._removeMarker(S)))),S}_removeMarker(v){this._isClearing||this.markers.splice(this.markers.indexOf(v),1)}}},8437:(d,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferLine=o.DEFAULT_ATTR_DATA=void 0;const c=l(3734),g=l(511),h=l(643),b=l(482);o.DEFAULT_ATTR_DATA=Object.freeze(new c.AttributeData);let y=0;class T{constructor(m,_,v=!1){this.isWrapped=v,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*m);const S=_||g.CellData.fromCharData([0,h.NULL_CELL_CHAR,h.NULL_CELL_WIDTH,h.NULL_CELL_CODE]);for(let x=0;x<m;++x)this.setCell(x,S);this.length=m}get(m){const _=this._data[3*m+0],v=2097151&_;return[this._data[3*m+1],2097152&_?this._combined[m]:v?(0,b.stringFromCodePoint)(v):"",_>>22,2097152&_?this._combined[m].charCodeAt(this._combined[m].length-1):v]}set(m,_){this._data[3*m+1]=_[h.CHAR_DATA_ATTR_INDEX],_[h.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[m]=_[1],this._data[3*m+0]=2097152|m|_[h.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*m+0]=_[h.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|_[h.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(m){return this._data[3*m+0]>>22}hasWidth(m){return 12582912&this._data[3*m+0]}getFg(m){return this._data[3*m+1]}getBg(m){return this._data[3*m+2]}hasContent(m){return 4194303&this._data[3*m+0]}getCodePoint(m){const _=this._data[3*m+0];return 2097152&_?this._combined[m].charCodeAt(this._combined[m].length-1):2097151&_}isCombined(m){return 2097152&this._data[3*m+0]}getString(m){const _=this._data[3*m+0];return 2097152&_?this._combined[m]:2097151&_?(0,b.stringFromCodePoint)(2097151&_):""}isProtected(m){return 536870912&this._data[3*m+2]}loadCell(m,_){return y=3*m,_.content=this._data[y+0],_.fg=this._data[y+1],_.bg=this._data[y+2],2097152&_.content&&(_.combinedData=this._combined[m]),268435456&_.bg&&(_.extended=this._extendedAttrs[m]),_}setCell(m,_){2097152&_.content&&(this._combined[m]=_.combinedData),268435456&_.bg&&(this._extendedAttrs[m]=_.extended),this._data[3*m+0]=_.content,this._data[3*m+1]=_.fg,this._data[3*m+2]=_.bg}setCellFromCodepoint(m,_,v,S){268435456&S.bg&&(this._extendedAttrs[m]=S.extended),this._data[3*m+0]=_|v<<22,this._data[3*m+1]=S.fg,this._data[3*m+2]=S.bg}addCodepointToCell(m,_,v){let S=this._data[3*m+0];2097152&S?this._combined[m]+=(0,b.stringFromCodePoint)(_):2097151&S?(this._combined[m]=(0,b.stringFromCodePoint)(2097151&S)+(0,b.stringFromCodePoint)(_),S&=-2097152,S|=2097152):S=_|4194304,v&&(S&=-12582913,S|=v<<22),this._data[3*m+0]=S}insertCells(m,_,v){if((m%=this.length)&&this.getWidth(m-1)===2&&this.setCellFromCodepoint(m-1,0,1,v),_<this.length-m){const S=new g.CellData;for(let x=this.length-m-_-1;x>=0;--x)this.setCell(m+_+x,this.loadCell(m+x,S));for(let x=0;x<_;++x)this.setCell(m+x,v)}else for(let S=m;S<this.length;++S)this.setCell(S,v);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,v)}deleteCells(m,_,v){if(m%=this.length,_<this.length-m){const S=new g.CellData;for(let x=0;x<this.length-m-_;++x)this.setCell(m+x,this.loadCell(m+_+x,S));for(let x=this.length-_;x<this.length;++x)this.setCell(x,v)}else for(let S=m;S<this.length;++S)this.setCell(S,v);m&&this.getWidth(m-1)===2&&this.setCellFromCodepoint(m-1,0,1,v),this.getWidth(m)!==0||this.hasContent(m)||this.setCellFromCodepoint(m,0,1,v)}replaceCells(m,_,v,S=!1){if(S)for(m&&this.getWidth(m-1)===2&&!this.isProtected(m-1)&&this.setCellFromCodepoint(m-1,0,1,v),_<this.length&&this.getWidth(_-1)===2&&!this.isProtected(_)&&this.setCellFromCodepoint(_,0,1,v);m<_&&m<this.length;)this.isProtected(m)||this.setCell(m,v),m++;else for(m&&this.getWidth(m-1)===2&&this.setCellFromCodepoint(m-1,0,1,v),_<this.length&&this.getWidth(_-1)===2&&this.setCellFromCodepoint(_,0,1,v);m<_&&m<this.length;)this.setCell(m++,v)}resize(m,_){if(m===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const v=3*m;if(m>this.length){if(this._data.buffer.byteLength>=4*v)this._data=new Uint32Array(this._data.buffer,0,v);else{const S=new Uint32Array(v);S.set(this._data),this._data=S}for(let S=this.length;S<m;++S)this.setCell(S,_)}else{this._data=this._data.subarray(0,v);const S=Object.keys(this._combined);for(let k=0;k<S.length;k++){const A=parseInt(S[k],10);A>=m&&delete this._combined[A]}const x=Object.keys(this._extendedAttrs);for(let k=0;k<x.length;k++){const A=parseInt(x[k],10);A>=m&&delete this._extendedAttrs[A]}}return this.length=m,4*v*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const m=new Uint32Array(this._data.length);return m.set(this._data),this._data=m,1}return 0}fill(m,_=!1){if(_)for(let v=0;v<this.length;++v)this.isProtected(v)||this.setCell(v,m);else{this._combined={},this._extendedAttrs={};for(let v=0;v<this.length;++v)this.setCell(v,m)}}copyFrom(m){this.length!==m.length?this._data=new Uint32Array(m._data):this._data.set(m._data),this.length=m.length,this._combined={};for(const _ in m._combined)this._combined[_]=m._combined[_];this._extendedAttrs={};for(const _ in m._extendedAttrs)this._extendedAttrs[_]=m._extendedAttrs[_];this.isWrapped=m.isWrapped}clone(){const m=new T(0);m._data=new Uint32Array(this._data),m.length=this.length;for(const _ in this._combined)m._combined[_]=this._combined[_];for(const _ in this._extendedAttrs)m._extendedAttrs[_]=this._extendedAttrs[_];return m.isWrapped=this.isWrapped,m}getTrimmedLength(){for(let m=this.length-1;m>=0;--m)if(4194303&this._data[3*m+0])return m+(this._data[3*m+0]>>22);return 0}getNoBgTrimmedLength(){for(let m=this.length-1;m>=0;--m)if(4194303&this._data[3*m+0]||50331648&this._data[3*m+2])return m+(this._data[3*m+0]>>22);return 0}copyCellsFrom(m,_,v,S,x){const k=m._data;if(x)for(let O=S-1;O>=0;O--){for(let D=0;D<3;D++)this._data[3*(v+O)+D]=k[3*(_+O)+D];268435456&k[3*(_+O)+2]&&(this._extendedAttrs[v+O]=m._extendedAttrs[_+O])}else for(let O=0;O<S;O++){for(let D=0;D<3;D++)this._data[3*(v+O)+D]=k[3*(_+O)+D];268435456&k[3*(_+O)+2]&&(this._extendedAttrs[v+O]=m._extendedAttrs[_+O])}const A=Object.keys(m._combined);for(let O=0;O<A.length;O++){const D=parseInt(A[O],10);D>=_&&(this._combined[D-_+v]=m._combined[D])}}translateToString(m,_,v,S){_=_??0,v=v??this.length,m&&(v=Math.min(v,this.getTrimmedLength())),S&&(S.length=0);let x="";for(;_<v;){const k=this._data[3*_+0],A=2097151&k,O=2097152&k?this._combined[_]:A?(0,b.stringFromCodePoint)(A):h.WHITESPACE_CELL_CHAR;if(x+=O,S)for(let D=0;D<O.length;++D)S.push(_);_+=k>>22||1}return S&&S.push(_),x}}o.BufferLine=T},4841:(d,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.getRangeLength=void 0,o.getRangeLength=function(l,c){if(l.start.y>l.end.y)throw new Error(`Buffer range end (${l.end.x}, ${l.end.y}) cannot be before start (${l.start.x}, ${l.start.y})`);return c*(l.end.y-l.start.y)+(l.end.x-l.start.x+1)}},4634:(d,o)=>{function l(c,g,h){if(g===c.length-1)return c[g].getTrimmedLength();const b=!c[g].hasContent(h-1)&&c[g].getWidth(h-1)===1,y=c[g+1].getWidth(0)===2;return b&&y?h-1:h}Object.defineProperty(o,"__esModule",{value:!0}),o.getWrappedLineTrimmedLength=o.reflowSmallerGetNewLineLengths=o.reflowLargerApplyNewLayout=o.reflowLargerCreateNewLayout=o.reflowLargerGetLinesToRemove=void 0,o.reflowLargerGetLinesToRemove=function(c,g,h,b,y){const T=[];for(let E=0;E<c.length-1;E++){let m=E,_=c.get(++m);if(!_.isWrapped)continue;const v=[c.get(E)];for(;m<c.length&&_.isWrapped;)v.push(_),_=c.get(++m);if(b>=E&&b<m){E+=v.length-1;continue}let S=0,x=l(v,S,g),k=1,A=0;for(;k<v.length;){const D=l(v,k,g),N=D-A,L=h-x,F=Math.min(N,L);v[S].copyCellsFrom(v[k],A,x,F,!1),x+=F,x===h&&(S++,x=0),A+=F,A===D&&(k++,A=0),x===0&&S!==0&&v[S-1].getWidth(h-1)===2&&(v[S].copyCellsFrom(v[S-1],h-1,x++,1,!1),v[S-1].setCell(h-1,y))}v[S].replaceCells(x,h,y);let O=0;for(let D=v.length-1;D>0&&(D>S||v[D].getTrimmedLength()===0);D--)O++;O>0&&(T.push(E+v.length-O),T.push(O)),E+=v.length-1}return T},o.reflowLargerCreateNewLayout=function(c,g){const h=[];let b=0,y=g[b],T=0;for(let E=0;E<c.length;E++)if(y===E){const m=g[++b];c.onDeleteEmitter.fire({index:E-T,amount:m}),E+=m-1,T+=m,y=g[++b]}else h.push(E);return{layout:h,countRemoved:T}},o.reflowLargerApplyNewLayout=function(c,g){const h=[];for(let b=0;b<g.length;b++)h.push(c.get(g[b]));for(let b=0;b<h.length;b++)c.set(b,h[b]);c.length=g.length},o.reflowSmallerGetNewLineLengths=function(c,g,h){const b=[],y=c.map(((_,v)=>l(c,v,g))).reduce(((_,v)=>_+v));let T=0,E=0,m=0;for(;m<y;){if(y-m<h){b.push(y-m);break}T+=h;const _=l(c,E,g);T>_&&(T-=_,E++);const v=c[E].getWidth(T-1)===2;v&&T--;const S=v?h-1:h;b.push(S),m+=S}return b},o.getWrappedLineTrimmedLength=l},5295:(d,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferSet=void 0;const c=l(8460),g=l(844),h=l(9092);class b extends g.Disposable{constructor(T,E){super(),this._optionsService=T,this._bufferService=E,this._onBufferActivate=this.register(new c.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.resize(this._bufferService.cols,this._bufferService.rows)))),this.register(this._optionsService.onSpecificOptionChange("tabStopWidth",(()=>this.setupTabStops())))}reset(){this._normal=new h.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new h.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(T){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(T),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(T,E){this._normal.resize(T,E),this._alt.resize(T,E),this.setupTabStops(T)}setupTabStops(T){this._normal.setupTabStops(T),this._alt.setupTabStops(T)}}o.BufferSet=b},511:(d,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CellData=void 0;const c=l(482),g=l(643),h=l(3734);class b extends h.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new h.ExtendedAttrs,this.combinedData=""}static fromCharData(T){const E=new b;return E.setFromCharData(T),E}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,c.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(T){this.fg=T[g.CHAR_DATA_ATTR_INDEX],this.bg=0;let E=!1;if(T[g.CHAR_DATA_CHAR_INDEX].length>2)E=!0;else if(T[g.CHAR_DATA_CHAR_INDEX].length===2){const m=T[g.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=m&&m<=56319){const _=T[g.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=_&&_<=57343?this.content=1024*(m-55296)+_-56320+65536|T[g.CHAR_DATA_WIDTH_INDEX]<<22:E=!0}else E=!0}else this.content=T[g.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|T[g.CHAR_DATA_WIDTH_INDEX]<<22;E&&(this.combinedData=T[g.CHAR_DATA_CHAR_INDEX],this.content=2097152|T[g.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}o.CellData=b},643:(d,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.WHITESPACE_CELL_CODE=o.WHITESPACE_CELL_WIDTH=o.WHITESPACE_CELL_CHAR=o.NULL_CELL_CODE=o.NULL_CELL_WIDTH=o.NULL_CELL_CHAR=o.CHAR_DATA_CODE_INDEX=o.CHAR_DATA_WIDTH_INDEX=o.CHAR_DATA_CHAR_INDEX=o.CHAR_DATA_ATTR_INDEX=o.DEFAULT_EXT=o.DEFAULT_ATTR=o.DEFAULT_COLOR=void 0,o.DEFAULT_COLOR=0,o.DEFAULT_ATTR=256|o.DEFAULT_COLOR<<9,o.DEFAULT_EXT=0,o.CHAR_DATA_ATTR_INDEX=0,o.CHAR_DATA_CHAR_INDEX=1,o.CHAR_DATA_WIDTH_INDEX=2,o.CHAR_DATA_CODE_INDEX=3,o.NULL_CELL_CHAR="",o.NULL_CELL_WIDTH=1,o.NULL_CELL_CODE=0,o.WHITESPACE_CELL_CHAR=" ",o.WHITESPACE_CELL_WIDTH=1,o.WHITESPACE_CELL_CODE=32},4863:(d,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Marker=void 0;const c=l(8460),g=l(844);class h{get id(){return this._id}constructor(y){this.line=y,this.isDisposed=!1,this._disposables=[],this._id=h._nextId++,this._onDispose=this.register(new c.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,g.disposeArray)(this._disposables),this._disposables.length=0)}register(y){return this._disposables.push(y),y}}o.Marker=h,h._nextId=1},7116:(d,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DEFAULT_CHARSET=o.CHARSETS=void 0,o.CHARSETS={},o.DEFAULT_CHARSET=o.CHARSETS.B,o.CHARSETS[0]={"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"°",g:"±",h:"␤",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},o.CHARSETS.A={"#":"£"},o.CHARSETS.B=void 0,o.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},o.CHARSETS.C=o.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},o.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},o.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},o.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},o.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},o.CHARSETS.E=o.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},o.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},o.CHARSETS.H=o.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},o.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(d,o)=>{var l,c,g;Object.defineProperty(o,"__esModule",{value:!0}),o.C1_ESCAPED=o.C1=o.C0=void 0,(function(h){h.NUL="\0",h.SOH="",h.STX="",h.ETX="",h.EOT="",h.ENQ="",h.ACK="",h.BEL="\x07",h.BS="\b",h.HT=" ",h.LF=`
92
- `,h.VT="\v",h.FF="\f",h.CR="\r",h.SO="",h.SI="",h.DLE="",h.DC1="",h.DC2="",h.DC3="",h.DC4="",h.NAK="",h.SYN="",h.ETB="",h.CAN="",h.EM="",h.SUB="",h.ESC="\x1B",h.FS="",h.GS="",h.RS="",h.US="",h.SP=" ",h.DEL=""})(l||(o.C0=l={})),(function(h){h.PAD="€",h.HOP="",h.BPH="‚",h.NBH="ƒ",h.IND="„",h.NEL="…",h.SSA="†",h.ESA="‡",h.HTS="ˆ",h.HTJ="‰",h.VTS="Š",h.PLD="‹",h.PLU="Œ",h.RI="",h.SS2="Ž",h.SS3="",h.DCS="",h.PU1="‘",h.PU2="’",h.STS="“",h.CCH="”",h.MW="•",h.SPA="–",h.EPA="—",h.SOS="˜",h.SGCI="™",h.SCI="š",h.CSI="›",h.ST="œ",h.OSC="",h.PM="ž",h.APC="Ÿ"})(c||(o.C1=c={})),(function(h){h.ST=`${l.ESC}\\`})(g||(o.C1_ESCAPED=g={}))},7399:(d,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.evaluateKeyboardEvent=void 0;const c=l(2584),g={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};o.evaluateKeyboardEvent=function(h,b,y,T){const E={type:0,cancel:!1,key:void 0},m=(h.shiftKey?1:0)|(h.altKey?2:0)|(h.ctrlKey?4:0)|(h.metaKey?8:0);switch(h.keyCode){case 0:h.key==="UIKeyInputUpArrow"?E.key=b?c.C0.ESC+"OA":c.C0.ESC+"[A":h.key==="UIKeyInputLeftArrow"?E.key=b?c.C0.ESC+"OD":c.C0.ESC+"[D":h.key==="UIKeyInputRightArrow"?E.key=b?c.C0.ESC+"OC":c.C0.ESC+"[C":h.key==="UIKeyInputDownArrow"&&(E.key=b?c.C0.ESC+"OB":c.C0.ESC+"[B");break;case 8:E.key=h.ctrlKey?"\b":c.C0.DEL,h.altKey&&(E.key=c.C0.ESC+E.key);break;case 9:if(h.shiftKey){E.key=c.C0.ESC+"[Z";break}E.key=c.C0.HT,E.cancel=!0;break;case 13:E.key=h.altKey?c.C0.ESC+c.C0.CR:c.C0.CR,E.cancel=!0;break;case 27:E.key=c.C0.ESC,h.altKey&&(E.key=c.C0.ESC+c.C0.ESC),E.cancel=!0;break;case 37:if(h.metaKey)break;m?(E.key=c.C0.ESC+"[1;"+(m+1)+"D",E.key===c.C0.ESC+"[1;3D"&&(E.key=c.C0.ESC+(y?"b":"[1;5D"))):E.key=b?c.C0.ESC+"OD":c.C0.ESC+"[D";break;case 39:if(h.metaKey)break;m?(E.key=c.C0.ESC+"[1;"+(m+1)+"C",E.key===c.C0.ESC+"[1;3C"&&(E.key=c.C0.ESC+(y?"f":"[1;5C"))):E.key=b?c.C0.ESC+"OC":c.C0.ESC+"[C";break;case 38:if(h.metaKey)break;m?(E.key=c.C0.ESC+"[1;"+(m+1)+"A",y||E.key!==c.C0.ESC+"[1;3A"||(E.key=c.C0.ESC+"[1;5A")):E.key=b?c.C0.ESC+"OA":c.C0.ESC+"[A";break;case 40:if(h.metaKey)break;m?(E.key=c.C0.ESC+"[1;"+(m+1)+"B",y||E.key!==c.C0.ESC+"[1;3B"||(E.key=c.C0.ESC+"[1;5B")):E.key=b?c.C0.ESC+"OB":c.C0.ESC+"[B";break;case 45:h.shiftKey||h.ctrlKey||(E.key=c.C0.ESC+"[2~");break;case 46:E.key=m?c.C0.ESC+"[3;"+(m+1)+"~":c.C0.ESC+"[3~";break;case 36:E.key=m?c.C0.ESC+"[1;"+(m+1)+"H":b?c.C0.ESC+"OH":c.C0.ESC+"[H";break;case 35:E.key=m?c.C0.ESC+"[1;"+(m+1)+"F":b?c.C0.ESC+"OF":c.C0.ESC+"[F";break;case 33:h.shiftKey?E.type=2:h.ctrlKey?E.key=c.C0.ESC+"[5;"+(m+1)+"~":E.key=c.C0.ESC+"[5~";break;case 34:h.shiftKey?E.type=3:h.ctrlKey?E.key=c.C0.ESC+"[6;"+(m+1)+"~":E.key=c.C0.ESC+"[6~";break;case 112:E.key=m?c.C0.ESC+"[1;"+(m+1)+"P":c.C0.ESC+"OP";break;case 113:E.key=m?c.C0.ESC+"[1;"+(m+1)+"Q":c.C0.ESC+"OQ";break;case 114:E.key=m?c.C0.ESC+"[1;"+(m+1)+"R":c.C0.ESC+"OR";break;case 115:E.key=m?c.C0.ESC+"[1;"+(m+1)+"S":c.C0.ESC+"OS";break;case 116:E.key=m?c.C0.ESC+"[15;"+(m+1)+"~":c.C0.ESC+"[15~";break;case 117:E.key=m?c.C0.ESC+"[17;"+(m+1)+"~":c.C0.ESC+"[17~";break;case 118:E.key=m?c.C0.ESC+"[18;"+(m+1)+"~":c.C0.ESC+"[18~";break;case 119:E.key=m?c.C0.ESC+"[19;"+(m+1)+"~":c.C0.ESC+"[19~";break;case 120:E.key=m?c.C0.ESC+"[20;"+(m+1)+"~":c.C0.ESC+"[20~";break;case 121:E.key=m?c.C0.ESC+"[21;"+(m+1)+"~":c.C0.ESC+"[21~";break;case 122:E.key=m?c.C0.ESC+"[23;"+(m+1)+"~":c.C0.ESC+"[23~";break;case 123:E.key=m?c.C0.ESC+"[24;"+(m+1)+"~":c.C0.ESC+"[24~";break;default:if(!h.ctrlKey||h.shiftKey||h.altKey||h.metaKey)if(y&&!T||!h.altKey||h.metaKey)!y||h.altKey||h.ctrlKey||h.shiftKey||!h.metaKey?h.key&&!h.ctrlKey&&!h.altKey&&!h.metaKey&&h.keyCode>=48&&h.key.length===1?E.key=h.key:h.key&&h.ctrlKey&&(h.key==="_"&&(E.key=c.C0.US),h.key==="@"&&(E.key=c.C0.NUL)):h.keyCode===65&&(E.type=1);else{const _=g[h.keyCode],v=_==null?void 0:_[h.shiftKey?1:0];if(v)E.key=c.C0.ESC+v;else if(h.keyCode>=65&&h.keyCode<=90){const S=h.ctrlKey?h.keyCode-64:h.keyCode+32;let x=String.fromCharCode(S);h.shiftKey&&(x=x.toUpperCase()),E.key=c.C0.ESC+x}else if(h.keyCode===32)E.key=c.C0.ESC+(h.ctrlKey?c.C0.NUL:" ");else if(h.key==="Dead"&&h.code.startsWith("Key")){let S=h.code.slice(3,4);h.shiftKey||(S=S.toLowerCase()),E.key=c.C0.ESC+S,E.cancel=!0}}else h.keyCode>=65&&h.keyCode<=90?E.key=String.fromCharCode(h.keyCode-64):h.keyCode===32?E.key=c.C0.NUL:h.keyCode>=51&&h.keyCode<=55?E.key=String.fromCharCode(h.keyCode-51+27):h.keyCode===56?E.key=c.C0.DEL:h.keyCode===219?E.key=c.C0.ESC:h.keyCode===220?E.key=c.C0.FS:h.keyCode===221&&(E.key=c.C0.GS)}return E}},482:(d,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Utf8ToUtf32=o.StringToUtf32=o.utf32ToString=o.stringFromCodePoint=void 0,o.stringFromCodePoint=function(l){return l>65535?(l-=65536,String.fromCharCode(55296+(l>>10))+String.fromCharCode(l%1024+56320)):String.fromCharCode(l)},o.utf32ToString=function(l,c=0,g=l.length){let h="";for(let b=c;b<g;++b){let y=l[b];y>65535?(y-=65536,h+=String.fromCharCode(55296+(y>>10))+String.fromCharCode(y%1024+56320)):h+=String.fromCharCode(y)}return h},o.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(l,c){const g=l.length;if(!g)return 0;let h=0,b=0;if(this._interim){const y=l.charCodeAt(b++);56320<=y&&y<=57343?c[h++]=1024*(this._interim-55296)+y-56320+65536:(c[h++]=this._interim,c[h++]=y),this._interim=0}for(let y=b;y<g;++y){const T=l.charCodeAt(y);if(55296<=T&&T<=56319){if(++y>=g)return this._interim=T,h;const E=l.charCodeAt(y);56320<=E&&E<=57343?c[h++]=1024*(T-55296)+E-56320+65536:(c[h++]=T,c[h++]=E)}else T!==65279&&(c[h++]=T)}return h}},o.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(l,c){const g=l.length;if(!g)return 0;let h,b,y,T,E=0,m=0,_=0;if(this.interim[0]){let x=!1,k=this.interim[0];k&=(224&k)==192?31:(240&k)==224?15:7;let A,O=0;for(;(A=63&this.interim[++O])&&O<4;)k<<=6,k|=A;const D=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,N=D-O;for(;_<N;){if(_>=g)return 0;if(A=l[_++],(192&A)!=128){_--,x=!0;break}this.interim[O++]=A,k<<=6,k|=63&A}x||(D===2?k<128?_--:c[E++]=k:D===3?k<2048||k>=55296&&k<=57343||k===65279||(c[E++]=k):k<65536||k>1114111||(c[E++]=k)),this.interim.fill(0)}const v=g-4;let S=_;for(;S<g;){for(;!(!(S<v)||128&(h=l[S])||128&(b=l[S+1])||128&(y=l[S+2])||128&(T=l[S+3]));)c[E++]=h,c[E++]=b,c[E++]=y,c[E++]=T,S+=4;if(h=l[S++],h<128)c[E++]=h;else if((224&h)==192){if(S>=g)return this.interim[0]=h,E;if(b=l[S++],(192&b)!=128){S--;continue}if(m=(31&h)<<6|63&b,m<128){S--;continue}c[E++]=m}else if((240&h)==224){if(S>=g)return this.interim[0]=h,E;if(b=l[S++],(192&b)!=128){S--;continue}if(S>=g)return this.interim[0]=h,this.interim[1]=b,E;if(y=l[S++],(192&y)!=128){S--;continue}if(m=(15&h)<<12|(63&b)<<6|63&y,m<2048||m>=55296&&m<=57343||m===65279)continue;c[E++]=m}else if((248&h)==240){if(S>=g)return this.interim[0]=h,E;if(b=l[S++],(192&b)!=128){S--;continue}if(S>=g)return this.interim[0]=h,this.interim[1]=b,E;if(y=l[S++],(192&y)!=128){S--;continue}if(S>=g)return this.interim[0]=h,this.interim[1]=b,this.interim[2]=y,E;if(T=l[S++],(192&T)!=128){S--;continue}if(m=(7&h)<<18|(63&b)<<12|(63&y)<<6|63&T,m<65536||m>1114111)continue;c[E++]=m}}return E}}},225:(d,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeV6=void 0;const c=l(1480),g=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],h=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];let b;o.UnicodeV6=class{constructor(){if(this.version="6",!b){b=new Uint8Array(65536),b.fill(1),b[0]=0,b.fill(0,1,32),b.fill(0,127,160),b.fill(2,4352,4448),b[9001]=2,b[9002]=2,b.fill(2,11904,42192),b[12351]=1,b.fill(2,44032,55204),b.fill(2,63744,64256),b.fill(2,65040,65050),b.fill(2,65072,65136),b.fill(2,65280,65377),b.fill(2,65504,65511);for(let y=0;y<g.length;++y)b.fill(0,g[y][0],g[y][1]+1)}}wcwidth(y){return y<32?0:y<127?1:y<65536?b[y]:(function(T,E){let m,_=0,v=E.length-1;if(T<E[0][0]||T>E[v][1])return!1;for(;v>=_;)if(m=_+v>>1,T>E[m][1])_=m+1;else{if(!(T<E[m][0]))return!0;v=m-1}return!1})(y,h)?0:y>=131072&&y<=196605||y>=196608&&y<=262141?2:1}charProperties(y,T){let E=this.wcwidth(y),m=E===0&&T!==0;if(m){const _=c.UnicodeService.extractWidth(T);_===0?m=!1:_>E&&(E=_)}return c.UnicodeService.createPropertyValue(0,E,m)}}},5981:(d,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.WriteBuffer=void 0;const c=l(8460),g=l(844);class h extends g.Disposable{constructor(y){super(),this._action=y,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new c.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(y,T){if(T!==void 0&&this._syncCalls>T)return void(this._syncCalls=0);if(this._pendingData+=y.length,this._writeBuffer.push(y),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let E;for(this._isSyncWriting=!0;E=this._writeBuffer.shift();){this._action(E);const m=this._callbacks.shift();m&&m()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(y,T){if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput)return this._didUserInput=!1,this._pendingData+=y.length,this._writeBuffer.push(y),this._callbacks.push(T),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=y.length,this._writeBuffer.push(y),this._callbacks.push(T)}_innerWrite(y=0,T=!0){const E=y||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const m=this._writeBuffer[this._bufferOffset],_=this._action(m,T);if(_){const S=x=>Date.now()-E>=12?setTimeout((()=>this._innerWrite(0,x))):this._innerWrite(E,x);return void _.catch((x=>(queueMicrotask((()=>{throw x})),Promise.resolve(!1)))).then(S)}const v=this._callbacks[this._bufferOffset];if(v&&v(),this._bufferOffset++,this._pendingData-=m.length,Date.now()-E>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout((()=>this._innerWrite()))):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}}o.WriteBuffer=h},5941:(d,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.toRgbString=o.parseColor=void 0;const l=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,c=/^[\da-f]+$/;function g(h,b){const y=h.toString(16),T=y.length<2?"0"+y:y;switch(b){case 4:return y[0];case 8:return T;case 12:return(T+T).slice(0,3);default:return T+T}}o.parseColor=function(h){if(!h)return;let b=h.toLowerCase();if(b.indexOf("rgb:")===0){b=b.slice(4);const y=l.exec(b);if(y){const T=y[1]?15:y[4]?255:y[7]?4095:65535;return[Math.round(parseInt(y[1]||y[4]||y[7]||y[10],16)/T*255),Math.round(parseInt(y[2]||y[5]||y[8]||y[11],16)/T*255),Math.round(parseInt(y[3]||y[6]||y[9]||y[12],16)/T*255)]}}else if(b.indexOf("#")===0&&(b=b.slice(1),c.exec(b)&&[3,6,9,12].includes(b.length))){const y=b.length/3,T=[0,0,0];for(let E=0;E<3;++E){const m=parseInt(b.slice(y*E,y*E+y),16);T[E]=y===1?m<<4:y===2?m:y===3?m>>4:m>>8}return T}},o.toRgbString=function(h,b=16){const[y,T,E]=h;return`rgb:${g(y,b)}/${g(T,b)}/${g(E,b)}`}},5770:(d,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.PAYLOAD_LIMIT=void 0,o.PAYLOAD_LIMIT=1e7},6351:(d,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DcsHandler=o.DcsParser=void 0;const c=l(482),g=l(8742),h=l(5770),b=[];o.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=b,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=b}registerHandler(T,E){this._handlers[T]===void 0&&(this._handlers[T]=[]);const m=this._handlers[T];return m.push(E),{dispose:()=>{const _=m.indexOf(E);_!==-1&&m.splice(_,1)}}}clearHandler(T){this._handlers[T]&&delete this._handlers[T]}setHandlerFallback(T){this._handlerFb=T}reset(){if(this._active.length)for(let T=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;T>=0;--T)this._active[T].unhook(!1);this._stack.paused=!1,this._active=b,this._ident=0}hook(T,E){if(this.reset(),this._ident=T,this._active=this._handlers[T]||b,this._active.length)for(let m=this._active.length-1;m>=0;m--)this._active[m].hook(E);else this._handlerFb(this._ident,"HOOK",E)}put(T,E,m){if(this._active.length)for(let _=this._active.length-1;_>=0;_--)this._active[_].put(T,E,m);else this._handlerFb(this._ident,"PUT",(0,c.utf32ToString)(T,E,m))}unhook(T,E=!0){if(this._active.length){let m=!1,_=this._active.length-1,v=!1;if(this._stack.paused&&(_=this._stack.loopPosition-1,m=E,v=this._stack.fallThrough,this._stack.paused=!1),!v&&m===!1){for(;_>=0&&(m=this._active[_].unhook(T),m!==!0);_--)if(m instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=_,this._stack.fallThrough=!1,m;_--}for(;_>=0;_--)if(m=this._active[_].unhook(!1),m instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=_,this._stack.fallThrough=!0,m}else this._handlerFb(this._ident,"UNHOOK",T);this._active=b,this._ident=0}};const y=new g.Params;y.addParam(0),o.DcsHandler=class{constructor(T){this._handler=T,this._data="",this._params=y,this._hitLimit=!1}hook(T){this._params=T.length>1||T.params[0]?T.clone():y,this._data="",this._hitLimit=!1}put(T,E,m){this._hitLimit||(this._data+=(0,c.utf32ToString)(T,E,m),this._data.length>h.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(T){let E=!1;if(this._hitLimit)E=!1;else if(T&&(E=this._handler(this._data,this._params),E instanceof Promise))return E.then((m=>(this._params=y,this._data="",this._hitLimit=!1,m)));return this._params=y,this._data="",this._hitLimit=!1,E}}},2015:(d,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.EscapeSequenceParser=o.VT500_TRANSITION_TABLE=o.TransitionTable=void 0;const c=l(844),g=l(8742),h=l(6242),b=l(6351);class y{constructor(_){this.table=new Uint8Array(_)}setDefault(_,v){this.table.fill(_<<4|v)}add(_,v,S,x){this.table[v<<8|_]=S<<4|x}addMany(_,v,S,x){for(let k=0;k<_.length;k++)this.table[v<<8|_[k]]=S<<4|x}}o.TransitionTable=y;const T=160;o.VT500_TRANSITION_TABLE=(function(){const m=new y(4095),_=Array.apply(null,Array(256)).map(((O,D)=>D)),v=(O,D)=>_.slice(O,D),S=v(32,127),x=v(0,24);x.push(25),x.push.apply(x,v(28,32));const k=v(0,14);let A;for(A in m.setDefault(1,0),m.addMany(S,0,2,0),k)m.addMany([24,26,153,154],A,3,0),m.addMany(v(128,144),A,3,0),m.addMany(v(144,152),A,3,0),m.add(156,A,0,0),m.add(27,A,11,1),m.add(157,A,4,8),m.addMany([152,158,159],A,0,7),m.add(155,A,11,3),m.add(144,A,11,9);return m.addMany(x,0,3,0),m.addMany(x,1,3,1),m.add(127,1,0,1),m.addMany(x,8,0,8),m.addMany(x,3,3,3),m.add(127,3,0,3),m.addMany(x,4,3,4),m.add(127,4,0,4),m.addMany(x,6,3,6),m.addMany(x,5,3,5),m.add(127,5,0,5),m.addMany(x,2,3,2),m.add(127,2,0,2),m.add(93,1,4,8),m.addMany(S,8,5,8),m.add(127,8,5,8),m.addMany([156,27,24,26,7],8,6,0),m.addMany(v(28,32),8,0,8),m.addMany([88,94,95],1,0,7),m.addMany(S,7,0,7),m.addMany(x,7,0,7),m.add(156,7,0,0),m.add(127,7,0,7),m.add(91,1,11,3),m.addMany(v(64,127),3,7,0),m.addMany(v(48,60),3,8,4),m.addMany([60,61,62,63],3,9,4),m.addMany(v(48,60),4,8,4),m.addMany(v(64,127),4,7,0),m.addMany([60,61,62,63],4,0,6),m.addMany(v(32,64),6,0,6),m.add(127,6,0,6),m.addMany(v(64,127),6,0,0),m.addMany(v(32,48),3,9,5),m.addMany(v(32,48),5,9,5),m.addMany(v(48,64),5,0,6),m.addMany(v(64,127),5,7,0),m.addMany(v(32,48),4,9,5),m.addMany(v(32,48),1,9,2),m.addMany(v(32,48),2,9,2),m.addMany(v(48,127),2,10,0),m.addMany(v(48,80),1,10,0),m.addMany(v(81,88),1,10,0),m.addMany([89,90,92],1,10,0),m.addMany(v(96,127),1,10,0),m.add(80,1,11,9),m.addMany(x,9,0,9),m.add(127,9,0,9),m.addMany(v(28,32),9,0,9),m.addMany(v(32,48),9,9,12),m.addMany(v(48,60),9,8,10),m.addMany([60,61,62,63],9,9,10),m.addMany(x,11,0,11),m.addMany(v(32,128),11,0,11),m.addMany(v(28,32),11,0,11),m.addMany(x,10,0,10),m.add(127,10,0,10),m.addMany(v(28,32),10,0,10),m.addMany(v(48,60),10,8,10),m.addMany([60,61,62,63],10,0,11),m.addMany(v(32,48),10,9,12),m.addMany(x,12,0,12),m.add(127,12,0,12),m.addMany(v(28,32),12,0,12),m.addMany(v(32,48),12,9,12),m.addMany(v(48,64),12,0,11),m.addMany(v(64,127),12,12,13),m.addMany(v(64,127),10,12,13),m.addMany(v(64,127),9,12,13),m.addMany(x,13,13,13),m.addMany(S,13,13,13),m.add(127,13,0,13),m.addMany([27,156,24,26],13,14,0),m.add(T,0,2,0),m.add(T,8,5,8),m.add(T,6,0,6),m.add(T,11,0,11),m.add(T,13,13,13),m})();class E extends c.Disposable{constructor(_=o.VT500_TRANSITION_TABLE){super(),this._transitions=_,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new g.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(v,S,x)=>{},this._executeHandlerFb=v=>{},this._csiHandlerFb=(v,S)=>{},this._escHandlerFb=v=>{},this._errorHandlerFb=v=>v,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,c.toDisposable)((()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)}))),this._oscParser=this.register(new h.OscParser),this._dcsParser=this.register(new b.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(_,v=[64,126]){let S=0;if(_.prefix){if(_.prefix.length>1)throw new Error("only one byte as prefix supported");if(S=_.prefix.charCodeAt(0),S&&60>S||S>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(_.intermediates){if(_.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let k=0;k<_.intermediates.length;++k){const A=_.intermediates.charCodeAt(k);if(32>A||A>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");S<<=8,S|=A}}if(_.final.length!==1)throw new Error("final must be a single byte");const x=_.final.charCodeAt(0);if(v[0]>x||x>v[1])throw new Error(`final must be in range ${v[0]} .. ${v[1]}`);return S<<=8,S|=x,S}identToString(_){const v=[];for(;_;)v.push(String.fromCharCode(255&_)),_>>=8;return v.reverse().join("")}setPrintHandler(_){this._printHandler=_}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(_,v){const S=this._identifier(_,[48,126]);this._escHandlers[S]===void 0&&(this._escHandlers[S]=[]);const x=this._escHandlers[S];return x.push(v),{dispose:()=>{const k=x.indexOf(v);k!==-1&&x.splice(k,1)}}}clearEscHandler(_){this._escHandlers[this._identifier(_,[48,126])]&&delete this._escHandlers[this._identifier(_,[48,126])]}setEscHandlerFallback(_){this._escHandlerFb=_}setExecuteHandler(_,v){this._executeHandlers[_.charCodeAt(0)]=v}clearExecuteHandler(_){this._executeHandlers[_.charCodeAt(0)]&&delete this._executeHandlers[_.charCodeAt(0)]}setExecuteHandlerFallback(_){this._executeHandlerFb=_}registerCsiHandler(_,v){const S=this._identifier(_);this._csiHandlers[S]===void 0&&(this._csiHandlers[S]=[]);const x=this._csiHandlers[S];return x.push(v),{dispose:()=>{const k=x.indexOf(v);k!==-1&&x.splice(k,1)}}}clearCsiHandler(_){this._csiHandlers[this._identifier(_)]&&delete this._csiHandlers[this._identifier(_)]}setCsiHandlerFallback(_){this._csiHandlerFb=_}registerDcsHandler(_,v){return this._dcsParser.registerHandler(this._identifier(_),v)}clearDcsHandler(_){this._dcsParser.clearHandler(this._identifier(_))}setDcsHandlerFallback(_){this._dcsParser.setHandlerFallback(_)}registerOscHandler(_,v){return this._oscParser.registerHandler(_,v)}clearOscHandler(_){this._oscParser.clearHandler(_)}setOscHandlerFallback(_){this._oscParser.setHandlerFallback(_)}setErrorHandler(_){this._errorHandler=_}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(_,v,S,x,k){this._parseStack.state=_,this._parseStack.handlers=v,this._parseStack.handlerPos=S,this._parseStack.transition=x,this._parseStack.chunkPos=k}parse(_,v,S){let x,k=0,A=0,O=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,O=this._parseStack.chunkPos+1;else{if(S===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const D=this._parseStack.handlers;let N=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(S===!1&&N>-1){for(;N>=0&&(x=D[N](this._params),x!==!0);N--)if(x instanceof Promise)return this._parseStack.handlerPos=N,x}this._parseStack.handlers=[];break;case 4:if(S===!1&&N>-1){for(;N>=0&&(x=D[N](),x!==!0);N--)if(x instanceof Promise)return this._parseStack.handlerPos=N,x}this._parseStack.handlers=[];break;case 6:if(k=_[this._parseStack.chunkPos],x=this._dcsParser.unhook(k!==24&&k!==26,S),x)return x;k===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(k=_[this._parseStack.chunkPos],x=this._oscParser.end(k!==24&&k!==26,S),x)return x;k===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,O=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let D=O;D<v;++D){switch(k=_[D],A=this._transitions.table[this.currentState<<8|(k<160?k:T)],A>>4){case 2:for(let z=D+1;;++z){if(z>=v||(k=_[z])<32||k>126&&k<T){this._printHandler(_,D,z),D=z-1;break}if(++z>=v||(k=_[z])<32||k>126&&k<T){this._printHandler(_,D,z),D=z-1;break}if(++z>=v||(k=_[z])<32||k>126&&k<T){this._printHandler(_,D,z),D=z-1;break}if(++z>=v||(k=_[z])<32||k>126&&k<T){this._printHandler(_,D,z),D=z-1;break}}break;case 3:this._executeHandlers[k]?this._executeHandlers[k]():this._executeHandlerFb(k),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:D,code:k,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const N=this._csiHandlers[this._collect<<8|k];let L=N?N.length-1:-1;for(;L>=0&&(x=N[L](this._params),x!==!0);L--)if(x instanceof Promise)return this._preserveStack(3,N,L,A,D),x;L<0&&this._csiHandlerFb(this._collect<<8|k,this._params),this.precedingJoinState=0;break;case 8:do switch(k){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(k-48)}while(++D<v&&(k=_[D])>47&&k<60);D--;break;case 9:this._collect<<=8,this._collect|=k;break;case 10:const F=this._escHandlers[this._collect<<8|k];let I=F?F.length-1:-1;for(;I>=0&&(x=F[I](),x!==!0);I--)if(x instanceof Promise)return this._preserveStack(4,F,I,A,D),x;I<0&&this._escHandlerFb(this._collect<<8|k),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|k,this._params);break;case 13:for(let z=D+1;;++z)if(z>=v||(k=_[z])===24||k===26||k===27||k>127&&k<T){this._dcsParser.put(_,D,z),D=z-1;break}break;case 14:if(x=this._dcsParser.unhook(k!==24&&k!==26),x)return this._preserveStack(6,[],0,A,D),x;k===27&&(A|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break;case 4:this._oscParser.start();break;case 5:for(let z=D+1;;z++)if(z>=v||(k=_[z])<32||k>127&&k<T){this._oscParser.put(_,D,z),D=z-1;break}break;case 6:if(x=this._oscParser.end(k!==24&&k!==26),x)return this._preserveStack(5,[],0,A,D),x;k===27&&(A|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&A}}}o.EscapeSequenceParser=E},6242:(d,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.OscHandler=o.OscParser=void 0;const c=l(5770),g=l(482),h=[];o.OscParser=class{constructor(){this._state=0,this._active=h,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(b,y){this._handlers[b]===void 0&&(this._handlers[b]=[]);const T=this._handlers[b];return T.push(y),{dispose:()=>{const E=T.indexOf(y);E!==-1&&T.splice(E,1)}}}clearHandler(b){this._handlers[b]&&delete this._handlers[b]}setHandlerFallback(b){this._handlerFb=b}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=h}reset(){if(this._state===2)for(let b=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;b>=0;--b)this._active[b].end(!1);this._stack.paused=!1,this._active=h,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||h,this._active.length)for(let b=this._active.length-1;b>=0;b--)this._active[b].start();else this._handlerFb(this._id,"START")}_put(b,y,T){if(this._active.length)for(let E=this._active.length-1;E>=0;E--)this._active[E].put(b,y,T);else this._handlerFb(this._id,"PUT",(0,g.utf32ToString)(b,y,T))}start(){this.reset(),this._state=1}put(b,y,T){if(this._state!==3){if(this._state===1)for(;y<T;){const E=b[y++];if(E===59){this._state=2,this._start();break}if(E<48||57<E)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+E-48}this._state===2&&T-y>0&&this._put(b,y,T)}}end(b,y=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let T=!1,E=this._active.length-1,m=!1;if(this._stack.paused&&(E=this._stack.loopPosition-1,T=y,m=this._stack.fallThrough,this._stack.paused=!1),!m&&T===!1){for(;E>=0&&(T=this._active[E].end(b),T!==!0);E--)if(T instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=E,this._stack.fallThrough=!1,T;E--}for(;E>=0;E--)if(T=this._active[E].end(!1),T instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=E,this._stack.fallThrough=!0,T}else this._handlerFb(this._id,"END",b);this._active=h,this._id=-1,this._state=0}}},o.OscHandler=class{constructor(b){this._handler=b,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(b,y,T){this._hitLimit||(this._data+=(0,g.utf32ToString)(b,y,T),this._data.length>c.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(b){let y=!1;if(this._hitLimit)y=!1;else if(b&&(y=this._handler(this._data),y instanceof Promise))return y.then((T=>(this._data="",this._hitLimit=!1,T)));return this._data="",this._hitLimit=!1,y}}},8742:(d,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Params=void 0;const l=2147483647;class c{static fromArray(h){const b=new c;if(!h.length)return b;for(let y=Array.isArray(h[0])?1:0;y<h.length;++y){const T=h[y];if(Array.isArray(T))for(let E=0;E<T.length;++E)b.addSubParam(T[E]);else b.addParam(T)}return b}constructor(h=32,b=32){if(this.maxLength=h,this.maxSubParamsLength=b,b>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(h),this.length=0,this._subParams=new Int32Array(b),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(h),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const h=new c(this.maxLength,this.maxSubParamsLength);return h.params.set(this.params),h.length=this.length,h._subParams.set(this._subParams),h._subParamsLength=this._subParamsLength,h._subParamsIdx.set(this._subParamsIdx),h._rejectDigits=this._rejectDigits,h._rejectSubDigits=this._rejectSubDigits,h._digitIsSub=this._digitIsSub,h}toArray(){const h=[];for(let b=0;b<this.length;++b){h.push(this.params[b]);const y=this._subParamsIdx[b]>>8,T=255&this._subParamsIdx[b];T-y>0&&h.push(Array.prototype.slice.call(this._subParams,y,T))}return h}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(h){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(h<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=h>l?l:h}}addSubParam(h){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(h<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=h>l?l:h,this._subParamsIdx[this.length-1]++}}hasSubParams(h){return(255&this._subParamsIdx[h])-(this._subParamsIdx[h]>>8)>0}getSubParams(h){const b=this._subParamsIdx[h]>>8,y=255&this._subParamsIdx[h];return y-b>0?this._subParams.subarray(b,y):null}getSubParamsAll(){const h={};for(let b=0;b<this.length;++b){const y=this._subParamsIdx[b]>>8,T=255&this._subParamsIdx[b];T-y>0&&(h[b]=this._subParams.slice(y,T))}return h}addDigit(h){let b;if(this._rejectDigits||!(b=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const y=this._digitIsSub?this._subParams:this.params,T=y[b-1];y[b-1]=~T?Math.min(10*T+h,l):h}}o.Params=c},5741:(d,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.AddonManager=void 0,o.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let l=this._addons.length-1;l>=0;l--)this._addons[l].instance.dispose()}loadAddon(l,c){const g={instance:c,dispose:c.dispose,isDisposed:!1};this._addons.push(g),c.dispose=()=>this._wrappedAddonDispose(g),c.activate(l)}_wrappedAddonDispose(l){if(l.isDisposed)return;let c=-1;for(let g=0;g<this._addons.length;g++)if(this._addons[g]===l){c=g;break}if(c===-1)throw new Error("Could not dispose an addon that has not been loaded");l.isDisposed=!0,l.dispose.apply(l.instance),this._addons.splice(c,1)}}},8771:(d,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferApiView=void 0;const c=l(3785),g=l(511);o.BufferApiView=class{constructor(h,b){this._buffer=h,this.type=b}init(h){return this._buffer=h,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(h){const b=this._buffer.lines.get(h);if(b)return new c.BufferLineApiView(b)}getNullCell(){return new g.CellData}}},3785:(d,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferLineApiView=void 0;const c=l(511);o.BufferLineApiView=class{constructor(g){this._line=g}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(g,h){if(!(g<0||g>=this._line.length))return h?(this._line.loadCell(g,h),h):this._line.loadCell(g,new c.CellData)}translateToString(g,h,b){return this._line.translateToString(g,h,b)}}},8285:(d,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferNamespaceApi=void 0;const c=l(8771),g=l(8460),h=l(844);class b extends h.Disposable{constructor(T){super(),this._core=T,this._onBufferChange=this.register(new g.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new c.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new c.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate((()=>this._onBufferChange.fire(this.active)))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}}o.BufferNamespaceApi=b},7975:(d,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ParserApi=void 0,o.ParserApi=class{constructor(l){this._core=l}registerCsiHandler(l,c){return this._core.registerCsiHandler(l,(g=>c(g.toArray())))}addCsiHandler(l,c){return this.registerCsiHandler(l,c)}registerDcsHandler(l,c){return this._core.registerDcsHandler(l,((g,h)=>c(g,h.toArray())))}addDcsHandler(l,c){return this.registerDcsHandler(l,c)}registerEscHandler(l,c){return this._core.registerEscHandler(l,c)}addEscHandler(l,c){return this.registerEscHandler(l,c)}registerOscHandler(l,c){return this._core.registerOscHandler(l,c)}addOscHandler(l,c){return this.registerOscHandler(l,c)}}},7090:(d,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeApi=void 0,o.UnicodeApi=class{constructor(l){this._core=l}register(l){this._core.unicodeService.register(l)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(l){this._core.unicodeService.activeVersion=l}}},744:function(d,o,l){var c=this&&this.__decorate||function(m,_,v,S){var x,k=arguments.length,A=k<3?_:S===null?S=Object.getOwnPropertyDescriptor(_,v):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(m,_,v,S);else for(var O=m.length-1;O>=0;O--)(x=m[O])&&(A=(k<3?x(A):k>3?x(_,v,A):x(_,v))||A);return k>3&&A&&Object.defineProperty(_,v,A),A},g=this&&this.__param||function(m,_){return function(v,S){_(v,S,m)}};Object.defineProperty(o,"__esModule",{value:!0}),o.BufferService=o.MINIMUM_ROWS=o.MINIMUM_COLS=void 0;const h=l(8460),b=l(844),y=l(5295),T=l(2585);o.MINIMUM_COLS=2,o.MINIMUM_ROWS=1;let E=o.BufferService=class extends b.Disposable{get buffer(){return this.buffers.active}constructor(m){super(),this.isUserScrolling=!1,this._onResize=this.register(new h.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new h.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(m.rawOptions.cols||0,o.MINIMUM_COLS),this.rows=Math.max(m.rawOptions.rows||0,o.MINIMUM_ROWS),this.buffers=this.register(new y.BufferSet(m,this))}resize(m,_){this.cols=m,this.rows=_,this.buffers.resize(m,_),this._onResize.fire({cols:m,rows:_})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(m,_=!1){const v=this.buffer;let S;S=this._cachedBlankLine,S&&S.length===this.cols&&S.getFg(0)===m.fg&&S.getBg(0)===m.bg||(S=v.getBlankLine(m,_),this._cachedBlankLine=S),S.isWrapped=_;const x=v.ybase+v.scrollTop,k=v.ybase+v.scrollBottom;if(v.scrollTop===0){const A=v.lines.isFull;k===v.lines.length-1?A?v.lines.recycle().copyFrom(S):v.lines.push(S.clone()):v.lines.splice(k+1,0,S.clone()),A?this.isUserScrolling&&(v.ydisp=Math.max(v.ydisp-1,0)):(v.ybase++,this.isUserScrolling||v.ydisp++)}else{const A=k-x+1;v.lines.shiftElements(x+1,A-1,-1),v.lines.set(k,S.clone())}this.isUserScrolling||(v.ydisp=v.ybase),this._onScroll.fire(v.ydisp)}scrollLines(m,_,v){const S=this.buffer;if(m<0){if(S.ydisp===0)return;this.isUserScrolling=!0}else m+S.ydisp>=S.ybase&&(this.isUserScrolling=!1);const x=S.ydisp;S.ydisp=Math.max(Math.min(S.ydisp+m,S.ybase),0),x!==S.ydisp&&(_||this._onScroll.fire(S.ydisp))}};o.BufferService=E=c([g(0,T.IOptionsService)],E)},7994:(d,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CharsetService=void 0,o.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(l){this.glevel=l,this.charset=this._charsets[l]}setgCharset(l,c){this._charsets[l]=c,this.glevel===l&&(this.charset=c)}}},1753:function(d,o,l){var c=this&&this.__decorate||function(S,x,k,A){var O,D=arguments.length,N=D<3?x:A===null?A=Object.getOwnPropertyDescriptor(x,k):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(S,x,k,A);else for(var L=S.length-1;L>=0;L--)(O=S[L])&&(N=(D<3?O(N):D>3?O(x,k,N):O(x,k))||N);return D>3&&N&&Object.defineProperty(x,k,N),N},g=this&&this.__param||function(S,x){return function(k,A){x(k,A,S)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CoreMouseService=void 0;const h=l(2585),b=l(8460),y=l(844),T={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:S=>S.button!==4&&S.action===1&&(S.ctrl=!1,S.alt=!1,S.shift=!1,!0)},VT200:{events:19,restrict:S=>S.action!==32},DRAG:{events:23,restrict:S=>S.action!==32||S.button!==3},ANY:{events:31,restrict:S=>!0}};function E(S,x){let k=(S.ctrl?16:0)|(S.shift?4:0)|(S.alt?8:0);return S.button===4?(k|=64,k|=S.action):(k|=3&S.button,4&S.button&&(k|=64),8&S.button&&(k|=128),S.action===32?k|=32:S.action!==0||x||(k|=3)),k}const m=String.fromCharCode,_={DEFAULT:S=>{const x=[E(S,!1)+32,S.col+32,S.row+32];return x[0]>255||x[1]>255||x[2]>255?"":`\x1B[M${m(x[0])}${m(x[1])}${m(x[2])}`},SGR:S=>{const x=S.action===0&&S.button!==4?"m":"M";return`\x1B[<${E(S,!0)};${S.col};${S.row}${x}`},SGR_PIXELS:S=>{const x=S.action===0&&S.button!==4?"m":"M";return`\x1B[<${E(S,!0)};${S.x};${S.y}${x}`}};let v=o.CoreMouseService=class extends y.Disposable{constructor(S,x){super(),this._bufferService=S,this._coreService=x,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new b.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const k of Object.keys(T))this.addProtocol(k,T[k]);for(const k of Object.keys(_))this.addEncoding(k,_[k]);this.reset()}addProtocol(S,x){this._protocols[S]=x}addEncoding(S,x){this._encodings[S]=x}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(S){if(!this._protocols[S])throw new Error(`unknown protocol "${S}"`);this._activeProtocol=S,this._onProtocolChange.fire(this._protocols[S].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(S){if(!this._encodings[S])throw new Error(`unknown encoding "${S}"`);this._activeEncoding=S}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(S){if(S.col<0||S.col>=this._bufferService.cols||S.row<0||S.row>=this._bufferService.rows||S.button===4&&S.action===32||S.button===3&&S.action!==32||S.button!==4&&(S.action===2||S.action===3)||(S.col++,S.row++,S.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,S,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(S))return!1;const x=this._encodings[this._activeEncoding](S);return x&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(x):this._coreService.triggerDataEvent(x,!0)),this._lastEvent=S,!0}explainEvents(S){return{down:!!(1&S),up:!!(2&S),drag:!!(4&S),move:!!(8&S),wheel:!!(16&S)}}_equalEvents(S,x,k){if(k){if(S.x!==x.x||S.y!==x.y)return!1}else if(S.col!==x.col||S.row!==x.row)return!1;return S.button===x.button&&S.action===x.action&&S.ctrl===x.ctrl&&S.alt===x.alt&&S.shift===x.shift}};o.CoreMouseService=v=c([g(0,h.IBufferService),g(1,h.ICoreService)],v)},6975:function(d,o,l){var c=this&&this.__decorate||function(v,S,x,k){var A,O=arguments.length,D=O<3?S:k===null?k=Object.getOwnPropertyDescriptor(S,x):k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(v,S,x,k);else for(var N=v.length-1;N>=0;N--)(A=v[N])&&(D=(O<3?A(D):O>3?A(S,x,D):A(S,x))||D);return O>3&&D&&Object.defineProperty(S,x,D),D},g=this&&this.__param||function(v,S){return function(x,k){S(x,k,v)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CoreService=void 0;const h=l(1439),b=l(8460),y=l(844),T=l(2585),E=Object.freeze({insertMode:!1}),m=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let _=o.CoreService=class extends y.Disposable{constructor(v,S,x){super(),this._bufferService=v,this._logService=S,this._optionsService=x,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new b.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new b.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new b.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new b.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,h.clone)(E),this.decPrivateModes=(0,h.clone)(m)}reset(){this.modes=(0,h.clone)(E),this.decPrivateModes=(0,h.clone)(m)}triggerDataEvent(v,S=!1){if(this._optionsService.rawOptions.disableStdin)return;const x=this._bufferService.buffer;S&&this._optionsService.rawOptions.scrollOnUserInput&&x.ybase!==x.ydisp&&this._onRequestScrollToBottom.fire(),S&&this._onUserInput.fire(),this._logService.debug(`sending data "${v}"`,(()=>v.split("").map((k=>k.charCodeAt(0))))),this._onData.fire(v)}triggerBinaryEvent(v){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${v}"`,(()=>v.split("").map((S=>S.charCodeAt(0))))),this._onBinary.fire(v))}};o.CoreService=_=c([g(0,T.IBufferService),g(1,T.ILogService),g(2,T.IOptionsService)],_)},9074:(d,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DecorationService=void 0;const c=l(8055),g=l(8460),h=l(844),b=l(6106);let y=0,T=0;class E extends h.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new b.SortedList((v=>v==null?void 0:v.marker.line)),this._onDecorationRegistered=this.register(new g.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new g.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,h.toDisposable)((()=>this.reset())))}registerDecoration(v){if(v.marker.isDisposed)return;const S=new m(v);if(S){const x=S.marker.onDispose((()=>S.dispose()));S.onDispose((()=>{S&&(this._decorations.delete(S)&&this._onDecorationRemoved.fire(S),x.dispose())})),this._decorations.insert(S),this._onDecorationRegistered.fire(S)}return S}reset(){for(const v of this._decorations.values())v.dispose();this._decorations.clear()}*getDecorationsAtCell(v,S,x){let k=0,A=0;for(const O of this._decorations.getKeyIterator(S))k=O.options.x??0,A=k+(O.options.width??1),v>=k&&v<A&&(!x||(O.options.layer??"bottom")===x)&&(yield O)}forEachDecorationAtCell(v,S,x,k){this._decorations.forEachByKey(S,(A=>{y=A.options.x??0,T=y+(A.options.width??1),v>=y&&v<T&&(!x||(A.options.layer??"bottom")===x)&&k(A)}))}}o.DecorationService=E;class m extends h.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=c.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=c.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(v){super(),this.options=v,this.onRenderEmitter=this.register(new g.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new g.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=v.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(d,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.InstantiationService=o.ServiceCollection=void 0;const c=l(2585),g=l(8343);class h{constructor(...y){this._entries=new Map;for(const[T,E]of y)this.set(T,E)}set(y,T){const E=this._entries.get(y);return this._entries.set(y,T),E}forEach(y){for(const[T,E]of this._entries.entries())y(T,E)}has(y){return this._entries.has(y)}get(y){return this._entries.get(y)}}o.ServiceCollection=h,o.InstantiationService=class{constructor(){this._services=new h,this._services.set(c.IInstantiationService,this)}setService(b,y){this._services.set(b,y)}getService(b){return this._services.get(b)}createInstance(b,...y){const T=(0,g.getServiceDependencies)(b).sort(((_,v)=>_.index-v.index)),E=[];for(const _ of T){const v=this._services.get(_.id);if(!v)throw new Error(`[createInstance] ${b.name} depends on UNKNOWN service ${_.id}.`);E.push(v)}const m=T.length>0?T[0].index:y.length;if(y.length!==m)throw new Error(`[createInstance] First service dependency of ${b.name} at position ${m+1} conflicts with ${y.length} static arguments`);return new b(...y,...E)}}},7866:function(d,o,l){var c=this&&this.__decorate||function(m,_,v,S){var x,k=arguments.length,A=k<3?_:S===null?S=Object.getOwnPropertyDescriptor(_,v):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(m,_,v,S);else for(var O=m.length-1;O>=0;O--)(x=m[O])&&(A=(k<3?x(A):k>3?x(_,v,A):x(_,v))||A);return k>3&&A&&Object.defineProperty(_,v,A),A},g=this&&this.__param||function(m,_){return function(v,S){_(v,S,m)}};Object.defineProperty(o,"__esModule",{value:!0}),o.traceCall=o.setTraceLogger=o.LogService=void 0;const h=l(844),b=l(2585),y={trace:b.LogLevelEnum.TRACE,debug:b.LogLevelEnum.DEBUG,info:b.LogLevelEnum.INFO,warn:b.LogLevelEnum.WARN,error:b.LogLevelEnum.ERROR,off:b.LogLevelEnum.OFF};let T,E=o.LogService=class extends h.Disposable{get logLevel(){return this._logLevel}constructor(m){super(),this._optionsService=m,this._logLevel=b.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),T=this}_updateLogLevel(){this._logLevel=y[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(m){for(let _=0;_<m.length;_++)typeof m[_]=="function"&&(m[_]=m[_]())}_log(m,_,v){this._evalLazyOptionalParams(v),m.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+_,...v)}trace(m,..._){var v;this._logLevel<=b.LogLevelEnum.TRACE&&this._log(((v=this._optionsService.options.logger)==null?void 0:v.trace.bind(this._optionsService.options.logger))??console.log,m,_)}debug(m,..._){var v;this._logLevel<=b.LogLevelEnum.DEBUG&&this._log(((v=this._optionsService.options.logger)==null?void 0:v.debug.bind(this._optionsService.options.logger))??console.log,m,_)}info(m,..._){var v;this._logLevel<=b.LogLevelEnum.INFO&&this._log(((v=this._optionsService.options.logger)==null?void 0:v.info.bind(this._optionsService.options.logger))??console.info,m,_)}warn(m,..._){var v;this._logLevel<=b.LogLevelEnum.WARN&&this._log(((v=this._optionsService.options.logger)==null?void 0:v.warn.bind(this._optionsService.options.logger))??console.warn,m,_)}error(m,..._){var v;this._logLevel<=b.LogLevelEnum.ERROR&&this._log(((v=this._optionsService.options.logger)==null?void 0:v.error.bind(this._optionsService.options.logger))??console.error,m,_)}};o.LogService=E=c([g(0,b.IOptionsService)],E),o.setTraceLogger=function(m){T=m},o.traceCall=function(m,_,v){if(typeof v.value!="function")throw new Error("not supported");const S=v.value;v.value=function(...x){if(T.logLevel!==b.LogLevelEnum.TRACE)return S.apply(this,x);T.trace(`GlyphRenderer#${S.name}(${x.map((A=>JSON.stringify(A))).join(", ")})`);const k=S.apply(this,x);return T.trace(`GlyphRenderer#${S.name} return`,k),k}}},7302:(d,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.OptionsService=o.DEFAULT_OPTIONS=void 0;const c=l(8460),g=l(844),h=l(6114);o.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rescaleOverlappingGlyphs:!1,rightClickSelectsWord:h.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const b=["normal","bold","100","200","300","400","500","600","700","800","900"];class y extends g.Disposable{constructor(E){super(),this._onOptionChange=this.register(new c.EventEmitter),this.onOptionChange=this._onOptionChange.event;const m={...o.DEFAULT_OPTIONS};for(const _ in E)if(_ in m)try{const v=E[_];m[_]=this._sanitizeAndValidateOption(_,v)}catch(v){console.error(v)}this.rawOptions=m,this.options={...m},this._setupOptions(),this.register((0,g.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(E,m){return this.onOptionChange((_=>{_===E&&m(this.rawOptions[E])}))}onMultipleOptionChange(E,m){return this.onOptionChange((_=>{E.indexOf(_)!==-1&&m()}))}_setupOptions(){const E=_=>{if(!(_ in o.DEFAULT_OPTIONS))throw new Error(`No option with key "${_}"`);return this.rawOptions[_]},m=(_,v)=>{if(!(_ in o.DEFAULT_OPTIONS))throw new Error(`No option with key "${_}"`);v=this._sanitizeAndValidateOption(_,v),this.rawOptions[_]!==v&&(this.rawOptions[_]=v,this._onOptionChange.fire(_))};for(const _ in this.rawOptions){const v={get:E.bind(this,_),set:m.bind(this,_)};Object.defineProperty(this.options,_,v)}}_sanitizeAndValidateOption(E,m){switch(E){case"cursorStyle":if(m||(m=o.DEFAULT_OPTIONS[E]),!(function(_){return _==="block"||_==="underline"||_==="bar"})(m))throw new Error(`"${m}" is not a valid value for ${E}`);break;case"wordSeparator":m||(m=o.DEFAULT_OPTIONS[E]);break;case"fontWeight":case"fontWeightBold":if(typeof m=="number"&&1<=m&&m<=1e3)break;m=b.includes(m)?m:o.DEFAULT_OPTIONS[E];break;case"cursorWidth":m=Math.floor(m);case"lineHeight":case"tabStopWidth":if(m<1)throw new Error(`${E} cannot be less than 1, value: ${m}`);break;case"minimumContrastRatio":m=Math.max(1,Math.min(21,Math.round(10*m)/10));break;case"scrollback":if((m=Math.min(m,4294967295))<0)throw new Error(`${E} cannot be less than 0, value: ${m}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(m<=0)throw new Error(`${E} cannot be less than or equal to 0, value: ${m}`);break;case"rows":case"cols":if(!m&&m!==0)throw new Error(`${E} must be numeric, value: ${m}`);break;case"windowsPty":m=m??{}}return m}}o.OptionsService=y},2660:function(d,o,l){var c=this&&this.__decorate||function(y,T,E,m){var _,v=arguments.length,S=v<3?T:m===null?m=Object.getOwnPropertyDescriptor(T,E):m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(y,T,E,m);else for(var x=y.length-1;x>=0;x--)(_=y[x])&&(S=(v<3?_(S):v>3?_(T,E,S):_(T,E))||S);return v>3&&S&&Object.defineProperty(T,E,S),S},g=this&&this.__param||function(y,T){return function(E,m){T(E,m,y)}};Object.defineProperty(o,"__esModule",{value:!0}),o.OscLinkService=void 0;const h=l(2585);let b=o.OscLinkService=class{constructor(y){this._bufferService=y,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(y){const T=this._bufferService.buffer;if(y.id===void 0){const x=T.addMarker(T.ybase+T.y),k={data:y,id:this._nextId++,lines:[x]};return x.onDispose((()=>this._removeMarkerFromLink(k,x))),this._dataByLinkId.set(k.id,k),k.id}const E=y,m=this._getEntryIdKey(E),_=this._entriesWithId.get(m);if(_)return this.addLineToLink(_.id,T.ybase+T.y),_.id;const v=T.addMarker(T.ybase+T.y),S={id:this._nextId++,key:this._getEntryIdKey(E),data:E,lines:[v]};return v.onDispose((()=>this._removeMarkerFromLink(S,v))),this._entriesWithId.set(S.key,S),this._dataByLinkId.set(S.id,S),S.id}addLineToLink(y,T){const E=this._dataByLinkId.get(y);if(E&&E.lines.every((m=>m.line!==T))){const m=this._bufferService.buffer.addMarker(T);E.lines.push(m),m.onDispose((()=>this._removeMarkerFromLink(E,m)))}}getLinkData(y){var T;return(T=this._dataByLinkId.get(y))==null?void 0:T.data}_getEntryIdKey(y){return`${y.id};;${y.uri}`}_removeMarkerFromLink(y,T){const E=y.lines.indexOf(T);E!==-1&&(y.lines.splice(E,1),y.lines.length===0&&(y.data.id!==void 0&&this._entriesWithId.delete(y.key),this._dataByLinkId.delete(y.id)))}};o.OscLinkService=b=c([g(0,h.IBufferService)],b)},8343:(d,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.createDecorator=o.getServiceDependencies=o.serviceRegistry=void 0;const l="di$target",c="di$dependencies";o.serviceRegistry=new Map,o.getServiceDependencies=function(g){return g[c]||[]},o.createDecorator=function(g){if(o.serviceRegistry.has(g))return o.serviceRegistry.get(g);const h=function(b,y,T){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(E,m,_){m[l]===m?m[c].push({id:E,index:_}):(m[c]=[{id:E,index:_}],m[l]=m)})(h,b,T)};return h.toString=()=>g,o.serviceRegistry.set(g,h),h}},2585:(d,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.IDecorationService=o.IUnicodeService=o.IOscLinkService=o.IOptionsService=o.ILogService=o.LogLevelEnum=o.IInstantiationService=o.ICharsetService=o.ICoreService=o.ICoreMouseService=o.IBufferService=void 0;const c=l(8343);var g;o.IBufferService=(0,c.createDecorator)("BufferService"),o.ICoreMouseService=(0,c.createDecorator)("CoreMouseService"),o.ICoreService=(0,c.createDecorator)("CoreService"),o.ICharsetService=(0,c.createDecorator)("CharsetService"),o.IInstantiationService=(0,c.createDecorator)("InstantiationService"),(function(h){h[h.TRACE=0]="TRACE",h[h.DEBUG=1]="DEBUG",h[h.INFO=2]="INFO",h[h.WARN=3]="WARN",h[h.ERROR=4]="ERROR",h[h.OFF=5]="OFF"})(g||(o.LogLevelEnum=g={})),o.ILogService=(0,c.createDecorator)("LogService"),o.IOptionsService=(0,c.createDecorator)("OptionsService"),o.IOscLinkService=(0,c.createDecorator)("OscLinkService"),o.IUnicodeService=(0,c.createDecorator)("UnicodeService"),o.IDecorationService=(0,c.createDecorator)("DecorationService")},1480:(d,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeService=void 0;const c=l(8460),g=l(225);class h{static extractShouldJoin(y){return(1&y)!=0}static extractWidth(y){return y>>1&3}static extractCharKind(y){return y>>3}static createPropertyValue(y,T,E=!1){return(16777215&y)<<3|(3&T)<<1|(E?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new c.EventEmitter,this.onChange=this._onChange.event;const y=new g.UnicodeV6;this.register(y),this._active=y.version,this._activeProvider=y}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(y){if(!this._providers[y])throw new Error(`unknown Unicode version "${y}"`);this._active=y,this._activeProvider=this._providers[y],this._onChange.fire(y)}register(y){this._providers[y.version]=y}wcwidth(y){return this._activeProvider.wcwidth(y)}getStringCellWidth(y){let T=0,E=0;const m=y.length;for(let _=0;_<m;++_){let v=y.charCodeAt(_);if(55296<=v&&v<=56319){if(++_>=m)return T+this.wcwidth(v);const k=y.charCodeAt(_);56320<=k&&k<=57343?v=1024*(v-55296)+k-56320+65536:T+=this.wcwidth(k)}const S=this.charProperties(v,E);let x=h.extractWidth(S);h.extractShouldJoin(S)&&(x-=h.extractWidth(E)),T+=x,E=S}return T}charProperties(y,T){return this._activeProvider.charProperties(y,T)}}o.UnicodeService=h}},s={};function u(d){var o=s[d];if(o!==void 0)return o.exports;var l=s[d]={exports:{}};return i[d].call(l.exports,l,l.exports,u),l.exports}var p={};return(()=>{var d=p;Object.defineProperty(d,"__esModule",{value:!0}),d.Terminal=void 0;const o=u(9042),l=u(3236),c=u(844),g=u(5741),h=u(8285),b=u(7975),y=u(7090),T=["cols","rows"];class E extends c.Disposable{constructor(_){super(),this._core=this.register(new l.Terminal(_)),this._addonManager=this.register(new g.AddonManager),this._publicOptions={...this._core.options};const v=x=>this._core.options[x],S=(x,k)=>{this._checkReadonlyOptions(x),this._core.options[x]=k};for(const x in this._core.options){const k={get:v.bind(this,x),set:S.bind(this,x)};Object.defineProperty(this._publicOptions,x,k)}}_checkReadonlyOptions(_){if(T.includes(_))throw new Error(`Option "${_}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new b.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new y.UnicodeApi(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this.register(new h.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const _=this._core.coreService.decPrivateModes;let v="none";switch(this._core.coreMouseService.activeProtocol){case"X10":v="x10";break;case"VT200":v="vt200";break;case"DRAG":v="drag";break;case"ANY":v="any"}return{applicationCursorKeysMode:_.applicationCursorKeys,applicationKeypadMode:_.applicationKeypad,bracketedPasteMode:_.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:v,originMode:_.origin,reverseWraparoundMode:_.reverseWraparound,sendFocusMode:_.sendFocus,wraparoundMode:_.wraparound}}get options(){return this._publicOptions}set options(_){for(const v in _)this._publicOptions[v]=_[v]}blur(){this._core.blur()}focus(){this._core.focus()}input(_,v=!0){this._core.input(_,v)}resize(_,v){this._verifyIntegers(_,v),this._core.resize(_,v)}open(_){this._core.open(_)}attachCustomKeyEventHandler(_){this._core.attachCustomKeyEventHandler(_)}attachCustomWheelEventHandler(_){this._core.attachCustomWheelEventHandler(_)}registerLinkProvider(_){return this._core.registerLinkProvider(_)}registerCharacterJoiner(_){return this._checkProposedApi(),this._core.registerCharacterJoiner(_)}deregisterCharacterJoiner(_){this._checkProposedApi(),this._core.deregisterCharacterJoiner(_)}registerMarker(_=0){return this._verifyIntegers(_),this._core.registerMarker(_)}registerDecoration(_){return this._checkProposedApi(),this._verifyPositiveIntegers(_.x??0,_.width??0,_.height??0),this._core.registerDecoration(_)}hasSelection(){return this._core.hasSelection()}select(_,v,S){this._verifyIntegers(_,v,S),this._core.select(_,v,S)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(_,v){this._verifyIntegers(_,v),this._core.selectLines(_,v)}dispose(){super.dispose()}scrollLines(_){this._verifyIntegers(_),this._core.scrollLines(_)}scrollPages(_){this._verifyIntegers(_),this._core.scrollPages(_)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(_){this._verifyIntegers(_),this._core.scrollToLine(_)}clear(){this._core.clear()}write(_,v){this._core.write(_,v)}writeln(_,v){this._core.write(_),this._core.write(`\r
93
- `,v)}paste(_){this._core.paste(_)}refresh(_,v){this._verifyIntegers(_,v),this._core.refresh(_,v)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(_){this._addonManager.loadAddon(this,_)}static get strings(){return o}_verifyIntegers(..._){for(const v of _)if(v===1/0||isNaN(v)||v%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(..._){for(const v of _)if(v&&(v===1/0||isNaN(v)||v%1!=0||v<0))throw new Error("This API only accepts positive integers")}}d.Terminal=E})(),p})()))})(sf)),sf.exports}var Yw=qw(),af={exports:{}},d1;function Gw(){return d1||(d1=1,(function(e,t){(function(i,s){e.exports=s()})(self,(()=>(()=>{var i={};return(()=>{var s=i;Object.defineProperty(s,"__esModule",{value:!0}),s.FitAddon=void 0,s.FitAddon=class{activate(u){this._terminal=u}dispose(){}fit(){const u=this.proposeDimensions();if(!u||!this._terminal||isNaN(u.cols)||isNaN(u.rows))return;const p=this._terminal._core;this._terminal.rows===u.rows&&this._terminal.cols===u.cols||(p._renderService.clear(),this._terminal.resize(u.cols,u.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const u=this._terminal._core,p=u._renderService.dimensions;if(p.css.cell.width===0||p.css.cell.height===0)return;const d=this._terminal.options.scrollback===0?0:u.viewport.scrollBarWidth,o=window.getComputedStyle(this._terminal.element.parentElement),l=parseInt(o.getPropertyValue("height")),c=Math.max(0,parseInt(o.getPropertyValue("width"))),g=window.getComputedStyle(this._terminal.element),h=l-(parseInt(g.getPropertyValue("padding-top"))+parseInt(g.getPropertyValue("padding-bottom"))),b=c-(parseInt(g.getPropertyValue("padding-right"))+parseInt(g.getPropertyValue("padding-left")))-d;return{cols:Math.max(2,Math.floor(b/p.css.cell.width)),rows:Math.max(1,Math.floor(h/p.css.cell.height))}}}})(),i})()))})(af)),af.exports}var Kw=Gw(),of={exports:{}},f1;function Vw(){return f1||(f1=1,(function(e,t){(function(i,s){e.exports=s()})(self,(()=>(()=>{var i={965:(d,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.GlyphRenderer=void 0;const c=l(374),g=l(509),h=l(855),b=l(859),y=l(381),T=11,E=T*Float32Array.BYTES_PER_ELEMENT;let m,_=0,v=0,S=0;class x extends b.Disposable{constructor(A,O,D,N){super(),this._terminal=A,this._gl=O,this._dimensions=D,this._optionsService=N,this._activeBuffer=0,this._vertices={count:0,attributes:new Float32Array(0),attributesBuffers:[new Float32Array(0),new Float32Array(0)]};const L=this._gl;g.TextureAtlas.maxAtlasPages===void 0&&(g.TextureAtlas.maxAtlasPages=Math.min(32,(0,c.throwIfFalsy)(L.getParameter(L.MAX_TEXTURE_IMAGE_UNITS))),g.TextureAtlas.maxTextureSize=(0,c.throwIfFalsy)(L.getParameter(L.MAX_TEXTURE_SIZE))),this._program=(0,c.throwIfFalsy)((0,y.createProgram)(L,`#version 300 es
94
- layout (location = 0) in vec2 a_unitquad;
95
- layout (location = 1) in vec2 a_cellpos;
96
- layout (location = 2) in vec2 a_offset;
97
- layout (location = 3) in vec2 a_size;
98
- layout (location = 4) in float a_texpage;
99
- layout (location = 5) in vec2 a_texcoord;
100
- layout (location = 6) in vec2 a_texsize;
101
-
102
- uniform mat4 u_projection;
103
- uniform vec2 u_resolution;
104
-
105
- out vec2 v_texcoord;
106
- flat out int v_texpage;
107
-
108
- void main() {
109
- vec2 zeroToOne = (a_offset / u_resolution) + a_cellpos + (a_unitquad * a_size);
110
- gl_Position = u_projection * vec4(zeroToOne, 0.0, 1.0);
111
- v_texpage = int(a_texpage);
112
- v_texcoord = a_texcoord + a_unitquad * a_texsize;
113
- }`,(function(Y){let K="";for(let Q=1;Q<Y;Q++)K+=` else if (v_texpage == ${Q}) { outColor = texture(u_texture[${Q}], v_texcoord); }`;return`#version 300 es
114
- precision lowp float;
115
-
116
- in vec2 v_texcoord;
117
- flat in int v_texpage;
118
-
119
- uniform sampler2D u_texture[${Y}];
120
-
121
- out vec4 outColor;
122
-
123
- void main() {
124
- if (v_texpage == 0) {
125
- outColor = texture(u_texture[0], v_texcoord);
126
- } ${K}
127
- }`})(g.TextureAtlas.maxAtlasPages))),this.register((0,b.toDisposable)((()=>L.deleteProgram(this._program)))),this._projectionLocation=(0,c.throwIfFalsy)(L.getUniformLocation(this._program,"u_projection")),this._resolutionLocation=(0,c.throwIfFalsy)(L.getUniformLocation(this._program,"u_resolution")),this._textureLocation=(0,c.throwIfFalsy)(L.getUniformLocation(this._program,"u_texture")),this._vertexArrayObject=L.createVertexArray(),L.bindVertexArray(this._vertexArrayObject);const F=new Float32Array([0,0,1,0,0,1,1,1]),I=L.createBuffer();this.register((0,b.toDisposable)((()=>L.deleteBuffer(I)))),L.bindBuffer(L.ARRAY_BUFFER,I),L.bufferData(L.ARRAY_BUFFER,F,L.STATIC_DRAW),L.enableVertexAttribArray(0),L.vertexAttribPointer(0,2,this._gl.FLOAT,!1,0,0);const z=new Uint8Array([0,1,2,3]),W=L.createBuffer();this.register((0,b.toDisposable)((()=>L.deleteBuffer(W)))),L.bindBuffer(L.ELEMENT_ARRAY_BUFFER,W),L.bufferData(L.ELEMENT_ARRAY_BUFFER,z,L.STATIC_DRAW),this._attributesBuffer=(0,c.throwIfFalsy)(L.createBuffer()),this.register((0,b.toDisposable)((()=>L.deleteBuffer(this._attributesBuffer)))),L.bindBuffer(L.ARRAY_BUFFER,this._attributesBuffer),L.enableVertexAttribArray(2),L.vertexAttribPointer(2,2,L.FLOAT,!1,E,0),L.vertexAttribDivisor(2,1),L.enableVertexAttribArray(3),L.vertexAttribPointer(3,2,L.FLOAT,!1,E,2*Float32Array.BYTES_PER_ELEMENT),L.vertexAttribDivisor(3,1),L.enableVertexAttribArray(4),L.vertexAttribPointer(4,1,L.FLOAT,!1,E,4*Float32Array.BYTES_PER_ELEMENT),L.vertexAttribDivisor(4,1),L.enableVertexAttribArray(5),L.vertexAttribPointer(5,2,L.FLOAT,!1,E,5*Float32Array.BYTES_PER_ELEMENT),L.vertexAttribDivisor(5,1),L.enableVertexAttribArray(6),L.vertexAttribPointer(6,2,L.FLOAT,!1,E,7*Float32Array.BYTES_PER_ELEMENT),L.vertexAttribDivisor(6,1),L.enableVertexAttribArray(1),L.vertexAttribPointer(1,2,L.FLOAT,!1,E,9*Float32Array.BYTES_PER_ELEMENT),L.vertexAttribDivisor(1,1),L.useProgram(this._program);const q=new Int32Array(g.TextureAtlas.maxAtlasPages);for(let Y=0;Y<g.TextureAtlas.maxAtlasPages;Y++)q[Y]=Y;L.uniform1iv(this._textureLocation,q),L.uniformMatrix4fv(this._projectionLocation,!1,y.PROJECTION_MATRIX),this._atlasTextures=[];for(let Y=0;Y<g.TextureAtlas.maxAtlasPages;Y++){const K=new y.GLTexture((0,c.throwIfFalsy)(L.createTexture()));this.register((0,b.toDisposable)((()=>L.deleteTexture(K.texture)))),L.activeTexture(L.TEXTURE0+Y),L.bindTexture(L.TEXTURE_2D,K.texture),L.texParameteri(L.TEXTURE_2D,L.TEXTURE_WRAP_S,L.CLAMP_TO_EDGE),L.texParameteri(L.TEXTURE_2D,L.TEXTURE_WRAP_T,L.CLAMP_TO_EDGE),L.texImage2D(L.TEXTURE_2D,0,L.RGBA,1,1,0,L.RGBA,L.UNSIGNED_BYTE,new Uint8Array([255,0,0,255])),this._atlasTextures[Y]=K}L.enable(L.BLEND),L.blendFunc(L.SRC_ALPHA,L.ONE_MINUS_SRC_ALPHA),this.handleResize()}beginFrame(){return!this._atlas||this._atlas.beginFrame()}updateCell(A,O,D,N,L,F,I,z,W){this._updateCell(this._vertices.attributes,A,O,D,N,L,F,I,z,W)}_updateCell(A,O,D,N,L,F,I,z,W,q){_=(D*this._terminal.cols+O)*T,N!==h.NULL_CELL_CODE&&N!==void 0?this._atlas&&(m=z&&z.length>1?this._atlas.getRasterizedGlyphCombinedChar(z,L,F,I,!1):this._atlas.getRasterizedGlyph(N,L,F,I,!1),v=Math.floor((this._dimensions.device.cell.width-this._dimensions.device.char.width)/2),L!==q&&m.offset.x>v?(S=m.offset.x-v,A[_]=-(m.offset.x-S)+this._dimensions.device.char.left,A[_+1]=-m.offset.y+this._dimensions.device.char.top,A[_+2]=(m.size.x-S)/this._dimensions.device.canvas.width,A[_+3]=m.size.y/this._dimensions.device.canvas.height,A[_+4]=m.texturePage,A[_+5]=m.texturePositionClipSpace.x+S/this._atlas.pages[m.texturePage].canvas.width,A[_+6]=m.texturePositionClipSpace.y,A[_+7]=m.sizeClipSpace.x-S/this._atlas.pages[m.texturePage].canvas.width,A[_+8]=m.sizeClipSpace.y):(A[_]=-m.offset.x+this._dimensions.device.char.left,A[_+1]=-m.offset.y+this._dimensions.device.char.top,A[_+2]=m.size.x/this._dimensions.device.canvas.width,A[_+3]=m.size.y/this._dimensions.device.canvas.height,A[_+4]=m.texturePage,A[_+5]=m.texturePositionClipSpace.x,A[_+6]=m.texturePositionClipSpace.y,A[_+7]=m.sizeClipSpace.x,A[_+8]=m.sizeClipSpace.y),this._optionsService.rawOptions.rescaleOverlappingGlyphs&&(0,c.allowRescaling)(N,W,m.size.x,this._dimensions.device.cell.width)&&(A[_+2]=(this._dimensions.device.cell.width-1)/this._dimensions.device.canvas.width)):A.fill(0,_,_+T-1-2)}clear(){const A=this._terminal,O=A.cols*A.rows*T;this._vertices.count!==O?this._vertices.attributes=new Float32Array(O):this._vertices.attributes.fill(0);let D=0;for(;D<this._vertices.attributesBuffers.length;D++)this._vertices.count!==O?this._vertices.attributesBuffers[D]=new Float32Array(O):this._vertices.attributesBuffers[D].fill(0);this._vertices.count=O,D=0;for(let N=0;N<A.rows;N++)for(let L=0;L<A.cols;L++)this._vertices.attributes[D+9]=L/A.cols,this._vertices.attributes[D+10]=N/A.rows,D+=T}handleResize(){const A=this._gl;A.useProgram(this._program),A.viewport(0,0,A.canvas.width,A.canvas.height),A.uniform2f(this._resolutionLocation,A.canvas.width,A.canvas.height),this.clear()}render(A){if(!this._atlas)return;const O=this._gl;O.useProgram(this._program),O.bindVertexArray(this._vertexArrayObject),this._activeBuffer=(this._activeBuffer+1)%2;const D=this._vertices.attributesBuffers[this._activeBuffer];let N=0;for(let L=0;L<A.lineLengths.length;L++){const F=L*this._terminal.cols*T,I=this._vertices.attributes.subarray(F,F+A.lineLengths[L]*T);D.set(I,N),N+=I.length}O.bindBuffer(O.ARRAY_BUFFER,this._attributesBuffer),O.bufferData(O.ARRAY_BUFFER,D.subarray(0,N),O.STREAM_DRAW);for(let L=0;L<this._atlas.pages.length;L++)this._atlas.pages[L].version!==this._atlasTextures[L].version&&this._bindAtlasPageTexture(O,this._atlas,L);O.drawElementsInstanced(O.TRIANGLE_STRIP,4,O.UNSIGNED_BYTE,0,N/T)}setAtlas(A){this._atlas=A;for(const O of this._atlasTextures)O.version=-1}_bindAtlasPageTexture(A,O,D){A.activeTexture(A.TEXTURE0+D),A.bindTexture(A.TEXTURE_2D,this._atlasTextures[D].texture),A.texParameteri(A.TEXTURE_2D,A.TEXTURE_WRAP_S,A.CLAMP_TO_EDGE),A.texParameteri(A.TEXTURE_2D,A.TEXTURE_WRAP_T,A.CLAMP_TO_EDGE),A.texImage2D(A.TEXTURE_2D,0,A.RGBA,A.RGBA,A.UNSIGNED_BYTE,O.pages[D].canvas),A.generateMipmap(A.TEXTURE_2D),this._atlasTextures[D].version=O.pages[D].version}setDimensions(A){this._dimensions=A}}o.GlyphRenderer=x},742:(d,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.RectangleRenderer=void 0;const c=l(374),g=l(859),h=l(310),b=l(381),y=8*Float32Array.BYTES_PER_ELEMENT;class T{constructor(){this.attributes=new Float32Array(160),this.count=0}}let E=0,m=0,_=0,v=0,S=0,x=0,k=0;class A extends g.Disposable{constructor(D,N,L,F){super(),this._terminal=D,this._gl=N,this._dimensions=L,this._themeService=F,this._vertices=new T,this._verticesCursor=new T;const I=this._gl;this._program=(0,c.throwIfFalsy)((0,b.createProgram)(I,`#version 300 es
128
- layout (location = 0) in vec2 a_position;
129
- layout (location = 1) in vec2 a_size;
130
- layout (location = 2) in vec4 a_color;
131
- layout (location = 3) in vec2 a_unitquad;
132
-
133
- uniform mat4 u_projection;
134
-
135
- out vec4 v_color;
136
-
137
- void main() {
138
- vec2 zeroToOne = a_position + (a_unitquad * a_size);
139
- gl_Position = u_projection * vec4(zeroToOne, 0.0, 1.0);
140
- v_color = a_color;
141
- }`,`#version 300 es
142
- precision lowp float;
143
-
144
- in vec4 v_color;
145
-
146
- out vec4 outColor;
147
-
148
- void main() {
149
- outColor = v_color;
150
- }`)),this.register((0,g.toDisposable)((()=>I.deleteProgram(this._program)))),this._projectionLocation=(0,c.throwIfFalsy)(I.getUniformLocation(this._program,"u_projection")),this._vertexArrayObject=I.createVertexArray(),I.bindVertexArray(this._vertexArrayObject);const z=new Float32Array([0,0,1,0,0,1,1,1]),W=I.createBuffer();this.register((0,g.toDisposable)((()=>I.deleteBuffer(W)))),I.bindBuffer(I.ARRAY_BUFFER,W),I.bufferData(I.ARRAY_BUFFER,z,I.STATIC_DRAW),I.enableVertexAttribArray(3),I.vertexAttribPointer(3,2,this._gl.FLOAT,!1,0,0);const q=new Uint8Array([0,1,2,3]),Y=I.createBuffer();this.register((0,g.toDisposable)((()=>I.deleteBuffer(Y)))),I.bindBuffer(I.ELEMENT_ARRAY_BUFFER,Y),I.bufferData(I.ELEMENT_ARRAY_BUFFER,q,I.STATIC_DRAW),this._attributesBuffer=(0,c.throwIfFalsy)(I.createBuffer()),this.register((0,g.toDisposable)((()=>I.deleteBuffer(this._attributesBuffer)))),I.bindBuffer(I.ARRAY_BUFFER,this._attributesBuffer),I.enableVertexAttribArray(0),I.vertexAttribPointer(0,2,I.FLOAT,!1,y,0),I.vertexAttribDivisor(0,1),I.enableVertexAttribArray(1),I.vertexAttribPointer(1,2,I.FLOAT,!1,y,2*Float32Array.BYTES_PER_ELEMENT),I.vertexAttribDivisor(1,1),I.enableVertexAttribArray(2),I.vertexAttribPointer(2,4,I.FLOAT,!1,y,4*Float32Array.BYTES_PER_ELEMENT),I.vertexAttribDivisor(2,1),this._updateCachedColors(F.colors),this.register(this._themeService.onChangeColors((K=>{this._updateCachedColors(K),this._updateViewportRectangle()})))}renderBackgrounds(){this._renderVertices(this._vertices)}renderCursor(){this._renderVertices(this._verticesCursor)}_renderVertices(D){const N=this._gl;N.useProgram(this._program),N.bindVertexArray(this._vertexArrayObject),N.uniformMatrix4fv(this._projectionLocation,!1,b.PROJECTION_MATRIX),N.bindBuffer(N.ARRAY_BUFFER,this._attributesBuffer),N.bufferData(N.ARRAY_BUFFER,D.attributes,N.DYNAMIC_DRAW),N.drawElementsInstanced(this._gl.TRIANGLE_STRIP,4,N.UNSIGNED_BYTE,0,D.count)}handleResize(){this._updateViewportRectangle()}setDimensions(D){this._dimensions=D}_updateCachedColors(D){this._bgFloat=this._colorToFloat32Array(D.background),this._cursorFloat=this._colorToFloat32Array(D.cursor)}_updateViewportRectangle(){this._addRectangleFloat(this._vertices.attributes,0,0,0,this._terminal.cols*this._dimensions.device.cell.width,this._terminal.rows*this._dimensions.device.cell.height,this._bgFloat)}updateBackgrounds(D){const N=this._terminal,L=this._vertices;let F,I,z,W,q,Y,K,Q,H,M,U,$=1;for(F=0;F<N.rows;F++){for(z=-1,W=0,q=0,Y=!1,I=0;I<N.cols;I++)K=(F*N.cols+I)*h.RENDER_MODEL_INDICIES_PER_CELL,Q=D.cells[K+h.RENDER_MODEL_BG_OFFSET],H=D.cells[K+h.RENDER_MODEL_FG_OFFSET],M=!!(67108864&H),(Q!==W||H!==q&&(Y||M))&&((W!==0||Y&&q!==0)&&(U=8*$++,this._updateRectangle(L,U,q,W,z,I,F)),z=I,W=Q,q=H,Y=M);(W!==0||Y&&q!==0)&&(U=8*$++,this._updateRectangle(L,U,q,W,z,N.cols,F))}L.count=$}updateCursor(D){const N=this._verticesCursor,L=D.cursor;if(!L||L.style==="block")return void(N.count=0);let F,I=0;L.style!=="bar"&&L.style!=="outline"||(F=8*I++,this._addRectangleFloat(N.attributes,F,L.x*this._dimensions.device.cell.width,L.y*this._dimensions.device.cell.height,L.style==="bar"?L.dpr*L.cursorWidth:L.dpr,this._dimensions.device.cell.height,this._cursorFloat)),L.style!=="underline"&&L.style!=="outline"||(F=8*I++,this._addRectangleFloat(N.attributes,F,L.x*this._dimensions.device.cell.width,(L.y+1)*this._dimensions.device.cell.height-L.dpr,L.width*this._dimensions.device.cell.width,L.dpr,this._cursorFloat)),L.style==="outline"&&(F=8*I++,this._addRectangleFloat(N.attributes,F,L.x*this._dimensions.device.cell.width,L.y*this._dimensions.device.cell.height,L.width*this._dimensions.device.cell.width,L.dpr,this._cursorFloat),F=8*I++,this._addRectangleFloat(N.attributes,F,(L.x+L.width)*this._dimensions.device.cell.width-L.dpr,L.y*this._dimensions.device.cell.height,L.dpr,this._dimensions.device.cell.height,this._cursorFloat)),N.count=I}_updateRectangle(D,N,L,F,I,z,W){if(67108864&L)switch(50331648&L){case 16777216:case 33554432:E=this._themeService.colors.ansi[255&L].rgba;break;case 50331648:E=(16777215&L)<<8;break;default:E=this._themeService.colors.foreground.rgba}else switch(50331648&F){case 16777216:case 33554432:E=this._themeService.colors.ansi[255&F].rgba;break;case 50331648:E=(16777215&F)<<8;break;default:E=this._themeService.colors.background.rgba}D.attributes.length<N+4&&(D.attributes=(0,b.expandFloat32Array)(D.attributes,this._terminal.rows*this._terminal.cols*8)),m=I*this._dimensions.device.cell.width,_=W*this._dimensions.device.cell.height,v=(E>>24&255)/255,S=(E>>16&255)/255,x=(E>>8&255)/255,k=1,this._addRectangle(D.attributes,N,m,_,(z-I)*this._dimensions.device.cell.width,this._dimensions.device.cell.height,v,S,x,k)}_addRectangle(D,N,L,F,I,z,W,q,Y,K){D[N]=L/this._dimensions.device.canvas.width,D[N+1]=F/this._dimensions.device.canvas.height,D[N+2]=I/this._dimensions.device.canvas.width,D[N+3]=z/this._dimensions.device.canvas.height,D[N+4]=W,D[N+5]=q,D[N+6]=Y,D[N+7]=K}_addRectangleFloat(D,N,L,F,I,z,W){D[N]=L/this._dimensions.device.canvas.width,D[N+1]=F/this._dimensions.device.canvas.height,D[N+2]=I/this._dimensions.device.canvas.width,D[N+3]=z/this._dimensions.device.canvas.height,D[N+4]=W[0],D[N+5]=W[1],D[N+6]=W[2],D[N+7]=W[3]}_colorToFloat32Array(D){return new Float32Array([(D.rgba>>24&255)/255,(D.rgba>>16&255)/255,(D.rgba>>8&255)/255,(255&D.rgba)/255])}}o.RectangleRenderer=A},310:(d,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.RenderModel=o.COMBINED_CHAR_BIT_MASK=o.RENDER_MODEL_EXT_OFFSET=o.RENDER_MODEL_FG_OFFSET=o.RENDER_MODEL_BG_OFFSET=o.RENDER_MODEL_INDICIES_PER_CELL=void 0;const c=l(296);o.RENDER_MODEL_INDICIES_PER_CELL=4,o.RENDER_MODEL_BG_OFFSET=1,o.RENDER_MODEL_FG_OFFSET=2,o.RENDER_MODEL_EXT_OFFSET=3,o.COMBINED_CHAR_BIT_MASK=2147483648,o.RenderModel=class{constructor(){this.cells=new Uint32Array(0),this.lineLengths=new Uint32Array(0),this.selection=(0,c.createSelectionRenderModel)()}resize(g,h){const b=g*h*o.RENDER_MODEL_INDICIES_PER_CELL;b!==this.cells.length&&(this.cells=new Uint32Array(b),this.lineLengths=new Uint32Array(h))}clear(){this.cells.fill(0,0),this.lineLengths.fill(0,0)}}},666:(d,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.JoinedCellData=o.WebglRenderer=void 0;const c=l(820),g=l(274),h=l(627),b=l(457),y=l(56),T=l(374),E=l(345),m=l(859),_=l(147),v=l(782),S=l(855),x=l(965),k=l(742),A=l(310),O=l(733);class D extends m.Disposable{constructor(I,z,W,q,Y,K,Q,H,M){super(),this._terminal=I,this._characterJoinerService=z,this._charSizeService=W,this._coreBrowserService=q,this._coreService=Y,this._decorationService=K,this._optionsService=Q,this._themeService=H,this._cursorBlinkStateManager=new m.MutableDisposable,this._charAtlasDisposable=this.register(new m.MutableDisposable),this._observerDisposable=this.register(new m.MutableDisposable),this._model=new A.RenderModel,this._workCell=new v.CellData,this._workCell2=new v.CellData,this._rectangleRenderer=this.register(new m.MutableDisposable),this._glyphRenderer=this.register(new m.MutableDisposable),this._onChangeTextureAtlas=this.register(new E.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new E.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this.register(new E.EventEmitter),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onRequestRedraw=this.register(new E.EventEmitter),this.onRequestRedraw=this._onRequestRedraw.event,this._onContextLoss=this.register(new E.EventEmitter),this.onContextLoss=this._onContextLoss.event,this.register(this._themeService.onChangeColors((()=>this._handleColorChange()))),this._cellColorResolver=new g.CellColorResolver(this._terminal,this._optionsService,this._model.selection,this._decorationService,this._coreBrowserService,this._themeService),this._core=this._terminal._core,this._renderLayers=[new O.LinkRenderLayer(this._core.screenElement,2,this._terminal,this._core.linkifier,this._coreBrowserService,Q,this._themeService)],this.dimensions=(0,T.createRenderDimensions)(),this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._updateCursorBlink(),this.register(Q.onOptionChange((()=>this._handleOptionsChanged()))),this._canvas=this._coreBrowserService.mainDocument.createElement("canvas");const U={antialias:!1,depth:!1,preserveDrawingBuffer:M};if(this._gl=this._canvas.getContext("webgl2",U),!this._gl)throw new Error("WebGL2 not supported "+this._gl);this.register((0,c.addDisposableDomListener)(this._canvas,"webglcontextlost",($=>{console.log("webglcontextlost event received"),$.preventDefault(),this._contextRestorationTimeout=setTimeout((()=>{this._contextRestorationTimeout=void 0,console.warn("webgl context not restored; firing onContextLoss"),this._onContextLoss.fire($)}),3e3)}))),this.register((0,c.addDisposableDomListener)(this._canvas,"webglcontextrestored",($=>{console.warn("webglcontextrestored event received"),clearTimeout(this._contextRestorationTimeout),this._contextRestorationTimeout=void 0,(0,h.removeTerminalFromCache)(this._terminal),this._initializeWebGLState(),this._requestRedrawViewport()}))),this._observerDisposable.value=(0,y.observeDevicePixelDimensions)(this._canvas,this._coreBrowserService.window,(($,j)=>this._setCanvasDevicePixelDimensions($,j))),this.register(this._coreBrowserService.onWindowChange(($=>{this._observerDisposable.value=(0,y.observeDevicePixelDimensions)(this._canvas,$,((j,re)=>this._setCanvasDevicePixelDimensions(j,re)))}))),this._core.screenElement.appendChild(this._canvas),[this._rectangleRenderer.value,this._glyphRenderer.value]=this._initializeWebGLState(),this._isAttached=this._coreBrowserService.window.document.body.contains(this._core.screenElement),this.register((0,m.toDisposable)((()=>{var $;for(const j of this._renderLayers)j.dispose();($=this._canvas.parentElement)==null||$.removeChild(this._canvas),(0,h.removeTerminalFromCache)(this._terminal)})))}get textureAtlas(){var I;return(I=this._charAtlas)==null?void 0:I.pages[0].canvas}_handleColorChange(){this._refreshCharAtlas(),this._clearModel(!0)}handleDevicePixelRatioChange(){this._devicePixelRatio!==this._coreBrowserService.dpr&&(this._devicePixelRatio=this._coreBrowserService.dpr,this.handleResize(this._terminal.cols,this._terminal.rows))}handleResize(I,z){var W,q,Y,K;this._updateDimensions(),this._model.resize(this._terminal.cols,this._terminal.rows);for(const Q of this._renderLayers)Q.resize(this._terminal,this.dimensions);this._canvas.width=this.dimensions.device.canvas.width,this._canvas.height=this.dimensions.device.canvas.height,this._canvas.style.width=`${this.dimensions.css.canvas.width}px`,this._canvas.style.height=`${this.dimensions.css.canvas.height}px`,this._core.screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._core.screenElement.style.height=`${this.dimensions.css.canvas.height}px`,(W=this._rectangleRenderer.value)==null||W.setDimensions(this.dimensions),(q=this._rectangleRenderer.value)==null||q.handleResize(),(Y=this._glyphRenderer.value)==null||Y.setDimensions(this.dimensions),(K=this._glyphRenderer.value)==null||K.handleResize(),this._refreshCharAtlas(),this._clearModel(!1)}handleCharSizeChanged(){this.handleResize(this._terminal.cols,this._terminal.rows)}handleBlur(){var I;for(const z of this._renderLayers)z.handleBlur(this._terminal);(I=this._cursorBlinkStateManager.value)==null||I.pause(),this._requestRedrawViewport()}handleFocus(){var I;for(const z of this._renderLayers)z.handleFocus(this._terminal);(I=this._cursorBlinkStateManager.value)==null||I.resume(),this._requestRedrawViewport()}handleSelectionChanged(I,z,W){for(const q of this._renderLayers)q.handleSelectionChanged(this._terminal,I,z,W);this._model.selection.update(this._core,I,z,W),this._requestRedrawViewport()}handleCursorMove(){var I;for(const z of this._renderLayers)z.handleCursorMove(this._terminal);(I=this._cursorBlinkStateManager.value)==null||I.restartBlinkAnimation()}_handleOptionsChanged(){this._updateDimensions(),this._refreshCharAtlas(),this._updateCursorBlink()}_initializeWebGLState(){return this._rectangleRenderer.value=new k.RectangleRenderer(this._terminal,this._gl,this.dimensions,this._themeService),this._glyphRenderer.value=new x.GlyphRenderer(this._terminal,this._gl,this.dimensions,this._optionsService),this.handleCharSizeChanged(),[this._rectangleRenderer.value,this._glyphRenderer.value]}_refreshCharAtlas(){var z;if(this.dimensions.device.char.width<=0&&this.dimensions.device.char.height<=0)return void(this._isAttached=!1);const I=(0,h.acquireTextureAtlas)(this._terminal,this._optionsService.rawOptions,this._themeService.colors,this.dimensions.device.cell.width,this.dimensions.device.cell.height,this.dimensions.device.char.width,this.dimensions.device.char.height,this._coreBrowserService.dpr);this._charAtlas!==I&&(this._onChangeTextureAtlas.fire(I.pages[0].canvas),this._charAtlasDisposable.value=(0,m.getDisposeArrayDisposable)([(0,E.forwardEvent)(I.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),(0,E.forwardEvent)(I.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)])),this._charAtlas=I,this._charAtlas.warmUp(),(z=this._glyphRenderer.value)==null||z.setAtlas(this._charAtlas)}_clearModel(I){var z;this._model.clear(),I&&((z=this._glyphRenderer.value)==null||z.clear())}clearTextureAtlas(){var I;(I=this._charAtlas)==null||I.clearTexture(),this._clearModel(!0),this._requestRedrawViewport()}clear(){var I;this._clearModel(!0);for(const z of this._renderLayers)z.reset(this._terminal);(I=this._cursorBlinkStateManager.value)==null||I.restartBlinkAnimation(),this._updateCursorBlink()}registerCharacterJoiner(I){return-1}deregisterCharacterJoiner(I){return!1}renderRows(I,z){if(!this._isAttached){if(!(this._coreBrowserService.window.document.body.contains(this._core.screenElement)&&this._charSizeService.width&&this._charSizeService.height))return;this._updateDimensions(),this._refreshCharAtlas(),this._isAttached=!0}for(const W of this._renderLayers)W.handleGridChanged(this._terminal,I,z);this._glyphRenderer.value&&this._rectangleRenderer.value&&(this._glyphRenderer.value.beginFrame()?(this._clearModel(!0),this._updateModel(0,this._terminal.rows-1)):this._updateModel(I,z),this._rectangleRenderer.value.renderBackgrounds(),this._glyphRenderer.value.render(this._model),this._cursorBlinkStateManager.value&&!this._cursorBlinkStateManager.value.isCursorVisible||this._rectangleRenderer.value.renderCursor())}_updateCursorBlink(){this._terminal.options.cursorBlink?this._cursorBlinkStateManager.value=new b.CursorBlinkStateManager((()=>{this._requestRedrawCursor()}),this._coreBrowserService):this._cursorBlinkStateManager.clear(),this._requestRedrawCursor()}_updateModel(I,z){const W=this._core;let q,Y,K,Q,H,M,U,$,j,re,_e,ue,ee,G,le=this._workCell;I=L(I,W.rows-1,0),z=L(z,W.rows-1,0);const ae=this._terminal.buffer.active.baseY+this._terminal.buffer.active.cursorY,xe=ae-W.buffer.ydisp,ye=Math.min(this._terminal.buffer.active.cursorX,W.cols-1);let Pe=-1;const Ne=this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden&&(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible);this._model.cursor=void 0;let nt=!1;for(Y=I;Y<=z;Y++)for(K=Y+W.buffer.ydisp,Q=W.buffer.lines.get(K),this._model.lineLengths[Y]=0,H=this._characterJoinerService.getJoinedCharacters(K),ee=0;ee<W.cols;ee++)if(q=this._cellColorResolver.result.bg,Q.loadCell(ee,le),ee===0&&(q=this._cellColorResolver.result.bg),M=!1,U=ee,H.length>0&&ee===H[0][0]&&(M=!0,$=H.shift(),le=new N(le,Q.translateToString(!0,$[0],$[1]),$[1]-$[0]),U=$[1]-1),j=le.getChars(),re=le.getCode(),ue=(Y*W.cols+ee)*A.RENDER_MODEL_INDICIES_PER_CELL,this._cellColorResolver.resolve(le,ee,K,this.dimensions.device.cell.width),Ne&&K===ae&&(ee===ye&&(this._model.cursor={x:ye,y:xe,width:le.getWidth(),style:this._coreBrowserService.isFocused?W.options.cursorStyle||"block":W.options.cursorInactiveStyle,cursorWidth:W.options.cursorWidth,dpr:this._devicePixelRatio},Pe=ye+le.getWidth()-1),ee>=ye&&ee<=Pe&&(this._coreBrowserService.isFocused&&(W.options.cursorStyle||"block")==="block"||this._coreBrowserService.isFocused===!1&&W.options.cursorInactiveStyle==="block")&&(this._cellColorResolver.result.fg=50331648|this._themeService.colors.cursorAccent.rgba>>8&16777215,this._cellColorResolver.result.bg=50331648|this._themeService.colors.cursor.rgba>>8&16777215)),re!==S.NULL_CELL_CODE&&(this._model.lineLengths[Y]=ee+1),(this._model.cells[ue]!==re||this._model.cells[ue+A.RENDER_MODEL_BG_OFFSET]!==this._cellColorResolver.result.bg||this._model.cells[ue+A.RENDER_MODEL_FG_OFFSET]!==this._cellColorResolver.result.fg||this._model.cells[ue+A.RENDER_MODEL_EXT_OFFSET]!==this._cellColorResolver.result.ext)&&(nt=!0,j.length>1&&(re|=A.COMBINED_CHAR_BIT_MASK),this._model.cells[ue]=re,this._model.cells[ue+A.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[ue+A.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[ue+A.RENDER_MODEL_EXT_OFFSET]=this._cellColorResolver.result.ext,_e=le.getWidth(),this._glyphRenderer.value.updateCell(ee,Y,re,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,j,_e,q),M))for(le=this._workCell,ee++;ee<U;ee++)G=(Y*W.cols+ee)*A.RENDER_MODEL_INDICIES_PER_CELL,this._glyphRenderer.value.updateCell(ee,Y,S.NULL_CELL_CODE,0,0,0,S.NULL_CELL_CHAR,0,0),this._model.cells[G]=S.NULL_CELL_CODE,this._model.cells[G+A.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[G+A.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[G+A.RENDER_MODEL_EXT_OFFSET]=this._cellColorResolver.result.ext;nt&&this._rectangleRenderer.value.updateBackgrounds(this._model),this._rectangleRenderer.value.updateCursor(this._model)}_updateDimensions(){this._charSizeService.width&&this._charSizeService.height&&(this.dimensions.device.char.width=Math.floor(this._charSizeService.width*this._devicePixelRatio),this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*this._devicePixelRatio),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.top=this._optionsService.rawOptions.lineHeight===1?0:Math.round((this.dimensions.device.cell.height-this.dimensions.device.char.height)/2),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.char.left=Math.floor(this._optionsService.rawOptions.letterSpacing/2),this.dimensions.device.canvas.height=this._terminal.rows*this.dimensions.device.cell.height,this.dimensions.device.canvas.width=this._terminal.cols*this.dimensions.device.cell.width,this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/this._devicePixelRatio),this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/this._devicePixelRatio),this.dimensions.css.cell.height=this.dimensions.device.cell.height/this._devicePixelRatio,this.dimensions.css.cell.width=this.dimensions.device.cell.width/this._devicePixelRatio)}_setCanvasDevicePixelDimensions(I,z){this._canvas.width===I&&this._canvas.height===z||(this._canvas.width=I,this._canvas.height=z,this._requestRedrawViewport())}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._terminal.rows-1})}_requestRedrawCursor(){const I=this._terminal.buffer.active.cursorY;this._onRequestRedraw.fire({start:I,end:I})}}o.WebglRenderer=D;class N extends _.AttributeData{constructor(I,z,W){super(),this.content=0,this.combinedData="",this.fg=I.fg,this.bg=I.bg,this.combinedData=z,this._width=W}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(I){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}function L(F,I,z=0){return Math.max(Math.min(F,I),z)}o.JoinedCellData=N},381:(d,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.GLTexture=o.expandFloat32Array=o.createShader=o.createProgram=o.PROJECTION_MATRIX=void 0;const c=l(374);function g(h,b,y){const T=(0,c.throwIfFalsy)(h.createShader(b));if(h.shaderSource(T,y),h.compileShader(T),h.getShaderParameter(T,h.COMPILE_STATUS))return T;console.error(h.getShaderInfoLog(T)),h.deleteShader(T)}o.PROJECTION_MATRIX=new Float32Array([2,0,0,0,0,-2,0,0,0,0,1,0,-1,1,0,1]),o.createProgram=function(h,b,y){const T=(0,c.throwIfFalsy)(h.createProgram());if(h.attachShader(T,(0,c.throwIfFalsy)(g(h,h.VERTEX_SHADER,b))),h.attachShader(T,(0,c.throwIfFalsy)(g(h,h.FRAGMENT_SHADER,y))),h.linkProgram(T),h.getProgramParameter(T,h.LINK_STATUS))return T;console.error(h.getProgramInfoLog(T)),h.deleteProgram(T)},o.createShader=g,o.expandFloat32Array=function(h,b){const y=Math.min(2*h.length,b),T=new Float32Array(y);for(let E=0;E<h.length;E++)T[E]=h[E];return T},o.GLTexture=class{constructor(h){this.texture=h,this.version=-1}}},592:(d,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BaseRenderLayer=void 0;const c=l(627),g=l(237),h=l(374),b=l(859);class y extends b.Disposable{constructor(E,m,_,v,S,x,k,A){super(),this._container=m,this._alpha=S,this._coreBrowserService=x,this._optionsService=k,this._themeService=A,this._deviceCharWidth=0,this._deviceCharHeight=0,this._deviceCellWidth=0,this._deviceCellHeight=0,this._deviceCharLeft=0,this._deviceCharTop=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add(`xterm-${_}-layer`),this._canvas.style.zIndex=v.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this.register(this._themeService.onChangeColors((O=>{this._refreshCharAtlas(E,O),this.reset(E)}))),this.register((0,b.toDisposable)((()=>{this._canvas.remove()})))}_initCanvas(){this._ctx=(0,h.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(E){}handleFocus(E){}handleCursorMove(E){}handleGridChanged(E,m,_){}handleSelectionChanged(E,m,_,v=!1){}_setTransparency(E,m){if(m===this._alpha)return;const _=this._canvas;this._alpha=m,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,_),this._refreshCharAtlas(E,this._themeService.colors),this.handleGridChanged(E,0,E.rows-1)}_refreshCharAtlas(E,m){this._deviceCharWidth<=0&&this._deviceCharHeight<=0||(this._charAtlas=(0,c.acquireTextureAtlas)(E,this._optionsService.rawOptions,m,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr),this._charAtlas.warmUp())}resize(E,m){this._deviceCellWidth=m.device.cell.width,this._deviceCellHeight=m.device.cell.height,this._deviceCharWidth=m.device.char.width,this._deviceCharHeight=m.device.char.height,this._deviceCharLeft=m.device.char.left,this._deviceCharTop=m.device.char.top,this._canvas.width=m.device.canvas.width,this._canvas.height=m.device.canvas.height,this._canvas.style.width=`${m.css.canvas.width}px`,this._canvas.style.height=`${m.css.canvas.height}px`,this._alpha||this._clearAll(),this._refreshCharAtlas(E,this._themeService.colors)}_fillBottomLineAtCells(E,m,_=1){this._ctx.fillRect(E*this._deviceCellWidth,(m+1)*this._deviceCellHeight-this._coreBrowserService.dpr-1,_*this._deviceCellWidth,this._coreBrowserService.dpr)}_clearAll(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))}_clearCells(E,m,_,v){this._alpha?this._ctx.clearRect(E*this._deviceCellWidth,m*this._deviceCellHeight,_*this._deviceCellWidth,v*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(E*this._deviceCellWidth,m*this._deviceCellHeight,_*this._deviceCellWidth,v*this._deviceCellHeight))}_fillCharTrueColor(E,m,_,v){this._ctx.font=this._getFont(E,!1,!1),this._ctx.textBaseline=g.TEXT_BASELINE,this._clipCell(_,v,m.getWidth()),this._ctx.fillText(m.getChars(),_*this._deviceCellWidth+this._deviceCharLeft,v*this._deviceCellHeight+this._deviceCharTop+this._deviceCharHeight)}_clipCell(E,m,_){this._ctx.beginPath(),this._ctx.rect(E*this._deviceCellWidth,m*this._deviceCellHeight,_*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(E,m,_){return`${_?"italic":""} ${m?E.options.fontWeightBold:E.options.fontWeight} ${E.options.fontSize*this._coreBrowserService.dpr}px ${E.options.fontFamily}`}}o.BaseRenderLayer=y},733:(d,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.LinkRenderLayer=void 0;const c=l(197),g=l(237),h=l(592);class b extends h.BaseRenderLayer{constructor(T,E,m,_,v,S,x){super(m,T,"link",E,!0,v,S,x),this.register(_.onShowLinkUnderline((k=>this._handleShowLinkUnderline(k)))),this.register(_.onHideLinkUnderline((k=>this._handleHideLinkUnderline(k))))}resize(T,E){super.resize(T,E),this._state=void 0}reset(T){this._clearCurrentLink()}_clearCurrentLink(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);const T=this._state.y2-this._state.y1-1;T>0&&this._clearCells(0,this._state.y1+1,this._state.cols,T),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}}_handleShowLinkUnderline(T){if(T.fg===g.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._themeService.colors.background.css:T.fg!==void 0&&(0,c.is256Color)(T.fg)?this._ctx.fillStyle=this._themeService.colors.ansi[T.fg].css:this._ctx.fillStyle=this._themeService.colors.foreground.css,T.y1===T.y2)this._fillBottomLineAtCells(T.x1,T.y1,T.x2-T.x1);else{this._fillBottomLineAtCells(T.x1,T.y1,T.cols-T.x1);for(let E=T.y1+1;E<T.y2;E++)this._fillBottomLineAtCells(0,E,T.cols);this._fillBottomLineAtCells(0,T.y2,T.x2)}this._state=T}_handleHideLinkUnderline(T){this._clearCurrentLink()}}o.LinkRenderLayer=b},820:(d,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.addDisposableDomListener=void 0,o.addDisposableDomListener=function(l,c,g,h){l.addEventListener(c,g,h);let b=!1;return{dispose:()=>{b||(b=!0,l.removeEventListener(c,g,h))}}}},274:(d,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CellColorResolver=void 0;const c=l(855),g=l(160),h=l(374);let b,y=0,T=0,E=!1,m=!1,_=!1,v=0;o.CellColorResolver=class{constructor(S,x,k,A,O,D){this._terminal=S,this._optionService=x,this._selectionRenderModel=k,this._decorationService=A,this._coreBrowserService=O,this._themeService=D,this.result={fg:0,bg:0,ext:0}}resolve(S,x,k,A){if(this.result.bg=S.bg,this.result.fg=S.fg,this.result.ext=268435456&S.bg?S.extended.ext:0,T=0,y=0,m=!1,E=!1,_=!1,b=this._themeService.colors,v=0,S.getCode()!==c.NULL_CELL_CODE&&S.extended.underlineStyle===4){const O=Math.max(1,Math.floor(this._optionService.rawOptions.fontSize*this._coreBrowserService.dpr/15));v=x*A%(2*Math.round(O))}if(this._decorationService.forEachDecorationAtCell(x,k,"bottom",(O=>{O.backgroundColorRGB&&(T=O.backgroundColorRGB.rgba>>8&16777215,m=!0),O.foregroundColorRGB&&(y=O.foregroundColorRGB.rgba>>8&16777215,E=!0)})),_=this._selectionRenderModel.isCellSelected(this._terminal,x,k),_){if(67108864&this.result.fg||(50331648&this.result.bg)!=0){if(67108864&this.result.fg)switch(50331648&this.result.fg){case 16777216:case 33554432:T=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:T=(16777215&this.result.fg)<<8|255;break;default:T=this._themeService.colors.foreground.rgba}else switch(50331648&this.result.bg){case 16777216:case 33554432:T=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:T=(16777215&this.result.bg)<<8|255}T=g.rgba.blend(T,4294967040&(this._coreBrowserService.isFocused?b.selectionBackgroundOpaque:b.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}else T=(this._coreBrowserService.isFocused?b.selectionBackgroundOpaque:b.selectionInactiveBackgroundOpaque).rgba>>8&16777215;if(m=!0,b.selectionForeground&&(y=b.selectionForeground.rgba>>8&16777215,E=!0),(0,h.treatGlyphAsBackgroundColor)(S.getCode())){if(67108864&this.result.fg&&(50331648&this.result.bg)==0)y=(this._coreBrowserService.isFocused?b.selectionBackgroundOpaque:b.selectionInactiveBackgroundOpaque).rgba>>8&16777215;else{if(67108864&this.result.fg)switch(50331648&this.result.bg){case 16777216:case 33554432:y=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:y=(16777215&this.result.bg)<<8|255}else switch(50331648&this.result.fg){case 16777216:case 33554432:y=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:y=(16777215&this.result.fg)<<8|255;break;default:y=this._themeService.colors.foreground.rgba}y=g.rgba.blend(y,4294967040&(this._coreBrowserService.isFocused?b.selectionBackgroundOpaque:b.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}E=!0}}this._decorationService.forEachDecorationAtCell(x,k,"top",(O=>{O.backgroundColorRGB&&(T=O.backgroundColorRGB.rgba>>8&16777215,m=!0),O.foregroundColorRGB&&(y=O.foregroundColorRGB.rgba>>8&16777215,E=!0)})),m&&(T=_?-16777216&S.bg&-134217729|T|50331648:-16777216&S.bg|T|50331648),E&&(y=-16777216&S.fg&-67108865|y|50331648),67108864&this.result.fg&&(m&&!E&&(y=(50331648&this.result.bg)==0?-134217728&this.result.fg|16777215&b.background.rgba>>8|50331648:-134217728&this.result.fg|67108863&this.result.bg,E=!0),!m&&E&&(T=(50331648&this.result.fg)==0?-67108864&this.result.bg|16777215&b.foreground.rgba>>8|50331648:-67108864&this.result.bg|67108863&this.result.fg,m=!0)),b=void 0,this.result.bg=m?T:this.result.bg,this.result.fg=E?y:this.result.fg,this.result.ext&=536870911,this.result.ext|=v<<29&3758096384}}},627:(d,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.removeTerminalFromCache=o.acquireTextureAtlas=void 0;const c=l(509),g=l(197),h=[];o.acquireTextureAtlas=function(b,y,T,E,m,_,v,S){const x=(0,g.generateConfig)(E,m,_,v,y,T,S);for(let O=0;O<h.length;O++){const D=h[O],N=D.ownedBy.indexOf(b);if(N>=0){if((0,g.configEquals)(D.config,x))return D.atlas;D.ownedBy.length===1?(D.atlas.dispose(),h.splice(O,1)):D.ownedBy.splice(N,1);break}}for(let O=0;O<h.length;O++){const D=h[O];if((0,g.configEquals)(D.config,x))return D.ownedBy.push(b),D.atlas}const k=b._core,A={atlas:new c.TextureAtlas(document,x,k.unicodeService),config:x,ownedBy:[b]};return h.push(A),A.atlas},o.removeTerminalFromCache=function(b){for(let y=0;y<h.length;y++){const T=h[y].ownedBy.indexOf(b);if(T!==-1){h[y].ownedBy.length===1?(h[y].atlas.dispose(),h.splice(y,1)):h[y].ownedBy.splice(T,1);break}}}},197:(d,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.is256Color=o.configEquals=o.generateConfig=void 0;const c=l(160);o.generateConfig=function(g,h,b,y,T,E,m){const _={foreground:E.foreground,background:E.background,cursor:c.NULL_COLOR,cursorAccent:c.NULL_COLOR,selectionForeground:c.NULL_COLOR,selectionBackgroundTransparent:c.NULL_COLOR,selectionBackgroundOpaque:c.NULL_COLOR,selectionInactiveBackgroundTransparent:c.NULL_COLOR,selectionInactiveBackgroundOpaque:c.NULL_COLOR,ansi:E.ansi.slice(),contrastCache:E.contrastCache,halfContrastCache:E.halfContrastCache};return{customGlyphs:T.customGlyphs,devicePixelRatio:m,letterSpacing:T.letterSpacing,lineHeight:T.lineHeight,deviceCellWidth:g,deviceCellHeight:h,deviceCharWidth:b,deviceCharHeight:y,fontFamily:T.fontFamily,fontSize:T.fontSize,fontWeight:T.fontWeight,fontWeightBold:T.fontWeightBold,allowTransparency:T.allowTransparency,drawBoldTextInBrightColors:T.drawBoldTextInBrightColors,minimumContrastRatio:T.minimumContrastRatio,colors:_}},o.configEquals=function(g,h){for(let b=0;b<g.colors.ansi.length;b++)if(g.colors.ansi[b].rgba!==h.colors.ansi[b].rgba)return!1;return g.devicePixelRatio===h.devicePixelRatio&&g.customGlyphs===h.customGlyphs&&g.lineHeight===h.lineHeight&&g.letterSpacing===h.letterSpacing&&g.fontFamily===h.fontFamily&&g.fontSize===h.fontSize&&g.fontWeight===h.fontWeight&&g.fontWeightBold===h.fontWeightBold&&g.allowTransparency===h.allowTransparency&&g.deviceCharWidth===h.deviceCharWidth&&g.deviceCharHeight===h.deviceCharHeight&&g.drawBoldTextInBrightColors===h.drawBoldTextInBrightColors&&g.minimumContrastRatio===h.minimumContrastRatio&&g.colors.foreground.rgba===h.colors.foreground.rgba&&g.colors.background.rgba===h.colors.background.rgba},o.is256Color=function(g){return(50331648&g)==16777216||(50331648&g)==33554432}},237:(d,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.TEXT_BASELINE=o.DIM_OPACITY=o.INVERTED_DEFAULT_COLOR=void 0;const c=l(399);o.INVERTED_DEFAULT_COLOR=257,o.DIM_OPACITY=.5,o.TEXT_BASELINE=c.isFirefox||c.isLegacyEdge?"bottom":"ideographic"},457:(d,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CursorBlinkStateManager=void 0,o.CursorBlinkStateManager=class{constructor(l,c){this._renderCallback=l,this._coreBrowserService=c,this.isCursorVisible=!0,this._coreBrowserService.isFocused&&this._restartInterval()}get isPaused(){return!(this._blinkStartTimeout||this._blinkInterval)}dispose(){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}restartBlinkAnimation(){this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._renderCallback(),this._animationFrame=void 0}))))}_restartInterval(l=600){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=this._coreBrowserService.window.setTimeout((()=>{if(this._animationTimeRestarted){const c=600-(Date.now()-this._animationTimeRestarted);if(this._animationTimeRestarted=void 0,c>0)return void this._restartInterval(c)}this.isCursorVisible=!1,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._renderCallback(),this._animationFrame=void 0})),this._blinkInterval=this._coreBrowserService.window.setInterval((()=>{if(this._animationTimeRestarted){const c=600-(Date.now()-this._animationTimeRestarted);return this._animationTimeRestarted=void 0,void this._restartInterval(c)}this.isCursorVisible=!this.isCursorVisible,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._renderCallback(),this._animationFrame=void 0}))}),600)}),l)}pause(){this.isCursorVisible=!0,this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}resume(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()}}},860:(d,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.tryDrawCustomChar=o.powerlineDefinitions=o.boxDrawingDefinitions=o.blockElementDefinitions=void 0;const c=l(374);o.blockElementDefinitions={"▀":[{x:0,y:0,w:8,h:4}],"▁":[{x:0,y:7,w:8,h:1}],"▂":[{x:0,y:6,w:8,h:2}],"▃":[{x:0,y:5,w:8,h:3}],"▄":[{x:0,y:4,w:8,h:4}],"▅":[{x:0,y:3,w:8,h:5}],"▆":[{x:0,y:2,w:8,h:6}],"▇":[{x:0,y:1,w:8,h:7}],"█":[{x:0,y:0,w:8,h:8}],"▉":[{x:0,y:0,w:7,h:8}],"▊":[{x:0,y:0,w:6,h:8}],"▋":[{x:0,y:0,w:5,h:8}],"▌":[{x:0,y:0,w:4,h:8}],"▍":[{x:0,y:0,w:3,h:8}],"▎":[{x:0,y:0,w:2,h:8}],"▏":[{x:0,y:0,w:1,h:8}],"▐":[{x:4,y:0,w:4,h:8}],"▔":[{x:0,y:0,w:8,h:1}],"▕":[{x:7,y:0,w:1,h:8}],"▖":[{x:0,y:4,w:4,h:4}],"▗":[{x:4,y:4,w:4,h:4}],"▘":[{x:0,y:0,w:4,h:4}],"▙":[{x:0,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"▚":[{x:0,y:0,w:4,h:4},{x:4,y:4,w:4,h:4}],"▛":[{x:0,y:0,w:4,h:8},{x:4,y:0,w:4,h:4}],"▜":[{x:0,y:0,w:8,h:4},{x:4,y:0,w:4,h:8}],"▝":[{x:4,y:0,w:4,h:4}],"▞":[{x:4,y:0,w:4,h:4},{x:0,y:4,w:4,h:4}],"▟":[{x:4,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"🭰":[{x:1,y:0,w:1,h:8}],"🭱":[{x:2,y:0,w:1,h:8}],"🭲":[{x:3,y:0,w:1,h:8}],"🭳":[{x:4,y:0,w:1,h:8}],"🭴":[{x:5,y:0,w:1,h:8}],"🭵":[{x:6,y:0,w:1,h:8}],"🭶":[{x:0,y:1,w:8,h:1}],"🭷":[{x:0,y:2,w:8,h:1}],"🭸":[{x:0,y:3,w:8,h:1}],"🭹":[{x:0,y:4,w:8,h:1}],"🭺":[{x:0,y:5,w:8,h:1}],"🭻":[{x:0,y:6,w:8,h:1}],"🭼":[{x:0,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🭽":[{x:0,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭾":[{x:7,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭿":[{x:7,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🮀":[{x:0,y:0,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮁":[{x:0,y:0,w:8,h:1},{x:0,y:2,w:8,h:1},{x:0,y:4,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮂":[{x:0,y:0,w:8,h:2}],"🮃":[{x:0,y:0,w:8,h:3}],"🮄":[{x:0,y:0,w:8,h:5}],"🮅":[{x:0,y:0,w:8,h:6}],"🮆":[{x:0,y:0,w:8,h:7}],"🮇":[{x:6,y:0,w:2,h:8}],"🮈":[{x:5,y:0,w:3,h:8}],"🮉":[{x:3,y:0,w:5,h:8}],"🮊":[{x:2,y:0,w:6,h:8}],"🮋":[{x:1,y:0,w:7,h:8}],"🮕":[{x:0,y:0,w:2,h:2},{x:4,y:0,w:2,h:2},{x:2,y:2,w:2,h:2},{x:6,y:2,w:2,h:2},{x:0,y:4,w:2,h:2},{x:4,y:4,w:2,h:2},{x:2,y:6,w:2,h:2},{x:6,y:6,w:2,h:2}],"🮖":[{x:2,y:0,w:2,h:2},{x:6,y:0,w:2,h:2},{x:0,y:2,w:2,h:2},{x:4,y:2,w:2,h:2},{x:2,y:4,w:2,h:2},{x:6,y:4,w:2,h:2},{x:0,y:6,w:2,h:2},{x:4,y:6,w:2,h:2}],"🮗":[{x:0,y:2,w:8,h:2},{x:0,y:6,w:8,h:2}]};const g={"░":[[1,0,0,0],[0,0,0,0],[0,0,1,0],[0,0,0,0]],"▒":[[1,0],[0,0],[0,1],[0,0]],"▓":[[0,1],[1,1],[1,0],[1,1]]};o.boxDrawingDefinitions={"─":{1:"M0,.5 L1,.5"},"━":{3:"M0,.5 L1,.5"},"│":{1:"M.5,0 L.5,1"},"┃":{3:"M.5,0 L.5,1"},"┌":{1:"M0.5,1 L.5,.5 L1,.5"},"┏":{3:"M0.5,1 L.5,.5 L1,.5"},"┐":{1:"M0,.5 L.5,.5 L.5,1"},"┓":{3:"M0,.5 L.5,.5 L.5,1"},"└":{1:"M.5,0 L.5,.5 L1,.5"},"┗":{3:"M.5,0 L.5,.5 L1,.5"},"┘":{1:"M.5,0 L.5,.5 L0,.5"},"┛":{3:"M.5,0 L.5,.5 L0,.5"},"├":{1:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┣":{3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┤":{1:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┫":{3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┬":{1:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┳":{3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┴":{1:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┻":{3:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┼":{1:"M0,.5 L1,.5 M.5,0 L.5,1"},"╋":{3:"M0,.5 L1,.5 M.5,0 L.5,1"},"╴":{1:"M.5,.5 L0,.5"},"╸":{3:"M.5,.5 L0,.5"},"╵":{1:"M.5,.5 L.5,0"},"╹":{3:"M.5,.5 L.5,0"},"╶":{1:"M.5,.5 L1,.5"},"╺":{3:"M.5,.5 L1,.5"},"╷":{1:"M.5,.5 L.5,1"},"╻":{3:"M.5,.5 L.5,1"},"═":{1:(E,m)=>`M0,${.5-m} L1,${.5-m} M0,${.5+m} L1,${.5+m}`},"║":{1:(E,m)=>`M${.5-E},0 L${.5-E},1 M${.5+E},0 L${.5+E},1`},"╒":{1:(E,m)=>`M.5,1 L.5,${.5-m} L1,${.5-m} M.5,${.5+m} L1,${.5+m}`},"╓":{1:(E,m)=>`M${.5-E},1 L${.5-E},.5 L1,.5 M${.5+E},.5 L${.5+E},1`},"╔":{1:(E,m)=>`M1,${.5-m} L${.5-E},${.5-m} L${.5-E},1 M1,${.5+m} L${.5+E},${.5+m} L${.5+E},1`},"╕":{1:(E,m)=>`M0,${.5-m} L.5,${.5-m} L.5,1 M0,${.5+m} L.5,${.5+m}`},"╖":{1:(E,m)=>`M${.5+E},1 L${.5+E},.5 L0,.5 M${.5-E},.5 L${.5-E},1`},"╗":{1:(E,m)=>`M0,${.5+m} L${.5-E},${.5+m} L${.5-E},1 M0,${.5-m} L${.5+E},${.5-m} L${.5+E},1`},"╘":{1:(E,m)=>`M.5,0 L.5,${.5+m} L1,${.5+m} M.5,${.5-m} L1,${.5-m}`},"╙":{1:(E,m)=>`M1,.5 L${.5-E},.5 L${.5-E},0 M${.5+E},.5 L${.5+E},0`},"╚":{1:(E,m)=>`M1,${.5-m} L${.5+E},${.5-m} L${.5+E},0 M1,${.5+m} L${.5-E},${.5+m} L${.5-E},0`},"╛":{1:(E,m)=>`M0,${.5+m} L.5,${.5+m} L.5,0 M0,${.5-m} L.5,${.5-m}`},"╜":{1:(E,m)=>`M0,.5 L${.5+E},.5 L${.5+E},0 M${.5-E},.5 L${.5-E},0`},"╝":{1:(E,m)=>`M0,${.5-m} L${.5-E},${.5-m} L${.5-E},0 M0,${.5+m} L${.5+E},${.5+m} L${.5+E},0`},"╞":{1:(E,m)=>`M.5,0 L.5,1 M.5,${.5-m} L1,${.5-m} M.5,${.5+m} L1,${.5+m}`},"╟":{1:(E,m)=>`M${.5-E},0 L${.5-E},1 M${.5+E},0 L${.5+E},1 M${.5+E},.5 L1,.5`},"╠":{1:(E,m)=>`M${.5-E},0 L${.5-E},1 M1,${.5+m} L${.5+E},${.5+m} L${.5+E},1 M1,${.5-m} L${.5+E},${.5-m} L${.5+E},0`},"╡":{1:(E,m)=>`M.5,0 L.5,1 M0,${.5-m} L.5,${.5-m} M0,${.5+m} L.5,${.5+m}`},"╢":{1:(E,m)=>`M0,.5 L${.5-E},.5 M${.5-E},0 L${.5-E},1 M${.5+E},0 L${.5+E},1`},"╣":{1:(E,m)=>`M${.5+E},0 L${.5+E},1 M0,${.5+m} L${.5-E},${.5+m} L${.5-E},1 M0,${.5-m} L${.5-E},${.5-m} L${.5-E},0`},"╤":{1:(E,m)=>`M0,${.5-m} L1,${.5-m} M0,${.5+m} L1,${.5+m} M.5,${.5+m} L.5,1`},"╥":{1:(E,m)=>`M0,.5 L1,.5 M${.5-E},.5 L${.5-E},1 M${.5+E},.5 L${.5+E},1`},"╦":{1:(E,m)=>`M0,${.5-m} L1,${.5-m} M0,${.5+m} L${.5-E},${.5+m} L${.5-E},1 M1,${.5+m} L${.5+E},${.5+m} L${.5+E},1`},"╧":{1:(E,m)=>`M.5,0 L.5,${.5-m} M0,${.5-m} L1,${.5-m} M0,${.5+m} L1,${.5+m}`},"╨":{1:(E,m)=>`M0,.5 L1,.5 M${.5-E},.5 L${.5-E},0 M${.5+E},.5 L${.5+E},0`},"╩":{1:(E,m)=>`M0,${.5+m} L1,${.5+m} M0,${.5-m} L${.5-E},${.5-m} L${.5-E},0 M1,${.5-m} L${.5+E},${.5-m} L${.5+E},0`},"╪":{1:(E,m)=>`M.5,0 L.5,1 M0,${.5-m} L1,${.5-m} M0,${.5+m} L1,${.5+m}`},"╫":{1:(E,m)=>`M0,.5 L1,.5 M${.5-E},0 L${.5-E},1 M${.5+E},0 L${.5+E},1`},"╬":{1:(E,m)=>`M0,${.5+m} L${.5-E},${.5+m} L${.5-E},1 M1,${.5+m} L${.5+E},${.5+m} L${.5+E},1 M0,${.5-m} L${.5-E},${.5-m} L${.5-E},0 M1,${.5-m} L${.5+E},${.5-m} L${.5+E},0`},"╱":{1:"M1,0 L0,1"},"╲":{1:"M0,0 L1,1"},"╳":{1:"M1,0 L0,1 M0,0 L1,1"},"╼":{1:"M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"╽":{1:"M.5,.5 L.5,0",3:"M.5,.5 L.5,1"},"╾":{1:"M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"╿":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"┍":{1:"M.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"┎":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"┑":{1:"M.5,.5 L.5,1",3:"M.5,.5 L0,.5"},"┒":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"┕":{1:"M.5,.5 L.5,0",3:"M.5,.5 L1,.5"},"┖":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"┙":{1:"M.5,.5 L.5,0",3:"M.5,.5 L0,.5"},"┚":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,0"},"┝":{1:"M.5,0 L.5,1",3:"M.5,.5 L1,.5"},"┞":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"┟":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"┠":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1"},"┡":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"┢":{1:"M.5,.5 L.5,0",3:"M0.5,1 L.5,.5 L1,.5"},"┥":{1:"M.5,0 L.5,1",3:"M.5,.5 L0,.5"},"┦":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"┧":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"┨":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1"},"┩":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L0,.5"},"┪":{1:"M.5,.5 L.5,0",3:"M0,.5 L.5,.5 L.5,1"},"┭":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┮":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"┯":{1:"M.5,.5 L.5,1",3:"M0,.5 L1,.5"},"┰":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"┱":{1:"M.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"┲":{1:"M.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"┵":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┶":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"┷":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5"},"┸":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,0"},"┹":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"┺":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,.5 L1,.5"},"┽":{1:"M.5,0 L.5,1 M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┾":{1:"M.5,0 L.5,1 M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"┿":{1:"M.5,0 L.5,1",3:"M0,.5 L1,.5"},"╀":{1:"M0,.5 L1,.5 M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"╁":{1:"M.5,.5 L.5,0 M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"╂":{1:"M0,.5 L1,.5",3:"M.5,0 L.5,1"},"╃":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"╄":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"╅":{1:"M.5,0 L.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"╆":{1:"M.5,0 L.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"╇":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0 M0,.5 L1,.5"},"╈":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"╉":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"╊":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"╌":{1:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"╍":{3:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"┄":{1:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"┅":{3:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"┈":{1:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"},"┉":{3:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"},"╎":{1:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"╏":{3:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"┆":{1:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"┇":{3:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"┊":{1:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"┋":{3:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"╭":{1:(E,m)=>`M.5,1 L.5,${.5+m/.15*.5} C.5,${.5+m/.15*.5},.5,.5,1,.5`},"╮":{1:(E,m)=>`M.5,1 L.5,${.5+m/.15*.5} C.5,${.5+m/.15*.5},.5,.5,0,.5`},"╯":{1:(E,m)=>`M.5,0 L.5,${.5-m/.15*.5} C.5,${.5-m/.15*.5},.5,.5,0,.5`},"╰":{1:(E,m)=>`M.5,0 L.5,${.5-m/.15*.5} C.5,${.5-m/.15*.5},.5,.5,1,.5`}},o.powerlineDefinitions={"":{d:"M0,0 L1,.5 L0,1",type:0,rightPadding:2},"":{d:"M-1,-.5 L1,.5 L-1,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1,0 L0,.5 L1,1",type:0,leftPadding:2},"":{d:"M2,-.5 L0,.5 L2,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M0,0 L0,1 C0.552,1,1,0.776,1,.5 C1,0.224,0.552,0,0,0",type:0,rightPadding:1},"":{d:"M.2,1 C.422,1,.8,.826,.78,.5 C.8,.174,0.422,0,.2,0",type:1,rightPadding:1},"":{d:"M1,0 L1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0",type:0,leftPadding:1},"":{d:"M.8,1 C0.578,1,0.2,.826,.22,.5 C0.2,0.174,0.578,0,0.8,0",type:1,leftPadding:1},"":{d:"M-.5,-.5 L1.5,1.5 L-.5,1.5",type:0},"":{d:"M-.5,-.5 L1.5,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1.5,-.5 L-.5,1.5 L1.5,1.5",type:0},"":{d:"M1.5,-.5 L-.5,1.5 L-.5,-.5",type:0},"":{d:"M1.5,-.5 L-.5,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M-.5,-.5 L1.5,1.5 L1.5,-.5",type:0}},o.powerlineDefinitions[""]=o.powerlineDefinitions[""],o.powerlineDefinitions[""]=o.powerlineDefinitions[""],o.tryDrawCustomChar=function(E,m,_,v,S,x,k,A){const O=o.blockElementDefinitions[m];if(O)return(function(F,I,z,W,q,Y){for(let K=0;K<I.length;K++){const Q=I[K],H=q/8,M=Y/8;F.fillRect(z+Q.x*H,W+Q.y*M,Q.w*H,Q.h*M)}})(E,O,_,v,S,x),!0;const D=g[m];if(D)return(function(F,I,z,W,q,Y){let K=h.get(I);K||(K=new Map,h.set(I,K));const Q=F.fillStyle;if(typeof Q!="string")throw new Error(`Unexpected fillStyle type "${Q}"`);let H=K.get(Q);if(!H){const M=I[0].length,U=I.length,$=F.canvas.ownerDocument.createElement("canvas");$.width=M,$.height=U;const j=(0,c.throwIfFalsy)($.getContext("2d")),re=new ImageData(M,U);let _e,ue,ee,G;if(Q.startsWith("#"))_e=parseInt(Q.slice(1,3),16),ue=parseInt(Q.slice(3,5),16),ee=parseInt(Q.slice(5,7),16),G=Q.length>7&&parseInt(Q.slice(7,9),16)||1;else{if(!Q.startsWith("rgba"))throw new Error(`Unexpected fillStyle color format "${Q}" when drawing pattern glyph`);[_e,ue,ee,G]=Q.substring(5,Q.length-1).split(",").map((le=>parseFloat(le)))}for(let le=0;le<U;le++)for(let ae=0;ae<M;ae++)re.data[4*(le*M+ae)]=_e,re.data[4*(le*M+ae)+1]=ue,re.data[4*(le*M+ae)+2]=ee,re.data[4*(le*M+ae)+3]=I[le][ae]*(255*G);j.putImageData(re,0,0),H=(0,c.throwIfFalsy)(F.createPattern($,null)),K.set(Q,H)}F.fillStyle=H,F.fillRect(z,W,q,Y)})(E,D,_,v,S,x),!0;const N=o.boxDrawingDefinitions[m];if(N)return(function(F,I,z,W,q,Y,K){F.strokeStyle=F.fillStyle;for(const[Q,H]of Object.entries(I)){let M;F.beginPath(),F.lineWidth=K*Number.parseInt(Q),M=typeof H=="function"?H(.15,.15/Y*q):H;for(const U of M.split(" ")){const $=U[0],j=y[$];if(!j){console.error(`Could not find drawing instructions for "${$}"`);continue}const re=U.substring(1).split(",");re[0]&&re[1]&&j(F,T(re,q,Y,z,W,!0,K))}F.stroke(),F.closePath()}})(E,N,_,v,S,x,A),!0;const L=o.powerlineDefinitions[m];return!!L&&((function(F,I,z,W,q,Y,K,Q){const H=new Path2D;H.rect(z,W,q,Y),F.clip(H),F.beginPath();const M=K/12;F.lineWidth=Q*M;for(const U of I.d.split(" ")){const $=U[0],j=y[$];if(!j){console.error(`Could not find drawing instructions for "${$}"`);continue}const re=U.substring(1).split(",");re[0]&&re[1]&&j(F,T(re,q,Y,z,W,!1,Q,(I.leftPadding??0)*(M/2),(I.rightPadding??0)*(M/2)))}I.type===1?(F.strokeStyle=F.fillStyle,F.stroke()):F.fill(),F.closePath()})(E,L,_,v,S,x,k,A),!0)};const h=new Map;function b(E,m,_=0){return Math.max(Math.min(E,m),_)}const y={C:(E,m)=>E.bezierCurveTo(m[0],m[1],m[2],m[3],m[4],m[5]),L:(E,m)=>E.lineTo(m[0],m[1]),M:(E,m)=>E.moveTo(m[0],m[1])};function T(E,m,_,v,S,x,k,A=0,O=0){const D=E.map((N=>parseFloat(N)||parseInt(N)));if(D.length<2)throw new Error("Too few arguments for instruction");for(let N=0;N<D.length;N+=2)D[N]*=m-A*k-O*k,x&&D[N]!==0&&(D[N]=b(Math.round(D[N]+.5)-.5,m,0)),D[N]+=v+A*k;for(let N=1;N<D.length;N+=2)D[N]*=_,x&&D[N]!==0&&(D[N]=b(Math.round(D[N]+.5)-.5,_,0)),D[N]+=S;return D}},56:(d,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.observeDevicePixelDimensions=void 0;const c=l(859);o.observeDevicePixelDimensions=function(g,h,b){let y=new h.ResizeObserver((T=>{const E=T.find((v=>v.target===g));if(!E)return;if(!("devicePixelContentBoxSize"in E))return y==null||y.disconnect(),void(y=void 0);const m=E.devicePixelContentBoxSize[0].inlineSize,_=E.devicePixelContentBoxSize[0].blockSize;m>0&&_>0&&b(m,_)}));try{y.observe(g,{box:["device-pixel-content-box"]})}catch{y.disconnect(),y=void 0}return(0,c.toDisposable)((()=>y==null?void 0:y.disconnect()))}},374:(d,o)=>{function l(g){return 57508<=g&&g<=57558}function c(g){return g>=128512&&g<=128591||g>=127744&&g<=128511||g>=128640&&g<=128767||g>=9728&&g<=9983||g>=9984&&g<=10175||g>=65024&&g<=65039||g>=129280&&g<=129535||g>=127462&&g<=127487}Object.defineProperty(o,"__esModule",{value:!0}),o.computeNextVariantOffset=o.createRenderDimensions=o.treatGlyphAsBackgroundColor=o.allowRescaling=o.isEmoji=o.isRestrictedPowerlineGlyph=o.isPowerlineGlyph=o.throwIfFalsy=void 0,o.throwIfFalsy=function(g){if(!g)throw new Error("value must not be falsy");return g},o.isPowerlineGlyph=l,o.isRestrictedPowerlineGlyph=function(g){return 57520<=g&&g<=57527},o.isEmoji=c,o.allowRescaling=function(g,h,b,y){return h===1&&b>Math.ceil(1.5*y)&&g!==void 0&&g>255&&!c(g)&&!l(g)&&!(function(T){return 57344<=T&&T<=63743})(g)},o.treatGlyphAsBackgroundColor=function(g){return l(g)||(function(h){return 9472<=h&&h<=9631})(g)},o.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},o.computeNextVariantOffset=function(g,h,b=0){return(g-(2*Math.round(h)-b))%(2*Math.round(h))}},296:(d,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.createSelectionRenderModel=void 0;class l{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(g,h,b,y=!1){if(this.selectionStart=h,this.selectionEnd=b,!h||!b||h[0]===b[0]&&h[1]===b[1])return void this.clear();const T=g.buffers.active.ydisp,E=h[1]-T,m=b[1]-T,_=Math.max(E,0),v=Math.min(m,g.rows-1);_>=g.rows||v<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=y,this.viewportStartRow=E,this.viewportEndRow=m,this.viewportCappedStartRow=_,this.viewportCappedEndRow=v,this.startCol=h[0],this.endCol=b[0])}isCellSelected(g,h,b){return!!this.hasSelection&&(b-=g.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?h>=this.startCol&&b>=this.viewportCappedStartRow&&h<this.endCol&&b<=this.viewportCappedEndRow:h<this.startCol&&b>=this.viewportCappedStartRow&&h>=this.endCol&&b<=this.viewportCappedEndRow:b>this.viewportStartRow&&b<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&b===this.viewportStartRow&&h>=this.startCol&&h<this.endCol||this.viewportStartRow<this.viewportEndRow&&b===this.viewportEndRow&&h<this.endCol||this.viewportStartRow<this.viewportEndRow&&b===this.viewportStartRow&&h>=this.startCol)}}o.createSelectionRenderModel=function(){return new l}},509:(d,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.TextureAtlas=void 0;const c=l(237),g=l(860),h=l(374),b=l(160),y=l(345),T=l(485),E=l(385),m=l(147),_=l(855),v={texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},offset:{x:0,y:0},size:{x:0,y:0},sizeClipSpace:{x:0,y:0}};let S;class x{get pages(){return this._pages}constructor(N,L,F){this._document=N,this._config=L,this._unicodeService=F,this._didWarmUp=!1,this._cacheMap=new T.FourKeyMap,this._cacheMapCombined=new T.FourKeyMap,this._pages=[],this._activePages=[],this._workBoundingBox={top:0,left:0,bottom:0,right:0},this._workAttributeData=new m.AttributeData,this._textureSize=512,this._onAddTextureAtlasCanvas=new y.EventEmitter,this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=new y.EventEmitter,this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._requestClearModel=!1,this._createNewPage(),this._tmpCanvas=O(N,4*this._config.deviceCellWidth+4,this._config.deviceCellHeight+4),this._tmpCtx=(0,h.throwIfFalsy)(this._tmpCanvas.getContext("2d",{alpha:this._config.allowTransparency,willReadFrequently:!0}))}dispose(){for(const N of this.pages)N.canvas.remove();this._onAddTextureAtlasCanvas.dispose()}warmUp(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)}_doWarmUp(){const N=new E.IdleTaskQueue;for(let L=33;L<126;L++)N.enqueue((()=>{if(!this._cacheMap.get(L,_.DEFAULT_COLOR,_.DEFAULT_COLOR,_.DEFAULT_EXT)){const F=this._drawToCache(L,_.DEFAULT_COLOR,_.DEFAULT_COLOR,_.DEFAULT_EXT);this._cacheMap.set(L,_.DEFAULT_COLOR,_.DEFAULT_COLOR,_.DEFAULT_EXT,F)}}))}beginFrame(){return this._requestClearModel}clearTexture(){if(this._pages[0].currentRow.x!==0||this._pages[0].currentRow.y!==0){for(const N of this._pages)N.clear();this._cacheMap.clear(),this._cacheMapCombined.clear(),this._didWarmUp=!1}}_createNewPage(){if(x.maxAtlasPages&&this._pages.length>=Math.max(4,x.maxAtlasPages)){const L=this._pages.filter((K=>2*K.canvas.width<=(x.maxTextureSize||4096))).sort(((K,Q)=>Q.canvas.width!==K.canvas.width?Q.canvas.width-K.canvas.width:Q.percentageUsed-K.percentageUsed));let F=-1,I=0;for(let K=0;K<L.length;K++)if(L[K].canvas.width!==I)F=K,I=L[K].canvas.width;else if(K-F==3)break;const z=L.slice(F,F+4),W=z.map((K=>K.glyphs[0].texturePage)).sort(((K,Q)=>K>Q?1:-1)),q=this.pages.length-z.length,Y=this._mergePages(z,q);Y.version++;for(let K=W.length-1;K>=0;K--)this._deletePage(W[K]);this.pages.push(Y),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(Y.canvas)}const N=new k(this._document,this._textureSize);return this._pages.push(N),this._activePages.push(N),this._onAddTextureAtlasCanvas.fire(N.canvas),N}_mergePages(N,L){const F=2*N[0].canvas.width,I=new k(this._document,F,N);for(const[z,W]of N.entries()){const q=z*W.canvas.width%F,Y=Math.floor(z/2)*W.canvas.height;I.ctx.drawImage(W.canvas,q,Y);for(const Q of W.glyphs)Q.texturePage=L,Q.sizeClipSpace.x=Q.size.x/F,Q.sizeClipSpace.y=Q.size.y/F,Q.texturePosition.x+=q,Q.texturePosition.y+=Y,Q.texturePositionClipSpace.x=Q.texturePosition.x/F,Q.texturePositionClipSpace.y=Q.texturePosition.y/F;this._onRemoveTextureAtlasCanvas.fire(W.canvas);const K=this._activePages.indexOf(W);K!==-1&&this._activePages.splice(K,1)}return I}_deletePage(N){this._pages.splice(N,1);for(let L=N;L<this._pages.length;L++){const F=this._pages[L];for(const I of F.glyphs)I.texturePage--;F.version++}}getRasterizedGlyphCombinedChar(N,L,F,I,z){return this._getFromCacheMap(this._cacheMapCombined,N,L,F,I,z)}getRasterizedGlyph(N,L,F,I,z){return this._getFromCacheMap(this._cacheMap,N,L,F,I,z)}_getFromCacheMap(N,L,F,I,z,W=!1){return S=N.get(L,F,I,z),S||(S=this._drawToCache(L,F,I,z,W),N.set(L,F,I,z,S)),S}_getColorFromAnsiIndex(N){if(N>=this._config.colors.ansi.length)throw new Error("No color found for idx "+N);return this._config.colors.ansi[N]}_getBackgroundColor(N,L,F,I){if(this._config.allowTransparency)return b.NULL_COLOR;let z;switch(N){case 16777216:case 33554432:z=this._getColorFromAnsiIndex(L);break;case 50331648:const W=m.AttributeData.toColorRGB(L);z=b.channels.toColor(W[0],W[1],W[2]);break;default:z=F?b.color.opaque(this._config.colors.foreground):this._config.colors.background}return z}_getForegroundColor(N,L,F,I,z,W,q,Y,K,Q){const H=this._getMinimumContrastColor(N,L,F,I,z,W,q,K,Y,Q);if(H)return H;let M;switch(z){case 16777216:case 33554432:this._config.drawBoldTextInBrightColors&&K&&W<8&&(W+=8),M=this._getColorFromAnsiIndex(W);break;case 50331648:const U=m.AttributeData.toColorRGB(W);M=b.channels.toColor(U[0],U[1],U[2]);break;default:M=q?this._config.colors.background:this._config.colors.foreground}return this._config.allowTransparency&&(M=b.color.opaque(M)),Y&&(M=b.color.multiplyOpacity(M,c.DIM_OPACITY)),M}_resolveBackgroundRgba(N,L,F){switch(N){case 16777216:case 33554432:return this._getColorFromAnsiIndex(L).rgba;case 50331648:return L<<8;default:return F?this._config.colors.foreground.rgba:this._config.colors.background.rgba}}_resolveForegroundRgba(N,L,F,I){switch(N){case 16777216:case 33554432:return this._config.drawBoldTextInBrightColors&&I&&L<8&&(L+=8),this._getColorFromAnsiIndex(L).rgba;case 50331648:return L<<8;default:return F?this._config.colors.background.rgba:this._config.colors.foreground.rgba}}_getMinimumContrastColor(N,L,F,I,z,W,q,Y,K,Q){if(this._config.minimumContrastRatio===1||Q)return;const H=this._getContrastCache(K),M=H.getColor(N,I);if(M!==void 0)return M||void 0;const U=this._resolveBackgroundRgba(L,F,q),$=this._resolveForegroundRgba(z,W,q,Y),j=b.rgba.ensureContrastRatio(U,$,this._config.minimumContrastRatio/(K?2:1));if(!j)return void H.setColor(N,I,null);const re=b.channels.toColor(j>>24&255,j>>16&255,j>>8&255);return H.setColor(N,I,re),re}_getContrastCache(N){return N?this._config.colors.halfContrastCache:this._config.colors.contrastCache}_drawToCache(N,L,F,I,z=!1){const W=typeof N=="number"?String.fromCharCode(N):N,q=Math.min(this._config.deviceCellWidth*Math.max(W.length,2)+4,this._textureSize);this._tmpCanvas.width<q&&(this._tmpCanvas.width=q);const Y=Math.min(this._config.deviceCellHeight+8,this._textureSize);if(this._tmpCanvas.height<Y&&(this._tmpCanvas.height=Y),this._tmpCtx.save(),this._workAttributeData.fg=F,this._workAttributeData.bg=L,this._workAttributeData.extended.ext=I,this._workAttributeData.isInvisible())return v;const K=!!this._workAttributeData.isBold(),Q=!!this._workAttributeData.isInverse(),H=!!this._workAttributeData.isDim(),M=!!this._workAttributeData.isItalic(),U=!!this._workAttributeData.isUnderline(),$=!!this._workAttributeData.isStrikethrough(),j=!!this._workAttributeData.isOverline();let re=this._workAttributeData.getFgColor(),_e=this._workAttributeData.getFgColorMode(),ue=this._workAttributeData.getBgColor(),ee=this._workAttributeData.getBgColorMode();if(Q){const Me=re;re=ue,ue=Me;const $e=_e;_e=ee,ee=$e}const G=this._getBackgroundColor(ee,ue,Q,H);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=G.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.globalCompositeOperation="source-over";const le=K?this._config.fontWeightBold:this._config.fontWeight,ae=M?"italic":"";this._tmpCtx.font=`${ae} ${le} ${this._config.fontSize*this._config.devicePixelRatio}px ${this._config.fontFamily}`,this._tmpCtx.textBaseline=c.TEXT_BASELINE;const xe=W.length===1&&(0,h.isPowerlineGlyph)(W.charCodeAt(0)),ye=W.length===1&&(0,h.isRestrictedPowerlineGlyph)(W.charCodeAt(0)),Pe=this._getForegroundColor(L,ee,ue,F,_e,re,Q,H,K,(0,h.treatGlyphAsBackgroundColor)(W.charCodeAt(0)));this._tmpCtx.fillStyle=Pe.css;const Ne=ye?0:4;let nt=!1;this._config.customGlyphs!==!1&&(nt=(0,g.tryDrawCustomChar)(this._tmpCtx,W,Ne,Ne,this._config.deviceCellWidth,this._config.deviceCellHeight,this._config.fontSize,this._config.devicePixelRatio));let Ue,Be=!xe;if(Ue=typeof N=="number"?this._unicodeService.wcwidth(N):this._unicodeService.getStringCellWidth(N),U){this._tmpCtx.save();const Me=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),$e=Me%2==1?.5:0;if(this._tmpCtx.lineWidth=Me,this._workAttributeData.isUnderlineColorDefault())this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle;else if(this._workAttributeData.isUnderlineColorRGB())Be=!1,this._tmpCtx.strokeStyle=`rgb(${m.AttributeData.toColorRGB(this._workAttributeData.getUnderlineColor()).join(",")})`;else{Be=!1;let Ye=this._workAttributeData.getUnderlineColor();this._config.drawBoldTextInBrightColors&&this._workAttributeData.isBold()&&Ye<8&&(Ye+=8),this._tmpCtx.strokeStyle=this._getColorFromAnsiIndex(Ye).css}this._tmpCtx.beginPath();const xt=Ne,fe=Math.ceil(Ne+this._config.deviceCharHeight)-$e-(z?2*Me:0),Ce=fe+Me,Ie=fe+2*Me;let qe=this._workAttributeData.getUnderlineVariantOffset();for(let Ye=0;Ye<Ue;Ye++){this._tmpCtx.save();const Ze=xt+Ye*this._config.deviceCellWidth,Ve=xt+(Ye+1)*this._config.deviceCellWidth,Yt=Ze+this._config.deviceCellWidth/2;switch(this._workAttributeData.extended.underlineStyle){case 2:this._tmpCtx.moveTo(Ze,fe),this._tmpCtx.lineTo(Ve,fe),this._tmpCtx.moveTo(Ze,Ie),this._tmpCtx.lineTo(Ve,Ie);break;case 3:const Lt=Me<=1?Ie:Math.ceil(Ne+this._config.deviceCharHeight-Me/2)-$e,Gt=Me<=1?fe:Math.ceil(Ne+this._config.deviceCharHeight+Me/2)-$e,Et=new Path2D;Et.rect(Ze,fe,this._config.deviceCellWidth,Ie-fe),this._tmpCtx.clip(Et),this._tmpCtx.moveTo(Ze-this._config.deviceCellWidth/2,Ce),this._tmpCtx.bezierCurveTo(Ze-this._config.deviceCellWidth/2,Gt,Ze,Gt,Ze,Ce),this._tmpCtx.bezierCurveTo(Ze,Lt,Yt,Lt,Yt,Ce),this._tmpCtx.bezierCurveTo(Yt,Gt,Ve,Gt,Ve,Ce),this._tmpCtx.bezierCurveTo(Ve,Lt,Ve+this._config.deviceCellWidth/2,Lt,Ve+this._config.deviceCellWidth/2,Ce);break;case 4:const Tn=qe===0?0:qe>=Me?2*Me-qe:Me-qe;qe>=Me||Tn===0?(this._tmpCtx.setLineDash([Math.round(Me),Math.round(Me)]),this._tmpCtx.moveTo(Ze+Tn,fe),this._tmpCtx.lineTo(Ve,fe)):(this._tmpCtx.setLineDash([Math.round(Me),Math.round(Me)]),this._tmpCtx.moveTo(Ze,fe),this._tmpCtx.lineTo(Ze+Tn,fe),this._tmpCtx.moveTo(Ze+Tn+Me,fe),this._tmpCtx.lineTo(Ve,fe)),qe=(0,h.computeNextVariantOffset)(Ve-Ze,Me,qe);break;case 5:const un=.6,yr=.3,si=Ve-Ze,Oi=Math.floor(un*si),Ht=Math.floor(yr*si),Rt=si-Oi-Ht;this._tmpCtx.setLineDash([Oi,Ht,Rt]),this._tmpCtx.moveTo(Ze,fe),this._tmpCtx.lineTo(Ve,fe);break;default:this._tmpCtx.moveTo(Ze,fe),this._tmpCtx.lineTo(Ve,fe)}this._tmpCtx.stroke(),this._tmpCtx.restore()}if(this._tmpCtx.restore(),!nt&&this._config.fontSize>=12&&!this._config.allowTransparency&&W!==" "){this._tmpCtx.save(),this._tmpCtx.textBaseline="alphabetic";const Ye=this._tmpCtx.measureText(W);if(this._tmpCtx.restore(),"actualBoundingBoxDescent"in Ye&&Ye.actualBoundingBoxDescent>0){this._tmpCtx.save();const Ze=new Path2D;Ze.rect(xt,fe-Math.ceil(Me/2),this._config.deviceCellWidth*Ue,Ie-fe+Math.ceil(Me/2)),this._tmpCtx.clip(Ze),this._tmpCtx.lineWidth=3*this._config.devicePixelRatio,this._tmpCtx.strokeStyle=G.css,this._tmpCtx.strokeText(W,Ne,Ne+this._config.deviceCharHeight),this._tmpCtx.restore()}}}if(j){const Me=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),$e=Me%2==1?.5:0;this._tmpCtx.lineWidth=Me,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(Ne,Ne+$e),this._tmpCtx.lineTo(Ne+this._config.deviceCharWidth*Ue,Ne+$e),this._tmpCtx.stroke()}if(nt||this._tmpCtx.fillText(W,Ne,Ne+this._config.deviceCharHeight),W==="_"&&!this._config.allowTransparency){let Me=A(this._tmpCtx.getImageData(Ne,Ne,this._config.deviceCellWidth,this._config.deviceCellHeight),G,Pe,Be);if(Me)for(let $e=1;$e<=5&&(this._tmpCtx.save(),this._tmpCtx.fillStyle=G.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.restore(),this._tmpCtx.fillText(W,Ne,Ne+this._config.deviceCharHeight-$e),Me=A(this._tmpCtx.getImageData(Ne,Ne,this._config.deviceCellWidth,this._config.deviceCellHeight),G,Pe,Be),Me);$e++);}if($){const Me=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/10)),$e=this._tmpCtx.lineWidth%2==1?.5:0;this._tmpCtx.lineWidth=Me,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(Ne,Ne+Math.floor(this._config.deviceCharHeight/2)-$e),this._tmpCtx.lineTo(Ne+this._config.deviceCharWidth*Ue,Ne+Math.floor(this._config.deviceCharHeight/2)-$e),this._tmpCtx.stroke()}this._tmpCtx.restore();const $t=this._tmpCtx.getImageData(0,0,this._tmpCanvas.width,this._tmpCanvas.height);let nn;if(nn=this._config.allowTransparency?(function(Me){for(let $e=0;$e<Me.data.length;$e+=4)if(Me.data[$e+3]>0)return!1;return!0})($t):A($t,G,Pe,Be),nn)return v;const Qe=this._findGlyphBoundingBox($t,this._workBoundingBox,q,ye,nt,Ne);let tt,it;for(;;){if(this._activePages.length===0){const Me=this._createNewPage();tt=Me,it=Me.currentRow,it.height=Qe.size.y;break}tt=this._activePages[this._activePages.length-1],it=tt.currentRow;for(const Me of this._activePages)Qe.size.y<=Me.currentRow.height&&(tt=Me,it=Me.currentRow);for(let Me=this._activePages.length-1;Me>=0;Me--)for(const $e of this._activePages[Me].fixedRows)$e.height<=it.height&&Qe.size.y<=$e.height&&(tt=this._activePages[Me],it=$e);if(it.y+Qe.size.y>=tt.canvas.height||it.height>Qe.size.y+2){let Me=!1;if(tt.currentRow.y+tt.currentRow.height+Qe.size.y>=tt.canvas.height){let $e;for(const xt of this._activePages)if(xt.currentRow.y+xt.currentRow.height+Qe.size.y<xt.canvas.height){$e=xt;break}if($e)tt=$e;else if(x.maxAtlasPages&&this._pages.length>=x.maxAtlasPages&&it.y+Qe.size.y<=tt.canvas.height&&it.height>=Qe.size.y&&it.x+Qe.size.x<=tt.canvas.width)Me=!0;else{const xt=this._createNewPage();tt=xt,it=xt.currentRow,it.height=Qe.size.y,Me=!0}}Me||(tt.currentRow.height>0&&tt.fixedRows.push(tt.currentRow),it={x:0,y:tt.currentRow.y+tt.currentRow.height,height:Qe.size.y},tt.fixedRows.push(it),tt.currentRow={x:0,y:it.y+it.height,height:0})}if(it.x+Qe.size.x<=tt.canvas.width)break;it===tt.currentRow?(it.x=0,it.y+=it.height,it.height=0):tt.fixedRows.splice(tt.fixedRows.indexOf(it),1)}return Qe.texturePage=this._pages.indexOf(tt),Qe.texturePosition.x=it.x,Qe.texturePosition.y=it.y,Qe.texturePositionClipSpace.x=it.x/tt.canvas.width,Qe.texturePositionClipSpace.y=it.y/tt.canvas.height,Qe.sizeClipSpace.x/=tt.canvas.width,Qe.sizeClipSpace.y/=tt.canvas.height,it.height=Math.max(it.height,Qe.size.y),it.x+=Qe.size.x,tt.ctx.putImageData($t,Qe.texturePosition.x-this._workBoundingBox.left,Qe.texturePosition.y-this._workBoundingBox.top,this._workBoundingBox.left,this._workBoundingBox.top,Qe.size.x,Qe.size.y),tt.addGlyph(Qe),tt.version++,Qe}_findGlyphBoundingBox(N,L,F,I,z,W){L.top=0;const q=I?this._config.deviceCellHeight:this._tmpCanvas.height,Y=I?this._config.deviceCellWidth:F;let K=!1;for(let Q=0;Q<q;Q++){for(let H=0;H<Y;H++){const M=Q*this._tmpCanvas.width*4+4*H+3;if(N.data[M]!==0){L.top=Q,K=!0;break}}if(K)break}L.left=0,K=!1;for(let Q=0;Q<W+Y;Q++){for(let H=0;H<q;H++){const M=H*this._tmpCanvas.width*4+4*Q+3;if(N.data[M]!==0){L.left=Q,K=!0;break}}if(K)break}L.right=Y,K=!1;for(let Q=W+Y-1;Q>=W;Q--){for(let H=0;H<q;H++){const M=H*this._tmpCanvas.width*4+4*Q+3;if(N.data[M]!==0){L.right=Q,K=!0;break}}if(K)break}L.bottom=q,K=!1;for(let Q=q-1;Q>=0;Q--){for(let H=0;H<Y;H++){const M=Q*this._tmpCanvas.width*4+4*H+3;if(N.data[M]!==0){L.bottom=Q,K=!0;break}}if(K)break}return{texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},size:{x:L.right-L.left+1,y:L.bottom-L.top+1},sizeClipSpace:{x:L.right-L.left+1,y:L.bottom-L.top+1},offset:{x:-L.left+W+(I||z?Math.floor((this._config.deviceCellWidth-this._config.deviceCharWidth)/2):0),y:-L.top+W+(I||z?this._config.lineHeight===1?0:Math.round((this._config.deviceCellHeight-this._config.deviceCharHeight)/2):0)}}}}o.TextureAtlas=x;class k{get percentageUsed(){return this._usedPixels/(this.canvas.width*this.canvas.height)}get glyphs(){return this._glyphs}addGlyph(N){this._glyphs.push(N),this._usedPixels+=N.size.x*N.size.y}constructor(N,L,F){if(this._usedPixels=0,this._glyphs=[],this.version=0,this.currentRow={x:0,y:0,height:0},this.fixedRows=[],F)for(const I of F)this._glyphs.push(...I.glyphs),this._usedPixels+=I._usedPixels;this.canvas=O(N,L,L),this.ctx=(0,h.throwIfFalsy)(this.canvas.getContext("2d",{alpha:!0}))}clear(){this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.currentRow.x=0,this.currentRow.y=0,this.currentRow.height=0,this.fixedRows.length=0,this.version++}}function A(D,N,L,F){const I=N.rgba>>>24,z=N.rgba>>>16&255,W=N.rgba>>>8&255,q=L.rgba>>>24,Y=L.rgba>>>16&255,K=L.rgba>>>8&255,Q=Math.floor((Math.abs(I-q)+Math.abs(z-Y)+Math.abs(W-K))/12);let H=!0;for(let M=0;M<D.data.length;M+=4)D.data[M]===I&&D.data[M+1]===z&&D.data[M+2]===W||F&&Math.abs(D.data[M]-I)+Math.abs(D.data[M+1]-z)+Math.abs(D.data[M+2]-W)<Q?D.data[M+3]=0:H=!1;return H}function O(D,N,L){const F=D.createElement("canvas");return F.width=N,F.height=L,F}},160:(d,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.contrastRatio=o.toPaddedHex=o.rgba=o.rgb=o.css=o.color=o.channels=o.NULL_COLOR=void 0;let l=0,c=0,g=0,h=0;var b,y,T,E,m;function _(S){const x=S.toString(16);return x.length<2?"0"+x:x}function v(S,x){return S<x?(x+.05)/(S+.05):(S+.05)/(x+.05)}o.NULL_COLOR={css:"#00000000",rgba:0},(function(S){S.toCss=function(x,k,A,O){return O!==void 0?`#${_(x)}${_(k)}${_(A)}${_(O)}`:`#${_(x)}${_(k)}${_(A)}`},S.toRgba=function(x,k,A,O=255){return(x<<24|k<<16|A<<8|O)>>>0},S.toColor=function(x,k,A,O){return{css:S.toCss(x,k,A,O),rgba:S.toRgba(x,k,A,O)}}})(b||(o.channels=b={})),(function(S){function x(k,A){return h=Math.round(255*A),[l,c,g]=m.toChannels(k.rgba),{css:b.toCss(l,c,g,h),rgba:b.toRgba(l,c,g,h)}}S.blend=function(k,A){if(h=(255&A.rgba)/255,h===1)return{css:A.css,rgba:A.rgba};const O=A.rgba>>24&255,D=A.rgba>>16&255,N=A.rgba>>8&255,L=k.rgba>>24&255,F=k.rgba>>16&255,I=k.rgba>>8&255;return l=L+Math.round((O-L)*h),c=F+Math.round((D-F)*h),g=I+Math.round((N-I)*h),{css:b.toCss(l,c,g),rgba:b.toRgba(l,c,g)}},S.isOpaque=function(k){return(255&k.rgba)==255},S.ensureContrastRatio=function(k,A,O){const D=m.ensureContrastRatio(k.rgba,A.rgba,O);if(D)return b.toColor(D>>24&255,D>>16&255,D>>8&255)},S.opaque=function(k){const A=(255|k.rgba)>>>0;return[l,c,g]=m.toChannels(A),{css:b.toCss(l,c,g),rgba:A}},S.opacity=x,S.multiplyOpacity=function(k,A){return h=255&k.rgba,x(k,h*A/255)},S.toColorRGB=function(k){return[k.rgba>>24&255,k.rgba>>16&255,k.rgba>>8&255]}})(y||(o.color=y={})),(function(S){let x,k;try{const A=document.createElement("canvas");A.width=1,A.height=1;const O=A.getContext("2d",{willReadFrequently:!0});O&&(x=O,x.globalCompositeOperation="copy",k=x.createLinearGradient(0,0,1,1))}catch{}S.toColor=function(A){if(A.match(/#[\da-f]{3,8}/i))switch(A.length){case 4:return l=parseInt(A.slice(1,2).repeat(2),16),c=parseInt(A.slice(2,3).repeat(2),16),g=parseInt(A.slice(3,4).repeat(2),16),b.toColor(l,c,g);case 5:return l=parseInt(A.slice(1,2).repeat(2),16),c=parseInt(A.slice(2,3).repeat(2),16),g=parseInt(A.slice(3,4).repeat(2),16),h=parseInt(A.slice(4,5).repeat(2),16),b.toColor(l,c,g,h);case 7:return{css:A,rgba:(parseInt(A.slice(1),16)<<8|255)>>>0};case 9:return{css:A,rgba:parseInt(A.slice(1),16)>>>0}}const O=A.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(O)return l=parseInt(O[1]),c=parseInt(O[2]),g=parseInt(O[3]),h=Math.round(255*(O[5]===void 0?1:parseFloat(O[5]))),b.toColor(l,c,g,h);if(!x||!k)throw new Error("css.toColor: Unsupported css format");if(x.fillStyle=k,x.fillStyle=A,typeof x.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(x.fillRect(0,0,1,1),[l,c,g,h]=x.getImageData(0,0,1,1).data,h!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:b.toRgba(l,c,g,h),css:A}}})(T||(o.css=T={})),(function(S){function x(k,A,O){const D=k/255,N=A/255,L=O/255;return .2126*(D<=.03928?D/12.92:Math.pow((D+.055)/1.055,2.4))+.7152*(N<=.03928?N/12.92:Math.pow((N+.055)/1.055,2.4))+.0722*(L<=.03928?L/12.92:Math.pow((L+.055)/1.055,2.4))}S.relativeLuminance=function(k){return x(k>>16&255,k>>8&255,255&k)},S.relativeLuminance2=x})(E||(o.rgb=E={})),(function(S){function x(A,O,D){const N=A>>24&255,L=A>>16&255,F=A>>8&255;let I=O>>24&255,z=O>>16&255,W=O>>8&255,q=v(E.relativeLuminance2(I,z,W),E.relativeLuminance2(N,L,F));for(;q<D&&(I>0||z>0||W>0);)I-=Math.max(0,Math.ceil(.1*I)),z-=Math.max(0,Math.ceil(.1*z)),W-=Math.max(0,Math.ceil(.1*W)),q=v(E.relativeLuminance2(I,z,W),E.relativeLuminance2(N,L,F));return(I<<24|z<<16|W<<8|255)>>>0}function k(A,O,D){const N=A>>24&255,L=A>>16&255,F=A>>8&255;let I=O>>24&255,z=O>>16&255,W=O>>8&255,q=v(E.relativeLuminance2(I,z,W),E.relativeLuminance2(N,L,F));for(;q<D&&(I<255||z<255||W<255);)I=Math.min(255,I+Math.ceil(.1*(255-I))),z=Math.min(255,z+Math.ceil(.1*(255-z))),W=Math.min(255,W+Math.ceil(.1*(255-W))),q=v(E.relativeLuminance2(I,z,W),E.relativeLuminance2(N,L,F));return(I<<24|z<<16|W<<8|255)>>>0}S.blend=function(A,O){if(h=(255&O)/255,h===1)return O;const D=O>>24&255,N=O>>16&255,L=O>>8&255,F=A>>24&255,I=A>>16&255,z=A>>8&255;return l=F+Math.round((D-F)*h),c=I+Math.round((N-I)*h),g=z+Math.round((L-z)*h),b.toRgba(l,c,g)},S.ensureContrastRatio=function(A,O,D){const N=E.relativeLuminance(A>>8),L=E.relativeLuminance(O>>8);if(v(N,L)<D){if(L<N){const z=x(A,O,D),W=v(N,E.relativeLuminance(z>>8));if(W<D){const q=k(A,O,D);return W>v(N,E.relativeLuminance(q>>8))?z:q}return z}const F=k(A,O,D),I=v(N,E.relativeLuminance(F>>8));if(I<D){const z=x(A,O,D);return I>v(N,E.relativeLuminance(z>>8))?F:z}return F}},S.reduceLuminance=x,S.increaseLuminance=k,S.toChannels=function(A){return[A>>24&255,A>>16&255,A>>8&255,255&A]}})(m||(o.rgba=m={})),o.toPaddedHex=_,o.contrastRatio=v},345:(d,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.runAndSubscribe=o.forwardEvent=o.EventEmitter=void 0,o.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=l=>(this._listeners.push(l),{dispose:()=>{if(!this._disposed){for(let c=0;c<this._listeners.length;c++)if(this._listeners[c]===l)return void this._listeners.splice(c,1)}}})),this._event}fire(l,c){const g=[];for(let h=0;h<this._listeners.length;h++)g.push(this._listeners[h]);for(let h=0;h<g.length;h++)g[h].call(void 0,l,c)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},o.forwardEvent=function(l,c){return l((g=>c.fire(g)))},o.runAndSubscribe=function(l,c){return c(void 0),l((g=>c(g)))}},859:(d,o)=>{function l(c){for(const g of c)g.dispose();c.length=0}Object.defineProperty(o,"__esModule",{value:!0}),o.getDisposeArrayDisposable=o.disposeArray=o.toDisposable=o.MutableDisposable=o.Disposable=void 0,o.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const c of this._disposables)c.dispose();this._disposables.length=0}register(c){return this._disposables.push(c),c}unregister(c){const g=this._disposables.indexOf(c);g!==-1&&this._disposables.splice(g,1)}},o.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(c){var g;this._isDisposed||c===this._value||((g=this._value)==null||g.dispose(),this._value=c)}clear(){this.value=void 0}dispose(){var c;this._isDisposed=!0,(c=this._value)==null||c.dispose(),this._value=void 0}},o.toDisposable=function(c){return{dispose:c}},o.disposeArray=l,o.getDisposeArrayDisposable=function(c){return{dispose:()=>l(c)}}},485:(d,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.FourKeyMap=o.TwoKeyMap=void 0;class l{constructor(){this._data={}}set(g,h,b){this._data[g]||(this._data[g]={}),this._data[g][h]=b}get(g,h){return this._data[g]?this._data[g][h]:void 0}clear(){this._data={}}}o.TwoKeyMap=l,o.FourKeyMap=class{constructor(){this._data=new l}set(c,g,h,b,y){this._data.get(c,g)||this._data.set(c,g,new l),this._data.get(c,g).set(h,b,y)}get(c,g,h,b){var y;return(y=this._data.get(c,g))==null?void 0:y.get(h,b)}clear(){this._data.clear()}}},399:(d,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.isChromeOS=o.isLinux=o.isWindows=o.isIphone=o.isIpad=o.isMac=o.getSafariVersion=o.isSafari=o.isLegacyEdge=o.isFirefox=o.isNode=void 0,o.isNode=typeof process<"u"&&"title"in process;const l=o.isNode?"node":navigator.userAgent,c=o.isNode?"node":navigator.platform;o.isFirefox=l.includes("Firefox"),o.isLegacyEdge=l.includes("Edge"),o.isSafari=/^((?!chrome|android).)*safari/i.test(l),o.getSafariVersion=function(){if(!o.isSafari)return 0;const g=l.match(/Version\/(\d+)/);return g===null||g.length<2?0:parseInt(g[1])},o.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(c),o.isIpad=c==="iPad",o.isIphone=c==="iPhone",o.isWindows=["Windows","Win16","Win32","WinCE"].includes(c),o.isLinux=c.indexOf("Linux")>=0,o.isChromeOS=/\bCrOS\b/.test(l)},385:(d,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DebouncedIdleTask=o.IdleTaskQueue=o.PriorityTaskQueue=void 0;const c=l(399);class g{constructor(){this._tasks=[],this._i=0}enqueue(y){this._tasks.push(y),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(y){this._idleCallback=void 0;let T=0,E=0,m=y.timeRemaining(),_=0;for(;this._i<this._tasks.length;){if(T=Date.now(),this._tasks[this._i]()||this._i++,T=Math.max(1,Date.now()-T),E=Math.max(T,E),_=y.timeRemaining(),1.5*E>_)return m-T<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(m-T))}ms`),void this._start();m=_}this.clear()}}class h extends g{_requestCallback(y){return setTimeout((()=>y(this._createDeadline(16))))}_cancelCallback(y){clearTimeout(y)}_createDeadline(y){const T=Date.now()+y;return{timeRemaining:()=>Math.max(0,T-Date.now())}}}o.PriorityTaskQueue=h,o.IdleTaskQueue=!c.isNode&&"requestIdleCallback"in window?class extends g{_requestCallback(b){return requestIdleCallback(b)}_cancelCallback(b){cancelIdleCallback(b)}}:h,o.DebouncedIdleTask=class{constructor(){this._queue=new o.IdleTaskQueue}set(b){this._queue.clear(),this._queue.enqueue(b)}flush(){this._queue.flush()}}},147:(d,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ExtendedAttrs=o.AttributeData=void 0;class l{constructor(){this.fg=0,this.bg=0,this.extended=new c}static toColorRGB(h){return[h>>>16&255,h>>>8&255,255&h]}static fromColorRGB(h){return(255&h[0])<<16|(255&h[1])<<8|255&h[2]}clone(){const h=new l;return h.fg=this.fg,h.bg=this.bg,h.extended=this.extended.clone(),h}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}o.AttributeData=l;class c{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(h){this._ext=h}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(h){this._ext&=-469762049,this._ext|=h<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(h){this._ext&=-67108864,this._ext|=67108863&h}get urlId(){return this._urlId}set urlId(h){this._urlId=h}get underlineVariantOffset(){const h=(3758096384&this._ext)>>29;return h<0?4294967288^h:h}set underlineVariantOffset(h){this._ext&=536870911,this._ext|=h<<29&3758096384}constructor(h=0,b=0){this._ext=0,this._urlId=0,this._ext=h,this._urlId=b}clone(){return new c(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}o.ExtendedAttrs=c},782:(d,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CellData=void 0;const c=l(133),g=l(855),h=l(147);class b extends h.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new h.ExtendedAttrs,this.combinedData=""}static fromCharData(T){const E=new b;return E.setFromCharData(T),E}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,c.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(T){this.fg=T[g.CHAR_DATA_ATTR_INDEX],this.bg=0;let E=!1;if(T[g.CHAR_DATA_CHAR_INDEX].length>2)E=!0;else if(T[g.CHAR_DATA_CHAR_INDEX].length===2){const m=T[g.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=m&&m<=56319){const _=T[g.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=_&&_<=57343?this.content=1024*(m-55296)+_-56320+65536|T[g.CHAR_DATA_WIDTH_INDEX]<<22:E=!0}else E=!0}else this.content=T[g.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|T[g.CHAR_DATA_WIDTH_INDEX]<<22;E&&(this.combinedData=T[g.CHAR_DATA_CHAR_INDEX],this.content=2097152|T[g.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}o.CellData=b},855:(d,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.WHITESPACE_CELL_CODE=o.WHITESPACE_CELL_WIDTH=o.WHITESPACE_CELL_CHAR=o.NULL_CELL_CODE=o.NULL_CELL_WIDTH=o.NULL_CELL_CHAR=o.CHAR_DATA_CODE_INDEX=o.CHAR_DATA_WIDTH_INDEX=o.CHAR_DATA_CHAR_INDEX=o.CHAR_DATA_ATTR_INDEX=o.DEFAULT_EXT=o.DEFAULT_ATTR=o.DEFAULT_COLOR=void 0,o.DEFAULT_COLOR=0,o.DEFAULT_ATTR=256|o.DEFAULT_COLOR<<9,o.DEFAULT_EXT=0,o.CHAR_DATA_ATTR_INDEX=0,o.CHAR_DATA_CHAR_INDEX=1,o.CHAR_DATA_WIDTH_INDEX=2,o.CHAR_DATA_CODE_INDEX=3,o.NULL_CELL_CHAR="",o.NULL_CELL_WIDTH=1,o.NULL_CELL_CODE=0,o.WHITESPACE_CELL_CHAR=" ",o.WHITESPACE_CELL_WIDTH=1,o.WHITESPACE_CELL_CODE=32},133:(d,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Utf8ToUtf32=o.StringToUtf32=o.utf32ToString=o.stringFromCodePoint=void 0,o.stringFromCodePoint=function(l){return l>65535?(l-=65536,String.fromCharCode(55296+(l>>10))+String.fromCharCode(l%1024+56320)):String.fromCharCode(l)},o.utf32ToString=function(l,c=0,g=l.length){let h="";for(let b=c;b<g;++b){let y=l[b];y>65535?(y-=65536,h+=String.fromCharCode(55296+(y>>10))+String.fromCharCode(y%1024+56320)):h+=String.fromCharCode(y)}return h},o.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(l,c){const g=l.length;if(!g)return 0;let h=0,b=0;if(this._interim){const y=l.charCodeAt(b++);56320<=y&&y<=57343?c[h++]=1024*(this._interim-55296)+y-56320+65536:(c[h++]=this._interim,c[h++]=y),this._interim=0}for(let y=b;y<g;++y){const T=l.charCodeAt(y);if(55296<=T&&T<=56319){if(++y>=g)return this._interim=T,h;const E=l.charCodeAt(y);56320<=E&&E<=57343?c[h++]=1024*(T-55296)+E-56320+65536:(c[h++]=T,c[h++]=E)}else T!==65279&&(c[h++]=T)}return h}},o.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(l,c){const g=l.length;if(!g)return 0;let h,b,y,T,E=0,m=0,_=0;if(this.interim[0]){let x=!1,k=this.interim[0];k&=(224&k)==192?31:(240&k)==224?15:7;let A,O=0;for(;(A=63&this.interim[++O])&&O<4;)k<<=6,k|=A;const D=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,N=D-O;for(;_<N;){if(_>=g)return 0;if(A=l[_++],(192&A)!=128){_--,x=!0;break}this.interim[O++]=A,k<<=6,k|=63&A}x||(D===2?k<128?_--:c[E++]=k:D===3?k<2048||k>=55296&&k<=57343||k===65279||(c[E++]=k):k<65536||k>1114111||(c[E++]=k)),this.interim.fill(0)}const v=g-4;let S=_;for(;S<g;){for(;!(!(S<v)||128&(h=l[S])||128&(b=l[S+1])||128&(y=l[S+2])||128&(T=l[S+3]));)c[E++]=h,c[E++]=b,c[E++]=y,c[E++]=T,S+=4;if(h=l[S++],h<128)c[E++]=h;else if((224&h)==192){if(S>=g)return this.interim[0]=h,E;if(b=l[S++],(192&b)!=128){S--;continue}if(m=(31&h)<<6|63&b,m<128){S--;continue}c[E++]=m}else if((240&h)==224){if(S>=g)return this.interim[0]=h,E;if(b=l[S++],(192&b)!=128){S--;continue}if(S>=g)return this.interim[0]=h,this.interim[1]=b,E;if(y=l[S++],(192&y)!=128){S--;continue}if(m=(15&h)<<12|(63&b)<<6|63&y,m<2048||m>=55296&&m<=57343||m===65279)continue;c[E++]=m}else if((248&h)==240){if(S>=g)return this.interim[0]=h,E;if(b=l[S++],(192&b)!=128){S--;continue}if(S>=g)return this.interim[0]=h,this.interim[1]=b,E;if(y=l[S++],(192&y)!=128){S--;continue}if(S>=g)return this.interim[0]=h,this.interim[1]=b,this.interim[2]=y,E;if(T=l[S++],(192&T)!=128){S--;continue}if(m=(7&h)<<18|(63&b)<<12|(63&y)<<6|63&T,m<65536||m>1114111)continue;c[E++]=m}}return E}}},776:function(d,o,l){var c=this&&this.__decorate||function(m,_,v,S){var x,k=arguments.length,A=k<3?_:S===null?S=Object.getOwnPropertyDescriptor(_,v):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(m,_,v,S);else for(var O=m.length-1;O>=0;O--)(x=m[O])&&(A=(k<3?x(A):k>3?x(_,v,A):x(_,v))||A);return k>3&&A&&Object.defineProperty(_,v,A),A},g=this&&this.__param||function(m,_){return function(v,S){_(v,S,m)}};Object.defineProperty(o,"__esModule",{value:!0}),o.traceCall=o.setTraceLogger=o.LogService=void 0;const h=l(859),b=l(97),y={trace:b.LogLevelEnum.TRACE,debug:b.LogLevelEnum.DEBUG,info:b.LogLevelEnum.INFO,warn:b.LogLevelEnum.WARN,error:b.LogLevelEnum.ERROR,off:b.LogLevelEnum.OFF};let T,E=o.LogService=class extends h.Disposable{get logLevel(){return this._logLevel}constructor(m){super(),this._optionsService=m,this._logLevel=b.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),T=this}_updateLogLevel(){this._logLevel=y[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(m){for(let _=0;_<m.length;_++)typeof m[_]=="function"&&(m[_]=m[_]())}_log(m,_,v){this._evalLazyOptionalParams(v),m.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+_,...v)}trace(m,..._){var v;this._logLevel<=b.LogLevelEnum.TRACE&&this._log(((v=this._optionsService.options.logger)==null?void 0:v.trace.bind(this._optionsService.options.logger))??console.log,m,_)}debug(m,..._){var v;this._logLevel<=b.LogLevelEnum.DEBUG&&this._log(((v=this._optionsService.options.logger)==null?void 0:v.debug.bind(this._optionsService.options.logger))??console.log,m,_)}info(m,..._){var v;this._logLevel<=b.LogLevelEnum.INFO&&this._log(((v=this._optionsService.options.logger)==null?void 0:v.info.bind(this._optionsService.options.logger))??console.info,m,_)}warn(m,..._){var v;this._logLevel<=b.LogLevelEnum.WARN&&this._log(((v=this._optionsService.options.logger)==null?void 0:v.warn.bind(this._optionsService.options.logger))??console.warn,m,_)}error(m,..._){var v;this._logLevel<=b.LogLevelEnum.ERROR&&this._log(((v=this._optionsService.options.logger)==null?void 0:v.error.bind(this._optionsService.options.logger))??console.error,m,_)}};o.LogService=E=c([g(0,b.IOptionsService)],E),o.setTraceLogger=function(m){T=m},o.traceCall=function(m,_,v){if(typeof v.value!="function")throw new Error("not supported");const S=v.value;v.value=function(...x){if(T.logLevel!==b.LogLevelEnum.TRACE)return S.apply(this,x);T.trace(`GlyphRenderer#${S.name}(${x.map((A=>JSON.stringify(A))).join(", ")})`);const k=S.apply(this,x);return T.trace(`GlyphRenderer#${S.name} return`,k),k}}},726:(d,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.createDecorator=o.getServiceDependencies=o.serviceRegistry=void 0;const l="di$target",c="di$dependencies";o.serviceRegistry=new Map,o.getServiceDependencies=function(g){return g[c]||[]},o.createDecorator=function(g){if(o.serviceRegistry.has(g))return o.serviceRegistry.get(g);const h=function(b,y,T){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(E,m,_){m[l]===m?m[c].push({id:E,index:_}):(m[c]=[{id:E,index:_}],m[l]=m)})(h,b,T)};return h.toString=()=>g,o.serviceRegistry.set(g,h),h}},97:(d,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.IDecorationService=o.IUnicodeService=o.IOscLinkService=o.IOptionsService=o.ILogService=o.LogLevelEnum=o.IInstantiationService=o.ICharsetService=o.ICoreService=o.ICoreMouseService=o.IBufferService=void 0;const c=l(726);var g;o.IBufferService=(0,c.createDecorator)("BufferService"),o.ICoreMouseService=(0,c.createDecorator)("CoreMouseService"),o.ICoreService=(0,c.createDecorator)("CoreService"),o.ICharsetService=(0,c.createDecorator)("CharsetService"),o.IInstantiationService=(0,c.createDecorator)("InstantiationService"),(function(h){h[h.TRACE=0]="TRACE",h[h.DEBUG=1]="DEBUG",h[h.INFO=2]="INFO",h[h.WARN=3]="WARN",h[h.ERROR=4]="ERROR",h[h.OFF=5]="OFF"})(g||(o.LogLevelEnum=g={})),o.ILogService=(0,c.createDecorator)("LogService"),o.IOptionsService=(0,c.createDecorator)("OptionsService"),o.IOscLinkService=(0,c.createDecorator)("OscLinkService"),o.IUnicodeService=(0,c.createDecorator)("UnicodeService"),o.IDecorationService=(0,c.createDecorator)("DecorationService")}},s={};function u(d){var o=s[d];if(o!==void 0)return o.exports;var l=s[d]={exports:{}};return i[d].call(l.exports,l,l.exports,u),l.exports}var p={};return(()=>{var d=p;Object.defineProperty(d,"__esModule",{value:!0}),d.WebglAddon=void 0;const o=u(345),l=u(859),c=u(399),g=u(666),h=u(776);class b extends l.Disposable{constructor(T){if(c.isSafari&&(0,c.getSafariVersion)()<16){const E={antialias:!1,depth:!1,preserveDrawingBuffer:!0};if(!document.createElement("canvas").getContext("webgl2",E))throw new Error("Webgl2 is only supported on Safari 16 and above")}super(),this._preserveDrawingBuffer=T,this._onChangeTextureAtlas=this.register(new o.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new o.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this.register(new o.EventEmitter),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onContextLoss=this.register(new o.EventEmitter),this.onContextLoss=this._onContextLoss.event}activate(T){const E=T._core;if(!T.element)return void this.register(E.onWillOpen((()=>this.activate(T))));this._terminal=T;const m=E.coreService,_=E.optionsService,v=E,S=v._renderService,x=v._characterJoinerService,k=v._charSizeService,A=v._coreBrowserService,O=v._decorationService,D=v._logService,N=v._themeService;(0,h.setTraceLogger)(D),this._renderer=this.register(new g.WebglRenderer(T,x,k,A,m,O,_,N,this._preserveDrawingBuffer)),this.register((0,o.forwardEvent)(this._renderer.onContextLoss,this._onContextLoss)),this.register((0,o.forwardEvent)(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this.register((0,o.forwardEvent)(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),this.register((0,o.forwardEvent)(this._renderer.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)),S.setRenderer(this._renderer),this.register((0,l.toDisposable)((()=>{const L=this._terminal._core._renderService;L.setRenderer(this._terminal._core._createRenderer()),L.handleResize(T.cols,T.rows)})))}get textureAtlas(){var T;return(T=this._renderer)==null?void 0:T.textureAtlas}clearTextureAtlas(){var T;(T=this._renderer)==null||T.clearTextureAtlas()}}d.WebglAddon=b})(),p})()))})(of)),of.exports}var Xw=Vw(),oc={exports:{}},Qw=oc.exports,p1;function Zw(){return p1||(p1=1,(function(e,t){(function(i,s){e.exports=s()})(Qw,(()=>(()=>{var i={433:(d,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeV11=void 0;const c=l(938),g=[[768,879],[1155,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1541],[1552,1562],[1564,1564],[1611,1631],[1648,1648],[1750,1757],[1759,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2045,2045],[2070,2073],[2075,2083],[2085,2087],[2089,2093],[2137,2139],[2259,2306],[2362,2362],[2364,2364],[2369,2376],[2381,2381],[2385,2391],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2558,2558],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2641,2641],[2672,2673],[2677,2677],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2810,2815],[2817,2817],[2876,2876],[2879,2879],[2881,2884],[2893,2893],[2902,2902],[2914,2915],[2946,2946],[3008,3008],[3021,3021],[3072,3072],[3076,3076],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3170,3171],[3201,3201],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3328,3329],[3387,3388],[3393,3396],[3405,3405],[3426,3427],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3981,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4151],[4153,4154],[4157,4158],[4184,4185],[4190,4192],[4209,4212],[4226,4226],[4229,4230],[4237,4237],[4253,4253],[4448,4607],[4957,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6158],[6277,6278],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6683,6683],[6742,6742],[6744,6750],[6752,6752],[6754,6754],[6757,6764],[6771,6780],[6783,6783],[6832,6846],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7040,7041],[7074,7077],[7080,7081],[7083,7085],[7142,7142],[7144,7145],[7149,7149],[7151,7153],[7212,7219],[7222,7223],[7376,7378],[7380,7392],[7394,7400],[7405,7405],[7412,7412],[7416,7417],[7616,7673],[7675,7679],[8203,8207],[8234,8238],[8288,8292],[8294,8303],[8400,8432],[11503,11505],[11647,11647],[11744,11775],[12330,12333],[12441,12442],[42607,42610],[42612,42621],[42654,42655],[42736,42737],[43010,43010],[43014,43014],[43019,43019],[43045,43046],[43204,43205],[43232,43249],[43263,43263],[43302,43309],[43335,43345],[43392,43394],[43443,43443],[43446,43449],[43452,43453],[43493,43493],[43561,43566],[43569,43570],[43573,43574],[43587,43587],[43596,43596],[43644,43644],[43696,43696],[43698,43700],[43703,43704],[43710,43711],[43713,43713],[43756,43757],[43766,43766],[44005,44005],[44008,44008],[44013,44013],[64286,64286],[65024,65039],[65056,65071],[65279,65279],[65529,65531]],h=[[66045,66045],[66272,66272],[66422,66426],[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[68325,68326],[68900,68903],[69446,69456],[69633,69633],[69688,69702],[69759,69761],[69811,69814],[69817,69818],[69821,69821],[69837,69837],[69888,69890],[69927,69931],[69933,69940],[70003,70003],[70016,70017],[70070,70078],[70089,70092],[70191,70193],[70196,70196],[70198,70199],[70206,70206],[70367,70367],[70371,70378],[70400,70401],[70459,70460],[70464,70464],[70502,70508],[70512,70516],[70712,70719],[70722,70724],[70726,70726],[70750,70750],[70835,70840],[70842,70842],[70847,70848],[70850,70851],[71090,71093],[71100,71101],[71103,71104],[71132,71133],[71219,71226],[71229,71229],[71231,71232],[71339,71339],[71341,71341],[71344,71349],[71351,71351],[71453,71455],[71458,71461],[71463,71467],[71727,71735],[71737,71738],[72148,72151],[72154,72155],[72160,72160],[72193,72202],[72243,72248],[72251,72254],[72263,72263],[72273,72278],[72281,72283],[72330,72342],[72344,72345],[72752,72758],[72760,72765],[72767,72767],[72850,72871],[72874,72880],[72882,72883],[72885,72886],[73009,73014],[73018,73018],[73020,73021],[73023,73029],[73031,73031],[73104,73105],[73109,73109],[73111,73111],[73459,73460],[78896,78904],[92912,92916],[92976,92982],[94031,94031],[94095,94098],[113821,113822],[113824,113827],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[121344,121398],[121403,121452],[121461,121461],[121476,121476],[121499,121503],[121505,121519],[122880,122886],[122888,122904],[122907,122913],[122915,122916],[122918,122922],[123184,123190],[123628,123631],[125136,125142],[125252,125258],[917505,917505],[917536,917631],[917760,917999]],b=[[4352,4447],[8986,8987],[9001,9002],[9193,9196],[9200,9200],[9203,9203],[9725,9726],[9748,9749],[9800,9811],[9855,9855],[9875,9875],[9889,9889],[9898,9899],[9917,9918],[9924,9925],[9934,9934],[9940,9940],[9962,9962],[9970,9971],[9973,9973],[9978,9978],[9981,9981],[9989,9989],[9994,9995],[10024,10024],[10060,10060],[10062,10062],[10067,10069],[10071,10071],[10133,10135],[10160,10160],[10175,10175],[11035,11036],[11088,11088],[11093,11093],[11904,11929],[11931,12019],[12032,12245],[12272,12283],[12288,12329],[12334,12350],[12353,12438],[12443,12543],[12549,12591],[12593,12686],[12688,12730],[12736,12771],[12784,12830],[12832,12871],[12880,19903],[19968,42124],[42128,42182],[43360,43388],[44032,55203],[63744,64255],[65040,65049],[65072,65106],[65108,65126],[65128,65131],[65281,65376],[65504,65510]],y=[[94176,94179],[94208,100343],[100352,101106],[110592,110878],[110928,110930],[110948,110951],[110960,111355],[126980,126980],[127183,127183],[127374,127374],[127377,127386],[127488,127490],[127504,127547],[127552,127560],[127568,127569],[127584,127589],[127744,127776],[127789,127797],[127799,127868],[127870,127891],[127904,127946],[127951,127955],[127968,127984],[127988,127988],[127992,128062],[128064,128064],[128066,128252],[128255,128317],[128331,128334],[128336,128359],[128378,128378],[128405,128406],[128420,128420],[128507,128591],[128640,128709],[128716,128716],[128720,128722],[128725,128725],[128747,128748],[128756,128762],[128992,129003],[129293,129393],[129395,129398],[129402,129442],[129445,129450],[129454,129482],[129485,129535],[129648,129651],[129656,129658],[129664,129666],[129680,129685],[131072,196605],[196608,262141]];let T;function E(m,_){let v,S=0,x=_.length-1;if(m<_[0][0]||m>_[x][1])return!1;for(;x>=S;)if(v=S+x>>1,m>_[v][1])S=v+1;else{if(!(m<_[v][0]))return!0;x=v-1}return!1}o.UnicodeV11=class{constructor(){if(this.version="11",!T){T=new Uint8Array(65536),T.fill(1),T[0]=0,T.fill(0,1,32),T.fill(0,127,160);for(let m=0;m<g.length;++m)T.fill(0,g[m][0],g[m][1]+1);for(let m=0;m<b.length;++m)T.fill(2,b[m][0],b[m][1]+1)}}wcwidth(m){return m<32?0:m<127?1:m<65536?T[m]:E(m,h)?0:E(m,y)?2:1}charProperties(m,_){let v=this.wcwidth(m),S=v===0&&_!==0;if(S){const x=c.UnicodeService.extractWidth(_);x===0?S=!1:x>v&&(v=x)}return c.UnicodeService.createPropertyValue(0,v,S)}}},345:(d,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.runAndSubscribe=o.forwardEvent=o.EventEmitter=void 0,o.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=l=>(this._listeners.push(l),{dispose:()=>{if(!this._disposed){for(let c=0;c<this._listeners.length;c++)if(this._listeners[c]===l)return void this._listeners.splice(c,1)}}})),this._event}fire(l,c){const g=[];for(let h=0;h<this._listeners.length;h++)g.push(this._listeners[h]);for(let h=0;h<g.length;h++)g[h].call(void 0,l,c)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},o.forwardEvent=function(l,c){return l((g=>c.fire(g)))},o.runAndSubscribe=function(l,c){return c(void 0),l((g=>c(g)))}},490:(d,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeV6=void 0;const c=l(938),g=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],h=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];let b;o.UnicodeV6=class{constructor(){if(this.version="6",!b){b=new Uint8Array(65536),b.fill(1),b[0]=0,b.fill(0,1,32),b.fill(0,127,160),b.fill(2,4352,4448),b[9001]=2,b[9002]=2,b.fill(2,11904,42192),b[12351]=1,b.fill(2,44032,55204),b.fill(2,63744,64256),b.fill(2,65040,65050),b.fill(2,65072,65136),b.fill(2,65280,65377),b.fill(2,65504,65511);for(let y=0;y<g.length;++y)b.fill(0,g[y][0],g[y][1]+1)}}wcwidth(y){return y<32?0:y<127?1:y<65536?b[y]:(function(T,E){let m,_=0,v=E.length-1;if(T<E[0][0]||T>E[v][1])return!1;for(;v>=_;)if(m=_+v>>1,T>E[m][1])_=m+1;else{if(!(T<E[m][0]))return!0;v=m-1}return!1})(y,h)?0:y>=131072&&y<=196605||y>=196608&&y<=262141?2:1}charProperties(y,T){let E=this.wcwidth(y),m=E===0&&T!==0;if(m){const _=c.UnicodeService.extractWidth(T);_===0?m=!1:_>E&&(E=_)}return c.UnicodeService.createPropertyValue(0,E,m)}}},938:(d,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeService=void 0;const c=l(345),g=l(490);class h{static extractShouldJoin(y){return(1&y)!=0}static extractWidth(y){return y>>1&3}static extractCharKind(y){return y>>3}static createPropertyValue(y,T,E=!1){return(16777215&y)<<3|(3&T)<<1|(E?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new c.EventEmitter,this.onChange=this._onChange.event;const y=new g.UnicodeV6;this.register(y),this._active=y.version,this._activeProvider=y}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(y){if(!this._providers[y])throw new Error(`unknown Unicode version "${y}"`);this._active=y,this._activeProvider=this._providers[y],this._onChange.fire(y)}register(y){this._providers[y.version]=y}wcwidth(y){return this._activeProvider.wcwidth(y)}getStringCellWidth(y){let T=0,E=0;const m=y.length;for(let _=0;_<m;++_){let v=y.charCodeAt(_);if(55296<=v&&v<=56319){if(++_>=m)return T+this.wcwidth(v);const k=y.charCodeAt(_);56320<=k&&k<=57343?v=1024*(v-55296)+k-56320+65536:T+=this.wcwidth(k)}const S=this.charProperties(v,E);let x=h.extractWidth(S);h.extractShouldJoin(S)&&(x-=h.extractWidth(E)),T+=x,E=S}return T}charProperties(y,T){return this._activeProvider.charProperties(y,T)}}o.UnicodeService=h}},s={};function u(d){var o=s[d];if(o!==void 0)return o.exports;var l=s[d]={exports:{}};return i[d](l,l.exports,u),l.exports}var p={};return(()=>{var d=p;Object.defineProperty(d,"__esModule",{value:!0}),d.Unicode11Addon=void 0;const o=u(433);d.Unicode11Addon=class{activate(l){l.unicode.register(new o.UnicodeV11)}dispose(){}}})(),p})()))})(oc)),oc.exports}var Jw=Zw();const e3=16,t3=256*1024,g1=50;function n3(e,t){const i=B.useRef(null),s=B.useRef(null),u=B.useRef(null),p=B.useRef(t);p.current=t;const d=B.useRef([]),o=B.useRef(0),l=B.useRef(null),c=B.useRef(null),g=B.useRef(null),h=B.useRef(0),b=B.useRef(null),y=B.useRef(null),T=B.useRef(null),E=B.useRef(!0),m=B.useRef(!0),[_,v]=B.useState(!1),S=B.useRef(!1),x=B.useRef(!1),k=B.useRef(0),A=20,O=B.useRef(0);B.useEffect(()=>{if(!e.current)return;const q=()=>{if(!i.current||d.current.length===0)return;const ue=d.current.join("");d.current=[],o.current=0,i.current.write(ue)};g.current=q;const Y=(ue,ee)=>{const G=T.current;if(G&&G.cols===ue&&G.rows===ee)return;const ae=Date.now()-h.current,xe=()=>{var Pe;h.current=Date.now(),((Pe=p.current)==null?void 0:Pe.call(p,ue,ee))!==!1&&(T.current={cols:ue,rows:ee})};if(ae>=g1){xe();return}y.current={cols:ue,rows:ee},b.current||(b.current=setTimeout(()=>{var Pe;b.current=null;const ye=y.current;y.current=null,ye&&(h.current=Date.now(),((Pe=p.current)==null?void 0:Pe.call(p,ye.cols,ye.rows))!==!1&&(T.current={cols:ye.cols,rows:ye.rows}))},g1-ae))},K=new Yw.Terminal({disableStdin:!0,fontSize:14,fontFamily:"'JetBrains Mono', 'Menlo', 'Monaco', 'Courier New', monospace",theme:{background:"#0d1117",foreground:"#e6edf3",cursor:"#e6edf3",selectionBackground:"#264f78",black:"#484f58",red:"#ff7b72",green:"#3fb950",yellow:"#d29922",blue:"#58a6ff",magenta:"#bc8cff",cyan:"#39c5cf",white:"#b1bac4",brightBlack:"#6e7681",brightRed:"#ffa198",brightGreen:"#56d364",brightYellow:"#e3b341",brightBlue:"#79c0ff",brightMagenta:"#d2a8ff",brightCyan:"#56d4dd",brightWhite:"#f0f6fc"},scrollback:5e4}),Q=new Kw.FitAddon;K.loadAddon(Q);try{const ue=new Jw.Unicode11Addon;K.loadAddon(ue),K.unicode.activeVersion="11"}catch{}K.open(e.current);try{const ue=new Xw.WebglAddon;K.loadAddon(ue),ue.onContextLoss(()=>{ue.dispose()})}catch{}Q.fit(),requestAnimationFrame(()=>{i.current&&Y(i.current.cols,i.current.rows)}),i.current=K,s.current=Q,O.current=K.buffer.active.viewportY;const H=(ue,ee)=>{Q.fit(),Y(K.cols,K.rows)};u.current=H;const M=new ResizeObserver(()=>{Q.fit(),Y(K.cols,K.rows)});M.observe(e.current),K.onScroll(()=>{if(S.current)return;const ue=K.buffer.active,ee=ue.viewportY,G=ee>=ue.length-K.rows;O.current-ee>0&&!G&&(E.current=!1),O.current=ee,m.current=G,G&&(E.current=!0),v(!E.current&&!G)});const U=e.current,$=ue=>{var G;const ee=(G=ue.touches)==null?void 0:G[0];ee&&(x.current=!0,k.current=ee.clientY)},j=ue=>{var le;const ee=(le=ue.touches)==null?void 0:le[0];if(!ee)return;if(ee.clientY-k.current>A){if(!(K.buffer.active.length>K.rows))return;E.current=!1,v(!0)}},re=()=>{x.current=!1},_e=ue=>{if(ue.deltaY<0){if(!(K.buffer.active.length>K.rows))return;E.current=!1,v(!0)}};return U.addEventListener("touchstart",$,{passive:!0}),U.addEventListener("touchmove",j,{passive:!0}),U.addEventListener("touchend",re,{passive:!0}),U.addEventListener("wheel",_e,{passive:!0}),()=>{U.removeEventListener("touchstart",$),U.removeEventListener("touchmove",j),U.removeEventListener("touchend",re),U.removeEventListener("wheel",_e),M.disconnect(),b.current&&(clearTimeout(b.current),b.current=null),l.current!==null&&(cancelAnimationFrame(l.current),l.current=null),c.current&&(clearTimeout(c.current),c.current=null),q(),K.dispose(),i.current=null,s.current=null,u.current=null,g.current=null}},[e]);const D=B.useCallback(()=>{const q=i.current;if(!q||x.current)return;if(E.current){S.current=!0,q.scrollToBottom(),S.current=!1,O.current=q.buffer.active.viewportY;return}const Y=q.buffer.active,K=Y.viewportY>=Y.length-q.rows;K!==m.current&&(m.current=K,v(!K))},[]),N=B.useCallback((q,Y)=>{var K;if(!q){Y==null||Y();return}if(d.current.push(q),o.current+=q.length,o.current>=t3){(K=g.current)==null||K.call(g),D(),Y==null||Y();return}l.current===null&&(l.current=requestAnimationFrame(()=>{var Q;l.current=null,c.current&&(clearTimeout(c.current),c.current=null),(Q=g.current)==null||Q.call(g),D()})),c.current||(c.current=setTimeout(()=>{var Q;c.current=null,(Q=g.current)==null||Q.call(g),D()},e3)),Y==null||Y()},[]),L=B.useCallback(()=>{var q;(q=i.current)==null||q.clear()},[]),F=B.useCallback(()=>{var q;(q=i.current)==null||q.reset()},[]),I=B.useCallback(()=>{const q=i.current;q&&(S.current=!0,q.scrollToBottom(),S.current=!1,O.current=q.buffer.active.viewportY)},[]),z=B.useCallback(q=>{E.current=q,q&&v(!1)},[]),W=B.useCallback((q,Y)=>{var K;(K=u.current)==null||K.call(u,q,Y)},[]);return{write:N,clear:L,reset:F,scrollToBottom:I,setAutoFollow:z,showScrollHint:_,adaptToPtyCols:W,terminal:i}}function i3(){const[e,t]=B.useState(0),[i,s]=B.useState(!1),u=B.useRef(null),p=B.useRef(!1);B.useEffect(()=>{const g=navigator.userAgent;p.current=/android/i.test(g)&&!/windows phone/i.test(g),console.log("[viewport] Device detection:",{isAndroid:p.current,ua:g})},[]);const d=B.useCallback(()=>{const g=document.activeElement;if((g==null?void 0:g.tagName)!=="INPUT"&&(g==null?void 0:g.tagName)!=="TEXTAREA")return!1;const h=window.visualViewport;if(!h)return!1;const b=g.getBoundingClientRect(),y=b.bottom>h.height+h.offsetTop-10;return console.log("[viewport] checkOcclusion",{elementTag:g.tagName,rectBottom:Math.round(b.bottom),vvHeight:Math.round(h.height),vvOffsetTop:Math.round(h.offsetTop),threshold:Math.round(h.height+h.offsetTop-10),occluded:y,isAndroid:p.current}),y},[]),o=B.useCallback(()=>{const g=window.visualViewport;if(!g){console.log("[viewport] updateViewport: no visualViewport"),t(0),s(!1);return}if(console.log("[viewport] updateViewport start",{vvOffsetTop:Math.round(g.offsetTop),vvHeight:Math.round(g.height),windowInnerHeight:window.innerHeight,isAndroid:p.current}),p.current){console.log("[viewport] updateViewport: Android detected, skipping JS compensation"),t(0),s(!1);return}const h=d();s(h),h?(console.log("[viewport] updateViewport: iOS setting offsetTop",Math.round(g.offsetTop)),t(g.offsetTop)):(console.log("[viewport] updateViewport: iOS clearing offsetTop (not occluded)"),t(0))},[d]),l=B.useCallback(()=>{var b;const g=window.visualViewport;if(!g)return;if(console.log("[viewport] updateViewportImmediate (focusin/focusout)",{vvOffsetTop:Math.round(g.offsetTop),vvHeight:Math.round(g.height),activeElement:(b=document.activeElement)==null?void 0:b.tagName,isAndroid:p.current}),p.current){console.log("[viewport] updateViewportImmediate: Android detected, skipping"),s(!1),t(0);return}const h=d();s(h),h?console.log("[viewport] updateViewportImmediate: focusin detected occlusion, waiting for resize"):(console.log("[viewport] updateViewportImmediate: clearing offsetTop (focusout/not occluded)"),t(0))},[d]),c=B.useCallback(()=>{console.log("[viewport] debouncedUpdate triggered (visualViewport resize/scroll)"),u.current&&clearTimeout(u.current),u.current=setTimeout(o,150)},[o]);return B.useEffect(()=>{const g=window.visualViewport;if(g)return t(0),g.addEventListener("resize",c),g.addEventListener("scroll",c),document.addEventListener("focusin",l,!0),document.addEventListener("focusout",l,!0),()=>{g.removeEventListener("resize",c),g.removeEventListener("scroll",c),document.removeEventListener("focusin",l,!0),document.removeEventListener("focusout",l,!0),u.current&&clearTimeout(u.current)}},[c,l]),{offsetTop:e,needsCompensation:i}}function r3(e){const t="=".repeat((4-e.length%4)%4),i=(e+t).replace(/-/g,"+").replace(/_/g,"/"),s=atob(i),u=new Uint8Array(s.length);for(let p=0;p<s.length;p++)u[p]=s.charCodeAt(p);return u}function s3(){const e=B.useRef(!1);B.useEffect(()=>{if(!e.current){if(e.current=!0,!("serviceWorker"in navigator)||!("PushManager"in window)){console.log("[Push] Service Worker or PushManager not supported");return}(async()=>{try{console.log("[Push] Registering service worker...");const t=await navigator.serviceWorker.register("/sw.js");console.log("[Push] Service worker registered:",t.scope);const i=await t.pushManager.getSubscription();if(i){console.log("[Push] Already subscribed, endpoint:",i.endpoint);return}console.log("[Push] Fetching VAPID key from server...");let s="";for(let l=0;l<8;l++){const c=await fetch("/api/push/vapid-key",{credentials:"include"});if(c.ok){const g=await c.json();if(g!=null&&g.vapidPublicKey){s=g.vapidPublicKey,console.log("[Push] Got VAPID key:",s.substring(0,20)+"...");break}}else console.log("[Push] VAPID key fetch failed, attempt",l+1,"status:",c.status);await new Promise(g=>setTimeout(g,Math.min(300*(l+1),1500)))}if(!s){console.warn("[Push] Failed to get VAPID key after retries");return}console.log("[Push] Requesting notification permission...");const u=await Notification.requestPermission();if(console.log("[Push] Permission result:",u),u!=="granted"){console.warn("[Push] Notification permission not granted");return}console.log("[Push] Creating push subscription...");const p=await t.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:r3(s)});console.log("[Push] Subscription created:",p.endpoint);const d=p.toJSON();console.log("[Push] Sending subscription to server...");const o=await fetch("/api/push/subscribe",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({endpoint:d.endpoint,keys:d.keys})});o.ok?console.log("[Push] Subscription sent to server successfully"):console.error("[Push] Failed to send subscription, status:",o.status)}catch(t){console.error("[Push] Setup failed:",t)}})()}},[])}function a3(){const e=B.useRef("default"),t=B.useRef(null);B.useEffect(()=>{"Notification"in window&&(e.current=Notification.permission)},[]);const i=B.useCallback(async()=>{if(!("Notification"in window))return console.log("[useLocalNotification] Notification API not supported"),!1;if(Notification.permission==="granted")return e.current="granted",!0;if(Notification.permission==="denied")return console.log("[useLocalNotification] Notification permission denied"),!1;const u=await Notification.requestPermission();return e.current=u,u==="granted"},[]);return{showNotification:B.useCallback(async u=>{if(u.tag&&u.tag===t.current)return console.log("[useLocalNotification] Skipping duplicate notification with tag:",u.tag),!1;if(e.current!=="granted"&&!await i())return console.log("[useLocalNotification] Permission not granted, cannot show notification"),!1;try{const p=new Notification(u.title,{body:u.body,tag:u.tag,icon:"/favicon.ico"});return p.onclick=()=>{window.focus(),p.close()},u.tag&&(t.current=u.tag),console.log("[useLocalNotification] Notification shown:",u.title),!0}catch(p){return console.error("[useLocalNotification] Failed to show notification:",p),!1}},[i]),requestPermission:i}}const o3=5e3;function l3(){const e=qn(s=>s.setInstances),t=qn(s=>s.setActiveInstanceId),i=bt(s=>s.setServerAvailable);return B.useRef(!1),B.useEffect(()=>{let s,u=!1;const p=async()=>{try{const o=await ZE();if(u)return;i(!0),e(o);const l=qn.getState().activeInstanceId,c=l&&o.some(g=>g.instanceId===l);if((!l||!c)&&o.length>0){const g=o.find(h=>h.isCurrent)??o[0];g&&t(g.instanceId)}}catch{if(u)return;document.visibilityState==="visible"&&(i(!1),e([]))}},d=()=>{document.visibilityState==="visible"&&p()};return p(),s=setInterval(p,o3),document.addEventListener("visibilitychange",d),()=>{u=!0,s&&clearInterval(s),document.removeEventListener("visibilitychange",d)}},[e,t,i]),{activeInstanceId:qn(s=>s.activeInstanceId)}}function u3({wsUrl:e,instanceId:t,showCommandPicker:i,isKeyboardOpen:s}){const u=B.useRef(null),p=B.useRef(null),d=bt(q=>q.setSessionStatus),o=bt(q=>q.setIpChangeInfo),l=bt(q=>q.setInstanceConnectionStatus),{showNotification:c}=a3(),g=B.useRef(null),h=B.useRef((q,Y)=>{}),b=B.useRef(()=>{}),y=B.useRef(()=>{}),T=B.useRef((q,Y)=>{}),E=B.useCallback(q=>{switch(q.type){case"terminal_output":h.current(q.data);break;case"history_sync":b.current(),T.current(0,0),h.current(q.data),d(q.status);break;case"terminal_resize":q.cols&&q.cols>0&&T.current(q.cols,q.rows);break;case"status_update":d(q.status),q.status==="waiting_input"&&c({title:"Claude Code 需要输入",body:q.detail??"Claude 正在等待你的输入",tag:"claude-waiting-input",renotify:!1});break;case"session_ended":d("idle"),t&&l(t,"disconnected");break;case"error":h.current(`\r
151
- \x1B[31m[Error] ${q.message}\x1B[0m\r
152
- `);break;case"heartbeat":break;case"ip_changed":o({oldIp:q.oldIp,newIp:q.newIp,newUrl:q.newUrl});break}},[d,o,c]),{connect:m,send:_}=Ww(E,e,t);g.current=_;const{write:v,reset:S,scrollToBottom:x,setAutoFollow:k,showScrollHint:A,adaptToPtyCols:O}=n3(u,B.useCallback((q,Y)=>{var K;return((K=g.current)==null?void 0:K.call(g,{type:"resize",cols:q,rows:Y}))??!1},[]));h.current=v,b.current=S,y.current=x,T.current=O;const D=B.useRef(!1);B.useEffect(()=>{D.current||(D.current=!0,m())},[m]);const N=B.useCallback(q=>{q?(_({type:"user_input",data:q}),setTimeout(()=>{_({type:"user_input",data:"\r"})},0)):_({type:"user_input",data:"\r"})},[_]),L=B.useCallback(q=>{_({type:"user_input",data:q})},[_]),F=B.useCallback(q=>{var Y;(Y=p.current)==null||Y.setText(q)},[]),I=B.useCallback(q=>{_({type:"user_input",data:q}),_({type:"user_input",data:"\r"})},[_]),z=B.useCallback(()=>{x(),k(!0)},[x,k]),W=B.useCallback(()=>{var q;(q=p.current)==null||q.focus()},[]);return X.jsxs(X.Fragment,{children:[X.jsx(Ew,{}),X.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden"},children:[X.jsx(pw,{containerRef:u,onFocusInput:W}),X.jsx(Lw,{visible:A,onClick:z})]}),X.jsx(bw,{onShortcut:L,onCommandSelect:F,onCommandSend:I,visible:i}),X.jsx(gw,{ref:p,onSend:N,isKeyboardOpen:s})]})}function c3(e,t){return e.filter(i=>i.instanceId!==t).sort((i,s)=>i.startedAt.localeCompare(s.startedAt))}function h3(){const{offsetTop:e,needsCompensation:t}=i3(),i=t&&e>0,s=!i;s3(),l3();const u=qn(S=>S.instances),p=qn(S=>S.activeInstanceId),d=qn(S=>S.setActiveInstanceId),o=bt(S=>S.cachedToken),l=bt(S=>S.serverAvailable),c=bt(S=>S.instanceConnectionStatus),g=bt(S=>S.toastMessage),h=bt(S=>S.toastPersistent),b=bt(S=>S.hideToast),y=B.useRef(!1),T=B.useRef(null),E=u.find(S=>S.instanceId===p),m=p?vw(p):void 0;B.useEffect(()=>{if(!p||l===!1)return;const S=!E,x=c[p]==="disconnected";if(!(S||x)||y.current||T.current===p)return;const A=c3(u,p);if(A.length===0)return;y.current=!0,T.current=p,(async()=>{if(o)try{await Ki(o)}catch{}const D=A[0];d(D.instanceId),y.current=!1})()},[E,p,o,c,u,l,d]),B.useEffect(()=>{if(!g||h)return;const S=setTimeout(()=>b(),3e3);return()=>clearTimeout(S)},[g,h,b]);const _=B.useCallback(async S=>{if(o)try{await Ki(o)}catch{}d(S)},[o,d]),v=B.useCallback(async S=>{d(S.instanceId)},[d]);return X.jsxs("div",{"data-testid":"console--page",style:{position:"fixed",top:0,left:0,right:0,height:"100dvh",transform:t?`translateY(-${e}px)`:"none",transition:"transform 0.25s ease-out",willChange:t?"transform":"auto",display:"flex",flexDirection:"column"},children:[X.jsx(fw,{}),X.jsx(kw,{onSwitch:_,onCreateSuccess:v}),X.jsx("div",{style:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden"},children:X.jsx(u3,{wsUrl:m,instanceId:p??void 0,showCommandPicker:s,isKeyboardOpen:i},p??"default")}),g&&X.jsx("div",{"data-testid":"toast--message",className:"app-toast app-toast-top",role:"status","aria-live":"polite",children:g}),X.jsx($w,{})]})}function m1(e){const t=[],i=String(e||"");let s=i.indexOf(","),u=0,p=!1;for(;!p;){s===-1&&(s=i.length,p=!0);const d=i.slice(u,s).trim();(d||!p)&&t.push(d),u=s+1,s=i.indexOf(",",u)}return t}function nv(e,t){const i={};return(e[e.length-1]===""?[...e,""]:e).join((i.padRight?" ":"")+","+(i.padLeft===!1?"":" ")).trim()}const d3=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,f3=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,p3={};function _1(e,t){return(p3.jsx?f3:d3).test(e)}const g3=/[ \t\n\f\r]/g;function m3(e){return typeof e=="object"?e.type==="text"?b1(e.value):!1:b1(e)}function b1(e){return e.replace(g3,"")===""}class El{constructor(t,i,s){this.normal=i,this.property=t,s&&(this.space=s)}}El.prototype.normal={};El.prototype.property={};El.prototype.space=void 0;function iv(e,t){const i={},s={};for(const u of e)Object.assign(i,u.property),Object.assign(s,u.normal);return new El(i,s,t)}function ul(e){return e.toLowerCase()}class ri{constructor(t,i){this.attribute=i,this.property=t}}ri.prototype.attribute="";ri.prototype.booleanish=!1;ri.prototype.boolean=!1;ri.prototype.commaOrSpaceSeparated=!1;ri.prototype.commaSeparated=!1;ri.prototype.defined=!1;ri.prototype.mustUseProperty=!1;ri.prototype.number=!1;ri.prototype.overloadedBoolean=!1;ri.prototype.property="";ri.prototype.spaceSeparated=!1;ri.prototype.space=void 0;let _3=0;const lt=ks(),mn=ks(),zf=ks(),Re=ks(),qt=ks(),Ca=ks(),gi=ks();function ks(){return 2**++_3}const jf=Object.freeze(Object.defineProperty({__proto__:null,boolean:lt,booleanish:mn,commaOrSpaceSeparated:gi,commaSeparated:Ca,number:Re,overloadedBoolean:zf,spaceSeparated:qt},Symbol.toStringTag,{value:"Module"})),lf=Object.keys(jf);class y0 extends ri{constructor(t,i,s,u){let p=-1;if(super(t,i),E1(this,"space",u),typeof s=="number")for(;++p<lf.length;){const d=lf[p];E1(this,lf[p],(s&jf[d])===jf[d])}}}y0.prototype.defined=!0;function E1(e,t,i){i&&(e[t]=i)}function Na(e){const t={},i={};for(const[s,u]of Object.entries(e.properties)){const p=new y0(s,e.transform(e.attributes||{},s),u,e.space);e.mustUseProperty&&e.mustUseProperty.includes(s)&&(p.mustUseProperty=!0),t[s]=p,i[ul(s)]=s,i[ul(p.attribute)]=s}return new El(t,i,e.space)}const rv=Na({properties:{ariaActiveDescendant:null,ariaAtomic:mn,ariaAutoComplete:null,ariaBusy:mn,ariaChecked:mn,ariaColCount:Re,ariaColIndex:Re,ariaColSpan:Re,ariaControls:qt,ariaCurrent:null,ariaDescribedBy:qt,ariaDetails:null,ariaDisabled:mn,ariaDropEffect:qt,ariaErrorMessage:null,ariaExpanded:mn,ariaFlowTo:qt,ariaGrabbed:mn,ariaHasPopup:null,ariaHidden:mn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:qt,ariaLevel:Re,ariaLive:null,ariaModal:mn,ariaMultiLine:mn,ariaMultiSelectable:mn,ariaOrientation:null,ariaOwns:qt,ariaPlaceholder:null,ariaPosInSet:Re,ariaPressed:mn,ariaReadOnly:mn,ariaRelevant:null,ariaRequired:mn,ariaRoleDescription:qt,ariaRowCount:Re,ariaRowIndex:Re,ariaRowSpan:Re,ariaSelected:mn,ariaSetSize:Re,ariaSort:null,ariaValueMax:Re,ariaValueMin:Re,ariaValueNow:Re,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function sv(e,t){return t in e?e[t]:t}function av(e,t){return sv(e,t.toLowerCase())}const b3=Na({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ca,acceptCharset:qt,accessKey:qt,action:null,allow:null,allowFullScreen:lt,allowPaymentRequest:lt,allowUserMedia:lt,alt:null,as:null,async:lt,autoCapitalize:null,autoComplete:qt,autoFocus:lt,autoPlay:lt,blocking:qt,capture:null,charSet:null,checked:lt,cite:null,className:qt,cols:Re,colSpan:null,content:null,contentEditable:mn,controls:lt,controlsList:qt,coords:Re|Ca,crossOrigin:null,data:null,dateTime:null,decoding:null,default:lt,defer:lt,dir:null,dirName:null,disabled:lt,download:zf,draggable:mn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:lt,formTarget:null,headers:qt,height:Re,hidden:zf,high:Re,href:null,hrefLang:null,htmlFor:qt,httpEquiv:qt,id:null,imageSizes:null,imageSrcSet:null,inert:lt,inputMode:null,integrity:null,is:null,isMap:lt,itemId:null,itemProp:qt,itemRef:qt,itemScope:lt,itemType:qt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:lt,low:Re,manifest:null,max:null,maxLength:Re,media:null,method:null,min:null,minLength:Re,multiple:lt,muted:lt,name:null,nonce:null,noModule:lt,noValidate:lt,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:lt,optimum:Re,pattern:null,ping:qt,placeholder:null,playsInline:lt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:lt,referrerPolicy:null,rel:qt,required:lt,reversed:lt,rows:Re,rowSpan:Re,sandbox:qt,scope:null,scoped:lt,seamless:lt,selected:lt,shadowRootClonable:lt,shadowRootDelegatesFocus:lt,shadowRootMode:null,shape:null,size:Re,sizes:null,slot:null,span:Re,spellCheck:mn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Re,step:null,style:null,tabIndex:Re,target:null,title:null,translate:null,type:null,typeMustMatch:lt,useMap:null,value:mn,width:Re,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:qt,axis:null,background:null,bgColor:null,border:Re,borderColor:null,bottomMargin:Re,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:lt,declare:lt,event:null,face:null,frame:null,frameBorder:null,hSpace:Re,leftMargin:Re,link:null,longDesc:null,lowSrc:null,marginHeight:Re,marginWidth:Re,noResize:lt,noHref:lt,noShade:lt,noWrap:lt,object:null,profile:null,prompt:null,rev:null,rightMargin:Re,rules:null,scheme:null,scrolling:mn,standby:null,summary:null,text:null,topMargin:Re,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Re,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:lt,disableRemotePlayback:lt,prefix:null,property:null,results:Re,security:null,unselectable:null},space:"html",transform:av}),E3=Na({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",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:gi,accentHeight:Re,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Re,amplitude:Re,arabicForm:null,ascent:Re,attributeName:null,attributeType:null,azimuth:Re,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Re,by:null,calcMode:null,capHeight:Re,className:qt,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:Re,diffuseConstant:Re,direction:null,display:null,dur:null,divisor:Re,dominantBaseline:null,download:lt,dx:null,dy:null,edgeMode:null,editable:null,elevation:Re,enableBackground:null,end:null,event:null,exponent:Re,externalResourcesRequired:null,fill:null,fillOpacity:Re,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:Ca,g2:Ca,glyphName:Ca,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Re,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Re,horizOriginX:Re,horizOriginY:Re,id:null,ideographic:Re,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Re,k:Re,k1:Re,k2:Re,k3:Re,k4:Re,kernelMatrix:gi,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Re,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Re,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:Re,overlineThickness:Re,paintOrder:null,panose1:null,path:null,pathLength:Re,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:qt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Re,pointsAtY:Re,pointsAtZ:Re,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:gi,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:gi,rev:gi,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:gi,requiredFeatures:gi,requiredFonts:gi,requiredFormats:gi,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:Re,specularExponent:Re,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Re,strikethroughThickness:Re,string:null,stroke:null,strokeDashArray:gi,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Re,strokeOpacity:Re,strokeWidth:null,style:null,surfaceScale:Re,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:gi,tabIndex:Re,tableValues:null,target:null,targetX:Re,targetY:Re,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:gi,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Re,underlineThickness:Re,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Re,values:null,vAlphabetic:Re,vMathematical:Re,vectorEffect:null,vHanging:Re,vIdeographic:Re,version:null,vertAdvY:Re,vertOriginX:Re,vertOriginY:Re,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Re,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:sv}),ov=Na({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()}}),lv=Na({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:av}),uv=Na({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),v3={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"},S3=/[A-Z]/g,v1=/-[a-z]/g,y3=/^data[-\w.:]+$/i;function Lc(e,t){const i=ul(t);let s=t,u=ri;if(i in e.normal)return e.property[e.normal[i]];if(i.length>4&&i.slice(0,4)==="data"&&y3.test(t)){if(t.charAt(4)==="-"){const p=t.slice(5).replace(v1,T3);s="data"+p.charAt(0).toUpperCase()+p.slice(1)}else{const p=t.slice(4);if(!v1.test(p)){let d=p.replace(S3,C3);d.charAt(0)!=="-"&&(d="-"+d),t="data"+d}}u=y0}return new u(s,t)}function C3(e){return"-"+e.toLowerCase()}function T3(e){return e.charAt(1).toUpperCase()}const vl=iv([rv,b3,ov,lv,uv],"html"),ns=iv([rv,E3,ov,lv,uv],"svg");function S1(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function cv(e){return e.join(" ").trim()}var ga={},uf,y1;function A3(){if(y1)return uf;y1=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,i=/^\s*/,s=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,u=/^:\s*/,p=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,d=/^[;\s]*/,o=/^\s+|\s+$/g,l=`
153
- `,c="/",g="*",h="",b="comment",y="declaration";function T(m,_){if(typeof m!="string")throw new TypeError("First argument must be a string");if(!m)return[];_=_||{};var v=1,S=1;function x(W){var q=W.match(t);q&&(v+=q.length);var Y=W.lastIndexOf(l);S=~Y?W.length-Y:S+W.length}function k(){var W={line:v,column:S};return function(q){return q.position=new A(W),N(),q}}function A(W){this.start=W,this.end={line:v,column:S},this.source=_.source}A.prototype.content=m;function O(W){var q=new Error(_.source+":"+v+":"+S+": "+W);if(q.reason=W,q.filename=_.source,q.line=v,q.column=S,q.source=m,!_.silent)throw q}function D(W){var q=W.exec(m);if(q){var Y=q[0];return x(Y),m=m.slice(Y.length),q}}function N(){D(i)}function L(W){var q;for(W=W||[];q=F();)q!==!1&&W.push(q);return W}function F(){var W=k();if(!(c!=m.charAt(0)||g!=m.charAt(1))){for(var q=2;h!=m.charAt(q)&&(g!=m.charAt(q)||c!=m.charAt(q+1));)++q;if(q+=2,h===m.charAt(q-1))return O("End of comment missing");var Y=m.slice(2,q-2);return S+=2,x(Y),m=m.slice(q),S+=2,W({type:b,comment:Y})}}function I(){var W=k(),q=D(s);if(q){if(F(),!D(u))return O("property missing ':'");var Y=D(p),K=W({type:y,property:E(q[0].replace(e,h)),value:Y?E(Y[0].replace(e,h)):h});return D(d),K}}function z(){var W=[];L(W);for(var q;q=I();)q!==!1&&(W.push(q),L(W));return W}return N(),z()}function E(m){return m?m.replace(o,h):h}return uf=T,uf}var C1;function x3(){if(C1)return ga;C1=1;var e=ga&&ga.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(ga,"__esModule",{value:!0}),ga.default=i;const t=e(A3());function i(s,u){let p=null;if(!s||typeof s!="string")return p;const d=(0,t.default)(s),o=typeof u=="function";return d.forEach(l=>{if(l.type!=="declaration")return;const{property:c,value:g}=l;o?u(c,g,l):g&&(p=p||{},p[c]=g)}),p}return ga}var Bo={},T1;function w3(){if(T1)return Bo;T1=1,Object.defineProperty(Bo,"__esModule",{value:!0}),Bo.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,i=/^[^-]+$/,s=/^-(webkit|moz|ms|o|khtml)-/,u=/^-(ms)-/,p=function(c){return!c||i.test(c)||e.test(c)},d=function(c,g){return g.toUpperCase()},o=function(c,g){return"".concat(g,"-")},l=function(c,g){return g===void 0&&(g={}),p(c)?c:(c=c.toLowerCase(),g.reactCompat?c=c.replace(u,o):c=c.replace(s,o),c.replace(t,d))};return Bo.camelCase=l,Bo}var Fo,A1;function D3(){if(A1)return Fo;A1=1;var e=Fo&&Fo.__importDefault||function(u){return u&&u.__esModule?u:{default:u}},t=e(x3()),i=w3();function s(u,p){var d={};return!u||typeof u!="string"||(0,t.default)(u,function(o,l){o&&l&&(d[(0,i.camelCase)(o,p)]=l)}),d}return s.default=s,Fo=s,Fo}var R3=D3();const k3=Tc(R3),Oc=hv("end"),Xi=hv("start");function hv(e){return t;function t(i){const s=i&&i.position&&i.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 L3(e){const t=Xi(e),i=Oc(e);if(t&&i)return{start:t,end:i}}function Xo(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?x1(e.position):"start"in e||"end"in e?x1(e):"line"in e||"column"in e?$f(e):""}function $f(e){return w1(e&&e.line)+":"+w1(e&&e.column)}function x1(e){return $f(e&&e.start)+"-"+$f(e&&e.end)}function w1(e){return e&&typeof e=="number"?e:1}class In extends Error{constructor(t,i,s){super(),typeof i=="string"&&(s=i,i=void 0);let u="",p={},d=!1;if(i&&("line"in i&&"column"in i?p={place:i}:"start"in i&&"end"in i?p={place:i}:"type"in i?p={ancestors:[i],place:i.position}:p={...i}),typeof t=="string"?u=t:!p.cause&&t&&(d=!0,u=t.message,p.cause=t),!p.ruleId&&!p.source&&typeof s=="string"){const l=s.indexOf(":");l===-1?p.ruleId=s:(p.source=s.slice(0,l),p.ruleId=s.slice(l+1))}if(!p.place&&p.ancestors&&p.ancestors){const l=p.ancestors[p.ancestors.length-1];l&&(p.place=l.position)}const o=p.place&&"start"in p.place?p.place.start:p.place;this.ancestors=p.ancestors||void 0,this.cause=p.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file="",this.message=u,this.line=o?o.line:void 0,this.name=Xo(p.place)||"1:1",this.place=p.place||void 0,this.reason=this.message,this.ruleId=p.ruleId||void 0,this.source=p.source||void 0,this.stack=d&&p.cause&&typeof p.cause.stack=="string"?p.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}In.prototype.file="";In.prototype.name="";In.prototype.reason="";In.prototype.message="";In.prototype.stack="";In.prototype.column=void 0;In.prototype.line=void 0;In.prototype.ancestors=void 0;In.prototype.cause=void 0;In.prototype.fatal=void 0;In.prototype.place=void 0;In.prototype.ruleId=void 0;In.prototype.source=void 0;const C0={}.hasOwnProperty,O3=new Map,N3=/[A-Z]/g,M3=new Set(["table","tbody","thead","tfoot","tr"]),I3=new Set(["td","th"]),dv="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function B3(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const i=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=W3(i,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=$3(i,t.jsx,t.jsxs)}const u={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:s,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:i,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?ns:vl,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},p=fv(u,e,void 0);return p&&typeof p!="string"?p:u.create(e,u.Fragment,{children:p||void 0},void 0)}function fv(e,t,i){if(t.type==="element")return F3(e,t,i);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return P3(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return H3(e,t,i);if(t.type==="mdxjsEsm")return U3(e,t);if(t.type==="root")return z3(e,t,i);if(t.type==="text")return j3(e,t)}function F3(e,t,i){const s=e.schema;let u=s;t.tagName.toLowerCase()==="svg"&&s.space==="html"&&(u=ns,e.schema=u),e.ancestors.push(t);const p=gv(e,t.tagName,!1),d=q3(e,t);let o=A0(e,t);return M3.has(t.tagName)&&(o=o.filter(function(l){return typeof l=="string"?!m3(l):!0})),pv(e,d,p,t),T0(d,o),e.ancestors.pop(),e.schema=s,e.create(t,p,d,i)}function P3(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)}cl(e,t.position)}function U3(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);cl(e,t.position)}function H3(e,t,i){const s=e.schema;let u=s;t.name==="svg"&&s.space==="html"&&(u=ns,e.schema=u),e.ancestors.push(t);const p=t.name===null?e.Fragment:gv(e,t.name,!0),d=Y3(e,t),o=A0(e,t);return pv(e,d,p,t),T0(d,o),e.ancestors.pop(),e.schema=s,e.create(t,p,d,i)}function z3(e,t,i){const s={};return T0(s,A0(e,t)),e.create(t,e.Fragment,s,i)}function j3(e,t){return t.value}function pv(e,t,i,s){typeof i!="string"&&i!==e.Fragment&&e.passNode&&(t.node=s)}function T0(e,t){if(t.length>0){const i=t.length>1?t:t[0];i&&(e.children=i)}}function $3(e,t,i){return s;function s(u,p,d,o){const c=Array.isArray(d.children)?i:t;return o?c(p,d,o):c(p,d)}}function W3(e,t){return i;function i(s,u,p,d){const o=Array.isArray(p.children),l=Xi(s);return t(u,p,d,o,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function q3(e,t){const i={};let s,u;for(u in t.properties)if(u!=="children"&&C0.call(t.properties,u)){const p=G3(e,u,t.properties[u]);if(p){const[d,o]=p;e.tableCellAlignToStyle&&d==="align"&&typeof o=="string"&&I3.has(t.tagName)?s=o:i[d]=o}}if(s){const p=i.style||(i.style={});p[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=s}return i}function Y3(e,t){const i={};for(const s of t.attributes)if(s.type==="mdxJsxExpressionAttribute")if(s.data&&s.data.estree&&e.evaluater){const p=s.data.estree.body[0];p.type;const d=p.expression;d.type;const o=d.properties[0];o.type,Object.assign(i,e.evaluater.evaluateExpression(o.argument))}else cl(e,t.position);else{const u=s.name;let p;if(s.value&&typeof s.value=="object")if(s.value.data&&s.value.data.estree&&e.evaluater){const o=s.value.data.estree.body[0];o.type,p=e.evaluater.evaluateExpression(o.expression)}else cl(e,t.position);else p=s.value===null?!0:s.value;i[u]=p}return i}function A0(e,t){const i=[];let s=-1;const u=e.passKeys?new Map:O3;for(;++s<t.children.length;){const p=t.children[s];let d;if(e.passKeys){const l=p.type==="element"?p.tagName:p.type==="mdxJsxFlowElement"||p.type==="mdxJsxTextElement"?p.name:void 0;if(l){const c=u.get(l)||0;d=l+"-"+c,u.set(l,c+1)}}const o=fv(e,p,d);o!==void 0&&i.push(o)}return i}function G3(e,t,i){const s=Lc(e.schema,t);if(!(i==null||typeof i=="number"&&Number.isNaN(i))){if(Array.isArray(i)&&(i=s.commaSeparated?nv(i):cv(i)),s.property==="style"){let u=typeof i=="object"?i:K3(e,String(i));return e.stylePropertyNameCase==="css"&&(u=V3(u)),["style",u]}return[e.elementAttributeNameCase==="react"&&s.space?v3[s.property]||s.property:s.attribute,i]}}function K3(e,t){try{return k3(t,{reactCompat:!0})}catch(i){if(e.ignoreInvalidStyle)return{};const s=i,u=new In("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:s,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw u.file=e.filePath||void 0,u.url=dv+"#cannot-parse-style-attribute",u}}function gv(e,t,i){let s;if(!i)s={type:"Literal",value:t};else if(t.includes(".")){const u=t.split(".");let p=-1,d;for(;++p<u.length;){const o=_1(u[p])?{type:"Identifier",name:u[p]}:{type:"Literal",value:u[p]};d=d?{type:"MemberExpression",object:d,property:o,computed:!!(p&&o.type==="Literal"),optional:!1}:o}s=d}else s=_1(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(s.type==="Literal"){const u=s.value;return C0.call(e.components,u)?e.components[u]:u}if(e.evaluater)return e.evaluater.evaluateExpression(s);cl(e)}function cl(e,t){const i=new In("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=dv+"#cannot-handle-mdx-estrees-without-createevaluater",i}function V3(e){const t={};let i;for(i in e)C0.call(e,i)&&(t[X3(i)]=e[i]);return t}function X3(e){let t=e.replace(N3,Q3);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Q3(e){return"-"+e.toLowerCase()}const cf={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"]},Z3={};function x0(e,t){const i=Z3,s=typeof i.includeImageAlt=="boolean"?i.includeImageAlt:!0,u=typeof i.includeHtml=="boolean"?i.includeHtml:!0;return mv(e,s,u)}function mv(e,t,i){if(J3(e)){if("value"in e)return e.type==="html"&&!i?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return D1(e.children,t,i)}return Array.isArray(e)?D1(e,t,i):""}function D1(e,t,i){const s=[];let u=-1;for(;++u<e.length;)s[u]=mv(e[u],t,i);return s.join("")}function J3(e){return!!(e&&typeof e=="object")}const R1=document.createElement("i");function w0(e){const t="&"+e+";";R1.innerHTML=t;const i=R1.textContent;return i.charCodeAt(i.length-1)===59&&e!=="semi"||i===t?!1:i}function mi(e,t,i,s){const u=e.length;let p=0,d;if(t<0?t=-t>u?0:u+t:t=t>u?u:t,i=i>0?i:0,s.length<1e4)d=Array.from(s),d.unshift(t,i),e.splice(...d);else for(i&&e.splice(t,i);p<s.length;)d=s.slice(p,p+1e4),d.unshift(t,0),e.splice(...d),p+=1e4,t+=1e4}function Ri(e,t){return e.length>0?(mi(e,e.length,0,t),e):t}const k1={}.hasOwnProperty;function _v(e){const t={};let i=-1;for(;++i<e.length;)eD(t,e[i]);return t}function eD(e,t){let i;for(i in t){const u=(k1.call(e,i)?e[i]:void 0)||(e[i]={}),p=t[i];let d;if(p)for(d in p){k1.call(u,d)||(u[d]=[]);const o=p[d];tD(u[d],Array.isArray(o)?o:o?[o]:[])}}}function tD(e,t){let i=-1;const s=[];for(;++i<t.length;)(t[i].add==="after"?e:s).push(t[i]);mi(e,0,0,s)}function bv(e,t){const i=Number.parseInt(e,t);return i<9||i===11||i>13&&i<32||i>126&&i<160||i>55295&&i<57344||i>64975&&i<65008||(i&65535)===65535||(i&65535)===65534||i>1114111?"�":String.fromCodePoint(i)}function Bi(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Wn=is(/[A-Za-z]/),Mn=is(/[\dA-Za-z]/),nD=is(/[#-'*+\--9=?A-Z^-~]/);function mc(e){return e!==null&&(e<32||e===127)}const Wf=is(/\d/),iD=is(/[\dA-Fa-f]/),rD=is(/[!-/:-@[-`{-~]/);function Xe(e){return e!==null&&e<-2}function jt(e){return e!==null&&(e<0||e===32)}function ft(e){return e===-2||e===-1||e===32}const Nc=is(new RegExp("\\p{P}|\\p{S}","u")),Rs=is(/\s/);function is(e){return t;function t(i){return i!==null&&i>-1&&e.test(String.fromCharCode(i))}}function Ma(e){const t=[];let i=-1,s=0,u=0;for(;++i<e.length;){const p=e.charCodeAt(i);let d="";if(p===37&&Mn(e.charCodeAt(i+1))&&Mn(e.charCodeAt(i+2)))u=2;else if(p<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(p))||(d=String.fromCharCode(p));else if(p>55295&&p<57344){const o=e.charCodeAt(i+1);p<56320&&o>56319&&o<57344?(d=String.fromCharCode(p,o),u=1):d="�"}else d=String.fromCharCode(p);d&&(t.push(e.slice(s,i),encodeURIComponent(d)),s=i+u+1,d=""),u&&(i+=u,u=0)}return t.join("")+e.slice(s)}function Ct(e,t,i,s){const u=s?s-1:Number.POSITIVE_INFINITY;let p=0;return d;function d(l){return ft(l)?(e.enter(i),o(l)):t(l)}function o(l){return ft(l)&&p++<u?(e.consume(l),o):(e.exit(i),t(l))}}const sD={tokenize:aD};function aD(e){const t=e.attempt(this.parser.constructs.contentInitial,s,u);let i;return t;function s(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),Ct(e,t,"linePrefix")}function u(o){return e.enter("paragraph"),p(o)}function p(o){const l=e.enter("chunkText",{contentType:"text",previous:i});return i&&(i.next=l),i=l,d(o)}function d(o){if(o===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(o);return}return Xe(o)?(e.consume(o),e.exit("chunkText"),p):(e.consume(o),d)}}const oD={tokenize:lD},L1={tokenize:uD};function lD(e){const t=this,i=[];let s=0,u,p,d;return o;function o(S){if(s<i.length){const x=i[s];return t.containerState=x[1],e.attempt(x[0].continuation,l,c)(S)}return c(S)}function l(S){if(s++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,u&&v();const x=t.events.length;let k=x,A;for(;k--;)if(t.events[k][0]==="exit"&&t.events[k][1].type==="chunkFlow"){A=t.events[k][1].end;break}_(s);let O=x;for(;O<t.events.length;)t.events[O][1].end={...A},O++;return mi(t.events,k+1,0,t.events.slice(x)),t.events.length=O,c(S)}return o(S)}function c(S){if(s===i.length){if(!u)return b(S);if(u.currentConstruct&&u.currentConstruct.concrete)return T(S);t.interrupt=!!(u.currentConstruct&&!u._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(L1,g,h)(S)}function g(S){return u&&v(),_(s),b(S)}function h(S){return t.parser.lazy[t.now().line]=s!==i.length,d=t.now().offset,T(S)}function b(S){return t.containerState={},e.attempt(L1,y,T)(S)}function y(S){return s++,i.push([t.currentConstruct,t.containerState]),b(S)}function T(S){if(S===null){u&&v(),_(0),e.consume(S);return}return u=u||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:u,contentType:"flow",previous:p}),E(S)}function E(S){if(S===null){m(e.exit("chunkFlow"),!0),_(0),e.consume(S);return}return Xe(S)?(e.consume(S),m(e.exit("chunkFlow")),s=0,t.interrupt=void 0,o):(e.consume(S),E)}function m(S,x){const k=t.sliceStream(S);if(x&&k.push(null),S.previous=p,p&&(p.next=S),p=S,u.defineSkip(S.start),u.write(k),t.parser.lazy[S.start.line]){let A=u.events.length;for(;A--;)if(u.events[A][1].start.offset<d&&(!u.events[A][1].end||u.events[A][1].end.offset>d))return;const O=t.events.length;let D=O,N,L;for(;D--;)if(t.events[D][0]==="exit"&&t.events[D][1].type==="chunkFlow"){if(N){L=t.events[D][1].end;break}N=!0}for(_(s),A=O;A<t.events.length;)t.events[A][1].end={...L},A++;mi(t.events,D+1,0,t.events.slice(O)),t.events.length=A}}function _(S){let x=i.length;for(;x-- >S;){const k=i[x];t.containerState=k[1],k[0].exit.call(t,e)}i.length=S}function v(){u.write([null]),p=void 0,u=void 0,t.containerState._closeFlow=void 0}}function uD(e,t,i){return Ct(e,e.attempt(this.parser.constructs.document,t,i),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Aa(e){if(e===null||jt(e)||Rs(e))return 1;if(Nc(e))return 2}function Mc(e,t,i){const s=[];let u=-1;for(;++u<e.length;){const p=e[u].resolveAll;p&&!s.includes(p)&&(t=p(t,i),s.push(p))}return t}const qf={name:"attention",resolveAll:cD,tokenize:hD};function cD(e,t){let i=-1,s,u,p,d,o,l,c,g;for(;++i<e.length;)if(e[i][0]==="enter"&&e[i][1].type==="attentionSequence"&&e[i][1]._close){for(s=i;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[i][1]).charCodeAt(0)){if((e[s][1]._close||e[i][1]._open)&&(e[i][1].end.offset-e[i][1].start.offset)%3&&!((e[s][1].end.offset-e[s][1].start.offset+e[i][1].end.offset-e[i][1].start.offset)%3))continue;l=e[s][1].end.offset-e[s][1].start.offset>1&&e[i][1].end.offset-e[i][1].start.offset>1?2:1;const h={...e[s][1].end},b={...e[i][1].start};O1(h,-l),O1(b,l),d={type:l>1?"strongSequence":"emphasisSequence",start:h,end:{...e[s][1].end}},o={type:l>1?"strongSequence":"emphasisSequence",start:{...e[i][1].start},end:b},p={type:l>1?"strongText":"emphasisText",start:{...e[s][1].end},end:{...e[i][1].start}},u={type:l>1?"strong":"emphasis",start:{...d.start},end:{...o.end}},e[s][1].end={...d.start},e[i][1].start={...o.end},c=[],e[s][1].end.offset-e[s][1].start.offset&&(c=Ri(c,[["enter",e[s][1],t],["exit",e[s][1],t]])),c=Ri(c,[["enter",u,t],["enter",d,t],["exit",d,t],["enter",p,t]]),c=Ri(c,Mc(t.parser.constructs.insideSpan.null,e.slice(s+1,i),t)),c=Ri(c,[["exit",p,t],["enter",o,t],["exit",o,t],["exit",u,t]]),e[i][1].end.offset-e[i][1].start.offset?(g=2,c=Ri(c,[["enter",e[i][1],t],["exit",e[i][1],t]])):g=0,mi(e,s-1,i-s+3,c),i=s+c.length-g-2;break}}for(i=-1;++i<e.length;)e[i][1].type==="attentionSequence"&&(e[i][1].type="data");return e}function hD(e,t){const i=this.parser.constructs.attentionMarkers.null,s=this.previous,u=Aa(s);let p;return d;function d(l){return p=l,e.enter("attentionSequence"),o(l)}function o(l){if(l===p)return e.consume(l),o;const c=e.exit("attentionSequence"),g=Aa(l),h=!g||g===2&&u||i.includes(l),b=!u||u===2&&g||i.includes(s);return c._open=!!(p===42?h:h&&(u||!b)),c._close=!!(p===42?b:b&&(g||!h)),t(l)}}function O1(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const dD={name:"autolink",tokenize:fD};function fD(e,t,i){let s=0;return u;function u(y){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),p}function p(y){return Wn(y)?(e.consume(y),d):y===64?i(y):c(y)}function d(y){return y===43||y===45||y===46||Mn(y)?(s=1,o(y)):c(y)}function o(y){return y===58?(e.consume(y),s=0,l):(y===43||y===45||y===46||Mn(y))&&s++<32?(e.consume(y),o):(s=0,c(y))}function l(y){return y===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):y===null||y===32||y===60||mc(y)?i(y):(e.consume(y),l)}function c(y){return y===64?(e.consume(y),g):nD(y)?(e.consume(y),c):i(y)}function g(y){return Mn(y)?h(y):i(y)}function h(y){return y===46?(e.consume(y),s=0,g):y===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):b(y)}function b(y){if((y===45||Mn(y))&&s++<63){const T=y===45?b:h;return e.consume(y),T}return i(y)}}const Sl={partial:!0,tokenize:pD};function pD(e,t,i){return s;function s(p){return ft(p)?Ct(e,u,"linePrefix")(p):u(p)}function u(p){return p===null||Xe(p)?t(p):i(p)}}const Ev={continuation:{tokenize:mD},exit:_D,name:"blockQuote",tokenize:gD};function gD(e,t,i){const s=this;return u;function u(d){if(d===62){const o=s.containerState;return o.open||(e.enter("blockQuote",{_container:!0}),o.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(d),e.exit("blockQuoteMarker"),p}return i(d)}function p(d){return ft(d)?(e.enter("blockQuotePrefixWhitespace"),e.consume(d),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(d))}}function mD(e,t,i){const s=this;return u;function u(d){return ft(d)?Ct(e,p,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d):p(d)}function p(d){return e.attempt(Ev,t,i)(d)}}function _D(e){e.exit("blockQuote")}const vv={name:"characterEscape",tokenize:bD};function bD(e,t,i){return s;function s(p){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(p),e.exit("escapeMarker"),u}function u(p){return rD(p)?(e.enter("characterEscapeValue"),e.consume(p),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):i(p)}}const Sv={name:"characterReference",tokenize:ED};function ED(e,t,i){const s=this;let u=0,p,d;return o;function o(h){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),l}function l(h){return h===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(h),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),p=31,d=Mn,g(h))}function c(h){return h===88||h===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(h),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),p=6,d=iD,g):(e.enter("characterReferenceValue"),p=7,d=Wf,g(h))}function g(h){if(h===59&&u){const b=e.exit("characterReferenceValue");return d===Mn&&!w0(s.sliceSerialize(b))?i(h):(e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return d(h)&&u++<p?(e.consume(h),g):i(h)}}const N1={partial:!0,tokenize:SD},M1={concrete:!0,name:"codeFenced",tokenize:vD};function vD(e,t,i){const s=this,u={partial:!0,tokenize:k};let p=0,d=0,o;return l;function l(A){return c(A)}function c(A){const O=s.events[s.events.length-1];return p=O&&O[1].type==="linePrefix"?O[2].sliceSerialize(O[1],!0).length:0,o=A,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),g(A)}function g(A){return A===o?(d++,e.consume(A),g):d<3?i(A):(e.exit("codeFencedFenceSequence"),ft(A)?Ct(e,h,"whitespace")(A):h(A))}function h(A){return A===null||Xe(A)?(e.exit("codeFencedFence"),s.interrupt?t(A):e.check(N1,E,x)(A)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(A))}function b(A){return A===null||Xe(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),h(A)):ft(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ct(e,y,"whitespace")(A)):A===96&&A===o?i(A):(e.consume(A),b)}function y(A){return A===null||Xe(A)?h(A):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),T(A))}function T(A){return A===null||Xe(A)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),h(A)):A===96&&A===o?i(A):(e.consume(A),T)}function E(A){return e.attempt(u,x,m)(A)}function m(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),_}function _(A){return p>0&&ft(A)?Ct(e,v,"linePrefix",p+1)(A):v(A)}function v(A){return A===null||Xe(A)?e.check(N1,E,x)(A):(e.enter("codeFlowValue"),S(A))}function S(A){return A===null||Xe(A)?(e.exit("codeFlowValue"),v(A)):(e.consume(A),S)}function x(A){return e.exit("codeFenced"),t(A)}function k(A,O,D){let N=0;return L;function L(q){return A.enter("lineEnding"),A.consume(q),A.exit("lineEnding"),F}function F(q){return A.enter("codeFencedFence"),ft(q)?Ct(A,I,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(q):I(q)}function I(q){return q===o?(A.enter("codeFencedFenceSequence"),z(q)):D(q)}function z(q){return q===o?(N++,A.consume(q),z):N>=d?(A.exit("codeFencedFenceSequence"),ft(q)?Ct(A,W,"whitespace")(q):W(q)):D(q)}function W(q){return q===null||Xe(q)?(A.exit("codeFencedFence"),O(q)):D(q)}}}function SD(e,t,i){const s=this;return u;function u(d){return d===null?i(d):(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),p)}function p(d){return s.parser.lazy[s.now().line]?i(d):t(d)}}const hf={name:"codeIndented",tokenize:CD},yD={partial:!0,tokenize:TD};function CD(e,t,i){const s=this;return u;function u(c){return e.enter("codeIndented"),Ct(e,p,"linePrefix",5)(c)}function p(c){const g=s.events[s.events.length-1];return g&&g[1].type==="linePrefix"&&g[2].sliceSerialize(g[1],!0).length>=4?d(c):i(c)}function d(c){return c===null?l(c):Xe(c)?e.attempt(yD,d,l)(c):(e.enter("codeFlowValue"),o(c))}function o(c){return c===null||Xe(c)?(e.exit("codeFlowValue"),d(c)):(e.consume(c),o)}function l(c){return e.exit("codeIndented"),t(c)}}function TD(e,t,i){const s=this;return u;function u(d){return s.parser.lazy[s.now().line]?i(d):Xe(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),u):Ct(e,p,"linePrefix",5)(d)}function p(d){const o=s.events[s.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(d):Xe(d)?u(d):i(d)}}const AD={name:"codeText",previous:wD,resolve:xD,tokenize:DD};function xD(e){let t=e.length-4,i=3,s,u;if((e[i][1].type==="lineEnding"||e[i][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(s=i;++s<t;)if(e[s][1].type==="codeTextData"){e[i][1].type="codeTextPadding",e[t][1].type="codeTextPadding",i+=2,t-=2;break}}for(s=i-1,t++;++s<=t;)u===void 0?s!==t&&e[s][1].type!=="lineEnding"&&(u=s):(s===t||e[s][1].type==="lineEnding")&&(e[u][1].type="codeTextData",s!==u+2&&(e[u][1].end=e[s-1][1].end,e.splice(u+2,s-u-2),t-=s-u-2,s=u+2),u=void 0);return e}function wD(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function DD(e,t,i){let s=0,u,p;return d;function d(h){return e.enter("codeText"),e.enter("codeTextSequence"),o(h)}function o(h){return h===96?(e.consume(h),s++,o):(e.exit("codeTextSequence"),l(h))}function l(h){return h===null?i(h):h===32?(e.enter("space"),e.consume(h),e.exit("space"),l):h===96?(p=e.enter("codeTextSequence"),u=0,g(h)):Xe(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),l):(e.enter("codeTextData"),c(h))}function c(h){return h===null||h===32||h===96||Xe(h)?(e.exit("codeTextData"),l(h)):(e.consume(h),c)}function g(h){return h===96?(e.consume(h),u++,g):u===s?(e.exit("codeTextSequence"),e.exit("codeText"),t(h)):(p.type="codeTextData",c(h))}}class RD{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,i){const s=i??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,i,s){const u=i||0;this.setCursor(Math.trunc(t));const p=this.right.splice(this.right.length-u,Number.POSITIVE_INFINITY);return s&&Po(this.left,s),p.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),Po(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Po(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 i=this.left.splice(t,Number.POSITIVE_INFINITY);Po(this.right,i.reverse())}else{const i=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Po(this.left,i.reverse())}}}function Po(e,t){let i=0;if(t.length<1e4)e.push(...t);else for(;i<t.length;)e.push(...t.slice(i,i+1e4)),i+=1e4}function yv(e){const t={};let i=-1,s,u,p,d,o,l,c;const g=new RD(e);for(;++i<g.length;){for(;i in t;)i=t[i];if(s=g.get(i),i&&s[1].type==="chunkFlow"&&g.get(i-1)[1].type==="listItemPrefix"&&(l=s[1]._tokenizer.events,p=0,p<l.length&&l[p][1].type==="lineEndingBlank"&&(p+=2),p<l.length&&l[p][1].type==="content"))for(;++p<l.length&&l[p][1].type!=="content";)l[p][1].type==="chunkText"&&(l[p][1]._isInFirstContentOfListItem=!0,p++);if(s[0]==="enter")s[1].contentType&&(Object.assign(t,kD(g,i)),i=t[i],c=!0);else if(s[1]._container){for(p=i,u=void 0;p--;)if(d=g.get(p),d[1].type==="lineEnding"||d[1].type==="lineEndingBlank")d[0]==="enter"&&(u&&(g.get(u)[1].type="lineEndingBlank"),d[1].type="lineEnding",u=p);else if(!(d[1].type==="linePrefix"||d[1].type==="listItemIndent"))break;u&&(s[1].end={...g.get(u)[1].start},o=g.slice(u,i),o.unshift(s),g.splice(u,i-u+1,o))}}return mi(e,0,Number.POSITIVE_INFINITY,g.slice(0)),!c}function kD(e,t){const i=e.get(t)[1],s=e.get(t)[2];let u=t-1;const p=[];let d=i._tokenizer;d||(d=s.parser[i.contentType](i.start),i._contentTypeTextTrailing&&(d._contentTypeTextTrailing=!0));const o=d.events,l=[],c={};let g,h,b=-1,y=i,T=0,E=0;const m=[E];for(;y;){for(;e.get(++u)[1]!==y;);p.push(u),y._tokenizer||(g=s.sliceStream(y),y.next||g.push(null),h&&d.defineSkip(y.start),y._isInFirstContentOfListItem&&(d._gfmTasklistFirstContentOfListItem=!0),d.write(g),y._isInFirstContentOfListItem&&(d._gfmTasklistFirstContentOfListItem=void 0)),h=y,y=y.next}for(y=i;++b<o.length;)o[b][0]==="exit"&&o[b-1][0]==="enter"&&o[b][1].type===o[b-1][1].type&&o[b][1].start.line!==o[b][1].end.line&&(E=b+1,m.push(E),y._tokenizer=void 0,y.previous=void 0,y=y.next);for(d.events=[],y?(y._tokenizer=void 0,y.previous=void 0):m.pop(),b=m.length;b--;){const _=o.slice(m[b],m[b+1]),v=p.pop();l.push([v,v+_.length-1]),e.splice(v,2,_)}for(l.reverse(),b=-1;++b<l.length;)c[T+l[b][0]]=T+l[b][1],T+=l[b][1]-l[b][0]-1;return c}const LD={resolve:ND,tokenize:MD},OD={partial:!0,tokenize:ID};function ND(e){return yv(e),e}function MD(e,t){let i;return s;function s(o){return e.enter("content"),i=e.enter("chunkContent",{contentType:"content"}),u(o)}function u(o){return o===null?p(o):Xe(o)?e.check(OD,d,p)(o):(e.consume(o),u)}function p(o){return e.exit("chunkContent"),e.exit("content"),t(o)}function d(o){return e.consume(o),e.exit("chunkContent"),i.next=e.enter("chunkContent",{contentType:"content",previous:i}),i=i.next,u}}function ID(e,t,i){const s=this;return u;function u(d){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),Ct(e,p,"linePrefix")}function p(d){if(d===null||Xe(d))return i(d);const o=s.events[s.events.length-1];return!s.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(d):e.interrupt(s.parser.constructs.flow,i,t)(d)}}function Cv(e,t,i,s,u,p,d,o,l){const c=l||Number.POSITIVE_INFINITY;let g=0;return h;function h(_){return _===60?(e.enter(s),e.enter(u),e.enter(p),e.consume(_),e.exit(p),b):_===null||_===32||_===41||mc(_)?i(_):(e.enter(s),e.enter(d),e.enter(o),e.enter("chunkString",{contentType:"string"}),E(_))}function b(_){return _===62?(e.enter(p),e.consume(_),e.exit(p),e.exit(u),e.exit(s),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),y(_))}function y(_){return _===62?(e.exit("chunkString"),e.exit(o),b(_)):_===null||_===60||Xe(_)?i(_):(e.consume(_),_===92?T:y)}function T(_){return _===60||_===62||_===92?(e.consume(_),y):y(_)}function E(_){return!g&&(_===null||_===41||jt(_))?(e.exit("chunkString"),e.exit(o),e.exit(d),e.exit(s),t(_)):g<c&&_===40?(e.consume(_),g++,E):_===41?(e.consume(_),g--,E):_===null||_===32||_===40||mc(_)?i(_):(e.consume(_),_===92?m:E)}function m(_){return _===40||_===41||_===92?(e.consume(_),E):E(_)}}function Tv(e,t,i,s,u,p){const d=this;let o=0,l;return c;function c(y){return e.enter(s),e.enter(u),e.consume(y),e.exit(u),e.enter(p),g}function g(y){return o>999||y===null||y===91||y===93&&!l||y===94&&!o&&"_hiddenFootnoteSupport"in d.parser.constructs?i(y):y===93?(e.exit(p),e.enter(u),e.consume(y),e.exit(u),e.exit(s),t):Xe(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),g):(e.enter("chunkString",{contentType:"string"}),h(y))}function h(y){return y===null||y===91||y===93||Xe(y)||o++>999?(e.exit("chunkString"),g(y)):(e.consume(y),l||(l=!ft(y)),y===92?b:h)}function b(y){return y===91||y===92||y===93?(e.consume(y),o++,h):h(y)}}function Av(e,t,i,s,u,p){let d;return o;function o(b){return b===34||b===39||b===40?(e.enter(s),e.enter(u),e.consume(b),e.exit(u),d=b===40?41:b,l):i(b)}function l(b){return b===d?(e.enter(u),e.consume(b),e.exit(u),e.exit(s),t):(e.enter(p),c(b))}function c(b){return b===d?(e.exit(p),l(d)):b===null?i(b):Xe(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),Ct(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),g(b))}function g(b){return b===d||b===null||Xe(b)?(e.exit("chunkString"),c(b)):(e.consume(b),b===92?h:g)}function h(b){return b===d||b===92?(e.consume(b),g):g(b)}}function Qo(e,t){let i;return s;function s(u){return Xe(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),i=!0,s):ft(u)?Ct(e,s,i?"linePrefix":"lineSuffix")(u):t(u)}}const BD={name:"definition",tokenize:PD},FD={partial:!0,tokenize:UD};function PD(e,t,i){const s=this;let u;return p;function p(y){return e.enter("definition"),d(y)}function d(y){return Tv.call(s,e,o,i,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function o(y){return u=Bi(s.sliceSerialize(s.events[s.events.length-1][1]).slice(1,-1)),y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),l):i(y)}function l(y){return jt(y)?Qo(e,c)(y):c(y)}function c(y){return Cv(e,g,i,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function g(y){return e.attempt(FD,h,h)(y)}function h(y){return ft(y)?Ct(e,b,"whitespace")(y):b(y)}function b(y){return y===null||Xe(y)?(e.exit("definition"),s.parser.defined.push(u),t(y)):i(y)}}function UD(e,t,i){return s;function s(o){return jt(o)?Qo(e,u)(o):i(o)}function u(o){return Av(e,p,i,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function p(o){return ft(o)?Ct(e,d,"whitespace")(o):d(o)}function d(o){return o===null||Xe(o)?t(o):i(o)}}const HD={name:"hardBreakEscape",tokenize:zD};function zD(e,t,i){return s;function s(p){return e.enter("hardBreakEscape"),e.consume(p),u}function u(p){return Xe(p)?(e.exit("hardBreakEscape"),t(p)):i(p)}}const jD={name:"headingAtx",resolve:$D,tokenize:WD};function $D(e,t){let i=e.length-2,s=3,u,p;return e[s][1].type==="whitespace"&&(s+=2),i-2>s&&e[i][1].type==="whitespace"&&(i-=2),e[i][1].type==="atxHeadingSequence"&&(s===i-1||i-4>s&&e[i-2][1].type==="whitespace")&&(i-=s+1===i?2:4),i>s&&(u={type:"atxHeadingText",start:e[s][1].start,end:e[i][1].end},p={type:"chunkText",start:e[s][1].start,end:e[i][1].end,contentType:"text"},mi(e,s,i-s+1,[["enter",u,t],["enter",p,t],["exit",p,t],["exit",u,t]])),e}function WD(e,t,i){let s=0;return u;function u(g){return e.enter("atxHeading"),p(g)}function p(g){return e.enter("atxHeadingSequence"),d(g)}function d(g){return g===35&&s++<6?(e.consume(g),d):g===null||jt(g)?(e.exit("atxHeadingSequence"),o(g)):i(g)}function o(g){return g===35?(e.enter("atxHeadingSequence"),l(g)):g===null||Xe(g)?(e.exit("atxHeading"),t(g)):ft(g)?Ct(e,o,"whitespace")(g):(e.enter("atxHeadingText"),c(g))}function l(g){return g===35?(e.consume(g),l):(e.exit("atxHeadingSequence"),o(g))}function c(g){return g===null||g===35||jt(g)?(e.exit("atxHeadingText"),o(g)):(e.consume(g),c)}}const qD=["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"],I1=["pre","script","style","textarea"],YD={concrete:!0,name:"htmlFlow",resolveTo:VD,tokenize:XD},GD={partial:!0,tokenize:ZD},KD={partial:!0,tokenize:QD};function VD(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 XD(e,t,i){const s=this;let u,p,d,o,l;return c;function c(j){return g(j)}function g(j){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(j),h}function h(j){return j===33?(e.consume(j),b):j===47?(e.consume(j),p=!0,E):j===63?(e.consume(j),u=3,s.interrupt?t:M):Wn(j)?(e.consume(j),d=String.fromCharCode(j),m):i(j)}function b(j){return j===45?(e.consume(j),u=2,y):j===91?(e.consume(j),u=5,o=0,T):Wn(j)?(e.consume(j),u=4,s.interrupt?t:M):i(j)}function y(j){return j===45?(e.consume(j),s.interrupt?t:M):i(j)}function T(j){const re="CDATA[";return j===re.charCodeAt(o++)?(e.consume(j),o===re.length?s.interrupt?t:I:T):i(j)}function E(j){return Wn(j)?(e.consume(j),d=String.fromCharCode(j),m):i(j)}function m(j){if(j===null||j===47||j===62||jt(j)){const re=j===47,_e=d.toLowerCase();return!re&&!p&&I1.includes(_e)?(u=1,s.interrupt?t(j):I(j)):qD.includes(d.toLowerCase())?(u=6,re?(e.consume(j),_):s.interrupt?t(j):I(j)):(u=7,s.interrupt&&!s.parser.lazy[s.now().line]?i(j):p?v(j):S(j))}return j===45||Mn(j)?(e.consume(j),d+=String.fromCharCode(j),m):i(j)}function _(j){return j===62?(e.consume(j),s.interrupt?t:I):i(j)}function v(j){return ft(j)?(e.consume(j),v):L(j)}function S(j){return j===47?(e.consume(j),L):j===58||j===95||Wn(j)?(e.consume(j),x):ft(j)?(e.consume(j),S):L(j)}function x(j){return j===45||j===46||j===58||j===95||Mn(j)?(e.consume(j),x):k(j)}function k(j){return j===61?(e.consume(j),A):ft(j)?(e.consume(j),k):S(j)}function A(j){return j===null||j===60||j===61||j===62||j===96?i(j):j===34||j===39?(e.consume(j),l=j,O):ft(j)?(e.consume(j),A):D(j)}function O(j){return j===l?(e.consume(j),l=null,N):j===null||Xe(j)?i(j):(e.consume(j),O)}function D(j){return j===null||j===34||j===39||j===47||j===60||j===61||j===62||j===96||jt(j)?k(j):(e.consume(j),D)}function N(j){return j===47||j===62||ft(j)?S(j):i(j)}function L(j){return j===62?(e.consume(j),F):i(j)}function F(j){return j===null||Xe(j)?I(j):ft(j)?(e.consume(j),F):i(j)}function I(j){return j===45&&u===2?(e.consume(j),Y):j===60&&u===1?(e.consume(j),K):j===62&&u===4?(e.consume(j),U):j===63&&u===3?(e.consume(j),M):j===93&&u===5?(e.consume(j),H):Xe(j)&&(u===6||u===7)?(e.exit("htmlFlowData"),e.check(GD,$,z)(j)):j===null||Xe(j)?(e.exit("htmlFlowData"),z(j)):(e.consume(j),I)}function z(j){return e.check(KD,W,$)(j)}function W(j){return e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),q}function q(j){return j===null||Xe(j)?z(j):(e.enter("htmlFlowData"),I(j))}function Y(j){return j===45?(e.consume(j),M):I(j)}function K(j){return j===47?(e.consume(j),d="",Q):I(j)}function Q(j){if(j===62){const re=d.toLowerCase();return I1.includes(re)?(e.consume(j),U):I(j)}return Wn(j)&&d.length<8?(e.consume(j),d+=String.fromCharCode(j),Q):I(j)}function H(j){return j===93?(e.consume(j),M):I(j)}function M(j){return j===62?(e.consume(j),U):j===45&&u===2?(e.consume(j),M):I(j)}function U(j){return j===null||Xe(j)?(e.exit("htmlFlowData"),$(j)):(e.consume(j),U)}function $(j){return e.exit("htmlFlow"),t(j)}}function QD(e,t,i){const s=this;return u;function u(d){return Xe(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),p):i(d)}function p(d){return s.parser.lazy[s.now().line]?i(d):t(d)}}function ZD(e,t,i){return s;function s(u){return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),e.attempt(Sl,t,i)}}const JD={name:"htmlText",tokenize:e5};function e5(e,t,i){const s=this;let u,p,d;return o;function o(M){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(M),l}function l(M){return M===33?(e.consume(M),c):M===47?(e.consume(M),k):M===63?(e.consume(M),S):Wn(M)?(e.consume(M),D):i(M)}function c(M){return M===45?(e.consume(M),g):M===91?(e.consume(M),p=0,T):Wn(M)?(e.consume(M),v):i(M)}function g(M){return M===45?(e.consume(M),y):i(M)}function h(M){return M===null?i(M):M===45?(e.consume(M),b):Xe(M)?(d=h,K(M)):(e.consume(M),h)}function b(M){return M===45?(e.consume(M),y):h(M)}function y(M){return M===62?Y(M):M===45?b(M):h(M)}function T(M){const U="CDATA[";return M===U.charCodeAt(p++)?(e.consume(M),p===U.length?E:T):i(M)}function E(M){return M===null?i(M):M===93?(e.consume(M),m):Xe(M)?(d=E,K(M)):(e.consume(M),E)}function m(M){return M===93?(e.consume(M),_):E(M)}function _(M){return M===62?Y(M):M===93?(e.consume(M),_):E(M)}function v(M){return M===null||M===62?Y(M):Xe(M)?(d=v,K(M)):(e.consume(M),v)}function S(M){return M===null?i(M):M===63?(e.consume(M),x):Xe(M)?(d=S,K(M)):(e.consume(M),S)}function x(M){return M===62?Y(M):S(M)}function k(M){return Wn(M)?(e.consume(M),A):i(M)}function A(M){return M===45||Mn(M)?(e.consume(M),A):O(M)}function O(M){return Xe(M)?(d=O,K(M)):ft(M)?(e.consume(M),O):Y(M)}function D(M){return M===45||Mn(M)?(e.consume(M),D):M===47||M===62||jt(M)?N(M):i(M)}function N(M){return M===47?(e.consume(M),Y):M===58||M===95||Wn(M)?(e.consume(M),L):Xe(M)?(d=N,K(M)):ft(M)?(e.consume(M),N):Y(M)}function L(M){return M===45||M===46||M===58||M===95||Mn(M)?(e.consume(M),L):F(M)}function F(M){return M===61?(e.consume(M),I):Xe(M)?(d=F,K(M)):ft(M)?(e.consume(M),F):N(M)}function I(M){return M===null||M===60||M===61||M===62||M===96?i(M):M===34||M===39?(e.consume(M),u=M,z):Xe(M)?(d=I,K(M)):ft(M)?(e.consume(M),I):(e.consume(M),W)}function z(M){return M===u?(e.consume(M),u=void 0,q):M===null?i(M):Xe(M)?(d=z,K(M)):(e.consume(M),z)}function W(M){return M===null||M===34||M===39||M===60||M===61||M===96?i(M):M===47||M===62||jt(M)?N(M):(e.consume(M),W)}function q(M){return M===47||M===62||jt(M)?N(M):i(M)}function Y(M){return M===62?(e.consume(M),e.exit("htmlTextData"),e.exit("htmlText"),t):i(M)}function K(M){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),Q}function Q(M){return ft(M)?Ct(e,H,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):H(M)}function H(M){return e.enter("htmlTextData"),d(M)}}const D0={name:"labelEnd",resolveAll:r5,resolveTo:s5,tokenize:a5},t5={tokenize:o5},n5={tokenize:l5},i5={tokenize:u5};function r5(e){let t=-1;const i=[];for(;++t<e.length;){const s=e[t][1];if(i.push(e[t]),s.type==="labelImage"||s.type==="labelLink"||s.type==="labelEnd"){const u=s.type==="labelImage"?4:2;s.type="data",t+=u}}return e.length!==i.length&&mi(e,0,e.length,i),e}function s5(e,t){let i=e.length,s=0,u,p,d,o;for(;i--;)if(u=e[i][1],p){if(u.type==="link"||u.type==="labelLink"&&u._inactive)break;e[i][0]==="enter"&&u.type==="labelLink"&&(u._inactive=!0)}else if(d){if(e[i][0]==="enter"&&(u.type==="labelImage"||u.type==="labelLink")&&!u._balanced&&(p=i,u.type!=="labelLink")){s=2;break}}else u.type==="labelEnd"&&(d=i);const l={type:e[p][1].type==="labelLink"?"link":"image",start:{...e[p][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[p][1].start},end:{...e[d][1].end}},g={type:"labelText",start:{...e[p+s+2][1].end},end:{...e[d-2][1].start}};return o=[["enter",l,t],["enter",c,t]],o=Ri(o,e.slice(p+1,p+s+3)),o=Ri(o,[["enter",g,t]]),o=Ri(o,Mc(t.parser.constructs.insideSpan.null,e.slice(p+s+4,d-3),t)),o=Ri(o,[["exit",g,t],e[d-2],e[d-1],["exit",c,t]]),o=Ri(o,e.slice(d+1)),o=Ri(o,[["exit",l,t]]),mi(e,p,e.length,o),e}function a5(e,t,i){const s=this;let u=s.events.length,p,d;for(;u--;)if((s.events[u][1].type==="labelImage"||s.events[u][1].type==="labelLink")&&!s.events[u][1]._balanced){p=s.events[u][1];break}return o;function o(b){return p?p._inactive?h(b):(d=s.parser.defined.includes(Bi(s.sliceSerialize({start:p.end,end:s.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(b),e.exit("labelMarker"),e.exit("labelEnd"),l):i(b)}function l(b){return b===40?e.attempt(t5,g,d?g:h)(b):b===91?e.attempt(n5,g,d?c:h)(b):d?g(b):h(b)}function c(b){return e.attempt(i5,g,h)(b)}function g(b){return t(b)}function h(b){return p._balanced=!0,i(b)}}function o5(e,t,i){return s;function s(h){return e.enter("resource"),e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),u}function u(h){return jt(h)?Qo(e,p)(h):p(h)}function p(h){return h===41?g(h):Cv(e,d,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function d(h){return jt(h)?Qo(e,l)(h):g(h)}function o(h){return i(h)}function l(h){return h===34||h===39||h===40?Av(e,c,i,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):g(h)}function c(h){return jt(h)?Qo(e,g)(h):g(h)}function g(h){return h===41?(e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),e.exit("resource"),t):i(h)}}function l5(e,t,i){const s=this;return u;function u(o){return Tv.call(s,e,p,d,"reference","referenceMarker","referenceString")(o)}function p(o){return s.parser.defined.includes(Bi(s.sliceSerialize(s.events[s.events.length-1][1]).slice(1,-1)))?t(o):i(o)}function d(o){return i(o)}}function u5(e,t,i){return s;function s(p){return e.enter("reference"),e.enter("referenceMarker"),e.consume(p),e.exit("referenceMarker"),u}function u(p){return p===93?(e.enter("referenceMarker"),e.consume(p),e.exit("referenceMarker"),e.exit("reference"),t):i(p)}}const c5={name:"labelStartImage",resolveAll:D0.resolveAll,tokenize:h5};function h5(e,t,i){const s=this;return u;function u(o){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(o),e.exit("labelImageMarker"),p}function p(o){return o===91?(e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelImage"),d):i(o)}function d(o){return o===94&&"_hiddenFootnoteSupport"in s.parser.constructs?i(o):t(o)}}const d5={name:"labelStartLink",resolveAll:D0.resolveAll,tokenize:f5};function f5(e,t,i){const s=this;return u;function u(d){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelLink"),p}function p(d){return d===94&&"_hiddenFootnoteSupport"in s.parser.constructs?i(d):t(d)}}const df={name:"lineEnding",tokenize:p5};function p5(e,t){return i;function i(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Ct(e,t,"linePrefix")}}const lc={name:"thematicBreak",tokenize:g5};function g5(e,t,i){let s=0,u;return p;function p(c){return e.enter("thematicBreak"),d(c)}function d(c){return u=c,o(c)}function o(c){return c===u?(e.enter("thematicBreakSequence"),l(c)):s>=3&&(c===null||Xe(c))?(e.exit("thematicBreak"),t(c)):i(c)}function l(c){return c===u?(e.consume(c),s++,l):(e.exit("thematicBreakSequence"),ft(c)?Ct(e,o,"whitespace")(c):o(c))}}const ni={continuation:{tokenize:E5},exit:S5,name:"list",tokenize:b5},m5={partial:!0,tokenize:y5},_5={partial:!0,tokenize:v5};function b5(e,t,i){const s=this,u=s.events[s.events.length-1];let p=u&&u[1].type==="linePrefix"?u[2].sliceSerialize(u[1],!0).length:0,d=0;return o;function o(y){const T=s.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(T==="listUnordered"?!s.containerState.marker||y===s.containerState.marker:Wf(y)){if(s.containerState.type||(s.containerState.type=T,e.enter(T,{_container:!0})),T==="listUnordered")return e.enter("listItemPrefix"),y===42||y===45?e.check(lc,i,c)(y):c(y);if(!s.interrupt||y===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(y)}return i(y)}function l(y){return Wf(y)&&++d<10?(e.consume(y),l):(!s.interrupt||d<2)&&(s.containerState.marker?y===s.containerState.marker:y===41||y===46)?(e.exit("listItemValue"),c(y)):i(y)}function c(y){return e.enter("listItemMarker"),e.consume(y),e.exit("listItemMarker"),s.containerState.marker=s.containerState.marker||y,e.check(Sl,s.interrupt?i:g,e.attempt(m5,b,h))}function g(y){return s.containerState.initialBlankLine=!0,p++,b(y)}function h(y){return ft(y)?(e.enter("listItemPrefixWhitespace"),e.consume(y),e.exit("listItemPrefixWhitespace"),b):i(y)}function b(y){return s.containerState.size=p+s.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(y)}}function E5(e,t,i){const s=this;return s.containerState._closeFlow=void 0,e.check(Sl,u,p);function u(o){return s.containerState.furtherBlankLines=s.containerState.furtherBlankLines||s.containerState.initialBlankLine,Ct(e,t,"listItemIndent",s.containerState.size+1)(o)}function p(o){return s.containerState.furtherBlankLines||!ft(o)?(s.containerState.furtherBlankLines=void 0,s.containerState.initialBlankLine=void 0,d(o)):(s.containerState.furtherBlankLines=void 0,s.containerState.initialBlankLine=void 0,e.attempt(_5,t,d)(o))}function d(o){return s.containerState._closeFlow=!0,s.interrupt=void 0,Ct(e,e.attempt(ni,t,i),"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function v5(e,t,i){const s=this;return Ct(e,u,"listItemIndent",s.containerState.size+1);function u(p){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(p):i(p)}}function S5(e){e.exit(this.containerState.type)}function y5(e,t,i){const s=this;return Ct(e,u,"listItemPrefixWhitespace",s.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function u(p){const d=s.events[s.events.length-1];return!ft(p)&&d&&d[1].type==="listItemPrefixWhitespace"?t(p):i(p)}}const B1={name:"setextUnderline",resolveTo:C5,tokenize:T5};function C5(e,t){let i=e.length,s,u,p;for(;i--;)if(e[i][0]==="enter"){if(e[i][1].type==="content"){s=i;break}e[i][1].type==="paragraph"&&(u=i)}else e[i][1].type==="content"&&e.splice(i,1),!p&&e[i][1].type==="definition"&&(p=i);const d={type:"setextHeading",start:{...e[s][1].start},end:{...e[e.length-1][1].end}};return e[u][1].type="setextHeadingText",p?(e.splice(u,0,["enter",d,t]),e.splice(p+1,0,["exit",e[s][1],t]),e[s][1].end={...e[p][1].end}):e[s][1]=d,e.push(["exit",d,t]),e}function T5(e,t,i){const s=this;let u;return p;function p(c){let g=s.events.length,h;for(;g--;)if(s.events[g][1].type!=="lineEnding"&&s.events[g][1].type!=="linePrefix"&&s.events[g][1].type!=="content"){h=s.events[g][1].type==="paragraph";break}return!s.parser.lazy[s.now().line]&&(s.interrupt||h)?(e.enter("setextHeadingLine"),u=c,d(c)):i(c)}function d(c){return e.enter("setextHeadingLineSequence"),o(c)}function o(c){return c===u?(e.consume(c),o):(e.exit("setextHeadingLineSequence"),ft(c)?Ct(e,l,"lineSuffix")(c):l(c))}function l(c){return c===null||Xe(c)?(e.exit("setextHeadingLine"),t(c)):i(c)}}const A5={tokenize:x5};function x5(e){const t=this,i=e.attempt(Sl,s,e.attempt(this.parser.constructs.flowInitial,u,Ct(e,e.attempt(this.parser.constructs.flow,u,e.attempt(LD,u)),"linePrefix")));return i;function s(p){if(p===null){e.consume(p);return}return e.enter("lineEndingBlank"),e.consume(p),e.exit("lineEndingBlank"),t.currentConstruct=void 0,i}function u(p){if(p===null){e.consume(p);return}return e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),t.currentConstruct=void 0,i}}const w5={resolveAll:wv()},D5=xv("string"),R5=xv("text");function xv(e){return{resolveAll:wv(e==="text"?k5:void 0),tokenize:t};function t(i){const s=this,u=this.parser.constructs[e],p=i.attempt(u,d,o);return d;function d(g){return c(g)?p(g):o(g)}function o(g){if(g===null){i.consume(g);return}return i.enter("data"),i.consume(g),l}function l(g){return c(g)?(i.exit("data"),p(g)):(i.consume(g),l)}function c(g){if(g===null)return!0;const h=u[g];let b=-1;if(h)for(;++b<h.length;){const y=h[b];if(!y.previous||y.previous.call(s,s.previous))return!0}return!1}}}function wv(e){return t;function t(i,s){let u=-1,p;for(;++u<=i.length;)p===void 0?i[u]&&i[u][1].type==="data"&&(p=u,u++):(!i[u]||i[u][1].type!=="data")&&(u!==p+2&&(i[p][1].end=i[u-1][1].end,i.splice(p+2,u-p-2),u=p+2),p=void 0);return e?e(i,s):i}}function k5(e,t){let i=0;for(;++i<=e.length;)if((i===e.length||e[i][1].type==="lineEnding")&&e[i-1][1].type==="data"){const s=e[i-1][1],u=t.sliceStream(s);let p=u.length,d=-1,o=0,l;for(;p--;){const c=u[p];if(typeof c=="string"){for(d=c.length;c.charCodeAt(d-1)===32;)o++,d--;if(d)break;d=-1}else if(c===-2)l=!0,o++;else if(c!==-1){p++;break}}if(t._contentTypeTextTrailing&&i===e.length&&(o=0),o){const c={type:i===e.length||l||o<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:p?d:s.start._bufferIndex+d,_index:s.start._index+p,line:s.end.line,column:s.end.column-o,offset:s.end.offset-o},end:{...s.end}};s.end={...c.start},s.start.offset===s.end.offset?Object.assign(s,c):(e.splice(i,0,["enter",c,t],["exit",c,t]),i+=2)}i++}return e}const L5={42:ni,43:ni,45:ni,48:ni,49:ni,50:ni,51:ni,52:ni,53:ni,54:ni,55:ni,56:ni,57:ni,62:Ev},O5={91:BD},N5={[-2]:hf,[-1]:hf,32:hf},M5={35:jD,42:lc,45:[B1,lc],60:YD,61:B1,95:lc,96:M1,126:M1},I5={38:Sv,92:vv},B5={[-5]:df,[-4]:df,[-3]:df,33:c5,38:Sv,42:qf,60:[dD,JD],91:d5,92:[HD,vv],93:D0,95:qf,96:AD},F5={null:[qf,w5]},P5={null:[42,95]},U5={null:[]},H5=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:P5,contentInitial:O5,disable:U5,document:L5,flow:M5,flowInitial:N5,insideSpan:F5,string:I5,text:B5},Symbol.toStringTag,{value:"Module"}));function z5(e,t,i){let s={_bufferIndex:-1,_index:0,line:i&&i.line||1,column:i&&i.column||1,offset:i&&i.offset||0};const u={},p=[];let d=[],o=[];const l={attempt:O(k),check:O(A),consume:v,enter:S,exit:x,interrupt:O(A,{interrupt:!0})},c={code:null,containerState:{},defineSkip:E,events:[],now:T,parser:e,previous:null,sliceSerialize:b,sliceStream:y,write:h};let g=t.tokenize.call(c,l);return t.resolveAll&&p.push(t),c;function h(F){return d=Ri(d,F),m(),d[d.length-1]!==null?[]:(D(t,0),c.events=Mc(p,c.events,c),c.events)}function b(F,I){return $5(y(F),I)}function y(F){return j5(d,F)}function T(){const{_bufferIndex:F,_index:I,line:z,column:W,offset:q}=s;return{_bufferIndex:F,_index:I,line:z,column:W,offset:q}}function E(F){u[F.line]=F.column,L()}function m(){let F;for(;s._index<d.length;){const I=d[s._index];if(typeof I=="string")for(F=s._index,s._bufferIndex<0&&(s._bufferIndex=0);s._index===F&&s._bufferIndex<I.length;)_(I.charCodeAt(s._bufferIndex));else _(I)}}function _(F){g=g(F)}function v(F){Xe(F)?(s.line++,s.column=1,s.offset+=F===-3?2:1,L()):F!==-1&&(s.column++,s.offset++),s._bufferIndex<0?s._index++:(s._bufferIndex++,s._bufferIndex===d[s._index].length&&(s._bufferIndex=-1,s._index++)),c.previous=F}function S(F,I){const z=I||{};return z.type=F,z.start=T(),c.events.push(["enter",z,c]),o.push(z),z}function x(F){const I=o.pop();return I.end=T(),c.events.push(["exit",I,c]),I}function k(F,I){D(F,I.from)}function A(F,I){I.restore()}function O(F,I){return z;function z(W,q,Y){let K,Q,H,M;return Array.isArray(W)?$(W):"tokenize"in W?$([W]):U(W);function U(ue){return ee;function ee(G){const le=G!==null&&ue[G],ae=G!==null&&ue.null,xe=[...Array.isArray(le)?le:le?[le]:[],...Array.isArray(ae)?ae:ae?[ae]:[]];return $(xe)(G)}}function $(ue){return K=ue,Q=0,ue.length===0?Y:j(ue[Q])}function j(ue){return ee;function ee(G){return M=N(),H=ue,ue.partial||(c.currentConstruct=ue),ue.name&&c.parser.constructs.disable.null.includes(ue.name)?_e():ue.tokenize.call(I?Object.assign(Object.create(c),I):c,l,re,_e)(G)}}function re(ue){return F(H,M),q}function _e(ue){return M.restore(),++Q<K.length?j(K[Q]):Y}}}function D(F,I){F.resolveAll&&!p.includes(F)&&p.push(F),F.resolve&&mi(c.events,I,c.events.length-I,F.resolve(c.events.slice(I),c)),F.resolveTo&&(c.events=F.resolveTo(c.events,c))}function N(){const F=T(),I=c.previous,z=c.currentConstruct,W=c.events.length,q=Array.from(o);return{from:W,restore:Y};function Y(){s=F,c.previous=I,c.currentConstruct=z,c.events.length=W,o=q,L()}}function L(){s.line in u&&s.column<2&&(s.column=u[s.line],s.offset+=u[s.line]-1)}}function j5(e,t){const i=t.start._index,s=t.start._bufferIndex,u=t.end._index,p=t.end._bufferIndex;let d;if(i===u)d=[e[i].slice(s,p)];else{if(d=e.slice(i,u),s>-1){const o=d[0];typeof o=="string"?d[0]=o.slice(s):d.shift()}p>0&&d.push(e[u].slice(0,p))}return d}function $5(e,t){let i=-1;const s=[];let u;for(;++i<e.length;){const p=e[i];let d;if(typeof p=="string")d=p;else switch(p){case-5:{d="\r";break}case-4:{d=`
154
- `;break}case-3:{d=`\r
155
- `;break}case-2:{d=t?" ":" ";break}case-1:{if(!t&&u)continue;d=" ";break}default:d=String.fromCharCode(p)}u=p===-2,s.push(d)}return s.join("")}function W5(e){const s={constructs:_v([H5,...(e||{}).extensions||[]]),content:u(sD),defined:[],document:u(oD),flow:u(A5),lazy:{},string:u(D5),text:u(R5)};return s;function u(p){return d;function d(o){return z5(s,p,o)}}}function q5(e){for(;!yv(e););return e}const F1=/[\0\t\n\r]/g;function Y5(){let e=1,t="",i=!0,s;return u;function u(p,d,o){const l=[];let c,g,h,b,y;for(p=t+(typeof p=="string"?p.toString():new TextDecoder(d||void 0).decode(p)),h=0,t="",i&&(p.charCodeAt(0)===65279&&h++,i=void 0);h<p.length;){if(F1.lastIndex=h,c=F1.exec(p),b=c&&c.index!==void 0?c.index:p.length,y=p.charCodeAt(b),!c){t=p.slice(h);break}if(y===10&&h===b&&s)l.push(-3),s=void 0;else switch(s&&(l.push(-5),s=void 0),h<b&&(l.push(p.slice(h,b)),e+=b-h),y){case 0:{l.push(65533),e++;break}case 9:{for(g=Math.ceil(e/4)*4,l.push(-2);e++<g;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:s=!0,e=1}h=b+1}return o&&(s&&l.push(-5),t&&l.push(t),l.push(null)),l}}const G5=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function K5(e){return e.replace(G5,V5)}function V5(e,t,i){if(t)return t;if(i.charCodeAt(0)===35){const u=i.charCodeAt(1),p=u===120||u===88;return bv(i.slice(p?2:1),p?16:10)}return w0(i)||e}const Dv={}.hasOwnProperty;function X5(e,t,i){return t&&typeof t=="object"&&(i=t,t=void 0),Q5(i)(q5(W5(i).document().write(Y5()(e,t,!0))))}function Q5(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:p(nn),autolinkProtocol:N,autolinkEmail:N,atxHeading:p(nt),blockQuote:p(ae),characterEscape:N,characterReference:N,codeFenced:p(xe),codeFencedFenceInfo:d,codeFencedFenceMeta:d,codeIndented:p(xe,d),codeText:p(ye,d),codeTextData:N,data:N,codeFlowValue:N,definition:p(Pe),definitionDestinationString:d,definitionLabelString:d,definitionTitleString:d,emphasis:p(Ne),hardBreakEscape:p(Ue),hardBreakTrailing:p(Ue),htmlFlow:p(Be,d),htmlFlowData:N,htmlText:p(Be,d),htmlTextData:N,image:p($t),label:d,link:p(nn),listItem:p(tt),listItemValue:b,listOrdered:p(Qe,h),listUnordered:p(Qe),paragraph:p(it),reference:j,referenceString:d,resourceDestinationString:d,resourceTitleString:d,setextHeading:p(nt),strong:p(Me),thematicBreak:p(xt)},exit:{atxHeading:l(),atxHeadingSequence:k,autolink:l(),autolinkEmail:le,autolinkProtocol:G,blockQuote:l(),characterEscapeValue:L,characterReferenceMarkerHexadecimal:_e,characterReferenceMarkerNumeric:_e,characterReferenceValue:ue,characterReference:ee,codeFenced:l(m),codeFencedFence:E,codeFencedFenceInfo:y,codeFencedFenceMeta:T,codeFlowValue:L,codeIndented:l(_),codeText:l(q),codeTextData:L,data:L,definition:l(),definitionDestinationString:x,definitionLabelString:v,definitionTitleString:S,emphasis:l(),hardBreakEscape:l(I),hardBreakTrailing:l(I),htmlFlow:l(z),htmlFlowData:L,htmlText:l(W),htmlTextData:L,image:l(K),label:H,labelText:Q,lineEnding:F,link:l(Y),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:re,resourceDestinationString:M,resourceTitleString:U,resource:$,setextHeading:l(D),setextHeadingLineSequence:O,setextHeadingText:A,strong:l(),thematicBreak:l()}};Rv(t,(e||{}).mdastExtensions||[]);const i={};return s;function s(fe){let Ce={type:"root",children:[]};const Ie={stack:[Ce],tokenStack:[],config:t,enter:o,exit:c,buffer:d,resume:g,data:i},qe=[];let Ye=-1;for(;++Ye<fe.length;)if(fe[Ye][1].type==="listOrdered"||fe[Ye][1].type==="listUnordered")if(fe[Ye][0]==="enter")qe.push(Ye);else{const Ze=qe.pop();Ye=u(fe,Ze,Ye)}for(Ye=-1;++Ye<fe.length;){const Ze=t[fe[Ye][0]];Dv.call(Ze,fe[Ye][1].type)&&Ze[fe[Ye][1].type].call(Object.assign({sliceSerialize:fe[Ye][2].sliceSerialize},Ie),fe[Ye][1])}if(Ie.tokenStack.length>0){const Ze=Ie.tokenStack[Ie.tokenStack.length-1];(Ze[1]||P1).call(Ie,void 0,Ze[0])}for(Ce.position={start:Qr(fe.length>0?fe[0][1].start:{line:1,column:1,offset:0}),end:Qr(fe.length>0?fe[fe.length-2][1].end:{line:1,column:1,offset:0})},Ye=-1;++Ye<t.transforms.length;)Ce=t.transforms[Ye](Ce)||Ce;return Ce}function u(fe,Ce,Ie){let qe=Ce-1,Ye=-1,Ze=!1,Ve,Yt,Lt,Gt;for(;++qe<=Ie;){const Et=fe[qe];switch(Et[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Et[0]==="enter"?Ye++:Ye--,Gt=void 0;break}case"lineEndingBlank":{Et[0]==="enter"&&(Ve&&!Gt&&!Ye&&!Lt&&(Lt=qe),Gt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Gt=void 0}if(!Ye&&Et[0]==="enter"&&Et[1].type==="listItemPrefix"||Ye===-1&&Et[0]==="exit"&&(Et[1].type==="listUnordered"||Et[1].type==="listOrdered")){if(Ve){let Tn=qe;for(Yt=void 0;Tn--;){const un=fe[Tn];if(un[1].type==="lineEnding"||un[1].type==="lineEndingBlank"){if(un[0]==="exit")continue;Yt&&(fe[Yt][1].type="lineEndingBlank",Ze=!0),un[1].type="lineEnding",Yt=Tn}else if(!(un[1].type==="linePrefix"||un[1].type==="blockQuotePrefix"||un[1].type==="blockQuotePrefixWhitespace"||un[1].type==="blockQuoteMarker"||un[1].type==="listItemIndent"))break}Lt&&(!Yt||Lt<Yt)&&(Ve._spread=!0),Ve.end=Object.assign({},Yt?fe[Yt][1].start:Et[1].end),fe.splice(Yt||qe,0,["exit",Ve,Et[2]]),qe++,Ie++}if(Et[1].type==="listItemPrefix"){const Tn={type:"listItem",_spread:!1,start:Object.assign({},Et[1].start),end:void 0};Ve=Tn,fe.splice(qe,0,["enter",Tn,Et[2]]),qe++,Ie++,Lt=void 0,Gt=!0}}}return fe[Ce][1]._spread=Ze,Ie}function p(fe,Ce){return Ie;function Ie(qe){o.call(this,fe(qe),qe),Ce&&Ce.call(this,qe)}}function d(){this.stack.push({type:"fragment",children:[]})}function o(fe,Ce,Ie){this.stack[this.stack.length-1].children.push(fe),this.stack.push(fe),this.tokenStack.push([Ce,Ie||void 0]),fe.position={start:Qr(Ce.start),end:void 0}}function l(fe){return Ce;function Ce(Ie){fe&&fe.call(this,Ie),c.call(this,Ie)}}function c(fe,Ce){const Ie=this.stack.pop(),qe=this.tokenStack.pop();if(qe)qe[0].type!==fe.type&&(Ce?Ce.call(this,fe,qe[0]):(qe[1]||P1).call(this,fe,qe[0]));else throw new Error("Cannot close `"+fe.type+"` ("+Xo({start:fe.start,end:fe.end})+"): it’s not open");Ie.position.end=Qr(fe.end)}function g(){return x0(this.stack.pop())}function h(){this.data.expectingFirstListItemValue=!0}function b(fe){if(this.data.expectingFirstListItemValue){const Ce=this.stack[this.stack.length-2];Ce.start=Number.parseInt(this.sliceSerialize(fe),10),this.data.expectingFirstListItemValue=void 0}}function y(){const fe=this.resume(),Ce=this.stack[this.stack.length-1];Ce.lang=fe}function T(){const fe=this.resume(),Ce=this.stack[this.stack.length-1];Ce.meta=fe}function E(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function m(){const fe=this.resume(),Ce=this.stack[this.stack.length-1];Ce.value=fe.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function _(){const fe=this.resume(),Ce=this.stack[this.stack.length-1];Ce.value=fe.replace(/(\r?\n|\r)$/g,"")}function v(fe){const Ce=this.resume(),Ie=this.stack[this.stack.length-1];Ie.label=Ce,Ie.identifier=Bi(this.sliceSerialize(fe)).toLowerCase()}function S(){const fe=this.resume(),Ce=this.stack[this.stack.length-1];Ce.title=fe}function x(){const fe=this.resume(),Ce=this.stack[this.stack.length-1];Ce.url=fe}function k(fe){const Ce=this.stack[this.stack.length-1];if(!Ce.depth){const Ie=this.sliceSerialize(fe).length;Ce.depth=Ie}}function A(){this.data.setextHeadingSlurpLineEnding=!0}function O(fe){const Ce=this.stack[this.stack.length-1];Ce.depth=this.sliceSerialize(fe).codePointAt(0)===61?1:2}function D(){this.data.setextHeadingSlurpLineEnding=void 0}function N(fe){const Ie=this.stack[this.stack.length-1].children;let qe=Ie[Ie.length-1];(!qe||qe.type!=="text")&&(qe=$e(),qe.position={start:Qr(fe.start),end:void 0},Ie.push(qe)),this.stack.push(qe)}function L(fe){const Ce=this.stack.pop();Ce.value+=this.sliceSerialize(fe),Ce.position.end=Qr(fe.end)}function F(fe){const Ce=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ie=Ce.children[Ce.children.length-1];Ie.position.end=Qr(fe.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Ce.type)&&(N.call(this,fe),L.call(this,fe))}function I(){this.data.atHardBreak=!0}function z(){const fe=this.resume(),Ce=this.stack[this.stack.length-1];Ce.value=fe}function W(){const fe=this.resume(),Ce=this.stack[this.stack.length-1];Ce.value=fe}function q(){const fe=this.resume(),Ce=this.stack[this.stack.length-1];Ce.value=fe}function Y(){const fe=this.stack[this.stack.length-1];if(this.data.inReference){const Ce=this.data.referenceType||"shortcut";fe.type+="Reference",fe.referenceType=Ce,delete fe.url,delete fe.title}else delete fe.identifier,delete fe.label;this.data.referenceType=void 0}function K(){const fe=this.stack[this.stack.length-1];if(this.data.inReference){const Ce=this.data.referenceType||"shortcut";fe.type+="Reference",fe.referenceType=Ce,delete fe.url,delete fe.title}else delete fe.identifier,delete fe.label;this.data.referenceType=void 0}function Q(fe){const Ce=this.sliceSerialize(fe),Ie=this.stack[this.stack.length-2];Ie.label=K5(Ce),Ie.identifier=Bi(Ce).toLowerCase()}function H(){const fe=this.stack[this.stack.length-1],Ce=this.resume(),Ie=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ie.type==="link"){const qe=fe.children;Ie.children=qe}else Ie.alt=Ce}function M(){const fe=this.resume(),Ce=this.stack[this.stack.length-1];Ce.url=fe}function U(){const fe=this.resume(),Ce=this.stack[this.stack.length-1];Ce.title=fe}function $(){this.data.inReference=void 0}function j(){this.data.referenceType="collapsed"}function re(fe){const Ce=this.resume(),Ie=this.stack[this.stack.length-1];Ie.label=Ce,Ie.identifier=Bi(this.sliceSerialize(fe)).toLowerCase(),this.data.referenceType="full"}function _e(fe){this.data.characterReferenceType=fe.type}function ue(fe){const Ce=this.sliceSerialize(fe),Ie=this.data.characterReferenceType;let qe;Ie?(qe=bv(Ce,Ie==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):qe=w0(Ce);const Ye=this.stack[this.stack.length-1];Ye.value+=qe}function ee(fe){const Ce=this.stack.pop();Ce.position.end=Qr(fe.end)}function G(fe){L.call(this,fe);const Ce=this.stack[this.stack.length-1];Ce.url=this.sliceSerialize(fe)}function le(fe){L.call(this,fe);const Ce=this.stack[this.stack.length-1];Ce.url="mailto:"+this.sliceSerialize(fe)}function ae(){return{type:"blockquote",children:[]}}function xe(){return{type:"code",lang:null,meta:null,value:""}}function ye(){return{type:"inlineCode",value:""}}function Pe(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ne(){return{type:"emphasis",children:[]}}function nt(){return{type:"heading",depth:0,children:[]}}function Ue(){return{type:"break"}}function Be(){return{type:"html",value:""}}function $t(){return{type:"image",title:null,url:"",alt:null}}function nn(){return{type:"link",title:null,url:"",children:[]}}function Qe(fe){return{type:"list",ordered:fe.type==="listOrdered",start:null,spread:fe._spread,children:[]}}function tt(fe){return{type:"listItem",spread:fe._spread,checked:null,children:[]}}function it(){return{type:"paragraph",children:[]}}function Me(){return{type:"strong",children:[]}}function $e(){return{type:"text",value:""}}function xt(){return{type:"thematicBreak"}}}function Qr(e){return{line:e.line,column:e.column,offset:e.offset}}function Rv(e,t){let i=-1;for(;++i<t.length;){const s=t[i];Array.isArray(s)?Rv(e,s):Z5(e,s)}}function Z5(e,t){let i;for(i in t)if(Dv.call(t,i))switch(i){case"canContainEols":{const s=t[i];s&&e[i].push(...s);break}case"transforms":{const s=t[i];s&&e[i].push(...s);break}case"enter":case"exit":{const s=t[i];s&&Object.assign(e[i],s);break}}}function P1(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Xo({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Xo({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Xo({start:t.start,end:t.end})+") is still open")}function J5(e){const t=this;t.parser=i;function i(s){return X5(s,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function eR(e,t){const i={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,i),e.applyData(t,i)}function tR(e,t){const i={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,i),[e.applyData(t,i),{type:"text",value:`
156
- `}]}function nR(e,t){const i=t.value?t.value+`
157
- `:"",s={},u=t.lang?t.lang.split(/\s+/):[];u.length>0&&(s.className=["language-"+u[0]]);let p={type:"element",tagName:"code",properties:s,children:[{type:"text",value:i}]};return t.meta&&(p.data={meta:t.meta}),e.patch(t,p),p=e.applyData(t,p),p={type:"element",tagName:"pre",properties:{},children:[p]},e.patch(t,p),p}function iR(e,t){const i={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function rR(e,t){const i={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function sR(e,t){const i=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",s=String(t.identifier).toUpperCase(),u=Ma(s.toLowerCase()),p=e.footnoteOrder.indexOf(s);let d,o=e.footnoteCounts.get(s);o===void 0?(o=0,e.footnoteOrder.push(s),d=e.footnoteOrder.length):d=p+1,o+=1,e.footnoteCounts.set(s,o);const l={type:"element",tagName:"a",properties:{href:"#"+i+"fn-"+u,id:i+"fnref-"+u+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(d)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)}function aR(e,t){const i={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function oR(e,t){if(e.options.allowDangerousHtml){const i={type:"raw",value:t.value};return e.patch(t,i),e.applyData(t,i)}}function kv(e,t){const i=t.referenceType;let s="]";if(i==="collapsed"?s+="[]":i==="full"&&(s+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+s}];const u=e.all(t),p=u[0];p&&p.type==="text"?p.value="["+p.value:u.unshift({type:"text",value:"["});const d=u[u.length-1];return d&&d.type==="text"?d.value+=s:u.push({type:"text",value:s}),u}function lR(e,t){const i=String(t.identifier).toUpperCase(),s=e.definitionById.get(i);if(!s)return kv(e,t);const u={src:Ma(s.url||""),alt:t.alt};s.title!==null&&s.title!==void 0&&(u.title=s.title);const p={type:"element",tagName:"img",properties:u,children:[]};return e.patch(t,p),e.applyData(t,p)}function uR(e,t){const i={src:Ma(t.url)};t.alt!==null&&t.alt!==void 0&&(i.alt=t.alt),t.title!==null&&t.title!==void 0&&(i.title=t.title);const s={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,s),e.applyData(t,s)}function cR(e,t){const i={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,i);const s={type:"element",tagName:"code",properties:{},children:[i]};return e.patch(t,s),e.applyData(t,s)}function hR(e,t){const i=String(t.identifier).toUpperCase(),s=e.definitionById.get(i);if(!s)return kv(e,t);const u={href:Ma(s.url||"")};s.title!==null&&s.title!==void 0&&(u.title=s.title);const p={type:"element",tagName:"a",properties:u,children:e.all(t)};return e.patch(t,p),e.applyData(t,p)}function dR(e,t){const i={href:Ma(t.url)};t.title!==null&&t.title!==void 0&&(i.title=t.title);const s={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function fR(e,t,i){const s=e.all(t),u=i?pR(i):Lv(t),p={},d=[];if(typeof t.checked=="boolean"){const g=s[0];let h;g&&g.type==="element"&&g.tagName==="p"?h=g:(h={type:"element",tagName:"p",properties:{},children:[]},s.unshift(h)),h.children.length>0&&h.children.unshift({type:"text",value:" "}),h.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),p.className=["task-list-item"]}let o=-1;for(;++o<s.length;){const g=s[o];(u||o!==0||g.type!=="element"||g.tagName!=="p")&&d.push({type:"text",value:`
158
- `}),g.type==="element"&&g.tagName==="p"&&!u?d.push(...g.children):d.push(g)}const l=s[s.length-1];l&&(u||l.type!=="element"||l.tagName!=="p")&&d.push({type:"text",value:`
159
- `});const c={type:"element",tagName:"li",properties:p,children:d};return e.patch(t,c),e.applyData(t,c)}function pR(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const i=e.children;let s=-1;for(;!t&&++s<i.length;)t=Lv(i[s])}return t}function Lv(e){const t=e.spread;return t??e.children.length>1}function gR(e,t){const i={},s=e.all(t);let u=-1;for(typeof t.start=="number"&&t.start!==1&&(i.start=t.start);++u<s.length;){const d=s[u];if(d.type==="element"&&d.tagName==="li"&&d.properties&&Array.isArray(d.properties.className)&&d.properties.className.includes("task-list-item")){i.className=["contains-task-list"];break}}const p={type:"element",tagName:t.ordered?"ol":"ul",properties:i,children:e.wrap(s,!0)};return e.patch(t,p),e.applyData(t,p)}function mR(e,t){const i={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function _R(e,t){const i={type:"root",children:e.wrap(e.all(t))};return e.patch(t,i),e.applyData(t,i)}function bR(e,t){const i={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function ER(e,t){const i=e.all(t),s=i.shift(),u=[];if(s){const d={type:"element",tagName:"thead",properties:{},children:e.wrap([s],!0)};e.patch(t.children[0],d),u.push(d)}if(i.length>0){const d={type:"element",tagName:"tbody",properties:{},children:e.wrap(i,!0)},o=Xi(t.children[1]),l=Oc(t.children[t.children.length-1]);o&&l&&(d.position={start:o,end:l}),u.push(d)}const p={type:"element",tagName:"table",properties:{},children:e.wrap(u,!0)};return e.patch(t,p),e.applyData(t,p)}function vR(e,t,i){const s=i?i.children:void 0,p=(s?s.indexOf(t):1)===0?"th":"td",d=i&&i.type==="table"?i.align:void 0,o=d?d.length:t.children.length;let l=-1;const c=[];for(;++l<o;){const h=t.children[l],b={},y=d?d[l]:void 0;y&&(b.align=y);let T={type:"element",tagName:p,properties:b,children:[]};h&&(T.children=e.all(h),e.patch(h,T),T=e.applyData(h,T)),c.push(T)}const g={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,g),e.applyData(t,g)}function SR(e,t){const i={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}const U1=9,H1=32;function yR(e){const t=String(e),i=/\r?\n|\r/g;let s=i.exec(t),u=0;const p=[];for(;s;)p.push(z1(t.slice(u,s.index),u>0,!0),s[0]),u=s.index+s[0].length,s=i.exec(t);return p.push(z1(t.slice(u),u>0,!1)),p.join("")}function z1(e,t,i){let s=0,u=e.length;if(t){let p=e.codePointAt(s);for(;p===U1||p===H1;)s++,p=e.codePointAt(s)}if(i){let p=e.codePointAt(u-1);for(;p===U1||p===H1;)u--,p=e.codePointAt(u-1)}return u>s?e.slice(s,u):""}function CR(e,t){const i={type:"text",value:yR(String(t.value))};return e.patch(t,i),e.applyData(t,i)}function TR(e,t){const i={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,i),e.applyData(t,i)}const AR={blockquote:eR,break:tR,code:nR,delete:iR,emphasis:rR,footnoteReference:sR,heading:aR,html:oR,imageReference:lR,image:uR,inlineCode:cR,linkReference:hR,link:dR,listItem:fR,list:gR,paragraph:mR,root:_R,strong:bR,table:ER,tableCell:SR,tableRow:vR,text:CR,thematicBreak:TR,toml:Ku,yaml:Ku,definition:Ku,footnoteDefinition:Ku};function Ku(){}const Ov=-1,Ic=0,Zo=1,_c=2,R0=3,k0=4,L0=5,O0=6,Nv=7,Mv=8,j1=typeof self=="object"?self:globalThis,xR=(e,t)=>{const i=(u,p)=>(e.set(p,u),u),s=u=>{if(e.has(u))return e.get(u);const[p,d]=t[u];switch(p){case Ic:case Ov:return i(d,u);case Zo:{const o=i([],u);for(const l of d)o.push(s(l));return o}case _c:{const o=i({},u);for(const[l,c]of d)o[s(l)]=s(c);return o}case R0:return i(new Date(d),u);case k0:{const{source:o,flags:l}=d;return i(new RegExp(o,l),u)}case L0:{const o=i(new Map,u);for(const[l,c]of d)o.set(s(l),s(c));return o}case O0:{const o=i(new Set,u);for(const l of d)o.add(s(l));return o}case Nv:{const{name:o,message:l}=d;return i(new j1[o](l),u)}case Mv:return i(BigInt(d),u);case"BigInt":return i(Object(BigInt(d)),u);case"ArrayBuffer":return i(new Uint8Array(d).buffer,d);case"DataView":{const{buffer:o}=new Uint8Array(d);return i(new DataView(o),d)}}return i(new j1[p](d),u)};return s},$1=e=>xR(new Map,e)(0),ma="",{toString:wR}={},{keys:DR}=Object,Uo=e=>{const t=typeof e;if(t!=="object"||!e)return[Ic,t];const i=wR.call(e).slice(8,-1);switch(i){case"Array":return[Zo,ma];case"Object":return[_c,ma];case"Date":return[R0,ma];case"RegExp":return[k0,ma];case"Map":return[L0,ma];case"Set":return[O0,ma];case"DataView":return[Zo,i]}return i.includes("Array")?[Zo,i]:i.includes("Error")?[Nv,i]:[_c,i]},Vu=([e,t])=>e===Ic&&(t==="function"||t==="symbol"),RR=(e,t,i,s)=>{const u=(d,o)=>{const l=s.push(d)-1;return i.set(o,l),l},p=d=>{if(i.has(d))return i.get(d);let[o,l]=Uo(d);switch(o){case Ic:{let g=d;switch(l){case"bigint":o=Mv,g=d.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);g=null;break;case"undefined":return u([Ov],d)}return u([o,g],d)}case Zo:{if(l){let b=d;return l==="DataView"?b=new Uint8Array(d.buffer):l==="ArrayBuffer"&&(b=new Uint8Array(d)),u([l,[...b]],d)}const g=[],h=u([o,g],d);for(const b of d)g.push(p(b));return h}case _c:{if(l)switch(l){case"BigInt":return u([l,d.toString()],d);case"Boolean":case"Number":case"String":return u([l,d.valueOf()],d)}if(t&&"toJSON"in d)return p(d.toJSON());const g=[],h=u([o,g],d);for(const b of DR(d))(e||!Vu(Uo(d[b])))&&g.push([p(b),p(d[b])]);return h}case R0:return u([o,d.toISOString()],d);case k0:{const{source:g,flags:h}=d;return u([o,{source:g,flags:h}],d)}case L0:{const g=[],h=u([o,g],d);for(const[b,y]of d)(e||!(Vu(Uo(b))||Vu(Uo(y))))&&g.push([p(b),p(y)]);return h}case O0:{const g=[],h=u([o,g],d);for(const b of d)(e||!Vu(Uo(b)))&&g.push(p(b));return h}}const{message:c}=d;return u([o,{name:l,message:c}],d)};return p},W1=(e,{json:t,lossy:i}={})=>{const s=[];return RR(!(t||i),!!t,new Map,s)(e),s},xa=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?$1(W1(e,t)):structuredClone(e):(e,t)=>$1(W1(e,t));function kR(e,t){const i=[{type:"text",value:"↩"}];return t>1&&i.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),i}function LR(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function OR(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=e.options.footnoteBackContent||kR,s=e.options.footnoteBackLabel||LR,u=e.options.footnoteLabel||"Footnotes",p=e.options.footnoteLabelTagName||"h2",d=e.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let l=-1;for(;++l<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[l]);if(!c)continue;const g=e.all(c),h=String(c.identifier).toUpperCase(),b=Ma(h.toLowerCase());let y=0;const T=[],E=e.footnoteCounts.get(h);for(;E!==void 0&&++y<=E;){T.length>0&&T.push({type:"text",value:" "});let v=typeof i=="string"?i:i(l,y);typeof v=="string"&&(v={type:"text",value:v}),T.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+b+(y>1?"-"+y:""),dataFootnoteBackref:"",ariaLabel:typeof s=="string"?s:s(l,y),className:["data-footnote-backref"]},children:Array.isArray(v)?v:[v]})}const m=g[g.length-1];if(m&&m.type==="element"&&m.tagName==="p"){const v=m.children[m.children.length-1];v&&v.type==="text"?v.value+=" ":m.children.push({type:"text",value:" "}),m.children.push(...T)}else g.push(...T);const _={type:"element",tagName:"li",properties:{id:t+"fn-"+b},children:e.wrap(g,!0)};e.patch(c,_),o.push(_)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:p,properties:{...xa(d),id:"footnote-label"},children:[{type:"text",value:u}]},{type:"text",value:`
160
- `},{type:"element",tagName:"ol",properties:{},children:e.wrap(o,!0)},{type:"text",value:`
161
- `}]}}const yl=(function(e){if(e==null)return BR;if(typeof e=="function")return Bc(e);if(typeof e=="object")return Array.isArray(e)?NR(e):MR(e);if(typeof e=="string")return IR(e);throw new Error("Expected function, string, or object as test")});function NR(e){const t=[];let i=-1;for(;++i<e.length;)t[i]=yl(e[i]);return Bc(s);function s(...u){let p=-1;for(;++p<t.length;)if(t[p].apply(this,u))return!0;return!1}}function MR(e){const t=e;return Bc(i);function i(s){const u=s;let p;for(p in e)if(u[p]!==t[p])return!1;return!0}}function IR(e){return Bc(t);function t(i){return i&&i.type===e}}function Bc(e){return t;function t(i,s,u){return!!(FR(i)&&e.call(this,i,typeof s=="number"?s:void 0,u||void 0))}}function BR(){return!0}function FR(e){return e!==null&&typeof e=="object"&&"type"in e}const Iv=[],PR=!0,Yf=!1,UR="skip";function Bv(e,t,i,s){let u;typeof t=="function"&&typeof i!="function"?(s=i,i=t):u=t;const p=yl(u),d=s?-1:1;o(e,void 0,[])();function o(l,c,g){const h=l&&typeof l=="object"?l:{};if(typeof h.type=="string"){const y=typeof h.tagName=="string"?h.tagName:typeof h.name=="string"?h.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(l.type+(y?"<"+y+">":""))+")"})}return b;function b(){let y=Iv,T,E,m;if((!t||p(l,c,g[g.length-1]||void 0))&&(y=HR(i(l,g)),y[0]===Yf))return y;if("children"in l&&l.children){const _=l;if(_.children&&y[0]!==UR)for(E=(s?_.children.length:-1)+d,m=g.concat(_);E>-1&&E<_.children.length;){const v=_.children[E];if(T=o(v,E,m)(),T[0]===Yf)return T;E=typeof T[1]=="number"?T[1]:E+d}}return y}}}function HR(e){return Array.isArray(e)?e:typeof e=="number"?[PR,e]:e==null?Iv:[e]}function Cl(e,t,i,s){let u,p,d;typeof t=="function"&&typeof i!="function"?(p=void 0,d=t,u=i):(p=t,d=i,u=s),Bv(e,p,o,u);function o(l,c){const g=c[c.length-1],h=g?g.children.indexOf(l):void 0;return d(l,h,g)}}const Gf={}.hasOwnProperty,zR={};function jR(e,t){const i=t||zR,s=new Map,u=new Map,p=new Map,d={...AR,...i.handlers},o={all:c,applyData:WR,definitionById:s,footnoteById:u,footnoteCounts:p,footnoteOrder:[],handlers:d,one:l,options:i,patch:$R,wrap:YR};return Cl(e,function(g){if(g.type==="definition"||g.type==="footnoteDefinition"){const h=g.type==="definition"?s:u,b=String(g.identifier).toUpperCase();h.has(b)||h.set(b,g)}}),o;function l(g,h){const b=g.type,y=o.handlers[b];if(Gf.call(o.handlers,b)&&y)return y(o,g,h);if(o.options.passThrough&&o.options.passThrough.includes(b)){if("children"in g){const{children:E,...m}=g,_=xa(m);return _.children=o.all(g),_}return xa(g)}return(o.options.unknownHandler||qR)(o,g,h)}function c(g){const h=[];if("children"in g){const b=g.children;let y=-1;for(;++y<b.length;){const T=o.one(b[y],g);if(T){if(y&&b[y-1].type==="break"&&(!Array.isArray(T)&&T.type==="text"&&(T.value=q1(T.value)),!Array.isArray(T)&&T.type==="element")){const E=T.children[0];E&&E.type==="text"&&(E.value=q1(E.value))}Array.isArray(T)?h.push(...T):h.push(T)}}}return h}}function $R(e,t){e.position&&(t.position=L3(e))}function WR(e,t){let i=t;if(e&&e.data){const s=e.data.hName,u=e.data.hChildren,p=e.data.hProperties;if(typeof s=="string")if(i.type==="element")i.tagName=s;else{const d="children"in i?i.children:[i];i={type:"element",tagName:s,properties:{},children:d}}i.type==="element"&&p&&Object.assign(i.properties,xa(p)),"children"in i&&i.children&&u!==null&&u!==void 0&&(i.children=u)}return i}function qR(e,t){const i=t.data||{},s="value"in t&&!(Gf.call(i,"hProperties")||Gf.call(i,"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 YR(e,t){const i=[];let s=-1;for(t&&i.push({type:"text",value:`
162
- `});++s<e.length;)s&&i.push({type:"text",value:`
163
- `}),i.push(e[s]);return t&&e.length>0&&i.push({type:"text",value:`
164
- `}),i}function q1(e){let t=0,i=e.charCodeAt(t);for(;i===9||i===32;)t++,i=e.charCodeAt(t);return e.slice(t)}function Y1(e,t){const i=jR(e,t),s=i.one(e,void 0),u=OR(i),p=Array.isArray(s)?{type:"root",children:s}:s||{type:"root",children:[]};return u&&p.children.push({type:"text",value:`
165
- `},u),p}function GR(e,t){return e&&"run"in e?async function(i,s){const u=Y1(i,{file:s,...t});await e.run(u,s)}:function(i,s){return Y1(i,{file:s,...e||t})}}function G1(e){if(e)throw e}var ff,K1;function KR(){if(K1)return ff;K1=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,i=Object.defineProperty,s=Object.getOwnPropertyDescriptor,u=function(c){return typeof Array.isArray=="function"?Array.isArray(c):t.call(c)==="[object Array]"},p=function(c){if(!c||t.call(c)!=="[object Object]")return!1;var g=e.call(c,"constructor"),h=c.constructor&&c.constructor.prototype&&e.call(c.constructor.prototype,"isPrototypeOf");if(c.constructor&&!g&&!h)return!1;var b;for(b in c);return typeof b>"u"||e.call(c,b)},d=function(c,g){i&&g.name==="__proto__"?i(c,g.name,{enumerable:!0,configurable:!0,value:g.newValue,writable:!0}):c[g.name]=g.newValue},o=function(c,g){if(g==="__proto__")if(e.call(c,g)){if(s)return s(c,g).value}else return;return c[g]};return ff=function l(){var c,g,h,b,y,T,E=arguments[0],m=1,_=arguments.length,v=!1;for(typeof E=="boolean"&&(v=E,E=arguments[1]||{},m=2),(E==null||typeof E!="object"&&typeof E!="function")&&(E={});m<_;++m)if(c=arguments[m],c!=null)for(g in c)h=o(E,g),b=o(c,g),E!==b&&(v&&b&&(p(b)||(y=u(b)))?(y?(y=!1,T=h&&u(h)?h:[]):T=h&&p(h)?h:{},d(E,{name:g,newValue:l(v,T,b)})):typeof b<"u"&&d(E,{name:g,newValue:b}));return E},ff}var VR=KR();const pf=Tc(VR);function Kf(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 XR(){const e=[],t={run:i,use:s};return t;function i(...u){let p=-1;const d=u.pop();if(typeof d!="function")throw new TypeError("Expected function as last argument, not "+d);o(null,...u);function o(l,...c){const g=e[++p];let h=-1;if(l){d(l);return}for(;++h<u.length;)(c[h]===null||c[h]===void 0)&&(c[h]=u[h]);u=c,g?QR(g,o)(...c):d(null,...c)}}function s(u){if(typeof u!="function")throw new TypeError("Expected `middelware` to be a function, not "+u);return e.push(u),t}}function QR(e,t){let i;return s;function s(...d){const o=e.length>d.length;let l;o&&d.push(u);try{l=e.apply(this,d)}catch(c){const g=c;if(o&&i)throw g;return u(g)}o||(l&&l.then&&typeof l.then=="function"?l.then(p,u):l instanceof Error?u(l):p(l))}function u(d,...o){i||(i=!0,t(d,...o))}function p(d){u(null,d)}}const qi={basename:ZR,dirname:JR,extname:e6,join:t6,sep:"/"};function ZR(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Tl(e);let i=0,s=-1,u=e.length,p;if(t===void 0||t.length===0||t.length>e.length){for(;u--;)if(e.codePointAt(u)===47){if(p){i=u+1;break}}else s<0&&(p=!0,s=u+1);return s<0?"":e.slice(i,s)}if(t===e)return"";let d=-1,o=t.length-1;for(;u--;)if(e.codePointAt(u)===47){if(p){i=u+1;break}}else d<0&&(p=!0,d=u+1),o>-1&&(e.codePointAt(u)===t.codePointAt(o--)?o<0&&(s=u):(o=-1,s=d));return i===s?s=d:s<0&&(s=e.length),e.slice(i,s)}function JR(e){if(Tl(e),e.length===0)return".";let t=-1,i=e.length,s;for(;--i;)if(e.codePointAt(i)===47){if(s){t=i;break}}else s||(s=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function e6(e){Tl(e);let t=e.length,i=-1,s=0,u=-1,p=0,d;for(;t--;){const o=e.codePointAt(t);if(o===47){if(d){s=t+1;break}continue}i<0&&(d=!0,i=t+1),o===46?u<0?u=t:p!==1&&(p=1):u>-1&&(p=-1)}return u<0||i<0||p===0||p===1&&u===i-1&&u===s+1?"":e.slice(u,i)}function t6(...e){let t=-1,i;for(;++t<e.length;)Tl(e[t]),e[t]&&(i=i===void 0?e[t]:i+"/"+e[t]);return i===void 0?".":n6(i)}function n6(e){Tl(e);const t=e.codePointAt(0)===47;let i=i6(e,!t);return i.length===0&&!t&&(i="."),i.length>0&&e.codePointAt(e.length-1)===47&&(i+="/"),t?"/"+i:i}function i6(e,t){let i="",s=0,u=-1,p=0,d=-1,o,l;for(;++d<=e.length;){if(d<e.length)o=e.codePointAt(d);else{if(o===47)break;o=47}if(o===47){if(!(u===d-1||p===1))if(u!==d-1&&p===2){if(i.length<2||s!==2||i.codePointAt(i.length-1)!==46||i.codePointAt(i.length-2)!==46){if(i.length>2){if(l=i.lastIndexOf("/"),l!==i.length-1){l<0?(i="",s=0):(i=i.slice(0,l),s=i.length-1-i.lastIndexOf("/")),u=d,p=0;continue}}else if(i.length>0){i="",s=0,u=d,p=0;continue}}t&&(i=i.length>0?i+"/..":"..",s=2)}else i.length>0?i+="/"+e.slice(u+1,d):i=e.slice(u+1,d),s=d-u-1;u=d,p=0}else o===46&&p>-1?p++:p=-1}return i}function Tl(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const r6={cwd:s6};function s6(){return"/"}function Vf(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function a6(e){if(typeof e=="string")e=new URL(e);else if(!Vf(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 o6(e)}function o6(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 i=-1;for(;++i<t.length;)if(t.codePointAt(i)===37&&t.codePointAt(i+1)===50){const s=t.codePointAt(i+2);if(s===70||s===102){const u=new TypeError("File URL path must not include encoded / characters");throw u.code="ERR_INVALID_FILE_URL_PATH",u}}return decodeURIComponent(t)}const gf=["history","path","basename","stem","extname","dirname"];class Fv{constructor(t){let i;t?Vf(t)?i={path:t}:typeof t=="string"||l6(t)?i={value:t}:i=t:i={},this.cwd="cwd"in i?"":r6.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let s=-1;for(;++s<gf.length;){const p=gf[s];p in i&&i[p]!==void 0&&i[p]!==null&&(this[p]=p==="history"?[...i[p]]:i[p])}let u;for(u in i)gf.includes(u)||(this[u]=i[u])}get basename(){return typeof this.path=="string"?qi.basename(this.path):void 0}set basename(t){_f(t,"basename"),mf(t,"basename"),this.path=qi.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?qi.dirname(this.path):void 0}set dirname(t){V1(this.basename,"dirname"),this.path=qi.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?qi.extname(this.path):void 0}set extname(t){if(mf(t,"extname"),V1(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=qi.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Vf(t)&&(t=a6(t)),_f(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?qi.basename(this.path,this.extname):void 0}set stem(t){_f(t,"stem"),mf(t,"stem"),this.path=qi.join(this.dirname||"",t+(this.extname||""))}fail(t,i,s){const u=this.message(t,i,s);throw u.fatal=!0,u}info(t,i,s){const u=this.message(t,i,s);return u.fatal=void 0,u}message(t,i,s){const u=new In(t,i,s);return this.path&&(u.name=this.path+":"+u.name,u.file=this.path),u.fatal=!1,this.messages.push(u),u}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function mf(e,t){if(e&&e.includes(qi.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+qi.sep+"`")}function _f(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function V1(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function l6(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const u6=(function(e){const s=this.constructor.prototype,u=s[e],p=function(){return u.apply(p,arguments)};return Object.setPrototypeOf(p,s),p}),c6={}.hasOwnProperty;class N0 extends u6{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=XR()}copy(){const t=new N0;let i=-1;for(;++i<this.attachers.length;){const s=this.attachers[i];t.use(...s)}return t.data(pf(!0,{},this.namespace)),t}data(t,i){return typeof t=="string"?arguments.length===2?(vf("data",this.frozen),this.namespace[t]=i,this):c6.call(this.namespace,t)&&this.namespace[t]||void 0:t?(vf("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[i,...s]=this.attachers[this.freezeIndex];if(s[0]===!1)continue;s[0]===!0&&(s[0]=void 0);const u=i.call(t,...s);typeof u=="function"&&this.transformers.use(u)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const i=Xu(t),s=this.parser||this.Parser;return bf("parse",s),s(String(i),i)}process(t,i){const s=this;return this.freeze(),bf("process",this.parser||this.Parser),Ef("process",this.compiler||this.Compiler),i?u(void 0,i):new Promise(u);function u(p,d){const o=Xu(t),l=s.parse(o);s.run(l,o,function(g,h,b){if(g||!h||!b)return c(g);const y=h,T=s.stringify(y,b);f6(T)?b.value=T:b.result=T,c(g,b)});function c(g,h){g||!h?d(g):p?p(h):i(void 0,h)}}}processSync(t){let i=!1,s;return this.freeze(),bf("processSync",this.parser||this.Parser),Ef("processSync",this.compiler||this.Compiler),this.process(t,u),Q1("processSync","process",i),s;function u(p,d){i=!0,G1(p),s=d}}run(t,i,s){X1(t),this.freeze();const u=this.transformers;return!s&&typeof i=="function"&&(s=i,i=void 0),s?p(void 0,s):new Promise(p);function p(d,o){const l=Xu(i);u.run(t,l,c);function c(g,h,b){const y=h||t;g?o(g):d?d(y):s(void 0,y,b)}}}runSync(t,i){let s=!1,u;return this.run(t,i,p),Q1("runSync","run",s),u;function p(d,o){G1(d),u=o,s=!0}}stringify(t,i){this.freeze();const s=Xu(i),u=this.compiler||this.Compiler;return Ef("stringify",u),X1(t),u(t,s)}use(t,...i){const s=this.attachers,u=this.namespace;if(vf("use",this.frozen),t!=null)if(typeof t=="function")l(t,i);else if(typeof t=="object")Array.isArray(t)?o(t):d(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function p(c){if(typeof c=="function")l(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[g,...h]=c;l(g,h)}else d(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function d(c){if(!("plugins"in c)&&!("settings"in c))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");o(c.plugins),c.settings&&(u.settings=pf(!0,u.settings,c.settings))}function o(c){let g=-1;if(c!=null)if(Array.isArray(c))for(;++g<c.length;){const h=c[g];p(h)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function l(c,g){let h=-1,b=-1;for(;++h<s.length;)if(s[h][0]===c){b=h;break}if(b===-1)s.push([c,...g]);else if(g.length>0){let[y,...T]=g;const E=s[b][1];Kf(E)&&Kf(y)&&(y=pf(!0,E,y)),s[b]=[c,y,...T]}}}}const h6=new N0().freeze();function bf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Ef(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function vf(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 X1(e){if(!Kf(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Q1(e,t,i){if(!i)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Xu(e){return d6(e)?e:new Fv(e)}function d6(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function f6(e){return typeof e=="string"||p6(e)}function p6(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const g6="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Z1=[],J1={allowDangerousHtml:!0},m6=/^(https?|ircs?|mailto|xmpp)$/i,_6=[{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 b6(e){const t=E6(e),i=v6(e);return S6(t.runSync(t.parse(i),i),e)}function E6(e){const t=e.rehypePlugins||Z1,i=e.remarkPlugins||Z1,s=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...J1}:J1;return h6().use(J5).use(i).use(GR,s).use(t)}function v6(e){const t=e.children||"",i=new Fv;return typeof t=="string"&&(i.value=t),i}function S6(e,t){const i=t.allowedElements,s=t.allowElement,u=t.components,p=t.disallowedElements,d=t.skipHtml,o=t.unwrapDisallowed,l=t.urlTransform||y6;for(const g of _6)Object.hasOwn(t,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+g6+g.id,void 0);return Cl(e,c),B3(e,{Fragment:X.Fragment,components:u,ignoreInvalidStyle:!0,jsx:X.jsx,jsxs:X.jsxs,passKeys:!0,passNode:!0});function c(g,h,b){if(g.type==="raw"&&b&&typeof h=="number")return d?b.children.splice(h,1):b.children[h]={type:"text",value:g.value},h;if(g.type==="element"){let y;for(y in cf)if(Object.hasOwn(cf,y)&&Object.hasOwn(g.properties,y)){const T=g.properties[y],E=cf[y];(E===null||E.includes(g.tagName))&&(g.properties[y]=l(String(T||""),y,g))}}if(g.type==="element"){let y=i?!i.includes(g.tagName):p?p.includes(g.tagName):!1;if(!y&&s&&typeof h=="number"&&(y=!s(g,h,b)),y&&b&&typeof h=="number")return o&&g.children?b.children.splice(h,1,...g.children):b.children.splice(h,1),h}}}function y6(e){const t=e.indexOf(":"),i=e.indexOf("?"),s=e.indexOf("#"),u=e.indexOf("/");return t===-1||u!==-1&&t>u||i!==-1&&t>i||s!==-1&&t>s||m6.test(e.slice(0,t))?e:""}function eb(e,t){const i=String(e);if(typeof t!="string")throw new TypeError("Expected character");let s=0,u=i.indexOf(t);for(;u!==-1;)s++,u=i.indexOf(t,u+t.length);return s}function C6(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function T6(e,t,i){const u=yl((i||{}).ignore||[]),p=A6(t);let d=-1;for(;++d<p.length;)Bv(e,"text",o);function o(c,g){let h=-1,b;for(;++h<g.length;){const y=g[h],T=b?b.children:void 0;if(u(y,T?T.indexOf(y):void 0,b))return;b=y}if(b)return l(c,g)}function l(c,g){const h=g[g.length-1],b=p[d][0],y=p[d][1];let T=0;const m=h.children.indexOf(c);let _=!1,v=[];b.lastIndex=0;let S=b.exec(c.value);for(;S;){const x=S.index,k={index:S.index,input:S.input,stack:[...g,c]};let A=y(...S,k);if(typeof A=="string"&&(A=A.length>0?{type:"text",value:A}:void 0),A===!1?b.lastIndex=x+1:(T!==x&&v.push({type:"text",value:c.value.slice(T,x)}),Array.isArray(A)?v.push(...A):A&&v.push(A),T=x+S[0].length,_=!0),!b.global)break;S=b.exec(c.value)}return _?(T<c.value.length&&v.push({type:"text",value:c.value.slice(T)}),h.children.splice(m,1,...v)):v=[c],m+v.length}}function A6(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const i=!e[0]||Array.isArray(e[0])?e:[e];let s=-1;for(;++s<i.length;){const u=i[s];t.push([x6(u[0]),w6(u[1])])}return t}function x6(e){return typeof e=="string"?new RegExp(C6(e),"g"):e}function w6(e){return typeof e=="function"?e:function(){return e}}const Sf="phrasing",yf=["autolink","link","image","label"];function D6(){return{transforms:[I6],enter:{literalAutolink:k6,literalAutolinkEmail:Cf,literalAutolinkHttp:Cf,literalAutolinkWww:Cf},exit:{literalAutolink:M6,literalAutolinkEmail:N6,literalAutolinkHttp:L6,literalAutolinkWww:O6}}}function R6(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Sf,notInConstruct:yf},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Sf,notInConstruct:yf},{character:":",before:"[ps]",after:"\\/",inConstruct:Sf,notInConstruct:yf}]}}function k6(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Cf(e){this.config.enter.autolinkProtocol.call(this,e)}function L6(e){this.config.exit.autolinkProtocol.call(this,e)}function O6(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 N6(e){this.config.exit.autolinkEmail.call(this,e)}function M6(e){this.exit(e)}function I6(e){T6(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,B6],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),F6]],{ignore:["link","linkReference"]})}function B6(e,t,i,s,u){let p="";if(!Pv(u)||(/^w/i.test(t)&&(i=t+i,t="",p="http://"),!P6(i)))return!1;const d=U6(i+s);if(!d[0])return!1;const o={type:"link",title:null,url:p+t+d[0],children:[{type:"text",value:t+d[0]}]};return d[1]?[o,{type:"text",value:d[1]}]:o}function F6(e,t,i,s){return!Pv(s,!0)||/[-\d_]$/.test(i)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+i,children:[{type:"text",value:t+"@"+i}]}}function P6(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 U6(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let i=t[0],s=i.indexOf(")");const u=eb(e,"(");let p=eb(e,")");for(;s!==-1&&u>p;)e+=i.slice(0,s+1),i=i.slice(s+1),s=i.indexOf(")"),p++;return[e,i]}function Pv(e,t){const i=e.input.charCodeAt(e.index-1);return(e.index===0||Rs(i)||Nc(i))&&(!t||i!==47)}Uv.peek=K6;function H6(){this.buffer()}function z6(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function j6(){this.buffer()}function $6(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function W6(e){const t=this.resume(),i=this.stack[this.stack.length-1];i.type,i.identifier=Bi(this.sliceSerialize(e)).toLowerCase(),i.label=t}function q6(e){this.exit(e)}function Y6(e){const t=this.resume(),i=this.stack[this.stack.length-1];i.type,i.identifier=Bi(this.sliceSerialize(e)).toLowerCase(),i.label=t}function G6(e){this.exit(e)}function K6(){return"["}function Uv(e,t,i,s){const u=i.createTracker(s);let p=u.move("[^");const d=i.enter("footnoteReference"),o=i.enter("reference");return p+=u.move(i.safe(i.associationId(e),{after:"]",before:p})),o(),d(),p+=u.move("]"),p}function V6(){return{enter:{gfmFootnoteCallString:H6,gfmFootnoteCall:z6,gfmFootnoteDefinitionLabelString:j6,gfmFootnoteDefinition:$6},exit:{gfmFootnoteCallString:W6,gfmFootnoteCall:q6,gfmFootnoteDefinitionLabelString:Y6,gfmFootnoteDefinition:G6}}}function X6(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:i,footnoteReference:Uv},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function i(s,u,p,d){const o=p.createTracker(d);let l=o.move("[^");const c=p.enter("footnoteDefinition"),g=p.enter("label");return l+=o.move(p.safe(p.associationId(s),{before:l,after:"]"})),g(),l+=o.move("]:"),s.children&&s.children.length>0&&(o.shift(4),l+=o.move((t?`
166
- `:" ")+p.indentLines(p.containerFlow(s,o.current()),t?Hv:Q6))),c(),l}}function Q6(e,t,i){return t===0?e:Hv(e,t,i)}function Hv(e,t,i){return(i?"":" ")+e}const Z6=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];zv.peek=ik;function J6(){return{canContainEols:["delete"],enter:{strikethrough:tk},exit:{strikethrough:nk}}}function ek(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Z6}],handlers:{delete:zv}}}function tk(e){this.enter({type:"delete",children:[]},e)}function nk(e){this.exit(e)}function zv(e,t,i,s){const u=i.createTracker(s),p=i.enter("strikethrough");let d=u.move("~~");return d+=i.containerPhrasing(e,{...u.current(),before:d,after:"~"}),d+=u.move("~~"),p(),d}function ik(){return"~"}function rk(e){return e.length}function sk(e,t){const i=t||{},s=(i.align||[]).concat(),u=i.stringLength||rk,p=[],d=[],o=[],l=[];let c=0,g=-1;for(;++g<e.length;){const E=[],m=[];let _=-1;for(e[g].length>c&&(c=e[g].length);++_<e[g].length;){const v=ak(e[g][_]);if(i.alignDelimiters!==!1){const S=u(v);m[_]=S,(l[_]===void 0||S>l[_])&&(l[_]=S)}E.push(v)}d[g]=E,o[g]=m}let h=-1;if(typeof s=="object"&&"length"in s)for(;++h<c;)p[h]=tb(s[h]);else{const E=tb(s);for(;++h<c;)p[h]=E}h=-1;const b=[],y=[];for(;++h<c;){const E=p[h];let m="",_="";E===99?(m=":",_=":"):E===108?m=":":E===114&&(_=":");let v=i.alignDelimiters===!1?1:Math.max(1,l[h]-m.length-_.length);const S=m+"-".repeat(v)+_;i.alignDelimiters!==!1&&(v=m.length+v+_.length,v>l[h]&&(l[h]=v),y[h]=v),b[h]=S}d.splice(1,0,b),o.splice(1,0,y),g=-1;const T=[];for(;++g<d.length;){const E=d[g],m=o[g];h=-1;const _=[];for(;++h<c;){const v=E[h]||"";let S="",x="";if(i.alignDelimiters!==!1){const k=l[h]-(m[h]||0),A=p[h];A===114?S=" ".repeat(k):A===99?k%2?(S=" ".repeat(k/2+.5),x=" ".repeat(k/2-.5)):(S=" ".repeat(k/2),x=S):x=" ".repeat(k)}i.delimiterStart!==!1&&!h&&_.push("|"),i.padding!==!1&&!(i.alignDelimiters===!1&&v==="")&&(i.delimiterStart!==!1||h)&&_.push(" "),i.alignDelimiters!==!1&&_.push(S),_.push(v),i.alignDelimiters!==!1&&_.push(x),i.padding!==!1&&_.push(" "),(i.delimiterEnd!==!1||h!==c-1)&&_.push("|")}T.push(i.delimiterEnd===!1?_.join("").replace(/ +$/,""):_.join(""))}return T.join(`
167
- `)}function ak(e){return e==null?"":String(e)}function tb(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 nb={}.hasOwnProperty;function jv(e,t){const i=t||{};function s(u,...p){let d=s.invalid;const o=s.handlers;if(u&&nb.call(u,e)){const l=String(u[e]);d=nb.call(o,l)?o[l]:s.unknown}if(d)return d.call(this,u,...p)}return s.handlers=i.handlers||{},s.invalid=i.invalid,s.unknown=i.unknown,s}function ok(e,t,i,s){const u=i.enter("blockquote"),p=i.createTracker(s);p.move("> "),p.shift(2);const d=i.indentLines(i.containerFlow(e,p.current()),lk);return u(),d}function lk(e,t,i){return">"+(i?"":" ")+e}function uk(e,t){return ib(e,t.inConstruct,!0)&&!ib(e,t.notInConstruct,!1)}function ib(e,t,i){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return i;let s=-1;for(;++s<t.length;)if(e.includes(t[s]))return!0;return!1}function rb(e,t,i,s){let u=-1;for(;++u<i.unsafe.length;)if(i.unsafe[u].character===`
168
- `&&uk(i.stack,i.unsafe[u]))return/[ \t]/.test(s.before)?"":" ";return`\\
169
- `}function ck(e,t){const i=String(e);let s=i.indexOf(t),u=s,p=0,d=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;s!==-1;)s===u?++p>d&&(d=p):p=1,u=s+t.length,s=i.indexOf(t,u);return d}function hk(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 dk(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 fk(e,t,i,s){const u=dk(i),p=e.value||"",d=u==="`"?"GraveAccent":"Tilde";if(hk(e,i)){const h=i.enter("codeIndented"),b=i.indentLines(p,pk);return h(),b}const o=i.createTracker(s),l=u.repeat(Math.max(ck(p,u)+1,3)),c=i.enter("codeFenced");let g=o.move(l);if(e.lang){const h=i.enter(`codeFencedLang${d}`);g+=o.move(i.safe(e.lang,{before:g,after:" ",encode:["`"],...o.current()})),h()}if(e.lang&&e.meta){const h=i.enter(`codeFencedMeta${d}`);g+=o.move(" "),g+=o.move(i.safe(e.meta,{before:g,after:`
170
- `,encode:["`"],...o.current()})),h()}return g+=o.move(`
171
- `),p&&(g+=o.move(p+`
172
- `)),g+=o.move(l),c(),g}function pk(e,t,i){return(i?"":" ")+e}function M0(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 gk(e,t,i,s){const u=M0(i),p=u==='"'?"Quote":"Apostrophe",d=i.enter("definition");let o=i.enter("label");const l=i.createTracker(s);let c=l.move("[");return c+=l.move(i.safe(i.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),o(),!e.url||/[\0- \u007F]/.test(e.url)?(o=i.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(i.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(o=i.enter("destinationRaw"),c+=l.move(i.safe(e.url,{before:c,after:e.title?" ":`
173
- `,...l.current()}))),o(),e.title&&(o=i.enter(`title${p}`),c+=l.move(" "+u),c+=l.move(i.safe(e.title,{before:c,after:u,...l.current()})),c+=l.move(u),o()),d(),c}function mk(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 hl(e){return"&#x"+e.toString(16).toUpperCase()+";"}function bc(e,t,i){const s=Aa(e),u=Aa(t);return s===void 0?u===void 0?i==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:u===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:s===1?u===void 0?{inside:!1,outside:!1}:u===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:u===void 0?{inside:!1,outside:!1}:u===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}$v.peek=_k;function $v(e,t,i,s){const u=mk(i),p=i.enter("emphasis"),d=i.createTracker(s),o=d.move(u);let l=d.move(i.containerPhrasing(e,{after:u,before:o,...d.current()}));const c=l.charCodeAt(0),g=bc(s.before.charCodeAt(s.before.length-1),c,u);g.inside&&(l=hl(c)+l.slice(1));const h=l.charCodeAt(l.length-1),b=bc(s.after.charCodeAt(0),h,u);b.inside&&(l=l.slice(0,-1)+hl(h));const y=d.move(u);return p(),i.attentionEncodeSurroundingInfo={after:b.outside,before:g.outside},o+l+y}function _k(e,t,i){return i.options.emphasis||"*"}function bk(e,t){let i=!1;return Cl(e,function(s){if("value"in s&&/\r?\n|\r/.test(s.value)||s.type==="break")return i=!0,Yf}),!!((!e.depth||e.depth<3)&&x0(e)&&(t.options.setext||i))}function Ek(e,t,i,s){const u=Math.max(Math.min(6,e.depth||1),1),p=i.createTracker(s);if(bk(e,i)){const g=i.enter("headingSetext"),h=i.enter("phrasing"),b=i.containerPhrasing(e,{...p.current(),before:`
174
- `,after:`
175
- `});return h(),g(),b+`
176
- `+(u===1?"=":"-").repeat(b.length-(Math.max(b.lastIndexOf("\r"),b.lastIndexOf(`
177
- `))+1))}const d="#".repeat(u),o=i.enter("headingAtx"),l=i.enter("phrasing");p.move(d+" ");let c=i.containerPhrasing(e,{before:"# ",after:`
178
- `,...p.current()});return/^[\t ]/.test(c)&&(c=hl(c.charCodeAt(0))+c.slice(1)),c=c?d+" "+c:d,i.options.closeAtx&&(c+=" "+d),l(),o(),c}Wv.peek=vk;function Wv(e){return e.value||""}function vk(){return"<"}qv.peek=Sk;function qv(e,t,i,s){const u=M0(i),p=u==='"'?"Quote":"Apostrophe",d=i.enter("image");let o=i.enter("label");const l=i.createTracker(s);let c=l.move("![");return c+=l.move(i.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=i.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(i.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(o=i.enter("destinationRaw"),c+=l.move(i.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),o(),e.title&&(o=i.enter(`title${p}`),c+=l.move(" "+u),c+=l.move(i.safe(e.title,{before:c,after:u,...l.current()})),c+=l.move(u),o()),c+=l.move(")"),d(),c}function Sk(){return"!"}Yv.peek=yk;function Yv(e,t,i,s){const u=e.referenceType,p=i.enter("imageReference");let d=i.enter("label");const o=i.createTracker(s);let l=o.move("![");const c=i.safe(e.alt,{before:l,after:"]",...o.current()});l+=o.move(c+"]["),d();const g=i.stack;i.stack=[],d=i.enter("reference");const h=i.safe(i.associationId(e),{before:l,after:"]",...o.current()});return d(),i.stack=g,p(),u==="full"||!c||c!==h?l+=o.move(h+"]"):u==="shortcut"?l=l.slice(0,-1):l+=o.move("]"),l}function yk(){return"!"}Gv.peek=Ck;function Gv(e,t,i){let s=e.value||"",u="`",p=-1;for(;new RegExp("(^|[^`])"+u+"([^`]|$)").test(s);)u+="`";for(/[^ \r\n]/.test(s)&&(/^[ \r\n]/.test(s)&&/[ \r\n]$/.test(s)||/^`|`$/.test(s))&&(s=" "+s+" ");++p<i.unsafe.length;){const d=i.unsafe[p],o=i.compilePattern(d);let l;if(d.atBreak)for(;l=o.exec(s);){let c=l.index;s.charCodeAt(c)===10&&s.charCodeAt(c-1)===13&&c--,s=s.slice(0,c)+" "+s.slice(l.index+1)}}return u+s+u}function Ck(){return"`"}function Kv(e,t){const i=x0(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(i===e.url||"mailto:"+i===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Vv.peek=Tk;function Vv(e,t,i,s){const u=M0(i),p=u==='"'?"Quote":"Apostrophe",d=i.createTracker(s);let o,l;if(Kv(e,i)){const g=i.stack;i.stack=[],o=i.enter("autolink");let h=d.move("<");return h+=d.move(i.containerPhrasing(e,{before:h,after:">",...d.current()})),h+=d.move(">"),o(),i.stack=g,h}o=i.enter("link"),l=i.enter("label");let c=d.move("[");return c+=d.move(i.containerPhrasing(e,{before:c,after:"](",...d.current()})),c+=d.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=i.enter("destinationLiteral"),c+=d.move("<"),c+=d.move(i.safe(e.url,{before:c,after:">",...d.current()})),c+=d.move(">")):(l=i.enter("destinationRaw"),c+=d.move(i.safe(e.url,{before:c,after:e.title?" ":")",...d.current()}))),l(),e.title&&(l=i.enter(`title${p}`),c+=d.move(" "+u),c+=d.move(i.safe(e.title,{before:c,after:u,...d.current()})),c+=d.move(u),l()),c+=d.move(")"),o(),c}function Tk(e,t,i){return Kv(e,i)?"<":"["}Xv.peek=Ak;function Xv(e,t,i,s){const u=e.referenceType,p=i.enter("linkReference");let d=i.enter("label");const o=i.createTracker(s);let l=o.move("[");const c=i.containerPhrasing(e,{before:l,after:"]",...o.current()});l+=o.move(c+"]["),d();const g=i.stack;i.stack=[],d=i.enter("reference");const h=i.safe(i.associationId(e),{before:l,after:"]",...o.current()});return d(),i.stack=g,p(),u==="full"||!c||c!==h?l+=o.move(h+"]"):u==="shortcut"?l=l.slice(0,-1):l+=o.move("]"),l}function Ak(){return"["}function I0(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 xk(e){const t=I0(e),i=e.options.bulletOther;if(!i)return t==="*"?"-":"*";if(i!=="*"&&i!=="+"&&i!=="-")throw new Error("Cannot serialize items with `"+i+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(i===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+i+"`) to be different");return i}function wk(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 Qv(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 Dk(e,t,i,s){const u=i.enter("list"),p=i.bulletCurrent;let d=e.ordered?wk(i):I0(i);const o=e.ordered?d==="."?")":".":xk(i);let l=t&&i.bulletLastUsed?d===i.bulletLastUsed:!1;if(!e.ordered){const g=e.children?e.children[0]:void 0;if((d==="*"||d==="-")&&g&&(!g.children||!g.children[0])&&i.stack[i.stack.length-1]==="list"&&i.stack[i.stack.length-2]==="listItem"&&i.stack[i.stack.length-3]==="list"&&i.stack[i.stack.length-4]==="listItem"&&i.indexStack[i.indexStack.length-1]===0&&i.indexStack[i.indexStack.length-2]===0&&i.indexStack[i.indexStack.length-3]===0&&(l=!0),Qv(i)===d&&g){let h=-1;for(;++h<e.children.length;){const b=e.children[h];if(b&&b.type==="listItem"&&b.children&&b.children[0]&&b.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(d=o),i.bulletCurrent=d;const c=i.containerFlow(e,s);return i.bulletLastUsed=d,i.bulletCurrent=p,u(),c}function Rk(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 kk(e,t,i,s){const u=Rk(i);let p=i.bulletCurrent||I0(i);t&&t.type==="list"&&t.ordered&&(p=(typeof t.start=="number"&&t.start>-1?t.start:1)+(i.options.incrementListMarker===!1?0:t.children.indexOf(e))+p);let d=p.length+1;(u==="tab"||u==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(d=Math.ceil(d/4)*4);const o=i.createTracker(s);o.move(p+" ".repeat(d-p.length)),o.shift(d);const l=i.enter("listItem"),c=i.indentLines(i.containerFlow(e,o.current()),g);return l(),c;function g(h,b,y){return b?(y?"":" ".repeat(d))+h:(y?p:p+" ".repeat(d-p.length))+h}}function Lk(e,t,i,s){const u=i.enter("paragraph"),p=i.enter("phrasing"),d=i.containerPhrasing(e,s);return p(),u(),d}const Ok=yl(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Nk(e,t,i,s){return(e.children.some(function(d){return Ok(d)})?i.containerPhrasing:i.containerFlow).call(i,e,s)}function Mk(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Zv.peek=Ik;function Zv(e,t,i,s){const u=Mk(i),p=i.enter("strong"),d=i.createTracker(s),o=d.move(u+u);let l=d.move(i.containerPhrasing(e,{after:u,before:o,...d.current()}));const c=l.charCodeAt(0),g=bc(s.before.charCodeAt(s.before.length-1),c,u);g.inside&&(l=hl(c)+l.slice(1));const h=l.charCodeAt(l.length-1),b=bc(s.after.charCodeAt(0),h,u);b.inside&&(l=l.slice(0,-1)+hl(h));const y=d.move(u+u);return p(),i.attentionEncodeSurroundingInfo={after:b.outside,before:g.outside},o+l+y}function Ik(e,t,i){return i.options.strong||"*"}function Bk(e,t,i,s){return i.safe(e.value,s)}function Fk(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 Pk(e,t,i){const s=(Qv(i)+(i.options.ruleSpaces?" ":"")).repeat(Fk(i));return i.options.ruleSpaces?s.slice(0,-1):s}const Jv={blockquote:ok,break:rb,code:fk,definition:gk,emphasis:$v,hardBreak:rb,heading:Ek,html:Wv,image:qv,imageReference:Yv,inlineCode:Gv,link:Vv,linkReference:Xv,list:Dk,listItem:kk,paragraph:Lk,root:Nk,strong:Zv,text:Bk,thematicBreak:Pk};function Uk(){return{enter:{table:Hk,tableData:sb,tableHeader:sb,tableRow:jk},exit:{codeText:$k,table:zk,tableData:Tf,tableHeader:Tf,tableRow:Tf}}}function Hk(e){const t=e._align;this.enter({type:"table",align:t.map(function(i){return i==="none"?null:i}),children:[]},e),this.data.inTable=!0}function zk(e){this.exit(e),this.data.inTable=void 0}function jk(e){this.enter({type:"tableRow",children:[]},e)}function Tf(e){this.exit(e)}function sb(e){this.enter({type:"tableCell",children:[]},e)}function $k(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Wk));const i=this.stack[this.stack.length-1];i.type,i.value=t,this.exit(e)}function Wk(e,t){return t==="|"?t:e}function qk(e){const t=e||{},i=t.tableCellPadding,s=t.tablePipeAlign,u=t.stringLength,p=i?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
179
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:b,table:d,tableCell:l,tableRow:o}};function d(y,T,E,m){return c(g(y,E,m),y.align)}function o(y,T,E,m){const _=h(y,E,m),v=c([_]);return v.slice(0,v.indexOf(`
180
- `))}function l(y,T,E,m){const _=E.enter("tableCell"),v=E.enter("phrasing"),S=E.containerPhrasing(y,{...m,before:p,after:p});return v(),_(),S}function c(y,T){return sk(y,{align:T,alignDelimiters:s,padding:i,stringLength:u})}function g(y,T,E){const m=y.children;let _=-1;const v=[],S=T.enter("table");for(;++_<m.length;)v[_]=h(m[_],T,E);return S(),v}function h(y,T,E){const m=y.children;let _=-1;const v=[],S=T.enter("tableRow");for(;++_<m.length;)v[_]=l(m[_],y,T,E);return S(),v}function b(y,T,E){let m=Jv.inlineCode(y,T,E);return E.stack.includes("tableCell")&&(m=m.replace(/\|/g,"\\$&")),m}}function Yk(){return{exit:{taskListCheckValueChecked:ab,taskListCheckValueUnchecked:ab,paragraph:Kk}}}function Gk(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Vk}}}function ab(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Kk(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const i=this.stack[this.stack.length-1];i.type;const s=i.children[0];if(s&&s.type==="text"){const u=t.children;let p=-1,d;for(;++p<u.length;){const o=u[p];if(o.type==="paragraph"){d=o;break}}d===i&&(s.value=s.value.slice(1),s.value.length===0?i.children.shift():i.position&&s.position&&typeof s.position.start.offset=="number"&&(s.position.start.column++,s.position.start.offset++,i.position.start=Object.assign({},s.position.start)))}}this.exit(e)}function Vk(e,t,i,s){const u=e.children[0],p=typeof e.checked=="boolean"&&u&&u.type==="paragraph",d="["+(e.checked?"x":" ")+"] ",o=i.createTracker(s);p&&o.move(d);let l=Jv.listItem(e,t,i,{...s,...o.current()});return p&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(g){return g+d}}function Xk(){return[D6(),V6(),J6(),Uk(),Yk()]}function Qk(e){return{extensions:[R6(),X6(e),ek(),qk(e),Gk()]}}const Zk={tokenize:rL,partial:!0},eS={tokenize:sL,partial:!0},tS={tokenize:aL,partial:!0},nS={tokenize:oL,partial:!0},Jk={tokenize:lL,partial:!0},iS={name:"wwwAutolink",tokenize:nL,previous:sS},rS={name:"protocolAutolink",tokenize:iL,previous:aS},Sr={name:"emailAutolink",tokenize:tL,previous:oS},Qi={};function eL(){return{text:Qi}}let Cs=48;for(;Cs<123;)Qi[Cs]=Sr,Cs++,Cs===58?Cs=65:Cs===91&&(Cs=97);Qi[43]=Sr;Qi[45]=Sr;Qi[46]=Sr;Qi[95]=Sr;Qi[72]=[Sr,rS];Qi[104]=[Sr,rS];Qi[87]=[Sr,iS];Qi[119]=[Sr,iS];function tL(e,t,i){const s=this;let u,p;return d;function d(h){return!Xf(h)||!oS.call(s,s.previous)||B0(s.events)?i(h):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),o(h))}function o(h){return Xf(h)?(e.consume(h),o):h===64?(e.consume(h),l):i(h)}function l(h){return h===46?e.check(Jk,g,c)(h):h===45||h===95||Mn(h)?(p=!0,e.consume(h),l):g(h)}function c(h){return e.consume(h),u=!0,l}function g(h){return p&&u&&Wn(s.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(h)):i(h)}}function nL(e,t,i){const s=this;return u;function u(d){return d!==87&&d!==119||!sS.call(s,s.previous)||B0(s.events)?i(d):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Zk,e.attempt(eS,e.attempt(tS,p),i),i)(d))}function p(d){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(d)}}function iL(e,t,i){const s=this;let u="",p=!1;return d;function d(h){return(h===72||h===104)&&aS.call(s,s.previous)&&!B0(s.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),u+=String.fromCodePoint(h),e.consume(h),o):i(h)}function o(h){if(Wn(h)&&u.length<5)return u+=String.fromCodePoint(h),e.consume(h),o;if(h===58){const b=u.toLowerCase();if(b==="http"||b==="https")return e.consume(h),l}return i(h)}function l(h){return h===47?(e.consume(h),p?c:(p=!0,l)):i(h)}function c(h){return h===null||mc(h)||jt(h)||Rs(h)||Nc(h)?i(h):e.attempt(eS,e.attempt(tS,g),i)(h)}function g(h){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(h)}}function rL(e,t,i){let s=0;return u;function u(d){return(d===87||d===119)&&s<3?(s++,e.consume(d),u):d===46&&s===3?(e.consume(d),p):i(d)}function p(d){return d===null?i(d):t(d)}}function sL(e,t,i){let s,u,p;return d;function d(c){return c===46||c===95?e.check(nS,l,o)(c):c===null||jt(c)||Rs(c)||c!==45&&Nc(c)?l(c):(p=!0,e.consume(c),d)}function o(c){return c===95?s=!0:(u=s,s=void 0),e.consume(c),d}function l(c){return u||s||!p?i(c):t(c)}}function aL(e,t){let i=0,s=0;return u;function u(d){return d===40?(i++,e.consume(d),u):d===41&&s<i?p(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(nS,t,p)(d):d===null||jt(d)||Rs(d)?t(d):(e.consume(d),u)}function p(d){return d===41&&s++,e.consume(d),u}}function oL(e,t,i){return s;function s(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),s):o===38?(e.consume(o),p):o===93?(e.consume(o),u):o===60||o===null||jt(o)||Rs(o)?t(o):i(o)}function u(o){return o===null||o===40||o===91||jt(o)||Rs(o)?t(o):s(o)}function p(o){return Wn(o)?d(o):i(o)}function d(o){return o===59?(e.consume(o),s):Wn(o)?(e.consume(o),d):i(o)}}function lL(e,t,i){return s;function s(p){return e.consume(p),u}function u(p){return Mn(p)?i(p):t(p)}}function sS(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||jt(e)}function aS(e){return!Wn(e)}function oS(e){return!(e===47||Xf(e))}function Xf(e){return e===43||e===45||e===46||e===95||Mn(e)}function B0(e){let t=e.length,i=!1;for(;t--;){const s=e[t][1];if((s.type==="labelLink"||s.type==="labelImage")&&!s._balanced){i=!0;break}if(s._gfmAutolinkLiteralWalkedInto){i=!1;break}}return e.length>0&&!i&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),i}const uL={tokenize:_L,partial:!0};function cL(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:pL,continuation:{tokenize:gL},exit:mL}},text:{91:{name:"gfmFootnoteCall",tokenize:fL},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:hL,resolveTo:dL}}}}function hL(e,t,i){const s=this;let u=s.events.length;const p=s.parser.gfmFootnotes||(s.parser.gfmFootnotes=[]);let d;for(;u--;){const l=s.events[u][1];if(l.type==="labelImage"){d=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return o;function o(l){if(!d||!d._balanced)return i(l);const c=Bi(s.sliceSerialize({start:d.end,end:s.now()}));return c.codePointAt(0)!==94||!p.includes(c.slice(1))?i(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function dL(e,t){let i=e.length;for(;i--;)if(e[i][1].type==="labelImage"&&e[i][0]==="enter"){e[i][1];break}e[i+1][1].type="data",e[i+3][1].type="gfmFootnoteCallLabelMarker";const s={type:"gfmFootnoteCall",start:Object.assign({},e[i+3][1].start),end:Object.assign({},e[e.length-1][1].end)},u={type:"gfmFootnoteCallMarker",start:Object.assign({},e[i+3][1].end),end:Object.assign({},e[i+3][1].end)};u.end.column++,u.end.offset++,u.end._bufferIndex++;const p={type:"gfmFootnoteCallString",start:Object.assign({},u.end),end:Object.assign({},e[e.length-1][1].start)},d={type:"chunkString",contentType:"string",start:Object.assign({},p.start),end:Object.assign({},p.end)},o=[e[i+1],e[i+2],["enter",s,t],e[i+3],e[i+4],["enter",u,t],["exit",u,t],["enter",p,t],["enter",d,t],["exit",d,t],["exit",p,t],e[e.length-2],e[e.length-1],["exit",s,t]];return e.splice(i,e.length-i+1,...o),e}function fL(e,t,i){const s=this,u=s.parser.gfmFootnotes||(s.parser.gfmFootnotes=[]);let p=0,d;return o;function o(h){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),l}function l(h){return h!==94?i(h):(e.enter("gfmFootnoteCallMarker"),e.consume(h),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(h){if(p>999||h===93&&!d||h===null||h===91||jt(h))return i(h);if(h===93){e.exit("chunkString");const b=e.exit("gfmFootnoteCallString");return u.includes(Bi(s.sliceSerialize(b)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):i(h)}return jt(h)||(d=!0),p++,e.consume(h),h===92?g:c}function g(h){return h===91||h===92||h===93?(e.consume(h),p++,c):c(h)}}function pL(e,t,i){const s=this,u=s.parser.gfmFootnotes||(s.parser.gfmFootnotes=[]);let p,d=0,o;return l;function l(T){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(T),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(T){return T===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(T),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",g):i(T)}function g(T){if(d>999||T===93&&!o||T===null||T===91||jt(T))return i(T);if(T===93){e.exit("chunkString");const E=e.exit("gfmFootnoteDefinitionLabelString");return p=Bi(s.sliceSerialize(E)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(T),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),b}return jt(T)||(o=!0),d++,e.consume(T),T===92?h:g}function h(T){return T===91||T===92||T===93?(e.consume(T),d++,g):g(T)}function b(T){return T===58?(e.enter("definitionMarker"),e.consume(T),e.exit("definitionMarker"),u.includes(p)||u.push(p),Ct(e,y,"gfmFootnoteDefinitionWhitespace")):i(T)}function y(T){return t(T)}}function gL(e,t,i){return e.check(Sl,t,e.attempt(uL,t,i))}function mL(e){e.exit("gfmFootnoteDefinition")}function _L(e,t,i){const s=this;return Ct(e,u,"gfmFootnoteDefinitionIndent",5);function u(p){const d=s.events[s.events.length-1];return d&&d[1].type==="gfmFootnoteDefinitionIndent"&&d[2].sliceSerialize(d[1],!0).length===4?t(p):i(p)}}function bL(e){let i=(e||{}).singleTilde;const s={name:"strikethrough",tokenize:p,resolveAll:u};return i==null&&(i=!0),{text:{126:s},insideSpan:{null:[s]},attentionMarkers:{null:[126]}};function u(d,o){let l=-1;for(;++l<d.length;)if(d[l][0]==="enter"&&d[l][1].type==="strikethroughSequenceTemporary"&&d[l][1]._close){let c=l;for(;c--;)if(d[c][0]==="exit"&&d[c][1].type==="strikethroughSequenceTemporary"&&d[c][1]._open&&d[l][1].end.offset-d[l][1].start.offset===d[c][1].end.offset-d[c][1].start.offset){d[l][1].type="strikethroughSequence",d[c][1].type="strikethroughSequence";const g={type:"strikethrough",start:Object.assign({},d[c][1].start),end:Object.assign({},d[l][1].end)},h={type:"strikethroughText",start:Object.assign({},d[c][1].end),end:Object.assign({},d[l][1].start)},b=[["enter",g,o],["enter",d[c][1],o],["exit",d[c][1],o],["enter",h,o]],y=o.parser.constructs.insideSpan.null;y&&mi(b,b.length,0,Mc(y,d.slice(c+1,l),o)),mi(b,b.length,0,[["exit",h,o],["enter",d[l][1],o],["exit",d[l][1],o],["exit",g,o]]),mi(d,c-1,l-c+3,b),l=c+b.length-2;break}}for(l=-1;++l<d.length;)d[l][1].type==="strikethroughSequenceTemporary"&&(d[l][1].type="data");return d}function p(d,o,l){const c=this.previous,g=this.events;let h=0;return b;function b(T){return c===126&&g[g.length-1][1].type!=="characterEscape"?l(T):(d.enter("strikethroughSequenceTemporary"),y(T))}function y(T){const E=Aa(c);if(T===126)return h>1?l(T):(d.consume(T),h++,y);if(h<2&&!i)return l(T);const m=d.exit("strikethroughSequenceTemporary"),_=Aa(T);return m._open=!_||_===2&&!!E,m._close=!E||E===2&&!!_,o(T)}}}class EL{constructor(){this.map=[]}add(t,i,s){vL(this,t,i,s)}consume(t){if(this.map.sort(function(p,d){return p[0]-d[0]}),this.map.length===0)return;let i=this.map.length;const s=[];for(;i>0;)i-=1,s.push(t.slice(this.map[i][0]+this.map[i][1]),this.map[i][2]),t.length=this.map[i][0];s.push(t.slice()),t.length=0;let u=s.pop();for(;u;){for(const p of u)t.push(p);u=s.pop()}this.map.length=0}}function vL(e,t,i,s){let u=0;if(!(i===0&&s.length===0)){for(;u<e.map.length;){if(e.map[u][0]===t){e.map[u][1]+=i,e.map[u][2].push(...s);return}u+=1}e.map.push([t,i,s])}}function SL(e,t){let i=!1;const s=[];for(;t<e.length;){const u=e[t];if(i){if(u[0]==="enter")u[1].type==="tableContent"&&s.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(u[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const p=s.length-1;s[p]=s[p]==="left"?"center":"right"}}else if(u[1].type==="tableDelimiterRow")break}else u[0]==="enter"&&u[1].type==="tableDelimiterRow"&&(i=!0);t+=1}return s}function yL(){return{flow:{null:{name:"table",tokenize:CL,resolveAll:TL}}}}function CL(e,t,i){const s=this;let u=0,p=0,d;return o;function o(L){let F=s.events.length-1;for(;F>-1;){const W=s.events[F][1].type;if(W==="lineEnding"||W==="linePrefix")F--;else break}const I=F>-1?s.events[F][1].type:null,z=I==="tableHead"||I==="tableRow"?A:l;return z===A&&s.parser.lazy[s.now().line]?i(L):z(L)}function l(L){return e.enter("tableHead"),e.enter("tableRow"),c(L)}function c(L){return L===124||(d=!0,p+=1),g(L)}function g(L){return L===null?i(L):Xe(L)?p>1?(p=0,s.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),y):i(L):ft(L)?Ct(e,g,"whitespace")(L):(p+=1,d&&(d=!1,u+=1),L===124?(e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),d=!0,g):(e.enter("data"),h(L)))}function h(L){return L===null||L===124||jt(L)?(e.exit("data"),g(L)):(e.consume(L),L===92?b:h)}function b(L){return L===92||L===124?(e.consume(L),h):h(L)}function y(L){return s.interrupt=!1,s.parser.lazy[s.now().line]?i(L):(e.enter("tableDelimiterRow"),d=!1,ft(L)?Ct(e,T,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):T(L))}function T(L){return L===45||L===58?m(L):L===124?(d=!0,e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),E):k(L)}function E(L){return ft(L)?Ct(e,m,"whitespace")(L):m(L)}function m(L){return L===58?(p+=1,d=!0,e.enter("tableDelimiterMarker"),e.consume(L),e.exit("tableDelimiterMarker"),_):L===45?(p+=1,_(L)):L===null||Xe(L)?x(L):k(L)}function _(L){return L===45?(e.enter("tableDelimiterFiller"),v(L)):k(L)}function v(L){return L===45?(e.consume(L),v):L===58?(d=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(L),e.exit("tableDelimiterMarker"),S):(e.exit("tableDelimiterFiller"),S(L))}function S(L){return ft(L)?Ct(e,x,"whitespace")(L):x(L)}function x(L){return L===124?T(L):L===null||Xe(L)?!d||u!==p?k(L):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(L)):k(L)}function k(L){return i(L)}function A(L){return e.enter("tableRow"),O(L)}function O(L){return L===124?(e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),O):L===null||Xe(L)?(e.exit("tableRow"),t(L)):ft(L)?Ct(e,O,"whitespace")(L):(e.enter("data"),D(L))}function D(L){return L===null||L===124||jt(L)?(e.exit("data"),O(L)):(e.consume(L),L===92?N:D)}function N(L){return L===92||L===124?(e.consume(L),D):D(L)}}function TL(e,t){let i=-1,s=!0,u=0,p=[0,0,0,0],d=[0,0,0,0],o=!1,l=0,c,g,h;const b=new EL;for(;++i<e.length;){const y=e[i],T=y[1];y[0]==="enter"?T.type==="tableHead"?(o=!1,l!==0&&(ob(b,t,l,c,g),g=void 0,l=0),c={type:"table",start:Object.assign({},T.start),end:Object.assign({},T.end)},b.add(i,0,[["enter",c,t]])):T.type==="tableRow"||T.type==="tableDelimiterRow"?(s=!0,h=void 0,p=[0,0,0,0],d=[0,i+1,0,0],o&&(o=!1,g={type:"tableBody",start:Object.assign({},T.start),end:Object.assign({},T.end)},b.add(i,0,[["enter",g,t]])),u=T.type==="tableDelimiterRow"?2:g?3:1):u&&(T.type==="data"||T.type==="tableDelimiterMarker"||T.type==="tableDelimiterFiller")?(s=!1,d[2]===0&&(p[1]!==0&&(d[0]=d[1],h=Qu(b,t,p,u,void 0,h),p=[0,0,0,0]),d[2]=i)):T.type==="tableCellDivider"&&(s?s=!1:(p[1]!==0&&(d[0]=d[1],h=Qu(b,t,p,u,void 0,h)),p=d,d=[p[1],i,0,0])):T.type==="tableHead"?(o=!0,l=i):T.type==="tableRow"||T.type==="tableDelimiterRow"?(l=i,p[1]!==0?(d[0]=d[1],h=Qu(b,t,p,u,i,h)):d[1]!==0&&(h=Qu(b,t,d,u,i,h)),u=0):u&&(T.type==="data"||T.type==="tableDelimiterMarker"||T.type==="tableDelimiterFiller")&&(d[3]=i)}for(l!==0&&ob(b,t,l,c,g),b.consume(t.events),i=-1;++i<t.events.length;){const y=t.events[i];y[0]==="enter"&&y[1].type==="table"&&(y[1]._align=SL(t.events,i))}return e}function Qu(e,t,i,s,u,p){const d=s===1?"tableHeader":s===2?"tableDelimiter":"tableData",o="tableContent";i[0]!==0&&(p.end=Object.assign({},_a(t.events,i[0])),e.add(i[0],0,[["exit",p,t]]));const l=_a(t.events,i[1]);if(p={type:d,start:Object.assign({},l),end:Object.assign({},l)},e.add(i[1],0,[["enter",p,t]]),i[2]!==0){const c=_a(t.events,i[2]),g=_a(t.events,i[3]),h={type:o,start:Object.assign({},c),end:Object.assign({},g)};if(e.add(i[2],0,[["enter",h,t]]),s!==2){const b=t.events[i[2]],y=t.events[i[3]];if(b[1].end=Object.assign({},y[1].end),b[1].type="chunkText",b[1].contentType="text",i[3]>i[2]+1){const T=i[2]+1,E=i[3]-i[2]-1;e.add(T,E,[])}}e.add(i[3]+1,0,[["exit",h,t]])}return u!==void 0&&(p.end=Object.assign({},_a(t.events,u)),e.add(u,0,[["exit",p,t]]),p=void 0),p}function ob(e,t,i,s,u){const p=[],d=_a(t.events,i);u&&(u.end=Object.assign({},d),p.push(["exit",u,t])),s.end=Object.assign({},d),p.push(["exit",s,t]),e.add(i+1,0,p)}function _a(e,t){const i=e[t],s=i[0]==="enter"?"start":"end";return i[1][s]}const AL={name:"tasklistCheck",tokenize:wL};function xL(){return{text:{91:AL}}}function wL(e,t,i){const s=this;return u;function u(l){return s.previous!==null||!s._gfmTasklistFirstContentOfListItem?i(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),p)}function p(l){return jt(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),d):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),d):i(l)}function d(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):i(l)}function o(l){return Xe(l)?t(l):ft(l)?e.check({tokenize:DL},t,i)(l):i(l)}}function DL(e,t,i){return Ct(e,s,"whitespace");function s(u){return u===null?i(u):t(u)}}function RL(e){return _v([eL(),cL(),bL(e),yL(),xL()])}const kL={};function LL(e){const t=this,i=e||kL,s=t.data(),u=s.micromarkExtensions||(s.micromarkExtensions=[]),p=s.fromMarkdownExtensions||(s.fromMarkdownExtensions=[]),d=s.toMarkdownExtensions||(s.toMarkdownExtensions=[]);u.push(RL(i)),p.push(Xk()),d.push(Qk(i))}const lb=(function(e,t,i){const s=yl(i);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]}),Ls=(function(e){if(e==null)return ML;if(typeof e=="string")return NL(e);if(typeof e=="object")return OL(e);if(typeof e=="function")return F0(e);throw new Error("Expected function, string, or array as `test`")});function OL(e){const t=[];let i=-1;for(;++i<e.length;)t[i]=Ls(e[i]);return F0(s);function s(...u){let p=-1;for(;++p<t.length;)if(t[p].apply(this,u))return!0;return!1}}function NL(e){return F0(t);function t(i){return i.tagName===e}}function F0(e){return t;function t(i,s,u){return!!(IL(i)&&e.call(this,i,typeof s=="number"?s:void 0,u||void 0))}}function ML(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function IL(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const ub=/\n/g,cb=/[\t ]+/g,Qf=Ls("br"),hb=Ls($L),BL=Ls("p"),db=Ls("tr"),FL=Ls(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",jL,WL]),lS=Ls(["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 PL(e,t){const i=t||{},s="children"in e?e.children:[],u=lS(e),p=hS(e,{whitespace:i.whitespace||"normal"}),d=[];(e.type==="text"||e.type==="comment")&&d.push(...cS(e,{breakBefore:!0,breakAfter:!0}));let o=-1;for(;++o<s.length;)d.push(...uS(s[o],e,{whitespace:p,breakBefore:o?void 0:u,breakAfter:o<s.length-1?Qf(s[o+1]):u}));const l=[];let c;for(o=-1;++o<d.length;){const g=d[o];typeof g=="number"?c!==void 0&&g>c&&(c=g):g&&(c!==void 0&&c>-1&&l.push(`
181
- `.repeat(c)||" "),c=-1,l.push(g))}return l.join("")}function uS(e,t,i){return e.type==="element"?UL(e,t,i):e.type==="text"?i.whitespace==="normal"?cS(e,i):HL(e):[]}function UL(e,t,i){const s=hS(e,i),u=e.children||[];let p=-1,d=[];if(FL(e))return d;let o,l;for(Qf(e)||db(e)&&lb(t,e,db)?l=`
182
- `:BL(e)?(o=2,l=2):lS(e)&&(o=1,l=1);++p<u.length;)d=d.concat(uS(u[p],e,{whitespace:s,breakBefore:p?void 0:o,breakAfter:p<u.length-1?Qf(u[p+1]):l}));return hb(e)&&lb(t,e,hb)&&d.push(" "),o&&d.unshift(o),l&&d.push(l),d}function cS(e,t){const i=String(e.value),s=[],u=[];let p=0;for(;p<=i.length;){ub.lastIndex=p;const l=ub.exec(i),c=l&&"index"in l?l.index:i.length;s.push(zL(i.slice(p,c).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),p===0?t.breakBefore:!0,c===i.length?t.breakAfter:!0)),p=c+1}let d=-1,o;for(;++d<s.length;)s[d].charCodeAt(s[d].length-1)===8203||d<s.length-1&&s[d+1].charCodeAt(0)===8203?(u.push(s[d]),o=void 0):s[d]?(typeof o=="number"&&u.push(o),u.push(s[d]),o=0):(d===0||d===s.length-1)&&u.push(0);return u}function HL(e){return[String(e.value)]}function zL(e,t,i){const s=[];let u=0,p;for(;u<e.length;){cb.lastIndex=u;const d=cb.exec(e);p=d?d.index:e.length,!u&&!p&&d&&!t&&s.push(""),u!==p&&s.push(e.slice(u,p)),u=d?p+d[0].length:p}return u!==p&&!i&&s.push(""),s.join(" ")}function hS(e,t){if(e.type==="element"){const i=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return i.wrap?"pre-wrap":"pre";case"td":case"th":return i.noWrap?"nowrap":t.whitespace;case"textarea":return"pre-wrap"}}return t.whitespace}function jL(e){return!!(e.properties||{}).hidden}function $L(e){return e.tagName==="td"||e.tagName==="th"}function WL(e){return e.tagName==="dialog"&&!(e.properties||{}).open}function qL(e){const t=e.regex,i=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),s="decltype\\(auto\\)",u="[a-zA-Z_]\\w*::",d="(?!struct)("+s+"|"+t.optional(u)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",o={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},c={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})"/})]},g={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},h={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(c,{className:"string"}),{className:"string",begin:/<.*?>/},i,e.C_BLOCK_COMMENT_MODE]},b={className:"title",begin:t.optional(u)+e.IDENT_RE,relevance:0},y=t.optional(u)+e.IDENT_RE+"\\s*\\(",T=["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"],E=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],m=["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"],_=["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"],x={type:E,keyword:T,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:m},k={className:"function.dispatch",relevance:0,keywords:{_hint:_},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},A=[k,h,o,i,e.C_BLOCK_COMMENT_MODE,g,c],O={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:x,contains:A.concat([{begin:/\(/,end:/\)/,keywords:x,contains:A.concat(["self"]),relevance:0}]),relevance:0},D={className:"function",begin:"("+d+"[\\*&\\s]+)+"+y,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:x,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:s,keywords:x,relevance:0},{begin:y,returnBegin:!0,contains:[b],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[c,g]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:x,relevance:0,contains:[i,e.C_BLOCK_COMMENT_MODE,c,g,o,{begin:/\(/,end:/\)/,keywords:x,relevance:0,contains:["self",i,e.C_BLOCK_COMMENT_MODE,c,g,o]}]},o,i,e.C_BLOCK_COMMENT_MODE,h]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:x,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(O,D,k,A,[h,{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:x,contains:["self",o]},{begin:e.IDENT_RE+"::",keywords:x},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function YL(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"]},i=qL(e),s=i.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,i.name="Arduino",i.aliases=["ino"],i.supersetOf="cpp",i}function GL(e){const t=e.regex,i={},s={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[i]}]};Object.assign(i,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},s]});const u={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},p=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"})]}},o={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,i,u]};u.contains.push(o);const l={match:/\\"/},c={className:"string",begin:/'/,end:/'/},g={match:/\\'/},h={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,i]},b=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],y=e.SHEBANG({binary:`(${b.join("|")})`,relevance:10}),T={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},E=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],m=["true","false"],_={match:/(\/[a-z._-]+)+/},v=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],S=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],x=["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"],k=["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:E,literal:m,built_in:[...v,...S,"set","shopt",...x,...k]},contains:[y,e.SHEBANG(),T,h,p,d,_,o,l,c,g,i]}}function KL(e){const t=e.regex,i=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),s="decltype\\(auto\\)",u="[a-zA-Z_]\\w*::",d="("+s+"|"+t.optional(u)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",o={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},c={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})"/})]},g={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},h={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(c,{className:"string"}),{className:"string",begin:/<.*?>/},i,e.C_BLOCK_COMMENT_MODE]},b={className:"title",begin:t.optional(u)+e.IDENT_RE,relevance:0},y=t.optional(u)+e.IDENT_RE+"\\s*\\(",m={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"},_=[h,o,i,e.C_BLOCK_COMMENT_MODE,g,c],v={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:m,contains:_.concat([{begin:/\(/,end:/\)/,keywords:m,contains:_.concat(["self"]),relevance:0}]),relevance:0},S={begin:"("+d+"[\\*&\\s]+)+"+y,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:m,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:s,keywords:m,relevance:0},{begin:y,returnBegin:!0,contains:[e.inherit(b,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:m,relevance:0,contains:[i,e.C_BLOCK_COMMENT_MODE,c,g,o,{begin:/\(/,end:/\)/,keywords:m,relevance:0,contains:["self",i,e.C_BLOCK_COMMENT_MODE,c,g,o]}]},o,i,e.C_BLOCK_COMMENT_MODE,h]};return{name:"C",aliases:["h"],keywords:m,disableAutodetect:!0,illegal:"</",contains:[].concat(v,S,_,[h,{begin:e.IDENT_RE+"::",keywords:m},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:h,strings:c,keywords:m}}}function VL(e){const t=e.regex,i=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),s="decltype\\(auto\\)",u="[a-zA-Z_]\\w*::",d="(?!struct)("+s+"|"+t.optional(u)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",o={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},c={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})"/})]},g={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},h={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(c,{className:"string"}),{className:"string",begin:/<.*?>/},i,e.C_BLOCK_COMMENT_MODE]},b={className:"title",begin:t.optional(u)+e.IDENT_RE,relevance:0},y=t.optional(u)+e.IDENT_RE+"\\s*\\(",T=["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"],E=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],m=["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"],_=["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"],x={type:E,keyword:T,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:m},k={className:"function.dispatch",relevance:0,keywords:{_hint:_},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},A=[k,h,o,i,e.C_BLOCK_COMMENT_MODE,g,c],O={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:x,contains:A.concat([{begin:/\(/,end:/\)/,keywords:x,contains:A.concat(["self"]),relevance:0}]),relevance:0},D={className:"function",begin:"("+d+"[\\*&\\s]+)+"+y,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:x,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:s,keywords:x,relevance:0},{begin:y,returnBegin:!0,contains:[b],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[c,g]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:x,relevance:0,contains:[i,e.C_BLOCK_COMMENT_MODE,c,g,o,{begin:/\(/,end:/\)/,keywords:x,relevance:0,contains:["self",i,e.C_BLOCK_COMMENT_MODE,c,g,o]}]},o,i,e.C_BLOCK_COMMENT_MODE,h]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:x,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(O,D,k,A,[h,{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:x,contains:["self",o]},{begin:e.IDENT_RE+"::",keywords:x},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function XL(e){const t=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],i=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],s=["default","false","null","true"],u=["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"],p=["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:u.concat(p),built_in:t,literal:s},o=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),l={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},c={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},g={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},h=e.inherit(g,{illegal:/\n/}),b={className:"subst",begin:/\{/,end:/\}/,keywords:d},y=e.inherit(b,{illegal:/\n/}),T={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,y]},E={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},b]},m=e.inherit(E,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},y]});b.contains=[E,T,g,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,l,e.C_BLOCK_COMMENT_MODE],y.contains=[m,T,h,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,l,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const _={variants:[c,E,T,g,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},v={begin:"<",end:">",contains:[{beginKeywords:"in out"},o]},S=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",x={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"}},_,l,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},o,v,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[o,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[o,v,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:"("+S+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:d,contains:[{beginKeywords:i.join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,v],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:d,relevance:0,contains:[_,l,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},x]}}const QL=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_-]*/}}),ZL=["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"],JL=["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"],e4=[...ZL,...JL],t4=["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(),n4=["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(),i4=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),r4=["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 s4(e){const t=e.regex,i=QL(e),s={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},u="and or not only",p=/@-?\w[\w]*(-\w+)*/,d="[a-zA-Z-][a-zA-Z0-9_-]*",o=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[i.BLOCK_COMMENT,s,i.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+d,relevance:0},i.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+n4.join("|")+")"},{begin:":(:)?("+i4.join("|")+")"}]},i.CSS_VARIABLE,{className:"attribute",begin:"\\b("+r4.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[i.BLOCK_COMMENT,i.HEXCOLOR,i.IMPORTANT,i.CSS_NUMBER_MODE,...o,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...o,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},i.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:p},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:u,attribute:t4.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...o,i.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+e4.join("|")+")\\b"}]}}function a4(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 o4(e){const p={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:p,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:p,illegal:/["']/}]}]}}function l4(e){const t=e.regex,i=/[_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(i,t.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}function u4(e){const t=e.regex,i={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:e.NUMBER_RE}]},s=e.COMMENT();s.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const u={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},p={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:"'"}]},o={begin:/\[/,end:/\]/,contains:[s,p,u,d,i,"self"],relevance:0},l=/[A-Za-z0-9_-]+/,c=/"(\\"|[^"])*"/,g=/'[^']*'/,h=t.either(l,c,g),b=t.concat(h,"(\\s*\\.\\s*",h,")*",t.lookahead(/\s*=\s*[^#\s]/));return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[s,{className:"section",begin:/\[+/,end:/\]+/},{begin:b,className:"attr",starts:{end:/$/,contains:[s,o,p,u,d,i]}}]}}var ba="[0-9](_*[0-9])*",Zu=`\\.(${ba})`,Ju="[0-9a-fA-F](_*[0-9a-fA-F])*",fb={className:"number",variants:[{begin:`(\\b(${ba})((${Zu})|\\.)?|(${Zu}))[eE][+-]?(${ba})[fFdD]?\\b`},{begin:`\\b(${ba})((${Zu})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${Zu})[fFdD]?\\b`},{begin:`\\b(${ba})[fFdD]\\b`},{begin:`\\b0[xX]((${Ju})\\.?|(${Ju})?\\.(${Ju}))[pP][+-]?(${ba})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${Ju})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function dS(e,t,i){return i===-1?"":e.replace(t,s=>dS(e,t,i-1))}function c4(e){const t=e.regex,i="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",s=i+dS("(?:<"+i+"~~~(?:\\s*,\\s*"+i+"~~~)*>)?",/~~~/g,2),l={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"]},c={className:"meta",begin:"@"+i,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},g={className:"params",begin:/\(/,end:/\)/,keywords:l,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:l,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+/,i],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,i),/\s+/,i,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,i],className:{1:"keyword",3:"title.class"},contains:[g,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:l,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:l,relevance:0,contains:[c,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,fb,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},fb,c]}}const pb="[A-Za-z$_][0-9A-Za-z$_]*",h4=["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"],d4=["true","false","null","undefined","NaN","Infinity"],fS=["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"],pS=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],gS=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],f4=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],p4=[].concat(gS,fS,pS);function g4(e){const t=e.regex,i=(Q,{after:H})=>{const M="</"+Q[0].slice(1);return Q.input.indexOf(M,H)!==-1},s=pb,u={begin:"<>",end:"</>"},p=/<[A-Za-z0-9\\._:-]+\s*\/>/,d={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(Q,H)=>{const M=Q[0].length+Q.index,U=Q.input[M];if(U==="<"||U===","){H.ignoreMatch();return}U===">"&&(i(Q,{after:M})||H.ignoreMatch());let $;const j=Q.input.substring(M);if($=j.match(/^\s*=/)){H.ignoreMatch();return}if(($=j.match(/^\s+extends\s+/))&&$.index===0){H.ignoreMatch();return}}},o={$pattern:pb,keyword:h4,literal:d4,built_in:p4,"variable.language":f4},l="[0-9](_?[0-9])*",c=`\\.(${l})`,g="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",h={className:"number",variants:[{begin:`(\\b(${g})((${c})|\\.)?|(${c}))[eE][+-]?(${l})\\b`},{begin:`\\b(${g})\\b((${c})\\b|\\.)?|(${c})\\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},b={className:"subst",begin:"\\$\\{",end:"\\}",keywords:o,contains:[]},y={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,b],subLanguage:"xml"}},T={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,b],subLanguage:"css"}},E={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,b],subLanguage:"graphql"}},m={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,b]},v={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]},S=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,y,T,E,m,{match:/\$\d+/},h];b.contains=S.concat({begin:/\{/,end:/\}/,keywords:o,contains:["self"].concat(S)});const x=[].concat(v,b.contains),k=x.concat([{begin:/(\s*)\(/,end:/\)/,keywords:o,contains:["self"].concat(x)}]),A={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:k},O={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"}}]},D={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:{_:[...fS,...pS]}},N={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},L={variants:[{match:[/function/,/\s+/,s,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[A],illegal:/%/},F={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function I(Q){return t.concat("(?!",Q.join("|"),")")}const z={match:t.concat(/\b/,I([...gS,"super","import"].map(Q=>`${Q}\\s*\\(`)),s,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},W={begin:t.concat(/\./,t.lookahead(t.concat(s,/(?![0-9A-Za-z$_(])/))),end:s,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},q={match:[/get|set/,/\s+/,s,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},A]},Y="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",K={match:[/const|var|let/,/\s+/,s,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(Y)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[A]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:o,exports:{PARAMS_CONTAINS:k,CLASS_REFERENCE:D},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),N,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,y,T,E,m,v,{match:/\$\d+/},h,D,{scope:"attr",match:s+t.lookahead(":"),relevance:0},K,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[v,e.REGEXP_MODE,{className:"function",begin:Y,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:o,contains:k}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:u.begin,end:u.end},{match:p},{begin:d.begin,"on:begin":d.isTrulyOpeningTag,end:d.end}],subLanguage:"xml",contains:[{begin:d.begin,end:d.end,skip:!0,contains:["self"]}]}]},L,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[A,e.inherit(e.TITLE_MODE,{begin:s,className:"title.function"})]},{match:/\.\.\./,relevance:0},W,{match:"\\$"+s,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[A]},z,F,O,q,{match:/\$[(.]/}]}}function m4(e){const t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},i={match:/[{}[\],:]/,className:"punctuation",relevance:0},s=["true","false","null"],u={scope:"literal",beginKeywords:s.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:s},contains:[t,i,e.QUOTE_STRING_MODE,u,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}var Ea="[0-9](_*[0-9])*",ec=`\\.(${Ea})`,tc="[0-9a-fA-F](_*[0-9a-fA-F])*",_4={className:"number",variants:[{begin:`(\\b(${Ea})((${ec})|\\.)?|(${ec}))[eE][+-]?(${Ea})[fFdD]?\\b`},{begin:`\\b(${Ea})((${ec})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${ec})[fFdD]?\\b`},{begin:`\\b(${Ea})[fFdD]\\b`},{begin:`\\b0[xX]((${tc})\\.?|(${tc})?\\.(${tc}))[pP][+-]?(${Ea})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${tc})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function b4(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"},i={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},s={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},u={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},p={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},d={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[p,u]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,p,u]}]};u.contains.push(d);const o={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},l={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(d,{className:"string"}),"self"]}]},c=_4,g=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),h={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},b=h;return b.variants[1].contains=[h],h.variants[1].contains=[b],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,g,i,s,o,l,{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:[h,e.C_LINE_COMMENT_MODE,g],relevance:0},e.C_LINE_COMMENT_MODE,g,o,l,d,e.C_NUMBER_MODE]},g]},{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},o,l]},d,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
183
- `},c]}}const E4=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_-]*/}}),v4=["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"],S4=["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"],y4=[...v4,...S4],C4=["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(),mS=["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(),_S=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),T4=["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(),A4=mS.concat(_S).sort().reverse();function x4(e){const t=E4(e),i=A4,s="and or not only",u="[\\w-]+",p="("+u+"|@\\{"+u+"\\})",d=[],o=[],l=function(S){return{className:"string",begin:"~?"+S+".*?"+S}},c=function(S,x,k){return{className:S,begin:x,relevance:k}},g={$pattern:/[a-z-]+/,keyword:s,attribute:C4.join(" ")},h={begin:"\\(",end:"\\)",contains:o,keywords:g,relevance:0};o.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,l("'"),l('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,h,c("variable","@@?"+u,10),c("variable","@\\{"+u+"\\}"),c("built_in","~?`[^`]*?`"),{className:"attribute",begin:u+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);const b=o.concat({begin:/\{/,end:/\}/,contains:d}),y={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(o)},T={begin:p+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+T4.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:o}}]},E={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:g,returnEnd:!0,contains:o,relevance:0}},m={className:"variable",variants:[{begin:"@"+u+"\\s*:",relevance:15},{begin:"@"+u}],starts:{end:"[;}]",returnEnd:!0,contains:b}},_={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:p,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,y,c("keyword","all\\b"),c("variable","@\\{"+u+"\\}"),{begin:"\\b("+y4.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,c("selector-tag",p,0),c("selector-id","#"+p),c("selector-class","\\."+p,0),c("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+mS.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+_S.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:b},{begin:"!important"},t.FUNCTION_DISPATCH]},v={begin:u+`:(:)?(${i.join("|")})`,returnBegin:!0,contains:[_]};return d.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,E,m,v,T,_,y,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:d}}function w4(e){const t="\\[=*\\[",i="\\]=*\\]",s={begin:t,end:i,contains:["self"]},u=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,i,{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:u.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:u}].concat(u)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:i,contains:[s],relevance:5}])}}function D4(e){const t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},i={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,i]},u={begin:"^"+e.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},p={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,i,s,u,p,d]}}function R4(e){const t=e.regex,i={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},s={begin:"^[-\\*]{3,}",end:"$"},u={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}]},p={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}]},o=/[A-Za-z][A-Za-z0-9+.-]*/,l={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,o,/:\/\/.*?\)/),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}]},c={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},g={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},h=e.inherit(c,{contains:[]}),b=e.inherit(g,{contains:[]});c.contains.push(b),g.contains.push(h);let y=[i,l];return[c,g,h,b].forEach(_=>{_.contains=_.contains.concat(y)}),y=y.concat(c,g),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:y},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:y}]}]},i,p,c,g,{className:"quote",begin:"^>\\s+",contains:y,end:"$"},u,s,l,d,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function k4(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+"},i=/[a-zA-Z@][a-zA-Z0-9_]*/,o={"variable.language":["this","super"],$pattern:i,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"]},l={$pattern:i,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:o,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:"("+l.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:l,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function L4(e){const t=e.regex,i=["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}/,u={$pattern:/[\w.]+/,keyword:i.join(" ")},p={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:u},d={begin:/->\{/,end:/\}/},o={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},l={scope:"variable",variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[o]},c={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},g=[e.BACKSLASH_ESCAPE,p,l],h=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],b=(E,m,_="\\1")=>{const v=_==="\\1"?_:t.concat(_,m);return t.concat(t.concat("(?:",E,")"),m,/(?:\\.|[^\\\/])*?/,v,/(?:\\.|[^\\\/])*?/,_,s)},y=(E,m,_)=>t.concat(t.concat("(?:",E,")"),m,/(?:\\.|[^\\\/])*?/,_,s),T=[l,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),d,{className:"string",contains:g,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}]},c,{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:b("s|tr|y",t.either(...h,{capture:!0}))},{begin:b("s|tr|y","\\(","\\)")},{begin:b("s|tr|y","\\[","\\]")},{begin:b("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:y("(?:m|qr)?",/\//,/\//)},{begin:y("m|qr",t.either(...h,{capture:!0}),/\1/)},{begin:y("m|qr",/\(/,/\)/)},{begin:y("m|qr",/\[/,/\]/)},{begin:y("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,o]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,o,c]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return p.contains=T,d.contains=T,{name:"Perl",aliases:["pl","pm"],keywords:u,contains:T}}function O4(e){const t=e.regex,i=/(?![A-Za-z0-9])(?![$])/,s=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,i),u=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,i),p=t.concat(/[A-Z]+/,i),d={scope:"variable",match:"\\$+"+s},o={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},l={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},c=e.inherit(e.APOS_STRING_MODE,{illegal:null}),g=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(l)}),h={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(l),"on:begin":(W,q)=>{q.data._beginMatch=W[1]||W[2]},"on:end":(W,q)=>{q.data._beginMatch!==W[1]&&q.ignoreMatch()}},b=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),y=`[
184
- ]`,T={scope:"string",variants:[g,c,h,b]},E={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},m=["false","null","true"],_=["__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"],v=["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"],x={keyword:_,literal:(W=>{const q=[];return W.forEach(Y=>{q.push(Y),Y.toLowerCase()===Y?q.push(Y.toUpperCase()):q.push(Y.toLowerCase())}),q})(m),built_in:v},k=W=>W.map(q=>q.replace(/\|\d+$/,"")),A={variants:[{match:[/new/,t.concat(y,"+"),t.concat("(?!",k(v).join("\\b|"),"\\b)"),u],scope:{1:"keyword",4:"title.class"}}]},O=t.concat(s,"\\b(?!\\()"),D={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),O],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[u,t.concat(/::/,t.lookahead(/(?!class\b)/)),O],scope:{1:"title.class",3:"variable.constant"}},{match:[u,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[u,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},N={scope:"attr",match:t.concat(s,t.lookahead(":"),t.lookahead(/(?!::)/))},L={relevance:0,begin:/\(/,end:/\)/,keywords:x,contains:[N,d,D,e.C_BLOCK_COMMENT_MODE,T,E,A]},F={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",k(_).join("\\b|"),"|",k(v).join("\\b|"),"\\b)"),s,t.concat(y,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[L]};L.contains.push(F);const I=[N,D,e.C_BLOCK_COMMENT_MODE,T,E,A],z={begin:t.concat(/#\[\s*\\?/,t.either(u,p)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:m,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:m,keyword:["new","array"]},contains:["self",...I]},...I,{scope:"meta",variants:[{match:u},{match:p}]}]};return{case_insensitive:!1,keywords:x,contains:[z,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}]}},o,{scope:"variable.language",match:/\$this\b/},d,F,D,{match:[/const/,/\s/,s],scope:{1:"keyword",3:"variable.constant"}},A,{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:x,contains:["self",z,d,D,e.C_BLOCK_COMMENT_MODE,T,E]}]},{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]},T,E]}}function N4(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 M4(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function I4(e){const t=e.regex,i=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"],o={$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"]},l={className:"meta",begin:/^(>>>|\.\.\.) /},c={className:"subst",begin:/\{/,end:/\}/,keywords:o,illegal:/#/},g={begin:/\{\{/,relevance:0},h={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,l,g,c]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,l,g,c]},{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,g,c]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,g,c]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},b="[0-9](_?[0-9])*",y=`(\\b(${b}))?\\.(${b})|\\b(${b})\\.`,T=`\\b|${s.join("|")}`,E={className:"number",relevance:0,variants:[{begin:`(\\b(${b})|(${y}))[eE][+-]?(${b})[jJ]?(?=${T})`},{begin:`(${y})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${T})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${T})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${T})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${T})`},{begin:`\\b(${b})[jJ](?=${T})`}]},m={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:o,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},_={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:["self",l,E,h,e.HASH_COMMENT_MODE]}]};return c.contains=[h,E,l],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:o,illegal:/(<\/|\?)|=>/,contains:[l,E,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},h,m,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,i],scope:{1:"keyword",3:"title.function"},contains:[_]},{variants:[{match:[/\bclass/,/\s+/,i,/\s*/,/\(\s*/,i,/\s*\)/]},{match:[/\bclass/,/\s+/,i]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[E,_,h]}]}}function B4(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function F4(e){const t=e.regex,i=/(?:(?:[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]?/),u=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,p=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:i,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:i},{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:[u,s]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,s]},{scope:{1:"punctuation",2:"number"},match:[p,s]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,s]}]},{scope:{3:"operator"},match:[i,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:u},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:p},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function P4(e){const t=e.regex,i="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",s=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),u=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"]},o={className:"doctag",begin:"@[A-Za-z]+"},l={begin:"#<",end:">"},c=[e.COMMENT("#","$",{contains:[o]}),e.COMMENT("^=begin","^=end",{contains:[o],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],g={className:"subst",begin:/#\{/,end:/\}/,keywords:d},h={className:"string",contains:[e.BACKSLASH_ESCAPE,g],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,g]})]}]},b="[1-9](_?[0-9])*|0",y="[0-9](_?[0-9])*",T={className:"number",relevance:0,variants:[{begin:`\\b(${b})(\\.(${y}))?([eE][+-]?(${y})|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"}]},E={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:d}]},A=[h,{variants:[{match:[/class\s+/,u,/\s+<\s+/,u]},{match:[/\b(class|module)\s+/,u]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:d},{match:[/(include|extend)\s+/,u],scope:{2:"title.class"},keywords:d},{relevance:0,match:[u,/\.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+/,i],scope:{1:"keyword",3:"title.function"},contains:[E]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[h,{begin:i}],relevance:0},T,{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,g],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(l,c),relevance:0}].concat(l,c);g.contains=A,E.contains=A;const L=[{begin:/^\s*=>/,starts:{end:"$",contains:A}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:d,contains:A}}];return c.unshift(l),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:d,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(L).concat(c).concat(A)}}function U4(e){const t=e.regex,i=/(r#)?/,s=t.concat(i,e.UNDERSCORE_IDENT_RE),u=t.concat(i,e.IDENT_RE),p={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,u,t.lookahead(/\s*\(/))},d="([ui](8|16|32|64|128|size)|f(32|64))?",o=["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"],l=["true","false","Some","None","Ok","Err"],c=["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!"],g=["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:g,keyword:o,literal:l,built_in:c},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:c,type:g}},{className:"punctuation",begin:"->"},p]}}const H4=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_-]*/}}),z4=["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"],j4=["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"],$4=[...z4,...j4],W4=["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(),q4=["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(),Y4=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),G4=["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 K4(e){const t=H4(e),i=Y4,s=q4,u="@[a-z-]+",p="and or not only",o={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("+$4.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+s.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+i.join("|")+")"},o,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+G4.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,o,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:u,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:p,attribute:W4.join(" ")},contains:[{begin:u,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},o,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}}function V4(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function X4(e){const t=e.regex,i=e.COMMENT("--","$"),s={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},u={begin:/"/,end:/"/,contains:[{match:/""/}]},p=["true","false","unknown"],d=["double precision","large object","with timezone","without timezone"],o=["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"],l=["add","asc","collation","desc","final","first","last","view"],c=["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"],g=["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"],h=["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"],b=["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"],y=g,T=[...c,...l].filter(k=>!g.includes(k)),E={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},m={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},_={match:t.concat(/\b/,t.either(...y),/\s*\(/),relevance:0,keywords:{built_in:y}};function v(k){return t.concat(/\b/,t.either(...k.map(A=>A.replace(/\s+/,"\\s+"))),/\b/)}const S={scope:"keyword",match:v(b),relevance:0};function x(k,{exceptions:A,when:O}={}){const D=O;return A=A||[],k.map(N=>N.match(/\|\d+$/)||A.includes(N)?N:D(N)?`${N}|0`:N)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:x(T,{when:k=>k.length<3}),literal:p,type:o,built_in:h},contains:[{scope:"type",match:v(d)},S,_,E,s,u,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,i,m]}}function bS(e){return e?typeof e=="string"?e:e.source:null}function Ho(e){return Ut("(?=",e,")")}function Ut(...e){return e.map(i=>bS(i)).join("")}function Q4(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function $n(...e){return"("+(Q4(e).capture?"":"?:")+e.map(s=>bS(s)).join("|")+")"}const P0=e=>Ut(/\b/,e,/\w$/.test(e)?/\b/:/\B/),Z4=["Protocol","Type"].map(P0),gb=["init","self"].map(P0),J4=["Any","Self"],Af=["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"],mb=["false","nil","true"],eO=["assignment","associativity","higherThan","left","lowerThan","none","right"],tO=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],_b=["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"],ES=$n(/[/=\-+!*%<>&|^~?]/,/[\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]/),vS=$n(ES,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),xf=Ut(ES,vS,"*"),SS=$n(/[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]/),Ec=$n(SS,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),Wi=Ut(SS,Ec,"*"),nc=Ut(/[A-Z]/,Ec,"*"),nO=["attached","autoclosure",Ut(/convention\(/,$n("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",Ut(/objc\(/,Wi,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],iO=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function rO(e){const t={match:/\s+/,relevance:0},i=e.COMMENT("/\\*","\\*/",{contains:["self"]}),s=[e.C_LINE_COMMENT_MODE,i],u={match:[/\./,$n(...Z4,...gb)],className:{2:"keyword"}},p={match:Ut(/\./,$n(...Af)),relevance:0},d=Af.filter(Ue=>typeof Ue=="string").concat(["_|0"]),o=Af.filter(Ue=>typeof Ue!="string").concat(J4).map(P0),l={variants:[{className:"keyword",match:$n(...o,...gb)}]},c={$pattern:$n(/\b\w+/,/#\w+/),keyword:d.concat(tO),literal:mb},g=[u,p,l],h={match:Ut(/\./,$n(..._b)),relevance:0},b={className:"built_in",match:Ut(/\b/,$n(..._b),/(?=\()/)},y=[h,b],T={match:/->/,relevance:0},E={className:"operator",relevance:0,variants:[{match:xf},{match:`\\.(\\.|${vS})+`}]},m=[T,E],_="([0-9]_*)+",v="([0-9a-fA-F]_*)+",S={className:"number",relevance:0,variants:[{match:`\\b(${_})(\\.(${_}))?([eE][+-]?(${_}))?\\b`},{match:`\\b0x(${v})(\\.(${v}))?([pP][+-]?(${_}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},x=(Ue="")=>({className:"subst",variants:[{match:Ut(/\\/,Ue,/[0\\tnr"']/)},{match:Ut(/\\/,Ue,/u\{[0-9a-fA-F]{1,8}\}/)}]}),k=(Ue="")=>({className:"subst",match:Ut(/\\/,Ue,/[\t ]*(?:[\r\n]|\r\n)/)}),A=(Ue="")=>({className:"subst",label:"interpol",begin:Ut(/\\/,Ue,/\(/),end:/\)/}),O=(Ue="")=>({begin:Ut(Ue,/"""/),end:Ut(/"""/,Ue),contains:[x(Ue),k(Ue),A(Ue)]}),D=(Ue="")=>({begin:Ut(Ue,/"/),end:Ut(/"/,Ue),contains:[x(Ue),A(Ue)]}),N={className:"string",variants:[O(),O("#"),O("##"),O("###"),D(),D("#"),D("##"),D("###")]},L=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],F={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:L},I=Ue=>{const Be=Ut(Ue,/\//),$t=Ut(/\//,Ue);return{begin:Be,end:$t,contains:[...L,{scope:"comment",begin:`#(?!.*${$t})`,end:/$/}]}},z={scope:"regexp",variants:[I("###"),I("##"),I("#"),F]},W={match:Ut(/`/,Wi,/`/)},q={className:"variable",match:/\$\d+/},Y={className:"variable",match:`\\$${Ec}+`},K=[W,q,Y],Q={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:iO,contains:[...m,S,N]}]}},H={scope:"keyword",match:Ut(/@/,$n(...nO),Ho($n(/\(/,/\s+/)))},M={scope:"meta",match:Ut(/@/,Wi)},U=[Q,H,M],$={match:Ho(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:Ut(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,Ec,"+")},{className:"type",match:nc,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:Ut(/\s+&\s+/,Ho(nc)),relevance:0}]},j={begin:/</,end:/>/,keywords:c,contains:[...s,...g,...U,T,$]};$.contains.push(j);const re={match:Ut(Wi,/\s*:/),keywords:"_|0",relevance:0},_e={begin:/\(/,end:/\)/,relevance:0,keywords:c,contains:["self",re,...s,z,...g,...y,...m,S,N,...K,...U,$]},ue={begin:/</,end:/>/,keywords:"repeat each",contains:[...s,$]},ee={begin:$n(Ho(Ut(Wi,/\s*:/)),Ho(Ut(Wi,/\s+/,Wi,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:Wi}]},G={begin:/\(/,end:/\)/,keywords:c,contains:[ee,...s,...g,...m,S,N,...U,$,_e],endsParent:!0,illegal:/["']/},le={match:[/(func|macro)/,/\s+/,$n(W.match,Wi,xf)],className:{1:"keyword",3:"title.function"},contains:[ue,G,t],illegal:[/\[/,/%/]},ae={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[ue,G,t],illegal:/\[|%/},xe={match:[/operator/,/\s+/,xf],className:{1:"keyword",3:"title"}},ye={begin:[/precedencegroup/,/\s+/,nc],className:{1:"keyword",3:"title"},contains:[$],keywords:[...eO,...mb],end:/}/},Pe={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},Ne={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},nt={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,Wi,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:c,contains:[ue,...g,{begin:/:/,end:/\{/,keywords:c,contains:[{scope:"title.class.inherited",match:nc},...g],relevance:0}]};for(const Ue of N.variants){const Be=Ue.contains.find(nn=>nn.label==="interpol");Be.keywords=c;const $t=[...g,...y,...m,S,N,...K];Be.contains=[...$t,{begin:/\(/,end:/\)/,contains:["self",...$t]}]}return{name:"Swift",keywords:c,contains:[...s,le,ae,Pe,Ne,nt,xe,ye,{beginKeywords:"import",end:/$/,contains:[...s],relevance:0},z,...g,...y,...m,S,N,...K,...U,$,_e]}}const vc="[A-Za-z$_][0-9A-Za-z$_]*",yS=["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"],CS=["true","false","null","undefined","NaN","Infinity"],TS=["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"],AS=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],xS=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],wS=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],DS=[].concat(xS,TS,AS);function sO(e){const t=e.regex,i=(Q,{after:H})=>{const M="</"+Q[0].slice(1);return Q.input.indexOf(M,H)!==-1},s=vc,u={begin:"<>",end:"</>"},p=/<[A-Za-z0-9\\._:-]+\s*\/>/,d={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(Q,H)=>{const M=Q[0].length+Q.index,U=Q.input[M];if(U==="<"||U===","){H.ignoreMatch();return}U===">"&&(i(Q,{after:M})||H.ignoreMatch());let $;const j=Q.input.substring(M);if($=j.match(/^\s*=/)){H.ignoreMatch();return}if(($=j.match(/^\s+extends\s+/))&&$.index===0){H.ignoreMatch();return}}},o={$pattern:vc,keyword:yS,literal:CS,built_in:DS,"variable.language":wS},l="[0-9](_?[0-9])*",c=`\\.(${l})`,g="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",h={className:"number",variants:[{begin:`(\\b(${g})((${c})|\\.)?|(${c}))[eE][+-]?(${l})\\b`},{begin:`\\b(${g})\\b((${c})\\b|\\.)?|(${c})\\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},b={className:"subst",begin:"\\$\\{",end:"\\}",keywords:o,contains:[]},y={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,b],subLanguage:"xml"}},T={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,b],subLanguage:"css"}},E={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,b],subLanguage:"graphql"}},m={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,b]},v={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]},S=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,y,T,E,m,{match:/\$\d+/},h];b.contains=S.concat({begin:/\{/,end:/\}/,keywords:o,contains:["self"].concat(S)});const x=[].concat(v,b.contains),k=x.concat([{begin:/(\s*)\(/,end:/\)/,keywords:o,contains:["self"].concat(x)}]),A={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:k},O={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"}}]},D={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:{_:[...TS,...AS]}},N={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},L={variants:[{match:[/function/,/\s+/,s,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[A],illegal:/%/},F={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function I(Q){return t.concat("(?!",Q.join("|"),")")}const z={match:t.concat(/\b/,I([...xS,"super","import"].map(Q=>`${Q}\\s*\\(`)),s,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},W={begin:t.concat(/\./,t.lookahead(t.concat(s,/(?![0-9A-Za-z$_(])/))),end:s,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},q={match:[/get|set/,/\s+/,s,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},A]},Y="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",K={match:[/const|var|let/,/\s+/,s,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(Y)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[A]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:o,exports:{PARAMS_CONTAINS:k,CLASS_REFERENCE:D},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),N,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,y,T,E,m,v,{match:/\$\d+/},h,D,{scope:"attr",match:s+t.lookahead(":"),relevance:0},K,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[v,e.REGEXP_MODE,{className:"function",begin:Y,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:o,contains:k}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:u.begin,end:u.end},{match:p},{begin:d.begin,"on:begin":d.isTrulyOpeningTag,end:d.end}],subLanguage:"xml",contains:[{begin:d.begin,end:d.end,skip:!0,contains:["self"]}]}]},L,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[A,e.inherit(e.TITLE_MODE,{begin:s,className:"title.function"})]},{match:/\.\.\./,relevance:0},W,{match:"\\$"+s,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[A]},z,F,O,q,{match:/\$[(.]/}]}}function aO(e){const t=e.regex,i=sO(e),s=vc,u=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],p={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},d={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:u},contains:[i.exports.CLASS_REFERENCE]},o={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},l=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],c={$pattern:vc,keyword:yS.concat(l),literal:CS,built_in:DS.concat(u),"variable.language":wS},g={className:"meta",begin:"@"+s},h=(E,m,_)=>{const v=E.contains.findIndex(S=>S.label===m);if(v===-1)throw new Error("can not find mode to replace");E.contains.splice(v,1,_)};Object.assign(i.keywords,c),i.exports.PARAMS_CONTAINS.push(g);const b=i.contains.find(E=>E.scope==="attr"),y=Object.assign({},b,{match:t.concat(s,t.lookahead(/\s*\?:/))});i.exports.PARAMS_CONTAINS.push([i.exports.CLASS_REFERENCE,b,y]),i.contains=i.contains.concat([g,p,d,y]),h(i,"shebang",e.SHEBANG()),h(i,"use_strict",o);const T=i.contains.find(E=>E.label==="func.def");return T.relevance=0,Object.assign(i,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),i}function oO(e){const t=e.regex,i={className:"string",begin:/"(""|[^/n])"C\b/},s={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},u=/\d{1,2}\/\d{1,2}\/\d{4}/,p=/\d{4}-\d{1,2}-\d{1,2}/,d=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,o=/\d{1,2}(:\d{1,2}){1,2}/,l={className:"literal",variants:[{begin:t.concat(/# */,t.either(p,u),/ *#/)},{begin:t.concat(/# */,o,/ *#/)},{begin:t.concat(/# */,d,/ *#/)},{begin:t.concat(/# */,t.either(p,u),/ +/,t.either(d,o),/ *#/)}]},c={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])|[%&])?/}]},g={className:"label",begin:/^\w+:/},h=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),b=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:[i,s,l,c,g,h,b,{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:[b]}]}}function lO(e){e.regex;const t=e.COMMENT(/\(;/,/;\)/);t.contains.push("self");const i=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"],u={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},p={className:"variable",begin:/\$[\w_]+/},d={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},o={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/},l={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},c={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:[i,t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},p,d,u,e.QUOTE_STRING_MODE,l,c,o]}}function uO(e){const t=e.regex,i=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),s=/[\p{L}0-9._:-]+/u,u={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},p={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},d=e.inherit(p,{begin:/\(/,end:/\)/}),o=e.inherit(e.APOS_STRING_MODE,{className:"string"}),l=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),c={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:[u]},{begin:/'/,end:/'/,contains:[u]},{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:[p,l,o,d,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[p,d,l,o]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},u,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[l]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[c],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[c],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(i,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:i,relevance:0,starts:c}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(i,/>/))),contains:[{className:"name",begin:i,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function cO(e){const t="true false yes no null",i="[\\w#;/?:@&=+$,.~*'()[\\]]+",s={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},u={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},p={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,u]},o=e.inherit(d,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),b={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"},y={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},T={begin:/\{/,end:/\}/,contains:[y],illegal:"\\n",relevance:0},E={begin:"\\[",end:"\\]",contains:[y],illegal:"\\n",relevance:0},m=[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+!"+i},{className:"type",begin:"!<"+i+">"},{className:"type",begin:"!"+i},{className:"type",begin:"!!"+i},{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}},b,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},T,E,p,d],_=[...m];return _.pop(),_.push(o),y.contains=_,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:m}}const hO={arduino:YL,bash:GL,c:KL,cpp:VL,csharp:XL,css:s4,diff:a4,go:o4,graphql:l4,ini:u4,java:c4,javascript:g4,json:m4,kotlin:b4,less:x4,lua:w4,makefile:D4,markdown:R4,objectivec:k4,perl:L4,php:O4,"php-template":N4,plaintext:M4,python:I4,"python-repl":B4,r:F4,ruby:P4,rust:U4,scss:K4,shell:V4,sql:X4,swift:rO,typescript:aO,vbnet:oO,wasm:lO,xml:uO,yaml:cO};var wf,bb;function dO(){if(bb)return wf;bb=1;function e(ne){return ne instanceof Map?ne.clear=ne.delete=ne.set=function(){throw new Error("map is read-only")}:ne instanceof Set&&(ne.add=ne.clear=ne.delete=function(){throw new Error("set is read-only")}),Object.freeze(ne),Object.getOwnPropertyNames(ne).forEach(be=>{const De=ne[be],He=typeof De;(He==="object"||He==="function")&&!Object.isFrozen(De)&&e(De)}),ne}class t{constructor(be){be.data===void 0&&(be.data={}),this.data=be.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function i(ne){return ne.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function s(ne,...be){const De=Object.create(null);for(const He in ne)De[He]=ne[He];return be.forEach(function(He){for(const pt in He)De[pt]=He[pt]}),De}const u="</span>",p=ne=>!!ne.scope,d=(ne,{prefix:be})=>{if(ne.startsWith("language:"))return ne.replace("language:","language-");if(ne.includes(".")){const De=ne.split(".");return[`${be}${De.shift()}`,...De.map((He,pt)=>`${He}${"_".repeat(pt+1)}`)].join(" ")}return`${be}${ne}`};class o{constructor(be,De){this.buffer="",this.classPrefix=De.classPrefix,be.walk(this)}addText(be){this.buffer+=i(be)}openNode(be){if(!p(be))return;const De=d(be.scope,{prefix:this.classPrefix});this.span(De)}closeNode(be){p(be)&&(this.buffer+=u)}value(){return this.buffer}span(be){this.buffer+=`<span class="${be}">`}}const l=(ne={})=>{const be={children:[]};return Object.assign(be,ne),be};class c{constructor(){this.rootNode=l(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(be){this.top.children.push(be)}openNode(be){const De=l({scope:be});this.add(De),this.stack.push(De)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(be){return this.constructor._walk(be,this.rootNode)}static _walk(be,De){return typeof De=="string"?be.addText(De):De.children&&(be.openNode(De),De.children.forEach(He=>this._walk(be,He)),be.closeNode(De)),be}static _collapse(be){typeof be!="string"&&be.children&&(be.children.every(De=>typeof De=="string")?be.children=[be.children.join("")]:be.children.forEach(De=>{c._collapse(De)}))}}class g extends c{constructor(be){super(),this.options=be}addText(be){be!==""&&this.add(be)}startScope(be){this.openNode(be)}endScope(){this.closeNode()}__addSublanguage(be,De){const He=be.root;De&&(He.scope=`language:${De}`),this.add(He)}toHTML(){return new o(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function h(ne){return ne?typeof ne=="string"?ne:ne.source:null}function b(ne){return E("(?=",ne,")")}function y(ne){return E("(?:",ne,")*")}function T(ne){return E("(?:",ne,")?")}function E(...ne){return ne.map(De=>h(De)).join("")}function m(ne){const be=ne[ne.length-1];return typeof be=="object"&&be.constructor===Object?(ne.splice(ne.length-1,1),be):{}}function _(...ne){return"("+(m(ne).capture?"":"?:")+ne.map(He=>h(He)).join("|")+")"}function v(ne){return new RegExp(ne.toString()+"|").exec("").length-1}function S(ne,be){const De=ne&&ne.exec(be);return De&&De.index===0}const x=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function k(ne,{joinWith:be}){let De=0;return ne.map(He=>{De+=1;const pt=De;let yt=h(He),Le="";for(;yt.length>0;){const Oe=x.exec(yt);if(!Oe){Le+=yt;break}Le+=yt.substring(0,Oe.index),yt=yt.substring(Oe.index+Oe[0].length),Oe[0][0]==="\\"&&Oe[1]?Le+="\\"+String(Number(Oe[1])+pt):(Le+=Oe[0],Oe[0]==="("&&De++)}return Le}).map(He=>`(${He})`).join(be)}const A=/\b\B/,O="[a-zA-Z]\\w*",D="[a-zA-Z_]\\w*",N="\\b\\d+(\\.\\d+)?",L="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",F="\\b(0b[01]+)",I="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",z=(ne={})=>{const be=/^#![ ]*\//;return ne.binary&&(ne.begin=E(be,/.*\b/,ne.binary,/\b.*/)),s({scope:"meta",begin:be,end:/$/,relevance:0,"on:begin":(De,He)=>{De.index!==0&&He.ignoreMatch()}},ne)},W={begin:"\\\\[\\s\\S]",relevance:0},q={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[W]},Y={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[W]},K={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/},Q=function(ne,be,De={}){const He=s({scope:"comment",begin:ne,end:be,contains:[]},De);He.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 pt=_("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 He.contains.push({begin:E(/[ ]+/,"(",pt,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),He},H=Q("//","$"),M=Q("/\\*","\\*/"),U=Q("#","$"),$={scope:"number",begin:N,relevance:0},j={scope:"number",begin:L,relevance:0},re={scope:"number",begin:F,relevance:0},_e={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[W,{begin:/\[/,end:/\]/,relevance:0,contains:[W]}]},ue={scope:"title",begin:O,relevance:0},ee={scope:"title",begin:D,relevance:0},G={begin:"\\.\\s*"+D,relevance:0};var ae=Object.freeze({__proto__:null,APOS_STRING_MODE:q,BACKSLASH_ESCAPE:W,BINARY_NUMBER_MODE:re,BINARY_NUMBER_RE:F,COMMENT:Q,C_BLOCK_COMMENT_MODE:M,C_LINE_COMMENT_MODE:H,C_NUMBER_MODE:j,C_NUMBER_RE:L,END_SAME_AS_BEGIN:function(ne){return Object.assign(ne,{"on:begin":(be,De)=>{De.data._beginMatch=be[1]},"on:end":(be,De)=>{De.data._beginMatch!==be[1]&&De.ignoreMatch()}})},HASH_COMMENT_MODE:U,IDENT_RE:O,MATCH_NOTHING_RE:A,METHOD_GUARD:G,NUMBER_MODE:$,NUMBER_RE:N,PHRASAL_WORDS_MODE:K,QUOTE_STRING_MODE:Y,REGEXP_MODE:_e,RE_STARTERS_RE:I,SHEBANG:z,TITLE_MODE:ue,UNDERSCORE_IDENT_RE:D,UNDERSCORE_TITLE_MODE:ee});function xe(ne,be){ne.input[ne.index-1]==="."&&be.ignoreMatch()}function ye(ne,be){ne.className!==void 0&&(ne.scope=ne.className,delete ne.className)}function Pe(ne,be){be&&ne.beginKeywords&&(ne.begin="\\b("+ne.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",ne.__beforeBegin=xe,ne.keywords=ne.keywords||ne.beginKeywords,delete ne.beginKeywords,ne.relevance===void 0&&(ne.relevance=0))}function Ne(ne,be){Array.isArray(ne.illegal)&&(ne.illegal=_(...ne.illegal))}function nt(ne,be){if(ne.match){if(ne.begin||ne.end)throw new Error("begin & end are not supported with match");ne.begin=ne.match,delete ne.match}}function Ue(ne,be){ne.relevance===void 0&&(ne.relevance=1)}const Be=(ne,be)=>{if(!ne.beforeMatch)return;if(ne.starts)throw new Error("beforeMatch cannot be used with starts");const De=Object.assign({},ne);Object.keys(ne).forEach(He=>{delete ne[He]}),ne.keywords=De.keywords,ne.begin=E(De.beforeMatch,b(De.begin)),ne.starts={relevance:0,contains:[Object.assign(De,{endsParent:!0})]},ne.relevance=0,delete De.beforeMatch},$t=["of","and","for","in","not","or","if","then","parent","list","value"],nn="keyword";function Qe(ne,be,De=nn){const He=Object.create(null);return typeof ne=="string"?pt(De,ne.split(" ")):Array.isArray(ne)?pt(De,ne):Object.keys(ne).forEach(function(yt){Object.assign(He,Qe(ne[yt],be,yt))}),He;function pt(yt,Le){be&&(Le=Le.map(Oe=>Oe.toLowerCase())),Le.forEach(function(Oe){const We=Oe.split("|");He[We[0]]=[yt,tt(We[0],We[1])]})}}function tt(ne,be){return be?Number(be):it(ne)?0:1}function it(ne){return $t.includes(ne.toLowerCase())}const Me={},$e=ne=>{console.error(ne)},xt=(ne,...be)=>{console.log(`WARN: ${ne}`,...be)},fe=(ne,be)=>{Me[`${ne}/${be}`]||(console.log(`Deprecated as of ${ne}. ${be}`),Me[`${ne}/${be}`]=!0)},Ce=new Error;function Ie(ne,be,{key:De}){let He=0;const pt=ne[De],yt={},Le={};for(let Oe=1;Oe<=be.length;Oe++)Le[Oe+He]=pt[Oe],yt[Oe+He]=!0,He+=v(be[Oe-1]);ne[De]=Le,ne[De]._emit=yt,ne[De]._multi=!0}function qe(ne){if(Array.isArray(ne.begin)){if(ne.skip||ne.excludeBegin||ne.returnBegin)throw $e("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Ce;if(typeof ne.beginScope!="object"||ne.beginScope===null)throw $e("beginScope must be object"),Ce;Ie(ne,ne.begin,{key:"beginScope"}),ne.begin=k(ne.begin,{joinWith:""})}}function Ye(ne){if(Array.isArray(ne.end)){if(ne.skip||ne.excludeEnd||ne.returnEnd)throw $e("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Ce;if(typeof ne.endScope!="object"||ne.endScope===null)throw $e("endScope must be object"),Ce;Ie(ne,ne.end,{key:"endScope"}),ne.end=k(ne.end,{joinWith:""})}}function Ze(ne){ne.scope&&typeof ne.scope=="object"&&ne.scope!==null&&(ne.beginScope=ne.scope,delete ne.scope)}function Ve(ne){Ze(ne),typeof ne.beginScope=="string"&&(ne.beginScope={_wrap:ne.beginScope}),typeof ne.endScope=="string"&&(ne.endScope={_wrap:ne.endScope}),qe(ne),Ye(ne)}function Yt(ne){function be(Le,Oe){return new RegExp(h(Le),"m"+(ne.case_insensitive?"i":"")+(ne.unicodeRegex?"u":"")+(Oe?"g":""))}class De{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(Oe,We){We.position=this.position++,this.matchIndexes[this.matchAt]=We,this.regexes.push([We,Oe]),this.matchAt+=v(Oe)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const Oe=this.regexes.map(We=>We[1]);this.matcherRe=be(k(Oe,{joinWith:"|"}),!0),this.lastIndex=0}exec(Oe){this.matcherRe.lastIndex=this.lastIndex;const We=this.matcherRe.exec(Oe);if(!We)return null;const wt=We.findIndex((Fn,Pn)=>Pn>0&&Fn!==void 0),kt=this.matchIndexes[wt];return We.splice(0,wt),Object.assign(We,kt)}}class He{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(Oe){if(this.multiRegexes[Oe])return this.multiRegexes[Oe];const We=new De;return this.rules.slice(Oe).forEach(([wt,kt])=>We.addRule(wt,kt)),We.compile(),this.multiRegexes[Oe]=We,We}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(Oe,We){this.rules.push([Oe,We]),We.type==="begin"&&this.count++}exec(Oe){const We=this.getMatcher(this.regexIndex);We.lastIndex=this.lastIndex;let wt=We.exec(Oe);if(this.resumingScanAtSamePosition()&&!(wt&&wt.index===this.lastIndex)){const kt=this.getMatcher(0);kt.lastIndex=this.lastIndex+1,wt=kt.exec(Oe)}return wt&&(this.regexIndex+=wt.position+1,this.regexIndex===this.count&&this.considerAll()),wt}}function pt(Le){const Oe=new He;return Le.contains.forEach(We=>Oe.addRule(We.begin,{rule:We,type:"begin"})),Le.terminatorEnd&&Oe.addRule(Le.terminatorEnd,{type:"end"}),Le.illegal&&Oe.addRule(Le.illegal,{type:"illegal"}),Oe}function yt(Le,Oe){const We=Le;if(Le.isCompiled)return We;[ye,nt,Ve,Be].forEach(kt=>kt(Le,Oe)),ne.compilerExtensions.forEach(kt=>kt(Le,Oe)),Le.__beforeBegin=null,[Pe,Ne,Ue].forEach(kt=>kt(Le,Oe)),Le.isCompiled=!0;let wt=null;return typeof Le.keywords=="object"&&Le.keywords.$pattern&&(Le.keywords=Object.assign({},Le.keywords),wt=Le.keywords.$pattern,delete Le.keywords.$pattern),wt=wt||/\w+/,Le.keywords&&(Le.keywords=Qe(Le.keywords,ne.case_insensitive)),We.keywordPatternRe=be(wt,!0),Oe&&(Le.begin||(Le.begin=/\B|\b/),We.beginRe=be(We.begin),!Le.end&&!Le.endsWithParent&&(Le.end=/\B|\b/),Le.end&&(We.endRe=be(We.end)),We.terminatorEnd=h(We.end)||"",Le.endsWithParent&&Oe.terminatorEnd&&(We.terminatorEnd+=(Le.end?"|":"")+Oe.terminatorEnd)),Le.illegal&&(We.illegalRe=be(Le.illegal)),Le.contains||(Le.contains=[]),Le.contains=[].concat(...Le.contains.map(function(kt){return Gt(kt==="self"?Le:kt)})),Le.contains.forEach(function(kt){yt(kt,We)}),Le.starts&&yt(Le.starts,Oe),We.matcher=pt(We),We}if(ne.compilerExtensions||(ne.compilerExtensions=[]),ne.contains&&ne.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return ne.classNameAliases=s(ne.classNameAliases||{}),yt(ne)}function Lt(ne){return ne?ne.endsWithParent||Lt(ne.starts):!1}function Gt(ne){return ne.variants&&!ne.cachedVariants&&(ne.cachedVariants=ne.variants.map(function(be){return s(ne,{variants:null},be)})),ne.cachedVariants?ne.cachedVariants:Lt(ne)?s(ne,{starts:ne.starts?s(ne.starts):null}):Object.isFrozen(ne)?s(ne):ne}var Et="11.11.1";class Tn extends Error{constructor(be,De){super(be),this.name="HTMLInjectionError",this.html=De}}const un=i,yr=s,si=Symbol("nomatch"),Oi=7,Ht=function(ne){const be=Object.create(null),De=Object.create(null),He=[];let pt=!0;const yt="Could not find the language '{}', did you forget to load/include a language module?",Le={disableAutodetect:!0,name:"Plain text",contains:[]};let Oe={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:g};function We(we){return Oe.noHighlightRe.test(we)}function wt(we){let Ge=we.className+" ";Ge+=we.parentNode?we.parentNode.className:"";const ut=Oe.languageDetectRe.exec(Ge);if(ut){const Ot=Un(ut[1]);return Ot||(xt(yt.replace("{}",ut[1])),xt("Falling back to no-highlight mode for this block.",we)),Ot?ut[1]:"no-highlight"}return Ge.split(/\s+/).find(Ot=>We(Ot)||Un(Ot))}function kt(we,Ge,ut){let Ot="",sn="";typeof Ge=="object"?(Ot=we,ut=Ge.ignoreIllegals,sn=Ge.language):(fe("10.7.0","highlight(lang, code, ...args) has been deprecated."),fe("10.7.0",`Please use highlight(code, options) instead.
185
- https://github.com/highlightjs/highlight.js/issues/2277`),sn=we,Ot=Ge),ut===void 0&&(ut=!0);const On={code:Ot,language:sn};ss("before:highlight",On);const ai=On.result?On.result:Fn(On.language,On.code,ut);return ai.code=On.code,ss("after:highlight",ai),ai}function Fn(we,Ge,ut,Ot){const sn=Object.create(null);function On(ke,ze){return ke.keywords[ze]}function ai(){if(!et.keywords){hn.addText(Nt);return}let ke=0;et.keywordPatternRe.lastIndex=0;let ze=et.keywordPatternRe.exec(Nt),st="";for(;ze;){st+=Nt.substring(ke,ze.index);const gt=An.case_insensitive?ze[0].toLowerCase():ze[0],Zt=On(et,gt);if(Zt){const[bi,$a]=Zt;if(hn.addText(st),st="",sn[gt]=(sn[gt]||0)+1,sn[gt]<=Oi&&(xr+=$a),bi.startsWith("_"))st+=ze[0];else{const Nl=An.classNameAliases[bi]||bi;oi(ze[0],Nl)}}else st+=ze[0];ke=et.keywordPatternRe.lastIndex,ze=et.keywordPatternRe.exec(Nt)}st+=Nt.substring(ke),hn.addText(st)}function Gn(){if(Nt==="")return;let ke=null;if(typeof et.subLanguage=="string"){if(!be[et.subLanguage]){hn.addText(Nt);return}ke=Fn(et.subLanguage,Nt,!0,Ol[et.subLanguage]),Ol[et.subLanguage]=ke._top}else ke=_i(Nt,et.subLanguage.length?et.subLanguage:null);et.relevance>0&&(xr+=ke.relevance),hn.__addSublanguage(ke._emitter,ke.language)}function Wt(){et.subLanguage!=null?Gn():ai(),Nt=""}function oi(ke,ze){ke!==""&&(hn.startScope(ze),hn.addText(ke),hn.endScope())}function kl(ke,ze){let st=1;const gt=ze.length-1;for(;st<=gt;){if(!ke._emit[st]){st++;continue}const Zt=An.classNameAliases[ke[st]]||ke[st],bi=ze[st];Zt?oi(bi,Zt):(Nt=bi,ai(),Nt=""),st++}}function Ms(ke,ze){return ke.scope&&typeof ke.scope=="string"&&hn.openNode(An.classNameAliases[ke.scope]||ke.scope),ke.beginScope&&(ke.beginScope._wrap?(oi(Nt,An.classNameAliases[ke.beginScope._wrap]||ke.beginScope._wrap),Nt=""):ke.beginScope._multi&&(kl(ke.beginScope,ze),Nt="")),et=Object.create(ke,{parent:{value:et}}),et}function Ha(ke,ze,st){let gt=S(ke.endRe,st);if(gt){if(ke["on:end"]){const Zt=new t(ke);ke["on:end"](ze,Zt),Zt.isMatchIgnored&&(gt=!1)}if(gt){for(;ke.endsParent&&ke.parent;)ke=ke.parent;return ke}}if(ke.endsWithParent)return Ha(ke.parent,ze,st)}function Is(ke){return et.matcher.regexIndex===0?(Nt+=ke[0],1):(wr=!0,0)}function zc(ke){const ze=ke[0],st=ke.rule,gt=new t(st),Zt=[st.__beforeBegin,st["on:begin"]];for(const bi of Zt)if(bi&&(bi(ke,gt),gt.isMatchIgnored))return Is(ze);return st.skip?Nt+=ze:(st.excludeBegin&&(Nt+=ze),Wt(),!st.returnBegin&&!st.excludeBegin&&(Nt=ze)),Ms(st,ke),st.returnBegin?0:ze.length}function Kn(ke){const ze=ke[0],st=Ge.substring(ke.index),gt=Ha(et,ke,st);if(!gt)return si;const Zt=et;et.endScope&&et.endScope._wrap?(Wt(),oi(ze,et.endScope._wrap)):et.endScope&&et.endScope._multi?(Wt(),kl(et.endScope,ke)):Zt.skip?Nt+=ze:(Zt.returnEnd||Zt.excludeEnd||(Nt+=ze),Wt(),Zt.excludeEnd&&(Nt=ze));do et.scope&&hn.closeNode(),!et.skip&&!et.subLanguage&&(xr+=et.relevance),et=et.parent;while(et!==gt.parent);return gt.starts&&Ms(gt.starts,ke),Zt.returnEnd?0:ze.length}function za(){const ke=[];for(let ze=et;ze!==An;ze=ze.parent)ze.scope&&ke.unshift(ze.scope);ke.forEach(ze=>hn.openNode(ze))}let as={};function Bs(ke,ze){const st=ze&&ze[0];if(Nt+=ke,st==null)return Wt(),0;if(as.type==="begin"&&ze.type==="end"&&as.index===ze.index&&st===""){if(Nt+=Ge.slice(ze.index,ze.index+1),!pt){const gt=new Error(`0 width match regex (${we})`);throw gt.languageName=we,gt.badRule=as.rule,gt}return 1}if(as=ze,ze.type==="begin")return zc(ze);if(ze.type==="illegal"&&!ut){const gt=new Error('Illegal lexeme "'+st+'" for mode "'+(et.scope||"<unnamed>")+'"');throw gt.mode=et,gt}else if(ze.type==="end"){const gt=Kn(ze);if(gt!==si)return gt}if(ze.type==="illegal"&&st==="")return Nt+=`
186
- `,1;if(ja>1e5&&ja>ze.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Nt+=st,st.length}const An=Un(we);if(!An)throw $e(yt.replace("{}",we)),new Error('Unknown language: "'+we+'"');const Ll=Yt(An);let Fs="",et=Ot||Ll;const Ol={},hn=new Oe.__emitter(Oe);za();let Nt="",xr=0,er=0,ja=0,wr=!1;try{if(An.__emitTokens)An.__emitTokens(Ge,hn);else{for(et.matcher.considerAll();;){ja++,wr?wr=!1:et.matcher.considerAll(),et.matcher.lastIndex=er;const ke=et.matcher.exec(Ge);if(!ke)break;const ze=Ge.substring(er,ke.index),st=Bs(ze,ke);er=ke.index+st}Bs(Ge.substring(er))}return hn.finalize(),Fs=hn.toHTML(),{language:we,value:Fs,relevance:xr,illegal:!1,_emitter:hn,_top:et}}catch(ke){if(ke.message&&ke.message.includes("Illegal"))return{language:we,value:un(Ge),illegal:!0,relevance:0,_illegalBy:{message:ke.message,index:er,context:Ge.slice(er-100,er+100),mode:ke.mode,resultSoFar:Fs},_emitter:hn};if(pt)return{language:we,value:un(Ge),illegal:!1,relevance:0,errorRaised:ke,_emitter:hn,_top:et};throw ke}}function Pn(we){const Ge={value:un(we),illegal:!1,relevance:0,_top:Le,_emitter:new Oe.__emitter(Oe)};return Ge._emitter.addText(we),Ge}function _i(we,Ge){Ge=Ge||Oe.languages||Object.keys(be);const ut=Pn(we),Ot=Ge.filter(Un).filter(Tr).map(Wt=>Fn(Wt,we,!1));Ot.unshift(ut);const sn=Ot.sort((Wt,oi)=>{if(Wt.relevance!==oi.relevance)return oi.relevance-Wt.relevance;if(Wt.language&&oi.language){if(Un(Wt.language).supersetOf===oi.language)return 1;if(Un(oi.language).supersetOf===Wt.language)return-1}return 0}),[On,ai]=sn,Gn=On;return Gn.secondBest=ai,Gn}function Yn(we,Ge,ut){const Ot=Ge&&De[Ge]||ut;we.classList.add("hljs"),we.classList.add(`language-${Ot}`)}function rn(we){let Ge=null;const ut=wt(we);if(We(ut))return;if(ss("before:highlightElement",{el:we,language:ut}),we.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",we);return}if(we.children.length>0&&(Oe.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(we)),Oe.throwUnescapedHTML))throw new Tn("One of your code blocks includes unescaped HTML.",we.innerHTML);Ge=we;const Ot=Ge.textContent,sn=ut?kt(Ot,{language:ut,ignoreIllegals:!0}):_i(Ot);we.innerHTML=sn.value,we.dataset.highlighted="yes",Yn(we,ut,sn.language),we.result={language:sn.language,re:sn.relevance,relevance:sn.relevance},sn.secondBest&&(we.secondBest={language:sn.secondBest.language,relevance:sn.secondBest.relevance}),ss("after:highlightElement",{el:we,result:sn,text:Ot})}function Ln(we){Oe=yr(Oe,we)}const Cr=()=>{Ns(),fe("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function Pa(){Ns(),fe("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let wl=!1;function Ns(){function we(){Ns()}if(document.readyState==="loading"){wl||window.addEventListener("DOMContentLoaded",we,!1),wl=!0;return}document.querySelectorAll(Oe.cssSelector).forEach(rn)}function Dl(we,Ge){let ut=null;try{ut=Ge(ne)}catch(Ot){if($e("Language definition for '{}' could not be registered.".replace("{}",we)),pt)$e(Ot);else throw Ot;ut=Le}ut.name||(ut.name=we),be[we]=ut,ut.rawDefinition=Ge.bind(null,ne),ut.aliases&&Zi(ut.aliases,{languageName:we})}function rs(we){delete be[we];for(const Ge of Object.keys(De))De[Ge]===we&&delete De[Ge]}function Ua(){return Object.keys(be)}function Un(we){return we=(we||"").toLowerCase(),be[we]||be[De[we]]}function Zi(we,{languageName:Ge}){typeof we=="string"&&(we=[we]),we.forEach(ut=>{De[ut.toLowerCase()]=Ge})}function Tr(we){const Ge=Un(we);return Ge&&!Ge.disableAutodetect}function Ar(we){we["before:highlightBlock"]&&!we["before:highlightElement"]&&(we["before:highlightElement"]=Ge=>{we["before:highlightBlock"](Object.assign({block:Ge.el},Ge))}),we["after:highlightBlock"]&&!we["after:highlightElement"]&&(we["after:highlightElement"]=Ge=>{we["after:highlightBlock"](Object.assign({block:Ge.el},Ge))})}function cn(we){Ar(we),He.push(we)}function Rl(we){const Ge=He.indexOf(we);Ge!==-1&&He.splice(Ge,1)}function ss(we,Ge){const ut=we;He.forEach(function(Ot){Ot[ut]&&Ot[ut](Ge)})}function Ji(we){return fe("10.7.0","highlightBlock will be removed entirely in v12.0"),fe("10.7.0","Please use highlightElement now."),rn(we)}Object.assign(ne,{highlight:kt,highlightAuto:_i,highlightAll:Ns,highlightElement:rn,highlightBlock:Ji,configure:Ln,initHighlighting:Cr,initHighlightingOnLoad:Pa,registerLanguage:Dl,unregisterLanguage:rs,listLanguages:Ua,getLanguage:Un,registerAliases:Zi,autoDetection:Tr,inherit:yr,addPlugin:cn,removePlugin:Rl}),ne.debugMode=function(){pt=!1},ne.safeMode=function(){pt=!0},ne.versionString=Et,ne.regex={concat:E,lookahead:b,either:_,optional:T,anyNumberOfTimes:y};for(const we in ae)typeof ae[we]=="object"&&e(ae[we]);return Object.assign(ne,ae),ne},Rt=Ht({});return Rt.newInstance=()=>Ht({}),wf=Rt,Rt.HighlightJS=Rt,Rt.default=Rt,wf}var fO=dO();const pO=Tc(fO),Eb={},gO="hljs-";function mO(e){const t=pO.newInstance();return e&&p(e),{highlight:i,highlightAuto:s,listLanguages:u,register:p,registerAlias:d,registered:o};function i(l,c,g){const h=g||Eb,b=typeof h.prefix=="string"?h.prefix:gO;if(!t.getLanguage(l))throw new Error("Unknown language: `"+l+"` is not registered");t.configure({__emitter:_O,classPrefix:b});const y=t.highlight(c,{ignoreIllegals:!0,language:l});if(y.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:y.errorRaised});const T=y._emitter.root,E=T.data;return E.language=y.language,E.relevance=y.relevance,T}function s(l,c){const h=(c||Eb).subset||u();let b=-1,y=0,T;for(;++b<h.length;){const E=h[b];if(!t.getLanguage(E))continue;const m=i(E,l,c);m.data&&m.data.relevance!==void 0&&m.data.relevance>y&&(y=m.data.relevance,T=m)}return T||{type:"root",children:[],data:{language:void 0,relevance:y}}}function u(){return t.listLanguages()}function p(l,c){if(typeof l=="string")t.registerLanguage(l,c);else{let g;for(g in l)Object.hasOwn(l,g)&&t.registerLanguage(g,l[g])}}function d(l,c){if(typeof l=="string")t.registerAliases(typeof c=="string"?c:[...c],{languageName:l});else{let g;for(g in l)if(Object.hasOwn(l,g)){const h=l[g];t.registerAliases(typeof h=="string"?h:[...h],{languageName:g})}}}function o(l){return!!t.getLanguage(l)}}class _O{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 i=this.stack[this.stack.length-1],s=i.children[i.children.length-1];s&&s.type==="text"?s.value+=t:i.children.push({type:"text",value:t})}startScope(t){this.openNode(String(t))}endScope(){this.closeNode()}__addSublanguage(t,i){const s=this.stack[this.stack.length-1],u=t.root.children;i?s.children.push({type:"element",tagName:"span",properties:{className:[i]},children:u}):s.children.push(...u)}openNode(t){const i=this,s=t.split(".").map(function(d,o){return o?d+"_".repeat(o):i.options.classPrefix+d}),u=this.stack[this.stack.length-1],p={type:"element",tagName:"span",properties:{className:s},children:[]};u.children.push(p),this.stack.push(p)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}}const bO={};function EO(e){const t=e||bO,i=t.aliases,s=t.detect||!1,u=t.languages||hO,p=t.plainText,d=t.prefix,o=t.subset;let l="hljs";const c=mO(u);if(i&&c.registerAlias(i),d){const g=d.indexOf("-");l=g===-1?d:d.slice(0,g)}return function(g,h){Cl(g,"element",function(b,y,T){if(b.tagName!=="code"||!T||T.type!=="element"||T.tagName!=="pre")return;const E=vO(b);if(E===!1||!E&&!s||E&&p&&p.includes(E))return;Array.isArray(b.properties.className)||(b.properties.className=[]),b.properties.className.includes(l)||b.properties.className.unshift(l);const m=PL(b,{whitespace:"pre"});let _;try{_=E?c.highlight(E,m,{prefix:d}):c.highlightAuto(m,{prefix:d,subset:o})}catch(v){const S=v;if(E&&/Unknown language/.test(S.message)){h.message("Cannot highlight as `"+E+"`, it’s not registered",{ancestors:[T,b],cause:S,place:b.position,ruleId:"missing-language",source:"rehype-highlight"});return}throw S}!E&&_.data&&_.data.language&&b.properties.className.push("language-"+_.data.language),_.children.length>0&&(b.children=_.children)})}}function vO(e){const t=e.properties.className;let i=-1;if(!Array.isArray(t))return;let s;for(;++i<t.length;){const u=String(t[i]);if(u==="no-highlight"||u==="nohighlight")return!1;!s&&u.slice(0,5)==="lang-"&&(s=u.slice(5)),!s&&u.slice(0,9)==="language-"&&(s=u.slice(9))}return s}const vb=/[#.]/g;function SO(e,t){const i=e||"",s={};let u=0,p,d;for(;u<i.length;){vb.lastIndex=u;const o=vb.exec(i),l=i.slice(u,o?o.index:i.length);l&&(p?p==="#"?s.id=l:Array.isArray(s.className)?s.className.push(l):s.className=[l]:d=l,u+=l.length),o&&(p=o[0],u++)}return{type:"element",tagName:d||t||"div",properties:s,children:[]}}function RS(e,t,i){const s=i?AO(i):void 0;function u(p,d,...o){let l;if(p==null){l={type:"root",children:[]};const c=d;o.unshift(c)}else{l=SO(p,t);const c=l.tagName.toLowerCase(),g=s?s.get(c):void 0;if(l.tagName=g||c,yO(d))o.unshift(d);else for(const[h,b]of Object.entries(d))CO(e,l.properties,h,b)}for(const c of o)Zf(l.children,c);return l.type==="element"&&l.tagName==="template"&&(l.content={type:"root",children:l.children},l.children=[]),l}return u}function yO(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,i=Object.keys(e);for(const s of i){const u=t[s];if(u&&typeof u=="object"){if(!Array.isArray(u))return!0;const p=u;for(const d of p)if(typeof d!="number"&&typeof d!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function CO(e,t,i,s){const u=Lc(e,i);let p;if(s!=null){if(typeof s=="number"){if(Number.isNaN(s))return;p=s}else typeof s=="boolean"?p=s:typeof s=="string"?u.spaceSeparated?p=S1(s):u.commaSeparated?p=m1(s):u.commaOrSpaceSeparated?p=S1(m1(s).join(" ")):p=Sb(u,u.property,s):Array.isArray(s)?p=[...s]:p=u.property==="style"?TO(s):String(s);if(Array.isArray(p)){const d=[];for(const o of p)d.push(Sb(u,u.property,o));p=d}u.property==="className"&&Array.isArray(t.className)&&(p=t.className.concat(p)),t[u.property]=p}}function Zf(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 i of t)Zf(e,i);else if(typeof t=="object"&&"type"in t)t.type==="root"?Zf(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function Sb(e,t,i){if(typeof i=="string"){if(e.number&&i&&!Number.isNaN(Number(i)))return Number(i);if((e.boolean||e.overloadedBoolean)&&(i===""||ul(i)===ul(t)))return!0}return i}function TO(e){const t=[];for(const[i,s]of Object.entries(e))t.push([i,s].join(": "));return t.join("; ")}function AO(e){const t=new Map;for(const i of e)t.set(i.toLowerCase(),i);return t}const xO=["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"],wO=RS(vl,"div"),DO=RS(ns,"g",xO);function RO(e){const t=String(e),i=[];return{toOffset:u,toPoint:s};function s(p){if(typeof p=="number"&&p>-1&&p<=t.length){let d=0;for(;;){let o=i[d];if(o===void 0){const l=yb(t,i[d-1]);o=l===-1?t.length+1:l+1,i[d]=o}if(o>p)return{line:d+1,column:p-(d>0?i[d-1]:0)+1,offset:p};d++}}}function u(p){if(p&&typeof p.line=="number"&&typeof p.column=="number"&&!Number.isNaN(p.line)&&!Number.isNaN(p.column)){for(;i.length<p.line;){const o=i[i.length-1],l=yb(t,o),c=l===-1?t.length+1:l+1;if(o===c)break;i.push(c)}const d=(p.line>1?i[p.line-2]:0)+p.column-1;if(d<i[p.line-1])return d}}}function yb(e,t){const i=e.indexOf("\r",t),s=e.indexOf(`
187
- `,t);return s===-1?i:i===-1||i+1===s?s:i<s?i:s}const As={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/"},kS={}.hasOwnProperty,kO=Object.prototype;function LO(e,t){const i=t||{};return U0({file:i.file||void 0,location:!1,schema:i.space==="svg"?ns:vl,verbose:i.verbose||!1},e)}function U0(e,t){let i;switch(t.nodeName){case"#comment":{const s=t;return i={type:"comment",value:s.data},uc(e,s,i),i}case"#document":case"#document-fragment":{const s=t,u="mode"in s?s.mode==="quirks"||s.mode==="limited-quirks":!1;if(i={type:"root",children:LS(e,t.childNodes),data:{quirksMode:u}},e.file&&e.location){const p=String(e.file),d=RO(p),o=d.toPoint(0),l=d.toPoint(p.length);i.position={start:o,end:l}}return i}case"#documentType":{const s=t;return i={type:"doctype"},uc(e,s,i),i}case"#text":{const s=t;return i={type:"text",value:s.value},uc(e,s,i),i}default:return i=OO(e,t),i}}function LS(e,t){let i=-1;const s=[];for(;++i<t.length;){const u=U0(e,t[i]);s.push(u)}return s}function OO(e,t){const i=e.schema;e.schema=t.namespaceURI===As.svg?ns:vl;let s=-1;const u={};for(;++s<t.attrs.length;){const o=t.attrs[s],l=(o.prefix?o.prefix+":":"")+o.name;kS.call(kO,l)||(u[l]=o.value)}const d=(e.schema.space==="svg"?DO:wO)(t.tagName,u,LS(e,t.childNodes));if(uc(e,t,d),d.tagName==="template"){const o=t,l=o.sourceCodeLocation,c=l&&l.startTag&&va(l.startTag),g=l&&l.endTag&&va(l.endTag),h=U0(e,o.content);c&&g&&e.file&&(h.position={start:c.end,end:g.start}),d.content=h}return e.schema=i,d}function uc(e,t,i){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const s=NO(e,i,t.sourceCodeLocation);s&&(e.location=!0,i.position=s)}}function NO(e,t,i){const s=va(i);if(t.type==="element"){const u=t.children[t.children.length-1];if(s&&!i.endTag&&u&&u.position&&u.position.end&&(s.end=Object.assign({},u.position.end)),e.verbose){const p={};let d;if(i.attrs)for(d in i.attrs)kS.call(i.attrs,d)&&(p[Lc(e.schema,d).property]=va(i.attrs[d]));i.startTag;const o=va(i.startTag),l=i.endTag?va(i.endTag):void 0,c={opening:o};l&&(c.closing=l),c.properties=p,t.data={position:c}}}return s}function va(e){const t=Cb({line:e.startLine,column:e.startCol,offset:e.startOffset}),i=Cb({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||i?{start:t,end:i}:void 0}function Cb(e){return e.line&&e.column?e:void 0}const MO={},IO={}.hasOwnProperty,OS=jv("type",{handlers:{root:FO,element:jO,text:HO,comment:zO,doctype:UO}});function BO(e,t){const s=(t||MO).space;return OS(e,s==="svg"?ns:vl)}function FO(e,t){const i={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return i.childNodes=H0(e.children,i,t),Ia(e,i),i}function PO(e,t){const i={nodeName:"#document-fragment",childNodes:[]};return i.childNodes=H0(e.children,i,t),Ia(e,i),i}function UO(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Ia(e,t),t}function HO(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Ia(e,t),t}function zO(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Ia(e,t),t}function jO(e,t){const i=t;let s=i;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&i.space==="html"&&(s=ns);const u=[];let p;if(e.properties){for(p in e.properties)if(p!=="children"&&IO.call(e.properties,p)){const l=$O(s,p,e.properties[p]);l&&u.push(l)}}const d=s.space,o={nodeName:e.tagName,tagName:e.tagName,attrs:u,namespaceURI:As[d],childNodes:[],parentNode:null};return o.childNodes=H0(e.children,o,s),Ia(e,o),e.tagName==="template"&&e.content&&(o.content=PO(e.content,s)),o}function $O(e,t,i){const s=Lc(e,t);if(i===!1||i===null||i===void 0||typeof i=="number"&&Number.isNaN(i)||!i&&s.boolean)return;Array.isArray(i)&&(i=s.commaSeparated?nv(i):cv(i));const u={name:s.attribute,value:i===!0?"":String(i)};if(s.space&&s.space!=="html"&&s.space!=="svg"){const p=u.name.indexOf(":");p<0?u.prefix="":(u.name=u.name.slice(p+1),u.prefix=s.attribute.slice(0,p)),u.namespace=As[s.space]}return u}function H0(e,t,i){let s=-1;const u=[];if(e)for(;++s<e.length;){const p=OS(e[s],i);p.parentNode=t,u.push(p)}return u}function Ia(e,t){const i=e.position;i&&i.start&&i.end&&(i.start.offset,i.end.offset,t.sourceCodeLocation={startLine:i.start.line,startCol:i.start.column,startOffset:i.start.offset,endLine:i.end.line,endCol:i.end.column,endOffset:i.end.offset})}const WO=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],qO=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]),Qt="�";var Z;(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"})(Z||(Z={}));const ti={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function NS(e){return e>=55296&&e<=57343}function YO(e){return e>=56320&&e<=57343}function GO(e,t){return(e-55296)*1024+9216+t}function MS(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function IS(e){return e>=64976&&e<=65007||qO.has(e)}var me;(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"})(me||(me={}));const KO=65536;class VO{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=KO,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,i){const{line:s,col:u,offset:p}=this,d=u+i,o=p+i;return{code:t,startLine:s,endLine:s,startCol:d,endCol:d,startOffset:o,endOffset:o}}_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 i=this.html.charCodeAt(this.pos+1);if(YO(i))return this.pos++,this._addGap(),GO(t,i)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,Z.EOF;return this._err(me.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,i){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=i}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,i){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(i)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 i=this.pos+t;if(i>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,Z.EOF;const s=this.html.charCodeAt(i);return s===Z.CARRIAGE_RETURN?Z.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,Z.EOF;let t=this.html.charCodeAt(this.pos);return t===Z.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,Z.LINE_FEED):t===Z.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,NS(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===Z.LINE_FEED||t===Z.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){MS(t)?this._err(me.controlCharacterInInputStream):IS(t)&&this._err(me.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var ct;(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"})(ct||(ct={}));function BS(e,t){for(let i=e.attrs.length-1;i>=0;i--)if(e.attrs[i].name===t)return e.attrs[i].value;return null}const XO=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୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢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;怳Ādp໩໮uct;戏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ǣጓ\0጖y;䐎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Ā;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀ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Ā;e᜚᜜lƀ;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\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩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ↄⅪ←ٖ↛ǰ↉\0↎proø₞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;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\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\0⹻m;櫳;櫽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))),QO=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 ZO(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=QO.get(e))!==null&&t!==void 0?t:e}var Cn;(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"})(Cn||(Cn={}));const JO=32;var ts;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(ts||(ts={}));function Jf(e){return e>=Cn.ZERO&&e<=Cn.NINE}function eN(e){return e>=Cn.UPPER_A&&e<=Cn.UPPER_F||e>=Cn.LOWER_A&&e<=Cn.LOWER_F}function tN(e){return e>=Cn.UPPER_A&&e<=Cn.UPPER_Z||e>=Cn.LOWER_A&&e<=Cn.LOWER_Z||Jf(e)}function nN(e){return e===Cn.EQUALS||tN(e)}var vn;(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"})(vn||(vn={}));var _r;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(_r||(_r={}));class iN{constructor(t,i,s){this.decodeTree=t,this.emitCodePoint=i,this.errors=s,this.state=vn.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=_r.Strict}startEntity(t){this.decodeMode=t,this.state=vn.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,i){switch(this.state){case vn.EntityStart:return t.charCodeAt(i)===Cn.NUM?(this.state=vn.NumericStart,this.consumed+=1,this.stateNumericStart(t,i+1)):(this.state=vn.NamedEntity,this.stateNamedEntity(t,i));case vn.NumericStart:return this.stateNumericStart(t,i);case vn.NumericDecimal:return this.stateNumericDecimal(t,i);case vn.NumericHex:return this.stateNumericHex(t,i);case vn.NamedEntity:return this.stateNamedEntity(t,i)}}stateNumericStart(t,i){return i>=t.length?-1:(t.charCodeAt(i)|JO)===Cn.LOWER_X?(this.state=vn.NumericHex,this.consumed+=1,this.stateNumericHex(t,i+1)):(this.state=vn.NumericDecimal,this.stateNumericDecimal(t,i))}addToNumericResult(t,i,s,u){if(i!==s){const p=s-i;this.result=this.result*Math.pow(u,p)+Number.parseInt(t.substr(i,p),u),this.consumed+=p}}stateNumericHex(t,i){const s=i;for(;i<t.length;){const u=t.charCodeAt(i);if(Jf(u)||eN(u))i+=1;else return this.addToNumericResult(t,s,i,16),this.emitNumericEntity(u,3)}return this.addToNumericResult(t,s,i,16),-1}stateNumericDecimal(t,i){const s=i;for(;i<t.length;){const u=t.charCodeAt(i);if(Jf(u))i+=1;else return this.addToNumericResult(t,s,i,10),this.emitNumericEntity(u,2)}return this.addToNumericResult(t,s,i,10),-1}emitNumericEntity(t,i){var s;if(this.consumed<=i)return(s=this.errors)===null||s===void 0||s.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Cn.SEMI)this.consumed+=1;else if(this.decodeMode===_r.Strict)return 0;return this.emitCodePoint(ZO(this.result),this.consumed),this.errors&&(t!==Cn.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,i){const{decodeTree:s}=this;let u=s[this.treeIndex],p=(u&ts.VALUE_LENGTH)>>14;for(;i<t.length;i++,this.excess++){const d=t.charCodeAt(i);if(this.treeIndex=rN(s,u,this.treeIndex+Math.max(1,p),d),this.treeIndex<0)return this.result===0||this.decodeMode===_r.Attribute&&(p===0||nN(d))?0:this.emitNotTerminatedNamedEntity();if(u=s[this.treeIndex],p=(u&ts.VALUE_LENGTH)>>14,p!==0){if(d===Cn.SEMI)return this.emitNamedEntityData(this.treeIndex,p,this.consumed+this.excess);this.decodeMode!==_r.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:i,decodeTree:s}=this,u=(s[i]&ts.VALUE_LENGTH)>>14;return this.emitNamedEntityData(i,u,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,i,s){const{decodeTree:u}=this;return this.emitCodePoint(i===1?u[t]&~ts.VALUE_LENGTH:u[t+1],s),i===3&&this.emitCodePoint(u[t+2],s),s}end(){var t;switch(this.state){case vn.NamedEntity:return this.result!==0&&(this.decodeMode!==_r.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case vn.NumericDecimal:return this.emitNumericEntity(0,2);case vn.NumericHex:return this.emitNumericEntity(0,3);case vn.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case vn.EntityStart:return 0}}}function rN(e,t,i,s){const u=(t&ts.BRANCH_LENGTH)>>7,p=t&ts.JUMP_TABLE;if(u===0)return p!==0&&s===p?i:-1;if(p){const l=s-p;return l<0||l>=u?-1:e[i+l]-1}let d=i,o=d+u-1;for(;d<=o;){const l=d+o>>>1,c=e[l];if(c<s)d=l+1;else if(c>s)o=l-1;else return e[l+u]}return-1}var Te;(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/"})(Te||(Te={}));var xs;(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"})(xs||(xs={}));var ki;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(ki||(ki={}));var ce;(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"})(ce||(ce={}));var R;(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"})(R||(R={}));const sN=new Map([[ce.A,R.A],[ce.ADDRESS,R.ADDRESS],[ce.ANNOTATION_XML,R.ANNOTATION_XML],[ce.APPLET,R.APPLET],[ce.AREA,R.AREA],[ce.ARTICLE,R.ARTICLE],[ce.ASIDE,R.ASIDE],[ce.B,R.B],[ce.BASE,R.BASE],[ce.BASEFONT,R.BASEFONT],[ce.BGSOUND,R.BGSOUND],[ce.BIG,R.BIG],[ce.BLOCKQUOTE,R.BLOCKQUOTE],[ce.BODY,R.BODY],[ce.BR,R.BR],[ce.BUTTON,R.BUTTON],[ce.CAPTION,R.CAPTION],[ce.CENTER,R.CENTER],[ce.CODE,R.CODE],[ce.COL,R.COL],[ce.COLGROUP,R.COLGROUP],[ce.DD,R.DD],[ce.DESC,R.DESC],[ce.DETAILS,R.DETAILS],[ce.DIALOG,R.DIALOG],[ce.DIR,R.DIR],[ce.DIV,R.DIV],[ce.DL,R.DL],[ce.DT,R.DT],[ce.EM,R.EM],[ce.EMBED,R.EMBED],[ce.FIELDSET,R.FIELDSET],[ce.FIGCAPTION,R.FIGCAPTION],[ce.FIGURE,R.FIGURE],[ce.FONT,R.FONT],[ce.FOOTER,R.FOOTER],[ce.FOREIGN_OBJECT,R.FOREIGN_OBJECT],[ce.FORM,R.FORM],[ce.FRAME,R.FRAME],[ce.FRAMESET,R.FRAMESET],[ce.H1,R.H1],[ce.H2,R.H2],[ce.H3,R.H3],[ce.H4,R.H4],[ce.H5,R.H5],[ce.H6,R.H6],[ce.HEAD,R.HEAD],[ce.HEADER,R.HEADER],[ce.HGROUP,R.HGROUP],[ce.HR,R.HR],[ce.HTML,R.HTML],[ce.I,R.I],[ce.IMG,R.IMG],[ce.IMAGE,R.IMAGE],[ce.INPUT,R.INPUT],[ce.IFRAME,R.IFRAME],[ce.KEYGEN,R.KEYGEN],[ce.LABEL,R.LABEL],[ce.LI,R.LI],[ce.LINK,R.LINK],[ce.LISTING,R.LISTING],[ce.MAIN,R.MAIN],[ce.MALIGNMARK,R.MALIGNMARK],[ce.MARQUEE,R.MARQUEE],[ce.MATH,R.MATH],[ce.MENU,R.MENU],[ce.META,R.META],[ce.MGLYPH,R.MGLYPH],[ce.MI,R.MI],[ce.MO,R.MO],[ce.MN,R.MN],[ce.MS,R.MS],[ce.MTEXT,R.MTEXT],[ce.NAV,R.NAV],[ce.NOBR,R.NOBR],[ce.NOFRAMES,R.NOFRAMES],[ce.NOEMBED,R.NOEMBED],[ce.NOSCRIPT,R.NOSCRIPT],[ce.OBJECT,R.OBJECT],[ce.OL,R.OL],[ce.OPTGROUP,R.OPTGROUP],[ce.OPTION,R.OPTION],[ce.P,R.P],[ce.PARAM,R.PARAM],[ce.PLAINTEXT,R.PLAINTEXT],[ce.PRE,R.PRE],[ce.RB,R.RB],[ce.RP,R.RP],[ce.RT,R.RT],[ce.RTC,R.RTC],[ce.RUBY,R.RUBY],[ce.S,R.S],[ce.SCRIPT,R.SCRIPT],[ce.SEARCH,R.SEARCH],[ce.SECTION,R.SECTION],[ce.SELECT,R.SELECT],[ce.SOURCE,R.SOURCE],[ce.SMALL,R.SMALL],[ce.SPAN,R.SPAN],[ce.STRIKE,R.STRIKE],[ce.STRONG,R.STRONG],[ce.STYLE,R.STYLE],[ce.SUB,R.SUB],[ce.SUMMARY,R.SUMMARY],[ce.SUP,R.SUP],[ce.TABLE,R.TABLE],[ce.TBODY,R.TBODY],[ce.TEMPLATE,R.TEMPLATE],[ce.TEXTAREA,R.TEXTAREA],[ce.TFOOT,R.TFOOT],[ce.TD,R.TD],[ce.TH,R.TH],[ce.THEAD,R.THEAD],[ce.TITLE,R.TITLE],[ce.TR,R.TR],[ce.TRACK,R.TRACK],[ce.TT,R.TT],[ce.U,R.U],[ce.UL,R.UL],[ce.SVG,R.SVG],[ce.VAR,R.VAR],[ce.WBR,R.WBR],[ce.XMP,R.XMP]]);function Ba(e){var t;return(t=sN.get(e))!==null&&t!==void 0?t:R.UNKNOWN}const Ae=R,aN={[Te.HTML]:new Set([Ae.ADDRESS,Ae.APPLET,Ae.AREA,Ae.ARTICLE,Ae.ASIDE,Ae.BASE,Ae.BASEFONT,Ae.BGSOUND,Ae.BLOCKQUOTE,Ae.BODY,Ae.BR,Ae.BUTTON,Ae.CAPTION,Ae.CENTER,Ae.COL,Ae.COLGROUP,Ae.DD,Ae.DETAILS,Ae.DIR,Ae.DIV,Ae.DL,Ae.DT,Ae.EMBED,Ae.FIELDSET,Ae.FIGCAPTION,Ae.FIGURE,Ae.FOOTER,Ae.FORM,Ae.FRAME,Ae.FRAMESET,Ae.H1,Ae.H2,Ae.H3,Ae.H4,Ae.H5,Ae.H6,Ae.HEAD,Ae.HEADER,Ae.HGROUP,Ae.HR,Ae.HTML,Ae.IFRAME,Ae.IMG,Ae.INPUT,Ae.LI,Ae.LINK,Ae.LISTING,Ae.MAIN,Ae.MARQUEE,Ae.MENU,Ae.META,Ae.NAV,Ae.NOEMBED,Ae.NOFRAMES,Ae.NOSCRIPT,Ae.OBJECT,Ae.OL,Ae.P,Ae.PARAM,Ae.PLAINTEXT,Ae.PRE,Ae.SCRIPT,Ae.SECTION,Ae.SELECT,Ae.SOURCE,Ae.STYLE,Ae.SUMMARY,Ae.TABLE,Ae.TBODY,Ae.TD,Ae.TEMPLATE,Ae.TEXTAREA,Ae.TFOOT,Ae.TH,Ae.THEAD,Ae.TITLE,Ae.TR,Ae.TRACK,Ae.UL,Ae.WBR,Ae.XMP]),[Te.MATHML]:new Set([Ae.MI,Ae.MO,Ae.MN,Ae.MS,Ae.MTEXT,Ae.ANNOTATION_XML]),[Te.SVG]:new Set([Ae.TITLE,Ae.FOREIGN_OBJECT,Ae.DESC]),[Te.XLINK]:new Set,[Te.XML]:new Set,[Te.XMLNS]:new Set},e0=new Set([Ae.H1,Ae.H2,Ae.H3,Ae.H4,Ae.H5,Ae.H6]);ce.STYLE,ce.SCRIPT,ce.XMP,ce.IFRAME,ce.NOEMBED,ce.NOFRAMES,ce.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 ln={DATA:J.DATA,RCDATA:J.RCDATA,RAWTEXT:J.RAWTEXT,SCRIPT_DATA:J.SCRIPT_DATA,PLAINTEXT:J.PLAINTEXT,CDATA_SECTION:J.CDATA_SECTION};function oN(e){return e>=Z.DIGIT_0&&e<=Z.DIGIT_9}function qo(e){return e>=Z.LATIN_CAPITAL_A&&e<=Z.LATIN_CAPITAL_Z}function lN(e){return e>=Z.LATIN_SMALL_A&&e<=Z.LATIN_SMALL_Z}function Zr(e){return lN(e)||qo(e)}function Tb(e){return Zr(e)||oN(e)}function ic(e){return e+32}function FS(e){return e===Z.SPACE||e===Z.LINE_FEED||e===Z.TABULATION||e===Z.FORM_FEED}function Ab(e){return FS(e)||e===Z.SOLIDUS||e===Z.GREATER_THAN_SIGN}function uN(e){return e===Z.NULL?me.nullCharacterReference:e>1114111?me.characterReferenceOutsideUnicodeRange:NS(e)?me.surrogateCharacterReference:IS(e)?me.noncharacterCharacterReference:MS(e)||e===Z.CARRIAGE_RETURN?me.controlCharacterReference:null}class cN{constructor(t,i){this.options=t,this.handler=i,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 VO(i),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new iN(XO,(s,u)=>{this.preprocessor.pos=this.entityStartPos+u-1,this._flushCodePointConsumedAsCharacterReference(s)},i.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(me.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:s=>{this._err(me.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+s)},validateNumericCharacterReference:s=>{const u=uN(s);u&&this._err(u,1)}}:void 0)}_err(t,i=0){var s,u;(u=(s=this.handler).onParseError)===null||u===void 0||u.call(s,this.preprocessor.getError(t,i))}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,i,s){this.active=!0,this.preprocessor.write(t,i),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 i=0;i<t;i++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,i){return this.preprocessor.startsWith(t,i)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:ct.START_TAG,tagName:"",tagID:R.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:ct.END_TAG,tagName:"",tagID:R.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:ct.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:ct.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,i){this.currentCharacterToken={type:t,chars:i,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,i;const s=this.currentToken;if(BS(s,this.currentAttr.name)===null){if(s.attrs.push(this.currentAttr),s.location&&this.currentLocation){const u=(t=(i=s.location).attrs)!==null&&t!==void 0?t:i.attrs=Object.create(null);u[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(me.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=Ba(t.tagName),t.type===ct.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(me.endTagWithAttributes),t.selfClosing&&this._err(me.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 ct.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case ct.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case ct.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:ct.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,i){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=i;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,i)}_emitCodePoint(t){const i=FS(t)?ct.WHITESPACE_CHARACTER:t===Z.NULL?ct.NULL_CHARACTER:ct.CHARACTER;this._appendCharToCurrentCharacterToken(i,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(ct.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=J.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?_r.Attribute:_r.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 Z.LESS_THAN_SIGN:{this.state=J.TAG_OPEN;break}case Z.AMPERSAND:{this._startCharacterReference();break}case Z.NULL:{this._err(me.unexpectedNullCharacter),this._emitCodePoint(t);break}case Z.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case Z.AMPERSAND:{this._startCharacterReference();break}case Z.LESS_THAN_SIGN:{this.state=J.RCDATA_LESS_THAN_SIGN;break}case Z.NULL:{this._err(me.unexpectedNullCharacter),this._emitChars(Qt);break}case Z.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case Z.LESS_THAN_SIGN:{this.state=J.RAWTEXT_LESS_THAN_SIGN;break}case Z.NULL:{this._err(me.unexpectedNullCharacter),this._emitChars(Qt);break}case Z.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case Z.LESS_THAN_SIGN:{this.state=J.SCRIPT_DATA_LESS_THAN_SIGN;break}case Z.NULL:{this._err(me.unexpectedNullCharacter),this._emitChars(Qt);break}case Z.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case Z.NULL:{this._err(me.unexpectedNullCharacter),this._emitChars(Qt);break}case Z.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Zr(t))this._createStartTagToken(),this.state=J.TAG_NAME,this._stateTagName(t);else switch(t){case Z.EXCLAMATION_MARK:{this.state=J.MARKUP_DECLARATION_OPEN;break}case Z.SOLIDUS:{this.state=J.END_TAG_OPEN;break}case Z.QUESTION_MARK:{this._err(me.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=J.BOGUS_COMMENT,this._stateBogusComment(t);break}case Z.EOF:{this._err(me.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(me.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=J.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Zr(t))this._createEndTagToken(),this.state=J.TAG_NAME,this._stateTagName(t);else switch(t){case Z.GREATER_THAN_SIGN:{this._err(me.missingEndTagName),this.state=J.DATA;break}case Z.EOF:{this._err(me.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(me.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=J.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const i=this.currentToken;switch(t){case Z.SPACE:case Z.LINE_FEED:case Z.TABULATION:case Z.FORM_FEED:{this.state=J.BEFORE_ATTRIBUTE_NAME;break}case Z.SOLIDUS:{this.state=J.SELF_CLOSING_START_TAG;break}case Z.GREATER_THAN_SIGN:{this.state=J.DATA,this.emitCurrentTagToken();break}case Z.NULL:{this._err(me.unexpectedNullCharacter),i.tagName+=Qt;break}case Z.EOF:{this._err(me.eofInTag),this._emitEOFToken();break}default:i.tagName+=String.fromCodePoint(qo(t)?ic(t):t)}}_stateRcdataLessThanSign(t){t===Z.SOLIDUS?this.state=J.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=J.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Zr(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 i=this.currentToken;switch(i.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case Z.SPACE:case Z.LINE_FEED:case Z.TABULATION:case Z.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=J.BEFORE_ATTRIBUTE_NAME,!1;case Z.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=J.SELF_CLOSING_START_TAG,!1;case Z.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===Z.SOLIDUS?this.state=J.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=J.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Zr(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 Z.SOLIDUS:{this.state=J.SCRIPT_DATA_END_TAG_OPEN;break}case Z.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){Zr(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===Z.HYPHEN_MINUS?(this.state=J.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=J.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===Z.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 Z.HYPHEN_MINUS:{this.state=J.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case Z.LESS_THAN_SIGN:{this.state=J.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case Z.NULL:{this._err(me.unexpectedNullCharacter),this._emitChars(Qt);break}case Z.EOF:{this._err(me.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case Z.HYPHEN_MINUS:{this.state=J.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case Z.LESS_THAN_SIGN:{this.state=J.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case Z.NULL:{this._err(me.unexpectedNullCharacter),this.state=J.SCRIPT_DATA_ESCAPED,this._emitChars(Qt);break}case Z.EOF:{this._err(me.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=J.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case Z.HYPHEN_MINUS:{this._emitChars("-");break}case Z.LESS_THAN_SIGN:{this.state=J.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case Z.GREATER_THAN_SIGN:{this.state=J.SCRIPT_DATA,this._emitChars(">");break}case Z.NULL:{this._err(me.unexpectedNullCharacter),this.state=J.SCRIPT_DATA_ESCAPED,this._emitChars(Qt);break}case Z.EOF:{this._err(me.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=J.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===Z.SOLIDUS?this.state=J.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Zr(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){Zr(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(ti.SCRIPT,!1)&&Ab(this.preprocessor.peek(ti.SCRIPT.length))){this._emitCodePoint(t);for(let i=0;i<ti.SCRIPT.length;i++)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 Z.HYPHEN_MINUS:{this.state=J.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case Z.LESS_THAN_SIGN:{this.state=J.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case Z.NULL:{this._err(me.unexpectedNullCharacter),this._emitChars(Qt);break}case Z.EOF:{this._err(me.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case Z.HYPHEN_MINUS:{this.state=J.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case Z.LESS_THAN_SIGN:{this.state=J.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case Z.NULL:{this._err(me.unexpectedNullCharacter),this.state=J.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Qt);break}case Z.EOF:{this._err(me.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=J.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case Z.HYPHEN_MINUS:{this._emitChars("-");break}case Z.LESS_THAN_SIGN:{this.state=J.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case Z.GREATER_THAN_SIGN:{this.state=J.SCRIPT_DATA,this._emitChars(">");break}case Z.NULL:{this._err(me.unexpectedNullCharacter),this.state=J.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Qt);break}case Z.EOF:{this._err(me.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=J.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===Z.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(ti.SCRIPT,!1)&&Ab(this.preprocessor.peek(ti.SCRIPT.length))){this._emitCodePoint(t);for(let i=0;i<ti.SCRIPT.length;i++)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 Z.SPACE:case Z.LINE_FEED:case Z.TABULATION:case Z.FORM_FEED:break;case Z.SOLIDUS:case Z.GREATER_THAN_SIGN:case Z.EOF:{this.state=J.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case Z.EQUALS_SIGN:{this._err(me.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 Z.SPACE:case Z.LINE_FEED:case Z.TABULATION:case Z.FORM_FEED:case Z.SOLIDUS:case Z.GREATER_THAN_SIGN:case Z.EOF:{this._leaveAttrName(),this.state=J.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case Z.EQUALS_SIGN:{this._leaveAttrName(),this.state=J.BEFORE_ATTRIBUTE_VALUE;break}case Z.QUOTATION_MARK:case Z.APOSTROPHE:case Z.LESS_THAN_SIGN:{this._err(me.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case Z.NULL:{this._err(me.unexpectedNullCharacter),this.currentAttr.name+=Qt;break}default:this.currentAttr.name+=String.fromCodePoint(qo(t)?ic(t):t)}}_stateAfterAttributeName(t){switch(t){case Z.SPACE:case Z.LINE_FEED:case Z.TABULATION:case Z.FORM_FEED:break;case Z.SOLIDUS:{this.state=J.SELF_CLOSING_START_TAG;break}case Z.EQUALS_SIGN:{this.state=J.BEFORE_ATTRIBUTE_VALUE;break}case Z.GREATER_THAN_SIGN:{this.state=J.DATA,this.emitCurrentTagToken();break}case Z.EOF:{this._err(me.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=J.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case Z.SPACE:case Z.LINE_FEED:case Z.TABULATION:case Z.FORM_FEED:break;case Z.QUOTATION_MARK:{this.state=J.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case Z.APOSTROPHE:{this.state=J.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case Z.GREATER_THAN_SIGN:{this._err(me.missingAttributeValue),this.state=J.DATA,this.emitCurrentTagToken();break}default:this.state=J.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case Z.QUOTATION_MARK:{this.state=J.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case Z.AMPERSAND:{this._startCharacterReference();break}case Z.NULL:{this._err(me.unexpectedNullCharacter),this.currentAttr.value+=Qt;break}case Z.EOF:{this._err(me.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case Z.APOSTROPHE:{this.state=J.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case Z.AMPERSAND:{this._startCharacterReference();break}case Z.NULL:{this._err(me.unexpectedNullCharacter),this.currentAttr.value+=Qt;break}case Z.EOF:{this._err(me.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case Z.SPACE:case Z.LINE_FEED:case Z.TABULATION:case Z.FORM_FEED:{this._leaveAttrValue(),this.state=J.BEFORE_ATTRIBUTE_NAME;break}case Z.AMPERSAND:{this._startCharacterReference();break}case Z.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=J.DATA,this.emitCurrentTagToken();break}case Z.NULL:{this._err(me.unexpectedNullCharacter),this.currentAttr.value+=Qt;break}case Z.QUOTATION_MARK:case Z.APOSTROPHE:case Z.LESS_THAN_SIGN:case Z.EQUALS_SIGN:case Z.GRAVE_ACCENT:{this._err(me.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case Z.EOF:{this._err(me.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case Z.SPACE:case Z.LINE_FEED:case Z.TABULATION:case Z.FORM_FEED:{this._leaveAttrValue(),this.state=J.BEFORE_ATTRIBUTE_NAME;break}case Z.SOLIDUS:{this._leaveAttrValue(),this.state=J.SELF_CLOSING_START_TAG;break}case Z.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=J.DATA,this.emitCurrentTagToken();break}case Z.EOF:{this._err(me.eofInTag),this._emitEOFToken();break}default:this._err(me.missingWhitespaceBetweenAttributes),this.state=J.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case Z.GREATER_THAN_SIGN:{const i=this.currentToken;i.selfClosing=!0,this.state=J.DATA,this.emitCurrentTagToken();break}case Z.EOF:{this._err(me.eofInTag),this._emitEOFToken();break}default:this._err(me.unexpectedSolidusInTag),this.state=J.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const i=this.currentToken;switch(t){case Z.GREATER_THAN_SIGN:{this.state=J.DATA,this.emitCurrentComment(i);break}case Z.EOF:{this.emitCurrentComment(i),this._emitEOFToken();break}case Z.NULL:{this._err(me.unexpectedNullCharacter),i.data+=Qt;break}default:i.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(ti.DASH_DASH,!0)?(this._createCommentToken(ti.DASH_DASH.length+1),this.state=J.COMMENT_START):this._consumeSequenceIfMatch(ti.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(ti.DOCTYPE.length+1),this.state=J.DOCTYPE):this._consumeSequenceIfMatch(ti.CDATA_START,!0)?this.inForeignNode?this.state=J.CDATA_SECTION:(this._err(me.cdataInHtmlContent),this._createCommentToken(ti.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=J.BOGUS_COMMENT):this._ensureHibernation()||(this._err(me.incorrectlyOpenedComment),this._createCommentToken(2),this.state=J.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case Z.HYPHEN_MINUS:{this.state=J.COMMENT_START_DASH;break}case Z.GREATER_THAN_SIGN:{this._err(me.abruptClosingOfEmptyComment),this.state=J.DATA;const i=this.currentToken;this.emitCurrentComment(i);break}default:this.state=J.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const i=this.currentToken;switch(t){case Z.HYPHEN_MINUS:{this.state=J.COMMENT_END;break}case Z.GREATER_THAN_SIGN:{this._err(me.abruptClosingOfEmptyComment),this.state=J.DATA,this.emitCurrentComment(i);break}case Z.EOF:{this._err(me.eofInComment),this.emitCurrentComment(i),this._emitEOFToken();break}default:i.data+="-",this.state=J.COMMENT,this._stateComment(t)}}_stateComment(t){const i=this.currentToken;switch(t){case Z.HYPHEN_MINUS:{this.state=J.COMMENT_END_DASH;break}case Z.LESS_THAN_SIGN:{i.data+="<",this.state=J.COMMENT_LESS_THAN_SIGN;break}case Z.NULL:{this._err(me.unexpectedNullCharacter),i.data+=Qt;break}case Z.EOF:{this._err(me.eofInComment),this.emitCurrentComment(i),this._emitEOFToken();break}default:i.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const i=this.currentToken;switch(t){case Z.EXCLAMATION_MARK:{i.data+="!",this.state=J.COMMENT_LESS_THAN_SIGN_BANG;break}case Z.LESS_THAN_SIGN:{i.data+="<";break}default:this.state=J.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===Z.HYPHEN_MINUS?this.state=J.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=J.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===Z.HYPHEN_MINUS?this.state=J.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=J.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==Z.GREATER_THAN_SIGN&&t!==Z.EOF&&this._err(me.nestedComment),this.state=J.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const i=this.currentToken;switch(t){case Z.HYPHEN_MINUS:{this.state=J.COMMENT_END;break}case Z.EOF:{this._err(me.eofInComment),this.emitCurrentComment(i),this._emitEOFToken();break}default:i.data+="-",this.state=J.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const i=this.currentToken;switch(t){case Z.GREATER_THAN_SIGN:{this.state=J.DATA,this.emitCurrentComment(i);break}case Z.EXCLAMATION_MARK:{this.state=J.COMMENT_END_BANG;break}case Z.HYPHEN_MINUS:{i.data+="-";break}case Z.EOF:{this._err(me.eofInComment),this.emitCurrentComment(i),this._emitEOFToken();break}default:i.data+="--",this.state=J.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const i=this.currentToken;switch(t){case Z.HYPHEN_MINUS:{i.data+="--!",this.state=J.COMMENT_END_DASH;break}case Z.GREATER_THAN_SIGN:{this._err(me.incorrectlyClosedComment),this.state=J.DATA,this.emitCurrentComment(i);break}case Z.EOF:{this._err(me.eofInComment),this.emitCurrentComment(i),this._emitEOFToken();break}default:i.data+="--!",this.state=J.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case Z.SPACE:case Z.LINE_FEED:case Z.TABULATION:case Z.FORM_FEED:{this.state=J.BEFORE_DOCTYPE_NAME;break}case Z.GREATER_THAN_SIGN:{this.state=J.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case Z.EOF:{this._err(me.eofInDoctype),this._createDoctypeToken(null);const i=this.currentToken;i.forceQuirks=!0,this.emitCurrentDoctype(i),this._emitEOFToken();break}default:this._err(me.missingWhitespaceBeforeDoctypeName),this.state=J.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(qo(t))this._createDoctypeToken(String.fromCharCode(ic(t))),this.state=J.DOCTYPE_NAME;else switch(t){case Z.SPACE:case Z.LINE_FEED:case Z.TABULATION:case Z.FORM_FEED:break;case Z.NULL:{this._err(me.unexpectedNullCharacter),this._createDoctypeToken(Qt),this.state=J.DOCTYPE_NAME;break}case Z.GREATER_THAN_SIGN:{this._err(me.missingDoctypeName),this._createDoctypeToken(null);const i=this.currentToken;i.forceQuirks=!0,this.emitCurrentDoctype(i),this.state=J.DATA;break}case Z.EOF:{this._err(me.eofInDoctype),this._createDoctypeToken(null);const i=this.currentToken;i.forceQuirks=!0,this.emitCurrentDoctype(i),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=J.DOCTYPE_NAME}}_stateDoctypeName(t){const i=this.currentToken;switch(t){case Z.SPACE:case Z.LINE_FEED:case Z.TABULATION:case Z.FORM_FEED:{this.state=J.AFTER_DOCTYPE_NAME;break}case Z.GREATER_THAN_SIGN:{this.state=J.DATA,this.emitCurrentDoctype(i);break}case Z.NULL:{this._err(me.unexpectedNullCharacter),i.name+=Qt;break}case Z.EOF:{this._err(me.eofInDoctype),i.forceQuirks=!0,this.emitCurrentDoctype(i),this._emitEOFToken();break}default:i.name+=String.fromCodePoint(qo(t)?ic(t):t)}}_stateAfterDoctypeName(t){const i=this.currentToken;switch(t){case Z.SPACE:case Z.LINE_FEED:case Z.TABULATION:case Z.FORM_FEED:break;case Z.GREATER_THAN_SIGN:{this.state=J.DATA,this.emitCurrentDoctype(i);break}case Z.EOF:{this._err(me.eofInDoctype),i.forceQuirks=!0,this.emitCurrentDoctype(i),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(ti.PUBLIC,!1)?this.state=J.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(ti.SYSTEM,!1)?this.state=J.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(me.invalidCharacterSequenceAfterDoctypeName),i.forceQuirks=!0,this.state=J.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const i=this.currentToken;switch(t){case Z.SPACE:case Z.LINE_FEED:case Z.TABULATION:case Z.FORM_FEED:{this.state=J.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case Z.QUOTATION_MARK:{this._err(me.missingWhitespaceAfterDoctypePublicKeyword),i.publicId="",this.state=J.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case Z.APOSTROPHE:{this._err(me.missingWhitespaceAfterDoctypePublicKeyword),i.publicId="",this.state=J.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case Z.GREATER_THAN_SIGN:{this._err(me.missingDoctypePublicIdentifier),i.forceQuirks=!0,this.state=J.DATA,this.emitCurrentDoctype(i);break}case Z.EOF:{this._err(me.eofInDoctype),i.forceQuirks=!0,this.emitCurrentDoctype(i),this._emitEOFToken();break}default:this._err(me.missingQuoteBeforeDoctypePublicIdentifier),i.forceQuirks=!0,this.state=J.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const i=this.currentToken;switch(t){case Z.SPACE:case Z.LINE_FEED:case Z.TABULATION:case Z.FORM_FEED:break;case Z.QUOTATION_MARK:{i.publicId="",this.state=J.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case Z.APOSTROPHE:{i.publicId="",this.state=J.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case Z.GREATER_THAN_SIGN:{this._err(me.missingDoctypePublicIdentifier),i.forceQuirks=!0,this.state=J.DATA,this.emitCurrentDoctype(i);break}case Z.EOF:{this._err(me.eofInDoctype),i.forceQuirks=!0,this.emitCurrentDoctype(i),this._emitEOFToken();break}default:this._err(me.missingQuoteBeforeDoctypePublicIdentifier),i.forceQuirks=!0,this.state=J.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const i=this.currentToken;switch(t){case Z.QUOTATION_MARK:{this.state=J.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case Z.NULL:{this._err(me.unexpectedNullCharacter),i.publicId+=Qt;break}case Z.GREATER_THAN_SIGN:{this._err(me.abruptDoctypePublicIdentifier),i.forceQuirks=!0,this.emitCurrentDoctype(i),this.state=J.DATA;break}case Z.EOF:{this._err(me.eofInDoctype),i.forceQuirks=!0,this.emitCurrentDoctype(i),this._emitEOFToken();break}default:i.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const i=this.currentToken;switch(t){case Z.APOSTROPHE:{this.state=J.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case Z.NULL:{this._err(me.unexpectedNullCharacter),i.publicId+=Qt;break}case Z.GREATER_THAN_SIGN:{this._err(me.abruptDoctypePublicIdentifier),i.forceQuirks=!0,this.emitCurrentDoctype(i),this.state=J.DATA;break}case Z.EOF:{this._err(me.eofInDoctype),i.forceQuirks=!0,this.emitCurrentDoctype(i),this._emitEOFToken();break}default:i.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const i=this.currentToken;switch(t){case Z.SPACE:case Z.LINE_FEED:case Z.TABULATION:case Z.FORM_FEED:{this.state=J.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case Z.GREATER_THAN_SIGN:{this.state=J.DATA,this.emitCurrentDoctype(i);break}case Z.QUOTATION_MARK:{this._err(me.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),i.systemId="",this.state=J.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case Z.APOSTROPHE:{this._err(me.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),i.systemId="",this.state=J.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case Z.EOF:{this._err(me.eofInDoctype),i.forceQuirks=!0,this.emitCurrentDoctype(i),this._emitEOFToken();break}default:this._err(me.missingQuoteBeforeDoctypeSystemIdentifier),i.forceQuirks=!0,this.state=J.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const i=this.currentToken;switch(t){case Z.SPACE:case Z.LINE_FEED:case Z.TABULATION:case Z.FORM_FEED:break;case Z.GREATER_THAN_SIGN:{this.emitCurrentDoctype(i),this.state=J.DATA;break}case Z.QUOTATION_MARK:{i.systemId="",this.state=J.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case Z.APOSTROPHE:{i.systemId="",this.state=J.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case Z.EOF:{this._err(me.eofInDoctype),i.forceQuirks=!0,this.emitCurrentDoctype(i),this._emitEOFToken();break}default:this._err(me.missingQuoteBeforeDoctypeSystemIdentifier),i.forceQuirks=!0,this.state=J.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const i=this.currentToken;switch(t){case Z.SPACE:case Z.LINE_FEED:case Z.TABULATION:case Z.FORM_FEED:{this.state=J.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case Z.QUOTATION_MARK:{this._err(me.missingWhitespaceAfterDoctypeSystemKeyword),i.systemId="",this.state=J.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case Z.APOSTROPHE:{this._err(me.missingWhitespaceAfterDoctypeSystemKeyword),i.systemId="",this.state=J.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case Z.GREATER_THAN_SIGN:{this._err(me.missingDoctypeSystemIdentifier),i.forceQuirks=!0,this.state=J.DATA,this.emitCurrentDoctype(i);break}case Z.EOF:{this._err(me.eofInDoctype),i.forceQuirks=!0,this.emitCurrentDoctype(i),this._emitEOFToken();break}default:this._err(me.missingQuoteBeforeDoctypeSystemIdentifier),i.forceQuirks=!0,this.state=J.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const i=this.currentToken;switch(t){case Z.SPACE:case Z.LINE_FEED:case Z.TABULATION:case Z.FORM_FEED:break;case Z.QUOTATION_MARK:{i.systemId="",this.state=J.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case Z.APOSTROPHE:{i.systemId="",this.state=J.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case Z.GREATER_THAN_SIGN:{this._err(me.missingDoctypeSystemIdentifier),i.forceQuirks=!0,this.state=J.DATA,this.emitCurrentDoctype(i);break}case Z.EOF:{this._err(me.eofInDoctype),i.forceQuirks=!0,this.emitCurrentDoctype(i),this._emitEOFToken();break}default:this._err(me.missingQuoteBeforeDoctypeSystemIdentifier),i.forceQuirks=!0,this.state=J.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const i=this.currentToken;switch(t){case Z.QUOTATION_MARK:{this.state=J.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case Z.NULL:{this._err(me.unexpectedNullCharacter),i.systemId+=Qt;break}case Z.GREATER_THAN_SIGN:{this._err(me.abruptDoctypeSystemIdentifier),i.forceQuirks=!0,this.emitCurrentDoctype(i),this.state=J.DATA;break}case Z.EOF:{this._err(me.eofInDoctype),i.forceQuirks=!0,this.emitCurrentDoctype(i),this._emitEOFToken();break}default:i.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const i=this.currentToken;switch(t){case Z.APOSTROPHE:{this.state=J.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case Z.NULL:{this._err(me.unexpectedNullCharacter),i.systemId+=Qt;break}case Z.GREATER_THAN_SIGN:{this._err(me.abruptDoctypeSystemIdentifier),i.forceQuirks=!0,this.emitCurrentDoctype(i),this.state=J.DATA;break}case Z.EOF:{this._err(me.eofInDoctype),i.forceQuirks=!0,this.emitCurrentDoctype(i),this._emitEOFToken();break}default:i.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const i=this.currentToken;switch(t){case Z.SPACE:case Z.LINE_FEED:case Z.TABULATION:case Z.FORM_FEED:break;case Z.GREATER_THAN_SIGN:{this.emitCurrentDoctype(i),this.state=J.DATA;break}case Z.EOF:{this._err(me.eofInDoctype),i.forceQuirks=!0,this.emitCurrentDoctype(i),this._emitEOFToken();break}default:this._err(me.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=J.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const i=this.currentToken;switch(t){case Z.GREATER_THAN_SIGN:{this.emitCurrentDoctype(i),this.state=J.DATA;break}case Z.NULL:{this._err(me.unexpectedNullCharacter);break}case Z.EOF:{this.emitCurrentDoctype(i),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case Z.RIGHT_SQUARE_BRACKET:{this.state=J.CDATA_SECTION_BRACKET;break}case Z.EOF:{this._err(me.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===Z.RIGHT_SQUARE_BRACKET?this.state=J.CDATA_SECTION_END:(this._emitChars("]"),this.state=J.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case Z.GREATER_THAN_SIGN:{this.state=J.DATA;break}case Z.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(Z.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Tb(this.preprocessor.peek(1))?J.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Tb(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===Z.SEMICOLON&&this._err(me.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const PS=new Set([R.DD,R.DT,R.LI,R.OPTGROUP,R.OPTION,R.P,R.RB,R.RP,R.RT,R.RTC]),xb=new Set([...PS,R.CAPTION,R.COLGROUP,R.TBODY,R.TD,R.TFOOT,R.TH,R.THEAD,R.TR]),Sc=new Set([R.APPLET,R.CAPTION,R.HTML,R.MARQUEE,R.OBJECT,R.TABLE,R.TD,R.TEMPLATE,R.TH]),hN=new Set([...Sc,R.OL,R.UL]),dN=new Set([...Sc,R.BUTTON]),wb=new Set([R.ANNOTATION_XML,R.MI,R.MN,R.MO,R.MS,R.MTEXT]),Db=new Set([R.DESC,R.FOREIGN_OBJECT,R.TITLE]),fN=new Set([R.TR,R.TEMPLATE,R.HTML]),pN=new Set([R.TBODY,R.TFOOT,R.THEAD,R.TEMPLATE,R.HTML]),gN=new Set([R.TABLE,R.TEMPLATE,R.HTML]),mN=new Set([R.TD,R.TH]);class _N{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,i,s){this.treeAdapter=i,this.handler=s,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=R.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===R.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===Te.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,i){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=i,this.currentTagId=i,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,i,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,i){const s=this._indexOf(t);this.items[s]=i,s===this.stackTop&&(this.current=i)}insertAfter(t,i,s){const u=this._indexOf(t)+1;this.items.splice(u,0,i),this.tagIDs.splice(u,0,s),this.stackTop++,u===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,u===this.stackTop)}popUntilTagNamePopped(t){let i=this.stackTop+1;do i=this.tagIDs.lastIndexOf(t,i-1);while(i>0&&this.treeAdapter.getNamespaceURI(this.items[i])!==Te.HTML);this.shortenToLength(Math.max(i,0))}shortenToLength(t){for(;this.stackTop>=t;){const i=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(i,this.stackTop<t)}}popUntilElementPopped(t){const i=this._indexOf(t);this.shortenToLength(Math.max(i,0))}popUntilPopped(t,i){const s=this._indexOfTagNames(t,i);this.shortenToLength(Math.max(s,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(e0,Te.HTML)}popUntilTableCellPopped(){this.popUntilPopped(mN,Te.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,i){for(let s=this.stackTop;s>=0;s--)if(t.has(this.tagIDs[s])&&this.treeAdapter.getNamespaceURI(this.items[s])===i)return s;return-1}clearBackTo(t,i){const s=this._indexOfTagNames(t,i);this.shortenToLength(s+1)}clearBackToTableContext(){this.clearBackTo(gN,Te.HTML)}clearBackToTableBodyContext(){this.clearBackTo(pN,Te.HTML)}clearBackToTableRowContext(){this.clearBackTo(fN,Te.HTML)}remove(t){const i=this._indexOf(t);i>=0&&(i===this.stackTop?this.pop():(this.items.splice(i,1),this.tagIDs.splice(i,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===R.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const i=this._indexOf(t)-1;return i>=0?this.items[i]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===R.HTML}hasInDynamicScope(t,i){for(let s=this.stackTop;s>=0;s--){const u=this.tagIDs[s];switch(this.treeAdapter.getNamespaceURI(this.items[s])){case Te.HTML:{if(u===t)return!0;if(i.has(u))return!1;break}case Te.SVG:{if(Db.has(u))return!1;break}case Te.MATHML:{if(wb.has(u))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Sc)}hasInListItemScope(t){return this.hasInDynamicScope(t,hN)}hasInButtonScope(t){return this.hasInDynamicScope(t,dN)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const i=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case Te.HTML:{if(e0.has(i))return!0;if(Sc.has(i))return!1;break}case Te.SVG:{if(Db.has(i))return!1;break}case Te.MATHML:{if(wb.has(i))return!1;break}}}return!0}hasInTableScope(t){for(let i=this.stackTop;i>=0;i--)if(this.treeAdapter.getNamespaceURI(this.items[i])===Te.HTML)switch(this.tagIDs[i]){case t:return!0;case R.TABLE:case R.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===Te.HTML)switch(this.tagIDs[t]){case R.TBODY:case R.THEAD:case R.TFOOT:return!0;case R.TABLE:case R.HTML:return!1}return!0}hasInSelectScope(t){for(let i=this.stackTop;i>=0;i--)if(this.treeAdapter.getNamespaceURI(this.items[i])===Te.HTML)switch(this.tagIDs[i]){case t:return!0;case R.OPTION:case R.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&PS.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&xb.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&xb.has(this.currentTagId);)this.pop()}}const Df=3;var Yi;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Yi||(Yi={}));const Rb={type:Yi.Marker};class bN{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,i){const s=[],u=i.length,p=this.treeAdapter.getTagName(t),d=this.treeAdapter.getNamespaceURI(t);for(let o=0;o<this.entries.length;o++){const l=this.entries[o];if(l.type===Yi.Marker)break;const{element:c}=l;if(this.treeAdapter.getTagName(c)===p&&this.treeAdapter.getNamespaceURI(c)===d){const g=this.treeAdapter.getAttrList(c);g.length===u&&s.push({idx:o,attrs:g})}}return s}_ensureNoahArkCondition(t){if(this.entries.length<Df)return;const i=this.treeAdapter.getAttrList(t),s=this._getNoahArkConditionCandidates(t,i);if(s.length<Df)return;const u=new Map(i.map(d=>[d.name,d.value]));let p=0;for(let d=0;d<s.length;d++){const o=s[d];o.attrs.every(l=>u.get(l.name)===l.value)&&(p+=1,p>=Df&&this.entries.splice(o.idx,1))}}insertMarker(){this.entries.unshift(Rb)}pushElement(t,i){this._ensureNoahArkCondition(t),this.entries.unshift({type:Yi.Element,element:t,token:i})}insertElementAfterBookmark(t,i){const s=this.entries.indexOf(this.bookmark);this.entries.splice(s,0,{type:Yi.Element,element:t,token:i})}removeEntry(t){const i=this.entries.indexOf(t);i!==-1&&this.entries.splice(i,1)}clearToLastMarker(){const t=this.entries.indexOf(Rb);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const i=this.entries.find(s=>s.type===Yi.Marker||this.treeAdapter.getTagName(s.element)===t);return i&&i.type===Yi.Element?i:null}getElementEntry(t){return this.entries.find(i=>i.type===Yi.Element&&i.element===t)}}const Jr={createDocument(){return{nodeName:"#document",mode:ki.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,i){return{nodeName:e,tagName:e,attrs:i,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,i){const s=e.childNodes.indexOf(i);e.childNodes.splice(s,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,i,s){const u=e.childNodes.find(p=>p.nodeName==="#documentType");if(u)u.name=t,u.publicId=i,u.systemId=s;else{const p={nodeName:"#documentType",name:t,publicId:i,systemId:s,parentNode:null};Jr.appendChild(e,p)}},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 i=e.childNodes[e.childNodes.length-1];if(Jr.isTextNode(i)){i.value+=t;return}}Jr.appendChild(e,Jr.createTextNode(t))},insertTextBefore(e,t,i){const s=e.childNodes[e.childNodes.indexOf(i)-1];s&&Jr.isTextNode(s)?s.value+=t:Jr.insertBefore(e,Jr.createTextNode(t),i)},adoptAttributes(e,t){const i=new Set(e.attrs.map(s=>s.name));for(let s=0;s<t.length;s++)i.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}}},US="html",EN="about:legacy-compat",vN="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",HS=["+//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//"],SN=[...HS,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],yN=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),zS=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],CN=[...zS,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function kb(e,t){return t.some(i=>e.startsWith(i))}function TN(e){return e.name===US&&e.publicId===null&&(e.systemId===null||e.systemId===EN)}function AN(e){if(e.name!==US)return ki.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===vN)return ki.QUIRKS;let{publicId:i}=e;if(i!==null){if(i=i.toLowerCase(),yN.has(i))return ki.QUIRKS;let s=t===null?SN:HS;if(kb(i,s))return ki.QUIRKS;if(s=t===null?zS:CN,kb(i,s))return ki.LIMITED_QUIRKS}return ki.NO_QUIRKS}const Lb={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},xN="definitionurl",wN="definitionURL",DN=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])),RN=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:Te.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:Te.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:Te.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:Te.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:Te.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:Te.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:Te.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:Te.XML}],["xml:space",{prefix:"xml",name:"space",namespace:Te.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:Te.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:Te.XMLNS}]]),kN=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])),LN=new Set([R.B,R.BIG,R.BLOCKQUOTE,R.BODY,R.BR,R.CENTER,R.CODE,R.DD,R.DIV,R.DL,R.DT,R.EM,R.EMBED,R.H1,R.H2,R.H3,R.H4,R.H5,R.H6,R.HEAD,R.HR,R.I,R.IMG,R.LI,R.LISTING,R.MENU,R.META,R.NOBR,R.OL,R.P,R.PRE,R.RUBY,R.S,R.SMALL,R.SPAN,R.STRONG,R.STRIKE,R.SUB,R.SUP,R.TABLE,R.TT,R.U,R.UL,R.VAR]);function ON(e){const t=e.tagID;return t===R.FONT&&e.attrs.some(({name:s})=>s===xs.COLOR||s===xs.SIZE||s===xs.FACE)||LN.has(t)}function jS(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===xN){e.attrs[t].name=wN;break}}function $S(e){for(let t=0;t<e.attrs.length;t++){const i=DN.get(e.attrs[t].name);i!=null&&(e.attrs[t].name=i)}}function z0(e){for(let t=0;t<e.attrs.length;t++){const i=RN.get(e.attrs[t].name);i&&(e.attrs[t].prefix=i.prefix,e.attrs[t].name=i.name,e.attrs[t].namespace=i.namespace)}}function NN(e){const t=kN.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Ba(e.tagName))}function MN(e,t){return t===Te.MATHML&&(e===R.MI||e===R.MO||e===R.MN||e===R.MS||e===R.MTEXT)}function IN(e,t,i){if(t===Te.MATHML&&e===R.ANNOTATION_XML){for(let s=0;s<i.length;s++)if(i[s].name===xs.ENCODING){const u=i[s].value.toLowerCase();return u===Lb.TEXT_HTML||u===Lb.APPLICATION_XML}}return t===Te.SVG&&(e===R.FOREIGN_OBJECT||e===R.DESC||e===R.TITLE)}function BN(e,t,i,s){return(!s||s===Te.HTML)&&IN(e,t,i)||(!s||s===Te.MATHML)&&MN(e,t)}const FN="hidden",PN=8,UN=3;var te;(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"})(te||(te={}));const HN={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},WS=new Set([R.TABLE,R.TBODY,R.TFOOT,R.THEAD,R.TR]),Ob={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Jr,onParseError:null};class Nb{constructor(t,i,s=null,u=null){this.fragmentContext=s,this.scriptHandler=u,this.currentToken=null,this.stopped=!1,this.insertionMode=te.INITIAL,this.originalInsertionMode=te.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={...Ob,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=i??this.treeAdapter.createDocument(),this.tokenizer=new cN(this.options,this),this.activeFormattingElements=new bN(this.treeAdapter),this.fragmentContextID=s?Ba(this.treeAdapter.getTagName(s)):R.UNKNOWN,this._setContextModes(s??this.document,this.fragmentContextID),this.openElements=new _N(this.document,this.treeAdapter,this)}static parse(t,i){const s=new this(i);return s.tokenizer.write(t,!0),s.document}static getFragmentParser(t,i){const s={...Ob,...i};t??(t=s.treeAdapter.createElement(ce.TEMPLATE,Te.HTML,[]));const u=s.treeAdapter.createElement("documentmock",Te.HTML,[]),p=new this(s,u,t);return p.fragmentContextID===R.TEMPLATE&&p.tmplInsertionModeStack.unshift(te.IN_TEMPLATE),p._initTokenizerForFragmentParsing(),p._insertFakeRootElement(),p._resetInsertionMode(),p._findFormInFragmentContext(),p}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),i=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,i),i}_err(t,i,s){var u;if(!this.onParseError)return;const p=(u=t.location)!==null&&u!==void 0?u:HN,d={code:i,startLine:p.startLine,startCol:p.startCol,startOffset:p.startOffset,endLine:s?p.startLine:p.endLine,endCol:s?p.startCol:p.endCol,endOffset:s?p.startOffset:p.endOffset};this.onParseError(d)}onItemPush(t,i,s){var u,p;(p=(u=this.treeAdapter).onItemPush)===null||p===void 0||p.call(u,t),s&&this.openElements.stackTop>0&&this._setContextModes(t,i)}onItemPop(t,i){var s,u;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(u=(s=this.treeAdapter).onItemPop)===null||u===void 0||u.call(s,t,this.openElements.current),i){let p,d;this.openElements.stackTop===0&&this.fragmentContext?(p=this.fragmentContext,d=this.fragmentContextID):{current:p,currentTagId:d}=this.openElements,this._setContextModes(p,d)}}_setContextModes(t,i){const s=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===Te.HTML;this.currentNotInHTML=!s,this.tokenizer.inForeignNode=!s&&t!==void 0&&i!==void 0&&!this._isIntegrationPoint(i,t)}_switchToTextParsing(t,i){this._insertElement(t,Te.HTML),this.tokenizer.state=i,this.originalInsertionMode=this.insertionMode,this.insertionMode=te.TEXT}switchToPlaintextParsing(){this.insertionMode=te.TEXT,this.originalInsertionMode=te.IN_BODY,this.tokenizer.state=ln.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)===ce.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==Te.HTML))switch(this.fragmentContextID){case R.TITLE:case R.TEXTAREA:{this.tokenizer.state=ln.RCDATA;break}case R.STYLE:case R.XMP:case R.IFRAME:case R.NOEMBED:case R.NOFRAMES:case R.NOSCRIPT:{this.tokenizer.state=ln.RAWTEXT;break}case R.SCRIPT:{this.tokenizer.state=ln.SCRIPT_DATA;break}case R.PLAINTEXT:{this.tokenizer.state=ln.PLAINTEXT;break}}}_setDocumentType(t){const i=t.name||"",s=t.publicId||"",u=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,i,s,u),t.location){const d=this.treeAdapter.getChildNodes(this.document).find(o=>this.treeAdapter.isDocumentTypeNode(o));d&&this.treeAdapter.setNodeSourceCodeLocation(d,t.location)}}_attachElementToTree(t,i){if(this.options.sourceCodeLocationInfo){const s=i&&{...i,startTag:i};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,i){const s=this.treeAdapter.createElement(t.tagName,i,t.attrs);this._attachElementToTree(s,t.location)}_insertElement(t,i){const s=this.treeAdapter.createElement(t.tagName,i,t.attrs);this._attachElementToTree(s,t.location),this.openElements.push(s,t.tagID)}_insertFakeElement(t,i){const s=this.treeAdapter.createElement(t,Te.HTML,[]);this._attachElementToTree(s,null),this.openElements.push(s,i)}_insertTemplate(t){const i=this.treeAdapter.createElement(t.tagName,Te.HTML,t.attrs),s=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(i,s),this._attachElementToTree(i,t.location),this.openElements.push(i,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(s,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(ce.HTML,Te.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,R.HTML)}_appendCommentNode(t,i){const s=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(i,s),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}_insertCharacters(t){let i,s;if(this._shouldFosterParentOnInsertion()?({parent:i,beforeElement:s}=this._findFosterParentingLocation(),s?this.treeAdapter.insertTextBefore(i,t.chars,s):this.treeAdapter.insertText(i,t.chars)):(i=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(i,t.chars)),!t.location)return;const u=this.treeAdapter.getChildNodes(i),p=s?u.lastIndexOf(s):u.length,d=u[p-1];if(this.treeAdapter.getNodeSourceCodeLocation(d)){const{endLine:l,endCol:c,endOffset:g}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(d,{endLine:l,endCol:c,endOffset:g})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(d,t.location)}_adoptNodes(t,i){for(let s=this.treeAdapter.getFirstChild(t);s;s=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(s),this.treeAdapter.appendChild(i,s)}_setEndLocation(t,i){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&i.location){const s=i.location,u=this.treeAdapter.getTagName(t),p=i.type===ct.END_TAG&&u===i.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,p)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let i,s;return this.openElements.stackTop===0&&this.fragmentContext?(i=this.fragmentContext,s=this.fragmentContextID):{current:i,currentTagId:s}=this.openElements,t.tagID===R.SVG&&this.treeAdapter.getTagName(i)===ce.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(i)===Te.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===R.MGLYPH||t.tagID===R.MALIGNMARK)&&s!==void 0&&!this._isIntegrationPoint(s,i,Te.HTML)}_processToken(t){switch(t.type){case ct.CHARACTER:{this.onCharacter(t);break}case ct.NULL_CHARACTER:{this.onNullCharacter(t);break}case ct.COMMENT:{this.onComment(t);break}case ct.DOCTYPE:{this.onDoctype(t);break}case ct.START_TAG:{this._processStartTag(t);break}case ct.END_TAG:{this.onEndTag(t);break}case ct.EOF:{this.onEof(t);break}case ct.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,i,s){const u=this.treeAdapter.getNamespaceURI(i),p=this.treeAdapter.getAttrList(i);return BN(t,u,p,s)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const i=this.activeFormattingElements.entries.findIndex(u=>u.type===Yi.Marker||this.openElements.contains(u.element)),s=i===-1?t-1:i-1;for(let u=s;u>=0;u--){const p=this.activeFormattingElements.entries[u];this._insertElement(p.token,this.treeAdapter.getNamespaceURI(p.element)),p.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=te.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(R.P),this.openElements.popUntilTagNamePopped(R.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case R.TR:{this.insertionMode=te.IN_ROW;return}case R.TBODY:case R.THEAD:case R.TFOOT:{this.insertionMode=te.IN_TABLE_BODY;return}case R.CAPTION:{this.insertionMode=te.IN_CAPTION;return}case R.COLGROUP:{this.insertionMode=te.IN_COLUMN_GROUP;return}case R.TABLE:{this.insertionMode=te.IN_TABLE;return}case R.BODY:{this.insertionMode=te.IN_BODY;return}case R.FRAMESET:{this.insertionMode=te.IN_FRAMESET;return}case R.SELECT:{this._resetInsertionModeForSelect(t);return}case R.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case R.HTML:{this.insertionMode=this.headElement?te.AFTER_HEAD:te.BEFORE_HEAD;return}case R.TD:case R.TH:{if(t>0){this.insertionMode=te.IN_CELL;return}break}case R.HEAD:{if(t>0){this.insertionMode=te.IN_HEAD;return}break}}this.insertionMode=te.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let i=t-1;i>0;i--){const s=this.openElements.tagIDs[i];if(s===R.TEMPLATE)break;if(s===R.TABLE){this.insertionMode=te.IN_SELECT_IN_TABLE;return}}this.insertionMode=te.IN_SELECT}_isElementCausesFosterParenting(t){return WS.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 i=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case R.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(i)===Te.HTML)return{parent:this.treeAdapter.getTemplateContent(i),beforeElement:null};break}case R.TABLE:{const s=this.treeAdapter.getParentNode(i);return s?{parent:s,beforeElement:i}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const i=this._findFosterParentingLocation();i.beforeElement?this.treeAdapter.insertBefore(i.parent,t,i.beforeElement):this.treeAdapter.appendChild(i.parent,t)}_isSpecialElement(t,i){const s=this.treeAdapter.getNamespaceURI(t);return aN[s].has(i)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){mI(this,t);return}switch(this.insertionMode){case te.INITIAL:{zo(this,t);break}case te.BEFORE_HTML:{Jo(this,t);break}case te.BEFORE_HEAD:{el(this,t);break}case te.IN_HEAD:{tl(this,t);break}case te.IN_HEAD_NO_SCRIPT:{nl(this,t);break}case te.AFTER_HEAD:{il(this,t);break}case te.IN_BODY:case te.IN_CAPTION:case te.IN_CELL:case te.IN_TEMPLATE:{YS(this,t);break}case te.TEXT:case te.IN_SELECT:case te.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case te.IN_TABLE:case te.IN_TABLE_BODY:case te.IN_ROW:{Rf(this,t);break}case te.IN_TABLE_TEXT:{ZS(this,t);break}case te.IN_COLUMN_GROUP:{yc(this,t);break}case te.AFTER_BODY:{Cc(this,t);break}case te.AFTER_AFTER_BODY:{cc(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){gI(this,t);return}switch(this.insertionMode){case te.INITIAL:{zo(this,t);break}case te.BEFORE_HTML:{Jo(this,t);break}case te.BEFORE_HEAD:{el(this,t);break}case te.IN_HEAD:{tl(this,t);break}case te.IN_HEAD_NO_SCRIPT:{nl(this,t);break}case te.AFTER_HEAD:{il(this,t);break}case te.TEXT:{this._insertCharacters(t);break}case te.IN_TABLE:case te.IN_TABLE_BODY:case te.IN_ROW:{Rf(this,t);break}case te.IN_COLUMN_GROUP:{yc(this,t);break}case te.AFTER_BODY:{Cc(this,t);break}case te.AFTER_AFTER_BODY:{cc(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){t0(this,t);return}switch(this.insertionMode){case te.INITIAL:case te.BEFORE_HTML:case te.BEFORE_HEAD:case te.IN_HEAD:case te.IN_HEAD_NO_SCRIPT:case te.AFTER_HEAD:case te.IN_BODY:case te.IN_TABLE:case te.IN_CAPTION:case te.IN_COLUMN_GROUP:case te.IN_TABLE_BODY:case te.IN_ROW:case te.IN_CELL:case te.IN_SELECT:case te.IN_SELECT_IN_TABLE:case te.IN_TEMPLATE:case te.IN_FRAMESET:case te.AFTER_FRAMESET:{t0(this,t);break}case te.IN_TABLE_TEXT:{jo(this,t);break}case te.AFTER_BODY:{GN(this,t);break}case te.AFTER_AFTER_BODY:case te.AFTER_AFTER_FRAMESET:{KN(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case te.INITIAL:{VN(this,t);break}case te.BEFORE_HEAD:case te.IN_HEAD:case te.IN_HEAD_NO_SCRIPT:case te.AFTER_HEAD:{this._err(t,me.misplacedDoctype);break}case te.IN_TABLE_TEXT:{jo(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,me.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?_I(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case te.INITIAL:{zo(this,t);break}case te.BEFORE_HTML:{XN(this,t);break}case te.BEFORE_HEAD:{ZN(this,t);break}case te.IN_HEAD:{Ui(this,t);break}case te.IN_HEAD_NO_SCRIPT:{tM(this,t);break}case te.AFTER_HEAD:{iM(this,t);break}case te.IN_BODY:{Bn(this,t);break}case te.IN_TABLE:{wa(this,t);break}case te.IN_TABLE_TEXT:{jo(this,t);break}case te.IN_CAPTION:{JM(this,t);break}case te.IN_COLUMN_GROUP:{W0(this,t);break}case te.IN_TABLE_BODY:{Uc(this,t);break}case te.IN_ROW:{Hc(this,t);break}case te.IN_CELL:{nI(this,t);break}case te.IN_SELECT:{ty(this,t);break}case te.IN_SELECT_IN_TABLE:{rI(this,t);break}case te.IN_TEMPLATE:{aI(this,t);break}case te.AFTER_BODY:{lI(this,t);break}case te.IN_FRAMESET:{uI(this,t);break}case te.AFTER_FRAMESET:{hI(this,t);break}case te.AFTER_AFTER_BODY:{fI(this,t);break}case te.AFTER_AFTER_FRAMESET:{pI(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?bI(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case te.INITIAL:{zo(this,t);break}case te.BEFORE_HTML:{QN(this,t);break}case te.BEFORE_HEAD:{JN(this,t);break}case te.IN_HEAD:{eM(this,t);break}case te.IN_HEAD_NO_SCRIPT:{nM(this,t);break}case te.AFTER_HEAD:{rM(this,t);break}case te.IN_BODY:{Pc(this,t);break}case te.TEXT:{$M(this,t);break}case te.IN_TABLE:{dl(this,t);break}case te.IN_TABLE_TEXT:{jo(this,t);break}case te.IN_CAPTION:{eI(this,t);break}case te.IN_COLUMN_GROUP:{tI(this,t);break}case te.IN_TABLE_BODY:{n0(this,t);break}case te.IN_ROW:{ey(this,t);break}case te.IN_CELL:{iI(this,t);break}case te.IN_SELECT:{ny(this,t);break}case te.IN_SELECT_IN_TABLE:{sI(this,t);break}case te.IN_TEMPLATE:{oI(this,t);break}case te.AFTER_BODY:{ry(this,t);break}case te.IN_FRAMESET:{cI(this,t);break}case te.AFTER_FRAMESET:{dI(this,t);break}case te.AFTER_AFTER_BODY:{cc(this,t);break}}}onEof(t){switch(this.insertionMode){case te.INITIAL:{zo(this,t);break}case te.BEFORE_HTML:{Jo(this,t);break}case te.BEFORE_HEAD:{el(this,t);break}case te.IN_HEAD:{tl(this,t);break}case te.IN_HEAD_NO_SCRIPT:{nl(this,t);break}case te.AFTER_HEAD:{il(this,t);break}case te.IN_BODY:case te.IN_TABLE:case te.IN_CAPTION:case te.IN_COLUMN_GROUP:case te.IN_TABLE_BODY:case te.IN_ROW:case te.IN_CELL:case te.IN_SELECT:case te.IN_SELECT_IN_TABLE:{XS(this,t);break}case te.TEXT:{WM(this,t);break}case te.IN_TABLE_TEXT:{jo(this,t);break}case te.IN_TEMPLATE:{iy(this,t);break}case te.AFTER_BODY:case te.IN_FRAMESET:case te.AFTER_FRAMESET:case te.AFTER_AFTER_BODY:case te.AFTER_AFTER_FRAMESET:{$0(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===Z.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 te.IN_HEAD:case te.IN_HEAD_NO_SCRIPT:case te.AFTER_HEAD:case te.TEXT:case te.IN_COLUMN_GROUP:case te.IN_SELECT:case te.IN_SELECT_IN_TABLE:case te.IN_FRAMESET:case te.AFTER_FRAMESET:{this._insertCharacters(t);break}case te.IN_BODY:case te.IN_CAPTION:case te.IN_CELL:case te.IN_TEMPLATE:case te.AFTER_BODY:case te.AFTER_AFTER_BODY:case te.AFTER_AFTER_FRAMESET:{qS(this,t);break}case te.IN_TABLE:case te.IN_TABLE_BODY:case te.IN_ROW:{Rf(this,t);break}case te.IN_TABLE_TEXT:{QS(this,t);break}}}}function zN(e,t){let i=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return i?e.openElements.contains(i.element)?e.openElements.hasInScope(t.tagID)||(i=null):(e.activeFormattingElements.removeEntry(i),i=null):VS(e,t),i}function jN(e,t){let i=null,s=e.openElements.stackTop;for(;s>=0;s--){const u=e.openElements.items[s];if(u===t.element)break;e._isSpecialElement(u,e.openElements.tagIDs[s])&&(i=u)}return i||(e.openElements.shortenToLength(Math.max(s,0)),e.activeFormattingElements.removeEntry(t)),i}function $N(e,t,i){let s=t,u=e.openElements.getCommonAncestor(t);for(let p=0,d=u;d!==i;p++,d=u){u=e.openElements.getCommonAncestor(d);const o=e.activeFormattingElements.getElementEntry(d),l=o&&p>=UN;!o||l?(l&&e.activeFormattingElements.removeEntry(o),e.openElements.remove(d)):(d=WN(e,o),s===t&&(e.activeFormattingElements.bookmark=o),e.treeAdapter.detachNode(s),e.treeAdapter.appendChild(d,s),s=d)}return s}function WN(e,t){const i=e.treeAdapter.getNamespaceURI(t.element),s=e.treeAdapter.createElement(t.token.tagName,i,t.token.attrs);return e.openElements.replace(t.element,s),t.element=s,s}function qN(e,t,i){const s=e.treeAdapter.getTagName(t),u=Ba(s);if(e._isElementCausesFosterParenting(u))e._fosterParentElement(i);else{const p=e.treeAdapter.getNamespaceURI(t);u===R.TEMPLATE&&p===Te.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,i)}}function YN(e,t,i){const s=e.treeAdapter.getNamespaceURI(i.element),{token:u}=i,p=e.treeAdapter.createElement(u.tagName,s,u.attrs);e._adoptNodes(t,p),e.treeAdapter.appendChild(t,p),e.activeFormattingElements.insertElementAfterBookmark(p,u),e.activeFormattingElements.removeEntry(i),e.openElements.remove(i.element),e.openElements.insertAfter(t,p,u.tagID)}function j0(e,t){for(let i=0;i<PN;i++){const s=zN(e,t);if(!s)break;const u=jN(e,s);if(!u)break;e.activeFormattingElements.bookmark=s;const p=$N(e,u,s.element),d=e.openElements.getCommonAncestor(s.element);e.treeAdapter.detachNode(p),d&&qN(e,d,p),YN(e,u,s)}}function t0(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function GN(e,t){e._appendCommentNode(t,e.openElements.items[0])}function KN(e,t){e._appendCommentNode(t,e.document)}function $0(e,t){if(e.stopped=!0,t.location){const i=e.fragmentContext?0:2;for(let s=e.openElements.stackTop;s>=i;s--)e._setEndLocation(e.openElements.items[s],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const s=e.openElements.items[0],u=e.treeAdapter.getNodeSourceCodeLocation(s);if(u&&!u.endTag&&(e._setEndLocation(s,t),e.openElements.stackTop>=1)){const p=e.openElements.items[1],d=e.treeAdapter.getNodeSourceCodeLocation(p);d&&!d.endTag&&e._setEndLocation(p,t)}}}}function VN(e,t){e._setDocumentType(t);const i=t.forceQuirks?ki.QUIRKS:AN(t);TN(t)||e._err(t,me.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,i),e.insertionMode=te.BEFORE_HTML}function zo(e,t){e._err(t,me.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,ki.QUIRKS),e.insertionMode=te.BEFORE_HTML,e._processToken(t)}function XN(e,t){t.tagID===R.HTML?(e._insertElement(t,Te.HTML),e.insertionMode=te.BEFORE_HEAD):Jo(e,t)}function QN(e,t){const i=t.tagID;(i===R.HTML||i===R.HEAD||i===R.BODY||i===R.BR)&&Jo(e,t)}function Jo(e,t){e._insertFakeRootElement(),e.insertionMode=te.BEFORE_HEAD,e._processToken(t)}function ZN(e,t){switch(t.tagID){case R.HTML:{Bn(e,t);break}case R.HEAD:{e._insertElement(t,Te.HTML),e.headElement=e.openElements.current,e.insertionMode=te.IN_HEAD;break}default:el(e,t)}}function JN(e,t){const i=t.tagID;i===R.HEAD||i===R.BODY||i===R.HTML||i===R.BR?el(e,t):e._err(t,me.endTagWithoutMatchingOpenElement)}function el(e,t){e._insertFakeElement(ce.HEAD,R.HEAD),e.headElement=e.openElements.current,e.insertionMode=te.IN_HEAD,e._processToken(t)}function Ui(e,t){switch(t.tagID){case R.HTML:{Bn(e,t);break}case R.BASE:case R.BASEFONT:case R.BGSOUND:case R.LINK:case R.META:{e._appendElement(t,Te.HTML),t.ackSelfClosing=!0;break}case R.TITLE:{e._switchToTextParsing(t,ln.RCDATA);break}case R.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,ln.RAWTEXT):(e._insertElement(t,Te.HTML),e.insertionMode=te.IN_HEAD_NO_SCRIPT);break}case R.NOFRAMES:case R.STYLE:{e._switchToTextParsing(t,ln.RAWTEXT);break}case R.SCRIPT:{e._switchToTextParsing(t,ln.SCRIPT_DATA);break}case R.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=te.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(te.IN_TEMPLATE);break}case R.HEAD:{e._err(t,me.misplacedStartTagForHeadElement);break}default:tl(e,t)}}function eM(e,t){switch(t.tagID){case R.HEAD:{e.openElements.pop(),e.insertionMode=te.AFTER_HEAD;break}case R.BODY:case R.BR:case R.HTML:{tl(e,t);break}case R.TEMPLATE:{Os(e,t);break}default:e._err(t,me.endTagWithoutMatchingOpenElement)}}function Os(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==R.TEMPLATE&&e._err(t,me.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(R.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,me.endTagWithoutMatchingOpenElement)}function tl(e,t){e.openElements.pop(),e.insertionMode=te.AFTER_HEAD,e._processToken(t)}function tM(e,t){switch(t.tagID){case R.HTML:{Bn(e,t);break}case R.BASEFONT:case R.BGSOUND:case R.HEAD:case R.LINK:case R.META:case R.NOFRAMES:case R.STYLE:{Ui(e,t);break}case R.NOSCRIPT:{e._err(t,me.nestedNoscriptInHead);break}default:nl(e,t)}}function nM(e,t){switch(t.tagID){case R.NOSCRIPT:{e.openElements.pop(),e.insertionMode=te.IN_HEAD;break}case R.BR:{nl(e,t);break}default:e._err(t,me.endTagWithoutMatchingOpenElement)}}function nl(e,t){const i=t.type===ct.EOF?me.openElementsLeftAfterEof:me.disallowedContentInNoscriptInHead;e._err(t,i),e.openElements.pop(),e.insertionMode=te.IN_HEAD,e._processToken(t)}function iM(e,t){switch(t.tagID){case R.HTML:{Bn(e,t);break}case R.BODY:{e._insertElement(t,Te.HTML),e.framesetOk=!1,e.insertionMode=te.IN_BODY;break}case R.FRAMESET:{e._insertElement(t,Te.HTML),e.insertionMode=te.IN_FRAMESET;break}case R.BASE:case R.BASEFONT:case R.BGSOUND:case R.LINK:case R.META:case R.NOFRAMES:case R.SCRIPT:case R.STYLE:case R.TEMPLATE:case R.TITLE:{e._err(t,me.abandonedHeadElementChild),e.openElements.push(e.headElement,R.HEAD),Ui(e,t),e.openElements.remove(e.headElement);break}case R.HEAD:{e._err(t,me.misplacedStartTagForHeadElement);break}default:il(e,t)}}function rM(e,t){switch(t.tagID){case R.BODY:case R.HTML:case R.BR:{il(e,t);break}case R.TEMPLATE:{Os(e,t);break}default:e._err(t,me.endTagWithoutMatchingOpenElement)}}function il(e,t){e._insertFakeElement(ce.BODY,R.BODY),e.insertionMode=te.IN_BODY,Fc(e,t)}function Fc(e,t){switch(t.type){case ct.CHARACTER:{YS(e,t);break}case ct.WHITESPACE_CHARACTER:{qS(e,t);break}case ct.COMMENT:{t0(e,t);break}case ct.START_TAG:{Bn(e,t);break}case ct.END_TAG:{Pc(e,t);break}case ct.EOF:{XS(e,t);break}}}function qS(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function YS(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function sM(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function aM(e,t){const i=e.openElements.tryPeekProperlyNestedBodyElement();i&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(i,t.attrs))}function oM(e,t){const i=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&i&&(e.treeAdapter.detachNode(i),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,Te.HTML),e.insertionMode=te.IN_FRAMESET)}function lM(e,t){e.openElements.hasInButtonScope(R.P)&&e._closePElement(),e._insertElement(t,Te.HTML)}function uM(e,t){e.openElements.hasInButtonScope(R.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&e0.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,Te.HTML)}function cM(e,t){e.openElements.hasInButtonScope(R.P)&&e._closePElement(),e._insertElement(t,Te.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function hM(e,t){const i=e.openElements.tmplCount>0;(!e.formElement||i)&&(e.openElements.hasInButtonScope(R.P)&&e._closePElement(),e._insertElement(t,Te.HTML),i||(e.formElement=e.openElements.current))}function dM(e,t){e.framesetOk=!1;const i=t.tagID;for(let s=e.openElements.stackTop;s>=0;s--){const u=e.openElements.tagIDs[s];if(i===R.LI&&u===R.LI||(i===R.DD||i===R.DT)&&(u===R.DD||u===R.DT)){e.openElements.generateImpliedEndTagsWithExclusion(u),e.openElements.popUntilTagNamePopped(u);break}if(u!==R.ADDRESS&&u!==R.DIV&&u!==R.P&&e._isSpecialElement(e.openElements.items[s],u))break}e.openElements.hasInButtonScope(R.P)&&e._closePElement(),e._insertElement(t,Te.HTML)}function fM(e,t){e.openElements.hasInButtonScope(R.P)&&e._closePElement(),e._insertElement(t,Te.HTML),e.tokenizer.state=ln.PLAINTEXT}function pM(e,t){e.openElements.hasInScope(R.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(R.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,Te.HTML),e.framesetOk=!1}function gM(e,t){const i=e.activeFormattingElements.getElementEntryInScopeWithTagName(ce.A);i&&(j0(e,t),e.openElements.remove(i.element),e.activeFormattingElements.removeEntry(i)),e._reconstructActiveFormattingElements(),e._insertElement(t,Te.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function mM(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Te.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function _M(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(R.NOBR)&&(j0(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,Te.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function bM(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Te.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function EM(e,t){e.treeAdapter.getDocumentMode(e.document)!==ki.QUIRKS&&e.openElements.hasInButtonScope(R.P)&&e._closePElement(),e._insertElement(t,Te.HTML),e.framesetOk=!1,e.insertionMode=te.IN_TABLE}function GS(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,Te.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function KS(e){const t=BS(e,xs.TYPE);return t!=null&&t.toLowerCase()===FN}function vM(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,Te.HTML),KS(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function SM(e,t){e._appendElement(t,Te.HTML),t.ackSelfClosing=!0}function yM(e,t){e.openElements.hasInButtonScope(R.P)&&e._closePElement(),e._appendElement(t,Te.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function CM(e,t){t.tagName=ce.IMG,t.tagID=R.IMG,GS(e,t)}function TM(e,t){e._insertElement(t,Te.HTML),e.skipNextNewLine=!0,e.tokenizer.state=ln.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=te.TEXT}function AM(e,t){e.openElements.hasInButtonScope(R.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,ln.RAWTEXT)}function xM(e,t){e.framesetOk=!1,e._switchToTextParsing(t,ln.RAWTEXT)}function Mb(e,t){e._switchToTextParsing(t,ln.RAWTEXT)}function wM(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Te.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===te.IN_TABLE||e.insertionMode===te.IN_CAPTION||e.insertionMode===te.IN_TABLE_BODY||e.insertionMode===te.IN_ROW||e.insertionMode===te.IN_CELL?te.IN_SELECT_IN_TABLE:te.IN_SELECT}function DM(e,t){e.openElements.currentTagId===R.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,Te.HTML)}function RM(e,t){e.openElements.hasInScope(R.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,Te.HTML)}function kM(e,t){e.openElements.hasInScope(R.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(R.RTC),e._insertElement(t,Te.HTML)}function LM(e,t){e._reconstructActiveFormattingElements(),jS(t),z0(t),t.selfClosing?e._appendElement(t,Te.MATHML):e._insertElement(t,Te.MATHML),t.ackSelfClosing=!0}function OM(e,t){e._reconstructActiveFormattingElements(),$S(t),z0(t),t.selfClosing?e._appendElement(t,Te.SVG):e._insertElement(t,Te.SVG),t.ackSelfClosing=!0}function Ib(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Te.HTML)}function Bn(e,t){switch(t.tagID){case R.I:case R.S:case R.B:case R.U:case R.EM:case R.TT:case R.BIG:case R.CODE:case R.FONT:case R.SMALL:case R.STRIKE:case R.STRONG:{mM(e,t);break}case R.A:{gM(e,t);break}case R.H1:case R.H2:case R.H3:case R.H4:case R.H5:case R.H6:{uM(e,t);break}case R.P:case R.DL:case R.OL:case R.UL:case R.DIV:case R.DIR:case R.NAV:case R.MAIN:case R.MENU:case R.ASIDE:case R.CENTER:case R.FIGURE:case R.FOOTER:case R.HEADER:case R.HGROUP:case R.DIALOG:case R.DETAILS:case R.ADDRESS:case R.ARTICLE:case R.SEARCH:case R.SECTION:case R.SUMMARY:case R.FIELDSET:case R.BLOCKQUOTE:case R.FIGCAPTION:{lM(e,t);break}case R.LI:case R.DD:case R.DT:{dM(e,t);break}case R.BR:case R.IMG:case R.WBR:case R.AREA:case R.EMBED:case R.KEYGEN:{GS(e,t);break}case R.HR:{yM(e,t);break}case R.RB:case R.RTC:{RM(e,t);break}case R.RT:case R.RP:{kM(e,t);break}case R.PRE:case R.LISTING:{cM(e,t);break}case R.XMP:{AM(e,t);break}case R.SVG:{OM(e,t);break}case R.HTML:{sM(e,t);break}case R.BASE:case R.LINK:case R.META:case R.STYLE:case R.TITLE:case R.SCRIPT:case R.BGSOUND:case R.BASEFONT:case R.TEMPLATE:{Ui(e,t);break}case R.BODY:{aM(e,t);break}case R.FORM:{hM(e,t);break}case R.NOBR:{_M(e,t);break}case R.MATH:{LM(e,t);break}case R.TABLE:{EM(e,t);break}case R.INPUT:{vM(e,t);break}case R.PARAM:case R.TRACK:case R.SOURCE:{SM(e,t);break}case R.IMAGE:{CM(e,t);break}case R.BUTTON:{pM(e,t);break}case R.APPLET:case R.OBJECT:case R.MARQUEE:{bM(e,t);break}case R.IFRAME:{xM(e,t);break}case R.SELECT:{wM(e,t);break}case R.OPTION:case R.OPTGROUP:{DM(e,t);break}case R.NOEMBED:case R.NOFRAMES:{Mb(e,t);break}case R.FRAMESET:{oM(e,t);break}case R.TEXTAREA:{TM(e,t);break}case R.NOSCRIPT:{e.options.scriptingEnabled?Mb(e,t):Ib(e,t);break}case R.PLAINTEXT:{fM(e,t);break}case R.COL:case R.TH:case R.TD:case R.TR:case R.HEAD:case R.FRAME:case R.TBODY:case R.TFOOT:case R.THEAD:case R.CAPTION:case R.COLGROUP:break;default:Ib(e,t)}}function NM(e,t){if(e.openElements.hasInScope(R.BODY)&&(e.insertionMode=te.AFTER_BODY,e.options.sourceCodeLocationInfo)){const i=e.openElements.tryPeekProperlyNestedBodyElement();i&&e._setEndLocation(i,t)}}function MM(e,t){e.openElements.hasInScope(R.BODY)&&(e.insertionMode=te.AFTER_BODY,ry(e,t))}function IM(e,t){const i=t.tagID;e.openElements.hasInScope(i)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(i))}function BM(e){const t=e.openElements.tmplCount>0,{formElement:i}=e;t||(e.formElement=null),(i||t)&&e.openElements.hasInScope(R.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(R.FORM):i&&e.openElements.remove(i))}function FM(e){e.openElements.hasInButtonScope(R.P)||e._insertFakeElement(ce.P,R.P),e._closePElement()}function PM(e){e.openElements.hasInListItemScope(R.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(R.LI),e.openElements.popUntilTagNamePopped(R.LI))}function UM(e,t){const i=t.tagID;e.openElements.hasInScope(i)&&(e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i))}function HM(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function zM(e,t){const i=t.tagID;e.openElements.hasInScope(i)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(i),e.activeFormattingElements.clearToLastMarker())}function jM(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(ce.BR,R.BR),e.openElements.pop(),e.framesetOk=!1}function VS(e,t){const i=t.tagName,s=t.tagID;for(let u=e.openElements.stackTop;u>0;u--){const p=e.openElements.items[u],d=e.openElements.tagIDs[u];if(s===d&&(s!==R.UNKNOWN||e.treeAdapter.getTagName(p)===i)){e.openElements.generateImpliedEndTagsWithExclusion(s),e.openElements.stackTop>=u&&e.openElements.shortenToLength(u);break}if(e._isSpecialElement(p,d))break}}function Pc(e,t){switch(t.tagID){case R.A:case R.B:case R.I:case R.S:case R.U:case R.EM:case R.TT:case R.BIG:case R.CODE:case R.FONT:case R.NOBR:case R.SMALL:case R.STRIKE:case R.STRONG:{j0(e,t);break}case R.P:{FM(e);break}case R.DL:case R.UL:case R.OL:case R.DIR:case R.DIV:case R.NAV:case R.PRE:case R.MAIN:case R.MENU:case R.ASIDE:case R.BUTTON:case R.CENTER:case R.FIGURE:case R.FOOTER:case R.HEADER:case R.HGROUP:case R.DIALOG:case R.ADDRESS:case R.ARTICLE:case R.DETAILS:case R.SEARCH:case R.SECTION:case R.SUMMARY:case R.LISTING:case R.FIELDSET:case R.BLOCKQUOTE:case R.FIGCAPTION:{IM(e,t);break}case R.LI:{PM(e);break}case R.DD:case R.DT:{UM(e,t);break}case R.H1:case R.H2:case R.H3:case R.H4:case R.H5:case R.H6:{HM(e);break}case R.BR:{jM(e);break}case R.BODY:{NM(e,t);break}case R.HTML:{MM(e,t);break}case R.FORM:{BM(e);break}case R.APPLET:case R.OBJECT:case R.MARQUEE:{zM(e,t);break}case R.TEMPLATE:{Os(e,t);break}default:VS(e,t)}}function XS(e,t){e.tmplInsertionModeStack.length>0?iy(e,t):$0(e,t)}function $M(e,t){var i;t.tagID===R.SCRIPT&&((i=e.scriptHandler)===null||i===void 0||i.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function WM(e,t){e._err(t,me.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Rf(e,t){if(e.openElements.currentTagId!==void 0&&WS.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=te.IN_TABLE_TEXT,t.type){case ct.CHARACTER:{ZS(e,t);break}case ct.WHITESPACE_CHARACTER:{QS(e,t);break}}else Al(e,t)}function qM(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,Te.HTML),e.insertionMode=te.IN_CAPTION}function YM(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,Te.HTML),e.insertionMode=te.IN_COLUMN_GROUP}function GM(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(ce.COLGROUP,R.COLGROUP),e.insertionMode=te.IN_COLUMN_GROUP,W0(e,t)}function KM(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,Te.HTML),e.insertionMode=te.IN_TABLE_BODY}function VM(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(ce.TBODY,R.TBODY),e.insertionMode=te.IN_TABLE_BODY,Uc(e,t)}function XM(e,t){e.openElements.hasInTableScope(R.TABLE)&&(e.openElements.popUntilTagNamePopped(R.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function QM(e,t){KS(t)?e._appendElement(t,Te.HTML):Al(e,t),t.ackSelfClosing=!0}function ZM(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,Te.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function wa(e,t){switch(t.tagID){case R.TD:case R.TH:case R.TR:{VM(e,t);break}case R.STYLE:case R.SCRIPT:case R.TEMPLATE:{Ui(e,t);break}case R.COL:{GM(e,t);break}case R.FORM:{ZM(e,t);break}case R.TABLE:{XM(e,t);break}case R.TBODY:case R.TFOOT:case R.THEAD:{KM(e,t);break}case R.INPUT:{QM(e,t);break}case R.CAPTION:{qM(e,t);break}case R.COLGROUP:{YM(e,t);break}default:Al(e,t)}}function dl(e,t){switch(t.tagID){case R.TABLE:{e.openElements.hasInTableScope(R.TABLE)&&(e.openElements.popUntilTagNamePopped(R.TABLE),e._resetInsertionMode());break}case R.TEMPLATE:{Os(e,t);break}case R.BODY:case R.CAPTION:case R.COL:case R.COLGROUP:case R.HTML:case R.TBODY:case R.TD:case R.TFOOT:case R.TH:case R.THEAD:case R.TR:break;default:Al(e,t)}}function Al(e,t){const i=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Fc(e,t),e.fosterParentingEnabled=i}function QS(e,t){e.pendingCharacterTokens.push(t)}function ZS(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function jo(e,t){let i=0;if(e.hasNonWhitespacePendingCharacterToken)for(;i<e.pendingCharacterTokens.length;i++)Al(e,e.pendingCharacterTokens[i]);else for(;i<e.pendingCharacterTokens.length;i++)e._insertCharacters(e.pendingCharacterTokens[i]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const JS=new Set([R.CAPTION,R.COL,R.COLGROUP,R.TBODY,R.TD,R.TFOOT,R.TH,R.THEAD,R.TR]);function JM(e,t){const i=t.tagID;JS.has(i)?e.openElements.hasInTableScope(R.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(R.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=te.IN_TABLE,wa(e,t)):Bn(e,t)}function eI(e,t){const i=t.tagID;switch(i){case R.CAPTION:case R.TABLE:{e.openElements.hasInTableScope(R.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(R.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=te.IN_TABLE,i===R.TABLE&&dl(e,t));break}case R.BODY:case R.COL:case R.COLGROUP:case R.HTML:case R.TBODY:case R.TD:case R.TFOOT:case R.TH:case R.THEAD:case R.TR:break;default:Pc(e,t)}}function W0(e,t){switch(t.tagID){case R.HTML:{Bn(e,t);break}case R.COL:{e._appendElement(t,Te.HTML),t.ackSelfClosing=!0;break}case R.TEMPLATE:{Ui(e,t);break}default:yc(e,t)}}function tI(e,t){switch(t.tagID){case R.COLGROUP:{e.openElements.currentTagId===R.COLGROUP&&(e.openElements.pop(),e.insertionMode=te.IN_TABLE);break}case R.TEMPLATE:{Os(e,t);break}case R.COL:break;default:yc(e,t)}}function yc(e,t){e.openElements.currentTagId===R.COLGROUP&&(e.openElements.pop(),e.insertionMode=te.IN_TABLE,e._processToken(t))}function Uc(e,t){switch(t.tagID){case R.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,Te.HTML),e.insertionMode=te.IN_ROW;break}case R.TH:case R.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(ce.TR,R.TR),e.insertionMode=te.IN_ROW,Hc(e,t);break}case R.CAPTION:case R.COL:case R.COLGROUP:case R.TBODY:case R.TFOOT:case R.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=te.IN_TABLE,wa(e,t));break}default:wa(e,t)}}function n0(e,t){const i=t.tagID;switch(t.tagID){case R.TBODY:case R.TFOOT:case R.THEAD:{e.openElements.hasInTableScope(i)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=te.IN_TABLE);break}case R.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=te.IN_TABLE,dl(e,t));break}case R.BODY:case R.CAPTION:case R.COL:case R.COLGROUP:case R.HTML:case R.TD:case R.TH:case R.TR:break;default:dl(e,t)}}function Hc(e,t){switch(t.tagID){case R.TH:case R.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,Te.HTML),e.insertionMode=te.IN_CELL,e.activeFormattingElements.insertMarker();break}case R.CAPTION:case R.COL:case R.COLGROUP:case R.TBODY:case R.TFOOT:case R.THEAD:case R.TR:{e.openElements.hasInTableScope(R.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=te.IN_TABLE_BODY,Uc(e,t));break}default:wa(e,t)}}function ey(e,t){switch(t.tagID){case R.TR:{e.openElements.hasInTableScope(R.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=te.IN_TABLE_BODY);break}case R.TABLE:{e.openElements.hasInTableScope(R.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=te.IN_TABLE_BODY,n0(e,t));break}case R.TBODY:case R.TFOOT:case R.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(R.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=te.IN_TABLE_BODY,n0(e,t));break}case R.BODY:case R.CAPTION:case R.COL:case R.COLGROUP:case R.HTML:case R.TD:case R.TH:break;default:dl(e,t)}}function nI(e,t){const i=t.tagID;JS.has(i)?(e.openElements.hasInTableScope(R.TD)||e.openElements.hasInTableScope(R.TH))&&(e._closeTableCell(),Hc(e,t)):Bn(e,t)}function iI(e,t){const i=t.tagID;switch(i){case R.TD:case R.TH:{e.openElements.hasInTableScope(i)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(i),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=te.IN_ROW);break}case R.TABLE:case R.TBODY:case R.TFOOT:case R.THEAD:case R.TR:{e.openElements.hasInTableScope(i)&&(e._closeTableCell(),ey(e,t));break}case R.BODY:case R.CAPTION:case R.COL:case R.COLGROUP:case R.HTML:break;default:Pc(e,t)}}function ty(e,t){switch(t.tagID){case R.HTML:{Bn(e,t);break}case R.OPTION:{e.openElements.currentTagId===R.OPTION&&e.openElements.pop(),e._insertElement(t,Te.HTML);break}case R.OPTGROUP:{e.openElements.currentTagId===R.OPTION&&e.openElements.pop(),e.openElements.currentTagId===R.OPTGROUP&&e.openElements.pop(),e._insertElement(t,Te.HTML);break}case R.HR:{e.openElements.currentTagId===R.OPTION&&e.openElements.pop(),e.openElements.currentTagId===R.OPTGROUP&&e.openElements.pop(),e._appendElement(t,Te.HTML),t.ackSelfClosing=!0;break}case R.INPUT:case R.KEYGEN:case R.TEXTAREA:case R.SELECT:{e.openElements.hasInSelectScope(R.SELECT)&&(e.openElements.popUntilTagNamePopped(R.SELECT),e._resetInsertionMode(),t.tagID!==R.SELECT&&e._processStartTag(t));break}case R.SCRIPT:case R.TEMPLATE:{Ui(e,t);break}}}function ny(e,t){switch(t.tagID){case R.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===R.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===R.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===R.OPTGROUP&&e.openElements.pop();break}case R.OPTION:{e.openElements.currentTagId===R.OPTION&&e.openElements.pop();break}case R.SELECT:{e.openElements.hasInSelectScope(R.SELECT)&&(e.openElements.popUntilTagNamePopped(R.SELECT),e._resetInsertionMode());break}case R.TEMPLATE:{Os(e,t);break}}}function rI(e,t){const i=t.tagID;i===R.CAPTION||i===R.TABLE||i===R.TBODY||i===R.TFOOT||i===R.THEAD||i===R.TR||i===R.TD||i===R.TH?(e.openElements.popUntilTagNamePopped(R.SELECT),e._resetInsertionMode(),e._processStartTag(t)):ty(e,t)}function sI(e,t){const i=t.tagID;i===R.CAPTION||i===R.TABLE||i===R.TBODY||i===R.TFOOT||i===R.THEAD||i===R.TR||i===R.TD||i===R.TH?e.openElements.hasInTableScope(i)&&(e.openElements.popUntilTagNamePopped(R.SELECT),e._resetInsertionMode(),e.onEndTag(t)):ny(e,t)}function aI(e,t){switch(t.tagID){case R.BASE:case R.BASEFONT:case R.BGSOUND:case R.LINK:case R.META:case R.NOFRAMES:case R.SCRIPT:case R.STYLE:case R.TEMPLATE:case R.TITLE:{Ui(e,t);break}case R.CAPTION:case R.COLGROUP:case R.TBODY:case R.TFOOT:case R.THEAD:{e.tmplInsertionModeStack[0]=te.IN_TABLE,e.insertionMode=te.IN_TABLE,wa(e,t);break}case R.COL:{e.tmplInsertionModeStack[0]=te.IN_COLUMN_GROUP,e.insertionMode=te.IN_COLUMN_GROUP,W0(e,t);break}case R.TR:{e.tmplInsertionModeStack[0]=te.IN_TABLE_BODY,e.insertionMode=te.IN_TABLE_BODY,Uc(e,t);break}case R.TD:case R.TH:{e.tmplInsertionModeStack[0]=te.IN_ROW,e.insertionMode=te.IN_ROW,Hc(e,t);break}default:e.tmplInsertionModeStack[0]=te.IN_BODY,e.insertionMode=te.IN_BODY,Bn(e,t)}}function oI(e,t){t.tagID===R.TEMPLATE&&Os(e,t)}function iy(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(R.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):$0(e,t)}function lI(e,t){t.tagID===R.HTML?Bn(e,t):Cc(e,t)}function ry(e,t){var i;if(t.tagID===R.HTML){if(e.fragmentContext||(e.insertionMode=te.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===R.HTML){e._setEndLocation(e.openElements.items[0],t);const s=e.openElements.items[1];s&&!(!((i=e.treeAdapter.getNodeSourceCodeLocation(s))===null||i===void 0)&&i.endTag)&&e._setEndLocation(s,t)}}else Cc(e,t)}function Cc(e,t){e.insertionMode=te.IN_BODY,Fc(e,t)}function uI(e,t){switch(t.tagID){case R.HTML:{Bn(e,t);break}case R.FRAMESET:{e._insertElement(t,Te.HTML);break}case R.FRAME:{e._appendElement(t,Te.HTML),t.ackSelfClosing=!0;break}case R.NOFRAMES:{Ui(e,t);break}}}function cI(e,t){t.tagID===R.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==R.FRAMESET&&(e.insertionMode=te.AFTER_FRAMESET))}function hI(e,t){switch(t.tagID){case R.HTML:{Bn(e,t);break}case R.NOFRAMES:{Ui(e,t);break}}}function dI(e,t){t.tagID===R.HTML&&(e.insertionMode=te.AFTER_AFTER_FRAMESET)}function fI(e,t){t.tagID===R.HTML?Bn(e,t):cc(e,t)}function cc(e,t){e.insertionMode=te.IN_BODY,Fc(e,t)}function pI(e,t){switch(t.tagID){case R.HTML:{Bn(e,t);break}case R.NOFRAMES:{Ui(e,t);break}}}function gI(e,t){t.chars=Qt,e._insertCharacters(t)}function mI(e,t){e._insertCharacters(t),e.framesetOk=!1}function sy(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==Te.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function _I(e,t){if(ON(t))sy(e),e._startTagOutsideForeignContent(t);else{const i=e._getAdjustedCurrentElement(),s=e.treeAdapter.getNamespaceURI(i);s===Te.MATHML?jS(t):s===Te.SVG&&(NN(t),$S(t)),z0(t),t.selfClosing?e._appendElement(t,s):e._insertElement(t,s),t.ackSelfClosing=!0}}function bI(e,t){if(t.tagID===R.P||t.tagID===R.BR){sy(e),e._endTagOutsideForeignContent(t);return}for(let i=e.openElements.stackTop;i>0;i--){const s=e.openElements.items[i];if(e.treeAdapter.getNamespaceURI(s)===Te.HTML){e._endTagOutsideForeignContent(t);break}const u=e.treeAdapter.getTagName(s);if(u.toLowerCase()===t.tagName){t.tagName=u,e.openElements.shortenToLength(i);break}}}ce.AREA,ce.BASE,ce.BASEFONT,ce.BGSOUND,ce.BR,ce.COL,ce.EMBED,ce.FRAME,ce.HR,ce.IMG,ce.INPUT,ce.KEYGEN,ce.LINK,ce.META,ce.PARAM,ce.SOURCE,ce.TRACK,ce.WBR;const EI=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,vI=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Bb={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function ay(e,t){const i=kI(e),s=jv("type",{handlers:{root:SI,element:yI,text:CI,comment:ly,doctype:TI,raw:xI},unknown:wI}),u={parser:i?new Nb(Bb):Nb.getFragmentParser(void 0,Bb),handle(o){s(o,u)},stitches:!1,options:t||{}};s(e,u),Fa(u,Xi());const p=i?u.parser.document:u.parser.getFragment(),d=LO(p,{file:u.options.file});return u.stitches&&Cl(d,"comment",function(o,l,c){const g=o;if(g.value.stitch&&c&&l!==void 0){const h=c.children;return h[l]=g.value.stitch,l}}),d.type==="root"&&d.children.length===1&&d.children[0].type===e.type?d.children[0]:d}function oy(e,t){let i=-1;if(e)for(;++i<e.length;)t.handle(e[i])}function SI(e,t){oy(e.children,t)}function yI(e,t){DI(e,t),oy(e.children,t),RI(e,t)}function CI(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const i={type:ct.CHARACTER,chars:e.value,location:xl(e)};Fa(t,Xi(e)),t.parser.currentToken=i,t.parser._processToken(t.parser.currentToken)}function TI(e,t){const i={type:ct.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:xl(e)};Fa(t,Xi(e)),t.parser.currentToken=i,t.parser._processToken(t.parser.currentToken)}function AI(e,t){t.stitches=!0;const i=LI(e);if("children"in e&&"children"in i){const s=ay({type:"root",children:e.children},t.options);i.children=s.children}ly({type:"comment",value:{stitch:i}},t)}function ly(e,t){const i=e.value,s={type:ct.COMMENT,data:i,location:xl(e)};Fa(t,Xi(e)),t.parser.currentToken=s,t.parser._processToken(t.parser.currentToken)}function xI(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,uy(t,Xi(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(EI,"&lt;$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 i=t.parser.tokenizer._consume();t.parser.tokenizer._callState(i)}}function wI(e,t){const i=e;if(t.options.passThrough&&t.options.passThrough.includes(i.type))AI(i,t);else{let s="";throw vI.has(i.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 `"+i.type+"` node"+s)}}function Fa(e,t){uy(e,t);const i=e.parser.tokenizer.currentCharacterToken;i&&i.location&&(i.location.endLine=e.parser.tokenizer.preprocessor.line,i.location.endCol=e.parser.tokenizer.preprocessor.col+1,i.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=i,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=ln.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 uy(e,t){if(t&&t.offset!==void 0){const i={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=i}}function DI(e,t){const i=e.tagName.toLowerCase();if(t.parser.tokenizer.state===ln.PLAINTEXT)return;Fa(t,Xi(e));const s=t.parser.openElements.current;let u="namespaceURI"in s?s.namespaceURI:As.html;u===As.html&&i==="svg"&&(u=As.svg);const p=BO({...e,children:[]},{space:u===As.svg?"svg":"html"}),d={type:ct.START_TAG,tagName:i,tagID:Ba(i),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in p?p.attrs:[],location:xl(e)};t.parser.currentToken=d,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=i}function RI(e,t){const i=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&WO.includes(i)||t.parser.tokenizer.state===ln.PLAINTEXT)return;Fa(t,Oc(e));const s={type:ct.END_TAG,tagName:i,tagID:Ba(i),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:xl(e)};t.parser.currentToken=s,t.parser._processToken(t.parser.currentToken),i===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===ln.RCDATA||t.parser.tokenizer.state===ln.RAWTEXT||t.parser.tokenizer.state===ln.SCRIPT_DATA)&&(t.parser.tokenizer.state=ln.DATA)}function kI(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function xl(e){const t=Xi(e)||{line:void 0,column:void 0,offset:void 0},i=Oc(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:i.line,endCol:i.column,endOffset:i.offset}}function LI(e){return"children"in e?xa({...e,children:[]}):xa(e)}function OI(e){return function(t,i){return ay(t,{...e,file:i})}}const NI=/[\0-\x1F!-,\.\/:-@\[-\^`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482\u0530\u0557\u0558\u055A-\u055F\u0589-\u0590\u05BE\u05C0\u05C3\u05C6\u05C8-\u05CF\u05EB-\u05EE\u05F3-\u060F\u061B-\u061F\u066A-\u066D\u06D4\u06DD\u06DE\u06E9\u06FD\u06FE\u0700-\u070F\u074B\u074C\u07B2-\u07BF\u07F6-\u07F9\u07FB\u07FC\u07FE\u07FF\u082E-\u083F\u085C-\u085F\u086B-\u089F\u08B5\u08C8-\u08D2\u08E2\u0964\u0965\u0970\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09F2-\u09FB\u09FD\u09FF\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF0-\u0AF8\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B54\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B70\u0B72-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BF0-\u0BFF\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C7F\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0CFF\u0D0D\u0D11\u0D45\u0D49\u0D4F-\u0D53\u0D58-\u0D5E\u0D64\u0D65\u0D70-\u0D79\u0D80\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF4-\u0E00\u0E3B-\u0E3F\u0E4F\u0E5A-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F01-\u0F17\u0F1A-\u0F1F\u0F2A-\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F48\u0F6D-\u0F70\u0F85\u0F98\u0FBD-\u0FC5\u0FC7-\u0FFF\u104A-\u104F\u109E\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u1360-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16ED\u16F9-\u16FF\u170D\u1715-\u171F\u1735-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17D4-\u17D6\u17D8-\u17DB\u17DE\u17DF\u17EA-\u180A\u180E\u180F\u181A-\u181F\u1879-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u1945\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DA-\u19FF\u1A1C-\u1A1F\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1AA6\u1AA8-\u1AAF\u1AC1-\u1AFF\u1B4C-\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BF4-\u1BFF\u1C38-\u1C3F\u1C4A-\u1C4C\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CCF\u1CD3\u1CFB-\u1CFF\u1DFA\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u203E\u2041-\u2053\u2055-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u20CF\u20F1-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u215F\u2189-\u24B5\u24EA-\u2BFF\u2C2F\u2C5F\u2CE5-\u2CEA\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E00-\u2E2E\u2E30-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u3040\u3097\u3098\u309B\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\u9FFD-\u9FFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA62C-\uA63F\uA673\uA67E\uA6F2-\uA716\uA720\uA721\uA789\uA78A\uA7C0\uA7C1\uA7CB-\uA7F4\uA828-\uA82B\uA82D-\uA83F\uA874-\uA87F\uA8C6-\uA8CF\uA8DA-\uA8DF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA954-\uA95F\uA97D-\uA97F\uA9C1-\uA9CE\uA9DA-\uA9DF\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A-\uAA5F\uAA77-\uAA79\uAAC3-\uAADA\uAADE\uAADF\uAAF0\uAAF1\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABEB\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFDFF\uFE10-\uFE1F\uFE30-\uFE32\uFE35-\uFE4C\uFE50-\uFE6F\uFE75\uFEFD-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF3E\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDD3F\uDD75-\uDDFC\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEE1-\uDEFF\uDF20-\uDF2C\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE36\uDE37\uDE3B-\uDE3E\uDE40-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE7-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD28-\uDD2F\uDD3A-\uDE7F\uDEAA\uDEAD-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF51-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC47-\uDC65\uDC70-\uDC7E\uDCBB-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD40-\uDD43\uDD48-\uDD4F\uDD74\uDD75\uDD77-\uDD7F\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDFF\uDE12\uDE38-\uDE3D\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC4B-\uDC4F\uDC5A-\uDC5D\uDC62-\uDC7F\uDCC6\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDC1-\uDDD7\uDDDE-\uDDFF\uDE41-\uDE43\uDE45-\uDE4F\uDE5A-\uDE7F\uDEB9-\uDEBF\uDECA-\uDEFF\uDF1B\uDF1C\uDF2C-\uDF2F\uDF3A-\uDFFF]|\uD806[\uDC3B-\uDC9F\uDCEA-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD36\uDD39\uDD3A\uDD44-\uDD4F\uDD5A-\uDD9F\uDDA8\uDDA9\uDDD8\uDDD9\uDDE2\uDDE5-\uDDFF\uDE3F-\uDE46\uDE48-\uDE4F\uDE9A-\uDE9C\uDE9E-\uDEBF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC37\uDC41-\uDC4F\uDC5A-\uDC71\uDC90\uDC91\uDCA8\uDCB7-\uDCFF\uDD07\uDD0A\uDD37-\uDD39\uDD3B\uDD3E\uDD48-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8F\uDD92\uDD99-\uDD9F\uDDAA-\uDEDF\uDEF7-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80B\uD80E-\uD810\uD812-\uD819\uD824-\uD82B\uD82D\uD82E\uD830-\uD833\uD837\uD839\uD83D\uD83F\uD87B-\uD87D\uD87F\uD885-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDECF\uDEEE\uDEEF\uDEF5-\uDEFF\uDF37-\uDF3F\uDF44-\uDF4F\uDF5A-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4E\uDF88-\uDF8E\uDFA0-\uDFDF\uDFE2\uDFE5-\uDFEF\uDFF2-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82C[\uDD1F-\uDD4F\uDD53-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDC9C\uDC9F-\uDFFF]|\uD834[\uDC00-\uDD64\uDD6A-\uDD6C\uDD73-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDE41\uDE45-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC\uDFCD]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDCFF\uDD2D-\uDD2F\uDD3E\uDD3F\uDD4A-\uDD4D\uDD4F-\uDEBF\uDEFA-\uDFFF]|\uD83A[\uDCC5-\uDCCF\uDCD7-\uDCFF\uDD4C-\uDD4F\uDD5A-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD83C[\uDC00-\uDD2F\uDD4A-\uDD4F\uDD6A-\uDD6F\uDD8A-\uDFFF]|\uD83E[\uDC00-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEDE-\uDEFF]|\uD86D[\uDF35-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]/g,MI=Object.hasOwnProperty;class cy{constructor(){this.occurrences,this.reset()}slug(t,i){const s=this;let u=II(t,i===!0);const p=u;for(;MI.call(s.occurrences,u);)s.occurrences[p]++,u=p+"-"+s.occurrences[p];return s.occurrences[u]=0,u}reset(){this.occurrences=Object.create(null)}}function II(e,t){return typeof e!="string"?"":(t||(e=e.toLowerCase()),e.replace(NI,"").replace(/ /g,"-"))}function BI({src:e,alt:t,isOpen:i,onClose:s}){const[u,p]=B.useState(1),[d,o]=B.useState({x:0,y:0}),[l,c]=B.useState(!1),[g,h]=B.useState({x:0,y:0}),[b,y]=B.useState(0);B.useEffect(()=>{i&&(p(1),o({x:0,y:0}))},[i]);const T=B.useCallback(()=>{p(1),o({x:0,y:0}),s()},[s]),E=B.useCallback((F,I)=>{c(!0),h({x:F-d.x,y:I-d.y})},[d]),m=B.useCallback((F,I)=>{if(!l)return;const z=F-g.x,W=I-g.y;o({x:z,y:W})},[l,g]),_=B.useCallback(()=>{if(!l)return;c(!1),Math.sqrt(d.x**2+d.y**2)>100?T():o({x:0,y:0})},[l,d,T]),v=B.useCallback(()=>{u===1?p(2):(p(1),o({x:0,y:0}))},[u]),S=B.useCallback(()=>{const F=Date.now();F-b<300&&v(),y(F)},[b,v]),x=B.useCallback(F=>{const I=F.touches[0];E(I.clientX,I.clientY)},[E]),k=B.useCallback(F=>{const I=F.touches[0];m(I.clientX,I.clientY)},[m]),A=B.useCallback(()=>{_()},[_]),O=B.useCallback(F=>{F.preventDefault(),E(F.clientX,F.clientY)},[E]),D=B.useCallback(F=>{m(F.clientX,F.clientY)},[m]),N=B.useCallback(()=>{_()},[_]),L=B.useCallback(()=>{l&&_()},[l,_]);return B.useEffect(()=>{if(i){const F=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=F}}},[i]),B.useEffect(()=>{const F=I=>{I.key==="Escape"&&i&&T()};return window.addEventListener("keydown",F),()=>window.removeEventListener("keydown",F)},[i,T]),i?X.jsxs("div",{style:Ts.overlay,onClick:T,role:"dialog","aria-modal":"true","aria-label":"Image preview","data-testid":"image-preview--modal",children:[X.jsx("button",{style:Ts.closeButton,onClick:T,"aria-label":"Close preview","data-testid":"image-preview--close",children:"×"}),X.jsx("div",{style:{...Ts.imageContainer,cursor:l?"grabbing":"grab"},onClick:F=>F.stopPropagation(),onTouchStart:x,onTouchMove:k,onTouchEnd:A,onMouseDown:O,onMouseMove:D,onMouseUp:N,onMouseLeave:L,onClickCapture:S,children:X.jsx("img",{src:e,alt:t||"Preview",style:{...Ts.image,transform:`translate(${d.x}px, ${d.y}px) scale(${u})`,transition:l?"none":"transform 0.2s ease-out"},"data-testid":"image-preview--image"})}),t&&X.jsx("div",{style:Ts.footer,"data-testid":"image-preview--footer",children:X.jsx("span",{style:Ts.altText,children:t})}),X.jsx("div",{style:Ts.hint,"data-testid":"image-preview--hint",children:"双击缩放 · 拖拽关闭"})]}):null}const Ts={overlay:{position:"fixed",inset:0,background:"rgba(0, 0, 0, 0.95)",zIndex:1e3,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",paddingTop:"env(safe-area-inset-top)",paddingBottom:"env(safe-area-inset-bottom)",paddingLeft:"env(safe-area-inset-left)",paddingRight:"env(safe-area-inset-right)"},closeButton:{position:"absolute",top:"calc(env(safe-area-inset-top) + 1rem)",right:"1rem",width:"44px",height:"44px",borderRadius:"50%",background:"rgba(255, 255, 255, 0.2)",border:"none",color:"white",fontSize:"1.5rem",lineHeight:1,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1001,backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)"},imageContainer:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",overflow:"hidden",touchAction:"none"},image:{maxWidth:"100%",maxHeight:"100%",objectFit:"contain",userSelect:"none",WebkitUserSelect:"none",WebkitTouchCallout:"none"},footer:{position:"absolute",bottom:"calc(env(safe-area-inset-bottom) + 1rem)",left:"1rem",right:"1rem",padding:"0.75rem 1rem",background:"rgba(0, 0, 0, 0.7)",borderRadius:"0.5rem",textAlign:"center"},altText:{color:"white",fontSize:"0.875rem",lineHeight:1.5},hint:{position:"absolute",bottom:"calc(env(safe-area-inset-bottom) + 4rem)",padding:"0.5rem 1rem",background:"rgba(255, 255, 255, 0.1)",borderRadius:"1rem",color:"rgba(255, 255, 255, 0.7)",fontSize:"0.75rem",pointerEvents:"none"}};function i0(e){return typeof e=="string"?e:typeof e=="number"?String(e):Array.isArray(e)?e.map(i0).join(""):e&&typeof e=="object"&&"props"in e?i0(e.props.children):""}function FI(e){const t=[],i=new cy,s=e.split(`
188
- `);let u=!1;for(const p of s){if(p.trimStart().startsWith("```")||p.trimStart().startsWith("~~~")){u=!u;continue}if(u)continue;const d=p.match(/^(#{1,6})\s+(.+)$/);if(d){const o=d[1].length,c=d[2].trim().replace(/\*\*(.+?)\*\*/g,"$1").replace(/__(.+?)__/g,"$1").replace(/\*(.+?)\*/g,"$1").replace(/_(.+?)_/g,"$1").replace(/~~(.+?)~~/g,"$1").replace(/`(.+?)`/g,"$1").replace(/<[^>]+>/g,""),g=i.slug(c);t.push({level:o,text:c,id:g})}}return t}function Fb(e){let t=e;try{let i=decodeURIComponent(e);for(;i!==t;)t=i,i=decodeURIComponent(i)}catch{}return t}function PI(e,t){if(!e)return"";if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith("data:"))return e;if(t){let i;e.startsWith("/")?i=e:i=t.endsWith("/")?t+e:`${t}/${e}`,i=UI(i);const s=Fb(i);return`/api/file/asset?path=${encodeURIComponent(s)}`}if(e.startsWith("/")){const i=Fb(e);return`/api/file/asset?path=${encodeURIComponent(i)}`}return e}function UI(e){const t=e.split("/"),i=[];for(const s of t)s===".."?i.pop():s!=="."&&s!==""&&i.push(s);return"/"+i.join("/")}function HI(e){try{return new URL(e).pathname.split("/").pop()||"image"}catch{return"image"}}function zI({content:e,onHeadingClick:t,baseDir:i}){const s=new cy,[u,p]=B.useState(null),d=g=>({children:h,...b})=>{const y=i0(h),T=s.slug(y);return X.jsx(g,{id:T,...b,children:h})},o=B.useCallback((g,h)=>{p({src:g,alt:h})},[]),l=B.useCallback(()=>{p(null)},[]),c=({src:g,alt:h,...b})=>{const y=PI(g||"",i),T=h||HI(y);return X.jsx("img",{src:y,alt:T,loading:"lazy",onClick:()=>o(y,T),onError:E=>{const m=E.currentTarget;m.style.opacity="0.5",m.style.filter="grayscale(100%)"},style:{maxWidth:"100%",height:"auto",borderRadius:"0.5rem",cursor:"pointer",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.1)"},...b})};return X.jsxs("div",{className:"markdown-body",children:[X.jsx(b6,{remarkPlugins:[LL],rehypePlugins:[EO,OI],components:{h1:d("h1"),h2:d("h2"),h3:d("h3"),h4:d("h4"),h5:d("h5"),h6:d("h6"),img:c,a:({href:g,children:h,...b})=>g!=null&&g.startsWith("#")&&t?X.jsx("a",{href:g,onClick:y=>{y.preventDefault(),t(g.slice(1))},...b,children:h}):g!=null&&g.startsWith("http")?X.jsx("a",{href:g,target:"_blank",rel:"noopener noreferrer",...b,children:h}):X.jsx("a",{href:g,...b,children:h})},children:e}),X.jsx(BI,{src:(u==null?void 0:u.src)||"",alt:u==null?void 0:u.alt,isOpen:!!u,onClose:l})]})}const Sa=44,hy="toc-button-position",jI={right:16,bottom:80};function $I(){try{const e=localStorage.getItem(hy);if(e){const t=JSON.parse(e);if(typeof t.right=="number"&&typeof t.bottom=="number")return t}}catch{}return jI}function WI(e){try{localStorage.setItem(hy,JSON.stringify(e))}catch{}}function qI({headings:e,onHeadingClick:t,activeId:i}){const[s,u]=B.useState(!1),[p,d]=B.useState($I),[o,l]=B.useState(!1),[c,g]=B.useState(!1),h=B.useRef({x:0,y:0,right:0,bottom:0}),b=B.useRef(!1),y=B.useCallback((L,F)=>{g(!0),b.current=!1,h.current={x:L,y:F,right:p.right,bottom:p.bottom}},[p.right,p.bottom]),T=B.useCallback((L,F)=>{if(!c)return;const I=L-h.current.x,z=F-h.current.y;if(Math.sqrt(I*I+z*z)>10&&!b.current&&(b.current=!0,l(!0)),b.current){const q=Math.max(0,h.current.right-I),Y=Math.max(0,h.current.bottom-z),K=window.innerWidth-Sa,Q=window.innerHeight-Sa;d({right:Math.min(q,K),bottom:Math.min(Y,Q)})}},[c]),E=B.useCallback(()=>{g(!1),l(!1),b.current?WI(p):u(!0),b.current=!1},[p]),m=B.useCallback(L=>{const F=L.touches[0];y(F.clientX,F.clientY)},[y]),_=B.useCallback(L=>{const F=L.touches[0];T(F.clientX,F.clientY)},[T]),v=B.useCallback(L=>{L.preventDefault(),E()},[E]),S=B.useCallback(L=>{L.preventDefault(),y(L.clientX,L.clientY)},[y]),x=B.useCallback(L=>{T(L.clientX,L.clientY)},[T]),k=B.useCallback(()=>{E()},[E]),A=B.useCallback(()=>{c&&E()},[c,E]);if(B.useEffect(()=>{const L=()=>{const F=window.innerWidth-Sa,I=window.innerHeight-Sa;d(z=>({right:Math.min(z.right,F),bottom:Math.min(z.bottom,I)}))};return window.addEventListener("resize",L),()=>window.removeEventListener("resize",L)},[]),e.length===0)return null;const O=L=>{t(L),u(!1)},[D,N]=B.useState(!1);return B.useEffect(()=>{const L=window.matchMedia("(prefers-reduced-motion: reduce)");N(L.matches);const F=I=>{N(I.matches)};return L.addEventListener("change",F),()=>L.removeEventListener("change",F)},[]),X.jsxs(X.Fragment,{children:[X.jsx("button",{className:"toc-fab","data-testid":"toc--button--fab",onTouchStart:m,onTouchMove:_,onTouchEnd:v,onMouseDown:S,onMouseMove:x,onMouseUp:k,onMouseLeave:A,style:{...kn.fab,right:p.right,bottom:p.bottom,cursor:o?"grabbing":"grab",boxShadow:c?"0 2px 8px rgba(0, 0, 0, 0.5)":"0 4px 12px rgba(0, 0, 0, 0.4)",transform:c?"scale(0.95)":"scale(1)",transition:o||D?"none":"transform 0.1s ease, box-shadow 0.1s ease",background:"linear-gradient(135deg, #21262d 0%, #161b22 100%)",border:"1px solid var(--border-color)",touchAction:"none"},"aria-label":"Table of contents",children:X.jsx("span",{style:kn.fabIcon,children:"📑"})}),s&&X.jsx("div",{style:kn.overlay,onClick:()=>u(!1),"data-testid":"toc--overlay"}),X.jsxs("nav",{className:"toc-drawer",style:{...kn.drawer,...s?kn.drawerOpen:{},transition:D?"none":"transform 0.3s ease-out"},"data-testid":"toc--drawer",children:[X.jsxs("div",{style:kn.drawerHeader,children:[X.jsx("span",{children:"目录"}),X.jsx("button",{style:kn.closeButton,onClick:()=>u(!1),"data-testid":"toc--button--close",children:"×"})]}),X.jsx("ul",{style:kn.list,"data-testid":"toc--list",children:e.map(L=>X.jsx("li",{style:{...kn.item,...i===L.id?kn.itemActive:{},paddingLeft:`${(L.level-1)*12+12}px`},children:X.jsx("button",{style:kn.link,onClick:()=>O(L.id),"data-testid":`toc--item--${L.id}`,children:L.text})},L.id))})]}),X.jsxs("nav",{className:"toc-sidebar",style:kn.sidebar,"data-testid":"toc--sidebar",children:[X.jsx("div",{style:kn.sidebarHeader,children:"目录"}),X.jsx("ul",{style:kn.list,children:e.map(L=>X.jsx("li",{style:{...kn.item,...i===L.id?kn.itemActive:{},paddingLeft:`${(L.level-1)*8+8}px`},children:X.jsx("button",{style:kn.link,onClick:()=>O(L.id),children:L.text})},`sidebar-${L.id}`))})]})]})}const kn={fab:{position:"fixed",width:Sa,height:Sa,borderRadius:"50%",border:"none",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"1.25rem",zIndex:100,userSelect:"none",WebkitUserSelect:"none"},fabIcon:{fontSize:20,lineHeight:1,filter:"drop-shadow(0 1px 2px rgba(0,0,0,0.5))",display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%"},overlay:{position:"fixed",inset:0,background:"rgba(0, 0, 0, 0.5)",zIndex:200},drawer:{position:"fixed",bottom:0,left:0,right:0,maxHeight:"60vh",background:"var(--bg-primary)",borderTopLeftRadius:"1rem",borderTopRightRadius:"1rem",transform:"translateY(100%)",transition:"transform 0.3s ease-out",zIndex:201,overflow:"auto",overscrollBehavior:"contain",display:"none"},drawerOpen:{transform:"translateY(0)"},drawerHeader:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"1rem",borderBottom:"1px solid var(--border-color)",fontWeight:600},closeButton:{background:"none",border:"none",color:"var(--text-secondary)",fontSize:"1.5rem",cursor:"pointer",padding:0,lineHeight:1},sidebar:{display:"none",position:"fixed",top:"4rem",right:0,width:"240px",maxHeight:"calc(100vh - 4rem)",padding:"1rem",overflow:"auto",borderLeft:"1px solid var(--border-color)",background:"var(--bg-primary)"},sidebarHeader:{fontWeight:600,marginBottom:"0.75rem",color:"var(--text-secondary)",fontSize:"0.875rem"},list:{listStyle:"none",margin:0,padding:0},item:{margin:0},itemActive:{background:"var(--bg-secondary)"},link:{display:"block",width:"100%",padding:"0.5rem 0.75rem",background:"none",border:"none",color:"var(--text-primary)",textAlign:"left",cursor:"pointer",fontSize:"0.875rem",borderRadius:"0.25rem"}};function YI(){const[e]=XT(),t=e.get("path"),i=e.get("instanceId"),[s,u]=B.useState(null),[p,d]=B.useState(null),[o,l]=B.useState(!0),[c,g]=B.useState();B.useEffect(()=>{if(!t){d("No file path specified"),l(!1);return}l(!0),d(null),Nw(t,{instanceId:i??void 0}).then(T=>{u(T),l(!1)}).catch(T=>{d(T.message||"Failed to load file"),l(!1)})},[t,i]),B.useEffect(()=>(s!=null&&s.filename&&(document.title=`${s.filename} - Markdown Viewer`),()=>{document.title="Claude Remote"}),[s==null?void 0:s.filename]);const h=B.useCallback(T=>{const E=document.getElementById(T);E&&(E.scrollIntoView({behavior:"smooth",block:"start"}),g(T))},[]),b=s?FI(s.content):[];if(o)return X.jsx("div",{style:zn.container,"data-testid":"viewer--page",children:X.jsx("div",{style:zn.loading,"data-testid":"viewer--loading",children:"Loading..."})});if(p)return X.jsx("div",{style:zn.container,"data-testid":"viewer--page",children:X.jsxs("div",{style:zn.error,"data-testid":"viewer--error",children:[X.jsx("h2",{children:"Error"}),X.jsx("p",{children:p}),X.jsx(Yo,{to:"/",style:zn.backLink,"data-testid":"viewer--link--back",children:"← Back to Console"})]})});if(!s)return X.jsx("div",{style:zn.container,"data-testid":"viewer--page",children:X.jsxs("div",{style:zn.error,"data-testid":"viewer--error",children:[X.jsx("h2",{children:"File not found"}),X.jsx(Yo,{to:"/",style:zn.backLink,"data-testid":"viewer--link--back",children:"← Back to Console"})]})});const y=s?s.path.substring(0,s.path.lastIndexOf("/")+1):void 0;return X.jsxs("div",{style:zn.container,"data-testid":"viewer--page",children:[X.jsxs("header",{style:zn.header,"data-testid":"viewer--header",children:[X.jsxs("div",{style:zn.headerRow,children:[X.jsx(Yo,{to:"/",style:zn.backLink,"data-testid":"viewer--link--back",children:"← Back"}),X.jsx("h1",{style:zn.title,"data-testid":"viewer--title",children:s.filename})]}),X.jsx("span",{style:zn.path,"data-testid":"viewer--path",children:s.path})]}),X.jsx("main",{style:zn.content,className:"viewer-content","data-testid":"viewer--content",children:X.jsx(zI,{content:s.content,onHeadingClick:h,baseDir:y})}),X.jsx(qI,{headings:b,onHeadingClick:h,activeId:c})]})}const zn={container:{position:"fixed",top:0,left:0,right:0,bottom:0,overflowY:"auto",WebkitOverflowScrolling:"touch",background:"var(--bg-primary)",color:"var(--text-primary)"},header:{padding:"1rem",paddingTop:"calc(var(--safe-top) + 1rem)",borderBottom:"1px solid var(--border-color)",display:"flex",flexDirection:"column",gap:"0.25rem",position:"sticky",top:0,background:"var(--bg-primary)",zIndex:10},headerRow:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:"0.5rem"},title:{fontSize:"1.125rem",margin:0,flex:1,textAlign:"right"},path:{fontSize:"0.875rem",color:"var(--text-secondary)",wordBreak:"break-all"},content:{padding:"1rem",maxWidth:"900px",overflowX:"hidden"},loading:{display:"flex",alignItems:"center",justifyContent:"center",height:"100vh"},error:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100vh",textAlign:"center"},backLink:{color:"var(--accent-color)",textDecoration:"none"}},Pb=[{id:"add-instance",target:'button[aria-label="Create new instance"]',title:"Start Here",description:"Tap + to create a new Claude Code session. Each instance runs independently.",tooltipPosition:"bottom",spotlightPadding:4,spotlightRadius:16},{id:"instance-tabs",target:'[data-testid="instance--tabs"]',title:"Switch Sessions",description:"Tap any tab to switch between different Claude sessions.",tooltipPosition:"bottom",spotlightPadding:4,spotlightRadius:8},{id:"clone-instance",target:'[data-testid="instance--tab"], [data-testid="instance--tab--active"]',title:"Clone Sessions",description:"Long press a tab to clone it with all settings. Perfect for backup or testing.",tooltipPosition:"bottom",spotlightPadding:4,spotlightRadius:8},{id:"shortcut-bar",target:'[data-testid="console--shortcut-bar"]',title:"Quick Keys",description:"Send Ctrl+C, Tab, Enter etc. instantly without typing.",tooltipPosition:"top",spotlightPadding:4,spotlightRadius:8},{id:"command-buttons",target:'[data-testid="console--command-buttons"]',title:"One-Tap Commands",description:"Run preset commands with a single tap.",tooltipPosition:"top",spotlightPadding:4,spotlightRadius:8},{id:"input-bar",target:'[data-testid="console--input--command"]',title:"Chat with Claude",description:"Type your message or command here. Claude Code will respond in real-time.",tooltipPosition:"top",spotlightPadding:4,spotlightRadius:8},{id:"settings-button",target:'button[aria-label="Settings"]',title:"Customize",description:"Adjust shortcuts, commands, and preferences.",tooltipPosition:"bottom",spotlightPadding:4,spotlightRadius:16},{id:"floating-doc-button",target:'[data-testid="floating-doc-button"]',title:"View Documents",description:"Tap to browse project docs and help files. Long press to hide.",tooltipPosition:"bottom",spotlightPadding:4,spotlightRadius:22}],Ub="claude_remote_spotlight_done";function GI(){const[e,t]=B.useState(!1),[i,s]=B.useState(0),[u,p]=B.useState(null),[d,o]=B.useState(!0),l=B.useRef(null),c=Pb[i]??null,g=Pb.length,h=B.useCallback(_=>{const v=document.querySelector(_.target);if(!v)return null;const S=v.getBoundingClientRect(),x=document.querySelector('[data-testid="console--page"]'),k=x?window.getComputedStyle(x):null,A=k==null?void 0:k.transform;let O=0;if(A&&A!=="none"){const D=A.match(/matrix\([^,]+,[^,]+,[^,]+,[^,]+,[^,]+,([^)]+)\)/);D&&(O=parseFloat(D[1]))}return{left:S.left,top:S.top-O,width:S.width,height:S.height}},[]),b=B.useCallback(()=>{if(!c)return;const _=h(c);p(_)},[c,h]);B.useEffect(()=>{localStorage.getItem(Ub)||t(!0)},[]),B.useEffect(()=>{if(!e||!c)return;const _=document.querySelector(c.target);_&&_.scrollIntoView({behavior:"smooth",block:"center"});const v=setTimeout(()=>{const S=h(c);S?(p(S),o(!1)):i<g-1?s(i+1):y()},100);return()=>clearTimeout(v)},[e,i,c,h,g]),B.useEffect(()=>{if(!e||!c)return;const _=document.querySelector(c.target);if(!_)return;const v=_.style.outline,S=_.style.outlineOffset,x=_.style.position,k=_.style.zIndex;return _.style.outline="2px solid var(--status-running)",_.style.outlineOffset="2px",window.getComputedStyle(_).position==="static"&&(_.style.position="relative"),_.style.zIndex="2001",()=>{_.style.outline=v,_.style.outlineOffset=S,_.style.position=x,_.style.zIndex=k}},[e,c]),B.useEffect(()=>{if(!e)return;const _=()=>{l.current&&clearTimeout(l.current),l.current=window.setTimeout(()=>{b()},100)};return window.addEventListener("resize",_),window.visualViewport&&window.visualViewport.addEventListener("resize",_),()=>{window.removeEventListener("resize",_),window.visualViewport&&window.visualViewport.removeEventListener("resize",_),l.current&&clearTimeout(l.current)}},[e,b]);const y=B.useCallback(()=>{localStorage.setItem(Ub,"true"),t(!1),o(!0),p(null)},[]),T=B.useCallback(()=>{i<g-1?s(i+1):y()},[i,g,y]),E=B.useCallback(()=>{i>0&&s(i-1)},[i]),m=B.useCallback(()=>{y()},[y]);return{visible:e,currentStep:i,totalSteps:g,step:c,targetRect:u,isLoading:d,handleNext:T,handlePrev:E,handleSkip:m,recalculate:b}}const dy=B.createContext(null);function KI({children:e}){const t=GI();return X.jsx(dy.Provider,{value:t,children:e})}function VI(){const e=B.useContext(dy);if(!e)throw new Error("useSpotlightContext must be used within a SpotlightProvider");return e}function XI(){const{visible:e,currentStep:t,totalSteps:i,step:s,targetRect:u,isLoading:p,handleNext:d,handlePrev:o,handleSkip:l}=VI(),c=B.useRef(null),g=B.useRef(null),h=B.useCallback(I=>{switch(I.key){case"ArrowRight":case"ArrowDown":I.preventDefault(),d();break;case"ArrowLeft":case"ArrowUp":I.preventDefault(),o();break;case"Escape":I.preventDefault(),l();break;case"Enter":case" ":I.preventDefault(),d();break}},[d,o,l]);if(B.useEffect(()=>{if(e){g.current=document.activeElement;const I=setTimeout(()=>{var z;(z=c.current)==null||z.focus()},100);return()=>clearTimeout(I)}else g.current&&g.current.focus()},[e]),!e||!s||!u)return null;const b=s.spotlightPadding??4;s.spotlightRadius;const y=t===i-1,T=t===0,E=u.left-b,m=u.top-b,_=u.width+b*2,v=u.height+b*2,S=180,x=m,k=window.innerHeight-(m+v);let A=s.tooltipPosition;s.tooltipPosition==="bottom"&&k<S&&x>=S?A="top":s.tooltipPosition==="top"&&x<S&&k>=S&&(A="bottom");const O=A==="bottom"?m+v+12:m-12,D=Math.min(O,window.innerHeight-S-16),N=280,L=Math.max(16,Math.min(window.innerWidth-N-16,E)),F=typeof window<"u"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;return X.jsxs("div",{ref:c,"data-testid":"spotlight--dialog",role:"dialog","aria-modal":"true","aria-label":`Guide step ${t+1} of ${i}: ${s.title}`,tabIndex:-1,onKeyDown:h,style:{position:"fixed",top:0,left:0,right:0,bottom:0,zIndex:2e3,cursor:"pointer",WebkitTapHighlightColor:"transparent"},onClick:I=>{I.target.closest("[data-spotlight-tooltip]")||d()},children:[X.jsx("div",{style:{position:"absolute",inset:0,boxShadow:"0 0 0 9999px rgba(0, 0, 0, 0.75)",pointerEvents:"none"}}),X.jsxs("div",{"data-spotlight-tooltip":!0,"data-testid":"spotlight--tooltip",style:{position:"absolute",left:L,top:Math.max(16,D),transform:A==="top"?"translateY(-100%)":"none",maxWidth:N,padding:"12px 16px",borderRadius:12,background:"var(--bg-secondary)",boxShadow:"0 4px 24px rgba(0, 0, 0, 0.3)",pointerEvents:"auto",animation:F?"none":"spotlight-tooltip-enter 0.3s ease-out"},children:[X.jsx("div",{style:{position:"absolute",left:Math.max(16,Math.min(N-28,E+_/2-L-6)),[A==="top"?"bottom":"top"]:-6,width:12,height:12,background:"var(--bg-secondary)",transform:A==="top"?"translateY(50%) rotate(45deg)":"translateY(-50%) rotate(45deg)"}}),X.jsxs("div",{style:{position:"relative",zIndex:1},children:[X.jsx("div",{"data-testid":"spotlight--title",style:{fontSize:16,fontWeight:600,marginBottom:4,color:"var(--text-primary)"},children:s.title}),X.jsx("div",{"data-testid":"spotlight--description",style:{fontSize:13,lineHeight:1.5,color:"var(--text-secondary)"},children:s.description}),X.jsxs("div",{style:{marginTop:12,display:"flex",flexDirection:"column",gap:12,alignItems:"center"},children:[X.jsx("div",{"data-testid":"spotlight--dots",style:{display:"flex",gap:6},children:Array.from({length:i}).map((I,z)=>X.jsx("div",{style:{width:6,height:6,borderRadius:"50%",background:z===t?"var(--status-running)":z<t?"var(--status-idle)":"var(--border-color)"}},z))}),X.jsxs("div",{style:{display:"flex",gap:8},children:[X.jsx("button",{"data-testid":"spotlight--button--skip",onClick:I=>{I.stopPropagation(),l()},style:{padding:"6px 12px",borderRadius:6,border:"none",background:"transparent",color:"var(--text-muted)",fontSize:13,cursor:"pointer"},children:"Skip"}),!T&&X.jsx("button",{"data-testid":"spotlight--button--prev",onClick:I=>{I.stopPropagation(),o()},style:{padding:"6px 14px",borderRadius:6,border:"1px solid var(--border-color)",background:"var(--bg-tertiary)",color:"var(--text-primary)",fontSize:13,cursor:"pointer"},children:"Prev"}),X.jsx("button",{"data-testid":"spotlight--button--next",onClick:I=>{I.stopPropagation(),d()},style:{padding:"6px 16px",borderRadius:6,border:"none",background:"var(--status-running)",color:"#fff",fontSize:13,fontWeight:600,cursor:"pointer"},children:y?"Done":"Next"})]})]})]})]}),X.jsx("style",{children:`
189
- @keyframes spotlight-tooltip-enter {
190
- from {
191
- opacity: 0;
192
- transform: translateY(8px);
193
- }
194
- to {
195
- opacity: 1;
196
- transform: translateY(0);
197
- }
198
- }
199
- `})]})}function QI(){const t=new URLSearchParams(window.location.search).get("token");if(t){const i=window.location.pathname+window.location.hash;window.history.replaceState({},"",i)}return t}function ZI(){const e=bt(p=>p.isAuthenticated),t=bt(p=>p.isCheckingAuth),i=bt(p=>p.setAuthenticated),s=bt(p=>p.setCheckingAuth),u=bt(p=>p.setCachedToken);return B.useEffect(()=>{const p=QI();if(p){Ki(p).then(d=>{d?(i(!0),u(p),uE(p)):(sessionStorage.setItem("prefill_token",p),s(!1))}).catch(()=>{sessionStorage.setItem("prefill_token",p),s(!1)});return}sA().then(()=>{i(!0);const d=Ds();d&&u(d)}).catch(async()=>{const d=Ds();if(d)try{if(await Ki(d)){i(!0),u(d);return}}catch{}s(!1),cE(),u(null)})},[i,s,u]),t?X.jsx("div",{style:{height:"100%",display:"flex",alignItems:"center",justifyContent:"center",background:"var(--bg-primary)",color:"var(--text-secondary)"},children:"Checking session…"}):e?X.jsxs(vT,{children:[X.jsx(Lf,{path:"/viewer",element:X.jsx(YI,{})}),X.jsx(Lf,{path:"/*",element:X.jsxs(KI,{children:[X.jsx(h3,{}),X.jsx(XI,{})]})})]}):X.jsx(uA,{})}C2.createRoot(document.getElementById("root")).render(X.jsx(B.StrictMode,{children:X.jsx(qT,{children:X.jsx(ZI,{})})}));