@amd-gaia/agent-ui 0.17.3 → 0.17.5

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.
@@ -1,443 +0,0 @@
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 iu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Hu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var K0={exports:{}},zu={},X0={exports:{}},Se={};/**
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 ta=Symbol.for("react.element"),HE=Symbol.for("react.portal"),zE=Symbol.for("react.fragment"),$E=Symbol.for("react.strict_mode"),YE=Symbol.for("react.profiler"),VE=Symbol.for("react.provider"),WE=Symbol.for("react.context"),qE=Symbol.for("react.forward_ref"),QE=Symbol.for("react.suspense"),GE=Symbol.for("react.memo"),KE=Symbol.for("react.lazy"),cf=Symbol.iterator;function XE(e){return e===null||typeof e!="object"?null:(e=cf&&e[cf]||e["@@iterator"],typeof e=="function"?e:null)}var J0={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Z0=Object.assign,em={};function Mi(e,t,n){this.props=e,this.context=t,this.refs=em,this.updater=n||J0}Mi.prototype.isReactComponent={};Mi.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")};Mi.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function tm(){}tm.prototype=Mi.prototype;function Lc(e,t,n){this.props=e,this.context=t,this.refs=em,this.updater=n||J0}var Dc=Lc.prototype=new tm;Dc.constructor=Lc;Z0(Dc,Mi.prototype);Dc.isPureReactComponent=!0;var df=Array.isArray,nm=Object.prototype.hasOwnProperty,Rc={current:null},rm={key:!0,ref:!0,__self:!0,__source:!0};function im(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)nm.call(t,r)&&!rm.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),c=0;c<u;c++)l[c]=arguments[c+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:ta,type:e,key:s,ref:a,props:i,_owner:Rc.current}}function JE(e,t){return{$$typeof:ta,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Oc(e){return typeof e=="object"&&e!==null&&e.$$typeof===ta}function ZE(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var ff=/\/+/g;function Cl(e,t){return typeof e=="object"&&e!==null&&e.key!=null?ZE(""+e.key):t.toString(36)}function Ha(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 ta:case HE:a=!0}}if(a)return a=e,i=i(a),e=r===""?"."+Cl(a,0):r,df(i)?(n="",e!=null&&(n=e.replace(ff,"$&/")+"/"),Ha(i,t,n,"",function(c){return c})):i!=null&&(Oc(i)&&(i=JE(i,n+(!i.key||a&&a.key===i.key?"":(""+i.key).replace(ff,"$&/")+"/")+e)),t.push(i)),1;if(a=0,r=r===""?".":r+":",df(e))for(var u=0;u<e.length;u++){s=e[u];var l=r+Cl(s,u);a+=Ha(s,t,n,l,i)}else if(l=XE(e),typeof l=="function")for(e=l.call(e),u=0;!(s=e.next()).done;)s=s.value,l=r+Cl(s,u++),a+=Ha(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 ga(e,t,n){if(e==null)return e;var r=[],i=0;return Ha(e,r,"","",function(s){return t.call(n,s,i++)}),r}function e2(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 At={current:null},za={transition:null},t2={ReactCurrentDispatcher:At,ReactCurrentBatchConfig:za,ReactCurrentOwner:Rc};function sm(){throw Error("act(...) is not supported in production builds of React.")}Se.Children={map:ga,forEach:function(e,t,n){ga(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ga(e,function(){t++}),t},toArray:function(e){return ga(e,function(t){return t})||[]},only:function(e){if(!Oc(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Se.Component=Mi;Se.Fragment=zE;Se.Profiler=YE;Se.PureComponent=Lc;Se.StrictMode=$E;Se.Suspense=QE;Se.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=t2;Se.act=sm;Se.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=Z0({},e.props),i=e.key,s=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,a=Rc.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var u=e.type.defaultProps;for(l in t)nm.call(t,l)&&!rm.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 c=0;c<l;c++)u[c]=arguments[c+2];r.children=u}return{$$typeof:ta,type:e.type,key:i,ref:s,props:r,_owner:a}};Se.createContext=function(e){return e={$$typeof:WE,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:VE,_context:e},e.Consumer=e};Se.createElement=im;Se.createFactory=function(e){var t=im.bind(null,e);return t.type=e,t};Se.createRef=function(){return{current:null}};Se.forwardRef=function(e){return{$$typeof:qE,render:e}};Se.isValidElement=Oc;Se.lazy=function(e){return{$$typeof:KE,_payload:{_status:-1,_result:e},_init:e2}};Se.memo=function(e,t){return{$$typeof:GE,type:e,compare:t===void 0?null:t}};Se.startTransition=function(e){var t=za.transition;za.transition={};try{e()}finally{za.transition=t}};Se.unstable_act=sm;Se.useCallback=function(e,t){return At.current.useCallback(e,t)};Se.useContext=function(e){return At.current.useContext(e)};Se.useDebugValue=function(){};Se.useDeferredValue=function(e){return At.current.useDeferredValue(e)};Se.useEffect=function(e,t){return At.current.useEffect(e,t)};Se.useId=function(){return At.current.useId()};Se.useImperativeHandle=function(e,t,n){return At.current.useImperativeHandle(e,t,n)};Se.useInsertionEffect=function(e,t){return At.current.useInsertionEffect(e,t)};Se.useLayoutEffect=function(e,t){return At.current.useLayoutEffect(e,t)};Se.useMemo=function(e,t){return At.current.useMemo(e,t)};Se.useReducer=function(e,t,n){return At.current.useReducer(e,t,n)};Se.useRef=function(e){return At.current.useRef(e)};Se.useState=function(e){return At.current.useState(e)};Se.useSyncExternalStore=function(e,t,n){return At.current.useSyncExternalStore(e,t,n)};Se.useTransition=function(){return At.current.useTransition()};Se.version="18.3.1";X0.exports=Se;var k=X0.exports;const Ds=Hu(k);/**
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 n2=k,r2=Symbol.for("react.element"),i2=Symbol.for("react.fragment"),s2=Object.prototype.hasOwnProperty,a2=n2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u2={key:!0,ref:!0,__self:!0,__source:!0};function am(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)s2.call(t,r)&&!u2.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:r2,type:e,key:s,ref:a,props:i,_owner:a2.current}}zu.Fragment=i2;zu.jsx=am;zu.jsxs=am;K0.exports=zu;var o=K0.exports,yo={},um={exports:{}},Kt={},lm={exports:{}},om={};/**
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(I,B){var y=I.length;I.push(B);e:for(;0<y;){var Z=y-1>>>1,ce=I[Z];if(0<i(ce,B))I[Z]=B,I[y]=ce,y=Z;else break e}}function n(I){return I.length===0?null:I[0]}function r(I){if(I.length===0)return null;var B=I[0],y=I.pop();if(y!==B){I[0]=y;e:for(var Z=0,ce=I.length,N=ce>>>1;Z<N;){var Te=2*(Z+1)-1,Ce=I[Te],ge=Te+1,qe=I[ge];if(0>i(Ce,y))ge<ce&&0>i(qe,Ce)?(I[Z]=qe,I[ge]=y,Z=ge):(I[Z]=Ce,I[Te]=y,Z=Te);else if(ge<ce&&0>i(qe,y))I[Z]=qe,I[ge]=y,Z=ge;else break e}}return B}function i(I,B){var y=I.sortIndex-B.sortIndex;return y!==0?y:I.id-B.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=[],c=[],f=1,h=null,m=3,p=!1,g=!1,b=!1,v=typeof setTimeout=="function"?setTimeout:null,E=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(I){for(var B=n(c);B!==null;){if(B.callback===null)r(c);else if(B.startTime<=I)r(c),B.sortIndex=B.expirationTime,t(l,B);else break;B=n(c)}}function D(I){if(b=!1,x(I),!g)if(n(l)!==null)g=!0,Ae(F);else{var B=n(c);B!==null&&ae(D,B.startTime-I)}}function F(I,B){g=!1,b&&(b=!1,E(L),L=-1),p=!0;var y=m;try{for(x(B),h=n(l);h!==null&&(!(h.expirationTime>B)||I&&!$());){var Z=h.callback;if(typeof Z=="function"){h.callback=null,m=h.priorityLevel;var ce=Z(h.expirationTime<=B);B=e.unstable_now(),typeof ce=="function"?h.callback=ce:h===n(l)&&r(l),x(B)}else r(l);h=n(l)}if(h!==null)var N=!0;else{var Te=n(c);Te!==null&&ae(D,Te.startTime-B),N=!1}return N}finally{h=null,m=y,p=!1}}var S=!1,R=null,L=-1,V=5,w=-1;function $(){return!(e.unstable_now()-w<V)}function X(){if(R!==null){var I=e.unstable_now();w=I;var B=!0;try{B=R(!0,I)}finally{B?he():(S=!1,R=null)}}else S=!1}var he;if(typeof T=="function")he=function(){T(X)};else if(typeof MessageChannel<"u"){var le=new MessageChannel,de=le.port2;le.port1.onmessage=X,he=function(){de.postMessage(null)}}else he=function(){v(X,0)};function Ae(I){R=I,S||(S=!0,he())}function ae(I,B){L=v(function(){I(e.unstable_now())},B)}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(I){I.callback=null},e.unstable_continueExecution=function(){g||p||(g=!0,Ae(F))},e.unstable_forceFrameRate=function(I){0>I||125<I?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):V=0<I?Math.floor(1e3/I):5},e.unstable_getCurrentPriorityLevel=function(){return m},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(I){switch(m){case 1:case 2:case 3:var B=3;break;default:B=m}var y=m;m=B;try{return I()}finally{m=y}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(I,B){switch(I){case 1:case 2:case 3:case 4:case 5:break;default:I=3}var y=m;m=I;try{return B()}finally{m=y}},e.unstable_scheduleCallback=function(I,B,y){var Z=e.unstable_now();switch(typeof y=="object"&&y!==null?(y=y.delay,y=typeof y=="number"&&0<y?Z+y:Z):y=Z,I){case 1:var ce=-1;break;case 2:ce=250;break;case 5:ce=1073741823;break;case 4:ce=1e4;break;default:ce=5e3}return ce=y+ce,I={id:f++,callback:B,priorityLevel:I,startTime:y,expirationTime:ce,sortIndex:-1},y>Z?(I.sortIndex=y,t(c,I),n(l)===null&&I===n(c)&&(b?(E(L),L=-1):b=!0,ae(D,y-Z))):(I.sortIndex=ce,t(l,I),g||p||(g=!0,Ae(F))),I},e.unstable_shouldYield=$,e.unstable_wrapCallback=function(I){var B=m;return function(){var y=m;m=B;try{return I.apply(this,arguments)}finally{m=y}}}})(om);lm.exports=om;var l2=lm.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 o2=k,Gt=l2;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 cm=new Set,Rs={};function Vr(e,t){Si(e,t),Si(e+"Capture",t)}function Si(e,t){for(Rs[e]=t,e=0;e<t.length;e++)cm.add(t[e])}var Yn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),bo=Object.prototype.hasOwnProperty,c2=/^[: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]*$/,hf={},mf={};function d2(e){return bo.call(mf,e)?!0:bo.call(hf,e)?!1:c2.test(e)?mf[e]=!0:(hf[e]=!0,!1)}function f2(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 h2(e,t,n,r){if(t===null||typeof t>"u"||f2(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 wt(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 mt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){mt[e]=new wt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];mt[t]=new wt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){mt[e]=new wt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){mt[e]=new wt(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){mt[e]=new wt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){mt[e]=new wt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){mt[e]=new wt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){mt[e]=new wt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){mt[e]=new wt(e,5,!1,e.toLowerCase(),null,!1,!1)});var Pc=/[\-:]([a-z])/g;function Mc(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(Pc,Mc);mt[t]=new wt(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(Pc,Mc);mt[t]=new wt(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(Pc,Mc);mt[t]=new wt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){mt[e]=new wt(e,1,!1,e.toLowerCase(),null,!1,!1)});mt.xlinkHref=new wt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){mt[e]=new wt(e,1,!1,e.toLowerCase(),null,!0,!0)});function Fc(e,t,n,r){var i=mt.hasOwnProperty(t)?mt[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(h2(t,n,i,r)&&(n=null),r||i===null?d2(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=o2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Ea=Symbol.for("react.element"),ii=Symbol.for("react.portal"),si=Symbol.for("react.fragment"),jc=Symbol.for("react.strict_mode"),xo=Symbol.for("react.profiler"),dm=Symbol.for("react.provider"),fm=Symbol.for("react.context"),Bc=Symbol.for("react.forward_ref"),_o=Symbol.for("react.suspense"),ko=Symbol.for("react.suspense_list"),Uc=Symbol.for("react.memo"),rr=Symbol.for("react.lazy"),hm=Symbol.for("react.offscreen"),pf=Symbol.iterator;function qi(e){return e===null||typeof e!="object"?null:(e=pf&&e[pf]||e["@@iterator"],typeof e=="function"?e:null)}var We=Object.assign,Nl;function us(e){if(Nl===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Nl=t&&t[1]||""}return`
34
- `+Nl+e}var Al=!1;function wl(e,t){if(!e||Al)return"";Al=!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(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var i=c.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{Al=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?us(e):""}function m2(e){switch(e.tag){case 5:return us(e.type);case 16:return us("Lazy");case 13:return us("Suspense");case 19:return us("SuspenseList");case 0:case 2:case 15:return e=wl(e.type,!1),e;case 11:return e=wl(e.type.render,!1),e;case 1:return e=wl(e.type,!0),e;default:return""}}function So(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 xo:return"Profiler";case jc:return"StrictMode";case _o:return"Suspense";case ko:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case fm:return(e.displayName||"Context")+".Consumer";case dm:return(e._context.displayName||"Context")+".Provider";case Bc:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Uc:return t=e.displayName||null,t!==null?t:So(e.type)||"Memo";case rr:t=e._payload,e=e._init;try{return So(e(t))}catch{}}return null}function p2(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 So(t);case 8:return t===jc?"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 Tr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function mm(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function g2(e){var t=mm(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 Ta(e){e._valueTracker||(e._valueTracker=g2(e))}function pm(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=mm(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function su(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 Co(e,t){var n=t.checked;return We({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function gf(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Tr(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 gm(e,t){t=t.checked,t!=null&&Fc(e,"checked",t,!1)}function No(e,t){gm(e,t);var n=Tr(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")?Ao(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ao(e,t.type,Tr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ef(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 Ao(e,t,n){(t!=="number"||su(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ls=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=""+Tr(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 wo(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(q(91));return We({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Tf(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(ls(n)){if(1<n.length)throw Error(q(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Tr(n)}}function Em(e,t){var n=Tr(t.value),r=Tr(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 yf(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Tm(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 vo(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Tm(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var ya,ym=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(ya=ya||document.createElement("div"),ya.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ya.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Os(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var hs={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},E2=["Webkit","ms","Moz","O"];Object.keys(hs).forEach(function(e){E2.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),hs[t]=hs[e]})});function bm(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||hs.hasOwnProperty(e)&&hs[e]?(""+t).trim():t+"px"}function xm(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=bm(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var T2=We({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 Io(e,t){if(t){if(T2[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 Lo(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 Do=null;function Hc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ro=null,Ti=null,yi=null;function bf(e){if(e=ia(e)){if(typeof Ro!="function")throw Error(q(280));var t=e.stateNode;t&&(t=qu(t),Ro(e.stateNode,e.type,t))}}function _m(e){Ti?yi?yi.push(e):yi=[e]:Ti=e}function km(){if(Ti){var e=Ti,t=yi;if(yi=Ti=null,bf(e),t)for(e=0;e<t.length;e++)bf(t[e])}}function Sm(e,t){return e(t)}function Cm(){}var vl=!1;function Nm(e,t,n){if(vl)return e(t,n);vl=!0;try{return Sm(e,t,n)}finally{vl=!1,(Ti!==null||yi!==null)&&(Cm(),km())}}function Ps(e,t){var n=e.stateNode;if(n===null)return null;var r=qu(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 Oo=!1;if(Yn)try{var Qi={};Object.defineProperty(Qi,"passive",{get:function(){Oo=!0}}),window.addEventListener("test",Qi,Qi),window.removeEventListener("test",Qi,Qi)}catch{Oo=!1}function y2(e,t,n,r,i,s,a,u,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(f){this.onError(f)}}var ms=!1,au=null,uu=!1,Po=null,b2={onError:function(e){ms=!0,au=e}};function x2(e,t,n,r,i,s,a,u,l){ms=!1,au=null,y2.apply(b2,arguments)}function _2(e,t,n,r,i,s,a,u,l){if(x2.apply(this,arguments),ms){if(ms){var c=au;ms=!1,au=null}else throw Error(q(198));uu||(uu=!0,Po=c)}}function Wr(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 Am(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 xf(e){if(Wr(e)!==e)throw Error(q(188))}function k2(e){var t=e.alternate;if(!t){if(t=Wr(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 xf(i),e;if(s===r)return xf(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 wm(e){return e=k2(e),e!==null?vm(e):null}function vm(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=vm(e);if(t!==null)return t;e=e.sibling}return null}var Im=Gt.unstable_scheduleCallback,_f=Gt.unstable_cancelCallback,S2=Gt.unstable_shouldYield,C2=Gt.unstable_requestPaint,Ke=Gt.unstable_now,N2=Gt.unstable_getCurrentPriorityLevel,zc=Gt.unstable_ImmediatePriority,Lm=Gt.unstable_UserBlockingPriority,lu=Gt.unstable_NormalPriority,A2=Gt.unstable_LowPriority,Dm=Gt.unstable_IdlePriority,$u=null,vn=null;function w2(e){if(vn&&typeof vn.onCommitFiberRoot=="function")try{vn.onCommitFiberRoot($u,e,void 0,(e.current.flags&128)===128)}catch{}}var pn=Math.clz32?Math.clz32:L2,v2=Math.log,I2=Math.LN2;function L2(e){return e>>>=0,e===0?32:31-(v2(e)/I2|0)|0}var ba=64,xa=4194304;function os(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 ou(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=os(u):(s&=a,s!==0&&(r=os(s)))}else a=n&~i,a!==0?r=os(a):s!==0&&(r=os(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-pn(t),i=1<<n,r|=e[n],t&=~i;return r}function D2(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 R2(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var a=31-pn(s),u=1<<a,l=i[a];l===-1?(!(u&n)||u&r)&&(i[a]=D2(u,t)):l<=t&&(e.expiredLanes|=u),s&=~u}}function Mo(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Rm(){var e=ba;return ba<<=1,!(ba&4194240)&&(ba=64),e}function Il(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function na(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-pn(t),e[t]=n}function O2(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-pn(n),s=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~s}}function $c(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-pn(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var De=0;function Om(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Pm,Yc,Mm,Fm,jm,Fo=!1,_a=[],cr=null,dr=null,fr=null,Ms=new Map,Fs=new Map,sr=[],P2="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 kf(e,t){switch(e){case"focusin":case"focusout":cr=null;break;case"dragenter":case"dragleave":dr=null;break;case"mouseover":case"mouseout":fr=null;break;case"pointerover":case"pointerout":Ms.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Fs.delete(t.pointerId)}}function Gi(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=ia(t),t!==null&&Yc(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function M2(e,t,n,r,i){switch(t){case"focusin":return cr=Gi(cr,e,t,n,r,i),!0;case"dragenter":return dr=Gi(dr,e,t,n,r,i),!0;case"mouseover":return fr=Gi(fr,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return Ms.set(s,Gi(Ms.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,Fs.set(s,Gi(Fs.get(s)||null,e,t,n,r,i)),!0}return!1}function Bm(e){var t=Ir(e.target);if(t!==null){var n=Wr(t);if(n!==null){if(t=n.tag,t===13){if(t=Am(n),t!==null){e.blockedOn=t,jm(e.priority,function(){Mm(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 $a(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=jo(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Do=r,n.target.dispatchEvent(r),Do=null}else return t=ia(n),t!==null&&Yc(t),e.blockedOn=n,!1;t.shift()}return!0}function Sf(e,t,n){$a(e)&&n.delete(t)}function F2(){Fo=!1,cr!==null&&$a(cr)&&(cr=null),dr!==null&&$a(dr)&&(dr=null),fr!==null&&$a(fr)&&(fr=null),Ms.forEach(Sf),Fs.forEach(Sf)}function Ki(e,t){e.blockedOn===t&&(e.blockedOn=null,Fo||(Fo=!0,Gt.unstable_scheduleCallback(Gt.unstable_NormalPriority,F2)))}function js(e){function t(i){return Ki(i,e)}if(0<_a.length){Ki(_a[0],e);for(var n=1;n<_a.length;n++){var r=_a[n];r.blockedOn===e&&(r.blockedOn=null)}}for(cr!==null&&Ki(cr,e),dr!==null&&Ki(dr,e),fr!==null&&Ki(fr,e),Ms.forEach(t),Fs.forEach(t),n=0;n<sr.length;n++)r=sr[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<sr.length&&(n=sr[0],n.blockedOn===null);)Bm(n),n.blockedOn===null&&sr.shift()}var bi=Gn.ReactCurrentBatchConfig,cu=!0;function j2(e,t,n,r){var i=De,s=bi.transition;bi.transition=null;try{De=1,Vc(e,t,n,r)}finally{De=i,bi.transition=s}}function B2(e,t,n,r){var i=De,s=bi.transition;bi.transition=null;try{De=4,Vc(e,t,n,r)}finally{De=i,bi.transition=s}}function Vc(e,t,n,r){if(cu){var i=jo(e,t,n,r);if(i===null)Ul(e,t,r,du,n),kf(e,r);else if(M2(i,e,t,n,r))r.stopPropagation();else if(kf(e,r),t&4&&-1<P2.indexOf(e)){for(;i!==null;){var s=ia(i);if(s!==null&&Pm(s),s=jo(e,t,n,r),s===null&&Ul(e,t,r,du,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else Ul(e,t,r,null,n)}}var du=null;function jo(e,t,n,r){if(du=null,e=Hc(r),e=Ir(e),e!==null)if(t=Wr(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Am(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 du=e,null}function Um(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(N2()){case zc:return 1;case Lm:return 4;case lu:case A2:return 16;case Dm:return 536870912;default:return 16}default:return 16}}var ur=null,Wc=null,Ya=null;function Hm(){if(Ya)return Ya;var e,t=Wc,n=t.length,r,i="value"in ur?ur.value:ur.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 Ya=i.slice(e,1<r?1-r:void 0)}function Va(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 ka(){return!0}function Cf(){return!1}function Xt(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)?ka:Cf,this.isPropagationStopped=Cf,this}return We(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=ka)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=ka)},persist:function(){},isPersistent:ka}),t}var Fi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},qc=Xt(Fi),ra=We({},Fi,{view:0,detail:0}),U2=Xt(ra),Ll,Dl,Xi,Yu=We({},ra,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Qc,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!==Xi&&(Xi&&e.type==="mousemove"?(Ll=e.screenX-Xi.screenX,Dl=e.screenY-Xi.screenY):Dl=Ll=0,Xi=e),Ll)},movementY:function(e){return"movementY"in e?e.movementY:Dl}}),Nf=Xt(Yu),H2=We({},Yu,{dataTransfer:0}),z2=Xt(H2),$2=We({},ra,{relatedTarget:0}),Rl=Xt($2),Y2=We({},Fi,{animationName:0,elapsedTime:0,pseudoElement:0}),V2=Xt(Y2),W2=We({},Fi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),q2=Xt(W2),Q2=We({},Fi,{data:0}),Af=Xt(Q2),G2={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},K2={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"},X2={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function J2(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=X2[e])?!!t[e]:!1}function Qc(){return J2}var Z2=We({},ra,{key:function(e){if(e.key){var t=G2[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Va(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?K2[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Qc,charCode:function(e){return e.type==="keypress"?Va(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Va(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),eT=Xt(Z2),tT=We({},Yu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),wf=Xt(tT),nT=We({},ra,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Qc}),rT=Xt(nT),iT=We({},Fi,{propertyName:0,elapsedTime:0,pseudoElement:0}),sT=Xt(iT),aT=We({},Yu,{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}),uT=Xt(aT),lT=[9,13,27,32],Gc=Yn&&"CompositionEvent"in window,ps=null;Yn&&"documentMode"in document&&(ps=document.documentMode);var oT=Yn&&"TextEvent"in window&&!ps,zm=Yn&&(!Gc||ps&&8<ps&&11>=ps),vf=" ",If=!1;function $m(e,t){switch(e){case"keyup":return lT.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ym(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ai=!1;function cT(e,t){switch(e){case"compositionend":return Ym(t);case"keypress":return t.which!==32?null:(If=!0,vf);case"textInput":return e=t.data,e===vf&&If?null:e;default:return null}}function dT(e,t){if(ai)return e==="compositionend"||!Gc&&$m(e,t)?(e=Hm(),Ya=Wc=ur=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 zm&&t.locale!=="ko"?null:t.data;default:return null}}var fT={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 Lf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!fT[e.type]:t==="textarea"}function Vm(e,t,n,r){_m(r),t=fu(t,"onChange"),0<t.length&&(n=new qc("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var gs=null,Bs=null;function hT(e){np(e,0)}function Vu(e){var t=oi(e);if(pm(t))return e}function mT(e,t){if(e==="change")return t}var Wm=!1;if(Yn){var Ol;if(Yn){var Pl="oninput"in document;if(!Pl){var Df=document.createElement("div");Df.setAttribute("oninput","return;"),Pl=typeof Df.oninput=="function"}Ol=Pl}else Ol=!1;Wm=Ol&&(!document.documentMode||9<document.documentMode)}function Rf(){gs&&(gs.detachEvent("onpropertychange",qm),Bs=gs=null)}function qm(e){if(e.propertyName==="value"&&Vu(Bs)){var t=[];Vm(t,Bs,e,Hc(e)),Nm(hT,t)}}function pT(e,t,n){e==="focusin"?(Rf(),gs=t,Bs=n,gs.attachEvent("onpropertychange",qm)):e==="focusout"&&Rf()}function gT(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Vu(Bs)}function ET(e,t){if(e==="click")return Vu(t)}function TT(e,t){if(e==="input"||e==="change")return Vu(t)}function yT(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Tn=typeof Object.is=="function"?Object.is:yT;function Us(e,t){if(Tn(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(!bo.call(t,i)||!Tn(e[i],t[i]))return!1}return!0}function Of(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Pf(e,t){var n=Of(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=Of(n)}}function Qm(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Qm(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Gm(){for(var e=window,t=su();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=su(e.document)}return t}function Kc(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 bT(e){var t=Gm(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Qm(n.ownerDocument.documentElement,n)){if(r!==null&&Kc(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=Pf(n,s);var a=Pf(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 xT=Yn&&"documentMode"in document&&11>=document.documentMode,ui=null,Bo=null,Es=null,Uo=!1;function Mf(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Uo||ui==null||ui!==su(r)||(r=ui,"selectionStart"in r&&Kc(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}),Es&&Us(Es,r)||(Es=r,r=fu(Bo,"onSelect"),0<r.length&&(t=new qc("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ui)))}function Sa(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var li={animationend:Sa("Animation","AnimationEnd"),animationiteration:Sa("Animation","AnimationIteration"),animationstart:Sa("Animation","AnimationStart"),transitionend:Sa("Transition","TransitionEnd")},Ml={},Km={};Yn&&(Km=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 Wu(e){if(Ml[e])return Ml[e];if(!li[e])return e;var t=li[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Km)return Ml[e]=t[n];return e}var Xm=Wu("animationend"),Jm=Wu("animationiteration"),Zm=Wu("animationstart"),ep=Wu("transitionend"),tp=new Map,Ff="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 br(e,t){tp.set(e,t),Vr(t,[e])}for(var Fl=0;Fl<Ff.length;Fl++){var jl=Ff[Fl],_T=jl.toLowerCase(),kT=jl[0].toUpperCase()+jl.slice(1);br(_T,"on"+kT)}br(Xm,"onAnimationEnd");br(Jm,"onAnimationIteration");br(Zm,"onAnimationStart");br("dblclick","onDoubleClick");br("focusin","onFocus");br("focusout","onBlur");br(ep,"onTransitionEnd");Si("onMouseEnter",["mouseout","mouseover"]);Si("onMouseLeave",["mouseout","mouseover"]);Si("onPointerEnter",["pointerout","pointerover"]);Si("onPointerLeave",["pointerout","pointerover"]);Vr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Vr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Vr("onBeforeInput",["compositionend","keypress","textInput","paste"]);Vr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Vr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Vr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var cs="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(" "),ST=new Set("cancel close invalid load scroll toggle".split(" ").concat(cs));function jf(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,_2(r,t,void 0,e),e.currentTarget=null}function np(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,c=u.currentTarget;if(u=u.listener,l!==s&&i.isPropagationStopped())break e;jf(i,u,c),s=l}else for(a=0;a<r.length;a++){if(u=r[a],l=u.instance,c=u.currentTarget,u=u.listener,l!==s&&i.isPropagationStopped())break e;jf(i,u,c),s=l}}}if(uu)throw e=Po,uu=!1,Po=null,e}function Ue(e,t){var n=t[Vo];n===void 0&&(n=t[Vo]=new Set);var r=e+"__bubble";n.has(r)||(rp(t,e,2,!1),n.add(r))}function Bl(e,t,n){var r=0;t&&(r|=4),rp(n,e,r,t)}var Ca="_reactListening"+Math.random().toString(36).slice(2);function Hs(e){if(!e[Ca]){e[Ca]=!0,cm.forEach(function(n){n!=="selectionchange"&&(ST.has(n)||Bl(n,!1,e),Bl(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ca]||(t[Ca]=!0,Bl("selectionchange",!1,t))}}function rp(e,t,n,r){switch(Um(t)){case 1:var i=j2;break;case 4:i=B2;break;default:i=Vc}n=i.bind(null,t,n,e),i=void 0,!Oo||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 Ul(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=Ir(u),a===null)return;if(l=a.tag,l===5||l===6){r=s=a;continue e}u=u.parentNode}}r=r.return}Nm(function(){var c=s,f=Hc(n),h=[];e:{var m=tp.get(e);if(m!==void 0){var p=qc,g=e;switch(e){case"keypress":if(Va(n)===0)break e;case"keydown":case"keyup":p=eT;break;case"focusin":g="focus",p=Rl;break;case"focusout":g="blur",p=Rl;break;case"beforeblur":case"afterblur":p=Rl;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=Nf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=z2;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=rT;break;case Xm:case Jm:case Zm:p=V2;break;case ep:p=sT;break;case"scroll":p=U2;break;case"wheel":p=uT;break;case"copy":case"cut":case"paste":p=q2;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=wf}var b=(t&4)!==0,v=!b&&e==="scroll",E=b?m!==null?m+"Capture":null:m;b=[];for(var T=c,x;T!==null;){x=T;var D=x.stateNode;if(x.tag===5&&D!==null&&(x=D,E!==null&&(D=Ps(T,E),D!=null&&b.push(zs(T,D,x)))),v)break;T=T.return}0<b.length&&(m=new p(m,g,null,n,f),h.push({event:m,listeners:b}))}}if(!(t&7)){e:{if(m=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",m&&n!==Do&&(g=n.relatedTarget||n.fromElement)&&(Ir(g)||g[Vn]))break e;if((p||m)&&(m=f.window===f?f:(m=f.ownerDocument)?m.defaultView||m.parentWindow:window,p?(g=n.relatedTarget||n.toElement,p=c,g=g?Ir(g):null,g!==null&&(v=Wr(g),g!==v||g.tag!==5&&g.tag!==6)&&(g=null)):(p=null,g=c),p!==g)){if(b=Nf,D="onMouseLeave",E="onMouseEnter",T="mouse",(e==="pointerout"||e==="pointerover")&&(b=wf,D="onPointerLeave",E="onPointerEnter",T="pointer"),v=p==null?m:oi(p),x=g==null?m:oi(g),m=new b(D,T+"leave",p,n,f),m.target=v,m.relatedTarget=x,D=null,Ir(f)===c&&(b=new b(E,T+"enter",g,n,f),b.target=x,b.relatedTarget=v,D=b),v=D,p&&g)t:{for(b=p,E=g,T=0,x=b;x;x=Zr(x))T++;for(x=0,D=E;D;D=Zr(D))x++;for(;0<T-x;)b=Zr(b),T--;for(;0<x-T;)E=Zr(E),x--;for(;T--;){if(b===E||E!==null&&b===E.alternate)break t;b=Zr(b),E=Zr(E)}b=null}else b=null;p!==null&&Bf(h,m,p,b,!1),g!==null&&v!==null&&Bf(h,v,g,b,!0)}}e:{if(m=c?oi(c):window,p=m.nodeName&&m.nodeName.toLowerCase(),p==="select"||p==="input"&&m.type==="file")var F=mT;else if(Lf(m))if(Wm)F=TT;else{F=gT;var S=pT}else(p=m.nodeName)&&p.toLowerCase()==="input"&&(m.type==="checkbox"||m.type==="radio")&&(F=ET);if(F&&(F=F(e,c))){Vm(h,F,n,f);break e}S&&S(e,m,c),e==="focusout"&&(S=m._wrapperState)&&S.controlled&&m.type==="number"&&Ao(m,"number",m.value)}switch(S=c?oi(c):window,e){case"focusin":(Lf(S)||S.contentEditable==="true")&&(ui=S,Bo=c,Es=null);break;case"focusout":Es=Bo=ui=null;break;case"mousedown":Uo=!0;break;case"contextmenu":case"mouseup":case"dragend":Uo=!1,Mf(h,n,f);break;case"selectionchange":if(xT)break;case"keydown":case"keyup":Mf(h,n,f)}var R;if(Gc)e:{switch(e){case"compositionstart":var L="onCompositionStart";break e;case"compositionend":L="onCompositionEnd";break e;case"compositionupdate":L="onCompositionUpdate";break e}L=void 0}else ai?$m(e,n)&&(L="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(L="onCompositionStart");L&&(zm&&n.locale!=="ko"&&(ai||L!=="onCompositionStart"?L==="onCompositionEnd"&&ai&&(R=Hm()):(ur=f,Wc="value"in ur?ur.value:ur.textContent,ai=!0)),S=fu(c,L),0<S.length&&(L=new Af(L,e,null,n,f),h.push({event:L,listeners:S}),R?L.data=R:(R=Ym(n),R!==null&&(L.data=R)))),(R=oT?cT(e,n):dT(e,n))&&(c=fu(c,"onBeforeInput"),0<c.length&&(f=new Af("onBeforeInput","beforeinput",null,n,f),h.push({event:f,listeners:c}),f.data=R))}np(h,t)})}function zs(e,t,n){return{instance:e,listener:t,currentTarget:n}}function fu(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=Ps(e,n),s!=null&&r.unshift(zs(e,s,i)),s=Ps(e,t),s!=null&&r.push(zs(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 Bf(e,t,n,r,i){for(var s=t._reactName,a=[];n!==null&&n!==r;){var u=n,l=u.alternate,c=u.stateNode;if(l!==null&&l===r)break;u.tag===5&&c!==null&&(u=c,i?(l=Ps(n,s),l!=null&&a.unshift(zs(n,l,u))):i||(l=Ps(n,s),l!=null&&a.push(zs(n,l,u)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var CT=/\r\n?/g,NT=/\u0000|\uFFFD/g;function Uf(e){return(typeof e=="string"?e:""+e).replace(CT,`
38
- `).replace(NT,"")}function Na(e,t,n){if(t=Uf(t),Uf(e)!==t&&n)throw Error(q(425))}function hu(){}var Ho=null,zo=null;function $o(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 Yo=typeof setTimeout=="function"?setTimeout:void 0,AT=typeof clearTimeout=="function"?clearTimeout:void 0,Hf=typeof Promise=="function"?Promise:void 0,wT=typeof queueMicrotask=="function"?queueMicrotask:typeof Hf<"u"?function(e){return Hf.resolve(null).then(e).catch(vT)}:Yo;function vT(e){setTimeout(function(){throw e})}function Hl(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),js(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);js(t)}function hr(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 zf(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 ji=Math.random().toString(36).slice(2),An="__reactFiber$"+ji,$s="__reactProps$"+ji,Vn="__reactContainer$"+ji,Vo="__reactEvents$"+ji,IT="__reactListeners$"+ji,LT="__reactHandles$"+ji;function Ir(e){var t=e[An];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Vn]||n[An]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=zf(e);e!==null;){if(n=e[An])return n;e=zf(e)}return t}e=n,n=e.parentNode}return null}function ia(e){return e=e[An]||e[Vn],!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 qu(e){return e[$s]||null}var Wo=[],ci=-1;function xr(e){return{current:e}}function He(e){0>ci||(e.current=Wo[ci],Wo[ci]=null,ci--)}function Be(e,t){ci++,Wo[ci]=e.current,e.current=t}var yr={},bt=xr(yr),Ft=xr(!1),jr=yr;function Ci(e,t){var n=e.type.contextTypes;if(!n)return yr;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 jt(e){return e=e.childContextTypes,e!=null}function mu(){He(Ft),He(bt)}function $f(e,t,n){if(bt.current!==yr)throw Error(q(168));Be(bt,t),Be(Ft,n)}function ip(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,p2(e)||"Unknown",i));return We({},n,r)}function pu(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||yr,jr=bt.current,Be(bt,e),Be(Ft,Ft.current),!0}function Yf(e,t,n){var r=e.stateNode;if(!r)throw Error(q(169));n?(e=ip(e,t,jr),r.__reactInternalMemoizedMergedChildContext=e,He(Ft),He(bt),Be(bt,e)):He(Ft),Be(Ft,n)}var jn=null,Qu=!1,zl=!1;function sp(e){jn===null?jn=[e]:jn.push(e)}function DT(e){Qu=!0,sp(e)}function _r(){if(!zl&&jn!==null){zl=!0;var e=0,t=De;try{var n=jn;for(De=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}jn=null,Qu=!1}catch(i){throw jn!==null&&(jn=jn.slice(e+1)),Im(zc,_r),i}finally{De=t,zl=!1}}return null}var di=[],fi=0,gu=null,Eu=0,Zt=[],en=0,Br=null,Un=1,Hn="";function Ar(e,t){di[fi++]=Eu,di[fi++]=gu,gu=e,Eu=t}function ap(e,t,n){Zt[en++]=Un,Zt[en++]=Hn,Zt[en++]=Br,Br=e;var r=Un;e=Hn;var i=32-pn(r)-1;r&=~(1<<i),n+=1;var s=32-pn(t)+i;if(30<s){var a=i-i%5;s=(r&(1<<a)-1).toString(32),r>>=a,i-=a,Un=1<<32-pn(t)+i|n<<i|r,Hn=s+e}else Un=1<<s|n<<i|r,Hn=e}function Xc(e){e.return!==null&&(Ar(e,1),ap(e,1,0))}function Jc(e){for(;e===gu;)gu=di[--fi],di[fi]=null,Eu=di[--fi],di[fi]=null;for(;e===Br;)Br=Zt[--en],Zt[en]=null,Hn=Zt[--en],Zt[en]=null,Un=Zt[--en],Zt[en]=null}var qt=null,Wt=null,$e=!1,hn=null;function up(e,t){var n=rn(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 Vf(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,qt=e,Wt=hr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,qt=e,Wt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Br!==null?{id:Un,overflow:Hn}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=rn(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,qt=e,Wt=null,!0):!1;default:return!1}}function qo(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Qo(e){if($e){var t=Wt;if(t){var n=t;if(!Vf(e,t)){if(qo(e))throw Error(q(418));t=hr(n.nextSibling);var r=qt;t&&Vf(e,t)?up(r,n):(e.flags=e.flags&-4097|2,$e=!1,qt=e)}}else{if(qo(e))throw Error(q(418));e.flags=e.flags&-4097|2,$e=!1,qt=e}}}function Wf(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;qt=e}function Aa(e){if(e!==qt)return!1;if(!$e)return Wf(e),$e=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!$o(e.type,e.memoizedProps)),t&&(t=Wt)){if(qo(e))throw lp(),Error(q(418));for(;t;)up(e,t),t=hr(t.nextSibling)}if(Wf(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){Wt=hr(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Wt=null}}else Wt=qt?hr(e.stateNode.nextSibling):null;return!0}function lp(){for(var e=Wt;e;)e=hr(e.nextSibling)}function Ni(){Wt=qt=null,$e=!1}function Zc(e){hn===null?hn=[e]:hn.push(e)}var RT=Gn.ReactCurrentBatchConfig;function Ji(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 wa(e,t){throw e=Object.prototype.toString.call(t),Error(q(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function qf(e){var t=e._init;return t(e._payload)}function op(e){function t(E,T){if(e){var x=E.deletions;x===null?(E.deletions=[T],E.flags|=16):x.push(T)}}function n(E,T){if(!e)return null;for(;T!==null;)t(E,T),T=T.sibling;return null}function r(E,T){for(E=new Map;T!==null;)T.key!==null?E.set(T.key,T):E.set(T.index,T),T=T.sibling;return E}function i(E,T){return E=Er(E,T),E.index=0,E.sibling=null,E}function s(E,T,x){return E.index=x,e?(x=E.alternate,x!==null?(x=x.index,x<T?(E.flags|=2,T):x):(E.flags|=2,T)):(E.flags|=1048576,T)}function a(E){return e&&E.alternate===null&&(E.flags|=2),E}function u(E,T,x,D){return T===null||T.tag!==6?(T=Gl(x,E.mode,D),T.return=E,T):(T=i(T,x),T.return=E,T)}function l(E,T,x,D){var F=x.type;return F===si?f(E,T,x.props.children,D,x.key):T!==null&&(T.elementType===F||typeof F=="object"&&F!==null&&F.$$typeof===rr&&qf(F)===T.type)?(D=i(T,x.props),D.ref=Ji(E,T,x),D.return=E,D):(D=Ja(x.type,x.key,x.props,null,E.mode,D),D.ref=Ji(E,T,x),D.return=E,D)}function c(E,T,x,D){return T===null||T.tag!==4||T.stateNode.containerInfo!==x.containerInfo||T.stateNode.implementation!==x.implementation?(T=Kl(x,E.mode,D),T.return=E,T):(T=i(T,x.children||[]),T.return=E,T)}function f(E,T,x,D,F){return T===null||T.tag!==7?(T=Mr(x,E.mode,D,F),T.return=E,T):(T=i(T,x),T.return=E,T)}function h(E,T,x){if(typeof T=="string"&&T!==""||typeof T=="number")return T=Gl(""+T,E.mode,x),T.return=E,T;if(typeof T=="object"&&T!==null){switch(T.$$typeof){case Ea:return x=Ja(T.type,T.key,T.props,null,E.mode,x),x.ref=Ji(E,null,T),x.return=E,x;case ii:return T=Kl(T,E.mode,x),T.return=E,T;case rr:var D=T._init;return h(E,D(T._payload),x)}if(ls(T)||qi(T))return T=Mr(T,E.mode,x,null),T.return=E,T;wa(E,T)}return null}function m(E,T,x,D){var F=T!==null?T.key:null;if(typeof x=="string"&&x!==""||typeof x=="number")return F!==null?null:u(E,T,""+x,D);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Ea:return x.key===F?l(E,T,x,D):null;case ii:return x.key===F?c(E,T,x,D):null;case rr:return F=x._init,m(E,T,F(x._payload),D)}if(ls(x)||qi(x))return F!==null?null:f(E,T,x,D,null);wa(E,x)}return null}function p(E,T,x,D,F){if(typeof D=="string"&&D!==""||typeof D=="number")return E=E.get(x)||null,u(T,E,""+D,F);if(typeof D=="object"&&D!==null){switch(D.$$typeof){case Ea:return E=E.get(D.key===null?x:D.key)||null,l(T,E,D,F);case ii:return E=E.get(D.key===null?x:D.key)||null,c(T,E,D,F);case rr:var S=D._init;return p(E,T,x,S(D._payload),F)}if(ls(D)||qi(D))return E=E.get(x)||null,f(T,E,D,F,null);wa(T,D)}return null}function g(E,T,x,D){for(var F=null,S=null,R=T,L=T=0,V=null;R!==null&&L<x.length;L++){R.index>L?(V=R,R=null):V=R.sibling;var w=m(E,R,x[L],D);if(w===null){R===null&&(R=V);break}e&&R&&w.alternate===null&&t(E,R),T=s(w,T,L),S===null?F=w:S.sibling=w,S=w,R=V}if(L===x.length)return n(E,R),$e&&Ar(E,L),F;if(R===null){for(;L<x.length;L++)R=h(E,x[L],D),R!==null&&(T=s(R,T,L),S===null?F=R:S.sibling=R,S=R);return $e&&Ar(E,L),F}for(R=r(E,R);L<x.length;L++)V=p(R,E,L,x[L],D),V!==null&&(e&&V.alternate!==null&&R.delete(V.key===null?L:V.key),T=s(V,T,L),S===null?F=V:S.sibling=V,S=V);return e&&R.forEach(function($){return t(E,$)}),$e&&Ar(E,L),F}function b(E,T,x,D){var F=qi(x);if(typeof F!="function")throw Error(q(150));if(x=F.call(x),x==null)throw Error(q(151));for(var S=F=null,R=T,L=T=0,V=null,w=x.next();R!==null&&!w.done;L++,w=x.next()){R.index>L?(V=R,R=null):V=R.sibling;var $=m(E,R,w.value,D);if($===null){R===null&&(R=V);break}e&&R&&$.alternate===null&&t(E,R),T=s($,T,L),S===null?F=$:S.sibling=$,S=$,R=V}if(w.done)return n(E,R),$e&&Ar(E,L),F;if(R===null){for(;!w.done;L++,w=x.next())w=h(E,w.value,D),w!==null&&(T=s(w,T,L),S===null?F=w:S.sibling=w,S=w);return $e&&Ar(E,L),F}for(R=r(E,R);!w.done;L++,w=x.next())w=p(R,E,L,w.value,D),w!==null&&(e&&w.alternate!==null&&R.delete(w.key===null?L:w.key),T=s(w,T,L),S===null?F=w:S.sibling=w,S=w);return e&&R.forEach(function(X){return t(E,X)}),$e&&Ar(E,L),F}function v(E,T,x,D){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 Ea:e:{for(var F=x.key,S=T;S!==null;){if(S.key===F){if(F=x.type,F===si){if(S.tag===7){n(E,S.sibling),T=i(S,x.props.children),T.return=E,E=T;break e}}else if(S.elementType===F||typeof F=="object"&&F!==null&&F.$$typeof===rr&&qf(F)===S.type){n(E,S.sibling),T=i(S,x.props),T.ref=Ji(E,S,x),T.return=E,E=T;break e}n(E,S);break}else t(E,S);S=S.sibling}x.type===si?(T=Mr(x.props.children,E.mode,D,x.key),T.return=E,E=T):(D=Ja(x.type,x.key,x.props,null,E.mode,D),D.ref=Ji(E,T,x),D.return=E,E=D)}return a(E);case ii:e:{for(S=x.key;T!==null;){if(T.key===S)if(T.tag===4&&T.stateNode.containerInfo===x.containerInfo&&T.stateNode.implementation===x.implementation){n(E,T.sibling),T=i(T,x.children||[]),T.return=E,E=T;break e}else{n(E,T);break}else t(E,T);T=T.sibling}T=Kl(x,E.mode,D),T.return=E,E=T}return a(E);case rr:return S=x._init,v(E,T,S(x._payload),D)}if(ls(x))return g(E,T,x,D);if(qi(x))return b(E,T,x,D);wa(E,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,T!==null&&T.tag===6?(n(E,T.sibling),T=i(T,x),T.return=E,E=T):(n(E,T),T=Gl(x,E.mode,D),T.return=E,E=T),a(E)):n(E,T)}return v}var Ai=op(!0),cp=op(!1),Tu=xr(null),yu=null,hi=null,ed=null;function td(){ed=hi=yu=null}function nd(e){var t=Tu.current;He(Tu),e._currentValue=t}function Go(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){yu=e,ed=hi=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Mt=!0),e.firstContext=null)}function an(e){var t=e._currentValue;if(ed!==e)if(e={context:e,memoizedValue:t,next:null},hi===null){if(yu===null)throw Error(q(308));hi=e,yu.dependencies={lanes:0,firstContext:e}}else hi=hi.next=e;return t}var Lr=null;function rd(e){Lr===null?Lr=[e]:Lr.push(e)}function dp(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,rd(t)):(n.next=i.next,i.next=n),t.interleaved=n,Wn(e,r)}function Wn(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 ir=!1;function id(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function fp(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 $n(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function mr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,we&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Wn(e,n)}return i=r.interleaved,i===null?(t.next=t,rd(r)):(t.next=i.next,i.next=t),r.interleaved=t,Wn(e,n)}function Wa(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,$c(e,n)}}function Qf(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 bu(e,t,n,r){var i=e.updateQueue;ir=!1;var s=i.firstBaseUpdate,a=i.lastBaseUpdate,u=i.shared.pending;if(u!==null){i.shared.pending=null;var l=u,c=l.next;l.next=null,a===null?s=c:a.next=c,a=l;var f=e.alternate;f!==null&&(f=f.updateQueue,u=f.lastBaseUpdate,u!==a&&(u===null?f.firstBaseUpdate=c:u.next=c,f.lastBaseUpdate=l))}if(s!==null){var h=i.baseState;a=0,f=c=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 g=e,b=u;switch(m=t,p=n,b.tag){case 1:if(g=b.payload,typeof g=="function"){h=g.call(p,h,m);break e}h=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=b.payload,m=typeof g=="function"?g.call(p,h,m):g,m==null)break e;h=We({},h,m);break e;case 2:ir=!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?(c=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=c,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);Hr|=a,e.lanes=a,e.memoizedState=h}}function Gf(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 sa={},In=xr(sa),Ys=xr(sa),Vs=xr(sa);function Dr(e){if(e===sa)throw Error(q(174));return e}function sd(e,t){switch(Be(Vs,t),Be(Ys,e),Be(In,sa),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:vo(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=vo(t,e)}He(In),Be(In,t)}function wi(){He(In),He(Ys),He(Vs)}function hp(e){Dr(Vs.current);var t=Dr(In.current),n=vo(t,e.type);t!==n&&(Be(Ys,e),Be(In,n))}function ad(e){Ys.current===e&&(He(In),He(Ys))}var Ye=xr(0);function xu(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 $l=[];function ud(){for(var e=0;e<$l.length;e++)$l[e]._workInProgressVersionPrimary=null;$l.length=0}var qa=Gn.ReactCurrentDispatcher,Yl=Gn.ReactCurrentBatchConfig,Ur=0,Ve=null,et=null,st=null,_u=!1,Ts=!1,Ws=0,OT=0;function pt(){throw Error(q(321))}function ld(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Tn(e[n],t[n]))return!1;return!0}function od(e,t,n,r,i,s){if(Ur=s,Ve=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,qa.current=e===null||e.memoizedState===null?jT:BT,e=n(r,i),Ts){s=0;do{if(Ts=!1,Ws=0,25<=s)throw Error(q(301));s+=1,st=et=null,t.updateQueue=null,qa.current=UT,e=n(r,i)}while(Ts)}if(qa.current=ku,t=et!==null&&et.next!==null,Ur=0,st=et=Ve=null,_u=!1,t)throw Error(q(300));return e}function cd(){var e=Ws!==0;return Ws=0,e}function Sn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return st===null?Ve.memoizedState=st=e:st=st.next=e,st}function un(){if(et===null){var e=Ve.alternate;e=e!==null?e.memoizedState:null}else e=et.next;var t=st===null?Ve.memoizedState:st.next;if(t!==null)st=t,et=e;else{if(e===null)throw Error(q(310));et=e,e={memoizedState:et.memoizedState,baseState:et.baseState,baseQueue:et.baseQueue,queue:et.queue,next:null},st===null?Ve.memoizedState=st=e:st=st.next=e}return st}function qs(e,t){return typeof t=="function"?t(e):t}function Vl(e){var t=un(),n=t.queue;if(n===null)throw Error(q(311));n.lastRenderedReducer=e;var r=et,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,c=s;do{var f=c.lane;if((Ur&f)===f)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var h={lane:f,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(u=l=h,a=r):l=l.next=h,Ve.lanes|=f,Hr|=f}c=c.next}while(c!==null&&c!==s);l===null?a=r:l.next=u,Tn(r,t.memoizedState)||(Mt=!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,Ve.lanes|=s,Hr|=s,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Wl(e){var t=un(),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);Tn(s,t.memoizedState)||(Mt=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function mp(){}function pp(e,t){var n=Ve,r=un(),i=t(),s=!Tn(r.memoizedState,i);if(s&&(r.memoizedState=i,Mt=!0),r=r.queue,dd(Tp.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||st!==null&&st.memoizedState.tag&1){if(n.flags|=2048,Qs(9,Ep.bind(null,n,r,i,t),void 0,null),ut===null)throw Error(q(349));Ur&30||gp(n,t,i)}return i}function gp(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ve.updateQueue,t===null?(t={lastEffect:null,stores:null},Ve.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Ep(e,t,n,r){t.value=n,t.getSnapshot=r,yp(t)&&bp(e)}function Tp(e,t,n){return n(function(){yp(t)&&bp(e)})}function yp(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Tn(e,n)}catch{return!0}}function bp(e){var t=Wn(e,1);t!==null&&gn(t,e,1,-1)}function Kf(e){var t=Sn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:qs,lastRenderedState:e},t.queue=e,e=e.dispatch=FT.bind(null,Ve,e),[t.memoizedState,e]}function Qs(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Ve.updateQueue,t===null?(t={lastEffect:null,stores:null},Ve.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 xp(){return un().memoizedState}function Qa(e,t,n,r){var i=Sn();Ve.flags|=e,i.memoizedState=Qs(1|t,n,void 0,r===void 0?null:r)}function Gu(e,t,n,r){var i=un();r=r===void 0?null:r;var s=void 0;if(et!==null){var a=et.memoizedState;if(s=a.destroy,r!==null&&ld(r,a.deps)){i.memoizedState=Qs(t,n,s,r);return}}Ve.flags|=e,i.memoizedState=Qs(1|t,n,s,r)}function Xf(e,t){return Qa(8390656,8,e,t)}function dd(e,t){return Gu(2048,8,e,t)}function _p(e,t){return Gu(4,2,e,t)}function kp(e,t){return Gu(4,4,e,t)}function Sp(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 Cp(e,t,n){return n=n!=null?n.concat([e]):null,Gu(4,4,Sp.bind(null,t,e),n)}function fd(){}function Np(e,t){var n=un();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&ld(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ap(e,t){var n=un();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&ld(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function wp(e,t,n){return Ur&21?(Tn(n,t)||(n=Rm(),Ve.lanes|=n,Hr|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Mt=!0),e.memoizedState=n)}function PT(e,t){var n=De;De=n!==0&&4>n?n:4,e(!0);var r=Yl.transition;Yl.transition={};try{e(!1),t()}finally{De=n,Yl.transition=r}}function vp(){return un().memoizedState}function MT(e,t,n){var r=gr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Ip(e))Lp(t,n);else if(n=dp(e,t,n,r),n!==null){var i=Nt();gn(n,e,r,i),Dp(n,t,r)}}function FT(e,t,n){var r=gr(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ip(e))Lp(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,Tn(u,a)){var l=t.interleaved;l===null?(i.next=i,rd(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=dp(e,t,i,r),n!==null&&(i=Nt(),gn(n,e,r,i),Dp(n,t,r))}}function Ip(e){var t=e.alternate;return e===Ve||t!==null&&t===Ve}function Lp(e,t){Ts=_u=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Dp(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,$c(e,n)}}var ku={readContext:an,useCallback:pt,useContext:pt,useEffect:pt,useImperativeHandle:pt,useInsertionEffect:pt,useLayoutEffect:pt,useMemo:pt,useReducer:pt,useRef:pt,useState:pt,useDebugValue:pt,useDeferredValue:pt,useTransition:pt,useMutableSource:pt,useSyncExternalStore:pt,useId:pt,unstable_isNewReconciler:!1},jT={readContext:an,useCallback:function(e,t){return Sn().memoizedState=[e,t===void 0?null:t],e},useContext:an,useEffect:Xf,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Qa(4194308,4,Sp.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Qa(4194308,4,e,t)},useInsertionEffect:function(e,t){return Qa(4,2,e,t)},useMemo:function(e,t){var n=Sn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Sn();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=MT.bind(null,Ve,e),[r.memoizedState,e]},useRef:function(e){var t=Sn();return e={current:e},t.memoizedState=e},useState:Kf,useDebugValue:fd,useDeferredValue:function(e){return Sn().memoizedState=e},useTransition:function(){var e=Kf(!1),t=e[0];return e=PT.bind(null,e[1]),Sn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ve,i=Sn();if($e){if(n===void 0)throw Error(q(407));n=n()}else{if(n=t(),ut===null)throw Error(q(349));Ur&30||gp(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,Xf(Tp.bind(null,r,s,e),[e]),r.flags|=2048,Qs(9,Ep.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=Sn(),t=ut.identifierPrefix;if($e){var n=Hn,r=Un;n=(r&~(1<<32-pn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ws++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=OT++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},BT={readContext:an,useCallback:Np,useContext:an,useEffect:dd,useImperativeHandle:Cp,useInsertionEffect:_p,useLayoutEffect:kp,useMemo:Ap,useReducer:Vl,useRef:xp,useState:function(){return Vl(qs)},useDebugValue:fd,useDeferredValue:function(e){var t=un();return wp(t,et.memoizedState,e)},useTransition:function(){var e=Vl(qs)[0],t=un().memoizedState;return[e,t]},useMutableSource:mp,useSyncExternalStore:pp,useId:vp,unstable_isNewReconciler:!1},UT={readContext:an,useCallback:Np,useContext:an,useEffect:dd,useImperativeHandle:Cp,useInsertionEffect:_p,useLayoutEffect:kp,useMemo:Ap,useReducer:Wl,useRef:xp,useState:function(){return Wl(qs)},useDebugValue:fd,useDeferredValue:function(e){var t=un();return et===null?t.memoizedState=e:wp(t,et.memoizedState,e)},useTransition:function(){var e=Wl(qs)[0],t=un().memoizedState;return[e,t]},useMutableSource:mp,useSyncExternalStore:pp,useId:vp,unstable_isNewReconciler:!1};function dn(e,t){if(e&&e.defaultProps){t=We({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Ko(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:We({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ku={isMounted:function(e){return(e=e._reactInternals)?Wr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Nt(),i=gr(e),s=$n(r,i);s.payload=t,n!=null&&(s.callback=n),t=mr(e,s,i),t!==null&&(gn(t,e,i,r),Wa(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Nt(),i=gr(e),s=$n(r,i);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=mr(e,s,i),t!==null&&(gn(t,e,i,r),Wa(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Nt(),r=gr(e),i=$n(n,r);i.tag=2,t!=null&&(i.callback=t),t=mr(e,i,r),t!==null&&(gn(t,e,r,n),Wa(t,e,r))}};function Jf(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?!Us(n,r)||!Us(i,s):!0}function Rp(e,t,n){var r=!1,i=yr,s=t.contextType;return typeof s=="object"&&s!==null?s=an(s):(i=jt(t)?jr:bt.current,r=t.contextTypes,s=(r=r!=null)?Ci(e,i):yr),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Ku,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function Zf(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&&Ku.enqueueReplaceState(t,t.state,null)}function Xo(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},id(e);var s=t.contextType;typeof s=="object"&&s!==null?i.context=an(s):(s=jt(t)?jr:bt.current,i.context=Ci(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(Ko(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&&Ku.enqueueReplaceState(i,i.state,null),bu(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function vi(e,t){try{var n="",r=t;do n+=m2(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 ql(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Jo(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var HT=typeof WeakMap=="function"?WeakMap:Map;function Op(e,t,n){n=$n(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Cu||(Cu=!0,lc=r),Jo(e,t)},n}function Pp(e,t,n){n=$n(-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(){Jo(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){Jo(e,t),typeof r!="function"&&(pr===null?pr=new Set([this]):pr.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function eh(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new HT;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=ty.bind(null,e,t,n),t.then(e,e))}function th(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 nh(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=$n(-1,1),t.tag=2,mr(n,t,1))),n.lanes|=1),e)}var zT=Gn.ReactCurrentOwner,Mt=!1;function St(e,t,n,r){t.child=e===null?cp(t,null,n,r):Ai(t,e.child,n,r)}function rh(e,t,n,r,i){n=n.render;var s=t.ref;return xi(t,i),r=od(e,t,n,r,s,i),n=cd(),e!==null&&!Mt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,qn(e,t,i)):($e&&n&&Xc(t),t.flags|=1,St(e,t,r,i),t.child)}function ih(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!bd(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,Mp(e,t,s,r,i)):(e=Ja(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:Us,n(a,r)&&e.ref===t.ref)return qn(e,t,i)}return t.flags|=1,e=Er(s,r),e.ref=t.ref,e.return=t,t.child=e}function Mp(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(Us(s,r)&&e.ref===t.ref)if(Mt=!1,t.pendingProps=r=s,(e.lanes&i)!==0)e.flags&131072&&(Mt=!0);else return t.lanes=e.lanes,qn(e,t,i)}return Zo(e,t,n,r,i)}function Fp(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},Be(pi,Vt),Vt|=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,Be(pi,Vt),Vt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,Be(pi,Vt),Vt|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,Be(pi,Vt),Vt|=r;return St(e,t,i,n),t.child}function jp(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Zo(e,t,n,r,i){var s=jt(n)?jr:bt.current;return s=Ci(t,s),xi(t,i),n=od(e,t,n,r,s,i),r=cd(),e!==null&&!Mt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,qn(e,t,i)):($e&&r&&Xc(t),t.flags|=1,St(e,t,n,i),t.child)}function sh(e,t,n,r,i){if(jt(n)){var s=!0;pu(t)}else s=!1;if(xi(t,i),t.stateNode===null)Ga(e,t),Rp(t,n,r),Xo(t,n,r,i),r=!0;else if(e===null){var a=t.stateNode,u=t.memoizedProps;a.props=u;var l=a.context,c=n.contextType;typeof c=="object"&&c!==null?c=an(c):(c=jt(n)?jr:bt.current,c=Ci(t,c));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!==c)&&Zf(t,a,r,c),ir=!1;var m=t.memoizedState;a.state=m,bu(t,r,a,i),l=t.memoizedState,u!==r||m!==l||Ft.current||ir?(typeof f=="function"&&(Ko(t,n,f,r),l=t.memoizedState),(u=ir||Jf(t,n,u,r,m,l,c))?(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=c,r=u):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,fp(e,t),u=t.memoizedProps,c=t.type===t.elementType?u:dn(t.type,u),a.props=c,h=t.pendingProps,m=a.context,l=n.contextType,typeof l=="object"&&l!==null?l=an(l):(l=jt(n)?jr:bt.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)&&Zf(t,a,r,l),ir=!1,m=t.memoizedState,a.state=m,bu(t,r,a,i);var g=t.memoizedState;u!==h||m!==g||Ft.current||ir?(typeof p=="function"&&(Ko(t,n,p,r),g=t.memoizedState),(c=ir||Jf(t,n,c,r,m,g,l)||!1)?(f||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,g,l),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,g,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=g),a.props=r,a.state=g,a.context=l,r=c):(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 ec(e,t,n,r,s,i)}function ec(e,t,n,r,i,s){jp(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return i&&Yf(t,n,!1),qn(e,t,s);r=t.stateNode,zT.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)):St(e,t,u,s),t.memoizedState=r.state,i&&Yf(t,n,!0),t.child}function Bp(e){var t=e.stateNode;t.pendingContext?$f(e,t.pendingContext,t.pendingContext!==t.context):t.context&&$f(e,t.context,!1),sd(e,t.containerInfo)}function ah(e,t,n,r,i){return Ni(),Zc(i),t.flags|=256,St(e,t,n,r),t.child}var tc={dehydrated:null,treeContext:null,retryLane:0};function nc(e){return{baseLanes:e,cachePool:null,transitions:null}}function Up(e,t,n){var r=t.pendingProps,i=Ye.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),Be(Ye,i&1),e===null)return Qo(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=Zu(a,r,0,null),e=Mr(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=nc(n),t.memoizedState=tc,e):hd(t,a));if(i=e.memoizedState,i!==null&&(u=i.dehydrated,u!==null))return $T(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=Er(i,l),r.subtreeFlags=i.subtreeFlags&14680064),u!==null?s=Er(u,s):(s=Mr(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?nc(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},s.memoizedState=a,s.childLanes=e.childLanes&~n,t.memoizedState=tc,r}return s=e.child,e=s.sibling,r=Er(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 hd(e,t){return t=Zu({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function va(e,t,n,r){return r!==null&&Zc(r),Ai(t,e.child,null,n),e=hd(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function $T(e,t,n,r,i,s,a){if(n)return t.flags&256?(t.flags&=-257,r=ql(Error(q(422))),va(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=Zu({mode:"visible",children:r.children},i,0,null),s=Mr(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=nc(a),t.memoizedState=tc,s);if(!(t.mode&1))return va(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=ql(s,r,void 0),va(e,t,a,r)}if(u=(a&e.childLanes)!==0,Mt||u){if(r=ut,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,Wn(e,i),gn(r,e,i,-1))}return yd(),r=ql(Error(q(421))),va(e,t,a,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=ny.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,Wt=hr(i.nextSibling),qt=t,$e=!0,hn=null,e!==null&&(Zt[en++]=Un,Zt[en++]=Hn,Zt[en++]=Br,Un=e.id,Hn=e.overflow,Br=t),t=hd(t,r.children),t.flags|=4096,t)}function uh(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Go(e.return,t,n)}function Ql(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 Hp(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;if(St(e,t,r.children,n),r=Ye.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&&uh(e,n,t);else if(e.tag===19)uh(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(Be(Ye,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&&xu(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Ql(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&&xu(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Ql(t,!0,n,null,s);break;case"together":Ql(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ga(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),Hr|=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=Er(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Er(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function YT(e,t,n){switch(t.tag){case 3:Bp(t),Ni();break;case 5:hp(t);break;case 1:jt(t.type)&&pu(t);break;case 4:sd(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Be(Tu,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Be(Ye,Ye.current&1),t.flags|=128,null):n&t.child.childLanes?Up(e,t,n):(Be(Ye,Ye.current&1),e=qn(e,t,n),e!==null?e.sibling:null);Be(Ye,Ye.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Hp(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Be(Ye,Ye.current),r)break;return null;case 22:case 23:return t.lanes=0,Fp(e,t,n)}return qn(e,t,n)}var zp,rc,$p,Yp;zp=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}};rc=function(){};$p=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Dr(In.current);var s=null;switch(n){case"input":i=Co(e,i),r=Co(e,r),s=[];break;case"select":i=We({},i,{value:void 0}),r=We({},r,{value:void 0}),s=[];break;case"textarea":i=wo(e,i),r=wo(e,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=hu)}Io(n,r);var a;n=null;for(c in i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var u=i[c];for(a in u)u.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Rs.hasOwnProperty(c)?s||(s=[]):(s=s||[]).push(c,null));for(c in r){var l=r[c];if(u=i!=null?i[c]:void 0,r.hasOwnProperty(c)&&l!==u&&(l!=null||u!=null))if(c==="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(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,u=u?u.__html:void 0,l!=null&&u!==l&&(s=s||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Rs.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&Ue("scroll",e),s||u===l||(s=[])):(s=s||[]).push(c,l))}n&&(s=s||[]).push("style",n);var c=s;(t.updateQueue=c)&&(t.flags|=4)}};Yp=function(e,t,n,r){n!==r&&(t.flags|=4)};function Zi(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 gt(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 VT(e,t,n){var r=t.pendingProps;switch(Jc(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return gt(t),null;case 1:return jt(t.type)&&mu(),gt(t),null;case 3:return r=t.stateNode,wi(),He(Ft),He(bt),ud(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Aa(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,hn!==null&&(dc(hn),hn=null))),rc(e,t),gt(t),null;case 5:ad(t);var i=Dr(Vs.current);if(n=t.type,e!==null&&t.stateNode!=null)$p(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 gt(t),null}if(e=Dr(In.current),Aa(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[An]=t,r[$s]=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<cs.length;i++)Ue(cs[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":gf(r,s),Ue("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Ue("invalid",r);break;case"textarea":Tf(r,s),Ue("invalid",r)}Io(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&&Na(r.textContent,u,e),i=["children",u]):typeof u=="number"&&r.textContent!==""+u&&(s.suppressHydrationWarning!==!0&&Na(r.textContent,u,e),i=["children",""+u]):Rs.hasOwnProperty(a)&&u!=null&&a==="onScroll"&&Ue("scroll",r)}switch(n){case"input":Ta(r),Ef(r,s,!0);break;case"textarea":Ta(r),yf(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=hu)}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=Tm(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[An]=t,e[$s]=r,zp(e,t,!1,!1),t.stateNode=e;e:{switch(a=Lo(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<cs.length;i++)Ue(cs[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":gf(e,r),i=Co(e,r),Ue("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=We({},r,{value:void 0}),Ue("invalid",e);break;case"textarea":Tf(e,r),i=wo(e,r),Ue("invalid",e);break;default:i=r}Io(n,i),u=i;for(s in u)if(u.hasOwnProperty(s)){var l=u[s];s==="style"?xm(e,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&ym(e,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Os(e,l):typeof l=="number"&&Os(e,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(Rs.hasOwnProperty(s)?l!=null&&s==="onScroll"&&Ue("scroll",e):l!=null&&Fc(e,s,l,a))}switch(n){case"input":Ta(e),Ef(e,r,!1);break;case"textarea":Ta(e),yf(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Tr(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=hu)}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 gt(t),null;case 6:if(e&&t.stateNode!=null)Yp(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(q(166));if(n=Dr(Vs.current),Dr(In.current),Aa(t)){if(r=t.stateNode,n=t.memoizedProps,r[An]=t,(s=r.nodeValue!==n)&&(e=qt,e!==null))switch(e.tag){case 3:Na(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Na(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[An]=t,t.stateNode=r}return gt(t),null;case 13:if(He(Ye),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if($e&&Wt!==null&&t.mode&1&&!(t.flags&128))lp(),Ni(),t.flags|=98560,s=!1;else if(s=Aa(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[An]=t}else Ni(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;gt(t),s=!1}else hn!==null&&(dc(hn),hn=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||Ye.current&1?tt===0&&(tt=3):yd())),t.updateQueue!==null&&(t.flags|=4),gt(t),null);case 4:return wi(),rc(e,t),e===null&&Hs(t.stateNode.containerInfo),gt(t),null;case 10:return nd(t.type._context),gt(t),null;case 17:return jt(t.type)&&mu(),gt(t),null;case 19:if(He(Ye),s=t.memoizedState,s===null)return gt(t),null;if(r=(t.flags&128)!==0,a=s.rendering,a===null)if(r)Zi(s,!1);else{if(tt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=xu(e),a!==null){for(t.flags|=128,Zi(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 Be(Ye,Ye.current&1|2),t.child}e=e.sibling}s.tail!==null&&Ke()>Ii&&(t.flags|=128,r=!0,Zi(s,!1),t.lanes=4194304)}else{if(!r)if(e=xu(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Zi(s,!0),s.tail===null&&s.tailMode==="hidden"&&!a.alternate&&!$e)return gt(t),null}else 2*Ke()-s.renderingStartTime>Ii&&n!==1073741824&&(t.flags|=128,r=!0,Zi(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=Ke(),t.sibling=null,n=Ye.current,Be(Ye,r?n&1|2:n&1),t):(gt(t),null);case 22:case 23:return Td(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Vt&1073741824&&(gt(t),t.subtreeFlags&6&&(t.flags|=8192)):gt(t),null;case 24:return null;case 25:return null}throw Error(q(156,t.tag))}function WT(e,t){switch(Jc(t),t.tag){case 1:return jt(t.type)&&mu(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return wi(),He(Ft),He(bt),ud(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return ad(t),null;case 13:if(He(Ye),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(Ye),null;case 4:return wi(),null;case 10:return nd(t.type._context),null;case 22:case 23:return Td(),null;case 24:return null;default:return null}}var Ia=!1,Et=!1,qT=typeof WeakSet=="function"?WeakSet:Set,se=null;function mi(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Qe(e,t,r)}else n.current=null}function ic(e,t,n){try{n()}catch(r){Qe(e,t,r)}}var lh=!1;function QT(e,t){if(Ho=cu,e=Gm(),Kc(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,c=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&&++c===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(zo={focusedElem:e,selectionRange:n},cu=!1,se=t;se!==null;)if(t=se,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,se=e;else for(;se!==null;){t=se;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var b=g.memoizedProps,v=g.memoizedState,E=t.stateNode,T=E.getSnapshotBeforeUpdate(t.elementType===t.type?b:dn(t.type,b),v);E.__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(D){Qe(t,t.return,D)}if(e=t.sibling,e!==null){e.return=t.return,se=e;break}se=t.return}return g=lh,lh=!1,g}function ys(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&&ic(t,n,s)}i=i.next}while(i!==r)}}function Xu(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 sc(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 Vp(e){var t=e.alternate;t!==null&&(e.alternate=null,Vp(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[An],delete t[$s],delete t[Vo],delete t[IT],delete t[LT])),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 Wp(e){return e.tag===5||e.tag===3||e.tag===4}function oh(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Wp(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 ac(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=hu));else if(r!==4&&(e=e.child,e!==null))for(ac(e,t,n),e=e.sibling;e!==null;)ac(e,t,n),e=e.sibling}function uc(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(uc(e,t,n),e=e.sibling;e!==null;)uc(e,t,n),e=e.sibling}var ft=null,fn=!1;function Xn(e,t,n){for(n=n.child;n!==null;)qp(e,t,n),n=n.sibling}function qp(e,t,n){if(vn&&typeof vn.onCommitFiberUnmount=="function")try{vn.onCommitFiberUnmount($u,n)}catch{}switch(n.tag){case 5:Et||mi(n,t);case 6:var r=ft,i=fn;ft=null,Xn(e,t,n),ft=r,fn=i,ft!==null&&(fn?(e=ft,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ft.removeChild(n.stateNode));break;case 18:ft!==null&&(fn?(e=ft,n=n.stateNode,e.nodeType===8?Hl(e.parentNode,n):e.nodeType===1&&Hl(e,n),js(e)):Hl(ft,n.stateNode));break;case 4:r=ft,i=fn,ft=n.stateNode.containerInfo,fn=!0,Xn(e,t,n),ft=r,fn=i;break;case 0:case 11:case 14:case 15:if(!Et&&(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)&&ic(n,t,a),i=i.next}while(i!==r)}Xn(e,t,n);break;case 1:if(!Et&&(mi(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(u){Qe(n,t,u)}Xn(e,t,n);break;case 21:Xn(e,t,n);break;case 22:n.mode&1?(Et=(r=Et)||n.memoizedState!==null,Xn(e,t,n),Et=r):Xn(e,t,n);break;default:Xn(e,t,n)}}function ch(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new qT),t.forEach(function(r){var i=ry.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function on(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:ft=u.stateNode,fn=!1;break e;case 3:ft=u.stateNode.containerInfo,fn=!0;break e;case 4:ft=u.stateNode.containerInfo,fn=!0;break e}u=u.return}if(ft===null)throw Error(q(160));qp(s,a,i),ft=null,fn=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(c){Qe(i,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Qp(t,e),t=t.sibling}function Qp(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(on(t,e),kn(e),r&4){try{ys(3,e,e.return),Xu(3,e)}catch(b){Qe(e,e.return,b)}try{ys(5,e,e.return)}catch(b){Qe(e,e.return,b)}}break;case 1:on(t,e),kn(e),r&512&&n!==null&&mi(n,n.return);break;case 5:if(on(t,e),kn(e),r&512&&n!==null&&mi(n,n.return),e.flags&32){var i=e.stateNode;try{Os(i,"")}catch(b){Qe(e,e.return,b)}}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&&gm(i,s),Lo(u,a);var c=Lo(u,s);for(a=0;a<l.length;a+=2){var f=l[a],h=l[a+1];f==="style"?xm(i,h):f==="dangerouslySetInnerHTML"?ym(i,h):f==="children"?Os(i,h):Fc(i,f,h,c)}switch(u){case"input":No(i,s);break;case"textarea":Em(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[$s]=s}catch(b){Qe(e,e.return,b)}}break;case 6:if(on(t,e),kn(e),r&4){if(e.stateNode===null)throw Error(q(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(b){Qe(e,e.return,b)}}break;case 3:if(on(t,e),kn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{js(t.containerInfo)}catch(b){Qe(e,e.return,b)}break;case 4:on(t,e),kn(e);break;case 13:on(t,e),kn(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(gd=Ke())),r&4&&ch(e);break;case 22:if(f=n!==null&&n.memoizedState!==null,e.mode&1?(Et=(c=Et)||f,on(t,e),Et=c):on(t,e),kn(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!f&&e.mode&1)for(se=e,f=e.child;f!==null;){for(h=se=f;se!==null;){switch(m=se,p=m.child,m.tag){case 0:case 11:case 14:case 15:ys(4,m,m.return);break;case 1:mi(m,m.return);var g=m.stateNode;if(typeof g.componentWillUnmount=="function"){r=m,n=m.return;try{t=r,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(b){Qe(r,n,b)}}break;case 5:mi(m,m.return);break;case 22:if(m.memoizedState!==null){fh(h);continue}}p!==null?(p.return=m,se=p):fh(h)}f=f.sibling}e:for(f=null,h=e;;){if(h.tag===5){if(f===null){f=h;try{i=h.stateNode,c?(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=bm("display",a))}catch(b){Qe(e,e.return,b)}}}else if(h.tag===6){if(f===null)try{h.stateNode.nodeValue=c?"":h.memoizedProps}catch(b){Qe(e,e.return,b)}}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:on(t,e),kn(e),r&4&&ch(e);break;case 21:break;default:on(t,e),kn(e)}}function kn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Wp(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&&(Os(i,""),r.flags&=-33);var s=oh(e);uc(e,s,i);break;case 3:case 4:var a=r.stateNode.containerInfo,u=oh(e);ac(e,u,a);break;default:throw Error(q(161))}}catch(l){Qe(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function GT(e,t,n){se=e,Gp(e)}function Gp(e,t,n){for(var r=(e.mode&1)!==0;se!==null;){var i=se,s=i.child;if(i.tag===22&&r){var a=i.memoizedState!==null||Ia;if(!a){var u=i.alternate,l=u!==null&&u.memoizedState!==null||Et;u=Ia;var c=Et;if(Ia=a,(Et=l)&&!c)for(se=i;se!==null;)a=se,l=a.child,a.tag===22&&a.memoizedState!==null?hh(i):l!==null?(l.return=a,se=l):hh(i);for(;s!==null;)se=s,Gp(s),s=s.sibling;se=i,Ia=u,Et=c}dh(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,se=s):dh(e)}}function dh(e){for(;se!==null;){var t=se;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Et||Xu(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Et)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:dn(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&Gf(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}Gf(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 c=t.alternate;if(c!==null){var f=c.memoizedState;if(f!==null){var h=f.dehydrated;h!==null&&js(h)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(q(163))}Et||t.flags&512&&sc(t)}catch(m){Qe(t,t.return,m)}}if(t===e){se=null;break}if(n=t.sibling,n!==null){n.return=t.return,se=n;break}se=t.return}}function fh(e){for(;se!==null;){var t=se;if(t===e){se=null;break}var n=t.sibling;if(n!==null){n.return=t.return,se=n;break}se=t.return}}function hh(e){for(;se!==null;){var t=se;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Xu(4,t)}catch(l){Qe(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(l){Qe(t,i,l)}}var s=t.return;try{sc(t)}catch(l){Qe(t,s,l)}break;case 5:var a=t.return;try{sc(t)}catch(l){Qe(t,a,l)}}}catch(l){Qe(t,t.return,l)}if(t===e){se=null;break}var u=t.sibling;if(u!==null){u.return=t.return,se=u;break}se=t.return}}var KT=Math.ceil,Su=Gn.ReactCurrentDispatcher,md=Gn.ReactCurrentOwner,sn=Gn.ReactCurrentBatchConfig,we=0,ut=null,Ze=null,ht=0,Vt=0,pi=xr(0),tt=0,Gs=null,Hr=0,Ju=0,pd=0,bs=null,Pt=null,gd=0,Ii=1/0,Fn=null,Cu=!1,lc=null,pr=null,La=!1,lr=null,Nu=0,xs=0,oc=null,Ka=-1,Xa=0;function Nt(){return we&6?Ke():Ka!==-1?Ka:Ka=Ke()}function gr(e){return e.mode&1?we&2&&ht!==0?ht&-ht:RT.transition!==null?(Xa===0&&(Xa=Rm()),Xa):(e=De,e!==0||(e=window.event,e=e===void 0?16:Um(e.type)),e):1}function gn(e,t,n,r){if(50<xs)throw xs=0,oc=null,Error(q(185));na(e,n,r),(!(we&2)||e!==ut)&&(e===ut&&(!(we&2)&&(Ju|=n),tt===4&&ar(e,ht)),Bt(e,r),n===1&&we===0&&!(t.mode&1)&&(Ii=Ke()+500,Qu&&_r()))}function Bt(e,t){var n=e.callbackNode;R2(e,t);var r=ou(e,e===ut?ht:0);if(r===0)n!==null&&_f(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&_f(n),t===1)e.tag===0?DT(mh.bind(null,e)):sp(mh.bind(null,e)),wT(function(){!(we&6)&&_r()}),n=null;else{switch(Om(r)){case 1:n=zc;break;case 4:n=Lm;break;case 16:n=lu;break;case 536870912:n=Dm;break;default:n=lu}n=r1(n,Kp.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Kp(e,t){if(Ka=-1,Xa=0,we&6)throw Error(q(327));var n=e.callbackNode;if(_i()&&e.callbackNode!==n)return null;var r=ou(e,e===ut?ht:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Au(e,r);else{t=r;var i=we;we|=2;var s=Jp();(ut!==e||ht!==t)&&(Fn=null,Ii=Ke()+500,Pr(e,t));do try{ZT();break}catch(u){Xp(e,u)}while(!0);td(),Su.current=s,we=i,Ze!==null?t=0:(ut=null,ht=0,t=tt)}if(t!==0){if(t===2&&(i=Mo(e),i!==0&&(r=i,t=cc(e,i))),t===1)throw n=Gs,Pr(e,0),ar(e,r),Bt(e,Ke()),n;if(t===6)ar(e,r);else{if(i=e.current.alternate,!(r&30)&&!XT(i)&&(t=Au(e,r),t===2&&(s=Mo(e),s!==0&&(r=s,t=cc(e,s))),t===1))throw n=Gs,Pr(e,0),ar(e,r),Bt(e,Ke()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(q(345));case 2:wr(e,Pt,Fn);break;case 3:if(ar(e,r),(r&130023424)===r&&(t=gd+500-Ke(),10<t)){if(ou(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){Nt(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Yo(wr.bind(null,e,Pt,Fn),t);break}wr(e,Pt,Fn);break;case 4:if(ar(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var a=31-pn(r);s=1<<a,a=t[a],a>i&&(i=a),r&=~s}if(r=i,r=Ke()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*KT(r/1960))-r,10<r){e.timeoutHandle=Yo(wr.bind(null,e,Pt,Fn),r);break}wr(e,Pt,Fn);break;case 5:wr(e,Pt,Fn);break;default:throw Error(q(329))}}}return Bt(e,Ke()),e.callbackNode===n?Kp.bind(null,e):null}function cc(e,t){var n=bs;return e.current.memoizedState.isDehydrated&&(Pr(e,t).flags|=256),e=Au(e,t),e!==2&&(t=Pt,Pt=n,t!==null&&dc(t)),e}function dc(e){Pt===null?Pt=e:Pt.push.apply(Pt,e)}function XT(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(!Tn(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 ar(e,t){for(t&=~pd,t&=~Ju,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-pn(t),r=1<<n;e[n]=-1,t&=~r}}function mh(e){if(we&6)throw Error(q(327));_i();var t=ou(e,0);if(!(t&1))return Bt(e,Ke()),null;var n=Au(e,t);if(e.tag!==0&&n===2){var r=Mo(e);r!==0&&(t=r,n=cc(e,r))}if(n===1)throw n=Gs,Pr(e,0),ar(e,t),Bt(e,Ke()),n;if(n===6)throw Error(q(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,wr(e,Pt,Fn),Bt(e,Ke()),null}function Ed(e,t){var n=we;we|=1;try{return e(t)}finally{we=n,we===0&&(Ii=Ke()+500,Qu&&_r())}}function zr(e){lr!==null&&lr.tag===0&&!(we&6)&&_i();var t=we;we|=1;var n=sn.transition,r=De;try{if(sn.transition=null,De=1,e)return e()}finally{De=r,sn.transition=n,we=t,!(we&6)&&_r()}}function Td(){Vt=pi.current,He(pi)}function Pr(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,AT(n)),Ze!==null)for(n=Ze.return;n!==null;){var r=n;switch(Jc(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&mu();break;case 3:wi(),He(Ft),He(bt),ud();break;case 5:ad(r);break;case 4:wi();break;case 13:He(Ye);break;case 19:He(Ye);break;case 10:nd(r.type._context);break;case 22:case 23:Td()}n=n.return}if(ut=e,Ze=e=Er(e.current,null),ht=Vt=t,tt=0,Gs=null,pd=Ju=Hr=0,Pt=bs=null,Lr!==null){for(t=0;t<Lr.length;t++)if(n=Lr[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}Lr=null}return e}function Xp(e,t){do{var n=Ze;try{if(td(),qa.current=ku,_u){for(var r=Ve.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}_u=!1}if(Ur=0,st=et=Ve=null,Ts=!1,Ws=0,md.current=null,n===null||n.return===null){tt=1,Gs=t,Ze=null;break}e:{var s=e,a=n.return,u=n,l=t;if(t=ht,u.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=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=th(a);if(p!==null){p.flags&=-257,nh(p,a,u,s,t),p.mode&1&&eh(s,c,t),t=p,l=c;var g=t.updateQueue;if(g===null){var b=new Set;b.add(l),t.updateQueue=b}else g.add(l);break e}else{if(!(t&1)){eh(s,c,t),yd();break e}l=Error(q(426))}}else if($e&&u.mode&1){var v=th(a);if(v!==null){!(v.flags&65536)&&(v.flags|=256),nh(v,a,u,s,t),Zc(vi(l,u));break e}}s=l=vi(l,u),tt!==4&&(tt=2),bs===null?bs=[s]:bs.push(s),s=a;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var E=Op(s,l,t);Qf(s,E);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"&&(pr===null||!pr.has(x)))){s.flags|=65536,t&=-t,s.lanes|=t;var D=Pp(s,u,t);Qf(s,D);break e}}s=s.return}while(s!==null)}e1(n)}catch(F){t=F,Ze===n&&n!==null&&(Ze=n=n.return);continue}break}while(!0)}function Jp(){var e=Su.current;return Su.current=ku,e===null?ku:e}function yd(){(tt===0||tt===3||tt===2)&&(tt=4),ut===null||!(Hr&268435455)&&!(Ju&268435455)||ar(ut,ht)}function Au(e,t){var n=we;we|=2;var r=Jp();(ut!==e||ht!==t)&&(Fn=null,Pr(e,t));do try{JT();break}catch(i){Xp(e,i)}while(!0);if(td(),we=n,Su.current=r,Ze!==null)throw Error(q(261));return ut=null,ht=0,tt}function JT(){for(;Ze!==null;)Zp(Ze)}function ZT(){for(;Ze!==null&&!S2();)Zp(Ze)}function Zp(e){var t=n1(e.alternate,e,Vt);e.memoizedProps=e.pendingProps,t===null?e1(e):Ze=t,md.current=null}function e1(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=WT(n,t),n!==null){n.flags&=32767,Ze=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{tt=6,Ze=null;return}}else if(n=VT(n,t,Vt),n!==null){Ze=n;return}if(t=t.sibling,t!==null){Ze=t;return}Ze=t=e}while(t!==null);tt===0&&(tt=5)}function wr(e,t,n){var r=De,i=sn.transition;try{sn.transition=null,De=1,ey(e,t,n,r)}finally{sn.transition=i,De=r}return null}function ey(e,t,n,r){do _i();while(lr!==null);if(we&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(O2(e,s),e===ut&&(Ze=ut=null,ht=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||La||(La=!0,r1(lu,function(){return _i(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=sn.transition,sn.transition=null;var a=De;De=1;var u=we;we|=4,md.current=null,QT(e,n),Qp(n,e),bT(zo),cu=!!Ho,zo=Ho=null,e.current=n,GT(n),C2(),we=u,De=a,sn.transition=s}else e.current=n;if(La&&(La=!1,lr=e,Nu=i),s=e.pendingLanes,s===0&&(pr=null),w2(n.stateNode),Bt(e,Ke()),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(Cu)throw Cu=!1,e=lc,lc=null,e;return Nu&1&&e.tag!==0&&_i(),s=e.pendingLanes,s&1?e===oc?xs++:(xs=0,oc=e):xs=0,_r(),null}function _i(){if(lr!==null){var e=Om(Nu),t=sn.transition,n=De;try{if(sn.transition=null,De=16>e?16:e,lr===null)var r=!1;else{if(e=lr,lr=null,Nu=0,we&6)throw Error(q(331));var i=we;for(we|=4,se=e.current;se!==null;){var s=se,a=s.child;if(se.flags&16){var u=s.deletions;if(u!==null){for(var l=0;l<u.length;l++){var c=u[l];for(se=c;se!==null;){var f=se;switch(f.tag){case 0:case 11:case 15:ys(8,f,s)}var h=f.child;if(h!==null)h.return=f,se=h;else for(;se!==null;){f=se;var m=f.sibling,p=f.return;if(Vp(f),f===c){se=null;break}if(m!==null){m.return=p,se=m;break}se=p}}}var g=s.alternate;if(g!==null){var b=g.child;if(b!==null){g.child=null;do{var v=b.sibling;b.sibling=null,b=v}while(b!==null)}}se=s}}if(s.subtreeFlags&2064&&a!==null)a.return=s,se=a;else e:for(;se!==null;){if(s=se,s.flags&2048)switch(s.tag){case 0:case 11:case 15:ys(9,s,s.return)}var E=s.sibling;if(E!==null){E.return=s.return,se=E;break e}se=s.return}}var T=e.current;for(se=T;se!==null;){a=se;var x=a.child;if(a.subtreeFlags&2064&&x!==null)x.return=a,se=x;else e:for(a=T;se!==null;){if(u=se,u.flags&2048)try{switch(u.tag){case 0:case 11:case 15:Xu(9,u)}}catch(F){Qe(u,u.return,F)}if(u===a){se=null;break e}var D=u.sibling;if(D!==null){D.return=u.return,se=D;break e}se=u.return}}if(we=i,_r(),vn&&typeof vn.onPostCommitFiberRoot=="function")try{vn.onPostCommitFiberRoot($u,e)}catch{}r=!0}return r}finally{De=n,sn.transition=t}}return!1}function ph(e,t,n){t=vi(n,t),t=Op(e,t,1),e=mr(e,t,1),t=Nt(),e!==null&&(na(e,1,t),Bt(e,t))}function Qe(e,t,n){if(e.tag===3)ph(e,e,n);else for(;t!==null;){if(t.tag===3){ph(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(pr===null||!pr.has(r))){e=vi(n,e),e=Pp(t,e,1),t=mr(t,e,1),e=Nt(),t!==null&&(na(t,1,e),Bt(t,e));break}}t=t.return}}function ty(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Nt(),e.pingedLanes|=e.suspendedLanes&n,ut===e&&(ht&n)===n&&(tt===4||tt===3&&(ht&130023424)===ht&&500>Ke()-gd?Pr(e,0):pd|=n),Bt(e,t)}function t1(e,t){t===0&&(e.mode&1?(t=xa,xa<<=1,!(xa&130023424)&&(xa=4194304)):t=1);var n=Nt();e=Wn(e,t),e!==null&&(na(e,t,n),Bt(e,n))}function ny(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),t1(e,n)}function ry(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),t1(e,n)}var n1;n1=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ft.current)Mt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Mt=!1,YT(e,t,n);Mt=!!(e.flags&131072)}else Mt=!1,$e&&t.flags&1048576&&ap(t,Eu,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ga(e,t),e=t.pendingProps;var i=Ci(t,bt.current);xi(t,n),i=od(null,t,r,e,i,n);var s=cd();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,jt(r)?(s=!0,pu(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,id(t),i.updater=Ku,t.stateNode=i,i._reactInternals=t,Xo(t,r,e,n),t=ec(null,t,r,!0,s,n)):(t.tag=0,$e&&s&&Xc(t),St(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ga(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=sy(r),e=dn(r,e),i){case 0:t=Zo(null,t,r,e,n);break e;case 1:t=sh(null,t,r,e,n);break e;case 11:t=rh(null,t,r,e,n);break e;case 14:t=ih(null,t,r,dn(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:dn(r,i),Zo(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:dn(r,i),sh(e,t,r,i,n);case 3:e:{if(Bp(t),e===null)throw Error(q(387));r=t.pendingProps,s=t.memoizedState,i=s.element,fp(e,t),bu(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=vi(Error(q(423)),t),t=ah(e,t,r,n,i);break e}else if(r!==i){i=vi(Error(q(424)),t),t=ah(e,t,r,n,i);break e}else for(Wt=hr(t.stateNode.containerInfo.firstChild),qt=t,$e=!0,hn=null,n=cp(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}St(e,t,r,n)}t=t.child}return t;case 5:return hp(t),e===null&&Qo(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,a=i.children,$o(r,i)?a=null:s!==null&&$o(r,s)&&(t.flags|=32),jp(e,t),St(e,t,a,n),t.child;case 6:return e===null&&Qo(t),null;case 13:return Up(e,t,n);case 4:return sd(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ai(t,null,r,n):St(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:dn(r,i),rh(e,t,r,i,n);case 7:return St(e,t,t.pendingProps,n),t.child;case 8:return St(e,t,t.pendingProps.children,n),t.child;case 12:return St(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,Be(Tu,r._currentValue),r._currentValue=a,s!==null)if(Tn(s.value,a)){if(s.children===i.children&&!Ft.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=$n(-1,n&-n),l.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var f=c.pending;f===null?l.next=l:(l.next=f.next,f.next=l),c.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Go(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),Go(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}St(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,xi(t,n),i=an(i),r=r(i),t.flags|=1,St(e,t,r,n),t.child;case 14:return r=t.type,i=dn(r,t.pendingProps),i=dn(r.type,i),ih(e,t,r,i,n);case 15:return Mp(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:dn(r,i),Ga(e,t),t.tag=1,jt(r)?(e=!0,pu(t)):e=!1,xi(t,n),Rp(t,r,i),Xo(t,r,i,n),ec(null,t,r,!0,e,n);case 19:return Hp(e,t,n);case 22:return Fp(e,t,n)}throw Error(q(156,t.tag))};function r1(e,t){return Im(e,t)}function iy(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 rn(e,t,n,r){return new iy(e,t,n,r)}function bd(e){return e=e.prototype,!(!e||!e.isReactComponent)}function sy(e){if(typeof e=="function")return bd(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Bc)return 11;if(e===Uc)return 14}return 2}function Er(e,t){var n=e.alternate;return n===null?(n=rn(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 Ja(e,t,n,r,i,s){var a=2;if(r=e,typeof e=="function")bd(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case si:return Mr(n.children,i,s,t);case jc:a=8,i|=8;break;case xo:return e=rn(12,n,t,i|2),e.elementType=xo,e.lanes=s,e;case _o:return e=rn(13,n,t,i),e.elementType=_o,e.lanes=s,e;case ko:return e=rn(19,n,t,i),e.elementType=ko,e.lanes=s,e;case hm:return Zu(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case dm:a=10;break e;case fm:a=9;break e;case Bc:a=11;break e;case Uc:a=14;break e;case rr:a=16,r=null;break e}throw Error(q(130,e==null?e:typeof e,""))}return t=rn(a,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function Mr(e,t,n,r){return e=rn(7,e,r,t),e.lanes=n,e}function Zu(e,t,n,r){return e=rn(22,e,r,t),e.elementType=hm,e.lanes=n,e.stateNode={isHidden:!1},e}function Gl(e,t,n){return e=rn(6,e,null,t),e.lanes=n,e}function Kl(e,t,n){return t=rn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function ay(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=Il(0),this.expirationTimes=Il(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Il(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function xd(e,t,n,r,i,s,a,u,l){return e=new ay(e,t,n,u,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=rn(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},id(s),e}function uy(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 i1(e){if(!e)return yr;e=e._reactInternals;e:{if(Wr(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(jt(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(jt(n))return ip(e,n,t)}return t}function s1(e,t,n,r,i,s,a,u,l){return e=xd(n,r,!0,e,i,s,a,u,l),e.context=i1(null),n=e.current,r=Nt(),i=gr(n),s=$n(r,i),s.callback=t??null,mr(n,s,i),e.current.lanes=i,na(e,i,r),Bt(e,r),e}function el(e,t,n,r){var i=t.current,s=Nt(),a=gr(i);return n=i1(n),t.context===null?t.context=n:t.pendingContext=n,t=$n(s,a),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=mr(i,t,a),e!==null&&(gn(e,i,a,s),Wa(e,i,a)),a}function wu(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 gh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function _d(e,t){gh(e,t),(e=e.alternate)&&gh(e,t)}function ly(){return null}var a1=typeof reportError=="function"?reportError:function(e){console.error(e)};function kd(e){this._internalRoot=e}tl.prototype.render=kd.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(q(409));el(e,t,null,null)};tl.prototype.unmount=kd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;zr(function(){el(null,e,null,null)}),t[Vn]=null}};function tl(e){this._internalRoot=e}tl.prototype.unstable_scheduleHydration=function(e){if(e){var t=Fm();e={blockedOn:null,target:e,priority:t};for(var n=0;n<sr.length&&t!==0&&t<sr[n].priority;n++);sr.splice(n,0,e),n===0&&Bm(e)}};function Sd(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function nl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Eh(){}function oy(e,t,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var c=wu(a);s.call(c)}}var a=s1(t,r,e,0,null,!1,!1,"",Eh);return e._reactRootContainer=a,e[Vn]=a.current,Hs(e.nodeType===8?e.parentNode:e),zr(),a}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var u=r;r=function(){var c=wu(l);u.call(c)}}var l=xd(e,0,!1,null,null,!1,!1,"",Eh);return e._reactRootContainer=l,e[Vn]=l.current,Hs(e.nodeType===8?e.parentNode:e),zr(function(){el(t,l,n,r)}),l}function rl(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=wu(a);u.call(l)}}el(t,a,e,i)}else a=oy(n,t,e,i,r);return wu(a)}Pm=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=os(t.pendingLanes);n!==0&&($c(t,n|1),Bt(t,Ke()),!(we&6)&&(Ii=Ke()+500,_r()))}break;case 13:zr(function(){var r=Wn(e,1);if(r!==null){var i=Nt();gn(r,e,1,i)}}),_d(e,1)}};Yc=function(e){if(e.tag===13){var t=Wn(e,134217728);if(t!==null){var n=Nt();gn(t,e,134217728,n)}_d(e,134217728)}};Mm=function(e){if(e.tag===13){var t=gr(e),n=Wn(e,t);if(n!==null){var r=Nt();gn(n,e,t,r)}_d(e,t)}};Fm=function(){return De};jm=function(e,t){var n=De;try{return De=e,t()}finally{De=n}};Ro=function(e,t,n){switch(t){case"input":if(No(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=qu(r);if(!i)throw Error(q(90));pm(r),No(r,i)}}}break;case"textarea":Em(e,n);break;case"select":t=n.value,t!=null&&Ei(e,!!n.multiple,t,!1)}};Sm=Ed;Cm=zr;var cy={usingClientEntryPoint:!1,Events:[ia,oi,qu,_m,km,Ed]},es={findFiberByHostInstance:Ir,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},dy={bundleType:es.bundleType,version:es.version,rendererPackageName:es.rendererPackageName,rendererConfig:es.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=wm(e),e===null?null:e.stateNode},findFiberByHostInstance:es.findFiberByHostInstance||ly,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 Da=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Da.isDisabled&&Da.supportsFiber)try{$u=Da.inject(dy),vn=Da}catch{}}Kt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=cy;Kt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Sd(t))throw Error(q(200));return uy(e,t,null,n)};Kt.createRoot=function(e,t){if(!Sd(e))throw Error(q(299));var n=!1,r="",i=a1;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=xd(e,1,!1,null,null,n,!1,r,i),e[Vn]=t.current,Hs(e.nodeType===8?e.parentNode:e),new kd(t)};Kt.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=wm(t),e=e===null?null:e.stateNode,e};Kt.flushSync=function(e){return zr(e)};Kt.hydrate=function(e,t,n){if(!nl(t))throw Error(q(200));return rl(null,e,t,!0,n)};Kt.hydrateRoot=function(e,t,n){if(!Sd(e))throw Error(q(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",a=a1;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),t=s1(t,null,e,1,n??null,i,!1,s,a),e[Vn]=t.current,Hs(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 tl(t)};Kt.render=function(e,t,n){if(!nl(t))throw Error(q(200));return rl(null,e,t,!1,n)};Kt.unmountComponentAtNode=function(e){if(!nl(e))throw Error(q(40));return e._reactRootContainer?(zr(function(){rl(null,null,e,!1,function(){e._reactRootContainer=null,e[Vn]=null})}),!0):!1};Kt.unstable_batchedUpdates=Ed;Kt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!nl(n))throw Error(q(200));if(e==null||e._reactInternals===void 0)throw Error(q(38));return rl(e,t,n,!1,r)};Kt.version="18.3.1-next-f1338f8080-20240426";function u1(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(u1)}catch(e){console.error(e)}}u1(),um.exports=Kt;var fy=um.exports,Th=fy;yo.createRoot=Th.createRoot,yo.hydrateRoot=Th.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 hy={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 my=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),ue=(e,t)=>{const n=k.forwardRef(({color:r="currentColor",size:i=24,strokeWidth:s=2,absoluteStrokeWidth:a,className:u="",children:l,...c},f)=>k.createElement("svg",{ref:f,...hy,width:i,height:i,stroke:r,strokeWidth:a?Number(s)*24/Number(i):s,className:["lucide",`lucide-${my(e)}`,u].join(" "),...c},[...t.map(([h,m])=>k.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 Qn=ue("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 $r=ue("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 py=ue("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 gy=ue("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 yh=ue("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=ue("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 fc=ue("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 Ey=ue("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 Ty=ue("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 il=ue("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 aa=ue("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 Cd=ue("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 ua=ue("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 l1=ue("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 yy=ue("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 by=ue("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 sl=ue("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 xy=ue("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 ts=ue("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 _y=ue("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 Li=ue("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 ky=ue("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 wn=ue("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 o1=ue("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 zn=ue("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 bh=ue("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 c1=ue("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 d1=ue("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 Sy=ue("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 Cy=ue("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 Ny=ue("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 Ay=ue("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 wy=ue("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 vy=ue("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 Ln=ue("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 Iy=ue("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 f1=ue("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 Ly=ue("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 Dy=ue("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 Ry=ue("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 Oy=ue("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 Py=ue("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 My=ue("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 Fy=ue("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 jy=ue("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 Nd=ue("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 h1=ue("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 Rr=ue("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 By=ue("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 Uy=ue("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 Hy=ue("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 m1=ue("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 zy=ue("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 xh=ue("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 $y=ue("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 Yy=ue("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 vu=ue("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 Iu=ue("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 Ks=ue("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 Vy=ue("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 Wy=ue("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 Tt=ue("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 p1=ue("Zap",[["polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2",key:"45s27k"}]]),qy={},_h=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(g=>g(t,p))}},i=()=>t,l={setState:r,getState:i,getInitialState:()=>c,subscribe:f=>(n.add(f),()=>n.delete(f)),destroy:()=>{(qy?"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()}},c=t=e(r,i,l);return l},Qy=e=>e?_h(e):_h;var g1={exports:{}},E1={},T1={exports:{}},y1={};/**
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 Di=k;function Gy(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ky=typeof Object.is=="function"?Object.is:Gy,Xy=Di.useState,Jy=Di.useEffect,Zy=Di.useLayoutEffect,eb=Di.useDebugValue;function tb(e,t){var n=t(),r=Xy({inst:{value:n,getSnapshot:t}}),i=r[0].inst,s=r[1];return Zy(function(){i.value=n,i.getSnapshot=t,Xl(i)&&s({inst:i})},[e,n,t]),Jy(function(){return Xl(i)&&s({inst:i}),e(function(){Xl(i)&&s({inst:i})})},[e]),eb(n),n}function Xl(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Ky(e,n)}catch{return!0}}function nb(e,t){return t()}var rb=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?nb:tb;y1.useSyncExternalStore=Di.useSyncExternalStore!==void 0?Di.useSyncExternalStore:rb;T1.exports=y1;var ib=T1.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 al=k,sb=ib;function ab(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ub=typeof Object.is=="function"?Object.is:ab,lb=sb.useSyncExternalStore,ob=al.useRef,cb=al.useEffect,db=al.useMemo,fb=al.useDebugValue;E1.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var s=ob(null);if(s.current===null){var a={hasValue:!1,value:null};s.current=a}else a=s.current;s=db(function(){function l(p){if(!c){if(c=!0,f=p,p=r(p),i!==void 0&&a.hasValue){var g=a.value;if(i(g,p))return h=g}return h=p}if(g=h,ub(f,p))return g;var b=r(p);return i!==void 0&&i(g,b)?(f=p,g):(f=p,h=b)}var c=!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=lb(e,s[0],s[1]);return cb(function(){a.hasValue=!0,a.value=u},[u]),fb(u),u};g1.exports=E1;var hb=g1.exports;const mb=Hu(hb),b1={},{useDebugValue:pb}=Ds,{useSyncExternalStoreWithSelector:gb}=mb;let kh=!1;const Eb=e=>e;function Tb(e,t=Eb,n){(b1?"production":void 0)!=="production"&&n&&!kh&&(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"),kh=!0);const r=gb(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return pb(r),r}const Sh=e=>{(b1?"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"?Qy(e):e,n=(r,i)=>Tb(t,r,i);return Object.assign(n,t),n},x1=e=>e?Sh(e):Sh,xe=x1((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})})),yb={api:"#4fc3f7",store:"#ce93d8",chat:"#81c784",stream:"#ffb74d",ui:"#90a4ae",doc:"#a1887f",system:"#e57373",nav:"#fff176"},bb={api:"fetch",store:"state",chat:"chat",stream:"stream",ui:"ui",doc:"docs",system:"sys",nav:"nav"},Za=(()=>{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 ns(){const e=new Date;return e.toLocaleTimeString("en-US",{hour12:!1})+"."+String(e.getMilliseconds()).padStart(3,"0")}function Jn(e){const t=yb[e]||"#ccc",r=`%c[${bb[e]||e}]`,i=`color: ${t}; font-weight: bold;`,s="color: #888; font-weight: normal;";return{info:(a,...u)=>{if(!Za)return;const l=ns();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=ns();console.warn(`${r} %c${l} %c${a}`,i,s,"color: inherit;",...u)},error:(a,...u)=>{const l=ns();console.error(`${r} %c${l} %c${a}`,i,s,"color: inherit;",...u)},debug:(a,...u)=>{if(!Za)return;const l=ns();console.debug(`${r} %c${l} %c${a}`,i,s,"color: #999;",...u)},timed:(a,u,...l)=>{if(!Za)return;const c=Math.round(performance.now()-u),f=ns(),h=c>2e3?"color: #e57373;":c>500?"color: #ffb74d;":"color: #81c784;";l.length>0?console.log(`${r} %c${f} %c${a} %c(${c}ms)`,i,s,"color: inherit;",h,...l):console.log(`${r} %c${f} %c${a} %c(${c}ms)`,i,s,"color: inherit;",h)},time:()=>performance.now()}}const P={api:Jn("api"),store:Jn("store"),chat:Jn("chat"),stream:Jn("stream"),ui:Jn("ui"),doc:Jn("doc"),system:Jn("system"),nav:Jn("nav")};function xb(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(Za?"%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 ul=window.location.protocol==="file:"?"http://localhost:4200/api":"/api";function _1(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 Le(e,t,n){const r=`${ul}${t}`,i=P.api.time();P.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(c){throw P.api.error(`${e} ${r} - network error`,c),c}if(!a.ok){const c=await a.text().catch(()=>"");P.api.error(`${e} ${r} - HTTP ${a.status}`,{errorText:c});let f=c;try{f=JSON.parse(c).detail||c}catch{}throw new Error(_1(a.status,f))}if(!(a.headers.get("content-type")||"").includes("application/json")){P.api.timed(`${e} ${r} -> ${a.status} (no body)`,i);return}const l=await a.json();return P.api.timed(`${e} ${r} -> ${a.status}`,i,l),l}async function Ad(){return Le("GET","/system/status")}async function _b(e,t){return Le("POST","/system/load-model",{model_name:e,ctx_size:t})}async function kb(e,t=!1){return Le("POST","/system/download-model",{model_name:e,force:t})}async function wd(){return Le("GET","/agents")}async function Sb(){return Le("GET","/sessions")}async function hc(e={}){return Le("POST","/sessions",e)}async function Jl(e,t){return Le("PUT",`/sessions/${e}`,t)}async function k1(e){return Le("DELETE",`/sessions/${e}`)}async function ds(e){return Le("GET",`/sessions/${e}/messages`)}async function Cb(e){return Le("GET",`/sessions/${e}/export?format=markdown`)}async function Nb(e,t){return Le("DELETE",`/sessions/${e}/messages/${t}`)}async function Ab(e,t){return Le("DELETE",`/sessions/${e}/messages/${t}/and-below`)}const wb=new Set(["status","step","thinking","plan","tool_start","tool_end","tool_result","tool_args","tool_confirm","agent_error","permission_request"]);function vb(e,t,n,r,i,s){let a;typeof n=="function"?a={onChunk:n,onAgentEvent:()=>{},onDone:()=>{},onError:m=>{P.stream.error("Unhandled stream error",m)}}:a=n;const u=new AbortController,l=P.stream.time();let c=0,f=0,h=0;return P.stream.info(`Starting SSE stream for session=${e}`,{messageLength:t.length}),fetch(`${ul}/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 E,T;if(P.stream.info(`SSE connection opened -> HTTP ${m.status}`),!m.ok){const x=await m.text().catch(()=>"");P.stream.error(`SSE connection failed: HTTP ${m.status}`,x),a.onError(new Error(`HTTP ${m.status}: ${x}`));return}const p=(E=m.body)==null?void 0:E.getReader();if(!p){P.stream.error("No response body reader available"),a.onError(new Error("No response body"));return}const g=new TextDecoder;let b="",v=!1;try{for(;;){const{done:x,value:D}=await p.read();if(x){P.stream.debug("SSE reader done (stream ended)");break}b+=g.decode(D,{stream:!0});const F=b.split(`
383
- `);b=F.pop()||"";for(const S of F)if(S.startsWith("data: ")){const R=S.slice(6).trim();if(!R)continue;try{const L=JSON.parse(R);L.type==="chunk"?(c++,f+=(L.content||"").length,(c<=3||c%50===0)&&P.stream.debug(`Chunk #${c} (+${(L.content||"").length} chars)`),a.onChunk(L)):L.type==="answer"?a.onChunk(L):L.type==="done"?(v=!0,P.stream.timed(`Stream complete: ${c} chunks, ${f} chars, ${h} agent events`,l),a.onDone(L)):L.type==="error"?(P.stream.error("Stream error event:",L.content),a.onError(new Error(L.content||"Unknown error"))):L.type==="agent_created"?(P.stream.info(`Agent created: ${L.agent_id}`),(T=a.onAgentCreated)==null||T.call(a,L)):wb.has(L.type)?(h++,P.stream.debug(`Agent event: ${L.type}`,L),a.onAgentEvent(L)):P.stream.warn(`Unknown SSE event type: ${L.type}`,L)}catch{P.stream.warn("Malformed SSE data, skipping",{raw:R.slice(0,100)})}}}}finally{p.releaseLock()}v||(P.stream.timed(`SSE connection closed without done event: ${c} chunks, ${h} agent events`,l),a.onDone({type:"done"}))}).catch(m=>{m.name==="AbortError"?P.stream.warn(`Stream aborted by user after ${c} chunks`):(P.stream.error("Stream fetch error",m),a.onError(m))}),u}async function Ib(e,t,n,r){return Le("POST","/chat/confirm",{session_id:e,confirm_id:t,action:n,remember:r})}async function S1(e,t){return Le("POST","/chat/confirm-tool",{session_id:e,approved:t})}async function ni(){return Le("GET","/documents")}async function C1(e){return Le("POST","/documents/upload-path",{filepath:e})}async function N1(e){const t=`${ul}/documents/upload`,n=P.api.time();P.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 P.api.error(`POST ${t} - network error`,a),a}if(!i.ok){const a=await i.text().catch(()=>"");P.api.error(`POST ${t} - HTTP ${i.status}`,{errorText:a});let u=a;try{u=JSON.parse(a).detail||a}catch{}throw new Error(_1(i.status,u))}const s=await i.json();return P.api.timed(`POST ${t} -> ${i.status}`,n,s),s}async function Lb(e){return Le("DELETE",`/documents/${e}`)}async function Db(e){return Le("GET",`/documents/${e}/status`)}async function Rb(e){return Le("POST",`/documents/${e}/cancel`)}async function Lu(e,t){return Le("POST",`/sessions/${e}/documents`,{document_id:t})}async function Ob(e,t){return Le("DELETE",`/sessions/${e}/documents/${t}`)}async function Pb(e){const t=e?`?path=${encodeURIComponent(e)}`:"";return Le("GET",`/files/browse${t}`)}async function Mb(e,t=!0){return Le("POST","/documents/index-folder",{folder_path:e,recursive:t})}async function vd(e,t=!0){return Le("POST","/files/open",{path:e,reveal:t})}async function Ch(e){const t=`${ul}/files/upload`,n=P.api.time();P.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 P.api.error(`POST ${t} - HTTP ${i.status}`,{errorText:a}),new Error(`Upload failed: ${a}`)}const s=await i.json();return P.api.timed(`POST ${t} -> ${i.status}`,n,s),s}async function Fb(e,t,n){const r=new URLSearchParams({query:e});return t&&r.set("file_types",t),r.set("max_results",String(n)),Le("GET",`/files/search?${r}`)}async function jb(e,t){const n=new URLSearchParams({path:e});return Le("GET",`/files/preview?${n}`)}async function Bb(){return Le("POST","/tunnel/start")}async function Ub(){return Le("POST","/tunnel/stop")}async function A1(){return Le("GET","/tunnel/status")}async function Hb(){return Le("GET","/mcp/status")}function mn(e){return e.replace(/-/g,"").slice(0,7)}function zb(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 w1=""+new URL("gaia-robot-NKaQnEIp.png",import.meta.url).href;function $b(e,t){e.stopPropagation(),e.preventDefault();const n=mn(t),r=`${window.location.origin}${window.location.pathname}#${n}`;navigator.clipboard.writeText(r).then(()=>{P.ui.info(`Copied session link: ${r}`)}).catch(()=>{P.ui.warn("Clipboard write failed")})}function Nh({session:e,isActive:t,isPendingDelete:n,isDeleting:r,onSelect:i,onKeyDown:s,onDelete:a,formatTime:u}){const[l,c]=k.useState(!1),f=k.useCallback(h=>{$b(h,e.id),c(!0),setTimeout(()=>c(!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:`#${mn(e.id)}`,onClick:f,title:l?"Copied!":`Copy link #${mn(e.id)}`,"aria-label":`Copy link for session ${mn(e.id)}`,children:["#",mn(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(Iu,{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(Iu,{size:13})})]})}function Yb({onNewTask:e,tunnelActive:t,tunnelLoading:n,onMobileToggle:r}){const{sessions:i,currentSessionId:s,setCurrentSession:a,removeSession:u,addSession:l,setMessages:c,theme:f,toggleTheme:h,setShowSettings:m,sidebarOpen:p,setSidebarOpen:g,setLoadingMessages:b,sidebarCollapsed:v,toggleSidebarCollapsed:E,sidebarWidth:T,setSidebarWidth:x,addPendingDelete:D,removePendingDelete:F}=xe(),[S,R]=k.useState(""),[L,V]=k.useState(null),[w,$]=k.useState(null),[X,he]=k.useState(!1),[le,de]=k.useState(null),Ae=k.useRef(null),ae=k.useRef(null),I=k.useRef(null);k.useEffect(()=>{const re=()=>{var j;v?(E(),requestAnimationFrame(()=>{var z;return(z=ae.current)==null?void 0:z.focus()})):(j=ae.current)==null||j.focus()};return window.addEventListener("gaia:focus-search",re),()=>window.removeEventListener("gaia:focus-search",re)},[v,E]);const B=S?i.filter(re=>re.title.toLowerCase().includes(S.toLowerCase())):i,y=k.useMemo(()=>{if(S)return null;const re=new Date,j=new Date(re.getFullYear(),re.getMonth(),re.getDate()).getTime(),z=j-864e5,te=j-7*864e5,ee=[{label:"Today",sessions:[]},{label:"Yesterday",sessions:[]},{label:"Previous 7 Days",sessions:[]},{label:"Older",sessions:[]}];for(const oe of B){const pe=new Date(oe.updated_at).getTime();pe>=j?ee[0].sessions.push(oe):pe>=z?ee[1].sessions.push(oe):pe>=te?ee[2].sessions.push(oe):ee[3].sessions.push(oe)}return ee.filter(oe=>oe.sessions.length>0)},[B,S]),Z=k.useCallback(async re=>{var z;if(re===s)return;const j=((z=i.find(te=>te.id===re))==null?void 0:z.title)||"?";P.nav.info(`Selecting session: "${j}" (${re})`),a(re),c([]),b(!0),window.innerWidth<=768&&g(!1);try{const te=await ds(re);if(!(xe.getState().currentSessionId===re)){P.nav.debug(`Discarding stale message load for session=${re} (user switched away)`);return}c(te.messages||[]),P.nav.info(`Loaded ${(te.messages||[]).length} message(s) for "${j}"`)}catch(te){P.nav.error(`Failed to load messages for session ${re}`,te),c([])}finally{b(!1)}},[s,i,a,c,g,b]),ce=k.useCallback(async(re,j)=>{re.stopPropagation(),re.preventDefault();const z=i.find(ee=>ee.id===j),te=(z==null?void 0:z.title)||"?";if(L===j){P.chat.info(`Deleting session: "${te}" (${j})`),V(null),$(j),D(j),k1(j).then(()=>{P.chat.info(`Session deleted from backend: "${te}"`),F(j)}).catch(oe=>{P.chat.warn(`Backend delete failed for "${te}"`,oe),F(j)}),le!=null&&le.timer&&clearTimeout(le.timer);const ee=setTimeout(()=>{de(null)},5e3);z&&de({session:z,timer:ee}),setTimeout(()=>{u(j),$(null)},250);return}P.chat.debug(`Delete pending confirmation for: "${te}" (${j})`),V(j),I.current&&clearTimeout(I.current),I.current=setTimeout(()=>V(ee=>ee===j?null:ee),3e3)},[L,i,u,le,D,F]),N=k.useCallback(()=>{if(!le)return;clearTimeout(le.timer);const{session:re}=le;P.chat.info(`Undo delete: re-creating "${re.title}"`),F(re.id),hc({title:re.title}).then(j=>{l(j),P.chat.info(`Undo delete: re-created "${j.title}" (new id=${j.id})`)}).catch(j=>{P.chat.warn(`Undo delete failed for "${re.title}"`,j)}),de(null)},[le,l,F]);k.useEffect(()=>{if(!L)return;const re=()=>V(null);return window.addEventListener("click",re,{once:!0}),()=>window.removeEventListener("click",re)},[L]);const Te=k.useCallback((re,j)=>{(re.key==="Enter"||re.key===" ")&&(re.preventDefault(),Z(j))},[Z]),Ce=k.useRef(null),ge=k.useCallback(re=>{re.preventDefault(),he(!0),P.ui.debug("Sidebar resize started");const j=re.clientX,z=T,te=oe=>{const pe=oe.clientX-j;x(z+pe)},ee=()=>{he(!1),document.removeEventListener("mousemove",te),document.removeEventListener("mouseup",ee),document.body.style.cursor="",document.body.style.userSelect="",Ce.current=null,P.ui.debug("Sidebar resize ended")};Ce.current=ee,document.body.style.cursor="col-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",te),document.addEventListener("mouseup",ee)},[T,x]);k.useEffect(()=>()=>{Ce.current&&Ce.current(),I.current&&clearTimeout(I.current)},[]);const qe=re=>{const j=new Date(re),te=new Date().getTime()-j.getTime(),ee=Math.floor(te/6e4);if(ee<1)return"now";if(ee<60)return`${ee}m`;const oe=Math.floor(ee/60);if(oe<24)return`${oe}h`;const pe=Math.floor(oe/24);return pe<7?`${pe}d`:j.toLocaleDateString(void 0,{month:"short",day:"numeric"})},nt=typeof window<"u"&&window.innerWidth<=768?void 0:{width:v?56:T,minWidth:v?56:T};return o.jsxs("aside",{ref:Ae,className:`sidebar ${p?"open":""} ${v?"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:w1,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.3"]}),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(Nd,{size:18})}),o.jsx("button",{className:"collapse-btn",onClick:E,title:v?"Expand sidebar":"Collapse sidebar","aria-label":v?"Expand sidebar":"Collapse sidebar",children:v?o.jsx(My,{size:18}):o.jsx(Py,{size:18})})]})]}),o.jsxs("div",{className:"sidebar-search",children:[o.jsx(Rr,{size:14,className:"search-icon","aria-hidden":"true"}),o.jsx("input",{ref:ae,type:"text",placeholder:"Search... (Ctrl+K)",value:S,onChange:re=>R(re.target.value),"aria-label":"Search tasks"})]}),o.jsxs("nav",{className:"session-list","aria-label":"Task sessions",children:[B.length===0&&o.jsx("div",{className:"empty-hint",children:S?"No results":"No tasks yet"}),y?y.map(re=>o.jsxs("div",{children:[o.jsx("div",{className:"session-group-label",children:re.label}),re.sessions.map(j=>o.jsx(Nh,{session:j,isActive:j.id===s,isPendingDelete:L===j.id,isDeleting:w===j.id,onSelect:Z,onKeyDown:Te,onDelete:ce,formatTime:qe},j.id))]},re.label)):B.map(re=>o.jsx(Nh,{session:re,isActive:re.id===s,isPendingDelete:L===re.id,isDeleting:w===re.id,onSelect:Z,onKeyDown:Te,onDelete:ce,formatTime:qe},re.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.3"]})]}),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(m1,{size:17})}),o.jsx("button",{className:"btn-icon",onClick:()=>m(!0),title:"Settings","aria-label":"Settings",children:o.jsx(Uy,{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($y,{size:17}):o.jsx(Oy,{size:17})})]})]}),!v&&o.jsx("div",{className:"sidebar-resize-handle",onMouseDown:ge,title:"Drag to resize sidebar","aria-hidden":"true"}),le&&o.jsxs("div",{className:"toast toast-undo",role:"status",children:["Deleted “",le.session.title,"”",o.jsx("span",{className:"toast-action",onClick:N,children:"Undo"})]})]})}function Ah(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 v1(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Vb=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Wb=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,qb={};function wh(e,t){return(qb.jsx?Wb:Vb).test(e)}const Qb=/[ \t\n\f\r]/g;function Gb(e){return typeof e=="object"?e.type==="text"?vh(e.value):!1:vh(e)}function vh(e){return e.replace(Qb,"")===""}class la{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}la.prototype.normal={};la.prototype.property={};la.prototype.space=void 0;function I1(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new la(n,r,t)}function Xs(e){return e.toLowerCase()}class Ut{constructor(t,n){this.attribute=n,this.property=t}}Ut.prototype.attribute="";Ut.prototype.booleanish=!1;Ut.prototype.boolean=!1;Ut.prototype.commaOrSpaceSeparated=!1;Ut.prototype.commaSeparated=!1;Ut.prototype.defined=!1;Ut.prototype.mustUseProperty=!1;Ut.prototype.number=!1;Ut.prototype.overloadedBoolean=!1;Ut.prototype.property="";Ut.prototype.spaceSeparated=!1;Ut.prototype.space=void 0;let Kb=0;const Ee=qr(),Je=qr(),mc=qr(),Q=qr(),je=qr(),ki=qr(),Yt=qr();function qr(){return 2**++Kb}const pc=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ee,booleanish:Je,commaOrSpaceSeparated:Yt,commaSeparated:ki,number:Q,overloadedBoolean:mc,spaceSeparated:je},Symbol.toStringTag,{value:"Module"})),Zl=Object.keys(pc);class Id extends Ut{constructor(t,n,r,i){let s=-1;if(super(t,n),Ih(this,"space",i),typeof r=="number")for(;++s<Zl.length;){const a=Zl[s];Ih(this,Zl[s],(r&pc[a])===pc[a])}}}Id.prototype.defined=!0;function Ih(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 Id(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[Xs(r)]=r,n[Xs(s.attribute)]=r}return new la(t,n,e.space)}const L1=Bi({properties:{ariaActiveDescendant:null,ariaAtomic:Je,ariaAutoComplete:null,ariaBusy:Je,ariaChecked:Je,ariaColCount:Q,ariaColIndex:Q,ariaColSpan:Q,ariaControls:je,ariaCurrent:null,ariaDescribedBy:je,ariaDetails:null,ariaDisabled:Je,ariaDropEffect:je,ariaErrorMessage:null,ariaExpanded:Je,ariaFlowTo:je,ariaGrabbed:Je,ariaHasPopup:null,ariaHidden:Je,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:je,ariaLevel:Q,ariaLive:null,ariaModal:Je,ariaMultiLine:Je,ariaMultiSelectable:Je,ariaOrientation:null,ariaOwns:je,ariaPlaceholder:null,ariaPosInSet:Q,ariaPressed:Je,ariaReadOnly:Je,ariaRelevant:null,ariaRequired:Je,ariaRoleDescription:je,ariaRowCount:Q,ariaRowIndex:Q,ariaRowSpan:Q,ariaSelected:Je,ariaSetSize:Q,ariaSort:null,ariaValueMax:Q,ariaValueMin:Q,ariaValueNow:Q,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function D1(e,t){return t in e?e[t]:t}function R1(e,t){return D1(e,t.toLowerCase())}const Xb=Bi({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ki,acceptCharset:je,accessKey:je,action:null,allow:null,allowFullScreen:Ee,allowPaymentRequest:Ee,allowUserMedia:Ee,alt:null,as:null,async:Ee,autoCapitalize:null,autoComplete:je,autoFocus:Ee,autoPlay:Ee,blocking:je,capture:null,charSet:null,checked:Ee,cite:null,className:je,cols:Q,colSpan:null,content:null,contentEditable:Je,controls:Ee,controlsList:je,coords:Q|ki,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ee,defer:Ee,dir:null,dirName:null,disabled:Ee,download:mc,draggable:Je,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ee,formTarget:null,headers:je,height:Q,hidden:mc,high:Q,href:null,hrefLang:null,htmlFor:je,httpEquiv:je,id:null,imageSizes:null,imageSrcSet:null,inert:Ee,inputMode:null,integrity:null,is:null,isMap:Ee,itemId:null,itemProp:je,itemRef:je,itemScope:Ee,itemType:je,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ee,low:Q,manifest:null,max:null,maxLength:Q,media:null,method:null,min:null,minLength:Q,multiple:Ee,muted:Ee,name:null,nonce:null,noModule:Ee,noValidate:Ee,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:Ee,optimum:Q,pattern:null,ping:je,placeholder:null,playsInline:Ee,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ee,referrerPolicy:null,rel:je,required:Ee,reversed:Ee,rows:Q,rowSpan:Q,sandbox:je,scope:null,scoped:Ee,seamless:Ee,selected:Ee,shadowRootClonable:Ee,shadowRootDelegatesFocus:Ee,shadowRootMode:null,shape:null,size:Q,sizes:null,slot:null,span:Q,spellCheck:Je,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Q,step:null,style:null,tabIndex:Q,target:null,title:null,translate:null,type:null,typeMustMatch:Ee,useMap:null,value:Je,width:Q,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:je,axis:null,background:null,bgColor:null,border:Q,borderColor:null,bottomMargin:Q,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ee,declare:Ee,event:null,face:null,frame:null,frameBorder:null,hSpace:Q,leftMargin:Q,link:null,longDesc:null,lowSrc:null,marginHeight:Q,marginWidth:Q,noResize:Ee,noHref:Ee,noShade:Ee,noWrap:Ee,object:null,profile:null,prompt:null,rev:null,rightMargin:Q,rules:null,scheme:null,scrolling:Je,standby:null,summary:null,text:null,topMargin:Q,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Q,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ee,disableRemotePlayback:Ee,prefix:null,property:null,results:Q,security:null,unselectable:null},space:"html",transform:R1}),Jb=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:Yt,accentHeight:Q,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Q,amplitude:Q,arabicForm:null,ascent:Q,attributeName:null,attributeType:null,azimuth:Q,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Q,by:null,calcMode:null,capHeight:Q,className:je,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:Q,diffuseConstant:Q,direction:null,display:null,dur:null,divisor:Q,dominantBaseline:null,download:Ee,dx:null,dy:null,edgeMode:null,editable:null,elevation:Q,enableBackground:null,end:null,event:null,exponent:Q,externalResourcesRequired:null,fill:null,fillOpacity:Q,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:Q,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Q,horizOriginX:Q,horizOriginY:Q,id:null,ideographic:Q,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Q,k:Q,k1:Q,k2:Q,k3:Q,k4:Q,kernelMatrix:Yt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Q,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:Q,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:Q,overlineThickness:Q,paintOrder:null,panose1:null,path:null,pathLength:Q,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:je,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Q,pointsAtY:Q,pointsAtZ:Q,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Yt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Yt,rev:Yt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Yt,requiredFeatures:Yt,requiredFonts:Yt,requiredFormats:Yt,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:Q,specularExponent:Q,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Q,strikethroughThickness:Q,string:null,stroke:null,strokeDashArray:Yt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Q,strokeOpacity:Q,strokeWidth:null,style:null,surfaceScale:Q,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Yt,tabIndex:Q,tableValues:null,target:null,targetX:Q,targetY:Q,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Yt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Q,underlineThickness:Q,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Q,values:null,vAlphabetic:Q,vMathematical:Q,vectorEffect:null,vHanging:Q,vIdeographic:Q,version:null,vertAdvY:Q,vertOriginX:Q,vertOriginY:Q,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Q,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:D1}),O1=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()}}),P1=Bi({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:R1}),M1=Bi({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Zb={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"},ex=/[A-Z]/g,Lh=/-[a-z]/g,tx=/^data[-\w.:]+$/i;function ll(e,t){const n=Xs(t);let r=t,i=Ut;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&tx.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(Lh,rx);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!Lh.test(s)){let a=s.replace(ex,nx);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=Id}return new i(r,t)}function nx(e){return"-"+e.toLowerCase()}function rx(e){return e.charAt(1).toUpperCase()}const oa=I1([L1,Xb,O1,P1,M1],"html"),kr=I1([L1,Jb,O1,P1,M1],"svg");function Dh(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function F1(e){return e.join(" ").trim()}var Ld={},Rh=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,ix=/\n/g,sx=/^\s*/,ax=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,ux=/^:\s*/,lx=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,ox=/^[;\s]*/,cx=/^\s+|\s+$/g,dx=`
384
- `,Oh="/",Ph="*",vr="",fx="comment",hx="declaration";function mx(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(g){var b=g.match(ix);b&&(n+=b.length);var v=g.lastIndexOf(dx);r=~v?g.length-v:r+g.length}function s(){var g={line:n,column:r};return function(b){return b.position=new a(g),c(),b}}function a(g){this.start=g,this.end={line:n,column:r},this.source=t.source}a.prototype.content=e;function u(g){var b=new Error(t.source+":"+n+":"+r+": "+g);if(b.reason=g,b.filename=t.source,b.line=n,b.column=r,b.source=e,!t.silent)throw b}function l(g){var b=g.exec(e);if(b){var v=b[0];return i(v),e=e.slice(v.length),b}}function c(){l(sx)}function f(g){var b;for(g=g||[];b=h();)b!==!1&&g.push(b);return g}function h(){var g=s();if(!(Oh!=e.charAt(0)||Ph!=e.charAt(1))){for(var b=2;vr!=e.charAt(b)&&(Ph!=e.charAt(b)||Oh!=e.charAt(b+1));)++b;if(b+=2,vr===e.charAt(b-1))return u("End of comment missing");var v=e.slice(2,b-2);return r+=2,i(v),e=e.slice(b),r+=2,g({type:fx,comment:v})}}function m(){var g=s(),b=l(ax);if(b){if(h(),!l(ux))return u("property missing ':'");var v=l(lx),E=g({type:hx,property:Mh(b[0].replace(Rh,vr)),value:v?Mh(v[0].replace(Rh,vr)):vr});return l(ox),E}}function p(){var g=[];f(g);for(var b;b=m();)b!==!1&&(g.push(b),f(g));return g}return c(),p()}function Mh(e){return e?e.replace(cx,vr):vr}var px=mx,gx=iu&&iu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ld,"__esModule",{value:!0});Ld.default=Tx;const Ex=gx(px);function Tx(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,Ex.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 ol={};Object.defineProperty(ol,"__esModule",{value:!0});ol.camelCase=void 0;var yx=/^--[a-zA-Z0-9_-]+$/,bx=/-([a-z])/g,xx=/^[^-]+$/,_x=/^-(webkit|moz|ms|o|khtml)-/,kx=/^-(ms)-/,Sx=function(e){return!e||xx.test(e)||yx.test(e)},Cx=function(e,t){return t.toUpperCase()},Fh=function(e,t){return"".concat(t,"-")},Nx=function(e,t){return t===void 0&&(t={}),Sx(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(kx,Fh):e=e.replace(_x,Fh),e.replace(bx,Cx))};ol.camelCase=Nx;var Ax=iu&&iu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},wx=Ax(Ld),vx=ol;function gc(e,t){var n={};return!e||typeof e!="string"||(0,wx.default)(e,function(r,i){r&&i&&(n[(0,vx.camelCase)(r,t)]=i)}),n}gc.default=gc;var Ix=gc;const Lx=Hu(Ix),cl=j1("end"),Dn=j1("start");function j1(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 Dx(e){const t=Dn(e),n=cl(e);if(t&&n)return{start:t,end:n}}function _s(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?jh(e.position):"start"in e||"end"in e?jh(e):"line"in e||"column"in e?Ec(e):""}function Ec(e){return Bh(e&&e.line)+":"+Bh(e&&e.column)}function jh(e){return Ec(e&&e.start)+"-"+Ec(e&&e.end)}function Bh(e){return e&&typeof e=="number"?e:1}class xt 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=_s(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}}xt.prototype.file="";xt.prototype.name="";xt.prototype.reason="";xt.prototype.message="";xt.prototype.stack="";xt.prototype.column=void 0;xt.prototype.line=void 0;xt.prototype.ancestors=void 0;xt.prototype.cause=void 0;xt.prototype.fatal=void 0;xt.prototype.place=void 0;xt.prototype.ruleId=void 0;xt.prototype.source=void 0;const Dd={}.hasOwnProperty,Rx=new Map,Ox=/[A-Z]/g,Px=new Set(["table","tbody","thead","tfoot","tr"]),Mx=new Set(["td","th"]),B1="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Fx(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=Vx(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=Yx(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"?kr:oa,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=U1(i,e,void 0);return s&&typeof s!="string"?s:i.create(e,i.Fragment,{children:s||void 0},void 0)}function U1(e,t,n){if(t.type==="element")return jx(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Bx(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Hx(e,t,n);if(t.type==="mdxjsEsm")return Ux(e,t);if(t.type==="root")return zx(e,t,n);if(t.type==="text")return $x(e,t)}function jx(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=kr,e.schema=i),e.ancestors.push(t);const s=z1(e,t.tagName,!1),a=Wx(e,t);let u=Od(e,t);return Px.has(t.tagName)&&(u=u.filter(function(l){return typeof l=="string"?!Gb(l):!0})),H1(e,a,s,t),Rd(a,u),e.ancestors.pop(),e.schema=r,e.create(t,s,a,n)}function Bx(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)}Js(e,t.position)}function Ux(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Js(e,t.position)}function Hx(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=kr,e.schema=i),e.ancestors.push(t);const s=t.name===null?e.Fragment:z1(e,t.name,!0),a=qx(e,t),u=Od(e,t);return H1(e,a,s,t),Rd(a,u),e.ancestors.pop(),e.schema=r,e.create(t,s,a,n)}function zx(e,t,n){const r={};return Rd(r,Od(e,t)),e.create(t,e.Fragment,r,n)}function $x(e,t){return t.value}function H1(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Rd(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Yx(e,t,n){return r;function r(i,s,a,u){const c=Array.isArray(a.children)?n:t;return u?c(s,a,u):c(s,a)}}function Vx(e,t){return n;function n(r,i,s,a){const u=Array.isArray(s.children),l=Dn(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 Wx(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Dd.call(t.properties,i)){const s=Qx(e,i,t.properties[i]);if(s){const[a,u]=s;e.tableCellAlignToStyle&&a==="align"&&typeof u=="string"&&Mx.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 qx(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 Js(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 Js(e,t.position);else s=r.value===null?!0:r.value;n[i]=s}return n}function Od(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:Rx;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 c=i.get(l)||0;a=l+"-"+c,i.set(l,c+1)}}const u=U1(e,s,a);u!==void 0&&n.push(u)}return n}function Qx(e,t,n){const r=ll(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?v1(n):F1(n)),r.property==="style"){let i=typeof n=="object"?n:Gx(e,String(n));return e.stylePropertyNameCase==="css"&&(i=Kx(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Zb[r.property]||r.property:r.attribute,n]}}function Gx(e,t){try{return Lx(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new xt("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=B1+"#cannot-parse-style-attribute",i}}function z1(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=wh(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=wh(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Dd.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Js(e)}function Js(e,t){const n=new xt("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=B1+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Kx(e){const t={};let n;for(n in e)Dd.call(e,n)&&(t[Xx(n)]=e[n]);return t}function Xx(e){let t=e.replace(Ox,Jx);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Jx(e){return"-"+e.toLowerCase()}const eo={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"]},Zx={};function Pd(e,t){const n=Zx,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return $1(e,r,i)}function $1(e,t,n){if(e_(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 Uh(e.children,t,n)}return Array.isArray(e)?Uh(e,t,n):""}function Uh(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=$1(e[i],t,n);return r.join("")}function e_(e){return!!(e&&typeof e=="object")}const Hh=document.createElement("i");function Md(e){const t="&"+e+";";Hh.innerHTML=t;const n=Hh.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Qt(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 tn(e,t){return e.length>0?(Qt(e,e.length,0,t),e):t}const zh={}.hasOwnProperty;function Y1(e){const t={};let n=-1;for(;++n<e.length;)t_(t,e[n]);return t}function t_(e,t){let n;for(n in t){const i=(zh.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let a;if(s)for(a in s){zh.call(i,a)||(i[a]=[]);const u=s[a];n_(i[a],Array.isArray(u)?u:u?[u]:[])}}}function n_(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Qt(e,0,0,r)}function V1(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 En(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Ct=Sr(/[A-Za-z]/),yt=Sr(/[\dA-Za-z]/),r_=Sr(/[#-'*+\--9=?A-Z^-~]/);function Du(e){return e!==null&&(e<32||e===127)}const Tc=Sr(/\d/),i_=Sr(/[\dA-Fa-f]/),s_=Sr(/[!-/:-@[-`{-~]/);function fe(e){return e!==null&&e<-2}function Pe(e){return e!==null&&(e<0||e===32)}function ke(e){return e===-2||e===-1||e===32}const dl=Sr(new RegExp("\\p{P}|\\p{S}","u")),Yr=Sr(/\s/);function Sr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Ui(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const s=e.charCodeAt(n);let a="";if(s===37&&yt(e.charCodeAt(n+1))&&yt(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 Ne(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let s=0;return a;function a(l){return ke(l)?(e.enter(n),u(l)):t(l)}function u(l){return ke(l)&&s++<i?(e.consume(l),u):(e.exit(n),t(l))}}const a_={tokenize:u_};function u_(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"),Ne(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 fe(u)?(e.consume(u),e.exit("chunkText"),s):(e.consume(u),a)}}const l_={tokenize:o_},$h={tokenize:c_};function o_(e){const t=this,n=[];let r=0,i,s,a;return u;function u(x){if(r<n.length){const D=n[r];return t.containerState=D[1],e.attempt(D[0].continuation,l,c)(x)}return c(x)}function l(x){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&T();const D=t.events.length;let F=D,S;for(;F--;)if(t.events[F][0]==="exit"&&t.events[F][1].type==="chunkFlow"){S=t.events[F][1].end;break}E(r);let R=D;for(;R<t.events.length;)t.events[R][1].end={...S},R++;return Qt(t.events,F+1,0,t.events.slice(D)),t.events.length=R,c(x)}return u(x)}function c(x){if(r===n.length){if(!i)return m(x);if(i.currentConstruct&&i.currentConstruct.concrete)return g(x);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check($h,f,h)(x)}function f(x){return i&&T(),E(r),m(x)}function h(x){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,g(x)}function m(x){return t.containerState={},e.attempt($h,p,g)(x)}function p(x){return r++,n.push([t.currentConstruct,t.containerState]),m(x)}function g(x){if(x===null){i&&T(),E(0),e.consume(x);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:s}),b(x)}function b(x){if(x===null){v(e.exit("chunkFlow"),!0),E(0),e.consume(x);return}return fe(x)?(e.consume(x),v(e.exit("chunkFlow")),r=0,t.interrupt=void 0,u):(e.consume(x),b)}function v(x,D){const F=t.sliceStream(x);if(D&&F.push(null),x.previous=s,s&&(s.next=x),s=x,i.defineSkip(x.start),i.write(F),t.parser.lazy[x.start.line]){let S=i.events.length;for(;S--;)if(i.events[S][1].start.offset<a&&(!i.events[S][1].end||i.events[S][1].end.offset>a))return;const R=t.events.length;let L=R,V,w;for(;L--;)if(t.events[L][0]==="exit"&&t.events[L][1].type==="chunkFlow"){if(V){w=t.events[L][1].end;break}V=!0}for(E(r),S=R;S<t.events.length;)t.events[S][1].end={...w},S++;Qt(t.events,L+1,0,t.events.slice(R)),t.events.length=S}}function E(x){let D=n.length;for(;D-- >x;){const F=n[D];t.containerState=F[1],F[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 c_(e,t,n){return Ne(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ri(e){if(e===null||Pe(e)||Yr(e))return 1;if(dl(e))return 2}function fl(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 yc={name:"attention",resolveAll:d_,tokenize:f_};function d_(e,t){let n=-1,r,i,s,a,u,l,c,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};Yh(h,-l),Yh(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},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=tn(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=tn(c,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",s,t]]),c=tn(c,fl(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=tn(c,[["exit",s,t],["enter",u,t],["exit",u,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(f=2,c=tn(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):f=0,Qt(e,r-1,n-r+3,c),n=r+c.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function f_(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Ri(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 c=e.exit("attentionSequence"),f=Ri(l),h=!f||f===2&&i||n.includes(l),m=!i||i===2&&f||n.includes(r);return c._open=!!(s===42?h:h&&(i||!m)),c._close=!!(s===42?m:m&&(f||!h)),t(l)}}function Yh(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const h_={name:"autolink",tokenize:m_};function m_(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 Ct(p)?(e.consume(p),a):p===64?n(p):c(p)}function a(p){return p===43||p===45||p===46||yt(p)?(r=1,u(p)):c(p)}function u(p){return p===58?(e.consume(p),r=0,l):(p===43||p===45||p===46||yt(p))&&r++<32?(e.consume(p),u):(r=0,c(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||Du(p)?n(p):(e.consume(p),l)}function c(p){return p===64?(e.consume(p),f):r_(p)?(e.consume(p),c):n(p)}function f(p){return yt(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||yt(p))&&r++<63){const g=p===45?m:h;return e.consume(p),g}return n(p)}}const ca={partial:!0,tokenize:p_};function p_(e,t,n){return r;function r(s){return ke(s)?Ne(e,i,"linePrefix")(s):i(s)}function i(s){return s===null||fe(s)?t(s):n(s)}}const W1={continuation:{tokenize:E_},exit:T_,name:"blockQuote",tokenize:g_};function g_(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 ke(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function E_(e,t,n){const r=this;return i;function i(a){return ke(a)?Ne(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):s(a)}function s(a){return e.attempt(W1,t,n)(a)}}function T_(e){e.exit("blockQuote")}const q1={name:"characterEscape",tokenize:y_};function y_(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 s_(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const Q1={name:"characterReference",tokenize:b_};function b_(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"),c):(e.enter("characterReferenceValue"),s=31,a=yt,f(h))}function c(h){return h===88||h===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(h),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,a=i_,f):(e.enter("characterReferenceValue"),s=7,a=Tc,f(h))}function f(h){if(h===59&&i){const m=e.exit("characterReferenceValue");return a===yt&&!Md(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 Vh={partial:!0,tokenize:__},Wh={concrete:!0,name:"codeFenced",tokenize:x_};function x_(e,t,n){const r=this,i={partial:!0,tokenize:F};let s=0,a=0,u;return l;function l(S){return c(S)}function c(S){const R=r.events[r.events.length-1];return s=R&&R[1].type==="linePrefix"?R[2].sliceSerialize(R[1],!0).length:0,u=S,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(S)}function f(S){return S===u?(a++,e.consume(S),f):a<3?n(S):(e.exit("codeFencedFenceSequence"),ke(S)?Ne(e,h,"whitespace")(S):h(S))}function h(S){return S===null||fe(S)?(e.exit("codeFencedFence"),r.interrupt?t(S):e.check(Vh,b,D)(S)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),m(S))}function m(S){return S===null||fe(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),h(S)):ke(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ne(e,p,"whitespace")(S)):S===96&&S===u?n(S):(e.consume(S),m)}function p(S){return S===null||fe(S)?h(S):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(S))}function g(S){return S===null||fe(S)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),h(S)):S===96&&S===u?n(S):(e.consume(S),g)}function b(S){return e.attempt(i,D,v)(S)}function v(S){return e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),E}function E(S){return s>0&&ke(S)?Ne(e,T,"linePrefix",s+1)(S):T(S)}function T(S){return S===null||fe(S)?e.check(Vh,b,D)(S):(e.enter("codeFlowValue"),x(S))}function x(S){return S===null||fe(S)?(e.exit("codeFlowValue"),T(S)):(e.consume(S),x)}function D(S){return e.exit("codeFenced"),t(S)}function F(S,R,L){let V=0;return w;function w(de){return S.enter("lineEnding"),S.consume(de),S.exit("lineEnding"),$}function $(de){return S.enter("codeFencedFence"),ke(de)?Ne(S,X,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(de):X(de)}function X(de){return de===u?(S.enter("codeFencedFenceSequence"),he(de)):L(de)}function he(de){return de===u?(V++,S.consume(de),he):V>=a?(S.exit("codeFencedFenceSequence"),ke(de)?Ne(S,le,"whitespace")(de):le(de)):L(de)}function le(de){return de===null||fe(de)?(S.exit("codeFencedFence"),R(de)):L(de)}}}function __(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 to={name:"codeIndented",tokenize:S_},k_={partial:!0,tokenize:C_};function S_(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),Ne(e,s,"linePrefix",5)(c)}function s(c){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?a(c):n(c)}function a(c){return c===null?l(c):fe(c)?e.attempt(k_,a,l)(c):(e.enter("codeFlowValue"),u(c))}function u(c){return c===null||fe(c)?(e.exit("codeFlowValue"),a(c)):(e.consume(c),u)}function l(c){return e.exit("codeIndented"),t(c)}}function C_(e,t,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):fe(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):Ne(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):fe(a)?i(a):n(a)}}const N_={name:"codeText",previous:w_,resolve:A_,tokenize:v_};function A_(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 w_(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function v_(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)):fe(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),l):(e.enter("codeTextData"),c(h))}function c(h){return h===null||h===32||h===96||fe(h)?(e.exit("codeTextData"),l(h)):(e.consume(h),c)}function f(h){return h===96?(e.consume(h),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(h)):(s.type="codeTextData",c(h))}}class I_{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&&rs(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),rs(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),rs(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);rs(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);rs(this.left,n.reverse())}}}function rs(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 G1(e){const t={};let n=-1,r,i,s,a,u,l,c;const f=new I_(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,L_(f,n)),n=t[n],c=!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 Qt(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!c}function L_(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=[],c={};let f,h,m=-1,p=n,g=0,b=0;const v=[b];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&&(b=m+1,v.push(b),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(a.events=[],p?(p._tokenizer=void 0,p.previous=void 0):v.pop(),m=v.length;m--;){const E=u.slice(v[m],v[m+1]),T=s.pop();l.push([T,T+E.length-1]),e.splice(T,2,E)}for(l.reverse(),m=-1;++m<l.length;)c[g+l[m][0]]=g+l[m][1],g+=l[m][1]-l[m][0]-1;return c}const D_={resolve:O_,tokenize:P_},R_={partial:!0,tokenize:M_};function O_(e){return G1(e),e}function P_(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):fe(u)?e.check(R_,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 M_(e,t,n){const r=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Ne(e,s,"linePrefix")}function s(a){if(a===null||fe(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 K1(e,t,n,r,i,s,a,u,l){const c=l||Number.POSITIVE_INFINITY;let f=0;return h;function h(E){return E===60?(e.enter(r),e.enter(i),e.enter(s),e.consume(E),e.exit(s),m):E===null||E===32||E===41||Du(E)?n(E):(e.enter(r),e.enter(a),e.enter(u),e.enter("chunkString",{contentType:"string"}),b(E))}function m(E){return E===62?(e.enter(s),e.consume(E),e.exit(s),e.exit(i),e.exit(r),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),p(E))}function p(E){return E===62?(e.exit("chunkString"),e.exit(u),m(E)):E===null||E===60||fe(E)?n(E):(e.consume(E),E===92?g:p)}function g(E){return E===60||E===62||E===92?(e.consume(E),p):p(E)}function b(E){return!f&&(E===null||E===41||Pe(E))?(e.exit("chunkString"),e.exit(u),e.exit(a),e.exit(r),t(E)):f<c&&E===40?(e.consume(E),f++,b):E===41?(e.consume(E),f--,b):E===null||E===32||E===40||Du(E)?n(E):(e.consume(E),E===92?v:b)}function v(E){return E===40||E===41||E===92?(e.consume(E),b):b(E)}}function X1(e,t,n,r,i,s){const a=this;let u=0,l;return c;function c(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):fe(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||fe(p)||u++>999?(e.exit("chunkString"),f(p)):(e.consume(p),l||(l=!ke(p)),p===92?m:h)}function m(p){return p===91||p===92||p===93?(e.consume(p),u++,h):h(p)}}function J1(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),c(m))}function c(m){return m===a?(e.exit(s),l(a)):m===null?n(m):fe(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),Ne(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(m))}function f(m){return m===a||m===null||fe(m)?(e.exit("chunkString"),c(m)):(e.consume(m),m===92?h:f)}function h(m){return m===a||m===92?(e.consume(m),f):f(m)}}function ks(e,t){let n;return r;function r(i){return fe(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):ke(i)?Ne(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const F_={name:"definition",tokenize:B_},j_={partial:!0,tokenize:U_};function B_(e,t,n){const r=this;let i;return s;function s(p){return e.enter("definition"),a(p)}function a(p){return X1.call(r,e,u,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function u(p){return i=En(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 Pe(p)?ks(e,c)(p):c(p)}function c(p){return K1(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function f(p){return e.attempt(j_,h,h)(p)}function h(p){return ke(p)?Ne(e,m,"whitespace")(p):m(p)}function m(p){return p===null||fe(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function U_(e,t,n){return r;function r(u){return Pe(u)?ks(e,i)(u):n(u)}function i(u){return J1(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function s(u){return ke(u)?Ne(e,a,"whitespace")(u):a(u)}function a(u){return u===null||fe(u)?t(u):n(u)}}const H_={name:"hardBreakEscape",tokenize:z_};function z_(e,t,n){return r;function r(s){return e.enter("hardBreakEscape"),e.consume(s),i}function i(s){return fe(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const $_={name:"headingAtx",resolve:Y_,tokenize:V_};function Y_(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"},Qt(e,r,n-r+1,[["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t]])),e}function V_(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||Pe(f)?(e.exit("atxHeadingSequence"),u(f)):n(f)}function u(f){return f===35?(e.enter("atxHeadingSequence"),l(f)):f===null||fe(f)?(e.exit("atxHeading"),t(f)):ke(f)?Ne(e,u,"whitespace")(f):(e.enter("atxHeadingText"),c(f))}function l(f){return f===35?(e.consume(f),l):(e.exit("atxHeadingSequence"),u(f))}function c(f){return f===null||f===35||Pe(f)?(e.exit("atxHeadingText"),u(f)):(e.consume(f),c)}}const W_=["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"],qh=["pre","script","style","textarea"],q_={concrete:!0,name:"htmlFlow",resolveTo:K_,tokenize:X_},Q_={partial:!0,tokenize:Z_},G_={partial:!0,tokenize:J_};function K_(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 X_(e,t,n){const r=this;let i,s,a,u,l;return c;function c(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,b):N===63?(e.consume(N),i=3,r.interrupt?t:y):Ct(N)?(e.consume(N),a=String.fromCharCode(N),v):n(N)}function m(N){return N===45?(e.consume(N),i=2,p):N===91?(e.consume(N),i=5,u=0,g):Ct(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 g(N){const Te="CDATA[";return N===Te.charCodeAt(u++)?(e.consume(N),u===Te.length?r.interrupt?t:X:g):n(N)}function b(N){return Ct(N)?(e.consume(N),a=String.fromCharCode(N),v):n(N)}function v(N){if(N===null||N===47||N===62||Pe(N)){const Te=N===47,Ce=a.toLowerCase();return!Te&&!s&&qh.includes(Ce)?(i=1,r.interrupt?t(N):X(N)):W_.includes(a.toLowerCase())?(i=6,Te?(e.consume(N),E):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||yt(N)?(e.consume(N),a+=String.fromCharCode(N),v):n(N)}function E(N){return N===62?(e.consume(N),r.interrupt?t:X):n(N)}function T(N){return ke(N)?(e.consume(N),T):w(N)}function x(N){return N===47?(e.consume(N),w):N===58||N===95||Ct(N)?(e.consume(N),D):ke(N)?(e.consume(N),x):w(N)}function D(N){return N===45||N===46||N===58||N===95||yt(N)?(e.consume(N),D):F(N)}function F(N){return N===61?(e.consume(N),S):ke(N)?(e.consume(N),F):x(N)}function S(N){return N===null||N===60||N===61||N===62||N===96?n(N):N===34||N===39?(e.consume(N),l=N,R):ke(N)?(e.consume(N),S):L(N)}function R(N){return N===l?(e.consume(N),l=null,V):N===null||fe(N)?n(N):(e.consume(N),R)}function L(N){return N===null||N===34||N===39||N===47||N===60||N===61||N===62||N===96||Pe(N)?F(N):(e.consume(N),L)}function V(N){return N===47||N===62||ke(N)?x(N):n(N)}function w(N){return N===62?(e.consume(N),$):n(N)}function $(N){return N===null||fe(N)?X(N):ke(N)?(e.consume(N),$):n(N)}function X(N){return N===45&&i===2?(e.consume(N),Ae):N===60&&i===1?(e.consume(N),ae):N===62&&i===4?(e.consume(N),Z):N===63&&i===3?(e.consume(N),y):N===93&&i===5?(e.consume(N),B):fe(N)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Q_,ce,he)(N)):N===null||fe(N)?(e.exit("htmlFlowData"),he(N)):(e.consume(N),X)}function he(N){return e.check(G_,le,ce)(N)}function le(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),de}function de(N){return N===null||fe(N)?he(N):(e.enter("htmlFlowData"),X(N))}function Ae(N){return N===45?(e.consume(N),y):X(N)}function ae(N){return N===47?(e.consume(N),a="",I):X(N)}function I(N){if(N===62){const Te=a.toLowerCase();return qh.includes(Te)?(e.consume(N),Z):X(N)}return Ct(N)&&a.length<8?(e.consume(N),a+=String.fromCharCode(N),I):X(N)}function B(N){return N===93?(e.consume(N),y):X(N)}function y(N){return N===62?(e.consume(N),Z):N===45&&i===2?(e.consume(N),y):X(N)}function Z(N){return N===null||fe(N)?(e.exit("htmlFlowData"),ce(N)):(e.consume(N),Z)}function ce(N){return e.exit("htmlFlow"),t(N)}}function J_(e,t,n){const r=this;return i;function i(a){return fe(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 Z_(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(ca,t,n)}}const ek={name:"htmlText",tokenize:tk};function tk(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),c):y===47?(e.consume(y),F):y===63?(e.consume(y),x):Ct(y)?(e.consume(y),L):n(y)}function c(y){return y===45?(e.consume(y),f):y===91?(e.consume(y),s=0,g):Ct(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):fe(y)?(a=h,ae(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 g(y){const Z="CDATA[";return y===Z.charCodeAt(s++)?(e.consume(y),s===Z.length?b:g):n(y)}function b(y){return y===null?n(y):y===93?(e.consume(y),v):fe(y)?(a=b,ae(y)):(e.consume(y),b)}function v(y){return y===93?(e.consume(y),E):b(y)}function E(y){return y===62?Ae(y):y===93?(e.consume(y),E):b(y)}function T(y){return y===null||y===62?Ae(y):fe(y)?(a=T,ae(y)):(e.consume(y),T)}function x(y){return y===null?n(y):y===63?(e.consume(y),D):fe(y)?(a=x,ae(y)):(e.consume(y),x)}function D(y){return y===62?Ae(y):x(y)}function F(y){return Ct(y)?(e.consume(y),S):n(y)}function S(y){return y===45||yt(y)?(e.consume(y),S):R(y)}function R(y){return fe(y)?(a=R,ae(y)):ke(y)?(e.consume(y),R):Ae(y)}function L(y){return y===45||yt(y)?(e.consume(y),L):y===47||y===62||Pe(y)?V(y):n(y)}function V(y){return y===47?(e.consume(y),Ae):y===58||y===95||Ct(y)?(e.consume(y),w):fe(y)?(a=V,ae(y)):ke(y)?(e.consume(y),V):Ae(y)}function w(y){return y===45||y===46||y===58||y===95||yt(y)?(e.consume(y),w):$(y)}function $(y){return y===61?(e.consume(y),X):fe(y)?(a=$,ae(y)):ke(y)?(e.consume(y),$):V(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,he):fe(y)?(a=X,ae(y)):ke(y)?(e.consume(y),X):(e.consume(y),le)}function he(y){return y===i?(e.consume(y),i=void 0,de):y===null?n(y):fe(y)?(a=he,ae(y)):(e.consume(y),he)}function le(y){return y===null||y===34||y===39||y===60||y===61||y===96?n(y):y===47||y===62||Pe(y)?V(y):(e.consume(y),le)}function de(y){return y===47||y===62||Pe(y)?V(y):n(y)}function Ae(y){return y===62?(e.consume(y),e.exit("htmlTextData"),e.exit("htmlText"),t):n(y)}function ae(y){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),I}function I(y){return ke(y)?Ne(e,B,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(y):B(y)}function B(y){return e.enter("htmlTextData"),a(y)}}const Fd={name:"labelEnd",resolveAll:sk,resolveTo:ak,tokenize:uk},nk={tokenize:lk},rk={tokenize:ok},ik={tokenize:ck};function sk(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&&Qt(e,0,e.length,n),e}function ak(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}},c={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",c,t]],u=tn(u,e.slice(s+1,s+r+3)),u=tn(u,[["enter",f,t]]),u=tn(u,fl(t.parser.constructs.insideSpan.null,e.slice(s+r+4,a-3),t)),u=tn(u,[["exit",f,t],e[a-2],e[a-1],["exit",c,t]]),u=tn(u,e.slice(a+1)),u=tn(u,[["exit",l,t]]),Qt(e,s,e.length,u),e}function uk(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(En(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(nk,f,a?f:h)(m):m===91?e.attempt(rk,f,a?c:h)(m):a?f(m):h(m)}function c(m){return e.attempt(ik,f,h)(m)}function f(m){return t(m)}function h(m){return s._balanced=!0,n(m)}}function lk(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 Pe(h)?ks(e,s)(h):s(h)}function s(h){return h===41?f(h):K1(e,a,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function a(h){return Pe(h)?ks(e,l)(h):f(h)}function u(h){return n(h)}function l(h){return h===34||h===39||h===40?J1(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):f(h)}function c(h){return Pe(h)?ks(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 ok(e,t,n){const r=this;return i;function i(u){return X1.call(r,e,s,a,"reference","referenceMarker","referenceString")(u)}function s(u){return r.parser.defined.includes(En(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(u):n(u)}function a(u){return n(u)}}function ck(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 dk={name:"labelStartImage",resolveAll:Fd.resolveAll,tokenize:fk};function fk(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 hk={name:"labelStartLink",resolveAll:Fd.resolveAll,tokenize:mk};function mk(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 no={name:"lineEnding",tokenize:pk};function pk(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Ne(e,t,"linePrefix")}}const eu={name:"thematicBreak",tokenize:gk};function gk(e,t,n){let r=0,i;return s;function s(c){return e.enter("thematicBreak"),a(c)}function a(c){return i=c,u(c)}function u(c){return c===i?(e.enter("thematicBreakSequence"),l(c)):r>=3&&(c===null||fe(c))?(e.exit("thematicBreak"),t(c)):n(c)}function l(c){return c===i?(e.consume(c),r++,l):(e.exit("thematicBreakSequence"),ke(c)?Ne(e,u,"whitespace")(c):u(c))}}const Ot={continuation:{tokenize:bk},exit:_k,name:"list",tokenize:yk},Ek={partial:!0,tokenize:kk},Tk={partial:!0,tokenize:xk};function yk(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 g=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:Tc(p)){if(r.containerState.type||(r.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(eu,n,c)(p):c(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(p)}return n(p)}function l(p){return Tc(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"),c(p)):n(p)}function c(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(ca,r.interrupt?n:f,e.attempt(Ek,m,h))}function f(p){return r.containerState.initialBlankLine=!0,s++,m(p)}function h(p){return ke(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 bk(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(ca,i,s);function i(u){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ne(e,t,"listItemIndent",r.containerState.size+1)(u)}function s(u){return r.containerState.furtherBlankLines||!ke(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(Tk,t,a)(u))}function a(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ne(e,e.attempt(Ot,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function xk(e,t,n){const r=this;return Ne(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 _k(e){e.exit(this.containerState.type)}function kk(e,t,n){const r=this;return Ne(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!ke(s)&&a&&a[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const Qh={name:"setextUnderline",resolveTo:Sk,tokenize:Ck};function Sk(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 Ck(e,t,n){const r=this;let i;return s;function s(c){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=c,a(c)):n(c)}function a(c){return e.enter("setextHeadingLineSequence"),u(c)}function u(c){return c===i?(e.consume(c),u):(e.exit("setextHeadingLineSequence"),ke(c)?Ne(e,l,"lineSuffix")(c):l(c))}function l(c){return c===null||fe(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const Nk={tokenize:Ak};function Ak(e){const t=this,n=e.attempt(ca,r,e.attempt(this.parser.constructs.flowInitial,i,Ne(e,e.attempt(this.parser.constructs.flow,i,e.attempt(D_,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 wk={resolveAll:eg()},vk=Z1("string"),Ik=Z1("text");function Z1(e){return{resolveAll:eg(e==="text"?Lk: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 c(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 c(f)?(n.exit("data"),s(f)):(n.consume(f),l)}function c(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 eg(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 Lk(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 c=i[s];if(typeof c=="string"){for(a=c.length;c.charCodeAt(a-1)===32;)u++,a--;if(a)break;a=-1}else if(c===-2)l=!0,u++;else if(c!==-1){s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(u=0),u){const c={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={...c.start},r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}const Dk={42:Ot,43:Ot,45:Ot,48:Ot,49:Ot,50:Ot,51:Ot,52:Ot,53:Ot,54:Ot,55:Ot,56:Ot,57:Ot,62:W1},Rk={91:F_},Ok={[-2]:to,[-1]:to,32:to},Pk={35:$_,42:eu,45:[Qh,eu],60:q_,61:Qh,95:eu,96:Wh,126:Wh},Mk={38:Q1,92:q1},Fk={[-5]:no,[-4]:no,[-3]:no,33:dk,38:Q1,42:yc,60:[h_,ek],91:hk,92:[H_,q1],93:Fd,95:yc,96:N_},jk={null:[yc,wk]},Bk={null:[42,95]},Uk={null:[]},Hk=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Bk,contentInitial:Rk,disable:Uk,document:Dk,flow:Pk,flowInitial:Ok,insideSpan:jk,string:Mk,text:Fk},Symbol.toStringTag,{value:"Module"}));function zk(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:R(F),check:R(S),consume:T,enter:x,exit:D,interrupt:R(S,{interrupt:!0})},c={code:null,containerState:{},defineSkip:b,events:[],now:g,parser:e,previous:null,sliceSerialize:m,sliceStream:p,write:h};let f=t.tokenize.call(c,l);return t.resolveAll&&s.push(t),c;function h($){return a=tn(a,$),v(),a[a.length-1]!==null?[]:(L(t,0),c.events=fl(s,c.events,c),c.events)}function m($,X){return Yk(p($),X)}function p($){return $k(a,$)}function g(){const{_bufferIndex:$,_index:X,line:he,column:le,offset:de}=r;return{_bufferIndex:$,_index:X,line:he,column:le,offset:de}}function b($){i[$.line]=$.column,w()}function v(){let $;for(;r._index<a.length;){const X=a[r._index];if(typeof X=="string")for($=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===$&&r._bufferIndex<X.length;)E(X.charCodeAt(r._bufferIndex));else E(X)}}function E($){f=f($)}function T($){fe($)?(r.line++,r.column=1,r.offset+=$===-3?2:1,w()):$!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=$}function x($,X){const he=X||{};return he.type=$,he.start=g(),c.events.push(["enter",he,c]),u.push(he),he}function D($){const X=u.pop();return X.end=g(),c.events.push(["exit",X,c]),X}function F($,X){L($,X.from)}function S($,X){X.restore()}function R($,X){return he;function he(le,de,Ae){let ae,I,B,y;return Array.isArray(le)?ce(le):"tokenize"in le?ce([le]):Z(le);function Z(ge){return qe;function qe(lt){const nt=lt!==null&&ge[lt],re=lt!==null&&ge.null,j=[...Array.isArray(nt)?nt:nt?[nt]:[],...Array.isArray(re)?re:re?[re]:[]];return ce(j)(lt)}}function ce(ge){return ae=ge,I=0,ge.length===0?Ae:N(ge[I])}function N(ge){return qe;function qe(lt){return y=V(),B=ge,ge.partial||(c.currentConstruct=ge),ge.name&&c.parser.constructs.disable.null.includes(ge.name)?Ce():ge.tokenize.call(X?Object.assign(Object.create(c),X):c,l,Te,Ce)(lt)}}function Te(ge){return $(B,y),de}function Ce(ge){return y.restore(),++I<ae.length?N(ae[I]):Ae}}}function L($,X){$.resolveAll&&!s.includes($)&&s.push($),$.resolve&&Qt(c.events,X,c.events.length-X,$.resolve(c.events.slice(X),c)),$.resolveTo&&(c.events=$.resolveTo(c.events,c))}function V(){const $=g(),X=c.previous,he=c.currentConstruct,le=c.events.length,de=Array.from(u);return{from:le,restore:Ae};function Ae(){r=$,c.previous=X,c.currentConstruct=he,c.events.length=le,u=de,w()}}function w(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function $k(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 Yk(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 Vk(e){const r={constructs:Y1([Hk,...(e||{}).extensions||[]]),content:i(a_),defined:[],document:i(l_),flow:i(Nk),lazy:{},string:i(vk),text:i(Ik)};return r;function i(s){return a;function a(u){return zk(r,s,u)}}}function Wk(e){for(;!G1(e););return e}const Gh=/[\0\t\n\r]/g;function qk(){let e=1,t="",n=!0,r;return i;function i(s,a,u){const l=[];let c,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(Gh.lastIndex=h,c=Gh.exec(s),m=c&&c.index!==void 0?c.index:s.length,p=s.charCodeAt(m),!c){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 Qk=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Gk(e){return e.replace(Qk,Kk)}function Kk(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),s=i===120||i===88;return V1(n.slice(s?2:1),s?16:10)}return Md(n)||e}const tg={}.hasOwnProperty;function Xk(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),Jk(n)(Wk(Vk(n).document().write(qk()(e,t,!0))))}function Jk(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(xn),autolinkProtocol:V,autolinkEmail:V,atxHeading:s(oe),blockQuote:s(re),characterEscape:V,characterReference:V,codeFenced:s(j),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:s(j,a),codeText:s(z,a),codeTextData:V,data:V,codeFlowValue:V,definition:s(te),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:s(ee),hardBreakEscape:s(pe),hardBreakTrailing:s(pe),htmlFlow:s(Me,a),htmlFlowData:V,htmlText:s(Me,a),htmlTextData:V,image:s(bn),label:a,link:s(xn),listItem:s(Yi),listItemValue:m,listOrdered:s(Gr,h),listUnordered:s(Gr),paragraph:s(Vi),reference:N,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:s(oe),strong:s(Cr),thematicBreak:s(_l)},exit:{atxHeading:l(),atxHeadingSequence:F,autolink:l(),autolinkEmail:nt,autolinkProtocol:lt,blockQuote:l(),characterEscapeValue:w,characterReferenceMarkerHexadecimal:Ce,characterReferenceMarkerNumeric:Ce,characterReferenceValue:ge,characterReference:qe,codeFenced:l(v),codeFencedFence:b,codeFencedFenceInfo:p,codeFencedFenceMeta:g,codeFlowValue:w,codeIndented:l(E),codeText:l(de),codeTextData:w,data:w,definition:l(),definitionDestinationString:D,definitionLabelString:T,definitionTitleString:x,emphasis:l(),hardBreakEscape:l(X),hardBreakTrailing:l(X),htmlFlow:l(he),htmlFlowData:w,htmlText:l(le),htmlTextData:w,image:l(ae),label:B,labelText:I,lineEnding:$,link:l(Ae),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:Te,resourceDestinationString:y,resourceTitleString:Z,resource:ce,setextHeading:l(L),setextHeadingLineSequence:R,setextHeadingText:S,strong:l(),thematicBreak:l()}};ng(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(H){let G={type:"root",children:[]};const me={stack:[G],tokenStack:[],config:t,enter:u,exit:c,buffer:a,resume:f,data:n},ye=[];let ve=-1;for(;++ve<H.length;)if(H[ve][1].type==="listOrdered"||H[ve][1].type==="listUnordered")if(H[ve][0]==="enter")ye.push(ve);else{const vt=ye.pop();ve=i(H,vt,ve)}for(ve=-1;++ve<H.length;){const vt=t[H[ve][0]];tg.call(vt,H[ve][1].type)&&vt[H[ve][1].type].call(Object.assign({sliceSerialize:H[ve][2].sliceSerialize},me),H[ve][1])}if(me.tokenStack.length>0){const vt=me.tokenStack[me.tokenStack.length-1];(vt[1]||Kh).call(me,void 0,vt[0])}for(G.position={start:Zn(H.length>0?H[0][1].start:{line:1,column:1,offset:0}),end:Zn(H.length>0?H[H.length-2][1].end:{line:1,column:1,offset:0})},ve=-1;++ve<t.transforms.length;)G=t.transforms[ve](G)||G;return G}function i(H,G,me){let ye=G-1,ve=-1,vt=!1,ln,Jt,ot,On;for(;++ye<=me;){const ct=H[ye];switch(ct[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ct[0]==="enter"?ve++:ve--,On=void 0;break}case"lineEndingBlank":{ct[0]==="enter"&&(ln&&!On&&!ve&&!ot&&(ot=ye),On=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:On=void 0}if(!ve&&ct[0]==="enter"&&ct[1].type==="listItemPrefix"||ve===-1&&ct[0]==="exit"&&(ct[1].type==="listUnordered"||ct[1].type==="listOrdered")){if(ln){let It=ye;for(Jt=void 0;It--;){const Lt=H[It];if(Lt[1].type==="lineEnding"||Lt[1].type==="lineEndingBlank"){if(Lt[0]==="exit")continue;Jt&&(H[Jt][1].type="lineEndingBlank",vt=!0),Lt[1].type="lineEnding",Jt=It}else if(!(Lt[1].type==="linePrefix"||Lt[1].type==="blockQuotePrefix"||Lt[1].type==="blockQuotePrefixWhitespace"||Lt[1].type==="blockQuoteMarker"||Lt[1].type==="listItemIndent"))break}ot&&(!Jt||ot<Jt)&&(ln._spread=!0),ln.end=Object.assign({},Jt?H[Jt][1].start:ct[1].end),H.splice(Jt||ye,0,["exit",ln,ct[2]]),ye++,me++}if(ct[1].type==="listItemPrefix"){const It={type:"listItem",_spread:!1,start:Object.assign({},ct[1].start),end:void 0};ln=It,H.splice(ye,0,["enter",It,ct[2]]),ye++,me++,ot=void 0,On=!0}}}return H[G][1]._spread=vt,me}function s(H,G){return me;function me(ye){u.call(this,H(ye),ye),G&&G.call(this,ye)}}function a(){this.stack.push({type:"fragment",children:[]})}function u(H,G,me){this.stack[this.stack.length-1].children.push(H),this.stack.push(H),this.tokenStack.push([G,me||void 0]),H.position={start:Zn(G.start),end:void 0}}function l(H){return G;function G(me){H&&H.call(this,me),c.call(this,me)}}function c(H,G){const me=this.stack.pop(),ye=this.tokenStack.pop();if(ye)ye[0].type!==H.type&&(G?G.call(this,H,ye[0]):(ye[1]||Kh).call(this,H,ye[0]));else throw new Error("Cannot close `"+H.type+"` ("+_s({start:H.start,end:H.end})+"): it’s not open");me.position.end=Zn(H.end)}function f(){return Pd(this.stack.pop())}function h(){this.data.expectingFirstListItemValue=!0}function m(H){if(this.data.expectingFirstListItemValue){const G=this.stack[this.stack.length-2];G.start=Number.parseInt(this.sliceSerialize(H),10),this.data.expectingFirstListItemValue=void 0}}function p(){const H=this.resume(),G=this.stack[this.stack.length-1];G.lang=H}function g(){const H=this.resume(),G=this.stack[this.stack.length-1];G.meta=H}function b(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function v(){const H=this.resume(),G=this.stack[this.stack.length-1];G.value=H.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function E(){const H=this.resume(),G=this.stack[this.stack.length-1];G.value=H.replace(/(\r?\n|\r)$/g,"")}function T(H){const G=this.resume(),me=this.stack[this.stack.length-1];me.label=G,me.identifier=En(this.sliceSerialize(H)).toLowerCase()}function x(){const H=this.resume(),G=this.stack[this.stack.length-1];G.title=H}function D(){const H=this.resume(),G=this.stack[this.stack.length-1];G.url=H}function F(H){const G=this.stack[this.stack.length-1];if(!G.depth){const me=this.sliceSerialize(H).length;G.depth=me}}function S(){this.data.setextHeadingSlurpLineEnding=!0}function R(H){const G=this.stack[this.stack.length-1];G.depth=this.sliceSerialize(H).codePointAt(0)===61?1:2}function L(){this.data.setextHeadingSlurpLineEnding=void 0}function V(H){const me=this.stack[this.stack.length-1].children;let ye=me[me.length-1];(!ye||ye.type!=="text")&&(ye=xl(),ye.position={start:Zn(H.start),end:void 0},me.push(ye)),this.stack.push(ye)}function w(H){const G=this.stack.pop();G.value+=this.sliceSerialize(H),G.position.end=Zn(H.end)}function $(H){const G=this.stack[this.stack.length-1];if(this.data.atHardBreak){const me=G.children[G.children.length-1];me.position.end=Zn(H.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(G.type)&&(V.call(this,H),w.call(this,H))}function X(){this.data.atHardBreak=!0}function he(){const H=this.resume(),G=this.stack[this.stack.length-1];G.value=H}function le(){const H=this.resume(),G=this.stack[this.stack.length-1];G.value=H}function de(){const H=this.resume(),G=this.stack[this.stack.length-1];G.value=H}function Ae(){const H=this.stack[this.stack.length-1];if(this.data.inReference){const G=this.data.referenceType||"shortcut";H.type+="Reference",H.referenceType=G,delete H.url,delete H.title}else delete H.identifier,delete H.label;this.data.referenceType=void 0}function ae(){const H=this.stack[this.stack.length-1];if(this.data.inReference){const G=this.data.referenceType||"shortcut";H.type+="Reference",H.referenceType=G,delete H.url,delete H.title}else delete H.identifier,delete H.label;this.data.referenceType=void 0}function I(H){const G=this.sliceSerialize(H),me=this.stack[this.stack.length-2];me.label=Gk(G),me.identifier=En(G).toLowerCase()}function B(){const H=this.stack[this.stack.length-1],G=this.resume(),me=this.stack[this.stack.length-1];if(this.data.inReference=!0,me.type==="link"){const ye=H.children;me.children=ye}else me.alt=G}function y(){const H=this.resume(),G=this.stack[this.stack.length-1];G.url=H}function Z(){const H=this.resume(),G=this.stack[this.stack.length-1];G.title=H}function ce(){this.data.inReference=void 0}function N(){this.data.referenceType="collapsed"}function Te(H){const G=this.resume(),me=this.stack[this.stack.length-1];me.label=G,me.identifier=En(this.sliceSerialize(H)).toLowerCase(),this.data.referenceType="full"}function Ce(H){this.data.characterReferenceType=H.type}function ge(H){const G=this.sliceSerialize(H),me=this.data.characterReferenceType;let ye;me?(ye=V1(G,me==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ye=Md(G);const ve=this.stack[this.stack.length-1];ve.value+=ye}function qe(H){const G=this.stack.pop();G.position.end=Zn(H.end)}function lt(H){w.call(this,H);const G=this.stack[this.stack.length-1];G.url=this.sliceSerialize(H)}function nt(H){w.call(this,H);const G=this.stack[this.stack.length-1];G.url="mailto:"+this.sliceSerialize(H)}function re(){return{type:"blockquote",children:[]}}function j(){return{type:"code",lang:null,meta:null,value:""}}function z(){return{type:"inlineCode",value:""}}function te(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ee(){return{type:"emphasis",children:[]}}function oe(){return{type:"heading",depth:0,children:[]}}function pe(){return{type:"break"}}function Me(){return{type:"html",value:""}}function bn(){return{type:"image",title:null,url:"",alt:null}}function xn(){return{type:"link",title:null,url:"",children:[]}}function Gr(H){return{type:"list",ordered:H.type==="listOrdered",start:null,spread:H._spread,children:[]}}function Yi(H){return{type:"listItem",spread:H._spread,checked:null,children:[]}}function Vi(){return{type:"paragraph",children:[]}}function Cr(){return{type:"strong",children:[]}}function xl(){return{type:"text",value:""}}function _l(){return{type:"thematicBreak"}}}function Zn(e){return{line:e.line,column:e.column,offset:e.offset}}function ng(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?ng(e,r):Zk(e,r)}}function Zk(e,t){let n;for(n in t)if(tg.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 Kh(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+_s({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+_s({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+_s({start:t.start,end:t.end})+") is still open")}function eS(e){const t=this;t.parser=n;function n(r){return Xk(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function tS(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 nS(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
387
- `}]}function rS(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 iS(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function sS(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function aS(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Ui(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 c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)}function uS(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 lS(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function rg(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 oS(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return rg(e,t);const i={src:Ui(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 cS(e,t){const n={src:Ui(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 dS(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 fS(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return rg(e,t);const i={href:Ui(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 hS(e,t){const n={href:Ui(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 mS(e,t,n){const r=e.all(t),i=n?pS(n):ig(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 c={type:"element",tagName:"li",properties:s,children:a};return e.patch(t,c),e.applyData(t,c)}function pS(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=ig(n[r])}return t}function ig(e){const t=e.spread;return t??e.children.length>1}function gS(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 ES(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function TS(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function yS(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function bS(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=Dn(t.children[1]),l=cl(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 xS(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 c=[];for(;++l<u;){const h=t.children[l],m={},p=a?a[l]:void 0;p&&(m.align=p);let g={type:"element",tagName:s,properties:m,children:[]};h&&(g.children=e.all(h),e.patch(h,g),g=e.applyData(h,g)),c.push(g)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,f),e.applyData(t,f)}function _S(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Xh=9,Jh=32;function kS(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const s=[];for(;r;)s.push(Zh(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return s.push(Zh(t.slice(i),i>0,!1)),s.join("")}function Zh(e,t,n){let r=0,i=e.length;if(t){let s=e.codePointAt(r);for(;s===Xh||s===Jh;)r++,s=e.codePointAt(r)}if(n){let s=e.codePointAt(i-1);for(;s===Xh||s===Jh;)i--,s=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function SS(e,t){const n={type:"text",value:kS(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function CS(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const NS={blockquote:tS,break:nS,code:rS,delete:iS,emphasis:sS,footnoteReference:aS,heading:uS,html:lS,imageReference:oS,image:cS,inlineCode:dS,linkReference:fS,link:hS,listItem:mS,list:gS,paragraph:ES,root:TS,strong:yS,table:bS,tableCell:_S,tableRow:xS,text:SS,thematicBreak:CS,toml:Ra,yaml:Ra,definition:Ra,footnoteDefinition:Ra};function Ra(){}const sg=-1,hl=0,Ss=1,Ru=2,jd=3,Bd=4,Ud=5,Hd=6,ag=7,ug=8,e0=typeof self=="object"?self:globalThis,AS=(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 hl:case sg:return n(a,i);case Ss:{const u=n([],i);for(const l of a)u.push(r(l));return u}case Ru:{const u=n({},i);for(const[l,c]of a)u[r(l)]=r(c);return u}case jd:return n(new Date(a),i);case Bd:{const{source:u,flags:l}=a;return n(new RegExp(u,l),i)}case Ud:{const u=n(new Map,i);for(const[l,c]of a)u.set(r(l),r(c));return u}case Hd:{const u=n(new Set,i);for(const l of a)u.add(r(l));return u}case ag:{const{name:u,message:l}=a;return n(new e0[u](l),i)}case ug: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 e0[s](a),i)};return r},t0=e=>AS(new Map,e)(0),ei="",{toString:wS}={},{keys:vS}=Object,is=e=>{const t=typeof e;if(t!=="object"||!e)return[hl,t];const n=wS.call(e).slice(8,-1);switch(n){case"Array":return[Ss,ei];case"Object":return[Ru,ei];case"Date":return[jd,ei];case"RegExp":return[Bd,ei];case"Map":return[Ud,ei];case"Set":return[Hd,ei];case"DataView":return[Ss,n]}return n.includes("Array")?[Ss,n]:n.includes("Error")?[ag,n]:[Ru,n]},Oa=([e,t])=>e===hl&&(t==="function"||t==="symbol"),IS=(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]=is(a);switch(u){case hl:{let f=a;switch(l){case"bigint":u=ug,f=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);f=null;break;case"undefined":return i([sg],a)}return i([u,f],a)}case Ss:{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 Ru:{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 vS(a))(e||!Oa(is(a[m])))&&f.push([s(m),s(a[m])]);return h}case jd:return i([u,a.toISOString()],a);case Bd:{const{source:f,flags:h}=a;return i([u,{source:f,flags:h}],a)}case Ud:{const f=[],h=i([u,f],a);for(const[m,p]of a)(e||!(Oa(is(m))||Oa(is(p))))&&f.push([s(m),s(p)]);return h}case Hd:{const f=[],h=i([u,f],a);for(const m of a)(e||!Oa(is(m)))&&f.push(s(m));return h}}const{message:c}=a;return i([u,{name:l,message:c}],a)};return s},n0=(e,{json:t,lossy:n}={})=>{const r=[];return IS(!(t||n),!!t,new Map,r)(e),r},Oi=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?t0(n0(e,t)):structuredClone(e):(e,t)=>t0(n0(e,t));function LS(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 DS(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function RS(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||LS,r=e.options.footnoteBackLabel||DS,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 c=e.footnoteById.get(e.footnoteOrder[l]);if(!c)continue;const f=e.all(c),h=String(c.identifier).toUpperCase(),m=Ui(h.toLowerCase());let p=0;const g=[],b=e.footnoteCounts.get(h);for(;b!==void 0&&++p<=b;){g.length>0&&g.push({type:"text",value:" "});let T=typeof n=="string"?n:n(l,p);typeof T=="string"&&(T={type:"text",value:T}),g.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 v=f[f.length-1];if(v&&v.type==="element"&&v.tagName==="p"){const T=v.children[v.children.length-1];T&&T.type==="text"?T.value+=" ":v.children.push({type:"text",value:" "}),v.children.push(...g)}else f.push(...g);const E={type:"element",tagName:"li",properties:{id:t+"fn-"+m},children:e.wrap(f,!0)};e.patch(c,E),u.push(E)}if(u.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...Oi(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 ml=function(e){if(e==null)return FS;if(typeof e=="function")return pl(e);if(typeof e=="object")return Array.isArray(e)?OS(e):PS(e);if(typeof e=="string")return MS(e);throw new Error("Expected function, string, or object as test")};function OS(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=ml(e[n]);return pl(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function PS(e){const t=e;return pl(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function MS(e){return pl(t);function t(n){return n&&n.type===e}}function pl(e){return t;function t(n,r,i){return!!(jS(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function FS(){return!0}function jS(e){return e!==null&&typeof e=="object"&&"type"in e}const lg=[],BS=!0,bc=!1,US="skip";function og(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=ml(i),a=r?-1:1;u(e,void 0,[])();function u(l,c,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=lg,g,b,v;if((!t||s(l,c,f[f.length-1]||void 0))&&(p=HS(n(l,f)),p[0]===bc))return p;if("children"in l&&l.children){const E=l;if(E.children&&p[0]!==US)for(b=(r?E.children.length:-1)+a,v=f.concat(E);b>-1&&b<E.children.length;){const T=E.children[b];if(g=u(T,b,v)(),g[0]===bc)return g;b=typeof g[1]=="number"?g[1]:b+a}}return p}}}function HS(e){return Array.isArray(e)?e:typeof e=="number"?[BS,e]:e==null?lg:[e]}function gl(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),og(e,s,u,i);function u(l,c){const f=c[c.length-1],h=f?f.children.indexOf(l):void 0;return a(l,h,f)}}const xc={}.hasOwnProperty,zS={};function $S(e,t){const n=t||zS,r=new Map,i=new Map,s=new Map,a={...NS,...n.handlers},u={all:c,applyData:VS,definitionById:r,footnoteById:i,footnoteCounts:s,footnoteOrder:[],handlers:a,one:l,options:n,patch:YS,wrap:qS};return gl(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(xc.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:b,...v}=f,E=Oi(v);return E.children=u.all(f),E}return Oi(f)}return(u.options.unknownHandler||WS)(u,f,h)}function c(f){const h=[];if("children"in f){const m=f.children;let p=-1;for(;++p<m.length;){const g=u.one(m[p],f);if(g){if(p&&m[p-1].type==="break"&&(!Array.isArray(g)&&g.type==="text"&&(g.value=r0(g.value)),!Array.isArray(g)&&g.type==="element")){const b=g.children[0];b&&b.type==="text"&&(b.value=r0(b.value))}Array.isArray(g)?h.push(...g):h.push(g)}}}return h}}function YS(e,t){e.position&&(t.position=Dx(e))}function VS(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,Oi(s)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function WS(e,t){const n=t.data||{},r="value"in t&&!(xc.call(n,"hProperties")||xc.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 qS(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 r0(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function i0(e,t){const n=$S(e,t),r=n.one(e,void 0),i=RS(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 QS(e,t){return e&&"run"in e?async function(n,r){const i=i0(n,{file:r,...t});await e.run(i,r)}:function(n,r){return i0(n,{file:r,...e||t})}}function s0(e){if(e)throw e}var tu=Object.prototype.hasOwnProperty,cg=Object.prototype.toString,a0=Object.defineProperty,u0=Object.getOwnPropertyDescriptor,l0=function(t){return typeof Array.isArray=="function"?Array.isArray(t):cg.call(t)==="[object Array]"},o0=function(t){if(!t||cg.call(t)!=="[object Object]")return!1;var n=tu.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&tu.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||tu.call(t,i)},c0=function(t,n){a0&&n.name==="__proto__"?a0(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},d0=function(t,n){if(n==="__proto__")if(tu.call(t,n)){if(u0)return u0(t,n).value}else return;return t[n]},GS=function e(){var t,n,r,i,s,a,u=arguments[0],l=1,c=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<c;++l)if(t=arguments[l],t!=null)for(n in t)r=d0(u,n),i=d0(t,n),u!==i&&(f&&i&&(o0(i)||(s=l0(i)))?(s?(s=!1,a=r&&l0(r)?r:[]):a=r&&o0(r)?r:{},c0(u,{name:n,newValue:e(f,a,i)})):typeof i<"u"&&c0(u,{name:n,newValue:i}));return u};const ro=Hu(GS);function _c(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 KS(){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,...c){const f=e[++s];let h=-1;if(l){a(l);return}for(;++h<i.length;)(c[h]===null||c[h]===void 0)&&(c[h]=i[h]);i=c,f?XS(f,u)(...c):a(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function XS(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(c){const f=c;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 Cn={basename:JS,dirname:ZS,extname:e3,join:t3,sep:"/"};function JS(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');da(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 ZS(e){if(da(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 e3(e){da(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 t3(...e){let t=-1,n;for(;++t<e.length;)da(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":n3(n)}function n3(e){da(e);const t=e.codePointAt(0)===47;let n=r3(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function r3(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 da(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const i3={cwd:s3};function s3(){return"/"}function kc(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function a3(e){if(typeof e=="string")e=new URL(e);else if(!kc(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 u3(e)}function u3(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 io=["history","path","basename","stem","extname","dirname"];class dg{constructor(t){let n;t?kc(t)?n={path:t}:typeof t=="string"||l3(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":i3.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<io.length;){const s=io[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)io.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Cn.basename(this.path):void 0}set basename(t){ao(t,"basename"),so(t,"basename"),this.path=Cn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Cn.dirname(this.path):void 0}set dirname(t){f0(this.basename,"dirname"),this.path=Cn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Cn.extname(this.path):void 0}set extname(t){if(so(t,"extname"),f0(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=Cn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){kc(t)&&(t=a3(t)),ao(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Cn.basename(this.path,this.extname):void 0}set stem(t){ao(t,"stem"),so(t,"stem"),this.path=Cn.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 xt(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 so(e,t){if(e&&e.includes(Cn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Cn.sep+"`")}function ao(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function f0(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function l3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const o3=function(e){const r=this.constructor.prototype,i=r[e],s=function(){return i.apply(s,arguments)};return Object.setPrototypeOf(s,r),s},c3={}.hasOwnProperty;class zd extends o3{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=KS()}copy(){const t=new zd;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(ro(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(oo("data",this.frozen),this.namespace[t]=n,this):c3.call(this.namespace,t)&&this.namespace[t]||void 0:t?(oo("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=Pa(t),r=this.parser||this.Parser;return uo("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),uo("process",this.parser||this.Parser),lo("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(s,a){const u=Pa(t),l=r.parse(u);r.run(l,u,function(f,h,m){if(f||!h||!m)return c(f);const p=h,g=r.stringify(p,m);h3(g)?m.value=g:m.result=g,c(f,m)});function c(f,h){f||!h?a(f):s?s(h):n(void 0,h)}}}processSync(t){let n=!1,r;return this.freeze(),uo("processSync",this.parser||this.Parser),lo("processSync",this.compiler||this.Compiler),this.process(t,i),m0("processSync","process",n),r;function i(s,a){n=!0,s0(s),r=a}}run(t,n,r){h0(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=Pa(n);i.run(t,l,c);function c(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),m0("runSync","run",r),i;function s(a,u){s0(a),i=u,r=!0}}stringify(t,n){this.freeze();const r=Pa(n),i=this.compiler||this.Compiler;return lo("stringify",i),h0(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(oo("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(c){if(typeof c=="function")l(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[f,...h]=c;l(f,h)}else a(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function a(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");u(c.plugins),c.settings&&(i.settings=ro(!0,i.settings,c.settings))}function u(c){let f=-1;if(c!=null)if(Array.isArray(c))for(;++f<c.length;){const h=c[f];s(h)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function l(c,f){let h=-1,m=-1;for(;++h<r.length;)if(r[h][0]===c){m=h;break}if(m===-1)r.push([c,...f]);else if(f.length>0){let[p,...g]=f;const b=r[m][1];_c(b)&&_c(p)&&(p=ro(!0,b,p)),r[m]=[c,p,...g]}}}}const d3=new zd().freeze();function uo(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function lo(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function oo(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 h0(e){if(!_c(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function m0(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Pa(e){return f3(e)?e:new dg(e)}function f3(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function h3(e){return typeof e=="string"||m3(e)}function m3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const p3="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",p0=[],g0={allowDangerousHtml:!0},g3=/^(https?|ircs?|mailto|xmpp)$/i,E3=[{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 T3(e){const t=y3(e),n=b3(e);return x3(t.runSync(t.parse(n),n),e)}function y3(e){const t=e.rehypePlugins||p0,n=e.remarkPlugins||p0,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...g0}:g0;return d3().use(eS).use(n).use(QS,r).use(t)}function b3(e){const t=e.children||"",n=new dg;return typeof t=="string"&&(n.value=t),n}function x3(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,s=t.disallowedElements,a=t.skipHtml,u=t.unwrapDisallowed,l=t.urlTransform||_3;for(const f of E3)Object.hasOwn(t,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+p3+f.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),gl(e,c),Fx(e,{Fragment:o.Fragment,components:i,ignoreInvalidStyle:!0,jsx:o.jsx,jsxs:o.jsxs,passKeys:!0,passNode:!0});function c(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 eo)if(Object.hasOwn(eo,p)&&Object.hasOwn(f.properties,p)){const g=f.properties[p],b=eo[p];(b===null||b.includes(f.tagName))&&(f.properties[p]=l(String(g||""),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 _3(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||g3.test(e.slice(0,t))?e:""}const E0=/[#.]/g;function k3(e,t){const n=e||"",r={};let i=0,s,a;for(;i<n.length;){E0.lastIndex=i;const u=E0.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 fg(e,t,n){const r=n?A3(n):void 0;function i(s,a,...u){let l;if(s==null){l={type:"root",children:[]};const c=a;u.unshift(c)}else{l=k3(s,t);const c=l.tagName.toLowerCase(),f=r?r.get(c):void 0;if(l.tagName=f||c,S3(a))u.unshift(a);else for(const[h,m]of Object.entries(a))C3(e,l.properties,h,m)}for(const c of u)Sc(l.children,c);return l.type==="element"&&l.tagName==="template"&&(l.content={type:"root",children:l.children},l.children=[]),l}return i}function S3(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 C3(e,t,n,r){const i=ll(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=Dh(r):i.commaSeparated?s=Ah(r):i.commaOrSpaceSeparated?s=Dh(Ah(r).join(" ")):s=T0(i,i.property,r):Array.isArray(r)?s=[...r]:s=i.property==="style"?N3(r):String(r);if(Array.isArray(s)){const a=[];for(const u of s)a.push(T0(i,i.property,u));s=a}i.property==="className"&&Array.isArray(t.className)&&(s=t.className.concat(s)),t[i.property]=s}}function Sc(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)Sc(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Sc(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function T0(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Xs(n)===Xs(t)))return!0}return n}function N3(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function A3(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const w3=["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"],v3=fg(oa,"div"),I3=fg(kr,"g",w3);function L3(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=y0(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=y0(t,u),c=l===-1?t.length+1:l+1;if(u===c)break;n.push(c)}const a=(s.line>1?n[s.line-2]:0)+s.column-1;if(a<n[s.line-1])return a}}}function y0(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 Or={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/"},hg={}.hasOwnProperty,D3=Object.prototype;function R3(e,t){const n=t||{};return $d({file:n.file||void 0,location:!1,schema:n.space==="svg"?kr:oa,verbose:n.verbose||!1},e)}function $d(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},nu(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:mg(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const s=String(e.file),a=L3(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"},nu(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},nu(e,r,n),n}default:return n=O3(e,t),n}}function mg(e,t){let n=-1;const r=[];for(;++n<t.length;){const i=$d(e,t[n]);r.push(i)}return r}function O3(e,t){const n=e.schema;e.schema=t.namespaceURI===Or.svg?kr:oa;let r=-1;const i={};for(;++r<t.attrs.length;){const u=t.attrs[r],l=(u.prefix?u.prefix+":":"")+u.name;hg.call(D3,l)||(i[l]=u.value)}const a=(e.schema.space==="svg"?I3:v3)(t.tagName,i,mg(e,t.childNodes));if(nu(e,t,a),a.tagName==="template"){const u=t,l=u.sourceCodeLocation,c=l&&l.startTag&&gi(l.startTag),f=l&&l.endTag&&gi(l.endTag),h=$d(e,u.content);c&&f&&e.file&&(h.position={start:c.end,end:f.start}),a.content=h}return e.schema=n,a}function nu(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=P3(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function P3(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)hg.call(n.attrs,a)&&(s[ll(e.schema,a).property]=gi(n.attrs[a]));n.startTag;const u=gi(n.startTag),l=n.endTag?gi(n.endTag):void 0,c={opening:u};l&&(c.closing=l),c.properties=s,t.data={position:c}}}return r}function gi(e){const t=b0({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=b0({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function b0(e){return e.line&&e.column?e:void 0}const x0={}.hasOwnProperty;function pg(e,t){const n=t||{};function r(i,...s){let a=r.invalid;const u=r.handlers;if(i&&x0.call(i,e)){const l=String(i[e]);a=x0.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 M3={},F3={}.hasOwnProperty,gg=pg("type",{handlers:{root:B3,element:Y3,text:z3,comment:$3,doctype:H3}});function j3(e,t){const r=(t||M3).space;return gg(e,r==="svg"?kr:oa)}function B3(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Yd(e.children,n,t),Hi(e,n),n}function U3(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Yd(e.children,n,t),Hi(e,n),n}function H3(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Hi(e,t),t}function z3(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Hi(e,t),t}function $3(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Hi(e,t),t}function Y3(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=kr);const i=[];let s;if(e.properties){for(s in e.properties)if(s!=="children"&&F3.call(e.properties,s)){const l=V3(r,s,e.properties[s]);l&&i.push(l)}}const a=r.space,u={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:Or[a],childNodes:[],parentNode:null};return u.childNodes=Yd(e.children,u,r),Hi(e,u),e.tagName==="template"&&e.content&&(u.content=U3(e.content,r)),u}function V3(e,t,n){const r=ll(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?v1(n):F1(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=Or[r.space]}return i}function Yd(e,t,n){let r=-1;const i=[];if(e)for(;++r<e.length;){const s=gg(e[r],n);s.parentNode=t,i.push(s)}return i}function Hi(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 W3=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],q3=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 _;(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"})(_||(_={}));const Rt={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Eg(e){return e>=55296&&e<=57343}function Q3(e){return e>=56320&&e<=57343}function G3(e,t){return(e-55296)*1024+9216+t}function Tg(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function yg(e){return e>=64976&&e<=65007||q3.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 K3=65536;class X3{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=K3,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(Q3(n))return this.pos++,this._addGap(),G3(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,_.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,_.EOF;const r=this.html.charCodeAt(n);return r===_.CARRIAGE_RETURN?_.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,_.EOF;let t=this.html.charCodeAt(this.pos);return t===_.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,_.LINE_FEED):t===_.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,Eg(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===_.LINE_FEED||t===_.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){Tg(t)?this._err(U.controlCharacterInInputStream):yg(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 _e;(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"})(_e||(_e={}));function bg(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 J3=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))),Z3=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 eC(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=Z3.get(e))!==null&&t!==void 0?t:e}var at;(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"})(at||(at={}));const tC=32;var or;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(or||(or={}));function Cc(e){return e>=at.ZERO&&e<=at.NINE}function nC(e){return e>=at.UPPER_A&&e<=at.UPPER_F||e>=at.LOWER_A&&e<=at.LOWER_F}function rC(e){return e>=at.UPPER_A&&e<=at.UPPER_Z||e>=at.LOWER_A&&e<=at.LOWER_Z||Cc(e)}function iC(e){return e===at.EQUALS||rC(e)}var it;(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"})(it||(it={}));var Bn;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Bn||(Bn={}));class sC{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=it.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Bn.Strict}startEntity(t){this.decodeMode=t,this.state=it.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case it.EntityStart:return t.charCodeAt(n)===at.NUM?(this.state=it.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=it.NamedEntity,this.stateNamedEntity(t,n));case it.NumericStart:return this.stateNumericStart(t,n);case it.NumericDecimal:return this.stateNumericDecimal(t,n);case it.NumericHex:return this.stateNumericHex(t,n);case it.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|tC)===at.LOWER_X?(this.state=it.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=it.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(Cc(i)||nC(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(Cc(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===at.SEMI)this.consumed+=1;else if(this.decodeMode===Bn.Strict)return 0;return this.emitCodePoint(eC(this.result),this.consumed),this.errors&&(t!==at.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&or.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const a=t.charCodeAt(n);if(this.treeIndex=aC(r,i,this.treeIndex+Math.max(1,s),a),this.treeIndex<0)return this.result===0||this.decodeMode===Bn.Attribute&&(s===0||iC(a))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],s=(i&or.VALUE_LENGTH)>>14,s!==0){if(a===at.SEMI)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);this.decodeMode!==Bn.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]&or.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]&~or.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case it.NamedEntity:return this.result!==0&&(this.decodeMode!==Bn.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case it.NumericDecimal:return this.emitNumericEntity(0,2);case it.NumericHex:return this.emitNumericEntity(0,3);case it.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case it.EntityStart:return 0}}}function aC(e,t,n,r){const i=(t&or.BRANCH_LENGTH)>>7,s=t&or.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,c=e[l];if(c<r)a=l+1;else if(c>r)u=l-1;else return e[l+i]}return-1}var Y;(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/"})(Y||(Y={}));var Fr;(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"})(Fr||(Fr={}));var nn;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(nn||(nn={}));var M;(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"})(M||(M={}));var d;(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"})(d||(d={}));const uC=new Map([[M.A,d.A],[M.ADDRESS,d.ADDRESS],[M.ANNOTATION_XML,d.ANNOTATION_XML],[M.APPLET,d.APPLET],[M.AREA,d.AREA],[M.ARTICLE,d.ARTICLE],[M.ASIDE,d.ASIDE],[M.B,d.B],[M.BASE,d.BASE],[M.BASEFONT,d.BASEFONT],[M.BGSOUND,d.BGSOUND],[M.BIG,d.BIG],[M.BLOCKQUOTE,d.BLOCKQUOTE],[M.BODY,d.BODY],[M.BR,d.BR],[M.BUTTON,d.BUTTON],[M.CAPTION,d.CAPTION],[M.CENTER,d.CENTER],[M.CODE,d.CODE],[M.COL,d.COL],[M.COLGROUP,d.COLGROUP],[M.DD,d.DD],[M.DESC,d.DESC],[M.DETAILS,d.DETAILS],[M.DIALOG,d.DIALOG],[M.DIR,d.DIR],[M.DIV,d.DIV],[M.DL,d.DL],[M.DT,d.DT],[M.EM,d.EM],[M.EMBED,d.EMBED],[M.FIELDSET,d.FIELDSET],[M.FIGCAPTION,d.FIGCAPTION],[M.FIGURE,d.FIGURE],[M.FONT,d.FONT],[M.FOOTER,d.FOOTER],[M.FOREIGN_OBJECT,d.FOREIGN_OBJECT],[M.FORM,d.FORM],[M.FRAME,d.FRAME],[M.FRAMESET,d.FRAMESET],[M.H1,d.H1],[M.H2,d.H2],[M.H3,d.H3],[M.H4,d.H4],[M.H5,d.H5],[M.H6,d.H6],[M.HEAD,d.HEAD],[M.HEADER,d.HEADER],[M.HGROUP,d.HGROUP],[M.HR,d.HR],[M.HTML,d.HTML],[M.I,d.I],[M.IMG,d.IMG],[M.IMAGE,d.IMAGE],[M.INPUT,d.INPUT],[M.IFRAME,d.IFRAME],[M.KEYGEN,d.KEYGEN],[M.LABEL,d.LABEL],[M.LI,d.LI],[M.LINK,d.LINK],[M.LISTING,d.LISTING],[M.MAIN,d.MAIN],[M.MALIGNMARK,d.MALIGNMARK],[M.MARQUEE,d.MARQUEE],[M.MATH,d.MATH],[M.MENU,d.MENU],[M.META,d.META],[M.MGLYPH,d.MGLYPH],[M.MI,d.MI],[M.MO,d.MO],[M.MN,d.MN],[M.MS,d.MS],[M.MTEXT,d.MTEXT],[M.NAV,d.NAV],[M.NOBR,d.NOBR],[M.NOFRAMES,d.NOFRAMES],[M.NOEMBED,d.NOEMBED],[M.NOSCRIPT,d.NOSCRIPT],[M.OBJECT,d.OBJECT],[M.OL,d.OL],[M.OPTGROUP,d.OPTGROUP],[M.OPTION,d.OPTION],[M.P,d.P],[M.PARAM,d.PARAM],[M.PLAINTEXT,d.PLAINTEXT],[M.PRE,d.PRE],[M.RB,d.RB],[M.RP,d.RP],[M.RT,d.RT],[M.RTC,d.RTC],[M.RUBY,d.RUBY],[M.S,d.S],[M.SCRIPT,d.SCRIPT],[M.SEARCH,d.SEARCH],[M.SECTION,d.SECTION],[M.SELECT,d.SELECT],[M.SOURCE,d.SOURCE],[M.SMALL,d.SMALL],[M.SPAN,d.SPAN],[M.STRIKE,d.STRIKE],[M.STRONG,d.STRONG],[M.STYLE,d.STYLE],[M.SUB,d.SUB],[M.SUMMARY,d.SUMMARY],[M.SUP,d.SUP],[M.TABLE,d.TABLE],[M.TBODY,d.TBODY],[M.TEMPLATE,d.TEMPLATE],[M.TEXTAREA,d.TEXTAREA],[M.TFOOT,d.TFOOT],[M.TD,d.TD],[M.TH,d.TH],[M.THEAD,d.THEAD],[M.TITLE,d.TITLE],[M.TR,d.TR],[M.TRACK,d.TRACK],[M.TT,d.TT],[M.U,d.U],[M.UL,d.UL],[M.SVG,d.SVG],[M.VAR,d.VAR],[M.WBR,d.WBR],[M.XMP,d.XMP]]);function zi(e){var t;return(t=uC.get(e))!==null&&t!==void 0?t:d.UNKNOWN}const W=d,lC={[Y.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]),[Y.MATHML]:new Set([W.MI,W.MO,W.MN,W.MS,W.MTEXT,W.ANNOTATION_XML]),[Y.SVG]:new Set([W.TITLE,W.FOREIGN_OBJECT,W.DESC]),[Y.XLINK]:new Set,[Y.XML]:new Set,[Y.XMLNS]:new Set},Nc=new Set([W.H1,W.H2,W.H3,W.H4,W.H5,W.H6]);M.STYLE,M.SCRIPT,M.XMP,M.IFRAME,M.NOEMBED,M.NOFRAMES,M.PLAINTEXT;var C;(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"})(C||(C={}));const Xe={DATA:C.DATA,RCDATA:C.RCDATA,RAWTEXT:C.RAWTEXT,SCRIPT_DATA:C.SCRIPT_DATA,PLAINTEXT:C.PLAINTEXT,CDATA_SECTION:C.CDATA_SECTION};function oC(e){return e>=_.DIGIT_0&&e<=_.DIGIT_9}function fs(e){return e>=_.LATIN_CAPITAL_A&&e<=_.LATIN_CAPITAL_Z}function cC(e){return e>=_.LATIN_SMALL_A&&e<=_.LATIN_SMALL_Z}function tr(e){return cC(e)||fs(e)}function _0(e){return tr(e)||oC(e)}function Ma(e){return e+32}function xg(e){return e===_.SPACE||e===_.LINE_FEED||e===_.TABULATION||e===_.FORM_FEED}function k0(e){return xg(e)||e===_.SOLIDUS||e===_.GREATER_THAN_SIGN}function dC(e){return e===_.NULL?U.nullCharacterReference:e>1114111?U.characterReferenceOutsideUnicodeRange:Eg(e)?U.surrogateCharacterReference:yg(e)?U.noncharacterCharacterReference:Tg(e)||e===_.CARRIAGE_RETURN?U.controlCharacterReference:null}class fC{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=C.DATA,this.returnState=C.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new X3(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new sC(J3,(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=dC(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:_e.START_TAG,tagName:"",tagID:d.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:_e.END_TAG,tagName:"",tagID:d.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:_e.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:_e.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(bg(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=zi(t.tagName),t.type===_e.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 _e.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case _e.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case _e.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:_e.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=xg(t)?_e.WHITESPACE_CHARACTER:t===_.NULL?_e.NULL_CHARACTER:_e.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(_e.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=C.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Bn.Attribute:Bn.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===C.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===C.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===C.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case C.DATA:{this._stateData(t);break}case C.RCDATA:{this._stateRcdata(t);break}case C.RAWTEXT:{this._stateRawtext(t);break}case C.SCRIPT_DATA:{this._stateScriptData(t);break}case C.PLAINTEXT:{this._statePlaintext(t);break}case C.TAG_OPEN:{this._stateTagOpen(t);break}case C.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case C.TAG_NAME:{this._stateTagName(t);break}case C.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case C.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case C.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case C.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case C.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case C.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case C.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case C.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case C.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case C.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case C.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case C.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case C.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case C.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case C.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case C.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case C.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case C.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case C.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case C.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case C.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case C.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case C.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case C.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case C.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case C.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case C.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case C.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case C.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case C.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case C.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case C.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case C.BOGUS_COMMENT:{this._stateBogusComment(t);break}case C.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case C.COMMENT_START:{this._stateCommentStart(t);break}case C.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case C.COMMENT:{this._stateComment(t);break}case C.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case C.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case C.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case C.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case C.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case C.COMMENT_END:{this._stateCommentEnd(t);break}case C.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case C.DOCTYPE:{this._stateDoctype(t);break}case C.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case C.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case C.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case C.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case C.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case C.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case C.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case C.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case C.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case C.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case C.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case C.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case C.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case C.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case C.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case C.CDATA_SECTION:{this._stateCdataSection(t);break}case C.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case C.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case C.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case C.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case _.LESS_THAN_SIGN:{this.state=C.TAG_OPEN;break}case _.AMPERSAND:{this._startCharacterReference();break}case _.NULL:{this._err(U.unexpectedNullCharacter),this._emitCodePoint(t);break}case _.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case _.AMPERSAND:{this._startCharacterReference();break}case _.LESS_THAN_SIGN:{this.state=C.RCDATA_LESS_THAN_SIGN;break}case _.NULL:{this._err(U.unexpectedNullCharacter),this._emitChars(ze);break}case _.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case _.LESS_THAN_SIGN:{this.state=C.RAWTEXT_LESS_THAN_SIGN;break}case _.NULL:{this._err(U.unexpectedNullCharacter),this._emitChars(ze);break}case _.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case _.LESS_THAN_SIGN:{this.state=C.SCRIPT_DATA_LESS_THAN_SIGN;break}case _.NULL:{this._err(U.unexpectedNullCharacter),this._emitChars(ze);break}case _.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case _.NULL:{this._err(U.unexpectedNullCharacter),this._emitChars(ze);break}case _.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(tr(t))this._createStartTagToken(),this.state=C.TAG_NAME,this._stateTagName(t);else switch(t){case _.EXCLAMATION_MARK:{this.state=C.MARKUP_DECLARATION_OPEN;break}case _.SOLIDUS:{this.state=C.END_TAG_OPEN;break}case _.QUESTION_MARK:{this._err(U.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=C.BOGUS_COMMENT,this._stateBogusComment(t);break}case _.EOF:{this._err(U.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(U.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=C.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(tr(t))this._createEndTagToken(),this.state=C.TAG_NAME,this._stateTagName(t);else switch(t){case _.GREATER_THAN_SIGN:{this._err(U.missingEndTagName),this.state=C.DATA;break}case _.EOF:{this._err(U.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(U.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=C.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this.state=C.BEFORE_ATTRIBUTE_NAME;break}case _.SOLIDUS:{this.state=C.SELF_CLOSING_START_TAG;break}case _.GREATER_THAN_SIGN:{this.state=C.DATA,this.emitCurrentTagToken();break}case _.NULL:{this._err(U.unexpectedNullCharacter),n.tagName+=ze;break}case _.EOF:{this._err(U.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(fs(t)?Ma(t):t)}}_stateRcdataLessThanSign(t){t===_.SOLIDUS?this.state=C.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=C.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){tr(t)?(this.state=C.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=C.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 _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=C.BEFORE_ATTRIBUTE_NAME,!1;case _.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=C.SELF_CLOSING_START_TAG,!1;case _.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=C.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=C.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===_.SOLIDUS?this.state=C.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=C.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){tr(t)?(this.state=C.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=C.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=C.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case _.SOLIDUS:{this.state=C.SCRIPT_DATA_END_TAG_OPEN;break}case _.EXCLAMATION_MARK:{this.state=C.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=C.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){tr(t)?(this.state=C.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=C.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=C.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===_.HYPHEN_MINUS?(this.state=C.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=C.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===_.HYPHEN_MINUS?(this.state=C.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=C.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case _.HYPHEN_MINUS:{this.state=C.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case _.LESS_THAN_SIGN:{this.state=C.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case _.NULL:{this._err(U.unexpectedNullCharacter),this._emitChars(ze);break}case _.EOF:{this._err(U.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case _.HYPHEN_MINUS:{this.state=C.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case _.LESS_THAN_SIGN:{this.state=C.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case _.NULL:{this._err(U.unexpectedNullCharacter),this.state=C.SCRIPT_DATA_ESCAPED,this._emitChars(ze);break}case _.EOF:{this._err(U.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=C.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case _.HYPHEN_MINUS:{this._emitChars("-");break}case _.LESS_THAN_SIGN:{this.state=C.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case _.GREATER_THAN_SIGN:{this.state=C.SCRIPT_DATA,this._emitChars(">");break}case _.NULL:{this._err(U.unexpectedNullCharacter),this.state=C.SCRIPT_DATA_ESCAPED,this._emitChars(ze);break}case _.EOF:{this._err(U.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=C.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===_.SOLIDUS?this.state=C.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:tr(t)?(this._emitChars("<"),this.state=C.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=C.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){tr(t)?(this.state=C.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=C.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=C.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Rt.SCRIPT,!1)&&k0(this.preprocessor.peek(Rt.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Rt.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=C.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case _.HYPHEN_MINUS:{this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case _.LESS_THAN_SIGN:{this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case _.NULL:{this._err(U.unexpectedNullCharacter),this._emitChars(ze);break}case _.EOF:{this._err(U.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case _.HYPHEN_MINUS:{this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case _.LESS_THAN_SIGN:{this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case _.NULL:{this._err(U.unexpectedNullCharacter),this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ze);break}case _.EOF:{this._err(U.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case _.HYPHEN_MINUS:{this._emitChars("-");break}case _.LESS_THAN_SIGN:{this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case _.GREATER_THAN_SIGN:{this.state=C.SCRIPT_DATA,this._emitChars(">");break}case _.NULL:{this._err(U.unexpectedNullCharacter),this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ze);break}case _.EOF:{this._err(U.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===_.SOLIDUS?(this.state=C.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Rt.SCRIPT,!1)&&k0(this.preprocessor.peek(Rt.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Rt.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=C.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.SOLIDUS:case _.GREATER_THAN_SIGN:case _.EOF:{this.state=C.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case _.EQUALS_SIGN:{this._err(U.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=C.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=C.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:case _.SOLIDUS:case _.GREATER_THAN_SIGN:case _.EOF:{this._leaveAttrName(),this.state=C.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case _.EQUALS_SIGN:{this._leaveAttrName(),this.state=C.BEFORE_ATTRIBUTE_VALUE;break}case _.QUOTATION_MARK:case _.APOSTROPHE:case _.LESS_THAN_SIGN:{this._err(U.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case _.NULL:{this._err(U.unexpectedNullCharacter),this.currentAttr.name+=ze;break}default:this.currentAttr.name+=String.fromCodePoint(fs(t)?Ma(t):t)}}_stateAfterAttributeName(t){switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.SOLIDUS:{this.state=C.SELF_CLOSING_START_TAG;break}case _.EQUALS_SIGN:{this.state=C.BEFORE_ATTRIBUTE_VALUE;break}case _.GREATER_THAN_SIGN:{this.state=C.DATA,this.emitCurrentTagToken();break}case _.EOF:{this._err(U.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=C.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.QUOTATION_MARK:{this.state=C.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case _.APOSTROPHE:{this.state=C.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case _.GREATER_THAN_SIGN:{this._err(U.missingAttributeValue),this.state=C.DATA,this.emitCurrentTagToken();break}default:this.state=C.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case _.QUOTATION_MARK:{this.state=C.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case _.AMPERSAND:{this._startCharacterReference();break}case _.NULL:{this._err(U.unexpectedNullCharacter),this.currentAttr.value+=ze;break}case _.EOF:{this._err(U.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case _.APOSTROPHE:{this.state=C.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case _.AMPERSAND:{this._startCharacterReference();break}case _.NULL:{this._err(U.unexpectedNullCharacter),this.currentAttr.value+=ze;break}case _.EOF:{this._err(U.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this._leaveAttrValue(),this.state=C.BEFORE_ATTRIBUTE_NAME;break}case _.AMPERSAND:{this._startCharacterReference();break}case _.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=C.DATA,this.emitCurrentTagToken();break}case _.NULL:{this._err(U.unexpectedNullCharacter),this.currentAttr.value+=ze;break}case _.QUOTATION_MARK:case _.APOSTROPHE:case _.LESS_THAN_SIGN:case _.EQUALS_SIGN:case _.GRAVE_ACCENT:{this._err(U.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case _.EOF:{this._err(U.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this._leaveAttrValue(),this.state=C.BEFORE_ATTRIBUTE_NAME;break}case _.SOLIDUS:{this._leaveAttrValue(),this.state=C.SELF_CLOSING_START_TAG;break}case _.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=C.DATA,this.emitCurrentTagToken();break}case _.EOF:{this._err(U.eofInTag),this._emitEOFToken();break}default:this._err(U.missingWhitespaceBetweenAttributes),this.state=C.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case _.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=C.DATA,this.emitCurrentTagToken();break}case _.EOF:{this._err(U.eofInTag),this._emitEOFToken();break}default:this._err(U.unexpectedSolidusInTag),this.state=C.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case _.GREATER_THAN_SIGN:{this.state=C.DATA,this.emitCurrentComment(n);break}case _.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case _.NULL:{this._err(U.unexpectedNullCharacter),n.data+=ze;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Rt.DASH_DASH,!0)?(this._createCommentToken(Rt.DASH_DASH.length+1),this.state=C.COMMENT_START):this._consumeSequenceIfMatch(Rt.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Rt.DOCTYPE.length+1),this.state=C.DOCTYPE):this._consumeSequenceIfMatch(Rt.CDATA_START,!0)?this.inForeignNode?this.state=C.CDATA_SECTION:(this._err(U.cdataInHtmlContent),this._createCommentToken(Rt.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=C.BOGUS_COMMENT):this._ensureHibernation()||(this._err(U.incorrectlyOpenedComment),this._createCommentToken(2),this.state=C.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case _.HYPHEN_MINUS:{this.state=C.COMMENT_START_DASH;break}case _.GREATER_THAN_SIGN:{this._err(U.abruptClosingOfEmptyComment),this.state=C.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=C.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case _.HYPHEN_MINUS:{this.state=C.COMMENT_END;break}case _.GREATER_THAN_SIGN:{this._err(U.abruptClosingOfEmptyComment),this.state=C.DATA,this.emitCurrentComment(n);break}case _.EOF:{this._err(U.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=C.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case _.HYPHEN_MINUS:{this.state=C.COMMENT_END_DASH;break}case _.LESS_THAN_SIGN:{n.data+="<",this.state=C.COMMENT_LESS_THAN_SIGN;break}case _.NULL:{this._err(U.unexpectedNullCharacter),n.data+=ze;break}case _.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 _.EXCLAMATION_MARK:{n.data+="!",this.state=C.COMMENT_LESS_THAN_SIGN_BANG;break}case _.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=C.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===_.HYPHEN_MINUS?this.state=C.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=C.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===_.HYPHEN_MINUS?this.state=C.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=C.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==_.GREATER_THAN_SIGN&&t!==_.EOF&&this._err(U.nestedComment),this.state=C.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case _.HYPHEN_MINUS:{this.state=C.COMMENT_END;break}case _.EOF:{this._err(U.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=C.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case _.GREATER_THAN_SIGN:{this.state=C.DATA,this.emitCurrentComment(n);break}case _.EXCLAMATION_MARK:{this.state=C.COMMENT_END_BANG;break}case _.HYPHEN_MINUS:{n.data+="-";break}case _.EOF:{this._err(U.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=C.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case _.HYPHEN_MINUS:{n.data+="--!",this.state=C.COMMENT_END_DASH;break}case _.GREATER_THAN_SIGN:{this._err(U.incorrectlyClosedComment),this.state=C.DATA,this.emitCurrentComment(n);break}case _.EOF:{this._err(U.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=C.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this.state=C.BEFORE_DOCTYPE_NAME;break}case _.GREATER_THAN_SIGN:{this.state=C.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case _.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=C.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(fs(t))this._createDoctypeToken(String.fromCharCode(Ma(t))),this.state=C.DOCTYPE_NAME;else switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.NULL:{this._err(U.unexpectedNullCharacter),this._createDoctypeToken(ze),this.state=C.DOCTYPE_NAME;break}case _.GREATER_THAN_SIGN:{this._err(U.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=C.DATA;break}case _.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=C.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this.state=C.AFTER_DOCTYPE_NAME;break}case _.GREATER_THAN_SIGN:{this.state=C.DATA,this.emitCurrentDoctype(n);break}case _.NULL:{this._err(U.unexpectedNullCharacter),n.name+=ze;break}case _.EOF:{this._err(U.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(fs(t)?Ma(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.GREATER_THAN_SIGN:{this.state=C.DATA,this.emitCurrentDoctype(n);break}case _.EOF:{this._err(U.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Rt.PUBLIC,!1)?this.state=C.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Rt.SYSTEM,!1)?this.state=C.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(U.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=C.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this.state=C.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case _.QUOTATION_MARK:{this._err(U.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=C.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case _.APOSTROPHE:{this._err(U.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=C.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case _.GREATER_THAN_SIGN:{this._err(U.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=C.DATA,this.emitCurrentDoctype(n);break}case _.EOF:{this._err(U.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(U.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=C.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.QUOTATION_MARK:{n.publicId="",this.state=C.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case _.APOSTROPHE:{n.publicId="",this.state=C.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case _.GREATER_THAN_SIGN:{this._err(U.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=C.DATA,this.emitCurrentDoctype(n);break}case _.EOF:{this._err(U.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(U.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=C.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case _.QUOTATION_MARK:{this.state=C.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case _.NULL:{this._err(U.unexpectedNullCharacter),n.publicId+=ze;break}case _.GREATER_THAN_SIGN:{this._err(U.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=C.DATA;break}case _.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 _.APOSTROPHE:{this.state=C.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case _.NULL:{this._err(U.unexpectedNullCharacter),n.publicId+=ze;break}case _.GREATER_THAN_SIGN:{this._err(U.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=C.DATA;break}case _.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 _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this.state=C.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case _.GREATER_THAN_SIGN:{this.state=C.DATA,this.emitCurrentDoctype(n);break}case _.QUOTATION_MARK:{this._err(U.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=C.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case _.APOSTROPHE:{this._err(U.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=C.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case _.EOF:{this._err(U.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(U.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=C.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=C.DATA;break}case _.QUOTATION_MARK:{n.systemId="",this.state=C.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case _.APOSTROPHE:{n.systemId="",this.state=C.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case _.EOF:{this._err(U.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(U.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=C.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this.state=C.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case _.QUOTATION_MARK:{this._err(U.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=C.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case _.APOSTROPHE:{this._err(U.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=C.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case _.GREATER_THAN_SIGN:{this._err(U.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=C.DATA,this.emitCurrentDoctype(n);break}case _.EOF:{this._err(U.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(U.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=C.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.QUOTATION_MARK:{n.systemId="",this.state=C.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case _.APOSTROPHE:{n.systemId="",this.state=C.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case _.GREATER_THAN_SIGN:{this._err(U.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=C.DATA,this.emitCurrentDoctype(n);break}case _.EOF:{this._err(U.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(U.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=C.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case _.QUOTATION_MARK:{this.state=C.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case _.NULL:{this._err(U.unexpectedNullCharacter),n.systemId+=ze;break}case _.GREATER_THAN_SIGN:{this._err(U.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=C.DATA;break}case _.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 _.APOSTROPHE:{this.state=C.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case _.NULL:{this._err(U.unexpectedNullCharacter),n.systemId+=ze;break}case _.GREATER_THAN_SIGN:{this._err(U.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=C.DATA;break}case _.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 _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=C.DATA;break}case _.EOF:{this._err(U.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(U.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=C.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case _.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=C.DATA;break}case _.NULL:{this._err(U.unexpectedNullCharacter);break}case _.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case _.RIGHT_SQUARE_BRACKET:{this.state=C.CDATA_SECTION_BRACKET;break}case _.EOF:{this._err(U.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===_.RIGHT_SQUARE_BRACKET?this.state=C.CDATA_SECTION_END:(this._emitChars("]"),this.state=C.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case _.GREATER_THAN_SIGN:{this.state=C.DATA;break}case _.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=C.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(_.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&_0(this.preprocessor.peek(1))?C.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){_0(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===_.SEMICOLON&&this._err(U.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const _g=new Set([d.DD,d.DT,d.LI,d.OPTGROUP,d.OPTION,d.P,d.RB,d.RP,d.RT,d.RTC]),S0=new Set([..._g,d.CAPTION,d.COLGROUP,d.TBODY,d.TD,d.TFOOT,d.TH,d.THEAD,d.TR]),Ou=new Set([d.APPLET,d.CAPTION,d.HTML,d.MARQUEE,d.OBJECT,d.TABLE,d.TD,d.TEMPLATE,d.TH]),hC=new Set([...Ou,d.OL,d.UL]),mC=new Set([...Ou,d.BUTTON]),C0=new Set([d.ANNOTATION_XML,d.MI,d.MN,d.MO,d.MS,d.MTEXT]),N0=new Set([d.DESC,d.FOREIGN_OBJECT,d.TITLE]),pC=new Set([d.TR,d.TEMPLATE,d.HTML]),gC=new Set([d.TBODY,d.TFOOT,d.THEAD,d.TEMPLATE,d.HTML]),EC=new Set([d.TABLE,d.TEMPLATE,d.HTML]),TC=new Set([d.TD,d.TH]);class yC{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=d.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===d.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===Y.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])!==Y.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(Nc,Y.HTML)}popUntilTableCellPopped(){this.popUntilPopped(TC,Y.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(EC,Y.HTML)}clearBackToTableBodyContext(){this.clearBackTo(gC,Y.HTML)}clearBackToTableRowContext(){this.clearBackTo(pC,Y.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]===d.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]===d.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 Y.HTML:{if(i===t)return!0;if(n.has(i))return!1;break}case Y.SVG:{if(N0.has(i))return!1;break}case Y.MATHML:{if(C0.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Ou)}hasInListItemScope(t){return this.hasInDynamicScope(t,hC)}hasInButtonScope(t){return this.hasInDynamicScope(t,mC)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case Y.HTML:{if(Nc.has(n))return!0;if(Ou.has(n))return!1;break}case Y.SVG:{if(N0.has(n))return!1;break}case Y.MATHML:{if(C0.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===Y.HTML)switch(this.tagIDs[n]){case t:return!0;case d.TABLE:case d.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===Y.HTML)switch(this.tagIDs[t]){case d.TBODY:case d.THEAD:case d.TFOOT:return!0;case d.TABLE:case d.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===Y.HTML)switch(this.tagIDs[n]){case t:return!0;case d.OPTION:case d.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&_g.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&S0.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&S0.has(this.currentTagId);)this.pop()}}const co=3;var Nn;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Nn||(Nn={}));const A0={type:Nn.Marker};class bC{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===Nn.Marker)break;const{element:c}=l;if(this.treeAdapter.getTagName(c)===s&&this.treeAdapter.getNamespaceURI(c)===a){const f=this.treeAdapter.getAttrList(c);f.length===i&&r.push({idx:u,attrs:f})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<co)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<co)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>=co&&this.entries.splice(u.idx,1))}}insertMarker(){this.entries.unshift(A0)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Nn.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Nn.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(A0);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Nn.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Nn.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Nn.Element&&n.element===t)}}const nr={createDocument(){return{nodeName:"#document",mode:nn.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};nr.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(nr.isTextNode(n)){n.value+=t;return}}nr.appendChild(e,nr.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&nr.isTextNode(r)?r.value+=t:nr.insertBefore(e,nr.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}}},kg="html",xC="about:legacy-compat",_C="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Sg=["+//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//"],kC=[...Sg,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],SC=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Cg=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],CC=[...Cg,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function w0(e,t){return t.some(n=>e.startsWith(n))}function NC(e){return e.name===kg&&e.publicId===null&&(e.systemId===null||e.systemId===xC)}function AC(e){if(e.name!==kg)return nn.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===_C)return nn.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),SC.has(n))return nn.QUIRKS;let r=t===null?kC:Sg;if(w0(n,r))return nn.QUIRKS;if(r=t===null?Cg:CC,w0(n,r))return nn.LIMITED_QUIRKS}return nn.NO_QUIRKS}const v0={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},wC="definitionurl",vC="definitionURL",IC=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])),LC=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:Y.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:Y.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:Y.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:Y.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:Y.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:Y.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:Y.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:Y.XML}],["xml:space",{prefix:"xml",name:"space",namespace:Y.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:Y.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:Y.XMLNS}]]),DC=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])),RC=new Set([d.B,d.BIG,d.BLOCKQUOTE,d.BODY,d.BR,d.CENTER,d.CODE,d.DD,d.DIV,d.DL,d.DT,d.EM,d.EMBED,d.H1,d.H2,d.H3,d.H4,d.H5,d.H6,d.HEAD,d.HR,d.I,d.IMG,d.LI,d.LISTING,d.MENU,d.META,d.NOBR,d.OL,d.P,d.PRE,d.RUBY,d.S,d.SMALL,d.SPAN,d.STRONG,d.STRIKE,d.SUB,d.SUP,d.TABLE,d.TT,d.U,d.UL,d.VAR]);function OC(e){const t=e.tagID;return t===d.FONT&&e.attrs.some(({name:r})=>r===Fr.COLOR||r===Fr.SIZE||r===Fr.FACE)||RC.has(t)}function Ng(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===wC){e.attrs[t].name=vC;break}}function Ag(e){for(let t=0;t<e.attrs.length;t++){const n=IC.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Vd(e){for(let t=0;t<e.attrs.length;t++){const n=LC.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 PC(e){const t=DC.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=zi(e.tagName))}function MC(e,t){return t===Y.MATHML&&(e===d.MI||e===d.MO||e===d.MN||e===d.MS||e===d.MTEXT)}function FC(e,t,n){if(t===Y.MATHML&&e===d.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===Fr.ENCODING){const i=n[r].value.toLowerCase();return i===v0.TEXT_HTML||i===v0.APPLICATION_XML}}return t===Y.SVG&&(e===d.FOREIGN_OBJECT||e===d.DESC||e===d.TITLE)}function jC(e,t,n,r){return(!r||r===Y.HTML)&&FC(e,t,n)||(!r||r===Y.MATHML)&&MC(e,t)}const BC="hidden",UC=8,HC=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 zC={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},wg=new Set([d.TABLE,d.TBODY,d.TFOOT,d.THEAD,d.TR]),I0={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:nr,onParseError:null};class L0{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={...I0,...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 fC(this.options,this),this.activeFormattingElements=new bC(this.treeAdapter),this.fragmentContextID=r?zi(this.treeAdapter.getTagName(r)):d.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new yC(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={...I0,...n};t??(t=r.treeAdapter.createElement(M.TEMPLATE,Y.HTML,[]));const i=r.treeAdapter.createElement("documentmock",Y.HTML,[]),s=new this(r,i,t);return s.fragmentContextID===d.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:zC,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)===Y.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,Y.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=Xe.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)===M.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==Y.HTML))switch(this.fragmentContextID){case d.TITLE:case d.TEXTAREA:{this.tokenizer.state=Xe.RCDATA;break}case d.STYLE:case d.XMP:case d.IFRAME:case d.NOEMBED:case d.NOFRAMES:case d.NOSCRIPT:{this.tokenizer.state=Xe.RAWTEXT;break}case d.SCRIPT:{this.tokenizer.state=Xe.SCRIPT_DATA;break}case d.PLAINTEXT:{this.tokenizer.state=Xe.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,Y.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,Y.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(M.HTML,Y.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,d.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:c,endOffset:f}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(a,{endLine:l,endCol:c,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===_e.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===d.SVG&&this.treeAdapter.getTagName(n)===M.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===Y.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===d.MGLYPH||t.tagID===d.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,Y.HTML)}_processToken(t){switch(t.type){case _e.CHARACTER:{this.onCharacter(t);break}case _e.NULL_CHARACTER:{this.onNullCharacter(t);break}case _e.COMMENT:{this.onComment(t);break}case _e.DOCTYPE:{this.onDoctype(t);break}case _e.START_TAG:{this._processStartTag(t);break}case _e.END_TAG:{this.onEndTag(t);break}case _e.EOF:{this.onEof(t);break}case _e.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const i=this.treeAdapter.getNamespaceURI(n),s=this.treeAdapter.getAttrList(n);return jC(t,i,s,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(i=>i.type===Nn.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(d.P),this.openElements.popUntilTagNamePopped(d.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case d.TR:{this.insertionMode=A.IN_ROW;return}case d.TBODY:case d.THEAD:case d.TFOOT:{this.insertionMode=A.IN_TABLE_BODY;return}case d.CAPTION:{this.insertionMode=A.IN_CAPTION;return}case d.COLGROUP:{this.insertionMode=A.IN_COLUMN_GROUP;return}case d.TABLE:{this.insertionMode=A.IN_TABLE;return}case d.BODY:{this.insertionMode=A.IN_BODY;return}case d.FRAMESET:{this.insertionMode=A.IN_FRAMESET;return}case d.SELECT:{this._resetInsertionModeForSelect(t);return}case d.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case d.HTML:{this.insertionMode=this.headElement?A.AFTER_HEAD:A.BEFORE_HEAD;return}case d.TD:case d.TH:{if(t>0){this.insertionMode=A.IN_CELL;return}break}case d.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===d.TEMPLATE)break;if(r===d.TABLE){this.insertionMode=A.IN_SELECT_IN_TABLE;return}}this.insertionMode=A.IN_SELECT}_isElementCausesFosterParenting(t){return wg.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 d.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===Y.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case d.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 lC[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){TA(this,t);return}switch(this.insertionMode){case A.INITIAL:{ss(this,t);break}case A.BEFORE_HTML:{Cs(this,t);break}case A.BEFORE_HEAD:{Ns(this,t);break}case A.IN_HEAD:{As(this,t);break}case A.IN_HEAD_NO_SCRIPT:{ws(this,t);break}case A.AFTER_HEAD:{vs(this,t);break}case A.IN_BODY:case A.IN_CAPTION:case A.IN_CELL:case A.IN_TEMPLATE:{Ig(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:{fo(this,t);break}case A.IN_TABLE_TEXT:{Mg(this,t);break}case A.IN_COLUMN_GROUP:{Pu(this,t);break}case A.AFTER_BODY:{Mu(this,t);break}case A.AFTER_AFTER_BODY:{ru(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){EA(this,t);return}switch(this.insertionMode){case A.INITIAL:{ss(this,t);break}case A.BEFORE_HTML:{Cs(this,t);break}case A.BEFORE_HEAD:{Ns(this,t);break}case A.IN_HEAD:{As(this,t);break}case A.IN_HEAD_NO_SCRIPT:{ws(this,t);break}case A.AFTER_HEAD:{vs(this,t);break}case A.TEXT:{this._insertCharacters(t);break}case A.IN_TABLE:case A.IN_TABLE_BODY:case A.IN_ROW:{fo(this,t);break}case A.IN_COLUMN_GROUP:{Pu(this,t);break}case A.AFTER_BODY:{Mu(this,t);break}case A.AFTER_AFTER_BODY:{ru(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Ac(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:{Ac(this,t);break}case A.IN_TABLE_TEXT:{as(this,t);break}case A.AFTER_BODY:{GC(this,t);break}case A.AFTER_AFTER_BODY:case A.AFTER_AFTER_FRAMESET:{KC(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case A.INITIAL:{XC(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:{as(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)?yA(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case A.INITIAL:{ss(this,t);break}case A.BEFORE_HTML:{JC(this,t);break}case A.BEFORE_HEAD:{eN(this,t);break}case A.IN_HEAD:{yn(this,t);break}case A.IN_HEAD_NO_SCRIPT:{rN(this,t);break}case A.AFTER_HEAD:{sN(this,t);break}case A.IN_BODY:{_t(this,t);break}case A.IN_TABLE:{Pi(this,t);break}case A.IN_TABLE_TEXT:{as(this,t);break}case A.IN_CAPTION:{tA(this,t);break}case A.IN_COLUMN_GROUP:{Qd(this,t);break}case A.IN_TABLE_BODY:{yl(this,t);break}case A.IN_ROW:{bl(this,t);break}case A.IN_CELL:{iA(this,t);break}case A.IN_SELECT:{Bg(this,t);break}case A.IN_SELECT_IN_TABLE:{aA(this,t);break}case A.IN_TEMPLATE:{lA(this,t);break}case A.AFTER_BODY:{cA(this,t);break}case A.IN_FRAMESET:{dA(this,t);break}case A.AFTER_FRAMESET:{hA(this,t);break}case A.AFTER_AFTER_BODY:{pA(this,t);break}case A.AFTER_AFTER_FRAMESET:{gA(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?bA(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case A.INITIAL:{ss(this,t);break}case A.BEFORE_HTML:{ZC(this,t);break}case A.BEFORE_HEAD:{tN(this,t);break}case A.IN_HEAD:{nN(this,t);break}case A.IN_HEAD_NO_SCRIPT:{iN(this,t);break}case A.AFTER_HEAD:{aN(this,t);break}case A.IN_BODY:{Tl(this,t);break}case A.TEXT:{VN(this,t);break}case A.IN_TABLE:{Zs(this,t);break}case A.IN_TABLE_TEXT:{as(this,t);break}case A.IN_CAPTION:{nA(this,t);break}case A.IN_COLUMN_GROUP:{rA(this,t);break}case A.IN_TABLE_BODY:{wc(this,t);break}case A.IN_ROW:{jg(this,t);break}case A.IN_CELL:{sA(this,t);break}case A.IN_SELECT:{Ug(this,t);break}case A.IN_SELECT_IN_TABLE:{uA(this,t);break}case A.IN_TEMPLATE:{oA(this,t);break}case A.AFTER_BODY:{zg(this,t);break}case A.IN_FRAMESET:{fA(this,t);break}case A.AFTER_FRAMESET:{mA(this,t);break}case A.AFTER_AFTER_BODY:{ru(this,t);break}}}onEof(t){switch(this.insertionMode){case A.INITIAL:{ss(this,t);break}case A.BEFORE_HTML:{Cs(this,t);break}case A.BEFORE_HEAD:{Ns(this,t);break}case A.IN_HEAD:{As(this,t);break}case A.IN_HEAD_NO_SCRIPT:{ws(this,t);break}case A.AFTER_HEAD:{vs(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:{Og(this,t);break}case A.TEXT:{WN(this,t);break}case A.IN_TABLE_TEXT:{as(this,t);break}case A.IN_TEMPLATE:{Hg(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:{qd(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===_.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:{vg(this,t);break}case A.IN_TABLE:case A.IN_TABLE_BODY:case A.IN_ROW:{fo(this,t);break}case A.IN_TABLE_TEXT:{Pg(this,t);break}}}}function $C(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):Rg(e,t),n}function YC(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 VC(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>=HC;!u||l?(l&&e.activeFormattingElements.removeEntry(u),e.openElements.remove(a)):(a=WC(e,u),r===t&&(e.activeFormattingElements.bookmark=u),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(a,r),r=a)}return r}function WC(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 qC(e,t,n){const r=e.treeAdapter.getTagName(t),i=zi(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const s=e.treeAdapter.getNamespaceURI(t);i===d.TEMPLATE&&s===Y.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function QC(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 Wd(e,t){for(let n=0;n<UC;n++){const r=$C(e,t);if(!r)break;const i=YC(e,r);if(!i)break;e.activeFormattingElements.bookmark=r;const s=VC(e,i,r.element),a=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(s),a&&qC(e,a,s),QC(e,i,r)}}function Ac(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function GC(e,t){e._appendCommentNode(t,e.openElements.items[0])}function KC(e,t){e._appendCommentNode(t,e.document)}function qd(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 XC(e,t){e._setDocumentType(t);const n=t.forceQuirks?nn.QUIRKS:AC(t);NC(t)||e._err(t,U.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=A.BEFORE_HTML}function ss(e,t){e._err(t,U.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,nn.QUIRKS),e.insertionMode=A.BEFORE_HTML,e._processToken(t)}function JC(e,t){t.tagID===d.HTML?(e._insertElement(t,Y.HTML),e.insertionMode=A.BEFORE_HEAD):Cs(e,t)}function ZC(e,t){const n=t.tagID;(n===d.HTML||n===d.HEAD||n===d.BODY||n===d.BR)&&Cs(e,t)}function Cs(e,t){e._insertFakeRootElement(),e.insertionMode=A.BEFORE_HEAD,e._processToken(t)}function eN(e,t){switch(t.tagID){case d.HTML:{_t(e,t);break}case d.HEAD:{e._insertElement(t,Y.HTML),e.headElement=e.openElements.current,e.insertionMode=A.IN_HEAD;break}default:Ns(e,t)}}function tN(e,t){const n=t.tagID;n===d.HEAD||n===d.BODY||n===d.HTML||n===d.BR?Ns(e,t):e._err(t,U.endTagWithoutMatchingOpenElement)}function Ns(e,t){e._insertFakeElement(M.HEAD,d.HEAD),e.headElement=e.openElements.current,e.insertionMode=A.IN_HEAD,e._processToken(t)}function yn(e,t){switch(t.tagID){case d.HTML:{_t(e,t);break}case d.BASE:case d.BASEFONT:case d.BGSOUND:case d.LINK:case d.META:{e._appendElement(t,Y.HTML),t.ackSelfClosing=!0;break}case d.TITLE:{e._switchToTextParsing(t,Xe.RCDATA);break}case d.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Xe.RAWTEXT):(e._insertElement(t,Y.HTML),e.insertionMode=A.IN_HEAD_NO_SCRIPT);break}case d.NOFRAMES:case d.STYLE:{e._switchToTextParsing(t,Xe.RAWTEXT);break}case d.SCRIPT:{e._switchToTextParsing(t,Xe.SCRIPT_DATA);break}case d.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=A.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(A.IN_TEMPLATE);break}case d.HEAD:{e._err(t,U.misplacedStartTagForHeadElement);break}default:As(e,t)}}function nN(e,t){switch(t.tagID){case d.HEAD:{e.openElements.pop(),e.insertionMode=A.AFTER_HEAD;break}case d.BODY:case d.BR:case d.HTML:{As(e,t);break}case d.TEMPLATE:{Qr(e,t);break}default:e._err(t,U.endTagWithoutMatchingOpenElement)}}function Qr(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==d.TEMPLATE&&e._err(t,U.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(d.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,U.endTagWithoutMatchingOpenElement)}function As(e,t){e.openElements.pop(),e.insertionMode=A.AFTER_HEAD,e._processToken(t)}function rN(e,t){switch(t.tagID){case d.HTML:{_t(e,t);break}case d.BASEFONT:case d.BGSOUND:case d.HEAD:case d.LINK:case d.META:case d.NOFRAMES:case d.STYLE:{yn(e,t);break}case d.NOSCRIPT:{e._err(t,U.nestedNoscriptInHead);break}default:ws(e,t)}}function iN(e,t){switch(t.tagID){case d.NOSCRIPT:{e.openElements.pop(),e.insertionMode=A.IN_HEAD;break}case d.BR:{ws(e,t);break}default:e._err(t,U.endTagWithoutMatchingOpenElement)}}function ws(e,t){const n=t.type===_e.EOF?U.openElementsLeftAfterEof:U.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=A.IN_HEAD,e._processToken(t)}function sN(e,t){switch(t.tagID){case d.HTML:{_t(e,t);break}case d.BODY:{e._insertElement(t,Y.HTML),e.framesetOk=!1,e.insertionMode=A.IN_BODY;break}case d.FRAMESET:{e._insertElement(t,Y.HTML),e.insertionMode=A.IN_FRAMESET;break}case d.BASE:case d.BASEFONT:case d.BGSOUND:case d.LINK:case d.META:case d.NOFRAMES:case d.SCRIPT:case d.STYLE:case d.TEMPLATE:case d.TITLE:{e._err(t,U.abandonedHeadElementChild),e.openElements.push(e.headElement,d.HEAD),yn(e,t),e.openElements.remove(e.headElement);break}case d.HEAD:{e._err(t,U.misplacedStartTagForHeadElement);break}default:vs(e,t)}}function aN(e,t){switch(t.tagID){case d.BODY:case d.HTML:case d.BR:{vs(e,t);break}case d.TEMPLATE:{Qr(e,t);break}default:e._err(t,U.endTagWithoutMatchingOpenElement)}}function vs(e,t){e._insertFakeElement(M.BODY,d.BODY),e.insertionMode=A.IN_BODY,El(e,t)}function El(e,t){switch(t.type){case _e.CHARACTER:{Ig(e,t);break}case _e.WHITESPACE_CHARACTER:{vg(e,t);break}case _e.COMMENT:{Ac(e,t);break}case _e.START_TAG:{_t(e,t);break}case _e.END_TAG:{Tl(e,t);break}case _e.EOF:{Og(e,t);break}}}function vg(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Ig(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function uN(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function lN(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function oN(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,Y.HTML),e.insertionMode=A.IN_FRAMESET)}function cN(e,t){e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._insertElement(t,Y.HTML)}function dN(e,t){e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Nc.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,Y.HTML)}function fN(e,t){e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._insertElement(t,Y.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function hN(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._insertElement(t,Y.HTML),n||(e.formElement=e.openElements.current))}function mN(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===d.LI&&i===d.LI||(n===d.DD||n===d.DT)&&(i===d.DD||i===d.DT)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i);break}if(i!==d.ADDRESS&&i!==d.DIV&&i!==d.P&&e._isSpecialElement(e.openElements.items[r],i))break}e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._insertElement(t,Y.HTML)}function pN(e,t){e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._insertElement(t,Y.HTML),e.tokenizer.state=Xe.PLAINTEXT}function gN(e,t){e.openElements.hasInScope(d.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(d.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,Y.HTML),e.framesetOk=!1}function EN(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(M.A);n&&(Wd(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,Y.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function TN(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Y.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function yN(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(d.NOBR)&&(Wd(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,Y.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function bN(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Y.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function xN(e,t){e.treeAdapter.getDocumentMode(e.document)!==nn.QUIRKS&&e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._insertElement(t,Y.HTML),e.framesetOk=!1,e.insertionMode=A.IN_TABLE}function Lg(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,Y.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Dg(e){const t=bg(e,Fr.TYPE);return t!=null&&t.toLowerCase()===BC}function _N(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,Y.HTML),Dg(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function kN(e,t){e._appendElement(t,Y.HTML),t.ackSelfClosing=!0}function SN(e,t){e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._appendElement(t,Y.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function CN(e,t){t.tagName=M.IMG,t.tagID=d.IMG,Lg(e,t)}function NN(e,t){e._insertElement(t,Y.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Xe.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=A.TEXT}function AN(e,t){e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Xe.RAWTEXT)}function wN(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Xe.RAWTEXT)}function D0(e,t){e._switchToTextParsing(t,Xe.RAWTEXT)}function vN(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Y.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 IN(e,t){e.openElements.currentTagId===d.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,Y.HTML)}function LN(e,t){e.openElements.hasInScope(d.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,Y.HTML)}function DN(e,t){e.openElements.hasInScope(d.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(d.RTC),e._insertElement(t,Y.HTML)}function RN(e,t){e._reconstructActiveFormattingElements(),Ng(t),Vd(t),t.selfClosing?e._appendElement(t,Y.MATHML):e._insertElement(t,Y.MATHML),t.ackSelfClosing=!0}function ON(e,t){e._reconstructActiveFormattingElements(),Ag(t),Vd(t),t.selfClosing?e._appendElement(t,Y.SVG):e._insertElement(t,Y.SVG),t.ackSelfClosing=!0}function R0(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Y.HTML)}function _t(e,t){switch(t.tagID){case d.I:case d.S:case d.B:case d.U:case d.EM:case d.TT:case d.BIG:case d.CODE:case d.FONT:case d.SMALL:case d.STRIKE:case d.STRONG:{TN(e,t);break}case d.A:{EN(e,t);break}case d.H1:case d.H2:case d.H3:case d.H4:case d.H5:case d.H6:{dN(e,t);break}case d.P:case d.DL:case d.OL:case d.UL:case d.DIV:case d.DIR:case d.NAV:case d.MAIN:case d.MENU:case d.ASIDE:case d.CENTER:case d.FIGURE:case d.FOOTER:case d.HEADER:case d.HGROUP:case d.DIALOG:case d.DETAILS:case d.ADDRESS:case d.ARTICLE:case d.SEARCH:case d.SECTION:case d.SUMMARY:case d.FIELDSET:case d.BLOCKQUOTE:case d.FIGCAPTION:{cN(e,t);break}case d.LI:case d.DD:case d.DT:{mN(e,t);break}case d.BR:case d.IMG:case d.WBR:case d.AREA:case d.EMBED:case d.KEYGEN:{Lg(e,t);break}case d.HR:{SN(e,t);break}case d.RB:case d.RTC:{LN(e,t);break}case d.RT:case d.RP:{DN(e,t);break}case d.PRE:case d.LISTING:{fN(e,t);break}case d.XMP:{AN(e,t);break}case d.SVG:{ON(e,t);break}case d.HTML:{uN(e,t);break}case d.BASE:case d.LINK:case d.META:case d.STYLE:case d.TITLE:case d.SCRIPT:case d.BGSOUND:case d.BASEFONT:case d.TEMPLATE:{yn(e,t);break}case d.BODY:{lN(e,t);break}case d.FORM:{hN(e,t);break}case d.NOBR:{yN(e,t);break}case d.MATH:{RN(e,t);break}case d.TABLE:{xN(e,t);break}case d.INPUT:{_N(e,t);break}case d.PARAM:case d.TRACK:case d.SOURCE:{kN(e,t);break}case d.IMAGE:{CN(e,t);break}case d.BUTTON:{gN(e,t);break}case d.APPLET:case d.OBJECT:case d.MARQUEE:{bN(e,t);break}case d.IFRAME:{wN(e,t);break}case d.SELECT:{vN(e,t);break}case d.OPTION:case d.OPTGROUP:{IN(e,t);break}case d.NOEMBED:case d.NOFRAMES:{D0(e,t);break}case d.FRAMESET:{oN(e,t);break}case d.TEXTAREA:{NN(e,t);break}case d.NOSCRIPT:{e.options.scriptingEnabled?D0(e,t):R0(e,t);break}case d.PLAINTEXT:{pN(e,t);break}case d.COL:case d.TH:case d.TD:case d.TR:case d.HEAD:case d.FRAME:case d.TBODY:case d.TFOOT:case d.THEAD:case d.CAPTION:case d.COLGROUP:break;default:R0(e,t)}}function PN(e,t){if(e.openElements.hasInScope(d.BODY)&&(e.insertionMode=A.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function MN(e,t){e.openElements.hasInScope(d.BODY)&&(e.insertionMode=A.AFTER_BODY,zg(e,t))}function FN(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function jN(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(d.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(d.FORM):n&&e.openElements.remove(n))}function BN(e){e.openElements.hasInButtonScope(d.P)||e._insertFakeElement(M.P,d.P),e._closePElement()}function UN(e){e.openElements.hasInListItemScope(d.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(d.LI),e.openElements.popUntilTagNamePopped(d.LI))}function HN(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function zN(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function $N(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function YN(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(M.BR,d.BR),e.openElements.pop(),e.framesetOk=!1}function Rg(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!==d.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 Tl(e,t){switch(t.tagID){case d.A:case d.B:case d.I:case d.S:case d.U:case d.EM:case d.TT:case d.BIG:case d.CODE:case d.FONT:case d.NOBR:case d.SMALL:case d.STRIKE:case d.STRONG:{Wd(e,t);break}case d.P:{BN(e);break}case d.DL:case d.UL:case d.OL:case d.DIR:case d.DIV:case d.NAV:case d.PRE:case d.MAIN:case d.MENU:case d.ASIDE:case d.BUTTON:case d.CENTER:case d.FIGURE:case d.FOOTER:case d.HEADER:case d.HGROUP:case d.DIALOG:case d.ADDRESS:case d.ARTICLE:case d.DETAILS:case d.SEARCH:case d.SECTION:case d.SUMMARY:case d.LISTING:case d.FIELDSET:case d.BLOCKQUOTE:case d.FIGCAPTION:{FN(e,t);break}case d.LI:{UN(e);break}case d.DD:case d.DT:{HN(e,t);break}case d.H1:case d.H2:case d.H3:case d.H4:case d.H5:case d.H6:{zN(e);break}case d.BR:{YN(e);break}case d.BODY:{PN(e,t);break}case d.HTML:{MN(e,t);break}case d.FORM:{jN(e);break}case d.APPLET:case d.OBJECT:case d.MARQUEE:{$N(e,t);break}case d.TEMPLATE:{Qr(e,t);break}default:Rg(e,t)}}function Og(e,t){e.tmplInsertionModeStack.length>0?Hg(e,t):qd(e,t)}function VN(e,t){var n;t.tagID===d.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function WN(e,t){e._err(t,U.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function fo(e,t){if(e.openElements.currentTagId!==void 0&&wg.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 _e.CHARACTER:{Mg(e,t);break}case _e.WHITESPACE_CHARACTER:{Pg(e,t);break}}else fa(e,t)}function qN(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,Y.HTML),e.insertionMode=A.IN_CAPTION}function QN(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,Y.HTML),e.insertionMode=A.IN_COLUMN_GROUP}function GN(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(M.COLGROUP,d.COLGROUP),e.insertionMode=A.IN_COLUMN_GROUP,Qd(e,t)}function KN(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,Y.HTML),e.insertionMode=A.IN_TABLE_BODY}function XN(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(M.TBODY,d.TBODY),e.insertionMode=A.IN_TABLE_BODY,yl(e,t)}function JN(e,t){e.openElements.hasInTableScope(d.TABLE)&&(e.openElements.popUntilTagNamePopped(d.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function ZN(e,t){Dg(t)?e._appendElement(t,Y.HTML):fa(e,t),t.ackSelfClosing=!0}function eA(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,Y.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Pi(e,t){switch(t.tagID){case d.TD:case d.TH:case d.TR:{XN(e,t);break}case d.STYLE:case d.SCRIPT:case d.TEMPLATE:{yn(e,t);break}case d.COL:{GN(e,t);break}case d.FORM:{eA(e,t);break}case d.TABLE:{JN(e,t);break}case d.TBODY:case d.TFOOT:case d.THEAD:{KN(e,t);break}case d.INPUT:{ZN(e,t);break}case d.CAPTION:{qN(e,t);break}case d.COLGROUP:{QN(e,t);break}default:fa(e,t)}}function Zs(e,t){switch(t.tagID){case d.TABLE:{e.openElements.hasInTableScope(d.TABLE)&&(e.openElements.popUntilTagNamePopped(d.TABLE),e._resetInsertionMode());break}case d.TEMPLATE:{Qr(e,t);break}case d.BODY:case d.CAPTION:case d.COL:case d.COLGROUP:case d.HTML:case d.TBODY:case d.TD:case d.TFOOT:case d.TH:case d.THEAD:case d.TR:break;default:fa(e,t)}}function fa(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,El(e,t),e.fosterParentingEnabled=n}function Pg(e,t){e.pendingCharacterTokens.push(t)}function Mg(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function as(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)fa(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const Fg=new Set([d.CAPTION,d.COL,d.COLGROUP,d.TBODY,d.TD,d.TFOOT,d.TH,d.THEAD,d.TR]);function tA(e,t){const n=t.tagID;Fg.has(n)?e.openElements.hasInTableScope(d.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(d.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=A.IN_TABLE,Pi(e,t)):_t(e,t)}function nA(e,t){const n=t.tagID;switch(n){case d.CAPTION:case d.TABLE:{e.openElements.hasInTableScope(d.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(d.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=A.IN_TABLE,n===d.TABLE&&Zs(e,t));break}case d.BODY:case d.COL:case d.COLGROUP:case d.HTML:case d.TBODY:case d.TD:case d.TFOOT:case d.TH:case d.THEAD:case d.TR:break;default:Tl(e,t)}}function Qd(e,t){switch(t.tagID){case d.HTML:{_t(e,t);break}case d.COL:{e._appendElement(t,Y.HTML),t.ackSelfClosing=!0;break}case d.TEMPLATE:{yn(e,t);break}default:Pu(e,t)}}function rA(e,t){switch(t.tagID){case d.COLGROUP:{e.openElements.currentTagId===d.COLGROUP&&(e.openElements.pop(),e.insertionMode=A.IN_TABLE);break}case d.TEMPLATE:{Qr(e,t);break}case d.COL:break;default:Pu(e,t)}}function Pu(e,t){e.openElements.currentTagId===d.COLGROUP&&(e.openElements.pop(),e.insertionMode=A.IN_TABLE,e._processToken(t))}function yl(e,t){switch(t.tagID){case d.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,Y.HTML),e.insertionMode=A.IN_ROW;break}case d.TH:case d.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(M.TR,d.TR),e.insertionMode=A.IN_ROW,bl(e,t);break}case d.CAPTION:case d.COL:case d.COLGROUP:case d.TBODY:case d.TFOOT:case d.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=A.IN_TABLE,Pi(e,t));break}default:Pi(e,t)}}function wc(e,t){const n=t.tagID;switch(t.tagID){case d.TBODY:case d.TFOOT:case d.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=A.IN_TABLE);break}case d.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=A.IN_TABLE,Zs(e,t));break}case d.BODY:case d.CAPTION:case d.COL:case d.COLGROUP:case d.HTML:case d.TD:case d.TH:case d.TR:break;default:Zs(e,t)}}function bl(e,t){switch(t.tagID){case d.TH:case d.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,Y.HTML),e.insertionMode=A.IN_CELL,e.activeFormattingElements.insertMarker();break}case d.CAPTION:case d.COL:case d.COLGROUP:case d.TBODY:case d.TFOOT:case d.THEAD:case d.TR:{e.openElements.hasInTableScope(d.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=A.IN_TABLE_BODY,yl(e,t));break}default:Pi(e,t)}}function jg(e,t){switch(t.tagID){case d.TR:{e.openElements.hasInTableScope(d.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=A.IN_TABLE_BODY);break}case d.TABLE:{e.openElements.hasInTableScope(d.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=A.IN_TABLE_BODY,wc(e,t));break}case d.TBODY:case d.TFOOT:case d.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(d.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=A.IN_TABLE_BODY,wc(e,t));break}case d.BODY:case d.CAPTION:case d.COL:case d.COLGROUP:case d.HTML:case d.TD:case d.TH:break;default:Zs(e,t)}}function iA(e,t){const n=t.tagID;Fg.has(n)?(e.openElements.hasInTableScope(d.TD)||e.openElements.hasInTableScope(d.TH))&&(e._closeTableCell(),bl(e,t)):_t(e,t)}function sA(e,t){const n=t.tagID;switch(n){case d.TD:case d.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=A.IN_ROW);break}case d.TABLE:case d.TBODY:case d.TFOOT:case d.THEAD:case d.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),jg(e,t));break}case d.BODY:case d.CAPTION:case d.COL:case d.COLGROUP:case d.HTML:break;default:Tl(e,t)}}function Bg(e,t){switch(t.tagID){case d.HTML:{_t(e,t);break}case d.OPTION:{e.openElements.currentTagId===d.OPTION&&e.openElements.pop(),e._insertElement(t,Y.HTML);break}case d.OPTGROUP:{e.openElements.currentTagId===d.OPTION&&e.openElements.pop(),e.openElements.currentTagId===d.OPTGROUP&&e.openElements.pop(),e._insertElement(t,Y.HTML);break}case d.HR:{e.openElements.currentTagId===d.OPTION&&e.openElements.pop(),e.openElements.currentTagId===d.OPTGROUP&&e.openElements.pop(),e._appendElement(t,Y.HTML),t.ackSelfClosing=!0;break}case d.INPUT:case d.KEYGEN:case d.TEXTAREA:case d.SELECT:{e.openElements.hasInSelectScope(d.SELECT)&&(e.openElements.popUntilTagNamePopped(d.SELECT),e._resetInsertionMode(),t.tagID!==d.SELECT&&e._processStartTag(t));break}case d.SCRIPT:case d.TEMPLATE:{yn(e,t);break}}}function Ug(e,t){switch(t.tagID){case d.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===d.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===d.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===d.OPTGROUP&&e.openElements.pop();break}case d.OPTION:{e.openElements.currentTagId===d.OPTION&&e.openElements.pop();break}case d.SELECT:{e.openElements.hasInSelectScope(d.SELECT)&&(e.openElements.popUntilTagNamePopped(d.SELECT),e._resetInsertionMode());break}case d.TEMPLATE:{Qr(e,t);break}}}function aA(e,t){const n=t.tagID;n===d.CAPTION||n===d.TABLE||n===d.TBODY||n===d.TFOOT||n===d.THEAD||n===d.TR||n===d.TD||n===d.TH?(e.openElements.popUntilTagNamePopped(d.SELECT),e._resetInsertionMode(),e._processStartTag(t)):Bg(e,t)}function uA(e,t){const n=t.tagID;n===d.CAPTION||n===d.TABLE||n===d.TBODY||n===d.TFOOT||n===d.THEAD||n===d.TR||n===d.TD||n===d.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(d.SELECT),e._resetInsertionMode(),e.onEndTag(t)):Ug(e,t)}function lA(e,t){switch(t.tagID){case d.BASE:case d.BASEFONT:case d.BGSOUND:case d.LINK:case d.META:case d.NOFRAMES:case d.SCRIPT:case d.STYLE:case d.TEMPLATE:case d.TITLE:{yn(e,t);break}case d.CAPTION:case d.COLGROUP:case d.TBODY:case d.TFOOT:case d.THEAD:{e.tmplInsertionModeStack[0]=A.IN_TABLE,e.insertionMode=A.IN_TABLE,Pi(e,t);break}case d.COL:{e.tmplInsertionModeStack[0]=A.IN_COLUMN_GROUP,e.insertionMode=A.IN_COLUMN_GROUP,Qd(e,t);break}case d.TR:{e.tmplInsertionModeStack[0]=A.IN_TABLE_BODY,e.insertionMode=A.IN_TABLE_BODY,yl(e,t);break}case d.TD:case d.TH:{e.tmplInsertionModeStack[0]=A.IN_ROW,e.insertionMode=A.IN_ROW,bl(e,t);break}default:e.tmplInsertionModeStack[0]=A.IN_BODY,e.insertionMode=A.IN_BODY,_t(e,t)}}function oA(e,t){t.tagID===d.TEMPLATE&&Qr(e,t)}function Hg(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(d.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):qd(e,t)}function cA(e,t){t.tagID===d.HTML?_t(e,t):Mu(e,t)}function zg(e,t){var n;if(t.tagID===d.HTML){if(e.fragmentContext||(e.insertionMode=A.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===d.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 Mu(e,t)}function Mu(e,t){e.insertionMode=A.IN_BODY,El(e,t)}function dA(e,t){switch(t.tagID){case d.HTML:{_t(e,t);break}case d.FRAMESET:{e._insertElement(t,Y.HTML);break}case d.FRAME:{e._appendElement(t,Y.HTML),t.ackSelfClosing=!0;break}case d.NOFRAMES:{yn(e,t);break}}}function fA(e,t){t.tagID===d.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==d.FRAMESET&&(e.insertionMode=A.AFTER_FRAMESET))}function hA(e,t){switch(t.tagID){case d.HTML:{_t(e,t);break}case d.NOFRAMES:{yn(e,t);break}}}function mA(e,t){t.tagID===d.HTML&&(e.insertionMode=A.AFTER_AFTER_FRAMESET)}function pA(e,t){t.tagID===d.HTML?_t(e,t):ru(e,t)}function ru(e,t){e.insertionMode=A.IN_BODY,El(e,t)}function gA(e,t){switch(t.tagID){case d.HTML:{_t(e,t);break}case d.NOFRAMES:{yn(e,t);break}}}function EA(e,t){t.chars=ze,e._insertCharacters(t)}function TA(e,t){e._insertCharacters(t),e.framesetOk=!1}function $g(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==Y.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function yA(e,t){if(OC(t))$g(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===Y.MATHML?Ng(t):r===Y.SVG&&(PC(t),Ag(t)),Vd(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function bA(e,t){if(t.tagID===d.P||t.tagID===d.BR){$g(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)===Y.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}M.AREA,M.BASE,M.BASEFONT,M.BGSOUND,M.BR,M.COL,M.EMBED,M.FRAME,M.HR,M.IMG,M.INPUT,M.KEYGEN,M.LINK,M.META,M.PARAM,M.SOURCE,M.TRACK,M.WBR;const xA=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,_A=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),O0={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Yg(e,t){const n=DA(e),r=pg("type",{handlers:{root:kA,element:SA,text:CA,comment:Wg,doctype:NA,raw:wA},unknown:vA}),i={parser:n?new L0(O0):L0.getFragmentParser(void 0,O0),handle(u){r(u,i)},stitches:!1,options:t||{}};r(e,i),$i(i,Dn());const s=n?i.parser.document:i.parser.getFragment(),a=R3(s,{file:i.options.file});return i.stitches&&gl(a,"comment",function(u,l,c){const f=u;if(f.value.stitch&&c&&l!==void 0){const h=c.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 Vg(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function kA(e,t){Vg(e.children,t)}function SA(e,t){IA(e,t),Vg(e.children,t),LA(e,t)}function CA(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:_e.CHARACTER,chars:e.value,location:ha(e)};$i(t,Dn(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function NA(e,t){const n={type:_e.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:ha(e)};$i(t,Dn(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function AA(e,t){t.stitches=!0;const n=RA(e);if("children"in e&&"children"in n){const r=Yg({type:"root",children:e.children},t.options);n.children=r.children}Wg({type:"comment",value:{stitch:n}},t)}function Wg(e,t){const n=e.value,r={type:_e.COMMENT,data:n,location:ha(e)};$i(t,Dn(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function wA(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,qg(t,Dn(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(xA,"&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 vA(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))AA(n,t);else{let r="";throw _A.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 $i(e,t){qg(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=Xe.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 qg(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 IA(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Xe.PLAINTEXT)return;$i(t,Dn(e));const r=t.parser.openElements.current;let i="namespaceURI"in r?r.namespaceURI:Or.html;i===Or.html&&n==="svg"&&(i=Or.svg);const s=j3({...e,children:[]},{space:i===Or.svg?"svg":"html"}),a={type:_e.START_TAG,tagName:n,tagID:zi(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in s?s.attrs:[],location:ha(e)};t.parser.currentToken=a,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function LA(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&W3.includes(n)||t.parser.tokenizer.state===Xe.PLAINTEXT)return;$i(t,cl(e));const r={type:_e.END_TAG,tagName:n,tagID:zi(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:ha(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Xe.RCDATA||t.parser.tokenizer.state===Xe.RAWTEXT||t.parser.tokenizer.state===Xe.SCRIPT_DATA)&&(t.parser.tokenizer.state=Xe.DATA)}function DA(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function ha(e){const t=Dn(e)||{line:void 0,column:void 0,offset:void 0},n=cl(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 RA(e){return"children"in e?Oi({...e,children:[]}):Oi(e)}function OA(e){return function(t,n){return Yg(t,{...e,file:n})}}function P0(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 PA(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function MA(e,t,n){const i=ml((n||{}).ignore||[]),s=FA(t);let a=-1;for(;++a<s.length;)og(e,"text",u);function u(c,f){let h=-1,m;for(;++h<f.length;){const p=f[h],g=m?m.children:void 0;if(i(p,g?g.indexOf(p):void 0,m))return;m=p}if(m)return l(c,f)}function l(c,f){const h=f[f.length-1],m=s[a][0],p=s[a][1];let g=0;const v=h.children.indexOf(c);let E=!1,T=[];m.lastIndex=0;let x=m.exec(c.value);for(;x;){const D=x.index,F={index:x.index,input:x.input,stack:[...f,c]};let S=p(...x,F);if(typeof S=="string"&&(S=S.length>0?{type:"text",value:S}:void 0),S===!1?m.lastIndex=D+1:(g!==D&&T.push({type:"text",value:c.value.slice(g,D)}),Array.isArray(S)?T.push(...S):S&&T.push(S),g=D+x[0].length,E=!0),!m.global)break;x=m.exec(c.value)}return E?(g<c.value.length&&T.push({type:"text",value:c.value.slice(g)}),h.children.splice(v,1,...T)):T=[c],v+T.length}}function FA(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([jA(i[0]),BA(i[1])])}return t}function jA(e){return typeof e=="string"?new RegExp(PA(e),"g"):e}function BA(e){return typeof e=="function"?e:function(){return e}}const ho="phrasing",mo=["autolink","link","image","label"];function UA(){return{transforms:[qA],enter:{literalAutolink:zA,literalAutolinkEmail:po,literalAutolinkHttp:po,literalAutolinkWww:po},exit:{literalAutolink:WA,literalAutolinkEmail:VA,literalAutolinkHttp:$A,literalAutolinkWww:YA}}}function HA(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:ho,notInConstruct:mo},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:ho,notInConstruct:mo},{character:":",before:"[ps]",after:"\\/",inConstruct:ho,notInConstruct:mo}]}}function zA(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function po(e){this.config.enter.autolinkProtocol.call(this,e)}function $A(e){this.config.exit.autolinkProtocol.call(this,e)}function YA(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 VA(e){this.config.exit.autolinkEmail.call(this,e)}function WA(e){this.exit(e)}function qA(e){MA(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,QA],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),GA]],{ignore:["link","linkReference"]})}function QA(e,t,n,r,i){let s="";if(!Qg(i)||(/^w/i.test(t)&&(n=t+n,t="",s="http://"),!KA(n)))return!1;const a=XA(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 GA(e,t,n,r){return!Qg(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function KA(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 XA(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=P0(e,"(");let s=P0(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 Qg(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Yr(n)||dl(n))&&(!t||n!==47)}Gg.peek=aw;function JA(){this.buffer()}function ZA(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function ew(){this.buffer()}function tw(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function nw(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=En(this.sliceSerialize(e)).toLowerCase(),n.label=t}function rw(e){this.exit(e)}function iw(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=En(this.sliceSerialize(e)).toLowerCase(),n.label=t}function sw(e){this.exit(e)}function aw(){return"["}function Gg(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 uw(){return{enter:{gfmFootnoteCallString:JA,gfmFootnoteCall:ZA,gfmFootnoteDefinitionLabelString:ew,gfmFootnoteDefinition:tw},exit:{gfmFootnoteCallString:nw,gfmFootnoteCall:rw,gfmFootnoteDefinitionLabelString:iw,gfmFootnoteDefinition:sw}}}function lw(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Gg},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,s,a){const u=s.createTracker(a);let l=u.move("[^");const c=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?Kg:ow))),c(),l}}function ow(e,t,n){return t===0?e:Kg(e,t,n)}function Kg(e,t,n){return(n?"":" ")+e}const cw=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Xg.peek=pw;function dw(){return{canContainEols:["delete"],enter:{strikethrough:hw},exit:{strikethrough:mw}}}function fw(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:cw}],handlers:{delete:Xg}}}function hw(e){this.enter({type:"delete",children:[]},e)}function mw(e){this.exit(e)}function Xg(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 pw(){return"~"}function gw(e){return e.length}function Ew(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||gw,s=[],a=[],u=[],l=[];let c=0,f=-1;for(;++f<e.length;){const b=[],v=[];let E=-1;for(e[f].length>c&&(c=e[f].length);++E<e[f].length;){const T=Tw(e[f][E]);if(n.alignDelimiters!==!1){const x=i(T);v[E]=x,(l[E]===void 0||x>l[E])&&(l[E]=x)}b.push(T)}a[f]=b,u[f]=v}let h=-1;if(typeof r=="object"&&"length"in r)for(;++h<c;)s[h]=M0(r[h]);else{const b=M0(r);for(;++h<c;)s[h]=b}h=-1;const m=[],p=[];for(;++h<c;){const b=s[h];let v="",E="";b===99?(v=":",E=":"):b===108?v=":":b===114&&(E=":");let T=n.alignDelimiters===!1?1:Math.max(1,l[h]-v.length-E.length);const x=v+"-".repeat(T)+E;n.alignDelimiters!==!1&&(T=v.length+T+E.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 g=[];for(;++f<a.length;){const b=a[f],v=u[f];h=-1;const E=[];for(;++h<c;){const T=b[h]||"";let x="",D="";if(n.alignDelimiters!==!1){const F=l[h]-(v[h]||0),S=s[h];S===114?x=" ".repeat(F):S===99?F%2?(x=" ".repeat(F/2+.5),D=" ".repeat(F/2-.5)):(x=" ".repeat(F/2),D=x):D=" ".repeat(F)}n.delimiterStart!==!1&&!h&&E.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&T==="")&&(n.delimiterStart!==!1||h)&&E.push(" "),n.alignDelimiters!==!1&&E.push(x),E.push(T),n.alignDelimiters!==!1&&E.push(D),n.padding!==!1&&E.push(" "),(n.delimiterEnd!==!1||h!==c-1)&&E.push("|")}g.push(n.delimiterEnd===!1?E.join("").replace(/ +$/,""):E.join(""))}return g.join(`
399
- `)}function Tw(e){return e==null?"":String(e)}function M0(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 yw(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()),bw);return i(),a}function bw(e,t,n){return">"+(n?"":" ")+e}function xw(e,t){return F0(e,t.inConstruct,!0)&&!F0(e,t.notInConstruct,!1)}function F0(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 j0(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
400
- `&&xw(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
401
- `}function _w(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 kw(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 Sw(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 Cw(e,t,n,r){const i=Sw(n),s=e.value||"",a=i==="`"?"GraveAccent":"Tilde";if(kw(e,n)){const h=n.enter("codeIndented"),m=n.indentLines(s,Nw);return h(),m}const u=n.createTracker(r),l=i.repeat(Math.max(_w(s,i)+1,3)),c=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),c(),f}function Nw(e,t,n){return(n?"":" ")+e}function Gd(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 Aw(e,t,n,r){const i=Gd(n),s=i==='"'?"Quote":"Apostrophe",a=n.enter("definition");let u=n.enter("label");const l=n.createTracker(r);let c=l.move("[");return c+=l.move(n.safe(n.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),u(),!e.url||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(u=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":`
405
- `,...l.current()}))),u(),e.title&&(u=n.enter(`title${s}`),c+=l.move(" "+i),c+=l.move(n.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),u()),a(),c}function ww(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 ea(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Fu(e,t,n){const r=Ri(e),i=Ri(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}}Jg.peek=vw;function Jg(e,t,n,r){const i=ww(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 c=l.charCodeAt(0),f=Fu(r.before.charCodeAt(r.before.length-1),c,i);f.inside&&(l=ea(c)+l.slice(1));const h=l.charCodeAt(l.length-1),m=Fu(r.after.charCodeAt(0),h,i);m.inside&&(l=l.slice(0,-1)+ea(h));const p=a.move(i);return s(),n.attentionEncodeSurroundingInfo={after:m.outside,before:f.outside},u+l+p}function vw(e,t,n){return n.options.emphasis||"*"}function Iw(e,t){let n=!1;return gl(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,bc}),!!((!e.depth||e.depth<3)&&Pd(e)&&(t.options.setext||n))}function Lw(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),s=n.createTracker(r);if(Iw(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 c=n.containerPhrasing(e,{before:"# ",after:`
410
- `,...s.current()});return/^[\t ]/.test(c)&&(c=ea(c.charCodeAt(0))+c.slice(1)),c=c?a+" "+c:a,n.options.closeAtx&&(c+=" "+a),l(),u(),c}Zg.peek=Dw;function Zg(e){return e.value||""}function Dw(){return"<"}eE.peek=Rw;function eE(e,t,n,r){const i=Gd(n),s=i==='"'?"Quote":"Apostrophe",a=n.enter("image");let u=n.enter("label");const l=n.createTracker(r);let c=l.move("![");return c+=l.move(n.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(u=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),u(),e.title&&(u=n.enter(`title${s}`),c+=l.move(" "+i),c+=l.move(n.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),u()),c+=l.move(")"),a(),c}function Rw(){return"!"}tE.peek=Ow;function tE(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 c=n.safe(e.alt,{before:l,after:"]",...u.current()});l+=u.move(c+"]["),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"||!c||c!==h?l+=u.move(h+"]"):i==="shortcut"?l=l.slice(0,-1):l+=u.move("]"),l}function Ow(){return"!"}nE.peek=Pw;function nE(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 c=l.index;r.charCodeAt(c)===10&&r.charCodeAt(c-1)===13&&c--,r=r.slice(0,c)+" "+r.slice(l.index+1)}}return i+r+i}function Pw(){return"`"}function rE(e,t){const n=Pd(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))}iE.peek=Mw;function iE(e,t,n,r){const i=Gd(n),s=i==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let u,l;if(rE(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 c=a.move("[");return c+=a.move(n.containerPhrasing(e,{before:c,after:"](",...a.current()})),c+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=a.move("<"),c+=a.move(n.safe(e.url,{before:c,after:">",...a.current()})),c+=a.move(">")):(l=n.enter("destinationRaw"),c+=a.move(n.safe(e.url,{before:c,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=n.enter(`title${s}`),c+=a.move(" "+i),c+=a.move(n.safe(e.title,{before:c,after:i,...a.current()})),c+=a.move(i),l()),c+=a.move(")"),u(),c}function Mw(e,t,n){return rE(e,n)?"<":"["}sE.peek=Fw;function sE(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 c=n.containerPhrasing(e,{before:l,after:"]",...u.current()});l+=u.move(c+"]["),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"||!c||c!==h?l+=u.move(h+"]"):i==="shortcut"?l=l.slice(0,-1):l+=u.move("]"),l}function Fw(){return"["}function Kd(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 jw(e){const t=Kd(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 Bw(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 aE(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 Uw(e,t,n,r){const i=n.enter("list"),s=n.bulletCurrent;let a=e.ordered?Bw(n):Kd(n);const u=e.ordered?a==="."?")":".":jw(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),aE(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 c=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=s,i(),c}function Hw(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 zw(e,t,n,r){const i=Hw(n);let s=n.bulletCurrent||Kd(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"),c=n.indentLines(n.containerFlow(e,u.current()),f);return l(),c;function f(h,m,p){return m?(p?"":" ".repeat(a))+h:(p?s:s+" ".repeat(a-s.length))+h}}function $w(e,t,n,r){const i=n.enter("paragraph"),s=n.enter("phrasing"),a=n.containerPhrasing(e,r);return s(),i(),a}const Yw=ml(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Vw(e,t,n,r){return(e.children.some(function(a){return Yw(a)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Ww(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}uE.peek=qw;function uE(e,t,n,r){const i=Ww(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 c=l.charCodeAt(0),f=Fu(r.before.charCodeAt(r.before.length-1),c,i);f.inside&&(l=ea(c)+l.slice(1));const h=l.charCodeAt(l.length-1),m=Fu(r.after.charCodeAt(0),h,i);m.inside&&(l=l.slice(0,-1)+ea(h));const p=a.move(i+i);return s(),n.attentionEncodeSurroundingInfo={after:m.outside,before:f.outside},u+l+p}function qw(e,t,n){return n.options.strong||"*"}function Qw(e,t,n,r){return n.safe(e.value,r)}function Gw(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 Kw(e,t,n){const r=(aE(n)+(n.options.ruleSpaces?" ":"")).repeat(Gw(n));return n.options.ruleSpaces?r.slice(0,-1):r}const lE={blockquote:yw,break:j0,code:Cw,definition:Aw,emphasis:Jg,hardBreak:j0,heading:Lw,html:Zg,image:eE,imageReference:tE,inlineCode:nE,link:iE,linkReference:sE,list:Uw,listItem:zw,paragraph:$w,root:Vw,strong:uE,text:Qw,thematicBreak:Kw};function Xw(){return{enter:{table:Jw,tableData:B0,tableHeader:B0,tableRow:ev},exit:{codeText:tv,table:Zw,tableData:go,tableHeader:go,tableRow:go}}}function Jw(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 Zw(e){this.exit(e),this.data.inTable=void 0}function ev(e){this.enter({type:"tableRow",children:[]},e)}function go(e){this.exit(e)}function B0(e){this.enter({type:"tableCell",children:[]},e)}function tv(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,nv));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function nv(e,t){return t==="|"?t:e}function rv(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,g,b,v){return c(f(p,b,v),p.align)}function u(p,g,b,v){const E=h(p,b,v),T=c([E]);return T.slice(0,T.indexOf(`
412
- `))}function l(p,g,b,v){const E=b.enter("tableCell"),T=b.enter("phrasing"),x=b.containerPhrasing(p,{...v,before:s,after:s});return T(),E(),x}function c(p,g){return Ew(p,{align:g,alignDelimiters:r,padding:n,stringLength:i})}function f(p,g,b){const v=p.children;let E=-1;const T=[],x=g.enter("table");for(;++E<v.length;)T[E]=h(v[E],g,b);return x(),T}function h(p,g,b){const v=p.children;let E=-1;const T=[],x=g.enter("tableRow");for(;++E<v.length;)T[E]=l(v[E],p,g,b);return x(),T}function m(p,g,b){let v=lE.inlineCode(p,g,b);return b.stack.includes("tableCell")&&(v=v.replace(/\|/g,"\\$&")),v}}function iv(){return{exit:{taskListCheckValueChecked:U0,taskListCheckValueUnchecked:U0,paragraph:av}}}function sv(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:uv}}}function U0(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function av(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 uv(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=lE.listItem(e,t,n,{...r,...u.current()});return s&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(f){return f+a}}function lv(){return[UA(),uw(),dw(),Xw(),iv()]}function ov(e){return{extensions:[HA(),lw(e),fw(),rv(e),sv()]}}const cv={tokenize:gv,partial:!0},oE={tokenize:Ev,partial:!0},cE={tokenize:Tv,partial:!0},dE={tokenize:yv,partial:!0},dv={tokenize:bv,partial:!0},fE={name:"wwwAutolink",tokenize:mv,previous:mE},hE={name:"protocolAutolink",tokenize:pv,previous:pE},Kn={name:"emailAutolink",tokenize:hv,previous:gE},Rn={};function fv(){return{text:Rn}}let Nr=48;for(;Nr<123;)Rn[Nr]=Kn,Nr++,Nr===58?Nr=65:Nr===91&&(Nr=97);Rn[43]=Kn;Rn[45]=Kn;Rn[46]=Kn;Rn[95]=Kn;Rn[72]=[Kn,hE];Rn[104]=[Kn,hE];Rn[87]=[Kn,fE];Rn[119]=[Kn,fE];function hv(e,t,n){const r=this;let i,s;return a;function a(h){return!vc(h)||!gE.call(r,r.previous)||Xd(r.events)?n(h):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),u(h))}function u(h){return vc(h)?(e.consume(h),u):h===64?(e.consume(h),l):n(h)}function l(h){return h===46?e.check(dv,f,c)(h):h===45||h===95||yt(h)?(s=!0,e.consume(h),l):f(h)}function c(h){return e.consume(h),i=!0,l}function f(h){return s&&i&&Ct(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(h)):n(h)}}function mv(e,t,n){const r=this;return i;function i(a){return a!==87&&a!==119||!mE.call(r,r.previous)||Xd(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(cv,e.attempt(oE,e.attempt(cE,s),n),n)(a))}function s(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function pv(e,t,n){const r=this;let i="",s=!1;return a;function a(h){return(h===72||h===104)&&pE.call(r,r.previous)&&!Xd(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(h),e.consume(h),u):n(h)}function u(h){if(Ct(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?c:(s=!0,l)):n(h)}function c(h){return h===null||Du(h)||Pe(h)||Yr(h)||dl(h)?n(h):e.attempt(oE,e.attempt(cE,f),n)(h)}function f(h){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(h)}}function gv(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 Ev(e,t,n){let r,i,s;return a;function a(c){return c===46||c===95?e.check(dE,l,u)(c):c===null||Pe(c)||Yr(c)||c!==45&&dl(c)?l(c):(s=!0,e.consume(c),a)}function u(c){return c===95?r=!0:(i=r,r=void 0),e.consume(c),a}function l(c){return i||r||!s?n(c):t(c)}}function Tv(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(dE,t,s)(a):a===null||Pe(a)||Yr(a)?t(a):(e.consume(a),i)}function s(a){return a===41&&r++,e.consume(a),i}}function yv(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||Pe(u)||Yr(u)?t(u):n(u)}function i(u){return u===null||u===40||u===91||Pe(u)||Yr(u)?t(u):r(u)}function s(u){return Ct(u)?a(u):n(u)}function a(u){return u===59?(e.consume(u),r):Ct(u)?(e.consume(u),a):n(u)}}function bv(e,t,n){return r;function r(s){return e.consume(s),i}function i(s){return yt(s)?n(s):t(s)}}function mE(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Pe(e)}function pE(e){return!Ct(e)}function gE(e){return!(e===47||vc(e))}function vc(e){return e===43||e===45||e===46||e===95||yt(e)}function Xd(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 xv={tokenize:vv,partial:!0};function _v(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Nv,continuation:{tokenize:Av},exit:wv}},text:{91:{name:"gfmFootnoteCall",tokenize:Cv},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:kv,resolveTo:Sv}}}}function kv(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 c=En(r.sliceSerialize({start:a.end,end:r.now()}));return c.codePointAt(0)!==94||!s.includes(c.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function Sv(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 Cv(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",c)}function c(h){if(s>999||h===93&&!a||h===null||h===91||Pe(h))return n(h);if(h===93){e.exit("chunkString");const m=e.exit("gfmFootnoteCallString");return i.includes(En(r.sliceSerialize(m)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(h)}return Pe(h)||(a=!0),s++,e.consume(h),h===92?f:c}function f(h){return h===91||h===92||h===93?(e.consume(h),s++,c):c(h)}}function Nv(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,a=0,u;return l;function l(g){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(g){return g===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):n(g)}function f(g){if(a>999||g===93&&!u||g===null||g===91||Pe(g))return n(g);if(g===93){e.exit("chunkString");const b=e.exit("gfmFootnoteDefinitionLabelString");return s=En(r.sliceSerialize(b)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),m}return Pe(g)||(u=!0),a++,e.consume(g),g===92?h:f}function h(g){return g===91||g===92||g===93?(e.consume(g),a++,f):f(g)}function m(g){return g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),i.includes(s)||i.push(s),Ne(e,p,"gfmFootnoteDefinitionWhitespace")):n(g)}function p(g){return t(g)}}function Av(e,t,n){return e.check(ca,t,e.attempt(xv,t,n))}function wv(e){e.exit("gfmFootnoteDefinition")}function vv(e,t,n){const r=this;return Ne(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 Iv(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 c=l;for(;c--;)if(a[c][0]==="exit"&&a[c][1].type==="strikethroughSequenceTemporary"&&a[c][1]._open&&a[l][1].end.offset-a[l][1].start.offset===a[c][1].end.offset-a[c][1].start.offset){a[l][1].type="strikethroughSequence",a[c][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},a[c][1].start),end:Object.assign({},a[l][1].end)},h={type:"strikethroughText",start:Object.assign({},a[c][1].end),end:Object.assign({},a[l][1].start)},m=[["enter",f,u],["enter",a[c][1],u],["exit",a[c][1],u],["enter",h,u]],p=u.parser.constructs.insideSpan.null;p&&Qt(m,m.length,0,fl(p,a.slice(c+1,l),u)),Qt(m,m.length,0,[["exit",h,u],["enter",a[l][1],u],["exit",a[l][1],u],["exit",f,u]]),Qt(a,c-1,l-c+3,m),l=c+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 c=this.previous,f=this.events;let h=0;return m;function m(g){return c===126&&f[f.length-1][1].type!=="characterEscape"?l(g):(a.enter("strikethroughSequenceTemporary"),p(g))}function p(g){const b=Ri(c);if(g===126)return h>1?l(g):(a.consume(g),h++,p);if(h<2&&!n)return l(g);const v=a.exit("strikethroughSequenceTemporary"),E=Ri(g);return v._open=!E||E===2&&!!b,v._close=!b||b===2&&!!E,u(g)}}}class Lv{constructor(){this.map=[]}add(t,n,r){Dv(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 Dv(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 Rv(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 Ov(){return{flow:{null:{name:"table",tokenize:Pv,resolveAll:Mv}}}}function Pv(e,t,n){const r=this;let i=0,s=0,a;return u;function u(w){let $=r.events.length-1;for(;$>-1;){const le=r.events[$][1].type;if(le==="lineEnding"||le==="linePrefix")$--;else break}const X=$>-1?r.events[$][1].type:null,he=X==="tableHead"||X==="tableRow"?S:l;return he===S&&r.parser.lazy[r.now().line]?n(w):he(w)}function l(w){return e.enter("tableHead"),e.enter("tableRow"),c(w)}function c(w){return w===124||(a=!0,s+=1),f(w)}function f(w){return w===null?n(w):fe(w)?s>1?(s=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),p):n(w):ke(w)?Ne(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||Pe(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,ke(w)?Ne(e,g,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):g(w))}function g(w){return w===45||w===58?v(w):w===124?(a=!0,e.enter("tableCellDivider"),e.consume(w),e.exit("tableCellDivider"),b):F(w)}function b(w){return ke(w)?Ne(e,v,"whitespace")(w):v(w)}function v(w){return w===58?(s+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(w),e.exit("tableDelimiterMarker"),E):w===45?(s+=1,E(w)):w===null||fe(w)?D(w):F(w)}function E(w){return w===45?(e.enter("tableDelimiterFiller"),T(w)):F(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 ke(w)?Ne(e,D,"whitespace")(w):D(w)}function D(w){return w===124?g(w):w===null||fe(w)?!a||i!==s?F(w):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(w)):F(w)}function F(w){return n(w)}function S(w){return e.enter("tableRow"),R(w)}function R(w){return w===124?(e.enter("tableCellDivider"),e.consume(w),e.exit("tableCellDivider"),R):w===null||fe(w)?(e.exit("tableRow"),t(w)):ke(w)?Ne(e,R,"whitespace")(w):(e.enter("data"),L(w))}function L(w){return w===null||w===124||Pe(w)?(e.exit("data"),R(w)):(e.consume(w),w===92?V:L)}function V(w){return w===92||w===124?(e.consume(w),L):L(w)}}function Mv(e,t){let n=-1,r=!0,i=0,s=[0,0,0,0],a=[0,0,0,0],u=!1,l=0,c,f,h;const m=new Lv;for(;++n<e.length;){const p=e[n],g=p[1];p[0]==="enter"?g.type==="tableHead"?(u=!1,l!==0&&(H0(m,t,l,c,f),f=void 0,l=0),c={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},m.add(n,0,[["enter",c,t]])):g.type==="tableRow"||g.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({},g.start),end:Object.assign({},g.end)},m.add(n,0,[["enter",f,t]])),i=g.type==="tableDelimiterRow"?2:f?3:1):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(s[1]!==0&&(a[0]=a[1],h=Fa(m,t,s,i,void 0,h),s=[0,0,0,0]),a[2]=n)):g.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(a[0]=a[1],h=Fa(m,t,s,i,void 0,h)),s=a,a=[s[1],n,0,0])):g.type==="tableHead"?(u=!0,l=n):g.type==="tableRow"||g.type==="tableDelimiterRow"?(l=n,s[1]!==0?(a[0]=a[1],h=Fa(m,t,s,i,n,h)):a[1]!==0&&(h=Fa(m,t,a,i,n,h)),i=0):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(a[3]=n)}for(l!==0&&H0(m,t,l,c,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=Rv(t.events,n))}return e}function Fa(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 c=ri(t.events,n[2]),f=ri(t.events,n[3]),h={type:u,start:Object.assign({},c),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 g=n[2]+1,b=n[3]-n[2]-1;e.add(g,b,[])}}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 H0(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 Fv={name:"tasklistCheck",tokenize:Bv};function jv(){return{text:{91:Fv}}}function Bv(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 Pe(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 fe(l)?t(l):ke(l)?e.check({tokenize:Uv},t,n)(l):n(l)}}function Uv(e,t,n){return Ne(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function Hv(e){return Y1([fv(),_v(),Iv(e),Ov(),jv()])}const zv={};function $v(e){const t=this,n=e||zv,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(Hv(n)),s.push(lv()),a.push(ov(n))}const Yv={search_file:{label:"Searched files",activeLabel:"Searching files",icon:Rr,color:"#3b82f6"},search_files:{label:"Searched files",activeLabel:"Searching files",icon:Rr,color:"#3b82f6"},search_file_content:{label:"Searched content",activeLabel:"Searching content",icon:Rr,color:"#3b82f6"},search_directory:{label:"Searched directory",activeLabel:"Searching directory",icon:Rr,color:"#3b82f6"},read_file:{label:"Read file",activeLabel:"Reading file",icon:wn,color:"#8b5cf6"},write_file:{label:"Wrote file",activeLabel:"Writing file",icon:ky,color:"#f59e0b"},get_file_info:{label:"Got file info",activeLabel:"Getting file info",icon:wn,color:"#8b5cf6"},browse_directory:{label:"Browsed directory",activeLabel:"Browsing directory",icon:zn,color:"#a78bfa"},list_directory:{label:"Listed directory",activeLabel:"Listing directory",icon:zn,color:"#a78bfa"},list_recent_files:{label:"Listed recent files",activeLabel:"Listing recent files",icon:zn,color:"#a78bfa"},analyze_data_file:{label:"Analyzed data",activeLabel:"Analyzing data",icon:yh,color:"#ec4899"},run_shell_command:{label:"Ran command",activeLabel:"Running command",icon:vu,color:"#22c55e"},execute_code:{label:"Executed code",activeLabel:"Executing code",icon:yy,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:ts,color:"#f97316"},index_directory:{label:"Indexed directory",activeLabel:"Indexing directory",icon:ts,color:"#f97316"},index_file:{label:"Indexed file",activeLabel:"Indexing file",icon:ts,color:"#f97316"},list_indexed_documents:{label:"Listed documents",activeLabel:"Listing documents",icon:ts,color:"#f97316"},summarize_document:{label:"Summarized",activeLabel:"Summarizing",icon:wn,color:"#8b5cf6"},dump_document:{label:"Extracted text",activeLabel:"Extracting text",icon:wn,color:"#8b5cf6"},rag_status:{label:"Checked RAG status",activeLabel:"Checking RAG",icon:ts,color:"#f97316"},add_watch_directory:{label:"Added watch dir",activeLabel:"Adding watch dir",icon:zn,color:"#a78bfa"},web_search:{label:"Searched web",activeLabel:"Searching web",icon:d1,color:"#14b8a6"},analyze_data:{label:"Analyzed data",activeLabel:"Analyzing data",icon:yh,color:"#ec4899"}},z0={label:"Used tool",activeLabel:"Using tool",icon:Wy,color:"#3b82f6"};function Vv(e){return e?e.startsWith("mcp_")?{label:"MCP tool",activeLabel:"Running MCP tool",icon:d1,color:"#7c3aed"}:Yv[e]||z0:z0}function Wv({steps:e,isActive:t,variant:n="inline"}){const[r,i]=k.useState(!1),[s,a]=k.useState(new Set),u=k.useRef(0),l=k.useRef(new Map),c=k.useRef(t);k.useEffect(()=>{c.current=t},[t]),k.useEffect(()=>()=>{l.current.forEach(S=>clearTimeout(S)),l.current.clear()},[]);const f=k.useMemo(()=>{const S=[];for(const R of e){const L=S[S.length-1];if(R.type==="thinking"&&L&&L.type==="thinking"){const V=(L.detail||"")+(R.detail||"");S[S.length-1]={...R,detail:V||L.detail};continue}if(R.type==="status"&&L&&L.type==="status"&&R.active!==!1){S[S.length-1]={...R,label:R.label||L.label};continue}if(R.type==="thinking"&&L&&L.type==="status"&&L.active!==!1){S[S.length-1]={...L,type:"thinking",detail:R.detail||L.detail,active:R.active};continue}if(R.type==="status"&&L&&L.type==="thinking"){S[S.length-1]={...L,label:R.label||L.label,active:R.active??L.active};continue}S.push(R)}return S},[e]),h=f.filter(S=>S.type==="tool"),[m,p]=k.useState(""),[g,b]=k.useState("all"),v=k.useMemo(()=>!m&&g==="all"?f:f.filter(S=>{var R;return S.type!=="tool"?!0:!(m&&!((R=S.tool)!=null&&R.toLowerCase().includes(m.toLowerCase()))||g==="success"&&S.success!==!0||g==="error"&&S.success!==!1)}),[f,m,g]),T=f.filter(S=>S.type==="error").length>0;k.useEffect(()=>{u.current=f.length;const S=f.filter(R=>R.type==="tool"&&!R.mcpServer).map(R=>R.id);S.length>0&&a(R=>{const L=new Set(R);return S.forEach(V=>L.add(V)),L})},[f]);const x=k.useCallback(S=>{const R=l.current.get(S);R&&(clearTimeout(R),l.current.delete(S)),a(L=>{const V=new Set(L);return V.has(S)?V.delete(S):V.add(S),V})},[]);if(f.length===0)return null;const D=f.length,F=`${D} step${D!==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(Qn,{size:14,className:"agent-icon-error"}):o.jsx(p1,{size:14,className:"agent-icon-done"}),o.jsx("span",{className:"agent-summary-text",children:F})]}),o.jsx("div",{className:"agent-summary-right",children:r?o.jsx(Cd,{size:14}):o.jsx(ua,{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:S=>p(S.target.value)}),o.jsxs("select",{className:"activity-filter-select","aria-label":"Filter by status",value:g,onChange:S=>b(S.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:v.map(S=>S.type==="thinking"?o.jsx(qv,{step:S},S.id):S.type==="status"?o.jsx(Qv,{step:S},S.id):S.type==="tool"?o.jsx(Xv,{step:S,isExpanded:s.has(S.id),onToggle:()=>x(S.id)},S.id):S.type==="plan"?o.jsx(Jv,{step:S},S.id):S.type==="error"?o.jsx(Zv,{step:S},S.id):null)})]})]})}function qv({step:e}){const t=e.detail||e.label||"",n=k.useRef(null);return k.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 Qv({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 Gv(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=()=>{vd(a).catch(l=>P.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(zn,{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 Kv({fileList:e}){const[t,n]=k.useState(!1),r=5,i=t?e.files:e.files.slice(0,r),s=e.total-r,a=(l,c)=>{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 ${c+1}`:`File ${c+1}`},u=l=>l.directory?String(l.directory):"";return o.jsxs("div",{className:"file-list-view",children:[i.map((l,c)=>o.jsxs("div",{className:"file-list-item",children:[o.jsx(o1,{size:11,className:"file-list-icon"}),o.jsx("span",{className:"file-list-name",children:a(l,c)}),u(l)&&o.jsx("span",{className:"file-list-dir",children:u(l)})]},c)),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 Xv({step:e,isExpanded:t,onToggle:n}){var l,c;const r=Vv(e.tool),i=r.icon,s=r.color,a=e.active?r.activeLabel:r.label,u=!!(e.detail||e.result||e.commandOutput||(c=(l=e.fileList)==null?void 0:l.files)!=null&&c.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(Ln,{size:13,className:"flow-tool-spinner",style:{color:s}}):e.success===!1?o.jsx(Qn,{size:13,style:{color:"#ef4444"}}):e.success===!0?o.jsx(il,{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(ua,{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:n6(e.detail)})]}),e.commandOutput&&o.jsx(t6,{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:Gv(e.result)})]}),e.retrievalChunks&&e.retrievalChunks.length>0&&o.jsx(e6,{chunks:e.retrievalChunks}),e.fileList&&e.fileList.files.length>0&&o.jsx(Kv,{fileList:e.fileList})]})]})}function Jv({step:e}){const[t,n]=k.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(vy,{size:12}),o.jsx("span",{children:"Plan"}),o.jsxs("span",{className:"flow-plan-count",children:["(",e.planSteps.length,")"]}),t?o.jsx(Cd,{size:11}):o.jsx(ua,{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 Zv({step:e}){return o.jsxs("div",{className:"flow-error",children:[o.jsx(Qn,{size:13}),o.jsx("span",{children:e.detail||e.label||"An error occurred"})]})}function e6({chunks:e}){const[t,n]=k.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(ua,{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 t6({output:e}){const[t,n]=k.useState(!1),r=k.useRef(null);k.useEffect(()=>()=>{r.current&&clearTimeout(r.current)},[]);const i=k.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(vu,{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(aa,{size:11}):o.jsx(sl,{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 n6(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 r6({active:e}){const t="Thinking...",[n,r]=k.useState(0),[i,s]=k.useState("typing"),a=k.useRef(e);return k.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]),k.useEffect(()=>{a.current&&!e&&s("erasing"),a.current=e},[e]),k.useEffect(()=>{if(i!=="erasing")return;if(n<=0){s("done");return}const u=setTimeout(()=>r(l=>l-1),20);return()=>clearTimeout(u)},[i,n]),k.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 i6(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 s6=/\s*\{\s*"?tool"?\s*:\s*"[^"]+"\s*,\s*"?tool_args"?\s*:\s*\{[^}]*\}\s*\}/g;function a6(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 c=e.slice(i,l+1);try{const f=JSON.parse(c);f.answer&&(n+=f.answer)}catch{const f=c.indexOf('"answer"');if(f!==-1){const h=c.indexOf(":",f+8);if(h!==-1){let m=h+1;for(;m<c.length&&/\s/.test(c[m]);)m++;if(m<c.length&&c[m]==='"'){let p=c.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 u6=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 l6(e){return e.replace(/```(\w*)[ \t]*\n([\s\S]*?)```/g,(t,n,r)=>{const i=n.toLowerCase();return i&&u6.has(i)?t:r.trim()})}function o6(e){if(!e)return e;let t=e;t=t.replace(s6,""),t=a6(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=l6(t).trim(),t}function c6(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 d6(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 f6(e){return e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`}function $0({message:e,isStreaming:t,showTerminalCursor:n,agentSteps:r,agentStepsActive:i,onDelete:s,onResend:a,latencyMs:u,agentName:l}){var D,F,S;const c=e.role==="assistant"&&i6(e.content),f=k.useMemo(()=>o6(e.content),[e.content]),[h,m]=k.useState(!1),[p,g]=k.useState(!1),b=k.useRef(null),v=k.useRef(null);k.useEffect(()=>()=>{b.current&&clearTimeout(b.current),v.current&&clearTimeout(v.current)},[]);const E=k.useCallback(()=>{var R;if((R=navigator.clipboard)!=null&&R.writeText)navigator.clipboard.writeText(e.content).catch(()=>{});else{const L=document.createElement("textarea");L.value=e.content,L.style.position="fixed",L.style.opacity="0",document.body.appendChild(L),L.select(),document.execCommand("copy"),document.body.removeChild(L)}m(!0),b.current&&clearTimeout(b.current),b.current=setTimeout(()=>m(!1),2e3)},[e.content]),T=k.useCallback(()=>{if(!p){g(!0),v.current&&clearTimeout(v.current),v.current=setTimeout(()=>g(!1),3e3);return}g(!1),v.current&&clearTimeout(v.current),s==null||s(e.id)},[p,e.id,s]),x=k.useCallback(()=>{a==null||a(e)},[e,a]);return o.jsx("div",{className:`msg msg-${e.role} ${c?"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:w1,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(r6,{active:!!i||!f}),!t&&e.created_at&&o.jsx("span",{className:"msg-timestamp",children:c6(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(h1,{size:12})}),o.jsx("button",{className:`msg-copy ${h?"copied":""}`,onClick:E,title:h?"Copied!":"Copy message","aria-label":h?"Copied to clipboard":"Copy message",children:h?o.jsx(aa,{size:12}):o.jsx(sl,{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(Iu,{size:12})})]})]}),o.jsxs("div",{className:"msg-body",children:[r&&r.length>0&&o.jsx(Wv,{steps:r,isActive:i??!1,variant:i?"inline":"summary"}),c&&o.jsxs("div",{className:"error-banner",children:[o.jsx($r,{size:14}),o.jsx("span",{children:"Something went wrong"})]}),o.jsx(T6,{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:d6(e.created_at)}),u!=null&&u>0&&o.jsx("span",{title:"Total response time",children:f6(u)}),((D=e.stats)==null?void 0:D.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"]}),((F=e.stats)==null?void 0:F.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"]}),((S=e.stats)==null?void 0:S.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 h6({lang:e,code:t}){const[n,r]=k.useState(!1),i=k.useRef(null);k.useEffect(()=>()=>{i.current&&clearTimeout(i.current)},[]);const s=k.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(aa,{size:13}):o.jsx(sl,{size:13}),o.jsx("span",{children:n?"Copied":"Copy"})]})]}),o.jsx("pre",{children:o.jsx("code",{children:t})})]})}const m6=/[A-Z]:[\\\/](?:[^\s*?"<>|,;)}\]]+[\\\/])*[^\s*?"<>|,;)}\]]*\.\w{1,5}/gi,p6=/[A-Z]:[\\\/](?:[^\s*?"<>|,;)}\]]+[\\\/])+/gi;function g6({path:e}){const t=n=>{n.preventDefault(),vd(e).catch(r=>{P.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(zn,{size:12,className:"file-path-icon"}),e]})}function E6(e){const t=new RegExp(`(${m6.source}|${p6.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(g6,{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 er(e){return Ds.Children.map(e,t=>typeof t=="string"?E6(t):t)}function T6({content:e,showCursor:t}){return!e&&!t?null:!e&&t?o.jsx("span",{className:"cursor"}):o.jsxs("div",{className:"md-content",children:[o.jsx(T3,{remarkPlugins:[$v],rehypePlugins:[OA],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=Ds.Children.toArray(n)[0];if(Ds.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),c=String((a==null?void 0:a.children)||"").replace(/\n$/,"");return o.jsx(h6,{lang:(l==null?void 0:l[1])||"",code:c})}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:er(n)})},h1({children:n}){return o.jsx("h2",{className:"md-h2",children:er(n)})},h2({children:n}){return o.jsx("h3",{className:"md-h3",children:er(n)})},h3({children:n}){return o.jsx("h4",{className:"md-h4",children:er(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:er(n)})},blockquote({children:n}){return o.jsx("blockquote",{className:"md-blockquote",children:er(n)})},hr(){return o.jsx("hr",{className:"md-hr"})},td({children:n}){return o.jsx("td",{children:er(n)})},th({children:n}){return o.jsx("th",{children:er(n)})}},children:e}),t&&o.jsx("span",{className:"cursor"})]})}const y6=500,ju="gaia_always_allow_tools",Bu=x1((e,t)=>({notifications:[],showPanel:!1,typeFilter:null,addNotification:n=>e(r=>({notifications:[n,...r.notifications].slice(0,y6)})),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(c=>c.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(c){console.error("[notificationStore] Failed to send permission response via IPC:",c);return}else if(a)try{await S1(a,r==="allow")}catch(c){console.error("[notificationStore] Failed to send permission response via REST:",c);return}if(r==="allow"&&i&&s!=null&&s.tool){const c=JSON.parse(localStorage.getItem(ju)||"[]");c.includes(s.tool)||(c.push(s.tool),localStorage.setItem(ju,JSON.stringify(c)))}e(c=>({notifications:c.notifications.map(f=>f.id===n?{...f,response:r,respondedAt:Date.now(),read:!0}:f)}))}})),b6=e=>e.notifications.find(t=>t.type==="permission_request"&&!t.response&&!t.dismissed)??null,EE="https://github.com/amd/gaia/issues/new",x6=[{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 Is(e){const t=e.toLowerCase().startsWith(".")?e.toLowerCase():`.${e.toLowerCase()}`;for(const n of x6)if(n.extensions.has(t))return n;return null}const _6=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 Uu(e){const t=e.toLowerCase().startsWith(".")?e.toLowerCase():`.${e.toLowerCase()}`;return _6.has(t)}function TE(){const e="0.17.3",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 Y0(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?_","","---",TE(),"","_Submitted from GAIA Agent UI_"].join(`
421
- `),r=new URLSearchParams({title:`[Feature] ${e}`,body:n,labels:"enhancement,agent-ui"});return`${EE}?${r.toString()}`}function Ic(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?_","","---",TE(),"","_Submitted from GAIA Agent UI_"].join(`
422
- `),r=new URLSearchParams({title:`[Bug] ${e}`,body:n,labels:"bug,agent-ui"});return`${EE}?${r.toString()}`}function yE({filename:e,error:t,onDismiss:n,timeout:r=15e3}){var p;const i=k.useRef(null);k.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?Is(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 c,f,h,m=Qn;return u&&a?(c=`${a.label} files not supported`,f=a.message,h=Y0(a.featureTitle),m=$r):u?(c=`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=Y0(`Support ${s} file indexing`),m=$r):l?(c="Connection error",f="Could not reach the GAIA server. Make sure the backend is running.",h=Ic(`Upload connection error for ${e}`),m=Qn):(c=`Failed to index "${e}"`,f=t||"An unexpected error occurred during indexing.",h=Ic(`Indexing error: ${t.slice(0,80)}`),m=Ty),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:c}),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(Tt,{size:14})})]})}const V0=new WeakMap;function k6(e){const t=e.selectionStart??0;let n=V0.get(e);n||(n=window.getComputedStyle(e),V0.set(e,n));const r=document.createElement("div");r.style.cssText=["position:absolute","visibility:hidden","overflow:hidden","white-space:pre-wrap","word-wrap:break-word","top:-9999px","left:-9999px",`box-sizing:${n.boxSizing}`,`width:${n.width}`,`padding:${n.padding}`,`border:${n.border}`,`font:${n.font}`,`line-height:${n.lineHeight}`,`letter-spacing:${n.letterSpacing}`,`word-spacing:${n.wordSpacing}`].join(";"),r.appendChild(document.createTextNode(e.value.substring(0,t)));const i=document.createElement("span");i.textContent="​",r.appendChild(i),document.body.appendChild(r);const s={x:i.offsetLeft,y:i.offsetTop-e.scrollTop};return document.body.removeChild(r),s}const S6=["Summarize a document","Find a file on my computer","Analyze a spreadsheet","Show my recent files"],C6=/\s*\{\s*"?(?:tool|thought|goal)"?\s*:\s*"[^"]*"[^}]*(?:"?tool_args"?\s*:\s*\{[^}]*\})?\s*\}/g;function N6(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 Eo(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 A6({sessionId:e,onCreateAgent:t,onAgentChange:n}){var af,uf,lf;const{sessions:r,messages:i,setMessages:s,addMessage:a,removeMessage:u,removeMessagesFrom:l,updateSessionInList:c,isStreaming:f,streamingContent:h,setStreaming:m,setStreamContent:p,clearStreamContent:g,agentSteps:b,addAgentStep:v,updateLastAgentStep:E,appendThinkingContent:T,updateLastToolStep:x,clearAgentSteps:D,documents:F,setDocuments:S,setShowDocLibrary:R,setShowFileBrowser:L,isLoadingMessages:V,setLoadingMessages:w,systemStatus:$,agents:X,activeAgentId:he,setActiveAgentId:le}=xe(),{addNotification:de}=Bu(),Ae=xe(O=>O.pendingPrompt),ae=r.find(O=>O.id===e),I=new Set((ae==null?void 0:ae.document_ids)??[]),B=F.filter(O=>I.has(O.id)),[y,Z]=k.useState(""),[ce,N]=k.useState({x:0,y:0,focused:!1}),[Te,Ce]=k.useState(!1),[ge,qe]=k.useState(""),[lt,nt]=k.useState(!1),[re,j]=k.useState(!1),[z,te]=k.useState([]),[ee,oe]=k.useState([]),[pe,Me]=k.useState(!1),[bn,xn]=k.useState(null),[Gr,Yi]=k.useState(!1),Vi=k.useRef(null),Cr=(ae==null?void 0:ae.agent_type)||he,xl=(af=X.find(O=>O.id===(ae==null?void 0:ae.agent_type)))==null?void 0:af.name,_l=(uf=X.find(O=>O.id===he))==null?void 0:uf.name;k.useEffect(()=>{if(!Gr)return;const O=K=>{Vi.current&&!Vi.current.contains(K.target)&&Yi(!1)};return document.addEventListener("mousedown",O),()=>document.removeEventListener("mousedown",O)},[Gr]);const H=k.useCallback(async O=>{if(Yi(!1),O===Cr)return;const K=Cr;if(le(O),i.length===0){c(e,{agent_type:O});try{await Jl(e,{agent_type:O})}catch{c(e,{agent_type:K}),le(K)}}else n==null||n(O)},[Cr,i.length,e,le,c,n]),[G,me]=k.useState(!1),ye=k.useRef(""),ve=k.useRef([]),vt=k.useRef(!1);k.useEffect(()=>{h&&(ye.current=h)},[h]),k.useEffect(()=>{b.length>0&&(ve.current=b.map(O=>({...O,active:!1})))},[b]),k.useEffect(()=>{if(!f&&vt.current){me(!0);const O=setTimeout(()=>{me(!1),ye.current="",ve.current=[]},350);return()=>clearTimeout(O)}vt.current=f},[f]);const ln=k.useRef(null),Jt=k.useRef(null),ot=k.useRef(null),On=k.useRef(0),ct=k.useCallback(()=>{cancelAnimationFrame(On.current),On.current=requestAnimationFrame(()=>{if(!ot.current)return;const{x:O,y:K}=k6(ot.current);N(ne=>({...ne,x:O,y:K}))})},[]);k.useEffect(()=>()=>cancelAnimationFrame(On.current),[]);const It=k.useRef(null),Lt=k.useRef(0),ma=k.useRef(!1),Zd=k.useRef(()=>{}),Pn=k.useRef(""),kt=k.useRef(null),Kr=k.useRef(null),ef=k.useRef(0),pa=k.useRef(!0),tf=k.useCallback(()=>{kt.current=null,Pn.current&&p(Pn.current)},[p]),kl=k.useRef(null),Xr=k.useRef(0);k.useEffect(()=>{P.chat.info(`ChatView mounted for session=${e}, loading messages...`);const O=P.chat.time();w(!0);let K=!1;const ne=(ie=!1)=>{ds(e).then(be=>{if(K)return;const Ie=(be.messages||[]).map(Dt=>({...Dt,agentSteps:Dt.agentSteps||Dt.agent_steps||void 0,stats:Dt.stats||Dt.inference_stats||void 0}));ie?(s(Ie),Xr.current=Ie.length,P.chat.timed(`Loaded ${Ie.length} message(s) for session=${e}`,O)):Ie.length!==Xr.current&&!xe.getState().isStreaming&&(P.chat.info(`Messages changed externally: ${Xr.current} -> ${Ie.length}`),s(Ie),Xr.current=Ie.length)}).catch(be=>{K||ie&&(P.chat.error(`Failed to load messages for session=${e}`,be),s([]))}).finally(()=>{!K&&ie&&w(!1)})};return ne(!0),kl.current=setInterval(()=>ne(!1),3e3),()=>{K=!0,kl.current&&clearInterval(kl.current)}},[e,s,w]),k.useEffect(()=>{ni().then(O=>S(O.documents||[])).catch(()=>{})},[S]),k.useEffect(()=>{const O=xe.getState().pendingPrompt;if(!O)return;P.chat.info(`Consuming pending prompt: "${O.slice(0,60)}"`),xe.getState().setPendingPrompt(null),Z(O);let K=!1;return requestAnimationFrame(()=>{K||Zd.current(O)}),()=>{K=!0}},[Ae]),k.useEffect(()=>{if(!pa.current)return;const K=Date.now()-ef.current,ne=100,ie=()=>{var be;ef.current=Date.now(),(be=ln.current)==null||be.scrollIntoView({behavior:"smooth"})};K>=ne&&ie(),Kr.current&&clearTimeout(Kr.current),Kr.current=setTimeout(ie,ne)},[i,h,b]),k.useEffect(()=>{var O;(O=ot.current)==null||O.focus()},[e]),k.useEffect(()=>()=>{It.current&&(It.current.abort(),It.current=null),kt.current!==null&&(cancelAnimationFrame(kt.current),kt.current=null),Kr.current&&(clearTimeout(Kr.current),Kr.current=null),Pn.current="",oe(O=>(O.forEach(K=>{K.url&&URL.revokeObjectURL(K.url)}),[]))},[e]);const _E=k.useCallback(()=>{const O=Jt.current;if(!O)return;const K=O.scrollHeight-O.scrollTop-O.clientHeight;pa.current=K<=80,j(K>200)},[]),kE=k.useCallback(()=>{var O;pa.current=!0,(O=ln.current)==null||O.scrollIntoView({behavior:"smooth"})},[]),Sl=k.useCallback(()=>{P.stream.warn("User stopped generation"),It.current&&(It.current.abort(),It.current=null),kt.current!==null&&(cancelAnimationFrame(kt.current),kt.current=null);const O=xe.getState(),K=Pn.current||O.streamingContent;if(K){P.stream.info(`Saving partial response (${K.length} chars)`);const ne=O.agentSteps,ie={id:Date.now()+1,session_id:e,role:"assistant",content:K,created_at:new Date().toISOString(),rag_sources:null,agentSteps:ne.length>0?[...ne]:void 0};a(ie)}Pn.current="",m(!1),g(),te([]),D()},[e,a,m,g,D]);k.useEffect(()=>{const O=K=>{K.key==="Escape"&&f&&(K.preventDefault(),Sl()),K.key==="k"&&(K.ctrlKey||K.metaKey)&&(K.preventDefault(),window.dispatchEvent(new CustomEvent("gaia:focus-search")))};return window.addEventListener("keydown",O),()=>window.removeEventListener("keydown",O)},[f,Sl]);const SE=O=>{Z(O.target.value);const K=O.target;K.style.height="auto",K.style.height=Math.min(K.scrollHeight,200)+"px",ct()},CE=k.useCallback(async O=>{var ie;const K=(ie=O.clipboardData)==null?void 0:ie.items;if(!K)return;const ne=[];for(const be of Array.from(K))be.type.startsWith("image/")&&ne.push(be);if(ne.length!==0){O.preventDefault();for(const be of ne){const Ie=be.getAsFile();if(!Ie)continue;const Dt=`attach-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,Wi=URL.createObjectURL(Ie),rt={id:Dt,file:Ie,name:Ie.name||`screenshot-${new Date().toISOString().slice(0,19).replace(/[T:]/g,"-")}.png`,url:Wi,uploading:!0,uploaded:!1,isImage:!0};oe(Ht=>[...Ht,rt]),P.chat.info(`Pasted image: ${rt.name} (${Ie.size} bytes)`);try{const Ht=await Ch(Ie);oe(zt=>zt.map(J=>J.id===Dt?{...J,uploading:!1,uploaded:!0,serverUrl:Ht.url}:J)),P.chat.info(`Upload complete: ${rt.name} -> ${Ht.url}`)}catch(Ht){P.chat.error(`Upload failed: ${rt.name}`,Ht),oe(zt=>zt.map(J=>J.id===Dt?{...J,uploading:!1,error:"Upload failed"}:J))}}}},[]),NE=k.useCallback(async O=>{var ne;O.preventDefault(),O.stopPropagation(),nt(!1);const K=(ne=O.dataTransfer)==null?void 0:ne.files;if(!(!K||K.length===0))for(const ie of Array.from(K)){const be=ie.type.startsWith("image/"),Ie=`attach-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,Dt=be?URL.createObjectURL(ie):"",Wi={id:Ie,file:ie,name:ie.name,url:Dt,uploading:!0,uploaded:!1,isImage:be};oe(rt=>[...rt,Wi]),P.chat.info(`Dropped file: ${ie.name} (${ie.size} bytes, image=${be})`);try{const rt=await Ch(ie);oe(Ht=>Ht.map(zt=>zt.id===Ie?{...zt,uploading:!1,uploaded:!0,serverUrl:rt.url}:zt)),P.chat.info(`Upload complete: ${ie.name} -> ${rt.url}`)}catch(rt){P.chat.error(`Upload failed: ${ie.name}`,rt),oe(Ht=>Ht.map(zt=>zt.id===Ie?{...zt,uploading:!1,error:"Upload failed"}:zt))}}},[]),AE=k.useCallback(O=>{oe(K=>{const ne=K.find(ie=>ie.id===O);return ne!=null&&ne.url&&URL.revokeObjectURL(ne.url),K.filter(ie=>ie.id!==O)})},[]),Jr=k.useCallback(async O=>{const K=(O||y).trim(),ne=ee.length>0&&ee.some(J=>J.uploaded);pa.current=!0;const ie=($==null?void 0:$.init_state)==="initializing";if(!K&&!ne||f||ie){!K&&!ne&&P.chat.debug("Send blocked: empty message"),f&&P.chat.debug("Send blocked: already streaming"),ie&&P.chat.debug("Send blocked: system initializing");return}let be=K;const Ie=ee.filter(J=>J.uploaded&&J.serverUrl);if(Ie.length>0){const J=Ie.map(Fe=>Fe.isImage?`![${Fe.name}](${Fe.serverUrl})`:`[${Fe.name}](${Fe.serverUrl})`).join(`
424
- `);be=be?`${be}
425
-
426
- ${J}`:J}P.chat.info(`Sending message to session=${e}`,{length:be.length,preview:be.slice(0,80)}),Z(""),ot.current&&(ot.current.style.height="auto",ot.current.focus()),oe(J=>(J.forEach(Fe=>{Fe.url&&URL.revokeObjectURL(Fe.url)}),[]));const Dt={id:Date.now(),session_id:e,role:"user",content:be,created_at:new Date().toISOString(),rag_sources:null};a(Dt),m(!0),g(),D(),te([]),Lt.current=0,ma.current=!1,P.stream.info("Starting agent stream...");const Wi=P.stream.time();let rt="",Ht=!1;Pn.current="";const zt=vb(e,be,{onChunk:J=>{const Fe=J.content||"";if(Fe){J.type==="answer"?rt=Fe:(ma.current&&rt.length>0&&(rt+=`
427
-
428
- `,ma.current=!1),rt+=Fe);let Re=rt.replace(C6,"").trim();if(Re=N6(Re),Re){const Ge=Re.lastIndexOf("{");if(Ge>-1){const $t=Re.slice(Ge);/^\{\s*"(?:thought|answer|goal|tool)"/.test($t)&&($t.match(/\{/g)||[]).length>($t.match(/\}/g)||[]).length&&(Re=Re.slice(0,Ge).trim())}}Pn.current=Re,kt.current===null&&(kt.current=requestAnimationFrame(tf))}},onAgentEvent:J=>{var Re,Ge,$t;if(J.type==="tool_confirm"){if(!J.confirm_id){console.error("[ChatView] tool_confirm event missing confirm_id, ignoring");return}const Oe=J.tool||"";if(JSON.parse(localStorage.getItem(ju)||"[]").includes(Oe)){Ib(e,J.confirm_id,"allow",!1).catch(_n=>console.error("[ChatView] auto-confirm failed:",_n));return}const Mn={id:J.confirm_id,type:"permission_request",agentId:"chat",agentName:"GAIA",title:`Allow ${Oe}?`,message:`The agent wants to execute: ${Oe}`,timestamp:Date.now(),read:!1,dismissed:!1,priority:"high",tool:Oe,toolArgs:J.args,timeoutSeconds:J.timeout_seconds??60};de(Mn);return}if(J.type==="permission_request"){const Oe=J.tool||"";if(JSON.parse(localStorage.getItem(ju)||"[]").includes(Oe)){S1(e,!0).catch(_n=>console.error("[ChatView] auto-confirm failed:",_n));return}const{addNotification:Mn}=Bu.getState();Mn({id:J.confirm_id??`perm-${Date.now()}`,type:"permission_request",agentId:e,agentName:"GAIA",title:`Allow ${Oe}?`,message:`The agent wants to execute: ${Oe}`,timestamp:Date.now(),read:!1,dismissed:!1,priority:"high",tool:Oe,toolArgs:J.args,timeoutSeconds:J.timeout_seconds??60});return}if(J.type==="tool_end"){x({active:!1,success:J.success!==!1});return}if(J.type==="tool_result"){const Oe={result:J.summary||J.title||"Done",active:!1,success:J.success!==!1,latencyMs:J.latency_ms};J.command_output&&(Oe.commandOutput={command:J.command_output.command,stdout:J.command_output.stdout,stderr:J.command_output.stderr,returnCode:J.command_output.return_code,cwd:J.command_output.cwd,durationSeconds:J.command_output.duration_seconds,truncated:J.command_output.truncated}),(Re=J.result_data)!=null&&Re.chunks&&J.result_data.chunks.length>0&&(Oe.retrievalChunks=J.result_data.chunks.map(dt=>({id:dt.id,source:dt.source,sourcePath:dt.sourcePath,page:dt.page,score:dt.score,preview:dt.preview,content:dt.content}))),((Ge=J.result_data)==null?void 0:Ge.type)==="file_list"&&(($t=J.result_data.files)==null?void 0:$t.length)>0&&(Oe.fileList={files:J.result_data.files,total:J.result_data.total??J.result_data.files.length}),x(Oe);return}if(J.type==="tool_args"){x({detail:J.detail||JSON.stringify(J.args)});return}if(J.type==="thinking"){const Oe=xe.getState().agentSteps,dt=Oe[Oe.length-1];if(dt&&dt.type==="thinking"){T(J.content||"");return}const Mn=Eo(J,Lt);Mn&&v(Mn);return}if(J.type==="status"){const Oe=J.status,dt=(J.message||"").trim();if(dt.toLowerCase().startsWith("executing "))return;if(Oe==="working"||Oe==="warning"||Oe==="info"){const Mn=xe.getState().agentSteps,_n=Mn[Mn.length-1];if(_n&&_n.type==="status"&&_n.active){E({label:dt||"Working",detail:dt});return}if(_n&&_n.type==="thinking"&&_n.active){E({label:dt||"Thinking"});return}const of=Eo(J,Lt);of&&v(of)}return}if(J.type==="step")return;const Fe=Eo(J,Lt);Fe&&(v(Fe),J.type==="tool_start"&&(ma.current=!0))},onDone:J=>{if(Ht)return;Ht=!0,kt.current!==null&&(cancelAnimationFrame(kt.current),kt.current=null),Pn.current="";const Fe=J.content||rt;P.chat.timed(`Agent response complete: ${Fe.length} chars`,Wi);const Re=xe.getState().agentSteps.map(Ge=>({...Ge,active:!1}));if(Fe){Xr.current=xe.getState().messages.length+1;const Ge={id:J.message_id||Date.now()+1,session_id:e,role:"assistant",content:Fe,created_at:new Date().toISOString(),rag_sources:null,agentSteps:Re.length>0?Re:void 0,stats:J.stats||void 0};a(Ge)}if(te(Re),m(!1),g(),D(),ot.current&&ot.current.focus(),setTimeout(()=>{ds(e).then(Ge=>{if(xe.getState().currentSessionId!==e)return;const $t=(Ge.messages||[]).map(Oe=>({...Oe,agentSteps:Oe.agentSteps||Oe.agent_steps||void 0,stats:Oe.stats||Oe.inference_stats||void 0}));s($t),Xr.current=$t.length}).catch(()=>{})},300),ae&&ae.title==="New Task"){const Ge=K.slice(0,50)+(K.length>50?"...":"");Jl(e,{title:Ge}).then(()=>c(e,{title:Ge})).catch($t=>P.chat.error("Auto-title failed",$t))}},onError:J=>{kt.current!==null&&(cancelAnimationFrame(kt.current),kt.current=null),Pn.current="",P.chat.error(`Chat error for session=${e}`,J);let Fe;const Re=J.message||"",Ge=`
429
-
430
- ---
431
- *Unexpected error?* [Report it on GitHub](${Ic(Re.slice(0,80))})`;Re.includes("Lemonade")||Re.includes("LLM")||Re.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."+Ge:J instanceof TypeError||Re.includes("fetch")||Re.includes("Failed to fetch")||Re.includes("NetworkError")?Fe="Cannot connect to the GAIA server. Make sure the backend is running:\n\n```\ngaia chat --ui\n```"+Ge:Re.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```"+Ge:Re.includes("timed out")||Re.includes("timeout")||Re.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.`+Ge:Fe=`Error: ${Re}`+Ge;const $t={id:Date.now()+2,session_id:e,role:"assistant",content:Fe,created_at:new Date().toISOString(),rag_sources:null};a($t),m(!1),g(),D()},onAgentCreated:()=>{wd().then(J=>xe.getState().setAgents(J.agents||[])).catch(()=>{})}},void 0,void 0,he);It.current=zt},[y,ee,f,e,ae,a,s,m,tf,g,c,v,E,T,x,D,he]);Zd.current=Jr,k.useEffect(()=>{!f&&ot.current&&ot.current.focus()},[f]);const wE=k.useCallback(async O=>{f||(P.chat.info(`Deleting message ${O} from session=${e}`),xn(O),setTimeout(async()=>{u(O),xn(null);try{await Nb(e,O)}catch(K){P.chat.error(`Failed to delete message ${O}`,K),ds(e).then(ne=>{xe.getState().currentSessionId===e&&s(ne.messages||[])}).catch(()=>{})}},250))},[e,f,u,s]),vE=k.useCallback(async O=>{if(f||O.role!=="user")return;const K=O.content;P.chat.info(`Resending message ${O.id} from session=${e}`,{preview:K.slice(0,80)}),l(O.id);try{await Ab(e,O.id)}catch(ne){P.chat.error(`Failed to delete messages from ${O.id}`,ne),ds(e).then(ie=>{xe.getState().currentSessionId===e&&s(ie.messages||[])}).catch(()=>{});return}Jr(K)},[e,f,l,s,Jr]),IE=O=>{O.key==="Enter"&&!O.shiftKey&&(O.preventDefault(),Jr())},[nf,rf]=k.useState(!1),LE=k.useCallback(O=>{O.preventDefault();const K=mn(e),ne=`${window.location.origin}${window.location.pathname}#${K}`;navigator.clipboard.writeText(ne).then(()=>{P.ui.info(`Copied session link: ${ne}`),rf(!0),setTimeout(()=>rf(!1),1500)}).catch(()=>{P.ui.warn("Clipboard write failed")})},[e]),DE=()=>{qe((ae==null?void 0:ae.title)||""),Ce(!0)},sf=async()=>{ge.trim()&&ge!==(ae==null?void 0:ae.title)&&(await Jl(e,{title:ge.trim()}),c(e,{title:ge.trim()})),Ce(!1)},RE=async()=>{try{const O=await Cb(e),K=new Blob([O.content],{type:"text/markdown"}),ne=URL.createObjectURL(K),ie=document.createElement("a");ie.href=ne;const be=((ae==null?void 0:ae.title)||"chat").replace(/[/\\:*?"<>|]/g,"_").slice(0,100);ie.download=`${be}.md`,ie.click(),URL.revokeObjectURL(ne)}catch(O){P.chat.error("Export failed",O)}},OE=k.useCallback(async(O,K)=>{O.stopPropagation();const ne=F.find(ie=>ie.id===K);P.doc.info(`Detaching document from session: ${(ne==null?void 0:ne.filename)||K}`);try{await Ob(e,K);const ie=xe.getState().sessions.find(Ie=>Ie.id===e),be=((ie==null?void 0:ie.document_ids)??[]).filter(Ie=>Ie!==K);c(e,{document_ids:be}),be.length<=3&&Me(!1),P.doc.info(`Detached document from session: ${(ne==null?void 0:ne.filename)||K}`)}catch(ie){P.doc.error(`Failed to detach document: ${(ne==null?void 0:ne.filename)||K}`,ie)}},[F,e,c]),PE=k.useCallback(async O=>{if(O.preventDefault(),O.stopPropagation(),nt(!1),O.dataTransfer.files.length!==0)for(const K of Array.from(O.dataTransfer.files)){P.doc.info(`Dropped on chat view: ${K.name}`);try{const ne=await N1(K);if(e&&(ne!=null&&ne.id))try{await Lu(e,ne.id);const ie=xe.getState().sessions.find(Ie=>Ie.id===e),be=(ie==null?void 0:ie.document_ids)??[];be.includes(ne.id)||c(e,{document_ids:[...be,ne.id]}),P.doc.info(`Auto-attached "${K.name}" to session ${e}`)}catch(ie){P.doc.warn(`Could not attach dropped document to session: ${ie}`)}}catch(ne){P.doc.error(`Upload failed: ${K.name}`,ne)}}},[e,c]),ME=O=>{O.preventDefault(),O.stopPropagation(),nt(!0)},FE=O=>{O.preventDefault(),O.stopPropagation(),nt(!1)},jE=O=>{Z(O),Jr(O)},BE=!V&&i.length===0&&!f,UE=k.useMemo(()=>{const O=new Map;let K;for(const ne of i)if(ne.role==="user"&&ne.created_at)K=new Date(ne.created_at).getTime();else if(ne.role==="assistant"&&ne.created_at&&K!==void 0){const ie=new Date(ne.created_at).getTime();ie>K&&O.set(ne.id,ie-K),K=void 0}return O},[i]);return o.jsxs("main",{className:`chat-view ${lt?"drag-active":""}`,onDrop:PE,onDragOver:ME,onDragLeave:FE,children:[o.jsxs("header",{className:"chat-header",children:[o.jsx("div",{className:"chat-header-left",children:Te?o.jsx("input",{className:"title-edit",value:ge,onChange:O=>qe(O.target.value),onBlur:sf,onKeyDown:O=>O.key==="Enter"&&sf(),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:DE,title:"Rename","aria-label":"Rename chat",children:o.jsx(jy,{size:13})})]})}),o.jsxs("div",{className:"chat-header-right",children:[o.jsxs("a",{className:`session-hash-badge ${nf?"copied":""}`,href:`#${mn(e)}`,onClick:LE,title:nf?"Copied!":`Copy session link #${mn(e)}`,"aria-label":`Copy link for session ${mn(e)}`,children:[o.jsx(wy,{size:10}),o.jsxs("span",{children:["#",mn(e)]})]}),o.jsx("span",{className:`model-badge ${$!=null&&$.model_loaded?"":"no-model"}`,children:($==null?void 0:$.model_loaded)||"No model loaded"}),o.jsx("button",{className:"btn-icon-sm",onClick:()=>R(!0),title:"Documents","aria-label":"Attach documents",children:o.jsx(Fy,{size:15})}),o.jsx("button",{className:"btn-icon-sm",onClick:()=>L(!0),title:"Browse files","aria-label":"Browse files",children:o.jsx(bh,{size:15})}),o.jsx("button",{className:"btn-icon-sm",onClick:RE,title:"Export","aria-label":"Export chat",children:o.jsx(Li,{size:15})})]})]}),B.length>0&&(()=>{const O=[...B].sort((ie,be)=>{const Ie=ie.last_accessed_at||ie.indexed_at||"";return(be.last_accessed_at||be.indexed_at||"").localeCompare(Ie)}),K=pe?O:O.slice(0,3),ne=O.length-3;return o.jsxs("div",{className:`doc-context-bar${pe?" doc-context-expanded":""}`,"aria-label":`${B.length} indexed document${B.length!==1?"s":""}`,children:[o.jsx(il,{size:12,className:"doc-context-icon"}),o.jsxs("span",{className:"doc-context-label",onClick:()=>R(!0),title:"Click to manage documents",role:"button",tabIndex:0,children:[B.length," indexed"]}),o.jsxs("div",{className:`doc-context-pills${pe?" doc-context-pills-expanded":""}`,children:[K.map(ie=>o.jsxs("span",{className:"doc-pill",title:ie.filepath||ie.filename,children:[o.jsx(wn,{size:9,className:"doc-pill-icon"}),o.jsx("span",{className:"doc-pill-name",children:ie.filename}),o.jsx("button",{className:"doc-pill-remove",onClick:be=>OE(be,ie.id),title:`Remove ${ie.filename} from this session`,"aria-label":`Remove ${ie.filename} from this session`,children:o.jsx(Tt,{size:10})})]},ie.id)),!pe&&ne>0&&o.jsxs("button",{className:"doc-pill-more",onClick:ie=>{ie.stopPropagation(),Me(!0)},title:"Show all indexed files","aria-label":`Show ${ne} more files`,children:["+",ne," more"]}),pe&&ne>0&&o.jsx("button",{className:"doc-pill-collapse",onClick:ie=>{ie.stopPropagation(),Me(!1)},title:"Show fewer files","aria-label":"Collapse file list",children:"show less"})]})]})})(),o.jsxs("div",{className:"messages-scroll",ref:Jt,onScroll:_E,children:[V&&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))}),BE&&o.jsxs("div",{className:"empty-chat",children:[o.jsx("div",{className:"empty-chat-icon",children:o.jsx(Dy,{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:S6.map(O=>o.jsx("button",{className:"empty-chat-chip",onClick:()=>jE(O),children:O},O))})]}),i.map((O,K)=>{const ne=!f&&!G&&O.role==="assistant"&&i.slice(K+1).every(Ie=>Ie.role!=="assistant");if(G&&O.role==="assistant"&&K===i.length-1)return null;const be=UE.get(O.id);return o.jsx("div",{className:bn===O.id?"msg-deleting":void 0,children:o.jsx($0,{message:O,showTerminalCursor:ne,agentSteps:O.role==="assistant"?O.agentSteps:void 0,onDelete:f?void 0:wE,onResend:!f&&O.role==="user"?vE:void 0,latencyMs:be,agentName:O.role==="assistant"?xl:void 0})},O.id)}),(f||G)&&o.jsx("div",{className:`streaming-bubble ${G?"stream-ending":"stream-active"}`,children:o.jsx($0,{message:{id:-1,session_id:e,role:"assistant",content:(f?h:ye.current)||"",created_at:"",rag_sources:null},isStreaming:f,showTerminalCursor:G,agentSteps:f?b:ve.current,agentStepsActive:f&&b.some(O=>O.active),agentName:_l})}),o.jsx("div",{ref:ln})]}),re&&o.jsx("button",{className:"scroll-bottom-btn",onClick:kE,title:"Scroll to bottom","aria-label":"Scroll to bottom",children:o.jsx(py,{size:16})}),lt&&o.jsxs("div",{className:"drag-overlay",children:[o.jsx(Ks,{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 ${ee.length>0?"has-attachments":""}`,onDrop:NE,onDragOver:O=>{O.preventDefault(),O.stopPropagation()},children:[o.jsxs("div",{className:"input-content",children:[ee.length>0&&o.jsx("div",{className:"attachment-strip",children:ee.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(wn,{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:()=>AE(O.id),title:"Remove","aria-label":`Remove ${O.name}`,children:o.jsx(Tt,{size:12})})]},O.id))}),o.jsx("textarea",{ref:ot,className:"msg-input",value:y,onChange:SE,onKeyDown:IE,onPaste:CE,onSelect:ct,onFocus:()=>{N(O=>({...O,focused:!0})),ct()},onBlur:()=>N(O=>({...O,focused:!1})),placeholder:"Type a message or paste an image... (Shift+Enter for new line)",rows:1,disabled:f||($==null?void 0:$.init_state)==="initializing","aria-label":"Message input",style:{caretColor:"transparent"}}),!f&&ce.focused&&o.jsx("span",{className:"input-cursor",style:{left:`${ce.x}px`,top:`${ce.y}px`},"aria-hidden":"true"})]}),o.jsxs("div",{className:"input-btns",children:[o.jsx("button",{className:"btn-icon-sm",onClick:()=>R(!0),title:"Upload document","aria-label":"Upload document",children:o.jsx(Ks,{size:15})}),o.jsx("button",{className:"btn-icon-sm",onClick:()=>L(!0),title:"Browse files","aria-label":"Browse files",children:o.jsx(bh,{size:15})}),f?o.jsx("button",{className:"stop-btn",onClick:Sl,title:"Stop generating","aria-label":"Stop generating",children:o.jsx(zy,{size:14})}):o.jsx("button",{className:"send-btn",onClick:()=>Jr(),disabled:!y.trim()&&!ee.some(O=>O.uploaded),title:"Send (Enter)","aria-label":"Send message",children:o.jsx(By,{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(Nd,{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:Vi,children:[o.jsxs("button",{className:"agent-picker-btn",onClick:()=>!f&&Yi(O=>!O),title:"Switch agent","aria-label":"Switch agent",disabled:f,children:[o.jsx(fc,{size:10}),o.jsx("span",{children:((lf=X.find(O=>O.id===Cr))==null?void 0:lf.name)||"Agent"}),o.jsx(Cd,{size:10})]}),Gr&&o.jsx("div",{className:"agent-picker-dropdown",children:X.map(O=>o.jsxs("button",{className:`agent-picker-option${O.id===Cr?" active":""}`,onClick:()=>H(O.id),children:[o.jsx(fc,{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(f1,{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 W0="GAIA",ja="Your private AI assistant, running 100% locally on AMD Ryzen AI",w6=65,v6=350;function bE(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 I6=["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 L6({onNewTask:e,onSendPrompt:t,onCreateAgent:n}){const{systemStatus:r,agents:i,activeAgentId:s,setActiveAgentId:a}=xe(),u=k.useMemo(()=>{var L;const R=i.find(V=>V.id===s);return(L=R==null?void 0:R.conversation_starters)!=null&&L.length?R.conversation_starters:I6},[i,s]),[l,c]=k.useState(""),[f,h]=k.useState(!1),[m,p]=k.useState(""),[g,b]=k.useState(!1),[v,E]=k.useState("title"),[T,x]=k.useState(!1),D=r!==null&&!r.initialized,F=(r==null?void 0:r.init_state)==="initializing",S=r!==null&&r.lemonade_running&&!r.model_loaded;return k.useEffect(()=>{let R=0;const L=setInterval(()=>{R++,R<=W0.length?c(W0.slice(0,R)):(clearInterval(L),h(!0))},w6);return()=>clearInterval(L)},[]),k.useEffect(()=>{if(!f)return;let R=!1;const L=setTimeout(()=>{if(R)return;E("subtitle");let w=0;const $=()=>{if(!R)if(w++,w<=ja.length){p(ja.slice(0,w));const X=ja[w-1],he=w>1?ja[w-2]:"",le=bE(X,he);V.current=setTimeout($,le)}else b(!0),E("done")};$()},v6),V={current:null};return()=>{R=!0,clearTimeout(L),V.current&&clearTimeout(V.current)}},[f]),k.useEffect(()=>{if(!g)return;const R=setTimeout(()=>x(!0),200);return()=>clearTimeout(R)},[g]),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,v==="title"&&o.jsx("span",{className:`terminal-cursor${f?" blink":""}`})]}),o.jsx("p",{className:"welcome-sub",children:o.jsxs("span",{className:"typewriter-text",children:[m,(v==="subtitle"||v==="done")&&o.jsx("span",{className:`terminal-cursor terminal-cursor-sub${v==="done"?" blink":""}`})]})}),o.jsxs("span",{className:"welcome-version",children:["v","0.17.3"," ",o.jsx("span",{className:"beta-badge",children:"BETA"})]}),o.jsxs("div",{className:"features",children:[o.jsx(Ba,{icon:o.jsx(f1,{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(Ba,{icon:o.jsx(p1,{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(Ba,{icon:o.jsx(wn,{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(Ba,{icon:o.jsx(_y,{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(R=>o.jsxs("button",{className:`agent-pill${R.id===s?" active":""}`,onClick:()=>a(R.id),title:R.description||R.name,children:[o.jsx(fc,{size:14}),o.jsx("span",{children:R.name})]},R.id))}),D&&o.jsxs("div",{className:"welcome-setup-hint",children:[o.jsx(vu,{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)."]})]}),!D&&S&&o.jsxs("div",{className:"welcome-setup-hint",children:[o.jsx(vu,{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:F,children:"Start a New Task"}),n&&o.jsxs("button",{className:"build-agent-btn",onClick:n,disabled:F,children:[o.jsx(Nd,{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(R=>o.jsx("button",{className:"chip",onClick:()=>t(R),disabled:F,children:R},R))})]}),o.jsx("p",{className:"welcome-copyright",children:"© 2025–2026 Advanced Micro Devices, Inc. All rights reserved."})]})})}function Ba({icon:e,title:t,desc:n,expandedDesc:r,codeHint:i}){const[s,a]=k.useState("idle"),[u,l]=k.useState(i),[c,f]=k.useState(""),h=k.useRef(null),m=()=>{a("erasing"),f("");let b=i.length;const v=()=>{if(b--,b>=0)l(i.slice(0,b)),h.current=setTimeout(v,15+Math.random()*20);else{a("typing"),l("");let E=0;const T=()=>{if(E++,E<=r.length){f(r.slice(0,E));const x=r[E-1],D=E>1?r[E-2]:"";h.current=setTimeout(T,bE(x,D))}else a("done")};T()}};v()},p=()=>{h.current&&clearTimeout(h.current),a("idle"),l(i),f("")};k.useEffect(()=>()=>{h.current&&clearTimeout(h.current)},[]);const g=s!=="idle";return o.jsxs("div",{className:`feature-card ${g?"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:c}),o.jsx("span",{className:`terminal-cursor terminal-cursor-sm${s==="done"?" blink":""}`})]})]})]})}function D6(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 R6(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 O6(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 P6(){const{documents:e,setDocuments:t,setShowDocLibrary:n,setShowFileBrowser:r,currentSessionId:i,sessions:s,updateSessionInList:a}=xe(),u=s.find(I=>I.id===i)??null,[l,c]=k.useState(!1),[f,h]=k.useState(!1),[m,p]=k.useState(""),[g,b]=k.useState(""),[v,E]=k.useState(null),T=k.useRef(new Map),[,x]=k.useState(0);k.useEffect(()=>{P.doc.info("Loading document library...");const I=P.doc.time();ni().then(B=>{const y=B.documents||[];t(y),P.doc.timed(`Loaded ${y.length} document(s), ${B.total_chunks||0} chunks, ${B.total_size_bytes||0} bytes total`,I)}).catch(B=>{P.doc.error("Failed to load documents",B),t([])})},[t]);const D=e.some(I=>I.indexing_status==="indexing"||I.indexing_status==="pending");k.useEffect(()=>{if(!D)return;const I=xe.getState().documents;for(const Z of I)(Z.indexing_status==="indexing"||Z.indexing_status==="pending")&&!T.current.has(Z.id)&&T.current.set(Z.id,Date.now());let B=!1;const y=setInterval(async()=>{if(x(Z=>Z+1),!B){B=!0;try{const ce=xe.getState().documents.filter(N=>N.indexing_status==="indexing"||N.indexing_status==="pending");for(const N of ce)try{const Te=await Db(N.id);if(Te.indexing_status!=="indexing"&&Te.indexing_status!=="pending"){T.current.delete(N.id);const Ce=await ni();t(Ce.documents||[]);break}}catch{}}finally{B=!1}}},2e3);return()=>clearInterval(y)},[D,t]),k.useEffect(()=>{const I=new Set(e.filter(B=>B.indexing_status==="indexing"||B.indexing_status==="pending").map(B=>B.id));for(const B of T.current.keys())I.has(B)||T.current.delete(B)},[e]),k.useEffect(()=>{const I=setInterval(async()=>{try{const y=(await ni()).documents||[],Z=xe.getState().documents;(y.length!==Z.length||y.some((N,Te)=>{const Ce=Z.find(ge=>ge.id===N.id);return!Ce||Ce.indexing_status!==N.indexing_status||Ce.indexed_at!==N.indexed_at||Ce.chunk_count!==N.chunk_count}))&&(t(y),P.doc.debug("Document list refreshed (server-side changes detected)"))}catch{}},15e3);return()=>clearInterval(I)},[t]);const F=e.reduce((I,B)=>I+B.file_size,0),S=e.reduce((I,B)=>I+B.chunk_count,0),R=I=>{if(I<=0)return"0 B";const B=1024,y=["B","KB","MB","GB"],Z=Math.min(Math.floor(Math.log(I)/Math.log(B)),y.length-1);return parseFloat((I/Math.pow(B,Z)).toFixed(1))+" "+y[Z]},L=k.useCallback(async(I,B)=>{var ce;const y=I.includes(".")?"."+((ce=I.split(".").pop())==null?void 0:ce.toLowerCase()):"";if(y&&!Uu(y)){const N=Is(y),Te=N?N.message:`The file type "${y}" is not supported for indexing.`;P.doc.warn(`Unsupported file type: ${I} (${y})`),E({filename:I,error:Te});return}P.doc.info(`Indexing document: ${I}`);const Z=P.doc.time();h(!0),p(`Indexing ${I}...`),E(null);try{const N=await B();if(P.doc.timed(`Indexed "${I}": ${(N==null?void 0:N.chunk_count)||"?"} chunks`,Z),i&&(N!=null&&N.id))try{await Lu(i,N.id);const Ce=xe.getState().sessions.find(qe=>qe.id===i),ge=(Ce==null?void 0:Ce.document_ids)??[];ge.includes(N.id)||a(i,{document_ids:[...ge,N.id]}),P.doc.info(`Auto-attached "${I}" to session ${i}`)}catch(Ce){P.doc.warn(`Could not attach document to session: ${Ce}`)}const Te=await ni();t(Te.documents||[]),p("")}catch(N){P.doc.error(`Failed to index "${I}"`,N);const Te=N instanceof Error?N.message:"Upload failed";E({filename:I,error:Te}),p("")}finally{h(!1)}},[i,a,t]),V=k.useCallback(async(I,B)=>{await L(B,()=>C1(I))},[L]),w=k.useCallback(async I=>{await L(I.name,()=>N1(I))},[L]),$=k.useCallback(async I=>{I.preventDefault(),c(!1);const B=Array.from(I.dataTransfer.files);P.doc.info(`Dropped ${B.length} file(s) into Document Library`);for(const y of B)await w(y)},[w]),X=k.useCallback(async I=>{const B=e.find(y=>y.id===I);P.doc.info(`Deleting document: ${(B==null?void 0:B.filename)||I}`);try{await Lb(I),T.current.delete(I),t(e.filter(y=>y.id!==I)),P.doc.info(`Deleted document: ${(B==null?void 0:B.filename)||I}`)}catch(y){P.doc.error(`Failed to delete document: ${(B==null?void 0:B.filename)||I}`,y)}},[e,t]),he=k.useCallback(async(I,B)=>{P.doc.info(`Opening folder for: ${I}`);try{await vd(I,!0)}catch(y){P.doc.error(`Failed to open folder for: ${B}`,y)}},[]),le=k.useCallback(async I=>{const B=e.find(y=>y.id===I);P.doc.info(`Cancelling indexing for: ${(B==null?void 0:B.filename)||I}`);try{await Rb(I),T.current.delete(I);const y=await ni();t(y.documents||[]),P.doc.info(`Cancelled indexing for: ${(B==null?void 0:B.filename)||I}`)}catch(y){P.doc.error(`Failed to cancel indexing: ${(B==null?void 0:B.filename)||I}`,y)}},[e,t]),de=k.useCallback(async I=>{if(!i)return;const B=e.find(y=>y.id===I);P.doc.info(`Attaching document to session: ${(B==null?void 0:B.filename)||I}`);try{await Lu(i,I);const y=xe.getState().sessions.find(ce=>ce.id===i),Z=(y==null?void 0:y.document_ids)??[];Z.includes(I)||a(i,{document_ids:[...Z,I]}),P.doc.info(`Attached "${(B==null?void 0:B.filename)||I}" to session ${i}`)}catch(y){P.doc.error(`Failed to attach document to session: ${(B==null?void 0:B.filename)||I}`,y)}},[i,e,a]),Ae=k.useCallback(async I=>{I.preventDefault(),g.trim()&&(P.doc.info(`Indexing from path input: ${g.trim()}`),await V(g.trim(),g.trim().split(/[\\/]/).pop()||"file"),b(""))},[g,V]),ae=I=>{const B=I.indexing_status||"complete",y=T.current.get(I.id),Z=I.indexed_at?R6(I.indexed_at):"",ce=I.indexed_at?O6(I.indexed_at):"";switch(B){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(Iy,{size:12,className:"doc-spin"}),"Indexing",y?` (${D6(y)})`:"..."]})]}),o.jsxs("button",{className:"btn-cancel",onClick:N=>{N.stopPropagation(),le(I.id)},title:"Cancel indexing","aria-label":`Cancel indexing ${I.filename}`,children:[o.jsx(xh,{size:14}),"Cancel"]})]});case"failed":return o.jsxs("span",{className:"doc-status-badge doc-status-failed",children:[o.jsx(Qn,{size:12})," Failed"]});case"cancelled":return o.jsxs("span",{className:"doc-status-badge doc-status-cancelled",children:[o.jsx(xh,{size:12})," Cancelled"]});case"missing":return o.jsxs("span",{className:"doc-status-badge doc-status-missing",children:[o.jsx(Qn,{size:12})," File missing"]});default:return o.jsxs("span",{className:"doc-meta",children:[R(I.file_size)," · ",I.chunk_count," chunks",Z&&o.jsxs("span",{className:"doc-timestamp",title:`Indexed: ${ce}`,children:[o.jsx(l1,{size:10}),Z]})]})}};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:I=>I.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(Tt,{size:18})})]}),o.jsxs("div",{className:"modal-body",children:[o.jsx("div",{className:`drop-zone ${l?"drag-over":""} ${f?"uploading":""}`,onDragOver:I=>{I.preventDefault(),c(!0)},onDragLeave:()=>c(!1),onDrop:$,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(Ks,{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(zn,{size:16,className:"path-icon"}),o.jsx("input",{type:"text",className:"path-input",value:g,onChange:I=>b(I.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:!g.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(Rr,{size:14}),"Browse Files"]})]}),v&&o.jsx(yE,{filename:v.filename,error:v.error,onDismiss:()=>E(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:[S," chunks"]}),o.jsx("span",{children:"·"}),o.jsx("span",{children:R(F)})]}),o.jsxs("div",{className:"doc-list",children:[e.length===0&&!f&&o.jsxs("div",{className:"empty-docs",children:[o.jsx(wn,{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(I=>{var B;return o.jsxs("div",{className:`doc-row ${I.indexing_status==="indexing"?"doc-row-indexing":""}`,children:[o.jsxs("div",{className:"doc-info",children:[o.jsx("span",{className:"doc-name",children:I.filename}),ae(I)]}),o.jsxs("div",{className:"doc-row-actions",children:[I.filepath&&o.jsx("button",{className:"btn-icon-sm doc-open-folder",onClick:()=>he(I.filepath,I.filename),title:`Open folder: ${I.filepath}`,"aria-label":`Open containing folder for ${I.filename}`,children:o.jsx(zn,{size:14})}),i&&I.indexing_status==="complete"&&!((B=u==null?void 0:u.document_ids)!=null&&B.includes(I.id))&&o.jsx("button",{className:"btn-icon-sm doc-attach",onClick:()=>de(I.id),title:"Use in current session","aria-label":`Attach ${I.filename} to current session`,children:o.jsx(Ay,{size:14})}),I.indexing_status!=="indexing"&&I.indexing_status!=="pending"&&o.jsx("button",{className:"btn-icon-sm doc-delete",onClick:()=>X(I.id),title:"Remove","aria-label":`Remove ${I.filename}`,children:o.jsx(Iu,{size:14})})]})]},I.id)})]})]})]})})}function M6(e){if(e.type==="folder")return o.jsx(c1,{size:16});const t=(e.extension||"").toLowerCase();return[".csv",".xlsx",".xls",".tsv"].includes(t)?o.jsx(Yy,{size:16}):[".py",".js",".ts",".java",".c",".cpp",".go",".rs"].includes(t)?o.jsx(by,{size:16}):[".pdf",".doc",".docx",".txt",".md"].includes(t)?o.jsx(wn,{size:16}):o.jsx(o1,{size:16})}function F6(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 j6(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 B6(e){switch(e){case"home":return o.jsx(Cy,{size:14});case"desktop":return o.jsx(Ry,{size:14});case"documents":return o.jsx(wn,{size:14});case"download":return o.jsx(Li,{size:14});default:return o.jsx(c1,{size:14})}}const U6=[{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"}];async function q0(e,t,n,r){var h;const i=[],s=[];for(const m of e){const p=m.includes(".")?"."+((h=m.split(".").pop())==null?void 0:h.toLowerCase()):"";p&&!Uu(p)?s.push(m):i.push(m)}const a=[],u=[];let l=0,c="";const f=new Set(t.filter(m=>m.type==="folder").map(m=>m.path));for(const m of i)try{if(f.has(m)){const p=await Mb(m),g=[];p.documents.forEach(b=>{b.id&&g.push(b.id)}),g.length>0&&(g.forEach(b=>a.push(b)),u.push(m))}else{const p=await C1(m);p!=null&&p.id&&(a.push(p.id),u.push(m))}}catch(p){l++,c=p instanceof Error?p.message:"Unknown error"}if(n&&a.length>0){for(const b of a)try{await Lu(n,b)}catch(v){P.doc.warn(`Could not attach document to session: ${v}`)}const m=xe.getState().sessions.find(b=>b.id===n),p=(m==null?void 0:m.document_ids)??[],g=a.filter(b=>!p.includes(b));g.length>0&&r(n,{document_ids:[...p,...g]})}return{docIds:a,supported:i,succeededFiles:u,unsupported:s,failed:l,lastError:c}}function H6(){const{setShowFileBrowser:e,currentSessionId:t,updateSessionInList:n,setPendingPrompt:r}=xe(),[i,s]=k.useState(""),[a,u]=k.useState(null),[l,c]=k.useState([]),[f,h]=k.useState([]),[m,p]=k.useState(!1),[g,b]=k.useState(null),[v,E]=k.useState(""),[T,x]=k.useState(null),[D,F]=k.useState(!1),[S,R]=k.useState(""),[L,V]=k.useState(new Set),[w,$]=k.useState(null),[X,he]=k.useState(!1),[le,de]=k.useState(new Set),[Ae,ae]=k.useState(null),I=k.useRef(null),[B,y]=k.useState(null),Z=k.useCallback(async j=>{p(!0),b(null),x(null),E("");try{const z=await Pb(j);s(z.current_path),u(z.parent_path),c(z.entries),z.quick_links.length>0&&h(z.quick_links),P.ui.info(`Browsing: ${z.current_path} (${z.entries.length} items)`)}catch(z){const te=z instanceof Error?z.message:"Failed to load directory";b(te),P.ui.error("Browse failed",z)}finally{p(!1)}},[]);k.useEffect(()=>{Z()},[Z]),k.useEffect(()=>()=>{I.current&&clearTimeout(I.current)},[]);const ce=k.useCallback(async()=>{if(!v.trim()){x(null);return}F(!0),b(null);try{const j=await Fb(v.trim(),S||void 0,30);x(j.results),P.ui.info(`Search "${v}": ${j.total} results`)}catch(j){const z=j instanceof Error?j.message:"Search failed";b(z),P.ui.error("Search failed",j)}finally{F(!1)}},[v,S]),N=j=>{j.key==="Enter"&&ce()},Te=k.useCallback(j=>{j.type==="folder"&&(Z(j.path),V(new Set),$(null))},[Z]),Ce=k.useCallback(async j=>{he(!0);try{const z=await jb(j);$(z)}catch(z){P.ui.error("Preview failed",z)}finally{he(!1)}},[]),ge=k.useCallback(async()=>{var te;if(L.size===0)return;const j=Array.from(L);if(y(null),!j.some(ee=>{var pe;const oe=ee.includes(".")?"."+((pe=ee.split(".").pop())==null?void 0:pe.toLowerCase()):"";return!oe||Uu(oe)})){const ee=j[0],oe="."+((te=ee.split(".").pop())==null?void 0:te.toLowerCase()),pe=Is(oe);y({filename:j.length===1?ee.split(/[\\/]/).pop()||ee:`${j.length} files`,error:pe?pe.message:`File type "${oe}" is not supported for indexing.`});return}de(new Set(j)),ae(`Indexing ${j.length} file(s)...`);try{const ee=await q0(j,l,t,n);if(ee.failed>0)ae(`Done: ${ee.docIds.length} indexed, ${ee.failed} failed`),y({filename:`${ee.failed} file(s)`,error:ee.lastError||"Indexing failed for some files"});else{const oe=ee.unsupported.length>0?` (${ee.unsupported.length} skipped — unsupported type)`:"";ae(`Successfully indexed ${ee.docIds.length} file(s)${oe}`)}I.current&&clearTimeout(I.current),I.current=setTimeout(()=>ae(null),5e3),V(new Set)}catch(ee){P.doc.error("Index selected failed",ee),y({filename:j.length===1?j[0].split(/[\\/]/).pop()||j[0]:`${j.length} files`,error:ee instanceof Error?ee.message:"An unexpected error occurred."})}finally{de(new Set)}},[L,t,n,l]),qe=k.useCallback(async()=>{var z;if(L.size===0)return;const j=Array.from(L);y(null),de(new Set(j)),ae(`Indexing ${j.length} file(s) for analysis...`);try{const te=await q0(j,l,t,n);if(te.supported.length===0){const pe="."+((z=j[0].split(".").pop())==null?void 0:z.toLowerCase()),Me=Is(pe);y({filename:j.length===1?j[0].split(/[\\/]/).pop()||j[0]:`${j.length} files`,error:(Me==null?void 0:Me.message)??`File type "${pe}" is not supported for indexing.`});return}if(te.docIds.length===0){y({filename:te.supported.length===1?te.supported[0].split(/[\\/]/).pop()||te.supported[0]:`${te.supported.length} files`,error:"Failed to index selected file(s). Please try again."});return}te.failed>0&&ae(`Warning: ${te.failed} file(s) failed to index and will be excluded.`);const ee=(te.succeededFiles.length>0?te.succeededFiles:te.supported).map(pe=>pe.split(/[\\/]/).pop()||pe),oe=ee.length===1?`Please analyze this document for me: ${ee[0]}`:`Please analyze these documents for me:
434
- ${ee.map(pe=>`- ${pe}`).join(`
435
- `)}`;r(oe),e(!1),V(new Set)}catch(te){P.doc.error("Ask Agent failed",te),y({filename:j.length===1?j[0].split(/[\\/]/).pop()||j[0]:`${j.length} files`,error:te instanceof Error?te.message:"An unexpected error occurred."})}finally{de(new Set),ae(null)}},[L,t,n,l,r,e]),lt=i?i.replace(/\\/g,"/").split("/").filter(Boolean):[],nt=lt.map((j,z)=>({label:j,path:lt.slice(0,z+1).join("/")+(z===0&&j.includes(":")?"/":"")})),re=T?T.map(j=>({name:j.name,path:j.path,type:"file",size:j.size,extension:j.extension||"",modified:j.modified||""})):l;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 ${w?"has-preview":""}`,onClick:j=>j.stopPropagation(),children:[o.jsxs("div",{className:"modal-header",children:[o.jsxs("h3",{children:[o.jsx(zn,{size:18})," File Browser"]}),o.jsx("button",{className:"btn-icon",onClick:()=>e(!1),"aria-label":"Close",children:o.jsx(Tt,{size:18})})]}),o.jsxs("div",{className:"file-browser-body",children:[o.jsx("div",{className:"fb-quick-links",children:f.map(j=>o.jsxs("button",{className:"fb-quick-link",onClick:()=>Z(j.path),title:j.path,children:[B6(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(Rr,{size:14,className:"fb-search-icon"}),o.jsx("input",{type:"text",className:"fb-search-input",placeholder:"Search files on your PC...",value:v,onChange:j=>E(j.target.value),onKeyDown:N,"aria-label":"Search files"}),v&&o.jsx("button",{className:"fb-search-clear",onClick:()=>{E(""),x(null)},"aria-label":"Clear search",children:o.jsx(Tt,{size:12})})]}),o.jsx("select",{className:"fb-type-filter",value:S,onChange:j=>R(j.target.value),"aria-label":"File type filter",children:U6.map(j=>o.jsx("option",{value:j.value,children:j.label},j.value))}),o.jsx("button",{className:"fb-search-btn",onClick:ce,disabled:!v.trim()||D,children:D?"Searching...":"Search"})]}),!T&&o.jsxs("div",{className:"fb-breadcrumb",children:[o.jsx("button",{className:"fb-crumb",onClick:()=>Z("/"),children:o.jsx(Sy,{size:12})}),nt.map((j,z)=>o.jsxs("span",{className:"fb-crumb-item",children:[o.jsx(ua,{size:12,className:"fb-crumb-sep"}),o.jsx("button",{className:"fb-crumb",onClick:()=>Z(j.path),children:j.label})]},z)),a&&o.jsx("button",{className:"fb-up-btn",onClick:()=>Z(a),title:"Go up",children:o.jsx(gy,{size:14})})]}),T&&o.jsxs("div",{className:"fb-search-header",children:[o.jsxs("span",{children:["Found ",T.length,' result(s) for "',v,'"']}),o.jsx("button",{className:"fb-back-btn",onClick:()=>{x(null),E("")},children:"Back to browsing"})]}),g&&o.jsx("div",{className:"fb-error",children:g}),o.jsxs("div",{className:"fb-content",children:[o.jsxs("div",{className:"fb-file-list",children:[m&&o.jsx("div",{className:"fb-loading",children:"Loading..."}),!m&&re.length===0&&o.jsx("div",{className:"fb-empty",children:T?"No files found":"This folder is empty"}),!m&&re.map(j=>{var oe;const z=j.extension||(j.name.includes(".")?"."+((oe=j.name.split(".").pop())==null?void 0:oe.toLowerCase()):""),te=j.type==="file"&&z&&!Uu(z),ee=te?Is(z):null;return o.jsxs("div",{className:`fb-entry ${j.type} ${L.has(j.path)?"selected":""} ${te?"unsupported":""}`,onClick:()=>j.type==="folder"?Te(j):Ce(j.path),onDoubleClick:()=>j.type==="folder"?Te(j):void 0,title:te?`${(ee==null?void 0:ee.label)||"This"} file type cannot be indexed`:j.path,children:[o.jsx("input",{type:"checkbox",className:"fb-entry-checkbox",checked:L.has(j.path),onChange:()=>{V(pe=>{const Me=new Set(pe);return Me.has(j.path)?Me.delete(j.path):Me.add(j.path),Me})},onClick:pe=>pe.stopPropagation(),"aria-label":`Select ${j.name}`}),o.jsx("span",{className:"fb-entry-icon",children:M6(j)}),o.jsx("span",{className:"fb-entry-name",title:j.path,children:j.name}),te&&o.jsx("span",{className:"fb-unsupported-badge",children:"Not indexable"}),o.jsx("span",{className:"fb-entry-size",children:j.type==="file"?F6(j.size):""}),o.jsx("span",{className:"fb-entry-date",children:j6(j.modified)})]},j.path)})]}),w&&o.jsxs("div",{className:"fb-preview",children:[o.jsxs("div",{className:"fb-preview-header",children:[o.jsx("span",{className:"fb-preview-name",children:w.name}),o.jsx("button",{className:"btn-icon-sm",onClick:()=>$(null),"aria-label":"Close preview",children:o.jsx(Tt,{size:14})})]}),o.jsxs("div",{className:"fb-preview-meta",children:[o.jsx("span",{children:w.size_display}),w.total_lines&&o.jsxs("span",{children:[w.total_lines," lines"]}),w.columns&&o.jsxs("span",{children:[w.columns.length," columns"]}),w.row_count!==null&&o.jsxs("span",{children:[w.row_count," rows"]})]}),w.columns&&o.jsxs("div",{className:"fb-preview-columns",children:[o.jsx("strong",{children:"Columns:"})," ",w.columns.join(", ")]}),X?o.jsx("div",{className:"fb-preview-loading",children:"Loading preview..."}):w.is_text&&w.preview_lines.length>0?o.jsx("pre",{className:"fb-preview-content",children:w.preview_lines.slice(0,30).join(`
436
- `)}):o.jsx("div",{className:"fb-preview-binary",children:"Binary file - no preview available"})]})]}),B&&o.jsx(yE,{filename:B.filename,error:B.error,onDismiss:()=>y(null)}),o.jsxs("div",{className:"fb-actions",children:[o.jsx("div",{className:"fb-selection-info",children:L.size>0?`${L.size} item(s) selected`:"Select files to index or analyze"}),Ae&&o.jsx("span",{className:"fb-index-status",children:Ae}),o.jsxs("div",{className:"fb-action-btns",children:[o.jsxs("button",{className:"fb-action-btn secondary",onClick:ge,disabled:L.size===0||le.size>0,title:"Index selected files for RAG search",children:[o.jsx(Ks,{size:14}),"Index Selected"]}),o.jsxs("button",{className:"fb-action-btn primary",onClick:qe,disabled:L.size===0||le.size>0,title:"Index and send selected files to the chat agent for analysis",children:[o.jsx(Ey,{size:14}),"Ask Agent"]})]})]})]})]})})}const Ls=32768,Jd="Qwen3.5-35B-A3B-GGUF",z6=3e5,$6=18e5,Y6=1e4;function xE(e){const[t,n]=k.useState(!1),[r,i]=k.useState(!1),s=k.useRef(null),a=k.useRef(null),u=k.useRef(null),l=k.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)},[]);k.useEffect(()=>l,[l]);const c=k.useCallback((p,g)=>{u.current&&clearInterval(u.current),u.current=setInterval(async()=>{var b,v;try{const E=await Ad();g==="load"?((b=E.model_loaded)==null?void 0:b.toLowerCase())===p.toLowerCase()&&(n(!1),s.current&&(clearTimeout(s.current),s.current=null),u.current&&(clearInterval(u.current),u.current=null)):(E.model_downloaded===!0||((v=E.model_loaded)==null?void 0:v.toLowerCase())===p.toLowerCase())&&(i(!1),a.current&&(clearTimeout(a.current),a.current=null),u.current&&(clearInterval(u.current),u.current=null))}catch{}},Y6)},[]),f=e??Jd,h=k.useCallback(async p=>{const g=p??f;n(!0);try{await _b(g,Ls),P.system.info(`Load model triggered: ${g}`),s.current&&clearTimeout(s.current),s.current=setTimeout(()=>n(!1),z6),c(g,"load")}catch(b){P.system.error("Failed to trigger model load",b),n(!1)}},[f,c]),m=k.useCallback(async(p=!1,g)=>{const b=g??f;i(!0);try{await kb(b,p),P.system.info(`Download model triggered: ${b} (force=${p})`),a.current&&clearTimeout(a.current),a.current=setTimeout(()=>i(!1),$6),c(b,"download")}catch(v){P.system.error("Failed to trigger model download",v),i(!1)}},[f,c]);return{isLoadingModel:t,isDownloadingModel:r,loadModel:h,downloadModel:m}}const Q0=window.location.protocol==="file:"?"http://localhost:4200/api":"/api";function V6(){const{agents:e,setAgents:t}=xe(),[n,r]=k.useState({kind:"idle"}),i=k.useRef(null),s=k.useRef(null),a=k.useRef(null);k.useEffect(()=>()=>{s.current&&clearTimeout(s.current)},[]),k.useEffect(()=>{var g;n.kind==="error"&&((g=a.current)==null||g.scrollIntoView({behavior:"smooth",block:"nearest"}))},[n]);const u=k.useCallback((g,b=5e3)=>{r(g),s.current&&clearTimeout(s.current),(g.kind==="success"||g.kind==="error")&&(s.current=setTimeout(()=>r({kind:"idle"}),b))},[]),l=k.useCallback(async()=>{try{const g=await wd();t(g.agents||[])}catch(g){P.api.warn("Failed to refresh agents after import",g)}},[t]),c=e.filter(g=>g.source!=="builtin"),f=k.useCallback(async()=>{if(window.confirm(`Exported bundle contains your agent source files as-is. Any API keys, tokens, or credentials in agent.py will be included in the bundle. Review before sharing.
437
-
438
- Continue?`)){u({kind:"working",message:"Exporting…"});try{const b=await fetch(`${Q0}/agents/export`,{method:"POST",headers:{"X-Gaia-UI":"1"}});if(!b.ok){const x=await b.text().catch(()=>"");let D=x;try{D=JSON.parse(x).detail||x}catch{}throw new Error(D||`Export failed (HTTP ${b.status})`)}const v=await b.blob(),E=URL.createObjectURL(v),T=document.createElement("a");T.href=E,T.download="gaia-agents-export.zip",document.body.appendChild(T),T.click(),document.body.removeChild(T),URL.revokeObjectURL(E),u({kind:"success",message:"Export downloaded."})}catch(b){console.error("Agent export failed:",b);const v=b instanceof Error?b.message:String(b);P.api.error("Agent export failed",b),u({kind:"error",message:`Export failed: ${v}`})}}},[u]),h=k.useCallback(()=>{var g;(g=i.current)==null||g.click()},[]),m=k.useCallback(async g=>{var x;const b=(x=g.target.files)==null?void 0:x[0];if(g.target.value="",!b)return;let v=null;if(b.size<=100*1024*1024)try{v=await W6(b)}catch(D){P.api.warn("Could not pre-read bundle.json from zip",D)}const E=v&&v.length>0?`Agents to install: ${v.join(", ")}`:"Agents to install: (unable to read bundle contents — contents will be validated by the server)";if(window.confirm(`Importing this bundle will run third-party Python code on your machine when the agent is selected. Only import bundles from sources you trust.
439
-
440
- `+E+`
441
-
442
- Import?`)){u({kind:"working",message:"Uploading…"});try{const D=new FormData;D.append("bundle",b,b.name);const F=await fetch(`${Q0}/agents/import`,{method:"POST",headers:{"X-Gaia-UI":"1"},body:D});if(!F.ok){const w=await F.text().catch(()=>"");let $=w;try{$=JSON.parse(w).detail||w}catch{}throw new Error($||`Import failed (HTTP ${F.status})`)}const S=await F.json(),R=S.imported||[],L=S.overwritten||[];await l();let V;if(R.length===0?V="No agents imported":(V=`Installed ${R.length} agent(s): ${R.join(", ")}`,L.length>0&&(V+=` (replaced: ${L.join(", ")})`)),S.requires_restart&&(V+=" — restart required for replaced agents to take full effect"),S.errors&&S.errors.length>0){const w=S.errors.map($=>`${$.id}: ${$.error}`).join("; ");u({kind:"error",message:`${V}. Errors: ${w}`})}else u({kind:"success",message:V})}catch(D){console.error("Agent import failed:",D);const F=D instanceof Error?D.message:String(D);P.api.error("Agent import failed",D),u({kind:"error",message:`Import failed: ${F}`})}}},[u,l]),p=n.kind==="working";return o.jsxs("section",{className:"settings-section",children:[o.jsx("h4",{children:"Custom Agents"}),c.length===0?o.jsx("p",{className:"danger-warning",style:{marginBottom:12},children:"No custom agents installed yet. Import a bundle below to add one."}):o.jsx("div",{className:"status-grid",style:{marginBottom:12},children:c.map(g=>o.jsxs("div",{className:"status-row",children:[o.jsx("span",{className:"status-label",children:g.name}),o.jsxs("div",{className:"status-value-wrap",children:[o.jsx("span",{className:"status-value ok",children:g.id}),g.source&&g.source!=="builtin"&&o.jsx("span",{className:"status-hint",children:o.jsx("code",{children:g.source})})]})]},g.id))}),o.jsxs("div",{className:"setting-actions",style:{display:"flex",gap:8,flexWrap:"wrap"},children:[o.jsx("button",{className:"btn-model-save",onClick:f,disabled:p||c.length===0,title:c.length===0?"No custom agents to export":void 0,children:p&&n.message.startsWith("Export")?o.jsxs(o.Fragment,{children:[o.jsx(Ln,{size:13,className:"btn-spinner"})," Exporting…"]}):o.jsxs(o.Fragment,{children:[o.jsx(Li,{size:13,style:{verticalAlign:-2,marginRight:6}}),"Export All"]})}),o.jsx("button",{className:"btn-model-save",onClick:h,disabled:p,children:p&&n.message.startsWith("Upload")?o.jsxs(o.Fragment,{children:[o.jsx(Ln,{size:13,className:"btn-spinner"})," Uploading…"]}):o.jsxs(o.Fragment,{children:[o.jsx(Ks,{size:13,style:{verticalAlign:-2,marginRight:6}}),"Import"]})}),o.jsx("input",{ref:i,type:"file",accept:".zip,application/zip",style:{display:"none"},onChange:m})]}),n.kind!=="idle"&&o.jsxs("div",{ref:a,className:"danger-warning",style:{marginTop:12,display:"flex",alignItems:"center",gap:8,color:n.kind==="error"?"var(--accent-gold)":"var(--text-secondary)"},role:"status",children:[n.kind==="working"&&o.jsx(Ln,{size:14,className:"btn-spinner"}),n.kind==="success"&&o.jsx(il,{size:14}),n.kind==="error"&&o.jsx(Qn,{size:14}),o.jsx("span",{children:n.message})]})]})}async function W6(e){const t=await e.arrayBuffer(),n=new DataView(t),r=new Uint8Array(t),i=Math.min(t.byteLength,65557),s=t.byteLength-i;let a=-1;for(let f=t.byteLength-22;f>=s;f--)if(n.getUint32(f,!0)===101010256){a=f;break}if(a<0)return null;const u=n.getUint16(a+10,!0);let c=n.getUint32(a+16,!0);for(let f=0;f<u;f++){if(c+46>t.byteLength||n.getUint32(c,!0)!==33639248)return null;const h=n.getUint16(c+10,!0),m=n.getUint32(c+20,!0),p=n.getUint16(c+28,!0),g=n.getUint16(c+30,!0),b=n.getUint16(c+32,!0),v=n.getUint32(c+42,!0);if(new TextDecoder("utf-8").decode(r.subarray(c+46,c+46+p))==="bundle.json"){if(v+30>t.byteLength||n.getUint32(v,!0)!==67324752)return null;const T=n.getUint16(v+26,!0),x=n.getUint16(v+28,!0),D=v+30+T+x,F=D+m;if(F>t.byteLength)return null;const S=r.subarray(D,F);let R;if(h===0)R=new TextDecoder("utf-8").decode(S);else if(h===8){const w=new DecompressionStream("deflate-raw"),$=new Blob([S]).stream().pipeThrough(w),X=await new Response($).arrayBuffer();R=new TextDecoder("utf-8").decode(X)}else return null;const L=JSON.parse(R),V=L==null?void 0:L.agent_ids;return Array.isArray(V)&&V.every(w=>typeof w=="string")?V:null}c+=46+p+g+b}return null}function q6(){const{setShowSettings:e,sessions:t,removeSession:n}=xe(),[r,i]=k.useState(null),[s,a]=k.useState(!0),[u,l]=k.useState([]);k.useEffect(()=>{P.system.info("Checking system status...");const R=P.system.time();Ad().then(L=>{i(L),P.system.timed("System status received",R,{lemonade:L.lemonade_running?"running":"stopped",model:L.model_loaded||"none",embedding:L.embedding_model_loaded?"yes":"no",disk:`${L.disk_space_gb}GB free`,memory:`${L.memory_available_gb}GB available`}),L.lemonade_running||P.system.warn("Lemonade Server is NOT running.")}).catch(L=>{P.system.error("Failed to get system status",L),i(null)}).finally(()=>a(!1)),Hb().then(L=>l(L.servers)).catch(()=>{})},[]);const c=(r==null?void 0:r.default_model_name)??Jd,{isLoadingModel:f,isDownloadingModel:h,loadModel:m,downloadModel:p}=xE(c),[g,b]=k.useState(!1),v=k.useRef(null);k.useEffect(()=>()=>{v.current&&clearTimeout(v.current)},[]);const E=k.useCallback(async()=>{if(!g){b(!0),v.current&&clearTimeout(v.current),v.current=setTimeout(()=>b(!1),4e3);return}b(!1),v.current&&clearTimeout(v.current),P.system.warn(`Clearing ALL data: ${t.length} session(s)`);const R=P.system.time();let L=0;for(const V of t)try{await k1(V.id),n(V.id),L++}catch(w){P.system.error(`Failed to delete session ${V.id}`,w)}P.system.timed(`Cleared ${L}/${t.length} session(s)`,R),e(!1)},[g,t,n,e]),T="0.17.3",x=!!(r!=null&&r.lemonade_running&&r.model_loaded&&r.expected_model_loaded===!1),D=!!(r!=null&&r.lemonade_running&&r.model_loaded&&r.context_size_sufficient===!1),F=!!(r!=null&&r.lemonade_running&&!r.model_loaded&&r.model_downloaded===!1),S=x||D;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:R=>R.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(Tt,{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(cn,{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(cn,{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: ${c}`:void 0:"Run: gaia init --profile chat"}),r.model_size_gb!=null&&o.jsx(cn,{label:"Model Size",value:`${r.model_size_gb} GB`,ok:!0}),r.model_device&&o.jsx(cn,{label:"Device",value:r.model_device.toUpperCase(),ok:r.model_device!=="cpu"}),r.model_context_size!=null&&o.jsx(cn,{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(cn,{label:"Capabilities",value:r.model_labels.join(", "),ok:!0}),o.jsx(cn,{label:"Embedding Model",value:r.embedding_model_loaded?"Available":"Not loaded",ok:r.embedding_model_loaded}),r.gpu_name&&o.jsx(cn,{label:"GPU",value:`${r.gpu_name}${r.gpu_vram_gb?` (${r.gpu_vram_gb} GB)`:""}`,ok:!0}),o.jsx(cn,{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(cn,{label:"Memory",value:`${r.memory_available_gb} GB available`,ok:r.memory_available_gb>2}),r.processor_name&&o.jsx(cn,{label:"Processor",value:r.processor_name,ok:r.device_supported!==!1})]}),F&&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:c})," 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(Ln,{size:13,className:"btn-spinner"})," Downloading…"]}):"Download"})]}),S&&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:c})," with ",(Ls/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(Ln,{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(Ln,{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(R=>o.jsxs("div",{className:"status-row",children:[o.jsx("span",{className:"status-label",children:R.name}),o.jsx("div",{className:"status-value-wrap",children:R.connected?o.jsxs("span",{className:"status-value ok mcp-status-connected",children:[o.jsx(il,{size:12}),R.tool_count," tool",R.tool_count!==1?"s":""]}):o.jsxs("span",{className:"status-value warn mcp-status-failed",title:R.error??void 0,children:[o.jsx(Qn,{size:12}),"Failed"]})})]},R.name))})]}),o.jsx(V6,{}),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:E,children:g?"Click again to confirm":"Clear All Data"})]})]})]})]})})}function cn({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 Q6="modulepreload",G6=function(e,t){return new URL(e,t).href},G0={},K6=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(c=>{if(c=G6(c,r),c in G0)return;G0[c]=!0;const f=c.endsWith(".css"),h=f?'[rel="stylesheet"]':"";if(!!r)for(let g=a.length-1;g>=0;g--){const b=a[g];if(b.href===c&&(!f||b.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${c}"]${h}`))return;const p=document.createElement("link");if(p.rel=f?"stylesheet":Q6,f||(p.as="script"),p.crossOrigin="",p.href=c,l&&p.setAttribute("nonce",l),document.head.appendChild(p),f)return new Promise((g,b)=>{p.addEventListener("load",g),p.addEventListener("error",()=>b(new Error(`Unable to preload CSS for ${c}`)))})}))}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 To=null;function X6({isOpen:e,onClose:t,error:n}){const[r,i]=k.useState(null),[s,a]=k.useState(!1),u=k.useRef(null),l=k.useCallback(async()=>{try{const m=await A1();return i(m),m}catch(m){return P.system.error("Failed to fetch tunnel status",m),null}},[]);k.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]),k.useEffect(()=>{if(!(r!=null&&r.active)||!r.url||!r.token||!u.current)return;const m=`${r.url}/?token=${r.token}`;P.system.info(`Generating QR code for: ${m}`),(async()=>{if(!To)try{const b=await K6(()=>import("./browser-CTB2jwNe.js").then(v=>v.b),[],import.meta.url);To=b.default||b}catch{P.system.error("QR code library not available - install with: npm install qrcode");return}const g=document.documentElement.getAttribute("data-theme")==="dark";try{await To.toCanvas(u.current,m,{width:200,margin:2,color:{dark:g?"#e6edf3":"#111827",light:g?"#0d0d0d":"#ffffff"}})}catch(b){P.system.error("QR code generation failed",b)}})()},[r==null?void 0:r.active,r==null?void 0:r.url,r==null?void 0:r.token]);const c=k.useRef(null),f=k.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),c.current&&clearTimeout(c.current),c.current=setTimeout(()=>a(!1),2e3)})},[r]);if(k.useEffect(()=>()=>{c.current&&clearTimeout(c.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(m1,{size:18}),"Mobile Access"]}),o.jsx("button",{className:"btn-icon",onClick:t,"aria-label":"Close",children:o.jsx(Tt,{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(aa,{size:13}):o.jsx(sl,{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 J6({onRetry:e}){var E;const{backendConnected:t,systemStatus:n,currentSessionId:r,messages:i}=xe(),[s,a]=k.useState(!1),u=!!r&&i.length>0,l=(n==null?void 0:n.default_model_name)??Jd,{isLoadingModel:c,isDownloadingModel:f,loadModel:h,downloadModel:m}=xE(l),p=k.useRef(n==null?void 0:n.lemonade_running),g=k.useRef(n==null?void 0:n.model_downloaded),b=k.useRef(n==null?void 0:n.context_size_sufficient),v=k.useRef(n==null?void 0:n.expected_model_loaded);if(k.useEffect(()=>{if(u)return;const T=n==null?void 0:n.lemonade_running,x=n==null?void 0:n.model_downloaded,D=n==null?void 0:n.context_size_sufficient,F=n==null?void 0:n.expected_model_loaded;let S=!1;p.current!==T&&(p.current=T,T===!1&&(S=!0)),g.current!==x&&(g.current=x,x===!1&&(S=!0)),b.current!==D&&(b.current=D,D===!1&&(S=!0)),v.current!==F&&(v.current=F,F===!1&&(S=!0)),S&&a(!1)},[n,u]),(n==null?void 0:n.init_state)==="initializing"){const T=(E=n.init_tasks)==null?void 0:E.find(D=>D.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(Ln,{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(Vy,{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($r,{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(Tt,{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(Li,{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(Ln,{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(Tt,{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(xy,{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."]})]}),c?o.jsxs("span",{className:"connection-banner__loading",children:[o.jsx(Ln,{size:13,className:"connection-banner__spinner"}),"Loading…"]}):o.jsx("button",{className:"connection-banner__retry",onClick:()=>h(),children:"Load Now"}),e&&!c&&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(Tt,{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(Ny,{size:16})}),o.jsxs("div",{className:"connection-banner__text",children:["LLM context window is too small (",T.toLocaleString()," tokens;"," ",Ls.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 ",Ls.toLocaleString(),", or restart with:"," ",o.jsxs("code",{children:["lemonade-server serve --ctx-size ",Ls]})]})]}),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(Tt,{size:14})})]})}return null}const Z6={status:"idle",version:null,progress:0,releaseNotes:null,error:null};function eI(){const[e,t]=k.useState(Z6);return k.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 tI(){const e=eI(),[t,n]=k.useState(!1),r=k.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(Li,{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(Li,{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(Tt,{size:11})})]}):e.status==="downloaded"?o.jsxs("div",{className:"update-chip update-chip--ready",role:"status","aria-live":"polite",children:[o.jsx(h1,{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($r,{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(Tt,{size:11})})]}):null}function nI(){const e=Bu(b6),t=Bu(n=>n.respondToPermission);return e?o.jsx("div",{className:"permission-overlay",role:"dialog","aria-modal":"true","aria-label":"Permission Request",children:o.jsx(rI,{notification:e,onRespond:t},e.id)}):null}function rI({notification:e,onRespond:t}){const n=e.timeoutSeconds!=null&&e.timeoutSeconds>0,[r,i]=k.useState(n?e.timeoutSeconds:null),s=k.useRef(null),[a,u]=k.useState(!1),[l,c]=k.useState(!1),f=k.useRef(!1),h=k.useRef(t);h.current=t,k.useEffect(()=>{if(n)return s.current=setInterval(()=>{i(v=>v===null||v<=1?(s.current&&clearInterval(s.current),0):v-1)},1e3),()=>{s.current&&clearInterval(s.current)}},[n]),k.useEffect(()=>{if(r===0){if(f.current)return;f.current=!0,u(!0),h.current(e.id,"deny",!1)}},[r,e.id]);const m=k.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=k.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]);k.useEffect(()=>{const v=E=>{E.key==="Enter"&&!E.shiftKey?(E.preventDefault(),m()):E.key==="Escape"&&(E.preventDefault(),p())};return window.addEventListener("keydown",v),()=>window.removeEventListener("keydown",v)},[m,p]);const g=e.toolArgs,b=g&&Object.keys(g).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(Hy,{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(l1,{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($r,{size:14}),o.jsx("span",{children:"Tool Invocation"})]}),o.jsx("div",{className:"permission-tool-name",children:o.jsx("code",{children:e.tool})}),b&&o.jsx("div",{className:"permission-tool-args",children:o.jsx("pre",{children:JSON.stringify(g,null,2)})})]}),e.priority==="critical"&&o.jsxs("div",{className:"permission-critical-banner",children:[o.jsx($r,{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:v=>c(v.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(Tt,{size:16}),"Deny"]}),o.jsxs("button",{className:"permission-btn permission-btn-allow",onClick:m,disabled:a,title:"Allow (Enter)",children:[o.jsx(aa,{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 Ua({show:e,children:t,duration:n=250}){const[r,i]=k.useState(!1),[s,a]=k.useState("idle");return k.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 iI(){const{currentSessionId:e,setSessions:t,setCurrentSession:n,addSession:r,removeSession:i,updateSessionInList:s,setMessages:a,showDocLibrary:u,showFileBrowser:l,showSettings:c,sidebarOpen:f,toggleSidebar:h,setSidebarOpen:m,systemStatus:p,setSystemStatus:g,setBackendConnected:b,setAgents:v}=xe(),E=k.useRef(""),T=k.useCallback(async()=>{try{const te=(await wd()).agents||[],ee=te.map(oe=>oe.id).sort().join(",");ee!==E.current&&(E.current=ee,v(te))}catch{}},[v]);k.useEffect(()=>{T();const z=setInterval(T,3e4);return()=>clearInterval(z)},[T]);const[x,D]=k.useState(!1),[F,S]=k.useState(!1),[R,L]=k.useState(!1),[V,w]=k.useState(null),$=k.useRef(null),X=k.useRef(0),he=3,le=k.useCallback(async()=>{try{const z=await Ad();if(b(!0),z.lemonade_running)X.current=0,g(z);else if(X.current+=1,P.system.warn(`Lemonade health check failed (${X.current}/${he})`),X.current>=he)g(z);else{const te=xe.getState().systemStatus;te&&te.lemonade_running?g({...te,disk_space_gb:z.disk_space_gb,memory_available_gb:z.memory_available_gb}):g(z)}P.system.info("System status:",{lemonade:z.lemonade_running,model:z.model_loaded,failCount:X.current})}catch(z){P.system.warn("System status check failed",z),b(!1),g(null)}},[g,b]),de=k.useRef(3e3);k.useEffect(()=>(le(),de.current=3e3,$.current=setInterval(le,3e3),()=>{$.current&&clearInterval($.current)}),[le]),k.useEffect(()=>{const z=p==null?void 0:p.init_state;if(!z||z==="initializing")return;const te=15e3;te!==de.current&&(de.current=te,$.current&&clearInterval($.current),$.current=setInterval(le,te))},[p==null?void 0:p.init_state,le]);const Ae=k.useRef(null),ae=k.useRef("");k.useEffect(()=>{xb("0.17.3"),P.system.info("App mounting, loading sessions...");const z=P.system.time(),te=oe=>oe.map(pe=>`${pe.id}|${pe.updated_at}|${pe.title}`).join(`
443
- `),ee=(oe=!1)=>{Sb().then(pe=>{const Me=pe.sessions||[];if(oe){t(Me),b(!0),ae.current=te(Me),P.system.timed(`Loaded ${Me.length} session(s)`,z);return}const bn=xe.getState().sessions;if(Me.length===0&&bn.length>0){P.system.warn(`Session poll returned 0 sessions but sidebar has ${bn.length} — skipping update to prevent data loss`);return}const xn=te(Me);xn!==ae.current&&(P.system.info(`Session list changed (${bn.length} → ${Me.length} sessions)`),t(Me),ae.current=xn)}).catch(pe=>{oe&&(P.system.error("Failed to load sessions from backend",pe),P.system.warn("Is the Python backend running? Start it with: gaia chat --ui"))})};return ee(!0),Ae.current=setInterval(()=>ee(!1),5e3),()=>{Ae.current&&clearInterval(Ae.current)}},[t,r,i,s,b]),k.useEffect(()=>{if(e)return;const te=new URLSearchParams(window.location.search).get("session"),ee=window.location.hash.replace(/^#/,""),oe=te||ee;if(!oe)return;P.nav.info(`URL session parameter: ${oe}`);const pe=setTimeout(()=>{const{sessions:Me}=xe.getState();let bn=Me.some(xn=>xn.id===oe)?oe:zb(Me,oe);bn?(n(bn),a([])):P.nav.warn(`Session ${oe} not found in loaded sessions`)},500);return()=>clearTimeout(pe)},[e,n,a]),k.useEffect(()=>{if(e){const z=mn(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]),k.useEffect(()=>{A1().then(z=>{S(z.active===!0)}).catch(()=>{})},[]),k.useEffect(()=>{const z=()=>{window.innerWidth>768&&m(!0)};return window.addEventListener("resize",z),()=>window.removeEventListener("resize",z)},[m]);const[I,B]=k.useState(null),y=k.useCallback(async()=>{P.chat.info("Creating new task session..."),B(null);try{const{activeAgentId:z}=xe.getState(),te=await hc({title:"New Task",agent_type:z});P.chat.info(`Session created: id=${te.id}, title="${te.title}"`),r(te),n(te.id),a([]),window.innerWidth<=768&&m(!1)}catch(z){P.chat.error("Failed to create session",z),le(),B("Failed to create task. Is the server running?"),setTimeout(()=>B(null),6e3)}},[r,n,a,m,le]),Z=k.useCallback(async z=>{xe.getState().setActiveAgentId(z),await y()},[y]),{setPendingPrompt:ce}=xe(),N=k.useCallback(async z=>{P.chat.info(`New task with prompt: "${z.slice(0,60)}..."`),ce(z),await y()},[y,ce]),Te=k.useCallback(async()=>{P.chat.info("Creating builder agent session..."),B(null);try{ce("Hi, I'd like to create a new custom agent.");const z=await hc({title:"New Agent",agent_type:"builder"});P.chat.info(`Builder session created: id=${z.id}`),r(z),n(z.id),a([]),window.innerWidth<=768&&m(!1)}catch(z){ce(null),P.chat.error("Failed to create builder session",z),le(),B("Failed to create task. Is the server running?"),setTimeout(()=>B(null),6e3)}},[r,n,a,m,le,ce]),Ce=k.useCallback(async()=>{if(F){P.system.info("Stopping mobile access tunnel...");try{await Ub()}catch{}S(!1),D(!1)}else{P.system.info("Starting mobile access tunnel..."),D(!0),L(!0),w(null);try{const z=await Bb();z.error?(P.system.error("Tunnel failed to start:",z.error),S(!1),w(z.error)):(S(!0),P.system.info("Tunnel started successfully"))}catch(z){P.system.error("Tunnel start error:",z),S(!1),w(z instanceof Error?z.message:"Failed to connect")}finally{L(!1)}}},[F]);k.useEffect(()=>{const{sessions:z,setActiveAgentId:te}=xe.getState(),ee=z.find(oe=>oe.id===e);ee!=null&&ee.agent_type&&te(ee.agent_type)},[e]),k.useEffect(()=>{e?P.nav.info(`Viewing session: ${e}`):P.nav.info("Viewing welcome screen (no session selected)")},[e]),k.useEffect(()=>{u&&P.ui.info("Document Library opened")},[u]),k.useEffect(()=>{c&&P.ui.info("Settings modal opened")},[c]);const[ge,qe]=k.useState(typeof window<"u"&&window.innerWidth<=768);k.useEffect(()=>{const z=()=>qe(window.innerWidth<=768);return window.addEventListener("resize",z),()=>window.removeEventListener("resize",z)},[]);const[lt,nt]=k.useState(!1),[re,j]=k.useState(null);return k.useEffect(()=>{if(e!==re){nt(!0);const z=setTimeout(()=>{j(e),requestAnimationFrame(()=>{requestAnimationFrame(()=>{nt(!1)})})},220);return()=>clearTimeout(z)}},[e,re]),o.jsxs("div",{className:"app",children:[o.jsx("button",{className:"sidebar-toggle",onClick:h,"aria-label":f?"Close sidebar":"Open sidebar",children:o.jsx(Ly,{size:18})}),o.jsx("div",{className:`sidebar-overlay ${f?"visible":""}`,onClick:()=>m(!1),"aria-hidden":"true"}),o.jsx(Yb,{onNewTask:y,tunnelActive:F,tunnelLoading:R,onMobileToggle:Ce}),o.jsxs("div",{className:"main-content",children:[o.jsx(J6,{onRetry:le}),o.jsx("div",{className:`view-container ${lt?"view-transitioning":""}`,children:re?o.jsx(A6,{sessionId:re,onCreateAgent:Te,onAgentChange:Z},re):o.jsx(L6,{onNewTask:y,onSendPrompt:N,onCreateAgent:Te})})]}),o.jsx(Ua,{show:u,children:o.jsx(P6,{})}),o.jsx(Ua,{show:l,children:o.jsx(H6,{})}),o.jsx(Ua,{show:c,children:o.jsx(q6,{})}),!ge&&o.jsx(Ua,{show:x,children:o.jsx(X6,{isOpen:x,onClose:()=>D(!1),error:V})}),o.jsx(nI,{}),o.jsx(tI,{}),I&&o.jsx("div",{className:"toast",role:"alert",children:I})]})}const sI=localStorage.getItem("gaia-chat-theme");sI!=="light"&&document.documentElement.setAttribute("data-theme","dark");yo.createRoot(document.getElementById("root")).render(o.jsx(Ds.StrictMode,{children:o.jsx(iI,{})}));