@inploi/plugin-kin 2.4.0 → 2.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cdn/index.js +73 -73
- package/dist/{code-block-37QAKDTI-f97ff7e2.cjs → code-block-37QAKDTI-7eb2a6e1.cjs} +1 -1
- package/dist/{code-block-37QAKDTI-061e40cc.js → code-block-37QAKDTI-c0a4b004.js} +1 -1
- package/dist/components/launcher-input.d.ts +1 -1
- package/dist/components/widget.d.ts +1 -1
- package/dist/{index-514a2605.js → index-37da3520.js} +6691 -6492
- package/dist/index-f19ff544.cjs +146 -0
- package/dist/{mermaid-4DMBBIKO-77dcff73.cjs → mermaid-4DMBBIKO-6511b2b6.cjs} +1 -1
- package/dist/{mermaid-4DMBBIKO-80433a8b.js → mermaid-4DMBBIKO-9c98e510.js} +1 -1
- package/dist/plugin-kin.cjs +1 -1
- package/dist/plugin-kin.js +1 -1
- package/package.json +5 -1
- package/dist/index-fd445cd5.cjs +0 -146
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
"use strict";var y0=Object.defineProperty;var w0=(e,t,n)=>t in e?y0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var de=(e,t,n)=>(w0(e,typeof t!="symbol"?t+"":t,n),n);const Ci=require("@inploi/sdk");var ni,W,Fu,Hu,jt,ws,Uu,na,zu,dn={},$u=[],A0=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,ri=Array.isArray;function Ot(e,t){for(var n in t)e[n]=t[n];return e}function Yu(e){var t=e.parentNode;t&&t.removeChild(e)}function Pt(e,t,n){var r,i,a,s={};for(a in t)a=="key"?r=t[a]:a=="ref"?i=t[a]:s[a]=t[a];if(arguments.length>2&&(s.children=arguments.length>3?ni.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(a in e.defaultProps)s[a]===void 0&&(s[a]=e.defaultProps[a]);return vr(e,s,r,i,null)}function vr(e,t,n,r,i){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i??++Fu};return i==null&&W.vnode!=null&&W.vnode(a),a}function je(e){return e.children}function pt(e,t){this.props=e,this.context=t}function Br(e,t){if(t==null)return e.__?Br(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?Br(e):null}function ju(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return ju(e)}}function ra(e){(!e.__d&&(e.__d=!0)&&jt.push(e)&&!Fr.__r++||ws!==W.debounceRendering)&&((ws=W.debounceRendering)||Uu)(Fr)}function Fr(){var e,t,n,r,i,a,s,o,u;for(jt.sort(na);e=jt.shift();)e.__d&&(t=jt.length,r=void 0,i=void 0,a=void 0,o=(s=(n=e).__v).__e,(u=n.__P)&&(r=[],i=[],(a=Ot({},s)).__v=s.__v+1,va(u,s,a,n.__n,u.ownerSVGElement!==void 0,s.__h!=null?[o]:null,r,o??Br(s),s.__h,i),Gu(r,s,i),s.__e!=o&&ju(s)),jt.length>t&&jt.sort(na));Fr.__r=0}function qu(e,t,n,r,i,a,s,o,u,l,f){var d,p,h,m,T,w,x,S,C,O,P=0,A=r&&r.__k||$u,U=A.length,v=U,F=t.length;for(n.__k=[],d=0;d<F;d++)(m=n.__k[d]=(m=t[d])==null||typeof m=="boolean"||typeof m=="function"?null:typeof m=="string"||typeof m=="number"||typeof m=="bigint"?vr(null,m,null,null,m):ri(m)?vr(je,{children:m},null,null,null):m.__b>0?vr(m.type,m.props,m.key,m.ref?m.ref:null,m.__v):m)!=null&&(m.__=n,m.__b=n.__b+1,(S=C0(m,A,x=d+P,v))===-1?h=dn:(h=A[S]||dn,A[S]=void 0,v--),va(e,m,h,i,a,s,o,u,l,f),T=m.__e,(p=m.ref)&&h.ref!=p&&(h.ref&&La(h.ref,null,m),f.push(p,m.__c||T,m)),T!=null&&(w==null&&(w=T),O=!(C=h===dn||h.__v===null)&&S===x,C?S==-1&&P--:S!==x&&(S===x+1?(P++,O=!0):S>x?v>F-x?(P+=S-x,O=!0):P--:P=S<x&&S==x-1?S-x:0),x=d+P,O=O||S==d&&!C,typeof m.type!="function"||S===x&&h.__k!==m.__k?typeof m.type=="function"||O?m.__d!==void 0?(u=m.__d,m.__d=void 0):u=T.nextSibling:u=Wu(e,T,u):u=Vu(m,u,e),typeof n.type=="function"&&(n.__d=u)));for(n.__e=w,d=U;d--;)A[d]!=null&&(typeof n.type=="function"&&A[d].__e!=null&&A[d].__e==n.__d&&(n.__d=A[d].__e.nextSibling),Qu(A[d],A[d]))}function Vu(e,t,n){for(var r,i=e.__k,a=0;i&&a<i.length;a++)(r=i[a])&&(r.__=e,t=typeof r.type=="function"?Vu(r,t,n):Wu(n,r.__e,t));return t}function Hr(e,t){return t=t||[],e==null||typeof e=="boolean"||(ri(e)?e.some(function(n){Hr(n,t)}):t.push(e)),t}function Wu(e,t,n){return n==null||n.parentNode!==e?e.insertBefore(t,null):t==n&&t.parentNode!=null||e.insertBefore(t,n),t.nextSibling}function C0(e,t,n,r){var i=e.key,a=e.type,s=n-1,o=n+1,u=t[n];if(u===null||u&&i==u.key&&a===u.type)return n;if(r>(u!=null?1:0))for(;s>=0||o<t.length;){if(s>=0){if((u=t[s])&&i==u.key&&a===u.type)return s;s--}if(o<t.length){if((u=t[o])&&i==u.key&&a===u.type)return o;o++}}return-1}function S0(e,t,n,r,i){var a;for(a in n)a==="children"||a==="key"||a in t||Ur(e,a,null,n[a],r);for(a in t)i&&typeof t[a]!="function"||a==="children"||a==="key"||a==="value"||a==="checked"||n[a]===t[a]||Ur(e,a,t[a],n[a],r)}function As(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||A0.test(t)?n:n+"px"}function Ur(e,t,n,r,i){var a;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||As(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||As(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")a=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+a]=n,n?r||e.addEventListener(t,a?Ss:Cs,a):e.removeEventListener(t,a?Ss:Cs,a);else if(t!=="dangerouslySetInnerHTML"){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,n))}}function Cs(e){return this.l[e.type+!1](W.event?W.event(e):e)}function Ss(e){return this.l[e.type+!0](W.event?W.event(e):e)}function va(e,t,n,r,i,a,s,o,u,l){var f,d,p,h,m,T,w,x,S,C,O,P,A,U,v,F=t.type;if(t.constructor!==void 0)return null;n.__h!=null&&(u=n.__h,o=t.__e=n.__e,t.__h=null,a=[o]),(f=W.__b)&&f(t);try{e:if(typeof F=="function"){if(x=t.props,S=(f=F.contextType)&&r[f.__c],C=f?S?S.props.value:f.__:r,n.__c?w=(d=t.__c=n.__c).__=d.__E:("prototype"in F&&F.prototype.render?t.__c=d=new F(x,C):(t.__c=d=new pt(x,C),d.constructor=F,d.render=N0),S&&S.sub(d),d.props=x,d.state||(d.state={}),d.context=C,d.__n=r,p=d.__d=!0,d.__h=[],d._sb=[]),d.__s==null&&(d.__s=d.state),F.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=Ot({},d.__s)),Ot(d.__s,F.getDerivedStateFromProps(x,d.__s))),h=d.props,m=d.state,d.__v=t,p)F.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(F.getDerivedStateFromProps==null&&x!==h&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(x,C),!d.__e&&(d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(x,d.__s,C)===!1||t.__v===n.__v)){for(t.__v!==n.__v&&(d.props=x,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(I){I&&(I.__=t)}),O=0;O<d._sb.length;O++)d.__h.push(d._sb[O]);d._sb=[],d.__h.length&&s.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(x,d.__s,C),d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(h,m,T)})}if(d.context=C,d.props=x,d.__P=e,d.__e=!1,P=W.__r,A=0,"prototype"in F&&F.prototype.render){for(d.state=d.__s,d.__d=!1,P&&P(t),f=d.render(d.props,d.state,d.context),U=0;U<d._sb.length;U++)d.__h.push(d._sb[U]);d._sb=[]}else do d.__d=!1,P&&P(t),f=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++A<25);d.state=d.__s,d.getChildContext!=null&&(r=Ot(Ot({},r),d.getChildContext())),p||d.getSnapshotBeforeUpdate==null||(T=d.getSnapshotBeforeUpdate(h,m)),qu(e,ri(v=f!=null&&f.type===je&&f.key==null?f.props.children:f)?v:[v],t,n,r,i,a,s,o,u,l),d.base=t.__e,t.__h=null,d.__h.length&&s.push(d),w&&(d.__E=d.__=null)}else a==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=I0(n.__e,t,n,r,i,a,s,u,l);(f=W.diffed)&&f(t)}catch(I){t.__v=null,(u||a!=null)&&(t.__e=o,t.__h=!!u,a[a.indexOf(o)]=null),W.__e(I,t,n)}}function Gu(e,t,n){for(var r=0;r<n.length;r++)La(n[r],n[++r],n[++r]);W.__c&&W.__c(t,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(a){a.call(i)})}catch(a){W.__e(a,i.__v)}})}function I0(e,t,n,r,i,a,s,o,u){var l,f,d,p=n.props,h=t.props,m=t.type,T=0;if(m==="svg"&&(i=!0),a!=null){for(;T<a.length;T++)if((l=a[T])&&"setAttribute"in l==!!m&&(m?l.localName===m:l.nodeType===3)){e=l,a[T]=null;break}}if(e==null){if(m===null)return document.createTextNode(h);e=i?document.createElementNS("http://www.w3.org/2000/svg",m):document.createElement(m,h.is&&h),a=null,o=!1}if(m===null)p===h||o&&e.data===h||(e.data=h);else{if(a=a&&ni.call(e.childNodes),f=(p=n.props||dn).dangerouslySetInnerHTML,d=h.dangerouslySetInnerHTML,!o){if(a!=null)for(p={},T=0;T<e.attributes.length;T++)p[e.attributes[T].name]=e.attributes[T].value;(d||f)&&(d&&(f&&d.__html==f.__html||d.__html===e.innerHTML)||(e.innerHTML=d&&d.__html||""))}if(S0(e,h,p,i,o),d)t.__k=[];else if(qu(e,ri(T=t.props.children)?T:[T],t,n,r,i&&m!=="foreignObject",a,s,a?a[0]:n.__k&&Br(n,0),o,u),a!=null)for(T=a.length;T--;)a[T]!=null&&Yu(a[T]);o||("value"in h&&(T=h.value)!==void 0&&(T!==e.value||m==="progress"&&!T||m==="option"&&T!==p.value)&&Ur(e,"value",T,p.value,!1),"checked"in h&&(T=h.checked)!==void 0&&T!==e.checked&&Ur(e,"checked",T,p.checked,!1))}return e}function La(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(r){W.__e(r,n)}}function Qu(e,t,n){var r,i;if(W.unmount&&W.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||La(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(a){W.__e(a,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&Qu(r[i],t,n||typeof e.type!="function");n||e.__e==null||Yu(e.__e),e.__=e.__e=e.__d=void 0}function N0(e,t,n){return this.constructor(e,n)}function Is(e,t,n){var r,i,a,s;W.__&&W.__(e,t),i=(r=typeof n=="function")?null:n&&n.__k||t.__k,a=[],s=[],va(t,e=(!r&&n||t).__k=Pt(je,null,[e]),i||dn,dn,t.ownerSVGElement!==void 0,!r&&n?[n]:i?null:t.firstChild?ni.call(t.childNodes):null,a,!r&&n?n:i?i.__e:t.firstChild,r,s),Gu(a,e,s)}function Ra(e,t){var n={__c:t="__cC"+zu++,__:e,Consumer:function(r,i){return r.children(i)},Provider:function(r){var i,a;return this.getChildContext||(i=[],(a={})[t]=this,this.getChildContext=function(){return a},this.shouldComponentUpdate=function(s){this.props.value!==s.value&&i.some(function(o){o.__e=!0,ra(o)})},this.sub=function(s){i.push(s);var o=s.componentWillUnmount;s.componentWillUnmount=function(){i.splice(i.indexOf(s),1),o&&o.call(s)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}ni=$u.slice,W={__e:function(e,t,n,r){for(var i,a,s;t=t.__;)if((i=t.__c)&&!i.__)try{if((a=i.constructor)&&a.getDerivedStateFromError!=null&&(i.setState(a.getDerivedStateFromError(e)),s=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),s=i.__d),s)return i.__E=i}catch(o){e=o}throw e}},Fu=0,Hu=function(e){return e!=null&&e.constructor===void 0},pt.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Ot({},this.state),typeof e=="function"&&(e=e(Ot({},n),this.props)),e&&Ot(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),ra(this))},pt.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),ra(this))},pt.prototype.render=je,jt=[],Uu=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,na=function(e,t){return e.__v.__b-t.__v.__b},Fr.__r=0,zu=0;var Gt,_e,Si,Ns,er=0,Ku=[],Lr=[],vs=W.__b,Ls=W.__r,Rs=W.diffed,Os=W.__c,Ds=W.unmount;function ar(e,t){W.__h&&W.__h(_e,e,er||t),er=0;var n=_e.__H||(_e.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:Lr}),n.__[e]}function le(e){return er=1,v0(Zu,e)}function v0(e,t,n){var r=ar(Gt++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Zu(void 0,t),function(o){var u=r.__N?r.__N[0]:r.__[0],l=r.t(u,o);u!==l&&(r.__N=[l,r.__[1]],r.__c.setState({}))}],r.__c=_e,!_e.u)){var i=function(o,u,l){if(!r.__c.__H)return!0;var f=r.__c.__H.__.filter(function(p){return p.__c});if(f.every(function(p){return!p.__N}))return!a||a.call(this,o,u,l);var d=!1;return f.forEach(function(p){if(p.__N){var h=p.__[0];p.__=p.__N,p.__N=void 0,h!==p.__[0]&&(d=!0)}}),!(!d&&r.__c.props===o)&&(!a||a.call(this,o,u,l))};_e.u=!0;var a=_e.shouldComponentUpdate,s=_e.componentWillUpdate;_e.componentWillUpdate=function(o,u,l){if(this.__e){var f=a;a=void 0,i(o,u,l),a=f}s&&s.call(this,o,u,l)},_e.shouldComponentUpdate=i}return r.__N||r.__}function Ae(e,t){var n=ar(Gt++,3);!W.__s&&Xu(n.__H,t)&&(n.__=e,n.i=t,_e.__H.__h.push(n))}function Oe(e){return er=5,Re(function(){return{current:e}},[])}function Re(e,t){var n=ar(Gt++,7);return Xu(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function Me(e,t){return er=8,Re(function(){return e},t)}function nt(e){var t=_e.context[e.__c],n=ar(Gt++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(_e)),t.props.value):e.__}function L0(){var e=ar(Gt++,11);if(!e.__){for(var t=_e.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function R0(){for(var e;e=Ku.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Rr),e.__H.__h.forEach(ia),e.__H.__h=[]}catch(t){e.__H.__h=[],W.__e(t,e.__v)}}W.__b=function(e){_e=null,vs&&vs(e)},W.__r=function(e){Ls&&Ls(e),Gt=0;var t=(_e=e.__c).__H;t&&(Si===_e?(t.__h=[],_e.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=Lr,n.__N=n.i=void 0})):(t.__h.forEach(Rr),t.__h.forEach(ia),t.__h=[],Gt=0)),Si=_e},W.diffed=function(e){Rs&&Rs(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Ku.push(t)!==1&&Ns===W.requestAnimationFrame||((Ns=W.requestAnimationFrame)||O0)(R0)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==Lr&&(n.__=n.__V),n.i=void 0,n.__V=Lr})),Si=_e=null},W.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Rr),n.__h=n.__h.filter(function(r){return!r.__||ia(r)})}catch(r){t.some(function(i){i.__h&&(i.__h=[])}),t=[],W.__e(r,n.__v)}}),Os&&Os(e,t)},W.unmount=function(e){Ds&&Ds(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Rr(r)}catch(i){t=i}}),n.__H=void 0,t&&W.__e(t,n.__v))};var Ps=typeof requestAnimationFrame=="function";function O0(e){var t,n=function(){clearTimeout(r),Ps&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);Ps&&(t=requestAnimationFrame(n))}function Rr(e){var t=_e,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),_e=t}function ia(e){var t=_e;e.__c=e.__(),_e=t}function Xu(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function Zu(e,t){return typeof t=="function"?t(e):t}var D0=Symbol.for("preact-signals");function Oa(){if(fn>1)fn--;else{for(var e,t=!1;$n!==void 0;){var n=$n;for($n=void 0,aa++;n!==void 0;){var r=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&el(n))try{n.c()}catch(i){t||(e=i,t=!0)}n=r}}if(aa=0,fn--,t)throw e}}var me=void 0,$n=void 0,fn=0,aa=0,zr=0;function Ju(e){if(me!==void 0){var t=e.n;if(t===void 0||t.t!==me)return t={i:0,S:e,p:me.s,n:void 0,t:me,e:void 0,x:void 0,r:t},me.s!==void 0&&(me.s.n=t),me.s=t,e.n=t,32&me.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=me.s,t.n=void 0,me.s.n=t,me.s=t),t}}function De(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}De.prototype.brand=D0;De.prototype.h=function(){return!0};De.prototype.S=function(e){this.t!==e&&e.e===void 0&&(e.x=this.t,this.t!==void 0&&(this.t.e=e),this.t=e)};De.prototype.U=function(e){if(this.t!==void 0){var t=e.e,n=e.x;t!==void 0&&(t.x=n,e.e=void 0),n!==void 0&&(n.e=t,e.x=void 0),e===this.t&&(this.t=n)}};De.prototype.subscribe=function(e){var t=this;return or(function(){var n=t.value,r=me;me=void 0;try{e(n)}finally{me=r}})};De.prototype.valueOf=function(){return this.value};De.prototype.toString=function(){return this.value+""};De.prototype.toJSON=function(){return this.value};De.prototype.peek=function(){var e=me;me=void 0;try{return this.value}finally{me=e}};Object.defineProperty(De.prototype,"value",{get:function(){var e=Ju(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(aa>100)throw new Error("Cycle detected");this.v=e,this.i++,zr++,fn++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{Oa()}}}});function ut(e){return new De(e)}function el(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function tl(e){for(var t=e.s;t!==void 0;t=t.n){var n=t.S.n;if(n!==void 0&&(t.r=n),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function nl(e){for(var t=e.s,n=void 0;t!==void 0;){var r=t.p;t.i===-1?(t.S.U(t),r!==void 0&&(r.n=t.n),t.n!==void 0&&(t.n.p=r)):n=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=r}e.s=n}function _n(e){De.call(this,void 0),this.x=e,this.s=void 0,this.g=zr-1,this.f=4}(_n.prototype=new De).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===zr))return!0;if(this.g=zr,this.f|=1,this.i>0&&!el(this))return this.f&=-2,!0;var e=me;try{tl(this),me=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(n){this.v=n,this.f|=16,this.i++}return me=e,nl(this),this.f&=-2,!0};_n.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}De.prototype.S.call(this,e)};_n.prototype.U=function(e){if(this.t!==void 0&&(De.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}};_n.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}};Object.defineProperty(_n.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=Ju(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function rl(e){return new _n(e)}function il(e){var t=e.u;if(e.u=void 0,typeof t=="function"){fn++;var n=me;me=void 0;try{t()}catch(r){throw e.f&=-2,e.f|=8,Da(e),r}finally{me=n,Oa()}}}function Da(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,il(e)}function P0(e){if(me!==this)throw new Error("Out-of-order effect");nl(this),me=e,this.f&=-2,8&this.f&&Da(this),Oa()}function sr(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}sr.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.u=t)}finally{e()}};sr.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,il(this),tl(this),fn++;var e=me;return me=this,P0.bind(this,e)};sr.prototype.N=function(){2&this.f||(this.f|=2,this.o=$n,$n=this)};sr.prototype.d=function(){this.f|=8,1&this.f||Da(this)};function or(e){var t=new sr(e);try{t.c()}catch(n){throw t.d(),n}return t.d.bind(t)}var ii,Ii;function kn(e,t){W[e]=t.bind(null,W[e]||function(){})}function $r(e){Ii&&Ii(),Ii=e&&e.S()}function al(e){var t=this,n=e.data,r=B0(n);r.value=n;var i=Re(function(){for(var a=t.__v;a=a.__;)if(a.__c){a.__c.__$f|=4;break}return t.__$u.c=function(){var s;!Hu(i.peek())&&((s=t.base)==null?void 0:s.nodeType)===3?t.base.data=i.peek():(t.__$f|=1,t.setState({}))},rl(function(){var s=r.value.value;return s===0?0:s===!0?"":s||""})},[]);return i.value}al.displayName="_st";Object.defineProperties(De.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:al},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}});kn("__b",function(e,t){if(typeof t.type=="string"){var n,r=t.props;for(var i in r)if(i!=="children"){var a=r[i];a instanceof De&&(n||(t.__np=n={}),n[i]=a,r[i]=a.peek())}}e(t)});kn("__r",function(e,t){$r();var n,r=t.__c;r&&(r.__$f&=-2,(n=r.__$u)===void 0&&(r.__$u=n=function(i){var a;return or(function(){a=this}),a.c=function(){r.__$f|=1,r.setState({})},a}())),ii=r,$r(n),e(t)});kn("__e",function(e,t,n,r){$r(),ii=void 0,e(t,n,r)});kn("diffed",function(e,t){$r(),ii=void 0;var n;if(typeof t.type=="string"&&(n=t.__e)){var r=t.__np,i=t.props;if(r){var a=n.U;if(a)for(var s in a){var o=a[s];o!==void 0&&!(s in r)&&(o.d(),a[s]=void 0)}else n.U=a={};for(var u in r){var l=a[u],f=r[u];l===void 0?(l=M0(n,u,f,i),a[u]=l):l.o(f,i)}}}e(t)});function M0(e,t,n,r){var i=t in e&&e.ownerSVGElement===void 0,a=ut(n);return{o:function(s,o){a.value=s,r=o},d:or(function(){var s=a.value.value;r[t]!==s&&(r[t]=s,i?e[t]=s:s?e.setAttribute(t,s):e.removeAttribute(t))})}}kn("unmount",function(e,t){if(typeof t.type=="string"){var n=t.__e;if(n){var r=n.U;if(r){n.U=void 0;for(var i in r){var a=r[i];a&&a.d()}}}}else{var s=t.__c;if(s){var o=s.__$u;o&&(s.__$u=void 0,o.d())}}e(t)});kn("__h",function(e,t,n,r){(r<3||r===9)&&(t.__$f|=2),e(t,n,r)});pt.prototype.shouldComponentUpdate=function(e,t){var n=this.__$u;if(!(n&&n.s!==void 0||4&this.__$f)||3&this.__$f)return!0;for(var r in t)return!0;for(var i in e)if(i!=="__source"&&e[i]!==this.props[i])return!0;for(var a in this.props)if(!(a in e))return!0;return!1};function B0(e){return Re(function(){return ut(e)},[])}function Ni(e){var t=Oe(e);return t.current=e,ii.__$f|=4,Re(function(){return rl(function(){return t.current()})},[])}function sl(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=sl(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function vi(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=sl(e))&&(r&&(r+=" "),r+=t);return r}const Ms=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,F0=e=>{const t=function(){for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];var o,u;return typeof(e==null||(o=e.hooks)===null||o===void 0?void 0:o["cx:done"])<"u"?e==null?void 0:e.hooks["cx:done"](vi(a)):typeof(e==null||(u=e.hooks)===null||u===void 0?void 0:u.onComplete)<"u"?e==null?void 0:e.hooks.onComplete(vi(a)):vi(a)};return{compose:function(){for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return o=>{const u=Object.fromEntries(Object.entries(o||{}).filter(l=>{let[f]=l;return!["class","className"].includes(f)}));return t(a.map(l=>l(u)),o==null?void 0:o.class,o==null?void 0:o.className)}},cva:i=>a=>{var s;if((i==null?void 0:i.variants)==null)return t(i==null?void 0:i.base,a==null?void 0:a.class,a==null?void 0:a.className);const{variants:o,defaultVariants:u}=i,l=Object.keys(o).map(p=>{const h=a==null?void 0:a[p],m=u==null?void 0:u[p],T=Ms(h)||Ms(m);return o[p][T]}),f={...u,...a&&Object.entries(a).reduce((p,h)=>{let[m,T]=h;return typeof T>"u"?p:{...p,[m]:T}},{})},d=i==null||(s=i.compoundVariants)===null||s===void 0?void 0:s.reduce((p,h)=>{let{class:m,className:T,...w}=h;return Object.entries(w).every(x=>{let[S,C]=x;const O=f[S];return Array.isArray(C)?C.includes(O):O===C})?[...p,m,T]:p},[]);return t(i==null?void 0:i.base,l,d,a==null?void 0:a.class,a==null?void 0:a.className)},cx:t}},{compose:I6,cva:Bt,cx:N6}=F0(),H0=ut(!1),U0=ut(!1),z0=ut("idle"),Pa=ut(!1),Ma=ut("idle"),Ba=ut(null),Fa=ut(null),mt=ut([]),Ha=ut([]),yt=typeof BroadcastChannel<"u"?new BroadcastChannel("kin-sync"):null;yt==null||yt.addEventListener("message",e=>{const{type:t,data:n}=e.data;switch(t){case"messages_updated":mt.value=n.messages.map(r=>({...r,timestamp:new Date(r.timestamp)}));break;case"messages_cleared":mt.value=[];break}});const Ua=()=>{yt==null||yt.postMessage({type:"messages_updated",data:{messages:mt.value}})},$0=e=>{mt.value=[...mt.value,{...e,id:crypto.randomUUID(),timestamp:new Date}],Ha.value=[],Ua()},Y0=e=>{Ha.value=e},j0=e=>{const t=mt.value;if(t.length===0)return;const n=t[t.length-1];!n||n.role!=="assistant"||(mt.value=[...t.slice(0,-1),{...n,content:n.content+e}])},q0=()=>{mt.value=[],yt==null||yt.postMessage({type:"messages_cleared"})},V0=e=>{mt.value=e.map(t=>({...t,id:crypto.randomUUID(),timestamp:new Date})),Ua()},W0=()=>{Ua()},G0=(e,t,n)=>{Ma.value=e,Fa.value=t??null,Ba.value=n??null},Q0=()=>{Ma.value="idle",Fa.value=null,Ba.value=null},K0=e=>{Pa.value=e},X0=()=>{Pa.value=!1},Y={isOpen:H0,isStreaming:U0,connectionState:z0,messages:mt,quickReplies:Ha,uploadState:Ma,uploadError:Ba,uploadFileName:Fa,hasUnreadMessages:Pa,addMessage:$0,appendToLastMessage:j0,clearMessages:q0,setMessages:V0,syncToOtherTabs:W0,setUploadState:G0,resetUploadState:Q0,setHasUnreadMessages:K0,clearUnreadMessages:X0,setQuickReplies:Y0};var Z0=0;function b(e,t,n,r,i,a){var s,o,u={};for(o in t)o=="ref"?s=t[o]:u[o]=t[o];var l={type:e,props:u,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--Z0,__source:i,__self:a};if(typeof e=="function"&&(s=e.defaultProps))for(o in s)u[o]===void 0&&(u[o]=s[o]);return W.vnode&&W.vnode(l),l}function J0({class:e,"aria-hidden":t="true"}){return b("svg",{class:e,viewBox:"0 0 870 400",fill:"currentColor","aria-hidden":t,focusable:"false",children:b("path",{d:"M220.468 331.21c-21.275-9.559-42.081-30.347-79.541-67.777l-56.1-56.087c-9.106-9.106-14.522-14.541-18.414-18.802-2.471-2.705-3.42-3.973-3.645-4.286a20.3 20.3 0 0 1 0-20.058c.224-.314 1.173-1.582 3.644-4.286 3.893-4.261 9.309-9.697 18.414-18.803 43.366-43.365 57.154-56.438 69.786-63.775 39.522-22.958 88.319-22.958 127.842-.001 12.632 7.337 26.42 20.41 69.786 63.774l30.412 30.411 42.51-42.509-30.413-30.412c-40.657-40.656-60.986-60.984-82.1-73.248-58.192-33.802-130.041-33.801-188.233.001-21.114 12.265-41.442 32.593-82.099 73.25-17.449 17.449-26.174 26.173-31.437 35.235a80.417 80.417 0 0 0 0 80.785c5.264 9.061 13.99 17.785 31.438 35.234l69.155 69.152c30.203 30.202 45.305 45.303 62.973 56.034a171.768 171.768 0 0 0 48.416 20.055C242.943 400.001 264.3 400 307.013 400H608.43c42.714 0 64.071-.001 84.153-4.906A171.733 171.733 0 0 0 741 375.039c17.668-10.731 32.77-25.833 62.973-56.037l13.213-13.213c160.161-160.161-80.08-400.402-240.241-240.24L379.079 263.39c-42.114 42.109-63.171 63.164-87.526 70.869a104.629 104.629 0 0 1-59.446 1.086 111.797 111.797 0 0 1-11.639-4.136Z"})})}function ef({class:e,"aria-hidden":t="true"}){return b("svg",{class:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":t,focusable:"false",children:[b("path",{d:"M12 19V5"}),b("path",{d:"M5 12l7-7 7 7"})]})}function tf({class:e,"aria-hidden":t="true"}){return b("svg",{class:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":t,focusable:"false",children:[b("path",{d:"M18 6L6 18"}),b("path",{d:"M6 6l12 12"})]})}function nf({class:e,"aria-hidden":t="true"}){return b("svg",{class:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":t,focusable:"false",children:[b("path",{d:"M3 6h18"}),b("path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"}),b("path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"})]})}function rf({class:e,"aria-hidden":t="true"}){return b("svg",{class:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":t,focusable:"false",children:b("path",{d:"M21.44 11.05l-9.19 9.19a6 6 0 01-8.49-8.49l9.19-9.19a4 4 0 015.66 5.66l-9.2 9.19a2 2 0 01-2.83-2.83l8.49-8.48"})})}function af({class:e,"aria-hidden":t="true"}){return b("svg",{class:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":t,focusable:"false",children:b("path",{d:"M21 12a9 9 0 11-6.219-8.56"})})}function sf(e,t){for(var n in t)e[n]=t[n];return e}function sa(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}function Bs(e){this.props=e}function fe(e,t){function n(i){var a=this.props.ref,s=a==i.ref;return!s&&a&&(a.call?a(null):a.current=null),t?!t(this.props,i)||!s:sa(this.props,i)}function r(i){return this.shouldComponentUpdate=n,Pt(e,i)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(Bs.prototype=new pt).isPureReactComponent=!0,Bs.prototype.shouldComponentUpdate=function(e,t){return sa(this.props,e)||sa(this.state,t)};var Fs=W.__b;W.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Fs&&Fs(e)};var of=W.__e;W.__e=function(e,t,n,r){if(e.then){for(var i,a=t;a=a.__;)if((i=a.__c)&&i.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t)}of(e,t,n,r)};var Hs=W.unmount;function ol(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=sf({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return ol(r,t,n)})),e}function ul(e,t,n){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return ul(r,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=n)),e}function Yn(){this.__u=0,this.t=null,this.__b=null}function ll(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function cl(e){var t,n,r;function i(a){if(t||(t=e()).then(function(s){n=s.default||s},function(s){r=s}),r)throw r;if(!n)throw t;return Pt(n,a)}return i.displayName="Lazy",i.__f=!0,i}function Er(){this.u=null,this.o=null}W.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),Hs&&Hs(e)},(Yn.prototype=new pt).__c=function(e,t){var n=t.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var i=ll(r.__v),a=!1,s=function(){a||(a=!0,n.__R=null,i?i(o):o())};n.__R=s;var o=function(){if(!--r.__u){if(r.state.__a){var l=r.state.__a;r.__v.__k[0]=ul(l,l.__c.__P,l.__c.__O)}var f;for(r.setState({__a:r.__b=null});f=r.t.pop();)f.forceUpdate()}},u=t.__h===!0;r.__u++||u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(s,s)},Yn.prototype.componentWillUnmount=function(){this.t=[]},Yn.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=ol(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&Pt(je,null,e.fallback);return i&&(i.__h=null),[Pt(je,null,t.__a?null:e.children),i]};var Us=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};(Er.prototype=new pt).__a=function(e){var t=this,n=ll(t.__v),r=t.o.get(e);return r[0]++,function(i){var a=function(){t.props.revealOrder?(r.push(i),Us(t,e,r)):i()};n?n(a):a()}},Er.prototype.render=function(e){this.u=null,this.o=new Map;var t=Hr(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},Er.prototype.componentDidUpdate=Er.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){Us(e,n,t)})};var dl=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,uf=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,lf=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,cf=/[A-Z0-9]/g,df=typeof document<"u",ff=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};pt.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(pt.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var zs=W.event;function hf(){}function pf(){return this.cancelBubble}function mf(){return this.defaultPrevented}W.event=function(e){return zs&&(e=zs(e)),e.persist=hf,e.isPropagationStopped=pf,e.isDefaultPrevented=mf,e.nativeEvent=e};var gf={enumerable:!1,configurable:!0,get:function(){return this.class}},$s=W.vnode;W.vnode=function(e){typeof e.type=="string"&&function(t){var n=t.props,r=t.type,i={};for(var a in n){var s=n[a];if(!(a==="value"&&"defaultValue"in n&&s==null||df&&a==="children"&&r==="noscript"||a==="class"||a==="className")){var o=a.toLowerCase();a==="defaultValue"&&"value"in n&&n.value==null?a="value":a==="download"&&s===!0?s="":o==="ondoubleclick"?a="ondblclick":o!=="onchange"||r!=="input"&&r!=="textarea"||ff(n.type)?o==="onfocus"?a="onfocusin":o==="onblur"?a="onfocusout":lf.test(a)?a=o:r.indexOf("-")===-1&&uf.test(a)?a=a.replace(cf,"-$&").toLowerCase():s===null&&(s=void 0):o=a="oninput",o==="oninput"&&i[a=o]&&(a="oninputCapture"),i[a]=s}}r=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=Hr(n.children).forEach(function(u){u.props.selected=i.value.indexOf(u.props.value)!=-1})),r=="select"&&i.defaultValue!=null&&(i.value=Hr(n.children).forEach(function(u){u.props.selected=i.multiple?i.defaultValue.indexOf(u.props.value)!=-1:i.defaultValue==u.props.value})),n.class&&!n.className?(i.class=n.class,Object.defineProperty(i,"className",gf)):(n.className&&!n.class||n.class&&n.className)&&(i.class=i.className=n.className),t.props=i}(e),e.$$typeof=dl,$s&&$s(e)};var Ys=W.__r;W.__r=function(e){Ys&&Ys(e)};var js=W.diffed;W.diffed=function(e){js&&js(e);var t=e.props,n=e.__e;n!=null&&e.type==="textarea"&&"value"in t&&t.value!==n.value&&(n.value=t.value==null?"":t.value)};function ln(e){return!!e&&e.$$typeof===dl}function bf(e){e()}function Ef(){return[!1,bf]}const ai=function(e){if(e==null)return xf;if(typeof e=="function")return si(e);if(typeof e=="object")return Array.isArray(e)?Tf(e):_f(e);if(typeof e=="string")return kf(e);throw new Error("Expected function, string, or object as test")};function Tf(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=ai(e[n]);return si(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function _f(e){const t=e;return si(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function kf(e){return si(t);function t(n){return n&&n.type===e}}function si(e){return t;function t(n,r,i){return!!(yf(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function xf(){return!0}function yf(e){return e!==null&&typeof e=="object"&&"type"in e}const fl=[],Hn=!0,oa=!1,ua="skip";function hl(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=ai(i),s=r?-1:1;o(e,void 0,[])();function o(u,l,f){const d=u&&typeof u=="object"?u:{};if(typeof d.type=="string"){const h=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(u.type+(h?"<"+h+">":""))+")"})}return p;function p(){let h=fl,m,T,w;if((!t||a(u,l,f[f.length-1]||void 0))&&(h=wf(n(u,f)),h[0]===oa))return h;if("children"in u&&u.children){const x=u;if(x.children&&h[0]!==ua)for(T=(r?x.children.length:-1)+s,w=f.concat(x);T>-1&&T<x.children.length;){const S=x.children[T];if(m=o(S,T,w)(),m[0]===oa)return m;T=typeof m[1]=="number"?m[1]:T+s}}return h}}}function wf(e){return Array.isArray(e)?e:typeof e=="number"?[Hn,e]:e==null?fl:[e]}function gn(e,t,n,r){let i,a,s;typeof t=="function"&&typeof n!="function"?(a=void 0,s=t,i=n):(a=t,s=n,i=r),hl(e,a,o,i);function o(u,l){const f=l[l.length-1],d=f?f.children.indexOf(u):void 0;return s(u,d,f)}}function Af({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:n=[],allowDataImages:r=!1,allowedProtocols:i=[],blockedImageClass:a="inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm",blockedLinkClass:s="text-gray-500"}){const o=t.length&&!t.every(l=>l==="*"),u=n.length&&!n.every(l=>l==="*");if(!e&&(o||u))throw new Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return l=>{const f=Nf(e,t,n,r,i,a,s);gn(l,f)}}function qs(e,t){if(typeof e!="string")return null;try{return new URL(e)}catch{if(t)try{return new URL(e,t)}catch{return null}if(e.startsWith("/")||e.startsWith("./")||e.startsWith("../"))try{return new URL(e,"http://example.com")}catch{return null}return null}}function Cf(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}const Sf=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),If=new Set(["javascript:","data:","file:","vbscript:"]);function Vs(e,t,n,r=!1,i=!1,a=[]){if(!e)return null;if(typeof e=="string"&&e.startsWith("#")&&!i)try{if(new URL(e,"http://example.com").hash===e)return e}catch{}if(typeof e=="string"&&e.startsWith("data:"))return i&&r&&e.startsWith("data:image/")?e:null;if(typeof e=="string"&&e.startsWith("blob:")){try{if(new URL(e).protocol==="blob:"&&e.length>5){const f=e.substring(5);if(f&&f.length>0&&f!=="invalid")return e}}catch{return null}return null}const s=qs(e,n);if(!s||If.has(s.protocol)||!(Sf.has(s.protocol)||a.includes(s.protocol)||a.includes("*")))return null;if(s.protocol==="mailto:"||!s.protocol.match(/^https?:$/))return s.href;const u=Cf(e);return s&&t.some(l=>{const f=qs(l,n);return!f||f.origin!==s.origin?!1:s.href.startsWith(f.href)})?u?s.pathname+s.search+s.hash:s.href:t.includes("*")?s.protocol!=="https:"&&s.protocol!=="http:"?null:u?s.pathname+s.search+s.hash:s.href:null}const Li=Symbol("node-seen"),Nf=(e,t,n,r,i,a,s)=>{const o=(u,l,f)=>{if(u.type!=="element"||u[Li])return Hn;if(u.tagName==="a"){const d=Vs(u.properties.href,t,e,!1,!1,i);return d===null?(u[Li]=!0,gn(u,o),f&&typeof l=="number"&&(f.children[l]={type:"element",tagName:"span",properties:{title:"Blocked URL: "+String(u.properties.href),class:s},children:[...u.children,{type:"text",value:" [blocked]"}]}),ua):(u.properties.href=d,u.properties.target="_blank",u.properties.rel="noopener noreferrer",Hn)}if(u.tagName==="img"){const d=Vs(u.properties.src,n,e,r,!0,i);return d===null?(u[Li]=!0,gn(u,o),f&&typeof l=="number"&&(f.children[l]={type:"element",tagName:"span",properties:{class:a},children:[{type:"text",value:"[Image blocked: "+String(u.properties.alt||"No description")+"]"}]}),ua):(u.properties.src=d,Hn)}return Hn};return o},pl=-1,oi=0,Yr=1,jr=2,za=3,$a=4,Ya=5,ja=6,ml=7,gl=8,Ws=typeof self=="object"?self:globalThis,vf=(e,t)=>{const n=(i,a)=>(e.set(a,i),i),r=i=>{if(e.has(i))return e.get(i);const[a,s]=t[i];switch(a){case oi:case pl:return n(s,i);case Yr:{const o=n([],i);for(const u of s)o.push(r(u));return o}case jr:{const o=n({},i);for(const[u,l]of s)o[r(u)]=r(l);return o}case za:return n(new Date(s),i);case $a:{const{source:o,flags:u}=s;return n(new RegExp(o,u),i)}case Ya:{const o=n(new Map,i);for(const[u,l]of s)o.set(r(u),r(l));return o}case ja:{const o=n(new Set,i);for(const u of s)o.add(r(u));return o}case ml:{const{name:o,message:u}=s;return n(new Ws[o](u),i)}case gl:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i)}return n(new Ws[a](s),i)};return r},Gs=e=>vf(new Map,e)(0),sn="",{toString:Lf}={},{keys:Rf}=Object,Rn=e=>{const t=typeof e;if(t!=="object"||!e)return[oi,t];const n=Lf.call(e).slice(8,-1);switch(n){case"Array":return[Yr,sn];case"Object":return[jr,sn];case"Date":return[za,sn];case"RegExp":return[$a,sn];case"Map":return[Ya,sn];case"Set":return[ja,sn]}return n.includes("Array")?[Yr,n]:n.includes("Error")?[ml,n]:[jr,n]},Tr=([e,t])=>e===oi&&(t==="function"||t==="symbol"),Of=(e,t,n,r)=>{const i=(s,o)=>{const u=r.push(s)-1;return n.set(o,u),u},a=s=>{if(n.has(s))return n.get(s);let[o,u]=Rn(s);switch(o){case oi:{let f=s;switch(u){case"bigint":o=gl,f=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);f=null;break;case"undefined":return i([pl],s)}return i([o,f],s)}case Yr:{if(u)return i([u,[...s]],s);const f=[],d=i([o,f],s);for(const p of s)f.push(a(p));return d}case jr:{if(u)switch(u){case"BigInt":return i([u,s.toString()],s);case"Boolean":case"Number":case"String":return i([u,s.valueOf()],s)}if(t&&"toJSON"in s)return a(s.toJSON());const f=[],d=i([o,f],s);for(const p of Rf(s))(e||!Tr(Rn(s[p])))&&f.push([a(p),a(s[p])]);return d}case za:return i([o,s.toISOString()],s);case $a:{const{source:f,flags:d}=s;return i([o,{source:f,flags:d}],s)}case Ya:{const f=[],d=i([o,f],s);for(const[p,h]of s)(e||!(Tr(Rn(p))||Tr(Rn(h))))&&f.push([a(p),a(h)]);return d}case ja:{const f=[],d=i([o,f],s);for(const p of s)(e||!Tr(Rn(p)))&&f.push(a(p));return d}}const{message:l}=s;return i([o,{name:u,message:l}],s)};return a},Qs=(e,{json:t,lossy:n}={})=>{const r=[];return Of(!(t||n),!!t,new Map,r)(e),r},Qt=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Gs(Qs(e,t)):structuredClone(e):(e,t)=>Gs(Qs(e,t));class ur{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}ur.prototype.normal={};ur.prototype.property={};ur.prototype.space=void 0;function bl(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new ur(n,r,t)}function tr(e){return e.toLowerCase()}class We{constructor(t,n){this.attribute=n,this.property=t}}We.prototype.attribute="";We.prototype.booleanish=!1;We.prototype.boolean=!1;We.prototype.commaOrSpaceSeparated=!1;We.prototype.commaSeparated=!1;We.prototype.defined=!1;We.prototype.mustUseProperty=!1;We.prototype.number=!1;We.prototype.overloadedBoolean=!1;We.prototype.property="";We.prototype.spaceSeparated=!1;We.prototype.space=void 0;let Df=0;const te=Zt(),Se=Zt(),la=Zt(),H=Zt(),Ee=Zt(),hn=Zt(),Ze=Zt();function Zt(){return 2**++Df}const ca=Object.freeze(Object.defineProperty({__proto__:null,boolean:te,booleanish:Se,commaOrSpaceSeparated:Ze,commaSeparated:hn,number:H,overloadedBoolean:la,spaceSeparated:Ee},Symbol.toStringTag,{value:"Module"})),Ri=Object.keys(ca);class qa extends We{constructor(t,n,r,i){let a=-1;if(super(t,n),Ks(this,"space",i),typeof r=="number")for(;++a<Ri.length;){const s=Ri[a];Ks(this,Ri[a],(r&ca[s])===ca[s])}}}qa.prototype.defined=!0;function Ks(e,t,n){n&&(e[t]=n)}function xn(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const a=new qa(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[tr(r)]=r,n[tr(a.attribute)]=r}return new ur(t,n,e.space)}const El=xn({properties:{ariaActiveDescendant:null,ariaAtomic:Se,ariaAutoComplete:null,ariaBusy:Se,ariaChecked:Se,ariaColCount:H,ariaColIndex:H,ariaColSpan:H,ariaControls:Ee,ariaCurrent:null,ariaDescribedBy:Ee,ariaDetails:null,ariaDisabled:Se,ariaDropEffect:Ee,ariaErrorMessage:null,ariaExpanded:Se,ariaFlowTo:Ee,ariaGrabbed:Se,ariaHasPopup:null,ariaHidden:Se,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ee,ariaLevel:H,ariaLive:null,ariaModal:Se,ariaMultiLine:Se,ariaMultiSelectable:Se,ariaOrientation:null,ariaOwns:Ee,ariaPlaceholder:null,ariaPosInSet:H,ariaPressed:Se,ariaReadOnly:Se,ariaRelevant:null,ariaRequired:Se,ariaRoleDescription:Ee,ariaRowCount:H,ariaRowIndex:H,ariaRowSpan:H,ariaSelected:Se,ariaSetSize:H,ariaSort:null,ariaValueMax:H,ariaValueMin:H,ariaValueNow:H,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Tl(e,t){return t in e?e[t]:t}function _l(e,t){return Tl(e,t.toLowerCase())}const Pf=xn({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:hn,acceptCharset:Ee,accessKey:Ee,action:null,allow:null,allowFullScreen:te,allowPaymentRequest:te,allowUserMedia:te,alt:null,as:null,async:te,autoCapitalize:null,autoComplete:Ee,autoFocus:te,autoPlay:te,blocking:Ee,capture:null,charSet:null,checked:te,cite:null,className:Ee,cols:H,colSpan:null,content:null,contentEditable:Se,controls:te,controlsList:Ee,coords:H|hn,crossOrigin:null,data:null,dateTime:null,decoding:null,default:te,defer:te,dir:null,dirName:null,disabled:te,download:la,draggable:Se,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:te,formTarget:null,headers:Ee,height:H,hidden:la,high:H,href:null,hrefLang:null,htmlFor:Ee,httpEquiv:Ee,id:null,imageSizes:null,imageSrcSet:null,inert:te,inputMode:null,integrity:null,is:null,isMap:te,itemId:null,itemProp:Ee,itemRef:Ee,itemScope:te,itemType:Ee,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:te,low:H,manifest:null,max:null,maxLength:H,media:null,method:null,min:null,minLength:H,multiple:te,muted:te,name:null,nonce:null,noModule:te,noValidate:te,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:te,optimum:H,pattern:null,ping:Ee,placeholder:null,playsInline:te,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:te,referrerPolicy:null,rel:Ee,required:te,reversed:te,rows:H,rowSpan:H,sandbox:Ee,scope:null,scoped:te,seamless:te,selected:te,shadowRootClonable:te,shadowRootDelegatesFocus:te,shadowRootMode:null,shape:null,size:H,sizes:null,slot:null,span:H,spellCheck:Se,src:null,srcDoc:null,srcLang:null,srcSet:null,start:H,step:null,style:null,tabIndex:H,target:null,title:null,translate:null,type:null,typeMustMatch:te,useMap:null,value:Se,width:H,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ee,axis:null,background:null,bgColor:null,border:H,borderColor:null,bottomMargin:H,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:te,declare:te,event:null,face:null,frame:null,frameBorder:null,hSpace:H,leftMargin:H,link:null,longDesc:null,lowSrc:null,marginHeight:H,marginWidth:H,noResize:te,noHref:te,noShade:te,noWrap:te,object:null,profile:null,prompt:null,rev:null,rightMargin:H,rules:null,scheme:null,scrolling:Se,standby:null,summary:null,text:null,topMargin:H,valueType:null,version:null,vAlign:null,vLink:null,vSpace:H,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:te,disableRemotePlayback:te,prefix:null,property:null,results:H,security:null,unselectable:null},space:"html",transform:_l}),Mf=xn({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:Ze,accentHeight:H,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:H,amplitude:H,arabicForm:null,ascent:H,attributeName:null,attributeType:null,azimuth:H,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:H,by:null,calcMode:null,capHeight:H,className:Ee,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:H,diffuseConstant:H,direction:null,display:null,dur:null,divisor:H,dominantBaseline:null,download:te,dx:null,dy:null,edgeMode:null,editable:null,elevation:H,enableBackground:null,end:null,event:null,exponent:H,externalResourcesRequired:null,fill:null,fillOpacity:H,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:hn,g2:hn,glyphName:hn,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:H,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:H,horizOriginX:H,horizOriginY:H,id:null,ideographic:H,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:H,k:H,k1:H,k2:H,k3:H,k4:H,kernelMatrix:Ze,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:H,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:H,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:H,overlineThickness:H,paintOrder:null,panose1:null,path:null,pathLength:H,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ee,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:H,pointsAtY:H,pointsAtZ:H,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ze,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ze,rev:Ze,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ze,requiredFeatures:Ze,requiredFonts:Ze,requiredFormats:Ze,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:H,specularExponent:H,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:H,strikethroughThickness:H,string:null,stroke:null,strokeDashArray:Ze,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:H,strokeOpacity:H,strokeWidth:null,style:null,surfaceScale:H,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ze,tabIndex:H,tableValues:null,target:null,targetX:H,targetY:H,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ze,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:H,underlineThickness:H,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:H,values:null,vAlphabetic:H,vMathematical:H,vectorEffect:null,vHanging:H,vIdeographic:H,version:null,vertAdvY:H,vertOriginX:H,vertOriginY:H,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:H,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Tl}),kl=xn({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()}}),xl=xn({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:_l}),yl=xn({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Bf={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"},Ff=/[A-Z]/g,Xs=/-[a-z]/g,Hf=/^data[-\w.:]+$/i;function ui(e,t){const n=tr(t);let r=t,i=We;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Hf.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Xs,zf);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Xs.test(a)){let s=a.replace(Ff,Uf);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=qa}return new i(r,t)}function Uf(e){return"-"+e.toLowerCase()}function zf(e){return e.charAt(1).toUpperCase()}const lr=bl([El,Pf,kl,xl,yl],"html"),Ft=bl([El,Mf,kl,xl,yl],"svg");function Zs(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const s=n.slice(i,r).trim();(s||!a)&&t.push(s),i=r+1,r=n.indexOf(",",i)}return t}function wl(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Js=/[#.]/g;function $f(e,t){const n=e||"",r={};let i=0,a,s;for(;i<n.length;){Js.lastIndex=i;const o=Js.exec(n),u=n.slice(i,o?o.index:n.length);u&&(a?a==="#"?r.id=u:Array.isArray(r.className)?r.className.push(u):r.className=[u]:s=u,i+=u.length),o&&(a=o[0],i++)}return{type:"element",tagName:s||t||"div",properties:r,children:[]}}function eo(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Al(e){return e.join(" ").trim()}function Cl(e,t,n){const r=n?Vf(n):void 0;function i(a,s,...o){let u;if(a==null){u={type:"root",children:[]};const l=s;o.unshift(l)}else{u=$f(a,t);const l=u.tagName.toLowerCase(),f=r?r.get(l):void 0;if(u.tagName=f||l,Yf(s))o.unshift(s);else for(const[d,p]of Object.entries(s))jf(e,u.properties,d,p)}for(const l of o)da(u.children,l);return u.type==="element"&&u.tagName==="template"&&(u.content={type:"root",children:u.children},u.children=[]),u}return i}function Yf(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 a=i;for(const s of a)if(typeof s!="number"&&typeof s!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function jf(e,t,n,r){const i=ui(e,n);let a;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;a=r}else typeof r=="boolean"?a=r:typeof r=="string"?i.spaceSeparated?a=eo(r):i.commaSeparated?a=Zs(r):i.commaOrSpaceSeparated?a=eo(Zs(r).join(" ")):a=to(i,i.property,r):Array.isArray(r)?a=[...r]:a=i.property==="style"?qf(r):String(r);if(Array.isArray(a)){const s=[];for(const o of a)s.push(to(i,i.property,o));a=s}i.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function da(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)da(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?da(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function to(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||tr(n)===tr(t)))return!0}return n}function qf(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function Vf(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const Wf=["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"],Gf=Cl(lr,"div"),Qf=Cl(Ft,"g",Wf);function Kf(e){const t=String(e),n=[];return{toOffset:i,toPoint:r};function r(a){if(typeof a=="number"&&a>-1&&a<=t.length){let s=0;for(;;){let o=n[s];if(o===void 0){const u=no(t,n[s-1]);o=u===-1?t.length+1:u+1,n[s]=o}if(o>a)return{line:s+1,column:a-(s>0?n[s-1]:0)+1,offset:a};s++}}}function i(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;n.length<a.line;){const o=n[n.length-1],u=no(t,o),l=u===-1?t.length+1:u+1;if(o===l)break;n.push(l)}const s=(a.line>1?n[a.line-2]:0)+a.column-1;if(s<n[a.line-1])return s}}}function no(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
|
|
2
|
+
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const Vt={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/"},Sl={}.hasOwnProperty,Xf=Object.prototype;function Zf(e,t){const n=t||{};return Va({file:n.file||void 0,location:!1,schema:n.space==="svg"?Ft:lr,verbose:n.verbose||!1},e)}function Va(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Or(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:Il(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const a=String(e.file),s=Kf(a),o=s.toPoint(0),u=s.toPoint(a.length);n.position={start:o,end:u}}return n}case"#documentType":{const r=t;return n={type:"doctype"},Or(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Or(e,r,n),n}default:return n=Jf(e,t),n}}function Il(e,t){let n=-1;const r=[];for(;++n<t.length;){const i=Va(e,t[n]);r.push(i)}return r}function Jf(e,t){const n=e.schema;e.schema=t.namespaceURI===Vt.svg?Ft:lr;let r=-1;const i={};for(;++r<t.attrs.length;){const o=t.attrs[r],u=(o.prefix?o.prefix+":":"")+o.name;Sl.call(Xf,u)||(i[u]=o.value)}const s=(e.schema.space==="svg"?Qf:Gf)(t.tagName,i,Il(e,t.childNodes));if(Or(e,t,s),s.tagName==="template"){const o=t,u=o.sourceCodeLocation,l=u&&u.startTag&&cn(u.startTag),f=u&&u.endTag&&cn(u.endTag),d=Va(e,o.content);l&&f&&e.file&&(d.position={start:l.end,end:f.start}),s.content=d}return e.schema=n,s}function Or(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=eh(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function eh(e,t,n){const r=cn(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 a={};let s;if(n.attrs)for(s in n.attrs)Sl.call(n.attrs,s)&&(a[ui(e.schema,s).property]=cn(n.attrs[s]));const o=cn(n.startTag),u=n.endTag?cn(n.endTag):void 0,l={opening:o};u&&(l.closing=u),l.properties=a,t.data={position:l}}}return r}function cn(e){const t=ro({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=ro({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function ro(e){return e.line&&e.column?e:void 0}const io={}.hasOwnProperty;function Nl(e,t){const n=t||{};function r(i,...a){let s=r.invalid;const o=r.handlers;if(i&&io.call(i,e)){const u=String(i[e]);s=io.call(o,u)?o[u]:r.unknown}if(s)return s.call(this,i,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const th={},nh={}.hasOwnProperty,vl=Nl("type",{handlers:{root:ih,element:lh,text:oh,comment:uh,doctype:sh}});function rh(e,t){const r=(t||th).space;return vl(e,r==="svg"?Ft:lr)}function ih(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Wa(e.children,n,t),yn(e,n),n}function ah(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Wa(e.children,n,t),yn(e,n),n}function sh(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return yn(e,t),t}function oh(e){const t={nodeName:"#text",value:e.value,parentNode:null};return yn(e,t),t}function uh(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return yn(e,t),t}function lh(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=Ft);const i=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&nh.call(e.properties,a)){const u=ch(r,a,e.properties[a]);u&&i.push(u)}}const s=r.space,o={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:Vt[s],childNodes:[],parentNode:null};return o.childNodes=Wa(e.children,o,r),yn(e,o),e.tagName==="template"&&e.content&&(o.content=ah(e.content,r)),o}function ch(e,t,n){const r=ui(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?wl(n):Al(n));const i={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const a=i.name.indexOf(":");a<0?i.prefix="":(i.name=i.name.slice(a+1),i.prefix=r.attribute.slice(0,a)),i.namespace=Vt[r.space]}return i}function Wa(e,t,n){let r=-1;const i=[];if(e)for(;++r<e.length;){const a=vl(e[r],n);a.parentNode=t,i.push(a)}return i}function yn(e,t){const n=e.position;n&&n.start&&n.end&&(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 dh=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],fh=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]),Te="�";var g;(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"})(g||(g={}));const qe={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Ll(e){return e>=55296&&e<=57343}function hh(e){return e>=56320&&e<=57343}function ph(e,t){return(e-55296)*1024+9216+t}function Rl(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Ol(e){return e>=64976&&e<=65007||fh.has(e)}var L;(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"})(L||(L={}));const mh=65536;class gh{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=mh,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:a}=this,s=i+n,o=a+n;return{code:t,startLine:r,endLine:r,startCol:s,endCol:s,startOffset:o,endOffset:o}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(hh(n))return this.pos++,this._addGap(),ph(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,g.EOF;return this._err(L.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,g.EOF;const r=this.html.charCodeAt(n);return r===g.CARRIAGE_RETURN?g.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,g.EOF;let t=this.html.charCodeAt(this.pos);return t===g.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,g.LINE_FEED):t===g.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,Ll(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===g.LINE_FEED||t===g.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){Rl(t)?this._err(L.controlCharacterInInputStream):Ol(t)&&this._err(L.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var ie;(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"})(ie||(ie={}));function Dl(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 bh=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),Eh=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 Th(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=Eh.get(e))!==null&&t!==void 0?t:e}var ve;(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"})(ve||(ve={}));const _h=32;var Dt;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Dt||(Dt={}));function fa(e){return e>=ve.ZERO&&e<=ve.NINE}function kh(e){return e>=ve.UPPER_A&&e<=ve.UPPER_F||e>=ve.LOWER_A&&e<=ve.LOWER_F}function xh(e){return e>=ve.UPPER_A&&e<=ve.UPPER_Z||e>=ve.LOWER_A&&e<=ve.LOWER_Z||fa(e)}function yh(e){return e===ve.EQUALS||xh(e)}var Ne;(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"})(Ne||(Ne={}));var xt;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(xt||(xt={}));class wh{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Ne.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=xt.Strict}startEntity(t){this.decodeMode=t,this.state=Ne.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Ne.EntityStart:return t.charCodeAt(n)===ve.NUM?(this.state=Ne.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Ne.NamedEntity,this.stateNamedEntity(t,n));case Ne.NumericStart:return this.stateNumericStart(t,n);case Ne.NumericDecimal:return this.stateNumericDecimal(t,n);case Ne.NumericHex:return this.stateNumericHex(t,n);case Ne.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|_h)===ve.LOWER_X?(this.state=Ne.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Ne.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,i){if(n!==r){const a=r-n;this.result=this.result*Math.pow(i,a)+Number.parseInt(t.substr(n,a),i),this.consumed+=a}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(fa(i)||kh(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(fa(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===ve.SEMI)this.consumed+=1;else if(this.decodeMode===xt.Strict)return 0;return this.emitCodePoint(Th(this.result),this.consumed),this.errors&&(t!==ve.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let i=r[this.treeIndex],a=(i&Dt.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const s=t.charCodeAt(n);if(this.treeIndex=Ah(r,i,this.treeIndex+Math.max(1,a),s),this.treeIndex<0)return this.result===0||this.decodeMode===xt.Attribute&&(a===0||yh(s))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],a=(i&Dt.VALUE_LENGTH)>>14,a!==0){if(s===ve.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==xt.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]&Dt.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]&~Dt.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case Ne.NamedEntity:return this.result!==0&&(this.decodeMode!==xt.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Ne.NumericDecimal:return this.emitNumericEntity(0,2);case Ne.NumericHex:return this.emitNumericEntity(0,3);case Ne.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Ne.EntityStart:return 0}}}function Ah(e,t,n,r){const i=(t&Dt.BRANCH_LENGTH)>>7,a=t&Dt.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){const u=r-a;return u<0||u>=i?-1:e[n+u]-1}let s=n,o=s+i-1;for(;s<=o;){const u=s+o>>>1,l=e[u];if(l<r)s=u+1;else if(l>r)o=u-1;else return e[u+i]}return-1}var D;(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/"})(D||(D={}));var Wt;(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"})(Wt||(Wt={}));var rt;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(rt||(rt={}));var N;(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"})(N||(N={}));var c;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(c||(c={}));const Ch=new Map([[N.A,c.A],[N.ADDRESS,c.ADDRESS],[N.ANNOTATION_XML,c.ANNOTATION_XML],[N.APPLET,c.APPLET],[N.AREA,c.AREA],[N.ARTICLE,c.ARTICLE],[N.ASIDE,c.ASIDE],[N.B,c.B],[N.BASE,c.BASE],[N.BASEFONT,c.BASEFONT],[N.BGSOUND,c.BGSOUND],[N.BIG,c.BIG],[N.BLOCKQUOTE,c.BLOCKQUOTE],[N.BODY,c.BODY],[N.BR,c.BR],[N.BUTTON,c.BUTTON],[N.CAPTION,c.CAPTION],[N.CENTER,c.CENTER],[N.CODE,c.CODE],[N.COL,c.COL],[N.COLGROUP,c.COLGROUP],[N.DD,c.DD],[N.DESC,c.DESC],[N.DETAILS,c.DETAILS],[N.DIALOG,c.DIALOG],[N.DIR,c.DIR],[N.DIV,c.DIV],[N.DL,c.DL],[N.DT,c.DT],[N.EM,c.EM],[N.EMBED,c.EMBED],[N.FIELDSET,c.FIELDSET],[N.FIGCAPTION,c.FIGCAPTION],[N.FIGURE,c.FIGURE],[N.FONT,c.FONT],[N.FOOTER,c.FOOTER],[N.FOREIGN_OBJECT,c.FOREIGN_OBJECT],[N.FORM,c.FORM],[N.FRAME,c.FRAME],[N.FRAMESET,c.FRAMESET],[N.H1,c.H1],[N.H2,c.H2],[N.H3,c.H3],[N.H4,c.H4],[N.H5,c.H5],[N.H6,c.H6],[N.HEAD,c.HEAD],[N.HEADER,c.HEADER],[N.HGROUP,c.HGROUP],[N.HR,c.HR],[N.HTML,c.HTML],[N.I,c.I],[N.IMG,c.IMG],[N.IMAGE,c.IMAGE],[N.INPUT,c.INPUT],[N.IFRAME,c.IFRAME],[N.KEYGEN,c.KEYGEN],[N.LABEL,c.LABEL],[N.LI,c.LI],[N.LINK,c.LINK],[N.LISTING,c.LISTING],[N.MAIN,c.MAIN],[N.MALIGNMARK,c.MALIGNMARK],[N.MARQUEE,c.MARQUEE],[N.MATH,c.MATH],[N.MENU,c.MENU],[N.META,c.META],[N.MGLYPH,c.MGLYPH],[N.MI,c.MI],[N.MO,c.MO],[N.MN,c.MN],[N.MS,c.MS],[N.MTEXT,c.MTEXT],[N.NAV,c.NAV],[N.NOBR,c.NOBR],[N.NOFRAMES,c.NOFRAMES],[N.NOEMBED,c.NOEMBED],[N.NOSCRIPT,c.NOSCRIPT],[N.OBJECT,c.OBJECT],[N.OL,c.OL],[N.OPTGROUP,c.OPTGROUP],[N.OPTION,c.OPTION],[N.P,c.P],[N.PARAM,c.PARAM],[N.PLAINTEXT,c.PLAINTEXT],[N.PRE,c.PRE],[N.RB,c.RB],[N.RP,c.RP],[N.RT,c.RT],[N.RTC,c.RTC],[N.RUBY,c.RUBY],[N.S,c.S],[N.SCRIPT,c.SCRIPT],[N.SEARCH,c.SEARCH],[N.SECTION,c.SECTION],[N.SELECT,c.SELECT],[N.SOURCE,c.SOURCE],[N.SMALL,c.SMALL],[N.SPAN,c.SPAN],[N.STRIKE,c.STRIKE],[N.STRONG,c.STRONG],[N.STYLE,c.STYLE],[N.SUB,c.SUB],[N.SUMMARY,c.SUMMARY],[N.SUP,c.SUP],[N.TABLE,c.TABLE],[N.TBODY,c.TBODY],[N.TEMPLATE,c.TEMPLATE],[N.TEXTAREA,c.TEXTAREA],[N.TFOOT,c.TFOOT],[N.TD,c.TD],[N.TH,c.TH],[N.THEAD,c.THEAD],[N.TITLE,c.TITLE],[N.TR,c.TR],[N.TRACK,c.TRACK],[N.TT,c.TT],[N.U,c.U],[N.UL,c.UL],[N.SVG,c.SVG],[N.VAR,c.VAR],[N.WBR,c.WBR],[N.XMP,c.XMP]]);function wn(e){var t;return(t=Ch.get(e))!==null&&t!==void 0?t:c.UNKNOWN}const M=c,Sh={[D.HTML]:new Set([M.ADDRESS,M.APPLET,M.AREA,M.ARTICLE,M.ASIDE,M.BASE,M.BASEFONT,M.BGSOUND,M.BLOCKQUOTE,M.BODY,M.BR,M.BUTTON,M.CAPTION,M.CENTER,M.COL,M.COLGROUP,M.DD,M.DETAILS,M.DIR,M.DIV,M.DL,M.DT,M.EMBED,M.FIELDSET,M.FIGCAPTION,M.FIGURE,M.FOOTER,M.FORM,M.FRAME,M.FRAMESET,M.H1,M.H2,M.H3,M.H4,M.H5,M.H6,M.HEAD,M.HEADER,M.HGROUP,M.HR,M.HTML,M.IFRAME,M.IMG,M.INPUT,M.LI,M.LINK,M.LISTING,M.MAIN,M.MARQUEE,M.MENU,M.META,M.NAV,M.NOEMBED,M.NOFRAMES,M.NOSCRIPT,M.OBJECT,M.OL,M.P,M.PARAM,M.PLAINTEXT,M.PRE,M.SCRIPT,M.SECTION,M.SELECT,M.SOURCE,M.STYLE,M.SUMMARY,M.TABLE,M.TBODY,M.TD,M.TEMPLATE,M.TEXTAREA,M.TFOOT,M.TH,M.THEAD,M.TITLE,M.TR,M.TRACK,M.UL,M.WBR,M.XMP]),[D.MATHML]:new Set([M.MI,M.MO,M.MN,M.MS,M.MTEXT,M.ANNOTATION_XML]),[D.SVG]:new Set([M.TITLE,M.FOREIGN_OBJECT,M.DESC]),[D.XLINK]:new Set,[D.XML]:new Set,[D.XMLNS]:new Set},ha=new Set([M.H1,M.H2,M.H3,M.H4,M.H5,M.H6]);var E;(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"})(E||(E={}));const we={DATA:E.DATA,RCDATA:E.RCDATA,RAWTEXT:E.RAWTEXT,SCRIPT_DATA:E.SCRIPT_DATA,PLAINTEXT:E.PLAINTEXT,CDATA_SECTION:E.CDATA_SECTION};function Ih(e){return e>=g.DIGIT_0&&e<=g.DIGIT_9}function Un(e){return e>=g.LATIN_CAPITAL_A&&e<=g.LATIN_CAPITAL_Z}function Nh(e){return e>=g.LATIN_SMALL_A&&e<=g.LATIN_SMALL_Z}function vt(e){return Nh(e)||Un(e)}function ao(e){return vt(e)||Ih(e)}function _r(e){return e+32}function Pl(e){return e===g.SPACE||e===g.LINE_FEED||e===g.TABULATION||e===g.FORM_FEED}function so(e){return Pl(e)||e===g.SOLIDUS||e===g.GREATER_THAN_SIGN}function vh(e){return e===g.NULL?L.nullCharacterReference:e>1114111?L.characterReferenceOutsideUnicodeRange:Ll(e)?L.surrogateCharacterReference:Ol(e)?L.noncharacterCharacterReference:Rl(e)||e===g.CARRIAGE_RETURN?L.controlCharacterReference:null}class Lh{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=E.DATA,this.returnState=E.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new gh(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new wh(bh,(r,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(L.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(L.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const i=vh(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:ie.START_TAG,tagName:"",tagID:c.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:ie.END_TAG,tagName:"",tagID:c.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:ie.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:ie.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(Dl(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(L.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=wn(t.tagName),t.type===ie.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(L.endTagWithAttributes),t.selfClosing&&this._err(L.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 ie.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case ie.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case ie.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:ie.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=Pl(t)?ie.WHITESPACE_CHARACTER:t===g.NULL?ie.NULL_CHARACTER:ie.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(ie.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=E.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?xt.Attribute:xt.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===E.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===E.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===E.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case E.DATA:{this._stateData(t);break}case E.RCDATA:{this._stateRcdata(t);break}case E.RAWTEXT:{this._stateRawtext(t);break}case E.SCRIPT_DATA:{this._stateScriptData(t);break}case E.PLAINTEXT:{this._statePlaintext(t);break}case E.TAG_OPEN:{this._stateTagOpen(t);break}case E.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case E.TAG_NAME:{this._stateTagName(t);break}case E.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case E.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case E.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case E.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case E.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case E.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case E.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case E.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case E.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case E.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case E.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case E.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case E.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case E.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case E.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case E.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case E.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case E.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case E.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case E.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case E.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case E.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case E.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case E.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case E.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case E.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case E.BOGUS_COMMENT:{this._stateBogusComment(t);break}case E.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case E.COMMENT_START:{this._stateCommentStart(t);break}case E.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case E.COMMENT:{this._stateComment(t);break}case E.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case E.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case E.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case E.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case E.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case E.COMMENT_END:{this._stateCommentEnd(t);break}case E.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case E.DOCTYPE:{this._stateDoctype(t);break}case E.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case E.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case E.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case E.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case E.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case E.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case E.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case E.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case E.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case E.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case E.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case E.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case E.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case E.CDATA_SECTION:{this._stateCdataSection(t);break}case E.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case E.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case E.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case E.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case g.LESS_THAN_SIGN:{this.state=E.TAG_OPEN;break}case g.AMPERSAND:{this._startCharacterReference();break}case g.NULL:{this._err(L.unexpectedNullCharacter),this._emitCodePoint(t);break}case g.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case g.AMPERSAND:{this._startCharacterReference();break}case g.LESS_THAN_SIGN:{this.state=E.RCDATA_LESS_THAN_SIGN;break}case g.NULL:{this._err(L.unexpectedNullCharacter),this._emitChars(Te);break}case g.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case g.LESS_THAN_SIGN:{this.state=E.RAWTEXT_LESS_THAN_SIGN;break}case g.NULL:{this._err(L.unexpectedNullCharacter),this._emitChars(Te);break}case g.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case g.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_LESS_THAN_SIGN;break}case g.NULL:{this._err(L.unexpectedNullCharacter),this._emitChars(Te);break}case g.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case g.NULL:{this._err(L.unexpectedNullCharacter),this._emitChars(Te);break}case g.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(vt(t))this._createStartTagToken(),this.state=E.TAG_NAME,this._stateTagName(t);else switch(t){case g.EXCLAMATION_MARK:{this.state=E.MARKUP_DECLARATION_OPEN;break}case g.SOLIDUS:{this.state=E.END_TAG_OPEN;break}case g.QUESTION_MARK:{this._err(L.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=E.BOGUS_COMMENT,this._stateBogusComment(t);break}case g.EOF:{this._err(L.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(L.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=E.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(vt(t))this._createEndTagToken(),this.state=E.TAG_NAME,this._stateTagName(t);else switch(t){case g.GREATER_THAN_SIGN:{this._err(L.missingEndTagName),this.state=E.DATA;break}case g.EOF:{this._err(L.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(L.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=E.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:{this.state=E.BEFORE_ATTRIBUTE_NAME;break}case g.SOLIDUS:{this.state=E.SELF_CLOSING_START_TAG;break}case g.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentTagToken();break}case g.NULL:{this._err(L.unexpectedNullCharacter),n.tagName+=Te;break}case g.EOF:{this._err(L.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Un(t)?_r(t):t)}}_stateRcdataLessThanSign(t){t===g.SOLIDUS?this.state=E.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=E.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){vt(t)?(this.state=E.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=E.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 g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=E.BEFORE_ATTRIBUTE_NAME,!1;case g.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=E.SELF_CLOSING_START_TAG,!1;case g.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=E.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=E.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===g.SOLIDUS?this.state=E.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=E.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){vt(t)?(this.state=E.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=E.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=E.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case g.SOLIDUS:{this.state=E.SCRIPT_DATA_END_TAG_OPEN;break}case g.EXCLAMATION_MARK:{this.state=E.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=E.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){vt(t)?(this.state=E.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=E.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=E.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===g.HYPHEN_MINUS?(this.state=E.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=E.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===g.HYPHEN_MINUS?(this.state=E.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=E.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case g.HYPHEN_MINUS:{this.state=E.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case g.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case g.NULL:{this._err(L.unexpectedNullCharacter),this._emitChars(Te);break}case g.EOF:{this._err(L.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case g.HYPHEN_MINUS:{this.state=E.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case g.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case g.NULL:{this._err(L.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_ESCAPED,this._emitChars(Te);break}case g.EOF:{this._err(L.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=E.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case g.HYPHEN_MINUS:{this._emitChars("-");break}case g.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case g.GREATER_THAN_SIGN:{this.state=E.SCRIPT_DATA,this._emitChars(">");break}case g.NULL:{this._err(L.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_ESCAPED,this._emitChars(Te);break}case g.EOF:{this._err(L.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=E.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===g.SOLIDUS?this.state=E.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:vt(t)?(this._emitChars("<"),this.state=E.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=E.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){vt(t)?(this.state=E.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=E.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=E.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(qe.SCRIPT,!1)&&so(this.preprocessor.peek(qe.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<qe.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=E.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case g.HYPHEN_MINUS:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case g.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case g.NULL:{this._err(L.unexpectedNullCharacter),this._emitChars(Te);break}case g.EOF:{this._err(L.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case g.HYPHEN_MINUS:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case g.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case g.NULL:{this._err(L.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Te);break}case g.EOF:{this._err(L.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case g.HYPHEN_MINUS:{this._emitChars("-");break}case g.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case g.GREATER_THAN_SIGN:{this.state=E.SCRIPT_DATA,this._emitChars(">");break}case g.NULL:{this._err(L.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Te);break}case g.EOF:{this._err(L.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===g.SOLIDUS?(this.state=E.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(qe.SCRIPT,!1)&&so(this.preprocessor.peek(qe.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<qe.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=E.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.SOLIDUS:case g.GREATER_THAN_SIGN:case g.EOF:{this.state=E.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case g.EQUALS_SIGN:{this._err(L.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=E.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=E.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:case g.SOLIDUS:case g.GREATER_THAN_SIGN:case g.EOF:{this._leaveAttrName(),this.state=E.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case g.EQUALS_SIGN:{this._leaveAttrName(),this.state=E.BEFORE_ATTRIBUTE_VALUE;break}case g.QUOTATION_MARK:case g.APOSTROPHE:case g.LESS_THAN_SIGN:{this._err(L.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case g.NULL:{this._err(L.unexpectedNullCharacter),this.currentAttr.name+=Te;break}default:this.currentAttr.name+=String.fromCodePoint(Un(t)?_r(t):t)}}_stateAfterAttributeName(t){switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.SOLIDUS:{this.state=E.SELF_CLOSING_START_TAG;break}case g.EQUALS_SIGN:{this.state=E.BEFORE_ATTRIBUTE_VALUE;break}case g.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentTagToken();break}case g.EOF:{this._err(L.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=E.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.QUOTATION_MARK:{this.state=E.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case g.APOSTROPHE:{this.state=E.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case g.GREATER_THAN_SIGN:{this._err(L.missingAttributeValue),this.state=E.DATA,this.emitCurrentTagToken();break}default:this.state=E.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case g.QUOTATION_MARK:{this.state=E.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case g.AMPERSAND:{this._startCharacterReference();break}case g.NULL:{this._err(L.unexpectedNullCharacter),this.currentAttr.value+=Te;break}case g.EOF:{this._err(L.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case g.APOSTROPHE:{this.state=E.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case g.AMPERSAND:{this._startCharacterReference();break}case g.NULL:{this._err(L.unexpectedNullCharacter),this.currentAttr.value+=Te;break}case g.EOF:{this._err(L.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:{this._leaveAttrValue(),this.state=E.BEFORE_ATTRIBUTE_NAME;break}case g.AMPERSAND:{this._startCharacterReference();break}case g.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=E.DATA,this.emitCurrentTagToken();break}case g.NULL:{this._err(L.unexpectedNullCharacter),this.currentAttr.value+=Te;break}case g.QUOTATION_MARK:case g.APOSTROPHE:case g.LESS_THAN_SIGN:case g.EQUALS_SIGN:case g.GRAVE_ACCENT:{this._err(L.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case g.EOF:{this._err(L.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:{this._leaveAttrValue(),this.state=E.BEFORE_ATTRIBUTE_NAME;break}case g.SOLIDUS:{this._leaveAttrValue(),this.state=E.SELF_CLOSING_START_TAG;break}case g.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=E.DATA,this.emitCurrentTagToken();break}case g.EOF:{this._err(L.eofInTag),this._emitEOFToken();break}default:this._err(L.missingWhitespaceBetweenAttributes),this.state=E.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case g.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=E.DATA,this.emitCurrentTagToken();break}case g.EOF:{this._err(L.eofInTag),this._emitEOFToken();break}default:this._err(L.unexpectedSolidusInTag),this.state=E.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case g.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentComment(n);break}case g.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case g.NULL:{this._err(L.unexpectedNullCharacter),n.data+=Te;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(qe.DASH_DASH,!0)?(this._createCommentToken(qe.DASH_DASH.length+1),this.state=E.COMMENT_START):this._consumeSequenceIfMatch(qe.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(qe.DOCTYPE.length+1),this.state=E.DOCTYPE):this._consumeSequenceIfMatch(qe.CDATA_START,!0)?this.inForeignNode?this.state=E.CDATA_SECTION:(this._err(L.cdataInHtmlContent),this._createCommentToken(qe.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=E.BOGUS_COMMENT):this._ensureHibernation()||(this._err(L.incorrectlyOpenedComment),this._createCommentToken(2),this.state=E.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case g.HYPHEN_MINUS:{this.state=E.COMMENT_START_DASH;break}case g.GREATER_THAN_SIGN:{this._err(L.abruptClosingOfEmptyComment),this.state=E.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=E.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case g.HYPHEN_MINUS:{this.state=E.COMMENT_END;break}case g.GREATER_THAN_SIGN:{this._err(L.abruptClosingOfEmptyComment),this.state=E.DATA,this.emitCurrentComment(n);break}case g.EOF:{this._err(L.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=E.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case g.HYPHEN_MINUS:{this.state=E.COMMENT_END_DASH;break}case g.LESS_THAN_SIGN:{n.data+="<",this.state=E.COMMENT_LESS_THAN_SIGN;break}case g.NULL:{this._err(L.unexpectedNullCharacter),n.data+=Te;break}case g.EOF:{this._err(L.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case g.EXCLAMATION_MARK:{n.data+="!",this.state=E.COMMENT_LESS_THAN_SIGN_BANG;break}case g.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=E.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===g.HYPHEN_MINUS?this.state=E.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=E.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===g.HYPHEN_MINUS?this.state=E.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=E.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==g.GREATER_THAN_SIGN&&t!==g.EOF&&this._err(L.nestedComment),this.state=E.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case g.HYPHEN_MINUS:{this.state=E.COMMENT_END;break}case g.EOF:{this._err(L.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=E.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case g.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentComment(n);break}case g.EXCLAMATION_MARK:{this.state=E.COMMENT_END_BANG;break}case g.HYPHEN_MINUS:{n.data+="-";break}case g.EOF:{this._err(L.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=E.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case g.HYPHEN_MINUS:{n.data+="--!",this.state=E.COMMENT_END_DASH;break}case g.GREATER_THAN_SIGN:{this._err(L.incorrectlyClosedComment),this.state=E.DATA,this.emitCurrentComment(n);break}case g.EOF:{this._err(L.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=E.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:{this.state=E.BEFORE_DOCTYPE_NAME;break}case g.GREATER_THAN_SIGN:{this.state=E.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case g.EOF:{this._err(L.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(L.missingWhitespaceBeforeDoctypeName),this.state=E.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Un(t))this._createDoctypeToken(String.fromCharCode(_r(t))),this.state=E.DOCTYPE_NAME;else switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.NULL:{this._err(L.unexpectedNullCharacter),this._createDoctypeToken(Te),this.state=E.DOCTYPE_NAME;break}case g.GREATER_THAN_SIGN:{this._err(L.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case g.EOF:{this._err(L.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=E.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:{this.state=E.AFTER_DOCTYPE_NAME;break}case g.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentDoctype(n);break}case g.NULL:{this._err(L.unexpectedNullCharacter),n.name+=Te;break}case g.EOF:{this._err(L.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Un(t)?_r(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentDoctype(n);break}case g.EOF:{this._err(L.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(qe.PUBLIC,!1)?this.state=E.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(qe.SYSTEM,!1)?this.state=E.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(L.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:{this.state=E.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case g.QUOTATION_MARK:{this._err(L.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=E.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case g.APOSTROPHE:{this._err(L.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=E.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case g.GREATER_THAN_SIGN:{this._err(L.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(n);break}case g.EOF:{this._err(L.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(L.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.QUOTATION_MARK:{n.publicId="",this.state=E.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case g.APOSTROPHE:{n.publicId="",this.state=E.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case g.GREATER_THAN_SIGN:{this._err(L.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(n);break}case g.EOF:{this._err(L.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(L.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case g.QUOTATION_MARK:{this.state=E.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case g.NULL:{this._err(L.unexpectedNullCharacter),n.publicId+=Te;break}case g.GREATER_THAN_SIGN:{this._err(L.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case g.EOF:{this._err(L.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 g.APOSTROPHE:{this.state=E.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case g.NULL:{this._err(L.unexpectedNullCharacter),n.publicId+=Te;break}case g.GREATER_THAN_SIGN:{this._err(L.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case g.EOF:{this._err(L.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 g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:{this.state=E.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case g.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentDoctype(n);break}case g.QUOTATION_MARK:{this._err(L.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case g.APOSTROPHE:{this._err(L.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case g.EOF:{this._err(L.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(L.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=E.DATA;break}case g.QUOTATION_MARK:{n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case g.APOSTROPHE:{n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case g.EOF:{this._err(L.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(L.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:{this.state=E.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case g.QUOTATION_MARK:{this._err(L.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case g.APOSTROPHE:{this._err(L.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case g.GREATER_THAN_SIGN:{this._err(L.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(n);break}case g.EOF:{this._err(L.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(L.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.QUOTATION_MARK:{n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case g.APOSTROPHE:{n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case g.GREATER_THAN_SIGN:{this._err(L.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(n);break}case g.EOF:{this._err(L.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(L.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case g.QUOTATION_MARK:{this.state=E.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case g.NULL:{this._err(L.unexpectedNullCharacter),n.systemId+=Te;break}case g.GREATER_THAN_SIGN:{this._err(L.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case g.EOF:{this._err(L.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 g.APOSTROPHE:{this.state=E.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case g.NULL:{this._err(L.unexpectedNullCharacter),n.systemId+=Te;break}case g.GREATER_THAN_SIGN:{this._err(L.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case g.EOF:{this._err(L.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 g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=E.DATA;break}case g.EOF:{this._err(L.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(L.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case g.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=E.DATA;break}case g.NULL:{this._err(L.unexpectedNullCharacter);break}case g.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case g.RIGHT_SQUARE_BRACKET:{this.state=E.CDATA_SECTION_BRACKET;break}case g.EOF:{this._err(L.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===g.RIGHT_SQUARE_BRACKET?this.state=E.CDATA_SECTION_END:(this._emitChars("]"),this.state=E.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case g.GREATER_THAN_SIGN:{this.state=E.DATA;break}case g.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=E.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(g.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&ao(this.preprocessor.peek(1))?E.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){ao(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===g.SEMICOLON&&this._err(L.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const Ml=new Set([c.DD,c.DT,c.LI,c.OPTGROUP,c.OPTION,c.P,c.RB,c.RP,c.RT,c.RTC]),oo=new Set([...Ml,c.CAPTION,c.COLGROUP,c.TBODY,c.TD,c.TFOOT,c.TH,c.THEAD,c.TR]),qr=new Set([c.APPLET,c.CAPTION,c.HTML,c.MARQUEE,c.OBJECT,c.TABLE,c.TD,c.TEMPLATE,c.TH]),Rh=new Set([...qr,c.OL,c.UL]),Oh=new Set([...qr,c.BUTTON]),uo=new Set([c.ANNOTATION_XML,c.MI,c.MN,c.MO,c.MS,c.MTEXT]),lo=new Set([c.DESC,c.FOREIGN_OBJECT,c.TITLE]),Dh=new Set([c.TR,c.TEMPLATE,c.HTML]),Ph=new Set([c.TBODY,c.TFOOT,c.THEAD,c.TEMPLATE,c.HTML]),Mh=new Set([c.TABLE,c.TEMPLATE,c.HTML]),Bh=new Set([c.TD,c.TH]);class Fh{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=c.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===c.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===D.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])!==D.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(ha,D.HTML)}popUntilTableCellPopped(){this.popUntilPopped(Bh,D.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(Mh,D.HTML)}clearBackToTableBodyContext(){this.clearBackTo(Ph,D.HTML)}clearBackToTableRowContext(){this.clearBackTo(Dh,D.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===c.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===c.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const i=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case D.HTML:{if(i===t)return!0;if(n.has(i))return!1;break}case D.SVG:{if(lo.has(i))return!1;break}case D.MATHML:{if(uo.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,qr)}hasInListItemScope(t){return this.hasInDynamicScope(t,Rh)}hasInButtonScope(t){return this.hasInDynamicScope(t,Oh)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case D.HTML:{if(ha.has(n))return!0;if(qr.has(n))return!1;break}case D.SVG:{if(lo.has(n))return!1;break}case D.MATHML:{if(uo.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===D.HTML)switch(this.tagIDs[n]){case t:return!0;case c.TABLE:case c.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===D.HTML)switch(this.tagIDs[t]){case c.TBODY:case c.THEAD:case c.TFOOT:return!0;case c.TABLE:case c.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===D.HTML)switch(this.tagIDs[n]){case t:return!0;case c.OPTION:case c.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&Ml.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&oo.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&oo.has(this.currentTagId);)this.pop()}}const Oi=3;var ft;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(ft||(ft={}));const co={type:ft.Marker};class Hh{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],i=n.length,a=this.treeAdapter.getTagName(t),s=this.treeAdapter.getNamespaceURI(t);for(let o=0;o<this.entries.length;o++){const u=this.entries[o];if(u.type===ft.Marker)break;const{element:l}=u;if(this.treeAdapter.getTagName(l)===a&&this.treeAdapter.getNamespaceURI(l)===s){const f=this.treeAdapter.getAttrList(l);f.length===i&&r.push({idx:o,attrs:f})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<Oi)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<Oi)return;const i=new Map(n.map(s=>[s.name,s.value]));let a=0;for(let s=0;s<r.length;s++){const o=r[s];o.attrs.every(u=>i.get(u.name)===u.value)&&(a+=1,a>=Oi&&this.entries.splice(o.idx,1))}}insertMarker(){this.entries.unshift(co)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:ft.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:ft.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(co);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===ft.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===ft.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===ft.Element&&n.element===t)}}const Lt={createDocument(){return{nodeName:"#document",mode:rt.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(a=>a.nodeName==="#documentType");if(i)i.name=t,i.publicId=n,i.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};Lt.appendChild(e,a)}},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(Lt.isTextNode(n)){n.value+=t;return}}Lt.appendChild(e,Lt.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Lt.isTextNode(r)?r.value+=t:Lt.insertBefore(e,Lt.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}}},Bl="html",Uh="about:legacy-compat",zh="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Fl=["+//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//"],$h=[...Fl,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],Yh=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Hl=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],jh=[...Hl,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function fo(e,t){return t.some(n=>e.startsWith(n))}function qh(e){return e.name===Bl&&e.publicId===null&&(e.systemId===null||e.systemId===Uh)}function Vh(e){if(e.name!==Bl)return rt.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===zh)return rt.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),Yh.has(n))return rt.QUIRKS;let r=t===null?$h:Fl;if(fo(n,r))return rt.QUIRKS;if(r=t===null?Hl:jh,fo(n,r))return rt.LIMITED_QUIRKS}return rt.NO_QUIRKS}const ho={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},Wh="definitionurl",Gh="definitionURL",Qh=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])),Kh=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:D.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:D.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:D.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:D.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:D.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:D.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:D.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:D.XML}],["xml:space",{prefix:"xml",name:"space",namespace:D.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:D.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:D.XMLNS}]]),Xh=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])),Zh=new Set([c.B,c.BIG,c.BLOCKQUOTE,c.BODY,c.BR,c.CENTER,c.CODE,c.DD,c.DIV,c.DL,c.DT,c.EM,c.EMBED,c.H1,c.H2,c.H3,c.H4,c.H5,c.H6,c.HEAD,c.HR,c.I,c.IMG,c.LI,c.LISTING,c.MENU,c.META,c.NOBR,c.OL,c.P,c.PRE,c.RUBY,c.S,c.SMALL,c.SPAN,c.STRONG,c.STRIKE,c.SUB,c.SUP,c.TABLE,c.TT,c.U,c.UL,c.VAR]);function Jh(e){const t=e.tagID;return t===c.FONT&&e.attrs.some(({name:r})=>r===Wt.COLOR||r===Wt.SIZE||r===Wt.FACE)||Zh.has(t)}function Ul(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===Wh){e.attrs[t].name=Gh;break}}function zl(e){for(let t=0;t<e.attrs.length;t++){const n=Qh.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Ga(e){for(let t=0;t<e.attrs.length;t++){const n=Kh.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 ep(e){const t=Xh.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=wn(e.tagName))}function tp(e,t){return t===D.MATHML&&(e===c.MI||e===c.MO||e===c.MN||e===c.MS||e===c.MTEXT)}function np(e,t,n){if(t===D.MATHML&&e===c.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===Wt.ENCODING){const i=n[r].value.toLowerCase();return i===ho.TEXT_HTML||i===ho.APPLICATION_XML}}return t===D.SVG&&(e===c.FOREIGN_OBJECT||e===c.DESC||e===c.TITLE)}function rp(e,t,n,r){return(!r||r===D.HTML)&&np(e,t,n)||(!r||r===D.MATHML)&&tp(e,t)}const ip="hidden",ap=8,sp=3;var _;(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"})(_||(_={}));const op={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},$l=new Set([c.TABLE,c.TBODY,c.TFOOT,c.THEAD,c.TR]),po={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Lt,onParseError:null};class mo{constructor(t,n,r=null,i=null){this.fragmentContext=r,this.scriptHandler=i,this.currentToken=null,this.stopped=!1,this.insertionMode=_.INITIAL,this.originalInsertionMode=_.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={...po,...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 Lh(this.options,this),this.activeFormattingElements=new Hh(this.treeAdapter),this.fragmentContextID=r?wn(this.treeAdapter.getTagName(r)):c.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new Fh(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={...po,...n};t??(t=r.treeAdapter.createElement(N.TEMPLATE,D.HTML,[]));const i=r.treeAdapter.createElement("documentmock",D.HTML,[]),a=new this(r,i,t);return a.fragmentContextID===c.TEMPLATE&&a.tmplInsertionModeStack.unshift(_.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}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 a=(i=t.location)!==null&&i!==void 0?i:op,s={code:n,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:r?a.startLine:a.endLine,endCol:r?a.startCol:a.endCol,endOffset:r?a.startOffset:a.endOffset};this.onParseError(s)}onItemPush(t,n,r){var i,a;(a=(i=this.treeAdapter).onItemPush)===null||a===void 0||a.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 a,s;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,s=this.fragmentContextID):{current:a,currentTagId:s}=this.openElements,this._setContextModes(a,s)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===D.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,D.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=_.TEXT}switchToPlaintextParsing(){this.insertionMode=_.TEXT,this.originalInsertionMode=_.IN_BODY,this.tokenizer.state=we.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)===N.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==D.HTML))switch(this.fragmentContextID){case c.TITLE:case c.TEXTAREA:{this.tokenizer.state=we.RCDATA;break}case c.STYLE:case c.XMP:case c.IFRAME:case c.NOEMBED:case c.NOFRAMES:case c.NOSCRIPT:{this.tokenizer.state=we.RAWTEXT;break}case c.SCRIPT:{this.tokenizer.state=we.SCRIPT_DATA;break}case c.PLAINTEXT:{this.tokenizer.state=we.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 s=this.treeAdapter.getChildNodes(this.document).find(o=>this.treeAdapter.isDocumentTypeNode(o));s&&this.treeAdapter.setNodeSourceCodeLocation(s,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,D.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,D.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(N.HTML,D.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,c.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const i=this.treeAdapter.getChildNodes(n),a=r?i.lastIndexOf(r):i.length,s=i[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(s)){const{endLine:u,endCol:l,endOffset:f}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(s,{endLine:u,endCol:l,endOffset:f})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(s,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),a=n.type===ie.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,a)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===c.SVG&&this.treeAdapter.getTagName(n)===N.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===D.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===c.MGLYPH||t.tagID===c.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,D.HTML)}_processToken(t){switch(t.type){case ie.CHARACTER:{this.onCharacter(t);break}case ie.NULL_CHARACTER:{this.onNullCharacter(t);break}case ie.COMMENT:{this.onComment(t);break}case ie.DOCTYPE:{this.onDoctype(t);break}case ie.START_TAG:{this._processStartTag(t);break}case ie.END_TAG:{this.onEndTag(t);break}case ie.EOF:{this.onEof(t);break}case ie.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const i=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return rp(t,i,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(i=>i.type===ft.Marker||this.openElements.contains(i.element)),r=n===-1?t-1:n-1;for(let i=r;i>=0;i--){const a=this.activeFormattingElements.entries[i];this._insertElement(a.token,this.treeAdapter.getNamespaceURI(a.element)),a.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=_.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(c.P),this.openElements.popUntilTagNamePopped(c.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case c.TR:{this.insertionMode=_.IN_ROW;return}case c.TBODY:case c.THEAD:case c.TFOOT:{this.insertionMode=_.IN_TABLE_BODY;return}case c.CAPTION:{this.insertionMode=_.IN_CAPTION;return}case c.COLGROUP:{this.insertionMode=_.IN_COLUMN_GROUP;return}case c.TABLE:{this.insertionMode=_.IN_TABLE;return}case c.BODY:{this.insertionMode=_.IN_BODY;return}case c.FRAMESET:{this.insertionMode=_.IN_FRAMESET;return}case c.SELECT:{this._resetInsertionModeForSelect(t);return}case c.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case c.HTML:{this.insertionMode=this.headElement?_.AFTER_HEAD:_.BEFORE_HEAD;return}case c.TD:case c.TH:{if(t>0){this.insertionMode=_.IN_CELL;return}break}case c.HEAD:{if(t>0){this.insertionMode=_.IN_HEAD;return}break}}this.insertionMode=_.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===c.TEMPLATE)break;if(r===c.TABLE){this.insertionMode=_.IN_SELECT_IN_TABLE;return}}this.insertionMode=_.IN_SELECT}_isElementCausesFosterParenting(t){return $l.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case c.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===D.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case c.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return Sh[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){B1(this,t);return}switch(this.insertionMode){case _.INITIAL:{On(this,t);break}case _.BEFORE_HTML:{jn(this,t);break}case _.BEFORE_HEAD:{qn(this,t);break}case _.IN_HEAD:{Vn(this,t);break}case _.IN_HEAD_NO_SCRIPT:{Wn(this,t);break}case _.AFTER_HEAD:{Gn(this,t);break}case _.IN_BODY:case _.IN_CAPTION:case _.IN_CELL:case _.IN_TEMPLATE:{jl(this,t);break}case _.TEXT:case _.IN_SELECT:case _.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case _.IN_TABLE:case _.IN_TABLE_BODY:case _.IN_ROW:{Di(this,t);break}case _.IN_TABLE_TEXT:{Kl(this,t);break}case _.IN_COLUMN_GROUP:{Vr(this,t);break}case _.AFTER_BODY:{Wr(this,t);break}case _.AFTER_AFTER_BODY:{Dr(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){M1(this,t);return}switch(this.insertionMode){case _.INITIAL:{On(this,t);break}case _.BEFORE_HTML:{jn(this,t);break}case _.BEFORE_HEAD:{qn(this,t);break}case _.IN_HEAD:{Vn(this,t);break}case _.IN_HEAD_NO_SCRIPT:{Wn(this,t);break}case _.AFTER_HEAD:{Gn(this,t);break}case _.TEXT:{this._insertCharacters(t);break}case _.IN_TABLE:case _.IN_TABLE_BODY:case _.IN_ROW:{Di(this,t);break}case _.IN_COLUMN_GROUP:{Vr(this,t);break}case _.AFTER_BODY:{Wr(this,t);break}case _.AFTER_AFTER_BODY:{Dr(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){pa(this,t);return}switch(this.insertionMode){case _.INITIAL:case _.BEFORE_HTML:case _.BEFORE_HEAD:case _.IN_HEAD:case _.IN_HEAD_NO_SCRIPT:case _.AFTER_HEAD:case _.IN_BODY:case _.IN_TABLE:case _.IN_CAPTION:case _.IN_COLUMN_GROUP:case _.IN_TABLE_BODY:case _.IN_ROW:case _.IN_CELL:case _.IN_SELECT:case _.IN_SELECT_IN_TABLE:case _.IN_TEMPLATE:case _.IN_FRAMESET:case _.AFTER_FRAMESET:{pa(this,t);break}case _.IN_TABLE_TEXT:{Dn(this,t);break}case _.AFTER_BODY:{pp(this,t);break}case _.AFTER_AFTER_BODY:case _.AFTER_AFTER_FRAMESET:{mp(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case _.INITIAL:{gp(this,t);break}case _.BEFORE_HEAD:case _.IN_HEAD:case _.IN_HEAD_NO_SCRIPT:case _.AFTER_HEAD:{this._err(t,L.misplacedDoctype);break}case _.IN_TABLE_TEXT:{Dn(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,L.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?F1(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case _.INITIAL:{On(this,t);break}case _.BEFORE_HTML:{bp(this,t);break}case _.BEFORE_HEAD:{Tp(this,t);break}case _.IN_HEAD:{lt(this,t);break}case _.IN_HEAD_NO_SCRIPT:{xp(this,t);break}case _.AFTER_HEAD:{wp(this,t);break}case _.IN_BODY:{Fe(this,t);break}case _.IN_TABLE:{bn(this,t);break}case _.IN_TABLE_TEXT:{Dn(this,t);break}case _.IN_CAPTION:{_1(this,t);break}case _.IN_COLUMN_GROUP:{Xa(this,t);break}case _.IN_TABLE_BODY:{di(this,t);break}case _.IN_ROW:{fi(this,t);break}case _.IN_CELL:{y1(this,t);break}case _.IN_SELECT:{Jl(this,t);break}case _.IN_SELECT_IN_TABLE:{A1(this,t);break}case _.IN_TEMPLATE:{S1(this,t);break}case _.AFTER_BODY:{N1(this,t);break}case _.IN_FRAMESET:{v1(this,t);break}case _.AFTER_FRAMESET:{R1(this,t);break}case _.AFTER_AFTER_BODY:{D1(this,t);break}case _.AFTER_AFTER_FRAMESET:{P1(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?H1(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case _.INITIAL:{On(this,t);break}case _.BEFORE_HTML:{Ep(this,t);break}case _.BEFORE_HEAD:{_p(this,t);break}case _.IN_HEAD:{kp(this,t);break}case _.IN_HEAD_NO_SCRIPT:{yp(this,t);break}case _.AFTER_HEAD:{Ap(this,t);break}case _.IN_BODY:{ci(this,t);break}case _.TEXT:{c1(this,t);break}case _.IN_TABLE:{nr(this,t);break}case _.IN_TABLE_TEXT:{Dn(this,t);break}case _.IN_CAPTION:{k1(this,t);break}case _.IN_COLUMN_GROUP:{x1(this,t);break}case _.IN_TABLE_BODY:{ma(this,t);break}case _.IN_ROW:{Zl(this,t);break}case _.IN_CELL:{w1(this,t);break}case _.IN_SELECT:{ec(this,t);break}case _.IN_SELECT_IN_TABLE:{C1(this,t);break}case _.IN_TEMPLATE:{I1(this,t);break}case _.AFTER_BODY:{nc(this,t);break}case _.IN_FRAMESET:{L1(this,t);break}case _.AFTER_FRAMESET:{O1(this,t);break}case _.AFTER_AFTER_BODY:{Dr(this,t);break}}}onEof(t){switch(this.insertionMode){case _.INITIAL:{On(this,t);break}case _.BEFORE_HTML:{jn(this,t);break}case _.BEFORE_HEAD:{qn(this,t);break}case _.IN_HEAD:{Vn(this,t);break}case _.IN_HEAD_NO_SCRIPT:{Wn(this,t);break}case _.AFTER_HEAD:{Gn(this,t);break}case _.IN_BODY:case _.IN_TABLE:case _.IN_CAPTION:case _.IN_COLUMN_GROUP:case _.IN_TABLE_BODY:case _.IN_ROW:case _.IN_CELL:case _.IN_SELECT:case _.IN_SELECT_IN_TABLE:{Gl(this,t);break}case _.TEXT:{d1(this,t);break}case _.IN_TABLE_TEXT:{Dn(this,t);break}case _.IN_TEMPLATE:{tc(this,t);break}case _.AFTER_BODY:case _.IN_FRAMESET:case _.AFTER_FRAMESET:case _.AFTER_AFTER_BODY:case _.AFTER_AFTER_FRAMESET:{Ka(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===g.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 _.IN_HEAD:case _.IN_HEAD_NO_SCRIPT:case _.AFTER_HEAD:case _.TEXT:case _.IN_COLUMN_GROUP:case _.IN_SELECT:case _.IN_SELECT_IN_TABLE:case _.IN_FRAMESET:case _.AFTER_FRAMESET:{this._insertCharacters(t);break}case _.IN_BODY:case _.IN_CAPTION:case _.IN_CELL:case _.IN_TEMPLATE:case _.AFTER_BODY:case _.AFTER_AFTER_BODY:case _.AFTER_AFTER_FRAMESET:{Yl(this,t);break}case _.IN_TABLE:case _.IN_TABLE_BODY:case _.IN_ROW:{Di(this,t);break}case _.IN_TABLE_TEXT:{Ql(this,t);break}}}}function up(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):Wl(e,t),n}function lp(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 cp(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,s=i;s!==n;a++,s=i){i=e.openElements.getCommonAncestor(s);const o=e.activeFormattingElements.getElementEntry(s),u=o&&a>=sp;!o||u?(u&&e.activeFormattingElements.removeEntry(o),e.openElements.remove(s)):(s=dp(e,o),r===t&&(e.activeFormattingElements.bookmark=o),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(s,r),r=s)}return r}function dp(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 fp(e,t,n){const r=e.treeAdapter.getTagName(t),i=wn(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);i===c.TEMPLATE&&a===D.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function hp(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,a=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,i.tagID)}function Qa(e,t){for(let n=0;n<ap;n++){const r=up(e,t);if(!r)break;const i=lp(e,r);if(!i)break;e.activeFormattingElements.bookmark=r;const a=cp(e,i,r.element),s=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),s&&fp(e,s,a),hp(e,i,r)}}function pa(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function pp(e,t){e._appendCommentNode(t,e.openElements.items[0])}function mp(e,t){e._appendCommentNode(t,e.document)}function Ka(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 a=e.openElements.items[1],s=e.treeAdapter.getNodeSourceCodeLocation(a);s&&!s.endTag&&e._setEndLocation(a,t)}}}}function gp(e,t){e._setDocumentType(t);const n=t.forceQuirks?rt.QUIRKS:Vh(t);qh(t)||e._err(t,L.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=_.BEFORE_HTML}function On(e,t){e._err(t,L.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,rt.QUIRKS),e.insertionMode=_.BEFORE_HTML,e._processToken(t)}function bp(e,t){t.tagID===c.HTML?(e._insertElement(t,D.HTML),e.insertionMode=_.BEFORE_HEAD):jn(e,t)}function Ep(e,t){const n=t.tagID;(n===c.HTML||n===c.HEAD||n===c.BODY||n===c.BR)&&jn(e,t)}function jn(e,t){e._insertFakeRootElement(),e.insertionMode=_.BEFORE_HEAD,e._processToken(t)}function Tp(e,t){switch(t.tagID){case c.HTML:{Fe(e,t);break}case c.HEAD:{e._insertElement(t,D.HTML),e.headElement=e.openElements.current,e.insertionMode=_.IN_HEAD;break}default:qn(e,t)}}function _p(e,t){const n=t.tagID;n===c.HEAD||n===c.BODY||n===c.HTML||n===c.BR?qn(e,t):e._err(t,L.endTagWithoutMatchingOpenElement)}function qn(e,t){e._insertFakeElement(N.HEAD,c.HEAD),e.headElement=e.openElements.current,e.insertionMode=_.IN_HEAD,e._processToken(t)}function lt(e,t){switch(t.tagID){case c.HTML:{Fe(e,t);break}case c.BASE:case c.BASEFONT:case c.BGSOUND:case c.LINK:case c.META:{e._appendElement(t,D.HTML),t.ackSelfClosing=!0;break}case c.TITLE:{e._switchToTextParsing(t,we.RCDATA);break}case c.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,we.RAWTEXT):(e._insertElement(t,D.HTML),e.insertionMode=_.IN_HEAD_NO_SCRIPT);break}case c.NOFRAMES:case c.STYLE:{e._switchToTextParsing(t,we.RAWTEXT);break}case c.SCRIPT:{e._switchToTextParsing(t,we.SCRIPT_DATA);break}case c.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=_.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(_.IN_TEMPLATE);break}case c.HEAD:{e._err(t,L.misplacedStartTagForHeadElement);break}default:Vn(e,t)}}function kp(e,t){switch(t.tagID){case c.HEAD:{e.openElements.pop(),e.insertionMode=_.AFTER_HEAD;break}case c.BODY:case c.BR:case c.HTML:{Vn(e,t);break}case c.TEMPLATE:{Jt(e,t);break}default:e._err(t,L.endTagWithoutMatchingOpenElement)}}function Jt(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==c.TEMPLATE&&e._err(t,L.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(c.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,L.endTagWithoutMatchingOpenElement)}function Vn(e,t){e.openElements.pop(),e.insertionMode=_.AFTER_HEAD,e._processToken(t)}function xp(e,t){switch(t.tagID){case c.HTML:{Fe(e,t);break}case c.BASEFONT:case c.BGSOUND:case c.HEAD:case c.LINK:case c.META:case c.NOFRAMES:case c.STYLE:{lt(e,t);break}case c.NOSCRIPT:{e._err(t,L.nestedNoscriptInHead);break}default:Wn(e,t)}}function yp(e,t){switch(t.tagID){case c.NOSCRIPT:{e.openElements.pop(),e.insertionMode=_.IN_HEAD;break}case c.BR:{Wn(e,t);break}default:e._err(t,L.endTagWithoutMatchingOpenElement)}}function Wn(e,t){const n=t.type===ie.EOF?L.openElementsLeftAfterEof:L.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=_.IN_HEAD,e._processToken(t)}function wp(e,t){switch(t.tagID){case c.HTML:{Fe(e,t);break}case c.BODY:{e._insertElement(t,D.HTML),e.framesetOk=!1,e.insertionMode=_.IN_BODY;break}case c.FRAMESET:{e._insertElement(t,D.HTML),e.insertionMode=_.IN_FRAMESET;break}case c.BASE:case c.BASEFONT:case c.BGSOUND:case c.LINK:case c.META:case c.NOFRAMES:case c.SCRIPT:case c.STYLE:case c.TEMPLATE:case c.TITLE:{e._err(t,L.abandonedHeadElementChild),e.openElements.push(e.headElement,c.HEAD),lt(e,t),e.openElements.remove(e.headElement);break}case c.HEAD:{e._err(t,L.misplacedStartTagForHeadElement);break}default:Gn(e,t)}}function Ap(e,t){switch(t.tagID){case c.BODY:case c.HTML:case c.BR:{Gn(e,t);break}case c.TEMPLATE:{Jt(e,t);break}default:e._err(t,L.endTagWithoutMatchingOpenElement)}}function Gn(e,t){e._insertFakeElement(N.BODY,c.BODY),e.insertionMode=_.IN_BODY,li(e,t)}function li(e,t){switch(t.type){case ie.CHARACTER:{jl(e,t);break}case ie.WHITESPACE_CHARACTER:{Yl(e,t);break}case ie.COMMENT:{pa(e,t);break}case ie.START_TAG:{Fe(e,t);break}case ie.END_TAG:{ci(e,t);break}case ie.EOF:{Gl(e,t);break}}}function Yl(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function jl(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function Cp(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function Sp(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function Ip(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,D.HTML),e.insertionMode=_.IN_FRAMESET)}function Np(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,D.HTML)}function vp(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&ha.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,D.HTML)}function Lp(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,D.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function Rp(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,D.HTML),n||(e.formElement=e.openElements.current))}function Op(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const i=e.openElements.tagIDs[r];if(n===c.LI&&i===c.LI||(n===c.DD||n===c.DT)&&(i===c.DD||i===c.DT)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i);break}if(i!==c.ADDRESS&&i!==c.DIV&&i!==c.P&&e._isSpecialElement(e.openElements.items[r],i))break}e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,D.HTML)}function Dp(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,D.HTML),e.tokenizer.state=we.PLAINTEXT}function Pp(e,t){e.openElements.hasInScope(c.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(c.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML),e.framesetOk=!1}function Mp(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(N.A);n&&(Qa(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Bp(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Fp(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(c.NOBR)&&(Qa(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,D.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Hp(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function Up(e,t){e.treeAdapter.getDocumentMode(e.document)!==rt.QUIRKS&&e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,D.HTML),e.framesetOk=!1,e.insertionMode=_.IN_TABLE}function ql(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,D.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Vl(e){const t=Dl(e,Wt.TYPE);return t!=null&&t.toLowerCase()===ip}function zp(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,D.HTML),Vl(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function $p(e,t){e._appendElement(t,D.HTML),t.ackSelfClosing=!0}function Yp(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._appendElement(t,D.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function jp(e,t){t.tagName=N.IMG,t.tagID=c.IMG,ql(e,t)}function qp(e,t){e._insertElement(t,D.HTML),e.skipNextNewLine=!0,e.tokenizer.state=we.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=_.TEXT}function Vp(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,we.RAWTEXT)}function Wp(e,t){e.framesetOk=!1,e._switchToTextParsing(t,we.RAWTEXT)}function go(e,t){e._switchToTextParsing(t,we.RAWTEXT)}function Gp(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===_.IN_TABLE||e.insertionMode===_.IN_CAPTION||e.insertionMode===_.IN_TABLE_BODY||e.insertionMode===_.IN_ROW||e.insertionMode===_.IN_CELL?_.IN_SELECT_IN_TABLE:_.IN_SELECT}function Qp(e,t){e.openElements.currentTagId===c.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML)}function Kp(e,t){e.openElements.hasInScope(c.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,D.HTML)}function Xp(e,t){e.openElements.hasInScope(c.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(c.RTC),e._insertElement(t,D.HTML)}function Zp(e,t){e._reconstructActiveFormattingElements(),Ul(t),Ga(t),t.selfClosing?e._appendElement(t,D.MATHML):e._insertElement(t,D.MATHML),t.ackSelfClosing=!0}function Jp(e,t){e._reconstructActiveFormattingElements(),zl(t),Ga(t),t.selfClosing?e._appendElement(t,D.SVG):e._insertElement(t,D.SVG),t.ackSelfClosing=!0}function bo(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML)}function Fe(e,t){switch(t.tagID){case c.I:case c.S:case c.B:case c.U:case c.EM:case c.TT:case c.BIG:case c.CODE:case c.FONT:case c.SMALL:case c.STRIKE:case c.STRONG:{Bp(e,t);break}case c.A:{Mp(e,t);break}case c.H1:case c.H2:case c.H3:case c.H4:case c.H5:case c.H6:{vp(e,t);break}case c.P:case c.DL:case c.OL:case c.UL:case c.DIV:case c.DIR:case c.NAV:case c.MAIN:case c.MENU:case c.ASIDE:case c.CENTER:case c.FIGURE:case c.FOOTER:case c.HEADER:case c.HGROUP:case c.DIALOG:case c.DETAILS:case c.ADDRESS:case c.ARTICLE:case c.SEARCH:case c.SECTION:case c.SUMMARY:case c.FIELDSET:case c.BLOCKQUOTE:case c.FIGCAPTION:{Np(e,t);break}case c.LI:case c.DD:case c.DT:{Op(e,t);break}case c.BR:case c.IMG:case c.WBR:case c.AREA:case c.EMBED:case c.KEYGEN:{ql(e,t);break}case c.HR:{Yp(e,t);break}case c.RB:case c.RTC:{Kp(e,t);break}case c.RT:case c.RP:{Xp(e,t);break}case c.PRE:case c.LISTING:{Lp(e,t);break}case c.XMP:{Vp(e,t);break}case c.SVG:{Jp(e,t);break}case c.HTML:{Cp(e,t);break}case c.BASE:case c.LINK:case c.META:case c.STYLE:case c.TITLE:case c.SCRIPT:case c.BGSOUND:case c.BASEFONT:case c.TEMPLATE:{lt(e,t);break}case c.BODY:{Sp(e,t);break}case c.FORM:{Rp(e,t);break}case c.NOBR:{Fp(e,t);break}case c.MATH:{Zp(e,t);break}case c.TABLE:{Up(e,t);break}case c.INPUT:{zp(e,t);break}case c.PARAM:case c.TRACK:case c.SOURCE:{$p(e,t);break}case c.IMAGE:{jp(e,t);break}case c.BUTTON:{Pp(e,t);break}case c.APPLET:case c.OBJECT:case c.MARQUEE:{Hp(e,t);break}case c.IFRAME:{Wp(e,t);break}case c.SELECT:{Gp(e,t);break}case c.OPTION:case c.OPTGROUP:{Qp(e,t);break}case c.NOEMBED:case c.NOFRAMES:{go(e,t);break}case c.FRAMESET:{Ip(e,t);break}case c.TEXTAREA:{qp(e,t);break}case c.NOSCRIPT:{e.options.scriptingEnabled?go(e,t):bo(e,t);break}case c.PLAINTEXT:{Dp(e,t);break}case c.COL:case c.TH:case c.TD:case c.TR:case c.HEAD:case c.FRAME:case c.TBODY:case c.TFOOT:case c.THEAD:case c.CAPTION:case c.COLGROUP:break;default:bo(e,t)}}function e1(e,t){if(e.openElements.hasInScope(c.BODY)&&(e.insertionMode=_.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function t1(e,t){e.openElements.hasInScope(c.BODY)&&(e.insertionMode=_.AFTER_BODY,nc(e,t))}function n1(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function r1(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(c.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(c.FORM):n&&e.openElements.remove(n))}function i1(e){e.openElements.hasInButtonScope(c.P)||e._insertFakeElement(N.P,c.P),e._closePElement()}function a1(e){e.openElements.hasInListItemScope(c.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(c.LI),e.openElements.popUntilTagNamePopped(c.LI))}function s1(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function o1(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function u1(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function l1(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(N.BR,c.BR),e.openElements.pop(),e.framesetOk=!1}function Wl(e,t){const n=t.tagName,r=t.tagID;for(let i=e.openElements.stackTop;i>0;i--){const a=e.openElements.items[i],s=e.openElements.tagIDs[i];if(r===s&&(r!==c.UNKNOWN||e.treeAdapter.getTagName(a)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=i&&e.openElements.shortenToLength(i);break}if(e._isSpecialElement(a,s))break}}function ci(e,t){switch(t.tagID){case c.A:case c.B:case c.I:case c.S:case c.U:case c.EM:case c.TT:case c.BIG:case c.CODE:case c.FONT:case c.NOBR:case c.SMALL:case c.STRIKE:case c.STRONG:{Qa(e,t);break}case c.P:{i1(e);break}case c.DL:case c.UL:case c.OL:case c.DIR:case c.DIV:case c.NAV:case c.PRE:case c.MAIN:case c.MENU:case c.ASIDE:case c.BUTTON:case c.CENTER:case c.FIGURE:case c.FOOTER:case c.HEADER:case c.HGROUP:case c.DIALOG:case c.ADDRESS:case c.ARTICLE:case c.DETAILS:case c.SEARCH:case c.SECTION:case c.SUMMARY:case c.LISTING:case c.FIELDSET:case c.BLOCKQUOTE:case c.FIGCAPTION:{n1(e,t);break}case c.LI:{a1(e);break}case c.DD:case c.DT:{s1(e,t);break}case c.H1:case c.H2:case c.H3:case c.H4:case c.H5:case c.H6:{o1(e);break}case c.BR:{l1(e);break}case c.BODY:{e1(e,t);break}case c.HTML:{t1(e,t);break}case c.FORM:{r1(e);break}case c.APPLET:case c.OBJECT:case c.MARQUEE:{u1(e,t);break}case c.TEMPLATE:{Jt(e,t);break}default:Wl(e,t)}}function Gl(e,t){e.tmplInsertionModeStack.length>0?tc(e,t):Ka(e,t)}function c1(e,t){var n;t.tagID===c.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function d1(e,t){e._err(t,L.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Di(e,t){if(e.openElements.currentTagId!==void 0&&$l.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=_.IN_TABLE_TEXT,t.type){case ie.CHARACTER:{Kl(e,t);break}case ie.WHITESPACE_CHARACTER:{Ql(e,t);break}}else cr(e,t)}function f1(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,D.HTML),e.insertionMode=_.IN_CAPTION}function h1(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,D.HTML),e.insertionMode=_.IN_COLUMN_GROUP}function p1(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(N.COLGROUP,c.COLGROUP),e.insertionMode=_.IN_COLUMN_GROUP,Xa(e,t)}function m1(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,D.HTML),e.insertionMode=_.IN_TABLE_BODY}function g1(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(N.TBODY,c.TBODY),e.insertionMode=_.IN_TABLE_BODY,di(e,t)}function b1(e,t){e.openElements.hasInTableScope(c.TABLE)&&(e.openElements.popUntilTagNamePopped(c.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function E1(e,t){Vl(t)?e._appendElement(t,D.HTML):cr(e,t),t.ackSelfClosing=!0}function T1(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,D.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function bn(e,t){switch(t.tagID){case c.TD:case c.TH:case c.TR:{g1(e,t);break}case c.STYLE:case c.SCRIPT:case c.TEMPLATE:{lt(e,t);break}case c.COL:{p1(e,t);break}case c.FORM:{T1(e,t);break}case c.TABLE:{b1(e,t);break}case c.TBODY:case c.TFOOT:case c.THEAD:{m1(e,t);break}case c.INPUT:{E1(e,t);break}case c.CAPTION:{f1(e,t);break}case c.COLGROUP:{h1(e,t);break}default:cr(e,t)}}function nr(e,t){switch(t.tagID){case c.TABLE:{e.openElements.hasInTableScope(c.TABLE)&&(e.openElements.popUntilTagNamePopped(c.TABLE),e._resetInsertionMode());break}case c.TEMPLATE:{Jt(e,t);break}case c.BODY:case c.CAPTION:case c.COL:case c.COLGROUP:case c.HTML:case c.TBODY:case c.TD:case c.TFOOT:case c.TH:case c.THEAD:case c.TR:break;default:cr(e,t)}}function cr(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,li(e,t),e.fosterParentingEnabled=n}function Ql(e,t){e.pendingCharacterTokens.push(t)}function Kl(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Dn(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)cr(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const Xl=new Set([c.CAPTION,c.COL,c.COLGROUP,c.TBODY,c.TD,c.TFOOT,c.TH,c.THEAD,c.TR]);function _1(e,t){const n=t.tagID;Xl.has(n)?e.openElements.hasInTableScope(c.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(c.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=_.IN_TABLE,bn(e,t)):Fe(e,t)}function k1(e,t){const n=t.tagID;switch(n){case c.CAPTION:case c.TABLE:{e.openElements.hasInTableScope(c.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(c.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=_.IN_TABLE,n===c.TABLE&&nr(e,t));break}case c.BODY:case c.COL:case c.COLGROUP:case c.HTML:case c.TBODY:case c.TD:case c.TFOOT:case c.TH:case c.THEAD:case c.TR:break;default:ci(e,t)}}function Xa(e,t){switch(t.tagID){case c.HTML:{Fe(e,t);break}case c.COL:{e._appendElement(t,D.HTML),t.ackSelfClosing=!0;break}case c.TEMPLATE:{lt(e,t);break}default:Vr(e,t)}}function x1(e,t){switch(t.tagID){case c.COLGROUP:{e.openElements.currentTagId===c.COLGROUP&&(e.openElements.pop(),e.insertionMode=_.IN_TABLE);break}case c.TEMPLATE:{Jt(e,t);break}case c.COL:break;default:Vr(e,t)}}function Vr(e,t){e.openElements.currentTagId===c.COLGROUP&&(e.openElements.pop(),e.insertionMode=_.IN_TABLE,e._processToken(t))}function di(e,t){switch(t.tagID){case c.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,D.HTML),e.insertionMode=_.IN_ROW;break}case c.TH:case c.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(N.TR,c.TR),e.insertionMode=_.IN_ROW,fi(e,t);break}case c.CAPTION:case c.COL:case c.COLGROUP:case c.TBODY:case c.TFOOT:case c.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=_.IN_TABLE,bn(e,t));break}default:bn(e,t)}}function ma(e,t){const n=t.tagID;switch(t.tagID){case c.TBODY:case c.TFOOT:case c.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=_.IN_TABLE);break}case c.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=_.IN_TABLE,nr(e,t));break}case c.BODY:case c.CAPTION:case c.COL:case c.COLGROUP:case c.HTML:case c.TD:case c.TH:case c.TR:break;default:nr(e,t)}}function fi(e,t){switch(t.tagID){case c.TH:case c.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,D.HTML),e.insertionMode=_.IN_CELL,e.activeFormattingElements.insertMarker();break}case c.CAPTION:case c.COL:case c.COLGROUP:case c.TBODY:case c.TFOOT:case c.THEAD:case c.TR:{e.openElements.hasInTableScope(c.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=_.IN_TABLE_BODY,di(e,t));break}default:bn(e,t)}}function Zl(e,t){switch(t.tagID){case c.TR:{e.openElements.hasInTableScope(c.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=_.IN_TABLE_BODY);break}case c.TABLE:{e.openElements.hasInTableScope(c.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=_.IN_TABLE_BODY,ma(e,t));break}case c.TBODY:case c.TFOOT:case c.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(c.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=_.IN_TABLE_BODY,ma(e,t));break}case c.BODY:case c.CAPTION:case c.COL:case c.COLGROUP:case c.HTML:case c.TD:case c.TH:break;default:nr(e,t)}}function y1(e,t){const n=t.tagID;Xl.has(n)?(e.openElements.hasInTableScope(c.TD)||e.openElements.hasInTableScope(c.TH))&&(e._closeTableCell(),fi(e,t)):Fe(e,t)}function w1(e,t){const n=t.tagID;switch(n){case c.TD:case c.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=_.IN_ROW);break}case c.TABLE:case c.TBODY:case c.TFOOT:case c.THEAD:case c.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),Zl(e,t));break}case c.BODY:case c.CAPTION:case c.COL:case c.COLGROUP:case c.HTML:break;default:ci(e,t)}}function Jl(e,t){switch(t.tagID){case c.HTML:{Fe(e,t);break}case c.OPTION:{e.openElements.currentTagId===c.OPTION&&e.openElements.pop(),e._insertElement(t,D.HTML);break}case c.OPTGROUP:{e.openElements.currentTagId===c.OPTION&&e.openElements.pop(),e.openElements.currentTagId===c.OPTGROUP&&e.openElements.pop(),e._insertElement(t,D.HTML);break}case c.HR:{e.openElements.currentTagId===c.OPTION&&e.openElements.pop(),e.openElements.currentTagId===c.OPTGROUP&&e.openElements.pop(),e._appendElement(t,D.HTML),t.ackSelfClosing=!0;break}case c.INPUT:case c.KEYGEN:case c.TEXTAREA:case c.SELECT:{e.openElements.hasInSelectScope(c.SELECT)&&(e.openElements.popUntilTagNamePopped(c.SELECT),e._resetInsertionMode(),t.tagID!==c.SELECT&&e._processStartTag(t));break}case c.SCRIPT:case c.TEMPLATE:{lt(e,t);break}}}function ec(e,t){switch(t.tagID){case c.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===c.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===c.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===c.OPTGROUP&&e.openElements.pop();break}case c.OPTION:{e.openElements.currentTagId===c.OPTION&&e.openElements.pop();break}case c.SELECT:{e.openElements.hasInSelectScope(c.SELECT)&&(e.openElements.popUntilTagNamePopped(c.SELECT),e._resetInsertionMode());break}case c.TEMPLATE:{Jt(e,t);break}}}function A1(e,t){const n=t.tagID;n===c.CAPTION||n===c.TABLE||n===c.TBODY||n===c.TFOOT||n===c.THEAD||n===c.TR||n===c.TD||n===c.TH?(e.openElements.popUntilTagNamePopped(c.SELECT),e._resetInsertionMode(),e._processStartTag(t)):Jl(e,t)}function C1(e,t){const n=t.tagID;n===c.CAPTION||n===c.TABLE||n===c.TBODY||n===c.TFOOT||n===c.THEAD||n===c.TR||n===c.TD||n===c.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(c.SELECT),e._resetInsertionMode(),e.onEndTag(t)):ec(e,t)}function S1(e,t){switch(t.tagID){case c.BASE:case c.BASEFONT:case c.BGSOUND:case c.LINK:case c.META:case c.NOFRAMES:case c.SCRIPT:case c.STYLE:case c.TEMPLATE:case c.TITLE:{lt(e,t);break}case c.CAPTION:case c.COLGROUP:case c.TBODY:case c.TFOOT:case c.THEAD:{e.tmplInsertionModeStack[0]=_.IN_TABLE,e.insertionMode=_.IN_TABLE,bn(e,t);break}case c.COL:{e.tmplInsertionModeStack[0]=_.IN_COLUMN_GROUP,e.insertionMode=_.IN_COLUMN_GROUP,Xa(e,t);break}case c.TR:{e.tmplInsertionModeStack[0]=_.IN_TABLE_BODY,e.insertionMode=_.IN_TABLE_BODY,di(e,t);break}case c.TD:case c.TH:{e.tmplInsertionModeStack[0]=_.IN_ROW,e.insertionMode=_.IN_ROW,fi(e,t);break}default:e.tmplInsertionModeStack[0]=_.IN_BODY,e.insertionMode=_.IN_BODY,Fe(e,t)}}function I1(e,t){t.tagID===c.TEMPLATE&&Jt(e,t)}function tc(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(c.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Ka(e,t)}function N1(e,t){t.tagID===c.HTML?Fe(e,t):Wr(e,t)}function nc(e,t){var n;if(t.tagID===c.HTML){if(e.fragmentContext||(e.insertionMode=_.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===c.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else Wr(e,t)}function Wr(e,t){e.insertionMode=_.IN_BODY,li(e,t)}function v1(e,t){switch(t.tagID){case c.HTML:{Fe(e,t);break}case c.FRAMESET:{e._insertElement(t,D.HTML);break}case c.FRAME:{e._appendElement(t,D.HTML),t.ackSelfClosing=!0;break}case c.NOFRAMES:{lt(e,t);break}}}function L1(e,t){t.tagID===c.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==c.FRAMESET&&(e.insertionMode=_.AFTER_FRAMESET))}function R1(e,t){switch(t.tagID){case c.HTML:{Fe(e,t);break}case c.NOFRAMES:{lt(e,t);break}}}function O1(e,t){t.tagID===c.HTML&&(e.insertionMode=_.AFTER_AFTER_FRAMESET)}function D1(e,t){t.tagID===c.HTML?Fe(e,t):Dr(e,t)}function Dr(e,t){e.insertionMode=_.IN_BODY,li(e,t)}function P1(e,t){switch(t.tagID){case c.HTML:{Fe(e,t);break}case c.NOFRAMES:{lt(e,t);break}}}function M1(e,t){t.chars=Te,e._insertCharacters(t)}function B1(e,t){e._insertCharacters(t),e.framesetOk=!1}function rc(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==D.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function F1(e,t){if(Jh(t))rc(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===D.MATHML?Ul(t):r===D.SVG&&(ep(t),zl(t)),Ga(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function H1(e,t){if(t.tagID===c.P||t.tagID===c.BR){rc(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)===D.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}const hi=ic("end"),gt=ic("start");function ic(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 ac(e){const t=gt(e),n=hi(e);if(t&&n)return{start:t,end:n}}const U1=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,z1=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Eo={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function sc(e,t){const n=X1(e),r=Nl("type",{handlers:{root:$1,element:Y1,text:j1,comment:uc,doctype:q1,raw:W1},unknown:G1}),i={parser:n?new mo(Eo):mo.getFragmentParser(void 0,Eo),handle(o){r(o,i)},stitches:!1,options:t||{}};r(e,i),An(i,gt());const a=n?i.parser.document:i.parser.getFragment(),s=Zf(a,{file:i.options.file});return i.stitches&&gn(s,"comment",function(o,u,l){const f=o;if(f.value.stitch&&l&&u!==void 0){const d=l.children;return d[u]=f.value.stitch,u}}),s.type==="root"&&s.children.length===1&&s.children[0].type===e.type?s.children[0]:s}function oc(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function $1(e,t){oc(e.children,t)}function Y1(e,t){Q1(e,t),oc(e.children,t),K1(e,t)}function j1(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:ie.CHARACTER,chars:e.value,location:dr(e)};An(t,gt(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function q1(e,t){const n={type:ie.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:dr(e)};An(t,gt(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function V1(e,t){t.stitches=!0;const n=Z1(e);if("children"in e&&"children"in n){const r=sc({type:"root",children:e.children},t.options);n.children=r.children}uc({type:"comment",value:{stitch:n}},t)}function uc(e,t){const n=e.value,r={type:ie.COMMENT,data:n,location:dr(e)};An(t,gt(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function W1(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,lc(t,gt(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(U1,"<$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 G1(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))V1(n,t);else{let r="";throw z1.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 An(e,t){lc(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=we.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 lc(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 Q1(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===we.PLAINTEXT)return;An(t,gt(e));const r=t.parser.openElements.current;let i="namespaceURI"in r?r.namespaceURI:Vt.html;i===Vt.html&&n==="svg"&&(i=Vt.svg);const a=rh({...e,children:[]},{space:i===Vt.svg?"svg":"html"}),s={type:ie.START_TAG,tagName:n,tagID:wn(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:dr(e)};t.parser.currentToken=s,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function K1(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&dh.includes(n)||t.parser.tokenizer.state===we.PLAINTEXT)return;An(t,hi(e));const r={type:ie.END_TAG,tagName:n,tagID:wn(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:dr(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===we.RCDATA||t.parser.tokenizer.state===we.RAWTEXT||t.parser.tokenizer.state===we.SCRIPT_DATA)&&(t.parser.tokenizer.state=we.DATA)}function X1(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function dr(e){const t=gt(e)||{line:void 0,column:void 0,offset:void 0},n=hi(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 Z1(e){return"children"in e?Qt({...e,children:[]}):Qt(e)}function J1(e){return function(t,n){return sc(t,{...e,file:n})}}const zt=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],To={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...zt,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...zt],h2:[["className","sr-only"]],img:[...zt,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...zt,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...zt],table:[...zt],ul:[...zt,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},Rt={}.hasOwnProperty;function em(e,t){let n={type:"root",children:[]};const r={schema:t?{...To,...t}:To,stack:[]},i=cc(r,e);return i&&(Array.isArray(i)?i.length===1?n=i[0]:n.children=i:n=i),n}function cc(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return tm(e,n);case"doctype":return nm(e,n);case"element":return rm(e,n);case"root":return im(e,n);case"text":return am(e,n)}}}function tm(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",r=n.indexOf("-->"),a={type:"comment",value:r<0?n:n.slice(0,r)};return fr(a,t),a}}function nm(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return fr(n,t),n}}function rm(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=dc(e,t.children),i=sm(e,t.properties);e.stack.pop();let a=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&Rt.call(e.schema.ancestors,n))){const o=e.schema.ancestors[n];let u=-1;for(a=!1;++u<o.length;)e.stack.includes(o[u])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const s={type:"element",tagName:n,properties:i,children:r};return fr(s,t),s}function im(e,t){const r={type:"root",children:dc(e,t.children)};return fr(r,t),r}function am(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return fr(r,t),r}function dc(e,t){const n=[];if(Array.isArray(t)){const r=t;let i=-1;for(;++i<r.length;){const a=cc(e,r[i]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function sm(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,a=r&&Rt.call(r,n)?r[n]:void 0,s=r&&Rt.call(r,"*")?r["*"]:void 0,o=t&&typeof t=="object"?t:{},u={};let l;for(l in o)if(Rt.call(o,l)){const f=o[l];let d=_o(e,ko(a,l),l,f);d==null&&(d=_o(e,ko(s,l),l,f)),d!=null&&(u[l]=d)}if(i&&Rt.call(i,n)){const f=i[n];for(l in f)Rt.call(f,l)&&!Rt.call(u,l)&&(u[l]=f[l])}return u}function _o(e,t,n,r){return t?Array.isArray(r)?om(e,t,n,r):fc(e,t,n,r):void 0}function om(e,t,n,r){let i=-1;const a=[];for(;++i<r.length;){const s=fc(e,t,n,r[i]);(typeof s=="number"||typeof s=="string")&&a.push(s)}return a}function fc(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&um(e,n,r)){if(typeof t=="object"&&t.length>1){let i=!1,a=0;for(;++a<t.length;){const s=t[a];if(s&&typeof s=="object"&&"flags"in s){if(s.test(String(r))){i=!0;break}}else if(s===r){i=!0;break}}if(!i)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function um(e,t,n){const r=e.schema.protocols&&Rt.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const i=String(n),a=i.indexOf(":"),s=i.indexOf("?"),o=i.indexOf("#"),u=i.indexOf("/");if(a<0||u>-1&&a>u||s>-1&&a>s||o>-1&&a>o)return!0;let l=-1;for(;++l<r.length;){const f=r[l];if(a===f.length&&i.slice(0,f.length)===f)return!0}return!1}function fr(e,t){const n=ac(t);t.data&&(e.data=Qt(t.data)),n&&(e.position=n)}function ko(e,t){let n,r=-1;if(e)for(;++r<e.length;){const i=e[r],a=typeof i=="string"?i:i[0];if(a===t)return i;a==="data*"&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function lm(e){return function(t){return em(t,e)}}function xo(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}const $e=Ht(/[A-Za-z]/),Be=Ht(/[\dA-Za-z]/),cm=Ht(/[#-'*+\--9=?A-Z^-~]/);function Gr(e){return e!==null&&(e<32||e===127)}const ga=Ht(/\d/),dm=Ht(/[\dA-Fa-f]/),fm=Ht(/[!-/:-@[-`{-~]/);function G(e){return e!==null&&e<-2}function ge(e){return e!==null&&(e<0||e===32)}function se(e){return e===-2||e===-1||e===32}const pi=Ht(/\p{P}|\p{S}/u),Kt=Ht(/\s/);function Ht(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function hm(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function pm(e,t,n){const i=ai((n||{}).ignore||[]),a=mm(t);let s=-1;for(;++s<a.length;)hl(e,"text",o);function o(l,f){let d=-1,p;for(;++d<f.length;){const h=f[d],m=p?p.children:void 0;if(i(h,m?m.indexOf(h):void 0,p))return;p=h}if(p)return u(l,f)}function u(l,f){const d=f[f.length-1],p=a[s][0],h=a[s][1];let m=0;const w=d.children.indexOf(l);let x=!1,S=[];p.lastIndex=0;let C=p.exec(l.value);for(;C;){const O=C.index,P={index:C.index,input:C.input,stack:[...f,l]};let A=h(...C,P);if(typeof A=="string"&&(A=A.length>0?{type:"text",value:A}:void 0),A===!1?p.lastIndex=O+1:(m!==O&&S.push({type:"text",value:l.value.slice(m,O)}),Array.isArray(A)?S.push(...A):A&&S.push(A),m=O+C[0].length,x=!0),!p.global)break;C=p.exec(l.value)}return x?(m<l.value.length&&S.push({type:"text",value:l.value.slice(m)}),d.children.splice(w,1,...S)):S=[l],w+S.length}}function mm(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([gm(i[0]),bm(i[1])])}return t}function gm(e){return typeof e=="string"?new RegExp(hm(e),"g"):e}function bm(e){return typeof e=="function"?e:function(){return e}}const Pi="phrasing",Mi=["autolink","link","image","label"];function Em(){return{transforms:[Am],enter:{literalAutolink:_m,literalAutolinkEmail:Bi,literalAutolinkHttp:Bi,literalAutolinkWww:Bi},exit:{literalAutolink:wm,literalAutolinkEmail:ym,literalAutolinkHttp:km,literalAutolinkWww:xm}}}function Tm(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Pi,notInConstruct:Mi},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Pi,notInConstruct:Mi},{character:":",before:"[ps]",after:"\\/",inConstruct:Pi,notInConstruct:Mi}]}}function _m(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Bi(e){this.config.enter.autolinkProtocol.call(this,e)}function km(e){this.config.exit.autolinkProtocol.call(this,e)}function xm(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.url="http://"+this.sliceSerialize(e)}function ym(e){this.config.exit.autolinkEmail.call(this,e)}function wm(e){this.exit(e)}function Am(e){pm(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Cm],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Sm]],{ignore:["link","linkReference"]})}function Cm(e,t,n,r,i){let a="";if(!hc(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!Im(n)))return!1;const s=Nm(n+r);if(!s[0])return!1;const o={type:"link",title:null,url:a+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[o,{type:"text",value:s[1]}]:o}function Sm(e,t,n,r){return!hc(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Im(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 Nm(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=xo(e,"(");let a=xo(e,")");for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function hc(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Kt(n)||pi(n))&&(!t||n!==47)}function ot(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}pc.peek=Fm;function vm(){this.buffer()}function Lm(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Rm(){this.buffer()}function Om(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Dm(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.identifier=ot(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Pm(e){this.exit(e)}function Mm(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.identifier=ot(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Bm(e){this.exit(e)}function Fm(){return"["}function pc(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const s=n.enter("footnoteReference"),o=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{after:"]",before:a})),o(),s(),a+=i.move("]"),a}function Hm(){return{enter:{gfmFootnoteCallString:vm,gfmFootnoteCall:Lm,gfmFootnoteDefinitionLabelString:Rm,gfmFootnoteDefinition:Om},exit:{gfmFootnoteCallString:Dm,gfmFootnoteCall:Pm,gfmFootnoteDefinitionLabelString:Mm,gfmFootnoteDefinition:Bm}}}function Um(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:pc},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,a,s){const o=a.createTracker(s);let u=o.move("[^");const l=a.enter("footnoteDefinition"),f=a.enter("label");return u+=o.move(a.safe(a.associationId(r),{before:u,after:"]"})),f(),u+=o.move("]:"),r.children&&r.children.length>0&&(o.shift(4),u+=o.move((t?`
|
|
3
|
+
`:" ")+a.indentLines(a.containerFlow(r,o.current()),t?mc:zm))),l(),u}}function zm(e,t,n){return t===0?e:mc(e,t,n)}function mc(e,t,n){return(n?"":" ")+e}const $m=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];gc.peek=Wm;function Ym(){return{canContainEols:["delete"],enter:{strikethrough:qm},exit:{strikethrough:Vm}}}function jm(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:$m}],handlers:{delete:gc}}}function qm(e){this.enter({type:"delete",children:[]},e)}function Vm(e){this.exit(e)}function gc(e,t,n,r){const i=n.createTracker(r),a=n.enter("strikethrough");let s=i.move("~~");return s+=n.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),a(),s}function Wm(){return"~"}function Gm(e){return e.length}function Qm(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Gm,a=[],s=[],o=[],u=[];let l=0,f=-1;for(;++f<e.length;){const T=[],w=[];let x=-1;for(e[f].length>l&&(l=e[f].length);++x<e[f].length;){const S=Km(e[f][x]);if(n.alignDelimiters!==!1){const C=i(S);w[x]=C,(u[x]===void 0||C>u[x])&&(u[x]=C)}T.push(S)}s[f]=T,o[f]=w}let d=-1;if(typeof r=="object"&&"length"in r)for(;++d<l;)a[d]=yo(r[d]);else{const T=yo(r);for(;++d<l;)a[d]=T}d=-1;const p=[],h=[];for(;++d<l;){const T=a[d];let w="",x="";T===99?(w=":",x=":"):T===108?w=":":T===114&&(x=":");let S=n.alignDelimiters===!1?1:Math.max(1,u[d]-w.length-x.length);const C=w+"-".repeat(S)+x;n.alignDelimiters!==!1&&(S=w.length+S+x.length,S>u[d]&&(u[d]=S),h[d]=S),p[d]=C}s.splice(1,0,p),o.splice(1,0,h),f=-1;const m=[];for(;++f<s.length;){const T=s[f],w=o[f];d=-1;const x=[];for(;++d<l;){const S=T[d]||"";let C="",O="";if(n.alignDelimiters!==!1){const P=u[d]-(w[d]||0),A=a[d];A===114?C=" ".repeat(P):A===99?P%2?(C=" ".repeat(P/2+.5),O=" ".repeat(P/2-.5)):(C=" ".repeat(P/2),O=C):O=" ".repeat(P)}n.delimiterStart!==!1&&!d&&x.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&S==="")&&(n.delimiterStart!==!1||d)&&x.push(" "),n.alignDelimiters!==!1&&x.push(C),x.push(S),n.alignDelimiters!==!1&&x.push(O),n.padding!==!1&&x.push(" "),(n.delimiterEnd!==!1||d!==l-1)&&x.push("|")}m.push(n.delimiterEnd===!1?x.join("").replace(/ +$/,""):x.join(""))}return m.join(`
|
|
4
|
+
`)}function Km(e){return e==null?"":String(e)}function yo(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 Xm(e,t,n,r){const i=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const s=n.indentLines(n.containerFlow(e,a.current()),Zm);return i(),s}function Zm(e,t,n){return">"+(n?"":" ")+e}function Jm(e,t){return wo(e,t.inConstruct,!0)&&!wo(e,t.notInConstruct,!1)}function wo(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 Ao(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
5
|
+
`&&Jm(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
6
|
+
`}function eg(e,t){const n=String(e);let r=n.indexOf(t),i=r,a=0,s=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++a>s&&(s=a):a=1,i=r+t.length,r=n.indexOf(t,i);return s}function tg(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 ng(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 rg(e,t,n,r){const i=ng(n),a=e.value||"",s=i==="`"?"GraveAccent":"Tilde";if(tg(e,n)){const d=n.enter("codeIndented"),p=n.indentLines(a,ig);return d(),p}const o=n.createTracker(r),u=i.repeat(Math.max(eg(a,i)+1,3)),l=n.enter("codeFenced");let f=o.move(u);if(e.lang){const d=n.enter(`codeFencedLang${s}`);f+=o.move(n.safe(e.lang,{before:f,after:" ",encode:["`"],...o.current()})),d()}if(e.lang&&e.meta){const d=n.enter(`codeFencedMeta${s}`);f+=o.move(" "),f+=o.move(n.safe(e.meta,{before:f,after:`
|
|
7
|
+
`,encode:["`"],...o.current()})),d()}return f+=o.move(`
|
|
8
|
+
`),a&&(f+=o.move(a+`
|
|
9
|
+
`)),f+=o.move(u),l(),f}function ig(e,t,n){return(n?"":" ")+e}function Za(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 ag(e,t,n,r){const i=Za(n),a=i==='"'?"Quote":"Apostrophe",s=n.enter("definition");let o=n.enter("label");const u=n.createTracker(r);let l=u.move("[");return l+=u.move(n.safe(n.associationId(e),{before:l,after:"]",...u.current()})),l+=u.move("]: "),o(),!e.url||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),l+=u.move("<"),l+=u.move(n.safe(e.url,{before:l,after:">",...u.current()})),l+=u.move(">")):(o=n.enter("destinationRaw"),l+=u.move(n.safe(e.url,{before:l,after:e.title?" ":`
|
|
10
|
+
`,...u.current()}))),o(),e.title&&(o=n.enter(`title${a}`),l+=u.move(" "+i),l+=u.move(n.safe(e.title,{before:l,after:i,...u.current()})),l+=u.move(i),o()),s(),l}function sg(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 rr(e){return"&#x"+e.toString(16).toUpperCase()+";"}function En(e){if(e===null||ge(e)||Kt(e))return 1;if(pi(e))return 2}function Qr(e,t,n){const r=En(e),i=En(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}}bc.peek=og;function bc(e,t,n,r){const i=sg(n),a=n.enter("emphasis"),s=n.createTracker(r),o=s.move(i);let u=s.move(n.containerPhrasing(e,{after:i,before:o,...s.current()}));const l=u.charCodeAt(0),f=Qr(r.before.charCodeAt(r.before.length-1),l,i);f.inside&&(u=rr(l)+u.slice(1));const d=u.charCodeAt(u.length-1),p=Qr(r.after.charCodeAt(0),d,i);p.inside&&(u=u.slice(0,-1)+rr(d));const h=s.move(i);return a(),n.attentionEncodeSurroundingInfo={after:p.outside,before:f.outside},o+u+h}function og(e,t,n){return n.options.emphasis||"*"}const ug={};function Ja(e,t){const n=t||ug,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Ec(e,r,i)}function Ec(e,t,n){if(lg(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 Co(e.children,t,n)}return Array.isArray(e)?Co(e,t,n):""}function Co(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Ec(e[i],t,n);return r.join("")}function lg(e){return!!(e&&typeof e=="object")}function cg(e,t){let n=!1;return gn(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,oa}),!!((!e.depth||e.depth<3)&&Ja(e)&&(t.options.setext||n))}function dg(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(cg(e,n)){const f=n.enter("headingSetext"),d=n.enter("phrasing"),p=n.containerPhrasing(e,{...a.current(),before:`
|
|
11
|
+
`,after:`
|
|
12
|
+
`});return d(),f(),p+`
|
|
13
|
+
`+(i===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(`
|
|
14
|
+
`))+1))}const s="#".repeat(i),o=n.enter("headingAtx"),u=n.enter("phrasing");a.move(s+" ");let l=n.containerPhrasing(e,{before:"# ",after:`
|
|
15
|
+
`,...a.current()});return/^[\t ]/.test(l)&&(l=rr(l.charCodeAt(0))+l.slice(1)),l=l?s+" "+l:s,n.options.closeAtx&&(l+=" "+s),u(),o(),l}Tc.peek=fg;function Tc(e){return e.value||""}function fg(){return"<"}_c.peek=hg;function _c(e,t,n,r){const i=Za(n),a=i==='"'?"Quote":"Apostrophe",s=n.enter("image");let o=n.enter("label");const u=n.createTracker(r);let l=u.move("![");return l+=u.move(n.safe(e.alt,{before:l,after:"]",...u.current()})),l+=u.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),l+=u.move("<"),l+=u.move(n.safe(e.url,{before:l,after:">",...u.current()})),l+=u.move(">")):(o=n.enter("destinationRaw"),l+=u.move(n.safe(e.url,{before:l,after:e.title?" ":")",...u.current()}))),o(),e.title&&(o=n.enter(`title${a}`),l+=u.move(" "+i),l+=u.move(n.safe(e.title,{before:l,after:i,...u.current()})),l+=u.move(i),o()),l+=u.move(")"),s(),l}function hg(){return"!"}kc.peek=pg;function kc(e,t,n,r){const i=e.referenceType,a=n.enter("imageReference");let s=n.enter("label");const o=n.createTracker(r);let u=o.move("![");const l=n.safe(e.alt,{before:u,after:"]",...o.current()});u+=o.move(l+"]["),s();const f=n.stack;n.stack=[],s=n.enter("reference");const d=n.safe(n.associationId(e),{before:u,after:"]",...o.current()});return s(),n.stack=f,a(),i==="full"||!l||l!==d?u+=o.move(d+"]"):i==="shortcut"?u=u.slice(0,-1):u+=o.move("]"),u}function pg(){return"!"}xc.peek=mg;function xc(e,t,n){let r=e.value||"",i="`",a=-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+" ");++a<n.unsafe.length;){const s=n.unsafe[a],o=n.compilePattern(s);let u;if(s.atBreak)for(;u=o.exec(r);){let l=u.index;r.charCodeAt(l)===10&&r.charCodeAt(l-1)===13&&l--,r=r.slice(0,l)+" "+r.slice(u.index+1)}}return i+r+i}function mg(){return"`"}function yc(e,t){const n=Ja(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))}wc.peek=gg;function wc(e,t,n,r){const i=Za(n),a=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r);let o,u;if(yc(e,n)){const f=n.stack;n.stack=[],o=n.enter("autolink");let d=s.move("<");return d+=s.move(n.containerPhrasing(e,{before:d,after:">",...s.current()})),d+=s.move(">"),o(),n.stack=f,d}o=n.enter("link"),u=n.enter("label");let l=s.move("[");return l+=s.move(n.containerPhrasing(e,{before:l,after:"](",...s.current()})),l+=s.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),l+=s.move("<"),l+=s.move(n.safe(e.url,{before:l,after:">",...s.current()})),l+=s.move(">")):(u=n.enter("destinationRaw"),l+=s.move(n.safe(e.url,{before:l,after:e.title?" ":")",...s.current()}))),u(),e.title&&(u=n.enter(`title${a}`),l+=s.move(" "+i),l+=s.move(n.safe(e.title,{before:l,after:i,...s.current()})),l+=s.move(i),u()),l+=s.move(")"),o(),l}function gg(e,t,n){return yc(e,n)?"<":"["}Ac.peek=bg;function Ac(e,t,n,r){const i=e.referenceType,a=n.enter("linkReference");let s=n.enter("label");const o=n.createTracker(r);let u=o.move("[");const l=n.containerPhrasing(e,{before:u,after:"]",...o.current()});u+=o.move(l+"]["),s();const f=n.stack;n.stack=[],s=n.enter("reference");const d=n.safe(n.associationId(e),{before:u,after:"]",...o.current()});return s(),n.stack=f,a(),i==="full"||!l||l!==d?u+=o.move(d+"]"):i==="shortcut"?u=u.slice(0,-1):u+=o.move("]"),u}function bg(){return"["}function es(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 Eg(e){const t=es(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 Tg(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 Cc(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 _g(e,t,n,r){const i=n.enter("list"),a=n.bulletCurrent;let s=e.ordered?Tg(n):es(n);const o=e.ordered?s==="."?")":".":Eg(n);let u=t&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&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&&(u=!0),Cc(n)===s&&f){let d=-1;for(;++d<e.children.length;){const p=e.children[d];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(s=o),n.bulletCurrent=s;const l=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=a,i(),l}function kg(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 xg(e,t,n,r){const i=kg(n);let a=n.bulletCurrent||es(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let s=a.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const o=n.createTracker(r);o.move(a+" ".repeat(s-a.length)),o.shift(s);const u=n.enter("listItem"),l=n.indentLines(n.containerFlow(e,o.current()),f);return u(),l;function f(d,p,h){return p?(h?"":" ".repeat(s))+d:(h?a:a+" ".repeat(s-a.length))+d}}function yg(e,t,n,r){const i=n.enter("paragraph"),a=n.enter("phrasing"),s=n.containerPhrasing(e,r);return a(),i(),s}const wg=ai(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Ag(e,t,n,r){return(e.children.some(function(s){return wg(s)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Cg(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Sc.peek=Sg;function Sc(e,t,n,r){const i=Cg(n),a=n.enter("strong"),s=n.createTracker(r),o=s.move(i+i);let u=s.move(n.containerPhrasing(e,{after:i,before:o,...s.current()}));const l=u.charCodeAt(0),f=Qr(r.before.charCodeAt(r.before.length-1),l,i);f.inside&&(u=rr(l)+u.slice(1));const d=u.charCodeAt(u.length-1),p=Qr(r.after.charCodeAt(0),d,i);p.inside&&(u=u.slice(0,-1)+rr(d));const h=s.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:p.outside,before:f.outside},o+u+h}function Sg(e,t,n){return n.options.strong||"*"}function Ig(e,t,n,r){return n.safe(e.value,r)}function Ng(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 vg(e,t,n){const r=(Cc(n)+(n.options.ruleSpaces?" ":"")).repeat(Ng(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Ic={blockquote:Xm,break:Ao,code:rg,definition:ag,emphasis:bc,hardBreak:Ao,heading:dg,html:Tc,image:_c,imageReference:kc,inlineCode:xc,link:wc,linkReference:Ac,list:_g,listItem:xg,paragraph:yg,root:Ag,strong:Sc,text:Ig,thematicBreak:vg},So=document.createElement("i");function ts(e){const t="&"+e+";";So.innerHTML=t;const n=So.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Nc(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)}const Lg=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Rg(e){return e.replace(Lg,Og)}function Og(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return Nc(n.slice(a?2:1),a?16:10)}return ts(n)||e}function Dg(){return{enter:{table:Pg,tableData:Io,tableHeader:Io,tableRow:Bg},exit:{codeText:Fg,table:Mg,tableData:Fi,tableHeader:Fi,tableRow:Fi}}}function Pg(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 Mg(e){this.exit(e),this.data.inTable=void 0}function Bg(e){this.enter({type:"tableRow",children:[]},e)}function Fi(e){this.exit(e)}function Io(e){this.enter({type:"tableCell",children:[]},e)}function Fg(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Hg));const n=this.stack[this.stack.length-1];n.value=t,this.exit(e)}function Hg(e,t){return t==="|"?t:e}function Ug(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
16
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:s,tableCell:u,tableRow:o}};function s(h,m,T,w){return l(f(h,T,w),h.align)}function o(h,m,T,w){const x=d(h,T,w),S=l([x]);return S.slice(0,S.indexOf(`
|
|
17
|
+
`))}function u(h,m,T,w){const x=T.enter("tableCell"),S=T.enter("phrasing"),C=T.containerPhrasing(h,{...w,before:a,after:a});return S(),x(),C}function l(h,m){return Qm(h,{align:m,alignDelimiters:r,padding:n,stringLength:i})}function f(h,m,T){const w=h.children;let x=-1;const S=[],C=m.enter("table");for(;++x<w.length;)S[x]=d(w[x],m,T);return C(),S}function d(h,m,T){const w=h.children;let x=-1;const S=[],C=m.enter("tableRow");for(;++x<w.length;)S[x]=u(w[x],h,m,T);return C(),S}function p(h,m,T){let w=Ic.inlineCode(h,m,T);return T.stack.includes("tableCell")&&(w=w.replace(/\|/g,"\\$&")),w}}function zg(){return{exit:{taskListCheckValueChecked:No,taskListCheckValueUnchecked:No,paragraph:Yg}}}function $g(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:jg}}}function No(e){const t=this.stack[this.stack.length-2];t.checked=e.type==="taskListCheckValueChecked"}function Yg(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],r=n.children[0];if(r&&r.type==="text"){const i=t.children;let a=-1,s;for(;++a<i.length;){const o=i[a];if(o.type==="paragraph"){s=o;break}}s===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 jg(e,t,n,r){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",o=n.createTracker(r);a&&o.move(s);let u=Ic.listItem(e,t,n,{...r,...o.current()});return a&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),u;function l(f){return f+s}}function qg(){return[Em(),Hm(),Ym(),Dg(),zg()]}function Vg(e){return{extensions:[Tm(),Um(e),jm(),Ug(e),$g()]}}function et(e,t,n,r){const i=e.length;let a=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);a<r.length;)s=r.slice(a,a+1e4),s.unshift(t,0),e.splice(...s),a+=1e4,t+=1e4}function it(e,t){return e.length>0?(et(e,e.length,0,t),e):t}const vo={}.hasOwnProperty;function vc(e){const t={};let n=-1;for(;++n<e.length;)Wg(t,e[n]);return t}function Wg(e,t){let n;for(n in t){const i=(vo.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let s;if(a)for(s in a){vo.call(i,s)||(i[s]=[]);const o=a[s];Gg(i[s],Array.isArray(o)?o:o?[o]:[])}}}function Gg(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);et(e,0,0,r)}const Qg={tokenize:tb,partial:!0},Lc={tokenize:nb,partial:!0},Rc={tokenize:rb,partial:!0},Oc={tokenize:ib,partial:!0},Kg={tokenize:ab,partial:!0},Dc={name:"wwwAutolink",tokenize:Jg,previous:Mc},Pc={name:"protocolAutolink",tokenize:eb,previous:Bc},wt={name:"emailAutolink",tokenize:Zg,previous:Fc},bt={};function Xg(){return{text:bt}}let $t=48;for(;$t<123;)bt[$t]=wt,$t++,$t===58?$t=65:$t===91&&($t=97);bt[43]=wt;bt[45]=wt;bt[46]=wt;bt[95]=wt;bt[72]=[wt,Pc];bt[104]=[wt,Pc];bt[87]=[wt,Dc];bt[119]=[wt,Dc];function Zg(e,t,n){const r=this;let i,a;return s;function s(d){return!ba(d)||!Fc.call(r,r.previous)||ns(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),o(d))}function o(d){return ba(d)?(e.consume(d),o):d===64?(e.consume(d),u):n(d)}function u(d){return d===46?e.check(Kg,f,l)(d):d===45||d===95||Be(d)?(a=!0,e.consume(d),u):f(d)}function l(d){return e.consume(d),i=!0,u}function f(d){return a&&i&&$e(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function Jg(e,t,n){const r=this;return i;function i(s){return s!==87&&s!==119||!Mc.call(r,r.previous)||ns(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Qg,e.attempt(Lc,e.attempt(Rc,a),n),n)(s))}function a(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function eb(e,t,n){const r=this;let i="",a=!1;return s;function s(d){return(d===72||d===104)&&Bc.call(r,r.previous)&&!ns(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),e.consume(d),o):n(d)}function o(d){if($e(d)&&i.length<5)return i+=String.fromCodePoint(d),e.consume(d),o;if(d===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(d),u}return n(d)}function u(d){return d===47?(e.consume(d),a?l:(a=!0,u)):n(d)}function l(d){return d===null||Gr(d)||ge(d)||Kt(d)||pi(d)?n(d):e.attempt(Lc,e.attempt(Rc,f),n)(d)}function f(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function tb(e,t,n){let r=0;return i;function i(s){return(s===87||s===119)&&r<3?(r++,e.consume(s),i):s===46&&r===3?(e.consume(s),a):n(s)}function a(s){return s===null?n(s):t(s)}}function nb(e,t,n){let r,i,a;return s;function s(l){return l===46||l===95?e.check(Oc,u,o)(l):l===null||ge(l)||Kt(l)||l!==45&&pi(l)?u(l):(a=!0,e.consume(l),s)}function o(l){return l===95?r=!0:(i=r,r=void 0),e.consume(l),s}function u(l){return i||r||!a?n(l):t(l)}}function rb(e,t){let n=0,r=0;return i;function i(s){return s===40?(n++,e.consume(s),i):s===41&&r<n?a(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(Oc,t,a)(s):s===null||ge(s)||Kt(s)?t(s):(e.consume(s),i)}function a(s){return s===41&&r++,e.consume(s),i}}function ib(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||ge(o)||Kt(o)?t(o):n(o)}function i(o){return o===null||o===40||o===91||ge(o)||Kt(o)?t(o):r(o)}function a(o){return $e(o)?s(o):n(o)}function s(o){return o===59?(e.consume(o),r):$e(o)?(e.consume(o),s):n(o)}}function ab(e,t,n){return r;function r(a){return e.consume(a),i}function i(a){return Be(a)?n(a):t(a)}}function Mc(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ge(e)}function Bc(e){return!$e(e)}function Fc(e){return!(e===47||ba(e))}function ba(e){return e===43||e===45||e===46||e===95||Be(e)}function ns(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}function Cn(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let s="";if(a===37&&Be(e.charCodeAt(n+1))&&Be(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(s=String.fromCharCode(a));else if(a>55295&&a<57344){const o=e.charCodeAt(n+1);a<56320&&o>56319&&o<57344?(s=String.fromCharCode(a,o),i=1):s="�"}else s=String.fromCharCode(a);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function mi(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const Ea={name:"attention",resolveAll:sb,tokenize:ob};function sb(e,t){let n=-1,r,i,a,s,o,u,l,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;u=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 d={...e[r][1].end},p={...e[n][1].start};Lo(d,-u),Lo(p,u),s={type:u>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},o={type:u>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},a={type:u>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:u>1?"strong":"emphasis",start:{...s.start},end:{...o.end}},e[r][1].end={...s.start},e[n][1].start={...o.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=it(l,[["enter",e[r][1],t],["exit",e[r][1],t]])),l=it(l,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",a,t]]),l=it(l,mi(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=it(l,[["exit",a,t],["enter",o,t],["exit",o,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(f=2,l=it(l,[["enter",e[n][1],t],["exit",e[n][1],t]])):f=0,et(e,r-1,n-r+3,l),n=r+l.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function ob(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=En(r);let a;return s;function s(u){return a=u,e.enter("attentionSequence"),o(u)}function o(u){if(u===a)return e.consume(u),o;const l=e.exit("attentionSequence"),f=En(u),d=!f||f===2&&i||n.includes(u),p=!i||i===2&&f||n.includes(r);return l._open=!!(a===42?d:d&&(i||!p)),l._close=!!(a===42?p:p&&(f||!d)),t(u)}}function Lo(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const ub={name:"autolink",tokenize:lb};function lb(e,t,n){let r=0;return i;function i(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(h){return $e(h)?(e.consume(h),s):h===64?n(h):l(h)}function s(h){return h===43||h===45||h===46||Be(h)?(r=1,o(h)):l(h)}function o(h){return h===58?(e.consume(h),r=0,u):(h===43||h===45||h===46||Be(h))&&r++<32?(e.consume(h),o):(r=0,l(h))}function u(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):h===null||h===32||h===60||Gr(h)?n(h):(e.consume(h),u)}function l(h){return h===64?(e.consume(h),f):cm(h)?(e.consume(h),l):n(h)}function f(h){return Be(h)?d(h):n(h)}function d(h){return h===46?(e.consume(h),r=0,f):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):p(h)}function p(h){if((h===45||Be(h))&&r++<63){const m=h===45?p:d;return e.consume(h),m}return n(h)}}function ue(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return s;function s(u){return se(u)?(e.enter(n),o(u)):t(u)}function o(u){return se(u)&&a++<i?(e.consume(u),o):(e.exit(n),t(u))}}const hr={partial:!0,tokenize:cb};function cb(e,t,n){return r;function r(a){return se(a)?ue(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||G(a)?t(a):n(a)}}const Hc={continuation:{tokenize:fb},exit:hb,name:"blockQuote",tokenize:db};function db(e,t,n){const r=this;return i;function i(s){if(s===62){const o=r.containerState;return o.open||(e.enter("blockQuote",{_container:!0}),o.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),a}return n(s)}function a(s){return se(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function fb(e,t,n){const r=this;return i;function i(s){return se(s)?ue(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):a(s)}function a(s){return e.attempt(Hc,t,n)(s)}}function hb(e){e.exit("blockQuote")}const Uc={name:"characterEscape",tokenize:pb};function pb(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return fm(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const zc={name:"characterReference",tokenize:mb};function mb(e,t,n){const r=this;let i=0,a,s;return o;function o(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),u}function u(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),a=31,s=Be,f(d))}function l(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,s=dm,f):(e.enter("characterReferenceValue"),a=7,s=ga,f(d))}function f(d){if(d===59&&i){const p=e.exit("characterReferenceValue");return s===Be&&!ts(r.sliceSerialize(p))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(d)&&i++<a?(e.consume(d),f):n(d)}}const Ro={partial:!0,tokenize:bb},Oo={concrete:!0,name:"codeFenced",tokenize:gb};function gb(e,t,n){const r=this,i={partial:!0,tokenize:P};let a=0,s=0,o;return u;function u(A){return l(A)}function l(A){const U=r.events[r.events.length-1];return a=U&&U[1].type==="linePrefix"?U[2].sliceSerialize(U[1],!0).length:0,o=A,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(A)}function f(A){return A===o?(s++,e.consume(A),f):s<3?n(A):(e.exit("codeFencedFenceSequence"),se(A)?ue(e,d,"whitespace")(A):d(A))}function d(A){return A===null||G(A)?(e.exit("codeFencedFence"),r.interrupt?t(A):e.check(Ro,T,O)(A)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(A))}function p(A){return A===null||G(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(A)):se(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ue(e,h,"whitespace")(A)):A===96&&A===o?n(A):(e.consume(A),p)}function h(A){return A===null||G(A)?d(A):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(A))}function m(A){return A===null||G(A)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(A)):A===96&&A===o?n(A):(e.consume(A),m)}function T(A){return e.attempt(i,O,w)(A)}function w(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),x}function x(A){return a>0&&se(A)?ue(e,S,"linePrefix",a+1)(A):S(A)}function S(A){return A===null||G(A)?e.check(Ro,T,O)(A):(e.enter("codeFlowValue"),C(A))}function C(A){return A===null||G(A)?(e.exit("codeFlowValue"),S(A)):(e.consume(A),C)}function O(A){return e.exit("codeFenced"),t(A)}function P(A,U,v){let F=0;return I;function I(X){return A.enter("lineEnding"),A.consume(X),A.exit("lineEnding"),$}function $(X){return A.enter("codeFencedFence"),se(X)?ue(A,B,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(X):B(X)}function B(X){return X===o?(A.enter("codeFencedFenceSequence"),Q(X)):v(X)}function Q(X){return X===o?(F++,A.consume(X),Q):F>=s?(A.exit("codeFencedFenceSequence"),se(X)?ue(A,ae,"whitespace")(X):ae(X)):v(X)}function ae(X){return X===null||G(X)?(A.exit("codeFencedFence"),U(X)):v(X)}}}function bb(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a)}function a(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const Hi={name:"codeIndented",tokenize:Tb},Eb={partial:!0,tokenize:_b};function Tb(e,t,n){const r=this;return i;function i(l){return e.enter("codeIndented"),ue(e,a,"linePrefix",4+1)(l)}function a(l){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?s(l):n(l)}function s(l){return l===null?u(l):G(l)?e.attempt(Eb,s,u)(l):(e.enter("codeFlowValue"),o(l))}function o(l){return l===null||G(l)?(e.exit("codeFlowValue"),s(l)):(e.consume(l),o)}function u(l){return e.exit("codeIndented"),t(l)}}function _b(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):G(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):ue(e,a,"linePrefix",4+1)(s)}function a(s){const o=r.events[r.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(s):G(s)?i(s):n(s)}}const kb={name:"codeText",previous:yb,resolve:xb,tokenize:wb};function xb(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 yb(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function wb(e,t,n){let r=0,i,a;return s;function s(d){return e.enter("codeText"),e.enter("codeTextSequence"),o(d)}function o(d){return d===96?(e.consume(d),r++,o):(e.exit("codeTextSequence"),u(d))}function u(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),u):d===96?(a=e.enter("codeTextSequence"),i=0,f(d)):G(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),u):(e.enter("codeTextData"),l(d))}function l(d){return d===null||d===32||d===96||G(d)?(e.exit("codeTextData"),u(d)):(e.consume(d),l)}function f(d){return d===96?(e.consume(d),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(a.type="codeTextData",l(d))}}class Ab{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 a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Pn(this.left,r),a.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),Pn(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Pn(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);Pn(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Pn(this.left,n.reverse())}}}function Pn(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 $c(e){const t={};let n=-1,r,i,a,s,o,u,l;const f=new Ab(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"&&(u=r[1]._tokenizer.events,a=0,a<u.length&&u[a][1].type==="lineEndingBlank"&&(a+=2),a<u.length&&u[a][1].type==="content"))for(;++a<u.length&&u[a][1].type!=="content";)u[a][1].type==="chunkText"&&(u[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Cb(f,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(s=f.get(a),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=a);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},o=f.slice(i,n),o.unshift(r),f.splice(i,n-i+1,o))}}return et(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!l}function Cb(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const a=[];let s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const o=s.events,u=[],l={};let f,d,p=-1,h=n,m=0,T=0;const w=[T];for(;h;){for(;e.get(++i)[1]!==h;);a.push(i),h._tokenizer||(f=r.sliceStream(h),h.next||f.push(null),d&&s.defineSkip(h.start),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(f),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),d=h,h=h.next}for(h=n;++p<o.length;)o[p][0]==="exit"&&o[p-1][0]==="enter"&&o[p][1].type===o[p-1][1].type&&o[p][1].start.line!==o[p][1].end.line&&(T=p+1,w.push(T),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(s.events=[],h?(h._tokenizer=void 0,h.previous=void 0):w.pop(),p=w.length;p--;){const x=o.slice(w[p],w[p+1]),S=a.pop();u.push([S,S+x.length-1]),e.splice(S,2,x)}for(u.reverse(),p=-1;++p<u.length;)l[m+u[p][0]]=m+u[p][1],m+=u[p][1]-u[p][0]-1;return l}const Sb={resolve:Nb,tokenize:vb},Ib={partial:!0,tokenize:Lb};function Nb(e){return $c(e),e}function vb(e,t){let n;return r;function r(o){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(o)}function i(o){return o===null?a(o):G(o)?e.check(Ib,s,a)(o):(e.consume(o),i)}function a(o){return e.exit("chunkContent"),e.exit("content"),t(o)}function s(o){return e.consume(o),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function Lb(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),ue(e,a,"linePrefix")}function a(s){if(s===null||G(s))return n(s);const o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function Yc(e,t,n,r,i,a,s,o,u){const l=u||Number.POSITIVE_INFINITY;let f=0;return d;function d(x){return x===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(x),e.exit(a),p):x===null||x===32||x===41||Gr(x)?n(x):(e.enter(r),e.enter(s),e.enter(o),e.enter("chunkString",{contentType:"string"}),T(x))}function p(x){return x===62?(e.enter(a),e.consume(x),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),h(x))}function h(x){return x===62?(e.exit("chunkString"),e.exit(o),p(x)):x===null||x===60||G(x)?n(x):(e.consume(x),x===92?m:h)}function m(x){return x===60||x===62||x===92?(e.consume(x),h):h(x)}function T(x){return!f&&(x===null||x===41||ge(x))?(e.exit("chunkString"),e.exit(o),e.exit(s),e.exit(r),t(x)):f<l&&x===40?(e.consume(x),f++,T):x===41?(e.consume(x),f--,T):x===null||x===32||x===40||Gr(x)?n(x):(e.consume(x),x===92?w:T)}function w(x){return x===40||x===41||x===92?(e.consume(x),T):T(x)}}function jc(e,t,n,r,i,a){const s=this;let o=0,u;return l;function l(h){return e.enter(r),e.enter(i),e.consume(h),e.exit(i),e.enter(a),f}function f(h){return o>999||h===null||h===91||h===93&&!u||h===94&&!o&&"_hiddenFootnoteSupport"in s.parser.constructs?n(h):h===93?(e.exit(a),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):G(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),d(h))}function d(h){return h===null||h===91||h===93||G(h)||o++>999?(e.exit("chunkString"),f(h)):(e.consume(h),u||(u=!se(h)),h===92?p:d)}function p(h){return h===91||h===92||h===93?(e.consume(h),o++,d):d(h)}}function qc(e,t,n,r,i,a){let s;return o;function o(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),s=p===40?41:p,u):n(p)}function u(p){return p===s?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(a),l(p))}function l(p){return p===s?(e.exit(a),u(s)):p===null?n(p):G(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),ue(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===s||p===null||G(p)?(e.exit("chunkString"),l(p)):(e.consume(p),p===92?d:f)}function d(p){return p===s||p===92?(e.consume(p),f):f(p)}}function Qn(e,t){let n;return r;function r(i){return G(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):se(i)?ue(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const Rb={name:"definition",tokenize:Db},Ob={partial:!0,tokenize:Pb};function Db(e,t,n){const r=this;let i;return a;function a(h){return e.enter("definition"),s(h)}function s(h){return jc.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function o(h){return i=ot(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),u):n(h)}function u(h){return ge(h)?Qn(e,l)(h):l(h)}function l(h){return Yc(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function f(h){return e.attempt(Ob,d,d)(h)}function d(h){return se(h)?ue(e,p,"whitespace")(h):p(h)}function p(h){return h===null||G(h)?(e.exit("definition"),r.parser.defined.push(i),t(h)):n(h)}}function Pb(e,t,n){return r;function r(o){return ge(o)?Qn(e,i)(o):n(o)}function i(o){return qc(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function a(o){return se(o)?ue(e,s,"whitespace")(o):s(o)}function s(o){return o===null||G(o)?t(o):n(o)}}const Mb={name:"hardBreakEscape",tokenize:Bb};function Bb(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return G(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const Fb={name:"headingAtx",resolve:Hb,tokenize:Ub};function Hb(e,t){let n=e.length-2,r=3,i,a;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},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},et(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function Ub(e,t,n){let r=0;return i;function i(f){return e.enter("atxHeading"),a(f)}function a(f){return e.enter("atxHeadingSequence"),s(f)}function s(f){return f===35&&r++<6?(e.consume(f),s):f===null||ge(f)?(e.exit("atxHeadingSequence"),o(f)):n(f)}function o(f){return f===35?(e.enter("atxHeadingSequence"),u(f)):f===null||G(f)?(e.exit("atxHeading"),t(f)):se(f)?ue(e,o,"whitespace")(f):(e.enter("atxHeadingText"),l(f))}function u(f){return f===35?(e.consume(f),u):(e.exit("atxHeadingSequence"),o(f))}function l(f){return f===null||f===35||ge(f)?(e.exit("atxHeadingText"),o(f)):(e.consume(f),l)}}const zb=["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"],Do=["pre","script","style","textarea"],$b={concrete:!0,name:"htmlFlow",resolveTo:qb,tokenize:Vb},Yb={partial:!0,tokenize:Gb},jb={partial:!0,tokenize:Wb};function qb(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 Vb(e,t,n){const r=this;let i,a,s,o,u;return l;function l(k){return f(k)}function f(k){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(k),d}function d(k){return k===33?(e.consume(k),p):k===47?(e.consume(k),a=!0,T):k===63?(e.consume(k),i=3,r.interrupt?t:y):$e(k)?(e.consume(k),s=String.fromCharCode(k),w):n(k)}function p(k){return k===45?(e.consume(k),i=2,h):k===91?(e.consume(k),i=5,o=0,m):$e(k)?(e.consume(k),i=4,r.interrupt?t:y):n(k)}function h(k){return k===45?(e.consume(k),r.interrupt?t:y):n(k)}function m(k){const he="CDATA[";return k===he.charCodeAt(o++)?(e.consume(k),o===he.length?r.interrupt?t:B:m):n(k)}function T(k){return $e(k)?(e.consume(k),s=String.fromCharCode(k),w):n(k)}function w(k){if(k===null||k===47||k===62||ge(k)){const he=k===47,ze=s.toLowerCase();return!he&&!a&&Do.includes(ze)?(i=1,r.interrupt?t(k):B(k)):zb.includes(s.toLowerCase())?(i=6,he?(e.consume(k),x):r.interrupt?t(k):B(k)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(k):a?S(k):C(k))}return k===45||Be(k)?(e.consume(k),s+=String.fromCharCode(k),w):n(k)}function x(k){return k===62?(e.consume(k),r.interrupt?t:B):n(k)}function S(k){return se(k)?(e.consume(k),S):I(k)}function C(k){return k===47?(e.consume(k),I):k===58||k===95||$e(k)?(e.consume(k),O):se(k)?(e.consume(k),C):I(k)}function O(k){return k===45||k===46||k===58||k===95||Be(k)?(e.consume(k),O):P(k)}function P(k){return k===61?(e.consume(k),A):se(k)?(e.consume(k),P):C(k)}function A(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),u=k,U):se(k)?(e.consume(k),A):v(k)}function U(k){return k===u?(e.consume(k),u=null,F):k===null||G(k)?n(k):(e.consume(k),U)}function v(k){return k===null||k===34||k===39||k===47||k===60||k===61||k===62||k===96||ge(k)?P(k):(e.consume(k),v)}function F(k){return k===47||k===62||se(k)?C(k):n(k)}function I(k){return k===62?(e.consume(k),$):n(k)}function $(k){return k===null||G(k)?B(k):se(k)?(e.consume(k),$):n(k)}function B(k){return k===45&&i===2?(e.consume(k),Z):k===60&&i===1?(e.consume(k),ee):k===62&&i===4?(e.consume(k),Le):k===63&&i===3?(e.consume(k),y):k===93&&i===5?(e.consume(k),Ue):G(k)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Yb,Pe,Q)(k)):k===null||G(k)?(e.exit("htmlFlowData"),Q(k)):(e.consume(k),B)}function Q(k){return e.check(jb,ae,Pe)(k)}function ae(k){return e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),X}function X(k){return k===null||G(k)?Q(k):(e.enter("htmlFlowData"),B(k))}function Z(k){return k===45?(e.consume(k),y):B(k)}function ee(k){return k===47?(e.consume(k),s="",V):B(k)}function V(k){if(k===62){const he=s.toLowerCase();return Do.includes(he)?(e.consume(k),Le):B(k)}return $e(k)&&s.length<8?(e.consume(k),s+=String.fromCharCode(k),V):B(k)}function Ue(k){return k===93?(e.consume(k),y):B(k)}function y(k){return k===62?(e.consume(k),Le):k===45&&i===2?(e.consume(k),y):B(k)}function Le(k){return k===null||G(k)?(e.exit("htmlFlowData"),Pe(k)):(e.consume(k),Le)}function Pe(k){return e.exit("htmlFlow"),t(k)}}function Wb(e,t,n){const r=this;return i;function i(s){return G(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a):n(s)}function a(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function Gb(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(hr,t,n)}}const Qb={name:"htmlText",tokenize:Kb};function Kb(e,t,n){const r=this;let i,a,s;return o;function o(y){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(y),u}function u(y){return y===33?(e.consume(y),l):y===47?(e.consume(y),P):y===63?(e.consume(y),C):$e(y)?(e.consume(y),v):n(y)}function l(y){return y===45?(e.consume(y),f):y===91?(e.consume(y),a=0,m):$e(y)?(e.consume(y),S):n(y)}function f(y){return y===45?(e.consume(y),h):n(y)}function d(y){return y===null?n(y):y===45?(e.consume(y),p):G(y)?(s=d,ee(y)):(e.consume(y),d)}function p(y){return y===45?(e.consume(y),h):d(y)}function h(y){return y===62?Z(y):y===45?p(y):d(y)}function m(y){const Le="CDATA[";return y===Le.charCodeAt(a++)?(e.consume(y),a===Le.length?T:m):n(y)}function T(y){return y===null?n(y):y===93?(e.consume(y),w):G(y)?(s=T,ee(y)):(e.consume(y),T)}function w(y){return y===93?(e.consume(y),x):T(y)}function x(y){return y===62?Z(y):y===93?(e.consume(y),x):T(y)}function S(y){return y===null||y===62?Z(y):G(y)?(s=S,ee(y)):(e.consume(y),S)}function C(y){return y===null?n(y):y===63?(e.consume(y),O):G(y)?(s=C,ee(y)):(e.consume(y),C)}function O(y){return y===62?Z(y):C(y)}function P(y){return $e(y)?(e.consume(y),A):n(y)}function A(y){return y===45||Be(y)?(e.consume(y),A):U(y)}function U(y){return G(y)?(s=U,ee(y)):se(y)?(e.consume(y),U):Z(y)}function v(y){return y===45||Be(y)?(e.consume(y),v):y===47||y===62||ge(y)?F(y):n(y)}function F(y){return y===47?(e.consume(y),Z):y===58||y===95||$e(y)?(e.consume(y),I):G(y)?(s=F,ee(y)):se(y)?(e.consume(y),F):Z(y)}function I(y){return y===45||y===46||y===58||y===95||Be(y)?(e.consume(y),I):$(y)}function $(y){return y===61?(e.consume(y),B):G(y)?(s=$,ee(y)):se(y)?(e.consume(y),$):F(y)}function B(y){return y===null||y===60||y===61||y===62||y===96?n(y):y===34||y===39?(e.consume(y),i=y,Q):G(y)?(s=B,ee(y)):se(y)?(e.consume(y),B):(e.consume(y),ae)}function Q(y){return y===i?(e.consume(y),i=void 0,X):y===null?n(y):G(y)?(s=Q,ee(y)):(e.consume(y),Q)}function ae(y){return y===null||y===34||y===39||y===60||y===61||y===96?n(y):y===47||y===62||ge(y)?F(y):(e.consume(y),ae)}function X(y){return y===47||y===62||ge(y)?F(y):n(y)}function Z(y){return y===62?(e.consume(y),e.exit("htmlTextData"),e.exit("htmlText"),t):n(y)}function ee(y){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),V}function V(y){return se(y)?ue(e,Ue,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(y):Ue(y)}function Ue(y){return e.enter("htmlTextData"),s(y)}}const rs={name:"labelEnd",resolveAll:e2,resolveTo:t2,tokenize:n2},Xb={tokenize:r2},Zb={tokenize:i2},Jb={tokenize:a2};function e2(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&&et(e,0,e.length,n),e}function t2(e,t){let n=e.length,r=0,i,a,s,o;for(;n--;)if(i=e[n][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=n);const u={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:"label",start:{...e[a][1].start},end:{...e[s][1].end}},f={type:"labelText",start:{...e[a+r+2][1].end},end:{...e[s-2][1].start}};return o=[["enter",u,t],["enter",l,t]],o=it(o,e.slice(a+1,a+r+3)),o=it(o,[["enter",f,t]]),o=it(o,mi(t.parser.constructs.insideSpan.null,e.slice(a+r+4,s-3),t)),o=it(o,[["exit",f,t],e[s-2],e[s-1],["exit",l,t]]),o=it(o,e.slice(s+1)),o=it(o,[["exit",u,t]]),et(e,a,e.length,o),e}function n2(e,t,n){const r=this;let i=r.events.length,a,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){a=r.events[i][1];break}return o;function o(p){return a?a._inactive?d(p):(s=r.parser.defined.includes(ot(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),u):n(p)}function u(p){return p===40?e.attempt(Xb,f,s?f:d)(p):p===91?e.attempt(Zb,f,s?l:d)(p):s?f(p):d(p)}function l(p){return e.attempt(Jb,f,d)(p)}function f(p){return t(p)}function d(p){return a._balanced=!0,n(p)}}function r2(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return ge(d)?Qn(e,a)(d):a(d)}function a(d){return d===41?f(d):Yc(e,s,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function s(d){return ge(d)?Qn(e,u)(d):f(d)}function o(d){return n(d)}function u(d){return d===34||d===39||d===40?qc(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):f(d)}function l(d){return ge(d)?Qn(e,f)(d):f(d)}function f(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function i2(e,t,n){const r=this;return i;function i(o){return jc.call(r,e,a,s,"reference","referenceMarker","referenceString")(o)}function a(o){return r.parser.defined.includes(ot(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(o):n(o)}function s(o){return n(o)}}function a2(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const s2={name:"labelStartImage",resolveAll:rs.resolveAll,tokenize:o2};function o2(e,t,n){const r=this;return i;function i(o){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(o),e.exit("labelImageMarker"),a}function a(o){return o===91?(e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelImage"),s):n(o)}function s(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const u2={name:"labelStartLink",resolveAll:rs.resolveAll,tokenize:l2};function l2(e,t,n){const r=this;return i;function i(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),a}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const Ui={name:"lineEnding",tokenize:c2};function c2(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),ue(e,t,"linePrefix")}}const Pr={name:"thematicBreak",tokenize:d2};function d2(e,t,n){let r=0,i;return a;function a(l){return e.enter("thematicBreak"),s(l)}function s(l){return i=l,o(l)}function o(l){return l===i?(e.enter("thematicBreakSequence"),u(l)):r>=3&&(l===null||G(l))?(e.exit("thematicBreak"),t(l)):n(l)}function u(l){return l===i?(e.consume(l),r++,u):(e.exit("thematicBreakSequence"),se(l)?ue(e,o,"whitespace")(l):o(l))}}const Ve={continuation:{tokenize:m2},exit:b2,name:"list",tokenize:p2},f2={partial:!0,tokenize:E2},h2={partial:!0,tokenize:g2};function p2(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return o;function o(h){const m=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:ga(h)){if(r.containerState.type||(r.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(Pr,n,l)(h):l(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(h)}return n(h)}function u(h){return ga(h)&&++s<10?(e.consume(h),u):(!r.interrupt||s<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),l(h)):n(h)}function l(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(hr,r.interrupt?n:f,e.attempt(f2,p,d))}function f(h){return r.containerState.initialBlankLine=!0,a++,p(h)}function d(h){return se(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),p):n(h)}function p(h){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function m2(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(hr,i,a);function i(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ue(e,t,"listItemIndent",r.containerState.size+1)(o)}function a(o){return r.containerState.furtherBlankLines||!se(o)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(o)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(h2,t,s)(o))}function s(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,ue(e,e.attempt(Ve,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function g2(e,t,n){const r=this;return ue(e,i,"listItemIndent",r.containerState.size+1);function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(a):n(a)}}function b2(e){e.exit(this.containerState.type)}function E2(e,t,n){const r=this;return ue(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4+1);function i(a){const s=r.events[r.events.length-1];return!se(a)&&s&&s[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const Po={name:"setextUnderline",resolveTo:T2,tokenize:_2};function T2(e,t){let n=e.length,r,i,a;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),!a&&e[n][1].type==="definition"&&(a=n);const s={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",s,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=s,e.push(["exit",s,t]),e}function _2(e,t,n){const r=this;let i;return a;function a(l){let f=r.events.length,d;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){d=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=l,s(l)):n(l)}function s(l){return e.enter("setextHeadingLineSequence"),o(l)}function o(l){return l===i?(e.consume(l),o):(e.exit("setextHeadingLineSequence"),se(l)?ue(e,u,"lineSuffix")(l):u(l))}function u(l){return l===null||G(l)?(e.exit("setextHeadingLine"),t(l)):n(l)}}const k2={tokenize:N2,partial:!0};function x2(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:C2,continuation:{tokenize:S2},exit:I2}},text:{91:{name:"gfmFootnoteCall",tokenize:A2},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:y2,resolveTo:w2}}}}function y2(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const u=r.events[i][1];if(u.type==="labelImage"){s=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return o;function o(u){if(!s||!s._balanced)return n(u);const l=ot(r.sliceSerialize({start:s.end,end:r.now()}));return l.codePointAt(0)!==94||!a.includes(l.slice(1))?n(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),t(u))}}function w2(e,t){let n=e.length;for(;n--&&!(e[n][1].type==="labelImage"&&e[n][0]==="enter"););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 a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},o=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",s,t],["exit",s,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...o),e}function A2(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,s;return o;function o(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),u}function u(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(d){if(a>999||d===93&&!s||d===null||d===91||ge(d))return n(d);if(d===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(ot(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return ge(d)||(s=!0),a++,e.consume(d),d===92?f:l}function f(d){return d===91||d===92||d===93?(e.consume(d),a++,l):l(d)}}function C2(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,s=0,o;return u;function u(m){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),l}function l(m){return m===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):n(m)}function f(m){if(s>999||m===93&&!o||m===null||m===91||ge(m))return n(m);if(m===93){e.exit("chunkString");const T=e.exit("gfmFootnoteDefinitionLabelString");return a=ot(r.sliceSerialize(T)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return ge(m)||(o=!0),s++,e.consume(m),m===92?d:f}function d(m){return m===91||m===92||m===93?(e.consume(m),s++,f):f(m)}function p(m){return m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),i.includes(a)||i.push(a),ue(e,h,"gfmFootnoteDefinitionWhitespace")):n(m)}function h(m){return t(m)}}function S2(e,t,n){return e.check(hr,t,e.attempt(k2,t,n))}function I2(e){e.exit("gfmFootnoteDefinition")}function N2(e,t,n){const r=this;return ue(e,i,"gfmFootnoteDefinitionIndent",4+1);function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(a):n(a)}}function v2(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,o){let u=-1;for(;++u<s.length;)if(s[u][0]==="enter"&&s[u][1].type==="strikethroughSequenceTemporary"&&s[u][1]._close){let l=u;for(;l--;)if(s[l][0]==="exit"&&s[l][1].type==="strikethroughSequenceTemporary"&&s[l][1]._open&&s[u][1].end.offset-s[u][1].start.offset===s[l][1].end.offset-s[l][1].start.offset){s[u][1].type="strikethroughSequence",s[l][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},s[l][1].start),end:Object.assign({},s[u][1].end)},d={type:"strikethroughText",start:Object.assign({},s[l][1].end),end:Object.assign({},s[u][1].start)},p=[["enter",f,o],["enter",s[l][1],o],["exit",s[l][1],o],["enter",d,o]],h=o.parser.constructs.insideSpan.null;h&&et(p,p.length,0,mi(h,s.slice(l+1,u),o)),et(p,p.length,0,[["exit",d,o],["enter",s[u][1],o],["exit",s[u][1],o],["exit",f,o]]),et(s,l-1,u-l+3,p),u=l+p.length-2;break}}for(u=-1;++u<s.length;)s[u][1].type==="strikethroughSequenceTemporary"&&(s[u][1].type="data");return s}function a(s,o,u){const l=this.previous,f=this.events;let d=0;return p;function p(m){return l===126&&f[f.length-1][1].type!=="characterEscape"?u(m):(s.enter("strikethroughSequenceTemporary"),h(m))}function h(m){const T=En(l);if(m===126)return d>1?u(m):(s.consume(m),d++,h);if(d<2&&!n)return u(m);const w=s.exit("strikethroughSequenceTemporary"),x=En(m);return w._open=!x||x===2&&!!T,w._close=!T||T===2&&!!x,o(m)}}}class L2{constructor(){this.map=[]}add(t,n,r){R2(this,t,n,r)}consume(t){if(this.map.sort(function(a,s){return a[0]-s[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 a of i)t.push(a);i=r.pop()}this.map.length=0}}function R2(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 O2(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 a=r.length-1;r[a]=r[a]==="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 D2(){return{flow:{null:{name:"table",tokenize:P2,resolveAll:M2}}}}function P2(e,t,n){const r=this;let i=0,a=0,s;return o;function o(I){let $=r.events.length-1;for(;$>-1;){const ae=r.events[$][1].type;if(ae==="lineEnding"||ae==="linePrefix")$--;else break}const B=$>-1?r.events[$][1].type:null,Q=B==="tableHead"||B==="tableRow"?A:u;return Q===A&&r.parser.lazy[r.now().line]?n(I):Q(I)}function u(I){return e.enter("tableHead"),e.enter("tableRow"),l(I)}function l(I){return I===124||(s=!0,a+=1),f(I)}function f(I){return I===null?n(I):G(I)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),h):n(I):se(I)?ue(e,f,"whitespace")(I):(a+=1,s&&(s=!1,i+=1),I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),s=!0,f):(e.enter("data"),d(I)))}function d(I){return I===null||I===124||ge(I)?(e.exit("data"),f(I)):(e.consume(I),I===92?p:d)}function p(I){return I===92||I===124?(e.consume(I),d):d(I)}function h(I){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(I):(e.enter("tableDelimiterRow"),s=!1,se(I)?ue(e,m,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):m(I))}function m(I){return I===45||I===58?w(I):I===124?(s=!0,e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),T):P(I)}function T(I){return se(I)?ue(e,w,"whitespace")(I):w(I)}function w(I){return I===58?(a+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),x):I===45?(a+=1,x(I)):I===null||G(I)?O(I):P(I)}function x(I){return I===45?(e.enter("tableDelimiterFiller"),S(I)):P(I)}function S(I){return I===45?(e.consume(I),S):I===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),C):(e.exit("tableDelimiterFiller"),C(I))}function C(I){return se(I)?ue(e,O,"whitespace")(I):O(I)}function O(I){return I===124?m(I):I===null||G(I)?!s||i!==a?P(I):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(I)):P(I)}function P(I){return n(I)}function A(I){return e.enter("tableRow"),U(I)}function U(I){return I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),U):I===null||G(I)?(e.exit("tableRow"),t(I)):se(I)?ue(e,U,"whitespace")(I):(e.enter("data"),v(I))}function v(I){return I===null||I===124||ge(I)?(e.exit("data"),U(I)):(e.consume(I),I===92?F:v)}function F(I){return I===92||I===124?(e.consume(I),v):v(I)}}function M2(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],s=[0,0,0,0],o=!1,u=0,l,f,d;const p=new L2;for(;++n<e.length;){const h=e[n],m=h[1];h[0]==="enter"?m.type==="tableHead"?(o=!1,u!==0&&(Mo(p,t,u,l,f),f=void 0,u=0),l={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},p.add(n,0,[["enter",l,t]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(r=!0,d=void 0,a=[0,0,0,0],s=[0,n+1,0,0],o&&(o=!1,f={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},p.add(n,0,[["enter",f,t]])),i=m.type==="tableDelimiterRow"?2:f?3:1):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(a[1]!==0&&(s[0]=s[1],d=kr(p,t,a,i,void 0,d),a=[0,0,0,0]),s[2]=n)):m.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(s[0]=s[1],d=kr(p,t,a,i,void 0,d)),a=s,s=[a[1],n,0,0])):m.type==="tableHead"?(o=!0,u=n):m.type==="tableRow"||m.type==="tableDelimiterRow"?(u=n,a[1]!==0?(s[0]=s[1],d=kr(p,t,a,i,n,d)):s[1]!==0&&(d=kr(p,t,s,i,n,d)),i=0):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(s[3]=n)}for(u!==0&&Mo(p,t,u,l,f),p.consume(t.events),n=-1;++n<t.events.length;){const h=t.events[n];h[0]==="enter"&&h[1].type==="table"&&(h[1]._align=O2(t.events,n))}return e}function kr(e,t,n,r,i,a){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",o="tableContent";n[0]!==0&&(a.end=Object.assign({},un(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const u=un(t.events,n[1]);if(a={type:s,start:Object.assign({},u),end:Object.assign({},u)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const l=un(t.events,n[2]),f=un(t.events,n[3]),d={type:o,start:Object.assign({},l),end:Object.assign({},f)};if(e.add(n[2],0,[["enter",d,t]]),r!==2){const p=t.events[n[2]],h=t.events[n[3]];if(p[1].end=Object.assign({},h[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const m=n[2]+1,T=n[3]-n[2]-1;e.add(m,T,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return i!==void 0&&(a.end=Object.assign({},un(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function Mo(e,t,n,r,i){const a=[],s=un(t.events,n);i&&(i.end=Object.assign({},s),a.push(["exit",i,t])),r.end=Object.assign({},s),a.push(["exit",r,t]),e.add(n+1,0,a)}function un(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const B2={name:"tasklistCheck",tokenize:H2};function F2(){return{text:{91:B2}}}function H2(e,t,n){const r=this;return i;function i(u){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),a)}function a(u){return ge(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),s):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),s):n(u)}function s(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):n(u)}function o(u){return G(u)?t(u):se(u)?e.check({tokenize:U2},t,n)(u):n(u)}}function U2(e,t,n){return ue(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function z2(e){return vc([Xg(),x2(),v2(e),D2(),F2()])}const $2={};function Y2(e){const t=this,n=e||$2,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(z2(n)),a.push(qg()),s.push(Vg(n))}var j2=Object.defineProperty,q2=Object.defineProperties,V2=Object.getOwnPropertyDescriptors,Bo=Object.getOwnPropertySymbols,W2=Object.prototype.hasOwnProperty,G2=Object.prototype.propertyIsEnumerable,Fo=(e,t,n)=>t in e?j2(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Vc=(e,t)=>{for(var n in t||(t={}))W2.call(t,n)&&Fo(e,n,t[n]);if(Bo)for(var n of Bo(t))G2.call(t,n)&&Fo(e,n,t[n]);return e},Wc=(e,t)=>q2(e,V2(t)),Q2=/(\*\*)([^*]*\*?)$/,K2=/(__)([^_]*?)$/,X2=/(\*\*\*)([^*]*?)$/,Z2=/(\*)([^*]*?)$/,J2=/(_)([^_]*?)$/,eE=/(`)([^`]*?)$/,tE=/(~~)([^~]*?)$/,en=/^[\s_~*`]*$/,Gc=/^[\s]*[-*+][\s]+$/,nE=/[\p{L}\p{N}_]/u,rE=/^```[^`\n]*```?$/,iE=/^\*{4,}$/,aE=/(__)([^_]+)_$/,sE=/(~~)([^~]+)~$/,oE=/__/g,Ho=/~~/g,Mt=e=>{if(!e)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===95?!0:nE.test(e)},Tn=(e,t)=>{let n=!1;for(let r=0;r<t;r+=1)e[r]==="`"&&e[r+1]==="`"&&e[r+2]==="`"&&(n=!n,r+=2);return n},uE=(e,t)=>{let n=1;for(let r=t-1;r>=0;r-=1)if(e[r]==="]")n+=1;else if(e[r]==="["&&(n-=1,n===0))return r;return-1},Qc=(e,t)=>{let n=1;for(let r=t+1;r<e.length;r+=1)if(e[r]==="[")n+=1;else if(e[r]==="]"&&(n-=1,n===0))return r;return-1},gi=(e,t)=>{let n=!1,r=!1;for(let i=0;i<e.length&&i<t;i+=1){if(e[i]==="\\"&&e[i+1]==="$"){i+=1;continue}e[i]==="$"&&(e[i+1]==="$"?(r=!r,i+=1,n=!1):r||(n=!n))}return n||r},lE=(e,t)=>{for(let n=t;n<e.length;n+=1){if(e[n]===")")return!0;if(e[n]===`
|
|
18
|
+
`)return!1}return!1},Kc=(e,t)=>{for(let n=t-1;n>=0;n-=1){if(e[n]===")")return!1;if(e[n]==="(")return n>0&&e[n-1]==="]"?lE(e,t):!1;if(e[n]===`
|
|
19
|
+
`)return!1}return!1},is=(e,t,n)=>{let r=0;for(let u=t-1;u>=0;u-=1)if(e[u]===`
|
|
20
|
+
`){r=u+1;break}let i=e.length;for(let u=t;u<e.length;u+=1)if(e[u]===`
|
|
21
|
+
`){i=u;break}let a=e.substring(r,i),s=0,o=!1;for(let u of a)if(u===n)s+=1;else if(u!==" "&&u!==" "){o=!0;break}return s>=3&&!o},cE=(e,t,n)=>{if(n!==" "&&n!==" ")return!1;let r=0;for(let i=t-1;i>=0;i-=1)if(e[i]===`
|
|
22
|
+
`){r=i+1;break}for(let i=r;i<t;i+=1)if(e[i]!==" "&&e[i]!==" ")return!1;return!0},dE=(e,t,n,r)=>n==="\\"||e.includes("$")&&gi(e,t)?!0:n!=="*"&&r==="*"?(t<e.length-2?e[t+2]:"")!=="*":!!(n==="*"||n&&r&&Mt(n)&&Mt(r)||cE(e,t,r)),Xc=e=>{let t=0,n=e.length;for(let r=0;r<n;r+=1){if(e[r]!=="*")continue;let i=r>0?e[r-1]:"",a=r<n-1?e[r+1]:"";dE(e,r,i,a)||(t+=1)}return t},fE=(e,t,n,r)=>!!(n==="\\"||e.includes("$")&&gi(e,t)||Kc(e,t)||n==="_"||r==="_"||n&&r&&Mt(n)&&Mt(r)),hE=e=>{let t=0,n=e.length;for(let r=0;r<n;r+=1){if(e[r]!=="_")continue;let i=r>0?e[r-1]:"",a=r<n-1?e[r+1]:"";fE(e,r,i,a)||(t+=1)}return t},pE=e=>{let t=0,n=0;for(let r=0;r<e.length;r+=1)e[r]==="*"?n+=1:(n>=3&&(t+=Math.floor(n/3)),n=0);return n>=3&&(t+=Math.floor(n/3)),t},mE=(e,t,n)=>{if(!t||en.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
|
|
23
|
+
`),i=r===-1?0:r+1,a=e.substring(i,n);return Gc.test(a)&&t.includes(`
|
|
24
|
+
`)?!0:is(e,n,"*")},gE=e=>{let t=e.match(Q2);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return Tn(e,r)||mE(e,n,r)?e:(e.match(/\*\*/g)||[]).length%2===1?n.endsWith("*")?`${e}*`:`${e}**`:e},bE=(e,t,n)=>{if(!t||en.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
|
|
25
|
+
`),i=r===-1?0:r+1,a=e.substring(i,n);return Gc.test(a)&&t.includes(`
|
|
26
|
+
`)?!0:is(e,n,"_")},EE=e=>{let t=e.match(K2);if(!t){let i=e.match(aE);if(i){let a=e.lastIndexOf(i[1]);if(!Tn(e,a)&&(e.match(oE)||[]).length%2===1)return`${e}_`}return e}let n=t[2],r=e.lastIndexOf(t[1]);return Tn(e,r)||bE(e,n,r)?e:(e.match(/__/g)||[]).length%2===1?`${e}__`:e},TE=e=>{for(let t=0;t<e.length;t+=1)if(e[t]==="*"&&e[t-1]!=="*"&&e[t+1]!=="*"&&e[t-1]!=="\\"&&!gi(e,t)){let n=t>0?e[t-1]:"",r=t<e.length-1?e[t+1]:"";if(n&&r&&Mt(n)&&Mt(r))continue;return t}return-1},_E=e=>{if(!e.match(Z2))return e;let t=TE(e);if(t===-1||Tn(e,t))return e;let n=e.substring(t+1);return!n||en.test(n)?e:Xc(e)%2===1?`${e}*`:e},Zc=e=>{for(let t=0;t<e.length;t+=1)if(e[t]==="_"&&e[t-1]!=="_"&&e[t+1]!=="_"&&e[t-1]!=="\\"&&!gi(e,t)&&!Kc(e,t)){let n=t>0?e[t-1]:"",r=t<e.length-1?e[t+1]:"";if(n&&r&&Mt(n)&&Mt(r))continue;return t}return-1},kE=e=>{let t=e.length;for(;t>0&&e[t-1]===`
|
|
27
|
+
`;)t-=1;if(t<e.length){let n=e.slice(0,t),r=e.slice(t);return`${n}_${r}`}return`${e}_`},xE=e=>{if(!e.endsWith("**"))return null;let t=e.slice(0,-2);if((t.match(/\*\*/g)||[]).length%2!==1)return null;let n=t.indexOf("**"),r=Zc(t);return n!==-1&&r!==-1&&n<r?`${t}_**`:null},yE=e=>{if(!e.match(J2))return e;let t=Zc(e);if(t===-1||Tn(e,t))return e;let n=e.substring(t+1);if(!n||en.test(n))return e;if(hE(e)%2===1){let r=xE(e);return r!==null?r:kE(e)}return e},wE=e=>{let t=(e.match(/\*\*/g)||[]).length,n=Xc(e);return t%2===0&&n%2===0},AE=(e,t,n)=>!t||en.test(t)||Tn(e,n)?!0:is(e,n,"*"),CE=e=>{if(iE.test(e))return e;let t=e.match(X2);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return AE(e,n,r)?e:pE(e)%2===1?wE(e)?e:`${e}***`:e},Kr=(e,t)=>{let n=!1,r=!1;for(let i=0;i<t;i+=1){if(e.substring(i,i+3)==="```"){r=!r,i+=2;continue}!r&&e[i]==="`"&&(n=!n)}return n||r},SE=(e,t)=>{let n=e.substring(t,t+3)==="```",r=t>0&&e.substring(t-1,t+2)==="```",i=t>1&&e.substring(t-2,t+1)==="```";return n||r||i},IE=e=>{let t=0;for(let n=0;n<e.length;n+=1)e[n]==="`"&&!SE(e,n)&&(t+=1);return t},NE=e=>!e.match(rE)||e.includes(`
|
|
28
|
+
`)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,vE=e=>(e.match(/```/g)||[]).length%2===1,LE=e=>{let t=NE(e);if(t!==null)return t;let n=e.match(eE);if(n&&!vE(e)){let r=n[2];if(!r||en.test(r))return e;if(IE(e)%2===1)return`${e}\``}return e},RE=(e,t)=>t>=2&&e.substring(t-2,t+1)==="```"||t>=1&&e.substring(t-1,t+2)==="```"||t<=e.length-3&&e.substring(t,t+3)==="```",OE=e=>{let t=0,n=!1;for(let r=0;r<e.length-1;r+=1)e[r]==="`"&&!RE(e,r)&&(n=!n),!n&&e[r]==="$"&&e[r+1]==="$"&&(t+=1,r+=1);return t},DE=e=>{let t=e.indexOf("$$");return t!==-1&&e.indexOf(`
|
|
29
|
+
`,t)!==-1&&!e.endsWith(`
|
|
30
|
+
`)?`${e}
|
|
31
|
+
$$`:`${e}$$`},PE=e=>OE(e)%2===0?e:DE(e),ME=(e,t,n)=>{if(e.substring(t+2).includes(")"))return null;let r=uE(e,t);if(r===-1||Kr(e,r))return null;let i=r>0&&e[r-1]==="!",a=i?r-1:r,s=e.substring(0,a);if(i)return s;let o=e.substring(r+1,t);return n==="text-only"?`${s}${o}`:`${s}[${o}](streamdown:incomplete-link)`},Uo=(e,t)=>{for(let n=0;n<=t;n++)if(e[n]==="["&&!Kr(e,n)){if(n>0&&e[n-1]==="!")continue;let r=Qc(e,n);if(r===-1)return n;if(r+1<e.length&&e[r+1]==="("){let i=e.indexOf(")",r+2);i!==-1&&(n=i)}}return-1},BE=(e,t,n)=>{let r=t>0&&e[t-1]==="!",i=r?t-1:t,a=e.substring(t+1);if(!a.includes("]")){let s=e.substring(0,i);if(r)return s;if(n==="text-only"){let o=Uo(e,t);return o!==-1?e.substring(0,o)+e.substring(o+1):`${s}${a}`}return`${e}](streamdown:incomplete-link)`}if(Qc(e,t)===-1){let s=e.substring(0,i);if(r)return s;if(n==="text-only"){let o=Uo(e,t);if(o!==-1)return e.substring(0,o)+e.substring(o+1);let u=e.substring(t+1);return`${s}${u}`}return`${e}](streamdown:incomplete-link)`}return null},Jc=(e,t="protocol")=>{let n=e.lastIndexOf("](");if(n!==-1&&!Kr(e,n)){let r=ME(e,n,t);if(r!==null)return r}for(let r=e.length-1;r>=0;r-=1)if(e[r]==="["&&!Kr(e,r)){let i=BE(e,r,t);if(i!==null)return i}return e},FE=/^-{1,2}$/,HE=/^[\s]*-{1,2}[\s]+$/,UE=/^={1,2}$/,zE=/^[\s]*={1,2}[\s]+$/,$E=e=>{if(!e||typeof e!="string")return e;let t=e.lastIndexOf(`
|
|
32
|
+
`);if(t===-1)return e;let n=e.substring(t+1),r=e.substring(0,t),i=n.trim();if(FE.test(i)&&!n.match(HE)){let a=r.split(`
|
|
33
|
+
`).at(-1);if(a&&a.trim().length>0)return`${e}`}if(UE.test(i)&&!n.match(zE)){let a=r.split(`
|
|
34
|
+
`).at(-1);if(a&&a.trim().length>0)return`${e}`}return e},YE=e=>{let t=e.match(tE);if(t){let n=t[2];if(!n||en.test(n))return e;if((e.match(Ho)||[]).length%2===1)return`${e}~~`}else if(e.match(sE)&&(e.match(Ho)||[]).length%2===1)return`${e}~`;return e},zi=e=>e!==!1,Je={SETEXT_HEADINGS:0,LINKS:10,BOLD_ITALIC:20,BOLD:30,ITALIC_DOUBLE_UNDERSCORE:40,ITALIC_SINGLE_ASTERISK:41,ITALIC_SINGLE_UNDERSCORE:42,INLINE_CODE:50,STRIKETHROUGH:60,KATEX:70,DEFAULT:100},jE=[{handler:{name:"setextHeadings",handle:$E,priority:Je.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:Jc,priority:Je.LINKS},optionKey:"links",earlyReturn:e=>e.endsWith("](streamdown:incomplete-link)")},{handler:{name:"boldItalic",handle:CE,priority:Je.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:gE,priority:Je.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:EE,priority:Je.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:_E,priority:Je.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:yE,priority:Je.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:LE,priority:Je.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:YE,priority:Je.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:PE,priority:Je.KATEX},optionKey:"katex"}],qE=e=>{var t;let n=(t=e==null?void 0:e.linkMode)!=null?t:"protocol";return jE.filter(({handler:r,optionKey:i})=>r.name==="links"?zi(e==null?void 0:e.links)||zi(e==null?void 0:e.images):zi(e==null?void 0:e[i])).map(({handler:r,earlyReturn:i})=>r.name==="links"?{handler:Wc(Vc({},r),{handle:a=>Jc(a,n)}),earlyReturn:n==="protocol"?i:void 0}:{handler:r,earlyReturn:i})},VE=(e,t)=>{var n;if(!e||typeof e!="string")return e;let r=e.endsWith(" ")&&!e.endsWith(" ")?e.slice(0,-1):e,i=qE(t),a=((n=t==null?void 0:t.handlers)!=null?n:[]).map(o=>{var u;return{handler:Wc(Vc({},o),{priority:(u=o.priority)!=null?u:Je.DEFAULT}),earlyReturn:void 0}}),s=[...i,...a].sort((o,u)=>{var l,f;return((l=o.handler.priority)!=null?l:Je.DEFAULT)-((f=u.handler.priority)!=null?f:Je.DEFAULT)});for(let{handler:o,earlyReturn:u}of s)if(r=o.handle(r),u!=null&&u(r))return r;return r},WE=VE;function ed(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=ed(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function GE(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=ed(e))&&(r&&(r+=" "),r+=t);return r}const QE=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},KE=(e,t)=>({classGroupId:e,validator:t}),td=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Xr="-",zo=[],XE="arbitrary..",ZE=e=>{const t=e3(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return JE(s);const o=s.split(Xr),u=o[0]===""&&o.length>1?1:0;return nd(o,u,t)},getConflictingClassGroupIds:(s,o)=>{if(o){const u=r[s],l=n[s];return u?l?QE(l,u):u:l||zo}return n[s]||zo}}},nd=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],a=n.nextPart.get(i);if(a){const l=nd(e,t+1,a);if(l)return l}const s=n.validators;if(s===null)return;const o=t===0?e.join(Xr):e.slice(t).join(Xr),u=s.length;for(let l=0;l<u;l++){const f=s[l];if(f.validator(o))return f.classGroupId}},JE=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?XE+r:void 0})(),e3=e=>{const{theme:t,classGroups:n}=e;return t3(n,t)},t3=(e,t)=>{const n=td();for(const r in e){const i=e[r];as(i,n,r,t)}return n},as=(e,t,n,r)=>{const i=e.length;for(let a=0;a<i;a++){const s=e[a];n3(s,t,n,r)}},n3=(e,t,n,r)=>{if(typeof e=="string"){r3(e,t,n);return}if(typeof e=="function"){i3(e,t,n,r);return}a3(e,t,n,r)},r3=(e,t,n)=>{const r=e===""?t:rd(t,e);r.classGroupId=n},i3=(e,t,n,r)=>{if(s3(e)){as(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(KE(n,e))},a3=(e,t,n,r)=>{const i=Object.entries(e),a=i.length;for(let s=0;s<a;s++){const[o,u]=i[s];as(u,rd(t,o),n,r)}},rd=(e,t)=>{let n=e;const r=t.split(Xr),i=r.length;for(let a=0;a<i;a++){const s=r[a];let o=n.nextPart.get(s);o||(o=td(),n.nextPart.set(s,o)),n=o}return n},s3=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,o3=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const i=(a,s)=>{n[a]=s,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(a){let s=n[a];if(s!==void 0)return s;if((s=r[a])!==void 0)return i(a,s),s},set(a,s){a in n?n[a]=s:i(a,s)}}},Ta="!",$o=":",u3=[],Yo=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),l3=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const a=[];let s=0,o=0,u=0,l;const f=i.length;for(let T=0;T<f;T++){const w=i[T];if(s===0&&o===0){if(w===$o){a.push(i.slice(u,T)),u=T+1;continue}if(w==="/"){l=T;continue}}w==="["?s++:w==="]"?s--:w==="("?o++:w===")"&&o--}const d=a.length===0?i:i.slice(u);let p=d,h=!1;d.endsWith(Ta)?(p=d.slice(0,-1),h=!0):d.startsWith(Ta)&&(p=d.slice(1),h=!0);const m=l&&l>u?l-u:void 0;return Yo(a,h,p,m)};if(t){const i=t+$o,a=r;r=s=>s.startsWith(i)?a(s.slice(i.length)):Yo(u3,!1,s,void 0,!0)}if(n){const i=r;r=a=>n({className:a,parseClassName:i})}return r},c3=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let i=[];for(let a=0;a<n.length;a++){const s=n[a],o=s[0]==="[",u=t.has(s);o||u?(i.length>0&&(i.sort(),r.push(...i),i=[]),r.push(s)):i.push(s)}return i.length>0&&(i.sort(),r.push(...i)),r}},d3=e=>({cache:o3(e.cacheSize),parseClassName:l3(e),sortModifiers:c3(e),...ZE(e)}),f3=/\s+/,h3=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a}=t,s=[],o=e.trim().split(f3);let u="";for(let l=o.length-1;l>=0;l-=1){const f=o[l],{isExternal:d,modifiers:p,hasImportantModifier:h,baseClassName:m,maybePostfixModifierPosition:T}=n(f);if(d){u=f+(u.length>0?" "+u:u);continue}let w=!!T,x=r(w?m.substring(0,T):m);if(!x){if(!w){u=f+(u.length>0?" "+u:u);continue}if(x=r(m),!x){u=f+(u.length>0?" "+u:u);continue}w=!1}const S=p.length===0?"":p.length===1?p[0]:a(p).join(":"),C=h?S+Ta:S,O=C+x;if(s.indexOf(O)>-1)continue;s.push(O);const P=i(x,w);for(let A=0;A<P.length;++A){const U=P[A];s.push(C+U)}u=f+(u.length>0?" "+u:u)}return u},p3=(...e)=>{let t=0,n,r,i="";for(;t<e.length;)(n=e[t++])&&(r=id(n))&&(i&&(i+=" "),i+=r);return i},id=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=id(e[r]))&&(n&&(n+=" "),n+=t);return n},m3=(e,...t)=>{let n,r,i,a;const s=u=>{const l=t.reduce((f,d)=>d(f),e());return n=d3(l),r=n.cache.get,i=n.cache.set,a=o,o(u)},o=u=>{const l=r(u);if(l)return l;const f=h3(u,n);return i(u,f),f};return a=s,(...u)=>a(p3(...u))},g3=[],Ie=e=>{const t=n=>n[e]||g3;return t.isThemeGetter=!0,t},ad=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,sd=/^\((?:(\w[\w-]*):)?(.+)\)$/i,b3=/^\d+\/\d+$/,E3=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,T3=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,_3=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,k3=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,x3=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,on=e=>b3.test(e),re=e=>!!e&&!Number.isNaN(Number(e)),St=e=>!!e&&Number.isInteger(Number(e)),$i=e=>e.endsWith("%")&&re(e.slice(0,-1)),_t=e=>E3.test(e),y3=()=>!0,w3=e=>T3.test(e)&&!_3.test(e),od=()=>!1,A3=e=>k3.test(e),C3=e=>x3.test(e),S3=e=>!j(e)&&!q(e),I3=e=>Sn(e,cd,od),j=e=>ad.test(e),Yt=e=>Sn(e,dd,w3),Yi=e=>Sn(e,O3,re),jo=e=>Sn(e,ud,od),N3=e=>Sn(e,ld,C3),xr=e=>Sn(e,fd,A3),q=e=>sd.test(e),Mn=e=>In(e,dd),v3=e=>In(e,D3),qo=e=>In(e,ud),L3=e=>In(e,cd),R3=e=>In(e,ld),yr=e=>In(e,fd,!0),Sn=(e,t,n)=>{const r=ad.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},In=(e,t,n=!1)=>{const r=sd.exec(e);return r?r[1]?t(r[1]):n:!1},ud=e=>e==="position"||e==="percentage",ld=e=>e==="image"||e==="url",cd=e=>e==="length"||e==="size"||e==="bg-size",dd=e=>e==="length",O3=e=>e==="number",D3=e=>e==="family-name",fd=e=>e==="shadow",P3=()=>{const e=Ie("color"),t=Ie("font"),n=Ie("text"),r=Ie("font-weight"),i=Ie("tracking"),a=Ie("leading"),s=Ie("breakpoint"),o=Ie("container"),u=Ie("spacing"),l=Ie("radius"),f=Ie("shadow"),d=Ie("inset-shadow"),p=Ie("text-shadow"),h=Ie("drop-shadow"),m=Ie("blur"),T=Ie("perspective"),w=Ie("aspect"),x=Ie("ease"),S=Ie("animate"),C=()=>["auto","avoid","all","avoid-page","page","left","right","column"],O=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],P=()=>[...O(),q,j],A=()=>["auto","hidden","clip","visible","scroll"],U=()=>["auto","contain","none"],v=()=>[q,j,u],F=()=>[on,"full","auto",...v()],I=()=>[St,"none","subgrid",q,j],$=()=>["auto",{span:["full",St,q,j]},St,q,j],B=()=>[St,"auto",q,j],Q=()=>["auto","min","max","fr",q,j],ae=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],X=()=>["start","end","center","stretch","center-safe","end-safe"],Z=()=>["auto",...v()],ee=()=>[on,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...v()],V=()=>[e,q,j],Ue=()=>[...O(),qo,jo,{position:[q,j]}],y=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Le=()=>["auto","cover","contain",L3,I3,{size:[q,j]}],Pe=()=>[$i,Mn,Yt],k=()=>["","none","full",l,q,j],he=()=>["",re,Mn,Yt],ze=()=>["solid","dashed","dotted","double"],xe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],be=()=>[re,$i,qo,jo],Ge=()=>["","none",m,q,j],Qe=()=>["none",re,q,j],Ke=()=>["none",re,q,j],ct=()=>[re,q,j],At=()=>[on,"full",...v()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[_t],breakpoint:[_t],color:[y3],container:[_t],"drop-shadow":[_t],ease:["in","out","in-out"],font:[S3],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[_t],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[_t],shadow:[_t],spacing:["px",re],text:[_t],"text-shadow":[_t],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",on,j,q,w]}],container:["container"],columns:[{columns:[re,j,q,o]}],"break-after":[{"break-after":C()}],"break-before":[{"break-before":C()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:P()}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:U()}],"overscroll-x":[{"overscroll-x":U()}],"overscroll-y":[{"overscroll-y":U()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:F()}],"inset-x":[{"inset-x":F()}],"inset-y":[{"inset-y":F()}],start:[{start:F()}],end:[{end:F()}],top:[{top:F()}],right:[{right:F()}],bottom:[{bottom:F()}],left:[{left:F()}],visibility:["visible","invisible","collapse"],z:[{z:[St,"auto",q,j]}],basis:[{basis:[on,"full","auto",o,...v()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[re,on,"auto","initial","none",j]}],grow:[{grow:["",re,q,j]}],shrink:[{shrink:["",re,q,j]}],order:[{order:[St,"first","last","none",q,j]}],"grid-cols":[{"grid-cols":I()}],"col-start-end":[{col:$()}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":I()}],"row-start-end":[{row:$()}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Q()}],"auto-rows":[{"auto-rows":Q()}],gap:[{gap:v()}],"gap-x":[{"gap-x":v()}],"gap-y":[{"gap-y":v()}],"justify-content":[{justify:[...ae(),"normal"]}],"justify-items":[{"justify-items":[...X(),"normal"]}],"justify-self":[{"justify-self":["auto",...X()]}],"align-content":[{content:["normal",...ae()]}],"align-items":[{items:[...X(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...X(),{baseline:["","last"]}]}],"place-content":[{"place-content":ae()}],"place-items":[{"place-items":[...X(),"baseline"]}],"place-self":[{"place-self":["auto",...X()]}],p:[{p:v()}],px:[{px:v()}],py:[{py:v()}],ps:[{ps:v()}],pe:[{pe:v()}],pt:[{pt:v()}],pr:[{pr:v()}],pb:[{pb:v()}],pl:[{pl:v()}],m:[{m:Z()}],mx:[{mx:Z()}],my:[{my:Z()}],ms:[{ms:Z()}],me:[{me:Z()}],mt:[{mt:Z()}],mr:[{mr:Z()}],mb:[{mb:Z()}],ml:[{ml:Z()}],"space-x":[{"space-x":v()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":v()}],"space-y-reverse":["space-y-reverse"],size:[{size:ee()}],w:[{w:[o,"screen",...ee()]}],"min-w":[{"min-w":[o,"screen","none",...ee()]}],"max-w":[{"max-w":[o,"screen","none","prose",{screen:[s]},...ee()]}],h:[{h:["screen","lh",...ee()]}],"min-h":[{"min-h":["screen","lh","none",...ee()]}],"max-h":[{"max-h":["screen","lh",...ee()]}],"font-size":[{text:["base",n,Mn,Yt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,q,Yi]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",$i,j]}],"font-family":[{font:[v3,j,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,q,j]}],"line-clamp":[{"line-clamp":[re,"none",q,Yi]}],leading:[{leading:[a,...v()]}],"list-image":[{"list-image":["none",q,j]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",q,j]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:V()}],"text-color":[{text:V()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ze(),"wavy"]}],"text-decoration-thickness":[{decoration:[re,"from-font","auto",q,Yt]}],"text-decoration-color":[{decoration:V()}],"underline-offset":[{"underline-offset":[re,"auto",q,j]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:v()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",q,j]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",q,j]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Ue()}],"bg-repeat":[{bg:y()}],"bg-size":[{bg:Le()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},St,q,j],radial:["",q,j],conic:[St,q,j]},R3,N3]}],"bg-color":[{bg:V()}],"gradient-from-pos":[{from:Pe()}],"gradient-via-pos":[{via:Pe()}],"gradient-to-pos":[{to:Pe()}],"gradient-from":[{from:V()}],"gradient-via":[{via:V()}],"gradient-to":[{to:V()}],rounded:[{rounded:k()}],"rounded-s":[{"rounded-s":k()}],"rounded-e":[{"rounded-e":k()}],"rounded-t":[{"rounded-t":k()}],"rounded-r":[{"rounded-r":k()}],"rounded-b":[{"rounded-b":k()}],"rounded-l":[{"rounded-l":k()}],"rounded-ss":[{"rounded-ss":k()}],"rounded-se":[{"rounded-se":k()}],"rounded-ee":[{"rounded-ee":k()}],"rounded-es":[{"rounded-es":k()}],"rounded-tl":[{"rounded-tl":k()}],"rounded-tr":[{"rounded-tr":k()}],"rounded-br":[{"rounded-br":k()}],"rounded-bl":[{"rounded-bl":k()}],"border-w":[{border:he()}],"border-w-x":[{"border-x":he()}],"border-w-y":[{"border-y":he()}],"border-w-s":[{"border-s":he()}],"border-w-e":[{"border-e":he()}],"border-w-t":[{"border-t":he()}],"border-w-r":[{"border-r":he()}],"border-w-b":[{"border-b":he()}],"border-w-l":[{"border-l":he()}],"divide-x":[{"divide-x":he()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":he()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ze(),"hidden","none"]}],"divide-style":[{divide:[...ze(),"hidden","none"]}],"border-color":[{border:V()}],"border-color-x":[{"border-x":V()}],"border-color-y":[{"border-y":V()}],"border-color-s":[{"border-s":V()}],"border-color-e":[{"border-e":V()}],"border-color-t":[{"border-t":V()}],"border-color-r":[{"border-r":V()}],"border-color-b":[{"border-b":V()}],"border-color-l":[{"border-l":V()}],"divide-color":[{divide:V()}],"outline-style":[{outline:[...ze(),"none","hidden"]}],"outline-offset":[{"outline-offset":[re,q,j]}],"outline-w":[{outline:["",re,Mn,Yt]}],"outline-color":[{outline:V()}],shadow:[{shadow:["","none",f,yr,xr]}],"shadow-color":[{shadow:V()}],"inset-shadow":[{"inset-shadow":["none",d,yr,xr]}],"inset-shadow-color":[{"inset-shadow":V()}],"ring-w":[{ring:he()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:V()}],"ring-offset-w":[{"ring-offset":[re,Yt]}],"ring-offset-color":[{"ring-offset":V()}],"inset-ring-w":[{"inset-ring":he()}],"inset-ring-color":[{"inset-ring":V()}],"text-shadow":[{"text-shadow":["none",p,yr,xr]}],"text-shadow-color":[{"text-shadow":V()}],opacity:[{opacity:[re,q,j]}],"mix-blend":[{"mix-blend":[...xe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":xe()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[re]}],"mask-image-linear-from-pos":[{"mask-linear-from":be()}],"mask-image-linear-to-pos":[{"mask-linear-to":be()}],"mask-image-linear-from-color":[{"mask-linear-from":V()}],"mask-image-linear-to-color":[{"mask-linear-to":V()}],"mask-image-t-from-pos":[{"mask-t-from":be()}],"mask-image-t-to-pos":[{"mask-t-to":be()}],"mask-image-t-from-color":[{"mask-t-from":V()}],"mask-image-t-to-color":[{"mask-t-to":V()}],"mask-image-r-from-pos":[{"mask-r-from":be()}],"mask-image-r-to-pos":[{"mask-r-to":be()}],"mask-image-r-from-color":[{"mask-r-from":V()}],"mask-image-r-to-color":[{"mask-r-to":V()}],"mask-image-b-from-pos":[{"mask-b-from":be()}],"mask-image-b-to-pos":[{"mask-b-to":be()}],"mask-image-b-from-color":[{"mask-b-from":V()}],"mask-image-b-to-color":[{"mask-b-to":V()}],"mask-image-l-from-pos":[{"mask-l-from":be()}],"mask-image-l-to-pos":[{"mask-l-to":be()}],"mask-image-l-from-color":[{"mask-l-from":V()}],"mask-image-l-to-color":[{"mask-l-to":V()}],"mask-image-x-from-pos":[{"mask-x-from":be()}],"mask-image-x-to-pos":[{"mask-x-to":be()}],"mask-image-x-from-color":[{"mask-x-from":V()}],"mask-image-x-to-color":[{"mask-x-to":V()}],"mask-image-y-from-pos":[{"mask-y-from":be()}],"mask-image-y-to-pos":[{"mask-y-to":be()}],"mask-image-y-from-color":[{"mask-y-from":V()}],"mask-image-y-to-color":[{"mask-y-to":V()}],"mask-image-radial":[{"mask-radial":[q,j]}],"mask-image-radial-from-pos":[{"mask-radial-from":be()}],"mask-image-radial-to-pos":[{"mask-radial-to":be()}],"mask-image-radial-from-color":[{"mask-radial-from":V()}],"mask-image-radial-to-color":[{"mask-radial-to":V()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":O()}],"mask-image-conic-pos":[{"mask-conic":[re]}],"mask-image-conic-from-pos":[{"mask-conic-from":be()}],"mask-image-conic-to-pos":[{"mask-conic-to":be()}],"mask-image-conic-from-color":[{"mask-conic-from":V()}],"mask-image-conic-to-color":[{"mask-conic-to":V()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Ue()}],"mask-repeat":[{mask:y()}],"mask-size":[{mask:Le()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",q,j]}],filter:[{filter:["","none",q,j]}],blur:[{blur:Ge()}],brightness:[{brightness:[re,q,j]}],contrast:[{contrast:[re,q,j]}],"drop-shadow":[{"drop-shadow":["","none",h,yr,xr]}],"drop-shadow-color":[{"drop-shadow":V()}],grayscale:[{grayscale:["",re,q,j]}],"hue-rotate":[{"hue-rotate":[re,q,j]}],invert:[{invert:["",re,q,j]}],saturate:[{saturate:[re,q,j]}],sepia:[{sepia:["",re,q,j]}],"backdrop-filter":[{"backdrop-filter":["","none",q,j]}],"backdrop-blur":[{"backdrop-blur":Ge()}],"backdrop-brightness":[{"backdrop-brightness":[re,q,j]}],"backdrop-contrast":[{"backdrop-contrast":[re,q,j]}],"backdrop-grayscale":[{"backdrop-grayscale":["",re,q,j]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[re,q,j]}],"backdrop-invert":[{"backdrop-invert":["",re,q,j]}],"backdrop-opacity":[{"backdrop-opacity":[re,q,j]}],"backdrop-saturate":[{"backdrop-saturate":[re,q,j]}],"backdrop-sepia":[{"backdrop-sepia":["",re,q,j]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":v()}],"border-spacing-x":[{"border-spacing-x":v()}],"border-spacing-y":[{"border-spacing-y":v()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",q,j]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[re,"initial",q,j]}],ease:[{ease:["linear","initial",x,q,j]}],delay:[{delay:[re,q,j]}],animate:[{animate:["none",S,q,j]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[T,q,j]}],"perspective-origin":[{"perspective-origin":P()}],rotate:[{rotate:Qe()}],"rotate-x":[{"rotate-x":Qe()}],"rotate-y":[{"rotate-y":Qe()}],"rotate-z":[{"rotate-z":Qe()}],scale:[{scale:Ke()}],"scale-x":[{"scale-x":Ke()}],"scale-y":[{"scale-y":Ke()}],"scale-z":[{"scale-z":Ke()}],"scale-3d":["scale-3d"],skew:[{skew:ct()}],"skew-x":[{"skew-x":ct()}],"skew-y":[{"skew-y":ct()}],transform:[{transform:[q,j,"","none","gpu","cpu"]}],"transform-origin":[{origin:P()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:At()}],"translate-x":[{"translate-x":At()}],"translate-y":[{"translate-y":At()}],"translate-z":[{"translate-z":At()}],"translate-none":["translate-none"],accent:[{accent:V()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:V()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",q,j]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":v()}],"scroll-mx":[{"scroll-mx":v()}],"scroll-my":[{"scroll-my":v()}],"scroll-ms":[{"scroll-ms":v()}],"scroll-me":[{"scroll-me":v()}],"scroll-mt":[{"scroll-mt":v()}],"scroll-mr":[{"scroll-mr":v()}],"scroll-mb":[{"scroll-mb":v()}],"scroll-ml":[{"scroll-ml":v()}],"scroll-p":[{"scroll-p":v()}],"scroll-px":[{"scroll-px":v()}],"scroll-py":[{"scroll-py":v()}],"scroll-ps":[{"scroll-ps":v()}],"scroll-pe":[{"scroll-pe":v()}],"scroll-pt":[{"scroll-pt":v()}],"scroll-pr":[{"scroll-pr":v()}],"scroll-pb":[{"scroll-pb":v()}],"scroll-pl":[{"scroll-pl":v()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",q,j]}],fill:[{fill:["none",...V()]}],"stroke-w":[{stroke:[re,Mn,Yt,Yi]}],stroke:[{stroke:["none",...V()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},M3=m3(P3),B3=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,F3=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,H3={};function Vo(e,t){return((t||H3).jsx?F3:B3).test(e)}const U3=/[ \t\n\f\r]/g;function z3(e){return typeof e=="object"?e.type==="text"?Wo(e.value):!1:Wo(e)}function Wo(e){return e.replace(U3,"")===""}var Zr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function hd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ss={},Go=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,$3=/\n/g,Y3=/^\s*/,j3=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,q3=/^:\s*/,V3=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,W3=/^[;\s]*/,G3=/^\s+|\s+$/g,Q3=`
|
|
35
|
+
`,Qo="/",Ko="*",qt="",K3="comment",X3="declaration",Z3=function(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(m){var T=m.match($3);T&&(n+=T.length);var w=m.lastIndexOf(Q3);r=~w?m.length-w:r+m.length}function a(){var m={line:n,column:r};return function(T){return T.position=new s(m),l(),T}}function s(m){this.start=m,this.end={line:n,column:r},this.source=t.source}s.prototype.content=e;function o(m){var T=new Error(t.source+":"+n+":"+r+": "+m);if(T.reason=m,T.filename=t.source,T.line=n,T.column=r,T.source=e,!t.silent)throw T}function u(m){var T=m.exec(e);if(T){var w=T[0];return i(w),e=e.slice(w.length),T}}function l(){u(Y3)}function f(m){var T;for(m=m||[];T=d();)T!==!1&&m.push(T);return m}function d(){var m=a();if(!(Qo!=e.charAt(0)||Ko!=e.charAt(1))){for(var T=2;qt!=e.charAt(T)&&(Ko!=e.charAt(T)||Qo!=e.charAt(T+1));)++T;if(T+=2,qt===e.charAt(T-1))return o("End of comment missing");var w=e.slice(2,T-2);return r+=2,i(w),e=e.slice(T),r+=2,m({type:K3,comment:w})}}function p(){var m=a(),T=u(j3);if(T){if(d(),!u(q3))return o("property missing ':'");var w=u(V3),x=m({type:X3,property:Xo(T[0].replace(Go,qt)),value:w?Xo(w[0].replace(Go,qt)):qt});return u(W3),x}}function h(){var m=[];f(m);for(var T;T=p();)T!==!1&&(m.push(T),f(m));return m}return l(),h()};function Xo(e){return e?e.replace(G3,qt):qt}var J3=Zr&&Zr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ss,"__esModule",{value:!0});ss.default=tT;const eT=J3(Z3);function tT(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,eT.default)(e),i=typeof t=="function";return r.forEach(a=>{if(a.type!=="declaration")return;const{property:s,value:o}=a;i?t(s,o,a):o&&(n=n||{},n[s]=o)}),n}var bi={};Object.defineProperty(bi,"__esModule",{value:!0});bi.camelCase=void 0;var nT=/^--[a-zA-Z0-9_-]+$/,rT=/-([a-z])/g,iT=/^[^-]+$/,aT=/^-(webkit|moz|ms|o|khtml)-/,sT=/^-(ms)-/,oT=function(e){return!e||iT.test(e)||nT.test(e)},uT=function(e,t){return t.toUpperCase()},Zo=function(e,t){return"".concat(t,"-")},lT=function(e,t){return t===void 0&&(t={}),oT(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(sT,Zo):e=e.replace(aT,Zo),e.replace(rT,uT))};bi.camelCase=lT;var cT=Zr&&Zr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},dT=cT(ss),fT=bi;function _a(e,t){var n={};return!e||typeof e!="string"||(0,dT.default)(e,function(r,i){r&&i&&(n[(0,fT.camelCase)(r,t)]=i)}),n}_a.default=_a;var hT=_a;const pT=hd(hT);function Kn(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Jo(e.position):"start"in e||"end"in e?Jo(e):"line"in e||"column"in e?ka(e):""}function ka(e){return eu(e&&e.line)+":"+eu(e&&e.column)}function Jo(e){return ka(e&&e.start)+"-"+ka(e&&e.end)}function eu(e){return e&&typeof e=="number"?e:1}class He extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",a={},s=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?i=t:!a.cause&&t&&(s=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?a.ruleId=r:(a.source=r.slice(0,u),a.ruleId=r.slice(u+1))}if(!a.place&&a.ancestors&&a.ancestors){const u=a.ancestors[a.ancestors.length-1];u&&(a.place=u.position)}const o=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=o?o.line:void 0,this.name=Kn(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=s&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}He.prototype.file="";He.prototype.name="";He.prototype.reason="";He.prototype.message="";He.prototype.stack="";He.prototype.column=void 0;He.prototype.line=void 0;He.prototype.ancestors=void 0;He.prototype.cause=void 0;He.prototype.fatal=void 0;He.prototype.place=void 0;He.prototype.ruleId=void 0;He.prototype.source=void 0;const os={}.hasOwnProperty,mT=new Map,gT=/[A-Z]/g,bT=new Set(["table","tbody","thead","tfoot","tr"]),ET=new Set(["td","th"]),pd="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function TT(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=ST(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=CT(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"?Ft:lr,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=md(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function md(e,t,n){if(t.type==="element")return _T(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return kT(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return yT(e,t,n);if(t.type==="mdxjsEsm")return xT(e,t);if(t.type==="root")return wT(e,t,n);if(t.type==="text")return AT(e,t)}function _T(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Ft,e.schema=i),e.ancestors.push(t);const a=bd(e,t.tagName,!1),s=IT(e,t);let o=ls(e,t);return bT.has(t.tagName)&&(o=o.filter(function(u){return typeof u=="string"?!z3(u):!0})),gd(e,s,a,t),us(s,o),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function kT(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return e.evaluater.evaluateExpression(r.expression)}ir(e,t.position)}function xT(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ir(e,t.position)}function yT(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Ft,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:bd(e,t.name,!0),s=NT(e,t),o=ls(e,t);return gd(e,s,a,t),us(s,o),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function wT(e,t,n){const r={};return us(r,ls(e,t)),e.create(t,e.Fragment,r,n)}function AT(e,t){return t.value}function gd(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function us(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function CT(e,t,n){return r;function r(i,a,s,o){const l=Array.isArray(s.children)?n:t;return o?l(a,s,o):l(a,s)}}function ST(e,t){return n;function n(r,i,a,s){const o=Array.isArray(a.children),u=gt(r);return t(i,a,s,o,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function IT(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&os.call(t.properties,i)){const a=vT(e,i,t.properties[i]);if(a){const[s,o]=a;e.tableCellAlignToStyle&&s==="align"&&typeof o=="string"&&ET.has(t.tagName)?r=o:n[s]=o}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function NT(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0].expression.properties[0];Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else ir(e,t.position);else{const i=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const o=r.value.data.estree.body[0];a=e.evaluater.evaluateExpression(o.expression)}else ir(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function ls(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:mT;for(;++r<t.children.length;){const a=t.children[r];let s;if(e.passKeys){const u=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(u){const l=i.get(u)||0;s=u+"-"+l,i.set(u,l+1)}}const o=md(e,a,s);o!==void 0&&n.push(o)}return n}function vT(e,t,n){const r=ui(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?wl(n):Al(n)),r.property==="style"){let i=typeof n=="object"?n:LT(e,String(n));return e.stylePropertyNameCase==="css"&&(i=RT(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Bf[r.property]||r.property:r.attribute,n]}}function LT(e,t){try{return pT(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new He("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=pd+"#cannot-parse-style-attribute",i}}function bd(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,s;for(;++a<i.length;){const o=Vo(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};s=s?{type:"MemberExpression",object:s,property:o,computed:!!(a&&o.type==="Literal"),optional:!1}:o}r=s}else r=Vo(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return os.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);ir(e)}function ir(e,t){const n=new He("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=pd+"#cannot-handle-mdx-estrees-without-createevaluater",n}function RT(e){const t={};let n;for(n in e)os.call(e,n)&&(t[OT(n)]=e[n]);return t}function OT(e){let t=e.replace(gT,DT);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function DT(e){return"-"+e.toLowerCase()}const PT={tokenize:MT};function MT(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),ue(e,t,"linePrefix")}function i(o){return e.enter("paragraph"),a(o)}function a(o){const u=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=u),n=u,s(o)}function s(o){if(o===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(o);return}return G(o)?(e.consume(o),e.exit("chunkText"),a):(e.consume(o),s)}}const BT={tokenize:FT},tu={tokenize:HT};function FT(e){const t=this,n=[];let r=0,i,a,s;return o;function o(C){if(r<n.length){const O=n[r];return t.containerState=O[1],e.attempt(O[0].continuation,u,l)(C)}return l(C)}function u(C){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&S();const O=t.events.length;let P=O,A;for(;P--;)if(t.events[P][0]==="exit"&&t.events[P][1].type==="chunkFlow"){A=t.events[P][1].end;break}x(r);let U=O;for(;U<t.events.length;)t.events[U][1].end={...A},U++;return et(t.events,P+1,0,t.events.slice(O)),t.events.length=U,l(C)}return o(C)}function l(C){if(r===n.length){if(!i)return p(C);if(i.currentConstruct&&i.currentConstruct.concrete)return m(C);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(tu,f,d)(C)}function f(C){return i&&S(),x(r),p(C)}function d(C){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,m(C)}function p(C){return t.containerState={},e.attempt(tu,h,m)(C)}function h(C){return r++,n.push([t.currentConstruct,t.containerState]),p(C)}function m(C){if(C===null){i&&S(),x(0),e.consume(C);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),T(C)}function T(C){if(C===null){w(e.exit("chunkFlow"),!0),x(0),e.consume(C);return}return G(C)?(e.consume(C),w(e.exit("chunkFlow")),r=0,t.interrupt=void 0,o):(e.consume(C),T)}function w(C,O){const P=t.sliceStream(C);if(O&&P.push(null),C.previous=a,a&&(a.next=C),a=C,i.defineSkip(C.start),i.write(P),t.parser.lazy[C.start.line]){let A=i.events.length;for(;A--;)if(i.events[A][1].start.offset<s&&(!i.events[A][1].end||i.events[A][1].end.offset>s))return;const U=t.events.length;let v=U,F,I;for(;v--;)if(t.events[v][0]==="exit"&&t.events[v][1].type==="chunkFlow"){if(F){I=t.events[v][1].end;break}F=!0}for(x(r),A=U;A<t.events.length;)t.events[A][1].end={...I},A++;et(t.events,v+1,0,t.events.slice(U)),t.events.length=A}}function x(C){let O=n.length;for(;O-- >C;){const P=n[O];t.containerState=P[1],P[0].exit.call(t,e)}n.length=C}function S(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function HT(e,t,n){return ue(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const UT={tokenize:zT};function zT(e){const t=this,n=e.attempt(hr,r,e.attempt(this.parser.constructs.flowInitial,i,ue(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Sb,i)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const $T={resolveAll:Td()},YT=Ed("string"),jT=Ed("text");function Ed(e){return{resolveAll:Td(e==="text"?qT:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],a=n.attempt(i,s,o);return s;function s(f){return l(f)?a(f):o(f)}function o(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),u}function u(f){return l(f)?(n.exit("data"),a(f)):(n.consume(f),u)}function l(f){if(f===null)return!0;const d=i[f];let p=-1;if(d)for(;++p<d.length;){const h=d[p];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function Td(e){return t;function t(n,r){let i=-1,a;for(;++i<=n.length;)a===void 0?n[i]&&n[i][1].type==="data"&&(a=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==a+2&&(n[a][1].end=n[i-1][1].end,n.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(n,r):n}}function qT(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 a=i.length,s=-1,o=0,u;for(;a--;){const l=i[a];if(typeof l=="string"){for(s=l.length;l.charCodeAt(s-1)===32;)o++,s--;if(s)break;s=-1}else if(l===-2)u=!0,o++;else if(l!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(o=0),o){const l={type:n===e.length||u||o<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?s:r.start._bufferIndex+s,_index:r.start._index+a,line:r.end.line,column:r.end.column-o,offset:r.end.offset-o},end:{...r.end}};r.end={...l.start},r.start.offset===r.end.offset?Object.assign(r,l):(e.splice(n,0,["enter",l,t],["exit",l,t]),n+=2)}n++}return e}const VT={42:Ve,43:Ve,45:Ve,48:Ve,49:Ve,50:Ve,51:Ve,52:Ve,53:Ve,54:Ve,55:Ve,56:Ve,57:Ve,62:Hc},WT={91:Rb},GT={[-2]:Hi,[-1]:Hi,32:Hi},QT={35:Fb,42:Pr,45:[Po,Pr],60:$b,61:Po,95:Pr,96:Oo,126:Oo},KT={38:zc,92:Uc},XT={[-5]:Ui,[-4]:Ui,[-3]:Ui,33:s2,38:zc,42:Ea,60:[ub,Qb],91:u2,92:[Mb,Uc],93:rs,95:Ea,96:kb},ZT={null:[Ea,$T]},JT={null:[42,95]},e_={null:[]},t_=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:JT,contentInitial:WT,disable:e_,document:VT,flow:QT,flowInitial:GT,insideSpan:ZT,string:KT,text:XT},Symbol.toStringTag,{value:"Module"}));function n_(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={},a=[];let s=[],o=[];const u={attempt:U(P),check:U(A),consume:S,enter:C,exit:O,interrupt:U(A,{interrupt:!0})},l={code:null,containerState:{},defineSkip:T,events:[],now:m,parser:e,previous:null,sliceSerialize:p,sliceStream:h,write:d};let f=t.tokenize.call(l,u);return t.resolveAll&&a.push(t),l;function d($){return s=it(s,$),w(),s[s.length-1]!==null?[]:(v(t,0),l.events=mi(a,l.events,l),l.events)}function p($,B){return i_(h($),B)}function h($){return r_(s,$)}function m(){const{_bufferIndex:$,_index:B,line:Q,column:ae,offset:X}=r;return{_bufferIndex:$,_index:B,line:Q,column:ae,offset:X}}function T($){i[$.line]=$.column,I()}function w(){let $;for(;r._index<s.length;){const B=s[r._index];if(typeof B=="string")for($=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===$&&r._bufferIndex<B.length;)x(B.charCodeAt(r._bufferIndex));else x(B)}}function x($){f=f($)}function S($){G($)?(r.line++,r.column=1,r.offset+=$===-3?2:1,I()):$!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=$}function C($,B){const Q=B||{};return Q.type=$,Q.start=m(),l.events.push(["enter",Q,l]),o.push(Q),Q}function O($){const B=o.pop();return B.end=m(),l.events.push(["exit",B,l]),B}function P($,B){v($,B.from)}function A($,B){B.restore()}function U($,B){return Q;function Q(ae,X,Z){let ee,V,Ue,y;return Array.isArray(ae)?Pe(ae):"tokenize"in ae?Pe([ae]):Le(ae);function Le(xe){return be;function be(Ge){const Qe=Ge!==null&&xe[Ge],Ke=Ge!==null&&xe.null,ct=[...Array.isArray(Qe)?Qe:Qe?[Qe]:[],...Array.isArray(Ke)?Ke:Ke?[Ke]:[]];return Pe(ct)(Ge)}}function Pe(xe){return ee=xe,V=0,xe.length===0?Z:k(xe[V])}function k(xe){return be;function be(Ge){return y=F(),Ue=xe,xe.partial||(l.currentConstruct=xe),xe.name&&l.parser.constructs.disable.null.includes(xe.name)?ze():xe.tokenize.call(B?Object.assign(Object.create(l),B):l,u,he,ze)(Ge)}}function he(xe){return $(Ue,y),X}function ze(xe){return y.restore(),++V<ee.length?k(ee[V]):Z}}}function v($,B){$.resolveAll&&!a.includes($)&&a.push($),$.resolve&&et(l.events,B,l.events.length-B,$.resolve(l.events.slice(B),l)),$.resolveTo&&(l.events=$.resolveTo(l.events,l))}function F(){const $=m(),B=l.previous,Q=l.currentConstruct,ae=l.events.length,X=Array.from(o);return{from:ae,restore:Z};function Z(){r=$,l.previous=B,l.currentConstruct=Q,l.events.length=ae,o=X,I()}}function I(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function r_(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let s;if(n===i)s=[e[n].slice(r,a)];else{if(s=e.slice(n,i),r>-1){const o=s[0];typeof o=="string"?s[0]=o.slice(r):s.shift()}a>0&&s.push(e[i].slice(0,a))}return s}function i_(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const a=e[n];let s;if(typeof a=="string")s=a;else switch(a){case-5:{s="\r";break}case-4:{s=`
|
|
36
|
+
`;break}case-3:{s=`\r
|
|
37
|
+
`;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(a)}i=a===-2,r.push(s)}return r.join("")}function a_(e){const r={constructs:vc([t_,...(e||{}).extensions||[]]),content:i(PT),defined:[],document:i(BT),flow:i(UT),lazy:{},string:i(YT),text:i(jT)};return r;function i(a){return s;function s(o){return n_(r,a,o)}}}function s_(e){for(;!$c(e););return e}const nu=/[\0\t\n\r]/g;function o_(){let e=1,t="",n=!0,r;return i;function i(a,s,o){const u=[];let l,f,d,p,h;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(s||void 0).decode(a)),d=0,t="",n&&(a.charCodeAt(0)===65279&&d++,n=void 0);d<a.length;){if(nu.lastIndex=d,l=nu.exec(a),p=l&&l.index!==void 0?l.index:a.length,h=a.charCodeAt(p),!l){t=a.slice(d);break}if(h===10&&d===p&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),d<p&&(u.push(a.slice(d,p)),e+=p-d),h){case 0:{u.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,u.push(-2);e++<f;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:r=!0,e=1}d=p+1}return o&&(r&&u.push(-5),t&&u.push(t),u.push(null)),u}}const _d={}.hasOwnProperty;function u_(e,t,n){return typeof t!="string"&&(n=t,t=void 0),l_(n)(s_(a_(n).document().write(o_()(e,t,!0))))}function l_(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(ne),autolinkProtocol:F,autolinkEmail:F,atxHeading:a(Nn),blockQuote:a(Ke),characterEscape:F,characterReference:F,codeFenced:a(ct),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:a(ct,s),codeText:a(At,s),codeTextData:F,data:F,codeFlowValue:F,definition:a(yi),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:a(wi),hardBreakEscape:a(nn),hardBreakTrailing:a(nn),htmlFlow:a(gr,s),htmlFlowData:F,htmlText:a(gr,s),htmlTextData:F,image:a(br),label:s,link:a(ne),listItem:a(Ct),listItemValue:p,listOrdered:a(Ce,d),listUnordered:a(Ce),paragraph:a(rn),reference:k,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:a(Nn),strong:a(Ai),thematicBreak:a(x0)},exit:{atxHeading:u(),atxHeadingSequence:P,autolink:u(),autolinkEmail:Qe,autolinkProtocol:Ge,blockQuote:u(),characterEscapeValue:I,characterReferenceMarkerHexadecimal:ze,characterReferenceMarkerNumeric:ze,characterReferenceValue:xe,characterReference:be,codeFenced:u(w),codeFencedFence:T,codeFencedFenceInfo:h,codeFencedFenceMeta:m,codeFlowValue:I,codeIndented:u(x),codeText:u(X),codeTextData:I,data:I,definition:u(),definitionDestinationString:O,definitionLabelString:S,definitionTitleString:C,emphasis:u(),hardBreakEscape:u(B),hardBreakTrailing:u(B),htmlFlow:u(Q),htmlFlowData:I,htmlText:u(ae),htmlTextData:I,image:u(ee),label:Ue,labelText:V,lineEnding:$,link:u(Z),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:he,resourceDestinationString:y,resourceTitleString:Le,resource:Pe,setextHeading:u(v),setextHeadingLineSequence:U,setextHeadingText:A,strong:u(),thematicBreak:u()}};kd(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(R){let z={type:"root",children:[]};const J={stack:[z],tokenStack:[],config:t,enter:o,exit:l,buffer:s,resume:f,data:n},oe=[];let pe=-1;for(;++pe<R.length;)if(R[pe][1].type==="listOrdered"||R[pe][1].type==="listUnordered")if(R[pe][0]==="enter")oe.push(pe);else{const at=oe.pop();pe=i(R,at,pe)}for(pe=-1;++pe<R.length;){const at=t[R[pe][0]];_d.call(at,R[pe][1].type)&&at[R[pe][1].type].call(Object.assign({sliceSerialize:R[pe][2].sliceSerialize},J),R[pe][1])}if(J.tokenStack.length>0){const at=J.tokenStack[J.tokenStack.length-1];(at[1]||ru).call(J,void 0,at[0])}for(z.position={start:It(R.length>0?R[0][1].start:{line:1,column:1,offset:0}),end:It(R.length>0?R[R.length-2][1].end:{line:1,column:1,offset:0})},pe=-1;++pe<t.transforms.length;)z=t.transforms[pe](z)||z;return z}function i(R,z,J){let oe=z-1,pe=-1,at=!1,Ut,Et,vn,Ln;for(;++oe<=J;){const Xe=R[oe];switch(Xe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Xe[0]==="enter"?pe++:pe--,Ln=void 0;break}case"lineEndingBlank":{Xe[0]==="enter"&&(Ut&&!Ln&&!pe&&!vn&&(vn=oe),Ln=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ln=void 0}if(!pe&&Xe[0]==="enter"&&Xe[1].type==="listItemPrefix"||pe===-1&&Xe[0]==="exit"&&(Xe[1].type==="listUnordered"||Xe[1].type==="listOrdered")){if(Ut){let an=oe;for(Et=void 0;an--;){const Tt=R[an];if(Tt[1].type==="lineEnding"||Tt[1].type==="lineEndingBlank"){if(Tt[0]==="exit")continue;Et&&(R[Et][1].type="lineEndingBlank",at=!0),Tt[1].type="lineEnding",Et=an}else if(!(Tt[1].type==="linePrefix"||Tt[1].type==="blockQuotePrefix"||Tt[1].type==="blockQuotePrefixWhitespace"||Tt[1].type==="blockQuoteMarker"||Tt[1].type==="listItemIndent"))break}vn&&(!Et||vn<Et)&&(Ut._spread=!0),Ut.end=Object.assign({},Et?R[Et][1].start:Xe[1].end),R.splice(Et||oe,0,["exit",Ut,Xe[2]]),oe++,J++}if(Xe[1].type==="listItemPrefix"){const an={type:"listItem",_spread:!1,start:Object.assign({},Xe[1].start),end:void 0};Ut=an,R.splice(oe,0,["enter",an,Xe[2]]),oe++,J++,vn=void 0,Ln=!0}}}return R[z][1]._spread=at,J}function a(R,z){return J;function J(oe){o.call(this,R(oe),oe),z&&z.call(this,oe)}}function s(){this.stack.push({type:"fragment",children:[]})}function o(R,z,J){this.stack[this.stack.length-1].children.push(R),this.stack.push(R),this.tokenStack.push([z,J||void 0]),R.position={start:It(z.start),end:void 0}}function u(R){return z;function z(J){R&&R.call(this,J),l.call(this,J)}}function l(R,z){const J=this.stack.pop(),oe=this.tokenStack.pop();if(oe)oe[0].type!==R.type&&(z?z.call(this,R,oe[0]):(oe[1]||ru).call(this,R,oe[0]));else throw new Error("Cannot close `"+R.type+"` ("+Kn({start:R.start,end:R.end})+"): it’s not open");J.position.end=It(R.end)}function f(){return Ja(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function p(R){if(this.data.expectingFirstListItemValue){const z=this.stack[this.stack.length-2];z.start=Number.parseInt(this.sliceSerialize(R),10),this.data.expectingFirstListItemValue=void 0}}function h(){const R=this.resume(),z=this.stack[this.stack.length-1];z.lang=R}function m(){const R=this.resume(),z=this.stack[this.stack.length-1];z.meta=R}function T(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function w(){const R=this.resume(),z=this.stack[this.stack.length-1];z.value=R.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function x(){const R=this.resume(),z=this.stack[this.stack.length-1];z.value=R.replace(/(\r?\n|\r)$/g,"")}function S(R){const z=this.resume(),J=this.stack[this.stack.length-1];J.label=z,J.identifier=ot(this.sliceSerialize(R)).toLowerCase()}function C(){const R=this.resume(),z=this.stack[this.stack.length-1];z.title=R}function O(){const R=this.resume(),z=this.stack[this.stack.length-1];z.url=R}function P(R){const z=this.stack[this.stack.length-1];if(!z.depth){const J=this.sliceSerialize(R).length;z.depth=J}}function A(){this.data.setextHeadingSlurpLineEnding=!0}function U(R){const z=this.stack[this.stack.length-1];z.depth=this.sliceSerialize(R).codePointAt(0)===61?1:2}function v(){this.data.setextHeadingSlurpLineEnding=void 0}function F(R){const J=this.stack[this.stack.length-1].children;let oe=J[J.length-1];(!oe||oe.type!=="text")&&(oe=k0(),oe.position={start:It(R.start),end:void 0},J.push(oe)),this.stack.push(oe)}function I(R){const z=this.stack.pop();z.value+=this.sliceSerialize(R),z.position.end=It(R.end)}function $(R){const z=this.stack[this.stack.length-1];if(this.data.atHardBreak){const J=z.children[z.children.length-1];J.position.end=It(R.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(z.type)&&(F.call(this,R),I.call(this,R))}function B(){this.data.atHardBreak=!0}function Q(){const R=this.resume(),z=this.stack[this.stack.length-1];z.value=R}function ae(){const R=this.resume(),z=this.stack[this.stack.length-1];z.value=R}function X(){const R=this.resume(),z=this.stack[this.stack.length-1];z.value=R}function Z(){const R=this.stack[this.stack.length-1];if(this.data.inReference){const z=this.data.referenceType||"shortcut";R.type+="Reference",R.referenceType=z,delete R.url,delete R.title}else delete R.identifier,delete R.label;this.data.referenceType=void 0}function ee(){const R=this.stack[this.stack.length-1];if(this.data.inReference){const z=this.data.referenceType||"shortcut";R.type+="Reference",R.referenceType=z,delete R.url,delete R.title}else delete R.identifier,delete R.label;this.data.referenceType=void 0}function V(R){const z=this.sliceSerialize(R),J=this.stack[this.stack.length-2];J.label=Rg(z),J.identifier=ot(z).toLowerCase()}function Ue(){const R=this.stack[this.stack.length-1],z=this.resume(),J=this.stack[this.stack.length-1];if(this.data.inReference=!0,J.type==="link"){const oe=R.children;J.children=oe}else J.alt=z}function y(){const R=this.resume(),z=this.stack[this.stack.length-1];z.url=R}function Le(){const R=this.resume(),z=this.stack[this.stack.length-1];z.title=R}function Pe(){this.data.inReference=void 0}function k(){this.data.referenceType="collapsed"}function he(R){const z=this.resume(),J=this.stack[this.stack.length-1];J.label=z,J.identifier=ot(this.sliceSerialize(R)).toLowerCase(),this.data.referenceType="full"}function ze(R){this.data.characterReferenceType=R.type}function xe(R){const z=this.sliceSerialize(R),J=this.data.characterReferenceType;let oe;J?(oe=Nc(z,J==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):oe=ts(z);const pe=this.stack[this.stack.length-1];pe.value+=oe}function be(R){const z=this.stack.pop();z.position.end=It(R.end)}function Ge(R){I.call(this,R);const z=this.stack[this.stack.length-1];z.url=this.sliceSerialize(R)}function Qe(R){I.call(this,R);const z=this.stack[this.stack.length-1];z.url="mailto:"+this.sliceSerialize(R)}function Ke(){return{type:"blockquote",children:[]}}function ct(){return{type:"code",lang:null,meta:null,value:""}}function At(){return{type:"inlineCode",value:""}}function yi(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function wi(){return{type:"emphasis",children:[]}}function Nn(){return{type:"heading",depth:0,children:[]}}function nn(){return{type:"break"}}function gr(){return{type:"html",value:""}}function br(){return{type:"image",title:null,url:"",alt:null}}function ne(){return{type:"link",title:null,url:"",children:[]}}function Ce(R){return{type:"list",ordered:R.type==="listOrdered",start:null,spread:R._spread,children:[]}}function Ct(R){return{type:"listItem",spread:R._spread,checked:null,children:[]}}function rn(){return{type:"paragraph",children:[]}}function Ai(){return{type:"strong",children:[]}}function k0(){return{type:"text",value:""}}function x0(){return{type:"thematicBreak"}}}function It(e){return{line:e.line,column:e.column,offset:e.offset}}function kd(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?kd(e,r):c_(e,r)}}function c_(e,t){let n;for(n in t)if(_d.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 ru(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Kn({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Kn({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Kn({start:t.start,end:t.end})+") is still open")}function d_(e){const t=this;t.parser=n;function n(r){return u_(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function f_(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 h_(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
38
|
+
`}]}function p_(e,t){const n=t.value?t.value+`
|
|
39
|
+
`:"",r={};t.lang&&(r.className=["language-"+t.lang]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}function m_(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function g_(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function b_(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Cn(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let s,o=e.footnoteCounts.get(r);o===void 0?(o=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=a+1,o+=1,e.footnoteCounts.set(r,o);const u={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,u);const l={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(t,l),e.applyData(t,l)}function E_(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 T_(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function xd(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),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&s.type==="text"?s.value+=r:i.push({type:"text",value:r}),i}function __(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return xd(e,t);const i={src:Cn(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function k_(e,t){const n={src:Cn(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 x_(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 y_(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return xd(e,t);const i={href:Cn(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function w_(e,t){const n={href:Cn(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 A_(e,t,n){const r=e.all(t),i=n?C_(n):yd(t),a={},s=[];if(typeof t.checked=="boolean"){const f=r[0];let d;f&&f.type==="element"&&f.tagName==="p"?d=f:(d={type:"element",tagName:"p",properties:{},children:[]},r.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let o=-1;for(;++o<r.length;){const f=r[o];(i||o!==0||f.type!=="element"||f.tagName!=="p")&&s.push({type:"text",value:`
|
|
40
|
+
`}),f.type==="element"&&f.tagName==="p"&&!i?s.push(...f.children):s.push(f)}const u=r[r.length-1];u&&(i||u.type!=="element"||u.tagName!=="p")&&s.push({type:"text",value:`
|
|
41
|
+
`});const l={type:"element",tagName:"li",properties:a,children:s};return e.patch(t,l),e.applyData(t,l)}function C_(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=yd(n[r])}return t}function yd(e){const t=e.spread;return t??e.children.length>1}function S_(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 s=r[i];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function I_(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function N_(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function v_(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function L_(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],s),i.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=gt(t.children[1]),u=hi(t.children[t.children.length-1]);o&&u&&(s.position={start:o,end:u}),i.push(s)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function R_(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,o=s?s.length:t.children.length;let u=-1;const l=[];for(;++u<o;){const d=t.children[u],p={},h=s?s[u]:void 0;h&&(p.align=h);let m={type:"element",tagName:a,properties:p,children:[]};d&&(m.children=e.all(d),e.patch(d,m),m=e.applyData(d,m)),l.push(m)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,f),e.applyData(t,f)}function O_(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const iu=9,au=32;function D_(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const a=[];for(;r;)a.push(su(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(su(t.slice(i),i>0,!1)),a.join("")}function su(e,t,n){let r=0,i=e.length;if(t){let a=e.codePointAt(r);for(;a===iu||a===au;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(i-1);for(;a===iu||a===au;)i--,a=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function P_(e,t){const n={type:"text",value:D_(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function M_(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const B_={blockquote:f_,break:h_,code:p_,delete:m_,emphasis:g_,footnoteReference:b_,heading:E_,html:T_,imageReference:__,image:k_,inlineCode:x_,linkReference:y_,link:w_,listItem:A_,list:S_,paragraph:I_,root:N_,strong:v_,table:L_,tableCell:O_,tableRow:R_,text:P_,thematicBreak:M_,toml:wr,yaml:wr,definition:wr,footnoteDefinition:wr};function wr(){}function F_(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 H_(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function U_(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||F_,r=e.options.footnoteBackLabel||H_,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let u=-1;for(;++u<e.footnoteOrder.length;){const l=e.footnoteById.get(e.footnoteOrder[u]);if(!l)continue;const f=e.all(l),d=String(l.identifier).toUpperCase(),p=Cn(d.toLowerCase());let h=0;const m=[],T=e.footnoteCounts.get(d);for(;T!==void 0&&++h<=T;){m.length>0&&m.push({type:"text",value:" "});let S=typeof n=="string"?n:n(u,h);typeof S=="string"&&(S={type:"text",value:S}),m.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(h>1?"-"+h:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(u,h),className:["data-footnote-backref"]},children:Array.isArray(S)?S:[S]})}const w=f[f.length-1];if(w&&w.type==="element"&&w.tagName==="p"){const S=w.children[w.children.length-1];S&&S.type==="text"?S.value+=" ":w.children.push({type:"text",value:" "}),w.children.push(...m)}else f.push(...m);const x={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(f,!0)};e.patch(l,x),o.push(x)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...Qt(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
42
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(o,!0)},{type:"text",value:`
|
|
43
|
+
`}]}}const xa={}.hasOwnProperty,z_={};function $_(e,t){const n=t||z_,r=new Map,i=new Map,a=new Map,s={...B_,...n.handlers},o={all:l,applyData:j_,definitionById:r,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:s,one:u,options:n,patch:Y_,wrap:V_};return gn(e,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){const d=f.type==="definition"?r:i,p=String(f.identifier).toUpperCase();d.has(p)||d.set(p,f)}}),o;function u(f,d){const p=f.type,h=o.handlers[p];if(xa.call(o.handlers,p)&&h)return h(o,f,d);if(o.options.passThrough&&o.options.passThrough.includes(p)){if("children"in f){const{children:T,...w}=f,x=Qt(w);return x.children=o.all(f),x}return Qt(f)}return(o.options.unknownHandler||q_)(o,f,d)}function l(f){const d=[];if("children"in f){const p=f.children;let h=-1;for(;++h<p.length;){const m=o.one(p[h],f);if(m){if(h&&p[h-1].type==="break"&&(!Array.isArray(m)&&m.type==="text"&&(m.value=ou(m.value)),!Array.isArray(m)&&m.type==="element")){const T=m.children[0];T&&T.type==="text"&&(T.value=ou(T.value))}Array.isArray(m)?d.push(...m):d.push(m)}}}return d}}function Y_(e,t){e.position&&(t.position=ac(e))}function j_(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const s="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:s}}n.type==="element"&&a&&Object.assign(n.properties,Qt(a)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function q_(e,t){const n=t.data||{},r="value"in t&&!(xa.call(n,"hProperties")||xa.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 V_(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
44
|
+
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
45
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
46
|
+
`}),n}function ou(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function uu(e,t){const n=$_(e,t),r=n.one(e,void 0),i=U_(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
|
|
47
|
+
`},i),a}function W_(e,t){return e&&"run"in e?async function(n,r){const i=uu(n,{file:r,...t});await e.run(i,r)}:function(n,r){return uu(n,{file:r,...e||t})}}function lu(e){if(e)throw e}var Mr=Object.prototype.hasOwnProperty,wd=Object.prototype.toString,cu=Object.defineProperty,du=Object.getOwnPropertyDescriptor,fu=function(t){return typeof Array.isArray=="function"?Array.isArray(t):wd.call(t)==="[object Array]"},hu=function(t){if(!t||wd.call(t)!=="[object Object]")return!1;var n=Mr.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Mr.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||Mr.call(t,i)},pu=function(t,n){cu&&n.name==="__proto__"?cu(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},mu=function(t,n){if(n==="__proto__")if(Mr.call(t,n)){if(du)return du(t,n).value}else return;return t[n]},G_=function e(){var t,n,r,i,a,s,o=arguments[0],u=1,l=arguments.length,f=!1;for(typeof o=="boolean"&&(f=o,o=arguments[1]||{},u=2),(o==null||typeof o!="object"&&typeof o!="function")&&(o={});u<l;++u)if(t=arguments[u],t!=null)for(n in t)r=mu(o,n),i=mu(t,n),o!==i&&(f&&i&&(hu(i)||(a=fu(i)))?(a?(a=!1,s=r&&fu(r)?r:[]):s=r&&hu(r)?r:{},pu(o,{name:n,newValue:e(f,s,i)})):typeof i<"u"&&pu(o,{name:n,newValue:i}));return o};const ji=hd(G_);function ya(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 Q_(){const e=[],t={run:n,use:r};return t;function n(...i){let a=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);o(null,...i);function o(u,...l){const f=e[++a];let d=-1;if(u){s(u);return}for(;++d<i.length;)(l[d]===null||l[d]===void 0)&&(l[d]=i[d]);i=l,f?K_(f,o)(...l):s(null,...l)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function K_(e,t){let n;return r;function r(...s){const o=e.length>s.length;let u;o&&s.push(i);try{u=e.apply(this,s)}catch(l){const f=l;if(o&&n)throw f;return i(f)}o||(u&&u.then&&typeof u.then=="function"?u.then(a,i):u instanceof Error?i(u):a(u))}function i(s,...o){n||(n=!0,t(s,...o))}function a(s){i(null,s)}}const dt={basename:X_,dirname:Z_,extname:J_,join:ek,sep:"/"};function X_(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');pr(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,o=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else s<0&&(a=!0,s=i+1),o>-1&&(e.codePointAt(i)===t.codePointAt(o--)?o<0&&(r=i):(o=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function Z_(e){if(pr(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 J_(e){pr(e);let t=e.length,n=-1,r=0,i=-1,a=0,s;for(;t--;){const o=e.codePointAt(t);if(o===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),o===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function ek(...e){let t=-1,n;for(;++t<e.length;)pr(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":tk(n)}function tk(e){pr(e);const t=e.codePointAt(0)===47;let n=nk(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function nk(e,t){let n="",r=0,i=-1,a=0,s=-1,o,u;for(;++s<=e.length;){if(s<e.length)o=e.codePointAt(s);else{if(o===47)break;o=47}if(o===47){if(!(i===s-1||a===1))if(i!==s-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(u=n.lastIndexOf("/"),u!==n.length-1){u<0?(n="",r=0):(n=n.slice(0,u),r=n.length-1-n.lastIndexOf("/")),i=s,a=0;continue}}else if(n.length>0){n="",r=0,i=s,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1;i=s,a=0}else o===46&&a>-1?a++:a=-1}return n}function pr(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const rk={cwd:ik};function ik(){return"/"}function wa(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function ak(e){if(typeof e=="string")e=new URL(e);else if(!wa(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 sk(e)}function sk(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 qi=["history","path","basename","stem","extname","dirname"];class ok{constructor(t){let n;t?wa(t)?n={path:t}:typeof t=="string"||uk(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":rk.cwd(),this.data={},this.history=[],this.messages=[];let r=-1;for(;++r<qi.length;){const a=qi[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let i;for(i in n)qi.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?dt.basename(this.path):void 0}set basename(t){Wi(t,"basename"),Vi(t,"basename"),this.path=dt.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?dt.dirname(this.path):void 0}set dirname(t){gu(this.basename,"dirname"),this.path=dt.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?dt.extname(this.path):void 0}set extname(t){if(Vi(t,"extname"),gu(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=dt.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){wa(t)&&(t=ak(t)),Wi(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?dt.basename(this.path,this.extname):void 0}set stem(t){Wi(t,"stem"),Vi(t,"stem"),this.path=dt.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 He(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 Vi(e,t){if(e&&e.includes(dt.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+dt.sep+"`")}function Wi(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function gu(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function uk(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const lk=function(e){const r=this.constructor.prototype,i=r[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,r),a},ck={}.hasOwnProperty;class cs extends lk{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=Q_()}copy(){const t=new cs;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(ji(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Ki("data",this.frozen),this.namespace[t]=n,this):ck.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Ki("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=Ar(t),r=this.parser||this.Parser;return Gi("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Gi("process",this.parser||this.Parser),Qi("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,s){const o=Ar(t),u=r.parse(o);r.run(u,o,function(f,d,p){if(f||!d||!p)return l(f);const h=d,m=r.stringify(h,p);hk(m)?p.value=m:p.result=m,l(f,p)});function l(f,d){f||!d?s(f):a?a(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),Gi("processSync",this.parser||this.Parser),Qi("processSync",this.compiler||this.Compiler),this.process(t,i),Eu("processSync","process",n),r;function i(a,s){n=!0,lu(a),r=s}}run(t,n,r){bu(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(s,o){const u=Ar(n);i.run(t,u,l);function l(f,d,p){const h=d||t;f?o(f):s?s(h):r(void 0,h,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,a),Eu("runSync","run",r),i;function a(s,o){lu(s),i=o,r=!0}}stringify(t,n){this.freeze();const r=Ar(n),i=this.compiler||this.Compiler;return Qi("stringify",i),bu(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Ki("use",this.frozen),t!=null)if(typeof t=="function")u(t,n);else if(typeof t=="object")Array.isArray(t)?o(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(l){if(typeof l=="function")u(l,[]);else if(typeof l=="object")if(Array.isArray(l)){const[f,...d]=l;u(f,d)}else s(l);else throw new TypeError("Expected usable value, not `"+l+"`")}function s(l){if(!("plugins"in l)&&!("settings"in l))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(l.plugins),l.settings&&(i.settings=ji(!0,i.settings,l.settings))}function o(l){let f=-1;if(l!=null)if(Array.isArray(l))for(;++f<l.length;){const d=l[f];a(d)}else throw new TypeError("Expected a list of plugins, not `"+l+"`")}function u(l,f){let d=-1,p=-1;for(;++d<r.length;)if(r[d][0]===l){p=d;break}if(p===-1)r.push([l,...f]);else if(f.length>0){let[h,...m]=f;const T=r[p][1];ya(T)&&ya(h)&&(h=ji(!0,T,h)),r[p]=[l,h,...m]}}}}const dk=new cs().freeze();function Gi(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Qi(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Ki(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 bu(e){if(!ya(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Eu(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Ar(e){return fk(e)?e:new ok(e)}function fk(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function hk(e){return typeof e=="string"||pk(e)}function pk(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}function ds(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var tn=ds();function Ad(e){tn=e}var Xn={exec:()=>null};function ce(e,t=""){let n=typeof e=="string"?e:e.source,r={replace:(i,a)=>{let s=typeof a=="string"?a:a.source;return s=s.replace(Ye.caret,"$1"),n=n.replace(i,s),r},getRegex:()=>new RegExp(n,t)};return r}var mk=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Ye={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},gk=/^(?:[ \t]*(?:\n|$))+/,bk=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Ek=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,mr=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Tk=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,fs=/(?:[*+-]|\d{1,9}[.)])/,Cd=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Sd=ce(Cd).replace(/bull/g,fs).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),_k=ce(Cd).replace(/bull/g,fs).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),hs=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,kk=/^[^\n]+/,ps=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,xk=ce(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",ps).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),yk=ce(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,fs).getRegex(),Ei="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ms=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,wk=ce("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",ms).replace("tag",Ei).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Id=ce(hs).replace("hr",mr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ei).getRegex(),Ak=ce(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Id).getRegex(),gs={blockquote:Ak,code:bk,def:xk,fences:Ek,heading:Tk,hr:mr,html:wk,lheading:Sd,list:yk,newline:gk,paragraph:Id,table:Xn,text:kk},Tu=ce("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",mr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ei).getRegex(),Ck={...gs,lheading:_k,table:Tu,paragraph:ce(hs).replace("hr",mr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Tu).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ei).getRegex()},Sk={...gs,html:ce(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ms).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Xn,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ce(hs).replace("hr",mr).replace("heading",` *#{1,6} *[^
|
|
48
|
+
]`).replace("lheading",Sd).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Ik=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Nk=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Nd=/^( {2,}|\\)\n(?!\s*$)/,vk=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Ti=/[\p{P}\p{S}]/u,bs=/[\s\p{P}\p{S}]/u,vd=/[^\s\p{P}\p{S}]/u,Lk=ce(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,bs).getRegex(),Ld=/(?!~)[\p{P}\p{S}]/u,Rk=/(?!~)[\s\p{P}\p{S}]/u,Ok=/(?:[^\s\p{P}\p{S}]|~)/u,Dk=ce(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",mk?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Rd=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Pk=ce(Rd,"u").replace(/punct/g,Ti).getRegex(),Mk=ce(Rd,"u").replace(/punct/g,Ld).getRegex(),Od="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Bk=ce(Od,"gu").replace(/notPunctSpace/g,vd).replace(/punctSpace/g,bs).replace(/punct/g,Ti).getRegex(),Fk=ce(Od,"gu").replace(/notPunctSpace/g,Ok).replace(/punctSpace/g,Rk).replace(/punct/g,Ld).getRegex(),Hk=ce("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,vd).replace(/punctSpace/g,bs).replace(/punct/g,Ti).getRegex(),Uk=ce(/\\(punct)/,"gu").replace(/punct/g,Ti).getRegex(),zk=ce(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),$k=ce(ms).replace("(?:-->|$)","-->").getRegex(),Yk=ce("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",$k).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Jr=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,jk=ce(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Jr).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Dd=ce(/^!?\[(label)\]\[(ref)\]/).replace("label",Jr).replace("ref",ps).getRegex(),Pd=ce(/^!?\[(ref)\](?:\[\])?/).replace("ref",ps).getRegex(),qk=ce("reflink|nolink(?!\\()","g").replace("reflink",Dd).replace("nolink",Pd).getRegex(),_u=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Es={_backpedal:Xn,anyPunctuation:Uk,autolink:zk,blockSkip:Dk,br:Nd,code:Nk,del:Xn,emStrongLDelim:Pk,emStrongRDelimAst:Bk,emStrongRDelimUnd:Hk,escape:Ik,link:jk,nolink:Pd,punctuation:Lk,reflink:Dd,reflinkSearch:qk,tag:Yk,text:vk,url:Xn},Vk={...Es,link:ce(/^!?\[(label)\]\((.*?)\)/).replace("label",Jr).getRegex(),reflink:ce(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Jr).getRegex()},Aa={...Es,emStrongRDelimAst:Fk,emStrongLDelim:Mk,url:ce(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",_u).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:ce(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",_u).getRegex()},Wk={...Aa,br:ce(Nd).replace("{2,}","*").getRegex(),text:ce(Aa.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Cr={normal:gs,gfm:Ck,pedantic:Sk},Bn={normal:Es,gfm:Aa,breaks:Wk,pedantic:Vk},Gk={"&":"&","<":"<",">":">",'"':""","'":"'"},ku=e=>Gk[e];function kt(e,t){if(t){if(Ye.escapeTest.test(e))return e.replace(Ye.escapeReplace,ku)}else if(Ye.escapeTestNoEncode.test(e))return e.replace(Ye.escapeReplaceNoEncode,ku);return e}function xu(e){try{e=encodeURI(e).replace(Ye.percentDecode,"%")}catch{return null}return e}function yu(e,t){var a;let n=e.replace(Ye.findPipe,(s,o,u)=>{let l=!1,f=o;for(;--f>=0&&u[f]==="\\";)l=!l;return l?"|":" |"}),r=n.split(Ye.splitPipe),i=0;if(r[0].trim()||r.shift(),r.length>0&&!((a=r.at(-1))!=null&&a.trim())&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(Ye.slashPipe,"|");return r}function Fn(e,t,n){let r=e.length;if(r===0)return"";let i=0;for(;i<r;){let a=e.charAt(r-i-1);if(a===t&&!n)i++;else if(a!==t&&n)i++;else break}return e.slice(0,r-i)}function Qk(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function wu(e,t,n,r,i){let a=t.href,s=t.title||null,o=e[1].replace(i.other.outputLinkReplace,"$1");r.state.inLink=!0;let u={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:a,title:s,text:o,tokens:r.inlineTokens(o)};return r.state.inLink=!1,u}function Kk(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
|
|
49
|
+
`).map(a=>{let s=a.match(n.other.beginningSpace);if(s===null)return a;let[o]=s;return o.length>=i.length?a.slice(i.length):a}).join(`
|
|
50
|
+
`)}var ei=class{constructor(e){de(this,"options");de(this,"rules");de(this,"lexer");this.options=e||tn}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:Fn(n,`
|
|
51
|
+
`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let n=t[0],r=Kk(n,t[3]||"",this.rules);return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:r}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(this.rules.other.endingHash.test(n)){let r=Fn(n,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(n=r.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:Fn(t[0],`
|
|
52
|
+
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let n=Fn(t[0],`
|
|
53
|
+
`).split(`
|
|
54
|
+
`),r="",i="",a=[];for(;n.length>0;){let s=!1,o=[],u;for(u=0;u<n.length;u++)if(this.rules.other.blockquoteStart.test(n[u]))o.push(n[u]),s=!0;else if(!s)o.push(n[u]);else break;n=n.slice(u);let l=o.join(`
|
|
55
|
+
`),f=l.replace(this.rules.other.blockquoteSetextReplace,`
|
|
56
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}
|
|
57
|
+
${l}`:l,i=i?`${i}
|
|
58
|
+
${f}`:f;let d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(f,a,!0),this.lexer.state.top=d,n.length===0)break;let p=a.at(-1);if((p==null?void 0:p.type)==="code")break;if((p==null?void 0:p.type)==="blockquote"){let h=p,m=h.raw+`
|
|
59
|
+
`+n.join(`
|
|
60
|
+
`),T=this.blockquote(m);a[a.length-1]=T,r=r.substring(0,r.length-h.raw.length)+T.raw,i=i.substring(0,i.length-h.text.length)+T.text;break}else if((p==null?void 0:p.type)==="list"){let h=p,m=h.raw+`
|
|
61
|
+
`+n.join(`
|
|
62
|
+
`),T=this.list(m);a[a.length-1]=T,r=r.substring(0,r.length-p.raw.length)+T.raw,i=i.substring(0,i.length-h.raw.length)+T.raw,n=m.substring(a.at(-1).raw.length).split(`
|
|
63
|
+
`);continue}}return{type:"blockquote",raw:r,tokens:a,text:i}}}list(e){var n,r;let t=this.rules.block.list.exec(e);if(t){let i=t[1].trim(),a=i.length>1,s={type:"list",raw:"",ordered:a,start:a?+i.slice(0,-1):"",loose:!1,items:[]};i=a?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=a?i:"[*+-]");let o=this.rules.other.listItemRegex(i),u=!1;for(;e;){let f=!1,d="",p="";if(!(t=o.exec(e))||this.rules.block.hr.test(e))break;d=t[0],e=e.substring(d.length);let h=t[2].split(`
|
|
64
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,x=>" ".repeat(3*x.length)),m=e.split(`
|
|
65
|
+
`,1)[0],T=!h.trim(),w=0;if(this.options.pedantic?(w=2,p=h.trimStart()):T?w=t[1].length+1:(w=t[2].search(this.rules.other.nonSpaceChar),w=w>4?1:w,p=h.slice(w),w+=t[1].length),T&&this.rules.other.blankLine.test(m)&&(d+=m+`
|
|
66
|
+
`,e=e.substring(m.length+1),f=!0),!f){let x=this.rules.other.nextBulletRegex(w),S=this.rules.other.hrRegex(w),C=this.rules.other.fencesBeginRegex(w),O=this.rules.other.headingBeginRegex(w),P=this.rules.other.htmlBeginRegex(w);for(;e;){let A=e.split(`
|
|
67
|
+
`,1)[0],U;if(m=A,this.options.pedantic?(m=m.replace(this.rules.other.listReplaceNesting," "),U=m):U=m.replace(this.rules.other.tabCharGlobal," "),C.test(m)||O.test(m)||P.test(m)||x.test(m)||S.test(m))break;if(U.search(this.rules.other.nonSpaceChar)>=w||!m.trim())p+=`
|
|
68
|
+
`+U.slice(w);else{if(T||h.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||C.test(h)||O.test(h)||S.test(h))break;p+=`
|
|
69
|
+
`+m}!T&&!m.trim()&&(T=!0),d+=A+`
|
|
70
|
+
`,e=e.substring(A.length+1),h=U.slice(w)}}s.loose||(u?s.loose=!0:this.rules.other.doubleBlankLine.test(d)&&(u=!0)),s.items.push({type:"list_item",raw:d,task:!!this.options.gfm&&this.rules.other.listIsTask.test(p),loose:!1,text:p,tokens:[]}),s.raw+=d}let l=s.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;s.raw=s.raw.trimEnd();for(let f of s.items){if(this.lexer.state.top=!1,f.tokens=this.lexer.blockTokens(f.text,[]),f.task){if(f.text=f.text.replace(this.rules.other.listReplaceTask,""),((n=f.tokens[0])==null?void 0:n.type)==="text"||((r=f.tokens[0])==null?void 0:r.type)==="paragraph"){f.tokens[0].raw=f.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),f.tokens[0].text=f.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let p=this.lexer.inlineQueue.length-1;p>=0;p--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[p].src)){this.lexer.inlineQueue[p].src=this.lexer.inlineQueue[p].src.replace(this.rules.other.listReplaceTask,"");break}}let d=this.rules.other.listTaskCheckbox.exec(f.raw);if(d){let p={type:"checkbox",raw:d[0]+" ",checked:d[0]!=="[ ]"};f.checked=p.checked,s.loose?f.tokens[0]&&["paragraph","text"].includes(f.tokens[0].type)&&"tokens"in f.tokens[0]&&f.tokens[0].tokens?(f.tokens[0].raw=p.raw+f.tokens[0].raw,f.tokens[0].text=p.raw+f.tokens[0].text,f.tokens[0].tokens.unshift(p)):f.tokens.unshift({type:"paragraph",raw:p.raw,text:p.raw,tokens:[p]}):f.tokens.unshift(p)}}if(!s.loose){let d=f.tokens.filter(h=>h.type==="space"),p=d.length>0&&d.some(h=>this.rules.other.anyLine.test(h.raw));s.loose=p}}if(s.loose)for(let f of s.items){f.loose=!0;for(let d of f.tokens)d.type==="text"&&(d.type="paragraph")}return s}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let n=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:t[0],href:r,title:i}}}table(e){var s;let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=yu(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=(s=t[3])!=null&&s.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
71
|
+
`):[],a={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let o of r)this.rules.other.tableAlignRight.test(o)?a.align.push("right"):this.rules.other.tableAlignCenter.test(o)?a.align.push("center"):this.rules.other.tableAlignLeft.test(o)?a.align.push("left"):a.align.push(null);for(let o=0;o<n.length;o++)a.header.push({text:n[o],tokens:this.lexer.inline(n[o]),header:!0,align:a.align[o]});for(let o of i)a.rows.push(yu(o,a.header.length).map((u,l)=>({text:u,tokens:this.lexer.inline(u),header:!1,align:a.align[l]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let n=t[1].charAt(t[1].length-1)===`
|
|
72
|
+
`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let a=Fn(n.slice(0,-1),"\\");if((n.length-a.length)%2===0)return}else{let a=Qk(t[2],"()");if(a===-2)return;if(a>-1){let s=(t[0].indexOf("!")===0?5:4)+t[1].length+a;t[2]=t[2].substring(0,a),t[0]=t[0].substring(0,s).trim(),t[3]=""}}let r=t[2],i="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(r);a&&(r=a[1],i=a[3])}else i=t[3]?t[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?r=r.slice(1):r=r.slice(1,-1)),wu(t,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let r=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=t[r.toLowerCase()];if(!i){let a=n[0].charAt(0);return{type:"text",raw:a,text:a}}return wu(n,i,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[2])||!n||this.rules.inline.punctuation.exec(n))){let i=[...r[0]].length-1,a,s,o=i,u=0,l=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,t=t.slice(-1*e.length+i);(r=l.exec(t))!=null;){if(a=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!a)continue;if(s=[...a].length,r[3]||r[4]){o+=s;continue}else if((r[5]||r[6])&&i%3&&!((i+s)%3)){u+=s;continue}if(o-=s,o>0)continue;s=Math.min(s,s+o+u);let f=[...r[0]][0].length,d=e.slice(0,i+r.index+f+s);if(Math.min(i,s)%2){let h=d.slice(1,-1);return{type:"em",raw:d,text:h,tokens:this.lexer.inlineTokens(h)}}let p=d.slice(2,-2);return{type:"strong",raw:d,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(n),i=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return r&&i&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){let t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let n,r;return t[2]==="@"?(n=t[1],r="mailto:"+n):(n=t[1],r=n),{type:"link",raw:t[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}url(e){var n;let t;if(t=this.rules.inline.url.exec(e)){let r,i;if(t[2]==="@")r=t[0],i="mailto:"+r;else{let a;do a=t[0],t[0]=((n=this.rules.inline._backpedal.exec(t[0]))==null?void 0:n[0])??"";while(a!==t[0]);r=t[0],t[1]==="www."?i="http://"+t[0]:i=t[0]}return{type:"link",raw:t[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let n=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:n}}}},st=class Ca{constructor(t){de(this,"tokens");de(this,"options");de(this,"state");de(this,"inlineQueue");de(this,"tokenizer");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||tn,this.options.tokenizer=this.options.tokenizer||new ei,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:Ye,block:Cr.normal,inline:Bn.normal};this.options.pedantic?(n.block=Cr.pedantic,n.inline=Bn.pedantic):this.options.gfm&&(n.block=Cr.gfm,this.options.breaks?n.inline=Bn.breaks:n.inline=Bn.gfm),this.tokenizer.rules=n}static get rules(){return{block:Cr,inline:Bn}}static lex(t,n){return new Ca(n).lex(t)}static lexInline(t,n){return new Ca(n).inlineTokens(t)}lex(t){t=t.replace(Ye.carriageReturn,`
|
|
73
|
+
`),this.blockTokens(t,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let r=this.inlineQueue[n];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,n=[],r=!1){var i,a,s;for(this.options.pedantic&&(t=t.replace(Ye.tabCharGlobal," ").replace(Ye.spaceLine,""));t;){let o;if((a=(i=this.options.extensions)==null?void 0:i.block)!=null&&a.some(l=>(o=l.call({lexer:this},t,n))?(t=t.substring(o.raw.length),n.push(o),!0):!1))continue;if(o=this.tokenizer.space(t)){t=t.substring(o.raw.length);let l=n.at(-1);o.raw.length===1&&l!==void 0?l.raw+=`
|
|
74
|
+
`:n.push(o);continue}if(o=this.tokenizer.code(t)){t=t.substring(o.raw.length);let l=n.at(-1);(l==null?void 0:l.type)==="paragraph"||(l==null?void 0:l.type)==="text"?(l.raw+=(l.raw.endsWith(`
|
|
75
|
+
`)?"":`
|
|
76
|
+
`)+o.raw,l.text+=`
|
|
77
|
+
`+o.text,this.inlineQueue.at(-1).src=l.text):n.push(o);continue}if(o=this.tokenizer.fences(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.heading(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.hr(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.blockquote(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.list(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.html(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.def(t)){t=t.substring(o.raw.length);let l=n.at(-1);(l==null?void 0:l.type)==="paragraph"||(l==null?void 0:l.type)==="text"?(l.raw+=(l.raw.endsWith(`
|
|
78
|
+
`)?"":`
|
|
79
|
+
`)+o.raw,l.text+=`
|
|
80
|
+
`+o.raw,this.inlineQueue.at(-1).src=l.text):this.tokens.links[o.tag]||(this.tokens.links[o.tag]={href:o.href,title:o.title},n.push(o));continue}if(o=this.tokenizer.table(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.lheading(t)){t=t.substring(o.raw.length),n.push(o);continue}let u=t;if((s=this.options.extensions)!=null&&s.startBlock){let l=1/0,f=t.slice(1),d;this.options.extensions.startBlock.forEach(p=>{d=p.call({lexer:this},f),typeof d=="number"&&d>=0&&(l=Math.min(l,d))}),l<1/0&&l>=0&&(u=t.substring(0,l+1))}if(this.state.top&&(o=this.tokenizer.paragraph(u))){let l=n.at(-1);r&&(l==null?void 0:l.type)==="paragraph"?(l.raw+=(l.raw.endsWith(`
|
|
81
|
+
`)?"":`
|
|
82
|
+
`)+o.raw,l.text+=`
|
|
83
|
+
`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):n.push(o),r=u.length!==t.length,t=t.substring(o.raw.length);continue}if(o=this.tokenizer.text(t)){t=t.substring(o.raw.length);let l=n.at(-1);(l==null?void 0:l.type)==="text"?(l.raw+=(l.raw.endsWith(`
|
|
84
|
+
`)?"":`
|
|
85
|
+
`)+o.raw,l.text+=`
|
|
86
|
+
`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):n.push(o);continue}if(t){let l="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){var u,l,f,d,p;let r=t,i=null;if(this.tokens.links){let h=Object.keys(this.tokens.links);if(h.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(r))!=null;)h.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(i=this.tokenizer.rules.inline.anyPunctuation.exec(r))!=null;)r=r.slice(0,i.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a;for(;(i=this.tokenizer.rules.inline.blockSkip.exec(r))!=null;)a=i[2]?i[2].length:0,r=r.slice(0,i.index+a)+"["+"a".repeat(i[0].length-a-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);r=((l=(u=this.options.hooks)==null?void 0:u.emStrongMask)==null?void 0:l.call({lexer:this},r))??r;let s=!1,o="";for(;t;){s||(o=""),s=!1;let h;if((d=(f=this.options.extensions)==null?void 0:f.inline)!=null&&d.some(T=>(h=T.call({lexer:this},t,n))?(t=t.substring(h.raw.length),n.push(h),!0):!1))continue;if(h=this.tokenizer.escape(t)){t=t.substring(h.raw.length),n.push(h);continue}if(h=this.tokenizer.tag(t)){t=t.substring(h.raw.length),n.push(h);continue}if(h=this.tokenizer.link(t)){t=t.substring(h.raw.length),n.push(h);continue}if(h=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(h.raw.length);let T=n.at(-1);h.type==="text"&&(T==null?void 0:T.type)==="text"?(T.raw+=h.raw,T.text+=h.text):n.push(h);continue}if(h=this.tokenizer.emStrong(t,r,o)){t=t.substring(h.raw.length),n.push(h);continue}if(h=this.tokenizer.codespan(t)){t=t.substring(h.raw.length),n.push(h);continue}if(h=this.tokenizer.br(t)){t=t.substring(h.raw.length),n.push(h);continue}if(h=this.tokenizer.del(t)){t=t.substring(h.raw.length),n.push(h);continue}if(h=this.tokenizer.autolink(t)){t=t.substring(h.raw.length),n.push(h);continue}if(!this.state.inLink&&(h=this.tokenizer.url(t))){t=t.substring(h.raw.length),n.push(h);continue}let m=t;if((p=this.options.extensions)!=null&&p.startInline){let T=1/0,w=t.slice(1),x;this.options.extensions.startInline.forEach(S=>{x=S.call({lexer:this},w),typeof x=="number"&&x>=0&&(T=Math.min(T,x))}),T<1/0&&T>=0&&(m=t.substring(0,T+1))}if(h=this.tokenizer.inlineText(m)){t=t.substring(h.raw.length),h.raw.slice(-1)!=="_"&&(o=h.raw.slice(-1)),s=!0;let T=n.at(-1);(T==null?void 0:T.type)==="text"?(T.raw+=h.raw,T.text+=h.text):n.push(h);continue}if(t){let T="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(T);break}else throw new Error(T)}}return n}},ti=class{constructor(e){de(this,"options");de(this,"parser");this.options=e||tn}space(e){return""}code({text:e,lang:t,escaped:n}){var a;let r=(a=(t||"").match(Ye.notSpaceStart))==null?void 0:a[0],i=e.replace(Ye.endingNewline,"")+`
|
|
87
|
+
`;return r?'<pre><code class="language-'+kt(r)+'">'+(n?i:kt(i,!0))+`</code></pre>
|
|
88
|
+
`:"<pre><code>"+(n?i:kt(i,!0))+`</code></pre>
|
|
89
|
+
`}blockquote({tokens:e}){return`<blockquote>
|
|
90
|
+
${this.parser.parse(e)}</blockquote>
|
|
91
|
+
`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
92
|
+
`}hr(e){return`<hr>
|
|
93
|
+
`}list(e){let t=e.ordered,n=e.start,r="";for(let s=0;s<e.items.length;s++){let o=e.items[s];r+=this.listitem(o)}let i=t?"ol":"ul",a=t&&n!==1?' start="'+n+'"':"";return"<"+i+a+`>
|
|
94
|
+
`+r+"</"+i+`>
|
|
95
|
+
`}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
|
|
96
|
+
`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
|
97
|
+
`}table(e){let t="",n="";for(let i=0;i<e.header.length;i++)n+=this.tablecell(e.header[i]);t+=this.tablerow({text:n});let r="";for(let i=0;i<e.rows.length;i++){let a=e.rows[i];n="";for(let s=0;s<a.length;s++)n+=this.tablecell(a[s]);r+=this.tablerow({text:n})}return r&&(r=`<tbody>${r}</tbody>`),`<table>
|
|
98
|
+
<thead>
|
|
99
|
+
`+t+`</thead>
|
|
100
|
+
`+r+`</table>
|
|
101
|
+
`}tablerow({text:e}){return`<tr>
|
|
102
|
+
${e}</tr>
|
|
103
|
+
`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
|
|
104
|
+
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${kt(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=xu(e);if(i===null)return r;e=i;let a='<a href="'+e+'"';return t&&(a+=' title="'+kt(t)+'"'),a+=">"+r+"</a>",a}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=xu(e);if(i===null)return kt(n);e=i;let a=`<img src="${e}" alt="${n}"`;return t&&(a+=` title="${kt(t)}"`),a+=">",a}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:kt(e.text)}},Ts=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},ht=class Sa{constructor(t){de(this,"options");de(this,"renderer");de(this,"textRenderer");this.options=t||tn,this.options.renderer=this.options.renderer||new ti,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Ts}static parse(t,n){return new Sa(n).parse(t)}static parseInline(t,n){return new Sa(n).parseInline(t)}parse(t){var r,i;let n="";for(let a=0;a<t.length;a++){let s=t[a];if((i=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&i[s.type]){let u=s,l=this.options.extensions.renderers[u.type].call({parser:this},u);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(u.type)){n+=l||"";continue}}let o=s;switch(o.type){case"space":{n+=this.renderer.space(o);break}case"hr":{n+=this.renderer.hr(o);break}case"heading":{n+=this.renderer.heading(o);break}case"code":{n+=this.renderer.code(o);break}case"table":{n+=this.renderer.table(o);break}case"blockquote":{n+=this.renderer.blockquote(o);break}case"list":{n+=this.renderer.list(o);break}case"checkbox":{n+=this.renderer.checkbox(o);break}case"html":{n+=this.renderer.html(o);break}case"def":{n+=this.renderer.def(o);break}case"paragraph":{n+=this.renderer.paragraph(o);break}case"text":{n+=this.renderer.text(o);break}default:{let u='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(u),"";throw new Error(u)}}}return n}parseInline(t,n=this.renderer){var i,a;let r="";for(let s=0;s<t.length;s++){let o=t[s];if((a=(i=this.options.extensions)==null?void 0:i.renderers)!=null&&a[o.type]){let l=this.options.extensions.renderers[o.type].call({parser:this},o);if(l!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){r+=l||"";continue}}let u=o;switch(u.type){case"escape":{r+=n.text(u);break}case"html":{r+=n.html(u);break}case"link":{r+=n.link(u);break}case"image":{r+=n.image(u);break}case"checkbox":{r+=n.checkbox(u);break}case"strong":{r+=n.strong(u);break}case"em":{r+=n.em(u);break}case"codespan":{r+=n.codespan(u);break}case"br":{r+=n.br(u);break}case"del":{r+=n.del(u);break}case"text":{r+=n.text(u);break}default:{let l='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return r}},Nr,zn=(Nr=class{constructor(e){de(this,"options");de(this,"block");this.options=e||tn}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?st.lex:st.lexInline}provideParser(){return this.block?ht.parse:ht.parseInline}},de(Nr,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),de(Nr,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Nr),Xk=class{constructor(...t){de(this,"defaults",ds());de(this,"options",this.setOptions);de(this,"parse",this.parseMarkdown(!0));de(this,"parseInline",this.parseMarkdown(!1));de(this,"Parser",ht);de(this,"Renderer",ti);de(this,"TextRenderer",Ts);de(this,"Lexer",st);de(this,"Tokenizer",ei);de(this,"Hooks",zn);this.use(...t)}walkTokens(t,n){var i,a;let r=[];for(let s of t)switch(r=r.concat(n.call(this,s)),s.type){case"table":{let o=s;for(let u of o.header)r=r.concat(this.walkTokens(u.tokens,n));for(let u of o.rows)for(let l of u)r=r.concat(this.walkTokens(l.tokens,n));break}case"list":{let o=s;r=r.concat(this.walkTokens(o.items,n));break}default:{let o=s;(a=(i=this.defaults.extensions)==null?void 0:i.childTokens)!=null&&a[o.type]?this.defaults.extensions.childTokens[o.type].forEach(u=>{let l=o[u].flat(1/0);r=r.concat(this.walkTokens(l,n))}):o.tokens&&(r=r.concat(this.walkTokens(o.tokens,n)))}}return r}use(...t){let n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{let i={...r};if(i.async=this.defaults.async||i.async||!1,r.extensions&&(r.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let s=n.renderers[a.name];s?n.renderers[a.name]=function(...o){let u=a.renderer.apply(this,o);return u===!1&&(u=s.apply(this,o)),u}:n.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let s=n[a.level];s?s.unshift(a.tokenizer):n[a.level]=[a.tokenizer],a.start&&(a.level==="block"?n.startBlock?n.startBlock.push(a.start):n.startBlock=[a.start]:a.level==="inline"&&(n.startInline?n.startInline.push(a.start):n.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(n.childTokens[a.name]=a.childTokens)}),i.extensions=n),r.renderer){let a=this.defaults.renderer||new ti(this.defaults);for(let s in r.renderer){if(!(s in a))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;let o=s,u=r.renderer[o],l=a[o];a[o]=(...f)=>{let d=u.apply(a,f);return d===!1&&(d=l.apply(a,f)),d||""}}i.renderer=a}if(r.tokenizer){let a=this.defaults.tokenizer||new ei(this.defaults);for(let s in r.tokenizer){if(!(s in a))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let o=s,u=r.tokenizer[o],l=a[o];a[o]=(...f)=>{let d=u.apply(a,f);return d===!1&&(d=l.apply(a,f)),d}}i.tokenizer=a}if(r.hooks){let a=this.defaults.hooks||new zn;for(let s in r.hooks){if(!(s in a))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;let o=s,u=r.hooks[o],l=a[o];zn.passThroughHooks.has(s)?a[o]=f=>{if(this.defaults.async&&zn.passThroughHooksRespectAsync.has(s))return(async()=>{let p=await u.call(a,f);return l.call(a,p)})();let d=u.call(a,f);return l.call(a,d)}:a[o]=(...f)=>{if(this.defaults.async)return(async()=>{let p=await u.apply(a,f);return p===!1&&(p=await l.apply(a,f)),p})();let d=u.apply(a,f);return d===!1&&(d=l.apply(a,f)),d}}i.hooks=a}if(r.walkTokens){let a=this.defaults.walkTokens,s=r.walkTokens;i.walkTokens=function(o){let u=[];return u.push(s.call(this,o)),a&&(u=u.concat(a.call(this,o))),u}}this.defaults={...this.defaults,...i}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,n){return st.lex(t,n??this.defaults)}parser(t,n){return ht.parse(t,n??this.defaults)}parseMarkdown(t){return(n,r)=>{let i={...r},a={...this.defaults,...i},s=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&i.async===!1)return s(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof n>"u"||n===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(a.hooks&&(a.hooks.options=a,a.hooks.block=t),a.async)return(async()=>{let o=a.hooks?await a.hooks.preprocess(n):n,u=await(a.hooks?await a.hooks.provideLexer():t?st.lex:st.lexInline)(o,a),l=a.hooks?await a.hooks.processAllTokens(u):u;a.walkTokens&&await Promise.all(this.walkTokens(l,a.walkTokens));let f=await(a.hooks?await a.hooks.provideParser():t?ht.parse:ht.parseInline)(l,a);return a.hooks?await a.hooks.postprocess(f):f})().catch(s);try{a.hooks&&(n=a.hooks.preprocess(n));let o=(a.hooks?a.hooks.provideLexer():t?st.lex:st.lexInline)(n,a);a.hooks&&(o=a.hooks.processAllTokens(o)),a.walkTokens&&this.walkTokens(o,a.walkTokens);let u=(a.hooks?a.hooks.provideParser():t?ht.parse:ht.parseInline)(o,a);return a.hooks&&(u=a.hooks.postprocess(u)),u}catch(o){return s(o)}}}onError(t,n){return r=>{if(r.message+=`
|
|
105
|
+
Please report this to https://github.com/markedjs/marked.`,t){let i="<p>An error occurred:</p><pre>"+kt(r.message+"",!0)+"</pre>";return n?Promise.resolve(i):i}if(n)return Promise.reject(r);throw r}}},Xt=new Xk;function ke(e,t){return Xt.parse(e,t)}ke.options=ke.setOptions=function(e){return Xt.setOptions(e),ke.defaults=Xt.defaults,Ad(ke.defaults),ke};ke.getDefaults=ds;ke.defaults=tn;ke.use=function(...e){return Xt.use(...e),ke.defaults=Xt.defaults,Ad(ke.defaults),ke};ke.walkTokens=function(e,t){return Xt.walkTokens(e,t)};ke.parseInline=Xt.parseInline;ke.Parser=ht;ke.parser=ht.parse;ke.Renderer=ti;ke.TextRenderer=Ts;ke.Lexer=st;ke.lexer=st.lex;ke.Tokenizer=ei;ke.Hooks=zn;ke.parse=ke;var Zk=300,Jk="300px",ex=500;function tx(e={}){let{immediate:t=!1,debounceDelay:n=Zk,rootMargin:r=Jk,idleTimeout:i=ex}=e,[a,s]=le(!1),o=Oe(null),u=Oe(null),l=Oe(null),f=Re(()=>h=>{let m=Date.now();return window.setTimeout(()=>{h({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-m))})},1)},[]),d=Re(()=>typeof window<"u"&&window.requestIdleCallback?(h,m)=>window.requestIdleCallback(h,m):f,[f]),p=Re(()=>typeof window<"u"&&window.cancelIdleCallback?h=>window.cancelIdleCallback(h):h=>{clearTimeout(h)},[]);return Ae(()=>{if(t){s(!0);return}let h=o.current;if(!h)return;u.current&&(clearTimeout(u.current),u.current=null),l.current&&(p(l.current),l.current=null);let m=()=>{u.current&&(clearTimeout(u.current),u.current=null),l.current&&(p(l.current),l.current=null)},T=C=>{l.current=d(O=>{O.timeRemaining()>0||O.didTimeout?(s(!0),C.disconnect()):l.current=d(()=>{s(!0),C.disconnect()},{timeout:i/2})},{timeout:i})},w=C=>{m(),u.current=window.setTimeout(()=>{var O,P;let A=C.takeRecords();(A.length===0||(P=(O=A.at(-1))==null?void 0:O.isIntersecting)!=null&&P)&&T(C)},n)},x=(C,O)=>{C.isIntersecting?w(O):m()},S=new IntersectionObserver(C=>{for(let O of C)x(O,S)},{rootMargin:r,threshold:0});return S.observe(h),()=>{u.current&&clearTimeout(u.current),l.current&&p(l.current),S.disconnect()}},[t,n,r,i,p,d]),{shouldRender:a,containerRef:o}}var _s=e=>b("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:b("path",{clipRule:"evenodd",d:"M15.5607 3.99999L15.0303 4.53032L6.23744 13.3232C5.55403 14.0066 4.44599 14.0066 3.76257 13.3232L4.2929 12.7929L3.76257 13.3232L0.969676 10.5303L0.439346 9.99999L1.50001 8.93933L2.03034 9.46966L4.82323 12.2626C4.92086 12.3602 5.07915 12.3602 5.17678 12.2626L13.9697 3.46966L14.5 2.93933L15.5607 3.99999Z",fill:"currentColor",fillRule:"evenodd"})}),ks=e=>b("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:b("path",{clipRule:"evenodd",d:"M2.75 0.5C1.7835 0.5 1 1.2835 1 2.25V9.75C1 10.7165 1.7835 11.5 2.75 11.5H3.75H4.5V10H3.75H2.75C2.61193 10 2.5 9.88807 2.5 9.75V2.25C2.5 2.11193 2.61193 2 2.75 2H8.25C8.38807 2 8.5 2.11193 8.5 2.25V3H10V2.25C10 1.2835 9.2165 0.5 8.25 0.5H2.75ZM7.75 4.5C6.7835 4.5 6 5.2835 6 6.25V13.75C6 14.7165 6.7835 15.5 7.75 15.5H13.25C14.2165 15.5 15 14.7165 15 13.75V6.25C15 5.2835 14.2165 4.5 13.25 4.5H7.75ZM7.5 6.25C7.5 6.11193 7.61193 6 7.75 6H13.25C13.3881 6 13.5 6.11193 13.5 6.25V13.75C13.5 13.8881 13.3881 14 13.25 14H7.75C7.61193 14 7.5 13.8881 7.5 13.75V6.25Z",fill:"currentColor",fillRule:"evenodd"})}),_i=e=>b("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:b("path",{clipRule:"evenodd",d:"M8.75 1V1.75V8.68934L10.7197 6.71967L11.25 6.18934L12.3107 7.25L11.7803 7.78033L8.70711 10.8536C8.31658 11.2441 7.68342 11.2441 7.29289 10.8536L4.21967 7.78033L3.68934 7.25L4.75 6.18934L5.28033 6.71967L7.25 8.68934V1.75V1H8.75ZM13.5 9.25V13.5H2.5V9.25V8.5H1V9.25V14C1 14.5523 1.44771 15 2 15H14C14.5523 15 15 14.5523 15 14V9.25V8.5H13.5V9.25Z",fill:"currentColor",fillRule:"evenodd"})}),nx=e=>b("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:[b("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),b("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),b("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),b("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),b("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),b("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),b("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),b("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),b("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),b("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),rx=e=>b("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:b("path",{clipRule:"evenodd",d:"M1 5.25V6H2.5V5.25V2.5H5.25H6V1H5.25H2C1.44772 1 1 1.44772 1 2V5.25ZM5.25 14.9994H6V13.4994H5.25H2.5V10.7494V9.99939H1V10.7494V13.9994C1 14.5517 1.44772 14.9994 2 14.9994H5.25ZM15 10V10.75V14C15 14.5523 14.5523 15 14 15H10.75H10V13.5H10.75H13.5V10.75V10H15ZM10.75 1H10V2.5H10.75H13.5V5.25V6H15V5.25V2C15 1.44772 14.5523 1 14 1H10.75Z",fill:"currentColor",fillRule:"evenodd"})}),ix=e=>b("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:b("path",{clipRule:"evenodd",d:"M13.5 8C13.5 4.96643 11.0257 2.5 7.96452 2.5C5.42843 2.5 3.29365 4.19393 2.63724 6.5H5.25H6V8H5.25H0.75C0.335787 8 0 7.66421 0 7.25V2.75V2H1.5V2.75V5.23347C2.57851 2.74164 5.06835 1 7.96452 1C11.8461 1 15 4.13001 15 8C15 11.87 11.8461 15 7.96452 15C5.62368 15 3.54872 13.8617 2.27046 12.1122L1.828 11.5066L3.03915 10.6217L3.48161 11.2273C4.48831 12.6051 6.12055 13.5 7.96452 13.5C11.0257 13.5 13.5 11.0336 13.5 8Z",fill:"currentColor",fillRule:"evenodd"})}),Md=e=>b("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:b("path",{clipRule:"evenodd",d:"M12.4697 13.5303L13 14.0607L14.0607 13L13.5303 12.4697L9.06065 7.99999L13.5303 3.53032L14.0607 2.99999L13 1.93933L12.4697 2.46966L7.99999 6.93933L3.53032 2.46966L2.99999 1.93933L1.93933 2.99999L2.46966 3.53032L6.93933 7.99999L2.46966 12.4697L1.93933 13L2.99999 14.0607L3.53032 13.5303L7.99999 9.06065L12.4697 13.5303Z",fill:"currentColor",fillRule:"evenodd"})}),Au=e=>b("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:b("path",{clipRule:"evenodd",d:"M13.5 10.25V13.25C13.5 13.3881 13.3881 13.5 13.25 13.5H2.75C2.61193 13.5 2.5 13.3881 2.5 13.25L2.5 2.75C2.5 2.61193 2.61193 2.5 2.75 2.5H5.75H6.5V1H5.75H2.75C1.7835 1 1 1.7835 1 2.75V13.25C1 14.2165 1.7835 15 2.75 15H13.25C14.2165 15 15 14.2165 15 13.25V10.25V9.5H13.5V10.25ZM9 1H9.75H14.2495C14.6637 1 14.9995 1.33579 14.9995 1.75V6.25V7H13.4995V6.25V3.56066L8.53033 8.52978L8 9.06011L6.93934 7.99945L7.46967 7.46912L12.4388 2.5H9.75H9V1Z",fill:"currentColor",fillRule:"evenodd"})}),ax=e=>b("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:b("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H5.875V4.75V4.125H7.125V4.75V5.875H8.25H8.875V7.125H8.25H7.125V8.25V8.875H5.875V8.25V7.125H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),sx=e=>b("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:b("path",{clipRule:"evenodd",d:"M15.5607 3.99999L15.0303 4.53032L6.23744 13.3232C5.55403 14.0066 4.44599 14.0066 3.76257 13.3232L4.2929 12.7929L3.76257 13.3232L0.969676 10.5303L0.439346 9.99999L1.50001 8.93933L2.03034 9.46966L4.82323 12.2626C4.92086 12.3602 5.07915 12.3602 5.17678 12.2626L13.9697 3.46966L14.5 2.93933L15.5607 3.99999Z",fill:"currentColor",fillRule:"evenodd"})}),K=(...e)=>M3(GE(e)),pn=(e,t,n)=>{let r=typeof t=="string"?new Blob([t],{type:n}):t,i=URL.createObjectURL(r),a=document.createElement("a");a.href=i,a.download=e,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(i)},Bd=Ra({code:""}),Fd=()=>nt(Bd),Cu=({onCopy:e,onError:t,timeout:n=2e3,children:r,className:i,code:a,...s})=>{let[o,u]=le(!1),l=Oe(0),{code:f}=Fd(),{isAnimating:d}=nt(tt),p=a??f,h=async()=>{var T;if(typeof window>"u"||!((T=navigator==null?void 0:navigator.clipboard)!=null&&T.writeText)){t==null||t(new Error("Clipboard API not available"));return}try{o||(await navigator.clipboard.writeText(p),u(!0),e==null||e(),l.current=window.setTimeout(()=>u(!1),n))}catch(w){t==null||t(w)}};Ae(()=>()=>{window.clearTimeout(l.current)},[]);let m=o?_s:ks;return b("button",{className:K("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),"data-streamdown":"code-block-copy-button",disabled:d,onClick:h,title:"Copy Code",type:"button",...s,children:r??b(m,{size:14})})},Su={"1c":"1c","1c-query":"1cq",abap:"abap","actionscript-3":"as",ada:"ada",adoc:"adoc","angular-html":"html","angular-ts":"ts",apache:"conf",apex:"cls",apl:"apl",applescript:"applescript",ara:"ara",asciidoc:"adoc",asm:"asm",astro:"astro",awk:"awk",ballerina:"bal",bash:"sh",bat:"bat",batch:"bat",be:"be",beancount:"beancount",berry:"berry",bibtex:"bib",bicep:"bicep",blade:"blade.php",bsl:"bsl",c:"c","c#":"cs","c++":"cpp",cadence:"cdc",cairo:"cairo",cdc:"cdc",clarity:"clar",clj:"clj",clojure:"clj","closure-templates":"soy",cmake:"cmake",cmd:"cmd",cobol:"cob",codeowners:"CODEOWNERS",codeql:"ql",coffee:"coffee",coffeescript:"coffee","common-lisp":"lisp",console:"sh",coq:"v",cpp:"cpp",cql:"cql",crystal:"cr",cs:"cs",csharp:"cs",css:"css",csv:"csv",cue:"cue",cypher:"cql",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",docker:"dockerfile",dockerfile:"dockerfile",dotenv:"env","dream-maker":"dm",edge:"edge",elisp:"el",elixir:"ex",elm:"elm","emacs-lisp":"el",erb:"erb",erl:"erl",erlang:"erl",f:"f","f#":"fs",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"f90",f95:"f95",fennel:"fnl",fish:"fish",fluent:"ftl",for:"for","fortran-fixed-form":"f","fortran-free-form":"f90",fs:"fs",fsharp:"fs",fsl:"fsl",ftl:"ftl",gdresource:"tres",gdscript:"gd",gdshader:"gdshader",genie:"gs",gherkin:"feature","git-commit":"gitcommit","git-rebase":"gitrebase",gjs:"js",gleam:"gleam","glimmer-js":"js","glimmer-ts":"ts",glsl:"glsl",gnuplot:"plt",go:"go",gql:"gql",graphql:"graphql",groovy:"groovy",gts:"gts",hack:"hack",haml:"haml",handlebars:"hbs",haskell:"hs",haxe:"hx",hbs:"hbs",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",hs:"hs",html:"html","html-derivative":"html",http:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",jade:"jade",java:"java",javascript:"js",jinja:"jinja",jison:"jison",jl:"jl",js:"js",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",julia:"jl",kotlin:"kt",kql:"kql",kt:"kt",kts:"kts",kusto:"kql",latex:"tex",lean:"lean",lean4:"lean",less:"less",liquid:"liquid",lisp:"lisp",lit:"lit",llvm:"ll",log:"log",logo:"logo",lua:"lua",luau:"luau",make:"mak",makefile:"mak",markdown:"md",marko:"marko",matlab:"m",md:"md",mdc:"mdc",mdx:"mdx",mediawiki:"wiki",mermaid:"mmd",mips:"s",mipsasm:"s",mmd:"mmd",mojo:"mojo",move:"move",nar:"nar",narrat:"narrat",nextflow:"nf",nf:"nf",nginx:"conf",nim:"nim",nix:"nix",nu:"nu",nushell:"nu",objc:"m","objective-c":"m","objective-cpp":"mm",ocaml:"ml",pascal:"pas",perl:"pl",perl6:"p6",php:"php",plsql:"pls",po:"po",polar:"polar",postcss:"pcss",pot:"pot",potx:"potx",powerquery:"pq",powershell:"ps1",prisma:"prisma",prolog:"pl",properties:"properties",proto:"proto",protobuf:"proto",ps:"ps",ps1:"ps1",pug:"pug",puppet:"pp",purescript:"purs",py:"py",python:"py",ql:"ql",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",racket:"rkt",raku:"raku",razor:"cshtml",rb:"rb",reg:"reg",regex:"regex",regexp:"regexp",rel:"rel",riscv:"s",rs:"rs",rst:"rst",ruby:"rb",rust:"rs",sas:"sas",sass:"sass",scala:"scala",scheme:"scm",scss:"scss",sdbl:"sdbl",sh:"sh",shader:"shader",shaderlab:"shader",shell:"sh",shellscript:"sh",shellsession:"sh",smalltalk:"st",solidity:"sol",soy:"soy",sparql:"rq",spl:"spl",splunk:"spl",sql:"sql","ssh-config":"config",stata:"do",styl:"styl",stylus:"styl",svelte:"svelte",swift:"swift","system-verilog":"sv",systemd:"service",talon:"talon",talonscript:"talon",tasl:"tasl",tcl:"tcl",templ:"templ",terraform:"tf",tex:"tex",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"ts","ts-tags":"ts",tsp:"tsp",tsv:"tsv",tsx:"tsx",turtle:"ttl",twig:"twig",typ:"typ",typescript:"ts",typespec:"tsp",typst:"typ",v:"v",vala:"vala",vb:"vb",verilog:"v",vhdl:"vhdl",vim:"vim",viml:"vim",vimscript:"vim",vue:"vue","vue-html":"html","vue-vine":"vine",vy:"vy",vyper:"vy",wasm:"wasm",wenyan:"wy",wgsl:"wgsl",wiki:"wiki",wikitext:"wiki",wit:"wit",wl:"wl",wolfram:"wl",xml:"xml",xsl:"xsl",yaml:"yaml",yml:"yml",zenscript:"zs",zig:"zig",zsh:"zsh",文言:"wy"},ox=({onDownload:e,onError:t,language:n,children:r,className:i,code:a,...s})=>{let{code:o}=Fd(),{isAnimating:u}=nt(tt),l=a??o,f=`file.${n&&n in Su?Su[n]:"txt"}`,d="text/plain",p=()=>{try{pn(f,l,d),e==null||e()}catch(h){t==null||t(h)}};return b("button",{className:K("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),"data-streamdown":"code-block-download-button",disabled:u,onClick:p,title:"Download file",type:"button",...s,children:r??b(_i,{size:14})})},Iu=()=>b("div",{className:"w-full divide-y divide-border overflow-hidden rounded-xl border border-border",children:[b("div",{className:"h-[46px] w-full bg-muted/80"}),b("div",{className:"flex w-full items-center justify-center p-4",children:b(nx,{className:"size-4 animate-spin"})})]}),ux=/\.[^/.]+$/,lx=({node:e,className:t,src:n,alt:r,...i})=>{let a=async()=>{if(n)try{let s=await(await fetch(n)).blob(),o=new URL(n,window.location.origin).pathname.split("/").pop()||"",u=o.split(".").pop(),l=o.includes(".")&&u!==void 0&&u.length<=4,f="";if(l)f=o;else{let d=s.type,p="png";d.includes("jpeg")||d.includes("jpg")?p="jpg":d.includes("png")?p="png":d.includes("svg")?p="svg":d.includes("gif")?p="gif":d.includes("webp")&&(p="webp"),f=`${(r||o||"image").replace(ux,"")}.${p}`}pn(f,s,s.type)}catch{window.open(n,"_blank")}};return n?b("div",{className:"group relative my-4 inline-block","data-streamdown":"image-wrapper",children:[b("img",{alt:r,className:K("max-w-full rounded-lg",t),"data-streamdown":"image",src:n,...i}),b("div",{className:"pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block"}),b("button",{className:K("absolute right-2 bottom-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-border bg-background/90 shadow-sm backdrop-blur-sm transition-all duration-200 hover:bg-background","opacity-0 group-hover:opacity-100"),onClick:a,title:"Download image",type:"button",children:b(_i,{size:14})})]}):null},Zn=0,cx=()=>{Zn+=1,Zn===1&&(document.body.style.overflow="hidden")},dx=()=>{Zn=Math.max(0,Zn-1),Zn===0&&(document.body.style.overflow="")},fx=({url:e,isOpen:t,onClose:n,onConfirm:r})=>{let[i,a]=le(!1),s=Me(async()=>{try{await navigator.clipboard.writeText(e),a(!0),setTimeout(()=>a(!1),2e3)}catch{}},[e]),o=Me(()=>{r(),n()},[r,n]);return Ae(()=>{if(t){cx();let u=l=>{l.key==="Escape"&&n()};return document.addEventListener("keydown",u),()=>{document.removeEventListener("keydown",u),dx()}}},[t,n]),t?b("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm","data-streamdown":"link-safety-modal",onClick:n,onKeyDown:u=>{u.key==="Escape"&&n()},role:"button",tabIndex:0,children:b("div",{className:"relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg",onClick:u=>u.stopPropagation(),onKeyDown:u=>u.stopPropagation(),role:"presentation",children:[b("button",{className:"absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground",onClick:n,title:"Close",type:"button",children:b(Md,{size:16})}),b("div",{className:"flex flex-col gap-2",children:[b("div",{className:"flex items-center gap-2 font-semibold text-lg",children:[b(Au,{size:20}),b("span",{children:"Open external link?"})]}),b("p",{className:"text-muted-foreground text-sm",children:"You're about to visit an external website."})]}),b("div",{className:K("break-all rounded-md bg-muted p-3 font-mono text-sm",e.length>100&&"max-h-32 overflow-y-auto"),children:e}),b("div",{className:"flex gap-2",children:[b("button",{className:"flex flex-1 items-center justify-center gap-2 rounded-md border bg-background px-4 py-2 font-medium text-sm transition-all hover:bg-muted",onClick:s,type:"button",children:i?b(je,{children:[b(_s,{size:14}),b("span",{children:"Copied"})]}):b(je,{children:[b(ks,{size:14}),b("span",{children:"Copy link"})]})}),b("button",{className:"flex flex-1 items-center justify-center gap-2 rounded-md bg-primary px-4 py-2 font-medium text-primary-foreground text-sm transition-all hover:bg-primary/90",onClick:o,type:"button",children:[b(Au,{size:14}),b("span",{children:"Open link"})]})]})]})}):null},Ia=Ra(null),Hd=()=>nt(Ia),hx=()=>{var e;let t=Hd();return(e=t==null?void 0:t.code)!=null?e:null},xs=()=>{var e;let t=Hd();return(e=t==null?void 0:t.mermaid)!=null?e:null},px=(e,t)=>{var n;let r=(n=void 0)!=null?n:5;return new Promise((i,a)=>{let s="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(e))),o=new Image;o.crossOrigin="anonymous",o.onload=()=>{let u=document.createElement("canvas"),l=o.width*r,f=o.height*r;u.width=l,u.height=f;let d=u.getContext("2d");if(!d){a(new Error("Failed to create 2D canvas context for PNG export"));return}d.drawImage(o,0,0,l,f),u.toBlob(p=>{if(!p){a(new Error("Failed to create PNG blob"));return}i(p)},"image/png")},o.onerror=()=>a(new Error("Failed to load SVG image")),o.src=s})},mx=({chart:e,children:t,className:n,onDownload:r,config:i,onError:a})=>{let[s,o]=le(!1),u=Oe(null),{isAnimating:l}=nt(tt),f=xs(),d=async p=>{try{if(p==="mmd"){pn("diagram.mmd",e,"text/plain"),o(!1),r==null||r(p);return}if(!f){a==null||a(new Error("Mermaid plugin not available"));return}let h=f.getMermaid(i),m=e.split("").reduce((x,S)=>(x<<5)-x+S.charCodeAt(0)|0,0),T=`mermaid-${Math.abs(m)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:w}=await h.render(T,e);if(!w){a==null||a(new Error("SVG not found. Please wait for the diagram to render."));return}if(p==="svg"){pn("diagram.svg",w,"image/svg+xml"),o(!1),r==null||r(p);return}if(p==="png"){let x=await px(w);pn("diagram.png",x,"image/png"),r==null||r(p),o(!1);return}}catch(h){a==null||a(h)}};return Ae(()=>{let p=h=>{let m=h.composedPath();u.current&&!m.includes(u.current)&&o(!1)};return document.addEventListener("mousedown",p),()=>{document.removeEventListener("mousedown",p)}},[]),b("div",{className:"relative",ref:u,children:[b("button",{className:K("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",n),disabled:l,onClick:()=>o(!s),title:"Download diagram",type:"button",children:t??b(_i,{size:14})}),s?b("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[b("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>d("svg"),title:"Download diagram as SVG",type:"button",children:"SVG"}),b("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>d("png"),title:"Download diagram as PNG",type:"button",children:"PNG"}),b("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>d("mmd"),title:"Download diagram as MMD",type:"button",children:"MMD"})]}):null]})},Jn=0,gx=()=>{Jn+=1,Jn===1&&(document.body.style.overflow="hidden")},bx=()=>{Jn=Math.max(0,Jn-1),Jn===0&&(document.body.style.overflow="")},Ex=({chart:e,config:t,onFullscreen:n,onExit:r,className:i,...a})=>{let[s,o]=le(!1),{isAnimating:u,controls:l}=nt(tt),f=(()=>{if(typeof l=="boolean")return l;let p=l.mermaid;return p===!1?!1:p===!0||p===void 0?!0:p.panZoom!==!1})(),d=()=>{o(!s)};return Ae(()=>{if(s){gx();let p=h=>{h.key==="Escape"&&o(!1)};return document.addEventListener("keydown",p),()=>{document.removeEventListener("keydown",p),bx()}}},[s]),Ae(()=>{s?n==null||n():r&&r()},[s,n,r]),b(je,{children:[b("button",{className:K("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),disabled:u,onClick:d,title:"View fullscreen",type:"button",...a,children:b(rx,{size:14})}),s?b("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm",onClick:d,onKeyDown:p=>{p.key==="Escape"&&d()},role:"button",tabIndex:0,children:[b("button",{className:"absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground",onClick:d,title:"Exit fullscreen",type:"button",children:b(Md,{size:20})}),b("div",{className:"flex size-full items-center justify-center p-4",onClick:p=>p.stopPropagation(),onKeyDown:p=>p.stopPropagation(),role:"presentation",children:b(m0,{chart:e,className:"size-full [&_svg]:h-auto [&_svg]:w-auto",config:t,fullscreen:!0,showControls:f})})]}):null]})},Ud=e=>{var t,n;let r=[],i=[],a=e.querySelectorAll("thead th");for(let o of a)r.push(((t=o.textContent)==null?void 0:t.trim())||"");let s=e.querySelectorAll("tbody tr");for(let o of s){let u=[],l=o.querySelectorAll("td");for(let f of l)u.push(((n=f.textContent)==null?void 0:n.trim())||"");i.push(u)}return{headers:r,rows:i}},zd=e=>{let{headers:t,rows:n}=e,r=o=>{let u=!1,l=!1;for(let f of o){if(f==='"'){u=!0,l=!0;break}(f===","||f===`
|
|
106
|
+
`)&&(u=!0)}return u?l?`"${o.replace(/"/g,'""')}"`:`"${o}"`:o},i=t.length>0?n.length+1:n.length,a=new Array(i),s=0;t.length>0&&(a[s]=t.map(r).join(","),s+=1);for(let o of n)a[s]=o.map(r).join(","),s+=1;return a.join(`
|
|
107
|
+
`)},Tx=e=>{let{headers:t,rows:n}=e,r=o=>{let u=!1;for(let f of o)if(f===" "||f===`
|
|
108
|
+
`||f==="\r"){u=!0;break}if(!u)return o;let l=[];for(let f of o)f===" "?l.push("\\t"):f===`
|
|
109
|
+
`?l.push("\\n"):f==="\r"?l.push("\\r"):l.push(f);return l.join("")},i=t.length>0?n.length+1:n.length,a=new Array(i),s=0;t.length>0&&(a[s]=t.map(r).join(" "),s+=1);for(let o of n)a[s]=o.map(r).join(" "),s+=1;return a.join(`
|
|
110
|
+
`)},Xi=e=>{let t=!1;for(let r of e)if(r==="\\"||r==="|"){t=!0;break}if(!t)return e;let n=[];for(let r of e)r==="\\"?n.push("\\\\"):r==="|"?n.push("\\|"):n.push(r);return n.join("")},_x=e=>{let{headers:t,rows:n}=e;if(t.length===0)return"";let r=new Array(n.length+2),i=0,a=t.map(o=>Xi(o));r[i]=`| ${a.join(" | ")} |`,i+=1;let s=new Array(t.length);for(let o=0;o<t.length;o+=1)s[o]="---";r[i]=`| ${s.join(" | ")} |`,i+=1;for(let o of n)if(o.length<t.length){let u=new Array(t.length);for(let l=0;l<t.length;l+=1)u[l]=l<o.length?Xi(o[l]):"";r[i]=`| ${u.join(" | ")} |`,i+=1}else{let u=o.map(l=>Xi(l));r[i]=`| ${u.join(" | ")} |`,i+=1}return r.join(`
|
|
111
|
+
`)},kx=({children:e,className:t,onCopy:n,onError:r,timeout:i=2e3})=>{let[a,s]=le(!1),[o,u]=le(!1),l=Oe(null),f=Oe(0),{isAnimating:d}=nt(tt),p=async m=>{var T,w;if(typeof window>"u"||!((T=navigator==null?void 0:navigator.clipboard)!=null&&T.write)){r==null||r(new Error("Clipboard API not available"));return}try{let x=(w=l.current)==null?void 0:w.closest('[data-streamdown="table-wrapper"]'),S=x==null?void 0:x.querySelector("table");if(!S){r==null||r(new Error("Table not found"));return}let C=Ud(S),O=m==="csv"?zd(C):Tx(C),P=new ClipboardItem({"text/plain":new Blob([O],{type:"text/plain"}),"text/html":new Blob([S.outerHTML],{type:"text/html"})});await navigator.clipboard.write([P]),u(!0),s(!1),n==null||n(m),f.current=window.setTimeout(()=>u(!1),i)}catch(x){r==null||r(x)}};Ae(()=>{let m=T=>{let w=T.composedPath();l.current&&!w.includes(l.current)&&s(!1)};return document.addEventListener("mousedown",m),()=>{document.removeEventListener("mousedown",m),window.clearTimeout(f.current)}},[]);let h=o?_s:ks;return b("div",{className:"relative",ref:l,children:[b("button",{className:K("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:d,onClick:()=>s(!a),title:"Copy table",type:"button",children:e??b(h,{size:14})}),a?b("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[b("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>p("csv"),title:"Copy table as CSV",type:"button",children:"CSV"}),b("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>p("tsv"),title:"Copy table as TSV",type:"button",children:"TSV"})]}):null]})},xx=({children:e,className:t,onDownload:n,onError:r})=>{let[i,a]=le(!1),s=Oe(null),{isAnimating:o}=nt(tt),u=l=>{var f;try{let d=(f=s.current)==null?void 0:f.closest('[data-streamdown="table-wrapper"]'),p=d==null?void 0:d.querySelector("table");if(!p){r==null||r(new Error("Table not found"));return}let h=Ud(p),m=l==="csv"?zd(h):_x(h);pn(`table.${l==="csv"?"csv":"md"}`,m,l==="csv"?"text/csv":"text/markdown"),a(!1),n==null||n(l)}catch(d){r==null||r(d)}};return Ae(()=>{let l=f=>{let d=f.composedPath();s.current&&!d.includes(s.current)&&a(!1)};return document.addEventListener("mousedown",l),()=>{document.removeEventListener("mousedown",l)}},[]),b("div",{className:"relative",ref:s,children:[b("button",{className:K("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:o,onClick:()=>a(!i),title:"Download table",type:"button",children:e??b(_i,{size:14})}),i?b("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[b("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>u("csv"),title:"Download table as CSV",type:"button",children:"CSV"}),b("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>u("markdown"),title:"Download table as Markdown",type:"button",children:"Markdown"})]}):null]})},yx=({children:e,className:t,showControls:n,...r})=>b("div",{className:"my-4 flex flex-col space-y-2","data-streamdown":"table-wrapper",children:[n?b("div",{className:"flex items-center justify-end gap-1",children:[b(kx,{}),b(xx,{})]}):null,b("div",{className:"overflow-x-auto",children:b("table",{className:K("w-full border-collapse border border-border",t),"data-streamdown":"table",...r,children:e})})]}),wx=cl(()=>Promise.resolve().then(()=>require("./code-block-37QAKDTI-7eb2a6e1.cjs")).then(e=>({default:e.CodeBlock}))),Ax=cl(()=>Promise.resolve().then(()=>require("./mermaid-4DMBBIKO-6511b2b6.cjs")).then(e=>({default:e.Mermaid}))),Cx=/language-([^\s]+)/;function ki(e,t){if(!(e!=null&&e.position||t!=null&&t.position))return!0;if(!(e!=null&&e.position&&t!=null&&t.position))return!1;let n=e.position.start,r=t.position.start,i=e.position.end,a=t.position.end;return(n==null?void 0:n.line)===(r==null?void 0:r.line)&&(n==null?void 0:n.column)===(r==null?void 0:r.column)&&(i==null?void 0:i.line)===(a==null?void 0:a.line)&&(i==null?void 0:i.column)===(a==null?void 0:a.column)}function ye(e,t){return e.className===t.className&&ki(e.node,t.node)}var Na=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,Sr=(e,t)=>{if(typeof e=="boolean")return e;let n=e.mermaid;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},ys=fe(({children:e,className:t,node:n,...r})=>b("ol",{className:K("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...r,children:e}),(e,t)=>ye(e,t));ys.displayName="MarkdownOl";var $d=fe(({children:e,className:t,node:n,...r})=>b("li",{className:K("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...r,children:e}),(e,t)=>e.className===t.className&&ki(e.node,t.node));$d.displayName="MarkdownLi";var Yd=fe(({children:e,className:t,node:n,...r})=>b("ul",{className:K("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...r,children:e}),(e,t)=>ye(e,t));Yd.displayName="MarkdownUl";var jd=fe(({className:e,node:t,...n})=>b("hr",{className:K("my-6 border-border",e),"data-streamdown":"horizontal-rule",...n}),(e,t)=>ye(e,t));jd.displayName="MarkdownHr";var qd=fe(({children:e,className:t,node:n,...r})=>b("span",{className:K("font-semibold",t),"data-streamdown":"strong",...r,children:e}),(e,t)=>ye(e,t));qd.displayName="MarkdownStrong";var Sx=({children:e,className:t,href:n,node:r,...i})=>{let{linkSafety:a}=nt(tt),[s,o]=le(!1),u=n==="streamdown:incomplete-link",l=Me(async h=>{if(!(!(a!=null&&a.enabled&&n)||u)){if(h.preventDefault(),a.onLinkCheck&&await a.onLinkCheck(n)){window.open(n,"_blank","noreferrer");return}o(!0)}},[a,n,u]),f=Me(()=>{n&&window.open(n,"_blank","noreferrer")},[n]),d=Me(()=>{o(!1)},[]),p={url:n??"",isOpen:s,onClose:d,onConfirm:f};return a!=null&&a.enabled&&n?b(je,{children:[b("button",{className:K("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":u,"data-streamdown":"link",onClick:l,type:"button",children:e}),a.renderModal?a.renderModal(p):b(fx,{...p})]}):b("a",{className:K("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":u,"data-streamdown":"link",href:n,rel:"noreferrer",target:"_blank",...i,children:e})},Vd=fe(Sx,(e,t)=>ye(e,t)&&e.href===t.href);Vd.displayName="MarkdownA";var Wd=fe(({children:e,className:t,node:n,...r})=>b("h1",{className:K("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...r,children:e}),(e,t)=>ye(e,t));Wd.displayName="MarkdownH1";var Gd=fe(({children:e,className:t,node:n,...r})=>b("h2",{className:K("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...r,children:e}),(e,t)=>ye(e,t));Gd.displayName="MarkdownH2";var Qd=fe(({children:e,className:t,node:n,...r})=>b("h3",{className:K("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...r,children:e}),(e,t)=>ye(e,t));Qd.displayName="MarkdownH3";var Kd=fe(({children:e,className:t,node:n,...r})=>b("h4",{className:K("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...r,children:e}),(e,t)=>ye(e,t));Kd.displayName="MarkdownH4";var Xd=fe(({children:e,className:t,node:n,...r})=>b("h5",{className:K("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...r,children:e}),(e,t)=>ye(e,t));Xd.displayName="MarkdownH5";var Zd=fe(({children:e,className:t,node:n,...r})=>b("h6",{className:K("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...r,children:e}),(e,t)=>ye(e,t));Zd.displayName="MarkdownH6";var Jd=fe(({children:e,className:t,node:n,...r})=>{let{controls:i}=nt(tt),a=Na(i,"table");return b(yx,{className:t,showControls:a,...r,children:e})},(e,t)=>ye(e,t));Jd.displayName="MarkdownTable";var e0=fe(({children:e,className:t,node:n,...r})=>b("thead",{className:K("bg-muted/80",t),"data-streamdown":"table-header",...r,children:e}),(e,t)=>ye(e,t));e0.displayName="MarkdownThead";var t0=fe(({children:e,className:t,node:n,...r})=>b("tbody",{className:K("divide-y divide-border bg-muted/40",t),"data-streamdown":"table-body",...r,children:e}),(e,t)=>ye(e,t));t0.displayName="MarkdownTbody";var n0=fe(({children:e,className:t,node:n,...r})=>b("tr",{className:K("border-border border-b",t),"data-streamdown":"table-row",...r,children:e}),(e,t)=>ye(e,t));n0.displayName="MarkdownTr";var r0=fe(({children:e,className:t,node:n,...r})=>b("th",{className:K("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",t),"data-streamdown":"table-header-cell",...r,children:e}),(e,t)=>ye(e,t));r0.displayName="MarkdownTh";var i0=fe(({children:e,className:t,node:n,...r})=>b("td",{className:K("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...r,children:e}),(e,t)=>ye(e,t));i0.displayName="MarkdownTd";var a0=fe(({children:e,className:t,node:n,...r})=>b("blockquote",{className:K("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),"data-streamdown":"blockquote",...r,children:e}),(e,t)=>ye(e,t));a0.displayName="MarkdownBlockquote";var s0=fe(({children:e,className:t,node:n,...r})=>b("sup",{className:K("text-sm",t),"data-streamdown":"superscript",...r,children:e}),(e,t)=>ye(e,t));s0.displayName="MarkdownSup";var o0=fe(({children:e,className:t,node:n,...r})=>b("sub",{className:K("text-sm",t),"data-streamdown":"subscript",...r,children:e}),(e,t)=>ye(e,t));o0.displayName="MarkdownSub";var u0=fe(({children:e,className:t,node:n,...r})=>{if("data-footnotes"in r){let i=s=>{var o,u;if(!ln(s))return!1;let l=Array.isArray(s.props.children)?s.props.children:[s.props.children],f=!1,d=!1;for(let p of l)if(p){if(typeof p=="string")p.trim()!==""&&(f=!0);else if(ln(p))if(((o=p.props)==null?void 0:o["data-footnote-backref"])!==void 0)d=!0;else{let h=Array.isArray(p.props.children)?p.props.children:[p.props.children];for(let m of h){if(typeof m=="string"&&m.trim()!==""){f=!0;break}if(ln(m)&&((u=m.props)==null?void 0:u["data-footnote-backref"])===void 0){f=!0;break}}}}return d&&!f},a=Array.isArray(e)?e.map(s=>{if(!ln(s))return s;if(s.type===ys){let o=(Array.isArray(s.props.children)?s.props.children:[s.props.children]).filter(u=>!i(u));return o.length===0?null:{...s,props:{...s.props,children:o}}}return s}):e;return(Array.isArray(a)?a.some(s=>s!==null):a!==null)?b("section",{className:t,...r,children:a}):null}return b("section",{className:t,...r,children:e})},(e,t)=>ye(e,t));u0.displayName="MarkdownSection";var Ix=({node:e,className:t,children:n,...r})=>{var i,a,s;let o=((i=e==null?void 0:e.position)==null?void 0:i.start.line)===((a=e==null?void 0:e.position)==null?void 0:a.end.line),{mermaid:u,controls:l}=nt(tt),f=xs();if(o)return b("code",{className:K("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",t),"data-streamdown":"inline-code",...r,children:n});let d=t==null?void 0:t.match(Cx),p=(s=d==null?void 0:d.at(1))!=null?s:"",h="";if(ln(n)&&n.props&&typeof n.props=="object"&&"children"in n.props&&typeof n.props.children=="string"?h=n.props.children:typeof n=="string"&&(h=n),p==="mermaid"&&f){let T=Na(l,"mermaid"),w=Sr(l,"download"),x=Sr(l,"copy"),S=Sr(l,"fullscreen"),C=Sr(l,"panZoom"),O=T&&(w||x||S);return b(Yn,{fallback:b(Iu,{}),children:b("div",{className:K("group relative my-4 h-auto rounded-xl border p-4",t),"data-streamdown":"mermaid-block",children:[O?b("div",{className:"flex items-center justify-end gap-2",children:[w?b(mx,{chart:h,config:u==null?void 0:u.config}):null,x?b(Cu,{code:h}):null,S?b(Ex,{chart:h,config:u==null?void 0:u.config}):null]}):null,b(Ax,{chart:h,config:u==null?void 0:u.config,showControls:C})]})})}let m=Na(l,"code");return b(Yn,{fallback:b(Iu,{}),children:b(wx,{className:K("overflow-x-auto border-border border-t",t),code:h,language:p,children:m?b(je,{children:[b(ox,{code:h,language:p}),b(Cu,{})]}):null})})},l0=fe(Ix,(e,t)=>e.className===t.className&&ki(e.node,t.node));l0.displayName="MarkdownCode";var c0=fe(lx,(e,t)=>e.className===t.className&&ki(e.node,t.node));c0.displayName="MarkdownImg";var d0=fe(({children:e,className:t,node:n,...r})=>{var i,a;let s=(Array.isArray(e)?e:[e]).filter(o=>o!=null&&o!=="");if(s.length===1&&ln(s[0])){let o=s[0].props.node,u=o==null?void 0:o.tagName;if(u==="img")return b(je,{children:e});if(u==="code"&&((i=o==null?void 0:o.position)==null?void 0:i.start.line)!==((a=o==null?void 0:o.position)==null?void 0:a.end.line))return b(je,{children:e})}return b("p",{className:t,...r,children:e})},(e,t)=>ye(e,t));d0.displayName="MarkdownParagraph";var Nx={ol:ys,li:$d,ul:Yd,hr:jd,strong:qd,a:Vd,h1:Wd,h2:Gd,h3:Qd,h4:Kd,h5:Xd,h6:Zd,table:Jd,thead:e0,tbody:t0,tr:n0,th:r0,td:i0,blockquote:a0,code:l0,img:c0,pre:({children:e})=>e,sup:s0,sub:o0,p:d0,section:u0},Nu=[],vu={allowDangerousHtml:!0},Ir=new WeakMap,vx=class{constructor(){this.cache=new Map,this.keyCache=new WeakMap,this.maxSize=100}generateCacheKey(e){let t=this.keyCache.get(e);if(t)return t;let n=e.rehypePlugins,r=e.remarkPlugins,i=e.remarkRehypeOptions;if(!(n||r||i)){let f="default";return this.keyCache.set(e,f),f}let a=f=>{if(!f||f.length===0)return"";let d="";for(let p=0;p<f.length;p+=1){let h=f[p];if(p>0&&(d+=","),Array.isArray(h)){let[m,T]=h;if(typeof m=="function"){let w=Ir.get(m);w||(w=m.name,Ir.set(m,w)),d+=w}else d+=String(m);d+=":",d+=JSON.stringify(T)}else if(typeof h=="function"){let m=Ir.get(h);m||(m=h.name,Ir.set(h,m)),d+=m}else d+=String(h)}return d},s=a(n),o=a(r),u=i?JSON.stringify(i):"",l=`${o}::${s}::${u}`;return this.keyCache.set(e,l),l}get(e){let t=this.generateCacheKey(e),n=this.cache.get(t);return n&&(this.cache.delete(t),this.cache.set(t,n)),n}set(e,t){let n=this.generateCacheKey(e);if(this.cache.size>=this.maxSize){let r=this.cache.keys().next().value;r&&this.cache.delete(r)}this.cache.set(n,t)}clear(){this.cache.clear()}},Lu=new vx,f0=e=>{let t=Lx(e),n=e.children||"";return Ox(t.runSync(t.parse(n),n),e)},Lx=e=>{let t=Lu.get(e);if(t)return t;let n=Rx(e);return Lu.set(e,n),n},Rx=e=>{let t=e.rehypePlugins||Nu,n=e.remarkPlugins||Nu,r=e.remarkRehypeOptions?{...vu,...e.remarkRehypeOptions}:vu;return dk().use(d_).use(n).use(W_,r).use(t)},Ox=(e,t)=>TT(e,{Fragment:je,components:t.components,ignoreInvalidStyle:!0,jsx:b,jsxs:b,passKeys:!0,passNode:!0}),Dx=/\[\^[^\]\s]{1,200}\](?!:)/,Px=/\[\^[^\]\s]{1,200}\]:/,Mx=/<\/(\w+)>/,Bx=/<(\w+)[\s>]/,Zi=e=>{let t=0;for(;t<e.length&&(e[t]===" "||e[t]===" "||e[t]===`
|
|
112
|
+
`||e[t]==="\r");)t+=1;return t+1<e.length&&e[t]==="$"&&e[t+1]==="$"},Fx=e=>{let t=e.length-1;for(;t>=0&&(e[t]===" "||e[t]===" "||e[t]===`
|
|
113
|
+
`||e[t]==="\r");)t-=1;return t>=1&&e[t]==="$"&&e[t-1]==="$"},Ji=e=>{let t=0;for(let n=0;n<e.length-1;n+=1)e[n]==="$"&&e[n+1]==="$"&&(t+=1,n+=1);return t},Hx=e=>{let t=Dx.test(e),n=Px.test(e);if(t||n)return[e];let r=st.lex(e,{gfm:!0}),i=[],a=[];for(let s of r){let o=s.raw,u=i.length;if(a.length>0){if(i[u-1]+=o,s.type==="html"){let l=o.match(Mx);if(l){let f=l[1];a.at(-1)===f&&a.pop()}}continue}if(s.type==="html"&&s.block){let l=o.match(Bx);if(l){let f=l[1];o.includes(`</${f}>`)||a.push(f)}}if(o.trim()==="$$"&&u>0){let l=i[u-1],f=Zi(l),d=Ji(l);if(f&&d%2===1){i[u-1]=l+o;continue}}if(u>0&&Fx(o)){let l=i[u-1],f=Zi(l),d=Ji(l),p=Ji(o);if(f&&d%2===1&&!Zi(o)&&p===1){i[u-1]=l+o;continue}}i.push(o)}return i},Ux={raw:J1,sanitize:[lm,{}],harden:[Af,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},zx={gfm:[Y2,{}]},$x=Object.values(Ux),Yx=Object.values(zx),jx={block:" ▋",circle:" ●"},qx={shikiTheme:["github-light","github-dark"],controls:!0,isAnimating:!1,mode:"streaming",mermaid:void 0,linkSafety:{enabled:!0}},tt=Ra(qx),h0=fe(({content:e,shouldParseIncompleteMarkdown:t,index:n,...r})=>b(f0,{...r,children:e}),(e,t)=>{if(e.content!==t.content||e.index!==t.index)return!1;if(e.components!==t.components){let n=Object.keys(e.components||{}),r=Object.keys(t.components||{});if(n.length!==r.length||n.some(i=>{var a,s;return((a=e.components)==null?void 0:a[i])!==((s=t.components)==null?void 0:s[i])}))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins)});h0.displayName="Block";var Vx=["github-light","github-dark"],p0=fe(({children:e,mode:t="streaming",parseIncompleteMarkdown:n=!0,components:r,rehypePlugins:i=$x,remarkPlugins:a=Yx,className:s,shikiTheme:o=Vx,mermaid:u,controls:l=!0,isAnimating:f=!1,BlockComponent:d=h0,parseMarkdownIntoBlocksFn:p=Hx,caret:h,plugins:m,remend:T,linkSafety:w={enabled:!0},...x})=>{let S=L0(),[C,O]=Ef(),P=Re(()=>typeof e!="string"?"":t==="streaming"&&n?WE(e,T):e,[e,t,n,T]),A=Re(()=>p(P),[P,p]),[U,v]=le(A);Ae(()=>{t==="streaming"?O(()=>{v(A)}):v(A)},[A,t]);let F=t==="streaming"?U:A,I=Re(()=>F.map((Z,ee)=>`${S}-${ee}`),[F.length,S]),$=Re(()=>{var Z,ee;return{shikiTheme:(ee=(Z=m==null?void 0:m.code)==null?void 0:Z.getThemes())!=null?ee:o,controls:l,isAnimating:f,mode:t,mermaid:u,linkSafety:w}},[o,l,f,t,u,w,m==null?void 0:m.code]),B=Re(()=>({...Nx,...r}),[r]),Q=Re(()=>{let Z=[];return m!=null&&m.cjk&&(Z=[...Z,...m.cjk.remarkPluginsBefore]),Z=[...Z,...a],m!=null&&m.cjk&&(Z=[...Z,...m.cjk.remarkPluginsAfter]),m!=null&&m.math&&(Z=[...Z,m.math.remarkPlugin]),Z},[a,m==null?void 0:m.math,m==null?void 0:m.cjk]),ae=Re(()=>m!=null&&m.math?[...i,m.math.rehypePlugin]:i,[i,m==null?void 0:m.math]),X=Re(()=>h&&f?{"--streamdown-caret":`"${jx[h]}"`}:void 0,[h,f]);return t==="static"?b(Ia.Provider,{value:m??null,children:b(tt.Provider,{value:$,children:b("div",{className:K("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",s),children:b(f0,{components:B,rehypePlugins:ae,remarkPlugins:Q,...x,children:e})})})}):b(Ia.Provider,{value:m??null,children:b(tt.Provider,{value:$,children:b("div",{className:K("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",h?"*:last:after:inline *:last:after:align-baseline *:last:after:content-(--streamdown-caret)":null,s),style:X,children:[F.length===0&&h&&f&&b("span",{}),F.map((Z,ee)=>b(d,{components:B,content:Z,index:ee,rehypePlugins:ae,remarkPlugins:Q,shouldParseIncompleteMarkdown:n,...x},I[ee]))]})})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating&&e.mode===t.mode&&e.plugins===t.plugins&&e.className===t.className&&e.linkSafety===t.linkSafety);p0.displayName="Streamdown";var Wx=({children:e,className:t,minZoom:n=.5,maxZoom:r=3,zoomStep:i=.1,showControls:a=!0,initialZoom:s=1,fullscreen:o=!1})=>{let u=Oe(null),l=Oe(null),[f,d]=le(s),[p,h]=le({x:0,y:0}),[m,T]=le(!1),[w,x]=le({x:0,y:0}),[S,C]=le({x:0,y:0}),O=Me(B=>{d(Q=>Math.max(n,Math.min(r,Q+B)))},[n,r]),P=Me(()=>{O(i)},[O,i]),A=Me(()=>{O(-i)},[O,i]),U=Me(()=>{d(s),h({x:0,y:0})},[s]),v=Me(B=>{B.preventDefault();let Q=B.deltaY>0?-i:i;O(Q)},[O,i]),F=Me(B=>{if(B.button!==0||B.isPrimary===!1)return;T(!0),x({x:B.clientX,y:B.clientY}),C(p);let Q=B.currentTarget;Q instanceof HTMLElement&&Q.setPointerCapture(B.pointerId)},[p]),I=Me(B=>{if(!m)return;B.preventDefault();let Q=B.clientX-w.x,ae=B.clientY-w.y;h({x:S.x+Q,y:S.y+ae})},[m,w,S]),$=Me(B=>{T(!1);let Q=B.currentTarget;Q instanceof HTMLElement&&Q.releasePointerCapture(B.pointerId)},[]);return Ae(()=>{let B=u.current;if(B)return B.addEventListener("wheel",v,{passive:!1}),()=>{B.removeEventListener("wheel",v)}},[v]),Ae(()=>{let B=l.current;if(B&&m)return document.body.style.userSelect="none",B.addEventListener("pointermove",I,{passive:!1}),B.addEventListener("pointerup",$),B.addEventListener("pointercancel",$),()=>{document.body.style.userSelect="",B.removeEventListener("pointermove",I),B.removeEventListener("pointerup",$),B.removeEventListener("pointercancel",$)}},[m,I,$]),b("div",{className:K("relative flex flex-col",o?"h-full w-full":"min-h-28 w-full",t),ref:u,style:{cursor:m?"grabbing":"grab"},children:[a?b("div",{className:K("absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/90 p-1 shadow-sm backdrop-blur-sm",o?"bottom-4 left-4":"bottom-2 left-2"),children:[b("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",disabled:f>=r,onClick:P,title:"Zoom in",type:"button",children:b(ax,{size:16})}),b("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",disabled:f<=n,onClick:A,title:"Zoom out",type:"button",children:b(sx,{size:16})}),b("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",onClick:U,title:"Reset zoom and pan",type:"button",children:b(ix,{size:16})})]}):null,b("div",{className:K("flex-1 origin-center transition-transform duration-150 ease-out",o?"flex h-full w-full items-center justify-center":"flex w-full items-center justify-center"),onPointerDown:F,ref:l,role:"application",style:{transform:`translate(${p.x}px, ${p.y}px) scale(${f})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},m0=({chart:e,className:t,config:n,fullscreen:r=!1,showControls:i=!0})=>{let[a,s]=le(null),[o,u]=le(!1),[l,f]=le(""),[d,p]=le(""),[h,m]=le(0),{mermaid:T}=nt(tt),w=xs(),x=T==null?void 0:T.errorComponent,{shouldRender:S,containerRef:C}=tx({immediate:r});if(Ae(()=>{if(S){if(!w){s("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");return}(async()=>{try{s(null),u(!0);let P=w.getMermaid(n),A=e.split("").reduce((F,I)=>(F<<5)-F+I.charCodeAt(0)|0,0),U=`mermaid-${Math.abs(A)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:v}=await P.render(U,e);f(v),p(v)}catch(P){if(!(d||l)){let A=P instanceof Error?P.message:"Failed to render Mermaid chart";s(A)}}finally{u(!1)}})()}},[e,n,h,S,w]),!(S||l||d))return b("div",{className:K("my-4 min-h-[200px]",t),ref:C});if(o&&!l&&!d)return b("div",{className:K("my-4 flex justify-center p-4",t),ref:C,children:b("div",{className:"flex items-center space-x-2 text-muted-foreground",children:[b("div",{className:"h-4 w-4 animate-spin rounded-full border-current border-b-2"}),b("span",{className:"text-sm",children:"Loading diagram..."})]})});if(a&&!l&&!d)return x?b("div",{ref:C,children:b(x,{chart:e,error:a,retry:()=>m(A=>A+1)})}):b("div",{className:K("rounded-lg border border-red-200 bg-red-50 p-4",t),ref:C,children:[b("p",{className:"font-mono text-red-700 text-sm",children:["Mermaid Error: ",a]}),b("details",{className:"mt-2",children:[b("summary",{className:"cursor-pointer text-red-600 text-xs",children:"Show Code"}),b("pre",{className:"mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs",children:e})]})]});let O=l||d;return b("div",{className:K("size-full",t),"data-streamdown":"mermaid",ref:C,children:b(Wx,{className:K(r?"size-full overflow-hidden":"my-4 overflow-hidden",t),fullscreen:r,maxZoom:3,minZoom:.5,showControls:i,zoomStep:.1,children:b("div",{"aria-label":"Mermaid chart",className:K("flex justify-center",r?"size-full items-center":null),dangerouslySetInnerHTML:{__html:O},role:"img"})})})};function Gx({href:e,children:t}){return b("a",{href:e,target:"_blank",rel:"noopener noreferrer",class:"fr text-kin-accent underline underline-offset-2 transition-colors hover:decoration-2 focus-visible:rounded-[2px]",children:t})}const Qx={a:Gx};function Kx({content:e,isStreaming:t=!1}){return e?b("div",{class:"kin-markdown text-kin-bubble-assistant-text text-sm leading-relaxed",children:b(p0,{isAnimating:t,mode:t?"streaming":"static",components:Qx,children:e})}):null}const mn="h-2 w-2 animate-kin-typing rounded-full bg-kin-text-muted",g0="mt-1.5 inline-flex items-center gap-1.5 pl-1 text-xs text-kin-text-muted",ea=Bt({base:"flex flex-1 flex-col gap-4 overflow-y-auto break-words p-4 overscroll-contain pl-safe-l pr-safe-r sm:overscroll-auto sm:px-4 [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-track]:bg-transparent [&::-webkit-scrollbar-thumb]:rounded-[3px] [&::-webkit-scrollbar-thumb]:bg-kin-bg-muted",variants:{empty:{true:"items-center justify-center",false:""}}}),Ru="animate-kin-fade-in px-6 py-6 text-center",Ou={animationDelay:"150ms"},Xx=Bt({base:"animate-kin-message-in flex max-w-[85%] flex-col",variants:{side:{user:"self-end",assistant:"self-start"}}}),Zx=Bt({base:"rounded-2xl px-4 py-3",variants:{side:{user:"rounded-br bg-kin-bubble-user text-kin-bubble-user-text",assistant:"rounded-bl border border-kin-border bg-kin-bubble-assistant text-kin-bubble-assistant-text"}}});function Jx(){const e=Ni(()=>Y.messages.value),t=Ni(()=>Y.isStreaming.value),n=Ni(()=>Y.connectionState.value),r=Oe(null),i=()=>{r.current&&(r.current.scrollTop=r.current.scrollHeight)};if(Ae(()=>{const l=setTimeout(i,380);return()=>clearTimeout(l)},[]),Ae(()=>{i()},[e.value,t.value]),n.value==="connecting"&&e.value.length===0)return b("div",{class:ea({empty:!0}),role:"log","aria-label":"Chat messages","aria-live":"polite",children:b("div",{class:Ru,style:Ou,children:b("div",{class:"flex gap-1.5 p-2","aria-label":"Loading conversation",children:[b("span",{class:mn}),b("span",{class:mn,style:{animationDelay:"0.15s"}}),b("span",{class:mn,style:{animationDelay:"0.3s"}})]})})});if(e.value.length===0&&!t.value)return b("div",{class:ea({empty:!0}),role:"log","aria-label":"Chat messages","aria-live":"polite",children:b("div",{class:Ru,style:Ou,children:[b("div",{class:"text-kin-text-muted size-12 mx-auto mb-4 opacity-50","aria-hidden":"true",children:b(J0,{class:"h-full w-full"})}),b("p",{class:"text-kin-text mb-2 text-base",children:"Hi there, you're speaking with Kin AI Agent."}),b("p",{class:"text-kin-text-muted text-sm",children:"How can I help you today?"})]})});const s=e.value[e.value.length-1],o=t.value&&(s==null?void 0:s.role)==="assistant"&&!s.content.trim();let u=0;return b("div",{class:ea({empty:!1}),ref:r,role:"log","aria-label":"Chat messages","aria-live":"polite","aria-relevant":"additions",children:[b("div",{class:"text-kin-glow-1 flex items-center gap-3 text-xs font-medium uppercase tracking-wide before:h-px before:flex-1 before:bg-[linear-gradient(90deg,transparent,var(--kin-glow-1),transparent)] before:opacity-30 before:content-[''] after:h-px after:flex-1 after:bg-[linear-gradient(90deg,transparent,var(--kin-glow-1),transparent)] after:opacity-30 after:content-['']",role:"separator","aria-hidden":"true",children:b("span",{children:"New"})}),e.value.map((l,f)=>{if(l.role==="assistant"&&!l.content.trim())return null;const d=u;u+=1;const p=f===e.value.length-1,h=t.value&&p&&l.role==="assistant";return b(t6,{message:l,isStreaming:h,animationIndex:d},l.id)}),o&&b(e6,{})]})}function e6(){return b("div",{class:"animate-kin-message-in inline-flex flex-col self-start",role:"status","aria-label":"Kin is typing",children:[b("div",{class:"min-h-11 border-kin-border bg-kin-bubble-assistant inline-flex w-fit items-center gap-1.5 rounded-2xl rounded-bl border px-4 py-3","aria-hidden":"true",children:[b("span",{class:mn}),b("span",{class:mn,style:{animationDelay:"0.15s"}}),b("span",{class:mn,style:{animationDelay:"0.3s"}})]}),b("div",{class:g0,"aria-hidden":"true",children:[b("span",{children:"Kin"}),b("span",{children:"•"}),b("span",{children:"AI Agent"}),b("span",{children:"•"}),b("span",{children:"typing..."})]}),b("span",{class:"sr-only",children:"Kin AI Agent is typing a response"})]})}function t6({message:e,isStreaming:t=!1,animationIndex:n}){const r=e.role==="user",i=e.role==="system",a=r?"user":"assistant",s=r?"You":i?"System":"Kin AI Agent",o=Math.min((n+1)*.05,.35);return i?b("div",{class:"flex justify-center px-4 py-2",role:"status","aria-label":"System notification",children:b("span",{class:"border-kin-border bg-kin-bg-surface text-kin-text-muted rounded-xl border px-3 py-1.5 text-xs",children:e.content})}):b("article",{class:Xx({side:a}),style:{animationDelay:`${o}s`},"aria-label":`Message from ${s}`,children:[b("div",{class:Zx({side:a}),children:r?b("p",{children:e.content}):b(Kx,{content:e.content,isStreaming:t})}),!r&&b("div",{class:g0,"aria-hidden":"true",children:[b("span",{children:"Kin"}),b("span",{children:"•"}),b("span",{children:"AI Agent"}),b("span",{children:"•"}),b("span",{children:t?"typing...":n6(e.timestamp)})]})]})}function n6(e){const n=new Date().getTime()-e.getTime();return n<6e4?"Just now":n<36e5?`${Math.floor(n/6e4)}m ago`:e.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}const Du=Bt({base:"fr inline-flex size-11 items-center justify-center rounded-lg transition-colors duration-200 sm:size-8 [&>svg]:size-4",variants:{variant:{close:"bg-transparent text-kin-text-muted hover:bg-kin-bg-muted hover:text-kin-text",clear:"bg-transparent text-sm text-kin-accent hover:bg-kin-bg-muted",confirm:"text-sm bg-kin-accent text-white hover:opacity-90"}},defaultVariants:{variant:"close"}});function r6({onClose:e,onClearData:t,onSkipToInput:n}){const[r,i]=le(!1),a=o=>{o.key==="Escape"&&(o.preventDefault(),r?i(!1):e())},s=()=>{r?(t(),i(!1)):i(!0)};return b("div",{class:"kin-panel bg-kin-bg-base sm:border-kin-border sm:shadow-kin-panel sm:animate-kin-panel-in sm:w-kin-panel flex h-auto min-h-0 w-full max-w-none flex-1 animate-none flex-col overflow-hidden rounded-none border-0 shadow-none [will-change:transform,opacity] sm:max-w-[calc(100vw-2rem)] sm:rounded-2xl sm:border",role:"dialog","aria-modal":"true","aria-labelledby":"kin-panel-title",onKeyDown:a,children:[b("button",{type:"button",class:"fr bg-kin-bg-elevated text-kin-text absolute -top-full left-1/2 z-[1000000] -translate-x-1/2 rounded-lg px-4 py-2 font-medium no-underline focus:top-2",onClick:n,children:"Skip to chat input"}),b("header",{class:"border-kin-border bg-kin-bg-elevated pl-safe-l pr-safe-r pt-safe-t flex items-center justify-between border-b px-4 pb-4 sm:p-4",children:[b("h2",{id:"kin-panel-title",class:"text-kin-text text-base font-semibold sm:text-sm sm:font-medium",children:"Kin Assistant"}),b("div",{class:"flex items-center gap-1",children:[b("button",{class:Du({variant:r?"confirm":"clear"}),"aria-label":r?"Confirm clear data":"Clear my data",title:r?"Click again to confirm":"Clear my data",type:"button",onClick:s,onBlur:()=>i(!1),children:r?"✓":b(nf,{})}),b("button",{class:Du({variant:"close"}),"aria-label":"Close chat",type:"button",onClick:e,children:b(tf,{})})]})]}),b(Jx,{})]})}const i6={"application/pdf":{maxSize:1e7},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{maxSize:1e7},"application/msword":{maxSize:1e7},"text/plain":{maxSize:1e6},"image/jpeg":{maxSize:1e7},"image/png":{maxSize:1e7},"image/webp":{maxSize:1e7}},a6=".pdf,.docx,.doc,.txt,.jpg,.jpeg,.png,.webp";function s6(e){const t=i6[e.type];return t?e.size>t.maxSize?{valid:!1,error:`File is too large. Maximum size is ${Math.round(t.maxSize/1e6)}MB.`}:e.size===0?{valid:!1,error:"The file appears to be empty."}:{valid:!0}:{valid:!1,error:"Unsupported file format. Please upload a PDF, Word document, text file, or image."}}function o6(e){return new Promise((t,n)=>{const r=new FileReader;r.onload=()=>{typeof r.result=="string"?t(r.result):n(new Error("Failed to read file"))},r.onerror=()=>n(r.error),r.readAsDataURL(e)})}function u6({url:e,onMessage:t,onOpen:n,onClose:r,onError:i}){let a=null,s=[];const o=()=>{if(!(!a||a.readyState!==WebSocket.OPEN)){for(const l of s)a.send(JSON.stringify({type:"user_message",content:l}));s=[]}};return(()=>{a=new WebSocket(e),a.onopen=()=>{n(),o()},a.onmessage=l=>{try{const f=JSON.parse(l.data);t(f)}catch(f){console.error("Failed to parse message:",f)}},a.onclose=()=>{s=[],r(),a=null},a.onerror=l=>{i(l)}})(),{sendMessage:l=>{a&&(a.readyState===WebSocket.OPEN?a.send(JSON.stringify({type:"user_message",content:l})):a.readyState===WebSocket.CONNECTING&&s.push(l))},uploadFile:async(l,f)=>{if(!a||a.readyState!==WebSocket.OPEN)return{success:!1,error:"Not connected"};const d=s6(l);if(!d.valid)return{success:!1,error:d.error};try{const p=await o6(l);return!a||a.readyState!==WebSocket.OPEN?{success:!1,error:"Connection lost while reading file. Please try again."}:(a.send(JSON.stringify({type:"file_upload",fileType:f,fileName:l.name,mimeType:l.type,data:p})),{success:!0})}catch(p){return{success:!1,error:p instanceof Error?p.message:"Failed to read file"}}},clearData:()=>{a&&a.readyState===WebSocket.OPEN&&a.send(JSON.stringify({type:"clear_data"}))},disconnect:()=>{a&&(a.close(),a=null)},isConnected:()=>(a==null?void 0:a.readyState)===WebSocket.OPEN}}const Pu=2e3,Mu="absolute bottom-full left-1/2 mb-2 -translate-x-1/2 whitespace-nowrap rounded-lg bg-red-600 px-3 py-2 text-xs text-white animate-kin-error-in",l6="inline-flex items-center whitespace-nowrap rounded-3xl ring-1 ring-[color-mix(in_srgb,var(--kin-accent)_30%,transparent)] bg-[color-mix(in_srgb,var(--kin-accent)_12%,transparent)] px-3.5 py-1.5 text-sm font-medium text-kin-accent opacity-0 transition-[background,shadow,transform] duration-150 hover:ring-kin-accent hover:bg-kin-accent hover:text-white focus-visible:shadow-[0_0_0_2px_var(--kin-focus-ring)] active:scale-95 animate-kin-starter-fade-in",c6=Bt({base:"kin-launcher w-full max-w-full sm:max-w-[calc(100vw-3rem)] sm:focus-within:w-kin-panel",variants:{open:{true:"border-t border-kin-border sm:w-kin-panel sm:border-0",false:"px-3 pt-2 pb-safe-b sm:w-96 sm:px-0 sm:pt-0 sm:pb-0 sm:transition-[width] sm:duration-300 sm:ease-kin-open"}}}),d6=Bt({base:"kin-launcher-input-wrapper relative flex rounded-3xl [&::before]:hidden [&::after]:hidden sm:[&::before]:block sm:[&::after]:block",variants:{open:{true:"rounded-none bg-kin-bg-base shadow-none px-3 pt-2 pb-safe-b sm:rounded-3xl sm:bg-kin-bg-elevated sm:shadow-kin-border",false:"bg-kin-bg-elevated shadow-kin-border focus-within:shadow-[0_0_0_2px_var(--kin-accent)] sm:focus-within:shadow-kin-border"},pills:{true:"flex-col items-stretch gap-2 pt-2.5 pb-1 pl-3.5 pr-1.5 sm:py-1 sm:pt-2.5",false:"items-center gap-2 py-1.5 pl-4 pr-1.5 sm:gap-3 sm:py-1"}}}),Bu=Bt({base:"fr inline-flex size-10 shrink-0 items-center justify-center rounded-full transition-all duration-200 disabled:cursor-not-allowed disabled:opacity-50 sm:size-9 [&>svg]:size-4",variants:{variant:{attach:"-mr-2 bg-transparent text-kin-text-muted hover:bg-kin-bg-muted hover:text-kin-text",send:"kin-launcher-send bg-kin-bg-muted text-kin-text-muted enabled:bg-kin-accent enabled:text-white enabled:hover:scale-105 sm:enabled:bg-kin-text sm:enabled:text-kin-bg-base"}}});function f6({isOpen:e,starterPrompts:t,onOpen:n,onClose:r,onSendMessage:i,onConnect:a,onUploadFile:s,inputRef:o}){const[u,l]=le(""),[f,d]=le(!1),p=Oe(null),h=o??p,m=Oe(null),[T,w]=le(Y.isStreaming.value),[x,S]=le(Y.connectionState.value),[C,O]=le(Y.messages.value.length>0),[P,A]=le(Y.uploadState.value),[U,v]=le(Y.uploadError.value),[F,I]=le(Y.uploadFileName.value),[$,B]=le(Y.quickReplies.value);Ae(()=>or(()=>{w(Y.isStreaming.value),S(Y.connectionState.value),O(Y.messages.value.length>0),A(Y.uploadState.value),v(Y.uploadError.value),I(Y.uploadFileName.value),B(Y.quickReplies.value)}),[]);const Q=x==="connected",ae=x==="connecting",X=x==="disconnected",Z=x==="idle",ee=P==="uploading"||P==="processing",V=u.length>Pu,Ue=u.trim(),y=Ue.length>0,Le=y&&!T&&!ee&&!V&&(Q||ae),Pe=Q&&!T&&!ee;Ae(()=>{e&&h.current&&requestAnimationFrame(()=>{var ne;(ne=h.current)==null||ne.focus()})},[e]);const k=()=>{d(!0),a(),!e&&C&&n()},he=ne=>{const Ce=ne.relatedTarget;Ce!=null&&Ce.closest(".kin-launcher-input-wrapper")||d(!1)},ze=ne=>{if(ne.preventDefault(),!Le)return;const Ce=Ue;Y.addMessage({role:"user",content:Ce}),e||n(),i(Ce),l("")},xe=ne=>{ne.key==="Enter"&&!ne.shiftKey&&(ne.preventDefault(),ze(ne)),ne.key==="Escape"&&e&&(ne.preventDefault(),ne.stopPropagation(),r())},be=ne=>{var rn;const Ce=ne.target,Ct=(rn=Ce.files)==null?void 0:rn[0];Ct&&(e||n(),s(Ct,"cv")),Ce.value=""},Ge=()=>{var ne;(ne=m.current)==null||ne.click()},Qe=()=>ee?F?`Uploading ${F}...`:"Uploading file...":ae?"Connecting...":X?"Disconnected - Click to retry":T?"Waiting for response...":!e&&C?"Continue conversation...":"Ask me anything...",Ke=()=>ee?F?`Uploading ${F}...`:"Uploading file...":T?"Waiting for response":Z?"Click to connect":ae?"Connecting...":!Q&&!y?"Enter a message to send":Q?y?"Send message":"Enter a message to send":"Cannot send message",ct=()=>ee?"Uploading...":Pe?"Attach file (CV, document, or image)":"Cannot upload file",At=ne=>{a(),Y.addMessage({role:"user",content:ne.message}),n(),i(ne.message)},yi=ne=>{e||n(),a(),Y.addMessage({role:"user",content:ne}),i(ne)},wi=$.length>0&&e,Nn=t.length>0&&!C&&f,nn=wi||Nn,gr=ne=>`${Math.min(.03+ne*.04,.19)}s`,br=({key:ne,label:Ce,index:Ct,onClick:rn,onPointerDown:Ai})=>b("button",{type:"button",class:l6,style:{animationDelay:gr(Ct)},onPointerDown:Ai,onClick:rn,children:Ce},ne);return b("div",{class:c6({open:e}),role:"search","aria-label":"Chat with Kin AI",children:b("form",{onSubmit:ze,class:"relative",children:[b("div",{class:d6({open:e,pills:nn}),children:[nn&&b("div",{class:"flex flex-wrap gap-1.5",children:Nn?t.map((ne,Ce)=>br({key:`s-${Ce}`,label:ne.label,index:Ce,onPointerDown:Ct=>Ct.preventDefault(),onClick:()=>At(ne)})):$.map((ne,Ce)=>br({key:`q-${Ce}`,label:ne,index:Ce,onClick:()=>yi(ne)}))}),b("div",{class:"flex flex-1 items-center gap-3",children:[b("label",{for:"kin-input",class:"sr-only",children:"Ask Kin a question"}),b("input",{id:"kin-input",ref:h,type:"text",class:"text-kin-text placeholder:text-kin-text-muted min-w-0 flex-1 border-none bg-transparent py-2.5 text-base outline-none disabled:cursor-not-allowed sm:py-3 sm:text-sm",placeholder:nn?"Or type a message...":Qe(),value:u,onInput:ne=>l(ne.target.value),onFocus:k,onBlur:he,onKeyDown:xe,"aria-describedby":"kin-input-status",autoComplete:"off",disabled:ee}),b("input",{ref:m,type:"file",class:"sr-only",accept:a6,onChange:be,"aria-hidden":"true",tabIndex:-1}),b("button",{type:"button",class:Bu({variant:"attach"}),disabled:!Pe,"aria-label":ct(),onClick:Ge,children:ee?b(af,{class:"animate-kin-spin"}):b(rf,{})}),b("button",{type:"submit",class:Bu({variant:"send"}),disabled:!Le,"aria-label":Ke(),children:b(ef,{})})]})]}),b("div",{id:"kin-input-status",class:"sr-only",role:"status","aria-live":"polite",children:[ae&&"Connecting to Kin...",X&&"Connection lost. Click input to retry.",T&&"Kin is responding...",ee&&(F?`Uploading ${F}...`:"Uploading file...")]}),U&&P==="error"&&b("div",{class:`${Mu} max-w-[calc(100%-32px)] truncate`,role:"alert",children:U}),V&&b("div",{class:Mu,role:"alert",children:["Message too long (",u.length.toLocaleString(),"/",Pu.toLocaleString()," characters)"]})]})})}const h6=Bt({base:"kin-widget font-kin text-kin text-kin-text fixed inset-x-0 bottom-0 z-[999999] flex w-full flex-col items-stretch overflow-hidden sm:inset-x-auto sm:bottom-6 sm:left-1/2 sm:w-auto sm:-translate-x-1/2 sm:items-center sm:gap-4 sm:overflow-visible",variants:{open:{true:"top-0 h-dvh bg-kin-bg-base [touch-action:manipulation] sm:top-auto sm:h-auto sm:min-h-[50vh] sm:max-h-[90vh] sm:bg-transparent sm:[touch-action:auto]",false:""}}});function p6({starterPrompts:e,onSendMessage:t,onOpen:n,onClose:r,onConnect:i,onClearData:a,onUploadFile:s,embedded:o=!1}){const[u,l]=le(o||Y.isOpen.value),f=Oe(null),d=Oe(null),p=Oe(null);Ae(()=>or(()=>{l(o||Y.isOpen.value)}),[o]),Ae(()=>{o&&!Y.isOpen.value&&n()},[o,n]),Ae(()=>{if(!u||o)return;const w=window.matchMedia("(max-width: 639px)");let x=0,S="",C=!1;const O=()=>{C||(x=window.scrollY,S=document.body.style.overflow,document.body.style.overflow="hidden",C=!0)},P=()=>{C&&(document.body.style.overflow=S,window.scrollTo(0,x),C=!1)},A=()=>{w.matches?O():P()};return A(),w.addEventListener("change",A),()=>{w.removeEventListener("change",A),P()}},[u,o]);const h=Me(()=>{d.current=document.activeElement,n()},[n]),m=Me(()=>{var w;r(),(w=d.current)==null||w.focus()},[r]),T=Me(()=>{var w;(w=p.current)==null||w.focus()},[]);return Ae(()=>{if(!u)return;const w=()=>{var C;let S=document.activeElement;for(;(C=S==null?void 0:S.shadowRoot)!=null&&C.activeElement;)S=S.shadowRoot.activeElement;return S},x=S=>{if(S.key!=="Tab")return;const C=f.current;if(!C)return;const O=C.querySelectorAll('button:not([disabled]), input:not([disabled]), [tabindex]:not([tabindex="-1"])');if(O.length===0)return;const P=O[0],A=O[O.length-1];if(!P||!A)return;const U=w();S.shiftKey&&U===P?(S.preventDefault(),A.focus()):!S.shiftKey&&U===A&&(S.preventDefault(),P.focus())};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[u]),b("div",{ref:f,class:h6({open:u}),role:"region","aria-label":"Kin AI Chat",children:[b("div",{class:"sr-only",role:"status","aria-live":"polite","aria-atomic":"true",children:u?"Chat panel opened":""}),u&&b(r6,{onClose:m,onClearData:a,onSkipToInput:T}),b(f6,{isOpen:u,starterPrompts:e,onOpen:h,onClose:m,onSendMessage:t,onConnect:i,onUploadFile:s,inputRef:p})]})}const m6=`*{box-sizing:border-box;font:inherit;border:0 solid;-webkit-tap-highlight-color:transparent}button{all:unset;cursor:pointer;touch-action:manipulation}ul,ol,li,p{margin:0;padding:0}ul,ol{list-style:none}svg{display:block}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-x-0{left:0;right:0}.-top-full{top:-100%}.bottom-0{bottom:0}.bottom-full{bottom:100%}.left-1\\/2{left:50%}.top-0{top:0}.z-\\[1000000\\]{z-index:1000000}.z-\\[999999\\]{z-index:999999}.mx-auto{margin-left:auto;margin-right:auto}.-mr-2{margin-right:-.5rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mt-1\\.5{margin-top:.375rem}.block{display:block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.hidden{display:none}.size-10{width:2.5rem;height:2.5rem}.size-11{width:2.75rem;height:2.75rem}.size-12{width:3rem;height:3rem}.h-2{height:.5rem}.h-auto{height:auto}.h-dvh{height:100dvh}.h-full{height:100%}.min-h-0{min-height:0px}.min-h-11{min-height:2.75rem}.w-2{width:.5rem}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.min-w-0{min-width:0px}.max-w-\\[85\\%\\]{max-width:85%}.max-w-\\[calc\\(100\\%-32px\\)\\]{max-width:calc(100% - 32px)}.max-w-full{max-width:100%}.max-w-none{max-width:none}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.-translate-x-1\\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes kin-error-in{0%{opacity:0;transform:translate(-50%) translateY(4px)}to{opacity:1;transform:translate(-50%) translateY(0)}}.animate-kin-error-in{animation:kin-error-in .2s ease}.animate-kin-fade-in{animation:kin-fade .4s ease both}@keyframes kin-slide-up{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.animate-kin-message-in{animation:kin-slide-up .3s cubic-bezier(.32,.72,0,1) both}@keyframes spin{to{transform:rotate(360deg)}}.animate-kin-spin{animation:spin 1s linear infinite}@keyframes kin-fade{0%{opacity:0}to{opacity:1}}.animate-kin-starter-fade-in{animation:kin-fade .22s ease-out forwards}@keyframes kin-typing{0%,to{opacity:.3;transform:scale(.85)}50%{opacity:1;transform:scale(1)}}.animate-kin-typing{animation:kin-typing 1.4s ease-in-out infinite}.animate-none{animation:none}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-stretch{align-items:stretch}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.self-start{align-self:flex-start}.self-end{align-self:flex-end}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overscroll-contain{overscroll-behavior:contain}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.break-words{overflow-wrap:break-word}.rounded-2xl{border-radius:1rem}.rounded-3xl{border-radius:1.5rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-none{border-radius:0}.rounded-xl{border-radius:.75rem}.rounded-bl{border-bottom-left-radius:.25rem}.rounded-br{border-bottom-right-radius:.25rem}.border{border-width:1px}.border-0{border-width:0px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-none{border-style:none}.border-kin-border{border-color:var(--kin-border)}.bg-\\[color-mix\\(in_srgb\\,var\\(--kin-accent\\)_12\\%\\,transparent\\)\\]{background-color:color-mix(in srgb,var(--kin-accent) 12%,transparent)}.bg-kin-accent{background-color:var(--kin-accent)}.bg-kin-bg-base{background-color:var(--kin-bg-base)}.bg-kin-bg-elevated{background-color:var(--kin-bg-elevated)}.bg-kin-bg-muted{background-color:var(--kin-bg-muted)}.bg-kin-bg-surface{background-color:var(--kin-bg-surface)}.bg-kin-bubble-assistant{background-color:var(--kin-bubble-assistant)}.bg-kin-bubble-user{background-color:var(--kin-bubble-user)}.bg-kin-text-muted{background-color:var(--kin-text-muted)}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity))}.bg-transparent{background-color:transparent}.p-2{padding:.5rem}.p-4{padding:1rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-3\\.5{padding-left:.875rem;padding-right:.875rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.pb-1{padding-bottom:.25rem}.pb-4{padding-bottom:1rem}.pb-safe-b{padding-bottom:max(.5rem,calc(env(safe-area-inset-bottom,0px) + .5rem))}.pl-1{padding-left:.25rem}.pl-3\\.5{padding-left:.875rem}.pl-4{padding-left:1rem}.pl-safe-l{padding-left:max(1rem,env(safe-area-inset-left,1rem))}.pr-1\\.5{padding-right:.375rem}.pr-safe-r{padding-right:max(1rem,env(safe-area-inset-right,1rem))}.pt-2{padding-top:.5rem}.pt-2\\.5{padding-top:.625rem}.pt-safe-t{padding-top:max(1rem,env(safe-area-inset-top,1rem))}.text-center{text-align:center}.font-kin{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.text-base{font-size:1rem;line-height:1.5rem}.text-kin{font-size:max(14px,1rem);line-height:1.5}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.leading-relaxed{line-height:1.625}.tracking-wide{letter-spacing:.025em}.text-kin-accent{color:var(--kin-accent)}.text-kin-bubble-assistant-text{color:var(--kin-bubble-assistant-text)}.text-kin-bubble-user-text{color:var(--kin-bubble-user-text)}.text-kin-glow-1{color:var(--kin-glow-1)}.text-kin-text{color:var(--kin-text)}.text-kin-text-muted{color:var(--kin-text-muted)}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.underline{text-decoration-line:underline}.no-underline{text-decoration-line:none}.underline-offset-2{text-underline-offset:2px}.opacity-0{opacity:0}.opacity-50{opacity:.5}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-kin-border{--tw-shadow: 0 0 0 1px var(--kin-border);--tw-shadow-colored: 0 0 0 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-none{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-kin-border{--tw-shadow-color: var(--kin-border);--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-\\[color-mix\\(in_srgb\\,var\\(--kin-accent\\)_30\\%\\,transparent\\)\\]{--tw-ring-color: color-mix(in srgb,var(--kin-accent) 30%,transparent)}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition-\\[background\\,shadow\\,transform\\]{transition-property:background,shadow,transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.fr:focus-visible{outline:2px solid var(--kin-accent);outline-offset:2px}.\\[touch-action\\:manipulation\\]{touch-action:manipulation}.\\[will-change\\:transform\\,opacity\\]{will-change:transform,opacity}:host{--kin-bg-base: #0a0a0a;--kin-bg-elevated: #141414;--kin-bg-surface: #1a1a1a;--kin-bg-muted: #262626;--kin-border: rgba(255, 255, 255, .08);--kin-border-subtle: rgba(255, 255, 255, .05);--kin-text: #ffffff;--kin-text-secondary: #a1a1a1;--kin-text-muted: #8a8a8a;--kin-accent: #635bff;--kin-bubble-user: #f5f5f5;--kin-bubble-user-text: #171717;--kin-bubble-assistant: #1a1a1a;--kin-bubble-assistant-text: #ffffff;--kin-glow-1: #ff6b6b;--kin-glow-2: #c850c0;--kin-glow-3: #635bff;--kin-focus-ring: var(--kin-accent);--kin-transition: .2s ease}.kin-launcher-input-wrapper:before,.kin-launcher-input-wrapper:after{content:"";position:absolute;background:linear-gradient(90deg,var(--kin-glow-1),var(--kin-glow-2),var(--kin-glow-3),var(--kin-glow-2),var(--kin-glow-1));background-size:300% 100%;animation:kin-gradient 4s ease infinite;transition:opacity var(--kin-transition);pointer-events:none}.kin-launcher-input-wrapper:before{top:-1px;right:-1px;bottom:-1px;left:-1px;border-radius:25px;padding:2px;-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude;opacity:.85}.kin-launcher-input-wrapper:after{top:-2px;right:-2px;bottom:-2px;left:-2px;border-radius:26px;filter:blur(6px);opacity:.35;z-index:-1}.kin-launcher-input-wrapper:focus-within:before{opacity:1}.kin-launcher-input-wrapper:focus-within:after{opacity:.5}@keyframes kin-gradient{0%,to{background-position:0% 50%}50%{background-position:100% 50%}}.kin-markdown p{margin:0 0 1em}.kin-markdown p:last-child{margin-bottom:0}.kin-markdown :is(strong,b){font-weight:600}.kin-markdown :is(em,i){font-style:italic}.kin-markdown code{background:rgba(255,255,255,.1);padding:.15em .4em;border-radius:4px;font-family:SF Mono,Monaco,Consolas,monospace;font-size:.875em}.kin-markdown pre{background:rgba(0,0,0,.4);padding:14px 16px;border-radius:8px;overflow-x:auto;margin:1em 0;border:1px solid var(--kin-border)}.kin-markdown pre code{background:none;padding:0;font-size:.85em;line-height:1.5}.kin-markdown :is(ul,ol){margin:.75em 0;padding-left:1.5em}.kin-markdown ul{list-style-type:disc}.kin-markdown ol{list-style-type:decimal}.kin-markdown li{margin:.35em 0}.kin-markdown li::marker{color:var(--kin-text-muted)}.kin-markdown :is(ul,ol) :is(ul,ol){margin:.25em 0}.kin-markdown blockquote{border-left:3px solid var(--kin-accent);margin:1em 0;padding:.5em 0 .5em 1em;color:var(--kin-text-secondary);font-style:italic}.kin-markdown :is(h1,h2,h3,h4){font-weight:600;margin:1.25em 0 .5em;line-height:1.3}.kin-markdown :is(h1,h2,h3):first-child{margin-top:0}.kin-markdown h1{font-size:1.4em}.kin-markdown h2{font-size:1.25em}.kin-markdown h3{font-size:1.1em}.kin-markdown table{width:100%;border-collapse:collapse;margin:1em 0;font-size:.9em}.kin-markdown :is(th,td){padding:.5em .75em;border:1px solid var(--kin-border);text-align:left}.kin-markdown th{background:var(--kin-bg-muted);font-weight:600}.kin-markdown hr{border:none;border-top:1px solid var(--kin-border);margin:1.5em 0}.kin-markdown hr+p{display:flex;flex-wrap:wrap;align-items:center;gap:5px;font-size:.75em;color:var(--kin-text-muted);margin:-1em 0 0;line-height:1.6}.kin-markdown hr+p a{display:inline-flex;align-items:center;padding:1px 8px 2px;background:color-mix(in srgb,var(--kin-accent) 10%,transparent);border:1px solid color-mix(in srgb,var(--kin-accent) 22%,transparent);border-radius:10px;color:var(--kin-accent);text-decoration:none;font-weight:500;white-space:nowrap;transition:background var(--kin-transition),border-color var(--kin-transition)}.kin-markdown hr+p a:hover{background:color-mix(in srgb,var(--kin-accent) 20%,transparent);border-color:var(--kin-accent)}.kin-markdown input[type=checkbox]{margin-right:.5em;accent-color:var(--kin-accent)}.kin-markdown .streamdown-caret{display:inline-block;width:2px;height:1em;background:var(--kin-accent);margin-left:2px;animation:kin-caret 1s ease-in-out infinite;vertical-align:text-bottom}@keyframes kin-caret{0%,to{opacity:1}50%{opacity:0}}@media (prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}@media (forced-colors: active){.kin-launcher-input-wrapper:before,.kin-launcher-input-wrapper:after{display:none}.kin-launcher-input-wrapper,.kin-panel,button{border:1px solid ButtonBorder!important}}.placeholder\\:text-kin-text-muted::-moz-placeholder{color:var(--kin-text-muted)}.placeholder\\:text-kin-text-muted::placeholder{color:var(--kin-text-muted)}.before\\:h-px:before{content:var(--tw-content);height:1px}.before\\:flex-1:before{content:var(--tw-content);flex:1 1 0%}.before\\:bg-\\[linear-gradient\\(90deg\\,transparent\\,var\\(--kin-glow-1\\)\\,transparent\\)\\]:before{content:var(--tw-content);background-image:linear-gradient(90deg,transparent,var(--kin-glow-1),transparent)}.before\\:opacity-30:before{content:var(--tw-content);opacity:.3}.before\\:content-\\[\\'\\'\\]:before{--tw-content: "";content:var(--tw-content)}.after\\:h-px:after{content:var(--tw-content);height:1px}.after\\:flex-1:after{content:var(--tw-content);flex:1 1 0%}.after\\:bg-\\[linear-gradient\\(90deg\\,transparent\\,var\\(--kin-glow-1\\)\\,transparent\\)\\]:after{content:var(--tw-content);background-image:linear-gradient(90deg,transparent,var(--kin-glow-1),transparent)}.after\\:opacity-30:after{content:var(--tw-content);opacity:.3}.after\\:content-\\[\\'\\'\\]:after{--tw-content: "";content:var(--tw-content)}.focus-within\\:shadow-\\[0_0_0_2px_var\\(--kin-accent\\)\\]:focus-within{--tw-shadow: 0 0 0 2px var(--kin-accent);--tw-shadow-colored: 0 0 0 2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\\:bg-kin-accent:hover{background-color:var(--kin-accent)}.hover\\:bg-kin-bg-muted:hover{background-color:var(--kin-bg-muted)}.hover\\:text-kin-text:hover{color:var(--kin-text)}.hover\\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.hover\\:decoration-2:hover{text-decoration-thickness:2px}.hover\\:opacity-90:hover{opacity:.9}.hover\\:ring-kin-accent:hover{--tw-ring-color: var(--kin-accent)}.focus\\:top-2:focus{top:.5rem}.focus-visible\\:rounded-\\[2px\\]:focus-visible{border-radius:2px}.focus-visible\\:shadow-\\[0_0_0_2px_var\\(--kin-focus-ring\\)\\]:focus-visible{--tw-shadow: 0 0 0 2px var(--kin-focus-ring);--tw-shadow-colored: 0 0 0 2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.active\\:scale-95:active{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.enabled\\:bg-kin-accent:enabled{background-color:var(--kin-accent)}.enabled\\:text-white:enabled{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.enabled\\:hover\\:scale-105:hover:enabled{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-50:disabled{opacity:.5}@media (min-width: 640px){.sm\\:inset-x-auto{left:auto;right:auto}.sm\\:bottom-6{bottom:1.5rem}.sm\\:left-1\\/2{left:50%}.sm\\:top-auto{top:auto}.sm\\:size-8{width:2rem;height:2rem}.sm\\:size-9{width:2.25rem;height:2.25rem}.sm\\:h-auto{height:auto}.sm\\:max-h-\\[90vh\\]{max-height:90vh}.sm\\:min-h-\\[50vh\\]{min-height:50vh}.sm\\:w-96{width:24rem}.sm\\:w-auto{width:auto}.sm\\:w-kin-panel{width:450px}.sm\\:max-w-\\[calc\\(100vw-2rem\\)\\]{max-width:calc(100vw - 2rem)}.sm\\:max-w-\\[calc\\(100vw-3rem\\)\\]{max-width:calc(100vw - 3rem)}.sm\\:-translate-x-1\\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes kin-slide-up{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.sm\\:animate-kin-panel-in{animation:kin-slide-up .35s cubic-bezier(.32,.72,0,1) both}.sm\\:items-center{align-items:center}.sm\\:gap-3{gap:.75rem}.sm\\:gap-4{gap:1rem}.sm\\:overflow-visible{overflow:visible}.sm\\:overscroll-auto{overscroll-behavior:auto}.sm\\:rounded-2xl{border-radius:1rem}.sm\\:rounded-3xl{border-radius:1.5rem}.sm\\:border{border-width:1px}.sm\\:border-0{border-width:0px}.sm\\:border-kin-border{border-color:var(--kin-border)}.sm\\:bg-kin-bg-elevated{background-color:var(--kin-bg-elevated)}.sm\\:bg-transparent{background-color:transparent}.sm\\:p-4{padding:1rem}.sm\\:px-0{padding-left:0;padding-right:0}.sm\\:px-4{padding-left:1rem;padding-right:1rem}.sm\\:py-1{padding-top:.25rem;padding-bottom:.25rem}.sm\\:py-3{padding-top:.75rem;padding-bottom:.75rem}.sm\\:pb-0{padding-bottom:0}.sm\\:pt-0{padding-top:0}.sm\\:pt-2\\.5{padding-top:.625rem}.sm\\:text-sm{font-size:.875rem;line-height:1.25rem}.sm\\:font-medium{font-weight:500}.sm\\:shadow-kin-border{--tw-shadow: 0 0 0 1px var(--kin-border);--tw-shadow-colored: 0 0 0 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.sm\\:shadow-kin-panel{--tw-shadow: 0 4px 24px rgba(0, 0, 0, .12), 0 0 0 1px var(--kin-border);--tw-shadow-colored: 0 4px 24px var(--tw-shadow-color), 0 0 0 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.sm\\:shadow-kin-border{--tw-shadow-color: var(--kin-border);--tw-shadow: var(--tw-shadow-colored)}.sm\\:transition-\\[width\\]{transition-property:width;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.sm\\:duration-300{transition-duration:.3s}.sm\\:ease-kin-open{transition-timing-function:cubic-bezier(.32,.72,0,1)}.sm\\:\\[touch-action\\:auto\\]{touch-action:auto}.sm\\:focus-within\\:w-kin-panel:focus-within{width:450px}.sm\\:focus-within\\:shadow-kin-border:focus-within{--tw-shadow: 0 0 0 1px var(--kin-border);--tw-shadow-colored: 0 0 0 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);--tw-shadow-color: var(--kin-border);--tw-shadow: var(--tw-shadow-colored)}.sm\\:enabled\\:bg-kin-text:enabled{background-color:var(--kin-text)}.sm\\:enabled\\:text-kin-bg-base:enabled{color:var(--kin-bg-base)}}.\\[\\&\\:\\:-webkit-scrollbar-thumb\\]\\:rounded-\\[3px\\]::-webkit-scrollbar-thumb{border-radius:3px}.\\[\\&\\:\\:-webkit-scrollbar-thumb\\]\\:bg-kin-bg-muted::-webkit-scrollbar-thumb{background-color:var(--kin-bg-muted)}.\\[\\&\\:\\:-webkit-scrollbar-track\\]\\:bg-transparent::-webkit-scrollbar-track{background-color:transparent}.\\[\\&\\:\\:-webkit-scrollbar\\]\\:w-1\\.5::-webkit-scrollbar{width:.375rem}.\\[\\&\\:\\:after\\]\\:hidden:after{display:none}@media (min-width: 640px){.sm\\:\\[\\&\\:\\:after\\]\\:block:after{display:block}}.\\[\\&\\:\\:before\\]\\:hidden:before{display:none}@media (min-width: 640px){.sm\\:\\[\\&\\:\\:before\\]\\:block:before{display:block}}.\\[\\&\\>svg\\]\\:size-4>svg{width:1rem;height:1rem}
|
|
114
|
+
`,b0=["gray","mauve","slate","sage","olive","sand","tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","orange","sky","mint","lime","yellow","amber","bronze","gold"],E0={gray:[[.178,0,null],[.213,0,null],[.254,0,null],[.283,0,null],[.313,0,null],[.349,0,null],[.402,0,null],[.488,0,null],[.538,0,null],[.584,0,null],[.77,0,null],[.949,0,null]],mauve:[[.18,.004,307.8],[.215,.004,307.8],[.255,.006,306.5],[.284,.008,307.8],[.314,.009,306.9],[.35,.01,304],[.402,.012,304.4],[.492,.016,300.7],[.54,.017,294],[.586,.017,295.4],[.77,.014,296.6],[.949,.003,286.3]],slate:[[.179,.004,286],[.213,.004,264.4],[.253,.006,261.2],[.283,.007,259.5],[.311,.008,259.7],[.346,.01,256.5],[.398,.012,253.8],[.49,.016,247.6],[.537,.015,261.1],[.583,.014,263.3],[.768,.01,261.3],[.949,.003,264.6]],sage:[[.179,.004,167.4],[.211,.004,160.2],[.251,.004,164.2],[.281,.005,164.9],[.311,.005,167.4],[.347,.006,167.4],[.399,.008,167.4],[.488,.009,169.8],[.533,.018,170.8],[.579,.016,170.5],[.766,.01,167.5],[.947,.002,167.7]],olive:[[.18,.004,128.3],[.212,.004,128.3],[.252,.005,129],[.281,.006,131.4],[.31,.007,131.4],[.346,.008,134.4],[.399,.01,136],[.488,.012,140.8],[.535,.018,139.6],[.581,.016,140.1],[.766,.013,139.5],[.947,.003,144.8]],sand:[[.178,.002,106.6],[.213,.002,106.6],[.253,.003,106.6],[.283,.004,99],[.312,.004,100.7],[.349,.006,102.2],[.401,.007,96.1],[.49,.01,91.7],[.535,.011,94.1],[.581,.011,94],[.767,.009,97.4],[.948,.003,106.4]],tomato:[[.187,.012,19.6],[.208,.017,32],[.254,.054,26.9],[.291,.087,28.2],[.331,.097,28.7],[.38,.099,30],[.447,.107,31.5],[.538,.13,32.9],[.627,.194,33.3],[.665,.179,34.1],[.784,.164,36],[.899,.047,31.1]],red:[[.188,.013,19.4],[.205,.022,14.7],[.25,.064,13.1],[.289,.096,14.3],[.332,.107,15.5],[.383,.111,16.9],[.451,.121,18.9],[.544,.147,21.4],[.625,.193,23],[.665,.177,23.1],[.784,.162,22.3],[.902,.053,6.14]],ruby:[[.189,.014,2.9],[.208,.016,5.29],[.254,.06,6.54],[.292,.089,5.5],[.333,.1,6.4],[.382,.105,7.59],[.448,.117,9.02],[.544,.145,11.1],[.628,.195,13.2],[.664,.179,13.7],[.786,.161,17],[.905,.053,355.8]],crimson:[[.189,.014,354.2],[.207,.022,352.9],[.256,.059,353.9],[.293,.094,354.1],[.333,.104,354.7],[.382,.109,355.5],[.45,.12,356.7],[.542,.148,358.3],[.634,.213,1.3],[.664,.197,1.95],[.787,.167,6.72],[.909,.054,346.7]],pink:[[.191,.017,334.9],[.207,.031,338.2],[.261,.061,337.5],[.299,.098,340.1],[.338,.104,340.6],[.389,.107,341.6],[.459,.119,342.6],[.545,.145,344.1],[.617,.208,346.1],[.65,.197,346.2],[.789,.19,350.7],[.905,.059,343.2]],plum:[[.19,.017,327],[.21,.031,327.7],[.266,.062,326.7],[.307,.088,325.3],[.343,.095,324.6],[.389,.097,324.2],[.456,.106,323.4],[.545,.128,322.2],[.579,.188,322.1],[.616,.182,322.1],[.786,.154,322.1],[.906,.055,325.8]],purple:[[.192,.022,316],[.213,.031,314.3],[.266,.062,312],[.308,.083,310.7],[.344,.091,310.1],[.388,.097,309.7],[.45,.108,308.7],[.541,.133,307.1],[.555,.183,305.9],[.596,.177,306.3],[.785,.156,307.9],[.911,.049,310.9]],violet:[[.191,.026,290.5],[.211,.032,299.5],[.271,.066,293.9],[.312,.093,291.7],[.348,.099,291.4],[.39,.102,291.8],[.445,.111,291.6],[.516,.131,290.2],[.542,.179,288.1],[.588,.17,289.7],[.778,.137,293.6],[.912,.045,292.6]],iris:[[.193,.022,284.2],[.209,.029,286.5],[.273,.069,278.6],[.319,.102,276.1],[.358,.109,277.4],[.399,.112,279.6],[.448,.12,280.8],[.507,.138,281.1],[.54,.184,278.3],[.587,.172,281.2],[.776,.131,286.6],[.914,.042,287]],indigo:[[.191,.025,276.7],[.209,.03,276],[.272,.069,267.8],[.319,.093,267],[.362,.105,267.5],[.404,.111,268.3],[.45,.12,268.8],[.503,.137,268.4],[.544,.191,267.1],[.59,.176,269.2],[.777,.123,273.3],[.911,.043,270]],blue:[[.193,.026,256.8],[.213,.03,258.8],[.274,.067,254],[.317,.1,248.3],[.365,.108,249.7],[.416,.112,251.7],[.475,.121,252.8],[.541,.14,253.2],[.649,.193,251.8],[.689,.17,251.5],[.768,.135,248.8],[.907,.051,238.3]],cyan:[[.191,.017,219.9],[.214,.018,225.4],[.272,.044,222.5],[.315,.063,222.1],[.362,.07,221.5],[.414,.075,221.7],[.478,.083,221.4],[.558,.098,220.7],[.661,.122,221.5],[.698,.12,219.1],[.786,.115,213.4],[.909,.057,211.7]],teal:[[.189,.012,184.5],[.217,.017,189.3],[.274,.038,186.3],[.317,.055,187],[.363,.06,186.5],[.414,.065,185.4],[.473,.074,184.5],[.539,.087,183.5],[.649,.113,182],[.687,.123,180.3],[.789,.147,175.7],[.905,.072,175.3]],jade:[[.188,.014,166.3],[.216,.018,166.1],[.272,.042,166.8],[.316,.057,168],[.362,.064,168.5],[.411,.068,169.7],[.468,.075,170.6],[.537,.088,171.8],[.642,.115,170.8],[.678,.125,169.9],[.785,.156,167.1],[.903,.078,167]],green:[[.189,.013,163.3],[.213,.016,162.2],[.271,.039,162.7],[.318,.057,161.5],[.365,.066,161.1],[.413,.073,160.7],[.467,.083,159.9],[.527,.096,159.2],[.64,.133,157.8],[.676,.141,157.6],[.78,.166,157.2],[.905,.083,158.3]],grass:[[.188,.014,155.8],[.211,.014,151.5],[.267,.03,150.7],[.319,.052,150.4],[.367,.062,149.9],[.416,.072,149.3],[.468,.084,148.9],[.524,.097,148.2],[.652,.147,147.4],[.69,.145,147.6],[.78,.142,148.5],[.911,.078,144.9]],brown:[[.178,.005,81.5],[.213,.007,51.6],[.254,.013,53.5],[.288,.018,55.4],[.325,.024,55.9],[.37,.032,57.7],[.429,.041,59.8],[.509,.053,62.2],[.633,.078,60.8],[.674,.075,61.5],[.798,.063,62.5],[.918,.036,75.7]],bronze:[[.181,.005,41.6],[.215,.005,41.5],[.255,.008,42.7],[.291,.01,45.5],[.329,.013,43.3],[.374,.016,44.3],[.43,.02,44.8],[.499,.024,45.2],[.627,.046,44.3],[.669,.045,44.3],[.792,.043,44.5],[.915,.017,50.3]],gold:[[.182,.002,106.6],[.216,.006,92.5],[.255,.008,88.3],[.291,.01,86.8],[.329,.011,83.7],[.374,.014,82.4],[.429,.016,80.9],[.498,.02,79.5],[.621,.049,78.1],[.662,.047,77.2],[.794,.041,77.2],[.915,.014,77.4]],sky:[[.19,.024,257.1],[.216,.029,258.5],[.271,.054,251.9],[.322,.07,247.8],[.372,.079,245.8],[.427,.087,243.6],[.488,.098,240.7],[.557,.114,237.2],[.861,.103,217.8],[.908,.073,214.9],[.793,.099,231.7],[.934,.053,214.4]],mint:[[.188,.012,192.3],[.21,.017,196.6],[.269,.039,192.5],[.313,.058,191.6],[.359,.063,188.9],[.41,.067,186.3],[.471,.073,183.4],[.54,.085,179.6],[.87,.1,178],[.916,.08,179.4],[.795,.118,176.4],[.93,.057,168.5]],lime:[[.18,.014,120.3],[.208,.019,129],[.266,.034,132.2],[.317,.047,131.8],[.363,.058,131.6],[.412,.069,131.4],[.464,.08,131.2],[.524,.095,130.9],[.888,.175,126.1],[.942,.175,123.7],[.868,.156,124.8],[.946,.082,122.6]],yellow:[[.181,.013,86],[.209,.017,92.1],[.259,.047,90.3],[.293,.069,94.2],[.333,.079,94.6],[.384,.077,93.3],[.452,.081,91.5],[.535,.095,89.9],[.927,.209,102.1],[.971,.182,109.4],[.9,.166,101.6],[.941,.075,101]],amber:[[.184,.013,77.3],[.212,.018,78.7],[.258,.044,74.6],[.296,.071,76.2],[.337,.081,76.4],[.387,.078,75.1],[.453,.082,74.5],[.536,.096,73.6],[.856,.178,81.4],[.902,.206,97],[.871,.175,85.1],[.935,.072,86]],orange:[[.186,.012,53.7],[.209,.019,67.4],[.257,.045,59.5],[.293,.08,58.6],[.335,.087,58.1],[.386,.087,55.2],[.453,.095,53.1],[.541,.116,49.7],[.689,.191,44.8],[.741,.199,46.3],[.799,.163,50.8],[.925,.052,66.2]]},T0={gray:[[.991,0,null],[.981,0,null],[.953,0,null],[.93,0,null],[.908,0,null],[.884,0,null],[.851,0,null],[.791,0,null],[.643,0,null],[.609,0,null],[.503,0,null],[.243,0,null]],mauve:[[.992,.002,321.1],[.983,.003,311.2],[.956,.006,314.2],[.932,.008,310],[.909,.01,306.6],[.886,.012,304],[.854,.014,300.6],[.794,.019,293.5],[.646,.019,292.6],[.611,.018,293.1],[.505,.016,296.1],[.245,.013,298]],slate:[[.991,.001,286.4],[.982,.003,286.3],[.956,.004,281.9],[.931,.006,283],[.91,.008,283.6],[.888,.009,281.8],[.853,.012,280.8],[.794,.016,278.1],[.646,.016,277.8],[.61,.016,273.2],[.503,.014,263.4],[.241,.01,249.5]],sage:[[.992,.003,160.4],[.981,.003,171.2],[.955,.003,170.4],[.931,.003,170.4],[.909,.004,167.7],[.885,.004,167.7],[.851,.004,169.9],[.792,.005,169.5],[.639,.01,172.4],[.605,.01,172.8],[.501,.008,175.9],[.24,.012,166.8]],olive:[[.993,.002,149.1],[.983,.003,144.8],[.956,.004,141.1],[.932,.004,142.1],[.909,.005,139.3],[.886,.006,141.1],[.852,.006,141.1],[.792,.007,140.6],[.64,.011,136.5],[.605,.012,136.5],[.5,.011,139.9],[.242,.011,138.2]],sand:[[.994,.001,106.4],[.982,.001,106.4],[.956,.002,97.6],[.932,.003,100.6],[.91,.004,95.9],[.886,.005,98.3],[.853,.006,96.6],[.792,.008,96.5],[.641,.01,106.7],[.606,.01,106.7],[.498,.008,106.7],[.243,.008,96.3]],tomato:[[.994,.003,22.8],[.984,.007,31],[.954,.022,30.9],[.926,.047,31.8],[.892,.063,31.5],[.852,.077,32],[.803,.094,32.2],[.741,.118,32.1],[.627,.194,33.3],[.604,.195,33.3],[.567,.198,32.8],[.346,.08,30.5]],red:[[.994,.003,22.8],[.983,.008,16],[.956,.021,16.2],[.928,.047,16.7],[.896,.062,17.3],[.857,.075,17.9],[.807,.089,18.4],[.745,.113,19.1],[.625,.193,23],[.6,.195,23.9],[.557,.198,25.1],[.339,.109,16.7]],ruby:[[.994,.003,356.3],[.983,.008,8.41],[.954,.022,8.56],[.928,.042,8.46],[.896,.055,8.16],[.858,.066,7.84],[.81,.08,7.49],[.749,.101,6.86],[.628,.195,13.2],[.601,.196,13.4],[.549,.199,13.9],[.341,.11,10]],crimson:[[.994,.003,356.3],[.982,.008,357.2],[.954,.026,356.3],[.925,.041,356.3],[.893,.054,355.8],[.855,.065,355.6],[.808,.078,354.8],[.75,.099,354.1],[.634,.213,1.3],[.608,.211,2.36],[.552,.207,4.49],[.341,.113,356.8]],pink:[[.994,.004,336.3],[.983,.009,340],[.954,.027,340.6],[.925,.042,340.7],[.893,.054,340.9],[.855,.067,340.9],[.809,.083,341.2],[.752,.107,341.6],[.617,.208,346.1],[.596,.207,346.5],[.557,.206,347.3],[.35,.129,345.5]],plum:[[.993,.005,316.9],[.983,.009,326],[.957,.027,325.5],[.929,.044,324.9],[.898,.057,324.4],[.86,.072,323.9],[.809,.091,323.1],[.742,.12,321.9],[.579,.188,322.1],[.553,.181,322.1],[.521,.173,322],[.338,.125,321.4]],purple:[[.993,.004,325.4],[.982,.009,313.1],[.959,.024,313.3],[.933,.039,312.1],[.901,.054,311.6],[.86,.071,311],[.804,.093,309.9],[.733,.123,308],[.555,.183,305.9],[.524,.176,305.7],[.516,.174,305.7],[.322,.11,303.8]],violet:[[.992,.003,308],[.983,.009,295],[.963,.019,296.6],[.934,.039,295.4],[.904,.057,294.1],[.864,.072,293.9],[.806,.09,293.5],[.729,.119,292.4],[.542,.179,288.1],[.511,.177,287.6],[.508,.159,288.6],[.313,.098,286.8]],iris:[[.994,.003,286.4],[.981,.009,284.1],[.961,.018,283.8],[.935,.035,283.4],[.904,.053,283.8],[.865,.07,283.1],[.808,.088,282.9],[.729,.118,281.5],[.54,.184,278.3],[.509,.186,277.5],[.51,.173,279.7],[.315,.099,277.4]],indigo:[[.994,.001,286.4],[.983,.008,271.4],[.961,.017,268.5],[.935,.034,268.5],[.903,.051,270],[.863,.071,271.5],[.807,.087,271.4],[.73,.113,270.5],[.544,.191,267.1],[.511,.195,266.5],[.51,.173,267.1],[.313,.086,268.6]],blue:[[.993,.003,247.6],[.982,.01,243.3],[.96,.02,236.7],[.937,.037,239],[.906,.053,242.8],[.864,.069,243.2],[.809,.088,243.3],[.735,.121,243],[.649,.193,251.8],[.621,.184,251.9],[.558,.189,253],[.324,.097,259]],cyan:[[.992,.004,219.2],[.98,.009,202.9],[.958,.026,203.6],[.932,.041,204.7],[.9,.054,206.5],[.859,.066,207.7],[.805,.082,209.6],[.727,.11,211.7],[.661,.122,221.5],[.627,.114,221.3],[.54,.127,223.7],[.332,.053,218.6]],teal:[[.994,.005,177.5],[.981,.009,179],[.961,.027,180.3],[.935,.042,180.2],[.9,.054,180.5],[.856,.064,181.4],[.797,.076,182.2],[.721,.097,183.5],[.649,.113,182],[.619,.11,181.2],[.53,.124,179],[.327,.05,185]],jade:[[.995,.004,172.6],[.982,.009,160.3],[.96,.022,161.9],[.934,.034,163.5],[.902,.046,164.8],[.859,.059,166.9],[.8,.077,169.5],[.721,.103,173.4],[.642,.115,170.8],[.613,.11,170.6],[.529,.127,167.2],[.326,.041,169.8]],green:[[.994,.004,159.1],[.982,.009,155.3],[.959,.023,156.4],[.933,.036,156.6],[.9,.05,157.2],[.857,.065,157.9],[.798,.084,159],[.714,.112,160.6],[.64,.133,157.8],[.611,.126,158.3],[.529,.133,158.3],[.322,.047,164.6]],grass:[[.994,.005,146.4],[.982,.009,145.9],[.961,.023,145.3],[.934,.037,146.2],[.901,.053,146.4],[.858,.071,146.8],[.798,.095,147.5],[.716,.13,148.3],[.652,.147,147.4],[.614,.142,147.3],[.527,.13,147.2],[.327,.053,148.6]],brown:[[.994,.002,63.2],[.983,.006,65.7],[.954,.013,67.8],[.926,.02,66.9],[.897,.029,65.8],[.862,.039,65.5],[.815,.053,64.2],[.747,.072,62.4],[.633,.078,60.8],[.597,.072,59.3],[.512,.058,55.5],[.332,.018,47]],bronze:[[.992,.001,15.9],[.981,.007,43],[.953,.01,44.3],[.925,.014,43.6],[.895,.018,42.6],[.86,.023,43.4],[.811,.03,41.9],[.742,.039,41.2],[.627,.046,44.3],[.588,.045,42.4],[.51,.044,38.4],[.329,.029,35.2]],gold:[[.994,.001,106.4],[.981,.009,97.3],[.953,.012,94.7],[.926,.015,93.2],[.896,.019,90.7],[.86,.025,88.4],[.81,.032,83.4],[.739,.042,78.2],[.621,.049,78.1],[.588,.047,77.4],[.504,.039,78.1],[.332,.019,81.7]],sky:[[.993,.005,211.9],[.98,.01,217.7],[.961,.024,219.6],[.936,.036,220.4],[.903,.047,221.4],[.861,.058,222.9],[.806,.072,225.7],[.729,.096,228],[.861,.103,217.8],[.838,.104,219.6],[.526,.108,232.5],[.351,.057,241.6]],mint:[[.993,.005,183.7],[.982,.01,178.7],[.96,.03,179.6],[.933,.047,179],[.899,.061,178.7],[.856,.072,178.7],[.798,.085,178.2],[.722,.107,177.7],[.87,.1,178],[.841,.1,177.8],[.512,.095,176],[.35,.051,181.4]],lime:[[.992,.004,120.7],[.982,.01,116.7],[.959,.043,119.1],[.932,.069,120.4],[.897,.087,121.8],[.853,.099,123.4],[.795,.111,125.3],[.724,.135,128.1],[.888,.175,126.1],[.859,.188,126.7],[.544,.111,128.6],[.354,.057,121.2]],yellow:[[.993,.005,106.5],[.988,.025,102.9],[.974,.084,104.4],[.953,.117,101.7],[.925,.141,98.2],[.881,.134,95.4],[.836,.12,92.8],[.766,.137,89.8],[.927,.209,102.1],[.897,.185,97.5],[.574,.136,81.7],[.358,.046,86.6]],amber:[[.994,.003,84.6],[.986,.024,100.3],[.969,.069,100.4],[.945,.104,98.2],[.918,.133,98.4],[.881,.124,93.2],[.827,.122,86.2],[.758,.14,76.7],[.856,.178,81.4],[.831,.168,80.9],[.569,.144,67.3],[.352,.049,53.7]],orange:[[.992,.003,40.7],[.979,.015,70.8],[.958,.037,78.1],[.92,.081,74.2],[.89,.107,70.8],[.857,.11,64.4],[.805,.113,59.9],[.745,.132,54.8],[.689,.191,44.8],[.662,.194,43.5],[.592,.186,47],[.35,.069,40.8]]},ta=e=>(e/=255,e<=.04045?e/12.92:((e+.055)/1.055)**2.4),g6=(e,t,n)=>{const r=.4122214708*e+.5363325363*t+.0514459929*n,i=.2119034982*e+.6806995451*t+.1073969566*n,a=.0883024619*e+.2817188376*t+.6299787005*n,s=Math.cbrt(r),o=Math.cbrt(i),u=Math.cbrt(a),l=.2104542553*s+.793617785*o-.0040720468*u,f=1.9779984951*s-2.428592205*o+.4505937099*u,d=.0259040371*s+.7827717662*o-.808675766*u;return[l,f,d]},b6=([e,t,n])=>{const r=Math.sqrt(t*t+n*n),i=Math.atan2(n,t)*180/Math.PI;return[e,r,(i+360)%360]},E6=e=>{const t=e.replace("#",""),n=parseInt(t.length===3?t.replace(/./g,s=>s+s):t,16),r=ta(n>>16&255),i=ta(n>>8&255),a=ta(n&255);return b6(g6(r,i,a))},_0=["gray","mauve","slate","sage","olive","sand"];function xi(e,t){return Object.fromEntries(t.map(n=>[n,e[n]]))}xi(T0,b0);xi(E0,b0);xi(T0,_0);xi(E0,_0);const T6={light:{1:[98.8,.015],2:[97.8,.018],3:[95.8,.025],4:[92,.04],5:[89,.05],6:[85,.07],7:[80.5,.08],8:[74,.11],9:[60,.22],10:[56,.23],11:[50,.19],12:[25,.18]},dark:{1:[19,.015],2:[21,.018],3:[25.5,.055],4:[29.3,.084],5:[33.5,.098],6:[39.05,.107],7:[45,.11],8:[55,.13],9:[60,.22],10:[67,.18],11:[79.3,.12],12:[95,.04]}},_6={light:{1:[99,.005],2:[97.5,.005],3:[95,.006],4:[92,.006],5:[88,.005],6:[83,.004],7:[76,.003],8:[65,.003],9:[55,.004],10:[45,.005],11:[35,.006],12:[20,.008]},dark:{1:[14,.008],2:[17,.008],3:[21,.01],4:[25,.01],5:[30,.008],6:[36,.006],7:[44,.005],8:[54,.004],9:[66,.003],10:[76,.004],11:[87,.005],12:[96,.006]}};function k6(e){const[t,n,r]=E6(e);return{l:t*100,c:n,h:r??0}}const Nt=(e,t,n)=>`oklch(${e}% ${t} ${n})`;function x6(e){var m,T,w,x,S,C,O,P;const{accentColor:t,mode:n}=e,r=k6(t),i=T6[n],a=_6[n],s=30,o=r.c/.22,u=A=>{const U=i[A];if(!U)return Nt(60,.22,r.h);const[v,F]=U;return A==="9"?Nt(r.l,r.c,r.h):Nt(v,F*o,r.h)},l=A=>{const U=a[A];if(!U)return Nt(50,.005,s);const[v,F]=U;return Nt(v,F,s)},f=Nt(r.l,r.c,r.h),d=Nt(r.l*.9,r.c*.9,(r.h+20)%360),p=Nt(r.l*.8,r.c*.8,(r.h+40)%360),h=n==="light"?{"--kin-bg-base":l("1"),"--kin-bg-elevated":l("2"),"--kin-bg-surface":l("3"),"--kin-bg-muted":l("4"),"--kin-border":`oklch(${((m=a[6])==null?void 0:m[0])??83}% ${((T=a[6])==null?void 0:T[1])??.004} ${s} / 0.4)`,"--kin-border-subtle":`oklch(${((w=a[5])==null?void 0:w[0])??88}% ${((x=a[5])==null?void 0:x[1])??.005} ${s} / 0.25)`,"--kin-text":l("12"),"--kin-text-secondary":l("10"),"--kin-text-muted":l("8"),"--kin-accent":u("9"),"--kin-bubble-user":u("9"),"--kin-bubble-user-text":"oklch(100% 0 0)","--kin-bubble-assistant":l("2"),"--kin-bubble-assistant-text":l("12"),"--kin-glow-1":f,"--kin-glow-2":d,"--kin-glow-3":p}:{"--kin-bg-base":l("1"),"--kin-bg-elevated":l("2"),"--kin-bg-surface":l("3"),"--kin-bg-muted":l("4"),"--kin-border":`oklch(${((S=a[6])==null?void 0:S[0])??83}% ${((C=a[6])==null?void 0:C[1])??.004} ${s} / 0.4)`,"--kin-border-subtle":`oklch(${((O=a[5])==null?void 0:O[0])??88}% ${((P=a[5])==null?void 0:P[1])??.005} ${s} / 0.25)`,"--kin-text":l("12"),"--kin-text-secondary":l("11"),"--kin-text-muted":l("9"),"--kin-accent":u("9"),"--kin-bubble-user":l("12"),"--kin-bubble-user-text":l("1"),"--kin-bubble-assistant":l("3"),"--kin-bubble-assistant-text":l("12"),"--kin-glow-1":f,"--kin-glow-2":d,"--kin-glow-3":p};return Object.entries(h).map(([A,U])=>`${A}: ${U};`).join(`
|
|
115
|
+
`)}const y6={accentColor:"#FF4D00",mode:"light"},w6={inploi:{accentColor:"#FF4D00",mode:"light"},boots:{accentColor:"#05054b",mode:"light"},wagamama:{accentColor:"#df3228",mode:"dark"},gails:{accentColor:"#cf2030",mode:"light"}},A6="wss://agents.inploi.com",C6=({serviceUrl:e=A6,theme:t=y6,starterPrompts:n=[],mode:r="floating",container:i})=>Ci.createPlugin(({logger:a,publishableKey:s})=>{if(!s)throw new Error("Kin plugin requires a publishableKey. Pass it to initialiseSdk().");let o=!1,u=null,l=t,f=null,d=!1,p=null,h=null,m=!1;const T=r==="embedded",w=()=>{if(i)if(typeof i=="string"){const F=document.querySelector(i);if(F instanceof HTMLElement)return h=F,m=!1,F}else return h=i,m=!1,i;const U=document.getElementById("inploi-kin-root");if(U)return h=U,m=!1,U;const v=document.createElement("div");return v.id="inploi-kin-root",T&&(v.className="kin-embedded"),document.body.appendChild(v),h=v,m=!0,v},x=U=>{const v=x6(U);let F=`${m6}
|
|
116
|
+
|
|
117
|
+
/* Theme overrides */
|
|
118
|
+
:host {
|
|
119
|
+
${v}
|
|
120
|
+
}`;return T&&(F+=`
|
|
121
|
+
/* Embedded mode overrides */
|
|
122
|
+
.kin-widget {
|
|
123
|
+
position: relative !important;
|
|
124
|
+
bottom: auto !important;
|
|
125
|
+
left: auto !important;
|
|
126
|
+
transform: none !important;
|
|
127
|
+
width: 100% !important;
|
|
128
|
+
height: 100% !important;
|
|
129
|
+
z-index: auto !important;
|
|
130
|
+
}
|
|
131
|
+
.kin-launcher { display: none !important; }
|
|
132
|
+
.kin-panel {
|
|
133
|
+
position: relative !important;
|
|
134
|
+
bottom: auto !important;
|
|
135
|
+
right: auto !important;
|
|
136
|
+
width: 100% !important;
|
|
137
|
+
height: 100% !important;
|
|
138
|
+
max-height: none !important;
|
|
139
|
+
border-radius: 0 !important;
|
|
140
|
+
box-shadow: none !important;
|
|
141
|
+
display: flex !important;
|
|
142
|
+
opacity: 1 !important;
|
|
143
|
+
transform: none !important;
|
|
144
|
+
animation: none !important;
|
|
145
|
+
}
|
|
146
|
+
`),F},S=()=>{if(typeof window>"u")return;const U=w(),v=U.shadowRoot||U.attachShadow({mode:"open"});Is(Pt(je,{},[Pt("style",{id:"kin-styles"},x(l)),Pt(p6,{starterPrompts:n,embedded:T,onSendMessage:F=>{u&&u.sendMessage(F)},onOpen:()=>{P(),O()},onClose:()=>{T||(Y.isOpen.value=!1)},onConnect:()=>{P()},onClearData:()=>{u&&u.clearData()},onUploadFile:async(F,I)=>{if(!u){Y.setUploadState("error",F.name,"Not connected");return}Y.setUploadState("uploading",F.name);const $=await u.uploadFile(F,I);$.success||Y.setUploadState("error",F.name,$.error)}})]),v)},C=()=>{o||(f=Ci.getOrCreateAnonymousId(),S(),o=!0)},O=()=>{Y.isOpen.value=!0,Y.clearUnreadMessages()},P=()=>{if(u)return;Y.connectionState.value="connecting",f||(f=Ci.getOrCreateAnonymousId());const U=`${e}/agent/candidate/${f}?key=${s}`;u=u6({url:U,onMessage:v=>{switch(v.type){case"authenticated":a.info(`Authenticated with ${v.company}`),Y.connectionState.value="connected";break;case"history":v.messages&&v.messages.length>0&&(a.info(`Loaded ${v.messages.length} messages from server`),Y.setMessages(v.messages));break;case"response_start":Y.isStreaming.value=!0,Y.addMessage({role:"assistant",content:""});break;case"response_chunk":Y.appendToLastMessage(v.content||"");break;case"response_end":Y.isStreaming.value=!1,Y.syncToOtherTabs(),Y.isOpen.value||Y.setHasUnreadMessages(!0);break;case"quick_replies":v.options&&v.options.length>=2&&Y.setQuickReplies(v.options);break;case"data_cleared":a.info("User data cleared"),Y.clearMessages(),Y.addMessage({role:"system",content:"Your conversation data has been cleared."});break;case"guardrail_block":Y.isStreaming.value=!1,a.warn("Content blocked by safety policy"),Y.addMessage({role:"system",content:v.content||"I'm not able to help with that request."}),Y.syncToOtherTabs();break;case"upload_received":a.info(`File upload received: ${v.fileName}`),Y.setUploadState("processing",v.fileName);break;case"file_processing":a.info(`Processing file: ${v.fileName}`),Y.setUploadState("processing",v.fileName);break;case"file_processed":v.status==="success"?(a.info(`File processed successfully: ${v.fileName}`),Y.setUploadState("success",v.fileName),setTimeout(()=>Y.resetUploadState(),2e3)):(a.error(`File processing failed: ${v.error}`),Y.setUploadState("error",v.fileName,v.error));break;case"error":Y.isStreaming.value=!1,Y.uploadState.value!=="idle"&&Y.setUploadState("error",void 0,v.content),a.error("Kin error:",v.content),Y.addMessage({role:"assistant",content:v.content||"An error occurred"});break}},onOpen:()=>{a.info("WebSocket opened, awaiting authentication...")},onClose:()=>{a.info("Disconnected from Kin service"),Y.connectionState.value="disconnected",Y.isStreaming.value=!1;const v=d;u=null,d=!1,!v&&Y.isOpen.value&&(a.info("Attempting to reconnect..."),p=setTimeout(()=>{p=null,P()},1e3))},onError:v=>{a.error("Kin connection error:",v),Y.connectionState.value="error",Y.isStreaming.value=!1}})},A=()=>{p&&(clearTimeout(p),p=null),u&&(d=!0,u.disconnect(),u=null)};return{prepare:()=>{typeof window>"u"||o||(C(),P(),a.info("Kin plugin prepared"))},open:()=>{typeof window>"u"||(C(),P(),O(),a.info("Kin opened"))},close:()=>{typeof window>"u"||(Y.isOpen.value=!1,a.info("Kin closed"))},toggle:()=>{typeof window>"u"||(Y.isOpen.value?Y.isOpen.value=!1:(C(),P(),O()))},setTheme:U=>{var v;if(l=U,o&&h){const F=(v=h.shadowRoot)==null?void 0:v.getElementById("kin-styles");F&&(F.textContent=x(l))}a.info("Kin theme updated:",U)},destroy:()=>{typeof window>"u"||(A(),h&&(h.shadowRoot&&Is(null,h.shadowRoot),m&&h.remove()),Y.isOpen.value=!1,Y.isStreaming.value=!1,Y.connectionState.value="idle",Y.clearMessages(),Y.resetUploadState(),Y.clearUnreadMessages(),o=!1,h=null,m=!1,a.info("Kin plugin destroyed"))}}});exports.BRAND_THEMES=w6;exports.F=Re;exports.N=tt;exports.ao=Bd;exports.b=K;exports.cr=hx;exports.h=le;exports.kinPlugin=C6;exports.o=b;exports.p=Ae;exports.q=nt;exports.tt=m0;exports.x=fe;
|