@amd-gaia/agent-ui 0.17.1 → 0.17.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,437 @@
1
+ (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var eu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Bu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var H0={exports:{}},ju={},z0={exports:{}},ke={};/**
2
+ * @license React
3
+ * react.production.min.js
4
+ *
5
+ * Copyright (c) Facebook, Inc. and its 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 Xs=Symbol.for("react.element"),RE=Symbol.for("react.portal"),OE=Symbol.for("react.fragment"),PE=Symbol.for("react.strict_mode"),ME=Symbol.for("react.profiler"),FE=Symbol.for("react.provider"),BE=Symbol.for("react.context"),jE=Symbol.for("react.forward_ref"),UE=Symbol.for("react.suspense"),HE=Symbol.for("react.memo"),zE=Symbol.for("react.lazy"),rf=Symbol.iterator;function $E(e){return e===null||typeof e!="object"?null:(e=rf&&e[rf]||e["@@iterator"],typeof e=="function"?e:null)}var $0={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Y0=Object.assign,V0={};function Pi(e,t,n){this.props=e,this.context=t,this.refs=V0,this.updater=n||$0}Pi.prototype.isReactComponent={};Pi.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Pi.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function W0(){}W0.prototype=Pi.prototype;function Nc(e,t,n){this.props=e,this.context=t,this.refs=V0,this.updater=n||$0}var Ac=Nc.prototype=new W0;Ac.constructor=Nc;Y0(Ac,Pi.prototype);Ac.isPureReactComponent=!0;var sf=Array.isArray,q0=Object.prototype.hasOwnProperty,vc={current:null},Q0={key:!0,ref:!0,__self:!0,__source:!0};function G0(e,t,n){var r,i={},s=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(s=""+t.key),t)q0.call(t,r)&&!Q0.hasOwnProperty(r)&&(i[r]=t[r]);var u=arguments.length-2;if(u===1)i.children=n;else if(1<u){for(var l=Array(u),d=0;d<u;d++)l[d]=arguments[d+2];i.children=l}if(e&&e.defaultProps)for(r in u=e.defaultProps,u)i[r]===void 0&&(i[r]=u[r]);return{$$typeof:Xs,type:e,key:s,ref:a,props:i,_owner:vc.current}}function YE(e,t){return{$$typeof:Xs,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function wc(e){return typeof e=="object"&&e!==null&&e.$$typeof===Xs}function VE(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var af=/\/+/g;function yl(e,t){return typeof e=="object"&&e!==null&&e.key!=null?VE(""+e.key):t.toString(36)}function Fa(e,t,n,r,i){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(s){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case Xs:case RE:a=!0}}if(a)return a=e,i=i(a),e=r===""?"."+yl(a,0):r,sf(i)?(n="",e!=null&&(n=e.replace(af,"$&/")+"/"),Fa(i,t,n,"",function(d){return d})):i!=null&&(wc(i)&&(i=YE(i,n+(!i.key||a&&a.key===i.key?"":(""+i.key).replace(af,"$&/")+"/")+e)),t.push(i)),1;if(a=0,r=r===""?".":r+":",sf(e))for(var u=0;u<e.length;u++){s=e[u];var l=r+yl(s,u);a+=Fa(s,t,n,l,i)}else if(l=$E(e),typeof l=="function")for(e=l.call(e),u=0;!(s=e.next()).done;)s=s.value,l=r+yl(s,u++),a+=Fa(s,t,n,l,i);else if(s==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function fa(e,t,n){if(e==null)return e;var r=[],i=0;return Fa(e,r,"","",function(s){return t.call(n,s,i++)}),r}function WE(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Dt={current:null},Ba={transition:null},qE={ReactCurrentDispatcher:Dt,ReactCurrentBatchConfig:Ba,ReactCurrentOwner:vc};function K0(){throw Error("act(...) is not supported in production builds of React.")}ke.Children={map:fa,forEach:function(e,t,n){fa(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return fa(e,function(){t++}),t},toArray:function(e){return fa(e,function(t){return t})||[]},only:function(e){if(!wc(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ke.Component=Pi;ke.Fragment=OE;ke.Profiler=ME;ke.PureComponent=Nc;ke.StrictMode=PE;ke.Suspense=UE;ke.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=qE;ke.act=K0;ke.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Y0({},e.props),i=e.key,s=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,a=vc.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var u=e.type.defaultProps;for(l in t)q0.call(t,l)&&!Q0.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&u!==void 0?u[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){u=Array(l);for(var d=0;d<l;d++)u[d]=arguments[d+2];r.children=u}return{$$typeof:Xs,type:e.type,key:i,ref:s,props:r,_owner:a}};ke.createContext=function(e){return e={$$typeof:BE,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:FE,_context:e},e.Consumer=e};ke.createElement=G0;ke.createFactory=function(e){var t=G0.bind(null,e);return t.type=e,t};ke.createRef=function(){return{current:null}};ke.forwardRef=function(e){return{$$typeof:jE,render:e}};ke.isValidElement=wc;ke.lazy=function(e){return{$$typeof:zE,_payload:{_status:-1,_result:e},_init:WE}};ke.memo=function(e,t){return{$$typeof:HE,type:e,compare:t===void 0?null:t}};ke.startTransition=function(e){var t=Ba.transition;Ba.transition={};try{e()}finally{Ba.transition=t}};ke.unstable_act=K0;ke.useCallback=function(e,t){return Dt.current.useCallback(e,t)};ke.useContext=function(e){return Dt.current.useContext(e)};ke.useDebugValue=function(){};ke.useDeferredValue=function(e){return Dt.current.useDeferredValue(e)};ke.useEffect=function(e,t){return Dt.current.useEffect(e,t)};ke.useId=function(){return Dt.current.useId()};ke.useImperativeHandle=function(e,t,n){return Dt.current.useImperativeHandle(e,t,n)};ke.useInsertionEffect=function(e,t){return Dt.current.useInsertionEffect(e,t)};ke.useLayoutEffect=function(e,t){return Dt.current.useLayoutEffect(e,t)};ke.useMemo=function(e,t){return Dt.current.useMemo(e,t)};ke.useReducer=function(e,t,n){return Dt.current.useReducer(e,t,n)};ke.useRef=function(e){return Dt.current.useRef(e)};ke.useState=function(e){return Dt.current.useState(e)};ke.useSyncExternalStore=function(e,t,n){return Dt.current.useSyncExternalStore(e,t,n)};ke.useTransition=function(){return Dt.current.useTransition()};ke.version="18.3.1";z0.exports=ke;var _=z0.exports;const vs=Bu(_);/**
10
+ * @license React
11
+ * react-jsx-runtime.production.min.js
12
+ *
13
+ * Copyright (c) Facebook, Inc. and its 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 QE=_,GE=Symbol.for("react.element"),KE=Symbol.for("react.fragment"),XE=Object.prototype.hasOwnProperty,JE=QE.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,ZE={key:!0,ref:!0,__self:!0,__source:!0};function X0(e,t,n){var r,i={},s=null,a=null;n!==void 0&&(s=""+n),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)XE.call(t,r)&&!ZE.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:GE,type:e,key:s,ref:a,props:i,_owner:JE.current}}ju.Fragment=KE;ju.jsx=X0;ju.jsxs=X0;H0.exports=ju;var o=H0.exports,ho={},J0={exports:{}},en={},Z0={exports:{}},em={};/**
18
+ * @license React
19
+ * scheduler.production.min.js
20
+ *
21
+ * Copyright (c) Facebook, Inc. and its 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
+ */(function(e){function t(v,F){var y=v.length;v.push(F);e:for(;0<y;){var ee=y-1>>>1,le=v[ee];if(0<i(le,F))v[ee]=F,v[y]=le,y=ee;else break e}}function n(v){return v.length===0?null:v[0]}function r(v){if(v.length===0)return null;var F=v[0],y=v.pop();if(y!==F){v[0]=y;e:for(var ee=0,le=v.length,N=le>>>1;ee<N;){var Ee=2*(ee+1)-1,Se=v[Ee],pe=Ee+1,Qe=v[pe];if(0>i(Se,y))pe<le&&0>i(Qe,Se)?(v[ee]=Qe,v[pe]=y,ee=pe):(v[ee]=Se,v[Ee]=y,ee=Ee);else if(pe<le&&0>i(Qe,y))v[ee]=Qe,v[pe]=y,ee=pe;else break e}}return F}function i(v,F){var y=v.sortIndex-F.sortIndex;return y!==0?y:v.id-F.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var a=Date,u=a.now();e.unstable_now=function(){return a.now()-u}}var l=[],d=[],f=1,h=null,m=3,p=!1,E=!1,k=!1,L=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(v){for(var F=n(d);F!==null;){if(F.callback===null)r(d);else if(F.startTime<=v)r(d),F.sortIndex=F.expirationTime,t(l,F);else break;F=n(d)}}function R(v){if(k=!1,x(v),!E)if(n(l)!==null)E=!0,ae(B);else{var F=n(d);F!==null&&Te(R,F.startTime-v)}}function B(v,F){E=!1,k&&(k=!1,g(D),D=-1),p=!0;var y=m;try{for(x(F),h=n(l);h!==null&&(!(h.expirationTime>F)||v&&!V());){var ee=h.callback;if(typeof ee=="function"){h.callback=null,m=h.priorityLevel;var le=ee(h.expirationTime<=F);F=e.unstable_now(),typeof le=="function"?h.callback=le:h===n(l)&&r(l),x(F)}else r(l);h=n(l)}if(h!==null)var N=!0;else{var Ee=n(d);Ee!==null&&Te(R,Ee.startTime-F),N=!1}return N}finally{h=null,m=y,p=!1}}var C=!1,I=null,D=-1,Y=5,w=-1;function V(){return!(e.unstable_now()-w<Y)}function X(){if(I!==null){var v=e.unstable_now();w=v;var F=!0;try{F=I(!0,v)}finally{F?ce():(C=!1,I=null)}}else C=!1}var ce;if(typeof T=="function")ce=function(){T(X)};else if(typeof MessageChannel<"u"){var se=new MessageChannel,de=se.port2;se.port1.onmessage=X,ce=function(){de.postMessage(null)}}else ce=function(){L(X,0)};function ae(v){I=v,C||(C=!0,ce())}function Te(v,F){D=L(function(){v(e.unstable_now())},F)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(v){v.callback=null},e.unstable_continueExecution=function(){E||p||(E=!0,ae(B))},e.unstable_forceFrameRate=function(v){0>v||125<v?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Y=0<v?Math.floor(1e3/v):5},e.unstable_getCurrentPriorityLevel=function(){return m},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(v){switch(m){case 1:case 2:case 3:var F=3;break;default:F=m}var y=m;m=F;try{return v()}finally{m=y}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(v,F){switch(v){case 1:case 2:case 3:case 4:case 5:break;default:v=3}var y=m;m=v;try{return F()}finally{m=y}},e.unstable_scheduleCallback=function(v,F,y){var ee=e.unstable_now();switch(typeof y=="object"&&y!==null?(y=y.delay,y=typeof y=="number"&&0<y?ee+y:ee):y=ee,v){case 1:var le=-1;break;case 2:le=250;break;case 5:le=1073741823;break;case 4:le=1e4;break;default:le=5e3}return le=y+le,v={id:f++,callback:F,priorityLevel:v,startTime:y,expirationTime:le,sortIndex:-1},y>ee?(v.sortIndex=y,t(d,v),n(l)===null&&v===n(d)&&(k?(g(D),D=-1):k=!0,Te(R,y-ee))):(v.sortIndex=le,t(l,v),E||p||(E=!0,ae(B))),v},e.unstable_shouldYield=V,e.unstable_wrapCallback=function(v){var F=m;return function(){var y=m;m=F;try{return v.apply(this,arguments)}finally{m=y}}}})(em);Z0.exports=em;var e2=Z0.exports;/**
26
+ * @license React
27
+ * react-dom.production.min.js
28
+ *
29
+ * Copyright (c) Facebook, Inc. and its 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 t2=_,Zt=e2;function Q(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var tm=new Set,ws={};function qr(e,t){Si(e,t),Si(e+"Capture",t)}function Si(e,t){for(ws[e]=t,e=0;e<t.length;e++)tm.add(t[e])}var Vn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),mo=Object.prototype.hasOwnProperty,n2=/^[: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]*$/,uf={},lf={};function r2(e){return mo.call(lf,e)?!0:mo.call(uf,e)?!1:n2.test(e)?lf[e]=!0:(uf[e]=!0,!1)}function i2(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function s2(e,t,n,r){if(t===null||typeof t>"u"||i2(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Rt(e,t,n,r,i,s,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=a}var pt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){pt[e]=new Rt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];pt[t]=new Rt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){pt[e]=new Rt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){pt[e]=new Rt(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){pt[e]=new Rt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){pt[e]=new Rt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){pt[e]=new Rt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){pt[e]=new Rt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){pt[e]=new Rt(e,5,!1,e.toLowerCase(),null,!1,!1)});var Ic=/[\-:]([a-z])/g;function Lc(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Ic,Lc);pt[t]=new Rt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Ic,Lc);pt[t]=new Rt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Ic,Lc);pt[t]=new Rt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){pt[e]=new Rt(e,1,!1,e.toLowerCase(),null,!1,!1)});pt.xlinkHref=new Rt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){pt[e]=new Rt(e,1,!1,e.toLowerCase(),null,!0,!0)});function Dc(e,t,n,r){var i=pt.hasOwnProperty(t)?pt[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(s2(t,n,i,r)&&(n=null),r||i===null?r2(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Gn=t2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ha=Symbol.for("react.element"),ii=Symbol.for("react.portal"),si=Symbol.for("react.fragment"),Rc=Symbol.for("react.strict_mode"),po=Symbol.for("react.profiler"),nm=Symbol.for("react.provider"),rm=Symbol.for("react.context"),Oc=Symbol.for("react.forward_ref"),go=Symbol.for("react.suspense"),Eo=Symbol.for("react.suspense_list"),Pc=Symbol.for("react.memo"),ir=Symbol.for("react.lazy"),im=Symbol.for("react.offscreen"),of=Symbol.iterator;function Yi(e){return e===null||typeof e!="object"?null:(e=of&&e[of]||e["@@iterator"],typeof e=="function"?e:null)}var qe=Object.assign,bl;function is(e){if(bl===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);bl=t&&t[1]||""}return`
34
+ `+bl+e}var xl=!1;function _l(e,t){if(!e||xl)return"";xl=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(d){var r=d}Reflect.construct(e,[],t)}else{try{t.call()}catch(d){r=d}e.call(t.prototype)}else{try{throw Error()}catch(d){r=d}e()}}catch(d){if(d&&r&&typeof d.stack=="string"){for(var i=d.stack.split(`
35
+ `),s=r.stack.split(`
36
+ `),a=i.length-1,u=s.length-1;1<=a&&0<=u&&i[a]!==s[u];)u--;for(;1<=a&&0<=u;a--,u--)if(i[a]!==s[u]){if(a!==1||u!==1)do if(a--,u--,0>u||i[a]!==s[u]){var l=`
37
+ `+i[a].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=a&&0<=u);break}}}finally{xl=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?is(e):""}function a2(e){switch(e.tag){case 5:return is(e.type);case 16:return is("Lazy");case 13:return is("Suspense");case 19:return is("SuspenseList");case 0:case 2:case 15:return e=_l(e.type,!1),e;case 11:return e=_l(e.type.render,!1),e;case 1:return e=_l(e.type,!0),e;default:return""}}function To(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case si:return"Fragment";case ii:return"Portal";case po:return"Profiler";case Rc:return"StrictMode";case go:return"Suspense";case Eo:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case rm:return(e.displayName||"Context")+".Consumer";case nm:return(e._context.displayName||"Context")+".Provider";case Oc:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Pc:return t=e.displayName||null,t!==null?t:To(e.type)||"Memo";case ir:t=e._payload,e=e._init;try{return To(e(t))}catch{}}return null}function u2(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return To(t);case 8:return t===Rc?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function yr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function sm(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function l2(e){var t=sm(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,s.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ma(e){e._valueTracker||(e._valueTracker=l2(e))}function am(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=sm(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function tu(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function yo(e,t){var n=t.checked;return qe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function cf(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=yr(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function um(e,t){t=t.checked,t!=null&&Dc(e,"checked",t,!1)}function bo(e,t){um(e,t);var n=yr(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?xo(e,t.type,n):t.hasOwnProperty("defaultValue")&&xo(e,t.type,yr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function df(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function xo(e,t,n){(t!=="number"||tu(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ss=Array.isArray;function Ei(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+yr(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function _o(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(Q(91));return qe({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ff(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(Q(92));if(ss(n)){if(1<n.length)throw Error(Q(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:yr(n)}}function lm(e,t){var n=yr(t.value),r=yr(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function hf(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function om(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ko(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?om(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var pa,cm=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(pa=pa||document.createElement("div"),pa.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=pa.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Is(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var cs={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},o2=["Webkit","ms","Moz","O"];Object.keys(cs).forEach(function(e){o2.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),cs[t]=cs[e]})});function dm(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||cs.hasOwnProperty(e)&&cs[e]?(""+t).trim():t+"px"}function fm(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=dm(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var c2=qe({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function So(e,t){if(t){if(c2[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Q(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Q(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Q(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Q(62))}}function Co(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var No=null;function Mc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ao=null,Ti=null,yi=null;function mf(e){if(e=ea(e)){if(typeof Ao!="function")throw Error(Q(280));var t=e.stateNode;t&&(t=Yu(t),Ao(e.stateNode,e.type,t))}}function hm(e){Ti?yi?yi.push(e):yi=[e]:Ti=e}function mm(){if(Ti){var e=Ti,t=yi;if(yi=Ti=null,mf(e),t)for(e=0;e<t.length;e++)mf(t[e])}}function pm(e,t){return e(t)}function gm(){}var kl=!1;function Em(e,t,n){if(kl)return e(t,n);kl=!0;try{return pm(e,t,n)}finally{kl=!1,(Ti!==null||yi!==null)&&(gm(),mm())}}function Ls(e,t){var n=e.stateNode;if(n===null)return null;var r=Yu(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(Q(231,t,typeof n));return n}var vo=!1;if(Vn)try{var Vi={};Object.defineProperty(Vi,"passive",{get:function(){vo=!0}}),window.addEventListener("test",Vi,Vi),window.removeEventListener("test",Vi,Vi)}catch{vo=!1}function d2(e,t,n,r,i,s,a,u,l){var d=Array.prototype.slice.call(arguments,3);try{t.apply(n,d)}catch(f){this.onError(f)}}var ds=!1,nu=null,ru=!1,wo=null,f2={onError:function(e){ds=!0,nu=e}};function h2(e,t,n,r,i,s,a,u,l){ds=!1,nu=null,d2.apply(f2,arguments)}function m2(e,t,n,r,i,s,a,u,l){if(h2.apply(this,arguments),ds){if(ds){var d=nu;ds=!1,nu=null}else throw Error(Q(198));ru||(ru=!0,wo=d)}}function Qr(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Tm(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function pf(e){if(Qr(e)!==e)throw Error(Q(188))}function p2(e){var t=e.alternate;if(!t){if(t=Qr(e),t===null)throw Error(Q(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var s=i.alternate;if(s===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return pf(i),e;if(s===r)return pf(i),t;s=s.sibling}throw Error(Q(188))}if(n.return!==r.return)n=i,r=s;else{for(var a=!1,u=i.child;u;){if(u===n){a=!0,n=i,r=s;break}if(u===r){a=!0,r=i,n=s;break}u=u.sibling}if(!a){for(u=s.child;u;){if(u===n){a=!0,n=s,r=i;break}if(u===r){a=!0,r=s,n=i;break}u=u.sibling}if(!a)throw Error(Q(189))}}if(n.alternate!==r)throw Error(Q(190))}if(n.tag!==3)throw Error(Q(188));return n.stateNode.current===n?e:t}function ym(e){return e=p2(e),e!==null?bm(e):null}function bm(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=bm(e);if(t!==null)return t;e=e.sibling}return null}var xm=Zt.unstable_scheduleCallback,gf=Zt.unstable_cancelCallback,g2=Zt.unstable_shouldYield,E2=Zt.unstable_requestPaint,et=Zt.unstable_now,T2=Zt.unstable_getCurrentPriorityLevel,Fc=Zt.unstable_ImmediatePriority,_m=Zt.unstable_UserBlockingPriority,iu=Zt.unstable_NormalPriority,y2=Zt.unstable_LowPriority,km=Zt.unstable_IdlePriority,Uu=null,Ln=null;function b2(e){if(Ln&&typeof Ln.onCommitFiberRoot=="function")try{Ln.onCommitFiberRoot(Uu,e,void 0,(e.current.flags&128)===128)}catch{}}var Tn=Math.clz32?Math.clz32:k2,x2=Math.log,_2=Math.LN2;function k2(e){return e>>>=0,e===0?32:31-(x2(e)/_2|0)|0}var ga=64,Ea=4194304;function as(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function su(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,s=e.pingedLanes,a=n&268435455;if(a!==0){var u=a&~i;u!==0?r=as(u):(s&=a,s!==0&&(r=as(s)))}else a=n&~i,a!==0?r=as(a):s!==0&&(r=as(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,s=t&-t,i>=s||i===16&&(s&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Tn(t),i=1<<n,r|=e[n],t&=~i;return r}function S2(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function C2(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var a=31-Tn(s),u=1<<a,l=i[a];l===-1?(!(u&n)||u&r)&&(i[a]=S2(u,t)):l<=t&&(e.expiredLanes|=u),s&=~u}}function Io(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Sm(){var e=ga;return ga<<=1,!(ga&4194240)&&(ga=64),e}function Sl(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Js(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Tn(t),e[t]=n}function N2(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-Tn(n),s=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~s}}function Bc(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Tn(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Re=0;function Cm(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Nm,jc,Am,vm,wm,Lo=!1,Ta=[],dr=null,fr=null,hr=null,Ds=new Map,Rs=new Map,ar=[],A2="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 submit".split(" ");function Ef(e,t){switch(e){case"focusin":case"focusout":dr=null;break;case"dragenter":case"dragleave":fr=null;break;case"mouseover":case"mouseout":hr=null;break;case"pointerover":case"pointerout":Ds.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Rs.delete(t.pointerId)}}function Wi(e,t,n,r,i,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[i]},t!==null&&(t=ea(t),t!==null&&jc(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function v2(e,t,n,r,i){switch(t){case"focusin":return dr=Wi(dr,e,t,n,r,i),!0;case"dragenter":return fr=Wi(fr,e,t,n,r,i),!0;case"mouseover":return hr=Wi(hr,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return Ds.set(s,Wi(Ds.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,Rs.set(s,Wi(Rs.get(s)||null,e,t,n,r,i)),!0}return!1}function Im(e){var t=Lr(e.target);if(t!==null){var n=Qr(t);if(n!==null){if(t=n.tag,t===13){if(t=Tm(n),t!==null){e.blockedOn=t,wm(e.priority,function(){Am(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ja(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Do(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);No=r,n.target.dispatchEvent(r),No=null}else return t=ea(n),t!==null&&jc(t),e.blockedOn=n,!1;t.shift()}return!0}function Tf(e,t,n){ja(e)&&n.delete(t)}function w2(){Lo=!1,dr!==null&&ja(dr)&&(dr=null),fr!==null&&ja(fr)&&(fr=null),hr!==null&&ja(hr)&&(hr=null),Ds.forEach(Tf),Rs.forEach(Tf)}function qi(e,t){e.blockedOn===t&&(e.blockedOn=null,Lo||(Lo=!0,Zt.unstable_scheduleCallback(Zt.unstable_NormalPriority,w2)))}function Os(e){function t(i){return qi(i,e)}if(0<Ta.length){qi(Ta[0],e);for(var n=1;n<Ta.length;n++){var r=Ta[n];r.blockedOn===e&&(r.blockedOn=null)}}for(dr!==null&&qi(dr,e),fr!==null&&qi(fr,e),hr!==null&&qi(hr,e),Ds.forEach(t),Rs.forEach(t),n=0;n<ar.length;n++)r=ar[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<ar.length&&(n=ar[0],n.blockedOn===null);)Im(n),n.blockedOn===null&&ar.shift()}var bi=Gn.ReactCurrentBatchConfig,au=!0;function I2(e,t,n,r){var i=Re,s=bi.transition;bi.transition=null;try{Re=1,Uc(e,t,n,r)}finally{Re=i,bi.transition=s}}function L2(e,t,n,r){var i=Re,s=bi.transition;bi.transition=null;try{Re=4,Uc(e,t,n,r)}finally{Re=i,bi.transition=s}}function Uc(e,t,n,r){if(au){var i=Do(e,t,n,r);if(i===null)Ol(e,t,r,uu,n),Ef(e,r);else if(v2(i,e,t,n,r))r.stopPropagation();else if(Ef(e,r),t&4&&-1<A2.indexOf(e)){for(;i!==null;){var s=ea(i);if(s!==null&&Nm(s),s=Do(e,t,n,r),s===null&&Ol(e,t,r,uu,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else Ol(e,t,r,null,n)}}var uu=null;function Do(e,t,n,r){if(uu=null,e=Mc(r),e=Lr(e),e!==null)if(t=Qr(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Tm(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return uu=e,null}function Lm(e){switch(e){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(T2()){case Fc:return 1;case _m:return 4;case iu:case y2:return 16;case km:return 536870912;default:return 16}default:return 16}}var lr=null,Hc=null,Ua=null;function Dm(){if(Ua)return Ua;var e,t=Hc,n=t.length,r,i="value"in lr?lr.value:lr.textContent,s=i.length;for(e=0;e<n&&t[e]===i[e];e++);var a=n-e;for(r=1;r<=a&&t[n-r]===i[s-r];r++);return Ua=i.slice(e,1<r?1-r:void 0)}function Ha(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function ya(){return!0}function yf(){return!1}function tn(e){function t(n,r,i,s,a){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=s,this.target=a,this.currentTarget=null;for(var u in e)e.hasOwnProperty(u)&&(n=e[u],this[u]=n?n(s):s[u]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?ya:yf,this.isPropagationStopped=yf,this}return qe(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=ya)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=ya)},persist:function(){},isPersistent:ya}),t}var Mi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},zc=tn(Mi),Zs=qe({},Mi,{view:0,detail:0}),D2=tn(Zs),Cl,Nl,Qi,Hu=qe({},Zs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:$c,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Qi&&(Qi&&e.type==="mousemove"?(Cl=e.screenX-Qi.screenX,Nl=e.screenY-Qi.screenY):Nl=Cl=0,Qi=e),Cl)},movementY:function(e){return"movementY"in e?e.movementY:Nl}}),bf=tn(Hu),R2=qe({},Hu,{dataTransfer:0}),O2=tn(R2),P2=qe({},Zs,{relatedTarget:0}),Al=tn(P2),M2=qe({},Mi,{animationName:0,elapsedTime:0,pseudoElement:0}),F2=tn(M2),B2=qe({},Mi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),j2=tn(B2),U2=qe({},Mi,{data:0}),xf=tn(U2),H2={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},z2={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"},$2={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Y2(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=$2[e])?!!t[e]:!1}function $c(){return Y2}var V2=qe({},Zs,{key:function(e){if(e.key){var t=H2[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ha(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?z2[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:$c,charCode:function(e){return e.type==="keypress"?Ha(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ha(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),W2=tn(V2),q2=qe({},Hu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),_f=tn(q2),Q2=qe({},Zs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:$c}),G2=tn(Q2),K2=qe({},Mi,{propertyName:0,elapsedTime:0,pseudoElement:0}),X2=tn(K2),J2=qe({},Hu,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Z2=tn(J2),eT=[9,13,27,32],Yc=Vn&&"CompositionEvent"in window,fs=null;Vn&&"documentMode"in document&&(fs=document.documentMode);var tT=Vn&&"TextEvent"in window&&!fs,Rm=Vn&&(!Yc||fs&&8<fs&&11>=fs),kf=" ",Sf=!1;function Om(e,t){switch(e){case"keyup":return eT.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Pm(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ai=!1;function nT(e,t){switch(e){case"compositionend":return Pm(t);case"keypress":return t.which!==32?null:(Sf=!0,kf);case"textInput":return e=t.data,e===kf&&Sf?null:e;default:return null}}function rT(e,t){if(ai)return e==="compositionend"||!Yc&&Om(e,t)?(e=Dm(),Ua=Hc=lr=null,ai=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Rm&&t.locale!=="ko"?null:t.data;default:return null}}var iT={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 Cf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!iT[e.type]:t==="textarea"}function Mm(e,t,n,r){hm(r),t=lu(t,"onChange"),0<t.length&&(n=new zc("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var hs=null,Ps=null;function sT(e){qm(e,0)}function zu(e){var t=oi(e);if(am(t))return e}function aT(e,t){if(e==="change")return t}var Fm=!1;if(Vn){var vl;if(Vn){var wl="oninput"in document;if(!wl){var Nf=document.createElement("div");Nf.setAttribute("oninput","return;"),wl=typeof Nf.oninput=="function"}vl=wl}else vl=!1;Fm=vl&&(!document.documentMode||9<document.documentMode)}function Af(){hs&&(hs.detachEvent("onpropertychange",Bm),Ps=hs=null)}function Bm(e){if(e.propertyName==="value"&&zu(Ps)){var t=[];Mm(t,Ps,e,Mc(e)),Em(sT,t)}}function uT(e,t,n){e==="focusin"?(Af(),hs=t,Ps=n,hs.attachEvent("onpropertychange",Bm)):e==="focusout"&&Af()}function lT(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return zu(Ps)}function oT(e,t){if(e==="click")return zu(t)}function cT(e,t){if(e==="input"||e==="change")return zu(t)}function dT(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var xn=typeof Object.is=="function"?Object.is:dT;function Ms(e,t){if(xn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!mo.call(t,i)||!xn(e[i],t[i]))return!1}return!0}function vf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function wf(e,t){var n=vf(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=vf(n)}}function jm(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?jm(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Um(){for(var e=window,t=tu();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=tu(e.document)}return t}function Vc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function fT(e){var t=Um(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&jm(n.ownerDocument.documentElement,n)){if(r!==null&&Vc(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!e.extend&&s>r&&(i=r,r=s,s=i),i=wf(n,s);var a=wf(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var hT=Vn&&"documentMode"in document&&11>=document.documentMode,ui=null,Ro=null,ms=null,Oo=!1;function If(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Oo||ui==null||ui!==tu(r)||(r=ui,"selectionStart"in r&&Vc(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ms&&Ms(ms,r)||(ms=r,r=lu(Ro,"onSelect"),0<r.length&&(t=new zc("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ui)))}function ba(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var li={animationend:ba("Animation","AnimationEnd"),animationiteration:ba("Animation","AnimationIteration"),animationstart:ba("Animation","AnimationStart"),transitionend:ba("Transition","TransitionEnd")},Il={},Hm={};Vn&&(Hm=document.createElement("div").style,"AnimationEvent"in window||(delete li.animationend.animation,delete li.animationiteration.animation,delete li.animationstart.animation),"TransitionEvent"in window||delete li.transitionend.transition);function $u(e){if(Il[e])return Il[e];if(!li[e])return e;var t=li[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Hm)return Il[e]=t[n];return e}var zm=$u("animationend"),$m=$u("animationiteration"),Ym=$u("animationstart"),Vm=$u("transitionend"),Wm=new Map,Lf="abort auxClick 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(" ");function _r(e,t){Wm.set(e,t),qr(t,[e])}for(var Ll=0;Ll<Lf.length;Ll++){var Dl=Lf[Ll],mT=Dl.toLowerCase(),pT=Dl[0].toUpperCase()+Dl.slice(1);_r(mT,"on"+pT)}_r(zm,"onAnimationEnd");_r($m,"onAnimationIteration");_r(Ym,"onAnimationStart");_r("dblclick","onDoubleClick");_r("focusin","onFocus");_r("focusout","onBlur");_r(Vm,"onTransitionEnd");Si("onMouseEnter",["mouseout","mouseover"]);Si("onMouseLeave",["mouseout","mouseover"]);Si("onPointerEnter",["pointerout","pointerover"]);Si("onPointerLeave",["pointerout","pointerover"]);qr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));qr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));qr("onBeforeInput",["compositionend","keypress","textInput","paste"]);qr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));qr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));qr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var us="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(" "),gT=new Set("cancel close invalid load scroll toggle".split(" ").concat(us));function Df(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,m2(r,t,void 0,e),e.currentTarget=null}function qm(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var s=void 0;if(t)for(var a=r.length-1;0<=a;a--){var u=r[a],l=u.instance,d=u.currentTarget;if(u=u.listener,l!==s&&i.isPropagationStopped())break e;Df(i,u,d),s=l}else for(a=0;a<r.length;a++){if(u=r[a],l=u.instance,d=u.currentTarget,u=u.listener,l!==s&&i.isPropagationStopped())break e;Df(i,u,d),s=l}}}if(ru)throw e=wo,ru=!1,wo=null,e}function Ue(e,t){var n=t[jo];n===void 0&&(n=t[jo]=new Set);var r=e+"__bubble";n.has(r)||(Qm(t,e,2,!1),n.add(r))}function Rl(e,t,n){var r=0;t&&(r|=4),Qm(n,e,r,t)}var xa="_reactListening"+Math.random().toString(36).slice(2);function Fs(e){if(!e[xa]){e[xa]=!0,tm.forEach(function(n){n!=="selectionchange"&&(gT.has(n)||Rl(n,!1,e),Rl(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[xa]||(t[xa]=!0,Rl("selectionchange",!1,t))}}function Qm(e,t,n,r){switch(Lm(t)){case 1:var i=I2;break;case 4:i=L2;break;default:i=Uc}n=i.bind(null,t,n,e),i=void 0,!vo||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Ol(e,t,n,r,i){var s=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var a=r.tag;if(a===3||a===4){var u=r.stateNode.containerInfo;if(u===i||u.nodeType===8&&u.parentNode===i)break;if(a===4)for(a=r.return;a!==null;){var l=a.tag;if((l===3||l===4)&&(l=a.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;a=a.return}for(;u!==null;){if(a=Lr(u),a===null)return;if(l=a.tag,l===5||l===6){r=s=a;continue e}u=u.parentNode}}r=r.return}Em(function(){var d=s,f=Mc(n),h=[];e:{var m=Wm.get(e);if(m!==void 0){var p=zc,E=e;switch(e){case"keypress":if(Ha(n)===0)break e;case"keydown":case"keyup":p=W2;break;case"focusin":E="focus",p=Al;break;case"focusout":E="blur",p=Al;break;case"beforeblur":case"afterblur":p=Al;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=bf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=O2;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=G2;break;case zm:case $m:case Ym:p=F2;break;case Vm:p=X2;break;case"scroll":p=D2;break;case"wheel":p=Z2;break;case"copy":case"cut":case"paste":p=j2;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=_f}var k=(t&4)!==0,L=!k&&e==="scroll",g=k?m!==null?m+"Capture":null:m;k=[];for(var T=d,x;T!==null;){x=T;var R=x.stateNode;if(x.tag===5&&R!==null&&(x=R,g!==null&&(R=Ls(T,g),R!=null&&k.push(Bs(T,R,x)))),L)break;T=T.return}0<k.length&&(m=new p(m,E,null,n,f),h.push({event:m,listeners:k}))}}if(!(t&7)){e:{if(m=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",m&&n!==No&&(E=n.relatedTarget||n.fromElement)&&(Lr(E)||E[Wn]))break e;if((p||m)&&(m=f.window===f?f:(m=f.ownerDocument)?m.defaultView||m.parentWindow:window,p?(E=n.relatedTarget||n.toElement,p=d,E=E?Lr(E):null,E!==null&&(L=Qr(E),E!==L||E.tag!==5&&E.tag!==6)&&(E=null)):(p=null,E=d),p!==E)){if(k=bf,R="onMouseLeave",g="onMouseEnter",T="mouse",(e==="pointerout"||e==="pointerover")&&(k=_f,R="onPointerLeave",g="onPointerEnter",T="pointer"),L=p==null?m:oi(p),x=E==null?m:oi(E),m=new k(R,T+"leave",p,n,f),m.target=L,m.relatedTarget=x,R=null,Lr(f)===d&&(k=new k(g,T+"enter",E,n,f),k.target=x,k.relatedTarget=L,R=k),L=R,p&&E)t:{for(k=p,g=E,T=0,x=k;x;x=Zr(x))T++;for(x=0,R=g;R;R=Zr(R))x++;for(;0<T-x;)k=Zr(k),T--;for(;0<x-T;)g=Zr(g),x--;for(;T--;){if(k===g||g!==null&&k===g.alternate)break t;k=Zr(k),g=Zr(g)}k=null}else k=null;p!==null&&Rf(h,m,p,k,!1),E!==null&&L!==null&&Rf(h,L,E,k,!0)}}e:{if(m=d?oi(d):window,p=m.nodeName&&m.nodeName.toLowerCase(),p==="select"||p==="input"&&m.type==="file")var B=aT;else if(Cf(m))if(Fm)B=cT;else{B=lT;var C=uT}else(p=m.nodeName)&&p.toLowerCase()==="input"&&(m.type==="checkbox"||m.type==="radio")&&(B=oT);if(B&&(B=B(e,d))){Mm(h,B,n,f);break e}C&&C(e,m,d),e==="focusout"&&(C=m._wrapperState)&&C.controlled&&m.type==="number"&&xo(m,"number",m.value)}switch(C=d?oi(d):window,e){case"focusin":(Cf(C)||C.contentEditable==="true")&&(ui=C,Ro=d,ms=null);break;case"focusout":ms=Ro=ui=null;break;case"mousedown":Oo=!0;break;case"contextmenu":case"mouseup":case"dragend":Oo=!1,If(h,n,f);break;case"selectionchange":if(hT)break;case"keydown":case"keyup":If(h,n,f)}var I;if(Yc)e:{switch(e){case"compositionstart":var D="onCompositionStart";break e;case"compositionend":D="onCompositionEnd";break e;case"compositionupdate":D="onCompositionUpdate";break e}D=void 0}else ai?Om(e,n)&&(D="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(D="onCompositionStart");D&&(Rm&&n.locale!=="ko"&&(ai||D!=="onCompositionStart"?D==="onCompositionEnd"&&ai&&(I=Dm()):(lr=f,Hc="value"in lr?lr.value:lr.textContent,ai=!0)),C=lu(d,D),0<C.length&&(D=new xf(D,e,null,n,f),h.push({event:D,listeners:C}),I?D.data=I:(I=Pm(n),I!==null&&(D.data=I)))),(I=tT?nT(e,n):rT(e,n))&&(d=lu(d,"onBeforeInput"),0<d.length&&(f=new xf("onBeforeInput","beforeinput",null,n,f),h.push({event:f,listeners:d}),f.data=I))}qm(h,t)})}function Bs(e,t,n){return{instance:e,listener:t,currentTarget:n}}function lu(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=Ls(e,n),s!=null&&r.unshift(Bs(e,s,i)),s=Ls(e,t),s!=null&&r.push(Bs(e,s,i))),e=e.return}return r}function Zr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Rf(e,t,n,r,i){for(var s=t._reactName,a=[];n!==null&&n!==r;){var u=n,l=u.alternate,d=u.stateNode;if(l!==null&&l===r)break;u.tag===5&&d!==null&&(u=d,i?(l=Ls(n,s),l!=null&&a.unshift(Bs(n,l,u))):i||(l=Ls(n,s),l!=null&&a.push(Bs(n,l,u)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var ET=/\r\n?/g,TT=/\u0000|\uFFFD/g;function Of(e){return(typeof e=="string"?e:""+e).replace(ET,`
38
+ `).replace(TT,"")}function _a(e,t,n){if(t=Of(t),Of(e)!==t&&n)throw Error(Q(425))}function ou(){}var Po=null,Mo=null;function Fo(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Bo=typeof setTimeout=="function"?setTimeout:void 0,yT=typeof clearTimeout=="function"?clearTimeout:void 0,Pf=typeof Promise=="function"?Promise:void 0,bT=typeof queueMicrotask=="function"?queueMicrotask:typeof Pf<"u"?function(e){return Pf.resolve(null).then(e).catch(xT)}:Bo;function xT(e){setTimeout(function(){throw e})}function Pl(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),Os(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Os(t)}function mr(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Mf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Fi=Math.random().toString(36).slice(2),wn="__reactFiber$"+Fi,js="__reactProps$"+Fi,Wn="__reactContainer$"+Fi,jo="__reactEvents$"+Fi,_T="__reactListeners$"+Fi,kT="__reactHandles$"+Fi;function Lr(e){var t=e[wn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Wn]||n[wn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Mf(e);e!==null;){if(n=e[wn])return n;e=Mf(e)}return t}e=n,n=e.parentNode}return null}function ea(e){return e=e[wn]||e[Wn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function oi(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(Q(33))}function Yu(e){return e[js]||null}var Uo=[],ci=-1;function kr(e){return{current:e}}function He(e){0>ci||(e.current=Uo[ci],Uo[ci]=null,ci--)}function je(e,t){ci++,Uo[ci]=e.current,e.current=t}var br={},_t=kr(br),Ht=kr(!1),Ur=br;function Ci(e,t){var n=e.type.contextTypes;if(!n)return br;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function zt(e){return e=e.childContextTypes,e!=null}function cu(){He(Ht),He(_t)}function Ff(e,t,n){if(_t.current!==br)throw Error(Q(168));je(_t,t),je(Ht,n)}function Gm(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Q(108,u2(e)||"Unknown",i));return qe({},n,r)}function du(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||br,Ur=_t.current,je(_t,e),je(Ht,Ht.current),!0}function Bf(e,t,n){var r=e.stateNode;if(!r)throw Error(Q(169));n?(e=Gm(e,t,Ur),r.__reactInternalMemoizedMergedChildContext=e,He(Ht),He(_t),je(_t,e)):He(Ht),je(Ht,n)}var jn=null,Vu=!1,Ml=!1;function Km(e){jn===null?jn=[e]:jn.push(e)}function ST(e){Vu=!0,Km(e)}function Sr(){if(!Ml&&jn!==null){Ml=!0;var e=0,t=Re;try{var n=jn;for(Re=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}jn=null,Vu=!1}catch(i){throw jn!==null&&(jn=jn.slice(e+1)),xm(Fc,Sr),i}finally{Re=t,Ml=!1}}return null}var di=[],fi=0,fu=null,hu=0,rn=[],sn=0,Hr=null,Hn=1,zn="";function vr(e,t){di[fi++]=hu,di[fi++]=fu,fu=e,hu=t}function Xm(e,t,n){rn[sn++]=Hn,rn[sn++]=zn,rn[sn++]=Hr,Hr=e;var r=Hn;e=zn;var i=32-Tn(r)-1;r&=~(1<<i),n+=1;var s=32-Tn(t)+i;if(30<s){var a=i-i%5;s=(r&(1<<a)-1).toString(32),r>>=a,i-=a,Hn=1<<32-Tn(t)+i|n<<i|r,zn=s+e}else Hn=1<<s|n<<i|r,zn=e}function Wc(e){e.return!==null&&(vr(e,1),Xm(e,1,0))}function qc(e){for(;e===fu;)fu=di[--fi],di[fi]=null,hu=di[--fi],di[fi]=null;for(;e===Hr;)Hr=rn[--sn],rn[sn]=null,zn=rn[--sn],rn[sn]=null,Hn=rn[--sn],rn[sn]=null}var Xt=null,Kt=null,$e=!1,gn=null;function Jm(e,t){var n=ln(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function jf(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Xt=e,Kt=mr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Xt=e,Kt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Hr!==null?{id:Hn,overflow:zn}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=ln(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Xt=e,Kt=null,!0):!1;default:return!1}}function Ho(e){return(e.mode&1)!==0&&(e.flags&128)===0}function zo(e){if($e){var t=Kt;if(t){var n=t;if(!jf(e,t)){if(Ho(e))throw Error(Q(418));t=mr(n.nextSibling);var r=Xt;t&&jf(e,t)?Jm(r,n):(e.flags=e.flags&-4097|2,$e=!1,Xt=e)}}else{if(Ho(e))throw Error(Q(418));e.flags=e.flags&-4097|2,$e=!1,Xt=e}}}function Uf(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Xt=e}function ka(e){if(e!==Xt)return!1;if(!$e)return Uf(e),$e=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Fo(e.type,e.memoizedProps)),t&&(t=Kt)){if(Ho(e))throw Zm(),Error(Q(418));for(;t;)Jm(e,t),t=mr(t.nextSibling)}if(Uf(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Q(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Kt=mr(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Kt=null}}else Kt=Xt?mr(e.stateNode.nextSibling):null;return!0}function Zm(){for(var e=Kt;e;)e=mr(e.nextSibling)}function Ni(){Kt=Xt=null,$e=!1}function Qc(e){gn===null?gn=[e]:gn.push(e)}var CT=Gn.ReactCurrentBatchConfig;function Gi(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(Q(309));var r=n.stateNode}if(!r)throw Error(Q(147,e));var i=r,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(a){var u=i.refs;a===null?delete u[s]:u[s]=a},t._stringRef=s,t)}if(typeof e!="string")throw Error(Q(284));if(!n._owner)throw Error(Q(290,e))}return e}function Sa(e,t){throw e=Object.prototype.toString.call(t),Error(Q(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Hf(e){var t=e._init;return t(e._payload)}function ep(e){function t(g,T){if(e){var x=g.deletions;x===null?(g.deletions=[T],g.flags|=16):x.push(T)}}function n(g,T){if(!e)return null;for(;T!==null;)t(g,T),T=T.sibling;return null}function r(g,T){for(g=new Map;T!==null;)T.key!==null?g.set(T.key,T):g.set(T.index,T),T=T.sibling;return g}function i(g,T){return g=Tr(g,T),g.index=0,g.sibling=null,g}function s(g,T,x){return g.index=x,e?(x=g.alternate,x!==null?(x=x.index,x<T?(g.flags|=2,T):x):(g.flags|=2,T)):(g.flags|=1048576,T)}function a(g){return e&&g.alternate===null&&(g.flags|=2),g}function u(g,T,x,R){return T===null||T.tag!==6?(T=$l(x,g.mode,R),T.return=g,T):(T=i(T,x),T.return=g,T)}function l(g,T,x,R){var B=x.type;return B===si?f(g,T,x.props.children,R,x.key):T!==null&&(T.elementType===B||typeof B=="object"&&B!==null&&B.$$typeof===ir&&Hf(B)===T.type)?(R=i(T,x.props),R.ref=Gi(g,T,x),R.return=g,R):(R=Qa(x.type,x.key,x.props,null,g.mode,R),R.ref=Gi(g,T,x),R.return=g,R)}function d(g,T,x,R){return T===null||T.tag!==4||T.stateNode.containerInfo!==x.containerInfo||T.stateNode.implementation!==x.implementation?(T=Yl(x,g.mode,R),T.return=g,T):(T=i(T,x.children||[]),T.return=g,T)}function f(g,T,x,R,B){return T===null||T.tag!==7?(T=Fr(x,g.mode,R,B),T.return=g,T):(T=i(T,x),T.return=g,T)}function h(g,T,x){if(typeof T=="string"&&T!==""||typeof T=="number")return T=$l(""+T,g.mode,x),T.return=g,T;if(typeof T=="object"&&T!==null){switch(T.$$typeof){case ha:return x=Qa(T.type,T.key,T.props,null,g.mode,x),x.ref=Gi(g,null,T),x.return=g,x;case ii:return T=Yl(T,g.mode,x),T.return=g,T;case ir:var R=T._init;return h(g,R(T._payload),x)}if(ss(T)||Yi(T))return T=Fr(T,g.mode,x,null),T.return=g,T;Sa(g,T)}return null}function m(g,T,x,R){var B=T!==null?T.key:null;if(typeof x=="string"&&x!==""||typeof x=="number")return B!==null?null:u(g,T,""+x,R);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case ha:return x.key===B?l(g,T,x,R):null;case ii:return x.key===B?d(g,T,x,R):null;case ir:return B=x._init,m(g,T,B(x._payload),R)}if(ss(x)||Yi(x))return B!==null?null:f(g,T,x,R,null);Sa(g,x)}return null}function p(g,T,x,R,B){if(typeof R=="string"&&R!==""||typeof R=="number")return g=g.get(x)||null,u(T,g,""+R,B);if(typeof R=="object"&&R!==null){switch(R.$$typeof){case ha:return g=g.get(R.key===null?x:R.key)||null,l(T,g,R,B);case ii:return g=g.get(R.key===null?x:R.key)||null,d(T,g,R,B);case ir:var C=R._init;return p(g,T,x,C(R._payload),B)}if(ss(R)||Yi(R))return g=g.get(x)||null,f(T,g,R,B,null);Sa(T,R)}return null}function E(g,T,x,R){for(var B=null,C=null,I=T,D=T=0,Y=null;I!==null&&D<x.length;D++){I.index>D?(Y=I,I=null):Y=I.sibling;var w=m(g,I,x[D],R);if(w===null){I===null&&(I=Y);break}e&&I&&w.alternate===null&&t(g,I),T=s(w,T,D),C===null?B=w:C.sibling=w,C=w,I=Y}if(D===x.length)return n(g,I),$e&&vr(g,D),B;if(I===null){for(;D<x.length;D++)I=h(g,x[D],R),I!==null&&(T=s(I,T,D),C===null?B=I:C.sibling=I,C=I);return $e&&vr(g,D),B}for(I=r(g,I);D<x.length;D++)Y=p(I,g,D,x[D],R),Y!==null&&(e&&Y.alternate!==null&&I.delete(Y.key===null?D:Y.key),T=s(Y,T,D),C===null?B=Y:C.sibling=Y,C=Y);return e&&I.forEach(function(V){return t(g,V)}),$e&&vr(g,D),B}function k(g,T,x,R){var B=Yi(x);if(typeof B!="function")throw Error(Q(150));if(x=B.call(x),x==null)throw Error(Q(151));for(var C=B=null,I=T,D=T=0,Y=null,w=x.next();I!==null&&!w.done;D++,w=x.next()){I.index>D?(Y=I,I=null):Y=I.sibling;var V=m(g,I,w.value,R);if(V===null){I===null&&(I=Y);break}e&&I&&V.alternate===null&&t(g,I),T=s(V,T,D),C===null?B=V:C.sibling=V,C=V,I=Y}if(w.done)return n(g,I),$e&&vr(g,D),B;if(I===null){for(;!w.done;D++,w=x.next())w=h(g,w.value,R),w!==null&&(T=s(w,T,D),C===null?B=w:C.sibling=w,C=w);return $e&&vr(g,D),B}for(I=r(g,I);!w.done;D++,w=x.next())w=p(I,g,D,w.value,R),w!==null&&(e&&w.alternate!==null&&I.delete(w.key===null?D:w.key),T=s(w,T,D),C===null?B=w:C.sibling=w,C=w);return e&&I.forEach(function(X){return t(g,X)}),$e&&vr(g,D),B}function L(g,T,x,R){if(typeof x=="object"&&x!==null&&x.type===si&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case ha:e:{for(var B=x.key,C=T;C!==null;){if(C.key===B){if(B=x.type,B===si){if(C.tag===7){n(g,C.sibling),T=i(C,x.props.children),T.return=g,g=T;break e}}else if(C.elementType===B||typeof B=="object"&&B!==null&&B.$$typeof===ir&&Hf(B)===C.type){n(g,C.sibling),T=i(C,x.props),T.ref=Gi(g,C,x),T.return=g,g=T;break e}n(g,C);break}else t(g,C);C=C.sibling}x.type===si?(T=Fr(x.props.children,g.mode,R,x.key),T.return=g,g=T):(R=Qa(x.type,x.key,x.props,null,g.mode,R),R.ref=Gi(g,T,x),R.return=g,g=R)}return a(g);case ii:e:{for(C=x.key;T!==null;){if(T.key===C)if(T.tag===4&&T.stateNode.containerInfo===x.containerInfo&&T.stateNode.implementation===x.implementation){n(g,T.sibling),T=i(T,x.children||[]),T.return=g,g=T;break e}else{n(g,T);break}else t(g,T);T=T.sibling}T=Yl(x,g.mode,R),T.return=g,g=T}return a(g);case ir:return C=x._init,L(g,T,C(x._payload),R)}if(ss(x))return E(g,T,x,R);if(Yi(x))return k(g,T,x,R);Sa(g,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,T!==null&&T.tag===6?(n(g,T.sibling),T=i(T,x),T.return=g,g=T):(n(g,T),T=$l(x,g.mode,R),T.return=g,g=T),a(g)):n(g,T)}return L}var Ai=ep(!0),tp=ep(!1),mu=kr(null),pu=null,hi=null,Gc=null;function Kc(){Gc=hi=pu=null}function Xc(e){var t=mu.current;He(mu),e._currentValue=t}function $o(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function xi(e,t){pu=e,Gc=hi=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ut=!0),e.firstContext=null)}function cn(e){var t=e._currentValue;if(Gc!==e)if(e={context:e,memoizedValue:t,next:null},hi===null){if(pu===null)throw Error(Q(308));hi=e,pu.dependencies={lanes:0,firstContext:e}}else hi=hi.next=e;return t}var Dr=null;function Jc(e){Dr===null?Dr=[e]:Dr.push(e)}function np(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Jc(t)):(n.next=i.next,i.next=n),t.interleaved=n,qn(e,r)}function qn(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var sr=!1;function Zc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function rp(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Yn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function pr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ve&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,qn(e,n)}return i=r.interleaved,i===null?(t.next=t,Jc(r)):(t.next=i.next,i.next=t),r.interleaved=t,qn(e,n)}function za(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Bc(e,n)}}function zf(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?i=s=a:s=s.next=a,n=n.next}while(n!==null);s===null?i=s=t:s=s.next=t}else i=s=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function gu(e,t,n,r){var i=e.updateQueue;sr=!1;var s=i.firstBaseUpdate,a=i.lastBaseUpdate,u=i.shared.pending;if(u!==null){i.shared.pending=null;var l=u,d=l.next;l.next=null,a===null?s=d:a.next=d,a=l;var f=e.alternate;f!==null&&(f=f.updateQueue,u=f.lastBaseUpdate,u!==a&&(u===null?f.firstBaseUpdate=d:u.next=d,f.lastBaseUpdate=l))}if(s!==null){var h=i.baseState;a=0,f=d=l=null,u=s;do{var m=u.lane,p=u.eventTime;if((r&m)===m){f!==null&&(f=f.next={eventTime:p,lane:0,tag:u.tag,payload:u.payload,callback:u.callback,next:null});e:{var E=e,k=u;switch(m=t,p=n,k.tag){case 1:if(E=k.payload,typeof E=="function"){h=E.call(p,h,m);break e}h=E;break e;case 3:E.flags=E.flags&-65537|128;case 0:if(E=k.payload,m=typeof E=="function"?E.call(p,h,m):E,m==null)break e;h=qe({},h,m);break e;case 2:sr=!0}}u.callback!==null&&u.lane!==0&&(e.flags|=64,m=i.effects,m===null?i.effects=[u]:m.push(u))}else p={eventTime:p,lane:m,tag:u.tag,payload:u.payload,callback:u.callback,next:null},f===null?(d=f=p,l=h):f=f.next=p,a|=m;if(u=u.next,u===null){if(u=i.shared.pending,u===null)break;m=u,u=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(!0);if(f===null&&(l=h),i.baseState=l,i.firstBaseUpdate=d,i.lastBaseUpdate=f,t=i.shared.interleaved,t!==null){i=t;do a|=i.lane,i=i.next;while(i!==t)}else s===null&&(i.shared.lanes=0);$r|=a,e.lanes=a,e.memoizedState=h}}function $f(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(Q(191,i));i.call(r)}}}var ta={},Dn=kr(ta),Us=kr(ta),Hs=kr(ta);function Rr(e){if(e===ta)throw Error(Q(174));return e}function ed(e,t){switch(je(Hs,t),je(Us,e),je(Dn,ta),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ko(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=ko(t,e)}He(Dn),je(Dn,t)}function vi(){He(Dn),He(Us),He(Hs)}function ip(e){Rr(Hs.current);var t=Rr(Dn.current),n=ko(t,e.type);t!==n&&(je(Us,e),je(Dn,n))}function td(e){Us.current===e&&(He(Dn),He(Us))}var Ve=kr(0);function Eu(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Fl=[];function nd(){for(var e=0;e<Fl.length;e++)Fl[e]._workInProgressVersionPrimary=null;Fl.length=0}var $a=Gn.ReactCurrentDispatcher,Bl=Gn.ReactCurrentBatchConfig,zr=0,We=null,st=null,ot=null,Tu=!1,ps=!1,zs=0,NT=0;function Et(){throw Error(Q(321))}function rd(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!xn(e[n],t[n]))return!1;return!0}function id(e,t,n,r,i,s){if(zr=s,We=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,$a.current=e===null||e.memoizedState===null?IT:LT,e=n(r,i),ps){s=0;do{if(ps=!1,zs=0,25<=s)throw Error(Q(301));s+=1,ot=st=null,t.updateQueue=null,$a.current=DT,e=n(r,i)}while(ps)}if($a.current=yu,t=st!==null&&st.next!==null,zr=0,ot=st=We=null,Tu=!1,t)throw Error(Q(300));return e}function sd(){var e=zs!==0;return zs=0,e}function Nn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ot===null?We.memoizedState=ot=e:ot=ot.next=e,ot}function dn(){if(st===null){var e=We.alternate;e=e!==null?e.memoizedState:null}else e=st.next;var t=ot===null?We.memoizedState:ot.next;if(t!==null)ot=t,st=e;else{if(e===null)throw Error(Q(310));st=e,e={memoizedState:st.memoizedState,baseState:st.baseState,baseQueue:st.baseQueue,queue:st.queue,next:null},ot===null?We.memoizedState=ot=e:ot=ot.next=e}return ot}function $s(e,t){return typeof t=="function"?t(e):t}function jl(e){var t=dn(),n=t.queue;if(n===null)throw Error(Q(311));n.lastRenderedReducer=e;var r=st,i=r.baseQueue,s=n.pending;if(s!==null){if(i!==null){var a=i.next;i.next=s.next,s.next=a}r.baseQueue=i=s,n.pending=null}if(i!==null){s=i.next,r=r.baseState;var u=a=null,l=null,d=s;do{var f=d.lane;if((zr&f)===f)l!==null&&(l=l.next={lane:0,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null}),r=d.hasEagerState?d.eagerState:e(r,d.action);else{var h={lane:f,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null};l===null?(u=l=h,a=r):l=l.next=h,We.lanes|=f,$r|=f}d=d.next}while(d!==null&&d!==s);l===null?a=r:l.next=u,xn(r,t.memoizedState)||(Ut=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do s=i.lane,We.lanes|=s,$r|=s,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Ul(e){var t=dn(),n=t.queue;if(n===null)throw Error(Q(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,s=t.memoizedState;if(i!==null){n.pending=null;var a=i=i.next;do s=e(s,a.action),a=a.next;while(a!==i);xn(s,t.memoizedState)||(Ut=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function sp(){}function ap(e,t){var n=We,r=dn(),i=t(),s=!xn(r.memoizedState,i);if(s&&(r.memoizedState=i,Ut=!0),r=r.queue,ad(op.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||ot!==null&&ot.memoizedState.tag&1){if(n.flags|=2048,Ys(9,lp.bind(null,n,r,i,t),void 0,null),dt===null)throw Error(Q(349));zr&30||up(n,t,i)}return i}function up(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=We.updateQueue,t===null?(t={lastEffect:null,stores:null},We.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function lp(e,t,n,r){t.value=n,t.getSnapshot=r,cp(t)&&dp(e)}function op(e,t,n){return n(function(){cp(t)&&dp(e)})}function cp(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!xn(e,n)}catch{return!0}}function dp(e){var t=qn(e,1);t!==null&&yn(t,e,1,-1)}function Yf(e){var t=Nn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:$s,lastRenderedState:e},t.queue=e,e=e.dispatch=wT.bind(null,We,e),[t.memoizedState,e]}function Ys(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=We.updateQueue,t===null?(t={lastEffect:null,stores:null},We.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function fp(){return dn().memoizedState}function Ya(e,t,n,r){var i=Nn();We.flags|=e,i.memoizedState=Ys(1|t,n,void 0,r===void 0?null:r)}function Wu(e,t,n,r){var i=dn();r=r===void 0?null:r;var s=void 0;if(st!==null){var a=st.memoizedState;if(s=a.destroy,r!==null&&rd(r,a.deps)){i.memoizedState=Ys(t,n,s,r);return}}We.flags|=e,i.memoizedState=Ys(1|t,n,s,r)}function Vf(e,t){return Ya(8390656,8,e,t)}function ad(e,t){return Wu(2048,8,e,t)}function hp(e,t){return Wu(4,2,e,t)}function mp(e,t){return Wu(4,4,e,t)}function pp(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function gp(e,t,n){return n=n!=null?n.concat([e]):null,Wu(4,4,pp.bind(null,t,e),n)}function ud(){}function Ep(e,t){var n=dn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&rd(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Tp(e,t){var n=dn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&rd(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function yp(e,t,n){return zr&21?(xn(n,t)||(n=Sm(),We.lanes|=n,$r|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ut=!0),e.memoizedState=n)}function AT(e,t){var n=Re;Re=n!==0&&4>n?n:4,e(!0);var r=Bl.transition;Bl.transition={};try{e(!1),t()}finally{Re=n,Bl.transition=r}}function bp(){return dn().memoizedState}function vT(e,t,n){var r=Er(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},xp(e))_p(t,n);else if(n=np(e,t,n,r),n!==null){var i=Lt();yn(n,e,r,i),kp(n,t,r)}}function wT(e,t,n){var r=Er(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(xp(e))_p(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var a=t.lastRenderedState,u=s(a,n);if(i.hasEagerState=!0,i.eagerState=u,xn(u,a)){var l=t.interleaved;l===null?(i.next=i,Jc(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=np(e,t,i,r),n!==null&&(i=Lt(),yn(n,e,r,i),kp(n,t,r))}}function xp(e){var t=e.alternate;return e===We||t!==null&&t===We}function _p(e,t){ps=Tu=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function kp(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Bc(e,n)}}var yu={readContext:cn,useCallback:Et,useContext:Et,useEffect:Et,useImperativeHandle:Et,useInsertionEffect:Et,useLayoutEffect:Et,useMemo:Et,useReducer:Et,useRef:Et,useState:Et,useDebugValue:Et,useDeferredValue:Et,useTransition:Et,useMutableSource:Et,useSyncExternalStore:Et,useId:Et,unstable_isNewReconciler:!1},IT={readContext:cn,useCallback:function(e,t){return Nn().memoizedState=[e,t===void 0?null:t],e},useContext:cn,useEffect:Vf,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ya(4194308,4,pp.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ya(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ya(4,2,e,t)},useMemo:function(e,t){var n=Nn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Nn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=vT.bind(null,We,e),[r.memoizedState,e]},useRef:function(e){var t=Nn();return e={current:e},t.memoizedState=e},useState:Yf,useDebugValue:ud,useDeferredValue:function(e){return Nn().memoizedState=e},useTransition:function(){var e=Yf(!1),t=e[0];return e=AT.bind(null,e[1]),Nn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=We,i=Nn();if($e){if(n===void 0)throw Error(Q(407));n=n()}else{if(n=t(),dt===null)throw Error(Q(349));zr&30||up(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,Vf(op.bind(null,r,s,e),[e]),r.flags|=2048,Ys(9,lp.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=Nn(),t=dt.identifierPrefix;if($e){var n=zn,r=Hn;n=(r&~(1<<32-Tn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=zs++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=NT++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},LT={readContext:cn,useCallback:Ep,useContext:cn,useEffect:ad,useImperativeHandle:gp,useInsertionEffect:hp,useLayoutEffect:mp,useMemo:Tp,useReducer:jl,useRef:fp,useState:function(){return jl($s)},useDebugValue:ud,useDeferredValue:function(e){var t=dn();return yp(t,st.memoizedState,e)},useTransition:function(){var e=jl($s)[0],t=dn().memoizedState;return[e,t]},useMutableSource:sp,useSyncExternalStore:ap,useId:bp,unstable_isNewReconciler:!1},DT={readContext:cn,useCallback:Ep,useContext:cn,useEffect:ad,useImperativeHandle:gp,useInsertionEffect:hp,useLayoutEffect:mp,useMemo:Tp,useReducer:Ul,useRef:fp,useState:function(){return Ul($s)},useDebugValue:ud,useDeferredValue:function(e){var t=dn();return st===null?t.memoizedState=e:yp(t,st.memoizedState,e)},useTransition:function(){var e=Ul($s)[0],t=dn().memoizedState;return[e,t]},useMutableSource:sp,useSyncExternalStore:ap,useId:bp,unstable_isNewReconciler:!1};function mn(e,t){if(e&&e.defaultProps){t=qe({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Yo(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:qe({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var qu={isMounted:function(e){return(e=e._reactInternals)?Qr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Lt(),i=Er(e),s=Yn(r,i);s.payload=t,n!=null&&(s.callback=n),t=pr(e,s,i),t!==null&&(yn(t,e,i,r),za(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Lt(),i=Er(e),s=Yn(r,i);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=pr(e,s,i),t!==null&&(yn(t,e,i,r),za(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Lt(),r=Er(e),i=Yn(n,r);i.tag=2,t!=null&&(i.callback=t),t=pr(e,i,r),t!==null&&(yn(t,e,r,n),za(t,e,r))}};function Wf(e,t,n,r,i,s,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,s,a):t.prototype&&t.prototype.isPureReactComponent?!Ms(n,r)||!Ms(i,s):!0}function Sp(e,t,n){var r=!1,i=br,s=t.contextType;return typeof s=="object"&&s!==null?s=cn(s):(i=zt(t)?Ur:_t.current,r=t.contextTypes,s=(r=r!=null)?Ci(e,i):br),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=qu,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function qf(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&qu.enqueueReplaceState(t,t.state,null)}function Vo(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Zc(e);var s=t.contextType;typeof s=="object"&&s!==null?i.context=cn(s):(s=zt(t)?Ur:_t.current,i.context=Ci(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(Yo(e,t,s,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&qu.enqueueReplaceState(i,i.state,null),gu(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function wi(e,t){try{var n="",r=t;do n+=a2(r),r=r.return;while(r);var i=n}catch(s){i=`
39
+ Error generating stack: `+s.message+`
40
+ `+s.stack}return{value:e,source:t,stack:i,digest:null}}function Hl(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Wo(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var RT=typeof WeakMap=="function"?WeakMap:Map;function Cp(e,t,n){n=Yn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){xu||(xu=!0,nc=r),Wo(e,t)},n}function Np(e,t,n){n=Yn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Wo(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){Wo(e,t),typeof r!="function"&&(gr===null?gr=new Set([this]):gr.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function Qf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new RT;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=qT.bind(null,e,t,n),t.then(e,e))}function Gf(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Kf(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Yn(-1,1),t.tag=2,pr(n,t,1))),n.lanes|=1),e)}var OT=Gn.ReactCurrentOwner,Ut=!1;function wt(e,t,n,r){t.child=e===null?tp(t,null,n,r):Ai(t,e.child,n,r)}function Xf(e,t,n,r,i){n=n.render;var s=t.ref;return xi(t,i),r=id(e,t,n,r,s,i),n=sd(),e!==null&&!Ut?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Qn(e,t,i)):($e&&n&&Wc(t),t.flags|=1,wt(e,t,r,i),t.child)}function Jf(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!pd(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,Ap(e,t,s,r,i)):(e=Qa(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&i)){var a=s.memoizedProps;if(n=n.compare,n=n!==null?n:Ms,n(a,r)&&e.ref===t.ref)return Qn(e,t,i)}return t.flags|=1,e=Tr(s,r),e.ref=t.ref,e.return=t,t.child=e}function Ap(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(Ms(s,r)&&e.ref===t.ref)if(Ut=!1,t.pendingProps=r=s,(e.lanes&i)!==0)e.flags&131072&&(Ut=!0);else return t.lanes=e.lanes,Qn(e,t,i)}return qo(e,t,n,r,i)}function vp(e,t,n){var r=t.pendingProps,i=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},je(pi,Gt),Gt|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,je(pi,Gt),Gt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,je(pi,Gt),Gt|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,je(pi,Gt),Gt|=r;return wt(e,t,i,n),t.child}function wp(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function qo(e,t,n,r,i){var s=zt(n)?Ur:_t.current;return s=Ci(t,s),xi(t,i),n=id(e,t,n,r,s,i),r=sd(),e!==null&&!Ut?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Qn(e,t,i)):($e&&r&&Wc(t),t.flags|=1,wt(e,t,n,i),t.child)}function Zf(e,t,n,r,i){if(zt(n)){var s=!0;du(t)}else s=!1;if(xi(t,i),t.stateNode===null)Va(e,t),Sp(t,n,r),Vo(t,n,r,i),r=!0;else if(e===null){var a=t.stateNode,u=t.memoizedProps;a.props=u;var l=a.context,d=n.contextType;typeof d=="object"&&d!==null?d=cn(d):(d=zt(n)?Ur:_t.current,d=Ci(t,d));var f=n.getDerivedStateFromProps,h=typeof f=="function"||typeof a.getSnapshotBeforeUpdate=="function";h||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(u!==r||l!==d)&&qf(t,a,r,d),sr=!1;var m=t.memoizedState;a.state=m,gu(t,r,a,i),l=t.memoizedState,u!==r||m!==l||Ht.current||sr?(typeof f=="function"&&(Yo(t,n,f,r),l=t.memoizedState),(u=sr||Wf(t,n,u,r,m,l,d))?(h||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=d,r=u):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,rp(e,t),u=t.memoizedProps,d=t.type===t.elementType?u:mn(t.type,u),a.props=d,h=t.pendingProps,m=a.context,l=n.contextType,typeof l=="object"&&l!==null?l=cn(l):(l=zt(n)?Ur:_t.current,l=Ci(t,l));var p=n.getDerivedStateFromProps;(f=typeof p=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(u!==h||m!==l)&&qf(t,a,r,l),sr=!1,m=t.memoizedState,a.state=m,gu(t,r,a,i);var E=t.memoizedState;u!==h||m!==E||Ht.current||sr?(typeof p=="function"&&(Yo(t,n,p,r),E=t.memoizedState),(d=sr||Wf(t,n,d,r,m,E,l)||!1)?(f||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,E,l),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,E,l)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||u===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=E),a.props=r,a.state=E,a.context=l,r=d):(typeof a.componentDidUpdate!="function"||u===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),r=!1)}return Qo(e,t,n,r,s,i)}function Qo(e,t,n,r,i,s){wp(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return i&&Bf(t,n,!1),Qn(e,t,s);r=t.stateNode,OT.current=t;var u=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=Ai(t,e.child,null,s),t.child=Ai(t,null,u,s)):wt(e,t,u,s),t.memoizedState=r.state,i&&Bf(t,n,!0),t.child}function Ip(e){var t=e.stateNode;t.pendingContext?Ff(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Ff(e,t.context,!1),ed(e,t.containerInfo)}function eh(e,t,n,r,i){return Ni(),Qc(i),t.flags|=256,wt(e,t,n,r),t.child}var Go={dehydrated:null,treeContext:null,retryLane:0};function Ko(e){return{baseLanes:e,cachePool:null,transitions:null}}function Lp(e,t,n){var r=t.pendingProps,i=Ve.current,s=!1,a=(t.flags&128)!==0,u;if((u=a)||(u=e!==null&&e.memoizedState===null?!1:(i&2)!==0),u?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),je(Ve,i&1),e===null)return zo(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(a=r.children,e=r.fallback,s?(r=t.mode,s=t.child,a={mode:"hidden",children:a},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=a):s=Ku(a,r,0,null),e=Fr(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Ko(n),t.memoizedState=Go,e):ld(t,a));if(i=e.memoizedState,i!==null&&(u=i.dehydrated,u!==null))return PT(e,t,a,r,u,i,n);if(s){s=r.fallback,a=t.mode,i=e.child,u=i.sibling;var l={mode:"hidden",children:r.children};return!(a&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=Tr(i,l),r.subtreeFlags=i.subtreeFlags&14680064),u!==null?s=Tr(u,s):(s=Fr(s,a,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,a=e.child.memoizedState,a=a===null?Ko(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},s.memoizedState=a,s.childLanes=e.childLanes&~n,t.memoizedState=Go,r}return s=e.child,e=s.sibling,r=Tr(s,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function ld(e,t){return t=Ku({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Ca(e,t,n,r){return r!==null&&Qc(r),Ai(t,e.child,null,n),e=ld(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function PT(e,t,n,r,i,s,a){if(n)return t.flags&256?(t.flags&=-257,r=Hl(Error(Q(422))),Ca(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=Ku({mode:"visible",children:r.children},i,0,null),s=Fr(s,i,a,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&Ai(t,e.child,null,a),t.child.memoizedState=Ko(a),t.memoizedState=Go,s);if(!(t.mode&1))return Ca(e,t,a,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var u=r.dgst;return r=u,s=Error(Q(419)),r=Hl(s,r,void 0),Ca(e,t,a,r)}if(u=(a&e.childLanes)!==0,Ut||u){if(r=dt,r!==null){switch(a&-a){case 4:i=2;break;case 16:i=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|a)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,qn(e,i),yn(r,e,i,-1))}return md(),r=Hl(Error(Q(421))),Ca(e,t,a,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=QT.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,Kt=mr(i.nextSibling),Xt=t,$e=!0,gn=null,e!==null&&(rn[sn++]=Hn,rn[sn++]=zn,rn[sn++]=Hr,Hn=e.id,zn=e.overflow,Hr=t),t=ld(t,r.children),t.flags|=4096,t)}function th(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),$o(e.return,t,n)}function zl(e,t,n,r,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function Dp(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;if(wt(e,t,r.children,n),r=Ve.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&th(e,n,t);else if(e.tag===19)th(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(je(Ve,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Eu(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),zl(t,!1,i,n,s);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Eu(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}zl(t,!0,n,null,s);break;case"together":zl(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Va(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Qn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),$r|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(Q(153));if(t.child!==null){for(e=t.child,n=Tr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Tr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function MT(e,t,n){switch(t.tag){case 3:Ip(t),Ni();break;case 5:ip(t);break;case 1:zt(t.type)&&du(t);break;case 4:ed(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;je(mu,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(je(Ve,Ve.current&1),t.flags|=128,null):n&t.child.childLanes?Lp(e,t,n):(je(Ve,Ve.current&1),e=Qn(e,t,n),e!==null?e.sibling:null);je(Ve,Ve.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Dp(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),je(Ve,Ve.current),r)break;return null;case 22:case 23:return t.lanes=0,vp(e,t,n)}return Qn(e,t,n)}var Rp,Xo,Op,Pp;Rp=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Xo=function(){};Op=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Rr(Dn.current);var s=null;switch(n){case"input":i=yo(e,i),r=yo(e,r),s=[];break;case"select":i=qe({},i,{value:void 0}),r=qe({},r,{value:void 0}),s=[];break;case"textarea":i=_o(e,i),r=_o(e,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=ou)}So(n,r);var a;n=null;for(d in i)if(!r.hasOwnProperty(d)&&i.hasOwnProperty(d)&&i[d]!=null)if(d==="style"){var u=i[d];for(a in u)u.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else d!=="dangerouslySetInnerHTML"&&d!=="children"&&d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&d!=="autoFocus"&&(ws.hasOwnProperty(d)?s||(s=[]):(s=s||[]).push(d,null));for(d in r){var l=r[d];if(u=i!=null?i[d]:void 0,r.hasOwnProperty(d)&&l!==u&&(l!=null||u!=null))if(d==="style")if(u){for(a in u)!u.hasOwnProperty(a)||l&&l.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in l)l.hasOwnProperty(a)&&u[a]!==l[a]&&(n||(n={}),n[a]=l[a])}else n||(s||(s=[]),s.push(d,n)),n=l;else d==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,u=u?u.__html:void 0,l!=null&&u!==l&&(s=s||[]).push(d,l)):d==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(d,""+l):d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&(ws.hasOwnProperty(d)?(l!=null&&d==="onScroll"&&Ue("scroll",e),s||u===l||(s=[])):(s=s||[]).push(d,l))}n&&(s=s||[]).push("style",n);var d=s;(t.updateQueue=d)&&(t.flags|=4)}};Pp=function(e,t,n,r){n!==r&&(t.flags|=4)};function Ki(e,t){if(!$e)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Tt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function FT(e,t,n){var r=t.pendingProps;switch(qc(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Tt(t),null;case 1:return zt(t.type)&&cu(),Tt(t),null;case 3:return r=t.stateNode,vi(),He(Ht),He(_t),nd(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(ka(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,gn!==null&&(sc(gn),gn=null))),Xo(e,t),Tt(t),null;case 5:td(t);var i=Rr(Hs.current);if(n=t.type,e!==null&&t.stateNode!=null)Op(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(Q(166));return Tt(t),null}if(e=Rr(Dn.current),ka(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[wn]=t,r[js]=s,e=(t.mode&1)!==0,n){case"dialog":Ue("cancel",r),Ue("close",r);break;case"iframe":case"object":case"embed":Ue("load",r);break;case"video":case"audio":for(i=0;i<us.length;i++)Ue(us[i],r);break;case"source":Ue("error",r);break;case"img":case"image":case"link":Ue("error",r),Ue("load",r);break;case"details":Ue("toggle",r);break;case"input":cf(r,s),Ue("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Ue("invalid",r);break;case"textarea":ff(r,s),Ue("invalid",r)}So(n,s),i=null;for(var a in s)if(s.hasOwnProperty(a)){var u=s[a];a==="children"?typeof u=="string"?r.textContent!==u&&(s.suppressHydrationWarning!==!0&&_a(r.textContent,u,e),i=["children",u]):typeof u=="number"&&r.textContent!==""+u&&(s.suppressHydrationWarning!==!0&&_a(r.textContent,u,e),i=["children",""+u]):ws.hasOwnProperty(a)&&u!=null&&a==="onScroll"&&Ue("scroll",r)}switch(n){case"input":ma(r),df(r,s,!0);break;case"textarea":ma(r),hf(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=ou)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{a=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=om(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[wn]=t,e[js]=r,Rp(e,t,!1,!1),t.stateNode=e;e:{switch(a=Co(n,r),n){case"dialog":Ue("cancel",e),Ue("close",e),i=r;break;case"iframe":case"object":case"embed":Ue("load",e),i=r;break;case"video":case"audio":for(i=0;i<us.length;i++)Ue(us[i],e);i=r;break;case"source":Ue("error",e),i=r;break;case"img":case"image":case"link":Ue("error",e),Ue("load",e),i=r;break;case"details":Ue("toggle",e),i=r;break;case"input":cf(e,r),i=yo(e,r),Ue("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=qe({},r,{value:void 0}),Ue("invalid",e);break;case"textarea":ff(e,r),i=_o(e,r),Ue("invalid",e);break;default:i=r}So(n,i),u=i;for(s in u)if(u.hasOwnProperty(s)){var l=u[s];s==="style"?fm(e,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&cm(e,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Is(e,l):typeof l=="number"&&Is(e,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(ws.hasOwnProperty(s)?l!=null&&s==="onScroll"&&Ue("scroll",e):l!=null&&Dc(e,s,l,a))}switch(n){case"input":ma(e),df(e,r,!1);break;case"textarea":ma(e),hf(e);break;case"option":r.value!=null&&e.setAttribute("value",""+yr(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?Ei(e,!!r.multiple,s,!1):r.defaultValue!=null&&Ei(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=ou)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Tt(t),null;case 6:if(e&&t.stateNode!=null)Pp(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(Q(166));if(n=Rr(Hs.current),Rr(Dn.current),ka(t)){if(r=t.stateNode,n=t.memoizedProps,r[wn]=t,(s=r.nodeValue!==n)&&(e=Xt,e!==null))switch(e.tag){case 3:_a(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&_a(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[wn]=t,t.stateNode=r}return Tt(t),null;case 13:if(He(Ve),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if($e&&Kt!==null&&t.mode&1&&!(t.flags&128))Zm(),Ni(),t.flags|=98560,s=!1;else if(s=ka(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(Q(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(Q(317));s[wn]=t}else Ni(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Tt(t),s=!1}else gn!==null&&(sc(gn),gn=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Ve.current&1?at===0&&(at=3):md())),t.updateQueue!==null&&(t.flags|=4),Tt(t),null);case 4:return vi(),Xo(e,t),e===null&&Fs(t.stateNode.containerInfo),Tt(t),null;case 10:return Xc(t.type._context),Tt(t),null;case 17:return zt(t.type)&&cu(),Tt(t),null;case 19:if(He(Ve),s=t.memoizedState,s===null)return Tt(t),null;if(r=(t.flags&128)!==0,a=s.rendering,a===null)if(r)Ki(s,!1);else{if(at!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=Eu(e),a!==null){for(t.flags|=128,Ki(s,!1),r=a.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)s=n,e=r,s.flags&=14680066,a=s.alternate,a===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=a.childLanes,s.lanes=a.lanes,s.child=a.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=a.memoizedProps,s.memoizedState=a.memoizedState,s.updateQueue=a.updateQueue,s.type=a.type,e=a.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return je(Ve,Ve.current&1|2),t.child}e=e.sibling}s.tail!==null&&et()>Ii&&(t.flags|=128,r=!0,Ki(s,!1),t.lanes=4194304)}else{if(!r)if(e=Eu(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Ki(s,!0),s.tail===null&&s.tailMode==="hidden"&&!a.alternate&&!$e)return Tt(t),null}else 2*et()-s.renderingStartTime>Ii&&n!==1073741824&&(t.flags|=128,r=!0,Ki(s,!1),t.lanes=4194304);s.isBackwards?(a.sibling=t.child,t.child=a):(n=s.last,n!==null?n.sibling=a:t.child=a,s.last=a)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=et(),t.sibling=null,n=Ve.current,je(Ve,r?n&1|2:n&1),t):(Tt(t),null);case 22:case 23:return hd(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Gt&1073741824&&(Tt(t),t.subtreeFlags&6&&(t.flags|=8192)):Tt(t),null;case 24:return null;case 25:return null}throw Error(Q(156,t.tag))}function BT(e,t){switch(qc(t),t.tag){case 1:return zt(t.type)&&cu(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return vi(),He(Ht),He(_t),nd(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return td(t),null;case 13:if(He(Ve),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Q(340));Ni()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return He(Ve),null;case 4:return vi(),null;case 10:return Xc(t.type._context),null;case 22:case 23:return hd(),null;case 24:return null;default:return null}}var Na=!1,yt=!1,jT=typeof WeakSet=="function"?WeakSet:Set,re=null;function mi(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ke(e,t,r)}else n.current=null}function Jo(e,t,n){try{n()}catch(r){Ke(e,t,r)}}var nh=!1;function UT(e,t){if(Po=au,e=Um(),Vc(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var a=0,u=-1,l=-1,d=0,f=0,h=e,m=null;t:for(;;){for(var p;h!==n||i!==0&&h.nodeType!==3||(u=a+i),h!==s||r!==0&&h.nodeType!==3||(l=a+r),h.nodeType===3&&(a+=h.nodeValue.length),(p=h.firstChild)!==null;)m=h,h=p;for(;;){if(h===e)break t;if(m===n&&++d===i&&(u=a),m===s&&++f===r&&(l=a),(p=h.nextSibling)!==null)break;h=m,m=h.parentNode}h=p}n=u===-1||l===-1?null:{start:u,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Mo={focusedElem:e,selectionRange:n},au=!1,re=t;re!==null;)if(t=re,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,re=e;else for(;re!==null;){t=re;try{var E=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(E!==null){var k=E.memoizedProps,L=E.memoizedState,g=t.stateNode,T=g.getSnapshotBeforeUpdate(t.elementType===t.type?k:mn(t.type,k),L);g.__reactInternalSnapshotBeforeUpdate=T}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Q(163))}}catch(R){Ke(t,t.return,R)}if(e=t.sibling,e!==null){e.return=t.return,re=e;break}re=t.return}return E=nh,nh=!1,E}function gs(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&Jo(t,n,s)}i=i.next}while(i!==r)}}function Qu(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Zo(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Mp(e){var t=e.alternate;t!==null&&(e.alternate=null,Mp(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[wn],delete t[js],delete t[jo],delete t[_T],delete t[kT])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Fp(e){return e.tag===5||e.tag===3||e.tag===4}function rh(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Fp(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function ec(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=ou));else if(r!==4&&(e=e.child,e!==null))for(ec(e,t,n),e=e.sibling;e!==null;)ec(e,t,n),e=e.sibling}function tc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(tc(e,t,n),e=e.sibling;e!==null;)tc(e,t,n),e=e.sibling}var ht=null,pn=!1;function Jn(e,t,n){for(n=n.child;n!==null;)Bp(e,t,n),n=n.sibling}function Bp(e,t,n){if(Ln&&typeof Ln.onCommitFiberUnmount=="function")try{Ln.onCommitFiberUnmount(Uu,n)}catch{}switch(n.tag){case 5:yt||mi(n,t);case 6:var r=ht,i=pn;ht=null,Jn(e,t,n),ht=r,pn=i,ht!==null&&(pn?(e=ht,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ht.removeChild(n.stateNode));break;case 18:ht!==null&&(pn?(e=ht,n=n.stateNode,e.nodeType===8?Pl(e.parentNode,n):e.nodeType===1&&Pl(e,n),Os(e)):Pl(ht,n.stateNode));break;case 4:r=ht,i=pn,ht=n.stateNode.containerInfo,pn=!0,Jn(e,t,n),ht=r,pn=i;break;case 0:case 11:case 14:case 15:if(!yt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,a=s.destroy;s=s.tag,a!==void 0&&(s&2||s&4)&&Jo(n,t,a),i=i.next}while(i!==r)}Jn(e,t,n);break;case 1:if(!yt&&(mi(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(u){Ke(n,t,u)}Jn(e,t,n);break;case 21:Jn(e,t,n);break;case 22:n.mode&1?(yt=(r=yt)||n.memoizedState!==null,Jn(e,t,n),yt=r):Jn(e,t,n);break;default:Jn(e,t,n)}}function ih(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new jT),t.forEach(function(r){var i=GT.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function fn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var s=e,a=t,u=a;e:for(;u!==null;){switch(u.tag){case 5:ht=u.stateNode,pn=!1;break e;case 3:ht=u.stateNode.containerInfo,pn=!0;break e;case 4:ht=u.stateNode.containerInfo,pn=!0;break e}u=u.return}if(ht===null)throw Error(Q(160));Bp(s,a,i),ht=null,pn=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(d){Ke(i,t,d)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)jp(t,e),t=t.sibling}function jp(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(fn(t,e),Cn(e),r&4){try{gs(3,e,e.return),Qu(3,e)}catch(k){Ke(e,e.return,k)}try{gs(5,e,e.return)}catch(k){Ke(e,e.return,k)}}break;case 1:fn(t,e),Cn(e),r&512&&n!==null&&mi(n,n.return);break;case 5:if(fn(t,e),Cn(e),r&512&&n!==null&&mi(n,n.return),e.flags&32){var i=e.stateNode;try{Is(i,"")}catch(k){Ke(e,e.return,k)}}if(r&4&&(i=e.stateNode,i!=null)){var s=e.memoizedProps,a=n!==null?n.memoizedProps:s,u=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{u==="input"&&s.type==="radio"&&s.name!=null&&um(i,s),Co(u,a);var d=Co(u,s);for(a=0;a<l.length;a+=2){var f=l[a],h=l[a+1];f==="style"?fm(i,h):f==="dangerouslySetInnerHTML"?cm(i,h):f==="children"?Is(i,h):Dc(i,f,h,d)}switch(u){case"input":bo(i,s);break;case"textarea":lm(i,s);break;case"select":var m=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var p=s.value;p!=null?Ei(i,!!s.multiple,p,!1):m!==!!s.multiple&&(s.defaultValue!=null?Ei(i,!!s.multiple,s.defaultValue,!0):Ei(i,!!s.multiple,s.multiple?[]:"",!1))}i[js]=s}catch(k){Ke(e,e.return,k)}}break;case 6:if(fn(t,e),Cn(e),r&4){if(e.stateNode===null)throw Error(Q(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(k){Ke(e,e.return,k)}}break;case 3:if(fn(t,e),Cn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Os(t.containerInfo)}catch(k){Ke(e,e.return,k)}break;case 4:fn(t,e),Cn(e);break;case 13:fn(t,e),Cn(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(dd=et())),r&4&&ih(e);break;case 22:if(f=n!==null&&n.memoizedState!==null,e.mode&1?(yt=(d=yt)||f,fn(t,e),yt=d):fn(t,e),Cn(e),r&8192){if(d=e.memoizedState!==null,(e.stateNode.isHidden=d)&&!f&&e.mode&1)for(re=e,f=e.child;f!==null;){for(h=re=f;re!==null;){switch(m=re,p=m.child,m.tag){case 0:case 11:case 14:case 15:gs(4,m,m.return);break;case 1:mi(m,m.return);var E=m.stateNode;if(typeof E.componentWillUnmount=="function"){r=m,n=m.return;try{t=r,E.props=t.memoizedProps,E.state=t.memoizedState,E.componentWillUnmount()}catch(k){Ke(r,n,k)}}break;case 5:mi(m,m.return);break;case 22:if(m.memoizedState!==null){ah(h);continue}}p!==null?(p.return=m,re=p):ah(h)}f=f.sibling}e:for(f=null,h=e;;){if(h.tag===5){if(f===null){f=h;try{i=h.stateNode,d?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(u=h.stateNode,l=h.memoizedProps.style,a=l!=null&&l.hasOwnProperty("display")?l.display:null,u.style.display=dm("display",a))}catch(k){Ke(e,e.return,k)}}}else if(h.tag===6){if(f===null)try{h.stateNode.nodeValue=d?"":h.memoizedProps}catch(k){Ke(e,e.return,k)}}else if((h.tag!==22&&h.tag!==23||h.memoizedState===null||h===e)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;h.sibling===null;){if(h.return===null||h.return===e)break e;f===h&&(f=null),h=h.return}f===h&&(f=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:fn(t,e),Cn(e),r&4&&ih(e);break;case 21:break;default:fn(t,e),Cn(e)}}function Cn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Fp(n)){var r=n;break e}n=n.return}throw Error(Q(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(Is(i,""),r.flags&=-33);var s=rh(e);tc(e,s,i);break;case 3:case 4:var a=r.stateNode.containerInfo,u=rh(e);ec(e,u,a);break;default:throw Error(Q(161))}}catch(l){Ke(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function HT(e,t,n){re=e,Up(e)}function Up(e,t,n){for(var r=(e.mode&1)!==0;re!==null;){var i=re,s=i.child;if(i.tag===22&&r){var a=i.memoizedState!==null||Na;if(!a){var u=i.alternate,l=u!==null&&u.memoizedState!==null||yt;u=Na;var d=yt;if(Na=a,(yt=l)&&!d)for(re=i;re!==null;)a=re,l=a.child,a.tag===22&&a.memoizedState!==null?uh(i):l!==null?(l.return=a,re=l):uh(i);for(;s!==null;)re=s,Up(s),s=s.sibling;re=i,Na=u,yt=d}sh(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,re=s):sh(e)}}function sh(e){for(;re!==null;){var t=re;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:yt||Qu(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!yt)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:mn(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&$f(t,s,r);break;case 3:var a=t.updateQueue;if(a!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}$f(t,a,n)}break;case 5:var u=t.stateNode;if(n===null&&t.flags&4){n=u;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var d=t.alternate;if(d!==null){var f=d.memoizedState;if(f!==null){var h=f.dehydrated;h!==null&&Os(h)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Q(163))}yt||t.flags&512&&Zo(t)}catch(m){Ke(t,t.return,m)}}if(t===e){re=null;break}if(n=t.sibling,n!==null){n.return=t.return,re=n;break}re=t.return}}function ah(e){for(;re!==null;){var t=re;if(t===e){re=null;break}var n=t.sibling;if(n!==null){n.return=t.return,re=n;break}re=t.return}}function uh(e){for(;re!==null;){var t=re;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Qu(4,t)}catch(l){Ke(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(l){Ke(t,i,l)}}var s=t.return;try{Zo(t)}catch(l){Ke(t,s,l)}break;case 5:var a=t.return;try{Zo(t)}catch(l){Ke(t,a,l)}}}catch(l){Ke(t,t.return,l)}if(t===e){re=null;break}var u=t.sibling;if(u!==null){u.return=t.return,re=u;break}re=t.return}}var zT=Math.ceil,bu=Gn.ReactCurrentDispatcher,od=Gn.ReactCurrentOwner,on=Gn.ReactCurrentBatchConfig,ve=0,dt=null,rt=null,mt=0,Gt=0,pi=kr(0),at=0,Vs=null,$r=0,Gu=0,cd=0,Es=null,jt=null,dd=0,Ii=1/0,Bn=null,xu=!1,nc=null,gr=null,Aa=!1,or=null,_u=0,Ts=0,rc=null,Wa=-1,qa=0;function Lt(){return ve&6?et():Wa!==-1?Wa:Wa=et()}function Er(e){return e.mode&1?ve&2&&mt!==0?mt&-mt:CT.transition!==null?(qa===0&&(qa=Sm()),qa):(e=Re,e!==0||(e=window.event,e=e===void 0?16:Lm(e.type)),e):1}function yn(e,t,n,r){if(50<Ts)throw Ts=0,rc=null,Error(Q(185));Js(e,n,r),(!(ve&2)||e!==dt)&&(e===dt&&(!(ve&2)&&(Gu|=n),at===4&&ur(e,mt)),$t(e,r),n===1&&ve===0&&!(t.mode&1)&&(Ii=et()+500,Vu&&Sr()))}function $t(e,t){var n=e.callbackNode;C2(e,t);var r=su(e,e===dt?mt:0);if(r===0)n!==null&&gf(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&gf(n),t===1)e.tag===0?ST(lh.bind(null,e)):Km(lh.bind(null,e)),bT(function(){!(ve&6)&&Sr()}),n=null;else{switch(Cm(r)){case 1:n=Fc;break;case 4:n=_m;break;case 16:n=iu;break;case 536870912:n=km;break;default:n=iu}n=Qp(n,Hp.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Hp(e,t){if(Wa=-1,qa=0,ve&6)throw Error(Q(327));var n=e.callbackNode;if(_i()&&e.callbackNode!==n)return null;var r=su(e,e===dt?mt:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=ku(e,r);else{t=r;var i=ve;ve|=2;var s=$p();(dt!==e||mt!==t)&&(Bn=null,Ii=et()+500,Mr(e,t));do try{VT();break}catch(u){zp(e,u)}while(!0);Kc(),bu.current=s,ve=i,rt!==null?t=0:(dt=null,mt=0,t=at)}if(t!==0){if(t===2&&(i=Io(e),i!==0&&(r=i,t=ic(e,i))),t===1)throw n=Vs,Mr(e,0),ur(e,r),$t(e,et()),n;if(t===6)ur(e,r);else{if(i=e.current.alternate,!(r&30)&&!$T(i)&&(t=ku(e,r),t===2&&(s=Io(e),s!==0&&(r=s,t=ic(e,s))),t===1))throw n=Vs,Mr(e,0),ur(e,r),$t(e,et()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(Q(345));case 2:wr(e,jt,Bn);break;case 3:if(ur(e,r),(r&130023424)===r&&(t=dd+500-et(),10<t)){if(su(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){Lt(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Bo(wr.bind(null,e,jt,Bn),t);break}wr(e,jt,Bn);break;case 4:if(ur(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var a=31-Tn(r);s=1<<a,a=t[a],a>i&&(i=a),r&=~s}if(r=i,r=et()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*zT(r/1960))-r,10<r){e.timeoutHandle=Bo(wr.bind(null,e,jt,Bn),r);break}wr(e,jt,Bn);break;case 5:wr(e,jt,Bn);break;default:throw Error(Q(329))}}}return $t(e,et()),e.callbackNode===n?Hp.bind(null,e):null}function ic(e,t){var n=Es;return e.current.memoizedState.isDehydrated&&(Mr(e,t).flags|=256),e=ku(e,t),e!==2&&(t=jt,jt=n,t!==null&&sc(t)),e}function sc(e){jt===null?jt=e:jt.push.apply(jt,e)}function $T(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],s=i.getSnapshot;i=i.value;try{if(!xn(s(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function ur(e,t){for(t&=~cd,t&=~Gu,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Tn(t),r=1<<n;e[n]=-1,t&=~r}}function lh(e){if(ve&6)throw Error(Q(327));_i();var t=su(e,0);if(!(t&1))return $t(e,et()),null;var n=ku(e,t);if(e.tag!==0&&n===2){var r=Io(e);r!==0&&(t=r,n=ic(e,r))}if(n===1)throw n=Vs,Mr(e,0),ur(e,t),$t(e,et()),n;if(n===6)throw Error(Q(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,wr(e,jt,Bn),$t(e,et()),null}function fd(e,t){var n=ve;ve|=1;try{return e(t)}finally{ve=n,ve===0&&(Ii=et()+500,Vu&&Sr())}}function Yr(e){or!==null&&or.tag===0&&!(ve&6)&&_i();var t=ve;ve|=1;var n=on.transition,r=Re;try{if(on.transition=null,Re=1,e)return e()}finally{Re=r,on.transition=n,ve=t,!(ve&6)&&Sr()}}function hd(){Gt=pi.current,He(pi)}function Mr(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,yT(n)),rt!==null)for(n=rt.return;n!==null;){var r=n;switch(qc(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&cu();break;case 3:vi(),He(Ht),He(_t),nd();break;case 5:td(r);break;case 4:vi();break;case 13:He(Ve);break;case 19:He(Ve);break;case 10:Xc(r.type._context);break;case 22:case 23:hd()}n=n.return}if(dt=e,rt=e=Tr(e.current,null),mt=Gt=t,at=0,Vs=null,cd=Gu=$r=0,jt=Es=null,Dr!==null){for(t=0;t<Dr.length;t++)if(n=Dr[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,s=n.pending;if(s!==null){var a=s.next;s.next=i,r.next=a}n.pending=r}Dr=null}return e}function zp(e,t){do{var n=rt;try{if(Kc(),$a.current=yu,Tu){for(var r=We.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Tu=!1}if(zr=0,ot=st=We=null,ps=!1,zs=0,od.current=null,n===null||n.return===null){at=1,Vs=t,rt=null;break}e:{var s=e,a=n.return,u=n,l=t;if(t=mt,u.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var d=l,f=u,h=f.tag;if(!(f.mode&1)&&(h===0||h===11||h===15)){var m=f.alternate;m?(f.updateQueue=m.updateQueue,f.memoizedState=m.memoizedState,f.lanes=m.lanes):(f.updateQueue=null,f.memoizedState=null)}var p=Gf(a);if(p!==null){p.flags&=-257,Kf(p,a,u,s,t),p.mode&1&&Qf(s,d,t),t=p,l=d;var E=t.updateQueue;if(E===null){var k=new Set;k.add(l),t.updateQueue=k}else E.add(l);break e}else{if(!(t&1)){Qf(s,d,t),md();break e}l=Error(Q(426))}}else if($e&&u.mode&1){var L=Gf(a);if(L!==null){!(L.flags&65536)&&(L.flags|=256),Kf(L,a,u,s,t),Qc(wi(l,u));break e}}s=l=wi(l,u),at!==4&&(at=2),Es===null?Es=[s]:Es.push(s),s=a;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var g=Cp(s,l,t);zf(s,g);break e;case 1:u=l;var T=s.type,x=s.stateNode;if(!(s.flags&128)&&(typeof T.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(gr===null||!gr.has(x)))){s.flags|=65536,t&=-t,s.lanes|=t;var R=Np(s,u,t);zf(s,R);break e}}s=s.return}while(s!==null)}Vp(n)}catch(B){t=B,rt===n&&n!==null&&(rt=n=n.return);continue}break}while(!0)}function $p(){var e=bu.current;return bu.current=yu,e===null?yu:e}function md(){(at===0||at===3||at===2)&&(at=4),dt===null||!($r&268435455)&&!(Gu&268435455)||ur(dt,mt)}function ku(e,t){var n=ve;ve|=2;var r=$p();(dt!==e||mt!==t)&&(Bn=null,Mr(e,t));do try{YT();break}catch(i){zp(e,i)}while(!0);if(Kc(),ve=n,bu.current=r,rt!==null)throw Error(Q(261));return dt=null,mt=0,at}function YT(){for(;rt!==null;)Yp(rt)}function VT(){for(;rt!==null&&!g2();)Yp(rt)}function Yp(e){var t=qp(e.alternate,e,Gt);e.memoizedProps=e.pendingProps,t===null?Vp(e):rt=t,od.current=null}function Vp(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=BT(n,t),n!==null){n.flags&=32767,rt=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{at=6,rt=null;return}}else if(n=FT(n,t,Gt),n!==null){rt=n;return}if(t=t.sibling,t!==null){rt=t;return}rt=t=e}while(t!==null);at===0&&(at=5)}function wr(e,t,n){var r=Re,i=on.transition;try{on.transition=null,Re=1,WT(e,t,n,r)}finally{on.transition=i,Re=r}return null}function WT(e,t,n,r){do _i();while(or!==null);if(ve&6)throw Error(Q(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(Q(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(N2(e,s),e===dt&&(rt=dt=null,mt=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Aa||(Aa=!0,Qp(iu,function(){return _i(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=on.transition,on.transition=null;var a=Re;Re=1;var u=ve;ve|=4,od.current=null,UT(e,n),jp(n,e),fT(Mo),au=!!Po,Mo=Po=null,e.current=n,HT(n),E2(),ve=u,Re=a,on.transition=s}else e.current=n;if(Aa&&(Aa=!1,or=e,_u=i),s=e.pendingLanes,s===0&&(gr=null),b2(n.stateNode),$t(e,et()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(xu)throw xu=!1,e=nc,nc=null,e;return _u&1&&e.tag!==0&&_i(),s=e.pendingLanes,s&1?e===rc?Ts++:(Ts=0,rc=e):Ts=0,Sr(),null}function _i(){if(or!==null){var e=Cm(_u),t=on.transition,n=Re;try{if(on.transition=null,Re=16>e?16:e,or===null)var r=!1;else{if(e=or,or=null,_u=0,ve&6)throw Error(Q(331));var i=ve;for(ve|=4,re=e.current;re!==null;){var s=re,a=s.child;if(re.flags&16){var u=s.deletions;if(u!==null){for(var l=0;l<u.length;l++){var d=u[l];for(re=d;re!==null;){var f=re;switch(f.tag){case 0:case 11:case 15:gs(8,f,s)}var h=f.child;if(h!==null)h.return=f,re=h;else for(;re!==null;){f=re;var m=f.sibling,p=f.return;if(Mp(f),f===d){re=null;break}if(m!==null){m.return=p,re=m;break}re=p}}}var E=s.alternate;if(E!==null){var k=E.child;if(k!==null){E.child=null;do{var L=k.sibling;k.sibling=null,k=L}while(k!==null)}}re=s}}if(s.subtreeFlags&2064&&a!==null)a.return=s,re=a;else e:for(;re!==null;){if(s=re,s.flags&2048)switch(s.tag){case 0:case 11:case 15:gs(9,s,s.return)}var g=s.sibling;if(g!==null){g.return=s.return,re=g;break e}re=s.return}}var T=e.current;for(re=T;re!==null;){a=re;var x=a.child;if(a.subtreeFlags&2064&&x!==null)x.return=a,re=x;else e:for(a=T;re!==null;){if(u=re,u.flags&2048)try{switch(u.tag){case 0:case 11:case 15:Qu(9,u)}}catch(B){Ke(u,u.return,B)}if(u===a){re=null;break e}var R=u.sibling;if(R!==null){R.return=u.return,re=R;break e}re=u.return}}if(ve=i,Sr(),Ln&&typeof Ln.onPostCommitFiberRoot=="function")try{Ln.onPostCommitFiberRoot(Uu,e)}catch{}r=!0}return r}finally{Re=n,on.transition=t}}return!1}function oh(e,t,n){t=wi(n,t),t=Cp(e,t,1),e=pr(e,t,1),t=Lt(),e!==null&&(Js(e,1,t),$t(e,t))}function Ke(e,t,n){if(e.tag===3)oh(e,e,n);else for(;t!==null;){if(t.tag===3){oh(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(gr===null||!gr.has(r))){e=wi(n,e),e=Np(t,e,1),t=pr(t,e,1),e=Lt(),t!==null&&(Js(t,1,e),$t(t,e));break}}t=t.return}}function qT(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Lt(),e.pingedLanes|=e.suspendedLanes&n,dt===e&&(mt&n)===n&&(at===4||at===3&&(mt&130023424)===mt&&500>et()-dd?Mr(e,0):cd|=n),$t(e,t)}function Wp(e,t){t===0&&(e.mode&1?(t=Ea,Ea<<=1,!(Ea&130023424)&&(Ea=4194304)):t=1);var n=Lt();e=qn(e,t),e!==null&&(Js(e,t,n),$t(e,n))}function QT(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Wp(e,n)}function GT(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Q(314))}r!==null&&r.delete(t),Wp(e,n)}var qp;qp=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ht.current)Ut=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ut=!1,MT(e,t,n);Ut=!!(e.flags&131072)}else Ut=!1,$e&&t.flags&1048576&&Xm(t,hu,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Va(e,t),e=t.pendingProps;var i=Ci(t,_t.current);xi(t,n),i=id(null,t,r,e,i,n);var s=sd();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,zt(r)?(s=!0,du(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Zc(t),i.updater=qu,t.stateNode=i,i._reactInternals=t,Vo(t,r,e,n),t=Qo(null,t,r,!0,s,n)):(t.tag=0,$e&&s&&Wc(t),wt(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Va(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=XT(r),e=mn(r,e),i){case 0:t=qo(null,t,r,e,n);break e;case 1:t=Zf(null,t,r,e,n);break e;case 11:t=Xf(null,t,r,e,n);break e;case 14:t=Jf(null,t,r,mn(r.type,e),n);break e}throw Error(Q(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:mn(r,i),qo(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:mn(r,i),Zf(e,t,r,i,n);case 3:e:{if(Ip(t),e===null)throw Error(Q(387));r=t.pendingProps,s=t.memoizedState,i=s.element,rp(e,t),gu(t,r,null,n);var a=t.memoizedState;if(r=a.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=wi(Error(Q(423)),t),t=eh(e,t,r,n,i);break e}else if(r!==i){i=wi(Error(Q(424)),t),t=eh(e,t,r,n,i);break e}else for(Kt=mr(t.stateNode.containerInfo.firstChild),Xt=t,$e=!0,gn=null,n=tp(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ni(),r===i){t=Qn(e,t,n);break e}wt(e,t,r,n)}t=t.child}return t;case 5:return ip(t),e===null&&zo(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,a=i.children,Fo(r,i)?a=null:s!==null&&Fo(r,s)&&(t.flags|=32),wp(e,t),wt(e,t,a,n),t.child;case 6:return e===null&&zo(t),null;case 13:return Lp(e,t,n);case 4:return ed(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ai(t,null,r,n):wt(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:mn(r,i),Xf(e,t,r,i,n);case 7:return wt(e,t,t.pendingProps,n),t.child;case 8:return wt(e,t,t.pendingProps.children,n),t.child;case 12:return wt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,a=i.value,je(mu,r._currentValue),r._currentValue=a,s!==null)if(xn(s.value,a)){if(s.children===i.children&&!Ht.current){t=Qn(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var u=s.dependencies;if(u!==null){a=s.child;for(var l=u.firstContext;l!==null;){if(l.context===r){if(s.tag===1){l=Yn(-1,n&-n),l.tag=2;var d=s.updateQueue;if(d!==null){d=d.shared;var f=d.pending;f===null?l.next=l:(l.next=f.next,f.next=l),d.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),$o(s.return,n,t),u.lanes|=n;break}l=l.next}}else if(s.tag===10)a=s.type===t.type?null:s.child;else if(s.tag===18){if(a=s.return,a===null)throw Error(Q(341));a.lanes|=n,u=a.alternate,u!==null&&(u.lanes|=n),$o(a,n,t),a=s.sibling}else a=s.child;if(a!==null)a.return=s;else for(a=s;a!==null;){if(a===t){a=null;break}if(s=a.sibling,s!==null){s.return=a.return,a=s;break}a=a.return}s=a}wt(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,xi(t,n),i=cn(i),r=r(i),t.flags|=1,wt(e,t,r,n),t.child;case 14:return r=t.type,i=mn(r,t.pendingProps),i=mn(r.type,i),Jf(e,t,r,i,n);case 15:return Ap(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:mn(r,i),Va(e,t),t.tag=1,zt(r)?(e=!0,du(t)):e=!1,xi(t,n),Sp(t,r,i),Vo(t,r,i,n),Qo(null,t,r,!0,e,n);case 19:return Dp(e,t,n);case 22:return vp(e,t,n)}throw Error(Q(156,t.tag))};function Qp(e,t){return xm(e,t)}function KT(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ln(e,t,n,r){return new KT(e,t,n,r)}function pd(e){return e=e.prototype,!(!e||!e.isReactComponent)}function XT(e){if(typeof e=="function")return pd(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Oc)return 11;if(e===Pc)return 14}return 2}function Tr(e,t){var n=e.alternate;return n===null?(n=ln(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Qa(e,t,n,r,i,s){var a=2;if(r=e,typeof e=="function")pd(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case si:return Fr(n.children,i,s,t);case Rc:a=8,i|=8;break;case po:return e=ln(12,n,t,i|2),e.elementType=po,e.lanes=s,e;case go:return e=ln(13,n,t,i),e.elementType=go,e.lanes=s,e;case Eo:return e=ln(19,n,t,i),e.elementType=Eo,e.lanes=s,e;case im:return Ku(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case nm:a=10;break e;case rm:a=9;break e;case Oc:a=11;break e;case Pc:a=14;break e;case ir:a=16,r=null;break e}throw Error(Q(130,e==null?e:typeof e,""))}return t=ln(a,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function Fr(e,t,n,r){return e=ln(7,e,r,t),e.lanes=n,e}function Ku(e,t,n,r){return e=ln(22,e,r,t),e.elementType=im,e.lanes=n,e.stateNode={isHidden:!1},e}function $l(e,t,n){return e=ln(6,e,null,t),e.lanes=n,e}function Yl(e,t,n){return t=ln(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function JT(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Sl(0),this.expirationTimes=Sl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Sl(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function gd(e,t,n,r,i,s,a,u,l){return e=new JT(e,t,n,u,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=ln(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Zc(s),e}function ZT(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ii,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Gp(e){if(!e)return br;e=e._reactInternals;e:{if(Qr(e)!==e||e.tag!==1)throw Error(Q(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(zt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(Q(171))}if(e.tag===1){var n=e.type;if(zt(n))return Gm(e,n,t)}return t}function Kp(e,t,n,r,i,s,a,u,l){return e=gd(n,r,!0,e,i,s,a,u,l),e.context=Gp(null),n=e.current,r=Lt(),i=Er(n),s=Yn(r,i),s.callback=t??null,pr(n,s,i),e.current.lanes=i,Js(e,i,r),$t(e,r),e}function Xu(e,t,n,r){var i=t.current,s=Lt(),a=Er(i);return n=Gp(n),t.context===null?t.context=n:t.pendingContext=n,t=Yn(s,a),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=pr(i,t,a),e!==null&&(yn(e,i,a,s),za(e,i,a)),a}function Su(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function ch(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Ed(e,t){ch(e,t),(e=e.alternate)&&ch(e,t)}function ey(){return null}var Xp=typeof reportError=="function"?reportError:function(e){console.error(e)};function Td(e){this._internalRoot=e}Ju.prototype.render=Td.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(Q(409));Xu(e,t,null,null)};Ju.prototype.unmount=Td.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Yr(function(){Xu(null,e,null,null)}),t[Wn]=null}};function Ju(e){this._internalRoot=e}Ju.prototype.unstable_scheduleHydration=function(e){if(e){var t=vm();e={blockedOn:null,target:e,priority:t};for(var n=0;n<ar.length&&t!==0&&t<ar[n].priority;n++);ar.splice(n,0,e),n===0&&Im(e)}};function yd(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Zu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function dh(){}function ty(e,t,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var d=Su(a);s.call(d)}}var a=Kp(t,r,e,0,null,!1,!1,"",dh);return e._reactRootContainer=a,e[Wn]=a.current,Fs(e.nodeType===8?e.parentNode:e),Yr(),a}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var u=r;r=function(){var d=Su(l);u.call(d)}}var l=gd(e,0,!1,null,null,!1,!1,"",dh);return e._reactRootContainer=l,e[Wn]=l.current,Fs(e.nodeType===8?e.parentNode:e),Yr(function(){Xu(t,l,n,r)}),l}function el(e,t,n,r,i){var s=n._reactRootContainer;if(s){var a=s;if(typeof i=="function"){var u=i;i=function(){var l=Su(a);u.call(l)}}Xu(t,a,e,i)}else a=ty(n,t,e,i,r);return Su(a)}Nm=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=as(t.pendingLanes);n!==0&&(Bc(t,n|1),$t(t,et()),!(ve&6)&&(Ii=et()+500,Sr()))}break;case 13:Yr(function(){var r=qn(e,1);if(r!==null){var i=Lt();yn(r,e,1,i)}}),Ed(e,1)}};jc=function(e){if(e.tag===13){var t=qn(e,134217728);if(t!==null){var n=Lt();yn(t,e,134217728,n)}Ed(e,134217728)}};Am=function(e){if(e.tag===13){var t=Er(e),n=qn(e,t);if(n!==null){var r=Lt();yn(n,e,t,r)}Ed(e,t)}};vm=function(){return Re};wm=function(e,t){var n=Re;try{return Re=e,t()}finally{Re=n}};Ao=function(e,t,n){switch(t){case"input":if(bo(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=Yu(r);if(!i)throw Error(Q(90));am(r),bo(r,i)}}}break;case"textarea":lm(e,n);break;case"select":t=n.value,t!=null&&Ei(e,!!n.multiple,t,!1)}};pm=fd;gm=Yr;var ny={usingClientEntryPoint:!1,Events:[ea,oi,Yu,hm,mm,fd]},Xi={findFiberByHostInstance:Lr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},ry={bundleType:Xi.bundleType,version:Xi.version,rendererPackageName:Xi.rendererPackageName,rendererConfig:Xi.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Gn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=ym(e),e===null?null:e.stateNode},findFiberByHostInstance:Xi.findFiberByHostInstance||ey,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var va=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!va.isDisabled&&va.supportsFiber)try{Uu=va.inject(ry),Ln=va}catch{}}en.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ny;en.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!yd(t))throw Error(Q(200));return ZT(e,t,null,n)};en.createRoot=function(e,t){if(!yd(e))throw Error(Q(299));var n=!1,r="",i=Xp;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=gd(e,1,!1,null,null,n,!1,r,i),e[Wn]=t.current,Fs(e.nodeType===8?e.parentNode:e),new Td(t)};en.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(Q(188)):(e=Object.keys(e).join(","),Error(Q(268,e)));return e=ym(t),e=e===null?null:e.stateNode,e};en.flushSync=function(e){return Yr(e)};en.hydrate=function(e,t,n){if(!Zu(t))throw Error(Q(200));return el(null,e,t,!0,n)};en.hydrateRoot=function(e,t,n){if(!yd(e))throw Error(Q(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",a=Xp;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),t=Kp(t,null,e,1,n??null,i,!1,s,a),e[Wn]=t.current,Fs(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new Ju(t)};en.render=function(e,t,n){if(!Zu(t))throw Error(Q(200));return el(null,e,t,!1,n)};en.unmountComponentAtNode=function(e){if(!Zu(e))throw Error(Q(40));return e._reactRootContainer?(Yr(function(){el(null,null,e,!1,function(){e._reactRootContainer=null,e[Wn]=null})}),!0):!1};en.unstable_batchedUpdates=fd;en.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Zu(n))throw Error(Q(200));if(e==null||e._reactInternals===void 0)throw Error(Q(38));return el(e,t,n,!1,r)};en.version="18.3.1-next-f1338f8080-20240426";function Jp(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Jp)}catch(e){console.error(e)}}Jp(),J0.exports=en;var iy=J0.exports,fh=iy;ho.createRoot=fh.createRoot,ho.hydrateRoot=fh.hydrateRoot;/**
41
+ * @license lucide-react v0.312.0 - ISC
42
+ *
43
+ * This source code is licensed under the ISC license.
44
+ * See the LICENSE file in the root directory of this source tree.
45
+ */var sy={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
46
+ * @license lucide-react v0.312.0 - ISC
47
+ *
48
+ * This source code is licensed under the ISC license.
49
+ * See the LICENSE file in the root directory of this source tree.
50
+ */const ay=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),ie=(e,t)=>{const n=_.forwardRef(({color:r="currentColor",size:i=24,strokeWidth:s=2,absoluteStrokeWidth:a,className:u="",children:l,...d},f)=>_.createElement("svg",{ref:f,...sy,width:i,height:i,stroke:r,strokeWidth:a?Number(s)*24/Number(i):s,className:["lucide",`lucide-${ay(e)}`,u].join(" "),...d},[...t.map(([h,m])=>_.createElement(h,m)),...Array.isArray(l)?l:[l]]));return n.displayName=`${e}`,n};/**
51
+ * @license lucide-react v0.312.0 - ISC
52
+ *
53
+ * This source code is licensed under the ISC license.
54
+ * See the LICENSE file in the root directory of this source tree.
55
+ */const xr=ie("AlertCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
56
+ * @license lucide-react v0.312.0 - ISC
57
+ *
58
+ * This source code is licensed under the ISC license.
59
+ * See the LICENSE file in the root directory of this source tree.
60
+ */const Vr=ie("AlertTriangle",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z",key:"c3ski4"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
61
+ * @license lucide-react v0.312.0 - ISC
62
+ *
63
+ * This source code is licensed under the ISC license.
64
+ * See the LICENSE file in the root directory of this source tree.
65
+ */const uy=ie("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
66
+ * @license lucide-react v0.312.0 - ISC
67
+ *
68
+ * This source code is licensed under the ISC license.
69
+ * See the LICENSE file in the root directory of this source tree.
70
+ */const ly=ie("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
71
+ * @license lucide-react v0.312.0 - ISC
72
+ *
73
+ * This source code is licensed under the ISC license.
74
+ * See the LICENSE file in the root directory of this source tree.
75
+ */const hh=ie("BarChart3",[["path",{d:"M3 3v18h18",key:"1s2lah"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
76
+ * @license lucide-react v0.312.0 - ISC
77
+ *
78
+ * This source code is licensed under the ISC license.
79
+ * See the LICENSE file in the root directory of this source tree.
80
+ */const ti=ie("BookOpen",[["path",{d:"M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z",key:"vv98re"}],["path",{d:"M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z",key:"1cyq3y"}]]);/**
81
+ * @license lucide-react v0.312.0 - ISC
82
+ *
83
+ * This source code is licensed under the ISC license.
84
+ * See the LICENSE file in the root directory of this source tree.
85
+ */const ac=ie("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
86
+ * @license lucide-react v0.312.0 - ISC
87
+ *
88
+ * This source code is licensed under the ISC license.
89
+ * See the LICENSE file in the root directory of this source tree.
90
+ */const oy=ie("Brain",[["path",{d:"M9.5 2A2.5 2.5 0 0 1 12 4.5v15a2.5 2.5 0 0 1-4.96.44 2.5 2.5 0 0 1-2.96-3.08 3 3 0 0 1-.34-5.58 2.5 2.5 0 0 1 1.32-4.24 2.5 2.5 0 0 1 1.98-3A2.5 2.5 0 0 1 9.5 2Z",key:"1mhkh5"}],["path",{d:"M14.5 2A2.5 2.5 0 0 0 12 4.5v15a2.5 2.5 0 0 0 4.96.44 2.5 2.5 0 0 0 2.96-3.08 3 3 0 0 0 .34-5.58 2.5 2.5 0 0 0-1.32-4.24 2.5 2.5 0 0 0-1.98-3A2.5 2.5 0 0 0 14.5 2Z",key:"1d6s00"}]]);/**
91
+ * @license lucide-react v0.312.0 - ISC
92
+ *
93
+ * This source code is licensed under the ISC license.
94
+ * See the LICENSE file in the root directory of this source tree.
95
+ */const cy=ie("Bug",[["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M9 7.13v-1a3.003 3.003 0 1 1 6 0v1",key:"d7y7pr"}],["path",{d:"M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6",key:"xs1cw7"}],["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M6.53 9C4.6 8.8 3 7.1 3 5",key:"32zzws"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"M3 21c0-2.1 1.7-3.9 3.8-4",key:"4p0ekp"}],["path",{d:"M20.97 5c0 2.1-1.6 3.8-3.5 4",key:"18gb23"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M17.2 17c2.1.1 3.8 1.9 3.8 4",key:"k3fwyw"}]]);/**
96
+ * @license lucide-react v0.312.0 - ISC
97
+ *
98
+ * This source code is licensed under the ISC license.
99
+ * See the LICENSE file in the root directory of this source tree.
100
+ */const bd=ie("CheckCircle2",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
101
+ * @license lucide-react v0.312.0 - ISC
102
+ *
103
+ * This source code is licensed under the ISC license.
104
+ * See the LICENSE file in the root directory of this source tree.
105
+ */const na=ie("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
106
+ * @license lucide-react v0.312.0 - ISC
107
+ *
108
+ * This source code is licensed under the ISC license.
109
+ * See the LICENSE file in the root directory of this source tree.
110
+ */const xd=ie("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
111
+ * @license lucide-react v0.312.0 - ISC
112
+ *
113
+ * This source code is licensed under the ISC license.
114
+ * See the LICENSE file in the root directory of this source tree.
115
+ */const ra=ie("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
116
+ * @license lucide-react v0.312.0 - ISC
117
+ *
118
+ * This source code is licensed under the ISC license.
119
+ * See the LICENSE file in the root directory of this source tree.
120
+ */const Zp=ie("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
121
+ * @license lucide-react v0.312.0 - ISC
122
+ *
123
+ * This source code is licensed under the ISC license.
124
+ * See the LICENSE file in the root directory of this source tree.
125
+ */const dy=ie("Code2",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);/**
126
+ * @license lucide-react v0.312.0 - ISC
127
+ *
128
+ * This source code is licensed under the ISC license.
129
+ * See the LICENSE file in the root directory of this source tree.
130
+ */const fy=ie("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/**
131
+ * @license lucide-react v0.312.0 - ISC
132
+ *
133
+ * This source code is licensed under the ISC license.
134
+ * See the LICENSE file in the root directory of this source tree.
135
+ */const tl=ie("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
136
+ * @license lucide-react v0.312.0 - ISC
137
+ *
138
+ * This source code is licensed under the ISC license.
139
+ * See the LICENSE file in the root directory of this source tree.
140
+ */const hy=ie("Cpu",[["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"9",y:"9",width:"6",height:"6",key:"o3kz5p"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/**
141
+ * @license lucide-react v0.312.0 - ISC
142
+ *
143
+ * This source code is licensed under the ISC license.
144
+ * See the LICENSE file in the root directory of this source tree.
145
+ */const Ji=ie("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
146
+ * @license lucide-react v0.312.0 - ISC
147
+ *
148
+ * This source code is licensed under the ISC license.
149
+ * See the LICENSE file in the root directory of this source tree.
150
+ */const my=ie("DollarSign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]);/**
151
+ * @license lucide-react v0.312.0 - ISC
152
+ *
153
+ * This source code is licensed under the ISC license.
154
+ * See the LICENSE file in the root directory of this source tree.
155
+ */const Ws=ie("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
156
+ * @license lucide-react v0.312.0 - ISC
157
+ *
158
+ * This source code is licensed under the ISC license.
159
+ * See the LICENSE file in the root directory of this source tree.
160
+ */const py=ie("FilePen",[["path",{d:"M12 22h6a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v10",key:"x7tsz2"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10.4 12.6a2 2 0 1 1 3 3L8 21l-4 1 1-4Z",key:"o3xyfb"}]]);/**
161
+ * @license lucide-react v0.312.0 - ISC
162
+ *
163
+ * This source code is licensed under the ISC license.
164
+ * See the LICENSE file in the root directory of this source tree.
165
+ */const In=ie("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
166
+ * @license lucide-react v0.312.0 - ISC
167
+ *
168
+ * This source code is licensed under the ISC license.
169
+ * See the LICENSE file in the root directory of this source tree.
170
+ */const e1=ie("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);/**
171
+ * @license lucide-react v0.312.0 - ISC
172
+ *
173
+ * This source code is licensed under the ISC license.
174
+ * See the LICENSE file in the root directory of this source tree.
175
+ */const $n=ie("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/**
176
+ * @license lucide-react v0.312.0 - ISC
177
+ *
178
+ * This source code is licensed under the ISC license.
179
+ * See the LICENSE file in the root directory of this source tree.
180
+ */const mh=ie("FolderSearch",[["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["path",{d:"M10.7 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v4.1",key:"1bw5m7"}],["path",{d:"m21 21-1.5-1.5",key:"3sg1j"}]]);/**
181
+ * @license lucide-react v0.312.0 - ISC
182
+ *
183
+ * This source code is licensed under the ISC license.
184
+ * See the LICENSE file in the root directory of this source tree.
185
+ */const t1=ie("Folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
186
+ * @license lucide-react v0.312.0 - ISC
187
+ *
188
+ * This source code is licensed under the ISC license.
189
+ * See the LICENSE file in the root directory of this source tree.
190
+ */const n1=ie("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
191
+ * @license lucide-react v0.312.0 - ISC
192
+ *
193
+ * This source code is licensed under the ISC license.
194
+ * See the LICENSE file in the root directory of this source tree.
195
+ */const gy=ie("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]]);/**
196
+ * @license lucide-react v0.312.0 - ISC
197
+ *
198
+ * This source code is licensed under the ISC license.
199
+ * See the LICENSE file in the root directory of this source tree.
200
+ */const Ey=ie("Home",[["path",{d:"m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"y5dka4"}],["polyline",{points:"9 22 9 12 15 12 15 22",key:"e2us08"}]]);/**
201
+ * @license lucide-react v0.312.0 - ISC
202
+ *
203
+ * This source code is licensed under the ISC license.
204
+ * See the LICENSE file in the root directory of this source tree.
205
+ */const Ty=ie("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/**
206
+ * @license lucide-react v0.312.0 - ISC
207
+ *
208
+ * This source code is licensed under the ISC license.
209
+ * See the LICENSE file in the root directory of this source tree.
210
+ */const yy=ie("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/**
211
+ * @license lucide-react v0.312.0 - ISC
212
+ *
213
+ * This source code is licensed under the ISC license.
214
+ * See the LICENSE file in the root directory of this source tree.
215
+ */const by=ie("Link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);/**
216
+ * @license lucide-react v0.312.0 - ISC
217
+ *
218
+ * This source code is licensed under the ISC license.
219
+ * See the LICENSE file in the root directory of this source tree.
220
+ */const xy=ie("ListChecks",[["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]]);/**
221
+ * @license lucide-react v0.312.0 - ISC
222
+ *
223
+ * This source code is licensed under the ISC license.
224
+ * See the LICENSE file in the root directory of this source tree.
225
+ */const Br=ie("Loader2",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
226
+ * @license lucide-react v0.312.0 - ISC
227
+ *
228
+ * This source code is licensed under the ISC license.
229
+ * See the LICENSE file in the root directory of this source tree.
230
+ */const _y=ie("Loader",[["line",{x1:"12",x2:"12",y1:"2",y2:"6",key:"gza1u7"}],["line",{x1:"12",x2:"12",y1:"18",y2:"22",key:"1qhbu9"}],["line",{x1:"4.93",x2:"7.76",y1:"4.93",y2:"7.76",key:"xae44r"}],["line",{x1:"16.24",x2:"19.07",y1:"16.24",y2:"19.07",key:"bxnmvf"}],["line",{x1:"2",x2:"6",y1:"12",y2:"12",key:"89khin"}],["line",{x1:"18",x2:"22",y1:"12",y2:"12",key:"pb8tfm"}],["line",{x1:"4.93",x2:"7.76",y1:"19.07",y2:"16.24",key:"1uxjnu"}],["line",{x1:"16.24",x2:"19.07",y1:"7.76",y2:"4.93",key:"6duxfx"}]]);/**
231
+ * @license lucide-react v0.312.0 - ISC
232
+ *
233
+ * This source code is licensed under the ISC license.
234
+ * See the LICENSE file in the root directory of this source tree.
235
+ */const r1=ie("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/**
236
+ * @license lucide-react v0.312.0 - ISC
237
+ *
238
+ * This source code is licensed under the ISC license.
239
+ * See the LICENSE file in the root directory of this source tree.
240
+ */const ky=ie("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
241
+ * @license lucide-react v0.312.0 - ISC
242
+ *
243
+ * This source code is licensed under the ISC license.
244
+ * See the LICENSE file in the root directory of this source tree.
245
+ */const Sy=ie("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
246
+ * @license lucide-react v0.312.0 - ISC
247
+ *
248
+ * This source code is licensed under the ISC license.
249
+ * See the LICENSE file in the root directory of this source tree.
250
+ */const Cy=ie("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/**
251
+ * @license lucide-react v0.312.0 - ISC
252
+ *
253
+ * This source code is licensed under the ISC license.
254
+ * See the LICENSE file in the root directory of this source tree.
255
+ */const Ny=ie("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
256
+ * @license lucide-react v0.312.0 - ISC
257
+ *
258
+ * This source code is licensed under the ISC license.
259
+ * See the LICENSE file in the root directory of this source tree.
260
+ */const Ay=ie("PanelLeftClose",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]]);/**
261
+ * @license lucide-react v0.312.0 - ISC
262
+ *
263
+ * This source code is licensed under the ISC license.
264
+ * See the LICENSE file in the root directory of this source tree.
265
+ */const vy=ie("PanelLeftOpen",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]]);/**
266
+ * @license lucide-react v0.312.0 - ISC
267
+ *
268
+ * This source code is licensed under the ISC license.
269
+ * See the LICENSE file in the root directory of this source tree.
270
+ */const wy=ie("Paperclip",[["path",{d:"m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48",key:"1u3ebp"}]]);/**
271
+ * @license lucide-react v0.312.0 - ISC
272
+ *
273
+ * This source code is licensed under the ISC license.
274
+ * See the LICENSE file in the root directory of this source tree.
275
+ */const Iy=ie("PenLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z",key:"ymcmye"}]]);/**
276
+ * @license lucide-react v0.312.0 - ISC
277
+ *
278
+ * This source code is licensed under the ISC license.
279
+ * See the LICENSE file in the root directory of this source tree.
280
+ */const _d=ie("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
281
+ * @license lucide-react v0.312.0 - ISC
282
+ *
283
+ * This source code is licensed under the ISC license.
284
+ * See the LICENSE file in the root directory of this source tree.
285
+ */const i1=ie("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
286
+ * @license lucide-react v0.312.0 - ISC
287
+ *
288
+ * This source code is licensed under the ISC license.
289
+ * See the LICENSE file in the root directory of this source tree.
290
+ */const Or=ie("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
291
+ * @license lucide-react v0.312.0 - ISC
292
+ *
293
+ * This source code is licensed under the ISC license.
294
+ * See the LICENSE file in the root directory of this source tree.
295
+ */const Ly=ie("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]]);/**
296
+ * @license lucide-react v0.312.0 - ISC
297
+ *
298
+ * This source code is licensed under the ISC license.
299
+ * See the LICENSE file in the root directory of this source tree.
300
+ */const Dy=ie("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
301
+ * @license lucide-react v0.312.0 - ISC
302
+ *
303
+ * This source code is licensed under the ISC license.
304
+ * See the LICENSE file in the root directory of this source tree.
305
+ */const Ry=ie("ShieldAlert",[["path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10",key:"1irkt0"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);/**
306
+ * @license lucide-react v0.312.0 - ISC
307
+ *
308
+ * This source code is licensed under the ISC license.
309
+ * See the LICENSE file in the root directory of this source tree.
310
+ */const s1=ie("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]);/**
311
+ * @license lucide-react v0.312.0 - ISC
312
+ *
313
+ * This source code is licensed under the ISC license.
314
+ * See the LICENSE file in the root directory of this source tree.
315
+ */const Oy=ie("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
316
+ * @license lucide-react v0.312.0 - ISC
317
+ *
318
+ * This source code is licensed under the ISC license.
319
+ * See the LICENSE file in the root directory of this source tree.
320
+ */const ph=ie("StopCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{width:"6",height:"6",x:"9",y:"9",key:"1wrtvo"}]]);/**
321
+ * @license lucide-react v0.312.0 - ISC
322
+ *
323
+ * This source code is licensed under the ISC license.
324
+ * See the LICENSE file in the root directory of this source tree.
325
+ */const Py=ie("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
326
+ * @license lucide-react v0.312.0 - ISC
327
+ *
328
+ * This source code is licensed under the ISC license.
329
+ * See the LICENSE file in the root directory of this source tree.
330
+ */const My=ie("Table",[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]]);/**
331
+ * @license lucide-react v0.312.0 - ISC
332
+ *
333
+ * This source code is licensed under the ISC license.
334
+ * See the LICENSE file in the root directory of this source tree.
335
+ */const Cu=ie("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
336
+ * @license lucide-react v0.312.0 - ISC
337
+ *
338
+ * This source code is licensed under the ISC license.
339
+ * See the LICENSE file in the root directory of this source tree.
340
+ */const Nu=ie("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
341
+ * @license lucide-react v0.312.0 - ISC
342
+ *
343
+ * This source code is licensed under the ISC license.
344
+ * See the LICENSE file in the root directory of this source tree.
345
+ */const Au=ie("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
346
+ * @license lucide-react v0.312.0 - ISC
347
+ *
348
+ * This source code is licensed under the ISC license.
349
+ * See the LICENSE file in the root directory of this source tree.
350
+ */const Fy=ie("WifiOff",[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M8.5 16.5a5 5 0 0 1 7 0",key:"sej527"}],["path",{d:"M2 8.82a15 15 0 0 1 4.17-2.65",key:"11utq1"}],["path",{d:"M10.66 5c4.01-.36 8.14.9 11.34 3.76",key:"hxefdu"}],["path",{d:"M16.85 11.25a10 10 0 0 1 2.22 1.68",key:"q734kn"}],["path",{d:"M5 13a10 10 0 0 1 5.24-2.76",key:"piq4yl"}],["line",{x1:"12",x2:"12.01",y1:"20",y2:"20",key:"of4bc4"}]]);/**
351
+ * @license lucide-react v0.312.0 - ISC
352
+ *
353
+ * This source code is licensed under the ISC license.
354
+ * See the LICENSE file in the root directory of this source tree.
355
+ */const By=ie("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);/**
356
+ * @license lucide-react v0.312.0 - ISC
357
+ *
358
+ * This source code is licensed under the ISC license.
359
+ * See the LICENSE file in the root directory of this source tree.
360
+ */const bt=ie("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
361
+ * @license lucide-react v0.312.0 - ISC
362
+ *
363
+ * This source code is licensed under the ISC license.
364
+ * See the LICENSE file in the root directory of this source tree.
365
+ */const a1=ie("Zap",[["polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2",key:"45s27k"}]]),jy={},gh=e=>{let t;const n=new Set,r=(f,h)=>{const m=typeof f=="function"?f(t):f;if(!Object.is(m,t)){const p=t;t=h??(typeof m!="object"||m===null)?m:Object.assign({},t,m),n.forEach(E=>E(t,p))}},i=()=>t,l={setState:r,getState:i,getInitialState:()=>d,subscribe:f=>(n.add(f),()=>n.delete(f)),destroy:()=>{(jy?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},d=t=e(r,i,l);return l},Uy=e=>e?gh(e):gh;var u1={exports:{}},l1={},o1={exports:{}},c1={};/**
366
+ * @license React
367
+ * use-sync-external-store-shim.production.js
368
+ *
369
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
370
+ *
371
+ * This source code is licensed under the MIT license found in the
372
+ * LICENSE file in the root directory of this source tree.
373
+ */var Li=_;function Hy(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var zy=typeof Object.is=="function"?Object.is:Hy,$y=Li.useState,Yy=Li.useEffect,Vy=Li.useLayoutEffect,Wy=Li.useDebugValue;function qy(e,t){var n=t(),r=$y({inst:{value:n,getSnapshot:t}}),i=r[0].inst,s=r[1];return Vy(function(){i.value=n,i.getSnapshot=t,Vl(i)&&s({inst:i})},[e,n,t]),Yy(function(){return Vl(i)&&s({inst:i}),e(function(){Vl(i)&&s({inst:i})})},[e]),Wy(n),n}function Vl(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!zy(e,n)}catch{return!0}}function Qy(e,t){return t()}var Gy=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Qy:qy;c1.useSyncExternalStore=Li.useSyncExternalStore!==void 0?Li.useSyncExternalStore:Gy;o1.exports=c1;var Ky=o1.exports;/**
374
+ * @license React
375
+ * use-sync-external-store-shim/with-selector.production.js
376
+ *
377
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
378
+ *
379
+ * This source code is licensed under the MIT license found in the
380
+ * LICENSE file in the root directory of this source tree.
381
+ */var nl=_,Xy=Ky;function Jy(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Zy=typeof Object.is=="function"?Object.is:Jy,eb=Xy.useSyncExternalStore,tb=nl.useRef,nb=nl.useEffect,rb=nl.useMemo,ib=nl.useDebugValue;l1.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var s=tb(null);if(s.current===null){var a={hasValue:!1,value:null};s.current=a}else a=s.current;s=rb(function(){function l(p){if(!d){if(d=!0,f=p,p=r(p),i!==void 0&&a.hasValue){var E=a.value;if(i(E,p))return h=E}return h=p}if(E=h,Zy(f,p))return E;var k=r(p);return i!==void 0&&i(E,k)?(f=p,E):(f=p,h=k)}var d=!1,f,h,m=n===void 0?null:n;return[function(){return l(t())},m===null?void 0:function(){return l(m())}]},[t,n,r,i]);var u=eb(e,s[0],s[1]);return nb(function(){a.hasValue=!0,a.value=u},[u]),ib(u),u};u1.exports=l1;var sb=u1.exports;const ab=Bu(sb),d1={},{useDebugValue:ub}=vs,{useSyncExternalStoreWithSelector:lb}=ab;let Eh=!1;const ob=e=>e;function cb(e,t=ob,n){(d1?"production":void 0)!=="production"&&n&&!Eh&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),Eh=!0);const r=lb(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return ub(r),r}const Th=e=>{(d1?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?Uy(e):e,n=(r,i)=>cb(t,r,i);return Object.assign(n,t),n},f1=e=>e?Th(e):Th,Ce=f1((e,t)=>({agents:[],activeAgentId:(()=>{try{return localStorage.getItem("gaia-active-agent-id")||"chat"}catch{return"chat"}})(),setAgents:n=>e({agents:n}),setActiveAgentId:n=>{try{localStorage.setItem("gaia-active-agent-id",n)}catch{}e({activeAgentId:n})},sessions:[],currentSessionId:null,pendingDeleteIds:[],setSessions:n=>e(r=>({sessions:n.filter(i=>!r.pendingDeleteIds.includes(i.id))})),setCurrentSession:n=>e({currentSessionId:n}),addSession:n=>e(r=>({sessions:[n,...r.sessions]})),removeSession:n=>e(r=>({sessions:r.sessions.filter(i=>i.id!==n),currentSessionId:r.currentSessionId===n?null:r.currentSessionId,messages:r.currentSessionId===n?[]:r.messages})),updateSessionInList:(n,r)=>e(i=>({sessions:i.sessions.map(s=>s.id===n?{...s,...r}:s)})),addPendingDelete:n=>e(r=>({pendingDeleteIds:[...r.pendingDeleteIds,n]})),removePendingDelete:n=>e(r=>({pendingDeleteIds:r.pendingDeleteIds.filter(i=>i!==n)})),messages:[],setMessages:n=>e({messages:n}),addMessage:n=>e(r=>({messages:[...r.messages,n]})),removeMessage:n=>e(r=>({messages:r.messages.filter(i=>i.id!==n)})),removeMessagesFrom:n=>e(r=>{const i=r.messages.findIndex(s=>s.id===n);return i===-1?r:{messages:r.messages.slice(0,i)}}),isStreaming:!1,streamingContent:"",setStreaming:n=>e({isStreaming:n}),appendStreamContent:n=>e(r=>({streamingContent:r.streamingContent+n})),setStreamContent:n=>e({streamingContent:n}),clearStreamContent:()=>e({streamingContent:""}),agentSteps:[],addAgentStep:n=>e(r=>({agentSteps:[...r.agentSteps.map(i=>({...i,active:!1})),n]})),updateLastAgentStep:n=>e(r=>{if(r.agentSteps.length===0)return r;const i=[...r.agentSteps];return i[i.length-1]={...i[i.length-1],...n},{agentSteps:i}}),appendThinkingContent:n=>e(r=>{if(r.agentSteps.length===0)return r;const i=[...r.agentSteps],s=i[i.length-1];return s.type!=="thinking"?r:(i[i.length-1]={...s,detail:(s.detail?s.detail+`
382
+ `:"")+n,active:!0},{agentSteps:i})}),updateLastToolStep:n=>e(r=>{if(r.agentSteps.length===0)return r;const i=[...r.agentSteps];for(let s=i.length-1;s>=0;s--)if(i[s].type==="tool")return i[s]={...i[s],...n},{agentSteps:i};return r}),clearAgentSteps:()=>e({agentSteps:[]}),documents:[],setDocuments:n=>e({documents:n}),systemStatus:null,backendConnected:!0,setSystemStatus:n=>e({systemStatus:n}),setBackendConnected:n=>e({backendConnected:n}),theme:(()=>{try{return localStorage.getItem("gaia-chat-theme")||"dark"}catch{return"dark"}})(),showDocLibrary:!1,showFileBrowser:!1,showSettings:!1,toggleTheme:()=>e(n=>{const r=n.theme==="dark"?"light":"dark";try{localStorage.setItem("gaia-chat-theme",r)}catch{}return document.documentElement.setAttribute("data-theme",r),{theme:r}}),sidebarOpen:typeof window<"u"?window.innerWidth>768:!0,sidebarCollapsed:(()=>{try{return typeof window<"u"&&localStorage.getItem("gaia-chat-sidebar-collapsed")==="true"}catch{return!1}})(),sidebarWidth:(()=>{try{return typeof window<"u"?parseInt(localStorage.getItem("gaia-chat-sidebar-width")||"300",10):300}catch{return 300}})(),isLoadingMessages:!1,pendingPrompt:null,setShowDocLibrary:n=>e({showDocLibrary:n}),setShowFileBrowser:n=>e({showFileBrowser:n}),setShowSettings:n=>e({showSettings:n}),toggleSidebar:()=>e(n=>({sidebarOpen:!n.sidebarOpen})),setSidebarOpen:n=>e({sidebarOpen:n}),toggleSidebarCollapsed:()=>e(n=>{const r=!n.sidebarCollapsed;try{localStorage.setItem("gaia-chat-sidebar-collapsed",String(r))}catch{}return{sidebarCollapsed:r}}),setSidebarCollapsed:n=>{try{localStorage.setItem("gaia-chat-sidebar-collapsed",String(n))}catch{}e({sidebarCollapsed:n})},setSidebarWidth:n=>{const r=Math.max(200,Math.min(500,n));try{localStorage.setItem("gaia-chat-sidebar-width",String(r))}catch{}e({sidebarWidth:r})},setLoadingMessages:n=>e({isLoadingMessages:n}),setPendingPrompt:n=>e({pendingPrompt:n})})),db={api:"#4fc3f7",store:"#ce93d8",chat:"#81c784",stream:"#ffb74d",ui:"#90a4ae",doc:"#a1887f",system:"#e57373",nav:"#fff176"},fb={api:"fetch",store:"state",chat:"chat",stream:"stream",ui:"ui",doc:"docs",system:"sys",nav:"nav"},Ga=(()=>{try{if(localStorage.getItem("gaia-debug")==="true")return!0;if(typeof location<"u"){const e=new URLSearchParams(location.search);if(e.has("debug")||e.has("verbose"))return!0}}catch{}return!1})();function Zi(){const e=new Date;return e.toLocaleTimeString("en-US",{hour12:!1})+"."+String(e.getMilliseconds()).padStart(3,"0")}function Zn(e){const t=db[e]||"#ccc",r=`%c[${fb[e]||e}]`,i=`color: ${t}; font-weight: bold;`,s="color: #888; font-weight: normal;";return{info:(a,...u)=>{if(!Ga)return;const l=Zi();u.length>0?console.log(`${r} %c${l} %c${a}`,i,s,"color: inherit;",...u):console.log(`${r} %c${l} %c${a}`,i,s,"color: inherit;")},warn:(a,...u)=>{const l=Zi();console.warn(`${r} %c${l} %c${a}`,i,s,"color: inherit;",...u)},error:(a,...u)=>{const l=Zi();console.error(`${r} %c${l} %c${a}`,i,s,"color: inherit;",...u)},debug:(a,...u)=>{if(!Ga)return;const l=Zi();console.debug(`${r} %c${l} %c${a}`,i,s,"color: #999;",...u)},timed:(a,u,...l)=>{if(!Ga)return;const d=Math.round(performance.now()-u),f=Zi(),h=d>2e3?"color: #e57373;":d>500?"color: #ffb74d;":"color: #81c784;";l.length>0?console.log(`${r} %c${f} %c${a} %c(${d}ms)`,i,s,"color: inherit;",h,...l):console.log(`${r} %c${f} %c${a} %c(${d}ms)`,i,s,"color: inherit;",h)},time:()=>performance.now()}}const M={api:Zn("api"),store:Zn("store"),chat:Zn("chat"),stream:Zn("stream"),ui:Zn("ui"),doc:Zn("doc"),system:Zn("system"),nav:Zn("nav")};function hb(e){console.log("%c GAIA %c v"+e+" %c Local AI Desktop","background: #E23C40; color: white; font-weight: bold; padding: 4px 8px; border-radius: 4px 0 0 4px;","background: #333; color: #fff; padding: 4px 8px;","background: #1a1a1a; color: #888; padding: 4px 8px; border-radius: 0 4px 4px 0;"),console.log(Ga?"%cVerbose logging enabled. Categories: [fetch] [state] [chat] [stream] [ui] [docs] [sys] [nav]":'%cVerbose logging: add ?debug to URL or run localStorage.setItem("gaia-debug","true")',"color: #666; font-style: italic;")}const rl=window.location.protocol==="file:"?"http://localhost:4200/api":"/api";function h1(e,t){switch(e){case 403:return t||"Access denied.";case 404:return t||"The requested item was not found.";case 413:return t||"File too large to process.";case 500:return"Server error. Please try again.";case 502:case 503:return"Service unavailable. Is the backend running?";default:return t||`Request failed (HTTP ${e})`}}async function De(e,t,n){const r=`${rl}${t}`,i=M.api.time();M.api.info(`${e} ${r}`,n!==void 0?{body:n}:"");const s={method:e,headers:n!==void 0?{"Content-Type":"application/json"}:void 0,body:n!==void 0?JSON.stringify(n):void 0};let a;try{a=await fetch(r,s)}catch(d){throw M.api.error(`${e} ${r} - network error`,d),d}if(!a.ok){const d=await a.text().catch(()=>"");M.api.error(`${e} ${r} - HTTP ${a.status}`,{errorText:d});let f=d;try{f=JSON.parse(d).detail||d}catch{}throw new Error(h1(a.status,f))}if(!(a.headers.get("content-type")||"").includes("application/json")){M.api.timed(`${e} ${r} -> ${a.status} (no body)`,i);return}const l=await a.json();return M.api.timed(`${e} ${r} -> ${a.status}`,i,l),l}async function kd(){return De("GET","/system/status")}async function mb(e,t){return De("POST","/system/load-model",{model_name:e,ctx_size:t})}async function pb(e,t=!1){return De("POST","/system/download-model",{model_name:e,force:t})}async function m1(){return De("GET","/agents")}async function gb(){return De("GET","/sessions")}async function uc(e={}){return De("POST","/sessions",e)}async function Wl(e,t){return De("PUT",`/sessions/${e}`,t)}async function p1(e){return De("DELETE",`/sessions/${e}`)}async function ls(e){return De("GET",`/sessions/${e}/messages`)}async function Eb(e){return De("GET",`/sessions/${e}/export?format=markdown`)}async function Tb(e,t){return De("DELETE",`/sessions/${e}/messages/${t}`)}async function yb(e,t){return De("DELETE",`/sessions/${e}/messages/${t}/and-below`)}const bb=new Set(["status","step","thinking","plan","tool_start","tool_end","tool_result","tool_args","tool_confirm","agent_error","permission_request"]);function xb(e,t,n,r,i,s){let a;typeof n=="function"?a={onChunk:n,onAgentEvent:()=>{},onDone:()=>{},onError:m=>{M.stream.error("Unhandled stream error",m)}}:a=n;const u=new AbortController,l=M.stream.time();let d=0,f=0,h=0;return M.stream.info(`Starting SSE stream for session=${e}`,{messageLength:t.length}),fetch(`${rl}/chat/send`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({session_id:e,message:t,stream:!0,...s?{agent_type:s}:{}}),signal:u.signal}).then(async m=>{var g,T;if(M.stream.info(`SSE connection opened -> HTTP ${m.status}`),!m.ok){const x=await m.text().catch(()=>"");M.stream.error(`SSE connection failed: HTTP ${m.status}`,x),a.onError(new Error(`HTTP ${m.status}: ${x}`));return}const p=(g=m.body)==null?void 0:g.getReader();if(!p){M.stream.error("No response body reader available"),a.onError(new Error("No response body"));return}const E=new TextDecoder;let k="",L=!1;try{for(;;){const{done:x,value:R}=await p.read();if(x){M.stream.debug("SSE reader done (stream ended)");break}k+=E.decode(R,{stream:!0});const B=k.split(`
383
+ `);k=B.pop()||"";for(const C of B)if(C.startsWith("data: ")){const I=C.slice(6).trim();if(!I)continue;try{const D=JSON.parse(I);D.type==="chunk"?(d++,f+=(D.content||"").length,(d<=3||d%50===0)&&M.stream.debug(`Chunk #${d} (+${(D.content||"").length} chars)`),a.onChunk(D)):D.type==="answer"?a.onChunk(D):D.type==="done"?(L=!0,M.stream.timed(`Stream complete: ${d} chunks, ${f} chars, ${h} agent events`,l),a.onDone(D)):D.type==="error"?(M.stream.error("Stream error event:",D.content),a.onError(new Error(D.content||"Unknown error"))):D.type==="agent_created"?(M.stream.info(`Agent created: ${D.agent_id}`),(T=a.onAgentCreated)==null||T.call(a,D)):bb.has(D.type)?(h++,M.stream.debug(`Agent event: ${D.type}`,D),a.onAgentEvent(D)):M.stream.warn(`Unknown SSE event type: ${D.type}`,D)}catch{M.stream.warn("Malformed SSE data, skipping",{raw:I.slice(0,100)})}}}}finally{p.releaseLock()}L||(M.stream.timed(`SSE connection closed without done event: ${d} chunks, ${h} agent events`,l),a.onDone({type:"done"}))}).catch(m=>{m.name==="AbortError"?M.stream.warn(`Stream aborted by user after ${d} chunks`):(M.stream.error("Stream fetch error",m),a.onError(m))}),u}async function _b(e,t,n,r){return De("POST","/chat/confirm",{session_id:e,confirm_id:t,action:n,remember:r})}async function g1(e,t){return De("POST","/chat/confirm-tool",{session_id:e,approved:t})}async function ni(){return De("GET","/documents")}async function E1(e){return De("POST","/documents/upload-path",{filepath:e})}async function T1(e){const t=`${rl}/documents/upload`,n=M.api.time();M.api.info(`POST ${t}`,{fileName:e.name,size:e.size});const r=new FormData;r.append("file",e);let i;try{i=await fetch(t,{method:"POST",body:r})}catch(a){throw M.api.error(`POST ${t} - network error`,a),a}if(!i.ok){const a=await i.text().catch(()=>"");M.api.error(`POST ${t} - HTTP ${i.status}`,{errorText:a});let u=a;try{u=JSON.parse(a).detail||a}catch{}throw new Error(h1(i.status,u))}const s=await i.json();return M.api.timed(`POST ${t} -> ${i.status}`,n,s),s}async function kb(e){return De("DELETE",`/documents/${e}`)}async function Sb(e){return De("GET",`/documents/${e}/status`)}async function Cb(e){return De("POST",`/documents/${e}/cancel`)}async function vu(e,t){return De("POST",`/sessions/${e}/documents`,{document_id:t})}async function Nb(e,t){return De("DELETE",`/sessions/${e}/documents/${t}`)}async function Ab(e){const t=e?`?path=${encodeURIComponent(e)}`:"";return De("GET",`/files/browse${t}`)}async function vb(e,t=!0){return De("POST","/documents/index-folder",{folder_path:e,recursive:t})}async function Sd(e,t=!0){return De("POST","/files/open",{path:e,reveal:t})}async function yh(e){const t=`${rl}/files/upload`,n=M.api.time();M.api.info(`POST ${t}`,{fileName:e.name,size:e.size});const r=new FormData;r.append("file",e);const i=await fetch(t,{method:"POST",body:r});if(!i.ok){const a=await i.text().catch(()=>"Upload failed");throw M.api.error(`POST ${t} - HTTP ${i.status}`,{errorText:a}),new Error(`Upload failed: ${a}`)}const s=await i.json();return M.api.timed(`POST ${t} -> ${i.status}`,n,s),s}async function wb(e,t,n){const r=new URLSearchParams({query:e});return t&&r.set("file_types",t),r.set("max_results",String(n)),De("GET",`/files/search?${r}`)}async function Ib(e,t){const n=new URLSearchParams({path:e});return De("GET",`/files/preview?${n}`)}async function Lb(){return De("POST","/tunnel/start")}async function Db(){return De("POST","/tunnel/stop")}async function y1(){return De("GET","/tunnel/status")}async function Rb(){return De("GET","/mcp/status")}function En(e){return e.replace(/-/g,"").slice(0,7)}function Ob(e,t){const n=t.replace(/^#/,"").toLowerCase();if(!n||n.length<4)return null;const r=e.find(i=>i.id.replace(/-/g,"").toLowerCase().startsWith(n));return r?r.id:null}const b1=""+new URL("gaia-robot-NKaQnEIp.png",import.meta.url).href;function Pb(e,t){e.stopPropagation(),e.preventDefault();const n=En(t),r=`${window.location.origin}${window.location.pathname}#${n}`;navigator.clipboard.writeText(r).then(()=>{M.ui.info(`Copied session link: ${r}`)}).catch(()=>{M.ui.warn("Clipboard write failed")})}function bh({session:e,isActive:t,isPendingDelete:n,isDeleting:r,onSelect:i,onKeyDown:s,onDelete:a,formatTime:u}){const[l,d]=_.useState(!1),f=_.useCallback(h=>{Pb(h,e.id),d(!0),setTimeout(()=>d(!1),1500)},[e.id]);return o.jsxs("div",{className:`session-item ${t?"active":""} ${r?"session-deleting":""}`,onClick:()=>i(e.id),onKeyDown:h=>s(h,e.id),role:"button",tabIndex:0,"aria-label":`Open task: ${e.title}`,"aria-current":t?"true":void 0,children:[o.jsx("span",{className:"session-title",children:e.title}),o.jsxs("a",{className:`session-hash ${l?"copied":""}`,href:`#${En(e.id)}`,onClick:f,title:l?"Copied!":`Copy link #${En(e.id)}`,"aria-label":`Copy link for session ${En(e.id)}`,children:["#",En(e.id)]}),o.jsx("span",{className:"session-time",children:u(e.updated_at)}),n?o.jsxs("button",{className:"session-delete confirm",onClick:h=>a(h,e.id),onKeyDown:h=>{(h.key==="Enter"||h.key===" ")&&a(h,e.id)},title:"Click to confirm delete","aria-label":`Confirm delete: ${e.title}`,children:[o.jsx(Nu,{size:12}),o.jsx("span",{className:"confirm-label",children:"Delete?"})]}):o.jsx("button",{className:"session-delete",onClick:h=>a(h,e.id),onKeyDown:h=>{(h.key==="Enter"||h.key===" ")&&a(h,e.id)},title:"Delete","aria-label":`Delete: ${e.title}`,children:o.jsx(Nu,{size:13})})]})}function Mb({onNewTask:e,tunnelActive:t,tunnelLoading:n,onMobileToggle:r}){const{sessions:i,currentSessionId:s,setCurrentSession:a,removeSession:u,addSession:l,setMessages:d,theme:f,toggleTheme:h,setShowSettings:m,sidebarOpen:p,setSidebarOpen:E,setLoadingMessages:k,sidebarCollapsed:L,toggleSidebarCollapsed:g,sidebarWidth:T,setSidebarWidth:x,addPendingDelete:R,removePendingDelete:B}=Ce(),[C,I]=_.useState(""),[D,Y]=_.useState(null),[w,V]=_.useState(null),[X,ce]=_.useState(!1),[se,de]=_.useState(null),ae=_.useRef(null),Te=_.useRef(null),v=_.useRef(null);_.useEffect(()=>{const j=()=>{var q;L?(g(),requestAnimationFrame(()=>{var z;return(z=Te.current)==null?void 0:z.focus()})):(q=Te.current)==null||q.focus()};return window.addEventListener("gaia:focus-search",j),()=>window.removeEventListener("gaia:focus-search",j)},[L,g]);const F=C?i.filter(j=>j.title.toLowerCase().includes(C.toLowerCase())):i,y=_.useMemo(()=>{if(C)return null;const j=new Date,q=new Date(j.getFullYear(),j.getMonth(),j.getDate()).getTime(),z=q-864e5,ue=q-7*864e5,fe=[{label:"Today",sessions:[]},{label:"Yesterday",sessions:[]},{label:"Previous 7 Days",sessions:[]},{label:"Older",sessions:[]}];for(const me of F){const Ne=new Date(me.updated_at).getTime();Ne>=q?fe[0].sessions.push(me):Ne>=z?fe[1].sessions.push(me):Ne>=ue?fe[2].sessions.push(me):fe[3].sessions.push(me)}return fe.filter(me=>me.sessions.length>0)},[F,C]),ee=_.useCallback(async j=>{var z;if(j===s)return;const q=((z=i.find(ue=>ue.id===j))==null?void 0:z.title)||"?";M.nav.info(`Selecting session: "${q}" (${j})`),a(j),d([]),k(!0),window.innerWidth<=768&&E(!1);try{const ue=await ls(j);if(!(Ce.getState().currentSessionId===j)){M.nav.debug(`Discarding stale message load for session=${j} (user switched away)`);return}d(ue.messages||[]),M.nav.info(`Loaded ${(ue.messages||[]).length} message(s) for "${q}"`)}catch(ue){M.nav.error(`Failed to load messages for session ${j}`,ue),d([])}finally{k(!1)}},[s,i,a,d,E,k]),le=_.useCallback(async(j,q)=>{j.stopPropagation(),j.preventDefault();const z=i.find(fe=>fe.id===q),ue=(z==null?void 0:z.title)||"?";if(D===q){M.chat.info(`Deleting session: "${ue}" (${q})`),Y(null),V(q),R(q),p1(q).then(()=>{M.chat.info(`Session deleted from backend: "${ue}"`),B(q)}).catch(me=>{M.chat.warn(`Backend delete failed for "${ue}"`,me),B(q)}),se!=null&&se.timer&&clearTimeout(se.timer);const fe=setTimeout(()=>{de(null)},5e3);z&&de({session:z,timer:fe}),setTimeout(()=>{u(q),V(null)},250);return}M.chat.debug(`Delete pending confirmation for: "${ue}" (${q})`),Y(q),v.current&&clearTimeout(v.current),v.current=setTimeout(()=>Y(fe=>fe===q?null:fe),3e3)},[D,i,u,se,R,B]),N=_.useCallback(()=>{if(!se)return;clearTimeout(se.timer);const{session:j}=se;M.chat.info(`Undo delete: re-creating "${j.title}"`),B(j.id),uc({title:j.title}).then(q=>{l(q),M.chat.info(`Undo delete: re-created "${q.title}" (new id=${q.id})`)}).catch(q=>{M.chat.warn(`Undo delete failed for "${j.title}"`,q)}),de(null)},[se,l,B]);_.useEffect(()=>{if(!D)return;const j=()=>Y(null);return window.addEventListener("click",j,{once:!0}),()=>window.removeEventListener("click",j)},[D]);const Ee=_.useCallback((j,q)=>{(j.key==="Enter"||j.key===" ")&&(j.preventDefault(),ee(q))},[ee]),Se=_.useRef(null),pe=_.useCallback(j=>{j.preventDefault(),ce(!0),M.ui.debug("Sidebar resize started");const q=j.clientX,z=T,ue=me=>{const Ne=me.clientX-q;x(z+Ne)},fe=()=>{ce(!1),document.removeEventListener("mousemove",ue),document.removeEventListener("mouseup",fe),document.body.style.cursor="",document.body.style.userSelect="",Se.current=null,M.ui.debug("Sidebar resize ended")};Se.current=fe,document.body.style.cursor="col-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",ue),document.addEventListener("mouseup",fe)},[T,x]);_.useEffect(()=>()=>{Se.current&&Se.current(),v.current&&clearTimeout(v.current)},[]);const Qe=j=>{const q=new Date(j),ue=new Date().getTime()-q.getTime(),fe=Math.floor(ue/6e4);if(fe<1)return"now";if(fe<60)return`${fe}m`;const me=Math.floor(fe/60);if(me<24)return`${me}h`;const Ne=Math.floor(me/24);return Ne<7?`${Ne}d`:q.toLocaleDateString(void 0,{month:"short",day:"numeric"})},Nt=typeof window<"u"&&window.innerWidth<=768?void 0:{width:L?56:T,minWidth:L?56:T};return o.jsxs("aside",{ref:ae,className:`sidebar ${p?"open":""} ${L?"collapsed":""} ${X?"resizing":""}`,style:Nt,role:"complementary","aria-label":"Task sidebar",children:[o.jsxs("div",{className:"sidebar-top",children:[o.jsxs("div",{className:"sidebar-brand",children:[o.jsx("div",{className:"brand-icon","aria-hidden":"true",children:o.jsx("img",{src:b1,alt:"",width:28,height:28})}),o.jsxs("div",{className:"brand-text",children:[o.jsx("span",{className:"brand-name",children:"GAIA"}),o.jsxs("span",{className:"brand-version",children:["v","0.17.2"]}),o.jsx("span",{className:"beta-badge",children:"BETA"})]})]}),o.jsxs("div",{className:"sidebar-top-actions",children:[o.jsx("button",{className:"new-task-btn",onClick:e,title:"New Task","aria-label":"New Task",children:o.jsx(_d,{size:18})}),o.jsx("button",{className:"collapse-btn",onClick:g,title:L?"Expand sidebar":"Collapse sidebar","aria-label":L?"Expand sidebar":"Collapse sidebar",children:L?o.jsx(vy,{size:18}):o.jsx(Ay,{size:18})})]})]}),o.jsxs("div",{className:"sidebar-search",children:[o.jsx(Or,{size:14,className:"search-icon","aria-hidden":"true"}),o.jsx("input",{ref:Te,type:"text",placeholder:"Search... (Ctrl+K)",value:C,onChange:j=>I(j.target.value),"aria-label":"Search tasks"})]}),o.jsxs("nav",{className:"session-list","aria-label":"Task sessions",children:[F.length===0&&o.jsx("div",{className:"empty-hint",children:C?"No results":"No tasks yet"}),y?y.map(j=>o.jsxs("div",{children:[o.jsx("div",{className:"session-group-label",children:j.label}),j.sessions.map(q=>o.jsx(bh,{session:q,isActive:q.id===s,isPendingDelete:D===q.id,isDeleting:w===q.id,onSelect:ee,onKeyDown:Ee,onDelete:le,formatTime:Qe},q.id))]},j.label)):F.map(j=>o.jsx(bh,{session:j,isActive:j.id===s,isPendingDelete:D===j.id,isDeleting:w===j.id,onSelect:ee,onKeyDown:Ee,onDelete:le,formatTime:Qe},j.id))]}),o.jsxs("div",{className:"sidebar-bottom",children:[o.jsxs("div",{className:"privacy-badge",children:[o.jsx("span",{className:"privacy-dot","aria-hidden":"true"}),o.jsx("span",{children:"100% Local"}),o.jsxs("span",{className:"version-badge",children:["v","0.17.2"]})]}),o.jsxs("div",{className:"sidebar-actions",children:[r&&o.jsx("button",{className:`btn-icon mobile-toggle-btn ${t?"active":""} ${n?"loading":""}`,onClick:r,disabled:n,title:t?"Stop mobile access":"Enable mobile access","aria-label":t?"Stop mobile access":"Enable mobile access",children:o.jsx(s1,{size:17})}),o.jsx("button",{className:"btn-icon",onClick:()=>m(!0),title:"Settings","aria-label":"Settings",children:o.jsx(Dy,{size:17})}),o.jsx("button",{className:"btn-icon",onClick:h,title:"Toggle theme","aria-label":`Switch to ${f==="dark"?"light":"dark"} theme`,children:f==="dark"?o.jsx(Py,{size:17}):o.jsx(Ny,{size:17})})]})]}),!L&&o.jsx("div",{className:"sidebar-resize-handle",onMouseDown:pe,title:"Drag to resize sidebar","aria-hidden":"true"}),se&&o.jsxs("div",{className:"toast toast-undo",role:"status",children:["Deleted “",se.session.title,"”",o.jsx("span",{className:"toast-action",onClick:N,children:"Undo"})]})]})}function xh(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,s=!1;for(;!s;){r===-1&&(r=n.length,s=!0);const a=n.slice(i,r).trim();(a||!s)&&t.push(a),i=r+1,r=n.indexOf(",",i)}return t}function x1(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Fb=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Bb=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,jb={};function _h(e,t){return(jb.jsx?Bb:Fb).test(e)}const Ub=/[ \t\n\f\r]/g;function Hb(e){return typeof e=="object"?e.type==="text"?kh(e.value):!1:kh(e)}function kh(e){return e.replace(Ub,"")===""}class ia{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}ia.prototype.normal={};ia.prototype.property={};ia.prototype.space=void 0;function _1(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new ia(n,r,t)}function qs(e){return e.toLowerCase()}class Yt{constructor(t,n){this.attribute=n,this.property=t}}Yt.prototype.attribute="";Yt.prototype.booleanish=!1;Yt.prototype.boolean=!1;Yt.prototype.commaOrSpaceSeparated=!1;Yt.prototype.commaSeparated=!1;Yt.prototype.defined=!1;Yt.prototype.mustUseProperty=!1;Yt.prototype.number=!1;Yt.prototype.overloadedBoolean=!1;Yt.prototype.property="";Yt.prototype.spaceSeparated=!1;Yt.prototype.space=void 0;let zb=0;const ge=Gr(),nt=Gr(),lc=Gr(),G=Gr(),Be=Gr(),ki=Gr(),Qt=Gr();function Gr(){return 2**++zb}const oc=Object.freeze(Object.defineProperty({__proto__:null,boolean:ge,booleanish:nt,commaOrSpaceSeparated:Qt,commaSeparated:ki,number:G,overloadedBoolean:lc,spaceSeparated:Be},Symbol.toStringTag,{value:"Module"})),ql=Object.keys(oc);class Cd extends Yt{constructor(t,n,r,i){let s=-1;if(super(t,n),Sh(this,"space",i),typeof r=="number")for(;++s<ql.length;){const a=ql[s];Sh(this,ql[s],(r&oc[a])===oc[a])}}}Cd.prototype.defined=!0;function Sh(e,t,n){n&&(e[t]=n)}function Bi(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const s=new Cd(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[qs(r)]=r,n[qs(s.attribute)]=r}return new ia(t,n,e.space)}const k1=Bi({properties:{ariaActiveDescendant:null,ariaAtomic:nt,ariaAutoComplete:null,ariaBusy:nt,ariaChecked:nt,ariaColCount:G,ariaColIndex:G,ariaColSpan:G,ariaControls:Be,ariaCurrent:null,ariaDescribedBy:Be,ariaDetails:null,ariaDisabled:nt,ariaDropEffect:Be,ariaErrorMessage:null,ariaExpanded:nt,ariaFlowTo:Be,ariaGrabbed:nt,ariaHasPopup:null,ariaHidden:nt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Be,ariaLevel:G,ariaLive:null,ariaModal:nt,ariaMultiLine:nt,ariaMultiSelectable:nt,ariaOrientation:null,ariaOwns:Be,ariaPlaceholder:null,ariaPosInSet:G,ariaPressed:nt,ariaReadOnly:nt,ariaRelevant:null,ariaRequired:nt,ariaRoleDescription:Be,ariaRowCount:G,ariaRowIndex:G,ariaRowSpan:G,ariaSelected:nt,ariaSetSize:G,ariaSort:null,ariaValueMax:G,ariaValueMin:G,ariaValueNow:G,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function S1(e,t){return t in e?e[t]:t}function C1(e,t){return S1(e,t.toLowerCase())}const $b=Bi({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ki,acceptCharset:Be,accessKey:Be,action:null,allow:null,allowFullScreen:ge,allowPaymentRequest:ge,allowUserMedia:ge,alt:null,as:null,async:ge,autoCapitalize:null,autoComplete:Be,autoFocus:ge,autoPlay:ge,blocking:Be,capture:null,charSet:null,checked:ge,cite:null,className:Be,cols:G,colSpan:null,content:null,contentEditable:nt,controls:ge,controlsList:Be,coords:G|ki,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ge,defer:ge,dir:null,dirName:null,disabled:ge,download:lc,draggable:nt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ge,formTarget:null,headers:Be,height:G,hidden:lc,high:G,href:null,hrefLang:null,htmlFor:Be,httpEquiv:Be,id:null,imageSizes:null,imageSrcSet:null,inert:ge,inputMode:null,integrity:null,is:null,isMap:ge,itemId:null,itemProp:Be,itemRef:Be,itemScope:ge,itemType:Be,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ge,low:G,manifest:null,max:null,maxLength:G,media:null,method:null,min:null,minLength:G,multiple:ge,muted:ge,name:null,nonce:null,noModule:ge,noValidate:ge,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:ge,optimum:G,pattern:null,ping:Be,placeholder:null,playsInline:ge,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ge,referrerPolicy:null,rel:Be,required:ge,reversed:ge,rows:G,rowSpan:G,sandbox:Be,scope:null,scoped:ge,seamless:ge,selected:ge,shadowRootClonable:ge,shadowRootDelegatesFocus:ge,shadowRootMode:null,shape:null,size:G,sizes:null,slot:null,span:G,spellCheck:nt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:G,step:null,style:null,tabIndex:G,target:null,title:null,translate:null,type:null,typeMustMatch:ge,useMap:null,value:nt,width:G,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Be,axis:null,background:null,bgColor:null,border:G,borderColor:null,bottomMargin:G,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ge,declare:ge,event:null,face:null,frame:null,frameBorder:null,hSpace:G,leftMargin:G,link:null,longDesc:null,lowSrc:null,marginHeight:G,marginWidth:G,noResize:ge,noHref:ge,noShade:ge,noWrap:ge,object:null,profile:null,prompt:null,rev:null,rightMargin:G,rules:null,scheme:null,scrolling:nt,standby:null,summary:null,text:null,topMargin:G,valueType:null,version:null,vAlign:null,vLink:null,vSpace:G,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ge,disableRemotePlayback:ge,prefix:null,property:null,results:G,security:null,unselectable:null},space:"html",transform:C1}),Yb=Bi({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:Qt,accentHeight:G,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:G,amplitude:G,arabicForm:null,ascent:G,attributeName:null,attributeType:null,azimuth:G,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:G,by:null,calcMode:null,capHeight:G,className:Be,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:G,diffuseConstant:G,direction:null,display:null,dur:null,divisor:G,dominantBaseline:null,download:ge,dx:null,dy:null,edgeMode:null,editable:null,elevation:G,enableBackground:null,end:null,event:null,exponent:G,externalResourcesRequired:null,fill:null,fillOpacity:G,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:ki,g2:ki,glyphName:ki,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:G,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:G,horizOriginX:G,horizOriginY:G,id:null,ideographic:G,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:G,k:G,k1:G,k2:G,k3:G,k4:G,kernelMatrix:Qt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:G,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:G,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:G,overlineThickness:G,paintOrder:null,panose1:null,path:null,pathLength:G,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Be,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:G,pointsAtY:G,pointsAtZ:G,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Qt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Qt,rev:Qt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Qt,requiredFeatures:Qt,requiredFonts:Qt,requiredFormats:Qt,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:G,specularExponent:G,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:G,strikethroughThickness:G,string:null,stroke:null,strokeDashArray:Qt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:G,strokeOpacity:G,strokeWidth:null,style:null,surfaceScale:G,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Qt,tabIndex:G,tableValues:null,target:null,targetX:G,targetY:G,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Qt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:G,underlineThickness:G,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:G,values:null,vAlphabetic:G,vMathematical:G,vectorEffect:null,vHanging:G,vIdeographic:G,version:null,vertAdvY:G,vertOriginX:G,vertOriginY:G,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:G,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:S1}),N1=Bi({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()}}),A1=Bi({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:C1}),v1=Bi({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Vb={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"},Wb=/[A-Z]/g,Ch=/-[a-z]/g,qb=/^data[-\w.:]+$/i;function il(e,t){const n=qs(t);let r=t,i=Yt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&qb.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(Ch,Gb);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!Ch.test(s)){let a=s.replace(Wb,Qb);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=Cd}return new i(r,t)}function Qb(e){return"-"+e.toLowerCase()}function Gb(e){return e.charAt(1).toUpperCase()}const sa=_1([k1,$b,N1,A1,v1],"html"),Cr=_1([k1,Yb,N1,A1,v1],"svg");function Nh(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function w1(e){return e.join(" ").trim()}var Nd={},Ah=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Kb=/\n/g,Xb=/^\s*/,Jb=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Zb=/^:\s*/,ex=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,tx=/^[;\s]*/,nx=/^\s+|\s+$/g,rx=`
384
+ `,vh="/",wh="*",Ir="",ix="comment",sx="declaration";function ax(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(E){var k=E.match(Kb);k&&(n+=k.length);var L=E.lastIndexOf(rx);r=~L?E.length-L:r+E.length}function s(){var E={line:n,column:r};return function(k){return k.position=new a(E),d(),k}}function a(E){this.start=E,this.end={line:n,column:r},this.source=t.source}a.prototype.content=e;function u(E){var k=new Error(t.source+":"+n+":"+r+": "+E);if(k.reason=E,k.filename=t.source,k.line=n,k.column=r,k.source=e,!t.silent)throw k}function l(E){var k=E.exec(e);if(k){var L=k[0];return i(L),e=e.slice(L.length),k}}function d(){l(Xb)}function f(E){var k;for(E=E||[];k=h();)k!==!1&&E.push(k);return E}function h(){var E=s();if(!(vh!=e.charAt(0)||wh!=e.charAt(1))){for(var k=2;Ir!=e.charAt(k)&&(wh!=e.charAt(k)||vh!=e.charAt(k+1));)++k;if(k+=2,Ir===e.charAt(k-1))return u("End of comment missing");var L=e.slice(2,k-2);return r+=2,i(L),e=e.slice(k),r+=2,E({type:ix,comment:L})}}function m(){var E=s(),k=l(Jb);if(k){if(h(),!l(Zb))return u("property missing ':'");var L=l(ex),g=E({type:sx,property:Ih(k[0].replace(Ah,Ir)),value:L?Ih(L[0].replace(Ah,Ir)):Ir});return l(tx),g}}function p(){var E=[];f(E);for(var k;k=m();)k!==!1&&(E.push(k),f(E));return E}return d(),p()}function Ih(e){return e?e.replace(nx,Ir):Ir}var ux=ax,lx=eu&&eu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Nd,"__esModule",{value:!0});Nd.default=cx;const ox=lx(ux);function cx(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,ox.default)(e),i=typeof t=="function";return r.forEach(s=>{if(s.type!=="declaration")return;const{property:a,value:u}=s;i?t(a,u,s):u&&(n=n||{},n[a]=u)}),n}var sl={};Object.defineProperty(sl,"__esModule",{value:!0});sl.camelCase=void 0;var dx=/^--[a-zA-Z0-9_-]+$/,fx=/-([a-z])/g,hx=/^[^-]+$/,mx=/^-(webkit|moz|ms|o|khtml)-/,px=/^-(ms)-/,gx=function(e){return!e||hx.test(e)||dx.test(e)},Ex=function(e,t){return t.toUpperCase()},Lh=function(e,t){return"".concat(t,"-")},Tx=function(e,t){return t===void 0&&(t={}),gx(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(px,Lh):e=e.replace(mx,Lh),e.replace(fx,Ex))};sl.camelCase=Tx;var yx=eu&&eu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},bx=yx(Nd),xx=sl;function cc(e,t){var n={};return!e||typeof e!="string"||(0,bx.default)(e,function(r,i){r&&i&&(n[(0,xx.camelCase)(r,t)]=i)}),n}cc.default=cc;var _x=cc;const kx=Bu(_x),al=I1("end"),Rn=I1("start");function I1(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Sx(e){const t=Rn(e),n=al(e);if(t&&n)return{start:t,end:n}}function ys(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Dh(e.position):"start"in e||"end"in e?Dh(e):"line"in e||"column"in e?dc(e):""}function dc(e){return Rh(e&&e.line)+":"+Rh(e&&e.column)}function Dh(e){return dc(e&&e.start)+"-"+dc(e&&e.end)}function Rh(e){return e&&typeof e=="number"?e:1}class kt extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",s={},a=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof t=="string"?i=t:!s.cause&&t&&(a=!0,i=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?s.ruleId=r:(s.source=r.slice(0,l),s.ruleId=r.slice(l+1))}if(!s.place&&s.ancestors&&s.ancestors){const l=s.ancestors[s.ancestors.length-1];l&&(s.place=l.position)}const u=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=u?u.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=u?u.line:void 0,this.name=ys(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=a&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}kt.prototype.file="";kt.prototype.name="";kt.prototype.reason="";kt.prototype.message="";kt.prototype.stack="";kt.prototype.column=void 0;kt.prototype.line=void 0;kt.prototype.ancestors=void 0;kt.prototype.cause=void 0;kt.prototype.fatal=void 0;kt.prototype.place=void 0;kt.prototype.ruleId=void 0;kt.prototype.source=void 0;const Ad={}.hasOwnProperty,Cx=new Map,Nx=/[A-Z]/g,Ax=new Set(["table","tbody","thead","tfoot","tr"]),vx=new Set(["td","th"]),L1="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function wx(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Fx(n,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");r=Mx(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Cr:sa,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=D1(i,e,void 0);return s&&typeof s!="string"?s:i.create(e,i.Fragment,{children:s||void 0},void 0)}function D1(e,t,n){if(t.type==="element")return Ix(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Lx(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Rx(e,t,n);if(t.type==="mdxjsEsm")return Dx(e,t);if(t.type==="root")return Ox(e,t,n);if(t.type==="text")return Px(e,t)}function Ix(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Cr,e.schema=i),e.ancestors.push(t);const s=O1(e,t.tagName,!1),a=Bx(e,t);let u=wd(e,t);return Ax.has(t.tagName)&&(u=u.filter(function(l){return typeof l=="string"?!Hb(l):!0})),R1(e,a,s,t),vd(a,u),e.ancestors.pop(),e.schema=r,e.create(t,s,a,n)}function Lx(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Qs(e,t.position)}function Dx(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Qs(e,t.position)}function Rx(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Cr,e.schema=i),e.ancestors.push(t);const s=t.name===null?e.Fragment:O1(e,t.name,!0),a=jx(e,t),u=wd(e,t);return R1(e,a,s,t),vd(a,u),e.ancestors.pop(),e.schema=r,e.create(t,s,a,n)}function Ox(e,t,n){const r={};return vd(r,wd(e,t)),e.create(t,e.Fragment,r,n)}function Px(e,t){return t.value}function R1(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function vd(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Mx(e,t,n){return r;function r(i,s,a,u){const d=Array.isArray(a.children)?n:t;return u?d(s,a,u):d(s,a)}}function Fx(e,t){return n;function n(r,i,s,a){const u=Array.isArray(s.children),l=Rn(r);return t(i,s,a,u,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function Bx(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Ad.call(t.properties,i)){const s=Ux(e,i,t.properties[i]);if(s){const[a,u]=s;e.tableCellAlignToStyle&&a==="align"&&typeof u=="string"&&vx.has(t.tagName)?r=u:n[a]=u}}if(r){const s=n.style||(n.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function jx(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const s=r.data.estree.body[0];s.type;const a=s.expression;a.type;const u=a.properties[0];u.type,Object.assign(n,e.evaluater.evaluateExpression(u.argument))}else Qs(e,t.position);else{const i=r.name;let s;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const u=r.value.data.estree.body[0];u.type,s=e.evaluater.evaluateExpression(u.expression)}else Qs(e,t.position);else s=r.value===null?!0:r.value;n[i]=s}return n}function wd(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:Cx;for(;++r<t.children.length;){const s=t.children[r];let a;if(e.passKeys){const l=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(l){const d=i.get(l)||0;a=l+"-"+d,i.set(l,d+1)}}const u=D1(e,s,a);u!==void 0&&n.push(u)}return n}function Ux(e,t,n){const r=il(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?x1(n):w1(n)),r.property==="style"){let i=typeof n=="object"?n:Hx(e,String(n));return e.stylePropertyNameCase==="css"&&(i=zx(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Vb[r.property]||r.property:r.attribute,n]}}function Hx(e,t){try{return kx(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new kt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=L1+"#cannot-parse-style-attribute",i}}function O1(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let s=-1,a;for(;++s<i.length;){const u=_h(i[s])?{type:"Identifier",name:i[s]}:{type:"Literal",value:i[s]};a=a?{type:"MemberExpression",object:a,property:u,computed:!!(s&&u.type==="Literal"),optional:!1}:u}r=a}else r=_h(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Ad.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Qs(e)}function Qs(e,t){const n=new kt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=L1+"#cannot-handle-mdx-estrees-without-createevaluater",n}function zx(e){const t={};let n;for(n in e)Ad.call(e,n)&&(t[$x(n)]=e[n]);return t}function $x(e){let t=e.replace(Nx,Yx);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Yx(e){return"-"+e.toLowerCase()}const Ql={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"]},Vx={};function Id(e,t){const n=Vx,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return P1(e,r,i)}function P1(e,t,n){if(Wx(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Oh(e.children,t,n)}return Array.isArray(e)?Oh(e,t,n):""}function Oh(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=P1(e[i],t,n);return r.join("")}function Wx(e){return!!(e&&typeof e=="object")}const Ph=document.createElement("i");function Ld(e){const t="&"+e+";";Ph.innerHTML=t;const n=Ph.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Jt(e,t,n,r){const i=e.length;let s=0,a;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);s<r.length;)a=r.slice(s,s+1e4),a.unshift(t,0),e.splice(...a),s+=1e4,t+=1e4}function an(e,t){return e.length>0?(Jt(e,e.length,0,t),e):t}const Mh={}.hasOwnProperty;function M1(e){const t={};let n=-1;for(;++n<e.length;)qx(t,e[n]);return t}function qx(e,t){let n;for(n in t){const i=(Mh.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let a;if(s)for(a in s){Mh.call(i,a)||(i[a]=[]);const u=s[a];Qx(i[a],Array.isArray(u)?u:u?[u]:[])}}}function Qx(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Jt(e,0,0,r)}function F1(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function bn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const It=Nr(/[A-Za-z]/),xt=Nr(/[\dA-Za-z]/),Gx=Nr(/[#-'*+\--9=?A-Z^-~]/);function wu(e){return e!==null&&(e<32||e===127)}const fc=Nr(/\d/),Kx=Nr(/[\dA-Fa-f]/),Xx=Nr(/[!-/:-@[-`{-~]/);function oe(e){return e!==null&&e<-2}function Me(e){return e!==null&&(e<0||e===32)}function _e(e){return e===-2||e===-1||e===32}const ul=Nr(new RegExp("\\p{P}|\\p{S}","u")),Wr=Nr(/\s/);function Nr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function ji(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const s=e.charCodeAt(n);let a="";if(s===37&&xt(e.charCodeAt(n+1))&&xt(e.charCodeAt(n+2)))i=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(a=String.fromCharCode(s));else if(s>55295&&s<57344){const u=e.charCodeAt(n+1);s<56320&&u>56319&&u<57344?(a=String.fromCharCode(s,u),i=1):a="�"}else a=String.fromCharCode(s);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Ae(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let s=0;return a;function a(l){return _e(l)?(e.enter(n),u(l)):t(l)}function u(l){return _e(l)&&s++<i?(e.consume(l),u):(e.exit(n),t(l))}}const Jx={tokenize:Zx};function Zx(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),Ae(e,t,"linePrefix")}function i(u){return e.enter("paragraph"),s(u)}function s(u){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,a(u)}function a(u){if(u===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(u);return}return oe(u)?(e.consume(u),e.exit("chunkText"),s):(e.consume(u),a)}}const e_={tokenize:t_},Fh={tokenize:n_};function t_(e){const t=this,n=[];let r=0,i,s,a;return u;function u(x){if(r<n.length){const R=n[r];return t.containerState=R[1],e.attempt(R[0].continuation,l,d)(x)}return d(x)}function l(x){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&T();const R=t.events.length;let B=R,C;for(;B--;)if(t.events[B][0]==="exit"&&t.events[B][1].type==="chunkFlow"){C=t.events[B][1].end;break}g(r);let I=R;for(;I<t.events.length;)t.events[I][1].end={...C},I++;return Jt(t.events,B+1,0,t.events.slice(R)),t.events.length=I,d(x)}return u(x)}function d(x){if(r===n.length){if(!i)return m(x);if(i.currentConstruct&&i.currentConstruct.concrete)return E(x);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Fh,f,h)(x)}function f(x){return i&&T(),g(r),m(x)}function h(x){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,E(x)}function m(x){return t.containerState={},e.attempt(Fh,p,E)(x)}function p(x){return r++,n.push([t.currentConstruct,t.containerState]),m(x)}function E(x){if(x===null){i&&T(),g(0),e.consume(x);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:s}),k(x)}function k(x){if(x===null){L(e.exit("chunkFlow"),!0),g(0),e.consume(x);return}return oe(x)?(e.consume(x),L(e.exit("chunkFlow")),r=0,t.interrupt=void 0,u):(e.consume(x),k)}function L(x,R){const B=t.sliceStream(x);if(R&&B.push(null),x.previous=s,s&&(s.next=x),s=x,i.defineSkip(x.start),i.write(B),t.parser.lazy[x.start.line]){let C=i.events.length;for(;C--;)if(i.events[C][1].start.offset<a&&(!i.events[C][1].end||i.events[C][1].end.offset>a))return;const I=t.events.length;let D=I,Y,w;for(;D--;)if(t.events[D][0]==="exit"&&t.events[D][1].type==="chunkFlow"){if(Y){w=t.events[D][1].end;break}Y=!0}for(g(r),C=I;C<t.events.length;)t.events[C][1].end={...w},C++;Jt(t.events,D+1,0,t.events.slice(I)),t.events.length=C}}function g(x){let R=n.length;for(;R-- >x;){const B=n[R];t.containerState=B[1],B[0].exit.call(t,e)}n.length=x}function T(){i.write([null]),s=void 0,i=void 0,t.containerState._closeFlow=void 0}}function n_(e,t,n){return Ae(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Di(e){if(e===null||Me(e)||Wr(e))return 1;if(ul(e))return 2}function ll(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const s=e[i].resolveAll;s&&!r.includes(s)&&(t=s(t,n),r.push(s))}return t}const hc={name:"attention",resolveAll:r_,tokenize:i_};function r_(e,t){let n=-1,r,i,s,a,u,l,d,f;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const h={...e[r][1].end},m={...e[n][1].start};Bh(h,-l),Bh(m,l),a={type:l>1?"strongSequence":"emphasisSequence",start:h,end:{...e[r][1].end}},u={type:l>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:m},s={type:l>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:l>1?"strong":"emphasis",start:{...a.start},end:{...u.end}},e[r][1].end={...a.start},e[n][1].start={...u.end},d=[],e[r][1].end.offset-e[r][1].start.offset&&(d=an(d,[["enter",e[r][1],t],["exit",e[r][1],t]])),d=an(d,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",s,t]]),d=an(d,ll(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),d=an(d,[["exit",s,t],["enter",u,t],["exit",u,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(f=2,d=an(d,[["enter",e[n][1],t],["exit",e[n][1],t]])):f=0,Jt(e,r-1,n-r+3,d),n=r+d.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function i_(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Di(r);let s;return a;function a(l){return s=l,e.enter("attentionSequence"),u(l)}function u(l){if(l===s)return e.consume(l),u;const d=e.exit("attentionSequence"),f=Di(l),h=!f||f===2&&i||n.includes(l),m=!i||i===2&&f||n.includes(r);return d._open=!!(s===42?h:h&&(i||!m)),d._close=!!(s===42?m:m&&(f||!h)),t(l)}}function Bh(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const s_={name:"autolink",tokenize:a_};function a_(e,t,n){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(p){return It(p)?(e.consume(p),a):p===64?n(p):d(p)}function a(p){return p===43||p===45||p===46||xt(p)?(r=1,u(p)):d(p)}function u(p){return p===58?(e.consume(p),r=0,l):(p===43||p===45||p===46||xt(p))&&r++<32?(e.consume(p),u):(r=0,d(p))}function l(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||wu(p)?n(p):(e.consume(p),l)}function d(p){return p===64?(e.consume(p),f):Gx(p)?(e.consume(p),d):n(p)}function f(p){return xt(p)?h(p):n(p)}function h(p){return p===46?(e.consume(p),r=0,f):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):m(p)}function m(p){if((p===45||xt(p))&&r++<63){const E=p===45?m:h;return e.consume(p),E}return n(p)}}const aa={partial:!0,tokenize:u_};function u_(e,t,n){return r;function r(s){return _e(s)?Ae(e,i,"linePrefix")(s):i(s)}function i(s){return s===null||oe(s)?t(s):n(s)}}const B1={continuation:{tokenize:o_},exit:c_,name:"blockQuote",tokenize:l_};function l_(e,t,n){const r=this;return i;function i(a){if(a===62){const u=r.containerState;return u.open||(e.enter("blockQuote",{_container:!0}),u.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),s}return n(a)}function s(a){return _e(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function o_(e,t,n){const r=this;return i;function i(a){return _e(a)?Ae(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):s(a)}function s(a){return e.attempt(B1,t,n)(a)}}function c_(e){e.exit("blockQuote")}const j1={name:"characterEscape",tokenize:d_};function d_(e,t,n){return r;function r(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),i}function i(s){return Xx(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const U1={name:"characterReference",tokenize:f_};function f_(e,t,n){const r=this;let i=0,s,a;return u;function u(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"),d):(e.enter("characterReferenceValue"),s=31,a=xt,f(h))}function d(h){return h===88||h===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(h),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,a=Kx,f):(e.enter("characterReferenceValue"),s=7,a=fc,f(h))}function f(h){if(h===59&&i){const m=e.exit("characterReferenceValue");return a===xt&&!Ld(r.sliceSerialize(m))?n(h):(e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(h)&&i++<s?(e.consume(h),f):n(h)}}const jh={partial:!0,tokenize:m_},Uh={concrete:!0,name:"codeFenced",tokenize:h_};function h_(e,t,n){const r=this,i={partial:!0,tokenize:B};let s=0,a=0,u;return l;function l(C){return d(C)}function d(C){const I=r.events[r.events.length-1];return s=I&&I[1].type==="linePrefix"?I[2].sliceSerialize(I[1],!0).length:0,u=C,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(C)}function f(C){return C===u?(a++,e.consume(C),f):a<3?n(C):(e.exit("codeFencedFenceSequence"),_e(C)?Ae(e,h,"whitespace")(C):h(C))}function h(C){return C===null||oe(C)?(e.exit("codeFencedFence"),r.interrupt?t(C):e.check(jh,k,R)(C)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),m(C))}function m(C){return C===null||oe(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),h(C)):_e(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ae(e,p,"whitespace")(C)):C===96&&C===u?n(C):(e.consume(C),m)}function p(C){return C===null||oe(C)?h(C):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),E(C))}function E(C){return C===null||oe(C)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),h(C)):C===96&&C===u?n(C):(e.consume(C),E)}function k(C){return e.attempt(i,R,L)(C)}function L(C){return e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),g}function g(C){return s>0&&_e(C)?Ae(e,T,"linePrefix",s+1)(C):T(C)}function T(C){return C===null||oe(C)?e.check(jh,k,R)(C):(e.enter("codeFlowValue"),x(C))}function x(C){return C===null||oe(C)?(e.exit("codeFlowValue"),T(C)):(e.consume(C),x)}function R(C){return e.exit("codeFenced"),t(C)}function B(C,I,D){let Y=0;return w;function w(de){return C.enter("lineEnding"),C.consume(de),C.exit("lineEnding"),V}function V(de){return C.enter("codeFencedFence"),_e(de)?Ae(C,X,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(de):X(de)}function X(de){return de===u?(C.enter("codeFencedFenceSequence"),ce(de)):D(de)}function ce(de){return de===u?(Y++,C.consume(de),ce):Y>=a?(C.exit("codeFencedFenceSequence"),_e(de)?Ae(C,se,"whitespace")(de):se(de)):D(de)}function se(de){return de===null||oe(de)?(C.exit("codeFencedFence"),I(de)):D(de)}}}function m_(e,t,n){const r=this;return i;function i(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s)}function s(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const Gl={name:"codeIndented",tokenize:g_},p_={partial:!0,tokenize:E_};function g_(e,t,n){const r=this;return i;function i(d){return e.enter("codeIndented"),Ae(e,s,"linePrefix",5)(d)}function s(d){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?a(d):n(d)}function a(d){return d===null?l(d):oe(d)?e.attempt(p_,a,l)(d):(e.enter("codeFlowValue"),u(d))}function u(d){return d===null||oe(d)?(e.exit("codeFlowValue"),a(d)):(e.consume(d),u)}function l(d){return e.exit("codeIndented"),t(d)}}function E_(e,t,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):oe(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):Ae(e,s,"linePrefix",5)(a)}function s(a){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(a):oe(a)?i(a):n(a)}}const T_={name:"codeText",previous:b_,resolve:y_,tokenize:x_};function y_(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function b_(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function x_(e,t,n){let r=0,i,s;return a;function a(h){return e.enter("codeText"),e.enter("codeTextSequence"),u(h)}function u(h){return h===96?(e.consume(h),r++,u):(e.exit("codeTextSequence"),l(h))}function l(h){return h===null?n(h):h===32?(e.enter("space"),e.consume(h),e.exit("space"),l):h===96?(s=e.enter("codeTextSequence"),i=0,f(h)):oe(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),l):(e.enter("codeTextData"),d(h))}function d(h){return h===null||h===32||h===96||oe(h)?(e.exit("codeTextData"),l(h)):(e.consume(h),d)}function f(h){return h===96?(e.consume(h),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(h)):(s.type="codeTextData",d(h))}}class __{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,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const s=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&es(this.left,r),s.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),es(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),es(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 n=this.left.splice(t,Number.POSITIVE_INFINITY);es(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);es(this.left,n.reverse())}}}function es(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function H1(e){const t={};let n=-1,r,i,s,a,u,l,d;const f=new __(e);for(;++n<f.length;){for(;n in t;)n=t[n];if(r=f.get(n),n&&r[1].type==="chunkFlow"&&f.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,s=0,s<l.length&&l[s][1].type==="lineEndingBlank"&&(s+=2),s<l.length&&l[s][1].type==="content"))for(;++s<l.length&&l[s][1].type!=="content";)l[s][1].type==="chunkText"&&(l[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,k_(f,n)),n=t[n],d=!0);else if(r[1]._container){for(s=n,i=void 0;s--;)if(a=f.get(s),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=s);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},u=f.slice(i,n),u.unshift(r),f.splice(i,n-i+1,u))}}return Jt(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!d}function k_(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const s=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const u=a.events,l=[],d={};let f,h,m=-1,p=n,E=0,k=0;const L=[k];for(;p;){for(;e.get(++i)[1]!==p;);s.push(i),p._tokenizer||(f=r.sliceStream(p),p.next||f.push(null),h&&a.defineSkip(p.start),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(f),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),h=p,p=p.next}for(p=n;++m<u.length;)u[m][0]==="exit"&&u[m-1][0]==="enter"&&u[m][1].type===u[m-1][1].type&&u[m][1].start.line!==u[m][1].end.line&&(k=m+1,L.push(k),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(a.events=[],p?(p._tokenizer=void 0,p.previous=void 0):L.pop(),m=L.length;m--;){const g=u.slice(L[m],L[m+1]),T=s.pop();l.push([T,T+g.length-1]),e.splice(T,2,g)}for(l.reverse(),m=-1;++m<l.length;)d[E+l[m][0]]=E+l[m][1],E+=l[m][1]-l[m][0]-1;return d}const S_={resolve:N_,tokenize:A_},C_={partial:!0,tokenize:v_};function N_(e){return H1(e),e}function A_(e,t){let n;return r;function r(u){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(u)}function i(u){return u===null?s(u):oe(u)?e.check(C_,a,s)(u):(e.consume(u),i)}function s(u){return e.exit("chunkContent"),e.exit("content"),t(u)}function a(u){return e.consume(u),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function v_(e,t,n){const r=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Ae(e,s,"linePrefix")}function s(a){if(a===null||oe(a))return n(a);const u=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function z1(e,t,n,r,i,s,a,u,l){const d=l||Number.POSITIVE_INFINITY;let f=0;return h;function h(g){return g===60?(e.enter(r),e.enter(i),e.enter(s),e.consume(g),e.exit(s),m):g===null||g===32||g===41||wu(g)?n(g):(e.enter(r),e.enter(a),e.enter(u),e.enter("chunkString",{contentType:"string"}),k(g))}function m(g){return g===62?(e.enter(s),e.consume(g),e.exit(s),e.exit(i),e.exit(r),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),p(g))}function p(g){return g===62?(e.exit("chunkString"),e.exit(u),m(g)):g===null||g===60||oe(g)?n(g):(e.consume(g),g===92?E:p)}function E(g){return g===60||g===62||g===92?(e.consume(g),p):p(g)}function k(g){return!f&&(g===null||g===41||Me(g))?(e.exit("chunkString"),e.exit(u),e.exit(a),e.exit(r),t(g)):f<d&&g===40?(e.consume(g),f++,k):g===41?(e.consume(g),f--,k):g===null||g===32||g===40||wu(g)?n(g):(e.consume(g),g===92?L:k)}function L(g){return g===40||g===41||g===92?(e.consume(g),k):k(g)}}function $1(e,t,n,r,i,s){const a=this;let u=0,l;return d;function d(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(s),f}function f(p){return u>999||p===null||p===91||p===93&&!l||p===94&&!u&&"_hiddenFootnoteSupport"in a.parser.constructs?n(p):p===93?(e.exit(s),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):oe(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),h(p))}function h(p){return p===null||p===91||p===93||oe(p)||u++>999?(e.exit("chunkString"),f(p)):(e.consume(p),l||(l=!_e(p)),p===92?m:h)}function m(p){return p===91||p===92||p===93?(e.consume(p),u++,h):h(p)}}function Y1(e,t,n,r,i,s){let a;return u;function u(m){return m===34||m===39||m===40?(e.enter(r),e.enter(i),e.consume(m),e.exit(i),a=m===40?41:m,l):n(m)}function l(m){return m===a?(e.enter(i),e.consume(m),e.exit(i),e.exit(r),t):(e.enter(s),d(m))}function d(m){return m===a?(e.exit(s),l(a)):m===null?n(m):oe(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),Ae(e,d,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(m))}function f(m){return m===a||m===null||oe(m)?(e.exit("chunkString"),d(m)):(e.consume(m),m===92?h:f)}function h(m){return m===a||m===92?(e.consume(m),f):f(m)}}function bs(e,t){let n;return r;function r(i){return oe(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):_e(i)?Ae(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const w_={name:"definition",tokenize:L_},I_={partial:!0,tokenize:D_};function L_(e,t,n){const r=this;let i;return s;function s(p){return e.enter("definition"),a(p)}function a(p){return $1.call(r,e,u,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function u(p){return i=bn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),l):n(p)}function l(p){return Me(p)?bs(e,d)(p):d(p)}function d(p){return z1(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function f(p){return e.attempt(I_,h,h)(p)}function h(p){return _e(p)?Ae(e,m,"whitespace")(p):m(p)}function m(p){return p===null||oe(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function D_(e,t,n){return r;function r(u){return Me(u)?bs(e,i)(u):n(u)}function i(u){return Y1(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function s(u){return _e(u)?Ae(e,a,"whitespace")(u):a(u)}function a(u){return u===null||oe(u)?t(u):n(u)}}const R_={name:"hardBreakEscape",tokenize:O_};function O_(e,t,n){return r;function r(s){return e.enter("hardBreakEscape"),e.consume(s),i}function i(s){return oe(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const P_={name:"headingAtx",resolve:M_,tokenize:F_};function M_(e,t){let n=e.length-2,r=3,i,s;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},s={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Jt(e,r,n-r+1,[["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t]])),e}function F_(e,t,n){let r=0;return i;function i(f){return e.enter("atxHeading"),s(f)}function s(f){return e.enter("atxHeadingSequence"),a(f)}function a(f){return f===35&&r++<6?(e.consume(f),a):f===null||Me(f)?(e.exit("atxHeadingSequence"),u(f)):n(f)}function u(f){return f===35?(e.enter("atxHeadingSequence"),l(f)):f===null||oe(f)?(e.exit("atxHeading"),t(f)):_e(f)?Ae(e,u,"whitespace")(f):(e.enter("atxHeadingText"),d(f))}function l(f){return f===35?(e.consume(f),l):(e.exit("atxHeadingSequence"),u(f))}function d(f){return f===null||f===35||Me(f)?(e.exit("atxHeadingText"),u(f)):(e.consume(f),d)}}const B_=["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"],Hh=["pre","script","style","textarea"],j_={concrete:!0,name:"htmlFlow",resolveTo:z_,tokenize:$_},U_={partial:!0,tokenize:V_},H_={partial:!0,tokenize:Y_};function z_(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 $_(e,t,n){const r=this;let i,s,a,u,l;return d;function d(N){return f(N)}function f(N){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(N),h}function h(N){return N===33?(e.consume(N),m):N===47?(e.consume(N),s=!0,k):N===63?(e.consume(N),i=3,r.interrupt?t:y):It(N)?(e.consume(N),a=String.fromCharCode(N),L):n(N)}function m(N){return N===45?(e.consume(N),i=2,p):N===91?(e.consume(N),i=5,u=0,E):It(N)?(e.consume(N),i=4,r.interrupt?t:y):n(N)}function p(N){return N===45?(e.consume(N),r.interrupt?t:y):n(N)}function E(N){const Ee="CDATA[";return N===Ee.charCodeAt(u++)?(e.consume(N),u===Ee.length?r.interrupt?t:X:E):n(N)}function k(N){return It(N)?(e.consume(N),a=String.fromCharCode(N),L):n(N)}function L(N){if(N===null||N===47||N===62||Me(N)){const Ee=N===47,Se=a.toLowerCase();return!Ee&&!s&&Hh.includes(Se)?(i=1,r.interrupt?t(N):X(N)):B_.includes(a.toLowerCase())?(i=6,Ee?(e.consume(N),g):r.interrupt?t(N):X(N)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(N):s?T(N):x(N))}return N===45||xt(N)?(e.consume(N),a+=String.fromCharCode(N),L):n(N)}function g(N){return N===62?(e.consume(N),r.interrupt?t:X):n(N)}function T(N){return _e(N)?(e.consume(N),T):w(N)}function x(N){return N===47?(e.consume(N),w):N===58||N===95||It(N)?(e.consume(N),R):_e(N)?(e.consume(N),x):w(N)}function R(N){return N===45||N===46||N===58||N===95||xt(N)?(e.consume(N),R):B(N)}function B(N){return N===61?(e.consume(N),C):_e(N)?(e.consume(N),B):x(N)}function C(N){return N===null||N===60||N===61||N===62||N===96?n(N):N===34||N===39?(e.consume(N),l=N,I):_e(N)?(e.consume(N),C):D(N)}function I(N){return N===l?(e.consume(N),l=null,Y):N===null||oe(N)?n(N):(e.consume(N),I)}function D(N){return N===null||N===34||N===39||N===47||N===60||N===61||N===62||N===96||Me(N)?B(N):(e.consume(N),D)}function Y(N){return N===47||N===62||_e(N)?x(N):n(N)}function w(N){return N===62?(e.consume(N),V):n(N)}function V(N){return N===null||oe(N)?X(N):_e(N)?(e.consume(N),V):n(N)}function X(N){return N===45&&i===2?(e.consume(N),ae):N===60&&i===1?(e.consume(N),Te):N===62&&i===4?(e.consume(N),ee):N===63&&i===3?(e.consume(N),y):N===93&&i===5?(e.consume(N),F):oe(N)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(U_,le,ce)(N)):N===null||oe(N)?(e.exit("htmlFlowData"),ce(N)):(e.consume(N),X)}function ce(N){return e.check(H_,se,le)(N)}function se(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),de}function de(N){return N===null||oe(N)?ce(N):(e.enter("htmlFlowData"),X(N))}function ae(N){return N===45?(e.consume(N),y):X(N)}function Te(N){return N===47?(e.consume(N),a="",v):X(N)}function v(N){if(N===62){const Ee=a.toLowerCase();return Hh.includes(Ee)?(e.consume(N),ee):X(N)}return It(N)&&a.length<8?(e.consume(N),a+=String.fromCharCode(N),v):X(N)}function F(N){return N===93?(e.consume(N),y):X(N)}function y(N){return N===62?(e.consume(N),ee):N===45&&i===2?(e.consume(N),y):X(N)}function ee(N){return N===null||oe(N)?(e.exit("htmlFlowData"),le(N)):(e.consume(N),ee)}function le(N){return e.exit("htmlFlow"),t(N)}}function Y_(e,t,n){const r=this;return i;function i(a){return oe(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s):n(a)}function s(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function V_(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(aa,t,n)}}const W_={name:"htmlText",tokenize:q_};function q_(e,t,n){const r=this;let i,s,a;return u;function u(y){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(y),l}function l(y){return y===33?(e.consume(y),d):y===47?(e.consume(y),B):y===63?(e.consume(y),x):It(y)?(e.consume(y),D):n(y)}function d(y){return y===45?(e.consume(y),f):y===91?(e.consume(y),s=0,E):It(y)?(e.consume(y),T):n(y)}function f(y){return y===45?(e.consume(y),p):n(y)}function h(y){return y===null?n(y):y===45?(e.consume(y),m):oe(y)?(a=h,Te(y)):(e.consume(y),h)}function m(y){return y===45?(e.consume(y),p):h(y)}function p(y){return y===62?ae(y):y===45?m(y):h(y)}function E(y){const ee="CDATA[";return y===ee.charCodeAt(s++)?(e.consume(y),s===ee.length?k:E):n(y)}function k(y){return y===null?n(y):y===93?(e.consume(y),L):oe(y)?(a=k,Te(y)):(e.consume(y),k)}function L(y){return y===93?(e.consume(y),g):k(y)}function g(y){return y===62?ae(y):y===93?(e.consume(y),g):k(y)}function T(y){return y===null||y===62?ae(y):oe(y)?(a=T,Te(y)):(e.consume(y),T)}function x(y){return y===null?n(y):y===63?(e.consume(y),R):oe(y)?(a=x,Te(y)):(e.consume(y),x)}function R(y){return y===62?ae(y):x(y)}function B(y){return It(y)?(e.consume(y),C):n(y)}function C(y){return y===45||xt(y)?(e.consume(y),C):I(y)}function I(y){return oe(y)?(a=I,Te(y)):_e(y)?(e.consume(y),I):ae(y)}function D(y){return y===45||xt(y)?(e.consume(y),D):y===47||y===62||Me(y)?Y(y):n(y)}function Y(y){return y===47?(e.consume(y),ae):y===58||y===95||It(y)?(e.consume(y),w):oe(y)?(a=Y,Te(y)):_e(y)?(e.consume(y),Y):ae(y)}function w(y){return y===45||y===46||y===58||y===95||xt(y)?(e.consume(y),w):V(y)}function V(y){return y===61?(e.consume(y),X):oe(y)?(a=V,Te(y)):_e(y)?(e.consume(y),V):Y(y)}function X(y){return y===null||y===60||y===61||y===62||y===96?n(y):y===34||y===39?(e.consume(y),i=y,ce):oe(y)?(a=X,Te(y)):_e(y)?(e.consume(y),X):(e.consume(y),se)}function ce(y){return y===i?(e.consume(y),i=void 0,de):y===null?n(y):oe(y)?(a=ce,Te(y)):(e.consume(y),ce)}function se(y){return y===null||y===34||y===39||y===60||y===61||y===96?n(y):y===47||y===62||Me(y)?Y(y):(e.consume(y),se)}function de(y){return y===47||y===62||Me(y)?Y(y):n(y)}function ae(y){return y===62?(e.consume(y),e.exit("htmlTextData"),e.exit("htmlText"),t):n(y)}function Te(y){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),v}function v(y){return _e(y)?Ae(e,F,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(y):F(y)}function F(y){return e.enter("htmlTextData"),a(y)}}const Dd={name:"labelEnd",resolveAll:X_,resolveTo:J_,tokenize:Z_},Q_={tokenize:ek},G_={tokenize:tk},K_={tokenize:nk};function X_(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&Jt(e,0,e.length,n),e}function J_(e,t){let n=e.length,r=0,i,s,a,u;for(;n--;)if(i=e[n][1],s){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(s=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(a=n);const l={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},d={type:"label",start:{...e[s][1].start},end:{...e[a][1].end}},f={type:"labelText",start:{...e[s+r+2][1].end},end:{...e[a-2][1].start}};return u=[["enter",l,t],["enter",d,t]],u=an(u,e.slice(s+1,s+r+3)),u=an(u,[["enter",f,t]]),u=an(u,ll(t.parser.constructs.insideSpan.null,e.slice(s+r+4,a-3),t)),u=an(u,[["exit",f,t],e[a-2],e[a-1],["exit",d,t]]),u=an(u,e.slice(a+1)),u=an(u,[["exit",l,t]]),Jt(e,s,e.length,u),e}function Z_(e,t,n){const r=this;let i=r.events.length,s,a;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){s=r.events[i][1];break}return u;function u(m){return s?s._inactive?h(m):(a=r.parser.defined.includes(bn(r.sliceSerialize({start:s.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(m),e.exit("labelMarker"),e.exit("labelEnd"),l):n(m)}function l(m){return m===40?e.attempt(Q_,f,a?f:h)(m):m===91?e.attempt(G_,f,a?d:h)(m):a?f(m):h(m)}function d(m){return e.attempt(K_,f,h)(m)}function f(m){return t(m)}function h(m){return s._balanced=!0,n(m)}}function ek(e,t,n){return r;function r(h){return e.enter("resource"),e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),i}function i(h){return Me(h)?bs(e,s)(h):s(h)}function s(h){return h===41?f(h):z1(e,a,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function a(h){return Me(h)?bs(e,l)(h):f(h)}function u(h){return n(h)}function l(h){return h===34||h===39||h===40?Y1(e,d,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):f(h)}function d(h){return Me(h)?bs(e,f)(h):f(h)}function f(h){return h===41?(e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),e.exit("resource"),t):n(h)}}function tk(e,t,n){const r=this;return i;function i(u){return $1.call(r,e,s,a,"reference","referenceMarker","referenceString")(u)}function s(u){return r.parser.defined.includes(bn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(u):n(u)}function a(u){return n(u)}}function nk(e,t,n){return r;function r(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),i}function i(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),t):n(s)}}const rk={name:"labelStartImage",resolveAll:Dd.resolveAll,tokenize:ik};function ik(e,t,n){const r=this;return i;function i(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),s}function s(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelImage"),a):n(u)}function a(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const sk={name:"labelStartLink",resolveAll:Dd.resolveAll,tokenize:ak};function ak(e,t,n){const r=this;return i;function i(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),s}function s(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const Kl={name:"lineEnding",tokenize:uk};function uk(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Ae(e,t,"linePrefix")}}const Ka={name:"thematicBreak",tokenize:lk};function lk(e,t,n){let r=0,i;return s;function s(d){return e.enter("thematicBreak"),a(d)}function a(d){return i=d,u(d)}function u(d){return d===i?(e.enter("thematicBreakSequence"),l(d)):r>=3&&(d===null||oe(d))?(e.exit("thematicBreak"),t(d)):n(d)}function l(d){return d===i?(e.consume(d),r++,l):(e.exit("thematicBreakSequence"),_e(d)?Ae(e,u,"whitespace")(d):u(d))}}const Bt={continuation:{tokenize:fk},exit:mk,name:"list",tokenize:dk},ok={partial:!0,tokenize:pk},ck={partial:!0,tokenize:hk};function dk(e,t,n){const r=this,i=r.events[r.events.length-1];let s=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return u;function u(p){const E=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(E==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:fc(p)){if(r.containerState.type||(r.containerState.type=E,e.enter(E,{_container:!0})),E==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(Ka,n,d)(p):d(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(p)}return n(p)}function l(p){return fc(p)&&++a<10?(e.consume(p),l):(!r.interrupt||a<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),d(p)):n(p)}function d(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(aa,r.interrupt?n:f,e.attempt(ok,m,h))}function f(p){return r.containerState.initialBlankLine=!0,s++,m(p)}function h(p){return _e(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),m):n(p)}function m(p){return r.containerState.size=s+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function fk(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(aa,i,s);function i(u){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ae(e,t,"listItemIndent",r.containerState.size+1)(u)}function s(u){return r.containerState.furtherBlankLines||!_e(u)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(u)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(ck,t,a)(u))}function a(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ae(e,e.attempt(Bt,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function hk(e,t,n){const r=this;return Ae(e,i,"listItemIndent",r.containerState.size+1);function i(s){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(s):n(s)}}function mk(e){e.exit(this.containerState.type)}function pk(e,t,n){const r=this;return Ae(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(s){const a=r.events[r.events.length-1];return!_e(s)&&a&&a[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const zh={name:"setextUnderline",resolveTo:gk,tokenize:Ek};function gk(e,t){let n=e.length,r,i,s;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!s&&e[n][1].type==="definition"&&(s=n);const a={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",s?(e.splice(i,0,["enter",a,t]),e.splice(s+1,0,["exit",e[r][1],t]),e[r][1].end={...e[s][1].end}):e[r][1]=a,e.push(["exit",a,t]),e}function Ek(e,t,n){const r=this;let i;return s;function s(d){let f=r.events.length,h;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){h=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||h)?(e.enter("setextHeadingLine"),i=d,a(d)):n(d)}function a(d){return e.enter("setextHeadingLineSequence"),u(d)}function u(d){return d===i?(e.consume(d),u):(e.exit("setextHeadingLineSequence"),_e(d)?Ae(e,l,"lineSuffix")(d):l(d))}function l(d){return d===null||oe(d)?(e.exit("setextHeadingLine"),t(d)):n(d)}}const Tk={tokenize:yk};function yk(e){const t=this,n=e.attempt(aa,r,e.attempt(this.parser.constructs.flowInitial,i,Ae(e,e.attempt(this.parser.constructs.flow,i,e.attempt(S_,i)),"linePrefix")));return n;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const bk={resolveAll:W1()},xk=V1("string"),_k=V1("text");function V1(e){return{resolveAll:W1(e==="text"?kk:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],s=n.attempt(i,a,u);return a;function a(f){return d(f)?s(f):u(f)}function u(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),l}function l(f){return d(f)?(n.exit("data"),s(f)):(n.consume(f),l)}function d(f){if(f===null)return!0;const h=i[f];let m=-1;if(h)for(;++m<h.length;){const p=h[m];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function W1(e){return t;function t(n,r){let i=-1,s;for(;++i<=n.length;)s===void 0?n[i]&&n[i][1].type==="data"&&(s=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==s+2&&(n[s][1].end=n[i-1][1].end,n.splice(s+2,i-s-2),i=s+2),s=void 0);return e?e(n,r):n}}function kk(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let s=i.length,a=-1,u=0,l;for(;s--;){const d=i[s];if(typeof d=="string"){for(a=d.length;d.charCodeAt(a-1)===32;)u++,a--;if(a)break;a=-1}else if(d===-2)l=!0,u++;else if(d!==-1){s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(u=0),u){const d={type:n===e.length||l||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?a:r.start._bufferIndex+a,_index:r.start._index+s,line:r.end.line,column:r.end.column-u,offset:r.end.offset-u},end:{...r.end}};r.end={...d.start},r.start.offset===r.end.offset?Object.assign(r,d):(e.splice(n,0,["enter",d,t],["exit",d,t]),n+=2)}n++}return e}const Sk={42:Bt,43:Bt,45:Bt,48:Bt,49:Bt,50:Bt,51:Bt,52:Bt,53:Bt,54:Bt,55:Bt,56:Bt,57:Bt,62:B1},Ck={91:w_},Nk={[-2]:Gl,[-1]:Gl,32:Gl},Ak={35:P_,42:Ka,45:[zh,Ka],60:j_,61:zh,95:Ka,96:Uh,126:Uh},vk={38:U1,92:j1},wk={[-5]:Kl,[-4]:Kl,[-3]:Kl,33:rk,38:U1,42:hc,60:[s_,W_],91:sk,92:[R_,j1],93:Dd,95:hc,96:T_},Ik={null:[hc,bk]},Lk={null:[42,95]},Dk={null:[]},Rk=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Lk,contentInitial:Ck,disable:Dk,document:Sk,flow:Ak,flowInitial:Nk,insideSpan:Ik,string:vk,text:wk},Symbol.toStringTag,{value:"Module"}));function Ok(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},s=[];let a=[],u=[];const l={attempt:I(B),check:I(C),consume:T,enter:x,exit:R,interrupt:I(C,{interrupt:!0})},d={code:null,containerState:{},defineSkip:k,events:[],now:E,parser:e,previous:null,sliceSerialize:m,sliceStream:p,write:h};let f=t.tokenize.call(d,l);return t.resolveAll&&s.push(t),d;function h(V){return a=an(a,V),L(),a[a.length-1]!==null?[]:(D(t,0),d.events=ll(s,d.events,d),d.events)}function m(V,X){return Mk(p(V),X)}function p(V){return Pk(a,V)}function E(){const{_bufferIndex:V,_index:X,line:ce,column:se,offset:de}=r;return{_bufferIndex:V,_index:X,line:ce,column:se,offset:de}}function k(V){i[V.line]=V.column,w()}function L(){let V;for(;r._index<a.length;){const X=a[r._index];if(typeof X=="string")for(V=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===V&&r._bufferIndex<X.length;)g(X.charCodeAt(r._bufferIndex));else g(X)}}function g(V){f=f(V)}function T(V){oe(V)?(r.line++,r.column=1,r.offset+=V===-3?2:1,w()):V!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),d.previous=V}function x(V,X){const ce=X||{};return ce.type=V,ce.start=E(),d.events.push(["enter",ce,d]),u.push(ce),ce}function R(V){const X=u.pop();return X.end=E(),d.events.push(["exit",X,d]),X}function B(V,X){D(V,X.from)}function C(V,X){X.restore()}function I(V,X){return ce;function ce(se,de,ae){let Te,v,F,y;return Array.isArray(se)?le(se):"tokenize"in se?le([se]):ee(se);function ee(pe){return Qe;function Qe(Ct){const Nt=Ct!==null&&pe[Ct],j=Ct!==null&&pe.null,q=[...Array.isArray(Nt)?Nt:Nt?[Nt]:[],...Array.isArray(j)?j:j?[j]:[]];return le(q)(Ct)}}function le(pe){return Te=pe,v=0,pe.length===0?ae:N(pe[v])}function N(pe){return Qe;function Qe(Ct){return y=Y(),F=pe,pe.partial||(d.currentConstruct=pe),pe.name&&d.parser.constructs.disable.null.includes(pe.name)?Se():pe.tokenize.call(X?Object.assign(Object.create(d),X):d,l,Ee,Se)(Ct)}}function Ee(pe){return V(F,y),de}function Se(pe){return y.restore(),++v<Te.length?N(Te[v]):ae}}}function D(V,X){V.resolveAll&&!s.includes(V)&&s.push(V),V.resolve&&Jt(d.events,X,d.events.length-X,V.resolve(d.events.slice(X),d)),V.resolveTo&&(d.events=V.resolveTo(d.events,d))}function Y(){const V=E(),X=d.previous,ce=d.currentConstruct,se=d.events.length,de=Array.from(u);return{from:se,restore:ae};function ae(){r=V,d.previous=X,d.currentConstruct=ce,d.events.length=se,u=de,w()}}function w(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Pk(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,s=t.end._bufferIndex;let a;if(n===i)a=[e[n].slice(r,s)];else{if(a=e.slice(n,i),r>-1){const u=a[0];typeof u=="string"?a[0]=u.slice(r):a.shift()}s>0&&a.push(e[i].slice(0,s))}return a}function Mk(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const s=e[n];let a;if(typeof s=="string")a=s;else switch(s){case-5:{a="\r";break}case-4:{a=`
385
+ `;break}case-3:{a=`\r
386
+ `;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&i)continue;a=" ";break}default:a=String.fromCharCode(s)}i=s===-2,r.push(a)}return r.join("")}function Fk(e){const r={constructs:M1([Rk,...(e||{}).extensions||[]]),content:i(Jx),defined:[],document:i(e_),flow:i(Tk),lazy:{},string:i(xk),text:i(_k)};return r;function i(s){return a;function a(u){return Ok(r,s,u)}}}function Bk(e){for(;!H1(e););return e}const $h=/[\0\t\n\r]/g;function jk(){let e=1,t="",n=!0,r;return i;function i(s,a,u){const l=[];let d,f,h,m,p;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(a||void 0).decode(s)),h=0,t="",n&&(s.charCodeAt(0)===65279&&h++,n=void 0);h<s.length;){if($h.lastIndex=h,d=$h.exec(s),m=d&&d.index!==void 0?d.index:s.length,p=s.charCodeAt(m),!d){t=s.slice(h);break}if(p===10&&h===m&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),h<m&&(l.push(s.slice(h,m)),e+=m-h),p){case 0:{l.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,l.push(-2);e++<f;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}h=m+1}return u&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const Uk=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Hk(e){return e.replace(Uk,zk)}function zk(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),s=i===120||i===88;return F1(n.slice(s?2:1),s?16:10)}return Ld(n)||e}const q1={}.hasOwnProperty;function $k(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),Yk(n)(Bk(Fk(n).document().write(jk()(e,t,!0))))}function Yk(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(Ot),autolinkProtocol:Y,autolinkEmail:Y,atxHeading:s(me),blockQuote:s(j),characterEscape:Y,characterReference:Y,codeFenced:s(q),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:s(q,a),codeText:s(z,a),codeTextData:Y,data:Y,codeFlowValue:Y,definition:s(ue),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:s(fe),hardBreakEscape:s(Ne),hardBreakTrailing:s(Ne),htmlFlow:s(it,a),htmlFlowData:Y,htmlText:s(it,a),htmlTextData:Y,image:s(At),label:a,link:s(Ot),listItem:s(Xe),listItemValue:m,listOrdered:s(we,h),listUnordered:s(we),paragraph:s(nn),reference:N,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:s(me),strong:s(Pn),thematicBreak:s(ca)},exit:{atxHeading:l(),atxHeadingSequence:B,autolink:l(),autolinkEmail:Nt,autolinkProtocol:Ct,blockQuote:l(),characterEscapeValue:w,characterReferenceMarkerHexadecimal:Se,characterReferenceMarkerNumeric:Se,characterReferenceValue:pe,characterReference:Qe,codeFenced:l(L),codeFencedFence:k,codeFencedFenceInfo:p,codeFencedFenceMeta:E,codeFlowValue:w,codeIndented:l(g),codeText:l(de),codeTextData:w,data:w,definition:l(),definitionDestinationString:R,definitionLabelString:T,definitionTitleString:x,emphasis:l(),hardBreakEscape:l(X),hardBreakTrailing:l(X),htmlFlow:l(ce),htmlFlowData:w,htmlText:l(se),htmlTextData:w,image:l(Te),label:F,labelText:v,lineEnding:V,link:l(ae),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:Ee,resourceDestinationString:y,resourceTitleString:ee,resource:le,setextHeading:l(D),setextHeadingLineSequence:I,setextHeadingText:C,strong:l(),thematicBreak:l()}};Q1(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(H){let K={type:"root",children:[]};const he={stack:[K],tokenStack:[],config:t,enter:u,exit:d,buffer:a,resume:f,data:n},ye=[];let Le=-1;for(;++Le<H.length;)if(H[Le][1].type==="listOrdered"||H[Le][1].type==="listUnordered")if(H[Le][0]==="enter")ye.push(Le);else{const Je=ye.pop();Le=i(H,Je,Le)}for(Le=-1;++Le<H.length;){const Je=t[H[Le][0]];q1.call(Je,H[Le][1].type)&&Je[H[Le][1].type].call(Object.assign({sliceSerialize:H[Le][2].sliceSerialize},he),H[Le][1])}if(he.tokenStack.length>0){const Je=he.tokenStack[he.tokenStack.length-1];(Je[1]||Yh).call(he,void 0,Je[0])}for(K.position={start:er(H.length>0?H[0][1].start:{line:1,column:1,offset:0}),end:er(H.length>0?H[H.length-2][1].end:{line:1,column:1,offset:0})},Le=-1;++Le<t.transforms.length;)K=t.transforms[Le](K)||K;return K}function i(H,K,he){let ye=K-1,Le=-1,Je=!1,vt,Pt,kn,Xn;for(;++ye<=he;){const Ye=H[ye];switch(Ye[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ye[0]==="enter"?Le++:Le--,Xn=void 0;break}case"lineEndingBlank":{Ye[0]==="enter"&&(vt&&!Xn&&!Le&&!kn&&(kn=ye),Xn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Xn=void 0}if(!Le&&Ye[0]==="enter"&&Ye[1].type==="listItemPrefix"||Le===-1&&Ye[0]==="exit"&&(Ye[1].type==="listUnordered"||Ye[1].type==="listOrdered")){if(vt){let Ge=ye;for(Pt=void 0;Ge--;){const gt=H[Ge];if(gt[1].type==="lineEnding"||gt[1].type==="lineEndingBlank"){if(gt[0]==="exit")continue;Pt&&(H[Pt][1].type="lineEndingBlank",Je=!0),gt[1].type="lineEnding",Pt=Ge}else if(!(gt[1].type==="linePrefix"||gt[1].type==="blockQuotePrefix"||gt[1].type==="blockQuotePrefixWhitespace"||gt[1].type==="blockQuoteMarker"||gt[1].type==="listItemIndent"))break}kn&&(!Pt||kn<Pt)&&(vt._spread=!0),vt.end=Object.assign({},Pt?H[Pt][1].start:Ye[1].end),H.splice(Pt||ye,0,["exit",vt,Ye[2]]),ye++,he++}if(Ye[1].type==="listItemPrefix"){const Ge={type:"listItem",_spread:!1,start:Object.assign({},Ye[1].start),end:void 0};vt=Ge,H.splice(ye,0,["enter",Ge,Ye[2]]),ye++,he++,kn=void 0,Xn=!0}}}return H[K][1]._spread=Je,he}function s(H,K){return he;function he(ye){u.call(this,H(ye),ye),K&&K.call(this,ye)}}function a(){this.stack.push({type:"fragment",children:[]})}function u(H,K,he){this.stack[this.stack.length-1].children.push(H),this.stack.push(H),this.tokenStack.push([K,he||void 0]),H.position={start:er(K.start),end:void 0}}function l(H){return K;function K(he){H&&H.call(this,he),d.call(this,he)}}function d(H,K){const he=this.stack.pop(),ye=this.tokenStack.pop();if(ye)ye[0].type!==H.type&&(K?K.call(this,H,ye[0]):(ye[1]||Yh).call(this,H,ye[0]));else throw new Error("Cannot close `"+H.type+"` ("+ys({start:H.start,end:H.end})+"): it’s not open");he.position.end=er(H.end)}function f(){return Id(this.stack.pop())}function h(){this.data.expectingFirstListItemValue=!0}function m(H){if(this.data.expectingFirstListItemValue){const K=this.stack[this.stack.length-2];K.start=Number.parseInt(this.sliceSerialize(H),10),this.data.expectingFirstListItemValue=void 0}}function p(){const H=this.resume(),K=this.stack[this.stack.length-1];K.lang=H}function E(){const H=this.resume(),K=this.stack[this.stack.length-1];K.meta=H}function k(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function L(){const H=this.resume(),K=this.stack[this.stack.length-1];K.value=H.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function g(){const H=this.resume(),K=this.stack[this.stack.length-1];K.value=H.replace(/(\r?\n|\r)$/g,"")}function T(H){const K=this.resume(),he=this.stack[this.stack.length-1];he.label=K,he.identifier=bn(this.sliceSerialize(H)).toLowerCase()}function x(){const H=this.resume(),K=this.stack[this.stack.length-1];K.title=H}function R(){const H=this.resume(),K=this.stack[this.stack.length-1];K.url=H}function B(H){const K=this.stack[this.stack.length-1];if(!K.depth){const he=this.sliceSerialize(H).length;K.depth=he}}function C(){this.data.setextHeadingSlurpLineEnding=!0}function I(H){const K=this.stack[this.stack.length-1];K.depth=this.sliceSerialize(H).codePointAt(0)===61?1:2}function D(){this.data.setextHeadingSlurpLineEnding=void 0}function Y(H){const he=this.stack[this.stack.length-1].children;let ye=he[he.length-1];(!ye||ye.type!=="text")&&(ye=Mn(),ye.position={start:er(H.start),end:void 0},he.push(ye)),this.stack.push(ye)}function w(H){const K=this.stack.pop();K.value+=this.sliceSerialize(H),K.position.end=er(H.end)}function V(H){const K=this.stack[this.stack.length-1];if(this.data.atHardBreak){const he=K.children[K.children.length-1];he.position.end=er(H.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(K.type)&&(Y.call(this,H),w.call(this,H))}function X(){this.data.atHardBreak=!0}function ce(){const H=this.resume(),K=this.stack[this.stack.length-1];K.value=H}function se(){const H=this.resume(),K=this.stack[this.stack.length-1];K.value=H}function de(){const H=this.resume(),K=this.stack[this.stack.length-1];K.value=H}function ae(){const H=this.stack[this.stack.length-1];if(this.data.inReference){const K=this.data.referenceType||"shortcut";H.type+="Reference",H.referenceType=K,delete H.url,delete H.title}else delete H.identifier,delete H.label;this.data.referenceType=void 0}function Te(){const H=this.stack[this.stack.length-1];if(this.data.inReference){const K=this.data.referenceType||"shortcut";H.type+="Reference",H.referenceType=K,delete H.url,delete H.title}else delete H.identifier,delete H.label;this.data.referenceType=void 0}function v(H){const K=this.sliceSerialize(H),he=this.stack[this.stack.length-2];he.label=Hk(K),he.identifier=bn(K).toLowerCase()}function F(){const H=this.stack[this.stack.length-1],K=this.resume(),he=this.stack[this.stack.length-1];if(this.data.inReference=!0,he.type==="link"){const ye=H.children;he.children=ye}else he.alt=K}function y(){const H=this.resume(),K=this.stack[this.stack.length-1];K.url=H}function ee(){const H=this.resume(),K=this.stack[this.stack.length-1];K.title=H}function le(){this.data.inReference=void 0}function N(){this.data.referenceType="collapsed"}function Ee(H){const K=this.resume(),he=this.stack[this.stack.length-1];he.label=K,he.identifier=bn(this.sliceSerialize(H)).toLowerCase(),this.data.referenceType="full"}function Se(H){this.data.characterReferenceType=H.type}function pe(H){const K=this.sliceSerialize(H),he=this.data.characterReferenceType;let ye;he?(ye=F1(K,he==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ye=Ld(K);const Le=this.stack[this.stack.length-1];Le.value+=ye}function Qe(H){const K=this.stack.pop();K.position.end=er(H.end)}function Ct(H){w.call(this,H);const K=this.stack[this.stack.length-1];K.url=this.sliceSerialize(H)}function Nt(H){w.call(this,H);const K=this.stack[this.stack.length-1];K.url="mailto:"+this.sliceSerialize(H)}function j(){return{type:"blockquote",children:[]}}function q(){return{type:"code",lang:null,meta:null,value:""}}function z(){return{type:"inlineCode",value:""}}function ue(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function fe(){return{type:"emphasis",children:[]}}function me(){return{type:"heading",depth:0,children:[]}}function Ne(){return{type:"break"}}function it(){return{type:"html",value:""}}function At(){return{type:"image",title:null,url:"",alt:null}}function Ot(){return{type:"link",title:null,url:"",children:[]}}function we(H){return{type:"list",ordered:H.type==="listOrdered",start:null,spread:H._spread,children:[]}}function Xe(H){return{type:"listItem",spread:H._spread,checked:null,children:[]}}function nn(){return{type:"paragraph",children:[]}}function Pn(){return{type:"strong",children:[]}}function Mn(){return{type:"text",value:""}}function ca(){return{type:"thematicBreak"}}}function er(e){return{line:e.line,column:e.column,offset:e.offset}}function Q1(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Q1(e,r):Vk(e,r)}}function Vk(e,t){let n;for(n in t)if(q1.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Yh(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ys({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ys({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ys({start:t.start,end:t.end})+") is still open")}function Wk(e){const t=this;t.parser=n;function n(r){return $k(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function qk(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Qk(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
387
+ `}]}function Gk(e,t){const n=t.value?t.value+`
388
+ `:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let s={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(s.data={meta:t.meta}),e.patch(t,s),s=e.applyData(t,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(t,s),s}function Kk(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Xk(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Jk(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=ji(r.toLowerCase()),s=e.footnoteOrder.indexOf(r);let a,u=e.footnoteCounts.get(r);u===void 0?(u=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=s+1,u+=1,e.footnoteCounts.set(r,u);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(u>1?"-"+u:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,l);const d={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,d),e.applyData(t,d)}function Zk(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function eS(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function G1(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),s=i[0];s&&s.type==="text"?s.value="["+s.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&a.type==="text"?a.value+=r:i.push({type:"text",value:r}),i}function tS(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return G1(e,t);const i={src:ji(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,s),e.applyData(t,s)}function nS(e,t){const n={src:ji(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function rS(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function iS(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return G1(e,t);const i={href:ji(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function sS(e,t){const n={href:ji(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function aS(e,t,n){const r=e.all(t),i=n?uS(n):K1(t),s={},a=[];if(typeof t.checked=="boolean"){const f=r[0];let h;f&&f.type==="element"&&f.tagName==="p"?h=f:(h={type:"element",tagName:"p",properties:{},children:[]},r.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:[]}),s.className=["task-list-item"]}let u=-1;for(;++u<r.length;){const f=r[u];(i||u!==0||f.type!=="element"||f.tagName!=="p")&&a.push({type:"text",value:`
389
+ `}),f.type==="element"&&f.tagName==="p"&&!i?a.push(...f.children):a.push(f)}const l=r[r.length-1];l&&(i||l.type!=="element"||l.tagName!=="p")&&a.push({type:"text",value:`
390
+ `});const d={type:"element",tagName:"li",properties:s,children:a};return e.patch(t,d),e.applyData(t,d)}function uS(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=K1(n[r])}return t}function K1(e){const t=e.spread;return t??e.children.length>1}function lS(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const a=r[i];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const s={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,s),e.applyData(t,s)}function oS(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function cS(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function dS(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function fS(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],a),i.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},u=Rn(t.children[1]),l=al(t.children[t.children.length-1]);u&&l&&(a.position={start:u,end:l}),i.push(a)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,s),e.applyData(t,s)}function hS(e,t,n){const r=n?n.children:void 0,s=(r?r.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,u=a?a.length:t.children.length;let l=-1;const d=[];for(;++l<u;){const h=t.children[l],m={},p=a?a[l]:void 0;p&&(m.align=p);let E={type:"element",tagName:s,properties:m,children:[]};h&&(E.children=e.all(h),e.patch(h,E),E=e.applyData(h,E)),d.push(E)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(d,!0)};return e.patch(t,f),e.applyData(t,f)}function mS(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Vh=9,Wh=32;function pS(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const s=[];for(;r;)s.push(qh(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return s.push(qh(t.slice(i),i>0,!1)),s.join("")}function qh(e,t,n){let r=0,i=e.length;if(t){let s=e.codePointAt(r);for(;s===Vh||s===Wh;)r++,s=e.codePointAt(r)}if(n){let s=e.codePointAt(i-1);for(;s===Vh||s===Wh;)i--,s=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function gS(e,t){const n={type:"text",value:pS(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function ES(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const TS={blockquote:qk,break:Qk,code:Gk,delete:Kk,emphasis:Xk,footnoteReference:Jk,heading:Zk,html:eS,imageReference:tS,image:nS,inlineCode:rS,linkReference:iS,link:sS,listItem:aS,list:lS,paragraph:oS,root:cS,strong:dS,table:fS,tableCell:mS,tableRow:hS,text:gS,thematicBreak:ES,toml:wa,yaml:wa,definition:wa,footnoteDefinition:wa};function wa(){}const X1=-1,ol=0,xs=1,Iu=2,Rd=3,Od=4,Pd=5,Md=6,J1=7,Z1=8,Qh=typeof self=="object"?self:globalThis,yS=(e,t)=>{const n=(i,s)=>(e.set(s,i),i),r=i=>{if(e.has(i))return e.get(i);const[s,a]=t[i];switch(s){case ol:case X1:return n(a,i);case xs:{const u=n([],i);for(const l of a)u.push(r(l));return u}case Iu:{const u=n({},i);for(const[l,d]of a)u[r(l)]=r(d);return u}case Rd:return n(new Date(a),i);case Od:{const{source:u,flags:l}=a;return n(new RegExp(u,l),i)}case Pd:{const u=n(new Map,i);for(const[l,d]of a)u.set(r(l),r(d));return u}case Md:{const u=n(new Set,i);for(const l of a)u.add(r(l));return u}case J1:{const{name:u,message:l}=a;return n(new Qh[u](l),i)}case Z1:return n(BigInt(a),i);case"BigInt":return n(Object(BigInt(a)),i);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:u}=new Uint8Array(a);return n(new DataView(u),a)}}return n(new Qh[s](a),i)};return r},Gh=e=>yS(new Map,e)(0),ei="",{toString:bS}={},{keys:xS}=Object,ts=e=>{const t=typeof e;if(t!=="object"||!e)return[ol,t];const n=bS.call(e).slice(8,-1);switch(n){case"Array":return[xs,ei];case"Object":return[Iu,ei];case"Date":return[Rd,ei];case"RegExp":return[Od,ei];case"Map":return[Pd,ei];case"Set":return[Md,ei];case"DataView":return[xs,n]}return n.includes("Array")?[xs,n]:n.includes("Error")?[J1,n]:[Iu,n]},Ia=([e,t])=>e===ol&&(t==="function"||t==="symbol"),_S=(e,t,n,r)=>{const i=(a,u)=>{const l=r.push(a)-1;return n.set(u,l),l},s=a=>{if(n.has(a))return n.get(a);let[u,l]=ts(a);switch(u){case ol:{let f=a;switch(l){case"bigint":u=Z1,f=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);f=null;break;case"undefined":return i([X1],a)}return i([u,f],a)}case xs:{if(l){let m=a;return l==="DataView"?m=new Uint8Array(a.buffer):l==="ArrayBuffer"&&(m=new Uint8Array(a)),i([l,[...m]],a)}const f=[],h=i([u,f],a);for(const m of a)f.push(s(m));return h}case Iu:{if(l)switch(l){case"BigInt":return i([l,a.toString()],a);case"Boolean":case"Number":case"String":return i([l,a.valueOf()],a)}if(t&&"toJSON"in a)return s(a.toJSON());const f=[],h=i([u,f],a);for(const m of xS(a))(e||!Ia(ts(a[m])))&&f.push([s(m),s(a[m])]);return h}case Rd:return i([u,a.toISOString()],a);case Od:{const{source:f,flags:h}=a;return i([u,{source:f,flags:h}],a)}case Pd:{const f=[],h=i([u,f],a);for(const[m,p]of a)(e||!(Ia(ts(m))||Ia(ts(p))))&&f.push([s(m),s(p)]);return h}case Md:{const f=[],h=i([u,f],a);for(const m of a)(e||!Ia(ts(m)))&&f.push(s(m));return h}}const{message:d}=a;return i([u,{name:l,message:d}],a)};return s},Kh=(e,{json:t,lossy:n}={})=>{const r=[];return _S(!(t||n),!!t,new Map,r)(e),r},Ri=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Gh(Kh(e,t)):structuredClone(e):(e,t)=>Gh(Kh(e,t));function kS(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function SS(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function CS(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||kS,r=e.options.footnoteBackLabel||SS,i=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},u=[];let l=-1;for(;++l<e.footnoteOrder.length;){const d=e.footnoteById.get(e.footnoteOrder[l]);if(!d)continue;const f=e.all(d),h=String(d.identifier).toUpperCase(),m=ji(h.toLowerCase());let p=0;const E=[],k=e.footnoteCounts.get(h);for(;k!==void 0&&++p<=k;){E.length>0&&E.push({type:"text",value:" "});let T=typeof n=="string"?n:n(l,p);typeof T=="string"&&(T={type:"text",value:T}),E.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+m+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,p),className:["data-footnote-backref"]},children:Array.isArray(T)?T:[T]})}const L=f[f.length-1];if(L&&L.type==="element"&&L.tagName==="p"){const T=L.children[L.children.length-1];T&&T.type==="text"?T.value+=" ":L.children.push({type:"text",value:" "}),L.children.push(...E)}else f.push(...E);const g={type:"element",tagName:"li",properties:{id:t+"fn-"+m},children:e.wrap(f,!0)};e.patch(d,g),u.push(g)}if(u.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...Ri(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
391
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(u,!0)},{type:"text",value:`
392
+ `}]}}const cl=function(e){if(e==null)return wS;if(typeof e=="function")return dl(e);if(typeof e=="object")return Array.isArray(e)?NS(e):AS(e);if(typeof e=="string")return vS(e);throw new Error("Expected function, string, or object as test")};function NS(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=cl(e[n]);return dl(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function AS(e){const t=e;return dl(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function vS(e){return dl(t);function t(n){return n&&n.type===e}}function dl(e){return t;function t(n,r,i){return!!(IS(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function wS(){return!0}function IS(e){return e!==null&&typeof e=="object"&&"type"in e}const eg=[],LS=!0,mc=!1,DS="skip";function tg(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=cl(i),a=r?-1:1;u(e,void 0,[])();function u(l,d,f){const h=l&&typeof l=="object"?l:{};if(typeof h.type=="string"){const p=typeof h.tagName=="string"?h.tagName:typeof h.name=="string"?h.name:void 0;Object.defineProperty(m,"name",{value:"node ("+(l.type+(p?"<"+p+">":""))+")"})}return m;function m(){let p=eg,E,k,L;if((!t||s(l,d,f[f.length-1]||void 0))&&(p=RS(n(l,f)),p[0]===mc))return p;if("children"in l&&l.children){const g=l;if(g.children&&p[0]!==DS)for(k=(r?g.children.length:-1)+a,L=f.concat(g);k>-1&&k<g.children.length;){const T=g.children[k];if(E=u(T,k,L)(),E[0]===mc)return E;k=typeof E[1]=="number"?E[1]:k+a}}return p}}}function RS(e){return Array.isArray(e)?e:typeof e=="number"?[LS,e]:e==null?eg:[e]}function fl(e,t,n,r){let i,s,a;typeof t=="function"&&typeof n!="function"?(s=void 0,a=t,i=n):(s=t,a=n,i=r),tg(e,s,u,i);function u(l,d){const f=d[d.length-1],h=f?f.children.indexOf(l):void 0;return a(l,h,f)}}const pc={}.hasOwnProperty,OS={};function PS(e,t){const n=t||OS,r=new Map,i=new Map,s=new Map,a={...TS,...n.handlers},u={all:d,applyData:FS,definitionById:r,footnoteById:i,footnoteCounts:s,footnoteOrder:[],handlers:a,one:l,options:n,patch:MS,wrap:jS};return fl(e,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){const h=f.type==="definition"?r:i,m=String(f.identifier).toUpperCase();h.has(m)||h.set(m,f)}}),u;function l(f,h){const m=f.type,p=u.handlers[m];if(pc.call(u.handlers,m)&&p)return p(u,f,h);if(u.options.passThrough&&u.options.passThrough.includes(m)){if("children"in f){const{children:k,...L}=f,g=Ri(L);return g.children=u.all(f),g}return Ri(f)}return(u.options.unknownHandler||BS)(u,f,h)}function d(f){const h=[];if("children"in f){const m=f.children;let p=-1;for(;++p<m.length;){const E=u.one(m[p],f);if(E){if(p&&m[p-1].type==="break"&&(!Array.isArray(E)&&E.type==="text"&&(E.value=Xh(E.value)),!Array.isArray(E)&&E.type==="element")){const k=E.children[0];k&&k.type==="text"&&(k.value=Xh(k.value))}Array.isArray(E)?h.push(...E):h.push(E)}}}return h}}function MS(e,t){e.position&&(t.position=Sx(e))}function FS(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,s=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const a="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:a}}n.type==="element"&&s&&Object.assign(n.properties,Ri(s)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function BS(e,t){const n=t.data||{},r="value"in t&&!(pc.call(n,"hProperties")||pc.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function jS(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
393
+ `});++r<e.length;)r&&n.push({type:"text",value:`
394
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
395
+ `}),n}function Xh(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Jh(e,t){const n=PS(e,t),r=n.one(e,void 0),i=CS(n),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&s.children.push({type:"text",value:`
396
+ `},i),s}function US(e,t){return e&&"run"in e?async function(n,r){const i=Jh(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Jh(n,{file:r,...e||t})}}function Zh(e){if(e)throw e}var Xa=Object.prototype.hasOwnProperty,ng=Object.prototype.toString,e0=Object.defineProperty,t0=Object.getOwnPropertyDescriptor,n0=function(t){return typeof Array.isArray=="function"?Array.isArray(t):ng.call(t)==="[object Array]"},r0=function(t){if(!t||ng.call(t)!=="[object Object]")return!1;var n=Xa.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Xa.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||Xa.call(t,i)},i0=function(t,n){e0&&n.name==="__proto__"?e0(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},s0=function(t,n){if(n==="__proto__")if(Xa.call(t,n)){if(t0)return t0(t,n).value}else return;return t[n]},HS=function e(){var t,n,r,i,s,a,u=arguments[0],l=1,d=arguments.length,f=!1;for(typeof u=="boolean"&&(f=u,u=arguments[1]||{},l=2),(u==null||typeof u!="object"&&typeof u!="function")&&(u={});l<d;++l)if(t=arguments[l],t!=null)for(n in t)r=s0(u,n),i=s0(t,n),u!==i&&(f&&i&&(r0(i)||(s=n0(i)))?(s?(s=!1,a=r&&n0(r)?r:[]):a=r&&r0(r)?r:{},i0(u,{name:n,newValue:e(f,a,i)})):typeof i<"u"&&i0(u,{name:n,newValue:i}));return u};const Xl=Bu(HS);function gc(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 zS(){const e=[],t={run:n,use:r};return t;function n(...i){let s=-1;const a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);u(null,...i);function u(l,...d){const f=e[++s];let h=-1;if(l){a(l);return}for(;++h<i.length;)(d[h]===null||d[h]===void 0)&&(d[h]=i[h]);i=d,f?$S(f,u)(...d):a(null,...d)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function $S(e,t){let n;return r;function r(...a){const u=e.length>a.length;let l;u&&a.push(i);try{l=e.apply(this,a)}catch(d){const f=d;if(u&&n)throw f;return i(f)}u||(l&&l.then&&typeof l.then=="function"?l.then(s,i):l instanceof Error?i(l):s(l))}function i(a,...u){n||(n=!0,t(a,...u))}function s(a){i(null,a)}}const An={basename:YS,dirname:VS,extname:WS,join:qS,sep:"/"};function YS(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');ua(e);let n=0,r=-1,i=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else r<0&&(s=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,u=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else a<0&&(s=!0,a=i+1),u>-1&&(e.codePointAt(i)===t.codePointAt(u--)?u<0&&(r=i):(u=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function VS(e){if(ua(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function WS(e){ua(e);let t=e.length,n=-1,r=0,i=-1,s=0,a;for(;t--;){const u=e.codePointAt(t);if(u===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),u===46?i<0?i=t:s!==1&&(s=1):i>-1&&(s=-1)}return i<0||n<0||s===0||s===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function qS(...e){let t=-1,n;for(;++t<e.length;)ua(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":QS(n)}function QS(e){ua(e);const t=e.codePointAt(0)===47;let n=GS(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function GS(e,t){let n="",r=0,i=-1,s=0,a=-1,u,l;for(;++a<=e.length;){if(a<e.length)u=e.codePointAt(a);else{if(u===47)break;u=47}if(u===47){if(!(i===a-1||s===1))if(i!==a-1&&s===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=a,s=0;continue}}else if(n.length>0){n="",r=0,i=a,s=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,a):n=e.slice(i+1,a),r=a-i-1;i=a,s=0}else u===46&&s>-1?s++:s=-1}return n}function ua(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const KS={cwd:XS};function XS(){return"/"}function Ec(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function JS(e){if(typeof e=="string")e=new URL(e);else if(!Ec(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 ZS(e)}function ZS(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const Jl=["history","path","basename","stem","extname","dirname"];class rg{constructor(t){let n;t?Ec(t)?n={path:t}:typeof t=="string"||e3(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":KS.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Jl.length;){const s=Jl[r];s in n&&n[s]!==void 0&&n[s]!==null&&(this[s]=s==="history"?[...n[s]]:n[s])}let i;for(i in n)Jl.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?An.basename(this.path):void 0}set basename(t){eo(t,"basename"),Zl(t,"basename"),this.path=An.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?An.dirname(this.path):void 0}set dirname(t){a0(this.basename,"dirname"),this.path=An.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?An.extname(this.path):void 0}set extname(t){if(Zl(t,"extname"),a0(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=An.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Ec(t)&&(t=JS(t)),eo(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?An.basename(this.path,this.extname):void 0}set stem(t){eo(t,"stem"),Zl(t,"stem"),this.path=An.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new kt(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Zl(e,t){if(e&&e.includes(An.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+An.sep+"`")}function eo(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function a0(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function e3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const t3=function(e){const r=this.constructor.prototype,i=r[e],s=function(){return i.apply(s,arguments)};return Object.setPrototypeOf(s,r),s},n3={}.hasOwnProperty;class Fd extends t3{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=zS()}copy(){const t=new Fd;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Xl(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(ro("data",this.frozen),this.namespace[t]=n,this):n3.call(this.namespace,t)&&this.namespace[t]||void 0:t?(ro("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[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=La(t),r=this.parser||this.Parser;return to("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),to("process",this.parser||this.Parser),no("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(s,a){const u=La(t),l=r.parse(u);r.run(l,u,function(f,h,m){if(f||!h||!m)return d(f);const p=h,E=r.stringify(p,m);s3(E)?m.value=E:m.result=E,d(f,m)});function d(f,h){f||!h?a(f):s?s(h):n(void 0,h)}}}processSync(t){let n=!1,r;return this.freeze(),to("processSync",this.parser||this.Parser),no("processSync",this.compiler||this.Compiler),this.process(t,i),l0("processSync","process",n),r;function i(s,a){n=!0,Zh(s),r=a}}run(t,n,r){u0(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?s(void 0,r):new Promise(s);function s(a,u){const l=La(n);i.run(t,l,d);function d(f,h,m){const p=h||t;f?u(f):a?a(p):r(void 0,p,m)}}}runSync(t,n){let r=!1,i;return this.run(t,n,s),l0("runSync","run",r),i;function s(a,u){Zh(a),i=u,r=!0}}stringify(t,n){this.freeze();const r=La(n),i=this.compiler||this.Compiler;return no("stringify",i),u0(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(ro("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?u(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(d){if(typeof d=="function")l(d,[]);else if(typeof d=="object")if(Array.isArray(d)){const[f,...h]=d;l(f,h)}else a(d);else throw new TypeError("Expected usable value, not `"+d+"`")}function a(d){if(!("plugins"in d)&&!("settings"in d))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");u(d.plugins),d.settings&&(i.settings=Xl(!0,i.settings,d.settings))}function u(d){let f=-1;if(d!=null)if(Array.isArray(d))for(;++f<d.length;){const h=d[f];s(h)}else throw new TypeError("Expected a list of plugins, not `"+d+"`")}function l(d,f){let h=-1,m=-1;for(;++h<r.length;)if(r[h][0]===d){m=h;break}if(m===-1)r.push([d,...f]);else if(f.length>0){let[p,...E]=f;const k=r[m][1];gc(k)&&gc(p)&&(p=Xl(!0,k,p)),r[m]=[d,p,...E]}}}}const r3=new Fd().freeze();function to(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function no(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function ro(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 u0(e){if(!gc(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function l0(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function La(e){return i3(e)?e:new rg(e)}function i3(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function s3(e){return typeof e=="string"||a3(e)}function a3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const u3="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",o0=[],c0={allowDangerousHtml:!0},l3=/^(https?|ircs?|mailto|xmpp)$/i,o3=[{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:"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 c3(e){const t=d3(e),n=f3(e);return h3(t.runSync(t.parse(n),n),e)}function d3(e){const t=e.rehypePlugins||o0,n=e.remarkPlugins||o0,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...c0}:c0;return r3().use(Wk).use(n).use(US,r).use(t)}function f3(e){const t=e.children||"",n=new rg;return typeof t=="string"&&(n.value=t),n}function h3(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,s=t.disallowedElements,a=t.skipHtml,u=t.unwrapDisallowed,l=t.urlTransform||m3;for(const f of o3)Object.hasOwn(t,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+u3+f.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),fl(e,d),wx(e,{Fragment:o.Fragment,components:i,ignoreInvalidStyle:!0,jsx:o.jsx,jsxs:o.jsxs,passKeys:!0,passNode:!0});function d(f,h,m){if(f.type==="raw"&&m&&typeof h=="number")return a?m.children.splice(h,1):m.children[h]={type:"text",value:f.value},h;if(f.type==="element"){let p;for(p in Ql)if(Object.hasOwn(Ql,p)&&Object.hasOwn(f.properties,p)){const E=f.properties[p],k=Ql[p];(k===null||k.includes(f.tagName))&&(f.properties[p]=l(String(E||""),p,f))}}if(f.type==="element"){let p=n?!n.includes(f.tagName):s?s.includes(f.tagName):!1;if(!p&&r&&typeof h=="number"&&(p=!r(f,h,m)),p&&m&&typeof h=="number")return u&&f.children?m.children.splice(h,1,...f.children):m.children.splice(h,1),h}}}function m3(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||l3.test(e.slice(0,t))?e:""}const d0=/[#.]/g;function p3(e,t){const n=e||"",r={};let i=0,s,a;for(;i<n.length;){d0.lastIndex=i;const u=d0.exec(n),l=n.slice(i,u?u.index:n.length);l&&(s?s==="#"?r.id=l:Array.isArray(r.className)?r.className.push(l):r.className=[l]:a=l,i+=l.length),u&&(s=u[0],i++)}return{type:"element",tagName:a||t||"div",properties:r,children:[]}}function ig(e,t,n){const r=n?y3(n):void 0;function i(s,a,...u){let l;if(s==null){l={type:"root",children:[]};const d=a;u.unshift(d)}else{l=p3(s,t);const d=l.tagName.toLowerCase(),f=r?r.get(d):void 0;if(l.tagName=f||d,g3(a))u.unshift(a);else for(const[h,m]of Object.entries(a))E3(e,l.properties,h,m)}for(const d of u)Tc(l.children,d);return l.type==="element"&&l.tagName==="template"&&(l.content={type:"root",children:l.children},l.children=[]),l}return i}function g3(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const i=t[r];if(i&&typeof i=="object"){if(!Array.isArray(i))return!0;const s=i;for(const a of s)if(typeof a!="number"&&typeof a!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function E3(e,t,n,r){const i=il(e,n);let s;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;s=r}else typeof r=="boolean"?s=r:typeof r=="string"?i.spaceSeparated?s=Nh(r):i.commaSeparated?s=xh(r):i.commaOrSpaceSeparated?s=Nh(xh(r).join(" ")):s=f0(i,i.property,r):Array.isArray(r)?s=[...r]:s=i.property==="style"?T3(r):String(r);if(Array.isArray(s)){const a=[];for(const u of s)a.push(f0(i,i.property,u));s=a}i.property==="className"&&Array.isArray(t.className)&&(s=t.className.concat(s)),t[i.property]=s}}function Tc(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 n of t)Tc(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Tc(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function f0(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||qs(n)===qs(t)))return!0}return n}function T3(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function y3(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const b3=["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"],x3=ig(sa,"div"),_3=ig(Cr,"g",b3);function k3(e){const t=String(e),n=[];return{toOffset:i,toPoint:r};function r(s){if(typeof s=="number"&&s>-1&&s<=t.length){let a=0;for(;;){let u=n[a];if(u===void 0){const l=h0(t,n[a-1]);u=l===-1?t.length+1:l+1,n[a]=u}if(u>s)return{line:a+1,column:s-(a>0?n[a-1]:0)+1,offset:s};a++}}}function i(s){if(s&&typeof s.line=="number"&&typeof s.column=="number"&&!Number.isNaN(s.line)&&!Number.isNaN(s.column)){for(;n.length<s.line;){const u=n[n.length-1],l=h0(t,u),d=l===-1?t.length+1:l+1;if(u===d)break;n.push(d)}const a=(s.line>1?n[s.line-2]:0)+s.column-1;if(a<n[s.line-1])return a}}}function h0(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
397
+ `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const Pr={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/"},sg={}.hasOwnProperty,S3=Object.prototype;function C3(e,t){const n=t||{};return Bd({file:n.file||void 0,location:!1,schema:n.space==="svg"?Cr:sa,verbose:n.verbose||!1},e)}function Bd(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Ja(e,r,n),n}case"#document":case"#document-fragment":{const r=t,i="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:ag(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const s=String(e.file),a=k3(s),u=a.toPoint(0),l=a.toPoint(s.length);n.position={start:u,end:l}}return n}case"#documentType":{const r=t;return n={type:"doctype"},Ja(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Ja(e,r,n),n}default:return n=N3(e,t),n}}function ag(e,t){let n=-1;const r=[];for(;++n<t.length;){const i=Bd(e,t[n]);r.push(i)}return r}function N3(e,t){const n=e.schema;e.schema=t.namespaceURI===Pr.svg?Cr:sa;let r=-1;const i={};for(;++r<t.attrs.length;){const u=t.attrs[r],l=(u.prefix?u.prefix+":":"")+u.name;sg.call(S3,l)||(i[l]=u.value)}const a=(e.schema.space==="svg"?_3:x3)(t.tagName,i,ag(e,t.childNodes));if(Ja(e,t,a),a.tagName==="template"){const u=t,l=u.sourceCodeLocation,d=l&&l.startTag&&gi(l.startTag),f=l&&l.endTag&&gi(l.endTag),h=Bd(e,u.content);d&&f&&e.file&&(h.position={start:d.end,end:f.start}),a.content=h}return e.schema=n,a}function Ja(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=A3(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function A3(e,t,n){const r=gi(n);if(t.type==="element"){const i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){const s={};let a;if(n.attrs)for(a in n.attrs)sg.call(n.attrs,a)&&(s[il(e.schema,a).property]=gi(n.attrs[a]));n.startTag;const u=gi(n.startTag),l=n.endTag?gi(n.endTag):void 0,d={opening:u};l&&(d.closing=l),d.properties=s,t.data={position:d}}}return r}function gi(e){const t=m0({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=m0({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function m0(e){return e.line&&e.column?e:void 0}const p0={}.hasOwnProperty;function ug(e,t){const n=t||{};function r(i,...s){let a=r.invalid;const u=r.handlers;if(i&&p0.call(i,e)){const l=String(i[e]);a=p0.call(u,l)?u[l]:r.unknown}if(a)return a.call(this,i,...s)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const v3={},w3={}.hasOwnProperty,lg=ug("type",{handlers:{root:L3,element:M3,text:O3,comment:P3,doctype:R3}});function I3(e,t){const r=(t||v3).space;return lg(e,r==="svg"?Cr:sa)}function L3(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=jd(e.children,n,t),Ui(e,n),n}function D3(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=jd(e.children,n,t),Ui(e,n),n}function R3(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Ui(e,t),t}function O3(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Ui(e,t),t}function P3(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Ui(e,t),t}function M3(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=Cr);const i=[];let s;if(e.properties){for(s in e.properties)if(s!=="children"&&w3.call(e.properties,s)){const l=F3(r,s,e.properties[s]);l&&i.push(l)}}const a=r.space,u={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:Pr[a],childNodes:[],parentNode:null};return u.childNodes=jd(e.children,u,r),Ui(e,u),e.tagName==="template"&&e.content&&(u.content=D3(e.content,r)),u}function F3(e,t,n){const r=il(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?x1(n):w1(n));const i={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const s=i.name.indexOf(":");s<0?i.prefix="":(i.name=i.name.slice(s+1),i.prefix=r.attribute.slice(0,s)),i.namespace=Pr[r.space]}return i}function jd(e,t,n){let r=-1;const i=[];if(e)for(;++r<e.length;){const s=lg(e[r],n);s.parentNode=t,i.push(s)}return i}function Ui(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const B3=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],j3=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]),ze="�";var b;(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"})(b||(b={}));const Ft={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function og(e){return e>=55296&&e<=57343}function U3(e){return e>=56320&&e<=57343}function H3(e,t){return(e-55296)*1024+9216+t}function cg(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function dg(e){return e>=64976&&e<=65007||j3.has(e)}var U;(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"})(U||(U={}));const z3=65536;class $3{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=z3,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,n){const{line:r,col:i,offset:s}=this,a=i+n,u=s+n;return{code:t,startLine:r,endLine:r,startCol:a,endCol:a,startOffset:u,endOffset:u}}_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 n=this.html.charCodeAt(this.pos+1);if(U3(n))return this.pos++,this._addGap(),H3(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,b.EOF;return this._err(U.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,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,b.EOF;const r=this.html.charCodeAt(n);return r===b.CARRIAGE_RETURN?b.LINE_FEED:r}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,b.EOF;let t=this.html.charCodeAt(this.pos);return t===b.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,b.LINE_FEED):t===b.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,og(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===b.LINE_FEED||t===b.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){cg(t)?this._err(U.controlCharacterInInputStream):dg(t)&&this._err(U.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var xe;(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"})(xe||(xe={}));function fg(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const Y3=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))),V3=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 W3(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=V3.get(e))!==null&&t!==void 0?t:e}var ct;(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"})(ct||(ct={}));const q3=32;var cr;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(cr||(cr={}));function yc(e){return e>=ct.ZERO&&e<=ct.NINE}function Q3(e){return e>=ct.UPPER_A&&e<=ct.UPPER_F||e>=ct.LOWER_A&&e<=ct.LOWER_F}function G3(e){return e>=ct.UPPER_A&&e<=ct.UPPER_Z||e>=ct.LOWER_A&&e<=ct.LOWER_Z||yc(e)}function K3(e){return e===ct.EQUALS||G3(e)}var lt;(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"})(lt||(lt={}));var Un;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Un||(Un={}));class X3{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=lt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Un.Strict}startEntity(t){this.decodeMode=t,this.state=lt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case lt.EntityStart:return t.charCodeAt(n)===ct.NUM?(this.state=lt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=lt.NamedEntity,this.stateNamedEntity(t,n));case lt.NumericStart:return this.stateNumericStart(t,n);case lt.NumericDecimal:return this.stateNumericDecimal(t,n);case lt.NumericHex:return this.stateNumericHex(t,n);case lt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|q3)===ct.LOWER_X?(this.state=lt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=lt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,i){if(n!==r){const s=r-n;this.result=this.result*Math.pow(i,s)+Number.parseInt(t.substr(n,s),i),this.consumed+=s}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(yc(i)||Q3(i))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(yc(i))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(i,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===ct.SEMI)this.consumed+=1;else if(this.decodeMode===Un.Strict)return 0;return this.emitCodePoint(W3(this.result),this.consumed),this.errors&&(t!==ct.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let i=r[this.treeIndex],s=(i&cr.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const a=t.charCodeAt(n);if(this.treeIndex=J3(r,i,this.treeIndex+Math.max(1,s),a),this.treeIndex<0)return this.result===0||this.decodeMode===Un.Attribute&&(s===0||K3(a))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],s=(i&cr.VALUE_LENGTH)>>14,s!==0){if(a===ct.SEMI)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);this.decodeMode!==Un.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,i=(r[n]&cr.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[t]&~cr.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case lt.NamedEntity:return this.result!==0&&(this.decodeMode!==Un.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case lt.NumericDecimal:return this.emitNumericEntity(0,2);case lt.NumericHex:return this.emitNumericEntity(0,3);case lt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case lt.EntityStart:return 0}}}function J3(e,t,n,r){const i=(t&cr.BRANCH_LENGTH)>>7,s=t&cr.JUMP_TABLE;if(i===0)return s!==0&&r===s?n:-1;if(s){const l=r-s;return l<0||l>=i?-1:e[n+l]-1}let a=n,u=a+i-1;for(;a<=u;){const l=a+u>>>1,d=e[l];if(d<r)a=l+1;else if(d>r)u=l-1;else return e[l+i]}return-1}var $;(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/"})($||($={}));var jr;(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"})(jr||(jr={}));var un;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(un||(un={}));var P;(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"})(P||(P={}));var c;(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"})(c||(c={}));const Z3=new Map([[P.A,c.A],[P.ADDRESS,c.ADDRESS],[P.ANNOTATION_XML,c.ANNOTATION_XML],[P.APPLET,c.APPLET],[P.AREA,c.AREA],[P.ARTICLE,c.ARTICLE],[P.ASIDE,c.ASIDE],[P.B,c.B],[P.BASE,c.BASE],[P.BASEFONT,c.BASEFONT],[P.BGSOUND,c.BGSOUND],[P.BIG,c.BIG],[P.BLOCKQUOTE,c.BLOCKQUOTE],[P.BODY,c.BODY],[P.BR,c.BR],[P.BUTTON,c.BUTTON],[P.CAPTION,c.CAPTION],[P.CENTER,c.CENTER],[P.CODE,c.CODE],[P.COL,c.COL],[P.COLGROUP,c.COLGROUP],[P.DD,c.DD],[P.DESC,c.DESC],[P.DETAILS,c.DETAILS],[P.DIALOG,c.DIALOG],[P.DIR,c.DIR],[P.DIV,c.DIV],[P.DL,c.DL],[P.DT,c.DT],[P.EM,c.EM],[P.EMBED,c.EMBED],[P.FIELDSET,c.FIELDSET],[P.FIGCAPTION,c.FIGCAPTION],[P.FIGURE,c.FIGURE],[P.FONT,c.FONT],[P.FOOTER,c.FOOTER],[P.FOREIGN_OBJECT,c.FOREIGN_OBJECT],[P.FORM,c.FORM],[P.FRAME,c.FRAME],[P.FRAMESET,c.FRAMESET],[P.H1,c.H1],[P.H2,c.H2],[P.H3,c.H3],[P.H4,c.H4],[P.H5,c.H5],[P.H6,c.H6],[P.HEAD,c.HEAD],[P.HEADER,c.HEADER],[P.HGROUP,c.HGROUP],[P.HR,c.HR],[P.HTML,c.HTML],[P.I,c.I],[P.IMG,c.IMG],[P.IMAGE,c.IMAGE],[P.INPUT,c.INPUT],[P.IFRAME,c.IFRAME],[P.KEYGEN,c.KEYGEN],[P.LABEL,c.LABEL],[P.LI,c.LI],[P.LINK,c.LINK],[P.LISTING,c.LISTING],[P.MAIN,c.MAIN],[P.MALIGNMARK,c.MALIGNMARK],[P.MARQUEE,c.MARQUEE],[P.MATH,c.MATH],[P.MENU,c.MENU],[P.META,c.META],[P.MGLYPH,c.MGLYPH],[P.MI,c.MI],[P.MO,c.MO],[P.MN,c.MN],[P.MS,c.MS],[P.MTEXT,c.MTEXT],[P.NAV,c.NAV],[P.NOBR,c.NOBR],[P.NOFRAMES,c.NOFRAMES],[P.NOEMBED,c.NOEMBED],[P.NOSCRIPT,c.NOSCRIPT],[P.OBJECT,c.OBJECT],[P.OL,c.OL],[P.OPTGROUP,c.OPTGROUP],[P.OPTION,c.OPTION],[P.P,c.P],[P.PARAM,c.PARAM],[P.PLAINTEXT,c.PLAINTEXT],[P.PRE,c.PRE],[P.RB,c.RB],[P.RP,c.RP],[P.RT,c.RT],[P.RTC,c.RTC],[P.RUBY,c.RUBY],[P.S,c.S],[P.SCRIPT,c.SCRIPT],[P.SEARCH,c.SEARCH],[P.SECTION,c.SECTION],[P.SELECT,c.SELECT],[P.SOURCE,c.SOURCE],[P.SMALL,c.SMALL],[P.SPAN,c.SPAN],[P.STRIKE,c.STRIKE],[P.STRONG,c.STRONG],[P.STYLE,c.STYLE],[P.SUB,c.SUB],[P.SUMMARY,c.SUMMARY],[P.SUP,c.SUP],[P.TABLE,c.TABLE],[P.TBODY,c.TBODY],[P.TEMPLATE,c.TEMPLATE],[P.TEXTAREA,c.TEXTAREA],[P.TFOOT,c.TFOOT],[P.TD,c.TD],[P.TH,c.TH],[P.THEAD,c.THEAD],[P.TITLE,c.TITLE],[P.TR,c.TR],[P.TRACK,c.TRACK],[P.TT,c.TT],[P.U,c.U],[P.UL,c.UL],[P.SVG,c.SVG],[P.VAR,c.VAR],[P.WBR,c.WBR],[P.XMP,c.XMP]]);function Hi(e){var t;return(t=Z3.get(e))!==null&&t!==void 0?t:c.UNKNOWN}const W=c,eC={[$.HTML]:new Set([W.ADDRESS,W.APPLET,W.AREA,W.ARTICLE,W.ASIDE,W.BASE,W.BASEFONT,W.BGSOUND,W.BLOCKQUOTE,W.BODY,W.BR,W.BUTTON,W.CAPTION,W.CENTER,W.COL,W.COLGROUP,W.DD,W.DETAILS,W.DIR,W.DIV,W.DL,W.DT,W.EMBED,W.FIELDSET,W.FIGCAPTION,W.FIGURE,W.FOOTER,W.FORM,W.FRAME,W.FRAMESET,W.H1,W.H2,W.H3,W.H4,W.H5,W.H6,W.HEAD,W.HEADER,W.HGROUP,W.HR,W.HTML,W.IFRAME,W.IMG,W.INPUT,W.LI,W.LINK,W.LISTING,W.MAIN,W.MARQUEE,W.MENU,W.META,W.NAV,W.NOEMBED,W.NOFRAMES,W.NOSCRIPT,W.OBJECT,W.OL,W.P,W.PARAM,W.PLAINTEXT,W.PRE,W.SCRIPT,W.SECTION,W.SELECT,W.SOURCE,W.STYLE,W.SUMMARY,W.TABLE,W.TBODY,W.TD,W.TEMPLATE,W.TEXTAREA,W.TFOOT,W.TH,W.THEAD,W.TITLE,W.TR,W.TRACK,W.UL,W.WBR,W.XMP]),[$.MATHML]:new Set([W.MI,W.MO,W.MN,W.MS,W.MTEXT,W.ANNOTATION_XML]),[$.SVG]:new Set([W.TITLE,W.FOREIGN_OBJECT,W.DESC]),[$.XLINK]:new Set,[$.XML]:new Set,[$.XMLNS]:new Set},bc=new Set([W.H1,W.H2,W.H3,W.H4,W.H5,W.H6]);P.STYLE,P.SCRIPT,P.XMP,P.IFRAME,P.NOEMBED,P.NOFRAMES,P.PLAINTEXT;var S;(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"})(S||(S={}));const tt={DATA:S.DATA,RCDATA:S.RCDATA,RAWTEXT:S.RAWTEXT,SCRIPT_DATA:S.SCRIPT_DATA,PLAINTEXT:S.PLAINTEXT,CDATA_SECTION:S.CDATA_SECTION};function tC(e){return e>=b.DIGIT_0&&e<=b.DIGIT_9}function os(e){return e>=b.LATIN_CAPITAL_A&&e<=b.LATIN_CAPITAL_Z}function nC(e){return e>=b.LATIN_SMALL_A&&e<=b.LATIN_SMALL_Z}function nr(e){return nC(e)||os(e)}function g0(e){return nr(e)||tC(e)}function Da(e){return e+32}function hg(e){return e===b.SPACE||e===b.LINE_FEED||e===b.TABULATION||e===b.FORM_FEED}function E0(e){return hg(e)||e===b.SOLIDUS||e===b.GREATER_THAN_SIGN}function rC(e){return e===b.NULL?U.nullCharacterReference:e>1114111?U.characterReferenceOutsideUnicodeRange:og(e)?U.surrogateCharacterReference:dg(e)?U.noncharacterCharacterReference:cg(e)||e===b.CARRIAGE_RETURN?U.controlCharacterReference:null}class iC{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=S.DATA,this.returnState=S.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new $3(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new X3(Y3,(r,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(U.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(U.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const i=rC(r);i&&this._err(i,1)}}:void 0)}_err(t,n=0){var r,i;(i=(r=this.handler).onParseError)===null||i===void 0||i.call(r,this.preprocessor.getError(t,n))}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,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r==null||r()}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 n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:xe.START_TAG,tagName:"",tagID:c.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:xe.END_TAG,tagName:"",tagID:c.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:xe.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:xe.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(fg(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const i=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);i[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(U.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=Hi(t.tagName),t.type===xe.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(U.endTagWithAttributes),t.selfClosing&&this._err(U.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 xe.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case xe.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case xe.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:xe.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=hg(t)?xe.WHITESPACE_CHARACTER:t===b.NULL?xe.NULL_CHARACTER:xe.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(xe.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=S.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Un.Attribute:Un.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===S.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===S.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===S.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case S.DATA:{this._stateData(t);break}case S.RCDATA:{this._stateRcdata(t);break}case S.RAWTEXT:{this._stateRawtext(t);break}case S.SCRIPT_DATA:{this._stateScriptData(t);break}case S.PLAINTEXT:{this._statePlaintext(t);break}case S.TAG_OPEN:{this._stateTagOpen(t);break}case S.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case S.TAG_NAME:{this._stateTagName(t);break}case S.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case S.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case S.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case S.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case S.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case S.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case S.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case S.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case S.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case S.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case S.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case S.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case S.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case S.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case S.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case S.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case S.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case S.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case S.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case S.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case S.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case S.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case S.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case S.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case S.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case S.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case S.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case S.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case S.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case S.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case S.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case S.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case S.BOGUS_COMMENT:{this._stateBogusComment(t);break}case S.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case S.COMMENT_START:{this._stateCommentStart(t);break}case S.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case S.COMMENT:{this._stateComment(t);break}case S.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case S.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case S.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case S.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case S.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case S.COMMENT_END:{this._stateCommentEnd(t);break}case S.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case S.DOCTYPE:{this._stateDoctype(t);break}case S.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case S.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case S.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case S.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case S.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case S.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case S.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case S.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case S.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case S.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case S.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case S.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case S.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case S.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case S.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case S.CDATA_SECTION:{this._stateCdataSection(t);break}case S.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case S.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case S.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case S.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case b.LESS_THAN_SIGN:{this.state=S.TAG_OPEN;break}case b.AMPERSAND:{this._startCharacterReference();break}case b.NULL:{this._err(U.unexpectedNullCharacter),this._emitCodePoint(t);break}case b.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case b.AMPERSAND:{this._startCharacterReference();break}case b.LESS_THAN_SIGN:{this.state=S.RCDATA_LESS_THAN_SIGN;break}case b.NULL:{this._err(U.unexpectedNullCharacter),this._emitChars(ze);break}case b.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case b.LESS_THAN_SIGN:{this.state=S.RAWTEXT_LESS_THAN_SIGN;break}case b.NULL:{this._err(U.unexpectedNullCharacter),this._emitChars(ze);break}case b.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case b.LESS_THAN_SIGN:{this.state=S.SCRIPT_DATA_LESS_THAN_SIGN;break}case b.NULL:{this._err(U.unexpectedNullCharacter),this._emitChars(ze);break}case b.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case b.NULL:{this._err(U.unexpectedNullCharacter),this._emitChars(ze);break}case b.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(nr(t))this._createStartTagToken(),this.state=S.TAG_NAME,this._stateTagName(t);else switch(t){case b.EXCLAMATION_MARK:{this.state=S.MARKUP_DECLARATION_OPEN;break}case b.SOLIDUS:{this.state=S.END_TAG_OPEN;break}case b.QUESTION_MARK:{this._err(U.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=S.BOGUS_COMMENT,this._stateBogusComment(t);break}case b.EOF:{this._err(U.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(U.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=S.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(nr(t))this._createEndTagToken(),this.state=S.TAG_NAME,this._stateTagName(t);else switch(t){case b.GREATER_THAN_SIGN:{this._err(U.missingEndTagName),this.state=S.DATA;break}case b.EOF:{this._err(U.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(U.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=S.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:{this.state=S.BEFORE_ATTRIBUTE_NAME;break}case b.SOLIDUS:{this.state=S.SELF_CLOSING_START_TAG;break}case b.GREATER_THAN_SIGN:{this.state=S.DATA,this.emitCurrentTagToken();break}case b.NULL:{this._err(U.unexpectedNullCharacter),n.tagName+=ze;break}case b.EOF:{this._err(U.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(os(t)?Da(t):t)}}_stateRcdataLessThanSign(t){t===b.SOLIDUS?this.state=S.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=S.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){nr(t)?(this.state=S.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=S.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=S.BEFORE_ATTRIBUTE_NAME,!1;case b.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=S.SELF_CLOSING_START_TAG,!1;case b.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=S.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=S.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===b.SOLIDUS?this.state=S.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=S.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){nr(t)?(this.state=S.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=S.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=S.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case b.SOLIDUS:{this.state=S.SCRIPT_DATA_END_TAG_OPEN;break}case b.EXCLAMATION_MARK:{this.state=S.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=S.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){nr(t)?(this.state=S.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=S.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=S.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===b.HYPHEN_MINUS?(this.state=S.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=S.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===b.HYPHEN_MINUS?(this.state=S.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=S.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case b.HYPHEN_MINUS:{this.state=S.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case b.LESS_THAN_SIGN:{this.state=S.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case b.NULL:{this._err(U.unexpectedNullCharacter),this._emitChars(ze);break}case b.EOF:{this._err(U.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case b.HYPHEN_MINUS:{this.state=S.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case b.LESS_THAN_SIGN:{this.state=S.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case b.NULL:{this._err(U.unexpectedNullCharacter),this.state=S.SCRIPT_DATA_ESCAPED,this._emitChars(ze);break}case b.EOF:{this._err(U.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=S.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case b.HYPHEN_MINUS:{this._emitChars("-");break}case b.LESS_THAN_SIGN:{this.state=S.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case b.GREATER_THAN_SIGN:{this.state=S.SCRIPT_DATA,this._emitChars(">");break}case b.NULL:{this._err(U.unexpectedNullCharacter),this.state=S.SCRIPT_DATA_ESCAPED,this._emitChars(ze);break}case b.EOF:{this._err(U.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=S.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===b.SOLIDUS?this.state=S.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:nr(t)?(this._emitChars("<"),this.state=S.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=S.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){nr(t)?(this.state=S.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=S.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=S.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Ft.SCRIPT,!1)&&E0(this.preprocessor.peek(Ft.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Ft.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=S.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=S.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case b.HYPHEN_MINUS:{this.state=S.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case b.LESS_THAN_SIGN:{this.state=S.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case b.NULL:{this._err(U.unexpectedNullCharacter),this._emitChars(ze);break}case b.EOF:{this._err(U.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case b.HYPHEN_MINUS:{this.state=S.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case b.LESS_THAN_SIGN:{this.state=S.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case b.NULL:{this._err(U.unexpectedNullCharacter),this.state=S.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ze);break}case b.EOF:{this._err(U.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=S.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case b.HYPHEN_MINUS:{this._emitChars("-");break}case b.LESS_THAN_SIGN:{this.state=S.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case b.GREATER_THAN_SIGN:{this.state=S.SCRIPT_DATA,this._emitChars(">");break}case b.NULL:{this._err(U.unexpectedNullCharacter),this.state=S.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ze);break}case b.EOF:{this._err(U.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=S.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===b.SOLIDUS?(this.state=S.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=S.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Ft.SCRIPT,!1)&&E0(this.preprocessor.peek(Ft.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Ft.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=S.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=S.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.SOLIDUS:case b.GREATER_THAN_SIGN:case b.EOF:{this.state=S.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case b.EQUALS_SIGN:{this._err(U.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=S.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=S.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:case b.SOLIDUS:case b.GREATER_THAN_SIGN:case b.EOF:{this._leaveAttrName(),this.state=S.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case b.EQUALS_SIGN:{this._leaveAttrName(),this.state=S.BEFORE_ATTRIBUTE_VALUE;break}case b.QUOTATION_MARK:case b.APOSTROPHE:case b.LESS_THAN_SIGN:{this._err(U.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case b.NULL:{this._err(U.unexpectedNullCharacter),this.currentAttr.name+=ze;break}default:this.currentAttr.name+=String.fromCodePoint(os(t)?Da(t):t)}}_stateAfterAttributeName(t){switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.SOLIDUS:{this.state=S.SELF_CLOSING_START_TAG;break}case b.EQUALS_SIGN:{this.state=S.BEFORE_ATTRIBUTE_VALUE;break}case b.GREATER_THAN_SIGN:{this.state=S.DATA,this.emitCurrentTagToken();break}case b.EOF:{this._err(U.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=S.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.QUOTATION_MARK:{this.state=S.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case b.APOSTROPHE:{this.state=S.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case b.GREATER_THAN_SIGN:{this._err(U.missingAttributeValue),this.state=S.DATA,this.emitCurrentTagToken();break}default:this.state=S.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case b.QUOTATION_MARK:{this.state=S.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case b.AMPERSAND:{this._startCharacterReference();break}case b.NULL:{this._err(U.unexpectedNullCharacter),this.currentAttr.value+=ze;break}case b.EOF:{this._err(U.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case b.APOSTROPHE:{this.state=S.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case b.AMPERSAND:{this._startCharacterReference();break}case b.NULL:{this._err(U.unexpectedNullCharacter),this.currentAttr.value+=ze;break}case b.EOF:{this._err(U.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:{this._leaveAttrValue(),this.state=S.BEFORE_ATTRIBUTE_NAME;break}case b.AMPERSAND:{this._startCharacterReference();break}case b.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=S.DATA,this.emitCurrentTagToken();break}case b.NULL:{this._err(U.unexpectedNullCharacter),this.currentAttr.value+=ze;break}case b.QUOTATION_MARK:case b.APOSTROPHE:case b.LESS_THAN_SIGN:case b.EQUALS_SIGN:case b.GRAVE_ACCENT:{this._err(U.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case b.EOF:{this._err(U.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:{this._leaveAttrValue(),this.state=S.BEFORE_ATTRIBUTE_NAME;break}case b.SOLIDUS:{this._leaveAttrValue(),this.state=S.SELF_CLOSING_START_TAG;break}case b.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=S.DATA,this.emitCurrentTagToken();break}case b.EOF:{this._err(U.eofInTag),this._emitEOFToken();break}default:this._err(U.missingWhitespaceBetweenAttributes),this.state=S.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case b.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=S.DATA,this.emitCurrentTagToken();break}case b.EOF:{this._err(U.eofInTag),this._emitEOFToken();break}default:this._err(U.unexpectedSolidusInTag),this.state=S.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case b.GREATER_THAN_SIGN:{this.state=S.DATA,this.emitCurrentComment(n);break}case b.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case b.NULL:{this._err(U.unexpectedNullCharacter),n.data+=ze;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Ft.DASH_DASH,!0)?(this._createCommentToken(Ft.DASH_DASH.length+1),this.state=S.COMMENT_START):this._consumeSequenceIfMatch(Ft.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Ft.DOCTYPE.length+1),this.state=S.DOCTYPE):this._consumeSequenceIfMatch(Ft.CDATA_START,!0)?this.inForeignNode?this.state=S.CDATA_SECTION:(this._err(U.cdataInHtmlContent),this._createCommentToken(Ft.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=S.BOGUS_COMMENT):this._ensureHibernation()||(this._err(U.incorrectlyOpenedComment),this._createCommentToken(2),this.state=S.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case b.HYPHEN_MINUS:{this.state=S.COMMENT_START_DASH;break}case b.GREATER_THAN_SIGN:{this._err(U.abruptClosingOfEmptyComment),this.state=S.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=S.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case b.HYPHEN_MINUS:{this.state=S.COMMENT_END;break}case b.GREATER_THAN_SIGN:{this._err(U.abruptClosingOfEmptyComment),this.state=S.DATA,this.emitCurrentComment(n);break}case b.EOF:{this._err(U.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=S.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case b.HYPHEN_MINUS:{this.state=S.COMMENT_END_DASH;break}case b.LESS_THAN_SIGN:{n.data+="<",this.state=S.COMMENT_LESS_THAN_SIGN;break}case b.NULL:{this._err(U.unexpectedNullCharacter),n.data+=ze;break}case b.EOF:{this._err(U.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case b.EXCLAMATION_MARK:{n.data+="!",this.state=S.COMMENT_LESS_THAN_SIGN_BANG;break}case b.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=S.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===b.HYPHEN_MINUS?this.state=S.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=S.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===b.HYPHEN_MINUS?this.state=S.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=S.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==b.GREATER_THAN_SIGN&&t!==b.EOF&&this._err(U.nestedComment),this.state=S.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case b.HYPHEN_MINUS:{this.state=S.COMMENT_END;break}case b.EOF:{this._err(U.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=S.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case b.GREATER_THAN_SIGN:{this.state=S.DATA,this.emitCurrentComment(n);break}case b.EXCLAMATION_MARK:{this.state=S.COMMENT_END_BANG;break}case b.HYPHEN_MINUS:{n.data+="-";break}case b.EOF:{this._err(U.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=S.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case b.HYPHEN_MINUS:{n.data+="--!",this.state=S.COMMENT_END_DASH;break}case b.GREATER_THAN_SIGN:{this._err(U.incorrectlyClosedComment),this.state=S.DATA,this.emitCurrentComment(n);break}case b.EOF:{this._err(U.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=S.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:{this.state=S.BEFORE_DOCTYPE_NAME;break}case b.GREATER_THAN_SIGN:{this.state=S.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case b.EOF:{this._err(U.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(U.missingWhitespaceBeforeDoctypeName),this.state=S.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(os(t))this._createDoctypeToken(String.fromCharCode(Da(t))),this.state=S.DOCTYPE_NAME;else switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.NULL:{this._err(U.unexpectedNullCharacter),this._createDoctypeToken(ze),this.state=S.DOCTYPE_NAME;break}case b.GREATER_THAN_SIGN:{this._err(U.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=S.DATA;break}case b.EOF:{this._err(U.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=S.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:{this.state=S.AFTER_DOCTYPE_NAME;break}case b.GREATER_THAN_SIGN:{this.state=S.DATA,this.emitCurrentDoctype(n);break}case b.NULL:{this._err(U.unexpectedNullCharacter),n.name+=ze;break}case b.EOF:{this._err(U.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(os(t)?Da(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.GREATER_THAN_SIGN:{this.state=S.DATA,this.emitCurrentDoctype(n);break}case b.EOF:{this._err(U.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Ft.PUBLIC,!1)?this.state=S.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Ft.SYSTEM,!1)?this.state=S.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(U.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=S.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:{this.state=S.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case b.QUOTATION_MARK:{this._err(U.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=S.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case b.APOSTROPHE:{this._err(U.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=S.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case b.GREATER_THAN_SIGN:{this._err(U.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=S.DATA,this.emitCurrentDoctype(n);break}case b.EOF:{this._err(U.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(U.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=S.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.QUOTATION_MARK:{n.publicId="",this.state=S.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case b.APOSTROPHE:{n.publicId="",this.state=S.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case b.GREATER_THAN_SIGN:{this._err(U.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=S.DATA,this.emitCurrentDoctype(n);break}case b.EOF:{this._err(U.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(U.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=S.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case b.QUOTATION_MARK:{this.state=S.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case b.NULL:{this._err(U.unexpectedNullCharacter),n.publicId+=ze;break}case b.GREATER_THAN_SIGN:{this._err(U.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=S.DATA;break}case b.EOF:{this._err(U.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case b.APOSTROPHE:{this.state=S.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case b.NULL:{this._err(U.unexpectedNullCharacter),n.publicId+=ze;break}case b.GREATER_THAN_SIGN:{this._err(U.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=S.DATA;break}case b.EOF:{this._err(U.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:{this.state=S.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case b.GREATER_THAN_SIGN:{this.state=S.DATA,this.emitCurrentDoctype(n);break}case b.QUOTATION_MARK:{this._err(U.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=S.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case b.APOSTROPHE:{this._err(U.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=S.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case b.EOF:{this._err(U.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(U.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=S.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=S.DATA;break}case b.QUOTATION_MARK:{n.systemId="",this.state=S.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case b.APOSTROPHE:{n.systemId="",this.state=S.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case b.EOF:{this._err(U.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(U.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=S.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:{this.state=S.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case b.QUOTATION_MARK:{this._err(U.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=S.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case b.APOSTROPHE:{this._err(U.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=S.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case b.GREATER_THAN_SIGN:{this._err(U.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=S.DATA,this.emitCurrentDoctype(n);break}case b.EOF:{this._err(U.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(U.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=S.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.QUOTATION_MARK:{n.systemId="",this.state=S.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case b.APOSTROPHE:{n.systemId="",this.state=S.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case b.GREATER_THAN_SIGN:{this._err(U.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=S.DATA,this.emitCurrentDoctype(n);break}case b.EOF:{this._err(U.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(U.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=S.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case b.QUOTATION_MARK:{this.state=S.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case b.NULL:{this._err(U.unexpectedNullCharacter),n.systemId+=ze;break}case b.GREATER_THAN_SIGN:{this._err(U.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=S.DATA;break}case b.EOF:{this._err(U.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case b.APOSTROPHE:{this.state=S.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case b.NULL:{this._err(U.unexpectedNullCharacter),n.systemId+=ze;break}case b.GREATER_THAN_SIGN:{this._err(U.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=S.DATA;break}case b.EOF:{this._err(U.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=S.DATA;break}case b.EOF:{this._err(U.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(U.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=S.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case b.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=S.DATA;break}case b.NULL:{this._err(U.unexpectedNullCharacter);break}case b.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case b.RIGHT_SQUARE_BRACKET:{this.state=S.CDATA_SECTION_BRACKET;break}case b.EOF:{this._err(U.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===b.RIGHT_SQUARE_BRACKET?this.state=S.CDATA_SECTION_END:(this._emitChars("]"),this.state=S.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case b.GREATER_THAN_SIGN:{this.state=S.DATA;break}case b.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=S.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(b.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&g0(this.preprocessor.peek(1))?S.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){g0(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===b.SEMICOLON&&this._err(U.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const mg=new Set([c.DD,c.DT,c.LI,c.OPTGROUP,c.OPTION,c.P,c.RB,c.RP,c.RT,c.RTC]),T0=new Set([...mg,c.CAPTION,c.COLGROUP,c.TBODY,c.TD,c.TFOOT,c.TH,c.THEAD,c.TR]),Lu=new Set([c.APPLET,c.CAPTION,c.HTML,c.MARQUEE,c.OBJECT,c.TABLE,c.TD,c.TEMPLATE,c.TH]),sC=new Set([...Lu,c.OL,c.UL]),aC=new Set([...Lu,c.BUTTON]),y0=new Set([c.ANNOTATION_XML,c.MI,c.MN,c.MO,c.MS,c.MTEXT]),b0=new Set([c.DESC,c.FOREIGN_OBJECT,c.TITLE]),uC=new Set([c.TR,c.TEMPLATE,c.HTML]),lC=new Set([c.TBODY,c.TFOOT,c.THEAD,c.TEMPLATE,c.HTML]),oC=new Set([c.TABLE,c.TEMPLATE,c.HTML]),cC=new Set([c.TD,c.TH]);class dC{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=c.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===c.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===$.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const i=this._indexOf(t)+1;this.items.splice(i,0,n),this.tagIDs.splice(i,0,r),this.stackTop++,i===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,i===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==$.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(bc,$.HTML)}popUntilTableCellPopped(){this.popUntilPopped(cC,$.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(oC,$.HTML)}clearBackToTableBodyContext(){this.clearBackTo(lC,$.HTML)}clearBackToTableRowContext(){this.clearBackTo(uC,$.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===c.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===c.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const i=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case $.HTML:{if(i===t)return!0;if(n.has(i))return!1;break}case $.SVG:{if(b0.has(i))return!1;break}case $.MATHML:{if(y0.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Lu)}hasInListItemScope(t){return this.hasInDynamicScope(t,sC)}hasInButtonScope(t){return this.hasInDynamicScope(t,aC)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case $.HTML:{if(bc.has(n))return!0;if(Lu.has(n))return!1;break}case $.SVG:{if(b0.has(n))return!1;break}case $.MATHML:{if(y0.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===$.HTML)switch(this.tagIDs[n]){case t:return!0;case c.TABLE:case c.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===$.HTML)switch(this.tagIDs[t]){case c.TBODY:case c.THEAD:case c.TFOOT:return!0;case c.TABLE:case c.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===$.HTML)switch(this.tagIDs[n]){case t:return!0;case c.OPTION:case c.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&mg.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&T0.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&T0.has(this.currentTagId);)this.pop()}}const io=3;var vn;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(vn||(vn={}));const x0={type:vn.Marker};class fC{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],i=n.length,s=this.treeAdapter.getTagName(t),a=this.treeAdapter.getNamespaceURI(t);for(let u=0;u<this.entries.length;u++){const l=this.entries[u];if(l.type===vn.Marker)break;const{element:d}=l;if(this.treeAdapter.getTagName(d)===s&&this.treeAdapter.getNamespaceURI(d)===a){const f=this.treeAdapter.getAttrList(d);f.length===i&&r.push({idx:u,attrs:f})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<io)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<io)return;const i=new Map(n.map(a=>[a.name,a.value]));let s=0;for(let a=0;a<r.length;a++){const u=r[a];u.attrs.every(l=>i.get(l.name)===l.value)&&(s+=1,s>=io&&this.entries.splice(u.idx,1))}}insertMarker(){this.entries.unshift(x0)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:vn.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:vn.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(x0);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===vn.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===vn.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===vn.Element&&n.element===t)}}const rr={createDocument(){return{nodeName:"#document",mode:un.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,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,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const i=e.childNodes.find(s=>s.nodeName==="#documentType");if(i)i.name=t,i.publicId=n,i.systemId=r;else{const s={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};rr.appendChild(e,s)}},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 n=e.childNodes[e.childNodes.length-1];if(rr.isTextNode(n)){n.value+=t;return}}rr.appendChild(e,rr.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&rr.isTextNode(r)?r.value+=t:rr.insertBefore(e,rr.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},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}}},pg="html",hC="about:legacy-compat",mC="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",gg=["+//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//"],pC=[...gg,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],gC=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Eg=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],EC=[...Eg,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function _0(e,t){return t.some(n=>e.startsWith(n))}function TC(e){return e.name===pg&&e.publicId===null&&(e.systemId===null||e.systemId===hC)}function yC(e){if(e.name!==pg)return un.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===mC)return un.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),gC.has(n))return un.QUIRKS;let r=t===null?pC:gg;if(_0(n,r))return un.QUIRKS;if(r=t===null?Eg:EC,_0(n,r))return un.LIMITED_QUIRKS}return un.NO_QUIRKS}const k0={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},bC="definitionurl",xC="definitionURL",_C=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])),kC=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:$.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:$.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:$.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:$.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:$.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:$.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:$.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:$.XML}],["xml:space",{prefix:"xml",name:"space",namespace:$.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:$.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:$.XMLNS}]]),SC=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])),CC=new Set([c.B,c.BIG,c.BLOCKQUOTE,c.BODY,c.BR,c.CENTER,c.CODE,c.DD,c.DIV,c.DL,c.DT,c.EM,c.EMBED,c.H1,c.H2,c.H3,c.H4,c.H5,c.H6,c.HEAD,c.HR,c.I,c.IMG,c.LI,c.LISTING,c.MENU,c.META,c.NOBR,c.OL,c.P,c.PRE,c.RUBY,c.S,c.SMALL,c.SPAN,c.STRONG,c.STRIKE,c.SUB,c.SUP,c.TABLE,c.TT,c.U,c.UL,c.VAR]);function NC(e){const t=e.tagID;return t===c.FONT&&e.attrs.some(({name:r})=>r===jr.COLOR||r===jr.SIZE||r===jr.FACE)||CC.has(t)}function Tg(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===bC){e.attrs[t].name=xC;break}}function yg(e){for(let t=0;t<e.attrs.length;t++){const n=_C.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Ud(e){for(let t=0;t<e.attrs.length;t++){const n=kC.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function AC(e){const t=SC.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Hi(e.tagName))}function vC(e,t){return t===$.MATHML&&(e===c.MI||e===c.MO||e===c.MN||e===c.MS||e===c.MTEXT)}function wC(e,t,n){if(t===$.MATHML&&e===c.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===jr.ENCODING){const i=n[r].value.toLowerCase();return i===k0.TEXT_HTML||i===k0.APPLICATION_XML}}return t===$.SVG&&(e===c.FOREIGN_OBJECT||e===c.DESC||e===c.TITLE)}function IC(e,t,n,r){return(!r||r===$.HTML)&&wC(e,t,n)||(!r||r===$.MATHML)&&vC(e,t)}const LC="hidden",DC=8,RC=3;var A;(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"})(A||(A={}));const OC={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},bg=new Set([c.TABLE,c.TBODY,c.TFOOT,c.THEAD,c.TR]),S0={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:rr,onParseError:null};class C0{constructor(t,n,r=null,i=null){this.fragmentContext=r,this.scriptHandler=i,this.currentToken=null,this.stopped=!1,this.insertionMode=A.INITIAL,this.originalInsertionMode=A.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={...S0,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n??this.treeAdapter.createDocument(),this.tokenizer=new iC(this.options,this),this.activeFormattingElements=new fC(this.treeAdapter),this.fragmentContextID=r?Hi(this.treeAdapter.getTagName(r)):c.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new dC(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r={...S0,...n};t??(t=r.treeAdapter.createElement(P.TEMPLATE,$.HTML,[]));const i=r.treeAdapter.createElement("documentmock",$.HTML,[]),s=new this(r,i,t);return s.fragmentContextID===c.TEMPLATE&&s.tmplInsertionModeStack.unshift(A.IN_TEMPLATE),s._initTokenizerForFragmentParsing(),s._insertFakeRootElement(),s._resetInsertionMode(),s._findFormInFragmentContext(),s}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var i;if(!this.onParseError)return;const s=(i=t.location)!==null&&i!==void 0?i:OC,a={code:n,startLine:s.startLine,startCol:s.startCol,startOffset:s.startOffset,endLine:r?s.startLine:s.endLine,endCol:r?s.startCol:s.endCol,endOffset:r?s.startOffset:s.endOffset};this.onParseError(a)}onItemPush(t,n,r){var i,s;(s=(i=this.treeAdapter).onItemPush)===null||s===void 0||s.call(i,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,i;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(i=(r=this.treeAdapter).onItemPop)===null||i===void 0||i.call(r,t,this.openElements.current),n){let s,a;this.openElements.stackTop===0&&this.fragmentContext?(s=this.fragmentContext,a=this.fragmentContextID):{current:s,currentTagId:a}=this.openElements,this._setContextModes(s,a)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===$.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,$.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=A.TEXT}switchToPlaintextParsing(){this.insertionMode=A.TEXT,this.originalInsertionMode=A.IN_BODY,this.tokenizer.state=tt.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)===P.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==$.HTML))switch(this.fragmentContextID){case c.TITLE:case c.TEXTAREA:{this.tokenizer.state=tt.RCDATA;break}case c.STYLE:case c.XMP:case c.IFRAME:case c.NOEMBED:case c.NOFRAMES:case c.NOSCRIPT:{this.tokenizer.state=tt.RAWTEXT;break}case c.SCRIPT:{this.tokenizer.state=tt.SCRIPT_DATA;break}case c.PLAINTEXT:{this.tokenizer.state=tt.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",i=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,i),t.location){const a=this.treeAdapter.getChildNodes(this.document).find(u=>this.treeAdapter.isDocumentTypeNode(u));a&&this.treeAdapter.setNodeSourceCodeLocation(a,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r??this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,$.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,$.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(P.HTML,$.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,c.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const i=this.treeAdapter.getChildNodes(n),s=r?i.lastIndexOf(r):i.length,a=i[s-1];if(this.treeAdapter.getNodeSourceCodeLocation(a)){const{endLine:l,endCol:d,endOffset:f}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(a,{endLine:l,endCol:d,endOffset:f})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(a,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,i=this.treeAdapter.getTagName(t),s=n.type===xe.END_TAG&&i===n.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,s)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===c.SVG&&this.treeAdapter.getTagName(n)===P.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===$.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===c.MGLYPH||t.tagID===c.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,$.HTML)}_processToken(t){switch(t.type){case xe.CHARACTER:{this.onCharacter(t);break}case xe.NULL_CHARACTER:{this.onNullCharacter(t);break}case xe.COMMENT:{this.onComment(t);break}case xe.DOCTYPE:{this.onDoctype(t);break}case xe.START_TAG:{this._processStartTag(t);break}case xe.END_TAG:{this.onEndTag(t);break}case xe.EOF:{this.onEof(t);break}case xe.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const i=this.treeAdapter.getNamespaceURI(n),s=this.treeAdapter.getAttrList(n);return IC(t,i,s,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(i=>i.type===vn.Marker||this.openElements.contains(i.element)),r=n===-1?t-1:n-1;for(let i=r;i>=0;i--){const s=this.activeFormattingElements.entries[i];this._insertElement(s.token,this.treeAdapter.getNamespaceURI(s.element)),s.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=A.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(c.P),this.openElements.popUntilTagNamePopped(c.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case c.TR:{this.insertionMode=A.IN_ROW;return}case c.TBODY:case c.THEAD:case c.TFOOT:{this.insertionMode=A.IN_TABLE_BODY;return}case c.CAPTION:{this.insertionMode=A.IN_CAPTION;return}case c.COLGROUP:{this.insertionMode=A.IN_COLUMN_GROUP;return}case c.TABLE:{this.insertionMode=A.IN_TABLE;return}case c.BODY:{this.insertionMode=A.IN_BODY;return}case c.FRAMESET:{this.insertionMode=A.IN_FRAMESET;return}case c.SELECT:{this._resetInsertionModeForSelect(t);return}case c.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case c.HTML:{this.insertionMode=this.headElement?A.AFTER_HEAD:A.BEFORE_HEAD;return}case c.TD:case c.TH:{if(t>0){this.insertionMode=A.IN_CELL;return}break}case c.HEAD:{if(t>0){this.insertionMode=A.IN_HEAD;return}break}}this.insertionMode=A.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===c.TEMPLATE)break;if(r===c.TABLE){this.insertionMode=A.IN_SELECT_IN_TABLE;return}}this.insertionMode=A.IN_SELECT}_isElementCausesFosterParenting(t){return bg.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 n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case c.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===$.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case c.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return eC[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){cA(this,t);return}switch(this.insertionMode){case A.INITIAL:{ns(this,t);break}case A.BEFORE_HTML:{_s(this,t);break}case A.BEFORE_HEAD:{ks(this,t);break}case A.IN_HEAD:{Ss(this,t);break}case A.IN_HEAD_NO_SCRIPT:{Cs(this,t);break}case A.AFTER_HEAD:{Ns(this,t);break}case A.IN_BODY:case A.IN_CAPTION:case A.IN_CELL:case A.IN_TEMPLATE:{_g(this,t);break}case A.TEXT:case A.IN_SELECT:case A.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case A.IN_TABLE:case A.IN_TABLE_BODY:case A.IN_ROW:{so(this,t);break}case A.IN_TABLE_TEXT:{vg(this,t);break}case A.IN_COLUMN_GROUP:{Du(this,t);break}case A.AFTER_BODY:{Ru(this,t);break}case A.AFTER_AFTER_BODY:{Za(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){oA(this,t);return}switch(this.insertionMode){case A.INITIAL:{ns(this,t);break}case A.BEFORE_HTML:{_s(this,t);break}case A.BEFORE_HEAD:{ks(this,t);break}case A.IN_HEAD:{Ss(this,t);break}case A.IN_HEAD_NO_SCRIPT:{Cs(this,t);break}case A.AFTER_HEAD:{Ns(this,t);break}case A.TEXT:{this._insertCharacters(t);break}case A.IN_TABLE:case A.IN_TABLE_BODY:case A.IN_ROW:{so(this,t);break}case A.IN_COLUMN_GROUP:{Du(this,t);break}case A.AFTER_BODY:{Ru(this,t);break}case A.AFTER_AFTER_BODY:{Za(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){xc(this,t);return}switch(this.insertionMode){case A.INITIAL:case A.BEFORE_HTML:case A.BEFORE_HEAD:case A.IN_HEAD:case A.IN_HEAD_NO_SCRIPT:case A.AFTER_HEAD:case A.IN_BODY:case A.IN_TABLE:case A.IN_CAPTION:case A.IN_COLUMN_GROUP:case A.IN_TABLE_BODY:case A.IN_ROW:case A.IN_CELL:case A.IN_SELECT:case A.IN_SELECT_IN_TABLE:case A.IN_TEMPLATE:case A.IN_FRAMESET:case A.AFTER_FRAMESET:{xc(this,t);break}case A.IN_TABLE_TEXT:{rs(this,t);break}case A.AFTER_BODY:{HC(this,t);break}case A.AFTER_AFTER_BODY:case A.AFTER_AFTER_FRAMESET:{zC(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case A.INITIAL:{$C(this,t);break}case A.BEFORE_HEAD:case A.IN_HEAD:case A.IN_HEAD_NO_SCRIPT:case A.AFTER_HEAD:{this._err(t,U.misplacedDoctype);break}case A.IN_TABLE_TEXT:{rs(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,U.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?dA(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case A.INITIAL:{ns(this,t);break}case A.BEFORE_HTML:{YC(this,t);break}case A.BEFORE_HEAD:{WC(this,t);break}case A.IN_HEAD:{_n(this,t);break}case A.IN_HEAD_NO_SCRIPT:{GC(this,t);break}case A.AFTER_HEAD:{XC(this,t);break}case A.IN_BODY:{St(this,t);break}case A.IN_TABLE:{Oi(this,t);break}case A.IN_TABLE_TEXT:{rs(this,t);break}case A.IN_CAPTION:{qN(this,t);break}case A.IN_COLUMN_GROUP:{$d(this,t);break}case A.IN_TABLE_BODY:{pl(this,t);break}case A.IN_ROW:{gl(this,t);break}case A.IN_CELL:{KN(this,t);break}case A.IN_SELECT:{Lg(this,t);break}case A.IN_SELECT_IN_TABLE:{JN(this,t);break}case A.IN_TEMPLATE:{eA(this,t);break}case A.AFTER_BODY:{nA(this,t);break}case A.IN_FRAMESET:{rA(this,t);break}case A.AFTER_FRAMESET:{sA(this,t);break}case A.AFTER_AFTER_BODY:{uA(this,t);break}case A.AFTER_AFTER_FRAMESET:{lA(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?fA(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case A.INITIAL:{ns(this,t);break}case A.BEFORE_HTML:{VC(this,t);break}case A.BEFORE_HEAD:{qC(this,t);break}case A.IN_HEAD:{QC(this,t);break}case A.IN_HEAD_NO_SCRIPT:{KC(this,t);break}case A.AFTER_HEAD:{JC(this,t);break}case A.IN_BODY:{ml(this,t);break}case A.TEXT:{FN(this,t);break}case A.IN_TABLE:{Gs(this,t);break}case A.IN_TABLE_TEXT:{rs(this,t);break}case A.IN_CAPTION:{QN(this,t);break}case A.IN_COLUMN_GROUP:{GN(this,t);break}case A.IN_TABLE_BODY:{_c(this,t);break}case A.IN_ROW:{Ig(this,t);break}case A.IN_CELL:{XN(this,t);break}case A.IN_SELECT:{Dg(this,t);break}case A.IN_SELECT_IN_TABLE:{ZN(this,t);break}case A.IN_TEMPLATE:{tA(this,t);break}case A.AFTER_BODY:{Og(this,t);break}case A.IN_FRAMESET:{iA(this,t);break}case A.AFTER_FRAMESET:{aA(this,t);break}case A.AFTER_AFTER_BODY:{Za(this,t);break}}}onEof(t){switch(this.insertionMode){case A.INITIAL:{ns(this,t);break}case A.BEFORE_HTML:{_s(this,t);break}case A.BEFORE_HEAD:{ks(this,t);break}case A.IN_HEAD:{Ss(this,t);break}case A.IN_HEAD_NO_SCRIPT:{Cs(this,t);break}case A.AFTER_HEAD:{Ns(this,t);break}case A.IN_BODY:case A.IN_TABLE:case A.IN_CAPTION:case A.IN_COLUMN_GROUP:case A.IN_TABLE_BODY:case A.IN_ROW:case A.IN_CELL:case A.IN_SELECT:case A.IN_SELECT_IN_TABLE:{Ng(this,t);break}case A.TEXT:{BN(this,t);break}case A.IN_TABLE_TEXT:{rs(this,t);break}case A.IN_TEMPLATE:{Rg(this,t);break}case A.AFTER_BODY:case A.IN_FRAMESET:case A.AFTER_FRAMESET:case A.AFTER_AFTER_BODY:case A.AFTER_AFTER_FRAMESET:{zd(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===b.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 A.IN_HEAD:case A.IN_HEAD_NO_SCRIPT:case A.AFTER_HEAD:case A.TEXT:case A.IN_COLUMN_GROUP:case A.IN_SELECT:case A.IN_SELECT_IN_TABLE:case A.IN_FRAMESET:case A.AFTER_FRAMESET:{this._insertCharacters(t);break}case A.IN_BODY:case A.IN_CAPTION:case A.IN_CELL:case A.IN_TEMPLATE:case A.AFTER_BODY:case A.AFTER_AFTER_BODY:case A.AFTER_AFTER_FRAMESET:{xg(this,t);break}case A.IN_TABLE:case A.IN_TABLE_BODY:case A.IN_ROW:{so(this,t);break}case A.IN_TABLE_TEXT:{Ag(this,t);break}}}}function PC(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):Cg(e,t),n}function MC(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function FC(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let s=0,a=i;a!==n;s++,a=i){i=e.openElements.getCommonAncestor(a);const u=e.activeFormattingElements.getElementEntry(a),l=u&&s>=RC;!u||l?(l&&e.activeFormattingElements.removeEntry(u),e.openElements.remove(a)):(a=BC(e,u),r===t&&(e.activeFormattingElements.bookmark=u),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(a,r),r=a)}return r}function BC(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function jC(e,t,n){const r=e.treeAdapter.getTagName(t),i=Hi(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const s=e.treeAdapter.getNamespaceURI(t);i===c.TEMPLATE&&s===$.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function UC(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,s=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,s),e.treeAdapter.appendChild(t,s),e.activeFormattingElements.insertElementAfterBookmark(s,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,s,i.tagID)}function Hd(e,t){for(let n=0;n<DC;n++){const r=PC(e,t);if(!r)break;const i=MC(e,r);if(!i)break;e.activeFormattingElements.bookmark=r;const s=FC(e,i,r.element),a=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(s),a&&jC(e,a,s),UC(e,i,r)}}function xc(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function HC(e,t){e._appendCommentNode(t,e.openElements.items[0])}function zC(e,t){e._appendCommentNode(t,e.document)}function zd(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],i=e.treeAdapter.getNodeSourceCodeLocation(r);if(i&&!i.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const s=e.openElements.items[1],a=e.treeAdapter.getNodeSourceCodeLocation(s);a&&!a.endTag&&e._setEndLocation(s,t)}}}}function $C(e,t){e._setDocumentType(t);const n=t.forceQuirks?un.QUIRKS:yC(t);TC(t)||e._err(t,U.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=A.BEFORE_HTML}function ns(e,t){e._err(t,U.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,un.QUIRKS),e.insertionMode=A.BEFORE_HTML,e._processToken(t)}function YC(e,t){t.tagID===c.HTML?(e._insertElement(t,$.HTML),e.insertionMode=A.BEFORE_HEAD):_s(e,t)}function VC(e,t){const n=t.tagID;(n===c.HTML||n===c.HEAD||n===c.BODY||n===c.BR)&&_s(e,t)}function _s(e,t){e._insertFakeRootElement(),e.insertionMode=A.BEFORE_HEAD,e._processToken(t)}function WC(e,t){switch(t.tagID){case c.HTML:{St(e,t);break}case c.HEAD:{e._insertElement(t,$.HTML),e.headElement=e.openElements.current,e.insertionMode=A.IN_HEAD;break}default:ks(e,t)}}function qC(e,t){const n=t.tagID;n===c.HEAD||n===c.BODY||n===c.HTML||n===c.BR?ks(e,t):e._err(t,U.endTagWithoutMatchingOpenElement)}function ks(e,t){e._insertFakeElement(P.HEAD,c.HEAD),e.headElement=e.openElements.current,e.insertionMode=A.IN_HEAD,e._processToken(t)}function _n(e,t){switch(t.tagID){case c.HTML:{St(e,t);break}case c.BASE:case c.BASEFONT:case c.BGSOUND:case c.LINK:case c.META:{e._appendElement(t,$.HTML),t.ackSelfClosing=!0;break}case c.TITLE:{e._switchToTextParsing(t,tt.RCDATA);break}case c.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,tt.RAWTEXT):(e._insertElement(t,$.HTML),e.insertionMode=A.IN_HEAD_NO_SCRIPT);break}case c.NOFRAMES:case c.STYLE:{e._switchToTextParsing(t,tt.RAWTEXT);break}case c.SCRIPT:{e._switchToTextParsing(t,tt.SCRIPT_DATA);break}case c.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=A.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(A.IN_TEMPLATE);break}case c.HEAD:{e._err(t,U.misplacedStartTagForHeadElement);break}default:Ss(e,t)}}function QC(e,t){switch(t.tagID){case c.HEAD:{e.openElements.pop(),e.insertionMode=A.AFTER_HEAD;break}case c.BODY:case c.BR:case c.HTML:{Ss(e,t);break}case c.TEMPLATE:{Kr(e,t);break}default:e._err(t,U.endTagWithoutMatchingOpenElement)}}function Kr(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==c.TEMPLATE&&e._err(t,U.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(c.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,U.endTagWithoutMatchingOpenElement)}function Ss(e,t){e.openElements.pop(),e.insertionMode=A.AFTER_HEAD,e._processToken(t)}function GC(e,t){switch(t.tagID){case c.HTML:{St(e,t);break}case c.BASEFONT:case c.BGSOUND:case c.HEAD:case c.LINK:case c.META:case c.NOFRAMES:case c.STYLE:{_n(e,t);break}case c.NOSCRIPT:{e._err(t,U.nestedNoscriptInHead);break}default:Cs(e,t)}}function KC(e,t){switch(t.tagID){case c.NOSCRIPT:{e.openElements.pop(),e.insertionMode=A.IN_HEAD;break}case c.BR:{Cs(e,t);break}default:e._err(t,U.endTagWithoutMatchingOpenElement)}}function Cs(e,t){const n=t.type===xe.EOF?U.openElementsLeftAfterEof:U.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=A.IN_HEAD,e._processToken(t)}function XC(e,t){switch(t.tagID){case c.HTML:{St(e,t);break}case c.BODY:{e._insertElement(t,$.HTML),e.framesetOk=!1,e.insertionMode=A.IN_BODY;break}case c.FRAMESET:{e._insertElement(t,$.HTML),e.insertionMode=A.IN_FRAMESET;break}case c.BASE:case c.BASEFONT:case c.BGSOUND:case c.LINK:case c.META:case c.NOFRAMES:case c.SCRIPT:case c.STYLE:case c.TEMPLATE:case c.TITLE:{e._err(t,U.abandonedHeadElementChild),e.openElements.push(e.headElement,c.HEAD),_n(e,t),e.openElements.remove(e.headElement);break}case c.HEAD:{e._err(t,U.misplacedStartTagForHeadElement);break}default:Ns(e,t)}}function JC(e,t){switch(t.tagID){case c.BODY:case c.HTML:case c.BR:{Ns(e,t);break}case c.TEMPLATE:{Kr(e,t);break}default:e._err(t,U.endTagWithoutMatchingOpenElement)}}function Ns(e,t){e._insertFakeElement(P.BODY,c.BODY),e.insertionMode=A.IN_BODY,hl(e,t)}function hl(e,t){switch(t.type){case xe.CHARACTER:{_g(e,t);break}case xe.WHITESPACE_CHARACTER:{xg(e,t);break}case xe.COMMENT:{xc(e,t);break}case xe.START_TAG:{St(e,t);break}case xe.END_TAG:{ml(e,t);break}case xe.EOF:{Ng(e,t);break}}}function xg(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function _g(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function ZC(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function eN(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function tN(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,$.HTML),e.insertionMode=A.IN_FRAMESET)}function nN(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,$.HTML)}function rN(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&bc.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,$.HTML)}function iN(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,$.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function sN(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,$.HTML),n||(e.formElement=e.openElements.current))}function aN(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const i=e.openElements.tagIDs[r];if(n===c.LI&&i===c.LI||(n===c.DD||n===c.DT)&&(i===c.DD||i===c.DT)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i);break}if(i!==c.ADDRESS&&i!==c.DIV&&i!==c.P&&e._isSpecialElement(e.openElements.items[r],i))break}e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,$.HTML)}function uN(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,$.HTML),e.tokenizer.state=tt.PLAINTEXT}function lN(e,t){e.openElements.hasInScope(c.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(c.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,$.HTML),e.framesetOk=!1}function oN(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(P.A);n&&(Hd(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,$.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function cN(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,$.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function dN(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(c.NOBR)&&(Hd(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,$.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function fN(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,$.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function hN(e,t){e.treeAdapter.getDocumentMode(e.document)!==un.QUIRKS&&e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,$.HTML),e.framesetOk=!1,e.insertionMode=A.IN_TABLE}function kg(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,$.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Sg(e){const t=fg(e,jr.TYPE);return t!=null&&t.toLowerCase()===LC}function mN(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,$.HTML),Sg(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function pN(e,t){e._appendElement(t,$.HTML),t.ackSelfClosing=!0}function gN(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._appendElement(t,$.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function EN(e,t){t.tagName=P.IMG,t.tagID=c.IMG,kg(e,t)}function TN(e,t){e._insertElement(t,$.HTML),e.skipNextNewLine=!0,e.tokenizer.state=tt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=A.TEXT}function yN(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,tt.RAWTEXT)}function bN(e,t){e.framesetOk=!1,e._switchToTextParsing(t,tt.RAWTEXT)}function N0(e,t){e._switchToTextParsing(t,tt.RAWTEXT)}function xN(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,$.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===A.IN_TABLE||e.insertionMode===A.IN_CAPTION||e.insertionMode===A.IN_TABLE_BODY||e.insertionMode===A.IN_ROW||e.insertionMode===A.IN_CELL?A.IN_SELECT_IN_TABLE:A.IN_SELECT}function _N(e,t){e.openElements.currentTagId===c.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,$.HTML)}function kN(e,t){e.openElements.hasInScope(c.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,$.HTML)}function SN(e,t){e.openElements.hasInScope(c.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(c.RTC),e._insertElement(t,$.HTML)}function CN(e,t){e._reconstructActiveFormattingElements(),Tg(t),Ud(t),t.selfClosing?e._appendElement(t,$.MATHML):e._insertElement(t,$.MATHML),t.ackSelfClosing=!0}function NN(e,t){e._reconstructActiveFormattingElements(),yg(t),Ud(t),t.selfClosing?e._appendElement(t,$.SVG):e._insertElement(t,$.SVG),t.ackSelfClosing=!0}function A0(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,$.HTML)}function St(e,t){switch(t.tagID){case c.I:case c.S:case c.B:case c.U:case c.EM:case c.TT:case c.BIG:case c.CODE:case c.FONT:case c.SMALL:case c.STRIKE:case c.STRONG:{cN(e,t);break}case c.A:{oN(e,t);break}case c.H1:case c.H2:case c.H3:case c.H4:case c.H5:case c.H6:{rN(e,t);break}case c.P:case c.DL:case c.OL:case c.UL:case c.DIV:case c.DIR:case c.NAV:case c.MAIN:case c.MENU:case c.ASIDE:case c.CENTER:case c.FIGURE:case c.FOOTER:case c.HEADER:case c.HGROUP:case c.DIALOG:case c.DETAILS:case c.ADDRESS:case c.ARTICLE:case c.SEARCH:case c.SECTION:case c.SUMMARY:case c.FIELDSET:case c.BLOCKQUOTE:case c.FIGCAPTION:{nN(e,t);break}case c.LI:case c.DD:case c.DT:{aN(e,t);break}case c.BR:case c.IMG:case c.WBR:case c.AREA:case c.EMBED:case c.KEYGEN:{kg(e,t);break}case c.HR:{gN(e,t);break}case c.RB:case c.RTC:{kN(e,t);break}case c.RT:case c.RP:{SN(e,t);break}case c.PRE:case c.LISTING:{iN(e,t);break}case c.XMP:{yN(e,t);break}case c.SVG:{NN(e,t);break}case c.HTML:{ZC(e,t);break}case c.BASE:case c.LINK:case c.META:case c.STYLE:case c.TITLE:case c.SCRIPT:case c.BGSOUND:case c.BASEFONT:case c.TEMPLATE:{_n(e,t);break}case c.BODY:{eN(e,t);break}case c.FORM:{sN(e,t);break}case c.NOBR:{dN(e,t);break}case c.MATH:{CN(e,t);break}case c.TABLE:{hN(e,t);break}case c.INPUT:{mN(e,t);break}case c.PARAM:case c.TRACK:case c.SOURCE:{pN(e,t);break}case c.IMAGE:{EN(e,t);break}case c.BUTTON:{lN(e,t);break}case c.APPLET:case c.OBJECT:case c.MARQUEE:{fN(e,t);break}case c.IFRAME:{bN(e,t);break}case c.SELECT:{xN(e,t);break}case c.OPTION:case c.OPTGROUP:{_N(e,t);break}case c.NOEMBED:case c.NOFRAMES:{N0(e,t);break}case c.FRAMESET:{tN(e,t);break}case c.TEXTAREA:{TN(e,t);break}case c.NOSCRIPT:{e.options.scriptingEnabled?N0(e,t):A0(e,t);break}case c.PLAINTEXT:{uN(e,t);break}case c.COL:case c.TH:case c.TD:case c.TR:case c.HEAD:case c.FRAME:case c.TBODY:case c.TFOOT:case c.THEAD:case c.CAPTION:case c.COLGROUP:break;default:A0(e,t)}}function AN(e,t){if(e.openElements.hasInScope(c.BODY)&&(e.insertionMode=A.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function vN(e,t){e.openElements.hasInScope(c.BODY)&&(e.insertionMode=A.AFTER_BODY,Og(e,t))}function wN(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function IN(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(c.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(c.FORM):n&&e.openElements.remove(n))}function LN(e){e.openElements.hasInButtonScope(c.P)||e._insertFakeElement(P.P,c.P),e._closePElement()}function DN(e){e.openElements.hasInListItemScope(c.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(c.LI),e.openElements.popUntilTagNamePopped(c.LI))}function RN(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function ON(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function PN(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function MN(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(P.BR,c.BR),e.openElements.pop(),e.framesetOk=!1}function Cg(e,t){const n=t.tagName,r=t.tagID;for(let i=e.openElements.stackTop;i>0;i--){const s=e.openElements.items[i],a=e.openElements.tagIDs[i];if(r===a&&(r!==c.UNKNOWN||e.treeAdapter.getTagName(s)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=i&&e.openElements.shortenToLength(i);break}if(e._isSpecialElement(s,a))break}}function ml(e,t){switch(t.tagID){case c.A:case c.B:case c.I:case c.S:case c.U:case c.EM:case c.TT:case c.BIG:case c.CODE:case c.FONT:case c.NOBR:case c.SMALL:case c.STRIKE:case c.STRONG:{Hd(e,t);break}case c.P:{LN(e);break}case c.DL:case c.UL:case c.OL:case c.DIR:case c.DIV:case c.NAV:case c.PRE:case c.MAIN:case c.MENU:case c.ASIDE:case c.BUTTON:case c.CENTER:case c.FIGURE:case c.FOOTER:case c.HEADER:case c.HGROUP:case c.DIALOG:case c.ADDRESS:case c.ARTICLE:case c.DETAILS:case c.SEARCH:case c.SECTION:case c.SUMMARY:case c.LISTING:case c.FIELDSET:case c.BLOCKQUOTE:case c.FIGCAPTION:{wN(e,t);break}case c.LI:{DN(e);break}case c.DD:case c.DT:{RN(e,t);break}case c.H1:case c.H2:case c.H3:case c.H4:case c.H5:case c.H6:{ON(e);break}case c.BR:{MN(e);break}case c.BODY:{AN(e,t);break}case c.HTML:{vN(e,t);break}case c.FORM:{IN(e);break}case c.APPLET:case c.OBJECT:case c.MARQUEE:{PN(e,t);break}case c.TEMPLATE:{Kr(e,t);break}default:Cg(e,t)}}function Ng(e,t){e.tmplInsertionModeStack.length>0?Rg(e,t):zd(e,t)}function FN(e,t){var n;t.tagID===c.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function BN(e,t){e._err(t,U.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function so(e,t){if(e.openElements.currentTagId!==void 0&&bg.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=A.IN_TABLE_TEXT,t.type){case xe.CHARACTER:{vg(e,t);break}case xe.WHITESPACE_CHARACTER:{Ag(e,t);break}}else la(e,t)}function jN(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,$.HTML),e.insertionMode=A.IN_CAPTION}function UN(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,$.HTML),e.insertionMode=A.IN_COLUMN_GROUP}function HN(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(P.COLGROUP,c.COLGROUP),e.insertionMode=A.IN_COLUMN_GROUP,$d(e,t)}function zN(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,$.HTML),e.insertionMode=A.IN_TABLE_BODY}function $N(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(P.TBODY,c.TBODY),e.insertionMode=A.IN_TABLE_BODY,pl(e,t)}function YN(e,t){e.openElements.hasInTableScope(c.TABLE)&&(e.openElements.popUntilTagNamePopped(c.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function VN(e,t){Sg(t)?e._appendElement(t,$.HTML):la(e,t),t.ackSelfClosing=!0}function WN(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,$.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Oi(e,t){switch(t.tagID){case c.TD:case c.TH:case c.TR:{$N(e,t);break}case c.STYLE:case c.SCRIPT:case c.TEMPLATE:{_n(e,t);break}case c.COL:{HN(e,t);break}case c.FORM:{WN(e,t);break}case c.TABLE:{YN(e,t);break}case c.TBODY:case c.TFOOT:case c.THEAD:{zN(e,t);break}case c.INPUT:{VN(e,t);break}case c.CAPTION:{jN(e,t);break}case c.COLGROUP:{UN(e,t);break}default:la(e,t)}}function Gs(e,t){switch(t.tagID){case c.TABLE:{e.openElements.hasInTableScope(c.TABLE)&&(e.openElements.popUntilTagNamePopped(c.TABLE),e._resetInsertionMode());break}case c.TEMPLATE:{Kr(e,t);break}case c.BODY:case c.CAPTION:case c.COL:case c.COLGROUP:case c.HTML:case c.TBODY:case c.TD:case c.TFOOT:case c.TH:case c.THEAD:case c.TR:break;default:la(e,t)}}function la(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,hl(e,t),e.fosterParentingEnabled=n}function Ag(e,t){e.pendingCharacterTokens.push(t)}function vg(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function rs(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)la(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const wg=new Set([c.CAPTION,c.COL,c.COLGROUP,c.TBODY,c.TD,c.TFOOT,c.TH,c.THEAD,c.TR]);function qN(e,t){const n=t.tagID;wg.has(n)?e.openElements.hasInTableScope(c.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(c.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=A.IN_TABLE,Oi(e,t)):St(e,t)}function QN(e,t){const n=t.tagID;switch(n){case c.CAPTION:case c.TABLE:{e.openElements.hasInTableScope(c.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(c.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=A.IN_TABLE,n===c.TABLE&&Gs(e,t));break}case c.BODY:case c.COL:case c.COLGROUP:case c.HTML:case c.TBODY:case c.TD:case c.TFOOT:case c.TH:case c.THEAD:case c.TR:break;default:ml(e,t)}}function $d(e,t){switch(t.tagID){case c.HTML:{St(e,t);break}case c.COL:{e._appendElement(t,$.HTML),t.ackSelfClosing=!0;break}case c.TEMPLATE:{_n(e,t);break}default:Du(e,t)}}function GN(e,t){switch(t.tagID){case c.COLGROUP:{e.openElements.currentTagId===c.COLGROUP&&(e.openElements.pop(),e.insertionMode=A.IN_TABLE);break}case c.TEMPLATE:{Kr(e,t);break}case c.COL:break;default:Du(e,t)}}function Du(e,t){e.openElements.currentTagId===c.COLGROUP&&(e.openElements.pop(),e.insertionMode=A.IN_TABLE,e._processToken(t))}function pl(e,t){switch(t.tagID){case c.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,$.HTML),e.insertionMode=A.IN_ROW;break}case c.TH:case c.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(P.TR,c.TR),e.insertionMode=A.IN_ROW,gl(e,t);break}case c.CAPTION:case c.COL:case c.COLGROUP:case c.TBODY:case c.TFOOT:case c.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=A.IN_TABLE,Oi(e,t));break}default:Oi(e,t)}}function _c(e,t){const n=t.tagID;switch(t.tagID){case c.TBODY:case c.TFOOT:case c.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=A.IN_TABLE);break}case c.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=A.IN_TABLE,Gs(e,t));break}case c.BODY:case c.CAPTION:case c.COL:case c.COLGROUP:case c.HTML:case c.TD:case c.TH:case c.TR:break;default:Gs(e,t)}}function gl(e,t){switch(t.tagID){case c.TH:case c.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,$.HTML),e.insertionMode=A.IN_CELL,e.activeFormattingElements.insertMarker();break}case c.CAPTION:case c.COL:case c.COLGROUP:case c.TBODY:case c.TFOOT:case c.THEAD:case c.TR:{e.openElements.hasInTableScope(c.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=A.IN_TABLE_BODY,pl(e,t));break}default:Oi(e,t)}}function Ig(e,t){switch(t.tagID){case c.TR:{e.openElements.hasInTableScope(c.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=A.IN_TABLE_BODY);break}case c.TABLE:{e.openElements.hasInTableScope(c.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=A.IN_TABLE_BODY,_c(e,t));break}case c.TBODY:case c.TFOOT:case c.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(c.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=A.IN_TABLE_BODY,_c(e,t));break}case c.BODY:case c.CAPTION:case c.COL:case c.COLGROUP:case c.HTML:case c.TD:case c.TH:break;default:Gs(e,t)}}function KN(e,t){const n=t.tagID;wg.has(n)?(e.openElements.hasInTableScope(c.TD)||e.openElements.hasInTableScope(c.TH))&&(e._closeTableCell(),gl(e,t)):St(e,t)}function XN(e,t){const n=t.tagID;switch(n){case c.TD:case c.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=A.IN_ROW);break}case c.TABLE:case c.TBODY:case c.TFOOT:case c.THEAD:case c.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),Ig(e,t));break}case c.BODY:case c.CAPTION:case c.COL:case c.COLGROUP:case c.HTML:break;default:ml(e,t)}}function Lg(e,t){switch(t.tagID){case c.HTML:{St(e,t);break}case c.OPTION:{e.openElements.currentTagId===c.OPTION&&e.openElements.pop(),e._insertElement(t,$.HTML);break}case c.OPTGROUP:{e.openElements.currentTagId===c.OPTION&&e.openElements.pop(),e.openElements.currentTagId===c.OPTGROUP&&e.openElements.pop(),e._insertElement(t,$.HTML);break}case c.HR:{e.openElements.currentTagId===c.OPTION&&e.openElements.pop(),e.openElements.currentTagId===c.OPTGROUP&&e.openElements.pop(),e._appendElement(t,$.HTML),t.ackSelfClosing=!0;break}case c.INPUT:case c.KEYGEN:case c.TEXTAREA:case c.SELECT:{e.openElements.hasInSelectScope(c.SELECT)&&(e.openElements.popUntilTagNamePopped(c.SELECT),e._resetInsertionMode(),t.tagID!==c.SELECT&&e._processStartTag(t));break}case c.SCRIPT:case c.TEMPLATE:{_n(e,t);break}}}function Dg(e,t){switch(t.tagID){case c.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===c.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===c.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===c.OPTGROUP&&e.openElements.pop();break}case c.OPTION:{e.openElements.currentTagId===c.OPTION&&e.openElements.pop();break}case c.SELECT:{e.openElements.hasInSelectScope(c.SELECT)&&(e.openElements.popUntilTagNamePopped(c.SELECT),e._resetInsertionMode());break}case c.TEMPLATE:{Kr(e,t);break}}}function JN(e,t){const n=t.tagID;n===c.CAPTION||n===c.TABLE||n===c.TBODY||n===c.TFOOT||n===c.THEAD||n===c.TR||n===c.TD||n===c.TH?(e.openElements.popUntilTagNamePopped(c.SELECT),e._resetInsertionMode(),e._processStartTag(t)):Lg(e,t)}function ZN(e,t){const n=t.tagID;n===c.CAPTION||n===c.TABLE||n===c.TBODY||n===c.TFOOT||n===c.THEAD||n===c.TR||n===c.TD||n===c.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(c.SELECT),e._resetInsertionMode(),e.onEndTag(t)):Dg(e,t)}function eA(e,t){switch(t.tagID){case c.BASE:case c.BASEFONT:case c.BGSOUND:case c.LINK:case c.META:case c.NOFRAMES:case c.SCRIPT:case c.STYLE:case c.TEMPLATE:case c.TITLE:{_n(e,t);break}case c.CAPTION:case c.COLGROUP:case c.TBODY:case c.TFOOT:case c.THEAD:{e.tmplInsertionModeStack[0]=A.IN_TABLE,e.insertionMode=A.IN_TABLE,Oi(e,t);break}case c.COL:{e.tmplInsertionModeStack[0]=A.IN_COLUMN_GROUP,e.insertionMode=A.IN_COLUMN_GROUP,$d(e,t);break}case c.TR:{e.tmplInsertionModeStack[0]=A.IN_TABLE_BODY,e.insertionMode=A.IN_TABLE_BODY,pl(e,t);break}case c.TD:case c.TH:{e.tmplInsertionModeStack[0]=A.IN_ROW,e.insertionMode=A.IN_ROW,gl(e,t);break}default:e.tmplInsertionModeStack[0]=A.IN_BODY,e.insertionMode=A.IN_BODY,St(e,t)}}function tA(e,t){t.tagID===c.TEMPLATE&&Kr(e,t)}function Rg(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(c.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):zd(e,t)}function nA(e,t){t.tagID===c.HTML?St(e,t):Ru(e,t)}function Og(e,t){var n;if(t.tagID===c.HTML){if(e.fragmentContext||(e.insertionMode=A.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===c.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else Ru(e,t)}function Ru(e,t){e.insertionMode=A.IN_BODY,hl(e,t)}function rA(e,t){switch(t.tagID){case c.HTML:{St(e,t);break}case c.FRAMESET:{e._insertElement(t,$.HTML);break}case c.FRAME:{e._appendElement(t,$.HTML),t.ackSelfClosing=!0;break}case c.NOFRAMES:{_n(e,t);break}}}function iA(e,t){t.tagID===c.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==c.FRAMESET&&(e.insertionMode=A.AFTER_FRAMESET))}function sA(e,t){switch(t.tagID){case c.HTML:{St(e,t);break}case c.NOFRAMES:{_n(e,t);break}}}function aA(e,t){t.tagID===c.HTML&&(e.insertionMode=A.AFTER_AFTER_FRAMESET)}function uA(e,t){t.tagID===c.HTML?St(e,t):Za(e,t)}function Za(e,t){e.insertionMode=A.IN_BODY,hl(e,t)}function lA(e,t){switch(t.tagID){case c.HTML:{St(e,t);break}case c.NOFRAMES:{_n(e,t);break}}}function oA(e,t){t.chars=ze,e._insertCharacters(t)}function cA(e,t){e._insertCharacters(t),e.framesetOk=!1}function Pg(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==$.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function dA(e,t){if(NC(t))Pg(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===$.MATHML?Tg(t):r===$.SVG&&(AC(t),yg(t)),Ud(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function fA(e,t){if(t.tagID===c.P||t.tagID===c.BR){Pg(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===$.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}P.AREA,P.BASE,P.BASEFONT,P.BGSOUND,P.BR,P.COL,P.EMBED,P.FRAME,P.HR,P.IMG,P.INPUT,P.KEYGEN,P.LINK,P.META,P.PARAM,P.SOURCE,P.TRACK,P.WBR;const hA=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,mA=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),v0={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Mg(e,t){const n=SA(e),r=ug("type",{handlers:{root:pA,element:gA,text:EA,comment:Bg,doctype:TA,raw:bA},unknown:xA}),i={parser:n?new C0(v0):C0.getFragmentParser(void 0,v0),handle(u){r(u,i)},stitches:!1,options:t||{}};r(e,i),zi(i,Rn());const s=n?i.parser.document:i.parser.getFragment(),a=C3(s,{file:i.options.file});return i.stitches&&fl(a,"comment",function(u,l,d){const f=u;if(f.value.stitch&&d&&l!==void 0){const h=d.children;return h[l]=f.value.stitch,l}}),a.type==="root"&&a.children.length===1&&a.children[0].type===e.type?a.children[0]:a}function Fg(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function pA(e,t){Fg(e.children,t)}function gA(e,t){_A(e,t),Fg(e.children,t),kA(e,t)}function EA(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:xe.CHARACTER,chars:e.value,location:oa(e)};zi(t,Rn(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function TA(e,t){const n={type:xe.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:oa(e)};zi(t,Rn(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function yA(e,t){t.stitches=!0;const n=CA(e);if("children"in e&&"children"in n){const r=Mg({type:"root",children:e.children},t.options);n.children=r.children}Bg({type:"comment",value:{stitch:n}},t)}function Bg(e,t){const n=e.value,r={type:xe.COMMENT,data:n,location:oa(e)};zi(t,Rn(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function bA(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,jg(t,Rn(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(hA,"&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 n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function xA(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))yA(n,t);else{let r="";throw mA.has(n.type)&&(r=". 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 `"+n.type+"` node"+r)}}function zi(e,t){jg(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,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=tt.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 jg(e,t){if(t&&t.offset!==void 0){const n={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=n}}function _A(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===tt.PLAINTEXT)return;zi(t,Rn(e));const r=t.parser.openElements.current;let i="namespaceURI"in r?r.namespaceURI:Pr.html;i===Pr.html&&n==="svg"&&(i=Pr.svg);const s=I3({...e,children:[]},{space:i===Pr.svg?"svg":"html"}),a={type:xe.START_TAG,tagName:n,tagID:Hi(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in s?s.attrs:[],location:oa(e)};t.parser.currentToken=a,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function kA(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&B3.includes(n)||t.parser.tokenizer.state===tt.PLAINTEXT)return;zi(t,al(e));const r={type:xe.END_TAG,tagName:n,tagID:Hi(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:oa(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===tt.RCDATA||t.parser.tokenizer.state===tt.RAWTEXT||t.parser.tokenizer.state===tt.SCRIPT_DATA)&&(t.parser.tokenizer.state=tt.DATA)}function SA(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function oa(e){const t=Rn(e)||{line:void 0,column:void 0,offset:void 0},n=al(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function CA(e){return"children"in e?Ri({...e,children:[]}):Ri(e)}function NA(e){return function(t,n){return Mg(t,{...e,file:n})}}function w0(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function AA(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function vA(e,t,n){const i=cl((n||{}).ignore||[]),s=wA(t);let a=-1;for(;++a<s.length;)tg(e,"text",u);function u(d,f){let h=-1,m;for(;++h<f.length;){const p=f[h],E=m?m.children:void 0;if(i(p,E?E.indexOf(p):void 0,m))return;m=p}if(m)return l(d,f)}function l(d,f){const h=f[f.length-1],m=s[a][0],p=s[a][1];let E=0;const L=h.children.indexOf(d);let g=!1,T=[];m.lastIndex=0;let x=m.exec(d.value);for(;x;){const R=x.index,B={index:x.index,input:x.input,stack:[...f,d]};let C=p(...x,B);if(typeof C=="string"&&(C=C.length>0?{type:"text",value:C}:void 0),C===!1?m.lastIndex=R+1:(E!==R&&T.push({type:"text",value:d.value.slice(E,R)}),Array.isArray(C)?T.push(...C):C&&T.push(C),E=R+x[0].length,g=!0),!m.global)break;x=m.exec(d.value)}return g?(E<d.value.length&&T.push({type:"text",value:d.value.slice(E)}),h.children.splice(L,1,...T)):T=[d],L+T.length}}function wA(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([IA(i[0]),LA(i[1])])}return t}function IA(e){return typeof e=="string"?new RegExp(AA(e),"g"):e}function LA(e){return typeof e=="function"?e:function(){return e}}const ao="phrasing",uo=["autolink","link","image","label"];function DA(){return{transforms:[jA],enter:{literalAutolink:OA,literalAutolinkEmail:lo,literalAutolinkHttp:lo,literalAutolinkWww:lo},exit:{literalAutolink:BA,literalAutolinkEmail:FA,literalAutolinkHttp:PA,literalAutolinkWww:MA}}}function RA(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:ao,notInConstruct:uo},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:ao,notInConstruct:uo},{character:":",before:"[ps]",after:"\\/",inConstruct:ao,notInConstruct:uo}]}}function OA(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function lo(e){this.config.enter.autolinkProtocol.call(this,e)}function PA(e){this.config.exit.autolinkProtocol.call(this,e)}function MA(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 FA(e){this.config.exit.autolinkEmail.call(this,e)}function BA(e){this.exit(e)}function jA(e){vA(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,UA],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),HA]],{ignore:["link","linkReference"]})}function UA(e,t,n,r,i){let s="";if(!Ug(i)||(/^w/i.test(t)&&(n=t+n,t="",s="http://"),!zA(n)))return!1;const a=$A(n+r);if(!a[0])return!1;const u={type:"link",title:null,url:s+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[u,{type:"text",value:a[1]}]:u}function HA(e,t,n,r){return!Ug(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function zA(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 $A(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=w0(e,"(");let s=w0(e,")");for(;r!==-1&&i>s;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),s++;return[e,n]}function Ug(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Wr(n)||ul(n))&&(!t||n!==47)}Hg.peek=JA;function YA(){this.buffer()}function VA(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function WA(){this.buffer()}function qA(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function QA(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=bn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function GA(e){this.exit(e)}function KA(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=bn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function XA(e){this.exit(e)}function JA(){return"["}function Hg(e,t,n,r){const i=n.createTracker(r);let s=i.move("[^");const a=n.enter("footnoteReference"),u=n.enter("reference");return s+=i.move(n.safe(n.associationId(e),{after:"]",before:s})),u(),a(),s+=i.move("]"),s}function ZA(){return{enter:{gfmFootnoteCallString:YA,gfmFootnoteCall:VA,gfmFootnoteDefinitionLabelString:WA,gfmFootnoteDefinition:qA},exit:{gfmFootnoteCallString:QA,gfmFootnoteCall:GA,gfmFootnoteDefinitionLabelString:KA,gfmFootnoteDefinition:XA}}}function ev(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Hg},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,s,a){const u=s.createTracker(a);let l=u.move("[^");const d=s.enter("footnoteDefinition"),f=s.enter("label");return l+=u.move(s.safe(s.associationId(r),{before:l,after:"]"})),f(),l+=u.move("]:"),r.children&&r.children.length>0&&(u.shift(4),l+=u.move((t?`
398
+ `:" ")+s.indentLines(s.containerFlow(r,u.current()),t?zg:tv))),d(),l}}function tv(e,t,n){return t===0?e:zg(e,t,n)}function zg(e,t,n){return(n?"":" ")+e}const nv=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];$g.peek=uv;function rv(){return{canContainEols:["delete"],enter:{strikethrough:sv},exit:{strikethrough:av}}}function iv(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:nv}],handlers:{delete:$g}}}function sv(e){this.enter({type:"delete",children:[]},e)}function av(e){this.exit(e)}function $g(e,t,n,r){const i=n.createTracker(r),s=n.enter("strikethrough");let a=i.move("~~");return a+=n.containerPhrasing(e,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),s(),a}function uv(){return"~"}function lv(e){return e.length}function ov(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||lv,s=[],a=[],u=[],l=[];let d=0,f=-1;for(;++f<e.length;){const k=[],L=[];let g=-1;for(e[f].length>d&&(d=e[f].length);++g<e[f].length;){const T=cv(e[f][g]);if(n.alignDelimiters!==!1){const x=i(T);L[g]=x,(l[g]===void 0||x>l[g])&&(l[g]=x)}k.push(T)}a[f]=k,u[f]=L}let h=-1;if(typeof r=="object"&&"length"in r)for(;++h<d;)s[h]=I0(r[h]);else{const k=I0(r);for(;++h<d;)s[h]=k}h=-1;const m=[],p=[];for(;++h<d;){const k=s[h];let L="",g="";k===99?(L=":",g=":"):k===108?L=":":k===114&&(g=":");let T=n.alignDelimiters===!1?1:Math.max(1,l[h]-L.length-g.length);const x=L+"-".repeat(T)+g;n.alignDelimiters!==!1&&(T=L.length+T+g.length,T>l[h]&&(l[h]=T),p[h]=T),m[h]=x}a.splice(1,0,m),u.splice(1,0,p),f=-1;const E=[];for(;++f<a.length;){const k=a[f],L=u[f];h=-1;const g=[];for(;++h<d;){const T=k[h]||"";let x="",R="";if(n.alignDelimiters!==!1){const B=l[h]-(L[h]||0),C=s[h];C===114?x=" ".repeat(B):C===99?B%2?(x=" ".repeat(B/2+.5),R=" ".repeat(B/2-.5)):(x=" ".repeat(B/2),R=x):R=" ".repeat(B)}n.delimiterStart!==!1&&!h&&g.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&T==="")&&(n.delimiterStart!==!1||h)&&g.push(" "),n.alignDelimiters!==!1&&g.push(x),g.push(T),n.alignDelimiters!==!1&&g.push(R),n.padding!==!1&&g.push(" "),(n.delimiterEnd!==!1||h!==d-1)&&g.push("|")}E.push(n.delimiterEnd===!1?g.join("").replace(/ +$/,""):g.join(""))}return E.join(`
399
+ `)}function cv(e){return e==null?"":String(e)}function I0(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}function dv(e,t,n,r){const i=n.enter("blockquote"),s=n.createTracker(r);s.move("> "),s.shift(2);const a=n.indentLines(n.containerFlow(e,s.current()),fv);return i(),a}function fv(e,t,n){return">"+(n?"":" ")+e}function hv(e,t){return L0(e,t.inConstruct,!0)&&!L0(e,t.notInConstruct,!1)}function L0(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function D0(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
400
+ `&&hv(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
401
+ `}function mv(e,t){const n=String(e);let r=n.indexOf(t),i=r,s=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++s>a&&(a=s):s=1,i=r+t.length,r=n.indexOf(t,i);return a}function pv(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 gv(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 Ev(e,t,n,r){const i=gv(n),s=e.value||"",a=i==="`"?"GraveAccent":"Tilde";if(pv(e,n)){const h=n.enter("codeIndented"),m=n.indentLines(s,Tv);return h(),m}const u=n.createTracker(r),l=i.repeat(Math.max(mv(s,i)+1,3)),d=n.enter("codeFenced");let f=u.move(l);if(e.lang){const h=n.enter(`codeFencedLang${a}`);f+=u.move(n.safe(e.lang,{before:f,after:" ",encode:["`"],...u.current()})),h()}if(e.lang&&e.meta){const h=n.enter(`codeFencedMeta${a}`);f+=u.move(" "),f+=u.move(n.safe(e.meta,{before:f,after:`
402
+ `,encode:["`"],...u.current()})),h()}return f+=u.move(`
403
+ `),s&&(f+=u.move(s+`
404
+ `)),f+=u.move(l),d(),f}function Tv(e,t,n){return(n?"":" ")+e}function Yd(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 yv(e,t,n,r){const i=Yd(n),s=i==='"'?"Quote":"Apostrophe",a=n.enter("definition");let u=n.enter("label");const l=n.createTracker(r);let d=l.move("[");return d+=l.move(n.safe(n.associationId(e),{before:d,after:"]",...l.current()})),d+=l.move("]: "),u(),!e.url||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),d+=l.move("<"),d+=l.move(n.safe(e.url,{before:d,after:">",...l.current()})),d+=l.move(">")):(u=n.enter("destinationRaw"),d+=l.move(n.safe(e.url,{before:d,after:e.title?" ":`
405
+ `,...l.current()}))),u(),e.title&&(u=n.enter(`title${s}`),d+=l.move(" "+i),d+=l.move(n.safe(e.title,{before:d,after:i,...l.current()})),d+=l.move(i),u()),a(),d}function bv(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 Ks(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Ou(e,t,n){const r=Di(e),i=Di(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Yg.peek=xv;function Yg(e,t,n,r){const i=bv(n),s=n.enter("emphasis"),a=n.createTracker(r),u=a.move(i);let l=a.move(n.containerPhrasing(e,{after:i,before:u,...a.current()}));const d=l.charCodeAt(0),f=Ou(r.before.charCodeAt(r.before.length-1),d,i);f.inside&&(l=Ks(d)+l.slice(1));const h=l.charCodeAt(l.length-1),m=Ou(r.after.charCodeAt(0),h,i);m.inside&&(l=l.slice(0,-1)+Ks(h));const p=a.move(i);return s(),n.attentionEncodeSurroundingInfo={after:m.outside,before:f.outside},u+l+p}function xv(e,t,n){return n.options.emphasis||"*"}function _v(e,t){let n=!1;return fl(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,mc}),!!((!e.depth||e.depth<3)&&Id(e)&&(t.options.setext||n))}function kv(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),s=n.createTracker(r);if(_v(e,n)){const f=n.enter("headingSetext"),h=n.enter("phrasing"),m=n.containerPhrasing(e,{...s.current(),before:`
406
+ `,after:`
407
+ `});return h(),f(),m+`
408
+ `+(i===1?"=":"-").repeat(m.length-(Math.max(m.lastIndexOf("\r"),m.lastIndexOf(`
409
+ `))+1))}const a="#".repeat(i),u=n.enter("headingAtx"),l=n.enter("phrasing");s.move(a+" ");let d=n.containerPhrasing(e,{before:"# ",after:`
410
+ `,...s.current()});return/^[\t ]/.test(d)&&(d=Ks(d.charCodeAt(0))+d.slice(1)),d=d?a+" "+d:a,n.options.closeAtx&&(d+=" "+a),l(),u(),d}Vg.peek=Sv;function Vg(e){return e.value||""}function Sv(){return"<"}Wg.peek=Cv;function Wg(e,t,n,r){const i=Yd(n),s=i==='"'?"Quote":"Apostrophe",a=n.enter("image");let u=n.enter("label");const l=n.createTracker(r);let d=l.move("![");return d+=l.move(n.safe(e.alt,{before:d,after:"]",...l.current()})),d+=l.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),d+=l.move("<"),d+=l.move(n.safe(e.url,{before:d,after:">",...l.current()})),d+=l.move(">")):(u=n.enter("destinationRaw"),d+=l.move(n.safe(e.url,{before:d,after:e.title?" ":")",...l.current()}))),u(),e.title&&(u=n.enter(`title${s}`),d+=l.move(" "+i),d+=l.move(n.safe(e.title,{before:d,after:i,...l.current()})),d+=l.move(i),u()),d+=l.move(")"),a(),d}function Cv(){return"!"}qg.peek=Nv;function qg(e,t,n,r){const i=e.referenceType,s=n.enter("imageReference");let a=n.enter("label");const u=n.createTracker(r);let l=u.move("![");const d=n.safe(e.alt,{before:l,after:"]",...u.current()});l+=u.move(d+"]["),a();const f=n.stack;n.stack=[],a=n.enter("reference");const h=n.safe(n.associationId(e),{before:l,after:"]",...u.current()});return a(),n.stack=f,s(),i==="full"||!d||d!==h?l+=u.move(h+"]"):i==="shortcut"?l=l.slice(0,-1):l+=u.move("]"),l}function Nv(){return"!"}Qg.peek=Av;function Qg(e,t,n){let r=e.value||"",i="`",s=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++s<n.unsafe.length;){const a=n.unsafe[s],u=n.compilePattern(a);let l;if(a.atBreak)for(;l=u.exec(r);){let d=l.index;r.charCodeAt(d)===10&&r.charCodeAt(d-1)===13&&d--,r=r.slice(0,d)+" "+r.slice(l.index+1)}}return i+r+i}function Av(){return"`"}function Gg(e,t){const n=Id(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Kg.peek=vv;function Kg(e,t,n,r){const i=Yd(n),s=i==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let u,l;if(Gg(e,n)){const f=n.stack;n.stack=[],u=n.enter("autolink");let h=a.move("<");return h+=a.move(n.containerPhrasing(e,{before:h,after:">",...a.current()})),h+=a.move(">"),u(),n.stack=f,h}u=n.enter("link"),l=n.enter("label");let d=a.move("[");return d+=a.move(n.containerPhrasing(e,{before:d,after:"](",...a.current()})),d+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),d+=a.move("<"),d+=a.move(n.safe(e.url,{before:d,after:">",...a.current()})),d+=a.move(">")):(l=n.enter("destinationRaw"),d+=a.move(n.safe(e.url,{before:d,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=n.enter(`title${s}`),d+=a.move(" "+i),d+=a.move(n.safe(e.title,{before:d,after:i,...a.current()})),d+=a.move(i),l()),d+=a.move(")"),u(),d}function vv(e,t,n){return Gg(e,n)?"<":"["}Xg.peek=wv;function Xg(e,t,n,r){const i=e.referenceType,s=n.enter("linkReference");let a=n.enter("label");const u=n.createTracker(r);let l=u.move("[");const d=n.containerPhrasing(e,{before:l,after:"]",...u.current()});l+=u.move(d+"]["),a();const f=n.stack;n.stack=[],a=n.enter("reference");const h=n.safe(n.associationId(e),{before:l,after:"]",...u.current()});return a(),n.stack=f,s(),i==="full"||!d||d!==h?l+=u.move(h+"]"):i==="shortcut"?l=l.slice(0,-1):l+=u.move("]"),l}function wv(){return"["}function Vd(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 Iv(e){const t=Vd(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Lv(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 Jg(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 Dv(e,t,n,r){const i=n.enter("list"),s=n.bulletCurrent;let a=e.ordered?Lv(n):Vd(n);const u=e.ordered?a==="."?")":".":Iv(n);let l=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&f&&(!f.children||!f.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(l=!0),Jg(n)===a&&f){let h=-1;for(;++h<e.children.length;){const m=e.children[h];if(m&&m.type==="listItem"&&m.children&&m.children[0]&&m.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(a=u),n.bulletCurrent=a;const d=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=s,i(),d}function Rv(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 Ov(e,t,n,r){const i=Rv(n);let s=n.bulletCurrent||Vd(n);t&&t.type==="list"&&t.ordered&&(s=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+s);let a=s.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const u=n.createTracker(r);u.move(s+" ".repeat(a-s.length)),u.shift(a);const l=n.enter("listItem"),d=n.indentLines(n.containerFlow(e,u.current()),f);return l(),d;function f(h,m,p){return m?(p?"":" ".repeat(a))+h:(p?s:s+" ".repeat(a-s.length))+h}}function Pv(e,t,n,r){const i=n.enter("paragraph"),s=n.enter("phrasing"),a=n.containerPhrasing(e,r);return s(),i(),a}const Mv=cl(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Fv(e,t,n,r){return(e.children.some(function(a){return Mv(a)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Bv(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Zg.peek=jv;function Zg(e,t,n,r){const i=Bv(n),s=n.enter("strong"),a=n.createTracker(r),u=a.move(i+i);let l=a.move(n.containerPhrasing(e,{after:i,before:u,...a.current()}));const d=l.charCodeAt(0),f=Ou(r.before.charCodeAt(r.before.length-1),d,i);f.inside&&(l=Ks(d)+l.slice(1));const h=l.charCodeAt(l.length-1),m=Ou(r.after.charCodeAt(0),h,i);m.inside&&(l=l.slice(0,-1)+Ks(h));const p=a.move(i+i);return s(),n.attentionEncodeSurroundingInfo={after:m.outside,before:f.outside},u+l+p}function jv(e,t,n){return n.options.strong||"*"}function Uv(e,t,n,r){return n.safe(e.value,r)}function Hv(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 zv(e,t,n){const r=(Jg(n)+(n.options.ruleSpaces?" ":"")).repeat(Hv(n));return n.options.ruleSpaces?r.slice(0,-1):r}const eE={blockquote:dv,break:D0,code:Ev,definition:yv,emphasis:Yg,hardBreak:D0,heading:kv,html:Vg,image:Wg,imageReference:qg,inlineCode:Qg,link:Kg,linkReference:Xg,list:Dv,listItem:Ov,paragraph:Pv,root:Fv,strong:Zg,text:Uv,thematicBreak:zv};function $v(){return{enter:{table:Yv,tableData:R0,tableHeader:R0,tableRow:Wv},exit:{codeText:qv,table:Vv,tableData:oo,tableHeader:oo,tableRow:oo}}}function Yv(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function Vv(e){this.exit(e),this.data.inTable=void 0}function Wv(e){this.enter({type:"tableRow",children:[]},e)}function oo(e){this.exit(e)}function R0(e){this.enter({type:"tableCell",children:[]},e)}function qv(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Qv));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Qv(e,t){return t==="|"?t:e}function Gv(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,s=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
411
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:m,table:a,tableCell:l,tableRow:u}};function a(p,E,k,L){return d(f(p,k,L),p.align)}function u(p,E,k,L){const g=h(p,k,L),T=d([g]);return T.slice(0,T.indexOf(`
412
+ `))}function l(p,E,k,L){const g=k.enter("tableCell"),T=k.enter("phrasing"),x=k.containerPhrasing(p,{...L,before:s,after:s});return T(),g(),x}function d(p,E){return ov(p,{align:E,alignDelimiters:r,padding:n,stringLength:i})}function f(p,E,k){const L=p.children;let g=-1;const T=[],x=E.enter("table");for(;++g<L.length;)T[g]=h(L[g],E,k);return x(),T}function h(p,E,k){const L=p.children;let g=-1;const T=[],x=E.enter("tableRow");for(;++g<L.length;)T[g]=l(L[g],p,E,k);return x(),T}function m(p,E,k){let L=eE.inlineCode(p,E,k);return k.stack.includes("tableCell")&&(L=L.replace(/\|/g,"\\$&")),L}}function Kv(){return{exit:{taskListCheckValueChecked:O0,taskListCheckValueUnchecked:O0,paragraph:Jv}}}function Xv(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Zv}}}function O0(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Jv(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let s=-1,a;for(;++s<i.length;){const u=i[s];if(u.type==="paragraph"){a=u;break}}a===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function Zv(e,t,n,r){const i=e.children[0],s=typeof e.checked=="boolean"&&i&&i.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",u=n.createTracker(r);s&&u.move(a);let l=eE.listItem(e,t,n,{...r,...u.current()});return s&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,d)),l;function d(f){return f+a}}function ew(){return[DA(),ZA(),rv(),$v(),Kv()]}function tw(e){return{extensions:[RA(),ev(e),iv(),Gv(e),Xv()]}}const nw={tokenize:lw,partial:!0},tE={tokenize:ow,partial:!0},nE={tokenize:cw,partial:!0},rE={tokenize:dw,partial:!0},rw={tokenize:fw,partial:!0},iE={name:"wwwAutolink",tokenize:aw,previous:aE},sE={name:"protocolAutolink",tokenize:uw,previous:uE},Kn={name:"emailAutolink",tokenize:sw,previous:lE},On={};function iw(){return{text:On}}let Ar=48;for(;Ar<123;)On[Ar]=Kn,Ar++,Ar===58?Ar=65:Ar===91&&(Ar=97);On[43]=Kn;On[45]=Kn;On[46]=Kn;On[95]=Kn;On[72]=[Kn,sE];On[104]=[Kn,sE];On[87]=[Kn,iE];On[119]=[Kn,iE];function sw(e,t,n){const r=this;let i,s;return a;function a(h){return!kc(h)||!lE.call(r,r.previous)||Wd(r.events)?n(h):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),u(h))}function u(h){return kc(h)?(e.consume(h),u):h===64?(e.consume(h),l):n(h)}function l(h){return h===46?e.check(rw,f,d)(h):h===45||h===95||xt(h)?(s=!0,e.consume(h),l):f(h)}function d(h){return e.consume(h),i=!0,l}function f(h){return s&&i&&It(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(h)):n(h)}}function aw(e,t,n){const r=this;return i;function i(a){return a!==87&&a!==119||!aE.call(r,r.previous)||Wd(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(nw,e.attempt(tE,e.attempt(nE,s),n),n)(a))}function s(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function uw(e,t,n){const r=this;let i="",s=!1;return a;function a(h){return(h===72||h===104)&&uE.call(r,r.previous)&&!Wd(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(h),e.consume(h),u):n(h)}function u(h){if(It(h)&&i.length<5)return i+=String.fromCodePoint(h),e.consume(h),u;if(h===58){const m=i.toLowerCase();if(m==="http"||m==="https")return e.consume(h),l}return n(h)}function l(h){return h===47?(e.consume(h),s?d:(s=!0,l)):n(h)}function d(h){return h===null||wu(h)||Me(h)||Wr(h)||ul(h)?n(h):e.attempt(tE,e.attempt(nE,f),n)(h)}function f(h){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(h)}}function lw(e,t,n){let r=0;return i;function i(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),i):a===46&&r===3?(e.consume(a),s):n(a)}function s(a){return a===null?n(a):t(a)}}function ow(e,t,n){let r,i,s;return a;function a(d){return d===46||d===95?e.check(rE,l,u)(d):d===null||Me(d)||Wr(d)||d!==45&&ul(d)?l(d):(s=!0,e.consume(d),a)}function u(d){return d===95?r=!0:(i=r,r=void 0),e.consume(d),a}function l(d){return i||r||!s?n(d):t(d)}}function cw(e,t){let n=0,r=0;return i;function i(a){return a===40?(n++,e.consume(a),i):a===41&&r<n?s(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(rE,t,s)(a):a===null||Me(a)||Wr(a)?t(a):(e.consume(a),i)}function s(a){return a===41&&r++,e.consume(a),i}}function dw(e,t,n){return r;function r(u){return u===33||u===34||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===63||u===95||u===126?(e.consume(u),r):u===38?(e.consume(u),s):u===93?(e.consume(u),i):u===60||u===null||Me(u)||Wr(u)?t(u):n(u)}function i(u){return u===null||u===40||u===91||Me(u)||Wr(u)?t(u):r(u)}function s(u){return It(u)?a(u):n(u)}function a(u){return u===59?(e.consume(u),r):It(u)?(e.consume(u),a):n(u)}}function fw(e,t,n){return r;function r(s){return e.consume(s),i}function i(s){return xt(s)?n(s):t(s)}}function aE(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Me(e)}function uE(e){return!It(e)}function lE(e){return!(e===47||kc(e))}function kc(e){return e===43||e===45||e===46||e===95||xt(e)}function Wd(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const hw={tokenize:xw,partial:!0};function mw(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Tw,continuation:{tokenize:yw},exit:bw}},text:{91:{name:"gfmFootnoteCall",tokenize:Ew},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:pw,resolveTo:gw}}}}function pw(e,t,n){const r=this;let i=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;i--;){const l=r.events[i][1];if(l.type==="labelImage"){a=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return u;function u(l){if(!a||!a._balanced)return n(l);const d=bn(r.sliceSerialize({start:a.end,end:r.now()}));return d.codePointAt(0)!==94||!s.includes(d.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function gw(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},u=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...u),e}function Ew(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=0,a;return u;function u(h){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),l}function l(h){return h!==94?n(h):(e.enter("gfmFootnoteCallMarker"),e.consume(h),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",d)}function d(h){if(s>999||h===93&&!a||h===null||h===91||Me(h))return n(h);if(h===93){e.exit("chunkString");const m=e.exit("gfmFootnoteCallString");return i.includes(bn(r.sliceSerialize(m)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(h)}return Me(h)||(a=!0),s++,e.consume(h),h===92?f:d}function f(h){return h===91||h===92||h===93?(e.consume(h),s++,d):d(h)}}function Tw(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,a=0,u;return l;function l(E){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionLabelMarker"),d}function d(E){return E===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):n(E)}function f(E){if(a>999||E===93&&!u||E===null||E===91||Me(E))return n(E);if(E===93){e.exit("chunkString");const k=e.exit("gfmFootnoteDefinitionLabelString");return s=bn(r.sliceSerialize(k)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),m}return Me(E)||(u=!0),a++,e.consume(E),E===92?h:f}function h(E){return E===91||E===92||E===93?(e.consume(E),a++,f):f(E)}function m(E){return E===58?(e.enter("definitionMarker"),e.consume(E),e.exit("definitionMarker"),i.includes(s)||i.push(s),Ae(e,p,"gfmFootnoteDefinitionWhitespace")):n(E)}function p(E){return t(E)}}function yw(e,t,n){return e.check(aa,t,e.attempt(hw,t,n))}function bw(e){e.exit("gfmFootnoteDefinition")}function xw(e,t,n){const r=this;return Ae(e,i,"gfmFootnoteDefinitionIndent",5);function i(s){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(s):n(s)}}function _w(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:s,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(a,u){let l=-1;for(;++l<a.length;)if(a[l][0]==="enter"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._close){let d=l;for(;d--;)if(a[d][0]==="exit"&&a[d][1].type==="strikethroughSequenceTemporary"&&a[d][1]._open&&a[l][1].end.offset-a[l][1].start.offset===a[d][1].end.offset-a[d][1].start.offset){a[l][1].type="strikethroughSequence",a[d][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},a[d][1].start),end:Object.assign({},a[l][1].end)},h={type:"strikethroughText",start:Object.assign({},a[d][1].end),end:Object.assign({},a[l][1].start)},m=[["enter",f,u],["enter",a[d][1],u],["exit",a[d][1],u],["enter",h,u]],p=u.parser.constructs.insideSpan.null;p&&Jt(m,m.length,0,ll(p,a.slice(d+1,l),u)),Jt(m,m.length,0,[["exit",h,u],["enter",a[l][1],u],["exit",a[l][1],u],["exit",f,u]]),Jt(a,d-1,l-d+3,m),l=d+m.length-2;break}}for(l=-1;++l<a.length;)a[l][1].type==="strikethroughSequenceTemporary"&&(a[l][1].type="data");return a}function s(a,u,l){const d=this.previous,f=this.events;let h=0;return m;function m(E){return d===126&&f[f.length-1][1].type!=="characterEscape"?l(E):(a.enter("strikethroughSequenceTemporary"),p(E))}function p(E){const k=Di(d);if(E===126)return h>1?l(E):(a.consume(E),h++,p);if(h<2&&!n)return l(E);const L=a.exit("strikethroughSequenceTemporary"),g=Di(E);return L._open=!g||g===2&&!!k,L._close=!k||k===2&&!!g,u(E)}}}class kw{constructor(){this.map=[]}add(t,n,r){Sw(this,t,n,r)}consume(t){if(this.map.sort(function(s,a){return s[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const s of i)t.push(s);i=r.pop()}this.map.length=0}}function Sw(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function Cw(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const s=r.length-1;r[s]=r[s]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function Nw(){return{flow:{null:{name:"table",tokenize:Aw,resolveAll:vw}}}}function Aw(e,t,n){const r=this;let i=0,s=0,a;return u;function u(w){let V=r.events.length-1;for(;V>-1;){const se=r.events[V][1].type;if(se==="lineEnding"||se==="linePrefix")V--;else break}const X=V>-1?r.events[V][1].type:null,ce=X==="tableHead"||X==="tableRow"?C:l;return ce===C&&r.parser.lazy[r.now().line]?n(w):ce(w)}function l(w){return e.enter("tableHead"),e.enter("tableRow"),d(w)}function d(w){return w===124||(a=!0,s+=1),f(w)}function f(w){return w===null?n(w):oe(w)?s>1?(s=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),p):n(w):_e(w)?Ae(e,f,"whitespace")(w):(s+=1,a&&(a=!1,i+=1),w===124?(e.enter("tableCellDivider"),e.consume(w),e.exit("tableCellDivider"),a=!0,f):(e.enter("data"),h(w)))}function h(w){return w===null||w===124||Me(w)?(e.exit("data"),f(w)):(e.consume(w),w===92?m:h)}function m(w){return w===92||w===124?(e.consume(w),h):h(w)}function p(w){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(w):(e.enter("tableDelimiterRow"),a=!1,_e(w)?Ae(e,E,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):E(w))}function E(w){return w===45||w===58?L(w):w===124?(a=!0,e.enter("tableCellDivider"),e.consume(w),e.exit("tableCellDivider"),k):B(w)}function k(w){return _e(w)?Ae(e,L,"whitespace")(w):L(w)}function L(w){return w===58?(s+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(w),e.exit("tableDelimiterMarker"),g):w===45?(s+=1,g(w)):w===null||oe(w)?R(w):B(w)}function g(w){return w===45?(e.enter("tableDelimiterFiller"),T(w)):B(w)}function T(w){return w===45?(e.consume(w),T):w===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(w),e.exit("tableDelimiterMarker"),x):(e.exit("tableDelimiterFiller"),x(w))}function x(w){return _e(w)?Ae(e,R,"whitespace")(w):R(w)}function R(w){return w===124?E(w):w===null||oe(w)?!a||i!==s?B(w):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(w)):B(w)}function B(w){return n(w)}function C(w){return e.enter("tableRow"),I(w)}function I(w){return w===124?(e.enter("tableCellDivider"),e.consume(w),e.exit("tableCellDivider"),I):w===null||oe(w)?(e.exit("tableRow"),t(w)):_e(w)?Ae(e,I,"whitespace")(w):(e.enter("data"),D(w))}function D(w){return w===null||w===124||Me(w)?(e.exit("data"),I(w)):(e.consume(w),w===92?Y:D)}function Y(w){return w===92||w===124?(e.consume(w),D):D(w)}}function vw(e,t){let n=-1,r=!0,i=0,s=[0,0,0,0],a=[0,0,0,0],u=!1,l=0,d,f,h;const m=new kw;for(;++n<e.length;){const p=e[n],E=p[1];p[0]==="enter"?E.type==="tableHead"?(u=!1,l!==0&&(P0(m,t,l,d,f),f=void 0,l=0),d={type:"table",start:Object.assign({},E.start),end:Object.assign({},E.end)},m.add(n,0,[["enter",d,t]])):E.type==="tableRow"||E.type==="tableDelimiterRow"?(r=!0,h=void 0,s=[0,0,0,0],a=[0,n+1,0,0],u&&(u=!1,f={type:"tableBody",start:Object.assign({},E.start),end:Object.assign({},E.end)},m.add(n,0,[["enter",f,t]])),i=E.type==="tableDelimiterRow"?2:f?3:1):i&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(s[1]!==0&&(a[0]=a[1],h=Ra(m,t,s,i,void 0,h),s=[0,0,0,0]),a[2]=n)):E.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(a[0]=a[1],h=Ra(m,t,s,i,void 0,h)),s=a,a=[s[1],n,0,0])):E.type==="tableHead"?(u=!0,l=n):E.type==="tableRow"||E.type==="tableDelimiterRow"?(l=n,s[1]!==0?(a[0]=a[1],h=Ra(m,t,s,i,n,h)):a[1]!==0&&(h=Ra(m,t,a,i,n,h)),i=0):i&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")&&(a[3]=n)}for(l!==0&&P0(m,t,l,d,f),m.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=Cw(t.events,n))}return e}function Ra(e,t,n,r,i,s){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",u="tableContent";n[0]!==0&&(s.end=Object.assign({},ri(t.events,n[0])),e.add(n[0],0,[["exit",s,t]]));const l=ri(t.events,n[1]);if(s={type:a,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",s,t]]),n[2]!==0){const d=ri(t.events,n[2]),f=ri(t.events,n[3]),h={type:u,start:Object.assign({},d),end:Object.assign({},f)};if(e.add(n[2],0,[["enter",h,t]]),r!==2){const m=t.events[n[2]],p=t.events[n[3]];if(m[1].end=Object.assign({},p[1].end),m[1].type="chunkText",m[1].contentType="text",n[3]>n[2]+1){const E=n[2]+1,k=n[3]-n[2]-1;e.add(E,k,[])}}e.add(n[3]+1,0,[["exit",h,t]])}return i!==void 0&&(s.end=Object.assign({},ri(t.events,i)),e.add(i,0,[["exit",s,t]]),s=void 0),s}function P0(e,t,n,r,i){const s=[],a=ri(t.events,n);i&&(i.end=Object.assign({},a),s.push(["exit",i,t])),r.end=Object.assign({},a),s.push(["exit",r,t]),e.add(n+1,0,s)}function ri(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const ww={name:"tasklistCheck",tokenize:Lw};function Iw(){return{text:{91:ww}}}function Lw(e,t,n){const r=this;return i;function i(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),s)}function s(l){return Me(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),a):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),a):n(l)}function a(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),u):n(l)}function u(l){return oe(l)?t(l):_e(l)?e.check({tokenize:Dw},t,n)(l):n(l)}}function Dw(e,t,n){return Ae(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function Rw(e){return M1([iw(),mw(),_w(e),Nw(),Iw()])}const Ow={};function Pw(e){const t=this,n=e||Ow,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(Rw(n)),s.push(ew()),a.push(tw(n))}const Mw={search_file:{label:"Searched files",activeLabel:"Searching files",icon:Or,color:"#3b82f6"},search_files:{label:"Searched files",activeLabel:"Searching files",icon:Or,color:"#3b82f6"},search_file_content:{label:"Searched content",activeLabel:"Searching content",icon:Or,color:"#3b82f6"},search_directory:{label:"Searched directory",activeLabel:"Searching directory",icon:Or,color:"#3b82f6"},read_file:{label:"Read file",activeLabel:"Reading file",icon:In,color:"#8b5cf6"},write_file:{label:"Wrote file",activeLabel:"Writing file",icon:py,color:"#f59e0b"},get_file_info:{label:"Got file info",activeLabel:"Getting file info",icon:In,color:"#8b5cf6"},browse_directory:{label:"Browsed directory",activeLabel:"Browsing directory",icon:$n,color:"#a78bfa"},list_directory:{label:"Listed directory",activeLabel:"Listing directory",icon:$n,color:"#a78bfa"},list_recent_files:{label:"Listed recent files",activeLabel:"Listing recent files",icon:$n,color:"#a78bfa"},analyze_data_file:{label:"Analyzed data",activeLabel:"Analyzing data",icon:hh,color:"#ec4899"},run_shell_command:{label:"Ran command",activeLabel:"Running command",icon:Cu,color:"#22c55e"},execute_code:{label:"Executed code",activeLabel:"Executing code",icon:dy,color:"#f59e0b"},query_documents:{label:"Queried documents",activeLabel:"Querying documents",icon:ti,color:"#06b6d4"},query_specific_file:{label:"Queried file",activeLabel:"Querying file",icon:ti,color:"#06b6d4"},search_indexed_chunks:{label:"Searched chunks",activeLabel:"Searching chunks",icon:ti,color:"#06b6d4"},semantic_search:{label:"Searched documents",activeLabel:"Searching documents",icon:ti,color:"#06b6d4"},evaluate_retrieval:{label:"Evaluated retrieval",activeLabel:"Evaluating retrieval",icon:ti,color:"#06b6d4"},index_document:{label:"Indexed document",activeLabel:"Indexing document",icon:Ji,color:"#f97316"},index_directory:{label:"Indexed directory",activeLabel:"Indexing directory",icon:Ji,color:"#f97316"},index_file:{label:"Indexed file",activeLabel:"Indexing file",icon:Ji,color:"#f97316"},list_indexed_documents:{label:"Listed documents",activeLabel:"Listing documents",icon:Ji,color:"#f97316"},summarize_document:{label:"Summarized",activeLabel:"Summarizing",icon:In,color:"#8b5cf6"},dump_document:{label:"Extracted text",activeLabel:"Extracting text",icon:In,color:"#8b5cf6"},rag_status:{label:"Checked RAG status",activeLabel:"Checking RAG",icon:Ji,color:"#f97316"},add_watch_directory:{label:"Added watch dir",activeLabel:"Adding watch dir",icon:$n,color:"#a78bfa"},web_search:{label:"Searched web",activeLabel:"Searching web",icon:n1,color:"#14b8a6"},analyze_data:{label:"Analyzed data",activeLabel:"Analyzing data",icon:hh,color:"#ec4899"}},M0={label:"Used tool",activeLabel:"Using tool",icon:By,color:"#3b82f6"};function Fw(e){return e?e.startsWith("mcp_")?{label:"MCP tool",activeLabel:"Running MCP tool",icon:n1,color:"#7c3aed"}:Mw[e]||M0:M0}function Bw({steps:e,isActive:t,variant:n="inline"}){const[r,i]=_.useState(!1),[s,a]=_.useState(new Set),u=_.useRef(0),l=_.useRef(new Map),d=_.useRef(t);_.useEffect(()=>{d.current=t},[t]),_.useEffect(()=>()=>{l.current.forEach(C=>clearTimeout(C)),l.current.clear()},[]);const f=_.useMemo(()=>{const C=[];for(const I of e){const D=C[C.length-1];if(I.type==="thinking"&&D&&D.type==="thinking"){const Y=(D.detail||"")+(I.detail||"");C[C.length-1]={...I,detail:Y||D.detail};continue}if(I.type==="status"&&D&&D.type==="status"&&I.active!==!1){C[C.length-1]={...I,label:I.label||D.label};continue}if(I.type==="thinking"&&D&&D.type==="status"&&D.active!==!1){C[C.length-1]={...D,type:"thinking",detail:I.detail||D.detail,active:I.active};continue}if(I.type==="status"&&D&&D.type==="thinking"){C[C.length-1]={...D,label:I.label||D.label,active:I.active??D.active};continue}C.push(I)}return C},[e]),h=f.filter(C=>C.type==="tool"),[m,p]=_.useState(""),[E,k]=_.useState("all"),L=_.useMemo(()=>!m&&E==="all"?f:f.filter(C=>{var I;return C.type!=="tool"?!0:!(m&&!((I=C.tool)!=null&&I.toLowerCase().includes(m.toLowerCase()))||E==="success"&&C.success!==!0||E==="error"&&C.success!==!1)}),[f,m,E]),T=f.filter(C=>C.type==="error").length>0;_.useEffect(()=>{u.current=f.length;const C=f.filter(I=>I.type==="tool"&&!I.mcpServer).map(I=>I.id);C.length>0&&a(I=>{const D=new Set(I);return C.forEach(Y=>D.add(Y)),D})},[f]);const x=_.useCallback(C=>{const I=l.current.get(C);I&&(clearTimeout(I),l.current.delete(C)),a(D=>{const Y=new Set(D);return Y.has(C)?Y.delete(C):Y.add(C),Y})},[]);if(f.length===0)return null;const R=f.length,B=`${R} step${R!==1?"s":""}`+(h.length>0?` · ${h.length} tool${h.length!==1?"s":""}`:"");return o.jsxs("div",{className:`agent-activity ${n} ${t?"active":"done"} ${T?"has-errors":""}`,children:[o.jsxs("button",{className:"agent-summary-bar",onClick:()=>i(!r),"aria-expanded":r,"aria-label":r?"Collapse agent activity":"Expand agent activity",children:[o.jsxs("div",{className:"agent-summary-left",children:[T?o.jsx(xr,{size:14,className:"agent-icon-error"}):o.jsx(a1,{size:14,className:"agent-icon-done"}),o.jsx("span",{className:"agent-summary-text",children:B})]}),o.jsx("div",{className:"agent-summary-right",children:r?o.jsx(xd,{size:14}):o.jsx(ra,{size:14})})]}),f.length>0&&o.jsxs("div",{className:`agent-flow-wrap ${r?"flow-expanded":"flow-collapsed"}`,children:[r&&h.length>=2&&o.jsxs("div",{className:"activity-filter-bar",children:[o.jsx("input",{type:"text",className:"activity-filter-input",placeholder:"Filter by tool name...","aria-label":"Filter by tool name",value:m,onChange:C=>p(C.target.value)}),o.jsxs("select",{className:"activity-filter-select","aria-label":"Filter by status",value:E,onChange:C=>k(C.target.value),children:[o.jsx("option",{value:"all",children:"All"}),o.jsx("option",{value:"success",children:"Success"}),o.jsx("option",{value:"error",children:"Error"})]})]}),o.jsx("div",{className:"agent-flow",children:L.map(C=>C.type==="thinking"?o.jsx(jw,{step:C},C.id):C.type==="status"?o.jsx(Uw,{step:C},C.id):C.type==="tool"?o.jsx($w,{step:C,isExpanded:s.has(C.id),onToggle:()=>x(C.id)},C.id):C.type==="plan"?o.jsx(Yw,{step:C},C.id):C.type==="error"?o.jsx(Vw,{step:C},C.id):null)})]})]})}function jw({step:e}){const t=e.detail||e.label||"",n=_.useRef(null);return _.useEffect(()=>{e.active&&n.current&&(n.current.scrollTop=n.current.scrollHeight)},[t,e.active]),t?o.jsxs("div",{ref:n,className:"flow-thought-hacker",children:[o.jsx("span",{children:t}),e.active&&o.jsx("span",{className:"flow-thought-cursor"})]}):null}function Uw({step:e}){const t=e.detail||e.label||"";return t?o.jsx("div",{className:`flow-thought ${e.active?"active":""}`,children:o.jsx("span",{className:"flow-thought-text",children:t})}):null}function Hw(e){const t=/[A-Z]:[\\\/](?:[^\s*?"<>|,;)}\]]+[\\\/])*[^\s*?"<>|,;)}\]]*/gi,n=[];let r=0,i;for(;(i=t.exec(e))!==null;){i.index>r&&n.push(e.slice(r,i.index));const s=i[0],a=s.replace(/[)}\]]+$/,""),u=()=>{Sd(a).catch(l=>M.ui.error("Failed to open path",l))};n.push(o.jsxs("span",{className:"tool-result-path",onClick:u,title:`Open: ${a}`,role:"button",tabIndex:0,onKeyDown:l=>{l.key==="Enter"&&u()},children:[o.jsx($n,{size:10,style:{flexShrink:0,opacity:.7}}),a]},i.index)),a.length<s.length&&n.push(s.slice(a.length)),r=i.index+s.length}return n.length===0?e:(r<e.length&&n.push(e.slice(r)),o.jsx(o.Fragment,{children:n}))}function zw({fileList:e}){const[t,n]=_.useState(!1),r=5,i=t?e.files:e.files.slice(0,r),s=e.total-r,a=(l,d)=>{const f=l.name||l.filename||l.file_name;return f?String(f):l.file_path?String(l.file_path).replace(/\\/g,"/").split("/").pop()||`File ${d+1}`:`File ${d+1}`},u=l=>l.directory?String(l.directory):"";return o.jsxs("div",{className:"file-list-view",children:[i.map((l,d)=>o.jsxs("div",{className:"file-list-item",children:[o.jsx(e1,{size:11,className:"file-list-icon"}),o.jsx("span",{className:"file-list-name",children:a(l,d)}),u(l)&&o.jsx("span",{className:"file-list-dir",children:u(l)})]},d)),s>0&&!t&&o.jsxs("button",{className:"file-list-more",onClick:()=>n(!0),children:["+",s," more"]}),t&&e.files.length<e.total&&o.jsxs("span",{className:"file-list-truncated",children:["Showing ",e.files.length," of ",e.total," files"]})]})}function $w({step:e,isExpanded:t,onToggle:n}){var l,d;const r=Fw(e.tool),i=r.icon,s=r.color,a=e.active?r.activeLabel:r.label,u=!!(e.detail||e.result||e.commandOutput||(d=(l=e.fileList)==null?void 0:l.files)!=null&&d.length);return o.jsxs("div",{className:`flow-tool ${e.active?"active":""} ${e.success===!1?"error":""}`,children:[o.jsxs("button",{className:"flow-tool-header",onClick:u?n:void 0,style:u?void 0:{cursor:"default"},children:[o.jsxs("div",{className:"flow-tool-left",children:[e.active?o.jsx(Br,{size:13,className:"flow-tool-spinner",style:{color:s}}):e.success===!1?o.jsx(xr,{size:13,style:{color:"#ef4444"}}):e.success===!0?o.jsx(bd,{size:13,style:{color:"#22c55e"}}):o.jsx(i,{size:13,style:{color:s}}),o.jsx("span",{className:"flow-tool-label",children:a}),o.jsx("span",{className:"flow-tool-badge",style:{"--badge-color":s},children:e.tool}),e.mcpServer&&o.jsxs("span",{className:"flow-tool-mcp-server",children:["via ",e.mcpServer]})]}),o.jsxs("div",{className:"flow-tool-right",children:[e.latencyMs!=null&&!e.active&&o.jsxs("span",{className:"flow-tool-latency",children:[Math.round(e.latencyMs),"ms"]}),u&&o.jsx("span",{className:`flow-tool-chevron ${t?"expanded":""}`,children:o.jsx(ra,{size:12})})]})]}),t&&u&&o.jsxs("div",{className:"flow-tool-detail",children:[e.detail&&!e.commandOutput&&o.jsxs("div",{className:"step-detail-args",children:[o.jsx("span",{className:"detail-section-label",children:"Arguments"}),o.jsx("div",{className:"detail-args-content",children:Qw(e.detail)})]}),e.commandOutput&&o.jsx(qw,{output:e.commandOutput}),e.result&&!e.commandOutput&&o.jsxs("div",{className:`step-detail-result ${e.success===!1?"result-error":"result-success"}`,children:[o.jsx("span",{className:"detail-section-label",children:e.success===!1?"Error":"Result"}),o.jsx("div",{className:"detail-result-content",children:Hw(e.result)})]}),e.retrievalChunks&&e.retrievalChunks.length>0&&o.jsx(Ww,{chunks:e.retrievalChunks}),e.fileList&&e.fileList.files.length>0&&o.jsx(zw,{fileList:e.fileList})]})]})}function Yw({step:e}){const[t,n]=_.useState(!1);return!e.planSteps||e.planSteps.length===0?null:o.jsxs("div",{className:"flow-plan",children:[o.jsxs("button",{className:"flow-plan-header flow-plan-toggle",onClick:()=>n(r=>!r),"aria-expanded":t,title:t?"Collapse plan":"Expand plan",children:[o.jsx(xy,{size:12}),o.jsx("span",{children:"Plan"}),o.jsxs("span",{className:"flow-plan-count",children:["(",e.planSteps.length,")"]}),t?o.jsx(xd,{size:11}):o.jsx(ra,{size:11})]}),t&&o.jsx("ol",{className:"flow-plan-list",children:e.planSteps.map((r,i)=>o.jsx("li",{className:"flow-plan-item",children:r},i))})]})}function Vw({step:e}){return o.jsxs("div",{className:"flow-error",children:[o.jsx(xr,{size:13}),o.jsx("span",{children:e.detail||e.label||"An error occurred"})]})}function Ww({chunks:e}){const[t,n]=_.useState(new Set),r=i=>{n(s=>{const a=new Set(s);return a.has(i)?a.delete(i):a.add(i),a})};return o.jsxs("div",{className:"chunks-view",children:[o.jsxs("span",{className:"detail-section-label",children:["Retrieved Chunks (",e.length,")"]}),o.jsx("div",{className:"chunks-list",children:e.map(i=>{const s=t.has(i.id);return o.jsxs("div",{className:`chunk-card ${s?"expanded":""}`,children:[o.jsxs("button",{className:"chunk-header",onClick:()=>r(i.id),children:[o.jsxs("div",{className:"chunk-header-left",children:[o.jsx(ti,{size:11,style:{color:"#06b6d4",flexShrink:0}}),i.source&&o.jsx("span",{className:"chunk-source",children:i.source}),i.page!=null&&o.jsxs("span",{className:"chunk-page",children:["p.",i.page]}),i.score!=null&&i.score>0&&o.jsx("span",{className:"chunk-score",children:i.score.toFixed(2)})]}),o.jsx("span",{className:`chunk-chevron ${s?"expanded":""}`,children:o.jsx(ra,{size:11})})]}),o.jsx("div",{className:`chunk-body ${s?"show":""}`,children:s?o.jsx("pre",{className:"chunk-content",children:i.content}):o.jsx("div",{className:"chunk-preview",children:i.preview})})]},i.id)})})]})}function qw({output:e}){const[t,n]=_.useState(!1),r=_.useRef(null);_.useEffect(()=>()=>{r.current&&clearTimeout(r.current)},[]);const i=_.useCallback(()=>{const u=e.stdout||e.stderr||"";navigator.clipboard.writeText(u).catch(()=>{}),n(!0),r.current&&clearTimeout(r.current),r.current=setTimeout(()=>n(!1),2e3)},[e]),s=!!(e.stdout||e.stderr),a=e.returnCode!==0;return o.jsxs("div",{className:`cmd-output ${a?"cmd-error":""}`,children:[o.jsxs("div",{className:"cmd-header",children:[o.jsxs("div",{className:"cmd-header-left",children:[o.jsx(Cu,{size:12,className:"cmd-header-icon"}),o.jsx("span",{className:"cmd-header-title",children:"Terminal"}),e.cwd&&o.jsx("span",{className:"cmd-cwd",children:e.cwd})]}),o.jsxs("div",{className:"cmd-header-right",children:[e.durationSeconds!=null&&o.jsxs("span",{className:"cmd-duration",children:[e.durationSeconds.toFixed(1),"s"]}),e.returnCode!==0&&o.jsxs("span",{className:"cmd-exit-code",children:["exit ",e.returnCode]}),s&&o.jsx("button",{className:`cmd-copy ${t?"copied":""}`,onClick:i,title:t?"Copied!":"Copy output",children:t?o.jsx(na,{size:11}):o.jsx(tl,{size:11})})]})]}),o.jsxs("div",{className:"cmd-line",children:[o.jsx("span",{className:"cmd-prompt",children:"$"}),o.jsx("span",{className:"cmd-text",children:e.command})]}),e.stdout&&o.jsx("pre",{className:"cmd-stdout",children:e.stdout}),e.stderr&&o.jsx("pre",{className:"cmd-stderr",children:e.stderr}),e.truncated&&o.jsx("div",{className:"cmd-truncated",children:"Output was truncated (exceeded size limit)"}),!s&&o.jsx("div",{className:"cmd-empty",children:"No output"})]})}function Qw(e){const t=e.includes(`
413
+ `)?e.split(`
414
+ `).filter(Boolean):e.split(", ").filter(Boolean);return t.length<=1?o.jsx("span",{className:"arg-value",children:e}):o.jsx("div",{className:"args-grid",children:t.map((n,r)=>{const i=n.indexOf(":");if(i>0&&i<30){const s=n.slice(0,i).trim(),a=n.slice(i+1).trim();return o.jsxs("div",{className:"arg-row",children:[o.jsx("span",{className:"arg-key",children:s}),o.jsx("span",{className:"arg-value",children:a})]},r)}return o.jsx("div",{className:"arg-row",children:o.jsx("span",{className:"arg-value",children:n})},r)})})}function Gw({active:e}){const t="Thinking...",[n,r]=_.useState(0),[i,s]=_.useState("typing"),a=_.useRef(e);return _.useEffect(()=>{if(i!=="typing")return;if(n>=t.length){s("idle");return}const u=setTimeout(()=>r(l=>l+1),30);return()=>clearTimeout(u)},[i,n]),_.useEffect(()=>{a.current&&!e&&s("erasing"),a.current=e},[e]),_.useEffect(()=>{if(i!=="erasing")return;if(n<=0){s("done");return}const u=setTimeout(()=>r(l=>l-1),20);return()=>clearTimeout(u)},[i,n]),_.useEffect(()=>{e&&i==="done"&&(r(0),s("typing"))},[e,i]),i==="done"?null:o.jsxs("span",{className:"thinking-indicator",children:[o.jsx("span",{className:"thinking-indicator-text",children:t.slice(0,n)}),e&&o.jsx("span",{className:"cursor"})]})}function Kw(e){if(!e)return!1;const t=e.toLowerCase();return t.startsWith("error:")||t.startsWith("error -")||t.includes("traceback (most recent")||t.includes("object has no attribute")||t.includes("is lemonade server running")||t.includes("connection refused")||t.includes("failed to fetch")}const Xw=/\s*\{\s*"?tool"?\s*:\s*"[^"]+"\s*,\s*"?tool_args"?\s*:\s*\{[^}]*\}\s*\}/g;function Jw(e){const t=['"thought"','"answer"','"tool"'];let n="",r=0;for(;r<e.length;){const i=e.indexOf("{",r);if(i===-1){n+=e.slice(r);break}const s=e.slice(i,i+50);if(!t.some(f=>s.includes(f))){n+=e.slice(r,i+1),r=i+1;continue}n+=e.slice(r,i);let u=0,l=i;for(;l<e.length;l++)if(e[l]==="{")u++;else if(e[l]==="}"&&(u--,u===0))break;if(u!==0)break;const d=e.slice(i,l+1);try{const f=JSON.parse(d);f.answer&&(n+=f.answer)}catch{const f=d.indexOf('"answer"');if(f!==-1){const h=d.indexOf(":",f+8);if(h!==-1){let m=h+1;for(;m<d.length&&/\s/.test(d[m]);)m++;if(m<d.length&&d[m]==='"'){let p=d.slice(m+1);p.endsWith('"}')?p=p.slice(0,-2):p.endsWith('"')&&(p=p.slice(0,-1)),n+=p.replace(/\\"/g,'"').replace(/\\n/g,`
415
+ `).replace(/\\\\/g,"\\")}}}}r=l+1}return n}const Zw=new Set(["python","py","javascript","js","typescript","ts","java","c","cpp","csharp","cs","go","rust","ruby","rb","php","swift","kotlin","scala","r","perl","lua","bash","sh","zsh","powershell","ps1","sql","html","css","scss","sass","less","xml","json","yaml","yml","toml","ini","csv","markdown","md","dockerfile","docker","makefile","cmake","nginx","apache","graphql","proto","protobuf","jsx","tsx","vue","svelte","dart","elixir","ex","erlang","haskell","hs","ocaml","ml","fsharp","fs","clojure","clj","lisp","scheme","racket","zig","nim","crystal","julia","matlab","octave","fortran","cobol","pascal","delphi","ada","assembly","asm","nasm","wasm","solidity","sol","verilog","vhdl","text","txt","plaintext","diff","patch","log"]);function e6(e){return e.replace(/```(\w*)[ \t]*\n([\s\S]*?)```/g,(t,n,r)=>{const i=n.toLowerCase();return i&&Zw.has(i)?t:r.trim()})}function t6(e){if(!e)return e;let t=e;t=t.replace(Xw,""),t=Jw(t),t=t.replace(/<think>[\s\S]*?<\/think>/g,"");const n=(t.match(/\\n/g)||[]).length,r=(t.match(/\n/g)||[]).length;return n>2&&n>r*2&&(t=t.replace(/\\n/g,`
416
+ `),t=t.replace(/\\"/g,'"')),t=e6(t).trim(),t}function n6(e){if(!e)return"";const t=new Date(e),r=new Date().getTime()-t.getTime(),i=Math.floor(r/6e4);if(i<1)return"just now";if(i<60)return`${i}m ago`;const s=Math.floor(i/60);return s<24?`${s}h ago`:t.toLocaleString(void 0,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}function r6(e){return e?new Date(e).toLocaleString(void 0,{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit",hour12:!0}):""}function i6(e){return e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`}function F0({message:e,isStreaming:t,showTerminalCursor:n,agentSteps:r,agentStepsActive:i,onDelete:s,onResend:a,latencyMs:u,agentName:l}){var R,B,C;const d=e.role==="assistant"&&Kw(e.content),f=_.useMemo(()=>t6(e.content),[e.content]),[h,m]=_.useState(!1),[p,E]=_.useState(!1),k=_.useRef(null),L=_.useRef(null);_.useEffect(()=>()=>{k.current&&clearTimeout(k.current),L.current&&clearTimeout(L.current)},[]);const g=_.useCallback(()=>{var I;if((I=navigator.clipboard)!=null&&I.writeText)navigator.clipboard.writeText(e.content).catch(()=>{});else{const D=document.createElement("textarea");D.value=e.content,D.style.position="fixed",D.style.opacity="0",document.body.appendChild(D),D.select(),document.execCommand("copy"),document.body.removeChild(D)}m(!0),k.current&&clearTimeout(k.current),k.current=setTimeout(()=>m(!1),2e3)},[e.content]),T=_.useCallback(()=>{if(!p){E(!0),L.current&&clearTimeout(L.current),L.current=setTimeout(()=>E(!1),3e3);return}E(!1),L.current&&clearTimeout(L.current),s==null||s(e.id)},[p,e.id,s]),x=_.useCallback(()=>{a==null||a(e)},[e,a]);return o.jsx("div",{className:`msg msg-${e.role} ${d?"msg-error":""}`,children:o.jsxs("div",{className:"msg-inner",children:[o.jsxs("div",{className:"msg-header",children:[o.jsx("div",{className:"msg-header-left",children:e.role==="assistant"&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"msg-avatar msg-avatar-assistant","aria-hidden":"true",children:o.jsx("img",{src:b1,alt:""})}),o.jsx("span",{className:"msg-role-brand",children:"GAIA"}),l&&o.jsx("span",{className:"msg-role-agent",children:l}),(t||e.created_at)&&o.jsx("span",{className:"msg-header-sep",children:"|"}),t&&o.jsx(Gw,{active:!!i||!f}),!t&&e.created_at&&o.jsx("span",{className:"msg-timestamp",children:n6(e.created_at)})]})}),!t&&o.jsxs("div",{className:"msg-actions",children:[e.role==="user"&&a&&o.jsx("button",{className:"msg-action-btn",onClick:x,title:"Resend message","aria-label":"Resend message",children:o.jsx(i1,{size:12})}),o.jsx("button",{className:`msg-copy ${h?"copied":""}`,onClick:g,title:h?"Copied!":"Copy message","aria-label":h?"Copied to clipboard":"Copy message",children:h?o.jsx(na,{size:12}):o.jsx(tl,{size:12})}),s&&o.jsx("button",{className:`msg-action-btn msg-delete ${p?"confirm":""}`,onClick:T,title:p?"Click again to confirm":"Delete message","aria-label":p?"Confirm delete message":"Delete message",children:o.jsx(Nu,{size:12})})]})]}),o.jsxs("div",{className:"msg-body",children:[r&&r.length>0&&o.jsx(Bw,{steps:r,isActive:i??!1,variant:i?"inline":"summary"}),d&&o.jsxs("div",{className:"error-banner",children:[o.jsx(Vr,{size:14}),o.jsx("span",{children:"Something went wrong"})]}),o.jsx(c6,{content:f,showCursor:(t||n)&&!!f&&!i}),e.role==="assistant"&&!t&&(e.stats||u!=null||e.created_at)&&o.jsxs("div",{className:"msg-stats","aria-label":"Message performance stats",children:[e.created_at&&o.jsx("span",{className:"msg-stats-ts",title:"Message timestamp",children:r6(e.created_at)}),u!=null&&u>0&&o.jsx("span",{title:"Total response time",children:i6(u)}),((R=e.stats)==null?void 0:R.tokens_per_second)!=null&&e.stats.tokens_per_second>0&&o.jsxs("span",{title:"Tokens per second",children:[e.stats.tokens_per_second," tok/s"]}),((B=e.stats)==null?void 0:B.time_to_first_token)!=null&&e.stats.time_to_first_token>0&&o.jsxs("span",{title:"Time to first token",children:[(e.stats.time_to_first_token*1e3).toFixed(0),"ms TTFT"]}),((C=e.stats)==null?void 0:C.output_tokens)!=null&&e.stats.output_tokens>0&&o.jsxs("span",{title:"Input → output tokens",children:[(e.stats.input_tokens??0).toLocaleString()," → ",e.stats.output_tokens.toLocaleString()," tokens"]})]})]})]})})}function s6({lang:e,code:t}){const[n,r]=_.useState(!1),i=_.useRef(null);_.useEffect(()=>()=>{i.current&&clearTimeout(i.current)},[]);const s=_.useCallback(()=>{var a;if((a=navigator.clipboard)!=null&&a.writeText)navigator.clipboard.writeText(t).catch(()=>{});else{const u=document.createElement("textarea");u.value=t,u.style.position="fixed",u.style.opacity="0",document.body.appendChild(u),u.select(),document.execCommand("copy"),document.body.removeChild(u)}r(!0),i.current&&clearTimeout(i.current),i.current=setTimeout(()=>r(!1),2e3)},[t]);return o.jsxs("div",{className:"code-block",children:[o.jsxs("div",{className:"code-header",children:[o.jsx("span",{className:"code-lang",children:e||"code"}),o.jsxs("button",{className:`code-copy ${n?"copied":""}`,onClick:s,title:n?"Copied!":"Copy","aria-label":n?"Copied to clipboard":"Copy code",children:[n?o.jsx(na,{size:13}):o.jsx(tl,{size:13}),o.jsx("span",{children:n?"Copied":"Copy"})]})]}),o.jsx("pre",{children:o.jsx("code",{children:t})})]})}const a6=/[A-Z]:[\\\/](?:[^\s*?"<>|,;)}\]]+[\\\/])*[^\s*?"<>|,;)}\]]*\.\w{1,5}/gi,u6=/[A-Z]:[\\\/](?:[^\s*?"<>|,;)}\]]+[\\\/])+/gi;function l6({path:e}){const t=n=>{n.preventDefault(),Sd(e).catch(r=>{M.ui.error("Failed to open path",r)})};return o.jsxs("span",{className:"file-path-link",onClick:t,title:`Open in file explorer: ${e}`,role:"button",tabIndex:0,onKeyDown:n=>{(n.key==="Enter"||n.key===" ")&&(n.preventDefault(),t(n))},children:[o.jsx($n,{size:12,className:"file-path-icon"}),e]})}function o6(e){const t=new RegExp(`(${a6.source}|${u6.source})`,"gi"),n=[];let r=0,i;for(;(i=t.exec(e))!==null;)i.index>r&&n.push(e.slice(r,i.index)),n.push(o.jsx(l6,{path:i[0]},i.index)),r=t.lastIndex;return n.length===0?e:(r<e.length&&n.push(e.slice(r)),o.jsx(o.Fragment,{children:n}))}function tr(e){return vs.Children.map(e,t=>typeof t=="string"?o6(t):t)}function c6({content:e,showCursor:t}){return!e&&!t?null:!e&&t?o.jsx("span",{className:"cursor"}):o.jsxs("div",{className:"md-content",children:[o.jsx(c3,{remarkPlugins:[Pw],rehypePlugins:[NA],components:{code({className:n,children:r,...i}){return o.jsx("code",{className:"inline-code",...i,children:r})},pre({children:n}){var i,s;const r=vs.Children.toArray(n)[0];if(vs.isValidElement(r)&&(r.type==="code"||((i=r.props)==null?void 0:i.className)!==void 0||typeof((s=r.props)==null?void 0:s.children)=="string")){const a=r.props,u=(a==null?void 0:a.className)||"",l=/language-(\w+)/.exec(u),d=String((a==null?void 0:a.children)||"").replace(/\n$/,"");return o.jsx(s6,{lang:(l==null?void 0:l[1])||"",code:d})}return o.jsx("pre",{children:n})},table({children:n}){return o.jsx("div",{className:"md-table-wrap",children:o.jsx("table",{className:"md-table",children:n})})},a({href:n,children:r}){return o.jsx("a",{href:n,target:"_blank",rel:"noopener noreferrer",className:"md-link",children:r})},p({children:n}){return o.jsx("p",{className:"md-p",children:tr(n)})},h1({children:n}){return o.jsx("h2",{className:"md-h2",children:tr(n)})},h2({children:n}){return o.jsx("h3",{className:"md-h3",children:tr(n)})},h3({children:n}){return o.jsx("h4",{className:"md-h4",children:tr(n)})},ul({children:n}){return o.jsx("ul",{className:"md-ul",children:n})},ol({children:n}){return o.jsx("ol",{className:"md-ol",children:n})},li({children:n}){return o.jsx("li",{className:"md-li",children:tr(n)})},blockquote({children:n}){return o.jsx("blockquote",{className:"md-blockquote",children:tr(n)})},hr(){return o.jsx("hr",{className:"md-hr"})},td({children:n}){return o.jsx("td",{children:tr(n)})},th({children:n}){return o.jsx("th",{children:tr(n)})}},children:e}),t&&o.jsx("span",{className:"cursor"})]})}const d6=500,Pu="gaia_always_allow_tools",Mu=f1((e,t)=>({notifications:[],showPanel:!1,typeFilter:null,addNotification:n=>e(r=>({notifications:[n,...r.notifications].slice(0,d6)})),dismiss:n=>e(r=>({notifications:r.notifications.map(i=>i.id===n?{...i,dismissed:!0}:i)})),markRead:n=>e(r=>({notifications:r.notifications.map(i=>i.id===n?{...i,read:!0}:i)})),markAllRead:()=>e(n=>({notifications:n.notifications.map(r=>({...r,read:!0}))})),clearAll:()=>e({notifications:[]}),setShowPanel:n=>e({showPanel:n}),setTypeFilter:n=>e({typeFilter:n}),respondToPermission:async(n,r,i)=>{var l;const s=t().notifications.find(d=>d.id===n),a=s==null?void 0:s.agentId,u=window.gaiaAPI;if((l=u==null?void 0:u.notification)!=null&&l.respondPermission)try{await u.notification.respondPermission(n,r,i)}catch(d){console.error("[notificationStore] Failed to send permission response via IPC:",d);return}else if(a)try{await g1(a,r==="allow")}catch(d){console.error("[notificationStore] Failed to send permission response via REST:",d);return}if(r==="allow"&&i&&s!=null&&s.tool){const d=JSON.parse(localStorage.getItem(Pu)||"[]");d.includes(s.tool)||(d.push(s.tool),localStorage.setItem(Pu,JSON.stringify(d)))}e(d=>({notifications:d.notifications.map(f=>f.id===n?{...f,response:r,respondedAt:Date.now(),read:!0}:f)}))}})),f6=e=>e.notifications.find(t=>t.type==="permission_request"&&!t.response&&!t.dismissed)??null,oE="https://github.com/amd/gaia/issues/new",h6=[{label:"Image",extensions:new Set([".jpg",".jpeg",".png",".gif",".bmp",".tiff",".webp",".ico",".heic",".heif"]),message:"Image files cannot be indexed for text search.",alternatives:["Index PDFs that contain images — text is extracted automatically","Paste image descriptions or OCR text directly into the chat","Use GAIA's VLM agent for image analysis: gaia vlm"],featureTitle:"Support image file indexing and OCR"},{label:"Video",extensions:new Set([".mp4",".avi",".mkv",".mov",".wmv",".flv",".webm",".m4v"]),message:"Video files are not supported for indexing.",alternatives:["Extract subtitles or transcripts from videos and index those","Use GAIA's voice/talk mode for audio: gaia talk"],featureTitle:"Support video file indexing"},{label:"Audio",extensions:new Set([".mp3",".wav",".flac",".aac",".ogg",".wma",".m4a",".opus"]),message:"Audio files are not supported for indexing.",alternatives:["Use GAIA's voice mode for speech interaction: gaia talk","Transcribe audio to text first, then index the transcript"],featureTitle:"Support audio file transcription and indexing"},{label:"Archive",extensions:new Set([".zip",".rar",".7z",".tar",".gz",".bz2",".xz",".tgz"]),message:"Archive files must be extracted before indexing.",alternatives:["Extract the archive contents to a folder","Then index the folder or individual files from the Document Library"],featureTitle:"Support automatic archive extraction for indexing"},{label:"Executable",extensions:new Set([".exe",".msi",".dll",".so",".app",".dmg",".bin",".com"]),message:"Executable and binary files cannot be indexed.",alternatives:["Index source code files (.py, .js, .ts, .java, etc.) instead","Index documentation or README files from the project"],featureTitle:"Support binary file analysis"},{label:"Database",extensions:new Set([".sqlite",".db",".mdb",".accdb",".dbf"]),message:"Database files are not supported for direct indexing.",alternatives:["Export data to CSV or JSON format, then index those files","Use SQL queries to extract relevant data to a text file"],featureTitle:"Support database file indexing"},{label:"Microsoft Office",extensions:new Set([".doc",".docx",".ppt",".pptx",".xls"]),message:"Word, PowerPoint, and legacy Excel (.xls) files are not yet supported — GAIA does not currently ship parsers for these formats.",alternatives:["Save as PDF from Word or PowerPoint, then index the PDF","Re-save legacy .xls workbooks as .xlsx — GAIA supports modern Excel files"],featureTitle:"Support Microsoft Office (docx, pptx, xls) indexing"}];function Fu(e){const t=e.toLowerCase().startsWith(".")?e.toLowerCase():`.${e.toLowerCase()}`;for(const n of h6)if(n.extensions.has(t))return n;return null}const m6=new Set([".pdf",".txt",".md",".csv",".json",".xlsx",".html",".htm",".xml",".svg",".yaml",".yml",".py",".js",".ts",".java",".c",".cpp",".h",".rs",".go",".rb",".sh",".bat",".ps1",".log",".cfg",".ini",".toml"]);function Sc(e){const t=e.toLowerCase().startsWith(".")?e.toLowerCase():`.${e.toLowerCase()}`;return m6.has(t)}function cE(){const e="0.17.2",t=navigator.userAgent,n=navigator.platform||"unknown";return`**Environment:**
417
+ - GAIA Version: ${e}
418
+ - Platform: ${n}
419
+ - User Agent: ${t}
420
+ - Interface: Agent UI (Web)`}function B0(e,t){const n=["## Feature Description","",`I would like GAIA to support: **${e}**`,"","## Use Case","","_Describe how you would use this feature:_","","## Current Workaround","","_Is there a workaround you are currently using?_","","---",cE(),"","_Submitted from GAIA Agent UI_"].join(`
421
+ `),r=new URLSearchParams({title:`[Feature] ${e}`,body:n,labels:"enhancement,agent-ui"});return`${oE}?${r.toString()}`}function Cc(e,t){const n=["## Bug Description","",e,"","## Steps to Reproduce","","1. Open GAIA Agent UI","2. _Describe what you did:_","3. ","","## Expected Behavior","","_What did you expect to happen?_","","## Actual Behavior","","_What happened instead?_","","---",cE(),"","_Submitted from GAIA Agent UI_"].join(`
422
+ `),r=new URLSearchParams({title:`[Bug] ${e}`,body:n,labels:"bug,agent-ui"});return`${oE}?${r.toString()}`}function dE({filename:e,error:t,onDismiss:n,timeout:r=15e3}){var p;const i=_.useRef(null);_.useEffect(()=>(r>0&&(i.current=setTimeout(n,r)),()=>{i.current&&clearTimeout(i.current)}),[n,r]);const s=e.includes(".")?"."+((p=e.split(".").pop())==null?void 0:p.toLowerCase()):"",a=s?Fu(s):null,u=t.toLowerCase().includes("unsupported file type")||t.toLowerCase().includes("not supported for indexing")||a!==null,l=t.toLowerCase().includes("fetch")||t.toLowerCase().includes("network")||t.toLowerCase().includes("connect");let d,f,h,m=xr;return u&&a?(d=`${a.label} files not supported`,f=a.message,h=B0(a.featureTitle),m=Vr):u?(d=`File type not supported: ${s}`,f="This file format cannot be indexed. Supported: PDF, TXT, MD, CSV, JSON, XLSX, HTML, XML, YAML, and 30+ code file formats.",h=B0(`Support ${s} file indexing`),m=Vr):l?(d="Connection error",f="Could not reach the GAIA server. Make sure the backend is running.",h=Cc(`Upload connection error for ${e}`),m=xr):(d=`Failed to index "${e}"`,f=t||"An unexpected error occurred during indexing.",h=Cc(`Indexing error: ${t.slice(0,80)}`),m=cy),o.jsxs("div",{className:"upload-error-toast",role:"alert",children:[o.jsx(m,{size:16}),o.jsxs("div",{className:"upload-error-content",children:[o.jsx("div",{className:"upload-error-title",children:d}),o.jsxs("div",{className:"upload-error-detail",children:[f," ",u?o.jsx("a",{href:h,target:"_blank",rel:"noopener noreferrer",children:"Request this feature →"}):o.jsx("a",{href:h,target:"_blank",rel:"noopener noreferrer",children:"Report this issue →"})]})]}),o.jsx("button",{className:"upload-error-dismiss",onClick:n,"aria-label":"Dismiss",children:o.jsx(bt,{size:14})})]})}const p6=["Summarize a document","Find a file on my computer","Analyze a spreadsheet","Show my recent files"],g6=/\s*\{\s*"?(?:tool|thought|goal)"?\s*:\s*"[^"]*"[^}]*(?:"?tool_args"?\s*:\s*\{[^}]*\})?\s*\}/g;function E6(e){const t=e.trim();if(!t.startsWith("{")||!t.includes('"thought"')&&!t.includes('"answer"')&&!t.includes('"goal"'))return e;try{const a=JSON.parse(t);if(a.answer!==void 0)return String(a.answer)}catch{}const n=t.indexOf('"answer"');if(n===-1)return"";const r=t.indexOf(":",n+8);if(r===-1)return"";let i=r+1;for(;i<t.length&&/\s/.test(t[i]);)i++;if(i>=t.length||t[i]!=='"')return"";let s=t.slice(i+1);return s.endsWith('"}')?s=s.slice(0,-2):s.endsWith('"')&&(s=s.slice(0,-1)),s.replace(/\\"/g,'"').replace(/\\n/g,`
423
+ `).replace(/\\\\/g,"\\")}function co(e,t){var i;const n=++t.current,r=Date.now();switch(e.type){case"thinking":return{id:n,type:"thinking",label:"Thinking",detail:e.content,active:!0,timestamp:r};case"tool_start":return{id:n,type:"tool",label:"Using tool",tool:e.tool,detail:e.detail,active:!0,timestamp:r,mcpServer:e.mcp_server};case"plan":return{id:n,type:"plan",label:"Created plan",planSteps:e.steps,active:!1,success:!0,timestamp:r};case"step":return{id:n,type:"status",label:`Step ${e.step}${e.total?` of ${e.total}`:""}`,active:!0,timestamp:r};case"status":return(i=e.message)!=null&&i.startsWith("Agent: ")?null:{id:n,type:"status",label:e.message||e.status||"Working",active:e.status==="working",timestamp:r};case"agent_error":return{id:n,type:"error",label:"Error",detail:e.content,success:!1,active:!1,timestamp:r};default:return null}}function T6({sessionId:e,onCreateAgent:t,onAgentChange:n}){var Zd,ef,tf;const{sessions:r,messages:i,setMessages:s,addMessage:a,removeMessage:u,removeMessagesFrom:l,updateSessionInList:d,isStreaming:f,streamingContent:h,setStreaming:m,setStreamContent:p,clearStreamContent:E,agentSteps:k,addAgentStep:L,updateLastAgentStep:g,appendThinkingContent:T,updateLastToolStep:x,clearAgentSteps:R,documents:B,setDocuments:C,setShowDocLibrary:I,setShowFileBrowser:D,isLoadingMessages:Y,setLoadingMessages:w,systemStatus:V,agents:X,activeAgentId:ce,setActiveAgentId:se}=Ce(),{addNotification:de}=Mu(),ae=r.find(O=>O.id===e),Te=new Set((ae==null?void 0:ae.document_ids)??[]),v=B.filter(O=>Te.has(O.id)),[F,y]=_.useState(""),[ee,le]=_.useState(!1),[N,Ee]=_.useState(""),[Se,pe]=_.useState(!1),[Qe,Ct]=_.useState(!1),[Nt,j]=_.useState([]),[q,z]=_.useState([]),[ue,fe]=_.useState(!1),[me,Ne]=_.useState(null),[it,At]=_.useState(!1),Ot=_.useRef(null),we=(ae==null?void 0:ae.agent_type)||ce,Xe=(Zd=X.find(O=>O.id===(ae==null?void 0:ae.agent_type)))==null?void 0:Zd.name,nn=(ef=X.find(O=>O.id===ce))==null?void 0:ef.name;_.useEffect(()=>{if(!it)return;const O=J=>{Ot.current&&!Ot.current.contains(J.target)&&At(!1)};return document.addEventListener("mousedown",O),()=>document.removeEventListener("mousedown",O)},[it]);const Pn=_.useCallback(async O=>{if(At(!1),O===we)return;const J=we;if(se(O),i.length===0){d(e,{agent_type:O});try{await Wl(e,{agent_type:O})}catch{d(e,{agent_type:J}),se(J)}}else n==null||n(O)},[we,i.length,e,se,d,n]),[Mn,ca]=_.useState(!1),H=_.useRef(""),K=_.useRef([]),he=_.useRef(!1);_.useEffect(()=>{h&&(H.current=h)},[h]),_.useEffect(()=>{k.length>0&&(K.current=k.map(O=>({...O,active:!1})))},[k]),_.useEffect(()=>{if(!f&&he.current){ca(!0);const O=setTimeout(()=>{ca(!1),H.current="",K.current=[]},350);return()=>clearTimeout(O)}he.current=f},[f]);const ye=_.useRef(null),Le=_.useRef(null),Je=_.useRef(null),vt=_.useRef(null),Pt=_.useRef(0),kn=_.useRef(!1),Xn=_.useRef(()=>{}),Ye=_.useRef(""),Ge=_.useRef(null),gt=_.useRef(null),Qd=_.useRef(0),da=_.useRef(!0),Gd=_.useCallback(()=>{Ge.current=null,Ye.current&&p(Ye.current)},[p]),El=_.useRef(null),Xr=_.useRef(0);_.useEffect(()=>{M.chat.info(`ChatView mounted for session=${e}, loading messages...`);const O=M.chat.time();w(!0);let J=!1;const te=(ne=!1)=>{ls(e).then(be=>{if(J)return;const Ie=(be.messages||[]).map(Mt=>({...Mt,agentSteps:Mt.agentSteps||Mt.agent_steps||void 0,stats:Mt.stats||Mt.inference_stats||void 0}));ne?(s(Ie),Xr.current=Ie.length,M.chat.timed(`Loaded ${Ie.length} message(s) for session=${e}`,O)):Ie.length!==Xr.current&&!Ce.getState().isStreaming&&(M.chat.info(`Messages changed externally: ${Xr.current} -> ${Ie.length}`),s(Ie),Xr.current=Ie.length)}).catch(be=>{J||ne&&(M.chat.error(`Failed to load messages for session=${e}`,be),s([]))}).finally(()=>{!J&&ne&&w(!1)})};return te(!0),El.current=setInterval(()=>te(!1),3e3),()=>{J=!0,El.current&&clearInterval(El.current)}},[e,s,w]),_.useEffect(()=>{ni().then(O=>C(O.documents||[])).catch(()=>{})},[C]),_.useEffect(()=>{const O=Ce.getState().pendingPrompt;O&&(M.chat.info(`Consuming pending prompt: "${O.slice(0,60)}"`),Ce.getState().setPendingPrompt(null),y(O),requestAnimationFrame(()=>Xn.current(O)))},[e]),_.useEffect(()=>{if(!da.current)return;const J=Date.now()-Qd.current,te=100,ne=()=>{var be;Qd.current=Date.now(),(be=ye.current)==null||be.scrollIntoView({behavior:"smooth"})};J>=te&&ne(),gt.current&&clearTimeout(gt.current),gt.current=setTimeout(ne,te)},[i,h,k]),_.useEffect(()=>{var O;(O=Je.current)==null||O.focus()},[e]),_.useEffect(()=>()=>{vt.current&&(vt.current.abort(),vt.current=null),Ge.current!==null&&(cancelAnimationFrame(Ge.current),Ge.current=null),gt.current&&(clearTimeout(gt.current),gt.current=null),Ye.current="",z(O=>(O.forEach(J=>{J.url&&URL.revokeObjectURL(J.url)}),[]))},[e]);const mE=_.useCallback(()=>{const O=Le.current;if(!O)return;const J=O.scrollHeight-O.scrollTop-O.clientHeight;da.current=J<=80,Ct(J>200)},[]),pE=_.useCallback(()=>{var O;da.current=!0,(O=ye.current)==null||O.scrollIntoView({behavior:"smooth"})},[]),Tl=_.useCallback(()=>{M.stream.warn("User stopped generation"),vt.current&&(vt.current.abort(),vt.current=null),Ge.current!==null&&(cancelAnimationFrame(Ge.current),Ge.current=null);const O=Ce.getState(),J=Ye.current||O.streamingContent;if(J){M.stream.info(`Saving partial response (${J.length} chars)`);const te=O.agentSteps,ne={id:Date.now()+1,session_id:e,role:"assistant",content:J,created_at:new Date().toISOString(),rag_sources:null,agentSteps:te.length>0?[...te]:void 0};a(ne)}Ye.current="",m(!1),E(),j([]),R()},[e,a,m,E,R]);_.useEffect(()=>{const O=J=>{J.key==="Escape"&&f&&(J.preventDefault(),Tl()),J.key==="k"&&(J.ctrlKey||J.metaKey)&&(J.preventDefault(),window.dispatchEvent(new CustomEvent("gaia:focus-search")))};return window.addEventListener("keydown",O),()=>window.removeEventListener("keydown",O)},[f,Tl]);const gE=O=>{y(O.target.value);const J=O.target;J.style.height="auto",J.style.height=Math.min(J.scrollHeight,200)+"px"},EE=_.useCallback(async O=>{var ne;const J=(ne=O.clipboardData)==null?void 0:ne.items;if(!J)return;const te=[];for(const be of Array.from(J))be.type.startsWith("image/")&&te.push(be);if(te.length!==0){O.preventDefault();for(const be of te){const Ie=be.getAsFile();if(!Ie)continue;const Mt=`attach-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,$i=URL.createObjectURL(Ie),ut={id:Mt,file:Ie,name:Ie.name||`screenshot-${new Date().toISOString().slice(0,19).replace(/[T:]/g,"-")}.png`,url:$i,uploading:!0,uploaded:!1,isImage:!0};z(Vt=>[...Vt,ut]),M.chat.info(`Pasted image: ${ut.name} (${Ie.size} bytes)`);try{const Vt=await yh(Ie);z(Wt=>Wt.map(Z=>Z.id===Mt?{...Z,uploading:!1,uploaded:!0,serverUrl:Vt.url}:Z)),M.chat.info(`Upload complete: ${ut.name} -> ${Vt.url}`)}catch(Vt){M.chat.error(`Upload failed: ${ut.name}`,Vt),z(Wt=>Wt.map(Z=>Z.id===Mt?{...Z,uploading:!1,error:"Upload failed"}:Z))}}}},[]),TE=_.useCallback(async O=>{var te;O.preventDefault(),O.stopPropagation(),pe(!1);const J=(te=O.dataTransfer)==null?void 0:te.files;if(!(!J||J.length===0))for(const ne of Array.from(J)){const be=ne.type.startsWith("image/"),Ie=`attach-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,Mt=be?URL.createObjectURL(ne):"",$i={id:Ie,file:ne,name:ne.name,url:Mt,uploading:!0,uploaded:!1,isImage:be};z(ut=>[...ut,$i]),M.chat.info(`Dropped file: ${ne.name} (${ne.size} bytes, image=${be})`);try{const ut=await yh(ne);z(Vt=>Vt.map(Wt=>Wt.id===Ie?{...Wt,uploading:!1,uploaded:!0,serverUrl:ut.url}:Wt)),M.chat.info(`Upload complete: ${ne.name} -> ${ut.url}`)}catch(ut){M.chat.error(`Upload failed: ${ne.name}`,ut),z(Vt=>Vt.map(Wt=>Wt.id===Ie?{...Wt,uploading:!1,error:"Upload failed"}:Wt))}}},[]),yE=_.useCallback(O=>{z(J=>{const te=J.find(ne=>ne.id===O);return te!=null&&te.url&&URL.revokeObjectURL(te.url),J.filter(ne=>ne.id!==O)})},[]),Jr=_.useCallback(async O=>{const J=(O||F).trim(),te=q.length>0&&q.some(Z=>Z.uploaded);da.current=!0;const ne=(V==null?void 0:V.init_state)==="initializing";if(!J&&!te||f||ne){!J&&!te&&M.chat.debug("Send blocked: empty message"),f&&M.chat.debug("Send blocked: already streaming"),ne&&M.chat.debug("Send blocked: system initializing");return}let be=J;const Ie=q.filter(Z=>Z.uploaded&&Z.serverUrl);if(Ie.length>0){const Z=Ie.map(Fe=>Fe.isImage?`![${Fe.name}](${Fe.serverUrl})`:`[${Fe.name}](${Fe.serverUrl})`).join(`
424
+ `);be=be?`${be}
425
+
426
+ ${Z}`:Z}M.chat.info(`Sending message to session=${e}`,{length:be.length,preview:be.slice(0,80)}),y(""),Je.current&&(Je.current.style.height="auto",Je.current.focus()),z(Z=>(Z.forEach(Fe=>{Fe.url&&URL.revokeObjectURL(Fe.url)}),[]));const Mt={id:Date.now(),session_id:e,role:"user",content:be,created_at:new Date().toISOString(),rag_sources:null};a(Mt),m(!0),E(),R(),j([]),Pt.current=0,kn.current=!1,M.stream.info("Starting agent stream...");const $i=M.stream.time();let ut="",Vt=!1;Ye.current="";const Wt=xb(e,be,{onChunk:Z=>{const Fe=Z.content||"";if(Fe){Z.type==="answer"?ut=Fe:(kn.current&&ut.length>0&&(ut+=`
427
+
428
+ `,kn.current=!1),ut+=Fe);let Oe=ut.replace(g6,"").trim();if(Oe=E6(Oe),Oe){const Ze=Oe.lastIndexOf("{");if(Ze>-1){const qt=Oe.slice(Ze);/^\{\s*"(?:thought|answer|goal|tool)"/.test(qt)&&(qt.match(/\{/g)||[]).length>(qt.match(/\}/g)||[]).length&&(Oe=Oe.slice(0,Ze).trim())}}Ye.current=Oe,Ge.current===null&&(Ge.current=requestAnimationFrame(Gd))}},onAgentEvent:Z=>{var Oe,Ze,qt;if(Z.type==="tool_confirm"){if(!Z.confirm_id){console.error("[ChatView] tool_confirm event missing confirm_id, ignoring");return}const Pe=Z.tool||"";if(JSON.parse(localStorage.getItem(Pu)||"[]").includes(Pe)){_b(e,Z.confirm_id,"allow",!1).catch(Sn=>console.error("[ChatView] auto-confirm failed:",Sn));return}const Fn={id:Z.confirm_id,type:"permission_request",agentId:"chat",agentName:"GAIA",title:`Allow ${Pe}?`,message:`The agent wants to execute: ${Pe}`,timestamp:Date.now(),read:!1,dismissed:!1,priority:"high",tool:Pe,toolArgs:Z.args,timeoutSeconds:Z.timeout_seconds??60};de(Fn);return}if(Z.type==="permission_request"){const Pe=Z.tool||"";if(JSON.parse(localStorage.getItem(Pu)||"[]").includes(Pe)){g1(e,!0).catch(Sn=>console.error("[ChatView] auto-confirm failed:",Sn));return}const{addNotification:Fn}=Mu.getState();Fn({id:Z.confirm_id??`perm-${Date.now()}`,type:"permission_request",agentId:e,agentName:"GAIA",title:`Allow ${Pe}?`,message:`The agent wants to execute: ${Pe}`,timestamp:Date.now(),read:!1,dismissed:!1,priority:"high",tool:Pe,toolArgs:Z.args,timeoutSeconds:Z.timeout_seconds??60});return}if(Z.type==="tool_end"){x({active:!1,success:Z.success!==!1});return}if(Z.type==="tool_result"){const Pe={result:Z.summary||Z.title||"Done",active:!1,success:Z.success!==!1,latencyMs:Z.latency_ms};Z.command_output&&(Pe.commandOutput={command:Z.command_output.command,stdout:Z.command_output.stdout,stderr:Z.command_output.stderr,returnCode:Z.command_output.return_code,cwd:Z.command_output.cwd,durationSeconds:Z.command_output.duration_seconds,truncated:Z.command_output.truncated}),(Oe=Z.result_data)!=null&&Oe.chunks&&Z.result_data.chunks.length>0&&(Pe.retrievalChunks=Z.result_data.chunks.map(ft=>({id:ft.id,source:ft.source,sourcePath:ft.sourcePath,page:ft.page,score:ft.score,preview:ft.preview,content:ft.content}))),((Ze=Z.result_data)==null?void 0:Ze.type)==="file_list"&&((qt=Z.result_data.files)==null?void 0:qt.length)>0&&(Pe.fileList={files:Z.result_data.files,total:Z.result_data.total??Z.result_data.files.length}),x(Pe);return}if(Z.type==="tool_args"){x({detail:Z.detail||JSON.stringify(Z.args)});return}if(Z.type==="thinking"){const Pe=Ce.getState().agentSteps,ft=Pe[Pe.length-1];if(ft&&ft.type==="thinking"){T(Z.content||"");return}const Fn=co(Z,Pt);Fn&&L(Fn);return}if(Z.type==="status"){const Pe=Z.status,ft=(Z.message||"").trim();if(ft.toLowerCase().startsWith("executing "))return;if(Pe==="working"||Pe==="warning"||Pe==="info"){const Fn=Ce.getState().agentSteps,Sn=Fn[Fn.length-1];if(Sn&&Sn.type==="status"&&Sn.active){g({label:ft||"Working",detail:ft});return}if(Sn&&Sn.type==="thinking"&&Sn.active){g({label:ft||"Thinking"});return}const nf=co(Z,Pt);nf&&L(nf)}return}if(Z.type==="step")return;const Fe=co(Z,Pt);Fe&&(L(Fe),Z.type==="tool_start"&&(kn.current=!0))},onDone:Z=>{if(Vt)return;Vt=!0,Ge.current!==null&&(cancelAnimationFrame(Ge.current),Ge.current=null),Ye.current="";const Fe=Z.content||ut;M.chat.timed(`Agent response complete: ${Fe.length} chars`,$i);const Oe=Ce.getState().agentSteps.map(Ze=>({...Ze,active:!1}));if(Fe){Xr.current=Ce.getState().messages.length+1;const Ze={id:Z.message_id||Date.now()+1,session_id:e,role:"assistant",content:Fe,created_at:new Date().toISOString(),rag_sources:null,agentSteps:Oe.length>0?Oe:void 0,stats:Z.stats||void 0};a(Ze)}if(j(Oe),m(!1),E(),R(),Je.current&&Je.current.focus(),setTimeout(()=>{ls(e).then(Ze=>{if(Ce.getState().currentSessionId!==e)return;const qt=(Ze.messages||[]).map(Pe=>({...Pe,agentSteps:Pe.agentSteps||Pe.agent_steps||void 0,stats:Pe.stats||Pe.inference_stats||void 0}));s(qt),Xr.current=qt.length}).catch(()=>{})},300),ae&&ae.title==="New Task"){const Ze=J.slice(0,50)+(J.length>50?"...":"");Wl(e,{title:Ze}).then(()=>d(e,{title:Ze})).catch(qt=>M.chat.error("Auto-title failed",qt))}},onError:Z=>{Ge.current!==null&&(cancelAnimationFrame(Ge.current),Ge.current=null),Ye.current="",M.chat.error(`Chat error for session=${e}`,Z);let Fe;const Oe=Z.message||"",Ze=`
429
+
430
+ ---
431
+ *Unexpected error?* [Report it on GitHub](${Cc(Oe.slice(0,80))})`;Oe.includes("Lemonade")||Oe.includes("LLM")||Oe.includes("Could not get response")?Fe="Could not reach the LLM server. Make sure Lemonade Server is running:\n\n```\nlemonade-server serve\n```\n\nThen try sending your message again."+Ze:Z instanceof TypeError||Oe.includes("fetch")||Oe.includes("Failed to fetch")||Oe.includes("NetworkError")?Fe="Cannot connect to the GAIA server. Make sure the backend is running:\n\n```\ngaia chat --ui\n```"+Ze:Oe.includes("500")?Fe="The server encountered an error. This usually means Lemonade Server is not running or the model failed to load.\n\nStart Lemonade Server with:\n```\nlemonade-server serve\n```"+Ze:Oe.includes("timed out")||Oe.includes("timeout")||Oe.includes("Timeout")?Fe=`The request timed out. The query may be too complex — try breaking it into simpler questions.
432
+
433
+ If Lemonade Server is running but responses are slow, the model may need more resources.`+Ze:Fe=`Error: ${Oe}`+Ze;const qt={id:Date.now()+2,session_id:e,role:"assistant",content:Fe,created_at:new Date().toISOString(),rag_sources:null};a(qt),m(!1),E(),R()},onAgentCreated:()=>{m1().then(Z=>Ce.getState().setAgents(Z.agents||[])).catch(()=>{})}},void 0,void 0,ce);vt.current=Wt},[F,q,f,e,ae,a,s,m,Gd,E,d,L,g,T,x,R,ce]);Xn.current=Jr,_.useEffect(()=>{!f&&Je.current&&Je.current.focus()},[f]);const bE=_.useCallback(async O=>{f||(M.chat.info(`Deleting message ${O} from session=${e}`),Ne(O),setTimeout(async()=>{u(O),Ne(null);try{await Tb(e,O)}catch(J){M.chat.error(`Failed to delete message ${O}`,J),ls(e).then(te=>{Ce.getState().currentSessionId===e&&s(te.messages||[])}).catch(()=>{})}},250))},[e,f,u,s]),xE=_.useCallback(async O=>{if(f||O.role!=="user")return;const J=O.content;M.chat.info(`Resending message ${O.id} from session=${e}`,{preview:J.slice(0,80)}),l(O.id);try{await yb(e,O.id)}catch(te){M.chat.error(`Failed to delete messages from ${O.id}`,te),ls(e).then(ne=>{Ce.getState().currentSessionId===e&&s(ne.messages||[])}).catch(()=>{});return}Jr(J)},[e,f,l,s,Jr]),_E=O=>{O.key==="Enter"&&!O.shiftKey&&(O.preventDefault(),Jr())},[Kd,Xd]=_.useState(!1),kE=_.useCallback(O=>{O.preventDefault();const J=En(e),te=`${window.location.origin}${window.location.pathname}#${J}`;navigator.clipboard.writeText(te).then(()=>{M.ui.info(`Copied session link: ${te}`),Xd(!0),setTimeout(()=>Xd(!1),1500)}).catch(()=>{M.ui.warn("Clipboard write failed")})},[e]),SE=()=>{Ee((ae==null?void 0:ae.title)||""),le(!0)},Jd=async()=>{N.trim()&&N!==(ae==null?void 0:ae.title)&&(await Wl(e,{title:N.trim()}),d(e,{title:N.trim()})),le(!1)},CE=async()=>{try{const O=await Eb(e),J=new Blob([O.content],{type:"text/markdown"}),te=URL.createObjectURL(J),ne=document.createElement("a");ne.href=te;const be=((ae==null?void 0:ae.title)||"chat").replace(/[/\\:*?"<>|]/g,"_").slice(0,100);ne.download=`${be}.md`,ne.click(),URL.revokeObjectURL(te)}catch(O){M.chat.error("Export failed",O)}},NE=_.useCallback(async(O,J)=>{O.stopPropagation();const te=B.find(ne=>ne.id===J);M.doc.info(`Detaching document from session: ${(te==null?void 0:te.filename)||J}`);try{await Nb(e,J);const ne=Ce.getState().sessions.find(Ie=>Ie.id===e),be=((ne==null?void 0:ne.document_ids)??[]).filter(Ie=>Ie!==J);d(e,{document_ids:be}),be.length<=3&&fe(!1),M.doc.info(`Detached document from session: ${(te==null?void 0:te.filename)||J}`)}catch(ne){M.doc.error(`Failed to detach document: ${(te==null?void 0:te.filename)||J}`,ne)}},[B,e,d]),AE=_.useCallback(async O=>{if(O.preventDefault(),O.stopPropagation(),pe(!1),O.dataTransfer.files.length!==0)for(const J of Array.from(O.dataTransfer.files)){M.doc.info(`Dropped on chat view: ${J.name}`);try{const te=await T1(J);if(e&&(te!=null&&te.id))try{await vu(e,te.id);const ne=Ce.getState().sessions.find(Ie=>Ie.id===e),be=(ne==null?void 0:ne.document_ids)??[];be.includes(te.id)||d(e,{document_ids:[...be,te.id]}),M.doc.info(`Auto-attached "${J.name}" to session ${e}`)}catch(ne){M.doc.warn(`Could not attach dropped document to session: ${ne}`)}}catch(te){M.doc.error(`Upload failed: ${J.name}`,te)}}},[e,d]),vE=O=>{O.preventDefault(),O.stopPropagation(),pe(!0)},wE=O=>{O.preventDefault(),O.stopPropagation(),pe(!1)},IE=O=>{y(O),Jr(O)},LE=!Y&&i.length===0&&!f,DE=_.useMemo(()=>{const O=new Map;let J;for(const te of i)if(te.role==="user"&&te.created_at)J=new Date(te.created_at).getTime();else if(te.role==="assistant"&&te.created_at&&J!==void 0){const ne=new Date(te.created_at).getTime();ne>J&&O.set(te.id,ne-J),J=void 0}return O},[i]);return o.jsxs("main",{className:`chat-view ${Se?"drag-active":""}`,onDrop:AE,onDragOver:vE,onDragLeave:wE,children:[o.jsxs("header",{className:"chat-header",children:[o.jsx("div",{className:"chat-header-left",children:ee?o.jsx("input",{className:"title-edit",value:N,onChange:O=>Ee(O.target.value),onBlur:Jd,onKeyDown:O=>O.key==="Enter"&&Jd(),autoFocus:!0,"aria-label":"Edit chat title"}):o.jsxs(o.Fragment,{children:[o.jsx("h3",{className:"chat-title",children:(ae==null?void 0:ae.title)||"Chat"}),o.jsx("button",{className:"btn-icon-sm",onClick:SE,title:"Rename","aria-label":"Rename chat",children:o.jsx(Iy,{size:13})})]})}),o.jsxs("div",{className:"chat-header-right",children:[o.jsxs("a",{className:`session-hash-badge ${Kd?"copied":""}`,href:`#${En(e)}`,onClick:kE,title:Kd?"Copied!":`Copy session link #${En(e)}`,"aria-label":`Copy link for session ${En(e)}`,children:[o.jsx(by,{size:10}),o.jsxs("span",{children:["#",En(e)]})]}),o.jsx("span",{className:`model-badge ${V!=null&&V.model_loaded?"":"no-model"}`,children:(V==null?void 0:V.model_loaded)||"No model loaded"}),o.jsx("button",{className:"btn-icon-sm",onClick:()=>I(!0),title:"Documents","aria-label":"Attach documents",children:o.jsx(wy,{size:15})}),o.jsx("button",{className:"btn-icon-sm",onClick:()=>D(!0),title:"Browse files","aria-label":"Browse files",children:o.jsx(mh,{size:15})}),o.jsx("button",{className:"btn-icon-sm",onClick:CE,title:"Export","aria-label":"Export chat",children:o.jsx(Ws,{size:15})})]})]}),v.length>0&&(()=>{const O=[...v].sort((ne,be)=>{const Ie=ne.last_accessed_at||ne.indexed_at||"";return(be.last_accessed_at||be.indexed_at||"").localeCompare(Ie)}),J=ue?O:O.slice(0,3),te=O.length-3;return o.jsxs("div",{className:`doc-context-bar${ue?" doc-context-expanded":""}`,"aria-label":`${v.length} indexed document${v.length!==1?"s":""}`,children:[o.jsx(bd,{size:12,className:"doc-context-icon"}),o.jsxs("span",{className:"doc-context-label",onClick:()=>I(!0),title:"Click to manage documents",role:"button",tabIndex:0,children:[v.length," indexed"]}),o.jsxs("div",{className:`doc-context-pills${ue?" doc-context-pills-expanded":""}`,children:[J.map(ne=>o.jsxs("span",{className:"doc-pill",title:ne.filepath||ne.filename,children:[o.jsx(In,{size:9,className:"doc-pill-icon"}),o.jsx("span",{className:"doc-pill-name",children:ne.filename}),o.jsx("button",{className:"doc-pill-remove",onClick:be=>NE(be,ne.id),title:`Remove ${ne.filename} from this session`,"aria-label":`Remove ${ne.filename} from this session`,children:o.jsx(bt,{size:10})})]},ne.id)),!ue&&te>0&&o.jsxs("button",{className:"doc-pill-more",onClick:ne=>{ne.stopPropagation(),fe(!0)},title:"Show all indexed files","aria-label":`Show ${te} more files`,children:["+",te," more"]}),ue&&te>0&&o.jsx("button",{className:"doc-pill-collapse",onClick:ne=>{ne.stopPropagation(),fe(!1)},title:"Show fewer files","aria-label":"Collapse file list",children:"show less"})]})]})})(),o.jsxs("div",{className:"messages-scroll",ref:Le,onScroll:mE,children:[Y&&o.jsx("div",{className:"skeleton-messages","aria-label":"Loading messages",children:[0,1,2].map(O=>o.jsxs("div",{className:"skeleton-msg",children:[o.jsxs("div",{className:"skeleton-header",children:[o.jsx("div",{className:"skeleton-avatar"}),o.jsx("div",{className:"skeleton-role"})]}),o.jsxs("div",{className:"skeleton-lines",children:[o.jsx("div",{className:"skeleton-line"}),o.jsx("div",{className:"skeleton-line"}),O!==2&&o.jsx("div",{className:"skeleton-line"})]})]},O))}),LE&&o.jsxs("div",{className:"empty-chat",children:[o.jsx("div",{className:"empty-chat-icon",children:o.jsx(Sy,{size:36,strokeWidth:1.2})}),o.jsx("h4",{className:"empty-chat-title",children:"What can I help you with?"}),o.jsx("p",{className:"empty-chat-desc",children:"Ask about your documents, search files, or analyze data — powered by local AI."}),o.jsx("div",{className:"empty-chat-suggestions",children:p6.map(O=>o.jsx("button",{className:"empty-chat-chip",onClick:()=>IE(O),children:O},O))})]}),i.map((O,J)=>{const te=!f&&!Mn&&O.role==="assistant"&&i.slice(J+1).every(Ie=>Ie.role!=="assistant");if(Mn&&O.role==="assistant"&&J===i.length-1)return null;const be=DE.get(O.id);return o.jsx("div",{className:me===O.id?"msg-deleting":void 0,children:o.jsx(F0,{message:O,showTerminalCursor:te,agentSteps:O.role==="assistant"?O.agentSteps:void 0,onDelete:f?void 0:bE,onResend:!f&&O.role==="user"?xE:void 0,latencyMs:be,agentName:O.role==="assistant"?Xe:void 0})},O.id)}),(f||Mn)&&o.jsx("div",{className:`streaming-bubble ${Mn?"stream-ending":"stream-active"}`,children:o.jsx(F0,{message:{id:-1,session_id:e,role:"assistant",content:(f?h:H.current)||"",created_at:"",rag_sources:null},isStreaming:f,showTerminalCursor:Mn,agentSteps:f?k:K.current,agentStepsActive:f&&k.some(O=>O.active),agentName:nn})}),o.jsx("div",{ref:ye})]}),Qe&&o.jsx("button",{className:"scroll-bottom-btn",onClick:pE,title:"Scroll to bottom","aria-label":"Scroll to bottom",children:o.jsx(uy,{size:16})}),Se&&o.jsxs("div",{className:"drag-overlay",children:[o.jsx(Au,{size:32,strokeWidth:1.5}),o.jsx("span",{children:"Drop files to index"})]}),o.jsxs("div",{className:"input-area",children:[o.jsxs("div",{className:`input-box ${q.length>0?"has-attachments":""}`,onDrop:TE,onDragOver:O=>{O.preventDefault(),O.stopPropagation()},children:[o.jsxs("div",{className:"input-content",children:[q.length>0&&o.jsx("div",{className:"attachment-strip",children:q.map(O=>o.jsxs("div",{className:`attachment-preview ${O.error?"attachment-error":""}`,children:[O.isImage&&O.url?o.jsx("img",{src:O.url,alt:O.name,className:"attachment-thumb"}):o.jsx("div",{className:"attachment-file-icon",children:o.jsx(In,{size:16})}),o.jsx("span",{className:"attachment-name",title:O.name,children:O.name.length>20?O.name.slice(0,17)+"...":O.name}),O.uploading&&o.jsx("span",{className:"attachment-spinner"}),O.error&&o.jsx("span",{className:"attachment-error-text",children:O.error}),o.jsx("button",{className:"attachment-remove",onClick:()=>yE(O.id),title:"Remove","aria-label":`Remove ${O.name}`,children:o.jsx(bt,{size:12})})]},O.id))}),o.jsx("textarea",{ref:Je,className:"msg-input",value:F,onChange:gE,onKeyDown:_E,onPaste:EE,placeholder:"Type a message or paste an image... (Shift+Enter for new line)",rows:1,disabled:f||(V==null?void 0:V.init_state)==="initializing","aria-label":"Message input"})]}),!f&&o.jsx("span",{className:"input-cursor","aria-hidden":"true"}),o.jsxs("div",{className:"input-btns",children:[o.jsx("button",{className:"btn-icon-sm",onClick:()=>I(!0),title:"Upload document","aria-label":"Upload document",children:o.jsx(Au,{size:15})}),o.jsx("button",{className:"btn-icon-sm",onClick:()=>D(!0),title:"Browse files","aria-label":"Browse files",children:o.jsx(mh,{size:15})}),f?o.jsx("button",{className:"stop-btn",onClick:Tl,title:"Stop generating","aria-label":"Stop generating",children:o.jsx(Oy,{size:14})}):o.jsx("button",{className:"send-btn",onClick:()=>Jr(),disabled:!F.trim()&&!q.some(O=>O.uploaded),title:"Send (Enter)","aria-label":"Send message",children:o.jsx(Ly,{size:16})})]})]}),o.jsxs("div",{className:"input-footer",children:[t&&o.jsxs(o.Fragment,{children:[o.jsx("button",{className:"create-agent-btn",onClick:t,title:"Build a custom agent","aria-label":"Build a custom agent",children:o.jsx(_d,{size:10})}),X.length>1&&o.jsx("span",{className:"input-footer-sep"})]}),X.length>1&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"agent-picker",ref:Ot,children:[o.jsxs("button",{className:"agent-picker-btn",onClick:()=>!f&&At(O=>!O),title:"Switch agent","aria-label":"Switch agent",disabled:f,children:[o.jsx(ac,{size:10}),o.jsx("span",{children:((tf=X.find(O=>O.id===we))==null?void 0:tf.name)||"Agent"}),o.jsx(xd,{size:10})]}),it&&o.jsx("div",{className:"agent-picker-dropdown",children:X.map(O=>o.jsxs("button",{className:`agent-picker-option${O.id===we?" active":""}`,onClick:()=>Pn(O.id),children:[o.jsx(ac,{size:12}),o.jsx("span",{children:O.name})]},O.id))})]}),o.jsx("span",{className:"input-footer-sep"})]}),o.jsxs("span",{className:"input-footer-item",children:[o.jsx(r1,{size:10}),o.jsx("span",{children:"100% local & private"})]}),o.jsx("span",{className:"input-footer-sep"}),o.jsxs("span",{className:"input-footer-item",children:[o.jsx("kbd",{className:"kbd-hint",children:"Enter"}),o.jsx("span",{children:"send"})]}),o.jsxs("span",{className:"input-footer-item",children:[o.jsx("kbd",{className:"kbd-hint",children:"Shift+Enter"}),o.jsx("span",{children:"new line"})]}),f&&o.jsxs("span",{className:"input-footer-item",children:[o.jsx("kbd",{className:"kbd-hint",children:"Esc"}),o.jsx("span",{children:"stop"})]}),o.jsx("span",{className:"input-footer-sep"}),o.jsxs("span",{className:"input-footer-item",children:[o.jsx("kbd",{className:"kbd-hint",children:"Ctrl+K"}),o.jsx("span",{children:"search"})]}),o.jsxs("span",{className:"input-footer-item",children:[o.jsx("kbd",{className:"kbd-hint",children:"Ctrl+V"}),o.jsx("span",{children:"paste image"})]})]})]})]})}const j0="GAIA",Oa="Your private AI assistant, running 100% locally on AMD Ryzen AI",y6=65,b6=350;function fE(e,t){return t===","||t==="."?60+Math.random()*50:t===" "?15+Math.random()*25:Math.random()<.35?8+Math.random()*12:Math.random()<.06?45+Math.random()*35:18+Math.random()*22}const x6=["Scan my Downloads and tell me what I should clean up","Index a folder of documents so I can chat about them","What have I been working on lately? Show my recent files","What hardware is in my PC? Tell me about my CPU and GPU"];function _6({onNewTask:e,onSendPrompt:t,onCreateAgent:n}){const{systemStatus:r,agents:i,activeAgentId:s,setActiveAgentId:a}=Ce(),u=_.useMemo(()=>{var D;const I=i.find(Y=>Y.id===s);return(D=I==null?void 0:I.conversation_starters)!=null&&D.length?I.conversation_starters:x6},[i,s]),[l,d]=_.useState(""),[f,h]=_.useState(!1),[m,p]=_.useState(""),[E,k]=_.useState(!1),[L,g]=_.useState("title"),[T,x]=_.useState(!1),R=r!==null&&!r.initialized,B=(r==null?void 0:r.init_state)==="initializing",C=r!==null&&r.lemonade_running&&!r.model_loaded;return _.useEffect(()=>{let I=0;const D=setInterval(()=>{I++,I<=j0.length?d(j0.slice(0,I)):(clearInterval(D),h(!0))},y6);return()=>clearInterval(D)},[]),_.useEffect(()=>{if(!f)return;let I=!1;const D=setTimeout(()=>{if(I)return;g("subtitle");let w=0;const V=()=>{if(!I)if(w++,w<=Oa.length){p(Oa.slice(0,w));const X=Oa[w-1],ce=w>1?Oa[w-2]:"",se=fE(X,ce);Y.current=setTimeout(V,se)}else k(!0),g("done")};V()},b6),Y={current:null};return()=>{I=!0,clearTimeout(D),Y.current&&clearTimeout(Y.current)}},[f]),_.useEffect(()=>{if(!E)return;const I=setTimeout(()=>x(!0),200);return()=>clearTimeout(I)},[E]),o.jsx("main",{className:"welcome",children:o.jsxs("div",{className:`welcome-inner ${T?"content-revealed":""}`,children:[o.jsxs("h1",{className:`welcome-title${f?" typing-done":""}`,children:[l.length>=4?o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"gaia-glow",children:l.slice(0,4)}),o.jsx("span",{children:l.slice(4)})]}):l,L==="title"&&o.jsx("span",{className:`terminal-cursor${f?" blink":""}`})]}),o.jsx("p",{className:"welcome-sub",children:o.jsxs("span",{className:"typewriter-text",children:[m,(L==="subtitle"||L==="done")&&o.jsx("span",{className:`terminal-cursor terminal-cursor-sub${L==="done"?" blink":""}`})]})}),o.jsxs("span",{className:"welcome-version",children:["v","0.17.2"," ",o.jsx("span",{className:"beta-badge",children:"BETA"})]}),o.jsxs("div",{className:"features",children:[o.jsx(Pa,{icon:o.jsx(r1,{size:22}),title:"Private",desc:"Data stays on your device",codeHint:"> encrypt --local",expandedDesc:"All processing happens on-device. No cloud, no tracking, complete data privacy."}),o.jsx(Pa,{icon:o.jsx(a1,{size:22}),title:"Fast",desc:"NPU acceleration",codeHint:"> npu.accelerate()",expandedDesc:"Hardware-accelerated with AMD Ryzen AI NPU for real-time local inference."}),o.jsx(Pa,{icon:o.jsx(In,{size:22}),title:"Smart",desc:"Document Q&A",codeHint:'> rag.query("...")',expandedDesc:"RAG-powered document Q&A — index files and chat with their contents."}),o.jsx(Pa,{icon:o.jsx(my,{size:22}),title:"Free",desc:"No subscriptions",codeHint:"> license: MIT",expandedDesc:"No API keys, no subscriptions, no hidden costs. Fully open-source."})]}),i.length>1&&o.jsx("div",{className:"agent-pills",children:i.map(I=>o.jsxs("button",{className:`agent-pill${I.id===s?" active":""}`,onClick:()=>a(I.id),title:I.description||I.name,children:[o.jsx(ac,{size:14}),o.jsx("span",{children:I.name})]},I.id))}),R&&o.jsxs("div",{className:"welcome-setup-hint",children:[o.jsx(Cu,{size:14}),o.jsxs("span",{children:[o.jsx("strong",{children:"First time?"})," Run ",o.jsx("code",{children:"gaia init --profile chat"})," in a terminal to install Lemonade Server and download the required AI models (~25 GB)."]})]}),!R&&C&&o.jsxs("div",{className:"welcome-setup-hint",children:[o.jsx(Cu,{size:14}),o.jsxs("span",{children:["No model loaded. Run ",o.jsx("code",{children:"gaia init --profile chat"})," to download models (~25 GB)."]})]}),o.jsxs("div",{className:"welcome-actions",children:[o.jsx("button",{className:"btn-primary start-btn",onClick:e,disabled:B,children:"Start a New Task"}),n&&o.jsxs("button",{className:"build-agent-btn",onClick:n,disabled:B,children:[o.jsx(_d,{size:14}),"Build a Custom Agent"]})]}),o.jsxs("div",{className:"suggestions",children:[o.jsx("span",{className:"suggestions-label",children:"Try asking:"}),o.jsx("div",{className:"suggestion-chips",children:u.map(I=>o.jsx("button",{className:"chip",onClick:()=>t(I),disabled:B,children:I},I))})]}),o.jsx("p",{className:"welcome-copyright",children:"© 2025–2026 Advanced Micro Devices, Inc. All rights reserved."})]})})}function Pa({icon:e,title:t,desc:n,expandedDesc:r,codeHint:i}){const[s,a]=_.useState("idle"),[u,l]=_.useState(i),[d,f]=_.useState(""),h=_.useRef(null),m=()=>{a("erasing"),f("");let k=i.length;const L=()=>{if(k--,k>=0)l(i.slice(0,k)),h.current=setTimeout(L,15+Math.random()*20);else{a("typing"),l("");let g=0;const T=()=>{if(g++,g<=r.length){f(r.slice(0,g));const x=r[g-1],R=g>1?r[g-2]:"";h.current=setTimeout(T,fE(x,R))}else a("done")};T()}};L()},p=()=>{h.current&&clearTimeout(h.current),a("idle"),l(i),f("")};_.useEffect(()=>()=>{h.current&&clearTimeout(h.current)},[]);const E=s!=="idle";return o.jsxs("div",{className:`feature-card ${E?"feature-hovered":""}`,onMouseEnter:m,onMouseLeave:p,children:[o.jsx("div",{className:"feature-icon",children:e}),o.jsx("h3",{children:t}),o.jsx("p",{children:n}),o.jsxs("div",{className:"feature-terminal",children:[s==="idle"&&o.jsx("span",{className:"feature-code-hint",children:i}),s==="erasing"&&o.jsxs("span",{className:"feature-inline",children:[o.jsx("span",{className:"feature-code-hint feature-code-erasing",children:u}),o.jsx("span",{className:"terminal-cursor terminal-cursor-sm"})]}),(s==="typing"||s==="done")&&o.jsxs("span",{className:"feature-inline",children:[o.jsx("span",{className:"feature-expanded-text",children:d}),o.jsx("span",{className:`terminal-cursor terminal-cursor-sm${s==="done"?" blink":""}`})]})]})]})}function k6(e){const t=Math.floor((Date.now()-e)/1e3);if(t<60)return`${t}s`;const n=Math.floor(t/60),r=t%60;return`${n}m ${r}s`}function S6(e){try{const t=new Date(e);if(isNaN(t.getTime()))return"";const r=new Date().getTime()-t.getTime(),i=Math.floor(r/1e3),s=Math.floor(i/60),a=Math.floor(s/60),u=Math.floor(a/24);return i<60?"just now":s<60?`${s}m ago`:a<24?`${a}h ago`:u===1?"yesterday":u<7?`${u}d ago`:t.toLocaleDateString(void 0,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}catch{return""}}function C6(e){try{const t=new Date(e);return isNaN(t.getTime())?"":t.toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit"})}catch{return""}}function N6(){const{documents:e,setDocuments:t,setShowDocLibrary:n,setShowFileBrowser:r,currentSessionId:i,sessions:s,updateSessionInList:a}=Ce(),u=s.find(v=>v.id===i)??null,[l,d]=_.useState(!1),[f,h]=_.useState(!1),[m,p]=_.useState(""),[E,k]=_.useState(""),[L,g]=_.useState(null),T=_.useRef(new Map),[,x]=_.useState(0);_.useEffect(()=>{M.doc.info("Loading document library...");const v=M.doc.time();ni().then(F=>{const y=F.documents||[];t(y),M.doc.timed(`Loaded ${y.length} document(s), ${F.total_chunks||0} chunks, ${F.total_size_bytes||0} bytes total`,v)}).catch(F=>{M.doc.error("Failed to load documents",F),t([])})},[t]);const R=e.some(v=>v.indexing_status==="indexing"||v.indexing_status==="pending");_.useEffect(()=>{if(!R)return;const v=Ce.getState().documents;for(const ee of v)(ee.indexing_status==="indexing"||ee.indexing_status==="pending")&&!T.current.has(ee.id)&&T.current.set(ee.id,Date.now());let F=!1;const y=setInterval(async()=>{if(x(ee=>ee+1),!F){F=!0;try{const le=Ce.getState().documents.filter(N=>N.indexing_status==="indexing"||N.indexing_status==="pending");for(const N of le)try{const Ee=await Sb(N.id);if(Ee.indexing_status!=="indexing"&&Ee.indexing_status!=="pending"){T.current.delete(N.id);const Se=await ni();t(Se.documents||[]);break}}catch{}}finally{F=!1}}},2e3);return()=>clearInterval(y)},[R,t]),_.useEffect(()=>{const v=new Set(e.filter(F=>F.indexing_status==="indexing"||F.indexing_status==="pending").map(F=>F.id));for(const F of T.current.keys())v.has(F)||T.current.delete(F)},[e]),_.useEffect(()=>{const v=setInterval(async()=>{try{const y=(await ni()).documents||[],ee=Ce.getState().documents;(y.length!==ee.length||y.some((N,Ee)=>{const Se=ee.find(pe=>pe.id===N.id);return!Se||Se.indexing_status!==N.indexing_status||Se.indexed_at!==N.indexed_at||Se.chunk_count!==N.chunk_count}))&&(t(y),M.doc.debug("Document list refreshed (server-side changes detected)"))}catch{}},15e3);return()=>clearInterval(v)},[t]);const B=e.reduce((v,F)=>v+F.file_size,0),C=e.reduce((v,F)=>v+F.chunk_count,0),I=v=>{if(v<=0)return"0 B";const F=1024,y=["B","KB","MB","GB"],ee=Math.min(Math.floor(Math.log(v)/Math.log(F)),y.length-1);return parseFloat((v/Math.pow(F,ee)).toFixed(1))+" "+y[ee]},D=_.useCallback(async(v,F)=>{var le;const y=v.includes(".")?"."+((le=v.split(".").pop())==null?void 0:le.toLowerCase()):"";if(y&&!Sc(y)){const N=Fu(y),Ee=N?N.message:`The file type "${y}" is not supported for indexing.`;M.doc.warn(`Unsupported file type: ${v} (${y})`),g({filename:v,error:Ee});return}M.doc.info(`Indexing document: ${v}`);const ee=M.doc.time();h(!0),p(`Indexing ${v}...`),g(null);try{const N=await F();if(M.doc.timed(`Indexed "${v}": ${(N==null?void 0:N.chunk_count)||"?"} chunks`,ee),i&&(N!=null&&N.id))try{await vu(i,N.id);const Se=Ce.getState().sessions.find(Qe=>Qe.id===i),pe=(Se==null?void 0:Se.document_ids)??[];pe.includes(N.id)||a(i,{document_ids:[...pe,N.id]}),M.doc.info(`Auto-attached "${v}" to session ${i}`)}catch(Se){M.doc.warn(`Could not attach document to session: ${Se}`)}const Ee=await ni();t(Ee.documents||[]),p("")}catch(N){M.doc.error(`Failed to index "${v}"`,N);const Ee=N instanceof Error?N.message:"Upload failed";g({filename:v,error:Ee}),p("")}finally{h(!1)}},[i,a,t]),Y=_.useCallback(async(v,F)=>{await D(F,()=>E1(v))},[D]),w=_.useCallback(async v=>{await D(v.name,()=>T1(v))},[D]),V=_.useCallback(async v=>{v.preventDefault(),d(!1);const F=Array.from(v.dataTransfer.files);M.doc.info(`Dropped ${F.length} file(s) into Document Library`);for(const y of F)await w(y)},[w]),X=_.useCallback(async v=>{const F=e.find(y=>y.id===v);M.doc.info(`Deleting document: ${(F==null?void 0:F.filename)||v}`);try{await kb(v),T.current.delete(v),t(e.filter(y=>y.id!==v)),M.doc.info(`Deleted document: ${(F==null?void 0:F.filename)||v}`)}catch(y){M.doc.error(`Failed to delete document: ${(F==null?void 0:F.filename)||v}`,y)}},[e,t]),ce=_.useCallback(async(v,F)=>{M.doc.info(`Opening folder for: ${v}`);try{await Sd(v,!0)}catch(y){M.doc.error(`Failed to open folder for: ${F}`,y)}},[]),se=_.useCallback(async v=>{const F=e.find(y=>y.id===v);M.doc.info(`Cancelling indexing for: ${(F==null?void 0:F.filename)||v}`);try{await Cb(v),T.current.delete(v);const y=await ni();t(y.documents||[]),M.doc.info(`Cancelled indexing for: ${(F==null?void 0:F.filename)||v}`)}catch(y){M.doc.error(`Failed to cancel indexing: ${(F==null?void 0:F.filename)||v}`,y)}},[e,t]),de=_.useCallback(async v=>{if(!i)return;const F=e.find(y=>y.id===v);M.doc.info(`Attaching document to session: ${(F==null?void 0:F.filename)||v}`);try{await vu(i,v);const y=Ce.getState().sessions.find(le=>le.id===i),ee=(y==null?void 0:y.document_ids)??[];ee.includes(v)||a(i,{document_ids:[...ee,v]}),M.doc.info(`Attached "${(F==null?void 0:F.filename)||v}" to session ${i}`)}catch(y){M.doc.error(`Failed to attach document to session: ${(F==null?void 0:F.filename)||v}`,y)}},[i,e,a]),ae=_.useCallback(async v=>{v.preventDefault(),E.trim()&&(M.doc.info(`Indexing from path input: ${E.trim()}`),await Y(E.trim(),E.trim().split(/[\\/]/).pop()||"file"),k(""))},[E,Y]),Te=v=>{const F=v.indexing_status||"complete",y=T.current.get(v.id),ee=v.indexed_at?S6(v.indexed_at):"",le=v.indexed_at?C6(v.indexed_at):"";switch(F){case"indexing":case"pending":return o.jsxs("div",{className:"doc-indexing-status",children:[o.jsxs("div",{className:"doc-indexing-bar",children:[o.jsx("div",{className:"doc-indexing-bar-track",children:o.jsx("div",{className:"doc-indexing-bar-fill"})}),o.jsxs("span",{className:"doc-indexing-label",children:[o.jsx(_y,{size:12,className:"doc-spin"}),"Indexing",y?` (${k6(y)})`:"..."]})]}),o.jsxs("button",{className:"btn-cancel",onClick:N=>{N.stopPropagation(),se(v.id)},title:"Cancel indexing","aria-label":`Cancel indexing ${v.filename}`,children:[o.jsx(ph,{size:14}),"Cancel"]})]});case"failed":return o.jsxs("span",{className:"doc-status-badge doc-status-failed",children:[o.jsx(xr,{size:12})," Failed"]});case"cancelled":return o.jsxs("span",{className:"doc-status-badge doc-status-cancelled",children:[o.jsx(ph,{size:12})," Cancelled"]});case"missing":return o.jsxs("span",{className:"doc-status-badge doc-status-missing",children:[o.jsx(xr,{size:12})," File missing"]});default:return o.jsxs("span",{className:"doc-meta",children:[I(v.file_size)," · ",v.chunk_count," chunks",ee&&o.jsxs("span",{className:"doc-timestamp",title:`Indexed: ${le}`,children:[o.jsx(Zp,{size:10}),ee]})]})}};return o.jsx("div",{className:"modal-overlay",onClick:()=>n(!1),role:"dialog","aria-modal":"true","aria-label":"Document Library",children:o.jsxs("div",{className:"modal-panel doc-modal",onClick:v=>v.stopPropagation(),children:[o.jsxs("div",{className:"modal-header",children:[o.jsx("h3",{children:"Document Library"}),o.jsx("button",{className:"btn-icon",onClick:()=>n(!1),"aria-label":"Close document library",children:o.jsx(bt,{size:18})})]}),o.jsxs("div",{className:"modal-body",children:[o.jsx("div",{className:`drop-zone ${l?"drag-over":""} ${f?"uploading":""}`,onDragOver:v=>{v.preventDefault(),d(!0)},onDragLeave:()=>d(!1),onDrop:V,children:f?o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"upload-spinner"}),o.jsx("p",{children:m})]}):o.jsxs(o.Fragment,{children:[o.jsx(Au,{size:32,strokeWidth:1.5}),o.jsx("p",{children:"Drop files here to index"}),o.jsx("span",{className:"drop-hint",children:"PDF, TXT, MD, code files, and 50+ formats"})]})}),o.jsxs("form",{className:"path-input-form",onSubmit:ae,children:[o.jsx($n,{size:16,className:"path-icon"}),o.jsx("input",{type:"text",className:"path-input",value:E,onChange:v=>k(v.target.value),placeholder:"Or enter file path: C:\\docs\\manual.pdf","aria-label":"File path to index"}),o.jsx("button",{type:"submit",className:"btn-secondary",disabled:!E.trim()||f,children:"Index"}),o.jsxs("button",{type:"button",className:"btn-secondary",onClick:()=>{n(!1),r(!0)},title:"Browse files on this computer",children:[o.jsx(Or,{size:14}),"Browse Files"]})]}),L&&o.jsx(dE,{filename:L.filename,error:L.error,onDismiss:()=>g(null)}),e.length>0&&o.jsxs("div",{className:"doc-stats",children:[o.jsxs("span",{children:[e.length," document",e.length!==1?"s":""]}),o.jsx("span",{children:"·"}),o.jsxs("span",{children:[C," chunks"]}),o.jsx("span",{children:"·"}),o.jsx("span",{children:I(B)})]}),o.jsxs("div",{className:"doc-list",children:[e.length===0&&!f&&o.jsxs("div",{className:"empty-docs",children:[o.jsx(In,{size:32,strokeWidth:1}),o.jsx("p",{children:"No documents indexed yet"}),o.jsx("span",{children:"Drop files above or enter a file path"})]}),e.map(v=>{var F;return o.jsxs("div",{className:`doc-row ${v.indexing_status==="indexing"?"doc-row-indexing":""}`,children:[o.jsxs("div",{className:"doc-info",children:[o.jsx("span",{className:"doc-name",children:v.filename}),Te(v)]}),o.jsxs("div",{className:"doc-row-actions",children:[v.filepath&&o.jsx("button",{className:"btn-icon-sm doc-open-folder",onClick:()=>ce(v.filepath,v.filename),title:`Open folder: ${v.filepath}`,"aria-label":`Open containing folder for ${v.filename}`,children:o.jsx($n,{size:14})}),i&&v.indexing_status==="complete"&&!((F=u==null?void 0:u.document_ids)!=null&&F.includes(v.id))&&o.jsx("button",{className:"btn-icon-sm doc-attach",onClick:()=>de(v.id),title:"Use in current session","aria-label":`Attach ${v.filename} to current session`,children:o.jsx(yy,{size:14})}),v.indexing_status!=="indexing"&&v.indexing_status!=="pending"&&o.jsx("button",{className:"btn-icon-sm doc-delete",onClick:()=>X(v.id),title:"Remove","aria-label":`Remove ${v.filename}`,children:o.jsx(Nu,{size:14})})]})]},v.id)})]})]})]})})}function A6(e){if(e.type==="folder")return o.jsx(t1,{size:16});const t=(e.extension||"").toLowerCase();return[".csv",".xlsx",".xls",".tsv"].includes(t)?o.jsx(My,{size:16}):[".py",".js",".ts",".java",".c",".cpp",".go",".rs"].includes(t)?o.jsx(fy,{size:16}):[".pdf",".doc",".docx",".txt",".md"].includes(t)?o.jsx(In,{size:16}):o.jsx(e1,{size:16})}function v6(e){if(e<=0)return"";const t=1024,n=["B","KB","MB","GB"],r=Math.min(Math.floor(Math.log(e)/Math.log(t)),n.length-1);return parseFloat((e/Math.pow(t,r)).toFixed(1))+" "+n[r]}function w6(e){if(!e)return"";const t=new Date(e),n=new Date,r=n.getTime()-t.getTime(),i=Math.floor(r/36e5);if(i<1)return"Just now";if(i<24)return`${i}h ago`;const s=Math.floor(i/24);return s<7?`${s}d ago`:t.toLocaleDateString(void 0,{month:"short",day:"numeric",year:t.getFullYear()!==n.getFullYear()?"numeric":void 0})}function I6(e){switch(e){case"home":return o.jsx(Ey,{size:14});case"desktop":return o.jsx(Cy,{size:14});case"documents":return o.jsx(In,{size:14});case"download":return o.jsx(Ws,{size:14});default:return o.jsx(t1,{size:14})}}const L6=[{label:"All Files",value:""},{label:"Documents",value:"pdf,doc,docx,txt,md"},{label:"Spreadsheets",value:"csv,xlsx,xls,tsv"},{label:"Code",value:"py,js,ts,java,c,cpp,go,rs,rb,sh"},{label:"Data",value:"json,xml,yaml,yml,csv,tsv"}];function D6(){const{setShowFileBrowser:e,currentSessionId:t,updateSessionInList:n}=Ce(),[r,i]=_.useState(""),[s,a]=_.useState(null),[u,l]=_.useState([]),[d,f]=_.useState([]),[h,m]=_.useState(!1),[p,E]=_.useState(null),[k,L]=_.useState(""),[g,T]=_.useState(null),[x,R]=_.useState(!1),[B,C]=_.useState(""),[I,D]=_.useState(new Set),[Y,w]=_.useState(null),[V,X]=_.useState(!1),[ce,se]=_.useState(new Set),[de,ae]=_.useState(null),Te=_.useRef(null),[v,F]=_.useState(null),y=_.useCallback(async j=>{m(!0),E(null),T(null),L("");try{const q=await Ab(j);i(q.current_path),a(q.parent_path),l(q.entries),q.quick_links.length>0&&f(q.quick_links),M.ui.info(`Browsing: ${q.current_path} (${q.entries.length} items)`)}catch(q){const z=q instanceof Error?q.message:"Failed to load directory";E(z),M.ui.error("Browse failed",q)}finally{m(!1)}},[]);_.useEffect(()=>{y()},[y]),_.useEffect(()=>()=>{Te.current&&clearTimeout(Te.current)},[]);const ee=_.useCallback(async()=>{if(!k.trim()){T(null);return}R(!0),E(null);try{const j=await wb(k.trim(),B||void 0,30);T(j.results),M.ui.info(`Search "${k}": ${j.total} results`)}catch(j){const q=j instanceof Error?j.message:"Search failed";E(q),M.ui.error("Search failed",j)}finally{R(!1)}},[k,B]),le=j=>{j.key==="Enter"&&ee()},N=_.useCallback(j=>{j.type==="folder"&&(y(j.path),D(new Set),w(null))},[y]),Ee=_.useCallback(async j=>{X(!0);try{const q=await Ib(j);w(q)}catch(q){M.ui.error("Preview failed",q)}finally{X(!1)}},[]),Se=_.useCallback(async()=>{var At,Ot;if(I.size===0)return;const j=Array.from(I);F(null);const q=[],z=[];for(const we of j){const Xe=we.includes(".")?"."+((At=we.split(".").pop())==null?void 0:At.toLowerCase()):"";Xe&&!Sc(Xe)?z.push(we):q.push(we)}if(z.length>0&&q.length===0){const we=z[0],Xe="."+((Ot=we.split(".").pop())==null?void 0:Ot.toLowerCase()),nn=Fu(Xe);F({filename:z.length===1?we.split(/[\\/]/).pop()||we:`${z.length} files`,error:nn?nn.message:`File type "${Xe}" is not supported for indexing.`});return}if(z.length>0&&(M.doc.warn(`Skipping ${z.length} unsupported file(s)`),ae(`Skipping ${z.length} unsupported file(s)...`)),q.length===0)return;se(new Set(q)),ae(`Indexing ${q.length} file(s)...`);let ue=0,fe=0,me="";const Ne=[],it=new Set(u.filter(we=>we.type==="folder").map(we=>we.path));for(const we of q)try{if(it.has(we))(await vb(we)).documents.forEach(nn=>{nn.id&&Ne.push(nn.id)});else{const Xe=await E1(we);Xe!=null&&Xe.id&&Ne.push(Xe.id)}ue++,ae(`Indexed ${ue}/${q.length}...`)}catch(Xe){fe++,me=Xe instanceof Error?Xe.message:"Unknown error"}if(t&&Ne.length>0){for(const Pn of Ne)try{await vu(t,Pn)}catch(Mn){M.doc.warn(`Could not attach document to session: ${Mn}`)}const we=Ce.getState().sessions.find(Pn=>Pn.id===t),Xe=(we==null?void 0:we.document_ids)??[],nn=Ne.filter(Pn=>!Xe.includes(Pn));nn.length>0&&n(t,{document_ids:[...Xe,...nn]})}if(se(new Set),fe>0)ae(`Done: ${ue} indexed, ${fe} failed`),F({filename:`${fe} file(s)`,error:me||"Indexing failed for some files"});else{const we=z.length>0?` (${z.length} skipped — unsupported type)`:"";ae(`Successfully indexed ${ue} file(s)${we}`)}Te.current&&clearTimeout(Te.current),Te.current=setTimeout(()=>ae(null),5e3),D(new Set)},[I,t,n]),pe=_.useCallback(()=>{if(I.size===0)return;const j=Array.from(I);e(!1);const q=j.length===1?`Analyze this file for me: ${j[0]}`:`Analyze these files for me:
434
+ ${j.map(z=>`- ${z}`).join(`
435
+ `)}`;setTimeout(()=>{window.dispatchEvent(new CustomEvent("gaia:send-prompt",{detail:{prompt:q}}))},100)},[I,e]),Qe=r?r.replace(/\\/g,"/").split("/").filter(Boolean):[],Ct=Qe.map((j,q)=>({label:j,path:Qe.slice(0,q+1).join("/")+(q===0&&j.includes(":")?"/":"")})),Nt=g?g.map(j=>({name:j.name,path:j.path,type:"file",size:j.size,extension:j.extension||"",modified:j.modified||""})):u;return o.jsx("div",{className:"modal-overlay",onClick:()=>e(!1),role:"dialog","aria-modal":"true","aria-label":"File Browser",children:o.jsxs("div",{className:`modal-panel file-browser-modal ${Y?"has-preview":""}`,onClick:j=>j.stopPropagation(),children:[o.jsxs("div",{className:"modal-header",children:[o.jsxs("h3",{children:[o.jsx($n,{size:18})," File Browser"]}),o.jsx("button",{className:"btn-icon",onClick:()=>e(!1),"aria-label":"Close",children:o.jsx(bt,{size:18})})]}),o.jsxs("div",{className:"file-browser-body",children:[o.jsx("div",{className:"fb-quick-links",children:d.map(j=>o.jsxs("button",{className:"fb-quick-link",onClick:()=>y(j.path),title:j.path,children:[I6(j.icon),o.jsx("span",{children:j.name})]},j.path))}),o.jsxs("div",{className:"fb-search-bar",children:[o.jsxs("div",{className:"fb-search-input-wrap",children:[o.jsx(Or,{size:14,className:"fb-search-icon"}),o.jsx("input",{type:"text",className:"fb-search-input",placeholder:"Search files on your PC...",value:k,onChange:j=>L(j.target.value),onKeyDown:le,"aria-label":"Search files"}),k&&o.jsx("button",{className:"fb-search-clear",onClick:()=>{L(""),T(null)},"aria-label":"Clear search",children:o.jsx(bt,{size:12})})]}),o.jsx("select",{className:"fb-type-filter",value:B,onChange:j=>C(j.target.value),"aria-label":"File type filter",children:L6.map(j=>o.jsx("option",{value:j.value,children:j.label},j.value))}),o.jsx("button",{className:"fb-search-btn",onClick:ee,disabled:!k.trim()||x,children:x?"Searching...":"Search"})]}),!g&&o.jsxs("div",{className:"fb-breadcrumb",children:[o.jsx("button",{className:"fb-crumb",onClick:()=>y("/"),children:o.jsx(gy,{size:12})}),Ct.map((j,q)=>o.jsxs("span",{className:"fb-crumb-item",children:[o.jsx(ra,{size:12,className:"fb-crumb-sep"}),o.jsx("button",{className:"fb-crumb",onClick:()=>y(j.path),children:j.label})]},q)),s&&o.jsx("button",{className:"fb-up-btn",onClick:()=>y(s),title:"Go up",children:o.jsx(ly,{size:14})})]}),g&&o.jsxs("div",{className:"fb-search-header",children:[o.jsxs("span",{children:["Found ",g.length,' result(s) for "',k,'"']}),o.jsx("button",{className:"fb-back-btn",onClick:()=>{T(null),L("")},children:"Back to browsing"})]}),p&&o.jsx("div",{className:"fb-error",children:p}),o.jsxs("div",{className:"fb-content",children:[o.jsxs("div",{className:"fb-file-list",children:[h&&o.jsx("div",{className:"fb-loading",children:"Loading..."}),!h&&Nt.length===0&&o.jsx("div",{className:"fb-empty",children:g?"No files found":"This folder is empty"}),!h&&Nt.map(j=>{var fe;const q=j.extension||(j.name.includes(".")?"."+((fe=j.name.split(".").pop())==null?void 0:fe.toLowerCase()):""),z=j.type==="file"&&q&&!Sc(q),ue=z?Fu(q):null;return o.jsxs("div",{className:`fb-entry ${j.type} ${I.has(j.path)?"selected":""} ${z?"unsupported":""}`,onClick:()=>j.type==="folder"?N(j):Ee(j.path),onDoubleClick:()=>j.type==="folder"?N(j):void 0,title:z?`${(ue==null?void 0:ue.label)||"This"} file type cannot be indexed`:j.path,children:[o.jsx("input",{type:"checkbox",className:"fb-entry-checkbox",checked:I.has(j.path),onChange:()=>{D(me=>{const Ne=new Set(me);return Ne.has(j.path)?Ne.delete(j.path):Ne.add(j.path),Ne})},onClick:me=>me.stopPropagation(),"aria-label":`Select ${j.name}`}),o.jsx("span",{className:"fb-entry-icon",children:A6(j)}),o.jsx("span",{className:"fb-entry-name",title:j.path,children:j.name}),z&&o.jsx("span",{className:"fb-unsupported-badge",children:"Not indexable"}),o.jsx("span",{className:"fb-entry-size",children:j.type==="file"?v6(j.size):""}),o.jsx("span",{className:"fb-entry-date",children:w6(j.modified)})]},j.path)})]}),Y&&o.jsxs("div",{className:"fb-preview",children:[o.jsxs("div",{className:"fb-preview-header",children:[o.jsx("span",{className:"fb-preview-name",children:Y.name}),o.jsx("button",{className:"btn-icon-sm",onClick:()=>w(null),"aria-label":"Close preview",children:o.jsx(bt,{size:14})})]}),o.jsxs("div",{className:"fb-preview-meta",children:[o.jsx("span",{children:Y.size_display}),Y.total_lines&&o.jsxs("span",{children:[Y.total_lines," lines"]}),Y.columns&&o.jsxs("span",{children:[Y.columns.length," columns"]}),Y.row_count!==null&&o.jsxs("span",{children:[Y.row_count," rows"]})]}),Y.columns&&o.jsxs("div",{className:"fb-preview-columns",children:[o.jsx("strong",{children:"Columns:"})," ",Y.columns.join(", ")]}),V?o.jsx("div",{className:"fb-preview-loading",children:"Loading preview..."}):Y.is_text&&Y.preview_lines.length>0?o.jsx("pre",{className:"fb-preview-content",children:Y.preview_lines.slice(0,30).join(`
436
+ `)}):o.jsx("div",{className:"fb-preview-binary",children:"Binary file - no preview available"})]})]}),v&&o.jsx(dE,{filename:v.filename,error:v.error,onDismiss:()=>F(null)}),o.jsxs("div",{className:"fb-actions",children:[o.jsx("div",{className:"fb-selection-info",children:I.size>0?`${I.size} item(s) selected`:"Select files to index or analyze"}),de&&o.jsx("span",{className:"fb-index-status",children:de}),o.jsxs("div",{className:"fb-action-btns",children:[o.jsxs("button",{className:"fb-action-btn secondary",onClick:Se,disabled:I.size===0||ce.size>0,title:"Index selected files for RAG search",children:[o.jsx(Au,{size:14}),"Index Selected"]}),o.jsxs("button",{className:"fb-action-btn primary",onClick:pe,disabled:I.size===0,title:"Send selected files to the chat agent for analysis",children:[o.jsx(oy,{size:14}),"Ask Agent"]})]})]})]})]})})}const As=32768,qd="Qwen3.5-35B-A3B-GGUF",R6=3e5,O6=18e5,P6=1e4;function hE(e){const[t,n]=_.useState(!1),[r,i]=_.useState(!1),s=_.useRef(null),a=_.useRef(null),u=_.useRef(null),l=_.useCallback(()=>{s.current&&(clearTimeout(s.current),s.current=null),a.current&&(clearTimeout(a.current),a.current=null),u.current&&(clearInterval(u.current),u.current=null)},[]);_.useEffect(()=>l,[l]);const d=_.useCallback((p,E)=>{u.current&&clearInterval(u.current),u.current=setInterval(async()=>{var k,L;try{const g=await kd();E==="load"?((k=g.model_loaded)==null?void 0:k.toLowerCase())===p.toLowerCase()&&(n(!1),s.current&&(clearTimeout(s.current),s.current=null),u.current&&(clearInterval(u.current),u.current=null)):(g.model_downloaded===!0||((L=g.model_loaded)==null?void 0:L.toLowerCase())===p.toLowerCase())&&(i(!1),a.current&&(clearTimeout(a.current),a.current=null),u.current&&(clearInterval(u.current),u.current=null))}catch{}},P6)},[]),f=e??qd,h=_.useCallback(async p=>{const E=p??f;n(!0);try{await mb(E,As),M.system.info(`Load model triggered: ${E}`),s.current&&clearTimeout(s.current),s.current=setTimeout(()=>n(!1),R6),d(E,"load")}catch(k){M.system.error("Failed to trigger model load",k),n(!1)}},[f,d]),m=_.useCallback(async(p=!1,E)=>{const k=E??f;i(!0);try{await pb(k,p),M.system.info(`Download model triggered: ${k} (force=${p})`),a.current&&clearTimeout(a.current),a.current=setTimeout(()=>i(!1),O6),d(k,"download")}catch(L){M.system.error("Failed to trigger model download",L),i(!1)}},[f,d]);return{isLoadingModel:t,isDownloadingModel:r,loadModel:h,downloadModel:m}}function M6(){const{setShowSettings:e,sessions:t,removeSession:n}=Ce(),[r,i]=_.useState(null),[s,a]=_.useState(!0),[u,l]=_.useState([]);_.useEffect(()=>{M.system.info("Checking system status...");const I=M.system.time();kd().then(D=>{i(D),M.system.timed("System status received",I,{lemonade:D.lemonade_running?"running":"stopped",model:D.model_loaded||"none",embedding:D.embedding_model_loaded?"yes":"no",disk:`${D.disk_space_gb}GB free`,memory:`${D.memory_available_gb}GB available`}),D.lemonade_running||M.system.warn("Lemonade Server is NOT running.")}).catch(D=>{M.system.error("Failed to get system status",D),i(null)}).finally(()=>a(!1)),Rb().then(D=>l(D.servers)).catch(()=>{})},[]);const d=(r==null?void 0:r.default_model_name)??qd,{isLoadingModel:f,isDownloadingModel:h,loadModel:m,downloadModel:p}=hE(d),[E,k]=_.useState(!1),L=_.useRef(null);_.useEffect(()=>()=>{L.current&&clearTimeout(L.current)},[]);const g=_.useCallback(async()=>{if(!E){k(!0),L.current&&clearTimeout(L.current),L.current=setTimeout(()=>k(!1),4e3);return}k(!1),L.current&&clearTimeout(L.current),M.system.warn(`Clearing ALL data: ${t.length} session(s)`);const I=M.system.time();let D=0;for(const Y of t)try{await p1(Y.id),n(Y.id),D++}catch(w){M.system.error(`Failed to delete session ${Y.id}`,w)}M.system.timed(`Cleared ${D}/${t.length} session(s)`,I),e(!1)},[E,t,n,e]),T="0.17.2",x=!!(r!=null&&r.lemonade_running&&r.model_loaded&&r.expected_model_loaded===!1),R=!!(r!=null&&r.lemonade_running&&r.model_loaded&&r.context_size_sufficient===!1),B=!!(r!=null&&r.lemonade_running&&!r.model_loaded&&r.model_downloaded===!1),C=x||R;return o.jsx("div",{className:"modal-overlay",onClick:()=>e(!1),role:"dialog","aria-modal":"true","aria-label":"Settings",children:o.jsxs("div",{className:"modal-panel settings-modal",onClick:I=>I.stopPropagation(),children:[o.jsxs("div",{className:"modal-header",children:[o.jsx("h3",{children:"Settings"}),o.jsx("button",{className:"btn-icon",onClick:()=>e(!1),"aria-label":"Close settings",children:o.jsx(bt,{size:18})})]}),o.jsxs("div",{className:"modal-body",children:[o.jsxs("section",{className:"settings-section",children:[o.jsx("h4",{children:"System Status"}),s?o.jsx("p",{className:"loading-text",children:"Checking system..."}):r?o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"status-grid",children:[o.jsx(hn,{label:"Lemonade Server",value:r.lemonade_running?`Running${r.lemonade_version?` v${r.lemonade_version}`:""}`:"Not Running",ok:r.lemonade_running,hint:r.lemonade_running?void 0:r.initialized?"Run: lemonade-server serve":"Run: gaia init --profile chat"}),o.jsx(hn,{label:"Model",value:r.model_loaded||"None loaded",ok:!!r.model_loaded&&r.expected_model_loaded!==!1,hint:r.model_loaded?r.expected_model_loaded===!1?`Expected: ${d}`:void 0:"Run: gaia init --profile chat"}),r.model_size_gb!=null&&o.jsx(hn,{label:"Model Size",value:`${r.model_size_gb} GB`,ok:!0}),r.model_device&&o.jsx(hn,{label:"Device",value:r.model_device.toUpperCase(),ok:r.model_device!=="cpu"}),r.model_context_size!=null&&o.jsx(hn,{label:"Context Window",value:`${(r.model_context_size/1024).toFixed(0)}K tokens`,ok:r.context_size_sufficient}),r.model_labels&&r.model_labels.length>0&&o.jsx(hn,{label:"Capabilities",value:r.model_labels.join(", "),ok:!0}),o.jsx(hn,{label:"Embedding Model",value:r.embedding_model_loaded?"Available":"Not loaded",ok:r.embedding_model_loaded}),r.gpu_name&&o.jsx(hn,{label:"GPU",value:`${r.gpu_name}${r.gpu_vram_gb?` (${r.gpu_vram_gb} GB)`:""}`,ok:!0}),o.jsx(hn,{label:"Disk Space",value:`${r.disk_space_gb} GB free`,ok:r.disk_space_gb>5,hint:!r.model_loaded&&r.disk_space_gb<30?`Models require ~25 GB — only ${r.disk_space_gb} GB available`:void 0}),o.jsx(hn,{label:"Memory",value:`${r.memory_available_gb} GB available`,ok:r.memory_available_gb>2}),r.processor_name&&o.jsx(hn,{label:"Processor",value:r.processor_name,ok:r.device_supported!==!1})]}),B&&o.jsxs("div",{className:"model-action-row model-action-row--download",children:[o.jsxs("div",{className:"model-action-info",children:[o.jsx("span",{className:"model-action-label",children:"Model not downloaded."}),o.jsxs("span",{className:"model-action-desc",children:[o.jsx("strong",{children:d})," is required for GAIA Chat (~25 GB)."]})]}),o.jsx("button",{className:"btn-model-action btn-model-action--download",onClick:()=>p(!1),disabled:h,children:h?o.jsxs(o.Fragment,{children:[o.jsx(Br,{size:13,className:"btn-spinner"})," Downloading…"]}):"Download"})]}),C&&o.jsxs("div",{className:"model-action-row model-action-row--load",children:[o.jsxs("div",{className:"model-action-info",children:[o.jsx("span",{className:"model-action-label",children:x?"Wrong model loaded.":"Context window too small."}),o.jsxs("span",{className:"model-action-desc",children:["Load ",o.jsx("strong",{children:d})," with ",(As/1024).toFixed(0),"K token context."]})]}),o.jsx("button",{className:"btn-model-action btn-model-action--load",onClick:()=>m(),disabled:f,children:f?o.jsxs(o.Fragment,{children:[o.jsx(Br,{size:13,className:"btn-spinner"})," Loading…"]}):"Load Model"})]}),r.lemonade_running&&o.jsxs("div",{className:"force-redownload-row",children:[o.jsx("span",{className:"force-redownload-label",children:"If the model file is corrupted:"}),o.jsx("button",{className:"btn-force-redownload",onClick:()=>p(!0),disabled:h,children:h?o.jsxs(o.Fragment,{children:[o.jsx(Br,{size:12,className:"btn-spinner"})," Downloading…"]}):"Force Re-download"})]})]}):o.jsxs("div",{className:"status-error",children:[o.jsx("p",{children:"Could not connect to server"}),o.jsx("code",{children:"gaia chat --ui"})]})]}),u.length>0&&o.jsxs("section",{className:"settings-section",children:[o.jsx("h4",{children:"MCP Servers"}),o.jsx("div",{className:"status-grid",children:u.map(I=>o.jsxs("div",{className:"status-row",children:[o.jsx("span",{className:"status-label",children:I.name}),o.jsx("div",{className:"status-value-wrap",children:I.connected?o.jsxs("span",{className:"status-value ok mcp-status-connected",children:[o.jsx(bd,{size:12}),I.tool_count," tool",I.tool_count!==1?"s":""]}):o.jsxs("span",{className:"status-value warn mcp-status-failed",title:I.error??void 0,children:[o.jsx(xr,{size:12}),"Failed"]})})]},I.name))})]}),o.jsxs("section",{className:"settings-section",children:[o.jsx("h4",{children:"About"}),o.jsxs("div",{className:"about-info",children:[o.jsxs("p",{children:["GAIA v",T," ",o.jsx("span",{className:"beta-badge",children:"BETA"})]}),o.jsx("p",{className:"about-sub",children:"Privacy-first AI chat for AMD Ryzen AI PCs."})]})]}),o.jsxs("section",{className:"settings-section danger-zone",children:[o.jsx("h4",{children:"Privacy & Data"}),o.jsxs("div",{className:"setting-row",children:[o.jsx("span",{children:"Data location"}),o.jsx("code",{className:"setting-path",children:"~/.gaia/chat/"})]}),o.jsx("div",{className:"danger-divider"}),o.jsxs("div",{className:"setting-actions",children:[o.jsx("p",{className:"danger-warning",children:"This will permanently delete all sessions, messages, and documents."}),o.jsx("button",{className:"btn-danger",onClick:g,children:E?"Click again to confirm":"Clear All Data"})]})]})]})]})})}function hn({label:e,value:t,ok:n,hint:r}){return o.jsxs("div",{className:`status-row${r?" status-row--has-hint":""}`,children:[o.jsx("span",{className:"status-label",children:e}),o.jsxs("div",{className:"status-value-wrap",children:[o.jsx("span",{className:`status-value ${n?"ok":"warn"}`,children:t}),r&&o.jsx("span",{className:"status-hint",children:o.jsx("code",{children:r})})]})]})}const F6="modulepreload",B6=function(e,t){return new URL(e,t).href},U0={},j6=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){const a=document.getElementsByTagName("link"),u=document.querySelector("meta[property=csp-nonce]"),l=(u==null?void 0:u.nonce)||(u==null?void 0:u.getAttribute("nonce"));i=Promise.allSettled(n.map(d=>{if(d=B6(d,r),d in U0)return;U0[d]=!0;const f=d.endsWith(".css"),h=f?'[rel="stylesheet"]':"";if(!!r)for(let E=a.length-1;E>=0;E--){const k=a[E];if(k.href===d&&(!f||k.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${d}"]${h}`))return;const p=document.createElement("link");if(p.rel=f?"stylesheet":F6,f||(p.as="script"),p.crossOrigin="",p.href=d,l&&p.setAttribute("nonce",l),document.head.appendChild(p),f)return new Promise((E,k)=>{p.addEventListener("load",E),p.addEventListener("error",()=>k(new Error(`Unable to preload CSS for ${d}`)))})}))}function s(a){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=a,window.dispatchEvent(u),!u.defaultPrevented)throw a}return i.then(a=>{for(const u of a||[])u.status==="rejected"&&s(u.reason);return t().catch(s)})};let fo=null;function U6({isOpen:e,onClose:t,error:n}){const[r,i]=_.useState(null),[s,a]=_.useState(!1),u=_.useRef(null),l=_.useCallback(async()=>{try{const m=await y1();return i(m),m}catch(m){return M.system.error("Failed to fetch tunnel status",m),null}},[]);_.useEffect(()=>{if(!e||n)return;l();const m=setInterval(async()=>{const p=await l();p!=null&&p.active&&(p!=null&&p.url)&&clearInterval(m)},2e3);return()=>clearInterval(m)},[e,n,l]),_.useEffect(()=>{if(!(r!=null&&r.active)||!r.url||!r.token||!u.current)return;const m=`${r.url}/?token=${r.token}`;M.system.info(`Generating QR code for: ${m}`),(async()=>{if(!fo)try{const k=await j6(()=>import("./browser-CTB2jwNe.js").then(L=>L.b),[],import.meta.url);fo=k.default||k}catch{M.system.error("QR code library not available - install with: npm install qrcode");return}const E=document.documentElement.getAttribute("data-theme")==="dark";try{await fo.toCanvas(u.current,m,{width:200,margin:2,color:{dark:E?"#e6edf3":"#111827",light:E?"#0d0d0d":"#ffffff"}})}catch(k){M.system.error("QR code generation failed",k)}})()},[r==null?void 0:r.active,r==null?void 0:r.url,r==null?void 0:r.token]);const d=_.useRef(null),f=_.useCallback(()=>{if(!(r!=null&&r.url)||!(r!=null&&r.token))return;const m=`${r.url}/?token=${r.token}`;navigator.clipboard.writeText(m).then(()=>{a(!0),d.current&&clearTimeout(d.current),d.current=setTimeout(()=>a(!1),2e3)})},[r]);if(_.useEffect(()=>()=>{d.current&&clearTimeout(d.current)},[]),!e)return null;const h=r!=null&&r.active&&(r!=null&&r.url)&&(r!=null&&r.token)?`${r.url}/?token=${r.token}`:"";return o.jsx("div",{className:"modal-overlay",onClick:t,role:"dialog","aria-modal":"true","aria-label":"Mobile Access",children:o.jsxs("div",{className:"modal-panel mobile-modal",onClick:m=>m.stopPropagation(),children:[o.jsxs("div",{className:"modal-header",children:[o.jsxs("h3",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[o.jsx(s1,{size:18}),"Mobile Access"]}),o.jsx("button",{className:"btn-icon",onClick:t,"aria-label":"Close",children:o.jsx(bt,{size:18})})]}),o.jsxs("div",{className:"modal-body mobile-modal-body",children:[o.jsxs("div",{className:"tunnel-status",children:[o.jsx("span",{className:`status-dot ${r!=null&&r.active?"active":n?"error":"starting"}`}),o.jsx("span",{children:r!=null&&r.active?"Tunnel active":n?"Connection failed":"Starting tunnel..."}),!(r!=null&&r.active)&&!n&&o.jsx("span",{className:"tunnel-spinner"})]}),n&&o.jsx("div",{className:"tunnel-error",children:n}),o.jsx("div",{className:"qr-code-area",children:r!=null&&r.active?o.jsx("canvas",{ref:u}):n?o.jsx("div",{className:"qr-placeholder error",children:"Failed to connect"}):o.jsxs("div",{className:"qr-placeholder",children:[o.jsx("div",{className:"placeholder-spinner"}),o.jsx("span",{children:"Connecting..."})]})}),(r==null?void 0:r.active)&&h&&o.jsxs("div",{className:"tunnel-url-area",children:[o.jsx("label",{children:"Mobile URL"}),o.jsxs("div",{className:"tunnel-url-row",children:[o.jsx("input",{type:"text",readOnly:!0,value:h}),o.jsxs("button",{className:`copy-url-btn ${s?"copied":""}`,onClick:f,title:"Copy URL",children:[s?o.jsx(na,{size:13}):o.jsx(tl,{size:13}),s?"Copied":"Copy"]})]})]}),(r==null?void 0:r.active)&&(r==null?void 0:r.publicIp)&&(r==null?void 0:r.url)&&!r.url.includes("ngrok-free.app")&&o.jsxs("div",{className:"tunnel-password-hint",children:[o.jsx("label",{children:"Tunnel Password"}),o.jsx("div",{className:"tunnel-password-value",children:r.publicIp}),o.jsx("span",{className:"tunnel-password-note",children:"Enter this when the tunnel page asks for a password"})]}),o.jsx("div",{className:"mobile-instructions",children:o.jsxs("ol",{children:[o.jsx("li",{children:"Scan the QR code with your phone's camera"}),(r==null?void 0:r.url)&&!r.url.includes("ngrok-free.app")&&o.jsx("li",{children:"Enter the tunnel password shown above when prompted"}),o.jsx("li",{children:"Chat with GAIA from your mobile device"}),o.jsx("li",{children:"Your data stays secure via encrypted tunnel"})]})}),o.jsx("div",{className:"mobile-access-actions",children:o.jsx("button",{className:"btn-secondary",onClick:t,children:"Close"})})]})]})})}function H6({onRetry:e}){var g;const{backendConnected:t,systemStatus:n,currentSessionId:r,messages:i}=Ce(),[s,a]=_.useState(!1),u=!!r&&i.length>0,l=(n==null?void 0:n.default_model_name)??qd,{isLoadingModel:d,isDownloadingModel:f,loadModel:h,downloadModel:m}=hE(l),p=_.useRef(n==null?void 0:n.lemonade_running),E=_.useRef(n==null?void 0:n.model_downloaded),k=_.useRef(n==null?void 0:n.context_size_sufficient),L=_.useRef(n==null?void 0:n.expected_model_loaded);if(_.useEffect(()=>{if(u)return;const T=n==null?void 0:n.lemonade_running,x=n==null?void 0:n.model_downloaded,R=n==null?void 0:n.context_size_sufficient,B=n==null?void 0:n.expected_model_loaded;let C=!1;p.current!==T&&(p.current=T,T===!1&&(C=!0)),E.current!==x&&(E.current=x,x===!1&&(C=!0)),k.current!==R&&(k.current=R,R===!1&&(C=!0)),L.current!==B&&(L.current=B,B===!1&&(C=!0)),C&&a(!1)},[n,u]),(n==null?void 0:n.init_state)==="initializing"){const T=(g=n.init_tasks)==null?void 0:g.find(R=>R.status==="running"),x=(T==null?void 0:T.name)||"Preparing AI system";return o.jsxs("div",{className:"connection-banner connection-banner--init",role:"status",children:[o.jsx("div",{className:"connection-banner__icon",children:o.jsx(Br,{size:16,className:"connection-banner__spinner"})}),o.jsxs("div",{className:"connection-banner__text",children:[x,o.jsxs("span",{className:"thinking-dots",children:[o.jsx("span",{children:"."}),o.jsx("span",{children:"."}),o.jsx("span",{children:"."})]})]})]})}if(s||u)return null;if(!t)return o.jsxs("div",{className:"connection-banner connection-banner--error",role:"alert",children:[o.jsx("div",{className:"connection-banner__icon",children:o.jsx(Fy,{size:16})}),o.jsxs("div",{className:"connection-banner__text",children:["Cannot connect to GAIA server."," ",o.jsxs("span",{className:"connection-banner__hint",children:["Start it with: ",o.jsx("code",{children:"gaia chat --ui"})]})]}),e&&o.jsx("button",{className:"connection-banner__retry",onClick:e,children:"Retry"})]});if(n&&!n.lemonade_running)return o.jsxs("div",{className:"connection-banner connection-banner--warning",role:"status",children:[o.jsx("div",{className:"connection-banner__icon",children:o.jsx(Vr,{size:16})}),o.jsxs("div",{className:"connection-banner__text",children:["LLM server is not responding — it may be busy or not running."," ",o.jsxs("span",{className:"connection-banner__hint",children:["If not started, run: ",o.jsx("code",{children:"lemonade-server serve"})]})]}),e&&o.jsx("button",{className:"connection-banner__retry",onClick:e,children:"Check again"}),o.jsx("button",{className:"connection-banner__dismiss",onClick:()=>a(!0),"aria-label":"Dismiss",children:o.jsx(bt,{size:14})})]});if(n&&n.lemonade_running&&!n.model_loaded&&n.model_downloaded===!1)return o.jsxs("div",{className:"connection-banner connection-banner--warning",role:"status",children:[o.jsx("div",{className:"connection-banner__icon",children:o.jsx(Ws,{size:16})}),o.jsxs("div",{className:"connection-banner__text",children:["Required model ",o.jsx("strong",{children:l})," is not downloaded (~25 GB)."]}),f?o.jsxs("span",{className:"connection-banner__loading",children:[o.jsx(Br,{size:13,className:"connection-banner__spinner"}),"Downloading…"]}):o.jsx("button",{className:"connection-banner__retry",onClick:()=>m(!1),children:"Download"}),e&&!f&&o.jsx("button",{className:"connection-banner__retry connection-banner__retry--secondary",onClick:e,children:"Recheck"}),o.jsx("button",{className:"connection-banner__dismiss",onClick:()=>a(!0),"aria-label":"Dismiss",children:o.jsx(bt,{size:14})})]});if(n&&n.lemonade_running&&n.model_loaded&&n.expected_model_loaded===!1&&!n.embedding_model_loaded){const T=n.model_loaded,x=n.context_size_sufficient===!1;return o.jsxs("div",{className:"connection-banner connection-banner--warning",role:"status",children:[o.jsx("div",{className:"connection-banner__icon",children:o.jsx(hy,{size:16})}),o.jsxs("div",{className:"connection-banner__text",children:["Wrong model loaded: ",o.jsx("strong",{children:T}),"."," ","GAIA Chat requires ",o.jsx("strong",{children:l}),".",x&&o.jsxs(o.Fragment,{children:[" ","Context window is also too small."]})]}),d?o.jsxs("span",{className:"connection-banner__loading",children:[o.jsx(Br,{size:13,className:"connection-banner__spinner"}),"Loading…"]}):o.jsx("button",{className:"connection-banner__retry",onClick:()=>h(),children:"Load Now"}),e&&!d&&o.jsx("button",{className:"connection-banner__retry connection-banner__retry--secondary",onClick:e,children:"Recheck"}),o.jsx("button",{className:"connection-banner__dismiss",onClick:()=>a(!0),"aria-label":"Dismiss",children:o.jsx(bt,{size:14})})]})}if(n&&n.lemonade_running&&n.model_loaded&&n.context_size_sufficient===!1){const T=n.model_context_size??0,x=n.lemonade_url??"http://localhost:8000";return o.jsxs("div",{className:"connection-banner connection-banner--warning",role:"status",children:[o.jsx("div",{className:"connection-banner__icon",children:o.jsx(Ty,{size:16})}),o.jsxs("div",{className:"connection-banner__text",children:["LLM context window is too small (",T.toLocaleString()," tokens;"," ",As.toLocaleString()," required)."," ",o.jsxs("span",{className:"connection-banner__hint",children:["In"," ",o.jsx("a",{className:"connection-banner__link",href:x,target:"_blank",rel:"noreferrer",children:"Lemonade"}),", set ctx‑size to ",As.toLocaleString(),", or restart with:"," ",o.jsxs("code",{children:["lemonade-server serve --ctx-size ",As]})]})]}),e&&o.jsx("button",{className:"connection-banner__retry",onClick:e,children:"Check again"}),o.jsx("button",{className:"connection-banner__dismiss",onClick:()=>a(!0),"aria-label":"Dismiss",children:o.jsx(bt,{size:14})})]})}return null}const z6={status:"idle",version:null,progress:0,releaseNotes:null,error:null};function $6(){const[e,t]=_.useState(z6);return _.useEffect(()=>{const n=window.gaiaUpdater;if(!n)return;let r=!0;n.getStatus().then(s=>{r&&s&&t(s)}).catch(()=>{});const i=n.onStatusChange(s=>{r&&s&&t(s)});return()=>{r=!1;try{i()}catch{}}},[]),e}function Y6(){const e=$6(),[t,n]=_.useState(!1),r=_.useCallback(()=>{const i=window.gaiaUpdater;i==null||i.check().catch(()=>{})},[]);if(t||e.status==="idle"||e.status==="checking"||e.status==="disabled")return null;if(e.status==="downloading"){const i=Math.max(0,Math.min(100,e.progress));return o.jsxs("div",{className:"update-chip update-chip--downloading",role:"status","aria-live":"polite",title:`Downloading update${e.version?` ${e.version}`:""}…`,children:[o.jsx(Ws,{size:13,className:"update-chip__icon"}),o.jsxs("span",{className:"update-chip__label",children:["Downloading update… ",i,"%"]})]})}return e.status==="available"?o.jsxs("div",{className:"update-chip update-chip--available",role:"status",title:e.releaseNotes||"A new version is available.",children:[o.jsx(Ws,{size:13,className:"update-chip__icon"}),o.jsxs("span",{className:"update-chip__label",children:["Update available",e.version?`: ${e.version}`:""]}),o.jsx("button",{type:"button",className:"update-chip__dismiss",onClick:()=>n(!0),"aria-label":"Dismiss update notification",children:o.jsx(bt,{size:11})})]}):e.status==="downloaded"?o.jsxs("div",{className:"update-chip update-chip--ready",role:"status","aria-live":"polite",children:[o.jsx(i1,{size:13,className:"update-chip__icon"}),o.jsx("button",{type:"button",className:"update-chip__action",onClick:r,title:"Click to restart and apply the update",children:"Update ready — restart to apply"})]}):e.status==="error"?o.jsxs("div",{className:"update-chip update-chip--error",role:"status",title:e.error||"Update check failed.",children:[o.jsx(Vr,{size:13,className:"update-chip__icon"}),o.jsx("span",{className:"update-chip__label",children:"Update check failed"}),o.jsx("button",{type:"button",className:"update-chip__dismiss",onClick:()=>n(!0),"aria-label":"Dismiss update error",children:o.jsx(bt,{size:11})})]}):null}function V6(){const e=Mu(f6),t=Mu(n=>n.respondToPermission);return e?o.jsx("div",{className:"permission-overlay",role:"dialog","aria-modal":"true","aria-label":"Permission Request",children:o.jsx(W6,{notification:e,onRespond:t},e.id)}):null}function W6({notification:e,onRespond:t}){const n=e.timeoutSeconds!=null&&e.timeoutSeconds>0,[r,i]=_.useState(n?e.timeoutSeconds:null),s=_.useRef(null),[a,u]=_.useState(!1),[l,d]=_.useState(!1),f=_.useRef(!1),h=_.useRef(t);h.current=t,_.useEffect(()=>{if(n)return s.current=setInterval(()=>{i(L=>L===null||L<=1?(s.current&&clearInterval(s.current),0):L-1)},1e3),()=>{s.current&&clearInterval(s.current)}},[n]),_.useEffect(()=>{if(r===0){if(f.current)return;f.current=!0,u(!0),h.current(e.id,"deny",!1)}},[r,e.id]);const m=_.useCallback(async()=>{if(!f.current){f.current=!0,u(!0),s.current&&clearInterval(s.current);try{await t(e.id,"allow",l)}finally{f.current=!1,u(!1)}}},[e.id,t,l]),p=_.useCallback(async()=>{if(!f.current){f.current=!0,u(!0),s.current&&clearInterval(s.current);try{await t(e.id,"deny",!1)}finally{f.current=!1,u(!1)}}},[e.id,t]);_.useEffect(()=>{const L=g=>{g.key==="Enter"&&!g.shiftKey?(g.preventDefault(),m()):g.key==="Escape"&&(g.preventDefault(),p())};return window.addEventListener("keydown",L),()=>window.removeEventListener("keydown",L)},[m,p]);const E=e.toolArgs,k=E&&Object.keys(E).length>0;return o.jsxs("div",{className:"permission-prompt",children:[o.jsxs("div",{className:"permission-header",children:[o.jsx("div",{className:"permission-header-icon",children:o.jsx(Ry,{size:24})}),o.jsxs("div",{className:"permission-header-text",children:[o.jsx("h2",{className:"permission-title",children:"Permission Request"}),o.jsx("span",{className:"permission-agent",children:e.agentName})]}),r!==null&&r>0&&o.jsxs("div",{className:"permission-countdown",title:"Auto-deny on timeout",children:[o.jsx(Zp,{size:14}),o.jsxs("span",{children:[r,"s"]})]})]}),o.jsxs("div",{className:"permission-body",children:[o.jsx("p",{className:"permission-message",children:e.message}),e.tool&&o.jsxs("div",{className:"permission-tool-info",children:[o.jsxs("div",{className:"permission-tool-header",children:[o.jsx(Vr,{size:14}),o.jsx("span",{children:"Tool Invocation"})]}),o.jsx("div",{className:"permission-tool-name",children:o.jsx("code",{children:e.tool})}),k&&o.jsx("div",{className:"permission-tool-args",children:o.jsx("pre",{children:JSON.stringify(E,null,2)})})]}),e.priority==="critical"&&o.jsxs("div",{className:"permission-critical-banner",children:[o.jsx(Vr,{size:14}),o.jsx("span",{children:"This is a critical-tier operation"})]}),o.jsxs("label",{className:"permission-remember",children:[o.jsx("input",{type:"checkbox",checked:l,onChange:L=>d(L.target.checked),disabled:a}),o.jsx("span",{children:"Always allow this tool"})]})]}),o.jsxs("div",{className:"permission-actions",children:[o.jsxs("button",{className:"permission-btn permission-btn-deny",onClick:p,disabled:a,title:"Deny (Esc)",children:[o.jsx(bt,{size:16}),"Deny"]}),o.jsxs("button",{className:"permission-btn permission-btn-allow",onClick:m,disabled:a,title:"Allow (Enter)",children:[o.jsx(na,{size:16}),"Allow"]})]}),o.jsxs("div",{className:"permission-hints",children:[o.jsxs("span",{children:[o.jsx("kbd",{children:"Enter"})," Allow"]}),o.jsxs("span",{children:[o.jsx("kbd",{children:"Esc"})," Deny"]})]})]})}function Ma({show:e,children:t,duration:n=250}){const[r,i]=_.useState(!1),[s,a]=_.useState("idle");return _.useEffect(()=>{if(e)i(!0),requestAnimationFrame(()=>a("entering"));else if(r){a("exiting");const u=setTimeout(()=>{i(!1),a("idle")},n);return()=>clearTimeout(u)}},[e,r,n]),r?o.jsx("div",{className:`animated-presence ${s}`,"data-duration":n,children:t}):null}function q6(){const{currentSessionId:e,setSessions:t,setCurrentSession:n,addSession:r,removeSession:i,updateSessionInList:s,setMessages:a,showDocLibrary:u,showFileBrowser:l,showSettings:d,sidebarOpen:f,toggleSidebar:h,setSidebarOpen:m,systemStatus:p,setSystemStatus:E,setBackendConnected:k,setAgents:L}=Ce(),g=_.useRef(""),T=_.useCallback(async()=>{try{const ue=(await m1()).agents||[],fe=ue.map(me=>me.id).sort().join(",");fe!==g.current&&(g.current=fe,L(ue))}catch{}},[L]);_.useEffect(()=>{T();const z=setInterval(T,3e4);return()=>clearInterval(z)},[T]);const[x,R]=_.useState(!1),[B,C]=_.useState(!1),[I,D]=_.useState(!1),[Y,w]=_.useState(null),V=_.useRef(null),X=_.useRef(0),ce=3,se=_.useCallback(async()=>{try{const z=await kd();if(k(!0),z.lemonade_running)X.current=0,E(z);else if(X.current+=1,M.system.warn(`Lemonade health check failed (${X.current}/${ce})`),X.current>=ce)E(z);else{const ue=Ce.getState().systemStatus;ue&&ue.lemonade_running?E({...ue,disk_space_gb:z.disk_space_gb,memory_available_gb:z.memory_available_gb}):E(z)}M.system.info("System status:",{lemonade:z.lemonade_running,model:z.model_loaded,failCount:X.current})}catch(z){M.system.warn("System status check failed",z),k(!1),E(null)}},[E,k]),de=_.useRef(3e3);_.useEffect(()=>(se(),de.current=3e3,V.current=setInterval(se,3e3),()=>{V.current&&clearInterval(V.current)}),[se]),_.useEffect(()=>{const z=p==null?void 0:p.init_state;if(!z||z==="initializing")return;const ue=15e3;ue!==de.current&&(de.current=ue,V.current&&clearInterval(V.current),V.current=setInterval(se,ue))},[p==null?void 0:p.init_state,se]);const ae=_.useRef(null),Te=_.useRef("");_.useEffect(()=>{hb("0.17.2"),M.system.info("App mounting, loading sessions...");const z=M.system.time(),ue=me=>me.map(Ne=>`${Ne.id}|${Ne.updated_at}|${Ne.title}`).join(`
437
+ `),fe=(me=!1)=>{gb().then(Ne=>{const it=Ne.sessions||[];if(me){t(it),k(!0),Te.current=ue(it),M.system.timed(`Loaded ${it.length} session(s)`,z);return}const At=Ce.getState().sessions;if(it.length===0&&At.length>0){M.system.warn(`Session poll returned 0 sessions but sidebar has ${At.length} — skipping update to prevent data loss`);return}const Ot=ue(it);Ot!==Te.current&&(M.system.info(`Session list changed (${At.length} → ${it.length} sessions)`),t(it),Te.current=Ot)}).catch(Ne=>{me&&(M.system.error("Failed to load sessions from backend",Ne),M.system.warn("Is the Python backend running? Start it with: gaia chat --ui"))})};return fe(!0),ae.current=setInterval(()=>fe(!1),5e3),()=>{ae.current&&clearInterval(ae.current)}},[t,r,i,s,k]),_.useEffect(()=>{if(e)return;const ue=new URLSearchParams(window.location.search).get("session"),fe=window.location.hash.replace(/^#/,""),me=ue||fe;if(!me)return;M.nav.info(`URL session parameter: ${me}`);const Ne=setTimeout(()=>{const{sessions:it}=Ce.getState();let At=it.some(Ot=>Ot.id===me)?me:Ob(it,me);At?(n(At),a([])):M.nav.warn(`Session ${me} not found in loaded sessions`)},500);return()=>clearTimeout(Ne)},[e,n,a]),_.useEffect(()=>{if(e){const z=En(e);window.location.hash!==`#${z}`&&window.history.replaceState(null,"",`#${z}`)}else window.location.hash&&window.history.replaceState(null,"",window.location.pathname+window.location.search)},[e]),_.useEffect(()=>{y1().then(z=>{C(z.active===!0)}).catch(()=>{})},[]),_.useEffect(()=>{const z=()=>{window.innerWidth>768&&m(!0)};return window.addEventListener("resize",z),()=>window.removeEventListener("resize",z)},[m]);const[v,F]=_.useState(null),y=_.useCallback(async()=>{M.chat.info("Creating new task session..."),F(null);try{const{activeAgentId:z}=Ce.getState(),ue=await uc({title:"New Task",agent_type:z});M.chat.info(`Session created: id=${ue.id}, title="${ue.title}"`),r(ue),n(ue.id),a([]),window.innerWidth<=768&&m(!1)}catch(z){M.chat.error("Failed to create session",z),se(),F("Failed to create task. Is the server running?"),setTimeout(()=>F(null),6e3)}},[r,n,a,m,se]),ee=_.useCallback(async z=>{Ce.getState().setActiveAgentId(z),await y()},[y]),{setPendingPrompt:le}=Ce(),N=_.useCallback(async z=>{M.chat.info(`New task with prompt: "${z.slice(0,60)}..."`),le(z),await y()},[y,le]),Ee=_.useCallback(async()=>{M.chat.info("Creating builder agent session..."),F(null);try{le("Hi, I'd like to create a new custom agent.");const z=await uc({title:"New Agent",agent_type:"builder"});M.chat.info(`Builder session created: id=${z.id}`),r(z),n(z.id),a([]),window.innerWidth<=768&&m(!1)}catch(z){le(null),M.chat.error("Failed to create builder session",z),se(),F("Failed to create task. Is the server running?"),setTimeout(()=>F(null),6e3)}},[r,n,a,m,se,le]),Se=_.useCallback(async()=>{if(B){M.system.info("Stopping mobile access tunnel...");try{await Db()}catch{}C(!1),R(!1)}else{M.system.info("Starting mobile access tunnel..."),R(!0),D(!0),w(null);try{const z=await Lb();z.error?(M.system.error("Tunnel failed to start:",z.error),C(!1),w(z.error)):(C(!0),M.system.info("Tunnel started successfully"))}catch(z){M.system.error("Tunnel start error:",z),C(!1),w(z instanceof Error?z.message:"Failed to connect")}finally{D(!1)}}},[B]);_.useEffect(()=>{const{sessions:z,setActiveAgentId:ue}=Ce.getState(),fe=z.find(me=>me.id===e);fe!=null&&fe.agent_type&&ue(fe.agent_type)},[e]),_.useEffect(()=>{e?M.nav.info(`Viewing session: ${e}`):M.nav.info("Viewing welcome screen (no session selected)")},[e]),_.useEffect(()=>{u&&M.ui.info("Document Library opened")},[u]),_.useEffect(()=>{d&&M.ui.info("Settings modal opened")},[d]);const[pe,Qe]=_.useState(typeof window<"u"&&window.innerWidth<=768);_.useEffect(()=>{const z=()=>Qe(window.innerWidth<=768);return window.addEventListener("resize",z),()=>window.removeEventListener("resize",z)},[]);const[Ct,Nt]=_.useState(!1),[j,q]=_.useState(null);return _.useEffect(()=>{if(e!==j){Nt(!0);const z=setTimeout(()=>{q(e),requestAnimationFrame(()=>{requestAnimationFrame(()=>{Nt(!1)})})},220);return()=>clearTimeout(z)}},[e,j]),o.jsxs("div",{className:"app",children:[o.jsx("button",{className:"sidebar-toggle",onClick:h,"aria-label":f?"Close sidebar":"Open sidebar",children:o.jsx(ky,{size:18})}),o.jsx("div",{className:`sidebar-overlay ${f?"visible":""}`,onClick:()=>m(!1),"aria-hidden":"true"}),o.jsx(Mb,{onNewTask:y,tunnelActive:B,tunnelLoading:I,onMobileToggle:Se}),o.jsxs("div",{className:"main-content",children:[o.jsx(H6,{onRetry:se}),o.jsx("div",{className:`view-container ${Ct?"view-transitioning":""}`,children:j?o.jsx(T6,{sessionId:j,onCreateAgent:Ee,onAgentChange:ee},j):o.jsx(_6,{onNewTask:y,onSendPrompt:N,onCreateAgent:Ee})})]}),o.jsx(Ma,{show:u,children:o.jsx(N6,{})}),o.jsx(Ma,{show:l,children:o.jsx(D6,{})}),o.jsx(Ma,{show:d,children:o.jsx(M6,{})}),!pe&&o.jsx(Ma,{show:x,children:o.jsx(U6,{isOpen:x,onClose:()=>R(!1),error:Y})}),o.jsx(V6,{}),o.jsx(Y6,{}),v&&o.jsx("div",{className:"toast",role:"alert",children:v})]})}const Q6=localStorage.getItem("gaia-chat-theme");Q6!=="light"&&document.documentElement.setAttribute("data-theme","dark");ho.createRoot(document.getElementById("root")).render(o.jsx(vs.StrictMode,{children:o.jsx(q6,{})}));